@gears-frontx/ui-kit 0.4.7 → 0.4.10

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.
Files changed (28) hide show
  1. package/dist/chunks/data-grid-portal-container-context.js +10 -0
  2. package/dist/chunks/data-grid-portal-container-context.js.map +1 -0
  3. package/dist/chunks/{filters.DcFdZpNG.css → filters.DQtlBXh7.css} +1 -1
  4. package/dist/components/data-grid/components/filter-chip.d.ts +3 -2
  5. package/dist/components/data-grid/components/filter-chip.d.ts.map +1 -1
  6. package/dist/components/data-grid/data-grid-types.d.ts +10 -0
  7. package/dist/components/data-grid/data-grid-types.d.ts.map +1 -1
  8. package/dist/components/data-grid/data-grid.d.ts +1 -1
  9. package/dist/components/data-grid/data-grid.d.ts.map +1 -1
  10. package/dist/components/data-grid/plugins/actions-menu/components/data-grid-actions-menu.d.ts.map +1 -1
  11. package/dist/components/data-grid/plugins/filters/components/adaptive-popover.d.ts.map +1 -1
  12. package/dist/components/data-grid/plugins/filters/components/all-filters-button.d.ts.map +1 -1
  13. package/dist/components/data-grid/plugins/order/components/data-grid-order-button.d.ts.map +1 -1
  14. package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-trigger.d.ts.map +1 -1
  15. package/dist/components/data-grid/services/core/data-grid-portal-container-context.d.ts +9 -0
  16. package/dist/components/data-grid/services/core/data-grid-portal-container-context.d.ts.map +1 -0
  17. package/dist/data-grid/actions-menu.js +99 -98
  18. package/dist/data-grid/actions-menu.js.map +1 -1
  19. package/dist/data-grid/filters.js +369 -366
  20. package/dist/data-grid/filters.js.map +1 -1
  21. package/dist/data-grid/order.js +111 -110
  22. package/dist/data-grid/order.js.map +1 -1
  23. package/dist/data-grid/table-configuration.js +49 -37
  24. package/dist/data-grid/table-configuration.js.map +1 -1
  25. package/dist/data-grid.js +462 -460
  26. package/dist/data-grid.js.map +1 -1
  27. package/dist/docs/data-grid.md +29 -4
  28. package/package.json +1 -1
@@ -1,36 +1,37 @@
1
1
  "use client";
2
2
  import { create as z } from "zustand";
3
- import { u as k, c as rt, b as ot } from "../chunks/plugins-helpers.js";
3
+ import { u as k, c as ot, b as st } from "../chunks/plugins-helpers.js";
4
4
  import { jsx as s, jsxs as w, Fragment as P } from "react/jsx-runtime";
5
- import { FunnelIcon as st, RotateCwIcon as it, XIcon as lt, SearchIcon as ct, ChevronRightIcon as at } from "lucide-react";
6
- import { useSyncExternalStore as ut, useState as T, useEffect as $, useMemo as Te, useRef as Pe, useId as dt, createContext as ft, useContext as pt, createElement as Ce, memo as ht } from "react";
5
+ import { FunnelIcon as it, RotateCwIcon as lt, XIcon as ct, SearchIcon as at, ChevronRightIcon as ut } from "lucide-react";
6
+ import { useSyncExternalStore as dt, useState as T, useEffect as $, useMemo as Te, useRef as Pe, useId as ft, createContext as pt, useContext as ht, createElement as Ce, memo as mt } from "react";
7
7
  import { cx as W } from "class-variance-authority";
8
8
  import { m as O } from "../chunks/messages.js";
9
- import { SheetHeader as mt, SheetTitle as gt, SheetFooter as St, Sheet as vt, SheetContent as Ct } from "../sheet.js";
10
- import { Accordion as yt, AccordionItem as It, AccordionTrigger as bt, AccordionContent as _t } from "../accordion.js";
9
+ import { u as Ke } from "../chunks/data-grid-portal-container-context.js";
10
+ import { SheetHeader as gt, SheetTitle as St, SheetFooter as vt, Sheet as Ct, SheetContent as yt } from "../sheet.js";
11
+ import { Accordion as It, AccordionItem as bt, AccordionTrigger as _t, AccordionContent as Nt } from "../accordion.js";
11
12
  import { Button as ue } from "../button.js";
12
13
  import { Badge as de } from "../badge.js";
13
- import { d as Ke } from "../chunks/debounce.js";
14
- import { Popover as Nt, PopoverTrigger as wt, PopoverContent as At } from "../popover.js";
15
- import { Drawer as xt, DrawerTrigger as Ft, DrawerContent as Dt } from "../drawer.js";
16
- import { a as Lt } from "../chunks/table-types.js";
17
- import { Input as Me } from "../input.js";
18
- import { Spinner as kt } from "../spinner.js";
19
- import { Label as Oe } from "../label.js";
20
- import { Checkbox as Tt } from "../checkbox.js";
21
- import { u as Pt } from "../chunks/use-latest.js";
22
- import { DropdownMenu as Kt, DropdownMenuItem as ze } from "../dropdown-menu.js";
23
- import { c as Mt } from "../chunks/hooked.js";
14
+ import { d as Me } from "../chunks/debounce.js";
15
+ import { Popover as wt, PopoverTrigger as At, PopoverContent as xt } from "../popover.js";
16
+ import { Drawer as Ft, DrawerTrigger as Dt, DrawerContent as Lt } from "../drawer.js";
17
+ import { a as kt } from "../chunks/table-types.js";
18
+ import { Input as Oe } from "../input.js";
19
+ import { Spinner as Tt } from "../spinner.js";
20
+ import { Label as ze } from "../label.js";
21
+ import { Checkbox as Pt } from "../checkbox.js";
22
+ import { u as Kt } from "../chunks/use-latest.js";
23
+ import { DropdownMenu as Mt, DropdownMenuItem as $e } from "../dropdown-menu.js";
24
+ import { c as Ot } from "../chunks/hooked.js";
24
25
  import { useShallow as U } from "zustand/react/shallow";
