@sito/dashboard 0.0.63 → 0.0.65

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 (32) hide show
  1. package/README.md +69 -120
  2. package/dist/components/Button/Button.d.ts +7 -0
  3. package/dist/components/Button/Button.stories.d.ts +28 -0
  4. package/dist/components/Button/index.d.ts +2 -0
  5. package/dist/components/Button/types.d.ts +7 -0
  6. package/dist/components/Dropdown/Dropdown.d.ts +7 -0
  7. package/dist/components/Dropdown/Dropdown.stories.d.ts +7 -0
  8. package/dist/components/Dropdown/Dropdown.test.d.ts +1 -0
  9. package/dist/components/Dropdown/index.d.ts +2 -0
  10. package/dist/components/Dropdown/types.d.ts +6 -0
  11. package/dist/components/Form/AutocompleteInput/AutocompleteInput.d.ts +3 -3
  12. package/dist/components/IconButton/IconButton.d.ts +7 -0
  13. package/dist/components/IconButton/IconButton.stories.d.ts +29 -0
  14. package/dist/components/IconButton/index.d.ts +2 -0
  15. package/dist/components/IconButton/types.d.ts +6 -0
  16. package/dist/components/Table/components/Rows.d.ts +0 -1
  17. package/dist/components/Table/components/TableSelectionBar.d.ts +18 -0
  18. package/dist/components/Table/components/TableSelectionBar.test.d.ts +1 -0
  19. package/dist/components/Table/components/Widgets/types.d.ts +3 -6
  20. package/dist/components/Table/components/index.d.ts +1 -0
  21. package/dist/components/Table/hooks/index.d.ts +3 -0
  22. package/dist/components/Table/hooks/useExpandedRows.d.ts +28 -0
  23. package/dist/components/Table/hooks/useTableMultiActions.d.ts +20 -0
  24. package/dist/components/Table/hooks/useTableRowSelection.d.ts +26 -0
  25. package/dist/components/Table/types.d.ts +1 -1
  26. package/dist/components/Table/utils.d.ts +8 -0
  27. package/dist/components/Table/utils.test.d.ts +1 -0
  28. package/dist/components/index.d.ts +3 -0
  29. package/dist/dashboard.cjs +1 -1
  30. package/dist/dashboard.js +1064 -1857
  31. package/dist/main.css +1 -1
  32. package/package.json +26 -19
package/dist/dashboard.js CHANGED
@@ -1,1184 +1,346 @@
1
1
  import "./main.css";
