@sito/dashboard 0.0.57 → 0.0.59
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/README.md +70 -9
- package/dist/dashboard.cjs +1 -1
- package/dist/dashboard.js +512 -513
- package/dist/main.css +1 -1
- package/package.json +1 -1
package/dist/dashboard.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./main.css";
|
|
2
|
-
import { jsx as c, jsxs as
|
|
3
|
-
import { forwardRef as fe, useState as j, useEffect as
|
|
2
|
+
import { jsx as c, jsxs as y, Fragment as le } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as fe, useState as j, useEffect as K, useRef as J, useCallback as M, createContext as Pe, useContext as Te, useMemo as F, useReducer as ut } from "react";
|
|
4
4
|
function dt(e) {
|
|
5
5
|
const { className: t = "" } = e;
|
|
6
6
|
return /* @__PURE__ */ c(
|
|
@@ -118,46 +118,46 @@ const Oe = fe(function(e, t) {
|
|
|
118
118
|
onChange: n,
|
|
119
119
|
options: s,
|
|
120
120
|
containerClassName: a = "",
|
|
121
|
-
inputClassName:
|
|
122
|
-
labelClassName:
|
|
123
|
-
helperText:
|
|
121
|
+
inputClassName: o = "",
|
|
122
|
+
labelClassName: i = "",
|
|
123
|
+
helperText: l = "",
|
|
124
124
|
helperTextClassName: d = "",
|
|
125
125
|
placeholder: u = "",
|
|
126
126
|
label: h = "",
|
|
127
|
-
name:
|
|
128
|
-
id:
|
|
127
|
+
name: b = "",
|
|
128
|
+
id: C = "",
|
|
129
129
|
state: p = Ne.default,
|
|
130
|
-
children:
|
|
131
|
-
...
|
|
130
|
+
children: v,
|
|
131
|
+
...g
|
|
132
132
|
} = e;
|
|
133
|
-
return /* @__PURE__ */
|
|
133
|
+
return /* @__PURE__ */ y("div", { className: `select-input-container ${a}`, children: [
|
|
134
134
|
/* @__PURE__ */ c(
|
|
135
135
|
"select",
|
|
136
136
|
{
|
|
137
|
-
...
|
|
138
|
-
id:
|
|
137
|
+
...g,
|
|
138
|
+
id: C,
|
|
139
139
|
ref: t,
|
|
140
|
-
name:
|
|
140
|
+
name: b,
|
|
141
141
|
value: r,
|
|
142
142
|
onChange: n,
|
|
143
|
-
className: `select-input ${Ke(p)} peer ${
|
|
143
|
+
className: `select-input ${Ke(p)} peer ${o}`,
|
|
144
144
|
children: s == null ? void 0 : s.map((m) => /* @__PURE__ */ c("option", { value: m.id, children: m.value ?? m.name ?? m.id }, m.id))
|
|
145
145
|
}
|
|
146
146
|
),
|
|
147
147
|
/* @__PURE__ */ c(
|
|
148
148
|
"label",
|
|
149
149
|
{
|
|
150
|
-
htmlFor:
|
|
151
|
-
className: `select-input-label ${Ye(p)} ${
|
|
150
|
+
htmlFor: b,
|
|
151
|
+
className: `select-input-label ${Ye(p)} ${i}`,
|
|
152
152
|
children: h
|
|
153
153
|
}
|
|
154
154
|
),
|
|
155
|
-
|
|
156
|
-
(u ||
|
|
155
|
+
v,
|
|
156
|
+
(u || l) && /* @__PURE__ */ c(
|
|
157
157
|
"p",
|
|
158
158
|
{
|
|
159
159
|
className: `select-input-helper-text ${Ze(p)} ${d}`,
|
|
160
|
-
children: p !== "error" && p !== "good" ? u :
|
|
160
|
+
children: p !== "error" && p !== "good" ? u : l
|
|
161
161
|
}
|
|
162
162
|
)
|
|
163
163
|
] });
|
|
@@ -168,28 +168,28 @@ const Ce = fe(function(e, t) {
|
|
|
168
168
|
state: n = Ne.default,
|
|
169
169
|
label: s = "",
|
|
170
170
|
containerClassName: a = "",
|
|
171
|
-
inputClassName:
|
|
172
|
-
labelClassName:
|
|
173
|
-
helperText:
|
|
171
|
+
inputClassName: o = "",
|
|
172
|
+
labelClassName: i = "",
|
|
173
|
+
helperText: l = "",
|
|
174
174
|
helperTextClassName: d = "",
|
|
175
175
|
value: u = "",
|
|
176
176
|
...h
|
|
177
177
|
} = e;
|
|
178
|
-
return /* @__PURE__ */
|
|
178
|
+
return /* @__PURE__ */ y("div", { className: `text-input-container ${a}`, children: [
|
|
179
179
|
/* @__PURE__ */ c(
|
|
180
180
|
"input",
|
|
181
181
|
{
|
|
182
182
|
ref: t,
|
|
183
183
|
value: u,
|
|
184
|
-
className: `text-input ${Ke(n)} peer ${
|
|
184
|
+
className: `text-input ${Ke(n)} peer ${o} ${u ? "has-value" : ""} ${h.placeholder ? "has-placeholder" : ""}`,
|
|
185
185
|
...h
|
|
186
186
|
}
|
|
187
187
|
),
|
|
188
|
-
!!s && /* @__PURE__ */
|
|
188
|
+
!!s && /* @__PURE__ */ y(
|
|
189
189
|
"label",
|
|
190
190
|
{
|
|
191
191
|
htmlFor: h.name,
|
|
192
|
-
className: `text-input-label ${Ye(n)} ${
|
|
192
|
+
className: `text-input-label ${Ye(n)} ${i}`,
|
|
193
193
|
children: [
|
|
194
194
|
s,
|
|
195
195
|
h.required ? " *" : ""
|
|
@@ -197,11 +197,11 @@ const Ce = fe(function(e, t) {
|
|
|
197
197
|
}
|
|
198
198
|
),
|
|
199
199
|
r,
|
|
200
|
-
!!
|
|
200
|
+
!!l && /* @__PURE__ */ c(
|
|
201
201
|
"p",
|
|
202
202
|
{
|
|
203
203
|
className: `text-input-helper-text ${Ze(n)} ${d}`,
|
|
204
|
-
children:
|
|
204
|
+
children: l
|
|
205
205
|
}
|
|
206
206
|
)
|
|
207
207
|
] });
|
|
@@ -212,21 +212,21 @@ const gt = fe(function(e, t) {
|
|
|
212
212
|
onChange: n,
|
|
213
213
|
state: s = Ne.default,
|
|
214
214
|
name: a = "",
|
|
215
|
-
id:
|
|
216
|
-
type:
|
|
217
|
-
label:
|
|
215
|
+
id: o = "",
|
|
216
|
+
type: i = "text",
|
|
217
|
+
label: l = "",
|
|
218
218
|
containerClassName: d = "",
|
|
219
219
|
inputClassName: u = "",
|
|
220
220
|
labelClassName: h = "",
|
|
221
|
-
helperText:
|
|
222
|
-
helperTextClassName:
|
|
221
|
+
helperText: b = "",
|
|
222
|
+
helperTextClassName: C = "",
|
|
223
223
|
...p
|
|
224
224
|
} = e;
|
|
225
|
-
return /* @__PURE__ */
|
|
225
|
+
return /* @__PURE__ */ y("label", { className: `input-check-container ${d}`, children: [
|
|
226
226
|
/* @__PURE__ */ c(
|
|
227
227
|
"input",
|
|
228
228
|
{
|
|
229
|
-
id:
|
|
229
|
+
id: o,
|
|
230
230
|
ref: t,
|
|
231
231
|
name: a,
|
|
232
232
|
type: "checkbox",
|
|
@@ -236,7 +236,7 @@ const gt = fe(function(e, t) {
|
|
|
236
236
|
...p
|
|
237
237
|
}
|
|
238
238
|
),
|
|
239
|
-
/* @__PURE__ */ c("span", { className: `input-check-label ${h}`, children:
|
|
239
|
+
/* @__PURE__ */ c("span", { className: `input-check-label ${h}`, children: l })
|
|
240
240
|
] });
|
|
241
241
|
});
|
|
242
242
|
var vt = !1;
|
|
@@ -280,7 +280,7 @@ var Nt = /* @__PURE__ */ function() {
|
|
|
280
280
|
return (s = n.parentNode) == null ? void 0 : s.removeChild(n);
|
|
281
281
|
}), this.tags = [], this.ctr = 0;
|
|
282
282
|
}, e;
|
|
283
|
-
}(), L = "-ms-", we = "-moz-", $ = "-webkit-", Je = "comm", Fe = "rule", Le = "decl",
|
|
283
|
+
}(), L = "-ms-", we = "-moz-", $ = "-webkit-", Je = "comm", Fe = "rule", Le = "decl", yt = "@import", Qe = "@keyframes", xt = "@layer", $t = Math.abs, ye = String.fromCharCode, St = Object.assign;
|
|
284
284
|
function kt(e, t) {
|
|
285
285
|
return O(e, 0) ^ 45 ? (((t << 2 ^ O(e, 0)) << 2 ^ O(e, 1)) << 2 ^ O(e, 2)) << 2 ^ O(e, 3) : 0;
|
|
286
286
|
}
|
|
@@ -302,7 +302,7 @@ function O(e, t) {
|
|
|
302
302
|
function ue(e, t, r) {
|
|
303
303
|
return e.slice(t, r);
|
|
304
304
|
}
|
|
305
|
-
function
|
|
305
|
+
function V(e) {
|
|
306
306
|
return e.length;
|
|
307
307
|
}
|
|
308
308
|
function Me(e) {
|
|
@@ -314,9 +314,9 @@ function me(e, t) {
|
|
|
314
314
|
function At(e, t) {
|
|
315
315
|
return e.map(t).join("");
|
|
316
316
|
}
|
|
317
|
-
var
|
|
318
|
-
function $e(e, t, r, n, s, a,
|
|
319
|
-
return { value: e, root: t, parent: r, type: n, props: s, children: a, line:
|
|
317
|
+
var xe = 1, ae = 1, et = 0, I = 0, T = 0, ce = "";
|
|
318
|
+
function $e(e, t, r, n, s, a, o) {
|
|
319
|
+
return { value: e, root: t, parent: r, type: n, props: s, children: a, line: xe, column: ae, length: o, return: "" };
|
|
320
320
|
}
|
|
321
321
|
function oe(e, t) {
|
|
322
322
|
return St($e("", null, null, "", null, null, 0), e, { length: -e.length }, t);
|
|
@@ -325,12 +325,12 @@ function Pt() {
|
|
|
325
325
|
return T;
|
|
326
326
|
}
|
|
327
327
|
function Tt() {
|
|
328
|
-
return T = I > 0 ? O(ce, --I) : 0, ae--, T === 10 && (ae = 1,
|
|
328
|
+
return T = I > 0 ? O(ce, --I) : 0, ae--, T === 10 && (ae = 1, xe--), T;
|
|
329
329
|
}
|
|
330
|
-
function
|
|
331
|
-
return T = I < et ? O(ce, I++) : 0, ae++, T === 10 && (ae = 1,
|
|
330
|
+
function W() {
|
|
331
|
+
return T = I < et ? O(ce, I++) : 0, ae++, T === 10 && (ae = 1, xe++), T;
|
|
332
332
|
}
|
|
333
|
-
function
|
|
333
|
+
function Y() {
|
|
334
334
|
return O(ce, I);
|
|
335
335
|
}
|
|
336
336
|
function be() {
|
|
@@ -372,7 +372,7 @@ function de(e) {
|
|
|
372
372
|
return 0;
|
|
373
373
|
}
|
|
374
374
|
function tt(e) {
|
|
375
|
-
return
|
|
375
|
+
return xe = ae = 1, et = V(ce = e), I = 0, [];
|
|
376
376
|
}
|
|
377
377
|
function nt(e) {
|
|
378
378
|
return ce = "", e;
|
|
@@ -381,17 +381,17 @@ function ge(e) {
|
|
|
381
381
|
return Xe(pe(I - 1, Ae(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
382
382
|
}
|
|
383
383
|
function Rt(e) {
|
|
384
|
-
for (; (T =
|
|
385
|
-
|
|
384
|
+
for (; (T = Y()) && T < 33; )
|
|
385
|
+
W();
|
|
386
386
|
return de(e) > 2 || de(T) > 3 ? "" : " ";
|
|
387
387
|
}
|
|
388
388
|
function Ot(e, t) {
|
|
389
|
-
for (; --t &&
|
|
389
|
+
for (; --t && W() && !(T < 48 || T > 102 || T > 57 && T < 65 || T > 70 && T < 97); )
|
|
390
390
|
;
|
|
391
|
-
return pe(e, be() + (t < 6 &&
|
|
391
|
+
return pe(e, be() + (t < 6 && Y() == 32 && W() == 32));
|
|
392
392
|
}
|
|
393
393
|
function Ae(e) {
|
|
394
|
-
for (;
|
|
394
|
+
for (; W(); )
|
|
395
395
|
switch (T) {
|
|
396
396
|
case e:
|
|
397
397
|
return I;
|
|
@@ -403,28 +403,28 @@ function Ae(e) {
|
|
|
403
403
|
e === 41 && Ae(e);
|
|
404
404
|
break;
|
|
405
405
|
case 92:
|
|
406
|
-
|
|
406
|
+
W();
|
|
407
407
|
break;
|
|
408
408
|
}
|
|
409
409
|
return I;
|
|
410
410
|
}
|
|
411
411
|
function Ft(e, t) {
|
|
412
|
-
for (;
|
|
413
|
-
if (e + T === 42 + 42 &&
|
|
412
|
+
for (; W() && e + T !== 47 + 10; )
|
|
413
|
+
if (e + T === 42 + 42 && Y() === 47)
|
|
414
414
|
break;
|
|
415
|
-
return "/*" + pe(t, I - 1) + "*" +
|
|
415
|
+
return "/*" + pe(t, I - 1) + "*" + ye(e === 47 ? e : W());
|
|
416
416
|
}
|
|
417
417
|
function Lt(e) {
|
|
418
|
-
for (; !de(
|
|
419
|
-
|
|
418
|
+
for (; !de(Y()); )
|
|
419
|
+
W();
|
|
420
420
|
return pe(e, I);
|
|
421
421
|
}
|
|
422
422
|
function Mt(e) {
|
|
423
423
|
return nt(ve("", null, null, null, [""], e = tt(e), 0, [0], e));
|
|
424
424
|
}
|
|
425
|
-
function ve(e, t, r, n, s, a,
|
|
426
|
-
for (var d = 0, u = 0, h =
|
|
427
|
-
switch (p = N, N =
|
|
425
|
+
function ve(e, t, r, n, s, a, o, i, l) {
|
|
426
|
+
for (var d = 0, u = 0, h = o, b = 0, C = 0, p = 0, v = 1, g = 1, m = 1, N = 0, E = "", k = s, x = a, A = n, f = E; g; )
|
|
427
|
+
switch (p = N, N = W()) {
|
|
428
428
|
case 40:
|
|
429
429
|
if (p != 108 && O(f, h - 1) == 58) {
|
|
430
430
|
Ee(f += S(ge(N), "&", "&\f"), "&\f") != -1 && (m = -1);
|
|
@@ -445,80 +445,80 @@ function ve(e, t, r, n, s, a, l, o, i) {
|
|
|
445
445
|
f += Ot(be() - 1, 7);
|
|
446
446
|
continue;
|
|
447
447
|
case 47:
|
|
448
|
-
switch (
|
|
448
|
+
switch (Y()) {
|
|
449
449
|
case 42:
|
|
450
450
|
case 47:
|
|
451
|
-
me(Dt(Ft(
|
|
451
|
+
me(Dt(Ft(W(), be()), t, r), l);
|
|
452
452
|
break;
|
|
453
453
|
default:
|
|
454
454
|
f += "/";
|
|
455
455
|
}
|
|
456
456
|
break;
|
|
457
|
-
case 123 *
|
|
458
|
-
|
|
459
|
-
case 125 *
|
|
457
|
+
case 123 * v:
|
|
458
|
+
i[d++] = V(f) * m;
|
|
459
|
+
case 125 * v:
|
|
460
460
|
case 59:
|
|
461
461
|
case 0:
|
|
462
462
|
switch (N) {
|
|
463
463
|
case 0:
|
|
464
464
|
case 125:
|
|
465
|
-
|
|
465
|
+
g = 0;
|
|
466
466
|
case 59 + u:
|
|
467
|
-
m == -1 && (f = S(f, /\f/g, "")),
|
|
467
|
+
m == -1 && (f = S(f, /\f/g, "")), C > 0 && V(f) - h && me(C > 32 ? Ie(f + ";", n, r, h - 1) : Ie(S(f, " ", "") + ";", n, r, h - 2), l);
|
|
468
468
|
break;
|
|
469
469
|
case 59:
|
|
470
470
|
f += ";";
|
|
471
471
|
default:
|
|
472
|
-
if (me(A = ze(f, t, r, d, u, s,
|
|
472
|
+
if (me(A = ze(f, t, r, d, u, s, i, E, k = [], x = [], h), a), N === 123)
|
|
473
473
|
if (u === 0)
|
|
474
|
-
ve(f, t, A, A, k, a, h,
|
|
474
|
+
ve(f, t, A, A, k, a, h, i, x);
|
|
475
475
|
else
|
|
476
|
-
switch (
|
|
476
|
+
switch (b === 99 && O(f, 3) === 110 ? 100 : b) {
|
|
477
477
|
case 100:
|
|
478
478
|
case 108:
|
|
479
479
|
case 109:
|
|
480
480
|
case 115:
|
|
481
|
-
ve(e, A, A, n && me(ze(e, A, A, 0, 0, s,
|
|
481
|
+
ve(e, A, A, n && me(ze(e, A, A, 0, 0, s, i, E, s, k = [], h), x), s, x, h, i, n ? k : x);
|
|
482
482
|
break;
|
|
483
483
|
default:
|
|
484
|
-
ve(f, A, A, A, [""],
|
|
484
|
+
ve(f, A, A, A, [""], x, 0, i, x);
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
d = u =
|
|
487
|
+
d = u = C = 0, v = m = 1, E = f = "", h = o;
|
|
488
488
|
break;
|
|
489
489
|
case 58:
|
|
490
|
-
h = 1 +
|
|
490
|
+
h = 1 + V(f), C = p;
|
|
491
491
|
default:
|
|
492
|
-
if (
|
|
492
|
+
if (v < 1) {
|
|
493
493
|
if (N == 123)
|
|
494
|
-
--
|
|
495
|
-
else if (N == 125 &&
|
|
494
|
+
--v;
|
|
495
|
+
else if (N == 125 && v++ == 0 && Tt() == 125)
|
|
496
496
|
continue;
|
|
497
497
|
}
|
|
498
|
-
switch (f +=
|
|
498
|
+
switch (f += ye(N), N * v) {
|
|
499
499
|
case 38:
|
|
500
500
|
m = u > 0 ? 1 : (f += "\f", -1);
|
|
501
501
|
break;
|
|
502
502
|
case 44:
|
|
503
|
-
|
|
503
|
+
i[d++] = (V(f) - 1) * m, m = 1;
|
|
504
504
|
break;
|
|
505
505
|
case 64:
|
|
506
|
-
|
|
506
|
+
Y() === 45 && (f += ge(W())), b = Y(), u = h = V(E = f += Lt(be())), N++;
|
|
507
507
|
break;
|
|
508
508
|
case 45:
|
|
509
|
-
p === 45 &&
|
|
509
|
+
p === 45 && V(f) == 2 && (v = 0);
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
512
|
return a;
|
|
513
513
|
}
|
|
514
|
-
function ze(e, t, r, n, s, a,
|
|
515
|
-
for (var h = s - 1,
|
|
516
|
-
for (var m = 0, N = ue(e, h + 1, h = $t(
|
|
517
|
-
(E = Xe(
|
|
518
|
-
return $e(e, t, r, s === 0 ? Fe :
|
|
514
|
+
function ze(e, t, r, n, s, a, o, i, l, d, u) {
|
|
515
|
+
for (var h = s - 1, b = s === 0 ? a : [""], C = Me(b), p = 0, v = 0, g = 0; p < n; ++p)
|
|
516
|
+
for (var m = 0, N = ue(e, h + 1, h = $t(v = o[p])), E = e; m < C; ++m)
|
|
517
|
+
(E = Xe(v > 0 ? b[m] + " " + N : S(N, /&\f/g, b[m]))) && (l[g++] = E);
|
|
518
|
+
return $e(e, t, r, s === 0 ? Fe : i, l, d, u);
|
|
519
519
|
}
|
|
520
520
|
function Dt(e, t, r) {
|
|
521
|
-
return $e(e, t, r, Je,
|
|
521
|
+
return $e(e, t, r, Je, ye(Pt()), ue(e, 2, -2), 0);
|
|
522
522
|
}
|
|
523
523
|
function Ie(e, t, r, n) {
|
|
524
524
|
return $e(e, t, r, Le, ue(e, 0, n), ue(e, n + 1, -1), n);
|
|
@@ -530,10 +530,10 @@ function se(e, t) {
|
|
|
530
530
|
}
|
|
531
531
|
function zt(e, t, r, n) {
|
|
532
532
|
switch (e.type) {
|
|
533
|
-
case
|
|
533
|
+
case xt:
|
|
534
534
|
if (e.children.length)
|
|
535
535
|
break;
|
|
536
|
-
case
|
|
536
|
+
case yt:
|
|
537
537
|
case Le:
|
|
538
538
|
return e.return = e.return || e.value;
|
|
539
539
|
case Je:
|
|
@@ -543,65 +543,65 @@ function zt(e, t, r, n) {
|
|
|
543
543
|
case Fe:
|
|
544
544
|
e.value = e.props.join(",");
|
|
545
545
|
}
|
|
546
|
-
return
|
|
546
|
+
return V(r = se(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
|
|
547
547
|
}
|
|
548
548
|
function It(e) {
|
|
549
549
|
var t = Me(e);
|
|
550
550
|
return function(r, n, s, a) {
|
|
551
|
-
for (var
|
|
552
|
-
|
|
553
|
-
return
|
|
551
|
+
for (var o = "", i = 0; i < t; i++)
|
|
552
|
+
o += e[i](r, n, s, a) || "";
|
|
553
|
+
return o;
|
|
554
554
|
};
|
|
555
555
|
}
|
|
556
|
-
function
|
|
556
|
+
function _t(e) {
|
|
557
557
|
return function(t) {
|
|
558
558
|
t.root || (t = t.return) && e(t);
|
|
559
559
|
};
|
|
560
560
|
}
|
|
561
|
-
function
|
|
561
|
+
function Wt(e) {
|
|
562
562
|
var t = /* @__PURE__ */ Object.create(null);
|
|
563
563
|
return function(r) {
|
|
564
564
|
return t[r] === void 0 && (t[r] = e(r)), t[r];
|
|
565
565
|
};
|
|
566
566
|
}
|
|
567
|
-
var
|
|
568
|
-
for (var s = 0, a = 0; s = a, a =
|
|
569
|
-
|
|
567
|
+
var Bt = function(t, r, n) {
|
|
568
|
+
for (var s = 0, a = 0; s = a, a = Y(), s === 38 && a === 12 && (r[n] = 1), !de(a); )
|
|
569
|
+
W();
|
|
570
570
|
return pe(t, I);
|
|
571
571
|
}, jt = function(t, r) {
|
|
572
572
|
var n = -1, s = 44;
|
|
573
573
|
do
|
|
574
574
|
switch (de(s)) {
|
|
575
575
|
case 0:
|
|
576
|
-
s === 38 &&
|
|
576
|
+
s === 38 && Y() === 12 && (r[n] = 1), t[n] += Bt(I - 1, r, n);
|
|
577
577
|
break;
|
|
578
578
|
case 2:
|
|
579
579
|
t[n] += ge(s);
|
|
580
580
|
break;
|
|
581
581
|
case 4:
|
|
582
582
|
if (s === 44) {
|
|
583
|
-
t[++n] =
|
|
583
|
+
t[++n] = Y() === 58 ? "&\f" : "", r[n] = t[n].length;
|
|
584
584
|
break;
|
|
585
585
|
}
|
|
586
586
|
default:
|
|
587
|
-
t[n] +=
|
|
587
|
+
t[n] += ye(s);
|
|
588
588
|
}
|
|
589
|
-
while (s =
|
|
589
|
+
while (s = W());
|
|
590
590
|
return t;
|
|
591
591
|
}, Gt = function(t, r) {
|
|
592
592
|
return nt(jt(tt(t), r));
|
|
593
|
-
},
|
|
593
|
+
}, _e = /* @__PURE__ */ new WeakMap(), Ut = function(t) {
|
|
594
594
|
if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
|
|
595
595
|
// negative .length indicates that this rule has been already prefixed
|
|
596
596
|
t.length < 1)) {
|
|
597
597
|
for (var r = t.value, n = t.parent, s = t.column === n.column && t.line === n.line; n.type !== "rule"; )
|
|
598
598
|
if (n = n.parent, !n)
|
|
599
599
|
return;
|
|
600
|
-
if (!(t.props.length === 1 && r.charCodeAt(0) !== 58 && !
|
|
601
|
-
|
|
602
|
-
for (var a = [],
|
|
603
|
-
for (var u = 0; u <
|
|
604
|
-
t.props[d] = a[
|
|
600
|
+
if (!(t.props.length === 1 && r.charCodeAt(0) !== 58 && !_e.get(n)) && !s) {
|
|
601
|
+
_e.set(t, !0);
|
|
602
|
+
for (var a = [], o = Gt(r, a), i = n.props, l = 0, d = 0; l < o.length; l++)
|
|
603
|
+
for (var u = 0; u < i.length; u++, d++)
|
|
604
|
+
t.props[d] = a[l] ? o[l].replace(/&\f/g, i[u]) : i[u] + " " + o[l];
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
607
|
}, Ht = function(t) {
|
|
@@ -691,7 +691,7 @@ function rt(e, t) {
|
|
|
691
691
|
case 5789:
|
|
692
692
|
case 5021:
|
|
693
693
|
case 4765:
|
|
694
|
-
if (
|
|
694
|
+
if (V(e) - 1 - t > 6)
|
|
695
695
|
switch (O(e, t + 1)) {
|
|
696
696
|
case 109:
|
|
697
697
|
if (O(e, t + 4) !== 45)
|
|
@@ -706,7 +706,7 @@ function rt(e, t) {
|
|
|
706
706
|
if (O(e, t + 1) !== 115)
|
|
707
707
|
break;
|
|
708
708
|
case 6444:
|
|
709
|
-
switch (O(e,
|
|
709
|
+
switch (O(e, V(e) - 3 - (~Ee(e, "!important") && 10))) {
|
|
710
710
|
case 107:
|
|
711
711
|
return S(e, ":", ":" + $) + e;
|
|
712
712
|
case 101:
|
|
@@ -761,38 +761,38 @@ var Vt = function(t, r, n, s) {
|
|
|
761
761
|
var r = t.key;
|
|
762
762
|
if (r === "css") {
|
|
763
763
|
var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
|
|
764
|
-
Array.prototype.forEach.call(n, function(
|
|
765
|
-
var
|
|
766
|
-
|
|
764
|
+
Array.prototype.forEach.call(n, function(v) {
|
|
765
|
+
var g = v.getAttribute("data-emotion");
|
|
766
|
+
g.indexOf(" ") !== -1 && (document.head.appendChild(v), v.setAttribute("data-s", ""));
|
|
767
767
|
});
|
|
768
768
|
}
|
|
769
|
-
var s = t.stylisPlugins || qt, a = {},
|
|
770
|
-
|
|
769
|
+
var s = t.stylisPlugins || qt, a = {}, o, i = [];
|
|
770
|
+
o = t.container || document.head, Array.prototype.forEach.call(
|
|
771
771
|
// this means we will ignore elements which don't have a space in them which
|
|
772
772
|
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
773
773
|
document.querySelectorAll('style[data-emotion^="' + r + ' "]'),
|
|
774
|
-
function(
|
|
775
|
-
for (var
|
|
776
|
-
a[
|
|
777
|
-
|
|
774
|
+
function(v) {
|
|
775
|
+
for (var g = v.getAttribute("data-emotion").split(" "), m = 1; m < g.length; m++)
|
|
776
|
+
a[g[m]] = !0;
|
|
777
|
+
i.push(v);
|
|
778
778
|
}
|
|
779
779
|
);
|
|
780
|
-
var
|
|
780
|
+
var l, d = [Ut, Ht];
|
|
781
781
|
{
|
|
782
|
-
var u, h = [zt,
|
|
783
|
-
u.insert(
|
|
784
|
-
})],
|
|
785
|
-
return se(Mt(
|
|
782
|
+
var u, h = [zt, _t(function(v) {
|
|
783
|
+
u.insert(v);
|
|
784
|
+
})], b = It(d.concat(s, h)), C = function(g) {
|
|
785
|
+
return se(Mt(g), b);
|
|
786
786
|
};
|
|
787
|
-
|
|
788
|
-
u = N,
|
|
787
|
+
l = function(g, m, N, E) {
|
|
788
|
+
u = N, C(g ? g + "{" + m.styles + "}" : m.styles), E && (p.inserted[m.name] = !0);
|
|
789
789
|
};
|
|
790
790
|
}
|
|
791
791
|
var p = {
|
|
792
792
|
key: r,
|
|
793
793
|
sheet: new Nt({
|
|
794
794
|
key: r,
|
|
795
|
-
container:
|
|
795
|
+
container: o,
|
|
796
796
|
nonce: t.nonce,
|
|
797
797
|
speedy: t.speedy,
|
|
798
798
|
prepend: t.prepend,
|
|
@@ -801,9 +801,9 @@ var Vt = function(t, r, n, s) {
|
|
|
801
801
|
nonce: t.nonce,
|
|
802
802
|
inserted: a,
|
|
803
803
|
registered: {},
|
|
804
|
-
insert:
|
|
804
|
+
insert: l
|
|
805
805
|
};
|
|
806
|
-
return p.sheet.hydrate(
|
|
806
|
+
return p.sheet.hydrate(i), p;
|
|
807
807
|
};
|
|
808
808
|
function Yt(e) {
|
|
809
809
|
for (var t = 0, r, n = 0, s = e.length; s >= 4; ++n, s -= 4)
|
|
@@ -875,20 +875,20 @@ var Zt = {
|
|
|
875
875
|
strokeWidth: 1
|
|
876
876
|
}, Jt = !1, Qt = /[A-Z]|^ms/g, Xt = /_EMO_([^_]+?)_([^]*?)_EMO_/g, st = function(t) {
|
|
877
877
|
return t.charCodeAt(1) === 45;
|
|
878
|
-
},
|
|
878
|
+
}, We = function(t) {
|
|
879
879
|
return t != null && typeof t != "boolean";
|
|
880
|
-
}, Se = /* @__PURE__ */
|
|
880
|
+
}, Se = /* @__PURE__ */ Wt(function(e) {
|
|
881
881
|
return st(e) ? e : e.replace(Qt, "-$&").toLowerCase();
|
|
882
|
-
}),
|
|
882
|
+
}), Be = function(t, r) {
|
|
883
883
|
switch (t) {
|
|
884
884
|
case "animation":
|
|
885
885
|
case "animationName":
|
|
886
886
|
if (typeof r == "string")
|
|
887
887
|
return r.replace(Xt, function(n, s, a) {
|
|
888
|
-
return
|
|
888
|
+
return q = {
|
|
889
889
|
name: s,
|
|
890
890
|
styles: a,
|
|
891
|
-
next:
|
|
891
|
+
next: q
|
|
892
892
|
}, s;
|
|
893
893
|
});
|
|
894
894
|
}
|
|
@@ -906,30 +906,30 @@ function he(e, t, r) {
|
|
|
906
906
|
case "object": {
|
|
907
907
|
var s = r;
|
|
908
908
|
if (s.anim === 1)
|
|
909
|
-
return
|
|
909
|
+
return q = {
|
|
910
910
|
name: s.name,
|
|
911
911
|
styles: s.styles,
|
|
912
|
-
next:
|
|
912
|
+
next: q
|
|
913
913
|
}, s.name;
|
|
914
914
|
var a = r;
|
|
915
915
|
if (a.styles !== void 0) {
|
|
916
|
-
var
|
|
917
|
-
if (
|
|
918
|
-
for (;
|
|
919
|
-
|
|
920
|
-
name:
|
|
921
|
-
styles:
|
|
922
|
-
next:
|
|
923
|
-
},
|
|
924
|
-
var
|
|
925
|
-
return
|
|
916
|
+
var o = a.next;
|
|
917
|
+
if (o !== void 0)
|
|
918
|
+
for (; o !== void 0; )
|
|
919
|
+
q = {
|
|
920
|
+
name: o.name,
|
|
921
|
+
styles: o.styles,
|
|
922
|
+
next: q
|
|
923
|
+
}, o = o.next;
|
|
924
|
+
var i = a.styles + ";";
|
|
925
|
+
return i;
|
|
926
926
|
}
|
|
927
927
|
return tn(e, t, r);
|
|
928
928
|
}
|
|
929
929
|
case "function": {
|
|
930
930
|
if (e !== void 0) {
|
|
931
|
-
var
|
|
932
|
-
return
|
|
931
|
+
var l = q, d = r(e);
|
|
932
|
+
return q = l, he(e, t, d);
|
|
933
933
|
}
|
|
934
934
|
break;
|
|
935
935
|
}
|
|
@@ -947,18 +947,18 @@ function tn(e, t, r) {
|
|
|
947
947
|
n += he(e, t, r[s]) + ";";
|
|
948
948
|
else
|
|
949
949
|
for (var a in r) {
|
|
950
|
-
var
|
|
951
|
-
if (typeof
|
|
952
|
-
var
|
|
953
|
-
t != null && t[
|
|
950
|
+
var o = r[a];
|
|
951
|
+
if (typeof o != "object") {
|
|
952
|
+
var i = o;
|
|
953
|
+
t != null && t[i] !== void 0 ? n += a + "{" + t[i] + "}" : We(i) && (n += Se(a) + ":" + Be(a, i) + ";");
|
|
954
954
|
} else {
|
|
955
955
|
if (a === "NO_COMPONENT_SELECTOR" && Jt)
|
|
956
956
|
throw new Error(en);
|
|
957
|
-
if (Array.isArray(
|
|
958
|
-
for (var
|
|
959
|
-
|
|
957
|
+
if (Array.isArray(o) && typeof o[0] == "string" && (t == null || t[o[0]] === void 0))
|
|
958
|
+
for (var l = 0; l < o.length; l++)
|
|
959
|
+
We(o[l]) && (n += Se(a) + ":" + Be(a, o[l]) + ";");
|
|
960
960
|
else {
|
|
961
|
-
var d = he(e, t,
|
|
961
|
+
var d = he(e, t, o);
|
|
962
962
|
switch (a) {
|
|
963
963
|
case "animation":
|
|
964
964
|
case "animationName": {
|
|
@@ -973,23 +973,23 @@ function tn(e, t, r) {
|
|
|
973
973
|
}
|
|
974
974
|
return n;
|
|
975
975
|
}
|
|
976
|
-
var je = /label:\s*([^\s;{]+)\s*(;|$)/g,
|
|
976
|
+
var je = /label:\s*([^\s;{]+)\s*(;|$)/g, q;
|
|
977
977
|
function ke(e, t, r) {
|
|
978
978
|
if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
|
|
979
979
|
return e[0];
|
|
980
980
|
var n = !0, s = "";
|
|
981
|
-
|
|
981
|
+
q = void 0;
|
|
982
982
|
var a = e[0];
|
|
983
983
|
if (a == null || a.raw === void 0)
|
|
984
984
|
n = !1, s += he(r, t, a);
|
|
985
985
|
else {
|
|
986
|
-
var
|
|
987
|
-
s +=
|
|
986
|
+
var o = a;
|
|
987
|
+
s += o[0];
|
|
988
988
|
}
|
|
989
|
-
for (var
|
|
990
|
-
if (s += he(r, t, e[
|
|
991
|
-
var
|
|
992
|
-
s += i
|
|
989
|
+
for (var i = 1; i < e.length; i++)
|
|
990
|
+
if (s += he(r, t, e[i]), n) {
|
|
991
|
+
var l = a;
|
|
992
|
+
s += l[i];
|
|
993
993
|
}
|
|
994
994
|
je.lastIndex = 0;
|
|
995
995
|
for (var d = "", u; (u = je.exec(s)) !== null; )
|
|
@@ -998,7 +998,7 @@ function ke(e, t, r) {
|
|
|
998
998
|
return {
|
|
999
999
|
name: h,
|
|
1000
1000
|
styles: s,
|
|
1001
|
-
next:
|
|
1001
|
+
next: q
|
|
1002
1002
|
};
|
|
1003
1003
|
}
|
|
1004
1004
|
var nn = !0;
|
|
@@ -1040,39 +1040,39 @@ function Ue(e, t, r) {
|
|
|
1040
1040
|
}
|
|
1041
1041
|
var an = function(t) {
|
|
1042
1042
|
var r = Kt(t);
|
|
1043
|
-
r.sheet.speedy = function(
|
|
1044
|
-
this.isSpeedy =
|
|
1043
|
+
r.sheet.speedy = function(i) {
|
|
1044
|
+
this.isSpeedy = i;
|
|
1045
1045
|
}, r.compat = !0;
|
|
1046
1046
|
var n = function() {
|
|
1047
|
-
for (var
|
|
1047
|
+
for (var l = arguments.length, d = new Array(l), u = 0; u < l; u++)
|
|
1048
1048
|
d[u] = arguments[u];
|
|
1049
1049
|
var h = ke(d, r.registered, void 0);
|
|
1050
1050
|
return sn(r, h, !1), r.key + "-" + h.name;
|
|
1051
1051
|
}, s = function() {
|
|
1052
|
-
for (var
|
|
1052
|
+
for (var l = arguments.length, d = new Array(l), u = 0; u < l; u++)
|
|
1053
1053
|
d[u] = arguments[u];
|
|
1054
|
-
var h = ke(d, r.registered),
|
|
1054
|
+
var h = ke(d, r.registered), b = "animation-" + h.name;
|
|
1055
1055
|
return Ge(r, {
|
|
1056
1056
|
name: h.name,
|
|
1057
|
-
styles: "@keyframes " +
|
|
1058
|
-
}),
|
|
1057
|
+
styles: "@keyframes " + b + "{" + h.styles + "}"
|
|
1058
|
+
}), b;
|
|
1059
1059
|
}, a = function() {
|
|
1060
|
-
for (var
|
|
1060
|
+
for (var l = arguments.length, d = new Array(l), u = 0; u < l; u++)
|
|
1061
1061
|
d[u] = arguments[u];
|
|
1062
1062
|
var h = ke(d, r.registered);
|
|
1063
1063
|
Ge(r, h);
|
|
1064
|
-
},
|
|
1065
|
-
for (var
|
|
1064
|
+
}, o = function() {
|
|
1065
|
+
for (var l = arguments.length, d = new Array(l), u = 0; u < l; u++)
|
|
1066
1066
|
d[u] = arguments[u];
|
|
1067
1067
|
return Ue(r.registered, n, cn(d));
|
|
1068
1068
|
};
|
|
1069
1069
|
return {
|
|
1070
1070
|
css: n,
|
|
1071
|
-
cx:
|
|
1071
|
+
cx: o,
|
|
1072
1072
|
injectGlobal: a,
|
|
1073
1073
|
keyframes: s,
|
|
1074
|
-
hydrate: function(
|
|
1075
|
-
|
|
1074
|
+
hydrate: function(l) {
|
|
1075
|
+
l.forEach(function(d) {
|
|
1076
1076
|
r.inserted[d] = !0;
|
|
1077
1077
|
});
|
|
1078
1078
|
},
|
|
@@ -1097,8 +1097,8 @@ var an = function(t) {
|
|
|
1097
1097
|
a = e(s);
|
|
1098
1098
|
else {
|
|
1099
1099
|
a = "";
|
|
1100
|
-
for (var
|
|
1101
|
-
s[
|
|
1100
|
+
for (var o in s)
|
|
1101
|
+
s[o] && o && (a && (a += " "), a += o);
|
|
1102
1102
|
}
|
|
1103
1103
|
break;
|
|
1104
1104
|
}
|
|
@@ -1119,45 +1119,45 @@ const un = fe(function(e, t) {
|
|
|
1119
1119
|
value: n,
|
|
1120
1120
|
onChange: s,
|
|
1121
1121
|
options: a = [],
|
|
1122
|
-
name:
|
|
1123
|
-
id:
|
|
1124
|
-
label:
|
|
1122
|
+
name: o = "",
|
|
1123
|
+
id: i = "",
|
|
1124
|
+
label: l = "",
|
|
1125
1125
|
containerClassName: d = "",
|
|
1126
1126
|
inputContainerClassName: u = "",
|
|
1127
1127
|
helperText: h = "",
|
|
1128
|
-
placeholder:
|
|
1129
|
-
multiple:
|
|
1128
|
+
placeholder: b = "",
|
|
1129
|
+
multiple: C = !1,
|
|
1130
1130
|
...p
|
|
1131
|
-
} = e, [
|
|
1132
|
-
|
|
1133
|
-
|
|
1131
|
+
} = e, [v, g] = j("");
|
|
1132
|
+
K(() => {
|
|
1133
|
+
g(C ? "" : (n == null ? void 0 : n.value) ?? (n == null ? void 0 : n.name) ?? "");
|
|
1134
1134
|
}, [n]);
|
|
1135
1135
|
const [m, N] = j(!1), E = a.filter((w) => {
|
|
1136
|
-
const D = String(w.value ?? w.name).toLowerCase().includes(
|
|
1136
|
+
const D = String(w.value ?? w.name).toLowerCase().includes(v == null ? void 0 : v.toLowerCase());
|
|
1137
1137
|
return n && n.length ? n != null && n.some ? !(n != null && n.some((ne) => ne.id === w.id)) : (n == null ? void 0 : n.id) !== w.id : D;
|
|
1138
|
-
}), k = J(null),
|
|
1139
|
-
|
|
1140
|
-
const w = (
|
|
1141
|
-
k.current && !k.current.contains(
|
|
1142
|
-
}, D = (
|
|
1143
|
-
|
|
1138
|
+
}), k = J(null), x = J(null), [A, f] = j(!1), P = J(null);
|
|
1139
|
+
K(() => {
|
|
1140
|
+
const w = (H) => {
|
|
1141
|
+
k.current && !k.current.contains(H.target) && N(!1);
|
|
1142
|
+
}, D = (H) => {
|
|
1143
|
+
H.key === "Escape" && N(!1);
|
|
1144
1144
|
};
|
|
1145
1145
|
return document.addEventListener("mousedown", w), document.addEventListener("keydown", D), () => {
|
|
1146
1146
|
document.removeEventListener("mousedown", w), document.removeEventListener("keydown", D);
|
|
1147
1147
|
};
|
|
1148
1148
|
}, []);
|
|
1149
1149
|
const R = (w) => {
|
|
1150
|
-
|
|
1151
|
-
},
|
|
1150
|
+
g(w.target.value);
|
|
1151
|
+
}, B = M(
|
|
1152
1152
|
(w) => {
|
|
1153
|
-
w ?
|
|
1153
|
+
w ? C ? (g(""), Array.isArray(n) && n.length ? s([...n, w]) : s([w])) : (g(String(w.name ?? w.value ?? "")), s(w)) : s(null), N(!1);
|
|
1154
1154
|
},
|
|
1155
|
-
[
|
|
1156
|
-
),
|
|
1155
|
+
[C, s, n]
|
|
1156
|
+
), _ = M(
|
|
1157
1157
|
(w) => {
|
|
1158
1158
|
if (w != null)
|
|
1159
1159
|
if (w !== -1) {
|
|
1160
|
-
const D = n.filter((
|
|
1160
|
+
const D = n.filter((H, ne) => ne !== w);
|
|
1161
1161
|
D.length ? s(D) : s(null);
|
|
1162
1162
|
} else {
|
|
1163
1163
|
const [D] = n;
|
|
@@ -1168,52 +1168,52 @@ const un = fe(function(e, t) {
|
|
|
1168
1168
|
},
|
|
1169
1169
|
[s, n]
|
|
1170
1170
|
);
|
|
1171
|
-
return
|
|
1172
|
-
var
|
|
1173
|
-
const w = ((
|
|
1171
|
+
return K(() => {
|
|
1172
|
+
var H, ne, De;
|
|
1173
|
+
const w = ((H = P.current) == null ? void 0 : H.offsetWidth) ?? 0, D = ((De = (ne = t ?? x) == null ? void 0 : ne.current) == null ? void 0 : De.offsetWidth) ?? 0;
|
|
1174
1174
|
w > D * 0.4 ? f(!0) : f(!1);
|
|
1175
|
-
}, [n]), /* @__PURE__ */
|
|
1175
|
+
}, [n]), /* @__PURE__ */ y(
|
|
1176
1176
|
"div",
|
|
1177
1177
|
{
|
|
1178
1178
|
className: `autocomplete-input-container ${d}`,
|
|
1179
1179
|
ref: k,
|
|
1180
1180
|
children: [
|
|
1181
|
-
/* @__PURE__ */
|
|
1181
|
+
/* @__PURE__ */ y("div", { className: "autocomplete-value-input-container", children: [
|
|
1182
1182
|
/* @__PURE__ */ c(
|
|
1183
1183
|
Ce,
|
|
1184
1184
|
{
|
|
1185
1185
|
state: r,
|
|
1186
|
-
name:
|
|
1187
|
-
id:
|
|
1188
|
-
value: v
|
|
1186
|
+
name: o,
|
|
1187
|
+
id: i,
|
|
1188
|
+
value: v,
|
|
1189
1189
|
onChange: R,
|
|
1190
|
-
placeholder:
|
|
1190
|
+
placeholder: b,
|
|
1191
1191
|
helperText: h,
|
|
1192
1192
|
onFocus: () => N(!0),
|
|
1193
|
-
label:
|
|
1193
|
+
label: l,
|
|
1194
1194
|
containerClassName: `autocomplete-text-input ${u}`,
|
|
1195
|
-
ref: t ??
|
|
1195
|
+
ref: t ?? x,
|
|
1196
1196
|
...p,
|
|
1197
|
-
children: ((n == null ? void 0 : n.value) || (n == null ? void 0 : n.name)) && !
|
|
1197
|
+
children: ((n == null ? void 0 : n.value) || (n == null ? void 0 : n.name)) && !C && /* @__PURE__ */ c(
|
|
1198
1198
|
"button",
|
|
1199
1199
|
{
|
|
1200
1200
|
type: "button",
|
|
1201
1201
|
className: "autocomplete-delete-button",
|
|
1202
1202
|
onClick: (w) => {
|
|
1203
|
-
|
|
1203
|
+
B(), w.stopPropagation();
|
|
1204
1204
|
},
|
|
1205
1205
|
children: /* @__PURE__ */ c(Re, {})
|
|
1206
1206
|
}
|
|
1207
1207
|
)
|
|
1208
1208
|
}
|
|
1209
1209
|
),
|
|
1210
|
-
|
|
1210
|
+
C && Array.isArray(n) && n.length ? /* @__PURE__ */ c("ul", { ref: P, className: "autocomplete-value-container", children: A ? /* @__PURE__ */ y(le, { children: [
|
|
1211
1211
|
/* @__PURE__ */ c("li", { children: /* @__PURE__ */ c(
|
|
1212
1212
|
X,
|
|
1213
1213
|
{
|
|
1214
1214
|
text: ((z = n[0]) == null ? void 0 : z.value) ?? ((ee = n[0]) == null ? void 0 : ee.name),
|
|
1215
1215
|
onDelete: (w) => {
|
|
1216
|
-
|
|
1216
|
+
_(0), w.stopPropagation();
|
|
1217
1217
|
}
|
|
1218
1218
|
}
|
|
1219
1219
|
) }),
|
|
@@ -1222,7 +1222,7 @@ const un = fe(function(e, t) {
|
|
|
1222
1222
|
{
|
|
1223
1223
|
text: `+${n.length - 1}`,
|
|
1224
1224
|
onDelete: (w) => {
|
|
1225
|
-
|
|
1225
|
+
_(-1), w.stopPropagation();
|
|
1226
1226
|
}
|
|
1227
1227
|
}
|
|
1228
1228
|
) })
|
|
@@ -1230,8 +1230,8 @@ const un = fe(function(e, t) {
|
|
|
1230
1230
|
X,
|
|
1231
1231
|
{
|
|
1232
1232
|
text: String(w.value ?? w.name),
|
|
1233
|
-
onDelete: (
|
|
1234
|
-
|
|
1233
|
+
onDelete: (H) => {
|
|
1234
|
+
_(D), H.stopPropagation();
|
|
1235
1235
|
}
|
|
1236
1236
|
}
|
|
1237
1237
|
) }, w.id ?? w.value ?? w.name)) }) : null
|
|
@@ -1245,7 +1245,7 @@ const un = fe(function(e, t) {
|
|
|
1245
1245
|
{
|
|
1246
1246
|
className: "autocomplete-suggestion-item",
|
|
1247
1247
|
onClick: (D) => {
|
|
1248
|
-
|
|
1248
|
+
B(w), D.stopPropagation();
|
|
1249
1249
|
},
|
|
1250
1250
|
children: w.value ?? w.name
|
|
1251
1251
|
},
|
|
@@ -1273,28 +1273,28 @@ const In = fe(function(e, t) {
|
|
|
1273
1273
|
label: n,
|
|
1274
1274
|
containerClassName: s = "",
|
|
1275
1275
|
inputClassName: a = "",
|
|
1276
|
-
labelClassName:
|
|
1277
|
-
helperText:
|
|
1278
|
-
helperTextClassName:
|
|
1276
|
+
labelClassName: o = "",
|
|
1277
|
+
helperText: i = "",
|
|
1278
|
+
helperTextClassName: l = "",
|
|
1279
1279
|
iconClassName: d = "",
|
|
1280
1280
|
multiple: u = !1,
|
|
1281
1281
|
onChange: h,
|
|
1282
|
-
onClear:
|
|
1283
|
-
...
|
|
1284
|
-
} = e, [p,
|
|
1282
|
+
onClear: b,
|
|
1283
|
+
...C
|
|
1284
|
+
} = e, [p, v] = j([]), g = (k) => {
|
|
1285
1285
|
if (k.target.files) {
|
|
1286
|
-
const
|
|
1287
|
-
|
|
1286
|
+
const x = Array.from(k.target.files);
|
|
1287
|
+
v((A) => [...A, ...x]);
|
|
1288
1288
|
}
|
|
1289
1289
|
h && h(k);
|
|
1290
1290
|
}, m = (k) => {
|
|
1291
|
-
|
|
1292
|
-
const A =
|
|
1293
|
-
return A.length === 0 && (
|
|
1291
|
+
v((x) => {
|
|
1292
|
+
const A = x.filter((f, P) => P !== k);
|
|
1293
|
+
return A.length === 0 && (b == null || b()), A;
|
|
1294
1294
|
});
|
|
1295
1295
|
};
|
|
1296
|
-
return /* @__PURE__ */
|
|
1297
|
-
p.length === 0 && /* @__PURE__ */
|
|
1296
|
+
return /* @__PURE__ */ y("div", { className: `file-input-container ${s}`, children: [
|
|
1297
|
+
p.length === 0 && /* @__PURE__ */ y("label", { htmlFor: C.name, className: `${o}`, children: [
|
|
1298
1298
|
n,
|
|
1299
1299
|
/* @__PURE__ */ c(
|
|
1300
1300
|
"input",
|
|
@@ -1305,21 +1305,21 @@ const In = fe(function(e, t) {
|
|
|
1305
1305
|
onClick: (k) => {
|
|
1306
1306
|
k.currentTarget.value = "";
|
|
1307
1307
|
},
|
|
1308
|
-
onChange:
|
|
1308
|
+
onChange: g,
|
|
1309
1309
|
className: `file-input ${a}`,
|
|
1310
|
-
...
|
|
1310
|
+
...C
|
|
1311
1311
|
}
|
|
1312
1312
|
),
|
|
1313
|
-
|
|
1313
|
+
C.required ? " *" : ""
|
|
1314
1314
|
] }),
|
|
1315
|
-
p.length > 1 && /* @__PURE__ */ c("ul", { className: "file-preview-list", children: p.map((k,
|
|
1315
|
+
p.length > 1 && /* @__PURE__ */ c("ul", { className: "file-preview-list", children: p.map((k, x) => /* @__PURE__ */ c("li", { children: /* @__PURE__ */ c("span", { "data-tooltip-id": "tooltip", "data-tooltip-content": k.name, children: /* @__PURE__ */ c(
|
|
1316
1316
|
X,
|
|
1317
1317
|
{
|
|
1318
1318
|
text: He(k.name, 25),
|
|
1319
|
-
onDelete: () => m(
|
|
1319
|
+
onDelete: () => m(x)
|
|
1320
1320
|
}
|
|
1321
|
-
) }) },
|
|
1322
|
-
p.length === 1 && /* @__PURE__ */
|
|
1321
|
+
) }) }, x)) }),
|
|
1322
|
+
p.length === 1 && /* @__PURE__ */ y("div", { className: "file-preview", children: [
|
|
1323
1323
|
/* @__PURE__ */ c(bt, { className: `file-icon ${d}` }),
|
|
1324
1324
|
/* @__PURE__ */ c(
|
|
1325
1325
|
"span",
|
|
@@ -1334,7 +1334,7 @@ const In = fe(function(e, t) {
|
|
|
1334
1334
|
"button",
|
|
1335
1335
|
{
|
|
1336
1336
|
onClick: () => {
|
|
1337
|
-
|
|
1337
|
+
v([]), b == null || b();
|
|
1338
1338
|
},
|
|
1339
1339
|
className: "chip-delete-button",
|
|
1340
1340
|
type: "button",
|
|
@@ -1343,7 +1343,7 @@ const In = fe(function(e, t) {
|
|
|
1343
1343
|
)
|
|
1344
1344
|
] }),
|
|
1345
1345
|
r,
|
|
1346
|
-
!!
|
|
1346
|
+
!!i && /* @__PURE__ */ c("p", { className: `file-input-helper-text ${l}`, children: i })
|
|
1347
1347
|
] });
|
|
1348
1348
|
});
|
|
1349
1349
|
function dn(e) {
|
|
@@ -1370,60 +1370,60 @@ function dn(e) {
|
|
|
1370
1370
|
const ct = Pe(
|
|
1371
1371
|
{}
|
|
1372
1372
|
);
|
|
1373
|
-
function
|
|
1373
|
+
function _n(e) {
|
|
1374
1374
|
const { children: t, t: r, language: n } = e;
|
|
1375
1375
|
return /* @__PURE__ */ c(ct.Provider, { value: { t: r, language: n }, children: t });
|
|
1376
1376
|
}
|
|
1377
|
-
const
|
|
1377
|
+
const U = () => {
|
|
1378
1378
|
const e = Te(ct);
|
|
1379
1379
|
if (e === void 0)
|
|
1380
1380
|
throw new Error("translationContext must be used within a Provider");
|
|
1381
1381
|
return e;
|
|
1382
1382
|
};
|
|
1383
1383
|
var Q = /* @__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))(Q || {}), re = /* @__PURE__ */ ((e) => (e.ASC = "ASC", e.DESC = "DESC", e))(re || {});
|
|
1384
|
-
const hn = [20, 50, 100], it = Pe({}),
|
|
1385
|
-
const { children: t } = e, [r, n] = j(0), [s, a] = j(20), [
|
|
1384
|
+
const hn = [20, 50, 100], it = Pe({}), Wn = (e) => {
|
|
1385
|
+
const { children: t } = e, [r, n] = j(0), [s, a] = j(20), [o, i] = j(0), [l, d] = j("id"), [u, h] = j(re.DESC), [b, C] = j({}), p = M(
|
|
1386
1386
|
(E, k) => {
|
|
1387
|
-
let
|
|
1388
|
-
if (
|
|
1387
|
+
let x = u;
|
|
1388
|
+
if (l === E)
|
|
1389
1389
|
switch (u) {
|
|
1390
1390
|
case re.ASC:
|
|
1391
|
-
|
|
1391
|
+
x = re.DESC;
|
|
1392
1392
|
break;
|
|
1393
1393
|
default:
|
|
1394
|
-
|
|
1394
|
+
x = re.ASC;
|
|
1395
1395
|
break;
|
|
1396
1396
|
}
|
|
1397
|
-
d(E), h(
|
|
1397
|
+
d(E), h(x), k && k(E, x);
|
|
1398
1398
|
},
|
|
1399
|
-
[
|
|
1400
|
-
),
|
|
1399
|
+
[l, u]
|
|
1400
|
+
), v = M((E) => {
|
|
1401
1401
|
const k = Object.entries(E).reduce(
|
|
1402
|
-
(
|
|
1402
|
+
(x, [A, f]) => (f && typeof f.value < "u" && f.value !== null && (x[A] = f.value), x),
|
|
1403
1403
|
{}
|
|
1404
1404
|
);
|
|
1405
|
-
|
|
1406
|
-
}, []),
|
|
1405
|
+
C(k);
|
|
1406
|
+
}, []), g = M(
|
|
1407
1407
|
(E) => {
|
|
1408
|
-
E ? (delete
|
|
1408
|
+
E ? (delete b[E.toLowerCase()], C({ ...b })) : C({});
|
|
1409
1409
|
},
|
|
1410
|
-
[
|
|
1411
|
-
), m = F(() => Object.keys(
|
|
1410
|
+
[b]
|
|
1411
|
+
), m = F(() => Object.keys(b).length, [b]), N = {
|
|
1412
1412
|
onSort: p,
|
|
1413
1413
|
total: r,
|
|
1414
1414
|
setTotal: n,
|
|
1415
|
-
sortingBy:
|
|
1415
|
+
sortingBy: l,
|
|
1416
1416
|
setSortingBy: d,
|
|
1417
1417
|
sortingOrder: u,
|
|
1418
1418
|
setSortingOrder: h,
|
|
1419
1419
|
pageSize: s,
|
|
1420
1420
|
pageSizes: hn,
|
|
1421
1421
|
setPageSize: a,
|
|
1422
|
-
currentPage:
|
|
1423
|
-
setCurrentPage:
|
|
1424
|
-
filters:
|
|
1425
|
-
onFilterApply:
|
|
1426
|
-
clearFilters:
|
|
1422
|
+
currentPage: o,
|
|
1423
|
+
setCurrentPage: i,
|
|
1424
|
+
filters: b,
|
|
1425
|
+
onFilterApply: v,
|
|
1426
|
+
clearFilters: g,
|
|
1427
1427
|
countOfFilters: m
|
|
1428
1428
|
};
|
|
1429
1429
|
return /* @__PURE__ */ c(it.Provider, { value: N, children: t });
|
|
@@ -1461,12 +1461,12 @@ const ot = Pe({}), pn = (e) => {
|
|
|
1461
1461
|
fn,
|
|
1462
1462
|
Ve(r)
|
|
1463
1463
|
);
|
|
1464
|
-
|
|
1464
|
+
K(() => {
|
|
1465
1465
|
s({ type: G.reset });
|
|
1466
|
-
const
|
|
1467
|
-
Object.keys(
|
|
1466
|
+
const o = Ve(r);
|
|
1467
|
+
Object.keys(o).length && s({
|
|
1468
1468
|
type: G.update,
|
|
1469
|
-
toUpdate:
|
|
1469
|
+
toUpdate: o
|
|
1470
1470
|
});
|
|
1471
1471
|
}, [r]);
|
|
1472
1472
|
const a = {
|
|
@@ -1481,20 +1481,20 @@ const ot = Pe({}), pn = (e) => {
|
|
|
1481
1481
|
return e;
|
|
1482
1482
|
};
|
|
1483
1483
|
function mn(e) {
|
|
1484
|
-
const { t } =
|
|
1484
|
+
const { t } = U(), {
|
|
1485
1485
|
entity: r = "",
|
|
1486
1486
|
columns: n = [],
|
|
1487
1487
|
hasAction: s = !0,
|
|
1488
1488
|
onSortCallback: a,
|
|
1489
|
-
selectionState:
|
|
1490
|
-
onToggleAllRows:
|
|
1491
|
-
} = e,
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
}, [
|
|
1495
|
-
const { onSort: d, sortingOrder: u, sortingBy: h } = Z(),
|
|
1496
|
-
var
|
|
1497
|
-
return (
|
|
1489
|
+
selectionState: o,
|
|
1490
|
+
onToggleAllRows: i
|
|
1491
|
+
} = e, l = J(null);
|
|
1492
|
+
K(() => {
|
|
1493
|
+
l.current && (l.current.indeterminate = !!(o != null && o.hasSomeSelected && !(o != null && o.allSelected)));
|
|
1494
|
+
}, [o]);
|
|
1495
|
+
const { onSort: d, sortingOrder: u, sortingBy: h } = Z(), b = F(() => {
|
|
1496
|
+
var C;
|
|
1497
|
+
return (C = n.sort((p, v) => (v.pos ?? 0) - (p.pos ?? 0)).filter((p) => p.display !== "none")) == null ? void 0 : C.map((p) => ({
|
|
1498
1498
|
id: p.key,
|
|
1499
1499
|
label: p.label,
|
|
1500
1500
|
className: p.className ?? "",
|
|
@@ -1502,60 +1502,60 @@ function mn(e) {
|
|
|
1502
1502
|
sortOptions: p.sortOptions
|
|
1503
1503
|
}));
|
|
1504
1504
|
}, [n, r, t]);
|
|
1505
|
-
return /* @__PURE__ */ c("thead", { className: "table-headers-row", children: /* @__PURE__ */
|
|
1506
|
-
/* @__PURE__ */ c("th", { scope: "col", className: "table-headers-column table-headers-checkbox", children:
|
|
1505
|
+
return /* @__PURE__ */ c("thead", { className: "table-headers-row", children: /* @__PURE__ */ y("tr", { children: [
|
|
1506
|
+
/* @__PURE__ */ c("th", { scope: "col", className: "table-headers-column table-headers-checkbox", children: i ? /* @__PURE__ */ c(
|
|
1507
1507
|
"input",
|
|
1508
1508
|
{
|
|
1509
1509
|
type: "checkbox",
|
|
1510
|
-
ref:
|
|
1511
|
-
checked: (
|
|
1512
|
-
onChange:
|
|
1513
|
-
"aria-label": "
|
|
1510
|
+
ref: l,
|
|
1511
|
+
checked: (o == null ? void 0 : o.allSelected) ?? !1,
|
|
1512
|
+
onChange: i,
|
|
1513
|
+
"aria-label": t("_accessibility:components.table.selectAllRows")
|
|
1514
1514
|
}
|
|
1515
1515
|
) : null }),
|
|
1516
|
-
|
|
1517
|
-
var p,
|
|
1516
|
+
b.map((C) => {
|
|
1517
|
+
var p, v, g, m, N, E, k, x;
|
|
1518
1518
|
return /* @__PURE__ */ c(
|
|
1519
1519
|
"th",
|
|
1520
1520
|
{
|
|
1521
1521
|
scope: "col",
|
|
1522
|
-
className: `table-headers-column ${
|
|
1523
|
-
children: /* @__PURE__ */
|
|
1522
|
+
className: `table-headers-column ${C.className}`,
|
|
1523
|
+
children: /* @__PURE__ */ y(
|
|
1524
1524
|
"button",
|
|
1525
1525
|
{
|
|
1526
|
-
disabled: !
|
|
1527
|
-
onClick: () => d(
|
|
1526
|
+
disabled: !C.sortable,
|
|
1527
|
+
onClick: () => d(C.id, a),
|
|
1528
1528
|
className: "table-headers-cell",
|
|
1529
1529
|
children: [
|
|
1530
|
-
/* @__PURE__ */ c("span", { className: "table-headers-label", children:
|
|
1531
|
-
|
|
1530
|
+
/* @__PURE__ */ c("span", { className: "table-headers-label", children: C.label }),
|
|
1531
|
+
C.sortable && h === C.id && /* @__PURE__ */ c("span", { children: u === re.ASC ? ((v = (p = C.sortOptions) == null ? void 0 : p.icons) == null ? void 0 : v.asc) ?? /* @__PURE__ */ c(
|
|
1532
1532
|
ht,
|
|
1533
1533
|
{
|
|
1534
|
-
className: ((m = (
|
|
1534
|
+
className: ((m = (g = C.sortOptions) == null ? void 0 : g.icons) == null ? void 0 : m.className) ?? "table-headers-sort-indicator"
|
|
1535
1535
|
}
|
|
1536
|
-
) : ((E = (N =
|
|
1536
|
+
) : ((E = (N = C.sortOptions) == null ? void 0 : N.icons) == null ? void 0 : E.desc) ?? /* @__PURE__ */ c(
|
|
1537
1537
|
dt,
|
|
1538
1538
|
{
|
|
1539
|
-
className: ((
|
|
1539
|
+
className: ((x = (k = C.sortOptions) == null ? void 0 : k.icons) == null ? void 0 : x.className) ?? "table-headers-sort-indicator"
|
|
1540
1540
|
}
|
|
1541
1541
|
) })
|
|
1542
1542
|
]
|
|
1543
1543
|
}
|
|
1544
1544
|
)
|
|
1545
1545
|
},
|
|
1546
|
-
|
|
1546
|
+
C.id
|
|
1547
1547
|
);
|
|
1548
1548
|
}),
|
|
1549
1549
|
s && /* @__PURE__ */ c("th", { scope: "col", className: "table-headers-action", children: t("_accessibility:labels.actions") })
|
|
1550
1550
|
] }) });
|
|
1551
1551
|
}
|
|
1552
1552
|
function bn() {
|
|
1553
|
-
const { t: e } =
|
|
1553
|
+
const { t: e } = U();
|
|
1554
1554
|
return /* @__PURE__ */ c("div", { className: "table-empty", children: /* @__PURE__ */ c("p", { children: e("_accessibility:components.table.empty") }) });
|
|
1555
1555
|
}
|
|
1556
1556
|
const gn = () => {
|
|
1557
|
-
const { t: e } =
|
|
1558
|
-
return /* @__PURE__ */
|
|
1557
|
+
const { t: e } = U(), { total: t, pageSize: r, currentPage: n, setCurrentPage: s } = Z();
|
|
1558
|
+
return /* @__PURE__ */ y("div", { className: "table-navigation-pages", children: [
|
|
1559
1559
|
/* @__PURE__ */ c(
|
|
1560
1560
|
"button",
|
|
1561
1561
|
{
|
|
@@ -1580,9 +1580,9 @@ const gn = () => {
|
|
|
1580
1580
|
)
|
|
1581
1581
|
] });
|
|
1582
1582
|
}, vn = () => {
|
|
1583
|
-
const { t: e } =
|
|
1584
|
-
return /* @__PURE__ */
|
|
1585
|
-
n[0] < t && /* @__PURE__ */ c(le, { children: /* @__PURE__ */
|
|
1583
|
+
const { t: e } = U(), { total: t, pageSize: r, pageSizes: n, currentPage: s } = Z(), a = (s + 1) * r > t ? t : (s + 1) * r;
|
|
1584
|
+
return /* @__PURE__ */ y("div", { className: "table-navigation-sizes", children: [
|
|
1585
|
+
n[0] < t && /* @__PURE__ */ c(le, { children: /* @__PURE__ */ y("p", { children: [
|
|
1586
1586
|
s * r + 1,
|
|
1587
1587
|
" - ",
|
|
1588
1588
|
a,
|
|
@@ -1593,11 +1593,11 @@ const gn = () => {
|
|
|
1593
1593
|
] });
|
|
1594
1594
|
};
|
|
1595
1595
|
function Cn() {
|
|
1596
|
-
const { t: e } =
|
|
1596
|
+
const { t: e } = U(), { pageSizes: t, pageSize: r, setPageSize: n } = Z(), s = F(
|
|
1597
1597
|
() => t == null ? void 0 : t.map((a) => ({ id: a, value: a })),
|
|
1598
1598
|
[t]
|
|
1599
1599
|
);
|
|
1600
|
-
return /* @__PURE__ */
|
|
1600
|
+
return /* @__PURE__ */ y("div", { className: "page-size", children: [
|
|
1601
1601
|
/* @__PURE__ */ c("p", { children: e("_accessibility:components.table.pageSizes") }),
|
|
1602
1602
|
/* @__PURE__ */ c(
|
|
1603
1603
|
Oe,
|
|
@@ -1613,14 +1613,14 @@ function Cn() {
|
|
|
1613
1613
|
] });
|
|
1614
1614
|
}
|
|
1615
1615
|
function wn() {
|
|
1616
|
-
const { t: e } =
|
|
1617
|
-
const
|
|
1618
|
-
return Array.from({ length:
|
|
1619
|
-
id:
|
|
1620
|
-
value:
|
|
1616
|
+
const { t: e } = U(), { total: t, pageSize: r, currentPage: n, setCurrentPage: s } = Z(), a = F(() => {
|
|
1617
|
+
const o = Math.ceil(t / r);
|
|
1618
|
+
return Array.from({ length: o }, (i, l) => ({
|
|
1619
|
+
id: l,
|
|
1620
|
+
value: l + 1
|
|
1621
1621
|
}));
|
|
1622
1622
|
}, [t, r]);
|
|
1623
|
-
return /* @__PURE__ */
|
|
1623
|
+
return /* @__PURE__ */ y("div", { className: "jump-to-page", children: [
|
|
1624
1624
|
/* @__PURE__ */ c("p", { children: e("_accessibility:components.table.jumpToPage") }),
|
|
1625
1625
|
/* @__PURE__ */ c(
|
|
1626
1626
|
Oe,
|
|
@@ -1630,20 +1630,20 @@ function wn() {
|
|
|
1630
1630
|
inputClassName: "jump-to-page-input",
|
|
1631
1631
|
containerClassName: "jump-to-page-input-container",
|
|
1632
1632
|
helperTextClassName: "hidden",
|
|
1633
|
-
onChange: (
|
|
1633
|
+
onChange: (o) => s(Number(o.target.value))
|
|
1634
1634
|
}
|
|
1635
1635
|
)
|
|
1636
1636
|
] });
|
|
1637
1637
|
}
|
|
1638
1638
|
function Nn() {
|
|
1639
|
-
return /* @__PURE__ */
|
|
1639
|
+
return /* @__PURE__ */ y("div", { className: "table-footer", children: [
|
|
1640
1640
|
/* @__PURE__ */ c(wn, {}),
|
|
1641
1641
|
/* @__PURE__ */ c(Cn, {}),
|
|
1642
1642
|
/* @__PURE__ */ c(vn, {}),
|
|
1643
1643
|
/* @__PURE__ */ c(gn, {})
|
|
1644
1644
|
] });
|
|
1645
1645
|
}
|
|
1646
|
-
const
|
|
1646
|
+
const yn = (e) => {
|
|
1647
1647
|
const { items: t, text: r, id: n, onClearFilter: s } = e;
|
|
1648
1648
|
return /* @__PURE__ */ c(
|
|
1649
1649
|
X,
|
|
@@ -1652,7 +1652,7 @@ const xn = (e) => {
|
|
|
1652
1652
|
onDelete: () => s(n)
|
|
1653
1653
|
}
|
|
1654
1654
|
);
|
|
1655
|
-
},
|
|
1655
|
+
}, xn = (e) => {
|
|
1656
1656
|
const { end: t, start: r, text: n, id: s, onClearFilter: a } = e;
|
|
1657
1657
|
return /* @__PURE__ */ c(
|
|
1658
1658
|
X,
|
|
@@ -1664,48 +1664,48 @@ const xn = (e) => {
|
|
|
1664
1664
|
};
|
|
1665
1665
|
const $n = (e) => {
|
|
1666
1666
|
const { filtersDefinition: t } = e, r = F(() => {
|
|
1667
|
-
const
|
|
1668
|
-
return t.forEach((
|
|
1669
|
-
|
|
1670
|
-
}),
|
|
1671
|
-
}, [t]), { filters: n, clearFilters: s } = Z(), a = F(() => Object.keys(n), [n]),
|
|
1672
|
-
(
|
|
1673
|
-
var
|
|
1674
|
-
return (
|
|
1675
|
-
|
|
1667
|
+
const i = {};
|
|
1668
|
+
return t.forEach((l) => {
|
|
1669
|
+
i[l.propertyName] = l.label ?? l.propertyName;
|
|
1670
|
+
}), i;
|
|
1671
|
+
}, [t]), { filters: n, clearFilters: s } = Z(), a = F(() => Object.keys(n), [n]), o = M(
|
|
1672
|
+
(i) => {
|
|
1673
|
+
var l, d, u, h;
|
|
1674
|
+
return (l = n[i]) != null && l.end || (d = n[i]) != null && d.start ? /* @__PURE__ */ c(
|
|
1675
|
+
xn,
|
|
1676
1676
|
{
|
|
1677
|
-
id:
|
|
1678
|
-
text: r[
|
|
1679
|
-
start: n[
|
|
1680
|
-
end: n[
|
|
1677
|
+
id: i,
|
|
1678
|
+
text: r[i],
|
|
1679
|
+
start: n[i].start,
|
|
1680
|
+
end: n[i].end,
|
|
1681
1681
|
onClearFilter: s
|
|
1682
1682
|
}
|
|
1683
|
-
) : Array.isArray(n[
|
|
1684
|
-
|
|
1683
|
+
) : Array.isArray(n[i]) ? /* @__PURE__ */ c(
|
|
1684
|
+
yn,
|
|
1685
1685
|
{
|
|
1686
|
-
id:
|
|
1687
|
-
text: r[
|
|
1688
|
-
items: n[
|
|
1686
|
+
id: i,
|
|
1687
|
+
text: r[i],
|
|
1688
|
+
items: n[i],
|
|
1689
1689
|
onClearFilter: s
|
|
1690
1690
|
}
|
|
1691
1691
|
) : /* @__PURE__ */ c(
|
|
1692
1692
|
X,
|
|
1693
1693
|
{
|
|
1694
|
-
text: `${r[
|
|
1695
|
-
onDelete: () => s(
|
|
1694
|
+
text: `${r[i]}: ${((u = n[i]) == null ? void 0 : u.value) ?? ((h = n[i]) == null ? void 0 : h.name) ?? n[i]}`,
|
|
1695
|
+
onDelete: () => s(i)
|
|
1696
1696
|
}
|
|
1697
1697
|
);
|
|
1698
1698
|
},
|
|
1699
1699
|
[n, r]
|
|
1700
1700
|
);
|
|
1701
|
-
return /* @__PURE__ */ c("ul", { className: "active-filters-main", children: a == null ? void 0 : a.map((
|
|
1701
|
+
return /* @__PURE__ */ c("ul", { className: "active-filters-main", children: a == null ? void 0 : a.map((i) => /* @__PURE__ */ c("li", { children: o(i) }, i)) });
|
|
1702
1702
|
};
|
|
1703
1703
|
function Sn(e) {
|
|
1704
|
-
const { propertyName: t, options: r, label: n, placeholder: s } = e, { currentFilters: a, setCurrentFilters:
|
|
1704
|
+
const { propertyName: t, options: r, label: n, placeholder: s } = e, { currentFilters: a, setCurrentFilters: o } = ie(), i = F(() => {
|
|
1705
1705
|
var d;
|
|
1706
1706
|
return ((d = a[t]) == null ? void 0 : d.value) ?? r[0];
|
|
1707
|
-
}, [a]),
|
|
1708
|
-
|
|
1707
|
+
}, [a]), l = M((d) => {
|
|
1708
|
+
o({
|
|
1709
1709
|
type: G.update,
|
|
1710
1710
|
toUpdate: { [t]: { value: d.target.value } }
|
|
1711
1711
|
});
|
|
@@ -1713,32 +1713,32 @@ function Sn(e) {
|
|
|
1713
1713
|
return /* @__PURE__ */ c(
|
|
1714
1714
|
Oe,
|
|
1715
1715
|
{
|
|
1716
|
-
value:
|
|
1716
|
+
value: i,
|
|
1717
1717
|
label: n,
|
|
1718
1718
|
options: r,
|
|
1719
1719
|
helperTextClassName: "hidden",
|
|
1720
1720
|
containerClassName: "options-widget-container",
|
|
1721
|
-
onChange:
|
|
1721
|
+
onChange: l,
|
|
1722
1722
|
placeholder: s
|
|
1723
1723
|
}
|
|
1724
1724
|
);
|
|
1725
1725
|
}
|
|
1726
1726
|
const kn = (e) => {
|
|
1727
|
-
const { propertyName: t, label: r, placeholder: n } = e, { currentFilters: s, setCurrentFilters: a } = ie(),
|
|
1728
|
-
var
|
|
1729
|
-
return ((
|
|
1730
|
-
}, [s]),
|
|
1727
|
+
const { propertyName: t, label: r, placeholder: n } = e, { currentFilters: s, setCurrentFilters: a } = ie(), o = F(() => {
|
|
1728
|
+
var l;
|
|
1729
|
+
return ((l = s[t]) == null ? void 0 : l.value) ?? "";
|
|
1730
|
+
}, [s]), i = M((l) => {
|
|
1731
1731
|
a({
|
|
1732
1732
|
type: G.update,
|
|
1733
|
-
toUpdate: { [t]: { value:
|
|
1733
|
+
toUpdate: { [t]: { value: l.target.value } }
|
|
1734
1734
|
});
|
|
1735
1735
|
}, []);
|
|
1736
1736
|
return /* @__PURE__ */ c(
|
|
1737
1737
|
Ce,
|
|
1738
1738
|
{
|
|
1739
|
-
value:
|
|
1739
|
+
value: o ?? "",
|
|
1740
1740
|
label: r,
|
|
1741
|
-
onChange:
|
|
1741
|
+
onChange: i,
|
|
1742
1742
|
containerClassName: "input-widget-container",
|
|
1743
1743
|
helperTextClassName: "",
|
|
1744
1744
|
placeholder: n
|
|
@@ -1746,20 +1746,20 @@ const kn = (e) => {
|
|
|
1746
1746
|
);
|
|
1747
1747
|
}, En = (e) => {
|
|
1748
1748
|
const { propertyName: t, label: r } = e, { currentFilters: n, setCurrentFilters: s } = ie(), a = F(() => {
|
|
1749
|
-
var
|
|
1750
|
-
return ((
|
|
1751
|
-
}, [n]),
|
|
1749
|
+
var i;
|
|
1750
|
+
return ((i = n[t]) == null ? void 0 : i.value) ?? "";
|
|
1751
|
+
}, [n]), o = M((i) => {
|
|
1752
1752
|
s({
|
|
1753
1753
|
type: G.update,
|
|
1754
|
-
toUpdate: { [t]: { value:
|
|
1754
|
+
toUpdate: { [t]: { value: i.target.checked } }
|
|
1755
1755
|
});
|
|
1756
1756
|
}, []);
|
|
1757
|
-
return /* @__PURE__ */ c(gt, { label: r, checked: a ?? !1, onChange:
|
|
1757
|
+
return /* @__PURE__ */ c(gt, { label: r, checked: a ?? !1, onChange: o });
|
|
1758
1758
|
};
|
|
1759
1759
|
function An(e) {
|
|
1760
|
-
const { propertyName: t, label: r, placeholder: n, options: s, multiple: a = !0 } = e, { currentFilters:
|
|
1760
|
+
const { propertyName: t, label: r, placeholder: n, options: s, multiple: a = !0 } = e, { currentFilters: o, setCurrentFilters: i } = ie(), l = F(() => o[t] ?? s[0], [o]), d = M(
|
|
1761
1761
|
(u) => {
|
|
1762
|
-
|
|
1762
|
+
i({
|
|
1763
1763
|
type: G.update,
|
|
1764
1764
|
toUpdate: {
|
|
1765
1765
|
[t]: {
|
|
@@ -1773,7 +1773,7 @@ function An(e) {
|
|
|
1773
1773
|
return /* @__PURE__ */ c(
|
|
1774
1774
|
un,
|
|
1775
1775
|
{
|
|
1776
|
-
value:
|
|
1776
|
+
value: l == null ? void 0 : l.value,
|
|
1777
1777
|
label: r,
|
|
1778
1778
|
options: s,
|
|
1779
1779
|
multiple: a,
|
|
@@ -1785,41 +1785,41 @@ function An(e) {
|
|
|
1785
1785
|
);
|
|
1786
1786
|
}
|
|
1787
1787
|
const qe = (e) => {
|
|
1788
|
-
var h,
|
|
1789
|
-
const { propertyName: t, label: r, inputType: n } = e, { t: s } =
|
|
1790
|
-
var
|
|
1791
|
-
|
|
1788
|
+
var h, b, C, p;
|
|
1789
|
+
const { propertyName: t, label: r, inputType: n } = e, { t: s } = U(), { currentFilters: a, setCurrentFilters: o } = ie(), i = J(null), l = J(null), d = M((v) => {
|
|
1790
|
+
var g;
|
|
1791
|
+
o({
|
|
1792
1792
|
type: G.update,
|
|
1793
1793
|
toUpdate: {
|
|
1794
1794
|
[t]: {
|
|
1795
|
-
value: { end: ((
|
|
1795
|
+
value: { end: ((g = l == null ? void 0 : l.current) == null ? void 0 : g.value) ?? null, start: v.target.value }
|
|
1796
1796
|
}
|
|
1797
1797
|
}
|
|
1798
1798
|
});
|
|
1799
|
-
}, []), u = M((
|
|
1800
|
-
var
|
|
1801
|
-
|
|
1799
|
+
}, []), u = M((v) => {
|
|
1800
|
+
var g;
|
|
1801
|
+
o({
|
|
1802
1802
|
type: G.update,
|
|
1803
1803
|
toUpdate: {
|
|
1804
1804
|
[t]: {
|
|
1805
1805
|
value: {
|
|
1806
|
-
start: ((
|
|
1807
|
-
end:
|
|
1806
|
+
start: ((g = i == null ? void 0 : i.current) == null ? void 0 : g.value) ?? null,
|
|
1807
|
+
end: v.target.value
|
|
1808
1808
|
}
|
|
1809
1809
|
}
|
|
1810
1810
|
}
|
|
1811
1811
|
});
|
|
1812
1812
|
}, []);
|
|
1813
|
-
return /* @__PURE__ */
|
|
1813
|
+
return /* @__PURE__ */ y("div", { className: "range-widget-container", children: [
|
|
1814
1814
|
/* @__PURE__ */ c("p", { className: "text-input-label input-widget-label input-label-normal", children: r }),
|
|
1815
|
-
/* @__PURE__ */
|
|
1815
|
+
/* @__PURE__ */ y("div", { className: "range-widget-row", children: [
|
|
1816
1816
|
/* @__PURE__ */ c(
|
|
1817
1817
|
Ce,
|
|
1818
1818
|
{
|
|
1819
|
-
value: ((
|
|
1819
|
+
value: ((b = (h = a[t]) == null ? void 0 : h.value) == null ? void 0 : b.start) ?? "",
|
|
1820
1820
|
placeholder: s("_accessibility:components.table.filters.range.start"),
|
|
1821
1821
|
type: n,
|
|
1822
|
-
ref:
|
|
1822
|
+
ref: i,
|
|
1823
1823
|
onChange: d,
|
|
1824
1824
|
containerClassName: "input-widget-container",
|
|
1825
1825
|
helperTextClassName: ""
|
|
@@ -1828,10 +1828,10 @@ const qe = (e) => {
|
|
|
1828
1828
|
/* @__PURE__ */ c(
|
|
1829
1829
|
Ce,
|
|
1830
1830
|
{
|
|
1831
|
-
value: ((p = (
|
|
1831
|
+
value: ((p = (C = a[t]) == null ? void 0 : C.value) == null ? void 0 : p.end) ?? "",
|
|
1832
1832
|
placeholder: s("_accessibility:components.table.filters.range.end"),
|
|
1833
1833
|
type: n,
|
|
1834
|
-
ref:
|
|
1834
|
+
ref: l,
|
|
1835
1835
|
onChange: u,
|
|
1836
1836
|
containerClassName: "input-widget-container",
|
|
1837
1837
|
helperTextClassName: ""
|
|
@@ -1869,31 +1869,31 @@ const qe = (e) => {
|
|
|
1869
1869
|
return /* @__PURE__ */ c(le, {});
|
|
1870
1870
|
};
|
|
1871
1871
|
const Tn = (e) => {
|
|
1872
|
-
const { filters: t = [], show: r, handleShow: n } = e, { onFilterApply: s } = Z(), { currentFilters: a, setCurrentFilters:
|
|
1873
|
-
return
|
|
1872
|
+
const { filters: t = [], show: r, handleShow: n } = e, { onFilterApply: s } = Z(), { currentFilters: a, setCurrentFilters: o } = ie(), { t: i } = U(), l = J(null);
|
|
1873
|
+
return K(() => {
|
|
1874
1874
|
const d = ({ target: u }) => {
|
|
1875
1875
|
var h;
|
|
1876
|
-
|
|
1876
|
+
l.current && (!r || (h = l.current) != null && h.contains(u) || n(!1));
|
|
1877
1877
|
};
|
|
1878
1878
|
return document.addEventListener("click", d), () => document.removeEventListener("click", d);
|
|
1879
|
-
}),
|
|
1879
|
+
}), K(() => {
|
|
1880
1880
|
const d = (u) => {
|
|
1881
1881
|
!r || u.code !== "Escape" || n(!1);
|
|
1882
1882
|
};
|
|
1883
1883
|
return document.addEventListener("keydown", d), () => document.removeEventListener("keydown", d);
|
|
1884
|
-
}), /* @__PURE__ */ c("div", { className: `filter-dropdown-backdrop ${r ? "opened" : "closed"}`, children: /* @__PURE__ */
|
|
1885
|
-
/* @__PURE__ */ c("div", { className: "filter-title", children:
|
|
1884
|
+
}), /* @__PURE__ */ c("div", { className: `filter-dropdown-backdrop ${r ? "opened" : "closed"}`, children: /* @__PURE__ */ y("div", { className: "filter-popup", children: [
|
|
1885
|
+
/* @__PURE__ */ c("div", { className: "filter-title", children: i("_accessibility:buttons.filters") }),
|
|
1886
1886
|
/* @__PURE__ */ c("ul", { className: "filter-container", children: t.map((d) => /* @__PURE__ */ c("li", { className: "filter-container-item", children: Pn(d) }, d.propertyName)) }),
|
|
1887
|
-
/* @__PURE__ */ c("div", { className: "filter-footer", children: /* @__PURE__ */
|
|
1887
|
+
/* @__PURE__ */ c("div", { className: "filter-footer", children: /* @__PURE__ */ y("ul", { className: "filter-buttons-row", children: [
|
|
1888
1888
|
/* @__PURE__ */ c("li", { children: /* @__PURE__ */ c(
|
|
1889
1889
|
"button",
|
|
1890
1890
|
{
|
|
1891
|
-
onClick: () =>
|
|
1891
|
+
onClick: () => o({
|
|
1892
1892
|
type: G.reset,
|
|
1893
1893
|
filters: t
|
|
1894
1894
|
}),
|
|
1895
1895
|
className: "filter-dropdown-button small filter-dropdown-cancel",
|
|
1896
|
-
children:
|
|
1896
|
+
children: i("_accessibility:buttons.clear")
|
|
1897
1897
|
}
|
|
1898
1898
|
) }),
|
|
1899
1899
|
/* @__PURE__ */ c("li", { children: /* @__PURE__ */ c(
|
|
@@ -1904,76 +1904,76 @@ const Tn = (e) => {
|
|
|
1904
1904
|
n(!1), s(a);
|
|
1905
1905
|
},
|
|
1906
1906
|
onBlur: () => n(!1),
|
|
1907
|
-
children:
|
|
1907
|
+
children: i("_accessibility:buttons.applyFilters")
|
|
1908
1908
|
}
|
|
1909
1909
|
) })
|
|
1910
1910
|
] }) })
|
|
1911
1911
|
] }) });
|
|
1912
1912
|
}, Rn = (e) => {
|
|
1913
|
-
var
|
|
1914
|
-
const { columns: t, title: r, isLoading: n, toolbar: s, filterOptions: a } = e, { countOfFilters:
|
|
1913
|
+
var C, p, v;
|
|
1914
|
+
const { columns: t, title: r, isLoading: n, toolbar: s, filterOptions: a } = e, { countOfFilters: o } = Z(), { t: i } = U(), l = F(() => t ? t.sort((g, m) => (m.pos ?? 0) - (g.pos ?? 0)).filter((g) => !!g.filterOptions).map((g) => {
|
|
1915
1915
|
var m;
|
|
1916
1916
|
return {
|
|
1917
|
-
...
|
|
1918
|
-
label: ((m =
|
|
1919
|
-
propertyName:
|
|
1917
|
+
...g.filterOptions,
|
|
1918
|
+
label: ((m = g.filterOptions) == null ? void 0 : m.label) ?? g.label,
|
|
1919
|
+
propertyName: g.key
|
|
1920
1920
|
};
|
|
1921
1921
|
}) : [], [t]), [d, u] = j(!1), h = M(
|
|
1922
|
-
(
|
|
1922
|
+
(g) => {
|
|
1923
1923
|
var m, N;
|
|
1924
|
-
((N = (m = a == null ? void 0 : a.dropdown) == null ? void 0 : m.setOpened) == null ? void 0 : N.call(m,
|
|
1924
|
+
((N = (m = a == null ? void 0 : a.dropdown) == null ? void 0 : m.setOpened) == null ? void 0 : N.call(m, g ?? !1)) ?? u(g ?? !1);
|
|
1925
1925
|
},
|
|
1926
1926
|
[a, d]
|
|
1927
|
-
),
|
|
1927
|
+
), b = F(
|
|
1928
1928
|
() => {
|
|
1929
|
-
var
|
|
1930
|
-
return ((
|
|
1929
|
+
var g;
|
|
1930
|
+
return ((g = a == null ? void 0 : a.dropdown) == null ? void 0 : g.opened) ?? d;
|
|
1931
1931
|
},
|
|
1932
1932
|
[a, d]
|
|
1933
1933
|
);
|
|
1934
|
-
return /* @__PURE__ */
|
|
1934
|
+
return /* @__PURE__ */ y(
|
|
1935
1935
|
"div",
|
|
1936
1936
|
{
|
|
1937
|
-
className: `table-header ${r && (s || !((
|
|
1937
|
+
className: `table-header ${r && (s || !((C = a == null ? void 0 : a.button) != null && C.hide)) ? "two" : "one"}`,
|
|
1938
1938
|
children: [
|
|
1939
|
-
/* @__PURE__ */
|
|
1939
|
+
/* @__PURE__ */ y("div", { children: [
|
|
1940
1940
|
r && /* @__PURE__ */ c("h1", { className: "table-header-title", children: r }),
|
|
1941
|
-
n ? null : /* @__PURE__ */
|
|
1941
|
+
n ? null : /* @__PURE__ */ y("div", { className: "table-header-right", children: [
|
|
1942
1942
|
s,
|
|
1943
|
-
((p = a == null ? void 0 : a.button) == null ? void 0 : p.hide) !== !0 && /* @__PURE__ */
|
|
1943
|
+
((p = a == null ? void 0 : a.button) == null ? void 0 : p.hide) !== !0 && /* @__PURE__ */ y(
|
|
1944
1944
|
"button",
|
|
1945
1945
|
{
|
|
1946
1946
|
className: "filter-dropdown-button normal filter-dropdown-trigger",
|
|
1947
1947
|
"aria-haspopup": "true",
|
|
1948
1948
|
onClick: () => {
|
|
1949
|
-
var
|
|
1949
|
+
var g;
|
|
1950
1950
|
return h(
|
|
1951
|
-
((
|
|
1951
|
+
((g = a == null ? void 0 : a.dropdown) == null ? void 0 : g.opened) ?? !d
|
|
1952
1952
|
);
|
|
1953
1953
|
},
|
|
1954
|
-
"aria-expanded":
|
|
1954
|
+
"aria-expanded": b,
|
|
1955
1955
|
children: [
|
|
1956
1956
|
/* @__PURE__ */ c(
|
|
1957
1957
|
Ln,
|
|
1958
1958
|
{
|
|
1959
|
-
count:
|
|
1960
|
-
className: `${
|
|
1959
|
+
count: o,
|
|
1960
|
+
className: `${o > 0 ? "show" : "hide"} `
|
|
1961
1961
|
}
|
|
1962
1962
|
),
|
|
1963
|
-
/* @__PURE__ */ c("span", { className: "sr-only", children:
|
|
1963
|
+
/* @__PURE__ */ c("span", { className: "sr-only", children: i("_accessibility:buttons.filters") }),
|
|
1964
1964
|
/* @__PURE__ */ c("wbr", {}),
|
|
1965
|
-
((
|
|
1965
|
+
((v = a == null ? void 0 : a.button) == null ? void 0 : v.icon) ?? /* @__PURE__ */ c(mt, { className: "filter-dropdown-trigger-icon" })
|
|
1966
1966
|
]
|
|
1967
1967
|
}
|
|
1968
1968
|
)
|
|
1969
1969
|
] })
|
|
1970
1970
|
] }),
|
|
1971
|
-
/* @__PURE__ */ c($n, { filtersDefinition:
|
|
1972
|
-
!!
|
|
1971
|
+
/* @__PURE__ */ c($n, { filtersDefinition: l }),
|
|
1972
|
+
!!l && !!l.length && /* @__PURE__ */ c(
|
|
1973
1973
|
Tn,
|
|
1974
1974
|
{
|
|
1975
|
-
filters:
|
|
1976
|
-
show:
|
|
1975
|
+
filters: l,
|
|
1976
|
+
show: b,
|
|
1977
1977
|
handleShow: h,
|
|
1978
1978
|
options: a
|
|
1979
1979
|
}
|
|
@@ -1982,94 +1982,95 @@ const Tn = (e) => {
|
|
|
1982
1982
|
}
|
|
1983
1983
|
);
|
|
1984
1984
|
}, On = (e) => e, Fn = (e) => {
|
|
1985
|
-
const {
|
|
1986
|
-
columns:
|
|
1987
|
-
softDeleteProperty:
|
|
1988
|
-
data:
|
|
1989
|
-
actions:
|
|
1990
|
-
selectedRows:
|
|
1991
|
-
onRowSelectionChange:
|
|
1992
|
-
} = e,
|
|
1993
|
-
() =>
|
|
1994
|
-
[
|
|
1985
|
+
const { t } = U(), {
|
|
1986
|
+
columns: r,
|
|
1987
|
+
softDeleteProperty: n = "deletedAt",
|
|
1988
|
+
data: s,
|
|
1989
|
+
actions: a,
|
|
1990
|
+
selectedRows: o,
|
|
1991
|
+
onRowSelectionChange: i
|
|
1992
|
+
} = e, l = F(
|
|
1993
|
+
() => r.sort((d, u) => (u.pos ?? 0) - (d.pos ?? 0)).filter((d) => d.display !== "none"),
|
|
1994
|
+
[r]
|
|
1995
1995
|
);
|
|
1996
|
-
return
|
|
1997
|
-
var
|
|
1998
|
-
const
|
|
1999
|
-
return /* @__PURE__ */
|
|
1996
|
+
return s == null ? void 0 : s.map((d) => {
|
|
1997
|
+
var h;
|
|
1998
|
+
const u = o.has(d.id);
|
|
1999
|
+
return /* @__PURE__ */ y(
|
|
2000
2000
|
"tr",
|
|
2001
2001
|
{
|
|
2002
|
-
className: `table-row ${
|
|
2002
|
+
className: `table-row ${d[n] ? "deleted-class" : ""} ${u ? "selected" : ""}`,
|
|
2003
2003
|
children: [
|
|
2004
2004
|
/* @__PURE__ */ c("td", { className: "table-row-cell table-row-checkbox", children: /* @__PURE__ */ c(
|
|
2005
2005
|
"input",
|
|
2006
2006
|
{
|
|
2007
2007
|
type: "checkbox",
|
|
2008
|
-
checked:
|
|
2009
|
-
onChange: () =>
|
|
2008
|
+
checked: u,
|
|
2009
|
+
onChange: () => i(d),
|
|
2010
|
+
"aria-label": t("_accessibility:components.table.selectRow")
|
|
2010
2011
|
}
|
|
2011
2012
|
) }),
|
|
2012
|
-
|
|
2013
|
+
l == null ? void 0 : l.map((b, C) => /* @__PURE__ */ c(
|
|
2013
2014
|
"td",
|
|
2014
2015
|
{
|
|
2015
|
-
className: `table-row-cell ${C === 0 ? "basic" : ""} ${
|
|
2016
|
-
children:
|
|
2016
|
+
className: `table-row-cell ${C === 0 ? "basic" : ""} ${b.className ?? ""}`,
|
|
2017
|
+
children: b.renderBody ? b.renderBody(d[b.key], d) : On(d[b.key])
|
|
2017
2018
|
},
|
|
2018
|
-
|
|
2019
|
+
b.key
|
|
2019
2020
|
)),
|
|
2020
|
-
|
|
2021
|
+
a ? /* @__PURE__ */ c("td", { children: /* @__PURE__ */ c("div", { className: "table-row-cell-action", children: (h = a(d).filter((b) => !b.hidden)) == null ? void 0 : h.map((b) => /* @__PURE__ */ c(lt, { content: b.tooltip, children: /* @__PURE__ */ c("button", { onClick: () => b.onClick(d), children: b.icon }) }, b.id)) }) }) : null
|
|
2021
2022
|
]
|
|
2022
2023
|
},
|
|
2023
|
-
|
|
2024
|
+
d.id
|
|
2024
2025
|
);
|
|
2025
2026
|
});
|
|
2026
2027
|
};
|
|
2027
|
-
function
|
|
2028
|
+
function Bn(e) {
|
|
2028
2029
|
const {
|
|
2029
2030
|
data: t,
|
|
2030
2031
|
onSort: r,
|
|
2031
2032
|
entity: n = "",
|
|
2032
2033
|
isLoading: s = !1,
|
|
2033
2034
|
actions: a,
|
|
2034
|
-
columns:
|
|
2035
|
-
contentClassName:
|
|
2036
|
-
className:
|
|
2035
|
+
columns: o = [],
|
|
2036
|
+
contentClassName: i = "",
|
|
2037
|
+
className: l = "",
|
|
2037
2038
|
softDeleteProperty: d = "deletedAt",
|
|
2038
2039
|
onRowSelect: u,
|
|
2039
2040
|
onSelectedRowsChange: h,
|
|
2040
|
-
...
|
|
2041
|
-
} = e, { t:
|
|
2041
|
+
...b
|
|
2042
|
+
} = e, { t: C } = U(), [p, v] = j(/* @__PURE__ */ new Set()), g = F(() => !(t != null && t.length), [t]), m = F(
|
|
2042
2043
|
() => (t == null ? void 0 : t.filter((f) => p.has(f.id))) ?? [],
|
|
2043
2044
|
[t, p]
|
|
2044
2045
|
);
|
|
2045
|
-
|
|
2046
|
+
K(() => {
|
|
2046
2047
|
if (!(t != null && t.length)) {
|
|
2047
|
-
|
|
2048
|
+
v(/* @__PURE__ */ new Set());
|
|
2048
2049
|
return;
|
|
2049
2050
|
}
|
|
2050
|
-
|
|
2051
|
-
const P = /* @__PURE__ */ new Set(), R = new Set(t.map((
|
|
2052
|
-
return f.forEach((
|
|
2053
|
-
R.has(
|
|
2051
|
+
v((f) => {
|
|
2052
|
+
const P = /* @__PURE__ */ new Set(), R = new Set(t.map((B) => B.id));
|
|
2053
|
+
return f.forEach((B) => {
|
|
2054
|
+
R.has(B) && P.add(B);
|
|
2054
2055
|
}), P;
|
|
2055
2056
|
});
|
|
2056
2057
|
}, [t]);
|
|
2057
2058
|
const N = M(
|
|
2058
2059
|
(f) => {
|
|
2059
|
-
|
|
2060
|
+
v((P) => {
|
|
2060
2061
|
const R = new Set(P);
|
|
2061
2062
|
return R.has(f.id) ? (R.delete(f.id), u == null || u(f, !1)) : (R.add(f.id), u == null || u(f, !0)), R;
|
|
2062
2063
|
});
|
|
2063
2064
|
},
|
|
2064
2065
|
[u]
|
|
2065
2066
|
), E = M(() => {
|
|
2066
|
-
|
|
2067
|
-
const P = new Set(f), R = t ?? [],
|
|
2068
|
-
(
|
|
2067
|
+
v((f) => {
|
|
2068
|
+
const P = new Set(f), R = t ?? [], B = R.every(
|
|
2069
|
+
(_) => P.has(_.id)
|
|
2069
2070
|
);
|
|
2070
|
-
return R.forEach((
|
|
2071
|
-
const z = P.has(
|
|
2072
|
-
|
|
2071
|
+
return R.forEach((_) => {
|
|
2072
|
+
const z = P.has(_.id);
|
|
2073
|
+
B ? z && (P.delete(_.id), u == null || u(_, !1)) : z || (P.add(_.id), u == null || u(_, !0));
|
|
2073
2074
|
}), P;
|
|
2074
2075
|
});
|
|
2075
2076
|
}, [t, u]), k = F(() => {
|
|
@@ -2078,18 +2079,18 @@ function _n(e) {
|
|
|
2078
2079
|
const f = t.every((R) => p.has(R.id)), P = t.some((R) => p.has(R.id));
|
|
2079
2080
|
return { allSelected: f, hasSomeSelected: P };
|
|
2080
2081
|
}, [t, p]);
|
|
2081
|
-
|
|
2082
|
+
K(() => {
|
|
2082
2083
|
h && h(m);
|
|
2083
2084
|
}, [m, h]);
|
|
2084
|
-
const
|
|
2085
|
-
const
|
|
2085
|
+
const x = F(() => !a || !m.length ? [] : m.reduce((f, P, R) => {
|
|
2086
|
+
const B = a(P).filter(
|
|
2086
2087
|
(z) => z.multiple && !z.hidden
|
|
2087
2088
|
);
|
|
2088
2089
|
if (R === 0)
|
|
2089
|
-
return
|
|
2090
|
-
const
|
|
2091
|
-
return
|
|
2092
|
-
const te =
|
|
2090
|
+
return B;
|
|
2091
|
+
const _ = new Map(f.map((z) => [z.id, z]));
|
|
2092
|
+
return B.reduce((z, ee) => {
|
|
2093
|
+
const te = _.get(ee.id);
|
|
2093
2094
|
return te && z.push({
|
|
2094
2095
|
...te,
|
|
2095
2096
|
...ee,
|
|
@@ -2108,56 +2109,54 @@ function _n(e) {
|
|
|
2108
2109
|
},
|
|
2109
2110
|
[m]
|
|
2110
2111
|
);
|
|
2111
|
-
return /* @__PURE__ */ c(pn, { children: /* @__PURE__ */
|
|
2112
|
-
/* @__PURE__ */ c(Rn, { columns:
|
|
2113
|
-
s ? /* @__PURE__ */ c(dn, { className: "table-loading" }) : /* @__PURE__ */ c(le, { children:
|
|
2114
|
-
/* @__PURE__ */
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
) }, f.id)) })
|
|
2128
|
-
] }),
|
|
2129
|
-
/* @__PURE__ */ x("table", { className: "table-content", children: [
|
|
2130
|
-
/* @__PURE__ */ c(
|
|
2131
|
-
mn,
|
|
2132
|
-
{
|
|
2133
|
-
entity: n,
|
|
2134
|
-
columns: l,
|
|
2135
|
-
onSortCallback: r,
|
|
2136
|
-
hasAction: !!a,
|
|
2137
|
-
selectionState: k,
|
|
2138
|
-
onToggleAllRows: E
|
|
2139
|
-
}
|
|
2140
|
-
),
|
|
2141
|
-
/* @__PURE__ */ c("tbody", { children: /* @__PURE__ */ c(
|
|
2142
|
-
Fn,
|
|
2143
|
-
{
|
|
2144
|
-
data: t,
|
|
2145
|
-
actions: a,
|
|
2146
|
-
columns: l,
|
|
2147
|
-
softDeleteProperty: d,
|
|
2148
|
-
selectedRows: p,
|
|
2149
|
-
onRowSelectionChange: N
|
|
2150
|
-
}
|
|
2151
|
-
) })
|
|
2152
|
-
] })
|
|
2112
|
+
return /* @__PURE__ */ c(pn, { children: /* @__PURE__ */ y("div", { className: `${l} table-main`, children: [
|
|
2113
|
+
/* @__PURE__ */ c(Rn, { columns: o, isLoading: s, ...b }),
|
|
2114
|
+
s ? /* @__PURE__ */ c(dn, { className: "table-loading" }) : /* @__PURE__ */ c(le, { children: g ? /* @__PURE__ */ c(bn, {}) : /* @__PURE__ */ y(le, { children: [
|
|
2115
|
+
!!m.length && /* @__PURE__ */ y("div", { className: "table-selection-bar", children: [
|
|
2116
|
+
/* @__PURE__ */ c("p", { className: "table-selection-bar-count", children: C("_accessibility:components.table.selectedCount", {
|
|
2117
|
+
count: m.length
|
|
2118
|
+
}) }),
|
|
2119
|
+
x.length > 0 && /* @__PURE__ */ c("div", { className: "table-selection-bar-actions", children: x.map((f) => /* @__PURE__ */ c(lt, { content: f.tooltip, children: /* @__PURE__ */ c(
|
|
2120
|
+
"button",
|
|
2121
|
+
{
|
|
2122
|
+
type: "button",
|
|
2123
|
+
onClick: () => A(f),
|
|
2124
|
+
disabled: f.disabled,
|
|
2125
|
+
children: f.icon
|
|
2126
|
+
}
|
|
2127
|
+
) }, f.id)) })
|
|
2153
2128
|
] }),
|
|
2129
|
+
/* @__PURE__ */ c("div", { className: `${i} table-body`, children: /* @__PURE__ */ y("table", { className: "table-content", children: [
|
|
2130
|
+
/* @__PURE__ */ c(
|
|
2131
|
+
mn,
|
|
2132
|
+
{
|
|
2133
|
+
entity: n,
|
|
2134
|
+
columns: o,
|
|
2135
|
+
onSortCallback: r,
|
|
2136
|
+
hasAction: !!a,
|
|
2137
|
+
selectionState: k,
|
|
2138
|
+
onToggleAllRows: E
|
|
2139
|
+
}
|
|
2140
|
+
),
|
|
2141
|
+
/* @__PURE__ */ c("tbody", { children: /* @__PURE__ */ c(
|
|
2142
|
+
Fn,
|
|
2143
|
+
{
|
|
2144
|
+
data: t,
|
|
2145
|
+
actions: a,
|
|
2146
|
+
columns: o,
|
|
2147
|
+
softDeleteProperty: d,
|
|
2148
|
+
selectedRows: p,
|
|
2149
|
+
onRowSelectionChange: N
|
|
2150
|
+
}
|
|
2151
|
+
) })
|
|
2152
|
+
] }) }),
|
|
2154
2153
|
/* @__PURE__ */ c(Nn, {})
|
|
2155
2154
|
] }) })
|
|
2156
2155
|
] }) });
|
|
2157
2156
|
}
|
|
2158
2157
|
function lt(e) {
|
|
2159
2158
|
const { content: t, children: r, className: n = "" } = e;
|
|
2160
|
-
return /* @__PURE__ */
|
|
2159
|
+
return /* @__PURE__ */ y("div", { className: `tooltip-container ${n}`, children: [
|
|
2161
2160
|
r,
|
|
2162
2161
|
/* @__PURE__ */ c("div", { className: "tooltip-text", children: t })
|
|
2163
2162
|
] });
|
|
@@ -2169,18 +2168,18 @@ function X(e) {
|
|
|
2169
2168
|
children: n,
|
|
2170
2169
|
icon: s,
|
|
2171
2170
|
variant: a = "default",
|
|
2172
|
-
iconClassName:
|
|
2173
|
-
className:
|
|
2174
|
-
textClassName:
|
|
2171
|
+
iconClassName: o = "",
|
|
2172
|
+
className: i = "",
|
|
2173
|
+
textClassName: l = ""
|
|
2175
2174
|
} = e;
|
|
2176
|
-
return /* @__PURE__ */
|
|
2177
|
-
/* @__PURE__ */ c("span", { className:
|
|
2175
|
+
return /* @__PURE__ */ y("div", { className: `chip-main ${a} ${i}`, children: [
|
|
2176
|
+
/* @__PURE__ */ c("span", { className: l, children: t }),
|
|
2178
2177
|
n,
|
|
2179
2178
|
r ? /* @__PURE__ */ c(
|
|
2180
2179
|
"button",
|
|
2181
2180
|
{
|
|
2182
2181
|
type: "button",
|
|
2183
|
-
className: `chip-delete-button ${
|
|
2182
|
+
className: `chip-delete-button ${o}`,
|
|
2184
2183
|
onClick: r,
|
|
2185
2184
|
children: s ?? /* @__PURE__ */ c(Re, {})
|
|
2186
2185
|
}
|
|
@@ -2189,14 +2188,14 @@ function X(e) {
|
|
|
2189
2188
|
}
|
|
2190
2189
|
const Ln = (e) => {
|
|
2191
2190
|
const { count: t, className: r = "" } = e, n = J(null);
|
|
2192
|
-
return
|
|
2191
|
+
return K(() => {
|
|
2193
2192
|
var s, a;
|
|
2194
2193
|
(s = n.current) != null && s.parentNode && (((a = n.current) == null ? void 0 : a.parentNode).style.position = "relative");
|
|
2195
2194
|
}, [n]), /* @__PURE__ */ c("span", { ref: n, className: `${r} badge-main`, children: t });
|
|
2196
2195
|
};
|
|
2197
2196
|
export {
|
|
2198
2197
|
$n as ActiveFilters,
|
|
2199
|
-
|
|
2198
|
+
yn as ArrayChip,
|
|
2200
2199
|
un as AutocompleteInput,
|
|
2201
2200
|
Ln as Badge,
|
|
2202
2201
|
gt as CheckInput,
|
|
@@ -2219,18 +2218,18 @@ export {
|
|
|
2219
2218
|
dn as Loading,
|
|
2220
2219
|
gn as Navigation,
|
|
2221
2220
|
Cn as PageSize,
|
|
2222
|
-
|
|
2221
|
+
xn as RangeChip,
|
|
2223
2222
|
Fn as Rows,
|
|
2224
2223
|
Oe as SelectInput,
|
|
2225
2224
|
re as SortOrder,
|
|
2226
2225
|
Ne as State,
|
|
2227
|
-
|
|
2226
|
+
Bn as Table,
|
|
2228
2227
|
bn as TableEmpty,
|
|
2229
2228
|
Rn as TableHeader,
|
|
2230
|
-
|
|
2229
|
+
Wn as TableOptionsProvider,
|
|
2231
2230
|
Ce as TextInput,
|
|
2232
2231
|
lt as Tooltip,
|
|
2233
|
-
|
|
2232
|
+
_n as TranslationProvider,
|
|
2234
2233
|
fn as filtersReducer,
|
|
2235
2234
|
Ze as helperTextStateClassName,
|
|
2236
2235
|
Ve as initializer,
|
|
@@ -2239,5 +2238,5 @@ export {
|
|
|
2239
2238
|
Pn as renderFilterComponent,
|
|
2240
2239
|
ie as useFilters,
|
|
2241
2240
|
Z as useTableOptions,
|
|
2242
|
-
|
|
2241
|
+
U as useTranslation
|
|
2243
2242
|
};
|