cy-element-ui 1.0.72 → 1.0.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/lib/alert.js +4 -4
  2. package/lib/aside.js +77 -77
  3. package/lib/autocomplete.js +3940 -159
  4. package/lib/avatar.js +108 -108
  5. package/lib/backtop.js +110 -110
  6. package/lib/badge.js +108 -108
  7. package/lib/breadcrumb-item.js +4 -4
  8. package/lib/breadcrumb.js +4 -4
  9. package/lib/button-group.js +4 -4
  10. package/lib/button.js +4 -4
  11. package/lib/calendar.js +1545 -46
  12. package/lib/card.js +96 -96
  13. package/lib/carousel-item.js +452 -108
  14. package/lib/carousel.js +185 -116
  15. package/lib/cascader-panel.js +2270 -187
  16. package/lib/cascader.js +6452 -275
  17. package/lib/checkbox-button.js +43 -11
  18. package/lib/checkbox-group.js +47 -15
  19. package/lib/checkbox.js +47 -15
  20. package/lib/col.js +2 -2
  21. package/lib/collapse-item.js +815 -110
  22. package/lib/collapse.js +108 -108
  23. package/lib/color-picker.js +3953 -153
  24. package/lib/container.js +88 -88
  25. package/lib/date-picker.js +5231 -420
  26. package/lib/descriptions-item.js +2 -2
  27. package/lib/descriptions.js +63 -8
  28. package/lib/dialog.js +1200 -22
  29. package/lib/directives/repeat-click.js +2 -2
  30. package/lib/divider.js +104 -104
  31. package/lib/drawer.js +875 -105
  32. package/lib/dropdown-item.js +43 -11
  33. package/lib/dropdown-menu.js +2274 -72
  34. package/lib/dropdown.js +1072 -136
  35. package/lib/element-ui.common.js +26229 -13291
  36. package/lib/empty.js +603 -7
  37. package/lib/fileUpload.js +2478 -110
  38. package/lib/footer.js +77 -77
  39. package/lib/form-item.js +418 -28
  40. package/lib/form.js +29 -15
  41. package/lib/header.js +77 -77
  42. package/lib/icon.js +4 -4
  43. package/lib/image.js +1376 -49
  44. package/lib/index.js +1 -1
  45. package/lib/infinite-scroll.js +311 -21
  46. package/lib/input-number.js +1423 -34
  47. package/lib/input.js +507 -37
  48. package/lib/link.js +4 -4
  49. package/lib/loading.js +804 -67
  50. package/lib/locale/format.js +1 -1
  51. package/lib/locale/index.js +1 -1
  52. package/lib/main.js +64 -64
  53. package/lib/menu-item-group.js +4 -4
  54. package/lib/menu-item.js +2925 -41
  55. package/lib/menu.js +745 -54
  56. package/lib/message-box.js +2536 -79
  57. package/lib/message.js +1102 -24
  58. package/lib/mixins/locale.js +1 -1
  59. package/lib/mixins/migrating.js +1 -1
  60. package/lib/notification.js +1102 -25
  61. package/lib/option-group.js +43 -11
  62. package/lib/option.js +394 -18
  63. package/lib/page-header.js +683 -87
  64. package/lib/pagination.js +6078 -139
  65. package/lib/popconfirm.js +3508 -219
  66. package/lib/popover.js +2604 -79
  67. package/lib/progress.js +4 -4
  68. package/lib/radio-button.js +43 -11
  69. package/lib/radio-group.js +43 -11
  70. package/lib/radio.js +47 -15
  71. package/lib/rate.js +756 -113
  72. package/lib/result.js +4 -4
  73. package/lib/row.js +2 -2
  74. package/lib/scrollbar.js +735 -50
  75. package/lib/select.js +4352 -209
  76. package/lib/selectDisplayInput.js +108 -108
  77. package/lib/skeleton-item.js +2 -2
  78. package/lib/skeleton.js +108 -108
  79. package/lib/slider.js +4266 -120
  80. package/lib/spinner.js +4 -4
  81. package/lib/statistic.js +9605 -117
  82. package/lib/step.js +108 -108
  83. package/lib/steps.js +514 -99
  84. package/lib/subTitle.js +91 -91
  85. package/lib/submenu.js +2444 -123
  86. package/lib/switch.js +476 -21
  87. package/lib/tab-pane.js +4 -4
  88. package/lib/tabDialog.js +1544 -18
  89. package/lib/table-column.js +881 -33
  90. package/lib/table.js +4469 -426
  91. package/lib/tabs.js +425 -12
  92. package/lib/tag.js +4 -4
  93. package/lib/time-picker.js +5013 -285
  94. package/lib/time-select.js +4945 -177
  95. package/lib/timeline-item.js +108 -108
  96. package/lib/timeline.js +82 -82
  97. package/lib/tooltip.js +2566 -41
  98. package/lib/transfer.js +2135 -141
  99. package/lib/transitions/collapse-transition.js +1 -1
  100. package/lib/tree.js +1372 -55
  101. package/lib/treeSelect.js +3420 -105
  102. package/lib/upload.js +1047 -28
  103. package/lib/utils/clickoutside.js +1 -1
  104. package/lib/utils/date-util.js +2 -2
  105. package/lib/utils/popup/index.js +2 -2
  106. package/lib/utils/popup/popup-manager.js +1 -1
  107. package/lib/utils/util.js +1 -1
  108. package/lib/utils/vdom.js +1 -1
  109. package/lib/utils/vue-popper.js +1 -1
  110. package/package.json +1 -1
  111. package/src/index.js +1 -1
package/lib/tree.js CHANGED
@@ -82,12 +82,513 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 63);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 65);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
89
89
 
90
90
  /***/ 0:
