cy-element-ui 1.0.48 → 1.0.49

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 (98) hide show
  1. package/lib/alert.js +108 -108
  2. package/lib/aside.js +77 -77
  3. package/lib/autocomplete.js +5199 -360
  4. package/lib/avatar.js +4 -4
  5. package/lib/backtop.js +192 -101
  6. package/lib/badge.js +108 -108
  7. package/lib/breadcrumb-item.js +108 -108
  8. package/lib/breadcrumb.js +94 -94
  9. package/lib/button-group.js +4 -4
  10. package/lib/button.js +4 -4
  11. package/lib/calendar.js +1734 -137
  12. package/lib/card.js +96 -96
  13. package/lib/carousel-item.js +452 -108
  14. package/lib/carousel.js +1256 -105
  15. package/lib/cascader-panel.js +3524 -191
  16. package/lib/cascader.js +8077 -717
  17. package/lib/checkbox-button.js +151 -119
  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 +4705 -828
  24. package/lib/container.js +88 -88
  25. package/lib/date-picker.js +10735 -4739
  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/divider.js +104 -104
  30. package/lib/drawer.js +875 -105
  31. package/lib/dropdown-item.js +128 -96
  32. package/lib/dropdown-menu.js +2301 -99
  33. package/lib/dropdown.js +990 -54
  34. package/lib/element-ui.common.js +31058 -13663
  35. package/lib/empty.js +793 -99
  36. package/lib/fileUpload.js +2542 -26
  37. package/lib/footer.js +77 -77
  38. package/lib/form-item.js +3305 -202
  39. package/lib/form.js +129 -115
  40. package/lib/header.js +77 -77
  41. package/lib/icon.js +67 -67
  42. package/lib/image.js +1662 -146
  43. package/lib/index.js +1 -1
  44. package/lib/infinite-scroll.js +435 -26
  45. package/lib/input-number.js +1421 -32
  46. package/lib/input.js +509 -37
  47. package/lib/link.js +4 -4
  48. package/lib/loading.js +886 -149
  49. package/lib/main.js +64 -64
  50. package/lib/menu-item-group.js +103 -103
  51. package/lib/menu-item.js +3140 -137
  52. package/lib/menu.js +959 -268
  53. package/lib/message-box.js +2743 -188
  54. package/lib/message.js +1196 -118
  55. package/lib/notification.js +1196 -119
  56. package/lib/option-group.js +151 -119
  57. package/lib/option.js +392 -16
  58. package/lib/page-header.js +781 -87
  59. package/lib/pagination.js +7747 -646
  60. package/lib/popconfirm.js +3606 -219
  61. package/lib/popover.js +2604 -79
  62. package/lib/progress.js +4 -4
  63. package/lib/radio-button.js +151 -119
  64. package/lib/radio-group.js +151 -119
  65. package/lib/radio.js +47 -15
  66. package/lib/rate.js +756 -113
  67. package/lib/result.js +108 -108
  68. package/lib/row.js +2 -2
  69. package/lib/scrollbar.js +1813 -41
  70. package/lib/select.js +5547 -209
  71. package/lib/selectDisplayInput.js +4 -4
  72. package/lib/skeleton-item.js +108 -108
  73. package/lib/skeleton.js +108 -108
  74. package/lib/slider.js +4768 -530
  75. package/lib/spinner.js +100 -100
  76. package/lib/statistic.js +9600 -112
  77. package/lib/step.js +108 -108
  78. package/lib/steps.js +514 -99
  79. package/lib/subTitle.js +91 -91
  80. package/lib/submenu.js +2397 -76
  81. package/lib/switch.js +582 -127
  82. package/lib/tab-pane.js +108 -108
  83. package/lib/tabDialog.js +1630 -104
  84. package/lib/table-column.js +1115 -267
  85. package/lib/table.js +7067 -1253
  86. package/lib/tabs.js +1615 -113
  87. package/lib/tag.js +4 -4
  88. package/lib/time-picker.js +6481 -589
  89. package/lib/time-select.js +6334 -407
  90. package/lib/timeline-item.js +108 -108
  91. package/lib/timeline.js +4 -4
  92. package/lib/tooltip.js +2688 -44
  93. package/lib/transfer.js +2238 -146
  94. package/lib/tree.js +1563 -148
  95. package/lib/treeSelect.js +3421 -106
  96. package/lib/upload.js +1198 -31
  97. package/package.json +1 -1
  98. package/src/index.js +1 -1
package/lib/menu.js CHANGED
@@ -82,306 +82,378 @@ module.exports =
82
82
  /******/
83
83
  /******/
84
84
  /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = 76);
85
+ /******/ return __webpack_require__(__webpack_require__.s = 154);
86
86
  /******/ })
87
87
  /************************************************************************/
88
88
  /******/ ({
89
89
 
90
90
  /***/ 0:
91
+ /***/ (function(module, exports) {
92
+
93
+ module.exports = require("vue");
94
+
95
+ /***/ }),
96
+
97
+ /***/ 1:
91
98
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
92
99
 
93
100
  "use strict";
94
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
95
- /* globals __VUE_SSR_CONTEXT__ */
101
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return on; });
102
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return off; });
103
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return once; });
104
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return hasClass; });
105
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; });
106
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return removeClass; });
107
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getStyle; });
108
+ /* unused harmony export setStyle */
109
+ /* unused harmony export isScroll */
110
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getScrollContainer; });
111
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isInContainer; });
112
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
113
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
114
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
96
115
 
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.
116
+ /* istanbul ignore next */
100
117
 
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
114
118
 
115
- // render functions
116
- if (render) {
117
- options.render = render
118
- options.staticRenderFns = staticRenderFns
119
- options._compiled = true
120
- }
121
119
 
122
- // functional template
123
- if (functionalTemplate) {
124
- options.functional = true
125
- }
120
+ var isServer = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer;
121
+ var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
122
+ var MOZ_HACK_REGEXP = /^moz([A-Z])/;
123
+ var ieVersion = isServer ? 0 : Number(document.documentMode);
126
124
 
