@web-utils/component 3.0.6 → 3.1.0
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/address-input/index.mjs +20 -57
- package/affix/index.mjs +26 -47
- package/aside-menu/index.mjs +18 -43
- package/avatar/index.mjs +27 -49
- package/awesome-button/index.mjs +35 -43
- package/capsule-tab/index.mjs +16 -34
- package/card/index.mjs +21 -76
- package/carousel/index.mjs +14 -49
- package/chat/index.mjs +104 -414
- package/chunk-file-uploader/index.mjs +21 -38
- package/chunks/FormTemp.aa57efb4.mjs +125 -0
- package/code-mirror-editor/index.mjs +69 -79
- package/color-picker/index.mjs +29 -60
- package/comment/index.mjs +17 -48
- package/confirm-button/index.mjs +11 -19
- package/confirmable/index.mjs +12 -20
- package/context-menu/index.mjs +42 -144
- package/count-up/index.mjs +18 -25
- package/custom-scrollbar/index.mjs +13 -22
- package/data-box/index.mjs +15 -66
- package/data-card/index.mjs +16 -65
- package/data-cardtext/index.mjs +16 -52
- package/data-display/index.mjs +18 -62
- package/data-icons/index.mjs +16 -68
- package/data-imgtext/index.mjs +18 -79
- package/data-operatext/index.mjs +18 -75
- package/data-panel/index.mjs +16 -63
- package/data-pay/index.mjs +20 -122
- package/data-price/index.mjs +18 -60
- package/data-progress/index.mjs +16 -67
- package/data-rotate/index.mjs +16 -66
- package/data-table-picker/index.mjs +25 -88
- package/data-tabs/index.mjs +16 -64
- package/dialog-form/index.mjs +48 -94
- package/dynamic-table/index.mjs +43 -127
- package/e-charts/index.mjs +21 -34
- package/easy-popup/index.mjs +35 -61
- package/editable-progress/index.mjs +22 -77
- package/editable-tree/index.mjs +235 -546
- package/egd-collapse/index.mjs +13 -26
- package/egd-collapse-item/index.mjs +27 -87
- package/element-dialog/index.mjs +69 -133
- package/empty-view/index.mjs +13 -33
- package/error-view/index.mjs +14 -34
- package/flex-column/index.mjs +15 -23
- package/flex-item/index.mjs +18 -26
- package/flex-row/index.mjs +23 -31
- package/flex-scroller/index.mjs +16 -27
- package/flow/index.mjs +70 -110
- package/flow-designer/index.mjs +1215 -4804
- package/flow-node/index.mjs +15 -51
- package/flow-viewer/index.mjs +64 -89
- package/form-block/index.mjs +43 -62
- package/form-button/index.mjs +10 -18
- package/form-cascader/index.mjs +49 -100
- package/form-checkbox-group/index.mjs +43 -110
- package/form-date-picker/index.mjs +51 -97
- package/form-holder/index.mjs +25 -42
- package/form-input/index.mjs +40 -90
- package/form-input-email/index.mjs +35 -79
- package/form-input-id-card/index.mjs +40 -87
- package/form-input-number/index.mjs +42 -102
- package/form-input-phone-number/index.mjs +34 -75
- package/form-input-tag/index.mjs +31 -73
- package/form-input-time/index.mjs +42 -87
- package/form-item/index.mjs +70 -89
- package/form-item-config-provider/index.mjs +12 -20
- package/form-item-group/index.mjs +46 -65
- package/form-radio-group/index.mjs +50 -108
- package/form-select/index.mjs +44 -95
- package/form-switch/index.mjs +38 -85
- package/form-textarea/index.mjs +31 -75
- package/form-view/index.mjs +112 -260
- package/fy-array/index.mjs +35 -121
- package/fy-article/index.mjs +12 -43
- package/fy-cascader/index.mjs +26 -67
- package/fy-checkbox/index.mjs +27 -77
- package/fy-code/index.mjs +19 -33
- package/fy-curd/index.mjs +810 -2017
- package/fy-date/index.mjs +18 -59
- package/fy-draggable/index.mjs +81 -140
- package/fy-dynamic/index.mjs +85 -204
- package/fy-empty/index.mjs +14 -35
- package/fy-form/index.mjs +254 -571
- package/fy-form-design/index.mjs +1489 -6084
- package/fy-form-design/style.css +1 -1
- package/fy-input/index.mjs +34 -104
- package/fy-input-color/index.mjs +22 -67
- package/fy-input-icon/index.mjs +37 -122
- package/fy-input-map/index.mjs +57 -149
- package/fy-input-number/index.mjs +18 -53
- package/fy-input-table/index.mjs +36 -102
- package/fy-input-tree/index.mjs +51 -138
- package/fy-progress/index.mjs +12 -31
- package/fy-radio/index.mjs +20 -51
- package/fy-rate/index.mjs +18 -51
- package/fy-select/index.mjs +49 -134
- package/fy-slider/index.mjs +19 -52
- package/fy-switch/index.mjs +18 -48
- package/fy-tabs/index.mjs +19 -51
- package/fy-time/index.mjs +22 -62
- package/fy-title/index.mjs +14 -25
- package/fy-tree/index.mjs +74 -216
- package/fy-u-editor/index.mjs +50 -64
- package/fy-upload/index.mjs +167 -338
- package/guide-steps/index.mjs +33 -53
- package/highlight-j-s/index.mjs +13 -27
- package/icon-card/index.mjs +12 -36
- package/icon-temp/index.mjs +12 -34
- package/iframe-window/index.mjs +13 -40
- package/image-cropper/index.mjs +46 -171
- package/image-preview/index.mjs +54 -168
- package/image-viewer/index.mjs +24 -50
- package/index.css +1 -0
- package/index.mjs +3973 -501
- package/input-number/index.mjs +84 -173
- package/input-number-range/index.mjs +20 -70
- package/j-s-x-component/index.mjs +3 -3
- package/keep-view-alive/index.mjs +47 -55
- package/keyboard/index.mjs +100 -113
- package/license/index.mjs +34 -51
- package/loading-view/index.mjs +14 -34
- package/login/index.mjs +33 -161
- package/monaco-editor/index.mjs +13 -21
- package/name-avatar/index.mjs +13 -32
- package/nav-bar/index.mjs +12 -31
- package/not-implement/index.mjs +14 -25
- package/notice/index.mjs +32 -80
- package/package.json +1 -1
- package/page/index.mjs +11 -23
- package/page-header/index.mjs +16 -37
- package/page-index/index.mjs +42 -93
- package/page-index-top/index.mjs +42 -84
- package/page-skeleton/index.mjs +24 -39
- package/page-skeleton-new/index.mjs +21 -68
- package/pageable-table/index.mjs +105 -227
- package/pageable-view/index.mjs +30 -83
- package/photo-swipe/index.mjs +62 -87
- package/present-view/index.mjs +114 -267
- package/queue/index.mjs +14 -29
- package/record-video/index.mjs +29 -66
- package/resize-observer/index.mjs +18 -30
- package/search/index.mjs +47 -81
- package/search-popover/index.mjs +57 -329
- package/sign/index.mjs +43 -60
- package/sign-panel/index.mjs +40 -151
- package/skeleton/index.mjs +18 -44
- package/split-pane/index.mjs +45 -129
- package/stateful/index.mjs +18 -26
- package/static-pageable-table/index.mjs +18 -44
- package/swiper/index.mjs +53 -94
- package/tab/index.mjs +13 -39
- package/tab-item/index.mjs +23 -37
- package/table-column/index.mjs +27 -35
- package/table-view/index.mjs +89 -209
- package/tag-render/index.mjs +34 -69
- package/text-ellipsis/index.mjs +22 -47
- package/tinymce-editor/index.mjs +174 -285
- package/toolbar/index.mjs +21 -42
- package/toolbar-button/index.mjs +25 -54
- package/verify/index.mjs +16 -29
- package/vue-cron/index.mjs +272 -1089
- package/vue-qr-code/index.mjs +19 -27
- package/vue-quill-editor/index.mjs +15 -27
- package/vue-tags-input/index.mjs +104 -224
- package/vue-tree-select/index.mjs +595 -742
- package/vue-video-player/index.mjs +42 -57
- package/watermark/index.mjs +27 -35
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +50 -112
- package/chunks/FormTemp.7f91629d.mjs +0 -165
- /package/chunks/{vueComponentNormalizer.446f5dc4.mjs → _plugin-vue2_normalizer.446f5dc4.mjs} +0 -0
|
@@ -1,104 +1,104 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var Ce = Object.defineProperty, Le = Object.defineProperties;
|
|
2
|
+
var Me = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var J = Object.getOwnPropertySymbols;
|
|
4
|
+
var Te = Object.prototype.hasOwnProperty, De = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var Z = (e, t, s) => t in e ? Ce(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, v = (e, t) => {
|
|
6
6
|
for (var s in t || (t = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var s of
|
|
10
|
-
|
|
7
|
+
Te.call(t, s) && Z(e, s, t[s]);
|
|
8
|
+
if (J)
|
|
9
|
+
for (var s of J(t))
|
|
10
|
+
De.call(t, s) && Z(e, s, t[s]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
const
|
|
12
|
+
}, w = (e, t) => Le(e, Me(t));
|
|
13
|
+
import xe, { h as r } from "vue";
|
|
14
|
+
import { noop as Re, identity as $e, last as ee, once as Ie, debounce as Ae } from "lodash-es";
|
|
15
|
+
import { isPromise as le } from "@web-utils/core";
|
|
16
|
+
import { n as m } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
|
|
17
|
+
const O = process.env.NODE_ENV === "production" ? (
|
|
18
18
|
/* istanbul ignore next */
|
|
19
|
-
|
|
19
|
+
Re
|
|
20
20
|
) : function(t, s) {
|
|
21
21
|
if (!t()) {
|
|
22
22
|
const n = ["[Vue-TreeSelect Warning]"].concat(s());
|
|
23
23
|
console.error(...n);
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
function
|
|
26
|
+
function b(e) {
|
|
27
27
|
return function(s, ...n) {
|
|
28
28
|
s.type === "mousedown" && s.button === 0 && e.call(this, s, ...n);
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Ve(e, t) {
|
|
32
32
|
const s = e.getBoundingClientRect(), n = t.getBoundingClientRect(), i = t.offsetHeight / 3;
|
|
33
33
|
n.bottom + i > s.bottom ? e.scrollTop = Math.min(
|
|
34
34
|
t.offsetTop + t.clientHeight - e.offsetHeight + i,
|
|
35
35
|
e.scrollHeight
|
|
36
36
|
) : n.top - i < s.top && (e.scrollTop = Math.max(t.offsetTop - i, 0));
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function ae(e, t) {
|
|
39
39
|
const s = e.indexOf(t);
|
|
40
40
|
s !== -1 && e.splice(s, 1);
|
|
41
41
|
}
|
|
42
|
-
let
|
|
43
|
-
const
|
|
44
|
-
function
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
},
|
|
42
|
+
let q;
|
|
43
|
+
const R = [], Be = 100;
|
|
44
|
+
function ze() {
|
|
45
|
+
q = setInterval(() => {
|
|
46
|
+
R.forEach(ce);
|
|
47
|
+
}, Be);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
clearInterval(
|
|
49
|
+
function Fe() {
|
|
50
|
+
clearInterval(q), q = null;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
const { $el: t, listener: s, lastWidth: n, lastHeight: i } = e,
|
|
54
|
-
(n !==
|
|
52
|
+
function ce(e) {
|
|
53
|
+
const { $el: t, listener: s, lastWidth: n, lastHeight: i } = e, l = t.offsetWidth, o = t.offsetHeight;
|
|
54
|
+
(n !== l || i !== o) && (e.lastWidth = l, e.lastHeight = o, s({ width: l, height: o }));
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function ke(e, t) {
|
|
57
57
|
const s = {
|
|
58
58
|
$el: e,
|
|
59
59
|
listener: t,
|
|
60
60
|
lastWidth: null,
|
|
61
61
|
lastHeight: null
|
|
62
62
|
}, n = () => {
|
|
63
|
-
|
|
63
|
+
ae(R, s), R.length || Fe();
|
|
64
64
|
};
|
|
65
|
-
return
|
|
65
|
+
return R.push(s), ce(s), ze(), n;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
const s = document.createElement("_"), n = s.appendChild(document.createElement("_")), i = s.appendChild(document.createElement("_")),
|
|
69
|
-
let
|
|
70
|
-
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",
|
|
71
|
-
function
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
(
|
|
67
|
+
function He(e, t) {
|
|
68
|
+
const s = document.createElement("_"), n = s.appendChild(document.createElement("_")), i = s.appendChild(document.createElement("_")), l = n.appendChild(document.createElement("_"));
|
|
69
|
+
let o, u;
|
|
70
|
+
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", l.style.cssText = i.style.cssText = "display:block;height:100%;transition:0s;width:100%", l.style.width = l.style.height = "200%", e.appendChild(s), p(), g;
|
|
71
|
+
function p() {
|
|
72
|
+
c();
|
|
73
|
+
const f = e.offsetWidth, N = e.offsetHeight;
|
|
74
|
+
(f !== o || N !== u) && (o = f, u = N, i.style.width = `${f * 2}px`, i.style.height = `${N * 2}px`, s.scrollLeft = s.scrollWidth, s.scrollTop = s.scrollHeight, n.scrollLeft = n.scrollWidth, n.scrollTop = n.scrollHeight, t({ width: f, height: N })), n.addEventListener("scroll", p), s.addEventListener("scroll", p);
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
n.removeEventListener("scroll",
|
|
76
|
+
function c() {
|
|
77
|
+
n.removeEventListener("scroll", p), s.removeEventListener("scroll", p);
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
|
|
79
|
+
function g() {
|
|
80
|
+
c(), e.removeChild(s);
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function ue(e, t) {
|
|
84
84
|
const s = document.documentMode === 9;
|
|
85
85
|
let n = !0;
|
|
86
|
-
const
|
|
87
|
-
return n = !1,
|
|
86
|
+
const o = (s ? ke : He)(e, (...u) => n || t(...u));
|
|
87
|
+
return n = !1, o;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function Pe(e) {
|
|
90
90
|
const t = [];
|
|
91
91
|
let s = e.parentNode;
|
|
92
92
|
for (; s && s.nodeName !== "BODY" && s.nodeType === document.ELEMENT_NODE; )
|
|
93
|
-
|
|
93
|
+
We(s) && t.push(s), s = s.parentNode;
|
|
94
94
|
return t.push(window), t;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function We(e) {
|
|
97
97
|
const { overflow: t, overflowX: s, overflowY: n } = getComputedStyle(e);
|
|
98
98
|
return /(auto|scroll|overlay)/.test(t + n + s);
|
|
99
99
|
}
|
|
100
|
-
function
|
|
101
|
-
const s =
|
|
100
|
+
function he(e, t) {
|
|
101
|
+
const s = Pe(e);
|
|
102
102
|
return window.addEventListener("resize", t, { passive: !0 }), s.forEach((n) => {
|
|
103
103
|
n.addEventListener("scroll", t, { passive: !0 });
|
|
104
104
|
}), function() {
|
|
@@ -107,33 +107,33 @@ function be(e, t) {
|
|
|
107
107
|
});
|
|
108
108
|
};
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function de(e) {
|
|
111
111
|
return Number.isNaN(e);
|
|
112
112
|
}
|
|
113
|
-
const
|
|
114
|
-
function
|
|
113
|
+
const S = () => /* @__PURE__ */ Object.create(null);
|
|
114
|
+
function pe(e) {
|
|
115
115
|
return e == null || typeof e != "object" ? !1 : Object.getPrototypeOf(e) === Object.prototype;
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
|
|
117
|
+
function je(e, t, s) {
|
|
118
|
+
pe(s) ? (e[t] || (e[t] = {}), U(e[t], s)) : e[t] = s;
|
|
119
119
|
}
|
|
120
|
-
function
|
|
121
|
-
if (
|
|
120
|
+
function U(e, t) {
|
|
121
|
+
if (pe(t)) {
|
|
122
122
|
const s = Object.keys(t);
|
|
123
123
|
for (let n = 0, i = s.length; n < i; n++)
|
|
124
|
-
|
|
124
|
+
je(e, s[n], t[s[n]]);
|
|
125
125
|
}
|
|
126
126
|
return e;
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function y(e, t) {
|
|
129
129
|
return e.indexOf(t) !== -1;
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function fe(e, t, s) {
|
|
132
132
|
for (let n = 0, i = e.length; n < i; n++)
|
|
133
133
|
if (t.call(s, e[n], n, e))
|
|
134
134
|
return e[n];
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function B(e, t) {
|
|
137
137
|
if (e.length !== t.length)
|
|
138
138
|
return !0;
|
|
139
139
|
for (let s = 0; s < e.length; s++)
|
|
@@ -141,23 +141,23 @@ function V(e, t) {
|
|
|
141
141
|
return !0;
|
|
142
142
|
return !1;
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function Qe(e, t) {
|
|
145
145
|
const s = t.length, n = e.length;
|
|
146
146
|
if (n > s)
|
|
147
147
|
return !1;
|
|
148
148
|
if (n === s)
|
|
149
149
|
return e === t;
|
|
150
150
|
e:
|
|
151
|
-
for (let i = 0,
|
|
152
|
-
const
|
|
153
|
-
for (;
|
|
154
|
-
if (t.charCodeAt(
|
|
151
|
+
for (let i = 0, l = 0; i < n; i++) {
|
|
152
|
+
const o = e.charCodeAt(i);
|
|
153
|
+
for (; l < s; )
|
|
154
|
+
if (t.charCodeAt(l++) === o)
|
|
155
155
|
continue e;
|
|
156
156
|
return !1;
|
|
157
157
|
}
|
|
158
158
|
return !0;
|
|
159
159
|
}
|
|
160
|
-
const E = null,
|
|
160
|
+
const E = null, Y = 0, me = 1, ge = 2, C = "ALL_CHILDREN", L = "ALL_DESCENDANTS", M = "LEAF_CHILDREN", T = "LEAF_DESCENDANTS", Ke = "LOAD_ROOT_OPTIONS", qe = "LOAD_CHILDREN_OPTIONS", Ue = "ASYNC_SEARCH", z = "ALL", x = "BRANCH_PRIORITY", F = "LEAF_PRIORITY", k = "ALL_WITH_INDETERMINATE", te = "ORDER_SELECTED", se = "LEVEL", ne = "INDEX", d = {
|
|
161
161
|
BACKSPACE: 8,
|
|
162
162
|
ENTER: 13,
|
|
163
163
|
ESCAPE: 27,
|
|
@@ -168,14 +168,14 @@ const E = null, U = 0, Le = 1, Me = 2, $ = "ALL_CHILDREN", w = "ALL_DESCENDANTS"
|
|
|
168
168
|
ARROW_RIGHT: 39,
|
|
169
169
|
ARROW_DOWN: 40,
|
|
170
170
|
DELETE: 46
|
|
171
|
-
},
|
|
171
|
+
}, Ye = process.env.NODE_ENV === "testing" ? (
|
|
172
172
|
/* to speed up unit testing */
|
|
173
173
|
10
|
|
174
174
|
) : (
|
|
175
175
|
/* istanbul ignore next */
|
|
176
176
|
200
|
|
177
|
-
),
|
|
178
|
-
function
|
|
177
|
+
), ie = 5, re = 40;
|
|
178
|
+
function Se(e, t) {
|
|
179
179
|
let s = 0;
|
|
180
180
|
do {
|
|
181
181
|
if (e.level < s)
|
|
@@ -187,28 +187,28 @@ function xe(e, t) {
|
|
|
187
187
|
s++;
|
|
188
188
|
} while (!0);
|
|
189
189
|
}
|
|
190
|
-
function
|
|
191
|
-
return e.level === t.level ?
|
|
190
|
+
function Xe(e, t) {
|
|
191
|
+
return e.level === t.level ? Se(e, t) : e.level - t.level;
|
|
192
192
|
}
|
|
193
|
-
function
|
|
193
|
+
function H() {
|
|
194
194
|
return {
|
|
195
195
|
isLoaded: !1,
|
|
196
196
|
isLoading: !1,
|
|
197
197
|
loadingError: ""
|
|
198
198
|
};
|
|
199
199
|
}
|
|
200
|
-
function
|
|
201
|
-
return typeof e == "string" ? e : typeof e == "number" &&
|
|
200
|
+
function Ge(e) {
|
|
201
|
+
return typeof e == "string" ? e : typeof e == "number" && !de(e) ? `${e}` : "";
|
|
202
202
|
}
|
|
203
|
-
function
|
|
204
|
-
return e ?
|
|
203
|
+
function oe(e, t, s) {
|
|
204
|
+
return e ? Qe(t, s) : y(s, t);
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function P(e) {
|
|
207
207
|
return e.message || /* istanbul ignore next */
|
|
208
208
|
String(e);
|
|
209
209
|
}
|
|
210
|
-
let
|
|
211
|
-
const
|
|
210
|
+
let Je = 0;
|
|
211
|
+
const Ze = {
|
|
212
212
|
provide() {
|
|
213
213
|
return {
|
|
214
214
|
// Enable access to the instance of root component of vue-treeselect
|
|
@@ -439,7 +439,7 @@ const dt = {
|
|
|
439
439
|
*/
|
|
440
440
|
instanceId: {
|
|
441
441
|
// Add two trailing "$" to distinguish from explictly specified ids.
|
|
442
|
-
default: () => `${
|
|
442
|
+
default: () => `${Je++}$$`,
|
|
443
443
|
type: [String, Number]
|
|
444
444
|
},
|
|
445
445
|
/**
|
|
@@ -535,7 +535,7 @@ const dt = {
|
|
|
535
535
|
*/
|
|
536
536
|
normalizer: {
|
|
537
537
|
type: Function,
|
|
538
|
-
default:
|
|
538
|
+
default: $e
|
|
539
539
|
},
|
|
540
540
|
/**
|
|
541
541
|
* By default (`auto`), the menu will open below the control. If there is not
|
|
@@ -553,7 +553,7 @@ const dt = {
|
|
|
553
553
|
type: String,
|
|
554
554
|
default: "auto",
|
|
555
555
|
validator(e) {
|
|
556
|
-
return
|
|
556
|
+
return y(["auto", "top", "bottom", "above", "below"], e);
|
|
557
557
|
}
|
|
558
558
|
},
|
|
559
559
|
/**
|
|
@@ -643,9 +643,9 @@ const dt = {
|
|
|
643
643
|
*/
|
|
644
644
|
showCountOf: {
|
|
645
645
|
type: String,
|
|
646
|
-
default:
|
|
646
|
+
default: C,
|
|
647
647
|
validator(e) {
|
|
648
|
-
return
|
|
648
|
+
return y([C, L, M, T], e);
|
|
649
649
|
}
|
|
650
650
|
},
|
|
651
651
|
/**
|
|
@@ -664,9 +664,9 @@ const dt = {
|
|
|
664
664
|
*/
|
|
665
665
|
sortValueBy: {
|
|
666
666
|
type: String,
|
|
667
|
-
default:
|
|
667
|
+
default: te,
|
|
668
668
|
validator(e) {
|
|
669
|
-
return
|
|
669
|
+
return y([te, se, ne], e);
|
|
670
670
|
}
|
|
671
671
|
},
|
|
672
672
|
/**
|
|
@@ -696,7 +696,7 @@ const dt = {
|
|
|
696
696
|
type: String,
|
|
697
697
|
default: x,
|
|
698
698
|
validator(e) {
|
|
699
|
-
return
|
|
699
|
+
return y([z, x, F, k], e);
|
|
700
700
|
}
|
|
701
701
|
},
|
|
702
702
|
/**
|
|
@@ -740,27 +740,27 @@ const dt = {
|
|
|
740
740
|
// Normalized options.
|
|
741
741
|
normalizedOptions: [],
|
|
742
742
|
// <id, node> map for quick look-up.
|
|
743
|
-
nodeMap:
|
|
743
|
+
nodeMap: S(),
|
|
744
744
|
// <id, checkedState> map, used for multi-select mode.
|
|
745
|
-
checkedStateMap:
|
|
745
|
+
checkedStateMap: S(),
|
|
746
746
|
// Id list of all selected options.
|
|
747
747
|
selectedNodeIds: this.extractCheckedNodeIdsFromValue(),
|
|
748
748
|
// <id, true> map for fast checking:
|
|
749
749
|
// if (forest.selectedNodeIds.indexOf(id) !== -1) forest.selectedNodeMap[id] === true
|
|
750
|
-
selectedNodeMap:
|
|
750
|
+
selectedNodeMap: S()
|
|
751
751
|
},
|
|
752
752
|
// States of root options.
|
|
753
|
-
rootOptionsStates:
|
|
753
|
+
rootOptionsStates: H(),
|
|
754
754
|
localSearch: {
|
|
755
755
|
// Has user entered any query to search local options?
|
|
756
756
|
active: !1,
|
|
757
757
|
// Has any options matched the search query?
|
|
758
758
|
noResults: !0,
|
|
759
759
|
// <id, countObject> map for counting matched children/descendants.
|
|
760
|
-
countMap:
|
|
760
|
+
countMap: S()
|
|
761
761
|
},
|
|
762
762
|
// <searchQuery, remoteSearchEntry> map.
|
|
763
|
-
remoteSearch:
|
|
763
|
+
remoteSearch: S()
|
|
764
764
|
};
|
|
765
765
|
},
|
|
766
766
|
computed: {
|
|
@@ -778,27 +778,27 @@ const dt = {
|
|
|
778
778
|
*/
|
|
779
779
|
internalValue() {
|
|
780
780
|
let e;
|
|
781
|
-
if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf ===
|
|
781
|
+
if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === z)
|
|
782
782
|
e = this.forest.selectedNodeIds.slice();
|
|
783
783
|
else if (this.valueConsistsOf === x)
|
|
784
784
|
e = this.forest.selectedNodeIds.filter((t) => {
|
|
785
785
|
const s = this.getNode(t);
|
|
786
786
|
return s.isRootNode ? !0 : !this.isSelected(s.parentNode);
|
|
787
787
|
});
|
|
788
|
-
else if (this.valueConsistsOf ===
|
|
788
|
+
else if (this.valueConsistsOf === F)
|
|
789
789
|
e = this.forest.selectedNodeIds.filter((t) => {
|
|
790
790
|
const s = this.getNode(t);
|
|
791
791
|
return s.isLeaf ? !0 : s.children.length === 0;
|
|
792
792
|
});
|
|
793
|
-
else if (this.valueConsistsOf ===
|
|
793
|
+
else if (this.valueConsistsOf === k) {
|
|
794
794
|
const t = [];
|
|
795
795
|
e = this.forest.selectedNodeIds.slice(), this.selectedNodes.forEach((s) => {
|
|
796
796
|
s.ancestors.forEach((n) => {
|
|
797
|
-
|
|
797
|
+
y(t, n.id) || y(e, n.id) || t.push(n.id);
|
|
798
798
|
});
|
|
799
799
|
}), e.push(...t);
|
|
800
800
|
}
|
|
801
|
-
return this.sortValueBy ===
|
|
801
|
+
return this.sortValueBy === se ? e.sort((t, s) => Xe(this.getNode(t), this.getNode(s))) : this.sortValueBy === ne && e.sort((t, s) => Se(this.getNode(t), this.getNode(s))), e;
|
|
802
802
|
},
|
|
803
803
|
/**
|
|
804
804
|
* Has any option been selected?
|
|
@@ -869,7 +869,7 @@ const dt = {
|
|
|
869
869
|
this.initialize();
|
|
870
870
|
},
|
|
871
871
|
internalValue(e, t) {
|
|
872
|
-
|
|
872
|
+
B(e, t) && this.$emit("input", this.getValue(), this.getInstanceId());
|
|
873
873
|
},
|
|
874
874
|
matchKeys() {
|
|
875
875
|
this.initialize();
|
|
@@ -889,18 +889,18 @@ const dt = {
|
|
|
889
889
|
},
|
|
890
890
|
value() {
|
|
891
891
|
const e = this.extractCheckedNodeIdsFromValue();
|
|
892
|
-
|
|
892
|
+
B(e, this.internalValue) && this.fixSelectedNodeIds(e);
|
|
893
893
|
}
|
|
894
894
|
},
|
|
895
895
|
methods: {
|
|
896
896
|
verifyProps() {
|
|
897
|
-
|
|
897
|
+
O(
|
|
898
898
|
() => this.async ? this.searchable : !0,
|
|
899
899
|
() => 'For async search mode, the value of "searchable" prop must be true.'
|
|
900
|
-
), this.options == null && !this.loadOptions &&
|
|
900
|
+
), this.options == null && !this.loadOptions && O(
|
|
901
901
|
() => !1,
|
|
902
902
|
() => 'Are you meant to dynamically load options? You need to use "loadOptions" prop.'
|
|
903
|
-
), this.flat &&
|
|
903
|
+
), this.flat && O(
|
|
904
904
|
() => this.multiple,
|
|
905
905
|
() => 'You are using flat mode. But you forgot to add "multiple=true"?'
|
|
906
906
|
), this.flat || [
|
|
@@ -909,7 +909,7 @@ const dt = {
|
|
|
909
909
|
"autoDeselectAncestors",
|
|
910
910
|
"autoDeselectDescendants"
|
|
911
911
|
].forEach((t) => {
|
|
912
|
-
|
|
912
|
+
O(
|
|
913
913
|
() => !this[t],
|
|
914
914
|
() => `"${t}" only applies to flat mode.`
|
|
915
915
|
);
|
|
@@ -922,7 +922,7 @@ const dt = {
|
|
|
922
922
|
const e = this.async ? this.getRemoteSearchEntry().options : this.options;
|
|
923
923
|
if (Array.isArray(e)) {
|
|
924
924
|
const t = this.forest.nodeMap;
|
|
925
|
-
this.forest.nodeMap =
|
|
925
|
+
this.forest.nodeMap = S(), this.keepDataOfSelectedNodes(t), this.forest.normalizedOptions = this.normalize(E, e, t), this.fixSelectedNodeIds(this.internalValue);
|
|
926
926
|
} else
|
|
927
927
|
this.forest.normalizedOptions = [];
|
|
928
928
|
},
|
|
@@ -936,7 +936,7 @@ const dt = {
|
|
|
936
936
|
return this.multiple ? e : e[0];
|
|
937
937
|
},
|
|
938
938
|
getNode(e) {
|
|
939
|
-
return
|
|
939
|
+
return O(
|
|
940
940
|
() => e != null,
|
|
941
941
|
() => `Invalid node id: ${e}`
|
|
942
942
|
), e == null ? null : e in this.forest.nodeMap ? this.forest.nodeMap[e] : this.createFallbackNode(e);
|
|
@@ -967,43 +967,43 @@ const dt = {
|
|
|
967
967
|
if (this.valueFormat === "id")
|
|
968
968
|
return t;
|
|
969
969
|
const s = this.multiple ? Array.isArray(this.value) ? this.value : [] : this.value ? [this.value] : [];
|
|
970
|
-
return
|
|
970
|
+
return fe(s, (i) => i && this.enhancedNormalizer(i).id === e) || t;
|
|
971
971
|
},
|
|
972
972
|
fixSelectedNodeIds(e) {
|
|
973
973
|
let t = [];
|
|
974
|
-
if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf ===
|
|
974
|
+
if (this.single || this.flat || this.disableBranchNodes || this.valueConsistsOf === z)
|
|
975
975
|
t = e;
|
|
976
976
|
else if (this.valueConsistsOf === x)
|
|
977
977
|
e.forEach((n) => {
|
|
978
978
|
t.push(n);
|
|
979
979
|
const i = this.getNode(n);
|
|
980
|
-
i.isBranch && this.traverseDescendantsBFS(i, (
|
|
981
|
-
t.push(
|
|
980
|
+
i.isBranch && this.traverseDescendantsBFS(i, (l) => {
|
|
981
|
+
t.push(l.id);
|
|
982
982
|
});
|
|
983
983
|
});
|
|
984
|
-
else if (this.valueConsistsOf ===
|
|
985
|
-
const n =
|
|
984
|
+
else if (this.valueConsistsOf === F) {
|
|
985
|
+
const n = S(), i = e.slice();
|
|
986
986
|
for (; i.length; ) {
|
|
987
|
-
const
|
|
988
|
-
t.push(
|
|
987
|
+
const l = i.shift(), o = this.getNode(l);
|
|
988
|
+
t.push(l), !o.isRootNode && (o.parentNode.id in n || (n[o.parentNode.id] = o.parentNode.children.length), --n[o.parentNode.id] === 0 && i.push(o.parentNode.id));
|
|
989
989
|
}
|
|
990
|
-
} else if (this.valueConsistsOf ===
|
|
991
|
-
const n =
|
|
992
|
-
const
|
|
993
|
-
return
|
|
990
|
+
} else if (this.valueConsistsOf === k) {
|
|
991
|
+
const n = S(), i = e.filter((l) => {
|
|
992
|
+
const o = this.getNode(l);
|
|
993
|
+
return o.isLeaf || o.children.length === 0;
|
|
994
994
|
});
|
|
995
995
|
for (; i.length; ) {
|
|
996
|
-
const
|
|
997
|
-
t.push(
|
|
996
|
+
const l = i.shift(), o = this.getNode(l);
|
|
997
|
+
t.push(l), !o.isRootNode && (o.parentNode.id in n || (n[o.parentNode.id] = o.parentNode.children.length), --n[o.parentNode.id] === 0 && i.push(o.parentNode.id));
|
|
998
998
|
}
|
|
999
999
|
}
|
|
1000
|
-
|
|
1000
|
+
B(this.forest.selectedNodeIds, t) && (this.forest.selectedNodeIds = t), this.buildForestState();
|
|
1001
1001
|
},
|
|
1002
1002
|
keepDataOfSelectedNodes(e) {
|
|
1003
1003
|
this.forest.selectedNodeIds.forEach((t) => {
|
|
1004
1004
|
if (!e[t])
|
|
1005
1005
|
return;
|
|
1006
|
-
const s =
|
|
1006
|
+
const s = w(v({}, e[t]), {
|
|
1007
1007
|
isFallbackNode: !0
|
|
1008
1008
|
});
|
|
1009
1009
|
this.$set(this.forest.nodeMap, t, s);
|
|
@@ -1054,7 +1054,7 @@ const dt = {
|
|
|
1054
1054
|
blurInput() {
|
|
1055
1055
|
this.getInput().blur();
|
|
1056
1056
|
},
|
|
1057
|
-
handleMouseDown:
|
|
1057
|
+
handleMouseDown: b(function(t) {
|
|
1058
1058
|
if (t.preventDefault(), t.stopPropagation(), this.disabled)
|
|
1059
1059
|
return;
|
|
1060
1060
|
this.getValueContainer().$el.contains(t.target) && !this.menu.isOpen && (this.openOnClick || this.trigger.isFocused) && this.openMenu(), this._blurOnSelect ? this.blurInput() : this.focusInput(), this.resetFlags();
|
|
@@ -1068,17 +1068,17 @@ const dt = {
|
|
|
1068
1068
|
return this.localSearch.active = !1, t();
|
|
1069
1069
|
this.localSearch.active = !0, this.localSearch.noResults = !0, this.traverseAllNodesDFS((i) => {
|
|
1070
1070
|
i.isBranch && (i.isExpandedOnSearch = !1, i.showAllChildrenOnSearch = !1, i.isMatched = !1, i.hasMatchedDescendants = !1, this.$set(this.localSearch.countMap, i.id, {
|
|
1071
|
-
[$]: 0,
|
|
1072
|
-
[w]: 0,
|
|
1073
1071
|
[C]: 0,
|
|
1074
|
-
[L]: 0
|
|
1072
|
+
[L]: 0,
|
|
1073
|
+
[M]: 0,
|
|
1074
|
+
[T]: 0
|
|
1075
1075
|
}));
|
|
1076
1076
|
});
|
|
1077
1077
|
const s = e.trim().toLocaleLowerCase(), n = s.replace(/\s+/g, " ").split(" ");
|
|
1078
1078
|
this.traverseAllNodesDFS((i) => {
|
|
1079
|
-
this.searchNested && n.length > 1 ? i.isMatched = n.every((
|
|
1080
|
-
(
|
|
1081
|
-
), i.isMatched && (this.localSearch.noResults = !1, i.ancestors.forEach((
|
|
1079
|
+
this.searchNested && n.length > 1 ? i.isMatched = n.every((l) => oe(!1, l, i.nestedSearchLabel)) : i.isMatched = this.matchKeys.some(
|
|
1080
|
+
(l) => oe(!this.disableFuzzyMatching, s, i.lowerCased[l])
|
|
1081
|
+
), i.isMatched && (this.localSearch.noResults = !1, i.ancestors.forEach((l) => this.localSearch.countMap[l.id][L]++), i.isLeaf && i.ancestors.forEach((l) => this.localSearch.countMap[l.id][T]++), i.parentNode !== E && (this.localSearch.countMap[i.parentNode.id][C] += 1, i.isLeaf && (this.localSearch.countMap[i.parentNode.id][M] += 1))), (i.isMatched || i.isBranch && i.isExpandedOnSearch) && i.parentNode !== E && (i.parentNode.isExpandedOnSearch = !0, i.parentNode.hasMatchedDescendants = !0);
|
|
1082
1082
|
}), t();
|
|
1083
1083
|
},
|
|
1084
1084
|
handleRemoteSearch() {
|
|
@@ -1088,7 +1088,7 @@ const dt = {
|
|
|
1088
1088
|
if ((e === "" || this.cacheOptions) && t.isLoaded)
|
|
1089
1089
|
return s();
|
|
1090
1090
|
this.callLoadOptionsProp({
|
|
1091
|
-
action:
|
|
1091
|
+
action: Ue,
|
|
1092
1092
|
args: { searchQuery: e },
|
|
1093
1093
|
isPending() {
|
|
1094
1094
|
return t.isLoading;
|
|
@@ -1100,7 +1100,7 @@ const dt = {
|
|
|
1100
1100
|
t.isLoaded = !0, t.options = n, this.trigger.searchQuery === e && s();
|
|
1101
1101
|
},
|
|
1102
1102
|
fail: (n) => {
|
|
1103
|
-
t.loadingError =
|
|
1103
|
+
t.loadingError = P(n);
|
|
1104
1104
|
},
|
|
1105
1105
|
end: () => {
|
|
1106
1106
|
t.isLoading = !1;
|
|
@@ -1108,7 +1108,7 @@ const dt = {
|
|
|
1108
1108
|
});
|
|
1109
1109
|
},
|
|
1110
1110
|
getRemoteSearchEntry() {
|
|
1111
|
-
const { searchQuery: e } = this.trigger, t = this.remoteSearch[e] ||
|
|
1111
|
+
const { searchQuery: e } = this.trigger, t = this.remoteSearch[e] || w(v({}, H()), {
|
|
1112
1112
|
options: []
|
|
1113
1113
|
});
|
|
1114
1114
|
if (this.$watch(
|
|
@@ -1145,8 +1145,8 @@ const dt = {
|
|
|
1145
1145
|
const s = this.menu.current;
|
|
1146
1146
|
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) {
|
|
1147
1147
|
const n = () => {
|
|
1148
|
-
const i = this.getMenu(),
|
|
1149
|
-
|
|
1148
|
+
const i = this.getMenu(), l = i.querySelector(`.vue-treeselect__option[data-id="${e.id}"]`);
|
|
1149
|
+
l && Ve(i, l);
|
|
1150
1150
|
};
|
|
1151
1151
|
this.getMenu() ? n() : this.$nextTick(n);
|
|
1152
1152
|
}
|
|
@@ -1180,7 +1180,7 @@ const dt = {
|
|
|
1180
1180
|
highlightLastOption() {
|
|
1181
1181
|
if (!this.hasVisibleOptions)
|
|
1182
1182
|
return;
|
|
1183
|
-
const e =
|
|
1183
|
+
const e = ee(this.visibleOptionIds);
|
|
1184
1184
|
this.setCurrentHighlightedOption(this.getNode(e));
|
|
1185
1185
|
},
|
|
1186
1186
|
resetSearchQuery() {
|
|
@@ -1200,66 +1200,66 @@ const dt = {
|
|
|
1200
1200
|
this.localSearch.active ? (t = e.isExpandedOnSearch = !e.isExpandedOnSearch, t && (e.showAllChildrenOnSearch = !0)) : t = e.isExpanded = !e.isExpanded, t && !e.childrenStates.isLoaded && this.loadChildrenOptions(e);
|
|
1201
1201
|
},
|
|
1202
1202
|
buildForestState() {
|
|
1203
|
-
const e =
|
|
1203
|
+
const e = S();
|
|
1204
1204
|
this.forest.selectedNodeIds.forEach((s) => {
|
|
1205
1205
|
e[s] = !0;
|
|
1206
1206
|
}), this.forest.selectedNodeMap = e;
|
|
1207
|
-
const t =
|
|
1207
|
+
const t = S();
|
|
1208
1208
|
this.multiple && (this.traverseAllNodesByIndex((s) => {
|
|
1209
|
-
t[s.id] =
|
|
1209
|
+
t[s.id] = Y;
|
|
1210
1210
|
}), this.selectedNodes.forEach((s) => {
|
|
1211
|
-
t[s.id] =
|
|
1212
|
-
this.isSelected(n) || (t[n.id] =
|
|
1211
|
+
t[s.id] = ge, !this.flat && !this.disableBranchNodes && s.ancestors.forEach((n) => {
|
|
1212
|
+
this.isSelected(n) || (t[n.id] = me);
|
|
1213
1213
|
});
|
|
1214
1214
|
})), this.forest.checkedStateMap = t;
|
|
1215
1215
|
},
|
|
1216
1216
|
enhancedNormalizer(e) {
|
|
1217
|
-
return
|
|
1217
|
+
return v(v({}, e), this.normalizer(e, this.getInstanceId()));
|
|
1218
1218
|
},
|
|
1219
1219
|
normalize(e, t, s) {
|
|
1220
|
-
let n = t.map((i) => [this.enhancedNormalizer(i), i]).map(([i,
|
|
1220
|
+
let n = t.map((i) => [this.enhancedNormalizer(i), i]).map(([i, l], o) => {
|
|
1221
1221
|
this.checkDuplication(i), this.verifyNodeShape(i);
|
|
1222
|
-
const { id:
|
|
1223
|
-
(
|
|
1224
|
-
[
|
|
1222
|
+
const { id: u, label: p, children: c, isDefaultExpanded: g } = i, f = e === E, N = f ? 0 : e.level + 1, I = Array.isArray(c) || c === null, A = !I, G = !!i.isDisabled || !this.flat && !f && e.isDisabled, be = !!i.isNew, V = this.matchKeys.reduce(
|
|
1223
|
+
(h, D) => w(v({}, h), {
|
|
1224
|
+
[D]: Ge(i[D]).toLocaleLowerCase()
|
|
1225
1225
|
}),
|
|
1226
1226
|
{}
|
|
1227
|
-
),
|
|
1228
|
-
if (this.$set(
|
|
1229
|
-
const
|
|
1230
|
-
this.$set(
|
|
1231
|
-
isLoaded:
|
|
1227
|
+
), we = f ? V.label : `${e.nestedSearchLabel} ${V.label}`, a = this.$set(this.forest.nodeMap, u, S());
|
|
1228
|
+
if (this.$set(a, "id", u), this.$set(a, "label", p), this.$set(a, "level", N), this.$set(a, "ancestors", f ? [] : [e].concat(e.ancestors)), this.$set(a, "index", (f ? [] : e.index).concat(o)), this.$set(a, "parentNode", e), this.$set(a, "lowerCased", V), this.$set(a, "nestedSearchLabel", we), this.$set(a, "isDisabled", G), this.$set(a, "isNew", be), this.$set(a, "isMatched", !1), this.$set(a, "isHighlighted", !1), this.$set(a, "isBranch", I), this.$set(a, "isLeaf", A), this.$set(a, "isRootNode", f), this.$set(a, "raw", l), I) {
|
|
1229
|
+
const h = Array.isArray(c);
|
|
1230
|
+
this.$set(a, "childrenStates", w(v({}, H()), {
|
|
1231
|
+
isLoaded: h
|
|
1232
1232
|
})), this.$set(
|
|
1233
|
-
|
|
1233
|
+
a,
|
|
1234
1234
|
"isExpanded",
|
|
1235
|
-
typeof
|
|
1236
|
-
), this.$set(
|
|
1237
|
-
[$]: 0,
|
|
1238
|
-
[w]: 0,
|
|
1235
|
+
typeof g == "boolean" ? g : N < this.defaultExpandLevel
|
|
1236
|
+
), this.$set(a, "hasMatchedDescendants", !1), this.$set(a, "hasDisabledDescendants", !1), this.$set(a, "isExpandedOnSearch", !1), this.$set(a, "showAllChildrenOnSearch", !1), this.$set(a, "count", {
|
|
1239
1237
|
[C]: 0,
|
|
1240
|
-
[L]: 0
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
}),
|
|
1238
|
+
[L]: 0,
|
|
1239
|
+
[M]: 0,
|
|
1240
|
+
[T]: 0
|
|
1241
|
+
}), this.$set(a, "children", h ? this.normalize(a, c, s) : []), g === !0 && a.ancestors.forEach((D) => {
|
|
1242
|
+
D.isExpanded = !0;
|
|
1243
|
+
}), !h && typeof this.loadOptions != "function" ? O(
|
|
1244
1244
|
() => !1,
|
|
1245
1245
|
() => 'Unloaded branch node detected. "loadOptions" prop is required to load its children.'
|
|
1246
|
-
) : !
|
|
1246
|
+
) : !h && a.isExpanded && this.loadChildrenOptions(a);
|
|
1247
1247
|
}
|
|
1248
|
-
if (
|
|
1249
|
-
const
|
|
1250
|
-
|
|
1248
|
+
if (a.ancestors.forEach((h) => h.count[L]++), A && a.ancestors.forEach((h) => h.count[T]++), f || (e.count[C] += 1, A && (e.count[M] += 1), G && (e.hasDisabledDescendants = !0)), s && s[u]) {
|
|
1249
|
+
const h = s[u];
|
|
1250
|
+
a.isMatched = h.isMatched, a.showAllChildrenOnSearch = h.showAllChildrenOnSearch, a.isHighlighted = h.isHighlighted, h.isBranch && a.isBranch && (a.isExpanded = h.isExpanded, a.isExpandedOnSearch = h.isExpandedOnSearch, h.childrenStates.isLoaded && !a.childrenStates.isLoaded ? a.isExpanded = !1 : a.childrenStates = v({}, h.childrenStates));
|
|
1251
1251
|
}
|
|
1252
|
-
return
|
|
1252
|
+
return a;
|
|
1253
1253
|
});
|
|
1254
1254
|
if (this.branchNodesFirst) {
|
|
1255
|
-
const i = n.filter((
|
|
1256
|
-
n = i.concat(
|
|
1255
|
+
const i = n.filter((o) => o.isBranch), l = n.filter((o) => o.isLeaf);
|
|
1256
|
+
n = i.concat(l);
|
|
1257
1257
|
}
|
|
1258
1258
|
return n;
|
|
1259
1259
|
},
|
|
1260
1260
|
loadRootOptions() {
|
|
1261
1261
|
this.callLoadOptionsProp({
|
|
1262
|
-
action:
|
|
1262
|
+
action: Ke,
|
|
1263
1263
|
isPending: () => this.rootOptionsStates.isLoading,
|
|
1264
1264
|
start: () => {
|
|
1265
1265
|
this.rootOptionsStates.isLoading = !0, this.rootOptionsStates.loadingError = "";
|
|
@@ -1270,7 +1270,7 @@ const dt = {
|
|
|
1270
1270
|
});
|
|
1271
1271
|
},
|
|
1272
1272
|
fail: (e) => {
|
|
1273
|
-
this.rootOptionsStates.loadingError =
|
|
1273
|
+
this.rootOptionsStates.loadingError = P(e);
|
|
1274
1274
|
},
|
|
1275
1275
|
end: () => {
|
|
1276
1276
|
this.rootOptionsStates.isLoading = !1;
|
|
@@ -1280,7 +1280,7 @@ const dt = {
|
|
|
1280
1280
|
loadChildrenOptions(e) {
|
|
1281
1281
|
const { id: t, raw: s } = e;
|
|
1282
1282
|
this.callLoadOptionsProp({
|
|
1283
|
-
action:
|
|
1283
|
+
action: qe,
|
|
1284
1284
|
args: {
|
|
1285
1285
|
// We always pass the raw node instead of the normalized node to any
|
|
1286
1286
|
// callback provided by the user of this component.
|
|
@@ -1296,45 +1296,45 @@ const dt = {
|
|
|
1296
1296
|
this.getNode(t).childrenStates.isLoaded = !0;
|
|
1297
1297
|
},
|
|
1298
1298
|
fail: (n) => {
|
|
1299
|
-
this.getNode(t).childrenStates.loadingError =
|
|
1299
|
+
this.getNode(t).childrenStates.loadingError = P(n);
|
|
1300
1300
|
},
|
|
1301
1301
|
end: () => {
|
|
1302
1302
|
this.getNode(t).childrenStates.isLoading = !1;
|
|
1303
1303
|
}
|
|
1304
1304
|
});
|
|
1305
1305
|
},
|
|
1306
|
-
callLoadOptionsProp({ action: e, args: t, isPending: s, start: n, succeed: i, fail:
|
|
1306
|
+
callLoadOptionsProp({ action: e, args: t, isPending: s, start: n, succeed: i, fail: l, end: o }) {
|
|
1307
1307
|
if (!this.loadOptions || s())
|
|
1308
1308
|
return;
|
|
1309
1309
|
n();
|
|
1310
|
-
const
|
|
1311
|
-
|
|
1312
|
-
}),
|
|
1310
|
+
const u = Ie((c, g) => {
|
|
1311
|
+
c ? l(c) : i(g), o();
|
|
1312
|
+
}), p = this.loadOptions(w(v({
|
|
1313
1313
|
id: this.getInstanceId(),
|
|
1314
1314
|
instanceId: this.getInstanceId(),
|
|
1315
1315
|
action: e
|
|
1316
1316
|
}, t), {
|
|
1317
|
-
callback:
|
|
1317
|
+
callback: u
|
|
1318
1318
|
}));
|
|
1319
|
-
|
|
1319
|
+
le(p) && p.then(
|
|
1320
1320
|
() => {
|
|
1321
|
-
|
|
1321
|
+
u();
|
|
1322
1322
|
},
|
|
1323
|
-
(
|
|
1324
|
-
c
|
|
1323
|
+
(c) => {
|
|
1324
|
+
u(c);
|
|
1325
1325
|
}
|
|
1326
|
-
).catch((
|
|
1327
|
-
console.error(
|
|
1326
|
+
).catch((c) => {
|
|
1327
|
+
console.error(c);
|
|
1328
1328
|
});
|
|
1329
1329
|
},
|
|
1330
1330
|
checkDuplication(e) {
|
|
1331
|
-
|
|
1331
|
+
O(
|
|
1332
1332
|
() => !(e.id in this.forest.nodeMap && !this.forest.nodeMap[e.id].isFallbackNode),
|
|
1333
1333
|
() => `Detected duplicate presence of node id ${JSON.stringify(e.id)}. Their labels are "${this.forest.nodeMap[e.id].label}" and "${e.label}" respectively.`
|
|
1334
1334
|
);
|
|
1335
1335
|
},
|
|
1336
1336
|
verifyNodeShape(e) {
|
|
1337
|
-
|
|
1337
|
+
O(
|
|
1338
1338
|
() => !(e.children === void 0 && e.isBranch === !0),
|
|
1339
1339
|
() => "Are you meant to declare an unloaded branch node? `isBranch: true` is no longer supported, please use `children: null` instead."
|
|
1340
1340
|
);
|
|
@@ -1343,7 +1343,7 @@ const dt = {
|
|
|
1343
1343
|
if (this.disabled || e.isDisabled)
|
|
1344
1344
|
return;
|
|
1345
1345
|
this.single && this.clear();
|
|
1346
|
-
const t = this.multiple && !this.flat ? this.forest.checkedStateMap[e.id] ===
|
|
1346
|
+
const t = this.multiple && !this.flat ? this.forest.checkedStateMap[e.id] === Y : !this.isSelected(e);
|
|
1347
1347
|
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));
|
|
1348
1348
|
},
|
|
1349
1349
|
clear() {
|
|
@@ -1400,14 +1400,14 @@ const dt = {
|
|
|
1400
1400
|
this.forest.selectedNodeIds.push(e.id), this.forest.selectedNodeMap[e.id] = !0;
|
|
1401
1401
|
},
|
|
1402
1402
|
removeValue(e) {
|
|
1403
|
-
|
|
1403
|
+
ae(this.forest.selectedNodeIds, e.id), delete this.forest.selectedNodeMap[e.id];
|
|
1404
1404
|
},
|
|
1405
1405
|
removeLastValue() {
|
|
1406
1406
|
if (!this.hasValue)
|
|
1407
1407
|
return;
|
|
1408
1408
|
if (this.single)
|
|
1409
1409
|
return this.clear();
|
|
1410
|
-
const e =
|
|
1410
|
+
const e = ee(this.internalValue), t = this.getNode(e);
|
|
1411
1411
|
this.select(t);
|
|
1412
1412
|
},
|
|
1413
1413
|
saveMenuScrollPosition() {
|
|
@@ -1429,96 +1429,88 @@ const dt = {
|
|
|
1429
1429
|
this.toggleClickOutsideEvent(!1);
|
|
1430
1430
|
}
|
|
1431
1431
|
};
|
|
1432
|
-
function
|
|
1433
|
-
return typeof e == "string" ? e : e != null &&
|
|
1432
|
+
function et(e) {
|
|
1433
|
+
return typeof e == "string" ? e : e != null && !de(e) ? JSON.stringify(e) : "";
|
|
1434
1434
|
}
|
|
1435
|
-
const
|
|
1435
|
+
const tt = {
|
|
1436
1436
|
name: "VueTreeSelectHiddenFields",
|
|
1437
1437
|
functional: !0,
|
|
1438
1438
|
inject: ["instance"],
|
|
1439
1439
|
render(e, t) {
|
|
1440
|
-
const
|
|
1441
|
-
instance:
|
|
1440
|
+
const {
|
|
1441
|
+
instance: s
|
|
1442
1442
|
} = t.injections;
|
|
1443
|
-
if (!
|
|
1443
|
+
if (!s.name || s.disabled || !s.hasValue)
|
|
1444
1444
|
return null;
|
|
1445
|
-
let
|
|
1446
|
-
return
|
|
1445
|
+
let n = s.internalValue.map(et);
|
|
1446
|
+
return s.multiple && s.joinValues && (n = [n.join(s.delimiter)]), n.map((i, l) => r("input", {
|
|
1447
1447
|
attrs: {
|
|
1448
1448
|
type: "hidden",
|
|
1449
|
-
name:
|
|
1449
|
+
name: s.name
|
|
1450
1450
|
},
|
|
1451
1451
|
domProps: {
|
|
1452
|
-
value:
|
|
1452
|
+
value: i
|
|
1453
1453
|
},
|
|
1454
|
-
key: `hidden-field-${
|
|
1454
|
+
key: `hidden-field-${l}`
|
|
1455
1455
|
}));
|
|
1456
1456
|
}
|
|
1457
|
-
};
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
mt,
|
|
1463
|
-
gt,
|
|
1457
|
+
}, st = null, nt = null;
|
|
1458
|
+
var it = /* @__PURE__ */ m(
|
|
1459
|
+
tt,
|
|
1460
|
+
st,
|
|
1461
|
+
nt,
|
|
1464
1462
|
!1,
|
|
1465
|
-
|
|
1463
|
+
null,
|
|
1466
1464
|
null,
|
|
1467
1465
|
null,
|
|
1468
1466
|
null
|
|
1469
1467
|
);
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
this[t] = oe[t];
|
|
1473
|
-
}
|
|
1474
|
-
const St = /* @__PURE__ */ function() {
|
|
1475
|
-
return _t.exports;
|
|
1476
|
-
}();
|
|
1477
|
-
function Ot(e) {
|
|
1468
|
+
const rt = it.exports;
|
|
1469
|
+
function ot(e) {
|
|
1478
1470
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
1479
1471
|
}
|
|
1480
|
-
function
|
|
1481
|
-
return
|
|
1472
|
+
function X() {
|
|
1473
|
+
return X = Object.assign ? Object.assign.bind() : function(e) {
|
|
1482
1474
|
for (var t, s = 1; s < arguments.length; s++)
|
|
1483
1475
|
for (var n in t = arguments[s], t)
|
|
1484
1476
|
Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
1485
1477
|
return e;
|
|
1486
|
-
},
|
|
1478
|
+
}, X.apply(this, arguments);
|
|
1487
1479
|
}
|
|
1488
|
-
var
|
|
1480
|
+
var lt = ["attrs", "props", "domProps"], at = ["class", "style", "directives"], ct = ["on", "nativeOn"], ut = function(e) {
|
|
1489
1481
|
return e.reduce(function(t, s) {
|
|
1490
1482
|
for (var n in s)
|
|
1491
1483
|
if (!t[n])
|
|
1492
1484
|
t[n] = s[n];
|
|
1493
|
-
else if (
|
|
1494
|
-
t[n] =
|
|
1495
|
-
else if (
|
|
1496
|
-
var i = t[n] instanceof Array ? t[n] : [t[n]],
|
|
1497
|
-
t[n] = [].concat(i,
|
|
1498
|
-
} else if (
|
|
1499
|
-
for (var
|
|
1500
|
-
if (t[n][
|
|
1501
|
-
var
|
|
1502
|
-
t[n][
|
|
1485
|
+
else if (lt.indexOf(n) !== -1)
|
|
1486
|
+
t[n] = X({}, t[n], s[n]);
|
|
1487
|
+
else if (at.indexOf(n) !== -1) {
|
|
1488
|
+
var i = t[n] instanceof Array ? t[n] : [t[n]], l = s[n] instanceof Array ? s[n] : [s[n]];
|
|
1489
|
+
t[n] = [].concat(i, l);
|
|
1490
|
+
} else if (ct.indexOf(n) !== -1)
|
|
1491
|
+
for (var o in s[n])
|
|
1492
|
+
if (t[n][o]) {
|
|
1493
|
+
var u = t[n][o] instanceof Array ? t[n][o] : [t[n][o]], p = s[n][o] instanceof Array ? s[n][o] : [s[n][o]];
|
|
1494
|
+
t[n][o] = [].concat(u, p);
|
|
1503
1495
|
} else
|
|
1504
|
-
t[n][
|
|
1496
|
+
t[n][o] = s[n][o];
|
|
1505
1497
|
else if (n === "hook")
|
|
1506
|
-
for (var
|
|
1507
|
-
t[n][
|
|
1498
|
+
for (var c in s[n])
|
|
1499
|
+
t[n][c] = t[n][c] ? ht(t[n][c], s[n][c]) : s[n][c];
|
|
1508
1500
|
else
|
|
1509
1501
|
t[n] = s[n];
|
|
1510
1502
|
return t;
|
|
1511
1503
|
}, {});
|
|
1512
|
-
},
|
|
1504
|
+
}, ht = function(e, t) {
|
|
1513
1505
|
return function() {
|
|
1514
1506
|
e && e.apply(this, arguments), t && t.apply(this, arguments);
|
|
1515
1507
|
};
|
|
1516
|
-
},
|
|
1517
|
-
const
|
|
1508
|
+
}, dt = ut;
|
|
1509
|
+
const $ = /* @__PURE__ */ ot(dt), pt = [d.ENTER, d.END, d.HOME, d.ARROW_LEFT, d.ARROW_UP, d.ARROW_RIGHT, d.ARROW_DOWN], ft = {
|
|
1518
1510
|
name: "VueTreeSelectInput",
|
|
1519
1511
|
inject: ["instance"],
|
|
1520
1512
|
data: () => ({
|
|
1521
|
-
inputWidth:
|
|
1513
|
+
inputWidth: ie,
|
|
1522
1514
|
value: ""
|
|
1523
1515
|
}),
|
|
1524
1516
|
computed: {
|
|
@@ -1543,7 +1535,7 @@ const D = /* @__PURE__ */ Ot(wt), Ct = [h.ENTER, h.END, h.HOME, h.ARROW_LEFT, h.
|
|
|
1543
1535
|
}
|
|
1544
1536
|
},
|
|
1545
1537
|
created() {
|
|
1546
|
-
this.debouncedCallback =
|
|
1538
|
+
this.debouncedCallback = Ae(this.updateSearchQuery, Ye, {
|
|
1547
1539
|
leading: !0,
|
|
1548
1540
|
trailing: !0
|
|
1549
1541
|
});
|
|
@@ -1594,14 +1586,14 @@ const D = /* @__PURE__ */ Ot(wt), Ct = [h.ENTER, h.END, h.HOME, h.ARROW_LEFT, h.
|
|
|
1594
1586
|
e.keyCode
|
|
1595
1587
|
);
|
|
1596
1588
|
if (!(e.ctrlKey || e.shiftKey || e.altKey || e.metaKey)) {
|
|
1597
|
-
if (!t.menu.isOpen &&
|
|
1589
|
+
if (!t.menu.isOpen && y(pt, s))
|
|
1598
1590
|
return e.preventDefault(), t.openMenu();
|
|
1599
1591
|
switch (s) {
|
|
1600
|
-
case
|
|
1592
|
+
case d.BACKSPACE: {
|
|
1601
1593
|
t.backspaceRemoves && !this.value.length && t.removeLastValue();
|
|
1602
1594
|
break;
|
|
1603
1595
|
}
|
|
1604
|
-
case
|
|
1596
|
+
case d.ENTER: {
|
|
1605
1597
|
if (e.preventDefault(), t.menu.current === null)
|
|
1606
1598
|
return;
|
|
1607
1599
|
const n = t.getNode(t.menu.current);
|
|
@@ -1610,37 +1602,37 @@ const D = /* @__PURE__ */ Ot(wt), Ct = [h.ENTER, h.END, h.HOME, h.ARROW_LEFT, h.
|
|
|
1610
1602
|
t.select(n);
|
|
1611
1603
|
break;
|
|
1612
1604
|
}
|
|
1613
|
-
case
|
|
1605
|
+
case d.ESCAPE: {
|
|
1614
1606
|
this.value.length ? this.clear() : t.menu.isOpen && t.closeMenu();
|
|
1615
1607
|
break;
|
|
1616
1608
|
}
|
|
1617
|
-
case
|
|
1609
|
+
case d.END: {
|
|
1618
1610
|
e.preventDefault(), t.highlightLastOption();
|
|
1619
1611
|
break;
|
|
1620
1612
|
}
|
|
1621
|
-
case
|
|
1613
|
+
case d.HOME: {
|
|
1622
1614
|
e.preventDefault(), t.highlightFirstOption();
|
|
1623
1615
|
break;
|
|
1624
1616
|
}
|
|
1625
|
-
case
|
|
1617
|
+
case d.ARROW_LEFT: {
|
|
1626
1618
|
const n = t.getNode(t.menu.current);
|
|
1627
1619
|
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));
|
|
1628
1620
|
break;
|
|
1629
1621
|
}
|
|
1630
|
-
case
|
|
1622
|
+
case d.ARROW_UP: {
|
|
1631
1623
|
e.preventDefault(), t.highlightPrevOption();
|
|
1632
1624
|
break;
|
|
1633
1625
|
}
|
|
1634
|
-
case
|
|
1626
|
+
case d.ARROW_RIGHT: {
|
|
1635
1627
|
const n = t.getNode(t.menu.current);
|
|
1636
1628
|
n.isBranch && !t.shouldExpand(n) && (e.preventDefault(), t.toggleExpanded(n));
|
|
1637
1629
|
break;
|
|
1638
1630
|
}
|
|
1639
|
-
case
|
|
1631
|
+
case d.ARROW_DOWN: {
|
|
1640
1632
|
e.preventDefault(), t.highlightNextOption();
|
|
1641
1633
|
break;
|
|
1642
1634
|
}
|
|
1643
|
-
case
|
|
1635
|
+
case d.DELETE: {
|
|
1644
1636
|
t.deleteRemoves && !this.value.length && t.removeLastValue();
|
|
1645
1637
|
break;
|
|
1646
1638
|
}
|
|
@@ -1653,36 +1645,36 @@ const D = /* @__PURE__ */ Ot(wt), Ct = [h.ENTER, h.END, h.HOME, h.ARROW_LEFT, h.
|
|
|
1653
1645
|
this.value.length && e.stopPropagation();
|
|
1654
1646
|
},
|
|
1655
1647
|
renderInputContainer() {
|
|
1656
|
-
const
|
|
1657
|
-
instance:
|
|
1658
|
-
} = this,
|
|
1659
|
-
return
|
|
1648
|
+
const {
|
|
1649
|
+
instance: e
|
|
1650
|
+
} = this, t = {}, s = [];
|
|
1651
|
+
return e.searchable && !e.disabled && (s.push(this.renderInput()), this.needAutoSize && s.push(this.renderSizer())), e.searchable || U(t, {
|
|
1660
1652
|
on: {
|
|
1661
1653
|
focus: this.onFocus,
|
|
1662
1654
|
blur: this.onBlur,
|
|
1663
1655
|
keydown: this.onKeyDown
|
|
1664
1656
|
},
|
|
1665
1657
|
ref: "input"
|
|
1666
|
-
}), !
|
|
1658
|
+
}), !e.searchable && !e.disabled && U(t, {
|
|
1667
1659
|
attrs: {
|
|
1668
|
-
tabIndex:
|
|
1660
|
+
tabIndex: e.tabIndex
|
|
1669
1661
|
}
|
|
1670
|
-
}),
|
|
1662
|
+
}), r("div", $([{
|
|
1671
1663
|
class: "vue-treeselect__input-container"
|
|
1672
|
-
},
|
|
1664
|
+
}, t]), [s]);
|
|
1673
1665
|
},
|
|
1674
1666
|
renderInput() {
|
|
1675
|
-
const
|
|
1676
|
-
instance:
|
|
1667
|
+
const {
|
|
1668
|
+
instance: e
|
|
1677
1669
|
} = this;
|
|
1678
|
-
return
|
|
1670
|
+
return r("input", {
|
|
1679
1671
|
ref: "input",
|
|
1680
1672
|
class: "vue-treeselect__input",
|
|
1681
1673
|
attrs: {
|
|
1682
1674
|
type: "text",
|
|
1683
1675
|
autocomplete: "off",
|
|
1684
|
-
tabIndex:
|
|
1685
|
-
required:
|
|
1676
|
+
tabIndex: e.tabIndex,
|
|
1677
|
+
required: e.required && !e.hasValue
|
|
1686
1678
|
},
|
|
1687
1679
|
domProps: {
|
|
1688
1680
|
value: this.value
|
|
@@ -1698,14 +1690,13 @@ const D = /* @__PURE__ */ Ot(wt), Ct = [h.ENTER, h.END, h.HOME, h.ARROW_LEFT, h.
|
|
|
1698
1690
|
});
|
|
1699
1691
|
},
|
|
1700
1692
|
renderSizer() {
|
|
1701
|
-
|
|
1702
|
-
return e("div", {
|
|
1693
|
+
return r("div", {
|
|
1703
1694
|
ref: "sizer",
|
|
1704
1695
|
class: "vue-treeselect__sizer"
|
|
1705
1696
|
}, [this.value]);
|
|
1706
1697
|
},
|
|
1707
1698
|
updateInputWidth() {
|
|
1708
|
-
this.inputWidth = Math.max(
|
|
1699
|
+
this.inputWidth = Math.max(ie, this.$refs.sizer.scrollWidth + 15);
|
|
1709
1700
|
},
|
|
1710
1701
|
updateSearchQuery() {
|
|
1711
1702
|
const {
|
|
@@ -1717,60 +1708,44 @@ const D = /* @__PURE__ */ Ot(wt), Ct = [h.ENTER, h.END, h.HOME, h.ARROW_LEFT, h.
|
|
|
1717
1708
|
render() {
|
|
1718
1709
|
return this.renderInputContainer();
|
|
1719
1710
|
}
|
|
1720
|
-
};
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
Mt,
|
|
1726
|
-
xt,
|
|
1711
|
+
}, mt = null, gt = null;
|
|
1712
|
+
var St = /* @__PURE__ */ m(
|
|
1713
|
+
ft,
|
|
1714
|
+
mt,
|
|
1715
|
+
gt,
|
|
1727
1716
|
!1,
|
|
1728
|
-
|
|
1717
|
+
null,
|
|
1729
1718
|
null,
|
|
1730
1719
|
null,
|
|
1731
1720
|
null
|
|
1732
1721
|
);
|
|
1733
|
-
|
|
1734
|
-
for (let t in le)
|
|
1735
|
-
this[t] = le[t];
|
|
1736
|
-
}
|
|
1737
|
-
const Te = /* @__PURE__ */ function() {
|
|
1738
|
-
return Tt.exports;
|
|
1739
|
-
}(), Rt = {
|
|
1722
|
+
const ve = St.exports, vt = {
|
|
1740
1723
|
name: "VueTreeSelectPlaceholder",
|
|
1741
1724
|
inject: ["instance"],
|
|
1742
1725
|
render() {
|
|
1743
|
-
const
|
|
1744
|
-
instance:
|
|
1745
|
-
} = this,
|
|
1726
|
+
const {
|
|
1727
|
+
instance: e
|
|
1728
|
+
} = this, t = {
|
|
1746
1729
|
"vue-treeselect__placeholder": !0,
|
|
1747
1730
|
"vue-treeselect-helper-zoom-effect-off": !0,
|
|
1748
|
-
"vue-treeselect-helper-hide":
|
|
1731
|
+
"vue-treeselect-helper-hide": e.hasValue || e.trigger.searchQuery
|
|
1749
1732
|
};
|
|
1750
|
-
return
|
|
1751
|
-
class:
|
|
1752
|
-
}, [
|
|
1733
|
+
return r("div", {
|
|
1734
|
+
class: t
|
|
1735
|
+
}, [e.placeholder]);
|
|
1753
1736
|
}
|
|
1754
|
-
};
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
It,
|
|
1760
|
-
At,
|
|
1737
|
+
}, _t = null, Ot = null;
|
|
1738
|
+
var yt = /* @__PURE__ */ m(
|
|
1739
|
+
vt,
|
|
1740
|
+
_t,
|
|
1741
|
+
Ot,
|
|
1761
1742
|
!1,
|
|
1762
|
-
|
|
1743
|
+
null,
|
|
1763
1744
|
null,
|
|
1764
1745
|
null,
|
|
1765
1746
|
null
|
|
1766
1747
|
);
|
|
1767
|
-
|
|
1768
|
-
for (let t in ae)
|
|
1769
|
-
this[t] = ae[t];
|
|
1770
|
-
}
|
|
1771
|
-
const De = /* @__PURE__ */ function() {
|
|
1772
|
-
return Vt.exports;
|
|
1773
|
-
}(), zt = {
|
|
1748
|
+
const _e = yt.exports, Nt = {
|
|
1774
1749
|
name: "VueTreeSelectSingleValue",
|
|
1775
1750
|
inject: ["instance"],
|
|
1776
1751
|
methods: {
|
|
@@ -1784,71 +1759,46 @@ const De = /* @__PURE__ */ function() {
|
|
|
1784
1759
|
}
|
|
1785
1760
|
},
|
|
1786
1761
|
render() {
|
|
1787
|
-
const
|
|
1788
|
-
instance:
|
|
1762
|
+
const {
|
|
1763
|
+
instance: e,
|
|
1789
1764
|
$parent: {
|
|
1790
|
-
renderValueContainer:
|
|
1765
|
+
renderValueContainer: t
|
|
1791
1766
|
}
|
|
1792
|
-
} = this,
|
|
1793
|
-
return
|
|
1767
|
+
} = this, s = e.hasValue && !e.trigger.searchQuery;
|
|
1768
|
+
return t([s && r("div", {
|
|
1794
1769
|
class: "vue-treeselect__single-value"
|
|
1795
|
-
}, [this.renderSingleValueLabel()]),
|
|
1770
|
+
}, [this.renderSingleValueLabel()]), r(_e), r(ve, {
|
|
1796
1771
|
ref: "input"
|
|
1797
1772
|
})]);
|
|
1798
1773
|
}
|
|
1799
|
-
};
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
Ft,
|
|
1805
|
-
kt,
|
|
1774
|
+
}, Et = null, bt = null;
|
|
1775
|
+
var wt = /* @__PURE__ */ m(
|
|
1776
|
+
Nt,
|
|
1777
|
+
Et,
|
|
1778
|
+
bt,
|
|
1806
1779
|
!1,
|
|
1807
|
-
|
|
1780
|
+
null,
|
|
1808
1781
|
null,
|
|
1809
1782
|
null,
|
|
1810
1783
|
null
|
|
1811
1784
|
);
|
|
1812
|
-
|
|
1813
|
-
for (let t in ce)
|
|
1814
|
-
this[t] = ce[t];
|
|
1815
|
-
}
|
|
1816
|
-
const Wt = /* @__PURE__ */ function() {
|
|
1817
|
-
return Ht.exports;
|
|
1818
|
-
}();
|
|
1819
|
-
var jt = function() {
|
|
1820
|
-
var e = this, t = e.$createElement, s = e._self._c || t;
|
|
1821
|
-
return s("svg", {
|
|
1822
|
-
attrs: {
|
|
1823
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1824
|
-
viewBox: "0 0 348.333 348.333"
|
|
1825
|
-
}
|
|
1826
|
-
}, [s("path", {
|
|
1827
|
-
attrs: {
|
|
1828
|
-
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"
|
|
1829
|
-
}
|
|
1830
|
-
})]);
|
|
1831
|
-
}, Qt = [];
|
|
1832
|
-
const Kt = {
|
|
1785
|
+
const Ct = wt.exports, Lt = {
|
|
1833
1786
|
name: "VueTreeSelectDelete"
|
|
1834
|
-
}
|
|
1835
|
-
var
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1787
|
+
};
|
|
1788
|
+
var Mt = function() {
|
|
1789
|
+
var t = this, s = t._self._c;
|
|
1790
|
+
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" } })]);
|
|
1791
|
+
}, Tt = [], Dt = /* @__PURE__ */ m(
|
|
1792
|
+
Lt,
|
|
1793
|
+
Mt,
|
|
1794
|
+
Tt,
|
|
1839
1795
|
!1,
|
|
1840
|
-
|
|
1796
|
+
null,
|
|
1841
1797
|
null,
|
|
1842
1798
|
null,
|
|
1843
1799
|
null
|
|
1844
1800
|
);
|
|
1845
|
-
|
|
1846
|
-
for (let t in ue)
|
|
1847
|
-
this[t] = ue[t];
|
|
1848
|
-
}
|
|
1849
|
-
const Re = /* @__PURE__ */ function() {
|
|
1850
|
-
return qt.exports;
|
|
1851
|
-
}(), Yt = {
|
|
1801
|
+
const Oe = Dt.exports, xt = {
|
|
1852
1802
|
name: "VueTreeSelectMultiValueItem",
|
|
1853
1803
|
inject: ["instance"],
|
|
1854
1804
|
props: {
|
|
@@ -1858,7 +1808,7 @@ const Re = /* @__PURE__ */ function() {
|
|
|
1858
1808
|
}
|
|
1859
1809
|
},
|
|
1860
1810
|
methods: {
|
|
1861
|
-
handleMouseDown:
|
|
1811
|
+
handleMouseDown: b(function() {
|
|
1862
1812
|
const {
|
|
1863
1813
|
instance: t,
|
|
1864
1814
|
node: s
|
|
@@ -1867,80 +1817,72 @@ const Re = /* @__PURE__ */ function() {
|
|
|
1867
1817
|
})
|
|
1868
1818
|
},
|
|
1869
1819
|
render() {
|
|
1870
|
-
const
|
|
1871
|
-
instance:
|
|
1872
|
-
node:
|
|
1873
|
-
} = this,
|
|
1820
|
+
const {
|
|
1821
|
+
instance: e,
|
|
1822
|
+
node: t
|
|
1823
|
+
} = this, s = {
|
|
1874
1824
|
"vue-treeselect__multi-value-item": !0,
|
|
1875
|
-
"vue-treeselect__multi-value-item-disabled":
|
|
1876
|
-
"vue-treeselect__multi-value-item-new":
|
|
1877
|
-
},
|
|
1878
|
-
node:
|
|
1879
|
-
}) :
|
|
1880
|
-
return
|
|
1825
|
+
"vue-treeselect__multi-value-item-disabled": t.isDisabled,
|
|
1826
|
+
"vue-treeselect__multi-value-item-new": t.isNew
|
|
1827
|
+
}, n = e.$scopedSlots["value-label"], i = n ? n({
|
|
1828
|
+
node: t
|
|
1829
|
+
}) : t.label;
|
|
1830
|
+
return r("div", {
|
|
1881
1831
|
class: "vue-treeselect__multi-value-item-container"
|
|
1882
|
-
}, [
|
|
1883
|
-
class:
|
|
1832
|
+
}, [r("div", {
|
|
1833
|
+
class: s,
|
|
1884
1834
|
on: {
|
|
1885
1835
|
mousedown: this.handleMouseDown
|
|
1886
1836
|
}
|
|
1887
|
-
}, [
|
|
1837
|
+
}, [r("span", {
|
|
1888
1838
|
class: "vue-treeselect__multi-value-label"
|
|
1889
|
-
}, [
|
|
1839
|
+
}, [i]), r("span", {
|
|
1890
1840
|
class: "vue-treeselect__icon vue-treeselect__value-remove"
|
|
1891
|
-
}, [
|
|
1841
|
+
}, [r(Oe)])])]);
|
|
1892
1842
|
}
|
|
1893
|
-
};
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
Xt,
|
|
1899
|
-
Gt,
|
|
1843
|
+
}, Rt = null, $t = null;
|
|
1844
|
+
var It = /* @__PURE__ */ m(
|
|
1845
|
+
xt,
|
|
1846
|
+
Rt,
|
|
1847
|
+
$t,
|
|
1900
1848
|
!1,
|
|
1901
|
-
|
|
1849
|
+
null,
|
|
1902
1850
|
null,
|
|
1903
1851
|
null,
|
|
1904
1852
|
null
|
|
1905
1853
|
);
|
|
1906
|
-
|
|
1907
|
-
for (let t in he)
|
|
1908
|
-
this[t] = he[t];
|
|
1909
|
-
}
|
|
1910
|
-
const es = /* @__PURE__ */ function() {
|
|
1911
|
-
return Jt.exports;
|
|
1912
|
-
}(), ts = {
|
|
1854
|
+
const At = It.exports, Vt = {
|
|
1913
1855
|
name: "VueTreeSelectMultiValue",
|
|
1914
1856
|
inject: ["instance"],
|
|
1915
1857
|
methods: {
|
|
1916
1858
|
renderMultiValueItems() {
|
|
1917
|
-
const
|
|
1918
|
-
instance:
|
|
1859
|
+
const {
|
|
1860
|
+
instance: e
|
|
1919
1861
|
} = this;
|
|
1920
|
-
return
|
|
1921
|
-
key: `multi-value-item-${
|
|
1862
|
+
return e.internalValue.slice(0, e.limit).map(e.getNode).map((t) => r(At, {
|
|
1863
|
+
key: `multi-value-item-${t.id}`,
|
|
1922
1864
|
attrs: {
|
|
1923
|
-
node:
|
|
1865
|
+
node: t
|
|
1924
1866
|
}
|
|
1925
1867
|
}));
|
|
1926
1868
|
},
|
|
1927
1869
|
renderExceedLimitTip() {
|
|
1928
|
-
const
|
|
1929
|
-
instance:
|
|
1930
|
-
} = this,
|
|
1931
|
-
return
|
|
1870
|
+
const {
|
|
1871
|
+
instance: e
|
|
1872
|
+
} = this, t = e.internalValue.length - e.limit;
|
|
1873
|
+
return t <= 0 ? null : r("div", {
|
|
1932
1874
|
class: "vue-treeselect__limit-tip vue-treeselect-helper-zoom-effect-off",
|
|
1933
1875
|
key: "exceed-limit-tip"
|
|
1934
|
-
}, [
|
|
1876
|
+
}, [r("span", {
|
|
1935
1877
|
class: "vue-treeselect__limit-tip-text"
|
|
1936
|
-
}, [
|
|
1878
|
+
}, [e.limitText(t)])]);
|
|
1937
1879
|
}
|
|
1938
1880
|
},
|
|
1939
1881
|
render() {
|
|
1940
|
-
const
|
|
1941
|
-
renderValueContainer:
|
|
1882
|
+
const {
|
|
1883
|
+
renderValueContainer: e
|
|
1942
1884
|
} = this.$parent;
|
|
1943
|
-
return
|
|
1885
|
+
return e(r("transition-group", $([{
|
|
1944
1886
|
class: "vue-treeselect__multi-value"
|
|
1945
1887
|
}, {
|
|
1946
1888
|
props: {
|
|
@@ -1948,66 +1890,41 @@ const es = /* @__PURE__ */ function() {
|
|
|
1948
1890
|
name: "vue-treeselect__multi-value-item--transition",
|
|
1949
1891
|
appear: !0
|
|
1950
1892
|
}
|
|
1951
|
-
}]), [this.renderMultiValueItems(), this.renderExceedLimitTip(),
|
|
1893
|
+
}]), [this.renderMultiValueItems(), this.renderExceedLimitTip(), r(_e, {
|
|
1952
1894
|
key: "placeholder"
|
|
1953
|
-
}),
|
|
1895
|
+
}), r(ve, {
|
|
1954
1896
|
ref: "input",
|
|
1955
1897
|
key: "input"
|
|
1956
1898
|
})]));
|
|
1957
1899
|
}
|
|
1958
|
-
};
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
ss,
|
|
1964
|
-
ns,
|
|
1900
|
+
}, Bt = null, zt = null;
|
|
1901
|
+
var Ft = /* @__PURE__ */ m(
|
|
1902
|
+
Vt,
|
|
1903
|
+
Bt,
|
|
1904
|
+
zt,
|
|
1965
1905
|
!1,
|
|
1966
|
-
|
|
1906
|
+
null,
|
|
1967
1907
|
null,
|
|
1968
1908
|
null,
|
|
1969
1909
|
null
|
|
1970
1910
|
);
|
|
1971
|
-
|
|
1972
|
-
for (let t in de)
|
|
1973
|
-
this[t] = de[t];
|
|
1974
|
-
}
|
|
1975
|
-
const os = /* @__PURE__ */ function() {
|
|
1976
|
-
return is.exports;
|
|
1977
|
-
}();
|
|
1978
|
-
var ls = function() {
|
|
1979
|
-
var e = this, t = e.$createElement, s = e._self._c || t;
|
|
1980
|
-
return s("svg", {
|
|
1981
|
-
attrs: {
|
|
1982
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1983
|
-
viewBox: "0 0 292.362 292.362"
|
|
1984
|
-
}
|
|
1985
|
-
}, [s("path", {
|
|
1986
|
-
attrs: {
|
|
1987
|
-
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"
|
|
1988
|
-
}
|
|
1989
|
-
})]);
|
|
1990
|
-
}, as = [];
|
|
1991
|
-
const cs = {
|
|
1911
|
+
const kt = Ft.exports, Ht = {
|
|
1992
1912
|
name: "VueTreeSelectArrow"
|
|
1993
|
-
}
|
|
1994
|
-
var
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1913
|
+
};
|
|
1914
|
+
var Pt = function() {
|
|
1915
|
+
var t = this, s = t._self._c;
|
|
1916
|
+
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" } })]);
|
|
1917
|
+
}, Wt = [], jt = /* @__PURE__ */ m(
|
|
1918
|
+
Ht,
|
|
1919
|
+
Pt,
|
|
1920
|
+
Wt,
|
|
1998
1921
|
!1,
|
|
1999
|
-
|
|
1922
|
+
null,
|
|
2000
1923
|
null,
|
|
2001
1924
|
null,
|
|
2002
1925
|
null
|
|
2003
1926
|
);
|
|
2004
|
-
|
|
2005
|
-
for (let t in pe)
|
|
2006
|
-
this[t] = pe[t];
|
|
2007
|
-
}
|
|
2008
|
-
const Ie = /* @__PURE__ */ function() {
|
|
2009
|
-
return us.exports;
|
|
2010
|
-
}(), ds = {
|
|
1927
|
+
const ye = jt.exports, Qt = {
|
|
2011
1928
|
name: "VueTreeSelectControl",
|
|
2012
1929
|
inject: ["instance"],
|
|
2013
1930
|
computed: {
|
|
@@ -2046,47 +1963,47 @@ const Ie = /* @__PURE__ */ function() {
|
|
|
2046
1963
|
},
|
|
2047
1964
|
methods: {
|
|
2048
1965
|
renderX() {
|
|
2049
|
-
const
|
|
2050
|
-
instance:
|
|
2051
|
-
} = this,
|
|
2052
|
-
return this.shouldShowX ?
|
|
1966
|
+
const {
|
|
1967
|
+
instance: e
|
|
1968
|
+
} = this, t = e.multiple ? e.clearAllText : e.clearValueText;
|
|
1969
|
+
return this.shouldShowX ? r("div", {
|
|
2053
1970
|
class: "vue-treeselect__x-container",
|
|
2054
1971
|
attrs: {
|
|
2055
|
-
title:
|
|
1972
|
+
title: t
|
|
2056
1973
|
},
|
|
2057
1974
|
on: {
|
|
2058
1975
|
mousedown: this.handleMouseDownOnX
|
|
2059
1976
|
}
|
|
2060
|
-
}, [
|
|
1977
|
+
}, [r(Oe, {
|
|
2061
1978
|
class: "vue-treeselect__x"
|
|
2062
1979
|
})]) : null;
|
|
2063
1980
|
},
|
|
2064
1981
|
renderArrow() {
|
|
2065
|
-
const
|
|
2066
|
-
instance:
|
|
2067
|
-
} = this,
|
|
1982
|
+
const {
|
|
1983
|
+
instance: e
|
|
1984
|
+
} = this, t = {
|
|
2068
1985
|
"vue-treeselect__control-arrow": !0,
|
|
2069
|
-
"vue-treeselect__control-arrow--rotated":
|
|
1986
|
+
"vue-treeselect__control-arrow--rotated": e.menu.isOpen
|
|
2070
1987
|
};
|
|
2071
|
-
return this.shouldShowArrow ?
|
|
1988
|
+
return this.shouldShowArrow ? r("div", {
|
|
2072
1989
|
class: "vue-treeselect__control-arrow-container",
|
|
2073
1990
|
on: {
|
|
2074
1991
|
mousedown: this.handleMouseDownOnArrow
|
|
2075
1992
|
}
|
|
2076
|
-
}, [
|
|
2077
|
-
class:
|
|
1993
|
+
}, [r(ye, {
|
|
1994
|
+
class: t
|
|
2078
1995
|
})]) : null;
|
|
2079
1996
|
},
|
|
2080
|
-
handleMouseDownOnX:
|
|
1997
|
+
handleMouseDownOnX: b(function(t) {
|
|
2081
1998
|
t.stopPropagation(), t.preventDefault();
|
|
2082
1999
|
const {
|
|
2083
2000
|
instance: s
|
|
2084
|
-
} = this, n = s.beforeClearAll(), i = (
|
|
2085
|
-
|
|
2001
|
+
} = this, n = s.beforeClearAll(), i = (l) => {
|
|
2002
|
+
l && s.clear();
|
|
2086
2003
|
};
|
|
2087
|
-
|
|
2004
|
+
le(n) ? n.then(i) : setTimeout(() => i(n), 0);
|
|
2088
2005
|
}),
|
|
2089
|
-
handleMouseDownOnArrow:
|
|
2006
|
+
handleMouseDownOnArrow: b(function(t) {
|
|
2090
2007
|
t.preventDefault(), t.stopPropagation();
|
|
2091
2008
|
const {
|
|
2092
2009
|
instance: s
|
|
@@ -2095,45 +2012,36 @@ const Ie = /* @__PURE__ */ function() {
|
|
|
2095
2012
|
}),
|
|
2096
2013
|
// This is meant to be called by child `<Value />` component.
|
|
2097
2014
|
renderValueContainer(e) {
|
|
2098
|
-
|
|
2099
|
-
return t("div", {
|
|
2015
|
+
return r("div", {
|
|
2100
2016
|
class: "vue-treeselect__value-container"
|
|
2101
2017
|
}, [e]);
|
|
2102
2018
|
}
|
|
2103
2019
|
},
|
|
2104
2020
|
render() {
|
|
2105
|
-
const
|
|
2106
|
-
instance:
|
|
2107
|
-
} = this,
|
|
2108
|
-
return
|
|
2021
|
+
const {
|
|
2022
|
+
instance: e
|
|
2023
|
+
} = this, t = e.single ? Ct : kt;
|
|
2024
|
+
return r("div", {
|
|
2109
2025
|
class: "vue-treeselect__control",
|
|
2110
2026
|
on: {
|
|
2111
|
-
mousedown:
|
|
2027
|
+
mousedown: e.handleMouseDown
|
|
2112
2028
|
}
|
|
2113
|
-
}, [
|
|
2029
|
+
}, [r(t, {
|
|
2114
2030
|
ref: "value-container"
|
|
2115
2031
|
}), this.renderX(), this.renderArrow()]);
|
|
2116
2032
|
}
|
|
2117
|
-
};
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
ps,
|
|
2123
|
-
fs,
|
|
2033
|
+
}, Kt = null, qt = null;
|
|
2034
|
+
var Ut = /* @__PURE__ */ m(
|
|
2035
|
+
Qt,
|
|
2036
|
+
Kt,
|
|
2037
|
+
qt,
|
|
2124
2038
|
!1,
|
|
2125
|
-
|
|
2039
|
+
null,
|
|
2126
2040
|
null,
|
|
2127
2041
|
null,
|
|
2128
2042
|
null
|
|
2129
2043
|
);
|
|
2130
|
-
|
|
2131
|
-
for (let t in fe)
|
|
2132
|
-
this[t] = fe[t];
|
|
2133
|
-
}
|
|
2134
|
-
const _s = /* @__PURE__ */ function() {
|
|
2135
|
-
return ms.exports;
|
|
2136
|
-
}(), vs = {
|
|
2044
|
+
const Yt = Ut.exports, Xt = {
|
|
2137
2045
|
name: "VueTreeSelectTip",
|
|
2138
2046
|
functional: !0,
|
|
2139
2047
|
props: {
|
|
@@ -2147,42 +2055,34 @@ const _s = /* @__PURE__ */ function() {
|
|
|
2147
2055
|
}
|
|
2148
2056
|
},
|
|
2149
2057
|
render(e, t) {
|
|
2150
|
-
const
|
|
2151
|
-
props:
|
|
2152
|
-
children:
|
|
2058
|
+
const {
|
|
2059
|
+
props: s,
|
|
2060
|
+
children: n
|
|
2153
2061
|
} = t;
|
|
2154
|
-
return
|
|
2155
|
-
class: `vue-treeselect__tip vue-treeselect__${
|
|
2156
|
-
}, [
|
|
2062
|
+
return r("div", {
|
|
2063
|
+
class: `vue-treeselect__tip vue-treeselect__${s.type}-tip`
|
|
2064
|
+
}, [r("div", {
|
|
2157
2065
|
class: "vue-treeselect__icon-container"
|
|
2158
|
-
}, [
|
|
2159
|
-
class: `vue-treeselect__icon-${
|
|
2160
|
-
})]),
|
|
2161
|
-
class: `vue-treeselect__tip-text vue-treeselect__${
|
|
2162
|
-
}, [
|
|
2066
|
+
}, [r("span", {
|
|
2067
|
+
class: `vue-treeselect__icon-${s.icon}`
|
|
2068
|
+
})]), r("span", {
|
|
2069
|
+
class: `vue-treeselect__tip-text vue-treeselect__${s.type}-tip-text`
|
|
2070
|
+
}, [n])]);
|
|
2163
2071
|
}
|
|
2164
|
-
};
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
Ss,
|
|
2170
|
-
Os,
|
|
2072
|
+
}, Gt = null, Jt = null;
|
|
2073
|
+
var Zt = /* @__PURE__ */ m(
|
|
2074
|
+
Xt,
|
|
2075
|
+
Gt,
|
|
2076
|
+
Jt,
|
|
2171
2077
|
!1,
|
|
2172
|
-
|
|
2078
|
+
null,
|
|
2173
2079
|
null,
|
|
2174
2080
|
null,
|
|
2175
2081
|
null
|
|
2176
2082
|
);
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
}
|
|
2181
|
-
const v = /* @__PURE__ */ function() {
|
|
2182
|
-
return ys.exports;
|
|
2183
|
-
}();
|
|
2184
|
-
let P, W, j;
|
|
2185
|
-
const Ae = {
|
|
2083
|
+
const _ = Zt.exports;
|
|
2084
|
+
let W, j, Q;
|
|
2085
|
+
const Ne = {
|
|
2186
2086
|
name: "VueTreeSelectOption",
|
|
2187
2087
|
inject: ["instance"],
|
|
2188
2088
|
props: {
|
|
@@ -2209,69 +2109,67 @@ const Ae = {
|
|
|
2209
2109
|
},
|
|
2210
2110
|
methods: {
|
|
2211
2111
|
renderOption() {
|
|
2212
|
-
const
|
|
2213
|
-
instance:
|
|
2214
|
-
node:
|
|
2215
|
-
} = this,
|
|
2112
|
+
const {
|
|
2113
|
+
instance: e,
|
|
2114
|
+
node: t
|
|
2115
|
+
} = this, s = {
|
|
2216
2116
|
"vue-treeselect__option": !0,
|
|
2217
|
-
"vue-treeselect__option--disabled":
|
|
2218
|
-
"vue-treeselect__option--selected":
|
|
2219
|
-
"vue-treeselect__option--highlight":
|
|
2220
|
-
"vue-treeselect__option--matched":
|
|
2117
|
+
"vue-treeselect__option--disabled": t.isDisabled,
|
|
2118
|
+
"vue-treeselect__option--selected": e.isSelected(t),
|
|
2119
|
+
"vue-treeselect__option--highlight": t.isHighlighted,
|
|
2120
|
+
"vue-treeselect__option--matched": e.localSearch.active && t.isMatched,
|
|
2221
2121
|
"vue-treeselect__option--hide": !this.shouldShow
|
|
2222
2122
|
};
|
|
2223
|
-
return
|
|
2224
|
-
class:
|
|
2123
|
+
return r("div", {
|
|
2124
|
+
class: s,
|
|
2225
2125
|
on: {
|
|
2226
2126
|
mouseenter: this.handleMouseEnterOption
|
|
2227
2127
|
},
|
|
2228
2128
|
attrs: {
|
|
2229
|
-
"data-id":
|
|
2129
|
+
"data-id": t.id
|
|
2230
2130
|
}
|
|
2231
2131
|
}, [this.renderArrow(), this.renderLabelContainer([this.renderCheckboxContainer([this.renderCheckbox()]), this.renderLabel()])]);
|
|
2232
2132
|
},
|
|
2233
2133
|
renderSubOptionsList() {
|
|
2234
|
-
|
|
2235
|
-
return this.shouldExpand ? e("div", {
|
|
2134
|
+
return this.shouldExpand ? r("div", {
|
|
2236
2135
|
class: "vue-treeselect__list"
|
|
2237
2136
|
}, [this.renderSubOptions(), this.renderNoChildrenTip(), this.renderLoadingChildrenTip(), this.renderLoadingChildrenErrorTip()]) : null;
|
|
2238
2137
|
},
|
|
2239
2138
|
renderArrow() {
|
|
2240
|
-
const
|
|
2241
|
-
instance:
|
|
2242
|
-
node:
|
|
2139
|
+
const {
|
|
2140
|
+
instance: e,
|
|
2141
|
+
node: t
|
|
2243
2142
|
} = this;
|
|
2244
|
-
if (
|
|
2143
|
+
if (e.shouldFlattenOptions && this.shouldShow)
|
|
2245
2144
|
return null;
|
|
2246
|
-
if (
|
|
2247
|
-
const
|
|
2145
|
+
if (t.isBranch) {
|
|
2146
|
+
const s = {
|
|
2248
2147
|
props: {
|
|
2249
2148
|
name: "vue-treeselect__option-arrow--prepare",
|
|
2250
2149
|
appear: !0
|
|
2251
2150
|
}
|
|
2252
|
-
},
|
|
2151
|
+
}, n = {
|
|
2253
2152
|
"vue-treeselect__option-arrow": !0,
|
|
2254
2153
|
"vue-treeselect__option-arrow--rotated": this.shouldExpand
|
|
2255
2154
|
};
|
|
2256
|
-
return
|
|
2155
|
+
return r("div", {
|
|
2257
2156
|
class: "vue-treeselect__option-arrow-container",
|
|
2258
2157
|
on: {
|
|
2259
2158
|
mousedown: this.handleMouseDownOnArrow
|
|
2260
2159
|
}
|
|
2261
|
-
}, [
|
|
2262
|
-
class:
|
|
2160
|
+
}, [r("transition", $([{}, s]), [r(ye, {
|
|
2161
|
+
class: n
|
|
2263
2162
|
})])]);
|
|
2264
2163
|
}
|
|
2265
2164
|
return (
|
|
2266
2165
|
/* node.isLeaf && */
|
|
2267
|
-
|
|
2166
|
+
e.hasBranchNodes ? (W || (W = r("div", {
|
|
2268
2167
|
class: "vue-treeselect__option-arrow-placeholder"
|
|
2269
|
-
}, [" "])),
|
|
2168
|
+
}, [" "])), W) : null
|
|
2270
2169
|
);
|
|
2271
2170
|
},
|
|
2272
2171
|
renderLabelContainer(e) {
|
|
2273
|
-
|
|
2274
|
-
return t("div", {
|
|
2172
|
+
return r("div", {
|
|
2275
2173
|
class: "vue-treeselect__label-container",
|
|
2276
2174
|
on: {
|
|
2277
2175
|
mousedown: this.handleMouseDownOnLabelContainer
|
|
@@ -2279,104 +2177,104 @@ const Ae = {
|
|
|
2279
2177
|
}, [e]);
|
|
2280
2178
|
},
|
|
2281
2179
|
renderCheckboxContainer(e) {
|
|
2282
|
-
const
|
|
2283
|
-
instance:
|
|
2284
|
-
node:
|
|
2180
|
+
const {
|
|
2181
|
+
instance: t,
|
|
2182
|
+
node: s
|
|
2285
2183
|
} = this;
|
|
2286
|
-
return
|
|
2184
|
+
return t.single || t.disableBranchNodes && s.isBranch ? null : r("div", {
|
|
2287
2185
|
class: "vue-treeselect__checkbox-container"
|
|
2288
2186
|
}, [e]);
|
|
2289
2187
|
},
|
|
2290
2188
|
renderCheckbox() {
|
|
2291
|
-
const
|
|
2292
|
-
instance:
|
|
2293
|
-
node:
|
|
2294
|
-
} = this,
|
|
2189
|
+
const {
|
|
2190
|
+
instance: e,
|
|
2191
|
+
node: t
|
|
2192
|
+
} = this, s = e.forest.checkedStateMap[t.id], n = {
|
|
2295
2193
|
"vue-treeselect__checkbox": !0,
|
|
2296
|
-
"vue-treeselect__checkbox--checked":
|
|
2297
|
-
"vue-treeselect__checkbox--indeterminate":
|
|
2298
|
-
"vue-treeselect__checkbox--unchecked":
|
|
2299
|
-
"vue-treeselect__checkbox--disabled":
|
|
2194
|
+
"vue-treeselect__checkbox--checked": s === ge,
|
|
2195
|
+
"vue-treeselect__checkbox--indeterminate": s === me,
|
|
2196
|
+
"vue-treeselect__checkbox--unchecked": s === Y,
|
|
2197
|
+
"vue-treeselect__checkbox--disabled": t.isDisabled
|
|
2300
2198
|
};
|
|
2301
|
-
return
|
|
2199
|
+
return j || (j = r("span", {
|
|
2302
2200
|
class: "vue-treeselect__check-mark"
|
|
2303
|
-
})),
|
|
2201
|
+
})), Q || (Q = r("span", {
|
|
2304
2202
|
class: "vue-treeselect__minus-mark"
|
|
2305
|
-
})),
|
|
2306
|
-
class:
|
|
2307
|
-
}, [
|
|
2203
|
+
})), r("span", {
|
|
2204
|
+
class: n
|
|
2205
|
+
}, [j, Q]);
|
|
2308
2206
|
},
|
|
2309
2207
|
renderLabel() {
|
|
2310
|
-
const
|
|
2311
|
-
instance:
|
|
2312
|
-
node:
|
|
2313
|
-
} = this,
|
|
2314
|
-
return
|
|
2315
|
-
node:
|
|
2316
|
-
shouldShowCount:
|
|
2317
|
-
count:
|
|
2318
|
-
labelClassName:
|
|
2319
|
-
countClassName:
|
|
2320
|
-
}) :
|
|
2321
|
-
class:
|
|
2322
|
-
}, [
|
|
2323
|
-
class:
|
|
2324
|
-
}, ["(",
|
|
2208
|
+
const {
|
|
2209
|
+
instance: e,
|
|
2210
|
+
node: t
|
|
2211
|
+
} = 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", l = "vue-treeselect__count", o = e.$scopedSlots["option-label"];
|
|
2212
|
+
return o ? o({
|
|
2213
|
+
node: t,
|
|
2214
|
+
shouldShowCount: s,
|
|
2215
|
+
count: n,
|
|
2216
|
+
labelClassName: i,
|
|
2217
|
+
countClassName: l
|
|
2218
|
+
}) : r("label", {
|
|
2219
|
+
class: i
|
|
2220
|
+
}, [t.label, s && r("span", {
|
|
2221
|
+
class: l
|
|
2222
|
+
}, ["(", n, ")"])]);
|
|
2325
2223
|
},
|
|
2326
2224
|
renderSubOptions() {
|
|
2327
|
-
const
|
|
2328
|
-
node:
|
|
2225
|
+
const {
|
|
2226
|
+
node: e
|
|
2329
2227
|
} = this;
|
|
2330
|
-
return
|
|
2228
|
+
return e.childrenStates.isLoaded ? e.children.map((t) => r(Ne, {
|
|
2331
2229
|
attrs: {
|
|
2332
|
-
node:
|
|
2230
|
+
node: t
|
|
2333
2231
|
},
|
|
2334
|
-
key:
|
|
2232
|
+
key: t.id
|
|
2335
2233
|
})) : null;
|
|
2336
2234
|
},
|
|
2337
2235
|
renderNoChildrenTip() {
|
|
2338
|
-
const
|
|
2339
|
-
instance:
|
|
2340
|
-
node:
|
|
2236
|
+
const {
|
|
2237
|
+
instance: e,
|
|
2238
|
+
node: t
|
|
2341
2239
|
} = this;
|
|
2342
|
-
return !
|
|
2240
|
+
return !t.childrenStates.isLoaded || t.children.length ? null : r(_, {
|
|
2343
2241
|
attrs: {
|
|
2344
2242
|
type: "no-children",
|
|
2345
2243
|
icon: "warning"
|
|
2346
2244
|
}
|
|
2347
|
-
}, [
|
|
2245
|
+
}, [e.noChildrenText]);
|
|
2348
2246
|
},
|
|
2349
2247
|
renderLoadingChildrenTip() {
|
|
2350
|
-
const
|
|
2351
|
-
instance:
|
|
2352
|
-
node:
|
|
2248
|
+
const {
|
|
2249
|
+
instance: e,
|
|
2250
|
+
node: t
|
|
2353
2251
|
} = this;
|
|
2354
|
-
return
|
|
2252
|
+
return t.childrenStates.isLoading ? r(_, {
|
|
2355
2253
|
attrs: {
|
|
2356
2254
|
type: "loading",
|
|
2357
2255
|
icon: "loader"
|
|
2358
2256
|
}
|
|
2359
|
-
}, [
|
|
2257
|
+
}, [e.loadingText]) : null;
|
|
2360
2258
|
},
|
|
2361
2259
|
renderLoadingChildrenErrorTip() {
|
|
2362
|
-
const
|
|
2363
|
-
instance:
|
|
2364
|
-
node:
|
|
2260
|
+
const {
|
|
2261
|
+
instance: e,
|
|
2262
|
+
node: t
|
|
2365
2263
|
} = this;
|
|
2366
|
-
return
|
|
2264
|
+
return t.childrenStates.loadingError ? r(_, {
|
|
2367
2265
|
attrs: {
|
|
2368
2266
|
type: "error",
|
|
2369
2267
|
icon: "error"
|
|
2370
2268
|
}
|
|
2371
|
-
}, [
|
|
2269
|
+
}, [t.childrenStates.loadingError, r("a", {
|
|
2372
2270
|
class: "vue-treeselect__retry",
|
|
2373
2271
|
attrs: {
|
|
2374
|
-
title:
|
|
2272
|
+
title: e.retryTitle
|
|
2375
2273
|
},
|
|
2376
2274
|
on: {
|
|
2377
2275
|
mousedown: this.handleMouseDownOnRetry
|
|
2378
2276
|
}
|
|
2379
|
-
}, [
|
|
2277
|
+
}, [e.retryText])]) : null;
|
|
2380
2278
|
},
|
|
2381
2279
|
handleMouseEnterOption(e) {
|
|
2382
2280
|
const {
|
|
@@ -2385,21 +2283,21 @@ const Ae = {
|
|
|
2385
2283
|
} = this;
|
|
2386
2284
|
e.target === e.currentTarget && t.setCurrentHighlightedOption(s, !1);
|
|
2387
2285
|
},
|
|
2388
|
-
handleMouseDownOnArrow:
|
|
2286
|
+
handleMouseDownOnArrow: b(function() {
|
|
2389
2287
|
const {
|
|
2390
2288
|
instance: t,
|
|
2391
2289
|
node: s
|
|
2392
2290
|
} = this;
|
|
2393
2291
|
t.toggleExpanded(s);
|
|
2394
2292
|
}),
|
|
2395
|
-
handleMouseDownOnLabelContainer:
|
|
2293
|
+
handleMouseDownOnLabelContainer: b(function() {
|
|
2396
2294
|
const {
|
|
2397
2295
|
instance: t,
|
|
2398
2296
|
node: s
|
|
2399
2297
|
} = this;
|
|
2400
2298
|
s.isBranch && t.disableBranchNodes ? t.toggleExpanded(s) : t.select(s);
|
|
2401
2299
|
}),
|
|
2402
|
-
handleMouseDownOnRetry:
|
|
2300
|
+
handleMouseDownOnRetry: b(function() {
|
|
2403
2301
|
const {
|
|
2404
2302
|
instance: t,
|
|
2405
2303
|
node: s
|
|
@@ -2408,45 +2306,37 @@ const Ae = {
|
|
|
2408
2306
|
})
|
|
2409
2307
|
},
|
|
2410
2308
|
render() {
|
|
2411
|
-
const
|
|
2412
|
-
node:
|
|
2413
|
-
} = this,
|
|
2309
|
+
const {
|
|
2310
|
+
node: e
|
|
2311
|
+
} = this, s = {
|
|
2414
2312
|
"vue-treeselect__list-item": !0,
|
|
2415
|
-
[`vue-treeselect__indent-level-${this.instance.shouldFlattenOptions ? 0 :
|
|
2416
|
-
},
|
|
2313
|
+
[`vue-treeselect__indent-level-${this.instance.shouldFlattenOptions ? 0 : e.level}`]: !0
|
|
2314
|
+
}, n = {
|
|
2417
2315
|
props: {
|
|
2418
2316
|
name: "vue-treeselect__list--transition"
|
|
2419
2317
|
}
|
|
2420
2318
|
};
|
|
2421
|
-
return
|
|
2422
|
-
class:
|
|
2423
|
-
}, [this.renderOption(),
|
|
2319
|
+
return r("div", {
|
|
2320
|
+
class: s
|
|
2321
|
+
}, [this.renderOption(), e.isBranch && r("transition", $([{}, n]), [this.renderSubOptionsList()])]);
|
|
2424
2322
|
}
|
|
2425
|
-
};
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
Ns,
|
|
2431
|
-
bs,
|
|
2323
|
+
}, es = null, ts = null;
|
|
2324
|
+
var ss = /* @__PURE__ */ m(
|
|
2325
|
+
Ne,
|
|
2326
|
+
es,
|
|
2327
|
+
ts,
|
|
2432
2328
|
!1,
|
|
2433
|
-
|
|
2329
|
+
null,
|
|
2434
2330
|
null,
|
|
2435
2331
|
null,
|
|
2436
2332
|
null
|
|
2437
2333
|
);
|
|
2438
|
-
|
|
2439
|
-
for (let t in ge)
|
|
2440
|
-
this[t] = ge[t];
|
|
2441
|
-
}
|
|
2442
|
-
const Cs = /* @__PURE__ */ function() {
|
|
2443
|
-
return $s.exports;
|
|
2444
|
-
}(), Ls = {
|
|
2334
|
+
const ns = ss.exports, is = {
|
|
2445
2335
|
top: "top",
|
|
2446
2336
|
bottom: "bottom",
|
|
2447
2337
|
above: "top",
|
|
2448
2338
|
below: "bottom"
|
|
2449
|
-
},
|
|
2339
|
+
}, rs = {
|
|
2450
2340
|
name: "VueTreeSelectMenu",
|
|
2451
2341
|
inject: ["instance"],
|
|
2452
2342
|
computed: {
|
|
@@ -2486,17 +2376,17 @@ const Cs = /* @__PURE__ */ function() {
|
|
|
2486
2376
|
},
|
|
2487
2377
|
methods: {
|
|
2488
2378
|
renderMenu() {
|
|
2489
|
-
const
|
|
2490
|
-
instance:
|
|
2379
|
+
const {
|
|
2380
|
+
instance: e
|
|
2491
2381
|
} = this;
|
|
2492
|
-
return
|
|
2382
|
+
return e.menu.isOpen ? r("div", {
|
|
2493
2383
|
ref: "menu",
|
|
2494
2384
|
class: "vue-treeselect__menu",
|
|
2495
2385
|
on: {
|
|
2496
|
-
mousedown:
|
|
2386
|
+
mousedown: e.handleMouseDown
|
|
2497
2387
|
},
|
|
2498
2388
|
style: this.menuStyle
|
|
2499
|
-
}, [this.renderBeforeList(),
|
|
2389
|
+
}, [this.renderBeforeList(), e.async ? this.renderAsyncSearchMenuInner() : e.localSearch.active ? this.renderLocalSearchMenuInner() : this.renderNormalMenuInner(), this.renderAfterList()]) : null;
|
|
2500
2390
|
},
|
|
2501
2391
|
renderBeforeList() {
|
|
2502
2392
|
const {
|
|
@@ -2529,99 +2419,99 @@ const Cs = /* @__PURE__ */ function() {
|
|
|
2529
2419
|
return s ? this.renderSearchPromptTip() : t.isLoading ? this.renderLoadingOptionsTip() : t.loadingError ? this.renderAsyncSearchLoadingErrorTip() : n ? this.renderNoResultsTip() : this.renderOptionList();
|
|
2530
2420
|
},
|
|
2531
2421
|
renderOptionList() {
|
|
2532
|
-
const
|
|
2533
|
-
instance:
|
|
2422
|
+
const {
|
|
2423
|
+
instance: e
|
|
2534
2424
|
} = this;
|
|
2535
|
-
return
|
|
2425
|
+
return r("div", {
|
|
2536
2426
|
class: "vue-treeselect__list"
|
|
2537
|
-
}, [
|
|
2427
|
+
}, [e.forest.normalizedOptions.map((t) => r(ns, {
|
|
2538
2428
|
attrs: {
|
|
2539
|
-
node:
|
|
2429
|
+
node: t
|
|
2540
2430
|
},
|
|
2541
|
-
key:
|
|
2431
|
+
key: t.id
|
|
2542
2432
|
}))]);
|
|
2543
2433
|
},
|
|
2544
2434
|
renderSearchPromptTip() {
|
|
2545
|
-
const
|
|
2546
|
-
instance:
|
|
2435
|
+
const {
|
|
2436
|
+
instance: e
|
|
2547
2437
|
} = this;
|
|
2548
|
-
return
|
|
2438
|
+
return r(_, {
|
|
2549
2439
|
attrs: {
|
|
2550
2440
|
type: "search-prompt",
|
|
2551
2441
|
icon: "warning"
|
|
2552
2442
|
}
|
|
2553
|
-
}, [
|
|
2443
|
+
}, [e.searchPromptText]);
|
|
2554
2444
|
},
|
|
2555
2445
|
renderLoadingOptionsTip() {
|
|
2556
|
-
const
|
|
2557
|
-
instance:
|
|
2446
|
+
const {
|
|
2447
|
+
instance: e
|
|
2558
2448
|
} = this;
|
|
2559
|
-
return
|
|
2449
|
+
return r(_, {
|
|
2560
2450
|
attrs: {
|
|
2561
2451
|
type: "loading",
|
|
2562
2452
|
icon: "loader"
|
|
2563
2453
|
}
|
|
2564
|
-
}, [
|
|
2454
|
+
}, [e.loadingText]);
|
|
2565
2455
|
},
|
|
2566
2456
|
renderLoadingRootOptionsErrorTip() {
|
|
2567
|
-
const
|
|
2568
|
-
instance:
|
|
2457
|
+
const {
|
|
2458
|
+
instance: e
|
|
2569
2459
|
} = this;
|
|
2570
|
-
return
|
|
2460
|
+
return r(_, {
|
|
2571
2461
|
attrs: {
|
|
2572
2462
|
type: "error",
|
|
2573
2463
|
icon: "error"
|
|
2574
2464
|
}
|
|
2575
|
-
}, [
|
|
2465
|
+
}, [e.rootOptionsStates.loadingError, r("a", {
|
|
2576
2466
|
class: "vue-treeselect__retry",
|
|
2577
2467
|
on: {
|
|
2578
|
-
click:
|
|
2468
|
+
click: e.loadRootOptions
|
|
2579
2469
|
},
|
|
2580
2470
|
attrs: {
|
|
2581
|
-
title:
|
|
2471
|
+
title: e.retryTitle
|
|
2582
2472
|
}
|
|
2583
|
-
}, [
|
|
2473
|
+
}, [e.retryText])]);
|
|
2584
2474
|
},
|
|
2585
2475
|
renderAsyncSearchLoadingErrorTip() {
|
|
2586
|
-
const
|
|
2587
|
-
instance:
|
|
2588
|
-
} = this,
|
|
2589
|
-
return
|
|
2476
|
+
const {
|
|
2477
|
+
instance: e
|
|
2478
|
+
} = this, t = e.getRemoteSearchEntry();
|
|
2479
|
+
return r(_, {
|
|
2590
2480
|
attrs: {
|
|
2591
2481
|
type: "error",
|
|
2592
2482
|
icon: "error"
|
|
2593
2483
|
}
|
|
2594
|
-
}, [
|
|
2484
|
+
}, [t.loadingError, r("a", {
|
|
2595
2485
|
class: "vue-treeselect__retry",
|
|
2596
2486
|
on: {
|
|
2597
|
-
click:
|
|
2487
|
+
click: e.handleRemoteSearch
|
|
2598
2488
|
},
|
|
2599
2489
|
attrs: {
|
|
2600
|
-
title:
|
|
2490
|
+
title: e.retryTitle
|
|
2601
2491
|
}
|
|
2602
|
-
}, [
|
|
2492
|
+
}, [e.retryText])]);
|
|
2603
2493
|
},
|
|
2604
2494
|
renderNoAvailableOptionsTip() {
|
|
2605
|
-
const
|
|
2606
|
-
instance:
|
|
2495
|
+
const {
|
|
2496
|
+
instance: e
|
|
2607
2497
|
} = this;
|
|
2608
|
-
return
|
|
2498
|
+
return r(_, {
|
|
2609
2499
|
attrs: {
|
|
2610
2500
|
type: "no-options",
|
|
2611
2501
|
icon: "warning"
|
|
2612
2502
|
}
|
|
2613
|
-
}, [
|
|
2503
|
+
}, [e.noOptionsText]);
|
|
2614
2504
|
},
|
|
2615
2505
|
renderNoResultsTip() {
|
|
2616
|
-
const
|
|
2617
|
-
instance:
|
|
2506
|
+
const {
|
|
2507
|
+
instance: e
|
|
2618
2508
|
} = this;
|
|
2619
|
-
return
|
|
2509
|
+
return r(_, {
|
|
2620
2510
|
attrs: {
|
|
2621
2511
|
type: "no-results",
|
|
2622
2512
|
icon: "warning"
|
|
2623
2513
|
}
|
|
2624
|
-
}, [
|
|
2514
|
+
}, [e.noResultsText]);
|
|
2625
2515
|
},
|
|
2626
2516
|
onMenuOpen() {
|
|
2627
2517
|
this.adjustMenuOpenDirection(), this.setupMenuSizeWatcher(), this.setupMenuResizeAndScrollEventListeners();
|
|
@@ -2635,15 +2525,15 @@ const Cs = /* @__PURE__ */ function() {
|
|
|
2635
2525
|
} = this;
|
|
2636
2526
|
if (!e.menu.isOpen)
|
|
2637
2527
|
return;
|
|
2638
|
-
const t = e.getMenu(), s = e.getControl(), n = t.getBoundingClientRect(), i = s.getBoundingClientRect(),
|
|
2639
|
-
|
|
2528
|
+
const t = e.getMenu(), s = e.getControl(), n = t.getBoundingClientRect(), i = s.getBoundingClientRect(), l = n.height, o = window.innerHeight, u = i.top, p = window.innerHeight - i.bottom, c = i.top >= 0 && i.top <= o || i.top < 0 && i.bottom > 0, g = p > l + re, f = u > l + re;
|
|
2529
|
+
c ? e.openDirection !== "auto" ? e.menu.placement = is[e.openDirection] : g || !f ? e.menu.placement = "bottom" : e.menu.placement = "top" : e.closeMenu();
|
|
2640
2530
|
},
|
|
2641
2531
|
setupMenuSizeWatcher() {
|
|
2642
2532
|
const {
|
|
2643
2533
|
instance: e
|
|
2644
2534
|
} = this, t = e.getMenu();
|
|
2645
2535
|
this.menuSizeWatcher || (this.menuSizeWatcher = {
|
|
2646
|
-
remove:
|
|
2536
|
+
remove: ue(t, this.adjustMenuOpenDirection)
|
|
2647
2537
|
});
|
|
2648
2538
|
},
|
|
2649
2539
|
setupMenuResizeAndScrollEventListeners() {
|
|
@@ -2651,7 +2541,7 @@ const Cs = /* @__PURE__ */ function() {
|
|
|
2651
2541
|
instance: e
|
|
2652
2542
|
} = this, t = e.getControl();
|
|
2653
2543
|
this.menuResizeAndScrollEventListeners || (this.menuResizeAndScrollEventListeners = {
|
|
2654
|
-
remove:
|
|
2544
|
+
remove: he(t, this.adjustMenuOpenDirection)
|
|
2655
2545
|
});
|
|
2656
2546
|
},
|
|
2657
2547
|
removeMenuSizeWatcher() {
|
|
@@ -2662,37 +2552,28 @@ const Cs = /* @__PURE__ */ function() {
|
|
|
2662
2552
|
}
|
|
2663
2553
|
},
|
|
2664
2554
|
render() {
|
|
2665
|
-
|
|
2666
|
-
return e("div", {
|
|
2555
|
+
return r("div", {
|
|
2667
2556
|
ref: "menu-container",
|
|
2668
2557
|
class: "vue-treeselect__menu-container",
|
|
2669
2558
|
style: this.menuContainerStyle
|
|
2670
|
-
}, [
|
|
2559
|
+
}, [r("transition", {
|
|
2671
2560
|
attrs: {
|
|
2672
2561
|
name: "vue-treeselect__menu--transition"
|
|
2673
2562
|
}
|
|
2674
2563
|
}, [this.renderMenu()])]);
|
|
2675
2564
|
}
|
|
2676
|
-
};
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
xs,
|
|
2682
|
-
Ts,
|
|
2565
|
+
}, os = null, ls = null;
|
|
2566
|
+
var as = /* @__PURE__ */ m(
|
|
2567
|
+
rs,
|
|
2568
|
+
os,
|
|
2569
|
+
ls,
|
|
2683
2570
|
!1,
|
|
2684
|
-
|
|
2571
|
+
null,
|
|
2685
2572
|
null,
|
|
2686
2573
|
null,
|
|
2687
2574
|
null
|
|
2688
2575
|
);
|
|
2689
|
-
|
|
2690
|
-
for (let t in _e)
|
|
2691
|
-
this[t] = _e[t];
|
|
2692
|
-
}
|
|
2693
|
-
const Ve = /* @__PURE__ */ function() {
|
|
2694
|
-
return Ds.exports;
|
|
2695
|
-
}(), Is = {
|
|
2576
|
+
const Ee = as.exports, cs = {
|
|
2696
2577
|
name: "VueTreeSelectPortalTarget",
|
|
2697
2578
|
inject: ["instance"],
|
|
2698
2579
|
watch: {
|
|
@@ -2724,7 +2605,7 @@ const Ve = /* @__PURE__ */ function() {
|
|
|
2724
2605
|
instance: e
|
|
2725
2606
|
} = this, t = e.getControl();
|
|
2726
2607
|
this.controlResizeAndScrollEventListeners || (this.controlResizeAndScrollEventListeners = {
|
|
2727
|
-
remove:
|
|
2608
|
+
remove: he(t, this.updateMenuContainerOffset)
|
|
2728
2609
|
});
|
|
2729
2610
|
},
|
|
2730
2611
|
setupControlSizeWatcher() {
|
|
@@ -2732,7 +2613,7 @@ const Ve = /* @__PURE__ */ function() {
|
|
|
2732
2613
|
instance: e
|
|
2733
2614
|
} = this, t = e.getControl();
|
|
2734
2615
|
this.controlSizeWatcher || (this.controlSizeWatcher = {
|
|
2735
|
-
remove:
|
|
2616
|
+
remove: ue(t, () => {
|
|
2736
2617
|
this.updateWidth(), this.updateMenuContainerOffset();
|
|
2737
2618
|
})
|
|
2738
2619
|
});
|
|
@@ -2752,23 +2633,23 @@ const Ve = /* @__PURE__ */ function() {
|
|
|
2752
2633
|
updateMenuContainerOffset() {
|
|
2753
2634
|
const {
|
|
2754
2635
|
instance: e
|
|
2755
|
-
} = this, t = e.getControl(), s = this.$el, n = t.getBoundingClientRect(), i = s.getBoundingClientRect(),
|
|
2756
|
-
|
|
2636
|
+
} = this, t = e.getControl(), s = this.$el, n = t.getBoundingClientRect(), i = s.getBoundingClientRect(), l = e.menu.placement === "bottom" ? n.height : 0, o = `${Math.round(n.left - i.left)}px`, u = `${Math.round(n.top - i.top + l)}px`, p = this.$refs.menu.$refs["menu-container"].style, g = fe(["transform", "webkitTransform", "MozTransform", "msTransform"], (f) => f in document.body.style);
|
|
2637
|
+
p[g] = `translate(${o}, ${u})`;
|
|
2757
2638
|
}
|
|
2758
2639
|
},
|
|
2759
2640
|
render() {
|
|
2760
|
-
const
|
|
2761
|
-
instance:
|
|
2762
|
-
} = this,
|
|
2763
|
-
zIndex:
|
|
2641
|
+
const {
|
|
2642
|
+
instance: e
|
|
2643
|
+
} = this, t = ["vue-treeselect__portal-target", e.wrapperClass], s = {
|
|
2644
|
+
zIndex: e.zIndex
|
|
2764
2645
|
};
|
|
2765
|
-
return
|
|
2766
|
-
class:
|
|
2767
|
-
style:
|
|
2646
|
+
return r("div", {
|
|
2647
|
+
class: t,
|
|
2648
|
+
style: s,
|
|
2768
2649
|
attrs: {
|
|
2769
|
-
"data-instance-id":
|
|
2650
|
+
"data-instance-id": e.getInstanceId()
|
|
2770
2651
|
}
|
|
2771
|
-
}, [
|
|
2652
|
+
}, [r(Ee, {
|
|
2772
2653
|
ref: "menu"
|
|
2773
2654
|
})]);
|
|
2774
2655
|
},
|
|
@@ -2776,8 +2657,8 @@ const Ve = /* @__PURE__ */ function() {
|
|
|
2776
2657
|
this.removeHandlers();
|
|
2777
2658
|
}
|
|
2778
2659
|
};
|
|
2779
|
-
let
|
|
2780
|
-
const
|
|
2660
|
+
let K;
|
|
2661
|
+
const us = {
|
|
2781
2662
|
name: "VueTreeSelectMenuPortal",
|
|
2782
2663
|
created() {
|
|
2783
2664
|
this.portalTarget = null;
|
|
@@ -2791,43 +2672,35 @@ const As = {
|
|
|
2791
2672
|
methods: {
|
|
2792
2673
|
setup() {
|
|
2793
2674
|
const e = document.createElement("div");
|
|
2794
|
-
document.body.appendChild(e), this.portalTarget = new
|
|
2675
|
+
document.body.appendChild(e), this.portalTarget = new xe(v({
|
|
2795
2676
|
el: e,
|
|
2796
2677
|
parent: this
|
|
2797
|
-
},
|
|
2678
|
+
}, cs));
|
|
2798
2679
|
},
|
|
2799
2680
|
teardown() {
|
|
2800
2681
|
document.body.removeChild(this.portalTarget.$el), this.portalTarget.$el.innerHTML = "", this.portalTarget.$destroy(), this.portalTarget = null;
|
|
2801
2682
|
}
|
|
2802
2683
|
},
|
|
2803
2684
|
render() {
|
|
2804
|
-
|
|
2805
|
-
return Q || (Q = e("div", {
|
|
2685
|
+
return K || (K = r("div", {
|
|
2806
2686
|
class: "vue-treeselect__menu-placeholder"
|
|
2807
|
-
})),
|
|
2687
|
+
})), K;
|
|
2808
2688
|
}
|
|
2809
|
-
};
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
Vs,
|
|
2815
|
-
Bs,
|
|
2689
|
+
}, hs = null, ds = null;
|
|
2690
|
+
var ps = /* @__PURE__ */ m(
|
|
2691
|
+
us,
|
|
2692
|
+
hs,
|
|
2693
|
+
ds,
|
|
2816
2694
|
!1,
|
|
2817
|
-
|
|
2695
|
+
null,
|
|
2818
2696
|
null,
|
|
2819
2697
|
null,
|
|
2820
2698
|
null
|
|
2821
2699
|
);
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
this[t] = ve[t];
|
|
2825
|
-
}
|
|
2826
|
-
const ks = /* @__PURE__ */ function() {
|
|
2827
|
-
return zs.exports;
|
|
2828
|
-
}(), Hs = {
|
|
2700
|
+
const fs = ps.exports;
|
|
2701
|
+
const Os = {
|
|
2829
2702
|
name: "VueTreeSelect",
|
|
2830
|
-
mixins: [
|
|
2703
|
+
mixins: [Ze],
|
|
2831
2704
|
computed: {
|
|
2832
2705
|
wrapperClass() {
|
|
2833
2706
|
return {
|
|
@@ -2847,38 +2720,18 @@ const ks = /* @__PURE__ */ function() {
|
|
|
2847
2720
|
}
|
|
2848
2721
|
},
|
|
2849
2722
|
render() {
|
|
2850
|
-
|
|
2851
|
-
return e("div", {
|
|
2723
|
+
return r("div", {
|
|
2852
2724
|
ref: "wrapper",
|
|
2853
2725
|
class: this.wrapperClass
|
|
2854
|
-
}, [
|
|
2726
|
+
}, [r(rt), r(Yt, {
|
|
2855
2727
|
ref: "control"
|
|
2856
|
-
}), this.appendToBody ?
|
|
2728
|
+
}), this.appendToBody ? r(fs, {
|
|
2857
2729
|
ref: "portal"
|
|
2858
|
-
}) :
|
|
2730
|
+
}) : r(Ee, {
|
|
2859
2731
|
ref: "menu"
|
|
2860
2732
|
})]);
|
|
2861
2733
|
}
|
|
2862
2734
|
};
|
|
2863
|
-
let Ps, Ws;
|
|
2864
|
-
const Se = {};
|
|
2865
|
-
var js = /* @__PURE__ */ f(
|
|
2866
|
-
Hs,
|
|
2867
|
-
Ps,
|
|
2868
|
-
Ws,
|
|
2869
|
-
!1,
|
|
2870
|
-
Qs,
|
|
2871
|
-
null,
|
|
2872
|
-
null,
|
|
2873
|
-
null
|
|
2874
|
-
);
|
|
2875
|
-
function Qs(e) {
|
|
2876
|
-
for (let t in Se)
|
|
2877
|
-
this[t] = Se[t];
|
|
2878
|
-
}
|
|
2879
|
-
const Gs = /* @__PURE__ */ function() {
|
|
2880
|
-
return js.exports;
|
|
2881
|
-
}();
|
|
2882
2735
|
export {
|
|
2883
|
-
|
|
2736
|
+
Os as default
|
|
2884
2737
|
};
|