cy-element-ui 1.0.71 → 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 (113) 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/theme-chalk/src/index.scss +0 -3
  94. package/lib/time-picker.js +5013 -285
  95. package/lib/time-select.js +4945 -177
  96. package/lib/timeline-item.js +108 -108
  97. package/lib/timeline.js +82 -82
  98. package/lib/tooltip.js +2566 -41
  99. package/lib/transfer.js +2135 -141
  100. package/lib/transitions/collapse-transition.js +1 -1
  101. package/lib/tree.js +1372 -55
  102. package/lib/treeSelect.js +3420 -105
  103. package/lib/upload.js +1047 -28
  104. package/lib/utils/clickoutside.js +1 -1
  105. package/lib/utils/date-util.js +2 -2
  106. package/lib/utils/popup/index.js +2 -2
  107. package/lib/utils/popup/popup-manager.js +1 -1
  108. package/lib/utils/util.js +1 -1
  109. package/lib/utils/vdom.js +1 -1
  110. package/lib/utils/vue-popper.js +1 -1
  111. package/package.json +1 -1
  112. package/packages/theme-chalk/src/index.scss +0 -3
  113. package/src/index.js +1 -1
@@ -82,152 +82,3973 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 58);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 61);
86
86
  /******/ })
87
87
  /************************************************************************/
