cy-element-ui 1.0.72 → 1.0.74

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 (112) 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 +26236 -13298
  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 +420 -30
  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/packages/form/src/form-item.vue +3 -3
  112. package/src/index.js +1 -1
package/lib/loading.js CHANGED
@@ -82,12 +82,261 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 77);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 74);
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
+ /***/ 2:
91
340
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
341
 
93
342
  "use strict";
@@ -190,37 +439,31 @@ function normalizeComponent(
190
439
  }
191
440
 
192
441
 
193
- /***/ }),
194
-
195
- /***/ 14:
196
- /***/ (function(module, exports) {
197
-
198
- module.exports = require("cy-element-ui/lib/utils/popup");
199
-
200
- /***/ }),
201
-
202
- /***/ 2:
203
- /***/ (function(module, exports) {
204
-
205
- module.exports = require("cy-element-ui/lib/utils/dom");
206
-
207
- /***/ }),
208
-
209
- /***/ 43:
210
- /***/ (function(module, exports) {
211
-
212
- module.exports = require("cy-element-ui/lib/utils/after-leave");
213
-
214
442
  /***/ }),
215
443
 
216
444
  /***/ 7:
217
- /***/ (function(module, exports) {
445
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
218
446
 
219
- module.exports = require("vue");
447
+ "use strict";
448
+ /* harmony default export */ __webpack_exports__["a"] = (function (target) {
449
+ for (var i = 1, j = arguments.length; i < j; i++) {
450
+ var source = arguments[i] || {};
451
+ for (var prop in source) {
452
+ if (source.hasOwnProperty(prop)) {
453
+ var value = source[prop];
454
+ if (value !== undefined) {
455
+ target[prop] = value;
456
+ }
457
+ }
458
+ }
459
+ }
460
+
461
+ return target;
462
+ });;
220
463
 
221
464
  /***/ }),
222
465
 
223
- /***/ 77:
466
+ /***/ 74:
224
467
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
225
468
 
226
469
  "use strict";
@@ -228,7 +471,7 @@ module.exports = require("vue");
228
471
  __webpack_require__.r(__webpack_exports__);
229
472
 
230
473
  // EXTERNAL MODULE: external "vue"
231
- var external_vue_ = __webpack_require__(7);
474
+ var external_vue_ = __webpack_require__(0);
232
475
  var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
233
476
 
234
477
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/loading/src/loading.vue?vue&type=template&id=897d5e8e
@@ -318,7 +561,7 @@ render._withStripped = true
318
561
  // CONCATENATED MODULE: ./packages/loading/src/loading.vue?vue&type=script&lang=js
319
562
  /* harmony default export */ var src_loadingvue_type_script_lang_js = (loadingvue_type_script_lang_js);
320
563
  // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
321
- var componentNormalizer = __webpack_require__(0);
564
+ var componentNormalizer = __webpack_require__(2);
322
565
 
323
566
  // CONCATENATED MODULE: ./packages/loading/src/loading.vue
324
567
 
@@ -340,16 +583,43 @@ var component = Object(componentNormalizer["a" /* default */])(
340
583
  )
341
584
 
342
585
  /* harmony default export */ var loading = (component.exports);
