框架源码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

4632 lines
125 KiB

4 years ago
  1. module.exports =
  2. /******/ (function(modules) { // webpackBootstrap
  3. /******/ // The module cache
  4. /******/ var installedModules = {};
  5. /******/
  6. /******/ // The require function
  7. /******/ function __webpack_require__(moduleId) {
  8. /******/
  9. /******/ // Check if module is in cache
  10. /******/ if(installedModules[moduleId]) {
  11. /******/ return installedModules[moduleId].exports;
  12. /******/ }
  13. /******/ // Create a new module (and put it into the cache)
  14. /******/ var module = installedModules[moduleId] = {
  15. /******/ i: moduleId,
  16. /******/ l: false,
  17. /******/ exports: {}
  18. /******/ };
  19. /******/
  20. /******/ // Execute the module function
  21. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  22. /******/
  23. /******/ // Flag the module as loaded
  24. /******/ module.l = true;
  25. /******/
  26. /******/ // Return the exports of the module
  27. /******/ return module.exports;
  28. /******/ }
  29. /******/
  30. /******/
  31. /******/ // expose the modules object (__webpack_modules__)
  32. /******/ __webpack_require__.m = modules;
  33. /******/
  34. /******/ // expose the module cache
  35. /******/ __webpack_require__.c = installedModules;
  36. /******/
  37. /******/ // define getter function for harmony exports
  38. /******/ __webpack_require__.d = function(exports, name, getter) {
  39. /******/ if(!__webpack_require__.o(exports, name)) {
  40. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  41. /******/ }
  42. /******/ };
  43. /******/
  44. /******/ // define __esModule on exports
  45. /******/ __webpack_require__.r = function(exports) {
  46. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  47. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  48. /******/ }
  49. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  50. /******/ };
  51. /******/
  52. /******/ // create a fake namespace object
  53. /******/ // mode & 1: value is a module id, require it
  54. /******/ // mode & 2: merge all properties of value into the ns
  55. /******/ // mode & 4: return value when already ns object
  56. /******/ // mode & 8|1: behave like require
  57. /******/ __webpack_require__.t = function(value, mode) {
  58. /******/ if(mode & 1) value = __webpack_require__(value);
  59. /******/ if(mode & 8) return value;
  60. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  61. /******/ var ns = Object.create(null);
  62. /******/ __webpack_require__.r(ns);
  63. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  64. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  65. /******/ return ns;
  66. /******/ };
  67. /******/
  68. /******/ // getDefaultExport function for compatibility with non-harmony modules
  69. /******/ __webpack_require__.n = function(module) {
  70. /******/ var getter = module && module.__esModule ?
  71. /******/ function getDefault() { return module['default']; } :
  72. /******/ function getModuleExports() { return module; };
  73. /******/ __webpack_require__.d(getter, 'a', getter);
  74. /******/ return getter;
  75. /******/ };
  76. /******/
  77. /******/ // Object.prototype.hasOwnProperty.call
  78. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  79. /******/
  80. /******/ // __webpack_public_path__
  81. /******/ __webpack_require__.p = "/dist/";
  82. /******/
  83. /******/
  84. /******/ // Load entry module and return exports
  85. /******/ return __webpack_require__(__webpack_require__.s = 557);
  86. /******/ })
  87. /************************************************************************/
  88. /******/ ({
  89. /***/ 10:
  90. /***/ (function(module, exports) {
  91. module.exports = require("tis-ui/lib/utils/util");
  92. /***/ }),
  93. /***/ 101:
  94. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  95. "use strict";
  96. // ESM COMPAT FLAG
  97. __webpack_require__.r(__webpack_exports__);
  98. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tag/src/tag.vue?vue&type=script&lang=js&
  99. /* harmony default export */ var tagvue_type_script_lang_js_ = ({
  100. name: 'TisTag',
  101. props: {
  102. text: String,
  103. closable: Boolean,
  104. type: String,
  105. hit: Boolean,
  106. disableTransitions: Boolean,
  107. color: String,
  108. size: String,
  109. effect: {
  110. type: String,
  111. default: 'light',
  112. validator: function validator(val) {
  113. return ['dark', 'light', 'plain'].indexOf(val) !== -1;
  114. }
  115. }
  116. },
  117. methods: {
  118. handleClose: function handleClose(event) {
  119. event.stopPropagation();
  120. this.$emit('close', event);
  121. },
  122. handleClick: function handleClick(event) {
  123. this.$emit('click', event);
  124. }
  125. },
  126. computed: {
  127. tagSize: function tagSize() {
  128. return this.size || (this.$ELEMENT || {}).size;
  129. }
  130. },
  131. render: function render(h) {
  132. var type = this.type,
  133. tagSize = this.tagSize,
  134. hit = this.hit,
  135. effect = this.effect;
  136. var classes = ['el-tag', type ? 'el-tag--' + type : '', tagSize ? 'el-tag--' + tagSize : '', effect ? 'el-tag--' + effect : '', hit && 'is-hit'];
  137. var tagEl = h(
  138. 'span',
  139. {
  140. 'class': classes,
  141. style: { backgroundColor: this.color },
  142. on: {
  143. 'click': this.handleClick
  144. }
  145. },
  146. [this.$slots.default, this.closable && h('i', { 'class': 'el-tag__close el-icon-close', on: {
  147. 'click': this.handleClose
  148. }
  149. })]
  150. );
  151. return this.disableTransitions ? tagEl : h(
  152. 'transition',
  153. {
  154. attrs: { name: 'el-zoom-in-center' }
  155. },
  156. [tagEl]
  157. );
  158. }
  159. });
  160. // CONCATENATED MODULE: ./packages/tag/src/tag.vue?vue&type=script&lang=js&
  161. /* harmony default export */ var src_tagvue_type_script_lang_js_ = (tagvue_type_script_lang_js_);
  162. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  163. var componentNormalizer = __webpack_require__(2);
  164. // CONCATENATED MODULE: ./packages/tag/src/tag.vue
  165. var render, staticRenderFns
  166. /* normalize component */
  167. var component = Object(componentNormalizer["a" /* default */])(
  168. src_tagvue_type_script_lang_js_,
  169. render,
  170. staticRenderFns,
  171. false,
  172. null,
  173. null,
  174. null
  175. )
  176. /* hot reload */
  177. if (false) { var api; }
  178. component.options.__file = "packages/tag/src/tag.vue"
  179. /* harmony default export */ var tag = (component.exports);
  180. // CONCATENATED MODULE: ./packages/tag/index.js
  181. /* istanbul ignore next */
  182. tag.install = function (Vue) {
  183. Vue.component(tag.name, tag);
  184. };
  185. /* harmony default export */ var packages_tag = __webpack_exports__["default"] = (tag);
  186. /***/ }),
  187. /***/ 103:
  188. /***/ (function(module, exports) {
  189. module.exports = require("tis-ui/lib/utils/aria-utils");
  190. /***/ }),
  191. /***/ 120:
  192. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  193. "use strict";
  194. // ESM COMPAT FLAG
  195. __webpack_require__.r(__webpack_exports__);
  196. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio.vue?vue&type=template&id=69cd6268&
  197. var render = function() {
  198. var _vm = this
  199. var _h = _vm.$createElement
  200. var _c = _vm._self._c || _h
  201. return _c(
  202. "label",
  203. {
  204. staticClass: "el-radio",
  205. class: [
  206. _vm.border && _vm.radioSize ? "el-radio--" + _vm.radioSize : "",
  207. { "is-disabled": _vm.isDisabled },
  208. { "is-focus": _vm.focus },
  209. { "is-bordered": _vm.border },
  210. { "is-checked": _vm.model === _vm.label }
  211. ],
  212. attrs: {
  213. role: "radio",
  214. "aria-checked": _vm.model === _vm.label,
  215. "aria-disabled": _vm.isDisabled,
  216. tabindex: _vm.tabIndex
  217. },
  218. on: {
  219. keydown: function($event) {
  220. if (
  221. !("button" in $event) &&
  222. _vm._k($event.keyCode, "space", 32, $event.key, [" ", "Spacebar"])
  223. ) {
  224. return null
  225. }
  226. $event.stopPropagation()
  227. $event.preventDefault()
  228. _vm.model = _vm.isDisabled ? _vm.model : _vm.label
  229. }
  230. }
  231. },
  232. [
  233. _c(
  234. "span",
  235. {
  236. staticClass: "el-radio__input",
  237. class: {
  238. "is-disabled": _vm.isDisabled,
  239. "is-checked": _vm.model === _vm.label
  240. }
  241. },
  242. [
  243. _c("span", { staticClass: "el-radio__inner" }),
  244. _c("input", {
  245. directives: [
  246. {
  247. name: "model",
  248. rawName: "v-model",
  249. value: _vm.model,
  250. expression: "model"
  251. }
  252. ],
  253. ref: "radio",
  254. staticClass: "el-radio__original",
  255. attrs: {
  256. type: "radio",
  257. "aria-hidden": "true",
  258. name: _vm.name,
  259. disabled: _vm.isDisabled,
  260. tabindex: "-1"
  261. },
  262. domProps: {
  263. value: _vm.label,
  264. checked: _vm._q(_vm.model, _vm.label)
  265. },
  266. on: {
  267. focus: function($event) {
  268. _vm.focus = true
  269. },
  270. blur: function($event) {
  271. _vm.focus = false
  272. },
  273. change: [
  274. function($event) {
  275. _vm.model = _vm.label
  276. },
  277. _vm.handleChange
  278. ]
  279. }
  280. })
  281. ]
  282. ),
  283. _c(
  284. "span",
  285. {
  286. staticClass: "el-radio__label",
  287. on: {
  288. keydown: function($event) {
  289. $event.stopPropagation()
  290. }
  291. }
  292. },
  293. [
  294. _vm._t("default"),
  295. !_vm.$slots.default ? [_vm._v(_vm._s(_vm.label))] : _vm._e()
  296. ],
  297. 2
  298. )
  299. ]
  300. )
  301. }
  302. var staticRenderFns = []
  303. render._withStripped = true
  304. // CONCATENATED MODULE: ./packages/radio/src/radio.vue?vue&type=template&id=69cd6268&
  305. // EXTERNAL MODULE: external "tis-ui/lib/mixins/emitter"
  306. var emitter_ = __webpack_require__(13);
  307. var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
  308. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio/src/radio.vue?vue&type=script&lang=js&
  309. //
  310. //
  311. //
  312. //
  313. //
  314. //
  315. //
  316. //
  317. //
  318. //
  319. //
  320. //
  321. //
  322. //
  323. //
  324. //
  325. //
  326. //
  327. //
  328. //
  329. //
  330. //
  331. //
  332. //
  333. //
  334. //
  335. //
  336. //
  337. //
  338. //
  339. //
  340. //
  341. //
  342. //
  343. //
  344. //
  345. //
  346. //
  347. //
  348. //
  349. //
  350. //
  351. //
  352. //
  353. /* harmony default export */ var radiovue_type_script_lang_js_ = ({
  354. name: 'TisRadio',
  355. mixins: [emitter_default.a],
  356. inject: {
  357. elForm: {
  358. default: ''
  359. },
  360. elFormItem: {
  361. default: ''
  362. }
  363. },
  364. componentName: 'TisRadio',
  365. props: {
  366. value: {},
  367. label: {},
  368. disabled: Boolean,
  369. name: String,
  370. border: Boolean,
  371. size: String
  372. },
  373. data: function data() {
  374. return {
  375. focus: false
  376. };
  377. },
  378. computed: {
  379. isGroup: function isGroup() {
  380. var parent = this.$parent;
  381. while (parent) {
  382. if (parent.$options.componentName !== 'TisRadioGroup') {
  383. parent = parent.$parent;
  384. } else {
  385. this._radioGroup = parent;
  386. return true;
  387. }
  388. }
  389. return false;
  390. },
  391. model: {
  392. get: function get() {
  393. return this.isGroup ? this._radioGroup.value : this.value;
  394. },
  395. set: function set(val) {
  396. if (this.isGroup) {
  397. this.dispatch('TisRadioGroup', 'input', [val]);
  398. } else {
  399. this.$emit('input', val);
  400. }
  401. this.$refs.radio && (this.$refs.radio.checked = this.model === this.label);
  402. }
  403. },
  404. _elFormItemSize: function _elFormItemSize() {
  405. return (this.elFormItem || {}).elFormItemSize;
  406. },
  407. radioSize: function radioSize() {
  408. var temRadioSize = this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
  409. return this.isGroup ? this._radioGroup.radioGroupSize || temRadioSize : temRadioSize;
  410. },
  411. isDisabled: function isDisabled() {
  412. return this.isGroup ? this._radioGroup.disabled || this.disabled || (this.elForm || {}).disabled : this.disabled || (this.elForm || {}).disabled;
  413. },
  414. tabIndex: function tabIndex() {
  415. return this.isDisabled || this.isGroup && this.model !== this.label ? -1 : 0;
  416. }
  417. },
  418. methods: {
  419. handleChange: function handleChange() {
  420. var _this = this;
  421. this.$nextTick(function () {
  422. _this.$emit('change', _this.model);
  423. _this.isGroup && _this.dispatch('TisRadioGroup', 'handleChange', _this.model);
  424. });
  425. }
  426. }
  427. });
  428. // CONCATENATED MODULE: ./packages/radio/src/radio.vue?vue&type=script&lang=js&
  429. /* harmony default export */ var src_radiovue_type_script_lang_js_ = (radiovue_type_script_lang_js_);
  430. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  431. var componentNormalizer = __webpack_require__(2);
  432. // CONCATENATED MODULE: ./packages/radio/src/radio.vue
  433. /* normalize component */
  434. var component = Object(componentNormalizer["a" /* default */])(
  435. src_radiovue_type_script_lang_js_,
  436. render,
  437. staticRenderFns,
  438. false,
  439. null,
  440. null,
  441. null
  442. )
  443. /* hot reload */
  444. if (false) { var api; }
  445. component.options.__file = "packages/radio/src/radio.vue"
  446. /* harmony default export */ var src_radio = (component.exports);
  447. // CONCATENATED MODULE: ./packages/radio/index.js
  448. /* istanbul ignore next */
  449. src_radio.install = function (Vue) {
  450. Vue.component(src_radio.name, src_radio);
  451. };
  452. /* harmony default export */ var packages_radio = __webpack_exports__["default"] = (src_radio);
  453. /***/ }),
  454. /***/ 13:
  455. /***/ (function(module, exports) {
  456. module.exports = require("tis-ui/lib/mixins/emitter");
  457. /***/ }),
  458. /***/ 151:
  459. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  460. "use strict";
  461. // ESM COMPAT FLAG
  462. __webpack_require__.r(__webpack_exports__);
  463. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-panel.vue?vue&type=template&id=34932346&
  464. var cascader_panelvue_type_template_id_34932346_render = function() {
  465. var _vm = this
  466. var _h = _vm.$createElement
  467. var _c = _vm._self._c || _h
  468. return _c(
  469. "div",
  470. {
  471. class: ["el-cascader-panel", _vm.border && "is-bordered"],
  472. on: { keydown: _vm.handleKeyDown }
  473. },
  474. _vm._l(_vm.menus, function(menu, index) {
  475. return _c("cascader-menu", {
  476. key: index,
  477. ref: "menu",
  478. refInFor: true,
  479. attrs: { index: index, nodes: menu }
  480. })
  481. }),
  482. 1
  483. )
  484. }
  485. var staticRenderFns = []
  486. cascader_panelvue_type_template_id_34932346_render._withStripped = true
  487. // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-panel.vue?vue&type=template&id=34932346&
  488. // EXTERNAL MODULE: external "babel-helper-vue-jsx-merge-props"
  489. var external_babel_helper_vue_jsx_merge_props_ = __webpack_require__(90);
  490. var external_babel_helper_vue_jsx_merge_props_default = /*#__PURE__*/__webpack_require__.n(external_babel_helper_vue_jsx_merge_props_);
  491. // EXTERNAL MODULE: ./packages/scrollbar/index.js + 3 modules
  492. var scrollbar = __webpack_require__(66);
  493. // EXTERNAL MODULE: ./packages/checkbox/index.js + 5 modules
  494. var packages_checkbox = __webpack_require__(68);
  495. // EXTERNAL MODULE: ./packages/radio/index.js + 5 modules
  496. var packages_radio = __webpack_require__(120);
  497. // EXTERNAL MODULE: external "tis-ui/lib/utils/util"
  498. var util_ = __webpack_require__(10);
  499. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-node.vue?vue&type=script&lang=js&
  500. var stopPropagation = function stopPropagation(e) {
  501. return e.stopPropagation();
  502. };
  503. /* harmony default export */ var cascader_nodevue_type_script_lang_js_ = ({
  504. inject: ['panel'],
  505. components: {
  506. ElCheckbox: packages_checkbox["default"],
  507. ElRadio: packages_radio["default"]
  508. },
  509. props: {
  510. node: {
  511. required: true
  512. },
  513. nodeId: String
  514. },
  515. computed: {
  516. config: function config() {
  517. return this.panel.config;
  518. },
  519. isLeaf: function isLeaf() {
  520. return this.node.isLeaf;
  521. },
  522. isDisabled: function isDisabled() {
  523. return this.node.isDisabled;
  524. },
  525. checkedValue: function checkedValue() {
  526. return this.panel.checkedValue;
  527. },
  528. isChecked: function isChecked() {
  529. return this.node.isSameNode(this.checkedValue);
  530. },
  531. inActivePath: function inActivePath() {
  532. return this.isInPath(this.panel.activePath);
  533. },
  534. inCheckedPath: function inCheckedPath() {
  535. var _this = this;
  536. if (!this.config.checkStrictly) return false;
  537. return this.panel.checkedNodePaths.some(function (checkedPath) {
  538. return _this.isInPath(checkedPath);
  539. });
  540. },
  541. value: function value() {
  542. return this.node.getValueByOption();
  543. }
  544. },
  545. methods: {
  546. handleExpand: function handleExpand() {
  547. var _this2 = this;
  548. var panel = this.panel,
  549. node = this.node,
  550. isDisabled = this.isDisabled,
  551. config = this.config;
  552. var multiple = config.multiple,
  553. checkStrictly = config.checkStrictly;
  554. if (!checkStrictly && isDisabled || node.loading) return;
  555. if (config.lazy && !node.loaded) {
  556. panel.lazyLoad(node, function () {
  557. // do not use cached leaf value here, invoke this.isLeaf to get new value.
  558. var isLeaf = _this2.isLeaf;
  559. if (!isLeaf) _this2.handleExpand();
  560. if (multiple) {
  561. // if leaf sync checked state, else clear checked state
  562. var checked = isLeaf ? node.checked : false;
  563. _this2.handleMultiCheckChange(checked);
  564. }
  565. });
  566. } else {
  567. panel.handleExpand(node);
  568. }
  569. },
  570. handleCheckChange: function handleCheckChange() {
  571. var panel = this.panel,
  572. value = this.value,
  573. node = this.node;
  574. panel.handleCheckChange(value);
  575. panel.handleExpand(node);
  576. },
  577. handleMultiCheckChange: function handleMultiCheckChange(checked) {
  578. this.node.doCheck(checked);
  579. this.panel.calculateMultiCheckedValue();
  580. },
  581. isInPath: function isInPath(pathNodes) {
  582. var node = this.node;
  583. var selectedPathNode = pathNodes[node.level - 1] || {};
  584. return selectedPathNode.uid === node.uid;
  585. },
  586. renderPrefix: function renderPrefix(h) {
  587. var isLeaf = this.isLeaf,
  588. isChecked = this.isChecked,
  589. config = this.config;
  590. var checkStrictly = config.checkStrictly,
  591. multiple = config.multiple;
  592. if (multiple) {
  593. return this.renderCheckbox(h);
  594. } else if (checkStrictly) {
  595. return this.renderRadio(h);
  596. } else if (isLeaf && isChecked) {
  597. return this.renderCheckIcon(h);
  598. }
  599. return null;
  600. },
  601. renderPostfix: function renderPostfix(h) {
  602. var node = this.node,
  603. isLeaf = this.isLeaf;
  604. if (node.loading) {
  605. return this.renderLoadingIcon(h);
  606. } else if (!isLeaf) {
  607. return this.renderExpandIcon(h);
  608. }
  609. return null;
  610. },
  611. renderCheckbox: function renderCheckbox(h) {
  612. var node = this.node,
  613. config = this.config,
  614. isDisabled = this.isDisabled;
  615. var events = {
  616. on: { change: this.handleMultiCheckChange },
  617. nativeOn: {}
  618. };
  619. if (config.checkStrictly) {
  620. // when every node is selectable, click event should not trigger expand event.
  621. events.nativeOn.click = stopPropagation;
  622. }
  623. return h('tis-checkbox', external_babel_helper_vue_jsx_merge_props_default()([{
  624. attrs: {
  625. value: node.checked,
  626. indeterminate: node.indeterminate,
  627. disabled: isDisabled
  628. }
  629. }, events]));
  630. },
  631. renderRadio: function renderRadio(h) {
  632. var checkedValue = this.checkedValue,
  633. value = this.value,
  634. isDisabled = this.isDisabled;
  635. // to keep same reference if value cause radio's checked state is calculated by reference comparision;
  636. if (Object(util_["isEqual"])(value, checkedValue)) {
  637. value = checkedValue;
  638. }
  639. return h(
  640. 'tis-radio',
  641. {
  642. attrs: {
  643. value: checkedValue,
  644. label: value,
  645. disabled: isDisabled
  646. },
  647. on: {
  648. 'change': this.handleCheckChange
  649. },
  650. nativeOn: {
  651. 'click': stopPropagation
  652. }
  653. },
  654. [h('span')]
  655. );
  656. },
  657. renderCheckIcon: function renderCheckIcon(h) {
  658. return h('i', { 'class': 'el-icon-check el-cascader-node__prefix' });
  659. },
  660. renderLoadingIcon: function renderLoadingIcon(h) {
  661. return h('i', { 'class': 'el-icon-loading el-cascader-node__postfix' });
  662. },
  663. renderExpandIcon: function renderExpandIcon(h) {
  664. return h('i', { 'class': 'el-icon-arrow-right el-cascader-node__postfix' });
  665. },
  666. renderContent: function renderContent(h) {
  667. var panel = this.panel,
  668. node = this.node;
  669. var render = panel.renderLabelFn;
  670. var vnode = render ? render({ node: node, data: node.data }) : null;
  671. return h(
  672. 'span',
  673. { 'class': 'el-cascader-node__label' },
  674. [vnode || node.label]
  675. );
  676. }
  677. },
  678. render: function render(h) {
  679. var _this3 = this;
  680. var inActivePath = this.inActivePath,
  681. inCheckedPath = this.inCheckedPath,
  682. isChecked = this.isChecked,
  683. isLeaf = this.isLeaf,
  684. isDisabled = this.isDisabled,
  685. config = this.config,
  686. nodeId = this.nodeId;
  687. var expandTrigger = config.expandTrigger,
  688. checkStrictly = config.checkStrictly,
  689. multiple = config.multiple;
  690. var disabled = !checkStrictly && isDisabled;
  691. var events = { on: {} };
  692. if (expandTrigger === 'click') {
  693. events.on.click = this.handleExpand;
  694. } else {
  695. events.on.mouseenter = function (e) {
  696. _this3.handleExpand();
  697. _this3.$emit('expand', e);
  698. };
  699. events.on.focus = function (e) {
  700. _this3.handleExpand();
  701. _this3.$emit('expand', e);
  702. };
  703. }
  704. if (isLeaf && !isDisabled && !checkStrictly && !multiple) {
  705. events.on.click = this.handleCheckChange;
  706. }
  707. return h(
  708. 'li',
  709. external_babel_helper_vue_jsx_merge_props_default()([{
  710. attrs: {
  711. role: 'menuitem',
  712. id: nodeId,
  713. 'aria-expanded': inActivePath,
  714. tabindex: disabled ? null : -1
  715. },
  716. 'class': {
  717. 'el-cascader-node': true,
  718. 'is-selectable': checkStrictly,
  719. 'in-active-path': inActivePath,
  720. 'in-checked-path': inCheckedPath,
  721. 'is-active': isChecked,
  722. 'is-disabled': disabled
  723. }
  724. }, events]),
  725. [this.renderPrefix(h), this.renderContent(h), this.renderPostfix(h)]
  726. );
  727. }
  728. });
  729. // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-node.vue?vue&type=script&lang=js&
  730. /* harmony default export */ var src_cascader_nodevue_type_script_lang_js_ = (cascader_nodevue_type_script_lang_js_);
  731. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  732. var componentNormalizer = __webpack_require__(2);
  733. // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-node.vue
  734. var cascader_node_render, cascader_node_staticRenderFns
  735. /* normalize component */
  736. var component = Object(componentNormalizer["a" /* default */])(
  737. src_cascader_nodevue_type_script_lang_js_,
  738. cascader_node_render,
  739. cascader_node_staticRenderFns,
  740. false,
  741. null,
  742. null,
  743. null
  744. )
  745. /* hot reload */
  746. if (false) { var api; }
  747. component.options.__file = "packages/cascader-panel/src/cascader-node.vue"
  748. /* harmony default export */ var cascader_node = (component.exports);
  749. // EXTERNAL MODULE: external "tis-ui/lib/mixins/locale"
  750. var locale_ = __webpack_require__(38);
  751. var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
  752. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-menu.vue?vue&type=script&lang=js&
  753. /* harmony default export */ var cascader_menuvue_type_script_lang_js_ = ({
  754. name: 'TisCascaderMenu',
  755. mixins: [locale_default.a],
  756. inject: ['panel'],
  757. components: {
  758. ElScrollbar: scrollbar["default"],
  759. CascaderNode: cascader_node
  760. },
  761. props: {
  762. nodes: {
  763. type: Array,
  764. required: true
  765. },
  766. index: Number
  767. },
  768. data: function data() {
  769. return {
  770. activeNode: null,
  771. hoverTimer: null,
  772. id: Object(util_["generateId"])()
  773. };
  774. },
  775. computed: {
  776. isEmpty: function isEmpty() {
  777. return !this.nodes.length;
  778. },
  779. menuId: function menuId() {
  780. return 'cascader-menu-' + this.id + '-' + this.index;
  781. }
  782. },
  783. methods: {
  784. handleExpand: function handleExpand(e) {
  785. this.activeNode = e.target;
  786. },
  787. handleMouseMove: function handleMouseMove(e) {
  788. var activeNode = this.activeNode,
  789. hoverTimer = this.hoverTimer;
  790. var hoverZone = this.$refs.hoverZone;
  791. if (!activeNode || !hoverZone) return;
  792. if (activeNode.contains(e.target)) {
  793. clearTimeout(hoverTimer);
  794. var _$el$getBoundingClien = this.$el.getBoundingClientRect(),
  795. left = _$el$getBoundingClien.left;
  796. var startX = e.clientX - left;
  797. var _$el = this.$el,
  798. offsetWidth = _$el.offsetWidth,
  799. offsetHeight = _$el.offsetHeight;
  800. var top = activeNode.offsetTop;
  801. var bottom = top + activeNode.offsetHeight;
  802. hoverZone.innerHTML = '\n <path style="pointer-events: auto;" fill="transparent" d="M' + startX + ' ' + top + ' L' + offsetWidth + ' 0 V' + top + ' Z" />\n <path style="pointer-events: auto;" fill="transparent" d="M' + startX + ' ' + bottom + ' L' + offsetWidth + ' ' + offsetHeight + ' V' + bottom + ' Z" />\n ';
  803. } else if (!hoverTimer) {
  804. this.hoverTimer = setTimeout(this.clearHoverZone, this.panel.config.hoverThreshold);
  805. }
  806. },
  807. clearHoverZone: function clearHoverZone() {
  808. var hoverZone = this.$refs.hoverZone;
  809. if (!hoverZone) return;
  810. hoverZone.innerHTML = '';
  811. },
  812. renderEmptyText: function renderEmptyText(h) {
  813. return h(
  814. 'div',
  815. { 'class': 'el-cascader-menu__empty-text' },
  816. [this.t('el.cascader.noData')]
  817. );
  818. },
  819. renderNodeList: function renderNodeList(h) {
  820. var menuId = this.menuId;
  821. var isHoverMenu = this.panel.isHoverMenu;
  822. var events = { on: {} };
  823. if (isHoverMenu) {
  824. events.on.expand = this.handleExpand;
  825. }
  826. var nodes = this.nodes.map(function (node, index) {
  827. var hasChildren = node.hasChildren;
  828. return h('cascader-node', external_babel_helper_vue_jsx_merge_props_default()([{
  829. key: node.uid,
  830. attrs: { node: node,
  831. 'node-id': menuId + '-' + index,
  832. 'aria-haspopup': hasChildren,
  833. 'aria-owns': hasChildren ? menuId : null
  834. }
  835. }, events]));
  836. });
  837. return [].concat(nodes, [isHoverMenu ? h('svg', { ref: 'hoverZone', 'class': 'el-cascader-menu__hover-zone' }) : null]);
  838. }
  839. },
  840. render: function render(h) {
  841. var isEmpty = this.isEmpty,
  842. menuId = this.menuId;
  843. var events = { nativeOn: {} };
  844. // optimize hover to expand experience (#8010)
  845. if (this.panel.isHoverMenu) {
  846. events.nativeOn.mousemove = this.handleMouseMove;
  847. // events.nativeOn.mouseleave = this.clearHoverZone;
  848. }
  849. return h(
  850. 'tis-scrollbar',
  851. external_babel_helper_vue_jsx_merge_props_default()([{
  852. attrs: {
  853. tag: 'ul',
  854. role: 'menu',
  855. id: menuId,
  856. 'wrap-class': 'el-cascader-menu__wrap',
  857. 'view-class': {
  858. 'el-cascader-menu__list': true,
  859. 'is-empty': isEmpty
  860. }
  861. },
  862. 'class': 'el-cascader-menu' }, events]),
  863. [isEmpty ? this.renderEmptyText(h) : this.renderNodeList(h)]
  864. );
  865. }
  866. });
  867. // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-menu.vue?vue&type=script&lang=js&
  868. /* harmony default export */ var src_cascader_menuvue_type_script_lang_js_ = (cascader_menuvue_type_script_lang_js_);
  869. // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-menu.vue
  870. var cascader_menu_render, cascader_menu_staticRenderFns
  871. /* normalize component */
  872. var cascader_menu_component = Object(componentNormalizer["a" /* default */])(
  873. src_cascader_menuvue_type_script_lang_js_,
  874. cascader_menu_render,
  875. cascader_menu_staticRenderFns,
  876. false,
  877. null,
  878. null,
  879. null
  880. )
  881. /* hot reload */
  882. if (false) { var cascader_menu_api; }
  883. cascader_menu_component.options.__file = "packages/cascader-panel/src/cascader-menu.vue"
  884. /* harmony default export */ var cascader_menu = (cascader_menu_component.exports);
  885. // EXTERNAL MODULE: external "tis-ui/lib/utils/shared"
  886. var shared_ = __webpack_require__(49);
  887. // CONCATENATED MODULE: ./packages/cascader-panel/src/node.js
  888. var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
  889. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  890. var uid = 0;
  891. var node_Node = function () {
  892. function Node(data, config, parentNode) {
  893. _classCallCheck(this, Node);
  894. this.data = data;
  895. this.config = config;
  896. this.parent = parentNode || null;
  897. this.level = !this.parent ? 1 : this.parent.level + 1;
  898. this.uid = uid++;
  899. this.initState();
  900. this.initChildren();
  901. }
  902. Node.prototype.initState = function initState() {
  903. var _config = this.config,
  904. valueKey = _config.value,
  905. labelKey = _config.label;
  906. this.value = this.data[valueKey];
  907. this.label = this.data[labelKey];
  908. this.pathNodes = this.calculatePathNodes();
  909. this.path = this.pathNodes.map(function (node) {
  910. return node.value;
  911. });
  912. this.pathLabels = this.pathNodes.map(function (node) {
  913. return node.label;
  914. });
  915. // lazy load
  916. this.loading = false;
  917. this.loaded = false;
  918. };
  919. Node.prototype.initChildren = function initChildren() {
  920. var _this = this;
  921. var config = this.config;
  922. var childrenKey = config.children;
  923. var childrenData = this.data[childrenKey];
  924. this.hasChildren = Array.isArray(childrenData);
  925. this.children = (childrenData || []).map(function (child) {
  926. return new Node(child, config, _this);
  927. });
  928. };
  929. Node.prototype.calculatePathNodes = function calculatePathNodes() {
  930. var nodes = [this];
  931. var parent = this.parent;
  932. while (parent) {
  933. nodes.unshift(parent);
  934. parent = parent.parent;
  935. }
  936. return nodes;
  937. };
  938. Node.prototype.getPath = function getPath() {
  939. return this.path;
  940. };
  941. Node.prototype.getValue = function getValue() {
  942. return this.value;
  943. };
  944. Node.prototype.getValueByOption = function getValueByOption() {
  945. return this.config.emitPath ? this.getPath() : this.getValue();
  946. };
  947. Node.prototype.getText = function getText(allLevels, separator) {
  948. return allLevels ? this.pathLabels.join(separator) : this.label;
  949. };
  950. Node.prototype.isSameNode = function isSameNode(checkedValue) {
  951. var value = this.getValueByOption();
  952. return this.config.multiple && Array.isArray(checkedValue) ? checkedValue.some(function (val) {
  953. return Object(util_["isEqual"])(val, value);
  954. }) : Object(util_["isEqual"])(checkedValue, value);
  955. };
  956. Node.prototype.broadcast = function broadcast(event) {
  957. for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  958. args[_key - 1] = arguments[_key];
  959. }
  960. var handlerName = 'onParent' + Object(util_["capitalize"])(event);
  961. this.children.forEach(function (child) {
  962. if (child) {
  963. // bottom up
  964. child.broadcast.apply(child, [event].concat(args));
  965. child[handlerName] && child[handlerName].apply(child, args);
  966. }
  967. });
  968. };
  969. Node.prototype.emit = function emit(event) {
  970. var parent = this.parent;
  971. var handlerName = 'onChild' + Object(util_["capitalize"])(event);
  972. if (parent) {
  973. for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  974. args[_key2 - 1] = arguments[_key2];
  975. }
  976. parent[handlerName] && parent[handlerName].apply(parent, args);
  977. parent.emit.apply(parent, [event].concat(args));
  978. }
  979. };
  980. Node.prototype.onParentCheck = function onParentCheck(checked) {
  981. if (!this.isDisabled) {
  982. this.setCheckState(checked);
  983. }
  984. };
  985. Node.prototype.onChildCheck = function onChildCheck() {
  986. var children = this.children;
  987. var validChildren = children.filter(function (child) {
  988. return !child.isDisabled;
  989. });
  990. var checked = validChildren.length ? validChildren.every(function (child) {
  991. return child.checked;
  992. }) : false;
  993. this.setCheckState(checked);
  994. };
  995. Node.prototype.setCheckState = function setCheckState(checked) {
  996. var totalNum = this.children.length;
  997. var checkedNum = this.children.reduce(function (c, p) {
  998. var num = p.checked ? 1 : p.indeterminate ? 0.5 : 0;
  999. return c + num;
  1000. }, 0);
  1001. this.checked = checked;
  1002. this.indeterminate = checkedNum !== totalNum && checkedNum > 0;
  1003. };
  1004. Node.prototype.syncCheckState = function syncCheckState(checkedValue) {
  1005. var value = this.getValueByOption();
  1006. var checked = this.isSameNode(checkedValue, value);
  1007. this.doCheck(checked);
  1008. };
  1009. Node.prototype.doCheck = function doCheck(checked) {
  1010. if (this.checked !== checked) {
  1011. if (this.config.checkStrictly) {
  1012. this.checked = checked;
  1013. } else {
  1014. // bottom up to unify the calculation of the indeterminate state
  1015. this.broadcast('check', checked);
  1016. this.setCheckState(checked);
  1017. this.emit('check');
  1018. }
  1019. }
  1020. };
  1021. _createClass(Node, [{
  1022. key: 'isDisabled',
  1023. get: function get() {
  1024. var data = this.data,
  1025. parent = this.parent,
  1026. config = this.config;
  1027. var disabledKey = config.disabled;
  1028. var checkStrictly = config.checkStrictly;
  1029. return data[disabledKey] || !checkStrictly && parent && parent.isDisabled;
  1030. }
  1031. }, {
  1032. key: 'isLeaf',
  1033. get: function get() {
  1034. var data = this.data,
  1035. loaded = this.loaded,
  1036. hasChildren = this.hasChildren,
  1037. children = this.children;
  1038. var _config2 = this.config,
  1039. lazy = _config2.lazy,
  1040. leafKey = _config2.leaf;
  1041. if (lazy) {
  1042. var isLeaf = Object(shared_["isDef"])(data[leafKey]) ? data[leafKey] : loaded ? !children.length : false;
  1043. this.hasChildren = !isLeaf;
  1044. return isLeaf;
  1045. }
  1046. return !hasChildren;
  1047. }
  1048. }]);
  1049. return Node;
  1050. }();
  1051. /* harmony default export */ var src_node = (node_Node);
  1052. // CONCATENATED MODULE: ./packages/cascader-panel/src/store.js
  1053. function store_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  1054. var flatNodes = function flatNodes(data, leafOnly) {
  1055. return data.reduce(function (res, node) {
  1056. if (node.isLeaf) {
  1057. res.push(node);
  1058. } else {
  1059. !leafOnly && res.push(node);
  1060. res = res.concat(flatNodes(node.children, leafOnly));
  1061. }
  1062. return res;
  1063. }, []);
  1064. };
  1065. var store_Store = function () {
  1066. function Store(data, config) {
  1067. store_classCallCheck(this, Store);
  1068. this.config = config;
  1069. this.initNodes(data);
  1070. }
  1071. Store.prototype.initNodes = function initNodes(data) {
  1072. var _this = this;
  1073. data = Object(util_["coerceTruthyValueToArray"])(data);
  1074. this.nodes = data.map(function (nodeData) {
  1075. return new src_node(nodeData, _this.config);
  1076. });
  1077. this.flattedNodes = this.getFlattedNodes(false, false);
  1078. this.leafNodes = this.getFlattedNodes(true, false);
  1079. };
  1080. Store.prototype.appendNode = function appendNode(nodeData, parentNode) {
  1081. var node = new src_node(nodeData, this.config, parentNode);
  1082. var children = parentNode ? parentNode.children : this.nodes;
  1083. children.push(node);
  1084. };
  1085. Store.prototype.appendNodes = function appendNodes(nodeDataList, parentNode) {
  1086. var _this2 = this;
  1087. nodeDataList = Object(util_["coerceTruthyValueToArray"])(nodeDataList);
  1088. nodeDataList.forEach(function (nodeData) {
  1089. return _this2.appendNode(nodeData, parentNode);
  1090. });
  1091. };
  1092. Store.prototype.getNodes = function getNodes() {
  1093. return this.nodes;
  1094. };
  1095. Store.prototype.getFlattedNodes = function getFlattedNodes(leafOnly) {
  1096. var cached = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  1097. var cachedNodes = leafOnly ? this.leafNodes : this.flattedNodes;
  1098. return cached ? cachedNodes : flatNodes(this.nodes, leafOnly);
  1099. };
  1100. Store.prototype.getNodeByValue = function getNodeByValue(value) {
  1101. if (value) {
  1102. var nodes = this.getFlattedNodes(false, !this.config.lazy).filter(function (node) {
  1103. return Object(util_["valueEquals"])(node.path, value) || node.value === value;
  1104. });
  1105. return nodes && nodes.length ? nodes[0] : null;
  1106. }
  1107. return null;
  1108. };
  1109. return Store;
  1110. }();
  1111. /* harmony default export */ var src_store = (store_Store);
  1112. // EXTERNAL MODULE: external "tis-ui/lib/utils/merge"
  1113. var merge_ = __webpack_require__(33);
  1114. var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
  1115. // EXTERNAL MODULE: external "tis-ui/lib/utils/aria-utils"
  1116. var aria_utils_ = __webpack_require__(103);
  1117. var aria_utils_default = /*#__PURE__*/__webpack_require__.n(aria_utils_);
  1118. // EXTERNAL MODULE: external "tis-ui/lib/utils/scroll-into-view"
  1119. var scroll_into_view_ = __webpack_require__(95);
  1120. var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_view_);
  1121. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-panel.vue?vue&type=script&lang=js&
  1122. var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  1123. //
  1124. //
  1125. //
  1126. //
  1127. //
  1128. //
  1129. //
  1130. //
  1131. //
  1132. //
  1133. //
  1134. //
  1135. //
  1136. //
  1137. //
  1138. //
  1139. var KeyCode = aria_utils_default.a.keys;
  1140. var DefaultProps = {
  1141. expandTrigger: 'click', // or hover
  1142. multiple: false,
  1143. checkStrictly: false, // whether all nodes can be selected
  1144. emitPath: true, // wether to emit an array of all levels value in which node is located
  1145. lazy: false,
  1146. lazyLoad: util_["noop"],
  1147. value: 'value',
  1148. label: 'label',
  1149. children: 'children',
  1150. leaf: 'leaf',
  1151. disabled: 'disabled',
  1152. hoverThreshold: 500
  1153. };
  1154. var cascader_panelvue_type_script_lang_js_isLeaf = function isLeaf(el) {
  1155. return !el.getAttribute('aria-owns');
  1156. };
  1157. var getSibling = function getSibling(el, distance) {
  1158. var parentNode = el.parentNode;
  1159. if (parentNode) {
  1160. var siblings = parentNode.querySelectorAll('.el-cascader-node[tabindex="-1"]');
  1161. var index = Array.prototype.indexOf.call(siblings, el);
  1162. return siblings[index + distance] || null;
  1163. }
  1164. return null;
  1165. };
  1166. var getMenuIndex = function getMenuIndex(el, distance) {
  1167. if (!el) return;
  1168. var pieces = el.id.split('-');
  1169. return Number(pieces[pieces.length - 2]);
  1170. };
  1171. var focusNode = function focusNode(el) {
  1172. if (!el) return;
  1173. el.focus();
  1174. !cascader_panelvue_type_script_lang_js_isLeaf(el) && el.click();
  1175. };
  1176. var checkNode = function checkNode(el) {
  1177. if (!el) return;
  1178. var input = el.querySelector('input');
  1179. if (input) {
  1180. input.click();
  1181. } else if (cascader_panelvue_type_script_lang_js_isLeaf(el)) {
  1182. el.click();
  1183. }
  1184. };
  1185. /* harmony default export */ var cascader_panelvue_type_script_lang_js_ = ({
  1186. name: 'TisCascaderPanel',
  1187. components: {
  1188. CascaderMenu: cascader_menu
  1189. },
  1190. props: {
  1191. value: {},
  1192. options: Array,
  1193. props: Object,
  1194. border: {
  1195. type: Boolean,
  1196. default: true
  1197. },
  1198. renderLabel: Function
  1199. },
  1200. provide: function provide() {
  1201. return {
  1202. panel: this
  1203. };
  1204. },
  1205. data: function data() {
  1206. return {
  1207. checkedValue: null,
  1208. checkedNodePaths: [],
  1209. store: [],
  1210. menus: [],
  1211. activePath: [],
  1212. loadCount: 0
  1213. };
  1214. },
  1215. computed: {
  1216. config: function config() {
  1217. return merge_default()(_extends({}, DefaultProps), this.props || {});
  1218. },
  1219. multiple: function multiple() {
  1220. return this.config.multiple;
  1221. },
  1222. checkStrictly: function checkStrictly() {
  1223. return this.config.checkStrictly;
  1224. },
  1225. leafOnly: function leafOnly() {
  1226. return !this.checkStrictly;
  1227. },
  1228. isHoverMenu: function isHoverMenu() {
  1229. return this.config.expandTrigger === 'hover';
  1230. },
  1231. renderLabelFn: function renderLabelFn() {
  1232. return this.renderLabel || this.$scopedSlots.default;
  1233. }
  1234. },
  1235. watch: {
  1236. options: {
  1237. handler: function handler() {
  1238. this.initStore();
  1239. },
  1240. immediate: true,
  1241. deep: true
  1242. },
  1243. value: function value() {
  1244. this.syncCheckedValue();
  1245. this.checkStrictly && this.calculateCheckedNodePaths();
  1246. },
  1247. checkedValue: function checkedValue(val) {
  1248. if (!Object(util_["isEqual"])(val, this.value)) {
  1249. this.checkStrictly && this.calculateCheckedNodePaths();
  1250. this.$emit('input', val);
  1251. this.$emit('change', val);
  1252. }
  1253. }
  1254. },
  1255. mounted: function mounted() {
  1256. if (!Object(util_["isEmpty"])(this.value)) {
  1257. this.syncCheckedValue();
  1258. }
  1259. },
  1260. methods: {
  1261. initStore: function initStore() {
  1262. var config = this.config,
  1263. options = this.options;
  1264. if (config.lazy && Object(util_["isEmpty"])(options)) {
  1265. this.lazyLoad();
  1266. } else {
  1267. this.store = new src_store(options, config);
  1268. this.menus = [this.store.getNodes()];
  1269. this.syncMenuState();
  1270. }
  1271. },
  1272. syncCheckedValue: function syncCheckedValue() {
  1273. var value = this.value,
  1274. checkedValue = this.checkedValue;
  1275. if (!Object(util_["isEqual"])(value, checkedValue)) {
  1276. this.checkedValue = value;
  1277. this.syncMenuState();
  1278. }
  1279. },
  1280. syncMenuState: function syncMenuState() {
  1281. var multiple = this.multiple,
  1282. checkStrictly = this.checkStrictly;
  1283. this.syncActivePath();
  1284. multiple && this.syncMultiCheckState();
  1285. checkStrictly && this.calculateCheckedNodePaths();
  1286. this.$nextTick(this.scrollIntoView);
  1287. },
  1288. syncMultiCheckState: function syncMultiCheckState() {
  1289. var _this = this;
  1290. var nodes = this.getFlattedNodes(this.leafOnly);
  1291. nodes.forEach(function (node) {
  1292. node.syncCheckState(_this.checkedValue);
  1293. });
  1294. },
  1295. syncActivePath: function syncActivePath() {
  1296. var _this2 = this;
  1297. var store = this.store,
  1298. multiple = this.multiple,
  1299. activePath = this.activePath,
  1300. checkedValue = this.checkedValue;
  1301. if (!Object(util_["isEmpty"])(activePath)) {
  1302. var nodes = activePath.map(function (node) {
  1303. return _this2.getNodeByValue(node.getValue());
  1304. });
  1305. this.expandNodes(nodes);
  1306. } else if (!Object(util_["isEmpty"])(checkedValue)) {
  1307. var value = multiple ? checkedValue[0] : checkedValue;
  1308. var checkedNode = this.getNodeByValue(value) || {};
  1309. var _nodes = (checkedNode.pathNodes || []).slice(0, -1);
  1310. this.expandNodes(_nodes);
  1311. } else {
  1312. this.activePath = [];
  1313. this.menus = [store.getNodes()];
  1314. }
  1315. },
  1316. expandNodes: function expandNodes(nodes) {
  1317. var _this3 = this;
  1318. nodes.forEach(function (node) {
  1319. return _this3.handleExpand(node, true /* silent */);
  1320. });
  1321. },
  1322. calculateCheckedNodePaths: function calculateCheckedNodePaths() {
  1323. var _this4 = this;
  1324. var checkedValue = this.checkedValue,
  1325. multiple = this.multiple;
  1326. var checkedValues = multiple ? Object(util_["coerceTruthyValueToArray"])(checkedValue) : [checkedValue];
  1327. this.checkedNodePaths = checkedValues.map(function (v) {
  1328. var checkedNode = _this4.getNodeByValue(v);
  1329. return checkedNode ? checkedNode.pathNodes : [];
  1330. });
  1331. },
  1332. handleKeyDown: function handleKeyDown(e) {
  1333. var target = e.target,
  1334. keyCode = e.keyCode;
  1335. switch (keyCode) {
  1336. case KeyCode.up:
  1337. var prev = getSibling(target, -1);
  1338. focusNode(prev);
  1339. break;
  1340. case KeyCode.down:
  1341. var next = getSibling(target, 1);
  1342. focusNode(next);
  1343. break;
  1344. case KeyCode.left:
  1345. var preMenu = this.$refs.menu[getMenuIndex(target) - 1];
  1346. if (preMenu) {
  1347. var expandedNode = preMenu.$el.querySelector('.el-cascader-node[aria-expanded="true"]');
  1348. focusNode(expandedNode);
  1349. }
  1350. break;
  1351. case KeyCode.right:
  1352. var nextMenu = this.$refs.menu[getMenuIndex(target) + 1];
  1353. if (nextMenu) {
  1354. var firstNode = nextMenu.$el.querySelector('.el-cascader-node[tabindex="-1"]');
  1355. focusNode(firstNode);
  1356. }
  1357. break;
  1358. case KeyCode.enter:
  1359. checkNode(target);
  1360. break;
  1361. case KeyCode.esc:
  1362. case KeyCode.tab:
  1363. this.$emit('close');
  1364. break;
  1365. default:
  1366. return;
  1367. }
  1368. },
  1369. handleExpand: function handleExpand(node, silent) {
  1370. var activePath = this.activePath;
  1371. var level = node.level;
  1372. var path = activePath.slice(0, level - 1);
  1373. var menus = this.menus.slice(0, level);
  1374. if (!node.isLeaf) {
  1375. path.push(node);
  1376. menus.push(node.children);
  1377. }
  1378. this.activePath = path;
  1379. this.menus = menus;
  1380. if (!silent) {
  1381. var pathValues = path.map(function (node) {
  1382. return node.getValue();
  1383. });
  1384. var activePathValues = activePath.map(function (node) {
  1385. return node.getValue();
  1386. });
  1387. if (!Object(util_["valueEquals"])(pathValues, activePathValues)) {
  1388. this.$emit('active-item-change', pathValues); // Deprecated
  1389. this.$emit('expand-change', pathValues);
  1390. }
  1391. }
  1392. },
  1393. handleCheckChange: function handleCheckChange(value) {
  1394. this.checkedValue = value;
  1395. },
  1396. lazyLoad: function lazyLoad(node, onFullfiled) {
  1397. var _this5 = this;
  1398. var config = this.config;
  1399. if (!node) {
  1400. node = node || { root: true, level: 0 };
  1401. this.store = new src_store([], config);
  1402. this.menus = [this.store.getNodes()];
  1403. }
  1404. node.loading = true;
  1405. var resolve = function resolve(dataList) {
  1406. var parent = node.root ? null : node;
  1407. dataList && dataList.length && _this5.store.appendNodes(dataList, parent);
  1408. node.loading = false;
  1409. node.loaded = true;
  1410. // dispose default value on lazy load mode
  1411. if (Array.isArray(_this5.checkedValue)) {
  1412. var nodeValue = _this5.checkedValue[_this5.loadCount++];
  1413. var valueKey = _this5.config.value;
  1414. var leafKey = _this5.config.leaf;
  1415. if (Array.isArray(dataList) && dataList.filter(function (item) {
  1416. return item[valueKey] === nodeValue;
  1417. }).length > 0) {
  1418. var checkedNode = _this5.store.getNodeByValue(nodeValue);
  1419. if (!checkedNode.data[leafKey]) {
  1420. _this5.lazyLoad(checkedNode, function () {
  1421. _this5.handleExpand(checkedNode);
  1422. });
  1423. }
  1424. if (_this5.loadCount === _this5.checkedValue.length) {
  1425. _this5.$parent.computePresentText();
  1426. }
  1427. }
  1428. }
  1429. onFullfiled && onFullfiled(dataList);
  1430. };
  1431. config.lazyLoad(node, resolve);
  1432. },
  1433. /**
  1434. * public methods
  1435. */
  1436. calculateMultiCheckedValue: function calculateMultiCheckedValue() {
  1437. this.checkedValue = this.getCheckedNodes(this.leafOnly).map(function (node) {
  1438. return node.getValueByOption();
  1439. });
  1440. },
  1441. scrollIntoView: function scrollIntoView() {
  1442. if (this.$isServer) return;
  1443. var menus = this.$refs.menu || [];
  1444. menus.forEach(function (menu) {
  1445. var menuElement = menu.$el;
  1446. if (menuElement) {
  1447. var container = menuElement.querySelector('.el-scrollbar__wrap');
  1448. var activeNode = menuElement.querySelector('.el-cascader-node.is-active') || menuElement.querySelector('.el-cascader-node.in-active-path');
  1449. scroll_into_view_default()(container, activeNode);
  1450. }
  1451. });
  1452. },
  1453. getNodeByValue: function getNodeByValue(val) {
  1454. return this.store.getNodeByValue(val);
  1455. },
  1456. getFlattedNodes: function getFlattedNodes(leafOnly) {
  1457. var cached = !this.config.lazy;
  1458. return this.store.getFlattedNodes(leafOnly, cached);
  1459. },
  1460. getCheckedNodes: function getCheckedNodes(leafOnly) {
  1461. var checkedValue = this.checkedValue,
  1462. multiple = this.multiple;
  1463. if (multiple) {
  1464. var nodes = this.getFlattedNodes(leafOnly);
  1465. return nodes.filter(function (node) {
  1466. return node.checked;
  1467. });
  1468. } else {
  1469. return Object(util_["isEmpty"])(checkedValue) ? [] : [this.getNodeByValue(checkedValue)];
  1470. }
  1471. },
  1472. clearCheckedNodes: function clearCheckedNodes() {
  1473. var config = this.config,
  1474. leafOnly = this.leafOnly;
  1475. var multiple = config.multiple,
  1476. emitPath = config.emitPath;
  1477. if (multiple) {
  1478. this.getCheckedNodes(leafOnly).filter(function (node) {
  1479. return !node.isDisabled;
  1480. }).forEach(function (node) {
  1481. return node.doCheck(false);
  1482. });
  1483. this.calculateMultiCheckedValue();
  1484. } else {
  1485. this.checkedValue = emitPath ? [] : null;
  1486. }
  1487. }
  1488. }
  1489. });
  1490. // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-panel.vue?vue&type=script&lang=js&
  1491. /* harmony default export */ var src_cascader_panelvue_type_script_lang_js_ = (cascader_panelvue_type_script_lang_js_);
  1492. // CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-panel.vue
  1493. /* normalize component */
  1494. var cascader_panel_component = Object(componentNormalizer["a" /* default */])(
  1495. src_cascader_panelvue_type_script_lang_js_,
  1496. cascader_panelvue_type_template_id_34932346_render,
  1497. staticRenderFns,
  1498. false,
  1499. null,
  1500. null,
  1501. null
  1502. )
  1503. /* hot reload */
  1504. if (false) { var cascader_panel_api; }
  1505. cascader_panel_component.options.__file = "packages/cascader-panel/src/cascader-panel.vue"
  1506. /* harmony default export */ var cascader_panel = (cascader_panel_component.exports);
  1507. // CONCATENATED MODULE: ./packages/cascader-panel/index.js
  1508. /* istanbul ignore next */
  1509. cascader_panel.install = function (Vue) {
  1510. Vue.component(cascader_panel.name, cascader_panel);
  1511. };
  1512. /* harmony default export */ var packages_cascader_panel = __webpack_exports__["default"] = (cascader_panel);
  1513. /***/ }),
  1514. /***/ 2:
  1515. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1516. "use strict";
  1517. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
  1518. /* globals __VUE_SSR_CONTEXT__ */
  1519. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  1520. // This module is a runtime utility for cleaner component module output and will
  1521. // be included in the final webpack user bundle.
  1522. function normalizeComponent (
  1523. scriptExports,
  1524. render,
  1525. staticRenderFns,
  1526. functionalTemplate,
  1527. injectStyles,
  1528. scopeId,
  1529. moduleIdentifier, /* server only */
  1530. shadowMode /* vue-cli only */
  1531. ) {
  1532. // Vue.extend constructor export interop
  1533. var options = typeof scriptExports === 'function'
  1534. ? scriptExports.options
  1535. : scriptExports
  1536. // render functions
  1537. if (render) {
  1538. options.render = render
  1539. options.staticRenderFns = staticRenderFns
  1540. options._compiled = true
  1541. }
  1542. // functional template
  1543. if (functionalTemplate) {
  1544. options.functional = true
  1545. }
  1546. // scopedId
  1547. if (scopeId) {
  1548. options._scopeId = 'data-v-' + scopeId
  1549. }
  1550. var hook
  1551. if (moduleIdentifier) { // server build
  1552. hook = function (context) {
  1553. // 2.3 injection
  1554. context =
  1555. context || // cached call
  1556. (this.$vnode && this.$vnode.ssrContext) || // stateful
  1557. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  1558. // 2.2 with runInNewContext: true
  1559. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  1560. context = __VUE_SSR_CONTEXT__
  1561. }
  1562. // inject component styles
  1563. if (injectStyles) {
  1564. injectStyles.call(this, context)
  1565. }
  1566. // register component module identifier for async chunk inferrence
  1567. if (context && context._registeredComponents) {
  1568. context._registeredComponents.add(moduleIdentifier)
  1569. }
  1570. }
  1571. // used by ssr in case component is cached and beforeCreate
  1572. // never gets called
  1573. options._ssrRegister = hook
  1574. } else if (injectStyles) {
  1575. hook = shadowMode
  1576. ? function () {
  1577. injectStyles.call(
  1578. this,
  1579. (options.functional ? this.parent : this).$root.$options.shadowRoot
  1580. )
  1581. }
  1582. : injectStyles
  1583. }
  1584. if (hook) {
  1585. if (options.functional) {
  1586. // for template-only hot-reload because in that case the render fn doesn't
  1587. // go through the normalizer
  1588. options._injectStyles = hook
  1589. // register for functional component in vue file
  1590. var originalRender = options.render
  1591. options.render = function renderWithStyleInjection (h, context) {
  1592. hook.call(context)
  1593. return originalRender(h, context)
  1594. }
  1595. } else {
  1596. // inject component registration as beforeCreate hook
  1597. var existing = options.beforeCreate
  1598. options.beforeCreate = existing
  1599. ? [].concat(existing, hook)
  1600. : [hook]
  1601. }
  1602. }
  1603. return {
  1604. exports: scriptExports,
  1605. options: options
  1606. }
  1607. }
  1608. /***/ }),
  1609. /***/ 33:
  1610. /***/ (function(module, exports) {
  1611. module.exports = require("tis-ui/lib/utils/merge");
  1612. /***/ }),
  1613. /***/ 34:
  1614. /***/ (function(module, exports) {
  1615. module.exports = require("tis-ui/lib/utils/vue-popper");
  1616. /***/ }),
  1617. /***/ 36:
  1618. /***/ (function(module, exports) {
  1619. module.exports = require("tis-ui/lib/mixins/migrating");
  1620. /***/ }),
  1621. /***/ 38:
  1622. /***/ (function(module, exports) {
  1623. module.exports = require("tis-ui/lib/mixins/locale");
  1624. /***/ }),
  1625. /***/ 44:
  1626. /***/ (function(module, exports) {
  1627. module.exports = require("tis-ui/lib/utils/resize-event");
  1628. /***/ }),
  1629. /***/ 49:
  1630. /***/ (function(module, exports) {
  1631. module.exports = require("tis-ui/lib/utils/shared");
  1632. /***/ }),
  1633. /***/ 52:
  1634. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1635. "use strict";
  1636. // ESM COMPAT FLAG
  1637. __webpack_require__.r(__webpack_exports__);
  1638. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=template&id=343dd774&
  1639. var render = function() {
  1640. var _vm = this
  1641. var _h = _vm.$createElement
  1642. var _c = _vm._self._c || _h
  1643. return _c(
  1644. "div",
  1645. {
  1646. class: [
  1647. _vm.type === "textarea" ? "el-textarea" : "el-input",
  1648. _vm.inputSize ? "el-input--" + _vm.inputSize : "",
  1649. {
  1650. "is-disabled": _vm.inputDisabled,
  1651. "is-exceed": _vm.inputExceed,
  1652. "el-input-group": _vm.$slots.prepend || _vm.$slots.append,
  1653. "el-input-group--append": _vm.$slots.append,
  1654. "el-input-group--prepend": _vm.$slots.prepend,
  1655. "el-input--prefix": _vm.$slots.prefix || _vm.prefixIcon,
  1656. "el-input--suffix":
  1657. _vm.$slots.suffix ||
  1658. _vm.suffixIcon ||
  1659. _vm.clearable ||
  1660. _vm.showPassword
  1661. }
  1662. ],
  1663. on: {
  1664. mouseenter: function($event) {
  1665. _vm.hovering = true
  1666. },
  1667. mouseleave: function($event) {
  1668. _vm.hovering = false
  1669. }
  1670. }
  1671. },
  1672. [
  1673. _vm.type !== "textarea"
  1674. ? [
  1675. _vm.$slots.prepend
  1676. ? _c(
  1677. "div",
  1678. { staticClass: "el-input-group__prepend" },
  1679. [_vm._t("prepend")],
  1680. 2
  1681. )
  1682. : _vm._e(),
  1683. _vm.type !== "textarea"
  1684. ? _c(
  1685. "input",
  1686. _vm._b(
  1687. {
  1688. ref: "input",
  1689. staticClass: "el-input__inner",
  1690. attrs: {
  1691. tabindex: _vm.tabindex,
  1692. type: _vm.showPassword
  1693. ? _vm.passwordVisible
  1694. ? "text"
  1695. : "password"
  1696. : _vm.type,
  1697. disabled: _vm.inputDisabled,
  1698. readonly: _vm.readonly,
  1699. autocomplete: _vm.autoComplete || _vm.autocomplete,
  1700. "aria-label": _vm.label
  1701. },
  1702. on: {
  1703. compositionstart: _vm.handleCompositionStart,
  1704. compositionupdate: _vm.handleCompositionUpdate,
  1705. compositionend: _vm.handleCompositionEnd,
  1706. input: _vm.handleInput,
  1707. focus: _vm.handleFocus,
  1708. blur: _vm.handleBlur,
  1709. change: _vm.handleChange
  1710. }
  1711. },
  1712. "input",
  1713. _vm.$attrs,
  1714. false
  1715. )
  1716. )
  1717. : _vm._e(),
  1718. _vm.$slots.prefix || _vm.prefixIcon
  1719. ? _c(
  1720. "span",
  1721. { staticClass: "el-input__prefix" },
  1722. [
  1723. _vm._t("prefix"),
  1724. _vm.prefixIcon
  1725. ? _c("i", {
  1726. staticClass: "el-input__icon",
  1727. class: _vm.prefixIcon
  1728. })
  1729. : _vm._e()
  1730. ],
  1731. 2
  1732. )
  1733. : _vm._e(),
  1734. _vm.getSuffixVisible()
  1735. ? _c("span", { staticClass: "el-input__suffix" }, [
  1736. _c(
  1737. "span",
  1738. { staticClass: "el-input__suffix-inner" },
  1739. [
  1740. !_vm.showClear ||
  1741. !_vm.showPwdVisible ||
  1742. !_vm.isWordLimitVisible
  1743. ? [
  1744. _vm._t("suffix"),
  1745. _vm.suffixIcon
  1746. ? _c("i", {
  1747. staticClass: "el-input__icon",
  1748. class: _vm.suffixIcon
  1749. })
  1750. : _vm._e()
  1751. ]
  1752. : _vm._e(),
  1753. _vm.showClear
  1754. ? _c("i", {
  1755. staticClass:
  1756. "el-input__icon el-icon-circle-close el-input__clear",
  1757. on: {
  1758. mousedown: function($event) {
  1759. $event.preventDefault()
  1760. },
  1761. click: _vm.clear
  1762. }
  1763. })
  1764. : _vm._e(),
  1765. _vm.showPwdVisible
  1766. ? _c("i", {
  1767. staticClass:
  1768. "el-input__icon el-icon-view el-input__clear",
  1769. on: { click: _vm.handlePasswordVisible }
  1770. })
  1771. : _vm._e(),
  1772. _vm.isWordLimitVisible
  1773. ? _c("span", { staticClass: "el-input__count" }, [
  1774. _c(
  1775. "span",
  1776. { staticClass: "el-input__count-inner" },
  1777. [
  1778. _vm._v(
  1779. "\n " +
  1780. _vm._s(_vm.textLength) +
  1781. "/" +
  1782. _vm._s(_vm.upperLimit) +
  1783. "\n "
  1784. )
  1785. ]
  1786. )
  1787. ])
  1788. : _vm._e()
  1789. ],
  1790. 2
  1791. ),
  1792. _vm.validateState
  1793. ? _c("i", {
  1794. staticClass: "el-input__icon",
  1795. class: ["el-input__validateIcon", _vm.validateIcon]
  1796. })
  1797. : _vm._e()
  1798. ])
  1799. : _vm._e(),
  1800. _vm.$slots.append
  1801. ? _c(
  1802. "div",
  1803. { staticClass: "el-input-group__append" },
  1804. [_vm._t("append")],
  1805. 2
  1806. )
  1807. : _vm._e()
  1808. ]
  1809. : _c(
  1810. "textarea",
  1811. _vm._b(
  1812. {
  1813. ref: "textarea",
  1814. staticClass: "el-textarea__inner",
  1815. style: _vm.textareaStyle,
  1816. attrs: {
  1817. tabindex: _vm.tabindex,
  1818. disabled: _vm.inputDisabled,
  1819. readonly: _vm.readonly,
  1820. autocomplete: _vm.autoComplete || _vm.autocomplete,
  1821. "aria-label": _vm.label
  1822. },
  1823. on: {
  1824. compositionstart: _vm.handleCompositionStart,
  1825. compositionupdate: _vm.handleCompositionUpdate,
  1826. compositionend: _vm.handleCompositionEnd,
  1827. input: _vm.handleInput,
  1828. focus: _vm.handleFocus,
  1829. blur: _vm.handleBlur,
  1830. change: _vm.handleChange
  1831. }
  1832. },
  1833. "textarea",
  1834. _vm.$attrs,
  1835. false
  1836. )
  1837. ),
  1838. _vm.isWordLimitVisible && _vm.type === "textarea"
  1839. ? _c("span", { staticClass: "el-input__count" }, [
  1840. _vm._v(_vm._s(_vm.textLength) + "/" + _vm._s(_vm.upperLimit))
  1841. ])
  1842. : _vm._e()
  1843. ],
  1844. 2
  1845. )
  1846. }
  1847. var staticRenderFns = []
  1848. render._withStripped = true
  1849. // CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=template&id=343dd774&
  1850. // EXTERNAL MODULE: external "tis-ui/lib/mixins/emitter"
  1851. var emitter_ = __webpack_require__(13);
  1852. var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
  1853. // EXTERNAL MODULE: external "tis-ui/lib/mixins/migrating"
  1854. var migrating_ = __webpack_require__(36);
  1855. var migrating_default = /*#__PURE__*/__webpack_require__.n(migrating_);
  1856. // CONCATENATED MODULE: ./packages/input/src/calcTextareaHeight.js
  1857. var hiddenTextarea = void 0;
  1858. var HIDDEN_STYLE = '\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n';
  1859. var CONTEXT_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing'];
  1860. function calculateNodeStyling(targetElement) {
  1861. var style = window.getComputedStyle(targetElement);
  1862. var boxSizing = style.getPropertyValue('box-sizing');
  1863. var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top'));
  1864. var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width'));
  1865. var contextStyle = CONTEXT_STYLE.map(function (name) {
  1866. return name + ':' + style.getPropertyValue(name);
  1867. }).join(';');
  1868. return { contextStyle: contextStyle, paddingSize: paddingSize, borderSize: borderSize, boxSizing: boxSizing };
  1869. }
  1870. function calcTextareaHeight(targetElement) {
  1871. var minRows = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
  1872. var maxRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  1873. if (!hiddenTextarea) {
  1874. hiddenTextarea = document.createElement('textarea');
  1875. document.body.appendChild(hiddenTextarea);
  1876. }
  1877. var _calculateNodeStyling = calculateNodeStyling(targetElement),
  1878. paddingSize = _calculateNodeStyling.paddingSize,
  1879. borderSize = _calculateNodeStyling.borderSize,
  1880. boxSizing = _calculateNodeStyling.boxSizing,
  1881. contextStyle = _calculateNodeStyling.contextStyle;
  1882. hiddenTextarea.setAttribute('style', contextStyle + ';' + HIDDEN_STYLE);
  1883. hiddenTextarea.value = targetElement.value || targetElement.placeholder || '';
  1884. var height = hiddenTextarea.scrollHeight;
  1885. var result = {};
  1886. if (boxSizing === 'border-box') {
  1887. height = height + borderSize;
  1888. } else if (boxSizing === 'content-box') {
  1889. height = height - paddingSize;
  1890. }
  1891. hiddenTextarea.value = '';
  1892. var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
  1893. if (minRows !== null) {
  1894. var minHeight = singleRowHeight * minRows;
  1895. if (boxSizing === 'border-box') {
  1896. minHeight = minHeight + paddingSize + borderSize;
  1897. }
  1898. height = Math.max(minHeight, height);
  1899. result.minHeight = minHeight + 'px';
  1900. }
  1901. if (maxRows !== null) {
  1902. var maxHeight = singleRowHeight * maxRows;
  1903. if (boxSizing === 'border-box') {
  1904. maxHeight = maxHeight + paddingSize + borderSize;
  1905. }
  1906. height = Math.min(maxHeight, height);
  1907. }
  1908. result.height = height + 'px';
  1909. hiddenTextarea.parentNode && hiddenTextarea.parentNode.removeChild(hiddenTextarea);
  1910. hiddenTextarea = null;
  1911. return result;
  1912. };
  1913. // EXTERNAL MODULE: external "tis-ui/lib/utils/merge"
  1914. var merge_ = __webpack_require__(33);
  1915. var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
  1916. // EXTERNAL MODULE: external "tis-ui/lib/utils/shared"
  1917. var shared_ = __webpack_require__(49);
  1918. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=script&lang=js&
  1919. //
  1920. //
  1921. //
  1922. //
  1923. //
  1924. //
  1925. //
  1926. //
  1927. //
  1928. //
  1929. //
  1930. //
  1931. //
  1932. //
  1933. //
  1934. //
  1935. //
  1936. //
  1937. //
  1938. //
  1939. //
  1940. //
  1941. //
  1942. //
  1943. //
  1944. //
  1945. //
  1946. //
  1947. //
  1948. //
  1949. //
  1950. //
  1951. //
  1952. //
  1953. //
  1954. //
  1955. //
  1956. //
  1957. //
  1958. //
  1959. //
  1960. //
  1961. //
  1962. //
  1963. //
  1964. //
  1965. //
  1966. //
  1967. //
  1968. //
  1969. //
  1970. //
  1971. //
  1972. //
  1973. //
  1974. //
  1975. //
  1976. //
  1977. //
  1978. //
  1979. //
  1980. //
  1981. //
  1982. //
  1983. //
  1984. //
  1985. //
  1986. //
  1987. //
  1988. //
  1989. //
  1990. //
  1991. //
  1992. //
  1993. //
  1994. //
  1995. //
  1996. //
  1997. //
  1998. //
  1999. //
  2000. //
  2001. //
  2002. //
  2003. //
  2004. //
  2005. //
  2006. //
  2007. //
  2008. //
  2009. //
  2010. //
  2011. //
  2012. //
  2013. //
  2014. //
  2015. //
  2016. //
  2017. //
  2018. //
  2019. //
  2020. //
  2021. //
  2022. //
  2023. //
  2024. //
  2025. //
  2026. //
  2027. //
  2028. /* harmony default export */ var inputvue_type_script_lang_js_ = ({
  2029. name: 'TisInput',
  2030. componentName: 'TisInput',
  2031. mixins: [emitter_default.a, migrating_default.a],
  2032. inheritAttrs: false,
  2033. inject: {
  2034. elForm: {
  2035. default: ''
  2036. },
  2037. elFormItem: {
  2038. default: ''
  2039. }
  2040. },
  2041. data: function data() {
  2042. return {
  2043. textareaCalcStyle: {},
  2044. hovering: false,
  2045. focused: false,
  2046. isComposing: false,
  2047. passwordVisible: false
  2048. };
  2049. },
  2050. props: {
  2051. value: [String, Number],
  2052. size: String,
  2053. resize: String,
  2054. form: String,
  2055. disabled: Boolean,
  2056. readonly: Boolean,
  2057. type: {
  2058. type: String,
  2059. default: 'text'
  2060. },
  2061. autosize: {
  2062. type: [Boolean, Object],
  2063. default: false
  2064. },
  2065. autocomplete: {
  2066. type: String,
  2067. default: 'off'
  2068. },
  2069. /** @Deprecated in next major version */
  2070. autoComplete: {
  2071. type: String,
  2072. validator: function validator(val) {
  2073. false && false;
  2074. return true;
  2075. }
  2076. },
  2077. validateEvent: {
  2078. type: Boolean,
  2079. default: true
  2080. },
  2081. suffixIcon: String,
  2082. prefixIcon: String,
  2083. label: String,
  2084. clearable: {
  2085. type: Boolean,
  2086. default: false
  2087. },
  2088. showPassword: {
  2089. type: Boolean,
  2090. default: false
  2091. },
  2092. showWordLimit: {
  2093. type: Boolean,
  2094. default: false
  2095. },
  2096. tabindex: String
  2097. },
  2098. computed: {
  2099. _elFormItemSize: function _elFormItemSize() {
  2100. return (this.elFormItem || {}).elFormItemSize;
  2101. },
  2102. validateState: function validateState() {
  2103. return this.elFormItem ? this.elFormItem.validateState : '';
  2104. },
  2105. needStatusIcon: function needStatusIcon() {
  2106. return this.elForm ? this.elForm.statusIcon : false;
  2107. },
  2108. validateIcon: function validateIcon() {
  2109. return {
  2110. validating: 'el-icon-loading',
  2111. success: 'el-icon-circle-check',
  2112. error: 'el-icon-circle-close'
  2113. }[this.validateState];
  2114. },
  2115. textareaStyle: function textareaStyle() {
  2116. return merge_default()({}, this.textareaCalcStyle, { resize: this.resize });
  2117. },
  2118. inputSize: function inputSize() {
  2119. return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
  2120. },
  2121. inputDisabled: function inputDisabled() {
  2122. return this.disabled || (this.elForm || {}).disabled;
  2123. },
  2124. nativeInputValue: function nativeInputValue() {
  2125. return this.value === null || this.value === undefined ? '' : String(this.value);
  2126. },
  2127. showClear: function showClear() {
  2128. return this.clearable && !this.inputDisabled && !this.readonly && this.nativeInputValue && (this.focused || this.hovering);
  2129. },
  2130. showPwdVisible: function showPwdVisible() {
  2131. return this.showPassword && !this.inputDisabled && !this.readonly && (!!this.nativeInputValue || this.focused);
  2132. },
  2133. isWordLimitVisible: function isWordLimitVisible() {
  2134. return this.showWordLimit && this.$attrs.maxlength && (this.type === 'text' || this.type === 'textarea') && !this.inputDisabled && !this.readonly && !this.showPassword;
  2135. },
  2136. upperLimit: function upperLimit() {
  2137. return this.$attrs.maxlength;
  2138. },
  2139. textLength: function textLength() {
  2140. if (typeof this.value === 'number') {
  2141. return String(this.value).length;
  2142. }
  2143. return (this.value || '').length;
  2144. },
  2145. inputExceed: function inputExceed() {
  2146. // show exceed style if length of initial value greater then maxlength
  2147. return this.isWordLimitVisible && this.textLength > this.upperLimit;
  2148. }
  2149. },
  2150. watch: {
  2151. value: function value(val) {
  2152. this.$nextTick(this.resizeTextarea);
  2153. if (this.validateEvent) {
  2154. this.dispatch('ElFormItem', 'el.form.change', [val]);
  2155. }
  2156. },
  2157. // native input value is set explicitly
  2158. // do not use v-model / :value in template
  2159. // see: https://github.com/ElemeFE/element/issues/14521
  2160. nativeInputValue: function nativeInputValue() {
  2161. this.setNativeInputValue();
  2162. },
  2163. // when change between <input> and <textarea>,
  2164. // update DOM dependent value and styles
  2165. // https://github.com/ElemeFE/element/issues/14857
  2166. type: function type() {
  2167. var _this = this;
  2168. this.$nextTick(function () {
  2169. _this.setNativeInputValue();
  2170. _this.resizeTextarea();
  2171. _this.updateIconOffset();
  2172. });
  2173. }
  2174. },
  2175. methods: {
  2176. focus: function focus() {
  2177. this.getInput().focus();
  2178. },
  2179. blur: function blur() {
  2180. this.getInput().blur();
  2181. },
  2182. getMigratingConfig: function getMigratingConfig() {
  2183. return {
  2184. props: {
  2185. 'icon': 'icon is removed, use suffix-icon / prefix-icon instead.',
  2186. 'on-icon-click': 'on-icon-click is removed.'
  2187. },
  2188. events: {
  2189. 'click': 'click is removed.'
  2190. }
  2191. };
  2192. },
  2193. handleBlur: function handleBlur(event) {
  2194. this.focused = false;
  2195. this.$emit('blur', event);
  2196. if (this.validateEvent) {
  2197. this.dispatch('ElFormItem', 'el.form.blur', [this.value]);
  2198. }
  2199. },
  2200. select: function select() {
  2201. this.getInput().select();
  2202. },
  2203. resizeTextarea: function resizeTextarea() {
  2204. if (this.$isServer) return;
  2205. var autosize = this.autosize,
  2206. type = this.type;
  2207. if (type !== 'textarea') return;
  2208. if (!autosize) {
  2209. this.textareaCalcStyle = {
  2210. minHeight: calcTextareaHeight(this.$refs.textarea).minHeight
  2211. };
  2212. return;
  2213. }
  2214. var minRows = autosize.minRows;
  2215. var maxRows = autosize.maxRows;
  2216. this.textareaCalcStyle = calcTextareaHeight(this.$refs.textarea, minRows, maxRows);
  2217. },
  2218. setNativeInputValue: function setNativeInputValue() {
  2219. var input = this.getInput();
  2220. if (!input) return;
  2221. if (input.value === this.nativeInputValue) return;
  2222. input.value = this.nativeInputValue;
  2223. },
  2224. handleFocus: function handleFocus(event) {
  2225. this.focused = true;
  2226. this.$emit('focus', event);
  2227. },
  2228. handleCompositionStart: function handleCompositionStart() {
  2229. this.isComposing = true;
  2230. },
  2231. handleCompositionUpdate: function handleCompositionUpdate(event) {
  2232. var text = event.target.value;
  2233. var lastCharacter = text[text.length - 1] || '';
  2234. this.isComposing = !Object(shared_["isKorean"])(lastCharacter);
  2235. },
  2236. handleCompositionEnd: function handleCompositionEnd(event) {
  2237. if (this.isComposing) {
  2238. this.isComposing = false;
  2239. this.handleInput(event);
  2240. }
  2241. },
  2242. handleInput: function handleInput(event) {
  2243. // should not emit input during composition
  2244. // see: https://github.com/ElemeFE/element/issues/10516
  2245. if (this.isComposing) return;
  2246. // hack for https://github.com/ElemeFE/element/issues/8548
  2247. // should remove the following line when we don't support IE
  2248. if (event.target.value === this.nativeInputValue) return;
  2249. this.$emit('input', event.target.value);
  2250. // ensure native input value is controlled
  2251. // see: https://github.com/ElemeFE/element/issues/12850
  2252. this.$nextTick(this.setNativeInputValue);
  2253. },
  2254. handleChange: function handleChange(event) {
  2255. this.$emit('change', event.target.value);
  2256. },
  2257. calcIconOffset: function calcIconOffset(place) {
  2258. var elList = [].slice.call(this.$el.querySelectorAll('.el-input__' + place) || []);
  2259. if (!elList.length) return;
  2260. var el = null;
  2261. for (var i = 0; i < elList.length; i++) {
  2262. if (elList[i].parentNode === this.$el) {
  2263. el = elList[i];
  2264. break;
  2265. }
  2266. }
  2267. if (!el) return;
  2268. var pendantMap = {
  2269. suffix: 'append',
  2270. prefix: 'prepend'
  2271. };
  2272. var pendant = pendantMap[place];
  2273. if (this.$slots[pendant]) {
  2274. el.style.transform = 'translateX(' + (place === 'suffix' ? '-' : '') + this.$el.querySelector('.el-input-group__' + pendant).offsetWidth + 'px)';
  2275. } else {
  2276. el.removeAttribute('style');
  2277. }
  2278. },
  2279. updateIconOffset: function updateIconOffset() {
  2280. this.calcIconOffset('prefix');
  2281. this.calcIconOffset('suffix');
  2282. },
  2283. clear: function clear() {
  2284. this.$emit('input', '');
  2285. this.$emit('change', '');
  2286. this.$emit('clear');
  2287. },
  2288. handlePasswordVisible: function handlePasswordVisible() {
  2289. this.passwordVisible = !this.passwordVisible;
  2290. this.focus();
  2291. },
  2292. getInput: function getInput() {
  2293. return this.$refs.input || this.$refs.textarea;
  2294. },
  2295. getSuffixVisible: function getSuffixVisible() {
  2296. return this.$slots.suffix || this.suffixIcon || this.showClear || this.showPassword || this.isWordLimitVisible || this.validateState && this.needStatusIcon;
  2297. }
  2298. },
  2299. created: function created() {
  2300. this.$on('inputSelect', this.select);
  2301. },
  2302. mounted: function mounted() {
  2303. this.setNativeInputValue();
  2304. this.resizeTextarea();
  2305. this.updateIconOffset();
  2306. },
  2307. updated: function updated() {
  2308. this.$nextTick(this.updateIconOffset);
  2309. }
  2310. });
  2311. // CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=script&lang=js&
  2312. /* harmony default export */ var src_inputvue_type_script_lang_js_ = (inputvue_type_script_lang_js_);
  2313. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  2314. var componentNormalizer = __webpack_require__(2);
  2315. // CONCATENATED MODULE: ./packages/input/src/input.vue
  2316. /* normalize component */
  2317. var component = Object(componentNormalizer["a" /* default */])(
  2318. src_inputvue_type_script_lang_js_,
  2319. render,
  2320. staticRenderFns,
  2321. false,
  2322. null,
  2323. null,
  2324. null
  2325. )
  2326. /* hot reload */
  2327. if (false) { var api; }
  2328. component.options.__file = "packages/input/src/input.vue"
  2329. /* harmony default export */ var input = (component.exports);
  2330. // CONCATENATED MODULE: ./packages/input/index.js
  2331. /* istanbul ignore next */
  2332. input.install = function (Vue) {
  2333. Vue.component(input.name, input);
  2334. };
  2335. /* harmony default export */ var packages_input = __webpack_exports__["default"] = (input);
  2336. /***/ }),
  2337. /***/ 557:
  2338. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2339. "use strict";
  2340. // ESM COMPAT FLAG
  2341. __webpack_require__.r(__webpack_exports__);
  2342. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader/src/cascader.vue?vue&type=template&id=032537a6&
  2343. var render = function() {
  2344. var _vm = this
  2345. var _h = _vm.$createElement
  2346. var _c = _vm._self._c || _h
  2347. return _c(
  2348. "div",
  2349. {
  2350. directives: [
  2351. {
  2352. name: "clickoutside",
  2353. rawName: "v-clickoutside",
  2354. value: function() {
  2355. return _vm.toggleDropDownVisible(false)
  2356. },
  2357. expression: "() => toggleDropDownVisible(false)"
  2358. }
  2359. ],
  2360. ref: "reference",
  2361. class: [
  2362. "el-cascader",
  2363. _vm.realSize && "el-cascader--" + _vm.realSize,
  2364. { "is-disabled": _vm.isDisabled }
  2365. ],
  2366. on: {
  2367. mouseenter: function($event) {
  2368. _vm.inputHover = true
  2369. },
  2370. mouseleave: function($event) {
  2371. _vm.inputHover = false
  2372. },
  2373. click: function() {
  2374. return _vm.toggleDropDownVisible(_vm.readonly ? undefined : true)
  2375. },
  2376. keydown: _vm.handleKeyDown
  2377. }
  2378. },
  2379. [
  2380. _c(
  2381. "tis-input",
  2382. {
  2383. ref: "input",
  2384. class: { "is-focus": _vm.dropDownVisible },
  2385. attrs: {
  2386. size: _vm.realSize,
  2387. placeholder: _vm.placeholder,
  2388. readonly: _vm.readonly,
  2389. disabled: _vm.isDisabled,
  2390. "validate-event": false
  2391. },
  2392. on: {
  2393. focus: _vm.handleFocus,
  2394. blur: _vm.handleBlur,
  2395. input: _vm.handleInput
  2396. },
  2397. model: {
  2398. value: _vm.multiple ? _vm.presentText : _vm.inputValue,
  2399. callback: function($$v) {
  2400. _vm.multiple ? _vm.presentText : (_vm.inputValue = $$v)
  2401. },
  2402. expression: "multiple ? presentText : inputValue"
  2403. }
  2404. },
  2405. [
  2406. _c("template", { slot: "suffix" }, [
  2407. _vm.clearBtnVisible
  2408. ? _c("i", {
  2409. key: "clear",
  2410. staticClass: "el-input__icon el-icon-circle-close",
  2411. on: {
  2412. click: function($event) {
  2413. $event.stopPropagation()
  2414. return _vm.handleClear($event)
  2415. }
  2416. }
  2417. })
  2418. : _c("i", {
  2419. key: "arrow-down",
  2420. class: [
  2421. "el-input__icon",
  2422. "el-icon-arrow-down",
  2423. _vm.dropDownVisible && "is-reverse"
  2424. ],
  2425. on: {
  2426. click: function($event) {
  2427. $event.stopPropagation()
  2428. _vm.toggleDropDownVisible()
  2429. }
  2430. }
  2431. })
  2432. ])
  2433. ],
  2434. 2
  2435. ),
  2436. _vm.multiple
  2437. ? _c(
  2438. "div",
  2439. { staticClass: "el-cascader__tags" },
  2440. [
  2441. _vm._l(_vm.presentTags, function(tag, index) {
  2442. return _c(
  2443. "tis-tag",
  2444. {
  2445. key: tag.key,
  2446. attrs: {
  2447. type: "info",
  2448. size: _vm.tagSize,
  2449. hit: tag.hitState,
  2450. closable: tag.closable,
  2451. "disable-transitions": ""
  2452. },
  2453. on: {
  2454. close: function($event) {
  2455. _vm.deleteTag(index)
  2456. }
  2457. }
  2458. },
  2459. [_c("span", [_vm._v(_vm._s(tag.text))])]
  2460. )
  2461. }),
  2462. _vm.filterable && !_vm.isDisabled
  2463. ? _c("input", {
  2464. directives: [
  2465. {
  2466. name: "model",
  2467. rawName: "v-model.trim",
  2468. value: _vm.inputValue,
  2469. expression: "inputValue",
  2470. modifiers: { trim: true }
  2471. }
  2472. ],
  2473. staticClass: "el-cascader__search-input",
  2474. attrs: {
  2475. type: "text",
  2476. placeholder: _vm.presentTags.length ? "" : _vm.placeholder
  2477. },
  2478. domProps: { value: _vm.inputValue },
  2479. on: {
  2480. input: [
  2481. function($event) {
  2482. if ($event.target.composing) {
  2483. return
  2484. }
  2485. _vm.inputValue = $event.target.value.trim()
  2486. },
  2487. function(e) {
  2488. return _vm.handleInput(_vm.inputValue, e)
  2489. }
  2490. ],
  2491. click: function($event) {
  2492. $event.stopPropagation()
  2493. _vm.toggleDropDownVisible(true)
  2494. },
  2495. keydown: function($event) {
  2496. if (
  2497. !("button" in $event) &&
  2498. _vm._k(
  2499. $event.keyCode,
  2500. "delete",
  2501. [8, 46],
  2502. $event.key,
  2503. ["Backspace", "Delete", "Del"]
  2504. )
  2505. ) {
  2506. return null
  2507. }
  2508. return _vm.handleDelete($event)
  2509. },
  2510. blur: function($event) {
  2511. _vm.$forceUpdate()
  2512. }
  2513. }
  2514. })
  2515. : _vm._e()
  2516. ],
  2517. 2
  2518. )
  2519. : _vm._e(),
  2520. _c(
  2521. "transition",
  2522. {
  2523. attrs: { name: "el-zoom-in-top" },
  2524. on: { "after-leave": _vm.handleDropdownLeave }
  2525. },
  2526. [
  2527. _c(
  2528. "div",
  2529. {
  2530. directives: [
  2531. {
  2532. name: "show",
  2533. rawName: "v-show",
  2534. value: _vm.dropDownVisible,
  2535. expression: "dropDownVisible"
  2536. }
  2537. ],
  2538. ref: "popper",
  2539. class: ["el-popper", "el-cascader__dropdown", _vm.popperClass]
  2540. },
  2541. [
  2542. _c("tis-cascader-panel", {
  2543. directives: [
  2544. {
  2545. name: "show",
  2546. rawName: "v-show",
  2547. value: !_vm.filtering,
  2548. expression: "!filtering"
  2549. }
  2550. ],
  2551. ref: "panel",
  2552. attrs: {
  2553. options: _vm.options,
  2554. props: _vm.config,
  2555. border: false,
  2556. "render-label": _vm.$scopedSlots.default
  2557. },
  2558. on: {
  2559. "expand-change": _vm.handleExpandChange,
  2560. close: function($event) {
  2561. _vm.toggleDropDownVisible(false)
  2562. }
  2563. },
  2564. model: {
  2565. value: _vm.checkedValue,
  2566. callback: function($$v) {
  2567. _vm.checkedValue = $$v
  2568. },
  2569. expression: "checkedValue"
  2570. }
  2571. }),
  2572. _vm.filterable
  2573. ? _c(
  2574. "tis-scrollbar",
  2575. {
  2576. directives: [
  2577. {
  2578. name: "show",
  2579. rawName: "v-show",
  2580. value: _vm.filtering,
  2581. expression: "filtering"
  2582. }
  2583. ],
  2584. ref: "suggestionPanel",
  2585. staticClass: "el-cascader__suggestion-panel",
  2586. attrs: {
  2587. tag: "ul",
  2588. "view-class": "el-cascader__suggestion-list"
  2589. },
  2590. nativeOn: {
  2591. keydown: function($event) {
  2592. return _vm.handleSuggestionKeyDown($event)
  2593. }
  2594. }
  2595. },
  2596. [
  2597. _vm.suggestions.length
  2598. ? _vm._l(_vm.suggestions, function(item, index) {
  2599. return _c(
  2600. "li",
  2601. {
  2602. key: item.uid,
  2603. class: [
  2604. "el-cascader__suggestion-item",
  2605. item.checked && "is-checked"
  2606. ],
  2607. attrs: { tabindex: -1 },
  2608. on: {
  2609. click: function($event) {
  2610. _vm.handleSuggestionClick(index)
  2611. }
  2612. }
  2613. },
  2614. [
  2615. _c("span", [_vm._v(_vm._s(item.text))]),
  2616. item.checked
  2617. ? _c("i", { staticClass: "el-icon-check" })
  2618. : _vm._e()
  2619. ]
  2620. )
  2621. })
  2622. : _vm._t("empty", [
  2623. _c(
  2624. "li",
  2625. { staticClass: "el-cascader__empty-text" },
  2626. [_vm._v(_vm._s(_vm.t("el.cascader.noMatch")))]
  2627. )
  2628. ])
  2629. ],
  2630. 2
  2631. )
  2632. : _vm._e()
  2633. ],
  2634. 1
  2635. )
  2636. ]
  2637. )
  2638. ],
  2639. 1
  2640. )
  2641. }
  2642. var staticRenderFns = []
  2643. render._withStripped = true
  2644. // CONCATENATED MODULE: ./packages/cascader/src/cascader.vue?vue&type=template&id=032537a6&
  2645. // EXTERNAL MODULE: external "tis-ui/lib/utils/vue-popper"
  2646. var vue_popper_ = __webpack_require__(34);
  2647. var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_);
  2648. // EXTERNAL MODULE: external "tis-ui/lib/utils/clickoutside"
  2649. var clickoutside_ = __webpack_require__(61);
  2650. var clickoutside_default = /*#__PURE__*/__webpack_require__.n(clickoutside_);
  2651. // EXTERNAL MODULE: external "tis-ui/lib/mixins/emitter"
  2652. var emitter_ = __webpack_require__(13);
  2653. var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
  2654. // EXTERNAL MODULE: external "tis-ui/lib/mixins/locale"
  2655. var locale_ = __webpack_require__(38);
  2656. var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
  2657. // EXTERNAL MODULE: external "tis-ui/lib/mixins/migrating"
  2658. var migrating_ = __webpack_require__(36);
  2659. var migrating_default = /*#__PURE__*/__webpack_require__.n(migrating_);
  2660. // EXTERNAL MODULE: ./packages/input/index.js + 6 modules
  2661. var packages_input = __webpack_require__(52);
  2662. // EXTERNAL MODULE: ./packages/tag/index.js + 3 modules
  2663. var tag = __webpack_require__(101);
  2664. // EXTERNAL MODULE: ./packages/scrollbar/index.js + 3 modules
  2665. var scrollbar = __webpack_require__(66);
  2666. // EXTERNAL MODULE: ./packages/cascader-panel/index.js + 13 modules
  2667. var cascader_panel = __webpack_require__(151);
  2668. // EXTERNAL MODULE: external "tis-ui/lib/utils/aria-utils"
  2669. var aria_utils_ = __webpack_require__(103);
  2670. var aria_utils_default = /*#__PURE__*/__webpack_require__.n(aria_utils_);
  2671. // EXTERNAL MODULE: external "tis-ui/lib/locale"
  2672. var lib_locale_ = __webpack_require__(72);
  2673. // EXTERNAL MODULE: external "tis-ui/lib/utils/util"
  2674. var util_ = __webpack_require__(10);
  2675. // EXTERNAL MODULE: external "tis-ui/lib/utils/types"
  2676. var types_ = __webpack_require__(89);
  2677. // EXTERNAL MODULE: external "tis-ui/lib/utils/shared"
  2678. var shared_ = __webpack_require__(49);
  2679. // EXTERNAL MODULE: external "tis-ui/lib/utils/resize-event"
  2680. var resize_event_ = __webpack_require__(44);
  2681. // EXTERNAL MODULE: external "throttle-debounce/debounce"
  2682. var debounce_ = __webpack_require__(62);
  2683. var debounce_default = /*#__PURE__*/__webpack_require__.n(debounce_);
  2684. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader/src/cascader.vue?vue&type=script&lang=js&
  2685. var _this = undefined;
  2686. //
  2687. //
  2688. //
  2689. //
  2690. //
  2691. //
  2692. //
  2693. //
  2694. //
  2695. //
  2696. //
  2697. //
  2698. //
  2699. //
  2700. //
  2701. //
  2702. //
  2703. //
  2704. //
  2705. //
  2706. //
  2707. //
  2708. //
  2709. //
  2710. //
  2711. //
  2712. //
  2713. //
  2714. //
  2715. //
  2716. //
  2717. //
  2718. //
  2719. //
  2720. //
  2721. //
  2722. //
  2723. //
  2724. //
  2725. //
  2726. //
  2727. //
  2728. //
  2729. //
  2730. //
  2731. //
  2732. //
  2733. //
  2734. //
  2735. //
  2736. //
  2737. //
  2738. //
  2739. //
  2740. //
  2741. //
  2742. //
  2743. //
  2744. //
  2745. //
  2746. //
  2747. //
  2748. //
  2749. //
  2750. //
  2751. //
  2752. //
  2753. //
  2754. //
  2755. //
  2756. //
  2757. //
  2758. //
  2759. //
  2760. //
  2761. //
  2762. //
  2763. //
  2764. //
  2765. //
  2766. //
  2767. //
  2768. //
  2769. //
  2770. //
  2771. //
  2772. //
  2773. //
  2774. //
  2775. //
  2776. //
  2777. //
  2778. //
  2779. //
  2780. //
  2781. //
  2782. //
  2783. //
  2784. //
  2785. //
  2786. //
  2787. //
  2788. //
  2789. //
  2790. //
  2791. //
  2792. //
  2793. //
  2794. //
  2795. //
  2796. //
  2797. //
  2798. var KeyCode = aria_utils_default.a.keys;
  2799. var MigratingProps = {
  2800. expandTrigger: {
  2801. newProp: 'expandTrigger',
  2802. type: String
  2803. },
  2804. changeOnSelect: {
  2805. newProp: 'checkStrictly',
  2806. type: Boolean
  2807. },
  2808. hoverThreshold: {
  2809. newProp: 'hoverThreshold',
  2810. type: Number
  2811. }
  2812. };
  2813. var PopperMixin = {
  2814. props: {
  2815. placement: {
  2816. type: String,
  2817. default: 'bottom-start'
  2818. },
  2819. appendToBody: vue_popper_default.a.props.appendToBody,
  2820. visibleArrow: {
  2821. type: Boolean,
  2822. default: true
  2823. },
  2824. arrowOffset: vue_popper_default.a.props.arrowOffset,
  2825. offset: vue_popper_default.a.props.offset,
  2826. boundariesPadding: vue_popper_default.a.props.boundariesPadding,
  2827. popperOptions: vue_popper_default.a.props.popperOptions
  2828. },
  2829. methods: vue_popper_default.a.methods,
  2830. data: vue_popper_default.a.data,
  2831. beforeDestroy: vue_popper_default.a.beforeDestroy
  2832. };
  2833. var InputSizeMap = {
  2834. medium: 36,
  2835. small: 32,
  2836. mini: 28
  2837. };
  2838. /* harmony default export */ var cascadervue_type_script_lang_js_ = ({
  2839. name: 'TisCascader',
  2840. directives: { Clickoutside: clickoutside_default.a },
  2841. mixins: [PopperMixin, emitter_default.a, locale_default.a, migrating_default.a],
  2842. inject: {
  2843. elForm: {
  2844. default: ''
  2845. },
  2846. elFormItem: {
  2847. default: ''
  2848. }
  2849. },
  2850. components: {
  2851. ElInput: packages_input["default"],
  2852. ElTag: tag["default"],
  2853. ElScrollbar: scrollbar["default"],
  2854. ElCascaderPanel: cascader_panel["default"]
  2855. },
  2856. props: {
  2857. value: {},
  2858. options: Array,
  2859. props: Object,
  2860. size: String,
  2861. placeholder: {
  2862. type: String,
  2863. default: function _default() {
  2864. return Object(lib_locale_["t"])('el.cascader.placeholder');
  2865. }
  2866. },
  2867. disabled: Boolean,
  2868. clearable: Boolean,
  2869. filterable: Boolean,
  2870. filterMethod: Function,
  2871. separator: {
  2872. type: String,
  2873. default: ' / '
  2874. },
  2875. showAllLevels: {
  2876. type: Boolean,
  2877. default: true
  2878. },
  2879. collapseTags: Boolean,
  2880. debounce: {
  2881. type: Number,
  2882. default: 300
  2883. },
  2884. beforeFilter: {
  2885. type: Function,
  2886. default: function _default() {
  2887. return function () {};
  2888. }
  2889. },
  2890. popperClass: String
  2891. },
  2892. data: function data() {
  2893. return {
  2894. dropDownVisible: false,
  2895. checkedValue: this.value || null,
  2896. inputHover: false,
  2897. inputValue: null,
  2898. presentText: null,
  2899. presentTags: [],
  2900. checkedNodes: [],
  2901. filtering: false,
  2902. suggestions: [],
  2903. inputInitialHeight: 0,
  2904. pressDeleteCount: 0
  2905. };
  2906. },
  2907. computed: {
  2908. realSize: function realSize() {
  2909. var _elFormItemSize = (this.elFormItem || {}).elFormItemSize;
  2910. return this.size || _elFormItemSize || (this.$ELEMENT || {}).size;
  2911. },
  2912. tagSize: function tagSize() {
  2913. return ['small', 'mini'].indexOf(this.realSize) > -1 ? 'mini' : 'small';
  2914. },
  2915. isDisabled: function isDisabled() {
  2916. return this.disabled || (this.elForm || {}).disabled;
  2917. },
  2918. config: function config() {
  2919. var config = this.props || {};
  2920. var $attrs = this.$attrs;
  2921. Object.keys(MigratingProps).forEach(function (oldProp) {
  2922. var _MigratingProps$oldPr = MigratingProps[oldProp],
  2923. newProp = _MigratingProps$oldPr.newProp,
  2924. type = _MigratingProps$oldPr.type;
  2925. var oldValue = $attrs[oldProp] || $attrs[Object(util_["kebabCase"])(oldProp)];
  2926. if (Object(shared_["isDef"])(oldProp) && !Object(shared_["isDef"])(config[newProp])) {
  2927. if (type === Boolean && oldValue === '') {
  2928. oldValue = true;
  2929. }
  2930. config[newProp] = oldValue;
  2931. }
  2932. });
  2933. return config;
  2934. },
  2935. multiple: function multiple() {
  2936. return this.config.multiple;
  2937. },
  2938. leafOnly: function leafOnly() {
  2939. return !this.config.checkStrictly;
  2940. },
  2941. readonly: function readonly() {
  2942. return !this.filterable || this.multiple;
  2943. },
  2944. clearBtnVisible: function clearBtnVisible() {
  2945. if (!this.clearable || this.isDisabled || this.filtering || !this.inputHover) {
  2946. return false;
  2947. }
  2948. return this.multiple ? !!this.checkedNodes.filter(function (node) {
  2949. return !node.isDisabled;
  2950. }).length : !!this.presentText;
  2951. },
  2952. panel: function panel() {
  2953. return this.$refs.panel;
  2954. }
  2955. },
  2956. watch: {
  2957. disabled: function disabled() {
  2958. this.computePresentContent();
  2959. },
  2960. value: function value(val) {
  2961. if (!Object(util_["isEqual"])(val, this.checkedValue)) {
  2962. this.checkedValue = val;
  2963. this.computePresentContent();
  2964. }
  2965. },
  2966. checkedValue: function checkedValue(val) {
  2967. var value = this.value,
  2968. dropDownVisible = this.dropDownVisible;
  2969. var _config = this.config,
  2970. checkStrictly = _config.checkStrictly,
  2971. multiple = _config.multiple;
  2972. if (!Object(util_["isEqual"])(val, value) || Object(types_["isUndefined"])(value)) {
  2973. this.computePresentContent();
  2974. // hide dropdown when single mode
  2975. if (!multiple && !checkStrictly && dropDownVisible) {
  2976. this.toggleDropDownVisible(false);
  2977. }
  2978. this.$emit('input', val);
  2979. this.$emit('change', val);
  2980. this.dispatch('ElFormItem', 'el.form.change', [val]);
  2981. }
  2982. },
  2983. options: {
  2984. handler: function handler() {
  2985. _this.$nextTick(_this.computePresentContent);
  2986. },
  2987. deep: true
  2988. },
  2989. presentText: function presentText(val) {
  2990. this.inputValue = val;
  2991. },
  2992. presentTags: function presentTags(val, oldVal) {
  2993. if (this.multiple && (val.length || oldVal.length)) {
  2994. this.$nextTick(this.updateStyle);
  2995. }
  2996. },
  2997. filtering: function filtering(val) {
  2998. this.$nextTick(this.updatePopper);
  2999. }
  3000. },
  3001. mounted: function mounted() {
  3002. var _this2 = this;
  3003. var input = this.$refs.input;
  3004. if (input && input.$el) {
  3005. this.inputInitialHeight = input.$el.offsetHeight || InputSizeMap[this.realSize] || 40;
  3006. }
  3007. if (!Object(util_["isEmpty"])(this.value)) {
  3008. this.computePresentContent();
  3009. }
  3010. this.filterHandler = debounce_default()(this.debounce, function () {
  3011. var inputValue = _this2.inputValue;
  3012. if (!inputValue) {
  3013. _this2.filtering = false;
  3014. return;
  3015. }
  3016. var before = _this2.beforeFilter(inputValue);
  3017. if (before && before.then) {
  3018. before.then(_this2.getSuggestions);
  3019. } else if (before !== false) {
  3020. _this2.getSuggestions();
  3021. } else {
  3022. _this2.filtering = false;
  3023. }
  3024. });
  3025. Object(resize_event_["addResizeListener"])(this.$el, this.updateStyle);
  3026. },
  3027. beforeDestroy: function beforeDestroy() {
  3028. Object(resize_event_["removeResizeListener"])(this.$el, this.updateStyle);
  3029. },
  3030. methods: {
  3031. getMigratingConfig: function getMigratingConfig() {
  3032. return {
  3033. props: {
  3034. 'expand-trigger': 'expand-trigger is removed, use `props.expandTrigger` instead.',
  3035. 'change-on-select': 'change-on-select is removed, use `props.checkStrictly` instead.',
  3036. 'hover-threshold': 'hover-threshold is removed, use `props.hoverThreshold` instead'
  3037. },
  3038. events: {
  3039. 'active-item-change': 'active-item-change is renamed to expand-change'
  3040. }
  3041. };
  3042. },
  3043. toggleDropDownVisible: function toggleDropDownVisible(visible) {
  3044. var _this3 = this;
  3045. if (this.isDisabled) return;
  3046. var dropDownVisible = this.dropDownVisible;
  3047. var input = this.$refs.input;
  3048. visible = Object(shared_["isDef"])(visible) ? visible : !dropDownVisible;
  3049. if (visible !== dropDownVisible) {
  3050. this.dropDownVisible = visible;
  3051. if (visible) {
  3052. this.$nextTick(function () {
  3053. _this3.updatePopper();
  3054. _this3.panel.scrollIntoView();
  3055. });
  3056. }
  3057. input.$refs.input.setAttribute('aria-expanded', visible);
  3058. this.$emit('visible-change', visible);
  3059. }
  3060. },
  3061. handleDropdownLeave: function handleDropdownLeave() {
  3062. this.filtering = false;
  3063. this.inputValue = this.presentText;
  3064. },
  3065. handleKeyDown: function handleKeyDown(event) {
  3066. switch (event.keyCode) {
  3067. case KeyCode.enter:
  3068. this.toggleDropDownVisible();
  3069. break;
  3070. case KeyCode.down:
  3071. this.toggleDropDownVisible(true);
  3072. this.focusFirstNode();
  3073. event.preventDefault();
  3074. break;
  3075. case KeyCode.esc:
  3076. case KeyCode.tab:
  3077. this.toggleDropDownVisible(false);
  3078. break;
  3079. }
  3080. },
  3081. handleFocus: function handleFocus(e) {
  3082. this.$emit('focus', e);
  3083. },
  3084. handleBlur: function handleBlur(e) {
  3085. this.$emit('blur', e);
  3086. },
  3087. handleInput: function handleInput(val, event) {
  3088. !this.dropDownVisible && this.toggleDropDownVisible(true);
  3089. if (event && event.isComposing) return;
  3090. if (val) {
  3091. this.filterHandler();
  3092. } else {
  3093. this.filtering = false;
  3094. }
  3095. },
  3096. handleClear: function handleClear() {
  3097. this.presentText = '';
  3098. this.panel.clearCheckedNodes();
  3099. },
  3100. handleExpandChange: function handleExpandChange(value) {
  3101. this.$nextTick(this.updatePopper.bind(this));
  3102. this.$emit('expand-change', value);
  3103. this.$emit('active-item-change', value); // Deprecated
  3104. },
  3105. focusFirstNode: function focusFirstNode() {
  3106. var _this4 = this;
  3107. this.$nextTick(function () {
  3108. var filtering = _this4.filtering;
  3109. var _$refs = _this4.$refs,
  3110. popper = _$refs.popper,
  3111. suggestionPanel = _$refs.suggestionPanel;
  3112. var firstNode = null;
  3113. if (filtering && suggestionPanel) {
  3114. firstNode = suggestionPanel.$el.querySelector('.el-cascader__suggestion-item');
  3115. } else {
  3116. var firstMenu = popper.querySelector('.el-cascader-menu');
  3117. firstNode = firstMenu.querySelector('.el-cascader-node[tabindex="-1"]');
  3118. }
  3119. if (firstNode) {
  3120. firstNode.focus();
  3121. !filtering && firstNode.click();
  3122. }
  3123. });
  3124. },
  3125. computePresentContent: function computePresentContent() {
  3126. var _this5 = this;
  3127. // nextTick is required, because checked nodes may not change right now
  3128. this.$nextTick(function () {
  3129. if (_this5.config.multiple) {
  3130. _this5.computePresentTags();
  3131. _this5.presentText = _this5.presentTags.length ? ' ' : null;
  3132. } else {
  3133. _this5.computePresentText();
  3134. }
  3135. });
  3136. },
  3137. computePresentText: function computePresentText() {
  3138. var checkedValue = this.checkedValue,
  3139. config = this.config;
  3140. if (!Object(util_["isEmpty"])(checkedValue)) {
  3141. var node = this.panel.getNodeByValue(checkedValue);
  3142. if (node && (config.checkStrictly || node.isLeaf)) {
  3143. this.presentText = node.getText(this.showAllLevels, this.separator);
  3144. return;
  3145. }
  3146. }
  3147. this.presentText = null;
  3148. },
  3149. computePresentTags: function computePresentTags() {
  3150. var isDisabled = this.isDisabled,
  3151. leafOnly = this.leafOnly,
  3152. showAllLevels = this.showAllLevels,
  3153. separator = this.separator,
  3154. collapseTags = this.collapseTags;
  3155. var checkedNodes = this.getCheckedNodes(leafOnly);
  3156. var tags = [];
  3157. var genTag = function genTag(node) {
  3158. return {
  3159. node: node,
  3160. key: node.uid,
  3161. text: node.getText(showAllLevels, separator),
  3162. hitState: false,
  3163. closable: !isDisabled && !node.isDisabled
  3164. };
  3165. };
  3166. if (checkedNodes.length) {
  3167. var first = checkedNodes[0],
  3168. rest = checkedNodes.slice(1);
  3169. var restCount = rest.length;
  3170. tags.push(genTag(first));
  3171. if (restCount) {
  3172. if (collapseTags) {
  3173. tags.push({
  3174. key: -1,
  3175. text: '+ ' + restCount,
  3176. closable: false
  3177. });
  3178. } else {
  3179. rest.forEach(function (node) {
  3180. return tags.push(genTag(node));
  3181. });
  3182. }
  3183. }
  3184. }
  3185. this.checkedNodes = checkedNodes;
  3186. this.presentTags = tags;
  3187. },
  3188. getSuggestions: function getSuggestions() {
  3189. var _this6 = this;
  3190. var filterMethod = this.filterMethod;
  3191. if (!Object(types_["isFunction"])(filterMethod)) {
  3192. filterMethod = function filterMethod(node, keyword) {
  3193. return node.text.includes(keyword);
  3194. };
  3195. }
  3196. var suggestions = this.panel.getFlattedNodes(this.leafOnly).filter(function (node) {
  3197. if (node.isDisabled) return false;
  3198. node.text = node.getText(_this6.showAllLevels, _this6.separator) || '';
  3199. return filterMethod(node, _this6.inputValue);
  3200. });
  3201. if (this.multiple) {
  3202. this.presentTags.forEach(function (tag) {
  3203. tag.hitState = false;
  3204. });
  3205. } else {
  3206. suggestions.forEach(function (node) {
  3207. node.checked = Object(util_["isEqual"])(_this6.checkedValue, node.getValueByOption());
  3208. });
  3209. }
  3210. this.filtering = true;
  3211. this.suggestions = suggestions;
  3212. this.$nextTick(this.updatePopper);
  3213. },
  3214. handleSuggestionKeyDown: function handleSuggestionKeyDown(event) {
  3215. var keyCode = event.keyCode,
  3216. target = event.target;
  3217. switch (keyCode) {
  3218. case KeyCode.enter:
  3219. target.click();
  3220. break;
  3221. case KeyCode.up:
  3222. var prev = target.previousElementSibling;
  3223. prev && prev.focus();
  3224. break;
  3225. case KeyCode.down:
  3226. var next = target.nextElementSibling;
  3227. next && next.focus();
  3228. break;
  3229. case KeyCode.esc:
  3230. case KeyCode.tab:
  3231. this.toggleDropDownVisible(false);
  3232. break;
  3233. }
  3234. },
  3235. handleDelete: function handleDelete() {
  3236. var inputValue = this.inputValue,
  3237. pressDeleteCount = this.pressDeleteCount,
  3238. presentTags = this.presentTags;
  3239. var lastIndex = presentTags.length - 1;
  3240. var lastTag = presentTags[lastIndex];
  3241. this.pressDeleteCount = inputValue ? 0 : pressDeleteCount + 1;
  3242. if (!lastTag) return;
  3243. if (this.pressDeleteCount) {
  3244. if (lastTag.hitState) {
  3245. this.deleteTag(lastIndex);
  3246. } else {
  3247. lastTag.hitState = true;
  3248. }
  3249. }
  3250. },
  3251. handleSuggestionClick: function handleSuggestionClick(index) {
  3252. var multiple = this.multiple;
  3253. var targetNode = this.suggestions[index];
  3254. if (multiple) {
  3255. var checked = targetNode.checked;
  3256. targetNode.doCheck(!checked);
  3257. this.panel.calculateMultiCheckedValue();
  3258. } else {
  3259. this.checkedValue = targetNode.getValueByOption();
  3260. this.toggleDropDownVisible(false);
  3261. }
  3262. },
  3263. deleteTag: function deleteTag(index) {
  3264. var checkedValue = this.checkedValue;
  3265. var val = checkedValue[index];
  3266. this.checkedValue = checkedValue.filter(function (n, i) {
  3267. return i !== index;
  3268. });
  3269. this.$emit('remove-tag', val);
  3270. },
  3271. updateStyle: function updateStyle() {
  3272. var $el = this.$el,
  3273. inputInitialHeight = this.inputInitialHeight;
  3274. if (this.$isServer || !$el) return;
  3275. var suggestionPanel = this.$refs.suggestionPanel;
  3276. var inputInner = $el.querySelector('.el-input__inner');
  3277. if (!inputInner) return;
  3278. var tags = $el.querySelector('.el-cascader__tags');
  3279. var suggestionPanelEl = null;
  3280. if (suggestionPanel && (suggestionPanelEl = suggestionPanel.$el)) {
  3281. var suggestionList = suggestionPanelEl.querySelector('.el-cascader__suggestion-list');
  3282. suggestionList.style.minWidth = inputInner.offsetWidth + 'px';
  3283. }
  3284. if (tags) {
  3285. var offsetHeight = tags.offsetHeight;
  3286. var height = Math.max(offsetHeight + 6, inputInitialHeight) + 'px';
  3287. inputInner.style.height = height;
  3288. this.updatePopper();
  3289. }
  3290. },
  3291. /**
  3292. * public methods
  3293. */
  3294. getCheckedNodes: function getCheckedNodes(leafOnly) {
  3295. return this.panel.getCheckedNodes(leafOnly);
  3296. }
  3297. }
  3298. });
  3299. // CONCATENATED MODULE: ./packages/cascader/src/cascader.vue?vue&type=script&lang=js&
  3300. /* harmony default export */ var src_cascadervue_type_script_lang_js_ = (cascadervue_type_script_lang_js_);
  3301. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  3302. var componentNormalizer = __webpack_require__(2);
  3303. // CONCATENATED MODULE: ./packages/cascader/src/cascader.vue
  3304. /* normalize component */
  3305. var component = Object(componentNormalizer["a" /* default */])(
  3306. src_cascadervue_type_script_lang_js_,
  3307. render,
  3308. staticRenderFns,
  3309. false,
  3310. null,
  3311. null,
  3312. null
  3313. )
  3314. /* hot reload */
  3315. if (false) { var api; }
  3316. component.options.__file = "packages/cascader/src/cascader.vue"
  3317. /* harmony default export */ var cascader = (component.exports);
  3318. // CONCATENATED MODULE: ./packages/cascader/index.js
  3319. /* istanbul ignore next */
  3320. cascader.install = function (Vue) {
  3321. Vue.component(cascader.name, cascader);
  3322. };
  3323. /* harmony default export */ var packages_cascader = __webpack_exports__["default"] = (cascader);
  3324. /***/ }),
  3325. /***/ 61:
  3326. /***/ (function(module, exports) {
  3327. module.exports = require("tis-ui/lib/utils/clickoutside");
  3328. /***/ }),
  3329. /***/ 62:
  3330. /***/ (function(module, exports) {
  3331. module.exports = require("throttle-debounce/debounce");
  3332. /***/ }),
  3333. /***/ 65:
  3334. /***/ (function(module, exports) {
  3335. module.exports = require("tis-ui/lib/utils/scrollbar-width");
  3336. /***/ }),
  3337. /***/ 66:
  3338. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3339. "use strict";
  3340. // ESM COMPAT FLAG
  3341. __webpack_require__.r(__webpack_exports__);
  3342. // EXTERNAL MODULE: external "tis-ui/lib/utils/resize-event"
  3343. var resize_event_ = __webpack_require__(44);
  3344. // EXTERNAL MODULE: external "tis-ui/lib/utils/scrollbar-width"
  3345. var scrollbar_width_ = __webpack_require__(65);
  3346. var scrollbar_width_default = /*#__PURE__*/__webpack_require__.n(scrollbar_width_);
  3347. // EXTERNAL MODULE: external "tis-ui/lib/utils/util"
  3348. var util_ = __webpack_require__(10);
  3349. // EXTERNAL MODULE: external "tis-ui/lib/utils/dom"
  3350. var dom_ = __webpack_require__(7);
  3351. // CONCATENATED MODULE: ./packages/scrollbar/src/util.js
  3352. var BAR_MAP = {
  3353. vertical: {
  3354. offset: 'offsetHeight',
  3355. scroll: 'scrollTop',
  3356. scrollSize: 'scrollHeight',
  3357. size: 'height',
  3358. key: 'vertical',
  3359. axis: 'Y',
  3360. client: 'clientY',
  3361. direction: 'top'
  3362. },
  3363. horizontal: {
  3364. offset: 'offsetWidth',
  3365. scroll: 'scrollLeft',
  3366. scrollSize: 'scrollWidth',
  3367. size: 'width',
  3368. key: 'horizontal',
  3369. axis: 'X',
  3370. client: 'clientX',
  3371. direction: 'left'
  3372. }
  3373. };
  3374. function renderThumbStyle(_ref) {
  3375. var move = _ref.move,
  3376. size = _ref.size,
  3377. bar = _ref.bar;
  3378. var style = {};
  3379. var translate = 'translate' + bar.axis + '(' + move + '%)';
  3380. style[bar.size] = size;
  3381. style.transform = translate;
  3382. style.msTransform = translate;
  3383. style.webkitTransform = translate;
  3384. return style;
  3385. };
  3386. // CONCATENATED MODULE: ./packages/scrollbar/src/bar.js
  3387. /* istanbul ignore next */
  3388. /* harmony default export */ var src_bar = ({
  3389. name: 'Bar',
  3390. props: {
  3391. vertical: Boolean,
  3392. size: String,
  3393. move: Number
  3394. },
  3395. computed: {
  3396. bar: function bar() {
  3397. return BAR_MAP[this.vertical ? 'vertical' : 'horizontal'];
  3398. },
  3399. wrap: function wrap() {
  3400. return this.$parent.wrap;
  3401. }
  3402. },
  3403. render: function render(h) {
  3404. var size = this.size,
  3405. move = this.move,
  3406. bar = this.bar;
  3407. return h(
  3408. 'div',
  3409. {
  3410. 'class': ['el-scrollbar__bar', 'is-' + bar.key],
  3411. on: {
  3412. 'mousedown': this.clickTrackHandler
  3413. }
  3414. },
  3415. [h('div', {
  3416. ref: 'thumb',
  3417. 'class': 'el-scrollbar__thumb',
  3418. on: {
  3419. 'mousedown': this.clickThumbHandler
  3420. },
  3421. style: renderThumbStyle({ size: size, move: move, bar: bar }) })]
  3422. );
  3423. },
  3424. methods: {
  3425. clickThumbHandler: function clickThumbHandler(e) {
  3426. // prevent click event of right button
  3427. if (e.ctrlKey || e.button === 2) {
  3428. return;
  3429. }
  3430. this.startDrag(e);
  3431. this[this.bar.axis] = e.currentTarget[this.bar.offset] - (e[this.bar.client] - e.currentTarget.getBoundingClientRect()[this.bar.direction]);
  3432. },
  3433. clickTrackHandler: function clickTrackHandler(e) {
  3434. var offset = Math.abs(e.target.getBoundingClientRect()[this.bar.direction] - e[this.bar.client]);
  3435. var thumbHalf = this.$refs.thumb[this.bar.offset] / 2;
  3436. var thumbPositionPercentage = (offset - thumbHalf) * 100 / this.$el[this.bar.offset];
  3437. this.wrap[this.bar.scroll] = thumbPositionPercentage * this.wrap[this.bar.scrollSize] / 100;
  3438. },
  3439. startDrag: function startDrag(e) {
  3440. e.stopImmediatePropagation();
  3441. this.cursorDown = true;
  3442. Object(dom_["on"])(document, 'mousemove', this.mouseMoveDocumentHandler);
  3443. Object(dom_["on"])(document, 'mouseup', this.mouseUpDocumentHandler);
  3444. document.onselectstart = function () {
  3445. return false;
  3446. };
  3447. },
  3448. mouseMoveDocumentHandler: function mouseMoveDocumentHandler(e) {
  3449. if (this.cursorDown === false) return;
  3450. var prevPage = this[this.bar.axis];
  3451. if (!prevPage) return;
  3452. var offset = (this.$el.getBoundingClientRect()[this.bar.direction] - e[this.bar.client]) * -1;
  3453. var thumbClickPosition = this.$refs.thumb[this.bar.offset] - prevPage;
  3454. var thumbPositionPercentage = (offset - thumbClickPosition) * 100 / this.$el[this.bar.offset];
  3455. this.wrap[this.bar.scroll] = thumbPositionPercentage * this.wrap[this.bar.scrollSize] / 100;
  3456. },
  3457. mouseUpDocumentHandler: function mouseUpDocumentHandler(e) {
  3458. this.cursorDown = false;
  3459. this[this.bar.axis] = 0;
  3460. Object(dom_["off"])(document, 'mousemove', this.mouseMoveDocumentHandler);
  3461. document.onselectstart = null;
  3462. }
  3463. },
  3464. destroyed: function destroyed() {
  3465. Object(dom_["off"])(document, 'mouseup', this.mouseUpDocumentHandler);
  3466. }
  3467. });
  3468. // CONCATENATED MODULE: ./packages/scrollbar/src/main.js
  3469. // reference https://github.com/noeldelgado/gemini-scrollbar/blob/master/index.js
  3470. /* istanbul ignore next */
  3471. /* harmony default export */ var main = ({
  3472. name: 'TisScrollbar',
  3473. components: { Bar: src_bar },
  3474. props: {
  3475. native: Boolean,
  3476. wrapStyle: {},
  3477. wrapClass: {},
  3478. viewClass: {},
  3479. viewStyle: {},
  3480. noresize: Boolean, // 如果 container 尺寸不会发生变化,最好设置它可以优化性能
  3481. tag: {
  3482. type: String,
  3483. default: 'div'
  3484. }
  3485. },
  3486. data: function data() {
  3487. return {
  3488. sizeWidth: '0',
  3489. sizeHeight: '0',
  3490. moveX: 0,
  3491. moveY: 0
  3492. };
  3493. },
  3494. computed: {
  3495. wrap: function wrap() {
  3496. return this.$refs.wrap;
  3497. }
  3498. },
  3499. render: function render(h) {
  3500. var gutter = scrollbar_width_default()();
  3501. var style = this.wrapStyle;
  3502. if (gutter) {
  3503. var gutterWith = '-' + gutter + 'px';
  3504. var gutterStyle = 'margin-bottom: ' + gutterWith + '; margin-right: ' + gutterWith + ';';
  3505. if (Array.isArray(this.wrapStyle)) {
  3506. style = Object(util_["toObject"])(this.wrapStyle);
  3507. style.marginRight = style.marginBottom = gutterWith;
  3508. } else if (typeof this.wrapStyle === 'string') {
  3509. style += gutterStyle;
  3510. } else {
  3511. style = gutterStyle;
  3512. }
  3513. }
  3514. var view = h(this.tag, {
  3515. class: ['el-scrollbar__view', this.viewClass],
  3516. style: this.viewStyle,
  3517. ref: 'resize'
  3518. }, this.$slots.default);
  3519. var wrap = h(
  3520. 'div',
  3521. {
  3522. ref: 'wrap',
  3523. style: style,
  3524. on: {
  3525. 'scroll': this.handleScroll
  3526. },
  3527. 'class': [this.wrapClass, 'el-scrollbar__wrap', gutter ? '' : 'el-scrollbar__wrap--hidden-default'] },
  3528. [[view]]
  3529. );
  3530. var nodes = void 0;
  3531. if (!this.native) {
  3532. nodes = [wrap, h(src_bar, {
  3533. attrs: {
  3534. move: this.moveX,
  3535. size: this.sizeWidth }
  3536. }), h(src_bar, {
  3537. attrs: {
  3538. vertical: true,
  3539. move: this.moveY,
  3540. size: this.sizeHeight }
  3541. })];
  3542. } else {
  3543. nodes = [h(
  3544. 'div',
  3545. {
  3546. ref: 'wrap',
  3547. 'class': [this.wrapClass, 'el-scrollbar__wrap'],
  3548. style: style },
  3549. [[view]]
  3550. )];
  3551. }
  3552. return h('div', { class: 'el-scrollbar' }, nodes);
  3553. },
  3554. methods: {
  3555. handleScroll: function handleScroll() {
  3556. var wrap = this.wrap;
  3557. this.moveY = wrap.scrollTop * 100 / wrap.clientHeight;
  3558. this.moveX = wrap.scrollLeft * 100 / wrap.clientWidth;
  3559. },
  3560. update: function update() {
  3561. var heightPercentage = void 0,
  3562. widthPercentage = void 0;
  3563. var wrap = this.wrap;
  3564. if (!wrap) return;
  3565. heightPercentage = wrap.clientHeight * 100 / wrap.scrollHeight;
  3566. widthPercentage = wrap.clientWidth * 100 / wrap.scrollWidth;
  3567. this.sizeHeight = heightPercentage < 100 ? heightPercentage + '%' : '';
  3568. this.sizeWidth = widthPercentage < 100 ? widthPercentage + '%' : '';
  3569. }
  3570. },
  3571. mounted: function mounted() {
  3572. if (this.native) return;
  3573. this.$nextTick(this.update);
  3574. !this.noresize && Object(resize_event_["addResizeListener"])(this.$refs.resize, this.update);
  3575. },
  3576. beforeDestroy: function beforeDestroy() {
  3577. if (this.native) return;
  3578. !this.noresize && Object(resize_event_["removeResizeListener"])(this.$refs.resize, this.update);
  3579. }
  3580. });
  3581. // CONCATENATED MODULE: ./packages/scrollbar/index.js
  3582. /* istanbul ignore next */
  3583. main.install = function (Vue) {
  3584. Vue.component(main.name, main);
  3585. };
  3586. /* harmony default export */ var scrollbar = __webpack_exports__["default"] = (main);
  3587. /***/ }),
  3588. /***/ 68:
  3589. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3590. "use strict";
  3591. // ESM COMPAT FLAG
  3592. __webpack_require__.r(__webpack_exports__);
  3593. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox.vue?vue&type=template&id=d0387074&
  3594. var render = function() {
  3595. var _vm = this
  3596. var _h = _vm.$createElement
  3597. var _c = _vm._self._c || _h
  3598. return _c(
  3599. "label",
  3600. {
  3601. staticClass: "el-checkbox",
  3602. class: [
  3603. _vm.border && _vm.checkboxSize
  3604. ? "el-checkbox--" + _vm.checkboxSize
  3605. : "",
  3606. { "is-disabled": _vm.isDisabled },
  3607. { "is-bordered": _vm.border },
  3608. { "is-checked": _vm.isChecked }
  3609. ],
  3610. attrs: { id: _vm.id }
  3611. },
  3612. [
  3613. _c(
  3614. "span",
  3615. {
  3616. staticClass: "el-checkbox__input",
  3617. class: {
  3618. "is-disabled": _vm.isDisabled,
  3619. "is-checked": _vm.isChecked,
  3620. "is-indeterminate": _vm.indeterminate,
  3621. "is-focus": _vm.focus
  3622. },
  3623. attrs: {
  3624. tabindex: _vm.indeterminate ? 0 : false,
  3625. role: _vm.indeterminate ? "checkbox" : false,
  3626. "aria-checked": _vm.indeterminate ? "mixed" : false
  3627. }
  3628. },
  3629. [
  3630. _c("span", { staticClass: "el-checkbox__inner" }),
  3631. _vm.trueLabel || _vm.falseLabel
  3632. ? _c("input", {
  3633. directives: [
  3634. {
  3635. name: "model",
  3636. rawName: "v-model",
  3637. value: _vm.model,
  3638. expression: "model"
  3639. }
  3640. ],
  3641. staticClass: "el-checkbox__original",
  3642. attrs: {
  3643. type: "checkbox",
  3644. "aria-hidden": _vm.indeterminate ? "true" : "false",
  3645. name: _vm.name,
  3646. disabled: _vm.isDisabled,
  3647. "true-value": _vm.trueLabel,
  3648. "false-value": _vm.falseLabel
  3649. },
  3650. domProps: {
  3651. checked: Array.isArray(_vm.model)
  3652. ? _vm._i(_vm.model, null) > -1
  3653. : _vm._q(_vm.model, _vm.trueLabel)
  3654. },
  3655. on: {
  3656. change: [
  3657. function($event) {
  3658. var $$a = _vm.model,
  3659. $$el = $event.target,
  3660. $$c = $$el.checked ? _vm.trueLabel : _vm.falseLabel
  3661. if (Array.isArray($$a)) {
  3662. var $$v = null,
  3663. $$i = _vm._i($$a, $$v)
  3664. if ($$el.checked) {
  3665. $$i < 0 && (_vm.model = $$a.concat([$$v]))
  3666. } else {
  3667. $$i > -1 &&
  3668. (_vm.model = $$a
  3669. .slice(0, $$i)
  3670. .concat($$a.slice($$i + 1)))
  3671. }
  3672. } else {
  3673. _vm.model = $$c
  3674. }
  3675. },
  3676. _vm.handleChange
  3677. ],
  3678. focus: function($event) {
  3679. _vm.focus = true
  3680. },
  3681. blur: function($event) {
  3682. _vm.focus = false
  3683. }
  3684. }
  3685. })
  3686. : _c("input", {
  3687. directives: [
  3688. {
  3689. name: "model",
  3690. rawName: "v-model",
  3691. value: _vm.model,
  3692. expression: "model"
  3693. }
  3694. ],
  3695. staticClass: "el-checkbox__original",
  3696. attrs: {
  3697. type: "checkbox",
  3698. "aria-hidden": _vm.indeterminate ? "true" : "false",
  3699. disabled: _vm.isDisabled,
  3700. name: _vm.name
  3701. },
  3702. domProps: {
  3703. value: _vm.label,
  3704. checked: Array.isArray(_vm.model)
  3705. ? _vm._i(_vm.model, _vm.label) > -1
  3706. : _vm.model
  3707. },
  3708. on: {
  3709. change: [
  3710. function($event) {
  3711. var $$a = _vm.model,
  3712. $$el = $event.target,
  3713. $$c = $$el.checked ? true : false
  3714. if (Array.isArray($$a)) {
  3715. var $$v = _vm.label,
  3716. $$i = _vm._i($$a, $$v)
  3717. if ($$el.checked) {
  3718. $$i < 0 && (_vm.model = $$a.concat([$$v]))
  3719. } else {
  3720. $$i > -1 &&
  3721. (_vm.model = $$a
  3722. .slice(0, $$i)
  3723. .concat($$a.slice($$i + 1)))
  3724. }
  3725. } else {
  3726. _vm.model = $$c
  3727. }
  3728. },
  3729. _vm.handleChange
  3730. ],
  3731. focus: function($event) {
  3732. _vm.focus = true
  3733. },
  3734. blur: function($event) {
  3735. _vm.focus = false
  3736. }
  3737. }
  3738. })
  3739. ]
  3740. ),
  3741. _vm.$slots.default || _vm.label
  3742. ? _c(
  3743. "span",
  3744. { staticClass: "el-checkbox__label" },
  3745. [
  3746. _vm._t("default"),
  3747. !_vm.$slots.default ? [_vm._v(_vm._s(_vm.label))] : _vm._e()
  3748. ],
  3749. 2
  3750. )
  3751. : _vm._e()
  3752. ]
  3753. )
  3754. }
  3755. var staticRenderFns = []
  3756. render._withStripped = true
  3757. // CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue?vue&type=template&id=d0387074&
  3758. // EXTERNAL MODULE: external "tis-ui/lib/mixins/emitter"
  3759. var emitter_ = __webpack_require__(13);
  3760. var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
  3761. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox.vue?vue&type=script&lang=js&
  3762. //
  3763. //
  3764. //
  3765. //
  3766. //
  3767. //
  3768. //
  3769. //
  3770. //
  3771. //
  3772. //
  3773. //
  3774. //
  3775. //
  3776. //
  3777. //
  3778. //
  3779. //
  3780. //
  3781. //
  3782. //
  3783. //
  3784. //
  3785. //
  3786. //
  3787. //
  3788. //
  3789. //
  3790. //
  3791. //
  3792. //
  3793. //
  3794. //
  3795. //
  3796. //
  3797. //
  3798. //
  3799. //
  3800. //
  3801. //
  3802. //
  3803. //
  3804. //
  3805. //
  3806. //
  3807. //
  3808. //
  3809. //
  3810. //
  3811. //
  3812. //
  3813. //
  3814. //
  3815. //
  3816. //
  3817. /* harmony default export */ var checkboxvue_type_script_lang_js_ = ({
  3818. name: 'TisCheckbox',
  3819. mixins: [emitter_default.a],
  3820. inject: {
  3821. elForm: {
  3822. default: ''
  3823. },
  3824. elFormItem: {
  3825. default: ''
  3826. }
  3827. },
  3828. componentName: 'TisCheckbox',
  3829. data: function data() {
  3830. return {
  3831. selfModel: false,
  3832. focus: false,
  3833. isLimitExceeded: false
  3834. };
  3835. },
  3836. computed: {
  3837. model: {
  3838. get: function get() {
  3839. return this.isGroup ? this.store : this.value !== undefined ? this.value : this.selfModel;
  3840. },
  3841. set: function set(val) {
  3842. if (this.isGroup) {
  3843. this.isLimitExceeded = false;
  3844. this._checkboxGroup.min !== undefined && val.length < this._checkboxGroup.min && (this.isLimitExceeded = true);
  3845. this._checkboxGroup.max !== undefined && val.length > this._checkboxGroup.max && (this.isLimitExceeded = true);
  3846. this.isLimitExceeded === false && this.dispatch('TisCheckboxGroup', 'input', [val]);
  3847. } else {
  3848. this.$emit('input', val);
  3849. this.selfModel = val;
  3850. }
  3851. }
  3852. },
  3853. isChecked: function isChecked() {
  3854. if ({}.toString.call(this.model) === '[object Boolean]') {
  3855. return this.model;
  3856. } else if (Array.isArray(this.model)) {
  3857. return this.model.indexOf(this.label) > -1;
  3858. } else if (this.model !== null && this.model !== undefined) {
  3859. return this.model === this.trueLabel;
  3860. }
  3861. },
  3862. isGroup: function isGroup() {
  3863. var parent = this.$parent;
  3864. while (parent) {
  3865. if (parent.$options.componentName !== 'TisCheckboxGroup') {
  3866. parent = parent.$parent;
  3867. } else {
  3868. this._checkboxGroup = parent;
  3869. return true;
  3870. }
  3871. }
  3872. return false;
  3873. },
  3874. store: function store() {
  3875. return this._checkboxGroup ? this._checkboxGroup.value : this.value;
  3876. },
  3877. /* used to make the isDisabled judgment under max/min props */
  3878. isLimitDisabled: function isLimitDisabled() {
  3879. var _checkboxGroup = this._checkboxGroup,
  3880. max = _checkboxGroup.max,
  3881. min = _checkboxGroup.min;
  3882. return !!(max || min) && this.model.length >= max && !this.isChecked || this.model.length <= min && this.isChecked;
  3883. },
  3884. isDisabled: function isDisabled() {
  3885. return this.isGroup ? this._checkboxGroup.disabled || this.disabled || (this.elForm || {}).disabled || this.isLimitDisabled : this.disabled || (this.elForm || {}).disabled;
  3886. },
  3887. _elFormItemSize: function _elFormItemSize() {
  3888. return (this.elFormItem || {}).elFormItemSize;
  3889. },
  3890. checkboxSize: function checkboxSize() {
  3891. var temCheckboxSize = this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
  3892. return this.isGroup ? this._checkboxGroup.checkboxGroupSize || temCheckboxSize : temCheckboxSize;
  3893. }
  3894. },
  3895. props: {
  3896. value: {},
  3897. label: {},
  3898. indeterminate: Boolean,
  3899. disabled: Boolean,
  3900. checked: Boolean,
  3901. name: String,
  3902. trueLabel: [String, Number],
  3903. falseLabel: [String, Number],
  3904. id: String, /* 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系*/
  3905. controls: String, /* 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系*/
  3906. border: Boolean,
  3907. size: String
  3908. },
  3909. methods: {
  3910. addToStore: function addToStore() {
  3911. if (Array.isArray(this.model) && this.model.indexOf(this.label) === -1) {
  3912. this.model.push(this.label);
  3913. } else {
  3914. this.model = this.trueLabel || true;
  3915. }
  3916. },
  3917. handleChange: function handleChange(ev) {
  3918. var _this = this;
  3919. if (this.isLimitExceeded) return;
  3920. var value = void 0;
  3921. if (ev.target.checked) {
  3922. value = this.trueLabel === undefined ? true : this.trueLabel;
  3923. } else {
  3924. value = this.falseLabel === undefined ? false : this.falseLabel;
  3925. }
  3926. this.$emit('change', value, ev);
  3927. this.$nextTick(function () {
  3928. if (_this.isGroup) {
  3929. _this.dispatch('TisCheckboxGroup', 'change', [_this._checkboxGroup.value]);
  3930. }
  3931. });
  3932. }
  3933. },
  3934. created: function created() {
  3935. this.checked && this.addToStore();
  3936. },
  3937. mounted: function mounted() {
  3938. // 为indeterminate元素 添加aria-controls 属性
  3939. if (this.indeterminate) {
  3940. this.$el.setAttribute('aria-controls', this.controls);
  3941. }
  3942. },
  3943. watch: {
  3944. value: function value(_value) {
  3945. this.dispatch('ElFormItem', 'el.form.change', _value);
  3946. }
  3947. }
  3948. });
  3949. // CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue?vue&type=script&lang=js&
  3950. /* harmony default export */ var src_checkboxvue_type_script_lang_js_ = (checkboxvue_type_script_lang_js_);
  3951. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  3952. var componentNormalizer = __webpack_require__(2);
  3953. // CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue
  3954. /* normalize component */
  3955. var component = Object(componentNormalizer["a" /* default */])(
  3956. src_checkboxvue_type_script_lang_js_,
  3957. render,
  3958. staticRenderFns,
  3959. false,
  3960. null,
  3961. null,
  3962. null
  3963. )
  3964. /* hot reload */
  3965. if (false) { var api; }
  3966. component.options.__file = "packages/checkbox/src/checkbox.vue"
  3967. /* harmony default export */ var src_checkbox = (component.exports);
  3968. // CONCATENATED MODULE: ./packages/checkbox/index.js
  3969. /* istanbul ignore next */
  3970. src_checkbox.install = function (Vue) {
  3971. Vue.component(src_checkbox.name, src_checkbox);
  3972. };
  3973. /* harmony default export */ var packages_checkbox = __webpack_exports__["default"] = (src_checkbox);
  3974. /***/ }),
  3975. /***/ 7:
  3976. /***/ (function(module, exports) {
  3977. module.exports = require("tis-ui/lib/utils/dom");
  3978. /***/ }),
  3979. /***/ 72:
  3980. /***/ (function(module, exports) {
  3981. module.exports = require("tis-ui/lib/locale");
  3982. /***/ }),
  3983. /***/ 89:
  3984. /***/ (function(module, exports) {
  3985. module.exports = require("tis-ui/lib/utils/types");
  3986. /***/ }),
  3987. /***/ 90:
  3988. /***/ (function(module, exports) {
  3989. module.exports = require("babel-helper-vue-jsx-merge-props");
  3990. /***/ }),
  3991. /***/ 95:
  3992. /***/ (function(module, exports) {
  3993. module.exports = require("tis-ui/lib/utils/scroll-into-view");
  3994. /***/ })
  3995. /******/ });