88
- /******/ ({
88
+ /******/ ([
89
+ /* 0 */
90
+ /***/ (function(module, exports) {
91
+
92
+ module.exports = require("vue");
93
+
94
+ /***/ }),
95
+ /* 1 */
96
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
97
+
98
+ "use strict";
99
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return on; });
100
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return off; });
101
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return once; });
102
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return hasClass; });
103
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; });
104
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return removeClass; });
105
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getStyle; });
106
+ /* unused harmony export setStyle */
107
+ /* unused harmony export isScroll */
108
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getScrollContainer; });
109
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isInContainer; });
110
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
111
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
112
+ 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; };
113
+
114
+ /* istanbul ignore next */
115
+
116
+
117
+
118
+ var isServer = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer;
119
+ var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
120
+ var MOZ_HACK_REGEXP = /^moz([A-Z])/;
121
+ var ieVersion = isServer ? 0 : Number(document.documentMode);
122
+
123
+ /* istanbul ignore next */
124
+ var trim = function trim(string) {
125
+ return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
126
+ };
127
+ /* istanbul ignore next */
128
+ var camelCase = function camelCase(name) {
129
+ return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
130
+ return offset ? letter.toUpperCase() : letter;
131
+ }).replace(MOZ_HACK_REGEXP, 'Moz$1');
132
+ };
133
+
134
+ /* istanbul ignore next */
135
+ var on = function () {
136
+ if (!isServer && document.addEventListener) {
137
+ return function (element, event, handler) {
138
+ if (element && event && handler) {
139
+ element.addEventListener(event, handler, false);
140
+ }
141
+ };
142
+ } else {
143
+ return function (element, event, handler) {
144
+ if (element && event && handler) {
145
+ element.attachEvent('on' + event, handler);
146
+ }
147
+ };
148
+ }
149
+ }();
150
+
151
+ /* istanbul ignore next */
152
+ var off = function () {
153
+ if (!isServer && document.removeEventListener) {
154
+ return function (element, event, handler) {
155
+ if (element && event) {
156
+ element.removeEventListener(event, handler, false);
157
+ }
158
+ };
159
+ } else {
160
+ return function (element, event, handler) {
161
+ if (element && event) {
162
+ element.detachEvent('on' + event, handler);
163
+ }
164
+ };
165
+ }
166
+ }();
167
+
168
+ /* istanbul ignore next */
169
+ var once = function once(el, event, fn) {
170
+ var listener = function listener() {
171
+ if (fn) {
172
+ fn.apply(this, arguments);
173
+ }
174
+ off(el, event, listener);
175
+ };
176
+ on(el, event, listener);
177
+ };
178
+
179
+ /* istanbul ignore next */
180
+ function hasClass(el, cls) {
181
+ if (!el || !cls) return false;
182
+ if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
183
+ if (el.classList) {
184
+ return el.classList.contains(cls);
185
+ } else {
186
+ return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
187
+ }
188
+ };
189
+
190
+ /* istanbul ignore next */
191
+ function addClass(el, cls) {
192
+ if (!el) return;
193
+ var curClass = el.className;
194
+ var classes = (cls || '').split(' ');
195
+
196
+ for (var i = 0, j = classes.length; i < j; i++) {
197
+ var clsName = classes[i];
198
+ if (!clsName) continue;
199
+
200
+ if (el.classList) {
201
+ el.classList.add(clsName);
202
+ } else if (!hasClass(el, clsName)) {
203
+ curClass += ' ' + clsName;
204
+ }
205
+ }
206
+ if (!el.classList) {
207
+ el.setAttribute('class', curClass);
208
+ }
209
+ };
210
+
211
+ /* istanbul ignore next */
212
+ function removeClass(el, cls) {
213
+ if (!el || !cls) return;
214
+ var classes = cls.split(' ');
215
+ var curClass = ' ' + el.className + ' ';
216
+
217
+ for (var i = 0, j = classes.length; i < j; i++) {
218
+ var clsName = classes[i];
219
+ if (!clsName) continue;
220
+
221
+ if (el.classList) {
222
+ el.classList.remove(clsName);
223
+ } else if (hasClass(el, clsName)) {
224
+ curClass = curClass.replace(' ' + clsName + ' ', ' ');
225
+ }
226
+ }
227
+ if (!el.classList) {
228
+ el.setAttribute('class', trim(curClass));
229
+ }
230
+ };
231
+
232
+ /* istanbul ignore next */
233
+ var getStyle = ieVersion < 9 ? function (element, styleName) {
234
+ if (isServer) return;
235
+ if (!element || !styleName) return null;
236
+ styleName = camelCase(styleName);
237
+ if (styleName === 'float') {
238
+ styleName = 'styleFloat';
239
+ }
240
+ try {
241
+ switch (styleName) {
242
+ case 'opacity':
243
+ try {
244
+ return element.filters.item('alpha').opacity / 100;
245
+ } catch (e) {
246
+ return 1.0;
247
+ }
248
+ default:
249
+ return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
250
+ }
251
+ } catch (e) {
252
+ return element.style[styleName];
253
+ }
254
+ } : function (element, styleName) {
255
+ if (isServer) return;
256
+ if (!element || !styleName) return null;
257
+ styleName = camelCase(styleName);
258
+ if (styleName === 'float') {
259
+ styleName = 'cssFloat';
260
+ }
261
+ try {
262
+ var computed = document.defaultView.getComputedStyle(element, '');
263
+ return element.style[styleName] || computed ? computed[styleName] : null;
264
+ } catch (e) {
265
+ return element.style[styleName];
266
+ }
267
+ };
268
+
269
+ /* istanbul ignore next */
270
+ function setStyle(element, styleName, value) {
271
+ if (!element || !styleName) return;
272
+
273
+ if ((typeof styleName === 'undefined' ? 'undefined' : _typeof(styleName)) === 'object') {
274
+ for (var prop in styleName) {
275
+ if (styleName.hasOwnProperty(prop)) {
276
+ setStyle(element, prop, styleName[prop]);
277
+ }
278
+ }
279
+ } else {
280
+ styleName = camelCase(styleName);
281
+ if (styleName === 'opacity' && ieVersion < 9) {
282
+ element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
283
+ } else {
284
+ element.style[styleName] = value;
285
+ }
286
+ }
287
+ };
288
+
289
+ var isScroll = function isScroll(el, vertical) {
290
+ if (isServer) return;
291
+
292
+ var determinedDirection = vertical !== null && vertical !== undefined;
293
+ var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
294
+
295
+ return overflow.match(/(scroll|auto|overlay)/);
296
+ };
297
+
298
+ var getScrollContainer = function getScrollContainer(el, vertical) {
299
+ if (isServer) return;
300
+
301
+ var parent = el;
302
+ while (parent) {
303
+ if ([window, document, document.documentElement].includes(parent)) {
304
+ return window;
305
+ }
306
+ if (isScroll(parent, vertical)) {
307
+ return parent;
308
+ }
309
+ parent = parent.parentNode;
310
+ }
311
+
312
+ return parent;
313
+ };
314
+
315
+ var isInContainer = function isInContainer(el, container) {
316
+ if (isServer || !el || !container) return false;
317
+
318
+ var elRect = el.getBoundingClientRect();
319
+ var containerRect = void 0;
320
+
321
+ if ([window, document, document.documentElement, null, undefined].includes(container)) {
322
+ containerRect = {
323
+ top: 0,
324
+ right: window.innerWidth,
325
+ bottom: window.innerHeight,
326
+ left: 0
327
+ };
328
+ } else {
329
+ containerRect = container.getBoundingClientRect();
330
+ }
331
+
332
+ return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
333
+ };
334
+
335
+ /***/ }),
336
+ /* 2 */
337
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
338
+
339
+ "use strict";
340
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
341
+ /* globals __VUE_SSR_CONTEXT__ */
342
+
343
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
344
+ // This module is a runtime utility for cleaner component module output and will
345
+ // be included in the final webpack user bundle.
346
+
347
+ function normalizeComponent(
348
+ scriptExports,
349
+ render,
350
+ staticRenderFns,
351
+ functionalTemplate,
352
+ injectStyles,
353
+ scopeId,
354
+ moduleIdentifier /* server only */,
355
+ shadowMode /* vue-cli only */
356
+ ) {
357
+ // Vue.extend constructor export interop
358
+ var options =
359
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
360
+
361
+ // render functions
362
+ if (render) {
363
+ options.render = render
364
+ options.staticRenderFns = staticRenderFns
365
+ options._compiled = true
366
+ }
367
+
368
+ // functional template
369
+ if (functionalTemplate) {
370
+ options.functional = true
371
+ }
372
+
373
+ // scopedId
374
+ if (scopeId) {
375
+ options._scopeId = 'data-v-' + scopeId
376
+ }
377
+
378
+ var hook
379
+ if (moduleIdentifier) {
380
+ // server build
381
+ hook = function (context) {
382
+ // 2.3 injection
383
+ context =
384
+ context || // cached call
385
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
386
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
387
+ // 2.2 with runInNewContext: true
388
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
389
+ context = __VUE_SSR_CONTEXT__
390
+ }
391
+ // inject component styles
392
+ if (injectStyles) {
393
+ injectStyles.call(this, context)
394
+ }
395
+ // register component module identifier for async chunk inferrence
396
+ if (context && context._registeredComponents) {
397
+ context._registeredComponents.add(moduleIdentifier)
398
+ }
399
+ }
400
+ // used by ssr in case component is cached and beforeCreate
401
+ // never gets called
402
+ options._ssrRegister = hook
403
+ } else if (injectStyles) {
404
+ hook = shadowMode
405
+ ? function () {
406
+ injectStyles.call(
407
+ this,
408
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
409
+ )
410
+ }
411
+ : injectStyles
412
+ }
413
+
414
+ if (hook) {
415
+ if (options.functional) {
416
+ // for template-only hot-reload because in that case the render fn doesn't
417
+ // go through the normalizer
418
+ options._injectStyles = hook
419
+ // register for functional component in vue file
420
+ var originalRender = options.render
421
+ options.render = function renderWithStyleInjection(h, context) {
422
+ hook.call(context)
423
+ return originalRender(h, context)
424
+ }
425
+ } else {
426
+ // inject component registration as beforeCreate hook
427
+ var existing = options.beforeCreate
428
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
429
+ }
430
+ }
431
+
432
+ return {
433
+ exports: scriptExports,
434
+ options: options
435
+ }
436
+ }
437
+
438
+
439
+ /***/ }),
440
+ /* 3 */
441
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
442
+
443
+ "use strict";
444
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return noop; });
445
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return hasOwn; });
446
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return toObject; });
447
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getValueByPath; });
448
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getPropByPath; });
449
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return generateId; });
450
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return valueEquals; });
451
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return escapeRegexpString; });
452
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return arrayFindIndex; });
453
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return arrayFind; });
454
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return coerceTruthyValueToArray; });
455
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return isIE; });
456
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return isEdge; });
457
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return isFirefox; });
458
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return autoprefixer; });
459
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return kebabCase; });
460
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return capitalize; });
461
+ /* unused harmony export looseEqual */
462
+ /* unused harmony export arrayEquals */
463
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return isEqual; });
464
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return isEmpty; });
465
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return rafThrottle; });
466
+ /* unused harmony export objToArray */
467
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return isMac; });
468
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
469
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
470
+ /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
471
+ 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; };
472
+
473
+
474
+
475
+
476
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
477
+
478
+ function noop() {};
479
+
480
+ function hasOwn(obj, key) {
481
+ return hasOwnProperty.call(obj, key);
482
+ };
483
+
484
+ function extend(to, _from) {
485
+ for (var key in _from) {
486
+ to[key] = _from[key];
487
+ }
488
+ return to;
489
+ };
490
+
491
+ function toObject(arr) {
492
+ var res = {};
493
+ for (var i = 0; i < arr.length; i++) {
494
+ if (arr[i]) {
495
+ extend(res, arr[i]);
496
+ }
497
+ }
498
+ return res;
499
+ };
500
+
501
+ var getValueByPath = function getValueByPath(object, prop) {
502
+ prop = prop || '';
503
+ var paths = prop.split('.');
504
+ var current = object;
505
+ var result = null;
506
+ for (var i = 0, j = paths.length; i < j; i++) {
507
+ var path = paths[i];
508
+ if (!current) break;
509
+
510
+ if (i === j - 1) {
511
+ result = current[path];
512
+ break;
513
+ }
514
+ current = current[path];
515
+ }
516
+ return result;
517
+ };
518
+
519
+ function getPropByPath(obj, path, strict) {
520
+ var tempObj = obj;
521
+ path = path.replace(/\[(\w+)\]/g, '.$1');
522
+ path = path.replace(/^\./, '');
523
+
524
+ var keyArr = path.split('.');
525
+ var i = 0;
526
+ for (var len = keyArr.length; i < len - 1; ++i) {
527
+ if (!tempObj && !strict) break;
528
+ var key = keyArr[i];
529
+ if (key in tempObj) {
530
+ tempObj = tempObj[key];
531
+ } else {
532
+ if (strict) {
533
+ throw new Error('please transfer a valid prop path to form item!');
534
+ }
535
+ break;
536
+ }
537
+ }
538
+ return {
539
+ o: tempObj,
540
+ k: keyArr[i],
541
+ v: tempObj ? tempObj[keyArr[i]] : null
542
+ };
543
+ };
544
+
545
+ var generateId = function generateId() {
546
+ return Math.floor(Math.random() * 10000);
547
+ };
548
+
549
+ var valueEquals = function valueEquals(a, b) {
550
+ // see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
551
+ if (a === b) return true;
552
+ if (!(a instanceof Array)) return false;
553
+ if (!(b instanceof Array)) return false;
554
+ if (a.length !== b.length) return false;
555
+ for (var i = 0; i !== a.length; ++i) {
556
+ if (a[i] !== b[i]) return false;
557
+ }
558
+ return true;
559
+ };
560
+
561
+ var escapeRegexpString = function escapeRegexpString() {
562
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
563
+ return String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
564
+ };
565
+
566
+ // TODO: use native Array.find, Array.findIndex when IE support is dropped
567
+ var arrayFindIndex = function arrayFindIndex(arr, pred) {
568
+ for (var i = 0; i !== arr.length; ++i) {
569
+ if (pred(arr[i])) {
570
+ return i;
571
+ }
572
+ }
573
+ return -1;
574
+ };
575
+
576
+ var arrayFind = function arrayFind(arr, pred) {
577
+ var idx = arrayFindIndex(arr, pred);
578
+ return idx !== -1 ? arr[idx] : undefined;
579
+ };
580
+
581
+ // coerce truthy value to array
582
+ var coerceTruthyValueToArray = function coerceTruthyValueToArray(val) {
583
+ if (Array.isArray(val)) {
584
+ return val;
585
+ } else if (val) {
586
+ return [val];
587
+ } else {
588
+ return [];
589
+ }
590
+ };
591
+
592
+ var isIE = function isIE() {
593
+ return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !isNaN(Number(document.documentMode));
594
+ };
595
+
596
+ var isEdge = function isEdge() {
597
+ return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
598
+ };
599
+
600
+ var isFirefox = function isFirefox() {
601
+ return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
602
+ };
603
+
604
+ var autoprefixer = function autoprefixer(style) {
605
+ if ((typeof style === 'undefined' ? 'undefined' : _typeof(style)) !== 'object') return style;
606
+ var rules = ['transform', 'transition', 'animation'];
607
+ var prefixes = ['ms-', 'webkit-'];
608
+ rules.forEach(function (rule) {
609
+ var value = style[rule];
610
+ if (rule && value) {
611
+ prefixes.forEach(function (prefix) {
612
+ style[prefix + rule] = value;
613
+ });
614
+ }
615
+ });
616
+ return style;
617
+ };
618
+
619
+ var kebabCase = function kebabCase(str) {
620
+ var hyphenateRE = /([^-])([A-Z])/g;
621
+ return str.replace(hyphenateRE, '$1-$2').replace(hyphenateRE, '$1-$2').toLowerCase();
622
+ };
623
+
624
+ var capitalize = function capitalize(str) {
625
+ if (!Object(_types__WEBPACK_IMPORTED_MODULE_1__[/* isString */ "e"])(str)) return str;
626
+ return str.charAt(0).toUpperCase() + str.slice(1);
627
+ };
628
+
629
+ var looseEqual = function looseEqual(a, b) {
630
+ var isObjectA = Object(_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(a);
631
+ var isObjectB = Object(_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(b);
632
+ if (isObjectA && isObjectB) {
633
+ return JSON.stringify(a) === JSON.stringify(b);
634
+ } else if (!isObjectA && !isObjectB) {
635
+ return String(a) === String(b);
636
+ } else {
637
+ return false;
638
+ }
639
+ };
640
+
641
+ var arrayEquals = function arrayEquals(arrayA, arrayB) {
642
+ arrayA = arrayA || [];
643
+ arrayB = arrayB || [];
644
+
645
+ if (arrayA.length !== arrayB.length) {
646
+ return false;
647
+ }
648
+
649
+ for (var i = 0; i < arrayA.length; i++) {
650
+ if (!looseEqual(arrayA[i], arrayB[i])) {
651
+ return false;
652
+ }
653
+ }
654
+
655
+ return true;
656
+ };
657
+
658
+ var isEqual = function isEqual(value1, value2) {
659
+ if (Array.isArray(value1) && Array.isArray(value2)) {
660
+ return arrayEquals(value1, value2);
661
+ }
662
+ return looseEqual(value1, value2);
663
+ };
664
+
665
+ var isEmpty = function isEmpty(val) {
666
+ // null or undefined
667
+ if (val == null) return true;
668
+
669
+ if (typeof val === 'boolean') return false;
670
+
671
+ if (typeof val === 'number') return !val;
672
+
673
+ if (val instanceof Error) return val.message === '';
674
+
675
+ switch (Object.prototype.toString.call(val)) {
676
+ // String or Array
677
+ case '[object String]':
678
+ case '[object Array]':
679
+ return !val.length;
680
+
681
+ // Map or Set or File
682
+ case '[object File]':
683
+ case '[object Map]':
684
+ case '[object Set]':
685
+ {
686
+ return !val.size;
687
+ }
688
+ // Plain Object
689
+ case '[object Object]':
690
+ {
691
+ return !Object.keys(val).length;
692
+ }
693
+ }
694
+
695
+ return false;
696
+ };
697
+
698
+ function rafThrottle(fn) {
699
+ var locked = false;
700
+ return function () {
701
+ var _this = this;
702
+
703
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
704
+ args[_key] = arguments[_key];
705
+ }
706
+
707
+ if (locked) return;
708
+ locked = true;
709
+ window.requestAnimationFrame(function (_) {
710
+ fn.apply(_this, args);
711
+ locked = false;
712
+ });
713
+ };
714
+ }
715
+
716
+ function objToArray(obj) {
717
+ if (Array.isArray(obj)) {
718
+ return obj;
719
+ }
720
+ return isEmpty(obj) ? [] : [obj];
721
+ }
722
+
723
+ var isMac = function isMac() {
724
+ return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
725
+ };
726
+
727
+ /***/ }),
728
+ /* 4 */
729
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
730
+
731
+ "use strict";
732
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isString; });
733
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isObject; });
734
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isHtmlElement; });
735
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isFunction; });
736
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isUndefined; });
737
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isDefined; });
738
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
739
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
740
+ 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; };
741
+
742
+
743
+
744
+ function isString(obj) {
745
+ return Object.prototype.toString.call(obj) === '[object String]';
746
+ }
747
+
748
+ function isObject(obj) {
749
+ return Object.prototype.toString.call(obj) === '[object Object]';
750
+ }
751
+
752
+ function isHtmlElement(node) {
753
+ return node && node.nodeType === Node.ELEMENT_NODE;
754
+ }
755
+
756
+ /**
757
+ * - Inspired:
758
+ * https://github.com/jashkenas/underscore/blob/master/modules/isFunction.js
759
+ */
760
+ var isFunction = function isFunction(functionToCheck) {
761
+ var getType = {};
762
+ return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
763
+ };
764
+
765
+ if ( true && (typeof Int8Array === 'undefined' ? 'undefined' : _typeof(Int8Array)) !== 'object' && (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer || typeof document.childNodes !== 'function')) {
766
+ isFunction = function isFunction(obj) {
767
+ return typeof obj === 'function' || false;
768
+ };
769
+ }
770
+
771
+
772
+
773
+ var isUndefined = function isUndefined(val) {
774
+ return val === void 0;
775
+ };
776
+
777
+ var isDefined = function isDefined(val) {
778
+ return val !== undefined && val !== null;
779
+ };
780
+
781
+ /***/ }),
782
+ /* 5 */,
783
+ /* 6 */
784
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
785
+
786
+ "use strict";
787
+ function _broadcast(componentName, eventName, params) {
788
+ this.$children.forEach(function (child) {
789
+ var name = child.$options.componentName;
790
+
791
+ if (name === componentName) {
792
+ child.$emit.apply(child, [eventName].concat(params));
793
+ } else {
794
+ _broadcast.apply(child, [componentName, eventName].concat([params]));
795
+ }
796
+ });
797
+ }
798
+ /* harmony default export */ __webpack_exports__["a"] = ({
799
+ methods: {
800
+ dispatch: function dispatch(componentName, eventName, params) {
801
+ var parent = this.$parent || this.$root;
802
+ var name = parent.$options.componentName;
803
+
804
+ while (parent && (!name || name !== componentName)) {
805
+ parent = parent.$parent;
806
+
807
+ if (parent) {
808
+ name = parent.$options.componentName;
809
+ }
810
+ }
811
+ if (parent) {
812
+ parent.$emit.apply(parent, [eventName].concat(params));
813
+ }
814
+ },
815
+ broadcast: function broadcast(componentName, eventName, params) {
816
+ _broadcast.call(this, componentName, eventName, params);
817
+ }
818
+ }
819
+ });
820
+
821
+ /***/ }),
822
+ /* 7 */
823
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
824
+
825
+ "use strict";
826
+ /* harmony default export */ __webpack_exports__["a"] = (function (target) {
827
+ for (var i = 1, j = arguments.length; i < j; i++) {
828
+ var source = arguments[i] || {};
829
+ for (var prop in source) {
830
+ if (source.hasOwnProperty(prop)) {
831
+ var value = source[prop];
832
+ if (value !== undefined) {
833
+ target[prop] = value;
834
+ }
835
+ }
836
+ }
837
+ }
838
+
839
+ return target;
840
+ });;
841
+
842
+ /***/ }),
843
+ /* 8 */
844
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
845
+
846
+ "use strict";
847
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
848
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
849
+
850
+
851
+ var scrollBarWidth = void 0;
852
+
853
+ /* harmony default export */ __webpack_exports__["a"] = (function () {
854
+ if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return 0;
855
+ if (scrollBarWidth !== undefined) return scrollBarWidth;
856
+
857
+ var outer = document.createElement('div');
858
+ outer.className = 'el-scrollbar__wrap';
859
+ outer.style.visibility = 'hidden';
860
+ outer.style.width = '100px';
861
+ outer.style.position = 'absolute';
862
+ outer.style.top = '-9999px';
863
+ document.body.appendChild(outer);
864
+
865
+ var widthNoScroll = outer.offsetWidth;
866
+ outer.style.overflow = 'scroll';
867
+
868
+ var inner = document.createElement('div');
869
+ inner.style.width = '100%';
870
+ outer.appendChild(inner);
871
+
872
+ var widthWithScroll = inner.offsetWidth;
873
+ outer.parentNode.removeChild(outer);
874
+ scrollBarWidth = widthNoScroll - widthWithScroll;
875
+
876
+ return scrollBarWidth;
877
+ });;
878
+
879
+ /***/ }),
880
+ /* 9 */
881
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
882
+
883
+ "use strict";
884
+
885
+ // EXPORTS
886
+ __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ popup_manager; });
887
+
888
+ // EXTERNAL MODULE: external "vue"
889
+ var external_vue_ = __webpack_require__(0);
890
+ var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
891
+
892
+ // EXTERNAL MODULE: ./src/utils/merge.js
893
+ var merge = __webpack_require__(7);
894
+
895
+ // EXTERNAL MODULE: ./src/utils/dom.js
896
+ var utils_dom = __webpack_require__(1);
897
+
898
+ // CONCATENATED MODULE: ./src/utils/popup/popup-manager.js
899
+
900
+
901
+
902
+ var hasModal = false;
903
+ var hasInitZIndex = false;
904
+ var popup_manager_zIndex = void 0;
905
+
906
+ var popup_manager_getModal = function getModal() {
907
+ if (external_vue_default.a.prototype.$isServer) return;
908
+ var modalDom = PopupManager.modalDom;
909
+ if (modalDom) {
910
+ hasModal = true;
911
+ } else {
912
+ hasModal = false;
913
+ modalDom = document.createElement('div');
914
+ PopupManager.modalDom = modalDom;
915
+
916
+ modalDom.addEventListener('touchmove', function (event) {
917
+ event.preventDefault();
918
+ event.stopPropagation();
919
+ });
920
+
921
+ modalDom.addEventListener('click', function () {
922
+ PopupManager.doOnModalClick && PopupManager.doOnModalClick();
923
+ });
924
+ }
925
+
926
+ return modalDom;
927
+ };
928
+
929
+ var instances = {};
930
+
931
+ var PopupManager = {
932
+ modalFade: true,
933
+
934
+ getInstance: function getInstance(id) {
935
+ return instances[id];
936
+ },
937
+
938
+ register: function register(id, instance) {
939
+ if (id && instance) {
940
+ instances[id] = instance;
941
+ }
942
+ },
943
+
944
+ deregister: function deregister(id) {
945
+ if (id) {
946
+ instances[id] = null;
947
+ delete instances[id];
948
+ }
949
+ },
950
+
951
+ nextZIndex: function nextZIndex() {
952
+ return PopupManager.zIndex++;
953
+ },
954
+
955
+ modalStack: [],
956
+
957
+ doOnModalClick: function doOnModalClick() {
958
+ var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
959
+ if (!topItem) return;
960
+
961
+ var instance = PopupManager.getInstance(topItem.id);
962
+ if (instance && instance.closeOnClickModal) {
963
+ instance.close();
964
+ }
965
+ },
966
+
967
+ openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
968
+ if (external_vue_default.a.prototype.$isServer) return;
969
+ if (!id || zIndex === undefined) return;
970
+ this.modalFade = modalFade;
971
+
972
+ var modalStack = this.modalStack;
973
+
974
+ for (var i = 0, j = modalStack.length; i < j; i++) {
975
+ var item = modalStack[i];
976
+ if (item.id === id) {
977
+ return;
978
+ }
979
+ }
980
+
981
+ var modalDom = popup_manager_getModal();
982
+
983
+ Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal');
984
+ if (this.modalFade && !hasModal) {
985
+ Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-enter');
986
+ }
987
+ if (modalClass) {
988
+ var classArr = modalClass.trim().split(/\s+/);
989
+ classArr.forEach(function (item) {
990
+ return Object(utils_dom["a" /* addClass */])(modalDom, item);
991
+ });
992
+ }
993
+ setTimeout(function () {
994
+ Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-enter');
995
+ }, 200);
996
+
997
+ if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
998
+ dom.parentNode.appendChild(modalDom);
999
+ } else {
1000
+ document.body.appendChild(modalDom);
1001
+ }
1002
+
1003
+ if (zIndex) {
1004
+ modalDom.style.zIndex = zIndex;
1005
+ }
1006
+ modalDom.tabIndex = 0;
1007
+ modalDom.style.display = '';
1008
+
1009
+ this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
1010
+ },
1011
+
1012
+ closeModal: function closeModal(id) {
1013
+ var modalStack = this.modalStack;
1014
+ var modalDom = popup_manager_getModal();
1015
+
1016
+ if (modalStack.length > 0) {
1017
+ var topItem = modalStack[modalStack.length - 1];
1018
+ if (topItem.id === id) {
1019
+ if (topItem.modalClass) {
1020
+ var classArr = topItem.modalClass.trim().split(/\s+/);
1021
+ classArr.forEach(function (item) {
1022
+ return Object(utils_dom["i" /* removeClass */])(modalDom, item);
1023
+ });
1024
+ }
1025
+
1026
+ modalStack.pop();
1027
+ if (modalStack.length > 0) {
1028
+ modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
1029
+ }
1030
+ } else {
1031
+ for (var i = modalStack.length - 1; i >= 0; i--) {
1032
+ if (modalStack[i].id === id) {
1033
+ modalStack.splice(i, 1);
1034
+ break;
1035
+ }
1036
+ }
1037
+ }
1038
+ }
1039
+
1040
+ if (modalStack.length === 0) {
1041
+ if (this.modalFade) {
1042
+ Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-leave');
1043
+ }
1044
+ setTimeout(function () {
1045
+ if (modalStack.length === 0) {
1046
+ if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
1047
+ modalDom.style.display = 'none';
1048
+ PopupManager.modalDom = undefined;
1049
+ }
1050
+ Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-leave');
1051
+ }, 200);
1052
+ }
1053
+ }
1054
+ };
1055
+
1056
+ Object.defineProperty(PopupManager, 'zIndex', {
1057
+ configurable: true,
1058
+ get: function get() {
1059
+ if (!hasInitZIndex) {
1060
+ popup_manager_zIndex = popup_manager_zIndex || (external_vue_default.a.prototype.$ELEMENT || {}).zIndex || 2000;
1061
+ hasInitZIndex = true;
1062
+ }
1063
+ return popup_manager_zIndex;
1064
+ },
1065
+ set: function set(value) {
1066
+ popup_manager_zIndex = value;
1067
+ }
1068
+ });
1069
+
1070
+ var popup_manager_getTopPopup = function getTopPopup() {
1071
+ if (external_vue_default.a.prototype.$isServer) return;
1072
+ if (PopupManager.modalStack.length > 0) {
1073
+ var topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
1074
+ if (!topPopup) return;
1075
+ var instance = PopupManager.getInstance(topPopup.id);
1076
+
1077
+ return instance;
1078
+ }
1079
+ };
1080
+
1081
+ if (!external_vue_default.a.prototype.$isServer) {
1082
+ // handle `esc` key when the popup is shown
1083
+ window.addEventListener('keydown', function (event) {
1084
+ if (event.keyCode === 27) {
1085
+ var topPopup = popup_manager_getTopPopup();
1086
+
1087
+ if (topPopup && topPopup.closeOnPressEscape) {
1088
+ topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();
1089
+ }
1090
+ }
1091
+ });
1092
+ }
1093
+
1094
+ /* harmony default export */ var popup_manager = (PopupManager);
1095
+ // EXTERNAL MODULE: ./src/utils/scrollbar-width.js
1096
+ var scrollbar_width = __webpack_require__(8);
1097
+
1098
+ // CONCATENATED MODULE: ./src/utils/popup/index.js
1099
+
1100
+
1101
+
1102
+
1103
+
1104
+
1105
+ var idSeed = 1;
1106
+
1107
+ var scrollBarWidth = void 0;
1108
+
1109
+ /* harmony default export */ var popup = __webpack_exports__["b"] = ({
1110
+ props: {
1111
+ visible: {
1112
+ type: Boolean,
1113
+ default: false
1114
+ },
1115
+ openDelay: {},
1116
+ closeDelay: {},
1117
+ zIndex: {},
1118
+ modal: {
1119
+ type: Boolean,
1120
+ default: false
1121
+ },
1122
+ modalFade: {
1123
+ type: Boolean,
1124
+ default: true
1125
+ },
1126
+ modalClass: {},
1127
+ modalAppendToBody: {
1128
+ type: Boolean,
1129
+ default: false
1130
+ },
1131
+ lockScroll: {
1132
+ type: Boolean,
1133
+ default: true
1134
+ },
1135
+ closeOnPressEscape: {
1136
+ type: Boolean,
1137
+ default: false
1138
+ },
1139
+ closeOnClickModal: {
1140
+ type: Boolean,
1141
+ default: false
1142
+ }
1143
+ },
1144
+
1145
+ beforeMount: function beforeMount() {
1146
+ this._popupId = 'popup-' + idSeed++;
1147
+ popup_manager.register(this._popupId, this);
1148
+ },
1149
+ beforeDestroy: function beforeDestroy() {
1150
+ popup_manager.deregister(this._popupId);
1151
+ popup_manager.closeModal(this._popupId);
1152
+
1153
+ this.restoreBodyStyle();
1154
+ },
1155
+ data: function data() {
1156
+ return {
1157
+ opened: false,
1158
+ bodyPaddingRight: null,
1159
+ computedBodyPaddingRight: 0,
1160
+ withoutHiddenClass: true,
1161
+ rendered: false
1162
+ };
1163
+ },
1164
+
1165
+
1166
+ watch: {
1167
+ visible: function visible(val) {
1168
+ var _this = this;
1169
+
1170
+ if (val) {
1171
+ if (this._opening) return;
1172
+ if (!this.rendered) {
1173
+ this.rendered = true;
1174
+ external_vue_default.a.nextTick(function () {
1175
+ _this.open();
1176
+ });
1177
+ } else {
1178
+ this.open();
1179
+ }
1180
+ } else {
1181
+ this.close();
1182
+ }
1183
+ }
1184
+ },
1185
+
1186
+ methods: {
1187
+ open: function open(options) {
1188
+ var _this2 = this;
1189
+
1190
+ if (!this.rendered) {
1191
+ this.rendered = true;
1192
+ }
1193
+
1194
+ var props = Object(merge["a" /* default */])({}, this.$props || this, options);
1195
+
1196
+ if (this._closeTimer) {
1197
+ clearTimeout(this._closeTimer);
1198
+ this._closeTimer = null;
1199
+ }
1200
+ clearTimeout(this._openTimer);
1201
+
1202
+ var openDelay = Number(props.openDelay);
1203
+ if (openDelay > 0) {
1204
+ this._openTimer = setTimeout(function () {
1205
+ _this2._openTimer = null;
1206
+ _this2.doOpen(props);
1207
+ }, openDelay);
1208
+ } else {
1209
+ this.doOpen(props);
1210
+ }
1211
+ },
1212
+ doOpen: function doOpen(props) {
1213
+ if (this.$isServer) return;
1214
+ if (this.willOpen && !this.willOpen()) return;
1215
+ if (this.opened) return;
1216
+
1217
+ this._opening = true;
1218
+
1219
+ var dom = this.$el;
1220
+
1221
+ var modal = props.modal;
1222
+
1223
+ var zIndex = props.zIndex;
1224
+ if (zIndex) {
1225
+ popup_manager.zIndex = zIndex;
1226
+ }
1227
+
1228
+ if (modal) {
1229
+ if (this._closing) {
1230
+ popup_manager.closeModal(this._popupId);
1231
+ this._closing = false;
1232
+ }
1233
+ popup_manager.openModal(this._popupId, popup_manager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
1234
+ if (props.lockScroll) {
1235
+ this.withoutHiddenClass = !Object(utils_dom["d" /* hasClass */])(document.body, 'el-popup-parent--hidden');
1236
+ if (this.withoutHiddenClass) {
1237
+ this.bodyPaddingRight = document.body.style.paddingRight;
1238
+ this.computedBodyPaddingRight = parseInt(Object(utils_dom["c" /* getStyle */])(document.body, 'paddingRight'), 10);
1239
+ }
1240
+ scrollBarWidth = Object(scrollbar_width["a" /* default */])();
1241
+ var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
1242
+ var bodyOverflowY = Object(utils_dom["c" /* getStyle */])(document.body, 'overflowY');
1243
+ if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
1244
+ document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
1245
+ }
1246
+ Object(utils_dom["a" /* addClass */])(document.body, 'el-popup-parent--hidden');
1247
+ }
1248
+ }
1249
+
1250
+ if (getComputedStyle(dom).position === 'static') {
1251
+ dom.style.position = 'absolute';
1252
+ }
1253
+
1254
+ dom.style.zIndex = popup_manager.nextZIndex();
1255
+ this.opened = true;
1256
+
1257
+ this.onOpen && this.onOpen();
1258
+
1259
+ this.doAfterOpen();
1260
+ },
1261
+ doAfterOpen: function doAfterOpen() {
1262
+ this._opening = false;
1263
+ },
1264
+ close: function close() {
1265
+ var _this3 = this;
1266
+
1267
+ if (this.willClose && !this.willClose()) return;
1268
+
1269
+ if (this._openTimer !== null) {
1270
+ clearTimeout(this._openTimer);
1271
+ this._openTimer = null;
1272
+ }
1273
+ clearTimeout(this._closeTimer);
1274
+
1275
+ var closeDelay = Number(this.closeDelay);
1276
+
1277
+ if (closeDelay > 0) {
1278
+ this._closeTimer = setTimeout(function () {
1279
+ _this3._closeTimer = null;
1280
+ _this3.doClose();
1281
+ }, closeDelay);
1282
+ } else {
1283
+ this.doClose();
1284
+ }
1285
+ },
1286
+ doClose: function doClose() {
1287
+ this._closing = true;
1288
+
1289
+ this.onClose && this.onClose();
1290
+
1291
+ if (this.lockScroll) {
1292
+ setTimeout(this.restoreBodyStyle, 200);
1293
+ }
1294
+
1295
+ this.opened = false;
1296
+
1297
+ this.doAfterClose();
1298
+ },
1299
+ doAfterClose: function doAfterClose() {
1300
+ popup_manager.closeModal(this._popupId);
1301
+ this._closing = false;
1302
+ },
1303
+ restoreBodyStyle: function restoreBodyStyle() {
1304
+ if (this.modal && this.withoutHiddenClass) {
1305
+ document.body.style.paddingRight = this.bodyPaddingRight;
1306
+ Object(utils_dom["i" /* removeClass */])(document.body, 'el-popup-parent--hidden');
1307
+ }
1308
+ this.withoutHiddenClass = true;
1309
+ }
1310
+ }
1311
+ });
1312
+
1313
+
1314
+
1315
+ /***/ }),
1316
+ /* 10 */
1317
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1318
+
1319
+ "use strict";
1320
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1321
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
1322
+ /* harmony import */ var _popup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
1323
+
1324
+
1325
+
1326
+ var PopperJS = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer ? function () {} : __webpack_require__(23);
1327
+ var stop = function stop(e) {
1328
+ return e.stopPropagation();
1329
+ };
1330
+
1331
+ /**
1332
+ * @param {HTMLElement} [reference=$refs.reference] - The reference element used to position the popper.
1333
+ * @param {HTMLElement} [popper=$refs.popper] - The HTML element used as popper, or a configuration used to generate the popper.
1334
+ * @param {String} [placement=button] - Placement of the popper accepted values: top(-start, -end), right(-start, -end), bottom(-start, -end), left(-start, -end)
1335
+ * @param {Number} [offset=0] - Amount of pixels the popper will be shifted (can be negative).
1336
+ * @param {Boolean} [visible=false] Visibility of the popup element.
1337
+ * @param {Boolean} [visible-arrow=false] Visibility of the arrow, no style.
1338
+ */
1339
+ /* harmony default export */ __webpack_exports__["a"] = ({
1340
+ props: {
1341
+ transformOrigin: {
1342
+ type: [Boolean, String],
1343
+ default: true
1344
+ },
1345
+ placement: {
1346
+ type: String,
1347
+ default: 'bottom'
1348
+ },
1349
+ boundariesPadding: {
1350
+ type: Number,
1351
+ default: 5
1352
+ },
1353
+ reference: {},
1354
+ popper: {},
1355
+ offset: {
1356
+ default: 0
1357
+ },
1358
+ value: Boolean,
1359
+ visibleArrow: Boolean,
1360
+ arrowOffset: {
1361
+ type: Number,
1362
+ default: 35
1363
+ },
1364
+ appendToBody: {
1365
+ type: Boolean,
1366
+ default: true
1367
+ },
1368
+ popperOptions: {
1369
+ type: Object,
1370
+ default: function _default() {
1371
+ return {
1372
+ gpuAcceleration: false
1373
+ };
1374
+ }
1375
+ }
1376
+ },
1377
+
1378
+ data: function data() {
1379
+ return {
1380
+ showPopper: false,
1381
+ currentPlacement: ''
1382
+ };
1383
+ },
1384
+
1385
+
1386
+ watch: {
1387
+ value: {
1388
+ immediate: true,
1389
+ handler: function handler(val) {
1390
+ this.showPopper = val;
1391
+ this.$emit('input', val);
1392
+ }
1393
+ },
1394
+
1395
+ showPopper: function showPopper(val) {
1396
+ if (this.disabled) return;
1397
+ val ? this.updatePopper() : this.destroyPopper();
1398
+ this.$emit('input', val);
1399
+ }
1400
+ },
1401
+
1402
+ methods: {
1403
+ createPopper: function createPopper() {
1404
+ var _this = this;
1405
+
1406
+ if (this.$isServer) return;
1407
+ this.currentPlacement = this.currentPlacement || this.placement;
1408
+ if (!/^(top|bottom|left|right)(-start|-end)?$/g.test(this.currentPlacement)) {
1409
+ return;
1410
+ }
1411
+
1412
+ var options = this.popperOptions;
1413
+ var popper = this.popperElm = this.popperElm || this.popper || this.$refs.popper;
1414
+ var reference = this.referenceElm = this.referenceElm || this.reference || this.$refs.reference;
1415
+
1416
+ if (!reference && this.$slots.reference && this.$slots.reference[0]) {
1417
+ reference = this.referenceElm = this.$slots.reference[0].elm;
1418
+ }
1419
+
1420
+ if (!popper || !reference) return;
1421
+ if (this.visibleArrow) this.appendArrow(popper);
1422
+ if (this.appendToBody) document.body.appendChild(this.popperElm);
1423
+ if (this.popperJS && this.popperJS.destroy) {
1424
+ this.popperJS.destroy();
1425
+ }
1426
+
1427
+ options.placement = this.currentPlacement;
1428
+ options.offset = this.offset;
1429
+ options.arrowOffset = this.arrowOffset;
1430
+ this.popperJS = new PopperJS(reference, popper, options);
1431
+ this.popperJS.onCreate(function (_) {
1432
+ _this.$emit('created', _this);
1433
+ _this.resetTransformOrigin();
1434
+ _this.$nextTick(_this.updatePopper);
1435
+ });
1436
+ if (typeof options.onUpdate === 'function') {
1437
+ this.popperJS.onUpdate(options.onUpdate);
1438
+ }
1439
+ this.popperJS._popper.style.zIndex = _popup__WEBPACK_IMPORTED_MODULE_1__[/* PopupManager */ "a"].nextZIndex();
1440
+ this.popperElm.addEventListener('click', stop);
1441
+ },
1442
+ updatePopper: function updatePopper() {
1443
+ var popperJS = this.popperJS;
1444
+ if (popperJS) {
1445
+ popperJS.update();
1446
+ if (popperJS._popper) {
1447
+ popperJS._popper.style.zIndex = _popup__WEBPACK_IMPORTED_MODULE_1__[/* PopupManager */ "a"].nextZIndex();
1448
+ }
1449
+ } else {
1450
+ this.createPopper();
1451
+ }
1452
+ },
1453
+ doDestroy: function doDestroy(forceDestroy) {
1454
+ /* istanbul ignore if */
1455
+ if (!this.popperJS || this.showPopper && !forceDestroy) return;
1456
+ this.popperJS.destroy();
1457
+ this.popperJS = null;
1458
+ },
1459
+ destroyPopper: function destroyPopper() {
1460
+ if (this.popperJS) {
1461
+ this.resetTransformOrigin();
1462
+ }
1463
+ },
1464
+ resetTransformOrigin: function resetTransformOrigin() {
1465
+ if (!this.transformOrigin) return;
1466
+ var placementMap = {
1467
+ top: 'bottom',
1468
+ bottom: 'top',
1469
+ left: 'right',
1470
+ right: 'left'
1471
+ };
1472
+ var placement = this.popperJS._popper.getAttribute('x-placement').split('-')[0];
1473
+ var origin = placementMap[placement];
1474
+ this.popperJS._popper.style.transformOrigin = typeof this.transformOrigin === 'string' ? this.transformOrigin : ['top', 'bottom'].indexOf(placement) > -1 ? 'center ' + origin : origin + ' center';
1475
+ },
1476
+ appendArrow: function appendArrow(element) {
1477
+ var hash = void 0;
1478
+ if (this.appended) {
1479
+ return;
1480
+ }
1481
+
1482
+ this.appended = true;
1483
+
1484
+ for (var item in element.attributes) {
1485
+ if (/^_v-/.test(element.attributes[item].name)) {
1486
+ hash = element.attributes[item].name;
1487
+ break;
1488
+ }
1489
+ }
1490
+
1491
+ var arrow = document.createElement('div');
1492
+
1493
+ if (hash) {
1494
+ arrow.setAttribute(hash, '');
1495
+ }
1496
+ arrow.setAttribute('x-arrow', '');
1497
+ arrow.className = 'popper__arrow';
1498
+ element.appendChild(arrow);
1499
+ }
1500
+ },
1501
+
1502
+ beforeDestroy: function beforeDestroy() {
1503
+ this.doDestroy(true);
1504
+ if (this.popperElm && this.popperElm.parentNode === document.body) {
1505
+ this.popperElm.removeEventListener('click', stop);
1506
+ document.body.removeChild(this.popperElm);
1507
+ }
1508
+ },
1509
+
1510
+
1511
+ // call destroy in keep-alive mode
1512
+ deactivated: function deactivated() {
1513
+ this.$options.beforeDestroy[0].call(this);
1514
+ }
1515
+ });
1516
+
1517
+ /***/ }),
1518
+ /* 11 */
1519
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1520
+
1521
+ "use strict";
1522
+
1523
+ // EXPORTS
1524
+ __webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ t; });
1525
+
1526
+ // UNUSED EXPORTS: use, i18n
1527
+
1528
+ // CONCATENATED MODULE: ./src/locale/lang/zh-CN.js
1529
+ /* harmony default export */ var zh_CN = ({
1530
+ el: {
1531
+ colorpicker: {
1532
+ confirm: '确定',
1533
+ clear: '清空'
1534
+ },
1535
+ datepicker: {
1536
+ now: '此刻',
1537
+ today: '今天',
1538
+ cancel: '取消',
1539
+ clear: '清空',
1540
+ confirm: '确定',
1541
+ selectDate: '选择日期',
1542
+ selectTime: '选择时间',
1543
+ startDate: '开始日期',
1544
+ startTime: '开始时间',
1545
+ endDate: '结束日期',
1546
+ endTime: '结束时间',
1547
+ prevYear: '前一年',
1548
+ nextYear: '后一年',
1549
+ prevMonth: '上个月',
1550
+ nextMonth: '下个月',
1551
+ year: '年',
1552
+ month1: '1 月',
1553
+ month2: '2 月',
1554
+ month3: '3 月',
1555
+ month4: '4 月',
1556
+ month5: '5 月',
1557
+ month6: '6 月',
1558
+ month7: '7 月',
1559
+ month8: '8 月',
1560
+ month9: '9 月',
1561
+ month10: '10 月',
1562
+ month11: '11 月',
1563
+ month12: '12 月',
1564
+ // week: '周次',
1565
+ weeks: {
1566
+ sun: '日',
1567
+ mon: '一',
1568
+ tue: '二',
1569
+ wed: '三',
1570
+ thu: '四',
1571
+ fri: '五',
1572
+ sat: '六'
1573
+ },
1574
+ months: {
1575
+ jan: '一月',
1576
+ feb: '二月',
1577
+ mar: '三月',
1578
+ apr: '四月',
1579
+ may: '五月',
1580
+ jun: '六月',
1581
+ jul: '七月',
1582
+ aug: '八月',
1583
+ sep: '九月',
1584
+ oct: '十月',
1585
+ nov: '十一月',
1586
+ dec: '十二月'
1587
+ }
1588
+ },
1589
+ select: {
1590
+ loading: '加载中',
1591
+ noMatch: '无匹配数据',
1592
+ noData: '无数据',
1593
+ placeholder: '请选择'
1594
+ },
1595
+ cascader: {
1596
+ noMatch: '无匹配数据',
1597
+ loading: '加载中',
1598
+ placeholder: '请选择',
1599
+ noData: '暂无数据'
1600
+ },
1601
+ pagination: {
1602
+ goto: '前往',
1603
+ pagesize: '条/页',
1604
+ total: '共 {total} 条',
1605
+ pageClassifier: '页'
1606
+ },
1607
+ messagebox: {
1608
+ title: '提示',
1609
+ confirm: '确定',
1610
+ cancel: '取消',
1611
+ error: '输入的数据不合法!'
1612
+ },
1613
+ upload: {
1614
+ deleteTip: '按 delete 键可删除',
1615
+ delete: '删除',
1616
+ preview: '查看图片',
1617
+ continue: '继续上传'
1618
+ },
1619
+ table: {
1620
+ emptyText: '暂无数据',
1621
+ confirmFilter: '筛选',
1622
+ resetFilter: '重置',
1623
+ clearFilter: '全部',
1624
+ sumText: '合计'
1625
+ },
1626
+ tree: {
1627
+ emptyText: '暂无数据'
1628
+ },
1629
+ transfer: {
1630
+ noMatch: '无匹配数据',
1631
+ noData: '无数据',
1632
+ titles: ['列表 1', '列表 2'],
1633
+ filterPlaceholder: '请输入搜索内容',
1634
+ noCheckedFormat: '共 {total} 项',
1635
+ hasCheckedFormat: '已选 {checked}/{total} 项'
1636
+ },
1637
+ image: {
1638
+ error: '加载失败'
1639
+ },
1640
+ pageHeader: {
1641
+ title: '返回'
1642
+ },
1643
+ popconfirm: {
1644
+ confirmButtonText: '确定',
1645
+ cancelButtonText: '取消'
1646
+ },
1647
+ empty: {
1648
+ description: '暂无数据'
1649
+ }
1650
+ }
1651
+ });
1652
+ // EXTERNAL MODULE: external "vue"
1653
+ var external_vue_ = __webpack_require__(0);
1654
+ var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
1655
+
1656
+ // EXTERNAL MODULE: external "deepmerge"
1657
+ var external_deepmerge_ = __webpack_require__(15);
1658
+ var external_deepmerge_default = /*#__PURE__*/__webpack_require__.n(external_deepmerge_);
1659
+
1660
+ // EXTERNAL MODULE: ./src/utils/util.js
1661
+ var util = __webpack_require__(3);
1662
+
1663
+ // CONCATENATED MODULE: ./src/locale/format.js
1664
+ 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; };
1665
+
1666
+
1667
+
1668
+ var RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
1669
+ /**
1670
+ * String format template
1671
+ * - Inspired:
1672
+ * https://github.com/Matt-Esch/string-template/index.js
1673
+ */
1674
+ /* harmony default export */ var format = (function (Vue) {
1675
+ /**
1676
+ * template
1677
+ *
1678
+ * @param {String} string
1679
+ * @param {Array} ...args
1680
+ * @return {String}
1681
+ */
1682
+
1683
+ function template(string) {
1684
+ for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1685
+ args[_key - 1] = arguments[_key];
1686
+ }
1687
+
1688
+ if (args.length === 1 && _typeof(args[0]) === 'object') {
1689
+ args = args[0];
1690
+ }
1691
+
1692
+ if (!args || !args.hasOwnProperty) {
1693
+ args = {};
1694
+ }
1695
+
1696
+ return string.replace(RE_NARGS, function (match, prefix, i, index) {
1697
+ var result = void 0;
1698
+
1699
+ if (string[index - 1] === '{' && string[index + match.length] === '}') {
1700
+ return i;
1701
+ } else {
1702
+ result = Object(util["j" /* hasOwn */])(args, i) ? args[i] : null;
1703
+ if (result === null || result === undefined) {
1704
+ return '';
1705
+ }
1706
+
1707
+ return result;
1708
+ }
1709
+ });
1710
+ }
1711
+
1712
+ return template;
1713
+ });
1714
+ // CONCATENATED MODULE: ./src/locale/index.js
1715
+
1716
+
1717
+
1718
+
1719
+
1720
+ var locale_format = format(external_vue_default.a);
1721
+ var lang = zh_CN;
1722
+ var merged = false;
1723
+ var locale_i18nHandler = function i18nHandler() {
1724
+ var vuei18n = Object.getPrototypeOf(this || external_vue_default.a).$t;
1725
+ if (typeof vuei18n === 'function' && !!external_vue_default.a.locale) {
1726
+ if (!merged) {
1727
+ merged = true;
1728
+ 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 }));
1729
+ }
1730
+ return vuei18n.apply(this, arguments);
1731
+ }
1732
+ };
1733
+
1734
+ var t = function t(path, options) {
1735
+ var value = locale_i18nHandler.apply(this, arguments);
1736
+ if (value !== null && value !== undefined) return value;
1737
+
1738
+ var array = path.split('.');
1739
+ var current = lang;
1740
+
1741
+ for (var i = 0, j = array.length; i < j; i++) {
1742
+ var property = array[i];
1743
+ value = current[property];
1744
+ if (i === j - 1) return locale_format(value, options);
1745
+ if (!value) return '';
1746
+ current = value;
1747
+ }
1748
+ return '';
1749
+ };
1750
+
1751
+ var use = function use(l) {
1752
+ lang = l || lang;
1753
+ };
1754
+
1755
+ var i18n = function i18n(fn) {
1756
+ locale_i18nHandler = fn || locale_i18nHandler;
1757
+ };
1758
+
1759
+ /* harmony default export */ var locale = ({ use: use, t: t, i18n: i18n });
1760
+
1761
+ /***/ }),
1762
+ /* 12 */
1763
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1764
+
1765
+ "use strict";
1766
+ /* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
1767
+
1768
+ /**
1769
+ * Show migrating guide in browser console.
1770
+ *
1771
+ * Usage:
1772
+ * import Migrating from 'element-ui/src/mixins/migrating';
1773
+ *
1774
+ * mixins: [Migrating]
1775
+ *
1776
+ * add getMigratingConfig method for your component.
1777
+ * getMigratingConfig() {
1778
+ * return {
1779
+ * props: {
1780
+ * 'allow-no-selection': 'allow-no-selection is removed.',
1781
+ * 'selection-mode': 'selection-mode is removed.'
1782
+ * },
1783
+ * events: {
1784
+ * selectionchange: 'selectionchange is renamed to selection-change.'
1785
+ * }
1786
+ * };
1787
+ * },
1788
+ */
1789
+ /* harmony default export */ __webpack_exports__["a"] = ({
1790
+ mounted: function mounted() {
1791
+ if (true) return;
1792
+ if (!this.$vnode) return;
1793
+
1794
+ var _getMigratingConfig = this.getMigratingConfig(),
1795
+ _getMigratingConfig$p = _getMigratingConfig.props,
1796
+ props = _getMigratingConfig$p === undefined ? {} : _getMigratingConfig$p,
1797
+ _getMigratingConfig$e = _getMigratingConfig.events,
1798
+ events = _getMigratingConfig$e === undefined ? {} : _getMigratingConfig$e;
1799
+
1800
+ var _$vnode = this.$vnode,
1801
+ data = _$vnode.data,
1802
+ componentOptions = _$vnode.componentOptions;
1803
+
1804
+ var definedProps = data.attrs || {};
1805
+ var definedEvents = componentOptions.listeners || {};
1806
+
1807
+ for (var propName in definedProps) {
1808
+ propName = Object(_utils_util__WEBPACK_IMPORTED_MODULE_0__[/* kebabCase */ "q"])(propName); // compatible with camel case
1809
+ if (props[propName]) {
1810
+ console.warn('[Element Migrating][' + this.$options.name + '][Attribute]: ' + props[propName]);
1811
+ }
1812
+ }
1813
+
1814
+ for (var eventName in definedEvents) {
1815
+ eventName = Object(_utils_util__WEBPACK_IMPORTED_MODULE_0__[/* kebabCase */ "q"])(eventName); // compatible with camel case
1816
+ if (events[eventName]) {
1817
+ console.warn('[Element Migrating][' + this.$options.name + '][Event]: ' + events[eventName]);
1818
+ }
1819
+ }
1820
+ },
1821
+
1822
+ methods: {
1823
+ getMigratingConfig: function getMigratingConfig() {
1824
+ return {
1825
+ props: {},
1826
+ events: {}
1827
+ };
1828
+ }
1829
+ }
1830
+ });
1831
+
1832
+ /***/ }),
1833
+ /* 13 */
1834
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1835
+
1836
+ "use strict";
1837
+ /* harmony import */ var _locale__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
1838
+
1839
+
1840
+ /* harmony default export */ __webpack_exports__["a"] = ({
1841
+ methods: {
1842
+ t: function t() {
1843
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
1844
+ args[_key] = arguments[_key];
1845
+ }
1846
+
1847
+ return _locale__WEBPACK_IMPORTED_MODULE_0__[/* t */ "a"].apply(this, args);
1848
+ }
1849
+ }
1850
+ });
1851
+
1852
+ /***/ }),
1853
+ /* 14 */,
1854
+ /* 15 */
1855
+ /***/ (function(module, exports) {
1856
+
1857
+ module.exports = require("deepmerge");
1858
+
1859
+ /***/ }),
1860
+ /* 16 */
1861
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1862
+
1863
+ "use strict";
1864
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isDef; });
1865
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isKorean; });
1866
+ function isDef(val) {
1867
+ return val !== undefined && val !== null;
1868
+ }
1869
+ function isKorean(text) {
1870
+ var reg = /([(\uAC00-\uD7AF)|(\u3130-\u318F)])+/gi;
1871
+ return reg.test(text);
1872
+ }
1873
+
1874
+ /***/ }),
1875
+ /* 17 */,
1876
+ /* 18 */
1877
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1878
+
1879
+ "use strict";
1880
+ // ESM COMPAT FLAG
1881
+ __webpack_require__.r(__webpack_exports__);
1882
+
1883
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=template&id=af7512c8
1884
+ var render = function render() {
1885
+ var _vm = this,
1886
+ _c = _vm._self._c
1887
+ return _c(
1888
+ "div",
1889
+ {
1890
+ class: [
1891
+ _vm.type === "textarea" ? "el-textarea" : "el-input",
1892
+ _vm.inputSize ? "el-input--" + _vm.inputSize : "",
1893
+ {
1894
+ "is-disabled": _vm.inputDisabled,
1895
+ "is-exceed": _vm.inputExceed,
1896
+ "el-input-group": _vm.$slots.prepend || _vm.$slots.append,
1897
+ "el-input-group--append": _vm.$slots.append,
1898
+ "el-input-group--prepend": _vm.$slots.prepend,
1899
+ "el-input--prefix": _vm.$slots.prefix || _vm.prefixIcon,
1900
+ "el-input--suffix":
1901
+ _vm.$slots.suffix ||
1902
+ _vm.suffixIcon ||
1903
+ _vm.clearable ||
1904
+ _vm.showPassword,
1905
+ },
1906
+ ],
1907
+ on: {
1908
+ mouseenter: function ($event) {
1909
+ _vm.hovering = true
1910
+ },
1911
+ mouseleave: function ($event) {
1912
+ _vm.hovering = false
1913
+ },
1914
+ },
1915
+ },
1916
+ [
1917
+ _vm.type !== "textarea"
1918
+ ? [
1919
+ _vm.$slots.prepend
1920
+ ? _c(
1921
+ "div",
1922
+ { staticClass: "el-input-group__prepend" },
1923
+ [_vm._t("prepend")],
1924
+ 2
1925
+ )
1926
+ : _vm._e(),
1927
+ _vm.type !== "textarea"
1928
+ ? _c(
1929
+ "input",
1930
+ _vm._b(
1931
+ {
1932
+ ref: "input",
1933
+ staticClass: "el-input__inner",
1934
+ attrs: {
1935
+ tabindex: _vm.tabindex,
1936
+ type: _vm.showPassword
1937
+ ? _vm.passwordVisible
1938
+ ? "text"
1939
+ : "password"
1940
+ : _vm.type,
1941
+ disabled: _vm.inputDisabled,
1942
+ readonly: _vm.readonly,
1943
+ autocomplete: _vm.autoComplete || _vm.autocomplete,
1944
+ "aria-label": _vm.label,
1945
+ },
1946
+ on: {
1947
+ compositionstart: _vm.handleCompositionStart,
1948
+ compositionupdate: _vm.handleCompositionUpdate,
1949
+ compositionend: _vm.handleCompositionEnd,
1950
+ input: _vm.handleInput,
1951
+ focus: _vm.handleFocus,
1952
+ blur: _vm.handleBlur,
1953
+ change: _vm.handleChange,
1954
+ },
1955
+ },
1956
+ "input",
1957
+ _vm.$attrs,
1958
+ false
1959
+ )
1960
+ )
1961
+ : _vm._e(),
1962
+ _vm.$slots.prefix || _vm.prefixIcon
1963
+ ? _c(
1964
+ "span",
1965
+ { staticClass: "el-input__prefix" },
1966
+ [
1967
+ _vm._t("prefix"),
1968
+ _vm.prefixIcon
1969
+ ? _c("i", {
1970
+ staticClass: "el-input__icon",
1971
+ class: _vm.prefixIcon,
1972
+ })
1973
+ : _vm._e(),
1974
+ ],
1975
+ 2
1976
+ )
1977
+ : _vm._e(),
1978
+ _vm.getSuffixVisible()
1979
+ ? _c("span", { staticClass: "el-input__suffix" }, [
1980
+ _c(
1981
+ "span",
1982
+ { staticClass: "el-input__suffix-inner" },
1983
+ [
1984
+ !_vm.showClear ||
1985
+ !_vm.showPwdVisible ||
1986
+ !_vm.isWordLimitVisible
1987
+ ? [
1988
+ _vm._t("suffix"),
1989
+ _vm.suffixIcon
1990
+ ? _c("i", {
1991
+ staticClass: "el-input__icon",
1992
+ class: _vm.suffixIcon,
1993
+ })
1994
+ : _vm._e(),
1995
+ ]
1996
+ : _vm._e(),
1997
+ _vm.showClear
1998
+ ? _c("i", {
1999
+ staticClass:
2000
+ "el-input__icon el-icon-circle-close el-input__clear",
2001
+ on: {
2002
+ mousedown: function ($event) {
2003
+ $event.preventDefault()
2004
+ },
2005
+ click: _vm.clear,
2006
+ },
2007
+ })
2008
+ : _vm._e(),
2009
+ _vm.showPwdVisible
2010
+ ? _c("i", {
2011
+ staticClass:
2012
+ "el-input__icon el-icon-view el-input__clear",
2013
+ on: { click: _vm.handlePasswordVisible },
2014
+ })
2015
+ : _vm._e(),
2016
+ _vm.isWordLimitVisible
2017
+ ? _c("span", { staticClass: "el-input__count" }, [
2018
+ _c(
2019
+ "span",
2020
+ { staticClass: "el-input__count-inner" },
2021
+ [
2022
+ _vm._v(
2023
+ "\n\t\t\t\t\t\t" +
2024
+ _vm._s(_vm.textLength) +
2025
+ "/" +
2026
+ _vm._s(_vm.upperLimit) +
2027
+ "\n\t\t\t\t\t"
2028
+ ),
2029
+ ]
2030
+ ),
2031
+ ])
2032
+ : _vm._e(),
2033
+ ],
2034
+ 2
2035
+ ),
2036
+ _vm.validateState
2037
+ ? _c("i", {
2038
+ staticClass: "el-input__icon",
2039
+ class: ["el-input__validateIcon", _vm.validateIcon],
2040
+ })
2041
+ : _vm._e(),
2042
+ ])
2043
+ : _vm._e(),
2044
+ _vm.$slots.append
2045
+ ? _c(
2046
+ "div",
2047
+ { staticClass: "el-input-group__append" },
2048
+ [_vm._t("append")],
2049
+ 2
2050
+ )
2051
+ : _vm._e(),
2052
+ ]
2053
+ : _c(
2054
+ "textarea",
2055
+ _vm._b(
2056
+ {
2057
+ ref: "textarea",
2058
+ staticClass: "el-textarea__inner",
2059
+ style: _vm.textareaStyle,
2060
+ attrs: {
2061
+ tabindex: _vm.tabindex,
2062
+ disabled: _vm.inputDisabled,
2063
+ readonly: _vm.readonly,
2064
+ autocomplete: _vm.autoComplete || _vm.autocomplete,
2065
+ "aria-label": _vm.label,
2066
+ },
2067
+ on: {
2068
+ compositionstart: _vm.handleCompositionStart,
2069
+ compositionupdate: _vm.handleCompositionUpdate,
2070
+ compositionend: _vm.handleCompositionEnd,
2071
+ input: _vm.handleInput,
2072
+ focus: _vm.handleFocus,
2073
+ blur: _vm.handleBlur,
2074
+ change: _vm.handleChange,
2075
+ },
2076
+ },
2077
+ "textarea",
2078
+ _vm.$attrs,
2079
+ false
2080
+ )
2081
+ ),
2082
+ _vm.isWordLimitVisible && _vm.type === "textarea"
2083
+ ? _c("span", { staticClass: "el-input__count" }, [
2084
+ _vm._v(_vm._s(_vm.textLength) + "/" + _vm._s(_vm.upperLimit)),
2085
+ ])
2086
+ : _vm._e(),
2087
+ ],
2088
+ 2
2089
+ )
2090
+ }
2091
+ var staticRenderFns = []
2092
+ render._withStripped = true
2093
+
2094
+
2095
+ // CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=template&id=af7512c8
2096
+
2097
+ // EXTERNAL MODULE: ./src/mixins/emitter.js
2098
+ var emitter = __webpack_require__(6);
2099
+
2100
+ // EXTERNAL MODULE: ./src/mixins/migrating.js
2101
+ var migrating = __webpack_require__(12);
2102
+
2103
+ // CONCATENATED MODULE: ./packages/input/src/calcTextareaHeight.js
2104
+ var hiddenTextarea = void 0;
2105
+
2106
+ var HIDDEN_STYLE = '\n\theight:0 !important;\n\tvisibility:hidden !important;\n\toverflow:hidden !important;\n\tposition:absolute !important;\n\tz-index:-1000 !important;\n\ttop:0 !important;\n\tright:0 !important\n';
2107
+
2108
+ var CONTEXT_STYLE = ['letter-spacing', 'line-height', 'padding-top', 'padding-bottom', 'font-family', 'font-weight', 'font-size', 'text-rendering', 'text-transform', 'width', 'text-indent', 'padding-left', 'padding-right', 'border-width', 'box-sizing'];
2109
+
2110
+ function calculateNodeStyling(targetElement) {
2111
+ var style = window.getComputedStyle(targetElement);
2112
+
2113
+ var boxSizing = style.getPropertyValue('box-sizing');
2114
+
2115
+ var paddingSize = parseFloat(style.getPropertyValue('padding-bottom')) + parseFloat(style.getPropertyValue('padding-top'));
2116
+
2117
+ var borderSize = parseFloat(style.getPropertyValue('border-bottom-width')) + parseFloat(style.getPropertyValue('border-top-width'));
2118
+
2119
+ var contextStyle = CONTEXT_STYLE.map(function (name) {
2120
+ return name + ':' + style.getPropertyValue(name);
2121
+ }).join(';');
2122
+
2123
+ return { contextStyle: contextStyle, paddingSize: paddingSize, borderSize: borderSize, boxSizing: boxSizing };
2124
+ }
2125
+
2126
+ function calcTextareaHeight(targetElement) {
2127
+ var minRows = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
2128
+ var maxRows = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
2129
+
2130
+ if (!hiddenTextarea) {
2131
+ hiddenTextarea = document.createElement('textarea');
2132
+ document.body.appendChild(hiddenTextarea);
2133
+ }
2134
+
2135
+ var _calculateNodeStyling = calculateNodeStyling(targetElement),
2136
+ paddingSize = _calculateNodeStyling.paddingSize,
2137
+ borderSize = _calculateNodeStyling.borderSize,
2138
+ boxSizing = _calculateNodeStyling.boxSizing,
2139
+ contextStyle = _calculateNodeStyling.contextStyle;
2140
+
2141
+ hiddenTextarea.setAttribute('style', contextStyle + ';' + HIDDEN_STYLE);
2142
+ hiddenTextarea.value = targetElement.value || targetElement.placeholder || '';
2143
+
2144
+ var height = hiddenTextarea.scrollHeight;
2145
+ var result = {};
2146
+
2147
+ if (boxSizing === 'border-box') {
2148
+ height = height + borderSize;
2149
+ } else if (boxSizing === 'content-box') {
2150
+ height = height - paddingSize;
2151
+ }
2152
+
2153
+ hiddenTextarea.value = '';
2154
+ var singleRowHeight = hiddenTextarea.scrollHeight - paddingSize;
2155
+
2156
+ if (minRows !== null) {
2157
+ var minHeight = singleRowHeight * minRows;
2158
+ if (boxSizing === 'border-box') {
2159
+ minHeight = minHeight + paddingSize + borderSize;
2160
+ }
2161
+ height = Math.max(minHeight, height);
2162
+ result.minHeight = minHeight + 'px';
2163
+ }
2164
+ if (maxRows !== null) {
2165
+ var maxHeight = singleRowHeight * maxRows;
2166
+ if (boxSizing === 'border-box') {
2167
+ maxHeight = maxHeight + paddingSize + borderSize;
2168
+ }
2169
+ height = Math.min(maxHeight, height);
2170
+ }
2171
+ result.height = height + 'px';
2172
+ hiddenTextarea.parentNode && hiddenTextarea.parentNode.removeChild(hiddenTextarea);
2173
+ hiddenTextarea = null;
2174
+ return result;
2175
+ };
2176
+ // EXTERNAL MODULE: ./src/utils/merge.js
2177
+ var merge = __webpack_require__(7);
2178
+
2179
+ // EXTERNAL MODULE: ./src/utils/shared.js
2180
+ var shared = __webpack_require__(16);
2181
+
2182
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/input.vue?vue&type=script&lang=js
2183
+
2184
+
2185
+
2186
+
2187
+
2188
+
2189
+
2190
+ /* harmony default export */ var inputvue_type_script_lang_js = ({
2191
+ name: 'ElInput',
2192
+
2193
+ componentName: 'ElInput',
2194
+
2195
+ mixins: [emitter["a" /* default */], migrating["a" /* default */]],
2196
+
2197
+ inheritAttrs: false,
2198
+
2199
+ inject: {
2200
+ elForm: {
2201
+ default: ''
2202
+ },
2203
+ elFormItem: {
2204
+ default: ''
2205
+ }
2206
+ },
2207
+
2208
+ data: function data() {
2209
+ return {
2210
+ textareaCalcStyle: {},
2211
+ hovering: false,
2212
+ focused: false,
2213
+ isComposing: false,
2214
+ passwordVisible: false
2215
+ };
2216
+ },
2217
+
2218
+
2219
+ props: {
2220
+ value: [String, Number],
2221
+ size: String,
2222
+ resize: String,
2223
+ form: String,
2224
+ disabled: Boolean,
2225
+ readonly: Boolean,
2226
+ type: {
2227
+ type: String,
2228
+ default: 'text'
2229
+ },
2230
+ autosize: {
2231
+ type: [Boolean, Object],
2232
+ default: false
2233
+ },
2234
+ autocomplete: {
2235
+ type: String,
2236
+ default: 'off'
2237
+ },
2238
+ /** @Deprecated in next major version */
2239
+ autoComplete: {
2240
+ type: String,
2241
+ validator: function validator(val) {
2242
+ false && false;
2243
+ return true;
2244
+ }
2245
+ },
2246
+ validateEvent: {
2247
+ type: Boolean,
2248
+ default: true
2249
+ },
2250
+ suffixIcon: String,
2251
+ prefixIcon: String,
2252
+ label: String,
2253
+ clearable: {
2254
+ type: Boolean,
2255
+ default: false
2256
+ },
2257
+ showPassword: {
2258
+ type: Boolean,
2259
+ default: false
2260
+ },
2261
+ showWordLimit: {
2262
+ type: Boolean,
2263
+ default: false
2264
+ },
2265
+ tabindex: String
2266
+ },
2267
+
2268
+ computed: {
2269
+ _elFormItemSize: function _elFormItemSize() {
2270
+ return (this.elFormItem || {}).elFormItemSize;
2271
+ },
2272
+ validateState: function validateState() {
2273
+ return this.elFormItem ? this.elFormItem.validateState : '';
2274
+ },
2275
+ needStatusIcon: function needStatusIcon() {
2276
+ return this.elForm ? this.elForm.statusIcon : false;
2277
+ },
2278
+ validateIcon: function validateIcon() {
2279
+ return {
2280
+ validating: 'el-icon-loading',
2281
+ success: 'el-icon-circle-check',
2282
+ error: 'el-icon-circle-close'
2283
+ }[this.validateState];
2284
+ },
2285
+ textareaStyle: function textareaStyle() {
2286
+ return Object(merge["a" /* default */])({}, this.textareaCalcStyle, { resize: this.resize });
2287
+ },
2288
+ inputSize: function inputSize() {
2289
+ return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
2290
+ },
2291
+ inputDisabled: function inputDisabled() {
2292
+ return this.disabled || (this.elForm || {}).disabled;
2293
+ },
2294
+ nativeInputValue: function nativeInputValue() {
2295
+ return this.value === null || this.value === undefined ? '' : String(this.value);
2296
+ },
2297
+ showClear: function showClear() {
2298
+ return this.clearable && !this.inputDisabled && !this.readonly && this.nativeInputValue && (this.focused || this.hovering);
2299
+ },
2300
+ showPwdVisible: function showPwdVisible() {
2301
+ return this.showPassword && !this.inputDisabled && !this.readonly && (!!this.nativeInputValue || this.focused);
2302
+ },
2303
+ isWordLimitVisible: function isWordLimitVisible() {
2304
+ return this.showWordLimit && this.$attrs.maxlength && (this.type === 'text' || this.type === 'textarea') && !this.inputDisabled && !this.readonly && !this.showPassword;
2305
+ },
2306
+ upperLimit: function upperLimit() {
2307
+ return this.$attrs.maxlength;
2308
+ },
2309
+ textLength: function textLength() {
2310
+ if (typeof this.value === 'number') {
2311
+ return String(this.value).length;
2312
+ }
2313
+
2314
+ return (this.value || '').length;
2315
+ },
2316
+ inputExceed: function inputExceed() {
2317
+ // show exceed style if length of initial value greater then maxlength
2318
+ return this.isWordLimitVisible && this.textLength > this.upperLimit;
2319
+ }
2320
+ },
2321
+
2322
+ watch: {
2323
+ value: function value(val) {
2324
+ this.$nextTick(this.resizeTextarea);
2325
+ if (this.validateEvent) {
2326
+ this.dispatch('ElFormItem', 'el.form.change', [val]);
2327
+ }
2328
+ },
2329
+
2330
+ // native input value is set explicitly
2331
+ // do not use v-model / :value in template
2332
+ // see: https://github.com/ElemeFE/element/issues/14521
2333
+ nativeInputValue: function nativeInputValue() {
2334
+ this.setNativeInputValue();
2335
+ },
2336
+
2337
+ // when change between <input> and <textarea>,
2338
+ // update DOM dependent value and styles
2339
+ // https://github.com/ElemeFE/element/issues/14857
2340
+ type: function type() {
2341
+ var _this = this;
2342
+
2343
+ this.$nextTick(function () {
2344
+ _this.setNativeInputValue();
2345
+ _this.resizeTextarea();
2346
+ _this.updateIconOffset();
2347
+ });
2348
+ }
2349
+ },
2350
+
2351
+ methods: {
2352
+ focus: function focus() {
2353
+ this.getInput().focus();
2354
+ },
2355
+ blur: function blur() {
2356
+ this.getInput().blur();
2357
+ },
2358
+ getMigratingConfig: function getMigratingConfig() {
2359
+ return {
2360
+ props: {
2361
+ 'icon': 'icon is removed, use suffix-icon / prefix-icon instead.',
2362
+ 'on-icon-click': 'on-icon-click is removed.'
2363
+ },
2364
+ events: {
2365
+ 'click': 'click is removed.'
2366
+ }
2367
+ };
2368
+ },
2369
+ handleBlur: function handleBlur(event) {
2370
+ this.focused = false;
2371
+ this.$emit('blur', event);
2372
+ if (this.validateEvent) {
2373
+ this.dispatch('ElFormItem', 'el.form.blur', [this.value]);
2374
+ }
2375
+ },
2376
+ select: function select() {
2377
+ this.getInput().select();
2378
+ },
2379
+ resizeTextarea: function resizeTextarea() {
2380
+ if (this.$isServer) return;
2381
+ var autosize = this.autosize,
2382
+ type = this.type;
2383
+
2384
+ if (type !== 'textarea') return;
2385
+ if (!autosize) {
2386
+ this.textareaCalcStyle = {
2387
+ minHeight: calcTextareaHeight(this.$refs.textarea).minHeight
2388
+ };
2389
+ return;
2390
+ }
2391
+ var minRows = autosize.minRows;
2392
+ var maxRows = autosize.maxRows;
2393
+
2394
+ this.textareaCalcStyle = calcTextareaHeight(this.$refs.textarea, minRows, maxRows);
2395
+ },
2396
+ setNativeInputValue: function setNativeInputValue() {
2397
+ var input = this.getInput();
2398
+ if (!input) return;
2399
+ if (input.value === this.nativeInputValue) return;
2400
+ input.value = this.nativeInputValue;
2401
+ },
2402
+ handleFocus: function handleFocus(event) {
2403
+ this.focused = true;
2404
+ this.$emit('focus', event);
2405
+ },
2406
+ handleCompositionStart: function handleCompositionStart(event) {
2407
+ this.$emit('compositionstart', event);
2408
+ this.isComposing = true;
2409
+ },
2410
+ handleCompositionUpdate: function handleCompositionUpdate(event) {
2411
+ this.$emit('compositionupdate', event);
2412
+ var text = event.target.value;
2413
+ var lastCharacter = text[text.length - 1] || '';
2414
+ this.isComposing = !Object(shared["b" /* isKorean */])(lastCharacter);
2415
+ },
2416
+ handleCompositionEnd: function handleCompositionEnd(event) {
2417
+ this.$emit('compositionend', event);
2418
+ if (this.isComposing) {
2419
+ this.isComposing = false;
2420
+ this.handleInput(event);
2421
+ }
2422
+ },
2423
+ handleInput: function handleInput(event) {
2424
+ // should not emit input during composition
2425
+ // see: https://github.com/ElemeFE/element/issues/10516
2426
+ if (this.isComposing) return;
2427
+
2428
+ // hack for https://github.com/ElemeFE/element/issues/8548
2429
+ // should remove the following line when we don't support IE
2430
+ if (event.target.value === this.nativeInputValue) return;
2431
+
2432
+ this.$emit('input', event.target.value);
2433
+
2434
+ // ensure native input value is controlled
2435
+ // see: https://github.com/ElemeFE/element/issues/12850
2436
+ this.$nextTick(this.setNativeInputValue);
2437
+ },
2438
+ handleChange: function handleChange(event) {
2439
+ this.$emit('change', event.target.value);
2440
+ },
2441
+ calcIconOffset: function calcIconOffset(place) {
2442
+ var elList = [].slice.call(this.$el.querySelectorAll('.el-input__' + place) || []);
2443
+ if (!elList.length) return;
2444
+ var el = null;
2445
+ for (var i = 0; i < elList.length; i++) {
2446
+ if (elList[i].parentNode === this.$el) {
2447
+ el = elList[i];
2448
+ break;
2449
+ }
2450
+ }
2451
+ if (!el) return;
2452
+ var pendantMap = {
2453
+ suffix: 'append',
2454
+ prefix: 'prepend'
2455
+ };
2456
+
2457
+ var pendant = pendantMap[place];
2458
+ if (this.$slots[pendant]) {
2459
+ el.style.transform = 'translateX(' + (place === 'suffix' ? '-' : '') + this.$el.querySelector('.el-input-group__' + pendant).offsetWidth + 'px)';
2460
+ } else {
2461
+ el.removeAttribute('style');
2462
+ }
2463
+ },
2464
+ updateIconOffset: function updateIconOffset() {
2465
+ this.calcIconOffset('prefix');
2466
+ this.calcIconOffset('suffix');
2467
+ },
2468
+ clear: function clear() {
2469
+ this.$emit('input', '');
2470
+ this.$emit('change', '');
2471
+ this.$emit('clear');
2472
+ },
2473
+ handlePasswordVisible: function handlePasswordVisible() {
2474
+ var _this2 = this;
2475
+
2476
+ this.passwordVisible = !this.passwordVisible;
2477
+ this.$nextTick(function () {
2478
+ _this2.focus();
2479
+ });
2480
+ },
2481
+ getInput: function getInput() {
2482
+ return this.$refs.input || this.$refs.textarea;
2483
+ },
2484
+ getSuffixVisible: function getSuffixVisible() {
2485
+ return this.$slots.suffix || this.suffixIcon || this.showClear || this.showPassword || this.isWordLimitVisible || this.validateState && this.needStatusIcon;
2486
+ }
2487
+ },
2488
+
2489
+ created: function created() {
2490
+ this.$on('inputSelect', this.select);
2491
+ },
2492
+ mounted: function mounted() {
2493
+ this.setNativeInputValue();
2494
+ this.resizeTextarea();
2495
+ this.updateIconOffset();
2496
+ },
2497
+ updated: function updated() {
2498
+ this.$nextTick(this.updateIconOffset);
2499
+ }
2500
+ });
2501
+ // CONCATENATED MODULE: ./packages/input/src/input.vue?vue&type=script&lang=js
2502
+ /* harmony default export */ var src_inputvue_type_script_lang_js = (inputvue_type_script_lang_js);
2503
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
2504
+ var componentNormalizer = __webpack_require__(2);
2505
+
2506
+ // CONCATENATED MODULE: ./packages/input/src/input.vue
2507
+
2508
+
2509
+
2510
+
2511
+
2512
+ /* normalize component */
2513
+
2514
+ var component = Object(componentNormalizer["a" /* default */])(
2515
+ src_inputvue_type_script_lang_js,
2516
+ render,
2517
+ staticRenderFns,
2518
+ false,
2519
+ null,
2520
+ null,
2521
+ null
2522
+
2523
+ )
2524
+
2525
+ /* harmony default export */ var input = (component.exports);
2526
+ // CONCATENATED MODULE: ./packages/input/index.js
2527
+
2528
+
2529
+ /* istanbul ignore next */
2530
+ input.install = function (Vue) {
2531
+ Vue.component(input.name, input);
2532
+ };
2533
+
2534
+ /* harmony default export */ var packages_input = __webpack_exports__["default"] = (input);
2535
+
2536
+ /***/ }),
2537
+ /* 19 */,
2538
+ /* 20 */,
2539
+ /* 21 */
2540
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
2541
+
2542
+ "use strict";
2543
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
2544
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
2545
+ /* harmony import */ var _dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
2546
+
2547
+
2548
+
2549
+ var nodeList = [];
2550
+ var ctx = '@@clickoutsideContext';
2551
+
2552
+ var startClick = void 0;
2553
+ var seed = 0;
2554
+
2555
+ !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && Object(_dom__WEBPACK_IMPORTED_MODULE_1__[/* on */ "g"])(document, 'mousedown', function (e) {
2556
+ return startClick = e;
2557
+ });
2558
+
2559
+ !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && Object(_dom__WEBPACK_IMPORTED_MODULE_1__[/* on */ "g"])(document, 'mouseup', function (e) {
2560
+ nodeList.forEach(function (node) {
2561
+ return node[ctx].documentHandler(e, startClick);
2562
+ });
2563
+ });
2564
+
2565
+ function createDocumentHandler(el, binding, vnode) {
2566
+ return function () {
2567
+ var mouseup = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2568
+ var mousedown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2569
+
2570
+ if (!vnode || !vnode.context || !mouseup.target || !mousedown.target || el.contains(mouseup.target) || el.contains(mousedown.target) || el === mouseup.target || vnode.context.popperElm && (vnode.context.popperElm.contains(mouseup.target) || vnode.context.popperElm.contains(mousedown.target))) return;
2571
+
2572
+ if (binding.expression && el[ctx].methodName && vnode.context[el[ctx].methodName]) {
2573
+ vnode.context[el[ctx].methodName]();
2574
+ } else {
2575
+ el[ctx].bindingFn && el[ctx].bindingFn();
2576
+ }
2577
+ };
2578
+ }
2579
+
2580
+ /**
2581
+ * v-clickoutside
2582
+ * @desc 点击元素外面才会触发的事件
2583
+ * @example
2584
+ * ```vue
2585
+ * <div v-element-clickoutside="handleClose">
2586
+ * ```
2587
+ */
2588
+ /* harmony default export */ __webpack_exports__["a"] = ({
2589
+ bind: function bind(el, binding, vnode) {
2590
+ nodeList.push(el);
2591
+ var id = seed++;
2592
+ el[ctx] = {
2593
+ id: id,
2594
+ documentHandler: createDocumentHandler(el, binding, vnode),
2595
+ methodName: binding.expression,
2596
+ bindingFn: binding.value
2597
+ };
2598
+ },
2599
+ update: function update(el, binding, vnode) {
2600
+ el[ctx].documentHandler = createDocumentHandler(el, binding, vnode);
2601
+ el[ctx].methodName = binding.expression;
2602
+ el[ctx].bindingFn = binding.value;
2603
+ },
2604
+ unbind: function unbind(el) {
2605
+ var len = nodeList.length;
2606
+
2607
+ for (var i = 0; i < len; i++) {
2608
+ if (nodeList[i][ctx].id === el[ctx].id) {
2609
+ nodeList.splice(i, 1);
2610
+ break;
2611
+ }
2612
+ }
2613
+ delete el[ctx];
2614
+ }
2615
+ });
2616
+
2617
+ /***/ }),
2618
+ /* 22 */,
2619
+ /* 23 */
2620
+ /***/ (function(module, exports, __webpack_require__) {
2621
+
2622
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;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; };
2623
+
2624
+ /**
2625
+ * @fileOverview Kickass library to create and place poppers near their reference elements.
2626
+ * @version {{version}}
2627
+ * @license
2628
+ * Copyright (c) 2016 Federico Zivolo and contributors
2629
+ *
2630
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
2631
+ * of this software and associated documentation files (the "Software"), to deal
2632
+ * in the Software without restriction, including without limitation the rights
2633
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2634
+ * copies of the Software, and to permit persons to whom the Software is
2635
+ * furnished to do so, subject to the following conditions:
2636
+ *
2637
+ * The above copyright notice and this permission notice shall be included in all
2638
+ * copies or substantial portions of the Software.
2639
+ *
2640
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2641
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2642
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2643
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2644
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2645
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2646
+ * SOFTWARE.
2647
+ */
2648
+
2649
+ //
2650
+ // Cross module loader
2651
+ // Supported: Node, AMD, Browser globals
2652
+ //
2653
+ ;(function (root, factory) {
2654
+ if (true) {
2655
+ // AMD. Register as an anonymous module.
2656
+ !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
2657
+ __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
2658
+ (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
2659
+ __WEBPACK_AMD_DEFINE_FACTORY__),
2660
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
2661
+ } else {}
2662
+ })(this, function () {
2663
+
2664
+ 'use strict';
2665
+
2666
+ var root = window;
2667
+
2668
+ // default options
2669
+ var DEFAULTS = {
2670
+ // placement of the popper
2671
+ placement: 'bottom',
2672
+
2673
+ gpuAcceleration: true,
2674
+
2675
+ // shift popper from its origin by the given amount of pixels (can be negative)
2676
+ offset: 0,
2677
+
2678
+ // the element which will act as boundary of the popper
2679
+ boundariesElement: 'viewport',
2680
+
2681
+ // amount of pixel used to define a minimum distance between the boundaries and the popper
2682
+ boundariesPadding: 5,
2683
+
2684
+ // popper will try to prevent overflow following this order,
2685
+ // by default, then, it could overflow on the left and on top of the boundariesElement
2686
+ preventOverflowOrder: ['left', 'right', 'top', 'bottom'],
2687
+
2688
+ // the behavior used by flip to change the placement of the popper
2689
+ flipBehavior: 'flip',
2690
+
2691
+ arrowElement: '[x-arrow]',
2692
+
2693
+ arrowOffset: 0,
2694
+
2695
+ // list of functions used to modify the offsets before they are applied to the popper
2696
+ modifiers: ['shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle'],
2697
+
2698
+ modifiersIgnored: [],
2699
+
2700
+ forceAbsolute: false
2701
+ };
2702
+
2703
+ /**
2704
+ * Create a new Popper.js instance
2705
+ * @constructor Popper
2706
+ * @param {HTMLElement} reference - The reference element used to position the popper
2707
+ * @param {HTMLElement|Object} popper
2708
+ * The HTML element used as popper, or a configuration used to generate the popper.
2709
+ * @param {String} [popper.tagName='div'] The tag name of the generated popper.
2710
+ * @param {Array} [popper.classNames=['popper']] Array of classes to apply to the generated popper.
2711
+ * @param {Array} [popper.attributes] Array of attributes to apply, specify `attr:value` to assign a value to it.
2712
+ * @param {HTMLElement|String} [popper.parent=window.document.body] The parent element, given as HTMLElement or as query string.
2713
+ * @param {String} [popper.content=''] The content of the popper, it can be text, html, or node; if it is not text, set `contentType` to `html` or `node`.
2714
+ * @param {String} [popper.contentType='text'] If `html`, the `content` will be parsed as HTML. If `node`, it will be appended as-is.
2715
+ * @param {String} [popper.arrowTagName='div'] Same as `popper.tagName` but for the arrow element.
2716
+ * @param {Array} [popper.arrowClassNames='popper__arrow'] Same as `popper.classNames` but for the arrow element.
2717
+ * @param {String} [popper.arrowAttributes=['x-arrow']] Same as `popper.attributes` but for the arrow element.
2718
+ * @param {Object} options
2719
+ * @param {String} [options.placement=bottom]
2720
+ * Placement of the popper accepted values: `top(-start, -end), right(-start, -end), bottom(-start, -right),
2721
+ * left(-start, -end)`
2722
+ *
2723
+ * @param {HTMLElement|String} [options.arrowElement='[x-arrow]']
2724
+ * The DOM Node used as arrow for the popper, or a CSS selector used to get the DOM node. It must be child of
2725
+ * its parent Popper. Popper.js will apply to the given element the style required to align the arrow with its
2726
+ * reference element.
2727
+ * By default, it will look for a child node of the popper with the `x-arrow` attribute.
2728
+ *
2729
+ * @param {Boolean} [options.gpuAcceleration=true]
2730
+ * When this property is set to true, the popper position will be applied using CSS3 translate3d, allowing the
2731
+ * browser to use the GPU to accelerate the rendering.
2732
+ * If set to false, the popper will be placed using `top` and `left` properties, not using the GPU.
2733
+ *
2734
+ * @param {Number} [options.offset=0]
2735
+ * Amount of pixels the popper will be shifted (can be negative).
2736
+ *
2737
+ * @param {String|Element} [options.boundariesElement='viewport']
2738
+ * The element which will define the boundaries of the popper position, the popper will never be placed outside
2739
+ * of the defined boundaries (except if `keepTogether` is enabled)
2740
+ *
2741
+ * @param {Number} [options.boundariesPadding=5]
2742
+ * Additional padding for the boundaries
2743
+ *
2744
+ * @param {Array} [options.preventOverflowOrder=['left', 'right', 'top', 'bottom']]
2745
+ * Order used when Popper.js tries to avoid overflows from the boundaries, they will be checked in order,
2746
+ * this means that the last ones will never overflow
2747
+ *
2748
+ * @param {String|Array} [options.flipBehavior='flip']
2749
+ * The behavior used by the `flip` modifier to change the placement of the popper when the latter is trying to
2750
+ * overlap its reference element. Defining `flip` as value, the placement will be flipped on
2751
+ * its axis (`right - left`, `top - bottom`).
2752
+ * You can even pass an array of placements (eg: `['right', 'left', 'top']` ) to manually specify
2753
+ * how alter the placement when a flip is needed. (eg. in the above example, it would first flip from right to left,
2754
+ * then, if even in its new placement, the popper is overlapping its reference element, it will be moved to top)
2755
+ *
2756
+ * @param {Array} [options.modifiers=[ 'shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle']]
2757
+ * List of functions used to modify the data before they are applied to the popper, add your custom functions
2758
+ * to this array to edit the offsets and placement.
2759
+ * The function should reflect the @params and @returns of preventOverflow
2760
+ *
2761
+ * @param {Array} [options.modifiersIgnored=[]]
2762
+ * Put here any built-in modifier name you want to exclude from the modifiers list
2763
+ * The function should reflect the @params and @returns of preventOverflow
2764
+ *
2765
+ * @param {Boolean} [options.removeOnDestroy=false]
2766
+ * Set to true if you want to automatically remove the popper when you call the `destroy` method.
2767
+ */
2768
+ function Popper(reference, popper, options) {
2769
+ this._reference = reference.jquery ? reference[0] : reference;
2770
+ this.state = {};
2771
+
2772
+ // if the popper variable is a configuration object, parse it to generate an HTMLElement
2773
+ // generate a default popper if is not defined
2774
+ var isNotDefined = typeof popper === 'undefined' || popper === null;
2775
+ var isConfig = popper && Object.prototype.toString.call(popper) === '[object Object]';
2776
+ if (isNotDefined || isConfig) {
2777
+ this._popper = this.parse(isConfig ? popper : {});
2778
+ }
2779
+ // otherwise, use the given HTMLElement as popper
2780
+ else {
2781
+ this._popper = popper.jquery ? popper[0] : popper;
2782
+ }
2783
+
2784
+ // with {} we create a new object with the options inside it
2785
+ this._options = Object.assign({}, DEFAULTS, options);
2786
+
2787
+ // refactoring modifiers' list
2788
+ this._options.modifiers = this._options.modifiers.map(function (modifier) {
2789
+ // remove ignored modifiers
2790
+ if (this._options.modifiersIgnored.indexOf(modifier) !== -1) return;
2791
+
2792
+ // set the x-placement attribute before everything else because it could be used to add margins to the popper
2793
+ // margins needs to be calculated to get the correct popper offsets
2794
+ if (modifier === 'applyStyle') {
2795
+ this._popper.setAttribute('x-placement', this._options.placement);
2796
+ }
2797
+
2798
+ // return predefined modifier identified by string or keep the custom one
2799
+ return this.modifiers[modifier] || modifier;
2800
+ }.bind(this));
2801
+
2802
+ // make sure to apply the popper position before any computation
2803
+ this.state.position = this._getPosition(this._popper, this._reference);
2804
+ setStyle(this._popper, { position: this.state.position, top: 0 });
2805
+
2806
+ // fire the first update to position the popper in the right place
2807
+ this.update();
2808
+
2809
+ // setup event listeners, they will take care of update the position in specific situations
2810
+ this._setupEventListeners();
2811
+ return this;
2812
+ }
2813
+
2814
+ //
2815
+ // Methods
2816
+ //
2817
+ /**
2818
+ * Destroy the popper
2819
+ * @method
2820
+ * @memberof Popper
2821
+ */
2822
+ Popper.prototype.destroy = function () {
2823
+ this._popper.removeAttribute('x-placement');
2824
+ this._popper.style.left = '';
2825
+ this._popper.style.position = '';
2826
+ this._popper.style.top = '';
2827
+ this._popper.style[getSupportedPropertyName('transform')] = '';
2828
+ this._removeEventListeners();
2829
+
2830
+ // remove the popper if user explicity asked for the deletion on destroy
2831
+ if (this._options.removeOnDestroy) {
2832
+ this._popper.remove();
2833
+ }
2834
+ return this;
2835
+ };
2836
+
2837
+ /**
2838
+ * Updates the position of the popper, computing the new offsets and applying the new style
2839
+ * @method
2840
+ * @memberof Popper
2841
+ */
2842
+ Popper.prototype.update = function () {
2843
+ var data = { instance: this, styles: {} };
2844
+
2845
+ // store placement inside the data object, modifiers will be able to edit `placement` if needed
2846
+ // and refer to _originalPlacement to know the original value
2847
+ data.placement = this._options.placement;
2848
+ data._originalPlacement = this._options.placement;
2849
+
2850
+ // compute the popper and reference offsets and put them inside data.offsets
2851
+ data.offsets = this._getOffsets(this._popper, this._reference, data.placement);
2852
+
2853
+ // get boundaries
2854
+ data.boundaries = this._getBoundaries(data, this._options.boundariesPadding, this._options.boundariesElement);
2855
+
2856
+ data = this.runModifiers(data, this._options.modifiers);
2857
+
2858
+ if (typeof this.state.updateCallback === 'function') {
2859
+ this.state.updateCallback(data);
2860
+ }
2861
+ };
2862
+
2863
+ /**
2864
+ * If a function is passed, it will be executed after the initialization of popper with as first argument the Popper instance.
2865
+ * @method
2866
+ * @memberof Popper
2867
+ * @param {Function} callback
2868
+ */
2869
+ Popper.prototype.onCreate = function (callback) {
2870
+ // the createCallbacks return as first argument the popper instance
2871
+ callback(this);
2872
+ return this;
2873
+ };
2874
+
2875
+ /**
2876
+ * If a function is passed, it will be executed after each update of popper with as first argument the set of coordinates and informations
2877
+ * used to style popper and its arrow.
2878
+ * NOTE: it doesn't get fired on the first call of the `Popper.update()` method inside the `Popper` constructor!
2879
+ * @method
2880
+ * @memberof Popper
2881
+ * @param {Function} callback
2882
+ */
2883
+ Popper.prototype.onUpdate = function (callback) {
2884
+ this.state.updateCallback = callback;
2885
+ return this;
2886
+ };
2887
+
2888
+ /**
2889
+ * Helper used to generate poppers from a configuration file
2890
+ * @method
2891
+ * @memberof Popper
2892
+ * @param config {Object} configuration
2893
+ * @returns {HTMLElement} popper
2894
+ */
2895
+ Popper.prototype.parse = function (config) {
2896
+ var defaultConfig = {
2897
+ tagName: 'div',
2898
+ classNames: ['popper'],
2899
+ attributes: [],
2900
+ parent: root.document.body,
2901
+ content: '',
2902
+ contentType: 'text',
2903
+ arrowTagName: 'div',
2904
+ arrowClassNames: ['popper__arrow'],
2905
+ arrowAttributes: ['x-arrow']
2906
+ };
2907
+ config = Object.assign({}, defaultConfig, config);
2908
+
2909
+ var d = root.document;
2910
+
2911
+ var popper = d.createElement(config.tagName);
2912
+ addClassNames(popper, config.classNames);
2913
+ addAttributes(popper, config.attributes);
2914
+ if (config.contentType === 'node') {
2915
+ popper.appendChild(config.content.jquery ? config.content[0] : config.content);
2916
+ } else if (config.contentType === 'html') {
2917
+ popper.innerHTML = config.content;
2918
+ } else {
2919
+ popper.textContent = config.content;
2920
+ }
2921
+
2922
+ if (config.arrowTagName) {
2923
+ var arrow = d.createElement(config.arrowTagName);
2924
+ addClassNames(arrow, config.arrowClassNames);
2925
+ addAttributes(arrow, config.arrowAttributes);
2926
+ popper.appendChild(arrow);
2927
+ }
2928
+
2929
+ var parent = config.parent.jquery ? config.parent[0] : config.parent;
2930
+
2931
+ // if the given parent is a string, use it to match an element
2932
+ // if more than one element is matched, the first one will be used as parent
2933
+ // if no elements are matched, the script will throw an error
2934
+ if (typeof parent === 'string') {
2935
+ parent = d.querySelectorAll(config.parent);
2936
+ if (parent.length > 1) {
2937
+ console.warn('WARNING: the given `parent` query(' + config.parent + ') matched more than one element, the first one will be used');
2938
+ }
2939
+ if (parent.length === 0) {
2940
+ throw 'ERROR: the given `parent` doesn\'t exists!';
2941
+ }
2942
+ parent = parent[0];
2943
+ }
2944
+ // if the given parent is a DOM nodes list or an array of nodes with more than one element,
2945
+ // the first one will be used as parent
2946
+ if (parent.length > 1 && parent instanceof Element === false) {
2947
+ console.warn('WARNING: you have passed as parent a list of elements, the first one will be used');
2948
+ parent = parent[0];
2949
+ }
89
2950
 
90
- /***/ 0:
91
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
2951
+ // append the generated popper to its parent
2952
+ parent.appendChild(popper);
2953
+
2954
+ return popper;
2955
+
2956
+ /**
2957
+ * Adds class names to the given element
2958
+ * @function
2959
+ * @ignore
2960
+ * @param {HTMLElement} target
2961
+ * @param {Array} classes
2962
+ */
2963
+ function addClassNames(element, classNames) {
2964
+ classNames.forEach(function (className) {
2965
+ element.classList.add(className);
2966
+ });
2967
+ }
92
2968
 
93
- "use strict";
94
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
95
- /* globals __VUE_SSR_CONTEXT__ */
2969
+ /**
2970
+ * Adds attributes to the given element
2971
+ * @function
2972
+ * @ignore
2973
+ * @param {HTMLElement} target
2974
+ * @param {Array} attributes
2975
+ * @example
2976
+ * addAttributes(element, [ 'data-info:foobar' ]);
2977
+ */
2978
+ function addAttributes(element, attributes) {
2979
+ attributes.forEach(function (attribute) {
2980
+ element.setAttribute(attribute.split(':')[0], attribute.split(':')[1] || '');
2981
+ });
2982
+ }
2983
+ };
2984
+
2985
+ /**
2986
+ * Helper used to get the position which will be applied to the popper
2987
+ * @method
2988
+ * @memberof Popper
2989
+ * @param config {HTMLElement} popper element
2990
+ * @param reference {HTMLElement} reference element
2991
+ * @returns {String} position
2992
+ */
2993
+ Popper.prototype._getPosition = function (popper, reference) {
2994
+ var container = getOffsetParent(reference);
2995
+
2996
+ if (this._options.forceAbsolute) {
2997
+ return 'absolute';
2998
+ }
96
2999
 
97
- // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
98
- // This module is a runtime utility for cleaner component module output and will
99
- // be included in the final webpack user bundle.
3000
+ // Decide if the popper will be fixed
3001
+ // If the reference element is inside a fixed context, the popper will be fixed as well to allow them to scroll together
3002
+ var isParentFixed = isFixed(reference, container);
3003
+ return isParentFixed ? 'fixed' : 'absolute';
3004
+ };
3005
+
3006
+ /**
3007
+ * Get offsets to the popper
3008
+ * @method
3009
+ * @memberof Popper
3010
+ * @access private
3011
+ * @param {Element} popper - the popper element
3012
+ * @param {Element} reference - the reference element (the popper will be relative to this)
3013
+ * @returns {Object} An object containing the offsets which will be applied to the popper
3014
+ */
3015
+ Popper.prototype._getOffsets = function (popper, reference, placement) {
3016
+ placement = placement.split('-')[0];
3017
+ var popperOffsets = {};
3018
+
3019
+ popperOffsets.position = this.state.position;
3020
+ var isParentFixed = popperOffsets.position === 'fixed';
3021
+
3022
+ //
3023
+ // Get reference element position
3024
+ //
3025
+ var referenceOffsets = getOffsetRectRelativeToCustomParent(reference, getOffsetParent(popper), isParentFixed);
3026
+
3027
+ //
3028
+ // Get popper sizes
3029
+ //
3030
+ var popperRect = getOuterSizes(popper);
3031
+
3032
+ //
3033
+ // Compute offsets of popper
3034
+ //
3035
+
3036
+ // depending by the popper placement we have to compute its offsets slightly differently
3037
+ if (['right', 'left'].indexOf(placement) !== -1) {
3038
+ popperOffsets.top = referenceOffsets.top + referenceOffsets.height / 2 - popperRect.height / 2;
3039
+ if (placement === 'left') {
3040
+ popperOffsets.left = referenceOffsets.left - popperRect.width;
3041
+ } else {
3042
+ popperOffsets.left = referenceOffsets.right;
3043
+ }
3044
+ } else {
3045
+ popperOffsets.left = referenceOffsets.left + referenceOffsets.width / 2 - popperRect.width / 2;
3046
+ if (placement === 'top') {
3047
+ popperOffsets.top = referenceOffsets.top - popperRect.height;
3048
+ } else {
3049
+ popperOffsets.top = referenceOffsets.bottom;
3050
+ }
3051
+ }
100
3052
 
101
- function normalizeComponent(
102
- scriptExports,
103
- render,
104
- staticRenderFns,
105
- functionalTemplate,
106
- injectStyles,
107
- scopeId,
108
- moduleIdentifier /* server only */,
109
- shadowMode /* vue-cli only */
110
- ) {
111
- // Vue.extend constructor export interop
112
- var options =
113
- typeof scriptExports === 'function' ? scriptExports.options : scriptExports
3053
+ // Add width and height to our offsets object
3054
+ popperOffsets.width = popperRect.width;
3055
+ popperOffsets.height = popperRect.height;
3056
+
3057
+ return {
3058
+ popper: popperOffsets,
3059
+ reference: referenceOffsets
3060
+ };
3061
+ };
3062
+
3063
+ /**
3064
+ * Setup needed event listeners used to update the popper position
3065
+ * @method
3066
+ * @memberof Popper
3067
+ * @access private
3068
+ */
3069
+ Popper.prototype._setupEventListeners = function () {
3070
+ // NOTE: 1 DOM access here
3071
+ this.state.updateBound = this.update.bind(this);
3072
+ root.addEventListener('resize', this.state.updateBound);
3073
+ // if the boundariesElement is window we don't need to listen for the scroll event
3074
+ if (this._options.boundariesElement !== 'window') {
3075
+ var target = getScrollParent(this._reference);
3076
+ // here it could be both `body` or `documentElement` thanks to Firefox, we then check both
3077
+ if (target === root.document.body || target === root.document.documentElement) {
3078
+ target = root;
3079
+ }
3080
+ target.addEventListener('scroll', this.state.updateBound);
3081
+ this.state.scrollTarget = target;
3082
+ }
3083
+ };
3084
+
3085
+ /**
3086
+ * Remove event listeners used to update the popper position
3087
+ * @method
3088
+ * @memberof Popper
3089
+ * @access private
3090
+ */
3091
+ Popper.prototype._removeEventListeners = function () {
3092
+ // NOTE: 1 DOM access here
3093
+ root.removeEventListener('resize', this.state.updateBound);
3094
+ if (this._options.boundariesElement !== 'window' && this.state.scrollTarget) {
3095
+ this.state.scrollTarget.removeEventListener('scroll', this.state.updateBound);
3096
+ this.state.scrollTarget = null;
3097
+ }
3098
+ this.state.updateBound = null;
3099
+ };
3100
+
3101
+ /**
3102
+ * Computed the boundaries limits and return them
3103
+ * @method
3104
+ * @memberof Popper
3105
+ * @access private
3106
+ * @param {Object} data - Object containing the property "offsets" generated by `_getOffsets`
3107
+ * @param {Number} padding - Boundaries padding
3108
+ * @param {Element} boundariesElement - Element used to define the boundaries
3109
+ * @returns {Object} Coordinates of the boundaries
3110
+ */
3111
+ Popper.prototype._getBoundaries = function (data, padding, boundariesElement) {
3112
+ // NOTE: 1 DOM access here
3113
+ var boundaries = {};
3114
+ var width, height;
3115
+ if (boundariesElement === 'window') {
3116
+ var body = root.document.body,
3117
+ html = root.document.documentElement;
3118
+
3119
+ height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
3120
+ width = Math.max(body.scrollWidth, body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth);
3121
+
3122
+ boundaries = {
3123
+ top: 0,
3124
+ right: width,
3125
+ bottom: height,
3126
+ left: 0
3127
+ };
3128
+ } else if (boundariesElement === 'viewport') {
3129
+ var offsetParent = getOffsetParent(this._popper);
3130
+ var scrollParent = getScrollParent(this._popper);
3131
+ var offsetParentRect = getOffsetRect(offsetParent);
3132
+
3133
+ // Thanks the fucking native API, `document.body.scrollTop` & `document.documentElement.scrollTop`
3134
+ var getScrollTopValue = function getScrollTopValue(element) {
3135
+ return element == document.body ? Math.max(document.documentElement.scrollTop, document.body.scrollTop) : element.scrollTop;
3136
+ };
3137
+ var getScrollLeftValue = function getScrollLeftValue(element) {
3138
+ return element == document.body ? Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) : element.scrollLeft;
3139
+ };
3140
+
3141
+ // if the popper is fixed we don't have to substract scrolling from the boundaries
3142
+ var scrollTop = data.offsets.popper.position === 'fixed' ? 0 : getScrollTopValue(scrollParent);
3143
+ var scrollLeft = data.offsets.popper.position === 'fixed' ? 0 : getScrollLeftValue(scrollParent);
3144
+
3145
+ boundaries = {
3146
+ top: 0 - (offsetParentRect.top - scrollTop),
3147
+ right: root.document.documentElement.clientWidth - (offsetParentRect.left - scrollLeft),
3148
+ bottom: root.document.documentElement.clientHeight - (offsetParentRect.top - scrollTop),
3149
+ left: 0 - (offsetParentRect.left - scrollLeft)
3150
+ };
3151
+ } else {
3152
+ if (getOffsetParent(this._popper) === boundariesElement) {
3153
+ boundaries = {
3154
+ top: 0,
3155
+ left: 0,
3156
+ right: boundariesElement.clientWidth,
3157
+ bottom: boundariesElement.clientHeight
3158
+ };
3159
+ } else {
3160
+ boundaries = getOffsetRect(boundariesElement);
3161
+ }
3162
+ }
3163
+ boundaries.left += padding;
3164
+ boundaries.right -= padding;
3165
+ boundaries.top = boundaries.top + padding;
3166
+ boundaries.bottom = boundaries.bottom - padding;
3167
+ return boundaries;
3168
+ };
3169
+
3170
+ /**
3171
+ * Loop trough the list of modifiers and run them in order, each of them will then edit the data object
3172
+ * @method
3173
+ * @memberof Popper
3174
+ * @access public
3175
+ * @param {Object} data
3176
+ * @param {Array} modifiers
3177
+ * @param {Function} ends
3178
+ */
3179
+ Popper.prototype.runModifiers = function (data, modifiers, ends) {
3180
+ var modifiersToRun = modifiers.slice();
3181
+ if (ends !== undefined) {
3182
+ modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
3183
+ }
114
3184
 
115
- // render functions
116
- if (render) {
117
- options.render = render
118
- options.staticRenderFns = staticRenderFns
119
- options._compiled = true
120
- }
3185
+ modifiersToRun.forEach(function (modifier) {
3186
+ if (isFunction(modifier)) {
3187
+ data = modifier.call(this, data);
3188
+ }
3189
+ }.bind(this));
3190
+
3191
+ return data;
3192
+ };
3193
+
3194
+ /**
3195
+ * Helper used to know if the given modifier depends from another one.
3196
+ * @method
3197
+ * @memberof Popper
3198
+ * @param {String} requesting - name of requesting modifier
3199
+ * @param {String} requested - name of requested modifier
3200
+ * @returns {Boolean}
3201
+ */
3202
+ Popper.prototype.isModifierRequired = function (requesting, requested) {
3203
+ var index = getArrayKeyIndex(this._options.modifiers, requesting);
3204
+ return !!this._options.modifiers.slice(0, index).filter(function (modifier) {
3205
+ return modifier === requested;
3206
+ }).length;
3207
+ };
3208
+
3209
+ //
3210
+ // Modifiers
3211
+ //
3212
+
3213
+ /**
3214
+ * Modifiers list
3215
+ * @namespace Popper.modifiers
3216
+ * @memberof Popper
3217
+ * @type {Object}
3218
+ */
3219
+ Popper.prototype.modifiers = {};
3220
+
3221
+ /**
3222
+ * Apply the computed styles to the popper element
3223
+ * @method
3224
+ * @memberof Popper.modifiers
3225
+ * @argument {Object} data - The data object generated by `update` method
3226
+ * @returns {Object} The same data object
3227
+ */
3228
+ Popper.prototype.modifiers.applyStyle = function (data) {
3229
+ // apply the final offsets to the popper
3230
+ // NOTE: 1 DOM access here
3231
+ var styles = {
3232
+ position: data.offsets.popper.position
3233
+ };
3234
+
3235
+ // round top and left to avoid blurry text
3236
+ var left = Math.round(data.offsets.popper.left);
3237
+ var top = Math.round(data.offsets.popper.top);
3238
+
3239
+ // if gpuAcceleration is set to true and transform is supported, we use `translate3d` to apply the position to the popper
3240
+ // we automatically use the supported prefixed version if needed
3241
+ var prefixedProperty;
3242
+ if (this._options.gpuAcceleration && (prefixedProperty = getSupportedPropertyName('transform'))) {
3243
+ styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
3244
+ styles.top = 0;
3245
+ styles.left = 0;
3246
+ }
3247
+ // othwerise, we use the standard `left` and `top` properties
3248
+ else {
3249
+ styles.left = left;
3250
+ styles.top = top;
3251
+ }
3252
+
3253
+ // any property present in `data.styles` will be applied to the popper,
3254
+ // in this way we can make the 3rd party modifiers add custom styles to it
3255
+ // Be aware, modifiers could override the properties defined in the previous
3256
+ // lines of this modifier!
3257
+ Object.assign(styles, data.styles);
3258
+
3259
+ setStyle(this._popper, styles);
3260
+
3261
+ // set an attribute which will be useful to style the tooltip (use it to properly position its arrow)
3262
+ // NOTE: 1 DOM access here
3263
+ this._popper.setAttribute('x-placement', data.placement);
3264
+
3265
+ // if the arrow modifier is required and the arrow style has been computed, apply the arrow style
3266
+ if (this.isModifierRequired(this.modifiers.applyStyle, this.modifiers.arrow) && data.offsets.arrow) {
3267
+ setStyle(data.arrowElement, data.offsets.arrow);
3268
+ }
121
3269
 
122
- // functional template
123
- if (functionalTemplate) {
124
- options.functional = true
125
- }
3270
+ return data;
3271
+ };
3272
+
3273
+ /**
3274
+ * Modifier used to shift the popper on the start or end of its reference element side
3275
+ * @method
3276
+ * @memberof Popper.modifiers
3277
+ * @argument {Object} data - The data object generated by `update` method
3278
+ * @returns {Object} The data object, properly modified
3279
+ */
3280
+ Popper.prototype.modifiers.shift = function (data) {
3281
+ var placement = data.placement;
3282
+ var basePlacement = placement.split('-')[0];
3283
+ var shiftVariation = placement.split('-')[1];
3284
+
3285
+ // if shift shiftVariation is specified, run the modifier
3286
+ if (shiftVariation) {
3287
+ var reference = data.offsets.reference;
3288
+ var popper = getPopperClientRect(data.offsets.popper);
3289
+
3290
+ var shiftOffsets = {
3291
+ y: {
3292
+ start: { top: reference.top },
3293
+ end: { top: reference.top + reference.height - popper.height }
3294
+ },
3295
+ x: {
3296
+ start: { left: reference.left },
3297
+ end: { left: reference.left + reference.width - popper.width }
3298
+ }
3299
+ };
126
3300
 
127
- // scopedId
128
- if (scopeId) {
129
- options._scopeId = 'data-v-' + scopeId
130
- }
3301
+ var axis = ['bottom', 'top'].indexOf(basePlacement) !== -1 ? 'x' : 'y';
131
3302
 
132
- var hook
133
- if (moduleIdentifier) {
134
- // server build
135
- hook = function (context) {
136
- // 2.3 injection
137
- context =
138
- context || // cached call
139
- (this.$vnode && this.$vnode.ssrContext) || // stateful
140
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
141
- // 2.2 with runInNewContext: true
142
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
143
- context = __VUE_SSR_CONTEXT__
144
- }
145
- // inject component styles
146
- if (injectStyles) {
147
- injectStyles.call(this, context)
148
- }
149
- // register component module identifier for async chunk inferrence
150
- if (context && context._registeredComponents) {
151
- context._registeredComponents.add(moduleIdentifier)
152
- }
3303
+ data.offsets.popper = Object.assign(popper, shiftOffsets[axis][shiftVariation]);
3304
+ }
3305
+
3306
+ return data;
3307
+ };
3308
+
3309
+ /**
3310
+ * Modifier used to make sure the popper does not overflows from it's boundaries
3311
+ * @method
3312
+ * @memberof Popper.modifiers
3313
+ * @argument {Object} data - The data object generated by `update` method
3314
+ * @returns {Object} The data object, properly modified
3315
+ */
3316
+ Popper.prototype.modifiers.preventOverflow = function (data) {
3317
+ var order = this._options.preventOverflowOrder;
3318
+ var popper = getPopperClientRect(data.offsets.popper);
3319
+
3320
+ var check = {
3321
+ left: function left() {
3322
+ var left = popper.left;
3323
+ if (popper.left < data.boundaries.left) {
3324
+ left = Math.max(popper.left, data.boundaries.left);
3325
+ }
3326
+ return { left: left };
3327
+ },
3328
+ right: function right() {
3329
+ var left = popper.left;
3330
+ if (popper.right > data.boundaries.right) {
3331
+ left = Math.min(popper.left, data.boundaries.right - popper.width);
3332
+ }
3333
+ return { left: left };
3334
+ },
3335
+ top: function top() {
3336
+ var top = popper.top;
3337
+ if (popper.top < data.boundaries.top) {
3338
+ top = Math.max(popper.top, data.boundaries.top);
3339
+ }
3340
+ return { top: top };
3341
+ },
3342
+ bottom: function bottom() {
3343
+ var top = popper.top;
3344
+ if (popper.bottom > data.boundaries.bottom) {
3345
+ top = Math.min(popper.top, data.boundaries.bottom - popper.height);
3346
+ }
3347
+ return { top: top };
3348
+ }
3349
+ };
3350
+
3351
+ order.forEach(function (direction) {
3352
+ data.offsets.popper = Object.assign(popper, check[direction]());
3353
+ });
3354
+
3355
+ return data;
3356
+ };
3357
+
3358
+ /**
3359
+ * Modifier used to make sure the popper is always near its reference
3360
+ * @method
3361
+ * @memberof Popper.modifiers
3362
+ * @argument {Object} data - The data object generated by _update method
3363
+ * @returns {Object} The data object, properly modified
3364
+ */
3365
+ Popper.prototype.modifiers.keepTogether = function (data) {
3366
+ var popper = getPopperClientRect(data.offsets.popper);
3367
+ var reference = data.offsets.reference;
3368
+ var f = Math.floor;
3369
+
3370
+ if (popper.right < f(reference.left)) {
3371
+ data.offsets.popper.left = f(reference.left) - popper.width;
3372
+ }
3373
+ if (popper.left > f(reference.right)) {
3374
+ data.offsets.popper.left = f(reference.right);
3375
+ }
3376
+ if (popper.bottom < f(reference.top)) {
3377
+ data.offsets.popper.top = f(reference.top) - popper.height;
3378
+ }
3379
+ if (popper.top > f(reference.bottom)) {
3380
+ data.offsets.popper.top = f(reference.bottom);
3381
+ }
3382
+
3383
+ return data;
3384
+ };
3385
+
3386
+ /**
3387
+ * Modifier used to flip the placement of the popper when the latter is starting overlapping its reference element.
3388
+ * Requires the `preventOverflow` modifier before it in order to work.
3389
+ * **NOTE:** This modifier will run all its previous modifiers everytime it tries to flip the popper!
3390
+ * @method
3391
+ * @memberof Popper.modifiers
3392
+ * @argument {Object} data - The data object generated by _update method
3393
+ * @returns {Object} The data object, properly modified
3394
+ */
3395
+ Popper.prototype.modifiers.flip = function (data) {
3396
+ // check if preventOverflow is in the list of modifiers before the flip modifier.
3397
+ // otherwise flip would not work as expected.
3398
+ if (!this.isModifierRequired(this.modifiers.flip, this.modifiers.preventOverflow)) {
3399
+ console.warn('WARNING: preventOverflow modifier is required by flip modifier in order to work, be sure to include it before flip!');
3400
+ return data;
3401
+ }
3402
+
3403
+ if (data.flipped && data.placement === data._originalPlacement) {
3404
+ // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides
3405
+ return data;
3406
+ }
3407
+
3408
+ var placement = data.placement.split('-')[0];
3409
+ var placementOpposite = getOppositePlacement(placement);
3410
+ var variation = data.placement.split('-')[1] || '';
3411
+
3412
+ var flipOrder = [];
3413
+ if (this._options.flipBehavior === 'flip') {
3414
+ flipOrder = [placement, placementOpposite];
3415
+ } else {
3416
+ flipOrder = this._options.flipBehavior;
3417
+ }
3418
+
3419
+ flipOrder.forEach(function (step, index) {
3420
+ if (placement !== step || flipOrder.length === index + 1) {
3421
+ return;
3422
+ }
3423
+
3424
+ placement = data.placement.split('-')[0];
3425
+ placementOpposite = getOppositePlacement(placement);
3426
+
3427
+ var popperOffsets = getPopperClientRect(data.offsets.popper);
3428
+
3429
+ // this boolean is used to distinguish right and bottom from top and left
3430
+ // they need different computations to get flipped
3431
+ var a = ['right', 'bottom'].indexOf(placement) !== -1;
3432
+
3433
+ // using Math.floor because the reference offsets may contain decimals we are not going to consider here
3434
+ if (a && Math.floor(data.offsets.reference[placement]) > Math.floor(popperOffsets[placementOpposite]) || !a && Math.floor(data.offsets.reference[placement]) < Math.floor(popperOffsets[placementOpposite])) {
3435
+ // we'll use this boolean to detect any flip loop
3436
+ data.flipped = true;
3437
+ data.placement = flipOrder[index + 1];
3438
+ if (variation) {
3439
+ data.placement += '-' + variation;
3440
+ }
3441
+ data.offsets.popper = this._getOffsets(this._popper, this._reference, data.placement).popper;
3442
+
3443
+ data = this.runModifiers(data, this._options.modifiers, this._flip);
3444
+ }
3445
+ }.bind(this));
3446
+ return data;
3447
+ };
3448
+
3449
+ /**
3450
+ * Modifier used to add an offset to the popper, useful if you more granularity positioning your popper.
3451
+ * The offsets will shift the popper on the side of its reference element.
3452
+ * @method
3453
+ * @memberof Popper.modifiers
3454
+ * @argument {Object} data - The data object generated by _update method
3455
+ * @returns {Object} The data object, properly modified
3456
+ */
3457
+ Popper.prototype.modifiers.offset = function (data) {
3458
+ var offset = this._options.offset;
3459
+ var popper = data.offsets.popper;
3460
+
3461
+ if (data.placement.indexOf('left') !== -1) {
3462
+ popper.top -= offset;
3463
+ } else if (data.placement.indexOf('right') !== -1) {
3464
+ popper.top += offset;
3465
+ } else if (data.placement.indexOf('top') !== -1) {
3466
+ popper.left -= offset;
3467
+ } else if (data.placement.indexOf('bottom') !== -1) {
3468
+ popper.left += offset;
3469
+ }
3470
+ return data;
3471
+ };
3472
+
3473
+ /**
3474
+ * Modifier used to move the arrows on the edge of the popper to make sure them are always between the popper and the reference element
3475
+ * It will use the CSS outer size of the arrow element to know how many pixels of conjuction are needed
3476
+ * @method
3477
+ * @memberof Popper.modifiers
3478
+ * @argument {Object} data - The data object generated by _update method
3479
+ * @returns {Object} The data object, properly modified
3480
+ */
3481
+ Popper.prototype.modifiers.arrow = function (data) {
3482
+ var arrow = this._options.arrowElement;
3483
+ var arrowOffset = this._options.arrowOffset;
3484
+
3485
+ // if the arrowElement is a string, suppose it's a CSS selector
3486
+ if (typeof arrow === 'string') {
3487
+ arrow = this._popper.querySelector(arrow);
3488
+ }
3489
+
3490
+ // if arrow element is not found, don't run the modifier
3491
+ if (!arrow) {
3492
+ return data;
3493
+ }
3494
+
3495
+ // the arrow element must be child of its popper
3496
+ if (!this._popper.contains(arrow)) {
3497
+ console.warn('WARNING: `arrowElement` must be child of its popper element!');
3498
+ return data;
3499
+ }
3500
+
3501
+ // arrow depends on keepTogether in order to work
3502
+ if (!this.isModifierRequired(this.modifiers.arrow, this.modifiers.keepTogether)) {
3503
+ console.warn('WARNING: keepTogether modifier is required by arrow modifier in order to work, be sure to include it before arrow!');
3504
+ return data;
3505
+ }
3506
+
3507
+ var arrowStyle = {};
3508
+ var placement = data.placement.split('-')[0];
3509
+ var popper = getPopperClientRect(data.offsets.popper);
3510
+ var reference = data.offsets.reference;
3511
+ var isVertical = ['left', 'right'].indexOf(placement) !== -1;
3512
+
3513
+ var len = isVertical ? 'height' : 'width';
3514
+ var side = isVertical ? 'top' : 'left';
3515
+ var translate = isVertical ? 'translateY' : 'translateX';
3516
+ var altSide = isVertical ? 'left' : 'top';
3517
+ var opSide = isVertical ? 'bottom' : 'right';
3518
+ var arrowSize = getOuterSizes(arrow)[len];
3519
+
3520
+ //
3521
+ // extends keepTogether behavior making sure the popper and its reference have enough pixels in conjuction
3522
+ //
3523
+
3524
+ // top/left side
3525
+ if (reference[opSide] - arrowSize < popper[side]) {
3526
+ data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowSize);
3527
+ }
3528
+ // bottom/right side
3529
+ if (reference[side] + arrowSize > popper[opSide]) {
3530
+ data.offsets.popper[side] += reference[side] + arrowSize - popper[opSide];
3531
+ }
3532
+
3533
+ // compute center of the popper
3534
+ var center = reference[side] + (arrowOffset || reference[len] / 2 - arrowSize / 2);
3535
+
3536
+ var sideValue = center - popper[side];
3537
+
3538
+ // prevent arrow from being placed not contiguously to its popper
3539
+ sideValue = Math.max(Math.min(popper[len] - arrowSize - 8, sideValue), 8);
3540
+ arrowStyle[side] = sideValue;
3541
+ arrowStyle[altSide] = ''; // make sure to remove any old style from the arrow
3542
+
3543
+ data.offsets.arrow = arrowStyle;
3544
+ data.arrowElement = arrow;
3545
+
3546
+ return data;
3547
+ };
3548
+
3549
+ //
3550
+ // Helpers
3551
+ //
3552
+
3553
+ /**
3554
+ * Get the outer sizes of the given element (offset size + margins)
3555
+ * @function
3556
+ * @ignore
3557
+ * @argument {Element} element
3558
+ * @returns {Object} object containing width and height properties
3559
+ */
3560
+ function getOuterSizes(element) {
3561
+ // NOTE: 1 DOM access here
3562
+ var _display = element.style.display,
3563
+ _visibility = element.style.visibility;
3564
+ element.style.display = 'block';element.style.visibility = 'hidden';
3565
+ var calcWidthToForceRepaint = element.offsetWidth;
3566
+
3567
+ // original method
3568
+ var styles = root.getComputedStyle(element);
3569
+ var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
3570
+ var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
3571
+ var result = { width: element.offsetWidth + y, height: element.offsetHeight + x };
3572
+
3573
+ // reset element styles
3574
+ element.style.display = _display;element.style.visibility = _visibility;
3575
+ return result;
153
3576
  }
154
- // used by ssr in case component is cached and beforeCreate
155
- // never gets called
156
- options._ssrRegister = hook
157
- } else if (injectStyles) {
158
- hook = shadowMode
159
- ? function () {
160
- injectStyles.call(
161
- this,
162
- (options.functional ? this.parent : this).$root.$options.shadowRoot
163
- )
3577
+
3578
+ /**
3579
+ * Get the opposite placement of the given one/
3580
+ * @function
3581
+ * @ignore
3582
+ * @argument {String} placement
3583
+ * @returns {String} flipped placement
3584
+ */
3585
+ function getOppositePlacement(placement) {
3586
+ var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
3587
+ return placement.replace(/left|right|bottom|top/g, function (matched) {
3588
+ return hash[matched];
3589
+ });
3590
+ }
3591
+
3592
+ /**
3593
+ * Given the popper offsets, generate an output similar to getBoundingClientRect
3594
+ * @function
3595
+ * @ignore
3596
+ * @argument {Object} popperOffsets
3597
+ * @returns {Object} ClientRect like output
3598
+ */
3599
+ function getPopperClientRect(popperOffsets) {
3600
+ var offsets = Object.assign({}, popperOffsets);
3601
+ offsets.right = offsets.left + offsets.width;
3602
+ offsets.bottom = offsets.top + offsets.height;
3603
+ return offsets;
3604
+ }
3605
+
3606
+ /**
3607
+ * Given an array and the key to find, returns its index
3608
+ * @function
3609
+ * @ignore
3610
+ * @argument {Array} arr
3611
+ * @argument keyToFind
3612
+ * @returns index or null
3613
+ */
3614
+ function getArrayKeyIndex(arr, keyToFind) {
3615
+ var i = 0,
3616
+ key;
3617
+ for (key in arr) {
3618
+ if (arr[key] === keyToFind) {
3619
+ return i;
3620
+ }
3621
+ i++;
164
3622
  }
165
- : injectStyles
166
- }
3623
+ return null;
3624
+ }
167
3625
 
168
- if (hook) {
169
- if (options.functional) {
170
- // for template-only hot-reload because in that case the render fn doesn't
171
- // go through the normalizer
172
- options._injectStyles = hook
173
- // register for functional component in vue file
174
- var originalRender = options.render
175
- options.render = function renderWithStyleInjection(h, context) {
176
- hook.call(context)
177
- return originalRender(h, context)
178
- }
179
- } else {
180
- // inject component registration as beforeCreate hook
181
- var existing = options.beforeCreate
182
- options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
3626
+ /**
3627
+ * Get CSS computed property of the given element
3628
+ * @function
3629
+ * @ignore
3630
+ * @argument {Eement} element
3631
+ * @argument {String} property
3632
+ */
3633
+ function getStyleComputedProperty(element, property) {
3634
+ // NOTE: 1 DOM access here
3635
+ var css = root.getComputedStyle(element, null);
3636
+ return css[property];
183
3637
  }
184
- }
185
3638
 
186
- return {
187
- exports: scriptExports,
188
- options: options
189
- }
190
- }
3639
+ /**
3640
+ * Returns the offset parent of the given element
3641
+ * @function
3642
+ * @ignore
3643
+ * @argument {Element} element
3644
+ * @returns {Element} offset parent
3645
+ */
3646
+ function getOffsetParent(element) {
3647
+ // NOTE: 1 DOM access here
3648
+ var offsetParent = element.offsetParent;
3649
+ return offsetParent === root.document.body || !offsetParent ? root.document.documentElement : offsetParent;
3650
+ }
191
3651
 
3652
+ /**
3653
+ * Returns the scrolling parent of the given element
3654
+ * @function
3655
+ * @ignore
3656
+ * @argument {Element} element
3657
+ * @returns {Element} offset parent
3658
+ */
3659
+ function getScrollParent(element) {
3660
+ var parent = element.parentNode;
3661
+
3662
+ if (!parent) {
3663
+ return element;
3664
+ }
192
3665
 
193
- /***/ }),
3666
+ if (parent === root.document) {
3667
+ // Firefox puts the scrollTOp value on `documentElement` instead of `body`, we then check which of them is
3668
+ // greater than 0 and return the proper element
3669
+ if (root.document.body.scrollTop || root.document.body.scrollLeft) {
3670
+ return root.document.body;
3671
+ } else {
3672
+ return root.document.documentElement;
3673
+ }
3674
+ }
194
3675
 
195
- /***/ 10:
196
- /***/ (function(module, exports) {
3676
+ // Firefox want us to check `-x` and `-y` variations as well
3677
+ if (['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-x')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-y')) !== -1) {
3678
+ // If the detected scrollParent is body, we perform an additional check on its parentNode
3679
+ // in this way we'll get body if the browser is Chrome-ish, or documentElement otherwise
3680
+ // fixes issue #65
3681
+ return parent;
3682
+ }
3683
+ return getScrollParent(element.parentNode);
3684
+ }
197
3685
 
198
- module.exports = require("cy-element-ui/lib/input");
3686
+ /**
3687
+ * Check if the given element is fixed or is inside a fixed parent
3688
+ * @function
3689
+ * @ignore
3690
+ * @argument {Element} element
3691
+ * @argument {Element} customContainer
3692
+ * @returns {Boolean} answer to "isFixed?"
3693
+ */
3694
+ function isFixed(element) {
3695
+ if (element === root.document.body) {
3696
+ return false;
3697
+ }
3698
+ if (getStyleComputedProperty(element, 'position') === 'fixed') {
3699
+ return true;
3700
+ }
3701
+ return element.parentNode ? isFixed(element.parentNode) : element;
3702
+ }
199
3703
 
200
- /***/ }),
3704
+ /**
3705
+ * Set the style to the given popper
3706
+ * @function
3707
+ * @ignore
3708
+ * @argument {Element} element - Element to apply the style to
3709
+ * @argument {Object} styles - Object with a list of properties and values which will be applied to the element
3710
+ */
3711
+ function setStyle(element, styles) {
3712
+ function is_numeric(n) {
3713
+ return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
3714
+ }
3715
+ Object.keys(styles).forEach(function (prop) {
3716
+ var unit = '';
3717
+ // add unit if the value is numeric and is one of the following
3718
+ if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && is_numeric(styles[prop])) {
3719
+ unit = 'px';
3720
+ }
3721
+ element.style[prop] = styles[prop] + unit;
3722
+ });
3723
+ }
201
3724
 
