diefra_ecm_ui 1.2.0 → 1.2.1

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.
Files changed (3) hide show
  1. package/dist/index.cjs +10 -10
  2. package/dist/index.js +470 -470
  3. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,36 +1,36 @@
1
- import { jsx as e, jsxs as h, Fragment as ce } from "react/jsx-runtime";
2
- import { useCallback as j, useEffect as T, memo as q, useState as P, useMemo as z, useRef as X, forwardRef as de, createElement as K } from "react";
3
- import { useFormContext as U, useController as W, useFormState as oe } from "react-hook-form";
1
+ import { jsx as e, jsxs as p, Fragment as ce } from "react/jsx-runtime";
2
+ import { useCallback as P, useEffect as j, memo as q, useState as U, useMemo as Y, useRef as X, forwardRef as oe, createElement as M } from "react";
3
+ import { useFormContext as J, useController as Q, useFormState as de } from "react-hook-form";
4
4
  import { IMaskInput as pe } from "react-imask";
5
- import { useSection as G, useFluigRuntime as Y } from "@fluig-kit/ecm";
6
- import { isValid as ae, eachDayOfInterval as ve, endOfWeek as ye, endOfMonth as be, startOfWeek as ge, startOfMonth as Ne, getYear as ke, subMonths as we, setMonth as _e, setYear as Oe, addMonths as Se, isSameMonth as Re, isSameDay as $e, format as ue, isToday as xe, parse as Ae } from "date-fns";
7
- function Ie({ title: t, isOpen: l, onOpen: a, onClose: f, content: c, footer: o, width: m }) {
8
- const d = j(
9
- (p) => {
10
- p.key === "Escape" && f();
5
+ import { useSection as G, useFluigRuntime as z } from "@fluig-kit/ecm";
6
+ import { isValid as ae, eachDayOfInterval as ve, endOfWeek as ye, endOfMonth as be, startOfWeek as ge, startOfMonth as Ne, getYear as ke, subMonths as we, setMonth as _e, setYear as Oe, addMonths as Re, isSameMonth as Se, isSameDay as xe, format as ue, isToday as $e, parse as Ae } from "date-fns";
7
+ function Ie({ title: t, isOpen: i, onOpen: a, onClose: u, content: c, footer: d, width: m }) {
8
+ const o = P(
9
+ (v) => {
10
+ v.key === "Escape" && u();
11
11
  },
12
- [f]
12
+ [u]
13
13
  );
14
- return T(() => (l && (document.addEventListener("keydown", d), a == null || a(), document.body.style.overflow = "hidden"), () => {
15
- document.removeEventListener("keydown", d), document.body.style.overflow = "auto";
16
- }), [l, d, a]), l ? /* @__PURE__ */ e("div", { className: "modal-overlay", onClick: f, "aria-modal": "true", role: "dialog", children: /* @__PURE__ */ h("div", { style: { maxWidth: m }, className: "modal-container", onClick: (p) => p.stopPropagation(), children: [
17
- /* @__PURE__ */ h("div", { className: "modal-header", children: [
14
+ return j(() => (i && (document.addEventListener("keydown", o), a == null || a(), document.body.style.overflow = "hidden"), () => {
15
+ document.removeEventListener("keydown", o), document.body.style.overflow = "auto";
16
+ }), [i, o, a]), i ? /* @__PURE__ */ e("div", { className: "modal-overlay", onClick: u, "aria-modal": "true", role: "dialog", children: /* @__PURE__ */ p("div", { style: { maxWidth: m }, className: "modal-container", onClick: (v) => v.stopPropagation(), children: [
17
+ /* @__PURE__ */ p("div", { className: "modal-header", children: [
18
18
  /* @__PURE__ */ e("h3", { children: t }),
19
- /* @__PURE__ */ e("div", { className: "btn-close-modal", onClick: f, role: "button", "aria-label": "Fechar modal", children: /* @__PURE__ */ e("i", { className: "flaticon flaticon-close icon-sm", "aria-hidden": "true" }) })
19
+ /* @__PURE__ */ e("div", { className: "btn-close-modal", onClick: u, role: "button", "aria-label": "Fechar modal", children: /* @__PURE__ */ e("i", { className: "flaticon flaticon-close icon-sm", "aria-hidden": "true" }) })
20
20
  ] }),
21
21
  /* @__PURE__ */ e("div", { className: "modal-content", children: c }),
22
- o && /* @__PURE__ */ e("div", { className: "modal-footer", children: o })
22
+ d && /* @__PURE__ */ e("div", { className: "modal-footer", children: d })
23
23
  ] }) }) : null;
24
24
  }
25
- function Ve({ text: t, title: l = "Ajuda & Informações", width: a = "500px", className: f = "" }) {
26
- const [c, o] = P(!1), m = (d) => {
27
- d.preventDefault(), d.stopPropagation(), o(!0);
25
+ function Ve({ text: t, title: i = "Ajuda & Informações", width: a = "500px", className: u = "" }) {
26
+ const [c, d] = U(!1), m = (o) => {
27
+ o.preventDefault(), o.stopPropagation(), d(!0);
28
28
  };
29
- return /* @__PURE__ */ h(ce, { children: [
29
+ return /* @__PURE__ */ p(ce, { children: [
30
30
  /* @__PURE__ */ e(
31
31
  "div",
32
32
  {
33
- className: `dfe-help-indicator ${f}`,
33
+ className: `dfe-help-indicator ${u}`,
34
34
  onClick: m,
35
35
  role: "button",
36
36
  tabIndex: 0,
@@ -42,289 +42,289 @@ function Ve({ text: t, title: l = "Ajuda & Informações", width: a = "500px", c
42
42
  /* @__PURE__ */ e(
43
43
  Ie,
44
44
  {
45
- title: l,
45
+ title: i,
46
46
  isOpen: c,
47
- onClose: () => o(!1),
47
+ onClose: () => d(!1),
48
48
  width: a,
49
49
  content: /* @__PURE__ */ e("div", { className: "dfe-help-modal-body", children: t }),
50
- footer: /* @__PURE__ */ e("div", { className: "dfe-help-modal-footer", children: /* @__PURE__ */ e("button", { type: "button", className: "btn btn-info dfe-help-btn", onClick: () => o(!1), children: "Entendido" }) })
50
+ footer: /* @__PURE__ */ e("div", { className: "dfe-help-modal-footer", children: /* @__PURE__ */ e("button", { type: "button", className: "btn btn-info dfe-help-btn", onClick: () => d(!1), children: "Entendido" }) })
51
51
  }
52
52
  )
53
53
  ] });
54
54
  }
55
- const Z = q(Ve), Ee = {
55
+ const Z = q(Ve), De = {
56
56
  cpf: "000.000.000-00",
57
57
  cnpj: "00.000.000/0000-00",
58
58
  telefone: "(00) 00000-0000",
59
59
  cep: "00000-000"
60
60
  };
61
- function De({
61
+ function Ee({
62
62
  name: t,
63
- label: l = "",
63
+ label: i = "",
64
64
  placeholder: a = "",
65
- type: f = "text",
65
+ type: u = "text",
66
66
  mask: c,
67
- className: o = "",
67
+ className: d = "",
68
68
  forceReadOnly: m = !1,
69
- forceHidden: d = !1,
70
- helpText: p,
71
- helpTitle: i,
72
- helpWidth: v,
73
- valueManual: x,
74
- onChangeManual: S,
69
+ forceHidden: o = !1,
70
+ helpText: v,
71
+ helpTitle: l,
72
+ helpWidth: y,
73
+ valueManual: $,
74
+ onChangeManual: R,
75
75
  errorManual: C
76
76
  }) {
77
- var E, L;
78
- const y = x !== void 0 && !!S, { isReadOnly: R, isHidden: D } = G(), _ = m || !!R(t), g = d || !!D(t), { isView: r } = Y();
77
+ var L, W;
78
+ const b = $ !== void 0 && !!R, { isReadOnly: S, isHidden: E } = G(), O = m || !!S(t), g = o || !!E(t), { isView: r } = z();
79
79
  let n = null;
80
80
  try {
81
- n = U();
81
+ n = J();
82
82
  } catch {
83
83
  }
84
- const s = !y && n ? W({ name: t, control: n.control }) : null, u = !y && n ? oe({ name: t }) : null, k = y ? x : s == null ? void 0 : s.field.value, I = y ? C : (L = (E = u == null ? void 0 : u.errors) == null ? void 0 : E[t]) == null ? void 0 : L.message, B = z(() => c ? Ee[c] ?? c : null, [c]), V = j((H) => {
84
+ const s = !b && n ? Q({ name: t, control: n.control }) : null, f = !b && n ? de({ name: t }) : null, N = b ? $ : s == null ? void 0 : s.field.value, I = b ? C : (W = (L = f == null ? void 0 : f.errors) == null ? void 0 : L[t]) == null ? void 0 : W.message, B = Y(() => c ? De[c] ?? c : null, [c]), V = P((H) => {
85
85
  if (!H) return "";
86
- const J = H.replace(/\D/g, "");
87
- return (Number(J) / 100).toLocaleString("pt-BR", {
86
+ const F = H.replace(/\D/g, "");
87
+ return (Number(F) / 100).toFixed(2);
88
+ }, []), _ = P((H) => {
89
+ if (H === "" || H === null || H === void 0) return "";
90
+ const F = Number(H);
91
+ return isNaN(F) ? "" : F.toLocaleString("pt-BR", {
88
92
  style: "currency",
89
93
  currency: "BRL"
90
94
  });
91
- }, []), O = j(
92
- (H) => f === "monetary" ? V(H) : H,
93
- [f, V]
94
- ), w = (H) => {
95
- const J = O(H);
96
- y ? S == null || S(J) : s == null || s.field.onChange(J);
97
- }, N = () => {
98
- y || s == null || s.field.onBlur();
99
- };
95
+ }, []), w = (H) => {
96
+ let F = H;
97
+ u === "monetary" && (F = V(H)), b ? R == null || R(F) : s == null || s.field.onChange(F);
98
+ }, k = () => {
99
+ b || s == null || s.field.onBlur();
100
+ }, A = Y(() => u === "monetary" ? _(N) : String(N ?? ""), [N, u, _]);
100
101
  if (g) return null;
101
- const A = `form-control ${_ ? "readOnly" : ""} ${I ? "border-red" : ""} ${o}`, b = () => B ? /* @__PURE__ */ e(
102
+ const h = `form-control ${O ? "readOnly" : ""} ${I ? "border-red" : ""} ${d}`, D = () => B ? /* @__PURE__ */ e(
102
103
  pe,
103
104
  {
104
- name: t,
105
105
  mask: B,
106
- value: String(k ?? ""),
107
- unmask: !1,
106
+ value: A,
107
+ unmask: !0,
108
108
  onAccept: (H) => w(H),
109
109
  placeholder: a,
110
- readOnly: _,
111
- className: A,
112
- inputRef: y || s == null ? void 0 : s.field.ref,
113
- onBlur: N
110
+ readOnly: O,
111
+ className: h,
112
+ inputRef: b || s == null ? void 0 : s.field.ref,
113
+ onBlur: k
114
114
  }
115
115
  ) : /* @__PURE__ */ e(
116
116
  "input",
117
117
  {
118
- type: f === "number" ? "number" : "text",
119
- name: t,
120
- value: k ?? "",
118
+ type: u === "number" ? "number" : "text",
119
+ value: A,
121
120
  onChange: (H) => w(H.target.value),
122
- onBlur: N,
121
+ onBlur: k,
123
122
  placeholder: a,
124
- readOnly: _,
125
- className: A
123
+ readOnly: O,
124
+ className: h
126
125
  }
127
126
  );
128
- return r ? /* @__PURE__ */ h("div", { className: "form-group", children: [
129
- l && /* @__PURE__ */ e("label", { children: l }),
130
- /* @__PURE__ */ h("div", { className: p ? "dfe-flex-input-wrapper" : "", children: [
131
- /* @__PURE__ */ e("span", { className: A, children: k || "-" }),
132
- p && /* @__PURE__ */ e(Z, { text: p, title: i, width: v })
127
+ return r ? /* @__PURE__ */ p("div", { className: "form-group", children: [
128
+ i && /* @__PURE__ */ e("label", { children: i }),
129
+ /* @__PURE__ */ p("div", { className: v ? "dfe-flex-input-wrapper" : "", children: [
130
+ /* @__PURE__ */ e("span", { className: h, children: A || "-" }),
131
+ v && /* @__PURE__ */ e(Z, { text: v, title: l, width: y })
133
132
  ] })
134
- ] }) : /* @__PURE__ */ h("div", { className: `form-group ${g ? "hidden" : ""}`, children: [
135
- l && /* @__PURE__ */ e("label", { children: l }),
136
- /* @__PURE__ */ h("div", { className: p ? "dfe-flex-input-wrapper" : "", children: [
137
- b(),
138
- p && /* @__PURE__ */ e(Z, { text: p, title: i, width: v })
133
+ ] }) : /* @__PURE__ */ p("div", { className: `form-group ${g ? "hidden" : ""}`, children: [
134
+ i && /* @__PURE__ */ e("label", { children: i }),
135
+ /* @__PURE__ */ p("div", { className: v ? "dfe-flex-input-wrapper" : "", children: [
136
+ D(),
137
+ v && /* @__PURE__ */ e(Z, { text: v, title: l, width: y })
139
138
  ] }),
139
+ !b && /* @__PURE__ */ e("input", { type: "hidden", name: t, value: N || "" }),
140
140
  I && /* @__PURE__ */ e("p", { className: "text-danger", children: String(I) })
141
141
  ] });
142
142
  }
143
- const ot = q(De);
143
+ const dt = q(Ee);
144
144
  function Be({
145
145
  name: t,
146
- label: l = "",
146
+ label: i = "",
147
147
  options: a = [],
148
- placeholder: f = "",
148
+ placeholder: u = "",
149
149
  labelKey: c = "label",
150
- valueKey: o = "value",
150
+ valueKey: d = "value",
151
151
  enableSearch: m = !1,
152
- searchPlaceholder: d = "Buscar...",
153
- loading: p = !1,
154
- onSearchChange: i,
155
- debounceTime: v = 300,
156
- onSelect: x,
157
- forceReadOnly: S = !1,
152
+ searchPlaceholder: o = "Buscar...",
153
+ loading: v = !1,
154
+ onSearchChange: l,
155
+ debounceTime: y = 300,
156
+ onSelect: $,
157
+ forceReadOnly: R = !1,
158
158
  forceHidden: C = !1,
159
- helpText: y,
160
- helpTitle: R,
161
- helpWidth: D,
162
- valueManual: _,
159
+ helpText: b,
160
+ helpTitle: S,
161
+ helpWidth: E,
162
+ valueManual: O,
163
163
  onChangeManual: g,
164
164
  errorManual: r
165
165
  }) {
166
166
  var se;
167
- const n = _ !== void 0 && !!g, { isReadOnly: s, isHidden: u } = G(), k = S || !!s(t), I = C || !!u(t), { isView: B } = Y();
168
- let V = "", O = () => {
169
- }, w, N = null, A = () => {
167
+ const n = O !== void 0 && !!g, { isReadOnly: s, isHidden: f } = G(), N = R || !!s(t), I = C || !!f(t), { isView: B } = z();
168
+ let V = "", _ = () => {
169
+ }, w, k = null, A = () => {
170
170
  };
171
171
  if (n)
172
- V = _;
172
+ V = O;
173
173
  else
174
174
  try {
175
- const $ = U(), F = W({ name: t, control: $.control });
176
- V = F.field.value, O = F.field.onChange, w = F.field.ref, N = (se = F.fieldState) == null ? void 0 : se.error, A = $.clearErrors;
175
+ const x = J(), T = Q({ name: t, control: x.control });
176
+ V = T.field.value, _ = T.field.onChange, w = T.field.ref, k = (se = T.fieldState) == null ? void 0 : se.error, A = x.clearErrors;
177
177
  } catch {
178
178
  }
179
- const [b, E] = P(!1), [L, H] = P(""), J = X(null), Q = X(i);
180
- T(() => {
181
- Q.current = i;
182
- }, [i]), T(() => {
183
- const $ = (F) => {
184
- J.current && !J.current.contains(F.target) && E(!1);
179
+ const [h, D] = U(!1), [L, W] = U(""), H = X(null), F = X(l);
180
+ j(() => {
181
+ F.current = l;
182
+ }, [l]), j(() => {
183
+ const x = (T) => {
184
+ H.current && !H.current.contains(T.target) && D(!1);
185
185
  };
186
- return document.addEventListener("mousedown", $), () => document.removeEventListener("mousedown", $);
187
- }, []), T(() => {
188
- b || H("");
189
- }, [b]), T(() => {
186
+ return document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
187
+ }, []), j(() => {
188
+ h || W("");
189
+ }, [h]), j(() => {
190
190
  if (!m) return;
191
- const $ = setTimeout(() => {
192
- var F;
193
- (F = Q.current) == null || F.call(Q, L);
194
- }, v);
195
- return () => clearTimeout($);
196
- }, [L, m, v]);
197
- const ee = z(() => m && !i && L.trim() ? a.filter(
198
- ($) => String(($ == null ? void 0 : $[c]) ?? "").toLowerCase().includes(L.toLowerCase())
199
- ) : a ?? [], [a, m, i, L, c]), te = z(() => {
191
+ const x = setTimeout(() => {
192
+ var T;
193
+ (T = F.current) == null || T.call(F, L);
194
+ }, y);
195
+ return () => clearTimeout(x);
196
+ }, [L, m, y]);
197
+ const K = Y(() => m && !l && L.trim() ? a.filter(
198
+ (x) => String((x == null ? void 0 : x[c]) ?? "").toLowerCase().includes(L.toLowerCase())
199
+ ) : a ?? [], [a, m, l, L, c]), te = Y(() => {
200
200
  if (V == null) return "";
201
201
  if (typeof V == "object")
202
- return String(V[o] ?? "");
203
- const $ = (a || []).find((F) => String(F == null ? void 0 : F[o]) === String(V));
204
- return String($ ? ($ == null ? void 0 : $[c]) ?? "" : V);
205
- }, [V, a, o, c]), he = ($) => {
206
- k || (n ? g == null || g($[o]) : (O($[o]), A == null || A(t)), x == null || x($), E(!1));
202
+ return String(V[d] ?? "");
203
+ const x = (a || []).find((T) => String(T == null ? void 0 : T[d]) === String(V));
204
+ return String(x ? (x == null ? void 0 : x[c]) ?? "" : V);
205
+ }, [V, a, d, c]), he = (x) => {
206
+ N || (n ? g == null || g(x[d]) : (_(x[d]), A == null || A(t)), $ == null || $(x), D(!1));
207
207
  };
208
- return I ? null : /* @__PURE__ */ h("div", { className: `select-wrapper form-group ${I ? "hidden" : ""}`, ref: J, children: [
209
- /* @__PURE__ */ e("label", { className: "control-label", children: l }),
210
- B ? /* @__PURE__ */ h("div", { className: y ? "dfe-flex-input-wrapper" : "", children: [
211
- /* @__PURE__ */ e("span", { className: "form-control", style: y ? { flex: 1 } : void 0, children: te || "-" }),
212
- y && /* @__PURE__ */ e(Z, { text: y, title: R, width: D })
213
- ] }) : /* @__PURE__ */ h(ce, { children: [
214
- /* @__PURE__ */ h("div", { className: y ? "dfe-flex-input-wrapper" : "", children: [
215
- /* @__PURE__ */ h(
208
+ return I ? null : /* @__PURE__ */ p("div", { className: `select-wrapper form-group ${I ? "hidden" : ""}`, ref: H, children: [
209
+ /* @__PURE__ */ e("label", { className: "control-label", children: i }),
210
+ B ? /* @__PURE__ */ p("div", { className: b ? "dfe-flex-input-wrapper" : "", children: [
211
+ /* @__PURE__ */ e("span", { className: "form-control", style: b ? { flex: 1 } : void 0, children: te || "-" }),
212
+ b && /* @__PURE__ */ e(Z, { text: b, title: S, width: E })
213
+ ] }) : /* @__PURE__ */ p(ce, { children: [
214
+ /* @__PURE__ */ p("div", { className: b ? "dfe-flex-input-wrapper" : "", children: [
215
+ /* @__PURE__ */ p(
216
216
  "div",
217
217
  {
218
- className: `select-control ${N ? "border-red" : ""} ${k ? "readOnly" : ""}`,
219
- onClick: () => !k && E(($) => !$),
218
+ className: `select-control ${k ? "border-red" : ""} ${N ? "readOnly" : ""}`,
219
+ onClick: () => !N && D((x) => !x),
220
220
  ref: w,
221
- style: y ? { flex: 1 } : void 0,
221
+ style: b ? { flex: 1 } : void 0,
222
222
  children: [
223
- /* @__PURE__ */ e("span", { className: `select-display ${k ? "readOnly" : ""}`, children: te || f }),
223
+ /* @__PURE__ */ e("span", { className: `select-display ${N ? "readOnly" : ""}`, children: te || u }),
224
224
  /* @__PURE__ */ e("i", { className: "flaticon flaticon-chevron-down select-icon" })
225
225
  ]
226
226
  }
227
227
  ),
228
- y && /* @__PURE__ */ e(Z, { text: y, title: R, width: D })
228
+ b && /* @__PURE__ */ e(Z, { text: b, title: S, width: E })
229
229
  ] }),
230
- b && !k && /* @__PURE__ */ h("div", { className: "select-dropdown", children: [
230
+ h && !N && /* @__PURE__ */ p("div", { className: "select-dropdown", children: [
231
231
  m && /* @__PURE__ */ e("div", { className: "select-search", children: /* @__PURE__ */ e(
232
232
  "input",
233
233
  {
234
234
  type: "text",
235
235
  className: "select-search-input",
236
236
  value: L,
237
- onChange: ($) => H($.target.value),
238
- placeholder: p ? "Carregando..." : d,
237
+ onChange: (x) => W(x.target.value),
238
+ placeholder: v ? "Carregando..." : o,
239
239
  autoFocus: !0,
240
- onClick: ($) => $.stopPropagation()
240
+ onClick: (x) => x.stopPropagation()
241
241
  }
242
242
  ) }),
243
- /* @__PURE__ */ e("ul", { className: "select-options", children: p ? /* @__PURE__ */ e("li", { className: "select-option readOnly", children: "Carregando..." }) : ee.length > 0 ? ee.map(($) => /* @__PURE__ */ e("li", { onClick: () => he($), className: "select-option handleHover", children: $[c] }, $[o])) : /* @__PURE__ */ e("li", { className: "select-option readOnly", children: "Sem resultados" }) })
243
+ /* @__PURE__ */ e("ul", { className: "select-options", children: v ? /* @__PURE__ */ e("li", { className: "select-option readOnly", children: "Carregando..." }) : K.length > 0 ? K.map((x) => /* @__PURE__ */ e("li", { onClick: () => he(x), className: "select-option handleHover", children: x[c] }, x[d])) : /* @__PURE__ */ e("li", { className: "select-option readOnly", children: "Sem resultados" }) })
244
244
  ] })
245
245
  ] }),
246
246
  !n && /* @__PURE__ */ e("input", { type: "hidden", name: t, value: V || "" }),
247
- (N || r) && /* @__PURE__ */ e("p", { className: "text-danger", children: String((N == null ? void 0 : N.message) ?? r) })
247
+ (k || r) && /* @__PURE__ */ e("p", { className: "text-danger", children: String((k == null ? void 0 : k.message) ?? r) })
248
248
  ] });
249
249
  }
250
250
  const re = q(Be);
251
251
  function at({
252
252
  name: t,
253
- options: l = [],
253
+ options: i = [],
254
254
  label: a = "",
255
- valueKey: f = "value",
255
+ valueKey: u = "value",
256
256
  labelKey: c = "label",
257
- forceReadOnly: o = !1,
257
+ forceReadOnly: d = !1,
258
258
  forceHidden: m = !1,
259
- valueManual: d,
260
- onChangeManual: p
259
+ valueManual: o,
260
+ onChangeManual: v
261
261
  }) {
262
262
  var B, V;
263
- let i = null;
263
+ let l = null;
264
264
  try {
265
- i = U();
265
+ l = J();
266
266
  } catch {
267
267
  }
268
- const v = d !== void 0 && !!p, { isView: x, isReadOnly: S } = Y(), { isReadOnly: C, isHidden: y } = G(), R = C ? C(t) : !1, D = y ? y(t) : !1, _ = o || R, g = m || D, r = _ || S || x, n = () => l ? l.reduce(
269
- (O, w) => {
270
- const N = String(w[f]);
271
- if (v)
272
- O[N] = !!(d != null && d[N]);
273
- else if (i) {
274
- const A = i.getValues(N);
275
- O[N] = A === "on";
268
+ const y = o !== void 0 && !!v, { isView: $, isReadOnly: R } = z(), { isReadOnly: C, isHidden: b } = G(), S = C ? C(t) : !1, E = b ? b(t) : !1, O = d || S, g = m || E, r = O || R || $, n = () => i ? i.reduce(
269
+ (_, w) => {
270
+ const k = String(w[u]);
271
+ if (y)
272
+ _[k] = !!(o != null && o[k]);
273
+ else if (l) {
274
+ const A = l.getValues(k);
275
+ _[k] = A === "on";
276
276
  } else
277
- O[N] = !1;
278
- return O;
277
+ _[k] = !1;
278
+ return _;
279
279
  },
280
280
  {}
281
- ) : {}, s = !v && i ? i.watch(t) : void 0, u = z(() => v && d ? d : s && typeof s == "object" ? s : n(), [s, d, l]);
282
- T(() => {
283
- if (v || !i) return;
284
- const O = i.getValues(t);
285
- (!O || typeof O != "object") && i.setValue(t, u, {
281
+ ) : {}, s = !y && l ? l.watch(t) : void 0, f = Y(() => y && o ? o : s && typeof s == "object" ? s : n(), [s, o, i]);
282
+ j(() => {
283
+ if (y || !l) return;
284
+ const _ = l.getValues(t);
285
+ (!_ || typeof _ != "object") && l.setValue(t, f, {
286
286
  shouldDirty: !1,
287
287
  shouldValidate: !1
288
288
  });
289
- }, [u, t, i, v]);
290
- const k = (O, w) => {
289
+ }, [f, t, l, y]);
290
+ const N = (_, w) => {
291
291
  if (r) return;
292
- const N = { ...u, [O]: w };
293
- if (v) {
294
- p && p(N);
292
+ const k = { ...f, [_]: w };
293
+ if (y) {
294
+ v && v(k);
295
295
  return;
296
296
  }
297
- i && (i.setValue(t, N, {
297
+ l && (l.setValue(t, k, {
298
298
  shouldDirty: !0,
299
299
  shouldValidate: !0
300
- }), i.setValue(O, w ? "on" : "", { shouldValidate: !1 }));
301
- }, I = v ? null : (V = (B = i == null ? void 0 : i.formState) == null ? void 0 : B.errors) == null ? void 0 : V[t];
302
- return /* @__PURE__ */ h("div", { className: `form-group ${g ? "hidden" : ""}`, children: [
300
+ }), l.setValue(_, w ? "on" : "", { shouldValidate: !1 }));
301
+ }, I = y ? null : (V = (B = l == null ? void 0 : l.formState) == null ? void 0 : B.errors) == null ? void 0 : V[t];
302
+ return /* @__PURE__ */ p("div", { className: `form-group ${g ? "hidden" : ""}`, children: [
303
303
  a && /* @__PURE__ */ e("label", { children: a }),
304
304
  /* @__PURE__ */ e(
305
305
  "div",
306
306
  {
307
307
  className: `checkbox-group-custom ${r ? "readOnly" : ""}`,
308
- children: l.map((O) => {
309
- const w = String(O[f]), N = u[w] === !0;
310
- return /* @__PURE__ */ h("div", { children: [
311
- !v && i && /* @__PURE__ */ e("input", { type: "hidden", ...i.register(w) }),
312
- /* @__PURE__ */ h(
308
+ children: i.map((_) => {
309
+ const w = String(_[u]), k = f[w] === !0;
310
+ return /* @__PURE__ */ p("div", { children: [
311
+ !y && l && /* @__PURE__ */ e("input", { type: "hidden", ...l.register(w) }),
312
+ /* @__PURE__ */ p(
313
313
  "label",
314
314
  {
315
- className: `custom-checkbox ${N ? "checked" : ""} ${r ? "readOnly" : ""}`,
315
+ className: `custom-checkbox ${k ? "checked" : ""} ${r ? "readOnly" : ""}`,
316
316
  children: [
317
317
  /* @__PURE__ */ e(
318
318
  "input",
319
319
  {
320
320
  type: "checkbox",
321
- checked: N,
321
+ checked: k,
322
322
  disabled: r,
323
- onChange: (A) => k(w, A.target.checked)
323
+ onChange: (A) => N(w, A.target.checked)
324
324
  }
325
325
  ),
326
326
  /* @__PURE__ */ e("span", { className: "checkmark" }),
327
- /* @__PURE__ */ e("span", { children: O[c] })
327
+ /* @__PURE__ */ e("span", { children: _[c] })
328
328
  ]
329
329
  }
330
330
  )
@@ -337,116 +337,116 @@ function at({
337
337
  }
338
338
  function Ce({
339
339
  name: t,
340
- label: l = "",
340
+ label: i = "",
341
341
  options: a = [],
342
- valueKey: f = "value",
342
+ valueKey: u = "value",
343
343
  labelKey: c = "label",
344
- iconKey: o = "icon",
344
+ iconKey: d = "icon",
345
345
  forceReadOnly: m = !1,
346
- forceHidden: d = !1,
347
- valueManual: p,
348
- onChangeManual: i,
349
- errorManual: v
346
+ forceHidden: o = !1,
347
+ valueManual: v,
348
+ onChangeManual: l,
349
+ errorManual: y
350
350
  }) {
351
351
  var B, V;
352
- const x = p !== void 0 && !!i, { isReadOnly: S, isHidden: C } = G(), y = m || !!S(t), R = d || !!C(t), { isView: D, isReadOnly: _ } = Y();
352
+ const $ = v !== void 0 && !!l, { isReadOnly: R, isHidden: C } = G(), b = m || !!R(t), S = o || !!C(t), { isView: E, isReadOnly: O } = z();
353
353
  let g = null;
354
354
  try {
355
- g = U();
355
+ g = J();
356
356
  } catch {
357
357
  }
358
- const r = !x && g ? W({ name: t, control: g.control, defaultValue: "" }) : null, n = !x && g ? oe({ name: t }) : null, s = x ? v : (V = (B = n == null ? void 0 : n.errors) == null ? void 0 : B[t]) == null ? void 0 : V.message, u = y || _ || D, k = x ? p : (r == null ? void 0 : r.field.value) ?? "", I = j(
359
- (O) => {
360
- u || (x ? i == null || i(O) : (r == null || r.field.onChange(O), r == null || r.field.onBlur()));
358
+ const r = !$ && g ? Q({ name: t, control: g.control, defaultValue: "" }) : null, n = !$ && g ? de({ name: t }) : null, s = $ ? y : (V = (B = n == null ? void 0 : n.errors) == null ? void 0 : B[t]) == null ? void 0 : V.message, f = b || O || E, N = $ ? v : (r == null ? void 0 : r.field.value) ?? "", I = P(
359
+ (_) => {
360
+ f || ($ ? l == null || l(_) : (r == null || r.field.onChange(_), r == null || r.field.onBlur()));
361
361
  },
362
- [u, x, i, r]
362
+ [f, $, l, r]
363
363
  );
364
- return /* @__PURE__ */ h("div", { className: `form-group column ${R ? "hidden" : ""}`, children: [
365
- l && /* @__PURE__ */ e("label", { className: "control-label", children: l }),
366
- /* @__PURE__ */ e("div", { className: `btn-group ${u ? "view-mode" : ""}`, "data-field-name": t, children: a.map((O) => {
367
- const w = O[f], N = k === w, A = O.color ? { "--customColor": O.color } : void 0;
364
+ return /* @__PURE__ */ p("div", { className: `form-group column ${S ? "hidden" : ""}`, children: [
365
+ i && /* @__PURE__ */ e("label", { className: "control-label", children: i }),
366
+ /* @__PURE__ */ e("div", { className: `btn-group ${f ? "view-mode" : ""}`, "data-field-name": t, children: a.map((_) => {
367
+ const w = _[u], k = N === w, A = _.color ? { "--customColor": _.color } : void 0;
368
368
  return (
369
369
  // Trocado de <label> para <div> para evitar comportamentos nativos de clique do HTML
370
- /* @__PURE__ */ h(
370
+ /* @__PURE__ */ p(
371
371
  "div",
372
372
  {
373
373
  style: A,
374
- className: `btn fs-ellipsis ${N ? "active" : ""}`,
374
+ className: `btn fs-ellipsis ${k ? "active" : ""}`,
375
375
  onClick: () => I(w),
376
376
  children: [
377
- O[o] && /* @__PURE__ */ e("i", { className: `${O[o]} icon-sm` }),
377
+ _[d] && /* @__PURE__ */ e("i", { className: `${_[d]} icon-sm` }),
378
378
  " ",
379
- O[c]
379
+ _[c]
380
380
  ]
381
381
  },
382
382
  w
383
383
  )
384
384
  );
385
385
  }) }),
386
- !x && /* @__PURE__ */ e("input", { type: "hidden", name: t, value: k || "", ref: r == null ? void 0 : r.field.ref }),
387
- (s || v) && /* @__PURE__ */ e("p", { className: "text-danger", children: String(s ?? v) })
386
+ !$ && /* @__PURE__ */ e("input", { type: "hidden", name: t, value: N || "", ref: r == null ? void 0 : r.field.ref }),
387
+ (s || y) && /* @__PURE__ */ e("p", { className: "text-danger", children: String(s ?? y) })
388
388
  ] });
389
389
  }
390
390
  const ut = q(Ce), He = ({
391
391
  name: t,
392
- label: l = "",
392
+ label: i = "",
393
393
  placeholder: a = "",
394
- className: f = "",
394
+ className: u = "",
395
395
  rows: c = 4,
396
- maxLength: o,
396
+ maxLength: d,
397
397
  forceReadOnly: m = !1,
398
- forceHidden: d = !1,
399
- valueManual: p,
400
- onChangeManual: i,
401
- errorManual: v
398
+ forceHidden: o = !1,
399
+ valueManual: v,
400
+ onChangeManual: l,
401
+ errorManual: y
402
402
  }) => {
403
- var u;
404
- const x = p !== void 0 && !!i, { isReadOnly: S, isHidden: C } = G(), y = m || !!S(t), R = d || !!C(t), { isView: D } = Y(), _ = X(null);
403
+ var f;
404
+ const $ = v !== void 0 && !!l, { isReadOnly: R, isHidden: C } = G(), b = m || !!R(t), S = o || !!C(t), { isView: E } = z(), O = X(null);
405
405
  let g = {
406
- value: p ?? "",
407
- onChange: (k) => i == null ? void 0 : i(k)
406
+ value: v ?? "",
407
+ onChange: (N) => l == null ? void 0 : l(N)
408
408
  }, r = null;
409
- if (!x)
409
+ if (!$)
410
410
  try {
411
- const { control: k } = U(), I = W({ name: t, control: k });
412
- g = I.field, r = (u = I.fieldState) == null ? void 0 : u.error;
411
+ const { control: N } = J(), I = Q({ name: t, control: N });
412
+ g = I.field, r = (f = I.fieldState) == null ? void 0 : f.error;
413
413
  } catch {
414
414
  }
415
415
  const n = () => {
416
- _.current && (_.current.style.height = "auto", _.current.style.height = `${_.current.scrollHeight}px`);
416
+ O.current && (O.current.style.height = "auto", O.current.style.height = `${O.current.scrollHeight}px`);
417
417
  };
418
- if (T(() => {
418
+ if (j(() => {
419
419
  n();
420
- }, [g.value]), D)
421
- return /* @__PURE__ */ h("div", { className: `form-group ${R ? "hidden" : ""}`, children: [
422
- /* @__PURE__ */ e("label", { children: l }),
420
+ }, [g.value]), E)
421
+ return /* @__PURE__ */ p("div", { className: `form-group ${S ? "hidden" : ""}`, children: [
422
+ /* @__PURE__ */ e("label", { children: i }),
423
423
  /* @__PURE__ */ e("span", { className: "form-control", children: g.value || "-" })
424
424
  ] });
425
- const s = `form-control ${y ? "readOnly" : ""} ${r || v ? "border-red" : ""} ${f}`;
426
- return /* @__PURE__ */ h("div", { className: `form-group ${R ? "hidden" : ""}`, children: [
427
- l && /* @__PURE__ */ e("label", { children: l }),
425
+ const s = `form-control ${b ? "readOnly" : ""} ${r || y ? "border-red" : ""} ${u}`;
426
+ return /* @__PURE__ */ p("div", { className: `form-group ${S ? "hidden" : ""}`, children: [
427
+ i && /* @__PURE__ */ e("label", { children: i }),
428
428
  /* @__PURE__ */ e(
429
429
  "textarea",
430
430
  {
431
- ref: _,
431
+ ref: O,
432
432
  rows: c,
433
- maxLength: o,
433
+ maxLength: d,
434
434
  value: g.value || "",
435
435
  placeholder: a,
436
- readOnly: y,
436
+ readOnly: b,
437
437
  className: s,
438
438
  style: {
439
439
  resize: "none",
440
440
  maxHeight: "400px",
441
441
  overflowY: "auto"
442
442
  },
443
- onChange: (k) => {
444
- x ? i == null || i(k.target.value) : g.onChange(k);
443
+ onChange: (N) => {
444
+ $ ? l == null || l(N.target.value) : g.onChange(N);
445
445
  },
446
446
  onInput: n
447
447
  }
448
448
  ),
449
- (r || v) && /* @__PURE__ */ e("p", { className: "text-danger", children: String((r == null ? void 0 : r.message) ?? v) })
449
+ (r || y) && /* @__PURE__ */ e("p", { className: "text-danger", children: String((r == null ? void 0 : r.message) ?? y) })
450
450
  ] });
451
451
  }, ft = q(He);
452
452
  /**
@@ -455,7 +455,7 @@ const ut = q(Ce), He = ({
455
455
  * This source code is licensed under the ISC license.
456
456
  * See the LICENSE file in the root directory of this source tree.
457
457
  */
458
- const fe = (...t) => t.filter((l, a, f) => !!l && l.trim() !== "" && f.indexOf(l) === a).join(" ").trim();
458
+ const fe = (...t) => t.filter((i, a, u) => !!i && i.trim() !== "" && u.indexOf(i) === a).join(" ").trim();
459
459
  /**
460
460
  * @license lucide-react v0.575.0 - ISC
461
461
  *
@@ -471,7 +471,7 @@ const Le = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
471
471
  */
472
472
  const Fe = (t) => t.replace(
473
473
  /^([A-Z])|[\s-_]+(\w)/g,
474
- (l, a, f) => f ? f.toUpperCase() : a.toLowerCase()
474
+ (i, a, u) => u ? u.toUpperCase() : a.toLowerCase()
475
475
  );
476
476
  /**
477
477
  * @license lucide-react v0.575.0 - ISC
@@ -480,8 +480,8 @@ const Fe = (t) => t.replace(
480
480
  * See the LICENSE file in the root directory of this source tree.
481
481
  */
482
482
  const ne = (t) => {
483
- const l = Fe(t);
484
- return l.charAt(0).toUpperCase() + l.slice(1);
483
+ const i = Fe(t);
484
+ return i.charAt(0).toUpperCase() + i.slice(1);
485
485
  };
486
486
  /**
487
487
  * @license lucide-react v0.575.0 - ISC
@@ -507,8 +507,8 @@ var Te = {
507
507
  * See the LICENSE file in the root directory of this source tree.
508
508
  */
509
509
  const je = (t) => {
510
- for (const l in t)
511
- if (l.startsWith("aria-") || l === "role" || l === "title")
510
+ for (const i in t)
511
+ if (i.startsWith("aria-") || i === "role" || i === "title")
512
512
  return !0;
513
513
  return !1;
514
514
  };
@@ -518,32 +518,32 @@ const je = (t) => {
518
518
  * This source code is licensed under the ISC license.
519
519
  * See the LICENSE file in the root directory of this source tree.
520
520
  */
521
- const Pe = de(
521
+ const Pe = oe(
522
522
  ({
523
523
  color: t = "currentColor",
524
- size: l = 24,
524
+ size: i = 24,
525
525
  strokeWidth: a = 2,
526
- absoluteStrokeWidth: f,
526
+ absoluteStrokeWidth: u,
527
527
  className: c = "",
528
- children: o,
528
+ children: d,
529
529
  iconNode: m,
530
- ...d
531
- }, p) => K(
530
+ ...o
531
+ }, v) => M(
532
532
  "svg",
533
533
  {
534
- ref: p,
534
+ ref: v,
535
535
  ...Te,
536
- width: l,
537
- height: l,
536
+ width: i,
537
+ height: i,
538
538
  stroke: t,
539
- strokeWidth: f ? Number(a) * 24 / Number(l) : a,
539
+ strokeWidth: u ? Number(a) * 24 / Number(i) : a,
540
540
  className: fe("lucide", c),
541
- ...!o && !je(d) && { "aria-hidden": "true" },
542
- ...d
541
+ ...!d && !je(o) && { "aria-hidden": "true" },
542
+ ...o
543
543
  },
544
544
  [
545
- ...m.map(([i, v]) => K(i, v)),
546
- ...Array.isArray(o) ? o : [o]
545
+ ...m.map(([l, y]) => M(l, y)),
546
+ ...Array.isArray(d) ? d : [d]
547
547
  ]
548
548
  )
549
549
  );
@@ -553,15 +553,15 @@ const Pe = de(
553
553
  * This source code is licensed under the ISC license.
554
554
  * See the LICENSE file in the root directory of this source tree.
555
555
  */
556
- const M = (t, l) => {
557
- const a = de(
558
- ({ className: f, ...c }, o) => K(Pe, {
559
- ref: o,
560
- iconNode: l,
556
+ const ee = (t, i) => {
557
+ const a = oe(
558
+ ({ className: u, ...c }, d) => M(Pe, {
559
+ ref: d,
560
+ iconNode: i,
561
561
  className: fe(
562
562
  `lucide-${Le(ne(t))}`,
563
563
  `lucide-${t}`,
564
- f
564
+ u
565
565
  ),
566
566
  ...c
567
567
  })
@@ -579,24 +579,24 @@ const Ue = [
579
579
  ["path", { d: "M16 2v4", key: "4m81vk" }],
580
580
  ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
581
581
  ["path", { d: "M3 10h18", key: "8toen8" }]
582
- ], Ye = M("calendar", Ue);
582
+ ], Ye = ee("calendar", Ue);
583
583
  /**
584
584
  * @license lucide-react v0.575.0 - ISC
585
585
  *
586
586
  * This source code is licensed under the ISC license.
587
587
  * See the LICENSE file in the root directory of this source tree.
588
588
  */
589
- const Je = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], ze = M("chevron-left", Je);
589
+ const Je = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], ze = ee("chevron-left", Je);
590
590
  /**
591
591
  * @license lucide-react v0.575.0 - ISC
592
592
  *
593
593
  * This source code is licensed under the ISC license.
594
594
  * See the LICENSE file in the root directory of this source tree.
595
595
  */
596
- const qe = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], Ge = M("chevron-right", qe), me = "dd/MM/yyyy", le = (t) => {
596
+ const qe = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], Ge = ee("chevron-right", qe), me = "dd/MM/yyyy", ie = (t) => {
597
597
  if (!t) return null;
598
- const l = Ae(t, me, /* @__PURE__ */ new Date());
599
- return ae(l) ? l : null;
598
+ const i = Ae(t, me, /* @__PURE__ */ new Date());
599
+ return ae(i) ? i : null;
600
600
  }, We = (t) => t ? ue(t, me) : "", Qe = [
601
601
  { value: 0, label: "Janeiro" },
602
602
  { value: 1, label: "Fevereiro" },
@@ -610,89 +610,89 @@ const qe = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], Ge = M("chevron-ri
610
610
  { value: 9, label: "Outubro" },
611
611
  { value: 10, label: "Novembro" },
612
612
  { value: 11, label: "Dezembro" }
613
- ], ie = 1940, Ze = 2100, Xe = Array.from({ length: Ze - ie + 1 }, (t, l) => {
614
- const a = ie + l;
613
+ ], le = 1940, Ze = 2100, Xe = Array.from({ length: Ze - le + 1 }, (t, i) => {
614
+ const a = le + i;
615
615
  return { value: a, label: String(a) };
616
616
  });
617
617
  function Ke({
618
618
  name: t,
619
- label: l = "",
619
+ label: i = "",
620
620
  placeholder: a = "dd/mm/aaaa",
621
- className: f = "",
621
+ className: u = "",
622
622
  forceReadOnly: c = !1,
623
- forceHidden: o = !1,
623
+ forceHidden: d = !1,
624
624
  valueManual: m,
625
- onChangeManual: d,
626
- errorManual: p
625
+ onChangeManual: o,
626
+ errorManual: v
627
627
  }) {
628
628
  var A;
629
- const i = m !== void 0 && !!d, { isReadOnly: v, isHidden: x } = G(), S = c || !!v(t), C = o || !!x(t), { isView: y } = Y();
630
- let R = "", D = () => {
631
- }, _, g = null, r = () => {
629
+ const l = m !== void 0 && !!o, { isReadOnly: y, isHidden: $ } = G(), R = c || !!y(t), C = d || !!$(t), { isView: b } = z();
630
+ let S = "", E = () => {
631
+ }, O, g = null, r = () => {
632
632
  };
633
- if (i)
634
- R = m;
633
+ if (l)
634
+ S = m;
635
635
  else
636
636
  try {
637
- const b = U(), E = W({ name: t, control: b.control });
638
- R = E.field.value, D = E.field.onChange, _ = E.field.ref, g = (A = E.fieldState) == null ? void 0 : A.error, r = b.clearErrors;
637
+ const h = J(), D = Q({ name: t, control: h.control });
638
+ S = D.field.value, E = D.field.onChange, O = D.field.ref, g = (A = D.fieldState) == null ? void 0 : A.error, r = h.clearErrors;
639
639
  } catch {
640
640
  }
641
- const [n, s] = P(!1), [u, k] = P(/* @__PURE__ */ new Date()), I = X(null);
642
- T(() => {
641
+ const [n, s] = U(!1), [f, N] = U(/* @__PURE__ */ new Date()), I = X(null);
642
+ j(() => {
643
643
  if (n) {
644
- const b = le(R);
645
- k(b && ae(b) ? b : /* @__PURE__ */ new Date());
644
+ const h = ie(S);
645
+ N(h && ae(h) ? h : /* @__PURE__ */ new Date());
646
646
  }
647
- }, [n, R]), T(() => {
648
- const b = (E) => {
649
- I.current && !I.current.contains(E.target) && s(!1);
647
+ }, [n, S]), j(() => {
648
+ const h = (D) => {
649
+ I.current && !I.current.contains(D.target) && s(!1);
650
650
  };
651
- return document.addEventListener("mousedown", b), () => document.removeEventListener("mousedown", b);
651
+ return document.addEventListener("mousedown", h), () => document.removeEventListener("mousedown", h);
652
652
  }, []);
653
- const B = z(() => le(R), [R]), V = (b) => {
654
- if (S) return;
655
- const E = We(b);
656
- i ? d == null || d(E) : (D(E), r == null || r(t)), s(!1);
657
- }, O = z(() => ve({
658
- start: ge(Ne(u)),
659
- end: ye(be(u))
660
- }), [u]), w = u.getMonth(), N = ke(u);
661
- return /* @__PURE__ */ h("div", { className: `dfe-datepicker-wrapper form-group ${C ? "hidden" : ""} ${f}`, ref: I, children: [
662
- /* @__PURE__ */ e("label", { className: "control-label", children: l }),
663
- y ? /* @__PURE__ */ e("span", { className: "form-control", children: R || "-" }) : (
653
+ const B = Y(() => ie(S), [S]), V = (h) => {
654
+ if (R) return;
655
+ const D = We(h);
656
+ l ? o == null || o(D) : (E(D), r == null || r(t)), s(!1);
657
+ }, _ = Y(() => ve({
658
+ start: ge(Ne(f)),
659
+ end: ye(be(f))
660
+ }), [f]), w = f.getMonth(), k = ke(f);
661
+ return /* @__PURE__ */ p("div", { className: `dfe-datepicker-wrapper form-group ${C ? "hidden" : ""} ${u}`, ref: I, children: [
662
+ /* @__PURE__ */ e("label", { className: "control-label", children: i }),
663
+ b ? /* @__PURE__ */ e("span", { className: "form-control", children: S || "-" }) : (
664
664
  /* Container isolador de contexto posicional */
665
- /* @__PURE__ */ h("div", { className: "dfe-datepicker-inner-container", children: [
666
- /* @__PURE__ */ h(
665
+ /* @__PURE__ */ p("div", { className: "dfe-datepicker-inner-container", children: [
666
+ /* @__PURE__ */ p(
667
667
  "div",
668
668
  {
669
- className: `dfe-datepicker-control ${g ? "border-red" : ""} ${S ? "readOnly" : ""}`,
670
- onClick: () => !S && s((b) => !b),
671
- ref: _,
669
+ className: `dfe-datepicker-control ${g ? "border-red" : ""} ${R ? "readOnly" : ""}`,
670
+ onClick: () => !R && s((h) => !h),
671
+ ref: O,
672
672
  children: [
673
- /* @__PURE__ */ e("span", { className: `dfe-datepicker-display ${S ? "readOnly" : ""}`, children: R || a }),
673
+ /* @__PURE__ */ e("span", { className: `dfe-datepicker-display ${R ? "readOnly" : ""}`, children: S || a }),
674
674
  /* @__PURE__ */ e(Ye, { size: 16, className: "dfe-datepicker-icon" })
675
675
  ]
676
676
  }
677
677
  ),
678
- n && !S && /* @__PURE__ */ h("div", { className: "dfe-datepicker-dropdown", onClick: (b) => b.stopPropagation(), children: [
679
- /* @__PURE__ */ h("div", { className: "dfe-datepicker-header", children: [
678
+ n && !R && /* @__PURE__ */ p("div", { className: "dfe-datepicker-dropdown", onClick: (h) => h.stopPropagation(), children: [
679
+ /* @__PURE__ */ p("div", { className: "dfe-datepicker-header", children: [
680
680
  /* @__PURE__ */ e(
681
681
  "button",
682
682
  {
683
683
  type: "button",
684
- onClick: () => k(we(u, 1)),
684
+ onClick: () => N(we(f, 1)),
685
685
  className: "dfe-datepicker-nav-btn",
686
686
  children: /* @__PURE__ */ e(ze, { size: 16 })
687
687
  }
688
688
  ),
689
- /* @__PURE__ */ h("div", { className: "dfe-datepicker-selectors", children: [
689
+ /* @__PURE__ */ p("div", { className: "dfe-datepicker-selectors", children: [
690
690
  /* @__PURE__ */ e(
691
691
  re,
692
692
  {
693
693
  name: "datepicker_internal_month",
694
694
  valueManual: w,
695
- onChangeManual: (b) => k(_e(u, Number(b))),
695
+ onChangeManual: (h) => N(_e(f, Number(h))),
696
696
  options: Qe,
697
697
  placeholder: "Mês"
698
698
  }
@@ -701,8 +701,8 @@ function Ke({
701
701
  re,
702
702
  {
703
703
  name: "datepicker_internal_year",
704
- valueManual: N,
705
- onChangeManual: (b) => k(Oe(u, Number(b))),
704
+ valueManual: k,
705
+ onChangeManual: (h) => N(Oe(f, Number(h))),
706
706
  options: Xe,
707
707
  enableSearch: !0,
708
708
  searchPlaceholder: "Buscar ano...",
@@ -714,55 +714,55 @@ function Ke({
714
714
  "button",
715
715
  {
716
716
  type: "button",
717
- onClick: () => k(Se(u, 1)),
717
+ onClick: () => N(Re(f, 1)),
718
718
  className: "dfe-datepicker-nav-btn",
719
719
  children: /* @__PURE__ */ e(Ge, { size: 16 })
720
720
  }
721
721
  )
722
722
  ] }),
723
- /* @__PURE__ */ e("div", { className: "dfe-datepicker-grid-header", children: ["D", "S", "T", "Q", "Q", "S", "S"].map((b, E) => /* @__PURE__ */ e("span", { children: b }, E)) }),
724
- /* @__PURE__ */ e("div", { className: "dfe-datepicker-grid", children: O.map((b, E) => {
725
- const L = !Re(b, u), H = B && $e(b, B);
723
+ /* @__PURE__ */ e("div", { className: "dfe-datepicker-grid-header", children: ["D", "S", "T", "Q", "Q", "S", "S"].map((h, D) => /* @__PURE__ */ e("span", { children: h }, D)) }),
724
+ /* @__PURE__ */ e("div", { className: "dfe-datepicker-grid", children: _.map((h, D) => {
725
+ const L = !Se(h, f), W = B && xe(h, B);
726
726
  return /* @__PURE__ */ e(
727
727
  "div",
728
728
  {
729
- onClick: () => !L && V(b),
729
+ onClick: () => !L && V(h),
730
730
  className: `dfe-datepicker-day
731
- ${H ? "selected" : "handleHover"}
731
+ ${W ? "selected" : "handleHover"}
732
732
  ${L ? "outside" : ""}
733
- ${xe(b) ? "today" : ""}`,
734
- children: ue(b, "d")
733
+ ${$e(h) ? "today" : ""}`,
734
+ children: ue(h, "d")
735
735
  },
736
- E
736
+ D
737
737
  );
738
738
  }) })
739
739
  ] })
740
740
  ] })
741
741
  ),
742
- !i && /* @__PURE__ */ e("input", { type: "hidden", name: t, value: R || "" }),
743
- (g || p) && /* @__PURE__ */ e("p", { className: "text-danger", children: String((g == null ? void 0 : g.message) ?? p) })
742
+ !l && /* @__PURE__ */ e("input", { type: "hidden", name: t, value: S || "" }),
743
+ (g || v) && /* @__PURE__ */ e("p", { className: "text-danger", children: String((g == null ? void 0 : g.message) ?? v) })
744
744
  ] });
745
745
  }
746
746
  const mt = q(Ke);
747
747
  function Me({
748
748
  mapping: t = {},
749
- defaultLabel: l = "Não reconhecido",
749
+ defaultLabel: i = "Não reconhecido",
750
750
  className: a = "",
751
- hidden: f = !1,
751
+ hidden: u = !1,
752
752
  label: c
753
753
  }) {
754
- const { activityId: o } = Y(), m = z(() => !t || o === null || o === void 0 ? null : t[o], [o, t]);
754
+ const { activityId: d } = z(), m = Y(() => !t || d === null || d === void 0 ? null : t[d], [d, t]);
755
755
  if (!m)
756
- return /* @__PURE__ */ h("div", { className: `form-group ${f ? "hidden" : ""}`, children: [
756
+ return /* @__PURE__ */ p("div", { className: `form-group ${u ? "hidden" : ""}`, children: [
757
757
  c && /* @__PURE__ */ e("label", { children: c }),
758
- /* @__PURE__ */ e("div", { className: `status-badge default ${a}`, children: l })
758
+ /* @__PURE__ */ e("div", { className: `status-badge default ${a}`, children: i })
759
759
  ] });
760
- const d = {
760
+ const o = {
761
761
  "--customColor": m.color
762
762
  };
763
- return /* @__PURE__ */ h("div", { className: `form-group ${f ? "hidden" : ""}`, children: [
763
+ return /* @__PURE__ */ p("div", { className: `form-group ${u ? "hidden" : ""}`, children: [
764
764
  c && /* @__PURE__ */ e("label", { children: c }),
765
- /* @__PURE__ */ h("div", { className: `status-badge ${a}`, style: d, children: [
765
+ /* @__PURE__ */ p("div", { className: `status-badge ${a}`, style: o, children: [
766
766
  m.icon && /* @__PURE__ */ e("i", { className: m.icon }),
767
767
  /* @__PURE__ */ e("span", { children: m.label })
768
768
  ] })
@@ -771,135 +771,135 @@ function Me({
771
771
  const ht = q(Me);
772
772
  function et({
773
773
  name: t,
774
- control: l,
774
+ control: i,
775
775
  defaultRowValue: a,
776
- isView: f,
776
+ isView: u,
777
777
  isReadOnly: c,
778
- filters: o = []
778
+ filters: d = []
779
779
  }) {
780
- const { field: m } = W({ name: t, control: l }), [d, p] = P([]), [i, v] = P([]), x = () => Date.now() + Math.random(), S = (n) => {
780
+ const { field: m } = Q({ name: t, control: i }), [o, v] = U([]), [l, y] = U([]), $ = () => Date.now() + Math.random(), R = (n) => {
781
781
  try {
782
782
  const s = JSON.parse(n);
783
- return Array.isArray(s) ? s.map((u) => ({
784
- ...u,
785
- _uid: u._uid || x()
783
+ return Array.isArray(s) ? s.map((f) => ({
784
+ ...f,
785
+ _uid: f._uid || $()
786
786
  })) : [];
787
787
  } catch (s) {
788
788
  return console.error(`Erro ao ler dados da tabela "${t}":`, s), [];
789
789
  }
790
790
  };
791
- T(() => {
792
- if (!(d.length > 0 && !f) && m.value && typeof m.value == "string") {
793
- const n = JSON.stringify(d);
791
+ j(() => {
792
+ if (!(o.length > 0 && !u) && m.value && typeof m.value == "string") {
793
+ const n = JSON.stringify(o);
794
794
  if (m.value === n) return;
795
- const s = S(m.value);
796
- p(s);
795
+ const s = R(m.value);
796
+ v(s);
797
797
  }
798
- }, [m.value, f]), T(() => {
798
+ }, [m.value, u]), j(() => {
799
799
  if (c) return;
800
- const n = JSON.stringify(d);
800
+ const n = JSON.stringify(o);
801
801
  m.value !== n && m.onChange(n);
802
- }, [d, m, c]);
803
- const C = j(() => {
804
- const n = { _uid: x(), ...a };
805
- p((s) => [...s, n]);
806
- }, [a]), y = j(() => {
807
- p((n) => n.filter((s) => !i.includes(s._uid))), v([]);
808
- }, [i]), R = j((n, s, u) => {
809
- p((k) => k.map((I) => I._uid === n ? { ...I, [s]: u } : I));
810
- }, []), D = j((n) => {
811
- v((s) => s.includes(n) ? s.filter((u) => u !== n) : [...s, n]);
812
- }, []), _ = j(
802
+ }, [o, m, c]);
803
+ const C = P(() => {
804
+ const n = { _uid: $(), ...a };
805
+ v((s) => [...s, n]);
806
+ }, [a]), b = P(() => {
807
+ v((n) => n.filter((s) => !l.includes(s._uid))), y([]);
808
+ }, [l]), S = P((n, s, f) => {
809
+ v((N) => N.map((I) => I._uid === n ? { ...I, [s]: f } : I));
810
+ }, []), E = P((n) => {
811
+ y((s) => s.includes(n) ? s.filter((f) => f !== n) : [...s, n]);
812
+ }, []), O = P(
813
813
  (n) => {
814
- v(n ? d.map((s) => s._uid) : []);
814
+ y(n ? o.map((s) => s._uid) : []);
815
815
  },
816
- [d]
817
- ), g = d.length > 0 && i.length === d.length, r = z(() => !o || o.length === 0 ? d : d.filter(
818
- (n) => o.every((s) => {
816
+ [o]
817
+ ), g = o.length > 0 && l.length === o.length, r = Y(() => !d || d.length === 0 ? o : o.filter(
818
+ (n) => d.every((s) => {
819
819
  if ("custom" in s)
820
820
  return s.custom(n);
821
- const u = n[s.field];
821
+ const f = n[s.field];
822
822
  switch (s.operator) {
823
823
  case "===":
824
- return u === s.value;
824
+ return f === s.value;
825
825
  case "!==":
826
- return u !== s.value;
826
+ return f !== s.value;
827
827
  case ">":
828
- return u > s.value;
828
+ return f > s.value;
829
829
  case "<":
830
- return u < s.value;
830
+ return f < s.value;
831
831
  case ">=":
832
- return u >= s.value;
832
+ return f >= s.value;
833
833
  case "<=":
834
- return u <= s.value;
834
+ return f <= s.value;
835
835
  default:
836
836
  return !0;
837
837
  }
838
838
  })
839
- ), [d, o]);
839
+ ), [o, d]);
840
840
  return {
841
841
  field: m,
842
- tableRows: d,
842
+ tableRows: o,
843
843
  visibleRows: r,
844
- selectedRowIds: i,
844
+ selectedRowIds: l,
845
845
  isAllSelected: g,
846
846
  handle: {
847
847
  addRow: C,
848
- removeRows: y,
849
- updateCellValue: R,
850
- toggleSelection: D,
851
- toggleSelectAll: _
848
+ removeRows: b,
849
+ updateCellValue: S,
850
+ toggleSelection: E,
851
+ toggleSelectAll: O
852
852
  }
853
853
  };
854
854
  }
855
855
  const pt = ({
856
856
  name: t,
857
- title: l = "Tabela Dinâmica",
857
+ title: i = "Tabela Dinâmica",
858
858
  columns: a,
859
- defaultRowValue: f = {},
859
+ defaultRowValue: u = {},
860
860
  forceReadOnly: c = !1,
861
- layout: o = "fluid",
861
+ layout: d = "fluid",
862
862
  actions: m = !0,
863
- filters: d = []
863
+ filters: o = []
864
864
  }) => {
865
- const { control: p } = U(), { isView: i, isReadOnly: v } = Y(), { isReadOnly: x } = G(), S = c || i || v || x && x(t), { field: C, visibleRows: y, selectedRowIds: R, isAllSelected: D, handle: _ } = et({
865
+ const { control: v } = J(), { isView: l, isReadOnly: y } = z(), { isReadOnly: $ } = G(), R = c || l || y || $ && $(t), { field: C, visibleRows: b, selectedRowIds: S, isAllSelected: E, handle: O } = et({
866
866
  name: t,
867
- control: p,
868
- defaultRowValue: f,
869
- isView: i,
870
- isReadOnly: !!S,
871
- filters: d
872
- }), g = o === "fixed";
873
- return /* @__PURE__ */ h("div", { className: `table-wrapper ${g ? "table-fixed" : "table-fluid"}`, children: [
867
+ control: v,
868
+ defaultRowValue: u,
869
+ isView: l,
870
+ isReadOnly: !!R,
871
+ filters: o
872
+ }), g = d === "fixed";
873
+ return /* @__PURE__ */ p("div", { className: `table-wrapper ${g ? "table-fixed" : "table-fluid"}`, children: [
874
874
  /* @__PURE__ */ e("input", { type: "hidden", ...C }),
875
- /* @__PURE__ */ h("div", { className: "header-handle", children: [
876
- /* @__PURE__ */ e("h3", { children: l }),
877
- !S && m && /* @__PURE__ */ h("div", { className: "handle-actions", children: [
878
- /* @__PURE__ */ h(
875
+ /* @__PURE__ */ p("div", { className: "header-handle", children: [
876
+ /* @__PURE__ */ e("h3", { children: i }),
877
+ !R && m && /* @__PURE__ */ p("div", { className: "handle-actions", children: [
878
+ /* @__PURE__ */ p(
879
879
  "button",
880
880
  {
881
881
  type: "button",
882
- className: `btn ${R.length > 0 ? "btn-danger" : "btn-primary"}`,
883
- disabled: R.length === 0,
884
- onClick: _.removeRows,
882
+ className: `btn ${S.length > 0 ? "btn-danger" : "btn-primary"}`,
883
+ disabled: S.length === 0,
884
+ onClick: O.removeRows,
885
885
  children: [
886
886
  "Remover (",
887
- R.length,
887
+ S.length,
888
888
  ")"
889
889
  ]
890
890
  }
891
891
  ),
892
- /* @__PURE__ */ e("button", { type: "button", className: "btn-add", onClick: _.addRow, children: "Adicionar" })
892
+ /* @__PURE__ */ e("button", { type: "button", className: "btn-add", onClick: O.addRow, children: "Adicionar" })
893
893
  ] })
894
894
  ] }),
895
- /* @__PURE__ */ e("div", { className: "table-scroll", children: /* @__PURE__ */ h("table", { className: "table-custom", children: [
896
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ h("tr", { children: [
897
- !S && /* @__PURE__ */ e("th", { style: { width: "50px" }, children: /* @__PURE__ */ e(
895
+ /* @__PURE__ */ e("div", { className: "table-scroll", children: /* @__PURE__ */ p("table", { className: "table-custom", children: [
896
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ p("tr", { children: [
897
+ !R && /* @__PURE__ */ e("th", { style: { width: "50px" }, children: /* @__PURE__ */ e(
898
898
  "input",
899
899
  {
900
900
  type: "checkbox",
901
- checked: D,
902
- onChange: (r) => _.toggleSelectAll(r.target.checked)
901
+ checked: E,
902
+ onChange: (r) => O.toggleSelectAll(r.target.checked)
903
903
  }
904
904
  ) }),
905
905
  a.map((r) => /* @__PURE__ */ e(
@@ -911,150 +911,150 @@ const pt = ({
911
911
  String(r.key)
912
912
  ))
913
913
  ] }) }),
914
- /* @__PURE__ */ h("tbody", { children: [
915
- y.map((r, n) => /* @__PURE__ */ h("tr", { children: [
916
- !S && /* @__PURE__ */ e("td", { children: /* @__PURE__ */ e(
914
+ /* @__PURE__ */ p("tbody", { children: [
915
+ b.map((r, n) => /* @__PURE__ */ p("tr", { children: [
916
+ !R && /* @__PURE__ */ e("td", { children: /* @__PURE__ */ e(
917
917
  "input",
918
918
  {
919
919
  type: "checkbox",
920
- checked: R.includes(r._uid),
921
- onChange: () => _.toggleSelection(r._uid)
920
+ checked: S.includes(r._uid),
921
+ onChange: () => O.toggleSelection(r._uid)
922
922
  }
923
923
  ) }),
924
924
  a.map((s) => /* @__PURE__ */ e("td", { children: s.render ? s.render.length <= 1 ? s.render({
925
925
  row: r,
926
926
  index: n,
927
- updateRow: (u, k) => _.updateCellValue(r._uid, String(u), k),
928
- isLocked: !!S,
929
- isView: !!i
927
+ updateRow: (f, N) => O.updateCellValue(r._uid, String(f), N),
928
+ isLocked: !!R,
929
+ isView: !!l
930
930
  }) : s.render(
931
931
  r,
932
932
  n,
933
- (u, k) => _.updateCellValue(r._uid, u, k),
934
- !!S,
935
- !!i
933
+ (f, N) => O.updateCellValue(r._uid, f, N),
934
+ !!R,
935
+ !!l
936
936
  ) : r[s.key] }, `${r._uid}-${String(s.key)}`))
937
937
  ] }, r._uid)),
938
- y.length === 0 && /* @__PURE__ */ e("tr", { className: "empty-row", children: /* @__PURE__ */ e("td", { colSpan: 100, className: "text-center", children: S ? "Nenhum registro encontrado." : "Nenhum registro." }) })
938
+ b.length === 0 && /* @__PURE__ */ e("tr", { className: "empty-row", children: /* @__PURE__ */ e("td", { colSpan: 100, className: "text-center", children: R ? "Nenhum registro encontrado." : "Nenhum registro." }) })
939
939
  ] })
940
940
  ] }) })
941
941
  ] });
942
- }, tt = (t, l) => {
943
- const [a, f] = P(null);
942
+ }, tt = (t, i) => {
943
+ const [a, u] = U(null);
944
944
  let c = null;
945
945
  try {
946
- c = U().watch;
946
+ c = J().watch;
947
947
  } catch {
948
948
  }
949
- const o = l !== void 0 ? l : c ? c(t) : void 0, m = j(() => {
949
+ const d = i !== void 0 ? i : c ? c(t) : void 0, m = P(() => {
950
950
  try {
951
- const p = window.top.__REACT_ATTACHMENT_BRIDGE__;
952
- if (p) {
953
- const i = p.getAttachment(t, o);
954
- f(i || (o ? { name: o, documentId: 0 } : null));
951
+ const v = window.top.__REACT_ATTACHMENT_BRIDGE__;
952
+ if (v) {
953
+ const l = v.getAttachment(t, d);
954
+ u(l || (d ? { name: d, documentId: 0 } : null));
955
955
  } else
956
- f(o ? { name: o, documentId: 0 } : null);
956
+ u(d ? { name: d, documentId: 0 } : null);
957
957
  } catch {
958
- f(o ? { name: o, documentId: 0 } : null);
958
+ u(d ? { name: d, documentId: 0 } : null);
959
959
  }
960
- }, [t, o, l]);
961
- return T(() => {
960
+ }, [t, d, i]);
961
+ return j(() => {
962
962
  m();
963
- const d = setInterval(m, 2e3);
964
- return () => clearInterval(d);
963
+ const o = setInterval(m, 2e3);
964
+ return () => clearInterval(o);
965
965
  }, [m]), { attachment: a, sync: m };
966
966
  }, st = ({
967
967
  name: t,
968
- label: l,
968
+ label: i,
969
969
  help: a,
970
- valueManual: f,
970
+ valueManual: u,
971
971
  onChangeManual: c,
972
- forceReadOnly: o = !1,
972
+ forceReadOnly: d = !1,
973
973
  forceHidden: m = !1,
974
- helpText: d,
975
- helpTitle: p,
976
- helpWidth: i
974
+ helpText: o,
975
+ helpTitle: v,
976
+ helpWidth: l
977
977
  }) => {
978
- const v = !!c, { isReadOnly: x, isHidden: S } = G(), { isView: C } = Y(), y = o || C || !!x(t), R = m || !!S(t), [D, _] = P(!1);
978
+ const y = !!c, { isReadOnly: $, isHidden: R } = G(), { isView: C } = z(), b = d || C || !!$(t), S = m || !!R(t), [E, O] = U(!1);
979
979
  let g = null;
980
980
  try {
981
- g = U().control;
981
+ g = J().control;
982
982
  } catch {
983
983
  }
984
- const r = g && !v ? W({ name: t, control: g }).field : {
985
- value: f,
984
+ const r = g && !y ? Q({ name: t, control: g }).field : {
985
+ value: u,
986
986
  onChange: (w) => c == null ? void 0 : c(w)
987
- }, { attachment: n, sync: s } = tt(t, f), u = () => {
987
+ }, { attachment: n, sync: s } = tt(t, u), f = () => {
988
988
  var w;
989
989
  try {
990
- const N = window.top;
990
+ const k = window.top;
991
991
  return {
992
- bridge: N.__REACT_ATTACHMENT_BRIDGE__,
993
- toast: (w = N.FLUIGC) == null ? void 0 : w.toast
992
+ bridge: k.__REACT_ATTACHMENT_BRIDGE__,
993
+ toast: (w = k.FLUIGC) == null ? void 0 : w.toast
994
994
  };
995
995
  } catch {
996
996
  return { bridge: null, toast: null };
997
997
  }
998
- }, k = j(() => {
999
- if (y) return;
998
+ }, N = P(() => {
999
+ if (b) return;
1000
1000
  const w = document.createElement("input");
1001
- w.type = "file", w.onchange = (N) => {
1002
- const A = N.target.files[0];
1001
+ w.type = "file", w.onchange = (k) => {
1002
+ const A = k.target.files[0];
1003
1003
  if (!A) return;
1004
- const { bridge: b, toast: E } = u();
1005
- _(!0), b ? b.upload(A, t, (L) => {
1006
- v ? c == null || c(L.name) : r.onChange(L.name), setTimeout(() => {
1007
- _(!1), s();
1008
- }, 1e3), E && E({
1004
+ const { bridge: h, toast: D } = f();
1005
+ O(!0), h ? h.upload(A, t, (L) => {
1006
+ y ? c == null || c(L.name) : r.onChange(L.name), setTimeout(() => {
1007
+ O(!1), s();
1008
+ }, 1e3), D && D({
1009
1009
  title: "Sucesso",
1010
1010
  message: "Arquivo enviado",
1011
1011
  type: "success"
1012
1012
  });
1013
- }) : (v ? c == null || c(A.name) : r.onChange(A.name), _(!1));
1013
+ }) : (y ? c == null || c(A.name) : r.onChange(A.name), O(!1));
1014
1014
  }, w.click();
1015
- }, [t, r, s, c, y, v]), I = (w) => {
1016
- if (w.stopPropagation(), y) return;
1017
- const N = (n == null ? void 0 : n.name) || f || r.value;
1018
- if (!N) return;
1019
- const { bridge: A, toast: b } = u();
1020
- A ? A.removeByFileName(N) ? (v ? c == null || c("") : r.onChange(""), s()) : b && b({
1015
+ }, [t, r, s, c, b, y]), I = (w) => {
1016
+ if (w.stopPropagation(), b) return;
1017
+ const k = (n == null ? void 0 : n.name) || u || r.value;
1018
+ if (!k) return;
1019
+ const { bridge: A, toast: h } = f();
1020
+ A ? A.removeByFileName(k) ? (y ? c == null || c("") : r.onChange(""), s()) : h && h({
1021
1021
  title: "Erro",
1022
1022
  message: "Erro ao remover anexo",
1023
1023
  type: "danger"
1024
- }) : (v ? c == null || c("") : r.onChange(""), s());
1025
- }, B = !!n && !D, V = (n == null ? void 0 : n.name) || f || r.value, O = [
1024
+ }) : (y ? c == null || c("") : r.onChange(""), s());
1025
+ }, B = !!n && !E, V = (n == null ? void 0 : n.name) || u || r.value, _ = [
1026
1026
  "fluig-attachment__box",
1027
1027
  B ? "fluig-attachment__box--has-file" : "",
1028
- D ? "fluig-attachment__box--uploading" : "",
1029
- y && !B ? "readOnly" : "",
1030
- y && B ? "fluig-attachment__box--readonly-view" : ""
1028
+ E ? "fluig-attachment__box--uploading" : "",
1029
+ b && !B ? "readOnly" : "",
1030
+ b && B ? "fluig-attachment__box--readonly-view" : ""
1031
1031
  ].join(" ");
1032
- return R ? null : /* @__PURE__ */ h("div", { className: "form-group fluig-attachment", children: [
1033
- l && /* @__PURE__ */ e("label", { className: "fluig-attachment__label", children: l }),
1034
- /* @__PURE__ */ h("div", { className: d ? "dfe-flex-input-wrapper" : "", children: [
1035
- /* @__PURE__ */ h(
1032
+ return S ? null : /* @__PURE__ */ p("div", { className: "form-group fluig-attachment", children: [
1033
+ i && /* @__PURE__ */ e("label", { className: "fluig-attachment__label", children: i }),
1034
+ /* @__PURE__ */ p("div", { className: o ? "dfe-flex-input-wrapper" : "", children: [
1035
+ /* @__PURE__ */ p(
1036
1036
  "div",
1037
1037
  {
1038
- className: O,
1039
- style: d ? { flex: 1 } : void 0,
1038
+ className: _,
1039
+ style: o ? { flex: 1 } : void 0,
1040
1040
  onClick: () => {
1041
1041
  if (B) {
1042
- const w = u(), N = (n == null ? void 0 : n.physicalFileName) || (n == null ? void 0 : n.description) || (n == null ? void 0 : n.name) || V;
1043
- w.bridge && N && w.bridge.view(N);
1042
+ const w = f(), k = (n == null ? void 0 : n.physicalFileName) || (n == null ? void 0 : n.description) || (n == null ? void 0 : n.name) || V;
1043
+ w.bridge && k && w.bridge.view(k);
1044
1044
  } else
1045
- k();
1045
+ N();
1046
1046
  },
1047
1047
  children: [
1048
- /* @__PURE__ */ h("span", { className: "fluig-attachment__content", children: [
1048
+ /* @__PURE__ */ p("span", { className: "fluig-attachment__content", children: [
1049
1049
  /* @__PURE__ */ e(
1050
1050
  "i",
1051
1051
  {
1052
- className: `flaticon icon-sm ${D ? "flaticon-loading" : B ? "flaticon-file" : "flaticon-paperclip"} fluig-attachment__icon`
1052
+ className: `flaticon icon-sm ${E ? "flaticon-loading" : B ? "flaticon-file" : "flaticon-paperclip"} fluig-attachment__icon`
1053
1053
  }
1054
1054
  ),
1055
- /* @__PURE__ */ e("span", { className: "fluig-attachment__filename", children: D ? " Enviando..." : B ? V : y ? "Nenhum arquivo" : a || "Anexar" })
1055
+ /* @__PURE__ */ e("span", { className: "fluig-attachment__filename", children: E ? " Enviando..." : B ? V : b ? "Nenhum arquivo" : a || "Anexar" })
1056
1056
  ] }),
1057
- B && !y && /* @__PURE__ */ e(
1057
+ B && !b && /* @__PURE__ */ e(
1058
1058
  "button",
1059
1059
  {
1060
1060
  type: "button",
@@ -1066,9 +1066,9 @@ const pt = ({
1066
1066
  ]
1067
1067
  }
1068
1068
  ),
1069
- d && /* @__PURE__ */ e(Z, { text: d, title: p, width: i })
1069
+ o && /* @__PURE__ */ e(Z, { text: o, title: v, width: l })
1070
1070
  ] }),
1071
- !v && g && /* @__PURE__ */ e("input", { type: "hidden", name: t, value: r.value || "" })
1071
+ !y && g && /* @__PURE__ */ e("input", { type: "hidden", name: t, value: r.value || "" })
1072
1072
  ] });
1073
1073
  }, vt = q(st);
1074
1074
  export {
@@ -1076,7 +1076,7 @@ export {
1076
1076
  at as Checkbox,
1077
1077
  mt as DatePicker,
1078
1078
  Z as Help,
1079
- ot as Input,
1079
+ dt as Input,
1080
1080
  Ie as Modal,
1081
1081
  ut as RadioBtn,
1082
1082
  re as Select,