@archbase/template 4.0.19 → 4.0.20
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/archbase-template-4.0.20.tgz +0 -0
- package/dist/index.js +656 -656
- package/package.json +8 -8
- package/dist/archbase-template-4.0.19.tgz +0 -0
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as e, Fragment as qe, jsxs as
|
|
2
|
-
import { Button as Oe, Paper as _e, Box as pe, Flex as
|
|
1
|
+
import { jsx as e, Fragment as qe, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { Button as Oe, Paper as _e, Box as pe, Flex as ve, Group as oe, ActionIcon as yt, Title as Bt, Text as Ee, ScrollArea as Ze, LoadingOverlay as Ct, useMantineColorScheme as ct, Modal as bt, px as Ot, Grid as Se, Pagination as Nt, Stack as wt, Tabs as at, Badge as Kt } from "@mantine/core";
|
|
3
3
|
import { useForceUpdate as dt, useUncontrolled as Qt, useHotkeys as Xt } from "@mantine/hooks";
|
|
4
|
-
import { IconArrowLeft as Vt, IconBug as Ke, IconDeviceFloppy as
|
|
4
|
+
import { IconArrowLeft as Vt, IconBug as Ke, IconDeviceFloppy as vt, IconX as ze, IconCheck as et, IconPlus as Ft, IconEdit as At, IconTrash as nt, IconEye as Rt } from "@tabler/icons-react";
|
|
5
5
|
import { useArchbaseAppContext as Me, useValidationErrors as Pt, ValidationErrorsProvider as Et, getI18nextInstance as g, processErrorMessage as xe, useArchbaseTheme as ut, emit as Yt, useArchbaseTranslation as Zt } from "@archbase/core";
|
|
6
|
-
import tt, { useMemo as Je, useState as
|
|
7
|
-
import { useArchbaseV1V2Compatibility as We, useArchbaseDataSourceListener as it, DataSourceEventNames as
|
|
8
|
-
import { ArchbaseAlert as Qe, ArchbaseDialog as St, ArchbaseDataGrid as Lt, GridToolBarActions as ir, ArchbaseDebugInspector as lr, ArchbaseMasonryProvider as or, ArchbaseMasonryResponsive as ar, ArchbaseMasonry as
|
|
6
|
+
import tt, { useMemo as Je, useState as H, useCallback as Z, forwardRef as zt, useRef as Ie, useImperativeHandle as Gt, useEffect as rt, Fragment as er, Profiler as tr, createContext as rr, useContext as $t } from "react";
|
|
7
|
+
import { useArchbaseV1V2Compatibility as We, useArchbaseDataSourceListener as it, DataSourceEventNames as be, ArchbaseDataSource as nr } from "@archbase/data";
|
|
8
|
+
import { ArchbaseAlert as Qe, ArchbaseDialog as St, ArchbaseDataGrid as Lt, GridToolBarActions as ir, ArchbaseDebugInspector as lr, ArchbaseMasonryProvider as or, ArchbaseMasonryResponsive as ar, ArchbaseMasonry as sr, ArchbaseActionButtons as cr } from "@archbase/components";
|
|
9
9
|
import { ArchbaseSpaceFixed as ht, ArchbaseSpaceTop as It, ArchbaseSpaceFill as ft, ArchbaseForm as jt, ArchbaseSpaceBottom as mt } from "@archbase/layout";
|
|
10
10
|
import { ArchbaseQueryBuilder as Dt, buildFrom as dr, ArchbaseGlobalFilter as ur } from "@archbase/advanced";
|
|
11
|
-
import
|
|
11
|
+
import st from "@rehooks/component-size";
|
|
12
12
|
import { uniqueId as hr } from "lodash";
|
|
13
13
|
const fr = {
|
|
14
14
|
isAvailable: !1,
|
|
@@ -30,52 +30,52 @@ function Vr(t) {
|
|
|
30
30
|
initialValues: n = [],
|
|
31
31
|
selectionMode: i = "single",
|
|
32
32
|
autoClose: h = !0,
|
|
33
|
-
onOpen:
|
|
33
|
+
onOpen: x,
|
|
34
34
|
onClose: a
|
|
35
|
-
} = t || {}, [v,
|
|
36
|
-
|
|
37
|
-
}, [
|
|
38
|
-
|
|
35
|
+
} = t || {}, [v, j] = H(!1), [l, c] = H(f), [_, D] = H(n), C = Z(() => {
|
|
36
|
+
j(!0), x?.();
|
|
37
|
+
}, [x]), b = Z(() => {
|
|
38
|
+
j(!1), a?.();
|
|
39
39
|
}, [a]), m = Z(() => {
|
|
40
|
-
|
|
41
|
-
}, []),
|
|
40
|
+
c(null), D([]);
|
|
41
|
+
}, []), z = Z(
|
|
42
42
|
(u) => {
|
|
43
|
-
|
|
43
|
+
c(u), D([u]), r?.(u), h && (j(!1), a?.());
|
|
44
44
|
},
|
|
45
45
|
[r, h, a]
|
|
46
46
|
), w = Z(
|
|
47
47
|
(u) => {
|
|
48
|
-
|
|
48
|
+
D(u), c(u.length > 0 ? u[0] : null), o?.(u), h && (j(!1), a?.());
|
|
49
49
|
},
|
|
50
50
|
[o, h, a]
|
|
51
|
-
),
|
|
52
|
-
|
|
51
|
+
), G = Z(() => {
|
|
52
|
+
j(!1), a?.();
|
|
53
53
|
}, [a]), F = Je(
|
|
54
54
|
() => ({
|
|
55
55
|
opened: v,
|
|
56
|
-
onClose:
|
|
57
|
-
onSelect:
|
|
56
|
+
onClose: G,
|
|
57
|
+
onSelect: z,
|
|
58
58
|
onSelectMultiple: w,
|
|
59
59
|
selectionMode: i,
|
|
60
|
-
initialSelectedItems: i === "multiple" ?
|
|
60
|
+
initialSelectedItems: i === "multiple" ? _ : l ? [l] : void 0
|
|
61
61
|
}),
|
|
62
|
-
[v,
|
|
62
|
+
[v, G, z, w, i, l, _]
|
|
63
63
|
);
|
|
64
64
|
return {
|
|
65
65
|
// Estado
|
|
66
66
|
opened: v,
|
|
67
67
|
selectedItem: l,
|
|
68
|
-
selectedItems:
|
|
68
|
+
selectedItems: _,
|
|
69
69
|
// Ações
|
|
70
70
|
open: C,
|
|
71
71
|
close: b,
|
|
72
72
|
clear: m,
|
|
73
|
-
setSelectedItem:
|
|
74
|
-
setSelectedItems:
|
|
73
|
+
setSelectedItem: c,
|
|
74
|
+
setSelectedItems: D,
|
|
75
75
|
// Handlers
|
|
76
|
-
handleSelect:
|
|
76
|
+
handleSelect: z,
|
|
77
77
|
handleSelectMultiple: w,
|
|
78
|
-
handleClose:
|
|
78
|
+
handleClose: G,
|
|
79
79
|
// Props para template
|
|
80
80
|
lookupProps: F
|
|
81
81
|
};
|
|
@@ -89,10 +89,10 @@ const K = ({
|
|
|
89
89
|
onClick: i,
|
|
90
90
|
...h
|
|
91
91
|
}) => {
|
|
92
|
-
const
|
|
92
|
+
const x = Ue();
|
|
93
93
|
return tt.useEffect(() => {
|
|
94
|
-
n && t && r &&
|
|
95
|
-
}, [t, r, n,
|
|
94
|
+
n && t && r && x.isAvailable && x.registerAction();
|
|
95
|
+
}, [t, r, n, x.isAvailable, x.registerAction]), !t || !x.isAvailable ? /* @__PURE__ */ e(Oe, { onClick: i, ...h, children: o }) : x.hasPermission() ? /* @__PURE__ */ e(Oe, { onClick: i, ...h, children: o }) : /* @__PURE__ */ e(qe, { children: f });
|
|
96
96
|
}, Pr = ({
|
|
97
97
|
actionName: t,
|
|
98
98
|
actionDescription: r,
|
|
@@ -101,13 +101,13 @@ const K = ({
|
|
|
101
101
|
onClick: n,
|
|
102
102
|
...i
|
|
103
103
|
}) => {
|
|
104
|
-
const [h,
|
|
104
|
+
const [h, x] = tt.useState(null), [a, v] = tt.useState(!1);
|
|
105
105
|
return tt.useEffect(() => {
|
|
106
106
|
if (!t) {
|
|
107
|
-
|
|
107
|
+
x(/* @__PURE__ */ e(Oe, { onClick: n, ...i, children: o }));
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
|
-
v(!1),
|
|
110
|
+
v(!1), x(/* @__PURE__ */ e(Oe, { onClick: n, ...i, children: o }));
|
|
111
111
|
}, [t, r, o, f, i]), /* @__PURE__ */ e(qe, { children: h });
|
|
112
112
|
}, He = ({
|
|
113
113
|
children: t
|
|
@@ -124,91 +124,91 @@ function Gr({
|
|
|
124
124
|
isCanceling: n = !1,
|
|
125
125
|
isSaving: i = !1,
|
|
126
126
|
isLoading: h = !1,
|
|
127
|
-
error:
|
|
127
|
+
error: x = "",
|
|
128
128
|
clearError: a = () => {
|
|
129
129
|
},
|
|
130
130
|
autoCloseAlertError: v = 15e3,
|
|
131
|
-
width:
|
|
131
|
+
width: j = "100%",
|
|
132
132
|
height: l = "100%",
|
|
133
|
-
withBorder:
|
|
134
|
-
children:
|
|
135
|
-
radius:
|
|
133
|
+
withBorder: c = !0,
|
|
134
|
+
children: _,
|
|
135
|
+
radius: D,
|
|
136
136
|
variant: C,
|
|
137
137
|
buttonsPosition: b = "footer",
|
|
138
138
|
saveLabel: m,
|
|
139
|
-
cancelLabel:
|
|
139
|
+
cancelLabel: z,
|
|
140
140
|
onBack: w,
|
|
141
|
-
footerAlign:
|
|
141
|
+
footerAlign: G = "left",
|
|
142
142
|
footerContent: F,
|
|
143
143
|
dataSource: u,
|
|
144
144
|
onSave: X,
|
|
145
145
|
onCancel: ee,
|
|
146
146
|
onBeforeSave: ae,
|
|
147
147
|
onAfterSave: Q,
|
|
148
|
-
onBeforeCancel:
|
|
149
|
-
onAfterCancel:
|
|
148
|
+
onBeforeCancel: M,
|
|
149
|
+
onAfterCancel: q,
|
|
150
150
|
onError: R,
|
|
151
|
-
routePath:
|
|
151
|
+
routePath: k,
|
|
152
152
|
onBeforeClose: le,
|
|
153
153
|
useNavigationListener: E,
|
|
154
154
|
// Props de segurança (opcionais)
|
|
155
155
|
resourceName: te,
|
|
156
156
|
resourceDescription: ue,
|
|
157
157
|
requiredPermissions: re,
|
|
158
|
-
fallbackComponent:
|
|
159
|
-
securityOptions:
|
|
160
|
-
...
|
|
158
|
+
fallbackComponent: J,
|
|
159
|
+
securityOptions: U,
|
|
160
|
+
...W
|
|
161
161
|
}) {
|
|
162
|
-
const
|
|
162
|
+
const O = Me(), [Y, se] = H(f), [we, ne] = H(x), d = dt();
|
|
163
163
|
Ue({
|
|
164
|
-
autoRegisterActions:
|
|
164
|
+
autoRegisterActions: U?.autoRegisterActions ?? !0
|
|
165
165
|
});
|
|
166
|
-
const
|
|
166
|
+
const $ = We(
|
|
167
167
|
"ArchbaseFormTemplate",
|
|
168
168
|
u,
|
|
169
169
|
void 0,
|
|
170
170
|
void 0
|
|
171
|
-
);
|
|
171
|
+
), N = Pt();
|
|
172
172
|
it({
|
|
173
173
|
dataSource: u,
|
|
174
|
-
listener: (
|
|
175
|
-
|
|
174
|
+
listener: (T) => {
|
|
175
|
+
T.type === be.onError && (se(!0), ne(T.error)), T.type === be.onFieldError && N && T.fieldName && T.error && N.setError(T.fieldName, T.error), (T.type === be.afterEdit || T.type === be.afterInsert) && ($.isDataSourceV2 || d());
|
|
176
176
|
}
|
|
177
177
|
});
|
|
178
|
-
const
|
|
178
|
+
const Fe = Z((T, S) => ({
|
|
179
179
|
closeAllowed: ($e) => {
|
|
180
180
|
}
|
|
181
|
-
}), []), he = E ||
|
|
182
|
-
le && le() === !1 ||
|
|
183
|
-
}), fe = async (
|
|
181
|
+
}), []), he = E || Fe, { closeAllowed: B } = he(k || "", () => {
|
|
182
|
+
le && le() === !1 || B();
|
|
183
|
+
}), fe = async (T) => {
|
|
184
184
|
try {
|
|
185
|
-
X ? X(
|
|
186
|
-
|
|
187
|
-
}).catch((
|
|
188
|
-
R && R(xe(
|
|
185
|
+
X ? X(T) : (ae && await ae(T), u.isBrowsing() || u.save().then(() => {
|
|
186
|
+
N?.clearAll(), Q && Q(T), E && B();
|
|
187
|
+
}).catch((S) => {
|
|
188
|
+
R && R(xe(S)), se(!0), ne(xe(S));
|
|
189
189
|
}));
|
|
190
|
-
} catch (
|
|
191
|
-
R && R(xe(
|
|
190
|
+
} catch (S) {
|
|
191
|
+
R && R(xe(S)), se(!0), ne(xe(S));
|
|
192
192
|
}
|
|
193
|
-
},
|
|
193
|
+
}, Ae = () => {
|
|
194
194
|
try {
|
|
195
|
-
ee ? ee.length > 0 ? ee(
|
|
196
|
-
} catch (
|
|
197
|
-
R && R(xe(
|
|
195
|
+
ee ? ee.length > 0 ? ee(B) : ee() : (M && M(), u.isBrowsing() || u.cancel(), N?.clearAll(), q && q(), E && B());
|
|
196
|
+
} catch (T) {
|
|
197
|
+
R && R(xe(T)), se(!0), ne(xe(T));
|
|
198
198
|
}
|
|
199
|
-
},
|
|
200
|
-
a && a(),
|
|
201
|
-
}, Pe = u && !u.isBrowsing(),
|
|
199
|
+
}, Re = () => {
|
|
200
|
+
a && a(), se(!1), ne("");
|
|
201
|
+
}, Pe = u && !u.isBrowsing(), ce = b === "header" || b === "both", L = b === "footer" || b === "both", de = () => /* @__PURE__ */ e(oe, { gap: "sm", children: Pe ? /* @__PURE__ */ s(qe, { children: [
|
|
202
202
|
/* @__PURE__ */ e(
|
|
203
203
|
K,
|
|
204
204
|
{
|
|
205
205
|
actionName: "cancel",
|
|
206
206
|
actionDescription: "Cancelar operação",
|
|
207
207
|
leftSection: /* @__PURE__ */ e(ze, { size: 16 }),
|
|
208
|
-
onClick:
|
|
208
|
+
onClick: Ae,
|
|
209
209
|
variant: "default",
|
|
210
210
|
loading: n,
|
|
211
|
-
children:
|
|
211
|
+
children: z || g().t("Cancel")
|
|
212
212
|
}
|
|
213
213
|
),
|
|
214
214
|
/* @__PURE__ */ e(
|
|
@@ -216,9 +216,9 @@ function Gr({
|
|
|
216
216
|
{
|
|
217
217
|
actionName: "save",
|
|
218
218
|
actionDescription: `Salvar ${ue || "registro"}`,
|
|
219
|
-
leftSection: /* @__PURE__ */ e(
|
|
219
|
+
leftSection: /* @__PURE__ */ e(vt, { size: 16 }),
|
|
220
220
|
onClick: () => fe(u.getCurrentRecord()),
|
|
221
|
-
variant: C ??
|
|
221
|
+
variant: C ?? O.variant,
|
|
222
222
|
color: "blue",
|
|
223
223
|
loading: i,
|
|
224
224
|
children: m || g().t("Ok")
|
|
@@ -230,33 +230,33 @@ function Gr({
|
|
|
230
230
|
actionName: "close",
|
|
231
231
|
actionDescription: "Fechar formulário",
|
|
232
232
|
leftSection: /* @__PURE__ */ e(ze, { size: 16 }),
|
|
233
|
-
onClick:
|
|
233
|
+
onClick: Ae,
|
|
234
234
|
variant: "default",
|
|
235
235
|
children: g().t("Close")
|
|
236
236
|
}
|
|
237
|
-
) }), Ge = () => /* @__PURE__ */
|
|
237
|
+
) }), Ge = () => /* @__PURE__ */ s(
|
|
238
238
|
pe,
|
|
239
239
|
{
|
|
240
240
|
style: {
|
|
241
241
|
flexShrink: 0,
|
|
242
242
|
padding: "calc(0.625rem / 2)",
|
|
243
243
|
display: "flex",
|
|
244
|
-
justifyContent:
|
|
244
|
+
justifyContent: G === "center" ? "center" : "space-between",
|
|
245
245
|
alignItems: "center",
|
|
246
246
|
gap: "1rem"
|
|
247
247
|
},
|
|
248
248
|
children: [
|
|
249
|
-
|
|
250
|
-
Pe ? /* @__PURE__ */
|
|
249
|
+
G === "right" && F && /* @__PURE__ */ e(pe, { style: { flex: 1 }, children: F }),
|
|
250
|
+
Pe ? /* @__PURE__ */ s(oe, { gap: "md", children: [
|
|
251
251
|
/* @__PURE__ */ e(
|
|
252
252
|
K,
|
|
253
253
|
{
|
|
254
254
|
actionName: "save",
|
|
255
255
|
actionDescription: `Salvar ${ue || "registro"}`,
|
|
256
|
-
leftSection: /* @__PURE__ */ e(
|
|
256
|
+
leftSection: /* @__PURE__ */ e(vt, {}),
|
|
257
257
|
onClick: () => fe(u.getCurrentRecord()),
|
|
258
258
|
disabled: u && u.isBrowsing(),
|
|
259
|
-
variant: C ??
|
|
259
|
+
variant: C ?? O.variant,
|
|
260
260
|
color: "green",
|
|
261
261
|
children: m || `${g().t("Ok")}`
|
|
262
262
|
}
|
|
@@ -267,11 +267,11 @@ function Gr({
|
|
|
267
267
|
actionName: "cancel",
|
|
268
268
|
actionDescription: "Cancelar operação",
|
|
269
269
|
leftSection: /* @__PURE__ */ e(ze, {}),
|
|
270
|
-
onClick:
|
|
270
|
+
onClick: Ae,
|
|
271
271
|
disabled: u && u.isBrowsing(),
|
|
272
|
-
variant: C ??
|
|
272
|
+
variant: C ?? O.variant,
|
|
273
273
|
color: "red",
|
|
274
|
-
children:
|
|
274
|
+
children: z || `${g().t("Cancel")}`
|
|
275
275
|
}
|
|
276
276
|
)
|
|
277
277
|
] }) : /* @__PURE__ */ e(oe, { gap: "md", children: /* @__PURE__ */ e(
|
|
@@ -280,12 +280,12 @@ function Gr({
|
|
|
280
280
|
actionName: "close",
|
|
281
281
|
actionDescription: "Fechar formulário",
|
|
282
282
|
leftSection: /* @__PURE__ */ e(ze, {}),
|
|
283
|
-
onClick:
|
|
284
|
-
variant: C ??
|
|
283
|
+
onClick: Ae,
|
|
284
|
+
variant: C ?? O.variant,
|
|
285
285
|
children: `${g().t("Close")}`
|
|
286
286
|
}
|
|
287
287
|
) }),
|
|
288
|
-
(
|
|
288
|
+
(G === "left" || G === "center") && F && /* @__PURE__ */ e(pe, { style: { flex: G === "left" ? 1 : 0, textAlign: "right" }, children: F })
|
|
289
289
|
]
|
|
290
290
|
}
|
|
291
291
|
);
|
|
@@ -295,24 +295,24 @@ function Gr({
|
|
|
295
295
|
resourceName: te,
|
|
296
296
|
resourceDescription: ue,
|
|
297
297
|
requiredPermissions: re,
|
|
298
|
-
fallbackComponent:
|
|
299
|
-
onSecurityReady:
|
|
300
|
-
onAccessDenied:
|
|
301
|
-
children: /* @__PURE__ */ e(Et, { children: /* @__PURE__ */
|
|
298
|
+
fallbackComponent: J,
|
|
299
|
+
onSecurityReady: U?.onSecurityReady,
|
|
300
|
+
onAccessDenied: U?.onAccessDenied,
|
|
301
|
+
children: /* @__PURE__ */ e(Et, { children: /* @__PURE__ */ s(
|
|
302
302
|
_e,
|
|
303
303
|
{
|
|
304
304
|
ref: t,
|
|
305
|
-
withBorder:
|
|
306
|
-
radius:
|
|
305
|
+
withBorder: c,
|
|
306
|
+
radius: D,
|
|
307
307
|
style: {
|
|
308
|
-
width:
|
|
308
|
+
width: j,
|
|
309
309
|
height: l,
|
|
310
310
|
display: "flex",
|
|
311
311
|
flexDirection: "column",
|
|
312
|
-
padding:
|
|
312
|
+
padding: ce ? 0 : 4
|
|
313
313
|
},
|
|
314
314
|
children: [
|
|
315
|
-
|
|
315
|
+
ce && /* @__PURE__ */ e(
|
|
316
316
|
pe,
|
|
317
317
|
{
|
|
318
318
|
style: {
|
|
@@ -320,10 +320,10 @@ function Gr({
|
|
|
320
320
|
padding: "16px 24px",
|
|
321
321
|
borderBottom: "1px solid var(--mantine-color-gray-2)"
|
|
322
322
|
},
|
|
323
|
-
children: /* @__PURE__ */
|
|
324
|
-
/* @__PURE__ */
|
|
323
|
+
children: /* @__PURE__ */ s(ve, { justify: "space-between", align: "center", children: [
|
|
324
|
+
/* @__PURE__ */ s(oe, { gap: "md", children: [
|
|
325
325
|
w && /* @__PURE__ */ e(
|
|
326
|
-
|
|
326
|
+
yt,
|
|
327
327
|
{
|
|
328
328
|
variant: "subtle",
|
|
329
329
|
color: "gray",
|
|
@@ -333,16 +333,16 @@ function Gr({
|
|
|
333
333
|
children: /* @__PURE__ */ e(Vt, { size: 18 })
|
|
334
334
|
}
|
|
335
335
|
),
|
|
336
|
-
(r || o) && /* @__PURE__ */
|
|
336
|
+
(r || o) && /* @__PURE__ */ s(pe, { children: [
|
|
337
337
|
r && /* @__PURE__ */ e(Bt, { order: 4, fw: 600, children: r }),
|
|
338
|
-
o && /* @__PURE__ */ e(
|
|
338
|
+
o && /* @__PURE__ */ e(Ee, { size: "sm", c: "dimmed", children: o })
|
|
339
339
|
] })
|
|
340
340
|
] }),
|
|
341
341
|
de()
|
|
342
342
|
] })
|
|
343
343
|
}
|
|
344
344
|
),
|
|
345
|
-
Y && /* @__PURE__ */ e(pe, { style: { flexShrink: 0, padding:
|
|
345
|
+
Y && /* @__PURE__ */ e(pe, { style: { flexShrink: 0, padding: ce ? "16px 24px 0" : void 0 }, children: /* @__PURE__ */ e(
|
|
346
346
|
Qe,
|
|
347
347
|
{
|
|
348
348
|
autoClose: v,
|
|
@@ -351,26 +351,26 @@ function Gr({
|
|
|
351
351
|
icon: /* @__PURE__ */ e(Ke, { size: "1.4rem" }),
|
|
352
352
|
title: g().t("WARNING"),
|
|
353
353
|
titleColor: "rgb(250, 82, 82)",
|
|
354
|
-
variant: C ??
|
|
355
|
-
onClose:
|
|
356
|
-
children: /* @__PURE__ */ e("span", { children:
|
|
354
|
+
variant: C ?? O.variant,
|
|
355
|
+
onClose: Re,
|
|
356
|
+
children: /* @__PURE__ */ e("span", { children: we })
|
|
357
357
|
}
|
|
358
358
|
) }),
|
|
359
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ s(
|
|
360
360
|
Ze,
|
|
361
361
|
{
|
|
362
362
|
style: {
|
|
363
363
|
flex: 1,
|
|
364
364
|
minHeight: 0,
|
|
365
|
-
padding:
|
|
365
|
+
padding: ce ? "24px" : "calc(0.625rem / 2)"
|
|
366
366
|
},
|
|
367
367
|
children: [
|
|
368
|
-
/* @__PURE__ */ e(
|
|
369
|
-
|
|
368
|
+
/* @__PURE__ */ e(Ct, { visible: h || n || i, opacity: 0.3 }),
|
|
369
|
+
_
|
|
370
370
|
]
|
|
371
371
|
}
|
|
372
372
|
),
|
|
373
|
-
|
|
373
|
+
L && Ge()
|
|
374
374
|
]
|
|
375
375
|
}
|
|
376
376
|
) })
|
|
@@ -385,20 +385,20 @@ function $r({
|
|
|
385
385
|
withCloseButton: n = !0,
|
|
386
386
|
closeButtonProps: i,
|
|
387
387
|
opened: h,
|
|
388
|
-
fullScreen:
|
|
388
|
+
fullScreen: x,
|
|
389
389
|
centered: a,
|
|
390
390
|
variant: v,
|
|
391
|
-
closeOnEscape:
|
|
391
|
+
closeOnEscape: j = !0,
|
|
392
392
|
size: l,
|
|
393
|
-
dataSource:
|
|
394
|
-
height:
|
|
395
|
-
userActions:
|
|
393
|
+
dataSource: c,
|
|
394
|
+
height: _,
|
|
395
|
+
userActions: D,
|
|
396
396
|
onAfterSave: C,
|
|
397
397
|
onClickOk: b,
|
|
398
398
|
onClickCancel: m,
|
|
399
|
-
onBeforeOk:
|
|
399
|
+
onBeforeOk: z,
|
|
400
400
|
onCustomSave: w,
|
|
401
|
-
isError:
|
|
401
|
+
isError: G,
|
|
402
402
|
error: F = "",
|
|
403
403
|
clearError: u = () => {
|
|
404
404
|
},
|
|
@@ -407,73 +407,73 @@ function $r({
|
|
|
407
407
|
loadingOverlayStyles: ae,
|
|
408
408
|
// Props de segurança (opcionais)
|
|
409
409
|
resourceName: Q,
|
|
410
|
-
resourceDescription:
|
|
411
|
-
requiredPermissions:
|
|
410
|
+
resourceDescription: M,
|
|
411
|
+
requiredPermissions: q,
|
|
412
412
|
fallbackComponent: R,
|
|
413
|
-
securityOptions:
|
|
413
|
+
securityOptions: k,
|
|
414
414
|
...le
|
|
415
415
|
}) {
|
|
416
|
-
const E = Me(), te = ut(), { colorScheme: ue } =
|
|
416
|
+
const E = Me(), te = ut(), { colorScheme: ue } = ct(), [re, J] = H(G), [U, W] = H(F), [O, Y] = H(!1), se = dt();
|
|
417
417
|
Ue({
|
|
418
|
-
resourceDescription:
|
|
419
|
-
autoRegisterActions:
|
|
418
|
+
resourceDescription: M || t?.toString(),
|
|
419
|
+
autoRegisterActions: k?.autoRegisterActions ?? !0
|
|
420
420
|
});
|
|
421
|
-
const
|
|
421
|
+
const we = We(
|
|
422
422
|
"ArchbaseFormModalTemplate",
|
|
423
|
-
|
|
423
|
+
c,
|
|
424
424
|
void 0,
|
|
425
425
|
void 0
|
|
426
426
|
);
|
|
427
427
|
it({
|
|
428
|
-
dataSource:
|
|
429
|
-
listener: (
|
|
430
|
-
|
|
428
|
+
dataSource: c,
|
|
429
|
+
listener: (B) => {
|
|
430
|
+
B.type === be.onError && (J(!0), W(B.error)), (B.type === be.afterEdit || B.type === be.afterInsert) && (we.isDataSourceV2 || se());
|
|
431
431
|
}
|
|
432
432
|
});
|
|
433
433
|
const ne = async () => {
|
|
434
|
-
if (
|
|
434
|
+
if (c && !c.isBrowsing())
|
|
435
435
|
try {
|
|
436
|
-
Y(!0), await
|
|
437
|
-
} catch (
|
|
438
|
-
return X && X(xe(
|
|
436
|
+
Y(!0), await c.save(), C && C(c.getCurrentRecord());
|
|
437
|
+
} catch (B) {
|
|
438
|
+
return X && X(xe(B)), J(!0), W(xe(B)), Y(!1), !1;
|
|
439
439
|
}
|
|
440
440
|
return Y(!1), !0;
|
|
441
441
|
}, d = () => {
|
|
442
|
-
if (
|
|
442
|
+
if (c && !c.isBrowsing())
|
|
443
443
|
try {
|
|
444
|
-
|
|
444
|
+
c.cancel();
|
|
445
445
|
} catch {
|
|
446
446
|
}
|
|
447
|
-
},
|
|
447
|
+
}, $ = async () => {
|
|
448
448
|
if (w)
|
|
449
|
-
|
|
449
|
+
c && w(c.getCurrentRecord(), () => {
|
|
450
450
|
b && b();
|
|
451
451
|
});
|
|
452
|
-
else if (
|
|
453
|
-
const
|
|
454
|
-
|
|
452
|
+
else if (z) {
|
|
453
|
+
const B = z(c.getCurrentRecord());
|
|
454
|
+
B instanceof Promise ? B.then(async () => {
|
|
455
455
|
await ne() && b && b();
|
|
456
456
|
}).catch((fe) => {
|
|
457
|
-
X && X(xe(fe)),
|
|
458
|
-
}) : (
|
|
457
|
+
X && X(xe(fe)), J(!0), W(xe(fe));
|
|
458
|
+
}) : (B === !0 || B === void 0) && await ne() && b && b();
|
|
459
459
|
} else
|
|
460
460
|
await ne() && b && b();
|
|
461
|
-
},
|
|
461
|
+
}, N = () => {
|
|
462
462
|
d(), m && m();
|
|
463
|
-
},
|
|
463
|
+
}, Fe = () => {
|
|
464
464
|
St.showWarning(g().t("archbase:Click on Ok or Cancel to close"));
|
|
465
465
|
}, he = () => {
|
|
466
|
-
u && u(),
|
|
466
|
+
u && u(), J(!1), W("");
|
|
467
467
|
};
|
|
468
468
|
return /* @__PURE__ */ e(
|
|
469
469
|
He,
|
|
470
470
|
{
|
|
471
471
|
resourceName: Q,
|
|
472
|
-
resourceDescription:
|
|
473
|
-
requiredPermissions:
|
|
472
|
+
resourceDescription: M,
|
|
473
|
+
requiredPermissions: q,
|
|
474
474
|
fallbackComponent: R,
|
|
475
|
-
onSecurityReady:
|
|
476
|
-
onAccessDenied:
|
|
475
|
+
onSecurityReady: k?.onSecurityReady,
|
|
476
|
+
onAccessDenied: k?.onAccessDenied,
|
|
477
477
|
children: /* @__PURE__ */ e(
|
|
478
478
|
bt,
|
|
479
479
|
{
|
|
@@ -485,16 +485,16 @@ function $r({
|
|
|
485
485
|
},
|
|
486
486
|
withCloseButton: n,
|
|
487
487
|
closeButtonProps: i,
|
|
488
|
-
onClose:
|
|
488
|
+
onClose: Fe,
|
|
489
489
|
opened: h,
|
|
490
|
-
fullScreen:
|
|
490
|
+
fullScreen: x,
|
|
491
491
|
centered: a,
|
|
492
|
-
closeOnEscape:
|
|
492
|
+
closeOnEscape: j,
|
|
493
493
|
size: l,
|
|
494
494
|
...le,
|
|
495
|
-
children: /* @__PURE__ */
|
|
496
|
-
/* @__PURE__ */ e(
|
|
497
|
-
/* @__PURE__ */
|
|
495
|
+
children: /* @__PURE__ */ s(Et, { children: [
|
|
496
|
+
/* @__PURE__ */ e(Ct, { styles: ae, visible: O, opacity: 0.8 }),
|
|
497
|
+
/* @__PURE__ */ s(ht, { height: _, children: [
|
|
498
498
|
re ? /* @__PURE__ */ e(It, { size: "100px", children: /* @__PURE__ */ e(
|
|
499
499
|
Qe,
|
|
500
500
|
{
|
|
@@ -506,21 +506,21 @@ function $r({
|
|
|
506
506
|
titleColor: "rgb(250, 82, 82)",
|
|
507
507
|
variant: v ?? E.variant,
|
|
508
508
|
onClose: he,
|
|
509
|
-
children: /* @__PURE__ */ e("span", { children:
|
|
509
|
+
children: /* @__PURE__ */ e("span", { children: U })
|
|
510
510
|
}
|
|
511
511
|
) }) : null,
|
|
512
512
|
/* @__PURE__ */ e(ft, { children: /* @__PURE__ */ e(jt, { children: f }) }),
|
|
513
|
-
/* @__PURE__ */ e(mt, { size: "40px", children: /* @__PURE__ */
|
|
514
|
-
/* @__PURE__ */ e(oe, { children:
|
|
515
|
-
|
|
513
|
+
/* @__PURE__ */ e(mt, { size: "40px", children: /* @__PURE__ */ s(ve, { justify: "space-between", align: "center", children: [
|
|
514
|
+
/* @__PURE__ */ e(oe, { children: D }),
|
|
515
|
+
c && !c.isBrowsing() ? /* @__PURE__ */ s(oe, { gap: "md", children: [
|
|
516
516
|
/* @__PURE__ */ e(
|
|
517
517
|
K,
|
|
518
518
|
{
|
|
519
519
|
actionName: "save",
|
|
520
|
-
actionDescription: `Salvar ${
|
|
520
|
+
actionDescription: `Salvar ${M || t || "registro"}`,
|
|
521
521
|
leftSection: /* @__PURE__ */ e(et, {}),
|
|
522
|
-
onClick:
|
|
523
|
-
disabled:
|
|
522
|
+
onClick: $,
|
|
523
|
+
disabled: c && c.isBrowsing(),
|
|
524
524
|
variant: v ?? E.variant,
|
|
525
525
|
color: "green",
|
|
526
526
|
children: `${g().t("Ok")}`
|
|
@@ -532,8 +532,8 @@ function $r({
|
|
|
532
532
|
actionName: "cancel",
|
|
533
533
|
actionDescription: "Cancelar operação",
|
|
534
534
|
leftSection: /* @__PURE__ */ e(ze, {}),
|
|
535
|
-
onClick:
|
|
536
|
-
disabled:
|
|
535
|
+
onClick: N,
|
|
536
|
+
disabled: c && c.isBrowsing(),
|
|
537
537
|
variant: v ?? E.variant,
|
|
538
538
|
color: "red",
|
|
539
539
|
children: `${g().t("Cancel")}`
|
|
@@ -545,7 +545,7 @@ function $r({
|
|
|
545
545
|
actionName: "close",
|
|
546
546
|
actionDescription: "Fechar janela",
|
|
547
547
|
leftSection: /* @__PURE__ */ e(ze, {}),
|
|
548
|
-
onClick:
|
|
548
|
+
onClick: N,
|
|
549
549
|
variant: v ?? E.variant,
|
|
550
550
|
children: `${g().t("Close")}`
|
|
551
551
|
}
|
|
@@ -566,41 +566,41 @@ function Lr({
|
|
|
566
566
|
withCloseButton: n = !0,
|
|
567
567
|
closeButtonProps: i,
|
|
568
568
|
opened: h,
|
|
569
|
-
fullScreen:
|
|
569
|
+
fullScreen: x,
|
|
570
570
|
centered: a,
|
|
571
571
|
variant: v,
|
|
572
|
-
closeOnEscape:
|
|
572
|
+
closeOnEscape: j = !0,
|
|
573
573
|
size: l,
|
|
574
|
-
height:
|
|
575
|
-
onlyOkButton:
|
|
576
|
-
onClose:
|
|
574
|
+
height: c,
|
|
575
|
+
onlyOkButton: _ = !1,
|
|
576
|
+
onClose: D,
|
|
577
577
|
onClickOk: C,
|
|
578
578
|
onClickCancel: b,
|
|
579
579
|
userActions: m,
|
|
580
580
|
// Props de segurança (opcionais)
|
|
581
|
-
resourceName:
|
|
581
|
+
resourceName: z,
|
|
582
582
|
resourceDescription: w,
|
|
583
|
-
requiredPermissions:
|
|
583
|
+
requiredPermissions: G,
|
|
584
584
|
fallbackComponent: F,
|
|
585
585
|
securityOptions: u
|
|
586
586
|
}) {
|
|
587
|
-
const X = Me(), ee = ut(), { colorScheme: ae } =
|
|
587
|
+
const X = Me(), ee = ut(), { colorScheme: ae } = ct();
|
|
588
588
|
Ue({
|
|
589
589
|
autoRegisterActions: u?.autoRegisterActions ?? !0
|
|
590
590
|
});
|
|
591
591
|
const Q = () => {
|
|
592
|
-
C && C(),
|
|
593
|
-
},
|
|
594
|
-
b && b(),
|
|
595
|
-
},
|
|
592
|
+
C && C(), D();
|
|
593
|
+
}, M = () => {
|
|
594
|
+
b && b(), D();
|
|
595
|
+
}, q = () => {
|
|
596
596
|
St.showWarning(g().t("Click on Ok or Cancel to close"));
|
|
597
597
|
};
|
|
598
598
|
return /* @__PURE__ */ e(
|
|
599
599
|
He,
|
|
600
600
|
{
|
|
601
|
-
resourceName:
|
|
601
|
+
resourceName: z,
|
|
602
602
|
resourceDescription: w,
|
|
603
|
-
requiredPermissions:
|
|
603
|
+
requiredPermissions: G,
|
|
604
604
|
fallbackComponent: F,
|
|
605
605
|
onSecurityReady: u?.onSecurityReady,
|
|
606
606
|
onAccessDenied: u?.onAccessDenied,
|
|
@@ -615,17 +615,17 @@ function Lr({
|
|
|
615
615
|
},
|
|
616
616
|
withCloseButton: n,
|
|
617
617
|
closeButtonProps: i,
|
|
618
|
-
onClose:
|
|
618
|
+
onClose: q,
|
|
619
619
|
opened: h,
|
|
620
|
-
fullScreen:
|
|
620
|
+
fullScreen: x,
|
|
621
621
|
centered: a,
|
|
622
|
-
closeOnEscape:
|
|
622
|
+
closeOnEscape: j,
|
|
623
623
|
size: l,
|
|
624
|
-
children: /* @__PURE__ */
|
|
624
|
+
children: /* @__PURE__ */ s(ht, { height: c, children: [
|
|
625
625
|
/* @__PURE__ */ e(ft, { children: /* @__PURE__ */ e(jt, { children: f }) }),
|
|
626
|
-
/* @__PURE__ */ e(mt, { size: "40px", children: /* @__PURE__ */
|
|
626
|
+
/* @__PURE__ */ e(mt, { size: "40px", children: /* @__PURE__ */ s(ve, { justify: "space-between", align: "center", children: [
|
|
627
627
|
/* @__PURE__ */ e(oe, { children: m }),
|
|
628
|
-
/* @__PURE__ */
|
|
628
|
+
/* @__PURE__ */ s(oe, { gap: "md", children: [
|
|
629
629
|
/* @__PURE__ */ e(
|
|
630
630
|
K,
|
|
631
631
|
{
|
|
@@ -638,13 +638,13 @@ function Lr({
|
|
|
638
638
|
children: `${g().t("Ok")}`
|
|
639
639
|
}
|
|
640
640
|
),
|
|
641
|
-
|
|
641
|
+
_ ? null : /* @__PURE__ */ e(
|
|
642
642
|
K,
|
|
643
643
|
{
|
|
644
644
|
actionName: "cancel",
|
|
645
645
|
actionDescription: "Cancelar operação",
|
|
646
646
|
leftSection: /* @__PURE__ */ e(ze, {}),
|
|
647
|
-
onClick:
|
|
647
|
+
onClick: M,
|
|
648
648
|
variant: v ?? X.variant,
|
|
649
649
|
color: "red",
|
|
650
650
|
children: b ? `${g().t("Cancel")}` : `${g().t("Close")}`
|
|
@@ -676,20 +676,20 @@ function gr(t, r) {
|
|
|
676
676
|
dataSource: n,
|
|
677
677
|
filterOptions: i,
|
|
678
678
|
pageSize: h = 15,
|
|
679
|
-
pageIndex:
|
|
679
|
+
pageIndex: x = 0,
|
|
680
680
|
columns: a,
|
|
681
681
|
filterFields: v,
|
|
682
|
-
logoPrint:
|
|
682
|
+
logoPrint: j,
|
|
683
683
|
userActions: l,
|
|
684
|
-
userRowActions:
|
|
685
|
-
customRenderRowActions:
|
|
686
|
-
innerRef:
|
|
684
|
+
userRowActions: c,
|
|
685
|
+
customRenderRowActions: _,
|
|
686
|
+
innerRef: D,
|
|
687
687
|
isLoading: C = !1,
|
|
688
688
|
isLoadingFilter: b = !1,
|
|
689
689
|
isError: m = !1,
|
|
690
|
-
enableTopToolbar:
|
|
690
|
+
enableTopToolbar: z = !0,
|
|
691
691
|
enableTopToolbarActions: w = !0,
|
|
692
|
-
error:
|
|
692
|
+
error: G = "",
|
|
693
693
|
clearError: F = () => {
|
|
694
694
|
},
|
|
695
695
|
filterType: u,
|
|
@@ -697,44 +697,44 @@ function gr(t, r) {
|
|
|
697
697
|
height: ee = "100%",
|
|
698
698
|
onSearchByFilter: ae,
|
|
699
699
|
getRowId: Q,
|
|
700
|
-
withBorder:
|
|
701
|
-
filterPersistenceDelegator:
|
|
700
|
+
withBorder: M = !0,
|
|
701
|
+
filterPersistenceDelegator: q,
|
|
702
702
|
variant: R,
|
|
703
|
-
store:
|
|
703
|
+
store: k,
|
|
704
704
|
cellPadding: le,
|
|
705
705
|
bottomToolbarMinHeight: E,
|
|
706
706
|
enableRowSelection: te = !0,
|
|
707
707
|
enableRowNumbers: ue = !0,
|
|
708
708
|
enableRowActions: re = !0,
|
|
709
|
-
positionActionsColumn:
|
|
710
|
-
actionsColumnWidth:
|
|
711
|
-
tableHeadCellPadding:
|
|
712
|
-
renderDetailPanel:
|
|
709
|
+
positionActionsColumn: J = "first",
|
|
710
|
+
actionsColumnWidth: U,
|
|
711
|
+
tableHeadCellPadding: W,
|
|
712
|
+
renderDetailPanel: O,
|
|
713
713
|
renderTopToolbar: Y,
|
|
714
|
-
toolbarAlignment:
|
|
715
|
-
toolbarLeftContent:
|
|
714
|
+
toolbarAlignment: se = "right",
|
|
715
|
+
toolbarLeftContent: we,
|
|
716
716
|
onSelectedRowsChanged: ne,
|
|
717
717
|
onCellDoubleClick: d,
|
|
718
|
-
onFilterModelChange:
|
|
719
|
-
paginationLabels:
|
|
718
|
+
onFilterModelChange: $,
|
|
719
|
+
paginationLabels: N,
|
|
720
720
|
// Props de segurança (opcionais)
|
|
721
|
-
resourceName:
|
|
721
|
+
resourceName: Fe,
|
|
722
722
|
resourceDescription: he,
|
|
723
|
-
requiredPermissions:
|
|
723
|
+
requiredPermissions: B,
|
|
724
724
|
fallbackComponent: fe,
|
|
725
|
-
securityOptions:
|
|
725
|
+
securityOptions: Ae,
|
|
726
726
|
// Props para controle de bordas internas
|
|
727
|
-
withToolbarBorder:
|
|
727
|
+
withToolbarBorder: Re,
|
|
728
728
|
withPaginationBorder: Pe,
|
|
729
|
-
toolbarPadding:
|
|
730
|
-
paginationPadding:
|
|
729
|
+
toolbarPadding: ce,
|
|
730
|
+
paginationPadding: L,
|
|
731
731
|
rowHeight: de,
|
|
732
732
|
hideFooter: Ge = !0
|
|
733
|
-
} = t,
|
|
733
|
+
} = t, T = Ie(null), S = Ie(null);
|
|
734
734
|
ut();
|
|
735
|
-
const { colorScheme: $e } =
|
|
735
|
+
const { colorScheme: $e } = ct();
|
|
736
736
|
Ue({
|
|
737
|
-
autoRegisterActions:
|
|
737
|
+
autoRegisterActions: Ae?.autoRegisterActions ?? !0
|
|
738
738
|
});
|
|
739
739
|
const Le = We(
|
|
740
740
|
"ArchbaseGridTemplate",
|
|
@@ -744,82 +744,82 @@ function gr(t, r) {
|
|
|
744
744
|
);
|
|
745
745
|
Gt(r, () => ({
|
|
746
746
|
refreshData: () => {
|
|
747
|
-
|
|
747
|
+
S.current && S.current.refreshData();
|
|
748
748
|
},
|
|
749
|
-
getSelectedRows: () =>
|
|
749
|
+
getSelectedRows: () => S.current ? S.current.getSelectedRows() : [],
|
|
750
750
|
clearSelection: () => {
|
|
751
|
-
|
|
751
|
+
S.current && S.current.clearSelection();
|
|
752
752
|
},
|
|
753
753
|
exportData: () => {
|
|
754
|
-
|
|
754
|
+
S.current && S.current.exportData();
|
|
755
755
|
},
|
|
756
756
|
printData: () => {
|
|
757
|
-
|
|
757
|
+
S.current && S.current.printData();
|
|
758
758
|
},
|
|
759
|
-
getDataGridRef: () =>
|
|
760
|
-
getFilterModel: () =>
|
|
761
|
-
}), [
|
|
762
|
-
const [
|
|
759
|
+
getDataGridRef: () => S,
|
|
760
|
+
getFilterModel: () => S.current ? S.current.getFilterModel() : { items: [], quickFilterValues: [] }
|
|
761
|
+
}), [S]);
|
|
762
|
+
const [y, V] = H({
|
|
763
763
|
activeFilterIndex: -1,
|
|
764
764
|
currentFilter: void 0,
|
|
765
765
|
expandedFilter: !1
|
|
766
766
|
});
|
|
767
767
|
rt(() => {
|
|
768
|
-
const
|
|
769
|
-
|
|
768
|
+
const I = mr(i, k, q);
|
|
769
|
+
V(I);
|
|
770
770
|
}, [b]);
|
|
771
|
-
const ke = (
|
|
772
|
-
if (
|
|
773
|
-
return
|
|
774
|
-
if (!
|
|
771
|
+
const ke = (I) => {
|
|
772
|
+
if (_)
|
|
773
|
+
return _(I);
|
|
774
|
+
if (!c || !c.actions)
|
|
775
775
|
return;
|
|
776
|
-
const Te =
|
|
776
|
+
const Te = c.actions;
|
|
777
777
|
return /* @__PURE__ */ e(
|
|
778
778
|
Te,
|
|
779
779
|
{
|
|
780
|
-
onEditRow:
|
|
781
|
-
onRemoveRow:
|
|
782
|
-
onViewRow:
|
|
783
|
-
row:
|
|
780
|
+
onEditRow: c.onEditRow ? (ye) => c.onEditRow && c.onEditRow(ye) : void 0,
|
|
781
|
+
onRemoveRow: c.onRemoveRow ? (ye) => c.onRemoveRow && c.onRemoveRow(ye) : void 0,
|
|
782
|
+
onViewRow: c.onViewRow ? (ye) => c.onViewRow && c.onViewRow(ye) : void 0,
|
|
783
|
+
row: I,
|
|
784
784
|
variant: R ?? me.variant
|
|
785
785
|
}
|
|
786
786
|
);
|
|
787
|
-
}, me = Me(), Be =
|
|
787
|
+
}, me = Me(), Be = Ie(null), De = m ? !1 : C, ge = Je(() => we, [we]);
|
|
788
788
|
tt.useEffect(() => {
|
|
789
|
-
|
|
790
|
-
}, [
|
|
791
|
-
const lt = (
|
|
792
|
-
const
|
|
793
|
-
|
|
794
|
-
}, ie = (
|
|
795
|
-
const Te = { ...
|
|
796
|
-
|
|
797
|
-
},
|
|
798
|
-
const
|
|
799
|
-
|
|
800
|
-
},
|
|
801
|
-
if (
|
|
789
|
+
D && D.current !== Be.current && D.current && Be.current && (D.current = Be.current);
|
|
790
|
+
}, [D]);
|
|
791
|
+
const lt = (I, Te) => {
|
|
792
|
+
const ye = { ...y, currentFilter: I, activeFilterIndex: Te };
|
|
793
|
+
V(ye), k && i && k?.setValue(`${i.viewName}_${i.componentName}`, ye);
|
|
794
|
+
}, ie = (I) => {
|
|
795
|
+
const Te = { ...y, expandedFilter: I };
|
|
796
|
+
V(Te), k && i && k?.setValue(`${i.viewName}_${i.componentName}`, Te);
|
|
797
|
+
}, p = (I, Te) => {
|
|
798
|
+
const ye = { ...y, currentFilter: I, activeFilterIndex: Te };
|
|
799
|
+
V(ye), k && i && k?.setValue(`${i.viewName}_${i.componentName}`, ye);
|
|
800
|
+
}, Ce = () => {
|
|
801
|
+
if (y.currentFilter)
|
|
802
802
|
if (ae)
|
|
803
803
|
ae();
|
|
804
|
-
else if (
|
|
805
|
-
const
|
|
806
|
-
|
|
807
|
-
search:
|
|
808
|
-
fields:
|
|
809
|
-
}),
|
|
804
|
+
else if (y.currentFilter.filter.filterType === "quick") {
|
|
805
|
+
const I = n.getOptions();
|
|
806
|
+
y.currentFilter.filter.quickFilterText && y.currentFilter.filter.quickFilterText !== "" ? (I.filter = JSON.stringify({
|
|
807
|
+
search: y.currentFilter.filter.quickFilterText,
|
|
808
|
+
fields: y.currentFilter.filter.quickFilterFieldsText
|
|
809
|
+
}), I.sort = y.currentFilter.sort.quickFilterSort ? y.currentFilter.sort.quickFilterSort.split(",") : []) : (I.filter = void 0, I.sort = void 0), n.refreshData(I), Le.isDataSourceV2 || Le.v1State.forceUpdate();
|
|
810
810
|
} else {
|
|
811
|
-
const
|
|
812
|
-
if (
|
|
813
|
-
const Te = Yt(
|
|
814
|
-
|
|
811
|
+
const I = dr(y.currentFilter);
|
|
812
|
+
if (I && I.expressionNode) {
|
|
813
|
+
const Te = Yt(I.expressionNode), ye = n.getOptions();
|
|
814
|
+
ye.filter = Te, ye.sort = I?.sortStrings, n.refreshData(ye), Le.isDataSourceV2 || Le.v1State.forceUpdate();
|
|
815
815
|
}
|
|
816
816
|
}
|
|
817
817
|
};
|
|
818
818
|
let Ne, je;
|
|
819
|
-
const gt = (
|
|
820
|
-
Ne =
|
|
821
|
-
}, Xe = (
|
|
822
|
-
je =
|
|
819
|
+
const gt = (I) => {
|
|
820
|
+
Ne = I;
|
|
821
|
+
}, Xe = (I) => {
|
|
822
|
+
je = I;
|
|
823
823
|
}, pt = () => {
|
|
824
824
|
je && je();
|
|
825
825
|
}, xt = () => {
|
|
@@ -830,15 +830,15 @@ function gr(t, r) {
|
|
|
830
830
|
id: i?.componentName,
|
|
831
831
|
viewName: i?.viewName,
|
|
832
832
|
apiVersion: i?.apiVersion,
|
|
833
|
-
ref:
|
|
833
|
+
ref: T,
|
|
834
834
|
variant: R ?? me.variant,
|
|
835
|
-
expandedFilter:
|
|
836
|
-
persistenceDelegator:
|
|
837
|
-
currentFilter:
|
|
838
|
-
activeFilterIndex:
|
|
839
|
-
onSelectedFilter:
|
|
835
|
+
expandedFilter: y.expandedFilter,
|
|
836
|
+
persistenceDelegator: q,
|
|
837
|
+
currentFilter: y.currentFilter,
|
|
838
|
+
activeFilterIndex: y.activeFilterIndex,
|
|
839
|
+
onSelectedFilter: p,
|
|
840
840
|
onFilterChanged: lt,
|
|
841
|
-
onSearchByFilter:
|
|
841
|
+
onSearchByFilter: Ce,
|
|
842
842
|
onToggleExpandedFilter: ie,
|
|
843
843
|
onExport: pt,
|
|
844
844
|
onPrint: xt,
|
|
@@ -852,13 +852,13 @@ function gr(t, r) {
|
|
|
852
852
|
return /* @__PURE__ */ e(
|
|
853
853
|
He,
|
|
854
854
|
{
|
|
855
|
-
resourceName:
|
|
855
|
+
resourceName: Fe,
|
|
856
856
|
resourceDescription: he,
|
|
857
|
-
requiredPermissions:
|
|
857
|
+
requiredPermissions: B,
|
|
858
858
|
fallbackComponent: fe,
|
|
859
|
-
onSecurityReady:
|
|
860
|
-
onAccessDenied:
|
|
861
|
-
children: /* @__PURE__ */
|
|
859
|
+
onSecurityReady: Ae?.onSecurityReady,
|
|
860
|
+
onAccessDenied: Ae?.onAccessDenied,
|
|
861
|
+
children: /* @__PURE__ */ s(_e, { withBorder: M, ref: Be, style: { height: "100%" }, children: [
|
|
862
862
|
m ? /* @__PURE__ */ e(
|
|
863
863
|
Qe,
|
|
864
864
|
{
|
|
@@ -870,15 +870,15 @@ function gr(t, r) {
|
|
|
870
870
|
titleColor: "rgb(250, 82, 82)",
|
|
871
871
|
variant: R ?? me.variant,
|
|
872
872
|
onClose: () => F && F(),
|
|
873
|
-
children: /* @__PURE__ */ e("span", { children:
|
|
873
|
+
children: /* @__PURE__ */ e("span", { children: G })
|
|
874
874
|
}
|
|
875
875
|
) : null,
|
|
876
|
-
/* @__PURE__ */
|
|
876
|
+
/* @__PURE__ */ s(
|
|
877
877
|
Lt,
|
|
878
878
|
{
|
|
879
|
-
gridRef:
|
|
879
|
+
gridRef: S,
|
|
880
880
|
printTitle: f || o,
|
|
881
|
-
logoPrint:
|
|
881
|
+
logoPrint: j,
|
|
882
882
|
width: X,
|
|
883
883
|
height: ee,
|
|
884
884
|
withBorder: !1,
|
|
@@ -887,13 +887,13 @@ function gr(t, r) {
|
|
|
887
887
|
enableRowNumbers: ue,
|
|
888
888
|
enableRowSelection: te,
|
|
889
889
|
enableRowActions: re,
|
|
890
|
-
enableTopToolbar:
|
|
890
|
+
enableTopToolbar: z,
|
|
891
891
|
enableTopToolbarActions: w,
|
|
892
892
|
manualPagination: !0,
|
|
893
893
|
manualSorting: !0,
|
|
894
894
|
isLoading: De,
|
|
895
895
|
pageSize: h,
|
|
896
|
-
pageIndex:
|
|
896
|
+
pageIndex: x,
|
|
897
897
|
allowColumnFilters: u !== "none",
|
|
898
898
|
enableGlobalFilter: u !== "none",
|
|
899
899
|
renderToolbarInternalActions: u == "none" ? () => /* @__PURE__ */ e("div", {}) : void 0,
|
|
@@ -901,34 +901,34 @@ function gr(t, r) {
|
|
|
901
901
|
allowPrintData: !0,
|
|
902
902
|
onSelectedRowsChanged: ne,
|
|
903
903
|
onCellDoubleClick: d,
|
|
904
|
-
onFilterModelChange:
|
|
904
|
+
onFilterModelChange: $,
|
|
905
905
|
renderRowActions: re ? ke : void 0,
|
|
906
|
-
positionActionsColumn:
|
|
907
|
-
actionsColumnWidth:
|
|
908
|
-
toolbarAlignment:
|
|
906
|
+
positionActionsColumn: J,
|
|
907
|
+
actionsColumnWidth: U,
|
|
908
|
+
toolbarAlignment: se,
|
|
909
909
|
toolbarLeftContent: ge,
|
|
910
910
|
renderToolbarActions: u === "advanced" || u === "none" ? Ye : void 0,
|
|
911
|
-
paginationLabels:
|
|
911
|
+
paginationLabels: N,
|
|
912
912
|
cellPadding: le,
|
|
913
913
|
bottomToolbarMinHeight: E,
|
|
914
|
-
tableHeadCellPadding:
|
|
914
|
+
tableHeadCellPadding: W,
|
|
915
915
|
getRowId: Q,
|
|
916
|
-
renderDetailPanel:
|
|
916
|
+
renderDetailPanel: O ? ({ row: I }) => O({ row: I }) : void 0,
|
|
917
917
|
renderTopToolbar: Y,
|
|
918
918
|
onExport: Xe,
|
|
919
919
|
onPrint: gt,
|
|
920
920
|
variant: R,
|
|
921
|
-
withToolbarBorder:
|
|
921
|
+
withToolbarBorder: Re,
|
|
922
922
|
withPaginationBorder: Pe,
|
|
923
|
-
toolbarPadding:
|
|
924
|
-
paginationPadding:
|
|
923
|
+
toolbarPadding: ce,
|
|
924
|
+
paginationPadding: L,
|
|
925
925
|
rowHeight: de,
|
|
926
926
|
hideFooter: Ge,
|
|
927
927
|
children: [
|
|
928
928
|
a,
|
|
929
|
-
l?.visible ? /* @__PURE__ */ e(ir, { children: /* @__PURE__ */
|
|
929
|
+
l?.visible ? /* @__PURE__ */ e(ir, { children: /* @__PURE__ */ s(qe, { children: [
|
|
930
930
|
/* @__PURE__ */ e("h3", { className: "only-print", children: f || o }),
|
|
931
|
-
/* @__PURE__ */ e("div", { className: "no-print", children: /* @__PURE__ */
|
|
931
|
+
/* @__PURE__ */ e("div", { className: "no-print", children: /* @__PURE__ */ s(ve, { gap: "8px", rowGap: "8px", children: [
|
|
932
932
|
l.customUserActions && l.customUserActionsPosition === "left" ? l.customUserActions : null,
|
|
933
933
|
l.onAddExecute ? /* @__PURE__ */ e(
|
|
934
934
|
K,
|
|
@@ -995,9 +995,9 @@ const jr = zt(gr);
|
|
|
995
995
|
function pr(t, r, o, f) {
|
|
996
996
|
if (t && t.headerGridColumns) {
|
|
997
997
|
const n = t.headerGridColumns.left ? t.headerGridColumns.left : { xs: "auto", sm: "auto", md: "auto", lg: "auto" }, i = t.headerGridColumns.middle ? t.headerGridColumns.middle : { xs: "auto", sm: "auto", md: "auto", lg: "auto" }, h = t.headerGridColumns.right ? t.headerGridColumns.right : { xs: "auto", sm: "auto", md: "auto", lg: "auto" };
|
|
998
|
-
return /* @__PURE__ */
|
|
998
|
+
return /* @__PURE__ */ s(Se, { m: 0, gap: "xs", justify: "center", align: "center", grow: !0, children: [
|
|
999
999
|
/* @__PURE__ */ e(
|
|
1000
|
-
|
|
1000
|
+
Se.Col,
|
|
1001
1001
|
{
|
|
1002
1002
|
span: {
|
|
1003
1003
|
xs: n.xs,
|
|
@@ -1015,7 +1015,7 @@ function pr(t, r, o, f) {
|
|
|
1015
1015
|
}
|
|
1016
1016
|
),
|
|
1017
1017
|
/* @__PURE__ */ e(
|
|
1018
|
-
|
|
1018
|
+
Se.Col,
|
|
1019
1019
|
{
|
|
1020
1020
|
span: {
|
|
1021
1021
|
xs: i.xs,
|
|
@@ -1032,7 +1032,7 @@ function pr(t, r, o, f) {
|
|
|
1032
1032
|
}
|
|
1033
1033
|
),
|
|
1034
1034
|
/* @__PURE__ */ e(
|
|
1035
|
-
|
|
1035
|
+
Se.Col,
|
|
1036
1036
|
{
|
|
1037
1037
|
span: {
|
|
1038
1038
|
xs: h.xs,
|
|
@@ -1052,9 +1052,9 @@ function pr(t, r, o, f) {
|
|
|
1052
1052
|
] });
|
|
1053
1053
|
} else {
|
|
1054
1054
|
const n = t && t.headerFlexGrow ? t.headerFlexGrow : "even", i = t && t.headerFlexRightJustifyContent ? t.headerFlexRightJustifyContent : "flex-end", h = t && t.headerFlexLeftJustifyContent ? t.headerFlexLeftJustifyContent : "flex-start";
|
|
1055
|
-
return /* @__PURE__ */
|
|
1055
|
+
return /* @__PURE__ */ s(ve, { justify: "space-between", children: [
|
|
1056
1056
|
/* @__PURE__ */ e(
|
|
1057
|
-
|
|
1057
|
+
ve,
|
|
1058
1058
|
{
|
|
1059
1059
|
w: n === "left" || n === "even" ? "100%" : void 0,
|
|
1060
1060
|
maw: n === "left" || n === "even" ? void 0 : "100%",
|
|
@@ -1067,7 +1067,7 @@ function pr(t, r, o, f) {
|
|
|
1067
1067
|
}
|
|
1068
1068
|
),
|
|
1069
1069
|
/* @__PURE__ */ e(
|
|
1070
|
-
|
|
1070
|
+
ve,
|
|
1071
1071
|
{
|
|
1072
1072
|
w: n === "right" || n === "even" ? "100%" : void 0,
|
|
1073
1073
|
maw: n === "right" || n === "even" ? void 0 : "100%",
|
|
@@ -1085,9 +1085,9 @@ function pr(t, r, o, f) {
|
|
|
1085
1085
|
function xr(t, r, o, f) {
|
|
1086
1086
|
if (t && t.footerGridColumns) {
|
|
1087
1087
|
const n = t.footerGridColumns.left ? t.footerGridColumns.left : { xs: "content", sm: "content", md: "content", lg: "content" }, i = t.footerGridColumns.middle ? t.footerGridColumns.middle : { xs: "auto", sm: "auto", md: "auto", lg: "auto" }, h = t.footerGridColumns.right ? t.footerGridColumns.right : { xs: "content", sm: "content", md: "content", lg: "content" };
|
|
1088
|
-
return /* @__PURE__ */
|
|
1088
|
+
return /* @__PURE__ */ s(Se, { m: 0, gap: "xs", justify: "center", align: "center", grow: !0, children: [
|
|
1089
1089
|
/* @__PURE__ */ e(
|
|
1090
|
-
|
|
1090
|
+
Se.Col,
|
|
1091
1091
|
{
|
|
1092
1092
|
span: {
|
|
1093
1093
|
xs: n.xs,
|
|
@@ -1105,7 +1105,7 @@ function xr(t, r, o, f) {
|
|
|
1105
1105
|
}
|
|
1106
1106
|
),
|
|
1107
1107
|
/* @__PURE__ */ e(
|
|
1108
|
-
|
|
1108
|
+
Se.Col,
|
|
1109
1109
|
{
|
|
1110
1110
|
span: {
|
|
1111
1111
|
xs: i.xs,
|
|
@@ -1122,7 +1122,7 @@ function xr(t, r, o, f) {
|
|
|
1122
1122
|
}
|
|
1123
1123
|
),
|
|
1124
1124
|
/* @__PURE__ */ e(
|
|
1125
|
-
|
|
1125
|
+
Se.Col,
|
|
1126
1126
|
{
|
|
1127
1127
|
span: {
|
|
1128
1128
|
xs: h.xs,
|
|
@@ -1142,9 +1142,9 @@ function xr(t, r, o, f) {
|
|
|
1142
1142
|
] });
|
|
1143
1143
|
} else {
|
|
1144
1144
|
const n = t && t.footerFlexGrow ? t.footerFlexGrow : "even", i = t && t.footerFlexRightJustifyContent ? t.footerFlexRightJustifyContent : "flex-end", h = t && t.footerFlexLeftJustifyContent ? t.footerFlexLeftJustifyContent : "flex-start";
|
|
1145
|
-
return /* @__PURE__ */
|
|
1145
|
+
return /* @__PURE__ */ s(ve, { justify: "space-between", children: [
|
|
1146
1146
|
/* @__PURE__ */ e(
|
|
1147
|
-
|
|
1147
|
+
ve,
|
|
1148
1148
|
{
|
|
1149
1149
|
w: n === "left" || n === "even" ? "100%" : void 0,
|
|
1150
1150
|
maw: n === "left" || n === "even" ? void 0 : "100%",
|
|
@@ -1159,7 +1159,7 @@ function xr(t, r, o, f) {
|
|
|
1159
1159
|
}
|
|
1160
1160
|
),
|
|
1161
1161
|
/* @__PURE__ */ e(
|
|
1162
|
-
|
|
1162
|
+
ve,
|
|
1163
1163
|
{
|
|
1164
1164
|
w: n === "right" || n === "even" ? "100%" : void 0,
|
|
1165
1165
|
maw: n === "right" || n === "even" ? void 0 : "100%",
|
|
@@ -1184,20 +1184,20 @@ function Mt({
|
|
|
1184
1184
|
clearError: n,
|
|
1185
1185
|
width: i = "100%",
|
|
1186
1186
|
height: h = "100%",
|
|
1187
|
-
withBorder:
|
|
1187
|
+
withBorder: x = !0,
|
|
1188
1188
|
children: a,
|
|
1189
1189
|
radius: v,
|
|
1190
|
-
debug:
|
|
1190
|
+
debug: j,
|
|
1191
1191
|
defaultDebug: l,
|
|
1192
|
-
headerLeft:
|
|
1193
|
-
headerMiddle:
|
|
1194
|
-
headerRight:
|
|
1192
|
+
headerLeft: c,
|
|
1193
|
+
headerMiddle: _,
|
|
1194
|
+
headerRight: D,
|
|
1195
1195
|
footerLeft: C,
|
|
1196
1196
|
footerMiddle: b,
|
|
1197
1197
|
footerRight: m,
|
|
1198
|
-
variant:
|
|
1198
|
+
variant: z,
|
|
1199
1199
|
options: w = {},
|
|
1200
|
-
style:
|
|
1200
|
+
style: G,
|
|
1201
1201
|
debugOptions: F = {
|
|
1202
1202
|
debugLayoutHotKey: "ctrl+shift+S",
|
|
1203
1203
|
debugObjectInspectorHotKey: "ctrl+shift+D",
|
|
@@ -1210,42 +1210,42 @@ function Mt({
|
|
|
1210
1210
|
fallbackComponent: ae,
|
|
1211
1211
|
securityOptions: Q
|
|
1212
1212
|
}) {
|
|
1213
|
-
const [
|
|
1214
|
-
value:
|
|
1213
|
+
const [M, q] = Qt({
|
|
1214
|
+
value: j,
|
|
1215
1215
|
defaultValue: l,
|
|
1216
1216
|
finalValue: !1
|
|
1217
1217
|
});
|
|
1218
|
-
Xt([[F && F.debugLayoutHotKey, () =>
|
|
1219
|
-
const R = Me(), { t:
|
|
1218
|
+
Xt([[F && F.debugLayoutHotKey, () => q(!M)]]);
|
|
1219
|
+
const R = Me(), { t: k } = Zt();
|
|
1220
1220
|
Ue({
|
|
1221
1221
|
autoRegisterActions: Q?.autoRegisterActions ?? !0
|
|
1222
1222
|
});
|
|
1223
|
-
const le =
|
|
1224
|
-
height:
|
|
1225
|
-
width:
|
|
1226
|
-
}), [
|
|
1223
|
+
const le = Ie(null), E = r || le, te = Ie(null), ue = Ie(null), re = st(te), J = st(ue), U = st(E), W = Je(() => ({
|
|
1224
|
+
height: U.height - re.height - J.height - Number(Ot("0.625rem")),
|
|
1225
|
+
width: U.width - re.width - J.width
|
|
1226
|
+
}), [U.height, U.width, re.height, re.width, J.height, J.width]), O = Ie(l);
|
|
1227
1227
|
rt(() => {
|
|
1228
|
-
l !==
|
|
1229
|
-
}, [l,
|
|
1230
|
-
const Y = /* @__PURE__ */
|
|
1228
|
+
l !== O.current && (q(l), O.current = l);
|
|
1229
|
+
}, [l, q]);
|
|
1230
|
+
const Y = /* @__PURE__ */ s(qe, { children: [
|
|
1231
1231
|
/* @__PURE__ */ e(
|
|
1232
1232
|
_e,
|
|
1233
1233
|
{
|
|
1234
1234
|
ref: E,
|
|
1235
|
-
withBorder:
|
|
1235
|
+
withBorder: x,
|
|
1236
1236
|
radius: v,
|
|
1237
|
-
style: { width: i, height: h, padding: 4, ...
|
|
1238
|
-
children: /* @__PURE__ */
|
|
1239
|
-
/* @__PURE__ */ e(It, { size: re.height, children: /* @__PURE__ */ e("div", { ref: te, children: pr(w,
|
|
1237
|
+
style: { width: i, height: h, padding: 4, ...G },
|
|
1238
|
+
children: /* @__PURE__ */ s(ht, { height: "100%", children: [
|
|
1239
|
+
/* @__PURE__ */ e(It, { size: re.height, children: /* @__PURE__ */ e("div", { ref: te, children: pr(w, c, D, M) }) }),
|
|
1240
1240
|
/* @__PURE__ */ e(ft, { children: /* @__PURE__ */ e(
|
|
1241
1241
|
Ze,
|
|
1242
1242
|
{
|
|
1243
|
-
h:
|
|
1243
|
+
h: W.height,
|
|
1244
1244
|
style: {
|
|
1245
|
-
border:
|
|
1245
|
+
border: M ? "1px dashed" : "",
|
|
1246
1246
|
padding: "calc(0.625rem / 2)"
|
|
1247
1247
|
},
|
|
1248
|
-
children: a ? /* @__PURE__ */
|
|
1248
|
+
children: a ? /* @__PURE__ */ s(er, { children: [
|
|
1249
1249
|
o && /* @__PURE__ */ e(
|
|
1250
1250
|
Qe,
|
|
1251
1251
|
{
|
|
@@ -1253,18 +1253,18 @@ function Mt({
|
|
|
1253
1253
|
withCloseButton: !0,
|
|
1254
1254
|
withBorder: !0,
|
|
1255
1255
|
icon: /* @__PURE__ */ e(Ke, { size: "1.4rem" }),
|
|
1256
|
-
title: `${
|
|
1256
|
+
title: `${k("WARNING")}`,
|
|
1257
1257
|
titleColor: "rgb(250, 82, 82)",
|
|
1258
|
-
variant:
|
|
1258
|
+
variant: z ?? R.variant,
|
|
1259
1259
|
onClose: () => n && n(),
|
|
1260
1260
|
children: /* @__PURE__ */ e("span", { children: f })
|
|
1261
1261
|
}
|
|
1262
1262
|
),
|
|
1263
1263
|
a
|
|
1264
|
-
] }) :
|
|
1264
|
+
] }) : M && /* @__PURE__ */ e(ve, { h: W.height + 80, justify: "center", align: "center", wrap: "wrap", children: /* @__PURE__ */ e(Ee, { size: "lg", children: "INSIRA O CONTEÚDO DO PAINEL AQUI." }) })
|
|
1265
1265
|
}
|
|
1266
1266
|
) }),
|
|
1267
|
-
/* @__PURE__ */ e(mt, { size:
|
|
1267
|
+
/* @__PURE__ */ e(mt, { size: J.height, children: /* @__PURE__ */ e("div", { ref: ue, children: xr(w, C, m, M) }) })
|
|
1268
1268
|
] })
|
|
1269
1269
|
}
|
|
1270
1270
|
),
|
|
@@ -1289,7 +1289,7 @@ function Mt({
|
|
|
1289
1289
|
}
|
|
1290
1290
|
);
|
|
1291
1291
|
}
|
|
1292
|
-
function
|
|
1292
|
+
function yr(t, r, o, f, n, i) {
|
|
1293
1293
|
console.log(`Render de "${t}" na fase "${r}": ${o}ms`);
|
|
1294
1294
|
}
|
|
1295
1295
|
function Mr({
|
|
@@ -1303,48 +1303,48 @@ function Mr({
|
|
|
1303
1303
|
innerRef: i,
|
|
1304
1304
|
//isLoading = false,
|
|
1305
1305
|
debug: h = !1,
|
|
1306
|
-
filterType:
|
|
1306
|
+
filterType: x = "normal",
|
|
1307
1307
|
isError: a = !1,
|
|
1308
1308
|
error: v = "",
|
|
1309
|
-
clearError:
|
|
1309
|
+
clearError: j = () => {
|
|
1310
1310
|
},
|
|
1311
1311
|
width: l = "100%",
|
|
1312
|
-
height:
|
|
1313
|
-
withBorder:
|
|
1314
|
-
filterPersistenceDelegator:
|
|
1312
|
+
height: c = "100%",
|
|
1313
|
+
withBorder: _ = !0,
|
|
1314
|
+
filterPersistenceDelegator: D,
|
|
1315
1315
|
withPagination: C = !0,
|
|
1316
1316
|
radius: b,
|
|
1317
1317
|
userActions: m,
|
|
1318
|
-
columnsCountBreakPoints:
|
|
1318
|
+
columnsCountBreakPoints: z,
|
|
1319
1319
|
columnsCount: w,
|
|
1320
|
-
gutter:
|
|
1320
|
+
gutter: G,
|
|
1321
1321
|
component: F,
|
|
1322
1322
|
activeIndex: u,
|
|
1323
1323
|
activeBackgroundColor: X,
|
|
1324
1324
|
activeColor: ee,
|
|
1325
1325
|
onItemEnter: ae,
|
|
1326
1326
|
onItemLeave: Q,
|
|
1327
|
-
style:
|
|
1328
|
-
spaceOptions:
|
|
1327
|
+
style: M,
|
|
1328
|
+
spaceOptions: q,
|
|
1329
1329
|
variant: R,
|
|
1330
|
-
id:
|
|
1330
|
+
id: k = hr("masonry"),
|
|
1331
1331
|
debugOptions: le,
|
|
1332
1332
|
// Props de segurança (opcionais)
|
|
1333
1333
|
resourceName: E,
|
|
1334
1334
|
resourceDescription: te,
|
|
1335
1335
|
requiredPermissions: ue,
|
|
1336
1336
|
fallbackComponent: re,
|
|
1337
|
-
securityOptions:
|
|
1337
|
+
securityOptions: J
|
|
1338
1338
|
}) {
|
|
1339
|
-
const
|
|
1339
|
+
const U = Me(), [W] = H(k), O = i || Ie(null), Y = Ie(null), [se, we] = H(r.getCurrentPage()), [ne, d] = H(
|
|
1340
1340
|
u || (r && r.getTotalRecords() > 0 ? 0 : -1)
|
|
1341
1341
|
);
|
|
1342
|
-
|
|
1343
|
-
const [
|
|
1342
|
+
st(O);
|
|
1343
|
+
const [$, N] = H({
|
|
1344
1344
|
activeFilterIndex: -1,
|
|
1345
1345
|
expandedFilter: !1
|
|
1346
|
-
}), [
|
|
1347
|
-
isDataSourceV2:
|
|
1346
|
+
}), [Fe, he] = H(0), {
|
|
1347
|
+
isDataSourceV2: B,
|
|
1348
1348
|
v1State: { forceUpdate: fe }
|
|
1349
1349
|
} = We(
|
|
1350
1350
|
"ArchbaseMasonryTemplate",
|
|
@@ -1352,19 +1352,19 @@ function Mr({
|
|
|
1352
1352
|
);
|
|
1353
1353
|
it({
|
|
1354
1354
|
dataSource: r,
|
|
1355
|
-
listener: (
|
|
1356
|
-
(
|
|
1355
|
+
listener: (y) => {
|
|
1356
|
+
(y.type === be.afterRemove || y.type === be.refreshData) && (he((V) => V + 1), B || fe());
|
|
1357
1357
|
}
|
|
1358
1358
|
});
|
|
1359
|
-
const
|
|
1359
|
+
const Ae = Je(() => {
|
|
1360
1360
|
if (F) {
|
|
1361
|
-
const
|
|
1362
|
-
let
|
|
1363
|
-
return F.props && (
|
|
1364
|
-
const Be = `${
|
|
1361
|
+
const y = F.type;
|
|
1362
|
+
let V = {};
|
|
1363
|
+
return F.props && (V = F.props), r.browseRecords().map((ke, me) => {
|
|
1364
|
+
const Be = `${W}_${me}`, De = `${W}_${me}`;
|
|
1365
1365
|
let ge = ke.active === void 0 ? !1 : ke.active;
|
|
1366
1366
|
return ne >= 0 && (ge = !1, ne === me && (ge = !0)), /* @__PURE__ */ e(
|
|
1367
|
-
|
|
1367
|
+
y,
|
|
1368
1368
|
{
|
|
1369
1369
|
id: De,
|
|
1370
1370
|
active: ge,
|
|
@@ -1372,54 +1372,54 @@ function Mr({
|
|
|
1372
1372
|
dataSource: r,
|
|
1373
1373
|
recordData: ke,
|
|
1374
1374
|
disabled: ke.disabled,
|
|
1375
|
-
...
|
|
1375
|
+
...V
|
|
1376
1376
|
},
|
|
1377
1377
|
Be
|
|
1378
1378
|
);
|
|
1379
1379
|
});
|
|
1380
1380
|
}
|
|
1381
1381
|
return [];
|
|
1382
|
-
}, [ne, F,
|
|
1383
|
-
|
|
1384
|
-
}, Pe = (
|
|
1385
|
-
|
|
1386
|
-
},
|
|
1387
|
-
|
|
1388
|
-
},
|
|
1389
|
-
}, de = (
|
|
1390
|
-
d(
|
|
1391
|
-
}, Ge = (
|
|
1382
|
+
}, [ne, F, W, r, Fe]), Re = (y, V) => {
|
|
1383
|
+
N({ ...$, currentFilter: y, activeFilterIndex: V });
|
|
1384
|
+
}, Pe = (y) => {
|
|
1385
|
+
N({ ...$, expandedFilter: y });
|
|
1386
|
+
}, ce = (y, V) => {
|
|
1387
|
+
N({ ...$, currentFilter: y, activeFilterIndex: V });
|
|
1388
|
+
}, L = () => {
|
|
1389
|
+
}, de = (y, V) => {
|
|
1390
|
+
d(y), r && r.gotoRecordByData(V);
|
|
1391
|
+
}, Ge = (y) => {
|
|
1392
1392
|
if (r) {
|
|
1393
|
-
const
|
|
1394
|
-
|
|
1393
|
+
const V = r.getOptions();
|
|
1394
|
+
V.filter = y, V.currentPage = se, r.refreshData(V), B || fe();
|
|
1395
1395
|
}
|
|
1396
|
-
},
|
|
1396
|
+
}, T = (y) => {
|
|
1397
1397
|
if (r) {
|
|
1398
|
-
const
|
|
1399
|
-
|
|
1398
|
+
const V = r.getOptions();
|
|
1399
|
+
V.currentPage = y, r.refreshData(V), B || fe();
|
|
1400
1400
|
}
|
|
1401
|
-
},
|
|
1401
|
+
}, S = () => x === "normal" && f ? /* @__PURE__ */ e(
|
|
1402
1402
|
ur,
|
|
1403
1403
|
{
|
|
1404
1404
|
searchableFields: f,
|
|
1405
1405
|
onFilter: Ge,
|
|
1406
1406
|
minFilterValueLength: 1
|
|
1407
1407
|
}
|
|
1408
|
-
) :
|
|
1408
|
+
) : x === "advanced" ? /* @__PURE__ */ e(tr, { id: `profile_${o.componentName}`, onRender: yr, children: /* @__PURE__ */ e(
|
|
1409
1409
|
Dt,
|
|
1410
1410
|
{
|
|
1411
1411
|
id: o.componentName,
|
|
1412
1412
|
viewName: o.viewName,
|
|
1413
1413
|
apiVersion: o.apiVersion,
|
|
1414
1414
|
ref: Y,
|
|
1415
|
-
variant: R ||
|
|
1416
|
-
expandedFilter:
|
|
1417
|
-
persistenceDelegator:
|
|
1418
|
-
currentFilter:
|
|
1419
|
-
activeFilterIndex:
|
|
1420
|
-
onSelectedFilter:
|
|
1421
|
-
onFilterChanged:
|
|
1422
|
-
onSearchByFilter:
|
|
1415
|
+
variant: R || U.variant,
|
|
1416
|
+
expandedFilter: $.expandedFilter,
|
|
1417
|
+
persistenceDelegator: D,
|
|
1418
|
+
currentFilter: $.currentFilter,
|
|
1419
|
+
activeFilterIndex: $.activeFilterIndex,
|
|
1420
|
+
onSelectedFilter: ce,
|
|
1421
|
+
onFilterChanged: Re,
|
|
1422
|
+
onSearchByFilter: L,
|
|
1423
1423
|
onToggleExpandedFilter: Pe,
|
|
1424
1424
|
width: "660px",
|
|
1425
1425
|
height: "170px",
|
|
@@ -1428,7 +1428,7 @@ function Mr({
|
|
|
1428
1428
|
) }) : /* @__PURE__ */ e(qe, {}), Le = { ...{
|
|
1429
1429
|
headerFlexGrow: "left",
|
|
1430
1430
|
footerGridColumns: {}
|
|
1431
|
-
}, ...
|
|
1431
|
+
}, ...q };
|
|
1432
1432
|
return /* @__PURE__ */ e(
|
|
1433
1433
|
He,
|
|
1434
1434
|
{
|
|
@@ -1436,25 +1436,25 @@ function Mr({
|
|
|
1436
1436
|
resourceDescription: te,
|
|
1437
1437
|
requiredPermissions: ue,
|
|
1438
1438
|
fallbackComponent: re,
|
|
1439
|
-
onSecurityReady:
|
|
1440
|
-
onAccessDenied:
|
|
1439
|
+
onSecurityReady: J?.onSecurityReady,
|
|
1440
|
+
onAccessDenied: J?.onAccessDenied,
|
|
1441
1441
|
children: /* @__PURE__ */ e(
|
|
1442
1442
|
Mt,
|
|
1443
1443
|
{
|
|
1444
|
-
innerRef:
|
|
1444
|
+
innerRef: O,
|
|
1445
1445
|
width: l,
|
|
1446
|
-
height:
|
|
1446
|
+
height: c,
|
|
1447
1447
|
radius: b,
|
|
1448
|
-
withBorder:
|
|
1448
|
+
withBorder: _,
|
|
1449
1449
|
isError: a,
|
|
1450
1450
|
error: v,
|
|
1451
|
-
clearError:
|
|
1451
|
+
clearError: j,
|
|
1452
1452
|
title: t,
|
|
1453
1453
|
defaultDebug: h,
|
|
1454
1454
|
debugOptions: le,
|
|
1455
|
-
style:
|
|
1455
|
+
style: M,
|
|
1456
1456
|
options: Le,
|
|
1457
|
-
headerLeft: m?.visible !== !1 ? /* @__PURE__ */
|
|
1457
|
+
headerLeft: m?.visible !== !1 ? /* @__PURE__ */ s(ve, { gap: "8px", rowGap: "8px", children: [
|
|
1458
1458
|
m?.customUserActions && m?.customUserActionsPosition === "left" ? m.customUserActions : null,
|
|
1459
1459
|
m?.allowAdd !== !1 && m?.onAddExecute ? /* @__PURE__ */ e(
|
|
1460
1460
|
K,
|
|
@@ -1462,7 +1462,7 @@ function Mr({
|
|
|
1462
1462
|
actionName: "add",
|
|
1463
1463
|
actionDescription: `Adicionar novo ${te || "registro"}`,
|
|
1464
1464
|
color: "green",
|
|
1465
|
-
variant: R ??
|
|
1465
|
+
variant: R ?? U.variant,
|
|
1466
1466
|
leftSection: /* @__PURE__ */ e(Ft, {}),
|
|
1467
1467
|
onClick: () => m.onAddExecute(),
|
|
1468
1468
|
children: m.labelAdd || g().t("archbase:New")
|
|
@@ -1476,7 +1476,7 @@ function Mr({
|
|
|
1476
1476
|
color: "blue",
|
|
1477
1477
|
leftSection: /* @__PURE__ */ e(At, {}),
|
|
1478
1478
|
disabled: !r.isBrowsing() || r.isEmpty(),
|
|
1479
|
-
variant: R ??
|
|
1479
|
+
variant: R ?? U.variant,
|
|
1480
1480
|
onClick: () => m.onEditExecute(),
|
|
1481
1481
|
children: m.labelEdit || g().t("archbase:Edit")
|
|
1482
1482
|
}
|
|
@@ -1489,7 +1489,7 @@ function Mr({
|
|
|
1489
1489
|
color: "red",
|
|
1490
1490
|
leftSection: /* @__PURE__ */ e(nt, {}),
|
|
1491
1491
|
disabled: !r.isBrowsing() || r.isEmpty(),
|
|
1492
|
-
variant: R ??
|
|
1492
|
+
variant: R ?? U.variant,
|
|
1493
1493
|
onClick: () => m.onRemoveExecute(),
|
|
1494
1494
|
children: m.labelRemove || g().t("archbase:Remove")
|
|
1495
1495
|
}
|
|
@@ -1502,28 +1502,28 @@ function Mr({
|
|
|
1502
1502
|
color: "gray.7",
|
|
1503
1503
|
leftSection: /* @__PURE__ */ e(Rt, {}),
|
|
1504
1504
|
disabled: !r.isBrowsing() || r.isEmpty(),
|
|
1505
|
-
variant: R ??
|
|
1505
|
+
variant: R ?? U.variant,
|
|
1506
1506
|
onClick: () => m.onViewExecute(),
|
|
1507
1507
|
children: m.labelView || g().t("archbase:View")
|
|
1508
1508
|
}
|
|
1509
1509
|
) : null,
|
|
1510
1510
|
m?.customUserActions && m?.customUserActionsPosition === "right" ? m.customUserActions : null
|
|
1511
1511
|
] }) : void 0,
|
|
1512
|
-
headerRight:
|
|
1513
|
-
footerRight: C ? /* @__PURE__ */ e(Nt, { total: r.getTotalPages(), onChange:
|
|
1512
|
+
headerRight: S(),
|
|
1513
|
+
footerRight: C ? /* @__PURE__ */ e(Nt, { total: r.getTotalPages(), onChange: T }) : void 0,
|
|
1514
1514
|
children: /* @__PURE__ */ e(
|
|
1515
1515
|
or,
|
|
1516
1516
|
{
|
|
1517
1517
|
value: {
|
|
1518
1518
|
dataSource: r,
|
|
1519
|
-
ownerId:
|
|
1519
|
+
ownerId: k,
|
|
1520
1520
|
handleSelectItem: de,
|
|
1521
1521
|
activeBackgroundColor: X,
|
|
1522
1522
|
activeColor: ee,
|
|
1523
1523
|
onItemEnter: ae,
|
|
1524
1524
|
onItemLeave: Q
|
|
1525
1525
|
},
|
|
1526
|
-
children: /* @__PURE__ */ e(ar, { columnsCountBreakPoints:
|
|
1526
|
+
children: /* @__PURE__ */ e(ar, { columnsCountBreakPoints: z, children: /* @__PURE__ */ e(sr, { gutter: G, columnsCount: w, children: Ae }) })
|
|
1527
1527
|
}
|
|
1528
1528
|
)
|
|
1529
1529
|
}
|
|
@@ -1531,7 +1531,7 @@ function Mr({
|
|
|
1531
1531
|
}
|
|
1532
1532
|
);
|
|
1533
1533
|
}
|
|
1534
|
-
const
|
|
1534
|
+
const vr = {
|
|
1535
1535
|
visible: !0,
|
|
1536
1536
|
allowAdd: !0,
|
|
1537
1537
|
allowEdit: !0,
|
|
@@ -1550,21 +1550,21 @@ function Ur({
|
|
|
1550
1550
|
//isLoading = false,
|
|
1551
1551
|
isError: i = !1,
|
|
1552
1552
|
error: h = "",
|
|
1553
|
-
clearError:
|
|
1553
|
+
clearError: x = () => {
|
|
1554
1554
|
},
|
|
1555
1555
|
width: a = "100%",
|
|
1556
1556
|
height: v = "100%",
|
|
1557
|
-
withBorder:
|
|
1557
|
+
withBorder: j = !0,
|
|
1558
1558
|
filterPersistenceDelegator: l,
|
|
1559
|
-
withPagination:
|
|
1560
|
-
children:
|
|
1561
|
-
radius:
|
|
1559
|
+
withPagination: c = !0,
|
|
1560
|
+
children: _,
|
|
1561
|
+
radius: D,
|
|
1562
1562
|
userActions: C,
|
|
1563
1563
|
debug: b = !1,
|
|
1564
1564
|
variant: m,
|
|
1565
|
-
actionsButtonsOptions:
|
|
1565
|
+
actionsButtonsOptions: z,
|
|
1566
1566
|
spaceOptions: w,
|
|
1567
|
-
style:
|
|
1567
|
+
style: G,
|
|
1568
1568
|
debugOptions: F,
|
|
1569
1569
|
// Props de segurança (opcionais)
|
|
1570
1570
|
resourceName: u,
|
|
@@ -1573,9 +1573,9 @@ function Ur({
|
|
|
1573
1573
|
fallbackComponent: ae,
|
|
1574
1574
|
securityOptions: Q
|
|
1575
1575
|
}) {
|
|
1576
|
-
const
|
|
1576
|
+
const M = Me(), q = Ue({
|
|
1577
1577
|
autoRegisterActions: Q?.autoRegisterActions ?? !0
|
|
1578
|
-
}), R = n ||
|
|
1578
|
+
}), R = n || Ie(null), k = Ie(null), [le, E] = H({
|
|
1579
1579
|
activeFilterIndex: -1,
|
|
1580
1580
|
expandedFilter: !1
|
|
1581
1581
|
}), {
|
|
@@ -1585,8 +1585,8 @@ function Ur({
|
|
|
1585
1585
|
"ArchbasePanelTemplate",
|
|
1586
1586
|
r
|
|
1587
1587
|
), re = Je(() => {
|
|
1588
|
-
const d = { ...
|
|
1589
|
-
return d.allowAdd && d.onAddExecute &&
|
|
1588
|
+
const d = { ...vr, ...C }, $ = (Fe) => q.isAvailable ? (q.registerAction(), q.hasPermission()) : !0, N = [];
|
|
1589
|
+
return d.allowAdd && d.onAddExecute && $() && N.push({
|
|
1590
1590
|
id: "1",
|
|
1591
1591
|
icon: /* @__PURE__ */ e(Ft, {}),
|
|
1592
1592
|
color: "green",
|
|
@@ -1596,7 +1596,7 @@ function Ur({
|
|
|
1596
1596
|
},
|
|
1597
1597
|
enabled: !0,
|
|
1598
1598
|
hint: "Clique para criar."
|
|
1599
|
-
}), d.allowEdit && d.onEditExecute &&
|
|
1599
|
+
}), d.allowEdit && d.onEditExecute && $() && N.push({
|
|
1600
1600
|
id: "2",
|
|
1601
1601
|
icon: /* @__PURE__ */ e(At, {}),
|
|
1602
1602
|
color: "blue",
|
|
@@ -1606,7 +1606,7 @@ function Ur({
|
|
|
1606
1606
|
},
|
|
1607
1607
|
enabled: !r.isEmpty() && r.isBrowsing(),
|
|
1608
1608
|
hint: "Clique para editar."
|
|
1609
|
-
}), d.allowRemove && d.onRemoveExecute &&
|
|
1609
|
+
}), d.allowRemove && d.onRemoveExecute && $() && N.push({
|
|
1610
1610
|
id: "3",
|
|
1611
1611
|
icon: /* @__PURE__ */ e(nt, {}),
|
|
1612
1612
|
color: "red",
|
|
@@ -1616,7 +1616,7 @@ function Ur({
|
|
|
1616
1616
|
},
|
|
1617
1617
|
enabled: !r.isEmpty() && r.isBrowsing(),
|
|
1618
1618
|
hint: "Clique para remover."
|
|
1619
|
-
}), d.allowView && d.onView &&
|
|
1619
|
+
}), d.allowView && d.onView && $() && N.push({
|
|
1620
1620
|
id: "4",
|
|
1621
1621
|
icon: /* @__PURE__ */ e(Rt, {}),
|
|
1622
1622
|
color: "green",
|
|
@@ -1626,22 +1626,22 @@ function Ur({
|
|
|
1626
1626
|
},
|
|
1627
1627
|
enabled: !r.isEmpty() && r.isBrowsing(),
|
|
1628
1628
|
hint: "Clique para visualizar."
|
|
1629
|
-
}), d.customUserActions && d.positionCustomUserActions === "before" ? [...d.customUserActions, ...
|
|
1630
|
-
}, [C, r,
|
|
1631
|
-
E({ ...le, currentFilter: d, activeFilterIndex:
|
|
1632
|
-
},
|
|
1629
|
+
}), d.customUserActions && d.positionCustomUserActions === "before" ? [...d.customUserActions, ...N] : d.customUserActions && d.positionCustomUserActions === "after" ? [...N, ...d.customUserActions] : N;
|
|
1630
|
+
}, [C, r, q]), J = (d, $) => {
|
|
1631
|
+
E({ ...le, currentFilter: d, activeFilterIndex: $ });
|
|
1632
|
+
}, U = (d) => {
|
|
1633
1633
|
E({ ...le, expandedFilter: d });
|
|
1634
|
-
},
|
|
1635
|
-
E({ ...le, currentFilter: d, activeFilterIndex:
|
|
1636
|
-
},
|
|
1634
|
+
}, W = (d, $) => {
|
|
1635
|
+
E({ ...le, currentFilter: d, activeFilterIndex: $ });
|
|
1636
|
+
}, O = () => {
|
|
1637
1637
|
}, Y = {
|
|
1638
1638
|
menuButtonColor: "blue.5",
|
|
1639
1639
|
menuPosition: "left"
|
|
1640
|
-
},
|
|
1640
|
+
}, se = {
|
|
1641
1641
|
headerFlexGrow: "left",
|
|
1642
1642
|
footerFlexGrow: "right"
|
|
1643
1643
|
// footerGridColumns: {},
|
|
1644
|
-
},
|
|
1644
|
+
}, we = { ...Y, ...z }, ne = { ...se, ...w };
|
|
1645
1645
|
return /* @__PURE__ */ e(
|
|
1646
1646
|
He,
|
|
1647
1647
|
{
|
|
@@ -1657,40 +1657,40 @@ function Ur({
|
|
|
1657
1657
|
innerRef: R,
|
|
1658
1658
|
width: a,
|
|
1659
1659
|
height: v,
|
|
1660
|
-
radius:
|
|
1661
|
-
withBorder:
|
|
1660
|
+
radius: D,
|
|
1661
|
+
withBorder: j,
|
|
1662
1662
|
isError: i,
|
|
1663
1663
|
error: h,
|
|
1664
|
-
clearError:
|
|
1664
|
+
clearError: x,
|
|
1665
1665
|
title: t,
|
|
1666
1666
|
defaultDebug: b,
|
|
1667
1667
|
debugOptions: F,
|
|
1668
|
-
style:
|
|
1668
|
+
style: G,
|
|
1669
1669
|
options: ne,
|
|
1670
|
-
headerLeft: /* @__PURE__ */ e(
|
|
1670
|
+
headerLeft: /* @__PURE__ */ e(cr, { actions: re, options: we }),
|
|
1671
1671
|
headerRight: /* @__PURE__ */ e(
|
|
1672
1672
|
Dt,
|
|
1673
1673
|
{
|
|
1674
1674
|
id: o.componentName,
|
|
1675
1675
|
viewName: o.viewName,
|
|
1676
1676
|
apiVersion: o.apiVersion,
|
|
1677
|
-
ref:
|
|
1678
|
-
variant: m ||
|
|
1677
|
+
ref: k,
|
|
1678
|
+
variant: m || M.variant,
|
|
1679
1679
|
expandedFilter: le.expandedFilter,
|
|
1680
1680
|
persistenceDelegator: l,
|
|
1681
1681
|
currentFilter: le.currentFilter,
|
|
1682
1682
|
activeFilterIndex: le.activeFilterIndex,
|
|
1683
|
-
onSelectedFilter:
|
|
1684
|
-
onFilterChanged:
|
|
1685
|
-
onSearchByFilter:
|
|
1686
|
-
onToggleExpandedFilter:
|
|
1683
|
+
onSelectedFilter: W,
|
|
1684
|
+
onFilterChanged: J,
|
|
1685
|
+
onSearchByFilter: O,
|
|
1686
|
+
onToggleExpandedFilter: U,
|
|
1687
1687
|
width: "660px",
|
|
1688
1688
|
height: "170px",
|
|
1689
1689
|
children: f
|
|
1690
1690
|
}
|
|
1691
1691
|
),
|
|
1692
|
-
footerRight:
|
|
1693
|
-
children:
|
|
1692
|
+
footerRight: c && /* @__PURE__ */ e(Nt, { total: 10 }),
|
|
1693
|
+
children: _
|
|
1694
1694
|
}
|
|
1695
1695
|
)
|
|
1696
1696
|
}
|
|
@@ -1708,23 +1708,23 @@ function _r({
|
|
|
1708
1708
|
showDeleteButton: n = !1,
|
|
1709
1709
|
onDelete: i,
|
|
1710
1710
|
saveLabel: h,
|
|
1711
|
-
cancelLabel:
|
|
1711
|
+
cancelLabel: x,
|
|
1712
1712
|
buttonsPosition: a = "header",
|
|
1713
1713
|
// Left Column
|
|
1714
1714
|
leftColumnContent: v,
|
|
1715
|
-
leftColumnSpan:
|
|
1715
|
+
leftColumnSpan: j = 6,
|
|
1716
1716
|
hideLeftColumn: l = !1,
|
|
1717
1717
|
// Right Column - Form
|
|
1718
|
-
formTitle:
|
|
1719
|
-
formSubtitle:
|
|
1720
|
-
statusBadge:
|
|
1718
|
+
formTitle: c,
|
|
1719
|
+
formSubtitle: _,
|
|
1720
|
+
statusBadge: D,
|
|
1721
1721
|
tabs: C,
|
|
1722
1722
|
defaultTab: b,
|
|
1723
1723
|
tabsVariant: m = "outline",
|
|
1724
|
-
children:
|
|
1724
|
+
children: z,
|
|
1725
1725
|
// Layout
|
|
1726
1726
|
width: w = "100%",
|
|
1727
|
-
height:
|
|
1727
|
+
height: G = "100%",
|
|
1728
1728
|
withBorder: F = !0,
|
|
1729
1729
|
radius: u,
|
|
1730
1730
|
style: X,
|
|
@@ -1732,10 +1732,10 @@ function _r({
|
|
|
1732
1732
|
innerRef: ee,
|
|
1733
1733
|
isLoading: ae = !1,
|
|
1734
1734
|
isCanceling: Q = !1,
|
|
1735
|
-
isSaving:
|
|
1736
|
-
isError:
|
|
1735
|
+
isSaving: M = !1,
|
|
1736
|
+
isError: q = !1,
|
|
1737
1737
|
error: R = "",
|
|
1738
|
-
clearError:
|
|
1738
|
+
clearError: k = () => {
|
|
1739
1739
|
},
|
|
1740
1740
|
autoCloseAlertError: le = 15e3,
|
|
1741
1741
|
// DataSource
|
|
@@ -1744,63 +1744,63 @@ function _r({
|
|
|
1744
1744
|
// Callbacks
|
|
1745
1745
|
onSave: ue,
|
|
1746
1746
|
onCancel: re,
|
|
1747
|
-
onBeforeSave:
|
|
1748
|
-
onAfterSave:
|
|
1749
|
-
onBeforeCancel:
|
|
1750
|
-
onAfterCancel:
|
|
1747
|
+
onBeforeSave: J,
|
|
1748
|
+
onAfterSave: U,
|
|
1749
|
+
onBeforeCancel: W,
|
|
1750
|
+
onAfterCancel: O,
|
|
1751
1751
|
onError: Y,
|
|
1752
1752
|
// Navigation
|
|
1753
|
-
routePath:
|
|
1754
|
-
onBeforeClose:
|
|
1753
|
+
routePath: se,
|
|
1754
|
+
onBeforeClose: we,
|
|
1755
1755
|
useNavigationListener: ne,
|
|
1756
1756
|
// Security
|
|
1757
1757
|
resourceName: d,
|
|
1758
|
-
resourceDescription:
|
|
1759
|
-
requiredPermissions:
|
|
1760
|
-
fallbackComponent:
|
|
1758
|
+
resourceDescription: $,
|
|
1759
|
+
requiredPermissions: N,
|
|
1760
|
+
fallbackComponent: Fe,
|
|
1761
1761
|
securityOptions: he,
|
|
1762
|
-
...
|
|
1762
|
+
...B
|
|
1763
1763
|
}) {
|
|
1764
|
-
const fe = Me(), [
|
|
1764
|
+
const fe = Me(), [Ae, Re] = H(q), [Pe, ce] = H(R), [L, de] = H(b || (C?.[0]?.value ?? null)), Ge = dt();
|
|
1765
1765
|
Ue({
|
|
1766
1766
|
autoRegisterActions: he?.autoRegisterActions ?? !0
|
|
1767
1767
|
});
|
|
1768
|
-
const
|
|
1768
|
+
const T = We(
|
|
1769
1769
|
"ArchbaseTwoColumnFormTemplate",
|
|
1770
1770
|
E,
|
|
1771
1771
|
void 0,
|
|
1772
1772
|
void 0
|
|
1773
|
-
);
|
|
1773
|
+
), S = Pt();
|
|
1774
1774
|
it({
|
|
1775
1775
|
dataSource: E,
|
|
1776
|
-
listener: (
|
|
1777
|
-
|
|
1776
|
+
listener: (p) => {
|
|
1777
|
+
p.type === be.onError && (Re(!0), ce(p.error)), p.type === be.onFieldError && S && p.fieldName && p.error && S.setError(p.fieldName, p.error), (p.type === be.afterEdit || p.type === be.afterInsert) && (T.isDataSourceV2 || Ge());
|
|
1778
1778
|
}
|
|
1779
1779
|
});
|
|
1780
|
-
const
|
|
1780
|
+
const $e = Z((p, Ce) => ({
|
|
1781
1781
|
closeAllowed: (Ne) => {
|
|
1782
1782
|
}
|
|
1783
|
-
}), []), Le = ne || $e, { closeAllowed:
|
|
1784
|
-
|
|
1785
|
-
}),
|
|
1783
|
+
}), []), Le = ne || $e, { closeAllowed: y } = Le(se || "", () => {
|
|
1784
|
+
we && we() === !1 || y();
|
|
1785
|
+
}), V = async (p) => {
|
|
1786
1786
|
try {
|
|
1787
|
-
ue ? ue(
|
|
1788
|
-
|
|
1789
|
-
}).catch((
|
|
1790
|
-
Y && Y(xe(
|
|
1787
|
+
ue ? ue(p) : (J && await J(p), E.isBrowsing() || E.save().then(() => {
|
|
1788
|
+
S?.clearAll(), U && U(p), y();
|
|
1789
|
+
}).catch((Ce) => {
|
|
1790
|
+
Y && Y(xe(Ce)), Re(!0), ce(xe(Ce));
|
|
1791
1791
|
}));
|
|
1792
|
-
} catch (
|
|
1793
|
-
Y && Y(xe(
|
|
1792
|
+
} catch (Ce) {
|
|
1793
|
+
Y && Y(xe(Ce)), Re(!0), ce(xe(Ce));
|
|
1794
1794
|
}
|
|
1795
1795
|
}, ke = () => {
|
|
1796
1796
|
try {
|
|
1797
|
-
re ? re(
|
|
1798
|
-
} catch (
|
|
1799
|
-
Y && Y(xe(
|
|
1797
|
+
re ? re(y) : (W && W(), E.isBrowsing() || E.cancel(), S?.clearAll(), O && O(), y());
|
|
1798
|
+
} catch (p) {
|
|
1799
|
+
Y && Y(xe(p)), Re(!0), ce(xe(p));
|
|
1800
1800
|
}
|
|
1801
1801
|
}, me = () => {
|
|
1802
|
-
|
|
1803
|
-
}, Be = l ? 12 : 12 -
|
|
1802
|
+
k && k(), Re(!1), ce("");
|
|
1803
|
+
}, Be = l ? 12 : 12 - j, De = E && !E.isBrowsing(), ge = a === "header" || a === "both", lt = a === "footer" || a === "both", ie = () => /* @__PURE__ */ e(oe, { gap: "sm", children: De ? /* @__PURE__ */ s(qe, { children: [
|
|
1804
1804
|
/* @__PURE__ */ e(
|
|
1805
1805
|
K,
|
|
1806
1806
|
{
|
|
@@ -1810,19 +1810,19 @@ function _r({
|
|
|
1810
1810
|
onClick: ke,
|
|
1811
1811
|
variant: "default",
|
|
1812
1812
|
loading: Q,
|
|
1813
|
-
children:
|
|
1813
|
+
children: x || g().t("Cancel")
|
|
1814
1814
|
}
|
|
1815
1815
|
),
|
|
1816
1816
|
/* @__PURE__ */ e(
|
|
1817
1817
|
K,
|
|
1818
1818
|
{
|
|
1819
1819
|
actionName: "save",
|
|
1820
|
-
actionDescription: `Salvar ${
|
|
1821
|
-
leftSection: /* @__PURE__ */ e(
|
|
1822
|
-
onClick: () =>
|
|
1820
|
+
actionDescription: `Salvar ${$ || "registro"}`,
|
|
1821
|
+
leftSection: /* @__PURE__ */ e(vt, { size: 16 }),
|
|
1822
|
+
onClick: () => V(E.getCurrentRecord()),
|
|
1823
1823
|
variant: te ?? fe.variant,
|
|
1824
1824
|
color: "blue",
|
|
1825
|
-
loading:
|
|
1825
|
+
loading: M,
|
|
1826
1826
|
children: h || g().t("Ok")
|
|
1827
1827
|
}
|
|
1828
1828
|
)
|
|
@@ -1841,12 +1841,12 @@ function _r({
|
|
|
1841
1841
|
He,
|
|
1842
1842
|
{
|
|
1843
1843
|
resourceName: d,
|
|
1844
|
-
resourceDescription:
|
|
1845
|
-
requiredPermissions:
|
|
1846
|
-
fallbackComponent:
|
|
1844
|
+
resourceDescription: $,
|
|
1845
|
+
requiredPermissions: N,
|
|
1846
|
+
fallbackComponent: Fe,
|
|
1847
1847
|
onSecurityReady: he?.onSecurityReady,
|
|
1848
1848
|
onAccessDenied: he?.onAccessDenied,
|
|
1849
|
-
children: /* @__PURE__ */ e(Et, { children: /* @__PURE__ */
|
|
1849
|
+
children: /* @__PURE__ */ e(Et, { children: /* @__PURE__ */ s(
|
|
1850
1850
|
_e,
|
|
1851
1851
|
{
|
|
1852
1852
|
ref: ee,
|
|
@@ -1854,7 +1854,7 @@ function _r({
|
|
|
1854
1854
|
radius: u,
|
|
1855
1855
|
style: {
|
|
1856
1856
|
width: w,
|
|
1857
|
-
height:
|
|
1857
|
+
height: G,
|
|
1858
1858
|
display: "flex",
|
|
1859
1859
|
flexDirection: "column",
|
|
1860
1860
|
...X
|
|
@@ -1868,10 +1868,10 @@ function _r({
|
|
|
1868
1868
|
padding: "16px 24px",
|
|
1869
1869
|
borderBottom: "1px solid var(--mantine-color-gray-2)"
|
|
1870
1870
|
},
|
|
1871
|
-
children: /* @__PURE__ */
|
|
1872
|
-
/* @__PURE__ */
|
|
1871
|
+
children: /* @__PURE__ */ s(ve, { justify: "space-between", align: "center", children: [
|
|
1872
|
+
/* @__PURE__ */ s(oe, { gap: "md", children: [
|
|
1873
1873
|
o && /* @__PURE__ */ e(
|
|
1874
|
-
|
|
1874
|
+
yt,
|
|
1875
1875
|
{
|
|
1876
1876
|
variant: "subtle",
|
|
1877
1877
|
color: "gray",
|
|
@@ -1881,27 +1881,27 @@ function _r({
|
|
|
1881
1881
|
children: /* @__PURE__ */ e(Vt, { size: 18 })
|
|
1882
1882
|
}
|
|
1883
1883
|
),
|
|
1884
|
-
/* @__PURE__ */
|
|
1884
|
+
/* @__PURE__ */ s(pe, { children: [
|
|
1885
1885
|
/* @__PURE__ */ e(Bt, { order: 4, fw: 600, children: t }),
|
|
1886
|
-
r && /* @__PURE__ */ e(
|
|
1886
|
+
r && /* @__PURE__ */ e(Ee, { size: "sm", c: "dimmed", children: r })
|
|
1887
1887
|
] })
|
|
1888
1888
|
] }),
|
|
1889
|
-
/* @__PURE__ */
|
|
1890
|
-
f?.map((
|
|
1889
|
+
/* @__PURE__ */ s(oe, { gap: "sm", children: [
|
|
1890
|
+
f?.map((p) => /* @__PURE__ */ e(
|
|
1891
1891
|
Oe,
|
|
1892
1892
|
{
|
|
1893
|
-
variant:
|
|
1894
|
-
color:
|
|
1895
|
-
leftSection:
|
|
1896
|
-
onClick:
|
|
1897
|
-
disabled:
|
|
1898
|
-
loading:
|
|
1899
|
-
children:
|
|
1893
|
+
variant: p.variant || "subtle",
|
|
1894
|
+
color: p.color,
|
|
1895
|
+
leftSection: p.icon,
|
|
1896
|
+
onClick: p.onClick,
|
|
1897
|
+
disabled: p.disabled,
|
|
1898
|
+
loading: p.loading,
|
|
1899
|
+
children: p.label
|
|
1900
1900
|
},
|
|
1901
|
-
|
|
1901
|
+
p.id
|
|
1902
1902
|
)),
|
|
1903
1903
|
n && i && /* @__PURE__ */ e(
|
|
1904
|
-
|
|
1904
|
+
yt,
|
|
1905
1905
|
{
|
|
1906
1906
|
variant: "subtle",
|
|
1907
1907
|
color: "red",
|
|
@@ -1916,7 +1916,7 @@ function _r({
|
|
|
1916
1916
|
] })
|
|
1917
1917
|
}
|
|
1918
1918
|
),
|
|
1919
|
-
|
|
1919
|
+
Ae && /* @__PURE__ */ e(pe, { style: { flexShrink: 0, padding: "0 24px" }, children: /* @__PURE__ */ e(
|
|
1920
1920
|
Qe,
|
|
1921
1921
|
{
|
|
1922
1922
|
autoClose: le,
|
|
@@ -1930,11 +1930,11 @@ function _r({
|
|
|
1930
1930
|
children: /* @__PURE__ */ e("span", { children: Pe })
|
|
1931
1931
|
}
|
|
1932
1932
|
) }),
|
|
1933
|
-
/* @__PURE__ */
|
|
1934
|
-
/* @__PURE__ */ e(
|
|
1935
|
-
/* @__PURE__ */
|
|
1936
|
-
!l && /* @__PURE__ */ e(
|
|
1937
|
-
/* @__PURE__ */ e(
|
|
1933
|
+
/* @__PURE__ */ s(pe, { style: { flex: 1, minHeight: 0, padding: "24px" }, children: [
|
|
1934
|
+
/* @__PURE__ */ e(Ct, { visible: ae || Q || M, opacity: 0.3 }),
|
|
1935
|
+
/* @__PURE__ */ s(Se, { gap: "xl", style: { height: "100%" }, children: [
|
|
1936
|
+
!l && /* @__PURE__ */ e(Se.Col, { span: { base: 12, md: j }, children: /* @__PURE__ */ e(Ze, { style: { height: "100%" }, children: /* @__PURE__ */ e(wt, { gap: "md", children: v }) }) }),
|
|
1937
|
+
/* @__PURE__ */ e(Se.Col, { span: { base: 12, md: Be }, children: /* @__PURE__ */ s(
|
|
1938
1938
|
_e,
|
|
1939
1939
|
{
|
|
1940
1940
|
withBorder: !0,
|
|
@@ -1946,7 +1946,7 @@ function _r({
|
|
|
1946
1946
|
backgroundColor: "var(--mantine-color-white)"
|
|
1947
1947
|
},
|
|
1948
1948
|
children: [
|
|
1949
|
-
(
|
|
1949
|
+
(c || D) && /* @__PURE__ */ e(
|
|
1950
1950
|
pe,
|
|
1951
1951
|
{
|
|
1952
1952
|
style: {
|
|
@@ -1954,44 +1954,44 @@ function _r({
|
|
|
1954
1954
|
padding: "16px 20px",
|
|
1955
1955
|
borderBottom: C ? "1px solid var(--mantine-color-gray-2)" : "none"
|
|
1956
1956
|
},
|
|
1957
|
-
children: /* @__PURE__ */
|
|
1958
|
-
/* @__PURE__ */
|
|
1959
|
-
|
|
1960
|
-
|
|
1957
|
+
children: /* @__PURE__ */ s(ve, { justify: "space-between", align: "flex-start", children: [
|
|
1958
|
+
/* @__PURE__ */ s(pe, { children: [
|
|
1959
|
+
c && /* @__PURE__ */ e(Ee, { fw: 600, size: "lg", children: c }),
|
|
1960
|
+
_ && /* @__PURE__ */ e(Ee, { size: "sm", c: "dimmed", mt: 4, children: _ })
|
|
1961
1961
|
] }),
|
|
1962
|
-
|
|
1962
|
+
D
|
|
1963
1963
|
] })
|
|
1964
1964
|
}
|
|
1965
1965
|
),
|
|
1966
|
-
/* @__PURE__ */ e(pe, { style: { flex: 1, minHeight: 0, display: "flex", flexDirection: "column" }, children: C && C.length > 0 ? /* @__PURE__ */
|
|
1966
|
+
/* @__PURE__ */ e(pe, { style: { flex: 1, minHeight: 0, display: "flex", flexDirection: "column" }, children: C && C.length > 0 ? /* @__PURE__ */ s(
|
|
1967
1967
|
at,
|
|
1968
1968
|
{
|
|
1969
|
-
value:
|
|
1969
|
+
value: L,
|
|
1970
1970
|
onChange: de,
|
|
1971
1971
|
variant: m,
|
|
1972
1972
|
style: { flex: 1, display: "flex", flexDirection: "column" },
|
|
1973
1973
|
children: [
|
|
1974
|
-
/* @__PURE__ */ e(at.List, { style: { flexShrink: 0, padding: "0 20px" }, children: C.map((
|
|
1974
|
+
/* @__PURE__ */ e(at.List, { style: { flexShrink: 0, padding: "0 20px" }, children: C.map((p) => /* @__PURE__ */ e(
|
|
1975
1975
|
at.Tab,
|
|
1976
1976
|
{
|
|
1977
|
-
value:
|
|
1978
|
-
leftSection:
|
|
1979
|
-
children:
|
|
1977
|
+
value: p.value,
|
|
1978
|
+
leftSection: p.icon,
|
|
1979
|
+
children: p.label
|
|
1980
1980
|
},
|
|
1981
|
-
|
|
1981
|
+
p.value
|
|
1982
1982
|
)) }),
|
|
1983
|
-
C.map((
|
|
1983
|
+
C.map((p) => /* @__PURE__ */ e(
|
|
1984
1984
|
at.Panel,
|
|
1985
1985
|
{
|
|
1986
|
-
value:
|
|
1986
|
+
value: p.value,
|
|
1987
1987
|
style: { flex: 1, minHeight: 0 },
|
|
1988
|
-
children: /* @__PURE__ */ e(Ze, { style: { height: "100%", padding: "20px" }, children:
|
|
1988
|
+
children: /* @__PURE__ */ e(Ze, { style: { height: "100%", padding: "20px" }, children: p.content })
|
|
1989
1989
|
},
|
|
1990
|
-
|
|
1990
|
+
p.value
|
|
1991
1991
|
))
|
|
1992
1992
|
]
|
|
1993
1993
|
}
|
|
1994
|
-
) : /* @__PURE__ */ e(Ze, { style: { flex: 1, padding: "20px" }, children:
|
|
1994
|
+
) : /* @__PURE__ */ e(Ze, { style: { flex: 1, padding: "20px" }, children: z }) })
|
|
1995
1995
|
]
|
|
1996
1996
|
}
|
|
1997
1997
|
) })
|
|
@@ -2017,11 +2017,11 @@ function _r({
|
|
|
2017
2017
|
);
|
|
2018
2018
|
}
|
|
2019
2019
|
function qr({ title: t, description: r, headerAction: o, children: f }) {
|
|
2020
|
-
return /* @__PURE__ */
|
|
2021
|
-
/* @__PURE__ */
|
|
2022
|
-
/* @__PURE__ */
|
|
2023
|
-
/* @__PURE__ */ e(
|
|
2024
|
-
r && /* @__PURE__ */ e(
|
|
2020
|
+
return /* @__PURE__ */ s(_e, { withBorder: !0, radius: "md", p: "md", children: [
|
|
2021
|
+
/* @__PURE__ */ s(ve, { justify: "space-between", align: "flex-start", mb: r || o ? "sm" : 0, children: [
|
|
2022
|
+
/* @__PURE__ */ s(pe, { children: [
|
|
2023
|
+
/* @__PURE__ */ e(Ee, { fw: 600, size: "sm", children: t }),
|
|
2024
|
+
r && /* @__PURE__ */ e(Ee, { size: "xs", c: "dimmed", mt: 2, children: r })
|
|
2025
2025
|
] }),
|
|
2026
2026
|
o
|
|
2027
2027
|
] }),
|
|
@@ -2029,9 +2029,9 @@ function qr({ title: t, description: r, headerAction: o, children: f }) {
|
|
|
2029
2029
|
] });
|
|
2030
2030
|
}
|
|
2031
2031
|
function Jr({ images: t, onAddImage: r, onRemoveImage: o, onSetCover: f, maxImages: n = 6 }) {
|
|
2032
|
-
const i = t.find((a) => a.isCover) || t[0], h = t.filter((a) => a.id !== i?.id),
|
|
2033
|
-
return /* @__PURE__ */
|
|
2034
|
-
i && /* @__PURE__ */
|
|
2032
|
+
const i = t.find((a) => a.isCover) || t[0], h = t.filter((a) => a.id !== i?.id), x = t.length < n;
|
|
2033
|
+
return /* @__PURE__ */ s(wt, { gap: "sm", children: [
|
|
2034
|
+
i && /* @__PURE__ */ s(pe, { style: { position: "relative" }, children: [
|
|
2035
2035
|
/* @__PURE__ */ e(
|
|
2036
2036
|
"img",
|
|
2037
2037
|
{
|
|
@@ -2056,8 +2056,8 @@ function Jr({ images: t, onAddImage: r, onRemoveImage: o, onSetCover: f, maxImag
|
|
|
2056
2056
|
}
|
|
2057
2057
|
)
|
|
2058
2058
|
] }),
|
|
2059
|
-
/* @__PURE__ */
|
|
2060
|
-
h.map((a) => /* @__PURE__ */ e(
|
|
2059
|
+
/* @__PURE__ */ s(Se, { gap: "sm", children: [
|
|
2060
|
+
h.map((a) => /* @__PURE__ */ e(Se.Col, { span: 4, children: /* @__PURE__ */ e(
|
|
2061
2061
|
pe,
|
|
2062
2062
|
{
|
|
2063
2063
|
style: { position: "relative", cursor: f ? "pointer" : "default" },
|
|
@@ -2078,7 +2078,7 @@ function Jr({ images: t, onAddImage: r, onRemoveImage: o, onSetCover: f, maxImag
|
|
|
2078
2078
|
)
|
|
2079
2079
|
}
|
|
2080
2080
|
) }, a.id)),
|
|
2081
|
-
|
|
2081
|
+
x && r && /* @__PURE__ */ e(Se.Col, { span: 4, children: /* @__PURE__ */ e(
|
|
2082
2082
|
pe,
|
|
2083
2083
|
{
|
|
2084
2084
|
onClick: r,
|
|
@@ -2093,13 +2093,13 @@ function Jr({ images: t, onAddImage: r, onRemoveImage: o, onSetCover: f, maxImag
|
|
|
2093
2093
|
cursor: "pointer",
|
|
2094
2094
|
backgroundColor: "var(--mantine-color-gray-0)"
|
|
2095
2095
|
},
|
|
2096
|
-
children: /* @__PURE__ */ e(
|
|
2096
|
+
children: /* @__PURE__ */ e(Ee, { size: "xl", c: "dimmed", children: "+" })
|
|
2097
2097
|
}
|
|
2098
2098
|
) })
|
|
2099
2099
|
] })
|
|
2100
2100
|
] });
|
|
2101
2101
|
}
|
|
2102
|
-
function
|
|
2102
|
+
function Cr(t, r) {
|
|
2103
2103
|
const {
|
|
2104
2104
|
// Props obrigatórias
|
|
2105
2105
|
opened: o,
|
|
@@ -2107,54 +2107,54 @@ function yr(t, r) {
|
|
|
2107
2107
|
children: n,
|
|
2108
2108
|
onClose: i,
|
|
2109
2109
|
idField: h,
|
|
2110
|
-
displayField:
|
|
2110
|
+
displayField: x,
|
|
2111
2111
|
// Seleção
|
|
2112
2112
|
selectionMode: a = "single",
|
|
2113
2113
|
onSelect: v,
|
|
2114
|
-
onSelectMultiple:
|
|
2114
|
+
onSelectMultiple: j,
|
|
2115
2115
|
initialSelectedItems: l,
|
|
2116
|
-
selectOnDoubleClick:
|
|
2117
|
-
onBeforeConfirm:
|
|
2118
|
-
onAfterConfirm:
|
|
2116
|
+
selectOnDoubleClick: c = !0,
|
|
2117
|
+
onBeforeConfirm: _,
|
|
2118
|
+
onAfterConfirm: D,
|
|
2119
2119
|
// DataSource
|
|
2120
2120
|
dataSource: C,
|
|
2121
2121
|
loadData: b,
|
|
2122
2122
|
loadDataPaged: m,
|
|
2123
|
-
searchFields:
|
|
2123
|
+
searchFields: z = "",
|
|
2124
2124
|
pageSize: w = 100,
|
|
2125
2125
|
// Aparência
|
|
2126
|
-
displaySubField:
|
|
2126
|
+
displaySubField: G,
|
|
2127
2127
|
renderSelectedItem: F,
|
|
2128
2128
|
renderSelectedItems: u,
|
|
2129
2129
|
icon: X,
|
|
2130
2130
|
modalSize: ee = "70%",
|
|
2131
2131
|
modalHeight: ae = "600px",
|
|
2132
2132
|
gridHeight: Q = 400,
|
|
2133
|
-
rowHeight:
|
|
2134
|
-
selectionIndicatorColor:
|
|
2133
|
+
rowHeight: M,
|
|
2134
|
+
selectionIndicatorColor: q = "blue.0",
|
|
2135
2135
|
showSelectionIndicator: R = !0,
|
|
2136
2136
|
// Múltipla seleção
|
|
2137
|
-
maxSelections:
|
|
2137
|
+
maxSelections: k,
|
|
2138
2138
|
showSelectionCount: le = !0,
|
|
2139
2139
|
allowClearAll: E = !0,
|
|
2140
2140
|
// Estado
|
|
2141
2141
|
isLoading: te,
|
|
2142
2142
|
isError: ue = !1,
|
|
2143
2143
|
error: re = "",
|
|
2144
|
-
clearError:
|
|
2145
|
-
autoCloseAlertError:
|
|
2146
|
-
onError:
|
|
2144
|
+
clearError: J,
|
|
2145
|
+
autoCloseAlertError: U = 15e3,
|
|
2146
|
+
onError: W,
|
|
2147
2147
|
// Customização
|
|
2148
|
-
userActions:
|
|
2148
|
+
userActions: O,
|
|
2149
2149
|
labels: Y,
|
|
2150
|
-
variant:
|
|
2150
|
+
variant: se,
|
|
2151
2151
|
// Segurança
|
|
2152
|
-
resourceName:
|
|
2152
|
+
resourceName: we,
|
|
2153
2153
|
resourceDescription: ne,
|
|
2154
2154
|
requiredPermissions: d,
|
|
2155
|
-
fallbackComponent:
|
|
2156
|
-
securityOptions:
|
|
2157
|
-
} = t,
|
|
2155
|
+
fallbackComponent: $,
|
|
2156
|
+
securityOptions: N
|
|
2157
|
+
} = t, Fe = Me(), he = ut(), { colorScheme: B } = ct(), fe = B === "dark", Ae = dt(), Re = fe ? "dark.5" : q, [Pe, ce] = H(!1), [L, de] = H(l || []), [Ge, T] = H(!1), [S, $e] = H(""), [Le, y] = H(0), [V, ke] = H(""), me = Ie(null), Be = Ie([]), De = !!m && !C, ge = !!C, ie = Z(() => ge && C ? C : (me.current || (me.current = new nr("dsLookup", {
|
|
2158
2158
|
records: [],
|
|
2159
2159
|
grandTotalRecords: 0,
|
|
2160
2160
|
currentPage: 0,
|
|
@@ -2162,9 +2162,9 @@ function yr(t, r) {
|
|
|
2162
2162
|
pageSize: w
|
|
2163
2163
|
})), me.current), [ge, C, w])();
|
|
2164
2164
|
Ue({
|
|
2165
|
-
autoRegisterActions:
|
|
2165
|
+
autoRegisterActions: N?.autoRegisterActions ?? !0
|
|
2166
2166
|
});
|
|
2167
|
-
const
|
|
2167
|
+
const p = We(
|
|
2168
2168
|
"ArchbaseLookupDataTemplate",
|
|
2169
2169
|
ie,
|
|
2170
2170
|
void 0,
|
|
@@ -2173,16 +2173,16 @@ function yr(t, r) {
|
|
|
2173
2173
|
it({
|
|
2174
2174
|
dataSource: ie,
|
|
2175
2175
|
listener: (A) => {
|
|
2176
|
-
if (A.type ===
|
|
2176
|
+
if (A.type === be.onError && (T(!0), $e(A.error || "")), A.type === be.afterScroll) {
|
|
2177
2177
|
if (a === "single") {
|
|
2178
|
-
const
|
|
2179
|
-
|
|
2178
|
+
const P = ie.getCurrentRecord();
|
|
2179
|
+
P && de([P]);
|
|
2180
2180
|
}
|
|
2181
|
-
|
|
2181
|
+
p.isDataSourceV2 || Ae();
|
|
2182
2182
|
}
|
|
2183
2183
|
}
|
|
2184
2184
|
});
|
|
2185
|
-
const
|
|
2185
|
+
const Ce = {
|
|
2186
2186
|
okButton: g().t("archbase:Ok"),
|
|
2187
2187
|
cancelButton: g().t("archbase:Cancel"),
|
|
2188
2188
|
clearButton: g().t("archbase:Clear"),
|
|
@@ -2192,67 +2192,67 @@ function yr(t, r) {
|
|
|
2192
2192
|
itemsSelected: g().t("archbase:items selected"),
|
|
2193
2193
|
...Y
|
|
2194
2194
|
}, Ne = Z(
|
|
2195
|
-
async (A,
|
|
2195
|
+
async (A, P) => {
|
|
2196
2196
|
if (!(ge || !m)) {
|
|
2197
|
-
|
|
2197
|
+
ce(!0);
|
|
2198
2198
|
try {
|
|
2199
|
-
const Ve = await m(A, w,
|
|
2199
|
+
const Ve = await m(A, w, P, z);
|
|
2200
2200
|
ie.open({
|
|
2201
2201
|
records: Ve.content,
|
|
2202
2202
|
grandTotalRecords: Ve.totalElements,
|
|
2203
2203
|
currentPage: A,
|
|
2204
2204
|
totalPages: Ve.totalPages,
|
|
2205
2205
|
pageSize: w
|
|
2206
|
-
}),
|
|
2206
|
+
}), y(A);
|
|
2207
2207
|
} catch (Ve) {
|
|
2208
|
-
|
|
2208
|
+
T(!0), $e(xe(Ve)), W?.(Ve);
|
|
2209
2209
|
} finally {
|
|
2210
|
-
|
|
2210
|
+
ce(!1);
|
|
2211
2211
|
}
|
|
2212
2212
|
}
|
|
2213
2213
|
},
|
|
2214
|
-
[ge, m,
|
|
2214
|
+
[ge, m, z, w, ie, W]
|
|
2215
2215
|
), je = Z(
|
|
2216
2216
|
async (A) => {
|
|
2217
2217
|
if (De)
|
|
2218
2218
|
return Ne(0, A);
|
|
2219
2219
|
if (!(ge || !b)) {
|
|
2220
|
-
|
|
2220
|
+
ce(!0);
|
|
2221
2221
|
try {
|
|
2222
|
-
const
|
|
2223
|
-
Be.current =
|
|
2224
|
-
records:
|
|
2225
|
-
grandTotalRecords:
|
|
2222
|
+
const P = await b(A, z);
|
|
2223
|
+
Be.current = P, ie.open({
|
|
2224
|
+
records: P,
|
|
2225
|
+
grandTotalRecords: P.length,
|
|
2226
2226
|
currentPage: 0,
|
|
2227
|
-
totalPages: Math.ceil(
|
|
2227
|
+
totalPages: Math.ceil(P.length / w),
|
|
2228
2228
|
pageSize: w
|
|
2229
2229
|
});
|
|
2230
|
-
} catch (
|
|
2231
|
-
|
|
2230
|
+
} catch (P) {
|
|
2231
|
+
T(!0), $e(xe(P)), W?.(P);
|
|
2232
2232
|
} finally {
|
|
2233
|
-
|
|
2233
|
+
ce(!1);
|
|
2234
2234
|
}
|
|
2235
2235
|
}
|
|
2236
2236
|
},
|
|
2237
|
-
[ge, De, b, Ne,
|
|
2237
|
+
[ge, De, b, Ne, z, w, ie, W]
|
|
2238
2238
|
), gt = Z(
|
|
2239
2239
|
(A) => {
|
|
2240
|
-
const
|
|
2241
|
-
if (ke(
|
|
2242
|
-
Ne(0,
|
|
2240
|
+
const P = A?.quickFilterValues?.[0] || "";
|
|
2241
|
+
if (ke(P), De) {
|
|
2242
|
+
Ne(0, P);
|
|
2243
2243
|
return;
|
|
2244
2244
|
}
|
|
2245
|
-
b && !ge && je(
|
|
2245
|
+
b && !ge && je(P);
|
|
2246
2246
|
},
|
|
2247
2247
|
[b, De, ge, je, Ne]
|
|
2248
2248
|
);
|
|
2249
2249
|
rt(() => {
|
|
2250
2250
|
if (ge)
|
|
2251
2251
|
return;
|
|
2252
|
-
const A = (
|
|
2253
|
-
const Ve =
|
|
2252
|
+
const A = (P) => {
|
|
2253
|
+
const Ve = P?.currentPage ?? 0, kt = P?.pageSize ?? w;
|
|
2254
2254
|
if (De) {
|
|
2255
|
-
Ne(Ve,
|
|
2255
|
+
Ne(Ve, V);
|
|
2256
2256
|
return;
|
|
2257
2257
|
}
|
|
2258
2258
|
const ot = Be.current;
|
|
@@ -2267,93 +2267,93 @@ function yr(t, r) {
|
|
|
2267
2267
|
return ie.emitter.on("refreshData", A), () => {
|
|
2268
2268
|
ie.emitter.off("refreshData", A);
|
|
2269
2269
|
};
|
|
2270
|
-
}, [ge, De, ie, w,
|
|
2270
|
+
}, [ge, De, ie, w, V, Ne]), rt(() => {
|
|
2271
2271
|
o && (l?.length ? de(l) : de([]), je());
|
|
2272
2272
|
}, [o]), rt(() => {
|
|
2273
2273
|
l && de(l);
|
|
2274
2274
|
}, [l]);
|
|
2275
2275
|
const Xe = Z(
|
|
2276
2276
|
(A) => {
|
|
2277
|
-
a === "single" ? de(A.slice(0, 1)) :
|
|
2277
|
+
a === "single" ? de(A.slice(0, 1)) : k && A.length > k ? de(A.slice(0, k)) : de(A);
|
|
2278
2278
|
},
|
|
2279
|
-
[a,
|
|
2279
|
+
[a, k]
|
|
2280
2280
|
), pt = Z(
|
|
2281
2281
|
(A) => {
|
|
2282
|
-
if (a === "single" &&
|
|
2283
|
-
const
|
|
2284
|
-
|
|
2282
|
+
if (a === "single" && c) {
|
|
2283
|
+
const P = ie.getCurrentRecord();
|
|
2284
|
+
P && (v?.(P), i());
|
|
2285
2285
|
}
|
|
2286
2286
|
},
|
|
2287
|
-
[a,
|
|
2287
|
+
[a, c, ie, v, i]
|
|
2288
2288
|
), xt = Z(() => {
|
|
2289
2289
|
de([]);
|
|
2290
2290
|
}, []), Ye = Z(async () => {
|
|
2291
|
-
|
|
2292
|
-
}, [
|
|
2291
|
+
_ && !await _(L) || (a === "single" ? L.length > 0 && v?.(L[0]) : j?.(L), D?.(L), i());
|
|
2292
|
+
}, [L, a, v, j, _, D, i]), I = Z(() => {
|
|
2293
2293
|
i();
|
|
2294
2294
|
}, [i]), Te = () => {
|
|
2295
2295
|
St.showWarning(g().t("archbase:Click on Ok or Cancel to close"));
|
|
2296
|
-
},
|
|
2297
|
-
|
|
2296
|
+
}, ye = () => {
|
|
2297
|
+
J?.(), T(!1), $e("");
|
|
2298
2298
|
};
|
|
2299
2299
|
Gt(
|
|
2300
2300
|
r,
|
|
2301
2301
|
() => ({
|
|
2302
|
-
getSelectedItems: () =>
|
|
2303
|
-
getSelectedItem: () =>
|
|
2302
|
+
getSelectedItems: () => L,
|
|
2303
|
+
getSelectedItem: () => L[0] || null,
|
|
2304
2304
|
clearSelection: () => de([]),
|
|
2305
2305
|
selectItems: (A) => Xe(A),
|
|
2306
2306
|
selectItem: (A) => de([A]),
|
|
2307
2307
|
deselectItem: (A) => {
|
|
2308
|
-
de((
|
|
2308
|
+
de((P) => P.filter((Ve) => Ve[h] !== A[h]));
|
|
2309
2309
|
},
|
|
2310
2310
|
refreshData: () => je(),
|
|
2311
2311
|
getDataSource: () => ie,
|
|
2312
2312
|
confirmSelection: async () => {
|
|
2313
2313
|
await Ye();
|
|
2314
2314
|
},
|
|
2315
|
-
cancelSelection:
|
|
2315
|
+
cancelSelection: I
|
|
2316
2316
|
}),
|
|
2317
|
-
[
|
|
2317
|
+
[L, Xe, h, je, ie, Ye, I]
|
|
2318
2318
|
);
|
|
2319
2319
|
const Ut = Z(
|
|
2320
2320
|
(A) => {
|
|
2321
|
-
const
|
|
2322
|
-
return
|
|
2321
|
+
const P = A[h];
|
|
2322
|
+
return P !== void 0 ? P : "";
|
|
2323
2323
|
},
|
|
2324
2324
|
[h]
|
|
2325
|
-
), Ht = te || Pe, _t = re ||
|
|
2325
|
+
), Ht = te || Pe, _t = re || S, qt = ue || Ge, Jt = /* @__PURE__ */ s(oe, { gap: "sm", children: [
|
|
2326
2326
|
X,
|
|
2327
|
-
/* @__PURE__ */ e(
|
|
2327
|
+
/* @__PURE__ */ e(Ee, { fw: 600, children: f })
|
|
2328
2328
|
] }), Wt = () => {
|
|
2329
2329
|
if (!R)
|
|
2330
2330
|
return null;
|
|
2331
|
-
if (a === "single" &&
|
|
2332
|
-
return F(
|
|
2333
|
-
if (a === "multiple" &&
|
|
2334
|
-
return u(
|
|
2335
|
-
if (a === "single" &&
|
|
2336
|
-
const A =
|
|
2337
|
-
return /* @__PURE__ */ e(_e, { withBorder: !0, p: "sm", radius: "md", bg:
|
|
2338
|
-
/* @__PURE__ */
|
|
2331
|
+
if (a === "single" && L.length > 0 && F)
|
|
2332
|
+
return F(L[0]);
|
|
2333
|
+
if (a === "multiple" && L.length > 0 && u)
|
|
2334
|
+
return u(L);
|
|
2335
|
+
if (a === "single" && L.length > 0) {
|
|
2336
|
+
const A = L[0];
|
|
2337
|
+
return /* @__PURE__ */ e(_e, { withBorder: !0, p: "sm", radius: "md", bg: Re, children: /* @__PURE__ */ s(oe, { justify: "space-between", children: [
|
|
2338
|
+
/* @__PURE__ */ s(oe, { gap: "xs", children: [
|
|
2339
2339
|
/* @__PURE__ */ e(et, { size: 16, color: "green" }),
|
|
2340
|
-
/* @__PURE__ */
|
|
2341
|
-
|
|
2340
|
+
/* @__PURE__ */ s(Ee, { size: "sm", fw: 500, children: [
|
|
2341
|
+
Ce.selectedLabel,
|
|
2342
2342
|
":"
|
|
2343
2343
|
] }),
|
|
2344
|
-
/* @__PURE__ */ e(
|
|
2345
|
-
|
|
2344
|
+
/* @__PURE__ */ e(Ee, { size: "sm", fw: 600, children: String(A[x]) }),
|
|
2345
|
+
G && /* @__PURE__ */ e(Ee, { size: "sm", c: fe ? "gray.4" : "dimmed", children: String(A[G] || "") })
|
|
2346
2346
|
] }),
|
|
2347
|
-
/* @__PURE__ */ e(
|
|
2347
|
+
/* @__PURE__ */ e(Ee, { size: "xs", c: fe ? "gray.4" : "dimmed", children: Ce.doubleClickHint })
|
|
2348
2348
|
] }) });
|
|
2349
2349
|
}
|
|
2350
|
-
return a === "multiple" &&
|
|
2351
|
-
/* @__PURE__ */
|
|
2350
|
+
return a === "multiple" && L.length > 0 ? /* @__PURE__ */ e(_e, { withBorder: !0, p: "sm", radius: "md", bg: Re, children: /* @__PURE__ */ s(oe, { justify: "space-between", children: [
|
|
2351
|
+
/* @__PURE__ */ s(oe, { gap: "xs", children: [
|
|
2352
2352
|
/* @__PURE__ */ e(et, { size: 16, color: "green" }),
|
|
2353
|
-
/* @__PURE__ */
|
|
2354
|
-
|
|
2353
|
+
/* @__PURE__ */ s(Ee, { size: "sm", fw: 500, children: [
|
|
2354
|
+
L.length,
|
|
2355
2355
|
" ",
|
|
2356
|
-
|
|
2356
|
+
Ce.itemsSelected
|
|
2357
2357
|
] })
|
|
2358
2358
|
] }),
|
|
2359
2359
|
E && /* @__PURE__ */ e(
|
|
@@ -2364,7 +2364,7 @@ function yr(t, r) {
|
|
|
2364
2364
|
color: "red",
|
|
2365
2365
|
leftSection: /* @__PURE__ */ e(nt, { size: 14 }),
|
|
2366
2366
|
onClick: xt,
|
|
2367
|
-
children:
|
|
2367
|
+
children: Ce.clearButton
|
|
2368
2368
|
}
|
|
2369
2369
|
)
|
|
2370
2370
|
] }) }) : null;
|
|
@@ -2372,12 +2372,12 @@ function yr(t, r) {
|
|
|
2372
2372
|
return /* @__PURE__ */ e(
|
|
2373
2373
|
He,
|
|
2374
2374
|
{
|
|
2375
|
-
resourceName:
|
|
2375
|
+
resourceName: we,
|
|
2376
2376
|
resourceDescription: ne,
|
|
2377
2377
|
requiredPermissions: d,
|
|
2378
|
-
fallbackComponent:
|
|
2379
|
-
onSecurityReady:
|
|
2380
|
-
onAccessDenied:
|
|
2378
|
+
fallbackComponent: $,
|
|
2379
|
+
onSecurityReady: N?.onSecurityReady,
|
|
2380
|
+
onAccessDenied: N?.onAccessDenied,
|
|
2381
2381
|
children: /* @__PURE__ */ e(
|
|
2382
2382
|
bt,
|
|
2383
2383
|
{
|
|
@@ -2390,32 +2390,32 @@ function yr(t, r) {
|
|
|
2390
2390
|
closeOnClickOutside: !1,
|
|
2391
2391
|
withCloseButton: !1,
|
|
2392
2392
|
overlayProps: {
|
|
2393
|
-
color:
|
|
2393
|
+
color: B === "dark" ? he.colors.dark[7] : he.colors.gray[6],
|
|
2394
2394
|
opacity: 0.25
|
|
2395
2395
|
},
|
|
2396
|
-
children: /* @__PURE__ */
|
|
2396
|
+
children: /* @__PURE__ */ s(ht, { height: ae, children: [
|
|
2397
2397
|
qt && /* @__PURE__ */ e(It, { size: "100px", children: /* @__PURE__ */ e(
|
|
2398
2398
|
Qe,
|
|
2399
2399
|
{
|
|
2400
|
-
autoClose:
|
|
2400
|
+
autoClose: U,
|
|
2401
2401
|
withCloseButton: !0,
|
|
2402
2402
|
withBorder: !0,
|
|
2403
2403
|
icon: /* @__PURE__ */ e(Ke, { size: "1.4rem" }),
|
|
2404
2404
|
title: g().t("archbase:WARNING"),
|
|
2405
2405
|
titleColor: "rgb(250, 82, 82)",
|
|
2406
|
-
variant:
|
|
2407
|
-
onClose:
|
|
2406
|
+
variant: se ?? Fe.variant,
|
|
2407
|
+
onClose: ye,
|
|
2408
2408
|
children: /* @__PURE__ */ e("span", { children: _t })
|
|
2409
2409
|
}
|
|
2410
2410
|
) }),
|
|
2411
|
-
/* @__PURE__ */ e(ft, { children: /* @__PURE__ */
|
|
2412
|
-
|
|
2411
|
+
/* @__PURE__ */ e(ft, { children: /* @__PURE__ */ s(wt, { gap: "md", h: "100%", children: [
|
|
2412
|
+
O && /* @__PURE__ */ e(oe, { justify: "flex-end", children: O }),
|
|
2413
2413
|
/* @__PURE__ */ e(
|
|
2414
2414
|
Lt,
|
|
2415
2415
|
{
|
|
2416
2416
|
dataSource: ie,
|
|
2417
2417
|
height: Q,
|
|
2418
|
-
rowHeight:
|
|
2418
|
+
rowHeight: M,
|
|
2419
2419
|
withBorder: !0,
|
|
2420
2420
|
striped: !0,
|
|
2421
2421
|
highlightOnHover: !0,
|
|
@@ -2434,9 +2434,9 @@ function yr(t, r) {
|
|
|
2434
2434
|
),
|
|
2435
2435
|
Wt()
|
|
2436
2436
|
] }) }),
|
|
2437
|
-
/* @__PURE__ */ e(mt, { size: "50px", children: /* @__PURE__ */
|
|
2437
|
+
/* @__PURE__ */ e(mt, { size: "50px", children: /* @__PURE__ */ s(ve, { justify: "space-between", align: "center", children: [
|
|
2438
2438
|
/* @__PURE__ */ e(oe, {}),
|
|
2439
|
-
/* @__PURE__ */
|
|
2439
|
+
/* @__PURE__ */ s(oe, { gap: "md", children: [
|
|
2440
2440
|
/* @__PURE__ */ e(
|
|
2441
2441
|
K,
|
|
2442
2442
|
{
|
|
@@ -2444,10 +2444,10 @@ function yr(t, r) {
|
|
|
2444
2444
|
actionDescription: "Confirmar seleção",
|
|
2445
2445
|
leftSection: /* @__PURE__ */ e(et, {}),
|
|
2446
2446
|
onClick: Ye,
|
|
2447
|
-
disabled:
|
|
2448
|
-
variant:
|
|
2447
|
+
disabled: L.length === 0,
|
|
2448
|
+
variant: se ?? Fe.variant,
|
|
2449
2449
|
color: "green",
|
|
2450
|
-
children:
|
|
2450
|
+
children: Ce.okButton
|
|
2451
2451
|
}
|
|
2452
2452
|
),
|
|
2453
2453
|
/* @__PURE__ */ e(
|
|
@@ -2456,10 +2456,10 @@ function yr(t, r) {
|
|
|
2456
2456
|
actionName: "cancel",
|
|
2457
2457
|
actionDescription: "Cancelar seleção",
|
|
2458
2458
|
leftSection: /* @__PURE__ */ e(ze, {}),
|
|
2459
|
-
onClick:
|
|
2460
|
-
variant:
|
|
2459
|
+
onClick: I,
|
|
2460
|
+
variant: se ?? Fe.variant,
|
|
2461
2461
|
color: "red",
|
|
2462
|
-
children:
|
|
2462
|
+
children: Ce.cancelButton
|
|
2463
2463
|
}
|
|
2464
2464
|
)
|
|
2465
2465
|
] })
|
|
@@ -2470,18 +2470,18 @@ function yr(t, r) {
|
|
|
2470
2470
|
}
|
|
2471
2471
|
);
|
|
2472
2472
|
}
|
|
2473
|
-
const Wr = zt(
|
|
2473
|
+
const Wr = zt(Cr), Tt = rr(void 0);
|
|
2474
2474
|
function Or({ children: t }) {
|
|
2475
|
-
const [r, o] =
|
|
2476
|
-
o((v) => ({ ...v, [
|
|
2477
|
-
}, []), n = Z((
|
|
2475
|
+
const [r, o] = H({}), f = Z((x, a) => {
|
|
2476
|
+
o((v) => ({ ...v, [x]: a }));
|
|
2477
|
+
}, []), n = Z((x) => {
|
|
2478
2478
|
o((a) => {
|
|
2479
2479
|
const v = { ...a };
|
|
2480
|
-
return delete v[
|
|
2480
|
+
return delete v[x], v;
|
|
2481
2481
|
});
|
|
2482
2482
|
}, []), i = Z(() => {
|
|
2483
2483
|
o({});
|
|
2484
|
-
}, []), h = Z((
|
|
2484
|
+
}, []), h = Z((x) => r[x], [r]);
|
|
2485
2485
|
return /* @__PURE__ */ e(Tt.Provider, { value: { errors: r, setError: f, clearError: n, clearAll: i, getError: h }, children: t });
|
|
2486
2486
|
}
|
|
2487
2487
|
function Kr() {
|