202
- /***/ 12:
203
- /***/ (function(module, exports) {
3725
+ /**
3726
+ * Check if the given variable is a function
3727
+ * @function
3728
+ * @ignore
3729
+ * @argument {*} functionToCheck - variable to check
3730
+ * @returns {Boolean} answer to: is a function?
3731
+ */
3732
+ function isFunction(functionToCheck) {
3733
+ var getType = {};
3734
+ return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
3735
+ }
204
3736
 
205
- module.exports = require("cy-element-ui/lib/utils/clickoutside");
3737
+ /**
3738
+ * Get the position of the given element, relative to its offset parent
3739
+ * @function
3740
+ * @ignore
3741
+ * @param {Element} element
3742
+ * @return {Object} position - Coordinates of the element and its `scrollTop`
3743
+ */
3744
+ function getOffsetRect(element) {
3745
+ var elementRect = {
3746
+ width: element.offsetWidth,
3747
+ height: element.offsetHeight,
3748
+ left: element.offsetLeft,
3749
+ top: element.offsetTop
3750
+ };
3751
+
3752
+ elementRect.right = elementRect.left + elementRect.width;
3753
+ elementRect.bottom = elementRect.top + elementRect.height;
3754
+
3755
+ // position
3756
+ return elementRect;
3757
+ }
206
3758
 
207
- /***/ }),
3759
+ /**
3760
+ * Get bounding client rect of given element
3761
+ * @function
3762
+ * @ignore
3763
+ * @param {HTMLElement} element
3764
+ * @return {Object} client rect
3765
+ */
3766
+ function getBoundingClientRect(element) {
3767
+ var rect = element.getBoundingClientRect();
3768
+
3769
+ // whether the IE version is lower than 11
3770
+ var isIE = navigator.userAgent.indexOf("MSIE") != -1;
3771
+
3772
+ // fix ie document bounding top always 0 bug
3773
+ var rectTop = isIE && element.tagName === 'HTML' ? -element.scrollTop : rect.top;
3774
+
3775
+ return {
3776
+ left: rect.left,
3777
+ top: rectTop,
3778
+ right: rect.right,
3779
+ bottom: rect.bottom,
3780
+ width: rect.right - rect.left,
3781
+ height: rect.bottom - rectTop
3782
+ };
3783
+ }
208
3784
 
