@tech-diefra/fluig-ui 1.2.22 → 1.2.23
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/index.cjs +1 -1
- package/dist/index.js +401 -401
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as T, useMemo as j, useCallback as
|
|
3
|
-
import { useFormContext as
|
|
1
|
+
import { jsxs as b, jsx as t, Fragment as U } from "react/jsx-runtime";
|
|
2
|
+
import { memo as T, useMemo as j, useCallback as $, useState as W, useRef as B, useEffect as V, forwardRef as K } from "react";
|
|
3
|
+
import { useFormContext as O, useController as I, useFormState as ee } from "react-hook-form";
|
|
4
4
|
import { IMaskInput as te } from "react-imask";
|
|
5
5
|
import { useSection as E, useFluigRuntime as D } from "@fluig-kit/ecm";
|
|
6
6
|
import ne, { registerLocale as ae } from "react-datepicker";
|
|
@@ -15,58 +15,58 @@ function le({
|
|
|
15
15
|
name: e,
|
|
16
16
|
label: r = "",
|
|
17
17
|
placeholder: a = "",
|
|
18
|
-
type:
|
|
18
|
+
type: c = "text",
|
|
19
19
|
mask: o,
|
|
20
|
-
className:
|
|
20
|
+
className: l = "",
|
|
21
21
|
forceReadOnly: s = !1,
|
|
22
22
|
forceHidden: n = !1
|
|
23
23
|
}) {
|
|
24
|
-
const { isReadOnly:
|
|
24
|
+
const { isReadOnly: f, isHidden: u } = E(), m = s || !!f(e), k = n || !!u(e), { control: w } = O(), { isView: P } = D(), { field: h } = I({ name: e, control: w }), { errors: v } = ee({ name: e }), g = v == null ? void 0 : v[e], N = j(
|
|
25
25
|
() => o ? ie[o] ?? o : null,
|
|
26
26
|
[o]
|
|
27
|
-
),
|
|
27
|
+
), R = $((i) => {
|
|
28
28
|
if (!i) return "";
|
|
29
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
|
-
(i) =>
|
|
36
|
-
[
|
|
34
|
+
}, []), y = $(
|
|
35
|
+
(i) => c === "monetary" ? R(i) : i,
|
|
36
|
+
[c, R]
|
|
37
37
|
);
|
|
38
|
-
return
|
|
38
|
+
return P ? /* @__PURE__ */ b("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: h.value || "-" })
|
|
41
|
+
] }) : /* @__PURE__ */ b("div", { className: `form-group ${k ? "hidden" : ""}`, children: [
|
|
42
42
|
/* @__PURE__ */ t("label", { children: r }),
|
|
43
|
-
|
|
43
|
+
N ? /* @__PURE__ */ t(
|
|
44
44
|
te,
|
|
45
45
|
{
|
|
46
46
|
name: e,
|
|
47
|
-
mask:
|
|
48
|
-
value: String(
|
|
47
|
+
mask: N,
|
|
48
|
+
value: String(h.value ?? ""),
|
|
49
49
|
unmask: !1,
|
|
50
|
-
onAccept: (i) =>
|
|
50
|
+
onAccept: (i) => h.onChange(y(i)),
|
|
51
51
|
placeholder: a,
|
|
52
52
|
readOnly: m,
|
|
53
|
-
className: `form-control ${
|
|
54
|
-
inputRef:
|
|
55
|
-
onBlur:
|
|
53
|
+
className: `form-control ${g ? "border-red" : ""} ${l}`,
|
|
54
|
+
inputRef: h.ref,
|
|
55
|
+
onBlur: h.onBlur
|
|
56
56
|
}
|
|
57
57
|
) : /* @__PURE__ */ t(
|
|
58
58
|
"input",
|
|
59
59
|
{
|
|
60
|
-
...
|
|
60
|
+
...h,
|
|
61
61
|
type: "text",
|
|
62
|
-
value:
|
|
63
|
-
onChange: (i) =>
|
|
62
|
+
value: h.value ?? "",
|
|
63
|
+
onChange: (i) => h.onChange(y(i.target.value)),
|
|
64
64
|
placeholder: a,
|
|
65
65
|
readOnly: m,
|
|
66
|
-
className: `form-control ${
|
|
66
|
+
className: `form-control ${g ? "border-red" : ""} ${l}`
|
|
67
67
|
}
|
|
68
68
|
),
|
|
69
|
-
|
|
69
|
+
g && /* @__PURE__ */ t("p", { className: "text-danger", children: String(g.message) })
|
|
70
70
|
] });
|
|
71
71
|
}
|
|
72
72
|
const ot = T(le);
|
|
@@ -74,99 +74,99 @@ function ce({
|
|
|
74
74
|
name: e,
|
|
75
75
|
label: r = "",
|
|
76
76
|
options: a = [],
|
|
77
|
-
placeholder:
|
|
77
|
+
placeholder: c = "",
|
|
78
78
|
labelKey: o = "label",
|
|
79
|
-
valueKey:
|
|
79
|
+
valueKey: l = "value",
|
|
80
80
|
enableSearch: s = !1,
|
|
81
81
|
searchPlaceholder: n = "Buscar...",
|
|
82
|
-
loading:
|
|
82
|
+
loading: f = !1,
|
|
83
83
|
onSearchChange: u,
|
|
84
84
|
debounceTime: m = 300,
|
|
85
|
-
onSelect:
|
|
86
|
-
forceReadOnly:
|
|
87
|
-
forceHidden:
|
|
85
|
+
onSelect: k,
|
|
86
|
+
forceReadOnly: w = !1,
|
|
87
|
+
forceHidden: P = !1
|
|
88
88
|
}) {
|
|
89
|
-
const { isReadOnly:
|
|
90
|
-
field: { onChange: d, value:
|
|
89
|
+
const { isReadOnly: h, isHidden: v } = E(), g = w || !!h(e), N = P || !!v(e), { control: R, clearErrors: y } = O(), { isView: i } = D(), {
|
|
90
|
+
field: { onChange: d, value: p, ref: S },
|
|
91
91
|
fieldState: { error: C }
|
|
92
92
|
} = I({
|
|
93
93
|
name: e,
|
|
94
|
-
control:
|
|
95
|
-
}), [
|
|
96
|
-
|
|
94
|
+
control: R
|
|
95
|
+
}), [_, M] = W(!1), [A, G] = W(""), L = B(null), z = B(u);
|
|
96
|
+
V(() => {
|
|
97
97
|
z.current = u;
|
|
98
|
-
}, [u]),
|
|
99
|
-
const
|
|
100
|
-
L.current && !L.current.contains(F.target) &&
|
|
98
|
+
}, [u]), V(() => {
|
|
99
|
+
const x = (F) => {
|
|
100
|
+
L.current && !L.current.contains(F.target) && M(!1);
|
|
101
101
|
};
|
|
102
|
-
return document.addEventListener("mousedown",
|
|
103
|
-
}, []),
|
|
104
|
-
|
|
105
|
-
}, [
|
|
102
|
+
return document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
|
|
103
|
+
}, []), V(() => {
|
|
104
|
+
_ || G("");
|
|
105
|
+
}, [_]), V(() => {
|
|
106
106
|
if (!s) return;
|
|
107
|
-
const
|
|
108
|
-
z.current && z.current(
|
|
107
|
+
const x = setTimeout(() => {
|
|
108
|
+
z.current && z.current(A);
|
|
109
109
|
}, m);
|
|
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[
|
|
110
|
+
return () => clearTimeout(x);
|
|
111
|
+
}, [A, s, m]);
|
|
112
|
+
const Q = j(() => s && !u && A.trim() ? a.filter(
|
|
113
|
+
(x) => String((x == null ? void 0 : x[o]) ?? "").toLowerCase().includes(A.toLowerCase())
|
|
114
|
+
) : a ?? [], [a, s, u, A, o]), J = j(() => {
|
|
115
|
+
if (p == null) return "";
|
|
116
|
+
if (typeof p == "object")
|
|
117
|
+
return String(p[l] ?? "");
|
|
118
|
+
const x = (a || []).find(
|
|
119
|
+
(F) => String(F == null ? void 0 : F[l]) === String(p)
|
|
120
120
|
);
|
|
121
|
-
return String(
|
|
122
|
-
}, [
|
|
123
|
-
|
|
121
|
+
return String(x ? (x == null ? void 0 : x[o]) ?? "" : p);
|
|
122
|
+
}, [p, a, l, o]), Z = (x) => {
|
|
123
|
+
g || (d(x[l]), k && k(x), y(e), M(!1));
|
|
124
124
|
};
|
|
125
|
-
return /* @__PURE__ */
|
|
125
|
+
return /* @__PURE__ */ b(
|
|
126
126
|
"div",
|
|
127
127
|
{
|
|
128
|
-
className: `select-wrapper form-group ${
|
|
128
|
+
className: `select-wrapper form-group ${N ? "hidden" : ""}`,
|
|
129
129
|
ref: L,
|
|
130
130
|
children: [
|
|
131
131
|
/* @__PURE__ */ t("label", { className: "control-label", children: r }),
|
|
132
|
-
i ? /* @__PURE__ */ t("span", { className: "form-control", children: J || "-" }) : /* @__PURE__ */
|
|
133
|
-
/* @__PURE__ */
|
|
132
|
+
i ? /* @__PURE__ */ t("span", { className: "form-control", children: J || "-" }) : /* @__PURE__ */ b(U, { children: [
|
|
133
|
+
/* @__PURE__ */ b(
|
|
134
134
|
"div",
|
|
135
135
|
{
|
|
136
|
-
className: `select-control ${C ? "border-red" : ""} ${
|
|
137
|
-
onClick: () => !
|
|
138
|
-
ref:
|
|
136
|
+
className: `select-control ${C ? "border-red" : ""} ${g ? "readOnly" : ""}`,
|
|
137
|
+
onClick: () => !g && M((x) => !x),
|
|
138
|
+
ref: S,
|
|
139
139
|
children: [
|
|
140
|
-
/* @__PURE__ */ t("span", { className: `select-display ${
|
|
140
|
+
/* @__PURE__ */ t("span", { className: `select-display ${g ? "readOnly" : ""}`, children: J || c }),
|
|
141
141
|
/* @__PURE__ */ t("i", { className: "flaticon flaticon-chevron-down select-icon" })
|
|
142
142
|
]
|
|
143
143
|
}
|
|
144
144
|
),
|
|
145
|
-
|
|
145
|
+
_ && !g && /* @__PURE__ */ b("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: (x) => G(x.target.value),
|
|
153
|
+
placeholder: f ? "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: f ? /* @__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:
|
|
169
|
+
/* @__PURE__ */ t("input", { type: "hidden", name: e, value: p || "" }),
|
|
170
170
|
C && /* @__PURE__ */ t("p", { className: "text-danger", children: String(C.message) })
|
|
171
171
|
]
|
|
172
172
|
}
|
|
@@ -177,56 +177,56 @@ function lt({
|
|
|
177
177
|
name: e,
|
|
178
178
|
options: r = [],
|
|
179
179
|
label: a = "",
|
|
180
|
-
valueKey:
|
|
180
|
+
valueKey: c = "value",
|
|
181
181
|
labelKey: o = "label",
|
|
182
|
-
forceReadOnly:
|
|
182
|
+
forceReadOnly: l = !1,
|
|
183
183
|
forceHidden: s = !1
|
|
184
184
|
}) {
|
|
185
|
-
var
|
|
186
|
-
const n =
|
|
185
|
+
var p, S;
|
|
186
|
+
const n = O(), { isView: f, isReadOnly: u } = D(), { isReadOnly: m, isHidden: k } = E(), w = m ? m(e) : !1, P = k ? k(e) : !1, h = l || w, v = s || P, g = h || u || f;
|
|
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 C[
|
|
192
|
-
}, {}),
|
|
193
|
-
|
|
189
|
+
const N = () => !r || !n ? {} : r.reduce((C, _) => {
|
|
190
|
+
const M = _[c], A = n.getValues(M);
|
|
191
|
+
return C[M] = A === "on", C;
|
|
192
|
+
}, {}), R = n.watch(e), y = j(() => R && typeof R == "object" ? R : N(), [R, r, c]);
|
|
193
|
+
V(() => {
|
|
194
194
|
const C = n.getValues(e);
|
|
195
|
-
(!C || typeof C != "object") && n.setValue(e,
|
|
195
|
+
(!C || typeof C != "object") && n.setValue(e, y, {
|
|
196
196
|
shouldDirty: !1,
|
|
197
197
|
shouldValidate: !1
|
|
198
198
|
});
|
|
199
|
-
}, [
|
|
200
|
-
const i = (C,
|
|
201
|
-
if (
|
|
202
|
-
const
|
|
203
|
-
n.setValue(e,
|
|
199
|
+
}, [y, e, n]);
|
|
200
|
+
const i = (C, _) => {
|
|
201
|
+
if (g) return;
|
|
202
|
+
const M = { ...y, [C]: _ };
|
|
203
|
+
n.setValue(e, M, {
|
|
204
204
|
shouldDirty: !0,
|
|
205
205
|
shouldValidate: !0
|
|
206
|
-
}), n.setValue(C,
|
|
207
|
-
}, d = (
|
|
208
|
-
return /* @__PURE__ */
|
|
206
|
+
}), n.setValue(C, _ ? "on" : "", { shouldValidate: !1 });
|
|
207
|
+
}, d = (S = (p = n.formState) == null ? void 0 : p.errors) == null ? void 0 : S[e];
|
|
208
|
+
return /* @__PURE__ */ b("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 ${
|
|
213
|
+
className: `checkbox-group-custom ${g ? "readOnly" : ""}`,
|
|
214
214
|
children: r.map((C) => {
|
|
215
|
-
const
|
|
216
|
-
return /* @__PURE__ */
|
|
217
|
-
/* @__PURE__ */ t("input", { type: "hidden", ...n.register(
|
|
218
|
-
/* @__PURE__ */
|
|
215
|
+
const _ = String(C[c]), M = y[_] === !0;
|
|
216
|
+
return /* @__PURE__ */ b("div", { children: [
|
|
217
|
+
/* @__PURE__ */ t("input", { type: "hidden", ...n.register(_) }),
|
|
218
|
+
/* @__PURE__ */ b(
|
|
219
219
|
"label",
|
|
220
220
|
{
|
|
221
|
-
className: `custom-checkbox ${
|
|
221
|
+
className: `custom-checkbox ${M ? "checked" : ""} ${g ? "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: M,
|
|
228
|
+
disabled: g,
|
|
229
|
+
onChange: (A) => i(_, A.target.checked)
|
|
230
230
|
}
|
|
231
231
|
),
|
|
232
232
|
/* @__PURE__ */ t("span", { className: "checkmark" }),
|
|
@@ -234,7 +234,7 @@ function lt({
|
|
|
234
234
|
]
|
|
235
235
|
}
|
|
236
236
|
)
|
|
237
|
-
] },
|
|
237
|
+
] }, _);
|
|
238
238
|
})
|
|
239
239
|
}
|
|
240
240
|
),
|
|
@@ -245,39 +245,39 @@ function de({
|
|
|
245
245
|
name: e,
|
|
246
246
|
label: r = "",
|
|
247
247
|
options: a = [],
|
|
248
|
-
valueKey:
|
|
248
|
+
valueKey: c = "value",
|
|
249
249
|
labelKey: o = "label",
|
|
250
|
-
iconKey:
|
|
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: f, isHidden: u } = E(), m = s || !!f(e), k = n || !!u(e), { control: w } = O(), { isView: P, isReadOnly: h } = D(), {
|
|
255
|
+
field: v,
|
|
256
|
+
fieldState: { error: g }
|
|
257
257
|
} = I({
|
|
258
258
|
name: e,
|
|
259
|
-
control:
|
|
260
|
-
}),
|
|
259
|
+
control: w
|
|
260
|
+
}), N = m || h || P, R = v.value ?? "", y = $(
|
|
261
261
|
(i) => {
|
|
262
|
-
|
|
262
|
+
N || v.onChange(i);
|
|
263
263
|
},
|
|
264
|
-
[
|
|
264
|
+
[N, v]
|
|
265
265
|
);
|
|
266
|
-
return /* @__PURE__ */
|
|
266
|
+
return /* @__PURE__ */ b("div", { className: `form-group column ${k ? "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 ${N ? "view-mode" : ""}`,
|
|
272
272
|
"data-field-name": e,
|
|
273
273
|
children: a.map((i) => {
|
|
274
|
-
const d = i[
|
|
275
|
-
return /* @__PURE__ */
|
|
274
|
+
const d = i[c], p = R === d, S = i.color ? { "--customColor": i.color } : void 0;
|
|
275
|
+
return /* @__PURE__ */ b(
|
|
276
276
|
"label",
|
|
277
277
|
{
|
|
278
278
|
htmlFor: `${e}_${d}`,
|
|
279
|
-
style:
|
|
280
|
-
className: `btn fs-ellipsis ${
|
|
279
|
+
style: S,
|
|
280
|
+
className: `btn fs-ellipsis ${p ? "active" : ""}`,
|
|
281
281
|
children: [
|
|
282
282
|
/* @__PURE__ */ t(
|
|
283
283
|
"input",
|
|
@@ -286,13 +286,13 @@ function de({
|
|
|
286
286
|
id: `${e}_${d}`,
|
|
287
287
|
name: e,
|
|
288
288
|
value: d,
|
|
289
|
-
checked:
|
|
289
|
+
checked: p,
|
|
290
290
|
className: "hidden",
|
|
291
|
-
onChange: () =>
|
|
292
|
-
disabled:
|
|
291
|
+
onChange: () => y(d),
|
|
292
|
+
disabled: N
|
|
293
293
|
}
|
|
294
294
|
),
|
|
295
|
-
i[
|
|
295
|
+
i[l] && /* @__PURE__ */ t("i", { className: `${i[l]} icon-sm` }),
|
|
296
296
|
" ",
|
|
297
297
|
i[o]
|
|
298
298
|
]
|
|
@@ -302,44 +302,44 @@ function de({
|
|
|
302
302
|
})
|
|
303
303
|
}
|
|
304
304
|
),
|
|
305
|
-
|
|
305
|
+
g && /* @__PURE__ */ t("p", { className: "text-danger", children: String(g.message) })
|
|
306
306
|
] });
|
|
307
307
|
}
|
|
308
308
|
const ct = T(de), ue = ({
|
|
309
309
|
name: e,
|
|
310
310
|
label: r = "",
|
|
311
311
|
placeholder: a = "",
|
|
312
|
-
className:
|
|
312
|
+
className: c = "",
|
|
313
313
|
rows: o = 4,
|
|
314
|
-
maxLength:
|
|
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: f, isHidden: u } = E(), m = s || !!f(e), k = n || !!u(e), { control: w } = O(), { isView: P } = D(), {
|
|
319
|
+
field: h,
|
|
320
|
+
fieldState: { error: v }
|
|
321
321
|
} = I({
|
|
322
322
|
name: e,
|
|
323
|
-
control:
|
|
323
|
+
control: w
|
|
324
324
|
});
|
|
325
|
-
return
|
|
325
|
+
return P ? /* @__PURE__ */ b("div", { className: `form-group ${k ? "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: h.value || "-" })
|
|
328
|
+
] }) : /* @__PURE__ */ b("div", { className: `form-group ${k ? "hidden" : ""}`, children: [
|
|
329
329
|
/* @__PURE__ */ t("label", { children: r }),
|
|
330
330
|
/* @__PURE__ */ t(
|
|
331
331
|
"textarea",
|
|
332
332
|
{
|
|
333
|
-
...
|
|
333
|
+
...h,
|
|
334
334
|
rows: o,
|
|
335
|
-
maxLength:
|
|
336
|
-
value:
|
|
335
|
+
maxLength: l,
|
|
336
|
+
value: h.value || "",
|
|
337
337
|
placeholder: a,
|
|
338
338
|
readOnly: m,
|
|
339
|
-
className: `form-control ${
|
|
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
344
|
}, dt = T(ue);
|
|
345
345
|
function X(e) {
|
|
@@ -350,30 +350,30 @@ function X(e) {
|
|
|
350
350
|
}
|
|
351
351
|
function H(e) {
|
|
352
352
|
return (r, a) => {
|
|
353
|
-
const
|
|
353
|
+
const c = a != null && a.context ? String(a.context) : "standalone";
|
|
354
354
|
let o;
|
|
355
|
-
if (
|
|
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
|
-
const
|
|
363
|
-
return o[
|
|
362
|
+
const l = e.argumentCallback ? e.argumentCallback(r) : r;
|
|
363
|
+
return o[l];
|
|
364
364
|
};
|
|
365
365
|
}
|
|
366
366
|
function q(e) {
|
|
367
367
|
return (r, a = {}) => {
|
|
368
|
-
const
|
|
369
|
-
if (!
|
|
368
|
+
const c = a.width, o = c && e.matchPatterns[c] || e.matchPatterns[e.defaultMatchWidth], l = r.match(o);
|
|
369
|
+
if (!l)
|
|
370
370
|
return null;
|
|
371
|
-
const s =
|
|
371
|
+
const s = l[0], n = c && e.parsePatterns[c] || e.parsePatterns[e.defaultParseWidth], f = Array.isArray(n) ? he(n, (k) => k.test(s)) : (
|
|
372
372
|
// [TODO] -- I challenge you to fix the type
|
|
373
|
-
me(n, (
|
|
373
|
+
me(n, (k) => k.test(s))
|
|
374
374
|
);
|
|
375
375
|
let u;
|
|
376
|
-
u = e.valueCallback ? e.valueCallback(
|
|
376
|
+
u = e.valueCallback ? e.valueCallback(f) : f, u = a.valueCallback ? (
|
|
377
377
|
// [TODO] -- I challenge you to fix the type
|
|
378
378
|
a.valueCallback(u)
|
|
379
379
|
) : u;
|
|
@@ -393,11 +393,11 @@ function he(e, r) {
|
|
|
393
393
|
}
|
|
394
394
|
function fe(e) {
|
|
395
395
|
return (r, a = {}) => {
|
|
396
|
-
const
|
|
397
|
-
if (!l) return null;
|
|
398
|
-
const o = l[0], c = r.match(e.parsePattern);
|
|
396
|
+
const c = r.match(e.matchPattern);
|
|
399
397
|
if (!c) return null;
|
|
400
|
-
|
|
398
|
+
const o = c[0], l = r.match(e.parsePattern);
|
|
399
|
+
if (!l) return null;
|
|
400
|
+
let s = e.valueCallback ? e.valueCallback(l[0]) : l[0];
|
|
401
401
|
s = a.valueCallback ? a.valueCallback(s) : s;
|
|
402
402
|
const n = r.slice(o.length);
|
|
403
403
|
return { value: s, rest: n };
|
|
@@ -465,16 +465,16 @@ const ge = {
|
|
|
465
465
|
one: "quase 1 ano",
|
|
466
466
|
other: "quase {{count}} anos"
|
|
467
467
|
}
|
|
468
|
-
},
|
|
469
|
-
let
|
|
468
|
+
}, be = (e, r, a) => {
|
|
469
|
+
let c;
|
|
470
470
|
const o = ge[e];
|
|
471
|
-
return typeof o == "string" ?
|
|
472
|
-
},
|
|
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
|
+
}, ve = {
|
|
473
473
|
full: "EEEE, d 'de' MMMM 'de' y",
|
|
474
474
|
long: "d 'de' MMMM 'de' y",
|
|
475
475
|
medium: "d MMM y",
|
|
476
476
|
short: "dd/MM/yyyy"
|
|
477
|
-
},
|
|
477
|
+
}, pe = {
|
|
478
478
|
full: "HH:mm:ss zzzz",
|
|
479
479
|
long: "HH:mm:ss z",
|
|
480
480
|
medium: "HH:mm:ss",
|
|
@@ -486,11 +486,11 @@ const ge = {
|
|
|
486
486
|
short: "{{date}}, {{time}}"
|
|
487
487
|
}, Ne = {
|
|
488
488
|
date: X({
|
|
489
|
-
formats:
|
|
489
|
+
formats: ve,
|
|
490
490
|
defaultWidth: "full"
|
|
491
491
|
}),
|
|
492
492
|
time: X({
|
|
493
|
-
formats:
|
|
493
|
+
formats: pe,
|
|
494
494
|
defaultWidth: "full"
|
|
495
495
|
}),
|
|
496
496
|
dateTime: X({
|
|
@@ -507,7 +507,7 @@ const ge = {
|
|
|
507
507
|
tomorrow: "'amanhã às' p",
|
|
508
508
|
nextWeek: "eeee 'às' p",
|
|
509
509
|
other: "P"
|
|
510
|
-
}, ke = (e, r, a,
|
|
510
|
+
}, ke = (e, r, a, c) => {
|
|
511
511
|
const o = we[e];
|
|
512
512
|
return typeof o == "function" ? o(r) : o;
|
|
513
513
|
}, Ce = {
|
|
@@ -569,7 +569,7 @@ const ge = {
|
|
|
569
569
|
"sexta-feira",
|
|
570
570
|
"sábado"
|
|
571
571
|
]
|
|
572
|
-
},
|
|
572
|
+
}, _e = {
|
|
573
573
|
narrow: {
|
|
574
574
|
am: "a",
|
|
575
575
|
pm: "p",
|
|
@@ -600,7 +600,7 @@ const ge = {
|
|
|
600
600
|
evening: "tarde",
|
|
601
601
|
night: "noite"
|
|
602
602
|
}
|
|
603
|
-
},
|
|
603
|
+
}, $e = {
|
|
604
604
|
narrow: {
|
|
605
605
|
am: "a",
|
|
606
606
|
pm: "p",
|
|
@@ -631,11 +631,11 @@ const ge = {
|
|
|
631
631
|
evening: "da tarde",
|
|
632
632
|
night: "da noite"
|
|
633
633
|
}
|
|
634
|
-
},
|
|
634
|
+
}, Se = (e, r) => {
|
|
635
635
|
const a = Number(e);
|
|
636
636
|
return (r == null ? void 0 : r.unit) === "week" ? a + "ª" : a + "º";
|
|
637
|
-
},
|
|
638
|
-
ordinalNumber:
|
|
637
|
+
}, Me = {
|
|
638
|
+
ordinalNumber: Se,
|
|
639
639
|
era: H({
|
|
640
640
|
values: Ce,
|
|
641
641
|
defaultWidth: "wide"
|
|
@@ -654,16 +654,16 @@ const ge = {
|
|
|
654
654
|
defaultWidth: "wide"
|
|
655
655
|
}),
|
|
656
656
|
dayPeriod: H({
|
|
657
|
-
values:
|
|
657
|
+
values: _e,
|
|
658
658
|
defaultWidth: "wide",
|
|
659
|
-
formattingValues:
|
|
659
|
+
formattingValues: $e,
|
|
660
660
|
defaultFormattingWidth: "wide"
|
|
661
661
|
})
|
|
662
|
-
},
|
|
662
|
+
}, Ae = /^(\d+)[ºªo]?/i, Ve = /\d+/i, Oe = {
|
|
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
|
+
}, We = {
|
|
667
667
|
any: [/^ac/i, /^dc/i],
|
|
668
668
|
wide: [/^antes de cristo/i, /^depois de cristo/i]
|
|
669
669
|
}, De = {
|
|
@@ -730,14 +730,14 @@ const ge = {
|
|
|
730
730
|
}
|
|
731
731
|
}, Be = {
|
|
732
732
|
ordinalNumber: fe({
|
|
733
|
-
matchPattern:
|
|
734
|
-
parsePattern:
|
|
733
|
+
matchPattern: Ae,
|
|
734
|
+
parsePattern: Ve,
|
|
735
735
|
valueCallback: (e) => parseInt(e, 10)
|
|
736
736
|
}),
|
|
737
737
|
era: q({
|
|
738
|
-
matchPatterns:
|
|
738
|
+
matchPatterns: Oe,
|
|
739
739
|
defaultMatchWidth: "wide",
|
|
740
|
-
parsePatterns:
|
|
740
|
+
parsePatterns: We,
|
|
741
741
|
defaultParseWidth: "any"
|
|
742
742
|
}),
|
|
743
743
|
quarter: q({
|
|
@@ -767,10 +767,10 @@ const ge = {
|
|
|
767
767
|
})
|
|
768
768
|
}, Le = {
|
|
769
769
|
code: "pt-BR",
|
|
770
|
-
formatDistance:
|
|
770
|
+
formatDistance: be,
|
|
771
771
|
formatLong: Ne,
|
|
772
772
|
formatRelative: ke,
|
|
773
|
-
localize:
|
|
773
|
+
localize: Me,
|
|
774
774
|
match: Be,
|
|
775
775
|
options: {
|
|
776
776
|
weekStartsOn: 0,
|
|
@@ -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 ? oe(e, Y) : "", Ue = K(
|
|
786
|
-
({ shimRef: e, className: r, name: a, ...
|
|
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
|
-
ref: (
|
|
793
|
-
typeof o == "function" ? o(
|
|
792
|
+
ref: (l) => {
|
|
793
|
+
typeof o == "function" ? o(l) : o && (o.current = l), e && e(l);
|
|
794
794
|
}
|
|
795
795
|
}
|
|
796
796
|
)
|
|
@@ -798,27 +798,27 @@ const Y = "dd/MM/yyyy", ze = (e) => {
|
|
|
798
798
|
name: e,
|
|
799
799
|
label: r = "",
|
|
800
800
|
placeholder: a = "dd/mm/aaaa",
|
|
801
|
-
className:
|
|
801
|
+
className: c = "",
|
|
802
802
|
forceReadOnly: o = !1,
|
|
803
|
-
forceHidden:
|
|
803
|
+
forceHidden: l = !1
|
|
804
804
|
}) => {
|
|
805
|
-
const { control: s } =
|
|
806
|
-
field: { onChange:
|
|
807
|
-
fieldState: { error:
|
|
805
|
+
const { control: s } = O(), { isView: n } = D(), { isReadOnly: f, isHidden: u } = E(), m = o || !!f(e), k = l || !!u(e), {
|
|
806
|
+
field: { onChange: w, onBlur: P, value: h, ref: v },
|
|
807
|
+
fieldState: { error: g }
|
|
808
808
|
} = I({
|
|
809
809
|
name: e,
|
|
810
810
|
control: s
|
|
811
|
-
}),
|
|
811
|
+
}), N = j(() => ze(h), [h]), R = $(
|
|
812
812
|
(i) => {
|
|
813
|
-
|
|
813
|
+
w(i ? Xe(i) : "");
|
|
814
814
|
},
|
|
815
|
-
[
|
|
816
|
-
),
|
|
815
|
+
[w]
|
|
816
|
+
), y = $(
|
|
817
817
|
(i) => {
|
|
818
|
-
var d,
|
|
819
|
-
if (
|
|
820
|
-
const
|
|
821
|
-
|
|
818
|
+
var d, p;
|
|
819
|
+
if (v(i), i && ((p = (d = s._fields) == null ? void 0 : d[e]) != null && p._f)) {
|
|
820
|
+
const S = s._fields[e];
|
|
821
|
+
S._f.ref = {
|
|
822
822
|
focus: () => {
|
|
823
823
|
var C;
|
|
824
824
|
return (C = i.focus) == null ? void 0 : C.call(i);
|
|
@@ -828,8 +828,8 @@ const Y = "dd/MM/yyyy", ze = (e) => {
|
|
|
828
828
|
return (C = i.select) == null ? void 0 : C.call(i);
|
|
829
829
|
},
|
|
830
830
|
setCustomValidity: (C) => {
|
|
831
|
-
var
|
|
832
|
-
return (
|
|
831
|
+
var _;
|
|
832
|
+
return (_ = i.setCustomValidity) == null ? void 0 : _.call(i, C);
|
|
833
833
|
},
|
|
834
834
|
reportValidity: () => {
|
|
835
835
|
var C;
|
|
@@ -838,58 +838,58 @@ const Y = "dd/MM/yyyy", ze = (e) => {
|
|
|
838
838
|
};
|
|
839
839
|
}
|
|
840
840
|
},
|
|
841
|
-
[
|
|
841
|
+
[v, s, e]
|
|
842
842
|
);
|
|
843
|
-
return
|
|
843
|
+
return k ? null : n ? /* @__PURE__ */ b("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: h || "-" })
|
|
846
|
+
] }) : /* @__PURE__ */ b("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: `${g ? "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: N,
|
|
854
|
+
onChange: R,
|
|
855
|
+
onBlur: P,
|
|
856
856
|
dateFormat: Y,
|
|
857
857
|
placeholderText: a,
|
|
858
858
|
disabled: m,
|
|
859
859
|
readOnly: m,
|
|
860
860
|
locale: "pt-BR",
|
|
861
|
-
className: `form-control ${
|
|
861
|
+
className: `form-control ${g ? "border-red" : ""}`,
|
|
862
862
|
wrapperClassName: "w-100",
|
|
863
863
|
showMonthDropdown: !0,
|
|
864
864
|
showYearDropdown: !0,
|
|
865
865
|
dropdownMode: "select",
|
|
866
|
-
isClearable: !m && !!
|
|
866
|
+
isClearable: !m && !!h,
|
|
867
867
|
autoComplete: "off",
|
|
868
|
-
customInput: /* @__PURE__ */ t(Ue, { name: e, shimRef:
|
|
868
|
+
customInput: /* @__PURE__ */ t(Ue, { name: e, shimRef: y })
|
|
869
869
|
}
|
|
870
870
|
) }),
|
|
871
|
-
|
|
871
|
+
g && /* @__PURE__ */ t("span", { className: "help-block text-danger", children: String(g.message) })
|
|
872
872
|
] });
|
|
873
873
|
}, ut = T(Ye);
|
|
874
874
|
function Ge({
|
|
875
875
|
mapping: e = {},
|
|
876
876
|
defaultLabel: r = "Não reconhecido",
|
|
877
877
|
className: a = "",
|
|
878
|
-
hidden:
|
|
878
|
+
hidden: c = !1,
|
|
879
879
|
label: o
|
|
880
880
|
}) {
|
|
881
|
-
const { activityId:
|
|
881
|
+
const { activityId: l } = D(), s = j(() => !e || l === null || l === void 0 ? null : e[l], [l, e]);
|
|
882
882
|
if (!s)
|
|
883
|
-
return /* @__PURE__ */
|
|
883
|
+
return /* @__PURE__ */ b("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
|
-
return /* @__PURE__ */
|
|
890
|
+
return /* @__PURE__ */ b("div", { className: `form-group ${c ? "hidden" : ""}`, children: [
|
|
891
891
|
o && /* @__PURE__ */ t("label", { children: o }),
|
|
892
|
-
/* @__PURE__ */
|
|
892
|
+
/* @__PURE__ */ b("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
|
] })
|
|
@@ -900,93 +900,93 @@ function Qe({
|
|
|
900
900
|
name: e,
|
|
901
901
|
control: r,
|
|
902
902
|
defaultRowValue: a,
|
|
903
|
-
isView:
|
|
903
|
+
isView: c,
|
|
904
904
|
isReadOnly: o,
|
|
905
|
-
filters:
|
|
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, f] = W([]), [u, m] = W([]), k = () => Date.now() + Math.random(), w = (i) => {
|
|
908
908
|
try {
|
|
909
909
|
const d = JSON.parse(i);
|
|
910
|
-
return Array.isArray(d) ? d.map((
|
|
911
|
-
...
|
|
912
|
-
_uid:
|
|
910
|
+
return Array.isArray(d) ? d.map((p) => ({
|
|
911
|
+
...p,
|
|
912
|
+
_uid: p._uid || k()
|
|
913
913
|
})) : [];
|
|
914
914
|
} catch (d) {
|
|
915
915
|
return console.error(`Erro ao ler dados da tabela "${e}":`, d), [];
|
|
916
916
|
}
|
|
917
917
|
};
|
|
918
|
-
|
|
919
|
-
if (!(n.length > 0 && !
|
|
918
|
+
V(() => {
|
|
919
|
+
if (!(n.length > 0 && !c) && s.value && typeof s.value == "string") {
|
|
920
920
|
const i = JSON.stringify(n);
|
|
921
921
|
if (s.value === i) return;
|
|
922
|
-
const d =
|
|
923
|
-
|
|
922
|
+
const d = w(s.value);
|
|
923
|
+
f(d);
|
|
924
924
|
}
|
|
925
|
-
}, [s.value,
|
|
925
|
+
}, [s.value, c]), V(() => {
|
|
926
926
|
if (o) return;
|
|
927
927
|
const i = JSON.stringify(n);
|
|
928
928
|
s.value !== i && s.onChange(i);
|
|
929
929
|
}, [n, s, o]);
|
|
930
|
-
const
|
|
931
|
-
const i = { _uid:
|
|
932
|
-
|
|
933
|
-
}, [a]),
|
|
934
|
-
|
|
930
|
+
const P = $(() => {
|
|
931
|
+
const i = { _uid: k(), ...a };
|
|
932
|
+
f((d) => [...d, i]);
|
|
933
|
+
}, [a]), h = $(() => {
|
|
934
|
+
f(
|
|
935
935
|
(i) => i.filter((d) => !u.includes(d._uid))
|
|
936
936
|
), m([]);
|
|
937
|
-
}, [u]),
|
|
938
|
-
(i, d,
|
|
939
|
-
|
|
940
|
-
(
|
|
941
|
-
(C) => C._uid === i ? { ...C, [d]:
|
|
937
|
+
}, [u]), v = $(
|
|
938
|
+
(i, d, p) => {
|
|
939
|
+
f(
|
|
940
|
+
(S) => S.map(
|
|
941
|
+
(C) => C._uid === i ? { ...C, [d]: p } : C
|
|
942
942
|
)
|
|
943
943
|
);
|
|
944
944
|
},
|
|
945
945
|
[]
|
|
946
|
-
),
|
|
946
|
+
), g = $((i) => {
|
|
947
947
|
m(
|
|
948
|
-
(d) => d.includes(i) ? d.filter((
|
|
948
|
+
(d) => d.includes(i) ? d.filter((p) => p !== i) : [...d, i]
|
|
949
949
|
);
|
|
950
|
-
}, []),
|
|
950
|
+
}, []), N = $(
|
|
951
951
|
(i) => {
|
|
952
952
|
m(i ? n.map((d) => d._uid) : []);
|
|
953
953
|
},
|
|
954
954
|
[n]
|
|
955
|
-
),
|
|
956
|
-
(i) =>
|
|
955
|
+
), R = n.length > 0 && u.length === n.length, y = j(() => !l || l.length === 0 ? n : n.filter(
|
|
956
|
+
(i) => l.every((d) => {
|
|
957
957
|
if ("custom" in d)
|
|
958
958
|
return d.custom(i);
|
|
959
|
-
const
|
|
959
|
+
const p = i[d.field];
|
|
960
960
|
switch (d.operator) {
|
|
961
961
|
case "===":
|
|
962
|
-
return
|
|
962
|
+
return p === d.value;
|
|
963
963
|
case "!==":
|
|
964
|
-
return
|
|
964
|
+
return p !== d.value;
|
|
965
965
|
case ">":
|
|
966
|
-
return
|
|
966
|
+
return p > d.value;
|
|
967
967
|
case "<":
|
|
968
|
-
return
|
|
968
|
+
return p < d.value;
|
|
969
969
|
case ">=":
|
|
970
|
-
return
|
|
970
|
+
return p >= d.value;
|
|
971
971
|
case "<=":
|
|
972
|
-
return
|
|
972
|
+
return p <= d.value;
|
|
973
973
|
default:
|
|
974
974
|
return !0;
|
|
975
975
|
}
|
|
976
976
|
})
|
|
977
|
-
), [n,
|
|
977
|
+
), [n, l]);
|
|
978
978
|
return {
|
|
979
979
|
field: s,
|
|
980
980
|
tableRows: n,
|
|
981
|
-
visibleRows:
|
|
981
|
+
visibleRows: y,
|
|
982
982
|
selectedRowIds: u,
|
|
983
|
-
isAllSelected:
|
|
983
|
+
isAllSelected: R,
|
|
984
984
|
handle: {
|
|
985
|
-
addRow:
|
|
986
|
-
removeRows:
|
|
987
|
-
updateCellValue:
|
|
988
|
-
toggleSelection:
|
|
989
|
-
toggleSelectAll:
|
|
985
|
+
addRow: P,
|
|
986
|
+
removeRows: h,
|
|
987
|
+
updateCellValue: v,
|
|
988
|
+
toggleSelection: g,
|
|
989
|
+
toggleSelectAll: N
|
|
990
990
|
}
|
|
991
991
|
};
|
|
992
992
|
}
|
|
@@ -994,187 +994,187 @@ const ht = ({
|
|
|
994
994
|
name: e,
|
|
995
995
|
title: r = "Tabela Dinâmica",
|
|
996
996
|
columns: a,
|
|
997
|
-
defaultRowValue:
|
|
997
|
+
defaultRowValue: c = {},
|
|
998
998
|
forceReadOnly: o = !1,
|
|
999
|
-
layout:
|
|
999
|
+
layout: l = "fluid",
|
|
1000
1000
|
actions: s = !0,
|
|
1001
1001
|
filters: n = []
|
|
1002
1002
|
}) => {
|
|
1003
|
-
const { control:
|
|
1003
|
+
const { control: f } = O(), { isView: u, isReadOnly: m } = D(), { isReadOnly: k } = E(), w = o || u || m || k && k(e), { field: P, visibleRows: h, selectedRowIds: v, isAllSelected: g, handle: N } = Qe({
|
|
1004
1004
|
name: e,
|
|
1005
|
-
control:
|
|
1006
|
-
defaultRowValue:
|
|
1005
|
+
control: f,
|
|
1006
|
+
defaultRowValue: c,
|
|
1007
1007
|
isView: u,
|
|
1008
|
-
isReadOnly: !!
|
|
1008
|
+
isReadOnly: !!w,
|
|
1009
1009
|
filters: n
|
|
1010
|
-
}),
|
|
1011
|
-
return /* @__PURE__ */
|
|
1012
|
-
/* @__PURE__ */ t("input", { type: "hidden", ...
|
|
1013
|
-
/* @__PURE__ */
|
|
1010
|
+
}), R = l === "fixed";
|
|
1011
|
+
return /* @__PURE__ */ b("div", { className: `table-wrapper ${R ? "table-fixed" : "table-fluid"}`, children: [
|
|
1012
|
+
/* @__PURE__ */ t("input", { type: "hidden", ...P }),
|
|
1013
|
+
/* @__PURE__ */ b("div", { className: "header-handle", children: [
|
|
1014
1014
|
/* @__PURE__ */ t("h3", { children: r }),
|
|
1015
|
-
!
|
|
1016
|
-
/* @__PURE__ */
|
|
1015
|
+
!w && s && /* @__PURE__ */ b("div", { className: "handle-actions", children: [
|
|
1016
|
+
/* @__PURE__ */ b(
|
|
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: N.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: N.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__ */ b("table", { className: "table-custom", children: [
|
|
1034
|
+
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ b("tr", { children: [
|
|
1035
|
+
!w && /* @__PURE__ */ t("th", { style: { width: "50px" }, children: /* @__PURE__ */ t(
|
|
1036
1036
|
"input",
|
|
1037
1037
|
{
|
|
1038
1038
|
type: "checkbox",
|
|
1039
|
-
checked:
|
|
1040
|
-
onChange: (
|
|
1039
|
+
checked: g,
|
|
1040
|
+
onChange: (y) => N.toggleSelectAll(y.target.checked)
|
|
1041
1041
|
}
|
|
1042
1042
|
) }),
|
|
1043
|
-
a.map((
|
|
1043
|
+
a.map((y) => /* @__PURE__ */ t(
|
|
1044
1044
|
"th",
|
|
1045
1045
|
{
|
|
1046
|
-
style:
|
|
1047
|
-
children:
|
|
1046
|
+
style: y.width ? { minWidth: R ? y.width : "100%" } : { width: "max-content" },
|
|
1047
|
+
children: y.label
|
|
1048
1048
|
},
|
|
1049
|
-
|
|
1049
|
+
y.key
|
|
1050
1050
|
))
|
|
1051
1051
|
] }) }),
|
|
1052
|
-
/* @__PURE__ */
|
|
1053
|
-
|
|
1054
|
-
!
|
|
1052
|
+
/* @__PURE__ */ b("tbody", { children: [
|
|
1053
|
+
h.map((y, i) => /* @__PURE__ */ b("tr", { children: [
|
|
1054
|
+
!w && /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(
|
|
1055
1055
|
"input",
|
|
1056
1056
|
{
|
|
1057
1057
|
type: "checkbox",
|
|
1058
|
-
checked:
|
|
1059
|
-
onChange: () =>
|
|
1058
|
+
checked: v.includes(y._uid),
|
|
1059
|
+
onChange: () => N.toggleSelection(y._uid)
|
|
1060
1060
|
}
|
|
1061
1061
|
) }),
|
|
1062
1062
|
a.map((d) => /* @__PURE__ */ t("td", { children: d.render ? d.render.length <= 1 ? d.render({
|
|
1063
|
-
row:
|
|
1063
|
+
row: y,
|
|
1064
1064
|
index: i,
|
|
1065
|
-
updateRow: (
|
|
1066
|
-
isLocked: !!
|
|
1065
|
+
updateRow: (p, S) => N.updateCellValue(y._uid, p, S),
|
|
1066
|
+
isLocked: !!w,
|
|
1067
1067
|
isView: !!u
|
|
1068
1068
|
}) : d.render(
|
|
1069
|
-
|
|
1069
|
+
y,
|
|
1070
1070
|
i,
|
|
1071
|
-
(
|
|
1072
|
-
!!
|
|
1071
|
+
(p, S) => N.updateCellValue(y._uid, p, S),
|
|
1072
|
+
!!w,
|
|
1073
1073
|
!!u
|
|
1074
|
-
) :
|
|
1075
|
-
] },
|
|
1076
|
-
|
|
1074
|
+
) : y[d.key] }, `${y._uid}-${d.key}`))
|
|
1075
|
+
] }, y._uid)),
|
|
1076
|
+
h.length === 0 && /* @__PURE__ */ t("tr", { className: "empty-row", children: /* @__PURE__ */ t("td", { colSpan: 100, className: "text-center", children: w ? "Nenhum registro encontrado." : "Nenhum registro." }) })
|
|
1077
1077
|
] })
|
|
1078
1078
|
] }) })
|
|
1079
1079
|
] });
|
|
1080
1080
|
}, Je = (e) => {
|
|
1081
|
-
const [r, a] =
|
|
1081
|
+
const [r, a] = W(null), { watch: c } = O(), o = c(e), l = $(() => {
|
|
1082
1082
|
try {
|
|
1083
1083
|
const n = window.top.__REACT_ATTACHMENT_BRIDGE__;
|
|
1084
1084
|
if (n) {
|
|
1085
|
-
const
|
|
1086
|
-
a(
|
|
1085
|
+
const f = n.getAttachment(e);
|
|
1086
|
+
a(f || (o ? { name: o, documentId: 0 } : null));
|
|
1087
1087
|
} else
|
|
1088
1088
|
a(o ? { name: o, documentId: 0 } : null);
|
|
1089
1089
|
} catch {
|
|
1090
1090
|
a(o ? { name: o, documentId: 0 } : null);
|
|
1091
1091
|
}
|
|
1092
1092
|
}, [e, o]);
|
|
1093
|
-
return
|
|
1094
|
-
|
|
1095
|
-
const s = setInterval(
|
|
1093
|
+
return V(() => {
|
|
1094
|
+
l();
|
|
1095
|
+
const s = setInterval(l, 2e3);
|
|
1096
1096
|
return () => clearInterval(s);
|
|
1097
|
-
}, [
|
|
1097
|
+
}, [l]), { attachment: r, sync: l };
|
|
1098
1098
|
}, Ze = ({ name: e, label: r, help: a }) => {
|
|
1099
|
-
const [
|
|
1100
|
-
var
|
|
1099
|
+
const [c, o] = W(!1), { control: l } = O(), { field: s } = I({ name: e, control: l }), { attachment: n, sync: f } = Je(e), u = () => {
|
|
1100
|
+
var h;
|
|
1101
1101
|
try {
|
|
1102
|
-
const
|
|
1102
|
+
const v = window.top;
|
|
1103
1103
|
return {
|
|
1104
|
-
bridge:
|
|
1105
|
-
toast: (
|
|
1104
|
+
bridge: v.__REACT_ATTACHMENT_BRIDGE__,
|
|
1105
|
+
toast: (h = v.FLUIGC) == null ? void 0 : h.toast
|
|
1106
1106
|
};
|
|
1107
1107
|
} catch {
|
|
1108
1108
|
return { bridge: null, toast: null };
|
|
1109
1109
|
}
|
|
1110
|
-
}, m =
|
|
1111
|
-
const
|
|
1112
|
-
|
|
1113
|
-
const
|
|
1114
|
-
if (!
|
|
1115
|
-
const { bridge:
|
|
1116
|
-
o(!0),
|
|
1117
|
-
s.onChange(
|
|
1118
|
-
o(!1),
|
|
1119
|
-
}, 1e3),
|
|
1110
|
+
}, m = $(() => {
|
|
1111
|
+
const h = document.createElement("input");
|
|
1112
|
+
h.type = "file", h.onchange = (v) => {
|
|
1113
|
+
const g = v.target.files[0];
|
|
1114
|
+
if (!g) return;
|
|
1115
|
+
const { bridge: N, toast: R } = u();
|
|
1116
|
+
o(!0), N ? N.upload(g, e, (y) => {
|
|
1117
|
+
s.onChange(y.name), setTimeout(() => {
|
|
1118
|
+
o(!1), f();
|
|
1119
|
+
}, 1e3), R && R({
|
|
1120
1120
|
title: "Sucesso",
|
|
1121
1121
|
message: "Arquivo enviado",
|
|
1122
1122
|
type: "success"
|
|
1123
1123
|
});
|
|
1124
|
-
}) : (s.onChange(
|
|
1125
|
-
},
|
|
1126
|
-
}, [e, s,
|
|
1127
|
-
|
|
1128
|
-
const
|
|
1129
|
-
if (!
|
|
1130
|
-
const { bridge:
|
|
1131
|
-
|
|
1124
|
+
}) : (s.onChange(g.name), o(!1));
|
|
1125
|
+
}, h.click();
|
|
1126
|
+
}, [e, s, f]), k = (h) => {
|
|
1127
|
+
h.stopPropagation();
|
|
1128
|
+
const v = (n == null ? void 0 : n.name) || s.value;
|
|
1129
|
+
if (!v) return;
|
|
1130
|
+
const { bridge: g, toast: N } = u();
|
|
1131
|
+
g ? g.removeByFileName(v) ? (s.onChange(""), f(), N && N({
|
|
1132
1132
|
title: "Sucesso",
|
|
1133
1133
|
message: "Anexo removido",
|
|
1134
1134
|
type: "success"
|
|
1135
|
-
})) :
|
|
1135
|
+
})) : N && N({
|
|
1136
1136
|
title: "Erro",
|
|
1137
1137
|
message: "Erro ao remover anexo",
|
|
1138
1138
|
type: "danger"
|
|
1139
|
-
}) : (s.onChange(""),
|
|
1140
|
-
},
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1139
|
+
}) : (s.onChange(""), f());
|
|
1140
|
+
}, w = !!n && !c, P = [
|
|
1141
|
+
"fluig-attachment__box",
|
|
1142
|
+
w ? "fluig-attachment__box--has-file" : "",
|
|
1143
|
+
c ? "fluig-attachment__box--uploading" : ""
|
|
1144
|
+
].join(" ");
|
|
1145
|
+
return /* @__PURE__ */ b("div", { className: "form-group fluig-attachment", children: [
|
|
1146
|
+
r && /* @__PURE__ */ t("label", { className: "fluig-attachment__label", children: r }),
|
|
1147
|
+
/* @__PURE__ */ b(
|
|
1144
1148
|
"div",
|
|
1145
1149
|
{
|
|
1146
|
-
className:
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
borderRadius: "4px",
|
|
1151
|
-
display: "flex",
|
|
1152
|
-
justifyContent: "space-between",
|
|
1153
|
-
alignItems: "center",
|
|
1154
|
-
cursor: l ? "wait" : "pointer",
|
|
1155
|
-
backgroundColor: l ? "#f9f9f9" : "white"
|
|
1156
|
-
},
|
|
1157
|
-
onClick: y ? () => {
|
|
1158
|
-
var k;
|
|
1159
|
-
return (k = u().bridge) == null ? void 0 : k.view(n.name);
|
|
1150
|
+
className: P,
|
|
1151
|
+
onClick: w ? () => {
|
|
1152
|
+
var h;
|
|
1153
|
+
return (h = u().bridge) == null ? void 0 : h.view(n.name);
|
|
1160
1154
|
} : m,
|
|
1161
1155
|
children: [
|
|
1162
|
-
/* @__PURE__ */
|
|
1156
|
+
/* @__PURE__ */ b("span", { className: "fluig-attachment__content", children: [
|
|
1163
1157
|
/* @__PURE__ */ t(
|
|
1164
1158
|
"i",
|
|
1165
1159
|
{
|
|
1166
|
-
className: `fluigicon ${
|
|
1160
|
+
className: `fluigicon icon-sm ${c ? "fluigicon-loop-test" : w ? "fluigicon-file-pdf" : "fluigicon-paperclip"} fluig-attachment__icon`
|
|
1167
1161
|
}
|
|
1168
1162
|
),
|
|
1169
|
-
|
|
1163
|
+
/* @__PURE__ */ t("span", { className: "fluig-attachment__filename", children: c ? " Enviando..." : w ? n.name : a || "Anexar" })
|
|
1170
1164
|
] }),
|
|
1171
|
-
|
|
1165
|
+
w && /* @__PURE__ */ t(
|
|
1172
1166
|
"button",
|
|
1173
1167
|
{
|
|
1174
1168
|
type: "button",
|
|
1175
|
-
className: "btn btn-link text-danger",
|
|
1176
|
-
onClick:
|
|
1177
|
-
children: /* @__PURE__ */ t(
|
|
1169
|
+
className: "fluig-attachment__btn-remove btn btn-link text-danger",
|
|
1170
|
+
onClick: k,
|
|
1171
|
+
children: /* @__PURE__ */ t(
|
|
1172
|
+
"i",
|
|
1173
|
+
{
|
|
1174
|
+
className: "flaticon flaticon-trash icon-sm",
|
|
1175
|
+
"aria-hidden": "true"
|
|
1176
|
+
}
|
|
1177
|
+
)
|
|
1178
1178
|
}
|
|
1179
1179
|
)
|
|
1180
1180
|
]
|
|
@@ -1187,37 +1187,37 @@ function gt({
|
|
|
1187
1187
|
items: e,
|
|
1188
1188
|
time: r = 0,
|
|
1189
1189
|
showNavigation: a = !0,
|
|
1190
|
-
progressBar:
|
|
1190
|
+
progressBar: c = !0
|
|
1191
1191
|
}) {
|
|
1192
|
-
const [o,
|
|
1193
|
-
|
|
1194
|
-
}, [e.length]),
|
|
1195
|
-
|
|
1192
|
+
const [o, l] = W(0), [s, n] = W(0), f = B(null), u = B(null), m = $(() => {
|
|
1193
|
+
l((v) => (v + 1) % e.length), n(0);
|
|
1194
|
+
}, [e.length]), k = $(() => {
|
|
1195
|
+
l((v) => (v - 1 + e.length) % e.length), n(0);
|
|
1196
1196
|
}, [e.length]);
|
|
1197
|
-
if (
|
|
1197
|
+
if (V(() => {
|
|
1198
1198
|
if (r > 0 && e.length > 1) {
|
|
1199
|
-
const
|
|
1200
|
-
|
|
1201
|
-
n((
|
|
1199
|
+
const g = 100 / r * 100;
|
|
1200
|
+
f.current = setInterval(m, r), u.current = setInterval(() => {
|
|
1201
|
+
n((N) => N >= 100 ? 0 : N + g);
|
|
1202
1202
|
}, 100);
|
|
1203
1203
|
}
|
|
1204
1204
|
return () => {
|
|
1205
|
-
|
|
1205
|
+
f.current && clearInterval(f.current), u.current && clearInterval(u.current);
|
|
1206
1206
|
};
|
|
1207
1207
|
}, [r, m, e.length, o]), !e || e.length === 0) return null;
|
|
1208
|
-
const
|
|
1209
|
-
return /* @__PURE__ */
|
|
1210
|
-
/* @__PURE__ */
|
|
1211
|
-
a && e.length > 1 && /* @__PURE__ */
|
|
1212
|
-
/* @__PURE__ */ t("button", { className: "nav-btn prev", onClick:
|
|
1208
|
+
const w = e[o], P = typeof w == "string" ? w : w.url, h = /\.(jpg|jpeg|png|gif|webp)$/i.test(P);
|
|
1209
|
+
return /* @__PURE__ */ b("div", { className: "carousel-root", children: [
|
|
1210
|
+
/* @__PURE__ */ b("div", { className: "carousel-viewport", children: [
|
|
1211
|
+
a && e.length > 1 && /* @__PURE__ */ b(U, { children: [
|
|
1212
|
+
/* @__PURE__ */ t("button", { className: "nav-btn prev", onClick: k, children: /* @__PURE__ */ t("i", { className: "flaticon flaticon-chevron-left" }) }),
|
|
1213
1213
|
/* @__PURE__ */ t("button", { className: "nav-btn next", onClick: m, children: /* @__PURE__ */ t("i", { className: "flaticon flaticon-chevron-right" }) })
|
|
1214
1214
|
] }),
|
|
1215
|
-
/* @__PURE__ */ t("div", { className: "carousel-media", children:
|
|
1215
|
+
/* @__PURE__ */ t("div", { className: "carousel-media", children: h ? /* @__PURE__ */ t("img", { src: P, alt: "Slide", className: "carousel-image" }) : /* @__PURE__ */ b("div", { className: "carousel-file-fallback", children: [
|
|
1216
1216
|
/* @__PURE__ */ t("i", { className: "flaticon flaticon-file icon-xl" }),
|
|
1217
1217
|
/* @__PURE__ */ t(
|
|
1218
1218
|
"a",
|
|
1219
1219
|
{
|
|
1220
|
-
href:
|
|
1220
|
+
href: P,
|
|
1221
1221
|
target: "_blank",
|
|
1222
1222
|
rel: "noreferrer",
|
|
1223
1223
|
className: "btn-open",
|
|
@@ -1225,18 +1225,18 @@ function gt({
|
|
|
1225
1225
|
}
|
|
1226
1226
|
)
|
|
1227
1227
|
] }) }),
|
|
1228
|
-
e.length > 1 && /* @__PURE__ */ t("div", { className: "carousel-dots", children: e.map((
|
|
1228
|
+
e.length > 1 && /* @__PURE__ */ t("div", { className: "carousel-dots", children: e.map((v, g) => /* @__PURE__ */ t(
|
|
1229
1229
|
"div",
|
|
1230
1230
|
{
|
|
1231
|
-
className: `dot ${
|
|
1231
|
+
className: `dot ${g === o ? "active" : ""}`,
|
|
1232
1232
|
onClick: () => {
|
|
1233
|
-
|
|
1233
|
+
l(g), n(0);
|
|
1234
1234
|
}
|
|
1235
1235
|
},
|
|
1236
|
-
|
|
1236
|
+
g
|
|
1237
1237
|
)) })
|
|
1238
1238
|
] }),
|
|
1239
|
-
|
|
1239
|
+
c && r > 0 && e.length > 1 && /* @__PURE__ */ t("div", { className: "carousel-progress-container", children: /* @__PURE__ */ t(
|
|
1240
1240
|
"div",
|
|
1241
1241
|
{
|
|
1242
1242
|
className: "carousel-progress-bar",
|
|
@@ -1245,44 +1245,44 @@ function gt({
|
|
|
1245
1245
|
) })
|
|
1246
1246
|
] });
|
|
1247
1247
|
}
|
|
1248
|
-
function
|
|
1248
|
+
function bt({
|
|
1249
1249
|
title: e,
|
|
1250
1250
|
isOpen: r,
|
|
1251
1251
|
onOpen: a,
|
|
1252
|
-
onClose:
|
|
1252
|
+
onClose: c,
|
|
1253
1253
|
content: o,
|
|
1254
|
-
footer:
|
|
1254
|
+
footer: l,
|
|
1255
1255
|
width: s
|
|
1256
1256
|
}) {
|
|
1257
|
-
const n =
|
|
1258
|
-
(
|
|
1259
|
-
|
|
1257
|
+
const n = $(
|
|
1258
|
+
(f) => {
|
|
1259
|
+
f.key === "Escape" && c();
|
|
1260
1260
|
},
|
|
1261
|
-
[
|
|
1261
|
+
[c]
|
|
1262
1262
|
);
|
|
1263
|
-
return
|
|
1263
|
+
return V(() => (r && (document.addEventListener("keydown", n), a == null || a(), document.body.style.overflow = "hidden"), () => {
|
|
1264
1264
|
document.removeEventListener("keydown", n), document.body.style.overflow = "auto";
|
|
1265
1265
|
}), [r, n, a]), r ? /* @__PURE__ */ t(
|
|
1266
1266
|
"div",
|
|
1267
1267
|
{
|
|
1268
1268
|
className: "modal-overlay",
|
|
1269
|
-
onClick:
|
|
1269
|
+
onClick: c,
|
|
1270
1270
|
"aria-modal": "true",
|
|
1271
1271
|
role: "dialog",
|
|
1272
|
-
children: /* @__PURE__ */
|
|
1272
|
+
children: /* @__PURE__ */ b(
|
|
1273
1273
|
"div",
|
|
1274
1274
|
{
|
|
1275
1275
|
style: { maxWidth: s },
|
|
1276
1276
|
className: "modal-container",
|
|
1277
|
-
onClick: (
|
|
1277
|
+
onClick: (f) => f.stopPropagation(),
|
|
1278
1278
|
children: [
|
|
1279
|
-
/* @__PURE__ */
|
|
1279
|
+
/* @__PURE__ */ b("div", { className: "modal-header", children: [
|
|
1280
1280
|
/* @__PURE__ */ t("h3", { children: e }),
|
|
1281
1281
|
/* @__PURE__ */ t(
|
|
1282
1282
|
"div",
|
|
1283
1283
|
{
|
|
1284
1284
|
className: "btn-close-modal",
|
|
1285
|
-
onClick:
|
|
1285
|
+
onClick: c,
|
|
1286
1286
|
role: "button",
|
|
1287
1287
|
"aria-label": "Fechar modal",
|
|
1288
1288
|
children: /* @__PURE__ */ t(
|
|
@@ -1296,30 +1296,30 @@ function pt({
|
|
|
1296
1296
|
)
|
|
1297
1297
|
] }),
|
|
1298
1298
|
/* @__PURE__ */ t("div", { className: "modal-content", children: o }),
|
|
1299
|
-
|
|
1299
|
+
l && /* @__PURE__ */ t("div", { className: "modal-footer", children: l })
|
|
1300
1300
|
]
|
|
1301
1301
|
}
|
|
1302
1302
|
)
|
|
1303
1303
|
}
|
|
1304
1304
|
) : null;
|
|
1305
1305
|
}
|
|
1306
|
-
function
|
|
1306
|
+
function vt({
|
|
1307
1307
|
logo: e,
|
|
1308
1308
|
childs: r,
|
|
1309
1309
|
footer: a,
|
|
1310
|
-
contentExternal:
|
|
1310
|
+
contentExternal: c,
|
|
1311
1311
|
bg: o,
|
|
1312
|
-
color:
|
|
1312
|
+
color: l,
|
|
1313
1313
|
onSelect: s
|
|
1314
1314
|
}) {
|
|
1315
|
-
return /* @__PURE__ */
|
|
1316
|
-
/* @__PURE__ */
|
|
1315
|
+
return /* @__PURE__ */ b("div", { className: "main-container dfea", children: [
|
|
1316
|
+
/* @__PURE__ */ b("div", { className: "sidebar-wrapper", style: { backgroundColor: `${o}` }, children: [
|
|
1317
1317
|
e && /* @__PURE__ */ t("div", { className: "sidebar-logo", children: /* @__PURE__ */ t("img", { src: e, alt: "", width: "auto", height: "28px" }) }),
|
|
1318
1318
|
/* @__PURE__ */ t("ul", { className: "sidebar-childs-content", children: r == null ? void 0 : r.map(
|
|
1319
1319
|
(n) => {
|
|
1320
|
-
var
|
|
1321
|
-
return n != null && n.options && ((
|
|
1322
|
-
/* @__PURE__ */
|
|
1320
|
+
var f, u;
|
|
1321
|
+
return n != null && n.options && ((f = n == null ? void 0 : n.options) == null ? void 0 : f.length) > 0 ? /* @__PURE__ */ t(U, { children: /* @__PURE__ */ b("ul", { className: "sidebar-child sidebar-options-content", children: [
|
|
1322
|
+
/* @__PURE__ */ b(
|
|
1323
1323
|
"li",
|
|
1324
1324
|
{
|
|
1325
1325
|
className: "sidebar-child",
|
|
@@ -1327,7 +1327,7 @@ function bt({
|
|
|
1327
1327
|
var m;
|
|
1328
1328
|
(m = n.action) == null || m.call(n), s == null || s(n.id);
|
|
1329
1329
|
},
|
|
1330
|
-
style: { color: `${
|
|
1330
|
+
style: { color: `${l}` },
|
|
1331
1331
|
children: [
|
|
1332
1332
|
n.icon && /* @__PURE__ */ t("i", { className: n.icon }),
|
|
1333
1333
|
n.label
|
|
@@ -1339,14 +1339,14 @@ function bt({
|
|
|
1339
1339
|
{
|
|
1340
1340
|
className: "sidebar-option",
|
|
1341
1341
|
onClick: () => {
|
|
1342
|
-
var
|
|
1343
|
-
(
|
|
1342
|
+
var k;
|
|
1343
|
+
(k = m.action) == null || k.call(m), s == null || s(m.id);
|
|
1344
1344
|
},
|
|
1345
|
-
style: { color: `${
|
|
1345
|
+
style: { color: `${l}` },
|
|
1346
1346
|
children: m.label
|
|
1347
1347
|
}
|
|
1348
1348
|
))
|
|
1349
|
-
] }) }) : /* @__PURE__ */
|
|
1349
|
+
] }) }) : /* @__PURE__ */ b(
|
|
1350
1350
|
"li",
|
|
1351
1351
|
{
|
|
1352
1352
|
className: "sidebar-child",
|
|
@@ -1354,7 +1354,7 @@ function bt({
|
|
|
1354
1354
|
var m;
|
|
1355
1355
|
(m = n.action) == null || m.call(n), s == null || s(n.id);
|
|
1356
1356
|
},
|
|
1357
|
-
style: { color: `${
|
|
1357
|
+
style: { color: `${l}` },
|
|
1358
1358
|
children: [
|
|
1359
1359
|
n.icon && /* @__PURE__ */ t("i", { className: n.icon }),
|
|
1360
1360
|
n.label
|
|
@@ -1365,7 +1365,7 @@ function bt({
|
|
|
1365
1365
|
) }),
|
|
1366
1366
|
a && /* @__PURE__ */ t("div", { className: "sidebar-footer", children: a })
|
|
1367
1367
|
] }),
|
|
1368
|
-
/* @__PURE__ */ t("div", { className: "sidebar-content-external", children:
|
|
1368
|
+
/* @__PURE__ */ t("div", { className: "sidebar-content-external", children: c })
|
|
1369
1369
|
] });
|
|
1370
1370
|
}
|
|
1371
1371
|
export {
|
|
@@ -1374,10 +1374,10 @@ export {
|
|
|
1374
1374
|
lt as Checkbox,
|
|
1375
1375
|
ut as DatePicker,
|
|
1376
1376
|
ot as Input,
|
|
1377
|
-
|
|
1377
|
+
bt as Modal,
|
|
1378
1378
|
ct as RadioBtn,
|
|
1379
1379
|
it as Select,
|
|
1380
|
-
|
|
1380
|
+
vt as Sidebar,
|
|
1381
1381
|
ht as SimpleTable,
|
|
1382
1382
|
mt as StatusBadge,
|
|
1383
1383
|
dt as TextArea
|