@tech-diefra/fluig-ui 1.2.10 → 1.2.12
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 +1 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +472 -449
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { useFormContext as
|
|
1
|
+
import { jsxs as f, jsx as t, Fragment as J } from "react/jsx-runtime";
|
|
2
|
+
import { memo as _, useMemo as I, useCallback as S, useState as T, useRef as B, useEffect as A, forwardRef as K } from "react";
|
|
3
|
+
import { useFormContext as D, useController as F, useFormState as ee } from "react-hook-form";
|
|
4
4
|
import { IMaskInput as te } from "react-imask";
|
|
5
|
-
import { useSection as
|
|
5
|
+
import { useSection as j, useFluigRuntime as O } from "@fluig-kit/ecm";
|
|
6
6
|
import ne, { registerLocale as ae } from "react-datepicker";
|
|
7
|
-
import { parse as re, isValid as
|
|
7
|
+
import { parse as re, isValid as ie, format as se } from "date-fns";
|
|
8
8
|
const oe = {
|
|
9
9
|
cpf: "000.000.000-00",
|
|
10
10
|
cnpj: "00.000.000/0000-00",
|
|
@@ -18,58 +18,58 @@ function le({
|
|
|
18
18
|
type: c = "text",
|
|
19
19
|
mask: o,
|
|
20
20
|
className: l = "",
|
|
21
|
-
forceReadOnly:
|
|
21
|
+
forceReadOnly: i = !1,
|
|
22
22
|
forceHidden: a = !1
|
|
23
23
|
}) {
|
|
24
|
-
const { isReadOnly:
|
|
24
|
+
const { isReadOnly: g, isHidden: u } = j(), m = i || !!g(e), w = a || !!u(e), { control: k } = D(), { isView: N } = O(), { field: h } = F({ name: e, control: k }), { errors: p } = ee({ name: e }), b = p == null ? void 0 : p[e], C = I(
|
|
25
25
|
() => o ? oe[o] ?? o : null,
|
|
26
26
|
[o]
|
|
27
|
-
), P = S((
|
|
28
|
-
if (!
|
|
29
|
-
const d =
|
|
27
|
+
), P = S((s) => {
|
|
28
|
+
if (!s) return "";
|
|
29
|
+
const d = s.replace(/\D/g, "");
|
|
30
30
|
return (Number(d) / 100).toLocaleString("pt-BR", {
|
|
31
31
|
style: "currency",
|
|
32
32
|
currency: "BRL"
|
|
33
33
|
});
|
|
34
|
-
}, []),
|
|
35
|
-
(
|
|
34
|
+
}, []), y = S(
|
|
35
|
+
(s) => c === "monetary" ? P(s) : s,
|
|
36
36
|
[c, P]
|
|
37
37
|
);
|
|
38
|
-
return
|
|
38
|
+
return N ? /* @__PURE__ */ f("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__ */ f("div", { className: `form-group ${w ? "hidden" : ""}`, children: [
|
|
42
42
|
/* @__PURE__ */ t("label", { children: r }),
|
|
43
|
-
|
|
43
|
+
C ? /* @__PURE__ */ t(
|
|
44
44
|
te,
|
|
45
45
|
{
|
|
46
46
|
name: e,
|
|
47
|
-
mask:
|
|
48
|
-
value: String(
|
|
47
|
+
mask: C,
|
|
48
|
+
value: String(h.value ?? ""),
|
|
49
49
|
unmask: !1,
|
|
50
|
-
onAccept: (
|
|
50
|
+
onAccept: (s) => h.onChange(y(s)),
|
|
51
51
|
placeholder: n,
|
|
52
|
-
readOnly:
|
|
53
|
-
className: `form-control ${
|
|
54
|
-
inputRef:
|
|
55
|
-
onBlur:
|
|
52
|
+
readOnly: m,
|
|
53
|
+
className: `form-control ${b ? "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: (
|
|
62
|
+
value: h.value ?? "",
|
|
63
|
+
onChange: (s) => h.onChange(y(s.target.value)),
|
|
64
64
|
placeholder: n,
|
|
65
|
-
readOnly:
|
|
66
|
-
className: `form-control ${
|
|
65
|
+
readOnly: m,
|
|
66
|
+
className: `form-control ${b ? "border-red" : ""} ${l}`
|
|
67
67
|
}
|
|
68
68
|
),
|
|
69
|
-
|
|
69
|
+
b && /* @__PURE__ */ t("p", { className: "text-danger", children: String(b.message) })
|
|
70
70
|
] });
|
|
71
71
|
}
|
|
72
|
-
const
|
|
72
|
+
const it = _(le);
|
|
73
73
|
function ce({
|
|
74
74
|
name: e,
|
|
75
75
|
label: r = "",
|
|
@@ -77,102 +77,102 @@ function ce({
|
|
|
77
77
|
placeholder: c = "",
|
|
78
78
|
labelKey: o = "label",
|
|
79
79
|
valueKey: l = "value",
|
|
80
|
-
enableSearch:
|
|
80
|
+
enableSearch: i = !1,
|
|
81
81
|
searchPlaceholder: a = "Buscar...",
|
|
82
|
-
loading:
|
|
83
|
-
onSearchChange:
|
|
84
|
-
debounceTime:
|
|
85
|
-
onSelect:
|
|
82
|
+
loading: g = !1,
|
|
83
|
+
onSearchChange: u,
|
|
84
|
+
debounceTime: m = 300,
|
|
85
|
+
onSelect: w,
|
|
86
86
|
forceReadOnly: k = !1,
|
|
87
|
-
forceHidden:
|
|
87
|
+
forceHidden: N = !1
|
|
88
88
|
}) {
|
|
89
|
-
const { isReadOnly:
|
|
90
|
-
field: { onChange: d, value:
|
|
91
|
-
fieldState: { error:
|
|
92
|
-
} =
|
|
89
|
+
const { isReadOnly: h, isHidden: p } = j(), b = k || !!h(e), C = N || !!p(e), { control: P, clearErrors: y } = D(), { isView: s } = O(), {
|
|
90
|
+
field: { onChange: d, value: v, ref: V },
|
|
91
|
+
fieldState: { error: x }
|
|
92
|
+
} = F({
|
|
93
93
|
name: e,
|
|
94
94
|
control: P
|
|
95
|
-
}), [$,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
}, [
|
|
99
|
-
const
|
|
100
|
-
|
|
95
|
+
}), [$, W] = T(!1), [M, Q] = T(""), E = B(null), z = B(u);
|
|
96
|
+
A(() => {
|
|
97
|
+
z.current = u;
|
|
98
|
+
}, [u]), A(() => {
|
|
99
|
+
const R = (H) => {
|
|
100
|
+
E.current && !E.current.contains(H.target) && W(!1);
|
|
101
101
|
};
|
|
102
|
-
return document.addEventListener("mousedown",
|
|
103
|
-
}, []),
|
|
102
|
+
return document.addEventListener("mousedown", R), () => document.removeEventListener("mousedown", R);
|
|
103
|
+
}, []), A(() => {
|
|
104
104
|
$ || Q("");
|
|
105
|
-
}, [$]),
|
|
106
|
-
if (!
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
},
|
|
110
|
-
return () => clearTimeout(
|
|
111
|
-
}, [
|
|
112
|
-
const U = I(() =>
|
|
113
|
-
(
|
|
114
|
-
) : n ?? [], [n,
|
|
115
|
-
if (
|
|
116
|
-
if (typeof
|
|
117
|
-
return String(
|
|
118
|
-
const
|
|
119
|
-
(H) => String(H == null ? void 0 : H[l]) === String(
|
|
105
|
+
}, [$]), A(() => {
|
|
106
|
+
if (!i) return;
|
|
107
|
+
const R = setTimeout(() => {
|
|
108
|
+
z.current && z.current(M);
|
|
109
|
+
}, m);
|
|
110
|
+
return () => clearTimeout(R);
|
|
111
|
+
}, [M, i, m]);
|
|
112
|
+
const U = I(() => i && !u && M.trim() ? n.filter(
|
|
113
|
+
(R) => String((R == null ? void 0 : R[o]) ?? "").toLowerCase().includes(M.toLowerCase())
|
|
114
|
+
) : n ?? [], [n, i, u, M, o]), G = I(() => {
|
|
115
|
+
if (v == null) return "";
|
|
116
|
+
if (typeof v == "object")
|
|
117
|
+
return String(v[l] ?? "");
|
|
118
|
+
const R = (n || []).find(
|
|
119
|
+
(H) => String(H == null ? void 0 : H[l]) === String(v)
|
|
120
120
|
);
|
|
121
|
-
return String(
|
|
122
|
-
}, [
|
|
123
|
-
|
|
121
|
+
return String(R ? (R == null ? void 0 : R[o]) ?? "" : v);
|
|
122
|
+
}, [v, n, l, o]), Z = (R) => {
|
|
123
|
+
b || (d(R[l]), w && w(R), y(e), W(!1));
|
|
124
124
|
};
|
|
125
|
-
return /* @__PURE__ */
|
|
125
|
+
return /* @__PURE__ */ f(
|
|
126
126
|
"div",
|
|
127
127
|
{
|
|
128
|
-
className: `select-wrapper form-group ${
|
|
129
|
-
ref:
|
|
128
|
+
className: `select-wrapper form-group ${C ? "hidden" : ""}`,
|
|
129
|
+
ref: E,
|
|
130
130
|
children: [
|
|
131
131
|
/* @__PURE__ */ t("label", { className: "control-label", children: r }),
|
|
132
|
-
|
|
133
|
-
/* @__PURE__ */
|
|
132
|
+
s ? /* @__PURE__ */ t("span", { className: "form-control", children: G || "-" }) : /* @__PURE__ */ f(J, { children: [
|
|
133
|
+
/* @__PURE__ */ f(
|
|
134
134
|
"div",
|
|
135
135
|
{
|
|
136
|
-
className: `select-control ${
|
|
137
|
-
onClick: () => !
|
|
136
|
+
className: `select-control ${x ? "border-red" : ""} ${b ? "readOnly" : ""}`,
|
|
137
|
+
onClick: () => !b && W((R) => !R),
|
|
138
138
|
ref: V,
|
|
139
139
|
children: [
|
|
140
|
-
/* @__PURE__ */ t("span", { className: `select-display ${
|
|
140
|
+
/* @__PURE__ */ t("span", { className: `select-display ${b ? "readOnly" : ""}`, children: G || c }),
|
|
141
141
|
/* @__PURE__ */ t("i", { className: "flaticon flaticon-chevron-down select-icon" })
|
|
142
142
|
]
|
|
143
143
|
}
|
|
144
144
|
),
|
|
145
|
-
$ && !
|
|
146
|
-
|
|
145
|
+
$ && !b && /* @__PURE__ */ f("div", { className: "select-dropdown", children: [
|
|
146
|
+
i && /* @__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: M,
|
|
152
|
+
onChange: (R) => Q(R.target.value),
|
|
153
|
+
placeholder: g ? "Carregando..." : a,
|
|
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: g ? /* @__PURE__ */ t("li", { className: "select-option readOnly", children: "Carregando..." }) : U.length > 0 ? U.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[o]
|
|
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: v || "" }),
|
|
170
|
+
x && /* @__PURE__ */ t("p", { className: "text-danger", children: String(x.message) })
|
|
171
171
|
]
|
|
172
172
|
}
|
|
173
173
|
);
|
|
174
174
|
}
|
|
175
|
-
const
|
|
175
|
+
const st = _(ce);
|
|
176
176
|
function ot({
|
|
177
177
|
name: e,
|
|
178
178
|
options: r = [],
|
|
@@ -180,57 +180,57 @@ function ot({
|
|
|
180
180
|
valueKey: c = "value",
|
|
181
181
|
labelKey: o = "label",
|
|
182
182
|
forceReadOnly: l = !1,
|
|
183
|
-
forceHidden:
|
|
183
|
+
forceHidden: i = !1
|
|
184
184
|
}) {
|
|
185
|
-
var
|
|
186
|
-
const a =
|
|
185
|
+
var v, V;
|
|
186
|
+
const a = D(), { isView: g, isReadOnly: u } = O(), { isReadOnly: m, isHidden: w } = j(), k = m ? m(e) : !1, N = w ? w(e) : !1, h = l || k, p = i || N, b = h || u || g;
|
|
187
187
|
if (!a || !e)
|
|
188
188
|
return console.error("Checkbox requer contexto de formulário e nome."), null;
|
|
189
|
-
const
|
|
190
|
-
const
|
|
191
|
-
return
|
|
192
|
-
}, {}), P = a.watch(e),
|
|
193
|
-
|
|
194
|
-
const
|
|
195
|
-
(!
|
|
189
|
+
const C = () => !r || !a ? {} : r.reduce((x, $) => {
|
|
190
|
+
const W = $[c], M = a.getValues(W);
|
|
191
|
+
return x[W] = M === "on", x;
|
|
192
|
+
}, {}), P = a.watch(e), y = I(() => P && typeof P == "object" ? P : C(), [P, r, c]);
|
|
193
|
+
A(() => {
|
|
194
|
+
const x = a.getValues(e);
|
|
195
|
+
(!x || typeof x != "object") && a.setValue(e, y, {
|
|
196
196
|
shouldDirty: !1,
|
|
197
197
|
shouldValidate: !1
|
|
198
198
|
});
|
|
199
|
-
}, [
|
|
200
|
-
const
|
|
201
|
-
if (
|
|
202
|
-
const
|
|
203
|
-
a.setValue(e,
|
|
199
|
+
}, [y, e, a]);
|
|
200
|
+
const s = (x, $) => {
|
|
201
|
+
if (b) return;
|
|
202
|
+
const W = { ...y, [x]: $ };
|
|
203
|
+
a.setValue(e, W, {
|
|
204
204
|
shouldDirty: !0,
|
|
205
205
|
shouldValidate: !0
|
|
206
|
-
}), a.setValue(
|
|
207
|
-
}, d = (V = (
|
|
208
|
-
return /* @__PURE__ */
|
|
206
|
+
}), a.setValue(x, $ ? "on" : "", { shouldValidate: !1 });
|
|
207
|
+
}, d = (V = (v = a.formState) == null ? void 0 : v.errors) == null ? void 0 : V[e];
|
|
208
|
+
return /* @__PURE__ */ f("div", { className: `form-group ${p ? "hidden" : ""}`, children: [
|
|
209
209
|
n && /* @__PURE__ */ t("label", { children: n }),
|
|
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 ${b ? "readOnly" : ""}`,
|
|
214
|
+
children: r.map((x) => {
|
|
215
|
+
const $ = String(x[c]), W = y[$] === !0;
|
|
216
|
+
return /* @__PURE__ */ f("div", { children: [
|
|
217
217
|
/* @__PURE__ */ t("input", { type: "hidden", ...a.register($) }),
|
|
218
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ f(
|
|
219
219
|
"label",
|
|
220
220
|
{
|
|
221
|
-
className: `custom-checkbox ${
|
|
221
|
+
className: `custom-checkbox ${W ? "checked" : ""} ${b ? "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: W,
|
|
228
|
+
disabled: b,
|
|
229
|
+
onChange: (M) => s($, M.target.checked)
|
|
230
230
|
}
|
|
231
231
|
),
|
|
232
232
|
/* @__PURE__ */ t("span", { className: "checkmark" }),
|
|
233
|
-
/* @__PURE__ */ t("span", { children:
|
|
233
|
+
/* @__PURE__ */ t("span", { children: x[o] })
|
|
234
234
|
]
|
|
235
235
|
}
|
|
236
236
|
)
|
|
@@ -248,36 +248,36 @@ function de({
|
|
|
248
248
|
valueKey: c = "value",
|
|
249
249
|
labelKey: o = "label",
|
|
250
250
|
iconKey: l = "icon",
|
|
251
|
-
forceReadOnly:
|
|
251
|
+
forceReadOnly: i = !1,
|
|
252
252
|
forceHidden: a = !1
|
|
253
253
|
}) {
|
|
254
|
-
const { isReadOnly:
|
|
254
|
+
const { isReadOnly: g, isHidden: u } = j(), m = i || !!g(e), w = a || !!u(e), { control: k } = D(), { isView: N, isReadOnly: h } = O(), {
|
|
255
255
|
field: p,
|
|
256
|
-
fieldState: { error:
|
|
257
|
-
} =
|
|
256
|
+
fieldState: { error: b }
|
|
257
|
+
} = F({
|
|
258
258
|
name: e,
|
|
259
259
|
control: k
|
|
260
|
-
}),
|
|
261
|
-
(
|
|
262
|
-
|
|
260
|
+
}), C = m || h || N, P = p.value ?? "", y = S(
|
|
261
|
+
(s) => {
|
|
262
|
+
C || p.onChange(s);
|
|
263
263
|
},
|
|
264
|
-
[
|
|
264
|
+
[C, p]
|
|
265
265
|
);
|
|
266
|
-
return /* @__PURE__ */
|
|
266
|
+
return /* @__PURE__ */ f("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 ${C ? "view-mode" : ""}`,
|
|
272
272
|
"data-field-name": e,
|
|
273
|
-
children: n.map((
|
|
274
|
-
const d =
|
|
275
|
-
return /* @__PURE__ */
|
|
273
|
+
children: n.map((s) => {
|
|
274
|
+
const d = s[c], v = P === d, V = s.color ? { "--customColor": s.color } : void 0;
|
|
275
|
+
return /* @__PURE__ */ f(
|
|
276
276
|
"label",
|
|
277
277
|
{
|
|
278
278
|
htmlFor: `${e}_${d}`,
|
|
279
279
|
style: V,
|
|
280
|
-
className: `btn fs-ellipsis ${
|
|
280
|
+
className: `btn fs-ellipsis ${v ? "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: v,
|
|
290
290
|
className: "hidden",
|
|
291
|
-
onChange: () =>
|
|
292
|
-
disabled:
|
|
291
|
+
onChange: () => y(d),
|
|
292
|
+
disabled: C
|
|
293
293
|
}
|
|
294
294
|
),
|
|
295
|
-
|
|
295
|
+
s[l] && /* @__PURE__ */ t("i", { className: `${s[l]} icon-sm` }),
|
|
296
296
|
" ",
|
|
297
|
-
|
|
297
|
+
s[o]
|
|
298
298
|
]
|
|
299
299
|
},
|
|
300
300
|
d
|
|
@@ -302,46 +302,46 @@ function de({
|
|
|
302
302
|
})
|
|
303
303
|
}
|
|
304
304
|
),
|
|
305
|
-
|
|
305
|
+
b && /* @__PURE__ */ t("p", { className: "text-danger", children: String(b.message) })
|
|
306
306
|
] });
|
|
307
307
|
}
|
|
308
|
-
const lt =
|
|
308
|
+
const lt = _(de), ue = ({
|
|
309
309
|
name: e,
|
|
310
310
|
label: r = "",
|
|
311
311
|
placeholder: n = "",
|
|
312
312
|
className: c = "",
|
|
313
313
|
rows: o = 4,
|
|
314
314
|
maxLength: l,
|
|
315
|
-
forceReadOnly:
|
|
315
|
+
forceReadOnly: i = !1,
|
|
316
316
|
forceHidden: a = !1
|
|
317
317
|
}) => {
|
|
318
|
-
const { isReadOnly:
|
|
319
|
-
field:
|
|
318
|
+
const { isReadOnly: g, isHidden: u } = j(), m = i || !!g(e), w = a || !!u(e), { control: k } = D(), { isView: N } = O(), {
|
|
319
|
+
field: h,
|
|
320
320
|
fieldState: { error: p }
|
|
321
|
-
} =
|
|
321
|
+
} = F({
|
|
322
322
|
name: e,
|
|
323
323
|
control: k
|
|
324
324
|
});
|
|
325
|
-
return
|
|
325
|
+
return N ? /* @__PURE__ */ f("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: h.value || "-" })
|
|
328
|
+
] }) : /* @__PURE__ */ f("div", { className: `form-group ${w ? "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
335
|
maxLength: l,
|
|
336
|
-
value:
|
|
336
|
+
value: h.value || "",
|
|
337
337
|
placeholder: n,
|
|
338
|
-
readOnly:
|
|
338
|
+
readOnly: m,
|
|
339
339
|
className: `form-control ${p ? "border-red" : ""} ${c}`
|
|
340
340
|
}
|
|
341
341
|
),
|
|
342
342
|
p && /* @__PURE__ */ t("p", { className: "text-danger", children: String(p.message) })
|
|
343
343
|
] });
|
|
344
|
-
}, ct =
|
|
344
|
+
}, ct = _(ue);
|
|
345
345
|
function X(e) {
|
|
346
346
|
return (r = {}) => {
|
|
347
347
|
const n = r.width ? String(r.width) : e.defaultWidth;
|
|
@@ -353,11 +353,11 @@ function q(e) {
|
|
|
353
353
|
const c = n != null && n.context ? String(n.context) : "standalone";
|
|
354
354
|
let o;
|
|
355
355
|
if (c === "formatting" && e.formattingValues) {
|
|
356
|
-
const
|
|
357
|
-
o = e.formattingValues[a] || e.formattingValues[
|
|
356
|
+
const i = e.defaultFormattingWidth || e.defaultWidth, a = n != null && n.width ? String(n.width) : i;
|
|
357
|
+
o = e.formattingValues[a] || e.formattingValues[i];
|
|
358
358
|
} else {
|
|
359
|
-
const
|
|
360
|
-
o = e.values[a] || e.values[
|
|
359
|
+
const i = e.defaultWidth, a = n != null && n.width ? String(n.width) : e.defaultWidth;
|
|
360
|
+
o = e.values[a] || e.values[i];
|
|
361
361
|
}
|
|
362
362
|
const l = e.argumentCallback ? e.argumentCallback(r) : r;
|
|
363
363
|
return o[l];
|
|
@@ -368,17 +368,17 @@ function L(e) {
|
|
|
368
368
|
const c = n.width, o = c && e.matchPatterns[c] || e.matchPatterns[e.defaultMatchWidth], l = r.match(o);
|
|
369
369
|
if (!l)
|
|
370
370
|
return null;
|
|
371
|
-
const
|
|
371
|
+
const i = l[0], a = c && e.parsePatterns[c] || e.parsePatterns[e.defaultParseWidth], g = Array.isArray(a) ? he(a, (w) => w.test(i)) : (
|
|
372
372
|
// [TODO] -- I challenge you to fix the type
|
|
373
|
-
me(a, (
|
|
373
|
+
me(a, (w) => w.test(i))
|
|
374
374
|
);
|
|
375
|
-
let
|
|
376
|
-
|
|
375
|
+
let u;
|
|
376
|
+
u = e.valueCallback ? e.valueCallback(g) : g, u = n.valueCallback ? (
|
|
377
377
|
// [TODO] -- I challenge you to fix the type
|
|
378
|
-
n.valueCallback(
|
|
379
|
-
) :
|
|
380
|
-
const
|
|
381
|
-
return { value:
|
|
378
|
+
n.valueCallback(u)
|
|
379
|
+
) : u;
|
|
380
|
+
const m = r.slice(i.length);
|
|
381
|
+
return { value: u, rest: m };
|
|
382
382
|
};
|
|
383
383
|
}
|
|
384
384
|
function me(e, r) {
|
|
@@ -397,10 +397,10 @@ function fe(e) {
|
|
|
397
397
|
if (!c) return null;
|
|
398
398
|
const o = c[0], l = r.match(e.parsePattern);
|
|
399
399
|
if (!l) return null;
|
|
400
|
-
let
|
|
401
|
-
|
|
400
|
+
let i = e.valueCallback ? e.valueCallback(l[0]) : l[0];
|
|
401
|
+
i = n.valueCallback ? n.valueCallback(i) : i;
|
|
402
402
|
const a = r.slice(o.length);
|
|
403
|
-
return { value:
|
|
403
|
+
return { value: i, rest: a };
|
|
404
404
|
};
|
|
405
405
|
}
|
|
406
406
|
const ge = {
|
|
@@ -465,16 +465,16 @@ const ge = {
|
|
|
465
465
|
one: "quase 1 ano",
|
|
466
466
|
other: "quase {{count}} anos"
|
|
467
467
|
}
|
|
468
|
-
},
|
|
468
|
+
}, pe = (e, r, n) => {
|
|
469
469
|
let c;
|
|
470
470
|
const o = ge[e];
|
|
471
471
|
return typeof o == "string" ? c = o : r === 1 ? c = o.one : c = o.other.replace("{{count}}", String(r)), n != null && n.addSuffix ? n.comparison && n.comparison > 0 ? "em " + c : "há " + c : c;
|
|
472
|
-
},
|
|
472
|
+
}, be = {
|
|
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
|
+
}, ve = {
|
|
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
|
}, we = {
|
|
488
488
|
date: X({
|
|
489
|
-
formats:
|
|
489
|
+
formats: be,
|
|
490
490
|
defaultWidth: "full"
|
|
491
491
|
}),
|
|
492
492
|
time: X({
|
|
493
|
-
formats:
|
|
493
|
+
formats: ve,
|
|
494
494
|
defaultWidth: "full"
|
|
495
495
|
}),
|
|
496
496
|
dateTime: X({
|
|
@@ -507,14 +507,14 @@ const ge = {
|
|
|
507
507
|
tomorrow: "'amanhã às' p",
|
|
508
508
|
nextWeek: "eeee 'às' p",
|
|
509
509
|
other: "P"
|
|
510
|
-
},
|
|
510
|
+
}, xe = (e, r, n, c) => {
|
|
511
511
|
const o = Ne[e];
|
|
512
512
|
return typeof o == "function" ? o(r) : o;
|
|
513
|
-
},
|
|
513
|
+
}, ke = {
|
|
514
514
|
narrow: ["AC", "DC"],
|
|
515
515
|
abbreviated: ["AC", "DC"],
|
|
516
516
|
wide: ["antes de cristo", "depois de cristo"]
|
|
517
|
-
},
|
|
517
|
+
}, Ce = {
|
|
518
518
|
narrow: ["1", "2", "3", "4"],
|
|
519
519
|
abbreviated: ["T1", "T2", "T3", "T4"],
|
|
520
520
|
wide: ["1º trimestre", "2º trimestre", "3º trimestre", "4º trimestre"]
|
|
@@ -634,14 +634,14 @@ const ge = {
|
|
|
634
634
|
}, Ve = (e, r) => {
|
|
635
635
|
const n = Number(e);
|
|
636
636
|
return (r == null ? void 0 : r.unit) === "week" ? n + "ª" : n + "º";
|
|
637
|
-
},
|
|
637
|
+
}, We = {
|
|
638
638
|
ordinalNumber: Ve,
|
|
639
639
|
era: q({
|
|
640
|
-
values:
|
|
640
|
+
values: ke,
|
|
641
641
|
defaultWidth: "wide"
|
|
642
642
|
}),
|
|
643
643
|
quarter: q({
|
|
644
|
-
values:
|
|
644
|
+
values: Ce,
|
|
645
645
|
defaultWidth: "wide",
|
|
646
646
|
argumentCallback: (e) => e - 1
|
|
647
647
|
}),
|
|
@@ -659,24 +659,24 @@ const ge = {
|
|
|
659
659
|
formattingValues: Se,
|
|
660
660
|
defaultFormattingWidth: "wide"
|
|
661
661
|
})
|
|
662
|
-
},
|
|
662
|
+
}, Me = /^(\d+)[ºªo]?/i, Ae = /\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
|
+
}, De = {
|
|
667
667
|
any: [/^ac/i, /^dc/i],
|
|
668
668
|
wide: [/^antes de cristo/i, /^depois de cristo/i]
|
|
669
|
-
},
|
|
669
|
+
}, je = {
|
|
670
670
|
narrow: /^[1234]/i,
|
|
671
671
|
abbreviated: /^T[1234]/i,
|
|
672
672
|
wide: /^[1234](º)? trimestre/i
|
|
673
673
|
}, Ie = {
|
|
674
674
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
675
|
-
},
|
|
675
|
+
}, _e = {
|
|
676
676
|
narrow: /^[jfmajsond]/i,
|
|
677
677
|
abbreviated: /^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,
|
|
678
678
|
wide: /^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i
|
|
679
|
-
},
|
|
679
|
+
}, Fe = {
|
|
680
680
|
narrow: [
|
|
681
681
|
/^j/i,
|
|
682
682
|
/^f/i,
|
|
@@ -705,7 +705,7 @@ const ge = {
|
|
|
705
705
|
/^nov/i,
|
|
706
706
|
/^dez/i
|
|
707
707
|
]
|
|
708
|
-
},
|
|
708
|
+
}, Te = {
|
|
709
709
|
narrow: /^(dom|[23456]ª?|s[aá]b)/i,
|
|
710
710
|
short: /^(dom|[23456]ª?|s[aá]b)/i,
|
|
711
711
|
abbreviated: /^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,
|
|
@@ -728,33 +728,33 @@ const ge = {
|
|
|
728
728
|
evening: /tarde/i,
|
|
729
729
|
night: /noite/i
|
|
730
730
|
}
|
|
731
|
-
},
|
|
731
|
+
}, Be = {
|
|
732
732
|
ordinalNumber: fe({
|
|
733
|
-
matchPattern:
|
|
734
|
-
parsePattern:
|
|
733
|
+
matchPattern: Me,
|
|
734
|
+
parsePattern: Ae,
|
|
735
735
|
valueCallback: (e) => parseInt(e, 10)
|
|
736
736
|
}),
|
|
737
737
|
era: L({
|
|
738
|
-
matchPatterns:
|
|
738
|
+
matchPatterns: Oe,
|
|
739
739
|
defaultMatchWidth: "wide",
|
|
740
|
-
parsePatterns:
|
|
740
|
+
parsePatterns: De,
|
|
741
741
|
defaultParseWidth: "any"
|
|
742
742
|
}),
|
|
743
743
|
quarter: L({
|
|
744
|
-
matchPatterns:
|
|
744
|
+
matchPatterns: je,
|
|
745
745
|
defaultMatchWidth: "wide",
|
|
746
746
|
parsePatterns: Ie,
|
|
747
747
|
defaultParseWidth: "any",
|
|
748
748
|
valueCallback: (e) => e + 1
|
|
749
749
|
}),
|
|
750
750
|
month: L({
|
|
751
|
-
matchPatterns:
|
|
751
|
+
matchPatterns: _e,
|
|
752
752
|
defaultMatchWidth: "wide",
|
|
753
|
-
parsePatterns:
|
|
753
|
+
parsePatterns: Fe,
|
|
754
754
|
defaultParseWidth: "any"
|
|
755
755
|
}),
|
|
756
756
|
day: L({
|
|
757
|
-
matchPatterns:
|
|
757
|
+
matchPatterns: Te,
|
|
758
758
|
defaultMatchWidth: "wide",
|
|
759
759
|
parsePatterns: He,
|
|
760
760
|
defaultParseWidth: "any"
|
|
@@ -765,24 +765,24 @@ const ge = {
|
|
|
765
765
|
parsePatterns: Le,
|
|
766
766
|
defaultParseWidth: "any"
|
|
767
767
|
})
|
|
768
|
-
},
|
|
768
|
+
}, Ee = {
|
|
769
769
|
code: "pt-BR",
|
|
770
|
-
formatDistance:
|
|
770
|
+
formatDistance: pe,
|
|
771
771
|
formatLong: we,
|
|
772
|
-
formatRelative:
|
|
773
|
-
localize:
|
|
774
|
-
match:
|
|
772
|
+
formatRelative: xe,
|
|
773
|
+
localize: We,
|
|
774
|
+
match: Be,
|
|
775
775
|
options: {
|
|
776
776
|
weekStartsOn: 0,
|
|
777
777
|
firstWeekContainsDate: 1
|
|
778
778
|
}
|
|
779
779
|
};
|
|
780
|
-
ae("pt-BR",
|
|
781
|
-
const Y = "dd/MM/yyyy",
|
|
780
|
+
ae("pt-BR", Ee);
|
|
781
|
+
const Y = "dd/MM/yyyy", ze = (e) => {
|
|
782
782
|
if (!e) return null;
|
|
783
783
|
const r = re(e, Y, /* @__PURE__ */ new Date());
|
|
784
|
-
return
|
|
785
|
-
}, Xe = (e) => e ?
|
|
784
|
+
return ie(r) ? r : null;
|
|
785
|
+
}, Xe = (e) => e ? se(e, Y) : "", Je = K(
|
|
786
786
|
({ shimRef: e, className: r, name: n, ...c }, o) => /* @__PURE__ */ t(
|
|
787
787
|
"input",
|
|
788
788
|
{
|
|
@@ -802,75 +802,75 @@ const Y = "dd/MM/yyyy", Ee = (e) => {
|
|
|
802
802
|
forceReadOnly: o = !1,
|
|
803
803
|
forceHidden: l = !1
|
|
804
804
|
}) => {
|
|
805
|
-
const { control:
|
|
806
|
-
field: { onChange: k, onBlur:
|
|
807
|
-
fieldState: { error:
|
|
808
|
-
} =
|
|
805
|
+
const { control: i } = D(), { isView: a } = O(), { isReadOnly: g, isHidden: u } = j(), m = o || !!g(e), w = l || !!u(e), {
|
|
806
|
+
field: { onChange: k, onBlur: N, value: h, ref: p },
|
|
807
|
+
fieldState: { error: b }
|
|
808
|
+
} = F({
|
|
809
809
|
name: e,
|
|
810
|
-
control:
|
|
811
|
-
}),
|
|
812
|
-
(
|
|
813
|
-
k(
|
|
810
|
+
control: i
|
|
811
|
+
}), C = I(() => ze(h), [h]), P = S(
|
|
812
|
+
(s) => {
|
|
813
|
+
k(s ? Xe(s) : "");
|
|
814
814
|
},
|
|
815
815
|
[k]
|
|
816
|
-
),
|
|
817
|
-
(
|
|
818
|
-
var d,
|
|
819
|
-
if (p(
|
|
820
|
-
const V =
|
|
816
|
+
), y = S(
|
|
817
|
+
(s) => {
|
|
818
|
+
var d, v;
|
|
819
|
+
if (p(s), s && ((v = (d = i._fields) == null ? void 0 : d[e]) != null && v._f)) {
|
|
820
|
+
const V = i._fields[e];
|
|
821
821
|
V._f.ref = {
|
|
822
822
|
focus: () => {
|
|
823
|
-
var
|
|
824
|
-
return (
|
|
823
|
+
var x;
|
|
824
|
+
return (x = s.focus) == null ? void 0 : x.call(s);
|
|
825
825
|
},
|
|
826
826
|
select: () => {
|
|
827
|
-
var
|
|
828
|
-
return (
|
|
827
|
+
var x;
|
|
828
|
+
return (x = s.select) == null ? void 0 : x.call(s);
|
|
829
829
|
},
|
|
830
|
-
setCustomValidity: (
|
|
830
|
+
setCustomValidity: (x) => {
|
|
831
831
|
var $;
|
|
832
|
-
return ($ =
|
|
832
|
+
return ($ = s.setCustomValidity) == null ? void 0 : $.call(s, x);
|
|
833
833
|
},
|
|
834
834
|
reportValidity: () => {
|
|
835
|
-
var
|
|
836
|
-
return (
|
|
835
|
+
var x;
|
|
836
|
+
return (x = s.reportValidity) == null ? void 0 : x.call(s);
|
|
837
837
|
}
|
|
838
838
|
};
|
|
839
839
|
}
|
|
840
840
|
},
|
|
841
|
-
[p,
|
|
841
|
+
[p, i, e]
|
|
842
842
|
);
|
|
843
|
-
return
|
|
843
|
+
return w ? null : a ? /* @__PURE__ */ f("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__ */ f("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: `${b ? "border-red" : ""}`, children: /* @__PURE__ */ t(
|
|
849
849
|
ne,
|
|
850
850
|
{
|
|
851
851
|
id: e,
|
|
852
852
|
name: e,
|
|
853
|
-
selected:
|
|
853
|
+
selected: C,
|
|
854
854
|
onChange: P,
|
|
855
|
-
onBlur:
|
|
855
|
+
onBlur: N,
|
|
856
856
|
dateFormat: Y,
|
|
857
857
|
placeholderText: n,
|
|
858
|
-
disabled:
|
|
859
|
-
readOnly:
|
|
858
|
+
disabled: m,
|
|
859
|
+
readOnly: m,
|
|
860
860
|
locale: "pt-BR",
|
|
861
|
-
className: `form-control ${
|
|
861
|
+
className: `form-control ${b ? "border-red" : ""}`,
|
|
862
862
|
wrapperClassName: "w-100",
|
|
863
863
|
showMonthDropdown: !0,
|
|
864
864
|
showYearDropdown: !0,
|
|
865
865
|
dropdownMode: "select",
|
|
866
|
-
isClearable: !
|
|
866
|
+
isClearable: !m && !!h,
|
|
867
867
|
autoComplete: "off",
|
|
868
|
-
customInput: /* @__PURE__ */ t(Je, { name: e, shimRef:
|
|
868
|
+
customInput: /* @__PURE__ */ t(Je, { name: e, shimRef: y })
|
|
869
869
|
}
|
|
870
870
|
) }),
|
|
871
|
-
|
|
871
|
+
b && /* @__PURE__ */ t("span", { className: "help-block text-danger", children: String(b.message) })
|
|
872
872
|
] });
|
|
873
|
-
}, dt =
|
|
873
|
+
}, dt = _(Ye);
|
|
874
874
|
function Qe({
|
|
875
875
|
mapping: e = {},
|
|
876
876
|
defaultLabel: r = "Não reconhecido",
|
|
@@ -878,24 +878,24 @@ function Qe({
|
|
|
878
878
|
hidden: c = !1,
|
|
879
879
|
label: o
|
|
880
880
|
}) {
|
|
881
|
-
const { activityId: l } =
|
|
882
|
-
if (!
|
|
883
|
-
return /* @__PURE__ */
|
|
881
|
+
const { activityId: l } = O(), i = I(() => !e || l === null || l === void 0 ? null : e[l], [l, e]);
|
|
882
|
+
if (!i)
|
|
883
|
+
return /* @__PURE__ */ f("div", { className: `form-group ${c ? "hidden" : ""}`, children: [
|
|
884
884
|
o && /* @__PURE__ */ t("label", { children: o }),
|
|
885
885
|
/* @__PURE__ */ t("div", { className: `status-badge default ${n}`, children: r })
|
|
886
886
|
] });
|
|
887
887
|
const a = {
|
|
888
|
-
"--customColor":
|
|
888
|
+
"--customColor": i.color
|
|
889
889
|
};
|
|
890
|
-
return /* @__PURE__ */
|
|
890
|
+
return /* @__PURE__ */ f("div", { className: `form-group ${c ? "hidden" : ""}`, children: [
|
|
891
891
|
o && /* @__PURE__ */ t("label", { children: o }),
|
|
892
|
-
/* @__PURE__ */
|
|
893
|
-
|
|
894
|
-
/* @__PURE__ */ t("span", { children:
|
|
892
|
+
/* @__PURE__ */ f("div", { className: `status-badge ${n}`, style: a, children: [
|
|
893
|
+
i.icon && /* @__PURE__ */ t("i", { className: i.icon }),
|
|
894
|
+
/* @__PURE__ */ t("span", { children: i.label })
|
|
895
895
|
] })
|
|
896
896
|
] });
|
|
897
897
|
}
|
|
898
|
-
const ut =
|
|
898
|
+
const ut = _(Qe);
|
|
899
899
|
function Ue({
|
|
900
900
|
name: e,
|
|
901
901
|
control: r,
|
|
@@ -904,89 +904,89 @@ function Ue({
|
|
|
904
904
|
isReadOnly: o,
|
|
905
905
|
filters: l = []
|
|
906
906
|
}) {
|
|
907
|
-
const { field:
|
|
907
|
+
const { field: i } = F({ name: e, control: r }), [a, g] = T([]), [u, m] = T([]), w = () => Date.now() + Math.random(), k = (s) => {
|
|
908
908
|
try {
|
|
909
|
-
const d = JSON.parse(
|
|
910
|
-
return Array.isArray(d) ? d.map((
|
|
911
|
-
...
|
|
912
|
-
_uid:
|
|
909
|
+
const d = JSON.parse(s);
|
|
910
|
+
return Array.isArray(d) ? d.map((v) => ({
|
|
911
|
+
...v,
|
|
912
|
+
_uid: v._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
|
-
|
|
919
|
-
if (!(a.length > 0 && !c) &&
|
|
920
|
-
const
|
|
921
|
-
if (
|
|
922
|
-
const d = k(
|
|
923
|
-
|
|
918
|
+
A(() => {
|
|
919
|
+
if (!(a.length > 0 && !c) && i.value && typeof i.value == "string") {
|
|
920
|
+
const s = JSON.stringify(a);
|
|
921
|
+
if (i.value === s) return;
|
|
922
|
+
const d = k(i.value);
|
|
923
|
+
g(d);
|
|
924
924
|
}
|
|
925
|
-
}, [
|
|
925
|
+
}, [i.value, c]), A(() => {
|
|
926
926
|
if (o) return;
|
|
927
|
-
const
|
|
928
|
-
|
|
929
|
-
}, [a,
|
|
930
|
-
const
|
|
931
|
-
const
|
|
932
|
-
|
|
933
|
-
}, [n]),
|
|
934
|
-
|
|
935
|
-
(
|
|
936
|
-
),
|
|
937
|
-
}, [
|
|
938
|
-
(
|
|
939
|
-
|
|
927
|
+
const s = JSON.stringify(a);
|
|
928
|
+
i.value !== s && i.onChange(s);
|
|
929
|
+
}, [a, i, o]);
|
|
930
|
+
const N = S(() => {
|
|
931
|
+
const s = { _uid: w(), ...n };
|
|
932
|
+
g((d) => [...d, s]);
|
|
933
|
+
}, [n]), h = S(() => {
|
|
934
|
+
g(
|
|
935
|
+
(s) => s.filter((d) => !u.includes(d._uid))
|
|
936
|
+
), m([]);
|
|
937
|
+
}, [u]), p = S(
|
|
938
|
+
(s, d, v) => {
|
|
939
|
+
g(
|
|
940
940
|
(V) => V.map(
|
|
941
|
-
(
|
|
941
|
+
(x) => x._uid === s ? { ...x, [d]: v } : x
|
|
942
942
|
)
|
|
943
943
|
);
|
|
944
944
|
},
|
|
945
945
|
[]
|
|
946
|
-
),
|
|
947
|
-
|
|
948
|
-
(d) => d.includes(
|
|
946
|
+
), b = S((s) => {
|
|
947
|
+
m(
|
|
948
|
+
(d) => d.includes(s) ? d.filter((v) => v !== s) : [...d, s]
|
|
949
949
|
);
|
|
950
|
-
}, []),
|
|
951
|
-
(
|
|
952
|
-
|
|
950
|
+
}, []), C = S(
|
|
951
|
+
(s) => {
|
|
952
|
+
m(s ? a.map((d) => d._uid) : []);
|
|
953
953
|
},
|
|
954
954
|
[a]
|
|
955
|
-
), P = a.length > 0 &&
|
|
956
|
-
(
|
|
955
|
+
), P = a.length > 0 && u.length === a.length, y = I(() => !l || l.length === 0 ? a : a.filter(
|
|
956
|
+
(s) => l.every((d) => {
|
|
957
957
|
if ("custom" in d)
|
|
958
|
-
return d.custom(
|
|
959
|
-
const
|
|
958
|
+
return d.custom(s);
|
|
959
|
+
const v = s[d.field];
|
|
960
960
|
switch (d.operator) {
|
|
961
961
|
case "===":
|
|
962
|
-
return
|
|
962
|
+
return v === d.value;
|
|
963
963
|
case "!==":
|
|
964
|
-
return
|
|
964
|
+
return v !== d.value;
|
|
965
965
|
case ">":
|
|
966
|
-
return
|
|
966
|
+
return v > d.value;
|
|
967
967
|
case "<":
|
|
968
|
-
return
|
|
968
|
+
return v < d.value;
|
|
969
969
|
case ">=":
|
|
970
|
-
return
|
|
970
|
+
return v >= d.value;
|
|
971
971
|
case "<=":
|
|
972
|
-
return
|
|
972
|
+
return v <= d.value;
|
|
973
973
|
default:
|
|
974
974
|
return !0;
|
|
975
975
|
}
|
|
976
976
|
})
|
|
977
977
|
), [a, l]);
|
|
978
978
|
return {
|
|
979
|
-
field:
|
|
979
|
+
field: i,
|
|
980
980
|
tableRows: a,
|
|
981
|
-
visibleRows:
|
|
982
|
-
selectedRowIds:
|
|
981
|
+
visibleRows: y,
|
|
982
|
+
selectedRowIds: u,
|
|
983
983
|
isAllSelected: P,
|
|
984
984
|
handle: {
|
|
985
|
-
addRow:
|
|
986
|
-
removeRows:
|
|
985
|
+
addRow: N,
|
|
986
|
+
removeRows: h,
|
|
987
987
|
updateCellValue: p,
|
|
988
|
-
toggleSelection:
|
|
989
|
-
toggleSelectAll:
|
|
988
|
+
toggleSelection: b,
|
|
989
|
+
toggleSelectAll: C
|
|
990
990
|
}
|
|
991
991
|
};
|
|
992
992
|
}
|
|
@@ -997,29 +997,29 @@ const mt = ({
|
|
|
997
997
|
defaultRowValue: c = {},
|
|
998
998
|
forceReadOnly: o = !1,
|
|
999
999
|
layout: l = "fluid",
|
|
1000
|
-
actions:
|
|
1000
|
+
actions: i = !0,
|
|
1001
1001
|
filters: a = []
|
|
1002
1002
|
}) => {
|
|
1003
|
-
const { control:
|
|
1003
|
+
const { control: g } = D(), { isView: u, isReadOnly: m } = O(), { isReadOnly: w } = j(), k = o || u || m || w && w(e), { field: N, visibleRows: h, selectedRowIds: p, isAllSelected: b, handle: C } = Ue({
|
|
1004
1004
|
name: e,
|
|
1005
|
-
control:
|
|
1005
|
+
control: g,
|
|
1006
1006
|
defaultRowValue: c,
|
|
1007
|
-
isView:
|
|
1007
|
+
isView: u,
|
|
1008
1008
|
isReadOnly: !!k,
|
|
1009
1009
|
filters: a
|
|
1010
1010
|
}), P = l === "fixed";
|
|
1011
|
-
return /* @__PURE__ */
|
|
1012
|
-
/* @__PURE__ */ t("input", { type: "hidden", ...
|
|
1013
|
-
/* @__PURE__ */
|
|
1011
|
+
return /* @__PURE__ */ f("div", { className: `table-wrapper ${P ? "table-fixed" : "table-fluid"}`, children: [
|
|
1012
|
+
/* @__PURE__ */ t("input", { type: "hidden", ...N }),
|
|
1013
|
+
/* @__PURE__ */ f("div", { className: "header-handle", children: [
|
|
1014
1014
|
/* @__PURE__ */ t("h3", { children: r }),
|
|
1015
|
-
!k &&
|
|
1016
|
-
/* @__PURE__ */
|
|
1015
|
+
!k && i && /* @__PURE__ */ f("div", { className: "handle-actions", children: [
|
|
1016
|
+
/* @__PURE__ */ f(
|
|
1017
1017
|
"button",
|
|
1018
1018
|
{
|
|
1019
1019
|
type: "button",
|
|
1020
1020
|
className: `btn ${p.length > 0 ? "btn-danger" : ""}`,
|
|
1021
1021
|
disabled: p.length === 0,
|
|
1022
|
-
onClick:
|
|
1022
|
+
onClick: C.removeRows,
|
|
1023
1023
|
children: [
|
|
1024
1024
|
"Remover (",
|
|
1025
1025
|
p.length,
|
|
@@ -1027,53 +1027,53 @@ const mt = ({
|
|
|
1027
1027
|
]
|
|
1028
1028
|
}
|
|
1029
1029
|
),
|
|
1030
|
-
/* @__PURE__ */ t("button", { type: "button", className: "btn-add", onClick:
|
|
1030
|
+
/* @__PURE__ */ t("button", { type: "button", className: "btn-add", onClick: C.addRow, children: "Adicionar" })
|
|
1031
1031
|
] })
|
|
1032
1032
|
] }),
|
|
1033
|
-
/* @__PURE__ */ t("div", { className: "table-scroll", children: /* @__PURE__ */
|
|
1034
|
-
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */
|
|
1033
|
+
/* @__PURE__ */ t("div", { className: "table-scroll", children: /* @__PURE__ */ f("table", { className: "table-custom", children: [
|
|
1034
|
+
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ f("tr", { children: [
|
|
1035
1035
|
!k && /* @__PURE__ */ t("th", { style: { width: "50px" }, children: /* @__PURE__ */ t(
|
|
1036
1036
|
"input",
|
|
1037
1037
|
{
|
|
1038
1038
|
type: "checkbox",
|
|
1039
|
-
checked:
|
|
1040
|
-
onChange: (
|
|
1039
|
+
checked: b,
|
|
1040
|
+
onChange: (y) => C.toggleSelectAll(y.target.checked)
|
|
1041
1041
|
}
|
|
1042
1042
|
) }),
|
|
1043
|
-
n.map((
|
|
1043
|
+
n.map((y) => /* @__PURE__ */ t(
|
|
1044
1044
|
"th",
|
|
1045
1045
|
{
|
|
1046
|
-
style:
|
|
1047
|
-
children:
|
|
1046
|
+
style: y.width ? { minWidth: P ? y.width : "100%" } : { width: "max-content" },
|
|
1047
|
+
children: y.label
|
|
1048
1048
|
},
|
|
1049
|
-
|
|
1049
|
+
y.key
|
|
1050
1050
|
))
|
|
1051
1051
|
] }) }),
|
|
1052
|
-
/* @__PURE__ */
|
|
1053
|
-
|
|
1052
|
+
/* @__PURE__ */ f("tbody", { children: [
|
|
1053
|
+
h.map((y, s) => /* @__PURE__ */ f("tr", { children: [
|
|
1054
1054
|
!k && /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(
|
|
1055
1055
|
"input",
|
|
1056
1056
|
{
|
|
1057
1057
|
type: "checkbox",
|
|
1058
|
-
checked: p.includes(
|
|
1059
|
-
onChange: () =>
|
|
1058
|
+
checked: p.includes(y._uid),
|
|
1059
|
+
onChange: () => C.toggleSelection(y._uid)
|
|
1060
1060
|
}
|
|
1061
1061
|
) }),
|
|
1062
1062
|
n.map((d) => /* @__PURE__ */ t("td", { children: d.render ? d.render.length <= 1 ? d.render({
|
|
1063
|
-
row:
|
|
1064
|
-
index:
|
|
1065
|
-
updateRow: (
|
|
1063
|
+
row: y,
|
|
1064
|
+
index: s,
|
|
1065
|
+
updateRow: (v, V) => C.updateCellValue(y._uid, v, V),
|
|
1066
1066
|
isLocked: !!k,
|
|
1067
|
-
isView: !!
|
|
1067
|
+
isView: !!u
|
|
1068
1068
|
}) : d.render(
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
(
|
|
1069
|
+
y,
|
|
1070
|
+
s,
|
|
1071
|
+
(v, V) => C.updateCellValue(y._uid, v, V),
|
|
1072
1072
|
!!k,
|
|
1073
|
-
!!
|
|
1074
|
-
) :
|
|
1075
|
-
] },
|
|
1076
|
-
|
|
1073
|
+
!!u
|
|
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: k ? "Nenhum registro encontrado." : "Nenhum registro." }) })
|
|
1077
1077
|
] })
|
|
1078
1078
|
] }) })
|
|
1079
1079
|
] });
|
|
@@ -1084,128 +1084,151 @@ const mt = ({
|
|
|
1084
1084
|
className: c = "",
|
|
1085
1085
|
forceReadOnly: o = !1
|
|
1086
1086
|
}) => {
|
|
1087
|
-
const { isReadOnly: l } =
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
/* @__PURE__ */ t("div", { className: "attachment-view", children: u ? /* @__PURE__ */ m(
|
|
1101
|
-
"button",
|
|
1102
|
-
{
|
|
1103
|
-
type: "button",
|
|
1104
|
-
onClick: y,
|
|
1105
|
-
className: "btn-link",
|
|
1106
|
-
style: {
|
|
1107
|
-
padding: 0,
|
|
1108
|
-
border: "none",
|
|
1109
|
-
background: "none",
|
|
1110
|
-
color: "var(--colorPrimary)",
|
|
1111
|
-
cursor: "pointer"
|
|
1112
|
-
},
|
|
1113
|
-
children: [
|
|
1114
|
-
/* @__PURE__ */ t("i", { className: "flaticon flaticon-view icon-sm" }),
|
|
1115
|
-
" ",
|
|
1116
|
-
h.value
|
|
1117
|
-
]
|
|
1118
|
-
}
|
|
1119
|
-
) : /* @__PURE__ */ m("span", { className: "text-muted", children: [
|
|
1120
|
-
/* @__PURE__ */ t("i", { className: "flaticon flaticon-no-pic icon-sm" }),
|
|
1121
|
-
" Sem anexo"
|
|
1122
|
-
] }) })
|
|
1123
|
-
] }) : /* @__PURE__ */ m("div", { className: `form-group ${c}`, children: [
|
|
1124
|
-
r && /* @__PURE__ */ t("label", { children: r }),
|
|
1125
|
-
/* @__PURE__ */ t(
|
|
1126
|
-
"input",
|
|
1127
|
-
{
|
|
1128
|
-
type: "file",
|
|
1129
|
-
ref: f,
|
|
1130
|
-
style: { display: "none" },
|
|
1131
|
-
onChange: R
|
|
1087
|
+
const { isReadOnly: l } = j(), { isView: i } = O(), { control: a } = D(), { field: g } = F({ name: e, control: a }), u = !!g.value, m = o || !!l(e) || i;
|
|
1088
|
+
A(() => {
|
|
1089
|
+
const N = () => {
|
|
1090
|
+
var p;
|
|
1091
|
+
const h = window.parent;
|
|
1092
|
+
if ((p = h.WKFViewAttachment) != null && p.getAllAttachments) {
|
|
1093
|
+
const C = h.WKFViewAttachment.getAllAttachments().find(
|
|
1094
|
+
(P) => {
|
|
1095
|
+
var y;
|
|
1096
|
+
return P.description.includes(e) || ((y = P.documentDescription) == null ? void 0 : y.includes(e));
|
|
1097
|
+
}
|
|
1098
|
+
);
|
|
1099
|
+
C && g.onChange(C.description);
|
|
1132
1100
|
}
|
|
1133
|
-
|
|
1134
|
-
|
|
1101
|
+
};
|
|
1102
|
+
return window.addEventListener("fluig_attachments_updated", N), N(), () => window.removeEventListener("fluig_attachments_updated", N);
|
|
1103
|
+
}, [e, g]);
|
|
1104
|
+
const w = S(() => {
|
|
1105
|
+
if (m) return;
|
|
1106
|
+
const N = window.parent;
|
|
1107
|
+
if (N.JSInterface && N.JSInterface.showCamera)
|
|
1108
|
+
N.JSInterface.showCamera(`anexo_${e}`);
|
|
1109
|
+
else {
|
|
1110
|
+
const h = N.$("#btnInputAttachment") || N.$("[data-attachment-upload]");
|
|
1111
|
+
h.length ? h.click() : alert("Botão de anexo nativo não localizado.");
|
|
1112
|
+
}
|
|
1113
|
+
}, [e, m]), k = S(() => {
|
|
1114
|
+
if (!u) return;
|
|
1115
|
+
const h = window.parent.WKFViewAttachment;
|
|
1116
|
+
if (h != null && h.getAllAttachments) {
|
|
1117
|
+
const p = h.getAllAttachments().find((b) => b.description.includes(e));
|
|
1118
|
+
p ? h.openAttachmentView(
|
|
1119
|
+
p.colleagueId,
|
|
1120
|
+
p.documentId,
|
|
1121
|
+
p.version || "1000"
|
|
1122
|
+
) : alert("O anexo ainda não foi processado pelo servidor.");
|
|
1123
|
+
}
|
|
1124
|
+
}, [e, u]);
|
|
1125
|
+
return /* @__PURE__ */ f("div", { className: `form-group ${c}`, style: { marginBottom: "15px" }, children: [
|
|
1126
|
+
r && /* @__PURE__ */ t("label", { style: { fontWeight: "bold", display: "block" }, children: r }),
|
|
1127
|
+
/* @__PURE__ */ f(
|
|
1135
1128
|
"div",
|
|
1136
1129
|
{
|
|
1137
|
-
className:
|
|
1130
|
+
className: "attachment-container",
|
|
1138
1131
|
style: {
|
|
1139
1132
|
display: "flex",
|
|
1140
1133
|
alignItems: "center",
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
minHeight: "
|
|
1134
|
+
border: "1px solid #ddd",
|
|
1135
|
+
borderRadius: "4px",
|
|
1136
|
+
padding: "8px 12px",
|
|
1137
|
+
backgroundColor: m ? "#f5f5f5" : "#fff",
|
|
1138
|
+
minHeight: "45px"
|
|
1146
1139
|
},
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1140
|
+
children: [
|
|
1141
|
+
/* @__PURE__ */ f(
|
|
1142
|
+
"div",
|
|
1143
|
+
{
|
|
1144
|
+
style: {
|
|
1145
|
+
flex: 1,
|
|
1146
|
+
display: "flex",
|
|
1147
|
+
alignItems: "center",
|
|
1148
|
+
gap: "10px"
|
|
1149
|
+
},
|
|
1150
|
+
children: [
|
|
1151
|
+
/* @__PURE__ */ t(
|
|
1152
|
+
"i",
|
|
1153
|
+
{
|
|
1154
|
+
className: `fluigicon ${u ? "fluigicon-file-pdf" : "fluigicon-paperclip"} icon-sm`
|
|
1155
|
+
}
|
|
1156
|
+
),
|
|
1157
|
+
/* @__PURE__ */ t("span", { style: { fontSize: "13px", color: u ? "#333" : "#999" }, children: u ? g.value : n || "Nenhum arquivo anexado" })
|
|
1158
|
+
]
|
|
1159
|
+
}
|
|
1160
|
+
),
|
|
1161
|
+
!m && !u && /* @__PURE__ */ t(
|
|
1162
|
+
"button",
|
|
1163
|
+
{
|
|
1164
|
+
type: "button",
|
|
1165
|
+
className: "btn btn-info btn-sm",
|
|
1166
|
+
onClick: w,
|
|
1167
|
+
children: "Anexar"
|
|
1168
|
+
}
|
|
1169
|
+
),
|
|
1170
|
+
u && /* @__PURE__ */ f("div", { style: { display: "flex", gap: "5px" }, children: [
|
|
1171
|
+
/* @__PURE__ */ t(
|
|
1172
|
+
"button",
|
|
1173
|
+
{
|
|
1174
|
+
type: "button",
|
|
1175
|
+
className: "btn btn-primary btn-sm",
|
|
1176
|
+
onClick: k,
|
|
1177
|
+
children: "Visualizar"
|
|
1178
|
+
}
|
|
1179
|
+
),
|
|
1180
|
+
!m && /* @__PURE__ */ t(
|
|
1181
|
+
"button",
|
|
1182
|
+
{
|
|
1183
|
+
type: "button",
|
|
1184
|
+
className: "btn btn-danger btn-sm",
|
|
1185
|
+
onClick: () => g.onChange(""),
|
|
1186
|
+
title: "Remover anexo do campo",
|
|
1187
|
+
children: /* @__PURE__ */ t("i", { className: "fluigicon fluigicon-trash icon-xs" })
|
|
1188
|
+
}
|
|
1189
|
+
)
|
|
1190
|
+
] })
|
|
1191
|
+
]
|
|
1169
1192
|
}
|
|
1170
1193
|
),
|
|
1171
|
-
/* @__PURE__ */ t("input", { type: "hidden", name: e, value:
|
|
1194
|
+
/* @__PURE__ */ t("input", { type: "hidden", name: e, value: g.value || "" })
|
|
1172
1195
|
] });
|
|
1173
|
-
}, ht =
|
|
1196
|
+
}, ht = _(Ge);
|
|
1174
1197
|
function ft({
|
|
1175
1198
|
items: e,
|
|
1176
1199
|
time: r = 0,
|
|
1177
1200
|
showNavigation: n = !0,
|
|
1178
1201
|
progressBar: c = !0
|
|
1179
1202
|
}) {
|
|
1180
|
-
const [o, l] =
|
|
1203
|
+
const [o, l] = T(0), [i, a] = T(0), g = B(null), u = B(null), m = S(() => {
|
|
1181
1204
|
l((p) => (p + 1) % e.length), a(0);
|
|
1182
|
-
}, [e.length]),
|
|
1205
|
+
}, [e.length]), w = S(() => {
|
|
1183
1206
|
l((p) => (p - 1 + e.length) % e.length), a(0);
|
|
1184
1207
|
}, [e.length]);
|
|
1185
|
-
if (
|
|
1208
|
+
if (A(() => {
|
|
1186
1209
|
if (r > 0 && e.length > 1) {
|
|
1187
|
-
const
|
|
1188
|
-
|
|
1189
|
-
a((
|
|
1210
|
+
const b = 100 / r * 100;
|
|
1211
|
+
g.current = setInterval(m, r), u.current = setInterval(() => {
|
|
1212
|
+
a((C) => C >= 100 ? 0 : C + b);
|
|
1190
1213
|
}, 100);
|
|
1191
1214
|
}
|
|
1192
1215
|
return () => {
|
|
1193
|
-
|
|
1216
|
+
g.current && clearInterval(g.current), u.current && clearInterval(u.current);
|
|
1194
1217
|
};
|
|
1195
|
-
}, [r,
|
|
1196
|
-
const k = e[o],
|
|
1197
|
-
return /* @__PURE__ */
|
|
1198
|
-
/* @__PURE__ */
|
|
1199
|
-
n && e.length > 1 && /* @__PURE__ */
|
|
1200
|
-
/* @__PURE__ */ t("button", { className: "nav-btn prev", onClick:
|
|
1201
|
-
/* @__PURE__ */ t("button", { className: "nav-btn next", onClick:
|
|
1218
|
+
}, [r, m, e.length, o]), !e || e.length === 0) return null;
|
|
1219
|
+
const k = e[o], N = typeof k == "string" ? k : k.url, h = /\.(jpg|jpeg|png|gif|webp)$/i.test(N);
|
|
1220
|
+
return /* @__PURE__ */ f("div", { className: "carousel-root", children: [
|
|
1221
|
+
/* @__PURE__ */ f("div", { className: "carousel-viewport", children: [
|
|
1222
|
+
n && e.length > 1 && /* @__PURE__ */ f(J, { children: [
|
|
1223
|
+
/* @__PURE__ */ t("button", { className: "nav-btn prev", onClick: w, children: /* @__PURE__ */ t("i", { className: "flaticon flaticon-chevron-left" }) }),
|
|
1224
|
+
/* @__PURE__ */ t("button", { className: "nav-btn next", onClick: m, children: /* @__PURE__ */ t("i", { className: "flaticon flaticon-chevron-right" }) })
|
|
1202
1225
|
] }),
|
|
1203
|
-
/* @__PURE__ */ t("div", { className: "carousel-media", children:
|
|
1226
|
+
/* @__PURE__ */ t("div", { className: "carousel-media", children: h ? /* @__PURE__ */ t("img", { src: N, alt: "Slide", className: "carousel-image" }) : /* @__PURE__ */ f("div", { className: "carousel-file-fallback", children: [
|
|
1204
1227
|
/* @__PURE__ */ t("i", { className: "flaticon flaticon-file icon-xl" }),
|
|
1205
1228
|
/* @__PURE__ */ t(
|
|
1206
1229
|
"a",
|
|
1207
1230
|
{
|
|
1208
|
-
href:
|
|
1231
|
+
href: N,
|
|
1209
1232
|
target: "_blank",
|
|
1210
1233
|
rel: "noreferrer",
|
|
1211
1234
|
className: "btn-open",
|
|
@@ -1213,22 +1236,22 @@ function ft({
|
|
|
1213
1236
|
}
|
|
1214
1237
|
)
|
|
1215
1238
|
] }) }),
|
|
1216
|
-
e.length > 1 && /* @__PURE__ */ t("div", { className: "carousel-dots", children: e.map((p,
|
|
1239
|
+
e.length > 1 && /* @__PURE__ */ t("div", { className: "carousel-dots", children: e.map((p, b) => /* @__PURE__ */ t(
|
|
1217
1240
|
"div",
|
|
1218
1241
|
{
|
|
1219
|
-
className: `dot ${
|
|
1242
|
+
className: `dot ${b === o ? "active" : ""}`,
|
|
1220
1243
|
onClick: () => {
|
|
1221
|
-
l(
|
|
1244
|
+
l(b), a(0);
|
|
1222
1245
|
}
|
|
1223
1246
|
},
|
|
1224
|
-
|
|
1247
|
+
b
|
|
1225
1248
|
)) })
|
|
1226
1249
|
] }),
|
|
1227
1250
|
c && r > 0 && e.length > 1 && /* @__PURE__ */ t("div", { className: "carousel-progress-container", children: /* @__PURE__ */ t(
|
|
1228
1251
|
"div",
|
|
1229
1252
|
{
|
|
1230
1253
|
className: "carousel-progress-bar",
|
|
1231
|
-
style: { width: `${
|
|
1254
|
+
style: { width: `${i}%` }
|
|
1232
1255
|
}
|
|
1233
1256
|
) })
|
|
1234
1257
|
] });
|
|
@@ -1240,15 +1263,15 @@ function gt({
|
|
|
1240
1263
|
onClose: c,
|
|
1241
1264
|
content: o,
|
|
1242
1265
|
footer: l,
|
|
1243
|
-
width:
|
|
1266
|
+
width: i
|
|
1244
1267
|
}) {
|
|
1245
1268
|
const a = S(
|
|
1246
|
-
(
|
|
1247
|
-
|
|
1269
|
+
(g) => {
|
|
1270
|
+
g.key === "Escape" && c();
|
|
1248
1271
|
},
|
|
1249
1272
|
[c]
|
|
1250
1273
|
);
|
|
1251
|
-
return
|
|
1274
|
+
return A(() => (r && (document.addEventListener("keydown", a), n == null || n(), document.body.style.overflow = "hidden"), () => {
|
|
1252
1275
|
document.removeEventListener("keydown", a), document.body.style.overflow = "auto";
|
|
1253
1276
|
}), [r, a, n]), r ? /* @__PURE__ */ t(
|
|
1254
1277
|
"div",
|
|
@@ -1257,14 +1280,14 @@ function gt({
|
|
|
1257
1280
|
onClick: c,
|
|
1258
1281
|
"aria-modal": "true",
|
|
1259
1282
|
role: "dialog",
|
|
1260
|
-
children: /* @__PURE__ */
|
|
1283
|
+
children: /* @__PURE__ */ f(
|
|
1261
1284
|
"div",
|
|
1262
1285
|
{
|
|
1263
|
-
style: { maxWidth:
|
|
1286
|
+
style: { maxWidth: i },
|
|
1264
1287
|
className: "modal-container",
|
|
1265
|
-
onClick: (
|
|
1288
|
+
onClick: (g) => g.stopPropagation(),
|
|
1266
1289
|
children: [
|
|
1267
|
-
/* @__PURE__ */
|
|
1290
|
+
/* @__PURE__ */ f("div", { className: "modal-header", children: [
|
|
1268
1291
|
/* @__PURE__ */ t("h3", { children: e }),
|
|
1269
1292
|
/* @__PURE__ */ t(
|
|
1270
1293
|
"div",
|
|
@@ -1291,29 +1314,29 @@ function gt({
|
|
|
1291
1314
|
}
|
|
1292
1315
|
) : null;
|
|
1293
1316
|
}
|
|
1294
|
-
function
|
|
1317
|
+
function pt({
|
|
1295
1318
|
logo: e,
|
|
1296
1319
|
childs: r,
|
|
1297
1320
|
footer: n,
|
|
1298
1321
|
contentExternal: c,
|
|
1299
1322
|
bg: o,
|
|
1300
1323
|
color: l,
|
|
1301
|
-
onSelect:
|
|
1324
|
+
onSelect: i
|
|
1302
1325
|
}) {
|
|
1303
|
-
return /* @__PURE__ */
|
|
1304
|
-
/* @__PURE__ */
|
|
1326
|
+
return /* @__PURE__ */ f("div", { className: "main-container dfea", children: [
|
|
1327
|
+
/* @__PURE__ */ f("div", { className: "sidebar-wrapper", style: { backgroundColor: `${o}` }, children: [
|
|
1305
1328
|
e && /* @__PURE__ */ t("div", { className: "sidebar-logo", children: /* @__PURE__ */ t("img", { src: e, alt: "", width: "auto", height: "28px" }) }),
|
|
1306
1329
|
/* @__PURE__ */ t("ul", { className: "sidebar-childs-content", children: r == null ? void 0 : r.map(
|
|
1307
1330
|
(a) => {
|
|
1308
|
-
var
|
|
1309
|
-
return a != null && a.options && ((
|
|
1310
|
-
/* @__PURE__ */
|
|
1331
|
+
var g, u;
|
|
1332
|
+
return a != null && a.options && ((g = a == null ? void 0 : a.options) == null ? void 0 : g.length) > 0 ? /* @__PURE__ */ t(J, { children: /* @__PURE__ */ f("ul", { className: "sidebar-child sidebar-options-content", children: [
|
|
1333
|
+
/* @__PURE__ */ f(
|
|
1311
1334
|
"li",
|
|
1312
1335
|
{
|
|
1313
1336
|
className: "sidebar-child",
|
|
1314
1337
|
onClick: () => {
|
|
1315
|
-
var
|
|
1316
|
-
(
|
|
1338
|
+
var m;
|
|
1339
|
+
(m = a.action) == null || m.call(a), i == null || i(a.id);
|
|
1317
1340
|
},
|
|
1318
1341
|
style: { color: `${l}` },
|
|
1319
1342
|
children: [
|
|
@@ -1322,25 +1345,25 @@ function vt({
|
|
|
1322
1345
|
]
|
|
1323
1346
|
}
|
|
1324
1347
|
),
|
|
1325
|
-
(
|
|
1348
|
+
(u = a.options) == null ? void 0 : u.map((m) => /* @__PURE__ */ t(
|
|
1326
1349
|
"li",
|
|
1327
1350
|
{
|
|
1328
1351
|
className: "sidebar-option",
|
|
1329
1352
|
onClick: () => {
|
|
1330
|
-
var
|
|
1331
|
-
(
|
|
1353
|
+
var w;
|
|
1354
|
+
(w = m.action) == null || w.call(m), i == null || i(m.id);
|
|
1332
1355
|
},
|
|
1333
1356
|
style: { color: `${l}` },
|
|
1334
|
-
children:
|
|
1357
|
+
children: m.label
|
|
1335
1358
|
}
|
|
1336
1359
|
))
|
|
1337
|
-
] }) }) : /* @__PURE__ */
|
|
1360
|
+
] }) }) : /* @__PURE__ */ f(
|
|
1338
1361
|
"li",
|
|
1339
1362
|
{
|
|
1340
1363
|
className: "sidebar-child",
|
|
1341
1364
|
onClick: () => {
|
|
1342
|
-
var
|
|
1343
|
-
(
|
|
1365
|
+
var m;
|
|
1366
|
+
(m = a.action) == null || m.call(a), i == null || i(a.id);
|
|
1344
1367
|
},
|
|
1345
1368
|
style: { color: `${l}` },
|
|
1346
1369
|
children: [
|
|
@@ -1361,11 +1384,11 @@ export {
|
|
|
1361
1384
|
ft as Carousel,
|
|
1362
1385
|
ot as Checkbox,
|
|
1363
1386
|
dt as DatePicker,
|
|
1364
|
-
|
|
1387
|
+
it as Input,
|
|
1365
1388
|
gt as Modal,
|
|
1366
1389
|
lt as RadioBtn,
|
|
1367
|
-
|
|
1368
|
-
|
|
1390
|
+
st as Select,
|
|
1391
|
+
pt as Sidebar,
|
|
1369
1392
|
mt as SimpleTable,
|
|
1370
1393
|
ut as StatusBadge,
|
|
1371
1394
|
ct as TextArea
|