209
- /***/ 13:
210
- /***/ (function(module, exports) {
3785
+ /**
3786
+ * Given an element and one of its parents, return the offset
3787
+ * @function
3788
+ * @ignore
3789
+ * @param {HTMLElement} element
3790
+ * @param {HTMLElement} parent
3791
+ * @return {Object} rect
3792
+ */
3793
+ function getOffsetRectRelativeToCustomParent(element, parent, fixed) {
3794
+ var elementRect = getBoundingClientRect(element);
3795
+ var parentRect = getBoundingClientRect(parent);
3796
+
3797
+ if (fixed) {
3798
+ var scrollParent = getScrollParent(parent);
3799
+ parentRect.top += scrollParent.scrollTop;
3800
+ parentRect.bottom += scrollParent.scrollTop;
3801
+ parentRect.left += scrollParent.scrollLeft;
3802
+ parentRect.right += scrollParent.scrollLeft;
3803
+ }
211
3804
 
212
- module.exports = require("cy-element-ui/lib/button");
3805
+ var rect = {
3806
+ top: elementRect.top - parentRect.top,
3807
+ left: elementRect.left - parentRect.left,
3808
+ bottom: elementRect.top - parentRect.top + elementRect.height,
3809
+ right: elementRect.left - parentRect.left + elementRect.width,
3810
+ width: elementRect.width,
3811
+ height: elementRect.height
3812
+ };
3813
+ return rect;
3814
+ }
213
3815
 
214
- /***/ }),
3816
+ /**
3817
+ * Get the prefixed supported property name
3818
+ * @function
3819
+ * @ignore
3820
+ * @argument {String} property (camelCase)
3821
+ * @returns {String} prefixed property (camelCase)
3822
+ */
3823
+ function getSupportedPropertyName(property) {
3824
+ var prefixes = ['', 'ms', 'webkit', 'moz', 'o'];
3825
+
3826
+ for (var i = 0; i < prefixes.length; i++) {
3827
+ var toCheck = prefixes[i] ? prefixes[i] + property.charAt(0).toUpperCase() + property.slice(1) : property;
3828
+ if (typeof root.document.body.style[toCheck] !== 'undefined') {
3829
+ return toCheck;
3830
+ }
3831
+ }
3832
+ return null;
3833
+ }
215
3834
 
