1 | (function webpackUniversalModuleDefinition(root, factory) {
|
2 | if(typeof exports === 'object' && typeof module === 'object')
|
3 | module.exports = factory(require("vue"), require("./_util/proptype"), require("./transition"), require("./_mixin/emitter"), require("./input"), require("./tag"), require("./cascaderpanel"), require("./tree"));
|
4 | else if(typeof define === 'function' && define.amd)
|
5 | define(["vue", "./_util/proptype", "./transition", "./_mixin/emitter", "./input", "./tag", "./cascaderpanel", "./tree"], factory);
|
6 | else {
|
7 | var a = typeof exports === 'object' ? factory(require("vue"), require("./_util/proptype"), require("./transition"), require("./_mixin/emitter"), require("./input"), require("./tag"), require("./cascaderpanel"), require("./tree")) : factory(root["Vue"], root["./_util/proptype"], root["./transition"], root["./_mixin/emitter"], root["./input"], root["./tag"], root["./cascaderpanel"], root["./tree"]);
|
8 | for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
9 | }
|
10 | })(window, function(__WEBPACK_EXTERNAL_MODULE__2__, __WEBPACK_EXTERNAL_MODULE__7__, __WEBPACK_EXTERNAL_MODULE__11__, __WEBPACK_EXTERNAL_MODULE__12__, __WEBPACK_EXTERNAL_MODULE__16__, __WEBPACK_EXTERNAL_MODULE__50__, __WEBPACK_EXTERNAL_MODULE__75__, __WEBPACK_EXTERNAL_MODULE__76__) {
|
11 | return (function(modules) {
|
12 |
|
13 | var installedModules = {};
|
14 |
|
15 |
|
16 | function __webpack_require__(moduleId) {
|
17 |
|
18 |
|
19 | if(installedModules[moduleId]) {
|
20 | return installedModules[moduleId].exports;
|
21 | }
|
22 |
|
23 | var module = installedModules[moduleId] = {
|
24 | i: moduleId,
|
25 | l: false,
|
26 | exports: {}
|
27 | };
|
28 |
|
29 |
|
30 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
31 |
|
32 |
|
33 | module.l = true;
|
34 |
|
35 |
|
36 | return module.exports;
|
37 | }
|
38 |
|
39 |
|
40 |
|
41 | __webpack_require__.m = modules;
|
42 |
|
43 |
|
44 | __webpack_require__.c = installedModules;
|
45 |
|
46 |
|
47 | __webpack_require__.d = function(exports, name, getter) {
|
48 | if(!__webpack_require__.o(exports, name)) {
|
49 | Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
50 | }
|
51 | };
|
52 |
|
53 |
|
54 | __webpack_require__.r = function(exports) {
|
55 | if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
56 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
57 | }
|
58 | Object.defineProperty(exports, '__esModule', { value: true });
|
59 | };
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 | __webpack_require__.t = function(value, mode) {
|
67 | if(mode & 1) value = __webpack_require__(value);
|
68 | if(mode & 8) return value;
|
69 | if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
70 | var ns = Object.create(null);
|
71 | __webpack_require__.r(ns);
|
72 | Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
73 | if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
74 | return ns;
|
75 | };
|
76 |
|
77 |
|
78 | __webpack_require__.n = function(module) {
|
79 | var getter = module && module.__esModule ?
|
80 | function getDefault() { return module['default']; } :
|
81 | function getModuleExports() { return module; };
|
82 | __webpack_require__.d(getter, 'a', getter);
|
83 | return getter;
|
84 | };
|
85 |
|
86 |
|
87 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
88 |
|
89 |
|
90 | __webpack_require__.p = "/dist/";
|
91 |
|
92 |
|
93 |
|
94 | return __webpack_require__(__webpack_require__.s = 95);
|
95 | })
|
96 |
|
97 | ({
|
98 |
|
99 | 0:
|
100 | (function(module, __webpack_exports__, __webpack_require__) {
|
101 |
|
102 | "use strict";
|
103 | __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
104 |
|
105 |
|
106 |
|
107 |
|
108 |
|
109 |
|
110 | function normalizeComponent (
|
111 | scriptExports,
|
112 | render,
|
113 | staticRenderFns,
|
114 | functionalTemplate,
|
115 | injectStyles,
|
116 | scopeId,
|
117 | moduleIdentifier, /* server only */
|
118 | shadowMode /* vue-cli only */
|
119 | ) {
|
120 |
|
121 | var options = typeof scriptExports === 'function'
|
122 | ? scriptExports.options
|
123 | : scriptExports
|
124 |
|
125 |
|
126 | if (render) {
|
127 | options.render = render
|
128 | options.staticRenderFns = staticRenderFns
|
129 | options._compiled = true
|
130 | }
|
131 |
|
132 |
|
133 | if (functionalTemplate) {
|
134 | options.functional = true
|
135 | }
|
136 |
|
137 |
|
138 | if (scopeId) {
|
139 | options._scopeId = 'data-v-' + scopeId
|
140 | }
|
141 |
|
142 | var hook
|
143 | if (moduleIdentifier) {
|
144 | hook = function (context) {
|
145 |
|
146 | context =
|
147 | context ||
|
148 | (this.$vnode && this.$vnode.ssrContext) ||
|
149 | (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext)
|
150 |
|
151 | if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
152 | context = __VUE_SSR_CONTEXT__
|
153 | }
|
154 |
|
155 | if (injectStyles) {
|
156 | injectStyles.call(this, context)
|
157 | }
|
158 |
|
159 | if (context && context._registeredComponents) {
|
160 | context._registeredComponents.add(moduleIdentifier)
|
161 | }
|
162 | }
|
163 |
|
164 |
|
165 | options._ssrRegister = hook
|
166 | } else if (injectStyles) {
|
167 | hook = shadowMode
|
168 | ? function () {
|
169 | injectStyles.call(
|
170 | this,
|
171 | (options.functional ? this.parent : this).$root.$options.shadowRoot
|
172 | )
|
173 | }
|
174 | : injectStyles
|
175 | }
|
176 |
|
177 | if (hook) {
|
178 | if (options.functional) {
|
179 |
|
180 |
|
181 | options._injectStyles = hook
|
182 |
|
183 | var originalRender = options.render
|
184 | options.render = function renderWithStyleInjection (h, context) {
|
185 | hook.call(context)
|
186 | return originalRender(h, context)
|
187 | }
|
188 | } else {
|
189 |
|
190 | var existing = options.beforeCreate
|
191 | options.beforeCreate = existing
|
192 | ? [].concat(existing, hook)
|
193 | : [hook]
|
194 | }
|
195 | }
|
196 |
|
197 | return {
|
198 | exports: scriptExports,
|
199 | options: options
|
200 | }
|
201 | }
|
202 |
|
203 |
|
204 | }),
|
205 |
|
206 | 1:
|
207 | (function(module, __webpack_exports__, __webpack_require__) {
|
208 |
|
209 | "use strict";
|
210 | __webpack_require__.d(__webpack_exports__, "g", function() { return on; });
|
211 | __webpack_require__.d(__webpack_exports__, "f", function() { return off; });
|
212 |
|
213 | __webpack_require__.d(__webpack_exports__, "d", function() { return hasClass; });
|
214 | __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; });
|
215 | __webpack_require__.d(__webpack_exports__, "h", function() { return removeClass; });
|
216 | __webpack_require__.d(__webpack_exports__, "c", function() { return getStyle; });
|
217 |
|
218 |
|
219 |
|
220 |
|
221 | __webpack_require__.d(__webpack_exports__, "e", function() { return merge; });
|
222 | __webpack_require__.d(__webpack_exports__, "b", function() { return getScrollBarWidth; });
|
223 | var babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
|
224 | var babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);
|
225 | var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
|
226 | var vue__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_1__);
|
227 |
|
228 |
|
229 |
|
230 |
|
231 | var isServer = vue__WEBPACK_IMPORTED_MODULE_1___default.a.prototype.$isServer;
|
232 | var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
|
233 | var MOZ_HACK_REGEXP = /^moz([A-Z])/;
|
234 | var ieVersion = isServer ? 0 : Number(document.documentMode);
|
235 |
|
236 |
|
237 | var trim = function trim(string) {
|
238 | return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
|
239 | };
|
240 |
|
241 | var camelCase = function camelCase(name) {
|
242 | return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
|
243 | return offset ? letter.toUpperCase() : letter;
|
244 | }).replace(MOZ_HACK_REGEXP, 'Moz$1');
|
245 | };
|
246 |
|
247 |
|
248 | var on = function () {
|
249 | if (!isServer && document.addEventListener) {
|
250 | return function (element, event, handler) {
|
251 | if (element && event && handler) {
|
252 | element.addEventListener(event, handler, false);
|
253 | }
|
254 | };
|
255 | } else {
|
256 | return function (element, event, handler) {
|
257 | if (element && event && handler) {
|
258 | element.attachEvent('on' + event, handler);
|
259 | }
|
260 | };
|
261 | }
|
262 | }();
|
263 |
|
264 |
|
265 | var off = function () {
|
266 | if (!isServer && document.removeEventListener) {
|
267 | return function (element, event, handler) {
|
268 | if (element && event) {
|
269 | element.removeEventListener(event, handler, false);
|
270 | }
|
271 | };
|
272 | } else {
|
273 | return function (element, event, handler) {
|
274 | if (element && event) {
|
275 | element.detachEvent('on' + event, handler);
|
276 | }
|
277 | };
|
278 | }
|
279 | }();
|
280 |
|
281 |
|
282 | var once = function once(el, event, fn) {
|
283 | var listener = function listener() {
|
284 | if (fn) {
|
285 | fn.apply(this, arguments);
|
286 | }
|
287 | off(el, event, listener);
|
288 | };
|
289 | on(el, event, listener);
|
290 | };
|
291 |
|
292 |
|
293 | function hasClass(el, cls) {
|
294 | if (!el || !cls) return false;
|
295 | if (cls.indexOf(' ') !== -1) {
|
296 | throw new Error('className should not contain space.');
|
297 | }
|
298 | if (el.classList) {
|
299 | return el.classList.contains(cls);
|
300 | } else {
|
301 | return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
|
302 | }
|
303 | }
|
304 |
|
305 |
|
306 | function addClass(el, cls) {
|
307 | if (!el) return;
|
308 | var curClass = el.className;
|
309 | var classes = (cls || '').split(' ');
|
310 |
|
311 | for (var i = 0, j = classes.length; i < j; i++) {
|
312 | var clsName = classes[i];
|
313 | if (!clsName) continue;
|
314 |
|
315 | if (el.classList) {
|
316 | el.classList.add(clsName);
|
317 | } else if (!hasClass(el, clsName)) {
|
318 | curClass += ' ' + clsName;
|
319 | }
|
320 | }
|
321 | if (!el.classList) {
|
322 | el.setAttribute('class', curClass);
|
323 | }
|
324 | }
|
325 |
|
326 |
|
327 | function removeClass(el, cls) {
|
328 | if (!el || !cls) return;
|
329 | var classes = cls.split(' ');
|
330 | var curClass = ' ' + el.className + ' ';
|
331 |
|
332 | for (var i = 0, j = classes.length; i < j; i++) {
|
333 | var clsName = classes[i];
|
334 | if (!clsName) continue;
|
335 |
|
336 | if (el.classList) {
|
337 | el.classList.remove(clsName);
|
338 | } else if (hasClass(el, clsName)) {
|
339 | curClass = curClass.replace(' ' + clsName + ' ', ' ');
|
340 | }
|
341 | }
|
342 | if (!el.classList) {
|
343 | el.setAttribute('class', trim(curClass));
|
344 | }
|
345 | }
|
346 |
|
347 |
|
348 | var getStyle = ieVersion < 9 ? function (element, styleName) {
|
349 | if (isServer) return;
|
350 | if (!element || !styleName) return null;
|
351 | styleName = camelCase(styleName);
|
352 | if (styleName === 'float') {
|
353 | styleName = 'styleFloat';
|
354 | }
|
355 | try {
|
356 | switch (styleName) {
|
357 | case 'opacity':
|
358 | try {
|
359 | return element.filters.item('alpha').opacity / 100;
|
360 | } catch (e) {
|
361 | return 1.0;
|
362 | }
|
363 | default:
|
364 | return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
|
365 | }
|
366 | } catch (e) {
|
367 | return element.style[styleName];
|
368 | }
|
369 | } : function (element, styleName) {
|
370 | if (isServer) return;
|
371 | if (!element || !styleName) return null;
|
372 | styleName = camelCase(styleName);
|
373 | if (styleName === 'float') {
|
374 | styleName = 'cssFloat';
|
375 | }
|
376 | try {
|
377 | var computed = document.defaultView.getComputedStyle(element, '');
|
378 | return element.style[styleName] || computed ? computed[styleName] : null;
|
379 | } catch (e) {
|
380 | return element.style[styleName];
|
381 | }
|
382 | };
|
383 |
|
384 |
|
385 | function setStyle(element, styleName, value) {
|
386 | if (!element || !styleName) return;
|
387 |
|
388 | if ((typeof styleName === 'undefined' ? 'undefined' : babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(styleName)) === 'object') {
|
389 | for (var prop in styleName) {
|
390 | if (styleName.hasOwnProperty(prop)) {
|
391 | setStyle(element, prop, styleName[prop]);
|
392 | }
|
393 | }
|
394 | } else {
|
395 | styleName = camelCase(styleName);
|
396 | if (styleName === 'opacity' && ieVersion < 9) {
|
397 | element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
|
398 | } else {
|
399 | element.style[styleName] = value;
|
400 | }
|
401 | }
|
402 | }
|
403 |
|
404 | var isScroll = function isScroll(el, vertical) {
|
405 | if (isServer) return;
|
406 |
|
407 | var determinedDirection = vertical !== null && vertical !== undefined;
|
408 | var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
|
409 |
|
410 | return overflow.match(/(scroll|auto|overlay)/);
|
411 | };
|
412 |
|
413 | var getScrollContainer = function getScrollContainer(el, vertical) {
|
414 | if (isServer) return;
|
415 |
|
416 | var parent = el;
|
417 | while (parent) {
|
418 | if ([window, document, document.documentElement].includes(parent)) {
|
419 | return window;
|
420 | }
|
421 | if (isScroll(parent, vertical)) {
|
422 | return parent;
|
423 | }
|
424 | parent = parent.parentNode;
|
425 | }
|
426 |
|
427 | return parent;
|
428 | };
|
429 |
|
430 | var isInContainer = function isInContainer(el, container) {
|
431 | if (isServer || !el || !container) return false;
|
432 |
|
433 | var elRect = el.getBoundingClientRect();
|
434 | var containerRect = void 0;
|
435 |
|
436 | if ([window, document, document.documentElement, null, undefined].includes(container)) {
|
437 | containerRect = {
|
438 | top: 0,
|
439 | right: window.innerWidth,
|
440 | bottom: window.innerHeight,
|
441 | left: 0
|
442 | };
|
443 | } else {
|
444 | containerRect = container.getBoundingClientRect();
|
445 | }
|
446 |
|
447 | return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
|
448 | };
|
449 |
|
450 | function merge(target) {
|
451 | for (var i = 1, j = arguments.length; i < j; i++) {
|
452 | var source = arguments[i] || {};
|
453 | for (var prop in source) {
|
454 | if (source.hasOwnProperty(prop)) {
|
455 | var value = source[prop];
|
456 | if (value !== undefined) {
|
457 | target[prop] = value;
|
458 | }
|
459 | }
|
460 | }
|
461 | }
|
462 |
|
463 | return target;
|
464 | }
|
465 |
|
466 | var scrollBarWidth = void 0;
|
467 | function getScrollBarWidth() {
|
468 | if (vue__WEBPACK_IMPORTED_MODULE_1___default.a.prototype.$isServer) return 0;
|
469 | if (scrollBarWidth !== undefined) return scrollBarWidth;
|
470 |
|
471 | var outer = document.createElement('div');
|
472 | outer.className = 'el-scrollbar__wrap';
|
473 | outer.style.visibility = 'hidden';
|
474 | outer.style.width = '100px';
|
475 | outer.style.position = 'absolute';
|
476 | outer.style.top = '-9999px';
|
477 | document.body.appendChild(outer);
|
478 |
|
479 | var widthNoScroll = outer.offsetWidth;
|
480 | outer.style.overflow = 'scroll';
|
481 |
|
482 | var inner = document.createElement('div');
|
483 | inner.style.width = '100%';
|
484 | outer.appendChild(inner);
|
485 |
|
486 | var widthWithScroll = inner.offsetWidth;
|
487 | outer.parentNode.removeChild(outer);
|
488 | scrollBarWidth = widthNoScroll - widthWithScroll;
|
489 |
|
490 | return scrollBarWidth;
|
491 | }
|
492 |
|
493 | }),
|
494 |
|
495 | 10:
|
496 | (function(module, exports) {
|
497 |
|
498 | module.exports = require("babel-runtime/core-js/object/keys");
|
499 |
|
500 | }),
|
501 |
|
502 | 11:
|
503 | (function(module, exports) {
|
504 |
|
505 | module.exports = __WEBPACK_EXTERNAL_MODULE__11__;
|
506 |
|
507 | }),
|
508 |
|
509 | 12:
|
510 | (function(module, exports) {
|
511 |
|
512 | module.exports = __WEBPACK_EXTERNAL_MODULE__12__;
|
513 |
|
514 | }),
|
515 |
|
516 | 14:
|
517 | (function(module, __webpack_exports__, __webpack_require__) {
|
518 |
|
519 | "use strict";
|
520 | var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
521 | var vue__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
|
522 | var _dom_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
|
523 | var _popup_manager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5);
|
524 | __webpack_require__.d(__webpack_exports__, "a", function() { return _popup_manager__WEBPACK_IMPORTED_MODULE_2__["a"]; });
|
525 |
|
526 |
|
527 |
|
528 |
|
529 |
|
530 | var idSeed = 1;
|
531 |
|
532 | var scrollBarWidth = void 0;
|
533 |
|
534 | __webpack_exports__["b"] = ({
|
535 | props: {
|
536 | visibility: {
|
537 | type: Boolean,
|
538 | default: false
|
539 | },
|
540 | openDelay: {},
|
541 | closeDelay: {},
|
542 | zIndex: {},
|
543 | modal: {
|
544 | type: Boolean,
|
545 | default: false
|
546 | },
|
547 | modalFade: {
|
548 | type: Boolean,
|
549 | default: true
|
550 | },
|
551 | modalClass: {},
|
552 | modalAppendToBody: {
|
553 | type: Boolean,
|
554 | default: false
|
555 | },
|
556 | lockScroll: {
|
557 | type: Boolean,
|
558 | default: true
|
559 | },
|
560 | closeOnPressEscape: {
|
561 | type: Boolean,
|
562 | default: false
|
563 | },
|
564 | closeOnClickModal: {
|
565 | type: Boolean,
|
566 | default: false
|
567 | }
|
568 | },
|
569 |
|
570 | beforeMount: function beforeMount() {
|
571 | this._popupId = 'popup-' + idSeed++;
|
572 | _popup_manager__WEBPACK_IMPORTED_MODULE_2__[ "a"].register(this._popupId, this);
|
573 | },
|
574 | beforeDestroy: function beforeDestroy() {
|
575 | _popup_manager__WEBPACK_IMPORTED_MODULE_2__[ "a"].deregister(this._popupId);
|
576 | _popup_manager__WEBPACK_IMPORTED_MODULE_2__[ "a"].closeModal(this._popupId);
|
577 |
|
578 | this.restoreBodyStyle();
|
579 | },
|
580 | data: function data() {
|
581 | return {
|
582 | opened: false,
|
583 | bodyPaddingRight: null,
|
584 | computedBodyPaddingRight: 0,
|
585 | withoutHiddenClass: true,
|
586 | rendered: false
|
587 | };
|
588 | },
|
589 |
|
590 |
|
591 | watch: {
|
592 | visibility: function visibility(val) {
|
593 | var _this = this;
|
594 |
|
595 | if (val) {
|
596 | if (this._opening) return;
|
597 | if (!this.rendered) {
|
598 | this.rendered = true;
|
599 | vue__WEBPACK_IMPORTED_MODULE_0___default.a.nextTick(function () {
|
600 | _this.open();
|
601 | });
|
602 | } else {
|
603 | this.open();
|
604 | }
|
605 | } else {
|
606 | this.close();
|
607 | }
|
608 | }
|
609 | },
|
610 |
|
611 | methods: {
|
612 | open: function open(options) {
|
613 | var _this2 = this;
|
614 |
|
615 | if (!this.rendered) {
|
616 | this.rendered = true;
|
617 | }
|
618 | var props = Object(_dom_helper__WEBPACK_IMPORTED_MODULE_1__[ "e"])({}, this.$props || this, options);
|
619 |
|
620 | if (this._closeTimer) {
|
621 | clearTimeout(this._closeTimer);
|
622 | this._closeTimer = null;
|
623 | }
|
624 | clearTimeout(this._openTimer);
|
625 |
|
626 | var openDelay = Number(props.openDelay);
|
627 | if (openDelay > 0) {
|
628 | this._openTimer = setTimeout(function () {
|
629 | _this2._openTimer = null;
|
630 | _this2.doOpen(props);
|
631 | }, openDelay);
|
632 | } else {
|
633 | this.doOpen(props);
|
634 | }
|
635 | },
|
636 | doOpen: function doOpen(props) {
|
637 | if (this.$isServer) return;
|
638 | if (this.willOpen && !this.willOpen()) return;
|
639 | if (this.opened) return;
|
640 |
|
641 | this._opening = true;
|
642 |
|
643 | var dom = this.$el;
|
644 |
|
645 | var modal = props.modal;
|
646 |
|
647 | var zIndex = props.zIndex;
|
648 | if (zIndex) {
|
649 | _popup_manager__WEBPACK_IMPORTED_MODULE_2__[ "a"].zIndex = zIndex;
|
650 | }
|
651 |
|
652 | if (modal) {
|
653 | if (this._closing) {
|
654 | _popup_manager__WEBPACK_IMPORTED_MODULE_2__[ "a"].closeModal(this._popupId);
|
655 | this._closing = false;
|
656 | }
|
657 | _popup_manager__WEBPACK_IMPORTED_MODULE_2__[ "a"].openModal(this._popupId, _popup_manager__WEBPACK_IMPORTED_MODULE_2__[ "a"].nextZIndex(), this.modalAppendToBody ? undefined : dom, props.modalClass, props.modalFade);
|
658 | if (props.lockScroll) {
|
659 | this.withoutHiddenClass = !Object(_dom_helper__WEBPACK_IMPORTED_MODULE_1__[ "d"])(document.body, 'mds-popup-parent--hidden');
|
660 | if (this.withoutHiddenClass) {
|
661 | this.bodyPaddingRight = document.body.style.paddingRight;
|
662 | this.computedBodyPaddingRight = parseInt(Object(_dom_helper__WEBPACK_IMPORTED_MODULE_1__[ "c"])(document.body, 'paddingRight'), 10);
|
663 | }
|
664 | scrollBarWidth = Object(_dom_helper__WEBPACK_IMPORTED_MODULE_1__[ "b"])();
|
665 | var bodyHasOverflow = document.documentElement.clientHeight < document.body.scrollHeight;
|
666 | var bodyOverflowY = Object(_dom_helper__WEBPACK_IMPORTED_MODULE_1__[ "c"])(document.body, 'overflowY');
|
667 | if (scrollBarWidth > 0 && (bodyHasOverflow || bodyOverflowY === 'scroll') && this.withoutHiddenClass) {
|
668 | document.body.style.paddingRight = this.computedBodyPaddingRight + scrollBarWidth + 'px';
|
669 | }
|
670 | Object(_dom_helper__WEBPACK_IMPORTED_MODULE_1__[ "a"])(document.body, 'mds-popup-parent--hidden');
|
671 | }
|
672 | }
|
673 |
|
674 | if (getComputedStyle(dom).position === 'static') {
|
675 | dom.style.position = 'absolute';
|
676 | }
|
677 |
|
678 | dom.style.zIndex = _popup_manager__WEBPACK_IMPORTED_MODULE_2__[ "a"].nextZIndex();
|
679 | this.opened = true;
|
680 |
|
681 | this.onOpen && this.onOpen();
|
682 |
|
683 | this.doAfterOpen();
|
684 | },
|
685 | doAfterOpen: function doAfterOpen() {
|
686 | this._opening = false;
|
687 | },
|
688 | close: function close() {
|
689 | var _this3 = this;
|
690 |
|
691 | if (this.willClose && !this.willClose()) return;
|
692 |
|
693 | if (this._openTimer !== null) {
|
694 | clearTimeout(this._openTimer);
|
695 | this._openTimer = null;
|
696 | }
|
697 | clearTimeout(this._closeTimer);
|
698 |
|
699 | var closeDelay = Number(this.closeDelay);
|
700 |
|
701 | if (closeDelay > 0) {
|
702 | this._closeTimer = setTimeout(function () {
|
703 | _this3._closeTimer = null;
|
704 | _this3.doClose();
|
705 | }, closeDelay);
|
706 | } else {
|
707 | this.doClose();
|
708 | }
|
709 | },
|
710 | doClose: function doClose() {
|
711 | this._closing = true;
|
712 |
|
713 | this.onClose && this.onClose();
|
714 |
|
715 | if (this.lockScroll) {
|
716 | setTimeout(this.restoreBodyStyle, 200);
|
717 | }
|
718 |
|
719 | this.opened = false;
|
720 |
|
721 | this.doAfterClose();
|
722 | },
|
723 | doAfterClose: function doAfterClose() {
|
724 | _popup_manager__WEBPACK_IMPORTED_MODULE_2__[ "a"].closeModal(this._popupId);
|
725 | this._closing = false;
|
726 | },
|
727 | restoreBodyStyle: function restoreBodyStyle() {
|
728 | if (this.modal && this.withoutHiddenClass) {
|
729 | document.body.style.paddingRight = this.bodyPaddingRight;
|
730 | Object(_dom_helper__WEBPACK_IMPORTED_MODULE_1__[ "h"])(document.body, 'mds-popup-parent--hidden');
|
731 | }
|
732 | this.withoutHiddenClass = true;
|
733 | }
|
734 | }
|
735 | });
|
736 |
|
737 |
|
738 |
|
739 | }),
|
740 |
|
741 | 15:
|
742 | (function(module, __webpack_exports__, __webpack_require__) {
|
743 |
|
744 | "use strict";
|
745 |
|
746 |
|
747 | __webpack_require__.d(__webpack_exports__, "e", function() { return getValueByPath; });
|
748 | __webpack_require__.d(__webpack_exports__, "i", function() { return valueEquals; });
|
749 | __webpack_require__.d(__webpack_exports__, "b", function() { return arrayFindIndex; });
|
750 | __webpack_require__.d(__webpack_exports__, "a", function() { return arrayFind; });
|
751 | __webpack_require__.d(__webpack_exports__, "c", function() { return coerceTruthyValueToArray; });
|
752 | __webpack_require__.d(__webpack_exports__, "h", function() { return isIE; });
|
753 | __webpack_require__.d(__webpack_exports__, "f", function() { return isEdge; });
|
754 |
|
755 |
|
756 |
|
757 |
|
758 | __webpack_require__.d(__webpack_exports__, "g", function() { return isFunction; });
|
759 | __webpack_require__.d(__webpack_exports__, "d", function() { return fixBodyScroll; });
|
760 | var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
761 | var vue__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
|
762 |
|
763 |
|
764 |
|
765 | var currentBodyOverflow = '';
|
766 |
|
767 | var noop = function noop() {};
|
768 |
|
769 | var getScroll = function getScroll(w, top) {
|
770 | var ret = top ? w.pageYOffset : w.pageXOffset;
|
771 | var method = top ? 'scrollTop' : 'scrollLeft';
|
772 | if (typeof ret !== 'number') {
|
773 | var d = w.document;
|
774 |
|
775 | ret = d.documentElement[method];
|
776 | if (typeof ret !== 'number') {
|
777 |
|
778 | ret = d.body[method];
|
779 | }
|
780 | }
|
781 | return ret;
|
782 | };
|
783 |
|
784 | var getClientPosition = function getClientPosition(elem) {
|
785 | var box = void 0;
|
786 | var x = void 0;
|
787 | var y = void 0;
|
788 | var doc = elem.ownerDocument;
|
789 | var body = doc.body;
|
790 | var docElem = doc && doc.documentElement;
|
791 | box = elem.getBoundingClientRect();
|
792 | x = box.left;
|
793 | y = box.top;
|
794 | x -= docElem.clientLeft || body.clientLeft || 0;
|
795 | y -= docElem.clientTop || body.clientTop || 0;
|
796 | return {
|
797 | left: x,
|
798 | top: y
|
799 | };
|
800 | };
|
801 |
|
802 | var getOffsetLeft = function getOffsetLeft(el) {
|
803 | var pos = getClientPosition(el);
|
804 | var doc = el.ownerDocument;
|
805 | var w = doc.defaultView || doc.parentWindow;
|
806 | pos.left += getScroll(w);
|
807 | return pos.left;
|
808 | };
|
809 |
|
810 |
|
811 |
|
812 |
|
813 |
|
814 |
|
815 |
|
816 | function getValueByPath(sourceObj, pathName, defaultValue) {
|
817 | var getValue = function getValue(sourceObj, pathNameArray) {
|
818 | var key = pathNameArray.shift();
|
819 | var value = sourceObj[key];
|
820 | if (value === undefined || value === null) {
|
821 | return defaultValue;
|
822 | } else if (pathNameArray.length === 0) {
|
823 | return value;
|
824 | } else if (pathNameArray.length > 0) {
|
825 | return getValue(value, pathNameArray);
|
826 | }
|
827 | };
|
828 | var pathNameArray = pathName.split('.');
|
829 | return getValue(sourceObj, pathNameArray);
|
830 | }
|
831 |
|
832 |
|
833 |
|
834 |
|
835 |
|
836 |
|
837 |
|
838 | var valueEquals = function valueEquals(a, b) {
|
839 |
|
840 | if (a === b) return true;
|
841 | if (!(a instanceof Array)) return false;
|
842 | if (!(b instanceof Array)) return false;
|
843 | if (a.length !== b.length) return false;
|
844 | for (var i = 0; i !== a.length; ++i) {
|
845 | if (a[i] !== b[i]) return false;
|
846 | }
|
847 | return true;
|
848 | };
|
849 |
|
850 | var arrayFindIndex = function arrayFindIndex(arr, pred) {
|
851 | for (var i = 0; i !== arr.length; ++i) {
|
852 | if (pred(arr[i])) {
|
853 | return i;
|
854 | }
|
855 | }
|
856 | return -1;
|
857 | };
|
858 |
|
859 | var arrayFind = function arrayFind(arr, pred) {
|
860 | var idx = arrayFindIndex(arr, pred);
|
861 | return idx !== -1 ? arr[idx] : undefined;
|
862 | };
|
863 |
|
864 |
|
865 | var coerceTruthyValueToArray = function coerceTruthyValueToArray(val) {
|
866 | if (Array.isArray(val)) {
|
867 | return val;
|
868 | } else if (val) {
|
869 | return [val];
|
870 | } else {
|
871 | return [];
|
872 | }
|
873 | };
|
874 |
|
875 | var isIE = function isIE() {
|
876 | return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !isNaN(Number(document.documentMode));
|
877 | };
|
878 |
|
879 | var isEdge = function isEdge() {
|
880 | return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
|
881 | };
|
882 |
|
883 | var isFirefox = function isFirefox() {
|
884 | return !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
|
885 | };
|
886 |
|
887 | var assert = function assert(condition, msg) {
|
888 | if (!condition) throw new Error('[mds-ui] ' + msg);
|
889 | };
|
890 |
|
891 |
|
892 |
|
893 |
|
894 |
|
895 | var escapeRegexpString = function escapeRegexpString() {
|
896 | var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
897 | return String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
|
898 | };
|
899 |
|
900 |
|
901 |
|
902 |
|
903 |
|
904 |
|
905 |
|
906 |
|
907 |
|
908 |
|
909 | var getOffsetWidth = function getOffsetWidth(node) {
|
910 | return node ? node.offsetWidth : 0;
|
911 | };
|
912 |
|
913 |
|
914 |
|
915 |
|
916 |
|
917 | var isFunction = function isFunction(functionToCheck) {
|
918 | var getType = {};
|
919 | return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
|
920 | };
|
921 |
|
922 |
|
923 |
|
924 |
|
925 |
|
926 | function fixBodyScroll(visible) {
|
927 | var bodyStyle = document.body.style;
|
928 | if (visible) {
|
929 | currentBodyOverflow = bodyStyle.overflow;
|
930 |
|
931 | bodyStyle.overflow = 'hidden';
|
932 |
|
933 |
|
934 |
|
935 |
|
936 | } else {
|
937 | var timer = setTimeout(function () {
|
938 | clearTimeout(timer);
|
939 | bodyStyle.overflow = currentBodyOverflow;
|
940 |
|
941 |
|
942 | }, 180);
|
943 | }
|
944 | }
|
945 |
|
946 | }),
|
947 |
|
948 | 16:
|
949 | (function(module, exports) {
|
950 |
|
951 | module.exports = __WEBPACK_EXTERNAL_MODULE__16__;
|
952 |
|
953 | }),
|
954 |
|
955 | 17:
|
956 | (function(module, __webpack_exports__, __webpack_require__) {
|
957 |
|
958 | "use strict";
|
959 |
|
960 |
|
961 | var popup_main = __webpack_require__(14);
|
962 |
|
963 |
|
964 | var get_own_property_descriptor_ = __webpack_require__(18);
|
965 | var get_own_property_descriptor_default = __webpack_require__.n(get_own_property_descriptor_);
|
966 |
|
967 |
|
968 | var keys_ = __webpack_require__(10);
|
969 | var keys_default = __webpack_require__.n(keys_);
|
970 |
|
971 |
|
972 | var assign_ = __webpack_require__(6);
|
973 | var assign_default = __webpack_require__.n(assign_);
|
974 |
|
975 |
|
976 |
|
977 |
|
978 |
|
979 |
|
980 |
|
981 |
|
982 |
|
983 |
|
984 |
|
985 |
|
986 |
|
987 |
|
988 |
|
989 |
|
990 |
|
991 |
|
992 |
|
993 |
|
994 |
|
995 |
|
996 |
|
997 |
|
998 |
|
999 |
|
1000 |
|
1001 |
|
1002 |
|
1003 |
|
1004 |
|
1005 |
|
1006 |
|
1007 | function popper_createPopper() {
|
1008 | 'use strict';
|
1009 |
|
1010 | var root = window;
|
1011 |
|
1012 |
|
1013 | var DEFAULTS = {
|
1014 |
|
1015 | placement: 'bottom',
|
1016 |
|
1017 | gpuAcceleration: false,
|
1018 |
|
1019 |
|
1020 | offset: 0,
|
1021 |
|
1022 |
|
1023 | boundariesElement: 'viewport',
|
1024 |
|
1025 |
|
1026 | boundariesPadding: 5,
|
1027 |
|
1028 |
|
1029 |
|
1030 | preventOverflowOrder: ['left', 'right', 'top', 'bottom'],
|
1031 |
|
1032 |
|
1033 | flipBehavior: 'flip',
|
1034 |
|
1035 | arrowElement: '[x-arrow]',
|
1036 |
|
1037 | arrowOffset: 0,
|
1038 |
|
1039 |
|
1040 | modifiers: ['shift', 'offset', 'preventOverflow', 'keepTogether', 'arrow', 'flip', 'applyStyle'],
|
1041 |
|
1042 | modifiersIgnored: [],
|
1043 |
|
1044 | forceAbsolute: false
|
1045 |
|
1046 | |
1047 |
|
1048 |
|
1049 |
|
1050 |
|
1051 |
|
1052 |
|
1053 |
|
1054 |
|
1055 |
|
1056 |
|
1057 |
|
1058 |
|
1059 |
|
1060 |
|
1061 |
|
1062 |
|
1063 |
|
1064 |
|
1065 |
|
1066 |
|
1067 |
|
1068 |
|
1069 |
|
1070 |
|
1071 |
|
1072 |
|
1073 |
|
1074 |
|
1075 |
|
1076 |
|
1077 |
|
1078 |
|
1079 |
|
1080 |
|
1081 |
|
1082 |
|
1083 |
|
1084 |
|
1085 |
|
1086 |
|
1087 |
|
1088 |
|
1089 |
|
1090 |
|
1091 |
|
1092 |
|
1093 |
|
1094 |
|
1095 |
|
1096 |
|
1097 |
|
1098 |
|
1099 |
|
1100 |
|
1101 |
|
1102 |
|
1103 |
|
1104 |
|
1105 |
|
1106 |
|
1107 |
|
1108 |
|
1109 |
|
1110 |
|
1111 | };function Popper(reference, popper, options) {
|
1112 | this._reference = reference.jquery ? reference[0] : reference;
|
1113 | this.state = {};
|
1114 |
|
1115 |
|
1116 |
|
1117 | var isNotDefined = typeof popper === 'undefined' || popper === null;
|
1118 | var isConfig = popper && Object.prototype.toString.call(popper) === '[object Object]';
|
1119 | if (isNotDefined || isConfig) {
|
1120 | this._popper = this.parse(isConfig ? popper : {});
|
1121 | }
|
1122 |
|
1123 | else {
|
1124 | this._popper = popper.jquery ? popper[0] : popper;
|
1125 | }
|
1126 |
|
1127 |
|
1128 | this._options = assign_default()({}, DEFAULTS, options);
|
1129 |
|
1130 |
|
1131 | this._options.modifiers = this._options.modifiers.map(function (modifier) {
|
1132 |
|
1133 | if (this._options.modifiersIgnored.indexOf(modifier) !== -1) return;
|
1134 |
|
1135 |
|
1136 |
|
1137 | if (modifier === 'applyStyle') {
|
1138 | this._popper.setAttribute('x-placement', this._options.placement);
|
1139 | }
|
1140 |
|
1141 |
|
1142 | return this.modifiers[modifier] || modifier;
|
1143 | }.bind(this));
|
1144 |
|
1145 |
|
1146 | this.state.position = this._getPosition(this._popper, this._reference);
|
1147 | setStyle(this._popper, { position: this.state.position, top: 0 });
|
1148 |
|
1149 |
|
1150 | this.update();
|
1151 |
|
1152 |
|
1153 | this._setupEventListeners();
|
1154 | return this;
|
1155 | }
|
1156 |
|
1157 |
|
1158 |
|
1159 |
|
1160 | |
1161 |
|
1162 |
|
1163 |
|
1164 |
|
1165 | Popper.prototype.destroy = function () {
|
1166 | this._popper.removeAttribute('x-placement');
|
1167 | this._popper.style.left = '';
|
1168 | this._popper.style.position = '';
|
1169 | this._popper.style.top = '';
|
1170 | this._popper.style[getSupportedPropertyName('transform')] = '';
|
1171 | this._removeEventListeners();
|
1172 |
|
1173 |
|
1174 | if (this._options.removeOnDestroy) {
|
1175 | this._popper.remove();
|
1176 | }
|
1177 | return this;
|
1178 | };
|
1179 |
|
1180 | |
1181 |
|
1182 |
|
1183 |
|
1184 |
|
1185 | Popper.prototype.update = function () {
|
1186 | var data = { instance: this, styles: {}
|
1187 |
|
1188 |
|
1189 |
|
1190 | };data.placement = this._options.placement;
|
1191 | data._originalPlacement = this._options.placement;
|
1192 |
|
1193 |
|
1194 | data.offsets = this._getOffsets(this._popper, this._reference, data.placement);
|
1195 |
|
1196 |
|
1197 | data.boundaries = this._getBoundaries(data, this._options.boundariesPadding, this._options.boundariesElement);
|
1198 |
|
1199 | data = this.runModifiers(data, this._options.modifiers);
|
1200 |
|
1201 | if (typeof this.state.updateCallback === 'function') {
|
1202 | this.state.updateCallback(data);
|
1203 | }
|
1204 | };
|
1205 |
|
1206 | |
1207 |
|
1208 |
|
1209 |
|
1210 |
|
1211 |
|
1212 | Popper.prototype.onCreate = function (callback) {
|
1213 |
|
1214 | callback(this);
|
1215 | return this;
|
1216 | };
|
1217 |
|
1218 | |
1219 |
|
1220 |
|
1221 |
|
1222 |
|
1223 |
|
1224 |
|
1225 |
|
1226 | Popper.prototype.onUpdate = function (callback) {
|
1227 | this.state.updateCallback = callback;
|
1228 | return this;
|
1229 | };
|
1230 |
|
1231 | |
1232 |
|
1233 |
|
1234 |
|
1235 |
|
1236 |
|
1237 |
|
1238 | Popper.prototype.parse = function (config) {
|
1239 | var defaultConfig = {
|
1240 | tagName: 'div',
|
1241 | classNames: ['popper'],
|
1242 | attributes: [],
|
1243 | parent: root.document.body,
|
1244 | content: '',
|
1245 | contentType: 'text',
|
1246 | arrowTagName: 'div',
|
1247 | arrowClassNames: ['popper__arrow'],
|
1248 | arrowAttributes: ['x-arrow']
|
1249 | };
|
1250 | config = assign_default()({}, defaultConfig, config);
|
1251 |
|
1252 | var d = root.document;
|
1253 |
|
1254 | var popper = d.createElement(config.tagName);
|
1255 | addClassNames(popper, config.classNames);
|
1256 | addAttributes(popper, config.attributes);
|
1257 | if (config.contentType === 'node') {
|
1258 | popper.appendChild(config.content.jquery ? config.content[0] : config.content);
|
1259 | } else if (config.contentType === 'html') {
|
1260 | popper.innerHTML = config.content;
|
1261 | } else {
|
1262 | popper.textContent = config.content;
|
1263 | }
|
1264 |
|
1265 | if (config.arrowTagName) {
|
1266 | var arrow = d.createElement(config.arrowTagName);
|
1267 | addClassNames(arrow, config.arrowClassNames);
|
1268 | addAttributes(arrow, config.arrowAttributes);
|
1269 | popper.appendChild(arrow);
|
1270 | }
|
1271 |
|
1272 | var parent = config.parent.jquery ? config.parent[0] : config.parent;
|
1273 |
|
1274 |
|
1275 |
|
1276 |
|
1277 | if (typeof parent === 'string') {
|
1278 | parent = d.querySelectorAll(config.parent);
|
1279 | if (parent.length > 1) {
|
1280 | console.warn('WARNING: the given `parent` query(' + config.parent + ') matched more than one element, the first one will be used');
|
1281 | }
|
1282 | if (parent.length === 0) {
|
1283 | throw "ERROR: the given `parent` doesn't exists!";
|
1284 | }
|
1285 | parent = parent[0];
|
1286 | }
|
1287 |
|
1288 |
|
1289 | if (parent.length > 1 && parent instanceof Element === false) {
|
1290 | console.warn('WARNING: you have passed as parent a list of elements, the first one will be used');
|
1291 | parent = parent[0];
|
1292 | }
|
1293 |
|
1294 |
|
1295 | parent.appendChild(popper);
|
1296 |
|
1297 | return popper;
|
1298 |
|
1299 | |
1300 |
|
1301 |
|
1302 |
|
1303 |
|
1304 |
|
1305 |
|
1306 | function addClassNames(element, classNames) {
|
1307 | classNames.forEach(function (className) {
|
1308 | element.classList.add(className);
|
1309 | });
|
1310 | }
|
1311 |
|
1312 | |
1313 |
|
1314 |
|
1315 |
|
1316 |
|
1317 |
|
1318 |
|
1319 |
|
1320 |
|
1321 | function addAttributes(element, attributes) {
|
1322 | attributes.forEach(function (attribute) {
|
1323 | element.setAttribute(attribute.split(':')[0], attribute.split(':')[1] || '');
|
1324 | });
|
1325 | }
|
1326 | };
|
1327 |
|
1328 | |
1329 |
|
1330 |
|
1331 |
|
1332 |
|
1333 |
|
1334 |
|
1335 |
|
1336 | Popper.prototype._getPosition = function (popper, reference) {
|
1337 | var container = getOffsetParent(reference);
|
1338 |
|
1339 | if (this._options.forceAbsolute) {
|
1340 | return 'absolute';
|
1341 | }
|
1342 |
|
1343 |
|
1344 |
|
1345 | var isParentFixed = isFixed(reference, container);
|
1346 | return isParentFixed ? 'fixed' : 'absolute';
|
1347 | };
|
1348 |
|
1349 | |
1350 |
|
1351 |
|
1352 |
|
1353 |
|
1354 |
|
1355 |
|
1356 |
|
1357 |
|
1358 | Popper.prototype._getOffsets = function (popper, reference, placement) {
|
1359 | placement = placement.split('-')[0];
|
1360 | var popperOffsets = {};
|
1361 |
|
1362 | popperOffsets.position = this.state.position;
|
1363 | var isParentFixed = popperOffsets.position === 'fixed';
|
1364 |
|
1365 |
|
1366 |
|
1367 |
|
1368 | var referenceOffsets = getOffsetRectRelativeToCustomParent(reference, getOffsetParent(popper), isParentFixed);
|
1369 |
|
1370 |
|
1371 |
|
1372 |
|
1373 | var popperRect = getOuterSizes(popper);
|
1374 |
|
1375 |
|
1376 |
|
1377 |
|
1378 |
|
1379 |
|
1380 | if (['right', 'left'].indexOf(placement) !== -1) {
|
1381 | popperOffsets.top = referenceOffsets.top + referenceOffsets.height / 2 - popperRect.height / 2;
|
1382 | if (placement === 'left') {
|
1383 | popperOffsets.left = referenceOffsets.left - popperRect.width;
|
1384 | } else {
|
1385 | popperOffsets.left = referenceOffsets.right;
|
1386 | }
|
1387 | } else {
|
1388 | popperOffsets.left = referenceOffsets.left + referenceOffsets.width / 2 - popperRect.width / 2;
|
1389 | if (placement === 'top') {
|
1390 | popperOffsets.top = referenceOffsets.top - popperRect.height;
|
1391 | } else {
|
1392 | popperOffsets.top = referenceOffsets.bottom;
|
1393 | }
|
1394 | }
|
1395 |
|
1396 |
|
1397 | popperOffsets.width = popperRect.width;
|
1398 | popperOffsets.height = popperRect.height;
|
1399 |
|
1400 | return {
|
1401 | popper: popperOffsets,
|
1402 | reference: referenceOffsets
|
1403 | };
|
1404 | };
|
1405 |
|
1406 | |
1407 |
|
1408 |
|
1409 |
|
1410 |
|
1411 |
|
1412 | Popper.prototype._setupEventListeners = function () {
|
1413 |
|
1414 | this.state.updateBound = this.update.bind(this);
|
1415 | root.addEventListener('resize', this.state.updateBound);
|
1416 |
|
1417 | if (this._options.boundariesElement !== 'window') {
|
1418 | var target = getScrollParent(this._reference);
|
1419 |
|
1420 | if (target === root.document.body || target === root.document.documentElement) {
|
1421 | target = root;
|
1422 | }
|
1423 | target.addEventListener('scroll', this.state.updateBound);
|
1424 | this.state.scrollTarget = target;
|
1425 | }
|
1426 | };
|
1427 |
|
1428 | |
1429 |
|
1430 |
|
1431 |
|
1432 |
|
1433 |
|
1434 | Popper.prototype._removeEventListeners = function () {
|
1435 |
|
1436 | root.removeEventListener('resize', this.state.updateBound);
|
1437 | if (this._options.boundariesElement !== 'window' && this.state.scrollTarget) {
|
1438 | this.state.scrollTarget.removeEventListener('scroll', this.state.updateBound);
|
1439 | this.state.scrollTarget = null;
|
1440 | }
|
1441 | this.state.updateBound = null;
|
1442 | };
|
1443 |
|
1444 | |
1445 |
|
1446 |
|
1447 |
|
1448 |
|
1449 |
|
1450 |
|
1451 |
|
1452 |
|
1453 |
|
1454 | Popper.prototype._getBoundaries = function (data, padding, boundariesElement) {
|
1455 |
|
1456 | var boundaries = {};
|
1457 | var width, height;
|
1458 | if (boundariesElement === 'window') {
|
1459 | var body = root.document.body,
|
1460 | html = root.document.documentElement;
|
1461 |
|
1462 | height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
|
1463 | width = Math.max(body.scrollWidth, body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth);
|
1464 |
|
1465 | boundaries = {
|
1466 | top: 0,
|
1467 | right: width,
|
1468 | bottom: height,
|
1469 | left: 0
|
1470 | };
|
1471 | } else if (boundariesElement === 'viewport') {
|
1472 | var offsetParent = getOffsetParent(this._popper);
|
1473 | var scrollParent = getScrollParent(this._popper);
|
1474 | var offsetParentRect = getOffsetRect(offsetParent);
|
1475 |
|
1476 |
|
1477 | var getScrollTopValue = function getScrollTopValue(element) {
|
1478 | return element == document.body ? Math.max(document.documentElement.scrollTop, document.body.scrollTop) : element.scrollTop;
|
1479 | };
|
1480 | var getScrollLeftValue = function getScrollLeftValue(element) {
|
1481 | return element == document.body ? Math.max(document.documentElement.scrollLeft, document.body.scrollLeft) : element.scrollLeft;
|
1482 | };
|
1483 |
|
1484 |
|
1485 | var scrollTop = data.offsets.popper.position === 'fixed' ? 0 : getScrollTopValue(scrollParent);
|
1486 | var scrollLeft = data.offsets.popper.position === 'fixed' ? 0 : getScrollLeftValue(scrollParent);
|
1487 |
|
1488 | boundaries = {
|
1489 | top: 0 - (offsetParentRect.top - scrollTop),
|
1490 | right: root.document.documentElement.clientWidth - (offsetParentRect.left - scrollLeft),
|
1491 | bottom: root.document.documentElement.clientHeight - (offsetParentRect.top - scrollTop),
|
1492 | left: 0 - (offsetParentRect.left - scrollLeft)
|
1493 | };
|
1494 | } else {
|
1495 | if (getOffsetParent(this._popper) === boundariesElement) {
|
1496 | boundaries = {
|
1497 | top: 0,
|
1498 | left: 0,
|
1499 | right: boundariesElement.clientWidth,
|
1500 | bottom: boundariesElement.clientHeight
|
1501 | };
|
1502 | } else {
|
1503 | boundaries = getOffsetRect(boundariesElement);
|
1504 | }
|
1505 | }
|
1506 | boundaries.left += padding;
|
1507 | boundaries.right -= padding;
|
1508 | boundaries.top = boundaries.top + padding;
|
1509 | boundaries.bottom = boundaries.bottom - padding;
|
1510 | return boundaries;
|
1511 | };
|
1512 |
|
1513 | |
1514 |
|
1515 |
|
1516 |
|
1517 |
|
1518 |
|
1519 |
|
1520 |
|
1521 |
|
1522 | Popper.prototype.runModifiers = function (data, modifiers, ends) {
|
1523 | var modifiersToRun = modifiers.slice();
|
1524 | if (ends !== undefined) {
|
1525 | modifiersToRun = this._options.modifiers.slice(0, getArrayKeyIndex(this._options.modifiers, ends));
|
1526 | }
|
1527 |
|
1528 | modifiersToRun.forEach(function (modifier) {
|
1529 | if (isFunction(modifier)) {
|
1530 | data = modifier.call(this, data);
|
1531 | }
|
1532 | }.bind(this));
|
1533 |
|
1534 | return data;
|
1535 | };
|
1536 |
|
1537 | |
1538 |
|
1539 |
|
1540 |
|
1541 |
|
1542 |
|
1543 |
|
1544 |
|
1545 | Popper.prototype.isModifierRequired = function (requesting, requested) {
|
1546 | var index = getArrayKeyIndex(this._options.modifiers, requesting);
|
1547 | return !!this._options.modifiers.slice(0, index).filter(function (modifier) {
|
1548 | return modifier === requested;
|
1549 | }).length;
|
1550 | };
|
1551 |
|
1552 |
|
1553 |
|
1554 |
|
1555 |
|
1556 | |
1557 |
|
1558 |
|
1559 |
|
1560 |
|
1561 |
|
1562 | Popper.prototype.modifiers = {};
|
1563 |
|
1564 | |
1565 |
|
1566 |
|
1567 |
|
1568 |
|
1569 |
|
1570 |
|
1571 | Popper.prototype.modifiers.applyStyle = function (data) {
|
1572 |
|
1573 |
|
1574 | var styles = {
|
1575 | position: data.offsets.popper.position
|
1576 |
|
1577 |
|
1578 | };var left = Math.round(data.offsets.popper.left);
|
1579 | var top = Math.round(data.offsets.popper.top);
|
1580 |
|
1581 |
|
1582 |
|
1583 | var prefixedProperty;
|
1584 | if (this._options.gpuAcceleration && (prefixedProperty = getSupportedPropertyName('transform'))) {
|
1585 | styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)';
|
1586 | styles.top = 0;
|
1587 | styles.left = 0;
|
1588 | }
|
1589 |
|
1590 | else {
|
1591 | styles.left = left;
|
1592 | styles.top = top;
|
1593 | }
|
1594 |
|
1595 |
|
1596 |
|
1597 |
|
1598 |
|
1599 | assign_default()(styles, data.styles);
|
1600 |
|
1601 | setStyle(this._popper, styles);
|
1602 |
|
1603 |
|
1604 |
|
1605 | if (!this._popper._prevClass.includes('mds-date-picker')) {
|
1606 | this._popper.setAttribute('x-placement', data.placement);
|
1607 | var popper = this._popper;
|
1608 | var instanceType = popper.classList[0];
|
1609 | popper.classList.replace(popper.classList[1], instanceType + '-placement-' + data.placement);
|
1610 | }
|
1611 |
|
1612 |
|
1613 |
|
1614 |
|
1615 | if (this.isModifierRequired(this.modifiers.applyStyle, this.modifiers.arrow) && data.offsets.arrow) {
|
1616 | setStyle(data.arrowElement, data.offsets.arrow);
|
1617 | }
|
1618 |
|
1619 | return data;
|
1620 | };
|
1621 |
|
1622 | |
1623 |
|
1624 |
|
1625 |
|
1626 |
|
1627 |
|
1628 |
|
1629 | Popper.prototype.modifiers.shift = function (data) {
|
1630 | var placement = data.placement;
|
1631 | var basePlacement = placement.split('-')[0];
|
1632 | var shiftVariation = placement.split('-')[1];
|
1633 |
|
1634 |
|
1635 | if (shiftVariation) {
|
1636 | var reference = data.offsets.reference;
|
1637 | var popper = getPopperClientRect(data.offsets.popper);
|
1638 |
|
1639 | var shiftOffsets = {
|
1640 | y: {
|
1641 | start: { top: reference.top },
|
1642 | end: { top: reference.top + reference.height - popper.height }
|
1643 | },
|
1644 | x: {
|
1645 | start: { left: reference.left },
|
1646 | end: { left: reference.left + reference.width - popper.width }
|
1647 | }
|
1648 | };
|
1649 |
|
1650 | var axis = ['bottom', 'top'].indexOf(basePlacement) !== -1 ? 'x' : 'y';
|
1651 |
|
1652 | data.offsets.popper = assign_default()(popper, shiftOffsets[axis][shiftVariation]);
|
1653 | }
|
1654 | return data;
|
1655 | };
|
1656 |
|
1657 | |
1658 |
|
1659 |
|
1660 |
|
1661 |
|
1662 |
|
1663 |
|
1664 | Popper.prototype.modifiers.preventOverflow = function (data) {
|
1665 | var order = this._options.preventOverflowOrder;
|
1666 | var popper = getPopperClientRect(data.offsets.popper);
|
1667 |
|
1668 | var check = {
|
1669 | left: function left() {
|
1670 | var left = popper.left;
|
1671 | if (popper.left < data.boundaries.left) {
|
1672 | left = Math.max(popper.left, data.boundaries.left);
|
1673 | }
|
1674 | return { left: left };
|
1675 | },
|
1676 | right: function right() {
|
1677 | var left = popper.left;
|
1678 | if (popper.right > data.boundaries.right) {
|
1679 | left = Math.min(popper.left, data.boundaries.right - popper.width);
|
1680 | }
|
1681 | return { left: left };
|
1682 | },
|
1683 | top: function top() {
|
1684 | var top = popper.top;
|
1685 | if (popper.top < data.boundaries.top) {
|
1686 | top = Math.max(popper.top, data.boundaries.top);
|
1687 | }
|
1688 | return { top: top };
|
1689 | },
|
1690 | bottom: function bottom() {
|
1691 | var top = popper.top;
|
1692 | if (popper.bottom > data.boundaries.bottom) {
|
1693 | top = Math.min(popper.top, data.boundaries.bottom - popper.height);
|
1694 | }
|
1695 | return { top: top };
|
1696 | }
|
1697 | };
|
1698 |
|
1699 | order.forEach(function (direction) {
|
1700 | data.offsets.popper = assign_default()(popper, check[direction]());
|
1701 | });
|
1702 |
|
1703 | return data;
|
1704 | };
|
1705 |
|
1706 | |
1707 |
|
1708 |
|
1709 |
|
1710 |
|
1711 |
|
1712 |
|
1713 | Popper.prototype.modifiers.keepTogether = function (data) {
|
1714 | var popper = getPopperClientRect(data.offsets.popper);
|
1715 | var reference = data.offsets.reference;
|
1716 | var f = Math.floor;
|
1717 |
|
1718 | if (popper.right < f(reference.left)) {
|
1719 | data.offsets.popper.left = f(reference.left) - popper.width;
|
1720 | }
|
1721 | if (popper.left > f(reference.right)) {
|
1722 | data.offsets.popper.left = f(reference.right);
|
1723 | }
|
1724 | if (popper.bottom < f(reference.top)) {
|
1725 | data.offsets.popper.top = f(reference.top) - popper.height;
|
1726 | }
|
1727 | if (popper.top > f(reference.bottom)) {
|
1728 | data.offsets.popper.top = f(reference.bottom);
|
1729 | }
|
1730 |
|
1731 | return data;
|
1732 | };
|
1733 |
|
1734 | |
1735 |
|
1736 |
|
1737 |
|
1738 |
|
1739 |
|
1740 |
|
1741 |
|
1742 |
|
1743 | Popper.prototype.modifiers.flip = function (data) {
|
1744 |
|
1745 |
|
1746 | if (!this.isModifierRequired(this.modifiers.flip, this.modifiers.preventOverflow)) {
|
1747 | console.warn('WARNING: preventOverflow modifier is required by flip modifier in order to work, be sure to include it before flip!');
|
1748 | return data;
|
1749 | }
|
1750 |
|
1751 | if (data.flipped && data.placement === data._originalPlacement) {
|
1752 |
|
1753 | return data;
|
1754 | }
|
1755 |
|
1756 | var placement = data.placement.split('-')[0];
|
1757 | var placementOpposite = getOppositePlacement(placement);
|
1758 | var variation = data.placement.split('-')[1] || '';
|
1759 | var flipOrder = [];
|
1760 | if (this._options.flipBehavior === 'flip') {
|
1761 | flipOrder = [placement, placementOpposite];
|
1762 | } else {
|
1763 | flipOrder = this._options.flipBehavior;
|
1764 | }
|
1765 |
|
1766 | flipOrder.forEach(function (step, index) {
|
1767 | if (placement !== step || flipOrder.length === index + 1) {
|
1768 | return;
|
1769 | }
|
1770 |
|
1771 | placement = data.placement.split('-')[0];
|
1772 | placementOpposite = getOppositePlacement(placement);
|
1773 |
|
1774 | var popperOffsets = getPopperClientRect(data.offsets.popper);
|
1775 |
|
1776 |
|
1777 |
|
1778 | var a = ['right', 'bottom'].indexOf(placement) !== -1;
|
1779 |
|
1780 |
|
1781 | if (a && Math.floor(data.offsets.reference[placement]) > Math.floor(popperOffsets[placementOpposite]) || !a && Math.floor(data.offsets.reference[placement]) < Math.floor(popperOffsets[placementOpposite])) {
|
1782 |
|
1783 | data.flipped = true;
|
1784 | data.placement = flipOrder[index + 1];
|
1785 | if (variation) {
|
1786 | data.placement += '-' + variation;
|
1787 | }
|
1788 | data.offsets.popper = this._getOffsets(this._popper, this._reference, data.placement).popper;
|
1789 | data = this.runModifiers(data, this._options.modifiers, this._flip);
|
1790 | }
|
1791 | }.bind(this));
|
1792 | return data;
|
1793 | };
|
1794 |
|
1795 | |
1796 |
|
1797 |
|
1798 |
|
1799 |
|
1800 |
|
1801 |
|
1802 |
|
1803 | Popper.prototype.modifiers.offset = function (data) {
|
1804 | var offset = this._options.offset;
|
1805 | var popper = data.offsets.popper;
|
1806 |
|
1807 | if (data.placement.indexOf('left') !== -1) {
|
1808 | popper.top -= offset;
|
1809 | } else if (data.placement.indexOf('right') !== -1) {
|
1810 | popper.top += offset;
|
1811 | } else if (data.placement.indexOf('top') !== -1) {
|
1812 | popper.left -= offset;
|
1813 | } else if (data.placement.indexOf('bottom') !== -1) {
|
1814 | popper.left += offset;
|
1815 | }
|
1816 | return data;
|
1817 | };
|
1818 |
|
1819 | |
1820 |
|
1821 |
|
1822 |
|
1823 |
|
1824 |
|
1825 |
|
1826 |
|
1827 | Popper.prototype.modifiers.arrow = function (data) {
|
1828 | var arrow = this._options.arrowElement;
|
1829 | var arrowOffset = this._options.arrowOffset;
|
1830 |
|
1831 |
|
1832 | if (typeof arrow === 'string') {
|
1833 | arrow = this._popper.querySelector(arrow);
|
1834 | }
|
1835 |
|
1836 |
|
1837 | if (!arrow) {
|
1838 | return data;
|
1839 | }
|
1840 |
|
1841 |
|
1842 | if (!this._popper.contains(arrow)) {
|
1843 | console.warn('WARNING: `arrowElement` must be child of its popper element!');
|
1844 | return data;
|
1845 | }
|
1846 |
|
1847 |
|
1848 | if (!this.isModifierRequired(this.modifiers.arrow, this.modifiers.keepTogether)) {
|
1849 | console.warn('WARNING: keepTogether modifier is required by arrow modifier in order to work, be sure to include it before arrow!');
|
1850 | return data;
|
1851 | }
|
1852 |
|
1853 | var arrowStyle = {};
|
1854 | var placement = data.placement.split('-')[0];
|
1855 | var popper = getPopperClientRect(data.offsets.popper);
|
1856 | var reference = data.offsets.reference;
|
1857 | var isVertical = ['left', 'right'].indexOf(placement) !== -1;
|
1858 |
|
1859 | var len = isVertical ? 'height' : 'width';
|
1860 | var side = isVertical ? 'top' : 'left';
|
1861 | var translate = isVertical ? 'translateY' : 'translateX';
|
1862 | var altSide = isVertical ? 'left' : 'top';
|
1863 | var opSide = isVertical ? 'bottom' : 'right';
|
1864 | var arrowSize = getOuterSizes(arrow)[len];
|
1865 |
|
1866 |
|
1867 |
|
1868 |
|
1869 |
|
1870 |
|
1871 | if (reference[opSide] - arrowSize < popper[side]) {
|
1872 | data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowSize);
|
1873 | }
|
1874 |
|
1875 | if (reference[side] + arrowSize > popper[opSide]) {
|
1876 | data.offsets.popper[side] += reference[side] + arrowSize - popper[opSide];
|
1877 | }
|
1878 |
|
1879 |
|
1880 | var center = reference[side] + (arrowOffset || reference[len] / 2 - arrowSize / 2);
|
1881 |
|
1882 | var sideValue = center - popper[side];
|
1883 |
|
1884 |
|
1885 | sideValue = Math.max(Math.min(popper[len] - arrowSize - 8, sideValue), 8);
|
1886 | arrowStyle[side] = sideValue;
|
1887 | arrowStyle[altSide] = '';
|
1888 |
|
1889 | data.offsets.arrow = arrowStyle;
|
1890 | data.arrowElement = arrow;
|
1891 |
|
1892 | return data;
|
1893 | };
|
1894 |
|
1895 |
|
1896 |
|
1897 |
|
1898 |
|
1899 | |
1900 |
|
1901 |
|
1902 |
|
1903 |
|
1904 |
|
1905 |
|
1906 | function getOuterSizes(element) {
|
1907 |
|
1908 | var _display = element.style.display,
|
1909 | _visibility = element.style.visibility;
|
1910 | element.style.display = 'block';
|
1911 | element.style.visibility = 'hidden';
|
1912 | var calcWidthToForceRepaint = element.offsetWidth;
|
1913 |
|
1914 |
|
1915 | var styles = root.getComputedStyle(element);
|
1916 | var x = parseFloat(styles.marginTop) + parseFloat(styles.marginBottom);
|
1917 | var y = parseFloat(styles.marginLeft) + parseFloat(styles.marginRight);
|
1918 | var result = {
|
1919 | width: element.offsetWidth + y,
|
1920 | height: element.offsetHeight + x
|
1921 |
|
1922 |
|
1923 | };element.style.display = _display;
|
1924 | element.style.visibility = _visibility;
|
1925 | return result;
|
1926 | }
|
1927 |
|
1928 | |
1929 |
|
1930 |
|
1931 |
|
1932 |
|
1933 |
|
1934 |
|
1935 | function getOppositePlacement(placement) {
|
1936 | var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };
|
1937 | return placement.replace(/left|right|bottom|top/g, function (matched) {
|
1938 | return hash[matched];
|
1939 | });
|
1940 | }
|
1941 |
|
1942 | |
1943 |
|
1944 |
|
1945 |
|
1946 |
|
1947 |
|
1948 |
|
1949 | function getPopperClientRect(popperOffsets) {
|
1950 | var offsets = assign_default()({}, popperOffsets);
|
1951 | offsets.right = offsets.left + offsets.width;
|
1952 | offsets.bottom = offsets.top + offsets.height;
|
1953 | return offsets;
|
1954 | }
|
1955 |
|
1956 | |
1957 |
|
1958 |
|
1959 |
|
1960 |
|
1961 |
|
1962 |
|
1963 |
|
1964 | function getArrayKeyIndex(arr, keyToFind) {
|
1965 | var i = 0,
|
1966 | key;
|
1967 | for (key in arr) {
|
1968 | if (arr[key] === keyToFind) {
|
1969 | return i;
|
1970 | }
|
1971 | i++;
|
1972 | }
|
1973 | return null;
|
1974 | }
|
1975 |
|
1976 | |
1977 |
|
1978 |
|
1979 |
|
1980 |
|
1981 |
|
1982 |
|
1983 | function getStyleComputedProperty(element, property) {
|
1984 |
|
1985 | var css = root.getComputedStyle(element, null);
|
1986 | return css[property];
|
1987 | }
|
1988 |
|
1989 | |
1990 |
|
1991 |
|
1992 |
|
1993 |
|
1994 |
|
1995 |
|
1996 | function getOffsetParent(element) {
|
1997 |
|
1998 | var offsetParent = element.offsetParent;
|
1999 | return offsetParent === root.document.body || !offsetParent ? root.document.documentElement : offsetParent;
|
2000 | }
|
2001 |
|
2002 | |
2003 |
|
2004 |
|
2005 |
|
2006 |
|
2007 |
|
2008 |
|
2009 | function getScrollParent(element) {
|
2010 | var parent = element.parentNode;
|
2011 |
|
2012 | if (!parent) {
|
2013 | return element;
|
2014 | }
|
2015 |
|
2016 | if (parent === root.document) {
|
2017 |
|
2018 |
|
2019 | if (root.document.body.scrollTop || root.document.body.scrollLeft) {
|
2020 | return root.document.body;
|
2021 | } else {
|
2022 | return root.document.documentElement;
|
2023 | }
|
2024 | }
|
2025 |
|
2026 |
|
2027 | if (['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-x')) !== -1 || ['scroll', 'auto'].indexOf(getStyleComputedProperty(parent, 'overflow-y')) !== -1) {
|
2028 |
|
2029 |
|
2030 |
|
2031 | return parent;
|
2032 | }
|
2033 | return getScrollParent(element.parentNode);
|
2034 | }
|
2035 |
|
2036 | |
2037 |
|
2038 |
|
2039 |
|
2040 |
|
2041 |
|
2042 |
|
2043 |
|
2044 | function isFixed(element) {
|
2045 | if (element === root.document.body) {
|
2046 | return false;
|
2047 | }
|
2048 | if (getStyleComputedProperty(element, 'position') === 'fixed') {
|
2049 | return true;
|
2050 | }
|
2051 | return element.parentNode ? isFixed(element.parentNode) : element;
|
2052 | }
|
2053 |
|
2054 | |
2055 |
|
2056 |
|
2057 |
|
2058 |
|
2059 |
|
2060 |
|
2061 | function setStyle(element, styles) {
|
2062 | function is_numeric(n) {
|
2063 | return n !== '' && !isNaN(parseFloat(n)) && isFinite(n);
|
2064 | }
|
2065 | keys_default()(styles).forEach(function (prop) {
|
2066 | var unit = '';
|
2067 |
|
2068 | if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && is_numeric(styles[prop])) {
|
2069 | unit = 'px';
|
2070 | }
|
2071 | element.style[prop] = styles[prop] + unit;
|
2072 | });
|
2073 | }
|
2074 |
|
2075 | |
2076 |
|
2077 |
|
2078 |
|
2079 |
|
2080 |
|
2081 |
|
2082 | function isFunction(functionToCheck) {
|
2083 | var getType = {};
|
2084 | return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]';
|
2085 | }
|
2086 |
|
2087 | |
2088 |
|
2089 |
|
2090 |
|
2091 |
|
2092 |
|
2093 |
|
2094 | function getOffsetRect(element) {
|
2095 | var elementRect = {
|
2096 | width: element.offsetWidth,
|
2097 | height: element.offsetHeight,
|
2098 | left: element.offsetLeft,
|
2099 | top: element.offsetTop
|
2100 | };
|
2101 |
|
2102 | elementRect.right = elementRect.left + elementRect.width;
|
2103 | elementRect.bottom = elementRect.top + elementRect.height;
|
2104 |
|
2105 |
|
2106 | return elementRect;
|
2107 | }
|
2108 |
|
2109 | |
2110 |
|
2111 |
|
2112 |
|
2113 |
|
2114 |
|
2115 |
|
2116 | function getBoundingClientRect(element) {
|
2117 | var rect = element.getBoundingClientRect();
|
2118 |
|
2119 |
|
2120 | var isIE = navigator.userAgent.indexOf('MSIE') != -1;
|
2121 |
|
2122 |
|
2123 | var rectTop = isIE && element.tagName === 'HTML' ? -element.scrollTop : rect.top;
|
2124 |
|
2125 | return {
|
2126 | left: rect.left,
|
2127 | top: rectTop,
|
2128 | right: rect.right,
|
2129 | bottom: rect.bottom,
|
2130 | width: rect.right - rect.left,
|
2131 | height: rect.bottom - rectTop
|
2132 | };
|
2133 | }
|
2134 |
|
2135 | |
2136 |
|
2137 |
|
2138 |
|
2139 |
|
2140 |
|
2141 |
|
2142 |
|
2143 | function getOffsetRectRelativeToCustomParent(element, parent, fixed) {
|
2144 | var elementRect = getBoundingClientRect(element);
|
2145 | var parentRect = getBoundingClientRect(parent);
|
2146 |
|
2147 | if (fixed) {
|
2148 | var scrollParent = getScrollParent(parent);
|
2149 | parentRect.top += scrollParent.scrollTop;
|
2150 | parentRect.bottom += scrollParent.scrollTop;
|
2151 | parentRect.left += scrollParent.scrollLeft;
|
2152 | parentRect.right += scrollParent.scrollLeft;
|
2153 | }
|
2154 |
|
2155 | var rect = {
|
2156 | top: elementRect.top - parentRect.top,
|
2157 | left: elementRect.left - parentRect.left,
|
2158 | bottom: elementRect.top - parentRect.top + elementRect.height,
|
2159 | right: elementRect.left - parentRect.left + elementRect.width,
|
2160 | width: elementRect.width,
|
2161 | height: elementRect.height
|
2162 | };
|
2163 | return rect;
|
2164 | }
|
2165 |
|
2166 | |
2167 |
|
2168 |
|
2169 |
|
2170 |
|
2171 |
|
2172 |
|
2173 | function getSupportedPropertyName(property) {
|
2174 | var prefixes = ['', 'ms', 'webkit', 'moz', 'o'];
|
2175 |
|
2176 | for (var i = 0; i < prefixes.length; i++) {
|
2177 | var toCheck = prefixes[i] ? prefixes[i] + property.charAt(0).toUpperCase() + property.slice(1) : property;
|
2178 | if (typeof root.document.body.style[toCheck] !== 'undefined') {
|
2179 | return toCheck;
|
2180 | }
|
2181 | }
|
2182 | return null;
|
2183 | }
|
2184 |
|
2185 | |
2186 |
|
2187 |
|
2188 |
|
2189 |
|
2190 |
|
2191 |
|
2192 |
|
2193 | if (!assign_default.a) {
|
2194 | Object.defineProperty(Object, 'assign', {
|
2195 | enumerable: false,
|
2196 | configurable: true,
|
2197 | writable: true,
|
2198 | value: function value(target) {
|
2199 | if (target === undefined || target === null) {
|
2200 | throw new TypeError('Cannot convert first argument to object');
|
2201 | }
|
2202 |
|
2203 | var to = Object(target);
|
2204 | for (var i = 1; i < arguments.length; i++) {
|
2205 | var nextSource = arguments[i];
|
2206 | if (nextSource === undefined || nextSource === null) {
|
2207 | continue;
|
2208 | }
|
2209 | nextSource = Object(nextSource);
|
2210 |
|
2211 | var keysArray = keys_default()(nextSource);
|
2212 | for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
|
2213 | var nextKey = keysArray[nextIndex];
|
2214 | var desc = get_own_property_descriptor_default()(nextSource, nextKey);
|
2215 | if (desc !== undefined && desc.enumerable) {
|
2216 | to[nextKey] = nextSource[nextKey];
|
2217 | }
|
2218 | }
|
2219 | }
|
2220 | return to;
|
2221 | }
|
2222 | });
|
2223 | }
|
2224 |
|
2225 | return Popper;
|
2226 | }
|
2227 | var _popper_popper = (popper_createPopper());
|
2228 |
|
2229 |
|
2230 |
|
2231 |
|
2232 | var stop = function stop(e) {
|
2233 | return e.stopPropagation();
|
2234 | };
|
2235 |
|
2236 |
|
2237 |
|
2238 |
|
2239 |
|
2240 |
|
2241 |
|
2242 |
|
2243 | var vue_popper = __webpack_exports__["a"] = ({
|
2244 | props: {
|
2245 | transformOrigin: {
|
2246 | type: [Boolean, String],
|
2247 | default: true
|
2248 | },
|
2249 | placement: {
|
2250 | type: String,
|
2251 | default: 'bottom'
|
2252 | },
|
2253 | boundariesPadding: {
|
2254 | type: Number,
|
2255 | default: 5
|
2256 | },
|
2257 | reference: {},
|
2258 | popper: {},
|
2259 | offset: {
|
2260 | default: 0
|
2261 | },
|
2262 | value: Boolean,
|
2263 | visibleArrow: Boolean,
|
2264 | arrowOffset: {
|
2265 | type: Number,
|
2266 | default: 35
|
2267 | },
|
2268 | appendToBody: {
|
2269 | type: Boolean,
|
2270 | default: true
|
2271 | },
|
2272 | popperOptions: {
|
2273 | type: Object,
|
2274 | default: function _default() {
|
2275 | return {
|
2276 | gpuAcceleration: false
|
2277 | };
|
2278 | }
|
2279 | }
|
2280 | },
|
2281 |
|
2282 | data: function data() {
|
2283 | return {
|
2284 | showPopper: false,
|
2285 | currentPlacement: ''
|
2286 | };
|
2287 | },
|
2288 |
|
2289 |
|
2290 | watch: {
|
2291 | value: {
|
2292 | immediate: true,
|
2293 | handler: function handler(val) {
|
2294 | this.showPopper = val;
|
2295 | this.$emit('input', val);
|
2296 | }
|
2297 | },
|
2298 |
|
2299 | showPopper: function showPopper(val) {
|
2300 | if (this.disabled) return;
|
2301 | val ? this.updatePopper() : this.destroyPopper();
|
2302 | this.$emit('input', val);
|
2303 | }
|
2304 | },
|
2305 |
|
2306 | methods: {
|
2307 | createPopper: function createPopper() {
|
2308 | var _this = this;
|
2309 |
|
2310 | var options = this.popperOptions;
|
2311 | var popper = this.popperElm = this.popperElm || this.popper || this.$refs.popper;
|
2312 | var realPlacement = void 0;
|
2313 | if (popper.__vue__ && popper.__vue__.$parent && popper.__vue__.$parent.$options.name === 'MdsCascader') {
|
2314 | realPlacement = 'bottom-start';
|
2315 | } else {
|
2316 | realPlacement = this.realPlacement || this.placement;
|
2317 | }
|
2318 | this.currentPlacement = this.currentPlacement || realPlacement;
|
2319 | if (!/^(top|bottom|left|right)(-start|-end)?$/g.test(this.currentPlacement)) {
|
2320 | return;
|
2321 | }
|
2322 |
|
2323 | var reference = this.referenceElm = this.referenceElm || this.reference || this.$refs.reference;
|
2324 |
|
2325 | if (!reference && this.$slots.reference && this.$slots.reference[0]) {
|
2326 | reference = this.referenceElm = this.$slots.reference[0].elm;
|
2327 | }
|
2328 |
|
2329 | if (!popper || !reference) return;
|
2330 | if (this.visibleArrow) this.appendArrow(popper);
|
2331 | if (this.appendToBody) document.body.appendChild(this.popperElm);
|
2332 | if (this.popperJS && this.popperJS.destroy) {
|
2333 | this.popperJS.destroy();
|
2334 | }
|
2335 |
|
2336 | options.placement = this.currentPlacement;
|
2337 | options.offset = this.offset;
|
2338 | options.arrowOffset = this.arrowOffset;
|
2339 | this.popperJS = new _popper_popper(reference, popper, options);
|
2340 | this.popperJS.onCreate(function (_) {
|
2341 | _this.$emit('created', _this);
|
2342 | _this.resetTransformOrigin();
|
2343 | _this.$nextTick(_this.updatePopper);
|
2344 | });
|
2345 | if (typeof options.onUpdate === 'function') {
|
2346 | this.popperJS.onUpdate(options.onUpdate);
|
2347 | }
|
2348 | this.popperJS._popper.style.zIndex = popup_main["a" ].nextZIndex();
|
2349 | this.popperElm.addEventListener('click', stop);
|
2350 | },
|
2351 | updatePopper: function updatePopper(zIndexFlag) {
|
2352 | var popperJS = this.popperJS;
|
2353 | if (popperJS) {
|
2354 | popperJS.update();
|
2355 | if (popperJS._popper) {
|
2356 | if (!zIndexFlag) {
|
2357 | popperJS._popper.style.zIndex = popup_main["a" ].nextZIndex();
|
2358 | }
|
2359 | }
|
2360 | } else {
|
2361 | this.createPopper();
|
2362 | }
|
2363 | },
|
2364 | doDestroy: function doDestroy(forceDestroy) {
|
2365 |
|
2366 | if (!this.popperJS || this.showPopper && !forceDestroy) return;
|
2367 | this.popperJS.destroy();
|
2368 | this.popperJS = null;
|
2369 | },
|
2370 | destroyPopper: function destroyPopper() {
|
2371 | if (this.popperJS) {
|
2372 | this.resetTransformOrigin();
|
2373 | }
|
2374 | },
|
2375 | resetTransformOrigin: function resetTransformOrigin() {
|
2376 | if (!this.transformOrigin) return;
|
2377 | var placementMap = {
|
2378 | top: 'bottom',
|
2379 | bottom: 'top',
|
2380 | left: 'right',
|
2381 | right: 'left'
|
2382 | };
|
2383 | var placement = this.popperJS._popper.getAttribute('x-placement').split('-')[0];
|
2384 | var origin = placementMap[placement];
|
2385 | this.popperJS._popper.style.transformOrigin = typeof this.transformOrigin === 'string' ? this.transformOrigin : ['top', 'bottom'].indexOf(placement) > -1 ? 'center ' + origin : origin + ' center';
|
2386 | },
|
2387 | appendArrow: function appendArrow(element) {
|
2388 | var hash = void 0;
|
2389 | if (this.appended) {
|
2390 | return;
|
2391 | }
|
2392 |
|
2393 | this.appended = true;
|
2394 |
|
2395 | for (var item in element.attributes) {
|
2396 | if (/^_v-/.test(element.attributes[item].name)) {
|
2397 | hash = element.attributes[item].name;
|
2398 | break;
|
2399 | }
|
2400 | }
|
2401 |
|
2402 | var arrow = document.createElement('div');
|
2403 |
|
2404 | if (hash) {
|
2405 | arrow.setAttribute(hash, '');
|
2406 | }
|
2407 | arrow.setAttribute('x-arrow', '');
|
2408 | arrow.className = 'popper__arrow';
|
2409 | element.appendChild(arrow);
|
2410 | }
|
2411 | },
|
2412 |
|
2413 | beforeDestroy: function beforeDestroy() {
|
2414 | this.doDestroy(true);
|
2415 | if (this.popperElm && this.popperElm.parentNode === document.body) {
|
2416 | this.popperElm.removeEventListener('click', stop);
|
2417 | document.body.removeChild(this.popperElm);
|
2418 | }
|
2419 | },
|
2420 | deactivated: function deactivated() {
|
2421 | this.$options.beforeDestroy[0].call(this);
|
2422 | }
|
2423 | });
|
2424 |
|
2425 | }),
|
2426 |
|
2427 | 18:
|
2428 | (function(module, exports) {
|
2429 |
|
2430 | module.exports = require("babel-runtime/core-js/object/get-own-property-descriptor");
|
2431 |
|
2432 | }),
|
2433 |
|
2434 | 2:
|
2435 | (function(module, exports) {
|
2436 |
|
2437 | module.exports = __WEBPACK_EXTERNAL_MODULE__2__;
|
2438 |
|
2439 | }),
|
2440 |
|
2441 | 21:
|
2442 | (function(module, __webpack_exports__, __webpack_require__) {
|
2443 |
|
2444 | "use strict";
|
2445 | __webpack_require__.d(__webpack_exports__, "d", function() { return on; });
|
2446 |
|
2447 |
|
2448 | __webpack_require__.d(__webpack_exports__, "c", function() { return hasClass; });
|
2449 | __webpack_require__.d(__webpack_exports__, "a", function() { return addClass; });
|
2450 | __webpack_require__.d(__webpack_exports__, "e", function() { return removeClass; });
|
2451 | __webpack_require__.d(__webpack_exports__, "b", function() { return getStyle; });
|
2452 |
|
2453 |
|
2454 |
|
2455 |
|
2456 | var babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
|
2457 | var babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);
|
2458 | var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2);
|
2459 | var vue__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_1__);
|
2460 |
|
2461 |
|
2462 |
|
2463 |
|
2464 |
|
2465 | var isServer = vue__WEBPACK_IMPORTED_MODULE_1___default.a.prototype.$isServer;
|
2466 |
|
2467 |
|
2468 | var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
|
2469 | var MOZ_HACK_REGEXP = /^moz([A-Z])/;
|
2470 | var ieVersion = isServer ? 0 : Number(document.documentMode);
|
2471 |
|
2472 |
|
2473 | var trim = function trim(string) {
|
2474 | return (string || '').replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g, '');
|
2475 | };
|
2476 |
|
2477 | var camelCase = function camelCase(name) {
|
2478 | return name.replace(SPECIAL_CHARS_REGEXP, function (_, separator, letter, offset) {
|
2479 | return offset ? letter.toUpperCase() : letter;
|
2480 | }).replace(MOZ_HACK_REGEXP, 'Moz$1');
|
2481 | };
|
2482 |
|
2483 |
|
2484 | var on = function () {
|
2485 | if (!isServer && document.addEventListener) {
|
2486 | return function (element, event, handler) {
|
2487 | if (element && event && handler) {
|
2488 | element.addEventListener(event, handler, false);
|
2489 | }
|
2490 | };
|
2491 | } else {
|
2492 | return function (element, event, handler) {
|
2493 | if (element && event && handler) {
|
2494 | element.attachEvent('on' + event, handler);
|
2495 | }
|
2496 | };
|
2497 | }
|
2498 | }();
|
2499 |
|
2500 |
|
2501 | var off = function () {
|
2502 | if (!isServer && document.removeEventListener) {
|
2503 | return function (element, event, handler) {
|
2504 | if (element && event) {
|
2505 | element.removeEventListener(event, handler, false);
|
2506 | }
|
2507 | };
|
2508 | } else {
|
2509 | return function (element, event, handler) {
|
2510 | if (element && event) {
|
2511 | element.detachEvent('on' + event, handler);
|
2512 | }
|
2513 | };
|
2514 | }
|
2515 | }();
|
2516 |
|
2517 |
|
2518 | var once = function once(el, event, fn) {
|
2519 | var listener = function listener() {
|
2520 | if (fn) {
|
2521 | fn.apply(this, arguments);
|
2522 | }
|
2523 | off(el, event, listener);
|
2524 | };
|
2525 | on(el, event, listener);
|
2526 | };
|
2527 |
|
2528 |
|
2529 | function hasClass(el, cls) {
|
2530 | if (!el || !cls) return false;
|
2531 | if (cls.indexOf(' ') !== -1) throw new Error('className should not contain space.');
|
2532 | if (el.classList) {
|
2533 | return el.classList.contains(cls);
|
2534 | } else {
|
2535 | return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
|
2536 | }
|
2537 | }
|
2538 |
|
2539 |
|
2540 | function addClass(el, cls) {
|
2541 | if (!el) return;
|
2542 | var curClass = el.className;
|
2543 | var classes = (cls || '').split(' ');
|
2544 |
|
2545 | for (var i = 0, j = classes.length; i < j; i++) {
|
2546 | var clsName = classes[i];
|
2547 | if (!clsName) continue;
|
2548 |
|
2549 | if (el.classList) {
|
2550 | el.classList.add(clsName);
|
2551 | } else if (!hasClass(el, clsName)) {
|
2552 | curClass += ' ' + clsName;
|
2553 | }
|
2554 | }
|
2555 | if (!el.classList) {
|
2556 | el.className = curClass;
|
2557 | }
|
2558 | }
|
2559 |
|
2560 |
|
2561 | function removeClass(el, cls) {
|
2562 | if (!el || !cls) return;
|
2563 | var classes = cls.split(' ');
|
2564 | var curClass = ' ' + el.className + ' ';
|
2565 |
|
2566 | for (var i = 0, j = classes.length; i < j; i++) {
|
2567 | var clsName = classes[i];
|
2568 | if (!clsName) continue;
|
2569 |
|
2570 | if (el.classList) {
|
2571 | el.classList.remove(clsName);
|
2572 | } else if (hasClass(el, clsName)) {
|
2573 | curClass = curClass.replace(' ' + clsName + ' ', ' ');
|
2574 | }
|
2575 | }
|
2576 | if (!el.classList) {
|
2577 | el.className = trim(curClass);
|
2578 | }
|
2579 | }
|
2580 |
|
2581 |
|
2582 | var getStyle = ieVersion < 9 ? function (element, styleName) {
|
2583 | if (isServer) return;
|
2584 | if (!element || !styleName) return null;
|
2585 | styleName = camelCase(styleName);
|
2586 | if (styleName === 'float') {
|
2587 | styleName = 'styleFloat';
|
2588 | }
|
2589 | try {
|
2590 | switch (styleName) {
|
2591 | case 'opacity':
|
2592 | try {
|
2593 | return element.filters.item('alpha').opacity / 100;
|
2594 | } catch (e) {
|
2595 | return 1.0;
|
2596 | }
|
2597 | default:
|
2598 | return element.style[styleName] || element.currentStyle ? element.currentStyle[styleName] : null;
|
2599 | }
|
2600 | } catch (e) {
|
2601 | return element.style[styleName];
|
2602 | }
|
2603 | } : function (element, styleName) {
|
2604 | if (isServer) return;
|
2605 | if (!element || !styleName) return null;
|
2606 | styleName = camelCase(styleName);
|
2607 | if (styleName === 'float') {
|
2608 | styleName = 'cssFloat';
|
2609 | }
|
2610 | try {
|
2611 | var computed = document.defaultView.getComputedStyle(element, '');
|
2612 | return element.style[styleName] || computed ? computed[styleName] : null;
|
2613 | } catch (e) {
|
2614 | return element.style[styleName];
|
2615 | }
|
2616 | };
|
2617 |
|
2618 |
|
2619 | function setStyle(element, styleName, value) {
|
2620 | if (!element || !styleName) return;
|
2621 |
|
2622 | if ((typeof styleName === 'undefined' ? 'undefined' : babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(styleName)) === 'object') {
|
2623 | for (var prop in styleName) {
|
2624 | if (styleName.hasOwnProperty(prop)) {
|
2625 | setStyle(element, prop, styleName[prop]);
|
2626 | }
|
2627 | }
|
2628 | } else {
|
2629 | styleName = camelCase(styleName);
|
2630 | if (styleName === 'opacity' && ieVersion < 9) {
|
2631 | element.style.filter = isNaN(value) ? '' : 'alpha(opacity=' + value * 100 + ')';
|
2632 | } else {
|
2633 | element.style[styleName] = value;
|
2634 | }
|
2635 | }
|
2636 | }
|
2637 |
|
2638 | var isScroll = function isScroll(el, vertical) {
|
2639 | if (isServer) return;
|
2640 |
|
2641 | var determinedDirection = vertical !== null || vertical !== undefined;
|
2642 | var overflow = determinedDirection ? vertical ? getStyle(el, 'overflow-y') : getStyle(el, 'overflow-x') : getStyle(el, 'overflow');
|
2643 |
|
2644 | return overflow.match(/(scroll|auto)/);
|
2645 | };
|
2646 |
|
2647 | var getScrollContainer = function getScrollContainer(el, vertical) {
|
2648 | if (isServer) return;
|
2649 |
|
2650 | var parent = el;
|
2651 | while (parent) {
|
2652 | if ([window, document, document.documentElement].includes(parent)) {
|
2653 | return window;
|
2654 | }
|
2655 | if (isScroll(parent, vertical)) {
|
2656 | return parent;
|
2657 | }
|
2658 | parent = parent.parentNode;
|
2659 | }
|
2660 |
|
2661 | return parent;
|
2662 | };
|
2663 |
|
2664 | var isInContainer = function isInContainer(el, container) {
|
2665 | if (isServer || !el || !container) return false;
|
2666 |
|
2667 | var elRect = el.getBoundingClientRect();
|
2668 | var containerRect = void 0;
|
2669 |
|
2670 | if ([window, document, document.documentElement, null, undefined].includes(container)) {
|
2671 | containerRect = {
|
2672 | top: 0,
|
2673 | right: window.innerWidth,
|
2674 | bottom: window.innerHeight,
|
2675 | left: 0
|
2676 | };
|
2677 | } else {
|
2678 | containerRect = container.getBoundingClientRect();
|
2679 | }
|
2680 |
|
2681 | return elRect.top < containerRect.bottom && elRect.bottom > containerRect.top && elRect.right > containerRect.left && elRect.left < containerRect.right;
|
2682 | };
|
2683 |
|
2684 | }),
|
2685 |
|
2686 | 22:
|
2687 | (function(module, __webpack_exports__, __webpack_require__) {
|
2688 |
|
2689 | "use strict";
|
2690 | var mds_ui_transition__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
|
2691 | var mds_ui_transition__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(mds_ui_transition__WEBPACK_IMPORTED_MODULE_0__);
|
2692 |
|
2693 |
|
2694 | var placementMap = {
|
2695 | top: 'top',
|
2696 | left: 'left',
|
2697 | right: 'right',
|
2698 | bottom: 'bottom',
|
2699 | topLeft: 'top-start',
|
2700 | topRight: 'top-end',
|
2701 | bottomLeft: 'bottom-start',
|
2702 | bottomRight: 'bottom-end',
|
2703 | leftTop: 'left-start',
|
2704 | leftBottom: 'left-end',
|
2705 | rightTop: 'right-start',
|
2706 | rightBottom: 'right-end'
|
2707 | };
|
2708 |
|
2709 | __webpack_exports__["a"] = ({
|
2710 | components: {
|
2711 | mdsTransition: mds_ui_transition__WEBPACK_IMPORTED_MODULE_0___default.a
|
2712 | },
|
2713 | computed: {
|
2714 | realPlacement: function realPlacement() {
|
2715 | return placementMap[this.placement];
|
2716 | }
|
2717 | }
|
2718 | });
|
2719 |
|
2720 | }),
|
2721 |
|
2722 | 23:
|
2723 | (function(module, exports) {
|
2724 |
|
2725 | module.exports = require("babel-runtime/core-js/get-iterator");
|
2726 |
|
2727 | }),
|
2728 |
|
2729 | 268:
|
2730 | (function(module, exports) {
|
2731 |
|
2732 |
|
2733 |
|
2734 | }),
|
2735 |
|
2736 | 27:
|
2737 | (function(module, __webpack_exports__, __webpack_require__) {
|
2738 |
|
2739 | "use strict";
|
2740 |
|
2741 |
|
2742 | var render = function () {
|
2743 | var _vm = this
|
2744 | var _h = _vm.$createElement
|
2745 | var _c = _vm._self._c || _h
|
2746 | return _c(
|
2747 | "ul",
|
2748 | { ref: "wrap", class: _vm.classes, attrs: { role: "mds-scroll-bar" } },
|
2749 | [_vm._t("default")],
|
2750 | 2
|
2751 | )
|
2752 | }
|
2753 | var staticRenderFns = []
|
2754 | render._withStripped = true
|
2755 |
|
2756 |
|
2757 |
|
2758 |
|
2759 |
|
2760 |
|
2761 |
|
2762 |
|
2763 |
|
2764 |
|
2765 |
|
2766 |
|
2767 |
|
2768 |
|
2769 |
|
2770 | var scroll_barvue_type_script_lang_js_ = ({
|
2771 | name: 'mdsScrollBar',
|
2772 | props: {
|
2773 | prefixCls: {
|
2774 | type: String,
|
2775 | default: 'mds-scroll-bar'
|
2776 | }
|
2777 | },
|
2778 | data: function data() {
|
2779 | return {};
|
2780 | },
|
2781 |
|
2782 | computed: {
|
2783 | classes: function classes() {
|
2784 | var prefixCls = this.prefixCls;
|
2785 | return ['' + prefixCls, prefixCls + '-root'];
|
2786 | },
|
2787 | wrap: function wrap() {
|
2788 | return this.$refs.wrap;
|
2789 | }
|
2790 | },
|
2791 | methods: {},
|
2792 | created: function created() {}
|
2793 | });
|
2794 |
|
2795 | var scroll_bar_scroll_barvue_type_script_lang_js_ = (scroll_barvue_type_script_lang_js_);
|
2796 |
|
2797 | var componentNormalizer = __webpack_require__(0);
|
2798 |
|
2799 |
|
2800 |
|
2801 |
|
2802 |
|
2803 |
|
2804 |
|
2805 |
|
2806 |
|
2807 | var component = Object(componentNormalizer["a" ])(
|
2808 | scroll_bar_scroll_barvue_type_script_lang_js_,
|
2809 | render,
|
2810 | staticRenderFns,
|
2811 | false,
|
2812 | null,
|
2813 | null,
|
2814 | null
|
2815 |
|
2816 | )
|
2817 |
|
2818 |
|
2819 | if (false) { var api; }
|
2820 | component.options.__file = "components/scroll-bar/scroll-bar.vue"
|
2821 | var scroll_bar = (component.exports);
|
2822 |
|
2823 |
|
2824 |
|
2825 | var components_scroll_bar = __webpack_exports__["a"] = (scroll_bar);
|
2826 |
|
2827 | }),
|
2828 |
|
2829 | 270:
|
2830 | (function(module, exports) {
|
2831 |
|
2832 |
|
2833 |
|
2834 | }),
|
2835 |
|
2836 | 30:
|
2837 | (function(module, exports) {
|
2838 |
|
2839 | module.exports = require("babel-runtime/core-js/map");
|
2840 |
|
2841 | }),
|
2842 |
|
2843 | 37:
|
2844 | (function(module, exports) {
|
2845 |
|
2846 | module.exports = require("lodash.debounce");
|
2847 |
|
2848 | }),
|
2849 |
|
2850 | 38:
|
2851 | (function(module, __webpack_exports__, __webpack_require__) {
|
2852 |
|
2853 | "use strict";
|
2854 | var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
2855 | var vue__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
|
2856 | var _dom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(21);
|
2857 |
|
2858 |
|
2859 |
|
2860 | var nodeList = [];
|
2861 | var ctx = '@@clickoutsideContext';
|
2862 |
|
2863 | var startClick = void 0;
|
2864 | var seed = 0;
|
2865 |
|
2866 | !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && Object(_dom_js__WEBPACK_IMPORTED_MODULE_1__[ "d"])(document, 'mousedown', function (e) {
|
2867 | return startClick = e;
|
2868 | });
|
2869 |
|
2870 | !vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer && Object(_dom_js__WEBPACK_IMPORTED_MODULE_1__[ "d"])(document, 'mouseup', function (e) {
|
2871 | nodeList.forEach(function (node) {
|
2872 | return node[ctx].documentHandler(e, startClick);
|
2873 | });
|
2874 | });
|
2875 |
|
2876 | function createDocumentHandler(el, binding, vnode) {
|
2877 | return function () {
|
2878 | var mouseup = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
2879 | var mousedown = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
2880 |
|
2881 | if (!vnode || !vnode.context || !mouseup.target || !mousedown.target || el.contains(mouseup.target) || el.contains(mousedown.target) || el === mouseup.target || vnode.context.popperElm && (vnode.context.popperElm.contains(mouseup.target) || vnode.context.popperElm.contains(mousedown.target))) return;
|
2882 |
|
2883 | if (binding.expression && el[ctx].methodName && vnode.context[el[ctx].methodName]) {
|
2884 | vnode.context[el[ctx].methodName]();
|
2885 | } else {
|
2886 | el[ctx].bindingFn && el[ctx].bindingFn();
|
2887 | }
|
2888 | };
|
2889 | }
|
2890 |
|
2891 |
|
2892 |
|
2893 |
|
2894 |
|
2895 |
|
2896 |
|
2897 |
|
2898 |
|
2899 | __webpack_exports__["a"] = ({
|
2900 | bind: function bind(el, binding, vnode) {
|
2901 | nodeList.push(el);
|
2902 | var id = seed++;
|
2903 | el[ctx] = {
|
2904 | id: id,
|
2905 | documentHandler: createDocumentHandler(el, binding, vnode),
|
2906 | methodName: binding.expression,
|
2907 | bindingFn: binding.value
|
2908 | };
|
2909 | },
|
2910 | update: function update(el, binding, vnode) {
|
2911 | el[ctx].documentHandler = createDocumentHandler(el, binding, vnode);
|
2912 | el[ctx].methodName = binding.expression;
|
2913 | el[ctx].bindingFn = binding.value;
|
2914 | },
|
2915 | unbind: function unbind(el) {
|
2916 | var len = nodeList.length;
|
2917 |
|
2918 | for (var i = 0; i < len; i++) {
|
2919 | if (nodeList[i][ctx].id === el[ctx].id) {
|
2920 | nodeList.splice(i, 1);
|
2921 | break;
|
2922 | }
|
2923 | }
|
2924 | delete el[ctx];
|
2925 | }
|
2926 | });
|
2927 |
|
2928 | }),
|
2929 |
|
2930 | 5:
|
2931 | (function(module, __webpack_exports__, __webpack_require__) {
|
2932 |
|
2933 | "use strict";
|
2934 | var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
2935 | var vue__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
|
2936 | var _dom_helper__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1);
|
2937 |
|
2938 |
|
2939 |
|
2940 | var hasModal = false;
|
2941 | var hasInitZIndex = false;
|
2942 | var zIndex = void 0;
|
2943 |
|
2944 | var getModal = function getModal() {
|
2945 | if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return;
|
2946 | var modalDom = PopupManager.modalDom;
|
2947 | if (modalDom) {
|
2948 | hasModal = true;
|
2949 | } else {
|
2950 | hasModal = false;
|
2951 | modalDom = document.createElement('div');
|
2952 | PopupManager.modalDom = modalDom;
|
2953 |
|
2954 | modalDom.addEventListener('touchmove', function (event) {
|
2955 | event.preventDefault();
|
2956 | event.stopPropagation();
|
2957 | });
|
2958 |
|
2959 | modalDom.addEventListener('click', function () {
|
2960 | PopupManager.doOnModalClick && PopupManager.doOnModalClick();
|
2961 | });
|
2962 | }
|
2963 |
|
2964 | return modalDom;
|
2965 | };
|
2966 |
|
2967 | var instances = {};
|
2968 |
|
2969 | var PopupManager = {
|
2970 | modalFade: true,
|
2971 |
|
2972 | getInstance: function getInstance(id) {
|
2973 | return instances[id];
|
2974 | },
|
2975 |
|
2976 | register: function register(id, instance) {
|
2977 | if (id && instance) {
|
2978 | instances[id] = instance;
|
2979 | }
|
2980 | },
|
2981 |
|
2982 | deregister: function deregister(id) {
|
2983 | if (id) {
|
2984 | instances[id] = null;
|
2985 | delete instances[id];
|
2986 | }
|
2987 | },
|
2988 |
|
2989 | nextZIndex: function nextZIndex() {
|
2990 | return PopupManager.zIndex++;
|
2991 | },
|
2992 |
|
2993 | modalStack: [],
|
2994 |
|
2995 | doOnModalClick: function doOnModalClick() {
|
2996 | var topItem = PopupManager.modalStack[PopupManager.modalStack.length - 1];
|
2997 | if (!topItem) return;
|
2998 |
|
2999 | var instance = PopupManager.getInstance(topItem.id);
|
3000 | if (instance && instance.closeOnClickModal) {
|
3001 | instance.close();
|
3002 | }
|
3003 | },
|
3004 |
|
3005 | openModal: function openModal(id, zIndex, dom, modalClass, modalFade) {
|
3006 | if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return;
|
3007 | if (!id || zIndex === undefined) return;
|
3008 | this.modalFade = modalFade;
|
3009 |
|
3010 | var modalStack = this.modalStack;
|
3011 |
|
3012 | for (var i = 0, j = modalStack.length; i < j; i++) {
|
3013 | var item = modalStack[i];
|
3014 | if (item.id === id) {
|
3015 | return;
|
3016 | }
|
3017 | }
|
3018 |
|
3019 | var modalDom = getModal();
|
3020 |
|
3021 | Object(_dom_helper__WEBPACK_IMPORTED_MODULE_1__[ "a"])(modalDom, 'v-modal');
|
3022 | if (this.modalFade && !hasModal) {
|
3023 | Object(_dom_helper__WEBPACK_IMPORTED_MODULE_1__[ "a"])(modalDom, 'v-modal-enter');
|
3024 | }
|
3025 | if (modalClass) {
|
3026 | var classArr = modalClass.trim().split(/\s+/);
|
3027 | classArr.forEach(function (item) {
|
3028 | return Object(_dom_helper__WEBPACK_IMPORTED_MODULE_1__[ "a"])(modalDom, item);
|
3029 | });
|
3030 | }
|
3031 | setTimeout(function () {
|
3032 | Object(_dom_helper__WEBPACK_IMPORTED_MODULE_1__[ "h"])(modalDom, 'v-modal-enter');
|
3033 | }, 200);
|
3034 |
|
3035 | if (dom && dom.parentNode && dom.parentNode.nodeType !== 11) {
|
3036 | dom.parentNode.appendChild(modalDom);
|
3037 | } else {
|
3038 | document.body.appendChild(modalDom);
|
3039 | }
|
3040 |
|
3041 | if (zIndex) {
|
3042 | modalDom.style.zIndex = zIndex;
|
3043 | }
|
3044 | modalDom.tabIndex = 0;
|
3045 | modalDom.style.display = '';
|
3046 |
|
3047 | this.modalStack.push({ id: id, zIndex: zIndex, modalClass: modalClass });
|
3048 | },
|
3049 |
|
3050 | closeModal: function closeModal(id) {
|
3051 | var modalStack = this.modalStack;
|
3052 | var modalDom = getModal();
|
3053 |
|
3054 | if (modalStack.length > 0) {
|
3055 | var topItem = modalStack[modalStack.length - 1];
|
3056 | if (topItem.id === id) {
|
3057 | if (topItem.modalClass) {
|
3058 | var classArr = topItem.modalClass.trim().split(/\s+/);
|
3059 | classArr.forEach(function (item) {
|
3060 | return Object(_dom_helper__WEBPACK_IMPORTED_MODULE_1__[ "h"])(modalDom, item);
|
3061 | });
|
3062 | }
|
3063 |
|
3064 | modalStack.pop();
|
3065 | if (modalStack.length > 0) {
|
3066 | modalDom.style.zIndex = modalStack[modalStack.length - 1].zIndex;
|
3067 | }
|
3068 | } else {
|
3069 | for (var i = modalStack.length - 1; i >= 0; i--) {
|
3070 | if (modalStack[i].id === id) {
|
3071 | modalStack.splice(i, 1);
|
3072 | break;
|
3073 | }
|
3074 | }
|
3075 | }
|
3076 | }
|
3077 |
|
3078 | if (modalStack.length === 0) {
|
3079 | if (this.modalFade) {
|
3080 | Object(_dom_helper__WEBPACK_IMPORTED_MODULE_1__[ "a"])(modalDom, 'v-modal-leave');
|
3081 | }
|
3082 | setTimeout(function () {
|
3083 | if (modalStack.length === 0) {
|
3084 | if (modalDom.parentNode) modalDom.parentNode.removeChild(modalDom);
|
3085 | modalDom.style.display = 'none';
|
3086 | PopupManager.modalDom = undefined;
|
3087 | }
|
3088 | Object(_dom_helper__WEBPACK_IMPORTED_MODULE_1__[ "h"])(modalDom, 'v-modal-leave');
|
3089 | }, 200);
|
3090 | }
|
3091 | }
|
3092 | };
|
3093 |
|
3094 | Object.defineProperty(PopupManager, 'zIndex', {
|
3095 | configurable: true,
|
3096 | get: function get() {
|
3097 | if (!hasInitZIndex) {
|
3098 | zIndex = zIndex || (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$ELEMENT || {}).zIndex || 2000;
|
3099 | hasInitZIndex = true;
|
3100 | }
|
3101 | return zIndex;
|
3102 | },
|
3103 | set: function set(value) {
|
3104 | zIndex = value;
|
3105 | }
|
3106 | });
|
3107 |
|
3108 | var getTopPopup = function getTopPopup() {
|
3109 | if (vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) return;
|
3110 | if (PopupManager.modalStack.length > 0) {
|
3111 | var topPopup = PopupManager.modalStack[PopupManager.modalStack.length - 1];
|
3112 | if (!topPopup) return;
|
3113 | var instance = PopupManager.getInstance(topPopup.id);
|
3114 |
|
3115 | return instance;
|
3116 | }
|
3117 | };
|
3118 |
|
3119 | if (!vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer) {
|
3120 |
|
3121 | window.addEventListener('keydown', function (event) {
|
3122 | if (event.keyCode === 27) {
|
3123 | var topPopup = getTopPopup();
|
3124 |
|
3125 | if (topPopup && topPopup.closeOnPressEscape) {
|
3126 | topPopup.handleClose ? topPopup.handleClose() : topPopup.handleAction ? topPopup.handleAction('cancel') : topPopup.close();
|
3127 | }
|
3128 | }
|
3129 | });
|
3130 | }
|
3131 |
|
3132 | __webpack_exports__["a"] = (PopupManager);
|
3133 |
|
3134 | }),
|
3135 |
|
3136 | 50:
|
3137 | (function(module, exports) {
|
3138 |
|
3139 | module.exports = __WEBPACK_EXTERNAL_MODULE__50__;
|
3140 |
|
3141 | }),
|
3142 |
|
3143 | 6:
|
3144 | (function(module, exports) {
|
3145 |
|
3146 | module.exports = require("babel-runtime/core-js/object/assign");
|
3147 |
|
3148 | }),
|
3149 |
|
3150 | 7:
|
3151 | (function(module, exports) {
|
3152 |
|
3153 | module.exports = __WEBPACK_EXTERNAL_MODULE__7__;
|
3154 |
|
3155 | }),
|
3156 |
|
3157 | 75:
|
3158 | (function(module, exports) {
|
3159 |
|
3160 | module.exports = __WEBPACK_EXTERNAL_MODULE__75__;
|
3161 |
|
3162 | }),
|
3163 |
|
3164 | 76:
|
3165 | (function(module, exports) {
|
3166 |
|
3167 | module.exports = __WEBPACK_EXTERNAL_MODULE__76__;
|
3168 |
|
3169 | }),
|
3170 |
|
3171 | 9:
|
3172 | (function(module, exports) {
|
3173 |
|
3174 | module.exports = require("babel-runtime/helpers/typeof");
|
3175 |
|
3176 | }),
|
3177 |
|
3178 | 95:
|
3179 | (function(module, __webpack_exports__, __webpack_require__) {
|
3180 |
|
3181 | "use strict";
|
3182 |
|
3183 | __webpack_require__.r(__webpack_exports__);
|
3184 |
|
3185 |
|
3186 | var render = function () {
|
3187 | var _vm = this
|
3188 | var _h = _vm.$createElement
|
3189 | var _c = _vm._self._c || _h
|
3190 | return _c(
|
3191 | "div",
|
3192 | {
|
3193 | directives: [
|
3194 | {
|
3195 | name: "clickoutside",
|
3196 | rawName: "v-clickoutside",
|
3197 | value: _vm.handleClose,
|
3198 | expression: "handleClose",
|
3199 | },
|
3200 | ],
|
3201 | ref: "reference",
|
3202 | class: _vm.classes,
|
3203 | },
|
3204 | [
|
3205 | _vm.multiple || _vm.treeMode
|
3206 | ? [
|
3207 | _c(
|
3208 | "div",
|
3209 | {
|
3210 | staticClass: "mds-cascader-multi-wrapper",
|
3211 | attrs: { tabindex: "0" },
|
3212 | on: {
|
3213 | click: _vm.handleClick,
|
3214 | mouseenter: function ($event) {
|
3215 | _vm.inputHovering = true
|
3216 | },
|
3217 | mouseleave: function ($event) {
|
3218 | _vm.inputHovering = false
|
3219 | },
|
3220 | keydown: function ($event) {
|
3221 | if (
|
3222 | !$event.type.indexOf("key") &&
|
3223 | _vm._k($event.keyCode, "esc", 27, $event.key, [
|
3224 | "Esc",
|
3225 | "Escape",
|
3226 | ])
|
3227 | ) {
|
3228 | return null
|
3229 | }
|
3230 | $event.stopPropagation()
|
3231 | $event.preventDefault()
|
3232 | return _vm.blur()
|
3233 | },
|
3234 | focus: _vm.handleFocus,
|
3235 | blur: _vm.handleBlur,
|
3236 | },
|
3237 | },
|
3238 | [
|
3239 | _c(
|
3240 | "mds-input",
|
3241 | {
|
3242 | directives: [
|
3243 | {
|
3244 | name: "show",
|
3245 | rawName: "v-show",
|
3246 | value: !_vm.filterMode,
|
3247 | expression: "!filterMode",
|
3248 | },
|
3249 | ],
|
3250 | ref: "multipleInput",
|
3251 | attrs: {
|
3252 | size: _vm.size,
|
3253 | disabled: _vm.disabled,
|
3254 | readonly: "",
|
3255 | placeholder: _vm.displayPlaceHolder,
|
3256 | },
|
3257 | model: {
|
3258 | value: _vm.multiLabel,
|
3259 | callback: function ($$v) {
|
3260 | _vm.multiLabel = $$v
|
3261 | },
|
3262 | expression: "multiLabel",
|
3263 | },
|
3264 | },
|
3265 | [
|
3266 | _c(
|
3267 | "template",
|
3268 | { slot: "suffix" },
|
3269 | [
|
3270 | _vm.clearable &&
|
3271 | _vm.inputHovering &&
|
3272 | _vm.multiLabel &&
|
3273 | !_vm.disabled
|
3274 | ? _c("mds-icon", {
|
3275 | attrs: { type: "line-close" },
|
3276 | nativeOn: {
|
3277 | click: function ($event) {
|
3278 | $event.stopPropagation()
|
3279 | return _vm.handleClear($event)
|
3280 | },
|
3281 | },
|
3282 | })
|
3283 | : _c("mds-icon", {
|
3284 | staticStyle: {
|
3285 | color: "#ccd2db",
|
3286 | "font-size": "14px",
|
3287 | },
|
3288 | attrs: { type: "fill-solid-down" },
|
3289 | }),
|
3290 | ],
|
3291 | 1
|
3292 | ),
|
3293 | ],
|
3294 | 2
|
3295 | ),
|
3296 | _c(
|
3297 | "div",
|
3298 | {
|
3299 | staticClass: "mds-cascader-tags",
|
3300 | class: {
|
3301 | "tree-tags": _vm.treeMode,
|
3302 | },
|
3303 | on: { click: _vm.focusMultiFilter },
|
3304 | },
|
3305 | [
|
3306 | _vm._l(_vm.multiTags, function (tag) {
|
3307 | return _c(
|
3308 | "mds-tag",
|
3309 | {
|
3310 | key: tag.key,
|
3311 | class: _vm.disabled
|
3312 | ? "mds-cascader-tags-disabled"
|
3313 | : "",
|
3314 | attrs: {
|
3315 | type: "info",
|
3316 | closable: "",
|
3317 | useTransition: false,
|
3318 | },
|
3319 | on: {
|
3320 | close: function ($event) {
|
3321 | return _vm.deleteTag(tag)
|
3322 | },
|
3323 | },
|
3324 | },
|
3325 | [
|
3326 | _c("span", [
|
3327 | _vm._v(
|
3328 | _vm._s(
|
3329 | _vm.showAllLevels ? tag.totalLabel : tag.label
|
3330 | )
|
3331 | ),
|
3332 | ]),
|
3333 | ]
|
3334 | )
|
3335 | }),
|
3336 | _c(
|
3337 | "div",
|
3338 | {
|
3339 | staticClass: "mds-cascader-multi-filter-wrapper",
|
3340 | style: { width: _vm.multiFilterWidth },
|
3341 | },
|
3342 | [
|
3343 | _vm.treeMode
|
3344 | ? _c("input", {
|
3345 | directives: [
|
3346 | {
|
3347 | name: "model",
|
3348 | rawName: "v-model",
|
3349 | value: _vm.multiFilterValue,
|
3350 | expression: "multiFilterValue",
|
3351 | },
|
3352 | ],
|
3353 | ref: "multiFilter",
|
3354 | staticClass: "mds-cascader-multi-filter",
|
3355 | attrs: { type: "search", autocomplete: "off" },
|
3356 | domProps: { value: _vm.multiFilterValue },
|
3357 | on: {
|
3358 | input: [
|
3359 | function ($event) {
|
3360 | if ($event.target.composing) {
|
3361 | return
|
3362 | }
|
3363 | _vm.multiFilterValue = $event.target.value
|
3364 | },
|
3365 | function ($event) {
|
3366 | return _vm.handleMultiFilterChange(
|
3367 | $event.target.value
|
3368 | )
|
3369 | },
|
3370 | ],
|
3371 | keydown: _vm.handleMiltiFilterBackspace,
|
3372 | },
|
3373 | })
|
3374 | : _vm._e(),
|
3375 | _c("span", {
|
3376 | ref: "multiFilterFake",
|
3377 | staticClass: "mds-cascader-multi-filter-faker",
|
3378 | }),
|
3379 | ]
|
3380 | ),
|
3381 | ],
|
3382 | 2
|
3383 | ),
|
3384 | ],
|
3385 | 1
|
3386 | ),
|
3387 | ]
|
3388 | : [
|
3389 | _c(
|
3390 | "mds-input",
|
3391 | {
|
3392 | directives: [
|
3393 | {
|
3394 | name: "show",
|
3395 | rawName: "v-show",
|
3396 | value: _vm.filterMode,
|
3397 | expression: "filterMode",
|
3398 | },
|
3399 | ],
|
3400 | ref: "filterInput",
|
3401 | attrs: { placeholder: _vm.filterPlaceholder },
|
3402 | on: {
|
3403 | input: function ($event) {
|
3404 | return _vm.handleInput($event, "filter")
|
3405 | },
|
3406 | },
|
3407 | nativeOn: {
|
3408 | keydown: function ($event) {
|
3409 | if (
|
3410 | !$event.type.indexOf("key") &&
|
3411 | _vm._k($event.keyCode, "esc", 27, $event.key, [
|
3412 | "Esc",
|
3413 | "Escape",
|
3414 | ])
|
3415 | ) {
|
3416 | return null
|
3417 | }
|
3418 | $event.stopPropagation()
|
3419 | $event.preventDefault()
|
3420 | return _vm.blur()
|
3421 | },
|
3422 | },
|
3423 | model: {
|
3424 | value: _vm.filterLabel,
|
3425 | callback: function ($$v) {
|
3426 | _vm.filterLabel = $$v
|
3427 | },
|
3428 | expression: "filterLabel",
|
3429 | },
|
3430 | },
|
3431 | [
|
3432 | _c(
|
3433 | "template",
|
3434 | { slot: "suffix" },
|
3435 | [_c("mds-icon", { attrs: { type: "fill-solid-down" } })],
|
3436 | 1
|
3437 | ),
|
3438 | ],
|
3439 | 2
|
3440 | ),
|
3441 | _c(
|
3442 | "mds-input",
|
3443 | {
|
3444 | directives: [
|
3445 | {
|
3446 | name: "show",
|
3447 | rawName: "v-show",
|
3448 | value: !_vm.filterMode,
|
3449 | expression: "!filterMode",
|
3450 | },
|
3451 | ],
|
3452 | ref: "input",
|
3453 | attrs: {
|
3454 | size: _vm.size,
|
3455 | placeholder: _vm.placeholder,
|
3456 | disabled: _vm.disabled,
|
3457 | readonly: "",
|
3458 | },
|
3459 | on: {
|
3460 | focus: _vm.handleFocus,
|
3461 | blur: _vm.handleBlur,
|
3462 | input: function ($event) {
|
3463 | return _vm.handleInput($event, "display")
|
3464 | },
|
3465 | },
|
3466 | nativeOn: {
|
3467 | keydown: function ($event) {
|
3468 | if (
|
3469 | !$event.type.indexOf("key") &&
|
3470 | _vm._k($event.keyCode, "esc", 27, $event.key, [
|
3471 | "Esc",
|
3472 | "Escape",
|
3473 | ])
|
3474 | ) {
|
3475 | return null
|
3476 | }
|
3477 | $event.stopPropagation()
|
3478 | $event.preventDefault()
|
3479 | return _vm.blur()
|
3480 | },
|
3481 | click: function ($event) {
|
3482 | return _vm.handleClick($event)
|
3483 | },
|
3484 | mouseenter: function ($event) {
|
3485 | _vm.inputHovering = true
|
3486 | },
|
3487 | mouseleave: function ($event) {
|
3488 | _vm.inputHovering = false
|
3489 | },
|
3490 | },
|
3491 | model: {
|
3492 | value: _vm.displayLabel,
|
3493 | callback: function ($$v) {
|
3494 | _vm.displayLabel = $$v
|
3495 | },
|
3496 | expression: "displayLabel",
|
3497 | },
|
3498 | },
|
3499 | [
|
3500 | _c(
|
3501 | "template",
|
3502 | { slot: "suffix" },
|
3503 | [
|
3504 | _vm.clearable &&
|
3505 | _vm.inputHovering &&
|
3506 | _vm.displayLabel &&
|
3507 | _vm.displayLabel.length &&
|
3508 | !_vm.disabled
|
3509 | ? _c("mds-icon", {
|
3510 | attrs: { type: "line-close" },
|
3511 | nativeOn: {
|
3512 | click: function ($event) {
|
3513 | $event.stopPropagation()
|
3514 | return _vm.handleClear($event)
|
3515 | },
|
3516 | },
|
3517 | })
|
3518 | : _c("mds-icon", { attrs: { type: "fill-solid-down" } }),
|
3519 | ],
|
3520 | 1
|
3521 | ),
|
3522 | ],
|
3523 | 2
|
3524 | ),
|
3525 | ],
|
3526 | !_vm.treeMode
|
3527 | ? _c(
|
3528 | "transition",
|
3529 | {
|
3530 | attrs: { name: "mds-cascader-zoom-in-top" },
|
3531 | on: { "after-leave": _vm.doDestroy },
|
3532 | },
|
3533 | [
|
3534 | _c(
|
3535 | "div",
|
3536 | {
|
3537 | directives: [
|
3538 | {
|
3539 | name: "show",
|
3540 | rawName: "v-show",
|
3541 | value: _vm.expand,
|
3542 | expression: "expand",
|
3543 | },
|
3544 | ],
|
3545 | ref: "popper",
|
3546 | class: ["mds-cascader-dropdown", _vm.popperClass],
|
3547 | },
|
3548 | [
|
3549 | _c("mds-cascader-panel", {
|
3550 | directives: [
|
3551 | {
|
3552 | name: "show",
|
3553 | rawName: "v-show",
|
3554 | value: !_vm.filtering,
|
3555 | expression: "!filtering",
|
3556 | },
|
3557 | ],
|
3558 | ref: "panel",
|
3559 | class: _vm.panelClass,
|
3560 | attrs: {
|
3561 | prefixCls: _vm.prefixCls,
|
3562 | options: _vm.options,
|
3563 | prop: _vm.panelProps,
|
3564 | border: false,
|
3565 | filterable: _vm.filterable,
|
3566 | separator: _vm.separator,
|
3567 | maxHeight: _vm.maxHeight,
|
3568 | expandTrigger: _vm.expandTrigger,
|
3569 | emitPath: _vm.emitPath,
|
3570 | showAllLevels: _vm.showAllLevels,
|
3571 | loadData: _vm.loadData,
|
3572 | multiple: _vm.multiple,
|
3573 | checkStrictly: _vm.checkStrictly,
|
3574 | },
|
3575 | on: {
|
3576 | change: _vm.handleChange,
|
3577 | "expand-change": _vm.handleExpandChange,
|
3578 | click: function ($event) {
|
3579 | $event.stopPropagation()
|
3580 | return _vm.panelClick($event)
|
3581 | },
|
3582 | "init-filter-options": _vm.initfilterOptions,
|
3583 | clearInput: function ($event) {
|
3584 | _vm.displayLabel = ""
|
3585 | },
|
3586 | "set-multi-tags": _vm.setMultiTags,
|
3587 | "reset-panel-max-width": _vm.resetPanelMaxWidth,
|
3588 | },
|
3589 | model: {
|
3590 | value: _vm.panelValue,
|
3591 | callback: function ($$v) {
|
3592 | _vm.panelValue = $$v
|
3593 | },
|
3594 | expression: "panelValue",
|
3595 | },
|
3596 | }),
|
3597 | _vm.filterable
|
3598 | ? _c("search-panel", {
|
3599 | directives: [
|
3600 | {
|
3601 | name: "show",
|
3602 | rawName: "v-show",
|
3603 | value: _vm.filtering,
|
3604 | expression: "filtering",
|
3605 | },
|
3606 | ],
|
3607 | attrs: {
|
3608 | calMinWidth: _vm.calMinWidth,
|
3609 | maxHeight: _vm.maxHeight,
|
3610 | displayFilterOptions: _vm.displayFilterOptions,
|
3611 | value: _vm.value,
|
3612 | },
|
3613 | on: { filterChange: _vm.handleFilterChange },
|
3614 | })
|
3615 | : _vm._e(),
|
3616 | ],
|
3617 | 1
|
3618 | ),
|
3619 | ]
|
3620 | )
|
3621 | : _c(
|
3622 | "transition",
|
3623 | {
|
3624 | attrs: { name: "mds-cascader-zoom-in-top" },
|
3625 | on: { "after-leave": _vm.doDestroy },
|
3626 | },
|
3627 | [
|
3628 | _c(
|
3629 | "div",
|
3630 | {
|
3631 | directives: [
|
3632 | {
|
3633 | name: "show",
|
3634 | rawName: "v-show",
|
3635 | value: _vm.expand,
|
3636 | expression: "expand",
|
3637 | },
|
3638 | ],
|
3639 | ref: "popper",
|
3640 | class: ["mds-cascader-dropdown", _vm.popperClass],
|
3641 | },
|
3642 | [
|
3643 | _c(
|
3644 | "tree-panel",
|
3645 | _vm._b(
|
3646 | {
|
3647 | ref: "panel",
|
3648 | attrs: { filterValue: _vm.multiFilterValue },
|
3649 | },
|
3650 | "tree-panel",
|
3651 | _vm.$props,
|
3652 | false
|
3653 | )
|
3654 | ),
|
3655 | ],
|
3656 | 1
|
3657 | ),
|
3658 | ]
|
3659 | ),
|
3660 | ],
|
3661 | 2
|
3662 | )
|
3663 | }
|
3664 | var staticRenderFns = []
|
3665 | render._withStripped = true
|
3666 |
|
3667 |
|
3668 |
|
3669 |
|
3670 |
|
3671 | var external_input_ = __webpack_require__(16);
|
3672 | var external_input_default = __webpack_require__.n(external_input_);
|
3673 |
|
3674 |
|
3675 | var proptype_ = __webpack_require__(7);
|
3676 |
|
3677 |
|
3678 | var clickoutside = __webpack_require__(38);
|
3679 |
|
3680 |
|
3681 | var emitter_ = __webpack_require__(12);
|
3682 | var emitter_default = __webpack_require__.n(emitter_);
|
3683 |
|
3684 |
|
3685 | var external_cascaderpanel_ = __webpack_require__(75);
|
3686 | var external_cascaderpanel_default = __webpack_require__.n(external_cascaderpanel_);
|
3687 |
|
3688 |
|
3689 | var popper_mixin = __webpack_require__(22);
|
3690 |
|
3691 |
|
3692 | var vue_popper = __webpack_require__(17);
|
3693 |
|
3694 |
|
3695 | var util = __webpack_require__(15);
|
3696 |
|
3697 |
|
3698 | var scroll_bar = __webpack_require__(27);
|
3699 |
|
3700 |
|
3701 | var external_tag_ = __webpack_require__(50);
|
3702 | var external_tag_default = __webpack_require__.n(external_tag_);
|
3703 |
|
3704 |
|
3705 | var external_lodash_debounce_ = __webpack_require__(37);
|
3706 | var external_lodash_debounce_default = __webpack_require__.n(external_lodash_debounce_);
|
3707 |
|
3708 |
|
3709 | var dom_helper = __webpack_require__(1);
|
3710 |
|
3711 |
|
3712 | var searchPanelvue_type_template_id_d5febd34_render = function () {
|
3713 | var _vm = this
|
3714 | var _h = _vm.$createElement
|
3715 | var _c = _vm._self._c || _h
|
3716 | return _c(
|
3717 | "mds-scroll-bar",
|
3718 | {
|
3719 | staticClass: "mds-cascader-filter-panel",
|
3720 | style: {
|
3721 | "min-width": _vm.calMinWidth + "px",
|
3722 | "max-height": _vm.maxHeight,
|
3723 | },
|
3724 | },
|
3725 | [
|
3726 | _vm.displayFilterOptions.length
|
3727 | ? [
|
3728 | _vm._l(_vm.displayFilterOptions, function (node, index) {
|
3729 | return [
|
3730 | !node.filterDisabled
|
3731 | ? _c(
|
3732 | "div",
|
3733 | {
|
3734 | key: index,
|
3735 | class: {
|
3736 | "mds-cascader-filter-option": true,
|
3737 | "mds-cascader-filter-option-active": _vm.value.some(
|
3738 | function (key) {
|
3739 | return key === node.data.key
|
3740 | }
|
3741 | ),
|
3742 | },
|
3743 | on: {
|
3744 | click: function ($event) {
|
3745 | $event.stopPropagation()
|
3746 | return _vm.handleFilterChange(node)
|
3747 | },
|
3748 | },
|
3749 | },
|
3750 | [
|
3751 | _vm._v(
|
3752 | "\n " + _vm._s(node.filterLabel) + "\n "
|
3753 | ),
|
3754 | ]
|
3755 | )
|
3756 | : _vm._e(),
|
3757 | ]
|
3758 | }),
|
3759 | ]
|
3760 | : [
|
3761 | _c(
|
3762 | "div",
|
3763 | {
|
3764 | staticClass:
|
3765 | "mds-cascader-filter-option mds-cascader-filter-empty",
|
3766 | },
|
3767 | [_vm._v("\n 暂无数据\n ")]
|
3768 | ),
|
3769 | ],
|
3770 | ],
|
3771 | 2
|
3772 | )
|
3773 | }
|
3774 | var searchPanelvue_type_template_id_d5febd34_staticRenderFns = []
|
3775 | searchPanelvue_type_template_id_d5febd34_render._withStripped = true
|
3776 |
|
3777 |
|
3778 |
|
3779 |
|
3780 |
|
3781 |
|
3782 |
|
3783 |
|
3784 |
|
3785 |
|
3786 |
|
3787 |
|
3788 |
|
3789 |
|
3790 |
|
3791 |
|
3792 |
|
3793 |
|
3794 |
|
3795 |
|
3796 |
|
3797 |
|
3798 |
|
3799 |
|
3800 |
|
3801 |
|
3802 |
|
3803 |
|
3804 |
|
3805 |
|
3806 |
|
3807 |
|
3808 |
|
3809 |
|
3810 |
|
3811 |
|
3812 |
|
3813 |
|
3814 |
|
3815 | var searchPanelvue_type_script_lang_js_ = ({
|
3816 | components: {
|
3817 | MdsScrollBar: scroll_bar["a" ]
|
3818 | },
|
3819 | props: {
|
3820 | calMinWidth: Number,
|
3821 | maxHeight: String,
|
3822 | displayFilterOptions: Array,
|
3823 | value: [Array, String]
|
3824 | },
|
3825 | methods: {
|
3826 | handleFilterChange: function handleFilterChange(node) {
|
3827 | this.$emit('filterChange', node);
|
3828 | }
|
3829 | }
|
3830 | });
|
3831 |
|
3832 | var plugin_searchPanelvue_type_script_lang_js_ = (searchPanelvue_type_script_lang_js_);
|
3833 |
|
3834 | var componentNormalizer = __webpack_require__(0);
|
3835 |
|
3836 |
|
3837 |
|
3838 |
|
3839 |
|
3840 |
|
3841 |
|
3842 |
|
3843 |
|
3844 | var component = Object(componentNormalizer["a" ])(
|
3845 | plugin_searchPanelvue_type_script_lang_js_,
|
3846 | searchPanelvue_type_template_id_d5febd34_render,
|
3847 | searchPanelvue_type_template_id_d5febd34_staticRenderFns,
|
3848 | false,
|
3849 | null,
|
3850 | null,
|
3851 | null
|
3852 |
|
3853 | )
|
3854 |
|
3855 |
|
3856 | if (false) { var api; }
|
3857 | component.options.__file = "components/cascader/plugin/searchPanel.vue"
|
3858 | var searchPanel = (component.exports);
|
3859 |
|
3860 | var treePanelvue_type_template_id_0c50a4b0_render = function () {
|
3861 | var _vm = this
|
3862 | var _h = _vm.$createElement
|
3863 | var _c = _vm._self._c || _h
|
3864 | return _c(
|
3865 | "div",
|
3866 | { staticClass: "mds-cascader-tree-panel" },
|
3867 | [
|
3868 | _c("mds-tree", {
|
3869 | ref: "tree",
|
3870 | attrs: {
|
3871 | data: _vm.options,
|
3872 | prop: _vm.prop,
|
3873 | "search-node-method": _vm.searchNode,
|
3874 | "checkbox-display": "",
|
3875 | "default-checked-keys": _vm.value,
|
3876 | emptyText: "没有找到相关结果",
|
3877 | "check-total-line": "",
|
3878 | },
|
3879 | on: { "node-check": _vm.checkChange },
|
3880 | }),
|
3881 | ],
|
3882 | 1
|
3883 | )
|
3884 | }
|
3885 | var treePanelvue_type_template_id_0c50a4b0_staticRenderFns = []
|
3886 | treePanelvue_type_template_id_0c50a4b0_render._withStripped = true
|
3887 |
|
3888 |
|
3889 |
|
3890 |
|
3891 |
|
3892 | var get_iterator_ = __webpack_require__(23);
|
3893 | var get_iterator_default = __webpack_require__.n(get_iterator_);
|
3894 |
|
3895 |
|
3896 | var map_ = __webpack_require__(30);
|
3897 | var map_default = __webpack_require__.n(map_);
|
3898 |
|
3899 |
|
3900 | var external_tree_ = __webpack_require__(76);
|
3901 | var external_tree_default = __webpack_require__.n(external_tree_);
|
3902 |
|
3903 |
|
3904 |
|
3905 |
|
3906 |
|
3907 |
|
3908 |
|
3909 |
|
3910 |
|
3911 |
|
3912 |
|
3913 |
|
3914 |
|
3915 |
|
3916 |
|
3917 |
|
3918 |
|
3919 |
|
3920 |
|
3921 |
|
3922 |
|
3923 |
|
3924 |
|
3925 |
|
3926 |
|
3927 | var treePanelvue_type_script_lang_js_ = ({
|
3928 | inheritAttrs: false,
|
3929 | components: {
|
3930 | MdsTree: external_tree_default.a
|
3931 | },
|
3932 | props: {
|
3933 | options: [Array, Object],
|
3934 | prop: Object,
|
3935 | emitPath: {
|
3936 | type: Boolean,
|
3937 | default: true
|
3938 | },
|
3939 | value: {
|
3940 | type: [Array, String],
|
3941 | default: function _default() {
|
3942 | return [];
|
3943 | }
|
3944 | },
|
3945 | filterValue: String
|
3946 | },
|
3947 | watch: {
|
3948 | filterValue: function filterValue(val) {
|
3949 | this.$refs.tree.search(val);
|
3950 | }
|
3951 | },
|
3952 | mounted: function mounted() {
|
3953 | var _this = this;
|
3954 |
|
3955 | this.setTree();
|
3956 | this.$nextTick(function () {
|
3957 | _this.setPanelWidth();
|
3958 | });
|
3959 | },
|
3960 |
|
3961 | computed: {
|
3962 | nodesMap: function nodesMap() {
|
3963 | return this.$refs.tree && this.$refs.tree.tree.nodesMap;
|
3964 | },
|
3965 | tree: function tree() {
|
3966 | return this.$refs.tree && this.$refs.tree.tree;
|
3967 | }
|
3968 | },
|
3969 | methods: {
|
3970 | searchNode: function searchNode(value, data, node) {
|
3971 | if (!value) {
|
3972 | return true;
|
3973 | }
|
3974 | return node.label.indexOf(value) !== -1;
|
3975 | },
|
3976 |
|
3977 |
|
3978 | setPanelWidth: function setPanelWidth() {
|
3979 | var inputWidth = getComputedStyle(this.$parent.$refs[this.$parent.inputRef].$el).width;
|
3980 | var panel = this.$parent.$refs.panel.$el;
|
3981 | panel.style.width = inputWidth;
|
3982 | },
|
3983 |
|
3984 |
|
3985 | checkChange: function checkChange(treeObj, treeSelectObj, focusFlag) {
|
3986 |
|
3987 | var checkedNodes = new map_default.a();
|
3988 | this.nodesMap.forEach(function (item) {
|
3989 | if (item.checked) {
|
3990 | checkedNodes.set(item.key, item);
|
3991 | }
|
3992 | });
|
3993 |
|
3994 |
|
3995 | var spliceMaps = new map_default.a();
|
3996 |
|
3997 |
|
3998 | checkedNodes.forEach(function (item) {
|
3999 | if (spliceMaps.get(item.key)) {
|
4000 | return;
|
4001 | }
|
4002 | if (item.parent.id !== 'root' && item.parent.childNodes.every(function (node) {
|
4003 | return node.checked;
|
4004 | })) {
|
4005 | item.parent.childNodes.forEach(function (el) {
|
4006 | spliceMaps.set(el.key, el);
|
4007 | });
|
4008 | }
|
4009 | });
|
4010 |
|
4011 | var _iteratorNormalCompletion = true;
|
4012 | var _didIteratorError = false;
|
4013 | var _iteratorError = undefined;
|
4014 |
|
4015 | try {
|
4016 | for (var _iterator = get_iterator_default()(spliceMaps.keys()), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
4017 | var key = _step.value;
|
4018 |
|
4019 | checkedNodes.delete(key);
|
4020 | }
|
4021 |
|
4022 |
|
4023 | } catch (err) {
|
4024 | _didIteratorError = true;
|
4025 | _iteratorError = err;
|
4026 | } finally {
|
4027 | try {
|
4028 | if (!_iteratorNormalCompletion && _iterator.return) {
|
4029 | _iterator.return();
|
4030 | }
|
4031 | } finally {
|
4032 | if (_didIteratorError) {
|
4033 | throw _iteratorError;
|
4034 | }
|
4035 | }
|
4036 | }
|
4037 |
|
4038 | var tag = [];
|
4039 | checkedNodes.forEach(function (item) {
|
4040 | tag.push(item);
|
4041 | });
|
4042 |
|
4043 | this.renderTag(tag);
|
4044 |
|
4045 |
|
4046 | if (!focusFlag) {
|
4047 | this.$parent.focusMultiFilter();
|
4048 | }
|
4049 | },
|
4050 |
|
4051 |
|
4052 | resetPanel: function resetPanel() {},
|
4053 |
|
4054 |
|
4055 | setValue: function setValue() {},
|
4056 |
|
4057 |
|
4058 | changeMultiNode: function changeMultiNode(tag) {
|
4059 | this.checkChange();
|
4060 | },
|
4061 |
|
4062 |
|
4063 | renderTag: function renderTag(tag) {
|
4064 | var _this2 = this;
|
4065 |
|
4066 | var parent = this.$parent;
|
4067 | var multiPath = [];
|
4068 | var multiData = [];
|
4069 | tag.forEach(function (node) {
|
4070 | var path = void 0;
|
4071 | if (_this2.emitPath) {
|
4072 | path = node.getPath().reverse().map(function (item) {
|
4073 | return item[_this2.$parent.key];
|
4074 | });
|
4075 | } else {
|
4076 | path = node.key;
|
4077 | }
|
4078 | multiPath.push(path);
|
4079 | multiData.push(node.data);
|
4080 | });
|
4081 |
|
4082 | parent.setMultiTags(tag, multiPath, multiData);
|
4083 | },
|
4084 |
|
4085 |
|
4086 | setTree: function setTree() {
|
4087 | if (!this.value.length) {
|
4088 | return;
|
4089 | }
|
4090 | this.checkChange(null, null, true);
|
4091 | }
|
4092 | }
|
4093 | });
|
4094 |
|
4095 | var plugin_treePanelvue_type_script_lang_js_ = (treePanelvue_type_script_lang_js_);
|
4096 |
|
4097 |
|
4098 |
|
4099 |
|
4100 |
|
4101 |
|
4102 |
|
4103 |
|
4104 | var treePanel_component = Object(componentNormalizer["a" ])(
|
4105 | plugin_treePanelvue_type_script_lang_js_,
|
4106 | treePanelvue_type_template_id_0c50a4b0_render,
|
4107 | treePanelvue_type_template_id_0c50a4b0_staticRenderFns,
|
4108 | false,
|
4109 | null,
|
4110 | null,
|
4111 | null
|
4112 |
|
4113 | )
|
4114 |
|
4115 |
|
4116 | if (false) { var treePanel_api; }
|
4117 | treePanel_component.options.__file = "components/cascader/plugin/treePanel.vue"
|
4118 | var treePanel = (treePanel_component.exports);
|
4119 |
|
4120 |
|
4121 | var treeSelectvue_type_script_lang_js_ = ({
|
4122 | data: function data() {
|
4123 | return {
|
4124 | multiFilterWidth: '8px',
|
4125 | multiFilterValue: '',
|
4126 | placehoderFlag: false
|
4127 | };
|
4128 | },
|
4129 |
|
4130 | computed: {
|
4131 | multiFilterFakeRef: function multiFilterFakeRef() {
|
4132 | return this.$refs.multiFilterFake;
|
4133 | },
|
4134 | multiFilterRef: function multiFilterRef() {
|
4135 | return this.$refs.multiFilter;
|
4136 | }
|
4137 | },
|
4138 | watch: {
|
4139 | expand: function expand(val) {
|
4140 | var _this = this;
|
4141 |
|
4142 | if (val) {
|
4143 | return;
|
4144 | }
|
4145 | var ref = this.multiFilterFakeRef;
|
4146 | if (!ref) {
|
4147 | return;
|
4148 | }
|
4149 | setTimeout(function () {
|
4150 | ref.textContent = '';
|
4151 | _this.placehoderFlag = false;
|
4152 | _this.multiFilterValue = '';
|
4153 | _this.resizeMultiFilterWidth(true);
|
4154 | }, 150);
|
4155 | }
|
4156 | },
|
4157 | methods: {
|
4158 |
|
4159 | handleMiltiFilterBackspace: function handleMiltiFilterBackspace(e) {
|
4160 | if (e.keyCode !== 8) {
|
4161 | return;
|
4162 | }
|
4163 |
|
4164 | if (!this.multiFilterValue && this.multiTags.length) {
|
4165 | this.deleteTag(this.multiTags[this.multiTags.length - 1]);
|
4166 | this.focusMultiFilter();
|
4167 | }
|
4168 | },
|
4169 | handleMultiFilterChange: function handleMultiFilterChange(val) {
|
4170 | this.setFakeSpanValue(val);
|
4171 | this.resizeMultiFilterWidth();
|
4172 | },
|
4173 |
|
4174 |
|
4175 | setFakeSpanValue: function setFakeSpanValue(val) {
|
4176 | var ref = this.multiFilterFakeRef;
|
4177 | if (!ref) {
|
4178 | return;
|
4179 | }
|
4180 | ref.textContent = val;
|
4181 | this.placehoderFlag = !!val;
|
4182 | },
|
4183 | resizeMultiFilterWidth: function resizeMultiFilterWidth(disableUpdateFlag) {
|
4184 | var _this2 = this;
|
4185 |
|
4186 | this.$nextTick(function () {
|
4187 | if (_this2.multiFilterFakeRef) {
|
4188 | var width = _this2.multiFilterFakeRef.scrollWidth;
|
4189 | _this2.multiFilterWidth = width ? width + 6 + 'px' : '8px';
|
4190 | _this2.resizeInput(disableUpdateFlag);
|
4191 | }
|
4192 | });
|
4193 | },
|
4194 |
|
4195 |
|
4196 | focusMultiFilter: function focusMultiFilter() {
|
4197 | this.multiFilterRef && this.multiFilterRef.focus();
|
4198 | },
|
4199 | handleMultiFilterBlur: function handleMultiFilterBlur() {}
|
4200 | }
|
4201 | });
|
4202 |
|
4203 | var plugin_treeSelectvue_type_script_lang_js_ = (treeSelectvue_type_script_lang_js_);
|
4204 |
|
4205 | var treeSelect_render, treeSelect_staticRenderFns
|
4206 |
|
4207 |
|
4208 |
|
4209 |
|
4210 |
|
4211 |
|
4212 | var treeSelect_component = Object(componentNormalizer["a" ])(
|
4213 | plugin_treeSelectvue_type_script_lang_js_,
|
4214 | treeSelect_render,
|
4215 | treeSelect_staticRenderFns,
|
4216 | false,
|
4217 | null,
|
4218 | null,
|
4219 | null
|
4220 |
|
4221 | )
|
4222 |
|
4223 |
|
4224 | if (false) { var treeSelect_api; }
|
4225 | treeSelect_component.options.__file = "components/cascader/plugin/treeSelect.vue"
|
4226 | var treeSelect = (treeSelect_component.exports);
|
4227 |
|
4228 |
|
4229 |
|
4230 |
|
4231 |
|
4232 |
|
4233 |
|
4234 |
|
4235 |
|
4236 |
|
4237 |
|
4238 |
|
4239 |
|
4240 |
|
4241 |
|
4242 |
|
4243 |
|
4244 |
|
4245 |
|
4246 |
|
4247 |
|
4248 |
|
4249 |
|
4250 |
|
4251 |
|
4252 |
|
4253 |
|
4254 |
|
4255 |
|
4256 |
|
4257 |
|
4258 |
|
4259 |
|
4260 |
|
4261 |
|
4262 |
|
4263 |
|
4264 |
|
4265 |
|
4266 |
|
4267 |
|
4268 |
|
4269 |
|
4270 |
|
4271 |
|
4272 |
|
4273 |
|
4274 |
|
4275 |
|
4276 |
|
4277 |
|
4278 |
|
4279 |
|
4280 |
|
4281 |
|
4282 |
|
4283 |
|
4284 |
|
4285 |
|
4286 |
|
4287 |
|
4288 |
|
4289 |
|
4290 |
|
4291 |
|
4292 |
|
4293 |
|
4294 |
|
4295 |
|
4296 |
|
4297 |
|
4298 |
|
4299 |
|
4300 |
|
4301 |
|
4302 |
|
4303 |
|
4304 |
|
4305 |
|
4306 |
|
4307 |
|
4308 |
|
4309 |
|
4310 |
|
4311 |
|
4312 |
|
4313 |
|
4314 |
|
4315 |
|
4316 |
|
4317 |
|
4318 |
|
4319 |
|
4320 |
|
4321 |
|
4322 |
|
4323 |
|
4324 |
|
4325 |
|
4326 |
|
4327 |
|
4328 |
|
4329 |
|
4330 |
|
4331 |
|
4332 |
|
4333 |
|
4334 |
|
4335 |
|
4336 |
|
4337 |
|
4338 |
|
4339 |
|
4340 |
|
4341 |
|
4342 |
|
4343 |
|
4344 |
|
4345 |
|
4346 |
|
4347 |
|
4348 |
|
4349 |
|
4350 |
|
4351 |
|
4352 |
|
4353 |
|
4354 |
|
4355 |
|
4356 |
|
4357 |
|
4358 |
|
4359 |
|
4360 |
|
4361 |
|
4362 |
|
4363 |
|
4364 |
|
4365 |
|
4366 |
|
4367 |
|
4368 |
|
4369 |
|
4370 |
|
4371 |
|
4372 |
|
4373 |
|
4374 |
|
4375 |
|
4376 |
|
4377 |
|
4378 |
|
4379 |
|
4380 |
|
4381 |
|
4382 |
|
4383 |
|
4384 |
|
4385 |
|
4386 |
|
4387 |
|
4388 |
|
4389 |
|
4390 |
|
4391 |
|
4392 |
|
4393 |
|
4394 |
|
4395 |
|
4396 |
|
4397 |
|
4398 |
|
4399 |
|
4400 |
|
4401 |
|
4402 |
|
4403 |
|
4404 |
|
4405 |
|
4406 |
|
4407 |
|
4408 |
|
4409 |
|
4410 |
|
4411 |
|
4412 |
|
4413 |
|
4414 |
|
4415 |
|
4416 |
|
4417 |
|
4418 |
|
4419 |
|
4420 |
|
4421 |
|
4422 |
|
4423 |
|
4424 |
|
4425 |
|
4426 |
|
4427 |
|
4428 |
|
4429 |
|
4430 |
|
4431 |
|
4432 |
|
4433 |
|
4434 |
|
4435 |
|
4436 |
|
4437 |
|
4438 | var cascadervue_type_script_lang_js_ = ({
|
4439 | name: 'MdsCascader',
|
4440 | componentName: 'MdsCascader',
|
4441 | directives: { Clickoutside: clickoutside["a" ] },
|
4442 | model: {
|
4443 | event: 'change'
|
4444 | },
|
4445 | mixins: [vue_popper["a" ], popper_mixin["a" ], emitter_default.a, treeSelect],
|
4446 | components: {
|
4447 | MdsCascaderPanel: external_cascaderpanel_default.a,
|
4448 | MdsInput: external_input_default.a,
|
4449 | MdsScrollBar: scroll_bar["a" ],
|
4450 | searchPanel: searchPanel,
|
4451 | treePanel: treePanel,
|
4452 | MdsTag: external_tag_default.a
|
4453 | },
|
4454 | props: {
|
4455 | placement: {
|
4456 | type: String,
|
4457 | default: 'bottom-start'
|
4458 | },
|
4459 | prefixCls: {
|
4460 | type: String,
|
4461 | default: 'mds-cascader'
|
4462 | },
|
4463 | value: {
|
4464 | type: [Array, String],
|
4465 | default: function _default() {
|
4466 | return [];
|
4467 | }
|
4468 | },
|
4469 | appendToBody: Boolean,
|
4470 | disabled: Boolean,
|
4471 | options: {
|
4472 | type: [Array, Object]
|
4473 | },
|
4474 | filterable: Boolean,
|
4475 | multiple: Boolean,
|
4476 | emitPath: {
|
4477 | type: Boolean,
|
4478 | default: true
|
4479 | },
|
4480 | filterMethod: Function,
|
4481 | prop: {
|
4482 | default: function _default() {
|
4483 | return {
|
4484 | label: 'label',
|
4485 | key: 'key',
|
4486 | isLeaf: 'isLeaf',
|
4487 | disabled: 'disabled',
|
4488 | children: 'children'
|
4489 | };
|
4490 | }
|
4491 | },
|
4492 | size: {
|
4493 | type: String,
|
4494 | default: 'medium',
|
4495 | validator: function validator(value) {
|
4496 | return Object(proptype_["oneOf"])(value, ['large', 'medium', 'small', 'mini']);
|
4497 | }
|
4498 | },
|
4499 | clearable: {
|
4500 | type: Boolean,
|
4501 | default: true
|
4502 | },
|
4503 | separator: {
|
4504 | type: String,
|
4505 | default: '/'
|
4506 | },
|
4507 | placeholder: {
|
4508 | type: String,
|
4509 | default: '请选择'
|
4510 | },
|
4511 | loadData: {
|
4512 | type: Function
|
4513 | },
|
4514 | expandTrigger: {
|
4515 | type: String,
|
4516 | default: 'click'
|
4517 | },
|
4518 | showAllLevels: {
|
4519 | type: Boolean,
|
4520 | default: true
|
4521 | },
|
4522 | popperClass: {
|
4523 | type: String,
|
4524 | default: ''
|
4525 | },
|
4526 | panelClass: {
|
4527 | type: String,
|
4528 | default: ''
|
4529 | },
|
4530 | maxHeight: {
|
4531 | type: String,
|
4532 | default: 'fit-content'
|
4533 | },
|
4534 | checkStrictly: Boolean,
|
4535 | treeMode: Boolean
|
4536 | },
|
4537 | data: function data() {
|
4538 | return {
|
4539 | root: null,
|
4540 | expand: false,
|
4541 | inputHovering: false,
|
4542 | filtering: false,
|
4543 | displayLabel: this.value || null,
|
4544 | panelValue: this.value || null,
|
4545 | showValue: [],
|
4546 | filterOptions: [],
|
4547 | displayFilterOptions: [],
|
4548 | filterPlaceholder: '',
|
4549 |
|
4550 | cachedValue: '',
|
4551 | calMinWidth: 0,
|
4552 | filterLabel: '',
|
4553 | filterMode: false,
|
4554 | realFilterMethod: this.filterMethod,
|
4555 | multiLabel: '',
|
4556 | multiTags: null,
|
4557 | initInputHeight: ''
|
4558 | };
|
4559 | },
|
4560 |
|
4561 | watch: {
|
4562 | inputHovering: function inputHovering(val) {
|
4563 | if (this.multiple && this.$refs[this.inputRef].$el) {
|
4564 | var input = this.$refs[this.inputRef].$el.querySelector('.mds-input');
|
4565 | var borderColor = '';
|
4566 | if (this.disabled) {
|
4567 | borderColor = '#d8dce6';
|
4568 | } else {
|
4569 | borderColor = val ? '#0364ff' : '#d8dce6';
|
4570 | }
|
4571 | input.style.borderColor = borderColor;
|
4572 | }
|
4573 | },
|
4574 |
|
4575 | options: {
|
4576 | handler: function handler(val) {
|
4577 | this.showValue = [];
|
4578 | this.$refs.panel.tree.clearSelectedNode();
|
4579 | this.$refs.panel.tree.clearExpandNode();
|
4580 | },
|
4581 |
|
4582 | deep: true
|
4583 | },
|
4584 | expand: function expand(val) {
|
4585 | var _this = this;
|
4586 |
|
4587 | if (val) {
|
4588 | this.$nextTick(function () {
|
4589 | _this.updatePopper();
|
4590 | if (_this.treeMode) {
|
4591 | return;
|
4592 | }
|
4593 | _this.resetPanelMaxWidth();
|
4594 | });
|
4595 | } else {
|
4596 | this.$refs[this.inputRef].$el.blur();
|
4597 | }
|
4598 | this.$emit('visible-change', val);
|
4599 | },
|
4600 | showValue: function showValue(val) {
|
4601 | this.displayLabel = val ? this.showAllLevels ? val.join(this.separator) : val[val.length - 1] : null;
|
4602 | if (this.filterable) {
|
4603 | this.cachedValue = this.displayLabel;
|
4604 | }
|
4605 | },
|
4606 | value: function value(val) {
|
4607 | this.$refs.panel.setValue(val);
|
4608 | }
|
4609 | },
|
4610 | computed: {
|
4611 | displayPlaceHolder: function displayPlaceHolder() {
|
4612 | if (this.treeMode) {
|
4613 | return !this.placehoderFlag ? this.placeholder : '';
|
4614 | }
|
4615 | return this.placeholder;
|
4616 | },
|
4617 | inputRef: function inputRef() {
|
4618 | return this.multiple || this.treeMode ? 'multipleInput' : 'input';
|
4619 | },
|
4620 | classes: function classes() {
|
4621 | var prefixCls = this.prefixCls,
|
4622 | size = this.size;
|
4623 |
|
4624 | return [prefixCls, prefixCls + '-' + size, this.treeMode ? 'tree' : '', this.disabled ? 'mds-cascader-disabled' : ''];
|
4625 | },
|
4626 | panelProps: function panelProps() {
|
4627 | return this.prop;
|
4628 | },
|
4629 | label: function label() {
|
4630 | return this.prop && this.prop.label ? this.prop.label : 'label';
|
4631 | },
|
4632 | key: function key() {
|
4633 | return this.prop && this.prop.key ? this.prop.key : 'key';
|
4634 | },
|
4635 | isSingleStrict: function isSingleStrict() {
|
4636 | return !this.multiple && this.checkStrictly;
|
4637 | },
|
4638 | isMultiStrict: function isMultiStrict() {
|
4639 | return this.multiple && this.checkStrictly;
|
4640 | }
|
4641 | },
|
4642 | methods: {
|
4643 |
|
4644 | resetPanelMaxWidth: function resetPanelMaxWidth() {
|
4645 | if (!this.expand) {
|
4646 | return;
|
4647 | }
|
4648 |
|
4649 | var panel = this.$refs.panel;
|
4650 | panel.$el.style.maxWidth = 'none';
|
4651 |
|
4652 | this.$nextTick(function () {
|
4653 | var panelChildren = panel.$children;
|
4654 | var viewportWidth = window.innerWidth - Object(dom_helper["b" ])();
|
4655 |
|
4656 | var criticalIndex = -1;
|
4657 |
|
4658 | for (var i = 0; i < panelChildren.length; i++) {
|
4659 | var item = panelChildren[i];
|
4660 | var rightDistance = item.$el.parentElement.getBoundingClientRect().right;
|
4661 | if (rightDistance > viewportWidth) {
|
4662 | criticalIndex = i;
|
4663 | break;
|
4664 | }
|
4665 | }
|
4666 |
|
4667 | if (criticalIndex < 0) {
|
4668 | panel.$el.style.maxWidth = 'none';
|
4669 | return;
|
4670 | }
|
4671 |
|
4672 | var maxWidth = 0;
|
4673 | for (var _i = 0; _i < criticalIndex; _i++) {
|
4674 | var _item = panelChildren[_i];
|
4675 | var width = _item.$el.parentElement.getBoundingClientRect().width;
|
4676 | maxWidth = maxWidth + width;
|
4677 | }
|
4678 | if (maxWidth) {
|
4679 | panel.$el.style.maxWidth = maxWidth + 'px';
|
4680 | var goalPosition = panel.$el.getBoundingClientRect().right;
|
4681 | panel.$el.scrollTo(goalPosition, 0);
|
4682 | } else {
|
4683 | panel.$el.style.maxWidth = 'none';
|
4684 | }
|
4685 | });
|
4686 | },
|
4687 |
|
4688 |
|
4689 | handleMultiAllLevels: function handleMultiAllLevels(tag) {
|
4690 | var _this2 = this;
|
4691 |
|
4692 | tag.forEach(function (node) {
|
4693 | var totalLabel = node.label;
|
4694 |
|
4695 | var parent = node.parent;
|
4696 | while (parent && parent.label) {
|
4697 | totalLabel = parent.label + _this2.separator + totalLabel;
|
4698 | parent = parent.parent;
|
4699 | }
|
4700 |
|
4701 | node.totalLabel = totalLabel;
|
4702 | });
|
4703 | return tag;
|
4704 | },
|
4705 |
|
4706 |
|
4707 | setMultiTags: function setMultiTags(multiTags, multiPath, multiData) {
|
4708 |
|
4709 | this.multiTags = this.showAllLevels ? this.handleMultiAllLevels(multiTags) : multiTags;
|
4710 |
|
4711 |
|
4712 | if (this.multiTags.length) {
|
4713 | this.multiLabel = ' ';
|
4714 | } else {
|
4715 | this.multiLabel = '';
|
4716 | this.$refs.panel.resetPanel();
|
4717 | }
|
4718 |
|
4719 | if (multiPath && multiData) {
|
4720 | this.handleMultiChange(multiPath, multiData);
|
4721 | }
|
4722 | this.resizeInput();
|
4723 | },
|
4724 |
|
4725 |
|
4726 | deleteTag: function deleteTag(tag) {
|
4727 | if (this.disabled) {
|
4728 | return;
|
4729 | }
|
4730 | tag.check = false;
|
4731 | this.$refs.panel.changeMultiNode(tag);
|
4732 | },
|
4733 |
|
4734 |
|
4735 | resizeInput: function resizeInput(updateFlag) {
|
4736 | var _this3 = this;
|
4737 |
|
4738 | this.$nextTick(function () {
|
4739 | var inputDom = _this3.$refs[_this3.inputRef] && _this3.$refs[_this3.inputRef].$el;
|
4740 | var reference = _this3.$el;
|
4741 | if (!inputDom || !reference) {
|
4742 | return;
|
4743 | }
|
4744 | var tagsHeight = getComputedStyle(reference.querySelector('.mds-cascader-tags')).height;
|
4745 | inputDom.style.height = Math.max(parseInt(tagsHeight), parseInt(_this3.initInputHeight)) + 'px';
|
4746 | if (!updateFlag) {
|
4747 | _this3.updatePopper();
|
4748 | }
|
4749 | });
|
4750 | },
|
4751 | changeFilterMode: function changeFilterMode() {
|
4752 | var _this4 = this;
|
4753 |
|
4754 | this.filterMode = true;
|
4755 | if (typeof this.displayLabel === 'string') {
|
4756 | this.filterPlaceholder = this.displayLabel;
|
4757 | }
|
4758 | this.$nextTick(function () {
|
4759 | _this4.$refs.filterInput.focus();
|
4760 | });
|
4761 | },
|
4762 | handleMultiChange: function handleMultiChange(multiPath, multiData) {
|
4763 | this.$emit('change', multiPath, multiData);
|
4764 | this.dispatch('MdsFormItem', 'formItemChange', multiPath);
|
4765 | },
|
4766 | handleChange: function handleChange(path, data) {
|
4767 | var isSetting = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
4768 |
|
4769 | this.filterMode = false;
|
4770 | this.showValue = path.map(function (item) {
|
4771 | return item.label;
|
4772 | });
|
4773 | if (!isSetting) {
|
4774 | var emitPath = this.emitPath ? path.map(function (item) {
|
4775 | return item.key;
|
4776 | }) : path.map(function (item) {
|
4777 | return item.key;
|
4778 | })[path.length - 1];
|
4779 | if (!this.isSingleStrict) {
|
4780 | this.blur();
|
4781 | }
|
4782 |
|
4783 | this.$emit('change', emitPath, data);
|
4784 | if (!this.firstRenderFlag) {
|
4785 | this.firstRenderFlag = true;
|
4786 | return;
|
4787 | }
|
4788 | this.dispatch('MdsFormItem', 'formItemChange', emitPath);
|
4789 | }
|
4790 | },
|
4791 | handleExpandChange: function handleExpandChange(path, data) {
|
4792 | var _this5 = this;
|
4793 |
|
4794 | this.$emit('expand-change', path.map(function (item) {
|
4795 | return item['data'][_this5.key];
|
4796 | }), data);
|
4797 | },
|
4798 | handleClear: function handleClear(event) {
|
4799 | this.clearValue();
|
4800 | this.blur();
|
4801 | this.dispatch('MdsFormItem', 'formItemChange', []);
|
4802 | },
|
4803 | handleClose: function handleClose() {
|
4804 | var _this6 = this;
|
4805 |
|
4806 | this.expand = false;
|
4807 |
|
4808 | if (!this.filterable) {
|
4809 | return;
|
4810 | }
|
4811 | if (this.cachedValue) {
|
4812 | this.displayLabel = this.cachedValue;
|
4813 | }
|
4814 | this.filterMode = false;
|
4815 | this.filterPlaceholder = '';
|
4816 | this.filterLabel = '';
|
4817 | var timer = setTimeout(function () {
|
4818 | _this6.filtering = false;
|
4819 | clearTimeout(timer);
|
4820 | }, 100);
|
4821 | },
|
4822 | handleClick: function handleClick() {
|
4823 | if (this.disabled) {
|
4824 | return;
|
4825 | }
|
4826 | if (this.filterable) {
|
4827 | this.changeFilterMode();
|
4828 | }
|
4829 | this.expand = true;
|
4830 | },
|
4831 | handleFocus: function handleFocus(event) {
|
4832 | this.$emit('focus', event);
|
4833 | },
|
4834 | handleBlur: function handleBlur(event) {
|
4835 | var _this7 = this;
|
4836 |
|
4837 | if (this.filterMode) {
|
4838 | return;
|
4839 | }
|
4840 | var timer = setTimeout(function () {
|
4841 | _this7.$emit('blur', event);
|
4842 | clearTimeout(timer);
|
4843 | }, 50);
|
4844 | },
|
4845 | handleInput: function handleInput(val, type) {
|
4846 | if (!this.filterLabel) {
|
4847 | this.filtering = false;
|
4848 | return;
|
4849 | }
|
4850 | if (!this.filtering) {
|
4851 | this.filtering = true;
|
4852 | }
|
4853 | if (type === 'filter') {
|
4854 | this.changeFilterOptions(val);
|
4855 | }
|
4856 | },
|
4857 |
|
4858 |
|
4859 |
|
4860 | handleFilterChange: function handleFilterChange(node) {
|
4861 | var _this8 = this;
|
4862 |
|
4863 |
|
4864 | var timer = setTimeout(function () {
|
4865 | _this8.filtering = false;
|
4866 | clearTimeout(timer);
|
4867 | }, 100);
|
4868 | var path = node.getPath(true).reverse();
|
4869 | var nodeData = node.data;
|
4870 | this.showValue = this.filterLabel;
|
4871 | this.handleChange(path, nodeData);
|
4872 | this.filterPlaceholder = '';
|
4873 | this.filterLabel = '';
|
4874 | node.tree.clearSelectedNode();
|
4875 | node.tree.clearExpandNode();
|
4876 | node.selected = true;
|
4877 | this.$refs.panel.expandNode(node);
|
4878 | },
|
4879 | changeFilterOptions: function changeFilterOptions(val) {
|
4880 | var _this9 = this;
|
4881 |
|
4882 | this.displayFilterOptions = this.filterOptions.filter(function (node) {
|
4883 | return _this9.realFilterMethod(node, val);
|
4884 | });
|
4885 | },
|
4886 | clearValue: function clearValue() {
|
4887 | if (this.multiple) {
|
4888 | this.multiLabel = '';
|
4889 | this.multiTags = [];
|
4890 | this.$refs.panel.tree.clearCheckNode();
|
4891 | this.resizeInput();
|
4892 | } else {
|
4893 | this.showValue = '';
|
4894 | this.$refs.panel.tree.clearSelectedNode();
|
4895 | }
|
4896 |
|
4897 | this.$refs.panel.resetPanel();
|
4898 | this.$emit('change', []);
|
4899 | this.$emit('clear');
|
4900 | },
|
4901 | blur: function blur() {
|
4902 | this.expand = false;
|
4903 | this.$refs[this.inputRef].blur();
|
4904 | },
|
4905 | panelClick: function panelClick() {
|
4906 | this.isSilentBlur = true;
|
4907 | },
|
4908 | doDestroy: function doDestroy() {
|
4909 | this.$refs.popper && this.$refs.popper.$parent && this.$refs.popper.$parent.doDestroy();
|
4910 | },
|
4911 | initfilterOptions: function initfilterOptions(data) {
|
4912 | this.filterOptions = data;
|
4913 | if (!Object(util["g" ])(this.realFilterMethod)) {
|
4914 | this.realFilterMethod = function (node, keyword) {
|
4915 | return node.label.includes(keyword);
|
4916 | };
|
4917 | }
|
4918 | }
|
4919 | },
|
4920 | created: function created() {
|
4921 | this.debounceResetPanelMaxWidth = external_lodash_debounce_default()(this.resetPanelMaxWidth, 200);
|
4922 | window.addEventListener('resize', this.debounceResetPanelMaxWidth);
|
4923 | },
|
4924 | destroyed: function destroyed() {
|
4925 | window.removeEventListener('resize', this.debounceResetPanelMaxWidth);
|
4926 | },
|
4927 | mounted: function mounted() {
|
4928 | var inputEl = this.$refs[this.inputRef].$el;
|
4929 | this.calMinWidth = parseInt(getComputedStyle(inputEl).width);
|
4930 | this.initInputHeight = getComputedStyle(inputEl).height;
|
4931 | }
|
4932 | });
|
4933 |
|
4934 | var cascader_cascadervue_type_script_lang_js_ = (cascadervue_type_script_lang_js_);
|
4935 |
|
4936 |
|
4937 |
|
4938 |
|
4939 |
|
4940 |
|
4941 |
|
4942 |
|
4943 | var cascader_component = Object(componentNormalizer["a" ])(
|
4944 | cascader_cascadervue_type_script_lang_js_,
|
4945 | render,
|
4946 | staticRenderFns,
|
4947 | false,
|
4948 | null,
|
4949 | null,
|
4950 | null
|
4951 |
|
4952 | )
|
4953 |
|
4954 |
|
4955 | if (false) { var cascader_api; }
|
4956 | cascader_component.options.__file = "components/cascader/cascader.vue"
|
4957 | var cascader = (cascader_component.exports);
|
4958 |
|
4959 | var transition = __webpack_require__(268);
|
4960 |
|
4961 |
|
4962 | var style = __webpack_require__(270);
|
4963 |
|
4964 |
|
4965 |
|
4966 |
|
4967 |
|
4968 |
|
4969 |
|
4970 |
|
4971 |
|
4972 | cascader.install = function (Vue) {
|
4973 | Vue.component(cascader.name, cascader);
|
4974 | };
|
4975 | var components_cascader = __webpack_exports__["default"] = (cascader);
|
4976 |
|
4977 | })
|
4978 |
|
4979 | });
|
4980 | }); |
\ | No newline at end of file |