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