osocna-react-tailwind 0.1.39 → 0.1.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +231 -204
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as G, jsx as
|
|
1
|
+
import { jsxs as G, jsx as v, Fragment as WA } from "react/jsx-runtime";
|
|
2
2
|
import nA, { useState as k, useEffect as cA, createContext as Vt, useCallback as YA, useMemo as dt, useContext as re, useRef as ie } from "react";
|
|
3
3
|
import Ut from "osocna-shared/OsocnaProvider";
|
|
4
4
|
import { promiseMapper as OA, apiClient as PA, setApiClientTokenProvider as ht, useAsyncRequest as MA, Card as kA, Collection as BA, Filter as pA, DataTable as ne, DropdownMenu as se, DropdownPanel as Kt, Avatar as St, Button as SA, useCrud as Ft, Loader as GA, Dialog as ZA, Input as Tt, Checkbox as Lt, CrudProvider as Ot } from "flysoft-react-ui";
|
|
@@ -11,9 +11,9 @@ const Yt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArwAAAVsCAYAAADaI07iAA
|
|
|
11
11
|
}) => {
|
|
12
12
|
const [A, i] = k([]);
|
|
13
13
|
cA(() => {
|
|
14
|
-
e &&
|
|
14
|
+
e && u();
|
|
15
15
|
}, []);
|
|
16
|
-
const
|
|
16
|
+
const u = () => {
|
|
17
17
|
let n = [];
|
|
18
18
|
e?.membership?.origin?.id === 97 ? n = [`url(${mt})`] : e?.membership?.origin?.id === 9 ? (n = [`url(${yt})`], (e?.membership?.credential?.plan === "TOTAL" || e?.membership?.credential?.plan === "GLOBAL") && n.push(`url(${Mt})`, `url(${Rt})`)) : n = [`url(${Wt})`], i(n);
|
|
19
19
|
};
|
|
@@ -34,7 +34,7 @@ const Yt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArwAAAVsCAYAAADaI07iAA
|
|
|
34
34
|
padding: "10px"
|
|
35
35
|
},
|
|
36
36
|
children: [
|
|
37
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ v(
|
|
38
38
|
"div",
|
|
39
39
|
{
|
|
40
40
|
className: "w-24 h-24 mt-14 border border-[#9e0054] rounded-full",
|
|
@@ -52,8 +52,8 @@ const Yt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArwAAAVsCAYAAADaI07iAA
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
),
|
|
55
|
-
/* @__PURE__ */ G("div", { className: "w-full mt-
|
|
56
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ G("div", { className: "w-full mt-3", children: [
|
|
56
|
+
/* @__PURE__ */ v(
|
|
57
57
|
"p",
|
|
58
58
|
{
|
|
59
59
|
className: "text-[#9e0054] text-center",
|
|
@@ -68,22 +68,56 @@ const Yt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArwAAAVsCAYAAADaI07iAA
|
|
|
68
68
|
children: e?.lastname || ""
|
|
69
69
|
}
|
|
70
70
|
),
|
|
71
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ v(
|
|
72
72
|
"p",
|
|
73
73
|
{
|
|
74
74
|
style: {
|
|
75
75
|
fontSize: "22px",
|
|
76
|
-
lineHeight: "
|
|
76
|
+
lineHeight: "24px",
|
|
77
77
|
fontFamily: "MyriadVariableConcept, sans-serif",
|
|
78
|
-
fontWeight: "
|
|
78
|
+
fontWeight: "300",
|
|
79
79
|
letterSpacing: "-1px",
|
|
80
80
|
textTransform: "uppercase",
|
|
81
81
|
color: "#9e0054",
|
|
82
|
-
textAlign: "center"
|
|
82
|
+
textAlign: "center",
|
|
83
|
+
marginBottom: "4px"
|
|
83
84
|
},
|
|
84
85
|
children: e?.firstname || ""
|
|
85
86
|
}
|
|
86
87
|
),
|
|
88
|
+
/* @__PURE__ */ v(
|
|
89
|
+
"div",
|
|
90
|
+
{
|
|
91
|
+
style: {
|
|
92
|
+
width: "85%",
|
|
93
|
+
padding: "10px 0",
|
|
94
|
+
backgroundColor: "#9e0054",
|
|
95
|
+
borderRadius: "32px",
|
|
96
|
+
marginTop: "0px",
|
|
97
|
+
marginLeft: "auto",
|
|
98
|
+
marginRight: "auto",
|
|
99
|
+
display: "flex",
|
|
100
|
+
alignItems: "center",
|
|
101
|
+
justifyContent: "center"
|
|
102
|
+
},
|
|
103
|
+
children: /* @__PURE__ */ v(
|
|
104
|
+
"p",
|
|
105
|
+
{
|
|
106
|
+
style: {
|
|
107
|
+
fontSize: "22px",
|
|
108
|
+
lineHeight: "32px",
|
|
109
|
+
fontFamily: "MyriadVariableConcept, sans-serif",
|
|
110
|
+
fontWeight: "800",
|
|
111
|
+
letterSpacing: "-1px",
|
|
112
|
+
textTransform: "uppercase",
|
|
113
|
+
color: "white",
|
|
114
|
+
textAlign: "center"
|
|
115
|
+
},
|
|
116
|
+
children: e?.membership?.credential?.number
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
}
|
|
120
|
+
),
|
|
87
121
|
/* @__PURE__ */ G(
|
|
88
122
|
"p",
|
|
89
123
|
{
|
|
@@ -94,16 +128,17 @@ const Yt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArwAAAVsCAYAAADaI07iAA
|
|
|
94
128
|
fontFamily: "MyriadVariableConcept, sans-serif",
|
|
95
129
|
fontWeight: "100",
|
|
96
130
|
textAlign: "center",
|
|
97
|
-
marginTop: "
|
|
131
|
+
marginTop: "10px"
|
|
98
132
|
},
|
|
99
133
|
children: [
|
|
100
134
|
"Plan ",
|
|
101
|
-
/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ v(
|
|
102
136
|
"span",
|
|
103
137
|
{
|
|
104
138
|
style: {
|
|
105
139
|
fontFamily: "MyriadVariableConcept, sans-serif",
|
|
106
|
-
fontWeight: "800"
|
|
140
|
+
fontWeight: "800",
|
|
141
|
+
letterSpacing: "-0.5px"
|
|
107
142
|
},
|
|
108
143
|
children: e?.membership?.credential?.plan
|
|
109
144
|
}
|
|
@@ -111,35 +146,27 @@ const Yt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArwAAAVsCAYAAADaI07iAA
|
|
|
111
146
|
]
|
|
112
147
|
}
|
|
113
148
|
),
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
"
|
|
149
|
+
/* @__PURE__ */ v(
|
|
150
|
+
"p",
|
|
116
151
|
{
|
|
117
152
|
style: {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
display: "flex",
|
|
126
|
-
alignItems: "center",
|
|
127
|
-
justifyContent: "center"
|
|
153
|
+
color: "#9e0054",
|
|
154
|
+
fontSize: "12px",
|
|
155
|
+
lineHeight: "8px",
|
|
156
|
+
fontFamily: "MyriadVariableConcept, sans-serif",
|
|
157
|
+
fontWeight: "100",
|
|
158
|
+
textAlign: "center",
|
|
159
|
+
marginTop: "8px"
|
|
128
160
|
},
|
|
129
|
-
children: /* @__PURE__ */
|
|
130
|
-
"
|
|
161
|
+
children: /* @__PURE__ */ v(
|
|
162
|
+
"span",
|
|
131
163
|
{
|
|
132
164
|
style: {
|
|
133
|
-
fontSize: "22px",
|
|
134
|
-
lineHeight: "30px",
|
|
135
165
|
fontFamily: "MyriadVariableConcept, sans-serif",
|
|
136
166
|
fontWeight: "800",
|
|
137
|
-
letterSpacing: "-1px"
|
|
138
|
-
textTransform: "uppercase",
|
|
139
|
-
color: "white",
|
|
140
|
-
textAlign: "center"
|
|
167
|
+
letterSpacing: "-1px"
|
|
141
168
|
},
|
|
142
|
-
children: e?.membership?.credential?.
|
|
169
|
+
children: e?.membership?.credential?.observation + " - " + (e?.membership?.credential?.volunteer ? "Gravado" : "No Gravado") || ""
|
|
143
170
|
}
|
|
144
171
|
)
|
|
145
172
|
}
|
|
@@ -165,8 +192,8 @@ const Yt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArwAAAVsCAYAAADaI07iAA
|
|
|
165
192
|
padding: "10px"
|
|
166
193
|
},
|
|
167
194
|
children: [
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
(n, f) => /* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ v("div", { className: "w-full flex justify-center items-center", children: A.map(
|
|
196
|
+
(n, f) => /* @__PURE__ */ v(
|
|
170
197
|
"div",
|
|
171
198
|
{
|
|
172
199
|
className: "ml-auto mr-auto ",
|
|
@@ -184,14 +211,14 @@ const Yt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArwAAAVsCAYAAADaI07iAA
|
|
|
184
211
|
)
|
|
185
212
|
) }),
|
|
186
213
|
/* @__PURE__ */ G("div", { className: `flex flex-col items-center mb-3 text-${e?.membership?.origin?.id === 9 ? "black" : "white"}`, children: [
|
|
187
|
-
/* @__PURE__ */
|
|
188
|
-
/* @__PURE__ */
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ v("p", { className: "text-center text-textPrimary font-bold", style: { fontSize: "clamp(20px, 2vw, 22px)" }, children: e?.name?.toLocaleUpperCase() || "" }),
|
|
215
|
+
/* @__PURE__ */ v("p", { className: "text-center text-textSecondary font-bold", style: { whiteSpace: "nowrap", fontSize: "clamp(20px, 2vw, 22px)" }, children: e?.membership?.credential?.number || 0 }),
|
|
216
|
+
/* @__PURE__ */ v("div", { className: "flex justify-center", children: e.membership?.origin?.id === 9 ? e.membership?.credential?.plan?.toUpperCase() === "INTEGRAL" ? /* @__PURE__ */ v("p", { style: { color: "white", backgroundColor: "red", borderRadius: "15px", marginLeft: "auto", marginRight: "auto", textAlign: "center", width: "100px", fontSize: "10px", padding: "2px", marginTop: "4px" }, children: "INTEGRAL" }) : e.membership?.credential?.plan?.toUpperCase() === "GLOBAL" ? /* @__PURE__ */ v("p", { style: { color: "white", backgroundColor: "red", borderRadius: "15px", marginLeft: "auto", marginRight: "auto", textAlign: "center", width: "100px", fontSize: "10px", padding: "2px", marginTop: "4px" }, children: "GLOBAL" }) : /* @__PURE__ */ v("p", { style: { color: "white", backgroundColor: "red", borderRadius: "15px", marginLeft: "auto", marginRight: "auto", textAlign: "center", width: "100px", fontSize: "10px", padding: "2px", marginTop: "4px" }, children: "TOTAL" }) : null }),
|
|
217
|
+
/* @__PURE__ */ v("p", { className: "text-center text-textSecondary mt-2 h-3", style: { whiteSpace: "nowrap", fontSize: "clamp(12px, 1.5vw, 12px)" }, children: e?.membership?.credential?.observation || "" })
|
|
191
218
|
] }),
|
|
192
219
|
/* @__PURE__ */ G("div", { className: `text-center text-${e?.membership?.origin?.id === 9 ? "black" : "white"}`, children: [
|
|
193
|
-
/* @__PURE__ */
|
|
194
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ v("p", { style: { width: "90%", whiteSpace: "nowrap", fontSize: "clamp(8px, 1.5vw, 10px)" }, children: "Superintendencia de Servicios de Salud - Órgano de Control" }),
|
|
221
|
+
/* @__PURE__ */ v("p", { style: { width: "100%", whiteSpace: "nowrap", fontSize: "clamp(8px, 1.5vw, 10px)" }, children: "0800-222-SALUD(72583) - www.sssalud.gov.ar" })
|
|
195
222
|
] })
|
|
196
223
|
]
|
|
197
224
|
}
|
|
@@ -213,7 +240,7 @@ const Yt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArwAAAVsCAYAAADaI07iAA
|
|
|
213
240
|
padding: "10px"
|
|
214
241
|
},
|
|
215
242
|
children: [
|
|
216
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ v(
|
|
217
244
|
"div",
|
|
218
245
|
{
|
|
219
246
|
className: "w-24 h-24 mt-14 border border-[#9e0054] rounded-full",
|
|
@@ -226,7 +253,7 @@ const Yt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArwAAAVsCAYAAADaI07iAA
|
|
|
226
253
|
}
|
|
227
254
|
),
|
|
228
255
|
/* @__PURE__ */ G("div", { className: "w-full mt-1", children: [
|
|
229
|
-
/* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ v(
|
|
230
257
|
"p",
|
|
231
258
|
{
|
|
232
259
|
className: "text-[#9e0054] text-center",
|
|
@@ -241,7 +268,7 @@ const Yt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArwAAAVsCAYAAADaI07iAA
|
|
|
241
268
|
children: e?.lastname || ""
|
|
242
269
|
}
|
|
243
270
|
),
|
|
244
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ v(
|
|
245
272
|
"p",
|
|
246
273
|
{
|
|
247
274
|
className: "text-[#9e0054] text-center",
|
|
@@ -256,11 +283,11 @@ const Yt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAArwAAAVsCAYAAADaI07iAA
|
|
|
256
283
|
children: e?.firstname || ""
|
|
257
284
|
}
|
|
258
285
|
),
|
|
286
|
+
/* @__PURE__ */ v("div", { className: "py-1 w-[85%] bg-[#9e0054] rounded-full mx-auto mt-6 text-white flex items-center justify-center", children: /* @__PURE__ */ v("p", { className: "font-black", style: { fontSize: "22px", fontFamily: "MyriadVariableConcept, sans-serif" }, children: e?.membership?.credential?.number }) }),
|
|
259
287
|
/* @__PURE__ */ G("p", { className: "text-[#9e0054] mt-1.5 text-center", style: { fontSize: "12px", lineHeight: "8px", fontFamily: "MyriadVariableConcept, sans-serif", fontWeight: "100" }, children: [
|
|
260
288
|
"Plan ",
|
|
261
|
-
/* @__PURE__ */
|
|
262
|
-
] })
|
|
263
|
-
/* @__PURE__ */ u("div", { className: "py-1 w-[85%] bg-[#9e0054] rounded-full mx-auto mt-6 text-white flex items-center justify-center", children: /* @__PURE__ */ u("p", { className: "font-black", style: { fontSize: "22px", fontFamily: "MyriadVariableConcept, sans-serif" }, children: e?.membership?.credential?.number }) })
|
|
289
|
+
/* @__PURE__ */ v("span", { style: { fontFamily: "MyriadVariableConcept, sans-serif", fontWeight: "800" }, children: e?.membership?.credential?.plan })
|
|
290
|
+
] })
|
|
264
291
|
] })
|
|
265
292
|
]
|
|
266
293
|
}
|
|
@@ -282,7 +309,7 @@ var Et = { exports: {} };
|
|
|
282
309
|
(function(A, i) {
|
|
283
310
|
e.exports = i();
|
|
284
311
|
})(jt, function() {
|
|
285
|
-
var A = 1e3, i = 6e4,
|
|
312
|
+
var A = 1e3, i = 6e4, u = 36e5, n = "millisecond", f = "second", d = "minute", F = "hour", K = "day", z = "week", x = "month", q = "quarter", X = "year", L = "date", w = "Invalid Date", J = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, W = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, V = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(C) {
|
|
286
313
|
var c = ["th", "st", "nd", "rd"], E = C % 100;
|
|
287
314
|
return "[" + C + (c[(E - 20) % 10] || c[E] || c[0]) + "]";
|
|
288
315
|
} }, $ = function(C, c, E) {
|
|
@@ -417,7 +444,7 @@ var Et = { exports: {} };
|
|
|
417
444
|
if (b === X) return this.set(X, this.$y + E);
|
|
418
445
|
if (b === K) return m(1);
|
|
419
446
|
if (b === z) return m(7);
|
|
420
|
-
var N = (I = {}, I[d] = i, I[F] =
|
|
447
|
+
var N = (I = {}, I[d] = i, I[F] = u, I[f] = A, I)[b] || 1, _ = this.$d.getTime() + E * N;
|
|
421
448
|
return S.w(_, this);
|
|
422
449
|
}, c.subtract = function(E, B) {
|
|
423
450
|
return this.add(-1 * E, B);
|
|
@@ -510,7 +537,7 @@ var Et = { exports: {} };
|
|
|
510
537
|
p = (tA - _) / 864e5;
|
|
511
538
|
break;
|
|
512
539
|
case F:
|
|
513
|
-
p = tA /
|
|
540
|
+
p = tA / u;
|
|
514
541
|
break;
|
|
515
542
|
case d:
|
|
516
543
|
p = tA / i;
|
|
@@ -787,7 +814,7 @@ const Ke = () => ({
|
|
|
787
814
|
children: A,
|
|
788
815
|
oidcConfig: i
|
|
789
816
|
}) => {
|
|
790
|
-
const [
|
|
817
|
+
const [u, n] = k(e), [f, d] = k(""), [F, K] = k(null), [z, x] = k([]), [q, X] = k(void 0), L = YA((o) => {
|
|
791
818
|
n(o);
|
|
792
819
|
}, []), w = YA((o) => {
|
|
793
820
|
d(o);
|
|
@@ -814,10 +841,10 @@ const Ke = () => ({
|
|
|
814
841
|
},
|
|
815
842
|
[]
|
|
816
843
|
);
|
|
817
|
-
return /* @__PURE__ */
|
|
844
|
+
return /* @__PURE__ */ v(Ie.Provider, { value: V, children: /* @__PURE__ */ v(
|
|
818
845
|
Ut,
|
|
819
846
|
{
|
|
820
|
-
appTitle:
|
|
847
|
+
appTitle: u,
|
|
821
848
|
appLinks: t,
|
|
822
849
|
tabTitle: f,
|
|
823
850
|
oidcSettings: i,
|
|
@@ -836,7 +863,7 @@ const Ke = () => ({
|
|
|
836
863
|
}, Me = ({
|
|
837
864
|
paramPrefix: e = ""
|
|
838
865
|
}) => {
|
|
839
|
-
const [t, A] = k("chart"), [i,
|
|
866
|
+
const [t, A] = k("chart"), [i, u] = k([]), [n] = ve(), f = e ? `${e}_` : "", [d, F] = k({
|
|
840
867
|
periodoDesde: Number(
|
|
841
868
|
n.get(`${f}periodoDesde`) || Re()
|
|
842
869
|
),
|
|
@@ -893,19 +920,19 @@ const Ke = () => ({
|
|
|
893
920
|
const O = [...new Set(H.map((U) => U.periodo))].sort(
|
|
894
921
|
(U, M) => U - M
|
|
895
922
|
);
|
|
896
|
-
|
|
923
|
+
u(O);
|
|
897
924
|
}
|
|
898
925
|
};
|
|
899
926
|
return cA(() => {
|
|
900
927
|
const o = d.nivelDeAtencion ? d.nivelDeAtencion.split("|") : [], H = o.length > 0 ? q.filter((U) => o.includes(U.id.toString())) : q, O = [...new Set(K.map((U) => U.idNivelDeAtencion))];
|
|
901
928
|
w(H.filter((U) => O.includes(U.id)));
|
|
902
|
-
}, [K, q, d.nivelDeAtencion]), /* @__PURE__ */
|
|
929
|
+
}, [K, q, d.nivelDeAtencion]), /* @__PURE__ */ v(
|
|
903
930
|
kA,
|
|
904
931
|
{
|
|
905
932
|
title: "Afiliaciones por periodo y nivel de atención",
|
|
906
933
|
compact: !0,
|
|
907
934
|
className: "w-[700px]",
|
|
908
|
-
headerActions: /* @__PURE__ */
|
|
935
|
+
headerActions: /* @__PURE__ */ v(
|
|
909
936
|
se,
|
|
910
937
|
{
|
|
911
938
|
options: [
|
|
@@ -917,7 +944,7 @@ const Ke = () => ({
|
|
|
917
944
|
),
|
|
918
945
|
children: /* @__PURE__ */ G(BA, { children: [
|
|
919
946
|
/* @__PURE__ */ G(BA, { direction: "row", children: [
|
|
920
|
-
/* @__PURE__ */
|
|
947
|
+
/* @__PURE__ */ v(
|
|
921
948
|
pA,
|
|
922
949
|
{
|
|
923
950
|
filterType: "number",
|
|
@@ -926,7 +953,7 @@ const Ke = () => ({
|
|
|
926
953
|
value: d.periodoDesde.toString()
|
|
927
954
|
}
|
|
928
955
|
),
|
|
929
|
-
/* @__PURE__ */
|
|
956
|
+
/* @__PURE__ */ v(
|
|
930
957
|
pA,
|
|
931
958
|
{
|
|
932
959
|
filterType: "number",
|
|
@@ -935,7 +962,7 @@ const Ke = () => ({
|
|
|
935
962
|
value: d.periodoHasta.toString()
|
|
936
963
|
}
|
|
937
964
|
),
|
|
938
|
-
/* @__PURE__ */
|
|
965
|
+
/* @__PURE__ */ v(
|
|
939
966
|
pA,
|
|
940
967
|
{
|
|
941
968
|
filterType: "autocomplete",
|
|
@@ -950,7 +977,7 @@ const Ke = () => ({
|
|
|
950
977
|
}
|
|
951
978
|
)
|
|
952
979
|
] }),
|
|
953
|
-
t === "chart" ? /* @__PURE__ */
|
|
980
|
+
t === "chart" ? /* @__PURE__ */ v(
|
|
954
981
|
"div",
|
|
955
982
|
{
|
|
956
983
|
style: {
|
|
@@ -959,7 +986,7 @@ const Ke = () => ({
|
|
|
959
986
|
maxHeight: "70vh",
|
|
960
987
|
aspectRatio: 1.618
|
|
961
988
|
},
|
|
962
|
-
children: /* @__PURE__ */
|
|
989
|
+
children: /* @__PURE__ */ v(ue, { width: "100%", height: "100%", children: /* @__PURE__ */ G(
|
|
963
990
|
de,
|
|
964
991
|
{
|
|
965
992
|
data: V(),
|
|
@@ -972,12 +999,12 @@ const Ke = () => ({
|
|
|
972
999
|
bottom: 5
|
|
973
1000
|
},
|
|
974
1001
|
children: [
|
|
975
|
-
/* @__PURE__ */
|
|
976
|
-
/* @__PURE__ */
|
|
977
|
-
/* @__PURE__ */
|
|
978
|
-
/* @__PURE__ */
|
|
979
|
-
/* @__PURE__ */
|
|
980
|
-
L.map((o, H) => /* @__PURE__ */
|
|
1002
|
+
/* @__PURE__ */ v(oe, { strokeDasharray: "3 3" }),
|
|
1003
|
+
/* @__PURE__ */ v(ge, { dataKey: "name" }),
|
|
1004
|
+
/* @__PURE__ */ v(Ee, {}),
|
|
1005
|
+
/* @__PURE__ */ v(ce, {}),
|
|
1006
|
+
/* @__PURE__ */ v(le, {}),
|
|
1007
|
+
L.map((o, H) => /* @__PURE__ */ v(
|
|
981
1008
|
mA,
|
|
982
1009
|
{
|
|
983
1010
|
dataKey: `plan-${o.id}`,
|
|
@@ -1001,7 +1028,7 @@ const Ke = () => ({
|
|
|
1001
1028
|
}
|
|
1002
1029
|
) })
|
|
1003
1030
|
}
|
|
1004
|
-
) : /* @__PURE__ */
|
|
1031
|
+
) : /* @__PURE__ */ v(
|
|
1005
1032
|
ne,
|
|
1006
1033
|
{
|
|
1007
1034
|
compact: !0,
|
|
@@ -1019,11 +1046,11 @@ const Ke = () => ({
|
|
|
1019
1046
|
] })
|
|
1020
1047
|
}
|
|
1021
1048
|
);
|
|
1022
|
-
}, kr = (e) => ae() ? /* @__PURE__ */
|
|
1049
|
+
}, kr = (e) => ae() ? /* @__PURE__ */ v(Me, { ...e }) : /* @__PURE__ */ v(
|
|
1023
1050
|
fe,
|
|
1024
1051
|
{
|
|
1025
1052
|
initialEntries: [{ pathname: "/", search: window.location.search }],
|
|
1026
|
-
children: /* @__PURE__ */
|
|
1053
|
+
children: /* @__PURE__ */ v(Me, { ...e })
|
|
1027
1054
|
}
|
|
1028
1055
|
), ke = () => {
|
|
1029
1056
|
const e = /* @__PURE__ */ new Date();
|
|
@@ -1034,7 +1061,7 @@ const Ke = () => ({
|
|
|
1034
1061
|
}, Ne = ({
|
|
1035
1062
|
paramPrefix: e = ""
|
|
1036
1063
|
}) => {
|
|
1037
|
-
const [t, A] = k("chart"), [i,
|
|
1064
|
+
const [t, A] = k("chart"), [i, u] = k([]), [n] = ve(), f = e ? `${e}_` : "", [d, F] = k({
|
|
1038
1065
|
periodoDesde: Number(
|
|
1039
1066
|
n.get(`${f}periodoDesde`) || ke()
|
|
1040
1067
|
),
|
|
@@ -1093,19 +1120,19 @@ const Ke = () => ({
|
|
|
1093
1120
|
const O = [...new Set(H.map((U) => U.periodo))].sort(
|
|
1094
1121
|
(U, M) => U - M
|
|
1095
1122
|
);
|
|
1096
|
-
|
|
1123
|
+
u(O);
|
|
1097
1124
|
}
|
|
1098
1125
|
};
|
|
1099
1126
|
return cA(() => {
|
|
1100
1127
|
const o = d.nivelDeAtencion ? d.nivelDeAtencion.split("|") : [], H = o.length > 0 ? q.filter((U) => o.includes(U.id.toString())) : q, O = [...new Set(K.map((U) => U.idNivelDeAtencion))];
|
|
1101
1128
|
w(H.filter((U) => O.includes(U.id)));
|
|
1102
|
-
}, [K, q, d.nivelDeAtencion]), /* @__PURE__ */
|
|
1129
|
+
}, [K, q, d.nivelDeAtencion]), /* @__PURE__ */ v(
|
|
1103
1130
|
kA,
|
|
1104
1131
|
{
|
|
1105
1132
|
title: "Afiliaciones vigentes por periodo",
|
|
1106
1133
|
compact: !0,
|
|
1107
1134
|
className: "w-[700px]",
|
|
1108
|
-
headerActions: /* @__PURE__ */
|
|
1135
|
+
headerActions: /* @__PURE__ */ v(
|
|
1109
1136
|
se,
|
|
1110
1137
|
{
|
|
1111
1138
|
options: [
|
|
@@ -1117,7 +1144,7 @@ const Ke = () => ({
|
|
|
1117
1144
|
),
|
|
1118
1145
|
children: /* @__PURE__ */ G(BA, { children: [
|
|
1119
1146
|
/* @__PURE__ */ G(BA, { direction: "row", children: [
|
|
1120
|
-
/* @__PURE__ */
|
|
1147
|
+
/* @__PURE__ */ v(
|
|
1121
1148
|
pA,
|
|
1122
1149
|
{
|
|
1123
1150
|
filterType: "number",
|
|
@@ -1126,7 +1153,7 @@ const Ke = () => ({
|
|
|
1126
1153
|
value: d.periodoDesde.toString()
|
|
1127
1154
|
}
|
|
1128
1155
|
),
|
|
1129
|
-
/* @__PURE__ */
|
|
1156
|
+
/* @__PURE__ */ v(
|
|
1130
1157
|
pA,
|
|
1131
1158
|
{
|
|
1132
1159
|
filterType: "number",
|
|
@@ -1135,7 +1162,7 @@ const Ke = () => ({
|
|
|
1135
1162
|
value: d.periodoHasta.toString()
|
|
1136
1163
|
}
|
|
1137
1164
|
),
|
|
1138
|
-
/* @__PURE__ */
|
|
1165
|
+
/* @__PURE__ */ v(
|
|
1139
1166
|
pA,
|
|
1140
1167
|
{
|
|
1141
1168
|
filterType: "autocomplete",
|
|
@@ -1150,7 +1177,7 @@ const Ke = () => ({
|
|
|
1150
1177
|
}
|
|
1151
1178
|
)
|
|
1152
1179
|
] }),
|
|
1153
|
-
t === "chart" ? /* @__PURE__ */
|
|
1180
|
+
t === "chart" ? /* @__PURE__ */ v(
|
|
1154
1181
|
"div",
|
|
1155
1182
|
{
|
|
1156
1183
|
style: {
|
|
@@ -1159,7 +1186,7 @@ const Ke = () => ({
|
|
|
1159
1186
|
maxHeight: "70vh",
|
|
1160
1187
|
aspectRatio: 1.618
|
|
1161
1188
|
},
|
|
1162
|
-
children: /* @__PURE__ */
|
|
1189
|
+
children: /* @__PURE__ */ v(ue, { width: "100%", height: "100%", children: /* @__PURE__ */ G(
|
|
1163
1190
|
de,
|
|
1164
1191
|
{
|
|
1165
1192
|
data: V(),
|
|
@@ -1172,12 +1199,12 @@ const Ke = () => ({
|
|
|
1172
1199
|
bottom: 5
|
|
1173
1200
|
},
|
|
1174
1201
|
children: [
|
|
1175
|
-
/* @__PURE__ */
|
|
1176
|
-
/* @__PURE__ */
|
|
1177
|
-
/* @__PURE__ */
|
|
1178
|
-
/* @__PURE__ */
|
|
1179
|
-
/* @__PURE__ */
|
|
1180
|
-
L.map((o, H) => /* @__PURE__ */
|
|
1202
|
+
/* @__PURE__ */ v(oe, { strokeDasharray: "3 3" }),
|
|
1203
|
+
/* @__PURE__ */ v(ge, { dataKey: "name" }),
|
|
1204
|
+
/* @__PURE__ */ v(Ee, {}),
|
|
1205
|
+
/* @__PURE__ */ v(ce, {}),
|
|
1206
|
+
/* @__PURE__ */ v(le, {}),
|
|
1207
|
+
L.map((o, H) => /* @__PURE__ */ v(
|
|
1181
1208
|
mA,
|
|
1182
1209
|
{
|
|
1183
1210
|
dataKey: `plan-${o.id}`,
|
|
@@ -1201,7 +1228,7 @@ const Ke = () => ({
|
|
|
1201
1228
|
}
|
|
1202
1229
|
) })
|
|
1203
1230
|
}
|
|
1204
|
-
) : /* @__PURE__ */
|
|
1231
|
+
) : /* @__PURE__ */ v(
|
|
1205
1232
|
ne,
|
|
1206
1233
|
{
|
|
1207
1234
|
compact: !0,
|
|
@@ -1219,11 +1246,11 @@ const Ke = () => ({
|
|
|
1219
1246
|
] })
|
|
1220
1247
|
}
|
|
1221
1248
|
);
|
|
1222
|
-
}, zr = (e) => ae() ? /* @__PURE__ */
|
|
1249
|
+
}, zr = (e) => ae() ? /* @__PURE__ */ v(Ne, { ...e }) : /* @__PURE__ */ v(
|
|
1223
1250
|
fe,
|
|
1224
1251
|
{
|
|
1225
1252
|
initialEntries: [{ pathname: "/", search: window.location.search }],
|
|
1226
|
-
children: /* @__PURE__ */
|
|
1253
|
+
children: /* @__PURE__ */ v(Ne, { ...e })
|
|
1227
1254
|
}
|
|
1228
1255
|
), rr = () => ({
|
|
1229
1256
|
mapToDto: (A) => ({
|
|
@@ -1247,7 +1274,7 @@ const Ke = () => ({
|
|
|
1247
1274
|
}, Ze = ({
|
|
1248
1275
|
paramPrefix: e = ""
|
|
1249
1276
|
}) => {
|
|
1250
|
-
const [t, A] = k([]), [i,
|
|
1277
|
+
const [t, A] = k([]), [i, u] = k("chart"), [n] = ve(), f = e ? `${e}_` : "", [d, F] = k(
|
|
1251
1278
|
Number(n.get(`${f}periodoDesde`) || je())
|
|
1252
1279
|
), [K, z] = k(
|
|
1253
1280
|
Number(n.get(`${f}periodoHasta`) || Ge())
|
|
@@ -1264,25 +1291,25 @@ const Ke = () => ({
|
|
|
1264
1291
|
const W = await q.execute(() => nr({ periodoDesde: w, periodoHasta: J }));
|
|
1265
1292
|
W && A(W);
|
|
1266
1293
|
}, L = t.map((w) => ({ ...w, period: String(w.period) }));
|
|
1267
|
-
return /* @__PURE__ */
|
|
1294
|
+
return /* @__PURE__ */ v(WA, { children: /* @__PURE__ */ v(
|
|
1268
1295
|
kA,
|
|
1269
1296
|
{
|
|
1270
1297
|
title: "Altas adhesiones por período, procesadas y sin procesar",
|
|
1271
1298
|
compact: !0,
|
|
1272
1299
|
className: "w-[800px]",
|
|
1273
|
-
headerActions: /* @__PURE__ */
|
|
1300
|
+
headerActions: /* @__PURE__ */ v(
|
|
1274
1301
|
se,
|
|
1275
1302
|
{
|
|
1276
1303
|
options: [
|
|
1277
1304
|
{ label: "Ver gráfico", value: "chart" },
|
|
1278
1305
|
{ label: "Ver tabla", value: "table" }
|
|
1279
1306
|
],
|
|
1280
|
-
onOptionSelected: (w) =>
|
|
1307
|
+
onOptionSelected: (w) => u(w.value)
|
|
1281
1308
|
}
|
|
1282
1309
|
),
|
|
1283
1310
|
children: /* @__PURE__ */ G(BA, { children: [
|
|
1284
1311
|
/* @__PURE__ */ G(BA, { direction: "row", children: [
|
|
1285
|
-
/* @__PURE__ */
|
|
1312
|
+
/* @__PURE__ */ v(
|
|
1286
1313
|
pA,
|
|
1287
1314
|
{
|
|
1288
1315
|
filterType: "number",
|
|
@@ -1291,7 +1318,7 @@ const Ke = () => ({
|
|
|
1291
1318
|
value: d.toString()
|
|
1292
1319
|
}
|
|
1293
1320
|
),
|
|
1294
|
-
/* @__PURE__ */
|
|
1321
|
+
/* @__PURE__ */ v(
|
|
1295
1322
|
pA,
|
|
1296
1323
|
{
|
|
1297
1324
|
filterType: "number",
|
|
@@ -1301,7 +1328,7 @@ const Ke = () => ({
|
|
|
1301
1328
|
}
|
|
1302
1329
|
)
|
|
1303
1330
|
] }),
|
|
1304
|
-
i === "chart" ? /* @__PURE__ */
|
|
1331
|
+
i === "chart" ? /* @__PURE__ */ v(
|
|
1305
1332
|
"div",
|
|
1306
1333
|
{
|
|
1307
1334
|
style: {
|
|
@@ -1310,7 +1337,7 @@ const Ke = () => ({
|
|
|
1310
1337
|
maxHeight: "70vh",
|
|
1311
1338
|
aspectRatio: 1.618
|
|
1312
1339
|
},
|
|
1313
|
-
children: /* @__PURE__ */
|
|
1340
|
+
children: /* @__PURE__ */ v(ue, { width: "100%", height: "100%", children: /* @__PURE__ */ G(
|
|
1314
1341
|
de,
|
|
1315
1342
|
{
|
|
1316
1343
|
data: L,
|
|
@@ -1318,18 +1345,18 @@ const Ke = () => ({
|
|
|
1318
1345
|
style: { outline: "none" },
|
|
1319
1346
|
margin: { top: 20, right: 30, left: 20, bottom: 5 },
|
|
1320
1347
|
children: [
|
|
1321
|
-
/* @__PURE__ */
|
|
1322
|
-
/* @__PURE__ */
|
|
1323
|
-
/* @__PURE__ */
|
|
1324
|
-
/* @__PURE__ */
|
|
1325
|
-
/* @__PURE__ */
|
|
1326
|
-
/* @__PURE__ */
|
|
1327
|
-
/* @__PURE__ */
|
|
1348
|
+
/* @__PURE__ */ v(oe, { strokeDasharray: "3 3" }),
|
|
1349
|
+
/* @__PURE__ */ v(ge, { dataKey: "period" }),
|
|
1350
|
+
/* @__PURE__ */ v(Ee, {}),
|
|
1351
|
+
/* @__PURE__ */ v(ce, {}),
|
|
1352
|
+
/* @__PURE__ */ v(le, {}),
|
|
1353
|
+
/* @__PURE__ */ v(mA, { dataKey: "processed", name: "Procesados", stackId: "a", fill: "#82ca9d" }),
|
|
1354
|
+
/* @__PURE__ */ v(mA, { dataKey: "unprocessed", name: "Sin Procesar", stackId: "a", fill: "#8884d8" })
|
|
1328
1355
|
]
|
|
1329
1356
|
}
|
|
1330
1357
|
) })
|
|
1331
1358
|
}
|
|
1332
|
-
) : /* @__PURE__ */
|
|
1359
|
+
) : /* @__PURE__ */ v(
|
|
1333
1360
|
ne,
|
|
1334
1361
|
{
|
|
1335
1362
|
compact: !0,
|
|
@@ -1344,11 +1371,11 @@ const Ke = () => ({
|
|
|
1344
1371
|
] })
|
|
1345
1372
|
}
|
|
1346
1373
|
) });
|
|
1347
|
-
}, Nr = (e) => ae() ? /* @__PURE__ */
|
|
1374
|
+
}, Nr = (e) => ae() ? /* @__PURE__ */ v(Ze, { ...e }) : /* @__PURE__ */ v(
|
|
1348
1375
|
fe,
|
|
1349
1376
|
{
|
|
1350
1377
|
initialEntries: [{ pathname: "/", search: window.location.search }],
|
|
1351
|
-
children: /* @__PURE__ */
|
|
1378
|
+
children: /* @__PURE__ */ v(Ze, { ...e })
|
|
1352
1379
|
}
|
|
1353
1380
|
), $e = ({
|
|
1354
1381
|
notificacion: e,
|
|
@@ -1358,12 +1385,12 @@ const Ke = () => ({
|
|
|
1358
1385
|
const {
|
|
1359
1386
|
auth: { id: i }
|
|
1360
1387
|
} = re(Jt);
|
|
1361
|
-
return /* @__PURE__ */
|
|
1388
|
+
return /* @__PURE__ */ v(
|
|
1362
1389
|
kA,
|
|
1363
1390
|
{
|
|
1364
1391
|
compact: !0,
|
|
1365
1392
|
headerActions: i === e.ssoUserId ? [
|
|
1366
|
-
/* @__PURE__ */
|
|
1393
|
+
/* @__PURE__ */ v(
|
|
1367
1394
|
SA,
|
|
1368
1395
|
{
|
|
1369
1396
|
icon: "fa-edit",
|
|
@@ -1374,7 +1401,7 @@ const Ke = () => ({
|
|
|
1374
1401
|
},
|
|
1375
1402
|
"edit"
|
|
1376
1403
|
),
|
|
1377
|
-
/* @__PURE__ */
|
|
1404
|
+
/* @__PURE__ */ v(
|
|
1378
1405
|
SA,
|
|
1379
1406
|
{
|
|
1380
1407
|
icon: "fa-archive",
|
|
@@ -1387,12 +1414,12 @@ const Ke = () => ({
|
|
|
1387
1414
|
)
|
|
1388
1415
|
] : void 0,
|
|
1389
1416
|
className: "w-full",
|
|
1390
|
-
subtitle: /* @__PURE__ */
|
|
1417
|
+
subtitle: /* @__PURE__ */ v("span", { className: "text-xs", children: e.persona.name }),
|
|
1391
1418
|
footer: /* @__PURE__ */ G("div", { className: "flex justify-between items-center w-full", children: [
|
|
1392
|
-
/* @__PURE__ */
|
|
1393
|
-
/* @__PURE__ */
|
|
1419
|
+
/* @__PURE__ */ v("span", { className: "text-xs", children: e.fecha.format("DD/MM/YYYY") }),
|
|
1420
|
+
/* @__PURE__ */ v("div", { children: /* @__PURE__ */ v(Kt, { renderNode: /* @__PURE__ */ v(St, { size: "sm", text: "Juan Pablo" }), children: "TEST" }) })
|
|
1394
1421
|
] }),
|
|
1395
|
-
children: /* @__PURE__ */
|
|
1422
|
+
children: /* @__PURE__ */ v("p", { className: `text-sm ${e.destacada ? "text-danger" : ""}`, children: e.mensaje })
|
|
1396
1423
|
}
|
|
1397
1424
|
);
|
|
1398
1425
|
};
|
|
@@ -1412,24 +1439,24 @@ function rA(e) {
|
|
|
1412
1439
|
if (!A && !(eA(e) && vr(e)))
|
|
1413
1440
|
return e;
|
|
1414
1441
|
const i = A ? [] : Object.create(Object.getPrototypeOf(e));
|
|
1415
|
-
for (const
|
|
1416
|
-
Object.prototype.hasOwnProperty.call(e,
|
|
1442
|
+
for (const u in e)
|
|
1443
|
+
Object.prototype.hasOwnProperty.call(e, u) && (i[u] = rA(e[u]));
|
|
1417
1444
|
return i;
|
|
1418
1445
|
}
|
|
1419
1446
|
var zA = (e) => /^\w*$/.test(e), Z = (e) => e === void 0, Be = (e) => Array.isArray(e) ? e.filter(Boolean) : [], Ce = (e) => Be(e.replace(/["|']|\]/g, "").split(/\.|\[/)), D = (e, t, A) => {
|
|
1420
1447
|
if (!t || !eA(e))
|
|
1421
1448
|
return A;
|
|
1422
|
-
const i = (zA(t) ? [t] : Ce(t)).reduce((
|
|
1449
|
+
const i = (zA(t) ? [t] : Ce(t)).reduce((u, n) => uA(u) ? u : u[n], e);
|
|
1423
1450
|
return Z(i) || i === e ? Z(e[t]) ? A : e[t] : i;
|
|
1424
1451
|
}, QA = (e) => typeof e == "boolean", gA = (e) => typeof e == "function", j = (e, t, A) => {
|
|
1425
1452
|
let i = -1;
|
|
1426
|
-
const
|
|
1453
|
+
const u = zA(t) ? [t] : Ce(t), n = u.length, f = n - 1;
|
|
1427
1454
|
for (; ++i < n; ) {
|
|
1428
|
-
const d =
|
|
1455
|
+
const d = u[i];
|
|
1429
1456
|
let F = A;
|
|
1430
1457
|
if (i !== f) {
|
|
1431
1458
|
const K = e[d];
|
|
1432
|
-
F = eA(K) || Array.isArray(K) ? K : isNaN(+
|
|
1459
|
+
F = eA(K) || Array.isArray(K) ? K : isNaN(+u[i + 1]) ? {} : [];
|
|
1433
1460
|
}
|
|
1434
1461
|
if (d === "__proto__" || d === "constructor" || d === "prototype")
|
|
1435
1462
|
return;
|
|
@@ -1456,34 +1483,34 @@ const _e = {
|
|
|
1456
1483
|
}, lt = nA.createContext(null);
|
|
1457
1484
|
lt.displayName = "HookFormControlContext";
|
|
1458
1485
|
var ur = (e, t, A, i = !0) => {
|
|
1459
|
-
const
|
|
1486
|
+
const u = {
|
|
1460
1487
|
defaultValues: t._defaultValues
|
|
1461
1488
|
};
|
|
1462
1489
|
for (const n in e)
|
|
1463
|
-
Object.defineProperty(
|
|
1490
|
+
Object.defineProperty(u, n, {
|
|
1464
1491
|
get: () => {
|
|
1465
1492
|
const f = n;
|
|
1466
1493
|
return t._proxyFormState[f] !== EA.all && (t._proxyFormState[f] = !i || EA.all), e[f];
|
|
1467
1494
|
}
|
|
1468
1495
|
});
|
|
1469
|
-
return
|
|
1496
|
+
return u;
|
|
1470
1497
|
};
|
|
1471
1498
|
const dr = typeof window < "u" ? nA.useLayoutEffect : nA.useEffect;
|
|
1472
|
-
var dA = (e) => typeof e == "string", or = (e, t, A, i,
|
|
1499
|
+
var dA = (e) => typeof e == "string", or = (e, t, A, i, u) => dA(e) ? (i && t.watch.add(e), D(A, e, u)) : Array.isArray(e) ? e.map((n) => (i && t.watch.add(n), D(A, n))) : (i && (t.watchAll = !0), A), ee = (e) => uA(e) || !ct(e);
|
|
1473
1500
|
function wA(e, t, A = /* @__PURE__ */ new WeakSet()) {
|
|
1474
1501
|
if (ee(e) || ee(t))
|
|
1475
1502
|
return Object.is(e, t);
|
|
1476
1503
|
if (UA(e) && UA(t))
|
|
1477
1504
|
return Object.is(e.getTime(), t.getTime());
|
|
1478
|
-
const i = Object.keys(e),
|
|
1479
|
-
if (i.length !==
|
|
1505
|
+
const i = Object.keys(e), u = Object.keys(t);
|
|
1506
|
+
if (i.length !== u.length)
|
|
1480
1507
|
return !1;
|
|
1481
1508
|
if (A.has(e) || A.has(t))
|
|
1482
1509
|
return !0;
|
|
1483
1510
|
A.add(e), A.add(t);
|
|
1484
1511
|
for (const n of i) {
|
|
1485
1512
|
const f = e[n];
|
|
1486
|
-
if (!
|
|
1513
|
+
if (!u.includes(n))
|
|
1487
1514
|
return !1;
|
|
1488
1515
|
if (n !== "ref") {
|
|
1489
1516
|
const d = t[n];
|
|
@@ -1496,13 +1523,13 @@ function wA(e, t, A = /* @__PURE__ */ new WeakSet()) {
|
|
|
1496
1523
|
const It = nA.createContext(null);
|
|
1497
1524
|
It.displayName = "HookFormContext";
|
|
1498
1525
|
const gr = (e) => {
|
|
1499
|
-
const { children: t, watch: A, getValues: i, getFieldState:
|
|
1526
|
+
const { children: t, watch: A, getValues: i, getFieldState: u, setError: n, clearErrors: f, setValue: d, trigger: F, formState: K, resetField: z, reset: x, handleSubmit: q, unregister: X, control: L, register: w, setFocus: J, subscribe: W } = e;
|
|
1500
1527
|
return nA.createElement(
|
|
1501
1528
|
It.Provider,
|
|
1502
1529
|
{ value: nA.useMemo(() => ({
|
|
1503
1530
|
watch: A,
|
|
1504
1531
|
getValues: i,
|
|
1505
|
-
getFieldState:
|
|
1532
|
+
getFieldState: u,
|
|
1506
1533
|
setError: n,
|
|
1507
1534
|
clearErrors: f,
|
|
1508
1535
|
setValue: d,
|
|
@@ -1520,7 +1547,7 @@ const gr = (e) => {
|
|
|
1520
1547
|
f,
|
|
1521
1548
|
L,
|
|
1522
1549
|
K,
|
|
1523
|
-
|
|
1550
|
+
u,
|
|
1524
1551
|
i,
|
|
1525
1552
|
q,
|
|
1526
1553
|
w,
|
|
@@ -1537,11 +1564,11 @@ const gr = (e) => {
|
|
|
1537
1564
|
nA.createElement(lt.Provider, { value: L }, t)
|
|
1538
1565
|
);
|
|
1539
1566
|
};
|
|
1540
|
-
var Er = (e, t, A, i,
|
|
1567
|
+
var Er = (e, t, A, i, u) => t ? {
|
|
1541
1568
|
...A[e],
|
|
1542
1569
|
types: {
|
|
1543
1570
|
...A[e] && A[e].types ? A[e].types : {},
|
|
1544
|
-
[i]:
|
|
1571
|
+
[i]: u || !0
|
|
1545
1572
|
}
|
|
1546
1573
|
} : {}, TA = (e) => Array.isArray(e) ? e : [e], At = () => {
|
|
1547
1574
|
let e = [];
|
|
@@ -1549,13 +1576,13 @@ var Er = (e, t, A, i, v) => t ? {
|
|
|
1549
1576
|
get observers() {
|
|
1550
1577
|
return e;
|
|
1551
1578
|
},
|
|
1552
|
-
next: (
|
|
1579
|
+
next: (u) => {
|
|
1553
1580
|
for (const n of e)
|
|
1554
|
-
n.next && n.next(
|
|
1581
|
+
n.next && n.next(u);
|
|
1555
1582
|
},
|
|
1556
|
-
subscribe: (
|
|
1583
|
+
subscribe: (u) => (e.push(u), {
|
|
1557
1584
|
unsubscribe: () => {
|
|
1558
|
-
e = e.filter((n) => n !==
|
|
1585
|
+
e = e.filter((n) => n !== u);
|
|
1559
1586
|
}
|
|
1560
1587
|
}),
|
|
1561
1588
|
unsubscribe: () => {
|
|
@@ -1567,9 +1594,9 @@ function Qt(e, t) {
|
|
|
1567
1594
|
const A = {};
|
|
1568
1595
|
for (const i in e)
|
|
1569
1596
|
if (e.hasOwnProperty(i)) {
|
|
1570
|
-
const
|
|
1571
|
-
if (
|
|
1572
|
-
const f = Qt(
|
|
1597
|
+
const u = e[i], n = t[i];
|
|
1598
|
+
if (u && eA(u) && n) {
|
|
1599
|
+
const f = Qt(u, n);
|
|
1573
1600
|
eA(f) && (A[i] = f);
|
|
1574
1601
|
} else e[i] && (A[i] = n);
|
|
1575
1602
|
}
|
|
@@ -1595,8 +1622,8 @@ function Ir(e) {
|
|
|
1595
1622
|
return !0;
|
|
1596
1623
|
}
|
|
1597
1624
|
function AA(e, t) {
|
|
1598
|
-
const A = Array.isArray(t) ? t : zA(t) ? [t] : Ce(t), i = A.length === 1 ? e : lr(e, A),
|
|
1599
|
-
return i && delete i[n],
|
|
1625
|
+
const A = Array.isArray(t) ? t : zA(t) ? [t] : Ce(t), i = A.length === 1 ? e : lr(e, A), u = A.length - 1, n = A[u];
|
|
1626
|
+
return i && delete i[n], u !== 0 && (eA(i) && fA(i) || Array.isArray(i) && Ir(i)) && AA(e, A.slice(0, -1)), e;
|
|
1600
1627
|
}
|
|
1601
1628
|
var Qr = (e) => {
|
|
1602
1629
|
for (const t in e)
|
|
@@ -1617,12 +1644,12 @@ function te(e, t = {}) {
|
|
|
1617
1644
|
function KA(e, t, A) {
|
|
1618
1645
|
A || (A = te(t));
|
|
1619
1646
|
for (const i in e) {
|
|
1620
|
-
const
|
|
1621
|
-
if (Ct(
|
|
1622
|
-
Z(t) || ee(A[i]) ? A[i] = te(
|
|
1647
|
+
const u = e[i];
|
|
1648
|
+
if (Ct(u))
|
|
1649
|
+
Z(t) || ee(A[i]) ? A[i] = te(u, Array.isArray(u) ? [] : {}) : KA(u, uA(t) ? {} : t[i], A[i]);
|
|
1623
1650
|
else {
|
|
1624
1651
|
const n = t[i];
|
|
1625
|
-
A[i] = !wA(
|
|
1652
|
+
A[i] = !wA(u, n);
|
|
1626
1653
|
}
|
|
1627
1654
|
}
|
|
1628
1655
|
return A;
|
|
@@ -1657,15 +1684,15 @@ function it(e) {
|
|
|
1657
1684
|
return Xe(t) ? t.files : De(t) ? Ht(e.refs).value : Bt(t) ? [...t.selectedOptions].map(({ value: A }) => A) : JA(t) ? Xt(e.refs).value : Dt(Z(t.value) ? e.ref.value : t.value, e);
|
|
1658
1685
|
}
|
|
1659
1686
|
var Br = (e, t, A, i) => {
|
|
1660
|
-
const
|
|
1687
|
+
const u = {};
|
|
1661
1688
|
for (const n of e) {
|
|
1662
1689
|
const f = D(t, n);
|
|
1663
|
-
f && j(
|
|
1690
|
+
f && j(u, n, f._f);
|
|
1664
1691
|
}
|
|
1665
1692
|
return {
|
|
1666
1693
|
criteriaMode: A,
|
|
1667
1694
|
names: [...e],
|
|
1668
|
-
fields:
|
|
1695
|
+
fields: u,
|
|
1669
1696
|
shouldUseNativeValidation: i
|
|
1670
1697
|
};
|
|
1671
1698
|
}, yA = (e) => e instanceof RegExp, FA = (e) => Z(e) ? e : yA(e) ? e.source : eA(e) ? yA(e.value) ? e.value.source : e.value : e, nt = (e) => ({
|
|
@@ -1678,12 +1705,12 @@ var Br = (e, t, A, i) => {
|
|
|
1678
1705
|
const st = "AsyncFunction";
|
|
1679
1706
|
var Cr = (e) => !!e && !!e.validate && !!(gA(e.validate) && e.validate.constructor.name === st || eA(e.validate) && Object.values(e.validate).find((t) => t.constructor.name === st)), Xr = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), at = (e, t, A) => !A && (t.watchAll || t.watch.has(e) || [...t.watch].some((i) => e.startsWith(i) && /^\.\w+/.test(e.slice(i.length))));
|
|
1680
1707
|
const LA = (e, t, A, i) => {
|
|
1681
|
-
for (const
|
|
1682
|
-
const n = D(e,
|
|
1708
|
+
for (const u of A || Object.keys(e)) {
|
|
1709
|
+
const n = D(e, u);
|
|
1683
1710
|
if (n) {
|
|
1684
1711
|
const { _f: f, ...d } = n;
|
|
1685
1712
|
if (f) {
|
|
1686
|
-
if (f.refs && f.refs[0] && t(f.refs[0],
|
|
1713
|
+
if (f.refs && f.refs[0] && t(f.refs[0], u) && !i)
|
|
1687
1714
|
return !0;
|
|
1688
1715
|
if (f.ref && t(f.ref, f.name) && !i)
|
|
1689
1716
|
return !0;
|
|
@@ -1701,9 +1728,9 @@ function ft(e, t, A) {
|
|
|
1701
1728
|
error: i,
|
|
1702
1729
|
name: A
|
|
1703
1730
|
};
|
|
1704
|
-
const
|
|
1705
|
-
for (;
|
|
1706
|
-
const n =
|
|
1731
|
+
const u = A.split(".");
|
|
1732
|
+
for (; u.length; ) {
|
|
1733
|
+
const n = u.join("."), f = D(t, n), d = D(e, n);
|
|
1707
1734
|
if (f && !Array.isArray(f) && A !== n)
|
|
1708
1735
|
return { name: A };
|
|
1709
1736
|
if (d && d.type)
|
|
@@ -1716,7 +1743,7 @@ function ft(e, t, A) {
|
|
|
1716
1743
|
name: `${n}.root`,
|
|
1717
1744
|
error: d.root
|
|
1718
1745
|
};
|
|
1719
|
-
|
|
1746
|
+
u.pop();
|
|
1720
1747
|
}
|
|
1721
1748
|
return {
|
|
1722
1749
|
name: A
|
|
@@ -1724,9 +1751,9 @@ function ft(e, t, A) {
|
|
|
1724
1751
|
}
|
|
1725
1752
|
var Dr = (e, t, A, i) => {
|
|
1726
1753
|
A(e);
|
|
1727
|
-
const { name:
|
|
1754
|
+
const { name: u, ...n } = e;
|
|
1728
1755
|
return fA(n) || Object.keys(n).length >= Object.keys(t).length || Object.keys(n).find((f) => t[f] === (!i || EA.all));
|
|
1729
|
-
}, Hr = (e, t, A) => !e || !t || e === t || TA(e).some((i) => i && (A ? i === t : i.startsWith(t) || t.startsWith(i))), Pr = (e, t, A, i,
|
|
1756
|
+
}, Hr = (e, t, A) => !e || !t || e === t || TA(e).some((i) => i && (A ? i === t : i.startsWith(t) || t.startsWith(i))), Pr = (e, t, A, i, u) => u.isOnAll ? !1 : !A && u.isOnTouch ? !(t || e) : (A ? i.isOnBlur : u.isOnBlur) ? !e : (A ? i.isOnChange : u.isOnChange) ? e : !0, xr = (e, t) => !Be(D(e, t)).length && AA(e, t), wr = (e, t, A) => {
|
|
1730
1757
|
const i = TA(D(e, A));
|
|
1731
1758
|
return j(i, "root", t[A]), j(e, A, i), e;
|
|
1732
1759
|
};
|
|
@@ -1741,12 +1768,12 @@ function vt(e, t, A = "validate") {
|
|
|
1741
1768
|
var hA = (e) => eA(e) && !yA(e) ? e : {
|
|
1742
1769
|
value: e,
|
|
1743
1770
|
message: ""
|
|
1744
|
-
}, ut = async (e, t, A, i,
|
|
1771
|
+
}, ut = async (e, t, A, i, u, n) => {
|
|
1745
1772
|
const { ref: f, refs: d, required: F, maxLength: K, minLength: z, min: x, max: q, pattern: X, validate: L, name: w, valueAsNumber: J, mount: W } = e._f, V = D(A, w);
|
|
1746
1773
|
if (!W || t.has(w))
|
|
1747
1774
|
return {};
|
|
1748
1775
|
const $ = d ? d[0] : f, o = (h) => {
|
|
1749
|
-
|
|
1776
|
+
u && $.reportValidity && ($.setCustomValidity(QA(h) ? "" : h || ""), $.reportValidity());
|
|
1750
1777
|
}, H = {}, O = De(f), U = JA(f), M = O || U, sA = (J || Xe(f)) && Z(f.value) && Z(V) || RA(f) && f.value === "" || V === "" || Array.isArray(V) && !V.length, T = Er.bind(null, w, i, H), S = (h, Y, C, c = HA.maxLength, E = HA.minLength) => {
|
|
1751
1778
|
const B = h ? Y : C;
|
|
1752
1779
|
H[w] = {
|
|
@@ -1846,7 +1873,7 @@ function br(e = {}) {
|
|
|
1846
1873
|
validatingFields: {},
|
|
1847
1874
|
errors: t.errors || {},
|
|
1848
1875
|
disabled: t.disabled || !1
|
|
1849
|
-
}, i = {},
|
|
1876
|
+
}, i = {}, u = eA(t.defaultValues) || eA(t.values) ? rA(t.defaultValues || t.values) || {} : {}, n = t.shouldUnregister ? {} : rA(u), f = {
|
|
1850
1877
|
action: !1,
|
|
1851
1878
|
mount: !1,
|
|
1852
1879
|
watch: !1,
|
|
@@ -1905,7 +1932,7 @@ function br(e = {}) {
|
|
|
1905
1932
|
const P = a(D(A.touchedFields, r), Q.argA, Q.argB);
|
|
1906
1933
|
l && j(A.touchedFields, r, P);
|
|
1907
1934
|
}
|
|
1908
|
-
(x.dirtyFields || q.dirtyFields) && (A.dirtyFields = KA(
|
|
1935
|
+
(x.dirtyFields || q.dirtyFields) && (A.dirtyFields = KA(u, n)), X.state.next({
|
|
1909
1936
|
name: r,
|
|
1910
1937
|
isDirty: h(r, s),
|
|
1911
1938
|
dirtyFields: A.dirtyFields,
|
|
@@ -1926,7 +1953,7 @@ function br(e = {}) {
|
|
|
1926
1953
|
}, H = (r, s, a, Q) => {
|
|
1927
1954
|
const l = D(i, r);
|
|
1928
1955
|
if (l) {
|
|
1929
|
-
const g = D(n, r, Z(a) ? D(
|
|
1956
|
+
const g = D(n, r, Z(a) ? D(u, r) : a);
|
|
1930
1957
|
Z(g) || Q && Q.defaultChecked || s ? j(n, r, s ? g : it(l._f)) : c(r, g), f.mount && !f.action && J();
|
|
1931
1958
|
}
|
|
1932
1959
|
}, O = (r, s, a, Q, l) => {
|
|
@@ -1937,7 +1964,7 @@ function br(e = {}) {
|
|
|
1937
1964
|
if (!t.disabled) {
|
|
1938
1965
|
if (!a || Q) {
|
|
1939
1966
|
(x.isDirty || q.isDirty) && (P = A.isDirty, A.isDirty = R.isDirty = h(), g = P !== R.isDirty);
|
|
1940
|
-
const y = wA(D(
|
|
1967
|
+
const y = wA(D(u, r), s);
|
|
1941
1968
|
P = !!D(A.dirtyFields, r), y ? AA(A.dirtyFields, r) : j(A.dirtyFields, r, !0), R.dirtyFields = A.dirtyFields, g = g || (x.dirtyFields || q.dirtyFields) && P !== !y;
|
|
1942
1969
|
}
|
|
1943
1970
|
if (a) {
|
|
@@ -1996,9 +2023,9 @@ function br(e = {}) {
|
|
|
1996
2023
|
s && (s._f.refs ? s._f.refs.every((a) => !_A(a)) : !_A(s._f.ref)) && DA(r);
|
|
1997
2024
|
}
|
|
1998
2025
|
d.unMount = /* @__PURE__ */ new Set();
|
|
1999
|
-
}, h = (r, s) => !t.disabled && (r && s && j(n, r, s), !wA(m(),
|
|
2000
|
-
...f.mount ? n : Z(s) ?
|
|
2001
|
-
}, a, s), C = (r) => Be(D(f.mount ? n :
|
|
2026
|
+
}, h = (r, s) => !t.disabled && (r && s && j(n, r, s), !wA(m(), u)), Y = (r, s, a) => or(r, d, {
|
|
2027
|
+
...f.mount ? n : Z(s) ? u : dA(r) ? { [r]: s } : s
|
|
2028
|
+
}, a, s), C = (r) => Be(D(f.mount ? n : u, r, t.shouldUnregister ? D(u, r, []) : [])), c = (r, s, a = {}) => {
|
|
2002
2029
|
const Q = D(i, r);
|
|
2003
2030
|
let l = s;
|
|
2004
2031
|
if (Q) {
|
|
@@ -2025,7 +2052,7 @@ function br(e = {}) {
|
|
|
2025
2052
|
values: rA(n)
|
|
2026
2053
|
}), (x.isDirty || x.dirtyFields || q.isDirty || q.dirtyFields) && a.shouldDirty && X.state.next({
|
|
2027
2054
|
name: r,
|
|
2028
|
-
dirtyFields: KA(
|
|
2055
|
+
dirtyFields: KA(u, n),
|
|
2029
2056
|
isDirty: h(r, g)
|
|
2030
2057
|
})) : Q && !Q._f && !uA(g) ? E(r, g, a) : c(r, g, a), at(r, d) ? X.state.next({
|
|
2031
2058
|
...A,
|
|
@@ -2083,7 +2110,7 @@ function br(e = {}) {
|
|
|
2083
2110
|
}), s.shouldFocus && !Q && LA(i, p, r ? l : d.mount), Q;
|
|
2084
2111
|
}, m = (r, s) => {
|
|
2085
2112
|
let a = {
|
|
2086
|
-
...f.mount ? n :
|
|
2113
|
+
...f.mount ? n : u
|
|
2087
2114
|
};
|
|
2088
2115
|
return s && (a = Qt(s.dirtyFields ? A.dirtyFields : A.touchedFields, a)), Z(r) ? a : dA(r) ? D(a, r) : r.map((Q) => D(a, Q));
|
|
2089
2116
|
}, N = (r, s) => ({
|
|
@@ -2115,7 +2142,7 @@ function br(e = {}) {
|
|
|
2115
2142
|
values: { ...n },
|
|
2116
2143
|
...A,
|
|
2117
2144
|
...s,
|
|
2118
|
-
defaultValues:
|
|
2145
|
+
defaultValues: u
|
|
2119
2146
|
});
|
|
2120
2147
|
}
|
|
2121
2148
|
}).unsubscribe, XA = (r) => (f.mount = !0, q = {
|
|
@@ -2129,7 +2156,7 @@ function br(e = {}) {
|
|
|
2129
2156
|
}
|
|
2130
2157
|
})), DA = (r, s = {}) => {
|
|
2131
2158
|
for (const a of r ? TA(r) : d.mount)
|
|
2132
|
-
d.mount.delete(a), d.array.delete(a), s.keepValue || (AA(i, a), AA(n, a)), !s.keepError && AA(A.errors, a), !s.keepDirty && AA(A.dirtyFields, a), !s.keepTouched && AA(A.touchedFields, a), !s.keepIsValidating && AA(A.validatingFields, a), !t.shouldUnregister && !s.keepDefaultValue && AA(
|
|
2159
|
+
d.mount.delete(a), d.array.delete(a), s.keepValue || (AA(i, a), AA(n, a)), !s.keepError && AA(A.errors, a), !s.keepDirty && AA(A.dirtyFields, a), !s.keepTouched && AA(A.touchedFields, a), !s.keepIsValidating && AA(A.validatingFields, a), !t.shouldUnregister && !s.keepDefaultValue && AA(u, a);
|
|
2133
2160
|
X.state.next({
|
|
2134
2161
|
values: rA(n)
|
|
2135
2162
|
}), X.state.next({
|
|
@@ -2181,7 +2208,7 @@ function br(e = {}) {
|
|
|
2181
2208
|
refs: [
|
|
2182
2209
|
...R.filter(_A),
|
|
2183
2210
|
g,
|
|
2184
|
-
...Array.isArray(D(
|
|
2211
|
+
...Array.isArray(D(u, r)) ? [{}] : []
|
|
2185
2212
|
],
|
|
2186
2213
|
ref: { type: g.type, name: r }
|
|
2187
2214
|
} : { ref: g }
|
|
@@ -2232,14 +2259,14 @@ function br(e = {}) {
|
|
|
2232
2259
|
}), Q)
|
|
2233
2260
|
throw Q;
|
|
2234
2261
|
}, Pt = (r, s = {}) => {
|
|
2235
|
-
D(i, r) && (Z(s.defaultValue) ? B(r, rA(D(
|
|
2262
|
+
D(i, r) && (Z(s.defaultValue) ? B(r, rA(D(u, r))) : (B(r, s.defaultValue), j(u, r, rA(s.defaultValue))), s.keepTouched || AA(A.touchedFields, r), s.keepDirty || (AA(A.dirtyFields, r), A.isDirty = s.defaultValue ? h(r, rA(D(u, r))) : h()), s.keepError || (AA(A.errors, r), x.isValid && J()), X.state.next({ ...A }));
|
|
2236
2263
|
}, He = (r, s = {}) => {
|
|
2237
|
-
const a = r ? rA(r) :
|
|
2238
|
-
if (s.keepDefaultValues || (
|
|
2264
|
+
const a = r ? rA(r) : u, Q = rA(a), l = fA(r), g = l ? u : Q;
|
|
2265
|
+
if (s.keepDefaultValues || (u = a), !s.keepValues) {
|
|
2239
2266
|
if (s.keepDirtyValues) {
|
|
2240
2267
|
const P = /* @__PURE__ */ new Set([
|
|
2241
2268
|
...d.mount,
|
|
2242
|
-
...Object.keys(KA(
|
|
2269
|
+
...Object.keys(KA(u, n))
|
|
2243
2270
|
]);
|
|
2244
2271
|
for (const R of Array.from(P)) {
|
|
2245
2272
|
const y = D(A.dirtyFields, R), aA = D(n, R), VA = D(g, R);
|
|
@@ -2266,7 +2293,7 @@ function br(e = {}) {
|
|
|
2266
2293
|
else
|
|
2267
2294
|
i = {};
|
|
2268
2295
|
}
|
|
2269
|
-
n = t.shouldUnregister ? s.keepDefaultValues ? rA(
|
|
2296
|
+
n = t.shouldUnregister ? s.keepDefaultValues ? rA(u) : {} : rA(g), X.array.next({
|
|
2270
2297
|
values: { ...g }
|
|
2271
2298
|
}), X.state.next({
|
|
2272
2299
|
values: { ...g }
|
|
@@ -2282,14 +2309,14 @@ function br(e = {}) {
|
|
|
2282
2309
|
focus: ""
|
|
2283
2310
|
}, f.mount = !x.isValid || !!s.keepIsValid || !!s.keepDirtyValues || !t.shouldUnregister && !fA(g), f.watch = !!t.shouldUnregister, f.keepIsValid = !!s.keepIsValid, f.action = !1, s.keepErrors || (A.errors = {}), X.state.next({
|
|
2284
2311
|
submitCount: s.keepSubmitCount ? A.submitCount : 0,
|
|
2285
|
-
isDirty: l ? !1 : s.keepDirty ? A.isDirty : !!(s.keepDefaultValues && !wA(r,
|
|
2312
|
+
isDirty: l ? !1 : s.keepDirty ? A.isDirty : !!(s.keepDefaultValues && !wA(r, u)),
|
|
2286
2313
|
isSubmitted: s.keepIsSubmitted ? A.isSubmitted : !1,
|
|
2287
|
-
dirtyFields: l ? {} : s.keepDirtyValues ? s.keepDefaultValues && n ? KA(
|
|
2314
|
+
dirtyFields: l ? {} : s.keepDirtyValues ? s.keepDefaultValues && n ? KA(u, n) : A.dirtyFields : s.keepDefaultValues && r ? KA(u, r) : s.keepDirty ? A.dirtyFields : {},
|
|
2288
2315
|
touchedFields: s.keepTouched ? A.touchedFields : {},
|
|
2289
2316
|
errors: s.keepErrors ? A.errors : {},
|
|
2290
2317
|
isSubmitSuccessful: s.keepIsSubmitSuccessful ? A.isSubmitSuccessful : !1,
|
|
2291
2318
|
isSubmitting: !1,
|
|
2292
|
-
defaultValues:
|
|
2319
|
+
defaultValues: u
|
|
2293
2320
|
});
|
|
2294
2321
|
}, Pe = (r, s) => He(gA(r) ? r(n) : r, { ...t.resetOptions, ...s }), xt = (r, s = {}) => {
|
|
2295
2322
|
const a = D(i, r), Q = a && a._f;
|
|
@@ -2345,7 +2372,7 @@ function br(e = {}) {
|
|
|
2345
2372
|
f = r;
|
|
2346
2373
|
},
|
|
2347
2374
|
get _defaultValues() {
|
|
2348
|
-
return
|
|
2375
|
+
return u;
|
|
2349
2376
|
},
|
|
2350
2377
|
get _names() {
|
|
2351
2378
|
return d;
|
|
@@ -2387,7 +2414,7 @@ function br(e = {}) {
|
|
|
2387
2414
|
};
|
|
2388
2415
|
}
|
|
2389
2416
|
function qr(e = {}) {
|
|
2390
|
-
const t = nA.useRef(void 0), A = nA.useRef(void 0), [i,
|
|
2417
|
+
const t = nA.useRef(void 0), A = nA.useRef(void 0), [i, u] = nA.useState({
|
|
2391
2418
|
isDirty: !1,
|
|
2392
2419
|
isValidating: !1,
|
|
2393
2420
|
isLoading: gA(e.defaultValues),
|
|
@@ -2421,10 +2448,10 @@ function qr(e = {}) {
|
|
|
2421
2448
|
return n._options = e, dr(() => {
|
|
2422
2449
|
const f = n._subscribe({
|
|
2423
2450
|
formState: n._proxyFormState,
|
|
2424
|
-
callback: () =>
|
|
2451
|
+
callback: () => u({ ...n._formState }),
|
|
2425
2452
|
reRenderRoot: !0
|
|
2426
2453
|
});
|
|
2427
|
-
return
|
|
2454
|
+
return u((d) => ({
|
|
2428
2455
|
...d,
|
|
2429
2456
|
isReady: !0
|
|
2430
2457
|
})), n._formState.isReady = !0, f;
|
|
@@ -2448,13 +2475,13 @@ function qr(e = {}) {
|
|
|
2448
2475
|
e.values && !wA(e.values, A.current) ? (n._reset(e.values, {
|
|
2449
2476
|
keepFieldsRef: !0,
|
|
2450
2477
|
...n._options.resetOptions
|
|
2451
|
-
}), !((f = n._options.resetOptions) === null || f === void 0) && f.keepIsValid || n._setValid(), A.current = e.values,
|
|
2478
|
+
}), !((f = n._options.resetOptions) === null || f === void 0) && f.keepIsValid || n._setValid(), A.current = e.values, u((d) => ({ ...d }))) : n._resetDefaultValues();
|
|
2452
2479
|
}, [n, e.values]), nA.useEffect(() => {
|
|
2453
2480
|
n._state.mount || (n._setValid(), n._state.mount = !0), n._state.watch && (n._state.watch = !1, n._subjects.state.next({ ...n._formState })), n._removeUnmounted();
|
|
2454
2481
|
}), t.current.formState = nA.useMemo(() => ur(i, n), [n, i]), t.current;
|
|
2455
2482
|
}
|
|
2456
2483
|
const Vr = () => {
|
|
2457
|
-
const { list: e, updateItem: t, fetchItems: A } = Ft(), [i,
|
|
2484
|
+
const { list: e, updateItem: t, fetchItems: A } = Ft(), [i, u] = k(!1), [n, f] = k(!1), [d, F] = k(!1), [K, z] = k(), [
|
|
2458
2485
|
x,
|
|
2459
2486
|
q
|
|
2460
2487
|
] = k(!1), X = qr(), L = dt(
|
|
@@ -2465,7 +2492,7 @@ const Vr = () => {
|
|
|
2465
2492
|
errorMessage: "Error al archivar notificación"
|
|
2466
2493
|
});
|
|
2467
2494
|
cA(() => {
|
|
2468
|
-
L?.length > 0 && !x && (q(!0),
|
|
2495
|
+
L?.length > 0 && !x && (q(!0), u(!0));
|
|
2469
2496
|
}, [L]), cA(() => {
|
|
2470
2497
|
K && X.reset(K);
|
|
2471
2498
|
}, [K]);
|
|
@@ -2484,7 +2511,7 @@ const Vr = () => {
|
|
|
2484
2511
|
), F(!1), A.execute();
|
|
2485
2512
|
};
|
|
2486
2513
|
return /* @__PURE__ */ G(WA, { children: [
|
|
2487
|
-
/* @__PURE__ */
|
|
2514
|
+
/* @__PURE__ */ v(GA, { isLoading: A.isLoading, children: /* @__PURE__ */ v(BA, { children: e?.map((o) => /* @__PURE__ */ v(
|
|
2488
2515
|
$e,
|
|
2489
2516
|
{
|
|
2490
2517
|
notificacion: o,
|
|
@@ -2493,13 +2520,13 @@ const Vr = () => {
|
|
|
2493
2520
|
},
|
|
2494
2521
|
o.idNotificacion
|
|
2495
2522
|
)) }) }),
|
|
2496
|
-
i && /* @__PURE__ */
|
|
2523
|
+
i && /* @__PURE__ */ v(
|
|
2497
2524
|
ZA,
|
|
2498
2525
|
{
|
|
2499
2526
|
isOpen: i,
|
|
2500
|
-
onClose: () =>
|
|
2527
|
+
onClose: () => u(!1),
|
|
2501
2528
|
title: "Notificaciones Críticas",
|
|
2502
|
-
children: /* @__PURE__ */
|
|
2529
|
+
children: /* @__PURE__ */ v(BA, { children: L?.map((o) => /* @__PURE__ */ v(
|
|
2503
2530
|
$e,
|
|
2504
2531
|
{
|
|
2505
2532
|
notificacion: o,
|
|
@@ -2510,14 +2537,14 @@ const Vr = () => {
|
|
|
2510
2537
|
)) })
|
|
2511
2538
|
}
|
|
2512
2539
|
),
|
|
2513
|
-
n && /* @__PURE__ */
|
|
2540
|
+
n && /* @__PURE__ */ v(gr, { ...X, children: /* @__PURE__ */ v("form", { onSubmit: X.handleSubmit(W), children: /* @__PURE__ */ v(
|
|
2514
2541
|
ZA,
|
|
2515
2542
|
{
|
|
2516
2543
|
isOpen: n,
|
|
2517
2544
|
onClose: () => f(!1),
|
|
2518
2545
|
title: "Editar Notificación",
|
|
2519
2546
|
footer: /* @__PURE__ */ G(WA, { children: [
|
|
2520
|
-
/* @__PURE__ */
|
|
2547
|
+
/* @__PURE__ */ v(
|
|
2521
2548
|
SA,
|
|
2522
2549
|
{
|
|
2523
2550
|
onClick: () => f(!1),
|
|
@@ -2526,10 +2553,10 @@ const Vr = () => {
|
|
|
2526
2553
|
children: "Cancelar"
|
|
2527
2554
|
}
|
|
2528
2555
|
),
|
|
2529
|
-
/* @__PURE__ */
|
|
2556
|
+
/* @__PURE__ */ v(SA, { type: "submit", disabled: t.isLoading, children: "Guardar" })
|
|
2530
2557
|
] }),
|
|
2531
2558
|
children: /* @__PURE__ */ G(BA, { children: [
|
|
2532
|
-
/* @__PURE__ */
|
|
2559
|
+
/* @__PURE__ */ v(
|
|
2533
2560
|
Tt,
|
|
2534
2561
|
{
|
|
2535
2562
|
label: "Notificación",
|
|
@@ -2539,25 +2566,25 @@ const Vr = () => {
|
|
|
2539
2566
|
error: X.formState.errors.mensaje?.message
|
|
2540
2567
|
}
|
|
2541
2568
|
),
|
|
2542
|
-
/* @__PURE__ */
|
|
2569
|
+
/* @__PURE__ */ v(
|
|
2543
2570
|
Lt,
|
|
2544
2571
|
{
|
|
2545
2572
|
label: "Destacada",
|
|
2546
2573
|
...X.register("destacada")
|
|
2547
2574
|
}
|
|
2548
2575
|
),
|
|
2549
|
-
/* @__PURE__ */
|
|
2576
|
+
/* @__PURE__ */ v(GA, { isLoading: t.isLoading })
|
|
2550
2577
|
] })
|
|
2551
2578
|
}
|
|
2552
2579
|
) }) }),
|
|
2553
|
-
d && /* @__PURE__ */
|
|
2580
|
+
d && /* @__PURE__ */ v(
|
|
2554
2581
|
ZA,
|
|
2555
2582
|
{
|
|
2556
2583
|
isOpen: d,
|
|
2557
2584
|
onClose: () => F(!1),
|
|
2558
2585
|
title: "Archivar Notificación",
|
|
2559
2586
|
footer: /* @__PURE__ */ G(WA, { children: [
|
|
2560
|
-
/* @__PURE__ */
|
|
2587
|
+
/* @__PURE__ */ v(
|
|
2561
2588
|
SA,
|
|
2562
2589
|
{
|
|
2563
2590
|
onClick: () => F(!1),
|
|
@@ -2566,7 +2593,7 @@ const Vr = () => {
|
|
|
2566
2593
|
children: "No"
|
|
2567
2594
|
}
|
|
2568
2595
|
),
|
|
2569
|
-
/* @__PURE__ */
|
|
2596
|
+
/* @__PURE__ */ v(
|
|
2570
2597
|
SA,
|
|
2571
2598
|
{
|
|
2572
2599
|
type: "submit",
|
|
@@ -2577,8 +2604,8 @@ const Vr = () => {
|
|
|
2577
2604
|
)
|
|
2578
2605
|
] }),
|
|
2579
2606
|
children: /* @__PURE__ */ G(BA, { children: [
|
|
2580
|
-
/* @__PURE__ */
|
|
2581
|
-
/* @__PURE__ */
|
|
2607
|
+
/* @__PURE__ */ v("p", { children: "¿Desea archivar la notificación?" }),
|
|
2608
|
+
/* @__PURE__ */ v(GA, { isLoading: w.isLoading })
|
|
2582
2609
|
] })
|
|
2583
2610
|
}
|
|
2584
2611
|
)
|
|
@@ -2601,12 +2628,12 @@ const Vr = () => {
|
|
|
2601
2628
|
}),
|
|
2602
2629
|
$A().mapFromDto
|
|
2603
2630
|
);
|
|
2604
|
-
return /* @__PURE__ */
|
|
2631
|
+
return /* @__PURE__ */ v(
|
|
2605
2632
|
Ot,
|
|
2606
2633
|
{
|
|
2607
2634
|
getPromise: () => t(),
|
|
2608
2635
|
putPromise: (i) => A(i),
|
|
2609
|
-
children: /* @__PURE__ */
|
|
2636
|
+
children: /* @__PURE__ */ v(Vr, {})
|
|
2610
2637
|
}
|
|
2611
2638
|
);
|
|
2612
2639
|
}, Ur = "https://intranet.osocna.com.ar/", Gr = (e) => OA(PA.get({ url: `${Ur}empleados/backend/api/Employees/${e}/SummaryData` }), Ar().mapFromDto), hr = "https://intranet.osocna.com.ar/", Zr = (e) => PA.get({ url: `${hr}administradorsso/backend/api/Users/${e}` });
|