343
- // EXTERNAL MODULE: external "cy-element-ui/lib/utils/dom"
344
- var dom_ = __webpack_require__(2);
345
-
346
- // EXTERNAL MODULE: external "cy-element-ui/lib/utils/popup"
347
- var popup_ = __webpack_require__(14);
348
-
349
- // EXTERNAL MODULE: external "cy-element-ui/lib/utils/after-leave"
350
- var after_leave_ = __webpack_require__(43);
351
- var after_leave_default = /*#__PURE__*/__webpack_require__.n(after_leave_);
352
-
586
+ // EXTERNAL MODULE: ./src/utils/dom.js
587
+ var dom = __webpack_require__(1);
588
+
589
+ // EXTERNAL MODULE: ./src/utils/popup/index.js + 1 modules
590
+ var popup = __webpack_require__(9);
591
+
592
+ // CONCATENATED MODULE: ./src/utils/after-leave.js
593
+ /**
594
+ * Bind after-leave event for vue instance. Make sure after-leave is called in any browsers.
595
+ *
596
+ * @param {Vue} instance Vue instance.
597
+ * @param {Function} callback callback of after-leave event
598
+ * @param {Number} speed the speed of transition, default value is 300ms
599
+ * @param {Boolean} once weather bind after-leave once. default value is false.
600
+ */
601
+ /* harmony default export */ var after_leave = (function (instance, callback) {
602
+ var speed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 300;
603
+ var once = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
604
+
605
+ if (!instance || !callback) throw new Error('instance & callback is required');
606
+ var called = false;
607
+ var afterLeaveCallback = function afterLeaveCallback() {
608
+ if (called) return;
609
+ called = true;
610
+ if (callback) {
611
+ callback.apply(null, arguments);
612
+ }
613
+ };
614
+ if (once) {
615
+ instance.$once('after-leave', afterLeaveCallback);
616
+ } else {
617
+ instance.$on('after-leave', afterLeaveCallback);
618
+ }
619
+ setTimeout(function () {
620
+ afterLeaveCallback();
621
+ }, speed + 100);
622
+ });;
353
623
  // CONCATENATED MODULE: ./packages/loading/src/directive.js
354
624
 
355
625
 
