@sito/dashboard 0.0.59 → 0.0.60
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.cjs +1 -1
- package/dist/dashboard.js +254 -260
- package/dist/main.css +1 -1
- package/package.json +1 -1
package/dist/dashboard.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./main.css";
|
|
2
|
-
import { jsx as c, jsxs as
|
|
2
|
+
import { jsx as c, jsxs as N, Fragment as le } from "react/jsx-runtime";
|
|
3
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;
|
|
@@ -125,39 +125,39 @@ const Oe = fe(function(e, t) {
|
|
|
125
125
|
placeholder: u = "",
|
|
126
126
|
label: h = "",
|
|
127
127
|
name: b = "",
|
|
128
|
-
id:
|
|
129
|
-
state:
|
|
130
|
-
children:
|
|
131
|
-
...
|
|
128
|
+
id: g = "",
|
|
129
|
+
state: m = Ne.default,
|
|
130
|
+
children: f,
|
|
131
|
+
...C
|
|
132
132
|
} = e;
|
|
133
|
-
return /* @__PURE__ */
|
|
133
|
+
return /* @__PURE__ */ N("div", { className: `select-input-container ${a}`, children: [
|
|
134
134
|
/* @__PURE__ */ c(
|
|
135
135
|
"select",
|
|
136
136
|
{
|
|
137
|
-
...
|
|
138
|
-
id:
|
|
137
|
+
...C,
|
|
138
|
+
id: g,
|
|
139
139
|
ref: t,
|
|
140
140
|
name: b,
|
|
141
141
|
value: r,
|
|
142
142
|
onChange: n,
|
|
143
|
-
className: `select-input ${Ke(
|
|
144
|
-
children: s == null ? void 0 : s.map((
|
|
143
|
+
className: `select-input ${Ke(m)} peer ${o}`,
|
|
144
|
+
children: s == null ? void 0 : s.map((v) => /* @__PURE__ */ c("option", { value: v.id, children: v.value ?? v.name ?? v.id }, v.id))
|
|
145
145
|
}
|
|
146
146
|
),
|
|
147
147
|
/* @__PURE__ */ c(
|
|
148
148
|
"label",
|
|
149
149
|
{
|
|
150
150
|
htmlFor: b,
|
|
151
|
-
className: `select-input-label ${Ye(
|
|
151
|
+
className: `select-input-label ${Ye(m)} ${i}`,
|
|
152
152
|
children: h
|
|
153
153
|
}
|
|
154
154
|
),
|
|
155
|
-
|
|
155
|
+
f,
|
|
156
156
|
(u || l) && /* @__PURE__ */ c(
|
|
157
157
|
"p",
|
|
158
158
|
{
|
|
159
|
-
className: `select-input-helper-text ${Ze(
|
|
160
|
-
children:
|
|
159
|
+
className: `select-input-helper-text ${Ze(m)} ${d}`,
|
|
160
|
+
children: m !== "error" && m !== "good" ? u : l
|
|
161
161
|
}
|
|
162
162
|
)
|
|
163
163
|
] });
|
|
@@ -175,7 +175,7 @@ const Ce = fe(function(e, t) {
|
|
|
175
175
|
value: u = "",
|
|
176
176
|
...h
|
|
177
177
|
} = e;
|
|
178
|
-
return /* @__PURE__ */
|
|
178
|
+
return /* @__PURE__ */ N("div", { className: `text-input-container ${a}`, children: [
|
|
179
179
|
/* @__PURE__ */ c(
|
|
180
180
|
"input",
|
|
181
181
|
{
|
|
@@ -185,7 +185,7 @@ const Ce = fe(function(e, t) {
|
|
|
185
185
|
...h
|
|
186
186
|
}
|
|
187
187
|
),
|
|
188
|
-
!!s && /* @__PURE__ */
|
|
188
|
+
!!s && /* @__PURE__ */ N(
|
|
189
189
|
"label",
|
|
190
190
|
{
|
|
191
191
|
htmlFor: h.name,
|
|
@@ -219,10 +219,10 @@ const gt = fe(function(e, t) {
|
|
|
219
219
|
inputClassName: u = "",
|
|
220
220
|
labelClassName: h = "",
|
|
221
221
|
helperText: b = "",
|
|
222
|
-
helperTextClassName:
|
|
223
|
-
...
|
|
222
|
+
helperTextClassName: g = "",
|
|
223
|
+
...m
|
|
224
224
|
} = e;
|
|
225
|
-
return /* @__PURE__ */
|
|
225
|
+
return /* @__PURE__ */ N("label", { className: `input-check-container ${d}`, children: [
|
|
226
226
|
/* @__PURE__ */ c(
|
|
227
227
|
"input",
|
|
228
228
|
{
|
|
@@ -233,7 +233,7 @@ const gt = fe(function(e, t) {
|
|
|
233
233
|
checked: r,
|
|
234
234
|
onChange: n,
|
|
235
235
|
className: `input-check ${u}`,
|
|
236
|
-
...
|
|
236
|
+
...m
|
|
237
237
|
}
|
|
238
238
|
),
|
|
239
239
|
/* @__PURE__ */ c("span", { className: `input-check-label ${h}`, children: l })
|
|
@@ -423,26 +423,26 @@ function Mt(e) {
|
|
|
423
423
|
return nt(ve("", null, null, null, [""], e = tt(e), 0, [0], e));
|
|
424
424
|
}
|
|
425
425
|
function ve(e, t, r, n, s, a, o, i, l) {
|
|
426
|
-
for (var d = 0, u = 0, h = o, b = 0,
|
|
427
|
-
switch (
|
|
426
|
+
for (var d = 0, u = 0, h = o, b = 0, g = 0, m = 0, f = 1, C = 1, v = 1, y = 0, E = "", k = s, x = a, A = n, p = E; C; )
|
|
427
|
+
switch (m = y, y = W()) {
|
|
428
428
|
case 40:
|
|
429
|
-
if (
|
|
430
|
-
Ee(
|
|
429
|
+
if (m != 108 && O(p, h - 1) == 58) {
|
|
430
|
+
Ee(p += S(ge(y), "&", "&\f"), "&\f") != -1 && (v = -1);
|
|
431
431
|
break;
|
|
432
432
|
}
|
|
433
433
|
case 34:
|
|
434
434
|
case 39:
|
|
435
435
|
case 91:
|
|
436
|
-
|
|
436
|
+
p += ge(y);
|
|
437
437
|
break;
|
|
438
438
|
case 9:
|
|
439
439
|
case 10:
|
|
440
440
|
case 13:
|
|
441
441
|
case 32:
|
|
442
|
-
|
|
442
|
+
p += Rt(m);
|
|
443
443
|
break;
|
|
444
444
|
case 92:
|
|
445
|
-
|
|
445
|
+
p += Ot(be() - 1, 7);
|
|
446
446
|
continue;
|
|
447
447
|
case 47:
|
|
448
448
|
switch (Y()) {
|
|
@@ -451,29 +451,29 @@ function ve(e, t, r, n, s, a, o, i, l) {
|
|
|
451
451
|
me(Dt(Ft(W(), be()), t, r), l);
|
|
452
452
|
break;
|
|
453
453
|
default:
|
|
454
|
-
|
|
454
|
+
p += "/";
|
|
455
455
|
}
|
|
456
456
|
break;
|
|
457
|
-
case 123 *
|
|
458
|
-
i[d++] = V(
|
|
459
|
-
case 125 *
|
|
457
|
+
case 123 * f:
|
|
458
|
+
i[d++] = V(p) * v;
|
|
459
|
+
case 125 * f:
|
|
460
460
|
case 59:
|
|
461
461
|
case 0:
|
|
462
|
-
switch (
|
|
462
|
+
switch (y) {
|
|
463
463
|
case 0:
|
|
464
464
|
case 125:
|
|
465
|
-
|
|
465
|
+
C = 0;
|
|
466
466
|
case 59 + u:
|
|
467
|
-
|
|
467
|
+
v == -1 && (p = S(p, /\f/g, "")), g > 0 && V(p) - h && me(g > 32 ? Ie(p + ";", n, r, h - 1) : Ie(S(p, " ", "") + ";", n, r, h - 2), l);
|
|
468
468
|
break;
|
|
469
469
|
case 59:
|
|
470
|
-
|
|
470
|
+
p += ";";
|
|
471
471
|
default:
|
|
472
|
-
if (me(A = ze(
|
|
472
|
+
if (me(A = ze(p, t, r, d, u, s, i, E, k = [], x = [], h), a), y === 123)
|
|
473
473
|
if (u === 0)
|
|
474
|
-
ve(
|
|
474
|
+
ve(p, t, A, A, k, a, h, i, x);
|
|
475
475
|
else
|
|
476
|
-
switch (b === 99 && O(
|
|
476
|
+
switch (b === 99 && O(p, 3) === 110 ? 100 : b) {
|
|
477
477
|
case 100:
|
|
478
478
|
case 108:
|
|
479
479
|
case 109:
|
|
@@ -481,40 +481,40 @@ function ve(e, t, r, n, s, a, o, i, l) {
|
|
|
481
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(
|
|
484
|
+
ve(p, A, A, A, [""], x, 0, i, x);
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
|
-
d = u =
|
|
487
|
+
d = u = g = 0, f = v = 1, E = p = "", h = o;
|
|
488
488
|
break;
|
|
489
489
|
case 58:
|
|
490
|
-
h = 1 + V(
|
|
490
|
+
h = 1 + V(p), g = m;
|
|
491
491
|
default:
|
|
492
|
-
if (
|
|
493
|
-
if (
|
|
494
|
-
--
|
|
495
|
-
else if (
|
|
492
|
+
if (f < 1) {
|
|
493
|
+
if (y == 123)
|
|
494
|
+
--f;
|
|
495
|
+
else if (y == 125 && f++ == 0 && Tt() == 125)
|
|
496
496
|
continue;
|
|
497
497
|
}
|
|
498
|
-
switch (
|
|
498
|
+
switch (p += ye(y), y * f) {
|
|
499
499
|
case 38:
|
|
500
|
-
|
|
500
|
+
v = u > 0 ? 1 : (p += "\f", -1);
|
|
501
501
|
break;
|
|
502
502
|
case 44:
|
|
503
|
-
i[d++] = (V(
|
|
503
|
+
i[d++] = (V(p) - 1) * v, v = 1;
|
|
504
504
|
break;
|
|
505
505
|
case 64:
|
|
506
|
-
Y() === 45 && (
|
|
506
|
+
Y() === 45 && (p += ge(W())), b = Y(), u = h = V(E = p += Lt(be())), y++;
|
|
507
507
|
break;
|
|
508
508
|
case 45:
|
|
509
|
-
|
|
509
|
+
m === 45 && V(p) == 2 && (f = 0);
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
512
|
return a;
|
|
513
513
|
}
|
|
514
514
|
function ze(e, t, r, n, s, a, o, i, l, d, u) {
|
|
515
|
-
for (var h = s - 1, b = s === 0 ? a : [""],
|
|
516
|
-
for (var
|
|
517
|
-
(E = Xe(
|
|
515
|
+
for (var h = s - 1, b = s === 0 ? a : [""], g = Me(b), m = 0, f = 0, C = 0; m < n; ++m)
|
|
516
|
+
for (var v = 0, y = ue(e, h + 1, h = $t(f = o[m])), E = e; v < g; ++v)
|
|
517
|
+
(E = Xe(f > 0 ? b[v] + " " + y : S(y, /&\f/g, b[v]))) && (l[C++] = E);
|
|
518
518
|
return $e(e, t, r, s === 0 ? Fe : i, l, d, u);
|
|
519
519
|
}
|
|
520
520
|
function Dt(e, t, r) {
|
|
@@ -761,9 +761,9 @@ 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(f) {
|
|
765
|
+
var C = f.getAttribute("data-emotion");
|
|
766
|
+
C.indexOf(" ") !== -1 && (document.head.appendChild(f), f.setAttribute("data-s", ""));
|
|
767
767
|
});
|
|
768
768
|
}
|
|
769
769
|
var s = t.stylisPlugins || qt, a = {}, o, i = [];
|
|
@@ -771,24 +771,24 @@ var Vt = function(t, r, n, s) {
|
|
|
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
|
-
i.push(
|
|
774
|
+
function(f) {
|
|
775
|
+
for (var C = f.getAttribute("data-emotion").split(" "), v = 1; v < C.length; v++)
|
|
776
|
+
a[C[v]] = !0;
|
|
777
|
+
i.push(f);
|
|
778
778
|
}
|
|
779
779
|
);
|
|
780
780
|
var l, d = [Ut, Ht];
|
|
781
781
|
{
|
|
782
|
-
var u, h = [zt, _t(function(
|
|
783
|
-
u.insert(
|
|
784
|
-
})], b = It(d.concat(s, h)),
|
|
785
|
-
return se(Mt(
|
|
782
|
+
var u, h = [zt, _t(function(f) {
|
|
783
|
+
u.insert(f);
|
|
784
|
+
})], b = It(d.concat(s, h)), g = function(C) {
|
|
785
|
+
return se(Mt(C), b);
|
|
786
786
|
};
|
|
787
|
-
l = function(
|
|
788
|
-
u =
|
|
787
|
+
l = function(C, v, y, E) {
|
|
788
|
+
u = y, g(C ? C + "{" + v.styles + "}" : v.styles), E && (m.inserted[v.name] = !0);
|
|
789
789
|
};
|
|
790
790
|
}
|
|
791
|
-
var
|
|
791
|
+
var m = {
|
|
792
792
|
key: r,
|
|
793
793
|
sheet: new Nt({
|
|
794
794
|
key: r,
|
|
@@ -803,7 +803,7 @@ var Vt = function(t, r, n, s) {
|
|
|
803
803
|
registered: {},
|
|
804
804
|
insert: l
|
|
805
805
|
};
|
|
806
|
-
return
|
|
806
|
+
return m.sheet.hydrate(i), m;
|
|
807
807
|
};
|
|
808
808
|
function Yt(e) {
|
|
809
809
|
for (var t = 0, r, n = 0, s = e.length; s >= 4; ++n, s -= 4)
|
|
@@ -1126,33 +1126,33 @@ const un = fe(function(e, t) {
|
|
|
1126
1126
|
inputContainerClassName: u = "",
|
|
1127
1127
|
helperText: h = "",
|
|
1128
1128
|
placeholder: b = "",
|
|
1129
|
-
multiple:
|
|
1130
|
-
...
|
|
1131
|
-
} = e, [
|
|
1129
|
+
multiple: g = !1,
|
|
1130
|
+
...m
|
|
1131
|
+
} = e, [f, C] = j("");
|
|
1132
1132
|
K(() => {
|
|
1133
|
-
g
|
|
1133
|
+
C(g ? "" : (n == null ? void 0 : n.value) ?? (n == null ? void 0 : n.name) ?? "");
|
|
1134
1134
|
}, [n]);
|
|
1135
|
-
const [
|
|
1136
|
-
const D = String(w.value ?? w.name).toLowerCase().includes(
|
|
1135
|
+
const [v, y] = j(!1), E = a.filter((w) => {
|
|
1136
|
+
const D = String(w.value ?? w.name).toLowerCase().includes(f == null ? void 0 : f.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), x = J(null), [A,
|
|
1138
|
+
}), k = J(null), x = J(null), [A, p] = j(!1), P = J(null);
|
|
1139
1139
|
K(() => {
|
|
1140
1140
|
const w = (H) => {
|
|
1141
|
-
k.current && !k.current.contains(H.target) &&
|
|
1141
|
+
k.current && !k.current.contains(H.target) && y(!1);
|
|
1142
1142
|
}, D = (H) => {
|
|
1143
|
-
H.key === "Escape" &&
|
|
1143
|
+
H.key === "Escape" && y(!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
|
-
|
|
1150
|
+
C(w.target.value);
|
|
1151
1151
|
}, B = M(
|
|
1152
1152
|
(w) => {
|
|
1153
|
-
w ?
|
|
1153
|
+
w ? g ? (C(""), Array.isArray(n) && n.length ? s([...n, w]) : s([w])) : (C(String(w.name ?? w.value ?? "")), s(w)) : s(null), y(!1);
|
|
1154
1154
|
},
|
|
1155
|
-
[
|
|
1155
|
+
[g, s, n]
|
|
1156
1156
|
), _ = M(
|
|
1157
1157
|
(w) => {
|
|
1158
1158
|
if (w != null)
|
|
@@ -1171,30 +1171,30 @@ const un = fe(function(e, t) {
|
|
|
1171
1171
|
return K(() => {
|
|
1172
1172
|
var H, ne, De;
|
|
1173
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
|
-
w > D * 0.4 ?
|
|
1175
|
-
}, [n]), /* @__PURE__ */
|
|
1174
|
+
w > D * 0.4 ? p(!0) : p(!1);
|
|
1175
|
+
}, [n]), /* @__PURE__ */ N(
|
|
1176
1176
|
"div",
|
|
1177
1177
|
{
|
|
1178
1178
|
className: `autocomplete-input-container ${d}`,
|
|
1179
1179
|
ref: k,
|
|
1180
1180
|
children: [
|
|
1181
|
-
/* @__PURE__ */
|
|
1181
|
+
/* @__PURE__ */ N("div", { className: "autocomplete-value-input-container", children: [
|
|
1182
1182
|
/* @__PURE__ */ c(
|
|
1183
1183
|
Ce,
|
|
1184
1184
|
{
|
|
1185
1185
|
state: r,
|
|
1186
1186
|
name: o,
|
|
1187
1187
|
id: i,
|
|
1188
|
-
value:
|
|
1188
|
+
value: f,
|
|
1189
1189
|
onChange: R,
|
|
1190
1190
|
placeholder: b,
|
|
1191
1191
|
helperText: h,
|
|
1192
|
-
onFocus: () =>
|
|
1192
|
+
onFocus: () => y(!0),
|
|
1193
1193
|
label: l,
|
|
1194
1194
|
containerClassName: `autocomplete-text-input ${u}`,
|
|
1195
1195
|
ref: t ?? x,
|
|
1196
|
-
...
|
|
1197
|
-
children: ((n == null ? void 0 : n.value) || (n == null ? void 0 : n.name)) && !
|
|
1196
|
+
...m,
|
|
1197
|
+
children: ((n == null ? void 0 : n.value) || (n == null ? void 0 : n.name)) && !g && /* @__PURE__ */ c(
|
|
1198
1198
|
"button",
|
|
1199
1199
|
{
|
|
1200
1200
|
type: "button",
|
|
@@ -1207,7 +1207,7 @@ const un = fe(function(e, t) {
|
|
|
1207
1207
|
)
|
|
1208
1208
|
}
|
|
1209
1209
|
),
|
|
1210
|
-
|
|
1210
|
+
g && Array.isArray(n) && n.length ? /* @__PURE__ */ c("ul", { ref: P, className: "autocomplete-value-container", children: A ? /* @__PURE__ */ N(le, { children: [
|
|
1211
1211
|
/* @__PURE__ */ c("li", { children: /* @__PURE__ */ c(
|
|
1212
1212
|
X,
|
|
1213
1213
|
{
|
|
@@ -1236,7 +1236,7 @@ const un = fe(function(e, t) {
|
|
|
1236
1236
|
}
|
|
1237
1237
|
) }, w.id ?? w.value ?? w.name)) }) : null
|
|
1238
1238
|
] }),
|
|
1239
|
-
|
|
1239
|
+
v && /* @__PURE__ */ c(
|
|
1240
1240
|
"ul",
|
|
1241
1241
|
{
|
|
1242
1242
|
className: `autocomplete-suggestions-container ${ln({ width: (te = k.current) == null ? void 0 : te.offsetWidth })}`,
|
|
@@ -1267,7 +1267,7 @@ function He(e, t = 25) {
|
|
|
1267
1267
|
return n.slice(0, a) + "..." + s;
|
|
1268
1268
|
}
|
|
1269
1269
|
const In = fe(function(e, t) {
|
|
1270
|
-
var
|
|
1270
|
+
var y, E;
|
|
1271
1271
|
const {
|
|
1272
1272
|
children: r,
|
|
1273
1273
|
label: n,
|
|
@@ -1280,21 +1280,21 @@ const In = fe(function(e, t) {
|
|
|
1280
1280
|
multiple: u = !1,
|
|
1281
1281
|
onChange: h,
|
|
1282
1282
|
onClear: b,
|
|
1283
|
-
...
|
|
1284
|
-
} = e, [
|
|
1283
|
+
...g
|
|
1284
|
+
} = e, [m, f] = j([]), C = (k) => {
|
|
1285
1285
|
if (k.target.files) {
|
|
1286
1286
|
const x = Array.from(k.target.files);
|
|
1287
|
-
|
|
1287
|
+
f((A) => [...A, ...x]);
|
|
1288
1288
|
}
|
|
1289
1289
|
h && h(k);
|
|
1290
|
-
},
|
|
1291
|
-
|
|
1292
|
-
const A = x.filter((
|
|
1290
|
+
}, v = (k) => {
|
|
1291
|
+
f((x) => {
|
|
1292
|
+
const A = x.filter((p, P) => P !== k);
|
|
1293
1293
|
return A.length === 0 && (b == null || b()), A;
|
|
1294
1294
|
});
|
|
1295
1295
|
};
|
|
1296
|
-
return /* @__PURE__ */
|
|
1297
|
-
|
|
1296
|
+
return /* @__PURE__ */ N("div", { className: `file-input-container ${s}`, children: [
|
|
1297
|
+
m.length === 0 && /* @__PURE__ */ N("label", { htmlFor: g.name, className: `${o}`, children: [
|
|
1298
1298
|
n,
|
|
1299
1299
|
/* @__PURE__ */ c(
|
|
1300
1300
|
"input",
|
|
@@ -1305,36 +1305,36 @@ const In = fe(function(e, t) {
|
|
|
1305
1305
|
onClick: (k) => {
|
|
1306
1306
|
k.currentTarget.value = "";
|
|
1307
1307
|
},
|
|
1308
|
-
onChange:
|
|
1308
|
+
onChange: C,
|
|
1309
1309
|
className: `file-input ${a}`,
|
|
1310
|
-
...
|
|
1310
|
+
...g
|
|
1311
1311
|
}
|
|
1312
1312
|
),
|
|
1313
|
-
|
|
1313
|
+
g.required ? " *" : ""
|
|
1314
1314
|
] }),
|
|
1315
|
-
|
|
1315
|
+
m.length > 1 && /* @__PURE__ */ c("ul", { className: "file-preview-list", children: m.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: () =>
|
|
1319
|
+
onDelete: () => v(x)
|
|
1320
1320
|
}
|
|
1321
1321
|
) }) }, x)) }),
|
|
1322
|
-
|
|
1322
|
+
m.length === 1 && /* @__PURE__ */ N("div", { className: "file-preview", children: [
|
|
1323
1323
|
/* @__PURE__ */ c(bt, { className: `file-icon ${d}` }),
|
|
1324
1324
|
/* @__PURE__ */ c(
|
|
1325
1325
|
"span",
|
|
1326
1326
|
{
|
|
1327
1327
|
className: "!cursor-default",
|
|
1328
1328
|
"data-tooltip-id": "tooltip",
|
|
1329
|
-
"data-tooltip-content": ((
|
|
1330
|
-
children: He(((E =
|
|
1329
|
+
"data-tooltip-content": ((y = m[0]) == null ? void 0 : y.name) ?? "",
|
|
1330
|
+
children: He(((E = m[0]) == null ? void 0 : E.name) ?? "", 25)
|
|
1331
1331
|
}
|
|
1332
1332
|
),
|
|
1333
1333
|
/* @__PURE__ */ c(
|
|
1334
1334
|
"button",
|
|
1335
1335
|
{
|
|
1336
1336
|
onClick: () => {
|
|
1337
|
-
|
|
1337
|
+
f([]), b == null || b();
|
|
1338
1338
|
},
|
|
1339
1339
|
className: "chip-delete-button",
|
|
1340
1340
|
type: "button",
|
|
@@ -1382,7 +1382,7 @@ const U = () => {
|
|
|
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
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,
|
|
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, g] = j({}), m = M(
|
|
1386
1386
|
(E, k) => {
|
|
1387
1387
|
let x = u;
|
|
1388
1388
|
if (l === E)
|
|
@@ -1397,19 +1397,19 @@ const hn = [20, 50, 100], it = Pe({}), Wn = (e) => {
|
|
|
1397
1397
|
d(E), h(x), k && k(E, x);
|
|
1398
1398
|
},
|
|
1399
1399
|
[l, u]
|
|
1400
|
-
),
|
|
1400
|
+
), f = M((E) => {
|
|
1401
1401
|
const k = Object.entries(E).reduce(
|
|
1402
|
-
(x, [A,
|
|
1402
|
+
(x, [A, p]) => (p && typeof p.value < "u" && p.value !== null && (x[A] = p.value), x),
|
|
1403
1403
|
{}
|
|
1404
1404
|
);
|
|
1405
|
-
|
|
1406
|
-
}, []),
|
|
1405
|
+
g(k);
|
|
1406
|
+
}, []), C = M(
|
|
1407
1407
|
(E) => {
|
|
1408
|
-
E ? (delete b[E.toLowerCase()],
|
|
1408
|
+
E ? (delete b[E.toLowerCase()], g({ ...b })) : g({});
|
|
1409
1409
|
},
|
|
1410
1410
|
[b]
|
|
1411
|
-
),
|
|
1412
|
-
onSort:
|
|
1411
|
+
), v = F(() => Object.keys(b).length, [b]), y = {
|
|
1412
|
+
onSort: m,
|
|
1413
1413
|
total: r,
|
|
1414
1414
|
setTotal: n,
|
|
1415
1415
|
sortingBy: l,
|
|
@@ -1422,11 +1422,11 @@ const hn = [20, 50, 100], it = Pe({}), Wn = (e) => {
|
|
|
1422
1422
|
currentPage: o,
|
|
1423
1423
|
setCurrentPage: i,
|
|
1424
1424
|
filters: b,
|
|
1425
|
-
onFilterApply:
|
|
1426
|
-
clearFilters:
|
|
1427
|
-
countOfFilters:
|
|
1425
|
+
onFilterApply: f,
|
|
1426
|
+
clearFilters: C,
|
|
1427
|
+
countOfFilters: v
|
|
1428
1428
|
};
|
|
1429
|
-
return /* @__PURE__ */ c(it.Provider, { value:
|
|
1429
|
+
return /* @__PURE__ */ c(it.Provider, { value: y, children: t });
|
|
1430
1430
|
}, Z = () => {
|
|
1431
1431
|
const e = Te(it);
|
|
1432
1432
|
if (e === void 0)
|
|
@@ -1493,16 +1493,16 @@ function mn(e) {
|
|
|
1493
1493
|
l.current && (l.current.indeterminate = !!(o != null && o.hasSomeSelected && !(o != null && o.allSelected)));
|
|
1494
1494
|
}, [o]);
|
|
1495
1495
|
const { onSort: d, sortingOrder: u, sortingBy: h } = Z(), b = F(() => {
|
|
1496
|
-
var
|
|
1497
|
-
return (
|
|
1498
|
-
id:
|
|
1499
|
-
label:
|
|
1500
|
-
className:
|
|
1501
|
-
sortable:
|
|
1502
|
-
sortOptions:
|
|
1496
|
+
var g;
|
|
1497
|
+
return (g = n.sort((m, f) => (f.pos ?? 0) - (m.pos ?? 0)).filter((m) => m.display !== "none")) == null ? void 0 : g.map((m) => ({
|
|
1498
|
+
id: m.key,
|
|
1499
|
+
label: m.label,
|
|
1500
|
+
className: m.className ?? "",
|
|
1501
|
+
sortable: m.sortable ?? !0,
|
|
1502
|
+
sortOptions: m.sortOptions
|
|
1503
1503
|
}));
|
|
1504
1504
|
}, [n, r, t]);
|
|
1505
|
-
return /* @__PURE__ */ c("thead", { className: "table-headers-row", children: /* @__PURE__ */
|
|
1505
|
+
return /* @__PURE__ */ c("thead", { className: "table-headers-row", children: /* @__PURE__ */ N("tr", { children: [
|
|
1506
1506
|
/* @__PURE__ */ c("th", { scope: "col", className: "table-headers-column table-headers-checkbox", children: i ? /* @__PURE__ */ c(
|
|
1507
1507
|
"input",
|
|
1508
1508
|
{
|
|
@@ -1513,37 +1513,37 @@ function mn(e) {
|
|
|
1513
1513
|
"aria-label": t("_accessibility:components.table.selectAllRows")
|
|
1514
1514
|
}
|
|
1515
1515
|
) : null }),
|
|
1516
|
-
b.map((
|
|
1517
|
-
var
|
|
1516
|
+
b.map((g) => {
|
|
1517
|
+
var m, f, C, v, y, 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 ${g.className}`,
|
|
1523
|
+
children: /* @__PURE__ */ N(
|
|
1524
1524
|
"button",
|
|
1525
1525
|
{
|
|
1526
|
-
disabled: !
|
|
1527
|
-
onClick: () => d(
|
|
1526
|
+
disabled: !g.sortable,
|
|
1527
|
+
onClick: () => d(g.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: g.label }),
|
|
1531
|
+
g.sortable && h === g.id && /* @__PURE__ */ c("span", { children: u === re.ASC ? ((f = (m = g.sortOptions) == null ? void 0 : m.icons) == null ? void 0 : f.asc) ?? /* @__PURE__ */ c(
|
|
1532
1532
|
ht,
|
|
1533
1533
|
{
|
|
1534
|
-
className: ((
|
|
1534
|
+
className: ((v = (C = g.sortOptions) == null ? void 0 : C.icons) == null ? void 0 : v.className) ?? "table-headers-sort-indicator"
|
|
1535
1535
|
}
|
|
1536
|
-
) : ((E = (
|
|
1536
|
+
) : ((E = (y = g.sortOptions) == null ? void 0 : y.icons) == null ? void 0 : E.desc) ?? /* @__PURE__ */ c(
|
|
1537
1537
|
dt,
|
|
1538
1538
|
{
|
|
1539
|
-
className: ((x = (k =
|
|
1539
|
+
className: ((x = (k = g.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
|
+
g.id
|
|
1547
1547
|
);
|
|
1548
1548
|
}),
|
|
1549
1549
|
s && /* @__PURE__ */ c("th", { scope: "col", className: "table-headers-action", children: t("_accessibility:labels.actions") })
|
|
@@ -1555,7 +1555,7 @@ function bn() {
|
|
|
1555
1555
|
}
|
|
1556
1556
|
const gn = () => {
|
|
1557
1557
|
const { t: e } = U(), { total: t, pageSize: r, currentPage: n, setCurrentPage: s } = Z();
|
|
1558
|
-
return /* @__PURE__ */
|
|
1558
|
+
return /* @__PURE__ */ N("div", { className: "table-navigation-pages", children: [
|
|
1559
1559
|
/* @__PURE__ */ c(
|
|
1560
1560
|
"button",
|
|
1561
1561
|
{
|
|
@@ -1581,8 +1581,8 @@ const gn = () => {
|
|
|
1581
1581
|
] });
|
|
1582
1582
|
}, vn = () => {
|
|
1583
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__ */
|
|
1585
|
-
n[0] < t && /* @__PURE__ */ c(le, { children: /* @__PURE__ */
|
|
1584
|
+
return /* @__PURE__ */ N("div", { className: "table-navigation-sizes", children: [
|
|
1585
|
+
n[0] < t && /* @__PURE__ */ c(le, { children: /* @__PURE__ */ N("p", { children: [
|
|
1586
1586
|
s * r + 1,
|
|
1587
1587
|
" - ",
|
|
1588
1588
|
a,
|
|
@@ -1597,7 +1597,7 @@ function Cn() {
|
|
|
1597
1597
|
() => t == null ? void 0 : t.map((a) => ({ id: a, value: a })),
|
|
1598
1598
|
[t]
|
|
1599
1599
|
);
|
|
1600
|
-
return /* @__PURE__ */
|
|
1600
|
+
return /* @__PURE__ */ N("div", { className: "page-size", children: [
|
|
1601
1601
|
/* @__PURE__ */ c("p", { children: e("_accessibility:components.table.pageSizes") }),
|
|
1602
1602
|
/* @__PURE__ */ c(
|
|
1603
1603
|
Oe,
|
|
@@ -1620,7 +1620,7 @@ function wn() {
|
|
|
1620
1620
|
value: l + 1
|
|
1621
1621
|
}));
|
|
1622
1622
|
}, [t, r]);
|
|
1623
|
-
return /* @__PURE__ */
|
|
1623
|
+
return /* @__PURE__ */ N("div", { className: "jump-to-page", children: [
|
|
1624
1624
|
/* @__PURE__ */ c("p", { children: e("_accessibility:components.table.jumpToPage") }),
|
|
1625
1625
|
/* @__PURE__ */ c(
|
|
1626
1626
|
Oe,
|
|
@@ -1636,7 +1636,7 @@ function wn() {
|
|
|
1636
1636
|
] });
|
|
1637
1637
|
}
|
|
1638
1638
|
function Nn() {
|
|
1639
|
-
return /* @__PURE__ */
|
|
1639
|
+
return /* @__PURE__ */ N("div", { className: "table-footer", children: [
|
|
1640
1640
|
/* @__PURE__ */ c(wn, {}),
|
|
1641
1641
|
/* @__PURE__ */ c(Cn, {}),
|
|
1642
1642
|
/* @__PURE__ */ c(vn, {}),
|
|
@@ -1785,34 +1785,34 @@ function An(e) {
|
|
|
1785
1785
|
);
|
|
1786
1786
|
}
|
|
1787
1787
|
const qe = (e) => {
|
|
1788
|
-
var h, b,
|
|
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((
|
|
1790
|
-
var
|
|
1788
|
+
var h, b, g, m;
|
|
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((f) => {
|
|
1790
|
+
var C;
|
|
1791
1791
|
o({
|
|
1792
1792
|
type: G.update,
|
|
1793
1793
|
toUpdate: {
|
|
1794
1794
|
[t]: {
|
|
1795
|
-
value: { end: ((
|
|
1795
|
+
value: { end: ((C = l == null ? void 0 : l.current) == null ? void 0 : C.value) ?? null, start: f.target.value }
|
|
1796
1796
|
}
|
|
1797
1797
|
}
|
|
1798
1798
|
});
|
|
1799
|
-
}, []), u = M((
|
|
1800
|
-
var
|
|
1799
|
+
}, []), u = M((f) => {
|
|
1800
|
+
var C;
|
|
1801
1801
|
o({
|
|
1802
1802
|
type: G.update,
|
|
1803
1803
|
toUpdate: {
|
|
1804
1804
|
[t]: {
|
|
1805
1805
|
value: {
|
|
1806
|
-
start: ((
|
|
1807
|
-
end:
|
|
1806
|
+
start: ((C = i == null ? void 0 : i.current) == null ? void 0 : C.value) ?? null,
|
|
1807
|
+
end: f.target.value
|
|
1808
1808
|
}
|
|
1809
1809
|
}
|
|
1810
1810
|
}
|
|
1811
1811
|
});
|
|
1812
1812
|
}, []);
|
|
1813
|
-
return /* @__PURE__ */
|
|
1813
|
+
return /* @__PURE__ */ N("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__ */ N("div", { className: "range-widget-row", children: [
|
|
1816
1816
|
/* @__PURE__ */ c(
|
|
1817
1817
|
Ce,
|
|
1818
1818
|
{
|
|
@@ -1828,7 +1828,7 @@ const qe = (e) => {
|
|
|
1828
1828
|
/* @__PURE__ */ c(
|
|
1829
1829
|
Ce,
|
|
1830
1830
|
{
|
|
1831
|
-
value: ((
|
|
1831
|
+
value: ((m = (g = a[t]) == null ? void 0 : g.value) == null ? void 0 : m.end) ?? "",
|
|
1832
1832
|
placeholder: s("_accessibility:components.table.filters.range.end"),
|
|
1833
1833
|
type: n,
|
|
1834
1834
|
ref: l,
|
|
@@ -1881,10 +1881,10 @@ const Tn = (e) => {
|
|
|
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__ */
|
|
1884
|
+
}), /* @__PURE__ */ c("div", { className: `filter-dropdown-backdrop ${r ? "opened" : "closed"}`, children: /* @__PURE__ */ N("div", { className: "filter-popup", children: [
|
|
1885
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__ */ N("ul", { className: "filter-buttons-row", children: [
|
|
1888
1888
|
/* @__PURE__ */ c("li", { children: /* @__PURE__ */ c(
|
|
1889
1889
|
"button",
|
|
1890
1890
|
{
|
|
@@ -1910,77 +1910,71 @@ const Tn = (e) => {
|
|
|
1910
1910
|
] }) })
|
|
1911
1911
|
] }) });
|
|
1912
1912
|
}, Rn = (e) => {
|
|
1913
|
-
var
|
|
1914
|
-
const { columns: t, title: r, isLoading: n, toolbar: s, filterOptions: a } = e, { countOfFilters: o } = Z(), { t: i } = U(), l = F(() => t ? t.sort((
|
|
1915
|
-
var
|
|
1913
|
+
var g, m;
|
|
1914
|
+
const { columns: t, title: r, isLoading: n, toolbar: s, filterOptions: a } = e, { countOfFilters: o } = Z(), { t: i } = U(), l = F(() => t ? t.sort((f, C) => (C.pos ?? 0) - (f.pos ?? 0)).filter((f) => !!f.filterOptions).map((f) => {
|
|
1915
|
+
var C;
|
|
1916
1916
|
return {
|
|
1917
|
-
...
|
|
1918
|
-
label: ((
|
|
1919
|
-
propertyName:
|
|
1917
|
+
...f.filterOptions,
|
|
1918
|
+
label: ((C = f.filterOptions) == null ? void 0 : C.label) ?? f.label,
|
|
1919
|
+
propertyName: f.key
|
|
1920
1920
|
};
|
|
1921
1921
|
}) : [], [t]), [d, u] = j(!1), h = M(
|
|
1922
|
-
(
|
|
1923
|
-
var
|
|
1924
|
-
((
|
|
1922
|
+
(f) => {
|
|
1923
|
+
var C, v;
|
|
1924
|
+
((v = (C = a == null ? void 0 : a.dropdown) == null ? void 0 : C.setOpened) == null ? void 0 : v.call(C, f ?? !1)) ?? u(f ?? !1);
|
|
1925
1925
|
},
|
|
1926
1926
|
[a, d]
|
|
1927
1927
|
), b = F(
|
|
1928
1928
|
() => {
|
|
1929
|
-
var
|
|
1930
|
-
return ((
|
|
1929
|
+
var f;
|
|
1930
|
+
return ((f = a == null ? void 0 : a.dropdown) == null ? void 0 : f.opened) ?? d;
|
|
1931
1931
|
},
|
|
1932
1932
|
[a, d]
|
|
1933
1933
|
);
|
|
1934
|
-
return /* @__PURE__ */
|
|
1935
|
-
"div",
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
/* @__PURE__ */
|
|
1940
|
-
|
|
1941
|
-
n ? null : /* @__PURE__ */ y("div", { className: "table-header-right", children: [
|
|
1942
|
-
s,
|
|
1943
|
-
((p = a == null ? void 0 : a.button) == null ? void 0 : p.hide) !== !0 && /* @__PURE__ */ y(
|
|
1944
|
-
"button",
|
|
1945
|
-
{
|
|
1946
|
-
className: "filter-dropdown-button normal filter-dropdown-trigger",
|
|
1947
|
-
"aria-haspopup": "true",
|
|
1948
|
-
onClick: () => {
|
|
1949
|
-
var g;
|
|
1950
|
-
return h(
|
|
1951
|
-
((g = a == null ? void 0 : a.dropdown) == null ? void 0 : g.opened) ?? !d
|
|
1952
|
-
);
|
|
1953
|
-
},
|
|
1954
|
-
"aria-expanded": b,
|
|
1955
|
-
children: [
|
|
1956
|
-
/* @__PURE__ */ c(
|
|
1957
|
-
Ln,
|
|
1958
|
-
{
|
|
1959
|
-
count: o,
|
|
1960
|
-
className: `${o > 0 ? "show" : "hide"} `
|
|
1961
|
-
}
|
|
1962
|
-
),
|
|
1963
|
-
/* @__PURE__ */ c("span", { className: "sr-only", children: i("_accessibility:buttons.filters") }),
|
|
1964
|
-
/* @__PURE__ */ c("wbr", {}),
|
|
1965
|
-
((v = a == null ? void 0 : a.button) == null ? void 0 : v.icon) ?? /* @__PURE__ */ c(mt, { className: "filter-dropdown-trigger-icon" })
|
|
1966
|
-
]
|
|
1967
|
-
}
|
|
1968
|
-
)
|
|
1969
|
-
] })
|
|
1970
|
-
] }),
|
|
1971
|
-
/* @__PURE__ */ c($n, { filtersDefinition: l }),
|
|
1972
|
-
!!l && !!l.length && /* @__PURE__ */ c(
|
|
1973
|
-
Tn,
|
|
1934
|
+
return /* @__PURE__ */ N("div", { className: "table-header", children: [
|
|
1935
|
+
/* @__PURE__ */ N("div", { children: [
|
|
1936
|
+
r && /* @__PURE__ */ c("h1", { className: "table-header-title", children: r }),
|
|
1937
|
+
n ? null : /* @__PURE__ */ N("div", { className: "table-header-content", children: [
|
|
1938
|
+
s,
|
|
1939
|
+
((g = a == null ? void 0 : a.button) == null ? void 0 : g.hide) !== !0 && /* @__PURE__ */ N(
|
|
1940
|
+
"button",
|
|
1974
1941
|
{
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1942
|
+
className: "filter-dropdown-button normal filter-dropdown-trigger",
|
|
1943
|
+
"aria-haspopup": "true",
|
|
1944
|
+
onClick: () => {
|
|
1945
|
+
var f;
|
|
1946
|
+
return h(
|
|
1947
|
+
((f = a == null ? void 0 : a.dropdown) == null ? void 0 : f.opened) ?? !d
|
|
1948
|
+
);
|
|
1949
|
+
},
|
|
1950
|
+
"aria-expanded": b,
|
|
1951
|
+
children: [
|
|
1952
|
+
/* @__PURE__ */ c(
|
|
1953
|
+
Ln,
|
|
1954
|
+
{
|
|
1955
|
+
count: o,
|
|
1956
|
+
className: `${o > 0 ? "show" : "hide"} `
|
|
1957
|
+
}
|
|
1958
|
+
),
|
|
1959
|
+
/* @__PURE__ */ c("span", { className: "sr-only", children: i("_accessibility:buttons.filters") }),
|
|
1960
|
+
/* @__PURE__ */ c("wbr", {}),
|
|
1961
|
+
((m = a == null ? void 0 : a.button) == null ? void 0 : m.icon) ?? /* @__PURE__ */ c(mt, { className: "filter-dropdown-trigger-icon" })
|
|
1962
|
+
]
|
|
1979
1963
|
}
|
|
1980
1964
|
)
|
|
1981
|
-
]
|
|
1982
|
-
}
|
|
1983
|
-
|
|
1965
|
+
] })
|
|
1966
|
+
] }),
|
|
1967
|
+
!!l && !!l.length && /* @__PURE__ */ c(
|
|
1968
|
+
Tn,
|
|
1969
|
+
{
|
|
1970
|
+
filters: l,
|
|
1971
|
+
show: b,
|
|
1972
|
+
handleShow: h,
|
|
1973
|
+
options: a
|
|
1974
|
+
}
|
|
1975
|
+
),
|
|
1976
|
+
/* @__PURE__ */ c($n, { filtersDefinition: l })
|
|
1977
|
+
] });
|
|
1984
1978
|
}, On = (e) => e, Fn = (e) => {
|
|
1985
1979
|
const { t } = U(), {
|
|
1986
1980
|
columns: r,
|
|
@@ -1996,7 +1990,7 @@ const Tn = (e) => {
|
|
|
1996
1990
|
return s == null ? void 0 : s.map((d) => {
|
|
1997
1991
|
var h;
|
|
1998
1992
|
const u = o.has(d.id);
|
|
1999
|
-
return /* @__PURE__ */
|
|
1993
|
+
return /* @__PURE__ */ N(
|
|
2000
1994
|
"tr",
|
|
2001
1995
|
{
|
|
2002
1996
|
className: `table-row ${d[n] ? "deleted-class" : ""} ${u ? "selected" : ""}`,
|
|
@@ -2010,10 +2004,10 @@ const Tn = (e) => {
|
|
|
2010
2004
|
"aria-label": t("_accessibility:components.table.selectRow")
|
|
2011
2005
|
}
|
|
2012
2006
|
) }),
|
|
2013
|
-
l == null ? void 0 : l.map((b,
|
|
2007
|
+
l == null ? void 0 : l.map((b, g) => /* @__PURE__ */ c(
|
|
2014
2008
|
"td",
|
|
2015
2009
|
{
|
|
2016
|
-
className: `table-row-cell ${
|
|
2010
|
+
className: `table-row-cell ${g === 0 ? "basic" : ""} ${b.className ?? ""}`,
|
|
2017
2011
|
children: b.renderBody ? b.renderBody(d[b.key], d) : On(d[b.key])
|
|
2018
2012
|
},
|
|
2019
2013
|
b.key
|
|
@@ -2039,33 +2033,33 @@ function Bn(e) {
|
|
|
2039
2033
|
onRowSelect: u,
|
|
2040
2034
|
onSelectedRowsChange: h,
|
|
2041
2035
|
...b
|
|
2042
|
-
} = e, { t:
|
|
2043
|
-
() => (t == null ? void 0 : t.filter((
|
|
2044
|
-
[t,
|
|
2036
|
+
} = e, { t: g } = U(), [m, f] = j(/* @__PURE__ */ new Set()), C = F(() => !(t != null && t.length), [t]), v = F(
|
|
2037
|
+
() => (t == null ? void 0 : t.filter((p) => m.has(p.id))) ?? [],
|
|
2038
|
+
[t, m]
|
|
2045
2039
|
);
|
|
2046
2040
|
K(() => {
|
|
2047
2041
|
if (!(t != null && t.length)) {
|
|
2048
|
-
|
|
2042
|
+
f(/* @__PURE__ */ new Set());
|
|
2049
2043
|
return;
|
|
2050
2044
|
}
|
|
2051
|
-
|
|
2045
|
+
f((p) => {
|
|
2052
2046
|
const P = /* @__PURE__ */ new Set(), R = new Set(t.map((B) => B.id));
|
|
2053
|
-
return
|
|
2047
|
+
return p.forEach((B) => {
|
|
2054
2048
|
R.has(B) && P.add(B);
|
|
2055
2049
|
}), P;
|
|
2056
2050
|
});
|
|
2057
2051
|
}, [t]);
|
|
2058
|
-
const
|
|
2059
|
-
(
|
|
2060
|
-
|
|
2052
|
+
const y = M(
|
|
2053
|
+
(p) => {
|
|
2054
|
+
f((P) => {
|
|
2061
2055
|
const R = new Set(P);
|
|
2062
|
-
return R.has(
|
|
2056
|
+
return R.has(p.id) ? (R.delete(p.id), u == null || u(p, !1)) : (R.add(p.id), u == null || u(p, !0)), R;
|
|
2063
2057
|
});
|
|
2064
2058
|
},
|
|
2065
2059
|
[u]
|
|
2066
2060
|
), E = M(() => {
|
|
2067
|
-
|
|
2068
|
-
const P = new Set(
|
|
2061
|
+
f((p) => {
|
|
2062
|
+
const P = new Set(p), R = t ?? [], B = R.every(
|
|
2069
2063
|
(_) => P.has(_.id)
|
|
2070
2064
|
);
|
|
2071
2065
|
return R.forEach((_) => {
|
|
@@ -2076,19 +2070,19 @@ function Bn(e) {
|
|
|
2076
2070
|
}, [t, u]), k = F(() => {
|
|
2077
2071
|
if (!(t != null && t.length))
|
|
2078
2072
|
return { allSelected: !1, hasSomeSelected: !1 };
|
|
2079
|
-
const
|
|
2080
|
-
return { allSelected:
|
|
2081
|
-
}, [t,
|
|
2073
|
+
const p = t.every((R) => m.has(R.id)), P = t.some((R) => m.has(R.id));
|
|
2074
|
+
return { allSelected: p, hasSomeSelected: P };
|
|
2075
|
+
}, [t, m]);
|
|
2082
2076
|
K(() => {
|
|
2083
|
-
h && h(
|
|
2084
|
-
}, [
|
|
2085
|
-
const x = F(() => !a || !
|
|
2077
|
+
h && h(v);
|
|
2078
|
+
}, [v, h]);
|
|
2079
|
+
const x = F(() => !a || !v.length ? [] : v.reduce((p, P, R) => {
|
|
2086
2080
|
const B = a(P).filter(
|
|
2087
2081
|
(z) => z.multiple && !z.hidden
|
|
2088
2082
|
);
|
|
2089
2083
|
if (R === 0)
|
|
2090
2084
|
return B;
|
|
2091
|
-
const _ = new Map(
|
|
2085
|
+
const _ = new Map(p.map((z) => [z.id, z]));
|
|
2092
2086
|
return B.reduce((z, ee) => {
|
|
2093
2087
|
const te = _.get(ee.id);
|
|
2094
2088
|
return te && z.push({
|
|
@@ -2097,36 +2091,36 @@ function Bn(e) {
|
|
|
2097
2091
|
disabled: ee.disabled || te.disabled
|
|
2098
2092
|
}), z;
|
|
2099
2093
|
}, []);
|
|
2100
|
-
}, []), [a,
|
|
2101
|
-
(
|
|
2102
|
-
if (
|
|
2103
|
-
if (
|
|
2104
|
-
|
|
2094
|
+
}, []), [a, v]), A = M(
|
|
2095
|
+
(p) => {
|
|
2096
|
+
if (v.length) {
|
|
2097
|
+
if (p.onMultipleClick) {
|
|
2098
|
+
p.onMultipleClick(v);
|
|
2105
2099
|
return;
|
|
2106
2100
|
}
|
|
2107
|
-
|
|
2101
|
+
v.forEach((P) => p.onClick(P));
|
|
2108
2102
|
}
|
|
2109
2103
|
},
|
|
2110
|
-
[
|
|
2104
|
+
[v]
|
|
2111
2105
|
);
|
|
2112
|
-
return /* @__PURE__ */ c(pn, { children: /* @__PURE__ */
|
|
2106
|
+
return /* @__PURE__ */ c(pn, { children: /* @__PURE__ */ N("div", { className: `${l} table-main`, children: [
|
|
2113
2107
|
/* @__PURE__ */ c(Rn, { columns: o, isLoading: s, ...b }),
|
|
2114
|
-
s ? /* @__PURE__ */ c(dn, { className: "table-loading" }) : /* @__PURE__ */ c(le, { children:
|
|
2115
|
-
!!
|
|
2116
|
-
/* @__PURE__ */ c("p", { className: "table-selection-bar-count", children:
|
|
2117
|
-
count:
|
|
2108
|
+
s ? /* @__PURE__ */ c(dn, { className: "table-loading" }) : /* @__PURE__ */ c(le, { children: C ? /* @__PURE__ */ c(bn, {}) : /* @__PURE__ */ N(le, { children: [
|
|
2109
|
+
!!v.length && /* @__PURE__ */ N("div", { className: "table-selection-bar", children: [
|
|
2110
|
+
/* @__PURE__ */ c("p", { className: "table-selection-bar-count", children: g("_accessibility:components.table.selectedCount", {
|
|
2111
|
+
count: v.length
|
|
2118
2112
|
}) }),
|
|
2119
|
-
x.length > 0 && /* @__PURE__ */ c("div", { className: "table-selection-bar-actions", children: x.map((
|
|
2113
|
+
x.length > 0 && /* @__PURE__ */ c("div", { className: "table-selection-bar-actions", children: x.map((p) => /* @__PURE__ */ c(lt, { content: p.tooltip, children: /* @__PURE__ */ c(
|
|
2120
2114
|
"button",
|
|
2121
2115
|
{
|
|
2122
2116
|
type: "button",
|
|
2123
|
-
onClick: () => A(
|
|
2124
|
-
disabled:
|
|
2125
|
-
children:
|
|
2117
|
+
onClick: () => A(p),
|
|
2118
|
+
disabled: p.disabled,
|
|
2119
|
+
children: p.icon
|
|
2126
2120
|
}
|
|
2127
|
-
) },
|
|
2121
|
+
) }, p.id)) })
|
|
2128
2122
|
] }),
|
|
2129
|
-
/* @__PURE__ */ c("div", { className: `${i} table-body`, children: /* @__PURE__ */
|
|
2123
|
+
/* @__PURE__ */ c("div", { className: `${i} table-body`, children: /* @__PURE__ */ N("table", { className: "table-content", children: [
|
|
2130
2124
|
/* @__PURE__ */ c(
|
|
2131
2125
|
mn,
|
|
2132
2126
|
{
|
|
@@ -2145,8 +2139,8 @@ function Bn(e) {
|
|
|
2145
2139
|
actions: a,
|
|
2146
2140
|
columns: o,
|
|
2147
2141
|
softDeleteProperty: d,
|
|
2148
|
-
selectedRows:
|
|
2149
|
-
onRowSelectionChange:
|
|
2142
|
+
selectedRows: m,
|
|
2143
|
+
onRowSelectionChange: y
|
|
2150
2144
|
}
|
|
2151
2145
|
) })
|
|
2152
2146
|
] }) }),
|
|
@@ -2156,7 +2150,7 @@ function Bn(e) {
|
|
|
2156
2150
|
}
|
|
2157
2151
|
function lt(e) {
|
|
2158
2152
|
const { content: t, children: r, className: n = "" } = e;
|
|
2159
|
-
return /* @__PURE__ */
|
|
2153
|
+
return /* @__PURE__ */ N("div", { className: `tooltip-container ${n}`, children: [
|
|
2160
2154
|
r,
|
|
2161
2155
|
/* @__PURE__ */ c("div", { className: "tooltip-text", children: t })
|
|
2162
2156
|
] });
|
|
@@ -2172,7 +2166,7 @@ function X(e) {
|
|
|
2172
2166
|
className: i = "",
|
|
2173
2167
|
textClassName: l = ""
|
|
2174
2168
|
} = e;
|
|
2175
|
-
return /* @__PURE__ */
|
|
2169
|
+
return /* @__PURE__ */ N("div", { className: `chip-main ${a} ${i}`, children: [
|
|
2176
2170
|
/* @__PURE__ */ c("span", { className: l, children: t }),
|
|
2177
2171
|
n,
|
|
2178
2172
|
r ? /* @__PURE__ */ c(
|