@sito/dashboard 0.0.42 → 0.0.43

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.
package/dist/dashboard.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import "./main.css";
2
- import { jsx as t, jsxs as v, Fragment as D } from "react/jsx-runtime";
3
- import { forwardRef as I, useState as P, useRef as M, useEffect as H, useCallback as S, createContext as W, useContext as V, useReducer as ae, useMemo as y } from "react";
2
+ import { jsx as t, jsxs as b, Fragment as M } from "react/jsx-runtime";
3
+ import { forwardRef as U, useState as P, useRef as D, useEffect as I, useCallback as k, createContext as W, useContext as q, useReducer as ae, useMemo as w } from "react";
4
4
  function se(e) {
5
5
  const { className: a = "" } = e;
6
6
  return /* @__PURE__ */ t(
@@ -57,7 +57,7 @@ const ce = (e) => {
57
57
  const { className: a = "" } = e;
58
58
  return /* @__PURE__ */ t("svg", { className: a, 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" }) });
59
59
  };
60
- function K(e) {
60
+ function Q(e) {
61
61
  const { className: a = "" } = e;
62
62
  return /* @__PURE__ */ t(
63
63
  "svg",
@@ -70,8 +70,8 @@ function K(e) {
70
70
  }
71
71
  );
72
72
  }
73
- var U = /* @__PURE__ */ ((e) => (e.error = "error", e.good = "good", e.default = "default", e))(U || {});
74
- const Q = (e) => {
73
+ var R = /* @__PURE__ */ ((e) => (e.error = "error", e.good = "good", e.default = "default", e))(R || {});
74
+ const V = (e) => {
75
75
  switch (e) {
76
76
  case "error":
77
77
  return "input-error";
@@ -99,44 +99,44 @@ const Q = (e) => {
99
99
  return "input-helper-text-normal";
100
100
  }
101
101
  };
102
- const q = I(function(e, a) {
102
+ const J = U(function(e, a) {
103
103
  const {
104
104
  value: r,
105
105
  onChange: n,
106
106
  options: s,
107
107
  containerClassName: l = "",
108
108
  inputClassName: o = "",
109
- labelClassName: c = "",
110
- helperText: i = "",
109
+ labelClassName: i = "",
110
+ helperText: c = "",
111
111
  helperTextClassName: N = "",
112
- placeholder: u = "",
113
- label: h = "",
114
- name: m = "",
115
- id: d = "",
116
- state: p = U.default,
112
+ placeholder: d = "",
113
+ label: u = "",
114
+ name: v = "",
115
+ id: m = "",
116
+ state: p = R.default,
117
117
  children: g,
118
- ...C
118
+ ...f
119
119
  } = e;
120
- return /* @__PURE__ */ v("div", { className: `select-input-container ${l}`, children: [
120
+ return /* @__PURE__ */ b("div", { className: `select-input-container ${l}`, children: [
121
121
  /* @__PURE__ */ t(
122
122
  "select",
123
123
  {
124
- ...C,
125
- id: d,
124
+ ...f,
125
+ id: m,
126
126
  ref: a,
127
- name: m,
127
+ name: v,
128
128
  value: r,
129
129
  onChange: n,
130
- className: `select-input ${Q(p)} peer ${o}`,
131
- children: s == null ? void 0 : s.map((f) => /* @__PURE__ */ t("option", { value: f.id, children: f.value ?? f.name ?? f.id }, f.id))
130
+ className: `select-input ${V(p)} peer ${o}`,
131
+ children: s == null ? void 0 : s.map((C) => /* @__PURE__ */ t("option", { value: C.id, children: C.value ?? C.name ?? C.id }, C.id))
132
132
  }
133
133
  ),
134
134
  /* @__PURE__ */ t(
135
135
  "label",
136
136
  {
137
- htmlFor: m,
138
- className: `select-input-label ${X(p)} ${c}`,
139
- children: h
137
+ htmlFor: v,
138
+ className: `select-input-label ${X(p)} ${i}`,
139
+ children: u
140
140
  }
141
141
  ),
142
142
  g,
@@ -144,84 +144,72 @@ const q = I(function(e, a) {
144
144
  "p",
145
145
  {
146
146
  className: `select-input-helper-text ${Y(p)} ${N}`,
147
- children: p !== "error" && p !== "good" ? u : i
147
+ children: p !== "error" && p !== "good" ? d : c
148
148
  }
149
149
  )
150
150
  ] });
151
151
  });
152
- const j = I(function(e, a) {
152
+ const j = U(function(e, a) {
153
153
  const {
154
154
  children: r,
155
- value: n,
156
- onChange: s,
157
- state: l = U.default,
158
- name: o = "",
159
- id: c = "",
160
- type: i = "text",
161
- label: N = "",
162
- required: u = !1,
163
- placeholder: h = "",
164
- containerClassName: m = "",
165
- inputClassName: d = "",
166
- labelClassName: p = "",
167
- helperText: g = "",
168
- helperTextClassName: C = "",
169
- ...f
155
+ state: n = R.default,
156
+ label: s = "",
157
+ containerClassName: l = "",
158
+ inputClassName: o = "",
159
+ labelClassName: i = "",
160
+ helperText: c = "",
161
+ helperTextClassName: N = "",
162
+ value: d = "",
163
+ ...u
170
164
  } = e;
171
- return /* @__PURE__ */ v("div", { className: `text-input-container ${m}`, children: [
165
+ return /* @__PURE__ */ b("div", { className: `text-input-container ${l}`, children: [
172
166
  /* @__PURE__ */ t(
173
167
  "input",
174
168
  {
175
169
  ref: a,
176
- type: i,
177
- name: o,
178
- id: c,
179
- className: `text-input ${Q(l)} peer ${d}`,
180
- placeholder: "",
181
- required: u,
182
- value: n,
183
- onChange: s,
184
- ...f
170
+ value: d,
171
+ className: `text-input ${V(n)} peer ${o} ${d ? "has-value" : ""} ${u.placeholder ? "has-placeholder" : ""}`,
172
+ ...u
185
173
  }
186
174
  ),
187
- /* @__PURE__ */ v(
175
+ !!s && /* @__PURE__ */ b(
188
176
  "label",
189
177
  {
190
- htmlFor: o,
191
- className: `text-input-label ${X(l)} ${p}`,
178
+ htmlFor: u.name,
179
+ className: `text-input-label ${X(n)} ${i}`,
192
180
  children: [
193
- N,
194
- u ? " *" : ""
181
+ s,
182
+ u.required ? " *" : ""
195
183
  ]
196
184
  }
197
185
  ),
198
186
  r,
199
- /* @__PURE__ */ t(
187
+ !!c && /* @__PURE__ */ t(
200
188
  "p",
201
189
  {
202
- className: `text-input-helper-text ${Y(l)} ${C}`,
203
- children: l !== "error" && l !== "good" ? h : g
190
+ className: `text-input-helper-text ${Y(n)} ${N}`,
191
+ children: c
204
192
  }
205
193
  )
206
194
  ] });
207
195
  });
208
- const ie = I(function(e, a) {
196
+ const ie = U(function(e, a) {
209
197
  const {
210
198
  checked: r,
211
199
  onChange: n,
212
- state: s = U.default,
200
+ state: s = R.default,
213
201
  name: l = "",
214
202
  id: o = "",
215
- type: c = "text",
216
- label: i = "",
203
+ type: i = "text",
204
+ label: c = "",
217
205
  containerClassName: N = "",
218
- inputClassName: u = "",
219
- labelClassName: h = "",
220
- helperText: m = "",
221
- helperTextClassName: d = "",
206
+ inputClassName: d = "",
207
+ labelClassName: u = "",
208
+ helperText: v = "",
209
+ helperTextClassName: m = "",
222
210
  ...p
223
211
  } = e;
224
- return /* @__PURE__ */ v("label", { className: `input-check-container ${N}`, children: [
212
+ return /* @__PURE__ */ b("label", { className: `input-check-container ${N}`, children: [
225
213
  /* @__PURE__ */ t(
226
214
  "input",
227
215
  {
@@ -231,57 +219,57 @@ const ie = I(function(e, a) {
231
219
  type: "checkbox",
232
220
  checked: r,
233
221
  onChange: n,
234
- className: `input-check ${u}`,
222
+ className: `input-check ${d}`,
235
223
  ...p
236
224
  }
237
225
  ),
238
- /* @__PURE__ */ t("span", { className: `input-check-label ${h}`, children: i })
226
+ /* @__PURE__ */ t("span", { className: `input-check-label ${u}`, children: c })
239
227
  ] });
240
228
  });
241
- const de = I(function(e, a) {
229
+ const de = U(function(e, a) {
242
230
  const {
243
231
  state: r,
244
232
  value: n,
245
233
  onChange: s,
246
234
  options: l = [],
247
235
  name: o = "",
248
- id: c = "",
249
- label: i = "",
236
+ id: i = "",
237
+ label: c = "",
250
238
  containerClassName: N = "",
251
- inputContainerClassName: u = "",
252
- helperText: h = "",
253
- placeholder: m = "",
254
- multiple: d = !1,
239
+ inputContainerClassName: d = "",
240
+ helperText: u = "",
241
+ placeholder: v = "",
242
+ multiple: m = !1,
255
243
  ...p
256
- } = e, [g, C] = P(""), [f, w] = P(!1), $ = l.filter((b) => {
257
- const x = String(b.value).toLowerCase().includes(g == null ? void 0 : g.toLowerCase());
258
- return n && n.length ? n != null && n.some ? !(n != null && n.some((R) => R.id === b.id)) : (n == null ? void 0 : n.id) !== b.id : x;
259
- }), A = M(null);
260
- H(() => {
261
- const b = (z) => {
262
- A.current && !A.current.contains(z.target) && w(!1);
263
- }, x = (z) => {
264
- z.key === "Escape" && w(!1);
244
+ } = e, [g, f] = P(""), [C, y] = P(!1), S = l.filter((h) => {
245
+ const x = String(h.value).toLowerCase().includes(g == null ? void 0 : g.toLowerCase());
246
+ return n && n.length ? n != null && n.some ? !(n != null && n.some((H) => H.id === h.id)) : (n == null ? void 0 : n.id) !== h.id : x;
247
+ }), A = D(null);
248
+ I(() => {
249
+ const h = (O) => {
250
+ A.current && !A.current.contains(O.target) && y(!1);
251
+ }, x = (O) => {
252
+ O.key === "Escape" && y(!1);
265
253
  };
266
- return document.addEventListener("mousedown", b), document.addEventListener("keydown", x), () => {
267
- document.removeEventListener("mousedown", b), document.removeEventListener("keydown", x);
254
+ return document.addEventListener("mousedown", h), document.addEventListener("keydown", x), () => {
255
+ document.removeEventListener("mousedown", h), document.removeEventListener("keydown", x);
268
256
  };
269
257
  }, []);
270
- const B = (b) => {
271
- C(b.target.value);
272
- }, J = S(
273
- (b) => {
274
- C(""), b ? d ? Array.isArray(n) && n.length ? s([...n, b]) : s([b]) : s(b) : s(null), w(!1);
258
+ const B = (h) => {
259
+ f(h.target.value);
260
+ }, G = k(
261
+ (h) => {
262
+ f(""), h ? m ? Array.isArray(n) && n.length ? s([...n, h]) : s([h]) : s(h) : s(null), y(!1);
275
263
  },
276
- [d, s, n]
277
- ), ne = S(
278
- (b) => {
279
- const x = n.filter((z, R) => R !== b);
264
+ [m, s, n]
265
+ ), ne = k(
266
+ (h) => {
267
+ const x = n.filter((O, H) => H !== h);
280
268
  x.length ? s(x) : s(null);
281
269
  },
282
270
  [s, n]
283
271
  );
284
- return /* @__PURE__ */ v(
272
+ return /* @__PURE__ */ b(
285
273
  "div",
286
274
  {
287
275
  className: `autocomplete-input-container ${N}`,
@@ -292,49 +280,49 @@ const de = I(function(e, a) {
292
280
  {
293
281
  state: r,
294
282
  name: o,
295
- id: c,
296
- value: !d && n ? n : g,
283
+ id: i,
284
+ value: !m && n ? n.value ?? n.name : g,
297
285
  onChange: B,
298
- placeholder: m,
299
- helperText: h,
300
- onFocus: () => w(!0),
301
- label: i,
302
- containerClassName: `autocomplete-text-input ${u}`,
286
+ placeholder: v,
287
+ helperText: u,
288
+ onFocus: () => y(!0),
289
+ label: c,
290
+ containerClassName: `autocomplete-text-input ${d}`,
303
291
  ref: a,
304
292
  ...p,
305
- children: !d && n && /* @__PURE__ */ t(
293
+ children: !m && n && /* @__PURE__ */ t(
306
294
  "button",
307
295
  {
308
296
  type: "button",
309
297
  className: "autocomplete-delete-button",
310
- onClick: (b) => {
311
- J(), b.stopPropagation();
298
+ onClick: (h) => {
299
+ G(), h.stopPropagation();
312
300
  },
313
- children: /* @__PURE__ */ t(K, {})
301
+ children: /* @__PURE__ */ t(Q, {})
314
302
  }
315
303
  )
316
304
  }
317
305
  ),
318
- f && /* @__PURE__ */ t("ul", { className: "autocomplete-suggestions-container", children: $.map((b) => /* @__PURE__ */ t(
306
+ C && /* @__PURE__ */ t("ul", { className: "autocomplete-suggestions-container", children: S.map((h) => /* @__PURE__ */ t(
319
307
  "li",
320
308
  {
321
309
  className: "autocomplete-suggestion-item hover:bg-primary/20",
322
310
  onClick: (x) => {
323
- J(b), x.stopPropagation();
311
+ G(h), x.stopPropagation();
324
312
  },
325
- children: b.value ?? b.name
313
+ children: h.value ?? h.name
326
314
  },
327
- b.id ?? b.value ?? b.name
315
+ h.id ?? h.value ?? h.name
328
316
  )) }),
329
- d && Array.isArray(n) && n.length ? /* @__PURE__ */ t("ul", { className: "autocomplete-value-container", children: n.map((b, x) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
317
+ m && Array.isArray(n) && n.length ? /* @__PURE__ */ t("ul", { className: "autocomplete-value-container", children: n.map((h, x) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
330
318
  Te,
331
319
  {
332
- label: String(b.value ?? b.name),
333
- onDelete: (z) => {
334
- ne(x), z.stopPropagation();
320
+ label: String(h.value ?? h.name),
321
+ onDelete: (O) => {
322
+ ne(x), O.stopPropagation();
335
323
  }
336
324
  }
337
- ) }, b.id ?? b.value ?? b.name)) }) : null
325
+ ) }, h.id ?? h.value ?? h.name)) }) : null
338
326
  ]
339
327
  }
340
328
  );
@@ -365,59 +353,59 @@ function Be(e) {
365
353
  const { children: a, t: r } = e;
366
354
  return /* @__PURE__ */ t(Z.Provider, { value: { t: r }, children: a });
367
355
  }
368
- const L = () => {
369
- const e = V(Z);
356
+ const E = () => {
357
+ const e = q(Z);
370
358
  if (e === void 0)
371
359
  throw new Error("translationContext must be used within a Provider");
372
360
  return e;
373
361
  };
374
- var E = /* @__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))(E || {}), F = /* @__PURE__ */ ((e) => (e.ASC = "ASC", e.DESC = "DESC", e))(F || {});
375
- const pe = [20, 50, 100], ee = W({}), De = (e) => {
376
- const { children: a } = e, [r, n] = P(0), [s, l] = P(20), [o, c] = P(0), [i, N] = P("id"), [u, h] = P(F.DESC), [m, d] = P({}), p = S(
377
- (f, w) => {
378
- let $ = u;
379
- if (i === f)
380
- switch (u) {
362
+ var L = /* @__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))(L || {}), F = /* @__PURE__ */ ((e) => (e.ASC = "ASC", e.DESC = "DESC", e))(F || {});
363
+ const pe = [20, 50, 100], ee = W({}), Me = (e) => {
364
+ const { children: a } = e, [r, n] = P(0), [s, l] = P(20), [o, i] = P(0), [c, N] = P("id"), [d, u] = P(F.DESC), [v, m] = P({}), p = k(
365
+ (C, y) => {
366
+ let S = d;
367
+ if (c === C)
368
+ switch (d) {
381
369
  case F.ASC:
382
- $ = F.DESC;
370
+ S = F.DESC;
383
371
  break;
384
372
  default:
385
- $ = F.ASC;
373
+ S = F.ASC;
386
374
  break;
387
375
  }
388
- N(f), h($), w && w(f, $);
376
+ N(C), u(S), y && y(C, S);
389
377
  },
390
- [i, u]
391
- ), g = S((f) => {
392
- const w = Object.entries(f).reduce(
393
- ($, [A, B]) => (B && typeof B.value < "u" && ($[A] = B.value), $),
378
+ [c, d]
379
+ ), g = k((C) => {
380
+ const y = Object.entries(C).reduce(
381
+ (S, [A, B]) => (B && typeof B.value < "u" && (S[A] = B.value), S),
394
382
  {}
395
383
  );
396
- d(w);
397
- }, []), C = {
384
+ m(y);
385
+ }, []), f = {
398
386
  onSort: p,
399
387
  total: r,
400
388
  setTotal: n,
401
- sortingBy: i,
389
+ sortingBy: c,
402
390
  setSortingBy: N,
403
- sortingOrder: u,
404
- setSortingOrder: h,
391
+ sortingOrder: d,
392
+ setSortingOrder: u,
405
393
  pageSize: s,
406
394
  pageSizes: pe,
407
395
  setPageSize: l,
408
396
  currentPage: o,
409
- setCurrentPage: c,
410
- filters: m,
397
+ setCurrentPage: i,
398
+ filters: v,
411
399
  onFilterApply: g
412
400
  };
413
- return /* @__PURE__ */ t(ee.Provider, { value: C, children: a });
401
+ return /* @__PURE__ */ t(ee.Provider, { value: f, children: a });
414
402
  }, T = () => {
415
- const e = V(ee);
403
+ const e = q(ee);
416
404
  if (e === void 0)
417
405
  throw new Error("tableOptionsContext must be used within a Provider");
418
406
  return e;
419
407
  };
420
- var k = /* @__PURE__ */ ((e) => (e[e.update = 0] = "update", e[e.reset = 1] = "reset", e))(k || {});
408
+ var $ = /* @__PURE__ */ ((e) => (e[e.update = 0] = "update", e[e.reset = 1] = "reset", e))($ || {});
421
409
  const he = (e) => {
422
410
  if (e) {
423
411
  const a = {}, r = Object.keys(e);
@@ -430,13 +418,13 @@ const he = (e) => {
430
418
  function me(e, a) {
431
419
  const { type: r } = a;
432
420
  switch (r) {
433
- case k.reset: {
421
+ case $.reset: {
434
422
  const { filters: n } = a, s = {};
435
423
  return n == null || n.forEach(({ propertyName: l, defaultValue: o }) => {
436
424
  s[l] = { value: o };
437
425
  }), { ...e, ...s };
438
426
  }
439
- case k.update: {
427
+ case $.update: {
440
428
  const { toUpdate: n } = a;
441
429
  return { ...e, ...n };
442
430
  }
@@ -454,51 +442,51 @@ const te = W({}), be = (e) => {
454
442
  };
455
443
  return /* @__PURE__ */ t(te.Provider, { value: l, children: a });
456
444
  }, _ = () => {
457
- const e = V(te);
445
+ const e = q(te);
458
446
  if (e === void 0)
459
447
  throw new Error("tableOptionsContext must be used within a Provider");
460
448
  return e;
461
449
  };
462
- function ge(e) {
463
- const { t: a } = L(), { entity: r = "", columns: n = [], hasAction: s = !0, onSortCallback: l } = e, { onSort: o, sortingOrder: c, sortingBy: i } = T(), N = y(() => {
464
- var u;
465
- return (u = n.sort((h, m) => (m.pos ?? 0) - (h.pos ?? 0)).filter((h) => h.display !== "none")) == null ? void 0 : u.map((h) => ({
466
- id: h.key,
467
- label: h.label,
468
- className: h.className ?? "",
469
- sortable: h.sortable ?? !0,
470
- sortOptions: h.sortOptions
450
+ function ve(e) {
451
+ const { t: a } = E(), { entity: r = "", columns: n = [], hasAction: s = !0, onSortCallback: l } = e, { onSort: o, sortingOrder: i, sortingBy: c } = T(), N = w(() => {
452
+ var d;
453
+ return (d = n.sort((u, v) => (v.pos ?? 0) - (u.pos ?? 0)).filter((u) => u.display !== "none")) == null ? void 0 : d.map((u) => ({
454
+ id: u.key,
455
+ label: u.label,
456
+ className: u.className ?? "",
457
+ sortable: u.sortable ?? !0,
458
+ sortOptions: u.sortOptions
471
459
  }));
472
460
  }, [n, r, a]);
473
- return /* @__PURE__ */ t("thead", { className: "table-headers-row", children: /* @__PURE__ */ v("tr", { children: [
474
- N.map((u) => {
475
- var h, m, d, p, g, C, f, w;
461
+ return /* @__PURE__ */ t("thead", { className: "table-headers-row", children: /* @__PURE__ */ b("tr", { children: [
462
+ N.map((d) => {
463
+ var u, v, m, p, g, f, C, y;
476
464
  return /* @__PURE__ */ t(
477
465
  "th",
478
466
  {
479
467
  scope: "col",
480
- className: `table-headers-column ${u.className}`,
481
- children: /* @__PURE__ */ v(
468
+ className: `table-headers-column ${d.className}`,
469
+ children: /* @__PURE__ */ b(
482
470
  "button",
483
471
  {
484
- disabled: !u.sortable,
485
- onClick: () => o(u.id, l),
472
+ disabled: !d.sortable,
473
+ onClick: () => o(d.id, l),
486
474
  className: "table-headers-cell",
487
475
  children: [
488
- /* @__PURE__ */ t("span", { className: "table-headers-label", children: u.label }),
489
- u.sortable && /* @__PURE__ */ t(
476
+ /* @__PURE__ */ t("span", { className: "table-headers-label", children: d.label }),
477
+ d.sortable && /* @__PURE__ */ t(
490
478
  "span",
491
479
  {
492
- className: `${i === u.id ? "table-headers-sort-on" : "table-headers-sort"}`,
493
- children: c === F.ASC ? ((m = (h = u.sortOptions) == null ? void 0 : h.icons) == null ? void 0 : m.asc) ?? /* @__PURE__ */ t(
480
+ className: `${c === d.id ? "table-headers-sort-on" : "table-headers-sort"}`,
481
+ children: i === F.ASC ? ((v = (u = d.sortOptions) == null ? void 0 : u.icons) == null ? void 0 : v.asc) ?? /* @__PURE__ */ t(
494
482
  re,
495
483
  {
496
- className: ((p = (d = u.sortOptions) == null ? void 0 : d.icons) == null ? void 0 : p.className) ?? "table-headers-sort-indicator"
484
+ className: ((p = (m = d.sortOptions) == null ? void 0 : m.icons) == null ? void 0 : p.className) ?? "table-headers-sort-indicator"
497
485
  }
498
- ) : ((C = (g = u.sortOptions) == null ? void 0 : g.icons) == null ? void 0 : C.desc) ?? /* @__PURE__ */ t(
486
+ ) : ((f = (g = d.sortOptions) == null ? void 0 : g.icons) == null ? void 0 : f.desc) ?? /* @__PURE__ */ t(
499
487
  se,
500
488
  {
501
- className: ((w = (f = u.sortOptions) == null ? void 0 : f.icons) == null ? void 0 : w.className) ?? "table-headers-sort-indicator"
489
+ className: ((y = (C = d.sortOptions) == null ? void 0 : C.icons) == null ? void 0 : y.className) ?? "table-headers-sort-indicator"
502
490
  }
503
491
  )
504
492
  }
@@ -507,19 +495,19 @@ function ge(e) {
507
495
  }
508
496
  )
509
497
  },
510
- u.id
498
+ d.id
511
499
  );
512
500
  }),
513
501
  s && /* @__PURE__ */ t("th", { scope: "col", className: "table-headers-action", children: a("_accessibility:labels.actions") })
514
502
  ] }) });
515
503
  }
516
- function ve() {
517
- const { t: e } = L();
504
+ function ge() {
505
+ const { t: e } = E();
518
506
  return /* @__PURE__ */ t("div", { className: "table-empty", children: /* @__PURE__ */ t("p", { children: e("_accessibility:components.table.empty") }) });
519
507
  }
520
508
  const Ne = () => {
521
- const { t: e } = L(), { total: a, pageSize: r, currentPage: n, setCurrentPage: s } = T();
522
- return /* @__PURE__ */ v("div", { className: "table-navigation-pages", children: [
509
+ const { t: e } = E(), { total: a, pageSize: r, currentPage: n, setCurrentPage: s } = T();
510
+ return /* @__PURE__ */ b("div", { className: "table-navigation-pages", children: [
523
511
  /* @__PURE__ */ t(
524
512
  "button",
525
513
  {
@@ -544,9 +532,9 @@ const Ne = () => {
544
532
  )
545
533
  ] });
546
534
  }, fe = () => {
547
- const { t: e } = L(), { total: a, pageSize: r, pageSizes: n, currentPage: s } = T(), l = (s + 1) * r > a ? a : (s + 1) * r;
548
- return /* @__PURE__ */ v("div", { className: "table-navigation-sizes", children: [
549
- n[0] < a && /* @__PURE__ */ t(D, { children: /* @__PURE__ */ v("p", { children: [
535
+ const { t: e } = E(), { total: a, pageSize: r, pageSizes: n, currentPage: s } = T(), l = (s + 1) * r > a ? a : (s + 1) * r;
536
+ return /* @__PURE__ */ b("div", { className: "table-navigation-sizes", children: [
537
+ n[0] < a && /* @__PURE__ */ t(M, { children: /* @__PURE__ */ b("p", { children: [
550
538
  s * r + 1,
551
539
  " - ",
552
540
  l,
@@ -557,14 +545,14 @@ const Ne = () => {
557
545
  ] });
558
546
  };
559
547
  function Ce() {
560
- const { t: e } = L(), { pageSizes: a, pageSize: r, setPageSize: n } = T(), s = y(
548
+ const { t: e } = E(), { pageSizes: a, pageSize: r, setPageSize: n } = T(), s = w(
561
549
  () => a == null ? void 0 : a.map((l) => ({ id: l, value: l })),
562
550
  [a]
563
551
  );
564
- return /* @__PURE__ */ v("div", { className: "page-size", children: [
552
+ return /* @__PURE__ */ b("div", { className: "page-size", children: [
565
553
  /* @__PURE__ */ t("p", { children: e("_accessibility:components.table.pageSizes") }),
566
554
  /* @__PURE__ */ t(
567
- q,
555
+ J,
568
556
  {
569
557
  value: r,
570
558
  options: s,
@@ -577,17 +565,17 @@ function Ce() {
577
565
  ] });
578
566
  }
579
567
  function ye() {
580
- const { t: e } = L(), { total: a, pageSize: r, currentPage: n, setCurrentPage: s } = T(), l = y(() => {
568
+ const { t: e } = E(), { total: a, pageSize: r, currentPage: n, setCurrentPage: s } = T(), l = w(() => {
581
569
  const o = Math.ceil(a / r);
582
- return Array.from({ length: o }, (c, i) => ({
583
- id: i,
584
- value: i + 1
570
+ return Array.from({ length: o }, (i, c) => ({
571
+ id: c,
572
+ value: c + 1
585
573
  }));
586
574
  }, [a, r]);
587
- return /* @__PURE__ */ v("div", { className: "jump-to-page", children: [
575
+ return /* @__PURE__ */ b("div", { className: "jump-to-page", children: [
588
576
  /* @__PURE__ */ t("p", { children: e("_accessibility:components.table.jumpToPage") }),
589
577
  /* @__PURE__ */ t(
590
- q,
578
+ J,
591
579
  {
592
580
  value: n,
593
581
  options: l,
@@ -600,7 +588,7 @@ function ye() {
600
588
  ] });
601
589
  }
602
590
  function we() {
603
- return /* @__PURE__ */ v("div", { className: "table-footer", children: [
591
+ return /* @__PURE__ */ b("div", { className: "table-footer", children: [
604
592
  /* @__PURE__ */ t(ye, {}),
605
593
  /* @__PURE__ */ t(Ce, {}),
606
594
  /* @__PURE__ */ t(fe, {}),
@@ -608,35 +596,35 @@ function we() {
608
596
  ] });
609
597
  }
610
598
  function xe(e) {
611
- const { propertyName: a, options: r, label: n } = e, { currentFilters: s, setCurrentFilters: l } = _(), o = y(() => {
612
- var i;
613
- return ((i = s[a]) == null ? void 0 : i.value) ?? r[0];
614
- }, [s]), c = S((i) => {
599
+ const { propertyName: a, options: r, label: n } = e, { currentFilters: s, setCurrentFilters: l } = _(), o = w(() => {
600
+ var c;
601
+ return ((c = s[a]) == null ? void 0 : c.value) ?? r[0];
602
+ }, [s]), i = k((c) => {
615
603
  l({
616
- type: k.update,
617
- toUpdate: { [a]: { value: i.target.value } }
604
+ type: $.update,
605
+ toUpdate: { [a]: { value: c.target.value } }
618
606
  });
619
607
  }, []);
620
608
  return /* @__PURE__ */ t(
621
- q,
609
+ J,
622
610
  {
623
611
  value: o,
624
612
  label: n,
625
613
  options: r,
626
614
  helperTextClassName: "hidden",
627
615
  containerClassName: "options-widget-container",
628
- onChange: c
616
+ onChange: i
629
617
  }
630
618
  );
631
619
  }
632
- const Se = (e) => {
633
- const { propertyName: a, label: r } = e, { currentFilters: n, setCurrentFilters: s } = _(), l = y(() => {
634
- var c;
635
- return ((c = n[a]) == null ? void 0 : c.value) ?? "";
636
- }, [n]), o = S((c) => {
620
+ const ke = (e) => {
621
+ const { propertyName: a, label: r } = e, { currentFilters: n, setCurrentFilters: s } = _(), l = w(() => {
622
+ var i;
623
+ return ((i = n[a]) == null ? void 0 : i.value) ?? "";
624
+ }, [n]), o = k((i) => {
637
625
  s({
638
- type: k.update,
639
- toUpdate: { [a]: { value: c.target.value } }
626
+ type: $.update,
627
+ toUpdate: { [a]: { value: i.target.value } }
640
628
  });
641
629
  }, []);
642
630
  return /* @__PURE__ */ t(
@@ -649,23 +637,23 @@ const Se = (e) => {
649
637
  helperTextClassName: ""
650
638
  }
651
639
  );
652
- }, ke = (e) => {
653
- const { propertyName: a, label: r } = e, { currentFilters: n, setCurrentFilters: s } = _(), l = y(() => {
654
- var c;
655
- return ((c = n[a]) == null ? void 0 : c.value) ?? "";
656
- }, [n]), o = S((c) => {
640
+ }, $e = (e) => {
641
+ const { propertyName: a, label: r } = e, { currentFilters: n, setCurrentFilters: s } = _(), l = w(() => {
642
+ var i;
643
+ return ((i = n[a]) == null ? void 0 : i.value) ?? "";
644
+ }, [n]), o = k((i) => {
657
645
  s({
658
- type: k.update,
659
- toUpdate: { [a]: { value: c.target.checked } }
646
+ type: $.update,
647
+ toUpdate: { [a]: { value: i.target.checked } }
660
648
  });
661
649
  }, []);
662
650
  return /* @__PURE__ */ t(ie, { label: r, checked: l ?? !1, onChange: o });
663
651
  };
664
- function $e(e) {
665
- const { propertyName: a, label: r, options: n, multiple: s = !0 } = e, { currentFilters: l, setCurrentFilters: o } = _(), c = y(() => l[a] ?? n[0], [l]), i = S(
652
+ function Se(e) {
653
+ const { propertyName: a, label: r, options: n, multiple: s = !0 } = e, { currentFilters: l, setCurrentFilters: o } = _(), i = w(() => l[a] ?? n[0], [l]), c = k(
666
654
  (N) => {
667
655
  o({
668
- type: k.update,
656
+ type: $.update,
669
657
  toUpdate: {
670
658
  [a]: {
671
659
  value: N
@@ -678,116 +666,124 @@ function $e(e) {
678
666
  return /* @__PURE__ */ t(
679
667
  de,
680
668
  {
681
- value: c == null ? void 0 : c.value,
669
+ value: i == null ? void 0 : i.value,
682
670
  label: r,
683
671
  options: n,
684
672
  multiple: s,
685
673
  helperTextClassName: "hidden",
686
674
  containerClassName: "options-widget-container",
687
- onChange: i
675
+ onChange: c
688
676
  }
689
677
  );
690
678
  }
691
- const G = (e) => {
692
- const { propertyName: a, label: r, inputType: n } = e, { currentFilters: s, setCurrentFilters: l } = _(), o = M(null), c = M(null), i = y(() => {
693
- var d, p, g;
694
- const m = (p = (d = s[a]) == null ? void 0 : d.value) == null ? void 0 : p.start;
695
- return m ? n === "date" ? new Date(String(m)).toISOString().slice(0, 10) : (g = s[a]) == null ? void 0 : g.value : "";
696
- }, [s]), N = y(() => {
697
- var d, p, g;
698
- const m = (p = (d = s[a]) == null ? void 0 : d.value) == null ? void 0 : p.end;
699
- return m ? n === "date" ? new Date(String(m)).toISOString().slice(0, 10) : (g = s[a]) == null ? void 0 : g.value : "";
700
- }, [s]), u = S((m) => {
701
- var d;
702
- l({
703
- type: k.update,
679
+ const K = (e) => {
680
+ var u, v, m, p;
681
+ const { propertyName: a, label: r, inputType: n } = e, { t: s } = E(), { currentFilters: l, setCurrentFilters: o } = _(), i = D(null), c = D(null), N = k((g) => {
682
+ var f;
683
+ o({
684
+ type: $.update,
704
685
  toUpdate: {
705
686
  [a]: {
706
- value: { end: ((d = c == null ? void 0 : c.current) == null ? void 0 : d.value) ?? null, start: m.target.value }
687
+ value: { end: ((f = c == null ? void 0 : c.current) == null ? void 0 : f.value) ?? null, start: g.target.value }
707
688
  }
708
689
  }
709
690
  });
710
- }, []), h = S((m) => {
711
- var d;
712
- l({
713
- type: k.update,
691
+ }, []), d = k((g) => {
692
+ var f;
693
+ o({
694
+ type: $.update,
714
695
  toUpdate: {
715
696
  [a]: {
716
697
  value: {
717
- start: ((d = o == null ? void 0 : o.current) == null ? void 0 : d.value) ?? null,
718
- end: m.target.value
698
+ start: ((f = i == null ? void 0 : i.current) == null ? void 0 : f.value) ?? null,
699
+ end: g.target.value
719
700
  }
720
701
  }
721
702
  }
722
703
  });
723
704
  }, []);
724
- return /* @__PURE__ */ v("div", { className: "flex gap-2 items-center", children: [
725
- /* @__PURE__ */ t(
726
- j,
727
- {
728
- value: i ?? "",
729
- label: r,
730
- type: n,
731
- ref: o,
732
- onChange: u,
733
- containerClassName: "input-widget-container",
734
- helperTextClassName: ""
735
- }
736
- ),
737
- /* @__PURE__ */ t(
738
- j,
739
- {
740
- value: N ?? "",
741
- label: r,
742
- type: n,
743
- ref: c,
744
- onChange: h,
745
- containerClassName: "input-widget-container",
746
- helperTextClassName: ""
747
- }
748
- )
705
+ return /* @__PURE__ */ b("div", { className: "relative", children: [
706
+ /* @__PURE__ */ t("p", { className: "text-input-label input-widget-label input-label-normal", children: r }),
707
+ /* @__PURE__ */ b("div", { className: "range-widget-row", children: [
708
+ /* @__PURE__ */ t(
709
+ j,
710
+ {
711
+ value: ((v = (u = l[a]) == null ? void 0 : u.value) == null ? void 0 : v.start) ?? "",
712
+ placeholder: s("_accessibility:components.table.filters.range.start"),
713
+ type: n,
714
+ ref: i,
715
+ onChange: N,
716
+ containerClassName: "input-widget-container",
717
+ helperTextClassName: ""
718
+ }
719
+ ),
720
+ /* @__PURE__ */ t(
721
+ j,
722
+ {
723
+ value: ((p = (m = l[a]) == null ? void 0 : m.value) == null ? void 0 : p.end) ?? "",
724
+ placeholder: s("_accessibility:components.table.filters.range.end"),
725
+ type: n,
726
+ ref: c,
727
+ onChange: d,
728
+ containerClassName: "input-widget-container",
729
+ helperTextClassName: ""
730
+ }
731
+ )
732
+ ] })
749
733
  ] });
750
734
  }, Pe = (e) => {
751
735
  switch (e.type) {
752
- case E.text:
753
- return /* @__PURE__ */ t(Se, { ...e });
754
- case E.number:
755
- return /* @__PURE__ */ t(G, { ...e });
756
- case E.date:
757
- return /* @__PURE__ */ t(G, { ...e });
758
- case E.select:
736
+ case L.text:
737
+ return /* @__PURE__ */ t(ke, { ...e });
738
+ case L.number:
739
+ return /* @__PURE__ */ t(
740
+ K,
741
+ {
742
+ ...e,
743
+ inputType: "number"
744
+ }
745
+ );
746
+ case L.date:
747
+ return /* @__PURE__ */ t(
748
+ K,
749
+ {
750
+ ...e,
751
+ inputType: "date"
752
+ }
753
+ );
754
+ case L.select:
759
755
  return /* @__PURE__ */ t(xe, { ...e });
760
- case E.autocomplete:
756
+ case L.autocomplete:
757
+ return /* @__PURE__ */ t(Se, { ...e });
758
+ case L.check:
761
759
  return /* @__PURE__ */ t($e, { ...e });
762
- case E.check:
763
- return /* @__PURE__ */ t(ke, { ...e });
764
760
  }
765
- return /* @__PURE__ */ t(D, {});
761
+ return /* @__PURE__ */ t(M, {});
766
762
  };
767
- const Oe = (e) => {
768
- const { align: a = "right", filters: r = [], icon: n } = e, [s, l] = P(!1), { onFilterApply: o, filters: c } = T(), { currentFilters: i, setCurrentFilters: N } = _(), { t: u } = L(), h = M(null), m = M(null);
769
- return H(() => {
770
- const d = ({ target: p }) => {
771
- var g, C;
772
- m.current && (!s || (g = m.current) != null && g.contains(p) || (C = h == null ? void 0 : h.current) != null && C.contains(p) || l(!1));
763
+ const ze = (e) => {
764
+ const { align: a = "right", filters: r = [], icon: n } = e, [s, l] = P(!1), { onFilterApply: o, filters: i } = T(), { currentFilters: c, setCurrentFilters: N } = _(), { t: d } = E(), u = D(null), v = D(null);
765
+ return I(() => {
766
+ const m = ({ target: p }) => {
767
+ var g, f;
768
+ v.current && (!s || (g = v.current) != null && g.contains(p) || (f = u == null ? void 0 : u.current) != null && f.contains(p) || l(!1));
773
769
  };
774
- return document.addEventListener("click", d), () => document.removeEventListener("click", d);
775
- }), H(() => {
776
- const d = (p) => {
770
+ return document.addEventListener("click", m), () => document.removeEventListener("click", m);
771
+ }), I(() => {
772
+ const m = (p) => {
777
773
  !s || p.code !== "Escape" || l(!1);
778
774
  };
779
- return document.addEventListener("keydown", d), () => document.removeEventListener("keydown", d);
780
- }), /* @__PURE__ */ v("div", { className: "filter-dropdown-main", children: [
781
- /* @__PURE__ */ v(
775
+ return document.addEventListener("keydown", m), () => document.removeEventListener("keydown", m);
776
+ }), /* @__PURE__ */ b("div", { className: "filter-dropdown-main", children: [
777
+ /* @__PURE__ */ b(
782
778
  "button",
783
779
  {
784
- ref: h,
780
+ ref: u,
785
781
  className: "filter-dropdown-button normal filter-dropdown-trigger",
786
782
  "aria-haspopup": "true",
787
783
  onClick: () => l(!s),
788
784
  "aria-expanded": s,
789
785
  children: [
790
- /* @__PURE__ */ t("span", { className: "sr-only", children: u("_accessibility:buttons.filters") }),
786
+ /* @__PURE__ */ t("span", { className: "sr-only", children: d("_accessibility:buttons.filters") }),
791
787
  /* @__PURE__ */ t("wbr", {}),
792
788
  n ?? /* @__PURE__ */ t(ce, { className: "filter-dropdown-trigger-icon" })
793
789
  ]
@@ -797,16 +793,16 @@ const Oe = (e) => {
797
793
  "div",
798
794
  {
799
795
  className: `filter-dropdown-transition ${s ? "opened" : "closed"} ${a === "right" ? "right" : "left"}`,
800
- children: /* @__PURE__ */ v("div", { ref: m, children: [
801
- /* @__PURE__ */ t("div", { className: "filter-title", children: u("_accessibility:buttons.filters") }),
802
- /* @__PURE__ */ t("ul", { className: "filter-container", children: r.map((d) => /* @__PURE__ */ t("li", { className: "filter-container-item", children: Pe(d) }, d.propertyName)) }),
803
- /* @__PURE__ */ t("div", { className: "filter-footer", children: /* @__PURE__ */ v("ul", { className: "filter-buttons-row", children: [
796
+ children: /* @__PURE__ */ b("div", { ref: v, children: [
797
+ /* @__PURE__ */ t("div", { className: "filter-title", children: d("_accessibility:buttons.filters") }),
798
+ /* @__PURE__ */ t("ul", { className: "filter-container", children: r.map((m) => /* @__PURE__ */ t("li", { className: "filter-container-item", children: Pe(m) }, m.propertyName)) }),
799
+ /* @__PURE__ */ t("div", { className: "filter-footer", children: /* @__PURE__ */ b("ul", { className: "filter-buttons-row", children: [
804
800
  /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
805
801
  "button",
806
802
  {
807
- onClick: () => N({ type: k.reset, filters: r }),
803
+ onClick: () => N({ type: $.reset, filters: r }),
808
804
  className: "filter-dropdown-button small filter-dropdown-cancel",
809
- children: u("_accessibility:buttons.clear")
805
+ children: d("_accessibility:buttons.clear")
810
806
  }
811
807
  ) }),
812
808
  /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
@@ -814,10 +810,10 @@ const Oe = (e) => {
814
810
  {
815
811
  className: "filter-dropdown-button small filter-dropdown-submit bg-primary hover:bg-light-primary",
816
812
  onClick: () => {
817
- l(!1), o(i);
813
+ l(!1), o(c);
818
814
  },
819
815
  onBlur: () => l(!1),
820
- children: u("_accessibility:buttons.applyFilters")
816
+ children: d("_accessibility:buttons.applyFilters")
821
817
  }
822
818
  ) })
823
819
  ] }) })
@@ -825,34 +821,34 @@ const Oe = (e) => {
825
821
  }
826
822
  )
827
823
  ] });
828
- }, ze = (e) => e, Ee = (e) => {
829
- const { columns: a, softDeleteProperty: r = "deleted", data: n, actions: s } = e, l = y(
830
- () => a.sort((o, c) => (c.pos ?? 0) - (o.pos ?? 0)).filter((o) => o.display !== "none"),
824
+ }, Ee = (e) => e, Oe = (e) => {
825
+ const { columns: a, softDeleteProperty: r = "deleted", data: n, actions: s } = e, l = w(
826
+ () => a.sort((o, i) => (i.pos ?? 0) - (o.pos ?? 0)).filter((o) => o.display !== "none"),
831
827
  [a]
832
828
  );
833
829
  return n == null ? void 0 : n.map((o) => {
834
- var c;
835
- return /* @__PURE__ */ v(
830
+ var i;
831
+ return /* @__PURE__ */ b(
836
832
  "tr",
837
833
  {
838
834
  className: `table-row ${o[r] ? "deleted-class" : ""}`,
839
835
  children: [
840
- l == null ? void 0 : l.map((i, N) => /* @__PURE__ */ t(
836
+ l == null ? void 0 : l.map((c, N) => /* @__PURE__ */ t(
841
837
  "td",
842
838
  {
843
- className: `table-row-cell ${N === 0 ? "basic" : ""} ${i.className ?? ""}`,
844
- children: i.renderBody ? i.renderBody(o[i.key], o) : ze(o[i.key])
839
+ className: `table-row-cell ${N === 0 ? "basic" : ""} ${c.className ?? ""}`,
840
+ children: c.renderBody ? c.renderBody(o[c.key], o) : Ee(o[c.key])
845
841
  },
846
- i.key
842
+ c.key
847
843
  )),
848
- s ? /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("div", { className: "table-row-cell-action", children: (c = s(o).filter((i) => !i.hidden)) == null ? void 0 : c.map((i) => /* @__PURE__ */ t(Le, { content: i.tooltip, children: /* @__PURE__ */ t("button", { onClick: () => i.onClick(o), children: i.icon }) }, i.id)) }) }) : null
844
+ s ? /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("div", { className: "table-row-cell-action", children: (i = s(o).filter((c) => !c.hidden)) == null ? void 0 : i.map((c) => /* @__PURE__ */ t(Le, { content: c.tooltip, children: /* @__PURE__ */ t("button", { onClick: () => c.onClick(o), children: c.icon }) }, c.id)) }) }) : null
849
845
  ]
850
846
  },
851
847
  o.id
852
848
  );
853
849
  });
854
850
  };
855
- function Me(e) {
851
+ function De(e) {
856
852
  const {
857
853
  title: a = "",
858
854
  data: r,
@@ -860,45 +856,45 @@ function Me(e) {
860
856
  entity: s = "",
861
857
  isLoading: l = !1,
862
858
  actions: o,
863
- columns: c = [],
864
- contentClassName: i = "",
859
+ columns: i = [],
860
+ contentClassName: c = "",
865
861
  className: N = "",
866
- toolbar: u = /* @__PURE__ */ t(D, {}),
867
- softDeleteProperty: h = "deleted"
868
- } = e, m = y(() => c ? c.sort((p, g) => (g.pos ?? 0) - (p.pos ?? 0)).filter((p) => !!p.filterOptions).map((p) => {
862
+ toolbar: d = /* @__PURE__ */ t(M, {}),
863
+ softDeleteProperty: u = "deleted"
864
+ } = e, v = w(() => i ? i.sort((p, g) => (g.pos ?? 0) - (p.pos ?? 0)).filter((p) => !!p.filterOptions).map((p) => {
869
865
  var g;
870
866
  return {
871
867
  ...p.filterOptions,
872
868
  label: ((g = p.filterOptions) == null ? void 0 : g.label) ?? p.label,
873
869
  propertyName: p.key
874
870
  };
875
- }) : [], [c]), d = y(() => !(r != null && r.length), [r]);
876
- return /* @__PURE__ */ t(be, { children: /* @__PURE__ */ v("div", { className: `${N} table-main`, children: [
877
- /* @__PURE__ */ v("div", { className: "table-header", children: [
871
+ }) : [], [i]), m = w(() => !(r != null && r.length), [r]);
872
+ return /* @__PURE__ */ t(be, { children: /* @__PURE__ */ b("div", { className: `${N} table-main`, children: [
873
+ /* @__PURE__ */ b("div", { className: "table-header", children: [
878
874
  /* @__PURE__ */ t("h1", { className: "table-header-title", children: a }),
879
- l ? null : /* @__PURE__ */ v("div", { className: "table-header-right", children: [
880
- u,
881
- !!m && !!m.length && /* @__PURE__ */ t(Oe, { filters: m })
875
+ l ? null : /* @__PURE__ */ b("div", { className: "table-header-right", children: [
876
+ d,
877
+ !!v && !!v.length && /* @__PURE__ */ t(ze, { filters: v })
882
878
  ] })
883
879
  ] }),
884
- l ? /* @__PURE__ */ t(ue, { className: "table-loading" }) : /* @__PURE__ */ t(D, { children: d ? /* @__PURE__ */ t(ve, {}) : /* @__PURE__ */ v(D, { children: [
885
- /* @__PURE__ */ t("div", { className: `${i} table-body`, children: /* @__PURE__ */ v("table", { className: "table-content", children: [
880
+ l ? /* @__PURE__ */ t(ue, { className: "table-loading" }) : /* @__PURE__ */ t(M, { children: m ? /* @__PURE__ */ t(ge, {}) : /* @__PURE__ */ b(M, { children: [
881
+ /* @__PURE__ */ t("div", { className: `${c} table-body`, children: /* @__PURE__ */ b("table", { className: "table-content", children: [
886
882
  /* @__PURE__ */ t(
887
- ge,
883
+ ve,
888
884
  {
889
885
  entity: s,
890
- columns: c,
886
+ columns: i,
891
887
  onSortCallback: n,
892
888
  hasAction: !!o
893
889
  }
894
890
  ),
895
891
  /* @__PURE__ */ t("tbody", { children: /* @__PURE__ */ t(
896
- Ee,
892
+ Oe,
897
893
  {
898
894
  data: r,
899
895
  actions: o,
900
- columns: c,
901
- softDeleteProperty: h
896
+ columns: i,
897
+ softDeleteProperty: u
902
898
  }
903
899
  ) })
904
900
  ] }) }),
@@ -908,42 +904,42 @@ function Me(e) {
908
904
  }
909
905
  function Le(e) {
910
906
  const { content: a, children: r } = e;
911
- return /* @__PURE__ */ v("div", { className: "tooltip-container", children: [
907
+ return /* @__PURE__ */ b("div", { className: "tooltip-container", children: [
912
908
  r,
913
909
  /* @__PURE__ */ t("div", { className: "tooltip-text", children: a })
914
910
  ] });
915
911
  }
916
- var O = /* @__PURE__ */ ((e) => (e.empty = "empty", e.outlined = "outlined", e.default = "default", e))(O || {});
912
+ var z = /* @__PURE__ */ ((e) => (e.empty = "empty", e.outlined = "outlined", e.default = "default", e))(z || {});
917
913
  function Te(e) {
918
914
  const {
919
915
  label: a,
920
916
  onDelete: r,
921
917
  className: n = "",
922
918
  spanClassName: s = "",
923
- variant: l = O.default
924
- } = e, o = y(() => {
919
+ variant: l = z.default
920
+ } = e, o = w(() => {
925
921
  switch (l) {
926
- case O.empty:
922
+ case z.empty:
927
923
  return "text-primary bg-transparent";
928
- case O.outlined:
924
+ case z.outlined:
929
925
  return "border border-primary";
930
- case O.default:
926
+ case z.default:
931
927
  default:
932
928
  return "text-white bg-primary";
933
929
  }
934
- }, [l]), c = y(() => {
930
+ }, [l]), i = w(() => {
935
931
  switch (l) {
936
- case O.empty:
937
- case O.outlined:
932
+ case z.empty:
933
+ case z.outlined:
938
934
  return "chip-delete-button-svg";
939
- case O.default:
935
+ case z.default:
940
936
  default:
941
937
  return "filled-chip-delete-button-svg";
942
938
  }
943
939
  }, [l]);
944
- return /* @__PURE__ */ v("div", { className: `chip-main ${o} ${n}`, children: [
940
+ return /* @__PURE__ */ b("div", { className: `chip-main ${o} ${n}`, children: [
945
941
  /* @__PURE__ */ t("span", { className: s, children: a }),
946
- r ? /* @__PURE__ */ t("button", { type: "button", className: "chip-delete-button", onClick: r, children: /* @__PURE__ */ t(K, { className: c }) }) : null
942
+ r ? /* @__PURE__ */ t("button", { type: "button", className: "chip-delete-button", onClick: r, children: /* @__PURE__ */ t(Q, { className: i }) }) : null
947
943
  ] });
948
944
  }
949
945
  export {
@@ -954,36 +950,36 @@ export {
954
950
  le as ChevronRight,
955
951
  re as ChevronUp,
956
952
  Te as Chip,
957
- O as ChipVariant,
958
- K as Close,
959
- ge as Columns,
953
+ z as ChipVariant,
954
+ Q as Close,
955
+ ve as Columns,
960
956
  fe as CountOfTotal,
961
- ve as Empty,
962
- Oe as FilterPopup,
963
- E as FilterTypes,
957
+ ge as Empty,
958
+ ze as FilterPopup,
959
+ L as FilterTypes,
964
960
  ce as Filters,
965
- k as FiltersActions,
961
+ $ as FiltersActions,
966
962
  be as FiltersProvider,
967
963
  we as Footer,
968
964
  ue as Loading,
969
965
  Ne as Navigation,
970
966
  Ce as PageSize,
971
- Ee as Rows,
972
- q as SelectInput,
967
+ Oe as Rows,
968
+ J as SelectInput,
973
969
  F as SortOrder,
974
- U as State,
975
- Me as Table,
976
- De as TableOptionsProvider,
970
+ R as State,
971
+ De as Table,
972
+ Me as TableOptionsProvider,
977
973
  j as TextInput,
978
974
  Le as Tooltip,
979
975
  Be as TranslationProvider,
980
976
  me as filtersReducer,
981
977
  Y as helperTextStateClassName,
982
978
  he as initializer,
983
- Q as inputStateClassName,
979
+ V as inputStateClassName,
984
980
  X as labelStateClassName,
985
981
  Pe as renderFilterComponent,
986
982
  _ as useFilters,
987
983
  T as useTableOptions,
988
- L as useTranslation
984
+ E as useTranslation
989
985
  };