@tech-diefra/fluig-ui 1.2.25 → 1.2.26
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 +8 -1
- package/dist/Attachment/useFluigAttachment.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +408 -408
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as T, useMemo as j, useCallback as $, useState as
|
|
3
|
-
import { useFormContext as
|
|
1
|
+
import { jsxs as g, jsx as t, Fragment as U } from "react/jsx-runtime";
|
|
2
|
+
import { memo as T, useMemo as j, useCallback as $, useState as D, useRef as B, useEffect as O, forwardRef as K } from "react";
|
|
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 M } from "@fluig-kit/ecm";
|
|
6
6
|
import ne, { registerLocale as ae } from "react-datepicker";
|
|
7
|
-
import { parse as re, isValid as se, format as
|
|
8
|
-
const
|
|
7
|
+
import { parse as re, isValid as se, format as ie } from "date-fns";
|
|
8
|
+
const oe = {
|
|
9
9
|
cpf: "000.000.000-00",
|
|
10
10
|
cnpj: "00.000.000/0000-00",
|
|
11
11
|
telefone: "(00) 00000-0000",
|
|
@@ -16,221 +16,221 @@ function le({
|
|
|
16
16
|
label: r = "",
|
|
17
17
|
placeholder: a = "",
|
|
18
18
|
type: c = "text",
|
|
19
|
-
mask:
|
|
19
|
+
mask: i,
|
|
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: m, isHidden: u } = E(), h = s || !!m(e), w = n || !!u(e), { control: C } = W(), { isView: P } = M(), { field: p } = I({ name: e, control: C }), { errors: N } = ee({ name: e }), y = N == null ? void 0 : N[e], v = j(
|
|
25
|
+
() => i ? oe[i] ?? i : null,
|
|
26
|
+
[i]
|
|
27
|
+
), x = $((o) => {
|
|
28
|
+
if (!o) return "";
|
|
29
|
+
const d = o.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
|
+
}, []), f = $(
|
|
35
|
+
(o) => c === "monetary" ? x(o) : o,
|
|
36
|
+
[c, x]
|
|
37
37
|
);
|
|
38
|
-
return P ? /* @__PURE__ */
|
|
38
|
+
return P ? /* @__PURE__ */ g("div", { className: "form-group", children: [
|
|
39
39
|
/* @__PURE__ */ t("label", { children: r }),
|
|
40
|
-
/* @__PURE__ */ t("span", { className: "form-control", children:
|
|
41
|
-
] }) : /* @__PURE__ */
|
|
40
|
+
/* @__PURE__ */ t("span", { className: "form-control", children: p.value || "-" })
|
|
41
|
+
] }) : /* @__PURE__ */ g("div", { className: `form-group ${w ? "hidden" : ""}`, children: [
|
|
42
42
|
/* @__PURE__ */ t("label", { children: r }),
|
|
43
|
-
|
|
43
|
+
v ? /* @__PURE__ */ t(
|
|
44
44
|
te,
|
|
45
45
|
{
|
|
46
46
|
name: e,
|
|
47
|
-
mask:
|
|
48
|
-
value: String(
|
|
47
|
+
mask: v,
|
|
48
|
+
value: String(p.value ?? ""),
|
|
49
49
|
unmask: !1,
|
|
50
|
-
onAccept: (
|
|
50
|
+
onAccept: (o) => p.onChange(f(o)),
|
|
51
51
|
placeholder: a,
|
|
52
|
-
readOnly:
|
|
53
|
-
className: `form-control ${
|
|
54
|
-
inputRef:
|
|
55
|
-
onBlur:
|
|
52
|
+
readOnly: h,
|
|
53
|
+
className: `form-control ${y ? "border-red" : ""} ${l}`,
|
|
54
|
+
inputRef: p.ref,
|
|
55
|
+
onBlur: p.onBlur
|
|
56
56
|
}
|
|
57
57
|
) : /* @__PURE__ */ t(
|
|
58
58
|
"input",
|
|
59
59
|
{
|
|
60
|
-
...
|
|
60
|
+
...p,
|
|
61
61
|
type: "text",
|
|
62
|
-
value:
|
|
63
|
-
onChange: (
|
|
62
|
+
value: p.value ?? "",
|
|
63
|
+
onChange: (o) => p.onChange(f(o.target.value)),
|
|
64
64
|
placeholder: a,
|
|
65
|
-
readOnly:
|
|
66
|
-
className: `form-control ${
|
|
65
|
+
readOnly: h,
|
|
66
|
+
className: `form-control ${y ? "border-red" : ""} ${l}`
|
|
67
67
|
}
|
|
68
68
|
),
|
|
69
|
-
|
|
69
|
+
y && /* @__PURE__ */ t("p", { className: "text-danger", children: String(y.message) })
|
|
70
70
|
] });
|
|
71
71
|
}
|
|
72
|
-
const
|
|
72
|
+
const it = T(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: i = "label",
|
|
79
79
|
valueKey: l = "value",
|
|
80
80
|
enableSearch: s = !1,
|
|
81
81
|
searchPlaceholder: n = "Buscar...",
|
|
82
|
-
loading:
|
|
82
|
+
loading: m = !1,
|
|
83
83
|
onSearchChange: u,
|
|
84
|
-
debounceTime:
|
|
84
|
+
debounceTime: h = 300,
|
|
85
85
|
onSelect: w,
|
|
86
|
-
forceReadOnly:
|
|
86
|
+
forceReadOnly: C = !1,
|
|
87
87
|
forceHidden: P = !1
|
|
88
88
|
}) {
|
|
89
|
-
const { isReadOnly:
|
|
90
|
-
field: { onChange: d, value:
|
|
91
|
-
fieldState: { error:
|
|
89
|
+
const { isReadOnly: p, isHidden: N } = E(), y = C || !!p(e), v = P || !!N(e), { control: x, clearErrors: f } = W(), { isView: o } = M(), {
|
|
90
|
+
field: { onChange: d, value: b, ref: S },
|
|
91
|
+
fieldState: { error: k }
|
|
92
92
|
} = I({
|
|
93
93
|
name: e,
|
|
94
|
-
control:
|
|
95
|
-
}), [_,
|
|
96
|
-
|
|
94
|
+
control: x
|
|
95
|
+
}), [_, V] = D(!1), [A, G] = D(""), L = B(null), z = B(u);
|
|
96
|
+
O(() => {
|
|
97
97
|
z.current = u;
|
|
98
|
-
}, [u]),
|
|
99
|
-
const
|
|
100
|
-
L.current && !L.current.contains(F.target) &&
|
|
98
|
+
}, [u]), O(() => {
|
|
99
|
+
const R = (F) => {
|
|
100
|
+
L.current && !L.current.contains(F.target) && V(!1);
|
|
101
101
|
};
|
|
102
|
-
return document.addEventListener("mousedown",
|
|
103
|
-
}, []),
|
|
102
|
+
return document.addEventListener("mousedown", R), () => document.removeEventListener("mousedown", R);
|
|
103
|
+
}, []), O(() => {
|
|
104
104
|
_ || G("");
|
|
105
|
-
}, [_]),
|
|
105
|
+
}, [_]), O(() => {
|
|
106
106
|
if (!s) return;
|
|
107
|
-
const
|
|
108
|
-
z.current && z.current(
|
|
109
|
-
},
|
|
110
|
-
return () => clearTimeout(
|
|
111
|
-
}, [
|
|
112
|
-
const Q = j(() => s && !u &&
|
|
113
|
-
(
|
|
114
|
-
) : a ?? [], [a, s, u,
|
|
115
|
-
if (
|
|
116
|
-
if (typeof
|
|
117
|
-
return String(
|
|
118
|
-
const
|
|
119
|
-
(F) => String(F == null ? void 0 : F[l]) === String(
|
|
107
|
+
const R = setTimeout(() => {
|
|
108
|
+
z.current && z.current(A);
|
|
109
|
+
}, h);
|
|
110
|
+
return () => clearTimeout(R);
|
|
111
|
+
}, [A, s, h]);
|
|
112
|
+
const Q = j(() => s && !u && A.trim() ? a.filter(
|
|
113
|
+
(R) => String((R == null ? void 0 : R[i]) ?? "").toLowerCase().includes(A.toLowerCase())
|
|
114
|
+
) : a ?? [], [a, s, u, A, i]), J = j(() => {
|
|
115
|
+
if (b == null) return "";
|
|
116
|
+
if (typeof b == "object")
|
|
117
|
+
return String(b[l] ?? "");
|
|
118
|
+
const R = (a || []).find(
|
|
119
|
+
(F) => String(F == null ? void 0 : F[l]) === String(b)
|
|
120
120
|
);
|
|
121
|
-
return String(
|
|
122
|
-
}, [
|
|
123
|
-
|
|
121
|
+
return String(R ? (R == null ? void 0 : R[i]) ?? "" : b);
|
|
122
|
+
}, [b, a, l, i]), Z = (R) => {
|
|
123
|
+
y || (d(R[l]), w && w(R), f(e), V(!1));
|
|
124
124
|
};
|
|
125
|
-
return /* @__PURE__ */
|
|
125
|
+
return /* @__PURE__ */ g(
|
|
126
126
|
"div",
|
|
127
127
|
{
|
|
128
|
-
className: `select-wrapper form-group ${
|
|
128
|
+
className: `select-wrapper form-group ${v ? "hidden" : ""}`,
|
|
129
129
|
ref: L,
|
|
130
130
|
children: [
|
|
131
131
|
/* @__PURE__ */ t("label", { className: "control-label", children: r }),
|
|
132
|
-
|
|
133
|
-
/* @__PURE__ */
|
|
132
|
+
o ? /* @__PURE__ */ t("span", { className: "form-control", children: J || "-" }) : /* @__PURE__ */ g(U, { children: [
|
|
133
|
+
/* @__PURE__ */ g(
|
|
134
134
|
"div",
|
|
135
135
|
{
|
|
136
|
-
className: `select-control ${
|
|
137
|
-
onClick: () => !
|
|
136
|
+
className: `select-control ${k ? "border-red" : ""} ${y ? "readOnly" : ""}`,
|
|
137
|
+
onClick: () => !y && V((R) => !R),
|
|
138
138
|
ref: S,
|
|
139
139
|
children: [
|
|
140
|
-
/* @__PURE__ */ t("span", { className: `select-display ${
|
|
140
|
+
/* @__PURE__ */ t("span", { className: `select-display ${y ? "readOnly" : ""}`, children: J || c }),
|
|
141
141
|
/* @__PURE__ */ t("i", { className: "flaticon flaticon-chevron-down select-icon" })
|
|
142
142
|
]
|
|
143
143
|
}
|
|
144
144
|
),
|
|
145
|
-
_ && !
|
|
145
|
+
_ && !y && /* @__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
|
-
value:
|
|
152
|
-
onChange: (
|
|
153
|
-
placeholder:
|
|
151
|
+
value: A,
|
|
152
|
+
onChange: (R) => G(R.target.value),
|
|
153
|
+
placeholder: m ? "Carregando..." : n,
|
|
154
154
|
autoFocus: !0,
|
|
155
|
-
onClick: (
|
|
155
|
+
onClick: (R) => R.stopPropagation()
|
|
156
156
|
}
|
|
157
157
|
) }),
|
|
158
|
-
/* @__PURE__ */ t("ul", { className: "select-options", children:
|
|
158
|
+
/* @__PURE__ */ t("ul", { className: "select-options", children: m ? /* @__PURE__ */ t("li", { className: "select-option readOnly", children: "Carregando..." }) : Q.length > 0 ? Q.map((R) => /* @__PURE__ */ t(
|
|
159
159
|
"li",
|
|
160
160
|
{
|
|
161
|
-
onClick: () => Z(
|
|
161
|
+
onClick: () => Z(R),
|
|
162
162
|
className: "select-option handleHover",
|
|
163
|
-
children:
|
|
163
|
+
children: R[i]
|
|
164
164
|
},
|
|
165
|
-
|
|
165
|
+
R[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: b || "" }),
|
|
170
|
+
k && /* @__PURE__ */ t("p", { className: "text-danger", children: String(k.message) })
|
|
171
171
|
]
|
|
172
172
|
}
|
|
173
173
|
);
|
|
174
174
|
}
|
|
175
|
-
const
|
|
175
|
+
const ot = T(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: i = "label",
|
|
182
182
|
forceReadOnly: l = !1,
|
|
183
183
|
forceHidden: s = !1
|
|
184
184
|
}) {
|
|
185
|
-
var
|
|
186
|
-
const n =
|
|
185
|
+
var b, S;
|
|
186
|
+
const n = W(), { isView: m, isReadOnly: u } = M(), { isReadOnly: h, isHidden: w } = E(), C = h ? h(e) : !1, P = w ? w(e) : !1, p = l || C, N = s || P, y = p || u || m;
|
|
187
187
|
if (!n || !e)
|
|
188
188
|
return console.error("Checkbox requer contexto de formulário e nome."), null;
|
|
189
|
-
const
|
|
190
|
-
const
|
|
191
|
-
return
|
|
192
|
-
}, {}),
|
|
193
|
-
|
|
194
|
-
const
|
|
195
|
-
(!
|
|
189
|
+
const v = () => !r || !n ? {} : r.reduce((k, _) => {
|
|
190
|
+
const V = _[c], A = n.getValues(V);
|
|
191
|
+
return k[V] = A === "on", k;
|
|
192
|
+
}, {}), x = n.watch(e), f = j(() => x && typeof x == "object" ? x : v(), [x, r, c]);
|
|
193
|
+
O(() => {
|
|
194
|
+
const k = n.getValues(e);
|
|
195
|
+
(!k || typeof k != "object") && n.setValue(e, f, {
|
|
196
196
|
shouldDirty: !1,
|
|
197
197
|
shouldValidate: !1
|
|
198
198
|
});
|
|
199
|
-
}, [
|
|
200
|
-
const
|
|
201
|
-
if (
|
|
202
|
-
const
|
|
203
|
-
n.setValue(e,
|
|
199
|
+
}, [f, e, n]);
|
|
200
|
+
const o = (k, _) => {
|
|
201
|
+
if (y) return;
|
|
202
|
+
const V = { ...f, [k]: _ };
|
|
203
|
+
n.setValue(e, V, {
|
|
204
204
|
shouldDirty: !0,
|
|
205
205
|
shouldValidate: !0
|
|
206
|
-
}), n.setValue(
|
|
207
|
-
}, d = (S = (
|
|
208
|
-
return /* @__PURE__ */
|
|
206
|
+
}), n.setValue(k, _ ? "on" : "", { shouldValidate: !1 });
|
|
207
|
+
}, d = (S = (b = n.formState) == null ? void 0 : b.errors) == null ? void 0 : S[e];
|
|
208
|
+
return /* @__PURE__ */ g("div", { className: `form-group ${N ? "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 _ = String(
|
|
216
|
-
return /* @__PURE__ */
|
|
213
|
+
className: `checkbox-group-custom ${y ? "readOnly" : ""}`,
|
|
214
|
+
children: r.map((k) => {
|
|
215
|
+
const _ = String(k[c]), V = f[_] === !0;
|
|
216
|
+
return /* @__PURE__ */ g("div", { children: [
|
|
217
217
|
/* @__PURE__ */ t("input", { type: "hidden", ...n.register(_) }),
|
|
218
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ g(
|
|
219
219
|
"label",
|
|
220
220
|
{
|
|
221
|
-
className: `custom-checkbox ${
|
|
221
|
+
className: `custom-checkbox ${V ? "checked" : ""} ${y ? "readOnly" : ""}`,
|
|
222
222
|
children: [
|
|
223
223
|
/* @__PURE__ */ t(
|
|
224
224
|
"input",
|
|
225
225
|
{
|
|
226
226
|
type: "checkbox",
|
|
227
|
-
checked:
|
|
228
|
-
disabled:
|
|
229
|
-
onChange: (
|
|
227
|
+
checked: V,
|
|
228
|
+
disabled: y,
|
|
229
|
+
onChange: (A) => o(_, A.target.checked)
|
|
230
230
|
}
|
|
231
231
|
),
|
|
232
232
|
/* @__PURE__ */ t("span", { className: "checkmark" }),
|
|
233
|
-
/* @__PURE__ */ t("span", { children:
|
|
233
|
+
/* @__PURE__ */ t("span", { children: k[i] })
|
|
234
234
|
]
|
|
235
235
|
}
|
|
236
236
|
)
|
|
@@ -246,38 +246,38 @@ function de({
|
|
|
246
246
|
label: r = "",
|
|
247
247
|
options: a = [],
|
|
248
248
|
valueKey: c = "value",
|
|
249
|
-
labelKey:
|
|
249
|
+
labelKey: i = "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: m, isHidden: u } = E(), h = s || !!m(e), w = n || !!u(e), { control: C } = W(), { isView: P, isReadOnly: p } = M(), {
|
|
255
|
+
field: N,
|
|
256
|
+
fieldState: { error: y }
|
|
257
257
|
} = I({
|
|
258
258
|
name: e,
|
|
259
|
-
control:
|
|
260
|
-
}),
|
|
261
|
-
(
|
|
262
|
-
|
|
259
|
+
control: C
|
|
260
|
+
}), v = h || p || P, x = N.value ?? "", f = $(
|
|
261
|
+
(o) => {
|
|
262
|
+
v || N.onChange(o);
|
|
263
263
|
},
|
|
264
|
-
[
|
|
264
|
+
[v, N]
|
|
265
265
|
);
|
|
266
|
-
return /* @__PURE__ */
|
|
266
|
+
return /* @__PURE__ */ g("div", { className: `form-group column ${w ? "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 ${v ? "view-mode" : ""}`,
|
|
272
272
|
"data-field-name": e,
|
|
273
|
-
children: a.map((
|
|
274
|
-
const d =
|
|
275
|
-
return /* @__PURE__ */
|
|
273
|
+
children: a.map((o) => {
|
|
274
|
+
const d = o[c], b = x === d, S = o.color ? { "--customColor": o.color } : void 0;
|
|
275
|
+
return /* @__PURE__ */ g(
|
|
276
276
|
"label",
|
|
277
277
|
{
|
|
278
278
|
htmlFor: `${e}_${d}`,
|
|
279
279
|
style: S,
|
|
280
|
-
className: `btn fs-ellipsis ${
|
|
280
|
+
className: `btn fs-ellipsis ${b ? "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: b,
|
|
290
290
|
className: "hidden",
|
|
291
|
-
onChange: () =>
|
|
292
|
-
disabled:
|
|
291
|
+
onChange: () => f(d),
|
|
292
|
+
disabled: v
|
|
293
293
|
}
|
|
294
294
|
),
|
|
295
|
-
|
|
295
|
+
o[l] && /* @__PURE__ */ t("i", { className: `${o[l]} icon-sm` }),
|
|
296
296
|
" ",
|
|
297
|
-
i
|
|
297
|
+
o[i]
|
|
298
298
|
]
|
|
299
299
|
},
|
|
300
300
|
d
|
|
@@ -302,7 +302,7 @@ function de({
|
|
|
302
302
|
})
|
|
303
303
|
}
|
|
304
304
|
),
|
|
305
|
-
|
|
305
|
+
y && /* @__PURE__ */ t("p", { className: "text-danger", children: String(y.message) })
|
|
306
306
|
] });
|
|
307
307
|
}
|
|
308
308
|
const ct = T(de), ue = ({
|
|
@@ -310,36 +310,36 @@ const ct = T(de), ue = ({
|
|
|
310
310
|
label: r = "",
|
|
311
311
|
placeholder: a = "",
|
|
312
312
|
className: c = "",
|
|
313
|
-
rows:
|
|
313
|
+
rows: i = 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: m, isHidden: u } = E(), h = s || !!m(e), w = n || !!u(e), { control: C } = W(), { isView: P } = M(), {
|
|
319
|
+
field: p,
|
|
320
|
+
fieldState: { error: N }
|
|
321
321
|
} = I({
|
|
322
322
|
name: e,
|
|
323
|
-
control:
|
|
323
|
+
control: C
|
|
324
324
|
});
|
|
325
|
-
return P ? /* @__PURE__ */
|
|
325
|
+
return P ? /* @__PURE__ */ g("div", { className: `form-group ${w ? "hidden" : ""}`, children: [
|
|
326
326
|
/* @__PURE__ */ t("label", { children: r }),
|
|
327
|
-
/* @__PURE__ */ t("span", { className: "form-control", children:
|
|
328
|
-
] }) : /* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ t("span", { className: "form-control", children: p.value || "-" })
|
|
328
|
+
] }) : /* @__PURE__ */ g("div", { className: `form-group ${w ? "hidden" : ""}`, children: [
|
|
329
329
|
/* @__PURE__ */ t("label", { children: r }),
|
|
330
330
|
/* @__PURE__ */ t(
|
|
331
331
|
"textarea",
|
|
332
332
|
{
|
|
333
|
-
...
|
|
334
|
-
rows:
|
|
333
|
+
...p,
|
|
334
|
+
rows: i,
|
|
335
335
|
maxLength: l,
|
|
336
|
-
value:
|
|
336
|
+
value: p.value || "",
|
|
337
337
|
placeholder: a,
|
|
338
|
-
readOnly:
|
|
339
|
-
className: `form-control ${
|
|
338
|
+
readOnly: h,
|
|
339
|
+
className: `form-control ${N ? "border-red" : ""} ${c}`
|
|
340
340
|
}
|
|
341
341
|
),
|
|
342
|
-
|
|
342
|
+
N && /* @__PURE__ */ t("p", { className: "text-danger", children: String(N.message) })
|
|
343
343
|
] });
|
|
344
344
|
}, dt = T(ue);
|
|
345
345
|
function X(e) {
|
|
@@ -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 i;
|
|
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
|
+
i = 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
|
+
i = e.values[n] || e.values[s];
|
|
361
361
|
}
|
|
362
362
|
const l = e.argumentCallback ? e.argumentCallback(r) : r;
|
|
363
|
-
return
|
|
363
|
+
return i[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, i = c && e.matchPatterns[c] || e.matchPatterns[e.defaultMatchWidth], l = r.match(i);
|
|
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], m = Array.isArray(n) ? he(n, (w) => w.test(s)) : (
|
|
372
372
|
// [TODO] -- I challenge you to fix the type
|
|
373
373
|
me(n, (w) => w.test(s))
|
|
374
374
|
);
|
|
375
375
|
let u;
|
|
376
|
-
u = e.valueCallback ? e.valueCallback(
|
|
376
|
+
u = e.valueCallback ? e.valueCallback(m) : m, 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 h = r.slice(s.length);
|
|
381
|
+
return { value: u, rest: h };
|
|
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 i = 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(i.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 i = ge[e];
|
|
471
|
+
return typeof i == "string" ? c = i : r === 1 ? c = i.one : c = i.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 i = we[e];
|
|
512
|
+
return typeof i == "function" ? i(r) : i;
|
|
513
513
|
}, Ce = {
|
|
514
514
|
narrow: ["AC", "DC"],
|
|
515
515
|
abbreviated: ["AC", "DC"],
|
|
@@ -634,7 +634,7 @@ const ge = {
|
|
|
634
634
|
}, Se = (e, r) => {
|
|
635
635
|
const a = Number(e);
|
|
636
636
|
return (r == null ? void 0 : r.unit) === "week" ? a + "ª" : a + "º";
|
|
637
|
-
},
|
|
637
|
+
}, Ve = {
|
|
638
638
|
ordinalNumber: Se,
|
|
639
639
|
era: H({
|
|
640
640
|
values: Ce,
|
|
@@ -659,14 +659,14 @@ const ge = {
|
|
|
659
659
|
formattingValues: $e,
|
|
660
660
|
defaultFormattingWidth: "wide"
|
|
661
661
|
})
|
|
662
|
-
},
|
|
662
|
+
}, Ae = /^(\d+)[ºªo]?/i, Oe = /\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
|
+
}, De = {
|
|
667
667
|
any: [/^ac/i, /^dc/i],
|
|
668
668
|
wide: [/^antes de cristo/i, /^depois de cristo/i]
|
|
669
|
-
},
|
|
669
|
+
}, Me = {
|
|
670
670
|
narrow: /^[1234]/i,
|
|
671
671
|
abbreviated: /^T[1234]/i,
|
|
672
672
|
wide: /^[1234](º)? trimestre/i
|
|
@@ -730,18 +730,18 @@ const ge = {
|
|
|
730
730
|
}
|
|
731
731
|
}, Be = {
|
|
732
732
|
ordinalNumber: fe({
|
|
733
|
-
matchPattern:
|
|
734
|
-
parsePattern:
|
|
733
|
+
matchPattern: Ae,
|
|
734
|
+
parsePattern: Oe,
|
|
735
735
|
valueCallback: (e) => parseInt(e, 10)
|
|
736
736
|
}),
|
|
737
737
|
era: q({
|
|
738
|
-
matchPatterns:
|
|
738
|
+
matchPatterns: We,
|
|
739
739
|
defaultMatchWidth: "wide",
|
|
740
|
-
parsePatterns:
|
|
740
|
+
parsePatterns: De,
|
|
741
741
|
defaultParseWidth: "any"
|
|
742
742
|
}),
|
|
743
743
|
quarter: q({
|
|
744
|
-
matchPatterns:
|
|
744
|
+
matchPatterns: Me,
|
|
745
745
|
defaultMatchWidth: "wide",
|
|
746
746
|
parsePatterns: je,
|
|
747
747
|
defaultParseWidth: "any",
|
|
@@ -770,7 +770,7 @@ const ge = {
|
|
|
770
770
|
formatDistance: be,
|
|
771
771
|
formatLong: Ne,
|
|
772
772
|
formatRelative: ke,
|
|
773
|
-
localize:
|
|
773
|
+
localize: Ve,
|
|
774
774
|
match: Be,
|
|
775
775
|
options: {
|
|
776
776
|
weekStartsOn: 0,
|
|
@@ -782,15 +782,15 @@ const Y = "dd/MM/yyyy", ze = (e) => {
|
|
|
782
782
|
if (!e) return null;
|
|
783
783
|
const r = re(e, Y, /* @__PURE__ */ new Date());
|
|
784
784
|
return se(r) ? r : null;
|
|
785
|
-
}, Xe = (e) => e ?
|
|
786
|
-
({ shimRef: e, className: r, name: a, ...c },
|
|
785
|
+
}, Xe = (e) => e ? ie(e, Y) : "", Ue = K(
|
|
786
|
+
({ shimRef: e, className: r, name: a, ...c }, i) => /* @__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 i == "function" ? i(l) : i && (i.current = l), e && e(l);
|
|
794
794
|
}
|
|
795
795
|
}
|
|
796
796
|
)
|
|
@@ -799,76 +799,76 @@ 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: i = !1,
|
|
803
803
|
forceHidden: l = !1
|
|
804
804
|
}) => {
|
|
805
|
-
const { control: s } =
|
|
806
|
-
field: { onChange:
|
|
807
|
-
fieldState: { error:
|
|
805
|
+
const { control: s } = W(), { isView: n } = M(), { isReadOnly: m, isHidden: u } = E(), h = i || !!m(e), w = l || !!u(e), {
|
|
806
|
+
field: { onChange: C, onBlur: P, value: p, ref: N },
|
|
807
|
+
fieldState: { error: y }
|
|
808
808
|
} = I({
|
|
809
809
|
name: e,
|
|
810
810
|
control: s
|
|
811
|
-
}),
|
|
812
|
-
(
|
|
813
|
-
|
|
811
|
+
}), v = j(() => ze(p), [p]), x = $(
|
|
812
|
+
(o) => {
|
|
813
|
+
C(o ? Xe(o) : "");
|
|
814
814
|
},
|
|
815
|
-
[
|
|
816
|
-
),
|
|
817
|
-
(
|
|
818
|
-
var d,
|
|
819
|
-
if (
|
|
815
|
+
[C]
|
|
816
|
+
), f = $(
|
|
817
|
+
(o) => {
|
|
818
|
+
var d, b;
|
|
819
|
+
if (N(o), o && ((b = (d = s._fields) == null ? void 0 : d[e]) != null && b._f)) {
|
|
820
820
|
const S = s._fields[e];
|
|
821
821
|
S._f.ref = {
|
|
822
822
|
focus: () => {
|
|
823
|
-
var
|
|
824
|
-
return (
|
|
823
|
+
var k;
|
|
824
|
+
return (k = o.focus) == null ? void 0 : k.call(o);
|
|
825
825
|
},
|
|
826
826
|
select: () => {
|
|
827
|
-
var
|
|
828
|
-
return (
|
|
827
|
+
var k;
|
|
828
|
+
return (k = o.select) == null ? void 0 : k.call(o);
|
|
829
829
|
},
|
|
830
|
-
setCustomValidity: (
|
|
830
|
+
setCustomValidity: (k) => {
|
|
831
831
|
var _;
|
|
832
|
-
return (_ =
|
|
832
|
+
return (_ = o.setCustomValidity) == null ? void 0 : _.call(o, k);
|
|
833
833
|
},
|
|
834
834
|
reportValidity: () => {
|
|
835
|
-
var
|
|
836
|
-
return (
|
|
835
|
+
var k;
|
|
836
|
+
return (k = o.reportValidity) == null ? void 0 : k.call(o);
|
|
837
837
|
}
|
|
838
838
|
};
|
|
839
839
|
}
|
|
840
840
|
},
|
|
841
|
-
[
|
|
841
|
+
[N, s, e]
|
|
842
842
|
);
|
|
843
|
-
return w ? null : n ? /* @__PURE__ */
|
|
843
|
+
return w ? null : n ? /* @__PURE__ */ g("div", { className: "form-group", children: [
|
|
844
844
|
/* @__PURE__ */ t("label", { children: r }),
|
|
845
|
-
/* @__PURE__ */ t("span", { className: "form-control", children:
|
|
846
|
-
] }) : /* @__PURE__ */
|
|
845
|
+
/* @__PURE__ */ t("span", { className: "form-control", children: p || "-" })
|
|
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: `${y ? "border-red" : ""}`, children: /* @__PURE__ */ t(
|
|
849
849
|
ne,
|
|
850
850
|
{
|
|
851
851
|
id: e,
|
|
852
852
|
name: e,
|
|
853
|
-
selected:
|
|
854
|
-
onChange:
|
|
853
|
+
selected: v,
|
|
854
|
+
onChange: x,
|
|
855
855
|
onBlur: P,
|
|
856
856
|
dateFormat: Y,
|
|
857
857
|
placeholderText: a,
|
|
858
|
-
disabled:
|
|
859
|
-
readOnly:
|
|
858
|
+
disabled: h,
|
|
859
|
+
readOnly: h,
|
|
860
860
|
locale: "pt-BR",
|
|
861
|
-
className: `form-control ${
|
|
861
|
+
className: `form-control ${y ? "border-red" : ""}`,
|
|
862
862
|
wrapperClassName: "w-100",
|
|
863
863
|
showMonthDropdown: !0,
|
|
864
864
|
showYearDropdown: !0,
|
|
865
865
|
dropdownMode: "select",
|
|
866
|
-
isClearable: !
|
|
866
|
+
isClearable: !h && !!p,
|
|
867
867
|
autoComplete: "off",
|
|
868
|
-
customInput: /* @__PURE__ */ t(Ue, { name: e, shimRef:
|
|
868
|
+
customInput: /* @__PURE__ */ t(Ue, { name: e, shimRef: f })
|
|
869
869
|
}
|
|
870
870
|
) }),
|
|
871
|
-
|
|
871
|
+
y && /* @__PURE__ */ t("span", { className: "help-block text-danger", children: String(y.message) })
|
|
872
872
|
] });
|
|
873
873
|
}, ut = T(Ye);
|
|
874
874
|
function Ge({
|
|
@@ -876,20 +876,20 @@ function Ge({
|
|
|
876
876
|
defaultLabel: r = "Não reconhecido",
|
|
877
877
|
className: a = "",
|
|
878
878
|
hidden: c = !1,
|
|
879
|
-
label:
|
|
879
|
+
label: i
|
|
880
880
|
}) {
|
|
881
|
-
const { activityId: l } =
|
|
881
|
+
const { activityId: l } = M(), s = j(() => !e || l === null || l === void 0 ? null : e[l], [l, e]);
|
|
882
882
|
if (!s)
|
|
883
|
-
return /* @__PURE__ */
|
|
884
|
-
|
|
883
|
+
return /* @__PURE__ */ g("div", { className: `form-group ${c ? "hidden" : ""}`, children: [
|
|
884
|
+
i && /* @__PURE__ */ t("label", { children: i }),
|
|
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
|
-
return /* @__PURE__ */
|
|
891
|
-
|
|
892
|
-
/* @__PURE__ */
|
|
890
|
+
return /* @__PURE__ */ g("div", { className: `form-group ${c ? "hidden" : ""}`, children: [
|
|
891
|
+
i && /* @__PURE__ */ t("label", { children: i }),
|
|
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
|
] })
|
|
@@ -901,75 +901,75 @@ function Qe({
|
|
|
901
901
|
control: r,
|
|
902
902
|
defaultRowValue: a,
|
|
903
903
|
isView: c,
|
|
904
|
-
isReadOnly:
|
|
904
|
+
isReadOnly: i,
|
|
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, m] = D([]), [u, h] = D([]), w = () => Date.now() + Math.random(), C = (o) => {
|
|
908
908
|
try {
|
|
909
|
-
const d = JSON.parse(
|
|
910
|
-
return Array.isArray(d) ? d.map((
|
|
911
|
-
...
|
|
912
|
-
_uid:
|
|
909
|
+
const d = JSON.parse(o);
|
|
910
|
+
return Array.isArray(d) ? d.map((b) => ({
|
|
911
|
+
...b,
|
|
912
|
+
_uid: b._uid || w()
|
|
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
|
+
O(() => {
|
|
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 o = JSON.stringify(n);
|
|
921
|
+
if (s.value === o) return;
|
|
922
|
+
const d = C(s.value);
|
|
923
|
+
m(d);
|
|
924
924
|
}
|
|
925
|
-
}, [s.value, c]),
|
|
926
|
-
if (
|
|
927
|
-
const
|
|
928
|
-
s.value !==
|
|
929
|
-
}, [n, s,
|
|
925
|
+
}, [s.value, c]), O(() => {
|
|
926
|
+
if (i) return;
|
|
927
|
+
const o = JSON.stringify(n);
|
|
928
|
+
s.value !== o && s.onChange(o);
|
|
929
|
+
}, [n, s, i]);
|
|
930
930
|
const P = $(() => {
|
|
931
|
-
const
|
|
932
|
-
|
|
933
|
-
}, [a]),
|
|
934
|
-
|
|
935
|
-
(
|
|
936
|
-
),
|
|
937
|
-
}, [u]),
|
|
938
|
-
(
|
|
939
|
-
|
|
931
|
+
const o = { _uid: w(), ...a };
|
|
932
|
+
m((d) => [...d, o]);
|
|
933
|
+
}, [a]), p = $(() => {
|
|
934
|
+
m(
|
|
935
|
+
(o) => o.filter((d) => !u.includes(d._uid))
|
|
936
|
+
), h([]);
|
|
937
|
+
}, [u]), N = $(
|
|
938
|
+
(o, d, b) => {
|
|
939
|
+
m(
|
|
940
940
|
(S) => S.map(
|
|
941
|
-
(
|
|
941
|
+
(k) => k._uid === o ? { ...k, [d]: b } : k
|
|
942
942
|
)
|
|
943
943
|
);
|
|
944
944
|
},
|
|
945
945
|
[]
|
|
946
|
-
),
|
|
947
|
-
|
|
948
|
-
(d) => d.includes(
|
|
946
|
+
), y = $((o) => {
|
|
947
|
+
h(
|
|
948
|
+
(d) => d.includes(o) ? d.filter((b) => b !== o) : [...d, o]
|
|
949
949
|
);
|
|
950
|
-
}, []),
|
|
951
|
-
(
|
|
952
|
-
|
|
950
|
+
}, []), v = $(
|
|
951
|
+
(o) => {
|
|
952
|
+
h(o ? n.map((d) => d._uid) : []);
|
|
953
953
|
},
|
|
954
954
|
[n]
|
|
955
|
-
),
|
|
956
|
-
(
|
|
955
|
+
), x = n.length > 0 && u.length === n.length, f = j(() => !l || l.length === 0 ? n : n.filter(
|
|
956
|
+
(o) => l.every((d) => {
|
|
957
957
|
if ("custom" in d)
|
|
958
|
-
return d.custom(
|
|
959
|
-
const
|
|
958
|
+
return d.custom(o);
|
|
959
|
+
const b = o[d.field];
|
|
960
960
|
switch (d.operator) {
|
|
961
961
|
case "===":
|
|
962
|
-
return
|
|
962
|
+
return b === d.value;
|
|
963
963
|
case "!==":
|
|
964
|
-
return
|
|
964
|
+
return b !== d.value;
|
|
965
965
|
case ">":
|
|
966
|
-
return
|
|
966
|
+
return b > d.value;
|
|
967
967
|
case "<":
|
|
968
|
-
return
|
|
968
|
+
return b < d.value;
|
|
969
969
|
case ">=":
|
|
970
|
-
return
|
|
970
|
+
return b >= d.value;
|
|
971
971
|
case "<=":
|
|
972
|
-
return
|
|
972
|
+
return b <= 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: f,
|
|
982
982
|
selectedRowIds: u,
|
|
983
|
-
isAllSelected:
|
|
983
|
+
isAllSelected: x,
|
|
984
984
|
handle: {
|
|
985
985
|
addRow: P,
|
|
986
|
-
removeRows:
|
|
987
|
-
updateCellValue:
|
|
988
|
-
toggleSelection:
|
|
989
|
-
toggleSelectAll:
|
|
986
|
+
removeRows: p,
|
|
987
|
+
updateCellValue: N,
|
|
988
|
+
toggleSelection: y,
|
|
989
|
+
toggleSelectAll: v
|
|
990
990
|
}
|
|
991
991
|
};
|
|
992
992
|
}
|
|
@@ -995,188 +995,188 @@ const ht = ({
|
|
|
995
995
|
title: r = "Tabela Dinâmica",
|
|
996
996
|
columns: a,
|
|
997
997
|
defaultRowValue: c = {},
|
|
998
|
-
forceReadOnly:
|
|
998
|
+
forceReadOnly: i = !1,
|
|
999
999
|
layout: l = "fluid",
|
|
1000
1000
|
actions: s = !0,
|
|
1001
1001
|
filters: n = []
|
|
1002
1002
|
}) => {
|
|
1003
|
-
const { control:
|
|
1003
|
+
const { control: m } = W(), { isView: u, isReadOnly: h } = M(), { isReadOnly: w } = E(), C = i || u || h || w && w(e), { field: P, visibleRows: p, selectedRowIds: N, isAllSelected: y, handle: v } = Qe({
|
|
1004
1004
|
name: e,
|
|
1005
|
-
control:
|
|
1005
|
+
control: m,
|
|
1006
1006
|
defaultRowValue: c,
|
|
1007
1007
|
isView: u,
|
|
1008
|
-
isReadOnly: !!
|
|
1008
|
+
isReadOnly: !!C,
|
|
1009
1009
|
filters: n
|
|
1010
|
-
}),
|
|
1011
|
-
return /* @__PURE__ */
|
|
1010
|
+
}), x = l === "fixed";
|
|
1011
|
+
return /* @__PURE__ */ g("div", { className: `table-wrapper ${x ? "table-fixed" : "table-fluid"}`, children: [
|
|
1012
1012
|
/* @__PURE__ */ t("input", { type: "hidden", ...P }),
|
|
1013
|
-
/* @__PURE__ */
|
|
1013
|
+
/* @__PURE__ */ g("div", { className: "header-handle", children: [
|
|
1014
1014
|
/* @__PURE__ */ t("h3", { children: r }),
|
|
1015
|
-
!
|
|
1016
|
-
/* @__PURE__ */
|
|
1015
|
+
!C && s && /* @__PURE__ */ g("div", { className: "handle-actions", children: [
|
|
1016
|
+
/* @__PURE__ */ g(
|
|
1017
1017
|
"button",
|
|
1018
1018
|
{
|
|
1019
1019
|
type: "button",
|
|
1020
|
-
className: `btn ${
|
|
1021
|
-
disabled:
|
|
1022
|
-
onClick:
|
|
1020
|
+
className: `btn ${N.length > 0 ? "btn-danger" : ""}`,
|
|
1021
|
+
disabled: N.length === 0,
|
|
1022
|
+
onClick: v.removeRows,
|
|
1023
1023
|
children: [
|
|
1024
1024
|
"Remover (",
|
|
1025
|
-
|
|
1025
|
+
N.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: v.addRow, children: "Adicionar" })
|
|
1031
1031
|
] })
|
|
1032
1032
|
] }),
|
|
1033
|
-
/* @__PURE__ */ t("div", { className: "table-scroll", children: /* @__PURE__ */
|
|
1034
|
-
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */
|
|
1035
|
-
!
|
|
1033
|
+
/* @__PURE__ */ t("div", { className: "table-scroll", children: /* @__PURE__ */ g("table", { className: "table-custom", children: [
|
|
1034
|
+
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ g("tr", { children: [
|
|
1035
|
+
!C && /* @__PURE__ */ t("th", { style: { width: "50px" }, children: /* @__PURE__ */ t(
|
|
1036
1036
|
"input",
|
|
1037
1037
|
{
|
|
1038
1038
|
type: "checkbox",
|
|
1039
|
-
checked:
|
|
1040
|
-
onChange: (
|
|
1039
|
+
checked: y,
|
|
1040
|
+
onChange: (f) => v.toggleSelectAll(f.target.checked)
|
|
1041
1041
|
}
|
|
1042
1042
|
) }),
|
|
1043
|
-
a.map((
|
|
1043
|
+
a.map((f) => /* @__PURE__ */ t(
|
|
1044
1044
|
"th",
|
|
1045
1045
|
{
|
|
1046
|
-
style:
|
|
1047
|
-
children:
|
|
1046
|
+
style: f.width ? { minWidth: x ? f.width : "100%" } : { width: "max-content" },
|
|
1047
|
+
children: f.label
|
|
1048
1048
|
},
|
|
1049
|
-
|
|
1049
|
+
f.key
|
|
1050
1050
|
))
|
|
1051
1051
|
] }) }),
|
|
1052
|
-
/* @__PURE__ */
|
|
1053
|
-
|
|
1054
|
-
!
|
|
1052
|
+
/* @__PURE__ */ g("tbody", { children: [
|
|
1053
|
+
p.map((f, o) => /* @__PURE__ */ g("tr", { children: [
|
|
1054
|
+
!C && /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(
|
|
1055
1055
|
"input",
|
|
1056
1056
|
{
|
|
1057
1057
|
type: "checkbox",
|
|
1058
|
-
checked:
|
|
1059
|
-
onChange: () =>
|
|
1058
|
+
checked: N.includes(f._uid),
|
|
1059
|
+
onChange: () => v.toggleSelection(f._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: f,
|
|
1064
|
+
index: o,
|
|
1065
|
+
updateRow: (b, S) => v.updateCellValue(f._uid, b, S),
|
|
1066
|
+
isLocked: !!C,
|
|
1067
1067
|
isView: !!u
|
|
1068
1068
|
}) : d.render(
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
(
|
|
1072
|
-
!!
|
|
1069
|
+
f,
|
|
1070
|
+
o,
|
|
1071
|
+
(b, S) => v.updateCellValue(f._uid, b, S),
|
|
1072
|
+
!!C,
|
|
1073
1073
|
!!u
|
|
1074
|
-
) :
|
|
1075
|
-
] },
|
|
1076
|
-
|
|
1074
|
+
) : f[d.key] }, `${f._uid}-${d.key}`))
|
|
1075
|
+
] }, f._uid)),
|
|
1076
|
+
p.length === 0 && /* @__PURE__ */ t("tr", { className: "empty-row", children: /* @__PURE__ */ t("td", { colSpan: 100, className: "text-center", children: C ? "Nenhum registro encontrado." : "Nenhum registro." }) })
|
|
1077
1077
|
] })
|
|
1078
1078
|
] }) })
|
|
1079
1079
|
] });
|
|
1080
|
-
}, Je = (e) => {
|
|
1081
|
-
const [
|
|
1080
|
+
}, Je = (e, r) => {
|
|
1081
|
+
const [a, c] = D(null), { watch: i } = W(), l = r !== void 0 ? r : i(e), s = $(() => {
|
|
1082
1082
|
try {
|
|
1083
|
-
const
|
|
1084
|
-
if (
|
|
1085
|
-
const
|
|
1086
|
-
|
|
1083
|
+
const m = window.top.__REACT_ATTACHMENT_BRIDGE__;
|
|
1084
|
+
if (m) {
|
|
1085
|
+
const u = m.getAttachment(e);
|
|
1086
|
+
c(u || (l ? { name: l, documentId: 0 } : null));
|
|
1087
1087
|
} else
|
|
1088
|
-
|
|
1088
|
+
c(l ? { name: l, documentId: 0 } : null);
|
|
1089
1089
|
} catch {
|
|
1090
|
-
|
|
1090
|
+
c(l ? { name: l, documentId: 0 } : null);
|
|
1091
1091
|
}
|
|
1092
|
-
}, [e,
|
|
1093
|
-
return
|
|
1094
|
-
|
|
1095
|
-
const
|
|
1096
|
-
return () => clearInterval(
|
|
1097
|
-
}, [
|
|
1098
|
-
}, Ze = ({
|
|
1099
|
-
|
|
1100
|
-
|
|
1092
|
+
}, [e, l]);
|
|
1093
|
+
return O(() => {
|
|
1094
|
+
s();
|
|
1095
|
+
const n = setInterval(s, 2e3);
|
|
1096
|
+
return () => clearInterval(n);
|
|
1097
|
+
}, [s]), { attachment: a, sync: s };
|
|
1098
|
+
}, Ze = ({
|
|
1099
|
+
name: e,
|
|
1100
|
+
label: r,
|
|
1101
|
+
help: a,
|
|
1102
|
+
valueManual: c,
|
|
1103
|
+
onChangeManual: i
|
|
1104
|
+
}) => {
|
|
1105
|
+
const [l, s] = D(!1), { control: n } = W(), { field: m } = I({ name: e, control: n }), { attachment: u, sync: h } = Je(e, c), w = () => {
|
|
1106
|
+
var v;
|
|
1101
1107
|
try {
|
|
1102
|
-
const
|
|
1108
|
+
const x = window.top;
|
|
1103
1109
|
return {
|
|
1104
|
-
bridge:
|
|
1105
|
-
toast: (
|
|
1110
|
+
bridge: x.__REACT_ATTACHMENT_BRIDGE__,
|
|
1111
|
+
toast: (v = x.FLUIGC) == null ? void 0 : v.toast
|
|
1106
1112
|
};
|
|
1107
1113
|
} catch {
|
|
1108
1114
|
return { bridge: null, toast: null };
|
|
1109
1115
|
}
|
|
1110
|
-
},
|
|
1111
|
-
const
|
|
1112
|
-
|
|
1113
|
-
const
|
|
1114
|
-
if (!
|
|
1115
|
-
const { bridge:
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
}, 1e3),
|
|
1116
|
+
}, C = $(() => {
|
|
1117
|
+
const v = document.createElement("input");
|
|
1118
|
+
v.type = "file", v.onchange = (x) => {
|
|
1119
|
+
const f = x.target.files[0];
|
|
1120
|
+
if (!f) return;
|
|
1121
|
+
const { bridge: o, toast: d } = w();
|
|
1122
|
+
s(!0), o ? o.upload(f, e, (b) => {
|
|
1123
|
+
i ? i(b.name) : m.onChange(b.name), setTimeout(() => {
|
|
1124
|
+
s(!1), h();
|
|
1125
|
+
}, 1e3), d && d({
|
|
1120
1126
|
title: "Sucesso",
|
|
1121
1127
|
message: "Arquivo enviado",
|
|
1122
1128
|
type: "success"
|
|
1123
1129
|
});
|
|
1124
|
-
}) : (
|
|
1125
|
-
},
|
|
1126
|
-
}, [e,
|
|
1127
|
-
|
|
1128
|
-
const
|
|
1129
|
-
if (!
|
|
1130
|
-
const { bridge:
|
|
1131
|
-
|
|
1130
|
+
}) : (i ? i(f.name) : m.onChange(f.name), s(!1));
|
|
1131
|
+
}, v.click();
|
|
1132
|
+
}, [e, m, h, i]), P = (v) => {
|
|
1133
|
+
v.stopPropagation();
|
|
1134
|
+
const x = (u == null ? void 0 : u.name) || c || m.value;
|
|
1135
|
+
if (!x) return;
|
|
1136
|
+
const { bridge: f, toast: o } = w();
|
|
1137
|
+
f ? f.removeByFileName(x) ? (i ? i("") : m.onChange(""), h()) : o && o({
|
|
1132
1138
|
title: "Erro",
|
|
1133
1139
|
message: "Erro ao remover anexo",
|
|
1134
1140
|
type: "danger"
|
|
1135
|
-
}) : (
|
|
1136
|
-
},
|
|
1141
|
+
}) : (i ? i("") : m.onChange(""), h());
|
|
1142
|
+
}, p = !!u && !l, N = (u == null ? void 0 : u.name) || c || m.value, y = [
|
|
1137
1143
|
"fluig-attachment__box",
|
|
1138
|
-
|
|
1139
|
-
|
|
1144
|
+
p ? "fluig-attachment__box--has-file" : "",
|
|
1145
|
+
l ? "fluig-attachment__box--uploading" : ""
|
|
1140
1146
|
].join(" ");
|
|
1141
|
-
return /* @__PURE__ */
|
|
1147
|
+
return /* @__PURE__ */ g("div", { className: "form-group fluig-attachment", children: [
|
|
1142
1148
|
r && /* @__PURE__ */ t("label", { className: "fluig-attachment__label", children: r }),
|
|
1143
|
-
/* @__PURE__ */
|
|
1149
|
+
/* @__PURE__ */ g(
|
|
1144
1150
|
"div",
|
|
1145
1151
|
{
|
|
1146
|
-
className:
|
|
1147
|
-
onClick:
|
|
1148
|
-
var
|
|
1149
|
-
return (
|
|
1150
|
-
} :
|
|
1152
|
+
className: y,
|
|
1153
|
+
onClick: p ? () => {
|
|
1154
|
+
var v;
|
|
1155
|
+
return (v = w().bridge) == null ? void 0 : v.view(N);
|
|
1156
|
+
} : C,
|
|
1151
1157
|
children: [
|
|
1152
|
-
/* @__PURE__ */
|
|
1158
|
+
/* @__PURE__ */ g("span", { className: "fluig-attachment__content", children: [
|
|
1153
1159
|
/* @__PURE__ */ t(
|
|
1154
1160
|
"i",
|
|
1155
1161
|
{
|
|
1156
|
-
className: `fluigicon icon-sm ${
|
|
1162
|
+
className: `fluigicon icon-sm ${l ? "fluigicon-loop-test" : p ? "fluigicon-file-pdf" : "fluigicon-paperclip"} fluig-attachment__icon`
|
|
1157
1163
|
}
|
|
1158
1164
|
),
|
|
1159
|
-
/* @__PURE__ */ t("span", { className: "fluig-attachment__filename", children:
|
|
1165
|
+
/* @__PURE__ */ t("span", { className: "fluig-attachment__filename", children: l ? " Enviando..." : p ? N : a || "Anexar" })
|
|
1160
1166
|
] }),
|
|
1161
|
-
|
|
1167
|
+
p && /* @__PURE__ */ t(
|
|
1162
1168
|
"button",
|
|
1163
1169
|
{
|
|
1164
1170
|
type: "button",
|
|
1165
1171
|
className: "fluig-attachment__btn-remove btn btn-link text-danger",
|
|
1166
|
-
onClick:
|
|
1167
|
-
children: /* @__PURE__ */ t(
|
|
1168
|
-
"i",
|
|
1169
|
-
{
|
|
1170
|
-
className: "flaticon flaticon-trash icon-sm",
|
|
1171
|
-
"aria-hidden": "true"
|
|
1172
|
-
}
|
|
1173
|
-
)
|
|
1172
|
+
onClick: P,
|
|
1173
|
+
children: /* @__PURE__ */ t("i", { className: "flaticon flaticon-trash icon-sm", "aria-hidden": "true" })
|
|
1174
1174
|
}
|
|
1175
1175
|
)
|
|
1176
1176
|
]
|
|
1177
1177
|
}
|
|
1178
1178
|
),
|
|
1179
|
-
/* @__PURE__ */ t("input", { type: "hidden", name: e, value:
|
|
1179
|
+
!i && /* @__PURE__ */ t("input", { type: "hidden", name: e, value: m.value || "" })
|
|
1180
1180
|
] });
|
|
1181
1181
|
}, ft = T(Ze);
|
|
1182
1182
|
function gt({
|
|
@@ -1185,30 +1185,30 @@ function gt({
|
|
|
1185
1185
|
showNavigation: a = !0,
|
|
1186
1186
|
progressBar: c = !0
|
|
1187
1187
|
}) {
|
|
1188
|
-
const [
|
|
1189
|
-
l((
|
|
1188
|
+
const [i, l] = D(0), [s, n] = D(0), m = B(null), u = B(null), h = $(() => {
|
|
1189
|
+
l((N) => (N + 1) % e.length), n(0);
|
|
1190
1190
|
}, [e.length]), w = $(() => {
|
|
1191
|
-
l((
|
|
1191
|
+
l((N) => (N - 1 + e.length) % e.length), n(0);
|
|
1192
1192
|
}, [e.length]);
|
|
1193
|
-
if (
|
|
1193
|
+
if (O(() => {
|
|
1194
1194
|
if (r > 0 && e.length > 1) {
|
|
1195
|
-
const
|
|
1196
|
-
|
|
1197
|
-
n((
|
|
1195
|
+
const y = 100 / r * 100;
|
|
1196
|
+
m.current = setInterval(h, r), u.current = setInterval(() => {
|
|
1197
|
+
n((v) => v >= 100 ? 0 : v + y);
|
|
1198
1198
|
}, 100);
|
|
1199
1199
|
}
|
|
1200
1200
|
return () => {
|
|
1201
|
-
|
|
1201
|
+
m.current && clearInterval(m.current), u.current && clearInterval(u.current);
|
|
1202
1202
|
};
|
|
1203
|
-
}, [r,
|
|
1204
|
-
const
|
|
1205
|
-
return /* @__PURE__ */
|
|
1206
|
-
/* @__PURE__ */
|
|
1207
|
-
a && e.length > 1 && /* @__PURE__ */
|
|
1203
|
+
}, [r, h, e.length, i]), !e || e.length === 0) return null;
|
|
1204
|
+
const C = e[i], P = typeof C == "string" ? C : C.url, p = /\.(jpg|jpeg|png|gif|webp)$/i.test(P);
|
|
1205
|
+
return /* @__PURE__ */ g("div", { className: "carousel-root", children: [
|
|
1206
|
+
/* @__PURE__ */ g("div", { className: "carousel-viewport", children: [
|
|
1207
|
+
a && e.length > 1 && /* @__PURE__ */ g(U, { children: [
|
|
1208
1208
|
/* @__PURE__ */ t("button", { className: "nav-btn prev", onClick: w, children: /* @__PURE__ */ t("i", { className: "flaticon flaticon-chevron-left" }) }),
|
|
1209
|
-
/* @__PURE__ */ t("button", { className: "nav-btn next", onClick:
|
|
1209
|
+
/* @__PURE__ */ t("button", { className: "nav-btn next", onClick: h, children: /* @__PURE__ */ t("i", { className: "flaticon flaticon-chevron-right" }) })
|
|
1210
1210
|
] }),
|
|
1211
|
-
/* @__PURE__ */ t("div", { className: "carousel-media", children:
|
|
1211
|
+
/* @__PURE__ */ t("div", { className: "carousel-media", children: p ? /* @__PURE__ */ t("img", { src: P, alt: "Slide", className: "carousel-image" }) : /* @__PURE__ */ g("div", { className: "carousel-file-fallback", children: [
|
|
1212
1212
|
/* @__PURE__ */ t("i", { className: "flaticon flaticon-file icon-xl" }),
|
|
1213
1213
|
/* @__PURE__ */ t(
|
|
1214
1214
|
"a",
|
|
@@ -1221,15 +1221,15 @@ function gt({
|
|
|
1221
1221
|
}
|
|
1222
1222
|
)
|
|
1223
1223
|
] }) }),
|
|
1224
|
-
e.length > 1 && /* @__PURE__ */ t("div", { className: "carousel-dots", children: e.map((
|
|
1224
|
+
e.length > 1 && /* @__PURE__ */ t("div", { className: "carousel-dots", children: e.map((N, y) => /* @__PURE__ */ t(
|
|
1225
1225
|
"div",
|
|
1226
1226
|
{
|
|
1227
|
-
className: `dot ${
|
|
1227
|
+
className: `dot ${y === i ? "active" : ""}`,
|
|
1228
1228
|
onClick: () => {
|
|
1229
|
-
l(
|
|
1229
|
+
l(y), n(0);
|
|
1230
1230
|
}
|
|
1231
1231
|
},
|
|
1232
|
-
|
|
1232
|
+
y
|
|
1233
1233
|
)) })
|
|
1234
1234
|
] }),
|
|
1235
1235
|
c && r > 0 && e.length > 1 && /* @__PURE__ */ t("div", { className: "carousel-progress-container", children: /* @__PURE__ */ t(
|
|
@@ -1246,17 +1246,17 @@ function bt({
|
|
|
1246
1246
|
isOpen: r,
|
|
1247
1247
|
onOpen: a,
|
|
1248
1248
|
onClose: c,
|
|
1249
|
-
content:
|
|
1249
|
+
content: i,
|
|
1250
1250
|
footer: l,
|
|
1251
1251
|
width: s
|
|
1252
1252
|
}) {
|
|
1253
1253
|
const n = $(
|
|
1254
|
-
(
|
|
1255
|
-
|
|
1254
|
+
(m) => {
|
|
1255
|
+
m.key === "Escape" && c();
|
|
1256
1256
|
},
|
|
1257
1257
|
[c]
|
|
1258
1258
|
);
|
|
1259
|
-
return
|
|
1259
|
+
return O(() => (r && (document.addEventListener("keydown", n), a == null || a(), document.body.style.overflow = "hidden"), () => {
|
|
1260
1260
|
document.removeEventListener("keydown", n), document.body.style.overflow = "auto";
|
|
1261
1261
|
}), [r, n, a]), r ? /* @__PURE__ */ t(
|
|
1262
1262
|
"div",
|
|
@@ -1265,14 +1265,14 @@ function bt({
|
|
|
1265
1265
|
onClick: c,
|
|
1266
1266
|
"aria-modal": "true",
|
|
1267
1267
|
role: "dialog",
|
|
1268
|
-
children: /* @__PURE__ */
|
|
1268
|
+
children: /* @__PURE__ */ g(
|
|
1269
1269
|
"div",
|
|
1270
1270
|
{
|
|
1271
1271
|
style: { maxWidth: s },
|
|
1272
1272
|
className: "modal-container",
|
|
1273
|
-
onClick: (
|
|
1273
|
+
onClick: (m) => m.stopPropagation(),
|
|
1274
1274
|
children: [
|
|
1275
|
-
/* @__PURE__ */
|
|
1275
|
+
/* @__PURE__ */ g("div", { className: "modal-header", children: [
|
|
1276
1276
|
/* @__PURE__ */ t("h3", { children: e }),
|
|
1277
1277
|
/* @__PURE__ */ t(
|
|
1278
1278
|
"div",
|
|
@@ -1291,7 +1291,7 @@ function bt({
|
|
|
1291
1291
|
}
|
|
1292
1292
|
)
|
|
1293
1293
|
] }),
|
|
1294
|
-
/* @__PURE__ */ t("div", { className: "modal-content", children:
|
|
1294
|
+
/* @__PURE__ */ t("div", { className: "modal-content", children: i }),
|
|
1295
1295
|
l && /* @__PURE__ */ t("div", { className: "modal-footer", children: l })
|
|
1296
1296
|
]
|
|
1297
1297
|
}
|
|
@@ -1304,24 +1304,24 @@ function vt({
|
|
|
1304
1304
|
childs: r,
|
|
1305
1305
|
footer: a,
|
|
1306
1306
|
contentExternal: c,
|
|
1307
|
-
bg:
|
|
1307
|
+
bg: i,
|
|
1308
1308
|
color: l,
|
|
1309
1309
|
onSelect: s
|
|
1310
1310
|
}) {
|
|
1311
|
-
return /* @__PURE__ */
|
|
1312
|
-
/* @__PURE__ */
|
|
1311
|
+
return /* @__PURE__ */ g("div", { className: "main-container dfea", children: [
|
|
1312
|
+
/* @__PURE__ */ g("div", { className: "sidebar-wrapper", style: { backgroundColor: `${i}` }, children: [
|
|
1313
1313
|
e && /* @__PURE__ */ t("div", { className: "sidebar-logo", children: /* @__PURE__ */ t("img", { src: e, alt: "", width: "auto", height: "28px" }) }),
|
|
1314
1314
|
/* @__PURE__ */ t("ul", { className: "sidebar-childs-content", children: r == null ? void 0 : r.map(
|
|
1315
1315
|
(n) => {
|
|
1316
|
-
var
|
|
1317
|
-
return n != null && n.options && ((
|
|
1318
|
-
/* @__PURE__ */
|
|
1316
|
+
var m, u;
|
|
1317
|
+
return n != null && n.options && ((m = n == null ? void 0 : n.options) == null ? void 0 : m.length) > 0 ? /* @__PURE__ */ t(U, { children: /* @__PURE__ */ g("ul", { className: "sidebar-child sidebar-options-content", children: [
|
|
1318
|
+
/* @__PURE__ */ g(
|
|
1319
1319
|
"li",
|
|
1320
1320
|
{
|
|
1321
1321
|
className: "sidebar-child",
|
|
1322
1322
|
onClick: () => {
|
|
1323
|
-
var
|
|
1324
|
-
(
|
|
1323
|
+
var h;
|
|
1324
|
+
(h = n.action) == null || h.call(n), s == null || s(n.id);
|
|
1325
1325
|
},
|
|
1326
1326
|
style: { color: `${l}` },
|
|
1327
1327
|
children: [
|
|
@@ -1330,25 +1330,25 @@ function vt({
|
|
|
1330
1330
|
]
|
|
1331
1331
|
}
|
|
1332
1332
|
),
|
|
1333
|
-
(u = n.options) == null ? void 0 : u.map((
|
|
1333
|
+
(u = n.options) == null ? void 0 : u.map((h) => /* @__PURE__ */ t(
|
|
1334
1334
|
"li",
|
|
1335
1335
|
{
|
|
1336
1336
|
className: "sidebar-option",
|
|
1337
1337
|
onClick: () => {
|
|
1338
1338
|
var w;
|
|
1339
|
-
(w =
|
|
1339
|
+
(w = h.action) == null || w.call(h), s == null || s(h.id);
|
|
1340
1340
|
},
|
|
1341
1341
|
style: { color: `${l}` },
|
|
1342
|
-
children:
|
|
1342
|
+
children: h.label
|
|
1343
1343
|
}
|
|
1344
1344
|
))
|
|
1345
|
-
] }) }) : /* @__PURE__ */
|
|
1345
|
+
] }) }) : /* @__PURE__ */ g(
|
|
1346
1346
|
"li",
|
|
1347
1347
|
{
|
|
1348
1348
|
className: "sidebar-child",
|
|
1349
1349
|
onClick: () => {
|
|
1350
|
-
var
|
|
1351
|
-
(
|
|
1350
|
+
var h;
|
|
1351
|
+
(h = n.action) == null || h.call(n), s == null || s(n.id);
|
|
1352
1352
|
},
|
|
1353
1353
|
style: { color: `${l}` },
|
|
1354
1354
|
children: [
|
|
@@ -1369,10 +1369,10 @@ export {
|
|
|
1369
1369
|
gt as Carousel,
|
|
1370
1370
|
lt as Checkbox,
|
|
1371
1371
|
ut as DatePicker,
|
|
1372
|
-
|
|
1372
|
+
it as Input,
|
|
1373
1373
|
bt as Modal,
|
|
1374
1374
|
ct as RadioBtn,
|
|
1375
|
-
|
|
1375
|
+
ot as Select,
|
|
1376
1376
|
vt as Sidebar,
|
|
1377
1377
|
ht as SimpleTable,
|
|
1378
1378
|
mt as StatusBadge,
|