127
- // scopedId
128
- if (scopeId) {
129
- options._scopeId = 'data-v-' + scopeId
130
- }
125
+ /* istanbul ignore next */
126
+ var trim = function trim(string) {
127
+ return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
128
+ };
129
+ /* istanbul ignore next */
130
+ var camelCase = function camelCase(name) {
131
+ return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
132
+ return offset ? letter.toUpperCase() : letter;
133
+ }).replace(MOZ_HACK_REGEXP, 'Moz$1');
134
+ };
131
135
 
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
- }
153
- }
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
- )
164
- }
165
- : injectStyles
166
- }
136
+ /* istanbul ignore next */
137
+ var on = function () {
138
+ if (!isServer && document.addEventListener) {
139
+ return function (element, event, handler) {
140
+ if (element && event && handler) {
141
+ element.addEventListener(event, handler, false);
142
+ }
143
+ };
144
+ } else {
145
+ return function (element, event, handler) {
146
+ if (element && event && handler) {
147
+ element.attachEvent('on' + event, handler);
148
+ }
149
+ };
150
+ }
151
+ }();
167
152
 
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]
183
- }
184
- }
153
+ /* istanbul ignore next */
154
+ var off = function () {
155
+ if (!isServer && document.removeEventListener) {
156
+ return function (element, event, handler) {
157
+ if (element && event) {
158
+ element.removeEventListener(event, handler, false);
159
+ }
160
+ };
161
+ } else {
162
+ return function (element, event, handler) {
163
+ if (element && event) {
164
+ element.detachEvent('on' + event, handler);
165
+ }
166
+ };
167
+ }
168
+ }();
185
169
 
186
- return {
187
- exports: scriptExports,
188
- options: options
189
- }
190
- }
170
+ /* istanbul ignore next */
171
+ var once = function once(el, event, fn) {
172
+ var listener = function listener() {
173
+ if (fn) {
174
+ fn.apply(this, arguments);
175
+ }
176
+ off(el, event, listener);
177
+ };
178
+ on(el, event, listener);
179
+ };
191
180
 
181
+ /* istanbul ignore next */
182
+ function hasClass(el, cls) {
183
+ if (!el || !cls) return false;
184
+ if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
185
+ if (el.classList) {
186
+ return el.classList.contains(cls);
187
+ } else {
188
+ return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
189
+ }
190
+ };
192
191
 
193
- /***/ }),
192
+ /* istanbul ignore next */
193
+ function addClass(el, cls) {
194
+ if (!el) return;
195
+ var curClass = el.className;
196
+ var classes = (cls || '').split(' ');
197
+
198
+ for (var i = 0, j = classes.length; i < j; i++) {
199
+ var clsName = classes[i];
200
+ if (!clsName) continue;
201
+
202
+ if (el.classList) {
203
+ el.classList.add(clsName);
204
+ } else if (!hasClass(el, clsName)) {
205
+ curClass += ' ' + clsName;
206
+ }
207
+ }
208
+ if (!el.classList) {
209
+ el.setAttribute('class', curClass);
210
+ }
211
+ };
194
212
 
195
- /***/ 11:
196
- /***/ (function(module, exports) {
213
+ /* istanbul ignore next */
214
+ function removeClass(el, cls) {
215
+ if (!el || !cls) return;
216
+ var classes = cls.split(' ');
217
+ var curClass = ' ' + el.className + ' ';
218
+
219
+ for (var i = 0, j = classes.length; i < j; i++) {
220
+ var clsName = classes[i];
221
+ if (!clsName) continue;
222
+
223
+ if (el.classList) {
224
+ el.classList.remove(clsName);
225
+ } else if (hasClass(el, clsName)) {
226
+ curClass = curClass.replace(' ' + clsName + ' ', ' ');
227
+ }
228
+ }
229
+ if (!el.classList) {
230
+ el.setAttribute('class', trim(curClass));
231
+ }
232
+ };
197
233
 
198
- module.exports = require("element-ui/lib/mixins/migrating");
234
+ /* istanbul ignore next */
235
+ var getStyle = ieVersion < 9 ? function (element, styleName) {
236
+ if (isServer) return;
237
+ if (!element || !styleName) return null;
238
+ styleName = camelCase(styleName);
239
+ if (styleName === 'float') {
240
+ styleName = 'styleFloat';
241
+ }
242
+ try {
243
+ switch (styleName) {
244
+ case 'opacity':
245
+ try {
246
+ return element.filters.item('alpha').opacity / 100;
247
+ } catch (e) {
248
+ return 1.0;
249
+ }
250
+ default:
251
+ return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
252
+ }
253
+ } catch (e) {
254
+ return element.style[styleName];
255
+ }
256
+ } : function (element, styleName) {
257
+ if (isServer) return;
258
+ if (!element || !styleName) return null;
259
+ styleName = camelCase(styleName);
260
+ if (styleName === 'float') {
261
+ styleName = 'cssFloat';
262
+ }
263
+ try {
264
+ var computed = document.defaultView.getComputedStyle(element, '');
265
+ return element.style[styleName] || computed ? computed[styleName] : null;
266
+ } catch (e) {
267
+ return element.style[styleName];
268
+ }
269
+ };
199
270
 
200
- /***/ }),
271
+ /* istanbul ignore next */
272
+ function setStyle(element, styleName, value) {
273
+ if (!element || !styleName) return;
201
274
 
202
- /***/ 2:
203
- /***/ (function(module, exports) {
275
+ if ((typeof styleName === 'undefined' ? 'undefined' : _typeof(styleName)) === 'object') {
276
+ for (var prop in styleName) {
277
+ if (styleName.hasOwnProperty(prop)) {
278
+ setStyle(element, prop, styleName[prop]);
279
+ }
280
+ }
281
+ } else {
282
+ styleName = camelCase(styleName);
283
+ if (styleName === 'opacity' && ieVersion < 9) {
284
+ element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
285
+ } else {
286
+ element.style[styleName] = value;
287
+ }
288
+ }
289
+ };
290
+
291
+ var isScroll = function isScroll(el, vertical) {
292
+ if (isServer) return;
293
+
294
+ var determinedDirection = vertical !== null && vertical !== undefined;
295
+ var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
296
+
297
+ return overflow.match(/(scroll|auto|overlay)/);
298
+ };
299
+
300
+ var getScrollContainer = function getScrollContainer(el, vertical) {
301
+ if (isServer) return;
302
+
303
+ var parent = el;
304
+ while (parent) {
305
+ if ([window, document, document.documentElement].includes(parent)) {
306
+ return window;
307
+ }
308
+ if (isScroll(parent, vertical)) {
309
+ return parent;
310
+ }
311
+ parent = parent.parentNode;
312
+ }
313
+
314
+ return parent;
315
+ };
316
+
317
+ var isInContainer = function isInContainer(el, container) {
318
+ if (isServer || !el || !container) return false;
319
+
320
+ var elRect = el.getBoundingClientRect();
321
+ var containerRect = void 0;
322
+
323
+ if ([window, document, document.documentElement, null, undefined].includes(container)) {
324
+ containerRect = {
325
+ top: 0,
326
+ right: window.innerWidth,
327
+ bottom: window.innerHeight,
328
+ left: 0
329
+ };
330
+ } else {
331
+ containerRect = container.getBoundingClientRect();
332
+ }
204
333
 
205
- module.exports = require("element-ui/lib/utils/dom");
334
+ return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
335
+ };
206
336
 
207
337
  /***/ }),