216
- /***/ 4:
217
- /***/ (function(module, exports) {
3835
+ /**
3836
+ * The Object.assign() method is used to copy the values of all enumerable own properties from one or more source
3837
+ * objects to a target object. It will return the target object.
3838
+ * This polyfill doesn't support symbol properties, since ES5 doesn't have symbols anyway
3839
+ * Source: https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
3840
+ * @function
3841
+ * @ignore
3842
+ */
3843
+ if (!Object.assign) {
3844
+ Object.defineProperty(Object, 'assign', {
3845
+ enumerable: false,
3846
+ configurable: true,
3847
+ writable: true,
3848
+ value: function value(target) {
3849
+ if (target === undefined || target === null) {
3850
+ throw new TypeError('Cannot convert first argument to object');
3851
+ }
3852
+
3853
+ var to = Object(target);
3854
+ for (var i = 1; i < arguments.length; i++) {
3855
+ var nextSource = arguments[i];
3856
+ if (nextSource === undefined || nextSource === null) {
3857
+ continue;
3858
+ }
3859
+ nextSource = Object(nextSource);
3860
+
3861
+ var keysArray = Object.keys(nextSource);
3862
+ for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
3863
+ var nextKey = keysArray[nextIndex];
3864
+ var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
3865
+ if (desc !== undefined && desc.enumerable) {
3866
+ to[nextKey] = nextSource[nextKey];
3867
+ }
3868
+ }
3869
+ }
3870
+ return to;
3871
+ }
3872
+ });
3873
+ }
218
3874
 
219
- module.exports = require("cy-element-ui/lib/mixins/emitter");
3875
+ return Popper;
3876
+ });
220
3877
 