91
+ /***/ (function(module, exports) {
92
+
93
+ module.exports = require("vue");
94
+
95
+ /***/ }),
96
+
97
+ /***/ 1:
98
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
99
+
100
+ "use strict";
101
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return on; });
102
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return off; });
103
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return once; });
104
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return hasClass; });
105
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; });
106
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return removeClass; });
107
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getStyle; });
108
+ /* unused harmony export setStyle */
109
+ /* unused harmony export isScroll */
110
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getScrollContainer; });
111
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isInContainer; });
112
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
113
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
114
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
115
+
116
+ /* istanbul ignore next */
117
+
118
+
119
+
120
+ var isServer = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer;
121
+ var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
122
+ var MOZ_HACK_REGEXP = /^moz([A-Z])/;
123
+ var ieVersion = isServer ? 0 : Number(document.documentMode);
124
+
125
+ /* istanbul ignore next */
126
+ var trim = function trim(string) {
127
+ return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
128
+ };
129
+ /* istanbul ignore next */
130
+ var camelCase = function camelCase(name) {
131
+ return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
132
+ return offset ? letter.toUpperCase() : letter;
133
+ }).replace(MOZ_HACK_REGEXP, 'Moz$1');
134
+ };
135
+
136
+ /* istanbul ignore next */
137
+ var on = function () {
138
+ if (!isServer && document.addEventListener) {
139
+ return function (element, event, handler) {
140
+ if (element && event && handler) {
141
+ element.addEventListener(event, handler, false);
142
+ }
143
+ };
144
+ } else {
145
+ return function (element, event, handler) {
146
+ if (element && event && handler) {
147
+ element.attachEvent('on' + event, handler);
148
+ }
149
+ };
150
+ }
151
+ }();
152
+
153
+ /* istanbul ignore next */
154
+ var off = function () {
155
+ if (!isServer && document.removeEventListener) {
156
+ return function (element, event, handler) {
157
+ if (element && event) {
158
+ element.removeEventListener(event, handler, false);
159
+ }
160
+ };
161
+ } else {
162
+ return function (element, event, handler) {
163
+ if (element && event) {
164
+ element.detachEvent('on' + event, handler);
165
+ }
166
+ };
167
+ }
168
+ }();
169
+
170
+ /* istanbul ignore next */
171
+ var once = function once(el, event, fn) {
172
+ var listener = function listener() {
173
+ if (fn) {
174
+ fn.apply(this, arguments);
175
+ }
176
+ off(el, event, listener);
177
+ };
178
+ on(el, event, listener);
179
+ };
180
+
181
+ /* istanbul ignore next */
182
+ function hasClass(el, cls) {
183
+ if (!el || !cls) return false;
184
+ if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
185
+ if (el.classList) {
186
+ return el.classList.contains(cls);
187
+ } else {
188
+ return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
189
+ }
190
+ };
191
+
192
+ /* istanbul ignore next */
193
+ function addClass(el, cls) {
194
+ if (!el) return;
195
+ var curClass = el.className;
196
+ var classes = (cls || '').split(' ');
197
+
198
+ for (var i = 0, j = classes.length; i < j; i++) {
199
+ var clsName = classes[i];
200
+ if (!clsName) continue;
201
+
202
+ if (el.classList) {
203
+ el.classList.add(clsName);
204
+ } else if (!hasClass(el, clsName)) {
205
+ curClass += ' ' + clsName;
206
+ }
207
+ }
208
+ if (!el.classList) {
209
+ el.setAttribute('class', curClass);
210
+ }
211
+ };
212
+
213
+ /* istanbul ignore next */
214
+ function removeClass(el, cls) {
215
+ if (!el || !cls) return;
216
+ var classes = cls.split(' ');
217
+ var curClass = ' ' + el.className + ' ';
218
+
219
+ for (var i = 0, j = classes.length; i < j; i++) {
220
+ var clsName = classes[i];
221
+ if (!clsName) continue;
222
+
223
+ if (el.classList) {
224
+ el.classList.remove(clsName);
225
+ } else if (hasClass(el, clsName)) {
226
+ curClass = curClass.replace(' ' + clsName + ' ', ' ');
227
+ }
228
+ }
229
+ if (!el.classList) {
230
+ el.setAttribute('class', trim(curClass));
231
+ }
232
+ };
233
+
234
+ /* istanbul ignore next */
235
+ var getStyle = ieVersion < 9 ? function (element, styleName) {
236
+ if (isServer) return;
237
+ if (!element || !styleName) return null;
238
+ styleName = camelCase(styleName);
239
+ if (styleName === 'float') {
240
+ styleName = 'styleFloat';
241
+ }
242
+ try {
243
+ switch (styleName) {
244
+ case 'opacity':
245
+ try {
246
+ return element.filters.item('alpha').opacity / 100;
247
+ } catch (e) {
248
+ return 1.0;
249
+ }
250
+ default:
251
+ return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
252
+ }
253
+ } catch (e) {
254
+ return element.style[styleName];
255
+ }
256
+ } : function (element, styleName) {
257
+ if (isServer) return;
258
+ if (!element || !styleName) return null;
259
+ styleName = camelCase(styleName);
260
+ if (styleName === 'float') {
261
+ styleName = 'cssFloat';
262
+ }
263
+ try {
264
+ var computed = document.defaultView.getComputedStyle(element, '');
265
+ return element.style[styleName] || computed ? computed[styleName] : null;
266
+ } catch (e) {
267
+ return element.style[styleName];
268
+ }
269
+ };
270
+
271
+ /* istanbul ignore next */
272
+ function setStyle(element, styleName, value) {
273
+ if (!element || !styleName) return;
274
+
275
+ if ((typeof styleName === 'undefined' ? 'undefined' : _typeof(styleName)) === 'object') {
276
+ for (var prop in styleName) {
277
+ if (styleName.hasOwnProperty(prop)) {
278
+ setStyle(element, prop, styleName[prop]);
279
+ }
280
+ }
281
+ } else {
282
+ styleName = camelCase(styleName);
283
+ if (styleName === 'opacity' && ieVersion < 9) {
284
+ element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
285
+ } else {
286
+ element.style[styleName] = value;
287
+ }
288
+ }
289
+ };
290
+
291
+ var isScroll = function isScroll(el, vertical) {
292
+ if (isServer) return;
293
+
294
+ var determinedDirection = vertical !== null && vertical !== undefined;
295
+ var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
296
+
297
+ return overflow.match(/(scroll|auto|overlay)/);
298
+ };
299
+
300
+ var getScrollContainer = function getScrollContainer(el, vertical) {
301
+ if (isServer) return;
302
+
303
+ var parent = el;
304
+ while (parent) {
305
+ if ([window, document, document.documentElement].includes(parent)) {
306
+ return window;
307
+ }
308
+ if (isScroll(parent, vertical)) {
309
+ return parent;
310
+ }
311
+ parent = parent.parentNode;
312
+ }
313
+
314
+ return parent;
315
+ };
316
+
317
+ var isInContainer = function isInContainer(el, container) {
318
+ if (isServer || !el || !container) return false;
319
+
320
+ var elRect = el.getBoundingClientRect();
321
+ var containerRect = void 0;
322
+
323
+ if ([window, document, document.documentElement, null, undefined].includes(container)) {
324
+ containerRect = {
325
+ top: 0,
326
+ right: window.innerWidth,
327
+ bottom: window.innerHeight,
328
+ left: 0
329
+ };
330
+ } else {
331
+ containerRect = container.getBoundingClientRect();
332
+ }
333
+
334
+ return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
335
+ };
336
+
337
+ /***/ }),
338
+
339
+ /***/ 11:
340
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
341
+
342
+ "use strict";
343
+
344
+ // EXPORTS
345
+ __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ t; });
346
+
347
+ // UNUSED EXPORTS: use, i18n
348
+
349
+ // CONCATENATED MODULE: ./src/locale/lang/zh-CN.js
350
+ /* harmony default export */ var zh_CN = ({
351
+ el: {
352
+ colorpicker: {
353
+ confirm: '确定',
354
+ clear: '清空'
355
+ },
356
+ datepicker: {
357
+ now: '此刻',
358
+ today: '今天',
359
+ cancel: '取消',
360
+ clear: '清空',
361
+ confirm: '确定',
362
+ selectDate: '选择日期',
363
+ selectTime: '选择时间',
364
+ startDate: '开始日期',
365
+ startTime: '开始时间',
366
+ endDate: '结束日期',
367
+ endTime: '结束时间',
368
+ prevYear: '前一年',
369
+ nextYear: '后一年',
370
+ prevMonth: '上个月',
371
+ nextMonth: '下个月',
372
+ year: '年',
373
+ month1: '1 月',
374
+ month2: '2 月',
375
+ month3: '3 月',
376
+ month4: '4 月',
377
+ month5: '5 月',
378
+ month6: '6 月',
379
+ month7: '7 月',
380
+ month8: '8 月',
381
+ month9: '9 月',
382
+ month10: '10 月',
383
+ month11: '11 月',
384
+ month12: '12 月',
385
+ // week: '周次',
386
+ weeks: {
387
+ sun: '日',
388
+ mon: '一',
389
+ tue: '二',
390
+ wed: '三',
391
+ thu: '四',
392
+ fri: '五',
393
+ sat: '六'
394
+ },
395
+ months: {
396
+ jan: '一月',
397
+ feb: '二月',
398
+ mar: '三月',
399
+ apr: '四月',
400
+ may: '五月',
401
+ jun: '六月',
402
+ jul: '七月',
403
+ aug: '八月',
404
+ sep: '九月',
405
+ oct: '十月',
406
+ nov: '十一月',
407
+ dec: '十二月'
408
+ }
409
+ },
410
+ select: {
411
+ loading: '加载中',
412
+ noMatch: '无匹配数据',
413
+ noData: '无数据',
414
+ placeholder: '请选择'
415
+ },
416
+ cascader: {
417
+ noMatch: '无匹配数据',
418
+ loading: '加载中',
419
+ placeholder: '请选择',
420
+ noData: '暂无数据'
421
+ },
422
+ pagination: {
423
+ goto: '前往',
424
+ pagesize: '条/页',
425
+ total: '共 {total} 条',
426
+ pageClassifier: '页'
427
+ },
428
+ messagebox: {
429
+ title: '提示',
430
+ confirm: '确定',
431
+ cancel: '取消',
432
+ error: '输入的数据不合法!'
433
+ },
434
+ upload: {
435
+ deleteTip: '按 delete 键可删除',
436
+ delete: '删除',
437
+ preview: '查看图片',
438
+ continue: '继续上传'
439
+ },
440
+ table: {
441
+ emptyText: '暂无数据',
442
+ confirmFilter: '筛选',
443
+ resetFilter: '重置',
444
+ clearFilter: '全部',
445
+ sumText: '合计'
446
+ },
447
+ tree: {
448
+ emptyText: '暂无数据'
449
+ },
450
+ transfer: {
451
+ noMatch: '无匹配数据',
452
+ noData: '无数据',
453
+ titles: ['列表 1', '列表 2'],
454
+ filterPlaceholder: '请输入搜索内容',
455
+ noCheckedFormat: '共 {total} 项',
456
+ hasCheckedFormat: '已选 {checked}/{total} 项'
457
+ },
458
+ image: {
459
+ error: '加载失败'
460
+ },
461
+ pageHeader: {
462
+ title: '返回'
463
+ },
464
+ popconfirm: {
465
+ confirmButtonText: '确定',
466
+ cancelButtonText: '取消'
467
+ },
468
+ empty: {
469
+ description: '暂无数据'
470
+ }
471
+ }
472
+ });
473
+ // EXTERNAL MODULE: external "vue"
474
+ var external_vue_ = __webpack_require__(0);
475
+ var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
476
+
477
+ // EXTERNAL MODULE: external "deepmerge"
478
+ var external_deepmerge_ = __webpack_require__(15);
479
+ var external_deepmerge_default = /*#__PURE__*/__webpack_require__.n(external_deepmerge_);
480
+
481
+ // EXTERNAL MODULE: ./src/utils/util.js
482
+ var util = __webpack_require__(3);
483
+
484
+ // CONCATENATED MODULE: ./src/locale/format.js
485
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
486
+
487
+
488
+
489
+ var RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
490
+ /**
491
+ * String format template
492
+ * - Inspired:
493
+ * https://github.com/Matt-Esch/string-template/index.js
494
+ */
495
+ /* harmony default export */ var format = (function (Vue) {
496
+ /**
497
+ * template
498
+ *
499
+ * @param {String} string
500
+ * @param {Array} ...args
501
+ * @return {String}
502
+ */
503
+
504
+ function template(string) {
505
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
506
+ args[_key - 1] = arguments[_key];
507
+ }
508
+
509
+ if (args.length === 1 && _typeof(args[0]) === 'object') {
510
+ args = args[0];
511
+ }
512
+
513
+ if (!args || !args.hasOwnProperty) {
514
+ args = {};
515
+ }
516
+
517
+ return string.replace(RE_NARGS, function (match, prefix, i, index) {
518
+ var result = void 0;
519
+
520
+ if (string[index - 1] === '{' && string[index + match.length] === '}') {
521
+ return i;
522
+ } else {
523
+ result = Object(util["j" /* hasOwn */])(args, i) ? args[i] : null;
524
+ if (result === null || result === undefined) {
525
+ return '';
526
+ }
527
+
528
+ return result;
529
+ }
530
+ });
531
+ }
532
+
533
+ return template;
534
+ });
535
+ // CONCATENATED MODULE: ./src/locale/index.js
536
+
537
+
538
+
539
+
540
+
541
+ var locale_format = format(external_vue_default.a);
542
+ var lang = zh_CN;
543
+ var merged = false;
544
+ var locale_i18nHandler = function i18nHandler() {
545
+ var vuei18n = Object.getPrototypeOf(this || external_vue_default.a).$t;
546
+ if (typeof vuei18n === 'function' && !!external_vue_default.a.locale) {
547
+ if (!merged) {
548
+ merged = true;
549
+ external_vue_default.a.locale(external_vue_default.a.config.lang, external_deepmerge_default()(lang, external_vue_default.a.locale(external_vue_default.a.config.lang) || {}, { clone: true }));
550
+ }
551
+ return vuei18n.apply(this, arguments);
552
+ }
553
+ };
554
+
555
+ var t = function t(path, options) {
556
+ var value = locale_i18nHandler.apply(this, arguments);
557
+ if (value !== null && value !== undefined) return value;
558
+
559
+ var array = path.split('.');
560
+ var current = lang;
561
+
562
+ for (var i = 0, j = array.length; i < j; i++) {
563
+ var property = array[i];
564
+ value = current[property];
565
+ if (i === j - 1) return locale_format(value, options);
566
+ if (!value) return '';
567
+ current = value;
568
+ }
569
+ return '';
570
+ };
571
+
572
+ var use = function use(l) {
573
+ lang = l || lang;
574
+ };
575
+
576
+ var i18n = function i18n(fn) {
577
+ locale_i18nHandler = fn || locale_i18nHandler;
578
+ };
579
+
580
+ /* harmony default export */ var locale = ({ use: use, t: t, i18n: i18n });
581
+
582
+ /***/ }),
583
+
584
+ /***/ 15:
585
+ /***/ (function(module, exports) {
586
+
587
+ module.exports = require("deepmerge");
588
+
589
+ /***/ }),
590
+
591
+ /***/ 2:
91
592
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
593
 