208
338
 
209
- /***/ 4:
210
- /***/ (function(module, exports) {
339
+ /***/ 12:
340
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
341
+
342
+ "use strict";
343
+ /* harmony import */ var element_ui_src_utils_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
211
344
 
212
- module.exports = require("element-ui/lib/mixins/emitter");
345
+ /**
346
+ * Show migrating guide in browser console.
347
+ *
348
+ * Usage:
349
+ * import Migrating from 'element-ui/src/mixins/migrating';
350
+ *
351
+ * mixins: [Migrating]
352
+ *
353
+ * add getMigratingConfig method for your component.
354
+ * getMigratingConfig() {
355
+ * return {
356
+ * props: {
357
+ * 'allow-no-selection': 'allow-no-selection is removed.',
358
+ * 'selection-mode': 'selection-mode is removed.'
359
+ * },
360
+ * events: {
361
+ * selectionchange: 'selectionchange is renamed to selection-change.'
362
+ * }
363
+ * };
364
+ * },
365
+ */
366
+ /* harmony default export */ __webpack_exports__["a"] = ({
367
+ mounted: function mounted() {
368
+ if (true) return;
369
+ if (!this.$vnode) return;
370
+
371
+ var _getMigratingConfig = this.getMigratingConfig(),
372
+ _getMigratingConfig$p = _getMigratingConfig.props,
373
+ props = _getMigratingConfig$p === undefined ? {} : _getMigratingConfig$p,
374
+ _getMigratingConfig$e = _getMigratingConfig.events,
375
+ events = _getMigratingConfig$e === undefined ? {} : _getMigratingConfig$e;
376
+
377
+ var _$vnode = this.$vnode,
378
+ data = _$vnode.data,
379
+ componentOptions = _$vnode.componentOptions;
380
+
381
+ var definedProps = data.attrs || {};
382
+ var definedEvents = componentOptions.listeners || {};
383
+
384
+ for (var propName in definedProps) {
385
+ propName = Object(element_ui_src_utils_util__WEBPACK_IMPORTED_MODULE_0__[/* kebabCase */ "q"])(propName); // compatible with camel case
386
+ if (props[propName]) {
387
+ console.warn('[Element Migrating][' + this.$options.name + '][Attribute]: ' + props[propName]);
388
+ }
389
+ }
390
+
391
+ for (var eventName in definedEvents) {
392
+ eventName = Object(element_ui_src_utils_util__WEBPACK_IMPORTED_MODULE_0__[/* kebabCase */ "q"])(eventName); // compatible with camel case
393
+ if (events[eventName]) {
394
+ console.warn('[Element Migrating][' + this.$options.name + '][Event]: ' + events[eventName]);
395
+ }
396
+ }
397
+ },
398
+
399
+ methods: {
400
+ getMigratingConfig: function getMigratingConfig() {
401
+ return {
402
+ props: {},
403
+ events: {}
404
+ };
405
+ }
406
+ }
407
+ });
213
408
 
214
409
  /***/ }),
215
410
 
216
- /***/ 76:
411
+ /***/ 154:
217
412
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
218
413
 
219
414
  "use strict";
220
415
  // ESM COMPAT FLAG
221
416
  __webpack_require__.r(__webpack_exports__);
222
417
 
223
- // EXTERNAL MODULE: external "element-ui/lib/mixins/emitter"
224
- var emitter_ = __webpack_require__(4);
225
- var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
418
+ // EXTERNAL MODULE: ./src/mixins/emitter.js
419
+ var emitter = __webpack_require__(6);
226
420
 
227
- // EXTERNAL MODULE: external "element-ui/lib/mixins/migrating"
228
- var migrating_ = __webpack_require__(11);
229
- var migrating_default = /*#__PURE__*/__webpack_require__.n(migrating_);
421
+ // EXTERNAL MODULE: ./src/mixins/migrating.js
422
+ var migrating = __webpack_require__(12);
230
423
 
231
- // CONCATENATED MODULE: ./src/utils/aria-utils.js
232
- var aria = aria || {};
424
+ // EXTERNAL MODULE: ./src/utils/aria-utils.js
425
+ var aria_utils = __webpack_require__(30);
233
426
 
234
- aria.Utils = aria.Utils || {};
427
+ // CONCATENATED MODULE: ./src/utils/menu/aria-submenu.js
235
428
 