221
3878
  /***/ }),
3879
+ /* 24 */,
3880
+ /* 25 */,
3881
+ /* 26 */,
3882
+ /* 27 */
3883
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
3884
+
3885
+ "use strict";
3886
+ // ESM COMPAT FLAG
3887
+ __webpack_require__.r(__webpack_exports__);
3888
+
3889
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button.vue?vue&type=template&id=7105114a
3890
+ var render = function render() {
3891
+ var _vm = this,
3892
+ _c = _vm._self._c
3893
+ return _c(
3894
+ "button",
3895
+ {
3896
+ staticClass: "el-button",
3897
+ class: [
3898
+ _vm.type ? "el-button--" + _vm.type : "",
3899
+ _vm.buttonSize ? "el-button--" + _vm.buttonSize : "",
3900
+ {
3901
+ "is-disabled": _vm.buttonDisabled,
3902
+ "is-loading": _vm.loading,
3903
+ "is-plain": _vm.plain,
3904
+ "is-round": _vm.round,
3905
+ "is-circle": _vm.circle,
3906
+ },
3907
+ ],
3908
+ attrs: {
3909
+ disabled: _vm.buttonDisabled || _vm.loading,
3910
+ autofocus: _vm.autofocus,
3911
+ type: _vm.nativeType,
3912
+ },
3913
+ on: { click: _vm.handleClick },
3914
+ },
3915
+ [
3916
+ _vm.loading ? _c("i", { staticClass: "el-icon-loading" }) : _vm._e(),
3917
+ _vm.icon && !_vm.loading ? _c("i", { class: _vm.icon }) : _vm._e(),
3918
+ _vm.$slots.default ? _c("span", [_vm._t("default")], 2) : _vm._e(),
3919
+ ]
3920
+ )
3921
+ }
3922
+ var staticRenderFns = []
3923
+ render._withStripped = true
3924
+
3925
+
3926
+ // CONCATENATED MODULE: ./packages/button/src/button.vue?vue&type=template&id=7105114a
3927
+
3928
+ // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button.vue?vue&type=script&lang=js
3929
+
3930
+ /* harmony default export */ var buttonvue_type_script_lang_js = ({
3931
+ name: 'ElButton',
3932
+
3933
+ inject: {
3934
+ elForm: {
3935
+ default: ''
3936
+ },
3937
+ elFormItem: {
3938
+ default: ''
3939
+ }
3940
+ },
3941
+
3942
+ props: {
3943
+ type: {
3944
+ type: String,
3945
+ default: 'default'
3946
+ },
3947
+ size: String,
3948
+ icon: {
3949
+ type: String,
3950
+ default: ''
3951
+ },
3952
+ nativeType: {
3953
+ type: String,
3954
+ default: 'button'
3955
+ },
3956
+ loading: Boolean,
3957
+ disabled: Boolean,
3958
+ plain: Boolean,
3959
+ autofocus: Boolean,
3960
+ round: Boolean,
3961
+ circle: Boolean
3962
+ },
3963
+
3964
+ computed: {
3965
+ _elFormItemSize: function _elFormItemSize() {
3966
+ return (this.elFormItem || {}).elFormItemSize;
3967
+ },
3968
+ buttonSize: function buttonSize() {
3969
+ return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
3970
+ },
3971
+ buttonDisabled: function buttonDisabled() {
3972
+ return this.$options.propsData.hasOwnProperty('disabled') ? this.disabled : (this.elForm || {}).disabled;
3973
+ }
3974
+ },
3975
+
3976
+ methods: {
3977
+ handleClick: function handleClick(evt) {
3978
+ this.$emit('click', evt);
3979
+ }
3980
+ }
3981
+ });
3982
+ // CONCATENATED MODULE: ./packages/button/src/button.vue?vue&type=script&lang=js
3983
+ /* harmony default export */ var src_buttonvue_type_script_lang_js = (buttonvue_type_script_lang_js);
3984
+ // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
3985
+ var componentNormalizer = __webpack_require__(2);
3986
+
3987
+ // CONCATENATED MODULE: ./packages/button/src/button.vue
222
3988
 
