@sito/dashboard 0.0.74 → 0.0.76

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 (72) hide show
  1. package/dist/Badge-DSSlox-y.cjs +1 -0
  2. package/dist/Badge-DW9i2Rh6.js +10 -0
  3. package/dist/Badge.cjs +1 -1
  4. package/dist/Badge.js +1 -1
  5. package/dist/Button-BxyXUUMe.cjs +1 -0
  6. package/dist/Button-C6icqzyN.js +25 -0
  7. package/dist/Button.cjs +1 -1
  8. package/dist/Button.js +1 -1
  9. package/dist/Chip-6bEZ7uwv.js +43 -0
  10. package/dist/Chip-N4r2Xf9l.cjs +1 -0
  11. package/dist/Chip.cjs +1 -1
  12. package/dist/Chip.js +1 -1
  13. package/dist/FileInput-C7ZYKt_i.js +100 -0
  14. package/dist/FileInput-Cz2R3z3k.cjs +1 -0
  15. package/dist/Form.cjs +1 -1
  16. package/dist/Form.js +2 -2
  17. package/dist/{IconButton-BpsTEj0z.js → IconButton-CqPk_OXG.js} +9 -8
  18. package/dist/IconButton-DVZCHIHB.cjs +1 -0
  19. package/dist/IconButton.cjs +1 -1
  20. package/dist/IconButton.css +1 -1
  21. package/dist/IconButton.js +1 -1
  22. package/dist/Loading-BTwXNOEv.js +27 -0
  23. package/dist/Loading-C70yH2dC.cjs +1 -0
  24. package/dist/Loading.cjs +1 -1
  25. package/dist/Loading.js +1 -1
  26. package/dist/SelectInput-BKFTGaAm.js +569 -0
  27. package/dist/SelectInput-C4wtTiHe.cjs +1 -0
  28. package/dist/SelectInput.css +1 -1
  29. package/dist/Table-BofsZtu9.cjs +1 -0
  30. package/dist/{Table-DO7FFraQ.js → Table-Mx5SOKp_.js} +311 -281
  31. package/dist/Table.cjs +1 -1
  32. package/dist/Table.js +1 -1
  33. package/dist/Tooltip-B7LXJBLs.cjs +1 -0
  34. package/dist/Tooltip-p-nQtZ5Y.js +38 -0
  35. package/dist/Tooltip.cjs +1 -1
  36. package/dist/Tooltip.js +1 -1
  37. package/dist/Translation.cjs +1 -1
  38. package/dist/Translation.js +1 -1
  39. package/dist/TranslationProvider-BmV4WUQy.cjs +1 -0
  40. package/dist/TranslationProvider-DNybGe-x.js +19 -0
  41. package/dist/classNames-DDRjbGA1.js +20 -0
  42. package/dist/classNames-DHAzUjfZ.cjs +1 -0
  43. package/dist/index.cjs +1 -1
  44. package/dist/index.css +1 -1
  45. package/dist/index.js +76 -74
  46. package/dist/lib/classNames.d.ts +7 -0
  47. package/dist/lib/index.d.ts +1 -0
  48. package/dist/lib.cjs +1 -1
  49. package/dist/lib.js +4 -2
  50. package/dist/providers/FiltersProvider/FiltersProvider.d.ts +1 -1
  51. package/dist/providers/TableOptions/TableOptionsProvider.d.ts +3 -3
  52. package/dist/providers/Translation/TranslationProvider.d.ts +2 -6
  53. package/dist/providers/Translation/types.d.ts +4 -0
  54. package/package.json +1 -1
  55. package/dist/Badge-CIeYthEy.js +0 -9
  56. package/dist/Badge-Z78MlGoQ.cjs +0 -1
  57. package/dist/Button-BlYa3uPc.cjs +0 -1
  58. package/dist/Button-D73-swfo.js +0 -24
  59. package/dist/Chip-C5ogKbFn.js +0 -37
  60. package/dist/Chip-D17UJHW6.cjs +0 -1
  61. package/dist/FileInput-CqzVk1gQ.cjs +0 -1
  62. package/dist/FileInput-Cr4TxWUg.js +0 -93
  63. package/dist/IconButton-CVnmT2E9.cjs +0 -1
  64. package/dist/Loading-B_c_4XLr.js +0 -26
  65. package/dist/Loading-CNECRan-.cjs +0 -1
  66. package/dist/SelectInput-Dm7gv03Z.js +0 -521
  67. package/dist/SelectInput-dYjrdopP.cjs +0 -1
  68. package/dist/Table-C03frnWb.cjs +0 -1
  69. package/dist/Tooltip-B4E-FRwY.js +0 -37
  70. package/dist/Tooltip-BSKAgRkc.cjs +0 -1
  71. package/dist/TranslationProvider-BR4s--Vu.js +0 -19
  72. package/dist/TranslationProvider-Czr0WIDH.cjs +0 -1
@@ -1,21 +1,22 @@
1
1
  import "./Table.css";