93
594
  "use strict";
@@ -192,49 +693,854 @@ function normalizeComponent(
192
693
 
193
694
  /***/ }),
194
695
 
195
- /***/ 15:
196
- /***/ (function(module, exports) {
696
+ /***/ 26:
697
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
197
698
 
198
- module.exports = require("cy-element-ui/lib/checkbox");
699
+ "use strict";
700
+ // ESM COMPAT FLAG
701
+ __webpack_require__.r(__webpack_exports__);
199
702
 
200
- /***/ }),
703
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/checkbox/src/checkbox.vue?vue&type=template&id=7957d3f1
704
+ var render = function render() {
705
+ var _vm = this,
706
+ _c = _vm._self._c
707
+ return _c(
708
+ "label",
709
+ {
710
+ staticClass: "el-checkbox",
711
+ class: [
712
+ _vm.border && _vm.checkboxSize
713
+ ? "el-checkbox--" + _vm.checkboxSize
714
+ : "",
715
+ { "is-disabled": _vm.isDisabled },
716
+ { "is-bordered": _vm.border },
717
+ { "is-checked": _vm.isChecked },
718
+ ],
719
+ attrs: { id: _vm.id },
720
+ },
721
+ [
722
+ _c(
723
+ "span",
724
+ {
725
+ staticClass: "el-checkbox__input",
726
+ class: {
727
+ "is-disabled": _vm.isDisabled,
728
+ "is-checked": _vm.isChecked,
729
+ "is-indeterminate": _vm.indeterminate,
730
+ "is-focus": _vm.focus,
731
+ },
732
+ attrs: {
733
+ tabindex: _vm.indeterminate ? 0 : false,
734
+ role: _vm.indeterminate ? "checkbox" : false,
735
+ "aria-checked": _vm.indeterminate ? "mixed" : false,
736
+ },
737
+ },
738
+ [
739
+ _c("span", { staticClass: "el-checkbox__inner" }),
740
+ _vm.trueLabel || _vm.falseLabel
741
+ ? _c("input", {
742
+ directives: [
743
+ {
744
+ name: "model",
745
+ rawName: "v-model",
746
+ value: _vm.model,
747
+ expression: "model",
748
+ },
749
+ ],
750
+ staticClass: "el-checkbox__original",
751
+ attrs: {
752
+ type: "checkbox",
753
+ "aria-hidden": _vm.indeterminate ? "true" : "false",
754
+ name: _vm.name,
755
+ disabled: _vm.isDisabled,
756
+ "true-value": _vm.trueLabel,
757
+ "false-value": _vm.falseLabel,
758
+ },
759
+ domProps: {
760
+ checked: Array.isArray(_vm.model)
761
+ ? _vm._i(_vm.model, null) > -1
762
+ : _vm._q(_vm.model, _vm.trueLabel),
763
+ },
764
+ on: {
765
+ change: [
766
+ function ($event) {
767
+ var $$a = _vm.model,
768
+ $$el = $event.target,
769
+ $$c = $$el.checked ? _vm.trueLabel : _vm.falseLabel
770
+ if (Array.isArray($$a)) {
771
+ var $$v = null,
772
+ $$i = _vm._i($$a, $$v)
773
+ if ($$el.checked) {
774
+ $$i < 0 && (_vm.model = $$a.concat([$$v]))
775
+ } else {
776
+ $$i > -1 &&
777
+ (_vm.model = $$a
778
+ .slice(0, $$i)
779
+ .concat($$a.slice($$i + 1)))
780
+ }
781
+ } else {
782
+ _vm.model = $$c
783
+ }
784
+ },
785
+ _vm.handleChange,
786
+ ],
787
+ focus: function ($event) {
788
+ _vm.focus = true
789
+ },
790
+ blur: function ($event) {
791
+ _vm.focus = false
792
+ },
793
+ },
794
+ })
795
+ : _c("input", {
796
+ directives: [
797
+ {
798
+ name: "model",
799
+ rawName: "v-model",
800
+ value: _vm.model,
801
+ expression: "model",
802
+ },
803
+ ],
804
+ staticClass: "el-checkbox__original",
805
+ attrs: {
806
+ type: "checkbox",
807
+ "aria-hidden": _vm.indeterminate ? "true" : "false",
808
+ disabled: _vm.isDisabled,
809
+ name: _vm.name,
810
+ },
811
+ domProps: {
812
+ value: _vm.label,
813
+ checked: Array.isArray(_vm.model)
814
+ ? _vm._i(_vm.model, _vm.label) > -1
815
+ : _vm.model,
816
+ },
817
+ on: {
818
+ change: [
819
+ function ($event) {
820
+ var $$a = _vm.model,
821
+ $$el = $event.target,
822
+ $$c = $$el.checked ? true : false
823
+ if (Array.isArray($$a)) {
824
+ var $$v = _vm.label,
825
+ $$i = _vm._i($$a, $$v)
826
+ if ($$el.checked) {
827
+ $$i < 0 && (_vm.model = $$a.concat([$$v]))
828
+ } else {
829
+ $$i > -1 &&
830
+ (_vm.model = $$a
831
+ .slice(0, $$i)
832
+ .concat($$a.slice($$i + 1)))
833
+ }
834
+ } else {
835
+ _vm.model = $$c
836
+ }
837
+ },
838
+ _vm.handleChange,
839
+ ],
840
+ focus: function ($event) {
841
+ _vm.focus = true
842
+ },
843
+ blur: function ($event) {
844
+ _vm.focus = false
845
+ },
846
+ },
847
+ }),
848
+ ]
849
+ ),
850
+ _vm.$slots.default || _vm.label
851
+ ? _c(
852
+ "span",
853
+ { staticClass: "el-checkbox__label" },
854
+ [
855
+ _vm._t("default"),
856
+ !_vm.$slots.default ? [_vm._v(_vm._s(_vm.label))] : _vm._e(),
857
+ ],
858
+ 2
859
+ )
860
+ : _vm._e(),
861
+ ]
862
+ )
863
+ }
864
+ var staticRenderFns = []
865
+ render._withStripped = true
201
866
 