223
- /***/ 5:
224
- /***/ (function(module, exports) {
225
3989
 
226
- module.exports = require("cy-element-ui/lib/utils/vue-popper");
227
3990
 
228
- /***/ }),
229
3991
 
230
- /***/ 58:
3992
+
3993
+ /* normalize component */
3994
+
3995
+ var component = Object(componentNormalizer["a" /* default */])(
3996
+ src_buttonvue_type_script_lang_js,
3997
+ render,
3998
+ staticRenderFns,
3999
+ false,
4000
+ null,
4001
+ null,
4002
+ null
4003
+
4004
+ )
4005
+
4006
+ /* harmony default export */ var src_button = (component.exports);
4007
+ // CONCATENATED MODULE: ./packages/button/index.js
4008
+
4009
+
4010
+ /* istanbul ignore next */
4011
+ src_button.install = function (Vue) {
4012
+ Vue.component(src_button.name, src_button);
4013
+ };
4014
+
4015
+ /* harmony default export */ var packages_button = __webpack_exports__["default"] = (src_button);
4016
+
4017
+ /***/ }),
4018
+ /* 28 */,
4019
+ /* 29 */,
4020
+ /* 30 */,
4021
+ /* 31 */,
4022
+ /* 32 */,
4023
+ /* 33 */,
4024
+ /* 34 */,
4025
+ /* 35 */,
4026
+ /* 36 */,
4027
+ /* 37 */,
4028
+ /* 38 */,
4029
+ /* 39 */,
4030
+ /* 40 */,
4031
+ /* 41 */,
4032
+ /* 42 */,
4033
+ /* 43 */,
4034
+ /* 44 */,
4035
+ /* 45 */,
4036
+ /* 46 */,
4037
+ /* 47 */,
4038
+ /* 48 */,
4039
+ /* 49 */,
4040
+ /* 50 */,
4041
+ /* 51 */,
4042
+ /* 52 */,
4043
+ /* 53 */,
4044
+ /* 54 */,
4045
+ /* 55 */,
4046
+ /* 56 */,
4047
+ /* 57 */,
4048
+ /* 58 */,
4049
+ /* 59 */,
4050
+ /* 60 */,
4051
+ /* 61 */
231
4052
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
232
4053
 