@@ -365,21 +635,21 @@ loadingDirective.install = function (Vue) {
365
635
  if (binding.value) {
366
636
  Vue.nextTick(function () {
367
637
  if (binding.modifiers.fullscreen) {
368
- el.originalPosition = Object(dom_["getStyle"])(document.body, 'position');
369
- el.originalOverflow = Object(dom_["getStyle"])(document.body, 'overflow');
370
- el.maskStyle.zIndex = popup_["PopupManager"].nextZIndex();
638
+ el.originalPosition = Object(dom["c" /* getStyle */])(document.body, 'position');
639
+ el.originalOverflow = Object(dom["c" /* getStyle */])(document.body, 'overflow');
640
+ el.maskStyle.zIndex = popup["a" /* PopupManager */].nextZIndex();
371
641
 
372
- Object(dom_["addClass"])(el.mask, 'is-fullscreen');
642
+ Object(dom["a" /* addClass */])(el.mask, 'is-fullscreen');
373
643
  insertDom(document.body, el, binding);
374
644
  } else {
375
- Object(dom_["removeClass"])(el.mask, 'is-fullscreen');
645
+ Object(dom["i" /* removeClass */])(el.mask, 'is-fullscreen');
376
646
 
377
647
  if (binding.modifiers.body) {
378
- el.originalPosition = Object(dom_["getStyle"])(document.body, 'position');
648
+ el.originalPosition = Object(dom["c" /* getStyle */])(document.body, 'position');
379
649
 
380
650
  ['top', 'left'].forEach(function (property) {
381
651
  var scroll = property === 'top' ? 'scrollTop' : 'scrollLeft';
382
- el.maskStyle[property] = el.getBoundingClientRect()[property] + document.body[scroll] + document.documentElement[scroll] - parseInt(Object(dom_["getStyle"])(document.body, 'margin-' + property), 10) + 'px';
652
+ el.maskStyle[property] = el.getBoundingClientRect()[property] + document.body[scroll] + document.documentElement[scroll] - parseInt(Object(dom["c" /* getStyle */])(document.body, 'margin-' + property), 10) + 'px';
383
653
  });
384
654
  ['height', 'width'].forEach(function (property) {
385
655
  el.maskStyle[property] = el.getBoundingClientRect()[property] + 'px';
@@ -387,18 +657,18 @@ loadingDirective.install = function (Vue) {
387
657
 
388
658
  insertDom(document.body, el, binding);
389
659
  } else {
390
- el.originalPosition = Object(dom_["getStyle"])(el, 'position');
660
+ el.originalPosition = Object(dom["c" /* getStyle */])(el, 'position');
391
661
  insertDom(el, el, binding);
392
662
  }
393
663
  }
394
664
  });
395
665
  } else {
396
- after_leave_default()(el.instance, function (_) {
666
+ after_leave(el.instance, function (_) {
397
667
  if (!el.instance.hiding) return;
398
668
  el.domVisible = false;
399
669
  var target = binding.modifiers.fullscreen || binding.modifiers.body ? document.body : el;
400
- Object(dom_["removeClass"])(target, 'el-loading-parent--relative');
401
- Object(dom_["removeClass"])(target, 'el-loading-parent--hidden');
670
+ Object(dom["i" /* removeClass */])(target, 'el-loading-parent--relative');
671
+ Object(dom["i" /* removeClass */])(target, 'el-loading-parent--hidden');
402
672
  el.instance.hiding = false;
403
673
  }, 300, true);
404
674
  el.instance.visible = false;
@@ -406,16 +676,16 @@ loadingDirective.install = function (Vue) {
406
676
  }
407
677
  };
408
678
  var insertDom = function insertDom(parent, el, binding) {
409
- if (!el.domVisible && Object(dom_["getStyle"])(el, 'display') !== 'none' && Object(dom_["getStyle"])(el, 'visibility') !== 'hidden') {
679
+ if (!el.domVisible && Object(dom["c" /* getStyle */])(el, 'display') !== 'none' && Object(dom["c" /* getStyle */])(el, 'visibility') !== 'hidden') {
410
680
  Object.keys(el.maskStyle).forEach(function (property) {
411
681
  el.mask.style[property] = el.maskStyle[property];
412
682
  });
413
683
 
414
684
  if (el.originalPosition !== 'absolute' && el.originalPosition !== 'fixed' && el.originalPosition !== 'sticky') {
415
- Object(dom_["addClass"])(parent, 'el-loading-parent--relative');
685
+ Object(dom["a" /* addClass */])(parent, 'el-loading-parent--relative');
416
686
  }
417
687
  if (binding.modifiers.fullscreen && binding.modifiers.lock) {
418
- Object(dom_["addClass"])(parent, 'el-loading-parent--hidden');
688
+ Object(dom["a" /* addClass */])(parent, 'el-loading-parent--hidden');
419
689
  }
420
690
  el.domVisible = true;
421
691
 
@@ -476,9 +746,8 @@ loadingDirective.install = function (Vue) {
476
746
  };
477
747
 
478
748
  /* harmony default export */ var directive = (loadingDirective);
479
- // EXTERNAL MODULE: external "cy-element-ui/lib/utils/merge"
480
- var merge_ = __webpack_require__(9);
481
- var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
749
+ // EXTERNAL MODULE: ./src/utils/merge.js
750
+ var merge = __webpack_require__(7);
482
751
 
483
752
  // CONCATENATED MODULE: ./packages/loading/src/index.js
484
753
 
@@ -509,10 +778,10 @@ LoadingConstructor.prototype.close = function () {
509
778
  if (this.fullscreen) {
510
779
  fullscreenLoading = undefined;
511
780
  }
512
- after_leave_default()(this, function (_) {
781
+ after_leave(this, function (_) {
513
782
  var target = _this.fullscreen || _this.body ? document.body : _this.target;
514
- Object(dom_["removeClass"])(target, 'el-loading-parent--relative');
515
- Object(dom_["removeClass"])(target, 'el-loading-parent--hidden');
783
+ Object(dom["i" /* removeClass */])(target, 'el-loading-parent--relative');
784
+ Object(dom["i" /* removeClass */])(target, 'el-loading-parent--hidden');
516
785
  if (_this.$el && _this.$el.parentNode) {
517
786
  _this.$el.parentNode.removeChild(_this.$el);
518
787
  }
@@ -524,11 +793,11 @@ LoadingConstructor.prototype.close = function () {
524
793
  var src_addStyle = function addStyle(options, parent, instance) {
525
794
  var maskStyle = {};
526
795
  if (options.fullscreen) {
527
- instance.originalPosition = Object(dom_["getStyle"])(document.body, 'position');
528
- instance.originalOverflow = Object(dom_["getStyle"])(document.body, 'overflow');
529
- maskStyle.zIndex = popup_["PopupManager"].nextZIndex();
796
+ instance.originalPosition = Object(dom["c" /* getStyle */])(document.body, 'position');
797
+ instance.originalOverflow = Object(dom["c" /* getStyle */])(document.body, 'overflow');
798
+ maskStyle.zIndex = popup["a" /* PopupManager */].nextZIndex();
530
799
  } else if (options.body) {
531
- instance.originalPosition = Object(dom_["getStyle"])(document.body, 'position');
800
+ instance.originalPosition = Object(dom["c" /* getStyle */])(document.body, 'position');
532
801
  ['top', 'left'].forEach(function (property) {
533
802
  var scroll = property === 'top' ? 'scrollTop' : 'scrollLeft';
534
803
  maskStyle[property] = options.target.getBoundingClientRect()[property] + document.body[scroll] + document.documentElement[scroll] + 'px';
@@ -537,7 +806,7 @@ var src_addStyle = function addStyle(options, parent, instance) {
537
806
  maskStyle[property] = options.target.getBoundingClientRect()[property] + 'px';
538
807
  });
539
808
  } else {
540
- instance.originalPosition = Object(dom_["getStyle"])(parent, 'position');
809
+ instance.originalPosition = Object(dom["c" /* getStyle */])(parent, 'position');
541
810
  }
542
811
  Object.keys(maskStyle).forEach(function (property) {
543
812
  instance.$el.style[property] = maskStyle[property];
@@ -548,7 +817,7 @@ var src_Loading = function Loading() {
548
817
  var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
549
818
 
550
819
  if (external_vue_default.a.prototype.$isServer) return;
551
- options = merge_default()({}, defaults, options);
820
+ options = Object(merge["a" /* default */])({}, defaults, options);
552
821
  if (typeof options.target === 'string') {
553
822
  options.target = document.querySelector(options.target);
554
823
  }
@@ -570,10 +839,10 @@ var src_Loading = function Loading() {
570
839
 
571
840
  src_addStyle(options, parent, instance);
572
841
  if (instance.originalPosition !== 'absolute' && instance.originalPosition !== 'fixed' && instance.originalPosition !== 'sticky') {
573
- Object(dom_["addClass"])(parent, 'el-loading-parent--relative');
842
+ Object(dom["a" /* addClass */])(parent, 'el-loading-parent--relative');
574
843
  }
575
844
  if (options.fullscreen && options.lock) {
576
- Object(dom_["addClass"])(parent, 'el-loading-parent--hidden');
845
+ Object(dom["a" /* addClass */])(parent, 'el-loading-parent--hidden');
577
846
  }
578
847
  parent.appendChild(instance.$el);
579
848
  external_vue_default.a.nextTick(function () {
@@ -602,10 +871,478 @@ var src_Loading = function Loading() {
602
871
 
603
872
  /***/ }),
604
873
 
874
+ /***/ 8:
875
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
876
+
877
+ "use strict";
878
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
879
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
880
+
881
+
882
+ var scrollBarWidth = void 0;
883
+
884
+ /* harmony default export */ __webpack_exports__["a"] = (function () {
885
+ if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return 0;
886
+ if (scrollBarWidth !== undefined) return scrollBarWidth;
887
+
888
+ var outer = document.createElement('div');
889
+ outer.className = 'el-scrollbar__wrap';
890
+ outer.style.visibility = 'hidden';
891
+ outer.style.width = '100px';
892
+ outer.style.position = 'absolute';
893
+ outer.style.top = '-9999px';
894
+ document.body.appendChild(outer);
895
+
896
+ var widthNoScroll = outer.offsetWidth;
897
+ outer.style.overflow = 'scroll';
898
+
899
+ var inner = document.createElement('div');
900
+ inner.style.width = '100%';
901
+ outer.appendChild(inner);
902
+
903
+ var widthWithScroll = inner.offsetWidth;
904
+ outer.parentNode.removeChild(outer);
905
+ scrollBarWidth = widthNoScroll - widthWithScroll;
906
+
907
+ return scrollBarWidth;
908
+ });;
909
+
910
+ /***/ }),
911
+
605
912
  /***/ 9:
606
- /***/ (function(module, exports) {
913
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
914
+
915
+ "use strict";
916
+
917
+ // EXPORTS
918
+ __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ popup_manager; });
919
+
920
+ // EXTERNAL MODULE: external "vue"
921
+ var external_vue_ = __webpack_require__(0);
922
+ var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
923
+
924
+ // EXTERNAL MODULE: ./src/utils/merge.js
925
+ var merge = __webpack_require__(7);
926
+
927
+ // EXTERNAL MODULE: ./src/utils/dom.js
928
+ var utils_dom = __webpack_require__(1);
929
+
930
+ // CONCATENATED MODULE: ./src/utils/popup/popup-manager.js
931
+
932
+
933
+
934
+ var hasModal = false;
935
+ var hasInitZIndex = false;
936
+ var popup_manager_zIndex = void 0;
937
+
938
+ var popup_manager_getModal = function getModal() {
939
+ if (external_vue_default.a.prototype.$isServer) return;
940
+ var modalDom = PopupManager.modalDom;
941
+ if (modalDom) {
942
+ hasModal = true;
943
+ } else {
944
+ hasModal = false;
945
+ modalDom = document.createElement('div');
946
+ PopupManager.modalDom = modalDom;
947
+
948
+ modalDom.addEventListener('touchmove', function (event) {
949
+ event.preventDefault();
950
+ event.stopPropagation();
951
+ });
952
+
953
+ modalDom.addEventListener('click', function () {
954
+ PopupManager.doOnModalClick && PopupManager.doOnModalClick();
955
+ });
956
+ }
957
+
958
+ return modalDom;
959
+ };
960
+
961
+ var instances = {};
962
+
963
+ var PopupManager = {
964
+ modalFade: true,
965
+
966
+ getInstance: function getInstance(id) {
967
+ return instances[id];
968
+ },
969
+
970
+ register: function register(id, instance) {
971
+ if (id && instance) {
972
+ instances[id] = instance;
973
+ }
974
+ },
975
+
976
+ deregister: function deregister(id) {
977
+ if (id) {
978
+ instances[id] = null;
979
+ delete instances[id];
980
+ }
981
+ },
982
+
983
+ nextZIndex: function nextZIndex() {
984
+ return PopupManager.zIndex++;
985
+ },
986
+
987
+ modalStack: [],
988
+
989
+ doOnModalClick: function doOnModalClick() {
990
+ var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
991
+ if (!topItem) return;
992
+
993
+ var instance = PopupManager.getInstance(topItem.id);
994
+ if (instance && instance.closeOnClickModal) {
995
+ instance.close();
996
+ }
997
+ },
998
+
999
+ openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
1000
+ if (external_vue_default.a.prototype.$isServer) return;
1001
+ if (!id || zIndex === undefined) return;
1002
+ this.modalFade = modalFade;
1003
+
1004
+ var modalStack = this.modalStack;
1005
+
1006
+ for (var i = 0, j = modalStack.length; i < j; i++) {
1007
+ var item = modalStack[i];
1008
+ if (item.id === id) {
1009
+ return;
1010
+ }
1011
+ }
1012
+
1013
+ var modalDom = popup_manager_getModal();
1014
+
1015
+ Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal');
1016
+ if (this.modalFade && !hasModal) {
1017
+ Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-enter');
1018
+ }
1019
+ if (modalClass) {
1020
+ var classArr = modalClass.trim().split(/\s+/);
1021
+ classArr.forEach(function (item) {
1022
+ return Object(utils_dom["a" /* addClass */])(modalDom, item);
1023
+ });
1024
+ }
1025
+ setTimeout(function () {
1026
+ Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-enter');
1027
+ }, 200);
1028
+
1029
+ if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
1030
+ dom.parentNode.appendChild(modalDom);
1031
+ } else {
1032
+ document.body.appendChild(modalDom);
1033
+ }
1034
+
1035
+ if (zIndex) {
1036
+ modalDom.style.zIndex = zIndex;
1037
+ }
1038
+ modalDom.tabIndex = 0;
1039
+ modalDom.style.display = '';
1040
+
1041
+ this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
1042
+ },
1043
+
1044
+ closeModal: function closeModal(id) {
1045
+ var modalStack = this.modalStack;
1046
+ var modalDom = popup_manager_getModal();
1047
+
1048
+ if (modalStack.length > 0) {
1049
+ var topItem = modalStack[modalStack.length - 1];
1050
+ if (topItem.id === id) {
1051
+ if (topItem.modalClass) {
1052
+ var classArr = topItem.modalClass.trim().split(/\s+/);
1053
+ classArr.forEach(function (item) {
1054
+ return Object(utils_dom["i" /* removeClass */])(modalDom, item);
1055
+ });
1056
+ }
1057
+
1058
+ modalStack.pop();
1059
+ if (modalStack.length > 0) {
1060
+ modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
1061
+ }
1062
+ } else {
1063
+ for (var i = modalStack.length - 1; i >= 0; i--) {
1064
+ if (modalStack[i].id === id) {
1065
+ modalStack.splice(i, 1);
1066
+ break;
1067
+ }
1068
+ }
1069
+ }
1070
+ }
1071
+
1072
+ if (modalStack.length === 0) {
1073
+ if (this.modalFade) {
1074
+ Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-leave');
1075
+ }
1076
+ setTimeout(function () {
1077
+ if (modalStack.length === 0) {
1078
+ if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
1079
+ modalDom.style.display = 'none';
1080
+ PopupManager.modalDom = undefined;
1081
+ }
1082
+ Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-leave');
1083
+ }, 200);
1084
+ }
1085
+ }
1086
+ };
1087
+
1088
+ Object.defineProperty(PopupManager, 'zIndex', {
1089
+ configurable: true,
1090
+ get: function get() {
1091
+ if (!hasInitZIndex) {
1092
+ popup_manager_zIndex = popup_manager_zIndex || (external_vue_default.a.prototype.$ELEMENT || {}).zIndex || 2000;
1093
+ hasInitZIndex = true;
1094
+ }
1095
+ return popup_manager_zIndex;
1096
+ },
1097
+ set: function set(value) {
1098
+ popup_manager_zIndex = value;
1099
+ }
1100
+ });
1101
+
1102
+ var popup_manager_getTopPopup = function getTopPopup() {
1103
+ if (external_vue_default.a.prototype.$isServer) return;
1104
+ if (PopupManager.modalStack.length > 0) {
1105
+ var topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
1106
+ if (!topPopup) return;
1107
+ var instance = PopupManager.getInstance(topPopup.id);
1108
+
1109
+ return instance;
1110
+ }
1111
+ };
1112
+
1113
+ if (!external_vue_default.a.prototype.$isServer) {
1114
+ // handle `esc` key when the popup is shown
1115
+ window.addEventListener('keydown', function (event) {
1116
+ if (event.keyCode === 27) {
1117
+ var topPopup = popup_manager_getTopPopup();
1118
+
1119
+ if (topPopup && topPopup.closeOnPressEscape) {
1120
+ topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();
1121
+ }
1122
+ }
1123
+ });
1124
+ }
1125
+
1126
+ /* harmony default export */ var popup_manager = (PopupManager);
1127
+ // EXTERNAL MODULE: ./src/utils/scrollbar-width.js
1128
+ var scrollbar_width = __webpack_require__(8);
1129
+
1130
+ // CONCATENATED MODULE: ./src/utils/popup/index.js
1131
+
1132
+
1133
+
1134
+
1135
+
1136
+
1137
+ var idSeed = 1;
1138
+
1139
+ var scrollBarWidth = void 0;
1140
+
1141
+ /* harmony default export */ var popup = __webpack_exports__["b"] = ({
1142
+ props: {
1143
+ visible: {
1144
+ type: Boolean,
1145
+ default: false
1146
+ },
1147
+ openDelay: {},
1148
+ closeDelay: {},
1149
+ zIndex: {},
1150
+ modal: {
1151
+ type: Boolean,
1152
+ default: false
1153
+ },
1154
+ modalFade: {
1155
+ type: Boolean,
1156
+ default: true
1157
+ },
1158
+ modalClass: {},
1159
+ modalAppendToBody: {
1160
+ type: Boolean,
1161
+ default: false
1162
+ },
1163
+ lockScroll: {
1164
+ type: Boolean,
1165
+ default: true
1166
+ },
1167
+ closeOnPressEscape: {
1168
+ type: Boolean,
1169
+ default: false
1170
+ },
1171
+ closeOnClickModal: {
1172
+ type: Boolean,
1173
+ default: false
1174
+ }
1175
+ },
1176
+
1177
+ beforeMount: function beforeMount() {
1178
+ this._popupId = 'popup-' + idSeed++;
1179
+ popup_manager.register(this._popupId, this);
1180
+ },
1181
+ beforeDestroy: function beforeDestroy() {
1182
+ popup_manager.deregister(this._popupId);
1183
+ popup_manager.closeModal(this._popupId);
1184
+
1185
+ this.restoreBodyStyle();
1186
+ },
1187
+ data: function data() {
1188
+ return {
1189
+ opened: false,
1190
+ bodyPaddingRight: null,
1191
+ computedBodyPaddingRight: 0,
1192
+ withoutHiddenClass: true,
1193
+ rendered: false
1194
+ };
1195
+ },
1196
+
1197
+
1198
+ watch: {
1199
+ visible: function visible(val) {
1200
+ var _this = this;
1201
+
1202
+ if (val) {
1203
+ if (this._opening) return;
1204
+ if (!this.rendered) {
1205
+ this.rendered = true;
1206
+ external_vue_default.a.nextTick(function () {
1207
+ _this.open();
1208
+ });
1209
+ } else {
1210
+ this.open();
1211
+ }
1212
+ } else {
1213
+ this.close();
1214
+ }
1215
+ }
1216
+ },
1217
+
1218
+ methods: {
1219
+ open: function open(options) {
1220
+ var _this2 = this;
1221
+
1222
+ if (!this.rendered) {
1223
+ this.rendered = true;
1224
+ }
1225
+
1226
+ var props = Object(merge["a" /* default */])({}, this.$props || this, options);
1227
+
1228
+ if (this._closeTimer) {
1229
+ clearTimeout(this._closeTimer);
1230
+ this._closeTimer = null;
1231
+ }
1232
+ clearTimeout(this._openTimer);
1233
+
1234
+ var openDelay = Number(props.openDelay);
1235
+ if (openDelay > 0) {
1236
+ this._openTimer = setTimeout(function () {
1237
+ _this2._openTimer = null;
1238
+ _this2.doOpen(props);
1239
+ }, openDelay);
1240
+ } else {
1241
+ this.doOpen(props);
1242
+ }
1243
+ },
1244
+ doOpen: function doOpen(props) {
1245
+ if (this.$isServer) return;
1246
+ if (this.willOpen && !this.willOpen()) return;
1247
+ if (this.opened) return;
1248
+
1249
+ this._opening = true;
1250
+
1251
+ var dom = this.$el;
1252
+
1253
+ var modal = props.modal;
1254
+
1255
+ var zIndex = props.zIndex;
1256
+ if (zIndex) {
1257
+ popup_manager.zIndex = zIndex;
1258
+ }
1259
+
1260
+ if (modal) {
1261
+ if (this._closing) {
1262
+ popup_manager.closeModal(this._popupId);
1263
+ this._closing = false;
1264
+ }
1265
+ popup_manager.openModal(this._popupId, popup_manager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
1266
+ if (props.lockScroll) {
1267
+ this.withoutHiddenClass = !Object(utils_dom["d" /* hasClass */])(document.body, 'el-popup-parent--hidden');
1268
+ if (this.withoutHiddenClass) {
1269
+ this.bodyPaddingRight = document.body.style.paddingRight;
1270
+ this.computedBodyPaddingRight = parseInt(Object(utils_dom["c" /* getStyle */])(document.body, 'paddingRight'), 10);
1271
+ }
1272
+ scrollBarWidth = Object(scrollbar_width["a" /* default */])();
1273
+ var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
1274
+ var bodyOverflowY = Object(utils_dom["c" /* getStyle */])(document.body, 'overflowY');
1275
+ if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
1276
+ document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
1277
+ }
1278
+ Object(utils_dom["a" /* addClass */])(document.body, 'el-popup-parent--hidden');
1279
+ }
1280
+ }
1281
+
1282
+ if (getComputedStyle(dom).position === 'static') {
1283
+ dom.style.position = 'absolute';
1284
+ }
1285
+
1286
+ dom.style.zIndex = popup_manager.nextZIndex();
1287
+ this.opened = true;
1288
+
1289
+ this.onOpen && this.onOpen();
1290
+
1291
+ this.doAfterOpen();
1292
+ },
1293
+ doAfterOpen: function doAfterOpen() {
1294
+ this._opening = false;
1295
+ },
1296
+ close: function close() {
1297
+ var _this3 = this;
1298
+
1299
+ if (this.willClose && !this.willClose()) return;
1300
+
1301
+ if (this._openTimer !== null) {
1302
+ clearTimeout(this._openTimer);
1303
+ this._openTimer = null;
1304
+ }
1305
+ clearTimeout(this._closeTimer);
1306
+
1307
+ var closeDelay = Number(this.closeDelay);
1308
+
1309
+ if (closeDelay > 0) {
1310
+ this._closeTimer = setTimeout(function () {
1311
+ _this3._closeTimer = null;
1312
+ _this3.doClose();
1313
+ }, closeDelay);
1314
+ } else {
1315
+ this.doClose();
1316
+ }
1317
+ },
1318
+ doClose: function doClose() {
1319
+ this._closing = true;
1320
+
1321
+ this.onClose && this.onClose();
1322
+
1323
+ if (this.lockScroll) {
1324
+ setTimeout(this.restoreBodyStyle, 200);
1325
+ }
1326
+
1327
+ this.opened = false;
1328
+
1329
+ this.doAfterClose();
1330
+ },
1331
+ doAfterClose: function doAfterClose() {
1332
+ popup_manager.closeModal(this._popupId);
1333
+ this._closing = false;
1334
+ },
1335
+ restoreBodyStyle: function restoreBodyStyle() {
1336
+ if (this.modal && this.withoutHiddenClass) {
1337
+ document.body.style.paddingRight = this.bodyPaddingRight;
1338
+ Object(utils_dom["i" /* removeClass */])(document.body, 'el-popup-parent--hidden');
1339
+ }
1340
+ this.withoutHiddenClass = true;
1341
+ }
1342
+ }
1343
+ });
1344
+
607
1345
 
608
- module.exports = require("cy-element-ui/lib/utils/merge");
609
1346
 
610
1347
  /***/ })
611
1348