202
- /***/ 2:
203
- /***/ (function(module, exports) {
204
867
 
205
- module.exports = require("cy-element-ui/lib/utils/dom");
868
+ // CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue?vue&type=template&id=7957d3f1
206
869
 
207
- /***/ }),
870
+ // EXTERNAL MODULE: ./src/mixins/emitter.js
871
+ var emitter = __webpack_require__(6);
208
872
 
209
- /***/ 20:
210
- /***/ (function(module, exports) {
873
+ // 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
211
874
 
212
- module.exports = require("cy-element-ui/lib/locale");
213
875
 
214
- /***/ }),
215
876
 
216
- /***/ 28:
217
- /***/ (function(module, exports) {
877
+ /* harmony default export */ var checkboxvue_type_script_lang_js = ({
878
+ name: 'ElCheckbox',
879
+
880
+ mixins: [emitter["a" /* default */]],
881
+
882
+ inject: {
883
+ elForm: {
884
+ default: ''
885
+ },
886
+ elFormItem: {
887
+ default: ''
888
+ }
889
+ },
890
+
891
+ componentName: 'ElCheckbox',
892
+
893
+ data: function data() {
894
+ return {
895
+ selfModel: false,
896
+ focus: false,
897
+ isLimitExceeded: false
898
+ };
899
+ },
900
+
901
+
902
+ computed: {
903
+ model: {
904
+ get: function get() {
905
+ return this.isGroup ? this.store : this.value !== undefined ? this.value : this.selfModel;
906
+ },
907
+ set: function set(val) {
908
+ if (this.isGroup) {
909
+ this.isLimitExceeded = false;
910
+ this._checkboxGroup.min !== undefined && val.length < this._checkboxGroup.min && (this.isLimitExceeded = true);
911
+
912
+ this._checkboxGroup.max !== undefined && val.length > this._checkboxGroup.max && (this.isLimitExceeded = true);
913
+
914
+ this.isLimitExceeded === false && this.dispatch('ElCheckboxGroup', 'input', [val]);
915
+ } else {
916
+ this.$emit('input', val);
917
+ this.selfModel = val;
918
+ }
919
+ }
920
+ },
921
+
922
+ isChecked: function isChecked() {
923
+ if ({}.toString.call(this.model) === '[object Boolean]') {
924
+ return this.model;
925
+ } else if (Array.isArray(this.model)) {
926
+ return this.model.indexOf(this.label) > -1;
927
+ } else if (this.model !== null && this.model !== undefined) {
928
+ return this.model === this.trueLabel;
929
+ }
930
+ },
931
+ isGroup: function isGroup() {
932
+ var parent = this.$parent;
933
+ while (parent) {
934
+ if (parent.$options.componentName !== 'ElCheckboxGroup') {
935
+ parent = parent.$parent;
936
+ } else {
937
+ this._checkboxGroup = parent;
938
+ return true;
939
+ }
940
+ }
941
+ return false;
942
+ },
943
+ store: function store() {
944
+ return this._checkboxGroup ? this._checkboxGroup.value : this.value;
945
+ },
946
+
947
+
948
+ /* used to make the isDisabled judgment under max/min props */
949
+ isLimitDisabled: function isLimitDisabled() {
950
+ var _checkboxGroup = this._checkboxGroup,
951
+ max = _checkboxGroup.max,
952
+ min = _checkboxGroup.min;
953
+
954
+ return !!(max || min) && this.model.length >= max && !this.isChecked || this.model.length <= min && this.isChecked;
955
+ },
956
+ isDisabled: function isDisabled() {
957
+ return this.isGroup ? this._checkboxGroup.disabled || this.disabled || (this.elForm || {}).disabled || this.isLimitDisabled : this.disabled || (this.elForm || {}).disabled;
958
+ },
959
+ _elFormItemSize: function _elFormItemSize() {
960
+ return (this.elFormItem || {}).elFormItemSize;
961
+ },
962
+ checkboxSize: function checkboxSize() {
963
+ var temCheckboxSize = this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
964
+ return this.isGroup ? this._checkboxGroup.checkboxGroupSize || temCheckboxSize : temCheckboxSize;
965
+ }
966
+ },
967
+
968
+ props: {
969
+ value: {},
970
+ label: {},
971
+ indeterminate: Boolean,
972
+ disabled: Boolean,
973
+ checked: Boolean,
974
+ name: String,
975
+ trueLabel: [String, Number],
976
+ falseLabel: [String, Number],
977
+ id: String, /* 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系*/
978
+ controls: String, /* 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系*/
979
+ border: Boolean,
980
+ size: String
981
+ },
982
+
983
+ methods: {
984
+ addToStore: function addToStore() {
985
+ if (Array.isArray(this.model) && this.model.indexOf(this.label) === -1) {
986
+ this.model.push(this.label);
987
+ } else {
988
+ this.model = this.trueLabel || true;
989
+ }
990
+ },
991
+ handleChange: function handleChange(ev) {
992
+ var _this = this;
993
+
994
+ if (this.isLimitExceeded) return;
995
+ var value = void 0;
996
+ if (ev.target.checked) {
997
+ value = this.trueLabel === undefined ? true : this.trueLabel;
998
+ } else {
999
+ value = this.falseLabel === undefined ? false : this.falseLabel;
1000
+ }
1001
+ this.$emit('change', value, ev);
1002
+ this.$nextTick(function () {
1003
+ if (_this.isGroup) {
1004
+ _this.dispatch('ElCheckboxGroup', 'change', [_this._checkboxGroup.value]);
1005
+ }
1006
+ });
1007
+ }
1008
+ },
1009
+
1010
+ created: function created() {
1011
+ this.checked && this.addToStore();
1012
+ },
1013
+ mounted: function mounted() {
1014
+ // 为indeterminate元素 添加aria-controls 属性
1015
+ if (this.indeterminate) {
1016
+ this.$el.setAttribute('aria-controls', this.controls);
1017
+ }
1018
+ },
1019
+
1020
+
1021
+ watch: {
1022
+ value: function value(_value) {
1023
+ this.dispatch('ElFormItem', 'el.form.change', _value);
1024
+ }
1025
+ }
1026
+ });
1027
+ // CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue?vue&type=script&lang=js
1028
+ /* harmony default export */ var src_checkboxvue_type_script_lang_js = (checkboxvue_type_script_lang_js);
1029
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
1030
+ var componentNormalizer = __webpack_require__(2);
1031
+
1032
+ // CONCATENATED MODULE: ./packages/checkbox/src/checkbox.vue
1033
+
1034
+
1035
+
1036
+
1037
+
1038
+ /* normalize component */
1039
+
1040
+ var component = Object(componentNormalizer["a" /* default */])(
1041
+ src_checkboxvue_type_script_lang_js,
1042
+ render,
1043
+ staticRenderFns,
1044
+ false,
1045
+ null,
1046
+ null,
1047
+ null
1048
+
1049
+ )
1050
+
1051
+ /* harmony default export */ var src_checkbox = (component.exports);
1052
+ // CONCATENATED MODULE: ./packages/checkbox/index.js
1053
+
1054
+
1055
+ /* istanbul ignore next */
1056
+ src_checkbox.install = function (Vue) {
1057
+ Vue.component(src_checkbox.name, src_checkbox);
1058
+ };
218
1059
 
219
- module.exports = require("cy-element-ui/lib/transitions/collapse-transition");
1060
+ /* harmony default export */ var packages_checkbox = __webpack_exports__["default"] = (src_checkbox);
220
1061
 
221
1062
  /***/ }),
