@web-utils/form-ui 1.0.0-beta84 → 1.0.0-beta85

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.
@@ -19,7 +19,7 @@ function A(e) {
19
19
  let { overflow: t, overflowX: n, overflowY: r } = getComputedStyle(e);
20
20
  return /(auto|scroll|overlay)/.test(t + r + n);
21
21
  }
22
- function j(e, t) {
22
+ function ee(e, t) {
23
23
  let n = k(e);
24
24
  return window.addEventListener("resize", t, { passive: !0 }), n.forEach((e) => {
25
25
  e.addEventListener("scroll", t, { passive: !0 });
@@ -29,24 +29,24 @@ function j(e, t) {
29
29
  });
30
30
  };
31
31
  }
32
- var M = (e) => Number.isNaN(e), N = () => ({});
33
- function P(e) {
32
+ var j = (e) => Number.isNaN(e), M = () => ({});
33
+ function N(e) {
34
34
  return typeof e != "object" || !e ? !1 : Object.getPrototypeOf(e) === Object.prototype;
35
35
  }
36
- function ee(e, t, n) {
37
- P(n) ? (e[t] || (e[t] = {}), F(e[t], n)) : e[t] = n;
36
+ function te(e, t, n) {
37
+ N(n) ? (e[t] || (e[t] = {}), P(e[t], n)) : e[t] = n;
38
38
  }
39
- function F(e, t) {
40
- if (P(t)) {
39
+ function P(e, t) {
40
+ if (N(t)) {
41
41
  let n = Object.keys(t);
42
- for (let r = 0, i = n.length; r < i; r++) ee(e, n[r], t[n[r]]);
42
+ for (let r = 0, i = n.length; r < i; r++) te(e, n[r], t[n[r]]);
43
43
  }
44
44
  return e;
45
45
  }
46
- function I(e, t, n) {
46
+ function F(e, t, n) {
47
47
  for (let r = 0, i = e.length; r < i; r++) if (t.call(n, e[r], r, e)) return e[r];
48
48
  }
49
- function te(e, t) {
49
+ function I(e, t) {
50
50
  let n = e.indexOf(t);
51
51
  n !== -1 && e.splice(n, 1);
52
52
  }
@@ -72,31 +72,31 @@ function ne(e, t) {
72
72
  var z, B = [], re = 100;
73
73
  function ie() {
74
74
  z = window.setInterval(() => {
75
- B.forEach(oe);
75
+ B.forEach(V);
76
76
  }, re);
77
77
  }
78
78
  function ae() {
79
79
  z && clearInterval(z), z = null;
80
80
  }
81
- function oe(e) {
81
+ function V(e) {
82
82
  let { $el: t, listener: n, lastWidth: r, lastHeight: i } = e, a = t.offsetWidth, o = t.offsetHeight;
83
83
  (r !== a || i !== o) && (e.lastWidth = a, e.lastHeight = o, n({
84
84
  width: a,
85
85
  height: o
86
86
  }));
87
87
  }
88
- function se(e, t) {
88
+ function oe(e, t) {
89
89
  let n = {
90
90
  $el: e,
91
91
  listener: t,
92
92
  lastWidth: null,
93
93
  lastHeight: null
94
94
  };
95
- return B.push(n), oe(n), ie(), () => {
96
- te(B, n), B.length || ae();
95
+ return B.push(n), V(n), ie(), () => {
96
+ I(B, n), B.length || ae();
97
97
  };
98
98
  }
99
- function ce(e, t) {
99
+ function se(e, t) {
100
100
  let n = document.createElement("_"), r = n.appendChild(document.createElement("_")), i = n.appendChild(document.createElement("_")), a = r.appendChild(document.createElement("_")), o, s;
101
101
  return r.style.cssText = n.style.cssText = "height:100%;left:0;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:0s;width:100%;z-index:-1", a.style.cssText = i.style.cssText = "display:block;height:100%;transition:0s;width:100%", a.style.width = a.style.height = "200%", e.appendChild(n), c(), u;
102
102
  function c() {
@@ -114,13 +114,13 @@ function ce(e, t) {
114
114
  l(), e.removeChild(n);
115
115
  }
116
116
  }
117
- function le(e, t) {
118
- let n = document.documentMode === 9, r = !0, i = (n ? se : ce)(e, (...e) => r || t(...e));
117
+ function ce(e, t) {
118
+ let n = document.documentMode === 9, r = !0, i = (n ? oe : se)(e, (...e) => r || t(...e));
119
119
  return r = !1, i;
120
120
  }
121
121
  //#endregion
122
122
  //#region src/components/tree-select/constants.ts
123
- var V = "ALL_CHILDREN", H = "ALL_DESCENDANTS", U = "LEAF_CHILDREN", W = "LEAF_DESCENDANTS", ue = "LOAD_ROOT_OPTIONS", de = "LOAD_CHILDREN_OPTIONS", fe = "ASYNC_SEARCH", G = {
123
+ var H = "ALL_CHILDREN", U = "ALL_DESCENDANTS", W = "LEAF_CHILDREN", G = "LEAF_DESCENDANTS", le = "LOAD_ROOT_OPTIONS", ue = "LOAD_CHILDREN_OPTIONS", de = "ASYNC_SEARCH", K = {
124
124
  BACKSPACE: 8,
125
125
  ENTER: 13,
126
126
  ESCAPE: 27,
@@ -131,21 +131,21 @@ var V = "ALL_CHILDREN", H = "ALL_DESCENDANTS", U = "LEAF_CHILDREN", W = "LEAF_DE
131
131
  ARROW_RIGHT: 39,
132
132
  ARROW_DOWN: 40,
133
133
  DELETE: 46
134
- }, K = Symbol("vueTreeSelect");
134
+ }, fe = process.env.NODE_ENV === "development" ? 10 : /* istanbul ignore next */ 200, q = Symbol("vueTreeSelect");
135
135
  //#endregion
136
136
  //#region src/components/tree-select/components/VueTreeSelectHiddenFields.vue?vue&type=script&lang.jsx
137
137
  function pe(e) {
138
138
  // istanbul ignore next
139
139
  return typeof e == "string" ? e :
140
140
  // istanbul ignore else
141
- e != null && !M(e) ? JSON.stringify(e) : "";
141
+ e != null && !j(e) ? JSON.stringify(e) : "";
142
142
  }
143
143
  //#endregion
144
144
  //#region src/components/tree-select/components/VueTreeSelectHiddenFields.vue
145
145
  var me = {
146
146
  name: "VueTreeSelectHiddenFields",
147
147
  setup() {
148
- let e = u(K);
148
+ let e = u(q);
149
149
  return () => {
150
150
  if (!e.name || e.disabled || !e.hasValue) return null;
151
151
  let t = e.internalValue.map(pe);
@@ -158,19 +158,19 @@ var me = {
158
158
  };
159
159
  }
160
160
  }, he = [
161
- G.ENTER,
162
- G.END,
163
- G.HOME,
164
- G.ARROW_LEFT,
165
- G.ARROW_UP,
166
- G.ARROW_RIGHT,
167
- G.ARROW_DOWN
161
+ K.ENTER,
162
+ K.END,
163
+ K.HOME,
164
+ K.ARROW_LEFT,
165
+ K.ARROW_UP,
166
+ K.ARROW_RIGHT,
167
+ K.ARROW_DOWN
168
168
  ], ge = {
169
169
  name: "VueTreeSelectInput",
170
170
  setup(e, { expose: t }) {
171
- let n = u(K), r = v(""), i = v(5), o = y("sizer"), s = y("input"), c = () => {
171
+ let n = u(q), r = v(""), i = v(5), o = y("sizer"), s = y("input"), c = () => {
172
172
  n.trigger.searchQuery = r.value;
173
- }, d = S(c, 200, {
173
+ }, d = S(c, fe, {
174
174
  leading: !0,
175
175
  trailing: !0
176
176
  }), m = a(() => n.searchable && !n.disabled && n.multiple), h = a(() => ({ width: m.value ? `${i.value}px` : null })), g = () => {
@@ -199,42 +199,42 @@ var me = {
199
199
  if (!(e.ctrlKey || e.shiftKey || e.altKey || e.metaKey)) {
200
200
  if (!n.menu.isOpen && L(he, t)) return e.preventDefault(), n.openMenu();
201
201
  switch (t) {
202
- case G.BACKSPACE:
202
+ case K.BACKSPACE:
203
203
  n.backspaceRemoves && !r.value.length && n.removeLastValue();
204
204
  break;
205
- case G.ENTER: {
205
+ case K.ENTER: {
206
206
  if (e.preventDefault(), n.menu.current === null) return;
207
207
  let t = n.getNode(n.menu.current);
208
208
  if (t.isBranch && n.disableBranchNodes) return;
209
209
  n.select(t);
210
210
  break;
211
211
  }
212
- case G.ESCAPE:
212
+ case K.ESCAPE:
213
213
  r.value.length ? T() : n.menu.isOpen && n.closeMenu();
214
214
  break;
215
- case G.END:
215
+ case K.END:
216
216
  e.preventDefault(), n.highlightLastOption();
217
217
  break;
218
- case G.HOME:
218
+ case K.HOME:
219
219
  e.preventDefault(), n.highlightFirstOption();
220
220
  break;
221
- case G.ARROW_LEFT: {
221
+ case K.ARROW_LEFT: {
222
222
  let t = n.getNode(n.menu.current);
223
223
  t.isBranch && n.shouldExpand(t) ? (e.preventDefault(), n.toggleExpanded(t)) : !t.isRootNode && (t.isLeaf || t.isBranch && !n.shouldExpand(t)) && (e.preventDefault(), n.setCurrentHighlightedOption(t.parentNode));
224
224
  break;
225
225
  }
226
- case G.ARROW_UP:
226
+ case K.ARROW_UP:
227
227
  e.preventDefault(), n.highlightPrevOption();
228
228
  break;
229
- case G.ARROW_RIGHT: {
229
+ case K.ARROW_RIGHT: {
230
230
  let t = n.getNode(n.menu.current);
231
231
  t.isBranch && !n.shouldExpand(t) && (e.preventDefault(), n.toggleExpanded(t));
232
232
  break;
233
233
  }
234
- case G.ARROW_DOWN:
234
+ case K.ARROW_DOWN:
235
235
  e.preventDefault(), n.highlightNextOption();
236
236
  break;
237
- case G.DELETE:
237
+ case K.DELETE:
238
238
  n.deleteRemoves && !r.value.length && n.removeLastValue();
239
239
  break;
240
240
  default:
@@ -276,20 +276,20 @@ var me = {
276
276
  focus: g
277
277
  }), () => {
278
278
  let e = {}, t = [];
279
- return n.searchable && !n.disabled && (t.push(O()), m.value && t.push(k())), n.searchable || F(e, {
279
+ return n.searchable && !n.disabled && (t.push(O()), m.value && t.push(k())), n.searchable || P(e, {
280
280
  on: {
281
281
  focus: x,
282
282
  blur: C,
283
283
  keydown: E
284
284
  },
285
285
  ref: "input"
286
- }), !n.searchable && !n.disabled && F(e, { attrs: { tabIndex: n.tabIndex } }), l("div", f({ class: "vue-treeselect__input-container" }, e), [t]);
286
+ }), !n.searchable && !n.disabled && P(e, { attrs: { tabIndex: n.tabIndex } }), l("div", f({ class: "vue-treeselect__input-container" }, e), [t]);
287
287
  };
288
288
  }
289
289
  }, _e = {
290
290
  name: "VueTreeSelectPlaceholder",
291
291
  setup() {
292
- let e = u(K);
292
+ let e = u(q);
293
293
  return () => l("div", { class: {
294
294
  "vue-treeselect__placeholder": !0,
295
295
  "vue-treeselect-helper-zoom-effect-off": !0,
@@ -299,7 +299,7 @@ var me = {
299
299
  }, ve = {
300
300
  name: "VueTreeSelectSingleValue",
301
301
  setup(e, { expose: n }) {
302
- let r = u(K);
302
+ let r = u(q);
303
303
  return n({ input: y("input") }), () => {
304
304
  let e = r.selectedNodes[0];
305
305
  return l(t, null, [
@@ -324,7 +324,7 @@ var me = {
324
324
  required: !0
325
325
  } },
326
326
  setup(e) {
327
- let t = u(K), n = D(() => {
327
+ let t = u(q), n = D(() => {
328
328
  t.select(e.node);
329
329
  });
330
330
  return () => l("div", { class: "vue-treeselect__multi-value-item-container" }, [l("div", {
@@ -339,7 +339,7 @@ var me = {
339
339
  }, Se = {
340
340
  name: "VueTreeSelectMultiValue",
341
341
  setup(e, { expose: t }) {
342
- let n = u(K), r = { props: {
342
+ let n = u(q), r = { props: {
343
343
  tag: "div",
344
344
  name: "vue-treeselect__multi-value-item--transition",
345
345
  appear: !0
@@ -374,7 +374,7 @@ var me = {
374
374
  }), Te = {
375
375
  name: "VueTreeSelectControl",
376
376
  setup(e, { expose: t }) {
377
- let n = u(K), r = a(() => n.hasValue && n.internalValue.some((e) => !n.getNode(e).isDisabled)), i = a(() => n.clearable && !n.disabled && n.hasValue && (r.value || n.allowClearingDisabled)), o = a(() => n.alwaysOpen ? !n.menu.isOpen : !0), s = D((e) => {
377
+ let n = u(q), r = a(() => n.hasValue && n.internalValue.some((e) => !n.getNode(e).isDisabled)), i = a(() => n.clearable && !n.disabled && n.hasValue && (r.value || n.allowClearingDisabled)), o = a(() => n.alwaysOpen ? !n.menu.isOpen : !0), s = D((e) => {
378
378
  e.preventDefault(), e.stopPropagation(), n.focusInput(), n.toggleMenu();
379
379
  }), c = () => {
380
380
  let e = n.multiple ? n.clearAllText : n.clearValueText;
@@ -420,11 +420,11 @@ var me = {
420
420
  };
421
421
  //#endregion
422
422
  //#region src/components/tree-select/components/VueTreeSelectTip.jsx
423
- function q(e, { slots: t }) {
423
+ function J(e, { slots: t }) {
424
424
  var n;
425
425
  return l("div", { class: `vue-treeselect__tip vue-treeselect__${e.type}-tip` }, [l("div", { class: "vue-treeselect__icon-container" }, [l("span", { class: `vue-treeselect__icon-${e.icon}` }, null)]), l("span", { class: `vue-treeselect__tip-text vue-treeselect__${e.type}-tip-text` }, [(n = t.default) == null ? void 0 : n.call(t)])]);
426
426
  }
427
- q.props = {
427
+ J.props = {
428
428
  type: {
429
429
  type: String,
430
430
  required: !0
@@ -433,20 +433,20 @@ q.props = {
433
433
  type: String,
434
434
  required: !0
435
435
  }
436
- }, q.inheritAttrs = !1;
436
+ }, J.inheritAttrs = !1;
437
437
  //#endregion
438
438
  //#region src/components/tree-select/components/VueTreeSelectOption.vue?vue&type=script&lang.jsx
439
439
  function Ee(e) {
440
440
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !d(e);
441
441
  }
442
- var J, Y, X, De = {
442
+ var Y, X, Z, De = {
443
443
  name: "VueTreeSelectOption",
444
444
  props: { node: {
445
445
  type: Object,
446
446
  required: !0
447
447
  } },
448
448
  setup(e) {
449
- let t = u(K), n = a(() => e.node.isBranch && t.shouldExpand(e.node)), i = a(() => t.shouldShowOptionInMenu(e.node)), o = () => l("div", {
449
+ let t = u(q), n = a(() => e.node.isBranch && t.shouldExpand(e.node)), i = a(() => t.shouldShowOptionInMenu(e.node)), o = () => l("div", {
450
450
  class: {
451
451
  "vue-treeselect__option": !0,
452
452
  "vue-treeselect__option--disabled": e.node.isDisabled,
@@ -477,7 +477,7 @@ var J, Y, X, De = {
477
477
  onMousedown: x
478
478
  }, [l(r, e, { default: () => [l(we, { class: t }, null)] })]);
479
479
  }
480
- return t.hasBranchNodes ? (J || (J = l("div", { class: "vue-treeselect__option-arrow-placeholder" }, [c("\xA0")])), J) : null;
480
+ return t.hasBranchNodes ? (Y || (Y = l("div", { class: "vue-treeselect__option-arrow-placeholder" }, [c("\xA0")])), Y) : null;
481
481
  }, f = (e) => l("div", {
482
482
  class: "vue-treeselect__label-container",
483
483
  onMousedown: S
@@ -489,7 +489,7 @@ var J, Y, X, De = {
489
489
  "vue-treeselect__checkbox--unchecked": n === 0,
490
490
  "vue-treeselect__checkbox--disabled": e.node.isDisabled
491
491
  };
492
- return Y || (Y = l("span", { class: "vue-treeselect__check-mark" }, null)), X || (X = l("span", { class: "vue-treeselect__minus-mark" }, null)), l("span", { class: r }, [Y, X]);
492
+ return X || (X = l("span", { class: "vue-treeselect__check-mark" }, null)), Z || (Z = l("span", { class: "vue-treeselect__minus-mark" }, null)), l("span", { class: r }, [X, Z]);
493
493
  }, h = () => {
494
494
  let n = e.node.isBranch && (t.localSearch.active ? t.showCountOnSearchComputed : t.showCount), r = n ? t.localSearch.active ? t.localSearch.countMap[e.node.id][t.showCountOf] : e.node.count[t.showCountOf] : NaN, i = "vue-treeselect__label", a = "vue-treeselect__count", o = t.$slots["option-label"];
495
495
  return o ? o({
@@ -506,13 +506,13 @@ var J, Y, X, De = {
506
506
  }, g = () => e.node.childrenStates.isLoaded ? e.node.children.map((e) => l(De, {
507
507
  node: e,
508
508
  key: e.id
509
- }, null)) : null, _ = () => !e.node.childrenStates.isLoaded || e.node.children.length ? null : l(q, {
509
+ }, null)) : null, _ = () => !e.node.childrenStates.isLoaded || e.node.children.length ? null : l(J, {
510
510
  type: "no-children",
511
511
  icon: "warning"
512
- }, { default: () => [t.noChildrenText] }), v = () => e.node.childrenStates.isLoading ? l(q, {
512
+ }, { default: () => [t.noChildrenText] }), v = () => e.node.childrenStates.isLoading ? l(J, {
513
513
  type: "loading",
514
514
  icon: "loader"
515
- }, { default: () => [t.loadingText] }) : null, y = () => e.node.childrenStates.loadingError ? l(q, {
515
+ }, { default: () => [t.loadingText] }) : null, y = () => e.node.childrenStates.loadingError ? l(J, {
516
516
  type: "error",
517
517
  icon: "error"
518
518
  }, { default: () => [e.node.childrenStates.loadingError, l("a", {
@@ -550,7 +550,7 @@ var ke = {
550
550
  }, Ae = {
551
551
  name: "VueTreeSelectMenu",
552
552
  setup() {
553
- let e = u(K), t = null, n = null, i = a(() => ({ maxHeight: `${e.maxHeight}px` })), o = a(() => ({ zIndex: e.appendToBody ? null : e.zIndex })), s = () => e.menu.isOpen ? l("div", {
553
+ let e = u(q), t = null, n = null, i = a(() => ({ maxHeight: `${e.maxHeight}px` })), o = a(() => ({ zIndex: e.appendToBody ? null : e.zIndex })), s = () => e.menu.isOpen ? l("div", {
554
554
  ref: "menu",
555
555
  class: "vue-treeselect__menu",
556
556
  onMousedown: e.handleMouseDown,
@@ -571,13 +571,13 @@ var ke = {
571
571
  }, v = () => l("div", { class: "vue-treeselect__list" }, [e.forest.normalizedOptions.map((e) => l(De, {
572
572
  node: e,
573
573
  key: e.id
574
- }, null))]), y = () => l(q, {
574
+ }, null))]), y = () => l(J, {
575
575
  type: "search-prompt",
576
576
  icon: "warning"
577
- }, { default: () => [e.searchPromptText] }), x = () => l(q, {
577
+ }, { default: () => [e.searchPromptText] }), x = () => l(J, {
578
578
  type: "loading",
579
579
  icon: "loader"
580
- }, { default: () => [e.loadingText] }), S = () => l(q, {
580
+ }, { default: () => [e.loadingText] }), S = () => l(J, {
581
581
  type: "error",
582
582
  icon: "error"
583
583
  }, { default: () => [e.rootOptionsStates.loadingError, l("a", {
@@ -586,7 +586,7 @@ var ke = {
586
586
  title: e.retryTitle
587
587
  }, [e.retryText])] }), C = () => {
588
588
  let t = e.getRemoteSearchEntry();
589
- return l(q, {
589
+ return l(J, {
590
590
  type: "error",
591
591
  icon: "error"
592
592
  }, { default: () => [t.loadingError, l("a", {
@@ -594,29 +594,29 @@ var ke = {
594
594
  onClick: e.handleRemoteSearch,
595
595
  title: e.retryTitle
596
596
  }, [e.retryText])] });
597
- }, w = () => l(q, {
597
+ }, w = () => l(J, {
598
598
  type: "no-options",
599
599
  icon: "warning"
600
- }, { default: () => [e.noOptionsText] }), T = () => l(q, {
600
+ }, { default: () => [e.noOptionsText] }), T = () => l(J, {
601
601
  type: "no-results",
602
602
  icon: "warning"
603
603
  }, { default: () => [e.noResultsText] }), E = () => {
604
604
  O(), k(), A();
605
605
  }, D = () => {
606
- M(), N();
606
+ j(), M();
607
607
  }, O = () => {
608
608
  if (!e.menu.isOpen) return;
609
609
  let t = e.getMenu(), n = e.getControl(), r = t.getBoundingClientRect(), i = n.getBoundingClientRect(), a = r.height, o = window.innerHeight, s = i.top, c = window.innerHeight - i.bottom, l = i.top >= 0 && i.top <= o || i.top < 0 && i.bottom > 0, u = c > a + 40, d = s > a + 40;
610
610
  l ? e.openDirection === "auto" ? u || !d ? e.menu.placement = "bottom" : e.menu.placement = "top" : e.menu.placement = ke[e.openDirection] : e.closeMenu();
611
611
  }, k = () => {
612
612
  let n = e.getMenu();
613
- t || (t = { remove: le(n, O) });
613
+ t || (t = { remove: ce(n, O) });
614
614
  }, A = () => {
615
615
  let t = e.getControl();
616
- n || (n = { remove: j(t, O) });
617
- }, M = () => {
616
+ n || (n = { remove: ee(t, O) });
617
+ }, j = () => {
618
618
  t && (t.remove(), t = null);
619
- }, N = () => {
619
+ }, M = () => {
620
620
  n && (n.remove(), n = null);
621
621
  };
622
622
  return b(() => e.menu.isOpen, (e) => {
@@ -637,8 +637,8 @@ var ke = {
637
637
  }, je = {
638
638
  name: "VueTreeSelectPortalTarget",
639
639
  setup() {
640
- let e = u(K), t = y("el"), n = y("menu"), r = null, i = null, a = () => {
641
- let r = e.getControl().getBoundingClientRect(), i = t.value.getBoundingClientRect(), a = e.menu.placement === "bottom" ? r.height : 0, o = `${Math.round(r.left - i.left)}px`, s = `${Math.round(r.top - i.top + a)}px`, c = n.value.$refs["menu-container"].style, l = I([
640
+ let e = u(q), t = y("el"), n = y("menu"), r = null, i = null, a = () => {
641
+ let r = e.getControl().getBoundingClientRect(), i = t.value.getBoundingClientRect(), a = e.menu.placement === "bottom" ? r.height : 0, o = `${Math.round(r.left - i.left)}px`, s = `${Math.round(r.top - i.top + a)}px`, c = n.value.$refs["menu-container"].style, l = F([
642
642
  "transform",
643
643
  "webkitTransform",
644
644
  "MozTransform",
@@ -647,13 +647,13 @@ var ke = {
647
647
  c[l] = `translate(${o}, ${s})`;
648
648
  }, o = () => {
649
649
  let t = e.getControl();
650
- r || (r = { remove: j(t, a) });
650
+ r || (r = { remove: ee(t, a) });
651
651
  }, s = () => {
652
652
  let n = e.getControl().getBoundingClientRect();
653
653
  t.value.style.width = `${n.width}px`;
654
654
  }, c = () => {
655
655
  let t = e.getControl();
656
- i || (i = { remove: le(t, () => {
656
+ i || (i = { remove: ce(t, () => {
657
657
  s(), a();
658
658
  }) });
659
659
  }, d = () => {
@@ -688,7 +688,7 @@ var ke = {
688
688
  };
689
689
  //#endregion
690
690
  //#region src/components/tree-select/VueTreeSelect.vue?vue&type=script&lang.jsx
691
- function Z(e, t) {
691
+ function Ne(e, t) {
692
692
  let n = 0;
693
693
  do {
694
694
  if (e.level < n) return -1;
@@ -697,8 +697,8 @@ function Z(e, t) {
697
697
  n++;
698
698
  } while (!0);
699
699
  }
700
- function Ne(e, t) {
701
- return e.level === t.level ? Z(e, t) : e.level - t.level;
700
+ function Pe(e, t) {
701
+ return e.level === t.level ? Ne(e, t) : e.level - t.level;
702
702
  }
703
703
  function Q() {
704
704
  return {
@@ -707,11 +707,11 @@ function Q() {
707
707
  loadingError: ""
708
708
  };
709
709
  }
710
- function Pe(e) {
710
+ function Fe(e) {
711
711
  // istanbul ignore next
712
- return typeof e == "string" ? e : typeof e == "number" && !M(e) ? `${e}` : "";
712
+ return typeof e == "string" ? e : typeof e == "number" && !j(e) ? `${e}` : "";
713
713
  }
714
- function Fe(e, t, n) {
714
+ function Ie(e, t, n) {
715
715
  return e ? ne(t, n) : L(n, t);
716
716
  }
717
717
  function $(e) {
@@ -719,10 +719,10 @@ function $(e) {
719
719
  }
720
720
  //#endregion
721
721
  //#region src/components/tree-select/VueTreeSelect.vue
722
- var Ie = {
722
+ var Le = {
723
723
  name: "VueTreeSelect",
724
724
  provide() {
725
- return { [K]: this };
725
+ return { [q]: this };
726
726
  },
727
727
  props: { ...e },
728
728
  emits: [
@@ -747,18 +747,18 @@ var Ie = {
747
747
  },
748
748
  forest: {
749
749
  normalizedOptions: [],
750
- nodeMap: N(),
751
- checkedStateMap: N(),
750
+ nodeMap: M(),
751
+ checkedStateMap: M(),
752
752
  selectedNodeIds: this.extractCheckedNodeIdsFromValue(),
753
- selectedNodeMap: N()
753
+ selectedNodeMap: M()
754
754
  },
755
755
  rootOptionsStates: Q(),
756
756
  localSearch: {
757
757
  active: !1,
758
758
  noResults: !0,
759
- countMap: N()
759
+ countMap: M()
760
760
  },
761
- remoteSearch: N()
761
+ remoteSearch: M()
762
762
  };
763
763
  },
764
764
  computed: {
@@ -785,7 +785,7 @@ var Ie = {
785
785
  });
786
786
  }), e.push(...t);
787
787
  }
788
- return this.sortValueBy === "LEVEL" ? e.sort((e, t) => Ne(this.getNode(e), this.getNode(t))) : this.sortValueBy === "INDEX" && e.sort((e, t) => Z(this.getNode(e), this.getNode(t))), e;
788
+ return this.sortValueBy === "LEVEL" ? e.sort((e, t) => Pe(this.getNode(e), this.getNode(t))) : this.sortValueBy === "INDEX" && e.sort((e, t) => Ne(this.getNode(e), this.getNode(t))), e;
789
789
  },
790
790
  hasValue() {
791
791
  return this.internalValue.length > 0;
@@ -894,7 +894,7 @@ var Ie = {
894
894
  let e = this.async ? this.getRemoteSearchEntry().options : this.options;
895
895
  if (Array.isArray(e)) {
896
896
  let t = this.forest.nodeMap;
897
- this.forest.nodeMap = N(), this.keepDataOfSelectedNodes(t), this.forest.normalizedOptions = this.normalize(null, e, t), this.fixSelectedNodeIds(this.internalValue);
897
+ this.forest.nodeMap = M(), this.keepDataOfSelectedNodes(t), this.forest.normalizedOptions = this.normalize(null, e, t), this.fixSelectedNodeIds(this.internalValue);
898
898
  } else this.forest.normalizedOptions = [];
899
899
  },
900
900
  getInstanceId() {
@@ -931,7 +931,7 @@ var Ie = {
931
931
  },
932
932
  extractNodeFromValue(e) {
933
933
  let t = { id: e };
934
- return this.valueFormat === "id" ? t : I(this.multiple ? Array.isArray(this.modelValue) ? this.modelValue : [] : this.modelValue ? [this.modelValue] : [], (t) => t && this.enhancedNormalizer(t).id === e) || t;
934
+ return this.valueFormat === "id" ? t : F(this.multiple ? Array.isArray(this.modelValue) ? this.modelValue : [] : this.modelValue ? [this.modelValue] : [], (t) => t && this.enhancedNormalizer(t).id === e) || t;
935
935
  },
936
936
  fixSelectedNodeIds(e) {
937
937
  let t = [];
@@ -945,13 +945,13 @@ var Ie = {
945
945
  });
946
946
  });
947
947
  else if (this.valueConsistsOf === "LEAF_PRIORITY") {
948
- let n = N(), r = e.slice();
948
+ let n = M(), r = e.slice();
949
949
  for (; r.length;) {
950
950
  let e = r.shift(), i = this.getNode(e);
951
951
  t.push(e), !i.isRootNode && (i.parentNode.id in n || (n[i.parentNode.id] = i.parentNode.children.length), --n[i.parentNode.id] === 0 && r.push(i.parentNode.id));
952
952
  }
953
953
  } else if (this.valueConsistsOf === "ALL_WITH_INDETERMINATE") {
954
- let n = N(), r = e.filter((e) => {
954
+ let n = M(), r = e.filter((e) => {
955
955
  let t = this.getNode(e);
956
956
  return t.isLeaf || t.children.length === 0;
957
957
  });
@@ -1029,15 +1029,15 @@ var Ie = {
1029
1029
  if (!e) return this.localSearch.active = !1, t();
1030
1030
  this.localSearch.active = !0, this.localSearch.noResults = !0, this.traverseAllNodesDFS((e) => {
1031
1031
  e.isBranch && (e.isExpandedOnSearch = !1, e.showAllChildrenOnSearch = !1, e.isMatched = !1, e.hasMatchedDescendants = !1, this.localSearch.countMap[e.id] = {
1032
- [V]: 0,
1033
1032
  [H]: 0,
1034
1033
  [U]: 0,
1035
- [W]: 0
1034
+ [W]: 0,
1035
+ [G]: 0
1036
1036
  });
1037
1037
  });
1038
1038
  let n = e.trim().toLocaleLowerCase(), r = n.replace(/\s+/g, " ").split(" ");
1039
1039
  this.traverseAllNodesDFS((e) => {
1040
- this.searchNested && r.length > 1 ? e.isMatched = r.every((t) => Fe(!1, t, e.nestedSearchLabel)) : e.isMatched = this.matchKeys.some((t) => Fe(!this.disableFuzzyMatching, n, e.lowerCased[t])), e.isMatched && (this.localSearch.noResults = !1, e.ancestors.forEach((e) => this.localSearch.countMap[e.id][H]++), e.isLeaf && e.ancestors.forEach((e) => this.localSearch.countMap[e.id][W]++), e.parentNode !== null && (this.localSearch.countMap[e.parentNode.id][V] += 1, e.isLeaf && (this.localSearch.countMap[e.parentNode.id][U] += 1))), (e.isMatched || e.isBranch && e.isExpandedOnSearch) && e.parentNode !== null && (e.parentNode.isExpandedOnSearch = !0, e.parentNode.hasMatchedDescendants = !0);
1040
+ this.searchNested && r.length > 1 ? e.isMatched = r.every((t) => Ie(!1, t, e.nestedSearchLabel)) : e.isMatched = this.matchKeys.some((t) => Ie(!this.disableFuzzyMatching, n, e.lowerCased[t])), e.isMatched && (this.localSearch.noResults = !1, e.ancestors.forEach((e) => this.localSearch.countMap[e.id][U]++), e.isLeaf && e.ancestors.forEach((e) => this.localSearch.countMap[e.id][G]++), e.parentNode !== null && (this.localSearch.countMap[e.parentNode.id][H] += 1, e.isLeaf && (this.localSearch.countMap[e.parentNode.id][W] += 1))), (e.isMatched || e.isBranch && e.isExpandedOnSearch) && e.parentNode !== null && (e.parentNode.isExpandedOnSearch = !0, e.parentNode.hasMatchedDescendants = !0);
1041
1041
  }), t();
1042
1042
  },
1043
1043
  handleRemoteSearch() {
@@ -1046,7 +1046,7 @@ var Ie = {
1046
1046
  };
1047
1047
  if ((e === "" || this.cacheOptions) && t.isLoaded) return n();
1048
1048
  this.callLoadOptionsProp({
1049
- action: fe,
1049
+ action: de,
1050
1050
  args: { searchQuery: e },
1051
1051
  isPending() {
1052
1052
  return t.isLoading;
@@ -1149,11 +1149,11 @@ this.$nextTick(t);
1149
1149
  this.localSearch.active ? (t = e.isExpandedOnSearch = !e.isExpandedOnSearch, t && (e.showAllChildrenOnSearch = !0)) : t = e.isExpanded = !e.isExpanded, t && !e.childrenStates.isLoaded && this.loadChildrenOptions(e);
1150
1150
  },
1151
1151
  buildForestState() {
1152
- let e = N();
1152
+ let e = M();
1153
1153
  this.forest.selectedNodeIds.forEach((t) => {
1154
1154
  e[t] = !0;
1155
1155
  }), this.forest.selectedNodeMap = e;
1156
- let t = N();
1156
+ let t = M();
1157
1157
  this.multiple && (this.traverseAllNodesByIndex((e) => {
1158
1158
  t[e.id] = 0;
1159
1159
  }), this.selectedNodes.forEach((e) => {
@@ -1173,9 +1173,9 @@ this.$nextTick(t);
1173
1173
  this.checkDuplication(t), this.verifyNodeShape(t);
1174
1174
  let { id: a, label: o, children: s, isDefaultExpanded: c } = t, l = e === null, u = l ? 0 : e.level + 1, d = Array.isArray(s) || s === null, f = !d, p = !!t.isDisabled || !this.flat && !l && e.isDisabled, m = !!t.isNew, h = this.matchKeys.reduce((e, n) => ({
1175
1175
  ...e,
1176
- [n]: Pe(t[n]).toLocaleLowerCase()
1176
+ [n]: Fe(t[n]).toLocaleLowerCase()
1177
1177
  }), {}), g = l ? h.label : `${e.nestedSearchLabel} ${h.label}`;
1178
- this.forest.nodeMap[a] = N();
1178
+ this.forest.nodeMap[a] = M();
1179
1179
  let _ = this.forest.nodeMap[a];
1180
1180
  if (_.id = a, _.label = o, _.level = u, _.ancestors = l ? [] : [e].concat(e.ancestors), _.index = (l ? [] : e.index).concat(i), _.parentNode = e, _.lowerCased = h, _.nestedSearchLabel = g, _.isDisabled = p, _.isNew = m, _.isMatched = !1, _.isHighlighted = !1, _.isBranch = d, _.isLeaf = f, _.isRootNode = l, _.raw = r, d) {
1181
1181
  let e = Array.isArray(s);
@@ -1183,15 +1183,15 @@ this.$nextTick(t);
1183
1183
  ...Q(),
1184
1184
  isLoaded: e
1185
1185
  }, _.isExpanded = typeof c == "boolean" ? c : u < this.defaultExpandLevel, _.hasMatchedDescendants = !1, _.hasDisabledDescendants = !1, _.isExpandedOnSearch = !1, _.showAllChildrenOnSearch = !1, _.count = {
1186
- [V]: 0,
1187
1186
  [H]: 0,
1188
1187
  [U]: 0,
1189
- [W]: 0
1188
+ [W]: 0,
1189
+ [G]: 0
1190
1190
  }, _.children = e ? this.normalize(_, s, n) : [], c === !0 && _.ancestors.forEach((e) => {
1191
1191
  e.isExpanded = !0;
1192
1192
  }), !e && typeof this.loadOptions != "function" ? E(() => !1, () => "Unloaded branch node detected. \"loadOptions\" prop is required to load its children.") : !e && _.isExpanded && this.loadChildrenOptions(_);
1193
1193
  }
1194
- if (_.ancestors.forEach((e) => e.count[H]++), f && _.ancestors.forEach((e) => e.count[W]++), l || (e.count[V] += 1, f && (e.count[U] += 1), p && (e.hasDisabledDescendants = !0)), n && n[a]) {
1194
+ if (_.ancestors.forEach((e) => e.count[U]++), f && _.ancestors.forEach((e) => e.count[G]++), l || (e.count[H] += 1, f && (e.count[W] += 1), p && (e.hasDisabledDescendants = !0)), n && n[a]) {
1195
1195
  let e = n[a];
1196
1196
  _.isMatched = e.isMatched, _.showAllChildrenOnSearch = e.showAllChildrenOnSearch, _.isHighlighted = e.isHighlighted, e.isBranch && _.isBranch && (_.isExpanded = e.isExpanded, _.isExpandedOnSearch = e.isExpandedOnSearch, e.childrenStates.isLoaded && !_.childrenStates.isLoaded ? _.isExpanded = !1 : _.childrenStates = { ...e.childrenStates });
1197
1197
  }
@@ -1205,7 +1205,7 @@ this.$nextTick(t);
1205
1205
  },
1206
1206
  loadRootOptions() {
1207
1207
  this.callLoadOptionsProp({
1208
- action: ue,
1208
+ action: le,
1209
1209
  isPending: () => this.rootOptionsStates.isLoading,
1210
1210
  start: () => {
1211
1211
  this.rootOptionsStates.isLoading = !0, this.rootOptionsStates.loadingError = "";
@@ -1226,7 +1226,7 @@ this.$nextTick(t);
1226
1226
  loadChildrenOptions(e) {
1227
1227
  let { id: t, raw: n } = e;
1228
1228
  this.callLoadOptionsProp({
1229
- action: de,
1229
+ action: ue,
1230
1230
  args: { parentNode: n },
1231
1231
  isPending: () => this.getNode(t).childrenStates.isLoading,
1232
1232
  start: () => {
@@ -1320,7 +1320,7 @@ this.$nextTick(t);
1320
1320
  this.forest.selectedNodeIds.push(e.id), this.forest.selectedNodeMap[e.id] = !0;
1321
1321
  },
1322
1322
  removeValue(e) {
1323
- te(this.forest.selectedNodeIds, e.id), delete this.forest.selectedNodeMap[e.id];
1323
+ I(this.forest.selectedNodeIds, e.id), delete this.forest.selectedNodeMap[e.id];
1324
1324
  },
1325
1325
  removeLastValue() {
1326
1326
  if (!this.hasValue) return;
@@ -1351,4 +1351,4 @@ this.$nextTick(t);
1351
1351
  }
1352
1352
  };
1353
1353
  //#endregion
1354
- export { Ie as t };
1354
+ export { Le as t };
@@ -1,5 +1,5 @@
1
1
  import { n as e, o as t } from "./b0ve2YgF.mjs";
2
- import { t as n } from "./FZqu01np2.mjs";
2
+ import { t as n } from "./BTGrh7dw2.mjs";
3
3
  import { allProps as r, predicate as i } from "../props/tree-select-multiple.mjs";
4
4
  import { createVNode as a, mergeProps as o } from "vue";
5
5
  //#endregion