@web-utils/component 4.0.0 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/awesome-button/index.mjs +25 -55
- package/base.css +1 -1
- package/card/style.css +1 -1
- package/carousel/style.css +1 -1
- package/chat/style.css +1 -1
- package/chunks/{ElementForm.8w6UkiuU.mjs → ElementForm.CQ3PN5qj.mjs} +17 -35
- package/chunks/{ElementListeners.DOy8wyD2.mjs → ElementListeners.De_PRuIm.mjs} +56 -95
- package/chunks/{ElementMultiInstance.3Z28ewuh.mjs → ElementMultiInstance.DQo2wuAQ.mjs} +16 -26
- package/chunks/{ElementProperties.B2I48muA.mjs → ElementProperties.CosfDrlW.mjs} +16 -16
- package/chunks/{ElementTaskConfig.MBbkLrth.mjs → ElementTaskConfig.Bko0kgTp.mjs} +104 -113
- package/chunks/{FlowCondition.BfU9kw6h.mjs → FlowCondition.Y6qEYi1T.mjs} +36 -66
- package/chunks/{SignalAndMessage.CH6L7cYu.mjs → SignalAndMessage.Bb5PFX0N.mjs} +11 -22
- package/chunks/{UserTaskListeners.XXe5dC5I.mjs → UserTaskListeners.Bv3BDfEI.mjs} +45 -86
- package/chunks/configComponents.BDhlZU8F.mjs +23 -0
- package/chunks/confirmable-mixin.D9aKzKZ9.mjs +85 -0
- package/chunks/core.DJEgjQW6.mjs +54 -0
- package/chunks/dictionary.DqiP9x2m.mjs +25 -0
- package/chunks/dictionary.DsN-2ukC.mjs +70 -0
- package/chunks/form-input.B8z37eqj.mjs +31 -0
- package/chunks/form-item.D-H-wCPE.mjs +233 -0
- package/chunks/form-validate.CVarNHKX.mjs +12 -0
- package/chunks/helper.BiMLcEEk.mjs +41 -0
- package/chunks/index.9OxHjTIE.mjs +16 -0
- package/chunks/{index.MAFc4eFi.mjs → index.d3MV3Wq2.mjs} +43 -47
- package/chunks/sub-table-plus-props.BVsD71hT.mjs +30 -0
- package/chunks/{tab-mixin.CVr9bZtn.mjs → tab-mixin.BNK6dxLN.mjs} +1 -1
- package/chunks/utilSelf.Csq1766E.mjs +48 -0
- package/color-picker/index.mjs +19 -37
- package/comment/style.css +1 -1
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.mjs +1 -1
- package/context-menu/style.css +1 -1
- package/count-up/index.mjs +13 -24
- package/custom-scrollbar/index.mjs +1 -2
- package/data-operatext/style.css +1 -1
- package/data-panel/style.css +1 -1
- package/data-pay/style.css +1 -1
- package/data-price/style.css +1 -1
- package/data-rotate/style.css +1 -1
- package/data-table-picker/index.mjs +1 -1
- package/data-tabs/style.css +1 -1
- package/dialog-form/index.mjs +16 -28
- package/dynamic-table/style.css +1 -1
- package/easy-popup/index.mjs +22 -40
- package/easy-popup/style.css +1 -1
- package/editable-tree/index.mjs +203 -250
- package/editable-tree/style.css +1 -1
- package/element-dialog/index.mjs +30 -52
- package/element-dialog/style.css +1 -1
- package/flex-column/index.mjs +13 -25
- package/flex-item/index.mjs +15 -27
- package/flex-row/index.mjs +13 -25
- package/flow-designer/index.mjs +343 -374
- package/flow-designer/style.css +1 -1
- package/flow-viewer/index.mjs +64 -91
- package/form-block/index.mjs +33 -26
- package/form-card/index.mjs +25 -0
- package/form-cascader/index.mjs +70 -67
- package/form-checkbox/index.mjs +71 -0
- package/form-checkbox-group/index.mjs +33 -53
- package/form-date-picker/index.mjs +44 -73
- package/form-holder/index.mjs +54 -40
- package/form-holder/style.css +1 -0
- package/form-input/index.mjs +62 -40
- package/form-input-cron-expression/index.mjs +77 -0
- package/form-input-cron-expression/style.css +1 -0
- package/form-input-email/index.mjs +21 -33
- package/form-input-id-card/index.mjs +25 -38
- package/form-input-number/index.mjs +39 -42
- package/form-input-number/style.css +1 -1
- package/form-input-phone-number/index.mjs +26 -37
- package/form-input-tag/index.mjs +32 -34
- package/form-input-time/index.mjs +22 -37
- package/form-item/index.mjs +109 -101
- package/form-item/style.css +1 -1
- package/form-item-config-provider/index.mjs +18 -10
- package/form-item-group/index.mjs +73 -69
- package/form-item-group/style.css +1 -1
- package/form-radio-group/index.mjs +41 -36
- package/form-radio-group/style.css +1 -1
- package/form-select/index.mjs +142 -75
- package/form-select/style.css +1 -0
- package/form-switch/index.mjs +29 -34
- package/form-table/index.mjs +85 -0
- package/form-table-plus/index.mjs +109 -0
- package/form-textarea/index.mjs +23 -35
- package/form-tree-select/index.mjs +72 -0
- package/form-tree-select/style.css +1 -0
- package/form-tree-select-multiple/index.mjs +78 -0
- package/form-view/index.mjs +37 -69
- package/form-view/style.css +1 -1
- package/fy-curd/index.mjs +131 -140
- package/fy-curd/style.css +1 -1
- package/fy-draggable/index.mjs +16 -26
- package/fy-draggable/style.css +1 -1
- package/fy-dynamic/index.mjs +48 -57
- package/fy-empty/style.css +1 -1
- package/fy-form/style.css +1 -1
- package/fy-form-design/index.mjs +314 -339
- package/fy-form-design/style.css +1 -1
- package/fy-input-map/index.mjs +40 -50
- package/fy-input-map/style.css +1 -1
- package/fy-input-table/index.mjs +31 -41
- package/fy-u-editor/index.mjs +77 -103
- package/fy-upload/style.css +1 -1
- package/highlight-j-s/style.css +1 -1
- package/image-cropper/index.mjs +14 -65
- package/image-preview/index.mjs +17 -45
- package/image-preview/style.css +1 -1
- package/image-viewer/style.css +1 -1
- package/index.mjs +666 -496
- package/input-number/index.mjs +64 -9
- package/keyboard/style.css +1 -1
- package/monaco-editor/index.mjs +43 -71
- package/name-avatar/style.css +1 -1
- package/package.json +5 -4
- package/page-index/index.mjs +30 -54
- package/page-index-top/index.mjs +25 -47
- package/pageable-table/index.mjs +385 -218
- package/pageable-table/style.css +1 -1
- package/pageable-view/index.mjs +56 -95
- package/photo-swipe/index.mjs +51 -74
- package/picker-table-view/index.mjs +117 -0
- package/present-view/index.mjs +43 -77
- package/present-view/style.css +1 -1
- package/resize-observer/index.mjs +1 -1
- package/resize-observer/style.css +1 -1
- package/search/style.css +1 -1
- package/search-popover/index.mjs +28 -48
- package/search-popover/style.css +1 -1
- package/sign/index.mjs +1 -1
- package/sign-panel/style.css +1 -1
- package/skeleton-panel/index.mjs +38 -0
- package/skeleton-panel/style.css +1 -0
- package/split-pane/index.mjs +31 -49
- package/split-pane/style.css +1 -1
- package/sub-table/index.mjs +206 -0
- package/sub-table/style.css +1 -0
- package/sub-table-plus/index.mjs +231 -0
- package/sub-table-plus/style.css +1 -0
- package/swiper/index.mjs +18 -38
- package/swiper/style.css +1 -1
- package/tab/index.mjs +1 -1
- package/tab/style.css +1 -1
- package/tab-item/index.mjs +2 -2
- package/table-column/index.mjs +166 -37
- package/table-column/style.css +1 -0
- package/table-view/index.mjs +177 -132
- package/table-view/style.css +1 -1
- package/tabs-view/index.mjs +104 -0
- package/tabs-view/style.css +1 -0
- package/tag-render/index.mjs +13 -24
- package/toolbar/index.mjs +115 -58
- package/toolbar/style.css +1 -1
- package/toolbar-button/index.mjs +92 -48
- package/vue-cron/index.mjs +47 -65
- package/vue-qr-code/index.mjs +14 -32
- package/vue-quill-editor/index.mjs +13 -24
- package/vue-tags-input/index.mjs +10 -21
- package/vue-tree-select/index.mjs +352 -393
- package/vue-tree-select/style.css +1 -1
- package/vue-video-player/index.mjs +34 -63
- package/watermark/index.mjs +21 -31
- package/web-types.json +9240 -3840
- package/x-input-tag/index.mjs +29 -61
- package/chunks/confirmable-mixin.D4LAArE5.mjs +0 -114
- package/chunks/form-input-mixin.BkKiqJhi.mjs +0 -24
- package/chunks/form-item-mixin.CG4ZwzMC.mjs +0 -140
- package/chunks/input-number-mixin.CzjtGf2n.mjs +0 -60
- package/chunks/utilSelf.CRqpl0Cz.mjs +0 -56
- package/toolbar-button/style.css +0 -1
- /package/chunks/{form-pick-mixin.BFTIVn_i.mjs → form-pick.BFTIVn_i.mjs} +0 -0
|
@@ -1,101 +1,90 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
De.call(t, s) && Z(e, s, t[s]);
|
|
8
|
-
if (J)
|
|
9
|
-
for (var s of J(t))
|
|
10
|
-
xe.call(t, s) && Z(e, s, t[s]);
|
|
11
|
-
return e;
|
|
12
|
-
}, C = (e, t) => Me(e, Te(t));
|
|
13
|
-
import Re, { h as r } from "vue";
|
|
14
|
-
import { noop as $e, identity as Ie, last as ee, once as Ae, debounce as Ve } from "lodash-es";
|
|
15
|
-
import { isPromise as ae } from "@web-utils/core";
|
|
16
|
-
import { n as v } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
17
|
-
const N = process.env.NODE_ENV === "production" ? (
|
|
1
|
+
import ye, { h as r } from "vue";
|
|
2
|
+
import { noop as be, identity as Ne, last as Y, once as Ee, debounce as we } from "lodash-es";
|
|
3
|
+
import { isPromise as se } from "@web-utils/core";
|
|
4
|
+
import { n as m } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
5
|
+
import { _ as R } from "../chunks/helper.BiMLcEEk.mjs";
|
|
6
|
+
const _ = process.env.NODE_ENV === "production" ? (
|
|
18
7
|
/* istanbul ignore next */
|
|
19
|
-
|
|
8
|
+
be
|
|
20
9
|
) : function(t, s) {
|
|
21
10
|
if (!t()) {
|
|
22
11
|
const n = ["[Vue-TreeSelect Warning]"].concat(s());
|
|
23
12
|
console.error(...n);
|
|
24
13
|
}
|
|
25
14
|
};
|
|
26
|
-
function
|
|
15
|
+
function N(e) {
|
|
27
16
|
return function(s, ...n) {
|
|
28
17
|
s.type === "mousedown" && s.button === 0 && e.call(this, s, ...n);
|
|
29
18
|
};
|
|
30
19
|
}
|
|
31
|
-
function
|
|
20
|
+
function Ce(e, t) {
|
|
32
21
|
const s = e.getBoundingClientRect(), n = t.getBoundingClientRect(), i = t.offsetHeight / 3;
|
|
33
22
|
n.bottom + i > s.bottom ? e.scrollTop = Math.min(t.offsetTop + t.clientHeight - e.offsetHeight + i, e.scrollHeight) : n.top - i < s.top && (e.scrollTop = Math.max(t.offsetTop - i, 0));
|
|
34
23
|
}
|
|
35
|
-
function
|
|
24
|
+
function ne(e, t) {
|
|
36
25
|
const s = e.indexOf(t);
|
|
37
26
|
s !== -1 && e.splice(s, 1);
|
|
38
27
|
}
|
|
39
|
-
let
|
|
40
|
-
const
|
|
41
|
-
function
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
},
|
|
28
|
+
let Q;
|
|
29
|
+
const D = [], Le = 100;
|
|
30
|
+
function Te() {
|
|
31
|
+
Q = setInterval(() => {
|
|
32
|
+
D.forEach(ie);
|
|
33
|
+
}, Le);
|
|
45
34
|
}
|
|
46
|
-
function
|
|
47
|
-
clearInterval(
|
|
35
|
+
function Me() {
|
|
36
|
+
clearInterval(Q), Q = null;
|
|
48
37
|
}
|
|
49
|
-
function
|
|
50
|
-
const { $el: t, listener: s, lastWidth: n, lastHeight: i } = e,
|
|
51
|
-
(n !==
|
|
38
|
+
function ie(e) {
|
|
39
|
+
const { $el: t, listener: s, lastWidth: n, lastHeight: i } = e, o = t.offsetWidth, l = t.offsetHeight;
|
|
40
|
+
(n !== o || i !== l) && (e.lastWidth = o, e.lastHeight = l, s({ width: o, height: l }));
|
|
52
41
|
}
|
|
53
|
-
function
|
|
42
|
+
function De(e, t) {
|
|
54
43
|
const s = {
|
|
55
44
|
$el: e,
|
|
56
45
|
listener: t,
|
|
57
46
|
lastWidth: null,
|
|
58
47
|
lastHeight: null
|
|
59
48
|
}, n = () => {
|
|
60
|
-
|
|
49
|
+
ne(D, s), D.length || Me();
|
|
61
50
|
};
|
|
62
|
-
return
|
|
51
|
+
return D.push(s), ie(s), Te(), n;
|
|
63
52
|
}
|
|
64
|
-
function
|
|
65
|
-
const s = document.createElement("_"), n = s.appendChild(document.createElement("_")), i = s.appendChild(document.createElement("_")),
|
|
66
|
-
let
|
|
67
|
-
return n.style.cssText = s.style.cssText = "height:100%;left:0;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:0s;width:100%;z-index:-1",
|
|
68
|
-
function
|
|
69
|
-
|
|
70
|
-
const p = e.offsetWidth,
|
|
71
|
-
(p !==
|
|
53
|
+
function Re(e, t) {
|
|
54
|
+
const s = document.createElement("_"), n = s.appendChild(document.createElement("_")), i = s.appendChild(document.createElement("_")), o = n.appendChild(document.createElement("_"));
|
|
55
|
+
let l, u;
|
|
56
|
+
return n.style.cssText = s.style.cssText = "height:100%;left:0;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:0s;width:100%;z-index:-1", o.style.cssText = i.style.cssText = "display:block;height:100%;transition:0s;width:100%", o.style.width = o.style.height = "200%", e.appendChild(s), f(), g;
|
|
57
|
+
function f() {
|
|
58
|
+
h();
|
|
59
|
+
const p = e.offsetWidth, y = e.offsetHeight;
|
|
60
|
+
(p !== l || y !== u) && (l = p, u = y, i.style.width = `${p * 2}px`, i.style.height = `${y * 2}px`, s.scrollLeft = s.scrollWidth, s.scrollTop = s.scrollHeight, n.scrollLeft = n.scrollWidth, n.scrollTop = n.scrollHeight, t({ width: p, height: y })), n.addEventListener("scroll", f), s.addEventListener("scroll", f);
|
|
72
61
|
}
|
|
73
|
-
function
|
|
74
|
-
n.removeEventListener("scroll",
|
|
62
|
+
function h() {
|
|
63
|
+
n.removeEventListener("scroll", f), s.removeEventListener("scroll", f);
|
|
75
64
|
}
|
|
76
65
|
function g() {
|
|
77
|
-
|
|
66
|
+
h(), e.removeChild(s);
|
|
78
67
|
}
|
|
79
68
|
}
|
|
80
|
-
function
|
|
69
|
+
function re(e, t) {
|
|
81
70
|
const s = document.documentMode === 9;
|
|
82
71
|
let n = !0;
|
|
83
|
-
const
|
|
84
|
-
return n = !1,
|
|
72
|
+
const l = (s ? De : Re)(e, (...u) => n || t(...u));
|
|
73
|
+
return n = !1, l;
|
|
85
74
|
}
|
|
86
|
-
function
|
|
75
|
+
function xe(e) {
|
|
87
76
|
const t = [];
|
|
88
77
|
let s = e.parentNode;
|
|
89
78
|
for (; s && s.nodeName !== "BODY" && s.nodeType === document.ELEMENT_NODE; )
|
|
90
|
-
|
|
79
|
+
$e(s) && t.push(s), s = s.parentNode;
|
|
91
80
|
return t.push(window), t;
|
|
92
81
|
}
|
|
93
|
-
function
|
|
82
|
+
function $e(e) {
|
|
94
83
|
const { overflow: t, overflowX: s, overflowY: n } = getComputedStyle(e);
|
|
95
84
|
return /(auto|scroll|overlay)/.test(t + n + s);
|
|
96
85
|
}
|
|
97
|
-
function
|
|
98
|
-
const s =
|
|
86
|
+
function oe(e, t) {
|
|
87
|
+
const s = xe(e);
|
|
99
88
|
return window.addEventListener("resize", t, { passive: !0 }), s.forEach((n) => {
|
|
100
89
|
n.addEventListener("scroll", t, { passive: !0 });
|
|
101
90
|
}), function() {
|
|
@@ -104,53 +93,53 @@ function de(e, t) {
|
|
|
104
93
|
});
|
|
105
94
|
};
|
|
106
95
|
}
|
|
107
|
-
function
|
|
96
|
+
function le(e) {
|
|
108
97
|
return Number.isNaN(e);
|
|
109
98
|
}
|
|
110
99
|
const S = () => /* @__PURE__ */ Object.create(null);
|
|
111
|
-
function
|
|
100
|
+
function ae(e) {
|
|
112
101
|
return e == null || typeof e != "object" ? !1 : Object.getPrototypeOf(e) === Object.prototype;
|
|
113
102
|
}
|
|
114
|
-
function
|
|
115
|
-
|
|
103
|
+
function Ie(e, t, s) {
|
|
104
|
+
ae(s) ? (e[t] || (e[t] = {}), K(e[t], s)) : e[t] = s;
|
|
116
105
|
}
|
|
117
|
-
function
|
|
118
|
-
if (
|
|
106
|
+
function K(e, t) {
|
|
107
|
+
if (ae(t)) {
|
|
119
108
|
const s = Object.keys(t);
|
|
120
109
|
for (let n = 0, i = s.length; n < i; n++)
|
|
121
|
-
|
|
110
|
+
Ie(e, s[n], t[s[n]]);
|
|
122
111
|
}
|
|
123
112
|
return e;
|
|
124
113
|
}
|
|
125
|
-
function
|
|
114
|
+
function O(e, t) {
|
|
126
115
|
return e.indexOf(t) !== -1;
|
|
127
116
|
}
|
|
128
|
-
function
|
|
117
|
+
function ce(e, t, s) {
|
|
129
118
|
for (let n = 0, i = e.length; n < i; n++)
|
|
130
119
|
if (t.call(s, e[n], n, e)) return e[n];
|
|
131
120
|
}
|
|
132
|
-
function
|
|
121
|
+
function A(e, t) {
|
|
133
122
|
if (e.length !== t.length) return !0;
|
|
134
123
|
for (let s = 0; s < e.length; s++)
|
|
135
124
|
if (e[s] !== t[s]) return !0;
|
|
136
125
|
return !1;
|
|
137
126
|
}
|
|
138
|
-
function
|
|
127
|
+
function Ae(e, t) {
|
|
139
128
|
const s = t.length, n = e.length;
|
|
140
129
|
if (n > s)
|
|
141
130
|
return !1;
|
|
142
131
|
if (n === s)
|
|
143
132
|
return e === t;
|
|
144
|
-
e: for (let i = 0,
|
|
145
|
-
const
|
|
146
|
-
for (;
|
|
147
|
-
if (t.charCodeAt(
|
|
133
|
+
e: for (let i = 0, o = 0; i < n; i++) {
|
|
134
|
+
const l = e.charCodeAt(i);
|
|
135
|
+
for (; o < s; )
|
|
136
|
+
if (t.charCodeAt(o++) === l)
|
|
148
137
|
continue e;
|
|
149
138
|
return !1;
|
|
150
139
|
}
|
|
151
140
|
return !0;
|
|
152
141
|
}
|
|
153
|
-
const b = null,
|
|
142
|
+
const b = null, q = 0, ue = 1, he = 2, E = "ALL_CHILDREN", w = "ALL_DESCENDANTS", C = "LEAF_CHILDREN", L = "LEAF_DESCENDANTS", Ve = "LOAD_ROOT_OPTIONS", Be = "LOAD_CHILDREN_OPTIONS", ze = "ASYNC_SEARCH", V = "ALL", M = "BRANCH_PRIORITY", B = "LEAF_PRIORITY", z = "ALL_WITH_INDETERMINATE", X = "ORDER_SELECTED", G = "LEVEL", J = "INDEX", d = {
|
|
154
143
|
BACKSPACE: 8,
|
|
155
144
|
ENTER: 13,
|
|
156
145
|
ESCAPE: 27,
|
|
@@ -161,14 +150,14 @@ const b = null, G = 0, ge = 1, ve = 2, L = "ALL_CHILDREN", D = "ALL_DESCENDANTS"
|
|
|
161
150
|
ARROW_RIGHT: 39,
|
|
162
151
|
ARROW_DOWN: 40,
|
|
163
152
|
DELETE: 46
|
|
164
|
-
},
|
|
153
|
+
}, Fe = process.env.NODE_ENV === "testing" ? (
|
|
165
154
|
/* to speed up unit testing */
|
|
166
155
|
10
|
|
167
156
|
) : (
|
|
168
157
|
/* istanbul ignore next */
|
|
169
158
|
200
|
|
170
|
-
),
|
|
171
|
-
function
|
|
159
|
+
), Z = 5, ee = 40;
|
|
160
|
+
function de(e, t) {
|
|
172
161
|
let s = 0;
|
|
173
162
|
do {
|
|
174
163
|
if (e.level < s) return -1;
|
|
@@ -177,28 +166,28 @@ function Se(e, t) {
|
|
|
177
166
|
s++;
|
|
178
167
|
} while (!0);
|
|
179
168
|
}
|
|
180
|
-
function
|
|
181
|
-
return e.level === t.level ?
|
|
169
|
+
function ke(e, t) {
|
|
170
|
+
return e.level === t.level ? de(e, t) : e.level - t.level;
|
|
182
171
|
}
|
|
183
|
-
function
|
|
172
|
+
function F() {
|
|
184
173
|
return {
|
|
185
174
|
isLoaded: !1,
|
|
186
175
|
isLoading: !1,
|
|
187
176
|
loadingError: ""
|
|
188
177
|
};
|
|
189
178
|
}
|
|
190
|
-
function
|
|
191
|
-
return typeof e == "string" ? e : typeof e == "number" && !
|
|
179
|
+
function He(e) {
|
|
180
|
+
return typeof e == "string" ? e : typeof e == "number" && !le(e) ? `${e}` : "";
|
|
192
181
|
}
|
|
193
|
-
function
|
|
194
|
-
return e ?
|
|
182
|
+
function te(e, t, s) {
|
|
183
|
+
return e ? Ae(t, s) : O(s, t);
|
|
195
184
|
}
|
|
196
|
-
function
|
|
185
|
+
function k(e) {
|
|
197
186
|
return e.message || /* istanbul ignore next */
|
|
198
187
|
String(e);
|
|
199
188
|
}
|
|
200
|
-
let
|
|
201
|
-
const
|
|
189
|
+
let Pe = 0;
|
|
190
|
+
const We = {
|
|
202
191
|
provide() {
|
|
203
192
|
return {
|
|
204
193
|
// Enable access to the instance of root component of vue-treeselect
|
|
@@ -429,7 +418,7 @@ const et = {
|
|
|
429
418
|
*/
|
|
430
419
|
instanceId: {
|
|
431
420
|
// Add two trailing "$" to distinguish from explictly specified ids.
|
|
432
|
-
default: () => `${
|
|
421
|
+
default: () => `${Pe++}$$`,
|
|
433
422
|
type: [String, Number]
|
|
434
423
|
},
|
|
435
424
|
/**
|
|
@@ -525,7 +514,7 @@ const et = {
|
|
|
525
514
|
*/
|
|
526
515
|
normalizer: {
|
|
527
516
|
type: Function,
|
|
528
|
-
default:
|
|
517
|
+
default: Ne
|
|
529
518
|
},
|
|
530
519
|
/**
|
|
531
520
|
* By default (`auto`), the menu will open below the control. If there is not
|
|
@@ -543,7 +532,7 @@ const et = {
|
|
|
543
532
|
type: String,
|
|
544
533
|
default: "auto",
|
|
545
534
|
validator(e) {
|
|
546
|
-
return
|
|
535
|
+
return O(["auto", "top", "bottom", "above", "below"], e);
|
|
547
536
|
}
|
|
548
537
|
},
|
|
549
538
|
/**
|
|
@@ -633,9 +622,9 @@ const et = {
|
|
|
633
622
|
*/
|
|
634
623
|
showCountOf: {
|
|
635
624
|
type: String,
|
|
636
|
-
default:
|
|
625
|
+
default: E,
|
|
637
626
|
validator(e) {
|
|
638
|
-
return
|
|
627
|
+
return O([E, w, C, L], e);
|
|
639
628
|
}
|
|
640
629
|
},
|
|
641
630
|
/**
|
|
@@ -654,9 +643,9 @@ const et = {
|
|
|
654
643
|
*/
|
|
655
644
|
sortValueBy: {
|
|
656
645
|
type: String,
|
|
657
|
-
default:
|
|
646
|
+
default: X,
|
|
658
647
|
validator(e) {
|
|
659
|
-
return
|
|
648
|
+
return O([X, G, J], e);
|
|
660
649
|
}
|
|
661
650
|
},
|
|
662
651
|
/**
|
|
@@ -684,9 +673,9 @@ const et = {
|
|
|
684
673
|
*/
|
|
685
674
|
valueConsistsOf: {
|
|
686
675
|
type: String,
|
|
687
|
-
default:
|
|
676
|
+
default: M,
|
|
688
677
|
validator(e) {
|
|
689
|
-
return
|
|
678
|
+
return O([V, M, B, z], e);
|
|
690
679
|
}
|
|
691
680
|
},
|
|
692
681
|
/**
|
|
@@ -740,7 +729,7 @@ const et = {
|
|
|
740
729
|
selectedNodeMap: S()
|
|
741
730
|
},
|
|
742
731
|
// States of root options.
|
|
743
|
-
rootOptionsStates:
|
|
732
|
+
rootOptionsStates: F(),
|
|
744
733
|
localSearch: {
|
|
745
734
|
// Has user entered any query to search local options?
|
|
746
735
|
active: !1,
|
|
@@ -767,27 +756,27 @@ const et = {
|
|
|
767
756
|
*/
|
|
768
757
|
internalValue() {
|
|
769
758
|
let e;
|
|
770
|
-
if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf ===
|
|
759
|
+
if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === V)
|
|
771
760
|
e = this.forest.selectedNodeIds.slice();
|
|
772
|
-
else if (this.valueConsistsOf ===
|
|
761
|
+
else if (this.valueConsistsOf === M)
|
|
773
762
|
e = this.forest.selectedNodeIds.filter((t) => {
|
|
774
763
|
const s = this.getNode(t);
|
|
775
764
|
return s.isRootNode ? !0 : !this.isSelected(s.parentNode);
|
|
776
765
|
});
|
|
777
|
-
else if (this.valueConsistsOf ===
|
|
766
|
+
else if (this.valueConsistsOf === B)
|
|
778
767
|
e = this.forest.selectedNodeIds.filter((t) => {
|
|
779
768
|
const s = this.getNode(t);
|
|
780
769
|
return s.isLeaf ? !0 : s.children.length === 0;
|
|
781
770
|
});
|
|
782
|
-
else if (this.valueConsistsOf ===
|
|
771
|
+
else if (this.valueConsistsOf === z) {
|
|
783
772
|
const t = [];
|
|
784
773
|
e = this.forest.selectedNodeIds.slice(), this.selectedNodes.forEach((s) => {
|
|
785
774
|
s.ancestors.forEach((n) => {
|
|
786
|
-
|
|
775
|
+
O(t, n.id) || O(e, n.id) || t.push(n.id);
|
|
787
776
|
});
|
|
788
777
|
}), e.push(...t);
|
|
789
778
|
}
|
|
790
|
-
return this.sortValueBy ===
|
|
779
|
+
return this.sortValueBy === G ? e.sort((t, s) => ke(this.getNode(t), this.getNode(s))) : this.sortValueBy === J && e.sort((t, s) => de(this.getNode(t), this.getNode(s))), e;
|
|
791
780
|
},
|
|
792
781
|
/**
|
|
793
782
|
* Has any option been selected?
|
|
@@ -857,7 +846,7 @@ const et = {
|
|
|
857
846
|
this.initialize();
|
|
858
847
|
},
|
|
859
848
|
internalValue(e, t) {
|
|
860
|
-
|
|
849
|
+
A(e, t) && this.$emit("input", this.getValue(), this.getInstanceId());
|
|
861
850
|
},
|
|
862
851
|
matchKeys() {
|
|
863
852
|
this.initialize();
|
|
@@ -877,22 +866,22 @@ const et = {
|
|
|
877
866
|
},
|
|
878
867
|
value() {
|
|
879
868
|
const e = this.extractCheckedNodeIdsFromValue();
|
|
880
|
-
|
|
869
|
+
A(e, this.internalValue) && this.fixSelectedNodeIds(e);
|
|
881
870
|
}
|
|
882
871
|
},
|
|
883
872
|
methods: {
|
|
884
873
|
verifyProps() {
|
|
885
|
-
|
|
874
|
+
_(
|
|
886
875
|
() => this.async ? this.searchable : !0,
|
|
887
876
|
() => 'For async search mode, the value of "searchable" prop must be true.'
|
|
888
|
-
), this.options == null && !this.loadOptions &&
|
|
877
|
+
), this.options == null && !this.loadOptions && _(
|
|
889
878
|
() => !1,
|
|
890
879
|
() => 'Are you meant to dynamically load options? You need to use "loadOptions" prop.'
|
|
891
|
-
), this.flat &&
|
|
880
|
+
), this.flat && _(
|
|
892
881
|
() => this.multiple,
|
|
893
882
|
() => 'You are using flat mode. But you forgot to add "multiple=true"?'
|
|
894
883
|
), this.flat || ["autoSelectAncestors", "autoSelectDescendants", "autoDeselectAncestors", "autoDeselectDescendants"].forEach((t) => {
|
|
895
|
-
|
|
884
|
+
_(
|
|
896
885
|
() => !this[t],
|
|
897
886
|
() => `"${t}" only applies to flat mode.`
|
|
898
887
|
);
|
|
@@ -919,7 +908,7 @@ const et = {
|
|
|
919
908
|
return this.multiple ? e : e[0];
|
|
920
909
|
},
|
|
921
910
|
getNode(e) {
|
|
922
|
-
return
|
|
911
|
+
return _(
|
|
923
912
|
() => e != null,
|
|
924
913
|
() => `Invalid node id: ${e}`
|
|
925
914
|
), e == null ? null : e in this.forest.nodeMap ? this.forest.nodeMap[e] : this.createFallbackNode(e);
|
|
@@ -950,44 +939,45 @@ const et = {
|
|
|
950
939
|
if (this.valueFormat === "id")
|
|
951
940
|
return t;
|
|
952
941
|
const s = this.multiple ? Array.isArray(this.value) ? this.value : [] : this.value ? [this.value] : [];
|
|
953
|
-
return
|
|
942
|
+
return ce(s, (i) => i && this.enhancedNormalizer(i).id === e) || t;
|
|
954
943
|
},
|
|
955
944
|
fixSelectedNodeIds(e) {
|
|
956
945
|
let t = [];
|
|
957
|
-
if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf ===
|
|
946
|
+
if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === V)
|
|
958
947
|
t = e;
|
|
959
|
-
else if (this.valueConsistsOf ===
|
|
948
|
+
else if (this.valueConsistsOf === M)
|
|
960
949
|
e.forEach((n) => {
|
|
961
950
|
t.push(n);
|
|
962
951
|
const i = this.getNode(n);
|
|
963
|
-
i.isBranch && this.traverseDescendantsBFS(i, (
|
|
964
|
-
t.push(
|
|
952
|
+
i.isBranch && this.traverseDescendantsBFS(i, (o) => {
|
|
953
|
+
t.push(o.id);
|
|
965
954
|
});
|
|
966
955
|
});
|
|
967
|
-
else if (this.valueConsistsOf ===
|
|
956
|
+
else if (this.valueConsistsOf === B) {
|
|
968
957
|
const n = S(), i = e.slice();
|
|
969
958
|
for (; i.length; ) {
|
|
970
|
-
const
|
|
971
|
-
t.push(
|
|
959
|
+
const o = i.shift(), l = this.getNode(o);
|
|
960
|
+
t.push(o), !l.isRootNode && (l.parentNode.id in n || (n[l.parentNode.id] = l.parentNode.children.length), --n[l.parentNode.id] === 0 && i.push(l.parentNode.id));
|
|
972
961
|
}
|
|
973
|
-
} else if (this.valueConsistsOf ===
|
|
974
|
-
const n = S(), i = e.filter((
|
|
975
|
-
const
|
|
976
|
-
return
|
|
962
|
+
} else if (this.valueConsistsOf === z) {
|
|
963
|
+
const n = S(), i = e.filter((o) => {
|
|
964
|
+
const l = this.getNode(o);
|
|
965
|
+
return l.isLeaf || l.children.length === 0;
|
|
977
966
|
});
|
|
978
967
|
for (; i.length; ) {
|
|
979
|
-
const
|
|
980
|
-
t.push(
|
|
968
|
+
const o = i.shift(), l = this.getNode(o);
|
|
969
|
+
t.push(o), !l.isRootNode && (l.parentNode.id in n || (n[l.parentNode.id] = l.parentNode.children.length), --n[l.parentNode.id] === 0 && i.push(l.parentNode.id));
|
|
981
970
|
}
|
|
982
971
|
}
|
|
983
|
-
|
|
972
|
+
A(this.forest.selectedNodeIds, t) && (this.forest.selectedNodeIds = t), this.buildForestState();
|
|
984
973
|
},
|
|
985
974
|
keepDataOfSelectedNodes(e) {
|
|
986
975
|
this.forest.selectedNodeIds.forEach((t) => {
|
|
987
976
|
if (!e[t]) return;
|
|
988
|
-
const s =
|
|
977
|
+
const s = {
|
|
978
|
+
...e[t],
|
|
989
979
|
isFallbackNode: !0
|
|
990
|
-
}
|
|
980
|
+
};
|
|
991
981
|
this.$set(this.forest.nodeMap, t, s);
|
|
992
982
|
});
|
|
993
983
|
},
|
|
@@ -1035,7 +1025,7 @@ const et = {
|
|
|
1035
1025
|
blurInput() {
|
|
1036
1026
|
this.getInput().blur();
|
|
1037
1027
|
},
|
|
1038
|
-
handleMouseDown:
|
|
1028
|
+
handleMouseDown: N(function(t) {
|
|
1039
1029
|
if (t.preventDefault(), t.stopPropagation(), this.disabled) return;
|
|
1040
1030
|
this.getValueContainer().$el.contains(t.target) && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused) && this.openMenu(), this._blurOnSelect ? this.blurInput() : this.focusInput(), this.resetFlags();
|
|
1041
1031
|
}),
|
|
@@ -1048,15 +1038,15 @@ const et = {
|
|
|
1048
1038
|
return this.localSearch.active = !1, t();
|
|
1049
1039
|
this.localSearch.active = !0, this.localSearch.noResults = !0, this.traverseAllNodesDFS((i) => {
|
|
1050
1040
|
i.isBranch && (i.isExpandedOnSearch = !1, i.showAllChildrenOnSearch = !1, i.isMatched = !1, i.hasMatchedDescendants = !1, this.$set(this.localSearch.countMap, i.id, {
|
|
1051
|
-
[
|
|
1052
|
-
[
|
|
1053
|
-
[
|
|
1054
|
-
[
|
|
1041
|
+
[E]: 0,
|
|
1042
|
+
[w]: 0,
|
|
1043
|
+
[C]: 0,
|
|
1044
|
+
[L]: 0
|
|
1055
1045
|
}));
|
|
1056
1046
|
});
|
|
1057
1047
|
const s = e.trim().toLocaleLowerCase(), n = s.replace(/\s+/g, " ").split(" ");
|
|
1058
1048
|
this.traverseAllNodesDFS((i) => {
|
|
1059
|
-
this.searchNested && n.length > 1 ? i.isMatched = n.every((
|
|
1049
|
+
this.searchNested && n.length > 1 ? i.isMatched = n.every((o) => te(!1, o, i.nestedSearchLabel)) : i.isMatched = this.matchKeys.some((o) => te(!this.disableFuzzyMatching, s, i.lowerCased[o])), i.isMatched && (this.localSearch.noResults = !1, i.ancestors.forEach((o) => this.localSearch.countMap[o.id][w]++), i.isLeaf && i.ancestors.forEach((o) => this.localSearch.countMap[o.id][L]++), i.parentNode !== b && (this.localSearch.countMap[i.parentNode.id][E] += 1, i.isLeaf && (this.localSearch.countMap[i.parentNode.id][C] += 1))), (i.isMatched || i.isBranch && i.isExpandedOnSearch) && i.parentNode !== b && (i.parentNode.isExpandedOnSearch = !0, i.parentNode.hasMatchedDescendants = !0);
|
|
1060
1050
|
}), t();
|
|
1061
1051
|
},
|
|
1062
1052
|
handleRemoteSearch() {
|
|
@@ -1066,7 +1056,7 @@ const et = {
|
|
|
1066
1056
|
if ((e === "" || this.cacheOptions) && t.isLoaded)
|
|
1067
1057
|
return s();
|
|
1068
1058
|
this.callLoadOptionsProp({
|
|
1069
|
-
action:
|
|
1059
|
+
action: ze,
|
|
1070
1060
|
args: { searchQuery: e },
|
|
1071
1061
|
isPending() {
|
|
1072
1062
|
return t.isLoading;
|
|
@@ -1078,7 +1068,7 @@ const et = {
|
|
|
1078
1068
|
t.isLoaded = !0, t.options = n, this.trigger.searchQuery === e && s();
|
|
1079
1069
|
},
|
|
1080
1070
|
fail: (n) => {
|
|
1081
|
-
t.loadingError =
|
|
1071
|
+
t.loadingError = k(n);
|
|
1082
1072
|
},
|
|
1083
1073
|
end: () => {
|
|
1084
1074
|
t.isLoading = !1;
|
|
@@ -1086,9 +1076,10 @@ const et = {
|
|
|
1086
1076
|
});
|
|
1087
1077
|
},
|
|
1088
1078
|
getRemoteSearchEntry() {
|
|
1089
|
-
const { searchQuery: e } = this.trigger, t = this.remoteSearch[e] ||
|
|
1079
|
+
const { searchQuery: e } = this.trigger, t = this.remoteSearch[e] || {
|
|
1080
|
+
...F(),
|
|
1090
1081
|
options: []
|
|
1091
|
-
}
|
|
1082
|
+
};
|
|
1092
1083
|
if (this.$watch(
|
|
1093
1084
|
() => t.options,
|
|
1094
1085
|
() => {
|
|
@@ -1123,8 +1114,8 @@ const et = {
|
|
|
1123
1114
|
const s = this.menu.current;
|
|
1124
1115
|
if (s != null && s in this.forest.nodeMap && (this.forest.nodeMap[s].isHighlighted = !1), this.menu.current = e.id, e.isHighlighted = !0, this.menu.isOpen && t) {
|
|
1125
1116
|
const n = () => {
|
|
1126
|
-
const i = this.getMenu(),
|
|
1127
|
-
|
|
1117
|
+
const i = this.getMenu(), o = i.querySelector(`.vue-treeselect__option[data-id="${e.id}"]`);
|
|
1118
|
+
o && Ce(i, o);
|
|
1128
1119
|
};
|
|
1129
1120
|
this.getMenu() ? n() : this.$nextTick(n);
|
|
1130
1121
|
}
|
|
@@ -1152,7 +1143,7 @@ const et = {
|
|
|
1152
1143
|
},
|
|
1153
1144
|
highlightLastOption() {
|
|
1154
1145
|
if (!this.hasVisibleOptions) return;
|
|
1155
|
-
const e =
|
|
1146
|
+
const e = Y(this.visibleOptionIds);
|
|
1156
1147
|
this.setCurrentHighlightedOption(this.getNode(e));
|
|
1157
1148
|
},
|
|
1158
1149
|
resetSearchQuery() {
|
|
@@ -1178,56 +1169,61 @@ const et = {
|
|
|
1178
1169
|
}), this.forest.selectedNodeMap = e;
|
|
1179
1170
|
const t = S();
|
|
1180
1171
|
this.multiple && (this.traverseAllNodesByIndex((s) => {
|
|
1181
|
-
t[s.id] =
|
|
1172
|
+
t[s.id] = q;
|
|
1182
1173
|
}), this.selectedNodes.forEach((s) => {
|
|
1183
|
-
t[s.id] =
|
|
1184
|
-
this.isSelected(n) || (t[n.id] =
|
|
1174
|
+
t[s.id] = he, !this.flat && !this.disableBranchNodes && s.ancestors.forEach((n) => {
|
|
1175
|
+
this.isSelected(n) || (t[n.id] = ue);
|
|
1185
1176
|
});
|
|
1186
1177
|
})), this.forest.checkedStateMap = t;
|
|
1187
1178
|
},
|
|
1188
1179
|
enhancedNormalizer(e) {
|
|
1189
|
-
return
|
|
1180
|
+
return {
|
|
1181
|
+
...e,
|
|
1182
|
+
...this.normalizer(e, this.getInstanceId())
|
|
1183
|
+
};
|
|
1190
1184
|
},
|
|
1191
1185
|
normalize(e, t, s) {
|
|
1192
|
-
let n = t.map((i) => [this.enhancedNormalizer(i), i]).map(([i,
|
|
1186
|
+
let n = t.map((i) => [this.enhancedNormalizer(i), i]).map(([i, o], l) => {
|
|
1193
1187
|
this.checkDuplication(i), this.verifyNodeShape(i);
|
|
1194
|
-
const { id:
|
|
1195
|
-
(
|
|
1196
|
-
|
|
1188
|
+
const { id: u, label: f, children: h, isDefaultExpanded: g } = i, p = e === b, y = p ? 0 : e.level + 1, x = Array.isArray(h) || h === null, $ = !x, U = !!i.isDisabled || !this.flat && !p && e.isDisabled, _e = !!i.isNew, I = this.matchKeys.reduce(
|
|
1189
|
+
(c, T) => ({
|
|
1190
|
+
...c,
|
|
1191
|
+
[T]: He(i[T]).toLocaleLowerCase()
|
|
1197
1192
|
}),
|
|
1198
1193
|
{}
|
|
1199
|
-
),
|
|
1200
|
-
if (this.$set(
|
|
1201
|
-
const
|
|
1202
|
-
this.$set(
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
[
|
|
1207
|
-
[
|
|
1208
|
-
[
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1194
|
+
), Oe = p ? I.label : `${e.nestedSearchLabel} ${I.label}`, a = this.$set(this.forest.nodeMap, u, S());
|
|
1195
|
+
if (this.$set(a, "id", u), this.$set(a, "label", f), this.$set(a, "level", y), this.$set(a, "ancestors", p ? [] : [e].concat(e.ancestors)), this.$set(a, "index", (p ? [] : e.index).concat(l)), this.$set(a, "parentNode", e), this.$set(a, "lowerCased", I), this.$set(a, "nestedSearchLabel", Oe), this.$set(a, "isDisabled", U), this.$set(a, "isNew", _e), this.$set(a, "isMatched", !1), this.$set(a, "isHighlighted", !1), this.$set(a, "isBranch", x), this.$set(a, "isLeaf", $), this.$set(a, "isRootNode", p), this.$set(a, "raw", o), x) {
|
|
1196
|
+
const c = Array.isArray(h);
|
|
1197
|
+
this.$set(a, "childrenStates", {
|
|
1198
|
+
...F(),
|
|
1199
|
+
isLoaded: c
|
|
1200
|
+
}), this.$set(a, "isExpanded", typeof g == "boolean" ? g : y < this.defaultExpandLevel), this.$set(a, "hasMatchedDescendants", !1), this.$set(a, "hasDisabledDescendants", !1), this.$set(a, "isExpandedOnSearch", !1), this.$set(a, "showAllChildrenOnSearch", !1), this.$set(a, "count", {
|
|
1201
|
+
[E]: 0,
|
|
1202
|
+
[w]: 0,
|
|
1203
|
+
[C]: 0,
|
|
1204
|
+
[L]: 0
|
|
1205
|
+
}), this.$set(a, "children", c ? this.normalize(a, h, s) : []), g === !0 && a.ancestors.forEach((T) => {
|
|
1206
|
+
T.isExpanded = !0;
|
|
1207
|
+
}), !c && typeof this.loadOptions != "function" ? _(
|
|
1212
1208
|
() => !1,
|
|
1213
1209
|
() => 'Unloaded branch node detected. "loadOptions" prop is required to load its children.'
|
|
1214
|
-
) : !
|
|
1210
|
+
) : !c && a.isExpanded && this.loadChildrenOptions(a);
|
|
1215
1211
|
}
|
|
1216
|
-
if (
|
|
1217
|
-
const
|
|
1218
|
-
|
|
1212
|
+
if (a.ancestors.forEach((c) => c.count[w]++), $ && a.ancestors.forEach((c) => c.count[L]++), p || (e.count[E] += 1, $ && (e.count[C] += 1), U && (e.hasDisabledDescendants = !0)), s && s[u]) {
|
|
1213
|
+
const c = s[u];
|
|
1214
|
+
a.isMatched = c.isMatched, a.showAllChildrenOnSearch = c.showAllChildrenOnSearch, a.isHighlighted = c.isHighlighted, c.isBranch && a.isBranch && (a.isExpanded = c.isExpanded, a.isExpandedOnSearch = c.isExpandedOnSearch, c.childrenStates.isLoaded && !a.childrenStates.isLoaded ? a.isExpanded = !1 : a.childrenStates = { ...c.childrenStates });
|
|
1219
1215
|
}
|
|
1220
|
-
return
|
|
1216
|
+
return a;
|
|
1221
1217
|
});
|
|
1222
1218
|
if (this.branchNodesFirst) {
|
|
1223
|
-
const i = n.filter((
|
|
1224
|
-
n = i.concat(
|
|
1219
|
+
const i = n.filter((l) => l.isBranch), o = n.filter((l) => l.isLeaf);
|
|
1220
|
+
n = i.concat(o);
|
|
1225
1221
|
}
|
|
1226
1222
|
return n;
|
|
1227
1223
|
},
|
|
1228
1224
|
loadRootOptions() {
|
|
1229
1225
|
this.callLoadOptionsProp({
|
|
1230
|
-
action:
|
|
1226
|
+
action: Ve,
|
|
1231
1227
|
isPending: () => this.rootOptionsStates.isLoading,
|
|
1232
1228
|
start: () => {
|
|
1233
1229
|
this.rootOptionsStates.isLoading = !0, this.rootOptionsStates.loadingError = "";
|
|
@@ -1238,7 +1234,7 @@ const et = {
|
|
|
1238
1234
|
});
|
|
1239
1235
|
},
|
|
1240
1236
|
fail: (e) => {
|
|
1241
|
-
this.rootOptionsStates.loadingError =
|
|
1237
|
+
this.rootOptionsStates.loadingError = k(e);
|
|
1242
1238
|
},
|
|
1243
1239
|
end: () => {
|
|
1244
1240
|
this.rootOptionsStates.isLoading = !1;
|
|
@@ -1248,7 +1244,7 @@ const et = {
|
|
|
1248
1244
|
loadChildrenOptions(e) {
|
|
1249
1245
|
const { id: t, raw: s } = e;
|
|
1250
1246
|
this.callLoadOptionsProp({
|
|
1251
|
-
action:
|
|
1247
|
+
action: Be,
|
|
1252
1248
|
args: {
|
|
1253
1249
|
// We always pass the raw node instead of the normalized node to any
|
|
1254
1250
|
// callback provided by the user of this component.
|
|
@@ -1264,45 +1260,45 @@ const et = {
|
|
|
1264
1260
|
this.getNode(t).childrenStates.isLoaded = !0;
|
|
1265
1261
|
},
|
|
1266
1262
|
fail: (n) => {
|
|
1267
|
-
this.getNode(t).childrenStates.loadingError =
|
|
1263
|
+
this.getNode(t).childrenStates.loadingError = k(n);
|
|
1268
1264
|
},
|
|
1269
1265
|
end: () => {
|
|
1270
1266
|
this.getNode(t).childrenStates.isLoading = !1;
|
|
1271
1267
|
}
|
|
1272
1268
|
});
|
|
1273
1269
|
},
|
|
1274
|
-
callLoadOptionsProp({ action: e, args: t, isPending: s, start: n, succeed: i, fail:
|
|
1270
|
+
callLoadOptionsProp({ action: e, args: t, isPending: s, start: n, succeed: i, fail: o, end: l }) {
|
|
1275
1271
|
if (!this.loadOptions || s())
|
|
1276
1272
|
return;
|
|
1277
1273
|
n();
|
|
1278
|
-
const
|
|
1279
|
-
|
|
1280
|
-
}),
|
|
1274
|
+
const u = Ee((h, g) => {
|
|
1275
|
+
h ? o(h) : i(g), l();
|
|
1276
|
+
}), f = this.loadOptions({
|
|
1281
1277
|
id: this.getInstanceId(),
|
|
1282
1278
|
instanceId: this.getInstanceId(),
|
|
1283
|
-
action: e
|
|
1284
|
-
|
|
1285
|
-
callback:
|
|
1286
|
-
})
|
|
1287
|
-
|
|
1279
|
+
action: e,
|
|
1280
|
+
...t,
|
|
1281
|
+
callback: u
|
|
1282
|
+
});
|
|
1283
|
+
se(f) && f.then(
|
|
1288
1284
|
() => {
|
|
1289
|
-
|
|
1285
|
+
u();
|
|
1290
1286
|
},
|
|
1291
|
-
(
|
|
1292
|
-
|
|
1287
|
+
(h) => {
|
|
1288
|
+
u(h);
|
|
1293
1289
|
}
|
|
1294
|
-
).catch((
|
|
1295
|
-
console.error(
|
|
1290
|
+
).catch((h) => {
|
|
1291
|
+
console.error(h);
|
|
1296
1292
|
});
|
|
1297
1293
|
},
|
|
1298
1294
|
checkDuplication(e) {
|
|
1299
|
-
|
|
1295
|
+
_(
|
|
1300
1296
|
() => !(e.id in this.forest.nodeMap && !this.forest.nodeMap[e.id].isFallbackNode),
|
|
1301
1297
|
() => `Detected duplicate presence of node id ${JSON.stringify(e.id)}. Their labels are "${this.forest.nodeMap[e.id].label}" and "${e.label}" respectively.`
|
|
1302
1298
|
);
|
|
1303
1299
|
},
|
|
1304
1300
|
verifyNodeShape(e) {
|
|
1305
|
-
|
|
1301
|
+
_(
|
|
1306
1302
|
() => !(e.children === void 0 && e.isBranch === !0),
|
|
1307
1303
|
() => "Are you meant to declare an unloaded branch node? `isBranch: true` is no longer supported, please use `children: null` instead."
|
|
1308
1304
|
);
|
|
@@ -1311,7 +1307,7 @@ const et = {
|
|
|
1311
1307
|
if (this.disabled || e.isDisabled)
|
|
1312
1308
|
return;
|
|
1313
1309
|
this.single && this.clear();
|
|
1314
|
-
const t = this.multiple && !this.flat ? this.forest.checkedStateMap[e.id] ===
|
|
1310
|
+
const t = this.multiple && !this.flat ? this.forest.checkedStateMap[e.id] === q : !this.isSelected(e);
|
|
1315
1311
|
t ? this._selectNode(e) : this._deselectNode(e), this.buildForestState(), t ? this.$emit("select", e.raw, this.getInstanceId()) : this.$emit("deselect", e.raw, this.getInstanceId()), this.localSearch.active && t && (this.single || this.clearOnSelect) && this.resetSearchQuery(), this.single && this.closeOnSelect && (this.closeMenu(), this.searchable && (this._blurOnSelect = !0));
|
|
1316
1312
|
},
|
|
1317
1313
|
clear() {
|
|
@@ -1368,12 +1364,12 @@ const et = {
|
|
|
1368
1364
|
this.forest.selectedNodeIds.push(e.id), this.forest.selectedNodeMap[e.id] = !0;
|
|
1369
1365
|
},
|
|
1370
1366
|
removeValue(e) {
|
|
1371
|
-
|
|
1367
|
+
ne(this.forest.selectedNodeIds, e.id), delete this.forest.selectedNodeMap[e.id];
|
|
1372
1368
|
},
|
|
1373
1369
|
removeLastValue() {
|
|
1374
1370
|
if (!this.hasValue) return;
|
|
1375
1371
|
if (this.single) return this.clear();
|
|
1376
|
-
const e =
|
|
1372
|
+
const e = Y(this.internalValue), t = this.getNode(e);
|
|
1377
1373
|
this.select(t);
|
|
1378
1374
|
},
|
|
1379
1375
|
saveMenuScrollPosition() {
|
|
@@ -1395,10 +1391,10 @@ const et = {
|
|
|
1395
1391
|
this.toggleClickOutsideEvent(!1);
|
|
1396
1392
|
}
|
|
1397
1393
|
};
|
|
1398
|
-
function
|
|
1399
|
-
return typeof e == "string" ? e : e != null && !
|
|
1394
|
+
function je(e) {
|
|
1395
|
+
return typeof e == "string" ? e : e != null && !le(e) ? JSON.stringify(e) : "";
|
|
1400
1396
|
}
|
|
1401
|
-
const
|
|
1397
|
+
const Qe = {
|
|
1402
1398
|
name: "VueTreeSelectHiddenFields",
|
|
1403
1399
|
functional: !0,
|
|
1404
1400
|
inject: ["instance"],
|
|
@@ -1407,8 +1403,8 @@ const st = {
|
|
|
1407
1403
|
instance: s
|
|
1408
1404
|
} = t.injections;
|
|
1409
1405
|
if (!s.name || s.disabled || !s.hasValue) return null;
|
|
1410
|
-
let n = s.internalValue.map(
|
|
1411
|
-
return s.multiple && s.joinValues && (n = [n.join(s.delimiter)]), n.map((i,
|
|
1406
|
+
let n = s.internalValue.map(je);
|
|
1407
|
+
return s.multiple && s.joinValues && (n = [n.join(s.delimiter)]), n.map((i, o) => r("input", {
|
|
1412
1408
|
attrs: {
|
|
1413
1409
|
type: "hidden",
|
|
1414
1410
|
name: s.name
|
|
@@ -1416,61 +1412,23 @@ const st = {
|
|
|
1416
1412
|
domProps: {
|
|
1417
1413
|
value: i
|
|
1418
1414
|
},
|
|
1419
|
-
key: `hidden-field-${
|
|
1415
|
+
key: `hidden-field-${o}`
|
|
1420
1416
|
}));
|
|
1421
1417
|
}
|
|
1422
|
-
},
|
|
1423
|
-
var
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1418
|
+
}, Ke = null, qe = null;
|
|
1419
|
+
var Ue = /* @__PURE__ */ m(
|
|
1420
|
+
Qe,
|
|
1421
|
+
Ke,
|
|
1422
|
+
qe,
|
|
1427
1423
|
!1,
|
|
1428
1424
|
null,
|
|
1429
1425
|
null
|
|
1430
1426
|
);
|
|
1431
|
-
const
|
|
1432
|
-
function lt(e) {
|
|
1433
|
-
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1434
|
-
}
|
|
1435
|
-
var j, le;
|
|
1436
|
-
function at() {
|
|
1437
|
-
if (le) return j;
|
|
1438
|
-
le = 1;
|
|
1439
|
-
function e() {
|
|
1440
|
-
return e = Object.assign ? Object.assign.bind() : function(a) {
|
|
1441
|
-
for (var c, h = 1; h < arguments.length; h++) for (var o in c = arguments[h], c) Object.prototype.hasOwnProperty.call(c, o) && (a[o] = c[o]);
|
|
1442
|
-
return a;
|
|
1443
|
-
}, e.apply(this, arguments);
|
|
1444
|
-
}
|
|
1445
|
-
var t = ["attrs", "props", "domProps"], s = ["class", "style", "directives"], n = ["on", "nativeOn"], i = function(a) {
|
|
1446
|
-
return a.reduce(function(c, h) {
|
|
1447
|
-
for (var o in h) if (!c[o]) c[o] = h[o];
|
|
1448
|
-
else if (t.indexOf(o) !== -1) c[o] = e({}, c[o], h[o]);
|
|
1449
|
-
else if (s.indexOf(o) !== -1) {
|
|
1450
|
-
var g = c[o] instanceof Array ? c[o] : [c[o]], p = h[o] instanceof Array ? h[o] : [h[o]];
|
|
1451
|
-
c[o] = [].concat(g, p);
|
|
1452
|
-
} else if (n.indexOf(o) !== -1)
|
|
1453
|
-
for (var f in h[o]) if (c[o][f]) {
|
|
1454
|
-
var M = c[o][f] instanceof Array ? c[o][f] : [c[o][f]], T = h[o][f] instanceof Array ? h[o][f] : [h[o][f]];
|
|
1455
|
-
c[o][f] = [].concat(M, T);
|
|
1456
|
-
} else c[o][f] = h[o][f];
|
|
1457
|
-
else if (o === "hook") for (var y in h[o]) c[o][y] = c[o][y] ? l(c[o][y], h[o][y]) : h[o][y];
|
|
1458
|
-
else c[o] = h[o];
|
|
1459
|
-
return c;
|
|
1460
|
-
}, {});
|
|
1461
|
-
}, l = function(a, c) {
|
|
1462
|
-
return function() {
|
|
1463
|
-
a && a.apply(this, arguments), c && c.apply(this, arguments);
|
|
1464
|
-
};
|
|
1465
|
-
};
|
|
1466
|
-
return j = i, j;
|
|
1467
|
-
}
|
|
1468
|
-
var ct = at();
|
|
1469
|
-
const V = /* @__PURE__ */ lt(ct), ut = [m.ENTER, m.END, m.HOME, m.ARROW_LEFT, m.ARROW_UP, m.ARROW_RIGHT, m.ARROW_DOWN], ht = {
|
|
1427
|
+
const Ye = Ue.exports, Xe = [d.ENTER, d.END, d.HOME, d.ARROW_LEFT, d.ARROW_UP, d.ARROW_RIGHT, d.ARROW_DOWN], Ge = {
|
|
1470
1428
|
name: "VueTreeSelectInput",
|
|
1471
1429
|
inject: ["instance"],
|
|
1472
1430
|
data: () => ({
|
|
1473
|
-
inputWidth:
|
|
1431
|
+
inputWidth: Z,
|
|
1474
1432
|
value: ""
|
|
1475
1433
|
}),
|
|
1476
1434
|
computed: {
|
|
@@ -1495,7 +1453,7 @@ const V = /* @__PURE__ */ lt(ct), ut = [m.ENTER, m.END, m.HOME, m.ARROW_LEFT, m.
|
|
|
1495
1453
|
}
|
|
1496
1454
|
},
|
|
1497
1455
|
created() {
|
|
1498
|
-
this.debouncedCallback =
|
|
1456
|
+
this.debouncedCallback = we(this.updateSearchQuery, Fe, {
|
|
1499
1457
|
leading: !0,
|
|
1500
1458
|
trailing: !0
|
|
1501
1459
|
});
|
|
@@ -1548,51 +1506,51 @@ const V = /* @__PURE__ */ lt(ct), ut = [m.ENTER, m.END, m.HOME, m.ARROW_LEFT, m.
|
|
|
1548
1506
|
e.keyCode
|
|
1549
1507
|
);
|
|
1550
1508
|
if (!(e.ctrlKey || e.shiftKey || e.altKey || e.metaKey)) {
|
|
1551
|
-
if (!t.menu.isOpen &&
|
|
1509
|
+
if (!t.menu.isOpen && O(Xe, s))
|
|
1552
1510
|
return e.preventDefault(), t.openMenu();
|
|
1553
1511
|
switch (s) {
|
|
1554
|
-
case
|
|
1512
|
+
case d.BACKSPACE: {
|
|
1555
1513
|
t.backspaceRemoves && !this.value.length && t.removeLastValue();
|
|
1556
1514
|
break;
|
|
1557
1515
|
}
|
|
1558
|
-
case
|
|
1516
|
+
case d.ENTER: {
|
|
1559
1517
|
if (e.preventDefault(), t.menu.current === null) return;
|
|
1560
1518
|
const n = t.getNode(t.menu.current);
|
|
1561
1519
|
if (n.isBranch && t.disableBranchNodes) return;
|
|
1562
1520
|
t.select(n);
|
|
1563
1521
|
break;
|
|
1564
1522
|
}
|
|
1565
|
-
case
|
|
1523
|
+
case d.ESCAPE: {
|
|
1566
1524
|
this.value.length ? this.clear() : t.menu.isOpen && t.closeMenu();
|
|
1567
1525
|
break;
|
|
1568
1526
|
}
|
|
1569
|
-
case
|
|
1527
|
+
case d.END: {
|
|
1570
1528
|
e.preventDefault(), t.highlightLastOption();
|
|
1571
1529
|
break;
|
|
1572
1530
|
}
|
|
1573
|
-
case
|
|
1531
|
+
case d.HOME: {
|
|
1574
1532
|
e.preventDefault(), t.highlightFirstOption();
|
|
1575
1533
|
break;
|
|
1576
1534
|
}
|
|
1577
|
-
case
|
|
1535
|
+
case d.ARROW_LEFT: {
|
|
1578
1536
|
const n = t.getNode(t.menu.current);
|
|
1579
1537
|
n.isBranch && t.shouldExpand(n) ? (e.preventDefault(), t.toggleExpanded(n)) : !n.isRootNode && (n.isLeaf || n.isBranch && !t.shouldExpand(n)) && (e.preventDefault(), t.setCurrentHighlightedOption(n.parentNode));
|
|
1580
1538
|
break;
|
|
1581
1539
|
}
|
|
1582
|
-
case
|
|
1540
|
+
case d.ARROW_UP: {
|
|
1583
1541
|
e.preventDefault(), t.highlightPrevOption();
|
|
1584
1542
|
break;
|
|
1585
1543
|
}
|
|
1586
|
-
case
|
|
1544
|
+
case d.ARROW_RIGHT: {
|
|
1587
1545
|
const n = t.getNode(t.menu.current);
|
|
1588
1546
|
n.isBranch && !t.shouldExpand(n) && (e.preventDefault(), t.toggleExpanded(n));
|
|
1589
1547
|
break;
|
|
1590
1548
|
}
|
|
1591
|
-
case
|
|
1549
|
+
case d.ARROW_DOWN: {
|
|
1592
1550
|
e.preventDefault(), t.highlightNextOption();
|
|
1593
1551
|
break;
|
|
1594
1552
|
}
|
|
1595
|
-
case
|
|
1553
|
+
case d.DELETE: {
|
|
1596
1554
|
t.deleteRemoves && !this.value.length && t.removeLastValue();
|
|
1597
1555
|
break;
|
|
1598
1556
|
}
|
|
@@ -1608,18 +1566,18 @@ const V = /* @__PURE__ */ lt(ct), ut = [m.ENTER, m.END, m.HOME, m.ARROW_LEFT, m.
|
|
|
1608
1566
|
const {
|
|
1609
1567
|
instance: e
|
|
1610
1568
|
} = this, t = {}, s = [];
|
|
1611
|
-
return e.searchable && !e.disabled && (s.push(this.renderInput()), this.needAutoSize && s.push(this.renderSizer())), e.searchable ||
|
|
1569
|
+
return e.searchable && !e.disabled && (s.push(this.renderInput()), this.needAutoSize && s.push(this.renderSizer())), e.searchable || K(t, {
|
|
1612
1570
|
on: {
|
|
1613
1571
|
focus: this.onFocus,
|
|
1614
1572
|
blur: this.onBlur,
|
|
1615
1573
|
keydown: this.onKeyDown
|
|
1616
1574
|
},
|
|
1617
1575
|
ref: "input"
|
|
1618
|
-
}), !e.searchable && !e.disabled &&
|
|
1576
|
+
}), !e.searchable && !e.disabled && K(t, {
|
|
1619
1577
|
attrs: {
|
|
1620
1578
|
tabIndex: e.tabIndex
|
|
1621
1579
|
}
|
|
1622
|
-
}), r("div",
|
|
1580
|
+
}), r("div", R([{
|
|
1623
1581
|
class: "vue-treeselect__input-container"
|
|
1624
1582
|
}, t]), [s]);
|
|
1625
1583
|
},
|
|
@@ -1656,7 +1614,7 @@ const V = /* @__PURE__ */ lt(ct), ut = [m.ENTER, m.END, m.HOME, m.ARROW_LEFT, m.
|
|
|
1656
1614
|
}, [this.value]);
|
|
1657
1615
|
},
|
|
1658
1616
|
updateInputWidth() {
|
|
1659
|
-
this.inputWidth = Math.max(
|
|
1617
|
+
this.inputWidth = Math.max(Z, this.$refs.sizer.scrollWidth + 15);
|
|
1660
1618
|
},
|
|
1661
1619
|
updateSearchQuery() {
|
|
1662
1620
|
const {
|
|
@@ -1668,16 +1626,16 @@ const V = /* @__PURE__ */ lt(ct), ut = [m.ENTER, m.END, m.HOME, m.ARROW_LEFT, m.
|
|
|
1668
1626
|
render() {
|
|
1669
1627
|
return this.renderInputContainer();
|
|
1670
1628
|
}
|
|
1671
|
-
},
|
|
1672
|
-
var
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1629
|
+
}, Je = null, Ze = null;
|
|
1630
|
+
var et = /* @__PURE__ */ m(
|
|
1631
|
+
Ge,
|
|
1632
|
+
Je,
|
|
1633
|
+
Ze,
|
|
1676
1634
|
!1,
|
|
1677
1635
|
null,
|
|
1678
1636
|
null
|
|
1679
1637
|
);
|
|
1680
|
-
const
|
|
1638
|
+
const pe = et.exports, tt = {
|
|
1681
1639
|
name: "VueTreeSelectPlaceholder",
|
|
1682
1640
|
inject: ["instance"],
|
|
1683
1641
|
render() {
|
|
@@ -1692,16 +1650,16 @@ const _e = ft.exports, mt = {
|
|
|
1692
1650
|
class: t
|
|
1693
1651
|
}, [e.placeholder]);
|
|
1694
1652
|
}
|
|
1695
|
-
},
|
|
1696
|
-
var
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1653
|
+
}, st = null, nt = null;
|
|
1654
|
+
var it = /* @__PURE__ */ m(
|
|
1655
|
+
tt,
|
|
1656
|
+
st,
|
|
1657
|
+
nt,
|
|
1700
1658
|
!1,
|
|
1701
1659
|
null,
|
|
1702
1660
|
null
|
|
1703
1661
|
);
|
|
1704
|
-
const
|
|
1662
|
+
const fe = it.exports, rt = {
|
|
1705
1663
|
name: "VueTreeSelectSingleValue",
|
|
1706
1664
|
inject: ["instance"],
|
|
1707
1665
|
methods: {
|
|
@@ -1723,34 +1681,34 @@ const Oe = St.exports, _t = {
|
|
|
1723
1681
|
} = this, s = e.hasValue && !e.trigger.searchQuery;
|
|
1724
1682
|
return t([s && r("div", {
|
|
1725
1683
|
class: "vue-treeselect__single-value"
|
|
1726
|
-
}, [this.renderSingleValueLabel()]), r(
|
|
1684
|
+
}, [this.renderSingleValueLabel()]), r(fe), r(pe, {
|
|
1727
1685
|
ref: "input"
|
|
1728
1686
|
})]);
|
|
1729
1687
|
}
|
|
1730
|
-
},
|
|
1731
|
-
var
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1688
|
+
}, ot = null, lt = null;
|
|
1689
|
+
var at = /* @__PURE__ */ m(
|
|
1690
|
+
rt,
|
|
1691
|
+
ot,
|
|
1692
|
+
lt,
|
|
1735
1693
|
!1,
|
|
1736
1694
|
null,
|
|
1737
1695
|
null
|
|
1738
1696
|
);
|
|
1739
|
-
const
|
|
1697
|
+
const ct = at.exports, ut = {
|
|
1740
1698
|
name: "VueTreeSelectDelete"
|
|
1741
1699
|
};
|
|
1742
|
-
var
|
|
1700
|
+
var ht = function() {
|
|
1743
1701
|
var t = this, s = t._self._c;
|
|
1744
1702
|
return s("svg", { attrs: { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 348.333 348.333" } }, [s("path", { attrs: { d: "M336.559 68.611L231.016 174.165l105.543 105.549c15.699 15.705 15.699 41.145 0 56.85-7.844 7.844-18.128 11.769-28.407 11.769-10.296 0-20.581-3.919-28.419-11.769L174.167 231.003 68.609 336.563c-7.843 7.844-18.128 11.769-28.416 11.769-10.285 0-20.563-3.919-28.413-11.769-15.699-15.698-15.699-41.139 0-56.85l105.54-105.549L11.774 68.611c-15.699-15.699-15.699-41.145 0-56.844 15.696-15.687 41.127-15.687 56.829 0l105.563 105.554L279.721 11.767c15.705-15.687 41.139-15.687 56.832 0 15.705 15.699 15.705 41.145.006 56.844z" } })]);
|
|
1745
|
-
},
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1703
|
+
}, dt = [], pt = /* @__PURE__ */ m(
|
|
1704
|
+
ut,
|
|
1705
|
+
ht,
|
|
1706
|
+
dt,
|
|
1749
1707
|
!1,
|
|
1750
1708
|
null,
|
|
1751
1709
|
null
|
|
1752
1710
|
);
|
|
1753
|
-
const
|
|
1711
|
+
const me = pt.exports, ft = {
|
|
1754
1712
|
name: "VueTreeSelectMultiValueItem",
|
|
1755
1713
|
inject: ["instance"],
|
|
1756
1714
|
props: {
|
|
@@ -1760,7 +1718,7 @@ const ye = Lt.exports, Mt = {
|
|
|
1760
1718
|
}
|
|
1761
1719
|
},
|
|
1762
1720
|
methods: {
|
|
1763
|
-
handleMouseDown:
|
|
1721
|
+
handleMouseDown: N(function() {
|
|
1764
1722
|
const {
|
|
1765
1723
|
instance: t,
|
|
1766
1724
|
node: s
|
|
@@ -1790,18 +1748,18 @@ const ye = Lt.exports, Mt = {
|
|
|
1790
1748
|
class: "vue-treeselect__multi-value-label"
|
|
1791
1749
|
}, [i]), r("span", {
|
|
1792
1750
|
class: "vue-treeselect__icon vue-treeselect__value-remove"
|
|
1793
|
-
}, [r(
|
|
1751
|
+
}, [r(me)])])]);
|
|
1794
1752
|
}
|
|
1795
|
-
},
|
|
1796
|
-
var
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1753
|
+
}, mt = null, gt = null;
|
|
1754
|
+
var St = /* @__PURE__ */ m(
|
|
1755
|
+
ft,
|
|
1756
|
+
mt,
|
|
1757
|
+
gt,
|
|
1800
1758
|
!1,
|
|
1801
1759
|
null,
|
|
1802
1760
|
null
|
|
1803
1761
|
);
|
|
1804
|
-
const
|
|
1762
|
+
const vt = St.exports, _t = {
|
|
1805
1763
|
name: "VueTreeSelectMultiValue",
|
|
1806
1764
|
inject: ["instance"],
|
|
1807
1765
|
methods: {
|
|
@@ -1809,7 +1767,7 @@ const Rt = xt.exports, $t = {
|
|
|
1809
1767
|
const {
|
|
1810
1768
|
instance: e
|
|
1811
1769
|
} = this;
|
|
1812
|
-
return e.internalValue.slice(0, e.limit).map(e.getNode).map((t) => r(
|
|
1770
|
+
return e.internalValue.slice(0, e.limit).map(e.getNode).map((t) => r(vt, {
|
|
1813
1771
|
key: `multi-value-item-${t.id}`,
|
|
1814
1772
|
attrs: {
|
|
1815
1773
|
node: t
|
|
@@ -1832,7 +1790,7 @@ const Rt = xt.exports, $t = {
|
|
|
1832
1790
|
const {
|
|
1833
1791
|
renderValueContainer: e
|
|
1834
1792
|
} = this.$parent;
|
|
1835
|
-
return e(r("transition-group",
|
|
1793
|
+
return e(r("transition-group", R([{
|
|
1836
1794
|
class: "vue-treeselect__multi-value"
|
|
1837
1795
|
}, {
|
|
1838
1796
|
props: {
|
|
@@ -1840,37 +1798,37 @@ const Rt = xt.exports, $t = {
|
|
|
1840
1798
|
name: "vue-treeselect__multi-value-item--transition",
|
|
1841
1799
|
appear: !0
|
|
1842
1800
|
}
|
|
1843
|
-
}]), [this.renderMultiValueItems(), this.renderExceedLimitTip(), r(
|
|
1801
|
+
}]), [this.renderMultiValueItems(), this.renderExceedLimitTip(), r(fe, {
|
|
1844
1802
|
key: "placeholder"
|
|
1845
|
-
}), r(
|
|
1803
|
+
}), r(pe, {
|
|
1846
1804
|
ref: "input",
|
|
1847
1805
|
key: "input"
|
|
1848
1806
|
})]));
|
|
1849
1807
|
}
|
|
1850
|
-
},
|
|
1851
|
-
var
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1808
|
+
}, Ot = null, yt = null;
|
|
1809
|
+
var bt = /* @__PURE__ */ m(
|
|
1810
|
+
_t,
|
|
1811
|
+
Ot,
|
|
1812
|
+
yt,
|
|
1855
1813
|
!1,
|
|
1856
1814
|
null,
|
|
1857
1815
|
null
|
|
1858
1816
|
);
|
|
1859
|
-
const
|
|
1817
|
+
const Nt = bt.exports, Et = {
|
|
1860
1818
|
name: "VueTreeSelectArrow"
|
|
1861
1819
|
};
|
|
1862
|
-
var
|
|
1820
|
+
var wt = function() {
|
|
1863
1821
|
var t = this, s = t._self._c;
|
|
1864
1822
|
return s("svg", { attrs: { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 292.362 292.362" } }, [s("path", { attrs: { d: "M286.935 69.377c-3.614-3.617-7.898-5.424-12.848-5.424H18.274c-4.952 0-9.233 1.807-12.85 5.424C1.807 72.998 0 77.279 0 82.228c0 4.948 1.807 9.229 5.424 12.847l127.907 127.907c3.621 3.617 7.902 5.428 12.85 5.428s9.233-1.811 12.847-5.428L286.935 95.074c3.613-3.617 5.427-7.898 5.427-12.847 0-4.948-1.814-9.229-5.427-12.85z" } })]);
|
|
1865
|
-
},
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1823
|
+
}, Ct = [], Lt = /* @__PURE__ */ m(
|
|
1824
|
+
Et,
|
|
1825
|
+
wt,
|
|
1826
|
+
Ct,
|
|
1869
1827
|
!1,
|
|
1870
1828
|
null,
|
|
1871
1829
|
null
|
|
1872
1830
|
);
|
|
1873
|
-
const
|
|
1831
|
+
const ge = Lt.exports, Tt = {
|
|
1874
1832
|
name: "VueTreeSelectControl",
|
|
1875
1833
|
inject: ["instance"],
|
|
1876
1834
|
computed: {
|
|
@@ -1918,7 +1876,7 @@ const Ne = Ht.exports, Pt = {
|
|
|
1918
1876
|
on: {
|
|
1919
1877
|
mousedown: this.handleMouseDownOnX
|
|
1920
1878
|
}
|
|
1921
|
-
}, [r(
|
|
1879
|
+
}, [r(me, {
|
|
1922
1880
|
class: "vue-treeselect__x"
|
|
1923
1881
|
})]) : null;
|
|
1924
1882
|
},
|
|
@@ -1934,20 +1892,20 @@ const Ne = Ht.exports, Pt = {
|
|
|
1934
1892
|
on: {
|
|
1935
1893
|
mousedown: this.handleMouseDownOnArrow
|
|
1936
1894
|
}
|
|
1937
|
-
}, [r(
|
|
1895
|
+
}, [r(ge, {
|
|
1938
1896
|
class: t
|
|
1939
1897
|
})]) : null;
|
|
1940
1898
|
},
|
|
1941
|
-
handleMouseDownOnX:
|
|
1899
|
+
handleMouseDownOnX: N(function(t) {
|
|
1942
1900
|
t.stopPropagation(), t.preventDefault();
|
|
1943
1901
|
const {
|
|
1944
1902
|
instance: s
|
|
1945
|
-
} = this, n = s.beforeClearAll(), i = (
|
|
1946
|
-
|
|
1903
|
+
} = this, n = s.beforeClearAll(), i = (o) => {
|
|
1904
|
+
o && s.clear();
|
|
1947
1905
|
};
|
|
1948
|
-
|
|
1906
|
+
se(n) ? n.then(i) : setTimeout(() => i(n), 0);
|
|
1949
1907
|
}),
|
|
1950
|
-
handleMouseDownOnArrow:
|
|
1908
|
+
handleMouseDownOnArrow: N(function(t) {
|
|
1951
1909
|
t.preventDefault(), t.stopPropagation();
|
|
1952
1910
|
const {
|
|
1953
1911
|
instance: s
|
|
@@ -1964,7 +1922,7 @@ const Ne = Ht.exports, Pt = {
|
|
|
1964
1922
|
render() {
|
|
1965
1923
|
const {
|
|
1966
1924
|
instance: e
|
|
1967
|
-
} = this, t = e.single ?
|
|
1925
|
+
} = this, t = e.single ? ct : Nt;
|
|
1968
1926
|
return r("div", {
|
|
1969
1927
|
class: "vue-treeselect__control",
|
|
1970
1928
|
on: {
|
|
@@ -1974,16 +1932,16 @@ const Ne = Ht.exports, Pt = {
|
|
|
1974
1932
|
ref: "value-container"
|
|
1975
1933
|
}), this.renderX(), this.renderArrow()]);
|
|
1976
1934
|
}
|
|
1977
|
-
},
|
|
1978
|
-
var
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1935
|
+
}, Mt = null, Dt = null;
|
|
1936
|
+
var Rt = /* @__PURE__ */ m(
|
|
1937
|
+
Tt,
|
|
1938
|
+
Mt,
|
|
1939
|
+
Dt,
|
|
1982
1940
|
!1,
|
|
1983
1941
|
null,
|
|
1984
1942
|
null
|
|
1985
1943
|
);
|
|
1986
|
-
const
|
|
1944
|
+
const xt = Rt.exports, $t = {
|
|
1987
1945
|
name: "VueTreeSelectTip",
|
|
1988
1946
|
functional: !0,
|
|
1989
1947
|
props: {
|
|
@@ -2011,18 +1969,18 @@ const qt = Qt.exports, Kt = {
|
|
|
2011
1969
|
class: `vue-treeselect__tip-text vue-treeselect__${s.type}-tip-text`
|
|
2012
1970
|
}, [n])]);
|
|
2013
1971
|
}
|
|
2014
|
-
},
|
|
2015
|
-
var
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
1972
|
+
}, It = null, At = null;
|
|
1973
|
+
var Vt = /* @__PURE__ */ m(
|
|
1974
|
+
$t,
|
|
1975
|
+
It,
|
|
1976
|
+
At,
|
|
2019
1977
|
!1,
|
|
2020
1978
|
null,
|
|
2021
1979
|
null
|
|
2022
1980
|
);
|
|
2023
|
-
const
|
|
2024
|
-
let
|
|
2025
|
-
const
|
|
1981
|
+
const v = Vt.exports;
|
|
1982
|
+
let H, P, W;
|
|
1983
|
+
const Se = {
|
|
2026
1984
|
name: "VueTreeSelectOption",
|
|
2027
1985
|
inject: ["instance"],
|
|
2028
1986
|
props: {
|
|
@@ -2096,15 +2054,15 @@ const Ee = {
|
|
|
2096
2054
|
on: {
|
|
2097
2055
|
mousedown: this.handleMouseDownOnArrow
|
|
2098
2056
|
}
|
|
2099
|
-
}, [r("transition",
|
|
2057
|
+
}, [r("transition", R([{}, s]), [r(ge, {
|
|
2100
2058
|
class: n
|
|
2101
2059
|
})])]);
|
|
2102
2060
|
}
|
|
2103
2061
|
return (
|
|
2104
2062
|
/* node.isLeaf && */
|
|
2105
|
-
e.hasBranchNodes ? (
|
|
2063
|
+
e.hasBranchNodes ? (H || (H = r("div", {
|
|
2106
2064
|
class: "vue-treeselect__option-arrow-placeholder"
|
|
2107
|
-
}, [" "])),
|
|
2065
|
+
}, [" "])), H) : null
|
|
2108
2066
|
);
|
|
2109
2067
|
},
|
|
2110
2068
|
renderLabelContainer(e) {
|
|
@@ -2130,41 +2088,41 @@ const Ee = {
|
|
|
2130
2088
|
node: t
|
|
2131
2089
|
} = this, s = e.forest.checkedStateMap[t.id], n = {
|
|
2132
2090
|
"vue-treeselect__checkbox": !0,
|
|
2133
|
-
"vue-treeselect__checkbox--checked": s ===
|
|
2134
|
-
"vue-treeselect__checkbox--indeterminate": s ===
|
|
2135
|
-
"vue-treeselect__checkbox--unchecked": s ===
|
|
2091
|
+
"vue-treeselect__checkbox--checked": s === he,
|
|
2092
|
+
"vue-treeselect__checkbox--indeterminate": s === ue,
|
|
2093
|
+
"vue-treeselect__checkbox--unchecked": s === q,
|
|
2136
2094
|
"vue-treeselect__checkbox--disabled": t.isDisabled
|
|
2137
2095
|
};
|
|
2138
|
-
return
|
|
2096
|
+
return P || (P = r("span", {
|
|
2139
2097
|
class: "vue-treeselect__check-mark"
|
|
2140
|
-
})),
|
|
2098
|
+
})), W || (W = r("span", {
|
|
2141
2099
|
class: "vue-treeselect__minus-mark"
|
|
2142
2100
|
})), r("span", {
|
|
2143
2101
|
class: n
|
|
2144
|
-
}, [
|
|
2102
|
+
}, [P, W]);
|
|
2145
2103
|
},
|
|
2146
2104
|
renderLabel() {
|
|
2147
2105
|
const {
|
|
2148
2106
|
instance: e,
|
|
2149
2107
|
node: t
|
|
2150
|
-
} = this, s = t.isBranch && (e.localSearch.active ? e.showCountOnSearchComputed : e.showCount), n = s ? e.localSearch.active ? e.localSearch.countMap[t.id][e.showCountOf] : t.count[e.showCountOf] : NaN, i = "vue-treeselect__label",
|
|
2151
|
-
return
|
|
2108
|
+
} = this, s = t.isBranch && (e.localSearch.active ? e.showCountOnSearchComputed : e.showCount), n = s ? e.localSearch.active ? e.localSearch.countMap[t.id][e.showCountOf] : t.count[e.showCountOf] : NaN, i = "vue-treeselect__label", o = "vue-treeselect__count", l = e.$scopedSlots["option-label"];
|
|
2109
|
+
return l ? l({
|
|
2152
2110
|
node: t,
|
|
2153
2111
|
shouldShowCount: s,
|
|
2154
2112
|
count: n,
|
|
2155
2113
|
labelClassName: i,
|
|
2156
|
-
countClassName:
|
|
2114
|
+
countClassName: o
|
|
2157
2115
|
}) : r("label", {
|
|
2158
2116
|
class: i
|
|
2159
2117
|
}, [t.label, s && r("span", {
|
|
2160
|
-
class:
|
|
2118
|
+
class: o
|
|
2161
2119
|
}, ["(", n, ")"])]);
|
|
2162
2120
|
},
|
|
2163
2121
|
renderSubOptions() {
|
|
2164
2122
|
const {
|
|
2165
2123
|
node: e
|
|
2166
2124
|
} = this;
|
|
2167
|
-
return e.childrenStates.isLoaded ? e.children.map((t) => r(
|
|
2125
|
+
return e.childrenStates.isLoaded ? e.children.map((t) => r(Se, {
|
|
2168
2126
|
attrs: {
|
|
2169
2127
|
node: t
|
|
2170
2128
|
},
|
|
@@ -2176,7 +2134,7 @@ const Ee = {
|
|
|
2176
2134
|
instance: e,
|
|
2177
2135
|
node: t
|
|
2178
2136
|
} = this;
|
|
2179
|
-
return !t.childrenStates.isLoaded || t.children.length ? null : r(
|
|
2137
|
+
return !t.childrenStates.isLoaded || t.children.length ? null : r(v, {
|
|
2180
2138
|
attrs: {
|
|
2181
2139
|
type: "no-children",
|
|
2182
2140
|
icon: "warning"
|
|
@@ -2188,7 +2146,7 @@ const Ee = {
|
|
|
2188
2146
|
instance: e,
|
|
2189
2147
|
node: t
|
|
2190
2148
|
} = this;
|
|
2191
|
-
return t.childrenStates.isLoading ? r(
|
|
2149
|
+
return t.childrenStates.isLoading ? r(v, {
|
|
2192
2150
|
attrs: {
|
|
2193
2151
|
type: "loading",
|
|
2194
2152
|
icon: "loader"
|
|
@@ -2200,7 +2158,7 @@ const Ee = {
|
|
|
2200
2158
|
instance: e,
|
|
2201
2159
|
node: t
|
|
2202
2160
|
} = this;
|
|
2203
|
-
return t.childrenStates.loadingError ? r(
|
|
2161
|
+
return t.childrenStates.loadingError ? r(v, {
|
|
2204
2162
|
attrs: {
|
|
2205
2163
|
type: "error",
|
|
2206
2164
|
icon: "error"
|
|
@@ -2222,21 +2180,21 @@ const Ee = {
|
|
|
2222
2180
|
} = this;
|
|
2223
2181
|
e.target === e.currentTarget && t.setCurrentHighlightedOption(s, !1);
|
|
2224
2182
|
},
|
|
2225
|
-
handleMouseDownOnArrow:
|
|
2183
|
+
handleMouseDownOnArrow: N(function() {
|
|
2226
2184
|
const {
|
|
2227
2185
|
instance: t,
|
|
2228
2186
|
node: s
|
|
2229
2187
|
} = this;
|
|
2230
2188
|
t.toggleExpanded(s);
|
|
2231
2189
|
}),
|
|
2232
|
-
handleMouseDownOnLabelContainer:
|
|
2190
|
+
handleMouseDownOnLabelContainer: N(function() {
|
|
2233
2191
|
const {
|
|
2234
2192
|
instance: t,
|
|
2235
2193
|
node: s
|
|
2236
2194
|
} = this;
|
|
2237
2195
|
s.isBranch && t.disableBranchNodes ? t.toggleExpanded(s) : t.select(s);
|
|
2238
2196
|
}),
|
|
2239
|
-
handleMouseDownOnRetry:
|
|
2197
|
+
handleMouseDownOnRetry: N(function() {
|
|
2240
2198
|
const {
|
|
2241
2199
|
instance: t,
|
|
2242
2200
|
node: s
|
|
@@ -2257,23 +2215,23 @@ const Ee = {
|
|
|
2257
2215
|
};
|
|
2258
2216
|
return r("div", {
|
|
2259
2217
|
class: s
|
|
2260
|
-
}, [this.renderOption(), e.isBranch && r("transition",
|
|
2218
|
+
}, [this.renderOption(), e.isBranch && r("transition", R([{}, n]), [this.renderSubOptionsList()])]);
|
|
2261
2219
|
}
|
|
2262
|
-
},
|
|
2263
|
-
var
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2220
|
+
}, Bt = null, zt = null;
|
|
2221
|
+
var Ft = /* @__PURE__ */ m(
|
|
2222
|
+
Se,
|
|
2223
|
+
Bt,
|
|
2224
|
+
zt,
|
|
2267
2225
|
!1,
|
|
2268
2226
|
null,
|
|
2269
2227
|
null
|
|
2270
2228
|
);
|
|
2271
|
-
const
|
|
2229
|
+
const kt = Ft.exports, Ht = {
|
|
2272
2230
|
top: "top",
|
|
2273
2231
|
bottom: "bottom",
|
|
2274
2232
|
above: "top",
|
|
2275
2233
|
below: "bottom"
|
|
2276
|
-
},
|
|
2234
|
+
}, Pt = {
|
|
2277
2235
|
name: "VueTreeSelectMenu",
|
|
2278
2236
|
inject: ["instance"],
|
|
2279
2237
|
computed: {
|
|
@@ -2361,7 +2319,7 @@ const es = Zt.exports, ts = {
|
|
|
2361
2319
|
} = this;
|
|
2362
2320
|
return r("div", {
|
|
2363
2321
|
class: "vue-treeselect__list"
|
|
2364
|
-
}, [e.forest.normalizedOptions.map((t) => r(
|
|
2322
|
+
}, [e.forest.normalizedOptions.map((t) => r(kt, {
|
|
2365
2323
|
attrs: {
|
|
2366
2324
|
node: t
|
|
2367
2325
|
},
|
|
@@ -2372,7 +2330,7 @@ const es = Zt.exports, ts = {
|
|
|
2372
2330
|
const {
|
|
2373
2331
|
instance: e
|
|
2374
2332
|
} = this;
|
|
2375
|
-
return r(
|
|
2333
|
+
return r(v, {
|
|
2376
2334
|
attrs: {
|
|
2377
2335
|
type: "search-prompt",
|
|
2378
2336
|
icon: "warning"
|
|
@@ -2383,7 +2341,7 @@ const es = Zt.exports, ts = {
|
|
|
2383
2341
|
const {
|
|
2384
2342
|
instance: e
|
|
2385
2343
|
} = this;
|
|
2386
|
-
return r(
|
|
2344
|
+
return r(v, {
|
|
2387
2345
|
attrs: {
|
|
2388
2346
|
type: "loading",
|
|
2389
2347
|
icon: "loader"
|
|
@@ -2394,7 +2352,7 @@ const es = Zt.exports, ts = {
|
|
|
2394
2352
|
const {
|
|
2395
2353
|
instance: e
|
|
2396
2354
|
} = this;
|
|
2397
|
-
return r(
|
|
2355
|
+
return r(v, {
|
|
2398
2356
|
attrs: {
|
|
2399
2357
|
type: "error",
|
|
2400
2358
|
icon: "error"
|
|
@@ -2413,7 +2371,7 @@ const es = Zt.exports, ts = {
|
|
|
2413
2371
|
const {
|
|
2414
2372
|
instance: e
|
|
2415
2373
|
} = this, t = e.getRemoteSearchEntry();
|
|
2416
|
-
return r(
|
|
2374
|
+
return r(v, {
|
|
2417
2375
|
attrs: {
|
|
2418
2376
|
type: "error",
|
|
2419
2377
|
icon: "error"
|
|
@@ -2432,7 +2390,7 @@ const es = Zt.exports, ts = {
|
|
|
2432
2390
|
const {
|
|
2433
2391
|
instance: e
|
|
2434
2392
|
} = this;
|
|
2435
|
-
return r(
|
|
2393
|
+
return r(v, {
|
|
2436
2394
|
attrs: {
|
|
2437
2395
|
type: "no-options",
|
|
2438
2396
|
icon: "warning"
|
|
@@ -2443,7 +2401,7 @@ const es = Zt.exports, ts = {
|
|
|
2443
2401
|
const {
|
|
2444
2402
|
instance: e
|
|
2445
2403
|
} = this;
|
|
2446
|
-
return r(
|
|
2404
|
+
return r(v, {
|
|
2447
2405
|
attrs: {
|
|
2448
2406
|
type: "no-results",
|
|
2449
2407
|
icon: "warning"
|
|
@@ -2461,15 +2419,15 @@ const es = Zt.exports, ts = {
|
|
|
2461
2419
|
instance: e
|
|
2462
2420
|
} = this;
|
|
2463
2421
|
if (!e.menu.isOpen) return;
|
|
2464
|
-
const t = e.getMenu(), s = e.getControl(), n = t.getBoundingClientRect(), i = s.getBoundingClientRect(),
|
|
2465
|
-
|
|
2422
|
+
const t = e.getMenu(), s = e.getControl(), n = t.getBoundingClientRect(), i = s.getBoundingClientRect(), o = n.height, l = window.innerHeight, u = i.top, f = window.innerHeight - i.bottom, h = i.top >= 0 && i.top <= l || i.top < 0 && i.bottom > 0, g = f > o + ee, p = u > o + ee;
|
|
2423
|
+
h ? e.openDirection !== "auto" ? e.menu.placement = Ht[e.openDirection] : g || !p ? e.menu.placement = "bottom" : e.menu.placement = "top" : e.closeMenu();
|
|
2466
2424
|
},
|
|
2467
2425
|
setupMenuSizeWatcher() {
|
|
2468
2426
|
const {
|
|
2469
2427
|
instance: e
|
|
2470
2428
|
} = this, t = e.getMenu();
|
|
2471
2429
|
this.menuSizeWatcher || (this.menuSizeWatcher = {
|
|
2472
|
-
remove:
|
|
2430
|
+
remove: re(t, this.adjustMenuOpenDirection)
|
|
2473
2431
|
});
|
|
2474
2432
|
},
|
|
2475
2433
|
setupMenuResizeAndScrollEventListeners() {
|
|
@@ -2477,7 +2435,7 @@ const es = Zt.exports, ts = {
|
|
|
2477
2435
|
instance: e
|
|
2478
2436
|
} = this, t = e.getControl();
|
|
2479
2437
|
this.menuResizeAndScrollEventListeners || (this.menuResizeAndScrollEventListeners = {
|
|
2480
|
-
remove:
|
|
2438
|
+
remove: oe(t, this.adjustMenuOpenDirection)
|
|
2481
2439
|
});
|
|
2482
2440
|
},
|
|
2483
2441
|
removeMenuSizeWatcher() {
|
|
@@ -2498,16 +2456,16 @@ const es = Zt.exports, ts = {
|
|
|
2498
2456
|
}
|
|
2499
2457
|
}, [this.renderMenu()])]);
|
|
2500
2458
|
}
|
|
2501
|
-
},
|
|
2502
|
-
var
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2459
|
+
}, Wt = null, jt = null;
|
|
2460
|
+
var Qt = /* @__PURE__ */ m(
|
|
2461
|
+
Pt,
|
|
2462
|
+
Wt,
|
|
2463
|
+
jt,
|
|
2506
2464
|
!1,
|
|
2507
2465
|
null,
|
|
2508
2466
|
null
|
|
2509
2467
|
);
|
|
2510
|
-
const
|
|
2468
|
+
const ve = Qt.exports, Kt = {
|
|
2511
2469
|
name: "VueTreeSelectPortalTarget",
|
|
2512
2470
|
inject: ["instance"],
|
|
2513
2471
|
watch: {
|
|
@@ -2539,7 +2497,7 @@ const be = rs.exports, os = {
|
|
|
2539
2497
|
instance: e
|
|
2540
2498
|
} = this, t = e.getControl();
|
|
2541
2499
|
this.controlResizeAndScrollEventListeners || (this.controlResizeAndScrollEventListeners = {
|
|
2542
|
-
remove:
|
|
2500
|
+
remove: oe(t, this.updateMenuContainerOffset)
|
|
2543
2501
|
});
|
|
2544
2502
|
},
|
|
2545
2503
|
setupControlSizeWatcher() {
|
|
@@ -2547,7 +2505,7 @@ const be = rs.exports, os = {
|
|
|
2547
2505
|
instance: e
|
|
2548
2506
|
} = this, t = e.getControl();
|
|
2549
2507
|
this.controlSizeWatcher || (this.controlSizeWatcher = {
|
|
2550
|
-
remove:
|
|
2508
|
+
remove: re(t, () => {
|
|
2551
2509
|
this.updateWidth(), this.updateMenuContainerOffset();
|
|
2552
2510
|
})
|
|
2553
2511
|
});
|
|
@@ -2567,8 +2525,8 @@ const be = rs.exports, os = {
|
|
|
2567
2525
|
updateMenuContainerOffset() {
|
|
2568
2526
|
const {
|
|
2569
2527
|
instance: e
|
|
2570
|
-
} = this, t = e.getControl(), s = this.$el, n = t.getBoundingClientRect(), i = s.getBoundingClientRect(),
|
|
2571
|
-
|
|
2528
|
+
} = this, t = e.getControl(), s = this.$el, n = t.getBoundingClientRect(), i = s.getBoundingClientRect(), o = e.menu.placement === "bottom" ? n.height : 0, l = `${Math.round(n.left - i.left)}px`, u = `${Math.round(n.top - i.top + o)}px`, f = this.$refs.menu.$refs["menu-container"].style, g = ce(["transform", "webkitTransform", "MozTransform", "msTransform"], (p) => p in document.body.style);
|
|
2529
|
+
f[g] = `translate(${l}, ${u})`;
|
|
2572
2530
|
}
|
|
2573
2531
|
},
|
|
2574
2532
|
render() {
|
|
@@ -2583,7 +2541,7 @@ const be = rs.exports, os = {
|
|
|
2583
2541
|
attrs: {
|
|
2584
2542
|
"data-instance-id": e.getInstanceId()
|
|
2585
2543
|
}
|
|
2586
|
-
}, [r(
|
|
2544
|
+
}, [r(ve, {
|
|
2587
2545
|
ref: "menu"
|
|
2588
2546
|
})]);
|
|
2589
2547
|
},
|
|
@@ -2591,8 +2549,8 @@ const be = rs.exports, os = {
|
|
|
2591
2549
|
this.removeHandlers();
|
|
2592
2550
|
}
|
|
2593
2551
|
};
|
|
2594
|
-
let
|
|
2595
|
-
const
|
|
2552
|
+
let j;
|
|
2553
|
+
const qt = {
|
|
2596
2554
|
name: "VueTreeSelectMenuPortal",
|
|
2597
2555
|
created() {
|
|
2598
2556
|
this.portalTarget = null;
|
|
@@ -2606,32 +2564,33 @@ const ls = {
|
|
|
2606
2564
|
methods: {
|
|
2607
2565
|
setup() {
|
|
2608
2566
|
const e = document.createElement("div");
|
|
2609
|
-
document.body.appendChild(e), this.portalTarget = new
|
|
2567
|
+
document.body.appendChild(e), this.portalTarget = new ye({
|
|
2610
2568
|
el: e,
|
|
2611
|
-
parent: this
|
|
2612
|
-
|
|
2569
|
+
parent: this,
|
|
2570
|
+
...Kt
|
|
2571
|
+
});
|
|
2613
2572
|
},
|
|
2614
2573
|
teardown() {
|
|
2615
2574
|
document.body.removeChild(this.portalTarget.$el), this.portalTarget.$el.innerHTML = "", this.portalTarget.$destroy(), this.portalTarget = null;
|
|
2616
2575
|
}
|
|
2617
2576
|
},
|
|
2618
2577
|
render() {
|
|
2619
|
-
return
|
|
2578
|
+
return j || (j = r("div", {
|
|
2620
2579
|
class: "vue-treeselect__menu-placeholder"
|
|
2621
|
-
})),
|
|
2580
|
+
})), j;
|
|
2622
2581
|
}
|
|
2623
|
-
},
|
|
2624
|
-
var
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2582
|
+
}, Ut = null, Yt = null;
|
|
2583
|
+
var Xt = /* @__PURE__ */ m(
|
|
2584
|
+
qt,
|
|
2585
|
+
Ut,
|
|
2586
|
+
Yt,
|
|
2628
2587
|
!1,
|
|
2629
2588
|
null,
|
|
2630
2589
|
null
|
|
2631
2590
|
);
|
|
2632
|
-
const
|
|
2591
|
+
const Gt = Xt.exports, ns = {
|
|
2633
2592
|
name: "VueTreeSelect",
|
|
2634
|
-
mixins: [
|
|
2593
|
+
mixins: [We],
|
|
2635
2594
|
computed: {
|
|
2636
2595
|
wrapperClass() {
|
|
2637
2596
|
return {
|
|
@@ -2654,15 +2613,15 @@ const hs = us.exports, vs = {
|
|
|
2654
2613
|
return r("div", {
|
|
2655
2614
|
ref: "wrapper",
|
|
2656
2615
|
class: this.wrapperClass
|
|
2657
|
-
}, [r(
|
|
2616
|
+
}, [r(Ye), r(xt, {
|
|
2658
2617
|
ref: "control"
|
|
2659
|
-
}), this.appendToBody ? r(
|
|
2618
|
+
}), this.appendToBody ? r(Gt, {
|
|
2660
2619
|
ref: "portal"
|
|
2661
|
-
}) : r(
|
|
2620
|
+
}) : r(ve, {
|
|
2662
2621
|
ref: "menu"
|
|
2663
2622
|
})]);
|
|
2664
2623
|
}
|
|
2665
2624
|
};
|
|
2666
2625
|
export {
|
|
2667
|
-
|
|
2626
|
+
ns as default
|
|
2668
2627
|
};
|