@gears-frontx/ui-kit 0.4.6 → 0.4.9

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