@dazhicheng/ui 1.5.262 → 1.5.263

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.
@@ -1,10 +1,11 @@
1
- import { defineComponent as V, ref as f, computed as s, watch as z, nextTick as H, createElementBlock as c, openBlock as p, normalizeClass as o, createElementVNode as v, createVNode as r, unref as t, withCtx as h, createTextVNode as b, normalizeStyle as g, Fragment as N, renderList as I, createCommentVNode as A, toDisplayString as P } from "vue";
2
- import w from "../../../../assets/svg/close.svg.js";
1
+ import { defineComponent as M, ref as f, computed as s, watch as V, nextTick as H, createElementBlock as p, openBlock as u, normalizeClass as r, createElementVNode as v, createVNode as a, unref as t, withCtx as h, createTextVNode as x, normalizeStyle as g, Fragment as N, renderList as I, createCommentVNode as A, toDisplayString as P } from "vue";
2
+ import y from "../../../../assets/svg/close.svg.js";
3
3
  import { TtButton as Y } from "../../../tt-button/index.js";
4
- import { TtIcon as y } from "../../../tt-icon/index.js";
4
+ import { TtIcon as $ } from "../../../tt-icon/index.js";
5
5
  import { TtText as D } from "../../../tt-text/index.js";
6
- import { ElScrollbar as F } from "element-plus";
7
- const n = 34, $ = 8, U = /* @__PURE__ */ V({
6
+ import { useResizeObserver as F } from "@vueuse/core";
7
+ import { ElScrollbar as L } from "element-plus";
8
+ const n = 34, _ = 8, X = /* @__PURE__ */ M({
8
9
  name: "PanelRight",
9
10
  __name: "PanelRight",
10
11
  props: {
@@ -14,86 +15,91 @@ const n = 34, $ = 8, U = /* @__PURE__ */ V({
14
15
  disabled: { type: Boolean }
15
16
  },
16
17
  emits: ["clearAll", "remove"],
17
- setup(_, { emit: k }) {
18
- const a = _, C = k, u = f(), d = f(0), x = f(340), T = s(() => a.selectedOptions.length * n), R = s(() => Math.max(1, Math.ceil(x.value / n))), m = s(() => Math.max(0, Math.floor(d.value / n) - $)), S = s(
19
- () => Math.min(a.selectedOptions.length, m.value + R.value + $ * 2)
20
- ), B = s(() => m.value * n), E = s(() => a.selectedOptions.slice(m.value, S.value));
21
- function M() {
18
+ setup(k, { emit: R }) {
19
+ const i = k, C = R, c = f(), d = f(0), b = f(0), T = s(() => i.selectedOptions.length * n), O = s(() => Math.max(1, Math.ceil(b.value / n))), m = s(() => Math.max(0, Math.floor(d.value / n) - _)), S = s(
20
+ () => Math.min(i.selectedOptions.length, m.value + O.value + _ * 2)
21
+ ), z = s(() => m.value * n), B = s(() => i.selectedOptions.slice(m.value, S.value));
22
+ function w() {
22
23
  var l;
23
- const e = (l = u.value) == null ? void 0 : l.wrapRef;
24
- e && (x.value = e.clientHeight, d.value = e.scrollTop);
24
+ const e = (l = c.value) == null ? void 0 : l.wrapRef;
25
+ e && (b.value = e.clientHeight, d.value = e.scrollTop);
25
26
  }
26
- function O() {
27
+ function E() {
27
28
  var l;
28
- const e = (l = u.value) == null ? void 0 : l.wrapRef;
29
+ const e = (l = c.value) == null ? void 0 : l.wrapRef;
29
30
  e && (d.value = e.scrollTop);
30
31
  }
31
- return z(
32
- () => a.selectedOptions.length,
32
+ return V(
33
+ () => i.selectedOptions.length,
33
34
  async () => {
34
- await H(), M();
35
+ await H(), w();
35
36
  },
36
37
  { immediate: !0 }
37
- ), (e, l) => (p(), c("div", {
38
- class: o(`${e.prefixCls}__right`)
38
+ ), F(
39
+ () => {
40
+ var e;
41
+ return (e = c.value) == null ? void 0 : e.wrapRef;
42
+ },
43
+ () => w()
44
+ ), (e, l) => (u(), p("div", {
45
+ class: r(`${e.prefixCls}__right`)
39
46
  }, [
40
47
  v("div", {
41
- class: o(`${e.prefixCls}__selected-actions`)
48
+ class: r(`${e.prefixCls}__selected-actions`)
42
49
  }, [
43
- r(t(Y), {
50
+ a(t(Y), {
44
51
  disabled: e.disabled,
45
52
  class: "w-full",
46
53
  plain: "",
47
- onClick: l[0] || (l[0] = (i) => C("clearAll"))
54
+ onClick: l[0] || (l[0] = (o) => C("clearAll"))
48
55
  }, {
49
56
  default: h(() => [
50
- r(t(y), {
57
+ a(t($), {
51
58
  class: "mr-[4px]",
52
59
  size: 14,
53
60
  "is-custom-svg": "",
54
- icon: t(w)
61
+ icon: t(y)
55
62
  }, null, 8, ["icon"]),
56
- l[1] || (l[1] = b(" 取消全选 ", -1))
63
+ l[1] || (l[1] = x(" 取消全选 ", -1))
57
64
  ]),
58
65
  _: 1
59
66
  }, 8, ["disabled"])
60
67
  ], 2),
61
- r(t(F), {
68
+ a(t(L), {
62
69
  ref_key: "scrollbarRef",
63
- ref: u,
64
- class: o(`${e.prefixCls}__selected-list ${e.prefixCls}__right-scrollbar`),
65
- height: "340px",
66
- onScroll: O
70
+ ref: c,
71
+ class: r(`${e.prefixCls}__selected-list ${e.prefixCls}__right-scrollbar`),
72
+ onScroll: E
67
73
  }, {
68
74
  default: h(() => [
69
75
  v("div", {
70
76
  style: g({ height: `${T.value}px` })
71
77
  }, [
72
78
  v("div", {
73
- style: g({ transform: `translateY(${B.value}px)` })
79
+ style: g({ transform: `translateY(${z.value}px)` })
74
80
  }, [
75
- (p(!0), c(N, null, I(E.value, (i) => (p(), c("div", {
76
- key: i.value,
81
+ (u(!0), p(N, null, I(B.value, (o) => (u(), p("div", {
82
+ key: o.value,
77
83
  style: g({ height: `${n}px` }),
78
- class: o(`${e.prefixCls}__selected-item`)
84
+ class: r(`${e.prefixCls}__selected-item`)
79
85
  }, [
80
- r(t(D), null, {
86
+ a(t(D), null, {
81
87
  default: h(() => [
82
- b(P(i.label), 1)
88
+ x(P(o.label), 1)
83
89
  ]),
84
90
  _: 2
85
91
  }, 1024),
86
- e.disabled ? A("", !0) : (p(), c("span", {
92
+ !e.disabled && !o.disabled ? (u(), p("span", {
87
93
  key: 0,
88
- class: o(`${e.prefixCls}__selected-item-close`)
94
+ class: r(`${e.prefixCls}__selected-item-close`)
89
95
  }, [
90
- r(t(y), {
96
+ a(t($), {
91
97
  size: 14,
92
98
  "is-custom-svg": "",
93
- icon: t(w),
94
- onClick: (L) => C("remove", i.value)
99
+ icon: t(y),
100
+ onClick: (j) => C("remove", o.value)
95
101
  }, null, 8, ["icon", "onClick"])
96
- ], 2))
102
+ ], 2)) : A("", !0)
97
103
  ], 6))), 128))
98
104
  ], 4)
99
105
  ], 4)
@@ -104,5 +110,5 @@ const n = 34, $ = 8, U = /* @__PURE__ */ V({
104
110
  }
105
111
  });
106
112
  export {
107
- U as default
113
+ X as default
108
114
  };
@@ -1,7 +1,7 @@
1
1
  import "axios";
2
2
  import "element-plus";
3
3
  import { isFunction as w } from "../../../../packages/utils/src/is.js";
4
- import { computed as d, ref as T, unref as X, nextTick as Y } from "vue";
4
+ import { computed as d, ref as T, unref as Z, nextTick as ee } from "vue";
5
5
  import "xe-utils";
6
6
  import "dayjs";
7
7
  import "dayjs/plugin/utc";
@@ -11,11 +11,11 @@ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/ae
11
11
  import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
12
12
  import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
13
13
  import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
14
- import { get as a, omit as Z, cloneDeep as ee } from "lodash-es";
15
- import { pinyin as te } from "pinyin-pro";
16
- function ge(i) {
14
+ import { get as a, omit as te, cloneDeep as re } from "lodash-es";
15
+ import { pinyin as ne } from "pinyin-pro";
16
+ function Fe(l) {
17
17
  const A = d(() => {
18
- const e = i.treeConfig || {};
18
+ const e = l.treeConfig || {};
19
19
  return {
20
20
  transform: e.transform,
21
21
  labelField: e.labelField ?? "label",
@@ -25,12 +25,12 @@ function ge(i) {
25
25
  parentField: e.parentField ?? "pid",
26
26
  rootParentValue: e.rootParentValue ?? null
27
27
  };
28
- }), F = T(!1), C = T([]), P = T(!1), S = T(!1), M = d(() => w(i.api) ? C.value : i.options || []), N = d(() => K(M.value)), z = d(() => !V() && i.showPinyinMode ? $(G.value) : D(N.value)), O = d(() => q(N.value)), B = d(() => O.value.filter((e) => {
28
+ }), F = T(!1), C = T([]), P = T(!1), M = T(!1), S = d(() => w(l.api) ? C.value : l.options || []), N = d(() => K(S.value)), x = d(() => !V() && l.showPinyinMode ? $(G.value) : D(N.value)), O = d(() => q(N.value)), B = d(() => O.value.filter((e) => {
29
29
  var t;
30
30
  return (t = e.children) == null ? void 0 : t.length;
31
31
  })), G = d(() => O.value.filter((e) => e.children === void 0));
32
32
  async function L() {
33
- if (!(!i.api || !w(i.api))) {
33
+ if (!(!l.api || !w(l.api))) {
34
34
  if (F.value) {
35
35
  P.value = !0;
36
36
  return;
@@ -38,56 +38,56 @@ function ge(i) {
38
38
  C.value = [];
39
39
  try {
40
40
  F.value = !0;
41
- let e = X(i.params);
42
- i.beforeFetch && w(i.beforeFetch) && (e = await i.beforeFetch(ee(e)) || e);
43
- let t = await i.api(e);
44
- i.afterFetch && w(i.afterFetch) && (t = await i.afterFetch(t) || t), S.value = !0, C.value = Array.isArray(t) ? t : a(t, i.resultField || "") || [];
41
+ let e = Z(l.params);
42
+ l.beforeFetch && w(l.beforeFetch) && (e = await l.beforeFetch(re(e)) || e);
43
+ let t = await l.api(e);
44
+ l.afterFetch && w(l.afterFetch) && (t = await l.afterFetch(t) || t), M.value = !0, C.value = Array.isArray(t) ? t : a(t, l.resultField || "") || [];
45
45
  } catch {
46
- S.value = !1;
46
+ M.value = !1;
47
47
  } finally {
48
- F.value = !1, P.value && (P.value = !1, await Y(), L());
48
+ F.value = !1, P.value && (P.value = !1, await ee(), L());
49
49
  }
50
50
  }
51
51
  }
52
52
  function K(e) {
53
- const { childrenField: t, transform: r, valueField: n, labelField: l, disabledField: o, parentField: s } = A.value, u = e.some((p) => Array.isArray(a(p, t))), h = e.some((p) => {
54
- const g = a(p, t);
53
+ const { childrenField: t, transform: r, valueField: n, labelField: i, disabledField: o, parentField: s } = A.value, u = e.some((m) => Array.isArray(a(m, t))), h = e.some((m) => {
54
+ const g = a(m, t);
55
55
  return Array.isArray(g) && g.length > 0;
56
56
  }), v = u || h ? e : r ? U(e) : e;
57
- function m(p, g = 0, b) {
58
- return p.map((c) => {
59
- const J = a(c, n), x = a(c, t), Q = Array.isArray(x), W = [l, n, o, t].filter(
57
+ function p(m, g = 0, b) {
58
+ return m.map((c) => {
59
+ const W = a(c, n), I = a(c, t), X = Array.isArray(I), Y = [i, n, o, t].filter(
60
60
  (y) => !!y
61
61
  ), f = {
62
- ...Z(c, W),
63
- label: String(a(c, l) ?? ""),
64
- value: J,
62
+ ...te(c, Y),
63
+ label: String(a(c, i) ?? ""),
64
+ value: W,
65
65
  disabled: !!a(c, o),
66
66
  pid: (b == null ? void 0 : b.value) ?? a(c, s),
67
67
  level: g,
68
68
  path: [],
69
69
  raw: c
70
70
  };
71
- if (f.path = b ? [...b.path, f] : [f], Q) {
72
- const y = x;
73
- f.children = y.length ? m(y, g + 1, f) : [];
71
+ if (f.path = b ? [...b.path, f] : [f], X) {
72
+ const y = I;
73
+ f.children = y.length ? p(y, g + 1, f) : [];
74
74
  } else
75
75
  f.children = void 0;
76
76
  return f;
77
77
  });
78
78
  }
79
- return m(v);
79
+ return p(v);
80
80
  }
81
81
  function U(e) {
82
- const t = /* @__PURE__ */ new Map(), r = [], { childrenField: n, valueField: l, parentField: o, rootParentValue: s } = A.value;
82
+ const t = /* @__PURE__ */ new Map(), r = [], { childrenField: n, valueField: i, parentField: o, rootParentValue: s } = A.value;
83
83
  return e.forEach((u) => {
84
- const h = a(u, l);
84
+ const h = a(u, i);
85
85
  t.set(h, { ...u });
86
86
  }), t.forEach((u) => {
87
87
  const h = a(u, o), v = h === s ? void 0 : t.get(h);
88
88
  if (v) {
89
- const m = a(v, n) || [];
90
- m.push(u), v[n] = m;
89
+ const p = a(v, n) || [];
90
+ p.push(u), v[n] = p;
91
91
  } else
92
92
  r.push(u);
93
93
  }), r;
@@ -101,8 +101,8 @@ function ge(i) {
101
101
  return {
102
102
  ...t,
103
103
  children: (r = t.children) != null && r.some((n) => {
104
- var l;
105
- return (l = n.children) == null ? void 0 : l.length;
104
+ var i;
105
+ return (i = n.children) == null ? void 0 : i.length;
106
106
  }) ? D(t.children) : void 0
107
107
  };
108
108
  });
@@ -125,8 +125,8 @@ function ge(i) {
125
125
  var n;
126
126
  const t = [], r = [...e];
127
127
  for (; r.length; ) {
128
- const l = r.shift();
129
- l && (t.push(l), (n = l.children) != null && n.length && r.unshift(...l.children));
128
+ const i = r.shift();
129
+ i && (t.push(i), (n = i.children) != null && n.length && r.unshift(...i.children));
130
130
  }
131
131
  return t;
132
132
  }
@@ -134,12 +134,12 @@ function ge(i) {
134
134
  const r = t.trim().toLowerCase();
135
135
  return r ? e.filter((n) => n.label.toLowerCase().includes(r)) : e;
136
136
  }
137
- function I(e, t) {
137
+ function R(e, t) {
138
138
  const r = E(e, t);
139
- return i.showOriginMode ? j(r) : i.showPinyinMode ? k(r) : V() ? R(r) : _(r);
139
+ return l.showOriginMode ? H(r) : l.showPinyinMode ? k(r) : V() ? j(r) : _(r);
140
140
  }
141
141
  function V() {
142
- const { childrenField: e, transform: t } = A.value, r = M.value.some((o) => Array.isArray(a(o, e))), n = M.value.some((o) => {
142
+ const { childrenField: e, transform: t } = A.value, r = S.value.some((o) => Array.isArray(a(o, e))), n = S.value.some((o) => {
143
143
  const s = a(o, e);
144
144
  return Array.isArray(s) && !!s.length;
145
145
  });
@@ -148,14 +148,14 @@ function ge(i) {
148
148
  function _(e) {
149
149
  const t = /* @__PURE__ */ new Map();
150
150
  return e.forEach((r) => {
151
- const n = r.path.at(-2), l = (n == null ? void 0 : n.value) ?? r.value, o = (n == null ? void 0 : n.label) ?? r.label, s = t.get(l) || { value: l, label: o, options: [] };
152
- s.options.push(r), t.set(l, s);
151
+ const n = r.path.at(-2), i = (n == null ? void 0 : n.value) ?? r.value, o = (n == null ? void 0 : n.label) ?? r.label, s = t.get(i) || { value: i, label: o, options: [] };
152
+ s.options.push(r), t.set(i, s);
153
153
  }), Array.from(t.values());
154
154
  }
155
- function R(e) {
155
+ function j(e) {
156
156
  return _(e);
157
157
  }
158
- function j(e) {
158
+ function H(e) {
159
159
  return e.length ? [
160
160
  {
161
161
  value: "__origin__",
@@ -167,28 +167,35 @@ function ge(i) {
167
167
  function k(e) {
168
168
  const t = /* @__PURE__ */ new Map();
169
169
  return e.forEach((r) => {
170
- const n = H(r.label), l = t.get(n) || { value: n, label: n.toUpperCase(), options: [] };
171
- l.options.push(r), t.set(n, l);
170
+ const n = J(r.label), i = t.get(n) || { value: n, label: n.toUpperCase(), options: [] };
171
+ i.options.push(r), t.set(n, i);
172
172
  }), Array.from(t.values()).sort((r, n) => String(r.value).localeCompare(String(n.value)));
173
173
  }
174
- function H(e) {
174
+ const z = /* @__PURE__ */ new Map();
175
+ function J(e) {
176
+ const t = z.get(e);
177
+ if (t !== void 0) return t;
178
+ const r = Q(e);
179
+ return z.set(e, r), r;
180
+ }
181
+ function Q(e) {
175
182
  const t = String(e || "").trim(), r = t.charAt(0).toLowerCase();
176
183
  if (/^[a-z]$/.test(r)) return r;
177
- const l = String(te(t, { pattern: "initial" })).replace(/\s+/g, "").charAt(0).toLowerCase();
178
- return /^[a-z]$/.test(l) ? l : "#";
184
+ const i = String(ne(t, { pattern: "initial" })).replace(/\s+/g, "").charAt(0).toLowerCase();
185
+ return /^[a-z]$/.test(i) ? i : "#";
179
186
  }
180
187
  return {
181
188
  loading: F,
182
189
  fetchApi: L,
183
190
  treeOptions: N,
184
- navTreeOptions: z,
191
+ navTreeOptions: x,
185
192
  navNodes: B,
186
193
  leafNodes: G,
187
194
  filterNodes: E,
188
- buildOptionGroups: I,
189
- isFirstLoaded: S
195
+ buildOptionGroups: R,
196
+ isFirstLoaded: M
190
197
  };
191
198
  }
192
199
  export {
193
- ge as usePanelSelectData
200
+ Fe as usePanelSelectData
194
201
  };
@@ -14,6 +14,7 @@ type UsePanelSelectSelectionParams = {
14
14
  */
15
15
  export declare function usePanelSelectSelection(params: UsePanelSelectSelectionParams): {
16
16
  selectedOptions: import('vue').ComputedRef<PanelTreeNode[]>;
17
+ selectedValueSet: import('vue').ComputedRef<Set<PanelSelectValue>>;
17
18
  isAllChecked: import('vue').ComputedRef<boolean>;
18
19
  isIndeterminate: import('vue').ComputedRef<boolean>;
19
20
  isGroupChecked: (group: OptionGroup) => boolean;
@@ -23,6 +24,8 @@ export declare function usePanelSelectSelection(params: UsePanelSelectSelectionP
23
24
  handleOptionCheck: (value: PanelSelectValue, checked: boolean) => void;
24
25
  handleOptionsCheck: (values: PanelSelectValue[], checked: boolean) => void;
25
26
  handleCheckAll: (checked: boolean) => void;
27
+ clearSelected: () => void;
26
28
  removeSelected: (value: PanelSelectValue) => void;
29
+ withLockedSelectedValues: (values: PanelSelectValue[]) => PanelSelectValue[];
27
30
  };
28
31
  export {};
@@ -1,91 +1,124 @@
1
- import { computed as s, unref as n } from "vue";
2
- function O(f) {
3
- const { multiple: u, modelValue: d, selectedValues: o, leafNodes: c, allValue: r } = f, h = s(() => {
4
- const l = new Set(n(o)), t = n(c).filter((e) => l.has(e.value));
5
- if (l.has(n(r))) {
6
- const e = n(r);
1
+ import { computed as u, unref as l } from "vue";
2
+ function L(p) {
3
+ const { multiple: s, modelValue: d, selectedValues: a, leafNodes: h, allValue: r } = p, i = u(() => new Set(l(a))), m = u(() => {
4
+ const e = l(i), n = l(h).filter((t) => e.has(t.value));
5
+ if (e.has(l(r))) {
6
+ const t = l(r);
7
7
  return [
8
8
  {
9
9
  label: "全部",
10
- value: e,
10
+ value: t,
11
11
  level: 0,
12
12
  path: [],
13
- raw: { label: "全部", value: e }
13
+ raw: { label: "全部", value: t }
14
14
  },
15
- ...t
15
+ ...n
16
16
  ];
17
17
  }
18
- return t;
19
- }), v = s(() => {
20
- const l = n(c).filter((t) => !t.disabled).map((t) => t.value);
21
- return l.length > 0 && l.every((t) => n(o).includes(t));
22
- }), p = s(() => {
23
- const l = n(c).filter((e) => !e.disabled).map((e) => e.value), t = l.filter((e) => n(o).includes(e)).length;
24
- return t > 0 && t < l.length;
18
+ return n;
19
+ }), v = u(
20
+ () => l(h).filter((e) => !e.disabled).map((e) => e.value)
21
+ );
22
+ function f(e) {
23
+ const n = l(i);
24
+ let t = 0;
25
+ return e.forEach((o) => {
26
+ n.has(o) && (t += 1);
27
+ }), t;
28
+ }
29
+ const k = u(() => {
30
+ const e = l(v);
31
+ return e.length > 0 && f(e) === e.length;
32
+ }), C = u(() => {
33
+ const e = l(v), n = f(e);
34
+ return n > 0 && n < e.length;
25
35
  });
26
- function m(l) {
27
- const t = l.options.filter((e) => !e.disabled).map((e) => e.value);
28
- return t.length > 0 && t.every((e) => n(o).includes(e));
36
+ function g(e) {
37
+ const n = e.options.filter((t) => !t.disabled).map((t) => t.value);
38
+ return n.length > 0 && f(n) === n.length;
29
39
  }
30
- function S(l) {
31
- const t = l.options.filter((a) => !a.disabled).map((a) => a.value), e = t.filter((a) => n(o).includes(a)).length;
32
- return t.length > 0 && e > 0 && e < t.length;
40
+ function w(e) {
41
+ const n = e.options.filter((o) => !o.disabled).map((o) => o.value), t = f(n);
42
+ return n.length > 0 && t > 0 && t < n.length;
33
43
  }
34
- function g(l, t) {
35
- const e = l.options.filter((i) => !i.disabled).map((i) => i.value);
36
- if (!e.length) return;
37
- if (!n(u)) {
38
- d.value = t ? e[0] : void 0;
44
+ function A(e, n) {
45
+ const t = e.options.filter((c) => !c.disabled).map((c) => c.value);
46
+ if (!t.length) return;
47
+ if (!l(s)) {
48
+ d.value = n ? t[0] : void 0;
49
+ return;
50
+ }
51
+ const o = new Set(l(a));
52
+ o.delete(l(r)), t.forEach((c) => n ? o.add(c) : o.delete(c)), a.value = Array.from(o);
53
+ }
54
+ function V(e) {
55
+ if (!l(s)) {
56
+ d.value = e ? l(r) : void 0;
39
57
  return;
40
58
  }
41
- const a = new Set(n(o));
42
- a.delete(n(r)), e.forEach((i) => t ? a.add(i) : a.delete(i)), o.value = Array.from(a);
59
+ a.value = e ? [l(r)] : [];
43
60
  }
44
- function k(l) {
45
- if (!n(u)) {
46
- d.value = l ? n(r) : void 0;
61
+ function b(e, n) {
62
+ if (!l(s)) {
63
+ d.value = n ? e : void 0;
47
64
  return;
48
65
  }
49
- o.value = l ? [n(r)] : [];
66
+ const t = new Set(l(a));
67
+ t.delete(l(r)), n ? t.add(e) : t.delete(e), a.value = Array.from(t);
50
68
  }
51
- function C(l, t) {
52
- if (!n(u)) {
53
- d.value = t ? l : void 0;
69
+ function y(e, n) {
70
+ if (!e.length) return;
71
+ if (!l(s)) {
72
+ d.value = n ? e.at(-1) : void 0;
54
73
  return;
55
74
  }
56
- const e = new Set(n(o));
57
- e.delete(n(r)), t ? e.add(l) : e.delete(l), o.value = Array.from(e);
75
+ const t = new Set(l(a));
76
+ t.delete(l(r)), e.forEach((o) => n ? t.add(o) : t.delete(o)), a.value = Array.from(t);
58
77
  }
59
- function b(l, t) {
60
- if (!l.length) return;
61
- if (!n(u)) {
62
- d.value = t ? l.at(-1) : void 0;
78
+ function E(e) {
79
+ const n = l(v), t = new Set(l(a));
80
+ t.delete(l(r)), n.forEach((o) => e ? t.add(o) : t.delete(o)), a.value = Array.from(t);
81
+ }
82
+ const S = u(() => {
83
+ const e = l(i), n = /* @__PURE__ */ new Set();
84
+ return l(h).forEach((t) => {
85
+ t.disabled && e.has(t.value) && n.add(t.value);
86
+ }), n;
87
+ });
88
+ function O() {
89
+ const e = Array.from(l(S));
90
+ if (!l(s)) {
91
+ d.value = e.length ? e[0] : void 0;
63
92
  return;
64
93
  }
65
- const e = new Set(n(o));
66
- e.delete(n(r)), l.forEach((a) => t ? e.add(a) : e.delete(a)), o.value = Array.from(e);
94
+ a.value = e;
67
95
  }
68
- function A(l) {
69
- const t = n(c).filter((a) => !a.disabled).map((a) => a.value), e = new Set(n(o));
70
- e.delete(n(r)), t.forEach((a) => l ? e.add(a) : e.delete(a)), o.value = Array.from(e);
96
+ function G(e) {
97
+ l(S).has(e) || (a.value = l(a).filter((n) => n !== e));
71
98
  }
72
- function w(l) {
73
- o.value = n(o).filter((t) => t !== l);
99
+ function x(e) {
100
+ const n = l(S);
101
+ if (!n.size) return e;
102
+ const t = new Set(e);
103
+ return n.forEach((o) => t.add(o)), Array.from(t);
74
104
  }
75
105
  return {
76
- selectedOptions: h,
77
- isAllChecked: v,
78
- isIndeterminate: p,
79
- isGroupChecked: m,
80
- isGroupIndeterminate: S,
81
- handleGroupCheck: g,
82
- handleAllOptionCheck: k,
83
- handleOptionCheck: C,
84
- handleOptionsCheck: b,
85
- handleCheckAll: A,
86
- removeSelected: w
106
+ selectedOptions: m,
107
+ selectedValueSet: i,
108
+ isAllChecked: k,
109
+ isIndeterminate: C,
110
+ isGroupChecked: g,
111
+ isGroupIndeterminate: w,
112
+ handleGroupCheck: A,
113
+ handleAllOptionCheck: V,
114
+ handleOptionCheck: b,
115
+ handleOptionsCheck: y,
116
+ handleCheckAll: E,
117
+ clearSelected: O,
118
+ removeSelected: G,
119
+ withLockedSelectedValues: x
87
120
  };
88
121
  }
89
122
  export {
90
- O as usePanelSelectSelection
123
+ L as usePanelSelectSelection
91
124
  };