222
1063
 
223
1064
  /***/ 3:
224
- /***/ (function(module, exports) {
1065
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1066
+
1067
+ "use strict";
1068
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return noop; });
1069
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return hasOwn; });
1070
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return toObject; });
1071
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getValueByPath; });
1072
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getPropByPath; });
1073
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return generateId; });
1074
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return valueEquals; });
1075
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return escapeRegexpString; });
1076
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return arrayFindIndex; });
1077
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return arrayFind; });
1078
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return coerceTruthyValueToArray; });
1079
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return isIE; });
1080
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return isEdge; });
1081
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return isFirefox; });
1082
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return autoprefixer; });
1083
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return kebabCase; });
1084
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return capitalize; });
1085
+ /* unused harmony export looseEqual */
1086
+ /* unused harmony export arrayEquals */
1087
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return isEqual; });
1088
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return isEmpty; });
1089
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return rafThrottle; });
1090
+ /* unused harmony export objToArray */
1091
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return isMac; });
1092
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1093
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
1094
+ /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
1095
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
1096
+
1097
+
1098
+
1099
+
1100
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
1101
+
1102
+ function noop() {};
1103
+
1104
+ function hasOwn(obj, key) {
1105
+ return hasOwnProperty.call(obj, key);
1106
+ };
1107
+
1108
+ function extend(to, _from) {
1109
+ for (var key in _from) {
1110
+ to[key] = _from[key];
1111
+ }
1112
+ return to;
1113
+ };
1114
+
1115
+ function toObject(arr) {
1116
+ var res = {};
1117
+ for (var i = 0; i < arr.length; i++) {
1118
+ if (arr[i]) {
1119
+ extend(res, arr[i]);
1120
+ }
1121
+ }
1122
+ return res;
1123
+ };
1124
+
1125
+ var getValueByPath = function getValueByPath(object, prop) {
1126
+ prop = prop || '';
1127
+ var paths = prop.split('.');
1128
+ var current = object;
1129
+ var result = null;
1130
+ for (var i = 0, j = paths.length; i < j; i++) {
1131
+ var path = paths[i];
1132
+ if (!current) break;
1133
+
1134
+ if (i === j - 1) {
1135
+ result = current[path];
1136
+ break;
1137
+ }
1138
+ current = current[path];
1139
+ }
1140
+ return result;
1141
+ };
1142
+
1143
+ function getPropByPath(obj, path, strict) {
1144
+ var tempObj = obj;
1145
+ path = path.replace(/\[(\w+)\]/g, '.$1');
1146
+ path = path.replace(/^\./, '');
1147
+
1148
+ var keyArr = path.split('.');
1149
+ var i = 0;
1150
+ for (var len = keyArr.length; i < len - 1; ++i) {
1151
+ if (!tempObj && !strict) break;
1152
+ var key = keyArr[i];
1153
+ if (key in tempObj) {
1154
+ tempObj = tempObj[key];
1155
+ } else {
1156
+ if (strict) {
1157
+ throw new Error('please transfer a valid prop path to form item!');
1158
+ }
1159
+ break;
1160
+ }
1161
+ }
1162
+ return {
1163
+ o: tempObj,
1164
+ k: keyArr[i],
1165
+ v: tempObj ? tempObj[keyArr[i]] : null
1166
+ };
1167
+ };
1168
+
1169
+ var generateId = function generateId() {
1170
+ return Math.floor(Math.random() * 10000);
1171
+ };
1172
+
1173
+ var valueEquals = function valueEquals(a, b) {
1174
+ // see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
1175
+ if (a === b) return true;
1176
+ if (!(a instanceof Array)) return false;
1177
+ if (!(b instanceof Array)) return false;
1178
+ if (a.length !== b.length) return false;
1179
+ for (var i = 0; i !== a.length; ++i) {
1180
+ if (a[i] !== b[i]) return false;
1181
+ }
1182
+ return true;
1183
+ };
1184
+
1185
+ var escapeRegexpString = function escapeRegexpString() {
1186
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
1187
+ return String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
1188
+ };
1189
+
1190
+ // TODO: use native Array.find, Array.findIndex when IE support is dropped
1191
+ var arrayFindIndex = function arrayFindIndex(arr, pred) {
1192
+ for (var i = 0; i !== arr.length; ++i) {
1193
+ if (pred(arr[i])) {
1194
+ return i;
1195
+ }
1196
+ }
1197
+ return -1;
1198
+ };
1199
+
1200
+ var arrayFind = function arrayFind(arr, pred) {
1201
+ var idx = arrayFindIndex(arr, pred);
1202
+ return idx !== -1 ? arr[idx] : undefined;
1203
+ };
1204
+
1205
+ // coerce truthy value to array
1206
+ var coerceTruthyValueToArray = function coerceTruthyValueToArray(val) {
1207
+ if (Array.isArray(val)) {
1208
+ return val;
1209
+ } else if (val) {
1210
+ return [val];
1211
+ } else {
1212
+ return [];
1213
+ }
1214
+ };
1215
+
1216
+ var isIE = function isIE() {
1217
+ return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !isNaN(Number(document.documentMode));
1218
+ };
1219
+
1220
+ var isEdge = function isEdge() {
1221
+ return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
1222
+ };
1223
+
1224
+ var isFirefox = function isFirefox() {
1225
+ return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
1226
+ };
1227
+
1228
+ var autoprefixer = function autoprefixer(style) {
1229
+ if ((typeof style === 'undefined' ? 'undefined' : _typeof(style)) !== 'object') return style;
1230
+ var rules = ['transform', 'transition', 'animation'];
1231
+ var prefixes = ['ms-', 'webkit-'];
1232
+ rules.forEach(function (rule) {
1233
+ var value = style[rule];
1234
+ if (rule && value) {
1235
+ prefixes.forEach(function (prefix) {
1236
+ style[prefix + rule] = value;
1237
+ });
1238
+ }
1239
+ });
1240
+ return style;
1241
+ };
1242
+
1243
+ var kebabCase = function kebabCase(str) {
1244
+ var hyphenateRE = /([^-])([A-Z])/g;
1245
+ return str.replace(hyphenateRE, '$1-$2').replace(hyphenateRE, '$1-$2').toLowerCase();
1246
+ };
1247
+
1248
+ var capitalize = function capitalize(str) {
1249
+ if (!Object(_types__WEBPACK_IMPORTED_MODULE_1__[/* isString */ "e"])(str)) return str;
1250
+ return str.charAt(0).toUpperCase() + str.slice(1);
1251
+ };
225
1252
 