2
- import { jsxs as b, jsx as e, Fragment as q } from "react/jsx-runtime";
3
- import { useState as M, useRef as j, useEffect as I, useMemo as S, useCallback as x, Fragment as de } from "react";
4
- import { u as G, a as B, F as ue } from "./FiltersProvider-iOkSYSFZ.js";
5
- import { E as pe, c as le, C as ae, T as me, a as he, b as fe, B as be, F as ge } from "./TableColumns-CIddkosX.js";
6
- import { C as ie, A as Ne, S as ee, T as Y } from "./SelectInput-Dm7gv03Z.js";
7
- import { u as P } from "./TableOptionsProvider-Dzq4dOu8.js";
8
- import { u as O } from "./TranslationProvider-BR4s--Vu.js";
9
- import { I as H } from "./IconButton-BpsTEj0z.js";
10
- import { B as Ce } from "./Badge-CIeYthEy.js";
11
- import { FilterTypes as W } from "./lib.js";
12
- import { B as Z } from "./Button-D73-swfo.js";
13
- import { C as te } from "./Chip-C5ogKbFn.js";
14
- import { T as re } from "./Tooltip-B4E-FRwY.js";
15
- import { S as ye } from "./query-CwuehjY1.js";
16
- import { D as ve } from "./Dropdown-D-fYEGo2.js";
17
- import { L as we } from "./Loading-B_c_4XLr.js";
18
- function oe(n) {
2
+ import { jsxs as b, jsx as e, Fragment as G } from "react/jsx-runtime";
3
+ import { c as O } from "./classNames-DDRjbGA1.js";
4
+ import { useState as V, useRef as B, useEffect as j, useMemo as S, useCallback as x, Fragment as ue } from "react";
5
+ import { u as J, a as $, F as pe } from "./FiltersProvider-iOkSYSFZ.js";
6
+ import { E as me, c as ae, C as ie, T as he, a as fe, b as be, B as ge, F as Ne } from "./TableColumns-CIddkosX.js";
7
+ import { C as re, A as Ce, S as te, T as Z } from "./SelectInput-BKFTGaAm.js";
8
+ import { u as D } from "./TableOptionsProvider-Dzq4dOu8.js";
9
+ import { u as _ } from "./TranslationProvider-DNybGe-x.js";
10
+ import { I as U } from "./IconButton-CqPk_OXG.js";
11
+ import { B as ye } from "./Badge-DW9i2Rh6.js";
12
+ import { FilterTypes as q } from "./lib.js";
13
+ import { B as ee } from "./Button-C6icqzyN.js";
14
+ import { C as ne } from "./Chip-6bEZ7uwv.js";
15
+ import { T as oe } from "./Tooltip-p-nQtZ5Y.js";
16
+ import { S as ve } from "./query-CwuehjY1.js";
17
+ import { D as we } from "./Dropdown-D-fYEGo2.js";
18
+ import { L as xe } from "./Loading-BTwXNOEv.js";
19
+ function ce(n) {
19
20
  const {
20
21
  id: t,
21
22
  icon: a,
@@ -33,7 +34,11 @@ function oe(n) {
33
34
  {
34
35
  type: "button",
35
36
  id: t,
36
- className: `action ${c ? "text-action" : "icon-action"} ${p}`,
37
+ className: O(
38
+ "action",
39
+ c ? "text-action" : "icon-action",
40
+ p
41
+ ),
37
42
  disabled: o,
38
43
  "aria-label": s,
39
44
  onClick: (d) => {
@@ -51,7 +56,7 @@ function oe(n) {
51
56
  }
52
57
  );
53
58
  }
54
- function xe(n) {
59
+ function Se(n) {
55
60
  const {
56
61
  actions: t = [],
57
62
  className: a = "",
@@ -60,12 +65,12 @@ function xe(n) {
60
65
  showTooltips: i = !0,
61
66
  showActionTexts: u = !1
62
67
  } = n;
63
- return /* @__PURE__ */ e("ul", { className: `actions-container ${a}`, children: t.map((o) => /* @__PURE__ */ e(
68
+ return /* @__PURE__ */ e("ul", { className: O("actions-container", a), children: t.map((o) => /* @__PURE__ */ e(
64
69
  "li",
65
70
  {
66
- className: `actions-container-item ${s}`,
71
+ className: O("actions-container-item", s),
67
72
  children: /* @__PURE__ */ e(
68
- oe,
73
+ ce,
69
74
  {
70
75
  showTooltips: i,
71
76
  showText: u,
@@ -77,13 +82,13 @@ function xe(n) {
77
82
  o.id
78
83
  )) });
79
84
  }
80
- const Se = (n) => {
81
- const { actions: t = [], className: a = "" } = n, { t: s } = O(), [l, i] = M(!1), [u, o] = M(null);
82
- return /* @__PURE__ */ b("div", { className: `actions-dropdown ${a}`, children: [
85
+ const Re = (n) => {
86
+ const { actions: t = [], className: a = "" } = n, { t: s } = _(), [l, i] = V(!1), [u, o] = V(null);
87
+ return /* @__PURE__ */ b("div", { className: O("actions-dropdown", a), children: [
83
88
  /* @__PURE__ */ e(
84
- H,
89
+ U,
85
90
  {
86
- icon: /* @__PURE__ */ e(pe, {}),
91
+ icon: /* @__PURE__ */ e(me, {}),
87
92
  onClick: (c) => {
88
93
  c.stopPropagation(), o(c.currentTarget), i((r) => !r);
89
94
  },
@@ -96,13 +101,13 @@ const Se = (n) => {
96
101
  }
97
102
  ),
98
103
  /* @__PURE__ */ e(
99
- ve,
104
+ we,
100
105
  {
101
106
  open: l,
102
107
  onClose: () => i(!1),
103
108
  anchorEl: u,
104
109
  children: /* @__PURE__ */ e(
105
- xe,
110
+ Se,
106
111
  {
107
112
  showActionTexts: !0,
108
113
  actions: t,
@@ -116,24 +121,24 @@ const Se = (n) => {
116
121
  )
117
122
  ] });
118
123
  };
119
- function ne(n, t = []) {
124
+ function se(n, t = []) {
120
125
  return [...n].sort((a, s) => (s.pos ?? 0) - (a.pos ?? 0)).filter(
121
126
  (a) => a.display !== "none" && !t.includes(a.key)
122
127
  );
123
128
  }
124
- function Re(n) {
125
- const { t } = O(), {
129
+ function Te(n) {
130
+ const { t } = _(), {
126
131
  entity: a = "",
127
132
  columns: s = [],
128
133
  hasAction: l = !0,
129
134
  onSortCallback: i,
130
135
  selectionState: u,
131
136
  onToggleAllRows: o
132
- } = n, c = j(null);
133
- I(() => {
137
+ } = n, c = B(null);
138
+ j(() => {
134
139
  c.current && (c.current.indeterminate = !!(u?.hasSomeSelected && !u?.allSelected));
135
140
  }, [u]);
136
- const { onSort: r, sortingOrder: p, sortingBy: d, hiddenColumns: y } = P(), f = S(() => ne(s, y).map((h) => ({
141
+ const { onSort: r, sortingOrder: p, sortingBy: d, hiddenColumns: y } = D(), f = S(() => se(s, y).map((h) => ({
137
142
  id: h.key,
138
143
  label: h.label,
139
144
  renderHead: h.renderHead,
@@ -157,22 +162,22 @@ function Re(n) {
157
162
  "th",
158
163
  {
159
164
  scope: "col",
160
- className: `table-headers-column ${h.className}`,
165
+ className: O("table-headers-column", h.className),
161
166
  children: /* @__PURE__ */ b(
162
- Z,
167
+ ee,
163
168
  {
164
169
  disabled: !h.sortable,
165
170
  onClick: () => r(h.id, i),
166
171
  className: "table-headers-cell",
167
172
  children: [
168
173
  h.renderHead ? h.renderHead() : /* @__PURE__ */ e("span", { className: "table-headers-label", children: h.label }),
169
- h.sortable && d === h.id && /* @__PURE__ */ e("span", { children: p === ye.ASC ? h.sortOptions?.icons?.asc ?? /* @__PURE__ */ e(
170
- le,
174
+ h.sortable && d === h.id && /* @__PURE__ */ e("span", { children: p === ve.ASC ? h.sortOptions?.icons?.asc ?? /* @__PURE__ */ e(
175
+ ae,
171
176
  {
172
177
  className: h.sortOptions?.icons?.className ?? "table-headers-sort-indicator"
173
178
  }
174
179
  ) : h.sortOptions?.icons?.desc ?? /* @__PURE__ */ e(
175
- ae,
180
+ ie,
176
181
  {
177
182
  className: h.sortOptions?.icons?.className ?? "table-headers-sort-indicator"
178
183
  }
@@ -185,9 +190,9 @@ function Re(n) {
185
190
  ))
186
191
  ] }) });
187
192
  }
188
- function Te(n) {
189
- const { columns: t } = n, { hiddenColumns: a, toggleColumn: s } = P(), { t: l } = O(), [i, u] = M(!1), o = j(null), c = S(
190
- () => ne(
193
+ function ke(n) {
194
+ const { columns: t } = n, { hiddenColumns: a, toggleColumn: s } = D(), { t: l } = _(), [i, u] = V(!1), o = B(null), c = S(
195
+ () => se(
191
196
  t.filter(
192
197
  (d) => d.hideable !== !1 && d.display !== "none"
193
198
  ),
@@ -204,9 +209,9 @@ function Te(n) {
204
209
  );
205
210
  return c.length === 0 ? null : /* @__PURE__ */ b("div", { className: "column-visibility-menu", ref: o, children: [
206
211
  /* @__PURE__ */ e(
207
- H,
212
+ U,
208
213
  {
209
- icon: /* @__PURE__ */ e(me, { className: "column-visibility-icon" }),
214
+ icon: /* @__PURE__ */ e(he, { className: "column-visibility-icon" }),
210
215
  className: "normal column-visibility-trigger",
211
216
  "aria-haspopup": "true",
212
217
  "aria-expanded": i,
@@ -214,7 +219,7 @@ function Te(n) {
214
219
  children: /* @__PURE__ */ e("span", { className: "table-header-sr", children: l("_accessibility:buttons.columns") })
215
220
  }
216
221
  ),
217
- i && /* @__PURE__ */ b(q, { children: [
222
+ i && /* @__PURE__ */ b(G, { children: [
218
223
  /* @__PURE__ */ e(
219
224
  "div",
220
225
  {
@@ -223,7 +228,7 @@ function Te(n) {
223
228
  }
224
229
  ),
225
230
  /* @__PURE__ */ e("div", { className: "column-visibility-dropdown", role: "menu", children: c.map((d) => /* @__PURE__ */ e(
226
- ie,
231
+ re,
227
232
  {
228
233
  checked: !a.includes(d.key),
229
234
  onChange: () => p(d.key),
@@ -235,35 +240,35 @@ function Te(n) {
235
240
  ] })
236
241
  ] });
237
242
  }
238
- const ke = (n) => {
243
+ const Ae = (n) => {
239
244
  const { items: t, text: a, id: s, onClearFilter: l } = n;
240
245
  return /* @__PURE__ */ e(
241
- te,
246
+ ne,
242
247
  {
243
248
  text: `${a}: ${t.map((i) => i.value ?? i.name).join(", ")}`,
244
249
  onDelete: () => l(s)
245
250
  }
246
251
  );
247
- }, Ae = (n) => {
252
+ }, Ee = (n) => {
248
253
  const { end: t, start: a, text: s, id: l, onClearFilter: i } = n, u = (o) => o !== null && typeof o < "u" && o !== "";
249
254
  return /* @__PURE__ */ e(
250
- te,
255
+ ne,
251
256
  {
252
257
  text: `${s}: ${u(a) ? a : "♾️"} - ${u(t) ? t : "♾️"}`,
253
258
  onDelete: () => i(l)
254
259
  }
255
260
  );
256
- }, Ee = (n) => typeof n == "object" && n !== null && !Array.isArray(n) && ("start" in n || "end" in n), Fe = (n) => {
261
+ }, Fe = (n) => typeof n == "object" && n !== null && !Array.isArray(n) && ("start" in n || "end" in n), Oe = (n) => {
257
262
  const { filtersDefinition: t } = n, a = S(() => {
258
263
  const o = {};
259
264
  return t.forEach((c) => {
260
265
  o[c.propertyName] = c.label ?? c.propertyName;
261
266
  }), o;
262
- }, [t]), { filters: s, clearFilters: l } = P(), i = S(() => Object.keys(s), [s]), u = x(
267
+ }, [t]), { filters: s, clearFilters: l } = D(), i = S(() => Object.keys(s), [s]), u = x(
263
268
  (o) => {
264
269
  const c = s[o];
265
- return Ee(c) ? /* @__PURE__ */ e(
266
- Ae,
270
+ return Fe(c) ? /* @__PURE__ */ e(
271
+ Ee,
267
272
  {
268
273
  id: o,
269
274
  text: a[o],
@@ -272,7 +277,7 @@ const ke = (n) => {
272
277
  onClearFilter: l
273
278
  }
274
279
  ) : Array.isArray(c) ? /* @__PURE__ */ e(
275
- ke,
280
+ Ae,
276
281
  {
277
282
  id: o,
278
283
  text: a[o],
@@ -280,7 +285,7 @@ const ke = (n) => {
280
285
  onClearFilter: l
281
286
  }
282
287
  ) : /* @__PURE__ */ e(
283
- te,
288
+ ne,
284
289
  {
285
290
  text: `${a[o]}: ${c?.value ?? c?.name ?? c}`,
286
291
  onDelete: () => l(o)
@@ -291,14 +296,14 @@ const ke = (n) => {
291
296
  );
292
297
  return /* @__PURE__ */ e("ul", { className: "active-filters-main", children: i?.map((o) => /* @__PURE__ */ e("li", { children: u(o) }, o)) });
293
298
  };
294
- function Oe(n) {
295
- const { propertyName: t, label: a, placeholder: s, options: l, multiple: i = !0 } = n, { currentFilters: u, setCurrentFilters: o } = G(), c = S(() => {
299
+ function _e(n) {
300
+ const { propertyName: t, label: a, placeholder: s, options: l, multiple: i = !0 } = n, { currentFilters: u, setCurrentFilters: o } = J(), c = S(() => {
296
301
  const p = u[t]?.value;
297
302
  return typeof p > "u" ? null : p;
298
303
  }, [u, t]), r = x(
299
304
  (p) => {
300
305
  o({
301
- type: B.update,
306
+ type: $.update,
302
307
  toUpdate: {
303
308
  [t]: {
304
309
  value: p
@@ -309,7 +314,7 @@ function Oe(n) {
309
314
  [t, o]
310
315
  );
311
316
  return /* @__PURE__ */ e(
312
- Ne,
317
+ Ce,
313
318
  {
314
319
  value: c,
315
320
  label: a,
@@ -322,17 +327,17 @@ function Oe(n) {
322
327
  }
323
328
  );
324
329
  }
325
- const _e = (n) => {
326
- const { propertyName: t, label: a } = n, { currentFilters: s, setCurrentFilters: l } = G(), i = S(() => s[t]?.value ?? "", [s]), u = x((o) => {
330
+ const Me = (n) => {
331
+ const { propertyName: t, label: a } = n, { currentFilters: s, setCurrentFilters: l } = J(), i = S(() => s[t]?.value ?? "", [s]), u = x((o) => {
327
332
  l({
328
- type: B.update,
333
+ type: $.update,
329
334
  toUpdate: { [t]: { value: o.target.checked } }
330
335
  });
331
336
  }, []);
332
- return /* @__PURE__ */ e(ie, { label: a, checked: i ?? !1, onChange: u });
337
+ return /* @__PURE__ */ e(re, { label: a, checked: i ?? !1, onChange: u });
333
338
  };
334
- function $e(n) {
335
- const { propertyName: t, options: a, label: s, placeholder: l } = n, { currentFilters: i, setCurrentFilters: u } = G(), o = S(() => {
339
+ function Pe(n) {
340
+ const { propertyName: t, options: a, label: s, placeholder: l } = n, { currentFilters: i, setCurrentFilters: u } = J(), o = S(() => {
336
341
  const r = i[t]?.value;
337
342
  if (r === null || typeof r > "u")
338
343
  return a[0]?.id ?? "";
@@ -347,7 +352,7 @@ function $e(n) {
347
352
  (d) => String(d.id) === r.target.value
348
353
  );
349
354
  u({
350
- type: B.update,
355
+ type: $.update,
351
356
  toUpdate: {
352
357
  [t]: { value: p?.id ?? r.target.value }
353
358
  }
@@ -356,7 +361,7 @@ function $e(n) {
356
361
  [a, t, u]
357
362
  );
358
363
  return /* @__PURE__ */ e(
359
- ee,
364
+ te,
360
365
  {
361
366
  value: o,
362
367
  label: s,
@@ -368,15 +373,15 @@ function $e(n) {
368
373
  }
369
374
  );
370
375
  }
371
- const Me = (n) => {
372
- const { propertyName: t, label: a, placeholder: s } = n, { currentFilters: l, setCurrentFilters: i } = G(), u = S(() => l[t]?.value ?? "", [l]), o = x((c) => {
376
+ const Ve = (n) => {
377
+ const { propertyName: t, label: a, placeholder: s } = n, { currentFilters: l, setCurrentFilters: i } = J(), u = S(() => l[t]?.value ?? "", [l]), o = x((c) => {
373
378
  i({
374
- type: B.update,
379
+ type: $.update,
375
380
  toUpdate: { [t]: { value: c.target.value } }
376
381
  });
377
382
  }, []);
378
383
  return /* @__PURE__ */ e(
379
- Y,
384
+ Z,
380
385
  {
381
386
  value: u ?? "",
382
387
  label: a,
@@ -386,10 +391,10 @@ const Me = (n) => {
386
391
  placeholder: s
387
392
  }
388
393
  );
389
- }, se = (n) => {
390
- const { propertyName: t, label: a, inputType: s } = n, { t: l } = O(), { currentFilters: i, setCurrentFilters: u } = G(), o = j(null), c = j(null), r = x((d) => {
394
+ }, le = (n) => {
395
+ const { propertyName: t, label: a, inputType: s } = n, { t: l } = _(), { currentFilters: i, setCurrentFilters: u } = J(), o = B(null), c = B(null), r = x((d) => {
391
396
  u({
392
- type: B.update,
397
+ type: $.update,
393
398
  toUpdate: {
394
399
  [t]: {
395
400
  value: { end: c?.current?.value ?? null, start: d.target.value }
@@ -398,7 +403,7 @@ const Me = (n) => {
398
403
  });
399
404
  }, []), p = x((d) => {
400
405
  u({
401
- type: B.update,
406
+ type: $.update,
402
407
  toUpdate: {
403
408
  [t]: {
404
409
  value: {
@@ -413,7 +418,7 @@ const Me = (n) => {
413
418
  /* @__PURE__ */ e("p", { className: "text-input-label input-widget-label input-label-normal", children: a }),
414
419
  /* @__PURE__ */ b("div", { className: "range-widget-row", children: [
415
420
  /* @__PURE__ */ e(
416
- Y,
421
+ Z,
417
422
  {
418
423
  value: i[t]?.value?.start ?? "",
419
424
  placeholder: l("_accessibility:components.table.filters.range.start"),
@@ -425,7 +430,7 @@ const Me = (n) => {
425
430
  }
426
431
  ),
427
432
  /* @__PURE__ */ e(
428
- Y,
433
+ Z,
429
434
  {
430
435
  value: i[t]?.value?.end ?? "",
431
436
  placeholder: l("_accessibility:components.table.filters.range.end"),
@@ -438,37 +443,37 @@ const Me = (n) => {
438
443
  )
439
444
  ] })
440
445
  ] });
441
- }, Pe = (n) => {
446
+ }, De = (n) => {
442
447
  switch (n.type) {
443
- case W.text:
444
- return /* @__PURE__ */ e(Me, { ...n });
445
- case W.number:
448
+ case q.text:
449
+ return /* @__PURE__ */ e(Ve, { ...n });
450
+ case q.number:
446
451
  return /* @__PURE__ */ e(
447
- se,
452
+ le,
448
453
  {
449
454
  ...n,
450
455
  inputType: "number"
451
456
  }
452
457
  );
453
- case W.date:
458
+ case q.date:
454
459
  return /* @__PURE__ */ e(
455
- se,
460
+ le,
456
461
  {
457
462
  ...n,
458
463
  inputType: "date"
459
464
  }
460
465
  );
461
- case W.select:
462
- return /* @__PURE__ */ e($e, { ...n });
463
- case W.autocomplete:
464
- return /* @__PURE__ */ e(Oe, { ...n });
465
- case W.check:
466
+ case q.select:
467
+ return /* @__PURE__ */ e(Pe, { ...n });
468
+ case q.autocomplete:
466
469
  return /* @__PURE__ */ e(_e, { ...n });
470
+ case q.check:
471
+ return /* @__PURE__ */ e(Me, { ...n });
467
472
  }
468
- return /* @__PURE__ */ e(q, {});
469
- }, Ve = (n) => {
470
- const { filters: t = [], show: a, handleShow: s } = n, { onFilterApply: l } = P(), { currentFilters: i, setCurrentFilters: u } = G(), { t: o } = O(), c = j(null);
471
- return I(() => {
473
+ return /* @__PURE__ */ e(G, {});
474
+ }, Ie = (n) => {
475
+ const { filters: t = [], show: a, handleShow: s } = n, { onFilterApply: l } = D(), { currentFilters: i, setCurrentFilters: u } = J(), { t: o } = _(), c = B(null);
476
+ return j(() => {
472
477
  const r = ({ target: d }) => {
473
478
  c.current && (d?.closest(".filter-dropdown-trigger") || !a || c.current.contains(d) || s(!1));
474
479
  }, p = ({ code: d }) => {
@@ -477,42 +482,51 @@ const Me = (n) => {
477
482
  return document.addEventListener("click", r), document.addEventListener("keydown", p), () => {
478
483
  document.removeEventListener("click", r), document.removeEventListener("keydown", p);
479
484
  };
480
- }, [s, a]), /* @__PURE__ */ e("div", { className: `filter-dropdown-backdrop ${a ? "opened" : "closed"}`, children: /* @__PURE__ */ b("div", { className: "filter-popup", ref: c, children: [
481
- /* @__PURE__ */ e("div", { className: "filter-title", children: o("_accessibility:buttons.filters") }),
482
- /* @__PURE__ */ e("ul", { className: "filter-container", children: t.map((r) => /* @__PURE__ */ e("li", { className: "filter-container-item", children: Pe(r) }, r.propertyName)) }),
483
- /* @__PURE__ */ e("div", { className: "filter-footer", children: /* @__PURE__ */ b("ul", { className: "filter-buttons-row", children: [
484
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
485
- Z,
486
- {
487
- type: "button",
488
- variant: "submit",
489
- onClick: () => u({
490
- type: B.reset,
491
- filters: t
492
- }),
493
- className: "filter-dropdown-button filter-dropdown-cancel",
494
- children: o("_accessibility:buttons.clear")
495
- }
496
- ) }),
497
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
498
- Z,
499
- {
500
- type: "button",
501
- variant: "submit",
502
- color: "primary",
503
- className: "filter-dropdown-button filter-dropdown-submit",
504
- onClick: () => {
505
- s(!1), l(i);
506
- },
507
- children: o("_accessibility:buttons.applyFilters")
508
- }
509
- ) })
510
- ] }) })
511
- ] }) });
512
- }, De = () => {
513
- const { t: n } = O(), { total: t, pageSize: a, pageSizes: s, currentPage: l } = P(), i = (l + 1) * a > t ? t : (l + 1) * a;
485
+ }, [s, a]), /* @__PURE__ */ e(
486
+ "div",
487
+ {
488
+ className: O(
489
+ "filter-dropdown-backdrop",
490
+ a ? "opened" : "closed"
491
+ ),
492
+ children: /* @__PURE__ */ b("div", { className: "filter-popup", ref: c, children: [
493
+ /* @__PURE__ */ e("div", { className: "filter-title", children: o("_accessibility:buttons.filters") }),
494
+ /* @__PURE__ */ e("ul", { className: "filter-container", children: t.map((r) => /* @__PURE__ */ e("li", { className: "filter-container-item", children: De(r) }, r.propertyName)) }),
495
+ /* @__PURE__ */ e("div", { className: "filter-footer", children: /* @__PURE__ */ b("ul", { className: "filter-buttons-row", children: [
496
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
497
+ ee,
498
+ {
499
+ type: "button",
500
+ variant: "submit",
501
+ onClick: () => u({
502
+ type: $.reset,
503
+ filters: t
504
+ }),
505
+ className: "filter-dropdown-button filter-dropdown-cancel",
506
+ children: o("_accessibility:buttons.clear")
507
+ }
508
+ ) }),
509
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
510
+ ee,
511
+ {
512
+ type: "button",
513
+ variant: "submit",
514
+ color: "primary",
515
+ className: "filter-dropdown-button filter-dropdown-submit",
516
+ onClick: () => {
517
+ s(!1), l(i);
518
+ },
519
+ children: o("_accessibility:buttons.applyFilters")
520
+ }
521
+ ) })
522
+ ] }) })
523
+ ] })
524
+ }
525
+ );
526
+ }, ze = () => {
527
+ const { t: n } = _(), { total: t, pageSize: a, pageSizes: s, currentPage: l } = D(), i = (l + 1) * a > t ? t : (l + 1) * a;
514
528
  return /* @__PURE__ */ b("div", { className: "table-navigation-sizes", children: [
515
- s[0] < t && /* @__PURE__ */ e(q, { children: /* @__PURE__ */ b("p", { children: [
529
+ s[0] < t && /* @__PURE__ */ e(G, { children: /* @__PURE__ */ b("p", { children: [
516
530
  l * a + 1,
517
531
  " - ",
518
532
  i,
@@ -522,8 +536,8 @@ const Me = (n) => {
522
536
  /* @__PURE__ */ e("p", { children: t })
523
537
  ] });
524
538
  };
525
- function Ie() {
526
- const { t: n } = O(), { total: t, pageSize: a, currentPage: s, setCurrentPage: l } = P(), i = S(() => {
539
+ function je() {
540
+ const { t: n } = _(), { total: t, pageSize: a, currentPage: s, setCurrentPage: l } = D(), i = S(() => {
527
541
  const u = Math.ceil(t / a);
528
542
  return Array.from({ length: u }, (o, c) => ({
529
543
  id: c,
@@ -533,7 +547,7 @@ function Ie() {
533
547
  return /* @__PURE__ */ b("div", { className: "jump-to-page", children: [
534
548
  /* @__PURE__ */ e("p", { children: n("_accessibility:components.table.jumpToPage") }),
535
549
  /* @__PURE__ */ e(
536
- ee,
550
+ te,
537
551
  {
538
552
  value: s,
539
553
  options: i,
@@ -545,13 +559,13 @@ function Ie() {
545
559
  )
546
560
  ] });
547
561
  }
548
- const ze = () => {
549
- const { t: n } = O(), { total: t, pageSize: a, currentPage: s, setCurrentPage: l } = P(), i = Math.ceil(t / a), u = s < i - 1;
562
+ const Le = () => {
563
+ const { t: n } = _(), { total: t, pageSize: a, currentPage: s, setCurrentPage: l } = D(), i = Math.ceil(t / a), u = s < i - 1;
550
564
  return /* @__PURE__ */ b("div", { className: "table-navigation-pages", children: [
551
565
  /* @__PURE__ */ e(
552
- H,
566
+ U,
553
567
  {
554
- icon: /* @__PURE__ */ e(he, { className: "table-navigation-icon" }),
568
+ icon: /* @__PURE__ */ e(fe, { className: "table-navigation-icon" }),
555
569
  className: "table-navigation-buttons",
556
570
  disabled: s === 0,
557
571
  "aria-label": n("_accessibility:buttons.previous"),
@@ -560,9 +574,9 @@ const ze = () => {
560
574
  }
561
575
  ),
562
576
  /* @__PURE__ */ e(
563
- H,
577
+ U,
564
578
  {
565
- icon: /* @__PURE__ */ e(fe, { className: "table-navigation-icon" }),
579
+ icon: /* @__PURE__ */ e(be, { className: "table-navigation-icon" }),
566
580
  disabled: !u,
567
581
  className: "table-navigation-buttons",
568
582
  name: n("_accessibility:buttons.next"),
@@ -574,15 +588,15 @@ const ze = () => {
574
588
  )
575
589
  ] });
576
590
  };
577
- function je() {
578
- const { t: n } = O(), { pageSizes: t, pageSize: a, setPageSize: s } = P(), l = S(
591
+ function Be() {
592
+ const { t: n } = _(), { pageSizes: t, pageSize: a, setPageSize: s } = D(), l = S(
579
593
  () => t?.map((i) => ({ id: i, value: i })),
580
594
  [t]
581
595
  );
582
596
  return /* @__PURE__ */ b("div", { className: "page-size", children: [
583
597
  /* @__PURE__ */ e("p", { children: n("_accessibility:components.table.pageSizes") }),
584
598
  /* @__PURE__ */ e(
585
- ee,
599
+ te,
586
600
  {
587
601
  value: a,
588
602
  options: l,
@@ -594,16 +608,16 @@ function je() {
594
608
  )
595
609
  ] });
596
610
  }
597
- function Le() {
611
+ function He() {
598
612
  return /* @__PURE__ */ b("div", { className: "table-footer", children: [
599
- /* @__PURE__ */ e(Ie, {}),
600
613
  /* @__PURE__ */ e(je, {}),
601
- /* @__PURE__ */ e(De, {}),
602
- /* @__PURE__ */ e(ze, {})
614
+ /* @__PURE__ */ e(Be, {}),
615
+ /* @__PURE__ */ e(ze, {}),
616
+ /* @__PURE__ */ e(Le, {})
603
617
  ] });
604
618
  }
605
- const Be = (n) => n, He = (n) => {
606
- const { t } = O(), { hiddenColumns: a } = P(), {
619
+ const $e = (n) => n, Ue = (n) => {
620
+ const { t } = _(), { hiddenColumns: a } = D(), {
607
621
  columns: s,
608
622
  softDeleteProperty: l = "deletedAt",
609
623
  data: i,
@@ -613,7 +627,7 @@ const Be = (n) => n, He = (n) => {
613
627
  onRowSelectionChange: r,
614
628
  onRowExpand: p
615
629
  } = n, d = S(
616
- () => ne(s, a),
630
+ () => se(s, a),
617
631
  [s, a]
618
632
  ), y = S(
619
633
  () => new Map(
@@ -622,12 +636,18 @@ const Be = (n) => n, He = (n) => {
622
636
  [c]
623
637
  );
624
638
  return i?.map((f) => {
625
- const h = o.has(f.id), w = y.get(f.id), E = !!w, V = d.length + 1 + (u ? 1 : 0);
626
- return /* @__PURE__ */ b(de, { children: [
639
+ const h = o.has(f.id), w = y.get(f.id), E = !!w, I = d.length + 1 + (u ? 1 : 0);
640
+ return /* @__PURE__ */ b(ue, { children: [
627
641
  /* @__PURE__ */ b(
628
642
  "tr",
629
643
  {
630
- className: `table-row ${p ? "expandable" : ""} ${f[l] ? "deleted-class" : ""} ${h ? "selected" : ""} ${E ? "expanded" : ""}`,
644
+ className: O(
645
+ "table-row",
646
+ p ? "expandable" : "",
647
+ f[l] ? "deleted-class" : "",
648
+ h ? "selected" : "",
649
+ E ? "expanded" : ""
650
+ ),
631
651
  onClick: () => p?.(f),
632
652
  children: [
633
653
  /* @__PURE__ */ e("td", { className: "table-row-cell table-row-checkbox", children: /* @__PURE__ */ e(
@@ -648,24 +668,28 @@ const Be = (n) => n, He = (n) => {
648
668
  ), T = R.filter(
649
669
  (C) => !C.sticky
650
670
  );
651
- return /* @__PURE__ */ b(q, { children: [
652
- N.map((C) => /* @__PURE__ */ e(re, { content: C.tooltip, children: /* @__PURE__ */ e(
653
- oe,
671
+ return /* @__PURE__ */ b(G, { children: [
672
+ N.map((C) => /* @__PURE__ */ e(oe, { content: C.tooltip, children: /* @__PURE__ */ e(
673
+ ce,
654
674
  {
655
675
  ...C,
656
676
  onClick: () => C.onClick(f),
657
677
  className: "row-table-action"
658
678
  }
659
679
  ) }, C.id)),
660
- T.length > 0 && /* @__PURE__ */ e(Se, { actions: T })
680
+ T.length > 0 && /* @__PURE__ */ e(Re, { actions: T })
661
681
  ] });
662
682
  })() }) }) : null,
663
683
  d?.map((R, N) => {
664
- const T = f[R.key], C = R.renderBody ? R.renderBody(T, f) : Be(T);
684
+ const T = f[R.key], C = R.renderBody ? R.renderBody(T, f) : $e(T);
665
685
  return /* @__PURE__ */ e(
666
686
  "td",
667
687
  {
668
- className: `table-row-cell ${N === 0 ? "basic" : ""} ${R.className ?? ""}`,
688
+ className: O(
689
+ "table-row-cell",
690
+ N === 0 ? "basic" : "",
691
+ R.className ?? ""
692
+ ),
669
693
  children: p && N === 0 ? /* @__PURE__ */ b("div", { className: "table-row-expand-content", children: [
670
694
  /* @__PURE__ */ e(
671
695
  "span",
@@ -673,7 +697,7 @@ const Be = (n) => n, He = (n) => {
673
697
  className: "table-row-expand-indicator",
674
698
  "aria-hidden": !0,
675
699
  "data-state": E ? "expanded" : "collapsed",
676
- children: E ? /* @__PURE__ */ e(le, { className: "table-row-expand-chevron" }) : /* @__PURE__ */ e(ae, { className: "table-row-expand-chevron" })
700
+ children: E ? /* @__PURE__ */ e(ae, { className: "table-row-expand-chevron" }) : /* @__PURE__ */ e(ie, { className: "table-row-expand-chevron" })
677
701
  }
678
702
  ),
679
703
  /* @__PURE__ */ e("div", { className: "table-row-expand-value", children: C })
@@ -685,21 +709,24 @@ const Be = (n) => n, He = (n) => {
685
709
  ]
686
710
  }
687
711
  ),
688
- E && w?.content !== null && typeof w?.content < "u" && /* @__PURE__ */ e("tr", { className: "table-row-expanded", children: /* @__PURE__ */ e("td", { className: "table-row-expanded-cell", colSpan: V, children: /* @__PURE__ */ e(
712
+ E && w?.content !== null && typeof w?.content < "u" && /* @__PURE__ */ e("tr", { className: "table-row-expanded", children: /* @__PURE__ */ e("td", { className: "table-row-expanded-cell", colSpan: I, children: /* @__PURE__ */ e(
689
713
  "div",
690
714
  {
691
- className: `table-row-expanded-content ${w.isVisible ? "open" : "closed"}`,
715
+ className: O(
716
+ "table-row-expanded-content",
717
+ w.isVisible ? "open" : "closed"
718
+ ),
692
719
  children: /* @__PURE__ */ e("div", { className: "table-row-expanded-inner", children: w.content })
693
720
  }
694
721
  ) }) })
695
722
  ] }, f.id);
696
723
  });
697
724
  };
698
- function Ue() {
699
- const { t: n } = O();
725
+ function We() {
726
+ const { t: n } = _();
700
727
  return /* @__PURE__ */ e("div", { className: "table-empty", children: /* @__PURE__ */ e("p", { children: n("_accessibility:components.table.empty") }) });
701
728
  }
702
- const We = (n) => {
729
+ const qe = (n) => {
703
730
  const {
704
731
  columns: t,
705
732
  title: a,
@@ -708,11 +735,11 @@ const We = (n) => {
708
735
  filterOptions: i,
709
736
  canHideColumns: u = !1,
710
737
  canReset: o = !1
711
- } = n, { countOfFilters: c, resetTableOptions: r } = P(), { t: p } = O(), d = S(() => t ? [...t].sort((N, T) => (T.pos ?? 0) - (N.pos ?? 0)).filter((N) => !!N.filterOptions).map((N) => ({
738
+ } = n, { countOfFilters: c, resetTableOptions: r } = D(), { t: p } = _(), d = S(() => t ? [...t].sort((N, T) => (T.pos ?? 0) - (N.pos ?? 0)).filter((N) => !!N.filterOptions).map((N) => ({
712
739
  ...N.filterOptions,
713
740
  label: N.filterOptions?.label ?? N.label,
714
741
  propertyName: N.key
715
- })) : [], [t]), [y, f] = M(!1), h = x(
742
+ })) : [], [t]), [y, f] = V(!1), h = x(
716
743
  (N) => {
717
744
  i?.dropdown?.setOpened ? i.dropdown.setOpened(N ?? !1) : f(N ?? !1);
718
745
  },
@@ -720,40 +747,43 @@ const We = (n) => {
720
747
  ), w = S(
721
748
  () => i?.dropdown?.opened ?? y,
722
749
  [i, y]
723
- ), E = d.length > 0, V = E && i?.button?.hide !== !0, R = E && w;
750
+ ), E = d.length > 0, I = E && i?.button?.hide !== !0, R = E && w;
724
751
  return /* @__PURE__ */ b(
725
752
  "div",
726
753
  {
727
- className: `table-header ${R ? "showing-filters" : ""}`,
754
+ className: O(
755
+ "table-header",
756
+ R ? "showing-filters" : ""
757
+ ),
728
758
  children: [
729
759
  /* @__PURE__ */ b("div", { children: [
730
760
  a && /* @__PURE__ */ e("h1", { className: "table-header-title", children: a }),
731
761
  s ? null : /* @__PURE__ */ b("div", { className: "table-header-content", children: [
732
762
  l,
733
- u && t && /* @__PURE__ */ e(Te, { columns: t }),
763
+ u && t && /* @__PURE__ */ e(ke, { columns: t }),
734
764
  o && /* @__PURE__ */ e(
735
- H,
765
+ U,
736
766
  {
737
- icon: /* @__PURE__ */ e(be, { className: "reset-table-icon" }),
767
+ icon: /* @__PURE__ */ e(ge, { className: "reset-table-icon" }),
738
768
  className: "normal",
739
769
  onClick: r,
740
770
  children: /* @__PURE__ */ e("span", { className: "table-header-sr", children: p("_accessibility:buttons.reset") })
741
771
  }
742
772
  ),
743
- V && /* @__PURE__ */ b(
744
- H,
773
+ I && /* @__PURE__ */ b(
774
+ U,
745
775
  {
746
- icon: i?.button?.icon ?? /* @__PURE__ */ e(ge, { className: "filter-dropdown-trigger-icon" }),
776
+ icon: i?.button?.icon ?? /* @__PURE__ */ e(Ne, { className: "filter-dropdown-trigger-icon" }),
747
777
  className: "filter-dropdown-button normal filter-dropdown-trigger",
748
778
  "aria-haspopup": "true",
749
779
  onClick: () => h(!w),
750
780
  "aria-expanded": w,
751
781
  children: [
752
782
  /* @__PURE__ */ e(
753
- Ce,
783
+ ye,
754
784
  {
755
785
  count: c,
756
- className: `${c > 0 ? "show" : "hide"} `
786
+ className: O(c > 0 ? "show" : "hide")
757
787
  }
758
788
  ),
759
789
  /* @__PURE__ */ e("span", { className: "table-header-sr", children: p("_accessibility:buttons.filters") }),
@@ -764,7 +794,7 @@ const We = (n) => {
764
794
  ] })
765
795
  ] }),
766
796
  E && /* @__PURE__ */ e(
767
- Ve,
797
+ Ie,
768
798
  {
769
799
  filters: d,
770
800
  show: R,
@@ -772,21 +802,21 @@ const We = (n) => {
772
802
  options: i
773
803
  }
774
804
  ),
775
- /* @__PURE__ */ e(Fe, { filtersDefinition: d })
805
+ /* @__PURE__ */ e(Oe, { filtersDefinition: d })
776
806
  ]
777
807
  }
778
808
  );
779
809
  };
780
- function qe({
810
+ function Ge({
781
811
  count: n,
782
812
  multiActions: t,
783
813
  onActionClick: a
784
814
  }) {
785
- const { t: s } = O();
815
+ const { t: s } = _();
786
816
  return /* @__PURE__ */ b("div", { className: "table-selection-bar", children: [
787
817
  /* @__PURE__ */ e("p", { className: "table-selection-bar-count", children: s("_accessibility:components.table.selectedCount", { count: n }) }),
788
- t.length > 0 && /* @__PURE__ */ e("div", { className: "table-selection-bar-actions", children: t.map((l) => /* @__PURE__ */ e(re, { content: l.tooltip, children: /* @__PURE__ */ e(
789
- H,
818
+ t.length > 0 && /* @__PURE__ */ e("div", { className: "table-selection-bar-actions", children: t.map((l) => /* @__PURE__ */ e(oe, { content: l.tooltip, children: /* @__PURE__ */ e(
819
+ U,
790
820
  {
791
821
  icon: l.icon,
792
822
  className: "multi-table-action",
@@ -797,8 +827,8 @@ function qe({
797
827
  ) }, l.id)) })
798
828
  ] });
799
829
  }
800
- const Q = 220;
801
- function Ge({
830
+ const Y = 220;
831
+ function Je({
802
832
  data: n,
803
833
  allowMultipleExpandedRows: t,
804
834
  controlledExpandedRowId: a,
@@ -806,43 +836,43 @@ function Ge({
806
836
  onRowExpand: l,
807
837
  findRowById: i
808
838
  }) {
809
- const [u, o] = M(null), [c, r] = M(null), [p, d] = M(null), [y, f] = M(null), [h, w] = M(!1), [E, V] = M(/* @__PURE__ */ new Set()), [R, N] = M([]), T = j(null), C = j(null), z = j(/* @__PURE__ */ new Map()), _ = typeof a < "u", $ = t && !_, k = _ ? a ?? null : u, U = x(() => {
839
+ const [u, o] = V(null), [c, r] = V(null), [p, d] = V(null), [y, f] = V(null), [h, w] = V(!1), [E, I] = V(/* @__PURE__ */ new Set()), [R, N] = V([]), T = B(null), C = B(null), L = B(/* @__PURE__ */ new Map()), M = typeof a < "u", P = t && !M, k = M ? a ?? null : u, W = x(() => {
810
840
  C.current && (clearTimeout(C.current), C.current = null);
811
841
  }, []), F = x(
812
842
  (m) => {
813
843
  if (typeof m < "u") {
814
- const g = z.current.get(m);
844
+ const g = L.current.get(m);
815
845
  if (!g) return;
816
- clearTimeout(g), z.current.delete(m);
846
+ clearTimeout(g), L.current.delete(m);
817
847
  return;
818
848
  }
819
- z.current.forEach(
849
+ L.current.forEach(
820
850
  (g) => clearTimeout(g)
821
- ), z.current.clear();
851
+ ), L.current.clear();
822
852
  },
823
853
  []
824
- ), J = x(
854
+ ), X = x(
825
855
  (m) => {
826
856
  F(m), N((g) => g.some(
827
857
  (A) => A.rowId === m
828
858
  ) ? g.map(
829
859
  (A) => A.rowId === m ? { ...A, isVisible: !1 } : A
830
- ) : g), z.current.set(
860
+ ) : g), L.current.set(
831
861
  m,
832
862
  setTimeout(() => {
833
863
  N(
834
864
  (g) => g.filter((v) => v.rowId !== m)
835
- ), z.current.delete(m);
836
- }, Q)
865
+ ), L.current.delete(m);
866
+ }, Y)
837
867
  );
838
868
  },
839
869
  [F]
840
- ), K = x(
870
+ ), Q = x(
841
871
  (m, g) => {
842
872
  F(m), N((v) => v.some(
843
- (D) => D.rowId === m
873
+ (z) => z.rowId === m
844
874
  ) ? v.map(
845
- (D) => D.rowId === m ? { ...D, content: g, isVisible: !1 } : D
875
+ (z) => z.rowId === m ? { ...z, content: g, isVisible: !1 } : z
846
876
  ) : [...v, { rowId: m, content: g, isVisible: !1 }]), requestAnimationFrame(() => {
847
877
  N(
848
878
  (v) => v.map(
@@ -853,10 +883,10 @@ function Ge({
853
883
  },
854
884
  [F]
855
885
  );
856
- I(() => {
857
- if (!$) return;
886
+ j(() => {
887
+ if (!P) return;
858
888
  const m = new Set(n.map((g) => g.id));
859
- V((g) => {
889
+ I((g) => {
860
890
  const v = /* @__PURE__ */ new Set();
861
891
  return g.forEach((A) => {
862
892
  if (m.has(A)) {
@@ -870,29 +900,29 @@ function Ge({
870
900
  }), g.filter(
871
901
  (v) => m.has(v.rowId)
872
902
  )));
873
- }, [n, $, F]), I(() => {
874
- if ($) return;
903
+ }, [n, P, F]), j(() => {
904
+ if (P) return;
875
905
  if (k === null) {
876
- r(null), _ && (T.current = null);
906
+ r(null), M && (T.current = null);
877
907
  return;
878
908
  }
879
- i(k) || (_ || o(null), r(null), _ && (T.current = null));
909
+ i(k) || (M || o(null), r(null), M && (T.current = null));
880
910
  }, [
881
911
  n,
882
912
  k,
883
913
  i,
884
- _,
885
- $
886
- ]), I(() => {
887
- if (!$) {
888
- if (U(), k === null || c === null) {
914
+ M,
915
+ P
916
+ ]), j(() => {
917
+ if (!P) {
918
+ if (W(), k === null || c === null) {
889
919
  if (p === null) {
890
920
  w(!1), f(null);
891
921
  return;
892
922
  }
893
923
  w(!1), C.current = setTimeout(() => {
894
924
  d(null), f(null), C.current = null;
895
- }, Q);
925
+ }, Y);
896
926
  return;
897
927
  }
898
928
  if (p === null) {
@@ -905,21 +935,21 @@ function Ge({
905
935
  }
906
936
  w(!1), C.current = setTimeout(() => {
907
937
  d(k), f(c), requestAnimationFrame(() => w(!0)), C.current = null;
908
- }, Q);
938
+ }, Y);
909
939
  }
910
940
  }, [
911
- U,
941
+ W,
912
942
  c,
913
943
  k,
914
- $,
944
+ P,
915
945
  p
916
- ]), I(
946
+ ]), j(
917
947
  () => () => {
918
- U(), F();
948
+ W(), F();
919
949
  },
920
- [U, F]
921
- ), I(() => {
922
- if (!_) return;
950
+ [W, F]
951
+ ), j(() => {
952
+ if (!M) return;
923
953
  if (k === null) {
924
954
  r(null), T.current = null;
925
955
  return;
@@ -931,29 +961,29 @@ function Ge({
931
961
  }
932
962
  const g = T.current;
933
963
  r(l?.(m, g) ?? null), T.current = m;
934
- }, [k, i, _, l]);
935
- const ce = x(
964
+ }, [k, i, M, l]);
965
+ const de = x(
936
966
  (m) => {
937
- if ($) {
967
+ if (P) {
938
968
  if (E.has(m.id)) {
939
- V((X) => {
940
- const L = new Set(X);
941
- return L.delete(m.id), L;
942
- }), J(m.id), s?.(null, m);
969
+ I((K) => {
970
+ const H = new Set(K);
971
+ return H.delete(m.id), H;
972
+ }), X(m.id), s?.(null, m);
943
973
  return;
944
974
  }
945
- V((X) => {
946
- const L = new Set(X);
947
- return L.add(m.id), L;
975
+ I((K) => {
976
+ const H = new Set(K);
977
+ return H.add(m.id), H;
948
978
  });
949
- const D = l?.(m, null) ?? null;
950
- D !== null && typeof D < "u" ? K(m.id, D) : (F(m.id), N(
951
- (X) => X.filter((L) => L.rowId !== m.id)
979
+ const z = l?.(m, null) ?? null;
980
+ z !== null && typeof z < "u" ? Q(m.id, z) : (F(m.id), N(
981
+ (K) => K.filter((H) => H.rowId !== m.id)
952
982
  )), s?.(m, null);
953
983
  return;
954
984
  }
955
985
  const g = k === m.id, v = g ? m : i(k);
956
- if (_) {
986
+ if (M) {
957
987
  s?.(g ? null : m, v);
958
988
  return;
959
989
  }
@@ -965,18 +995,18 @@ function Ge({
965
995
  },
966
996
  [
967
997
  k,
968
- J,
998
+ X,
969
999
  F,
970
- K,
1000
+ Q,
971
1001
  i,
972
1002
  E,
973
- _,
974
- $,
1003
+ M,
1004
+ P,
975
1005
  s,
976
1006
  l
977
1007
  ]
978
1008
  );
979
- return { expandedRowsToRender: S(() => $ ? R : p === null || y === null || typeof y > "u" ? [] : [
1009
+ return { expandedRowsToRender: S(() => P ? R : p === null || y === null || typeof y > "u" ? [] : [
980
1010
  {
981
1011
  rowId: p,
982
1012
  content: y,
@@ -984,13 +1014,13 @@ function Ge({
984
1014
  }
985
1015
  ], [
986
1016
  h,
987
- $,
1017
+ P,
988
1018
  y,
989
1019
  p,
990
1020
  R
991
- ]), onRowExpandChange: ce };
1021
+ ]), onRowExpandChange: de };
992
1022
  }
993
- function Je({
1023
+ function Xe({
994
1024
  actions: n,
995
1025
  selectedRowsData: t
996
1026
  }) {
@@ -1027,16 +1057,16 @@ function Je({
1027
1057
  );
1028
1058
  return { multiActions: a, handleMultipleActionClick: s };
1029
1059
  }
1030
- function Xe({
1060
+ function Ke({
1031
1061
  data: n,
1032
1062
  onRowSelect: t,
1033
1063
  onSelectedRowsChange: a
1034
1064
  }) {
1035
- const [s, l] = M(/* @__PURE__ */ new Set()), i = S(
1065
+ const [s, l] = V(/* @__PURE__ */ new Set()), i = S(
1036
1066
  () => n?.filter((r) => s.has(r.id)) ?? [],
1037
1067
  [n, s]
1038
1068
  );
1039
- I(() => {
1069
+ j(() => {
1040
1070
  if (!n?.length) {
1041
1071
  l(/* @__PURE__ */ new Set());
1042
1072
  return;
@@ -1047,7 +1077,7 @@ function Xe({
1047
1077
  d.has(y) && p.add(y);
1048
1078
  }), p;
1049
1079
  });
1050
- }, [n]), I(() => {
1080
+ }, [n]), j(() => {
1051
1081
  a && a(i);
1052
1082
  }, [i, a]);
1053
1083
  const u = x(
@@ -1082,7 +1112,7 @@ function Xe({
1082
1112
  onToggleAllRows: o
1083
1113
  };
1084
1114
  }
1085
- function ht(n) {
1115
+ function bt(n) {
1086
1116
  const {
1087
1117
  data: t,
1088
1118
  onSort: a,
@@ -1100,85 +1130,85 @@ function ht(n) {
1100
1130
  onExpandedRowChange: h,
1101
1131
  onRowExpand: w,
1102
1132
  ...E
1103
- } = n, V = S(() => !t?.length, [t]), R = x(
1104
- (J) => J === null ? null : t.find((K) => K.id === J) ?? null,
1133
+ } = n, I = S(() => !t?.length, [t]), R = x(
1134
+ (X) => X === null ? null : t.find((Q) => Q.id === X) ?? null,
1105
1135
  [t]
1106
1136
  ), {
1107
1137
  selectedRows: N,
1108
1138
  selectedRowsData: T,
1109
1139
  selectionState: C,
1110
- onRowSelectionChange: z,
1111
- onToggleAllRows: _
1112
- } = Xe({ data: t, onRowSelect: p, onSelectedRowsChange: d }), { expandedRowsToRender: $, onRowExpandChange: k } = Ge({
1140
+ onRowSelectionChange: L,
1141
+ onToggleAllRows: M
1142
+ } = Ke({ data: t, onRowSelect: p, onSelectedRowsChange: d }), { expandedRowsToRender: P, onRowExpandChange: k } = Je({
1113
1143
  data: t,
1114
1144
  allowMultipleExpandedRows: y,
1115
1145
  controlledExpandedRowId: f,
1116
1146
  onExpandedRowChange: h,
1117
1147
  onRowExpand: w,
1118
1148
  findRowById: R
1119
- }), { multiActions: U, handleMultipleActionClick: F } = Je({
1149
+ }), { multiActions: W, handleMultipleActionClick: F } = Xe({
1120
1150
  actions: i,
1121
1151
  selectedRowsData: T
1122
1152
  });
1123
- return /* @__PURE__ */ e(ue, { children: /* @__PURE__ */ b("div", { className: `${c} table-main`, children: [
1124
- /* @__PURE__ */ e(We, { columns: u, isLoading: l, ...E }),
1125
- l ? /* @__PURE__ */ e(we, { className: "table-loading" }) : /* @__PURE__ */ e(q, { children: V ? /* @__PURE__ */ e(Ue, {}) : /* @__PURE__ */ b(q, { children: [
1153
+ return /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ b("div", { className: O("table-main", c), children: [
1154
+ /* @__PURE__ */ e(qe, { columns: u, isLoading: l, ...E }),
1155
+ l ? /* @__PURE__ */ e(xe, { className: "table-loading" }) : /* @__PURE__ */ e(G, { children: I ? /* @__PURE__ */ e(We, {}) : /* @__PURE__ */ b(G, { children: [
1126
1156
  !!T.length && /* @__PURE__ */ e(
1127
- qe,
1157
+ Ge,
1128
1158
  {
1129
1159
  count: T.length,
1130
- multiActions: U,
1160
+ multiActions: W,
1131
1161
  onActionClick: F
1132
1162
  }
1133
1163
  ),
1134
- /* @__PURE__ */ e("div", { className: `${o} table-body`, children: /* @__PURE__ */ b("table", { className: "table-content", children: [
1164
+ /* @__PURE__ */ e("div", { className: O("table-body", o), children: /* @__PURE__ */ b("table", { className: "table-content", children: [
1135
1165
  /* @__PURE__ */ e(
1136
- Re,
1166
+ Te,
1137
1167
  {
1138
1168
  entity: s,
1139
1169
  columns: u,
1140
1170
  onSortCallback: a,
1141
1171
  hasAction: !!i,
1142
1172
  selectionState: C,
1143
- onToggleAllRows: _
1173
+ onToggleAllRows: M
1144
1174
  }
1145
1175
  ),
1146
1176
  /* @__PURE__ */ e("tbody", { children: /* @__PURE__ */ e(
1147
- He,
1177
+ Ue,
1148
1178
  {
1149
1179
  data: t,
1150
1180
  actions: i,
1151
1181
  columns: u,
1152
1182
  softDeleteProperty: r,
1153
1183
  selectedRows: N,
1154
- expandedRows: $,
1155
- onRowSelectionChange: z,
1184
+ expandedRows: P,
1185
+ onRowSelectionChange: L,
1156
1186
  onRowExpand: w ? k : void 0
1157
1187
  }
1158
1188
  ) })
1159
1189
  ] }) }),
1160
- /* @__PURE__ */ e(Le, {})
1190
+ /* @__PURE__ */ e(He, {})
1161
1191
  ] }) })
1162
1192
  ] }) });
1163
1193
  }
1164
1194
  export {
1165
- Fe as A,
1166
- Re as C,
1167
- Ve as F,
1168
- ze as N,
1169
- je as P,
1170
- Ae as R,
1171
- Ue as T,
1172
- Te as a,
1173
- ke as b,
1174
- De as c,
1175
- Le as d,
1176
- He as e,
1177
- We as f,
1178
- qe as g,
1179
- ht as h,
1180
- oe as i,
1181
- xe as j,
1182
- Se as k,
1183
- Pe as r
1195
+ Oe as A,
1196
+ Te as C,
1197
+ Ie as F,
1198
+ Le as N,
1199
+ Be as P,
1200
+ Ee as R,
1201
+ We as T,
1202
+ ke as a,
1203
+ Ae as b,
1204
+ ze as c,
1205
+ He as d,
1206
+ Ue as e,
1207
+ qe as f,
1208
+ Ge as g,
1209
+ bt as h,
1210
+ ce as i,
1211
+ Se as j,
1212
+ Re as k,
1213
+ De as r
1184
1214
  };