@tech-diefra/fluig-ui 1.2.28 → 1.2.30
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/Attachment/index.d.ts +2 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +384 -381
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as g, jsx as t, Fragment as U } from "react/jsx-runtime";
|
|
2
|
-
import { memo as
|
|
2
|
+
import { memo as O, useMemo as T, useCallback as S, useState as M, useRef as B, useEffect as D, forwardRef as K } from "react";
|
|
3
3
|
import { useFormContext as W, useController as I, useFormState as ee } from "react-hook-form";
|
|
4
4
|
import { IMaskInput as te } from "react-imask";
|
|
5
|
-
import { useSection as E, useFluigRuntime as
|
|
5
|
+
import { useSection as E, useFluigRuntime as j } from "@fluig-kit/ecm";
|
|
6
6
|
import ne, { registerLocale as ae } from "react-datepicker";
|
|
7
7
|
import { parse as re, isValid as se, format as ie } from "date-fns";
|
|
8
8
|
const oe = {
|
|
@@ -16,225 +16,225 @@ function le({
|
|
|
16
16
|
label: r = "",
|
|
17
17
|
placeholder: a = "",
|
|
18
18
|
type: c = "text",
|
|
19
|
-
mask:
|
|
19
|
+
mask: o,
|
|
20
20
|
className: l = "",
|
|
21
21
|
forceReadOnly: s = !1,
|
|
22
22
|
forceHidden: n = !1
|
|
23
23
|
}) {
|
|
24
|
-
const { isReadOnly:
|
|
25
|
-
() =>
|
|
26
|
-
[
|
|
27
|
-
),
|
|
28
|
-
if (!
|
|
29
|
-
const d =
|
|
24
|
+
const { isReadOnly: b, isHidden: u } = E(), m = s || !!b(e), y = n || !!u(e), { control: k } = W(), { isView: R } = j(), { field: w } = I({ name: e, control: k }), { errors: v } = ee({ name: e }), p = v == null ? void 0 : v[e], C = T(
|
|
25
|
+
() => o ? oe[o] ?? o : null,
|
|
26
|
+
[o]
|
|
27
|
+
), P = S((i) => {
|
|
28
|
+
if (!i) return "";
|
|
29
|
+
const d = i.replace(/\D/g, "");
|
|
30
30
|
return (Number(d) / 100).toLocaleString("pt-BR", {
|
|
31
31
|
style: "currency",
|
|
32
32
|
currency: "BRL"
|
|
33
33
|
});
|
|
34
|
-
}, []),
|
|
35
|
-
(
|
|
36
|
-
[c,
|
|
34
|
+
}, []), h = S(
|
|
35
|
+
(i) => c === "monetary" ? P(i) : i,
|
|
36
|
+
[c, P]
|
|
37
37
|
);
|
|
38
|
-
return
|
|
38
|
+
return R ? /* @__PURE__ */ g("div", { className: "form-group", children: [
|
|
39
39
|
/* @__PURE__ */ t("label", { children: r }),
|
|
40
|
-
/* @__PURE__ */ t("span", { className: "form-control", children:
|
|
41
|
-
] }) : /* @__PURE__ */ g("div", { className: `form-group ${
|
|
40
|
+
/* @__PURE__ */ t("span", { className: "form-control", children: w.value || "-" })
|
|
41
|
+
] }) : /* @__PURE__ */ g("div", { className: `form-group ${y ? "hidden" : ""}`, children: [
|
|
42
42
|
/* @__PURE__ */ t("label", { children: r }),
|
|
43
|
-
|
|
43
|
+
C ? /* @__PURE__ */ t(
|
|
44
44
|
te,
|
|
45
45
|
{
|
|
46
46
|
name: e,
|
|
47
|
-
mask:
|
|
48
|
-
value: String(
|
|
47
|
+
mask: C,
|
|
48
|
+
value: String(w.value ?? ""),
|
|
49
49
|
unmask: !1,
|
|
50
|
-
onAccept: (
|
|
50
|
+
onAccept: (i) => w.onChange(h(i)),
|
|
51
51
|
placeholder: a,
|
|
52
|
-
readOnly:
|
|
53
|
-
className: `form-control ${
|
|
54
|
-
inputRef:
|
|
55
|
-
onBlur:
|
|
52
|
+
readOnly: m,
|
|
53
|
+
className: `form-control ${p ? "border-red" : ""} ${l}`,
|
|
54
|
+
inputRef: w.ref,
|
|
55
|
+
onBlur: w.onBlur
|
|
56
56
|
}
|
|
57
57
|
) : /* @__PURE__ */ t(
|
|
58
58
|
"input",
|
|
59
59
|
{
|
|
60
|
-
...
|
|
60
|
+
...w,
|
|
61
61
|
type: "text",
|
|
62
|
-
value:
|
|
63
|
-
onChange: (
|
|
62
|
+
value: w.value ?? "",
|
|
63
|
+
onChange: (i) => w.onChange(h(i.target.value)),
|
|
64
64
|
placeholder: a,
|
|
65
|
-
readOnly:
|
|
66
|
-
className: `form-control ${
|
|
65
|
+
readOnly: m,
|
|
66
|
+
className: `form-control ${p ? "border-red" : ""} ${l}`
|
|
67
67
|
}
|
|
68
68
|
),
|
|
69
|
-
|
|
69
|
+
p && /* @__PURE__ */ t("p", { className: "text-danger", children: String(p.message) })
|
|
70
70
|
] });
|
|
71
71
|
}
|
|
72
|
-
const it =
|
|
72
|
+
const it = O(le);
|
|
73
73
|
function ce({
|
|
74
74
|
name: e,
|
|
75
75
|
label: r = "",
|
|
76
76
|
options: a = [],
|
|
77
77
|
placeholder: c = "",
|
|
78
|
-
labelKey:
|
|
78
|
+
labelKey: o = "label",
|
|
79
79
|
valueKey: l = "value",
|
|
80
80
|
enableSearch: s = !1,
|
|
81
81
|
searchPlaceholder: n = "Buscar...",
|
|
82
|
-
loading:
|
|
82
|
+
loading: b = !1,
|
|
83
83
|
onSearchChange: u,
|
|
84
|
-
debounceTime:
|
|
85
|
-
onSelect:
|
|
86
|
-
forceReadOnly:
|
|
87
|
-
forceHidden:
|
|
84
|
+
debounceTime: m = 300,
|
|
85
|
+
onSelect: y,
|
|
86
|
+
forceReadOnly: k = !1,
|
|
87
|
+
forceHidden: R = !1
|
|
88
88
|
}) {
|
|
89
|
-
const { isReadOnly:
|
|
90
|
-
field: { onChange: d, value:
|
|
91
|
-
fieldState: { error:
|
|
89
|
+
const { isReadOnly: w, isHidden: v } = E(), p = k || !!w(e), C = R || !!v(e), { control: P, clearErrors: h } = W(), { isView: i } = j(), {
|
|
90
|
+
field: { onChange: d, value: f, ref: _ },
|
|
91
|
+
fieldState: { error: N }
|
|
92
92
|
} = I({
|
|
93
93
|
name: e,
|
|
94
|
-
control:
|
|
95
|
-
}), [
|
|
96
|
-
|
|
94
|
+
control: P
|
|
95
|
+
}), [$, A] = M(!1), [V, G] = M(""), L = B(null), z = B(u);
|
|
96
|
+
D(() => {
|
|
97
97
|
z.current = u;
|
|
98
|
-
}, [u]),
|
|
99
|
-
const
|
|
98
|
+
}, [u]), D(() => {
|
|
99
|
+
const x = (F) => {
|
|
100
100
|
L.current && !L.current.contains(F.target) && A(!1);
|
|
101
101
|
};
|
|
102
|
-
return document.addEventListener("mousedown",
|
|
103
|
-
}, []),
|
|
104
|
-
|
|
105
|
-
}, [
|
|
102
|
+
return document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
|
|
103
|
+
}, []), D(() => {
|
|
104
|
+
$ || G("");
|
|
105
|
+
}, [$]), D(() => {
|
|
106
106
|
if (!s) return;
|
|
107
|
-
const
|
|
107
|
+
const x = setTimeout(() => {
|
|
108
108
|
z.current && z.current(V);
|
|
109
|
-
},
|
|
110
|
-
return () => clearTimeout(
|
|
111
|
-
}, [V, s,
|
|
112
|
-
const Q =
|
|
113
|
-
(
|
|
114
|
-
) : a ?? [], [a, s, u, V,
|
|
115
|
-
if (
|
|
116
|
-
if (typeof
|
|
117
|
-
return String(
|
|
118
|
-
const
|
|
119
|
-
(F) => String(F == null ? void 0 : F[l]) === String(
|
|
109
|
+
}, m);
|
|
110
|
+
return () => clearTimeout(x);
|
|
111
|
+
}, [V, s, m]);
|
|
112
|
+
const Q = T(() => s && !u && V.trim() ? a.filter(
|
|
113
|
+
(x) => String((x == null ? void 0 : x[o]) ?? "").toLowerCase().includes(V.toLowerCase())
|
|
114
|
+
) : a ?? [], [a, s, u, V, o]), J = T(() => {
|
|
115
|
+
if (f == null) return "";
|
|
116
|
+
if (typeof f == "object")
|
|
117
|
+
return String(f[l] ?? "");
|
|
118
|
+
const x = (a || []).find(
|
|
119
|
+
(F) => String(F == null ? void 0 : F[l]) === String(f)
|
|
120
120
|
);
|
|
121
|
-
return String(
|
|
122
|
-
}, [
|
|
123
|
-
|
|
121
|
+
return String(x ? (x == null ? void 0 : x[o]) ?? "" : f);
|
|
122
|
+
}, [f, a, l, o]), Z = (x) => {
|
|
123
|
+
p || (d(x[l]), y && y(x), h(e), A(!1));
|
|
124
124
|
};
|
|
125
125
|
return /* @__PURE__ */ g(
|
|
126
126
|
"div",
|
|
127
127
|
{
|
|
128
|
-
className: `select-wrapper form-group ${
|
|
128
|
+
className: `select-wrapper form-group ${C ? "hidden" : ""}`,
|
|
129
129
|
ref: L,
|
|
130
130
|
children: [
|
|
131
131
|
/* @__PURE__ */ t("label", { className: "control-label", children: r }),
|
|
132
|
-
|
|
132
|
+
i ? /* @__PURE__ */ t("span", { className: "form-control", children: J || "-" }) : /* @__PURE__ */ g(U, { children: [
|
|
133
133
|
/* @__PURE__ */ g(
|
|
134
134
|
"div",
|
|
135
135
|
{
|
|
136
|
-
className: `select-control ${
|
|
137
|
-
onClick: () => !
|
|
138
|
-
ref:
|
|
136
|
+
className: `select-control ${N ? "border-red" : ""} ${p ? "readOnly" : ""}`,
|
|
137
|
+
onClick: () => !p && A((x) => !x),
|
|
138
|
+
ref: _,
|
|
139
139
|
children: [
|
|
140
|
-
/* @__PURE__ */ t("span", { className: `select-display ${
|
|
140
|
+
/* @__PURE__ */ t("span", { className: `select-display ${p ? "readOnly" : ""}`, children: J || c }),
|
|
141
141
|
/* @__PURE__ */ t("i", { className: "flaticon flaticon-chevron-down select-icon" })
|
|
142
142
|
]
|
|
143
143
|
}
|
|
144
144
|
),
|
|
145
|
-
|
|
145
|
+
$ && !p && /* @__PURE__ */ g("div", { className: "select-dropdown", children: [
|
|
146
146
|
s && /* @__PURE__ */ t("div", { className: "select-search", children: /* @__PURE__ */ t(
|
|
147
147
|
"input",
|
|
148
148
|
{
|
|
149
149
|
type: "text",
|
|
150
150
|
className: "select-search-input",
|
|
151
151
|
value: V,
|
|
152
|
-
onChange: (
|
|
153
|
-
placeholder:
|
|
152
|
+
onChange: (x) => G(x.target.value),
|
|
153
|
+
placeholder: b ? "Carregando..." : n,
|
|
154
154
|
autoFocus: !0,
|
|
155
|
-
onClick: (
|
|
155
|
+
onClick: (x) => x.stopPropagation()
|
|
156
156
|
}
|
|
157
157
|
) }),
|
|
158
|
-
/* @__PURE__ */ t("ul", { className: "select-options", children:
|
|
158
|
+
/* @__PURE__ */ t("ul", { className: "select-options", children: b ? /* @__PURE__ */ t("li", { className: "select-option readOnly", children: "Carregando..." }) : Q.length > 0 ? Q.map((x) => /* @__PURE__ */ t(
|
|
159
159
|
"li",
|
|
160
160
|
{
|
|
161
|
-
onClick: () => Z(
|
|
161
|
+
onClick: () => Z(x),
|
|
162
162
|
className: "select-option handleHover",
|
|
163
|
-
children:
|
|
163
|
+
children: x[o]
|
|
164
164
|
},
|
|
165
|
-
|
|
165
|
+
x[l]
|
|
166
166
|
)) : /* @__PURE__ */ t("li", { className: "select-option readOnly", children: "Sem resultados" }) })
|
|
167
167
|
] })
|
|
168
168
|
] }),
|
|
169
|
-
/* @__PURE__ */ t("input", { type: "hidden", name: e, value:
|
|
170
|
-
|
|
169
|
+
/* @__PURE__ */ t("input", { type: "hidden", name: e, value: f || "" }),
|
|
170
|
+
N && /* @__PURE__ */ t("p", { className: "text-danger", children: String(N.message) })
|
|
171
171
|
]
|
|
172
172
|
}
|
|
173
173
|
);
|
|
174
174
|
}
|
|
175
|
-
const ot =
|
|
175
|
+
const ot = O(ce);
|
|
176
176
|
function lt({
|
|
177
177
|
name: e,
|
|
178
178
|
options: r = [],
|
|
179
179
|
label: a = "",
|
|
180
180
|
valueKey: c = "value",
|
|
181
|
-
labelKey:
|
|
181
|
+
labelKey: o = "label",
|
|
182
182
|
forceReadOnly: l = !1,
|
|
183
183
|
forceHidden: s = !1
|
|
184
184
|
}) {
|
|
185
|
-
var
|
|
186
|
-
const n = W(), { isView:
|
|
185
|
+
var f, _;
|
|
186
|
+
const n = W(), { isView: b, isReadOnly: u } = j(), { isReadOnly: m, isHidden: y } = E(), k = m ? m(e) : !1, R = y ? y(e) : !1, w = l || k, v = s || R, p = w || u || b;
|
|
187
187
|
if (!n || !e)
|
|
188
188
|
return console.error("Checkbox requer contexto de formulário e nome."), null;
|
|
189
|
-
const
|
|
190
|
-
const A =
|
|
191
|
-
return
|
|
192
|
-
}, {}),
|
|
193
|
-
|
|
194
|
-
const
|
|
195
|
-
(!
|
|
189
|
+
const C = () => !r || !n ? {} : r.reduce((N, $) => {
|
|
190
|
+
const A = $[c], V = n.getValues(A);
|
|
191
|
+
return N[A] = V === "on", N;
|
|
192
|
+
}, {}), P = n.watch(e), h = T(() => P && typeof P == "object" ? P : C(), [P, r, c]);
|
|
193
|
+
D(() => {
|
|
194
|
+
const N = n.getValues(e);
|
|
195
|
+
(!N || typeof N != "object") && n.setValue(e, h, {
|
|
196
196
|
shouldDirty: !1,
|
|
197
197
|
shouldValidate: !1
|
|
198
198
|
});
|
|
199
|
-
}, [
|
|
200
|
-
const
|
|
201
|
-
if (
|
|
202
|
-
const A = { ...
|
|
199
|
+
}, [h, e, n]);
|
|
200
|
+
const i = (N, $) => {
|
|
201
|
+
if (p) return;
|
|
202
|
+
const A = { ...h, [N]: $ };
|
|
203
203
|
n.setValue(e, A, {
|
|
204
204
|
shouldDirty: !0,
|
|
205
205
|
shouldValidate: !0
|
|
206
|
-
}), n.setValue(
|
|
207
|
-
}, d = (
|
|
208
|
-
return /* @__PURE__ */ g("div", { className: `form-group ${
|
|
206
|
+
}), n.setValue(N, $ ? "on" : "", { shouldValidate: !1 });
|
|
207
|
+
}, d = (_ = (f = n.formState) == null ? void 0 : f.errors) == null ? void 0 : _[e];
|
|
208
|
+
return /* @__PURE__ */ g("div", { className: `form-group ${v ? "hidden" : ""}`, children: [
|
|
209
209
|
a && /* @__PURE__ */ t("label", { children: a }),
|
|
210
210
|
/* @__PURE__ */ t(
|
|
211
211
|
"div",
|
|
212
212
|
{
|
|
213
|
-
className: `checkbox-group-custom ${
|
|
214
|
-
children: r.map((
|
|
215
|
-
const
|
|
213
|
+
className: `checkbox-group-custom ${p ? "readOnly" : ""}`,
|
|
214
|
+
children: r.map((N) => {
|
|
215
|
+
const $ = String(N[c]), A = h[$] === !0;
|
|
216
216
|
return /* @__PURE__ */ g("div", { children: [
|
|
217
|
-
/* @__PURE__ */ t("input", { type: "hidden", ...n.register(
|
|
217
|
+
/* @__PURE__ */ t("input", { type: "hidden", ...n.register($) }),
|
|
218
218
|
/* @__PURE__ */ g(
|
|
219
219
|
"label",
|
|
220
220
|
{
|
|
221
|
-
className: `custom-checkbox ${A ? "checked" : ""} ${
|
|
221
|
+
className: `custom-checkbox ${A ? "checked" : ""} ${p ? "readOnly" : ""}`,
|
|
222
222
|
children: [
|
|
223
223
|
/* @__PURE__ */ t(
|
|
224
224
|
"input",
|
|
225
225
|
{
|
|
226
226
|
type: "checkbox",
|
|
227
227
|
checked: A,
|
|
228
|
-
disabled:
|
|
229
|
-
onChange: (V) =>
|
|
228
|
+
disabled: p,
|
|
229
|
+
onChange: (V) => i($, V.target.checked)
|
|
230
230
|
}
|
|
231
231
|
),
|
|
232
232
|
/* @__PURE__ */ t("span", { className: "checkmark" }),
|
|
233
|
-
/* @__PURE__ */ t("span", { children:
|
|
233
|
+
/* @__PURE__ */ t("span", { children: N[o] })
|
|
234
234
|
]
|
|
235
235
|
}
|
|
236
236
|
)
|
|
237
|
-
] },
|
|
237
|
+
] }, $);
|
|
238
238
|
})
|
|
239
239
|
}
|
|
240
240
|
),
|
|
@@ -246,38 +246,38 @@ function de({
|
|
|
246
246
|
label: r = "",
|
|
247
247
|
options: a = [],
|
|
248
248
|
valueKey: c = "value",
|
|
249
|
-
labelKey:
|
|
249
|
+
labelKey: o = "label",
|
|
250
250
|
iconKey: l = "icon",
|
|
251
251
|
forceReadOnly: s = !1,
|
|
252
252
|
forceHidden: n = !1
|
|
253
253
|
}) {
|
|
254
|
-
const { isReadOnly:
|
|
255
|
-
field:
|
|
256
|
-
fieldState: { error:
|
|
254
|
+
const { isReadOnly: b, isHidden: u } = E(), m = s || !!b(e), y = n || !!u(e), { control: k } = W(), { isView: R, isReadOnly: w } = j(), {
|
|
255
|
+
field: v,
|
|
256
|
+
fieldState: { error: p }
|
|
257
257
|
} = I({
|
|
258
258
|
name: e,
|
|
259
|
-
control:
|
|
260
|
-
}),
|
|
261
|
-
(
|
|
262
|
-
|
|
259
|
+
control: k
|
|
260
|
+
}), C = m || w || R, P = v.value ?? "", h = S(
|
|
261
|
+
(i) => {
|
|
262
|
+
C || v.onChange(i);
|
|
263
263
|
},
|
|
264
|
-
[
|
|
264
|
+
[C, v]
|
|
265
265
|
);
|
|
266
|
-
return /* @__PURE__ */ g("div", { className: `form-group column ${
|
|
266
|
+
return /* @__PURE__ */ g("div", { className: `form-group column ${y ? "hidden" : ""}`, children: [
|
|
267
267
|
r && /* @__PURE__ */ t("label", { className: "control-label", children: r }),
|
|
268
268
|
/* @__PURE__ */ t(
|
|
269
269
|
"div",
|
|
270
270
|
{
|
|
271
|
-
className: `btn-group ${
|
|
271
|
+
className: `btn-group ${C ? "view-mode" : ""}`,
|
|
272
272
|
"data-field-name": e,
|
|
273
|
-
children: a.map((
|
|
274
|
-
const d =
|
|
273
|
+
children: a.map((i) => {
|
|
274
|
+
const d = i[c], f = P === d, _ = i.color ? { "--customColor": i.color } : void 0;
|
|
275
275
|
return /* @__PURE__ */ g(
|
|
276
276
|
"label",
|
|
277
277
|
{
|
|
278
278
|
htmlFor: `${e}_${d}`,
|
|
279
|
-
style:
|
|
280
|
-
className: `btn fs-ellipsis ${
|
|
279
|
+
style: _,
|
|
280
|
+
className: `btn fs-ellipsis ${f ? "active" : ""}`,
|
|
281
281
|
children: [
|
|
282
282
|
/* @__PURE__ */ t(
|
|
283
283
|
"input",
|
|
@@ -286,15 +286,15 @@ function de({
|
|
|
286
286
|
id: `${e}_${d}`,
|
|
287
287
|
name: e,
|
|
288
288
|
value: d,
|
|
289
|
-
checked:
|
|
289
|
+
checked: f,
|
|
290
290
|
className: "hidden",
|
|
291
|
-
onChange: () =>
|
|
292
|
-
disabled:
|
|
291
|
+
onChange: () => h(d),
|
|
292
|
+
disabled: C
|
|
293
293
|
}
|
|
294
294
|
),
|
|
295
|
-
|
|
295
|
+
i[l] && /* @__PURE__ */ t("i", { className: `${i[l]} icon-sm` }),
|
|
296
296
|
" ",
|
|
297
|
-
o
|
|
297
|
+
i[o]
|
|
298
298
|
]
|
|
299
299
|
},
|
|
300
300
|
d
|
|
@@ -302,46 +302,46 @@ function de({
|
|
|
302
302
|
})
|
|
303
303
|
}
|
|
304
304
|
),
|
|
305
|
-
|
|
305
|
+
p && /* @__PURE__ */ t("p", { className: "text-danger", children: String(p.message) })
|
|
306
306
|
] });
|
|
307
307
|
}
|
|
308
|
-
const ct =
|
|
308
|
+
const ct = O(de), ue = ({
|
|
309
309
|
name: e,
|
|
310
310
|
label: r = "",
|
|
311
311
|
placeholder: a = "",
|
|
312
312
|
className: c = "",
|
|
313
|
-
rows:
|
|
313
|
+
rows: o = 4,
|
|
314
314
|
maxLength: l,
|
|
315
315
|
forceReadOnly: s = !1,
|
|
316
316
|
forceHidden: n = !1
|
|
317
317
|
}) => {
|
|
318
|
-
const { isReadOnly:
|
|
319
|
-
field:
|
|
320
|
-
fieldState: { error:
|
|
318
|
+
const { isReadOnly: b, isHidden: u } = E(), m = s || !!b(e), y = n || !!u(e), { control: k } = W(), { isView: R } = j(), {
|
|
319
|
+
field: w,
|
|
320
|
+
fieldState: { error: v }
|
|
321
321
|
} = I({
|
|
322
322
|
name: e,
|
|
323
|
-
control:
|
|
323
|
+
control: k
|
|
324
324
|
});
|
|
325
|
-
return
|
|
325
|
+
return R ? /* @__PURE__ */ g("div", { className: `form-group ${y ? "hidden" : ""}`, children: [
|
|
326
326
|
/* @__PURE__ */ t("label", { children: r }),
|
|
327
|
-
/* @__PURE__ */ t("span", { className: "form-control", children:
|
|
328
|
-
] }) : /* @__PURE__ */ g("div", { className: `form-group ${
|
|
327
|
+
/* @__PURE__ */ t("span", { className: "form-control", children: w.value || "-" })
|
|
328
|
+
] }) : /* @__PURE__ */ g("div", { className: `form-group ${y ? "hidden" : ""}`, children: [
|
|
329
329
|
/* @__PURE__ */ t("label", { children: r }),
|
|
330
330
|
/* @__PURE__ */ t(
|
|
331
331
|
"textarea",
|
|
332
332
|
{
|
|
333
|
-
...
|
|
334
|
-
rows:
|
|
333
|
+
...w,
|
|
334
|
+
rows: o,
|
|
335
335
|
maxLength: l,
|
|
336
|
-
value:
|
|
336
|
+
value: w.value || "",
|
|
337
337
|
placeholder: a,
|
|
338
|
-
readOnly:
|
|
339
|
-
className: `form-control ${
|
|
338
|
+
readOnly: m,
|
|
339
|
+
className: `form-control ${v ? "border-red" : ""} ${c}`
|
|
340
340
|
}
|
|
341
341
|
),
|
|
342
|
-
|
|
342
|
+
v && /* @__PURE__ */ t("p", { className: "text-danger", children: String(v.message) })
|
|
343
343
|
] });
|
|
344
|
-
}, dt =
|
|
344
|
+
}, dt = O(ue);
|
|
345
345
|
function X(e) {
|
|
346
346
|
return (r = {}) => {
|
|
347
347
|
const a = r.width ? String(r.width) : e.defaultWidth;
|
|
@@ -351,34 +351,34 @@ function X(e) {
|
|
|
351
351
|
function H(e) {
|
|
352
352
|
return (r, a) => {
|
|
353
353
|
const c = a != null && a.context ? String(a.context) : "standalone";
|
|
354
|
-
let
|
|
354
|
+
let o;
|
|
355
355
|
if (c === "formatting" && e.formattingValues) {
|
|
356
356
|
const s = e.defaultFormattingWidth || e.defaultWidth, n = a != null && a.width ? String(a.width) : s;
|
|
357
|
-
|
|
357
|
+
o = e.formattingValues[n] || e.formattingValues[s];
|
|
358
358
|
} else {
|
|
359
359
|
const s = e.defaultWidth, n = a != null && a.width ? String(a.width) : e.defaultWidth;
|
|
360
|
-
|
|
360
|
+
o = e.values[n] || e.values[s];
|
|
361
361
|
}
|
|
362
362
|
const l = e.argumentCallback ? e.argumentCallback(r) : r;
|
|
363
|
-
return
|
|
363
|
+
return o[l];
|
|
364
364
|
};
|
|
365
365
|
}
|
|
366
366
|
function q(e) {
|
|
367
367
|
return (r, a = {}) => {
|
|
368
|
-
const c = a.width,
|
|
368
|
+
const c = a.width, o = c && e.matchPatterns[c] || e.matchPatterns[e.defaultMatchWidth], l = r.match(o);
|
|
369
369
|
if (!l)
|
|
370
370
|
return null;
|
|
371
|
-
const s = l[0], n = c && e.parsePatterns[c] || e.parsePatterns[e.defaultParseWidth],
|
|
371
|
+
const s = l[0], n = c && e.parsePatterns[c] || e.parsePatterns[e.defaultParseWidth], b = Array.isArray(n) ? he(n, (y) => y.test(s)) : (
|
|
372
372
|
// [TODO] -- I challenge you to fix the type
|
|
373
|
-
me(n, (
|
|
373
|
+
me(n, (y) => y.test(s))
|
|
374
374
|
);
|
|
375
375
|
let u;
|
|
376
|
-
u = e.valueCallback ? e.valueCallback(
|
|
376
|
+
u = e.valueCallback ? e.valueCallback(b) : b, u = a.valueCallback ? (
|
|
377
377
|
// [TODO] -- I challenge you to fix the type
|
|
378
378
|
a.valueCallback(u)
|
|
379
379
|
) : u;
|
|
380
|
-
const
|
|
381
|
-
return { value: u, rest:
|
|
380
|
+
const m = r.slice(s.length);
|
|
381
|
+
return { value: u, rest: m };
|
|
382
382
|
};
|
|
383
383
|
}
|
|
384
384
|
function me(e, r) {
|
|
@@ -395,11 +395,11 @@ function fe(e) {
|
|
|
395
395
|
return (r, a = {}) => {
|
|
396
396
|
const c = r.match(e.matchPattern);
|
|
397
397
|
if (!c) return null;
|
|
398
|
-
const
|
|
398
|
+
const o = c[0], l = r.match(e.parsePattern);
|
|
399
399
|
if (!l) return null;
|
|
400
400
|
let s = e.valueCallback ? e.valueCallback(l[0]) : l[0];
|
|
401
401
|
s = a.valueCallback ? a.valueCallback(s) : s;
|
|
402
|
-
const n = r.slice(
|
|
402
|
+
const n = r.slice(o.length);
|
|
403
403
|
return { value: s, rest: n };
|
|
404
404
|
};
|
|
405
405
|
}
|
|
@@ -467,8 +467,8 @@ const ge = {
|
|
|
467
467
|
}
|
|
468
468
|
}, be = (e, r, a) => {
|
|
469
469
|
let c;
|
|
470
|
-
const
|
|
471
|
-
return typeof
|
|
470
|
+
const o = ge[e];
|
|
471
|
+
return typeof o == "string" ? c = o : r === 1 ? c = o.one : c = o.other.replace("{{count}}", String(r)), a != null && a.addSuffix ? a.comparison && a.comparison > 0 ? "em " + c : "há " + c : c;
|
|
472
472
|
}, ve = {
|
|
473
473
|
full: "EEEE, d 'de' MMMM 'de' y",
|
|
474
474
|
long: "d 'de' MMMM 'de' y",
|
|
@@ -508,8 +508,8 @@ const ge = {
|
|
|
508
508
|
nextWeek: "eeee 'às' p",
|
|
509
509
|
other: "P"
|
|
510
510
|
}, ke = (e, r, a, c) => {
|
|
511
|
-
const
|
|
512
|
-
return typeof
|
|
511
|
+
const o = we[e];
|
|
512
|
+
return typeof o == "function" ? o(r) : o;
|
|
513
513
|
}, Ce = {
|
|
514
514
|
narrow: ["AC", "DC"],
|
|
515
515
|
abbreviated: ["AC", "DC"],
|
|
@@ -659,20 +659,20 @@ const ge = {
|
|
|
659
659
|
formattingValues: $e,
|
|
660
660
|
defaultFormattingWidth: "wide"
|
|
661
661
|
})
|
|
662
|
-
}, Ve = /^(\d+)[ºªo]?/i,
|
|
662
|
+
}, Ve = /^(\d+)[ºªo]?/i, De = /\d+/i, We = {
|
|
663
663
|
narrow: /^(ac|dc|a|d)/i,
|
|
664
664
|
abbreviated: /^(a\.?\s?c\.?|d\.?\s?c\.?)/i,
|
|
665
665
|
wide: /^(antes de cristo|depois de cristo)/i
|
|
666
|
-
},
|
|
666
|
+
}, Me = {
|
|
667
667
|
any: [/^ac/i, /^dc/i],
|
|
668
668
|
wide: [/^antes de cristo/i, /^depois de cristo/i]
|
|
669
|
-
},
|
|
669
|
+
}, je = {
|
|
670
670
|
narrow: /^[1234]/i,
|
|
671
671
|
abbreviated: /^T[1234]/i,
|
|
672
672
|
wide: /^[1234](º)? trimestre/i
|
|
673
|
-
}, je = {
|
|
674
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
675
673
|
}, Te = {
|
|
674
|
+
any: [/1/i, /2/i, /3/i, /4/i]
|
|
675
|
+
}, Oe = {
|
|
676
676
|
narrow: /^[jfmajsond]/i,
|
|
677
677
|
abbreviated: /^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,
|
|
678
678
|
wide: /^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i
|
|
@@ -731,24 +731,24 @@ const ge = {
|
|
|
731
731
|
}, Be = {
|
|
732
732
|
ordinalNumber: fe({
|
|
733
733
|
matchPattern: Ve,
|
|
734
|
-
parsePattern:
|
|
734
|
+
parsePattern: De,
|
|
735
735
|
valueCallback: (e) => parseInt(e, 10)
|
|
736
736
|
}),
|
|
737
737
|
era: q({
|
|
738
738
|
matchPatterns: We,
|
|
739
739
|
defaultMatchWidth: "wide",
|
|
740
|
-
parsePatterns:
|
|
740
|
+
parsePatterns: Me,
|
|
741
741
|
defaultParseWidth: "any"
|
|
742
742
|
}),
|
|
743
743
|
quarter: q({
|
|
744
|
-
matchPatterns:
|
|
744
|
+
matchPatterns: je,
|
|
745
745
|
defaultMatchWidth: "wide",
|
|
746
|
-
parsePatterns:
|
|
746
|
+
parsePatterns: Te,
|
|
747
747
|
defaultParseWidth: "any",
|
|
748
748
|
valueCallback: (e) => e + 1
|
|
749
749
|
}),
|
|
750
750
|
month: q({
|
|
751
|
-
matchPatterns:
|
|
751
|
+
matchPatterns: Oe,
|
|
752
752
|
defaultMatchWidth: "wide",
|
|
753
753
|
parsePatterns: Ie,
|
|
754
754
|
defaultParseWidth: "any"
|
|
@@ -783,14 +783,14 @@ const Y = "dd/MM/yyyy", ze = (e) => {
|
|
|
783
783
|
const r = re(e, Y, /* @__PURE__ */ new Date());
|
|
784
784
|
return se(r) ? r : null;
|
|
785
785
|
}, Xe = (e) => e ? ie(e, Y) : "", Ue = K(
|
|
786
|
-
({ shimRef: e, className: r, name: a, ...c },
|
|
786
|
+
({ shimRef: e, className: r, name: a, ...c }, o) => /* @__PURE__ */ t(
|
|
787
787
|
"input",
|
|
788
788
|
{
|
|
789
789
|
name: a,
|
|
790
790
|
...c,
|
|
791
791
|
className: r,
|
|
792
792
|
ref: (l) => {
|
|
793
|
-
typeof
|
|
793
|
+
typeof o == "function" ? o(l) : o && (o.current = l), e && e(l);
|
|
794
794
|
}
|
|
795
795
|
}
|
|
796
796
|
)
|
|
@@ -799,177 +799,177 @@ const Y = "dd/MM/yyyy", ze = (e) => {
|
|
|
799
799
|
label: r = "",
|
|
800
800
|
placeholder: a = "dd/mm/aaaa",
|
|
801
801
|
className: c = "",
|
|
802
|
-
forceReadOnly:
|
|
802
|
+
forceReadOnly: o = !1,
|
|
803
803
|
forceHidden: l = !1
|
|
804
804
|
}) => {
|
|
805
|
-
const { control: s } = W(), { isView: n } =
|
|
806
|
-
field: { onChange:
|
|
807
|
-
fieldState: { error:
|
|
805
|
+
const { control: s } = W(), { isView: n } = j(), { isReadOnly: b, isHidden: u } = E(), m = o || !!b(e), y = l || !!u(e), {
|
|
806
|
+
field: { onChange: k, onBlur: R, value: w, ref: v },
|
|
807
|
+
fieldState: { error: p }
|
|
808
808
|
} = I({
|
|
809
809
|
name: e,
|
|
810
810
|
control: s
|
|
811
|
-
}),
|
|
812
|
-
(
|
|
813
|
-
|
|
811
|
+
}), C = T(() => ze(w), [w]), P = S(
|
|
812
|
+
(i) => {
|
|
813
|
+
k(i ? Xe(i) : "");
|
|
814
814
|
},
|
|
815
|
-
[
|
|
816
|
-
),
|
|
817
|
-
(
|
|
818
|
-
var d,
|
|
819
|
-
if (
|
|
820
|
-
const
|
|
821
|
-
|
|
815
|
+
[k]
|
|
816
|
+
), h = S(
|
|
817
|
+
(i) => {
|
|
818
|
+
var d, f;
|
|
819
|
+
if (v(i), i && ((f = (d = s._fields) == null ? void 0 : d[e]) != null && f._f)) {
|
|
820
|
+
const _ = s._fields[e];
|
|
821
|
+
_._f.ref = {
|
|
822
822
|
focus: () => {
|
|
823
|
-
var
|
|
824
|
-
return (
|
|
823
|
+
var N;
|
|
824
|
+
return (N = i.focus) == null ? void 0 : N.call(i);
|
|
825
825
|
},
|
|
826
826
|
select: () => {
|
|
827
|
-
var
|
|
828
|
-
return (
|
|
827
|
+
var N;
|
|
828
|
+
return (N = i.select) == null ? void 0 : N.call(i);
|
|
829
829
|
},
|
|
830
|
-
setCustomValidity: (
|
|
831
|
-
var
|
|
832
|
-
return (
|
|
830
|
+
setCustomValidity: (N) => {
|
|
831
|
+
var $;
|
|
832
|
+
return ($ = i.setCustomValidity) == null ? void 0 : $.call(i, N);
|
|
833
833
|
},
|
|
834
834
|
reportValidity: () => {
|
|
835
|
-
var
|
|
836
|
-
return (
|
|
835
|
+
var N;
|
|
836
|
+
return (N = i.reportValidity) == null ? void 0 : N.call(i);
|
|
837
837
|
}
|
|
838
838
|
};
|
|
839
839
|
}
|
|
840
840
|
},
|
|
841
|
-
[
|
|
841
|
+
[v, s, e]
|
|
842
842
|
);
|
|
843
|
-
return
|
|
843
|
+
return y ? null : n ? /* @__PURE__ */ g("div", { className: "form-group", children: [
|
|
844
844
|
/* @__PURE__ */ t("label", { children: r }),
|
|
845
|
-
/* @__PURE__ */ t("span", { className: "form-control", children:
|
|
845
|
+
/* @__PURE__ */ t("span", { className: "form-control", children: w || "-" })
|
|
846
846
|
] }) : /* @__PURE__ */ g("div", { className: `form-group fluig-style-guide ${c}`, children: [
|
|
847
847
|
r && /* @__PURE__ */ t("label", { className: "control-label", htmlFor: e, children: r }),
|
|
848
|
-
/* @__PURE__ */ t("div", { className: `${
|
|
848
|
+
/* @__PURE__ */ t("div", { className: `${p ? "border-red" : ""}`, children: /* @__PURE__ */ t(
|
|
849
849
|
ne,
|
|
850
850
|
{
|
|
851
851
|
id: e,
|
|
852
852
|
name: e,
|
|
853
|
-
selected:
|
|
854
|
-
onChange:
|
|
855
|
-
onBlur:
|
|
853
|
+
selected: C,
|
|
854
|
+
onChange: P,
|
|
855
|
+
onBlur: R,
|
|
856
856
|
dateFormat: Y,
|
|
857
857
|
placeholderText: a,
|
|
858
|
-
disabled:
|
|
859
|
-
readOnly:
|
|
858
|
+
disabled: m,
|
|
859
|
+
readOnly: m,
|
|
860
860
|
locale: "pt-BR",
|
|
861
|
-
className: `form-control ${
|
|
861
|
+
className: `form-control ${p ? "border-red" : ""}`,
|
|
862
862
|
wrapperClassName: "w-100",
|
|
863
863
|
showMonthDropdown: !0,
|
|
864
864
|
showYearDropdown: !0,
|
|
865
865
|
dropdownMode: "select",
|
|
866
|
-
isClearable: !
|
|
866
|
+
isClearable: !m && !!w,
|
|
867
867
|
autoComplete: "off",
|
|
868
|
-
customInput: /* @__PURE__ */ t(Ue, { name: e, shimRef:
|
|
868
|
+
customInput: /* @__PURE__ */ t(Ue, { name: e, shimRef: h })
|
|
869
869
|
}
|
|
870
870
|
) }),
|
|
871
|
-
|
|
871
|
+
p && /* @__PURE__ */ t("span", { className: "help-block text-danger", children: String(p.message) })
|
|
872
872
|
] });
|
|
873
|
-
}, ut =
|
|
873
|
+
}, ut = O(Ye);
|
|
874
874
|
function Ge({
|
|
875
875
|
mapping: e = {},
|
|
876
876
|
defaultLabel: r = "Não reconhecido",
|
|
877
877
|
className: a = "",
|
|
878
878
|
hidden: c = !1,
|
|
879
|
-
label:
|
|
879
|
+
label: o
|
|
880
880
|
}) {
|
|
881
|
-
const { activityId: l } =
|
|
881
|
+
const { activityId: l } = j(), s = T(() => !e || l === null || l === void 0 ? null : e[l], [l, e]);
|
|
882
882
|
if (!s)
|
|
883
883
|
return /* @__PURE__ */ g("div", { className: `form-group ${c ? "hidden" : ""}`, children: [
|
|
884
|
-
|
|
884
|
+
o && /* @__PURE__ */ t("label", { children: o }),
|
|
885
885
|
/* @__PURE__ */ t("div", { className: `status-badge default ${a}`, children: r })
|
|
886
886
|
] });
|
|
887
887
|
const n = {
|
|
888
888
|
"--customColor": s.color
|
|
889
889
|
};
|
|
890
890
|
return /* @__PURE__ */ g("div", { className: `form-group ${c ? "hidden" : ""}`, children: [
|
|
891
|
-
|
|
891
|
+
o && /* @__PURE__ */ t("label", { children: o }),
|
|
892
892
|
/* @__PURE__ */ g("div", { className: `status-badge ${a}`, style: n, children: [
|
|
893
893
|
s.icon && /* @__PURE__ */ t("i", { className: s.icon }),
|
|
894
894
|
/* @__PURE__ */ t("span", { children: s.label })
|
|
895
895
|
] })
|
|
896
896
|
] });
|
|
897
897
|
}
|
|
898
|
-
const mt =
|
|
898
|
+
const mt = O(Ge);
|
|
899
899
|
function Qe({
|
|
900
900
|
name: e,
|
|
901
901
|
control: r,
|
|
902
902
|
defaultRowValue: a,
|
|
903
903
|
isView: c,
|
|
904
|
-
isReadOnly:
|
|
904
|
+
isReadOnly: o,
|
|
905
905
|
filters: l = []
|
|
906
906
|
}) {
|
|
907
|
-
const { field: s } = I({ name: e, control: r }), [n,
|
|
907
|
+
const { field: s } = I({ name: e, control: r }), [n, b] = M([]), [u, m] = M([]), y = () => Date.now() + Math.random(), k = (i) => {
|
|
908
908
|
try {
|
|
909
|
-
const d = JSON.parse(
|
|
910
|
-
return Array.isArray(d) ? d.map((
|
|
911
|
-
...
|
|
912
|
-
_uid:
|
|
909
|
+
const d = JSON.parse(i);
|
|
910
|
+
return Array.isArray(d) ? d.map((f) => ({
|
|
911
|
+
...f,
|
|
912
|
+
_uid: f._uid || y()
|
|
913
913
|
})) : [];
|
|
914
914
|
} catch (d) {
|
|
915
915
|
return console.error(`Erro ao ler dados da tabela "${e}":`, d), [];
|
|
916
916
|
}
|
|
917
917
|
};
|
|
918
|
-
|
|
918
|
+
D(() => {
|
|
919
919
|
if (!(n.length > 0 && !c) && s.value && typeof s.value == "string") {
|
|
920
|
-
const
|
|
921
|
-
if (s.value ===
|
|
922
|
-
const d =
|
|
923
|
-
|
|
920
|
+
const i = JSON.stringify(n);
|
|
921
|
+
if (s.value === i) return;
|
|
922
|
+
const d = k(s.value);
|
|
923
|
+
b(d);
|
|
924
924
|
}
|
|
925
|
-
}, [s.value, c]),
|
|
926
|
-
if (
|
|
927
|
-
const
|
|
928
|
-
s.value !==
|
|
929
|
-
}, [n, s,
|
|
930
|
-
const
|
|
931
|
-
const
|
|
932
|
-
|
|
933
|
-
}, [a]),
|
|
934
|
-
|
|
935
|
-
(
|
|
936
|
-
),
|
|
937
|
-
}, [u]),
|
|
938
|
-
(
|
|
939
|
-
|
|
940
|
-
(
|
|
941
|
-
(
|
|
925
|
+
}, [s.value, c]), D(() => {
|
|
926
|
+
if (o) return;
|
|
927
|
+
const i = JSON.stringify(n);
|
|
928
|
+
s.value !== i && s.onChange(i);
|
|
929
|
+
}, [n, s, o]);
|
|
930
|
+
const R = S(() => {
|
|
931
|
+
const i = { _uid: y(), ...a };
|
|
932
|
+
b((d) => [...d, i]);
|
|
933
|
+
}, [a]), w = S(() => {
|
|
934
|
+
b(
|
|
935
|
+
(i) => i.filter((d) => !u.includes(d._uid))
|
|
936
|
+
), m([]);
|
|
937
|
+
}, [u]), v = S(
|
|
938
|
+
(i, d, f) => {
|
|
939
|
+
b(
|
|
940
|
+
(_) => _.map(
|
|
941
|
+
(N) => N._uid === i ? { ...N, [d]: f } : N
|
|
942
942
|
)
|
|
943
943
|
);
|
|
944
944
|
},
|
|
945
945
|
[]
|
|
946
|
-
),
|
|
947
|
-
|
|
948
|
-
(d) => d.includes(
|
|
946
|
+
), p = S((i) => {
|
|
947
|
+
m(
|
|
948
|
+
(d) => d.includes(i) ? d.filter((f) => f !== i) : [...d, i]
|
|
949
949
|
);
|
|
950
|
-
}, []),
|
|
951
|
-
(
|
|
952
|
-
|
|
950
|
+
}, []), C = S(
|
|
951
|
+
(i) => {
|
|
952
|
+
m(i ? n.map((d) => d._uid) : []);
|
|
953
953
|
},
|
|
954
954
|
[n]
|
|
955
|
-
),
|
|
956
|
-
(
|
|
955
|
+
), P = n.length > 0 && u.length === n.length, h = T(() => !l || l.length === 0 ? n : n.filter(
|
|
956
|
+
(i) => l.every((d) => {
|
|
957
957
|
if ("custom" in d)
|
|
958
|
-
return d.custom(
|
|
959
|
-
const
|
|
958
|
+
return d.custom(i);
|
|
959
|
+
const f = i[d.field];
|
|
960
960
|
switch (d.operator) {
|
|
961
961
|
case "===":
|
|
962
|
-
return
|
|
962
|
+
return f === d.value;
|
|
963
963
|
case "!==":
|
|
964
|
-
return
|
|
964
|
+
return f !== d.value;
|
|
965
965
|
case ">":
|
|
966
|
-
return
|
|
966
|
+
return f > d.value;
|
|
967
967
|
case "<":
|
|
968
|
-
return
|
|
968
|
+
return f < d.value;
|
|
969
969
|
case ">=":
|
|
970
|
-
return
|
|
970
|
+
return f >= d.value;
|
|
971
971
|
case "<=":
|
|
972
|
-
return
|
|
972
|
+
return f <= d.value;
|
|
973
973
|
default:
|
|
974
974
|
return !0;
|
|
975
975
|
}
|
|
@@ -978,15 +978,15 @@ function Qe({
|
|
|
978
978
|
return {
|
|
979
979
|
field: s,
|
|
980
980
|
tableRows: n,
|
|
981
|
-
visibleRows:
|
|
981
|
+
visibleRows: h,
|
|
982
982
|
selectedRowIds: u,
|
|
983
|
-
isAllSelected:
|
|
983
|
+
isAllSelected: P,
|
|
984
984
|
handle: {
|
|
985
|
-
addRow:
|
|
986
|
-
removeRows:
|
|
987
|
-
updateCellValue:
|
|
988
|
-
toggleSelection:
|
|
989
|
-
toggleSelectAll:
|
|
985
|
+
addRow: R,
|
|
986
|
+
removeRows: w,
|
|
987
|
+
updateCellValue: v,
|
|
988
|
+
toggleSelection: p,
|
|
989
|
+
toggleSelectAll: C
|
|
990
990
|
}
|
|
991
991
|
};
|
|
992
992
|
}
|
|
@@ -995,94 +995,94 @@ const ht = ({
|
|
|
995
995
|
title: r = "Tabela Dinâmica",
|
|
996
996
|
columns: a,
|
|
997
997
|
defaultRowValue: c = {},
|
|
998
|
-
forceReadOnly:
|
|
998
|
+
forceReadOnly: o = !1,
|
|
999
999
|
layout: l = "fluid",
|
|
1000
1000
|
actions: s = !0,
|
|
1001
1001
|
filters: n = []
|
|
1002
1002
|
}) => {
|
|
1003
|
-
const { control:
|
|
1003
|
+
const { control: b } = W(), { isView: u, isReadOnly: m } = j(), { isReadOnly: y } = E(), k = o || u || m || y && y(e), { field: R, visibleRows: w, selectedRowIds: v, isAllSelected: p, handle: C } = Qe({
|
|
1004
1004
|
name: e,
|
|
1005
|
-
control:
|
|
1005
|
+
control: b,
|
|
1006
1006
|
defaultRowValue: c,
|
|
1007
1007
|
isView: u,
|
|
1008
|
-
isReadOnly: !!
|
|
1008
|
+
isReadOnly: !!k,
|
|
1009
1009
|
filters: n
|
|
1010
|
-
}),
|
|
1011
|
-
return /* @__PURE__ */ g("div", { className: `table-wrapper ${
|
|
1012
|
-
/* @__PURE__ */ t("input", { type: "hidden", ...
|
|
1010
|
+
}), P = l === "fixed";
|
|
1011
|
+
return /* @__PURE__ */ g("div", { className: `table-wrapper ${P ? "table-fixed" : "table-fluid"}`, children: [
|
|
1012
|
+
/* @__PURE__ */ t("input", { type: "hidden", ...R }),
|
|
1013
1013
|
/* @__PURE__ */ g("div", { className: "header-handle", children: [
|
|
1014
1014
|
/* @__PURE__ */ t("h3", { children: r }),
|
|
1015
|
-
!
|
|
1015
|
+
!k && s && /* @__PURE__ */ g("div", { className: "handle-actions", children: [
|
|
1016
1016
|
/* @__PURE__ */ g(
|
|
1017
1017
|
"button",
|
|
1018
1018
|
{
|
|
1019
1019
|
type: "button",
|
|
1020
|
-
className: `btn ${
|
|
1021
|
-
disabled:
|
|
1022
|
-
onClick:
|
|
1020
|
+
className: `btn ${v.length > 0 ? "btn-danger" : ""}`,
|
|
1021
|
+
disabled: v.length === 0,
|
|
1022
|
+
onClick: C.removeRows,
|
|
1023
1023
|
children: [
|
|
1024
1024
|
"Remover (",
|
|
1025
|
-
|
|
1025
|
+
v.length,
|
|
1026
1026
|
")"
|
|
1027
1027
|
]
|
|
1028
1028
|
}
|
|
1029
1029
|
),
|
|
1030
|
-
/* @__PURE__ */ t("button", { type: "button", className: "btn-add", onClick:
|
|
1030
|
+
/* @__PURE__ */ t("button", { type: "button", className: "btn-add", onClick: C.addRow, children: "Adicionar" })
|
|
1031
1031
|
] })
|
|
1032
1032
|
] }),
|
|
1033
1033
|
/* @__PURE__ */ t("div", { className: "table-scroll", children: /* @__PURE__ */ g("table", { className: "table-custom", children: [
|
|
1034
1034
|
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ g("tr", { children: [
|
|
1035
|
-
!
|
|
1035
|
+
!k && /* @__PURE__ */ t("th", { style: { width: "50px" }, children: /* @__PURE__ */ t(
|
|
1036
1036
|
"input",
|
|
1037
1037
|
{
|
|
1038
1038
|
type: "checkbox",
|
|
1039
|
-
checked:
|
|
1040
|
-
onChange: (
|
|
1039
|
+
checked: p,
|
|
1040
|
+
onChange: (h) => C.toggleSelectAll(h.target.checked)
|
|
1041
1041
|
}
|
|
1042
1042
|
) }),
|
|
1043
|
-
a.map((
|
|
1043
|
+
a.map((h) => /* @__PURE__ */ t(
|
|
1044
1044
|
"th",
|
|
1045
1045
|
{
|
|
1046
|
-
style:
|
|
1047
|
-
children:
|
|
1046
|
+
style: h.width ? { minWidth: P ? h.width : "100%" } : { width: "max-content" },
|
|
1047
|
+
children: h.label
|
|
1048
1048
|
},
|
|
1049
|
-
|
|
1049
|
+
h.key
|
|
1050
1050
|
))
|
|
1051
1051
|
] }) }),
|
|
1052
1052
|
/* @__PURE__ */ g("tbody", { children: [
|
|
1053
|
-
|
|
1054
|
-
!
|
|
1053
|
+
w.map((h, i) => /* @__PURE__ */ g("tr", { children: [
|
|
1054
|
+
!k && /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(
|
|
1055
1055
|
"input",
|
|
1056
1056
|
{
|
|
1057
1057
|
type: "checkbox",
|
|
1058
|
-
checked:
|
|
1059
|
-
onChange: () =>
|
|
1058
|
+
checked: v.includes(h._uid),
|
|
1059
|
+
onChange: () => C.toggleSelection(h._uid)
|
|
1060
1060
|
}
|
|
1061
1061
|
) }),
|
|
1062
1062
|
a.map((d) => /* @__PURE__ */ t("td", { children: d.render ? d.render.length <= 1 ? d.render({
|
|
1063
|
-
row:
|
|
1064
|
-
index:
|
|
1065
|
-
updateRow: (
|
|
1066
|
-
isLocked: !!
|
|
1063
|
+
row: h,
|
|
1064
|
+
index: i,
|
|
1065
|
+
updateRow: (f, _) => C.updateCellValue(h._uid, f, _),
|
|
1066
|
+
isLocked: !!k,
|
|
1067
1067
|
isView: !!u
|
|
1068
1068
|
}) : d.render(
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
(
|
|
1072
|
-
!!
|
|
1069
|
+
h,
|
|
1070
|
+
i,
|
|
1071
|
+
(f, _) => C.updateCellValue(h._uid, f, _),
|
|
1072
|
+
!!k,
|
|
1073
1073
|
!!u
|
|
1074
|
-
) :
|
|
1075
|
-
] },
|
|
1076
|
-
|
|
1074
|
+
) : h[d.key] }, `${h._uid}-${d.key}`))
|
|
1075
|
+
] }, h._uid)),
|
|
1076
|
+
w.length === 0 && /* @__PURE__ */ t("tr", { className: "empty-row", children: /* @__PURE__ */ t("td", { colSpan: 100, className: "text-center", children: k ? "Nenhum registro encontrado." : "Nenhum registro." }) })
|
|
1077
1077
|
] })
|
|
1078
1078
|
] }) })
|
|
1079
1079
|
] });
|
|
1080
1080
|
}, Je = (e, r) => {
|
|
1081
|
-
const [a, c] =
|
|
1081
|
+
const [a, c] = M(null), { watch: o } = W(), l = r !== void 0 ? r : o(e), s = S(() => {
|
|
1082
1082
|
try {
|
|
1083
|
-
const
|
|
1084
|
-
if (
|
|
1085
|
-
const u =
|
|
1083
|
+
const b = window.top.__REACT_ATTACHMENT_BRIDGE__;
|
|
1084
|
+
if (b) {
|
|
1085
|
+
const u = b.getAttachment(e, l);
|
|
1086
1086
|
c(u || (l ? { name: l, documentId: 0 } : null));
|
|
1087
1087
|
} else
|
|
1088
1088
|
c(l ? { name: l, documentId: 0 } : null);
|
|
@@ -1090,7 +1090,7 @@ const ht = ({
|
|
|
1090
1090
|
c(l ? { name: l, documentId: 0 } : null);
|
|
1091
1091
|
}
|
|
1092
1092
|
}, [e, l, r]);
|
|
1093
|
-
return
|
|
1093
|
+
return D(() => {
|
|
1094
1094
|
s();
|
|
1095
1095
|
const n = setInterval(s, 2e3);
|
|
1096
1096
|
return () => clearInterval(n);
|
|
@@ -1100,123 +1100,126 @@ const ht = ({
|
|
|
1100
1100
|
label: r,
|
|
1101
1101
|
help: a,
|
|
1102
1102
|
valueManual: c,
|
|
1103
|
-
onChangeManual:
|
|
1103
|
+
onChangeManual: o,
|
|
1104
|
+
readOnly: l
|
|
1104
1105
|
}) => {
|
|
1105
|
-
const [
|
|
1106
|
-
var
|
|
1106
|
+
const [s, n] = M(!1), { control: b } = W(), { field: u } = I({ name: e, control: b }), { attachment: m, sync: y } = Je(e, c), k = () => {
|
|
1107
|
+
var h;
|
|
1107
1108
|
try {
|
|
1108
|
-
const
|
|
1109
|
+
const i = window.top;
|
|
1109
1110
|
return {
|
|
1110
|
-
bridge:
|
|
1111
|
-
toast: (
|
|
1111
|
+
bridge: i.__REACT_ATTACHMENT_BRIDGE__,
|
|
1112
|
+
toast: (h = i.FLUIGC) == null ? void 0 : h.toast
|
|
1112
1113
|
};
|
|
1113
1114
|
} catch {
|
|
1114
1115
|
return { bridge: null, toast: null };
|
|
1115
1116
|
}
|
|
1116
|
-
},
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1117
|
+
}, R = S(() => {
|
|
1118
|
+
if (l) return;
|
|
1119
|
+
const h = document.createElement("input");
|
|
1120
|
+
h.type = "file", h.onchange = (i) => {
|
|
1121
|
+
const d = i.target.files[0];
|
|
1122
|
+
if (!d) return;
|
|
1123
|
+
const { bridge: f, toast: _ } = k();
|
|
1124
|
+
n(!0), f ? f.upload(d, e, (N) => {
|
|
1125
|
+
o ? o(N.name) : u.onChange(N.name), setTimeout(() => {
|
|
1126
|
+
n(!1), y();
|
|
1127
|
+
}, 1e3), _ && _({
|
|
1126
1128
|
title: "Sucesso",
|
|
1127
1129
|
message: "Arquivo enviado",
|
|
1128
1130
|
type: "success"
|
|
1129
1131
|
});
|
|
1130
|
-
}) : (
|
|
1131
|
-
},
|
|
1132
|
-
}, [e,
|
|
1133
|
-
|
|
1134
|
-
const
|
|
1135
|
-
if (!
|
|
1136
|
-
const { bridge:
|
|
1137
|
-
|
|
1132
|
+
}) : (o ? o(d.name) : u.onChange(d.name), n(!1));
|
|
1133
|
+
}, h.click();
|
|
1134
|
+
}, [e, u, y, o, l]), w = (h) => {
|
|
1135
|
+
if (h.stopPropagation(), l) return;
|
|
1136
|
+
const i = (m == null ? void 0 : m.name) || c || u.value;
|
|
1137
|
+
if (!i) return;
|
|
1138
|
+
const { bridge: d, toast: f } = k();
|
|
1139
|
+
d ? d.removeByFileName(i) ? (o ? o("") : u.onChange(""), y()) : f && f({
|
|
1138
1140
|
title: "Erro",
|
|
1139
1141
|
message: "Erro ao remover anexo",
|
|
1140
1142
|
type: "danger"
|
|
1141
|
-
}) : (
|
|
1142
|
-
},
|
|
1143
|
+
}) : (o ? o("") : u.onChange(""), y());
|
|
1144
|
+
}, v = !!m && !s, p = (m == null ? void 0 : m.name) || c || u.value, C = [
|
|
1143
1145
|
"fluig-attachment__box",
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
+
v ? "fluig-attachment__box--has-file" : "",
|
|
1147
|
+
s ? "fluig-attachment__box--uploading" : ""
|
|
1146
1148
|
].join(" ");
|
|
1147
1149
|
return /* @__PURE__ */ g("div", { className: "form-group fluig-attachment", children: [
|
|
1148
1150
|
r && /* @__PURE__ */ t("label", { className: "fluig-attachment__label", children: r }),
|
|
1149
1151
|
/* @__PURE__ */ g(
|
|
1150
1152
|
"div",
|
|
1151
1153
|
{
|
|
1152
|
-
className:
|
|
1154
|
+
className: C,
|
|
1155
|
+
style: l && !v ? { pointerEvents: "none", opacity: 0.6, cursor: "not-allowed" } : {},
|
|
1153
1156
|
onClick: () => {
|
|
1154
|
-
if (
|
|
1155
|
-
const
|
|
1156
|
-
|
|
1157
|
+
if (v) {
|
|
1158
|
+
const h = k();
|
|
1159
|
+
h.bridge && p && h.bridge.view(p);
|
|
1157
1160
|
} else
|
|
1158
|
-
|
|
1161
|
+
R();
|
|
1159
1162
|
},
|
|
1160
1163
|
children: [
|
|
1161
1164
|
/* @__PURE__ */ g("span", { className: "fluig-attachment__content", children: [
|
|
1162
1165
|
/* @__PURE__ */ t(
|
|
1163
1166
|
"i",
|
|
1164
1167
|
{
|
|
1165
|
-
className: `fluigicon icon-sm ${
|
|
1168
|
+
className: `fluigicon icon-sm ${s ? "fluigicon-loop-test" : v ? "fluigicon-file-pdf" : "fluigicon-paperclip"} fluig-attachment__icon`
|
|
1166
1169
|
}
|
|
1167
1170
|
),
|
|
1168
|
-
/* @__PURE__ */ t("span", { className: "fluig-attachment__filename", children:
|
|
1171
|
+
/* @__PURE__ */ t("span", { className: "fluig-attachment__filename", children: s ? " Enviando..." : v ? p : l ? "Nenhum arquivo" : a || "Anexar" })
|
|
1169
1172
|
] }),
|
|
1170
|
-
|
|
1173
|
+
v && !l && /* @__PURE__ */ t(
|
|
1171
1174
|
"button",
|
|
1172
1175
|
{
|
|
1173
1176
|
type: "button",
|
|
1174
1177
|
className: "fluig-attachment__btn-remove btn btn-link text-danger",
|
|
1175
|
-
onClick:
|
|
1178
|
+
onClick: w,
|
|
1176
1179
|
children: /* @__PURE__ */ t("i", { className: "flaticon flaticon-trash icon-sm", "aria-hidden": "true" })
|
|
1177
1180
|
}
|
|
1178
1181
|
)
|
|
1179
1182
|
]
|
|
1180
1183
|
}
|
|
1181
1184
|
),
|
|
1182
|
-
!
|
|
1185
|
+
!o && /* @__PURE__ */ t("input", { type: "hidden", name: e, value: u.value || "" })
|
|
1183
1186
|
] });
|
|
1184
|
-
}, ft =
|
|
1187
|
+
}, ft = O(Ze);
|
|
1185
1188
|
function gt({
|
|
1186
1189
|
items: e,
|
|
1187
1190
|
time: r = 0,
|
|
1188
1191
|
showNavigation: a = !0,
|
|
1189
1192
|
progressBar: c = !0
|
|
1190
1193
|
}) {
|
|
1191
|
-
const [
|
|
1192
|
-
l((
|
|
1193
|
-
}, [e.length]),
|
|
1194
|
-
l((
|
|
1194
|
+
const [o, l] = M(0), [s, n] = M(0), b = B(null), u = B(null), m = S(() => {
|
|
1195
|
+
l((v) => (v + 1) % e.length), n(0);
|
|
1196
|
+
}, [e.length]), y = S(() => {
|
|
1197
|
+
l((v) => (v - 1 + e.length) % e.length), n(0);
|
|
1195
1198
|
}, [e.length]);
|
|
1196
|
-
if (
|
|
1199
|
+
if (D(() => {
|
|
1197
1200
|
if (r > 0 && e.length > 1) {
|
|
1198
|
-
const
|
|
1199
|
-
|
|
1200
|
-
n((
|
|
1201
|
+
const p = 100 / r * 100;
|
|
1202
|
+
b.current = setInterval(m, r), u.current = setInterval(() => {
|
|
1203
|
+
n((C) => C >= 100 ? 0 : C + p);
|
|
1201
1204
|
}, 100);
|
|
1202
1205
|
}
|
|
1203
1206
|
return () => {
|
|
1204
|
-
|
|
1207
|
+
b.current && clearInterval(b.current), u.current && clearInterval(u.current);
|
|
1205
1208
|
};
|
|
1206
|
-
}, [r,
|
|
1207
|
-
const
|
|
1209
|
+
}, [r, m, e.length, o]), !e || e.length === 0) return null;
|
|
1210
|
+
const k = e[o], R = typeof k == "string" ? k : k.url, w = /\.(jpg|jpeg|png|gif|webp)$/i.test(R);
|
|
1208
1211
|
return /* @__PURE__ */ g("div", { className: "carousel-root", children: [
|
|
1209
1212
|
/* @__PURE__ */ g("div", { className: "carousel-viewport", children: [
|
|
1210
1213
|
a && e.length > 1 && /* @__PURE__ */ g(U, { children: [
|
|
1211
|
-
/* @__PURE__ */ t("button", { className: "nav-btn prev", onClick:
|
|
1212
|
-
/* @__PURE__ */ t("button", { className: "nav-btn next", onClick:
|
|
1214
|
+
/* @__PURE__ */ t("button", { className: "nav-btn prev", onClick: y, children: /* @__PURE__ */ t("i", { className: "flaticon flaticon-chevron-left" }) }),
|
|
1215
|
+
/* @__PURE__ */ t("button", { className: "nav-btn next", onClick: m, children: /* @__PURE__ */ t("i", { className: "flaticon flaticon-chevron-right" }) })
|
|
1213
1216
|
] }),
|
|
1214
|
-
/* @__PURE__ */ t("div", { className: "carousel-media", children:
|
|
1217
|
+
/* @__PURE__ */ t("div", { className: "carousel-media", children: w ? /* @__PURE__ */ t("img", { src: R, alt: "Slide", className: "carousel-image" }) : /* @__PURE__ */ g("div", { className: "carousel-file-fallback", children: [
|
|
1215
1218
|
/* @__PURE__ */ t("i", { className: "flaticon flaticon-file icon-xl" }),
|
|
1216
1219
|
/* @__PURE__ */ t(
|
|
1217
1220
|
"a",
|
|
1218
1221
|
{
|
|
1219
|
-
href:
|
|
1222
|
+
href: R,
|
|
1220
1223
|
target: "_blank",
|
|
1221
1224
|
rel: "noreferrer",
|
|
1222
1225
|
className: "btn-open",
|
|
@@ -1224,15 +1227,15 @@ function gt({
|
|
|
1224
1227
|
}
|
|
1225
1228
|
)
|
|
1226
1229
|
] }) }),
|
|
1227
|
-
e.length > 1 && /* @__PURE__ */ t("div", { className: "carousel-dots", children: e.map((
|
|
1230
|
+
e.length > 1 && /* @__PURE__ */ t("div", { className: "carousel-dots", children: e.map((v, p) => /* @__PURE__ */ t(
|
|
1228
1231
|
"div",
|
|
1229
1232
|
{
|
|
1230
|
-
className: `dot ${
|
|
1233
|
+
className: `dot ${p === o ? "active" : ""}`,
|
|
1231
1234
|
onClick: () => {
|
|
1232
|
-
l(
|
|
1235
|
+
l(p), n(0);
|
|
1233
1236
|
}
|
|
1234
1237
|
},
|
|
1235
|
-
|
|
1238
|
+
p
|
|
1236
1239
|
)) })
|
|
1237
1240
|
] }),
|
|
1238
1241
|
c && r > 0 && e.length > 1 && /* @__PURE__ */ t("div", { className: "carousel-progress-container", children: /* @__PURE__ */ t(
|
|
@@ -1249,17 +1252,17 @@ function bt({
|
|
|
1249
1252
|
isOpen: r,
|
|
1250
1253
|
onOpen: a,
|
|
1251
1254
|
onClose: c,
|
|
1252
|
-
content:
|
|
1255
|
+
content: o,
|
|
1253
1256
|
footer: l,
|
|
1254
1257
|
width: s
|
|
1255
1258
|
}) {
|
|
1256
|
-
const n =
|
|
1257
|
-
(
|
|
1258
|
-
|
|
1259
|
+
const n = S(
|
|
1260
|
+
(b) => {
|
|
1261
|
+
b.key === "Escape" && c();
|
|
1259
1262
|
},
|
|
1260
1263
|
[c]
|
|
1261
1264
|
);
|
|
1262
|
-
return
|
|
1265
|
+
return D(() => (r && (document.addEventListener("keydown", n), a == null || a(), document.body.style.overflow = "hidden"), () => {
|
|
1263
1266
|
document.removeEventListener("keydown", n), document.body.style.overflow = "auto";
|
|
1264
1267
|
}), [r, n, a]), r ? /* @__PURE__ */ t(
|
|
1265
1268
|
"div",
|
|
@@ -1273,7 +1276,7 @@ function bt({
|
|
|
1273
1276
|
{
|
|
1274
1277
|
style: { maxWidth: s },
|
|
1275
1278
|
className: "modal-container",
|
|
1276
|
-
onClick: (
|
|
1279
|
+
onClick: (b) => b.stopPropagation(),
|
|
1277
1280
|
children: [
|
|
1278
1281
|
/* @__PURE__ */ g("div", { className: "modal-header", children: [
|
|
1279
1282
|
/* @__PURE__ */ t("h3", { children: e }),
|
|
@@ -1294,7 +1297,7 @@ function bt({
|
|
|
1294
1297
|
}
|
|
1295
1298
|
)
|
|
1296
1299
|
] }),
|
|
1297
|
-
/* @__PURE__ */ t("div", { className: "modal-content", children:
|
|
1300
|
+
/* @__PURE__ */ t("div", { className: "modal-content", children: o }),
|
|
1298
1301
|
l && /* @__PURE__ */ t("div", { className: "modal-footer", children: l })
|
|
1299
1302
|
]
|
|
1300
1303
|
}
|
|
@@ -1307,24 +1310,24 @@ function vt({
|
|
|
1307
1310
|
childs: r,
|
|
1308
1311
|
footer: a,
|
|
1309
1312
|
contentExternal: c,
|
|
1310
|
-
bg:
|
|
1313
|
+
bg: o,
|
|
1311
1314
|
color: l,
|
|
1312
1315
|
onSelect: s
|
|
1313
1316
|
}) {
|
|
1314
1317
|
return /* @__PURE__ */ g("div", { className: "main-container dfea", children: [
|
|
1315
|
-
/* @__PURE__ */ g("div", { className: "sidebar-wrapper", style: { backgroundColor: `${
|
|
1318
|
+
/* @__PURE__ */ g("div", { className: "sidebar-wrapper", style: { backgroundColor: `${o}` }, children: [
|
|
1316
1319
|
e && /* @__PURE__ */ t("div", { className: "sidebar-logo", children: /* @__PURE__ */ t("img", { src: e, alt: "", width: "auto", height: "28px" }) }),
|
|
1317
1320
|
/* @__PURE__ */ t("ul", { className: "sidebar-childs-content", children: r == null ? void 0 : r.map(
|
|
1318
1321
|
(n) => {
|
|
1319
|
-
var
|
|
1320
|
-
return n != null && n.options && ((
|
|
1322
|
+
var b, u;
|
|
1323
|
+
return n != null && n.options && ((b = n == null ? void 0 : n.options) == null ? void 0 : b.length) > 0 ? /* @__PURE__ */ t(U, { children: /* @__PURE__ */ g("ul", { className: "sidebar-child sidebar-options-content", children: [
|
|
1321
1324
|
/* @__PURE__ */ g(
|
|
1322
1325
|
"li",
|
|
1323
1326
|
{
|
|
1324
1327
|
className: "sidebar-child",
|
|
1325
1328
|
onClick: () => {
|
|
1326
|
-
var
|
|
1327
|
-
(
|
|
1329
|
+
var m;
|
|
1330
|
+
(m = n.action) == null || m.call(n), s == null || s(n.id);
|
|
1328
1331
|
},
|
|
1329
1332
|
style: { color: `${l}` },
|
|
1330
1333
|
children: [
|
|
@@ -1333,16 +1336,16 @@ function vt({
|
|
|
1333
1336
|
]
|
|
1334
1337
|
}
|
|
1335
1338
|
),
|
|
1336
|
-
(u = n.options) == null ? void 0 : u.map((
|
|
1339
|
+
(u = n.options) == null ? void 0 : u.map((m) => /* @__PURE__ */ t(
|
|
1337
1340
|
"li",
|
|
1338
1341
|
{
|
|
1339
1342
|
className: "sidebar-option",
|
|
1340
1343
|
onClick: () => {
|
|
1341
|
-
var
|
|
1342
|
-
(
|
|
1344
|
+
var y;
|
|
1345
|
+
(y = m.action) == null || y.call(m), s == null || s(m.id);
|
|
1343
1346
|
},
|
|
1344
1347
|
style: { color: `${l}` },
|
|
1345
|
-
children:
|
|
1348
|
+
children: m.label
|
|
1346
1349
|
}
|
|
1347
1350
|
))
|
|
1348
1351
|
] }) }) : /* @__PURE__ */ g(
|
|
@@ -1350,8 +1353,8 @@ function vt({
|
|
|
1350
1353
|
{
|
|
1351
1354
|
className: "sidebar-child",
|
|
1352
1355
|
onClick: () => {
|
|
1353
|
-
var
|
|
1354
|
-
(
|
|
1356
|
+
var m;
|
|
1357
|
+
(m = n.action) == null || m.call(n), s == null || s(n.id);
|
|
1355
1358
|
},
|
|
1356
1359
|
style: { color: `${l}` },
|
|
1357
1360
|
children: [
|