226
- module.exports = require("cy-element-ui/lib/utils/util");
1253
+ var looseEqual = function looseEqual(a, b) {
1254
+ var isObjectA = Object(_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(a);
1255
+ var isObjectB = Object(_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(b);
1256
+ if (isObjectA && isObjectB) {
1257
+ return JSON.stringify(a) === JSON.stringify(b);
1258
+ } else if (!isObjectA && !isObjectB) {
1259
+ return String(a) === String(b);
1260
+ } else {
1261
+ return false;
1262
+ }
1263
+ };
1264
+
1265
+ var arrayEquals = function arrayEquals(arrayA, arrayB) {
1266
+ arrayA = arrayA || [];
1267
+ arrayB = arrayB || [];
1268
+
1269
+ if (arrayA.length !== arrayB.length) {
1270
+ return false;
1271
+ }
1272
+
1273
+ for (var i = 0; i < arrayA.length; i++) {
1274
+ if (!looseEqual(arrayA[i], arrayB[i])) {
1275
+ return false;
1276
+ }
1277
+ }
1278
+
1279
+ return true;
1280
+ };
1281
+
1282
+ var isEqual = function isEqual(value1, value2) {
1283
+ if (Array.isArray(value1) && Array.isArray(value2)) {
1284
+ return arrayEquals(value1, value2);
1285
+ }
1286
+ return looseEqual(value1, value2);
1287
+ };
1288
+
1289
+ var isEmpty = function isEmpty(val) {
1290
+ // null or undefined
1291
+ if (val == null) return true;
1292
+
1293
+ if (typeof val === 'boolean') return false;
1294
+
1295
+ if (typeof val === 'number') return !val;
1296
+
1297
+ if (val instanceof Error) return val.message === '';
1298
+
1299
+ switch (Object.prototype.toString.call(val)) {
1300
+ // String or Array
1301
+ case '[object String]':
1302
+ case '[object Array]':
1303
+ return !val.length;
1304
+
1305
+ // Map or Set or File
1306
+ case '[object File]':
1307
+ case '[object Map]':
1308
+ case '[object Set]':
1309
+ {
1310
+ return !val.size;
1311
+ }
1312
+ // Plain Object
1313
+ case '[object Object]':
1314
+ {
1315
+ return !Object.keys(val).length;
1316
+ }
1317
+ }
1318
+
1319
+ return false;
1320
+ };
1321
+
1322
+ function rafThrottle(fn) {
1323
+ var locked = false;
1324
+ return function () {
1325
+ var _this = this;
1326
+
1327
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
1328
+ args[_key] = arguments[_key];
1329
+ }
1330
+
1331
+ if (locked) return;
1332
+ locked = true;
1333
+ window.requestAnimationFrame(function (_) {
1334
+ fn.apply(_this, args);
1335
+ locked = false;
1336
+ });
1337
+ };
1338
+ }
1339
+
1340
+ function objToArray(obj) {
1341
+ if (Array.isArray(obj)) {
1342
+ return obj;
1343
+ }
1344
+ return isEmpty(obj) ? [] : [obj];
1345
+ }
1346
+
1347
+ var isMac = function isMac() {
1348
+ return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
1349
+ };
227
1350
 
228
1351
  /***/ }),
229
1352
 
230
1353
  /***/ 4:
