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.
- package/lib/alert.js +4 -4
- package/lib/aside.js +77 -77
- package/lib/autocomplete.js +3940 -159
- package/lib/avatar.js +108 -108
- package/lib/backtop.js +110 -110
- package/lib/badge.js +108 -108
- package/lib/breadcrumb-item.js +4 -4
- package/lib/breadcrumb.js +4 -4
- package/lib/button-group.js +4 -4
- package/lib/button.js +4 -4
- package/lib/calendar.js +1545 -46
- package/lib/card.js +96 -96
- package/lib/carousel-item.js +452 -108
- package/lib/carousel.js +185 -116
- package/lib/cascader-panel.js +2270 -187
- package/lib/cascader.js +6452 -275
- package/lib/checkbox-button.js +43 -11
- package/lib/checkbox-group.js +47 -15
- package/lib/checkbox.js +47 -15
- package/lib/col.js +2 -2
- package/lib/collapse-item.js +815 -110
- package/lib/collapse.js +108 -108
- package/lib/color-picker.js +3953 -153
- package/lib/container.js +88 -88
- package/lib/date-picker.js +5231 -420
- package/lib/descriptions-item.js +2 -2
- package/lib/descriptions.js +63 -8
- package/lib/dialog.js +1200 -22
- package/lib/directives/repeat-click.js +2 -2
- package/lib/divider.js +104 -104
- package/lib/drawer.js +875 -105
- package/lib/dropdown-item.js +43 -11
- package/lib/dropdown-menu.js +2274 -72
- package/lib/dropdown.js +1072 -136
- package/lib/element-ui.common.js +26229 -13291
- package/lib/empty.js +603 -7
- package/lib/fileUpload.js +2478 -110
- package/lib/footer.js +77 -77
- package/lib/form-item.js +418 -28
- package/lib/form.js +29 -15
- package/lib/header.js +77 -77
- package/lib/icon.js +4 -4
- package/lib/image.js +1376 -49
- package/lib/index.js +1 -1
- package/lib/infinite-scroll.js +311 -21
- package/lib/input-number.js +1423 -34
- package/lib/input.js +507 -37
- package/lib/link.js +4 -4
- package/lib/loading.js +804 -67
- package/lib/locale/format.js +1 -1
- package/lib/locale/index.js +1 -1
- package/lib/main.js +64 -64
- package/lib/menu-item-group.js +4 -4
- package/lib/menu-item.js +2925 -41
- package/lib/menu.js +745 -54
- package/lib/message-box.js +2536 -79
- package/lib/message.js +1102 -24
- package/lib/mixins/locale.js +1 -1
- package/lib/mixins/migrating.js +1 -1
- package/lib/notification.js +1102 -25
- package/lib/option-group.js +43 -11
- package/lib/option.js +394 -18
- package/lib/page-header.js +683 -87
- package/lib/pagination.js +6078 -139
- package/lib/popconfirm.js +3508 -219
- package/lib/popover.js +2604 -79
- package/lib/progress.js +4 -4
- package/lib/radio-button.js +43 -11
- package/lib/radio-group.js +43 -11
- package/lib/radio.js +47 -15
- package/lib/rate.js +756 -113
- package/lib/result.js +4 -4
- package/lib/row.js +2 -2
- package/lib/scrollbar.js +735 -50
- package/lib/select.js +4352 -209
- package/lib/selectDisplayInput.js +108 -108
- package/lib/skeleton-item.js +2 -2
- package/lib/skeleton.js +108 -108
- package/lib/slider.js +4266 -120
- package/lib/spinner.js +4 -4
- package/lib/statistic.js +9605 -117
- package/lib/step.js +108 -108
- package/lib/steps.js +514 -99
- package/lib/subTitle.js +91 -91
- package/lib/submenu.js +2444 -123
- package/lib/switch.js +476 -21
- package/lib/tab-pane.js +4 -4
- package/lib/tabDialog.js +1544 -18
- package/lib/table-column.js +881 -33
- package/lib/table.js +4469 -426
- package/lib/tabs.js +425 -12
- package/lib/tag.js +4 -4
- package/lib/theme-chalk/src/index.scss +0 -3
- package/lib/time-picker.js +5013 -285
- package/lib/time-select.js +4945 -177
- package/lib/timeline-item.js +108 -108
- package/lib/timeline.js +82 -82
- package/lib/tooltip.js +2566 -41
- package/lib/transfer.js +2135 -141
- package/lib/transitions/collapse-transition.js +1 -1
- package/lib/tree.js +1372 -55
- package/lib/treeSelect.js +3420 -105
- package/lib/upload.js +1047 -28
- package/lib/utils/clickoutside.js +1 -1
- package/lib/utils/date-util.js +2 -2
- package/lib/utils/popup/index.js +2 -2
- package/lib/utils/popup/popup-manager.js +1 -1
- package/lib/utils/util.js +1 -1
- package/lib/utils/vdom.js +1 -1
- package/lib/utils/vue-popper.js +1 -1
- package/package.json +1 -1
- package/packages/theme-chalk/src/index.scss +0 -3
- package/src/index.js +1 -1
package/lib/notification.js
CHANGED
|
@@ -82,12 +82,261 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 82);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
89
89
|
|
|
90
90
|
/***/ 0:
|
|
91
|
+
/***/ (function(module, exports) {
|
|
92
|
+
|
|
93
|
+
module.exports = require("vue");
|
|
94
|
+
|
|
95
|
+
/***/ }),
|
|
96
|
+
|
|
97
|
+
/***/ 1:
|
|
98
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
99
|
+
|
|
100
|
+
"use strict";
|
|
101
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return on; });
|
|
102
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return off; });
|
|
103
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return once; });
|
|
104
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return hasClass; });
|
|
105
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; });
|
|
106
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return removeClass; });
|
|
107
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getStyle; });
|
|
108
|
+
/* unused harmony export setStyle */
|
|
109
|
+
/* unused harmony export isScroll */
|
|
110
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getScrollContainer; });
|
|
111
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isInContainer; });
|
|
112
|
+
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
113
|
+
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
|
|
114
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
|
115
|
+
|
|
116
|
+
/* istanbul ignore next */
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
var isServer = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer;
|
|
121
|
+
var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
|
|
122
|
+
var MOZ_HACK_REGEXP = /^moz([A-Z])/;
|
|
123
|
+
var ieVersion = isServer ? 0 : Number(document.documentMode);
|
|
124
|
+
|
|
125
|
+
/* istanbul ignore next */
|
|
126
|
+
var trim = function trim(string) {
|
|
127
|
+
return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
|
|
128
|
+
};
|
|
129
|
+
/* istanbul ignore next */
|
|
130
|
+
var camelCase = function camelCase(name) {
|
|
131
|
+
return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
|
|
132
|
+
return offset ? letter.toUpperCase() : letter;
|
|
133
|
+
}).replace(MOZ_HACK_REGEXP, 'Moz$1');
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
/* istanbul ignore next */
|
|
137
|
+
var on = function () {
|
|
138
|
+
if (!isServer && document.addEventListener) {
|
|
139
|
+
return function (element, event, handler) {
|
|
140
|
+
if (element && event && handler) {
|
|
141
|
+
element.addEventListener(event, handler, false);
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
} else {
|
|
145
|
+
return function (element, event, handler) {
|
|
146
|
+
if (element && event && handler) {
|
|
147
|
+
element.attachEvent('on' + event, handler);
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
}();
|
|
152
|
+
|
|
153
|
+
/* istanbul ignore next */
|
|
154
|
+
var off = function () {
|
|
155
|
+
if (!isServer && document.removeEventListener) {
|
|
156
|
+
return function (element, event, handler) {
|
|
157
|
+
if (element && event) {
|
|
158
|
+
element.removeEventListener(event, handler, false);
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
} else {
|
|
162
|
+
return function (element, event, handler) {
|
|
163
|
+
if (element && event) {
|
|
164
|
+
element.detachEvent('on' + event, handler);
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
}();
|
|
169
|
+
|
|
170
|
+
/* istanbul ignore next */
|
|
171
|
+
var once = function once(el, event, fn) {
|
|
172
|
+
var listener = function listener() {
|
|
173
|
+
if (fn) {
|
|
174
|
+
fn.apply(this, arguments);
|
|
175
|
+
}
|
|
176
|
+
off(el, event, listener);
|
|
177
|
+
};
|
|
178
|
+
on(el, event, listener);
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
/* istanbul ignore next */
|
|
182
|
+
function hasClass(el, cls) {
|
|
183
|
+
if (!el || !cls) return false;
|
|
184
|
+
if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
|
|
185
|
+
if (el.classList) {
|
|
186
|
+
return el.classList.contains(cls);
|
|
187
|
+
} else {
|
|
188
|
+
return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
/* istanbul ignore next */
|
|
193
|
+
function addClass(el, cls) {
|
|
194
|
+
if (!el) return;
|
|
195
|
+
var curClass = el.className;
|
|
196
|
+
var classes = (cls || '').split(' ');
|
|
197
|
+
|
|
198
|
+
for (var i = 0, j = classes.length; i < j; i++) {
|
|
199
|
+
var clsName = classes[i];
|
|
200
|
+
if (!clsName) continue;
|
|
201
|
+
|
|
202
|
+
if (el.classList) {
|
|
203
|
+
el.classList.add(clsName);
|
|
204
|
+
} else if (!hasClass(el, clsName)) {
|
|
205
|
+
curClass += ' ' + clsName;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
if (!el.classList) {
|
|
209
|
+
el.setAttribute('class', curClass);
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
/* istanbul ignore next */
|
|
214
|
+
function removeClass(el, cls) {
|
|
215
|
+
if (!el || !cls) return;
|
|
216
|
+
var classes = cls.split(' ');
|
|
217
|
+
var curClass = ' ' + el.className + ' ';
|
|
218
|
+
|
|
219
|
+
for (var i = 0, j = classes.length; i < j; i++) {
|
|
220
|
+
var clsName = classes[i];
|
|
221
|
+
if (!clsName) continue;
|
|
222
|
+
|
|
223
|
+
if (el.classList) {
|
|
224
|
+
el.classList.remove(clsName);
|
|
225
|
+
} else if (hasClass(el, clsName)) {
|
|
226
|
+
curClass = curClass.replace(' ' + clsName + ' ', ' ');
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
if (!el.classList) {
|
|
230
|
+
el.setAttribute('class', trim(curClass));
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
/* istanbul ignore next */
|
|
235
|
+
var getStyle = ieVersion < 9 ? function (element, styleName) {
|
|
236
|
+
if (isServer) return;
|
|
237
|
+
if (!element || !styleName) return null;
|
|
238
|
+
styleName = camelCase(styleName);
|
|
239
|
+
if (styleName === 'float') {
|
|
240
|
+
styleName = 'styleFloat';
|
|
241
|
+
}
|
|
242
|
+
try {
|
|
243
|
+
switch (styleName) {
|
|
244
|
+
case 'opacity':
|
|
245
|
+
try {
|
|
246
|
+
return element.filters.item('alpha').opacity / 100;
|
|
247
|
+
} catch (e) {
|
|
248
|
+
return 1.0;
|
|
249
|
+
}
|
|
250
|
+
default:
|
|
251
|
+
return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
|
|
252
|
+
}
|
|
253
|
+
} catch (e) {
|
|
254
|
+
return element.style[styleName];
|
|
255
|
+
}
|
|
256
|
+
} : function (element, styleName) {
|
|
257
|
+
if (isServer) return;
|
|
258
|
+
if (!element || !styleName) return null;
|
|
259
|
+
styleName = camelCase(styleName);
|
|
260
|
+
if (styleName === 'float') {
|
|
261
|
+
styleName = 'cssFloat';
|
|
262
|
+
}
|
|
263
|
+
try {
|
|
264
|
+
var computed = document.defaultView.getComputedStyle(element, '');
|
|
265
|
+
return element.style[styleName] || computed ? computed[styleName] : null;
|
|
266
|
+
} catch (e) {
|
|
267
|
+
return element.style[styleName];
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
/* istanbul ignore next */
|
|
272
|
+
function setStyle(element, styleName, value) {
|
|
273
|
+
if (!element || !styleName) return;
|
|
274
|
+
|
|
275
|
+
if ((typeof styleName === 'undefined' ? 'undefined' : _typeof(styleName)) === 'object') {
|
|
276
|
+
for (var prop in styleName) {
|
|
277
|
+
if (styleName.hasOwnProperty(prop)) {
|
|
278
|
+
setStyle(element, prop, styleName[prop]);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
} else {
|
|
282
|
+
styleName = camelCase(styleName);
|
|
283
|
+
if (styleName === 'opacity' && ieVersion < 9) {
|
|
284
|
+
element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
|
|
285
|
+
} else {
|
|
286
|
+
element.style[styleName] = value;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
var isScroll = function isScroll(el, vertical) {
|
|
292
|
+
if (isServer) return;
|
|
293
|
+
|
|
294
|
+
var determinedDirection = vertical !== null && vertical !== undefined;
|
|
295
|
+
var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
|
|
296
|
+
|
|
297
|
+
return overflow.match(/(scroll|auto|overlay)/);
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
var getScrollContainer = function getScrollContainer(el, vertical) {
|
|
301
|
+
if (isServer) return;
|
|
302
|
+
|
|
303
|
+
var parent = el;
|
|
304
|
+
while (parent) {
|
|
305
|
+
if ([window, document, document.documentElement].includes(parent)) {
|
|
306
|
+
return window;
|
|
307
|
+
}
|
|
308
|
+
if (isScroll(parent, vertical)) {
|
|
309
|
+
return parent;
|
|
310
|
+
}
|
|
311
|
+
parent = parent.parentNode;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
return parent;
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
var isInContainer = function isInContainer(el, container) {
|
|
318
|
+
if (isServer || !el || !container) return false;
|
|
319
|
+
|
|
320
|
+
var elRect = el.getBoundingClientRect();
|
|
321
|
+
var containerRect = void 0;
|
|
322
|
+
|
|
323
|
+
if ([window, document, document.documentElement, null, undefined].includes(container)) {
|
|
324
|
+
containerRect = {
|
|
325
|
+
top: 0,
|
|
326
|
+
right: window.innerWidth,
|
|
327
|
+
bottom: window.innerHeight,
|
|
328
|
+
left: 0
|
|
329
|
+
};
|
|
330
|
+
} else {
|
|
331
|
+
containerRect = container.getBoundingClientRect();
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
/***/ }),
|
|
338
|
+
|
|
339
|
+
/***/ 2:
|
|
91
340
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
92
341
|
|
|
93
342
|
"use strict";
|
|
@@ -192,28 +441,427 @@ function normalizeComponent(
|
|
|
192
441
|
|
|
193
442
|
/***/ }),
|
|
194
443
|
|
|
195
|
-
/***/
|
|
196
|
-
/***/ (function(module,
|
|
444
|
+
/***/ 3:
|
|
445
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
446
|
+
|
|
447
|
+
"use strict";
|
|
448
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return noop; });
|
|
449
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return hasOwn; });
|
|
450
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return toObject; });
|
|
451
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getValueByPath; });
|
|
452
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getPropByPath; });
|
|
453
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return generateId; });
|
|
454
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return valueEquals; });
|
|
455
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return escapeRegexpString; });
|
|
456
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return arrayFindIndex; });
|
|
457
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return arrayFind; });
|
|
458
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return coerceTruthyValueToArray; });
|
|
459
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return isIE; });
|
|
460
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return isEdge; });
|
|
461
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return isFirefox; });
|
|
462
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return autoprefixer; });
|
|
463
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return kebabCase; });
|
|
464
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return capitalize; });
|
|
465
|
+
/* unused harmony export looseEqual */
|
|
466
|
+
/* unused harmony export arrayEquals */
|
|
467
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return isEqual; });
|
|
468
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return isEmpty; });
|
|
469
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return rafThrottle; });
|
|
470
|
+
/* unused harmony export objToArray */
|
|
471
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return isMac; });
|
|
472
|
+
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
473
|
+
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
|
|
474
|
+
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
|
|
475
|
+
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; };
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
481
|
+
|
|
482
|
+
function noop() {};
|
|
483
|
+
|
|
484
|
+
function hasOwn(obj, key) {
|
|
485
|
+
return hasOwnProperty.call(obj, key);
|
|
486
|
+
};
|
|
487
|
+
|
|
488
|
+
function extend(to, _from) {
|
|
489
|
+
for (var key in _from) {
|
|
490
|
+
to[key] = _from[key];
|
|
491
|
+
}
|
|
492
|
+
return to;
|
|
493
|
+
};
|
|
494
|
+
|
|
495
|
+
function toObject(arr) {
|
|
496
|
+
var res = {};
|
|
497
|
+
for (var i = 0; i < arr.length; i++) {
|
|
498
|
+
if (arr[i]) {
|
|
499
|
+
extend(res, arr[i]);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
return res;
|
|
503
|
+
};
|
|
197
504
|
|
|
198
|
-
|
|
505
|
+
var getValueByPath = function getValueByPath(object, prop) {
|
|
506
|
+
prop = prop || '';
|
|
507
|
+
var paths = prop.split('.');
|
|
508
|
+
var current = object;
|
|
509
|
+
var result = null;
|
|
510
|
+
for (var i = 0, j = paths.length; i < j; i++) {
|
|
511
|
+
var path = paths[i];
|
|
512
|
+
if (!current) break;
|
|
513
|
+
|
|
514
|
+
if (i === j - 1) {
|
|
515
|
+
result = current[path];
|
|
516
|
+
break;
|
|
517
|
+
}
|
|
518
|
+
current = current[path];
|
|
519
|
+
}
|
|
520
|
+
return result;
|
|
521
|
+
};
|
|
522
|
+
|
|
523
|
+
function getPropByPath(obj, path, strict) {
|
|
524
|
+
var tempObj = obj;
|
|
525
|
+
path = path.replace(/\[(\w+)\]/g, '.$1');
|
|
526
|
+
path = path.replace(/^\./, '');
|
|
527
|
+
|
|
528
|
+
var keyArr = path.split('.');
|
|
529
|
+
var i = 0;
|
|
530
|
+
for (var len = keyArr.length; i < len - 1; ++i) {
|
|
531
|
+
if (!tempObj && !strict) break;
|
|
532
|
+
var key = keyArr[i];
|
|
533
|
+
if (key in tempObj) {
|
|
534
|
+
tempObj = tempObj[key];
|
|
535
|
+
} else {
|
|
536
|
+
if (strict) {
|
|
537
|
+
throw new Error('please transfer a valid prop path to form item!');
|
|
538
|
+
}
|
|
539
|
+
break;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
return {
|
|
543
|
+
o: tempObj,
|
|
544
|
+
k: keyArr[i],
|
|
545
|
+
v: tempObj ? tempObj[keyArr[i]] : null
|
|
546
|
+
};
|
|
547
|
+
};
|
|
548
|
+
|
|
549
|
+
var generateId = function generateId() {
|
|
550
|
+
return Math.floor(Math.random() * 10000);
|
|
551
|
+
};
|
|
552
|
+
|
|
553
|
+
var valueEquals = function valueEquals(a, b) {
|
|
554
|
+
// see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
|
|
555
|
+
if (a === b) return true;
|
|
556
|
+
if (!(a instanceof Array)) return false;
|
|
557
|
+
if (!(b instanceof Array)) return false;
|
|
558
|
+
if (a.length !== b.length) return false;
|
|
559
|
+
for (var i = 0; i !== a.length; ++i) {
|
|
560
|
+
if (a[i] !== b[i]) return false;
|
|
561
|
+
}
|
|
562
|
+
return true;
|
|
563
|
+
};
|
|
564
|
+
|
|
565
|
+
var escapeRegexpString = function escapeRegexpString() {
|
|
566
|
+
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
567
|
+
return String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
|
|
568
|
+
};
|
|
569
|
+
|
|
570
|
+
// TODO: use native Array.find, Array.findIndex when IE support is dropped
|
|
571
|
+
var arrayFindIndex = function arrayFindIndex(arr, pred) {
|
|
572
|
+
for (var i = 0; i !== arr.length; ++i) {
|
|
573
|
+
if (pred(arr[i])) {
|
|
574
|
+
return i;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
return -1;
|
|
578
|
+
};
|
|
579
|
+
|
|
580
|
+
var arrayFind = function arrayFind(arr, pred) {
|
|
581
|
+
var idx = arrayFindIndex(arr, pred);
|
|
582
|
+
return idx !== -1 ? arr[idx] : undefined;
|
|
583
|
+
};
|
|
584
|
+
|
|
585
|
+
// coerce truthy value to array
|
|
586
|
+
var coerceTruthyValueToArray = function coerceTruthyValueToArray(val) {
|
|
587
|
+
if (Array.isArray(val)) {
|
|
588
|
+
return val;
|
|
589
|
+
} else if (val) {
|
|
590
|
+
return [val];
|
|
591
|
+
} else {
|
|
592
|
+
return [];
|
|
593
|
+
}
|
|
594
|
+
};
|
|
595
|
+
|
|
596
|
+
var isIE = function isIE() {
|
|
597
|
+
return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !isNaN(Number(document.documentMode));
|
|
598
|
+
};
|
|
599
|
+
|
|
600
|
+
var isEdge = function isEdge() {
|
|
601
|
+
return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
|
|
602
|
+
};
|
|
603
|
+
|
|
604
|
+
var isFirefox = function isFirefox() {
|
|
605
|
+
return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
var autoprefixer = function autoprefixer(style) {
|
|
609
|
+
if ((typeof style === 'undefined' ? 'undefined' : _typeof(style)) !== 'object') return style;
|
|
610
|
+
var rules = ['transform', 'transition', 'animation'];
|
|
611
|
+
var prefixes = ['ms-', 'webkit-'];
|
|
612
|
+
rules.forEach(function (rule) {
|
|
613
|
+
var value = style[rule];
|
|
614
|
+
if (rule && value) {
|
|
615
|
+
prefixes.forEach(function (prefix) {
|
|
616
|
+
style[prefix + rule] = value;
|
|
617
|
+
});
|
|
618
|
+
}
|
|
619
|
+
});
|
|
620
|
+
return style;
|
|
621
|
+
};
|
|
622
|
+
|
|
623
|
+
var kebabCase = function kebabCase(str) {
|
|
624
|
+
var hyphenateRE = /([^-])([A-Z])/g;
|
|
625
|
+
return str.replace(hyphenateRE, '$1-$2').replace(hyphenateRE, '$1-$2').toLowerCase();
|
|
626
|
+
};
|
|
627
|
+
|
|
628
|
+
var capitalize = function capitalize(str) {
|
|
629
|
+
if (!Object(_types__WEBPACK_IMPORTED_MODULE_1__[/* isString */ "e"])(str)) return str;
|
|
630
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
631
|
+
};
|
|
632
|
+
|
|
633
|
+
var looseEqual = function looseEqual(a, b) {
|
|
634
|
+
var isObjectA = Object(_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(a);
|
|
635
|
+
var isObjectB = Object(_types__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ "d"])(b);
|
|
636
|
+
if (isObjectA && isObjectB) {
|
|
637
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
|
638
|
+
} else if (!isObjectA && !isObjectB) {
|
|
639
|
+
return String(a) === String(b);
|
|
640
|
+
} else {
|
|
641
|
+
return false;
|
|
642
|
+
}
|
|
643
|
+
};
|
|
644
|
+
|
|
645
|
+
var arrayEquals = function arrayEquals(arrayA, arrayB) {
|
|
646
|
+
arrayA = arrayA || [];
|
|
647
|
+
arrayB = arrayB || [];
|
|
648
|
+
|
|
649
|
+
if (arrayA.length !== arrayB.length) {
|
|
650
|
+
return false;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
for (var i = 0; i < arrayA.length; i++) {
|
|
654
|
+
if (!looseEqual(arrayA[i], arrayB[i])) {
|
|
655
|
+
return false;
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
return true;
|
|
660
|
+
};
|
|
661
|
+
|
|
662
|
+
var isEqual = function isEqual(value1, value2) {
|
|
663
|
+
if (Array.isArray(value1) && Array.isArray(value2)) {
|
|
664
|
+
return arrayEquals(value1, value2);
|
|
665
|
+
}
|
|
666
|
+
return looseEqual(value1, value2);
|
|
667
|
+
};
|
|
668
|
+
|
|
669
|
+
var isEmpty = function isEmpty(val) {
|
|
670
|
+
// null or undefined
|
|
671
|
+
if (val == null) return true;
|
|
672
|
+
|
|
673
|
+
if (typeof val === 'boolean') return false;
|
|
674
|
+
|
|
675
|
+
if (typeof val === 'number') return !val;
|
|
676
|
+
|
|
677
|
+
if (val instanceof Error) return val.message === '';
|
|
678
|
+
|
|
679
|
+
switch (Object.prototype.toString.call(val)) {
|
|
680
|
+
// String or Array
|
|
681
|
+
case '[object String]':
|
|
682
|
+
case '[object Array]':
|
|
683
|
+
return !val.length;
|
|
684
|
+
|
|
685
|
+
// Map or Set or File
|
|
686
|
+
case '[object File]':
|
|
687
|
+
case '[object Map]':
|
|
688
|
+
case '[object Set]':
|
|
689
|
+
{
|
|
690
|
+
return !val.size;
|
|
691
|
+
}
|
|
692
|
+
// Plain Object
|
|
693
|
+
case '[object Object]':
|
|
694
|
+
{
|
|
695
|
+
return !Object.keys(val).length;
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
return false;
|
|
700
|
+
};
|
|
701
|
+
|
|
702
|
+
function rafThrottle(fn) {
|
|
703
|
+
var locked = false;
|
|
704
|
+
return function () {
|
|
705
|
+
var _this = this;
|
|
706
|
+
|
|
707
|
+
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
708
|
+
args[_key] = arguments[_key];
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
if (locked) return;
|
|
712
|
+
locked = true;
|
|
713
|
+
window.requestAnimationFrame(function (_) {
|
|
714
|
+
fn.apply(_this, args);
|
|
715
|
+
locked = false;
|
|
716
|
+
});
|
|
717
|
+
};
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
function objToArray(obj) {
|
|
721
|
+
if (Array.isArray(obj)) {
|
|
722
|
+
return obj;
|
|
723
|
+
}
|
|
724
|
+
return isEmpty(obj) ? [] : [obj];
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
var isMac = function isMac() {
|
|
728
|
+
return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
|
|
729
|
+
};
|
|
199
730
|
|
|
200
731
|
/***/ }),
|
|
201
732
|
|
|
202
|
-
/***/
|
|
203
|
-
/***/ (function(module,
|
|
733
|
+
/***/ 35:
|
|
734
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
735
|
+
|
|
736
|
+
"use strict";
|
|
737
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isVNode; });
|
|
738
|
+
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);
|
|
739
|
+
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; };
|
|
740
|
+
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
function isVNode(node) {
|
|
744
|
+
return node !== null && (typeof node === 'undefined' ? 'undefined' : _typeof(node)) === 'object' && Object(_util__WEBPACK_IMPORTED_MODULE_0__[/* hasOwn */ "j"])(node, 'componentOptions');
|
|
745
|
+
};
|
|
746
|
+
|
|
747
|
+
/***/ }),
|
|
748
|
+
|
|
749
|
+
/***/ 4:
|
|
750
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
751
|
+
|
|
752
|
+
"use strict";
|
|
753
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isString; });
|
|
754
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isObject; });
|
|
755
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isHtmlElement; });
|
|
756
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isFunction; });
|
|
757
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return isUndefined; });
|
|
758
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return isDefined; });
|
|
759
|
+
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
760
|
+
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
|
|
761
|
+
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; };
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
function isString(obj) {
|
|
766
|
+
return Object.prototype.toString.call(obj) === '[object String]';
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
function isObject(obj) {
|
|
770
|
+
return Object.prototype.toString.call(obj) === '[object Object]';
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
function isHtmlElement(node) {
|
|
774
|
+
return node && node.nodeType === Node.ELEMENT_NODE;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
/**
|
|
778
|
+
* - Inspired:
|
|
779
|
+
* https://github.com/jashkenas/underscore/blob/master/modules/isFunction.js
|
|
780
|
+
*/
|
|
781
|
+
var isFunction = function isFunction(functionToCheck) {
|
|
782
|
+
var getType = {};
|
|
783
|
+
return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
|
|
784
|
+
};
|
|
785
|
+
|
|
786
|
+
if ( true && (typeof Int8Array === 'undefined' ? 'undefined' : _typeof(Int8Array)) !== 'object' && (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer || typeof document.childNodes !== 'function')) {
|
|
787
|
+
isFunction = function isFunction(obj) {
|
|
788
|
+
return typeof obj === 'function' || false;
|
|
789
|
+
};
|
|
790
|
+
}
|
|
204
791
|
|
|
205
|
-
|
|
792
|
+
|
|
793
|
+
|
|
794
|
+
var isUndefined = function isUndefined(val) {
|
|
795
|
+
return val === void 0;
|
|
796
|
+
};
|
|
797
|
+
|
|
798
|
+
var isDefined = function isDefined(val) {
|
|
799
|
+
return val !== undefined && val !== null;
|
|
800
|
+
};
|
|
206
801
|
|
|
207
802
|
/***/ }),
|
|
208
803
|
|
|
209
804
|
/***/ 7:
|
|
210
|
-
/***/ (function(module,
|
|
805
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
211
806
|
|
|
212
|
-
|
|
807
|
+
"use strict";
|
|
808
|
+
/* harmony default export */ __webpack_exports__["a"] = (function (target) {
|
|
809
|
+
for (var i = 1, j = arguments.length; i < j; i++) {
|
|
810
|
+
var source = arguments[i] || {};
|
|
811
|
+
for (var prop in source) {
|
|
812
|
+
if (source.hasOwnProperty(prop)) {
|
|
813
|
+
var value = source[prop];
|
|
814
|
+
if (value !== undefined) {
|
|
815
|
+
target[prop] = value;
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
return target;
|
|
822
|
+
});;
|
|
213
823
|
|
|
214
824
|
/***/ }),
|
|
215
825
|
|
|
216
|
-
/***/
|
|
826
|
+
/***/ 8:
|
|
827
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
828
|
+
|
|
829
|
+
"use strict";
|
|
830
|
+
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
|
|
831
|
+
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
|
|
832
|
+
|
|
833
|
+
|
|
834
|
+
var scrollBarWidth = void 0;
|
|
835
|
+
|
|
836
|
+
/* harmony default export */ __webpack_exports__["a"] = (function () {
|
|
837
|
+
if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return 0;
|
|
838
|
+
if (scrollBarWidth !== undefined) return scrollBarWidth;
|
|
839
|
+
|
|
840
|
+
var outer = document.createElement('div');
|
|
841
|
+
outer.className = 'el-scrollbar__wrap';
|
|
842
|
+
outer.style.visibility = 'hidden';
|
|
843
|
+
outer.style.width = '100px';
|
|
844
|
+
outer.style.position = 'absolute';
|
|
845
|
+
outer.style.top = '-9999px';
|
|
846
|
+
document.body.appendChild(outer);
|
|
847
|
+
|
|
848
|
+
var widthNoScroll = outer.offsetWidth;
|
|
849
|
+
outer.style.overflow = 'scroll';
|
|
850
|
+
|
|
851
|
+
var inner = document.createElement('div');
|
|
852
|
+
inner.style.width = '100%';
|
|
853
|
+
outer.appendChild(inner);
|
|
854
|
+
|
|
855
|
+
var widthWithScroll = inner.offsetWidth;
|
|
856
|
+
outer.parentNode.removeChild(outer);
|
|
857
|
+
scrollBarWidth = widthNoScroll - widthWithScroll;
|
|
858
|
+
|
|
859
|
+
return scrollBarWidth;
|
|
860
|
+
});;
|
|
861
|
+
|
|
862
|
+
/***/ }),
|
|
863
|
+
|
|
864
|
+
/***/ 82:
|
|
217
865
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
218
866
|
|
|
219
867
|
"use strict";
|
|
@@ -221,7 +869,7 @@ module.exports = require("vue");
|
|
|
221
869
|
__webpack_require__.r(__webpack_exports__);
|
|
222
870
|
|
|
223
871
|
// EXTERNAL MODULE: external "vue"
|
|
224
|
-
var external_vue_ = __webpack_require__(
|
|
872
|
+
var external_vue_ = __webpack_require__(0);
|
|
225
873
|
var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
|
|
226
874
|
|
|
227
875
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/vue-loader/lib??vue-loader-options!./packages/notification/src/main.vue?vue&type=template&id=2fc0bc52
|
|
@@ -441,7 +1089,7 @@ var typeMap = {
|
|
|
441
1089
|
// CONCATENATED MODULE: ./packages/notification/src/main.vue?vue&type=script&lang=js
|
|
442
1090
|
/* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
|
|
443
1091
|
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
444
|
-
var componentNormalizer = __webpack_require__(
|
|
1092
|
+
var componentNormalizer = __webpack_require__(2);
|
|
445
1093
|
|
|
446
1094
|
// CONCATENATED MODULE: ./packages/notification/src/main.vue
|
|
447
1095
|
|
|
@@ -463,15 +1111,14 @@ var component = Object(componentNormalizer["a" /* default */])(
|
|
|
463
1111
|
)
|
|
464
1112
|
|
|
465
1113
|
/* harmony default export */ var main = (component.exports);
|
|
466
|
-
// EXTERNAL MODULE:
|
|
467
|
-
var
|
|
468
|
-
var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
|
|
1114
|
+
// EXTERNAL MODULE: ./src/utils/merge.js
|
|
1115
|
+
var merge = __webpack_require__(7);
|
|
469
1116
|
|
|
470
|
-
// EXTERNAL MODULE:
|
|
471
|
-
var
|
|
1117
|
+
// EXTERNAL MODULE: ./src/utils/popup/index.js + 1 modules
|
|
1118
|
+
var popup = __webpack_require__(9);
|
|
472
1119
|
|
|
473
|
-
// EXTERNAL MODULE:
|
|
474
|
-
var
|
|
1120
|
+
// EXTERNAL MODULE: ./src/utils/vdom.js
|
|
1121
|
+
var vdom = __webpack_require__(35);
|
|
475
1122
|
|
|
476
1123
|
// CONCATENATED MODULE: ./packages/notification/src/main.js
|
|
477
1124
|
|
|
@@ -487,7 +1134,7 @@ var seed = 1;
|
|
|
487
1134
|
|
|
488
1135
|
var main_Notification = function Notification(options) {
|
|
489
1136
|
if (external_vue_default.a.prototype.$isServer) return;
|
|
490
|
-
options =
|
|
1137
|
+
options = Object(merge["a" /* default */])({}, options);
|
|
491
1138
|
var userOnClose = options.onClose;
|
|
492
1139
|
var id = 'notification_' + seed++;
|
|
493
1140
|
var position = options.position || 'top-right';
|
|
@@ -500,7 +1147,7 @@ var main_Notification = function Notification(options) {
|
|
|
500
1147
|
data: options
|
|
501
1148
|
});
|
|
502
1149
|
|
|
503
|
-
if (Object(
|
|
1150
|
+
if (Object(vdom["a" /* isVNode */])(options.message)) {
|
|
504
1151
|
instance.$slots.default = [options.message];
|
|
505
1152
|
options.message = 'REPLACED_BY_VNODE';
|
|
506
1153
|
}
|
|
@@ -509,7 +1156,7 @@ var main_Notification = function Notification(options) {
|
|
|
509
1156
|
document.body.appendChild(instance.$el);
|
|
510
1157
|
instance.visible = true;
|
|
511
1158
|
instance.dom = instance.$el;
|
|
512
|
-
instance.dom.style.zIndex =
|
|
1159
|
+
instance.dom.style.zIndex = popup["a" /* PopupManager */].nextZIndex();
|
|
513
1160
|
|
|
514
1161
|
var verticalOffset = options.offset || 0;
|
|
515
1162
|
instances.filter(function (item) {
|
|
@@ -525,7 +1172,7 @@ var main_Notification = function Notification(options) {
|
|
|
525
1172
|
|
|
526
1173
|
['success', 'warning', 'info', 'error'].forEach(function (type) {
|
|
527
1174
|
main_Notification[type] = function (options) {
|
|
528
|
-
if (typeof options === 'string' || Object(
|
|
1175
|
+
if (typeof options === 'string' || Object(vdom["a" /* isVNode */])(options)) {
|
|
529
1176
|
options = {
|
|
530
1177
|
message: options
|
|
531
1178
|
};
|
|
@@ -576,9 +1223,439 @@ main_Notification.closeAll = function () {
|
|
|
576
1223
|
/***/ }),
|
|
577
1224
|
|
|
578
1225
|
/***/ 9:
|
|
579
|
-
/***/ (function(module,
|
|
1226
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1227
|
+
|
|
1228
|
+
"use strict";
|
|
1229
|
+
|
|
1230
|
+
// EXPORTS
|
|
1231
|
+
__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ popup_manager; });
|
|
1232
|
+
|
|
1233
|
+
// EXTERNAL MODULE: external "vue"
|
|
1234
|
+
var external_vue_ = __webpack_require__(0);
|
|
1235
|
+
var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
|
|
1236
|
+
|
|
1237
|
+
// EXTERNAL MODULE: ./src/utils/merge.js
|
|
1238
|
+
var merge = __webpack_require__(7);
|
|
1239
|
+
|
|
1240
|
+
// EXTERNAL MODULE: ./src/utils/dom.js
|
|
1241
|
+
var utils_dom = __webpack_require__(1);
|
|
1242
|
+
|
|
1243
|
+
// CONCATENATED MODULE: ./src/utils/popup/popup-manager.js
|
|
1244
|
+
|
|
1245
|
+
|
|
1246
|
+
|
|
1247
|
+
var hasModal = false;
|
|
1248
|
+
var hasInitZIndex = false;
|
|
1249
|
+
var popup_manager_zIndex = void 0;
|
|
1250
|
+
|
|
1251
|
+
var popup_manager_getModal = function getModal() {
|
|
1252
|
+
if (external_vue_default.a.prototype.$isServer) return;
|
|
1253
|
+
var modalDom = PopupManager.modalDom;
|
|
1254
|
+
if (modalDom) {
|
|
1255
|
+
hasModal = true;
|
|
1256
|
+
} else {
|
|
1257
|
+
hasModal = false;
|
|
1258
|
+
modalDom = document.createElement('div');
|
|
1259
|
+
PopupManager.modalDom = modalDom;
|
|
1260
|
+
|
|
1261
|
+
modalDom.addEventListener('touchmove', function (event) {
|
|
1262
|
+
event.preventDefault();
|
|
1263
|
+
event.stopPropagation();
|
|
1264
|
+
});
|
|
1265
|
+
|
|
1266
|
+
modalDom.addEventListener('click', function () {
|
|
1267
|
+
PopupManager.doOnModalClick && PopupManager.doOnModalClick();
|
|
1268
|
+
});
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
return modalDom;
|
|
1272
|
+
};
|
|
1273
|
+
|
|
1274
|
+
var instances = {};
|
|
1275
|
+
|
|
1276
|
+
var PopupManager = {
|
|
1277
|
+
modalFade: true,
|
|
1278
|
+
|
|
1279
|
+
getInstance: function getInstance(id) {
|
|
1280
|
+
return instances[id];
|
|
1281
|
+
},
|
|
1282
|
+
|
|
1283
|
+
register: function register(id, instance) {
|
|
1284
|
+
if (id && instance) {
|
|
1285
|
+
instances[id] = instance;
|
|
1286
|
+
}
|
|
1287
|
+
},
|
|
1288
|
+
|
|
1289
|
+
deregister: function deregister(id) {
|
|
1290
|
+
if (id) {
|
|
1291
|
+
instances[id] = null;
|
|
1292
|
+
delete instances[id];
|
|
1293
|
+
}
|
|
1294
|
+
},
|
|
1295
|
+
|
|
1296
|
+
nextZIndex: function nextZIndex() {
|
|
1297
|
+
return PopupManager.zIndex++;
|
|
1298
|
+
},
|
|
1299
|
+
|
|
1300
|
+
modalStack: [],
|
|
1301
|
+
|
|
1302
|
+
doOnModalClick: function doOnModalClick() {
|
|
1303
|
+
var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
|
|
1304
|
+
if (!topItem) return;
|
|
1305
|
+
|
|
1306
|
+
var instance = PopupManager.getInstance(topItem.id);
|
|
1307
|
+
if (instance && instance.closeOnClickModal) {
|
|
1308
|
+
instance.close();
|
|
1309
|
+
}
|
|
1310
|
+
},
|
|
1311
|
+
|
|
1312
|
+
openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
|
|
1313
|
+
if (external_vue_default.a.prototype.$isServer) return;
|
|
1314
|
+
if (!id || zIndex === undefined) return;
|
|
1315
|
+
this.modalFade = modalFade;
|
|
1316
|
+
|
|
1317
|
+
var modalStack = this.modalStack;
|
|
1318
|
+
|
|
1319
|
+
for (var i = 0, j = modalStack.length; i < j; i++) {
|
|
1320
|
+
var item = modalStack[i];
|
|
1321
|
+
if (item.id === id) {
|
|
1322
|
+
return;
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
var modalDom = popup_manager_getModal();
|
|
1327
|
+
|
|
1328
|
+
Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal');
|
|
1329
|
+
if (this.modalFade && !hasModal) {
|
|
1330
|
+
Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-enter');
|
|
1331
|
+
}
|
|
1332
|
+
if (modalClass) {
|
|
1333
|
+
var classArr = modalClass.trim().split(/\s+/);
|
|
1334
|
+
classArr.forEach(function (item) {
|
|
1335
|
+
return Object(utils_dom["a" /* addClass */])(modalDom, item);
|
|
1336
|
+
});
|
|
1337
|
+
}
|
|
1338
|
+
setTimeout(function () {
|
|
1339
|
+
Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-enter');
|
|
1340
|
+
}, 200);
|
|
1341
|
+
|
|
1342
|
+
if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
|
|
1343
|
+
dom.parentNode.appendChild(modalDom);
|
|
1344
|
+
} else {
|
|
1345
|
+
document.body.appendChild(modalDom);
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
if (zIndex) {
|
|
1349
|
+
modalDom.style.zIndex = zIndex;
|
|
1350
|
+
}
|
|
1351
|
+
modalDom.tabIndex = 0;
|
|
1352
|
+
modalDom.style.display = '';
|
|
1353
|
+
|
|
1354
|
+
this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
|
|
1355
|
+
},
|
|
1356
|
+
|
|
1357
|
+
closeModal: function closeModal(id) {
|
|
1358
|
+
var modalStack = this.modalStack;
|
|
1359
|
+
var modalDom = popup_manager_getModal();
|
|
1360
|
+
|
|
1361
|
+
if (modalStack.length > 0) {
|
|
1362
|
+
var topItem = modalStack[modalStack.length - 1];
|
|
1363
|
+
if (topItem.id === id) {
|
|
1364
|
+
if (topItem.modalClass) {
|
|
1365
|
+
var classArr = topItem.modalClass.trim().split(/\s+/);
|
|
1366
|
+
classArr.forEach(function (item) {
|
|
1367
|
+
return Object(utils_dom["i" /* removeClass */])(modalDom, item);
|
|
1368
|
+
});
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
modalStack.pop();
|
|
1372
|
+
if (modalStack.length > 0) {
|
|
1373
|
+
modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
|
|
1374
|
+
}
|
|
1375
|
+
} else {
|
|
1376
|
+
for (var i = modalStack.length - 1; i >= 0; i--) {
|
|
1377
|
+
if (modalStack[i].id === id) {
|
|
1378
|
+
modalStack.splice(i, 1);
|
|
1379
|
+
break;
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
if (modalStack.length === 0) {
|
|
1386
|
+
if (this.modalFade) {
|
|
1387
|
+
Object(utils_dom["a" /* addClass */])(modalDom, 'v-modal-leave');
|
|
1388
|
+
}
|
|
1389
|
+
setTimeout(function () {
|
|
1390
|
+
if (modalStack.length === 0) {
|
|
1391
|
+
if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
|
|
1392
|
+
modalDom.style.display = 'none';
|
|
1393
|
+
PopupManager.modalDom = undefined;
|
|
1394
|
+
}
|
|
1395
|
+
Object(utils_dom["i" /* removeClass */])(modalDom, 'v-modal-leave');
|
|
1396
|
+
}, 200);
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
};
|
|
1400
|
+
|
|
1401
|
+
Object.defineProperty(PopupManager, 'zIndex', {
|
|
1402
|
+
configurable: true,
|
|
1403
|
+
get: function get() {
|
|
1404
|
+
if (!hasInitZIndex) {
|
|
1405
|
+
popup_manager_zIndex = popup_manager_zIndex || (external_vue_default.a.prototype.$ELEMENT || {}).zIndex || 2000;
|
|
1406
|
+
hasInitZIndex = true;
|
|
1407
|
+
}
|
|
1408
|
+
return popup_manager_zIndex;
|
|
1409
|
+
},
|
|
1410
|
+
set: function set(value) {
|
|
1411
|
+
popup_manager_zIndex = value;
|
|
1412
|
+
}
|
|
1413
|
+
});
|
|
1414
|
+
|
|
1415
|
+
var popup_manager_getTopPopup = function getTopPopup() {
|
|
1416
|
+
if (external_vue_default.a.prototype.$isServer) return;
|
|
1417
|
+
if (PopupManager.modalStack.length > 0) {
|
|
1418
|
+
var topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
|
|
1419
|
+
if (!topPopup) return;
|
|
1420
|
+
var instance = PopupManager.getInstance(topPopup.id);
|
|
1421
|
+
|
|
1422
|
+
return instance;
|
|
1423
|
+
}
|
|
1424
|
+
};
|
|
1425
|
+
|
|
1426
|
+
if (!external_vue_default.a.prototype.$isServer) {
|
|
1427
|
+
// handle `esc` key when the popup is shown
|
|
1428
|
+
window.addEventListener('keydown', function (event) {
|
|
1429
|
+
if (event.keyCode === 27) {
|
|
1430
|
+
var topPopup = popup_manager_getTopPopup();
|
|
1431
|
+
|
|
1432
|
+
if (topPopup && topPopup.closeOnPressEscape) {
|
|
1433
|
+
topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
});
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
/* harmony default export */ var popup_manager = (PopupManager);
|
|
1440
|
+
// EXTERNAL MODULE: ./src/utils/scrollbar-width.js
|
|
1441
|
+
var scrollbar_width = __webpack_require__(8);
|
|
1442
|
+
|
|
1443
|
+
// CONCATENATED MODULE: ./src/utils/popup/index.js
|
|
1444
|
+
|
|
1445
|
+
|
|
1446
|
+
|
|
1447
|
+
|
|
1448
|
+
|
|
1449
|
+
|
|
1450
|
+
var idSeed = 1;
|
|
1451
|
+
|
|
1452
|
+
var scrollBarWidth = void 0;
|
|
1453
|
+
|
|
1454
|
+
/* harmony default export */ var popup = __webpack_exports__["b"] = ({
|
|
1455
|
+
props: {
|
|
1456
|
+
visible: {
|
|
1457
|
+
type: Boolean,
|
|
1458
|
+
default: false
|
|
1459
|
+
},
|
|
1460
|
+
openDelay: {},
|
|
1461
|
+
closeDelay: {},
|
|
1462
|
+
zIndex: {},
|
|
1463
|
+
modal: {
|
|
1464
|
+
type: Boolean,
|
|
1465
|
+
default: false
|
|
1466
|
+
},
|
|
1467
|
+
modalFade: {
|
|
1468
|
+
type: Boolean,
|
|
1469
|
+
default: true
|
|
1470
|
+
},
|
|
1471
|
+
modalClass: {},
|
|
1472
|
+
modalAppendToBody: {
|
|
1473
|
+
type: Boolean,
|
|
1474
|
+
default: false
|
|
1475
|
+
},
|
|
1476
|
+
lockScroll: {
|
|
1477
|
+
type: Boolean,
|
|
1478
|
+
default: true
|
|
1479
|
+
},
|
|
1480
|
+
closeOnPressEscape: {
|
|
1481
|
+
type: Boolean,
|
|
1482
|
+
default: false
|
|
1483
|
+
},
|
|
1484
|
+
closeOnClickModal: {
|
|
1485
|
+
type: Boolean,
|
|
1486
|
+
default: false
|
|
1487
|
+
}
|
|
1488
|
+
},
|
|
1489
|
+
|
|
1490
|
+
beforeMount: function beforeMount() {
|
|
1491
|
+
this._popupId = 'popup-' + idSeed++;
|
|
1492
|
+
popup_manager.register(this._popupId, this);
|
|
1493
|
+
},
|
|
1494
|
+
beforeDestroy: function beforeDestroy() {
|
|
1495
|
+
popup_manager.deregister(this._popupId);
|
|
1496
|
+
popup_manager.closeModal(this._popupId);
|
|
1497
|
+
|
|
1498
|
+
this.restoreBodyStyle();
|
|
1499
|
+
},
|
|
1500
|
+
data: function data() {
|
|
1501
|
+
return {
|
|
1502
|
+
opened: false,
|
|
1503
|
+
bodyPaddingRight: null,
|
|
1504
|
+
computedBodyPaddingRight: 0,
|
|
1505
|
+
withoutHiddenClass: true,
|
|
1506
|
+
rendered: false
|
|
1507
|
+
};
|
|
1508
|
+
},
|
|
1509
|
+
|
|
1510
|
+
|
|
1511
|
+
watch: {
|
|
1512
|
+
visible: function visible(val) {
|
|
1513
|
+
var _this = this;
|
|
1514
|
+
|
|
1515
|
+
if (val) {
|
|
1516
|
+
if (this._opening) return;
|
|
1517
|
+
if (!this.rendered) {
|
|
1518
|
+
this.rendered = true;
|
|
1519
|
+
external_vue_default.a.nextTick(function () {
|
|
1520
|
+
_this.open();
|
|
1521
|
+
});
|
|
1522
|
+
} else {
|
|
1523
|
+
this.open();
|
|
1524
|
+
}
|
|
1525
|
+
} else {
|
|
1526
|
+
this.close();
|
|
1527
|
+
}
|
|
1528
|
+
}
|
|
1529
|
+
},
|
|
1530
|
+
|
|
1531
|
+
methods: {
|
|
1532
|
+
open: function open(options) {
|
|
1533
|
+
var _this2 = this;
|
|
1534
|
+
|
|
1535
|
+
if (!this.rendered) {
|
|
1536
|
+
this.rendered = true;
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
var props = Object(merge["a" /* default */])({}, this.$props || this, options);
|
|
1540
|
+
|
|
1541
|
+
if (this._closeTimer) {
|
|
1542
|
+
clearTimeout(this._closeTimer);
|
|
1543
|
+
this._closeTimer = null;
|
|
1544
|
+
}
|
|
1545
|
+
clearTimeout(this._openTimer);
|
|
1546
|
+
|
|
1547
|
+
var openDelay = Number(props.openDelay);
|
|
1548
|
+
if (openDelay > 0) {
|
|
1549
|
+
this._openTimer = setTimeout(function () {
|
|
1550
|
+
_this2._openTimer = null;
|
|
1551
|
+
_this2.doOpen(props);
|
|
1552
|
+
}, openDelay);
|
|
1553
|
+
} else {
|
|
1554
|
+
this.doOpen(props);
|
|
1555
|
+
}
|
|
1556
|
+
},
|
|
1557
|
+
doOpen: function doOpen(props) {
|
|
1558
|
+
if (this.$isServer) return;
|
|
1559
|
+
if (this.willOpen && !this.willOpen()) return;
|
|
1560
|
+
if (this.opened) return;
|
|
1561
|
+
|
|
1562
|
+
this._opening = true;
|
|
1563
|
+
|
|
1564
|
+
var dom = this.$el;
|
|
1565
|
+
|
|
1566
|
+
var modal = props.modal;
|
|
1567
|
+
|
|
1568
|
+
var zIndex = props.zIndex;
|
|
1569
|
+
if (zIndex) {
|
|
1570
|
+
popup_manager.zIndex = zIndex;
|
|
1571
|
+
}
|
|
1572
|
+
|
|
1573
|
+
if (modal) {
|
|
1574
|
+
if (this._closing) {
|
|
1575
|
+
popup_manager.closeModal(this._popupId);
|
|
1576
|
+
this._closing = false;
|
|
1577
|
+
}
|
|
1578
|
+
popup_manager.openModal(this._popupId, popup_manager.nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
|
|
1579
|
+
if (props.lockScroll) {
|
|
1580
|
+
this.withoutHiddenClass = !Object(utils_dom["d" /* hasClass */])(document.body, 'el-popup-parent--hidden');
|
|
1581
|
+
if (this.withoutHiddenClass) {
|
|
1582
|
+
this.bodyPaddingRight = document.body.style.paddingRight;
|
|
1583
|
+
this.computedBodyPaddingRight = parseInt(Object(utils_dom["c" /* getStyle */])(document.body, 'paddingRight'), 10);
|
|
1584
|
+
}
|
|
1585
|
+
scrollBarWidth = Object(scrollbar_width["a" /* default */])();
|
|
1586
|
+
var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
|
|
1587
|
+
var bodyOverflowY = Object(utils_dom["c" /* getStyle */])(document.body, 'overflowY');
|
|
1588
|
+
if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
|
|
1589
|
+
document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
|
|
1590
|
+
}
|
|
1591
|
+
Object(utils_dom["a" /* addClass */])(document.body, 'el-popup-parent--hidden');
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
if (getComputedStyle(dom).position === 'static') {
|
|
1596
|
+
dom.style.position = 'absolute';
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
dom.style.zIndex = popup_manager.nextZIndex();
|
|
1600
|
+
this.opened = true;
|
|
1601
|
+
|
|
1602
|
+
this.onOpen && this.onOpen();
|
|
1603
|
+
|
|
1604
|
+
this.doAfterOpen();
|
|
1605
|
+
},
|
|
1606
|
+
doAfterOpen: function doAfterOpen() {
|
|
1607
|
+
this._opening = false;
|
|
1608
|
+
},
|
|
1609
|
+
close: function close() {
|
|
1610
|
+
var _this3 = this;
|
|
1611
|
+
|
|
1612
|
+
if (this.willClose && !this.willClose()) return;
|
|
1613
|
+
|
|
1614
|
+
if (this._openTimer !== null) {
|
|
1615
|
+
clearTimeout(this._openTimer);
|
|
1616
|
+
this._openTimer = null;
|
|
1617
|
+
}
|
|
1618
|
+
clearTimeout(this._closeTimer);
|
|
1619
|
+
|
|
1620
|
+
var closeDelay = Number(this.closeDelay);
|
|
1621
|
+
|
|
1622
|
+
if (closeDelay > 0) {
|
|
1623
|
+
this._closeTimer = setTimeout(function () {
|
|
1624
|
+
_this3._closeTimer = null;
|
|
1625
|
+
_this3.doClose();
|
|
1626
|
+
}, closeDelay);
|
|
1627
|
+
} else {
|
|
1628
|
+
this.doClose();
|
|
1629
|
+
}
|
|
1630
|
+
},
|
|
1631
|
+
doClose: function doClose() {
|
|
1632
|
+
this._closing = true;
|
|
1633
|
+
|
|
1634
|
+
this.onClose && this.onClose();
|
|
1635
|
+
|
|
1636
|
+
if (this.lockScroll) {
|
|
1637
|
+
setTimeout(this.restoreBodyStyle, 200);
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
this.opened = false;
|
|
1641
|
+
|
|
1642
|
+
this.doAfterClose();
|
|
1643
|
+
},
|
|
1644
|
+
doAfterClose: function doAfterClose() {
|
|
1645
|
+
popup_manager.closeModal(this._popupId);
|
|
1646
|
+
this._closing = false;
|
|
1647
|
+
},
|
|
1648
|
+
restoreBodyStyle: function restoreBodyStyle() {
|
|
1649
|
+
if (this.modal && this.withoutHiddenClass) {
|
|
1650
|
+
document.body.style.paddingRight = this.bodyPaddingRight;
|
|
1651
|
+
Object(utils_dom["i" /* removeClass */])(document.body, 'el-popup-parent--hidden');
|
|
1652
|
+
}
|
|
1653
|
+
this.withoutHiddenClass = true;
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
});
|
|
1657
|
+
|
|
580
1658
|
|
|
581
|
-
module.exports = require("cy-element-ui/lib/utils/merge");
|
|
582
1659
|
|
|
583
1660
|
/***/ })
|
|
584
1661
|
|