236
- /**
237
- * @desc Set focus on descendant nodes until the first focusable element is
238
- * found.
239
- * @param element
240
- * DOM node for which to find the first focusable descendant.
241
- * @returns
242
- * true if a focusable element is found and focus is set.
243
- */
244
- aria.Utils.focusFirstDescendant = function (element) {
245
- for (var i = 0; i < element.childNodes.length; i++) {
246
- var child = element.childNodes[i];
247
- if (aria.Utils.attemptFocus(child) || aria.Utils.focusFirstDescendant(child)) {
248
- return true;
249
- }
250
- }
251
- return false;
429
+
430
+ var SubMenu = function SubMenu(parent, domNode) {
431
+ this.domNode = domNode;
432
+ this.parent = parent;
433
+ this.subMenuItems = [];
434
+ this.subIndex = 0;
435
+ this.init();
252
436
  };
253
437
 
254
- /**
255
- * @desc Find the last descendant node that is focusable.
256
- * @param element
257
- * DOM node for which to find the last focusable descendant.
258
- * @returns
259
- * true if a focusable element is found and focus is set.
260
- */
438
+ SubMenu.prototype.init = function () {
439
+ this.subMenuItems = this.domNode.querySelectorAll('li');
440
+ this.addListeners();
441
+ };
261
442
 
262
- aria.Utils.focusLastDescendant = function (element) {
263
- for (var i = element.childNodes.length - 1; i >= 0; i--) {
264
- var child = element.childNodes[i];
265
- if (aria.Utils.attemptFocus(child) || aria.Utils.focusLastDescendant(child)) {
266
- return true;
267
- }
443
+ SubMenu.prototype.gotoSubIndex = function (idx) {
444
+ if (idx === this.subMenuItems.length) {
445
+ idx = 0;
446
+ } else if (idx < 0) {
447
+ idx = this.subMenuItems.length - 1;
268
448
  }
269
- return false;
270
- };
271
-
272
- /**
273
- * @desc Set Attempt to set focus on the current node.
274
- * @param element
275
- * The node to attempt to focus on.
276
- * @returns
277
- * true if element is focused.
278
- */
279
- aria.Utils.attemptFocus = function (element) {
280
- if (!aria.Utils.isFocusable(element)) {
281
- return false;
282
- }
283
- aria.Utils.IgnoreUtilFocusChanges = true;
284
- try {
285
- element.focus();
286
- } catch (e) {}
287
- aria.Utils.IgnoreUtilFocusChanges = false;
288
- return document.activeElement === element;
289
- };
290
-
291
- aria.Utils.isFocusable = function (element) {
292
- if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute('tabIndex') !== null) {
293
- return true;
294
- }
295
-
296
- if (element.disabled) {
297
- return false;
298
- }
299
-
300
- switch (element.nodeName) {
301
- case 'A':
302
- return !!element.href && element.rel !== 'ignore';
303
- case 'INPUT':
304
- return element.type !== 'hidden' && element.type !== 'file';
305
- case 'BUTTON':
306
- case 'SELECT':
307
- case 'TEXTAREA':
308
- return true;
309
- default:
310
- return false;
311
- }
312
- };
313
-
314
- /**
315
- * 触发一个事件
316
- * mouseenter, mouseleave, mouseover, keyup, change, click 等
317
- * @param {Element} elm
318
- * @param {String} name
319
- * @param {*} opts
320
- */
321
- aria.Utils.triggerEvent = function (elm, name) {
322
- var eventName = void 0;
323
-
324
- if (/^mouse|click/.test(name)) {
325
- eventName = 'MouseEvents';
326
- } else if (/^key/.test(name)) {
327
- eventName = 'KeyboardEvent';
328
- } else {
329
- eventName = 'HTMLEvents';
330
- }
331
- var evt = document.createEvent(eventName);
332
-
333
- for (var _len = arguments.length, opts = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
334
- opts[_key - 2] = arguments[_key];
335
- }
336
-
337
- evt.initEvent.apply(evt, [name].concat(opts));
338
- elm.dispatchEvent ? elm.dispatchEvent(evt) : elm.fireEvent('on' + name, evt);
339
-
340
- return elm;
341
- };
342
-
343
- aria.Utils.keys = {
344
- tab: 9,
345
- enter: 13,
346
- space: 32,
347
- left: 37,
348
- up: 38,
349
- right: 39,
350
- down: 40,
351
- esc: 27
352
- };
353
-
354
- /* harmony default export */ var aria_utils = (aria.Utils);
355
- // CONCATENATED MODULE: ./src/utils/menu/aria-submenu.js
356
-
357
-
358
- var SubMenu = function SubMenu(parent, domNode) {
359
- this.domNode = domNode;
360
- this.parent = parent;
361
- this.subMenuItems = [];
362
- this.subIndex = 0;
363
- this.init();
364
- };
365
-
366
- SubMenu.prototype.init = function () {
367
- this.subMenuItems = this.domNode.querySelectorAll('li');
368
- this.addListeners();
369
- };
370
-
371
- SubMenu.prototype.gotoSubIndex = function (idx) {
372
- if (idx === this.subMenuItems.length) {
373
- idx = 0;
374
- } else if (idx < 0) {
375
- idx = this.subMenuItems.length - 1;
376
- }
377
- this.subMenuItems[idx].focus();
378
- this.subIndex = idx;
449
+ this.subMenuItems[idx].focus();
450
+ this.subIndex = idx;
379
451
  };
380
452
 
381
453
  SubMenu.prototype.addListeners = function () {
382
454
  var _this = this;
383
455
 
384
- var keys = aria_utils.keys;
456
+ var keys = aria_utils["a" /* default */].keys;
385
457
  var parentNode = this.parent.domNode;
386
458
  Array.prototype.forEach.call(this.subMenuItems, function (el) {
387
459
  el.addEventListener('keydown', function (event) {
@@ -396,7 +468,7 @@ SubMenu.prototype.addListeners = function () {
396
468
  prevDef = true;
397
469
  break;
398
470
  case keys.tab:
399
- aria_utils.triggerEvent(parentNode, 'mouseleave');
471
+ aria_utils["a" /* default */].triggerEvent(parentNode, 'mouseleave');
400
472
  break;
401
473
  case keys.enter:
402
474
  case keys.space:
@@ -436,22 +508,22 @@ MenuItem.prototype.init = function () {
436
508
  MenuItem.prototype.addListeners = function () {
437
509
  var _this = this;
438
510
 
439
- var keys = aria_utils.keys;
511
+ var keys = aria_utils["a" /* default */].keys;
440
512
  this.domNode.addEventListener('keydown', function (event) {
441
513
  var prevDef = false;
442
514
  switch (event.keyCode) {
443
515
  case keys.down:
444
- aria_utils.triggerEvent(event.currentTarget, 'mouseenter');
516
+ aria_utils["a" /* default */].triggerEvent(event.currentTarget, 'mouseenter');
445
517
  _this.submenu && _this.submenu.gotoSubIndex(0);
446
518
  prevDef = true;
447
519
  break;
448
520
  case keys.up:
449
- aria_utils.triggerEvent(event.currentTarget, 'mouseenter');
521
+ aria_utils["a" /* default */].triggerEvent(event.currentTarget, 'mouseenter');
450
522
  _this.submenu && _this.submenu.gotoSubIndex(_this.submenu.subMenuItems.length - 1);
451
523
  prevDef = true;
452
524
  break;
453
525
  case keys.tab:
454
- aria_utils.triggerEvent(event.currentTarget, 'mouseleave');
526
+ aria_utils["a" /* default */].triggerEvent(event.currentTarget, 'mouseleave');
455
527
  break;
456
528
  case keys.enter:
457
529
  case keys.space:
@@ -483,8 +555,8 @@ Menu.prototype.init = function () {
483
555
  });
484
556
  };
485
557
  /* harmony default export */ var aria_menubar = (Menu);
486
- // EXTERNAL MODULE: external "element-ui/lib/utils/dom"
487
- var dom_ = __webpack_require__(2);
558
+ // EXTERNAL MODULE: ./src/utils/dom.js
559
+ var dom = __webpack_require__(1);
488
560
 
489
561
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/menu/src/menu.vue?vue&type=script&lang=js
490
562
 
@@ -524,7 +596,7 @@ var dom_ = __webpack_require__(2);
524
596
 
525
597
  componentName: 'ElMenu',
526
598
 
527
- mixins: [emitter_default.a, migrating_default.a],
599
+ mixins: [emitter["a" /* default */], migrating["a" /* default */]],
528
600
 
529
601
  provide: function provide() {
530
602
  return {
@@ -546,33 +618,33 @@ var dom_ = __webpack_require__(2);
546
618
  el.style.opacity = 0.2;
547
619
  },
548
620
  enter: function enter(el) {
549
- Object(dom_["addClass"])(el, 'el-opacity-transition');
621
+ Object(dom["a" /* addClass */])(el, 'el-opacity-transition');
550
622
  el.style.opacity = 1;
551
623
  },
552
624
  afterEnter: function afterEnter(el) {
553
- Object(dom_["removeClass"])(el, 'el-opacity-transition');
625
+ Object(dom["i" /* removeClass */])(el, 'el-opacity-transition');
554
626
  el.style.opacity = '';
555
627
  },
556
628
  beforeLeave: function beforeLeave(el) {
557
629
  if (!el.dataset) el.dataset = {};
558
630
 
559
- if (Object(dom_["hasClass"])(el, 'el-menu--collapse')) {
560
- Object(dom_["removeClass"])(el, 'el-menu--collapse');
631
+ if (Object(dom["d" /* hasClass */])(el, 'el-menu--collapse')) {
632
+ Object(dom["i" /* removeClass */])(el, 'el-menu--collapse');
561
633
  el.dataset.oldOverflow = el.style.overflow;
562
634
  el.dataset.scrollWidth = el.clientWidth;
563
- Object(dom_["addClass"])(el, 'el-menu--collapse');
635
+ Object(dom["a" /* addClass */])(el, 'el-menu--collapse');
564
636
  } else {
565
- Object(dom_["addClass"])(el, 'el-menu--collapse');
637
+ Object(dom["a" /* addClass */])(el, 'el-menu--collapse');
566
638
  el.dataset.oldOverflow = el.style.overflow;
567
639
  el.dataset.scrollWidth = el.clientWidth;
568
- Object(dom_["removeClass"])(el, 'el-menu--collapse');
640
+ Object(dom["i" /* removeClass */])(el, 'el-menu--collapse');
569
641
  }
570
642
 
571
643
  el.style.width = el.scrollWidth + 'px';
572
644
  el.style.overflow = 'hidden';
573
645
  },
574
646
  leave: function leave(el) {
575
- Object(dom_["addClass"])(el, 'horizontal-collapse-transition');
647
+ Object(dom["a" /* addClass */])(el, 'horizontal-collapse-transition');
576
648
  el.style.width = el.dataset.scrollWidth + 'px';
577
649
  }
578
650
  }
@@ -828,7 +900,7 @@ var dom_ = __webpack_require__(2);
828
900
  // CONCATENATED MODULE: ./packages/menu/src/menu.vue?vue&type=script&lang=js
829
901
  /* harmony default export */ var src_menuvue_type_script_lang_js = (menuvue_type_script_lang_js);
830
902
  // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
831
- var componentNormalizer = __webpack_require__(0);
903
+ var componentNormalizer = __webpack_require__(2);
832
904
 
833
905
  // CONCATENATED MODULE: ./packages/menu/src/menu.vue
834
906
  var menu_render, staticRenderFns
@@ -860,6 +932,625 @@ menu.install = function (Vue) {
860
932
 
861
933
  /* harmony default export */ var packages_menu = __webpack_exports__["default"] = (menu);
862
934
 
935
+ /***/ }),
936
+
937
+ /***/ 2:
938
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
939
+
940
+ "use strict";
941
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
942
+ /* globals __VUE_SSR_CONTEXT__ */
943
+
944
+ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
945
+ // This module is a runtime utility for cleaner component module output and will
946
+ // be included in the final webpack user bundle.
947
+
948
+ function normalizeComponent(
949
+ scriptExports,
950
+ render,
951
+ staticRenderFns,
952
+ functionalTemplate,
953
+ injectStyles,
954
+ scopeId,
955
+ moduleIdentifier /* server only */,
956
+ shadowMode /* vue-cli only */
957
+ ) {
958
+ // Vue.extend constructor export interop
959
+ var options =
960
+ typeof scriptExports === 'function' ? scriptExports.options : scriptExports
961
+
962
+ // render functions
963
+ if (render) {
964
+ options.render = render
965
+ options.staticRenderFns = staticRenderFns
966
+ options._compiled = true
967
+ }
968
+
969
+ // functional template
970
+ if (functionalTemplate) {
971
+ options.functional = true
972
+ }
973
+
974
+ // scopedId
975
+ if (scopeId) {
976
+ options._scopeId = 'data-v-' + scopeId
977
+ }
978
+
979
+ var hook
980
+ if (moduleIdentifier) {
981
+ // server build
982
+ hook = function (context) {
983
+ // 2.3 injection
984
+ context =
985
+ context || // cached call
986
+ (this.$vnode && this.$vnode.ssrContext) || // stateful
987
+ (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
988
+ // 2.2 with runInNewContext: true
989
+ if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
990
+ context = __VUE_SSR_CONTEXT__
991
+ }
992
+ // inject component styles
993
+ if (injectStyles) {
994
+ injectStyles.call(this, context)
995
+ }
996
+ // register component module identifier for async chunk inferrence
997
+ if (context && context._registeredComponents) {
998
+ context._registeredComponents.add(moduleIdentifier)
999
+ }
1000
+ }
1001
+ // used by ssr in case component is cached and beforeCreate
1002
+ // never gets called
1003
+ options._ssrRegister = hook
1004
+ } else if (injectStyles) {
1005
+ hook = shadowMode
1006
+ ? function () {
1007
+ injectStyles.call(
1008
+ this,
1009
+ (options.functional ? this.parent : this).$root.$options.shadowRoot
1010
+ )
1011
+ }
1012
+ : injectStyles
1013
+ }
1014
+
1015
+ if (hook) {
1016
+ if (options.functional) {
1017
+ // for template-only hot-reload because in that case the render fn doesn't
1018
+ // go through the normalizer
1019
+ options._injectStyles = hook
1020
+ // register for functional component in vue file
1021
+ var originalRender = options.render
1022
+ options.render = function renderWithStyleInjection(h, context) {
1023
+ hook.call(context)
1024
+ return originalRender(h, context)
1025
+ }
1026
+ } else {
1027
+ // inject component registration as beforeCreate hook
1028
+ var existing = options.beforeCreate
1029
+ options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
1030
+ }
1031
+ }
1032
+
1033
+ return {
1034
+ exports: scriptExports,
1035
+ options: options
1036
+ }
1037
+ }
1038
+
1039
+
1040
+ /***/ }),
1041
+
1042
+ /***/ 3:
1043
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1044
+
1045
+ "use strict";
1046
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return noop; });
1047
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return hasOwn; });
1048
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return toObject; });
1049
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getValueByPath; });
1050
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getPropByPath; });
1051
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return generateId; });
1052
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return valueEquals; });
1053
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return escapeRegexpString; });
1054
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return arrayFindIndex; });
1055
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return arrayFind; });
1056
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return coerceTruthyValueToArray; });
1057
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return isIE; });
1058
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return isEdge; });
1059
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return isFirefox; });
1060
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return autoprefixer; });
1061
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return kebabCase; });
1062
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return capitalize; });
1063
+ /* unused harmony export looseEqual */
1064
+ /* unused harmony export arrayEquals */
1065
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return isEqual; });
1066
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return isEmpty; });
1067
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return rafThrottle; });
1068
+ /* unused harmony export objToArray */
1069
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return isMac; });
1070
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1071
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
1072
+ /* harmony import */ var element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
1073
+ 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; };
1074
+
1075
+
1076
+
1077
+
1078
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
1079
+
1080
+ function noop() {};
1081
+
1082
+ function hasOwn(obj, key) {
1083
+ return hasOwnProperty.call(obj, key);
1084
+ };
1085
+
1086
+ function extend(to, _from) {
1087
+ for (var key in _from) {
1088
+ to[key] = _from[key];
1089
+ }
1090
+ return to;
1091
+ };
1092
+
1093
+ function toObject(arr) {
1094
+ var res = {};
1095
+ for (var i = 0; i < arr.length; i++) {
1096
+ if (arr[i]) {
1097
+ extend(res, arr[i]);
1098
+ }
1099
+ }
1100
+ return res;
1101
+ };
1102
+
1103
+ var getValueByPath = function getValueByPath(object, prop) {
1104
+ prop = prop || '';
1105
+ var paths = prop.split('.');
1106
+ var current = object;
1107
+ var result = null;
1108
+ for (var i = 0, j = paths.length; i < j; i++) {
1109
+ var path = paths[i];
1110
+ if (!current) break;
1111
+
1112
+ if (i === j - 1) {
1113
+ result = current[path];
1114
+ break;
1115
+ }
1116
+ current = current[path];
1117
+ }
1118
+ return result;
1119
+ };
1120
+
1121
+ function getPropByPath(obj, path, strict) {
1122
+ var tempObj = obj;
1123
+ path = path.replace(/\[(\w+)\]/g, '.$1');
1124
+ path = path.replace(/^\./, '');
1125
+
1126
+ var keyArr = path.split('.');
1127
+ var i = 0;
1128
+ for (var len = keyArr.length; i < len - 1; ++i) {
1129
+ if (!tempObj && !strict) break;
1130
+ var key = keyArr[i];
1131
+ if (key in tempObj) {
1132
+ tempObj = tempObj[key];
1133
+ } else {
1134
+ if (strict) {
1135
+ throw new Error('please transfer a valid prop path to form item!');
1136
+ }
1137
+ break;
1138
+ }
1139
+ }
1140
+ return {
1141
+ o: tempObj,
1142
+ k: keyArr[i],
1143
+ v: tempObj ? tempObj[keyArr[i]] : null
1144
+ };
1145
+ };
1146
+
1147
+ var generateId = function generateId() {
1148
+ return Math.floor(Math.random() * 10000);
1149
+ };
1150
+
1151
+ var valueEquals = function valueEquals(a, b) {
1152
+ // see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
1153
+ if (a === b) return true;
1154
+ if (!(a instanceof Array)) return false;
1155
+ if (!(b instanceof Array)) return false;
1156
+ if (a.length !== b.length) return false;
1157
+ for (var i = 0; i !== a.length; ++i) {
1158
+ if (a[i] !== b[i]) return false;
1159
+ }
1160
+ return true;
1161
+ };
1162
+
1163
+ var escapeRegexpString = function escapeRegexpString() {
1164
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
1165
+ return String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
1166
+ };
1167
+
1168
+ // TODO: use native Array.find, Array.findIndex when IE support is dropped
1169
+ var arrayFindIndex = function arrayFindIndex(arr, pred) {
1170
+ for (var i = 0; i !== arr.length; ++i) {
1171
+ if (pred(arr[i])) {
1172
+ return i;
1173
+ }
1174
+ }
1175
+ return -1;
1176
+ };
1177
+
1178
+ var arrayFind = function arrayFind(arr, pred) {
1179
+ var idx = arrayFindIndex(arr, pred);
1180
+ return idx !== -1 ? arr[idx] : undefined;
1181
+ };
1182
+
1183
+ // coerce truthy value to array
1184
+ var coerceTruthyValueToArray = function coerceTruthyValueToArray(val) {
1185
+ if (Array.isArray(val)) {
1186
+ return val;
1187
+ } else if (val) {
1188
+ return [val];
1189
+ } else {
1190
+ return [];
1191
+ }
1192
+ };
1193
+
1194
+ var isIE = function isIE() {
1195
+ return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !isNaN(Number(document.documentMode));
1196
+ };
1197
+
1198
+ var isEdge = function isEdge() {
1199
+ return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
1200
+ };
1201
+
1202
+ var isFirefox = function isFirefox() {
1203
+ return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
1204
+ };
1205
+
1206
+ var autoprefixer = function autoprefixer(style) {
1207
+ if ((typeof style === 'undefined' ? 'undefined' : _typeof(style)) !== 'object') return style;
1208
+ var rules = ['transform', 'transition', 'animation'];
1209
+ var prefixes = ['ms-', 'webkit-'];
1210
+ rules.forEach(function (rule) {
1211
+ var value = style[rule];
1212
+ if (rule && value) {
1213
+ prefixes.forEach(function (prefix) {
1214
+ style[prefix + rule] = value;
1215
+ });
1216
+ }
1217
+ });
1218
+ return style;
1219
+ };
1220
+
1221
+ var kebabCase = function kebabCase(str) {
1222
+ var hyphenateRE = /([^-])([A-Z])/g;
1223
+ return str.replace(hyphenateRE, '$1-$2').replace(hyphenateRE, '$1-$2').toLowerCase();
1224
+ };
1225
+
1226
+ var capitalize = function capitalize(str) {
1227
+ if (!Object(element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__[/* isString */ "e"])(str)) return str;
1228
+ return str.charAt(0).toUpperCase() + str.slice(1);
1229
+ };
1230
+
1231
+ var looseEqual = function looseEqual(a, b) {
1232
+ var isObjectA = Object(element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(a);
1233
+ var isObjectB = Object(element_ui_src_utils_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(b);
1234
+ if (isObjectA && isObjectB) {
1235
+ return JSON.stringify(a) === JSON.stringify(b);
1236
+ } else if (!isObjectA && !isObjectB) {
1237
+ return String(a) === String(b);
1238
+ } else {
1239
+ return false;
1240
+ }
1241
+ };
1242
+
1243
+ var arrayEquals = function arrayEquals(arrayA, arrayB) {
1244
+ arrayA = arrayA || [];
1245
+ arrayB = arrayB || [];
1246
+
1247
+ if (arrayA.length !== arrayB.length) {
1248
+ return false;
1249
+ }
1250
+
1251
+ for (var i = 0; i < arrayA.length; i++) {
1252
+ if (!looseEqual(arrayA[i], arrayB[i])) {
1253
+ return false;
1254
+ }
1255
+ }
1256
+
1257
+ return true;
1258
+ };
1259
+
1260
+ var isEqual = function isEqual(value1, value2) {
1261
+ if (Array.isArray(value1) && Array.isArray(value2)) {
1262
+ return arrayEquals(value1, value2);
1263
+ }
1264
+ return looseEqual(value1, value2);
1265
+ };
1266
+
1267
+ var isEmpty = function isEmpty(val) {
1268
+ // null or undefined
1269
+ if (val == null) return true;
1270
+
1271
+ if (typeof val === 'boolean') return false;
1272
+
1273
+ if (typeof val === 'number') return !val;
1274
+
1275
+ if (val instanceof Error) return val.message === '';
1276
+
1277
+ switch (Object.prototype.toString.call(val)) {
1278
+ // String or Array
1279
+ case '[object String]':
1280
+ case '[object Array]':
1281
+ return !val.length;
1282
+
1283
+ // Map or Set or File
1284
+ case '[object File]':
1285
+ case '[object Map]':
1286
+ case '[object Set]':
1287
+ {
1288
+ return !val.size;
1289
+ }
1290
+ // Plain Object
1291
+ case '[object Object]':
1292
+ {
1293
+ return !Object.keys(val).length;
1294
+ }
1295
+ }
1296
+
1297
+ return false;
1298
+ };
1299
+
1300
+ function rafThrottle(fn) {
1301
+ var locked = false;
1302
+ return function () {
1303
+ var _this = this;
1304
+
1305
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
1306
+ args[_key] = arguments[_key];
1307
+ }
1308
+
1309
+ if (locked) return;
1310
+ locked = true;
1311
+ window.requestAnimationFrame(function (_) {
1312
+ fn.apply(_this, args);
1313
+ locked = false;
1314
+ });
1315
+ };
1316
+ }
1317
+
1318
+ function objToArray(obj) {
1319
+ if (Array.isArray(obj)) {
1320
+ return obj;
1321
+ }
1322
+ return isEmpty(obj) ? [] : [obj];
1323
+ }
1324
+
1325
+ var isMac = function isMac() {
1326
+ return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
1327
+ };
1328
+
1329
+ /***/ }),
1330
+
1331
+ /***/ 30:
1332
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1333
+
1334
+ "use strict";
1335
+ var aria = aria || {};
1336
+
1337
+ aria.Utils = aria.Utils || {};
1338
+
1339
+ /**
1340
+ * @desc Set focus on descendant nodes until the first focusable element is
1341
+ * found.
1342
+ * @param element
1343
+ * DOM node for which to find the first focusable descendant.
1344
+ * @returns
1345
+ * true if a focusable element is found and focus is set.
1346
+ */
1347
+ aria.Utils.focusFirstDescendant = function (element) {
1348
+ for (var i = 0; i < element.childNodes.length; i++) {
1349
+ var child = element.childNodes[i];
1350
+ if (aria.Utils.attemptFocus(child) || aria.Utils.focusFirstDescendant(child)) {
1351
+ return true;
1352
+ }
1353
+ }
1354
+ return false;
1355
+ };
1356
+
1357
+ /**
1358
+ * @desc Find the last descendant node that is focusable.
1359
+ * @param element
1360
+ * DOM node for which to find the last focusable descendant.
1361
+ * @returns
1362
+ * true if a focusable element is found and focus is set.
1363
+ */
1364
+
1365
+ aria.Utils.focusLastDescendant = function (element) {
1366
+ for (var i = element.childNodes.length - 1; i >= 0; i--) {
1367
+ var child = element.childNodes[i];
1368
+ if (aria.Utils.attemptFocus(child) || aria.Utils.focusLastDescendant(child)) {
1369
+ return true;
1370
+ }
1371
+ }
1372
+ return false;
1373
+ };
1374
+
1375
+ /**
1376
+ * @desc Set Attempt to set focus on the current node.
1377
+ * @param element
1378
+ * The node to attempt to focus on.
1379
+ * @returns
1380
+ * true if element is focused.
1381
+ */
1382
+ aria.Utils.attemptFocus = function (element) {
1383
+ if (!aria.Utils.isFocusable(element)) {
1384
+ return false;
1385
+ }
1386
+ aria.Utils.IgnoreUtilFocusChanges = true;
1387
+ try {
1388
+ element.focus();
1389
+ } catch (e) {}
1390
+ aria.Utils.IgnoreUtilFocusChanges = false;
1391
+ return document.activeElement === element;
1392
+ };
1393
+
1394
+ aria.Utils.isFocusable = function (element) {
1395
+ if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute('tabIndex') !== null) {
1396
+ return true;
1397
+ }
1398
+
1399
+ if (element.disabled) {
1400
+ return false;
1401
+ }
1402
+
1403
+ switch (element.nodeName) {
1404
+ case 'A':
1405
+ return !!element.href && element.rel !== 'ignore';
1406
+ case 'INPUT':
1407
+ return element.type !== 'hidden' && element.type !== 'file';
1408
+ case 'BUTTON':
1409
+ case 'SELECT':
1410
+ case 'TEXTAREA':
1411
+ return true;
1412
+ default:
1413
+ return false;
1414
+ }
1415
+ };
1416
+
1417
+ /**
1418
+ * 触发一个事件
1419
+ * mouseenter, mouseleave, mouseover, keyup, change, click 等
1420
+ * @param {Element} elm
1421
+ * @param {String} name
1422
+ * @param {*} opts
1423
+ */
1424
+ aria.Utils.triggerEvent = function (elm, name) {
1425
+ var eventName = void 0;
1426
+
1427
+ if (/^mouse|click/.test(name)) {
1428
+ eventName = 'MouseEvents';
1429
+ } else if (/^key/.test(name)) {
1430
+ eventName = 'KeyboardEvent';
1431
+ } else {
1432
+ eventName = 'HTMLEvents';
1433
+ }
1434
+ var evt = document.createEvent(eventName);
1435
+
1436
+ for (var _len = arguments.length, opts = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
1437
+ opts[_key - 2] = arguments[_key];
1438
+ }
1439
+
1440
+ evt.initEvent.apply(evt, [name].concat(opts));
1441
+ elm.dispatchEvent ? elm.dispatchEvent(evt) : elm.fireEvent('on' + name, evt);
1442
+
1443
+ return elm;
1444
+ };
1445
+
1446
+ aria.Utils.keys = {
1447
+ tab: 9,
1448
+ enter: 13,
1449
+ space: 32,
1450
+ left: 37,
1451
+ up: 38,
1452
+ right: 39,
1453
+ down: 40,
1454
+ esc: 27
1455
+ };
1456
+
1457
+ /* harmony default export */ __webpack_exports__["a"] = (aria.Utils);
1458
+
1459
+ /***/ }),
1460
+
1461
+ /***/ 4:
1462
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1463
+
1464
+ "use strict";
1465
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isString; });
1466
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isObject; });
1467
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isHtmlElement; });
1468
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isFunction; });
1469
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isUndefined; });
1470
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isDefined; });
1471
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
1472
+ /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
1473
+ 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; };
1474
+
1475
+
1476
+
1477
+ function isString(obj) {
1478
+ return Object.prototype.toString.call(obj) === '[object String]';
1479
+ }
1480
+
1481
+ function isObject(obj) {
1482
+ return Object.prototype.toString.call(obj) === '[object Object]';
1483
+ }
1484
+
1485
+ function isHtmlElement(node) {
1486
+ return node && node.nodeType === Node.ELEMENT_NODE;
1487
+ }
1488
+
1489
+ /**
1490
+ * - Inspired:
1491
+ * https://github.com/jashkenas/underscore/blob/master/modules/isFunction.js
1492
+ */
1493
+ var isFunction = function isFunction(functionToCheck) {
1494
+ var getType = {};
1495
+ return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
1496
+ };
1497
+
1498
+ if ( true && (typeof Int8Array === 'undefined' ? 'undefined' : _typeof(Int8Array)) !== 'object' && (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer || typeof document.childNodes !== 'function')) {
1499
+ isFunction = function isFunction(obj) {
1500
+ return typeof obj === 'function' || false;
1501
+ };
1502
+ }
1503
+
1504
+
1505
+
1506
+ var isUndefined = function isUndefined(val) {
1507
+ return val === void 0;
1508
+ };
1509
+
1510
+ var isDefined = function isDefined(val) {
1511
+ return val !== undefined && val !== null;
1512
+ };
1513
+
1514
+ /***/ }),
1515
+
1516
+ /***/ 6:
1517
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
1518
+
1519
+ "use strict";
1520
+ function _broadcast(componentName, eventName, params) {
1521
+ this.$children.forEach(function (child) {
1522
+ var name = child.$options.componentName;
1523
+
1524
+ if (name === componentName) {
1525
+ child.$emit.apply(child, [eventName].concat(params));
1526
+ } else {
1527
+ _broadcast.apply(child, [componentName, eventName].concat([params]));
1528
+ }
1529
+ });
1530
+ }
1531
+ /* harmony default export */ __webpack_exports__["a"] = ({
1532
+ methods: {
1533
+ dispatch: function dispatch(componentName, eventName, params) {
1534
+ var parent = this.$parent || this.$root;
1535
+ var name = parent.$options.componentName;
1536
+
1537
+ while (parent && (!name || name !== componentName)) {
1538
+ parent = parent.$parent;
1539
+
1540
+ if (parent) {
1541
+ name = parent.$options.componentName;
1542
+ }
1543
+ }
1544
+ if (parent) {
1545
+ parent.$emit.apply(parent, [eventName].concat(params));
1546
+ }
1547
+ },
1548
+ broadcast: function broadcast(componentName, eventName, params) {
1549
+ _broadcast.call(this, componentName, eventName, params);
1550
+ }
1551
+ }
1552
+ });
1553
+
863
1554
  /***/ })
864
1555
 
865
1556
  /******/ });