231
- /***/ (function(module, exports) {
1354
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1355
+
1356
+ "use strict";
1357
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isString; });
1358
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isObject; });
1359
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isHtmlElement; });
1360
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isFunction; });
1361
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isUndefined; });
1362
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isDefined; });
1363
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1364
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
1365
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
1366
+
1367
+
1368
+
1369
+ function isString(obj) {
1370
+ return Object.prototype.toString.call(obj) === '[object String]';
1371
+ }
1372
+
1373
+ function isObject(obj) {
1374
+ return Object.prototype.toString.call(obj) === '[object Object]';
1375
+ }
1376
+
1377
+ function isHtmlElement(node) {
1378
+ return node && node.nodeType === Node.ELEMENT_NODE;
1379
+ }
1380
+
1381
+ /**
1382
+ * - Inspired:
1383
+ * https://github.com/jashkenas/underscore/blob/master/modules/isFunction.js
1384
+ */
1385
+ var isFunction = function isFunction(functionToCheck) {
1386
+ var getType = {};
1387
+ return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
1388
+ };
1389
+
1390
+ if ( true && (typeof Int8Array === 'undefined' ? 'undefined' : _typeof(Int8Array)) !== 'object' && (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer || typeof document.childNodes !== 'function')) {
1391
+ isFunction = function isFunction(obj) {
1392
+ return typeof obj === 'function' || false;
1393
+ };
1394
+ }
1395
+
1396
+
1397
+
1398
+ var isUndefined = function isUndefined(val) {
1399
+ return val === void 0;
1400
+ };
1401
+
1402
+ var isDefined = function isDefined(val) {
1403
+ return val !== undefined && val !== null;
1404
+ };
1405
+
1406
+ /***/ }),
1407
+
1408
+ /***/ 40:
1409
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1410
+
1411
+ "use strict";
1412
+ /* harmony import */ var _utils_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
1413
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1414
+
1415
+
1416
+
1417
+ var Transition = function () {
1418
+ function Transition() {
1419
+ _classCallCheck(this, Transition);
1420
+ }
1421
+
1422
+ Transition.prototype.beforeEnter = function beforeEnter(el) {
1423
+ Object(_utils_dom__WEBPACK_IMPORTED_MODULE_0__[/* addClass */ "a"])(el, 'collapse-transition');
1424
+ if (!el.dataset) el.dataset = {};
1425
+
1426
+ el.dataset.oldPaddingTop = el.style.paddingTop;
1427
+ el.dataset.oldPaddingBottom = el.style.paddingBottom;
1428
+
1429
+ el.style.height = '0';
1430
+ el.style.paddingTop = 0;
1431
+ el.style.paddingBottom = 0;
1432
+ };
1433
+
1434
+ Transition.prototype.enter = function enter(el) {
1435
+ el.dataset.oldOverflow = el.style.overflow;
1436
+ if (el.scrollHeight !== 0) {
1437
+ el.style.height = el.scrollHeight + 'px';
1438
+ el.style.paddingTop = el.dataset.oldPaddingTop;
1439
+ el.style.paddingBottom = el.dataset.oldPaddingBottom;
1440
+ } else {
1441
+ el.style.height = '';
1442
+ el.style.paddingTop = el.dataset.oldPaddingTop;
1443
+ el.style.paddingBottom = el.dataset.oldPaddingBottom;
1444
+ }
1445
+
1446
+ el.style.overflow = 'hidden';
1447
+ };
1448
+
1449
+ Transition.prototype.afterEnter = function afterEnter(el) {
1450
+ // for safari: remove class then reset height is necessary
1451
+ Object(_utils_dom__WEBPACK_IMPORTED_MODULE_0__[/* removeClass */ "i"])(el, 'collapse-transition');
1452
+ el.style.height = '';
1453
+ el.style.overflow = el.dataset.oldOverflow;
1454
+ };
1455
+
1456
+ Transition.prototype.beforeLeave = function beforeLeave(el) {
1457
+ if (!el.dataset) el.dataset = {};
1458
+ el.dataset.oldPaddingTop = el.style.paddingTop;
1459
+ el.dataset.oldPaddingBottom = el.style.paddingBottom;
1460
+ el.dataset.oldOverflow = el.style.overflow;
1461
+
1462
+ el.style.height = el.scrollHeight + 'px';
1463
+ el.style.overflow = 'hidden';
1464
+ };
1465
+
1466
+ Transition.prototype.leave = function leave(el) {
1467
+ if (el.scrollHeight !== 0) {
1468
+ // for safari: add class after set height, or it will jump to zero height suddenly, weired
1469
+ Object(_utils_dom__WEBPACK_IMPORTED_MODULE_0__[/* addClass */ "a"])(el, 'collapse-transition');
1470
+ el.style.height = 0;
1471
+ el.style.paddingTop = 0;
1472
+ el.style.paddingBottom = 0;
1473
+ }
1474
+ };
1475
+
1476
+ Transition.prototype.afterLeave = function afterLeave(el) {
1477
+ Object(_utils_dom__WEBPACK_IMPORTED_MODULE_0__[/* removeClass */ "i"])(el, 'collapse-transition');
1478
+ el.style.height = '';
1479
+ el.style.overflow = el.dataset.oldOverflow;
1480
+ el.style.paddingTop = el.dataset.oldPaddingTop;
1481
+ el.style.paddingBottom = el.dataset.oldPaddingBottom;
1482
+ };
1483
+
1484
+ return Transition;
1485
+ }();
1486
+
1487
+ /* harmony default export */ __webpack_exports__["a"] = ({
1488
+ name: 'ElCollapseTransition',
1489
+ functional: true,
1490
+ render: function render(h, _ref) {
1491
+ var children = _ref.children;
1492
+
1493
+ var data = {
1494
+ on: new Transition()
1495
+ };
232
1496
 
233
- module.exports = require("cy-element-ui/lib/mixins/emitter");
1497
+ return h('transition', data, children);
1498
+ }
1499
+ });
1500
+
1501
+ /***/ }),
1502
+
1503
+ /***/ 6:
1504
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1505
+
1506
+ "use strict";
1507
+ function _broadcast(componentName, eventName, params) {
1508
+ this.$children.forEach(function (child) {
1509
+ var name = child.$options.componentName;
1510
+
1511
+ if (name === componentName) {
1512
+ child.$emit.apply(child, [eventName].concat(params));
1513
+ } else {
1514
+ _broadcast.apply(child, [componentName, eventName].concat([params]));
1515
+ }
1516
+ });
1517
+ }
1518
+ /* harmony default export */ __webpack_exports__["a"] = ({
1519
+ methods: {
1520
+ dispatch: function dispatch(componentName, eventName, params) {
1521
+ var parent = this.$parent || this.$root;
1522
+ var name = parent.$options.componentName;
1523
+
1524
+ while (parent && (!name || name !== componentName)) {
1525
+ parent = parent.$parent;
1526
+
1527
+ if (parent) {
1528
+ name = parent.$options.componentName;
1529
+ }
1530
+ }
1531
+ if (parent) {
1532
+ parent.$emit.apply(parent, [eventName].concat(params));
1533
+ }
1534
+ },
1535
+ broadcast: function broadcast(componentName, eventName, params) {
1536
+ _broadcast.call(this, componentName, eventName, params);
1537
+ }
1538
+ }
1539
+ });
234
1540
 
235
1541
  /***/ }),
236
1542
 
237
- /***/ 63:
1543
+ /***/ 65:
238
1544
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
239
1545
 
240
1546
  "use strict";
@@ -300,9 +1606,8 @@ render._withStripped = true
300
1606
 
301
1607
  // CONCATENATED MODULE: ./packages/tree/src/tree.vue?vue&type=template&id=1b06c301
302
1608
 
303
- // EXTERNAL MODULE: external "cy-element-ui/lib/utils/merge"
304
- var merge_ = __webpack_require__(9);
305
- var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
1609
+ // EXTERNAL MODULE: ./src/utils/merge.js
1610
+ var merge = __webpack_require__(7);
306
1611
 
307
1612
  // CONCATENATED MODULE: ./packages/tree/src/model/util.js
308
1613
  var NODE_KEY = '$treeNodeId';
@@ -332,8 +1637,8 @@ var findNearestComponent = function findNearestComponent(element, componentName)
332
1637
  }
333
1638
  return null;
334
1639
  };
335
- // EXTERNAL MODULE: external "cy-element-ui/lib/utils/util"
336
- var util_ = __webpack_require__(3);
1640
+ // EXTERNAL MODULE: ./src/utils/util.js
1641
+ var util = __webpack_require__(3);
337
1642
 
338
1643
  // CONCATENATED MODULE: ./packages/tree/src/model/node.js
339
1644
  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; }; }();
@@ -543,7 +1848,7 @@ var node_Node = function () {
543
1848
  }
544
1849
  }
545
1850
  }