25
- import { RadioGroup as Ot, RadioGroupItem as zt } from "../radio-group.js";
26
- import { parse as $t, isValid as Rt, format as Gt, set as Vt, isBefore as Ht, startOfDay as ye } from "date-fns";
27
- import { Calendar as Bt } from "../calendar.js";
28
- import '../chunks/filters.DcFdZpNG.css';const jt = "_chip_1pstc_6", qt = "_hover_1pstc_43", Ut = "_active_1pstc_49", se = {
29
- chip: jt,
30
- hover: qt,
31
- active: Ut
26
+ import { RadioGroup as zt, RadioGroupItem as $t } from "../radio-group.js";
27
+ import { parse as Rt, isValid as Gt, format as Vt, set as Ht, isBefore as Bt, startOfDay as ye } from "date-fns";
28
+ import { Calendar as jt } from "../calendar.js";
29
+ import '../chunks/filters.DQtlBXh7.css';const qt = "_chip_1jhih_7", Ut = "_hover_1jhih_44", Wt = "_active_1jhih_50", se = {
30
+ chip: qt,
31
+ hover: Ut,
32
+ active: Wt
32
33
  };
33
- function $e({ active: e, hover: t, className: n }) {
34
+ function Re({ active: e, hover: t, className: n }) {
34
35
  return W(se.chip, e && se.active, t && se.hover, n);
35
36
  }
36
37
  function fe({
@@ -40,91 +41,92 @@ function fe({
40
41
  type: r = "button",
41
42
  ...o
42
43
  }) {
43
- return /* @__PURE__ */ s("button", { type: r, className: $e({ active: e, hover: t, className: n }), ...o });
44
+ return /* @__PURE__ */ s("button", { type: r, className: Re({ active: e, hover: t, className: n }), ...o });
44
45
  }
45
- function Wt({ active: e, hover: t, className: n, ...r }) {
46
- return /* @__PURE__ */ s("label", { className: $e({ active: e, hover: t, className: n }), ...r });
46
+ function Xt({ active: e, hover: t, className: n, ...r }) {
47
+ return /* @__PURE__ */ s("label", { className: Re({ active: e, hover: t, className: n }), ...r });
47
48
  }
48
- const Xt = 720;
49
- function Qt(e) {
49
+ const Qt = 720;
50
+ function Et(e) {
50
51
  return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
51
52
  }
52
- function Et() {
53
- return window.innerWidth >= Xt;
54
- }
55
53
  function Jt() {
54
+ return window.innerWidth >= Qt;
55
+ }
56
+ function Yt() {
56
57
  return !1;
57
58
  }
58
- function Re() {
59
- return ut(Qt, Et, Jt);
59
+ function Ge() {
60
+ return dt(Et, Jt, Yt);
60
61
  }
61
- const Yt = "_panel_11w9a_6", Zt = {
62
- panel: Yt
62
+ const Zt = "_panel_11w9a_6", en = {
63
+ panel: Zt
63
64
  };
64
- function en({ onApply: e }) {
65
+ function tn({ onApply: e }) {
65
66
  const r = k().getPlugin("filters").useFilterEntities();
66
67
  return /* @__PURE__ */ w(P, { children: [
67
- /* @__PURE__ */ s(mt, { children: /* @__PURE__ */ s(gt, { children: O.filters.allFiltersTitle }) }),
68
- /* @__PURE__ */ s(yt, { multiple: !0, children: r.map((o) => {
68
+ /* @__PURE__ */ s(gt, { children: /* @__PURE__ */ s(St, { children: O.filters.allFiltersTitle }) }),
69
+ /* @__PURE__ */ s(It, { multiple: !0, children: r.map((o) => {
69
70
  if (!o.dialogFilterComponent) return null;
70
71
  const i = o.dialogFilterComponent;
71
72
  return /* @__PURE__ */ s(i, { filterEntity: o }, o.id);
72
73
  }) }),
73
- /* @__PURE__ */ s(St, { children: /* @__PURE__ */ s(ue, { onClick: e, children: O.filters.apply }) })
74
+ /* @__PURE__ */ s(vt, { children: /* @__PURE__ */ s(ue, { onClick: e, children: O.filters.apply }) })
74
75
  ] });
75
76
  }
76
77
  function Ie() {
77
- const t = k().getPlugin("filters"), [n, r] = T(!1), o = Re(), a = t.useFilterEntities().filter((A) => A.dialogFilterComponent).map((A) => A.filterKey), f = t.useActiveCount(a);
78
- function h() {
78
+ const t = k().getPlugin("filters"), [n, r] = T(!1), o = Ge(), i = Ke(), f = t.useFilterEntities().filter((y) => y.dialogFilterComponent).map((y) => y.filterKey), h = t.useActiveCount(f);
79
+ function g() {
79
80
  t.resetDraftState(), r(!0);
80
81
  }
81
- function g() {
82
+ function b() {
82
83
  r(!1), t.resetDraftState();
83
84
  }
84
- function b() {
85
+ function x() {
85
86
  t.applyDraftState(), r(!1);
86
87
  }
87
88
  return /* @__PURE__ */ w(P, { children: [
88
- /* @__PURE__ */ w(fe, { hover: n, onClick: h, children: [
89
- /* @__PURE__ */ s(st, {}),
89
+ /* @__PURE__ */ w(fe, { hover: n, onClick: g, children: [
90
+ /* @__PURE__ */ s(it, {}),
90
91
  O.filters.allFilters,
91
- f > 0 && /* @__PURE__ */ s(de, { size: "xs", children: f })
92
+ h > 0 && /* @__PURE__ */ s(de, { size: "xs", children: h })
92
93
  ] }),
93
- /* @__PURE__ */ s(vt, { open: n, onOpenChange: (A) => !A && g(), children: /* @__PURE__ */ s(
94
- Ct,
94
+ /* @__PURE__ */ s(Ct, { open: n, onOpenChange: (y) => !y && b(), children: /* @__PURE__ */ s(
95
+ yt,
95
96
  {
97
+ container: i,
96
98
  side: o ? "right" : "bottom",
97
99
  closeLabel: O.filters.closeDialog,
98
- className: Zt.panel,
99
- children: /* @__PURE__ */ s(en, { onApply: b })
100
+ className: en.panel,
101
+ children: /* @__PURE__ */ s(tn, { onApply: x })
100
102
  }
101
103
  ) })
102
104
  ] });
103
105
  }
104
- const tn = "_filterOptions_1pdo1_1", nn = "_tail_1pdo1_16", rn = "_chip_1pdo1_25", ie = {
105
- filterOptions: tn,
106
- tail: nn,
107
- chip: rn
106
+ const nn = "_filterOptions_1pdo1_1", rn = "_tail_1pdo1_16", on = "_chip_1pdo1_25", ie = {
107
+ filterOptions: nn,
108
+ tail: rn,
109
+ chip: on
108
110
  };
109
- function on({ filterEntity: e }) {
111
+ function sn({ filterEntity: e }) {
110
112
  if (!e.filterComponent) return null;
111
113
  const t = e.filterComponent;
112
114
  return /* @__PURE__ */ s(t, { filterEntity: e });
113
115
  }
114
- function sn() {
116
+ function ln() {
115
117
  const t = k().getPlugin("filters"), n = t.useFilterEntities(), r = t.useIsAllFiltersOptionVisible(), o = n.some((a) => a.dialogFilterComponent), i = n.filter((a) => a.filterComponent), l = r && o;
116
118
  return /* @__PURE__ */ w("div", { className: ie.filterOptions, children: [
117
119
  i.map((a, f) => {
118
120
  const h = f === i.length - 1;
119
121
  return /* @__PURE__ */ w("div", { className: h ? ie.tail : ie.chip, children: [
120
- /* @__PURE__ */ s(on, { filterEntity: a }),
122
+ /* @__PURE__ */ s(sn, { filterEntity: a }),
121
123
  h && l && /* @__PURE__ */ s(Ie, {})
122
124
  ] }, a.id);
123
125
  }),
124
126
  i.length === 0 && l && /* @__PURE__ */ s(Ie, {})
125
127
  ] });
126
128
  }
127
- const So = rt("filters", (e) => {
129
+ const Co = ot("filters", (e) => {
128
130
  const t = z(() => ({
129
131
  entities: [],
130
132
  isAllFiltersOptionVisible: !0
@@ -138,7 +140,7 @@ const So = rt("filters", (e) => {
138
140
  })), o = z(() => ({ filters: {} }));
139
141
  return p(r, o), e.registerSlot("top-start", {
140
142
  id: "filters",
141
- component: sn
143
+ component: ln
142
144
  }), e.hook("load:context", () => {
143
145
  const u = m();
144
146
  if (Object.keys(u).length !== 0)
@@ -156,8 +158,8 @@ const So = rt("filters", (e) => {
156
158
  setState: h,
157
159
  removeState: g,
158
160
  useDraftState: b,
159
- setDraftState: A,
160
- applyDraftState: I,
161
+ setDraftState: x,
162
+ applyDraftState: y,
161
163
  resetDraftState: F,
162
164
  isFilterValueActive: v,
163
165
  onPropsChange: S
@@ -185,10 +187,10 @@ const So = rt("filters", (e) => {
185
187
  function b(u) {
186
188
  return o((N) => N.filters[u]);
187
189
  }
188
- function A(u, N) {
190
+ function x(u, N) {
189
191
  C(o, u, N);
190
192
  }
191
- function I() {
193
+ function y() {
192
194
  const u = o.getState().filters;
193
195
  r.setState({ filters: { ...u } }), e.refresh({ resetFilters: !1 });
194
196
  }
@@ -199,8 +201,8 @@ const So = rt("filters", (e) => {
199
201
  const { filters: u } = r.getState(), { entities: N } = t.getState(), D = {};
200
202
  for (const [L, M] of Object.entries(u))
201
203
  if (v(M == null ? void 0 : M.value)) {
202
- const x = N.find((V) => V.filterKey === L);
203
- D[L] = x != null && x.resolveLoadValue ? x.resolveLoadValue(M) : M;
204
+ const A = N.find((V) => V.filterKey === L);
205
+ D[L] = A != null && A.resolveLoadValue ? A.resolveLoadValue(M) : M;
204
206
  }
205
207
  return D;
206
208
  }
@@ -220,18 +222,18 @@ const So = rt("filters", (e) => {
220
222
  u.entities !== void 0 && (N.entities = u.entities), u.isAllFiltersOptionVisible !== void 0 && (N.isAllFiltersOptionVisible = u.isAllFiltersOptionVisible), Object.keys(N).length > 0 && t.setState(N);
221
223
  }
222
224
  });
223
- const ln = "_content_8lncy_1", cn = {
224
- content: ln
225
+ const cn = "_content_8lncy_1", an = {
226
+ content: cn
225
227
  };
226
- function an({ children: e, maxInlineSize: t }) {
228
+ function un({ children: e, maxInlineSize: t }) {
227
229
  const n = t ? { maxInlineSize: t } : void 0;
228
- return /* @__PURE__ */ s("div", { className: cn.content, style: n, children: e });
230
+ return /* @__PURE__ */ s("div", { className: an.content, style: n, children: e });
229
231
  }
230
- const un = "_divider_18abl_1", dn = "_resetButton_18abl_9", be = {
231
- divider: un,
232
- resetButton: dn
232
+ const dn = "_divider_18abl_1", fn = "_resetButton_18abl_9", be = {
233
+ divider: dn,
234
+ resetButton: fn
233
235
  };
234
- function fn({ disabled: e, onClick: t }) {
236
+ function pn({ disabled: e, onClick: t }) {
235
237
  return /* @__PURE__ */ w(P, { children: [
236
238
  /* @__PURE__ */ s("hr", { className: be.divider }),
237
239
  /* @__PURE__ */ s("div", { className: be.resetButton, children: /* @__PURE__ */ s(
@@ -241,82 +243,83 @@ function fn({ disabled: e, onClick: t }) {
241
243
  size: "sm",
242
244
  disabled: e,
243
245
  onClick: t,
244
- icon: /* @__PURE__ */ s(it, {}),
246
+ icon: /* @__PURE__ */ s(lt, {}),
245
247
  children: O.filters.reset
246
248
  }
247
249
  ) })
248
250
  ] });
249
251
  }
250
- const pn = "_popover_bymr3_8", hn = {
251
- popover: pn
252
+ const hn = "_popover_bymr3_8", mn = {
253
+ popover: hn
252
254
  };
253
- function mn({
255
+ function gn({
254
256
  open: e,
255
257
  onOpenChange: t,
256
258
  trigger: n,
257
259
  minInlineSize: r,
258
260
  children: o
259
261
  }) {
260
- return Re() ? /* @__PURE__ */ w(Nt, { open: e, onOpenChange: t, children: [
261
- /* @__PURE__ */ s(wt, { render: n }),
262
- /* @__PURE__ */ s(At, { className: hn.popover, children: r != null ? /* @__PURE__ */ s("div", { style: { minInlineSize: r }, children: o }) : o })
263
- ] }) : /* @__PURE__ */ w(xt, { open: e, onOpenChange: t, side: "bottom", children: [
264
- /* @__PURE__ */ s(Ft, { render: n }),
265
- /* @__PURE__ */ s(Dt, { children: o })
262
+ const i = Ge(), l = Ke();
263
+ return i ? /* @__PURE__ */ w(wt, { open: e, onOpenChange: t, children: [
264
+ /* @__PURE__ */ s(At, { render: n }),
265
+ /* @__PURE__ */ s(xt, { className: mn.popover, container: l, children: r != null ? /* @__PURE__ */ s("div", { style: { minInlineSize: r }, children: o }) : o })
266
+ ] }) : /* @__PURE__ */ w(Ft, { open: e, onOpenChange: t, side: "bottom", children: [
267
+ /* @__PURE__ */ s(Dt, { render: n }),
268
+ /* @__PURE__ */ s(Lt, { container: l, children: o })
266
269
  ] });
267
270
  }
268
271
  function pe({ filterEntity: e }) {
269
- const n = ot().table.useConfigurationColumns();
272
+ const n = st().table.useConfigurationColumns();
270
273
  if (e.label != null)
271
274
  return /* @__PURE__ */ s(P, { children: e.label });
272
- const o = gn(n).find((i) => i.id === e.id);
275
+ const o = Sn(n).find((i) => i.id === e.id);
273
276
  if (o == null)
274
277
  throw new Error(
275
278
  `Label for "${e.id}" is not defined. "id" should match a column id or filter entity should have a label.`
276
279
  );
277
280
  return /* @__PURE__ */ s(P, { children: o.label });
278
281
  }
279
- function gn(e) {
282
+ function Sn(e) {
280
283
  const t = [];
281
284
  for (const n of e)
282
- Lt(n) ? t.push(...n.columns) : t.push(n);
285
+ kt(n) ? t.push(...n.columns) : t.push(n);
283
286
  return t;
284
287
  }
285
- const Sn = "_dot_1cz9l_2", vn = {
286
- dot: Sn
287
- }, Cn = 140;
288
+ const vn = "_dot_1cz9l_2", Cn = {
289
+ dot: vn
290
+ }, yn = 140;
288
291
  function X({ filterEntity: e, children: t }) {
289
292
  var m;
290
- const r = k().getPlugin("filters"), [o, i] = T(!1), l = r.useState(e.filterKey), a = l == null ? void 0 : l.value, f = !r.isFilterValueActive(a), h = Array.isArray(a) && a.length > 0 ? a.length : void 0, g = (m = e.params) == null ? void 0 : m.popover, b = `${(g == null ? void 0 : g.minInlineSize) ?? Cn}px`, A = (g == null ? void 0 : g.maxInlineSize) != null ? `${g.maxInlineSize}px` : void 0;
291
- function I() {
293
+ const r = k().getPlugin("filters"), [o, i] = T(!1), l = r.useState(e.filterKey), a = l == null ? void 0 : l.value, f = !r.isFilterValueActive(a), h = Array.isArray(a) && a.length > 0 ? a.length : void 0, g = (m = e.params) == null ? void 0 : m.popover, b = `${(g == null ? void 0 : g.minInlineSize) ?? yn}px`, x = (g == null ? void 0 : g.maxInlineSize) != null ? `${g.maxInlineSize}px` : void 0;
294
+ function y() {
292
295
  r.removeState(e.filterKey);
293
296
  }
294
297
  const F = /* @__PURE__ */ w(fe, { hover: o, active: !f, children: [
295
298
  /* @__PURE__ */ s(pe, { filterEntity: e }),
296
- !f && (h != null ? /* @__PURE__ */ s(de, { size: "xs", children: h }) : /* @__PURE__ */ s("span", { className: vn.dot }))
299
+ !f && (h != null ? /* @__PURE__ */ s(de, { size: "xs", children: h }) : /* @__PURE__ */ s("span", { className: Cn.dot }))
297
300
  ] });
298
301
  return /* @__PURE__ */ s(
299
- mn,
302
+ gn,
300
303
  {
301
304
  open: o,
302
305
  onOpenChange: i,
303
306
  minInlineSize: b,
304
307
  trigger: F,
305
- children: /* @__PURE__ */ w(an, { maxInlineSize: A, children: [
308
+ children: /* @__PURE__ */ w(un, { maxInlineSize: x, children: [
306
309
  t,
307
- /* @__PURE__ */ s(fn, { disabled: f, onClick: I })
310
+ /* @__PURE__ */ s(pn, { disabled: f, onClick: y })
308
311
  ] })
309
312
  }
310
313
  );
311
314
  }
312
- function yn({ filterEntity: e }) {
315
+ function In({ filterEntity: e }) {
313
316
  var f;
314
317
  const n = k().getPlugin("filters"), r = ((f = n.useState(e.filterKey)) == null ? void 0 : f.value) ?? "", [o, i] = T(r);
315
318
  $(() => {
316
319
  i(r);
317
320
  }, [r]);
318
321
  const l = Te(
319
- () => Ke((h) => {
322
+ () => Me((h) => {
320
323
  h ? n.setState(e.filterKey, { value: h }) : n.removeState(e.filterKey);
321
324
  }, 1e3),
322
325
  [e.filterKey, n]
@@ -325,45 +328,45 @@ function yn({ filterEntity: e }) {
325
328
  function a(h) {
326
329
  i(h), l(h);
327
330
  }
328
- return /* @__PURE__ */ s(X, { filterEntity: e, children: /* @__PURE__ */ s(Me, { value: o, onValueChange: a }) });
331
+ return /* @__PURE__ */ s(X, { filterEntity: e, children: /* @__PURE__ */ s(Oe, { value: o, onValueChange: a }) });
329
332
  }
330
- function vo(e) {
333
+ function yo(e) {
331
334
  return {
332
335
  id: e.id,
333
336
  filterKey: e.filterKey ?? e.id,
334
337
  label: e.label,
335
- filterComponent: yn
338
+ filterComponent: In
336
339
  };
337
340
  }
338
- function In({ filterEntity: e }) {
341
+ function bn({ filterEntity: e }) {
339
342
  const n = k().getPlugin("filters"), r = n.useState(e.filterKey), o = (r == null ? void 0 : r.value) === !0;
340
343
  function i() {
341
344
  o ? n.removeState(e.filterKey) : n.setState(e.filterKey, { value: !0 });
342
345
  }
343
346
  return /* @__PURE__ */ s(fe, { active: o, onClick: i, children: /* @__PURE__ */ s(pe, { filterEntity: e }) });
344
347
  }
345
- function Co(e) {
348
+ function Io(e) {
346
349
  return {
347
350
  id: e.id,
348
351
  filterKey: e.filterKey ?? e.id,
349
352
  label: e.label,
350
- filterComponent: In
353
+ filterComponent: bn
351
354
  };
352
355
  }
353
- const bn = "_header_1kn5i_1", _n = "_actions_1kn5i_10", Nn = "_titleWithActions_1kn5i_18", wn = "_tagClose_1kn5i_23", E = {
354
- header: bn,
355
- actions: _n,
356
- titleWithActions: Nn,
357
- tagClose: wn
356
+ const _n = "_header_1kn5i_1", Nn = "_actions_1kn5i_10", wn = "_titleWithActions_1kn5i_18", An = "_tagClose_1kn5i_23", E = {
357
+ header: _n,
358
+ actions: Nn,
359
+ titleWithActions: wn,
360
+ tagClose: An
358
361
  };
359
362
  function ee({ filterEntity: e, children: t }) {
360
- const r = k().getPlugin("filters"), o = r.useDraftState(e.filterKey), i = An(o == null ? void 0 : o.value, r.isFilterValueActive);
363
+ const r = k().getPlugin("filters"), o = r.useDraftState(e.filterKey), i = xn(o == null ? void 0 : o.value, r.isFilterValueActive);
361
364
  function l() {
362
365
  r.setDraftState(e.filterKey, { value: void 0 });
363
366
  }
364
- return /* @__PURE__ */ w(It, { children: [
367
+ return /* @__PURE__ */ w(bt, { children: [
365
368
  /* @__PURE__ */ w("div", { className: E.header, children: [
366
- /* @__PURE__ */ s(bt, { children: /* @__PURE__ */ s("span", { className: W(i > 0 && E.titleWithActions), children: /* @__PURE__ */ s(pe, { filterEntity: e }) }) }),
369
+ /* @__PURE__ */ s(_t, { children: /* @__PURE__ */ s("span", { className: W(i > 0 && E.titleWithActions), children: /* @__PURE__ */ s(pe, { filterEntity: e }) }) }),
367
370
  i > 0 && /* @__PURE__ */ s("span", { className: E.actions, children: /* @__PURE__ */ w(de, { children: [
368
371
  i,
369
372
  /* @__PURE__ */ s(
@@ -373,29 +376,29 @@ function ee({ filterEntity: e, children: t }) {
373
376
  className: E.tagClose,
374
377
  "aria-label": O.filters.close,
375
378
  onClick: l,
376
- children: /* @__PURE__ */ s(lt, {})
379
+ children: /* @__PURE__ */ s(ct, {})
377
380
  }
378
381
  )
379
382
  ] }) })
380
383
  ] }),
381
- /* @__PURE__ */ s(_t, { children: t })
384
+ /* @__PURE__ */ s(Nt, { children: t })
382
385
  ] });
383
386
  }
384
- function An(e, t) {
387
+ function xn(e, t) {
385
388
  return Array.isArray(e) ? e.length : t(e) ? 1 : 0;
386
389
  }
387
390
  function te(e) {
388
391
  return Array.isArray(e) ? e : [];
389
392
  }
390
- const xn = "_sizeXl_1h36k_8", _e = {
393
+ const Fn = "_sizeXl_1h36k_8", _e = {
391
394
  default: "_default_1h36k_1",
392
- sizeXl: xn
393
- }, Fn = {
395
+ sizeXl: Fn
396
+ }, Dn = {
394
397
  m: _e.default,
395
398
  xl: _e.sizeXl
396
399
  };
397
400
  function ne({ children: e, size: t = "m" }) {
398
- return /* @__PURE__ */ s("div", { className: Fn[t], children: e });
401
+ return /* @__PURE__ */ s("div", { className: Dn[t], children: e });
399
402
  }
400
403
  function re({
401
404
  value: e,
@@ -405,25 +408,25 @@ function re({
405
408
  disabled: o
406
409
  }) {
407
410
  return /* @__PURE__ */ s(
408
- Me,
411
+ Oe,
409
412
  {
410
413
  value: e,
411
414
  placeholder: n ?? O.filters.searchPlaceholder,
412
- icon: /* @__PURE__ */ s(ct, {}),
415
+ icon: /* @__PURE__ */ s(at, {}),
413
416
  onValueChange: t,
414
417
  autoFocus: r,
415
418
  disabled: o
416
419
  }
417
420
  );
418
421
  }
419
- const Dn = "_wrapper_1gwyh_1", Ln = {
420
- wrapper: Dn
422
+ const Ln = "_wrapper_1gwyh_1", kn = {
423
+ wrapper: Ln
421
424
  };
422
425
  function oe({ children: e, role: t }) {
423
- return /* @__PURE__ */ s("div", { className: Ln.wrapper, role: t, children: e });
426
+ return /* @__PURE__ */ s("div", { className: kn.wrapper, role: t, children: e });
424
427
  }
425
- const kn = 300;
426
- function Tn(e, t = kn) {
428
+ const Tn = 300;
429
+ function Pn(e, t = Tn) {
427
430
  const [n, r] = T(""), [o, i] = T([]), [l, a] = T(!0), f = Pe(0);
428
431
  return $(() => {
429
432
  const h = f.current + 1;
@@ -440,18 +443,18 @@ function Tn(e, t = kn) {
440
443
  return () => clearTimeout(g);
441
444
  }, [n, e, t]), { searchTerm: n, setSearchTerm: r, options: o, isLoading: l };
442
445
  }
443
- function Pn(e) {
446
+ function Kn(e) {
444
447
  return typeof e == "string" ? e : typeof e == "number" ? String(e) : "";
445
448
  }
446
- function Kn(e, t) {
449
+ function Mn(e, t) {
447
450
  return typeof t == "function" ? t(e) : String(e[t] || "");
448
451
  }
449
- function Ge(e, t) {
452
+ function Ve(e, t) {
450
453
  const [n, r] = T("");
451
454
  let o = e;
452
455
  if (t && n.trim()) {
453
456
  const i = n.toLowerCase();
454
- o = e.filter((l) => Pn(l.label).toLowerCase().includes(i));
457
+ o = e.filter((l) => Kn(l.label).toLowerCase().includes(i));
455
458
  }
456
459
  return {
457
460
  searchTerm: n,
@@ -459,70 +462,70 @@ function Ge(e, t) {
459
462
  filteredOptions: o
460
463
  };
461
464
  }
462
- const Mn = "_list_1thlr_1", On = "_listItem_1thlr_13", zn = "_status_1thlr_18", Z = {
463
- list: Mn,
464
- listItem: On,
465
- status: zn
465
+ const On = "_list_1thlr_1", zn = "_listItem_1thlr_13", $n = "_status_1thlr_18", Z = {
466
+ list: On,
467
+ listItem: zn,
468
+ status: $n
466
469
  };
467
- function $n(e, t, n) {
470
+ function Rn(e, t, n) {
468
471
  return n ? [...e, t] : e.filter((r) => r !== t);
469
472
  }
470
- function Ve({
473
+ function He({
471
474
  options: e,
472
475
  value: t,
473
476
  onChange: n
474
477
  }) {
475
- return /* @__PURE__ */ s("ul", { className: Z.list, children: e.map((r) => /* @__PURE__ */ s("li", { className: Z.listItem, children: /* @__PURE__ */ w(Oe, { children: [
478
+ return /* @__PURE__ */ s("ul", { className: Z.list, children: e.map((r) => /* @__PURE__ */ s("li", { className: Z.listItem, children: /* @__PURE__ */ w(ze, { children: [
476
479
  /* @__PURE__ */ s(
477
- Tt,
480
+ Pt,
478
481
  {
479
482
  checked: t.includes(r.value),
480
- onCheckedChange: (o) => n($n(t, r.value, o))
483
+ onCheckedChange: (o) => n(Rn(t, r.value, o))
481
484
  }
482
485
  ),
483
486
  r.component ? /* @__PURE__ */ s(r.component, { option: r }) : /* @__PURE__ */ s(P, { children: r.label })
484
487
  ] }) }, r.value)) });
485
488
  }
486
- function Rn({
489
+ function Gn({
487
490
  options: e,
488
491
  showSearch: t,
489
492
  value: n,
490
493
  onChange: r,
491
494
  searchSize: o
492
495
  }) {
493
- const { searchTerm: i, setSearchTerm: l, filteredOptions: a } = Ge(e, t);
496
+ const { searchTerm: i, setSearchTerm: l, filteredOptions: a } = Ve(e, t);
494
497
  return /* @__PURE__ */ w(P, { children: [
495
498
  t && /* @__PURE__ */ s(ne, { size: o, children: /* @__PURE__ */ s(re, { value: i, onValueChange: l }) }),
496
- /* @__PURE__ */ s(oe, { children: /* @__PURE__ */ s(Ve, { options: a, value: n, onChange: r }) })
499
+ /* @__PURE__ */ s(oe, { children: /* @__PURE__ */ s(He, { options: a, value: n, onChange: r }) })
497
500
  ] });
498
501
  }
499
- function Gn({
502
+ function Vn({
500
503
  searchOptions: e,
501
504
  searchDebounce: t,
502
505
  value: n,
503
506
  onChange: r,
504
507
  searchSize: o
505
508
  }) {
506
- const { searchTerm: i, setSearchTerm: l, options: a, isLoading: f } = Tn(
509
+ const { searchTerm: i, setSearchTerm: l, options: a, isLoading: f } = Pn(
507
510
  e,
508
511
  t
509
512
  ), h = f && a.length === 0;
510
513
  return /* @__PURE__ */ w(P, { children: [
511
514
  /* @__PURE__ */ s(ne, { size: o, children: /* @__PURE__ */ s(re, { value: i, onValueChange: l }) }),
512
- /* @__PURE__ */ s(oe, { children: h ? /* @__PURE__ */ s("div", { className: Z.status, children: /* @__PURE__ */ s(kt, {}) }) : a.length > 0 ? /* @__PURE__ */ s(Ve, { options: a, value: n, onChange: r }) : /* @__PURE__ */ s("div", { className: Z.status, children: O.filters.noOptionsFound }) })
515
+ /* @__PURE__ */ s(oe, { children: h ? /* @__PURE__ */ s("div", { className: Z.status, children: /* @__PURE__ */ s(Tt, {}) }) : a.length > 0 ? /* @__PURE__ */ s(He, { options: a, value: n, onChange: r }) : /* @__PURE__ */ s("div", { className: Z.status, children: O.filters.noOptionsFound }) })
513
516
  ] });
514
517
  }
515
- function He({ filterEntity: e, ...t }) {
518
+ function Be({ filterEntity: e, ...t }) {
516
519
  const { options: n, search: r, searchDebounce: o } = e.params;
517
- return typeof n == "function" ? /* @__PURE__ */ s(Gn, { searchOptions: n, searchDebounce: o, ...t }) : /* @__PURE__ */ s(Rn, { options: n, showSearch: r ?? !1, ...t });
520
+ return typeof n == "function" ? /* @__PURE__ */ s(Vn, { searchOptions: n, searchDebounce: o, ...t }) : /* @__PURE__ */ s(Gn, { options: n, showSearch: r ?? !1, ...t });
518
521
  }
519
- function Vn({ filterEntity: e }) {
522
+ function Hn({ filterEntity: e }) {
520
523
  const n = k().getPlugin("filters"), r = n.useDraftState(e.filterKey), o = te(r == null ? void 0 : r.value);
521
524
  function i(l) {
522
525
  n.setDraftState(e.filterKey, { value: l });
523
526
  }
524
527
  return /* @__PURE__ */ s(ee, { filterEntity: e, children: /* @__PURE__ */ s(
525
- He,
528
+ Be,
526
529
  {
527
530
  filterEntity: e,
528
531
  value: o,
@@ -531,13 +534,13 @@ function Vn({ filterEntity: e }) {
531
534
  }
532
535
  ) });
533
536
  }
534
- function Hn({ filterEntity: e }) {
537
+ function Bn({ filterEntity: e }) {
535
538
  const n = k().getPlugin("filters"), r = n.useState(e.filterKey), o = te(r == null ? void 0 : r.value);
536
539
  function i(l) {
537
540
  l.length > 0 ? n.setState(e.filterKey, { value: l }) : n.removeState(e.filterKey);
538
541
  }
539
542
  return /* @__PURE__ */ s(X, { filterEntity: e, children: /* @__PURE__ */ s(
540
- He,
543
+ Be,
541
544
  {
542
545
  filterEntity: e,
543
546
  value: o,
@@ -546,14 +549,14 @@ function Hn({ filterEntity: e }) {
546
549
  }
547
550
  ) });
548
551
  }
549
- function yo(e) {
552
+ function bo(e) {
550
553
  const { options: t } = e;
551
554
  return {
552
555
  id: e.id,
553
556
  filterKey: e.filterKey ?? e.id,
554
557
  label: e.label,
555
- filterComponent: Hn,
556
- dialogFilterComponent: Vn,
558
+ filterComponent: Bn,
559
+ dialogFilterComponent: Hn,
557
560
  params: {
558
561
  options: t,
559
562
  get search() {
@@ -564,46 +567,46 @@ function yo(e) {
564
567
  }
565
568
  };
566
569
  }
567
- const Bn = "_options_9wsap_1", jn = "_hiddenInput_9wsap_10", Ne = {
568
- options: Bn,
569
- hiddenInput: jn
570
+ const jn = "_options_9wsap_1", qn = "_hiddenInput_9wsap_10", Ne = {
571
+ options: jn,
572
+ hiddenInput: qn
570
573
  };
571
- function Be({ filterEntity: e, value: t, onChange: n, searchSize: r }) {
572
- const o = dt(), { options: i, mode: l = "checkbox", search: a } = e.params, { searchTerm: f, setSearchTerm: h, filteredOptions: g } = Ge(
574
+ function je({ filterEntity: e, value: t, onChange: n, searchSize: r }) {
575
+ const o = ft(), { options: i, mode: l = "checkbox", search: a } = e.params, { searchTerm: f, setSearchTerm: h, filteredOptions: g } = Ve(
573
576
  i,
574
577
  a ?? !1
575
578
  );
576
- function b(I) {
577
- return t.includes(I);
579
+ function b(y) {
580
+ return t.includes(y);
578
581
  }
579
- function A(I) {
580
- l === "radio" ? n([I]) : b(I) ? n(t.filter((F) => F !== I)) : n([...t, I]);
582
+ function x(y) {
583
+ l === "radio" ? n([y]) : b(y) ? n(t.filter((F) => F !== y)) : n([...t, y]);
581
584
  }
582
585
  return /* @__PURE__ */ w("div", { children: [
583
586
  a && /* @__PURE__ */ s(ne, { size: r, children: /* @__PURE__ */ s(re, { value: f, onValueChange: h }) }),
584
- /* @__PURE__ */ s(oe, { children: /* @__PURE__ */ s("div", { className: Ne.options, children: g.map((I) => /* @__PURE__ */ w(Wt, { active: b(I.value), children: [
585
- I.component ? /* @__PURE__ */ s(I.component, { option: I }) : /* @__PURE__ */ s(P, { children: I.label }),
587
+ /* @__PURE__ */ s(oe, { children: /* @__PURE__ */ s("div", { className: Ne.options, children: g.map((y) => /* @__PURE__ */ w(Xt, { active: b(y.value), children: [
588
+ y.component ? /* @__PURE__ */ s(y.component, { option: y }) : /* @__PURE__ */ s(P, { children: y.label }),
586
589
  /* @__PURE__ */ s(
587
590
  "input",
588
591
  {
589
592
  type: l === "radio" ? "radio" : "checkbox",
590
593
  name: o,
591
- value: String(I.value),
592
- checked: b(I.value),
593
- onChange: () => A(I.value),
594
+ value: String(y.value),
595
+ checked: b(y.value),
596
+ onChange: () => x(y.value),
594
597
  className: Ne.hiddenInput
595
598
  }
596
599
  )
597
- ] }, String(I.value))) }) })
600
+ ] }, String(y.value))) }) })
598
601
  ] });
599
602
  }
600
- function qn({ filterEntity: e }) {
603
+ function Un({ filterEntity: e }) {
601
604
  const n = k().getPlugin("filters"), r = n.useDraftState(e.filterKey), o = te(r == null ? void 0 : r.value);
602
605
  function i(l) {
603
606
  n.setDraftState(e.filterKey, { value: l });
604
607
  }
605
608
  return /* @__PURE__ */ s(ee, { filterEntity: e, children: /* @__PURE__ */ s(
606
- Be,
609
+ je,
607
610
  {
608
611
  filterEntity: e,
609
612
  value: o,
@@ -612,13 +615,13 @@ function qn({ filterEntity: e }) {
612
615
  }
613
616
  ) });
614
617
  }
615
- function Un({ filterEntity: e }) {
618
+ function Wn({ filterEntity: e }) {
616
619
  const n = k().getPlugin("filters"), r = n.useState(e.filterKey), o = te(r == null ? void 0 : r.value);
617
620
  function i(l) {
618
621
  l.length > 0 ? n.setState(e.filterKey, { value: l }) : n.removeState(e.filterKey);
619
622
  }
620
623
  return /* @__PURE__ */ s(X, { filterEntity: e, children: /* @__PURE__ */ s(
621
- Be,
624
+ je,
622
625
  {
623
626
  filterEntity: e,
624
627
  value: o,
@@ -627,13 +630,13 @@ function Un({ filterEntity: e }) {
627
630
  }
628
631
  ) });
629
632
  }
630
- function Io(e) {
633
+ function _o(e) {
631
634
  return {
632
635
  id: e.id,
633
636
  filterKey: e.filterKey ?? e.id,
634
637
  label: e.label,
635
- filterComponent: Un,
636
- dialogFilterComponent: qn,
638
+ filterComponent: Wn,
639
+ dialogFilterComponent: Un,
637
640
  params: {
638
641
  options: e.options,
639
642
  mode: e.mode ?? "checkbox",
@@ -644,7 +647,7 @@ function Io(e) {
644
647
  }
645
648
  };
646
649
  }
647
- function Wn(e, t, n) {
650
+ function Xn(e, t, n) {
648
651
  if (!n)
649
652
  return t;
650
653
  const r = e.getNode(t);
@@ -655,18 +658,18 @@ function Wn(e, t, n) {
655
658
  const o = r.item[n];
656
659
  return typeof o == "string" || typeof o == "number" ? o : t;
657
660
  }
658
- const he = Symbol("tree-internal-context"), je = ft(null), Xn = je.Provider;
659
- function qe() {
660
- const e = pt(je);
661
+ const he = Symbol("tree-internal-context"), qe = pt(null), Qn = qe.Provider;
662
+ function Ue() {
663
+ const e = ht(qe);
661
664
  if (!e)
662
665
  throw new Error("useTree must be used within TreeProvider");
663
666
  return e;
664
667
  }
665
- function Qn() {
668
+ function En() {
666
669
  return K().plugins.pluginContext;
667
670
  }
668
671
  function K() {
669
- return qe()[he];
672
+ return Ue()[he];
670
673
  }
671
674
  function j({
672
675
  name: e,
@@ -678,10 +681,10 @@ function j({
678
681
  return /* @__PURE__ */ s(i, { ...t }, o.id);
679
682
  }) });
680
683
  }
681
- const En = "_treeMain_ayh6i_8", Jn = {
682
- treeMain: En
684
+ const Jn = "_treeMain_ayh6i_8", Yn = {
685
+ treeMain: Jn
683
686
  };
684
- function Ue({
687
+ function We({
685
688
  node: e
686
689
  }) {
687
690
  var a;
@@ -693,11 +696,11 @@ function Ue({
693
696
  }
694
697
  return /* @__PURE__ */ s("span", { children: i });
695
698
  }
696
- const Yn = "_icon_1r7q3_1", Zn = "_iconExpanded_1r7q3_6", we = {
697
- icon: Yn,
698
- iconExpanded: Zn
699
+ const Zn = "_icon_1r7q3_1", er = "_iconExpanded_1r7q3_6", we = {
700
+ icon: Zn,
701
+ iconExpanded: er
699
702
  };
700
- function er({
703
+ function tr({
701
704
  node: e
702
705
  }) {
703
706
  const { settings: t, layout: n } = K(), r = n.useComponent("directory"), o = n.useLayoutStore((m) => m.expandedIds.has(e.id)), l = n.useSlots("icon").length > 0, f = n.useSlots("left").length > 0, h = g();
@@ -710,7 +713,7 @@ function er({
710
713
  function b() {
711
714
  n.toggleExpanded(e.id);
712
715
  }
713
- const A = o ? O.tree.collapse : O.tree.expand, I = l ? /* @__PURE__ */ s(j, { name: "icon", item: e.item, expanded: o }) : /* @__PURE__ */ s("span", { className: o ? we.iconExpanded : we.icon, children: /* @__PURE__ */ s(at, {}) }), F = /* @__PURE__ */ w(P, { children: [
716
+ const x = o ? O.tree.collapse : O.tree.expand, y = l ? /* @__PURE__ */ s(j, { name: "icon", item: e.item, expanded: o }) : /* @__PURE__ */ s("span", { className: o ? we.iconExpanded : we.icon, children: /* @__PURE__ */ s(ut, {}) }), F = /* @__PURE__ */ w(P, { children: [
714
717
  /* @__PURE__ */ s(
715
718
  ue,
716
719
  {
@@ -722,18 +725,18 @@ function er({
722
725
  tabIndex: -1,
723
726
  onClick: b,
724
727
  "aria-expanded": o,
725
- "aria-label": A,
726
- icon: I
728
+ "aria-label": x,
729
+ icon: y
727
730
  }
728
731
  ),
729
732
  h && /* @__PURE__ */ s(j, { name: "left", item: e.item, node: e })
730
733
  ] });
731
734
  return (
732
735
  // eslint-disable-next-line react-hooks/static-components -- DirectoryComponent comes from the tree's component registry (a store lookup), so it is the same component on every render; the rule cannot see through the lookup.
733
- /* @__PURE__ */ s(r, { node: e, leftSlot: F, children: /* @__PURE__ */ s(Ue, { node: e }) })
736
+ /* @__PURE__ */ s(r, { node: e, leftSlot: F, children: /* @__PURE__ */ s(We, { node: e }) })
734
737
  );
735
738
  }
736
- function tr({
739
+ function nr({
737
740
  node: e
738
741
  }) {
739
742
  const { settings: t, layout: n } = K(), r = n.useComponent("leaf"), i = n.useSlots("left").length > 0, l = a();
@@ -748,27 +751,27 @@ function tr({
748
751
  {
749
752
  node: e,
750
753
  leftSlot: i && l ? /* @__PURE__ */ s(j, { name: "left", item: e.item, node: e }) : void 0,
751
- children: /* @__PURE__ */ s(Ue, { node: e })
754
+ children: /* @__PURE__ */ s(We, { node: e })
752
755
  }
753
756
  )
754
757
  );
755
758
  }
756
- const nr = "_treeNodeDirectory_ugt7q_1", rr = "_treeNodeDirectoryChildren_ugt7q_10", Ae = {
757
- treeNodeDirectory: nr,
758
- treeNodeDirectoryChildren: rr
759
+ const rr = "_treeNodeDirectory_ugt7q_1", or = "_treeNodeDirectoryChildren_ugt7q_10", Ae = {
760
+ treeNodeDirectory: rr,
761
+ treeNodeDirectoryChildren: or
759
762
  };
760
- function We({
763
+ function Xe({
761
764
  nodes: e
762
765
  }) {
763
766
  const { layout: t } = K(), n = t.useLayoutStore((o) => o.filter), r = n ? e.filter((o) => n(o.item)) : e;
764
- return /* @__PURE__ */ s(P, { children: r.map((o) => /* @__PURE__ */ s(or, { node: o }, o.id)) });
767
+ return /* @__PURE__ */ s(P, { children: r.map((o) => /* @__PURE__ */ s(sr, { node: o }, o.id)) });
765
768
  }
766
- function or({
769
+ function sr({
767
770
  node: e
768
771
  }) {
769
- return e.isLeaf ? /* @__PURE__ */ s(tr, { node: e }) : /* @__PURE__ */ s(sr, { node: e });
772
+ return e.isLeaf ? /* @__PURE__ */ s(nr, { node: e }) : /* @__PURE__ */ s(ir, { node: e });
770
773
  }
771
- function sr({
774
+ function ir({
772
775
  node: e
773
776
  }) {
774
777
  const { settings: t, layout: n } = K(), r = n.useComponent("placeholder"), o = n.useLayoutStore((g) => g.expandedIds.has(e.id)), i = t.treeStructure.current.useChildren(e.id), l = f(), a = h();
@@ -784,26 +787,26 @@ function sr({
784
787
  return g === "when_expanded" ? o : g !== !1;
785
788
  }
786
789
  return /* @__PURE__ */ w("div", { className: Ae.treeNodeDirectory, children: [
787
- /* @__PURE__ */ s(er, { node: e }),
788
- o && /* @__PURE__ */ s("div", { className: Ae.treeNodeDirectoryChildren, children: i.length > 0 ? /* @__PURE__ */ s(We, { nodes: i }) : (
790
+ /* @__PURE__ */ s(tr, { node: e }),
791
+ o && /* @__PURE__ */ s("div", { className: Ae.treeNodeDirectoryChildren, children: i.length > 0 ? /* @__PURE__ */ s(Xe, { nodes: i }) : (
789
792
  // eslint-disable-next-line react-hooks/static-components -- PlaceholderComponent comes from the tree's component registry (a store lookup), so it is the same component on every render; the rule cannot see through the lookup.
790
793
  /* @__PURE__ */ s(r, { parent: e.item })
791
794
  ) }),
792
795
  a && /* @__PURE__ */ s(j, { name: "directory-bottom", node: e })
793
796
  ] });
794
797
  }
795
- function ir() {
798
+ function lr() {
796
799
  const { settings: e, layout: t, focus: n } = K(), r = e.treeStructure.current.useRootNodes(), o = t.useComponent("placeholder");
797
800
  return /* @__PURE__ */ w(
798
801
  "div",
799
802
  {
800
- className: Jn.treeMain,
803
+ className: Yn.treeMain,
801
804
  role: "tree",
802
805
  "aria-label": e.ariaLabel,
803
806
  "aria-labelledby": e.ariaLabelledBy,
804
807
  onKeyDown: n.handleKeyDown,
805
808
  children: [
806
- /* @__PURE__ */ s(Kt, { open: !0, modal: !1, children: r.length > 0 ? /* @__PURE__ */ s(We, { nodes: r }) : (
809
+ /* @__PURE__ */ s(Mt, { open: !0, modal: !1, children: r.length > 0 ? /* @__PURE__ */ s(Xe, { nodes: r }) : (
807
810
  // eslint-disable-next-line react-hooks/static-components -- PlaceholderComponent comes from the tree's component registry (a store lookup), so it is the same component on every render; the rule cannot see through the lookup.
808
811
  /* @__PURE__ */ s(o, { parent: null })
809
812
  ) }),
@@ -812,9 +815,9 @@ function ir() {
812
815
  }
813
816
  );
814
817
  }
815
- function lr() {
816
- const e = qe(), t = e.treeStructure.current;
817
- return $(() => (e.init(), () => e.destroy()), [e]), t ? /* @__PURE__ */ s(ir, {}) : null;
818
+ function cr() {
819
+ const e = Ue(), t = e.treeStructure.current;
820
+ return $(() => (e.init(), () => e.destroy()), [e]), t ? /* @__PURE__ */ s(lr, {}) : null;
818
821
  }
819
822
  function le(e, t) {
820
823
  const n = [];
@@ -824,15 +827,15 @@ function le(e, t) {
824
827
  n.push(i), !i.isLeaf && t.has(i.id) && r(i.children);
825
828
  }
826
829
  }
827
- function cr(e, t) {
830
+ function ar(e, t) {
828
831
  const n = e.findIndex((r) => r.id === t);
829
832
  return n === -1 || n === e.length - 1 ? null : e[n + 1];
830
833
  }
831
- function ar(e, t) {
834
+ function ur(e, t) {
832
835
  const n = e.findIndex((r) => r.id === t);
833
836
  return n <= 0 ? null : e[n - 1];
834
837
  }
835
- function ur(e) {
838
+ function dr(e) {
836
839
  const { layout: t, settings: n } = e, r = z()(() => ({
837
840
  focusedNodeId: null
838
841
  })), o = {
@@ -855,18 +858,18 @@ function ur(e) {
855
858
  if (!C) return;
856
859
  const { key: p } = v;
857
860
  let S = !1;
858
- p === "ArrowDown" ? S = f() : p === "ArrowUp" ? S = h() : p === "ArrowRight" ? S = g() : p === "ArrowLeft" ? S = b() : p === "Home" ? S = A() : p === "End" ? S = I() : p === "Enter" && (S = F()), S && v.preventDefault();
861
+ p === "ArrowDown" ? S = f() : p === "ArrowUp" ? S = h() : p === "ArrowRight" ? S = g() : p === "ArrowLeft" ? S = b() : p === "Home" ? S = x() : p === "End" ? S = y() : p === "Enter" && (S = F()), S && v.preventDefault();
859
862
  }
860
863
  function f() {
861
864
  const { treeStructure: v, expandedIds: C, focusedNodeId: p } = m();
862
865
  if (!p) return !1;
863
- const S = le(v, C), u = cr(S, p);
866
+ const S = le(v, C), u = ar(S, p);
864
867
  return u ? (i(u.id), !0) : !1;
865
868
  }
866
869
  function h() {
867
870
  const { treeStructure: v, expandedIds: C, focusedNodeId: p } = m();
868
871
  if (!p) return !1;
869
- const S = le(v, C), u = ar(S, p);
872
+ const S = le(v, C), u = ur(S, p);
870
873
  return u ? (i(u.id), !0) : !1;
871
874
  }
872
875
  function g() {
@@ -886,11 +889,11 @@ function ur(e) {
886
889
  const S = v.getNode(p);
887
890
  return S ? !S.isLeaf && C.has(p) ? (t.toggleExpanded(p, !1), !0) : S.parent ? (i(S.parent.id), !0) : !1 : !1;
888
891
  }
889
- function A() {
892
+ function x() {
890
893
  const { treeStructure: v } = m(), C = v.getRootNodes()[0];
891
894
  return C ? (i(C.id), !0) : !1;
892
895
  }
893
- function I() {
896
+ function y() {
894
897
  const { treeStructure: v, expandedIds: C } = m(), p = le(v, C), S = p[p.length - 1];
895
898
  return S ? (i(S.id), !0) : !1;
896
899
  }
@@ -905,8 +908,8 @@ function ur(e) {
905
908
  return { treeStructure: v, expandedIds: C, focusedNodeId: p };
906
909
  }
907
910
  }
908
- function dr() {
909
- const e = Mt();
911
+ function fr() {
912
+ const e = Ot();
910
913
  return {
911
914
  hook: e.hook,
912
915
  callHook: e.callHook,
@@ -928,12 +931,12 @@ function ce(e) {
928
931
  t.unshift(i), n = void 0;
929
932
  }
930
933
  }
931
- const fr = "_treeActions_m77gm_1", pr = "_treeActionsAlways_m77gm_6", hr = "_treeActionsHover_m77gm_12", ae = {
932
- treeActions: fr,
933
- treeActionsAlways: pr,
934
- treeActionsHover: hr
934
+ const pr = "_treeActions_m77gm_1", hr = "_treeActionsAlways_m77gm_6", mr = "_treeActionsHover_m77gm_12", ae = {
935
+ treeActions: pr,
936
+ treeActionsAlways: hr,
937
+ treeActionsHover: mr
935
938
  };
936
- function mr({
939
+ function gr({
937
940
  node: e
938
941
  }) {
939
942
  const { settings: t } = K(), n = o(), r = i();
@@ -961,17 +964,17 @@ function mr({
961
964
  }
962
965
  );
963
966
  }
964
- const gr = "_treeLeftSlot_88822_1", Sr = {
965
- treeLeftSlot: gr
967
+ const Sr = "_treeLeftSlot_88822_1", vr = {
968
+ treeLeftSlot: Sr
966
969
  };
967
- function Xe({ children: e }) {
968
- return /* @__PURE__ */ s("div", { className: Sr.treeLeftSlot, children: e });
969
- }
970
- const vr = "_treeListItem_euazv_9", Cr = "_leaf_euazv_23", yr = "_label_euazv_44", Ir = "_ellipsis_euazv_49", J = {
971
- treeListItem: vr,
972
- leaf: Cr,
973
- label: yr,
974
- ellipsis: Ir
970
+ function Qe({ children: e }) {
971
+ return /* @__PURE__ */ s("div", { className: vr.treeLeftSlot, children: e });
972
+ }
973
+ const Cr = "_treeListItem_euazv_9", yr = "_leaf_euazv_23", Ir = "_label_euazv_44", br = "_ellipsis_euazv_49", J = {
974
+ treeListItem: Cr,
975
+ leaf: yr,
976
+ label: Ir,
977
+ ellipsis: br
975
978
  };
976
979
  function xe({
977
980
  node: e,
@@ -980,17 +983,17 @@ function xe({
980
983
  leftSlot: r
981
984
  }) {
982
985
  var M;
983
- const { settings: o, layout: i, focus: l } = K(), a = Pe(null), f = i.useLayoutStore((x) => x.activeIds.has(e.id)), h = i.useLayoutStore((x) => x.activeIds), g = l.useFocusStore((x) => x.focusedNodeId), b = i.useLayoutStore((x) => x.expandedIds.has(e.id)), A = i.useLayoutStore(
984
- (x) => {
986
+ const { settings: o, layout: i, focus: l } = K(), a = Pe(null), f = i.useLayoutStore((A) => A.activeIds.has(e.id)), h = i.useLayoutStore((A) => A.activeIds), g = l.useFocusStore((A) => A.focusedNodeId), b = i.useLayoutStore((A) => A.expandedIds.has(e.id)), x = i.useLayoutStore(
987
+ (A) => {
985
988
  var V;
986
- return (((V = x.slots.get("actions")) == null ? void 0 : V.length) ?? 0) > 0;
989
+ return (((V = A.slots.get("actions")) == null ? void 0 : V.length) ?? 0) > 0;
987
990
  }
988
- ), I = o.treeStructure.current, F = I.getLevel(e.id), m = I.getSiblingCount(e.id), v = I.getSiblingPosition(e.id), C = e.id === ((M = I.getRootNodes()[0]) == null ? void 0 : M.id), p = g === e.id, S = L(), u = o.ellipsis ?? !0;
991
+ ), y = o.treeStructure.current, F = y.getLevel(e.id), m = y.getSiblingCount(e.id), v = y.getSiblingPosition(e.id), C = e.id === ((M = y.getRootNodes()[0]) == null ? void 0 : M.id), p = g === e.id, S = L(), u = o.ellipsis ?? !0;
989
992
  $(() => {
990
993
  p && a.current && document.activeElement !== a.current && a.current.focus();
991
994
  }, [p]);
992
- function N(x) {
993
- o.click && (x.target instanceof Element && x.target.closest("[data-tree-node-click-ignore]") || o.click({ id: e.id, item: e.item }));
995
+ function N(A) {
996
+ o.click && (A.target instanceof Element && A.target.closest("[data-tree-node-click-ignore]") || o.click({ id: e.id, item: e.item }));
994
997
  }
995
998
  function D() {
996
999
  l.setFocusedNode(e.id);
@@ -1001,13 +1004,13 @@ function xe({
1001
1004
  if (o.initialFocusedNodeId !== void 0)
1002
1005
  return e.id === o.initialFocusedNodeId ? 0 : -1;
1003
1006
  if (h.size > 0) {
1004
- const x = Array.from(h)[0];
1005
- return e.id === x ? 0 : -1;
1007
+ const A = Array.from(h)[0];
1008
+ return e.id === A ? 0 : -1;
1006
1009
  }
1007
1010
  return C ? 0 : -1;
1008
1011
  }
1009
1012
  return /* @__PURE__ */ w(
1010
- ze,
1013
+ $e,
1011
1014
  {
1012
1015
  ref: a,
1013
1016
  role: "treeitem",
@@ -1022,27 +1025,27 @@ function xe({
1022
1025
  "data-active": f || void 0,
1023
1026
  className: W(J.treeListItem, e.isLeaf && J.leaf, n),
1024
1027
  children: [
1025
- r && /* @__PURE__ */ s(Xe, { children: r }),
1028
+ r && /* @__PURE__ */ s(Qe, { children: r }),
1026
1029
  /* @__PURE__ */ s("span", { className: W(J.label, u && J.ellipsis), children: t }),
1027
- A && /* @__PURE__ */ s(mr, { node: e })
1030
+ x && /* @__PURE__ */ s(gr, { node: e })
1028
1031
  ]
1029
1032
  }
1030
1033
  );
1031
1034
  }
1032
- const br = "_treePlaceholder_13ekq_6", _r = {
1033
- treePlaceholder: br
1035
+ const _r = "_treePlaceholder_13ekq_6", Nr = {
1036
+ treePlaceholder: _r
1034
1037
  };
1035
- function Nr({
1038
+ function wr({
1036
1039
  parent: e
1037
1040
  }) {
1038
1041
  var o;
1039
1042
  const { layout: t } = K(), r = (o = t.useSlots("placeholder")[0]) == null ? void 0 : o.component;
1040
- return /* @__PURE__ */ w(ze, { disabled: !0, className: _r.treePlaceholder, children: [
1041
- /* @__PURE__ */ s(Xe, {}),
1043
+ return /* @__PURE__ */ w($e, { disabled: !0, className: Nr.treePlaceholder, children: [
1044
+ /* @__PURE__ */ s(Qe, {}),
1042
1045
  r ? /* @__PURE__ */ s(r, { parent: e }) : O.tree.noItems
1043
1046
  ] });
1044
1047
  }
1045
- function wr(e) {
1048
+ function Ar(e) {
1046
1049
  const t = [], n = z()(() => ({
1047
1050
  slots: /* @__PURE__ */ new Map(),
1048
1051
  expandedIds: /* @__PURE__ */ new Set(),
@@ -1050,14 +1053,14 @@ function wr(e) {
1050
1053
  })), r = z(() => ({
1051
1054
  leaf: ce(xe),
1052
1055
  directory: ce(xe),
1053
- placeholder: ce(Nr)
1056
+ placeholder: ce(wr)
1054
1057
  })), o = {
1055
1058
  registerSlot: f,
1056
1059
  registerComponent: F,
1057
1060
  toggleExpanded: g,
1058
1061
  toggleActive: b,
1059
- clearActive: A,
1060
- setFilter: I
1062
+ clearActive: x,
1063
+ setFilter: y
1061
1064
  };
1062
1065
  return e.plugins.registerPublicApi(o), {
1063
1066
  ...o,
@@ -1106,10 +1109,10 @@ function wr(e) {
1106
1109
  return S !== p && (S ? u.add(m) : u.delete(m)), { activeIds: u };
1107
1110
  });
1108
1111
  }
1109
- function A() {
1112
+ function x() {
1110
1113
  n.setState({ activeIds: /* @__PURE__ */ new Set() });
1111
1114
  }
1112
- function I(m) {
1115
+ function y(m) {
1113
1116
  n.setState({
1114
1117
  filter: m
1115
1118
  });
@@ -1118,7 +1121,7 @@ function wr(e) {
1118
1121
  r.getState()[m].registerComponent(v);
1119
1122
  }
1120
1123
  }
1121
- function Ar(e) {
1124
+ function xr(e) {
1122
1125
  const t = /* @__PURE__ */ new Map(), n = {
1123
1126
  hook: e.hooked.hook,
1124
1127
  getPlugin: a
@@ -1150,7 +1153,7 @@ function Ar(e) {
1150
1153
  return t.get(f);
1151
1154
  }
1152
1155
  }
1153
- function xr(e, t) {
1156
+ function Fr(e, t) {
1154
1157
  const n = {
1155
1158
  ...t
1156
1159
  }, r = {
@@ -1159,8 +1162,8 @@ function xr(e, t) {
1159
1162
  };
1160
1163
  return e.plugins.registerPublicApi(r), n;
1161
1164
  }
1162
- function Fr(e) {
1163
- const t = dr(), n = {}, r = {
1165
+ function Dr(e) {
1166
+ const t = fr(), n = {}, r = {
1164
1167
  hooked: t,
1165
1168
  get plugins() {
1166
1169
  return Y(n.plugins, "plugins");
@@ -1175,7 +1178,7 @@ function Fr(e) {
1175
1178
  return Y(n.focus, "focus");
1176
1179
  }
1177
1180
  };
1178
- return n.plugins = Ar(r), n.settings = xr(r, e), n.layout = wr(r), n.focus = ur(r), {
1181
+ return n.plugins = xr(r), n.settings = Fr(r, e), n.layout = Ar(r), n.focus = dr(r), {
1179
1182
  init: i,
1180
1183
  destroy: o,
1181
1184
  ...r.plugins.pluginContext,
@@ -1193,14 +1196,14 @@ function Y(e, t) {
1193
1196
  throw new Error(`[DataGridTree] The ${t} service was used before it was created.`);
1194
1197
  return e;
1195
1198
  }
1196
- function Dr({
1199
+ function Lr({
1197
1200
  name: e,
1198
1201
  treeStructure: t,
1199
1202
  children: n,
1200
1203
  ...r
1201
1204
  }) {
1202
- const o = Pt(t), [i] = T(
1203
- () => Fr({
1205
+ const o = Kt(t), [i] = T(
1206
+ () => Dr({
1204
1207
  ...r,
1205
1208
  name: e,
1206
1209
  treeStructure: o
@@ -1208,13 +1211,13 @@ function Dr({
1208
1211
  );
1209
1212
  return $(() => {
1210
1213
  i[he].layout.setFilter(r.filter);
1211
- }, [i, r.filter]), /* @__PURE__ */ w(Xn, { value: i, children: [
1214
+ }, [i, r.filter]), /* @__PURE__ */ w(Qn, { value: i, children: [
1212
1215
  n,
1213
- /* @__PURE__ */ s(lr, {})
1216
+ /* @__PURE__ */ s(cr, {})
1214
1217
  ] });
1215
1218
  }
1216
- function Lr(e, t, n) {
1217
- return ht(function(o) {
1219
+ function kr(e, t, n) {
1220
+ return mt(function(o) {
1218
1221
  const i = K(), [l] = T(() => {
1219
1222
  const a = t(i.plugins.pluginContext);
1220
1223
  return i.plugins.registerPlugin({
@@ -1228,38 +1231,38 @@ function Lr(e, t, n) {
1228
1231
  }, [l, o]), null;
1229
1232
  }, n);
1230
1233
  }
1231
- const kr = "_radioGroup_1l2s1_7", Tr = "_text_1l2s1_14", Fe = {
1232
- radioGroup: kr,
1233
- text: Tr
1234
+ const Tr = "_radioGroup_1l2s1_7", Pr = "_text_1l2s1_14", Fe = {
1235
+ radioGroup: Tr,
1236
+ text: Pr
1234
1237
  }, De = "selected";
1235
- function Pr({
1238
+ function Kr({
1236
1239
  item: e,
1237
1240
  label: t
1238
1241
  }) {
1239
- const r = Qn().getPlugin("radioSelect"), o = e.id, l = r.useSelectedId() === o;
1242
+ const r = En().getPlugin("radioSelect"), o = e.id, l = r.useSelectedId() === o;
1240
1243
  function a() {
1241
1244
  (typeof o == "string" || typeof o == "number") && r.select(o);
1242
1245
  }
1243
- return /* @__PURE__ */ w(Oe, { children: [
1246
+ return /* @__PURE__ */ w(ze, { children: [
1244
1247
  /* @__PURE__ */ s(
1245
- Ot,
1248
+ zt,
1246
1249
  {
1247
1250
  className: Fe.radioGroup,
1248
1251
  value: l ? De : "",
1249
1252
  onValueChange: a,
1250
- children: /* @__PURE__ */ s(zt, { value: De, "data-tree-node-click-ignore": "" })
1253
+ children: /* @__PURE__ */ s($t, { value: De, "data-tree-node-click-ignore": "" })
1251
1254
  }
1252
1255
  ),
1253
1256
  /* @__PURE__ */ s("span", { className: Fe.text, children: t })
1254
1257
  ] });
1255
1258
  }
1256
- const Kr = Lr("radioSelect", (e) => {
1259
+ const Mr = kr("radioSelect", (e) => {
1257
1260
  let t = {};
1258
1261
  const n = z(() => ({
1259
1262
  selectedId: void 0
1260
1263
  }));
1261
1264
  return e.registerSlot("label", {
1262
- component: Pr
1265
+ component: Kr
1263
1266
  }), {
1264
1267
  useSelectedId: () => n((l) => l.selectedId),
1265
1268
  select: i,
@@ -1273,9 +1276,9 @@ const Kr = Lr("radioSelect", (e) => {
1273
1276
  n.setState({ selectedId: l }), (a = t.onChange) == null || a.call(t, l);
1274
1277
  }
1275
1278
  });
1276
- function Mr(e, t) {
1279
+ function Or(e, t) {
1277
1280
  const [n, r] = T(""), [o, i] = T(""), l = Te(
1278
- () => Ke((h) => i(h), 300),
1281
+ () => Me((h) => i(h), 300),
1279
1282
  []
1280
1283
  );
1281
1284
  $(() => (l(n), () => l.cancel()), [n, l]);
@@ -1303,44 +1306,44 @@ function Mr(e, t) {
1303
1306
  filter: f
1304
1307
  };
1305
1308
  }
1306
- function Qe({ filterEntity: e, value: t, onChange: n, searchSize: r }) {
1307
- const { tree: o, treeLabel: i, search: l } = e.params, a = (b) => Kn(b, i), { searchTerm: f, setSearchTerm: h, filter: g } = Mr(o, a);
1309
+ function Ee({ filterEntity: e, value: t, onChange: n, searchSize: r }) {
1310
+ const { tree: o, treeLabel: i, search: l } = e.params, a = (b) => Mn(b, i), { searchTerm: f, setSearchTerm: h, filter: g } = Or(o, a);
1308
1311
  return /* @__PURE__ */ w(P, { children: [
1309
1312
  l && /* @__PURE__ */ s(ne, { size: r, children: /* @__PURE__ */ s(re, { value: f, onValueChange: h }) }),
1310
1313
  /* @__PURE__ */ s(oe, { children: /* @__PURE__ */ s(
1311
- Dr,
1314
+ Lr,
1312
1315
  {
1313
1316
  name: `filter-tree-${e.filterKey}`,
1314
1317
  treeStructure: o,
1315
1318
  label: i,
1316
1319
  ellipsis: !1,
1317
1320
  filter: g,
1318
- children: /* @__PURE__ */ s(Kr, { value: t, onChange: n, name: e.filterKey })
1321
+ children: /* @__PURE__ */ s(Mr, { value: t, onChange: n, name: e.filterKey })
1319
1322
  }
1320
1323
  ) })
1321
1324
  ] });
1322
1325
  }
1323
- function Or({ filterEntity: e }) {
1326
+ function zr({ filterEntity: e }) {
1324
1327
  const n = k().getPlugin("filters"), r = n.useDraftState(e.filterKey), o = r == null ? void 0 : r.value;
1325
1328
  function i(l) {
1326
1329
  n.setDraftState(e.filterKey, { value: l });
1327
1330
  }
1328
- return /* @__PURE__ */ s(ee, { filterEntity: e, children: /* @__PURE__ */ s(Qe, { filterEntity: e, value: o, onChange: i, searchSize: "xl" }) });
1331
+ return /* @__PURE__ */ s(ee, { filterEntity: e, children: /* @__PURE__ */ s(Ee, { filterEntity: e, value: o, onChange: i, searchSize: "xl" }) });
1329
1332
  }
1330
- function zr({ filterEntity: e }) {
1333
+ function $r({ filterEntity: e }) {
1331
1334
  const n = k().getPlugin("filters"), r = n.useState(e.filterKey), o = r == null ? void 0 : r.value;
1332
1335
  function i(l) {
1333
1336
  n.setState(e.filterKey, { value: l });
1334
1337
  }
1335
- return /* @__PURE__ */ s(X, { filterEntity: e, children: /* @__PURE__ */ s(Qe, { filterEntity: e, value: o, onChange: i, searchSize: "m" }) });
1338
+ return /* @__PURE__ */ s(X, { filterEntity: e, children: /* @__PURE__ */ s(Ee, { filterEntity: e, value: o, onChange: i, searchSize: "m" }) });
1336
1339
  }
1337
- function bo(e) {
1340
+ function No(e) {
1338
1341
  return {
1339
1342
  id: e.id,
1340
1343
  filterKey: e.filterKey ?? e.id,
1341
1344
  label: e.label,
1342
- filterComponent: zr,
1343
- dialogFilterComponent: Or,
1345
+ filterComponent: $r,
1346
+ dialogFilterComponent: zr,
1344
1347
  params: {
1345
1348
  tree: e.tree,
1346
1349
  treeLabel: e.treeLabel,
@@ -1350,56 +1353,56 @@ function bo(e) {
1350
1353
  popover: e.popover
1351
1354
  },
1352
1355
  resolveLoadValue: e.filterValue ? (t) => ({
1353
- value: Wn(e.tree, t.value, e.filterValue)
1356
+ value: Xn(e.tree, t.value, e.filterValue)
1354
1357
  }) : void 0
1355
1358
  };
1356
1359
  }
1357
- const $r = "yyyy-MM-dd";
1358
- function Ee(e) {
1360
+ const Rr = "yyyy-MM-dd";
1361
+ function Je(e) {
1359
1362
  return !e.from && !e.to;
1360
1363
  }
1361
1364
  function Le(e, t) {
1362
1365
  if (typeof e != "string" || e === "") return null;
1363
- const n = $t(e, t, /* @__PURE__ */ new Date());
1364
- return Rt(n) ? n : null;
1366
+ const n = Rt(e, t, /* @__PURE__ */ new Date());
1367
+ return Gt(n) ? n : null;
1365
1368
  }
1366
1369
  function ke(e, t) {
1367
- return Gt(Vt(e, { hours: 12, minutes: 0, seconds: 0 }), t);
1370
+ return Vt(Ht(e, { hours: 12, minutes: 0, seconds: 0 }), t);
1368
1371
  }
1369
- function Rr({ from: e, to: t }, n) {
1370
- return !e || t ? { from: n, to: null } : Ht(ye(n), ye(e)) ? { from: n, to: e } : { from: e, to: n };
1372
+ function Gr({ from: e, to: t }, n) {
1373
+ return !e || t ? { from: n, to: null } : Bt(ye(n), ye(e)) ? { from: n, to: e } : { from: e, to: n };
1371
1374
  }
1372
- const Gr = 1;
1373
- function Je({ value: e, onChange: t, modelDateFormat: n }) {
1374
- const r = n ?? $r, o = Le(e.from, r), i = Le(e.to, r), [l, a] = T(() => o ?? /* @__PURE__ */ new Date());
1375
+ const Vr = 1;
1376
+ function Ye({ value: e, onChange: t, modelDateFormat: n }) {
1377
+ const r = n ?? Rr, o = Le(e.from, r), i = Le(e.to, r), [l, a] = T(() => o ?? /* @__PURE__ */ new Date());
1375
1378
  function f(h) {
1376
- const g = Rr({ from: o, to: i }, h);
1379
+ const g = Gr({ from: o, to: i }, h);
1377
1380
  t({
1378
1381
  from: g.from ? ke(g.from, r) : void 0,
1379
1382
  to: g.to ? ke(g.to, r) : void 0
1380
1383
  });
1381
1384
  }
1382
1385
  return /* @__PURE__ */ s(
1383
- Bt,
1386
+ jt,
1384
1387
  {
1385
1388
  mode: "range",
1386
1389
  selected: o ? { from: o, to: i ?? void 0 } : void 0,
1387
1390
  month: l,
1388
1391
  onMonthChange: a,
1389
1392
  onSelect: (h, g) => f(g),
1390
- weekStartsOn: Gr
1393
+ weekStartsOn: Vr
1391
1394
  }
1392
1395
  );
1393
1396
  }
1394
- function Vr({ filterEntity: e }) {
1397
+ function Hr({ filterEntity: e }) {
1395
1398
  const n = k().getPlugin("filters"), r = n.useDraftState(e.filterKey), o = (r == null ? void 0 : r.value) ?? {};
1396
1399
  function i(l) {
1397
1400
  n.setDraftState(e.filterKey, {
1398
- value: Ee(l) ? void 0 : l
1401
+ value: Je(l) ? void 0 : l
1399
1402
  });
1400
1403
  }
1401
1404
  return /* @__PURE__ */ s(ee, { filterEntity: e, children: /* @__PURE__ */ s(
1402
- Je,
1405
+ Ye,
1403
1406
  {
1404
1407
  value: o,
1405
1408
  onChange: i,
@@ -1407,13 +1410,13 @@ function Vr({ filterEntity: e }) {
1407
1410
  }
1408
1411
  ) });
1409
1412
  }
1410
- function Hr({ filterEntity: e }) {
1413
+ function Br({ filterEntity: e }) {
1411
1414
  const n = k().getPlugin("filters"), r = n.useState(e.filterKey), o = (r == null ? void 0 : r.value) ?? {};
1412
1415
  function i(l) {
1413
- Ee(l) ? n.removeState(e.filterKey) : n.setState(e.filterKey, { value: l });
1416
+ Je(l) ? n.removeState(e.filterKey) : n.setState(e.filterKey, { value: l });
1414
1417
  }
1415
1418
  return /* @__PURE__ */ s(X, { filterEntity: e, children: /* @__PURE__ */ s(
1416
- Je,
1419
+ Ye,
1417
1420
  {
1418
1421
  value: o,
1419
1422
  onChange: i,
@@ -1421,13 +1424,13 @@ function Hr({ filterEntity: e }) {
1421
1424
  }
1422
1425
  ) });
1423
1426
  }
1424
- function _o(e) {
1427
+ function wo(e) {
1425
1428
  return {
1426
1429
  id: e.id,
1427
1430
  filterKey: e.filterKey ?? e.id,
1428
1431
  label: e.label,
1429
- filterComponent: Hr,
1430
- dialogFilterComponent: Vr,
1432
+ filterComponent: Br,
1433
+ dialogFilterComponent: Hr,
1431
1434
  params: {
1432
1435
  modelDateFormat: e.modelDateFormat,
1433
1436
  // Passed straight through, like every sibling entity: the popover's
@@ -1437,7 +1440,7 @@ function _o(e) {
1437
1440
  }
1438
1441
  };
1439
1442
  }
1440
- function Br(e) {
1443
+ function jr(e) {
1441
1444
  const t = z(() => ({
1442
1445
  nodeMap: /* @__PURE__ */ new Map(),
1443
1446
  childrenMap: /* @__PURE__ */ new Map()
@@ -1445,15 +1448,15 @@ function Br(e) {
1445
1448
  return e.items && N(e.items), {
1446
1449
  setItems: N,
1447
1450
  move: u,
1448
- forEach: tt,
1451
+ forEach: nt,
1449
1452
  eachNode: ve,
1450
1453
  getNode: C,
1451
1454
  getChildren: H,
1452
1455
  getRootNodes: F,
1453
1456
  getNodes: m,
1454
1457
  getLevel: Se,
1455
- getSiblingCount: Ze,
1456
- getSiblingPosition: et,
1458
+ getSiblingCount: et,
1459
+ getSiblingPosition: tt,
1457
1460
  isDescendantOf: S,
1458
1461
  useRootNodes: () => t(U(() => F())),
1459
1462
  useNodes: () => t(U(() => m())),
@@ -1463,7 +1466,7 @@ function Br(e) {
1463
1466
  useChildren: (c) => t(U(() => H(c))),
1464
1467
  useNodePath: (c) => t(U(() => ge(c))),
1465
1468
  useNodeLevel: (c) => t(() => Se(c)),
1466
- useNodeIndex: (c) => t(() => Ye(c)),
1469
+ useNodeIndex: (c) => t(() => Ze(c)),
1467
1470
  useIsLeaf: (c) => t(() => p(c)),
1468
1471
  useIsDescendantOf: (c, d) => t(() => S(c, d))
1469
1472
  };
@@ -1487,27 +1490,27 @@ function Br(e) {
1487
1490
  }
1488
1491
  function S(c, d) {
1489
1492
  if (!me(c)) return !1;
1490
- let y = q(c);
1491
- for (; y.parentId !== null; ) {
1492
- if (y.parentId === d)
1493
+ let I = q(c);
1494
+ for (; I.parentId !== null; ) {
1495
+ if (I.parentId === d)
1493
1496
  return !0;
1494
- y = q(y.parentId);
1497
+ I = q(I.parentId);
1495
1498
  }
1496
1499
  return !1;
1497
1500
  }
1498
1501
  function u(c) {
1499
- const d = t.getState(), y = d.nodeMap.get(c.id);
1500
- if (!y)
1502
+ const d = t.getState(), I = d.nodeMap.get(c.id);
1503
+ if (!I)
1501
1504
  throw new Error(`Node with id "${c.id}" not found`);
1502
1505
  if (c.parentId !== null && (c.parentId === c.id || S(c.parentId, c.id)))
1503
1506
  throw new Error(`Node with id "${c.id}" cannot move under itself or its descendant "${c.parentId}"`);
1504
- const _ = new Map(d.childrenMap), B = _.get(y.parentId);
1507
+ const _ = new Map(d.childrenMap), B = _.get(I.parentId);
1505
1508
  if (B) {
1506
- const Q = B.filter((nt) => nt.id !== c.id);
1507
- _.set(y.parentId, Q);
1509
+ const Q = B.filter((rt) => rt.id !== c.id);
1510
+ _.set(I.parentId, Q);
1508
1511
  }
1509
1512
  const R = [..._.get(c.parentId) ?? []], G = c.position ?? R.length;
1510
- y.parentId = c.parentId, y.parent = c.parentId === null ? null : d.nodeMap.get(c.parentId) ?? null, R.splice(G, 0, y), _.set(c.parentId, R);
1513
+ I.parentId = c.parentId, I.parent = c.parentId === null ? null : d.nodeMap.get(c.parentId) ?? null, R.splice(G, 0, I), _.set(c.parentId, R);
1511
1514
  for (const Q of d.nodeMap.values())
1512
1515
  Q.children = _.get(Q.id) ?? [];
1513
1516
  t.setState({
@@ -1516,7 +1519,7 @@ function Br(e) {
1516
1519
  });
1517
1520
  }
1518
1521
  function N(c) {
1519
- const d = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map();
1522
+ const d = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new Map();
1520
1523
  if (e.childrenKey)
1521
1524
  for (const [_, B, R] of D(c)) {
1522
1525
  const G = L(_, B, R);
@@ -1528,26 +1531,26 @@ function Br(e) {
1528
1531
  d.set(G.id, G);
1529
1532
  }
1530
1533
  for (const _ of d.values())
1531
- y.set(_.parentId, [...y.get(_.parentId) ?? [], _]);
1534
+ I.set(_.parentId, [...I.get(_.parentId) ?? [], _]);
1532
1535
  for (const _ of d.values())
1533
- _.parent = _.parentId === null ? null : d.get(_.parentId) ?? null, _.children = y.get(_.id) ?? [];
1536
+ _.parent = _.parentId === null ? null : d.get(_.parentId) ?? null, _.children = I.get(_.id) ?? [];
1534
1537
  t.setState({
1535
1538
  nodeMap: d,
1536
- childrenMap: y
1539
+ childrenMap: I
1537
1540
  });
1538
1541
  }
1539
1542
  function* D(c, d = null) {
1540
- for (const y of c) {
1541
- const _ = M(y);
1542
- yield [_, d, y], yield* D(x(y), _);
1543
+ for (const I of c) {
1544
+ const _ = M(I);
1545
+ yield [_, d, I], yield* D(A(I), _);
1543
1546
  }
1544
1547
  }
1545
- function L(c, d, y) {
1548
+ function L(c, d, I) {
1546
1549
  return {
1547
1550
  id: c,
1548
- item: y,
1551
+ item: I,
1549
1552
  parentId: d,
1550
- isLeaf: e.isLeaf ? e.isLeaf(y) : !1,
1553
+ isLeaf: e.isLeaf ? e.isLeaf(I) : !1,
1551
1554
  parent: null,
1552
1555
  // Will be set later
1553
1556
  children: []
@@ -1562,7 +1565,7 @@ function Br(e) {
1562
1565
  throw new Error(`Key "${d}" not found in item ${JSON.stringify(c)}`);
1563
1566
  return c[d];
1564
1567
  }
1565
- function x(c) {
1568
+ function A(c) {
1566
1569
  return e.childrenKey ? typeof e.childrenKey == "function" ? (e.childrenKey(c) ?? []).filter((d) => d != null) : (c[e.childrenKey] ?? []).filter((d) => d != null) : [];
1567
1570
  }
1568
1571
  function V(c) {
@@ -1574,38 +1577,38 @@ function Br(e) {
1574
1577
  return d.has(c);
1575
1578
  }
1576
1579
  function q(c) {
1577
- const { nodeMap: d } = t.getState(), y = d.get(c);
1578
- if (!y)
1580
+ const { nodeMap: d } = t.getState(), I = d.get(c);
1581
+ if (!I)
1579
1582
  throw new Error(`Node with id "${c}" not found`);
1580
- return y;
1583
+ return I;
1581
1584
  }
1582
- function Ye(c) {
1585
+ function Ze(c) {
1583
1586
  const d = q(c);
1584
- return H(d.parentId).findIndex((y) => y.id === c);
1587
+ return H(d.parentId).findIndex((I) => I.id === c);
1585
1588
  }
1586
1589
  function ge(c) {
1587
- const d = q(c), y = [];
1590
+ const d = q(c), I = [];
1588
1591
  let _ = d;
1589
1592
  for (; _; )
1590
- y.unshift(_), _ = _.parent;
1591
- return y;
1593
+ I.unshift(_), _ = _.parent;
1594
+ return I;
1592
1595
  }
1593
1596
  function Se(c) {
1594
1597
  return ge(c).length;
1595
1598
  }
1596
- function Ze(c) {
1599
+ function et(c) {
1597
1600
  const d = C(c);
1598
1601
  return d ? H(d.parentId).length : 1;
1599
1602
  }
1600
- function et(c) {
1603
+ function tt(c) {
1601
1604
  const d = C(c);
1602
- return d ? H(d.parentId).findIndex((y) => y.id === c) + 1 : 1;
1605
+ return d ? H(d.parentId).findIndex((I) => I.id === c) + 1 : 1;
1603
1606
  }
1604
1607
  function H(c) {
1605
1608
  const { childrenMap: d } = t.getState();
1606
1609
  return d.get(c) ?? [];
1607
1610
  }
1608
- function tt(c) {
1611
+ function nt(c) {
1609
1612
  for (const d of ve())
1610
1613
  c(d);
1611
1614
  }
@@ -1617,19 +1620,19 @@ function Br(e) {
1617
1620
  }
1618
1621
  }
1619
1622
  }
1620
- function No(e) {
1621
- const [t] = T(() => Br(e));
1623
+ function Ao(e) {
1624
+ const [t] = T(() => jr(e));
1622
1625
  return t;
1623
1626
  }
1624
1627
  export {
1625
- So as DataGridFiltersPlugin,
1626
- Br as createDataGridTreeStructure,
1627
- yo as filterCheckboxGroup,
1628
- _o as filterDateRange,
1629
- vo as filterSearch,
1630
- Io as filterTagGroup,
1631
- Co as filterToggle,
1632
- bo as filterTree,
1633
- No as useDataGridTreeStructure
1628
+ Co as DataGridFiltersPlugin,
1629
+ jr as createDataGridTreeStructure,
1630
+ bo as filterCheckboxGroup,
1631
+ wo as filterDateRange,
1632
+ yo as filterSearch,
1633
+ _o as filterTagGroup,
1634
+ Io as filterToggle,
1635
+ No as filterTree,
1636
+ Ao as useDataGridTreeStructure
1634
1637
  };
1635
1638
  //# sourceMappingURL=filters.js.map