@archbase/template 3.0.12 → 3.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1050 -1052
- package/dist/template/src/ArchbaseMasonryTemplate.d.ts +3 -5
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as e, Fragment as
|
|
2
|
-
import { Button as
|
|
1
|
+
import { jsx as e, Fragment as Be, jsxs as x } from "react/jsx-runtime";
|
|
2
|
+
import { Button as qe, Paper as Je, Box as Oe, ScrollArea as vt, LoadingOverlay as wt, Group as se, useMantineColorScheme as Xe, Modal as ut, Flex as me, px as Bt, Text as Se, Grid as ye, Pagination as yt, Stack as Vt } from "@mantine/core";
|
|
3
3
|
import { useForceUpdate as ht, useUncontrolled as Nt, useHotkeys as kt } from "@mantine/hooks";
|
|
4
|
-
import { IconBug as
|
|
5
|
-
import { useArchbaseAppContext as
|
|
6
|
-
import
|
|
7
|
-
import { useArchbaseV1V2Compatibility as
|
|
8
|
-
import { ArchbaseAlert as
|
|
9
|
-
import { ArchbaseSpaceFixed as
|
|
4
|
+
import { IconBug as _e, IconDeviceFloppy as Pt, IconX as Te, IconCheck as je, IconPlus as ft, IconEdit as mt, IconTrash as Ye, IconEye as gt } from "@tabler/icons-react";
|
|
5
|
+
import { useArchbaseAppContext as Fe, useValidationErrors as Gt, ValidationErrorsProvider as Ft, getI18nextInstance as C, processErrorMessage as ge, useArchbaseTheme as Ze, emit as $t, useArchbaseTranslation as Lt } from "@archbase/core";
|
|
6
|
+
import He, { useMemo as Ie, useState as W, useCallback as Q, forwardRef as At, useRef as fe, useImperativeHandle as Rt, useEffect as Qe, Fragment as zt, Profiler as Mt, createContext as Ut, useContext as Et } from "react";
|
|
7
|
+
import { useArchbaseV1V2Compatibility as Ve, useArchbaseDataSourceListener as et, DataSourceEventNames as be, ArchbaseDataSource as jt } from "@archbase/data";
|
|
8
|
+
import { ArchbaseAlert as We, ArchbaseDialog as pt, ArchbaseDataGrid as St, GridToolBarActions as Ht, ArchbaseDebugInspector as qt, ArchbaseMasonryProvider as Jt, ArchbaseMasonryResponsive as _t, ArchbaseMasonry as Wt, ArchbaseActionButtons as Ot } from "@archbase/components";
|
|
9
|
+
import { ArchbaseSpaceFixed as tt, ArchbaseSpaceTop as bt, ArchbaseSpaceFill as nt, ArchbaseForm as It, ArchbaseSpaceBottom as rt } from "@archbase/layout";
|
|
10
10
|
import { ArchbaseQueryBuilder as Ct, buildFrom as Kt, ArchbaseGlobalFilter as Qt } from "@archbase/advanced";
|
|
11
|
-
import
|
|
11
|
+
import Ke from "@rehooks/component-size";
|
|
12
12
|
import { uniqueId as Xt } from "lodash";
|
|
13
13
|
const Yt = {
|
|
14
14
|
isAvailable: !1,
|
|
@@ -21,97 +21,97 @@ const Yt = {
|
|
|
21
21
|
canEdit: !0,
|
|
22
22
|
canDelete: !0,
|
|
23
23
|
canView: !0
|
|
24
|
-
},
|
|
25
|
-
function
|
|
24
|
+
}, Ae = (t) => Ie(() => Yt, []), xn = () => !1;
|
|
25
|
+
function vn(t) {
|
|
26
26
|
const {
|
|
27
27
|
onSelect: n,
|
|
28
|
-
onSelectMultiple:
|
|
28
|
+
onSelectMultiple: l,
|
|
29
29
|
initialValue: h = null,
|
|
30
30
|
initialValues: r = [],
|
|
31
31
|
selectionMode: i = "single",
|
|
32
|
-
autoClose:
|
|
33
|
-
onOpen:
|
|
32
|
+
autoClose: c = !0,
|
|
33
|
+
onOpen: p,
|
|
34
34
|
onClose: u
|
|
35
|
-
} = t || {}, [
|
|
36
|
-
|
|
37
|
-
}, [
|
|
38
|
-
|
|
39
|
-
}, [u]),
|
|
40
|
-
a(null),
|
|
41
|
-
}, []),
|
|
42
|
-
(
|
|
43
|
-
a(
|
|
35
|
+
} = t || {}, [v, G] = W(!1), [o, a] = W(h), [D, F] = W(r), S = Q(() => {
|
|
36
|
+
G(!0), p?.();
|
|
37
|
+
}, [p]), f = Q(() => {
|
|
38
|
+
G(!1), u?.();
|
|
39
|
+
}, [u]), d = Q(() => {
|
|
40
|
+
a(null), F([]);
|
|
41
|
+
}, []), I = Q(
|
|
42
|
+
(m) => {
|
|
43
|
+
a(m), F([m]), n?.(m), c && (G(!1), u?.());
|
|
44
44
|
},
|
|
45
|
-
[n,
|
|
46
|
-
),
|
|
47
|
-
(
|
|
48
|
-
|
|
45
|
+
[n, c, u]
|
|
46
|
+
), T = Q(
|
|
47
|
+
(m) => {
|
|
48
|
+
F(m), a(m.length > 0 ? m[0] : null), l?.(m), c && (G(!1), u?.());
|
|
49
49
|
},
|
|
50
|
-
[
|
|
51
|
-
),
|
|
52
|
-
|
|
53
|
-
}, [u]),
|
|
50
|
+
[l, c, u]
|
|
51
|
+
), z = Q(() => {
|
|
52
|
+
G(!1), u?.();
|
|
53
|
+
}, [u]), A = Ie(
|
|
54
54
|
() => ({
|
|
55
|
-
opened:
|
|
56
|
-
onClose:
|
|
57
|
-
onSelect:
|
|
58
|
-
onSelectMultiple:
|
|
55
|
+
opened: v,
|
|
56
|
+
onClose: z,
|
|
57
|
+
onSelect: I,
|
|
58
|
+
onSelectMultiple: T,
|
|
59
59
|
selectionMode: i,
|
|
60
|
-
initialSelectedItems: i === "multiple" ?
|
|
60
|
+
initialSelectedItems: i === "multiple" ? D : o ? [o] : void 0
|
|
61
61
|
}),
|
|
62
|
-
[
|
|
62
|
+
[v, z, I, T, i, o, D]
|
|
63
63
|
);
|
|
64
64
|
return {
|
|
65
65
|
// Estado
|
|
66
|
-
opened:
|
|
66
|
+
opened: v,
|
|
67
67
|
selectedItem: o,
|
|
68
|
-
selectedItems:
|
|
68
|
+
selectedItems: D,
|
|
69
69
|
// Ações
|
|
70
|
-
open:
|
|
70
|
+
open: S,
|
|
71
71
|
close: f,
|
|
72
|
-
clear:
|
|
72
|
+
clear: d,
|
|
73
73
|
setSelectedItem: a,
|
|
74
|
-
setSelectedItems:
|
|
74
|
+
setSelectedItems: F,
|
|
75
75
|
// Handlers
|
|
76
|
-
handleSelect:
|
|
77
|
-
handleSelectMultiple:
|
|
78
|
-
handleClose:
|
|
76
|
+
handleSelect: I,
|
|
77
|
+
handleSelectMultiple: T,
|
|
78
|
+
handleClose: z,
|
|
79
79
|
// Props para template
|
|
80
|
-
lookupProps:
|
|
80
|
+
lookupProps: A
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
|
-
const
|
|
83
|
+
const ee = ({
|
|
84
84
|
actionName: t,
|
|
85
85
|
actionDescription: n,
|
|
86
|
-
children:
|
|
86
|
+
children: l,
|
|
87
87
|
fallback: h = null,
|
|
88
88
|
autoRegister: r = !0,
|
|
89
89
|
onClick: i,
|
|
90
|
-
...
|
|
90
|
+
...c
|
|
91
91
|
}) => {
|
|
92
|
-
const
|
|
93
|
-
return
|
|
94
|
-
r && t && n &&
|
|
95
|
-
}, [t, n, r,
|
|
96
|
-
},
|
|
92
|
+
const p = Ae();
|
|
93
|
+
return He.useEffect(() => {
|
|
94
|
+
r && t && n && p.isAvailable && p.registerAction();
|
|
95
|
+
}, [t, n, r, p.isAvailable, p.registerAction]), !t || !p.isAvailable ? /* @__PURE__ */ e(qe, { onClick: i, ...c, children: l }) : p.hasPermission() ? /* @__PURE__ */ e(qe, { onClick: i, ...c, children: l }) : /* @__PURE__ */ e(Be, { children: h });
|
|
96
|
+
}, wn = ({
|
|
97
97
|
actionName: t,
|
|
98
98
|
actionDescription: n,
|
|
99
|
-
children:
|
|
99
|
+
children: l,
|
|
100
100
|
fallback: h = null,
|
|
101
101
|
onClick: r,
|
|
102
102
|
...i
|
|
103
103
|
}) => {
|
|
104
|
-
const [
|
|
105
|
-
return
|
|
104
|
+
const [c, p] = He.useState(null), [u, v] = He.useState(!1);
|
|
105
|
+
return He.useEffect(() => {
|
|
106
106
|
if (!t) {
|
|
107
|
-
|
|
107
|
+
p(/* @__PURE__ */ e(qe, { onClick: r, ...i, children: l }));
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
|
-
|
|
111
|
-
}, [t, n,
|
|
112
|
-
},
|
|
110
|
+
v(!1), p(/* @__PURE__ */ e(qe, { onClick: r, ...i, children: l }));
|
|
111
|
+
}, [t, n, l, h, i]), /* @__PURE__ */ e(Be, { children: c });
|
|
112
|
+
}, Re = ({
|
|
113
113
|
children: t
|
|
114
|
-
}) => /* @__PURE__ */ e(
|
|
114
|
+
}) => /* @__PURE__ */ e(Be, { children: t }), yn = (t) => Ie(() => ({
|
|
115
115
|
shouldWrap: !1,
|
|
116
116
|
isSecurityAvailable: !1,
|
|
117
117
|
hasResourceName: !!t
|
|
@@ -119,110 +119,110 @@ const he = ({
|
|
|
119
119
|
function Fn({
|
|
120
120
|
innerRef: t,
|
|
121
121
|
title: n,
|
|
122
|
-
isError:
|
|
122
|
+
isError: l = !1,
|
|
123
123
|
isCanceling: h = !1,
|
|
124
124
|
isSaving: r = !1,
|
|
125
125
|
error: i = "",
|
|
126
|
-
clearError:
|
|
126
|
+
clearError: c = () => {
|
|
127
127
|
},
|
|
128
|
-
autoCloseAlertError:
|
|
128
|
+
autoCloseAlertError: p = 15e3,
|
|
129
129
|
width: u = "100%",
|
|
130
|
-
height:
|
|
131
|
-
withBorder:
|
|
130
|
+
height: v = "100%",
|
|
131
|
+
withBorder: G = !0,
|
|
132
132
|
children: o,
|
|
133
133
|
radius: a,
|
|
134
|
-
variant:
|
|
135
|
-
footerAlign:
|
|
136
|
-
footerContent:
|
|
134
|
+
variant: D,
|
|
135
|
+
footerAlign: F = "left",
|
|
136
|
+
footerContent: S,
|
|
137
137
|
dataSource: f,
|
|
138
|
-
onSave:
|
|
139
|
-
onCancel:
|
|
140
|
-
onBeforeSave:
|
|
141
|
-
onAfterSave:
|
|
142
|
-
onBeforeCancel:
|
|
143
|
-
onAfterCancel:
|
|
144
|
-
onError:
|
|
138
|
+
onSave: d,
|
|
139
|
+
onCancel: I,
|
|
140
|
+
onBeforeSave: T,
|
|
141
|
+
onAfterSave: z,
|
|
142
|
+
onBeforeCancel: A,
|
|
143
|
+
onAfterCancel: m,
|
|
144
|
+
onError: B,
|
|
145
145
|
// Props de segurança (opcionais)
|
|
146
|
-
resourceName:
|
|
146
|
+
resourceName: oe,
|
|
147
147
|
resourceDescription: te,
|
|
148
|
-
requiredPermissions:
|
|
149
|
-
fallbackComponent:
|
|
150
|
-
securityOptions:
|
|
151
|
-
...
|
|
148
|
+
requiredPermissions: O,
|
|
149
|
+
fallbackComponent: M,
|
|
150
|
+
securityOptions: N,
|
|
151
|
+
...E
|
|
152
152
|
}) {
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
autoRegisterActions:
|
|
153
|
+
const V = Fe(), [X, k] = W(l), [Y, ne] = W(i), Z = ht();
|
|
154
|
+
Ae({
|
|
155
|
+
autoRegisterActions: N?.autoRegisterActions ?? !0
|
|
156
156
|
});
|
|
157
|
-
const
|
|
157
|
+
const U = Ve(
|
|
158
158
|
"ArchbaseFormTemplate",
|
|
159
159
|
f,
|
|
160
160
|
void 0,
|
|
161
161
|
void 0
|
|
162
162
|
);
|
|
163
|
-
|
|
163
|
+
et({
|
|
164
164
|
dataSource: f,
|
|
165
|
-
listener: (
|
|
166
|
-
|
|
165
|
+
listener: (j) => {
|
|
166
|
+
j.type === be.onError && (k(!0), ne(j.error)), (j.type === be.afterEdit || j.type === be.afterInsert) && (U.isDataSourceV2 || Z());
|
|
167
167
|
}
|
|
168
168
|
});
|
|
169
|
-
const
|
|
169
|
+
const $ = Gt(), J = async (j) => {
|
|
170
170
|
try {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}).catch((
|
|
174
|
-
|
|
171
|
+
d ? d(j) : (T && await T(j), f.isBrowsing() || f.save().then(() => {
|
|
172
|
+
$?.clearAll(), z && z(j);
|
|
173
|
+
}).catch((le) => {
|
|
174
|
+
B && B(ge(le)), k(!0), ne(ge(le));
|
|
175
175
|
}));
|
|
176
|
-
} catch (
|
|
177
|
-
|
|
176
|
+
} catch (le) {
|
|
177
|
+
B && B(ge(le)), k(!0), ne(ge(le));
|
|
178
178
|
}
|
|
179
|
-
},
|
|
179
|
+
}, re = () => {
|
|
180
180
|
try {
|
|
181
|
-
|
|
182
|
-
} catch (
|
|
183
|
-
|
|
181
|
+
I ? I() : (A && A(), f.isBrowsing() || f.cancel(), $?.clearAll(), m && m());
|
|
182
|
+
} catch (j) {
|
|
183
|
+
B && B(ge(j)), k(!0), ne(ge(j));
|
|
184
184
|
}
|
|
185
|
-
},
|
|
186
|
-
|
|
185
|
+
}, ie = () => {
|
|
186
|
+
c && c(), k(!1), ne("");
|
|
187
187
|
};
|
|
188
188
|
return /* @__PURE__ */ e(
|
|
189
|
-
|
|
189
|
+
Re,
|
|
190
190
|
{
|
|
191
|
-
resourceName:
|
|
191
|
+
resourceName: oe,
|
|
192
192
|
resourceDescription: te,
|
|
193
|
-
requiredPermissions:
|
|
194
|
-
fallbackComponent:
|
|
195
|
-
onSecurityReady:
|
|
196
|
-
onAccessDenied:
|
|
197
|
-
children: /* @__PURE__ */ e(
|
|
198
|
-
|
|
193
|
+
requiredPermissions: O,
|
|
194
|
+
fallbackComponent: M,
|
|
195
|
+
onSecurityReady: N?.onSecurityReady,
|
|
196
|
+
onAccessDenied: N?.onAccessDenied,
|
|
197
|
+
children: /* @__PURE__ */ e(Ft, { children: /* @__PURE__ */ x(
|
|
198
|
+
Je,
|
|
199
199
|
{
|
|
200
200
|
ref: t,
|
|
201
|
-
withBorder:
|
|
201
|
+
withBorder: G,
|
|
202
202
|
radius: a,
|
|
203
203
|
style: {
|
|
204
204
|
width: u,
|
|
205
|
-
height:
|
|
205
|
+
height: v,
|
|
206
206
|
display: "flex",
|
|
207
207
|
flexDirection: "column",
|
|
208
208
|
padding: 4
|
|
209
209
|
},
|
|
210
210
|
children: [
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
X && /* @__PURE__ */ e(Oe, { style: { flexShrink: 0 }, children: /* @__PURE__ */ e(
|
|
212
|
+
We,
|
|
213
213
|
{
|
|
214
|
-
autoClose:
|
|
214
|
+
autoClose: p,
|
|
215
215
|
withCloseButton: !0,
|
|
216
216
|
withBorder: !0,
|
|
217
|
-
icon: /* @__PURE__ */ e(
|
|
218
|
-
title:
|
|
217
|
+
icon: /* @__PURE__ */ e(_e, { size: "1.4rem" }),
|
|
218
|
+
title: C().t("WARNING"),
|
|
219
219
|
titleColor: "rgb(250, 82, 82)",
|
|
220
|
-
variant:
|
|
221
|
-
onClose:
|
|
222
|
-
children: /* @__PURE__ */ e("span", { children:
|
|
220
|
+
variant: D ?? V.variant,
|
|
221
|
+
onClose: ie,
|
|
222
|
+
children: /* @__PURE__ */ e("span", { children: Y })
|
|
223
223
|
}
|
|
224
224
|
) }),
|
|
225
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ x(
|
|
226
226
|
vt,
|
|
227
227
|
{
|
|
228
228
|
style: {
|
|
@@ -237,58 +237,58 @@ function Fn({
|
|
|
237
237
|
]
|
|
238
238
|
}
|
|
239
239
|
),
|
|
240
|
-
/* @__PURE__ */
|
|
241
|
-
|
|
240
|
+
/* @__PURE__ */ x(
|
|
241
|
+
Oe,
|
|
242
242
|
{
|
|
243
243
|
style: {
|
|
244
244
|
flexShrink: 0,
|
|
245
245
|
padding: "calc(0.625rem / 2)",
|
|
246
246
|
display: "flex",
|
|
247
|
-
justifyContent:
|
|
247
|
+
justifyContent: F === "center" ? "center" : "space-between",
|
|
248
248
|
alignItems: "center",
|
|
249
249
|
gap: "1rem"
|
|
250
250
|
},
|
|
251
251
|
children: [
|
|
252
|
-
|
|
253
|
-
f && !f.isBrowsing() ? /* @__PURE__ */
|
|
252
|
+
F === "right" && S && /* @__PURE__ */ e(Oe, { style: { flex: 1 }, children: S }),
|
|
253
|
+
f && !f.isBrowsing() ? /* @__PURE__ */ x(se, { gap: "md", children: [
|
|
254
254
|
/* @__PURE__ */ e(
|
|
255
|
-
|
|
255
|
+
ee,
|
|
256
256
|
{
|
|
257
257
|
actionName: "save",
|
|
258
258
|
actionDescription: `Salvar ${te || "registro"}`,
|
|
259
|
-
leftSection: /* @__PURE__ */ e(
|
|
260
|
-
onClick: () =>
|
|
259
|
+
leftSection: /* @__PURE__ */ e(Pt, {}),
|
|
260
|
+
onClick: () => J(f.getCurrentRecord()),
|
|
261
261
|
disabled: f && f.isBrowsing(),
|
|
262
|
-
variant:
|
|
262
|
+
variant: D ?? V.variant,
|
|
263
263
|
color: "green",
|
|
264
|
-
children: `${
|
|
264
|
+
children: `${C().t("Ok")}`
|
|
265
265
|
}
|
|
266
266
|
),
|
|
267
267
|
/* @__PURE__ */ e(
|
|
268
|
-
|
|
268
|
+
ee,
|
|
269
269
|
{
|
|
270
270
|
actionName: "cancel",
|
|
271
271
|
actionDescription: "Cancelar operação",
|
|
272
|
-
leftSection: /* @__PURE__ */ e(
|
|
273
|
-
onClick:
|
|
272
|
+
leftSection: /* @__PURE__ */ e(Te, {}),
|
|
273
|
+
onClick: re,
|
|
274
274
|
disabled: f && f.isBrowsing(),
|
|
275
|
-
variant:
|
|
275
|
+
variant: D ?? V.variant,
|
|
276
276
|
color: "red",
|
|
277
|
-
children: `${
|
|
277
|
+
children: `${C().t("Cancel")}`
|
|
278
278
|
}
|
|
279
279
|
)
|
|
280
|
-
] }) : /* @__PURE__ */ e(
|
|
281
|
-
|
|
280
|
+
] }) : /* @__PURE__ */ e(se, { gap: "md", children: /* @__PURE__ */ e(
|
|
281
|
+
ee,
|
|
282
282
|
{
|
|
283
283
|
actionName: "close",
|
|
284
284
|
actionDescription: "Fechar formulário",
|
|
285
|
-
leftSection: /* @__PURE__ */ e(
|
|
286
|
-
onClick:
|
|
287
|
-
variant:
|
|
288
|
-
children: `${
|
|
285
|
+
leftSection: /* @__PURE__ */ e(Te, {}),
|
|
286
|
+
onClick: re,
|
|
287
|
+
variant: D ?? V.variant,
|
|
288
|
+
children: `${C().t("Close")}`
|
|
289
289
|
}
|
|
290
290
|
) }),
|
|
291
|
-
(
|
|
291
|
+
(F === "left" || F === "center") && S && /* @__PURE__ */ e(Oe, { style: { flex: F === "left" ? 1 : 0, textAlign: "right" }, children: S })
|
|
292
292
|
]
|
|
293
293
|
}
|
|
294
294
|
)
|
|
@@ -298,177 +298,177 @@ function Fn({
|
|
|
298
298
|
}
|
|
299
299
|
);
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function An({
|
|
302
302
|
title: t,
|
|
303
303
|
withOverlay: n = !0,
|
|
304
|
-
overlayProps:
|
|
304
|
+
overlayProps: l,
|
|
305
305
|
children: h,
|
|
306
306
|
withCloseButton: r = !0,
|
|
307
307
|
closeButtonProps: i,
|
|
308
|
-
opened:
|
|
309
|
-
fullScreen:
|
|
308
|
+
opened: c,
|
|
309
|
+
fullScreen: p,
|
|
310
310
|
centered: u,
|
|
311
|
-
variant:
|
|
312
|
-
closeOnEscape:
|
|
311
|
+
variant: v,
|
|
312
|
+
closeOnEscape: G = !0,
|
|
313
313
|
size: o,
|
|
314
314
|
dataSource: a,
|
|
315
|
-
height:
|
|
316
|
-
userActions:
|
|
317
|
-
onAfterSave:
|
|
315
|
+
height: D,
|
|
316
|
+
userActions: F,
|
|
317
|
+
onAfterSave: S,
|
|
318
318
|
onClickOk: f,
|
|
319
|
-
onClickCancel:
|
|
320
|
-
onBeforeOk:
|
|
321
|
-
onCustomSave:
|
|
322
|
-
isError:
|
|
323
|
-
error:
|
|
324
|
-
clearError:
|
|
319
|
+
onClickCancel: d,
|
|
320
|
+
onBeforeOk: I,
|
|
321
|
+
onCustomSave: T,
|
|
322
|
+
isError: z,
|
|
323
|
+
error: A = "",
|
|
324
|
+
clearError: m = () => {
|
|
325
325
|
},
|
|
326
|
-
onError:
|
|
327
|
-
autoCloseAlertError:
|
|
326
|
+
onError: B,
|
|
327
|
+
autoCloseAlertError: oe = 15e3,
|
|
328
328
|
loadingOverlayStyles: te,
|
|
329
329
|
// Props de segurança (opcionais)
|
|
330
|
-
resourceName:
|
|
331
|
-
resourceDescription:
|
|
332
|
-
requiredPermissions:
|
|
333
|
-
fallbackComponent:
|
|
334
|
-
securityOptions:
|
|
335
|
-
...
|
|
330
|
+
resourceName: O,
|
|
331
|
+
resourceDescription: M,
|
|
332
|
+
requiredPermissions: N,
|
|
333
|
+
fallbackComponent: E,
|
|
334
|
+
securityOptions: V,
|
|
335
|
+
...X
|
|
336
336
|
}) {
|
|
337
|
-
const
|
|
338
|
-
|
|
339
|
-
resourceDescription:
|
|
340
|
-
autoRegisterActions:
|
|
337
|
+
const k = Fe(), Y = Ze(), { colorScheme: ne } = Xe(), [Z, U] = W(z), [$, J] = W(A), [re, ie] = W(!1), j = ht();
|
|
338
|
+
Ae({
|
|
339
|
+
resourceDescription: M || t?.toString(),
|
|
340
|
+
autoRegisterActions: V?.autoRegisterActions ?? !0
|
|
341
341
|
});
|
|
342
|
-
const
|
|
342
|
+
const le = Ve(
|
|
343
343
|
"ArchbaseFormModalTemplate",
|
|
344
344
|
a,
|
|
345
345
|
void 0,
|
|
346
346
|
void 0
|
|
347
347
|
);
|
|
348
|
-
|
|
348
|
+
et({
|
|
349
349
|
dataSource: a,
|
|
350
|
-
listener: (
|
|
351
|
-
|
|
350
|
+
listener: (H) => {
|
|
351
|
+
H.type === be.onError && (U(!0), J(H.error)), (H.type === be.afterEdit || H.type === be.afterInsert) && (le.isDataSourceV2 || j());
|
|
352
352
|
}
|
|
353
353
|
});
|
|
354
|
-
const
|
|
354
|
+
const de = async () => {
|
|
355
355
|
if (a && !a.isBrowsing())
|
|
356
356
|
try {
|
|
357
|
-
|
|
358
|
-
} catch (
|
|
359
|
-
return
|
|
357
|
+
ie(!0), await a.save(), S && S(a.getCurrentRecord());
|
|
358
|
+
} catch (H) {
|
|
359
|
+
return B && B(ge(H)), U(!0), J(ge(H)), ie(!1), !1;
|
|
360
360
|
}
|
|
361
|
-
return
|
|
362
|
-
},
|
|
361
|
+
return ie(!1), !0;
|
|
362
|
+
}, s = () => {
|
|
363
363
|
if (a && !a.isBrowsing())
|
|
364
364
|
try {
|
|
365
365
|
a.cancel();
|
|
366
366
|
} catch {
|
|
367
367
|
}
|
|
368
|
-
},
|
|
369
|
-
if (
|
|
370
|
-
a &&
|
|
368
|
+
}, P = async () => {
|
|
369
|
+
if (T)
|
|
370
|
+
a && T(a.getCurrentRecord(), () => {
|
|
371
371
|
f && f();
|
|
372
372
|
});
|
|
373
|
-
else if (
|
|
374
|
-
const
|
|
375
|
-
|
|
376
|
-
await
|
|
377
|
-
}).catch((
|
|
378
|
-
|
|
373
|
+
else if (I) {
|
|
374
|
+
const H = I(a.getCurrentRecord());
|
|
375
|
+
H instanceof Promise && H.then(async () => {
|
|
376
|
+
await de() && f && f();
|
|
377
|
+
}).catch((pe) => {
|
|
378
|
+
B && B(ge(pe)), U(!0), J(ge(pe));
|
|
379
379
|
});
|
|
380
380
|
} else
|
|
381
|
-
await
|
|
382
|
-
},
|
|
383
|
-
|
|
384
|
-
},
|
|
385
|
-
pt.showWarning(
|
|
381
|
+
await de() && f && f();
|
|
382
|
+
}, _ = () => {
|
|
383
|
+
s(), d && d();
|
|
384
|
+
}, Ce = () => {
|
|
385
|
+
pt.showWarning(C().t("archbase:Click on Ok or Cancel to close"));
|
|
386
386
|
}, ue = () => {
|
|
387
|
-
|
|
387
|
+
m && m(), U(!1), J("");
|
|
388
388
|
};
|
|
389
389
|
return /* @__PURE__ */ e(
|
|
390
|
-
|
|
390
|
+
Re,
|
|
391
391
|
{
|
|
392
|
-
resourceName:
|
|
393
|
-
resourceDescription:
|
|
394
|
-
requiredPermissions:
|
|
395
|
-
fallbackComponent:
|
|
396
|
-
onSecurityReady:
|
|
397
|
-
onAccessDenied:
|
|
392
|
+
resourceName: O,
|
|
393
|
+
resourceDescription: M,
|
|
394
|
+
requiredPermissions: N,
|
|
395
|
+
fallbackComponent: E,
|
|
396
|
+
onSecurityReady: V?.onSecurityReady,
|
|
397
|
+
onAccessDenied: V?.onAccessDenied,
|
|
398
398
|
children: /* @__PURE__ */ e(
|
|
399
399
|
ut,
|
|
400
400
|
{
|
|
401
401
|
title: t,
|
|
402
402
|
withOverlay: n,
|
|
403
|
-
overlayProps:
|
|
404
|
-
color: ne === "dark" ?
|
|
403
|
+
overlayProps: l || {
|
|
404
|
+
color: ne === "dark" ? Y.colors.dark[7] : Y.colors.gray[6],
|
|
405
405
|
opacity: 0.25
|
|
406
406
|
},
|
|
407
407
|
withCloseButton: r,
|
|
408
408
|
closeButtonProps: i,
|
|
409
|
-
onClose:
|
|
410
|
-
opened:
|
|
411
|
-
fullScreen:
|
|
409
|
+
onClose: Ce,
|
|
410
|
+
opened: c,
|
|
411
|
+
fullScreen: p,
|
|
412
412
|
centered: u,
|
|
413
|
-
closeOnEscape:
|
|
413
|
+
closeOnEscape: G,
|
|
414
414
|
size: o,
|
|
415
|
-
...
|
|
416
|
-
children: /* @__PURE__ */
|
|
417
|
-
/* @__PURE__ */ e(wt, { styles: te, visible:
|
|
418
|
-
/* @__PURE__ */
|
|
419
|
-
|
|
420
|
-
|
|
415
|
+
...X,
|
|
416
|
+
children: /* @__PURE__ */ x(Ft, { children: [
|
|
417
|
+
/* @__PURE__ */ e(wt, { styles: te, visible: re, opacity: 0.8 }),
|
|
418
|
+
/* @__PURE__ */ x(tt, { height: D, children: [
|
|
419
|
+
Z ? /* @__PURE__ */ e(bt, { size: "100px", children: /* @__PURE__ */ e(
|
|
420
|
+
We,
|
|
421
421
|
{
|
|
422
|
-
autoClose:
|
|
422
|
+
autoClose: oe,
|
|
423
423
|
withCloseButton: !0,
|
|
424
424
|
withBorder: !0,
|
|
425
|
-
icon: /* @__PURE__ */ e(
|
|
426
|
-
title:
|
|
425
|
+
icon: /* @__PURE__ */ e(_e, { size: "1.4rem" }),
|
|
426
|
+
title: C().t("WARNING"),
|
|
427
427
|
titleColor: "rgb(250, 82, 82)",
|
|
428
|
-
variant:
|
|
428
|
+
variant: v ?? k.variant,
|
|
429
429
|
onClose: ue,
|
|
430
|
-
children: /* @__PURE__ */ e("span", { children:
|
|
430
|
+
children: /* @__PURE__ */ e("span", { children: $ })
|
|
431
431
|
}
|
|
432
432
|
) }) : null,
|
|
433
|
-
/* @__PURE__ */ e(
|
|
434
|
-
/* @__PURE__ */ e(
|
|
435
|
-
/* @__PURE__ */ e(
|
|
436
|
-
a && !a.isBrowsing() ? /* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ e(nt, { children: /* @__PURE__ */ e(It, { children: h }) }),
|
|
434
|
+
/* @__PURE__ */ e(rt, { size: "40px", children: /* @__PURE__ */ x(me, { justify: "space-between", align: "center", children: [
|
|
435
|
+
/* @__PURE__ */ e(se, { children: F }),
|
|
436
|
+
a && !a.isBrowsing() ? /* @__PURE__ */ x(se, { gap: "md", children: [
|
|
437
437
|
/* @__PURE__ */ e(
|
|
438
|
-
|
|
438
|
+
ee,
|
|
439
439
|
{
|
|
440
440
|
actionName: "save",
|
|
441
|
-
actionDescription: `Salvar ${
|
|
442
|
-
leftSection: /* @__PURE__ */ e(
|
|
443
|
-
onClick:
|
|
441
|
+
actionDescription: `Salvar ${M || t || "registro"}`,
|
|
442
|
+
leftSection: /* @__PURE__ */ e(je, {}),
|
|
443
|
+
onClick: P,
|
|
444
444
|
disabled: a && a.isBrowsing(),
|
|
445
|
-
variant:
|
|
445
|
+
variant: v ?? k.variant,
|
|
446
446
|
color: "green",
|
|
447
|
-
children: `${
|
|
447
|
+
children: `${C().t("Ok")}`
|
|
448
448
|
}
|
|
449
449
|
),
|
|
450
450
|
/* @__PURE__ */ e(
|
|
451
|
-
|
|
451
|
+
ee,
|
|
452
452
|
{
|
|
453
453
|
actionName: "cancel",
|
|
454
454
|
actionDescription: "Cancelar operação",
|
|
455
|
-
leftSection: /* @__PURE__ */ e(
|
|
456
|
-
onClick:
|
|
455
|
+
leftSection: /* @__PURE__ */ e(Te, {}),
|
|
456
|
+
onClick: _,
|
|
457
457
|
disabled: a && a.isBrowsing(),
|
|
458
|
-
variant:
|
|
458
|
+
variant: v ?? k.variant,
|
|
459
459
|
color: "red",
|
|
460
|
-
children: `${
|
|
460
|
+
children: `${C().t("Cancel")}`
|
|
461
461
|
}
|
|
462
462
|
)
|
|
463
|
-
] }) : /* @__PURE__ */ e(
|
|
464
|
-
|
|
463
|
+
] }) : /* @__PURE__ */ e(se, { gap: "md", children: /* @__PURE__ */ e(
|
|
464
|
+
ee,
|
|
465
465
|
{
|
|
466
466
|
actionName: "close",
|
|
467
467
|
actionDescription: "Fechar janela",
|
|
468
|
-
leftSection: /* @__PURE__ */ e(
|
|
469
|
-
onClick:
|
|
470
|
-
variant:
|
|
471
|
-
children: `${
|
|
468
|
+
leftSection: /* @__PURE__ */ e(Te, {}),
|
|
469
|
+
onClick: _,
|
|
470
|
+
variant: v ?? k.variant,
|
|
471
|
+
children: `${C().t("Close")}`
|
|
472
472
|
}
|
|
473
473
|
) })
|
|
474
474
|
] }) })
|
|
@@ -479,96 +479,96 @@ function Rn({
|
|
|
479
479
|
}
|
|
480
480
|
);
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function Rn({
|
|
483
483
|
title: t,
|
|
484
484
|
withOverlay: n = !0,
|
|
485
|
-
overlayProps:
|
|
485
|
+
overlayProps: l,
|
|
486
486
|
children: h,
|
|
487
487
|
withCloseButton: r = !0,
|
|
488
488
|
closeButtonProps: i,
|
|
489
|
-
opened:
|
|
490
|
-
fullScreen:
|
|
489
|
+
opened: c,
|
|
490
|
+
fullScreen: p,
|
|
491
491
|
centered: u,
|
|
492
|
-
variant:
|
|
493
|
-
closeOnEscape:
|
|
492
|
+
variant: v,
|
|
493
|
+
closeOnEscape: G = !0,
|
|
494
494
|
size: o,
|
|
495
495
|
height: a,
|
|
496
|
-
onlyOkButton:
|
|
497
|
-
onClose:
|
|
498
|
-
onClickOk:
|
|
496
|
+
onlyOkButton: D = !1,
|
|
497
|
+
onClose: F,
|
|
498
|
+
onClickOk: S,
|
|
499
499
|
onClickCancel: f,
|
|
500
|
-
userActions:
|
|
500
|
+
userActions: d,
|
|
501
501
|
// Props de segurança (opcionais)
|
|
502
|
-
resourceName:
|
|
503
|
-
resourceDescription:
|
|
504
|
-
requiredPermissions:
|
|
505
|
-
fallbackComponent:
|
|
506
|
-
securityOptions:
|
|
502
|
+
resourceName: I,
|
|
503
|
+
resourceDescription: T,
|
|
504
|
+
requiredPermissions: z,
|
|
505
|
+
fallbackComponent: A,
|
|
506
|
+
securityOptions: m
|
|
507
507
|
}) {
|
|
508
|
-
const
|
|
509
|
-
|
|
510
|
-
autoRegisterActions:
|
|
508
|
+
const B = Fe(), oe = Ze(), { colorScheme: te } = Xe();
|
|
509
|
+
Ae({
|
|
510
|
+
autoRegisterActions: m?.autoRegisterActions ?? !0
|
|
511
511
|
});
|
|
512
|
-
const
|
|
513
|
-
|
|
514
|
-
},
|
|
515
|
-
f && f(),
|
|
516
|
-
},
|
|
517
|
-
pt.showWarning(
|
|
512
|
+
const O = () => {
|
|
513
|
+
S && S(), F();
|
|
514
|
+
}, M = () => {
|
|
515
|
+
f && f(), F();
|
|
516
|
+
}, N = () => {
|
|
517
|
+
pt.showWarning(C().t("Click on Ok or Cancel to close"));
|
|
518
518
|
};
|
|
519
519
|
return /* @__PURE__ */ e(
|
|
520
|
-
|
|
520
|
+
Re,
|
|
521
521
|
{
|
|
522
|
-
resourceName:
|
|
523
|
-
resourceDescription:
|
|
524
|
-
requiredPermissions:
|
|
525
|
-
fallbackComponent:
|
|
526
|
-
onSecurityReady:
|
|
527
|
-
onAccessDenied:
|
|
522
|
+
resourceName: I,
|
|
523
|
+
resourceDescription: T,
|
|
524
|
+
requiredPermissions: z,
|
|
525
|
+
fallbackComponent: A,
|
|
526
|
+
onSecurityReady: m?.onSecurityReady,
|
|
527
|
+
onAccessDenied: m?.onAccessDenied,
|
|
528
528
|
children: /* @__PURE__ */ e(
|
|
529
529
|
ut,
|
|
530
530
|
{
|
|
531
531
|
title: t,
|
|
532
532
|
withOverlay: n,
|
|
533
|
-
overlayProps:
|
|
534
|
-
color: te === "dark" ?
|
|
533
|
+
overlayProps: l || {
|
|
534
|
+
color: te === "dark" ? oe.colors.dark[7] : oe.colors.gray[6],
|
|
535
535
|
opacity: 0.25
|
|
536
536
|
},
|
|
537
537
|
withCloseButton: r,
|
|
538
538
|
closeButtonProps: i,
|
|
539
|
-
onClose:
|
|
540
|
-
opened:
|
|
541
|
-
fullScreen:
|
|
539
|
+
onClose: N,
|
|
540
|
+
opened: c,
|
|
541
|
+
fullScreen: p,
|
|
542
542
|
centered: u,
|
|
543
|
-
closeOnEscape:
|
|
543
|
+
closeOnEscape: G,
|
|
544
544
|
size: o,
|
|
545
|
-
children: /* @__PURE__ */
|
|
546
|
-
/* @__PURE__ */ e(
|
|
547
|
-
/* @__PURE__ */ e(
|
|
548
|
-
/* @__PURE__ */ e(
|
|
549
|
-
/* @__PURE__ */
|
|
545
|
+
children: /* @__PURE__ */ x(tt, { height: a, children: [
|
|
546
|
+
/* @__PURE__ */ e(nt, { children: /* @__PURE__ */ e(It, { children: h }) }),
|
|
547
|
+
/* @__PURE__ */ e(rt, { size: "40px", children: /* @__PURE__ */ x(me, { justify: "space-between", align: "center", children: [
|
|
548
|
+
/* @__PURE__ */ e(se, { children: d }),
|
|
549
|
+
/* @__PURE__ */ x(se, { gap: "md", children: [
|
|
550
550
|
/* @__PURE__ */ e(
|
|
551
|
-
|
|
551
|
+
ee,
|
|
552
552
|
{
|
|
553
553
|
actionName: "save",
|
|
554
|
-
actionDescription: `Salvar ${
|
|
555
|
-
leftSection: /* @__PURE__ */ e(
|
|
556
|
-
onClick:
|
|
557
|
-
variant:
|
|
554
|
+
actionDescription: `Salvar ${T || "registro"}`,
|
|
555
|
+
leftSection: /* @__PURE__ */ e(je, {}),
|
|
556
|
+
onClick: O,
|
|
557
|
+
variant: v ?? B.variant,
|
|
558
558
|
color: "green",
|
|
559
|
-
children: `${
|
|
559
|
+
children: `${C().t("Ok")}`
|
|
560
560
|
}
|
|
561
561
|
),
|
|
562
|
-
|
|
563
|
-
|
|
562
|
+
D ? null : /* @__PURE__ */ e(
|
|
563
|
+
ee,
|
|
564
564
|
{
|
|
565
565
|
actionName: "cancel",
|
|
566
566
|
actionDescription: "Cancelar operação",
|
|
567
|
-
leftSection: /* @__PURE__ */ e(
|
|
568
|
-
onClick:
|
|
569
|
-
variant:
|
|
567
|
+
leftSection: /* @__PURE__ */ e(Te, {}),
|
|
568
|
+
onClick: M,
|
|
569
|
+
variant: v ?? B.variant,
|
|
570
570
|
color: "red",
|
|
571
|
-
children: f ? `${
|
|
571
|
+
children: f ? `${C().t("Cancel")}` : `${C().t("Close")}`
|
|
572
572
|
}
|
|
573
573
|
)
|
|
574
574
|
] })
|
|
@@ -579,10 +579,10 @@ function En({
|
|
|
579
579
|
}
|
|
580
580
|
);
|
|
581
581
|
}
|
|
582
|
-
const Zt = (t, n,
|
|
582
|
+
const Zt = (t, n, l) => {
|
|
583
583
|
if (!t || !n || !n.existsValue(`${t.viewName}_${t.componentName}`)) {
|
|
584
584
|
let h = -1, r;
|
|
585
|
-
return
|
|
585
|
+
return l && l.getFilters().length > 0 && (h = 0, r = JSON.parse(l.getFirstFilter()?.filter)), {
|
|
586
586
|
activeFilterIndex: h,
|
|
587
587
|
expandedFilter: !1,
|
|
588
588
|
currentFilter: r
|
|
@@ -592,72 +592,72 @@ const Zt = (t, n, s) => {
|
|
|
592
592
|
};
|
|
593
593
|
function en(t, n) {
|
|
594
594
|
const {
|
|
595
|
-
title:
|
|
595
|
+
title: l,
|
|
596
596
|
printTitle: h,
|
|
597
597
|
dataSource: r,
|
|
598
598
|
filterOptions: i,
|
|
599
|
-
pageSize:
|
|
600
|
-
pageIndex:
|
|
599
|
+
pageSize: c = 15,
|
|
600
|
+
pageIndex: p = 0,
|
|
601
601
|
columns: u,
|
|
602
|
-
filterFields:
|
|
603
|
-
logoPrint:
|
|
602
|
+
filterFields: v,
|
|
603
|
+
logoPrint: G,
|
|
604
604
|
userActions: o,
|
|
605
605
|
userRowActions: a,
|
|
606
|
-
customRenderRowActions:
|
|
607
|
-
innerRef:
|
|
608
|
-
isLoading:
|
|
606
|
+
customRenderRowActions: D,
|
|
607
|
+
innerRef: F,
|
|
608
|
+
isLoading: S = !1,
|
|
609
609
|
isLoadingFilter: f = !1,
|
|
610
|
-
isError:
|
|
611
|
-
enableTopToolbar:
|
|
612
|
-
enableTopToolbarActions:
|
|
613
|
-
error:
|
|
614
|
-
clearError:
|
|
610
|
+
isError: d = !1,
|
|
611
|
+
enableTopToolbar: I = !0,
|
|
612
|
+
enableTopToolbarActions: T = !0,
|
|
613
|
+
error: z = "",
|
|
614
|
+
clearError: A = () => {
|
|
615
615
|
},
|
|
616
|
-
filterType:
|
|
617
|
-
width:
|
|
618
|
-
height:
|
|
616
|
+
filterType: m,
|
|
617
|
+
width: B = "100%",
|
|
618
|
+
height: oe = "100%",
|
|
619
619
|
onSearchByFilter: te,
|
|
620
|
-
getRowId:
|
|
621
|
-
withBorder:
|
|
622
|
-
filterPersistenceDelegator:
|
|
623
|
-
variant:
|
|
624
|
-
store:
|
|
625
|
-
cellPadding:
|
|
626
|
-
bottomToolbarMinHeight:
|
|
627
|
-
enableRowSelection:
|
|
620
|
+
getRowId: O,
|
|
621
|
+
withBorder: M = !0,
|
|
622
|
+
filterPersistenceDelegator: N,
|
|
623
|
+
variant: E,
|
|
624
|
+
store: V,
|
|
625
|
+
cellPadding: X,
|
|
626
|
+
bottomToolbarMinHeight: k,
|
|
627
|
+
enableRowSelection: Y = !0,
|
|
628
628
|
enableRowNumbers: ne = !0,
|
|
629
|
-
enableRowActions:
|
|
630
|
-
positionActionsColumn:
|
|
631
|
-
actionsColumnWidth:
|
|
632
|
-
tableHeadCellPadding:
|
|
633
|
-
renderDetailPanel:
|
|
634
|
-
renderTopToolbar:
|
|
635
|
-
toolbarAlignment:
|
|
636
|
-
toolbarLeftContent:
|
|
637
|
-
onSelectedRowsChanged:
|
|
638
|
-
onCellDoubleClick:
|
|
639
|
-
onFilterModelChange:
|
|
640
|
-
paginationLabels:
|
|
629
|
+
enableRowActions: Z = !0,
|
|
630
|
+
positionActionsColumn: U = "first",
|
|
631
|
+
actionsColumnWidth: $,
|
|
632
|
+
tableHeadCellPadding: J,
|
|
633
|
+
renderDetailPanel: re,
|
|
634
|
+
renderTopToolbar: ie,
|
|
635
|
+
toolbarAlignment: j = "right",
|
|
636
|
+
toolbarLeftContent: le,
|
|
637
|
+
onSelectedRowsChanged: de,
|
|
638
|
+
onCellDoubleClick: s,
|
|
639
|
+
onFilterModelChange: P,
|
|
640
|
+
paginationLabels: _,
|
|
641
641
|
// Props de segurança (opcionais)
|
|
642
|
-
resourceName:
|
|
642
|
+
resourceName: Ce,
|
|
643
643
|
resourceDescription: ue,
|
|
644
|
-
requiredPermissions:
|
|
645
|
-
fallbackComponent:
|
|
646
|
-
securityOptions:
|
|
644
|
+
requiredPermissions: H,
|
|
645
|
+
fallbackComponent: pe,
|
|
646
|
+
securityOptions: ve,
|
|
647
647
|
// Props para controle de bordas internas
|
|
648
|
-
withToolbarBorder:
|
|
649
|
-
withPaginationBorder:
|
|
650
|
-
toolbarPadding:
|
|
651
|
-
paginationPadding:
|
|
652
|
-
rowHeight:
|
|
653
|
-
hideFooter:
|
|
654
|
-
} = t,
|
|
655
|
-
|
|
656
|
-
const { colorScheme: Ge } =
|
|
657
|
-
|
|
658
|
-
autoRegisterActions:
|
|
648
|
+
withToolbarBorder: Ne,
|
|
649
|
+
withPaginationBorder: De,
|
|
650
|
+
toolbarPadding: L,
|
|
651
|
+
paginationPadding: ae,
|
|
652
|
+
rowHeight: ke,
|
|
653
|
+
hideFooter: Ee = !0
|
|
654
|
+
} = t, Pe = fe(null), q = fe(null);
|
|
655
|
+
Ze();
|
|
656
|
+
const { colorScheme: Ge } = Xe();
|
|
657
|
+
Ae({
|
|
658
|
+
autoRegisterActions: ve?.autoRegisterActions ?? !0
|
|
659
659
|
});
|
|
660
|
-
const
|
|
660
|
+
const ce = Ve(
|
|
661
661
|
"ArchbaseGridTemplate",
|
|
662
662
|
r,
|
|
663
663
|
void 0,
|
|
@@ -665,241 +665,241 @@ function en(t, n) {
|
|
|
665
665
|
);
|
|
666
666
|
Rt(n, () => ({
|
|
667
667
|
refreshData: () => {
|
|
668
|
-
|
|
668
|
+
q.current && q.current.refreshData();
|
|
669
669
|
},
|
|
670
|
-
getSelectedRows: () =>
|
|
670
|
+
getSelectedRows: () => q.current ? q.current.getSelectedRows() : [],
|
|
671
671
|
clearSelection: () => {
|
|
672
|
-
|
|
672
|
+
q.current && q.current.clearSelection();
|
|
673
673
|
},
|
|
674
674
|
exportData: () => {
|
|
675
|
-
|
|
675
|
+
q.current && q.current.exportData();
|
|
676
676
|
},
|
|
677
677
|
printData: () => {
|
|
678
|
-
|
|
678
|
+
q.current && q.current.printData();
|
|
679
679
|
},
|
|
680
|
-
getDataGridRef: () =>
|
|
681
|
-
getFilterModel: () =>
|
|
682
|
-
}), [
|
|
683
|
-
const [
|
|
680
|
+
getDataGridRef: () => q,
|
|
681
|
+
getFilterModel: () => q.current ? q.current.getFilterModel() : { items: [], quickFilterValues: [] }
|
|
682
|
+
}), [q]);
|
|
683
|
+
const [w, y] = W({
|
|
684
684
|
activeFilterIndex: -1,
|
|
685
685
|
currentFilter: void 0,
|
|
686
686
|
expandedFilter: !1
|
|
687
687
|
});
|
|
688
|
-
|
|
689
|
-
const
|
|
690
|
-
|
|
688
|
+
Qe(() => {
|
|
689
|
+
const R = Zt(i, V, N);
|
|
690
|
+
y(R);
|
|
691
691
|
}, [f]);
|
|
692
|
-
const
|
|
693
|
-
if (
|
|
694
|
-
return
|
|
692
|
+
const we = (R) => {
|
|
693
|
+
if (D)
|
|
694
|
+
return D(R);
|
|
695
695
|
if (!a || !a.actions)
|
|
696
696
|
return;
|
|
697
|
-
const
|
|
697
|
+
const g = a.actions;
|
|
698
698
|
return /* @__PURE__ */ e(
|
|
699
|
-
|
|
699
|
+
g,
|
|
700
700
|
{
|
|
701
|
-
onEditRow: a.onEditRow ? (
|
|
702
|
-
onRemoveRow: a.onRemoveRow ? (
|
|
703
|
-
onViewRow: a.onViewRow ? (
|
|
704
|
-
row:
|
|
705
|
-
variant:
|
|
701
|
+
onEditRow: a.onEditRow ? (b) => a.onEditRow && a.onEditRow(b) : void 0,
|
|
702
|
+
onRemoveRow: a.onRemoveRow ? (b) => a.onRemoveRow && a.onRemoveRow(b) : void 0,
|
|
703
|
+
onViewRow: a.onViewRow ? (b) => a.onViewRow && a.onViewRow(b) : void 0,
|
|
704
|
+
row: R,
|
|
705
|
+
variant: E ?? K.variant
|
|
706
706
|
}
|
|
707
707
|
);
|
|
708
|
-
},
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
}, [
|
|
712
|
-
const
|
|
713
|
-
const
|
|
714
|
-
|
|
715
|
-
},
|
|
716
|
-
const
|
|
717
|
-
|
|
718
|
-
},
|
|
719
|
-
const
|
|
720
|
-
|
|
721
|
-
},
|
|
722
|
-
if (
|
|
708
|
+
}, K = Fe(), he = fe(null), $e = d ? !1 : S, xe = Ie(() => le, [le]);
|
|
709
|
+
He.useEffect(() => {
|
|
710
|
+
F && F.current !== he.current && F.current && he.current && (F.current = he.current);
|
|
711
|
+
}, [F]);
|
|
712
|
+
const it = (R, g) => {
|
|
713
|
+
const b = { ...w, currentFilter: R, activeFilterIndex: g };
|
|
714
|
+
y(b), V && i && V?.setValue(`${i.viewName}_${i.componentName}`, b);
|
|
715
|
+
}, ot = (R) => {
|
|
716
|
+
const g = { ...w, expandedFilter: R };
|
|
717
|
+
y(g), V && i && V?.setValue(`${i.viewName}_${i.componentName}`, g);
|
|
718
|
+
}, Le = (R, g) => {
|
|
719
|
+
const b = { ...w, currentFilter: R, activeFilterIndex: g };
|
|
720
|
+
y(b), V && i && V?.setValue(`${i.viewName}_${i.componentName}`, b);
|
|
721
|
+
}, ze = () => {
|
|
722
|
+
if (w.currentFilter)
|
|
723
723
|
if (te)
|
|
724
724
|
te();
|
|
725
|
-
else if (
|
|
726
|
-
const
|
|
727
|
-
|
|
728
|
-
search:
|
|
729
|
-
fields:
|
|
730
|
-
}),
|
|
725
|
+
else if (w.currentFilter.filter.filterType === "quick") {
|
|
726
|
+
const R = r.getOptions();
|
|
727
|
+
w.currentFilter.filter.quickFilterText && w.currentFilter.filter.quickFilterText !== "" ? (R.filter = JSON.stringify({
|
|
728
|
+
search: w.currentFilter.filter.quickFilterText,
|
|
729
|
+
fields: w.currentFilter.filter.quickFilterFieldsText
|
|
730
|
+
}), R.sort = w.currentFilter.sort.quickFilterSort ? w.currentFilter.sort.quickFilterSort.split(",") : []) : (R.filter = void 0, R.sort = void 0), r.refreshData(R), ce.isDataSourceV2 || ce.v1State.forceUpdate();
|
|
731
731
|
} else {
|
|
732
|
-
const
|
|
733
|
-
if (
|
|
734
|
-
const
|
|
735
|
-
|
|
732
|
+
const R = Kt(w.currentFilter);
|
|
733
|
+
if (R && R.expressionNode) {
|
|
734
|
+
const g = $t(R.expressionNode), b = r.getOptions();
|
|
735
|
+
b.filter = g, b.sort = R?.sortStrings, r.refreshData(b), ce.isDataSourceV2 || ce.v1State.forceUpdate();
|
|
736
736
|
}
|
|
737
737
|
}
|
|
738
738
|
};
|
|
739
|
-
let
|
|
740
|
-
const lt = (
|
|
741
|
-
|
|
742
|
-
},
|
|
743
|
-
|
|
744
|
-
},
|
|
745
|
-
|
|
739
|
+
let Me, Ue;
|
|
740
|
+
const lt = (R) => {
|
|
741
|
+
Me = R;
|
|
742
|
+
}, at = (R) => {
|
|
743
|
+
Ue = R;
|
|
744
|
+
}, st = () => {
|
|
745
|
+
Ue && Ue();
|
|
746
746
|
}, ct = () => {
|
|
747
|
-
|
|
748
|
-
}, dt = () =>
|
|
747
|
+
Me && Me();
|
|
748
|
+
}, dt = () => m === "none" ? /* @__PURE__ */ e("div", {}) : m === "advanced" ? /* @__PURE__ */ e(
|
|
749
749
|
Ct,
|
|
750
750
|
{
|
|
751
751
|
id: i?.componentName,
|
|
752
752
|
viewName: i?.viewName,
|
|
753
753
|
apiVersion: i?.apiVersion,
|
|
754
|
-
ref:
|
|
755
|
-
variant:
|
|
756
|
-
expandedFilter:
|
|
757
|
-
persistenceDelegator:
|
|
758
|
-
currentFilter:
|
|
759
|
-
activeFilterIndex:
|
|
760
|
-
onSelectedFilter:
|
|
761
|
-
onFilterChanged:
|
|
762
|
-
onSearchByFilter:
|
|
763
|
-
onToggleExpandedFilter:
|
|
764
|
-
onExport:
|
|
754
|
+
ref: Pe,
|
|
755
|
+
variant: E ?? K.variant,
|
|
756
|
+
expandedFilter: w.expandedFilter,
|
|
757
|
+
persistenceDelegator: N,
|
|
758
|
+
currentFilter: w.currentFilter,
|
|
759
|
+
activeFilterIndex: w.activeFilterIndex,
|
|
760
|
+
onSelectedFilter: Le,
|
|
761
|
+
onFilterChanged: it,
|
|
762
|
+
onSearchByFilter: ze,
|
|
763
|
+
onToggleExpandedFilter: ot,
|
|
764
|
+
onExport: st,
|
|
765
765
|
onPrint: ct,
|
|
766
766
|
showExportButton: !0,
|
|
767
767
|
showPrintButton: !0,
|
|
768
768
|
width: "560px",
|
|
769
769
|
height: "170px",
|
|
770
|
-
children:
|
|
770
|
+
children: v
|
|
771
771
|
}
|
|
772
|
-
) :
|
|
772
|
+
) : m === "normal" ? /* @__PURE__ */ e("div", {}) : /* @__PURE__ */ e("div", {});
|
|
773
773
|
return /* @__PURE__ */ e(
|
|
774
|
-
|
|
774
|
+
Re,
|
|
775
775
|
{
|
|
776
|
-
resourceName:
|
|
776
|
+
resourceName: Ce,
|
|
777
777
|
resourceDescription: ue,
|
|
778
|
-
requiredPermissions:
|
|
779
|
-
fallbackComponent:
|
|
780
|
-
onSecurityReady:
|
|
781
|
-
onAccessDenied:
|
|
782
|
-
children: /* @__PURE__ */
|
|
783
|
-
|
|
784
|
-
|
|
778
|
+
requiredPermissions: H,
|
|
779
|
+
fallbackComponent: pe,
|
|
780
|
+
onSecurityReady: ve?.onSecurityReady,
|
|
781
|
+
onAccessDenied: ve?.onAccessDenied,
|
|
782
|
+
children: /* @__PURE__ */ x(Je, { withBorder: M, ref: he, style: { height: "100%" }, children: [
|
|
783
|
+
d ? /* @__PURE__ */ e(
|
|
784
|
+
We,
|
|
785
785
|
{
|
|
786
786
|
autoClose: 2e4,
|
|
787
787
|
withCloseButton: !0,
|
|
788
788
|
withBorder: !0,
|
|
789
|
-
icon: /* @__PURE__ */ e(
|
|
790
|
-
title:
|
|
789
|
+
icon: /* @__PURE__ */ e(_e, { size: "1.4rem" }),
|
|
790
|
+
title: C().t("archbase:WARNING"),
|
|
791
791
|
titleColor: "rgb(250, 82, 82)",
|
|
792
|
-
variant:
|
|
793
|
-
onClose: () =>
|
|
794
|
-
children: /* @__PURE__ */ e("span", { children:
|
|
792
|
+
variant: E ?? K.variant,
|
|
793
|
+
onClose: () => A && A(),
|
|
794
|
+
children: /* @__PURE__ */ e("span", { children: z })
|
|
795
795
|
}
|
|
796
796
|
) : null,
|
|
797
|
-
/* @__PURE__ */
|
|
797
|
+
/* @__PURE__ */ x(
|
|
798
798
|
St,
|
|
799
799
|
{
|
|
800
|
-
gridRef:
|
|
801
|
-
printTitle: h ||
|
|
802
|
-
logoPrint:
|
|
803
|
-
width:
|
|
804
|
-
height:
|
|
800
|
+
gridRef: q,
|
|
801
|
+
printTitle: h || l,
|
|
802
|
+
logoPrint: G,
|
|
803
|
+
width: B,
|
|
804
|
+
height: oe,
|
|
805
805
|
withBorder: !1,
|
|
806
806
|
dataSource: r,
|
|
807
807
|
enableColumnResizing: !0,
|
|
808
808
|
enableRowNumbers: ne,
|
|
809
|
-
enableRowSelection:
|
|
810
|
-
enableRowActions:
|
|
811
|
-
enableTopToolbar:
|
|
812
|
-
enableTopToolbarActions:
|
|
809
|
+
enableRowSelection: Y,
|
|
810
|
+
enableRowActions: Z,
|
|
811
|
+
enableTopToolbar: I,
|
|
812
|
+
enableTopToolbarActions: T,
|
|
813
813
|
manualPagination: !0,
|
|
814
814
|
manualSorting: !0,
|
|
815
|
-
isLoading:
|
|
816
|
-
pageSize:
|
|
817
|
-
pageIndex:
|
|
818
|
-
allowColumnFilters:
|
|
819
|
-
enableGlobalFilter:
|
|
820
|
-
renderToolbarInternalActions:
|
|
815
|
+
isLoading: $e,
|
|
816
|
+
pageSize: c,
|
|
817
|
+
pageIndex: p,
|
|
818
|
+
allowColumnFilters: m !== "none",
|
|
819
|
+
enableGlobalFilter: m !== "none",
|
|
820
|
+
renderToolbarInternalActions: m == "none" ? () => /* @__PURE__ */ e("div", {}) : void 0,
|
|
821
821
|
allowExportData: !0,
|
|
822
822
|
allowPrintData: !0,
|
|
823
|
-
onSelectedRowsChanged:
|
|
824
|
-
onCellDoubleClick:
|
|
825
|
-
onFilterModelChange:
|
|
826
|
-
renderRowActions:
|
|
827
|
-
positionActionsColumn:
|
|
828
|
-
actionsColumnWidth:
|
|
829
|
-
toolbarAlignment:
|
|
830
|
-
toolbarLeftContent:
|
|
831
|
-
renderToolbarActions:
|
|
832
|
-
paginationLabels:
|
|
833
|
-
cellPadding:
|
|
834
|
-
bottomToolbarMinHeight:
|
|
835
|
-
tableHeadCellPadding:
|
|
836
|
-
getRowId:
|
|
837
|
-
renderDetailPanel:
|
|
838
|
-
renderTopToolbar:
|
|
839
|
-
onExport:
|
|
823
|
+
onSelectedRowsChanged: de,
|
|
824
|
+
onCellDoubleClick: s,
|
|
825
|
+
onFilterModelChange: P,
|
|
826
|
+
renderRowActions: Z ? we : void 0,
|
|
827
|
+
positionActionsColumn: U,
|
|
828
|
+
actionsColumnWidth: $,
|
|
829
|
+
toolbarAlignment: j,
|
|
830
|
+
toolbarLeftContent: xe,
|
|
831
|
+
renderToolbarActions: m === "advanced" || m === "none" ? dt : void 0,
|
|
832
|
+
paginationLabels: _,
|
|
833
|
+
cellPadding: X,
|
|
834
|
+
bottomToolbarMinHeight: k,
|
|
835
|
+
tableHeadCellPadding: J,
|
|
836
|
+
getRowId: O,
|
|
837
|
+
renderDetailPanel: re ? ({ row: R }) => re({ row: R }) : void 0,
|
|
838
|
+
renderTopToolbar: ie,
|
|
839
|
+
onExport: at,
|
|
840
840
|
onPrint: lt,
|
|
841
|
-
variant:
|
|
842
|
-
withToolbarBorder:
|
|
843
|
-
withPaginationBorder:
|
|
844
|
-
toolbarPadding:
|
|
845
|
-
paginationPadding:
|
|
846
|
-
rowHeight:
|
|
847
|
-
hideFooter:
|
|
841
|
+
variant: E,
|
|
842
|
+
withToolbarBorder: Ne,
|
|
843
|
+
withPaginationBorder: De,
|
|
844
|
+
toolbarPadding: L,
|
|
845
|
+
paginationPadding: ae,
|
|
846
|
+
rowHeight: ke,
|
|
847
|
+
hideFooter: Ee,
|
|
848
848
|
children: [
|
|
849
849
|
u,
|
|
850
|
-
o?.visible ? /* @__PURE__ */ e(Ht, { children: /* @__PURE__ */
|
|
851
|
-
/* @__PURE__ */ e("h3", { className: "only-print", children: h ||
|
|
852
|
-
/* @__PURE__ */ e("div", { className: "no-print", children: /* @__PURE__ */
|
|
850
|
+
o?.visible ? /* @__PURE__ */ e(Ht, { children: /* @__PURE__ */ x(Be, { children: [
|
|
851
|
+
/* @__PURE__ */ e("h3", { className: "only-print", children: h || l }),
|
|
852
|
+
/* @__PURE__ */ e("div", { className: "no-print", children: /* @__PURE__ */ x(me, { gap: "8px", rowGap: "8px", children: [
|
|
853
853
|
o.customUserActions && o.customUserActionsPosition === "left" ? o.customUserActions : null,
|
|
854
854
|
o.onAddExecute ? /* @__PURE__ */ e(
|
|
855
|
-
|
|
855
|
+
ee,
|
|
856
856
|
{
|
|
857
857
|
actionName: "add",
|
|
858
858
|
actionDescription: `Adicionar novo ${ue || "registro"}`,
|
|
859
859
|
color: "green",
|
|
860
|
-
variant:
|
|
860
|
+
variant: E ?? K.variant,
|
|
861
861
|
leftSection: /* @__PURE__ */ e(ft, {}),
|
|
862
862
|
onClick: () => o && o.onAddExecute && o.onAddExecute(),
|
|
863
|
-
children: o.labelAdd ||
|
|
863
|
+
children: o.labelAdd || C().t("archbase:New")
|
|
864
864
|
}
|
|
865
865
|
) : null,
|
|
866
866
|
o.onEditExecute ? /* @__PURE__ */ e(
|
|
867
|
-
|
|
867
|
+
ee,
|
|
868
868
|
{
|
|
869
869
|
actionName: "edit",
|
|
870
870
|
actionDescription: `Editar ${ue || "registro"}`,
|
|
871
871
|
color: "blue",
|
|
872
872
|
leftSection: /* @__PURE__ */ e(mt, {}),
|
|
873
873
|
disabled: !r.isBrowsing() || r.isEmpty(),
|
|
874
|
-
variant:
|
|
874
|
+
variant: E ?? K.variant,
|
|
875
875
|
onClick: () => o && o.onEditExecute && o.onEditExecute(),
|
|
876
|
-
children: o.labelEdit ||
|
|
876
|
+
children: o.labelEdit || C().t("archbase:Edit")
|
|
877
877
|
}
|
|
878
878
|
) : null,
|
|
879
879
|
o.onRemoveExecute ? /* @__PURE__ */ e(
|
|
880
|
-
|
|
880
|
+
ee,
|
|
881
881
|
{
|
|
882
882
|
actionName: "delete",
|
|
883
883
|
actionDescription: `Remover ${ue || "registro"}`,
|
|
884
884
|
color: "red",
|
|
885
|
-
leftSection: /* @__PURE__ */ e(
|
|
885
|
+
leftSection: /* @__PURE__ */ e(Ye, {}),
|
|
886
886
|
disabled: !o?.allowRemove || !r.isBrowsing() || r.isEmpty(),
|
|
887
|
-
variant:
|
|
887
|
+
variant: E ?? K.variant,
|
|
888
888
|
onClick: () => o && o.onRemoveExecute && o.onRemoveExecute(),
|
|
889
|
-
children: o.labelRemove ||
|
|
889
|
+
children: o.labelRemove || C().t("archbase:Remove")
|
|
890
890
|
}
|
|
891
891
|
) : null,
|
|
892
892
|
o.onViewExecute ? /* @__PURE__ */ e(
|
|
893
|
-
|
|
893
|
+
ee,
|
|
894
894
|
{
|
|
895
895
|
actionName: "view",
|
|
896
896
|
actionDescription: `Visualizar ${ue || "registro"}`,
|
|
897
897
|
color: "gray.7",
|
|
898
898
|
leftSection: /* @__PURE__ */ e(gt, {}),
|
|
899
899
|
disabled: !r.isBrowsing() || r.isEmpty(),
|
|
900
|
-
variant:
|
|
900
|
+
variant: E ?? K.variant,
|
|
901
901
|
onClick: () => o && o.onViewExecute && o.onViewExecute(),
|
|
902
|
-
children: o.labelView ||
|
|
902
|
+
children: o.labelView || C().t("archbase:View")
|
|
903
903
|
}
|
|
904
904
|
) : null,
|
|
905
905
|
o.customUserActions && o.customUserActionsPosition === "right" ? o.customUserActions : null
|
|
@@ -912,13 +912,13 @@ function en(t, n) {
|
|
|
912
912
|
}
|
|
913
913
|
);
|
|
914
914
|
}
|
|
915
|
-
const
|
|
916
|
-
function tn(t, n,
|
|
915
|
+
const En = At(en);
|
|
916
|
+
function tn(t, n, l, h) {
|
|
917
917
|
if (t && t.headerGridColumns) {
|
|
918
|
-
const r = 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" },
|
|
919
|
-
return /* @__PURE__ */
|
|
918
|
+
const r = 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" }, c = t.headerGridColumns.right ? t.headerGridColumns.right : { xs: "auto", sm: "auto", md: "auto", lg: "auto" };
|
|
919
|
+
return /* @__PURE__ */ x(ye, { m: 0, gutter: "xs", justify: "center", align: "center", grow: !0, children: [
|
|
920
920
|
/* @__PURE__ */ e(
|
|
921
|
-
|
|
921
|
+
ye.Col,
|
|
922
922
|
{
|
|
923
923
|
span: {
|
|
924
924
|
xs: r.xs,
|
|
@@ -936,7 +936,7 @@ function tn(t, n, s, h) {
|
|
|
936
936
|
}
|
|
937
937
|
),
|
|
938
938
|
/* @__PURE__ */ e(
|
|
939
|
-
|
|
939
|
+
ye.Col,
|
|
940
940
|
{
|
|
941
941
|
span: {
|
|
942
942
|
xs: i.xs,
|
|
@@ -953,13 +953,13 @@ function tn(t, n, s, h) {
|
|
|
953
953
|
}
|
|
954
954
|
),
|
|
955
955
|
/* @__PURE__ */ e(
|
|
956
|
-
|
|
956
|
+
ye.Col,
|
|
957
957
|
{
|
|
958
958
|
span: {
|
|
959
|
-
xs:
|
|
960
|
-
sm:
|
|
961
|
-
md:
|
|
962
|
-
lg:
|
|
959
|
+
xs: c.xs,
|
|
960
|
+
sm: c.sm,
|
|
961
|
+
md: c.md,
|
|
962
|
+
lg: c.lg
|
|
963
963
|
},
|
|
964
964
|
style: {
|
|
965
965
|
border: h ? "1px dashed" : "",
|
|
@@ -967,20 +967,20 @@ function tn(t, n, s, h) {
|
|
|
967
967
|
justifyContent: "flex-end",
|
|
968
968
|
alignItems: "center"
|
|
969
969
|
},
|
|
970
|
-
children:
|
|
970
|
+
children: l
|
|
971
971
|
}
|
|
972
972
|
)
|
|
973
973
|
] });
|
|
974
974
|
} else {
|
|
975
|
-
const r = t && t.headerFlexGrow ? t.headerFlexGrow : "even", i = t && t.headerFlexRightJustifyContent ? t.headerFlexRightJustifyContent : "flex-end",
|
|
976
|
-
return /* @__PURE__ */
|
|
975
|
+
const r = t && t.headerFlexGrow ? t.headerFlexGrow : "even", i = t && t.headerFlexRightJustifyContent ? t.headerFlexRightJustifyContent : "flex-end", c = t && t.headerFlexLeftJustifyContent ? t.headerFlexLeftJustifyContent : "flex-start";
|
|
976
|
+
return /* @__PURE__ */ x(me, { justify: "space-between", children: [
|
|
977
977
|
/* @__PURE__ */ e(
|
|
978
|
-
|
|
978
|
+
me,
|
|
979
979
|
{
|
|
980
980
|
w: r === "left" || r === "even" ? "100%" : void 0,
|
|
981
981
|
maw: r === "left" || r === "even" ? void 0 : "100%",
|
|
982
982
|
align: "center",
|
|
983
|
-
justify:
|
|
983
|
+
justify: c,
|
|
984
984
|
style: {
|
|
985
985
|
border: h ? "1px dashed" : ""
|
|
986
986
|
},
|
|
@@ -988,7 +988,7 @@ function tn(t, n, s, h) {
|
|
|
988
988
|
}
|
|
989
989
|
),
|
|
990
990
|
/* @__PURE__ */ e(
|
|
991
|
-
|
|
991
|
+
me,
|
|
992
992
|
{
|
|
993
993
|
w: r === "right" || r === "even" ? "100%" : void 0,
|
|
994
994
|
maw: r === "right" || r === "even" ? void 0 : "100%",
|
|
@@ -997,18 +997,18 @@ function tn(t, n, s, h) {
|
|
|
997
997
|
style: {
|
|
998
998
|
border: h ? "1px dashed" : ""
|
|
999
999
|
},
|
|
1000
|
-
children:
|
|
1000
|
+
children: l
|
|
1001
1001
|
}
|
|
1002
1002
|
)
|
|
1003
1003
|
] });
|
|
1004
1004
|
}
|
|
1005
1005
|
}
|
|
1006
|
-
function nn(t, n,
|
|
1006
|
+
function nn(t, n, l, h) {
|
|
1007
1007
|
if (t && t.footerGridColumns) {
|
|
1008
|
-
const r = 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" },
|
|
1009
|
-
return /* @__PURE__ */
|
|
1008
|
+
const r = 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" }, c = t.footerGridColumns.right ? t.footerGridColumns.right : { xs: "content", sm: "content", md: "content", lg: "content" };
|
|
1009
|
+
return /* @__PURE__ */ x(ye, { m: 0, gutter: "xs", justify: "center", align: "center", grow: !0, children: [
|
|
1010
1010
|
/* @__PURE__ */ e(
|
|
1011
|
-
|
|
1011
|
+
ye.Col,
|
|
1012
1012
|
{
|
|
1013
1013
|
span: {
|
|
1014
1014
|
xs: r.xs,
|
|
@@ -1026,7 +1026,7 @@ function nn(t, n, s, h) {
|
|
|
1026
1026
|
}
|
|
1027
1027
|
),
|
|
1028
1028
|
/* @__PURE__ */ e(
|
|
1029
|
-
|
|
1029
|
+
ye.Col,
|
|
1030
1030
|
{
|
|
1031
1031
|
span: {
|
|
1032
1032
|
xs: i.xs,
|
|
@@ -1043,13 +1043,13 @@ function nn(t, n, s, h) {
|
|
|
1043
1043
|
}
|
|
1044
1044
|
),
|
|
1045
1045
|
/* @__PURE__ */ e(
|
|
1046
|
-
|
|
1046
|
+
ye.Col,
|
|
1047
1047
|
{
|
|
1048
1048
|
span: {
|
|
1049
|
-
xs:
|
|
1050
|
-
sm:
|
|
1051
|
-
md:
|
|
1052
|
-
lg:
|
|
1049
|
+
xs: c.xs,
|
|
1050
|
+
sm: c.sm,
|
|
1051
|
+
md: c.md,
|
|
1052
|
+
lg: c.lg
|
|
1053
1053
|
},
|
|
1054
1054
|
style: {
|
|
1055
1055
|
border: h ? "1px dashed" : "",
|
|
@@ -1057,20 +1057,20 @@ function nn(t, n, s, h) {
|
|
|
1057
1057
|
justifyContent: "flex-end",
|
|
1058
1058
|
alignItems: "center"
|
|
1059
1059
|
},
|
|
1060
|
-
children:
|
|
1060
|
+
children: l
|
|
1061
1061
|
}
|
|
1062
1062
|
)
|
|
1063
1063
|
] });
|
|
1064
1064
|
} else {
|
|
1065
|
-
const r = t && t.footerFlexGrow ? t.footerFlexGrow : "even", i = t && t.footerFlexRightJustifyContent ? t.footerFlexRightJustifyContent : "flex-end",
|
|
1066
|
-
return /* @__PURE__ */
|
|
1065
|
+
const r = t && t.footerFlexGrow ? t.footerFlexGrow : "even", i = t && t.footerFlexRightJustifyContent ? t.footerFlexRightJustifyContent : "flex-end", c = t && t.footerFlexLeftJustifyContent ? t.footerFlexLeftJustifyContent : "flex-start";
|
|
1066
|
+
return /* @__PURE__ */ x(me, { justify: "space-between", children: [
|
|
1067
1067
|
/* @__PURE__ */ e(
|
|
1068
|
-
|
|
1068
|
+
me,
|
|
1069
1069
|
{
|
|
1070
1070
|
w: r === "left" || r === "even" ? "100%" : void 0,
|
|
1071
1071
|
maw: r === "left" || r === "even" ? void 0 : "100%",
|
|
1072
1072
|
align: "center",
|
|
1073
|
-
justify:
|
|
1073
|
+
justify: c,
|
|
1074
1074
|
style: {
|
|
1075
1075
|
border: h ? "1px dashed" : "",
|
|
1076
1076
|
height: "auto",
|
|
@@ -1080,7 +1080,7 @@ function nn(t, n, s, h) {
|
|
|
1080
1080
|
}
|
|
1081
1081
|
),
|
|
1082
1082
|
/* @__PURE__ */ e(
|
|
1083
|
-
|
|
1083
|
+
me,
|
|
1084
1084
|
{
|
|
1085
1085
|
w: r === "right" || r === "even" ? "100%" : void 0,
|
|
1086
1086
|
maw: r === "right" || r === "even" ? void 0 : "100%",
|
|
@@ -1089,364 +1089,362 @@ function nn(t, n, s, h) {
|
|
|
1089
1089
|
style: {
|
|
1090
1090
|
border: h ? "1px dashed" : "",
|
|
1091
1091
|
height: "auto",
|
|
1092
|
-
padding:
|
|
1092
|
+
padding: l && "calc(0.625rem / 2)"
|
|
1093
1093
|
},
|
|
1094
|
-
children:
|
|
1094
|
+
children: l
|
|
1095
1095
|
}
|
|
1096
1096
|
)
|
|
1097
1097
|
] });
|
|
1098
1098
|
}
|
|
1099
1099
|
}
|
|
1100
|
-
function
|
|
1100
|
+
function Dt({
|
|
1101
1101
|
title: t,
|
|
1102
1102
|
innerRef: n,
|
|
1103
|
-
isError:
|
|
1103
|
+
isError: l = !1,
|
|
1104
1104
|
error: h = "",
|
|
1105
1105
|
clearError: r,
|
|
1106
1106
|
width: i = "100%",
|
|
1107
|
-
height:
|
|
1108
|
-
withBorder:
|
|
1107
|
+
height: c = "100%",
|
|
1108
|
+
withBorder: p = !0,
|
|
1109
1109
|
children: u,
|
|
1110
|
-
radius:
|
|
1111
|
-
debug:
|
|
1110
|
+
radius: v,
|
|
1111
|
+
debug: G,
|
|
1112
1112
|
defaultDebug: o,
|
|
1113
1113
|
headerLeft: a,
|
|
1114
|
-
headerMiddle:
|
|
1115
|
-
headerRight:
|
|
1116
|
-
footerLeft:
|
|
1114
|
+
headerMiddle: D,
|
|
1115
|
+
headerRight: F,
|
|
1116
|
+
footerLeft: S,
|
|
1117
1117
|
footerMiddle: f,
|
|
1118
|
-
footerRight:
|
|
1119
|
-
variant:
|
|
1120
|
-
options:
|
|
1121
|
-
style:
|
|
1122
|
-
debugOptions:
|
|
1118
|
+
footerRight: d,
|
|
1119
|
+
variant: I,
|
|
1120
|
+
options: T = {},
|
|
1121
|
+
style: z,
|
|
1122
|
+
debugOptions: A = {
|
|
1123
1123
|
debugLayoutHotKey: "ctrl+shift+S",
|
|
1124
1124
|
debugObjectInspectorHotKey: "ctrl+shift+D",
|
|
1125
1125
|
objectsToInspect: []
|
|
1126
1126
|
},
|
|
1127
1127
|
// Props de segurança (opcionais)
|
|
1128
|
-
resourceName:
|
|
1129
|
-
resourceDescription:
|
|
1130
|
-
requiredPermissions:
|
|
1128
|
+
resourceName: m,
|
|
1129
|
+
resourceDescription: B,
|
|
1130
|
+
requiredPermissions: oe,
|
|
1131
1131
|
fallbackComponent: te,
|
|
1132
|
-
securityOptions:
|
|
1132
|
+
securityOptions: O
|
|
1133
1133
|
}) {
|
|
1134
|
-
const [
|
|
1135
|
-
value:
|
|
1134
|
+
const [M, N] = Nt({
|
|
1135
|
+
value: G,
|
|
1136
1136
|
defaultValue: o,
|
|
1137
1137
|
finalValue: !1
|
|
1138
1138
|
});
|
|
1139
|
-
kt([[
|
|
1140
|
-
const
|
|
1141
|
-
|
|
1142
|
-
autoRegisterActions:
|
|
1139
|
+
kt([[A && A.debugLayoutHotKey, () => N(!M)]]);
|
|
1140
|
+
const E = Fe(), { t: V } = Lt();
|
|
1141
|
+
Ae({
|
|
1142
|
+
autoRegisterActions: O?.autoRegisterActions ?? !0
|
|
1143
1143
|
});
|
|
1144
|
-
const
|
|
1145
|
-
height:
|
|
1146
|
-
width:
|
|
1147
|
-
}), [
|
|
1148
|
-
|
|
1149
|
-
o !==
|
|
1150
|
-
}, [o,
|
|
1151
|
-
const
|
|
1144
|
+
const X = fe(null), k = n || X, Y = fe(null), ne = fe(null), Z = Ke(Y), U = Ke(ne), $ = Ke(k), J = Ie(() => ({
|
|
1145
|
+
height: $.height - Z.height - U.height - Number(Bt("0.625rem")),
|
|
1146
|
+
width: $.width - Z.width - U.width
|
|
1147
|
+
}), [$.height, $.width, Z.height, Z.width, U.height, U.width]), re = fe(o);
|
|
1148
|
+
Qe(() => {
|
|
1149
|
+
o !== re.current && (N(o), re.current = o);
|
|
1150
|
+
}, [o, N]);
|
|
1151
|
+
const ie = /* @__PURE__ */ x(Be, { children: [
|
|
1152
1152
|
/* @__PURE__ */ e(
|
|
1153
|
-
|
|
1153
|
+
Je,
|
|
1154
1154
|
{
|
|
1155
|
-
ref:
|
|
1156
|
-
withBorder:
|
|
1157
|
-
radius:
|
|
1158
|
-
style: { width: i, height:
|
|
1159
|
-
children: /* @__PURE__ */
|
|
1160
|
-
/* @__PURE__ */ e(bt, { size:
|
|
1161
|
-
/* @__PURE__ */ e(
|
|
1155
|
+
ref: k,
|
|
1156
|
+
withBorder: p,
|
|
1157
|
+
radius: v,
|
|
1158
|
+
style: { width: i, height: c, padding: 4, ...z },
|
|
1159
|
+
children: /* @__PURE__ */ x(tt, { height: "100%", children: [
|
|
1160
|
+
/* @__PURE__ */ e(bt, { size: Z.height, children: /* @__PURE__ */ e("div", { ref: Y, children: tn(T, a, F, M) }) }),
|
|
1161
|
+
/* @__PURE__ */ e(nt, { children: /* @__PURE__ */ e(
|
|
1162
1162
|
vt,
|
|
1163
1163
|
{
|
|
1164
|
-
h:
|
|
1164
|
+
h: J.height,
|
|
1165
1165
|
style: {
|
|
1166
|
-
border:
|
|
1166
|
+
border: M ? "1px dashed" : "",
|
|
1167
1167
|
padding: "calc(0.625rem / 2)"
|
|
1168
1168
|
},
|
|
1169
|
-
children: u ? /* @__PURE__ */
|
|
1170
|
-
|
|
1171
|
-
|
|
1169
|
+
children: u ? /* @__PURE__ */ x(zt, { children: [
|
|
1170
|
+
l && /* @__PURE__ */ e(
|
|
1171
|
+
We,
|
|
1172
1172
|
{
|
|
1173
1173
|
autoClose: 2e4,
|
|
1174
1174
|
withCloseButton: !0,
|
|
1175
1175
|
withBorder: !0,
|
|
1176
|
-
icon: /* @__PURE__ */ e(
|
|
1177
|
-
title: `${
|
|
1176
|
+
icon: /* @__PURE__ */ e(_e, { size: "1.4rem" }),
|
|
1177
|
+
title: `${V("WARNING")}`,
|
|
1178
1178
|
titleColor: "rgb(250, 82, 82)",
|
|
1179
|
-
variant:
|
|
1179
|
+
variant: I ?? E.variant,
|
|
1180
1180
|
onClose: () => r && r(),
|
|
1181
1181
|
children: /* @__PURE__ */ e("span", { children: h })
|
|
1182
1182
|
}
|
|
1183
1183
|
),
|
|
1184
1184
|
u
|
|
1185
|
-
] }) :
|
|
1185
|
+
] }) : M && /* @__PURE__ */ e(me, { h: J.height + 80, justify: "center", align: "center", wrap: "wrap", children: /* @__PURE__ */ e(Se, { size: "lg", children: "INSIRA O CONTEÚDO DO PAINEL AQUI." }) })
|
|
1186
1186
|
}
|
|
1187
1187
|
) }),
|
|
1188
|
-
/* @__PURE__ */ e(
|
|
1188
|
+
/* @__PURE__ */ e(rt, { size: U.height, children: /* @__PURE__ */ e("div", { ref: ne, children: nn(T, S, d, M) }) })
|
|
1189
1189
|
] })
|
|
1190
1190
|
}
|
|
1191
1191
|
),
|
|
1192
1192
|
/* @__PURE__ */ e(
|
|
1193
|
-
|
|
1193
|
+
qt,
|
|
1194
1194
|
{
|
|
1195
|
-
debugObjectInspectorHotKey:
|
|
1196
|
-
objectsToInspect:
|
|
1195
|
+
debugObjectInspectorHotKey: A && A.debugObjectInspectorHotKey,
|
|
1196
|
+
objectsToInspect: A && A.objectsToInspect
|
|
1197
1197
|
}
|
|
1198
1198
|
)
|
|
1199
1199
|
] });
|
|
1200
1200
|
return /* @__PURE__ */ e(
|
|
1201
|
-
|
|
1201
|
+
Re,
|
|
1202
1202
|
{
|
|
1203
|
-
resourceName:
|
|
1204
|
-
resourceDescription:
|
|
1205
|
-
requiredPermissions:
|
|
1203
|
+
resourceName: m,
|
|
1204
|
+
resourceDescription: B,
|
|
1205
|
+
requiredPermissions: oe,
|
|
1206
1206
|
fallbackComponent: te,
|
|
1207
|
-
onSecurityReady:
|
|
1208
|
-
onAccessDenied:
|
|
1209
|
-
children:
|
|
1207
|
+
onSecurityReady: O?.onSecurityReady,
|
|
1208
|
+
onAccessDenied: O?.onAccessDenied,
|
|
1209
|
+
children: ie
|
|
1210
1210
|
}
|
|
1211
1211
|
);
|
|
1212
1212
|
}
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
allowAdd: !0,
|
|
1216
|
-
allowEdit: !0,
|
|
1217
|
-
allowView: !0,
|
|
1218
|
-
allowRemove: !0,
|
|
1219
|
-
positionCustomUserActions: "after"
|
|
1220
|
-
};
|
|
1221
|
-
function on(t, n, s, h, r, i) {
|
|
1222
|
-
console.log(`Render de "${t}" na fase "${n}": ${s}ms`);
|
|
1213
|
+
function rn(t, n, l, h, r, i) {
|
|
1214
|
+
console.log(`Render de "${t}" na fase "${n}": ${l}ms`);
|
|
1223
1215
|
}
|
|
1224
|
-
function
|
|
1216
|
+
function Sn({
|
|
1225
1217
|
title: t,
|
|
1226
1218
|
dataSource: n,
|
|
1227
1219
|
// dataSourceEdition,
|
|
1228
|
-
filterOptions:
|
|
1220
|
+
filterOptions: l,
|
|
1229
1221
|
globalFilterFieldNames: h,
|
|
1230
1222
|
//pageSize,
|
|
1231
1223
|
filterFields: r,
|
|
1232
1224
|
innerRef: i,
|
|
1233
1225
|
//isLoading = false,
|
|
1234
|
-
debug:
|
|
1235
|
-
filterType:
|
|
1226
|
+
debug: c = !1,
|
|
1227
|
+
filterType: p = "normal",
|
|
1236
1228
|
isError: u = !1,
|
|
1237
|
-
error:
|
|
1238
|
-
clearError:
|
|
1229
|
+
error: v = "",
|
|
1230
|
+
clearError: G = () => {
|
|
1239
1231
|
},
|
|
1240
1232
|
width: o = "100%",
|
|
1241
1233
|
height: a = "100%",
|
|
1242
|
-
withBorder:
|
|
1243
|
-
filterPersistenceDelegator:
|
|
1244
|
-
withPagination:
|
|
1234
|
+
withBorder: D = !0,
|
|
1235
|
+
filterPersistenceDelegator: F,
|
|
1236
|
+
withPagination: S = !0,
|
|
1245
1237
|
radius: f,
|
|
1246
|
-
userActions:
|
|
1247
|
-
columnsCountBreakPoints:
|
|
1248
|
-
columnsCount:
|
|
1249
|
-
gutter:
|
|
1250
|
-
component:
|
|
1251
|
-
activeIndex:
|
|
1252
|
-
activeBackgroundColor:
|
|
1253
|
-
activeColor:
|
|
1238
|
+
userActions: d,
|
|
1239
|
+
columnsCountBreakPoints: I,
|
|
1240
|
+
columnsCount: T,
|
|
1241
|
+
gutter: z,
|
|
1242
|
+
component: A,
|
|
1243
|
+
activeIndex: m,
|
|
1244
|
+
activeBackgroundColor: B,
|
|
1245
|
+
activeColor: oe,
|
|
1254
1246
|
onItemEnter: te,
|
|
1255
|
-
onItemLeave:
|
|
1256
|
-
style:
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
debugOptions: P,
|
|
1247
|
+
onItemLeave: O,
|
|
1248
|
+
style: M,
|
|
1249
|
+
spaceOptions: N,
|
|
1250
|
+
variant: E,
|
|
1251
|
+
id: V = Xt("masonry"),
|
|
1252
|
+
debugOptions: X,
|
|
1262
1253
|
// Props de segurança (opcionais)
|
|
1263
|
-
resourceName:
|
|
1264
|
-
resourceDescription:
|
|
1265
|
-
requiredPermissions:
|
|
1266
|
-
fallbackComponent:
|
|
1267
|
-
securityOptions:
|
|
1254
|
+
resourceName: k,
|
|
1255
|
+
resourceDescription: Y,
|
|
1256
|
+
requiredPermissions: ne,
|
|
1257
|
+
fallbackComponent: Z,
|
|
1258
|
+
securityOptions: U
|
|
1268
1259
|
}) {
|
|
1269
|
-
const
|
|
1270
|
-
|
|
1271
|
-
}), [O] = H(J), G = i || be(null), oe = be(null), [ve, c] = H(n.getCurrentPage()), [q, Z] = H(
|
|
1272
|
-
g || (n && n.getTotalRecords() > 0 ? 0 : -1)
|
|
1260
|
+
const $ = Fe(), [J] = W(V), re = i || fe(null), ie = fe(null), [j, le] = W(n.getCurrentPage()), [de, s] = W(
|
|
1261
|
+
m || (n && n.getTotalRecords() > 0 ? 0 : -1)
|
|
1273
1262
|
);
|
|
1274
|
-
|
|
1275
|
-
const [
|
|
1263
|
+
Ke(re);
|
|
1264
|
+
const [P, _] = W({
|
|
1276
1265
|
activeFilterIndex: -1,
|
|
1277
1266
|
expandedFilter: !1
|
|
1278
|
-
}), [
|
|
1279
|
-
isDataSourceV2:
|
|
1280
|
-
v1State: { forceUpdate:
|
|
1281
|
-
} =
|
|
1267
|
+
}), [Ce, ue] = W(0), {
|
|
1268
|
+
isDataSourceV2: H,
|
|
1269
|
+
v1State: { forceUpdate: pe }
|
|
1270
|
+
} = Ve(
|
|
1282
1271
|
"ArchbaseMasonryTemplate",
|
|
1283
1272
|
n
|
|
1284
1273
|
);
|
|
1285
|
-
|
|
1274
|
+
et({
|
|
1286
1275
|
dataSource: n,
|
|
1287
|
-
listener: (
|
|
1288
|
-
(
|
|
1276
|
+
listener: (w) => {
|
|
1277
|
+
(w.type === be.afterRemove || w.type === be.refreshData) && (ue((y) => y + 1), H || pe());
|
|
1289
1278
|
}
|
|
1290
1279
|
});
|
|
1291
|
-
const
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
},
|
|
1301
|
-
enabled: !0,
|
|
1302
|
-
hint: `${m().t("archbase:Clique para criar um novo registro")}`
|
|
1303
|
-
}), l.allowEdit && l.onEditExecute && me() && w.push({
|
|
1304
|
-
id: "actEdit",
|
|
1305
|
-
icon: /* @__PURE__ */ e(mt, {}),
|
|
1306
|
-
color: "blue",
|
|
1307
|
-
label: l.labelEdit ? l.labelEdit : m().t("archbase:Edit"),
|
|
1308
|
-
executeAction: () => {
|
|
1309
|
-
l && l.onEditExecute && l.onEditExecute();
|
|
1310
|
-
},
|
|
1311
|
-
enabled: !n.isEmpty() && n.isBrowsing(),
|
|
1312
|
-
hint: `${m().t("archbase:Clique para editar o registro")}`
|
|
1313
|
-
}), l.allowRemove && l.onRemoveExecute && me() && w.push({
|
|
1314
|
-
id: "actRemove",
|
|
1315
|
-
icon: /* @__PURE__ */ e(et, {}),
|
|
1316
|
-
color: "red",
|
|
1317
|
-
label: l.labelRemove ? l.labelRemove : m().t("archbase:Remove"),
|
|
1318
|
-
executeAction: () => {
|
|
1319
|
-
l && l.onRemoveExecute && l.onRemoveExecute();
|
|
1320
|
-
},
|
|
1321
|
-
enabled: !n.isEmpty() && n.isBrowsing(),
|
|
1322
|
-
hint: `${m().t("archbase:Clique para remover o registro")}`
|
|
1323
|
-
}), l.allowView && l.onViewExecute && me() && w.push({
|
|
1324
|
-
id: "actView",
|
|
1325
|
-
icon: /* @__PURE__ */ e(gt, {}),
|
|
1326
|
-
label: l.labelView ? l.labelView : m().t("archbase:View"),
|
|
1327
|
-
executeAction: () => {
|
|
1328
|
-
l && l.onViewExecute && l.onViewExecute();
|
|
1329
|
-
},
|
|
1330
|
-
enabled: !n.isEmpty() && n.isBrowsing(),
|
|
1331
|
-
hint: `${m().t("archbase:Clique para visualizar o registro")}`
|
|
1332
|
-
}), l.customUserActions && l.positionCustomUserActions === "before" ? [...l.customUserActions, ...w] : l.customUserActions && l.positionCustomUserActions === "after" ? [...w, ...l.customUserActions] : w;
|
|
1333
|
-
}, [B, n, W]), $ = Se(() => {
|
|
1334
|
-
if (y) {
|
|
1335
|
-
const l = y.type;
|
|
1336
|
-
let w = {};
|
|
1337
|
-
return y.props && (w = y.props), n.browseRecords().map((me, ge) => {
|
|
1338
|
-
const Ve = `${O}_${ge}`, Pe = `${O}_${ge}`;
|
|
1339
|
-
let ye = me.active === void 0 ? !1 : me.active;
|
|
1340
|
-
return q >= 0 && (ye = !1, q === ge && (ye = !0)), /* @__PURE__ */ e(
|
|
1341
|
-
l,
|
|
1280
|
+
const ve = Ie(() => {
|
|
1281
|
+
if (A) {
|
|
1282
|
+
const w = A.type;
|
|
1283
|
+
let y = {};
|
|
1284
|
+
return A.props && (y = A.props), n.browseRecords().map((we, K) => {
|
|
1285
|
+
const he = `${J}_${K}`, $e = `${J}_${K}`;
|
|
1286
|
+
let xe = we.active === void 0 ? !1 : we.active;
|
|
1287
|
+
return de >= 0 && (xe = !1, de === K && (xe = !0)), /* @__PURE__ */ e(
|
|
1288
|
+
w,
|
|
1342
1289
|
{
|
|
1343
|
-
id:
|
|
1344
|
-
active:
|
|
1345
|
-
index:
|
|
1290
|
+
id: $e,
|
|
1291
|
+
active: xe,
|
|
1292
|
+
index: K,
|
|
1346
1293
|
dataSource: n,
|
|
1347
|
-
recordData:
|
|
1348
|
-
disabled:
|
|
1349
|
-
...
|
|
1294
|
+
recordData: we,
|
|
1295
|
+
disabled: we.disabled,
|
|
1296
|
+
...y
|
|
1350
1297
|
},
|
|
1351
|
-
|
|
1298
|
+
he
|
|
1352
1299
|
);
|
|
1353
1300
|
});
|
|
1354
1301
|
}
|
|
1355
1302
|
return [];
|
|
1356
|
-
}, [
|
|
1357
|
-
|
|
1358
|
-
},
|
|
1359
|
-
|
|
1360
|
-
},
|
|
1361
|
-
|
|
1362
|
-
},
|
|
1363
|
-
},
|
|
1364
|
-
|
|
1365
|
-
},
|
|
1303
|
+
}, [de, A, J, n, Ce]), Ne = (w, y) => {
|
|
1304
|
+
_({ ...P, currentFilter: w, activeFilterIndex: y });
|
|
1305
|
+
}, De = (w) => {
|
|
1306
|
+
_({ ...P, expandedFilter: w });
|
|
1307
|
+
}, L = (w, y) => {
|
|
1308
|
+
_({ ...P, currentFilter: w, activeFilterIndex: y });
|
|
1309
|
+
}, ae = () => {
|
|
1310
|
+
}, ke = (w, y) => {
|
|
1311
|
+
s(w), n && n.gotoRecordByData(y);
|
|
1312
|
+
}, Ee = (w) => {
|
|
1366
1313
|
if (n) {
|
|
1367
|
-
const
|
|
1368
|
-
|
|
1314
|
+
const y = n.getOptions();
|
|
1315
|
+
y.filter = w, y.currentPage = j, n.refreshData(y), H || pe();
|
|
1369
1316
|
}
|
|
1370
|
-
},
|
|
1317
|
+
}, Pe = (w) => {
|
|
1371
1318
|
if (n) {
|
|
1372
|
-
const
|
|
1373
|
-
|
|
1319
|
+
const y = n.getOptions();
|
|
1320
|
+
y.currentPage = w, n.refreshData(y), H || pe();
|
|
1374
1321
|
}
|
|
1375
|
-
},
|
|
1322
|
+
}, q = () => p === "normal" && h ? /* @__PURE__ */ e(
|
|
1376
1323
|
Qt,
|
|
1377
1324
|
{
|
|
1378
1325
|
searchableFields: h,
|
|
1379
|
-
onFilter:
|
|
1326
|
+
onFilter: Ee,
|
|
1380
1327
|
minFilterValueLength: 1
|
|
1381
1328
|
}
|
|
1382
|
-
) :
|
|
1329
|
+
) : p === "advanced" ? /* @__PURE__ */ e(Mt, { id: `profile_${l.componentName}`, onRender: rn, children: /* @__PURE__ */ e(
|
|
1383
1330
|
Ct,
|
|
1384
1331
|
{
|
|
1385
|
-
id:
|
|
1386
|
-
viewName:
|
|
1387
|
-
apiVersion:
|
|
1388
|
-
ref:
|
|
1389
|
-
variant:
|
|
1390
|
-
expandedFilter:
|
|
1391
|
-
persistenceDelegator:
|
|
1392
|
-
currentFilter:
|
|
1393
|
-
activeFilterIndex:
|
|
1394
|
-
onSelectedFilter:
|
|
1395
|
-
onFilterChanged:
|
|
1396
|
-
onSearchByFilter:
|
|
1397
|
-
onToggleExpandedFilter:
|
|
1332
|
+
id: l.componentName,
|
|
1333
|
+
viewName: l.viewName,
|
|
1334
|
+
apiVersion: l.apiVersion,
|
|
1335
|
+
ref: ie,
|
|
1336
|
+
variant: E || $.variant,
|
|
1337
|
+
expandedFilter: P.expandedFilter,
|
|
1338
|
+
persistenceDelegator: F,
|
|
1339
|
+
currentFilter: P.currentFilter,
|
|
1340
|
+
activeFilterIndex: P.activeFilterIndex,
|
|
1341
|
+
onSelectedFilter: L,
|
|
1342
|
+
onFilterChanged: Ne,
|
|
1343
|
+
onSearchByFilter: ae,
|
|
1344
|
+
onToggleExpandedFilter: De,
|
|
1398
1345
|
width: "660px",
|
|
1399
1346
|
height: "170px",
|
|
1400
1347
|
children: r
|
|
1401
1348
|
}
|
|
1402
|
-
) }) : /* @__PURE__ */ e(
|
|
1403
|
-
menuButtonColor: "blue.5",
|
|
1404
|
-
menuPosition: "left"
|
|
1405
|
-
}, je = {
|
|
1349
|
+
) }) : /* @__PURE__ */ e(Be, {}), ce = { ...{
|
|
1406
1350
|
headerFlexGrow: "left",
|
|
1407
1351
|
footerGridColumns: {}
|
|
1408
|
-
},
|
|
1352
|
+
}, ...N };
|
|
1409
1353
|
return /* @__PURE__ */ e(
|
|
1410
|
-
|
|
1354
|
+
Re,
|
|
1411
1355
|
{
|
|
1412
|
-
resourceName:
|
|
1413
|
-
resourceDescription:
|
|
1414
|
-
requiredPermissions:
|
|
1415
|
-
fallbackComponent:
|
|
1416
|
-
onSecurityReady:
|
|
1417
|
-
onAccessDenied:
|
|
1356
|
+
resourceName: k,
|
|
1357
|
+
resourceDescription: Y,
|
|
1358
|
+
requiredPermissions: ne,
|
|
1359
|
+
fallbackComponent: Z,
|
|
1360
|
+
onSecurityReady: U?.onSecurityReady,
|
|
1361
|
+
onAccessDenied: U?.onAccessDenied,
|
|
1418
1362
|
children: /* @__PURE__ */ e(
|
|
1419
|
-
|
|
1363
|
+
Dt,
|
|
1420
1364
|
{
|
|
1421
|
-
innerRef:
|
|
1365
|
+
innerRef: re,
|
|
1422
1366
|
width: o,
|
|
1423
1367
|
height: a,
|
|
1424
1368
|
radius: f,
|
|
1425
|
-
withBorder:
|
|
1369
|
+
withBorder: D,
|
|
1426
1370
|
isError: u,
|
|
1427
|
-
error:
|
|
1428
|
-
clearError:
|
|
1371
|
+
error: v,
|
|
1372
|
+
clearError: G,
|
|
1429
1373
|
title: t,
|
|
1430
|
-
defaultDebug:
|
|
1431
|
-
debugOptions:
|
|
1432
|
-
style:
|
|
1433
|
-
options:
|
|
1434
|
-
headerLeft: /* @__PURE__ */
|
|
1435
|
-
|
|
1436
|
-
|
|
1374
|
+
defaultDebug: c,
|
|
1375
|
+
debugOptions: X,
|
|
1376
|
+
style: M,
|
|
1377
|
+
options: ce,
|
|
1378
|
+
headerLeft: d?.visible !== !1 ? /* @__PURE__ */ x(me, { gap: "8px", rowGap: "8px", children: [
|
|
1379
|
+
d?.customUserActions && d?.customUserActionsPosition === "left" ? d.customUserActions : null,
|
|
1380
|
+
d?.allowAdd !== !1 && d?.onAddExecute ? /* @__PURE__ */ e(
|
|
1381
|
+
ee,
|
|
1382
|
+
{
|
|
1383
|
+
actionName: "add",
|
|
1384
|
+
actionDescription: `Adicionar novo ${Y || "registro"}`,
|
|
1385
|
+
color: "green",
|
|
1386
|
+
variant: E ?? $.variant,
|
|
1387
|
+
leftSection: /* @__PURE__ */ e(ft, {}),
|
|
1388
|
+
onClick: () => d.onAddExecute(),
|
|
1389
|
+
children: d.labelAdd || C().t("archbase:New")
|
|
1390
|
+
}
|
|
1391
|
+
) : null,
|
|
1392
|
+
d?.allowEdit !== !1 && d?.onEditExecute ? /* @__PURE__ */ e(
|
|
1393
|
+
ee,
|
|
1394
|
+
{
|
|
1395
|
+
actionName: "edit",
|
|
1396
|
+
actionDescription: `Editar ${Y || "registro"}`,
|
|
1397
|
+
color: "blue",
|
|
1398
|
+
leftSection: /* @__PURE__ */ e(mt, {}),
|
|
1399
|
+
disabled: !n.isBrowsing() || n.isEmpty(),
|
|
1400
|
+
variant: E ?? $.variant,
|
|
1401
|
+
onClick: () => d.onEditExecute(),
|
|
1402
|
+
children: d.labelEdit || C().t("archbase:Edit")
|
|
1403
|
+
}
|
|
1404
|
+
) : null,
|
|
1405
|
+
d?.allowRemove !== !1 && d?.onRemoveExecute ? /* @__PURE__ */ e(
|
|
1406
|
+
ee,
|
|
1407
|
+
{
|
|
1408
|
+
actionName: "delete",
|
|
1409
|
+
actionDescription: `Remover ${Y || "registro"}`,
|
|
1410
|
+
color: "red",
|
|
1411
|
+
leftSection: /* @__PURE__ */ e(Ye, {}),
|
|
1412
|
+
disabled: !n.isBrowsing() || n.isEmpty(),
|
|
1413
|
+
variant: E ?? $.variant,
|
|
1414
|
+
onClick: () => d.onRemoveExecute(),
|
|
1415
|
+
children: d.labelRemove || C().t("archbase:Remove")
|
|
1416
|
+
}
|
|
1417
|
+
) : null,
|
|
1418
|
+
d?.allowView !== !1 && d?.onViewExecute ? /* @__PURE__ */ e(
|
|
1419
|
+
ee,
|
|
1420
|
+
{
|
|
1421
|
+
actionName: "view",
|
|
1422
|
+
actionDescription: `Visualizar ${Y || "registro"}`,
|
|
1423
|
+
color: "gray.7",
|
|
1424
|
+
leftSection: /* @__PURE__ */ e(gt, {}),
|
|
1425
|
+
disabled: !n.isBrowsing() || n.isEmpty(),
|
|
1426
|
+
variant: E ?? $.variant,
|
|
1427
|
+
onClick: () => d.onViewExecute(),
|
|
1428
|
+
children: d.labelView || C().t("archbase:View")
|
|
1429
|
+
}
|
|
1430
|
+
) : null,
|
|
1431
|
+
d?.customUserActions && d?.customUserActionsPosition === "right" ? d.customUserActions : null
|
|
1432
|
+
] }) : void 0,
|
|
1433
|
+
headerRight: q(),
|
|
1434
|
+
footerRight: S ? /* @__PURE__ */ e(yt, { total: n.getTotalPages(), onChange: Pe }) : void 0,
|
|
1437
1435
|
children: /* @__PURE__ */ e(
|
|
1438
1436
|
Jt,
|
|
1439
1437
|
{
|
|
1440
1438
|
value: {
|
|
1441
1439
|
dataSource: n,
|
|
1442
|
-
ownerId:
|
|
1443
|
-
handleSelectItem:
|
|
1444
|
-
activeBackgroundColor:
|
|
1445
|
-
activeColor:
|
|
1440
|
+
ownerId: V,
|
|
1441
|
+
handleSelectItem: ke,
|
|
1442
|
+
activeBackgroundColor: B,
|
|
1443
|
+
activeColor: oe,
|
|
1446
1444
|
onItemEnter: te,
|
|
1447
|
-
onItemLeave:
|
|
1445
|
+
onItemLeave: O
|
|
1448
1446
|
},
|
|
1449
|
-
children: /* @__PURE__ */ e(
|
|
1447
|
+
children: /* @__PURE__ */ e(_t, { columnsCountBreakPoints: I, children: /* @__PURE__ */ e(Wt, { gutter: z, columnsCount: T, children: ve }) })
|
|
1450
1448
|
}
|
|
1451
1449
|
)
|
|
1452
1450
|
}
|
|
@@ -1454,7 +1452,7 @@ function In({
|
|
|
1454
1452
|
}
|
|
1455
1453
|
);
|
|
1456
1454
|
}
|
|
1457
|
-
const
|
|
1455
|
+
const on = {
|
|
1458
1456
|
visible: !0,
|
|
1459
1457
|
allowAdd: !0,
|
|
1460
1458
|
allowEdit: !0,
|
|
@@ -1462,478 +1460,478 @@ const ln = {
|
|
|
1462
1460
|
allowRemove: !0,
|
|
1463
1461
|
positionCustomUserActions: "after"
|
|
1464
1462
|
};
|
|
1465
|
-
function
|
|
1463
|
+
function In({
|
|
1466
1464
|
title: t,
|
|
1467
1465
|
dataSource: n,
|
|
1468
1466
|
// dataSourceEdition,
|
|
1469
|
-
filterOptions:
|
|
1467
|
+
filterOptions: l,
|
|
1470
1468
|
//pageSize,
|
|
1471
1469
|
filterFields: h,
|
|
1472
1470
|
innerRef: r,
|
|
1473
1471
|
//isLoading = false,
|
|
1474
1472
|
isError: i = !1,
|
|
1475
|
-
error:
|
|
1476
|
-
clearError:
|
|
1473
|
+
error: c = "",
|
|
1474
|
+
clearError: p = () => {
|
|
1477
1475
|
},
|
|
1478
1476
|
width: u = "100%",
|
|
1479
|
-
height:
|
|
1480
|
-
withBorder:
|
|
1477
|
+
height: v = "100%",
|
|
1478
|
+
withBorder: G = !0,
|
|
1481
1479
|
filterPersistenceDelegator: o,
|
|
1482
1480
|
withPagination: a = !0,
|
|
1483
|
-
children:
|
|
1484
|
-
radius:
|
|
1485
|
-
userActions:
|
|
1481
|
+
children: D,
|
|
1482
|
+
radius: F,
|
|
1483
|
+
userActions: S,
|
|
1486
1484
|
debug: f = !1,
|
|
1487
|
-
variant:
|
|
1488
|
-
actionsButtonsOptions:
|
|
1489
|
-
spaceOptions:
|
|
1490
|
-
style:
|
|
1491
|
-
debugOptions:
|
|
1485
|
+
variant: d,
|
|
1486
|
+
actionsButtonsOptions: I,
|
|
1487
|
+
spaceOptions: T,
|
|
1488
|
+
style: z,
|
|
1489
|
+
debugOptions: A,
|
|
1492
1490
|
// Props de segurança (opcionais)
|
|
1493
|
-
resourceName:
|
|
1494
|
-
resourceDescription:
|
|
1495
|
-
requiredPermissions:
|
|
1491
|
+
resourceName: m,
|
|
1492
|
+
resourceDescription: B,
|
|
1493
|
+
requiredPermissions: oe,
|
|
1496
1494
|
fallbackComponent: te,
|
|
1497
|
-
securityOptions:
|
|
1495
|
+
securityOptions: O
|
|
1498
1496
|
}) {
|
|
1499
|
-
const
|
|
1500
|
-
autoRegisterActions:
|
|
1501
|
-
}),
|
|
1497
|
+
const M = Fe(), N = Ae({
|
|
1498
|
+
autoRegisterActions: O?.autoRegisterActions ?? !0
|
|
1499
|
+
}), E = r || fe(null), V = fe(null), [X, k] = W({
|
|
1502
1500
|
activeFilterIndex: -1,
|
|
1503
1501
|
expandedFilter: !1
|
|
1504
1502
|
}), {
|
|
1505
|
-
isDataSourceV2:
|
|
1503
|
+
isDataSourceV2: Y,
|
|
1506
1504
|
v1State: { forceUpdate: ne }
|
|
1507
|
-
} =
|
|
1505
|
+
} = Ve(
|
|
1508
1506
|
"ArchbasePanelTemplate",
|
|
1509
1507
|
n
|
|
1510
|
-
),
|
|
1511
|
-
const
|
|
1512
|
-
return
|
|
1508
|
+
), Z = Ie(() => {
|
|
1509
|
+
const s = { ...on, ...S }, P = (Ce) => N.isAvailable ? (N.registerAction(), N.hasPermission()) : !0, _ = [];
|
|
1510
|
+
return s.allowAdd && s.onAddExecute && P() && _.push({
|
|
1513
1511
|
id: "1",
|
|
1514
1512
|
icon: /* @__PURE__ */ e(ft, {}),
|
|
1515
1513
|
color: "green",
|
|
1516
|
-
label:
|
|
1514
|
+
label: s.labelAdd ? s.labelAdd : C().t("archbase:New"),
|
|
1517
1515
|
executeAction: () => {
|
|
1518
|
-
|
|
1516
|
+
s && s.onAddExecute && s.onAddExecute();
|
|
1519
1517
|
},
|
|
1520
1518
|
enabled: !0,
|
|
1521
1519
|
hint: "Clique para criar."
|
|
1522
|
-
}),
|
|
1520
|
+
}), s.allowEdit && s.onEditExecute && P() && _.push({
|
|
1523
1521
|
id: "2",
|
|
1524
1522
|
icon: /* @__PURE__ */ e(mt, {}),
|
|
1525
1523
|
color: "blue",
|
|
1526
|
-
label:
|
|
1524
|
+
label: s.labelEdit ? s.labelEdit : C().t("archbase:Edit"),
|
|
1527
1525
|
executeAction: () => {
|
|
1528
|
-
|
|
1526
|
+
s && s.onEditExecute && s.onEditExecute();
|
|
1529
1527
|
},
|
|
1530
1528
|
enabled: !n.isEmpty() && n.isBrowsing(),
|
|
1531
1529
|
hint: "Clique para editar."
|
|
1532
|
-
}),
|
|
1530
|
+
}), s.allowRemove && s.onRemoveExecute && P() && _.push({
|
|
1533
1531
|
id: "3",
|
|
1534
|
-
icon: /* @__PURE__ */ e(
|
|
1532
|
+
icon: /* @__PURE__ */ e(Ye, {}),
|
|
1535
1533
|
color: "red",
|
|
1536
|
-
label:
|
|
1534
|
+
label: s.labelRemove ? s.labelRemove : C().t("archbase:Remove"),
|
|
1537
1535
|
executeAction: () => {
|
|
1538
|
-
|
|
1536
|
+
s && s.onRemoveExecute && s.onRemoveExecute();
|
|
1539
1537
|
},
|
|
1540
1538
|
enabled: !n.isEmpty() && n.isBrowsing(),
|
|
1541
1539
|
hint: "Clique para remover."
|
|
1542
|
-
}),
|
|
1540
|
+
}), s.allowView && s.onView && P() && _.push({
|
|
1543
1541
|
id: "4",
|
|
1544
1542
|
icon: /* @__PURE__ */ e(gt, {}),
|
|
1545
1543
|
color: "green",
|
|
1546
|
-
label:
|
|
1544
|
+
label: s.labelView ? s.labelView : C().t("archbase:View"),
|
|
1547
1545
|
executeAction: () => {
|
|
1548
|
-
|
|
1546
|
+
s && s.onView && s.onView();
|
|
1549
1547
|
},
|
|
1550
1548
|
enabled: !n.isEmpty() && n.isBrowsing(),
|
|
1551
1549
|
hint: "Clique para visualizar."
|
|
1552
|
-
}),
|
|
1553
|
-
}, [
|
|
1554
|
-
|
|
1555
|
-
},
|
|
1556
|
-
|
|
1557
|
-
},
|
|
1558
|
-
|
|
1559
|
-
},
|
|
1560
|
-
},
|
|
1550
|
+
}), s.customUserActions && s.positionCustomUserActions === "before" ? [...s.customUserActions, ..._] : s.customUserActions && s.positionCustomUserActions === "after" ? [..._, ...s.customUserActions] : _;
|
|
1551
|
+
}, [S, n, N]), U = (s, P) => {
|
|
1552
|
+
k({ ...X, currentFilter: s, activeFilterIndex: P });
|
|
1553
|
+
}, $ = (s) => {
|
|
1554
|
+
k({ ...X, expandedFilter: s });
|
|
1555
|
+
}, J = (s, P) => {
|
|
1556
|
+
k({ ...X, currentFilter: s, activeFilterIndex: P });
|
|
1557
|
+
}, re = () => {
|
|
1558
|
+
}, ie = {
|
|
1561
1559
|
menuButtonColor: "blue.5",
|
|
1562
1560
|
menuPosition: "left"
|
|
1563
|
-
},
|
|
1561
|
+
}, j = {
|
|
1564
1562
|
headerFlexGrow: "left",
|
|
1565
1563
|
footerFlexGrow: "right"
|
|
1566
1564
|
// footerGridColumns: {},
|
|
1567
|
-
},
|
|
1565
|
+
}, le = { ...ie, ...I }, de = { ...j, ...T };
|
|
1568
1566
|
return /* @__PURE__ */ e(
|
|
1569
|
-
|
|
1567
|
+
Re,
|
|
1570
1568
|
{
|
|
1571
|
-
resourceName:
|
|
1572
|
-
resourceDescription:
|
|
1573
|
-
requiredPermissions:
|
|
1569
|
+
resourceName: m,
|
|
1570
|
+
resourceDescription: B,
|
|
1571
|
+
requiredPermissions: oe,
|
|
1574
1572
|
fallbackComponent: te,
|
|
1575
|
-
onSecurityReady:
|
|
1576
|
-
onAccessDenied:
|
|
1573
|
+
onSecurityReady: O?.onSecurityReady,
|
|
1574
|
+
onAccessDenied: O?.onAccessDenied,
|
|
1577
1575
|
children: /* @__PURE__ */ e(
|
|
1578
|
-
|
|
1576
|
+
Dt,
|
|
1579
1577
|
{
|
|
1580
|
-
innerRef:
|
|
1578
|
+
innerRef: E,
|
|
1581
1579
|
width: u,
|
|
1582
|
-
height:
|
|
1583
|
-
radius:
|
|
1584
|
-
withBorder:
|
|
1580
|
+
height: v,
|
|
1581
|
+
radius: F,
|
|
1582
|
+
withBorder: G,
|
|
1585
1583
|
isError: i,
|
|
1586
|
-
error:
|
|
1587
|
-
clearError:
|
|
1584
|
+
error: c,
|
|
1585
|
+
clearError: p,
|
|
1588
1586
|
title: t,
|
|
1589
1587
|
defaultDebug: f,
|
|
1590
|
-
debugOptions:
|
|
1591
|
-
style:
|
|
1592
|
-
options:
|
|
1593
|
-
headerLeft: /* @__PURE__ */ e(
|
|
1588
|
+
debugOptions: A,
|
|
1589
|
+
style: z,
|
|
1590
|
+
options: de,
|
|
1591
|
+
headerLeft: /* @__PURE__ */ e(Ot, { actions: Z, options: le }),
|
|
1594
1592
|
headerRight: /* @__PURE__ */ e(
|
|
1595
1593
|
Ct,
|
|
1596
1594
|
{
|
|
1597
|
-
id:
|
|
1598
|
-
viewName:
|
|
1599
|
-
apiVersion:
|
|
1600
|
-
ref:
|
|
1601
|
-
variant:
|
|
1602
|
-
expandedFilter:
|
|
1595
|
+
id: l.componentName,
|
|
1596
|
+
viewName: l.viewName,
|
|
1597
|
+
apiVersion: l.apiVersion,
|
|
1598
|
+
ref: V,
|
|
1599
|
+
variant: d || M.variant,
|
|
1600
|
+
expandedFilter: X.expandedFilter,
|
|
1603
1601
|
persistenceDelegator: o,
|
|
1604
|
-
currentFilter:
|
|
1605
|
-
activeFilterIndex:
|
|
1606
|
-
onSelectedFilter:
|
|
1607
|
-
onFilterChanged:
|
|
1608
|
-
onSearchByFilter:
|
|
1609
|
-
onToggleExpandedFilter:
|
|
1602
|
+
currentFilter: X.currentFilter,
|
|
1603
|
+
activeFilterIndex: X.activeFilterIndex,
|
|
1604
|
+
onSelectedFilter: J,
|
|
1605
|
+
onFilterChanged: U,
|
|
1606
|
+
onSearchByFilter: re,
|
|
1607
|
+
onToggleExpandedFilter: $,
|
|
1610
1608
|
width: "660px",
|
|
1611
1609
|
height: "170px",
|
|
1612
1610
|
children: h
|
|
1613
1611
|
}
|
|
1614
1612
|
),
|
|
1615
|
-
footerRight: a && /* @__PURE__ */ e(
|
|
1616
|
-
children:
|
|
1613
|
+
footerRight: a && /* @__PURE__ */ e(yt, { total: 10 }),
|
|
1614
|
+
children: D
|
|
1617
1615
|
}
|
|
1618
1616
|
)
|
|
1619
1617
|
}
|
|
1620
1618
|
);
|
|
1621
1619
|
}
|
|
1622
|
-
function
|
|
1620
|
+
function Dn() {
|
|
1623
1621
|
return /* @__PURE__ */ e("div", { children: "SEARCH TEMPLATE" });
|
|
1624
1622
|
}
|
|
1625
|
-
function
|
|
1623
|
+
function ln(t, n) {
|
|
1626
1624
|
const {
|
|
1627
1625
|
// Props obrigatórias
|
|
1628
|
-
opened:
|
|
1626
|
+
opened: l,
|
|
1629
1627
|
title: h,
|
|
1630
1628
|
children: r,
|
|
1631
1629
|
onClose: i,
|
|
1632
|
-
idField:
|
|
1633
|
-
displayField:
|
|
1630
|
+
idField: c,
|
|
1631
|
+
displayField: p,
|
|
1634
1632
|
// Seleção
|
|
1635
1633
|
selectionMode: u = "single",
|
|
1636
|
-
onSelect:
|
|
1637
|
-
onSelectMultiple:
|
|
1634
|
+
onSelect: v,
|
|
1635
|
+
onSelectMultiple: G,
|
|
1638
1636
|
initialSelectedItems: o,
|
|
1639
1637
|
selectOnDoubleClick: a = !0,
|
|
1640
|
-
onBeforeConfirm:
|
|
1641
|
-
onAfterConfirm:
|
|
1638
|
+
onBeforeConfirm: D,
|
|
1639
|
+
onAfterConfirm: F,
|
|
1642
1640
|
// DataSource
|
|
1643
|
-
dataSource:
|
|
1641
|
+
dataSource: S,
|
|
1644
1642
|
loadData: f,
|
|
1645
|
-
searchFields:
|
|
1646
|
-
pageSize:
|
|
1643
|
+
searchFields: d = "",
|
|
1644
|
+
pageSize: I = 100,
|
|
1647
1645
|
// Aparência
|
|
1648
|
-
displaySubField:
|
|
1649
|
-
renderSelectedItem:
|
|
1650
|
-
renderSelectedItems:
|
|
1651
|
-
icon:
|
|
1652
|
-
modalSize:
|
|
1653
|
-
modalHeight:
|
|
1646
|
+
displaySubField: T,
|
|
1647
|
+
renderSelectedItem: z,
|
|
1648
|
+
renderSelectedItems: A,
|
|
1649
|
+
icon: m,
|
|
1650
|
+
modalSize: B = "70%",
|
|
1651
|
+
modalHeight: oe = "600px",
|
|
1654
1652
|
gridHeight: te = 400,
|
|
1655
|
-
rowHeight:
|
|
1656
|
-
selectionIndicatorColor:
|
|
1657
|
-
showSelectionIndicator:
|
|
1653
|
+
rowHeight: O,
|
|
1654
|
+
selectionIndicatorColor: M = "blue.0",
|
|
1655
|
+
showSelectionIndicator: N = !0,
|
|
1658
1656
|
// Múltipla seleção
|
|
1659
|
-
maxSelections:
|
|
1660
|
-
showSelectionCount:
|
|
1661
|
-
allowClearAll:
|
|
1657
|
+
maxSelections: E,
|
|
1658
|
+
showSelectionCount: V = !0,
|
|
1659
|
+
allowClearAll: X = !0,
|
|
1662
1660
|
// Estado
|
|
1663
|
-
isLoading:
|
|
1664
|
-
isError:
|
|
1661
|
+
isLoading: k,
|
|
1662
|
+
isError: Y = !1,
|
|
1665
1663
|
error: ne = "",
|
|
1666
|
-
clearError:
|
|
1667
|
-
autoCloseAlertError:
|
|
1668
|
-
onError:
|
|
1664
|
+
clearError: Z,
|
|
1665
|
+
autoCloseAlertError: U = 15e3,
|
|
1666
|
+
onError: $,
|
|
1669
1667
|
// Customização
|
|
1670
|
-
userActions:
|
|
1671
|
-
labels:
|
|
1672
|
-
variant:
|
|
1668
|
+
userActions: J,
|
|
1669
|
+
labels: re,
|
|
1670
|
+
variant: ie,
|
|
1673
1671
|
// Segurança
|
|
1674
|
-
resourceName:
|
|
1675
|
-
resourceDescription:
|
|
1676
|
-
requiredPermissions:
|
|
1677
|
-
fallbackComponent:
|
|
1678
|
-
securityOptions:
|
|
1679
|
-
} = t,
|
|
1672
|
+
resourceName: j,
|
|
1673
|
+
resourceDescription: le,
|
|
1674
|
+
requiredPermissions: de,
|
|
1675
|
+
fallbackComponent: s,
|
|
1676
|
+
securityOptions: P
|
|
1677
|
+
} = t, _ = Fe(), Ce = Ze(), { colorScheme: ue } = Xe(), H = ue === "dark", pe = ht(), ve = H ? "dark.5" : M, [Ne, De] = W(!1), [L, ae] = W(o || []), [ke, Ee] = W(!1), [Pe, q] = W(""), Ge = fe(null), ce = !!S, y = Q(() => ce && S ? S : (Ge.current || (Ge.current = new jt("dsLookup", {
|
|
1680
1678
|
records: [],
|
|
1681
1679
|
grandTotalRecords: 0,
|
|
1682
1680
|
currentPage: 0,
|
|
1683
1681
|
totalPages: 0,
|
|
1684
|
-
pageSize:
|
|
1685
|
-
})), Ge.current), [
|
|
1686
|
-
|
|
1687
|
-
autoRegisterActions:
|
|
1682
|
+
pageSize: I
|
|
1683
|
+
})), Ge.current), [ce, S, I])();
|
|
1684
|
+
Ae({
|
|
1685
|
+
autoRegisterActions: P?.autoRegisterActions ?? !0
|
|
1688
1686
|
});
|
|
1689
|
-
const
|
|
1687
|
+
const we = Ve(
|
|
1690
1688
|
"ArchbaseLookupDataTemplate",
|
|
1691
|
-
|
|
1689
|
+
y,
|
|
1692
1690
|
void 0,
|
|
1693
1691
|
void 0
|
|
1694
1692
|
);
|
|
1695
|
-
|
|
1696
|
-
dataSource:
|
|
1697
|
-
listener: (
|
|
1698
|
-
if (
|
|
1693
|
+
et({
|
|
1694
|
+
dataSource: y,
|
|
1695
|
+
listener: (g) => {
|
|
1696
|
+
if (g.type === be.onError && (Ee(!0), q(g.error || "")), g.type === be.afterScroll) {
|
|
1699
1697
|
if (u === "single") {
|
|
1700
|
-
const
|
|
1701
|
-
|
|
1698
|
+
const b = y.getCurrentRecord();
|
|
1699
|
+
b && ae([b]);
|
|
1702
1700
|
}
|
|
1703
|
-
|
|
1701
|
+
we.isDataSourceV2 || pe();
|
|
1704
1702
|
}
|
|
1705
1703
|
}
|
|
1706
1704
|
});
|
|
1707
|
-
const
|
|
1708
|
-
okButton:
|
|
1709
|
-
cancelButton:
|
|
1710
|
-
clearButton:
|
|
1711
|
-
selectedLabel:
|
|
1712
|
-
doubleClickHint:
|
|
1713
|
-
noItemSelected:
|
|
1714
|
-
itemsSelected:
|
|
1715
|
-
...
|
|
1716
|
-
},
|
|
1717
|
-
async (
|
|
1718
|
-
if (!(
|
|
1719
|
-
|
|
1705
|
+
const K = {
|
|
1706
|
+
okButton: C().t("archbase:Ok"),
|
|
1707
|
+
cancelButton: C().t("archbase:Cancel"),
|
|
1708
|
+
clearButton: C().t("archbase:Clear"),
|
|
1709
|
+
selectedLabel: C().t("archbase:Selected"),
|
|
1710
|
+
doubleClickHint: C().t("archbase:Double click to select"),
|
|
1711
|
+
noItemSelected: C().t("archbase:No item selected"),
|
|
1712
|
+
itemsSelected: C().t("archbase:items selected"),
|
|
1713
|
+
...re
|
|
1714
|
+
}, he = Q(
|
|
1715
|
+
async (g) => {
|
|
1716
|
+
if (!(ce || !f)) {
|
|
1717
|
+
De(!0);
|
|
1720
1718
|
try {
|
|
1721
|
-
const
|
|
1722
|
-
|
|
1723
|
-
records:
|
|
1724
|
-
grandTotalRecords:
|
|
1719
|
+
const b = await f(g, d);
|
|
1720
|
+
y.open({
|
|
1721
|
+
records: b,
|
|
1722
|
+
grandTotalRecords: b.length,
|
|
1725
1723
|
currentPage: 0,
|
|
1726
|
-
totalPages: Math.ceil(
|
|
1727
|
-
pageSize:
|
|
1724
|
+
totalPages: Math.ceil(b.length / I),
|
|
1725
|
+
pageSize: I
|
|
1728
1726
|
});
|
|
1729
|
-
} catch (
|
|
1730
|
-
|
|
1727
|
+
} catch (b) {
|
|
1728
|
+
Ee(!0), q(ge(b)), $?.(b);
|
|
1731
1729
|
} finally {
|
|
1732
|
-
|
|
1730
|
+
De(!1);
|
|
1733
1731
|
}
|
|
1734
1732
|
}
|
|
1735
1733
|
},
|
|
1736
|
-
[
|
|
1737
|
-
),
|
|
1738
|
-
(
|
|
1739
|
-
const
|
|
1740
|
-
f && !
|
|
1734
|
+
[ce, f, d, I, y, $]
|
|
1735
|
+
), $e = Q(
|
|
1736
|
+
(g) => {
|
|
1737
|
+
const b = g?.quickFilterValues?.[0] || "";
|
|
1738
|
+
f && !ce && he(b);
|
|
1741
1739
|
},
|
|
1742
|
-
[f,
|
|
1740
|
+
[f, ce, he]
|
|
1743
1741
|
);
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
}, [
|
|
1747
|
-
o &&
|
|
1742
|
+
Qe(() => {
|
|
1743
|
+
l && (o?.length ? ae(o) : ae([]), he());
|
|
1744
|
+
}, [l]), Qe(() => {
|
|
1745
|
+
o && ae(o);
|
|
1748
1746
|
}, [o]);
|
|
1749
|
-
const
|
|
1750
|
-
(
|
|
1751
|
-
u === "single" ?
|
|
1747
|
+
const xe = Q(
|
|
1748
|
+
(g) => {
|
|
1749
|
+
u === "single" ? ae(g.slice(0, 1)) : E && g.length > E ? ae(g.slice(0, E)) : ae(g);
|
|
1752
1750
|
},
|
|
1753
|
-
[u,
|
|
1754
|
-
),
|
|
1755
|
-
(
|
|
1751
|
+
[u, E]
|
|
1752
|
+
), it = Q(
|
|
1753
|
+
(g) => {
|
|
1756
1754
|
if (u === "single" && a) {
|
|
1757
|
-
const
|
|
1758
|
-
|
|
1755
|
+
const b = y.getCurrentRecord();
|
|
1756
|
+
b && (v?.(b), i());
|
|
1759
1757
|
}
|
|
1760
1758
|
},
|
|
1761
|
-
[u, a,
|
|
1762
|
-
),
|
|
1763
|
-
|
|
1764
|
-
}, []),
|
|
1765
|
-
|
|
1766
|
-
}, [
|
|
1759
|
+
[u, a, y, v, i]
|
|
1760
|
+
), ot = Q(() => {
|
|
1761
|
+
ae([]);
|
|
1762
|
+
}, []), Le = Q(async () => {
|
|
1763
|
+
D && !await D(L) || (u === "single" ? L.length > 0 && v?.(L[0]) : G?.(L), F?.(L), i());
|
|
1764
|
+
}, [L, u, v, G, D, F, i]), ze = Q(() => {
|
|
1767
1765
|
i();
|
|
1768
|
-
}, [i]),
|
|
1769
|
-
pt.showWarning(
|
|
1770
|
-
},
|
|
1771
|
-
|
|
1766
|
+
}, [i]), Me = () => {
|
|
1767
|
+
pt.showWarning(C().t("archbase:Click on Ok or Cancel to close"));
|
|
1768
|
+
}, Ue = () => {
|
|
1769
|
+
Z?.(), Ee(!1), q("");
|
|
1772
1770
|
};
|
|
1773
1771
|
Rt(
|
|
1774
1772
|
n,
|
|
1775
1773
|
() => ({
|
|
1776
|
-
getSelectedItems: () =>
|
|
1777
|
-
getSelectedItem: () =>
|
|
1778
|
-
clearSelection: () =>
|
|
1779
|
-
selectItems: (
|
|
1780
|
-
selectItem: (
|
|
1781
|
-
deselectItem: (
|
|
1782
|
-
|
|
1774
|
+
getSelectedItems: () => L,
|
|
1775
|
+
getSelectedItem: () => L[0] || null,
|
|
1776
|
+
clearSelection: () => ae([]),
|
|
1777
|
+
selectItems: (g) => xe(g),
|
|
1778
|
+
selectItem: (g) => ae([g]),
|
|
1779
|
+
deselectItem: (g) => {
|
|
1780
|
+
ae((b) => b.filter((Tt) => Tt[c] !== g[c]));
|
|
1783
1781
|
},
|
|
1784
|
-
refreshData: () =>
|
|
1785
|
-
getDataSource: () =>
|
|
1782
|
+
refreshData: () => he(),
|
|
1783
|
+
getDataSource: () => y,
|
|
1786
1784
|
confirmSelection: async () => {
|
|
1787
|
-
await
|
|
1785
|
+
await Le();
|
|
1788
1786
|
},
|
|
1789
|
-
cancelSelection:
|
|
1787
|
+
cancelSelection: ze
|
|
1790
1788
|
}),
|
|
1791
|
-
[
|
|
1789
|
+
[L, xe, c, he, y, Le, ze]
|
|
1792
1790
|
);
|
|
1793
1791
|
const lt = Q(
|
|
1794
|
-
(
|
|
1795
|
-
const
|
|
1796
|
-
return
|
|
1792
|
+
(g) => {
|
|
1793
|
+
const b = g[c];
|
|
1794
|
+
return b !== void 0 ? b : "";
|
|
1797
1795
|
},
|
|
1798
|
-
[
|
|
1799
|
-
),
|
|
1800
|
-
|
|
1801
|
-
/* @__PURE__ */ e(
|
|
1802
|
-
] }),
|
|
1803
|
-
if (!
|
|
1796
|
+
[c]
|
|
1797
|
+
), at = k || Ne, st = ne || Pe, ct = Y || ke, dt = /* @__PURE__ */ x(se, { gap: "sm", children: [
|
|
1798
|
+
m,
|
|
1799
|
+
/* @__PURE__ */ e(Se, { fw: 600, children: h })
|
|
1800
|
+
] }), R = () => {
|
|
1801
|
+
if (!N)
|
|
1804
1802
|
return null;
|
|
1805
|
-
if (u === "single" &&
|
|
1806
|
-
return L
|
|
1807
|
-
if (u === "multiple" &&
|
|
1808
|
-
return
|
|
1809
|
-
if (u === "single" &&
|
|
1810
|
-
const
|
|
1811
|
-
return /* @__PURE__ */ e(
|
|
1812
|
-
/* @__PURE__ */
|
|
1813
|
-
/* @__PURE__ */ e(
|
|
1814
|
-
/* @__PURE__ */
|
|
1815
|
-
|
|
1803
|
+
if (u === "single" && L.length > 0 && z)
|
|
1804
|
+
return z(L[0]);
|
|
1805
|
+
if (u === "multiple" && L.length > 0 && A)
|
|
1806
|
+
return A(L);
|
|
1807
|
+
if (u === "single" && L.length > 0) {
|
|
1808
|
+
const g = L[0];
|
|
1809
|
+
return /* @__PURE__ */ e(Je, { withBorder: !0, p: "sm", radius: "md", bg: ve, children: /* @__PURE__ */ x(se, { justify: "space-between", children: [
|
|
1810
|
+
/* @__PURE__ */ x(se, { gap: "xs", children: [
|
|
1811
|
+
/* @__PURE__ */ e(je, { size: 16, color: "green" }),
|
|
1812
|
+
/* @__PURE__ */ x(Se, { size: "sm", fw: 500, children: [
|
|
1813
|
+
K.selectedLabel,
|
|
1816
1814
|
":"
|
|
1817
1815
|
] }),
|
|
1818
|
-
/* @__PURE__ */ e(
|
|
1819
|
-
|
|
1816
|
+
/* @__PURE__ */ e(Se, { size: "sm", fw: 600, children: String(g[p]) }),
|
|
1817
|
+
T && /* @__PURE__ */ e(Se, { size: "sm", c: H ? "gray.4" : "dimmed", children: String(g[T] || "") })
|
|
1820
1818
|
] }),
|
|
1821
|
-
/* @__PURE__ */ e(
|
|
1819
|
+
/* @__PURE__ */ e(Se, { size: "xs", c: H ? "gray.4" : "dimmed", children: K.doubleClickHint })
|
|
1822
1820
|
] }) });
|
|
1823
1821
|
}
|
|
1824
|
-
return u === "multiple" &&
|
|
1825
|
-
/* @__PURE__ */
|
|
1826
|
-
/* @__PURE__ */ e(
|
|
1827
|
-
/* @__PURE__ */
|
|
1828
|
-
|
|
1822
|
+
return u === "multiple" && L.length > 0 ? /* @__PURE__ */ e(Je, { withBorder: !0, p: "sm", radius: "md", bg: ve, children: /* @__PURE__ */ x(se, { justify: "space-between", children: [
|
|
1823
|
+
/* @__PURE__ */ x(se, { gap: "xs", children: [
|
|
1824
|
+
/* @__PURE__ */ e(je, { size: 16, color: "green" }),
|
|
1825
|
+
/* @__PURE__ */ x(Se, { size: "sm", fw: 500, children: [
|
|
1826
|
+
L.length,
|
|
1829
1827
|
" ",
|
|
1830
|
-
|
|
1828
|
+
K.itemsSelected
|
|
1831
1829
|
] })
|
|
1832
1830
|
] }),
|
|
1833
|
-
|
|
1834
|
-
|
|
1831
|
+
X && /* @__PURE__ */ e(
|
|
1832
|
+
qe,
|
|
1835
1833
|
{
|
|
1836
1834
|
size: "xs",
|
|
1837
1835
|
variant: "subtle",
|
|
1838
1836
|
color: "red",
|
|
1839
|
-
leftSection: /* @__PURE__ */ e(
|
|
1840
|
-
onClick:
|
|
1841
|
-
children:
|
|
1837
|
+
leftSection: /* @__PURE__ */ e(Ye, { size: 14 }),
|
|
1838
|
+
onClick: ot,
|
|
1839
|
+
children: K.clearButton
|
|
1842
1840
|
}
|
|
1843
1841
|
)
|
|
1844
1842
|
] }) }) : null;
|
|
1845
1843
|
};
|
|
1846
1844
|
return /* @__PURE__ */ e(
|
|
1847
|
-
|
|
1845
|
+
Re,
|
|
1848
1846
|
{
|
|
1849
|
-
resourceName:
|
|
1850
|
-
resourceDescription:
|
|
1851
|
-
requiredPermissions:
|
|
1852
|
-
fallbackComponent:
|
|
1853
|
-
onSecurityReady:
|
|
1854
|
-
onAccessDenied:
|
|
1847
|
+
resourceName: j,
|
|
1848
|
+
resourceDescription: le,
|
|
1849
|
+
requiredPermissions: de,
|
|
1850
|
+
fallbackComponent: s,
|
|
1851
|
+
onSecurityReady: P?.onSecurityReady,
|
|
1852
|
+
onAccessDenied: P?.onAccessDenied,
|
|
1855
1853
|
children: /* @__PURE__ */ e(
|
|
1856
1854
|
ut,
|
|
1857
1855
|
{
|
|
1858
1856
|
title: dt,
|
|
1859
|
-
opened:
|
|
1860
|
-
onClose:
|
|
1861
|
-
size:
|
|
1857
|
+
opened: l,
|
|
1858
|
+
onClose: Me,
|
|
1859
|
+
size: B,
|
|
1862
1860
|
centered: !0,
|
|
1863
1861
|
closeOnEscape: !1,
|
|
1864
1862
|
closeOnClickOutside: !1,
|
|
1865
1863
|
withCloseButton: !1,
|
|
1866
1864
|
overlayProps: {
|
|
1867
|
-
color: ue === "dark" ?
|
|
1865
|
+
color: ue === "dark" ? Ce.colors.dark[7] : Ce.colors.gray[6],
|
|
1868
1866
|
opacity: 0.25
|
|
1869
1867
|
},
|
|
1870
|
-
children: /* @__PURE__ */
|
|
1868
|
+
children: /* @__PURE__ */ x(tt, { height: oe, children: [
|
|
1871
1869
|
ct && /* @__PURE__ */ e(bt, { size: "100px", children: /* @__PURE__ */ e(
|
|
1872
|
-
|
|
1870
|
+
We,
|
|
1873
1871
|
{
|
|
1874
|
-
autoClose:
|
|
1872
|
+
autoClose: U,
|
|
1875
1873
|
withCloseButton: !0,
|
|
1876
1874
|
withBorder: !0,
|
|
1877
|
-
icon: /* @__PURE__ */ e(
|
|
1878
|
-
title:
|
|
1875
|
+
icon: /* @__PURE__ */ e(_e, { size: "1.4rem" }),
|
|
1876
|
+
title: C().t("archbase:WARNING"),
|
|
1879
1877
|
titleColor: "rgb(250, 82, 82)",
|
|
1880
|
-
variant:
|
|
1881
|
-
onClose:
|
|
1882
|
-
children: /* @__PURE__ */ e("span", { children:
|
|
1878
|
+
variant: ie ?? _.variant,
|
|
1879
|
+
onClose: Ue,
|
|
1880
|
+
children: /* @__PURE__ */ e("span", { children: st })
|
|
1883
1881
|
}
|
|
1884
1882
|
) }),
|
|
1885
|
-
/* @__PURE__ */ e(
|
|
1886
|
-
|
|
1883
|
+
/* @__PURE__ */ e(nt, { children: /* @__PURE__ */ x(Vt, { gap: "md", h: "100%", children: [
|
|
1884
|
+
J && /* @__PURE__ */ e(se, { justify: "flex-end", children: J }),
|
|
1887
1885
|
/* @__PURE__ */ e(
|
|
1888
1886
|
St,
|
|
1889
1887
|
{
|
|
1890
|
-
dataSource:
|
|
1888
|
+
dataSource: y,
|
|
1891
1889
|
height: te,
|
|
1892
|
-
rowHeight:
|
|
1890
|
+
rowHeight: O,
|
|
1893
1891
|
withBorder: !0,
|
|
1894
1892
|
striped: !0,
|
|
1895
1893
|
highlightOnHover: !0,
|
|
1896
|
-
isLoading:
|
|
1894
|
+
isLoading: at,
|
|
1897
1895
|
enableRowSelection: u === "multiple",
|
|
1898
1896
|
enableRowNumbers: !0,
|
|
1899
1897
|
enableColumnFilterModes: !0,
|
|
1900
1898
|
enableTopToolbar: !0,
|
|
1901
1899
|
enableGlobalFilter: !0,
|
|
1902
1900
|
getRowId: lt,
|
|
1903
|
-
onCellDoubleClick:
|
|
1904
|
-
onSelectedRowsChanged: u === "multiple" ?
|
|
1905
|
-
onFilterModelChange:
|
|
1901
|
+
onCellDoubleClick: it,
|
|
1902
|
+
onSelectedRowsChanged: u === "multiple" ? xe : void 0,
|
|
1903
|
+
onFilterModelChange: $e,
|
|
1906
1904
|
children: r
|
|
1907
1905
|
}
|
|
1908
1906
|
),
|
|
1909
|
-
|
|
1907
|
+
R()
|
|
1910
1908
|
] }) }),
|
|
1911
|
-
/* @__PURE__ */ e(
|
|
1912
|
-
/* @__PURE__ */ e(
|
|
1913
|
-
/* @__PURE__ */
|
|
1909
|
+
/* @__PURE__ */ e(rt, { size: "50px", children: /* @__PURE__ */ x(me, { justify: "space-between", align: "center", children: [
|
|
1910
|
+
/* @__PURE__ */ e(se, {}),
|
|
1911
|
+
/* @__PURE__ */ x(se, { gap: "md", children: [
|
|
1914
1912
|
/* @__PURE__ */ e(
|
|
1915
|
-
|
|
1913
|
+
ee,
|
|
1916
1914
|
{
|
|
1917
1915
|
actionName: "confirm",
|
|
1918
1916
|
actionDescription: "Confirmar seleção",
|
|
1919
|
-
leftSection: /* @__PURE__ */ e(
|
|
1920
|
-
onClick:
|
|
1921
|
-
disabled:
|
|
1922
|
-
variant:
|
|
1917
|
+
leftSection: /* @__PURE__ */ e(je, {}),
|
|
1918
|
+
onClick: Le,
|
|
1919
|
+
disabled: L.length === 0,
|
|
1920
|
+
variant: ie ?? _.variant,
|
|
1923
1921
|
color: "green",
|
|
1924
|
-
children:
|
|
1922
|
+
children: K.okButton
|
|
1925
1923
|
}
|
|
1926
1924
|
),
|
|
1927
1925
|
/* @__PURE__ */ e(
|
|
1928
|
-
|
|
1926
|
+
ee,
|
|
1929
1927
|
{
|
|
1930
1928
|
actionName: "cancel",
|
|
1931
1929
|
actionDescription: "Cancelar seleção",
|
|
1932
|
-
leftSection: /* @__PURE__ */ e(
|
|
1933
|
-
onClick:
|
|
1934
|
-
variant:
|
|
1930
|
+
leftSection: /* @__PURE__ */ e(Te, {}),
|
|
1931
|
+
onClick: ze,
|
|
1932
|
+
variant: ie ?? _.variant,
|
|
1935
1933
|
color: "red",
|
|
1936
|
-
children:
|
|
1934
|
+
children: K.cancelButton
|
|
1937
1935
|
}
|
|
1938
1936
|
)
|
|
1939
1937
|
] })
|
|
@@ -1944,21 +1942,21 @@ function sn(t, n) {
|
|
|
1944
1942
|
}
|
|
1945
1943
|
);
|
|
1946
1944
|
}
|
|
1947
|
-
const
|
|
1948
|
-
function
|
|
1949
|
-
const [n,
|
|
1950
|
-
|
|
1951
|
-
}, []), r = Q((
|
|
1952
|
-
|
|
1953
|
-
const
|
|
1954
|
-
return delete
|
|
1945
|
+
const Tn = At(ln), xt = Ut(void 0);
|
|
1946
|
+
function Bn({ children: t }) {
|
|
1947
|
+
const [n, l] = W({}), h = Q((p, u) => {
|
|
1948
|
+
l((v) => ({ ...v, [p]: u }));
|
|
1949
|
+
}, []), r = Q((p) => {
|
|
1950
|
+
l((u) => {
|
|
1951
|
+
const v = { ...u };
|
|
1952
|
+
return delete v[p], v;
|
|
1955
1953
|
});
|
|
1956
1954
|
}, []), i = Q(() => {
|
|
1957
|
-
|
|
1958
|
-
}, []),
|
|
1959
|
-
return /* @__PURE__ */ e(xt.Provider, { value: { errors: n, setError: h, clearError: r, clearAll: i, getError:
|
|
1955
|
+
l({});
|
|
1956
|
+
}, []), c = Q((p) => n[p], [n]);
|
|
1957
|
+
return /* @__PURE__ */ e(xt.Provider, { value: { errors: n, setError: h, clearError: r, clearAll: i, getError: c }, children: t });
|
|
1960
1958
|
}
|
|
1961
|
-
function
|
|
1959
|
+
function Vn() {
|
|
1962
1960
|
return Et(xt);
|
|
1963
1961
|
}
|
|
1964
1962
|
function Nn() {
|
|
@@ -1968,23 +1966,23 @@ function Nn() {
|
|
|
1968
1966
|
return t;
|
|
1969
1967
|
}
|
|
1970
1968
|
export {
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1969
|
+
wn as ArchbaseAdvancedSmartButton,
|
|
1970
|
+
Re as ArchbaseConditionalSecurityWrapper,
|
|
1971
|
+
An as ArchbaseFormModalTemplate,
|
|
1974
1972
|
Fn as ArchbaseFormTemplate,
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1973
|
+
En as ArchbaseGridTemplate,
|
|
1974
|
+
Tn as ArchbaseLookupDataTemplate,
|
|
1975
|
+
Sn as ArchbaseMasonryTemplate,
|
|
1976
|
+
Rn as ArchbaseModalTemplate,
|
|
1977
|
+
In as ArchbasePanelTemplate,
|
|
1978
|
+
Dn as ArchbaseSearchTemplate,
|
|
1979
|
+
ee as ArchbaseSmartActionButton,
|
|
1980
|
+
Dt as ArchbaseSpaceTemplate,
|
|
1981
|
+
Bn as ValidationErrorsProvider,
|
|
1982
|
+
vn as useArchbaseLookup,
|
|
1985
1983
|
yn as useConditionalSecurity,
|
|
1986
|
-
|
|
1984
|
+
Ae as useOptionalTemplateSecurity,
|
|
1987
1985
|
Nn as useRequiredValidationErrors,
|
|
1988
|
-
|
|
1989
|
-
|
|
1986
|
+
xn as useTemplateSecurityAvailable,
|
|
1987
|
+
Vn as useValidationErrors
|
|
1990
1988
|
};
|