2
- import { jsx as i, jsxs as k, Fragment as $e } from "react/jsx-runtime";
3
- import { useRef as Q, useEffect as V, forwardRef as Ee, useState as I, useCallback as F, createContext as He, useReducer as Dt, useContext as qe, useMemo as D, Fragment as zt } from "react";
4
- const _t = (e) => {
5
- const { count: t, className: r = "" } = e, n = Q(null);
6
- return V(() => {
7
- var s, a;
8
- (s = n.current) != null && s.parentNode && (((a = n.current) == null ? void 0 : a.parentNode).style.position = "relative");
9
- }, [n]), /* @__PURE__ */ i("span", { ref: n, className: `${r} badge-main`, children: t });
2
+ import { jsx as t, jsxs as g, Fragment as ee } from "react/jsx-runtime";
3
+ import { useRef as B, useCallback as C, useEffect as I, forwardRef as te, useState as T, useMemo as A, useLayoutEffect as ve, useReducer as we, createContext as re, useContext as ae, Fragment as xe, useId as ye, isValidElement as Se, cloneElement as $e } from "react";
4
+ const Ee = (e) => {
5
+ const { count: l, className: r = "" } = e;
6
+ return /* @__PURE__ */ t("span", { className: `${r} badge-main`, children: l });
7
+ }, Re = (e) => {
8
+ const {
9
+ children: l,
10
+ type: r = "button",
11
+ variant: n = "text",
12
+ color: s = "default",
13
+ className: a = "",
14
+ ...u
15
+ } = e;
16
+ return /* @__PURE__ */ t(
17
+ "button",
18
+ {
19
+ type: r,
20
+ className: `button ${n} ${s} ${a}`,
21
+ ...u,
22
+ children: l
23
+ }
24
+ );
10
25
  };
11
- function fe(e) {
26
+ function G(e) {
12
27
  const {
13
- text: t,
28
+ text: l,
14
29
  onDelete: r,
15
30
  children: n,
16
31
  icon: s,
17
32
  variant: a = "default",
18
- iconClassName: l = "",
19
- className: c = "",
20
- textClassName: o = ""
33
+ iconClassName: u = "",
34
+ className: o = "",
35
+ textClassName: c = ""
21
36
  } = e;
22
- return /* @__PURE__ */ k("div", { className: `chip-main ${a} ${c}`, children: [
23
- /* @__PURE__ */ i("span", { className: o, children: t }),
24
- n,
25
- r ? /* @__PURE__ */ i(
26
- "button",
27
- {
28
- type: "button",
29
- className: `chip-delete-button ${l}`,
30
- onClick: r,
31
- children: s ?? /* @__PURE__ */ i(Qe, {})
32
- }
33
- ) : null
34
- ] });
35
- }
36
- var Wt = !1;
37
- function Bt(e) {
38
- if (e.sheet)
39
- return e.sheet;
40
- for (var t = 0; t < document.styleSheets.length; t++)
41
- if (document.styleSheets[t].ownerNode === e)
42
- return document.styleSheets[t];
43
- }
44
- function jt(e) {
45
- var t = document.createElement("style");
46
- return t.setAttribute("data-emotion", e.key), e.nonce !== void 0 && t.setAttribute("nonce", e.nonce), t.appendChild(document.createTextNode("")), t.setAttribute("data-s", ""), t;
47
- }
48
- var Vt = /* @__PURE__ */ function() {
49
- function e(r) {
50
- var n = this;
51
- this._insertTag = function(s) {
52
- var a;
53
- n.tags.length === 0 ? n.insertionPoint ? a = n.insertionPoint.nextSibling : n.prepend ? a = n.container.firstChild : a = n.before : a = n.tags[n.tags.length - 1].nextSibling, n.container.insertBefore(s, a), n.tags.push(s);
54
- }, this.isSpeedy = r.speedy === void 0 ? !Wt : r.speedy, this.tags = [], this.ctr = 0, this.nonce = r.nonce, this.key = r.key, this.container = r.container, this.prepend = r.prepend, this.insertionPoint = r.insertionPoint, this.before = null;
55
- }
56
- var t = e.prototype;
57
- return t.hydrate = function(n) {
58
- n.forEach(this._insertTag);
59
- }, t.insert = function(n) {
60
- this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(jt(this));
61
- var s = this.tags[this.tags.length - 1];
62
- if (this.isSpeedy) {
63
- var a = Bt(s);
64
- try {
65
- a.insertRule(n, a.cssRules.length);
66
- } catch {
67
- }
68
- } else
69
- s.appendChild(document.createTextNode(n));
70
- this.ctr++;
71
- }, t.flush = function() {
72
- this.tags.forEach(function(n) {
73
- var s;
74
- return (s = n.parentNode) == null ? void 0 : s.removeChild(n);
75
- }), this.tags = [], this.ctr = 0;
76
- }, e;
77
- }(), j = "-ms-", Le = "-moz-", E = "-webkit-", pt = "comm", Ke = "rule", Ye = "decl", Gt = "@import", mt = "@keyframes", Ut = "@layer", Ht = Math.abs, De = String.fromCharCode, qt = Object.assign;
78
- function Kt(e, t) {
79
- return B(e, 0) ^ 45 ? (((t << 2 ^ B(e, 0)) << 2 ^ B(e, 1)) << 2 ^ B(e, 2)) << 2 ^ B(e, 3) : 0;
80
- }
81
- function bt(e) {
82
- return e.trim();
83
- }
84
- function Yt(e, t) {
85
- return (e = t.exec(e)) ? e[0] : e;
86
- }
87
- function R(e, t, r) {
88
- return e.replace(t, r);
89
- }
90
- function Ge(e, t) {
91
- return e.indexOf(t);
92
- }
93
- function B(e, t) {
94
- return e.charCodeAt(t) | 0;
95
- }
96
- function Se(e, t, r) {
97
- return e.slice(t, r);
98
- }
99
- function se(e) {
100
- return e.length;
101
- }
102
- function Ze(e) {
103
- return e.length;
104
- }
105
- function Pe(e, t) {
106
- return t.push(e), e;
107
- }
108
- function Zt(e, t) {
109
- return e.map(t).join("");
110
- }
111
- var ze = 1, ge = 1, gt = 0, U = 0, M = 0, ve = "";
112
- function _e(e, t, r, n, s, a, l) {
113
- return { value: e, root: t, parent: r, type: n, props: s, children: a, line: ze, column: ge, length: l, return: "" };
114
- }
115
- function Ne(e, t) {
116
- return qt(_e("", null, null, "", null, null, 0), e, { length: -e.length }, t);
117
- }
118
- function Jt() {
119
- return M;
120
- }
121
- function Xt() {
122
- return M = U > 0 ? B(ve, --U) : 0, ge--, M === 10 && (ge = 1, ze--), M;
123
- }
124
- function H() {
125
- return M = U < gt ? B(ve, U++) : 0, ge++, M === 10 && (ge = 1, ze++), M;
126
- }
127
- function ie() {
128
- return B(ve, U);
129
- }
130
- function Oe() {
131
- return U;
132
- }
133
- function Re(e, t) {
134
- return Se(ve, e, t);
135
- }
136
- function ke(e) {
137
- switch (e) {
138
- case 0:
139
- case 9:
140
- case 10:
141
- case 13:
142
- case 32:
143
- return 5;
144
- case 33:
145
- case 43:
146
- case 44:
147
- case 47:
148
- case 62:
149
- case 64:
150
- case 126:
151
- case 59:
152
- case 123:
153
- case 125:
154
- return 4;
155
- case 58:
156
- return 3;
157
- case 34:
158
- case 39:
159
- case 40:
160
- case 91:
161
- return 2;
162
- case 41:
163
- case 93:
164
- return 1;
165
- }
166
- return 0;
167
- }
168
- function vt(e) {
169
- return ze = ge = 1, gt = se(ve = e), U = 0, [];
170
- }
171
- function Ct(e) {
172
- return ve = "", e;
173
- }
174
- function Fe(e) {
175
- return bt(Re(U - 1, Ue(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
176
- }
177
- function Qt(e) {
178
- for (; (M = ie()) && M < 33; )
179
- H();
180
- return ke(e) > 2 || ke(M) > 3 ? "" : " ";
181
- }
182
- function en(e, t) {
183
- for (; --t && H() && !(M < 48 || M > 102 || M > 57 && M < 65 || M > 70 && M < 97); )
184
- ;
185
- return Re(e, Oe() + (t < 6 && ie() == 32 && H() == 32));
186
- }
187
- function Ue(e) {
188
- for (; H(); )
189
- switch (M) {
190
- case e:
191
- return U;
192
- case 34:
193
- case 39:
194
- e !== 34 && e !== 39 && Ue(M);
195
- break;
196
- case 40:
197
- e === 41 && Ue(e);
198
- break;
199
- case 92:
200
- H();
201
- break;
202
- }
203
- return U;
204
- }
205
- function tn(e, t) {
206
- for (; H() && e + M !== 47 + 10; )
207
- if (e + M === 42 + 42 && ie() === 47)
208
- break;
209
- return "/*" + Re(t, U - 1) + "*" + De(e === 47 ? e : H());
210
- }
211
- function nn(e) {
212
- for (; !ke(ie()); )
213
- H();
214
- return Re(e, U);
215
- }
216
- function rn(e) {
217
- return Ct(Me("", null, null, null, [""], e = vt(e), 0, [0], e));
218
- }
219
- function Me(e, t, r, n, s, a, l, c, o) {
220
- for (var d = 0, u = 0, m = l, b = 0, g = 0, f = 0, h = 1, C = 1, y = 1, v = 0, $ = "", T = s, A = a, P = n, N = $; C; )
221
- switch (f = v, v = H()) {
222
- case 40:
223
- if (f != 108 && B(N, m - 1) == 58) {
224
- Ge(N += R(Fe(v), "&", "&\f"), "&\f") != -1 && (y = -1);
225
- break;
226
- }
227
- case 34:
228
- case 39:
229
- case 91:
230
- N += Fe(v);
231
- break;
232
- case 9:
233
- case 10:
234
- case 13:
235
- case 32:
236
- N += Qt(f);
237
- break;
238
- case 92:
239
- N += en(Oe() - 1, 7);
240
- continue;
241
- case 47:
242
- switch (ie()) {
243
- case 42:
244
- case 47:
245
- Pe(sn(tn(H(), Oe()), t, r), o);
246
- break;
247
- default:
248
- N += "/";
249
- }
250
- break;
251
- case 123 * h:
252
- c[d++] = se(N) * y;
253
- case 125 * h:
254
- case 59:
255
- case 0:
256
- switch (v) {
257
- case 0:
258
- case 125:
259
- C = 0;
260
- case 59 + u:
261
- y == -1 && (N = R(N, /\f/g, "")), g > 0 && se(N) - m && Pe(g > 32 ? st(N + ";", n, r, m - 1) : st(R(N, " ", "") + ";", n, r, m - 2), o);
262
- break;
263
- case 59:
264
- N += ";";
265
- default:
266
- if (Pe(P = rt(N, t, r, d, u, s, c, $, T = [], A = [], m), a), v === 123)
267
- if (u === 0)
268
- Me(N, t, P, P, T, a, m, c, A);
269
- else
270
- switch (b === 99 && B(N, 3) === 110 ? 100 : b) {
271
- case 100:
272
- case 108:
273
- case 109:
274
- case 115:
275
- Me(e, P, P, n && Pe(rt(e, P, P, 0, 0, s, c, $, s, T = [], m), A), s, A, m, c, n ? T : A);
276
- break;
277
- default:
278
- Me(N, P, P, P, [""], A, 0, c, A);
279
- }
280
- }
281
- d = u = g = 0, h = y = 1, $ = N = "", m = l;
282
- break;
283
- case 58:
284
- m = 1 + se(N), g = f;
285
- default:
286
- if (h < 1) {
287
- if (v == 123)
288
- --h;
289
- else if (v == 125 && h++ == 0 && Xt() == 125)
290
- continue;
291
- }
292
- switch (N += De(v), v * h) {
293
- case 38:
294
- y = u > 0 ? 1 : (N += "\f", -1);
295
- break;
296
- case 44:
297
- c[d++] = (se(N) - 1) * y, y = 1;
298
- break;
299
- case 64:
300
- ie() === 45 && (N += Fe(H())), b = ie(), u = m = se($ = N += nn(Oe())), v++;
301
- break;
302
- case 45:
303
- f === 45 && se(N) == 2 && (h = 0);
304
- }
305
- }
306
- return a;
307
- }
308
- function rt(e, t, r, n, s, a, l, c, o, d, u) {
309
- for (var m = s - 1, b = s === 0 ? a : [""], g = Ze(b), f = 0, h = 0, C = 0; f < n; ++f)
310
- for (var y = 0, v = Se(e, m + 1, m = Ht(h = l[f])), $ = e; y < g; ++y)
311
- ($ = bt(h > 0 ? b[y] + " " + v : R(v, /&\f/g, b[y]))) && (o[C++] = $);
312
- return _e(e, t, r, s === 0 ? Ke : c, o, d, u);
313
- }
314
- function sn(e, t, r) {
315
- return _e(e, t, r, pt, De(Jt()), Se(e, 2, -2), 0);
316
- }
317
- function st(e, t, r, n) {
318
- return _e(e, t, r, Ye, Se(e, 0, n), Se(e, n + 1, -1), n);
319
- }
320
- function be(e, t) {
321
- for (var r = "", n = Ze(e), s = 0; s < n; s++)
322
- r += t(e[s], s, e, t) || "";
323
- return r;
324
- }
325
- function an(e, t, r, n) {
326
- switch (e.type) {
327
- case Ut:
328
- if (e.children.length)
329
- break;
330
- case Gt:
331
- case Ye:
332
- return e.return = e.return || e.value;
333
- case pt:
334
- return "";
335
- case mt:
336
- return e.return = e.value + "{" + be(e.children, n) + "}";
337
- case Ke:
338
- e.value = e.props.join(",");
339
- }
340
- return se(r = be(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
341
- }
342
- function cn(e) {
343
- var t = Ze(e);
344
- return function(r, n, s, a) {
345
- for (var l = "", c = 0; c < t; c++)
346
- l += e[c](r, n, s, a) || "";
347
- return l;
348
- };
349
- }
350
- function ln(e) {
351
- return function(t) {
352
- t.root || (t = t.return) && e(t);
353
- };
354
- }
355
- function on(e) {
356
- var t = /* @__PURE__ */ Object.create(null);
357
- return function(r) {
358
- return t[r] === void 0 && (t[r] = e(r)), t[r];
359
- };
360
- }
361
- var un = function(t, r, n) {
362
- for (var s = 0, a = 0; s = a, a = ie(), s === 38 && a === 12 && (r[n] = 1), !ke(a); )
363
- H();
364
- return Re(t, U);
365
- }, dn = function(t, r) {
366
- var n = -1, s = 44;
367
- do
368
- switch (ke(s)) {
369
- case 0:
370
- s === 38 && ie() === 12 && (r[n] = 1), t[n] += un(U - 1, r, n);
371
- break;
372
- case 2:
373
- t[n] += Fe(s);
374
- break;
375
- case 4:
376
- if (s === 44) {
377
- t[++n] = ie() === 58 ? "&\f" : "", r[n] = t[n].length;
378
- break;
379
- }
380
- default:
381
- t[n] += De(s);
382
- }
383
- while (s = H());
384
- return t;
385
- }, fn = function(t, r) {
386
- return Ct(dn(vt(t), r));
387
- }, at = /* @__PURE__ */ new WeakMap(), hn = function(t) {
388
- if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
389
- // negative .length indicates that this rule has been already prefixed
390
- t.length < 1)) {
391
- for (var r = t.value, n = t.parent, s = t.column === n.column && t.line === n.line; n.type !== "rule"; )
392
- if (n = n.parent, !n)
393
- return;
394
- if (!(t.props.length === 1 && r.charCodeAt(0) !== 58 && !at.get(n)) && !s) {
395
- at.set(t, !0);
396
- for (var a = [], l = fn(r, a), c = n.props, o = 0, d = 0; o < l.length; o++)
397
- for (var u = 0; u < c.length; u++, d++)
398
- t.props[d] = a[o] ? l[o].replace(/&\f/g, c[u]) : c[u] + " " + l[o];
399
- }
400
- }
401
- }, pn = function(t) {
402
- if (t.type === "decl") {
403
- var r = t.value;
404
- // charcode for l
405
- r.charCodeAt(0) === 108 && // charcode for b
406
- r.charCodeAt(2) === 98 && (t.return = "", t.value = "");
407
- }
408
- };
409
- function wt(e, t) {
410
- switch (Kt(e, t)) {
411
- case 5103:
412
- return E + "print-" + e + e;
413
- case 5737:
414
- case 4201:
415
- case 3177:
416
- case 3433:
417
- case 1641:
418
- case 4457:
419
- case 2921:
420
- case 5572:
421
- case 6356:
422
- case 5844:
423
- case 3191:
424
- case 6645:
425
- case 3005:
426
- case 6391:
427
- case 5879:
428
- case 5623:
429
- case 6135:
430
- case 4599:
431
- case 4855:
432
- case 4215:
433
- case 6389:
434
- case 5109:
435
- case 5365:
436
- case 5621:
437
- case 3829:
438
- return E + e + e;
439
- case 5349:
440
- case 4246:
441
- case 4810:
442
- case 6968:
443
- case 2756:
444
- return E + e + Le + e + j + e + e;
445
- case 6828:
446
- case 4268:
447
- return E + e + j + e + e;
448
- case 6165:
449
- return E + e + j + "flex-" + e + e;
450
- case 5187:
451
- return E + e + R(e, /(\w+).+(:[^]+)/, E + "box-$1$2" + j + "flex-$1$2") + e;
452
- case 5443:
453
- return E + e + j + "flex-item-" + R(e, /flex-|-self/, "") + e;
454
- case 4675:
455
- return E + e + j + "flex-line-pack" + R(e, /align-content|flex-|-self/, "") + e;
456
- case 5548:
457
- return E + e + j + R(e, "shrink", "negative") + e;
458
- case 5292:
459
- return E + e + j + R(e, "basis", "preferred-size") + e;
460
- case 6060:
461
- return E + "box-" + R(e, "-grow", "") + E + e + j + R(e, "grow", "positive") + e;
462
- case 4554:
463
- return E + R(e, /([^-])(transform)/g, "$1" + E + "$2") + e;
464
- case 6187:
465
- return R(R(R(e, /(zoom-|grab)/, E + "$1"), /(image-set)/, E + "$1"), e, "") + e;
466
- case 5495:
467
- case 3959:
468
- return R(e, /(image-set\([^]*)/, E + "$1$`$1");
469
- case 4968:
470
- return R(R(e, /(.+:)(flex-)?(.*)/, E + "box-pack:$3" + j + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + E + e + e;
471
- case 4095:
472
- case 3583:
473
- case 4068:
474
- case 2532:
475
- return R(e, /(.+)-inline(.+)/, E + "$1$2") + e;
476
- case 8116:
477
- case 7059:
478
- case 5753:
479
- case 5535:
480
- case 5445:
481
- case 5701:
482
- case 4933:
483
- case 4677:
484
- case 5533:
485
- case 5789:
486
- case 5021:
487
- case 4765:
488
- if (se(e) - 1 - t > 6)
489
- switch (B(e, t + 1)) {
490
- case 109:
491
- if (B(e, t + 4) !== 45)
492
- break;
493
- case 102:
494
- return R(e, /(.+:)(.+)-([^]+)/, "$1" + E + "$2-$3$1" + Le + (B(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
495
- case 115:
496
- return ~Ge(e, "stretch") ? wt(R(e, "stretch", "fill-available"), t) + e : e;
497
- }
498
- break;
499
- case 4949:
500
- if (B(e, t + 1) !== 115)
501
- break;
502
- case 6444:
503
- switch (B(e, se(e) - 3 - (~Ge(e, "!important") && 10))) {
504
- case 107:
505
- return R(e, ":", ":" + E) + e;
506
- case 101:
507
- return R(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + E + (B(e, 14) === 45 ? "inline-" : "") + "box$3$1" + E + "$2$3$1" + j + "$2box$3") + e;
508
- }
509
- break;
510
- case 5936:
511
- switch (B(e, t + 11)) {
512
- case 114:
513
- return E + e + j + R(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
514
- case 108:
515
- return E + e + j + R(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
516
- case 45:
517
- return E + e + j + R(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
518
- }
519
- return E + e + j + e + e;
520
- }
521
- return e;
522
- }
523
- var mn = function(t, r, n, s) {
524
- if (t.length > -1 && !t.return)
525
- switch (t.type) {
526
- case Ye:
527
- t.return = wt(t.value, t.length);
528
- break;
529
- case mt:
530
- return be([Ne(t, {
531
- value: R(t.value, "@", "@" + E)
532
- })], s);
533
- case Ke:
534
- if (t.length)
535
- return Zt(t.props, function(a) {
536
- switch (Yt(a, /(::plac\w+|:read-\w+)/)) {
537
- case ":read-only":
538
- case ":read-write":
539
- return be([Ne(t, {
540
- props: [R(a, /:(read-\w+)/, ":" + Le + "$1")]
541
- })], s);
542
- case "::placeholder":
543
- return be([Ne(t, {
544
- props: [R(a, /:(plac\w+)/, ":" + E + "input-$1")]
545
- }), Ne(t, {
546
- props: [R(a, /:(plac\w+)/, ":" + Le + "$1")]
547
- }), Ne(t, {
548
- props: [R(a, /:(plac\w+)/, j + "input-$1")]
549
- })], s);
550
- }
551
- return "";
552
- });
553
- }
554
- }, bn = [mn], gn = function(t) {
555
- var r = t.key;
556
- if (r === "css") {
557
- var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
558
- Array.prototype.forEach.call(n, function(h) {
559
- var C = h.getAttribute("data-emotion");
560
- C.indexOf(" ") !== -1 && (document.head.appendChild(h), h.setAttribute("data-s", ""));
561
- });
562
- }
563
- var s = t.stylisPlugins || bn, a = {}, l, c = [];
564
- l = t.container || document.head, Array.prototype.forEach.call(
565
- // this means we will ignore elements which don't have a space in them which
566
- // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
567
- document.querySelectorAll('style[data-emotion^="' + r + ' "]'),
568
- function(h) {
569
- for (var C = h.getAttribute("data-emotion").split(" "), y = 1; y < C.length; y++)
570
- a[C[y]] = !0;
571
- c.push(h);
572
- }
573
- );
574
- var o, d = [hn, pn];
575
- {
576
- var u, m = [an, ln(function(h) {
577
- u.insert(h);
578
- })], b = cn(d.concat(s, m)), g = function(C) {
579
- return be(rn(C), b);
580
- };
581
- o = function(C, y, v, $) {
582
- u = v, g(C ? C + "{" + y.styles + "}" : y.styles), $ && (f.inserted[y.name] = !0);
583
- };
584
- }
585
- var f = {
586
- key: r,
587
- sheet: new Vt({
588
- key: r,
589
- container: l,
590
- nonce: t.nonce,
591
- speedy: t.speedy,
592
- prepend: t.prepend,
593
- insertionPoint: t.insertionPoint
594
- }),
595
- nonce: t.nonce,
596
- inserted: a,
597
- registered: {},
598
- insert: o
599
- };
600
- return f.sheet.hydrate(c), f;
601
- };
602
- function vn(e) {
603
- for (var t = 0, r, n = 0, s = e.length; s >= 4; ++n, s -= 4)
604
- r = e.charCodeAt(n) & 255 | (e.charCodeAt(++n) & 255) << 8 | (e.charCodeAt(++n) & 255) << 16 | (e.charCodeAt(++n) & 255) << 24, r = /* Math.imul(k, m): */
605
- (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), r ^= /* k >>> r: */
606
- r >>> 24, t = /* Math.imul(k, m): */
607
- (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
608
- (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
609
- switch (s) {
610
- case 3:
611
- t ^= (e.charCodeAt(n + 2) & 255) << 16;
612
- case 2:
613
- t ^= (e.charCodeAt(n + 1) & 255) << 8;
614
- case 1:
615
- t ^= e.charCodeAt(n) & 255, t = /* Math.imul(h, m): */
616
- (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
617
- }
618
- return t ^= t >>> 13, t = /* Math.imul(h, m): */
619
- (t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
620
- }
621
- var Cn = {
622
- animationIterationCount: 1,
623
- aspectRatio: 1,
624
- borderImageOutset: 1,
625
- borderImageSlice: 1,
626
- borderImageWidth: 1,
627
- boxFlex: 1,
628
- boxFlexGroup: 1,
629
- boxOrdinalGroup: 1,
630
- columnCount: 1,
631
- columns: 1,
632
- flex: 1,
633
- flexGrow: 1,
634
- flexPositive: 1,
635
- flexShrink: 1,
636
- flexNegative: 1,
637
- flexOrder: 1,
638
- gridRow: 1,
639
- gridRowEnd: 1,
640
- gridRowSpan: 1,
641
- gridRowStart: 1,
642
- gridColumn: 1,
643
- gridColumnEnd: 1,
644
- gridColumnSpan: 1,
645
- gridColumnStart: 1,
646
- msGridRow: 1,
647
- msGridRowSpan: 1,
648
- msGridColumn: 1,
649
- msGridColumnSpan: 1,
650
- fontWeight: 1,
651
- lineHeight: 1,
652
- opacity: 1,
653
- order: 1,
654
- orphans: 1,
655
- scale: 1,
656
- tabSize: 1,
657
- widows: 1,
658
- zIndex: 1,
659
- zoom: 1,
660
- WebkitLineClamp: 1,
661
- // SVG-related properties
662
- fillOpacity: 1,
663
- floodOpacity: 1,
664
- stopOpacity: 1,
665
- strokeDasharray: 1,
666
- strokeDashoffset: 1,
667
- strokeMiterlimit: 1,
668
- strokeOpacity: 1,
669
- strokeWidth: 1
670
- }, wn = !1, xn = /[A-Z]|^ms/g, yn = /_EMO_([^_]+?)_([^]*?)_EMO_/g, xt = function(t) {
671
- return t.charCodeAt(1) === 45;
672
- }, it = function(t) {
673
- return t != null && typeof t != "boolean";
674
- }, Be = /* @__PURE__ */ on(function(e) {
675
- return xt(e) ? e : e.replace(xn, "-$&").toLowerCase();
676
- }), ct = function(t, r) {
677
- switch (t) {
678
- case "animation":
679
- case "animationName":
680
- if (typeof r == "string")
681
- return r.replace(yn, function(n, s, a) {
682
- return ae = {
683
- name: s,
684
- styles: a,
685
- next: ae
686
- }, s;
687
- });
688
- }
689
- return Cn[t] !== 1 && !xt(t) && typeof r == "number" && r !== 0 ? r + "px" : r;
690
- }, Nn = "Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";
691
- function Ae(e, t, r) {
692
- if (r == null)
693
- return "";
694
- var n = r;
695
- if (n.__emotion_styles !== void 0)
696
- return n;
697
- switch (typeof r) {
698
- case "boolean":
699
- return "";
700
- case "object": {
701
- var s = r;
702
- if (s.anim === 1)
703
- return ae = {
704
- name: s.name,
705
- styles: s.styles,
706
- next: ae
707
- }, s.name;
708
- var a = r;
709
- if (a.styles !== void 0) {
710
- var l = a.next;
711
- if (l !== void 0)
712
- for (; l !== void 0; )
713
- ae = {
714
- name: l.name,
715
- styles: l.styles,
716
- next: ae
717
- }, l = l.next;
718
- var c = a.styles + ";";
719
- return c;
720
- }
721
- return $n(e, t, r);
722
- }
723
- case "function": {
724
- if (e !== void 0) {
725
- var o = ae, d = r(e);
726
- return ae = o, Ae(e, t, d);
727
- }
728
- break;
729
- }
730
- }
731
- var u = r;
732
- if (t == null)
733
- return u;
734
- var m = t[u];
735
- return m !== void 0 ? m : u;
736
- }
737
- function $n(e, t, r) {
738
- var n = "";
739
- if (Array.isArray(r))
740
- for (var s = 0; s < r.length; s++)
741
- n += Ae(e, t, r[s]) + ";";
742
- else
743
- for (var a in r) {
744
- var l = r[a];
745
- if (typeof l != "object") {
746
- var c = l;
747
- t != null && t[c] !== void 0 ? n += a + "{" + t[c] + "}" : it(c) && (n += Be(a) + ":" + ct(a, c) + ";");
748
- } else {
749
- if (a === "NO_COMPONENT_SELECTOR" && wn)
750
- throw new Error(Nn);
751
- if (Array.isArray(l) && typeof l[0] == "string" && (t == null || t[l[0]] === void 0))
752
- for (var o = 0; o < l.length; o++)
753
- it(l[o]) && (n += Be(a) + ":" + ct(a, l[o]) + ";");
754
- else {
755
- var d = Ae(e, t, l);
756
- switch (a) {
757
- case "animation":
758
- case "animationName": {
759
- n += Be(a) + ":" + d + ";";
760
- break;
761
- }
762
- default:
763
- n += a + "{" + d + "}";
37
+ return /* @__PURE__ */ g(
38
+ "div",
39
+ {
40
+ className: `chip-main ${a} ${r ? "deletable" : ""} ${o}`,
41
+ children: [
42
+ /* @__PURE__ */ t("span", { className: c, children: l }),
43
+ n,
44
+ r ? /* @__PURE__ */ t(
45
+ q,
46
+ {
47
+ icon: s ?? /* @__PURE__ */ t(ce, {}),
48
+ className: `chip-delete-button ${u}`,
49
+ onClick: r
764
50
  }
765
- }
766
- }
767
- }
768
- return n;
769
- }
770
- var lt = /label:\s*([^\s;{]+)\s*(;|$)/g, ae;
771
- function je(e, t, r) {
772
- if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
773
- return e[0];
774
- var n = !0, s = "";
775
- ae = void 0;
776
- var a = e[0];
777
- if (a == null || a.raw === void 0)
778
- n = !1, s += Ae(r, t, a);
779
- else {
780
- var l = a;
781
- s += l[0];
782
- }
783
- for (var c = 1; c < e.length; c++)
784
- if (s += Ae(r, t, e[c]), n) {
785
- var o = a;
786
- s += o[c];
51
+ ) : null
52
+ ]
787
53
  }
788
- lt.lastIndex = 0;
789
- for (var d = "", u; (u = lt.exec(s)) !== null; )
790
- d += "-" + u[1];
791
- var m = vn(s) + d;
792
- return {
793
- name: m,
794
- styles: s,
795
- next: ae
796
- };
797
- }
798
- var Sn = !0;
799
- function yt(e, t, r) {
800
- var n = "";
801
- return r.split(" ").forEach(function(s) {
802
- e[s] !== void 0 ? t.push(e[s] + ";") : s && (n += s + " ");
803
- }), n;
804
- }
805
- var kn = function(t, r, n) {
806
- var s = t.key + "-" + r.name;
807
- // we only need to add the styles to the registered cache if the
808
- // class name could be used further down
809
- // the tree but if it's a string tag, we know it won't
810
- // so we don't have to add it to registered cache.
811
- // this improves memory usage since we can avoid storing the whole style string
812
- (n === !1 || // we need to always store it if we're in compat mode and
813
- // in node since emotion-server relies on whether a style is in
814
- // the registered cache to know whether a style is global or not
815
- // also, note that this check will be dead code eliminated in the browser
816
- Sn === !1) && t.registered[s] === void 0 && (t.registered[s] = r.styles);
817
- }, An = function(t, r, n) {
818
- kn(t, r, n);
819
- var s = t.key + "-" + r.name;
820
- if (t.inserted[r.name] === void 0) {
821
- var a = r;
822
- do
823
- t.insert(r === a ? "." + s : "", a, t.sheet, !0), a = a.next;
824
- while (a !== void 0);
825
- }
826
- };
827
- function ot(e, t) {
828
- if (e.inserted[t.name] === void 0)
829
- return e.insert("", t, e.sheet, !0);
830
- }
831
- function ut(e, t, r) {
832
- var n = [], s = yt(e, n, r);
833
- return n.length < 2 ? r : s + t(n);
54
+ );
834
55
  }
835
- var En = function(t) {
836
- var r = gn(t);
837
- r.sheet.speedy = function(c) {
838
- this.isSpeedy = c;
839
- }, r.compat = !0;
840
- var n = function() {
841
- for (var o = arguments.length, d = new Array(o), u = 0; u < o; u++)
842
- d[u] = arguments[u];
843
- var m = je(d, r.registered, void 0);
844
- return An(r, m, !1), r.key + "-" + m.name;
845
- }, s = function() {
846
- for (var o = arguments.length, d = new Array(o), u = 0; u < o; u++)
847
- d[u] = arguments[u];
848
- var m = je(d, r.registered), b = "animation-" + m.name;
849
- return ot(r, {
850
- name: m.name,
851
- styles: "@keyframes " + b + "{" + m.styles + "}"
852
- }), b;
853
- }, a = function() {
854
- for (var o = arguments.length, d = new Array(o), u = 0; u < o; u++)
855
- d[u] = arguments[u];
856
- var m = je(d, r.registered);
857
- ot(r, m);
858
- }, l = function() {
859
- for (var o = arguments.length, d = new Array(o), u = 0; u < o; u++)
860
- d[u] = arguments[u];
861
- return ut(r.registered, n, Rn(d));
862
- };
863
- return {
864
- css: n,
865
- cx: l,
866
- injectGlobal: a,
867
- keyframes: s,
868
- hydrate: function(o) {
869
- o.forEach(function(d) {
870
- r.inserted[d] = !0;
871
- });
56
+ const pt = (e) => {
57
+ const { children: l, open: r, onClose: n } = e, s = B(null), a = C(
58
+ (o) => {
59
+ const c = s.current;
60
+ !r || !c || c.contains(o.target) || n();
872
61
  },
873
- flush: function() {
874
- r.registered = {}, r.inserted = {}, r.sheet.flush();
62
+ [r, n]
63
+ ), u = C(
64
+ (o) => {
65
+ r && o.key === "Escape" && n();
875
66
  },
876
- sheet: r.sheet,
877
- cache: r,
878
- getRegisteredStyles: yt.bind(null, r.registered),
879
- merge: ut.bind(null, r.registered, n)
880
- };
881
- }, Rn = function e(t) {
882
- for (var r = "", n = 0; n < t.length; n++) {
883
- var s = t[n];
884
- if (s != null) {
885
- var a = void 0;
886
- switch (typeof s) {
887
- case "boolean":
888
- break;
889
- case "object": {
890
- if (Array.isArray(s))
891
- a = e(s);
892
- else {
893
- a = "";
894
- for (var l in s)
895
- s[l] && l && (a && (a += " "), a += l);
896
- }
897
- break;
898
- }
899
- default:
900
- a = s;
901
- }
902
- a && (r && (r += " "), r += a);
67
+ [r, n]
68
+ );
69
+ return I(() => {
70
+ if (r)
71
+ return setTimeout(() => s.current?.focus(), 0), document.addEventListener("mousedown", a), document.addEventListener("keydown", u), () => {
72
+ document.removeEventListener("mousedown", a), document.removeEventListener("keydown", u);
73
+ };
74
+ }, [r, a, u]), /* @__PURE__ */ t(
75
+ "div",
76
+ {
77
+ ref: s,
78
+ role: "menu",
79
+ "aria-hidden": !r,
80
+ tabIndex: -1,
81
+ className: `dropdown-main ${r ? "opened" : "closed"}`,
82
+ onClick: (o) => o.stopPropagation(),
83
+ children: l
903
84
  }
904
- }
905
- return r;
906
- }, Tn = En({
907
- key: "css"
908
- }), Pn = Tn.css;
909
- const On = Ee(function(e, t) {
910
- var xe, le, ye;
85
+ );
86
+ }, ke = te(function(e, l) {
911
87
  const {
912
88
  state: r,
913
89
  value: n,
914
90
  onChange: s,
915
91
  options: a = [],
916
- name: l = "",
917
- id: c = "",
918
- label: o = "",
92
+ name: u = "",
93
+ id: o = "",
94
+ label: c = "",
919
95
  containerClassName: d = "",
920
- inputContainerClassName: u = "",
921
- helperText: m = "",
922
- placeholder: b = "",
923
- multiple: g = !1,
924
- ...f
925
- } = e, [h, C] = I("");
926
- V(() => {
927
- if (!g && n && !Array.isArray(n)) {
928
- C(String(n.value ?? n.name ?? ""));
96
+ inputContainerClassName: p = "",
97
+ helperText: h = "",
98
+ placeholder: m = "",
99
+ multiple: i = !1,
100
+ ...v
101
+ } = e, [S, $] = T("");
102
+ I(() => {
103
+ if (!i && n && !Array.isArray(n)) {
104
+ $(String(n.value ?? n.name ?? ""));
929
105
  return;
930
106
  }
931
- C("");
932
- }, [g, n]);
933
- const [y, v] = I(!1), $ = a.filter((w) => {
934
- const z = String(w.value ?? w.name).toLowerCase().includes(h == null ? void 0 : h.toLowerCase());
935
- return Array.isArray(n) && n.length ? !n.some((_) => _.id === w.id) : n && !Array.isArray(n) ? n.id !== w.id : z;
936
- }), T = Q(null), A = Q(null), [P, N] = I(!1), q = Q(null);
937
- V(() => {
938
- const w = (_) => {
939
- T.current && !T.current.contains(_.target) && v(!1);
940
- }, z = (_) => {
941
- _.key === "Escape" && v(!1);
107
+ $("");
108
+ }, [i, n]);
109
+ const [w, L] = T(!1), E = A(
110
+ () => a.filter((b) => {
111
+ const M = String(b.value ?? b.name).toLowerCase().includes(S?.toLowerCase());
112
+ return Array.isArray(n) && n.length ? M && !n.some((W) => W.id === b.id) : n && !Array.isArray(n) ? M && n.id !== b.id : M;
113
+ }),
114
+ [a, n, S]
115
+ ), N = B(null), y = B(null), [P, R] = T(!1), O = B(null);
116
+ I(() => {
117
+ const b = (W) => {
118
+ N.current && !N.current.contains(W.target) && L(!1);
119
+ }, M = (W) => {
120
+ W.key === "Escape" && L(!1);
942
121
  };
943
- return document.addEventListener("mousedown", w), document.addEventListener("keydown", z), () => {
944
- document.removeEventListener("mousedown", w), document.removeEventListener("keydown", z);
122
+ return document.addEventListener("mousedown", b), document.addEventListener("keydown", M), () => {
123
+ document.removeEventListener("mousedown", b), document.removeEventListener("keydown", M);
945
124
  };
946
125
  }, []);
947
- const we = (w) => {
948
- C(w.target.value);
949
- }, ue = F(
950
- (w) => {
951
- w ? g ? (C(""), Array.isArray(n) && n.length ? s([...n, w]) : s([w])) : (C(String(w.name ?? w.value ?? "")), s(w)) : s(null), v(!1);
126
+ const F = C((b) => {
127
+ $(b.target.value);
128
+ }, []), j = C(
129
+ (b) => {
130
+ b ? i ? ($(""), Array.isArray(n) && n.length ? s([...n, b]) : s([b])) : ($(String(b.name ?? b.value ?? "")), s(b)) : s(null), L(!1);
952
131
  },
953
- [g, s, n]
954
- ), ce = F(
955
- (w) => {
132
+ [i, s, n]
133
+ ), z = C(
134
+ (b) => {
956
135
  if (!Array.isArray(n)) {
957
136
  s(null);
958
137
  return;
959
138
  }
960
- if (w != null)
961
- if (w !== -1) {
962
- const z = n.filter((_, Y) => Y !== w);
963
- z.length ? s(z) : s(null);
964
- } else {
965
- const [z] = n;
966
- s([z]);
967
- }
968
- else
969
- s(null);
139
+ const M = n.filter((W, f) => f !== b);
140
+ M.length ? s(M) : s(null);
970
141
  },
971
142
  [s, n]
972
- );
973
- return V(() => {
974
- var _, Y, te;
975
- const w = ((_ = q.current) == null ? void 0 : _.offsetWidth) ?? 0, z = ((te = (Y = t ?? A) == null ? void 0 : Y.current) == null ? void 0 : te.offsetWidth) ?? 0;
976
- w > z * 0.4 ? N(!0) : N(!1);
977
- }, [n]), /* @__PURE__ */ k(
143
+ ), J = C(() => {
144
+ Array.isArray(n) && s([n[0]]);
145
+ }, [s, n]);
146
+ return ve(() => {
147
+ const b = O.current?.offsetWidth ?? 0, M = N.current?.offsetWidth ?? 0;
148
+ R(b > M * 0.4);
149
+ }, [n]), /* @__PURE__ */ g(
978
150
  "div",
979
151
  {
980
152
  className: `autocomplete-input-container ${d}`,
981
- ref: T,
153
+ ref: N,
982
154
  children: [
983
- /* @__PURE__ */ k("div", { className: "autocomplete-value-input-container", children: [
984
- /* @__PURE__ */ i(
985
- Ie,
155
+ /* @__PURE__ */ g("div", { className: "autocomplete-value-input-container", children: [
156
+ /* @__PURE__ */ t(
157
+ ne,
986
158
  {
987
159
  state: r,
988
- name: l,
989
- id: c,
990
- value: h,
991
- onChange: we,
992
- placeholder: b,
993
- helperText: m,
994
- onFocus: () => v(!0),
995
- label: o,
996
- containerClassName: `autocomplete-text-input ${u}`,
997
- ref: t ?? A,
998
- ...f,
999
- children: !g && n && !Array.isArray(n) && (n.value || n.name) && /* @__PURE__ */ i(
1000
- "button",
160
+ name: u,
161
+ id: o,
162
+ value: S,
163
+ onChange: F,
164
+ placeholder: m,
165
+ helperText: h,
166
+ onFocus: () => L(!0),
167
+ label: c,
168
+ containerClassName: `autocomplete-text-input ${p}`,
169
+ ref: l ?? y,
170
+ ...v,
171
+ children: !i && n && !Array.isArray(n) && (n.value || n.name) && /* @__PURE__ */ t(
172
+ q,
1001
173
  {
1002
- type: "button",
174
+ icon: /* @__PURE__ */ t(ce, {}),
1003
175
  className: "autocomplete-delete-button",
1004
- onClick: (w) => {
1005
- ue(), w.stopPropagation();
1006
- },
1007
- children: /* @__PURE__ */ i(Qe, {})
176
+ onClick: (b) => {
177
+ j(), b.stopPropagation();
178
+ }
1008
179
  }
1009
180
  )
1010
181
  }
1011
182
  ),
1012
- g && Array.isArray(n) && n.length ? /* @__PURE__ */ i("ul", { ref: q, className: "autocomplete-value-container", children: P ? /* @__PURE__ */ k($e, { children: [
1013
- /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
1014
- fe,
183
+ i && Array.isArray(n) && n.length ? /* @__PURE__ */ t("ul", { ref: O, className: "autocomplete-value-container", children: P ? /* @__PURE__ */ g(ee, { children: [
184
+ /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
185
+ G,
1015
186
  {
1016
- text: ((xe = n[0]) == null ? void 0 : xe.value) ?? ((le = n[0]) == null ? void 0 : le.name),
1017
- onDelete: (w) => {
1018
- ce(0), w.stopPropagation();
187
+ text: n[0]?.value ?? n[0]?.name,
188
+ onDelete: (b) => {
189
+ z(0), b.stopPropagation();
1019
190
  }
1020
191
  }
1021
192
  ) }),
1022
- n.length > 1 && /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
1023
- fe,
193
+ n.length > 1 && /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
194
+ G,
1024
195
  {
1025
196
  text: `+${n.length - 1}`,
1026
- onDelete: (w) => {
1027
- ce(-1), w.stopPropagation();
197
+ onDelete: (b) => {
198
+ J(), b.stopPropagation();
1028
199
  }
1029
200
  }
1030
201
  ) })
1031
- ] }) : n.map((w, z) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
1032
- fe,
202
+ ] }) : n.map((b, M) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
203
+ G,
1033
204
  {
1034
- text: String(w.value ?? w.name),
1035
- onDelete: (_) => {
1036
- ce(z), _.stopPropagation();
205
+ text: String(b.value ?? b.name),
206
+ onDelete: (W) => {
207
+ z(M), W.stopPropagation();
1037
208
  }
1038
209
  }
1039
- ) }, w.id ?? w.value ?? w.name)) }) : null
210
+ ) }, b.id ?? b.value ?? b.name)) }) : null
1040
211
  ] }),
1041
- y && /* @__PURE__ */ i(
212
+ w && /* @__PURE__ */ t(
1042
213
  "ul",
1043
214
  {
1044
- className: `autocomplete-suggestions-container ${Pn({ width: (ye = T.current) == null ? void 0 : ye.offsetWidth })}`,
1045
- children: $.map((w) => /* @__PURE__ */ i(
215
+ className: "autocomplete-suggestions-container",
216
+ style: { width: N.current?.offsetWidth },
217
+ children: E.map((b) => /* @__PURE__ */ t(
1046
218
  "li",
1047
219
  {
1048
220
  className: "autocomplete-suggestion-item",
1049
- onClick: (z) => {
1050
- ue(w), z.stopPropagation();
221
+ onClick: (M) => {
222
+ j(b), M.stopPropagation();
1051
223
  },
1052
- children: w.value ?? w.name
224
+ children: b.value ?? b.name
1053
225
  },
1054
- w.id ?? w.value ?? w.name
226
+ b.id ?? b.value ?? b.name
1055
227
  ))
1056
228
  }
1057
229
  )
1058
230
  ]
1059
231
  }
1060
232
  );
1061
- });
1062
- const Fn = Ee(function(e, t) {
233
+ }), Ae = te(function(e, l) {
1063
234
  const {
1064
235
  checked: r,
1065
236
  onChange: n,
1066
237
  name: s = "",
1067
238
  id: a = "",
1068
- label: l = "",
1069
- containerClassName: c = "",
1070
- inputClassName: o = "",
239
+ label: u = "",
240
+ containerClassName: o = "",
241
+ inputClassName: c = "",
1071
242
  labelClassName: d = "",
1072
- ...u
243
+ ...p
1073
244
  } = e;
1074
- return /* @__PURE__ */ k("label", { className: `input-check-container ${c}`, children: [
1075
- /* @__PURE__ */ i(
245
+ return /* @__PURE__ */ g("label", { className: `input-check-container ${o}`, children: [
246
+ /* @__PURE__ */ t(
1076
247
  "input",
1077
248
  {
1078
249
  id: a,
1079
- ref: t,
250
+ ref: l,
1080
251
  name: s,
1081
252
  type: "checkbox",
1082
253
  checked: r,
1083
254
  onChange: n,
1084
- className: `input-check ${o}`,
1085
- ...u
255
+ className: `input-check ${c}`,
256
+ ...p
1086
257
  }
1087
258
  ),
1088
- /* @__PURE__ */ i("span", { className: `input-check-label ${d}`, children: l })
259
+ /* @__PURE__ */ t("span", { className: `input-check-label ${d}`, children: u })
1089
260
  ] });
1090
261
  });
1091
- function dt(e, t = 25) {
1092
- if (e.length <= t)
1093
- return e;
262
+ function de(e, l = 25) {
263
+ if (e.length <= l) return e;
1094
264
  const r = e.lastIndexOf(".");
1095
265
  if (r === -1)
1096
- return e.slice(0, t - 3) + "...";
1097
- const n = e.slice(0, r), s = e.slice(r), a = t - s.length - 3;
266
+ return e.slice(0, l - 3) + "...";
267
+ const n = e.slice(0, r), s = e.slice(r), a = l - s.length - 3;
1098
268
  return n.slice(0, a) + "..." + s;
1099
269
  }
1100
- const fr = Ee(function(e, t) {
1101
- var v, $;
270
+ const ht = te(function(e, l) {
1102
271
  const {
1103
272
  children: r,
1104
273
  label: n,
1105
274
  containerClassName: s = "",
1106
275
  inputClassName: a = "",
1107
- labelClassName: l = "",
1108
- helperText: c = "",
1109
- helperTextClassName: o = "",
276
+ labelClassName: u = "",
277
+ helperText: o = "",
278
+ helperTextClassName: c = "",
1110
279
  iconClassName: d = "",
1111
- multiple: u = !1,
1112
- onChange: m,
1113
- onClear: b,
1114
- ...g
1115
- } = e, [f, h] = I([]), C = (T) => {
1116
- if (T.target.files) {
1117
- const A = Array.from(T.target.files);
1118
- h((P) => [...P, ...A]);
1119
- }
1120
- m && m(T);
1121
- }, y = (T) => {
1122
- h((A) => {
1123
- const P = A.filter((N, q) => q !== T);
1124
- return P.length === 0 && (b == null || b()), P;
1125
- });
1126
- };
1127
- return /* @__PURE__ */ k("div", { className: `file-input-container ${s}`, children: [
1128
- f.length === 0 && /* @__PURE__ */ k("label", { htmlFor: g.name, className: `${l}`, children: [
280
+ multiple: p = !1,
281
+ onChange: h,
282
+ onClear: m,
283
+ ...i
284
+ } = e, [v, S] = T([]), $ = C(
285
+ (N) => {
286
+ if (N.target.files) {
287
+ const y = Array.from(N.target.files);
288
+ S((P) => [...P, ...y]);
289
+ }
290
+ h?.(N);
291
+ },
292
+ [h]
293
+ ), w = C(
294
+ (N) => {
295
+ S((y) => {
296
+ const P = y.filter((R, O) => O !== N);
297
+ return P.length === 0 && m?.(), P;
298
+ });
299
+ },
300
+ [m]
301
+ ), L = C(() => {
302
+ S([]), m?.();
303
+ }, [m]), E = C(
304
+ (N) => {
305
+ N.currentTarget.value = "";
306
+ },
307
+ []
308
+ );
309
+ return /* @__PURE__ */ g("div", { className: `file-input-container ${s}`, children: [
310
+ v.length === 0 && /* @__PURE__ */ g("label", { htmlFor: i.name, className: `${u}`, children: [
1129
311
  n,
1130
- /* @__PURE__ */ i(
312
+ /* @__PURE__ */ t(
1131
313
  "input",
1132
314
  {
1133
315
  type: "file",
1134
- ref: t,
1135
- multiple: u,
1136
- onClick: (T) => {
1137
- T.currentTarget.value = "";
1138
- },
1139
- onChange: C,
316
+ ref: l,
317
+ multiple: p,
318
+ onClick: E,
319
+ onChange: $,
1140
320
  className: `file-input ${a}`,
1141
- ...g
321
+ ...i
1142
322
  }
1143
323
  ),
1144
- g.required ? " *" : ""
324
+ i.required ? " *" : ""
1145
325
  ] }),
1146
- f.length > 1 && /* @__PURE__ */ i("ul", { className: "file-preview-list", children: f.map((T, A) => /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i("span", { "data-tooltip-id": "tooltip", "data-tooltip-content": T.name, children: /* @__PURE__ */ i(
1147
- fe,
326
+ v.length > 1 && /* @__PURE__ */ t("ul", { className: "file-preview-list", children: v.map((N, y) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(le, { content: N.name, children: /* @__PURE__ */ t(
327
+ G,
1148
328
  {
1149
- text: dt(T.name, 25),
1150
- onDelete: () => y(A)
329
+ text: de(N.name, 25),
330
+ onDelete: () => w(y)
1151
331
  }
1152
- ) }) }, A)) }),
1153
- f.length === 1 && /* @__PURE__ */ k("div", { className: "file-preview", children: [
1154
- /* @__PURE__ */ i(_n, { className: `file-icon ${d}` }),
1155
- /* @__PURE__ */ i(
1156
- "span",
1157
- {
1158
- className: "!cursor-default",
1159
- "data-tooltip-id": "tooltip",
1160
- "data-tooltip-content": ((v = f[0]) == null ? void 0 : v.name) ?? "",
1161
- children: dt((($ = f[0]) == null ? void 0 : $.name) ?? "", 25)
1162
- }
1163
- ),
1164
- /* @__PURE__ */ i(
1165
- "button",
1166
- {
1167
- onClick: () => {
1168
- h([]), b == null || b();
1169
- },
1170
- className: "chip-delete-button",
1171
- type: "button",
1172
- children: /* @__PURE__ */ i(Qe, {})
1173
- }
1174
- )
332
+ ) }) }, `${N.name}-${N.lastModified}`)) }),
333
+ v.length === 1 && /* @__PURE__ */ g("div", { className: "file-preview", children: [
334
+ /* @__PURE__ */ t(Me, { className: `file-icon ${d}` }),
335
+ /* @__PURE__ */ t(le, { content: v[0]?.name ?? "", children: /* @__PURE__ */ t("span", { className: "!cursor-default", children: de(v[0]?.name ?? "", 25) }) }),
336
+ /* @__PURE__ */ t(q, { icon: /* @__PURE__ */ t(ce, {}), onClick: L, type: "button" })
1175
337
  ] }),
1176
338
  r,
1177
- !!c && /* @__PURE__ */ i("p", { className: `file-input-helper-text ${o}`, children: c })
339
+ !!o && /* @__PURE__ */ t("p", { className: `file-input-helper-text ${c}`, children: o })
1178
340
  ] });
1179
341
  });
1180
- var Je = /* @__PURE__ */ ((e) => (e.error = "error", e.good = "good", e.default = "default", e))(Je || {});
1181
- const Nt = (e) => {
342
+ var oe = /* @__PURE__ */ ((e) => (e.error = "error", e.good = "good", e.default = "default", e))(oe || {});
343
+ const he = (e) => {
1182
344
  switch (e) {
1183
345
  case "error":
1184
346
  return "input-error";
@@ -1187,7 +349,7 @@ const Nt = (e) => {
1187
349
  default:
1188
350
  return "input-normal";
1189
351
  }
1190
- }, $t = (e) => {
352
+ }, me = (e) => {
1191
353
  switch (e) {
1192
354
  case "error":
1193
355
  return "input-label-error";
@@ -1196,7 +358,7 @@ const Nt = (e) => {
1196
358
  default:
1197
359
  return "input-label-normal";
1198
360
  }
1199
- }, St = (e) => {
361
+ }, fe = (e) => {
1200
362
  switch (e) {
1201
363
  case "error":
1202
364
  return "input-helper-text-error";
@@ -1205,112 +367,133 @@ const Nt = (e) => {
1205
367
  default:
1206
368
  return "input-helper-text-normal";
1207
369
  }
1208
- }, Xe = Ee(function(e, t) {
370
+ }, ie = te(function(e, l) {
1209
371
  const {
1210
372
  value: r,
1211
373
  onChange: n,
1212
374
  options: s,
1213
375
  containerClassName: a = "",
1214
- inputClassName: l = "",
1215
- labelClassName: c = "",
1216
- helperText: o = "",
376
+ inputClassName: u = "",
377
+ labelClassName: o = "",
378
+ helperText: c = "",
1217
379
  helperTextClassName: d = "",
1218
- placeholder: u = "",
1219
- label: m = "",
1220
- name: b = "",
1221
- id: g = "",
1222
- state: f = Je.default,
1223
- children: h,
1224
- ...C
380
+ label: p = "",
381
+ name: h = "",
382
+ id: m = "",
383
+ state: i = oe.default,
384
+ children: v,
385
+ ...S
1225
386
  } = e;
1226
- return /* @__PURE__ */ k("div", { className: `select-input-container ${a}`, children: [
1227
- /* @__PURE__ */ i(
387
+ return /* @__PURE__ */ g("div", { className: `select-input-container ${a}`, children: [
388
+ /* @__PURE__ */ t(
1228
389
  "select",
1229
390
  {
1230
- ...C,
1231
- id: g,
1232
- ref: t,
1233
- name: b,
391
+ ...S,
392
+ id: m,
393
+ ref: l,
394
+ name: h,
1234
395
  value: r,
1235
396
  onChange: n,
1236
- className: `select-input ${Nt(f)} peer ${l}`,
1237
- children: s == null ? void 0 : s.map((y) => /* @__PURE__ */ i("option", { value: y.id, children: y.value ?? y.name ?? y.id }, y.id))
397
+ className: `select-input ${he(i)} peer ${u}`,
398
+ children: s?.map(($) => /* @__PURE__ */ t("option", { value: $.id, children: $.value ?? $.name ?? $.id }, $.id))
1238
399
  }
1239
400
  ),
1240
- /* @__PURE__ */ i(
401
+ /* @__PURE__ */ t(
1241
402
  "label",
1242
403
  {
1243
- htmlFor: b,
1244
- className: `select-input-label ${$t(f)} ${c}`,
1245
- children: m
404
+ htmlFor: m,
405
+ className: `select-input-label ${me(i)} ${o}`,
406
+ children: p
1246
407
  }
1247
408
  ),
1248
- h,
1249
- (u || o) && /* @__PURE__ */ i(
409
+ v,
410
+ c && /* @__PURE__ */ t(
1250
411
  "p",
1251
412
  {
1252
- className: `select-input-helper-text ${St(f)} ${d}`,
1253
- children: f !== "error" && f !== "good" ? u : o
413
+ className: `select-input-helper-text ${fe(i)} ${d}`,
414
+ children: c
1254
415
  }
1255
416
  )
1256
417
  ] });
1257
- });
1258
- const Ie = Ee(function(e, t) {
418
+ }), ne = te(function(e, l) {
1259
419
  const {
1260
420
  children: r,
1261
- state: n = Je.default,
421
+ state: n = oe.default,
1262
422
  label: s = "",
1263
423
  containerClassName: a = "",
1264
- inputClassName: l = "",
1265
- labelClassName: c = "",
1266
- helperText: o = "",
424
+ inputClassName: u = "",
425
+ labelClassName: o = "",
426
+ helperText: c = "",
1267
427
  helperTextClassName: d = "",
1268
- value: u = "",
1269
- ...m
428
+ value: p = "",
429
+ ...h
1270
430
  } = e;
1271
- return /* @__PURE__ */ k("div", { className: `text-input-container ${a}`, children: [
1272
- /* @__PURE__ */ i(
431
+ return /* @__PURE__ */ g("div", { className: `text-input-container ${a}`, children: [
432
+ /* @__PURE__ */ t(
1273
433
  "input",
1274
434
  {
1275
- ref: t,
1276
- value: u,
1277
- className: `text-input ${Nt(n)} peer ${l} ${u ? "has-value" : ""} ${m.placeholder ? "has-placeholder" : ""}`,
1278
- ...m
435
+ ref: l,
436
+ value: p,
437
+ className: `text-input ${he(n)} peer ${u} ${p ? "has-value" : ""} ${h.placeholder ? "has-placeholder" : ""}`,
438
+ ...h
1279
439
  }
1280
440
  ),
1281
- !!s && /* @__PURE__ */ k(
441
+ !!s && /* @__PURE__ */ g(
1282
442
  "label",
1283
443
  {
1284
- htmlFor: m.name,
1285
- className: `text-input-label ${$t(n)} ${c}`,
444
+ htmlFor: h.id,
445
+ className: `text-input-label ${me(n)} ${o}`,
1286
446
  children: [
1287
447
  s,
1288
- m.required ? " *" : ""
448
+ h.required ? " *" : ""
1289
449
  ]
1290
450
  }
1291
451
  ),
1292
452
  r,
1293
- !!o && /* @__PURE__ */ i(
453
+ !!c && /* @__PURE__ */ t(
1294
454
  "p",
1295
455
  {
1296
- className: `text-input-helper-text ${St(n)} ${d}`,
1297
- children: o
456
+ className: `text-input-helper-text ${fe(n)} ${d}`,
457
+ children: c
1298
458
  }
1299
459
  )
1300
460
  ] });
1301
- });
1302
- function Mn(e) {
461
+ }), q = (e) => {
1303
462
  const {
1304
- color: t = "stroke-blue-800",
463
+ children: l,
464
+ icon: r,
465
+ type: n = "button",
466
+ className: s = "",
467
+ variant: a = "text",
468
+ color: u = "default",
469
+ iconClassName: o = "",
470
+ ...c
471
+ } = e;
472
+ return /* @__PURE__ */ g(
473
+ "button",
474
+ {
475
+ type: n,
476
+ className: `icon-button ${s} ${a} ${u}`,
477
+ ...c,
478
+ children: [
479
+ /* @__PURE__ */ t("span", { className: o, children: r }),
480
+ l
481
+ ]
482
+ }
483
+ );
484
+ };
485
+ function Te(e) {
486
+ const {
487
+ color: l = "stroke-blue-800",
1305
488
  className: r = "",
1306
489
  loaderClass: n = "",
1307
490
  strokeWidth: s = "4",
1308
491
  ...a
1309
492
  } = e;
1310
- return /* @__PURE__ */ i("div", { ...a, className: `loading ${r}`, children: /* @__PURE__ */ i("div", { className: "loader-container", children: /* @__PURE__ */ i("div", { className: `loader ${n}`, children: /* @__PURE__ */ i("svg", { className: "circular", viewBox: "25 25 50 50", children: /* @__PURE__ */ i(
493
+ return /* @__PURE__ */ t("div", { ...a, className: `loading ${r}`, children: /* @__PURE__ */ t("div", { className: "loader-container", children: /* @__PURE__ */ t("div", { className: `loader ${n}`, children: /* @__PURE__ */ t("svg", { className: "circular", viewBox: "25 25 50 50", children: /* @__PURE__ */ t(
1311
494
  "circle",
1312
495
  {
1313
- className: `path ${t}`,
496
+ className: `path ${l}`,
1314
497
  cx: "50",
1315
498
  cy: "50",
1316
499
  r: "20",
@@ -1320,341 +503,326 @@ function Mn(e) {
1320
503
  }
1321
504
  ) }) }) }) });
1322
505
  }
1323
- function Ln(e) {
1324
- const { className: t = "" } = e;
1325
- return /* @__PURE__ */ i(
506
+ function Fe(e) {
507
+ const { className: l = "" } = e;
508
+ return /* @__PURE__ */ t(
1326
509
  "svg",
1327
510
  {
1328
- className: t,
511
+ className: l,
1329
512
  xmlns: "http://www.w3.org/2000/svg",
1330
513
  viewBox: "0 0 512 512",
1331
514
  fill: "currentColor",
1332
- children: /* @__PURE__ */ i("path", { d: "M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z" })
515
+ children: /* @__PURE__ */ t("path", { d: "M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z" })
1333
516
  }
1334
517
  );
1335
518
  }
1336
- function In(e) {
1337
- const { className: t = "" } = e;
1338
- return /* @__PURE__ */ i(
519
+ function Le(e) {
520
+ const { className: l = "" } = e;
521
+ return /* @__PURE__ */ t(
1339
522
  "svg",
1340
523
  {
1341
- className: t,
524
+ className: l,
1342
525
  xmlns: "http://www.w3.org/2000/svg",
1343
526
  viewBox: "0 0 320 512",
1344
527
  fill: "currentColor",
1345
- children: /* @__PURE__ */ i("path", { d: "M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z" })
528
+ children: /* @__PURE__ */ t("path", { d: "M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z" })
1346
529
  }
1347
530
  );
1348
531
  }
1349
- function Dn(e) {
1350
- const { className: t = "" } = e;
1351
- return /* @__PURE__ */ i(
532
+ function Pe(e) {
533
+ const { className: l = "" } = e;
534
+ return /* @__PURE__ */ t(
1352
535
  "svg",
1353
536
  {
1354
- className: t,
537
+ className: l,
1355
538
  xmlns: "http://www.w3.org/2000/svg",
1356
539
  viewBox: "0 0 320 512",
1357
540
  fill: "currentColor",
1358
- children: /* @__PURE__ */ i("path", { d: "M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z" })
541
+ children: /* @__PURE__ */ t("path", { d: "M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z" })
1359
542
  }
1360
543
  );
1361
544
  }
1362
- function zn(e) {
1363
- const { className: t = "" } = e;
1364
- return /* @__PURE__ */ i(
545
+ function Oe(e) {
546
+ const { className: l = "" } = e;
547
+ return /* @__PURE__ */ t(
1365
548
  "svg",
1366
549
  {
1367
- className: t,
550
+ className: l,
1368
551
  xmlns: "http://www.w3.org/2000/svg",
1369
552
  viewBox: "0 0 512 512",
1370
553
  fill: "currentColor",
1371
- children: /* @__PURE__ */ i("path", { d: "M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z" })
554
+ children: /* @__PURE__ */ t("path", { d: "M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z" })
1372
555
  }
1373
556
  );
1374
557
  }
1375
- function Qe(e) {
1376
- const { className: t = "" } = e;
1377
- return /* @__PURE__ */ i(
558
+ function ce(e) {
559
+ const { className: l = "" } = e;
560
+ return /* @__PURE__ */ t(
1378
561
  "svg",
1379
562
  {
1380
- className: t,
563
+ className: l,
1381
564
  xmlns: "http://www.w3.org/2000/svg",
1382
565
  viewBox: "0 0 384 512",
1383
566
  fill: "currentColor",
1384
- children: /* @__PURE__ */ i("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z" })
567
+ children: /* @__PURE__ */ t("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z" })
1385
568
  }
1386
569
  );
1387
570
  }
1388
- function _n(e) {
1389
- const { className: t = "" } = e;
1390
- return /* @__PURE__ */ i(
571
+ function Me(e) {
572
+ const { className: l = "" } = e;
573
+ return /* @__PURE__ */ t(
1391
574
  "svg",
1392
575
  {
1393
- className: t,
576
+ className: l,
1394
577
  xmlns: "http://www.w3.org/2000/svg",
1395
578
  viewBox: "0 0 640 640",
1396
579
  fill: "currentColor",
1397
- children: /* @__PURE__ */ i("path", { d: "M192 64C156.7 64 128 92.7 128 128L128 512C128 547.3 156.7 576 192 576L448 576C483.3 576 512 547.3 512 512L512 234.5C512 217.5 505.3 201.2 493.3 189.2L386.7 82.7C374.7 70.7 358.5 64 341.5 64L192 64zM453.5 240L360 240C346.7 240 336 229.3 336 216L336 122.5L453.5 240z" })
580
+ children: /* @__PURE__ */ t("path", { d: "M192 64C156.7 64 128 92.7 128 128L128 512C128 547.3 156.7 576 192 576L448 576C483.3 576 512 547.3 512 512L512 234.5C512 217.5 505.3 201.2 493.3 189.2L386.7 82.7C374.7 70.7 358.5 64 341.5 64L192 64zM453.5 240L360 240C346.7 240 336 229.3 336 216L336 122.5L453.5 240z" })
1398
581
  }
1399
582
  );
1400
583
  }
1401
- const Wn = (e) => {
1402
- const { className: t = "" } = e;
1403
- return /* @__PURE__ */ i("svg", { className: t, viewBox: "0 0 16 16", children: /* @__PURE__ */ i("path", { d: "M9 15H7a1 1 0 010-2h2a1 1 0 010 2zM11 11H5a1 1 0 010-2h6a1 1 0 010 2zM13 7H3a1 1 0 010-2h10a1 1 0 010 2zM15 3H1a1 1 0 010-2h14a1 1 0 010 2z" }) });
584
+ const ze = (e) => {
585
+ const { className: l = "" } = e;
586
+ return /* @__PURE__ */ t("svg", { className: l, viewBox: "0 0 16 16", children: /* @__PURE__ */ t("path", { d: "M9 15H7a1 1 0 010-2h2a1 1 0 010 2zM11 11H5a1 1 0 010-2h6a1 1 0 010 2zM13 7H3a1 1 0 010-2h10a1 1 0 010 2zM15 3H1a1 1 0 010-2h14a1 1 0 010 2z" }) });
1404
587
  };
1405
- var de = /* @__PURE__ */ ((e) => (e[e.text = 0] = "text", e[e.number = 1] = "number", e[e.select = 2] = "select", e[e.autocomplete = 3] = "autocomplete", e[e.date = 4] = "date", e[e.check = 5] = "check", e))(de || {}), me = /* @__PURE__ */ ((e) => (e.ASC = "ASC", e.DESC = "DESC", e))(me || {}), K = /* @__PURE__ */ ((e) => (e[e.update = 0] = "update", e[e.reset = 1] = "reset", e))(K || {});
1406
- const ft = (e) => {
588
+ var X = /* @__PURE__ */ ((e) => (e[e.text = 0] = "text", e[e.number = 1] = "number", e[e.select = 2] = "select", e[e.autocomplete = 3] = "autocomplete", e[e.date = 4] = "date", e[e.check = 5] = "check", e))(X || {}), Q = /* @__PURE__ */ ((e) => (e.ASC = "ASC", e.DESC = "DESC", e))(Q || {}), _ = /* @__PURE__ */ ((e) => (e[e.update = 0] = "update", e[e.reset = 1] = "reset", e))(_ || {});
589
+ const ue = (e) => {
1407
590
  if (e) {
1408
- const t = {}, r = Object.keys(e);
1409
- return r == null || r.forEach((n) => {
1410
- t[n] = { value: e[n] };
1411
- }), t;
591
+ const l = {};
592
+ return Object.keys(e)?.forEach((n) => {
593
+ l[n] = { value: e[n] };
594
+ }), l;
1412
595
  }
1413
596
  return {};
1414
597
  };
1415
- function Bn(e, t) {
1416
- const { type: r } = t;
598
+ function De(e, l) {
599
+ const { type: r } = l;
1417
600
  switch (r) {
1418
- case K.reset:
601
+ case _.reset:
1419
602
  return {};
1420
- case K.update: {
1421
- const { toUpdate: n } = t;
603
+ case _.update: {
604
+ const { toUpdate: n } = l;
1422
605
  return { ...e, ...n };
1423
606
  }
1424
607
  default:
1425
608
  return e;
1426
609
  }
1427
610
  }
1428
- const kt = He({}), jn = (e) => {
1429
- const { children: t } = e, { filters: r } = oe(), [n, s] = Dt(
1430
- Bn,
1431
- ft(r)
611
+ const be = re({}), Ie = (e) => {
612
+ const { children: l } = e, { filters: r } = H(), [n, s] = we(
613
+ De,
614
+ ue(r)
1432
615
  );
1433
- V(() => {
1434
- s({ type: K.reset });
1435
- const l = ft(r);
1436
- Object.keys(l).length && s({
1437
- type: K.update,
1438
- toUpdate: l
616
+ I(() => {
617
+ s({ type: _.reset });
618
+ const u = ue(r);
619
+ Object.keys(u).length && s({
620
+ type: _.update,
621
+ toUpdate: u
1439
622
  });
1440
623
  }, [r]);
1441
624
  const a = {
1442
625
  currentFilters: n,
1443
626
  setCurrentFilters: s
1444
627
  };
1445
- return /* @__PURE__ */ i(kt.Provider, { value: a, children: t });
1446
- }, Ce = () => {
1447
- const e = qe(kt);
628
+ return /* @__PURE__ */ t(be.Provider, { value: a, children: l });
629
+ }, Y = () => {
630
+ const e = ae(be);
1448
631
  if (e === void 0)
1449
632
  throw new Error("tableOptionsContext must be used within a Provider");
1450
633
  return e;
1451
- }, Vn = [20, 50, 100], At = He({}), hr = (e) => {
1452
- const { children: t } = e, [r, n] = I(0), [s, a] = I(20), [l, c] = I(0), [o, d] = I("id"), [u, m] = I(me.DESC), [b, g] = I({}), f = F(
1453
- ($, T) => {
1454
- let A = u;
1455
- if (o === $)
1456
- switch (u) {
1457
- case me.ASC:
1458
- A = me.DESC;
1459
- break;
1460
- default:
1461
- A = me.ASC;
1462
- break;
1463
- }
1464
- d($), m(A), T && T($, A);
634
+ }, _e = [20, 50, 100], ge = re({}), mt = (e) => {
635
+ const { children: l } = e, [r, n] = T(0), [s, a] = T(20), [u, o] = T(0), [c, d] = T("id"), [p, h] = T(Q.DESC), [m, i] = T({}), v = C(
636
+ (E, N) => {
637
+ let y = p;
638
+ c === E && (p === Q.ASC ? y = Q.DESC : y = Q.ASC), d(E), h(y), N && N(E, y);
1465
639
  },
1466
- [o, u]
1467
- ), h = F(($) => {
1468
- const T = Object.entries($).reduce(
1469
- (A, [P, N]) => (N && typeof N.value < "u" && N.value !== null && (A[P] = N.value), A),
640
+ [c, p]
641
+ ), S = C((E) => {
642
+ const N = Object.entries(E).reduce(
643
+ (y, [P, R]) => (R && typeof R.value < "u" && R.value !== null && (y[P] = R.value), y),
1470
644
  {}
1471
645
  );
1472
- g(T);
1473
- }, []), C = F(
1474
- ($) => {
1475
- $ ? (delete b[$.toLowerCase()], g({ ...b })) : g({});
646
+ i(N);
647
+ }, []), $ = C(
648
+ (E) => {
649
+ E ? (delete m[E.toLowerCase()], i({ ...m })) : i({});
1476
650
  },
1477
- [b]
1478
- ), y = D(() => Object.keys(b).length, [b]), v = {
1479
- onSort: f,
651
+ [m]
652
+ ), w = A(() => Object.keys(m).length, [m]), L = {
653
+ onSort: v,
1480
654
  total: r,
1481
655
  setTotal: n,
1482
- sortingBy: o,
656
+ sortingBy: c,
1483
657
  setSortingBy: d,
1484
- sortingOrder: u,
1485
- setSortingOrder: m,
658
+ sortingOrder: p,
659
+ setSortingOrder: h,
1486
660
  pageSize: s,
1487
- pageSizes: Vn,
661
+ pageSizes: _e,
1488
662
  setPageSize: a,
1489
- currentPage: l,
1490
- setCurrentPage: c,
1491
- filters: b,
1492
- onFilterApply: h,
1493
- clearFilters: C,
1494
- countOfFilters: y
663
+ currentPage: u,
664
+ setCurrentPage: o,
665
+ filters: m,
666
+ onFilterApply: S,
667
+ clearFilters: $,
668
+ countOfFilters: w
1495
669
  };
1496
- return /* @__PURE__ */ i(At.Provider, { value: v, children: t });
1497
- }, oe = () => {
1498
- const e = qe(At);
670
+ return /* @__PURE__ */ t(ge.Provider, { value: L, children: l });
671
+ }, H = () => {
672
+ const e = ae(ge);
1499
673
  if (e === void 0)
1500
674
  throw new Error("tableOptionsContext must be used within a Provider");
1501
675
  return e;
1502
- }, Et = He(
676
+ }, Ne = re(
1503
677
  {}
1504
678
  );
1505
- function pr(e) {
1506
- const { children: t, t: r, language: n } = e;
1507
- return /* @__PURE__ */ i(Et.Provider, { value: { t: r, language: n }, children: t });
679
+ function ft(e) {
680
+ const { children: l, t: r, language: n } = e;
681
+ return /* @__PURE__ */ t(Ne.Provider, { value: { t: r, language: n }, children: l });
1508
682
  }
1509
- const ee = () => {
1510
- const e = qe(Et);
683
+ const V = () => {
684
+ const e = ae(Ne);
1511
685
  if (e === void 0)
1512
686
  throw new Error("translationContext must be used within a Provider");
1513
687
  return e;
1514
688
  };
1515
- function Gn(e) {
1516
- const { t } = ee(), {
689
+ function Ce(e) {
690
+ return [...e].sort((l, r) => (r.pos ?? 0) - (l.pos ?? 0)).filter((l) => l.display !== "none");
691
+ }
692
+ function Be(e) {
693
+ const { t: l } = V(), {
1517
694
  entity: r = "",
1518
695
  columns: n = [],
1519
696
  hasAction: s = !0,
1520
697
  onSortCallback: a,
1521
- selectionState: l,
1522
- onToggleAllRows: c
1523
- } = e, o = Q(null);
1524
- V(() => {
1525
- o.current && (o.current.indeterminate = !!(l != null && l.hasSomeSelected && !(l != null && l.allSelected)));
1526
- }, [l]);
1527
- const { onSort: d, sortingOrder: u, sortingBy: m } = oe(), b = D(() => {
1528
- var g;
1529
- return (g = n.sort((f, h) => (h.pos ?? 0) - (f.pos ?? 0)).filter((f) => f.display !== "none")) == null ? void 0 : g.map((f) => ({
1530
- id: f.key,
1531
- label: f.label,
1532
- className: f.className ?? "",
1533
- sortable: f.sortable ?? !0,
1534
- sortOptions: f.sortOptions
1535
- }));
1536
- }, [n, r, t]);
1537
- return /* @__PURE__ */ i("thead", { className: "table-headers-row", children: /* @__PURE__ */ k("tr", { children: [
1538
- /* @__PURE__ */ i("th", { scope: "col", className: "table-headers-column table-headers-checkbox", children: c ? /* @__PURE__ */ i(
698
+ selectionState: u,
699
+ onToggleAllRows: o
700
+ } = e, c = B(null);
701
+ I(() => {
702
+ c.current && (c.current.indeterminate = !!(u?.hasSomeSelected && !u?.allSelected));
703
+ }, [u]);
704
+ const { onSort: d, sortingOrder: p, sortingBy: h } = H(), m = A(() => Ce(n).map((i) => ({
705
+ id: i.key,
706
+ label: i.label,
707
+ className: i.className ?? "",
708
+ sortable: i.sortable ?? !0,
709
+ sortOptions: i.sortOptions
710
+ })), [n, r, l]);
711
+ return /* @__PURE__ */ t("thead", { className: "table-headers-row", children: /* @__PURE__ */ g("tr", { children: [
712
+ /* @__PURE__ */ t("th", { scope: "col", className: "table-headers-column table-headers-checkbox", children: o ? /* @__PURE__ */ t(
1539
713
  "input",
1540
714
  {
1541
715
  type: "checkbox",
1542
- ref: o,
1543
- checked: (l == null ? void 0 : l.allSelected) ?? !1,
1544
- onChange: c,
1545
- "aria-label": t("_accessibility:components.table.selectAllRows")
716
+ ref: c,
717
+ checked: u?.allSelected ?? !1,
718
+ onChange: o,
719
+ "aria-label": l("_accessibility:components.table.selectAllRows")
1546
720
  }
1547
721
  ) : null }),
1548
- b.map((g) => {
1549
- var f, h, C, y, v, $, T, A;
1550
- return /* @__PURE__ */ i(
1551
- "th",
1552
- {
1553
- scope: "col",
1554
- className: `table-headers-column ${g.className}`,
1555
- children: /* @__PURE__ */ k(
1556
- "button",
1557
- {
1558
- disabled: !g.sortable,
1559
- onClick: () => d(g.id, a),
1560
- className: "table-headers-cell",
1561
- children: [
1562
- /* @__PURE__ */ i("span", { className: "table-headers-label", children: g.label }),
1563
- g.sortable && m === g.id && /* @__PURE__ */ i("span", { children: u === me.ASC ? ((h = (f = g.sortOptions) == null ? void 0 : f.icons) == null ? void 0 : h.asc) ?? /* @__PURE__ */ i(
1564
- zn,
1565
- {
1566
- className: ((y = (C = g.sortOptions) == null ? void 0 : C.icons) == null ? void 0 : y.className) ?? "table-headers-sort-indicator"
1567
- }
1568
- ) : (($ = (v = g.sortOptions) == null ? void 0 : v.icons) == null ? void 0 : $.desc) ?? /* @__PURE__ */ i(
1569
- Ln,
1570
- {
1571
- className: ((A = (T = g.sortOptions) == null ? void 0 : T.icons) == null ? void 0 : A.className) ?? "table-headers-sort-indicator"
1572
- }
1573
- ) })
1574
- ]
1575
- }
1576
- )
1577
- },
1578
- g.id
1579
- );
1580
- }),
1581
- s && /* @__PURE__ */ i("th", { scope: "col", className: "table-headers-action", children: t("_accessibility:labels.actions") })
722
+ m.map((i) => /* @__PURE__ */ t(
723
+ "th",
724
+ {
725
+ scope: "col",
726
+ className: `table-headers-column ${i.className}`,
727
+ children: /* @__PURE__ */ g(
728
+ Re,
729
+ {
730
+ disabled: !i.sortable,
731
+ onClick: () => d(i.id, a),
732
+ className: "table-headers-cell",
733
+ children: [
734
+ /* @__PURE__ */ t("span", { className: "table-headers-label", children: i.label }),
735
+ i.sortable && h === i.id && /* @__PURE__ */ t("span", { children: p === Q.ASC ? i.sortOptions?.icons?.asc ?? /* @__PURE__ */ t(
736
+ Oe,
737
+ {
738
+ className: i.sortOptions?.icons?.className ?? "table-headers-sort-indicator"
739
+ }
740
+ ) : i.sortOptions?.icons?.desc ?? /* @__PURE__ */ t(
741
+ Fe,
742
+ {
743
+ className: i.sortOptions?.icons?.className ?? "table-headers-sort-indicator"
744
+ }
745
+ ) })
746
+ ]
747
+ }
748
+ )
749
+ },
750
+ i.id
751
+ )),
752
+ s && /* @__PURE__ */ t("th", { scope: "col", className: "table-headers-action", children: /* @__PURE__ */ t("span", { className: "button text default disabled", children: l("_accessibility:labels.actions") }) })
1582
753
  ] }) });
1583
754
  }
1584
- const Un = (e) => {
1585
- const { items: t, text: r, id: n, onClearFilter: s } = e;
1586
- return /* @__PURE__ */ i(
1587
- fe,
755
+ const Ve = (e) => {
756
+ const { items: l, text: r, id: n, onClearFilter: s } = e;
757
+ return /* @__PURE__ */ t(
758
+ G,
1588
759
  {
1589
- text: `${r}: ${t.map((a) => a.value ?? a.name).join(", ")}`,
760
+ text: `${r}: ${l.map((a) => a.value ?? a.name).join(", ")}`,
1590
761
  onDelete: () => s(n)
1591
762
  }
1592
763
  );
1593
- }, Hn = (e) => {
1594
- const { end: t, start: r, text: n, id: s, onClearFilter: a } = e;
1595
- return /* @__PURE__ */ i(
1596
- fe,
764
+ }, je = (e) => {
765
+ const { end: l, start: r, text: n, id: s, onClearFilter: a } = e;
766
+ return /* @__PURE__ */ t(
767
+ G,
1597
768
  {
1598
- text: `${n}: ${r || "♾️"} - ${t || "♾️"}`,
769
+ text: `${n}: ${r || "♾️"} - ${l || "♾️"}`,
1599
770
  onDelete: () => a(s)
1600
771
  }
1601
772
  );
1602
- }, qn = (e) => {
1603
- const { filtersDefinition: t } = e, r = D(() => {
1604
- const c = {};
1605
- return t.forEach((o) => {
1606
- c[o.propertyName] = o.label ?? o.propertyName;
1607
- }), c;
1608
- }, [t]), { filters: n, clearFilters: s } = oe(), a = D(() => Object.keys(n), [n]), l = F(
1609
- (c) => {
1610
- var o, d, u, m;
1611
- return (o = n[c]) != null && o.end || (d = n[c]) != null && d.start ? /* @__PURE__ */ i(
1612
- Hn,
1613
- {
1614
- id: c,
1615
- text: r[c],
1616
- start: n[c].start,
1617
- end: n[c].end,
1618
- onClearFilter: s
1619
- }
1620
- ) : Array.isArray(n[c]) ? /* @__PURE__ */ i(
1621
- Un,
1622
- {
1623
- id: c,
1624
- text: r[c],
1625
- items: n[c],
1626
- onClearFilter: s
1627
- }
1628
- ) : /* @__PURE__ */ i(
1629
- fe,
1630
- {
1631
- text: `${r[c]}: ${((u = n[c]) == null ? void 0 : u.value) ?? ((m = n[c]) == null ? void 0 : m.name) ?? n[c]}`,
1632
- onDelete: () => s(c)
1633
- }
1634
- );
1635
- },
773
+ }, We = (e) => {
774
+ const { filtersDefinition: l } = e, r = A(() => {
775
+ const o = {};
776
+ return l.forEach((c) => {
777
+ o[c.propertyName] = c.label ?? c.propertyName;
778
+ }), o;
779
+ }, [l]), { filters: n, clearFilters: s } = H(), a = A(() => Object.keys(n), [n]), u = C(
780
+ (o) => n[o]?.end || n[o]?.start ? /* @__PURE__ */ t(
781
+ je,
782
+ {
783
+ id: o,
784
+ text: r[o],
785
+ start: n[o].start,
786
+ end: n[o].end,
787
+ onClearFilter: s
788
+ }
789
+ ) : Array.isArray(n[o]) ? /* @__PURE__ */ t(
790
+ Ve,
791
+ {
792
+ id: o,
793
+ text: r[o],
794
+ items: n[o],
795
+ onClearFilter: s
796
+ }
797
+ ) : /* @__PURE__ */ t(
798
+ G,
799
+ {
800
+ text: `${r[o]}: ${n[o]?.value ?? n[o]?.name ?? n[o]}`,
801
+ onDelete: () => s(o)
802
+ }
803
+ ),
1636
804
  [n, r]
1637
805
  );
1638
- return /* @__PURE__ */ i("ul", { className: "active-filters-main", children: a == null ? void 0 : a.map((c) => /* @__PURE__ */ i("li", { children: l(c) }, c)) });
806
+ return /* @__PURE__ */ t("ul", { className: "active-filters-main", children: a?.map((o) => /* @__PURE__ */ t("li", { children: u(o) }, o)) });
1639
807
  };
1640
- function Kn(e) {
1641
- const { propertyName: t, label: r, placeholder: n, options: s, multiple: a = !0 } = e, { currentFilters: l, setCurrentFilters: c } = Ce(), o = D(() => l[t] ?? s[0], [l]), d = F(
1642
- (u) => {
1643
- c({
1644
- type: K.update,
808
+ function Ue(e) {
809
+ const { propertyName: l, label: r, placeholder: n, options: s, multiple: a = !0 } = e, { currentFilters: u, setCurrentFilters: o } = Y(), c = A(() => u[l] ?? s[0], [u]), d = C(
810
+ (p) => {
811
+ o({
812
+ type: _.update,
1645
813
  toUpdate: {
1646
- [t]: {
1647
- value: u
814
+ [l]: {
815
+ value: p
1648
816
  }
1649
817
  }
1650
818
  });
1651
819
  },
1652
820
  [a]
1653
821
  );
1654
- return /* @__PURE__ */ i(
1655
- On,
822
+ return /* @__PURE__ */ t(
823
+ ke,
1656
824
  {
1657
- value: o == null ? void 0 : o.value,
825
+ value: c?.value,
1658
826
  label: r,
1659
827
  options: s,
1660
828
  multiple: a,
@@ -1665,258 +833,243 @@ function Kn(e) {
1665
833
  }
1666
834
  );
1667
835
  }
1668
- const Yn = (e) => {
1669
- const { propertyName: t, label: r } = e, { currentFilters: n, setCurrentFilters: s } = Ce(), a = D(() => {
1670
- var c;
1671
- return ((c = n[t]) == null ? void 0 : c.value) ?? "";
1672
- }, [n]), l = F((c) => {
836
+ const He = (e) => {
837
+ const { propertyName: l, label: r } = e, { currentFilters: n, setCurrentFilters: s } = Y(), a = A(() => n[l]?.value ?? "", [n]), u = C((o) => {
1673
838
  s({
1674
- type: K.update,
1675
- toUpdate: { [t]: { value: c.target.checked } }
839
+ type: _.update,
840
+ toUpdate: { [l]: { value: o.target.checked } }
1676
841
  });
1677
842
  }, []);
1678
- return /* @__PURE__ */ i(Fn, { label: r, checked: a ?? !1, onChange: l });
843
+ return /* @__PURE__ */ t(Ae, { label: r, checked: a ?? !1, onChange: u });
1679
844
  };
1680
- function Zn(e) {
1681
- const { propertyName: t, options: r, label: n, placeholder: s } = e, { currentFilters: a, setCurrentFilters: l } = Ce(), c = D(() => {
1682
- var d;
1683
- return ((d = a[t]) == null ? void 0 : d.value) ?? r[0];
1684
- }, [a]), o = F((d) => {
1685
- l({
1686
- type: K.update,
1687
- toUpdate: { [t]: { value: d.target.value } }
845
+ function qe(e) {
846
+ const { propertyName: l, options: r, label: n, placeholder: s } = e, { currentFilters: a, setCurrentFilters: u } = Y(), o = A(() => a[l]?.value ?? r[0], [a]), c = C((d) => {
847
+ u({
848
+ type: _.update,
849
+ toUpdate: { [l]: { value: d.target.value } }
1688
850
  });
1689
851
  }, []);
1690
- return /* @__PURE__ */ i(
1691
- Xe,
852
+ return /* @__PURE__ */ t(
853
+ ie,
1692
854
  {
1693
- value: c,
855
+ value: o,
1694
856
  label: n,
1695
857
  options: r,
1696
858
  helperTextClassName: "hidden",
1697
859
  containerClassName: "options-widget-container",
1698
- onChange: o,
860
+ onChange: c,
1699
861
  placeholder: s
1700
862
  }
1701
863
  );
1702
864
  }
1703
- const Jn = (e) => {
1704
- const { propertyName: t, label: r, placeholder: n } = e, { currentFilters: s, setCurrentFilters: a } = Ce(), l = D(() => {
1705
- var o;
1706
- return ((o = s[t]) == null ? void 0 : o.value) ?? "";
1707
- }, [s]), c = F((o) => {
865
+ const Je = (e) => {
866
+ const { propertyName: l, label: r, placeholder: n } = e, { currentFilters: s, setCurrentFilters: a } = Y(), u = A(() => s[l]?.value ?? "", [s]), o = C((c) => {
1708
867
  a({
1709
- type: K.update,
1710
- toUpdate: { [t]: { value: o.target.value } }
868
+ type: _.update,
869
+ toUpdate: { [l]: { value: c.target.value } }
1711
870
  });
1712
871
  }, []);
1713
- return /* @__PURE__ */ i(
1714
- Ie,
872
+ return /* @__PURE__ */ t(
873
+ ne,
1715
874
  {
1716
- value: l ?? "",
875
+ value: u ?? "",
1717
876
  label: r,
1718
- onChange: c,
877
+ onChange: o,
1719
878
  containerClassName: "input-widget-container",
1720
879
  helperTextClassName: "",
1721
880
  placeholder: n
1722
881
  }
1723
882
  );
1724
- }, ht = (e) => {
1725
- var m, b, g, f;
1726
- const { propertyName: t, label: r, inputType: n } = e, { t: s } = ee(), { currentFilters: a, setCurrentFilters: l } = Ce(), c = Q(null), o = Q(null), d = F((h) => {
1727
- var C;
1728
- l({
1729
- type: K.update,
883
+ }, pe = (e) => {
884
+ const { propertyName: l, label: r, inputType: n } = e, { t: s } = V(), { currentFilters: a, setCurrentFilters: u } = Y(), o = B(null), c = B(null), d = C((h) => {
885
+ u({
886
+ type: _.update,
1730
887
  toUpdate: {
1731
- [t]: {
1732
- value: { end: ((C = o == null ? void 0 : o.current) == null ? void 0 : C.value) ?? null, start: h.target.value }
888
+ [l]: {
889
+ value: { end: c?.current?.value ?? null, start: h.target.value }
1733
890
  }
1734
891
  }
1735
892
  });
1736
- }, []), u = F((h) => {
1737
- var C;
1738
- l({
1739
- type: K.update,
893
+ }, []), p = C((h) => {
894
+ u({
895
+ type: _.update,
1740
896
  toUpdate: {
1741
- [t]: {
897
+ [l]: {
1742
898
  value: {
1743
- start: ((C = c == null ? void 0 : c.current) == null ? void 0 : C.value) ?? null,
899
+ start: o?.current?.value ?? null,
1744
900
  end: h.target.value
1745
901
  }
1746
902
  }
1747
903
  }
1748
904
  });
1749
905
  }, []);
1750
- return /* @__PURE__ */ k("div", { className: "range-widget-container", children: [
1751
- /* @__PURE__ */ i("p", { className: "text-input-label input-widget-label input-label-normal", children: r }),
1752
- /* @__PURE__ */ k("div", { className: "range-widget-row", children: [
1753
- /* @__PURE__ */ i(
1754
- Ie,
906
+ return /* @__PURE__ */ g("div", { className: "range-widget-container", children: [
907
+ /* @__PURE__ */ t("p", { className: "text-input-label input-widget-label input-label-normal", children: r }),
908
+ /* @__PURE__ */ g("div", { className: "range-widget-row", children: [
909
+ /* @__PURE__ */ t(
910
+ ne,
1755
911
  {
1756
- value: ((b = (m = a[t]) == null ? void 0 : m.value) == null ? void 0 : b.start) ?? "",
912
+ value: a[l]?.value?.start ?? "",
1757
913
  placeholder: s("_accessibility:components.table.filters.range.start"),
1758
914
  type: n,
1759
- ref: c,
915
+ ref: o,
1760
916
  onChange: d,
1761
917
  containerClassName: "input-widget-container",
1762
918
  helperTextClassName: ""
1763
919
  }
1764
920
  ),
1765
- /* @__PURE__ */ i(
1766
- Ie,
921
+ /* @__PURE__ */ t(
922
+ ne,
1767
923
  {
1768
- value: ((f = (g = a[t]) == null ? void 0 : g.value) == null ? void 0 : f.end) ?? "",
924
+ value: a[l]?.value?.end ?? "",
1769
925
  placeholder: s("_accessibility:components.table.filters.range.end"),
1770
926
  type: n,
1771
- ref: o,
1772
- onChange: u,
927
+ ref: c,
928
+ onChange: p,
1773
929
  containerClassName: "input-widget-container",
1774
930
  helperTextClassName: ""
1775
931
  }
1776
932
  )
1777
933
  ] })
1778
934
  ] });
1779
- }, Xn = (e) => {
935
+ }, Ke = (e) => {
1780
936
  switch (e.type) {
1781
- case de.text:
1782
- return /* @__PURE__ */ i(Jn, { ...e });
1783
- case de.number:
1784
- return /* @__PURE__ */ i(
1785
- ht,
937
+ case X.text:
938
+ return /* @__PURE__ */ t(Je, { ...e });
939
+ case X.number:
940
+ return /* @__PURE__ */ t(
941
+ pe,
1786
942
  {
1787
943
  ...e,
1788
944
  inputType: "number"
1789
945
  }
1790
946
  );
1791
- case de.date:
1792
- return /* @__PURE__ */ i(
1793
- ht,
947
+ case X.date:
948
+ return /* @__PURE__ */ t(
949
+ pe,
1794
950
  {
1795
951
  ...e,
1796
952
  inputType: "date"
1797
953
  }
1798
954
  );
1799
- case de.select:
1800
- return /* @__PURE__ */ i(Zn, { ...e });
1801
- case de.autocomplete:
1802
- return /* @__PURE__ */ i(Kn, { ...e });
1803
- case de.check:
1804
- return /* @__PURE__ */ i(Yn, { ...e });
955
+ case X.select:
956
+ return /* @__PURE__ */ t(qe, { ...e });
957
+ case X.autocomplete:
958
+ return /* @__PURE__ */ t(Ue, { ...e });
959
+ case X.check:
960
+ return /* @__PURE__ */ t(He, { ...e });
1805
961
  }
1806
- return /* @__PURE__ */ i($e, {});
1807
- }, Qn = (e) => {
1808
- const { filters: t = [], show: r, handleShow: n } = e, { onFilterApply: s } = oe(), { currentFilters: a, setCurrentFilters: l } = Ce(), { t: c } = ee(), o = Q(null);
1809
- return V(() => {
1810
- const d = ({ target: u }) => {
1811
- var m;
1812
- o.current && (u != null && u.closest(".filter-dropdown-trigger") || !r || (m = o.current) != null && m.contains(u) || n(!1));
962
+ return /* @__PURE__ */ t(ee, {});
963
+ }, Xe = (e) => {
964
+ const { filters: l = [], show: r, handleShow: n } = e, { onFilterApply: s } = H(), { currentFilters: a, setCurrentFilters: u } = Y(), { t: o } = V(), c = B(null);
965
+ return I(() => {
966
+ const d = ({ target: h }) => {
967
+ c.current && (h?.closest(".filter-dropdown-trigger") || !r || c.current.contains(h) || n(!1));
968
+ }, p = ({ code: h }) => {
969
+ !r || h !== "Escape" || n(!1);
1813
970
  };
1814
- return document.addEventListener("click", d), () => document.removeEventListener("click", d);
1815
- }, [n, r]), V(() => {
1816
- const d = (u) => {
1817
- !r || u.code !== "Escape" || n(!1);
971
+ return document.addEventListener("click", d), document.addEventListener("keydown", p), () => {
972
+ document.removeEventListener("click", d), document.removeEventListener("keydown", p);
1818
973
  };
1819
- return document.addEventListener("keydown", d), () => document.removeEventListener("keydown", d);
1820
- }, [n, r]), /* @__PURE__ */ i("div", { className: `filter-dropdown-backdrop ${r ? "opened" : "closed"}`, children: /* @__PURE__ */ k("div", { className: "filter-popup", ref: o, children: [
1821
- /* @__PURE__ */ i("div", { className: "filter-title", children: c("_accessibility:buttons.filters") }),
1822
- /* @__PURE__ */ i("ul", { className: "filter-container", children: t.map((d) => /* @__PURE__ */ i("li", { className: "filter-container-item", children: Xn(d) }, d.propertyName)) }),
1823
- /* @__PURE__ */ i("div", { className: "filter-footer", children: /* @__PURE__ */ k("ul", { className: "filter-buttons-row", children: [
1824
- /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
974
+ }, [n, r]), /* @__PURE__ */ t("div", { className: `filter-dropdown-backdrop ${r ? "opened" : "closed"}`, children: /* @__PURE__ */ g("div", { className: "filter-popup", ref: c, children: [
975
+ /* @__PURE__ */ t("div", { className: "filter-title", children: o("_accessibility:buttons.filters") }),
976
+ /* @__PURE__ */ t("ul", { className: "filter-container", children: l.map((d) => /* @__PURE__ */ t("li", { className: "filter-container-item", children: Ke(d) }, d.propertyName)) }),
977
+ /* @__PURE__ */ t("div", { className: "filter-footer", children: /* @__PURE__ */ g("ul", { className: "filter-buttons-row", children: [
978
+ /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
1825
979
  "button",
1826
980
  {
1827
- onClick: () => l({
1828
- type: K.reset,
1829
- filters: t
981
+ onClick: () => u({
982
+ type: _.reset,
983
+ filters: l
1830
984
  }),
1831
985
  className: "filter-dropdown-button small filter-dropdown-cancel",
1832
- children: c("_accessibility:buttons.clear")
986
+ children: o("_accessibility:buttons.clear")
1833
987
  }
1834
988
  ) }),
1835
- /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
989
+ /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
1836
990
  "button",
1837
991
  {
1838
992
  className: "filter-dropdown-button small filter-dropdown-submit",
1839
993
  onClick: () => {
1840
994
  n(!1), s(a);
1841
995
  },
1842
- onBlur: () => n(!1),
1843
- children: c("_accessibility:buttons.applyFilters")
996
+ children: o("_accessibility:buttons.applyFilters")
1844
997
  }
1845
998
  ) })
1846
999
  ] }) })
1847
1000
  ] }) });
1848
- }, er = () => {
1849
- const { t: e } = ee(), { total: t, pageSize: r, pageSizes: n, currentPage: s } = oe(), a = (s + 1) * r > t ? t : (s + 1) * r;
1850
- return /* @__PURE__ */ k("div", { className: "table-navigation-sizes", children: [
1851
- n[0] < t && /* @__PURE__ */ i($e, { children: /* @__PURE__ */ k("p", { children: [
1001
+ }, Ge = () => {
1002
+ const { t: e } = V(), { total: l, pageSize: r, pageSizes: n, currentPage: s } = H(), a = (s + 1) * r > l ? l : (s + 1) * r;
1003
+ return /* @__PURE__ */ g("div", { className: "table-navigation-sizes", children: [
1004
+ n[0] < l && /* @__PURE__ */ t(ee, { children: /* @__PURE__ */ g("p", { children: [
1852
1005
  s * r + 1,
1853
1006
  " - ",
1854
1007
  a,
1855
1008
  " ",
1856
1009
  e("_accessibility:components.table.of")
1857
1010
  ] }) }),
1858
- /* @__PURE__ */ i("p", { children: t })
1011
+ /* @__PURE__ */ t("p", { children: l })
1859
1012
  ] });
1860
1013
  };
1861
- function tr() {
1862
- const { t: e } = ee(), { total: t, pageSize: r, currentPage: n, setCurrentPage: s } = oe(), a = D(() => {
1863
- const l = Math.ceil(t / r);
1864
- return Array.from({ length: l }, (c, o) => ({
1865
- id: o,
1866
- value: o + 1
1014
+ function Qe() {
1015
+ const { t: e } = V(), { total: l, pageSize: r, currentPage: n, setCurrentPage: s } = H(), a = A(() => {
1016
+ const u = Math.ceil(l / r);
1017
+ return Array.from({ length: u }, (o, c) => ({
1018
+ id: c,
1019
+ value: c + 1
1867
1020
  }));
1868
- }, [t, r]);
1869
- return /* @__PURE__ */ k("div", { className: "jump-to-page", children: [
1870
- /* @__PURE__ */ i("p", { children: e("_accessibility:components.table.jumpToPage") }),
1871
- /* @__PURE__ */ i(
1872
- Xe,
1021
+ }, [l, r]);
1022
+ return /* @__PURE__ */ g("div", { className: "jump-to-page", children: [
1023
+ /* @__PURE__ */ t("p", { children: e("_accessibility:components.table.jumpToPage") }),
1024
+ /* @__PURE__ */ t(
1025
+ ie,
1873
1026
  {
1874
1027
  value: n,
1875
1028
  options: a,
1876
1029
  inputClassName: "jump-to-page-input",
1877
1030
  containerClassName: "jump-to-page-input-container",
1878
1031
  helperTextClassName: "hidden",
1879
- onChange: (l) => s(Number(l.target.value))
1032
+ onChange: (u) => s(Number(u.target.value))
1880
1033
  }
1881
1034
  )
1882
1035
  ] });
1883
1036
  }
1884
- const nr = () => {
1885
- const { t: e } = ee(), { total: t, pageSize: r, currentPage: n, setCurrentPage: s } = oe();
1886
- return /* @__PURE__ */ k("div", { className: "table-navigation-pages", children: [
1887
- /* @__PURE__ */ i(
1888
- "button",
1037
+ const Ye = () => {
1038
+ const { t: e } = V(), { total: l, pageSize: r, currentPage: n, setCurrentPage: s } = H();
1039
+ return /* @__PURE__ */ g("div", { className: "table-navigation-pages", children: [
1040
+ /* @__PURE__ */ t(
1041
+ q,
1889
1042
  {
1043
+ icon: /* @__PURE__ */ t(Le, { className: "w-2.5" }),
1890
1044
  className: "table-navigation-buttons",
1891
1045
  disabled: n === 0,
1892
1046
  "aria-label": e("_accessibility:buttons.previous"),
1893
1047
  name: e("_accessibility:buttons.previous"),
1894
- onClick: () => s(n - 1),
1895
- children: /* @__PURE__ */ i(In, { className: "w-2.5" })
1048
+ onClick: () => s(n - 1)
1896
1049
  }
1897
1050
  ),
1898
- /* @__PURE__ */ i(
1899
- "button",
1051
+ /* @__PURE__ */ t(
1052
+ q,
1900
1053
  {
1901
- disabled: Math.floor(t / ((n + 1) * r)) === 0,
1054
+ icon: /* @__PURE__ */ t(Pe, { className: "w-2.5" }),
1055
+ disabled: Math.floor(l / ((n + 1) * r)) === 0,
1902
1056
  className: "table-navigation-buttons",
1903
1057
  name: e("_accessibility:buttons.next"),
1904
1058
  "aria-label": e("_accessibility:buttons.next"),
1905
- onClick: () => s(n + 1),
1906
- children: /* @__PURE__ */ i(Dn, { className: "w-2.5" })
1059
+ onClick: () => s(n + 1)
1907
1060
  }
1908
1061
  )
1909
1062
  ] });
1910
1063
  };
1911
- function rr() {
1912
- const { t: e } = ee(), { pageSizes: t, pageSize: r, setPageSize: n } = oe(), s = D(
1913
- () => t == null ? void 0 : t.map((a) => ({ id: a, value: a })),
1914
- [t]
1064
+ function Ze() {
1065
+ const { t: e } = V(), { pageSizes: l, pageSize: r, setPageSize: n } = H(), s = A(
1066
+ () => l?.map((a) => ({ id: a, value: a })),
1067
+ [l]
1915
1068
  );
1916
- return /* @__PURE__ */ k("div", { className: "page-size", children: [
1917
- /* @__PURE__ */ i("p", { children: e("_accessibility:components.table.pageSizes") }),
1918
- /* @__PURE__ */ i(
1919
- Xe,
1069
+ return /* @__PURE__ */ g("div", { className: "page-size", children: [
1070
+ /* @__PURE__ */ t("p", { children: e("_accessibility:components.table.pageSizes") }),
1071
+ /* @__PURE__ */ t(
1072
+ ie,
1920
1073
  {
1921
1074
  value: r,
1922
1075
  options: s,
@@ -1928,527 +1081,581 @@ function rr() {
1928
1081
  )
1929
1082
  ] });
1930
1083
  }
1931
- function sr() {
1932
- return /* @__PURE__ */ k("div", { className: "table-footer", children: [
1933
- /* @__PURE__ */ i(tr, {}),
1934
- /* @__PURE__ */ i(rr, {}),
1935
- /* @__PURE__ */ i(er, {}),
1936
- /* @__PURE__ */ i(nr, {})
1084
+ function et() {
1085
+ return /* @__PURE__ */ g("div", { className: "table-footer", children: [
1086
+ /* @__PURE__ */ t(Qe, {}),
1087
+ /* @__PURE__ */ t(Ze, {}),
1088
+ /* @__PURE__ */ t(Ge, {}),
1089
+ /* @__PURE__ */ t(Ye, {})
1937
1090
  ] });
1938
1091
  }
1939
- const ar = (e) => e, ir = (e) => {
1940
- const { t } = ee(), {
1092
+ const tt = (e) => e, nt = (e) => {
1093
+ const { t: l } = V(), {
1941
1094
  columns: r,
1942
1095
  softDeleteProperty: n = "deletedAt",
1943
1096
  data: s,
1944
1097
  actions: a,
1945
- selectedRows: l,
1946
- expandedRows: c = [],
1947
- onRowSelectionChange: o,
1098
+ selectedRows: u,
1099
+ expandedRows: o = [],
1100
+ onRowSelectionChange: c,
1948
1101
  onRowExpand: d
1949
- } = e, u = D(
1950
- () => r.sort((b, g) => (g.pos ?? 0) - (b.pos ?? 0)).filter((b) => b.display !== "none"),
1102
+ } = e, p = A(
1103
+ () => Ce(r),
1951
1104
  [r]
1952
- ), m = D(
1105
+ ), h = A(
1953
1106
  () => new Map(
1954
- c.map((b) => [b.rowId, b])
1107
+ o.map((m) => [m.rowId, m])
1955
1108
  ),
1956
- [c]
1109
+ [o]
1957
1110
  );
1958
- return s == null ? void 0 : s.map((b) => {
1959
- var y;
1960
- const g = l.has(b.id), f = m.get(b.id), h = !!f, C = u.length + 1 + (a ? 1 : 0);
1961
- return /* @__PURE__ */ k(zt, { children: [
1962
- /* @__PURE__ */ k(
1111
+ return s?.map((m) => {
1112
+ const i = u.has(m.id), v = h.get(m.id), S = !!v, $ = p.length + 1 + (a ? 1 : 0);
1113
+ return /* @__PURE__ */ g(xe, { children: [
1114
+ /* @__PURE__ */ g(
1963
1115
  "tr",
1964
1116
  {
1965
- className: `table-row ${d ? "expandable" : ""} ${b[n] ? "deleted-class" : ""} ${g ? "selected" : ""} ${h ? "expanded" : ""}`,
1966
- onClick: () => d == null ? void 0 : d(b),
1117
+ className: `table-row ${d ? "expandable" : ""} ${m[n] ? "deleted-class" : ""} ${i ? "selected" : ""} ${S ? "expanded" : ""}`,
1118
+ onClick: () => d?.(m),
1967
1119
  children: [
1968
- /* @__PURE__ */ i("td", { className: "table-row-cell table-row-checkbox", children: /* @__PURE__ */ i(
1120
+ /* @__PURE__ */ t("td", { className: "table-row-cell table-row-checkbox", children: /* @__PURE__ */ t(
1969
1121
  "input",
1970
1122
  {
1971
1123
  type: "checkbox",
1972
- checked: g,
1973
- onClick: (v) => v.stopPropagation(),
1974
- onChange: () => o(b),
1975
- "aria-label": t("_accessibility:components.table.selectRow")
1124
+ checked: i,
1125
+ onClick: (w) => w.stopPropagation(),
1126
+ onChange: () => c(m),
1127
+ "aria-label": l("_accessibility:components.table.selectRow")
1976
1128
  }
1977
1129
  ) }),
1978
- u == null ? void 0 : u.map((v, $) => /* @__PURE__ */ i(
1130
+ p?.map((w, L) => /* @__PURE__ */ t(
1979
1131
  "td",
1980
1132
  {
1981
- className: `table-row-cell ${$ === 0 ? "basic" : ""} ${v.className ?? ""}`,
1982
- children: v.renderBody ? v.renderBody(b[v.key], b) : ar(b[v.key])
1133
+ className: `table-row-cell ${L === 0 ? "basic" : ""} ${w.className ?? ""}`,
1134
+ children: w.renderBody ? w.renderBody(m[w.key], m) : tt(m[w.key])
1983
1135
  },
1984
- v.key
1136
+ w.key
1985
1137
  )),
1986
- a ? /* @__PURE__ */ i("td", { children: /* @__PURE__ */ i("div", { className: "table-row-cell-action", children: (y = a(b).filter((v) => !v.hidden)) == null ? void 0 : y.map((v) => /* @__PURE__ */ i(Rt, { content: v.tooltip, children: /* @__PURE__ */ i(
1987
- "button",
1138
+ a ? /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("div", { className: "table-row-cell-action", children: a(m).filter((w) => !w.hidden)?.map((w) => /* @__PURE__ */ t(le, { content: w.tooltip, children: /* @__PURE__ */ t(
1139
+ q,
1988
1140
  {
1989
- onClick: ($) => {
1990
- $.stopPropagation(), v.onClick(b);
1991
- },
1992
- children: v.icon
1141
+ icon: w.icon,
1142
+ className: "row-table-action",
1143
+ onClick: (L) => {
1144
+ L.stopPropagation(), w.onClick(m);
1145
+ }
1993
1146
  }
1994
- ) }, v.id)) }) }) : null
1147
+ ) }, w.id)) }) }) : null
1995
1148
  ]
1996
1149
  }
1997
1150
  ),
1998
- h && (f == null ? void 0 : f.content) !== null && typeof (f == null ? void 0 : f.content) < "u" && /* @__PURE__ */ i("tr", { className: "table-row-expanded", children: /* @__PURE__ */ i("td", { className: "table-row-expanded-cell", colSpan: C, children: /* @__PURE__ */ i(
1151
+ S && v?.content !== null && typeof v?.content < "u" && /* @__PURE__ */ t("tr", { className: "table-row-expanded", children: /* @__PURE__ */ t("td", { className: "table-row-expanded-cell", colSpan: $, children: /* @__PURE__ */ t(
1999
1152
  "div",
2000
1153
  {
2001
- className: `table-row-expanded-content ${f.isVisible ? "open" : "closed"}`,
2002
- children: /* @__PURE__ */ i("div", { className: "table-row-expanded-inner", children: f.content })
1154
+ className: `table-row-expanded-content ${v.isVisible ? "open" : "closed"}`,
1155
+ children: /* @__PURE__ */ t("div", { className: "table-row-expanded-inner", children: v.content })
2003
1156
  }
2004
1157
  ) }) })
2005
- ] }, b.id);
1158
+ ] }, m.id);
2006
1159
  });
2007
1160
  };
2008
- function cr() {
2009
- const { t: e } = ee();
2010
- return /* @__PURE__ */ i("div", { className: "table-empty", children: /* @__PURE__ */ i("p", { children: e("_accessibility:components.table.empty") }) });
2011
- }
2012
- const lr = (e) => {
2013
- var g, f;
2014
- const { columns: t, title: r, isLoading: n, toolbar: s, filterOptions: a } = e, { countOfFilters: l } = oe(), { t: c } = ee(), o = D(() => t ? t.sort((h, C) => (C.pos ?? 0) - (h.pos ?? 0)).filter((h) => !!h.filterOptions).map((h) => {
2015
- var C;
2016
- return {
2017
- ...h.filterOptions,
2018
- label: ((C = h.filterOptions) == null ? void 0 : C.label) ?? h.label,
2019
- propertyName: h.key
2020
- };
2021
- }) : [], [t]), [d, u] = I(!1), m = F(
2022
- (h) => {
2023
- var C, y;
2024
- ((y = (C = a == null ? void 0 : a.dropdown) == null ? void 0 : C.setOpened) == null ? void 0 : y.call(C, h ?? !1)) ?? u(h ?? !1);
1161
+ function lt() {
1162
+ const { t: e } = V();
1163
+ return /* @__PURE__ */ t("div", { className: "table-empty", children: /* @__PURE__ */ t("p", { children: e("_accessibility:components.table.empty") }) });
1164
+ }
1165
+ const st = (e) => {
1166
+ const { columns: l, title: r, isLoading: n, toolbar: s, filterOptions: a } = e, { countOfFilters: u } = H(), { t: o } = V(), c = A(() => l ? l.sort((i, v) => (v.pos ?? 0) - (i.pos ?? 0)).filter((i) => !!i.filterOptions).map((i) => ({
1167
+ ...i.filterOptions,
1168
+ label: i.filterOptions?.label ?? i.label,
1169
+ propertyName: i.key
1170
+ })) : [], [l]), [d, p] = T(!1), h = C(
1171
+ (i) => {
1172
+ a?.dropdown?.setOpened ? a.dropdown.setOpened(i ?? !1) : p(i ?? !1);
2025
1173
  },
2026
1174
  [a]
2027
- ), b = D(
2028
- () => {
2029
- var h;
2030
- return ((h = a == null ? void 0 : a.dropdown) == null ? void 0 : h.opened) ?? d;
2031
- },
1175
+ ), m = A(
1176
+ () => a?.dropdown?.opened ?? d,
2032
1177
  [a, d]
2033
1178
  );
2034
- return /* @__PURE__ */ k("div", { className: `table-header ${b ? "showing-filters" : ""}`, children: [
2035
- /* @__PURE__ */ k("div", { children: [
2036
- r && /* @__PURE__ */ i("h1", { className: "table-header-title", children: r }),
2037
- n ? null : /* @__PURE__ */ k("div", { className: "table-header-content", children: [
1179
+ return /* @__PURE__ */ g("div", { className: `table-header ${m ? "showing-filters" : ""}`, children: [
1180
+ /* @__PURE__ */ g("div", { children: [
1181
+ r && /* @__PURE__ */ t("h1", { className: "table-header-title", children: r }),
1182
+ n ? null : /* @__PURE__ */ g("div", { className: "table-header-content", children: [
2038
1183
  s,
2039
- ((g = a == null ? void 0 : a.button) == null ? void 0 : g.hide) !== !0 && /* @__PURE__ */ k(
2040
- "button",
1184
+ a?.button?.hide !== !0 && /* @__PURE__ */ g(
1185
+ q,
2041
1186
  {
1187
+ icon: a?.button?.icon ?? /* @__PURE__ */ t(ze, { className: "filter-dropdown-trigger-icon" }),
2042
1188
  className: "filter-dropdown-button normal filter-dropdown-trigger",
2043
1189
  "aria-haspopup": "true",
2044
- onClick: () => m(!b),
2045
- "aria-expanded": b,
1190
+ onClick: () => h(!m),
1191
+ "aria-expanded": m,
2046
1192
  children: [
2047
- /* @__PURE__ */ i(
2048
- _t,
1193
+ /* @__PURE__ */ t(
1194
+ Ee,
2049
1195
  {
2050
- count: l,
2051
- className: `${l > 0 ? "show" : "hide"} `
1196
+ count: u,
1197
+ className: `${u > 0 ? "show" : "hide"} `
2052
1198
  }
2053
1199
  ),
2054
- /* @__PURE__ */ i("span", { className: "sr-only", children: c("_accessibility:buttons.filters") }),
2055
- /* @__PURE__ */ i("wbr", {}),
2056
- ((f = a == null ? void 0 : a.button) == null ? void 0 : f.icon) ?? /* @__PURE__ */ i(Wn, { className: "filter-dropdown-trigger-icon" })
1200
+ /* @__PURE__ */ t("span", { className: "sr-only", children: o("_accessibility:buttons.filters") }),
1201
+ /* @__PURE__ */ t("wbr", {})
2057
1202
  ]
2058
1203
  }
2059
1204
  )
2060
1205
  ] })
2061
1206
  ] }),
2062
- !!o && !!o.length && /* @__PURE__ */ i(
2063
- Qn,
1207
+ !!c && !!c.length && /* @__PURE__ */ t(
1208
+ Xe,
2064
1209
  {
2065
- filters: o,
2066
- show: b,
2067
- handleShow: m,
1210
+ filters: c,
1211
+ show: m,
1212
+ handleShow: h,
2068
1213
  options: a
2069
1214
  }
2070
1215
  ),
2071
- /* @__PURE__ */ i(qn, { filtersDefinition: o })
1216
+ /* @__PURE__ */ t(We, { filtersDefinition: c })
2072
1217
  ] });
2073
1218
  };
2074
- const Ve = 220;
2075
- function mr(e) {
2076
- const {
2077
- data: t,
2078
- onSort: r,
2079
- entity: n = "",
2080
- isLoading: s = !1,
2081
- actions: a,
2082
- columns: l = [],
2083
- contentClassName: c = "",
2084
- className: o = "",
2085
- softDeleteProperty: d = "deletedAt",
2086
- onRowSelect: u,
2087
- onSelectedRowsChange: m,
2088
- allowMultipleExpandedRows: b = !1,
2089
- expandedRowId: g,
2090
- onExpandedRowChange: f,
2091
- onRowExpand: h,
2092
- ...C
2093
- } = e, { t: y } = ee(), [v, $] = I(/* @__PURE__ */ new Set()), [T, A] = I(null), [P, N] = I(null), [q, we] = I(null), [ue, ce] = I(null), [xe, le] = I(!1), [ye, w] = I(/* @__PURE__ */ new Set()), [z, _] = I([]), Y = Q(null), te = Q(null), he = Q(/* @__PURE__ */ new Map()), ne = typeof g < "u", re = b && !ne, G = ne ? g ?? null : T, Tt = D(() => !(t != null && t.length), [t]), Z = D(
2094
- () => (t == null ? void 0 : t.filter((p) => v.has(p.id))) ?? [],
2095
- [t, v]
2096
- ), pe = F(
2097
- (p) => p === null ? null : t.find((x) => x.id === p) ?? null,
2098
- [t]
2099
- ), Te = F(() => {
2100
- te.current && (clearTimeout(te.current), te.current = null);
2101
- }, []), J = F(
2102
- (p) => {
2103
- if (typeof p < "u") {
2104
- const x = he.current.get(p);
2105
- if (!x)
2106
- return;
2107
- clearTimeout(x), he.current.delete(p);
1219
+ function rt({
1220
+ count: e,
1221
+ multiActions: l,
1222
+ onActionClick: r
1223
+ }) {
1224
+ const { t: n } = V();
1225
+ return /* @__PURE__ */ g("div", { className: "table-selection-bar", children: [
1226
+ /* @__PURE__ */ t("p", { className: "table-selection-bar-count", children: n("_accessibility:components.table.selectedCount", { count: e }) }),
1227
+ l.length > 0 && /* @__PURE__ */ t("div", { className: "table-selection-bar-actions", children: l.map((s) => /* @__PURE__ */ t(le, { content: s.tooltip, children: /* @__PURE__ */ t(
1228
+ q,
1229
+ {
1230
+ icon: s.icon,
1231
+ className: "multi-table-action",
1232
+ onClick: () => r(s),
1233
+ disabled: s.disabled
1234
+ }
1235
+ ) }, s.id)) })
1236
+ ] });
1237
+ }
1238
+ const se = 220;
1239
+ function at({
1240
+ data: e,
1241
+ allowMultipleExpandedRows: l,
1242
+ controlledExpandedRowId: r,
1243
+ onExpandedRowChange: n,
1244
+ onRowExpand: s,
1245
+ findRowById: a
1246
+ }) {
1247
+ const [u, o] = T(null), [c, d] = T(null), [p, h] = T(null), [m, i] = T(null), [v, S] = T(!1), [$, w] = T(/* @__PURE__ */ new Set()), [L, E] = T([]), N = B(null), y = B(null), P = B(/* @__PURE__ */ new Map()), R = typeof r < "u", O = l && !R, F = R ? r ?? null : u, j = C(() => {
1248
+ y.current && (clearTimeout(y.current), y.current = null);
1249
+ }, []), z = C(
1250
+ (f) => {
1251
+ if (typeof f < "u") {
1252
+ const x = P.current.get(f);
1253
+ if (!x) return;
1254
+ clearTimeout(x), P.current.delete(f);
2108
1255
  return;
2109
1256
  }
2110
- he.current.forEach(
1257
+ P.current.forEach(
2111
1258
  (x) => clearTimeout(x)
2112
- ), he.current.clear();
1259
+ ), P.current.clear();
2113
1260
  },
2114
1261
  []
2115
- ), et = F(
2116
- (p) => {
2117
- J(p), _((x) => x.some(
2118
- (O) => O.rowId === p
1262
+ ), J = C(
1263
+ (f) => {
1264
+ z(f), E((x) => x.some(
1265
+ (D) => D.rowId === f
2119
1266
  ) ? x.map(
2120
- (O) => O.rowId === p ? { ...O, isVisible: !1 } : O
2121
- ) : x), he.current.set(
2122
- p,
1267
+ (D) => D.rowId === f ? { ...D, isVisible: !1 } : D
1268
+ ) : x), P.current.set(
1269
+ f,
2123
1270
  setTimeout(() => {
2124
- _(
2125
- (x) => x.filter((S) => S.rowId !== p)
2126
- ), he.current.delete(p);
2127
- }, Ve)
1271
+ E(
1272
+ (x) => x.filter((k) => k.rowId !== f)
1273
+ ), P.current.delete(f);
1274
+ }, se)
2128
1275
  );
2129
1276
  },
2130
- [J]
2131
- ), tt = F(
2132
- (p, x) => {
2133
- J(p), _((S) => S.some(
2134
- (L) => L.rowId === p
2135
- ) ? S.map(
2136
- (L) => L.rowId === p ? { ...L, content: x, isVisible: !1 } : L
2137
- ) : [...S, { rowId: p, content: x, isVisible: !1 }]), requestAnimationFrame(() => {
2138
- _(
2139
- (S) => S.map(
2140
- (O) => O.rowId === p ? { ...O, isVisible: !0 } : O
1277
+ [z]
1278
+ ), b = C(
1279
+ (f, x) => {
1280
+ z(f), E((k) => k.some(
1281
+ (U) => U.rowId === f
1282
+ ) ? k.map(
1283
+ (U) => U.rowId === f ? { ...U, content: x, isVisible: !1 } : U
1284
+ ) : [...k, { rowId: f, content: x, isVisible: !1 }]), requestAnimationFrame(() => {
1285
+ E(
1286
+ (k) => k.map(
1287
+ (D) => D.rowId === f ? { ...D, isVisible: !0 } : D
2141
1288
  )
2142
1289
  );
2143
1290
  });
2144
1291
  },
2145
- [J]
1292
+ [z]
2146
1293
  );
2147
- V(() => {
2148
- if (!(t != null && t.length)) {
2149
- $(/* @__PURE__ */ new Set());
2150
- return;
2151
- }
2152
- $((p) => {
2153
- const x = /* @__PURE__ */ new Set(), S = new Set(t.map((O) => O.id));
2154
- return p.forEach((O) => {
2155
- S.has(O) && x.add(O);
2156
- }), x;
2157
- });
2158
- }, [t]), V(() => {
2159
- if (!re)
2160
- return;
2161
- const p = new Set(t.map((x) => x.id));
1294
+ I(() => {
1295
+ if (!O) return;
1296
+ const f = new Set(e.map((x) => x.id));
2162
1297
  w((x) => {
2163
- const S = /* @__PURE__ */ new Set();
2164
- return x.forEach((O) => {
2165
- if (p.has(O)) {
2166
- S.add(O);
1298
+ const k = /* @__PURE__ */ new Set();
1299
+ return x.forEach((D) => {
1300
+ if (f.has(D)) {
1301
+ k.add(D);
2167
1302
  return;
2168
1303
  }
2169
- J(O);
2170
- }), S;
2171
- }), _((x) => (x.forEach((S) => {
2172
- p.has(S.rowId) || J(S.rowId);
1304
+ z(D);
1305
+ }), k;
1306
+ }), E((x) => (x.forEach((k) => {
1307
+ f.has(k.rowId) || z(k.rowId);
2173
1308
  }), x.filter(
2174
- (S) => p.has(S.rowId)
1309
+ (k) => f.has(k.rowId)
2175
1310
  )));
2176
- }, [t, re, J]), V(() => {
2177
- if (re)
2178
- return;
2179
- if (G === null) {
2180
- N(null), ne && (Y.current = null);
1311
+ }, [e, O, z]), I(() => {
1312
+ if (O) return;
1313
+ if (F === null) {
1314
+ d(null), R && (N.current = null);
2181
1315
  return;
2182
1316
  }
2183
- pe(G) || (ne || A(null), N(null), ne && (Y.current = null));
1317
+ a(F) || (R || o(null), d(null), R && (N.current = null));
2184
1318
  }, [
2185
- t,
2186
- G,
2187
- pe,
2188
- ne,
2189
- re
2190
- ]), V(() => {
2191
- if (!re) {
2192
- if (Te(), G === null || P === null) {
2193
- if (q === null) {
2194
- le(!1), ce(null);
1319
+ e,
1320
+ F,
1321
+ a,
1322
+ R,
1323
+ O
1324
+ ]), I(() => {
1325
+ if (!O) {
1326
+ if (j(), F === null || c === null) {
1327
+ if (p === null) {
1328
+ S(!1), i(null);
2195
1329
  return;
2196
1330
  }
2197
- le(!1), te.current = setTimeout(() => {
2198
- we(null), ce(null), te.current = null;
2199
- }, Ve);
1331
+ S(!1), y.current = setTimeout(() => {
1332
+ h(null), i(null), y.current = null;
1333
+ }, se);
2200
1334
  return;
2201
1335
  }
2202
- if (q === null) {
2203
- we(G), ce(P), requestAnimationFrame(() => le(!0));
1336
+ if (p === null) {
1337
+ h(F), i(c), requestAnimationFrame(() => S(!0));
2204
1338
  return;
2205
1339
  }
2206
- if (q === G) {
2207
- ce(P), requestAnimationFrame(() => le(!0));
1340
+ if (p === F) {
1341
+ i(c), requestAnimationFrame(() => S(!0));
2208
1342
  return;
2209
1343
  }
2210
- le(!1), te.current = setTimeout(() => {
2211
- we(G), ce(P), requestAnimationFrame(() => le(!0)), te.current = null;
2212
- }, Ve);
1344
+ S(!1), y.current = setTimeout(() => {
1345
+ h(F), i(c), requestAnimationFrame(() => S(!0)), y.current = null;
1346
+ }, se);
2213
1347
  }
2214
1348
  }, [
2215
- Te,
2216
- P,
2217
- G,
2218
- re,
2219
- q
2220
- ]), V(
1349
+ j,
1350
+ c,
1351
+ F,
1352
+ O,
1353
+ p
1354
+ ]), I(
2221
1355
  () => () => {
2222
- Te(), J();
1356
+ j(), z();
2223
1357
  },
2224
- [Te, J]
2225
- ), V(() => {
2226
- if (!ne)
2227
- return;
2228
- if (G === null) {
2229
- N(null), Y.current = null;
1358
+ [j, z]
1359
+ ), I(() => {
1360
+ if (!R) return;
1361
+ if (F === null) {
1362
+ d(null), N.current = null;
2230
1363
  return;
2231
1364
  }
2232
- const p = pe(G);
2233
- if (!p) {
2234
- N(null), Y.current = null;
1365
+ const f = a(F);
1366
+ if (!f) {
1367
+ d(null), N.current = null;
2235
1368
  return;
2236
1369
  }
2237
- const x = Y.current;
2238
- N((h == null ? void 0 : h(p, x)) ?? null), Y.current = p;
2239
- }, [G, pe, ne, h]);
2240
- const Pt = F(
2241
- (p) => {
2242
- $((x) => {
2243
- const S = new Set(x);
2244
- return S.has(p.id) ? (S.delete(p.id), u == null || u(p, !1)) : (S.add(p.id), u == null || u(p, !0)), S;
2245
- });
2246
- },
2247
- [u]
2248
- ), Ot = F(
2249
- (p) => {
2250
- if (re) {
2251
- if (ye.has(p.id)) {
2252
- w((W) => {
2253
- const X = new Set(W);
2254
- return X.delete(p.id), X;
2255
- }), et(p.id), f == null || f(null, p);
1370
+ const x = N.current;
1371
+ d(s?.(f, x) ?? null), N.current = f;
1372
+ }, [F, a, R, s]);
1373
+ const M = C(
1374
+ (f) => {
1375
+ if (O) {
1376
+ if ($.has(f.id)) {
1377
+ w((Z) => {
1378
+ const K = new Set(Z);
1379
+ return K.delete(f.id), K;
1380
+ }), J(f.id), n?.(null, f);
2256
1381
  return;
2257
1382
  }
2258
- w((W) => {
2259
- const X = new Set(W);
2260
- return X.add(p.id), X;
1383
+ w((Z) => {
1384
+ const K = new Set(Z);
1385
+ return K.add(f.id), K;
2261
1386
  });
2262
- const L = (h == null ? void 0 : h(p, null)) ?? null;
2263
- L !== null && typeof L < "u" ? tt(p.id, L) : (J(p.id), _(
2264
- (W) => W.filter((X) => X.rowId !== p.id)
2265
- )), f == null || f(p, null);
1387
+ const U = s?.(f, null) ?? null;
1388
+ U !== null && typeof U < "u" ? b(f.id, U) : (z(f.id), E(
1389
+ (Z) => Z.filter((K) => K.rowId !== f.id)
1390
+ )), n?.(f, null);
2266
1391
  return;
2267
1392
  }
2268
- const x = G === p.id, S = x ? p : pe(G);
2269
- if (ne) {
2270
- f == null || f(x ? null : p, S);
1393
+ const x = F === f.id, k = x ? f : a(F);
1394
+ if (R) {
1395
+ n?.(x ? null : f, k);
2271
1396
  return;
2272
1397
  }
2273
1398
  if (x) {
2274
- A(null), N(null), f == null || f(null, p);
1399
+ o(null), d(null), n?.(null, f);
2275
1400
  return;
2276
1401
  }
2277
- A(p.id), N((h == null ? void 0 : h(p, S)) ?? null), f == null || f(p, S);
1402
+ o(f.id), d(s?.(f, k) ?? null), n?.(f, k);
2278
1403
  },
2279
1404
  [
2280
- G,
2281
- et,
1405
+ F,
2282
1406
  J,
2283
- tt,
2284
- pe,
2285
- ye,
2286
- ne,
2287
- re,
2288
- f,
2289
- h
1407
+ z,
1408
+ b,
1409
+ a,
1410
+ $,
1411
+ R,
1412
+ O,
1413
+ n,
1414
+ s
2290
1415
  ]
2291
- ), Ft = F(() => {
2292
- $((p) => {
2293
- const x = new Set(p), S = t ?? [], O = S.every(
2294
- (L) => x.has(L.id)
2295
- );
2296
- return S.forEach((L) => {
2297
- const W = x.has(L.id);
2298
- O ? W && (x.delete(L.id), u == null || u(L, !1)) : W || (x.add(L.id), u == null || u(L, !0));
2299
- }), x;
2300
- });
2301
- }, [t, u]), Mt = D(() => {
2302
- if (!(t != null && t.length))
2303
- return { allSelected: !1, hasSomeSelected: !1 };
2304
- const p = t.every((S) => v.has(S.id)), x = t.some((S) => v.has(S.id));
2305
- return { allSelected: p, hasSomeSelected: x };
2306
- }, [t, v]);
2307
- V(() => {
2308
- m && m(Z);
2309
- }, [Z, m]);
2310
- const nt = D(() => !a || !Z.length ? [] : Z.reduce(
2311
- (p, x, S) => {
2312
- const O = a(x).filter(
2313
- (W) => W.multiple && !W.hidden
1416
+ );
1417
+ return { expandedRowsToRender: A(() => O ? L : p === null || m === null || typeof m > "u" ? [] : [
1418
+ {
1419
+ rowId: p,
1420
+ content: m,
1421
+ isVisible: v
1422
+ }
1423
+ ], [
1424
+ v,
1425
+ O,
1426
+ m,
1427
+ p,
1428
+ L
1429
+ ]), onRowExpandChange: M };
1430
+ }
1431
+ function ot({
1432
+ actions: e,
1433
+ selectedRowsData: l
1434
+ }) {
1435
+ const r = A(() => !e || !l.length ? [] : l.reduce(
1436
+ (s, a, u) => {
1437
+ const o = e(a).filter(
1438
+ (d) => d.multiple && !d.hidden
2314
1439
  );
2315
- if (S === 0)
2316
- return O;
2317
- const L = new Map(
2318
- p.map((W) => [W.id, W])
1440
+ if (u === 0) return o;
1441
+ const c = new Map(
1442
+ s.map((d) => [d.id, d])
2319
1443
  );
2320
- return O.reduce((W, X) => {
2321
- const We = L.get(X.id);
2322
- return We && W.push({
2323
- ...We,
2324
- ...X,
2325
- disabled: X.disabled || We.disabled
2326
- }), W;
1444
+ return o.reduce((d, p) => {
1445
+ const h = c.get(p.id);
1446
+ return h && d.push({
1447
+ ...h,
1448
+ ...p,
1449
+ disabled: p.disabled || h.disabled
1450
+ }), d;
2327
1451
  }, []);
2328
1452
  },
2329
1453
  []
2330
- ), [a, Z]), Lt = F(
2331
- (p) => {
2332
- if (Z.length) {
2333
- if (p.onMultipleClick) {
2334
- p.onMultipleClick(Z);
1454
+ ), [e, l]), n = C(
1455
+ (s) => {
1456
+ if (l.length) {
1457
+ if (s.onMultipleClick) {
1458
+ s.onMultipleClick(l);
2335
1459
  return;
2336
1460
  }
2337
- Z.forEach((x) => p.onClick(x));
1461
+ l.forEach((a) => s.onClick(a));
2338
1462
  }
2339
1463
  },
2340
- [Z]
2341
- ), It = D(() => re ? z : q === null || ue === null || typeof ue > "u" ? [] : [
2342
- {
2343
- rowId: q,
2344
- content: ue,
2345
- isVisible: xe
1464
+ [l]
1465
+ );
1466
+ return { multiActions: r, handleMultipleActionClick: n };
1467
+ }
1468
+ function it({
1469
+ data: e,
1470
+ onRowSelect: l,
1471
+ onSelectedRowsChange: r
1472
+ }) {
1473
+ const [n, s] = T(/* @__PURE__ */ new Set()), a = A(
1474
+ () => e?.filter((d) => n.has(d.id)) ?? [],
1475
+ [e, n]
1476
+ );
1477
+ I(() => {
1478
+ if (!e?.length) {
1479
+ s(/* @__PURE__ */ new Set());
1480
+ return;
2346
1481
  }
2347
- ], [
2348
- xe,
2349
- re,
2350
- ue,
2351
- q,
2352
- z
2353
- ]);
2354
- return /* @__PURE__ */ i(jn, { children: /* @__PURE__ */ k("div", { className: `${o} table-main`, children: [
2355
- /* @__PURE__ */ i(lr, { columns: l, isLoading: s, ...C }),
2356
- s ? /* @__PURE__ */ i(Mn, { className: "table-loading" }) : /* @__PURE__ */ i($e, { children: Tt ? /* @__PURE__ */ i(cr, {}) : /* @__PURE__ */ k($e, { children: [
2357
- !!Z.length && /* @__PURE__ */ k("div", { className: "table-selection-bar", children: [
2358
- /* @__PURE__ */ i("p", { className: "table-selection-bar-count", children: y("_accessibility:components.table.selectedCount", {
2359
- count: Z.length
2360
- }) }),
2361
- nt.length > 0 && /* @__PURE__ */ i("div", { className: "table-selection-bar-actions", children: nt.map((p) => /* @__PURE__ */ i(Rt, { content: p.tooltip, children: /* @__PURE__ */ i(
2362
- "button",
2363
- {
2364
- type: "button",
2365
- onClick: () => Lt(p),
2366
- disabled: p.disabled,
2367
- children: p.icon
2368
- }
2369
- ) }, p.id)) })
2370
- ] }),
2371
- /* @__PURE__ */ i("div", { className: `${c} table-body`, children: /* @__PURE__ */ k("table", { className: "table-content", children: [
2372
- /* @__PURE__ */ i(
2373
- Gn,
1482
+ s((d) => {
1483
+ const p = /* @__PURE__ */ new Set(), h = new Set(e.map((m) => m.id));
1484
+ return d.forEach((m) => {
1485
+ h.has(m) && p.add(m);
1486
+ }), p;
1487
+ });
1488
+ }, [e]), I(() => {
1489
+ r && r(a);
1490
+ }, [a, r]);
1491
+ const u = C(
1492
+ (d) => {
1493
+ s((p) => {
1494
+ const h = new Set(p);
1495
+ return h.has(d.id) ? (h.delete(d.id), l?.(d, !1)) : (h.add(d.id), l?.(d, !0)), h;
1496
+ });
1497
+ },
1498
+ [l]
1499
+ ), o = C(() => {
1500
+ s((d) => {
1501
+ const p = new Set(d), h = e ?? [], m = h.every(
1502
+ (i) => p.has(i.id)
1503
+ );
1504
+ return h.forEach((i) => {
1505
+ const v = p.has(i.id);
1506
+ m ? v && (p.delete(i.id), l?.(i, !1)) : v || (p.add(i.id), l?.(i, !0));
1507
+ }), p;
1508
+ });
1509
+ }, [e, l]), c = A(() => {
1510
+ if (!e?.length)
1511
+ return { allSelected: !1, hasSomeSelected: !1 };
1512
+ const d = e.every((h) => n.has(h.id)), p = e.some((h) => n.has(h.id));
1513
+ return { allSelected: d, hasSomeSelected: p };
1514
+ }, [e, n]);
1515
+ return {
1516
+ selectedRows: n,
1517
+ selectedRowsData: a,
1518
+ selectionState: c,
1519
+ onRowSelectionChange: u,
1520
+ onToggleAllRows: o
1521
+ };
1522
+ }
1523
+ function bt(e) {
1524
+ const {
1525
+ data: l,
1526
+ onSort: r,
1527
+ entity: n = "",
1528
+ isLoading: s = !1,
1529
+ actions: a,
1530
+ columns: u = [],
1531
+ contentClassName: o = "",
1532
+ className: c = "",
1533
+ softDeleteProperty: d = "deletedAt",
1534
+ onRowSelect: p,
1535
+ onSelectedRowsChange: h,
1536
+ allowMultipleExpandedRows: m = !1,
1537
+ expandedRowId: i,
1538
+ onExpandedRowChange: v,
1539
+ onRowExpand: S,
1540
+ ...$
1541
+ } = e, w = A(() => !l?.length, [l]), L = C(
1542
+ (J) => J === null ? null : l.find((b) => b.id === J) ?? null,
1543
+ [l]
1544
+ ), {
1545
+ selectedRows: E,
1546
+ selectedRowsData: N,
1547
+ selectionState: y,
1548
+ onRowSelectionChange: P,
1549
+ onToggleAllRows: R
1550
+ } = it({ data: l, onRowSelect: p, onSelectedRowsChange: h }), { expandedRowsToRender: O, onRowExpandChange: F } = at({
1551
+ data: l,
1552
+ allowMultipleExpandedRows: m,
1553
+ controlledExpandedRowId: i,
1554
+ onExpandedRowChange: v,
1555
+ onRowExpand: S,
1556
+ findRowById: L
1557
+ }), { multiActions: j, handleMultipleActionClick: z } = ot({
1558
+ actions: a,
1559
+ selectedRowsData: N
1560
+ });
1561
+ return /* @__PURE__ */ t(Ie, { children: /* @__PURE__ */ g("div", { className: `${c} table-main`, children: [
1562
+ /* @__PURE__ */ t(st, { columns: u, isLoading: s, ...$ }),
1563
+ s ? /* @__PURE__ */ t(Te, { className: "table-loading" }) : /* @__PURE__ */ t(ee, { children: w ? /* @__PURE__ */ t(lt, {}) : /* @__PURE__ */ g(ee, { children: [
1564
+ !!N.length && /* @__PURE__ */ t(
1565
+ rt,
1566
+ {
1567
+ count: N.length,
1568
+ multiActions: j,
1569
+ onActionClick: z
1570
+ }
1571
+ ),
1572
+ /* @__PURE__ */ t("div", { className: `${o} table-body`, children: /* @__PURE__ */ g("table", { className: "table-content", children: [
1573
+ /* @__PURE__ */ t(
1574
+ Be,
2374
1575
  {
2375
1576
  entity: n,
2376
- columns: l,
1577
+ columns: u,
2377
1578
  onSortCallback: r,
2378
1579
  hasAction: !!a,
2379
- selectionState: Mt,
2380
- onToggleAllRows: Ft
1580
+ selectionState: y,
1581
+ onToggleAllRows: R
2381
1582
  }
2382
1583
  ),
2383
- /* @__PURE__ */ i("tbody", { children: /* @__PURE__ */ i(
2384
- ir,
1584
+ /* @__PURE__ */ t("tbody", { children: /* @__PURE__ */ t(
1585
+ nt,
2385
1586
  {
2386
- data: t,
1587
+ data: l,
2387
1588
  actions: a,
2388
- columns: l,
1589
+ columns: u,
2389
1590
  softDeleteProperty: d,
2390
- selectedRows: v,
2391
- expandedRows: It,
2392
- onRowSelectionChange: Pt,
2393
- onRowExpand: h ? Ot : void 0
1591
+ selectedRows: E,
1592
+ expandedRows: O,
1593
+ onRowSelectionChange: P,
1594
+ onRowExpand: S ? F : void 0
2394
1595
  }
2395
1596
  ) })
2396
1597
  ] }) }),
2397
- /* @__PURE__ */ i(sr, {})
1598
+ /* @__PURE__ */ t(et, {})
2398
1599
  ] }) })
2399
1600
  ] }) });
2400
1601
  }
2401
- function Rt(e) {
2402
- const { content: t, children: r, className: n = "" } = e;
2403
- return /* @__PURE__ */ k("div", { className: `tooltip-container ${n}`, children: [
2404
- r,
2405
- /* @__PURE__ */ i("div", { className: "tooltip-text", children: t })
1602
+ function le(e) {
1603
+ const { content: l, children: r, className: n = "" } = e, s = ye(), a = Se(r) ? $e(r, {
1604
+ "aria-describedby": s
1605
+ }) : r;
1606
+ return /* @__PURE__ */ g("div", { className: `tooltip-container ${n}`, children: [
1607
+ a,
1608
+ /* @__PURE__ */ t("div", { id: s, role: "tooltip", className: "tooltip-text", children: l })
2406
1609
  ] });
2407
1610
  }
2408
1611
  export {
2409
- qn as ActiveFilters,
2410
- Un as ArrayChip,
2411
- On as AutocompleteInput,
2412
- _t as Badge,
2413
- Fn as CheckInput,
2414
- Ln as ChevronDown,
2415
- In as ChevronLeft,
2416
- Dn as ChevronRight,
2417
- zn as ChevronUp,
2418
- fe as Chip,
2419
- Qe as Close,
2420
- Gn as Columns,
2421
- er as CountOfTotal,
2422
- _n as File,
2423
- fr as FileInput,
2424
- Qn as FilterDropdown,
2425
- de as FilterTypes,
2426
- Wn as Filters,
2427
- K as FiltersActions,
2428
- jn as FiltersProvider,
2429
- sr as Footer,
2430
- Mn as Loading,
2431
- nr as Navigation,
2432
- rr as PageSize,
2433
- Hn as RangeChip,
2434
- ir as Rows,
2435
- Xe as SelectInput,
2436
- me as SortOrder,
2437
- Je as State,
2438
- mr as Table,
2439
- cr as TableEmpty,
2440
- lr as TableHeader,
2441
- hr as TableOptionsProvider,
2442
- Ie as TextInput,
2443
- Rt as Tooltip,
2444
- pr as TranslationProvider,
2445
- Bn as filtersReducer,
2446
- St as helperTextStateClassName,
2447
- ft as initializer,
2448
- Nt as inputStateClassName,
2449
- $t as labelStateClassName,
2450
- Xn as renderFilterComponent,
2451
- Ce as useFilters,
2452
- oe as useTableOptions,
2453
- ee as useTranslation
1612
+ We as ActiveFilters,
1613
+ Ve as ArrayChip,
1614
+ ke as AutocompleteInput,
1615
+ Ee as Badge,
1616
+ Re as Button,
1617
+ Ae as CheckInput,
1618
+ Fe as ChevronDown,
1619
+ Le as ChevronLeft,
1620
+ Pe as ChevronRight,
1621
+ Oe as ChevronUp,
1622
+ G as Chip,
1623
+ ce as Close,
1624
+ Be as Columns,
1625
+ Ge as CountOfTotal,
1626
+ pt as Dropdown,
1627
+ Me as File,
1628
+ ht as FileInput,
1629
+ Xe as FilterDropdown,
1630
+ X as FilterTypes,
1631
+ ze as Filters,
1632
+ _ as FiltersActions,
1633
+ Ie as FiltersProvider,
1634
+ et as Footer,
1635
+ q as IconButton,
1636
+ Te as Loading,
1637
+ Ye as Navigation,
1638
+ Ze as PageSize,
1639
+ je as RangeChip,
1640
+ nt as Rows,
1641
+ ie as SelectInput,
1642
+ Q as SortOrder,
1643
+ oe as State,
1644
+ bt as Table,
1645
+ lt as TableEmpty,
1646
+ st as TableHeader,
1647
+ mt as TableOptionsProvider,
1648
+ rt as TableSelectionBar,
1649
+ ne as TextInput,
1650
+ le as Tooltip,
1651
+ ft as TranslationProvider,
1652
+ De as filtersReducer,
1653
+ fe as helperTextStateClassName,
1654
+ ue as initializer,
1655
+ he as inputStateClassName,
1656
+ me as labelStateClassName,
1657
+ Ke as renderFilterComponent,
1658
+ Y as useFilters,
1659
+ H as useTableOptions,
1660
+ V as useTranslation
2454
1661
  };