546
- merge_default()(child, {
1851
+ Object(merge["a" /* default */])(child, {
547
1852
  parent: this,
548
1853
  store: this.store
549
1854
  });
@@ -648,7 +1953,7 @@ var node_Node = function () {
648
1953
  var defaultProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
649
1954
 
650
1955
  array.forEach(function (item) {
651
- _this2.insertChild(merge_default()({ data: item }, defaultProps), undefined, true);
1956
+ _this2.insertChild(Object(merge["a" /* default */])({ data: item }, defaultProps), undefined, true);
652
1957
  });
653
1958
  };
654
1959
 
@@ -771,7 +2076,7 @@ var node_Node = function () {
771
2076
 
772
2077
  newData.forEach(function (item, index) {
773
2078
  var key = item[NODE_KEY];
774
- var isNodeExists = !!key && Object(util_["arrayFindIndex"])(oldData, function (data) {
2079
+ var isNodeExists = !!key && Object(util["b" /* arrayFindIndex */])(oldData, function (data) {
775
2080
  return data[NODE_KEY] === key;
776
2081
  }) >= 0;
777
2082
  if (isNodeExists) {
@@ -1414,17 +2719,14 @@ tree_nodevue_type_template_id_0abb88b8_render._withStripped = true
1414
2719
 
1415
2720
  // CONCATENATED MODULE: ./packages/tree/src/tree-node.vue?vue&type=template&id=0abb88b8
1416
2721
 
1417
- // EXTERNAL MODULE: external "cy-element-ui/lib/transitions/collapse-transition"
1418
- var collapse_transition_ = __webpack_require__(28);
1419
- var collapse_transition_default = /*#__PURE__*/__webpack_require__.n(collapse_transition_);
2722
+ // EXTERNAL MODULE: ./src/transitions/collapse-transition.js
2723
+ var collapse_transition = __webpack_require__(40);
1420
2724
 
1421
- // EXTERNAL MODULE: external "cy-element-ui/lib/checkbox"
1422
- var checkbox_ = __webpack_require__(15);
1423
- var checkbox_default = /*#__PURE__*/__webpack_require__.n(checkbox_);
2725
+ // EXTERNAL MODULE: ./packages/checkbox/index.js + 5 modules
2726
+ var packages_checkbox = __webpack_require__(26);
1424
2727
 
1425
- // EXTERNAL MODULE: external "cy-element-ui/lib/mixins/emitter"
1426
- var emitter_ = __webpack_require__(4);
1427
- var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
2728
+ // EXTERNAL MODULE: ./src/mixins/emitter.js
2729
+ var emitter = __webpack_require__(6);
1428
2730
 
1429
2731
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/tree-node.vue?vue&type=script&lang=js
1430
2732
 
@@ -1438,7 +2740,7 @@ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
1438
2740
 
1439
2741
  componentName: 'ElTreeNode',
1440
2742
 
1441
- mixins: [emitter_default.a],
2743
+ mixins: [emitter["a" /* default */]],
1442
2744
 
1443
2745
  props: {
1444
2746
  node: {
@@ -1459,8 +2761,8 @@ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
1459
2761
  },
1460
2762
 
1461
2763
  components: {
1462
- ElCollapseTransition: collapse_transition_default.a,
1463
- ElCheckbox: checkbox_default.a,
2764
+ ElCollapseTransition: collapse_transition["a" /* default */],
2765
+ ElCheckbox: packages_checkbox["default"],
1464
2766
  NodeContent: {
1465
2767
  props: {
1466
2768
  node: {
@@ -1632,7 +2934,7 @@ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
1632
2934
  // CONCATENATED MODULE: ./packages/tree/src/tree-node.vue?vue&type=script&lang=js
1633
2935
  /* harmony default export */ var src_tree_nodevue_type_script_lang_js = (tree_nodevue_type_script_lang_js);
1634
2936
  // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
1635
- var componentNormalizer = __webpack_require__(0);
2937
+ var componentNormalizer = __webpack_require__(2);
1636
2938
 
1637
2939
  // CONCATENATED MODULE: ./packages/tree/src/tree-node.vue
1638
2940
 
@@ -1654,11 +2956,11 @@ var component = Object(componentNormalizer["a" /* default */])(
1654
2956
  )
1655
2957
 
1656
2958
  /* harmony default export */ var tree_node = (component.exports);
1657
- // EXTERNAL MODULE: external "cy-element-ui/lib/locale"
1658
- var locale_ = __webpack_require__(20);
2959
+ // EXTERNAL MODULE: ./src/locale/index.js + 2 modules
2960
+ var locale = __webpack_require__(11);
1659
2961
 
1660
- // EXTERNAL MODULE: external "cy-element-ui/lib/utils/dom"
1661
- var dom_ = __webpack_require__(2);
2962
+ // EXTERNAL MODULE: ./src/utils/dom.js
2963
+ var dom = __webpack_require__(1);
1662
2964
 
1663
2965
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/tree/src/tree.vue?vue&type=script&lang=js
1664
2966
 
@@ -1672,7 +2974,7 @@ var dom_ = __webpack_require__(2);
1672
2974
  /* harmony default export */ var treevue_type_script_lang_js = ({
1673
2975
  name: 'ElTree',
1674
2976
 
1675
- mixins: [emitter_default.a],
2977
+ mixins: [emitter["a" /* default */]],
1676
2978
 
1677
2979
  components: {
1678
2980
  ElTreeNode: tree_node
@@ -1702,7 +3004,7 @@ var dom_ = __webpack_require__(2);
1702
3004
  emptyText: {
1703
3005
  type: String,
1704
3006
  default: function _default() {
1705
- return Object(locale_["t"])('el.tree.emptyText');
3007
+ return Object(locale["a" /* t */])('el.tree.emptyText');
1706
3008
  }
1707
3009
  },
1708
3010
  renderAfterExpand: {
@@ -1977,7 +3279,7 @@ var dom_ = __webpack_require__(2);
1977
3279
  var dropNode = findNearestComponent(event.target, 'ElTreeNode');
1978
3280
  var oldDropNode = dragState.dropNode;
1979
3281
  if (oldDropNode && oldDropNode !== dropNode) {
1980
- Object(dom_["removeClass"])(oldDropNode.$el, 'is-drop-inner');
3282
+ Object(dom["i" /* removeClass */])(oldDropNode.$el, 'is-drop-inner');
1981
3283
  }
1982
3284
  var draggingNode = dragState.draggingNode;
1983
3285
  if (!draggingNode || !dropNode) return;
@@ -2048,9 +3350,9 @@ var dom_ = __webpack_require__(2);
2048
3350
  dropIndicator.style.left = iconPosition.right - treePosition.left + 'px';
2049
3351
 
2050
3352
  if (dropType === 'inner') {
2051
- Object(dom_["addClass"])(dropNode.$el, 'is-drop-inner');
3353
+ Object(dom["a" /* addClass */])(dropNode.$el, 'is-drop-inner');
2052
3354
  } else {
2053
- Object(dom_["removeClass"])(dropNode.$el, 'is-drop-inner');
3355
+ Object(dom["i" /* removeClass */])(dropNode.$el, 'is-drop-inner');
2054
3356
  }
2055
3357
 
2056
3358
  dragState.showDropIndicator = dropType === 'before' || dropType === 'after';
@@ -2083,7 +3385,7 @@ var dom_ = __webpack_require__(2);
2083
3385
  _this.store.registerNode(draggingNodeCopy);
2084
3386
  }
2085
3387
 
2086
- Object(dom_["removeClass"])(dropNode.$el, 'is-drop-inner');
3388
+ Object(dom["i" /* removeClass */])(dropNode.$el, 'is-drop-inner');
2087
3389
 
2088
3390
  _this.$emit('node-drag-end', draggingNode.node, dropNode.node, dropType, event);
2089
3391
  if (dropType !== 'none') {
@@ -2143,10 +3445,25 @@ tree.install = function (Vue) {
2143
3445
 
2144
3446
  /***/ }),
2145
3447
 
2146
- /***/ 9:
2147
- /***/ (function(module, exports) {
3448
+ /***/ 7:
3449
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3450
+
3451
+ "use strict";
3452
+ /* harmony default export */ __webpack_exports__["a"] = (function (target) {
3453
+ for (var i = 1, j = arguments.length; i < j; i++) {
3454
+ var source = arguments[i] || {};
3455
+ for (var prop in source) {
3456
+ if (source.hasOwnProperty(prop)) {
3457
+ var value = source[prop];
3458
+ if (value !== undefined) {
3459
+ target[prop] = value;
3460
+ }
3461
+ }
3462
+ }
3463
+ }
2148
3464
 
2149
- module.exports = require("cy-element-ui/lib/utils/merge");
3465
+ return target;
3466
+ });;
2150
3467
 
2151
3468
  /***/ })
2152
3469