233
4054
  "use strict";
@@ -857,7 +4678,7 @@ sv_panelvue_type_template_id_03dc7122_render._withStripped = true
857
4678
  // CONCATENATED MODULE: ./packages/color-picker/src/components/sv-panel.vue?vue&type=template&id=03dc7122
858
4679
 
859
4680
  // EXTERNAL MODULE: external "vue"
860
- var external_vue_ = __webpack_require__(7);
4681
+ var external_vue_ = __webpack_require__(0);
861
4682
  var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
862
4683
 
863
4684
  // CONCATENATED MODULE: ./packages/color-picker/src/draggable.js
@@ -989,7 +4810,7 @@ var isDragging = false;
989
4810
  // CONCATENATED MODULE: ./packages/color-picker/src/components/sv-panel.vue?vue&type=script&lang=js
990
4811
  /* harmony default export */ var components_sv_panelvue_type_script_lang_js = (sv_panelvue_type_script_lang_js);
991
4812
  // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
992
- var componentNormalizer = __webpack_require__(0);
4813
+ var componentNormalizer = __webpack_require__(2);
993
4814
 
994
4815
  // CONCATENATED MODULE: ./packages/color-picker/src/components/sv-panel.vue
995
4816
 
@@ -1456,21 +5277,17 @@ var predefine_component = Object(componentNormalizer["a" /* default */])(
1456
5277
  )
1457
5278
 
1458
5279
  /* harmony default export */ var predefine = (predefine_component.exports);
1459
- // EXTERNAL MODULE: external "cy-element-ui/lib/utils/vue-popper"
1460
- var vue_popper_ = __webpack_require__(5);
1461
- var vue_popper_default = /*#__PURE__*/__webpack_require__.n(vue_popper_);
5280
+ // EXTERNAL MODULE: ./src/utils/vue-popper.js
5281
+ var vue_popper = __webpack_require__(10);
1462
5282
 
1463
- // EXTERNAL MODULE: external "cy-element-ui/lib/mixins/locale"
1464
- var locale_ = __webpack_require__(6);
1465
- var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
5283
+ // EXTERNAL MODULE: ./src/mixins/locale.js
5284
+ var locale = __webpack_require__(13);
1466
5285
 
1467
- // EXTERNAL MODULE: external "cy-element-ui/lib/input"
1468
- var input_ = __webpack_require__(10);
1469
- var input_default = /*#__PURE__*/__webpack_require__.n(input_);
5286
+ // EXTERNAL MODULE: ./packages/input/index.js + 6 modules
5287
+ var input = __webpack_require__(18);
1470
5288
 
1471
- // EXTERNAL MODULE: external "cy-element-ui/lib/button"
1472
- var button_ = __webpack_require__(13);
1473
- var button_default = /*#__PURE__*/__webpack_require__.n(button_);
5289
+ // EXTERNAL MODULE: ./packages/button/index.js + 5 modules
5290
+ var packages_button = __webpack_require__(27);
1474
5291
 
1475
5292
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/components/picker-dropdown.vue?vue&type=script&lang=js
1476
5293
 
@@ -1486,14 +5303,14 @@ var button_default = /*#__PURE__*/__webpack_require__.n(button_);
1486
5303
  /* harmony default export */ var picker_dropdownvue_type_script_lang_js = ({
1487
5304
  name: 'ElColorPickerDropdown',
1488
5305
 
1489
- mixins: [vue_popper_default.a, locale_default.a],
5306
+ mixins: [vue_popper["a" /* default */], locale["a" /* default */]],
1490
5307
 
1491
5308
  components: {
1492
5309
  SvPanel: sv_panel,
1493
5310
  HueSlider: hue_slider,
1494
5311
  AlphaSlider: alpha_slider,
1495
- ElInput: input_default.a,
1496
- ElButton: button_default.a,
5312
+ ElInput: input["default"],
5313
+ ElButton: packages_button["default"],
1497
5314
  Predefine: predefine
1498
5315
  },
1499
5316
 
@@ -1583,13 +5400,11 @@ var picker_dropdown_component = Object(componentNormalizer["a" /* default */])(
1583
5400
  )
1584
5401
 
1585
5402
  /* harmony default export */ var picker_dropdown = (picker_dropdown_component.exports);
1586
- // EXTERNAL MODULE: external "cy-element-ui/lib/utils/clickoutside"
1587
- var clickoutside_ = __webpack_require__(12);
1588
- var clickoutside_default = /*#__PURE__*/__webpack_require__.n(clickoutside_);
5403
+ // EXTERNAL MODULE: ./src/utils/clickoutside.js
5404
+ var clickoutside = __webpack_require__(21);
1589
5405
 
1590
- // EXTERNAL MODULE: external "cy-element-ui/lib/mixins/emitter"
1591
- var emitter_ = __webpack_require__(4);
1592
- var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
5406
+ // EXTERNAL MODULE: ./src/mixins/emitter.js
5407
+ var emitter = __webpack_require__(6);
1593
5408
 
1594
5409
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/color-picker/src/main.vue?vue&type=script&lang=js
1595
5410
 
@@ -1601,7 +5416,7 @@ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
1601
5416
  /* harmony default export */ var mainvue_type_script_lang_js = ({
1602
5417
  name: 'ElColorPicker',
1603
5418
 
1604
- mixins: [emitter_default.a],
5419
+ mixins: [emitter["a" /* default */]],
1605
5420
 
1606
5421
  props: {
1607
5422
  value: String,
@@ -1622,7 +5437,7 @@ var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
1622
5437
  }
1623
5438
  },
1624
5439
 
1625
- directives: { Clickoutside: clickoutside_default.a },
5440
+ directives: { Clickoutside: clickoutside["a" /* default */] },
1626
5441
 
1627
5442
  computed: {
1628
5443
  displayedColor: function displayedColor() {
@@ -1781,20 +5596,5 @@ main.install = function (Vue) {
1781
5596
 
1782
5597
  /* harmony default export */ var color_picker = __webpack_exports__["default"] = (main);
1783
5598
 
1784
- /***/ }),
1785
-
1786
- /***/ 6:
1787
- /***/ (function(module, exports) {
1788
-
1789
- module.exports = require("cy-element-ui/lib/mixins/locale");
1790
-
1791
- /***/ }),
1792
-
1793
- /***/ 7:
1794
- /***/ (function(module, exports) {
1795
-
1796
- module.exports = require("vue");
1797
-
1798
5599
  /***/ })
1799
-
1800
- /******/ });
5600
+ /******/ ]);