@tech-diefra/fluig-ui 1.2.12 → 1.2.14
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 +411 -461
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { useFormContext as
|
|
1
|
+
import { jsxs as h, jsx as t, Fragment as J } from "react/jsx-runtime";
|
|
2
|
+
import { memo as I, useMemo as j, useCallback as S, useState as F, useRef as E, useEffect as A, forwardRef as K } from "react";
|
|
3
|
+
import { useFormContext as O, useController as _, useFormState as ee } from "react-hook-form";
|
|
4
4
|
import { IMaskInput as te } from "react-imask";
|
|
5
|
-
import { useSection as
|
|
5
|
+
import { useSection as T, useFluigRuntime as D } from "@fluig-kit/ecm";
|
|
6
6
|
import ne, { registerLocale as ae } from "react-datepicker";
|
|
7
7
|
import { parse as re, isValid as ie, format as se } from "date-fns";
|
|
8
8
|
const oe = {
|
|
@@ -16,221 +16,221 @@ function le({
|
|
|
16
16
|
label: r = "",
|
|
17
17
|
placeholder: n = "",
|
|
18
18
|
type: c = "text",
|
|
19
|
-
mask:
|
|
19
|
+
mask: s,
|
|
20
20
|
className: l = "",
|
|
21
21
|
forceReadOnly: i = !1,
|
|
22
22
|
forceHidden: a = !1
|
|
23
23
|
}) {
|
|
24
|
-
const { isReadOnly:
|
|
25
|
-
() =>
|
|
26
|
-
[
|
|
27
|
-
), P = S((
|
|
28
|
-
if (!
|
|
29
|
-
const d =
|
|
24
|
+
const { isReadOnly: v, isHidden: m } = T(), u = i || !!v(e), f = a || !!m(e), { control: k } = O(), { isView: R } = D(), { field: b } = _({ name: e, control: k }), { errors: y } = ee({ name: e }), g = y == null ? void 0 : y[e], x = j(
|
|
25
|
+
() => s ? oe[s] ?? s : null,
|
|
26
|
+
[s]
|
|
27
|
+
), P = S((o) => {
|
|
28
|
+
if (!o) return "";
|
|
29
|
+
const d = o.replace(/\D/g, "");
|
|
30
30
|
return (Number(d) / 100).toLocaleString("pt-BR", {
|
|
31
31
|
style: "currency",
|
|
32
32
|
currency: "BRL"
|
|
33
33
|
});
|
|
34
|
-
}, []),
|
|
35
|
-
(
|
|
34
|
+
}, []), w = S(
|
|
35
|
+
(o) => c === "monetary" ? P(o) : o,
|
|
36
36
|
[c, P]
|
|
37
37
|
);
|
|
38
|
-
return
|
|
38
|
+
return R ? /* @__PURE__ */ h("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: b.value || "-" })
|
|
41
|
+
] }) : /* @__PURE__ */ h("div", { className: `form-group ${f ? "hidden" : ""}`, children: [
|
|
42
42
|
/* @__PURE__ */ t("label", { children: r }),
|
|
43
|
-
|
|
43
|
+
x ? /* @__PURE__ */ t(
|
|
44
44
|
te,
|
|
45
45
|
{
|
|
46
46
|
name: e,
|
|
47
|
-
mask:
|
|
48
|
-
value: String(
|
|
47
|
+
mask: x,
|
|
48
|
+
value: String(b.value ?? ""),
|
|
49
49
|
unmask: !1,
|
|
50
|
-
onAccept: (
|
|
50
|
+
onAccept: (o) => b.onChange(w(o)),
|
|
51
51
|
placeholder: n,
|
|
52
|
-
readOnly:
|
|
53
|
-
className: `form-control ${
|
|
54
|
-
inputRef:
|
|
55
|
-
onBlur:
|
|
52
|
+
readOnly: u,
|
|
53
|
+
className: `form-control ${g ? "border-red" : ""} ${l}`,
|
|
54
|
+
inputRef: b.ref,
|
|
55
|
+
onBlur: b.onBlur
|
|
56
56
|
}
|
|
57
57
|
) : /* @__PURE__ */ t(
|
|
58
58
|
"input",
|
|
59
59
|
{
|
|
60
|
-
...
|
|
60
|
+
...b,
|
|
61
61
|
type: "text",
|
|
62
|
-
value:
|
|
63
|
-
onChange: (
|
|
62
|
+
value: b.value ?? "",
|
|
63
|
+
onChange: (o) => b.onChange(w(o.target.value)),
|
|
64
64
|
placeholder: n,
|
|
65
|
-
readOnly:
|
|
66
|
-
className: `form-control ${
|
|
65
|
+
readOnly: u,
|
|
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
|
-
const it =
|
|
72
|
+
const it = I(le);
|
|
73
73
|
function ce({
|
|
74
74
|
name: e,
|
|
75
75
|
label: r = "",
|
|
76
76
|
options: n = [],
|
|
77
77
|
placeholder: c = "",
|
|
78
|
-
labelKey:
|
|
78
|
+
labelKey: s = "label",
|
|
79
79
|
valueKey: l = "value",
|
|
80
80
|
enableSearch: i = !1,
|
|
81
81
|
searchPlaceholder: a = "Buscar...",
|
|
82
|
-
loading:
|
|
83
|
-
onSearchChange:
|
|
84
|
-
debounceTime:
|
|
85
|
-
onSelect:
|
|
82
|
+
loading: v = !1,
|
|
83
|
+
onSearchChange: m,
|
|
84
|
+
debounceTime: u = 300,
|
|
85
|
+
onSelect: f,
|
|
86
86
|
forceReadOnly: k = !1,
|
|
87
|
-
forceHidden:
|
|
87
|
+
forceHidden: R = !1
|
|
88
88
|
}) {
|
|
89
|
-
const { isReadOnly:
|
|
90
|
-
field: { onChange: d, value:
|
|
91
|
-
fieldState: { error:
|
|
92
|
-
} =
|
|
89
|
+
const { isReadOnly: b, isHidden: y } = T(), g = k || !!b(e), x = R || !!y(e), { control: P, clearErrors: w } = O(), { isView: o } = D(), {
|
|
90
|
+
field: { onChange: d, value: p, ref: V },
|
|
91
|
+
fieldState: { error: N }
|
|
92
|
+
} = _({
|
|
93
93
|
name: e,
|
|
94
94
|
control: P
|
|
95
|
-
}), [$,
|
|
95
|
+
}), [$, M] = F(!1), [W, Q] = F(""), B = E(null), z = E(m);
|
|
96
96
|
A(() => {
|
|
97
|
-
z.current =
|
|
98
|
-
}, [
|
|
99
|
-
const
|
|
100
|
-
|
|
97
|
+
z.current = m;
|
|
98
|
+
}, [m]), A(() => {
|
|
99
|
+
const C = (H) => {
|
|
100
|
+
B.current && !B.current.contains(H.target) && M(!1);
|
|
101
101
|
};
|
|
102
|
-
return document.addEventListener("mousedown",
|
|
102
|
+
return document.addEventListener("mousedown", C), () => document.removeEventListener("mousedown", C);
|
|
103
103
|
}, []), A(() => {
|
|
104
104
|
$ || Q("");
|
|
105
105
|
}, [$]), A(() => {
|
|
106
106
|
if (!i) return;
|
|
107
|
-
const
|
|
108
|
-
z.current && z.current(
|
|
109
|
-
},
|
|
110
|
-
return () => clearTimeout(
|
|
111
|
-
}, [
|
|
112
|
-
const U =
|
|
113
|
-
(
|
|
114
|
-
) : n ?? [], [n, i,
|
|
115
|
-
if (
|
|
116
|
-
if (typeof
|
|
117
|
-
return String(
|
|
118
|
-
const
|
|
119
|
-
(H) => String(H == null ? void 0 : H[l]) === String(
|
|
107
|
+
const C = setTimeout(() => {
|
|
108
|
+
z.current && z.current(W);
|
|
109
|
+
}, u);
|
|
110
|
+
return () => clearTimeout(C);
|
|
111
|
+
}, [W, i, u]);
|
|
112
|
+
const U = j(() => i && !m && W.trim() ? n.filter(
|
|
113
|
+
(C) => String((C == null ? void 0 : C[s]) ?? "").toLowerCase().includes(W.toLowerCase())
|
|
114
|
+
) : n ?? [], [n, i, m, W, s]), G = j(() => {
|
|
115
|
+
if (p == null) return "";
|
|
116
|
+
if (typeof p == "object")
|
|
117
|
+
return String(p[l] ?? "");
|
|
118
|
+
const C = (n || []).find(
|
|
119
|
+
(H) => String(H == null ? void 0 : H[l]) === String(p)
|
|
120
120
|
);
|
|
121
|
-
return String(
|
|
122
|
-
}, [
|
|
123
|
-
|
|
121
|
+
return String(C ? (C == null ? void 0 : C[s]) ?? "" : p);
|
|
122
|
+
}, [p, n, l, s]), Z = (C) => {
|
|
123
|
+
g || (d(C[l]), f && f(C), w(e), M(!1));
|
|
124
124
|
};
|
|
125
|
-
return /* @__PURE__ */
|
|
125
|
+
return /* @__PURE__ */ h(
|
|
126
126
|
"div",
|
|
127
127
|
{
|
|
128
|
-
className: `select-wrapper form-group ${
|
|
129
|
-
ref:
|
|
128
|
+
className: `select-wrapper form-group ${x ? "hidden" : ""}`,
|
|
129
|
+
ref: B,
|
|
130
130
|
children: [
|
|
131
131
|
/* @__PURE__ */ t("label", { className: "control-label", children: r }),
|
|
132
|
-
|
|
133
|
-
/* @__PURE__ */
|
|
132
|
+
o ? /* @__PURE__ */ t("span", { className: "form-control", children: G || "-" }) : /* @__PURE__ */ h(J, { children: [
|
|
133
|
+
/* @__PURE__ */ h(
|
|
134
134
|
"div",
|
|
135
135
|
{
|
|
136
|
-
className: `select-control ${
|
|
137
|
-
onClick: () => !
|
|
136
|
+
className: `select-control ${N ? "border-red" : ""} ${g ? "readOnly" : ""}`,
|
|
137
|
+
onClick: () => !g && M((C) => !C),
|
|
138
138
|
ref: V,
|
|
139
139
|
children: [
|
|
140
|
-
/* @__PURE__ */ t("span", { className: `select-display ${
|
|
140
|
+
/* @__PURE__ */ t("span", { className: `select-display ${g ? "readOnly" : ""}`, children: G || c }),
|
|
141
141
|
/* @__PURE__ */ t("i", { className: "flaticon flaticon-chevron-down select-icon" })
|
|
142
142
|
]
|
|
143
143
|
}
|
|
144
144
|
),
|
|
145
|
-
$ && !
|
|
145
|
+
$ && !g && /* @__PURE__ */ h("div", { className: "select-dropdown", children: [
|
|
146
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: W,
|
|
152
|
+
onChange: (C) => Q(C.target.value),
|
|
153
|
+
placeholder: v ? "Carregando..." : a,
|
|
154
154
|
autoFocus: !0,
|
|
155
|
-
onClick: (
|
|
155
|
+
onClick: (C) => C.stopPropagation()
|
|
156
156
|
}
|
|
157
157
|
) }),
|
|
158
|
-
/* @__PURE__ */ t("ul", { className: "select-options", children:
|
|
158
|
+
/* @__PURE__ */ t("ul", { className: "select-options", children: v ? /* @__PURE__ */ t("li", { className: "select-option readOnly", children: "Carregando..." }) : U.length > 0 ? U.map((C) => /* @__PURE__ */ t(
|
|
159
159
|
"li",
|
|
160
160
|
{
|
|
161
|
-
onClick: () => Z(
|
|
161
|
+
onClick: () => Z(C),
|
|
162
162
|
className: "select-option handleHover",
|
|
163
|
-
children:
|
|
163
|
+
children: C[s]
|
|
164
164
|
},
|
|
165
|
-
|
|
165
|
+
C[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: p || "" }),
|
|
170
|
+
N && /* @__PURE__ */ t("p", { className: "text-danger", children: String(N.message) })
|
|
171
171
|
]
|
|
172
172
|
}
|
|
173
173
|
);
|
|
174
174
|
}
|
|
175
|
-
const st =
|
|
175
|
+
const st = I(ce);
|
|
176
176
|
function ot({
|
|
177
177
|
name: e,
|
|
178
178
|
options: r = [],
|
|
179
179
|
label: n = "",
|
|
180
180
|
valueKey: c = "value",
|
|
181
|
-
labelKey:
|
|
181
|
+
labelKey: s = "label",
|
|
182
182
|
forceReadOnly: l = !1,
|
|
183
183
|
forceHidden: i = !1
|
|
184
184
|
}) {
|
|
185
|
-
var
|
|
186
|
-
const a =
|
|
185
|
+
var p, V;
|
|
186
|
+
const a = O(), { isView: v, isReadOnly: m } = D(), { isReadOnly: u, isHidden: f } = T(), k = u ? u(e) : !1, R = f ? f(e) : !1, b = l || k, y = i || R, g = b || m || v;
|
|
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),
|
|
189
|
+
const x = () => !r || !a ? {} : r.reduce((N, $) => {
|
|
190
|
+
const M = $[c], W = a.getValues(M);
|
|
191
|
+
return N[M] = W === "on", N;
|
|
192
|
+
}, {}), P = a.watch(e), w = j(() => P && typeof P == "object" ? P : x(), [P, r, c]);
|
|
193
193
|
A(() => {
|
|
194
|
-
const
|
|
195
|
-
(!
|
|
194
|
+
const N = a.getValues(e);
|
|
195
|
+
(!N || typeof N != "object") && a.setValue(e, w, {
|
|
196
196
|
shouldDirty: !1,
|
|
197
197
|
shouldValidate: !1
|
|
198
198
|
});
|
|
199
|
-
}, [
|
|
200
|
-
const
|
|
201
|
-
if (
|
|
202
|
-
const
|
|
203
|
-
a.setValue(e,
|
|
199
|
+
}, [w, e, a]);
|
|
200
|
+
const o = (N, $) => {
|
|
201
|
+
if (g) return;
|
|
202
|
+
const M = { ...w, [N]: $ };
|
|
203
|
+
a.setValue(e, M, {
|
|
204
204
|
shouldDirty: !0,
|
|
205
205
|
shouldValidate: !0
|
|
206
|
-
}), a.setValue(
|
|
207
|
-
}, d = (V = (
|
|
208
|
-
return /* @__PURE__ */
|
|
206
|
+
}), a.setValue(N, $ ? "on" : "", { shouldValidate: !1 });
|
|
207
|
+
}, d = (V = (p = a.formState) == null ? void 0 : p.errors) == null ? void 0 : V[e];
|
|
208
|
+
return /* @__PURE__ */ h("div", { className: `form-group ${y ? "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 ${g ? "readOnly" : ""}`,
|
|
214
|
+
children: r.map((N) => {
|
|
215
|
+
const $ = String(N[c]), M = w[$] === !0;
|
|
216
|
+
return /* @__PURE__ */ h("div", { children: [
|
|
217
217
|
/* @__PURE__ */ t("input", { type: "hidden", ...a.register($) }),
|
|
218
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ h(
|
|
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: (W) => o($, W.target.checked)
|
|
230
230
|
}
|
|
231
231
|
),
|
|
232
232
|
/* @__PURE__ */ t("span", { className: "checkmark" }),
|
|
233
|
-
/* @__PURE__ */ t("span", { children:
|
|
233
|
+
/* @__PURE__ */ t("span", { children: N[s] })
|
|
234
234
|
]
|
|
235
235
|
}
|
|
236
236
|
)
|
|
@@ -246,38 +246,38 @@ function de({
|
|
|
246
246
|
label: r = "",
|
|
247
247
|
options: n = [],
|
|
248
248
|
valueKey: c = "value",
|
|
249
|
-
labelKey:
|
|
249
|
+
labelKey: s = "label",
|
|
250
250
|
iconKey: l = "icon",
|
|
251
251
|
forceReadOnly: i = !1,
|
|
252
252
|
forceHidden: a = !1
|
|
253
253
|
}) {
|
|
254
|
-
const { isReadOnly:
|
|
255
|
-
field:
|
|
256
|
-
fieldState: { error:
|
|
257
|
-
} =
|
|
254
|
+
const { isReadOnly: v, isHidden: m } = T(), u = i || !!v(e), f = a || !!m(e), { control: k } = O(), { isView: R, isReadOnly: b } = D(), {
|
|
255
|
+
field: y,
|
|
256
|
+
fieldState: { error: g }
|
|
257
|
+
} = _({
|
|
258
258
|
name: e,
|
|
259
259
|
control: k
|
|
260
|
-
}),
|
|
261
|
-
(
|
|
262
|
-
|
|
260
|
+
}), x = u || b || R, P = y.value ?? "", w = S(
|
|
261
|
+
(o) => {
|
|
262
|
+
x || y.onChange(o);
|
|
263
263
|
},
|
|
264
|
-
[
|
|
264
|
+
[x, y]
|
|
265
265
|
);
|
|
266
|
-
return /* @__PURE__ */
|
|
266
|
+
return /* @__PURE__ */ h("div", { className: `form-group column ${f ? "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 ${x ? "view-mode" : ""}`,
|
|
272
272
|
"data-field-name": e,
|
|
273
|
-
children: n.map((
|
|
274
|
-
const d =
|
|
275
|
-
return /* @__PURE__ */
|
|
273
|
+
children: n.map((o) => {
|
|
274
|
+
const d = o[c], p = P === d, V = o.color ? { "--customColor": o.color } : void 0;
|
|
275
|
+
return /* @__PURE__ */ h(
|
|
276
276
|
"label",
|
|
277
277
|
{
|
|
278
278
|
htmlFor: `${e}_${d}`,
|
|
279
279
|
style: V,
|
|
280
|
-
className: `btn fs-ellipsis ${
|
|
280
|
+
className: `btn fs-ellipsis ${p ? "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: p,
|
|
290
290
|
className: "hidden",
|
|
291
|
-
onChange: () =>
|
|
292
|
-
disabled:
|
|
291
|
+
onChange: () => w(d),
|
|
292
|
+
disabled: x
|
|
293
293
|
}
|
|
294
294
|
),
|
|
295
|
-
|
|
295
|
+
o[l] && /* @__PURE__ */ t("i", { className: `${o[l]} icon-sm` }),
|
|
296
296
|
" ",
|
|
297
|
-
s
|
|
297
|
+
o[s]
|
|
298
298
|
]
|
|
299
299
|
},
|
|
300
300
|
d
|
|
@@ -302,46 +302,46 @@ 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
|
-
const lt =
|
|
308
|
+
const lt = I(de), ue = ({
|
|
309
309
|
name: e,
|
|
310
310
|
label: r = "",
|
|
311
311
|
placeholder: n = "",
|
|
312
312
|
className: c = "",
|
|
313
|
-
rows:
|
|
313
|
+
rows: s = 4,
|
|
314
314
|
maxLength: l,
|
|
315
315
|
forceReadOnly: i = !1,
|
|
316
316
|
forceHidden: a = !1
|
|
317
317
|
}) => {
|
|
318
|
-
const { isReadOnly:
|
|
319
|
-
field:
|
|
320
|
-
fieldState: { error:
|
|
321
|
-
} =
|
|
318
|
+
const { isReadOnly: v, isHidden: m } = T(), u = i || !!v(e), f = a || !!m(e), { control: k } = O(), { isView: R } = D(), {
|
|
319
|
+
field: b,
|
|
320
|
+
fieldState: { error: y }
|
|
321
|
+
} = _({
|
|
322
322
|
name: e,
|
|
323
323
|
control: k
|
|
324
324
|
});
|
|
325
|
-
return
|
|
325
|
+
return R ? /* @__PURE__ */ h("div", { className: `form-group ${f ? "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: b.value || "-" })
|
|
328
|
+
] }) : /* @__PURE__ */ h("div", { className: `form-group ${f ? "hidden" : ""}`, children: [
|
|
329
329
|
/* @__PURE__ */ t("label", { children: r }),
|
|
330
330
|
/* @__PURE__ */ t(
|
|
331
331
|
"textarea",
|
|
332
332
|
{
|
|
333
|
-
...
|
|
334
|
-
rows:
|
|
333
|
+
...b,
|
|
334
|
+
rows: s,
|
|
335
335
|
maxLength: l,
|
|
336
|
-
value:
|
|
336
|
+
value: b.value || "",
|
|
337
337
|
placeholder: n,
|
|
338
|
-
readOnly:
|
|
339
|
-
className: `form-control ${
|
|
338
|
+
readOnly: u,
|
|
339
|
+
className: `form-control ${y ? "border-red" : ""} ${c}`
|
|
340
340
|
}
|
|
341
341
|
),
|
|
342
|
-
|
|
342
|
+
y && /* @__PURE__ */ t("p", { className: "text-danger", children: String(y.message) })
|
|
343
343
|
] });
|
|
344
|
-
}, ct =
|
|
344
|
+
}, ct = I(ue);
|
|
345
345
|
function X(e) {
|
|
346
346
|
return (r = {}) => {
|
|
347
347
|
const n = r.width ? String(r.width) : e.defaultWidth;
|
|
@@ -351,34 +351,34 @@ function X(e) {
|
|
|
351
351
|
function q(e) {
|
|
352
352
|
return (r, n) => {
|
|
353
353
|
const c = n != null && n.context ? String(n.context) : "standalone";
|
|
354
|
-
let
|
|
354
|
+
let s;
|
|
355
355
|
if (c === "formatting" && e.formattingValues) {
|
|
356
356
|
const i = e.defaultFormattingWidth || e.defaultWidth, a = n != null && n.width ? String(n.width) : i;
|
|
357
|
-
|
|
357
|
+
s = e.formattingValues[a] || e.formattingValues[i];
|
|
358
358
|
} else {
|
|
359
359
|
const i = e.defaultWidth, a = n != null && n.width ? String(n.width) : e.defaultWidth;
|
|
360
|
-
|
|
360
|
+
s = e.values[a] || e.values[i];
|
|
361
361
|
}
|
|
362
362
|
const l = e.argumentCallback ? e.argumentCallback(r) : r;
|
|
363
|
-
return
|
|
363
|
+
return s[l];
|
|
364
364
|
};
|
|
365
365
|
}
|
|
366
366
|
function L(e) {
|
|
367
367
|
return (r, n = {}) => {
|
|
368
|
-
const c = n.width,
|
|
368
|
+
const c = n.width, s = c && e.matchPatterns[c] || e.matchPatterns[e.defaultMatchWidth], l = r.match(s);
|
|
369
369
|
if (!l)
|
|
370
370
|
return null;
|
|
371
|
-
const i = l[0], a = c && e.parsePatterns[c] || e.parsePatterns[e.defaultParseWidth],
|
|
371
|
+
const i = l[0], a = c && e.parsePatterns[c] || e.parsePatterns[e.defaultParseWidth], v = Array.isArray(a) ? he(a, (f) => f.test(i)) : (
|
|
372
372
|
// [TODO] -- I challenge you to fix the type
|
|
373
|
-
me(a, (
|
|
373
|
+
me(a, (f) => f.test(i))
|
|
374
374
|
);
|
|
375
|
-
let
|
|
376
|
-
|
|
375
|
+
let m;
|
|
376
|
+
m = e.valueCallback ? e.valueCallback(v) : v, m = n.valueCallback ? (
|
|
377
377
|
// [TODO] -- I challenge you to fix the type
|
|
378
|
-
n.valueCallback(
|
|
379
|
-
) :
|
|
380
|
-
const
|
|
381
|
-
return { value:
|
|
378
|
+
n.valueCallback(m)
|
|
379
|
+
) : m;
|
|
380
|
+
const u = r.slice(i.length);
|
|
381
|
+
return { value: m, rest: u };
|
|
382
382
|
};
|
|
383
383
|
}
|
|
384
384
|
function me(e, r) {
|
|
@@ -395,11 +395,11 @@ function fe(e) {
|
|
|
395
395
|
return (r, n = {}) => {
|
|
396
396
|
const c = r.match(e.matchPattern);
|
|
397
397
|
if (!c) return null;
|
|
398
|
-
const
|
|
398
|
+
const s = c[0], l = r.match(e.parsePattern);
|
|
399
399
|
if (!l) return null;
|
|
400
400
|
let i = e.valueCallback ? e.valueCallback(l[0]) : l[0];
|
|
401
401
|
i = n.valueCallback ? n.valueCallback(i) : i;
|
|
402
|
-
const a = r.slice(
|
|
402
|
+
const a = r.slice(s.length);
|
|
403
403
|
return { value: i, rest: a };
|
|
404
404
|
};
|
|
405
405
|
}
|
|
@@ -467,14 +467,14 @@ const ge = {
|
|
|
467
467
|
}
|
|
468
468
|
}, pe = (e, r, n) => {
|
|
469
469
|
let c;
|
|
470
|
-
const
|
|
471
|
-
return typeof
|
|
472
|
-
},
|
|
470
|
+
const s = ge[e];
|
|
471
|
+
return typeof s == "string" ? c = s : r === 1 ? c = s.one : c = s.other.replace("{{count}}", String(r)), n != null && n.addSuffix ? n.comparison && n.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
|
+
}, be = {
|
|
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: ve,
|
|
490
490
|
defaultWidth: "full"
|
|
491
491
|
}),
|
|
492
492
|
time: X({
|
|
493
|
-
formats:
|
|
493
|
+
formats: be,
|
|
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
|
-
},
|
|
511
|
-
const
|
|
512
|
-
return typeof
|
|
513
|
-
},
|
|
510
|
+
}, ke = (e, r, n, c) => {
|
|
511
|
+
const s = Ne[e];
|
|
512
|
+
return typeof s == "function" ? s(r) : s;
|
|
513
|
+
}, Ce = {
|
|
514
514
|
narrow: ["AC", "DC"],
|
|
515
515
|
abbreviated: ["AC", "DC"],
|
|
516
516
|
wide: ["antes de cristo", "depois de cristo"]
|
|
517
|
-
},
|
|
517
|
+
}, xe = {
|
|
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
|
+
}, Me = {
|
|
638
638
|
ordinalNumber: Ve,
|
|
639
639
|
era: q({
|
|
640
|
-
values:
|
|
640
|
+
values: Ce,
|
|
641
641
|
defaultWidth: "wide"
|
|
642
642
|
}),
|
|
643
643
|
quarter: q({
|
|
644
|
-
values:
|
|
644
|
+
values: xe,
|
|
645
645
|
defaultWidth: "wide",
|
|
646
646
|
argumentCallback: (e) => e - 1
|
|
647
647
|
}),
|
|
@@ -659,7 +659,7 @@ const ge = {
|
|
|
659
659
|
formattingValues: Se,
|
|
660
660
|
defaultFormattingWidth: "wide"
|
|
661
661
|
})
|
|
662
|
-
},
|
|
662
|
+
}, We = /^(\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
|
|
@@ -670,13 +670,13 @@ const ge = {
|
|
|
670
670
|
narrow: /^[1234]/i,
|
|
671
671
|
abbreviated: /^T[1234]/i,
|
|
672
672
|
wide: /^[1234](º)? trimestre/i
|
|
673
|
-
},
|
|
673
|
+
}, Fe = {
|
|
674
674
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
675
|
-
},
|
|
675
|
+
}, Ie = {
|
|
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
|
+
}, _e = {
|
|
680
680
|
narrow: [
|
|
681
681
|
/^j/i,
|
|
682
682
|
/^f/i,
|
|
@@ -728,9 +728,9 @@ const ge = {
|
|
|
728
728
|
evening: /tarde/i,
|
|
729
729
|
night: /noite/i
|
|
730
730
|
}
|
|
731
|
-
},
|
|
731
|
+
}, Ee = {
|
|
732
732
|
ordinalNumber: fe({
|
|
733
|
-
matchPattern:
|
|
733
|
+
matchPattern: We,
|
|
734
734
|
parsePattern: Ae,
|
|
735
735
|
valueCallback: (e) => parseInt(e, 10)
|
|
736
736
|
}),
|
|
@@ -743,14 +743,14 @@ const ge = {
|
|
|
743
743
|
quarter: L({
|
|
744
744
|
matchPatterns: je,
|
|
745
745
|
defaultMatchWidth: "wide",
|
|
746
|
-
parsePatterns:
|
|
746
|
+
parsePatterns: Fe,
|
|
747
747
|
defaultParseWidth: "any",
|
|
748
748
|
valueCallback: (e) => e + 1
|
|
749
749
|
}),
|
|
750
750
|
month: L({
|
|
751
|
-
matchPatterns:
|
|
751
|
+
matchPatterns: Ie,
|
|
752
752
|
defaultMatchWidth: "wide",
|
|
753
|
-
parsePatterns:
|
|
753
|
+
parsePatterns: _e,
|
|
754
754
|
defaultParseWidth: "any"
|
|
755
755
|
}),
|
|
756
756
|
day: L({
|
|
@@ -765,32 +765,32 @@ const ge = {
|
|
|
765
765
|
parsePatterns: Le,
|
|
766
766
|
defaultParseWidth: "any"
|
|
767
767
|
})
|
|
768
|
-
},
|
|
768
|
+
}, Be = {
|
|
769
769
|
code: "pt-BR",
|
|
770
770
|
formatDistance: pe,
|
|
771
771
|
formatLong: we,
|
|
772
|
-
formatRelative:
|
|
773
|
-
localize:
|
|
774
|
-
match:
|
|
772
|
+
formatRelative: ke,
|
|
773
|
+
localize: Me,
|
|
774
|
+
match: Ee,
|
|
775
775
|
options: {
|
|
776
776
|
weekStartsOn: 0,
|
|
777
777
|
firstWeekContainsDate: 1
|
|
778
778
|
}
|
|
779
779
|
};
|
|
780
|
-
ae("pt-BR",
|
|
780
|
+
ae("pt-BR", Be);
|
|
781
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
784
|
return ie(r) ? r : null;
|
|
785
785
|
}, Xe = (e) => e ? se(e, Y) : "", Je = K(
|
|
786
|
-
({ shimRef: e, className: r, name: n, ...c },
|
|
786
|
+
({ shimRef: e, className: r, name: n, ...c }, s) => /* @__PURE__ */ t(
|
|
787
787
|
"input",
|
|
788
788
|
{
|
|
789
789
|
name: n,
|
|
790
790
|
...c,
|
|
791
791
|
className: r,
|
|
792
792
|
ref: (l) => {
|
|
793
|
-
typeof
|
|
793
|
+
typeof s == "function" ? s(l) : s && (s.current = l), e && e(l);
|
|
794
794
|
}
|
|
795
795
|
}
|
|
796
796
|
)
|
|
@@ -799,117 +799,117 @@ const Y = "dd/MM/yyyy", ze = (e) => {
|
|
|
799
799
|
label: r = "",
|
|
800
800
|
placeholder: n = "dd/mm/aaaa",
|
|
801
801
|
className: c = "",
|
|
802
|
-
forceReadOnly:
|
|
802
|
+
forceReadOnly: s = !1,
|
|
803
803
|
forceHidden: l = !1
|
|
804
804
|
}) => {
|
|
805
|
-
const { control: i } =
|
|
806
|
-
field: { onChange: k, onBlur:
|
|
807
|
-
fieldState: { error:
|
|
808
|
-
} =
|
|
805
|
+
const { control: i } = O(), { isView: a } = D(), { isReadOnly: v, isHidden: m } = T(), u = s || !!v(e), f = l || !!m(e), {
|
|
806
|
+
field: { onChange: k, onBlur: R, value: b, ref: y },
|
|
807
|
+
fieldState: { error: g }
|
|
808
|
+
} = _({
|
|
809
809
|
name: e,
|
|
810
810
|
control: i
|
|
811
|
-
}),
|
|
812
|
-
(
|
|
813
|
-
k(
|
|
811
|
+
}), x = j(() => ze(b), [b]), P = S(
|
|
812
|
+
(o) => {
|
|
813
|
+
k(o ? Xe(o) : "");
|
|
814
814
|
},
|
|
815
815
|
[k]
|
|
816
|
-
),
|
|
817
|
-
(
|
|
818
|
-
var d,
|
|
819
|
-
if (
|
|
816
|
+
), w = S(
|
|
817
|
+
(o) => {
|
|
818
|
+
var d, p;
|
|
819
|
+
if (y(o), o && ((p = (d = i._fields) == null ? void 0 : d[e]) != null && p._f)) {
|
|
820
820
|
const V = i._fields[e];
|
|
821
821
|
V._f.ref = {
|
|
822
822
|
focus: () => {
|
|
823
|
-
var
|
|
824
|
-
return (
|
|
823
|
+
var N;
|
|
824
|
+
return (N = o.focus) == null ? void 0 : N.call(o);
|
|
825
825
|
},
|
|
826
826
|
select: () => {
|
|
827
|
-
var
|
|
828
|
-
return (
|
|
827
|
+
var N;
|
|
828
|
+
return (N = o.select) == null ? void 0 : N.call(o);
|
|
829
829
|
},
|
|
830
|
-
setCustomValidity: (
|
|
830
|
+
setCustomValidity: (N) => {
|
|
831
831
|
var $;
|
|
832
|
-
return ($ =
|
|
832
|
+
return ($ = o.setCustomValidity) == null ? void 0 : $.call(o, N);
|
|
833
833
|
},
|
|
834
834
|
reportValidity: () => {
|
|
835
|
-
var
|
|
836
|
-
return (
|
|
835
|
+
var N;
|
|
836
|
+
return (N = o.reportValidity) == null ? void 0 : N.call(o);
|
|
837
837
|
}
|
|
838
838
|
};
|
|
839
839
|
}
|
|
840
840
|
},
|
|
841
|
-
[
|
|
841
|
+
[y, i, e]
|
|
842
842
|
);
|
|
843
|
-
return
|
|
843
|
+
return f ? null : a ? /* @__PURE__ */ h("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: b || "-" })
|
|
846
|
+
] }) : /* @__PURE__ */ h("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:
|
|
853
|
+
selected: x,
|
|
854
854
|
onChange: P,
|
|
855
|
-
onBlur:
|
|
855
|
+
onBlur: R,
|
|
856
856
|
dateFormat: Y,
|
|
857
857
|
placeholderText: n,
|
|
858
|
-
disabled:
|
|
859
|
-
readOnly:
|
|
858
|
+
disabled: u,
|
|
859
|
+
readOnly: u,
|
|
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: !
|
|
866
|
+
isClearable: !u && !!b,
|
|
867
867
|
autoComplete: "off",
|
|
868
|
-
customInput: /* @__PURE__ */ t(Je, { name: e, shimRef:
|
|
868
|
+
customInput: /* @__PURE__ */ t(Je, { name: e, shimRef: w })
|
|
869
869
|
}
|
|
870
870
|
) }),
|
|
871
|
-
|
|
871
|
+
g && /* @__PURE__ */ t("span", { className: "help-block text-danger", children: String(g.message) })
|
|
872
872
|
] });
|
|
873
|
-
}, dt =
|
|
873
|
+
}, dt = I(Ye);
|
|
874
874
|
function Qe({
|
|
875
875
|
mapping: e = {},
|
|
876
876
|
defaultLabel: r = "Não reconhecido",
|
|
877
877
|
className: n = "",
|
|
878
878
|
hidden: c = !1,
|
|
879
|
-
label:
|
|
879
|
+
label: s
|
|
880
880
|
}) {
|
|
881
|
-
const { activityId: l } =
|
|
881
|
+
const { activityId: l } = D(), i = j(() => !e || l === null || l === void 0 ? null : e[l], [l, e]);
|
|
882
882
|
if (!i)
|
|
883
|
-
return /* @__PURE__ */
|
|
884
|
-
|
|
883
|
+
return /* @__PURE__ */ h("div", { className: `form-group ${c ? "hidden" : ""}`, children: [
|
|
884
|
+
s && /* @__PURE__ */ t("label", { children: s }),
|
|
885
885
|
/* @__PURE__ */ t("div", { className: `status-badge default ${n}`, children: r })
|
|
886
886
|
] });
|
|
887
887
|
const a = {
|
|
888
888
|
"--customColor": i.color
|
|
889
889
|
};
|
|
890
|
-
return /* @__PURE__ */
|
|
891
|
-
|
|
892
|
-
/* @__PURE__ */
|
|
890
|
+
return /* @__PURE__ */ h("div", { className: `form-group ${c ? "hidden" : ""}`, children: [
|
|
891
|
+
s && /* @__PURE__ */ t("label", { children: s }),
|
|
892
|
+
/* @__PURE__ */ h("div", { className: `status-badge ${n}`, style: a, children: [
|
|
893
893
|
i.icon && /* @__PURE__ */ t("i", { className: i.icon }),
|
|
894
894
|
/* @__PURE__ */ t("span", { children: i.label })
|
|
895
895
|
] })
|
|
896
896
|
] });
|
|
897
897
|
}
|
|
898
|
-
const ut =
|
|
898
|
+
const ut = I(Qe);
|
|
899
899
|
function Ue({
|
|
900
900
|
name: e,
|
|
901
901
|
control: r,
|
|
902
902
|
defaultRowValue: n,
|
|
903
903
|
isView: c,
|
|
904
|
-
isReadOnly:
|
|
904
|
+
isReadOnly: s,
|
|
905
905
|
filters: l = []
|
|
906
906
|
}) {
|
|
907
|
-
const { field: i } =
|
|
907
|
+
const { field: i } = _({ name: e, control: r }), [a, v] = F([]), [m, u] = F([]), f = () => Date.now() + Math.random(), k = (o) => {
|
|
908
908
|
try {
|
|
909
|
-
const d = JSON.parse(
|
|
910
|
-
return Array.isArray(d) ? d.map((
|
|
911
|
-
...
|
|
912
|
-
_uid:
|
|
909
|
+
const d = JSON.parse(o);
|
|
910
|
+
return Array.isArray(d) ? d.map((p) => ({
|
|
911
|
+
...p,
|
|
912
|
+
_uid: p._uid || f()
|
|
913
913
|
})) : [];
|
|
914
914
|
} catch (d) {
|
|
915
915
|
return console.error(`Erro ao ler dados da tabela "${e}":`, d), [];
|
|
@@ -917,59 +917,59 @@ function Ue({
|
|
|
917
917
|
};
|
|
918
918
|
A(() => {
|
|
919
919
|
if (!(a.length > 0 && !c) && i.value && typeof i.value == "string") {
|
|
920
|
-
const
|
|
921
|
-
if (i.value ===
|
|
920
|
+
const o = JSON.stringify(a);
|
|
921
|
+
if (i.value === o) return;
|
|
922
922
|
const d = k(i.value);
|
|
923
|
-
|
|
923
|
+
v(d);
|
|
924
924
|
}
|
|
925
925
|
}, [i.value, c]), A(() => {
|
|
926
|
-
if (
|
|
927
|
-
const
|
|
928
|
-
i.value !==
|
|
929
|
-
}, [a, i,
|
|
930
|
-
const
|
|
931
|
-
const
|
|
932
|
-
|
|
933
|
-
}, [n]),
|
|
934
|
-
|
|
935
|
-
(
|
|
936
|
-
),
|
|
937
|
-
}, [
|
|
938
|
-
(
|
|
939
|
-
|
|
926
|
+
if (s) return;
|
|
927
|
+
const o = JSON.stringify(a);
|
|
928
|
+
i.value !== o && i.onChange(o);
|
|
929
|
+
}, [a, i, s]);
|
|
930
|
+
const R = S(() => {
|
|
931
|
+
const o = { _uid: f(), ...n };
|
|
932
|
+
v((d) => [...d, o]);
|
|
933
|
+
}, [n]), b = S(() => {
|
|
934
|
+
v(
|
|
935
|
+
(o) => o.filter((d) => !m.includes(d._uid))
|
|
936
|
+
), u([]);
|
|
937
|
+
}, [m]), y = S(
|
|
938
|
+
(o, d, p) => {
|
|
939
|
+
v(
|
|
940
940
|
(V) => V.map(
|
|
941
|
-
(
|
|
941
|
+
(N) => N._uid === o ? { ...N, [d]: p } : N
|
|
942
942
|
)
|
|
943
943
|
);
|
|
944
944
|
},
|
|
945
945
|
[]
|
|
946
|
-
),
|
|
947
|
-
|
|
948
|
-
(d) => d.includes(
|
|
946
|
+
), g = S((o) => {
|
|
947
|
+
u(
|
|
948
|
+
(d) => d.includes(o) ? d.filter((p) => p !== o) : [...d, o]
|
|
949
949
|
);
|
|
950
|
-
}, []),
|
|
951
|
-
(
|
|
952
|
-
|
|
950
|
+
}, []), x = S(
|
|
951
|
+
(o) => {
|
|
952
|
+
u(o ? a.map((d) => d._uid) : []);
|
|
953
953
|
},
|
|
954
954
|
[a]
|
|
955
|
-
), P = a.length > 0 &&
|
|
956
|
-
(
|
|
955
|
+
), P = a.length > 0 && m.length === a.length, w = j(() => !l || l.length === 0 ? a : a.filter(
|
|
956
|
+
(o) => l.every((d) => {
|
|
957
957
|
if ("custom" in d)
|
|
958
|
-
return d.custom(
|
|
959
|
-
const
|
|
958
|
+
return d.custom(o);
|
|
959
|
+
const p = o[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
|
}
|
|
@@ -978,15 +978,15 @@ function Ue({
|
|
|
978
978
|
return {
|
|
979
979
|
field: i,
|
|
980
980
|
tableRows: a,
|
|
981
|
-
visibleRows:
|
|
982
|
-
selectedRowIds:
|
|
981
|
+
visibleRows: w,
|
|
982
|
+
selectedRowIds: m,
|
|
983
983
|
isAllSelected: P,
|
|
984
984
|
handle: {
|
|
985
|
-
addRow:
|
|
986
|
-
removeRows:
|
|
987
|
-
updateCellValue:
|
|
988
|
-
toggleSelection:
|
|
989
|
-
toggleSelectAll:
|
|
985
|
+
addRow: R,
|
|
986
|
+
removeRows: b,
|
|
987
|
+
updateCellValue: y,
|
|
988
|
+
toggleSelection: g,
|
|
989
|
+
toggleSelectAll: x
|
|
990
990
|
}
|
|
991
991
|
};
|
|
992
992
|
}
|
|
@@ -995,240 +995,190 @@ const mt = ({
|
|
|
995
995
|
title: r = "Tabela Dinâmica",
|
|
996
996
|
columns: n,
|
|
997
997
|
defaultRowValue: c = {},
|
|
998
|
-
forceReadOnly:
|
|
998
|
+
forceReadOnly: s = !1,
|
|
999
999
|
layout: l = "fluid",
|
|
1000
1000
|
actions: i = !0,
|
|
1001
1001
|
filters: a = []
|
|
1002
1002
|
}) => {
|
|
1003
|
-
const { control:
|
|
1003
|
+
const { control: v } = O(), { isView: m, isReadOnly: u } = D(), { isReadOnly: f } = T(), k = s || m || u || f && f(e), { field: R, visibleRows: b, selectedRowIds: y, isAllSelected: g, handle: x } = Ue({
|
|
1004
1004
|
name: e,
|
|
1005
|
-
control:
|
|
1005
|
+
control: v,
|
|
1006
1006
|
defaultRowValue: c,
|
|
1007
|
-
isView:
|
|
1007
|
+
isView: m,
|
|
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__ */ h("div", { className: `table-wrapper ${P ? "table-fixed" : "table-fluid"}`, children: [
|
|
1012
|
+
/* @__PURE__ */ t("input", { type: "hidden", ...R }),
|
|
1013
|
+
/* @__PURE__ */ h("div", { className: "header-handle", children: [
|
|
1014
1014
|
/* @__PURE__ */ t("h3", { children: r }),
|
|
1015
|
-
!k && i && /* @__PURE__ */
|
|
1016
|
-
/* @__PURE__ */
|
|
1015
|
+
!k && i && /* @__PURE__ */ h("div", { className: "handle-actions", children: [
|
|
1016
|
+
/* @__PURE__ */ h(
|
|
1017
1017
|
"button",
|
|
1018
1018
|
{
|
|
1019
1019
|
type: "button",
|
|
1020
|
-
className: `btn ${
|
|
1021
|
-
disabled:
|
|
1022
|
-
onClick:
|
|
1020
|
+
className: `btn ${y.length > 0 ? "btn-danger" : ""}`,
|
|
1021
|
+
disabled: y.length === 0,
|
|
1022
|
+
onClick: x.removeRows,
|
|
1023
1023
|
children: [
|
|
1024
1024
|
"Remover (",
|
|
1025
|
-
|
|
1025
|
+
y.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: x.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__ */ h("table", { className: "table-custom", children: [
|
|
1034
|
+
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ h("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: g,
|
|
1040
|
+
onChange: (w) => x.toggleSelectAll(w.target.checked)
|
|
1041
1041
|
}
|
|
1042
1042
|
) }),
|
|
1043
|
-
n.map((
|
|
1043
|
+
n.map((w) => /* @__PURE__ */ t(
|
|
1044
1044
|
"th",
|
|
1045
1045
|
{
|
|
1046
|
-
style:
|
|
1047
|
-
children:
|
|
1046
|
+
style: w.width ? { minWidth: P ? w.width : "100%" } : { width: "max-content" },
|
|
1047
|
+
children: w.label
|
|
1048
1048
|
},
|
|
1049
|
-
|
|
1049
|
+
w.key
|
|
1050
1050
|
))
|
|
1051
1051
|
] }) }),
|
|
1052
|
-
/* @__PURE__ */
|
|
1053
|
-
|
|
1052
|
+
/* @__PURE__ */ h("tbody", { children: [
|
|
1053
|
+
b.map((w, o) => /* @__PURE__ */ h("tr", { children: [
|
|
1054
1054
|
!k && /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(
|
|
1055
1055
|
"input",
|
|
1056
1056
|
{
|
|
1057
1057
|
type: "checkbox",
|
|
1058
|
-
checked:
|
|
1059
|
-
onChange: () =>
|
|
1058
|
+
checked: y.includes(w._uid),
|
|
1059
|
+
onChange: () => x.toggleSelection(w._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: w,
|
|
1064
|
+
index: o,
|
|
1065
|
+
updateRow: (p, V) => x.updateCellValue(w._uid, p, V),
|
|
1066
1066
|
isLocked: !!k,
|
|
1067
|
-
isView: !!
|
|
1067
|
+
isView: !!m
|
|
1068
1068
|
}) : d.render(
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
(
|
|
1069
|
+
w,
|
|
1070
|
+
o,
|
|
1071
|
+
(p, V) => x.updateCellValue(w._uid, p, V),
|
|
1072
1072
|
!!k,
|
|
1073
|
-
!!
|
|
1074
|
-
) :
|
|
1075
|
-
] },
|
|
1076
|
-
|
|
1073
|
+
!!m
|
|
1074
|
+
) : w[d.key] }, `${w._uid}-${d.key}`))
|
|
1075
|
+
] }, w._uid)),
|
|
1076
|
+
b.length === 0 && /* @__PURE__ */ t("tr", { className: "empty-row", children: /* @__PURE__ */ t("td", { colSpan: 100, className: "text-center", children: k ? "Nenhum registro encontrado." : "Nenhum registro." }) })
|
|
1077
1077
|
] })
|
|
1078
1078
|
] }) })
|
|
1079
1079
|
] });
|
|
1080
|
-
}, Ge = ({
|
|
1081
|
-
name: e,
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
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);
|
|
1100
|
-
}
|
|
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.");
|
|
1080
|
+
}, Ge = ({ name: e, label: r, help: n }) => {
|
|
1081
|
+
const { control: c } = O(), { field: s } = _({ name: e, control: c }), [l, i] = F(null), a = S(() => {
|
|
1082
|
+
const f = (window.top || window.parent || window).WKFViewAttachment;
|
|
1083
|
+
if (f && f.getAllAttachments) {
|
|
1084
|
+
const k = f.getAllAttachments(), R = n || e, b = k.find(
|
|
1085
|
+
(y) => {
|
|
1086
|
+
var g;
|
|
1087
|
+
return y.description === R || y.documentDescription === R || ((g = y.description) == null ? void 0 : g.includes(e));
|
|
1088
|
+
}
|
|
1089
|
+
);
|
|
1090
|
+
b ? (i(b), s.value !== b.description && s.onChange(b.description)) : i(null);
|
|
1123
1091
|
}
|
|
1124
|
-
}, [e,
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1092
|
+
}, [e, n, s]);
|
|
1093
|
+
A(() => (window.addEventListener("fluig_attachments_changed", a), a(), () => window.removeEventListener("fluig_attachments_changed", a)), [a]);
|
|
1094
|
+
const v = S(() => {
|
|
1095
|
+
const u = window.top || window.parent || window, f = n || e;
|
|
1096
|
+
l ? (u.WKFViewAttachment.userCanView(l) || u.WKFViewAttachment.checkPermission("R")) && u.WKFViewAttachment.openAttachmentView(
|
|
1097
|
+
l.colleagueId,
|
|
1098
|
+
l.documentId,
|
|
1099
|
+
l.version
|
|
1100
|
+
) : u.JSInterface && u.JSInterface.showCamera ? u.JSInterface.showCamera(f) : u.openInputFile ? u.openInputFile("ecm-navigation-inputFile-clone", f) : window.parent.$("#btnInputAttachment").click();
|
|
1101
|
+
}, [l, e, n]), m = !!l || !!s.value;
|
|
1102
|
+
return /* @__PURE__ */ h("div", { className: "form-group", style: { marginBottom: "15px" }, children: [
|
|
1103
|
+
r && /* @__PURE__ */ t("label", { className: "control-label", children: r }),
|
|
1104
|
+
/* @__PURE__ */ h(
|
|
1105
|
+
"button",
|
|
1129
1106
|
{
|
|
1130
|
-
|
|
1107
|
+
type: "button",
|
|
1108
|
+
onClick: v,
|
|
1109
|
+
className: "btn btn-block",
|
|
1131
1110
|
style: {
|
|
1111
|
+
textAlign: "left",
|
|
1132
1112
|
display: "flex",
|
|
1133
1113
|
alignItems: "center",
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1114
|
+
gap: "10px",
|
|
1115
|
+
padding: "10px",
|
|
1116
|
+
backgroundColor: m ? "#f8fff9" : "#fff",
|
|
1117
|
+
border: m ? "1px solid #27ae60" : "1px dashed #ccc",
|
|
1118
|
+
color: m ? "#27ae60" : "#333",
|
|
1119
|
+
transition: "all 0.2s"
|
|
1139
1120
|
},
|
|
1140
1121
|
children: [
|
|
1141
|
-
/* @__PURE__ */
|
|
1142
|
-
"
|
|
1122
|
+
/* @__PURE__ */ t(
|
|
1123
|
+
"i",
|
|
1143
1124
|
{
|
|
1144
|
-
|
|
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
|
-
]
|
|
1125
|
+
className: `fluigicon ${m ? "fluigicon-check-circle-on" : "fluigicon-paperclip"} icon-sm`
|
|
1159
1126
|
}
|
|
1160
1127
|
),
|
|
1161
|
-
|
|
1162
|
-
"
|
|
1128
|
+
/* @__PURE__ */ t(
|
|
1129
|
+
"span",
|
|
1163
1130
|
{
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1131
|
+
style: {
|
|
1132
|
+
flex: 1,
|
|
1133
|
+
whiteSpace: "nowrap",
|
|
1134
|
+
overflow: "hidden",
|
|
1135
|
+
textOverflow: "ellipsis"
|
|
1136
|
+
},
|
|
1137
|
+
children: m ? s.value : `Anexar ${n || ""}`
|
|
1168
1138
|
}
|
|
1169
1139
|
),
|
|
1170
|
-
|
|
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
|
-
] })
|
|
1140
|
+
m && /* @__PURE__ */ t("i", { className: "fluigicon fluigicon-eye-open" })
|
|
1191
1141
|
]
|
|
1192
1142
|
}
|
|
1193
1143
|
),
|
|
1194
|
-
/* @__PURE__ */ t("input", { type: "hidden", name: e, value:
|
|
1144
|
+
/* @__PURE__ */ t("input", { type: "hidden", name: e, value: s.value || "" })
|
|
1195
1145
|
] });
|
|
1196
|
-
}, ht =
|
|
1146
|
+
}, ht = I(Ge);
|
|
1197
1147
|
function ft({
|
|
1198
1148
|
items: e,
|
|
1199
1149
|
time: r = 0,
|
|
1200
1150
|
showNavigation: n = !0,
|
|
1201
1151
|
progressBar: c = !0
|
|
1202
1152
|
}) {
|
|
1203
|
-
const [
|
|
1204
|
-
l((
|
|
1205
|
-
}, [e.length]),
|
|
1206
|
-
l((
|
|
1153
|
+
const [s, l] = F(0), [i, a] = F(0), v = E(null), m = E(null), u = S(() => {
|
|
1154
|
+
l((y) => (y + 1) % e.length), a(0);
|
|
1155
|
+
}, [e.length]), f = S(() => {
|
|
1156
|
+
l((y) => (y - 1 + e.length) % e.length), a(0);
|
|
1207
1157
|
}, [e.length]);
|
|
1208
1158
|
if (A(() => {
|
|
1209
1159
|
if (r > 0 && e.length > 1) {
|
|
1210
|
-
const
|
|
1211
|
-
|
|
1212
|
-
a((
|
|
1160
|
+
const g = 100 / r * 100;
|
|
1161
|
+
v.current = setInterval(u, r), m.current = setInterval(() => {
|
|
1162
|
+
a((x) => x >= 100 ? 0 : x + g);
|
|
1213
1163
|
}, 100);
|
|
1214
1164
|
}
|
|
1215
1165
|
return () => {
|
|
1216
|
-
|
|
1166
|
+
v.current && clearInterval(v.current), m.current && clearInterval(m.current);
|
|
1217
1167
|
};
|
|
1218
|
-
}, [r,
|
|
1219
|
-
const k = e[
|
|
1220
|
-
return /* @__PURE__ */
|
|
1221
|
-
/* @__PURE__ */
|
|
1222
|
-
n && e.length > 1 && /* @__PURE__ */
|
|
1223
|
-
/* @__PURE__ */ t("button", { className: "nav-btn prev", onClick:
|
|
1224
|
-
/* @__PURE__ */ t("button", { className: "nav-btn next", onClick:
|
|
1168
|
+
}, [r, u, e.length, s]), !e || e.length === 0) return null;
|
|
1169
|
+
const k = e[s], R = typeof k == "string" ? k : k.url, b = /\.(jpg|jpeg|png|gif|webp)$/i.test(R);
|
|
1170
|
+
return /* @__PURE__ */ h("div", { className: "carousel-root", children: [
|
|
1171
|
+
/* @__PURE__ */ h("div", { className: "carousel-viewport", children: [
|
|
1172
|
+
n && e.length > 1 && /* @__PURE__ */ h(J, { children: [
|
|
1173
|
+
/* @__PURE__ */ t("button", { className: "nav-btn prev", onClick: f, children: /* @__PURE__ */ t("i", { className: "flaticon flaticon-chevron-left" }) }),
|
|
1174
|
+
/* @__PURE__ */ t("button", { className: "nav-btn next", onClick: u, children: /* @__PURE__ */ t("i", { className: "flaticon flaticon-chevron-right" }) })
|
|
1225
1175
|
] }),
|
|
1226
|
-
/* @__PURE__ */ t("div", { className: "carousel-media", children:
|
|
1176
|
+
/* @__PURE__ */ t("div", { className: "carousel-media", children: b ? /* @__PURE__ */ t("img", { src: R, alt: "Slide", className: "carousel-image" }) : /* @__PURE__ */ h("div", { className: "carousel-file-fallback", children: [
|
|
1227
1177
|
/* @__PURE__ */ t("i", { className: "flaticon flaticon-file icon-xl" }),
|
|
1228
1178
|
/* @__PURE__ */ t(
|
|
1229
1179
|
"a",
|
|
1230
1180
|
{
|
|
1231
|
-
href:
|
|
1181
|
+
href: R,
|
|
1232
1182
|
target: "_blank",
|
|
1233
1183
|
rel: "noreferrer",
|
|
1234
1184
|
className: "btn-open",
|
|
@@ -1236,15 +1186,15 @@ function ft({
|
|
|
1236
1186
|
}
|
|
1237
1187
|
)
|
|
1238
1188
|
] }) }),
|
|
1239
|
-
e.length > 1 && /* @__PURE__ */ t("div", { className: "carousel-dots", children: e.map((
|
|
1189
|
+
e.length > 1 && /* @__PURE__ */ t("div", { className: "carousel-dots", children: e.map((y, g) => /* @__PURE__ */ t(
|
|
1240
1190
|
"div",
|
|
1241
1191
|
{
|
|
1242
|
-
className: `dot ${
|
|
1192
|
+
className: `dot ${g === s ? "active" : ""}`,
|
|
1243
1193
|
onClick: () => {
|
|
1244
|
-
l(
|
|
1194
|
+
l(g), a(0);
|
|
1245
1195
|
}
|
|
1246
1196
|
},
|
|
1247
|
-
|
|
1197
|
+
g
|
|
1248
1198
|
)) })
|
|
1249
1199
|
] }),
|
|
1250
1200
|
c && r > 0 && e.length > 1 && /* @__PURE__ */ t("div", { className: "carousel-progress-container", children: /* @__PURE__ */ t(
|
|
@@ -1261,13 +1211,13 @@ function gt({
|
|
|
1261
1211
|
isOpen: r,
|
|
1262
1212
|
onOpen: n,
|
|
1263
1213
|
onClose: c,
|
|
1264
|
-
content:
|
|
1214
|
+
content: s,
|
|
1265
1215
|
footer: l,
|
|
1266
1216
|
width: i
|
|
1267
1217
|
}) {
|
|
1268
1218
|
const a = S(
|
|
1269
|
-
(
|
|
1270
|
-
|
|
1219
|
+
(v) => {
|
|
1220
|
+
v.key === "Escape" && c();
|
|
1271
1221
|
},
|
|
1272
1222
|
[c]
|
|
1273
1223
|
);
|
|
@@ -1280,14 +1230,14 @@ function gt({
|
|
|
1280
1230
|
onClick: c,
|
|
1281
1231
|
"aria-modal": "true",
|
|
1282
1232
|
role: "dialog",
|
|
1283
|
-
children: /* @__PURE__ */
|
|
1233
|
+
children: /* @__PURE__ */ h(
|
|
1284
1234
|
"div",
|
|
1285
1235
|
{
|
|
1286
1236
|
style: { maxWidth: i },
|
|
1287
1237
|
className: "modal-container",
|
|
1288
|
-
onClick: (
|
|
1238
|
+
onClick: (v) => v.stopPropagation(),
|
|
1289
1239
|
children: [
|
|
1290
|
-
/* @__PURE__ */
|
|
1240
|
+
/* @__PURE__ */ h("div", { className: "modal-header", children: [
|
|
1291
1241
|
/* @__PURE__ */ t("h3", { children: e }),
|
|
1292
1242
|
/* @__PURE__ */ t(
|
|
1293
1243
|
"div",
|
|
@@ -1306,7 +1256,7 @@ function gt({
|
|
|
1306
1256
|
}
|
|
1307
1257
|
)
|
|
1308
1258
|
] }),
|
|
1309
|
-
/* @__PURE__ */ t("div", { className: "modal-content", children:
|
|
1259
|
+
/* @__PURE__ */ t("div", { className: "modal-content", children: s }),
|
|
1310
1260
|
l && /* @__PURE__ */ t("div", { className: "modal-footer", children: l })
|
|
1311
1261
|
]
|
|
1312
1262
|
}
|
|
@@ -1319,24 +1269,24 @@ function pt({
|
|
|
1319
1269
|
childs: r,
|
|
1320
1270
|
footer: n,
|
|
1321
1271
|
contentExternal: c,
|
|
1322
|
-
bg:
|
|
1272
|
+
bg: s,
|
|
1323
1273
|
color: l,
|
|
1324
1274
|
onSelect: i
|
|
1325
1275
|
}) {
|
|
1326
|
-
return /* @__PURE__ */
|
|
1327
|
-
/* @__PURE__ */
|
|
1276
|
+
return /* @__PURE__ */ h("div", { className: "main-container dfea", children: [
|
|
1277
|
+
/* @__PURE__ */ h("div", { className: "sidebar-wrapper", style: { backgroundColor: `${s}` }, children: [
|
|
1328
1278
|
e && /* @__PURE__ */ t("div", { className: "sidebar-logo", children: /* @__PURE__ */ t("img", { src: e, alt: "", width: "auto", height: "28px" }) }),
|
|
1329
1279
|
/* @__PURE__ */ t("ul", { className: "sidebar-childs-content", children: r == null ? void 0 : r.map(
|
|
1330
1280
|
(a) => {
|
|
1331
|
-
var
|
|
1332
|
-
return a != null && a.options && ((
|
|
1333
|
-
/* @__PURE__ */
|
|
1281
|
+
var v, m;
|
|
1282
|
+
return a != null && a.options && ((v = a == null ? void 0 : a.options) == null ? void 0 : v.length) > 0 ? /* @__PURE__ */ t(J, { children: /* @__PURE__ */ h("ul", { className: "sidebar-child sidebar-options-content", children: [
|
|
1283
|
+
/* @__PURE__ */ h(
|
|
1334
1284
|
"li",
|
|
1335
1285
|
{
|
|
1336
1286
|
className: "sidebar-child",
|
|
1337
1287
|
onClick: () => {
|
|
1338
|
-
var
|
|
1339
|
-
(
|
|
1288
|
+
var u;
|
|
1289
|
+
(u = a.action) == null || u.call(a), i == null || i(a.id);
|
|
1340
1290
|
},
|
|
1341
1291
|
style: { color: `${l}` },
|
|
1342
1292
|
children: [
|
|
@@ -1345,25 +1295,25 @@ function pt({
|
|
|
1345
1295
|
]
|
|
1346
1296
|
}
|
|
1347
1297
|
),
|
|
1348
|
-
(
|
|
1298
|
+
(m = a.options) == null ? void 0 : m.map((u) => /* @__PURE__ */ t(
|
|
1349
1299
|
"li",
|
|
1350
1300
|
{
|
|
1351
1301
|
className: "sidebar-option",
|
|
1352
1302
|
onClick: () => {
|
|
1353
|
-
var
|
|
1354
|
-
(
|
|
1303
|
+
var f;
|
|
1304
|
+
(f = u.action) == null || f.call(u), i == null || i(u.id);
|
|
1355
1305
|
},
|
|
1356
1306
|
style: { color: `${l}` },
|
|
1357
|
-
children:
|
|
1307
|
+
children: u.label
|
|
1358
1308
|
}
|
|
1359
1309
|
))
|
|
1360
|
-
] }) }) : /* @__PURE__ */
|
|
1310
|
+
] }) }) : /* @__PURE__ */ h(
|
|
1361
1311
|
"li",
|
|
1362
1312
|
{
|
|
1363
1313
|
className: "sidebar-child",
|
|
1364
1314
|
onClick: () => {
|
|
1365
|
-
var
|
|
1366
|
-
(
|
|
1315
|
+
var u;
|
|
1316
|
+
(u = a.action) == null || u.call(a), i == null || i(a.id);
|
|
1367
1317
|
},
|
|
1368
1318
|
style: { color: `${l}` },
|
|
1369
1319
|
children: [
|