@archbase/template 3.0.2 → 3.0.3
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/LICENSE +21 -0
- package/README.md +52 -0
- package/dist/index.js +573 -560
- package/dist/template/src/ArchbaseGridTemplate.d.ts +12 -0
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsx as e, Fragment as
|
|
2
|
-
import { Button as
|
|
3
|
-
import { useForceUpdate as
|
|
4
|
-
import { IconBug as
|
|
5
|
-
import { useArchbaseAppContext as we, useValidationErrors as
|
|
6
|
-
import
|
|
7
|
-
import { useArchbaseV1V2Compatibility as Se, useArchbaseDataSourceListener as
|
|
8
|
-
import { ArchbaseAlert as
|
|
9
|
-
import { ArchbaseSpaceFixed as
|
|
10
|
-
import { ArchbaseQueryBuilder as
|
|
11
|
-
import
|
|
12
|
-
import { uniqueId as
|
|
13
|
-
const
|
|
1
|
+
import { jsx as e, Fragment as Ee, jsxs as C } from "react/jsx-runtime";
|
|
2
|
+
import { Button as Ue, Paper as We, Box as Ne, ScrollArea as st, LoadingOverlay as at, Group as ve, useMantineColorScheme as Ke, Modal as ct, Flex as ue, px as Rt, Text as Et, Grid as me, Pagination as dt } from "@mantine/core";
|
|
3
|
+
import { useForceUpdate as ut, useUncontrolled as It, useHotkeys as Tt } from "@mantine/hooks";
|
|
4
|
+
import { IconBug as je, IconDeviceFloppy as Vt, IconX as Pe, IconCheck as ht, IconPlus as Qe, IconEdit as Xe, IconTrash as Ye, IconEye as Ze } from "@tabler/icons-react";
|
|
5
|
+
import { useArchbaseAppContext as we, useValidationErrors as Dt, ValidationErrorsProvider as ft, getI18nextInstance as m, processErrorMessage as de, useArchbaseTheme as Oe, emit as Bt, useArchbaseTranslation as Pt } from "@archbase/core";
|
|
6
|
+
import Be, { useMemo as be, useState as te, forwardRef as St, useRef as ae, useImperativeHandle as Nt, useEffect as mt, Fragment as Gt, Profiler as $t, createContext as Ut, useCallback as Ge, useContext as pt } from "react";
|
|
7
|
+
import { useArchbaseV1V2Compatibility as Se, useArchbaseDataSourceListener as et, DataSourceEventNames as pe } from "@archbase/data";
|
|
8
|
+
import { ArchbaseAlert as Le, ArchbaseDialog as gt, ArchbaseDataGrid as jt, GridToolBarActions as Lt, ArchbaseDebugInspector as Mt, ArchbaseMasonryProvider as kt, ArchbaseMasonryResponsive as zt, ArchbaseMasonry as qt, ArchbaseActionButtons as xt } from "@archbase/components";
|
|
9
|
+
import { ArchbaseSpaceFixed as tt, ArchbaseSpaceTop as vt, ArchbaseSpaceFill as rt, ArchbaseForm as bt, ArchbaseSpaceBottom as nt } from "@archbase/layout";
|
|
10
|
+
import { ArchbaseQueryBuilder as it, buildFrom as _t, ArchbaseGlobalFilter as Ht } from "@archbase/advanced";
|
|
11
|
+
import $e from "@rehooks/component-size";
|
|
12
|
+
import { uniqueId as Jt } from "lodash";
|
|
13
|
+
const Wt = {
|
|
14
14
|
isAvailable: !1,
|
|
15
15
|
hasPermission: () => !0,
|
|
16
16
|
// Default: sempre permite
|
|
@@ -21,7 +21,7 @@ const kt = {
|
|
|
21
21
|
canEdit: !0,
|
|
22
22
|
canDelete: !0,
|
|
23
23
|
canView: !0
|
|
24
|
-
}, ge = (t) => be(() =>
|
|
24
|
+
}, ge = (t) => be(() => Wt, []), fr = () => !1, ne = ({
|
|
25
25
|
actionName: t,
|
|
26
26
|
actionDescription: r,
|
|
27
27
|
children: a,
|
|
@@ -31,10 +31,10 @@ const kt = {
|
|
|
31
31
|
...u
|
|
32
32
|
}) => {
|
|
33
33
|
const f = ge();
|
|
34
|
-
return
|
|
34
|
+
return Be.useEffect(() => {
|
|
35
35
|
n && t && r && f.isAvailable && f.registerAction();
|
|
36
|
-
}, [t, r, n, f.isAvailable, f.registerAction]), !t || !f.isAvailable ? /* @__PURE__ */ e(
|
|
37
|
-
},
|
|
36
|
+
}, [t, r, n, f.isAvailable, f.registerAction]), !t || !f.isAvailable ? /* @__PURE__ */ e(Ue, { onClick: o, ...u, children: a }) : f.hasPermission() ? /* @__PURE__ */ e(Ue, { onClick: o, ...u, children: a }) : /* @__PURE__ */ e(Ee, { children: d });
|
|
37
|
+
}, mr = ({
|
|
38
38
|
actionName: t,
|
|
39
39
|
actionDescription: r,
|
|
40
40
|
children: a,
|
|
@@ -42,22 +42,22 @@ const kt = {
|
|
|
42
42
|
onClick: n,
|
|
43
43
|
...o
|
|
44
44
|
}) => {
|
|
45
|
-
const [u, f] =
|
|
46
|
-
return
|
|
45
|
+
const [u, f] = Be.useState(null), [T, v] = Be.useState(!1);
|
|
46
|
+
return Be.useEffect(() => {
|
|
47
47
|
if (!t) {
|
|
48
|
-
f(/* @__PURE__ */ e(
|
|
48
|
+
f(/* @__PURE__ */ e(Ue, { onClick: n, ...o, children: a }));
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
|
-
v(!1), f(/* @__PURE__ */ e(
|
|
52
|
-
}, [t, r, a, d, o]), /* @__PURE__ */ e(
|
|
51
|
+
v(!1), f(/* @__PURE__ */ e(Ue, { onClick: n, ...o, children: a }));
|
|
52
|
+
}, [t, r, a, d, o]), /* @__PURE__ */ e(Ee, { children: u });
|
|
53
53
|
}, Ae = ({
|
|
54
54
|
children: t
|
|
55
|
-
}) => /* @__PURE__ */ e(
|
|
55
|
+
}) => /* @__PURE__ */ e(Ee, { children: t }), pr = (t) => be(() => ({
|
|
56
56
|
shouldWrap: !1,
|
|
57
57
|
isSecurityAvailable: !1,
|
|
58
58
|
hasResourceName: !!t
|
|
59
59
|
}), [t]);
|
|
60
|
-
function
|
|
60
|
+
function gr({
|
|
61
61
|
innerRef: t,
|
|
62
62
|
title: r,
|
|
63
63
|
isError: a = !1,
|
|
@@ -69,59 +69,59 @@ function dr({
|
|
|
69
69
|
autoCloseAlertError: f = 15e3,
|
|
70
70
|
width: T = "100%",
|
|
71
71
|
height: v = "100%",
|
|
72
|
-
withBorder:
|
|
72
|
+
withBorder: ee = !0,
|
|
73
73
|
children: l,
|
|
74
74
|
radius: c,
|
|
75
|
-
variant:
|
|
75
|
+
variant: M,
|
|
76
76
|
footerAlign: A = "left",
|
|
77
77
|
footerContent: V,
|
|
78
78
|
dataSource: h,
|
|
79
79
|
onSave: B,
|
|
80
|
-
onCancel:
|
|
81
|
-
onBeforeSave:
|
|
82
|
-
onAfterSave:
|
|
80
|
+
onCancel: q,
|
|
81
|
+
onBeforeSave: P,
|
|
82
|
+
onAfterSave: X,
|
|
83
83
|
onBeforeCancel: b,
|
|
84
84
|
onAfterCancel: x,
|
|
85
85
|
onError: y,
|
|
86
86
|
// Props de segurança (opcionais)
|
|
87
|
-
resourceName:
|
|
88
|
-
resourceDescription:
|
|
89
|
-
requiredPermissions:
|
|
90
|
-
fallbackComponent:
|
|
87
|
+
resourceName: Y,
|
|
88
|
+
resourceDescription: _,
|
|
89
|
+
requiredPermissions: S,
|
|
90
|
+
fallbackComponent: E,
|
|
91
91
|
securityOptions: F,
|
|
92
|
-
...
|
|
92
|
+
...N
|
|
93
93
|
}) {
|
|
94
|
-
const w = we(), [
|
|
94
|
+
const w = we(), [G, R] = te(a), [re, H] = te(o), k = ut();
|
|
95
95
|
ge({
|
|
96
96
|
autoRegisterActions: F?.autoRegisterActions ?? !0
|
|
97
97
|
});
|
|
98
|
-
const
|
|
98
|
+
const D = Se(
|
|
99
99
|
"ArchbaseFormTemplate",
|
|
100
100
|
h,
|
|
101
101
|
void 0,
|
|
102
102
|
void 0
|
|
103
103
|
);
|
|
104
|
-
|
|
104
|
+
et({
|
|
105
105
|
dataSource: h,
|
|
106
|
-
listener: (
|
|
107
|
-
|
|
106
|
+
listener: (I) => {
|
|
107
|
+
I.type === pe.onError && (R(!0), H(I.error)), (I.type === pe.afterEdit || I.type === pe.afterInsert) && (D.isDataSourceV2 || k());
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
|
-
const
|
|
110
|
+
const $ = Dt(), J = async (I) => {
|
|
111
111
|
try {
|
|
112
|
-
B ? B(
|
|
113
|
-
|
|
114
|
-
}).catch((
|
|
115
|
-
y && y(
|
|
112
|
+
B ? B(I) : (P && await P(I), h.isBrowsing() || h.save().then(() => {
|
|
113
|
+
$?.clearAll(), X && X(I);
|
|
114
|
+
}).catch((Z) => {
|
|
115
|
+
y && y(de(Z)), R(!0), H(de(Z));
|
|
116
116
|
}));
|
|
117
|
-
} catch (
|
|
118
|
-
y && y(
|
|
117
|
+
} catch (Z) {
|
|
118
|
+
y && y(de(Z)), R(!0), H(de(Z));
|
|
119
119
|
}
|
|
120
|
-
},
|
|
120
|
+
}, U = () => {
|
|
121
121
|
try {
|
|
122
|
-
|
|
123
|
-
} catch (
|
|
124
|
-
y && y(
|
|
122
|
+
q ? q() : (b && b(), h.isBrowsing() || h.cancel(), $?.clearAll(), x && x());
|
|
123
|
+
} catch (I) {
|
|
124
|
+
y && y(de(I)), R(!0), H(de(I));
|
|
125
125
|
}
|
|
126
126
|
}, W = () => {
|
|
127
127
|
u && u(), R(!1), H("");
|
|
@@ -129,17 +129,17 @@ function dr({
|
|
|
129
129
|
return /* @__PURE__ */ e(
|
|
130
130
|
Ae,
|
|
131
131
|
{
|
|
132
|
-
resourceName:
|
|
133
|
-
resourceDescription:
|
|
134
|
-
requiredPermissions:
|
|
135
|
-
fallbackComponent:
|
|
132
|
+
resourceName: Y,
|
|
133
|
+
resourceDescription: _,
|
|
134
|
+
requiredPermissions: S,
|
|
135
|
+
fallbackComponent: E,
|
|
136
136
|
onSecurityReady: F?.onSecurityReady,
|
|
137
137
|
onAccessDenied: F?.onAccessDenied,
|
|
138
|
-
children: /* @__PURE__ */ e(
|
|
139
|
-
|
|
138
|
+
children: /* @__PURE__ */ e(ft, { children: /* @__PURE__ */ C(
|
|
139
|
+
We,
|
|
140
140
|
{
|
|
141
141
|
ref: t,
|
|
142
|
-
withBorder:
|
|
142
|
+
withBorder: ee,
|
|
143
143
|
radius: c,
|
|
144
144
|
style: {
|
|
145
145
|
width: T,
|
|
@@ -149,22 +149,22 @@ function dr({
|
|
|
149
149
|
padding: 4
|
|
150
150
|
},
|
|
151
151
|
children: [
|
|
152
|
-
|
|
153
|
-
|
|
152
|
+
G && /* @__PURE__ */ e(Ne, { style: { flexShrink: 0 }, children: /* @__PURE__ */ e(
|
|
153
|
+
Le,
|
|
154
154
|
{
|
|
155
155
|
autoClose: f,
|
|
156
156
|
withCloseButton: !0,
|
|
157
157
|
withBorder: !0,
|
|
158
|
-
icon: /* @__PURE__ */ e(
|
|
158
|
+
icon: /* @__PURE__ */ e(je, { size: "1.4rem" }),
|
|
159
159
|
title: m().t("WARNING"),
|
|
160
160
|
titleColor: "rgb(250, 82, 82)",
|
|
161
|
-
variant:
|
|
161
|
+
variant: M ?? w.variant,
|
|
162
162
|
onClose: W,
|
|
163
|
-
children: /* @__PURE__ */ e("span", { children:
|
|
163
|
+
children: /* @__PURE__ */ e("span", { children: re })
|
|
164
164
|
}
|
|
165
165
|
) }),
|
|
166
166
|
/* @__PURE__ */ C(
|
|
167
|
-
|
|
167
|
+
st,
|
|
168
168
|
{
|
|
169
169
|
style: {
|
|
170
170
|
flex: 1,
|
|
@@ -173,13 +173,13 @@ function dr({
|
|
|
173
173
|
padding: "calc(0.625rem / 2)"
|
|
174
174
|
},
|
|
175
175
|
children: [
|
|
176
|
-
/* @__PURE__ */ e(
|
|
176
|
+
/* @__PURE__ */ e(at, { visible: d || n, opacity: 0.3 }),
|
|
177
177
|
l
|
|
178
178
|
]
|
|
179
179
|
}
|
|
180
180
|
),
|
|
181
181
|
/* @__PURE__ */ C(
|
|
182
|
-
|
|
182
|
+
Ne,
|
|
183
183
|
{
|
|
184
184
|
style: {
|
|
185
185
|
flexShrink: 0,
|
|
@@ -190,46 +190,46 @@ function dr({
|
|
|
190
190
|
gap: "1rem"
|
|
191
191
|
},
|
|
192
192
|
children: [
|
|
193
|
-
A === "right" && V && /* @__PURE__ */ e(
|
|
193
|
+
A === "right" && V && /* @__PURE__ */ e(Ne, { style: { flex: 1 }, children: V }),
|
|
194
194
|
h && !h.isBrowsing() ? /* @__PURE__ */ C(ve, { gap: "md", children: [
|
|
195
195
|
/* @__PURE__ */ e(
|
|
196
|
-
|
|
196
|
+
ne,
|
|
197
197
|
{
|
|
198
198
|
actionName: "save",
|
|
199
|
-
actionDescription: `Salvar ${
|
|
200
|
-
leftSection: /* @__PURE__ */ e(
|
|
201
|
-
onClick: () =>
|
|
199
|
+
actionDescription: `Salvar ${_ || "registro"}`,
|
|
200
|
+
leftSection: /* @__PURE__ */ e(Vt, {}),
|
|
201
|
+
onClick: () => J(h.getCurrentRecord()),
|
|
202
202
|
disabled: h && h.isBrowsing(),
|
|
203
|
-
variant:
|
|
203
|
+
variant: M ?? w.variant,
|
|
204
204
|
color: "green",
|
|
205
205
|
children: `${m().t("Ok")}`
|
|
206
206
|
}
|
|
207
207
|
),
|
|
208
208
|
/* @__PURE__ */ e(
|
|
209
|
-
|
|
209
|
+
ne,
|
|
210
210
|
{
|
|
211
211
|
actionName: "cancel",
|
|
212
212
|
actionDescription: "Cancelar operação",
|
|
213
|
-
leftSection: /* @__PURE__ */ e(
|
|
214
|
-
onClick:
|
|
213
|
+
leftSection: /* @__PURE__ */ e(Pe, {}),
|
|
214
|
+
onClick: U,
|
|
215
215
|
disabled: h && h.isBrowsing(),
|
|
216
|
-
variant:
|
|
216
|
+
variant: M ?? w.variant,
|
|
217
217
|
color: "red",
|
|
218
218
|
children: `${m().t("Cancel")}`
|
|
219
219
|
}
|
|
220
220
|
)
|
|
221
221
|
] }) : /* @__PURE__ */ e(ve, { gap: "md", children: /* @__PURE__ */ e(
|
|
222
|
-
|
|
222
|
+
ne,
|
|
223
223
|
{
|
|
224
224
|
actionName: "close",
|
|
225
225
|
actionDescription: "Fechar formulário",
|
|
226
|
-
leftSection: /* @__PURE__ */ e(
|
|
227
|
-
onClick:
|
|
228
|
-
variant:
|
|
226
|
+
leftSection: /* @__PURE__ */ e(Pe, {}),
|
|
227
|
+
onClick: U,
|
|
228
|
+
variant: M ?? w.variant,
|
|
229
229
|
children: `${m().t("Close")}`
|
|
230
230
|
}
|
|
231
231
|
) }),
|
|
232
|
-
(A === "left" || A === "center") && V && /* @__PURE__ */ e(
|
|
232
|
+
(A === "left" || A === "center") && V && /* @__PURE__ */ e(Ne, { style: { flex: A === "left" ? 1 : 0, textAlign: "right" }, children: V })
|
|
233
233
|
]
|
|
234
234
|
}
|
|
235
235
|
)
|
|
@@ -239,7 +239,7 @@ function dr({
|
|
|
239
239
|
}
|
|
240
240
|
);
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function xr({
|
|
243
243
|
title: t,
|
|
244
244
|
withOverlay: r = !0,
|
|
245
245
|
overlayProps: a,
|
|
@@ -250,54 +250,54 @@ function ur({
|
|
|
250
250
|
fullScreen: f,
|
|
251
251
|
centered: T,
|
|
252
252
|
variant: v,
|
|
253
|
-
closeOnEscape:
|
|
253
|
+
closeOnEscape: ee = !0,
|
|
254
254
|
size: l,
|
|
255
255
|
dataSource: c,
|
|
256
|
-
height:
|
|
256
|
+
height: M,
|
|
257
257
|
userActions: A,
|
|
258
258
|
onAfterSave: V,
|
|
259
259
|
onClickOk: h,
|
|
260
260
|
onClickCancel: B,
|
|
261
|
-
onBeforeOk:
|
|
262
|
-
onCustomSave:
|
|
263
|
-
isError:
|
|
261
|
+
onBeforeOk: q,
|
|
262
|
+
onCustomSave: P,
|
|
263
|
+
isError: X,
|
|
264
264
|
error: b = "",
|
|
265
265
|
clearError: x = () => {
|
|
266
266
|
},
|
|
267
267
|
onError: y,
|
|
268
|
-
autoCloseAlertError:
|
|
269
|
-
loadingOverlayStyles:
|
|
268
|
+
autoCloseAlertError: Y = 15e3,
|
|
269
|
+
loadingOverlayStyles: _,
|
|
270
270
|
// Props de segurança (opcionais)
|
|
271
|
-
resourceName:
|
|
272
|
-
resourceDescription:
|
|
271
|
+
resourceName: S,
|
|
272
|
+
resourceDescription: E,
|
|
273
273
|
requiredPermissions: F,
|
|
274
|
-
fallbackComponent:
|
|
274
|
+
fallbackComponent: N,
|
|
275
275
|
securityOptions: w,
|
|
276
|
-
|
|
276
|
+
...G
|
|
277
277
|
}) {
|
|
278
|
-
const R = we(),
|
|
278
|
+
const R = we(), re = Oe(), { colorScheme: H } = Ke(), [k, D] = te(X), [$, J] = te(b), [U, W] = te(!1), I = ut();
|
|
279
279
|
ge({
|
|
280
|
-
resourceDescription:
|
|
280
|
+
resourceDescription: E || t?.toString(),
|
|
281
281
|
autoRegisterActions: w?.autoRegisterActions ?? !0
|
|
282
282
|
});
|
|
283
|
-
const
|
|
283
|
+
const Z = Se(
|
|
284
284
|
"ArchbaseFormModalTemplate",
|
|
285
285
|
c,
|
|
286
286
|
void 0,
|
|
287
287
|
void 0
|
|
288
288
|
);
|
|
289
|
-
|
|
289
|
+
et({
|
|
290
290
|
dataSource: c,
|
|
291
|
-
listener: (
|
|
292
|
-
|
|
291
|
+
listener: (K) => {
|
|
292
|
+
K.type === pe.onError && (D(!0), J(K.error)), (K.type === pe.afterEdit || K.type === pe.afterInsert) && (Z.isDataSourceV2 || I());
|
|
293
293
|
}
|
|
294
294
|
});
|
|
295
|
-
const
|
|
295
|
+
const fe = async () => {
|
|
296
296
|
if (c && !c.isBrowsing())
|
|
297
297
|
try {
|
|
298
298
|
W(!0), await c.save(), V && V(c.getCurrentRecord());
|
|
299
|
-
} catch (
|
|
300
|
-
return y && y(
|
|
299
|
+
} catch (K) {
|
|
300
|
+
return y && y(de(K)), D(!0), J(de(K)), W(!1), !1;
|
|
301
301
|
}
|
|
302
302
|
return W(!1), !0;
|
|
303
303
|
}, s = () => {
|
|
@@ -306,82 +306,82 @@ function ur({
|
|
|
306
306
|
c.cancel();
|
|
307
307
|
} catch {
|
|
308
308
|
}
|
|
309
|
-
},
|
|
310
|
-
if (
|
|
311
|
-
c &&
|
|
309
|
+
}, z = async () => {
|
|
310
|
+
if (P)
|
|
311
|
+
c && P(c.getCurrentRecord(), () => {
|
|
312
312
|
h && h();
|
|
313
313
|
});
|
|
314
|
-
else if (
|
|
315
|
-
const
|
|
316
|
-
|
|
317
|
-
await
|
|
318
|
-
}).catch((
|
|
319
|
-
y && y(
|
|
314
|
+
else if (q) {
|
|
315
|
+
const K = q(c.getCurrentRecord());
|
|
316
|
+
K instanceof Promise && K.then(async () => {
|
|
317
|
+
await fe() && h && h();
|
|
318
|
+
}).catch((ye) => {
|
|
319
|
+
y && y(de(ye)), D(!0), J(de(ye));
|
|
320
320
|
});
|
|
321
321
|
} else
|
|
322
|
-
await
|
|
322
|
+
await fe() && h && h();
|
|
323
323
|
}, O = () => {
|
|
324
324
|
s(), B && B();
|
|
325
|
-
},
|
|
326
|
-
|
|
327
|
-
},
|
|
328
|
-
x && x(),
|
|
325
|
+
}, ie = () => {
|
|
326
|
+
gt.showWarning(m().t("archbase:Click on Ok or Cancel to close"));
|
|
327
|
+
}, oe = () => {
|
|
328
|
+
x && x(), D(!1), J("");
|
|
329
329
|
};
|
|
330
330
|
return /* @__PURE__ */ e(
|
|
331
331
|
Ae,
|
|
332
332
|
{
|
|
333
|
-
resourceName:
|
|
334
|
-
resourceDescription:
|
|
333
|
+
resourceName: S,
|
|
334
|
+
resourceDescription: E,
|
|
335
335
|
requiredPermissions: F,
|
|
336
|
-
fallbackComponent:
|
|
336
|
+
fallbackComponent: N,
|
|
337
337
|
onSecurityReady: w?.onSecurityReady,
|
|
338
338
|
onAccessDenied: w?.onAccessDenied,
|
|
339
339
|
children: /* @__PURE__ */ e(
|
|
340
|
-
|
|
340
|
+
ct,
|
|
341
341
|
{
|
|
342
342
|
title: t,
|
|
343
343
|
withOverlay: r,
|
|
344
344
|
overlayProps: a || {
|
|
345
|
-
color: H === "dark" ?
|
|
345
|
+
color: H === "dark" ? re.colors.dark[7] : re.colors.gray[6],
|
|
346
346
|
opacity: 0.25
|
|
347
347
|
},
|
|
348
348
|
withCloseButton: n,
|
|
349
349
|
closeButtonProps: o,
|
|
350
|
-
onClose:
|
|
350
|
+
onClose: ie,
|
|
351
351
|
opened: u,
|
|
352
352
|
fullScreen: f,
|
|
353
353
|
centered: T,
|
|
354
|
-
closeOnEscape:
|
|
354
|
+
closeOnEscape: ee,
|
|
355
355
|
size: l,
|
|
356
|
-
|
|
357
|
-
children: /* @__PURE__ */ C(
|
|
358
|
-
/* @__PURE__ */ e(
|
|
359
|
-
/* @__PURE__ */ C(
|
|
360
|
-
|
|
361
|
-
|
|
356
|
+
...G,
|
|
357
|
+
children: /* @__PURE__ */ C(ft, { children: [
|
|
358
|
+
/* @__PURE__ */ e(at, { styles: _, visible: U, opacity: 0.8 }),
|
|
359
|
+
/* @__PURE__ */ C(tt, { height: M, children: [
|
|
360
|
+
k ? /* @__PURE__ */ e(vt, { size: "100px", children: /* @__PURE__ */ e(
|
|
361
|
+
Le,
|
|
362
362
|
{
|
|
363
|
-
autoClose:
|
|
363
|
+
autoClose: Y,
|
|
364
364
|
withCloseButton: !0,
|
|
365
365
|
withBorder: !0,
|
|
366
|
-
icon: /* @__PURE__ */ e(
|
|
366
|
+
icon: /* @__PURE__ */ e(je, { size: "1.4rem" }),
|
|
367
367
|
title: m().t("WARNING"),
|
|
368
368
|
titleColor: "rgb(250, 82, 82)",
|
|
369
369
|
variant: v ?? R.variant,
|
|
370
|
-
onClose:
|
|
371
|
-
children: /* @__PURE__ */ e("span", { children:
|
|
370
|
+
onClose: oe,
|
|
371
|
+
children: /* @__PURE__ */ e("span", { children: $ })
|
|
372
372
|
}
|
|
373
373
|
) }) : null,
|
|
374
|
-
/* @__PURE__ */ e(
|
|
375
|
-
/* @__PURE__ */ e(
|
|
374
|
+
/* @__PURE__ */ e(rt, { children: /* @__PURE__ */ e(bt, { children: d }) }),
|
|
375
|
+
/* @__PURE__ */ e(nt, { size: "40px", children: /* @__PURE__ */ C(ue, { justify: "space-between", align: "center", children: [
|
|
376
376
|
/* @__PURE__ */ e(ve, { children: A }),
|
|
377
377
|
c && !c.isBrowsing() ? /* @__PURE__ */ C(ve, { gap: "md", children: [
|
|
378
378
|
/* @__PURE__ */ e(
|
|
379
|
-
|
|
379
|
+
ne,
|
|
380
380
|
{
|
|
381
381
|
actionName: "save",
|
|
382
|
-
actionDescription: `Salvar ${
|
|
383
|
-
leftSection: /* @__PURE__ */ e(
|
|
384
|
-
onClick:
|
|
382
|
+
actionDescription: `Salvar ${E || t || "registro"}`,
|
|
383
|
+
leftSection: /* @__PURE__ */ e(ht, {}),
|
|
384
|
+
onClick: z,
|
|
385
385
|
disabled: c && c.isBrowsing(),
|
|
386
386
|
variant: v ?? R.variant,
|
|
387
387
|
color: "green",
|
|
@@ -389,11 +389,11 @@ function ur({
|
|
|
389
389
|
}
|
|
390
390
|
),
|
|
391
391
|
/* @__PURE__ */ e(
|
|
392
|
-
|
|
392
|
+
ne,
|
|
393
393
|
{
|
|
394
394
|
actionName: "cancel",
|
|
395
395
|
actionDescription: "Cancelar operação",
|
|
396
|
-
leftSection: /* @__PURE__ */ e(
|
|
396
|
+
leftSection: /* @__PURE__ */ e(Pe, {}),
|
|
397
397
|
onClick: O,
|
|
398
398
|
disabled: c && c.isBrowsing(),
|
|
399
399
|
variant: v ?? R.variant,
|
|
@@ -402,11 +402,11 @@ function ur({
|
|
|
402
402
|
}
|
|
403
403
|
)
|
|
404
404
|
] }) : /* @__PURE__ */ e(ve, { gap: "md", children: /* @__PURE__ */ e(
|
|
405
|
-
|
|
405
|
+
ne,
|
|
406
406
|
{
|
|
407
407
|
actionName: "close",
|
|
408
408
|
actionDescription: "Fechar janela",
|
|
409
|
-
leftSection: /* @__PURE__ */ e(
|
|
409
|
+
leftSection: /* @__PURE__ */ e(Pe, {}),
|
|
410
410
|
onClick: O,
|
|
411
411
|
variant: v ?? R.variant,
|
|
412
412
|
children: `${m().t("Close")}`
|
|
@@ -420,7 +420,7 @@ function ur({
|
|
|
420
420
|
}
|
|
421
421
|
);
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function vr({
|
|
424
424
|
title: t,
|
|
425
425
|
withOverlay: r = !0,
|
|
426
426
|
overlayProps: a,
|
|
@@ -431,48 +431,48 @@ function hr({
|
|
|
431
431
|
fullScreen: f,
|
|
432
432
|
centered: T,
|
|
433
433
|
variant: v,
|
|
434
|
-
closeOnEscape:
|
|
434
|
+
closeOnEscape: ee = !0,
|
|
435
435
|
size: l,
|
|
436
436
|
height: c,
|
|
437
|
-
onlyOkButton:
|
|
437
|
+
onlyOkButton: M = !1,
|
|
438
438
|
onClose: A,
|
|
439
439
|
onClickOk: V,
|
|
440
440
|
onClickCancel: h,
|
|
441
441
|
userActions: B,
|
|
442
442
|
// Props de segurança (opcionais)
|
|
443
|
-
resourceName:
|
|
444
|
-
resourceDescription:
|
|
445
|
-
requiredPermissions:
|
|
443
|
+
resourceName: q,
|
|
444
|
+
resourceDescription: P,
|
|
445
|
+
requiredPermissions: X,
|
|
446
446
|
fallbackComponent: b,
|
|
447
447
|
securityOptions: x
|
|
448
448
|
}) {
|
|
449
|
-
const y = we(),
|
|
449
|
+
const y = we(), Y = Oe(), { colorScheme: _ } = Ke();
|
|
450
450
|
ge({
|
|
451
451
|
autoRegisterActions: x?.autoRegisterActions ?? !0
|
|
452
452
|
});
|
|
453
|
-
const
|
|
453
|
+
const S = () => {
|
|
454
454
|
V && V(), A();
|
|
455
|
-
},
|
|
455
|
+
}, E = () => {
|
|
456
456
|
h && h(), A();
|
|
457
457
|
}, F = () => {
|
|
458
|
-
|
|
458
|
+
gt.showWarning(m().t("Click on Ok or Cancel to close"));
|
|
459
459
|
};
|
|
460
460
|
return /* @__PURE__ */ e(
|
|
461
461
|
Ae,
|
|
462
462
|
{
|
|
463
|
-
resourceName:
|
|
464
|
-
resourceDescription:
|
|
465
|
-
requiredPermissions:
|
|
463
|
+
resourceName: q,
|
|
464
|
+
resourceDescription: P,
|
|
465
|
+
requiredPermissions: X,
|
|
466
466
|
fallbackComponent: b,
|
|
467
467
|
onSecurityReady: x?.onSecurityReady,
|
|
468
468
|
onAccessDenied: x?.onAccessDenied,
|
|
469
469
|
children: /* @__PURE__ */ e(
|
|
470
|
-
|
|
470
|
+
ct,
|
|
471
471
|
{
|
|
472
472
|
title: t,
|
|
473
473
|
withOverlay: r,
|
|
474
474
|
overlayProps: a || {
|
|
475
|
-
color:
|
|
475
|
+
color: _ === "dark" ? Y.colors.dark[7] : Y.colors.gray[6],
|
|
476
476
|
opacity: 0.25
|
|
477
477
|
},
|
|
478
478
|
withCloseButton: n,
|
|
@@ -481,32 +481,32 @@ function hr({
|
|
|
481
481
|
opened: u,
|
|
482
482
|
fullScreen: f,
|
|
483
483
|
centered: T,
|
|
484
|
-
closeOnEscape:
|
|
484
|
+
closeOnEscape: ee,
|
|
485
485
|
size: l,
|
|
486
|
-
children: /* @__PURE__ */ C(
|
|
487
|
-
/* @__PURE__ */ e(
|
|
488
|
-
/* @__PURE__ */ e(
|
|
486
|
+
children: /* @__PURE__ */ C(tt, { height: c, children: [
|
|
487
|
+
/* @__PURE__ */ e(rt, { children: /* @__PURE__ */ e(bt, { children: d }) }),
|
|
488
|
+
/* @__PURE__ */ e(nt, { size: "40px", children: /* @__PURE__ */ C(ue, { justify: "space-between", align: "center", children: [
|
|
489
489
|
/* @__PURE__ */ e(ve, { children: B }),
|
|
490
490
|
/* @__PURE__ */ C(ve, { gap: "md", children: [
|
|
491
491
|
/* @__PURE__ */ e(
|
|
492
|
-
|
|
492
|
+
ne,
|
|
493
493
|
{
|
|
494
494
|
actionName: "save",
|
|
495
|
-
actionDescription: `Salvar ${
|
|
496
|
-
leftSection: /* @__PURE__ */ e(
|
|
497
|
-
onClick:
|
|
495
|
+
actionDescription: `Salvar ${P || "registro"}`,
|
|
496
|
+
leftSection: /* @__PURE__ */ e(ht, {}),
|
|
497
|
+
onClick: S,
|
|
498
498
|
variant: v ?? y.variant,
|
|
499
499
|
color: "green",
|
|
500
500
|
children: `${m().t("Ok")}`
|
|
501
501
|
}
|
|
502
502
|
),
|
|
503
|
-
|
|
504
|
-
|
|
503
|
+
M ? null : /* @__PURE__ */ e(
|
|
504
|
+
ne,
|
|
505
505
|
{
|
|
506
506
|
actionName: "cancel",
|
|
507
507
|
actionDescription: "Cancelar operação",
|
|
508
|
-
leftSection: /* @__PURE__ */ e(
|
|
509
|
-
onClick:
|
|
508
|
+
leftSection: /* @__PURE__ */ e(Pe, {}),
|
|
509
|
+
onClick: E,
|
|
510
510
|
variant: v ?? y.variant,
|
|
511
511
|
color: "red",
|
|
512
512
|
children: h ? `${m().t("Cancel")}` : `${m().t("Close")}`
|
|
@@ -520,7 +520,7 @@ function hr({
|
|
|
520
520
|
}
|
|
521
521
|
);
|
|
522
522
|
}
|
|
523
|
-
const
|
|
523
|
+
const Kt = (t, r, a) => {
|
|
524
524
|
if (!t || !r || !r.existsValue(`${t.viewName}_${t.componentName}`)) {
|
|
525
525
|
let d = -1, n;
|
|
526
526
|
return a && a.getFilters().length > 0 && (d = 0, n = JSON.parse(a.getFirstFilter()?.filter)), {
|
|
@@ -531,7 +531,7 @@ const zt = (t, r, a) => {
|
|
|
531
531
|
}
|
|
532
532
|
return r.getValue(`${t.viewName}_${t.componentName}`);
|
|
533
533
|
};
|
|
534
|
-
function
|
|
534
|
+
function Qt(t, r) {
|
|
535
535
|
const {
|
|
536
536
|
title: a,
|
|
537
537
|
printTitle: d,
|
|
@@ -541,161 +541,168 @@ function qt(t, r) {
|
|
|
541
541
|
pageIndex: f = 0,
|
|
542
542
|
columns: T,
|
|
543
543
|
filterFields: v,
|
|
544
|
-
logoPrint:
|
|
544
|
+
logoPrint: ee,
|
|
545
545
|
userActions: l,
|
|
546
546
|
userRowActions: c,
|
|
547
|
-
customRenderRowActions:
|
|
547
|
+
customRenderRowActions: M,
|
|
548
548
|
innerRef: A,
|
|
549
549
|
isLoading: V = !1,
|
|
550
550
|
isLoadingFilter: h = !1,
|
|
551
551
|
isError: B = !1,
|
|
552
|
-
enableTopToolbar:
|
|
553
|
-
enableTopToolbarActions:
|
|
554
|
-
error:
|
|
552
|
+
enableTopToolbar: q = !0,
|
|
553
|
+
enableTopToolbarActions: P = !0,
|
|
554
|
+
error: X = "",
|
|
555
555
|
clearError: b = () => {
|
|
556
556
|
},
|
|
557
557
|
filterType: x,
|
|
558
558
|
width: y = "100%",
|
|
559
|
-
height:
|
|
560
|
-
onSearchByFilter:
|
|
561
|
-
getRowId:
|
|
562
|
-
withBorder:
|
|
559
|
+
height: Y = "100%",
|
|
560
|
+
onSearchByFilter: _,
|
|
561
|
+
getRowId: S,
|
|
562
|
+
withBorder: E = !0,
|
|
563
563
|
filterPersistenceDelegator: F,
|
|
564
|
-
variant:
|
|
564
|
+
variant: N,
|
|
565
565
|
store: w,
|
|
566
|
-
cellPadding:
|
|
566
|
+
cellPadding: G,
|
|
567
567
|
bottomToolbarMinHeight: R,
|
|
568
|
-
enableRowSelection:
|
|
568
|
+
enableRowSelection: re = !0,
|
|
569
569
|
enableRowNumbers: H = !0,
|
|
570
|
-
enableRowActions:
|
|
571
|
-
positionActionsColumn:
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
570
|
+
enableRowActions: k = !0,
|
|
571
|
+
positionActionsColumn: D = "first",
|
|
572
|
+
actionsColumnWidth: $,
|
|
573
|
+
tableHeadCellPadding: J,
|
|
574
|
+
renderDetailPanel: U,
|
|
575
|
+
renderTopToolbar: W,
|
|
576
|
+
toolbarAlignment: I = "right",
|
|
577
|
+
toolbarLeftContent: Z,
|
|
578
|
+
onSelectedRowsChanged: fe,
|
|
579
|
+
onCellDoubleClick: s,
|
|
580
|
+
onFilterModelChange: z,
|
|
581
|
+
paginationLabels: O,
|
|
581
582
|
// Props de segurança (opcionais)
|
|
582
|
-
resourceName:
|
|
583
|
-
resourceDescription:
|
|
584
|
-
requiredPermissions:
|
|
585
|
-
fallbackComponent:
|
|
586
|
-
securityOptions:
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
583
|
+
resourceName: ie,
|
|
584
|
+
resourceDescription: oe,
|
|
585
|
+
requiredPermissions: K,
|
|
586
|
+
fallbackComponent: ye,
|
|
587
|
+
securityOptions: xe,
|
|
588
|
+
// Props para controle de bordas internas
|
|
589
|
+
withToolbarBorder: Ie,
|
|
590
|
+
withPaginationBorder: Me,
|
|
591
|
+
toolbarPadding: ke,
|
|
592
|
+
paginationPadding: ze,
|
|
593
|
+
rowHeight: qe
|
|
594
|
+
} = t, _e = ae(null), j = ae(null);
|
|
595
|
+
Oe();
|
|
596
|
+
const { colorScheme: lt } = Ke();
|
|
590
597
|
ge({
|
|
591
|
-
autoRegisterActions:
|
|
598
|
+
autoRegisterActions: xe?.autoRegisterActions ?? !0
|
|
592
599
|
});
|
|
593
|
-
const
|
|
600
|
+
const Ce = Se(
|
|
594
601
|
"ArchbaseGridTemplate",
|
|
595
602
|
n,
|
|
596
603
|
void 0,
|
|
597
604
|
void 0
|
|
598
605
|
);
|
|
599
|
-
|
|
606
|
+
Nt(r, () => ({
|
|
600
607
|
refreshData: () => {
|
|
601
|
-
|
|
608
|
+
j.current && j.current.refreshData();
|
|
602
609
|
},
|
|
603
|
-
getSelectedRows: () =>
|
|
610
|
+
getSelectedRows: () => j.current ? j.current.getSelectedRows() : [],
|
|
604
611
|
clearSelection: () => {
|
|
605
|
-
|
|
612
|
+
j.current && j.current.clearSelection();
|
|
606
613
|
},
|
|
607
614
|
exportData: () => {
|
|
608
|
-
|
|
615
|
+
j.current && j.current.exportData();
|
|
609
616
|
},
|
|
610
617
|
printData: () => {
|
|
611
|
-
|
|
618
|
+
j.current && j.current.printData();
|
|
612
619
|
},
|
|
613
|
-
getDataGridRef: () =>
|
|
614
|
-
getFilterModel: () =>
|
|
615
|
-
}), [
|
|
616
|
-
const [
|
|
620
|
+
getDataGridRef: () => j,
|
|
621
|
+
getFilterModel: () => j.current ? j.current.getFilterModel() : { items: [], quickFilterValues: [] }
|
|
622
|
+
}), [j]);
|
|
623
|
+
const [L, Fe] = te({
|
|
617
624
|
activeFilterIndex: -1,
|
|
618
625
|
currentFilter: void 0,
|
|
619
626
|
expandedFilter: !1
|
|
620
627
|
});
|
|
621
|
-
|
|
622
|
-
const
|
|
623
|
-
|
|
628
|
+
mt(() => {
|
|
629
|
+
const g = Kt(o, w, F);
|
|
630
|
+
Fe(g);
|
|
624
631
|
}, [h]);
|
|
625
|
-
const
|
|
626
|
-
if (
|
|
627
|
-
return
|
|
632
|
+
const He = (g) => {
|
|
633
|
+
if (M)
|
|
634
|
+
return M(g);
|
|
628
635
|
if (!c || !c.actions)
|
|
629
636
|
return;
|
|
630
|
-
const
|
|
637
|
+
const ce = c.actions;
|
|
631
638
|
return /* @__PURE__ */ e(
|
|
632
|
-
|
|
639
|
+
ce,
|
|
633
640
|
{
|
|
634
|
-
onEditRow: c.onEditRow ? (
|
|
635
|
-
onRemoveRow: c.onRemoveRow ? (
|
|
636
|
-
onViewRow: c.onViewRow ? (
|
|
637
|
-
row:
|
|
638
|
-
variant:
|
|
641
|
+
onEditRow: c.onEditRow ? (Q) => c.onEditRow && c.onEditRow(Q) : void 0,
|
|
642
|
+
onRemoveRow: c.onRemoveRow ? (Q) => c.onRemoveRow && c.onRemoveRow(Q) : void 0,
|
|
643
|
+
onViewRow: c.onViewRow ? (Q) => c.onViewRow && c.onViewRow(Q) : void 0,
|
|
644
|
+
row: g,
|
|
645
|
+
variant: N ?? he.variant
|
|
639
646
|
}
|
|
640
647
|
);
|
|
641
|
-
},
|
|
642
|
-
|
|
643
|
-
A && A.current !==
|
|
648
|
+
}, he = we(), Re = ae(null), Je = be(() => Z, [Z]);
|
|
649
|
+
Be.useEffect(() => {
|
|
650
|
+
A && A.current !== Re.current && A.current && Re.current && (A.current = Re.current);
|
|
644
651
|
}, [A]);
|
|
645
|
-
const
|
|
646
|
-
const
|
|
647
|
-
|
|
648
|
-
},
|
|
649
|
-
const
|
|
650
|
-
|
|
651
|
-
},
|
|
652
|
-
const
|
|
653
|
-
|
|
654
|
-
},
|
|
655
|
-
if (
|
|
656
|
-
if (
|
|
657
|
-
|
|
658
|
-
else if (
|
|
659
|
-
const
|
|
660
|
-
|
|
661
|
-
search:
|
|
662
|
-
fields:
|
|
663
|
-
}),
|
|
652
|
+
const i = (g, ce) => {
|
|
653
|
+
const Q = { ...L, currentFilter: g, activeFilterIndex: ce };
|
|
654
|
+
Fe(Q), w && o && w?.setValue(`${o.viewName}_${o.componentName}`, Q);
|
|
655
|
+
}, p = (g) => {
|
|
656
|
+
const ce = { ...L, expandedFilter: g };
|
|
657
|
+
Fe(ce), w && o && w?.setValue(`${o.viewName}_${o.componentName}`, ce);
|
|
658
|
+
}, le = (g, ce) => {
|
|
659
|
+
const Q = { ...L, currentFilter: g, activeFilterIndex: ce };
|
|
660
|
+
Fe(Q), w && o && w?.setValue(`${o.viewName}_${o.componentName}`, Q);
|
|
661
|
+
}, se = () => {
|
|
662
|
+
if (L.currentFilter)
|
|
663
|
+
if (_)
|
|
664
|
+
_();
|
|
665
|
+
else if (L.currentFilter.filter.filterType === "quick") {
|
|
666
|
+
const g = n.getOptions();
|
|
667
|
+
L.currentFilter.filter.quickFilterText && L.currentFilter.filter.quickFilterText !== "" ? (g.filter = JSON.stringify({
|
|
668
|
+
search: L.currentFilter.filter.quickFilterText,
|
|
669
|
+
fields: L.currentFilter.filter.quickFilterFieldsText
|
|
670
|
+
}), g.sort = L.currentFilter.sort.quickFilterSort ? L.currentFilter.sort.quickFilterSort.split(",") : []) : (g.filter = void 0, g.sort = void 0), n.refreshData(g), Ce.isDataSourceV2 || Ce.v1State.forceUpdate();
|
|
664
671
|
} else {
|
|
665
|
-
const
|
|
666
|
-
if (
|
|
667
|
-
const
|
|
668
|
-
|
|
672
|
+
const g = _t(L.currentFilter);
|
|
673
|
+
if (g && g.expressionNode) {
|
|
674
|
+
const ce = Bt(g.expressionNode), Q = n.getOptions();
|
|
675
|
+
Q.filter = ce, Q.sort = g?.sortStrings, n.refreshData(Q), Ce.isDataSourceV2 || Ce.v1State.forceUpdate();
|
|
669
676
|
}
|
|
670
677
|
}
|
|
671
678
|
};
|
|
672
|
-
let
|
|
673
|
-
const
|
|
674
|
-
|
|
675
|
-
},
|
|
676
|
-
|
|
677
|
-
},
|
|
679
|
+
let Te, Ve;
|
|
680
|
+
const De = (g) => {
|
|
681
|
+
Te = g;
|
|
682
|
+
}, At = (g) => {
|
|
683
|
+
Ve = g;
|
|
684
|
+
}, yt = () => {
|
|
685
|
+
Ve && Ve();
|
|
686
|
+
}, Ct = () => {
|
|
678
687
|
Te && Te();
|
|
679
|
-
},
|
|
680
|
-
|
|
681
|
-
}, _e = () => x === "none" ? /* @__PURE__ */ e("div", {}) : x === "advanced" ? /* @__PURE__ */ e(
|
|
682
|
-
rt,
|
|
688
|
+
}, Ft = () => x === "none" ? /* @__PURE__ */ e("div", {}) : x === "advanced" ? /* @__PURE__ */ e(
|
|
689
|
+
it,
|
|
683
690
|
{
|
|
684
691
|
id: o?.componentName,
|
|
685
692
|
viewName: o?.viewName,
|
|
686
693
|
apiVersion: o?.apiVersion,
|
|
687
|
-
ref:
|
|
688
|
-
variant:
|
|
689
|
-
expandedFilter:
|
|
694
|
+
ref: _e,
|
|
695
|
+
variant: N ?? he.variant,
|
|
696
|
+
expandedFilter: L.expandedFilter,
|
|
690
697
|
persistenceDelegator: F,
|
|
691
|
-
currentFilter:
|
|
692
|
-
activeFilterIndex:
|
|
693
|
-
onSelectedFilter:
|
|
694
|
-
onFilterChanged:
|
|
695
|
-
onSearchByFilter:
|
|
696
|
-
onToggleExpandedFilter:
|
|
697
|
-
onExport:
|
|
698
|
-
onPrint:
|
|
698
|
+
currentFilter: L.currentFilter,
|
|
699
|
+
activeFilterIndex: L.activeFilterIndex,
|
|
700
|
+
onSelectedFilter: le,
|
|
701
|
+
onFilterChanged: i,
|
|
702
|
+
onSearchByFilter: se,
|
|
703
|
+
onToggleExpandedFilter: p,
|
|
704
|
+
onExport: yt,
|
|
705
|
+
onPrint: Ct,
|
|
699
706
|
showExportButton: !0,
|
|
700
707
|
showPrintButton: !0,
|
|
701
708
|
width: "560px",
|
|
@@ -706,43 +713,43 @@ function qt(t, r) {
|
|
|
706
713
|
return /* @__PURE__ */ e(
|
|
707
714
|
Ae,
|
|
708
715
|
{
|
|
709
|
-
resourceName:
|
|
710
|
-
resourceDescription:
|
|
711
|
-
requiredPermissions:
|
|
712
|
-
fallbackComponent:
|
|
713
|
-
onSecurityReady:
|
|
714
|
-
onAccessDenied:
|
|
715
|
-
children: /* @__PURE__ */ C(
|
|
716
|
+
resourceName: ie,
|
|
717
|
+
resourceDescription: oe,
|
|
718
|
+
requiredPermissions: K,
|
|
719
|
+
fallbackComponent: ye,
|
|
720
|
+
onSecurityReady: xe?.onSecurityReady,
|
|
721
|
+
onAccessDenied: xe?.onAccessDenied,
|
|
722
|
+
children: /* @__PURE__ */ C(We, { withBorder: E, ref: Re, style: { height: "calc(100% - 4px)" }, children: [
|
|
716
723
|
B ? /* @__PURE__ */ e(
|
|
717
|
-
|
|
724
|
+
Le,
|
|
718
725
|
{
|
|
719
726
|
autoClose: 2e4,
|
|
720
727
|
withCloseButton: !0,
|
|
721
728
|
withBorder: !0,
|
|
722
|
-
icon: /* @__PURE__ */ e(
|
|
729
|
+
icon: /* @__PURE__ */ e(je, { size: "1.4rem" }),
|
|
723
730
|
title: m().t("archbase:WARNING"),
|
|
724
731
|
titleColor: "rgb(250, 82, 82)",
|
|
725
|
-
variant:
|
|
732
|
+
variant: N ?? he.variant,
|
|
726
733
|
onClose: () => b && b(),
|
|
727
|
-
children: /* @__PURE__ */ e("span", { children:
|
|
734
|
+
children: /* @__PURE__ */ e("span", { children: X })
|
|
728
735
|
}
|
|
729
736
|
) : null,
|
|
730
737
|
/* @__PURE__ */ C(
|
|
731
|
-
|
|
738
|
+
jt,
|
|
732
739
|
{
|
|
733
|
-
gridRef:
|
|
740
|
+
gridRef: j,
|
|
734
741
|
printTitle: d || a,
|
|
735
|
-
logoPrint:
|
|
742
|
+
logoPrint: ee,
|
|
736
743
|
width: y,
|
|
737
|
-
height:
|
|
738
|
-
withBorder:
|
|
744
|
+
height: Y,
|
|
745
|
+
withBorder: E,
|
|
739
746
|
dataSource: n,
|
|
740
747
|
enableColumnResizing: !0,
|
|
741
748
|
enableRowNumbers: H,
|
|
742
|
-
enableRowSelection:
|
|
743
|
-
enableRowActions:
|
|
744
|
-
enableTopToolbar:
|
|
745
|
-
enableTopToolbarActions:
|
|
749
|
+
enableRowSelection: re,
|
|
750
|
+
enableRowActions: k,
|
|
751
|
+
enableTopToolbar: q,
|
|
752
|
+
enableTopToolbarActions: P,
|
|
746
753
|
manualPagination: !0,
|
|
747
754
|
manualSorting: !0,
|
|
748
755
|
isLoading: V,
|
|
@@ -753,77 +760,83 @@ function qt(t, r) {
|
|
|
753
760
|
renderToolbarInternalActions: x == "none" ? () => /* @__PURE__ */ e("div", {}) : void 0,
|
|
754
761
|
allowExportData: !0,
|
|
755
762
|
allowPrintData: !0,
|
|
756
|
-
onSelectedRowsChanged:
|
|
757
|
-
onCellDoubleClick:
|
|
758
|
-
onFilterModelChange:
|
|
759
|
-
renderRowActions:
|
|
760
|
-
positionActionsColumn:
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
763
|
+
onSelectedRowsChanged: fe,
|
|
764
|
+
onCellDoubleClick: s,
|
|
765
|
+
onFilterModelChange: z,
|
|
766
|
+
renderRowActions: k ? He : void 0,
|
|
767
|
+
positionActionsColumn: D,
|
|
768
|
+
actionsColumnWidth: $,
|
|
769
|
+
toolbarAlignment: I,
|
|
770
|
+
toolbarLeftContent: Je,
|
|
771
|
+
renderToolbarActions: x === "advanced" || x === "none" ? Ft : void 0,
|
|
772
|
+
paginationLabels: O,
|
|
773
|
+
cellPadding: G,
|
|
766
774
|
bottomToolbarMinHeight: R,
|
|
767
|
-
tableHeadCellPadding:
|
|
768
|
-
getRowId:
|
|
769
|
-
renderDetailPanel:
|
|
770
|
-
renderTopToolbar:
|
|
771
|
-
onExport:
|
|
772
|
-
onPrint:
|
|
773
|
-
variant:
|
|
775
|
+
tableHeadCellPadding: J,
|
|
776
|
+
getRowId: S,
|
|
777
|
+
renderDetailPanel: U ? ({ row: g }) => U({ row: g }) : void 0,
|
|
778
|
+
renderTopToolbar: W,
|
|
779
|
+
onExport: At,
|
|
780
|
+
onPrint: De,
|
|
781
|
+
variant: N,
|
|
782
|
+
withToolbarBorder: Ie,
|
|
783
|
+
withPaginationBorder: Me,
|
|
784
|
+
toolbarPadding: ke,
|
|
785
|
+
paginationPadding: ze,
|
|
786
|
+
rowHeight: qe,
|
|
774
787
|
children: [
|
|
775
788
|
T,
|
|
776
|
-
l?.visible ? /* @__PURE__ */ e(
|
|
789
|
+
l?.visible ? /* @__PURE__ */ e(Lt, { children: /* @__PURE__ */ C(Ee, { children: [
|
|
777
790
|
/* @__PURE__ */ e("h3", { className: "only-print", children: d || a }),
|
|
778
|
-
/* @__PURE__ */ e("div", { className: "no-print", children: /* @__PURE__ */ C(
|
|
791
|
+
/* @__PURE__ */ e("div", { className: "no-print", children: /* @__PURE__ */ C(ue, { gap: "8px", rowGap: "8px", children: [
|
|
779
792
|
l.customUserActions && l.customUserActionsPosition === "left" ? l.customUserActions : null,
|
|
780
793
|
l.onAddExecute ? /* @__PURE__ */ e(
|
|
781
|
-
|
|
794
|
+
ne,
|
|
782
795
|
{
|
|
783
796
|
actionName: "add",
|
|
784
|
-
actionDescription: `Adicionar novo ${
|
|
797
|
+
actionDescription: `Adicionar novo ${oe || "registro"}`,
|
|
785
798
|
color: "green",
|
|
786
|
-
variant:
|
|
787
|
-
leftSection: /* @__PURE__ */ e(
|
|
799
|
+
variant: N ?? he.variant,
|
|
800
|
+
leftSection: /* @__PURE__ */ e(Qe, {}),
|
|
788
801
|
onClick: () => l && l.onAddExecute && l.onAddExecute(),
|
|
789
802
|
children: l.labelAdd || m().t("archbase:New")
|
|
790
803
|
}
|
|
791
804
|
) : null,
|
|
792
805
|
l.onEditExecute ? /* @__PURE__ */ e(
|
|
793
|
-
|
|
806
|
+
ne,
|
|
794
807
|
{
|
|
795
808
|
actionName: "edit",
|
|
796
|
-
actionDescription: `Editar ${
|
|
809
|
+
actionDescription: `Editar ${oe || "registro"}`,
|
|
797
810
|
color: "blue",
|
|
798
|
-
leftSection: /* @__PURE__ */ e(
|
|
811
|
+
leftSection: /* @__PURE__ */ e(Xe, {}),
|
|
799
812
|
disabled: !n.isBrowsing() || n.isEmpty(),
|
|
800
|
-
variant:
|
|
813
|
+
variant: N ?? he.variant,
|
|
801
814
|
onClick: () => l && l.onEditExecute && l.onEditExecute(),
|
|
802
815
|
children: l.labelEdit || m().t("archbase:Edit")
|
|
803
816
|
}
|
|
804
817
|
) : null,
|
|
805
818
|
l.onRemoveExecute ? /* @__PURE__ */ e(
|
|
806
|
-
|
|
819
|
+
ne,
|
|
807
820
|
{
|
|
808
821
|
actionName: "delete",
|
|
809
|
-
actionDescription: `Remover ${
|
|
822
|
+
actionDescription: `Remover ${oe || "registro"}`,
|
|
810
823
|
color: "red",
|
|
811
|
-
leftSection: /* @__PURE__ */ e(
|
|
824
|
+
leftSection: /* @__PURE__ */ e(Ye, {}),
|
|
812
825
|
disabled: !l?.allowRemove || !n.isBrowsing() || n.isEmpty(),
|
|
813
|
-
variant:
|
|
826
|
+
variant: N ?? he.variant,
|
|
814
827
|
onClick: () => l && l.onRemoveExecute && l.onRemoveExecute(),
|
|
815
828
|
children: l.labelRemove || m().t("archbase:Remove")
|
|
816
829
|
}
|
|
817
830
|
) : null,
|
|
818
831
|
l.onViewExecute ? /* @__PURE__ */ e(
|
|
819
|
-
|
|
832
|
+
ne,
|
|
820
833
|
{
|
|
821
834
|
actionName: "view",
|
|
822
|
-
actionDescription: `Visualizar ${
|
|
835
|
+
actionDescription: `Visualizar ${oe || "registro"}`,
|
|
823
836
|
color: "gray.7",
|
|
824
|
-
leftSection: /* @__PURE__ */ e(
|
|
837
|
+
leftSection: /* @__PURE__ */ e(Ze, {}),
|
|
825
838
|
disabled: !n.isBrowsing() || n.isEmpty(),
|
|
826
|
-
variant:
|
|
839
|
+
variant: N ?? he.variant,
|
|
827
840
|
onClick: () => l && l.onViewExecute && l.onViewExecute(),
|
|
828
841
|
children: l.labelView || m().t("archbase:View")
|
|
829
842
|
}
|
|
@@ -838,8 +851,8 @@ function qt(t, r) {
|
|
|
838
851
|
}
|
|
839
852
|
);
|
|
840
853
|
}
|
|
841
|
-
const
|
|
842
|
-
function
|
|
854
|
+
const br = St(Qt);
|
|
855
|
+
function Xt(t, r, a, d) {
|
|
843
856
|
if (t && t.headerGridColumns) {
|
|
844
857
|
const n = t.headerGridColumns.left ? t.headerGridColumns.left : { xs: "auto", sm: "auto", md: "auto", lg: "auto" }, o = t.headerGridColumns.middle ? t.headerGridColumns.middle : { xs: "auto", sm: "auto", md: "auto", lg: "auto" }, u = t.headerGridColumns.right ? t.headerGridColumns.right : { xs: "auto", sm: "auto", md: "auto", lg: "auto" };
|
|
845
858
|
return /* @__PURE__ */ C(me, { m: 0, gutter: "xs", justify: "center", align: "center", grow: !0, children: [
|
|
@@ -899,9 +912,9 @@ function _t(t, r, a, d) {
|
|
|
899
912
|
] });
|
|
900
913
|
} else {
|
|
901
914
|
const n = t && t.headerFlexGrow ? t.headerFlexGrow : "even", o = t && t.headerFlexRightJustifyContent ? t.headerFlexRightJustifyContent : "flex-end", u = t && t.headerFlexLeftJustifyContent ? t.headerFlexLeftJustifyContent : "flex-start";
|
|
902
|
-
return /* @__PURE__ */ C(
|
|
915
|
+
return /* @__PURE__ */ C(ue, { justify: "space-between", children: [
|
|
903
916
|
/* @__PURE__ */ e(
|
|
904
|
-
|
|
917
|
+
ue,
|
|
905
918
|
{
|
|
906
919
|
w: n === "left" || n === "even" ? "100%" : void 0,
|
|
907
920
|
maw: n === "left" || n === "even" ? void 0 : "100%",
|
|
@@ -914,7 +927,7 @@ function _t(t, r, a, d) {
|
|
|
914
927
|
}
|
|
915
928
|
),
|
|
916
929
|
/* @__PURE__ */ e(
|
|
917
|
-
|
|
930
|
+
ue,
|
|
918
931
|
{
|
|
919
932
|
w: n === "right" || n === "even" ? "100%" : void 0,
|
|
920
933
|
maw: n === "right" || n === "even" ? void 0 : "100%",
|
|
@@ -929,7 +942,7 @@ function _t(t, r, a, d) {
|
|
|
929
942
|
] });
|
|
930
943
|
}
|
|
931
944
|
}
|
|
932
|
-
function
|
|
945
|
+
function Yt(t, r, a, d) {
|
|
933
946
|
if (t && t.footerGridColumns) {
|
|
934
947
|
const n = t.footerGridColumns.left ? t.footerGridColumns.left : { xs: "content", sm: "content", md: "content", lg: "content" }, o = t.footerGridColumns.middle ? t.footerGridColumns.middle : { xs: "auto", sm: "auto", md: "auto", lg: "auto" }, u = t.footerGridColumns.right ? t.footerGridColumns.right : { xs: "content", sm: "content", md: "content", lg: "content" };
|
|
935
948
|
return /* @__PURE__ */ C(me, { m: 0, gutter: "xs", justify: "center", align: "center", grow: !0, children: [
|
|
@@ -989,9 +1002,9 @@ function Jt(t, r, a, d) {
|
|
|
989
1002
|
] });
|
|
990
1003
|
} else {
|
|
991
1004
|
const n = t && t.footerFlexGrow ? t.footerFlexGrow : "even", o = t && t.footerFlexRightJustifyContent ? t.footerFlexRightJustifyContent : "flex-end", u = t && t.footerFlexLeftJustifyContent ? t.footerFlexLeftJustifyContent : "flex-start";
|
|
992
|
-
return /* @__PURE__ */ C(
|
|
1005
|
+
return /* @__PURE__ */ C(ue, { justify: "space-between", children: [
|
|
993
1006
|
/* @__PURE__ */ e(
|
|
994
|
-
|
|
1007
|
+
ue,
|
|
995
1008
|
{
|
|
996
1009
|
w: n === "left" || n === "even" ? "100%" : void 0,
|
|
997
1010
|
maw: n === "left" || n === "even" ? void 0 : "100%",
|
|
@@ -1006,7 +1019,7 @@ function Jt(t, r, a, d) {
|
|
|
1006
1019
|
}
|
|
1007
1020
|
),
|
|
1008
1021
|
/* @__PURE__ */ e(
|
|
1009
|
-
|
|
1022
|
+
ue,
|
|
1010
1023
|
{
|
|
1011
1024
|
w: n === "right" || n === "even" ? "100%" : void 0,
|
|
1012
1025
|
maw: n === "right" || n === "even" ? void 0 : "100%",
|
|
@@ -1023,7 +1036,7 @@ function Jt(t, r, a, d) {
|
|
|
1023
1036
|
] });
|
|
1024
1037
|
}
|
|
1025
1038
|
}
|
|
1026
|
-
function
|
|
1039
|
+
function wt({
|
|
1027
1040
|
title: t,
|
|
1028
1041
|
innerRef: r,
|
|
1029
1042
|
isError: a = !1,
|
|
@@ -1034,17 +1047,17 @@ function vt({
|
|
|
1034
1047
|
withBorder: f = !0,
|
|
1035
1048
|
children: T,
|
|
1036
1049
|
radius: v,
|
|
1037
|
-
debug:
|
|
1050
|
+
debug: ee,
|
|
1038
1051
|
defaultDebug: l,
|
|
1039
1052
|
headerLeft: c,
|
|
1040
|
-
headerMiddle:
|
|
1053
|
+
headerMiddle: M,
|
|
1041
1054
|
headerRight: A,
|
|
1042
1055
|
footerLeft: V,
|
|
1043
1056
|
footerMiddle: h,
|
|
1044
1057
|
footerRight: B,
|
|
1045
|
-
variant:
|
|
1046
|
-
options:
|
|
1047
|
-
style:
|
|
1058
|
+
variant: q,
|
|
1059
|
+
options: P = {},
|
|
1060
|
+
style: X,
|
|
1048
1061
|
debugOptions: b = {
|
|
1049
1062
|
debugLayoutHotKey: "ctrl+shift+S",
|
|
1050
1063
|
debugObjectInspectorHotKey: "ctrl+shift+D",
|
|
@@ -1053,70 +1066,70 @@ function vt({
|
|
|
1053
1066
|
// Props de segurança (opcionais)
|
|
1054
1067
|
resourceName: x,
|
|
1055
1068
|
resourceDescription: y,
|
|
1056
|
-
requiredPermissions:
|
|
1057
|
-
fallbackComponent:
|
|
1058
|
-
securityOptions:
|
|
1069
|
+
requiredPermissions: Y,
|
|
1070
|
+
fallbackComponent: _,
|
|
1071
|
+
securityOptions: S
|
|
1059
1072
|
}) {
|
|
1060
|
-
const [
|
|
1061
|
-
value:
|
|
1073
|
+
const [E, F] = It({
|
|
1074
|
+
value: ee,
|
|
1062
1075
|
defaultValue: l,
|
|
1063
1076
|
finalValue: !1
|
|
1064
1077
|
});
|
|
1065
|
-
|
|
1066
|
-
const
|
|
1078
|
+
Tt([[b && b.debugLayoutHotKey, () => F(!E)]]);
|
|
1079
|
+
const N = we(), { t: w } = Pt();
|
|
1067
1080
|
ge({
|
|
1068
|
-
autoRegisterActions:
|
|
1081
|
+
autoRegisterActions: S?.autoRegisterActions ?? !0
|
|
1069
1082
|
});
|
|
1070
|
-
const
|
|
1071
|
-
height:
|
|
1072
|
-
width:
|
|
1073
|
-
}), [
|
|
1074
|
-
|
|
1075
|
-
l !==
|
|
1083
|
+
const G = ae(null), R = r || G, re = ae(null), H = ae(null), k = $e(re), D = $e(H), $ = $e(R), J = be(() => ({
|
|
1084
|
+
height: $.height - k.height - D.height - Number(Rt("0.625rem")),
|
|
1085
|
+
width: $.width - k.width - D.width
|
|
1086
|
+
}), [$.height, $.width, k.height, k.width, D.height, D.width]), U = ae(l);
|
|
1087
|
+
mt(() => {
|
|
1088
|
+
l !== U.current && (F(l), U.current = l);
|
|
1076
1089
|
}, [l, F]);
|
|
1077
|
-
const W = /* @__PURE__ */ C(
|
|
1090
|
+
const W = /* @__PURE__ */ C(Ee, { children: [
|
|
1078
1091
|
/* @__PURE__ */ e(
|
|
1079
|
-
|
|
1092
|
+
We,
|
|
1080
1093
|
{
|
|
1081
1094
|
ref: R,
|
|
1082
1095
|
withBorder: f,
|
|
1083
1096
|
radius: v,
|
|
1084
|
-
style: { width: o, height: u, padding: 4, ...
|
|
1085
|
-
children: /* @__PURE__ */ C(
|
|
1086
|
-
/* @__PURE__ */ e(
|
|
1087
|
-
/* @__PURE__ */ e(
|
|
1088
|
-
|
|
1097
|
+
style: { width: o, height: u, padding: 4, ...X },
|
|
1098
|
+
children: /* @__PURE__ */ C(tt, { height: "100%", children: [
|
|
1099
|
+
/* @__PURE__ */ e(vt, { size: k.height, children: /* @__PURE__ */ e("div", { ref: re, children: Xt(P, c, A, E) }) }),
|
|
1100
|
+
/* @__PURE__ */ e(rt, { children: /* @__PURE__ */ e(
|
|
1101
|
+
st,
|
|
1089
1102
|
{
|
|
1090
|
-
h:
|
|
1103
|
+
h: J.height,
|
|
1091
1104
|
style: {
|
|
1092
|
-
border:
|
|
1105
|
+
border: E ? "1px dashed" : "",
|
|
1093
1106
|
padding: "calc(0.625rem / 2)"
|
|
1094
1107
|
},
|
|
1095
|
-
children: T ? /* @__PURE__ */ C(
|
|
1108
|
+
children: T ? /* @__PURE__ */ C(Gt, { children: [
|
|
1096
1109
|
a && /* @__PURE__ */ e(
|
|
1097
|
-
|
|
1110
|
+
Le,
|
|
1098
1111
|
{
|
|
1099
1112
|
autoClose: 2e4,
|
|
1100
1113
|
withCloseButton: !0,
|
|
1101
1114
|
withBorder: !0,
|
|
1102
|
-
icon: /* @__PURE__ */ e(
|
|
1115
|
+
icon: /* @__PURE__ */ e(je, { size: "1.4rem" }),
|
|
1103
1116
|
title: `${w("WARNING")}`,
|
|
1104
1117
|
titleColor: "rgb(250, 82, 82)",
|
|
1105
|
-
variant:
|
|
1118
|
+
variant: q ?? N.variant,
|
|
1106
1119
|
onClose: () => n && n(),
|
|
1107
1120
|
children: /* @__PURE__ */ e("span", { children: d })
|
|
1108
1121
|
}
|
|
1109
1122
|
),
|
|
1110
1123
|
T
|
|
1111
|
-
] }) :
|
|
1124
|
+
] }) : E && /* @__PURE__ */ e(ue, { h: J.height + 80, justify: "center", align: "center", wrap: "wrap", children: /* @__PURE__ */ e(Et, { size: "lg", children: "INSIRA O CONTEÚDO DO PAINEL AQUI." }) })
|
|
1112
1125
|
}
|
|
1113
1126
|
) }),
|
|
1114
|
-
/* @__PURE__ */ e(
|
|
1127
|
+
/* @__PURE__ */ e(nt, { size: D.height, children: /* @__PURE__ */ e("div", { ref: H, children: Yt(P, V, B, E) }) })
|
|
1115
1128
|
] })
|
|
1116
1129
|
}
|
|
1117
1130
|
),
|
|
1118
1131
|
/* @__PURE__ */ e(
|
|
1119
|
-
|
|
1132
|
+
Mt,
|
|
1120
1133
|
{
|
|
1121
1134
|
debugObjectInspectorHotKey: b && b.debugObjectInspectorHotKey,
|
|
1122
1135
|
objectsToInspect: b && b.objectsToInspect
|
|
@@ -1128,15 +1141,15 @@ function vt({
|
|
|
1128
1141
|
{
|
|
1129
1142
|
resourceName: x,
|
|
1130
1143
|
resourceDescription: y,
|
|
1131
|
-
requiredPermissions:
|
|
1132
|
-
fallbackComponent:
|
|
1133
|
-
onSecurityReady:
|
|
1134
|
-
onAccessDenied:
|
|
1144
|
+
requiredPermissions: Y,
|
|
1145
|
+
fallbackComponent: _,
|
|
1146
|
+
onSecurityReady: S?.onSecurityReady,
|
|
1147
|
+
onAccessDenied: S?.onAccessDenied,
|
|
1135
1148
|
children: W
|
|
1136
1149
|
}
|
|
1137
1150
|
);
|
|
1138
1151
|
}
|
|
1139
|
-
const
|
|
1152
|
+
const Zt = {
|
|
1140
1153
|
visible: !0,
|
|
1141
1154
|
allowAdd: !0,
|
|
1142
1155
|
allowEdit: !0,
|
|
@@ -1144,10 +1157,10 @@ const Ht = {
|
|
|
1144
1157
|
allowRemove: !0,
|
|
1145
1158
|
positionCustomUserActions: "after"
|
|
1146
1159
|
};
|
|
1147
|
-
function
|
|
1160
|
+
function Ot(t, r, a, d, n, o) {
|
|
1148
1161
|
console.log(`Render de "${t}" na fase "${r}": ${a}ms`);
|
|
1149
1162
|
}
|
|
1150
|
-
function
|
|
1163
|
+
function wr({
|
|
1151
1164
|
title: t,
|
|
1152
1165
|
dataSource: r,
|
|
1153
1166
|
// dataSourceEdition,
|
|
@@ -1161,64 +1174,64 @@ function mr({
|
|
|
1161
1174
|
filterType: f = "normal",
|
|
1162
1175
|
isError: T = !1,
|
|
1163
1176
|
error: v = "",
|
|
1164
|
-
clearError:
|
|
1177
|
+
clearError: ee = () => {
|
|
1165
1178
|
},
|
|
1166
1179
|
width: l = "100%",
|
|
1167
1180
|
height: c = "100%",
|
|
1168
|
-
withBorder:
|
|
1181
|
+
withBorder: M = !0,
|
|
1169
1182
|
filterPersistenceDelegator: A,
|
|
1170
1183
|
withPagination: V = !0,
|
|
1171
1184
|
radius: h,
|
|
1172
1185
|
userActions: B,
|
|
1173
|
-
columnsCountBreakPoints:
|
|
1174
|
-
columnsCount:
|
|
1175
|
-
gutter:
|
|
1186
|
+
columnsCountBreakPoints: q,
|
|
1187
|
+
columnsCount: P,
|
|
1188
|
+
gutter: X,
|
|
1176
1189
|
component: b,
|
|
1177
1190
|
activeIndex: x,
|
|
1178
1191
|
activeBackgroundColor: y,
|
|
1179
|
-
activeColor:
|
|
1180
|
-
onItemEnter:
|
|
1181
|
-
onItemLeave:
|
|
1182
|
-
style:
|
|
1192
|
+
activeColor: Y,
|
|
1193
|
+
onItemEnter: _,
|
|
1194
|
+
onItemLeave: S,
|
|
1195
|
+
style: E,
|
|
1183
1196
|
actionsButtonsOptions: F,
|
|
1184
|
-
spaceOptions:
|
|
1197
|
+
spaceOptions: N,
|
|
1185
1198
|
variant: w,
|
|
1186
|
-
id:
|
|
1199
|
+
id: G = Jt("masonry"),
|
|
1187
1200
|
debugOptions: R,
|
|
1188
1201
|
// Props de segurança (opcionais)
|
|
1189
|
-
resourceName:
|
|
1202
|
+
resourceName: re,
|
|
1190
1203
|
resourceDescription: H,
|
|
1191
|
-
requiredPermissions:
|
|
1192
|
-
fallbackComponent:
|
|
1193
|
-
securityOptions:
|
|
1204
|
+
requiredPermissions: k,
|
|
1205
|
+
fallbackComponent: D,
|
|
1206
|
+
securityOptions: $
|
|
1194
1207
|
}) {
|
|
1195
|
-
const
|
|
1196
|
-
autoRegisterActions:
|
|
1197
|
-
}), [W] =
|
|
1208
|
+
const J = we(), U = ge({
|
|
1209
|
+
autoRegisterActions: $?.autoRegisterActions ?? !0
|
|
1210
|
+
}), [W] = te(G), I = o || ae(null), Z = ae(null), [fe, s] = te(r.getCurrentPage()), [z, O] = te(
|
|
1198
1211
|
x || (r && r.getTotalRecords() > 0 ? 0 : -1)
|
|
1199
1212
|
);
|
|
1200
|
-
|
|
1201
|
-
const [
|
|
1213
|
+
$e(I);
|
|
1214
|
+
const [ie, oe] = te({
|
|
1202
1215
|
activeFilterIndex: -1,
|
|
1203
1216
|
expandedFilter: !1
|
|
1204
|
-
}), [
|
|
1205
|
-
isDataSourceV2:
|
|
1206
|
-
v1State: { forceUpdate:
|
|
1217
|
+
}), [K, ye] = te(0), {
|
|
1218
|
+
isDataSourceV2: xe,
|
|
1219
|
+
v1State: { forceUpdate: Ie }
|
|
1207
1220
|
} = Se(
|
|
1208
1221
|
"ArchbaseMasonryTemplate",
|
|
1209
1222
|
r
|
|
1210
1223
|
);
|
|
1211
|
-
|
|
1224
|
+
et({
|
|
1212
1225
|
dataSource: r,
|
|
1213
1226
|
listener: (i) => {
|
|
1214
|
-
(i.type === pe.afterRemove || i.type === pe.refreshData) && (
|
|
1227
|
+
(i.type === pe.afterRemove || i.type === pe.refreshData) && (ye((p) => p + 1), xe || Ie());
|
|
1215
1228
|
}
|
|
1216
1229
|
});
|
|
1217
|
-
const
|
|
1218
|
-
const i = { ...
|
|
1219
|
-
return i.allowAdd && i.onAddExecute && le() &&
|
|
1230
|
+
const Me = be(() => {
|
|
1231
|
+
const i = { ...Zt, ...B }, p = [], le = (se) => U.isAvailable ? (U.registerAction(), U.hasPermission()) : !0;
|
|
1232
|
+
return i.allowAdd && i.onAddExecute && le() && p.push({
|
|
1220
1233
|
id: "actAdd",
|
|
1221
|
-
icon: /* @__PURE__ */ e(
|
|
1234
|
+
icon: /* @__PURE__ */ e(Qe, {}),
|
|
1222
1235
|
color: "green",
|
|
1223
1236
|
label: i.labelAdd ? i.labelAdd : m().t("archbase:New"),
|
|
1224
1237
|
executeAction: () => {
|
|
@@ -1226,9 +1239,9 @@ function mr({
|
|
|
1226
1239
|
},
|
|
1227
1240
|
enabled: !0,
|
|
1228
1241
|
hint: `${m().t("archbase:Clique para criar um novo registro")}`
|
|
1229
|
-
}), i.allowEdit && i.onEditExecute && le() &&
|
|
1242
|
+
}), i.allowEdit && i.onEditExecute && le() && p.push({
|
|
1230
1243
|
id: "actEdit",
|
|
1231
|
-
icon: /* @__PURE__ */ e(
|
|
1244
|
+
icon: /* @__PURE__ */ e(Xe, {}),
|
|
1232
1245
|
color: "blue",
|
|
1233
1246
|
label: i.labelEdit ? i.labelEdit : m().t("archbase:Edit"),
|
|
1234
1247
|
executeAction: () => {
|
|
@@ -1236,9 +1249,9 @@ function mr({
|
|
|
1236
1249
|
},
|
|
1237
1250
|
enabled: !r.isEmpty() && r.isBrowsing(),
|
|
1238
1251
|
hint: `${m().t("archbase:Clique para editar o registro")}`
|
|
1239
|
-
}), i.allowRemove && i.onRemoveExecute && le() &&
|
|
1252
|
+
}), i.allowRemove && i.onRemoveExecute && le() && p.push({
|
|
1240
1253
|
id: "actRemove",
|
|
1241
|
-
icon: /* @__PURE__ */ e(
|
|
1254
|
+
icon: /* @__PURE__ */ e(Ye, {}),
|
|
1242
1255
|
color: "red",
|
|
1243
1256
|
label: i.labelRemove ? i.labelRemove : m().t("archbase:Remove"),
|
|
1244
1257
|
executeAction: () => {
|
|
@@ -1246,133 +1259,133 @@ function mr({
|
|
|
1246
1259
|
},
|
|
1247
1260
|
enabled: !r.isEmpty() && r.isBrowsing(),
|
|
1248
1261
|
hint: `${m().t("archbase:Clique para remover o registro")}`
|
|
1249
|
-
}), i.allowView && i.onViewExecute && le() &&
|
|
1262
|
+
}), i.allowView && i.onViewExecute && le() && p.push({
|
|
1250
1263
|
id: "actView",
|
|
1251
|
-
icon: /* @__PURE__ */ e(
|
|
1264
|
+
icon: /* @__PURE__ */ e(Ze, {}),
|
|
1252
1265
|
label: i.labelView ? i.labelView : m().t("archbase:View"),
|
|
1253
1266
|
executeAction: () => {
|
|
1254
1267
|
i && i.onViewExecute && i.onViewExecute();
|
|
1255
1268
|
},
|
|
1256
1269
|
enabled: !r.isEmpty() && r.isBrowsing(),
|
|
1257
1270
|
hint: `${m().t("archbase:Clique para visualizar o registro")}`
|
|
1258
|
-
}), i.customUserActions && i.positionCustomUserActions === "before" ? [...i.customUserActions, ...
|
|
1259
|
-
}, [B, r,
|
|
1271
|
+
}), i.customUserActions && i.positionCustomUserActions === "before" ? [...i.customUserActions, ...p] : i.customUserActions && i.positionCustomUserActions === "after" ? [...p, ...i.customUserActions] : p;
|
|
1272
|
+
}, [B, r, U]), ke = be(() => {
|
|
1260
1273
|
if (b) {
|
|
1261
1274
|
const i = b.type;
|
|
1262
|
-
let
|
|
1263
|
-
return b.props && (
|
|
1264
|
-
const
|
|
1265
|
-
let
|
|
1266
|
-
return
|
|
1275
|
+
let p = {};
|
|
1276
|
+
return b.props && (p = b.props), r.browseRecords().map((le, se) => {
|
|
1277
|
+
const Te = `${W}_${se}`, Ve = `${W}_${se}`;
|
|
1278
|
+
let De = le.active === void 0 ? !1 : le.active;
|
|
1279
|
+
return z >= 0 && (De = !1, z === se && (De = !0)), /* @__PURE__ */ e(
|
|
1267
1280
|
i,
|
|
1268
1281
|
{
|
|
1269
|
-
id:
|
|
1270
|
-
active:
|
|
1282
|
+
id: Ve,
|
|
1283
|
+
active: De,
|
|
1271
1284
|
index: se,
|
|
1272
1285
|
dataSource: r,
|
|
1273
1286
|
recordData: le,
|
|
1274
1287
|
disabled: le.disabled,
|
|
1275
|
-
...
|
|
1288
|
+
...p
|
|
1276
1289
|
},
|
|
1277
|
-
|
|
1290
|
+
Te
|
|
1278
1291
|
);
|
|
1279
1292
|
});
|
|
1280
1293
|
}
|
|
1281
1294
|
return [];
|
|
1282
|
-
}, [
|
|
1283
|
-
|
|
1295
|
+
}, [z, b, W, r, K]), ze = (i, p) => {
|
|
1296
|
+
oe({ ...ie, currentFilter: i, activeFilterIndex: p });
|
|
1297
|
+
}, qe = (i) => {
|
|
1298
|
+
oe({ ...ie, expandedFilter: i });
|
|
1299
|
+
}, _e = (i, p) => {
|
|
1300
|
+
oe({ ...ie, currentFilter: i, activeFilterIndex: p });
|
|
1301
|
+
}, j = () => {
|
|
1302
|
+
}, lt = (i, p) => {
|
|
1303
|
+
O(i), r && r.gotoRecordByData(p);
|
|
1284
1304
|
}, Ce = (i) => {
|
|
1285
|
-
xe({ ...K, expandedFilter: i });
|
|
1286
|
-
}, je = (i, g) => {
|
|
1287
|
-
xe({ ...K, currentFilter: i, activeFilterIndex: g });
|
|
1288
|
-
}, ue = () => {
|
|
1289
|
-
}, Fe = (i, g) => {
|
|
1290
|
-
O(i), r && r.gotoRecordByData(g);
|
|
1291
|
-
}, Le = (i) => {
|
|
1292
1305
|
if (r) {
|
|
1293
|
-
const
|
|
1294
|
-
|
|
1306
|
+
const p = r.getOptions();
|
|
1307
|
+
p.filter = i, p.currentPage = fe, r.refreshData(p), xe || Ie();
|
|
1295
1308
|
}
|
|
1296
|
-
},
|
|
1309
|
+
}, L = (i) => {
|
|
1297
1310
|
if (r) {
|
|
1298
|
-
const
|
|
1299
|
-
|
|
1311
|
+
const p = r.getOptions();
|
|
1312
|
+
p.currentPage = i, r.refreshData(p), xe || Ie();
|
|
1300
1313
|
}
|
|
1301
|
-
},
|
|
1302
|
-
|
|
1314
|
+
}, Fe = () => f === "normal" && d ? /* @__PURE__ */ e(
|
|
1315
|
+
Ht,
|
|
1303
1316
|
{
|
|
1304
1317
|
searchableFields: d,
|
|
1305
|
-
onFilter:
|
|
1318
|
+
onFilter: Ce,
|
|
1306
1319
|
minFilterValueLength: 1
|
|
1307
1320
|
}
|
|
1308
|
-
) : f === "advanced" ? /* @__PURE__ */ e(
|
|
1309
|
-
|
|
1321
|
+
) : f === "advanced" ? /* @__PURE__ */ e($t, { id: `profile_${a.componentName}`, onRender: Ot, children: /* @__PURE__ */ e(
|
|
1322
|
+
it,
|
|
1310
1323
|
{
|
|
1311
1324
|
id: a.componentName,
|
|
1312
1325
|
viewName: a.viewName,
|
|
1313
1326
|
apiVersion: a.apiVersion,
|
|
1314
|
-
ref:
|
|
1315
|
-
variant: w ||
|
|
1316
|
-
expandedFilter:
|
|
1327
|
+
ref: Z,
|
|
1328
|
+
variant: w || J.variant,
|
|
1329
|
+
expandedFilter: ie.expandedFilter,
|
|
1317
1330
|
persistenceDelegator: A,
|
|
1318
|
-
currentFilter:
|
|
1319
|
-
activeFilterIndex:
|
|
1320
|
-
onSelectedFilter:
|
|
1321
|
-
onFilterChanged:
|
|
1322
|
-
onSearchByFilter:
|
|
1323
|
-
onToggleExpandedFilter:
|
|
1331
|
+
currentFilter: ie.currentFilter,
|
|
1332
|
+
activeFilterIndex: ie.activeFilterIndex,
|
|
1333
|
+
onSelectedFilter: _e,
|
|
1334
|
+
onFilterChanged: ze,
|
|
1335
|
+
onSearchByFilter: j,
|
|
1336
|
+
onToggleExpandedFilter: qe,
|
|
1324
1337
|
width: "660px",
|
|
1325
1338
|
height: "170px",
|
|
1326
1339
|
children: n
|
|
1327
1340
|
}
|
|
1328
|
-
) }) : /* @__PURE__ */ e(
|
|
1341
|
+
) }) : /* @__PURE__ */ e(Ee, {}), He = {
|
|
1329
1342
|
menuButtonColor: "blue.5",
|
|
1330
1343
|
menuPosition: "left"
|
|
1331
|
-
},
|
|
1344
|
+
}, he = {
|
|
1332
1345
|
headerFlexGrow: "left",
|
|
1333
1346
|
footerGridColumns: {}
|
|
1334
|
-
},
|
|
1347
|
+
}, Re = { ...He, ...F }, Je = { ...he, ...N };
|
|
1335
1348
|
return /* @__PURE__ */ e(
|
|
1336
1349
|
Ae,
|
|
1337
1350
|
{
|
|
1338
|
-
resourceName:
|
|
1351
|
+
resourceName: re,
|
|
1339
1352
|
resourceDescription: H,
|
|
1340
|
-
requiredPermissions:
|
|
1341
|
-
fallbackComponent:
|
|
1342
|
-
onSecurityReady:
|
|
1343
|
-
onAccessDenied:
|
|
1353
|
+
requiredPermissions: k,
|
|
1354
|
+
fallbackComponent: D,
|
|
1355
|
+
onSecurityReady: $?.onSecurityReady,
|
|
1356
|
+
onAccessDenied: $?.onAccessDenied,
|
|
1344
1357
|
children: /* @__PURE__ */ e(
|
|
1345
|
-
|
|
1358
|
+
wt,
|
|
1346
1359
|
{
|
|
1347
|
-
innerRef:
|
|
1360
|
+
innerRef: I,
|
|
1348
1361
|
width: l,
|
|
1349
1362
|
height: c,
|
|
1350
1363
|
radius: h,
|
|
1351
|
-
withBorder:
|
|
1364
|
+
withBorder: M,
|
|
1352
1365
|
isError: T,
|
|
1353
1366
|
error: v,
|
|
1354
|
-
clearError:
|
|
1367
|
+
clearError: ee,
|
|
1355
1368
|
title: t,
|
|
1356
1369
|
defaultDebug: u,
|
|
1357
1370
|
debugOptions: R,
|
|
1358
|
-
style:
|
|
1359
|
-
options:
|
|
1360
|
-
headerLeft: /* @__PURE__ */ e(
|
|
1361
|
-
headerRight:
|
|
1362
|
-
footerRight: V ? /* @__PURE__ */ e(
|
|
1371
|
+
style: E,
|
|
1372
|
+
options: Je,
|
|
1373
|
+
headerLeft: /* @__PURE__ */ e(xt, { actions: Me, options: Re }),
|
|
1374
|
+
headerRight: Fe(),
|
|
1375
|
+
footerRight: V ? /* @__PURE__ */ e(dt, { total: r.getTotalPages(), onChange: L }) : void 0,
|
|
1363
1376
|
children: /* @__PURE__ */ e(
|
|
1364
|
-
|
|
1377
|
+
kt,
|
|
1365
1378
|
{
|
|
1366
1379
|
value: {
|
|
1367
1380
|
dataSource: r,
|
|
1368
|
-
ownerId:
|
|
1369
|
-
handleSelectItem:
|
|
1381
|
+
ownerId: G,
|
|
1382
|
+
handleSelectItem: lt,
|
|
1370
1383
|
activeBackgroundColor: y,
|
|
1371
|
-
activeColor:
|
|
1372
|
-
onItemEnter:
|
|
1373
|
-
onItemLeave:
|
|
1384
|
+
activeColor: Y,
|
|
1385
|
+
onItemEnter: _,
|
|
1386
|
+
onItemLeave: S
|
|
1374
1387
|
},
|
|
1375
|
-
children: /* @__PURE__ */ e(
|
|
1388
|
+
children: /* @__PURE__ */ e(zt, { columnsCountBreakPoints: q, children: /* @__PURE__ */ e(qt, { gutter: X, columnsCount: P, children: ke }) })
|
|
1376
1389
|
}
|
|
1377
1390
|
)
|
|
1378
1391
|
}
|
|
@@ -1380,7 +1393,7 @@ function mr({
|
|
|
1380
1393
|
}
|
|
1381
1394
|
);
|
|
1382
1395
|
}
|
|
1383
|
-
const
|
|
1396
|
+
const er = {
|
|
1384
1397
|
visible: !0,
|
|
1385
1398
|
allowAdd: !0,
|
|
1386
1399
|
allowEdit: !0,
|
|
@@ -1388,7 +1401,7 @@ const Kt = {
|
|
|
1388
1401
|
allowRemove: !0,
|
|
1389
1402
|
positionCustomUserActions: "after"
|
|
1390
1403
|
};
|
|
1391
|
-
function
|
|
1404
|
+
function Ar({
|
|
1392
1405
|
title: t,
|
|
1393
1406
|
dataSource: r,
|
|
1394
1407
|
// dataSourceEdition,
|
|
@@ -1403,41 +1416,41 @@ function pr({
|
|
|
1403
1416
|
},
|
|
1404
1417
|
width: T = "100%",
|
|
1405
1418
|
height: v = "100%",
|
|
1406
|
-
withBorder:
|
|
1419
|
+
withBorder: ee = !0,
|
|
1407
1420
|
filterPersistenceDelegator: l,
|
|
1408
1421
|
withPagination: c = !0,
|
|
1409
|
-
children:
|
|
1422
|
+
children: M,
|
|
1410
1423
|
radius: A,
|
|
1411
1424
|
userActions: V,
|
|
1412
1425
|
debug: h = !1,
|
|
1413
1426
|
variant: B,
|
|
1414
|
-
actionsButtonsOptions:
|
|
1415
|
-
spaceOptions:
|
|
1416
|
-
style:
|
|
1427
|
+
actionsButtonsOptions: q,
|
|
1428
|
+
spaceOptions: P,
|
|
1429
|
+
style: X,
|
|
1417
1430
|
debugOptions: b,
|
|
1418
1431
|
// Props de segurança (opcionais)
|
|
1419
1432
|
resourceName: x,
|
|
1420
1433
|
resourceDescription: y,
|
|
1421
|
-
requiredPermissions:
|
|
1422
|
-
fallbackComponent:
|
|
1423
|
-
securityOptions:
|
|
1434
|
+
requiredPermissions: Y,
|
|
1435
|
+
fallbackComponent: _,
|
|
1436
|
+
securityOptions: S
|
|
1424
1437
|
}) {
|
|
1425
|
-
const
|
|
1426
|
-
autoRegisterActions:
|
|
1427
|
-
}),
|
|
1438
|
+
const E = we(), F = ge({
|
|
1439
|
+
autoRegisterActions: S?.autoRegisterActions ?? !0
|
|
1440
|
+
}), N = n || ae(null), w = ae(null), [G, R] = te({
|
|
1428
1441
|
activeFilterIndex: -1,
|
|
1429
1442
|
expandedFilter: !1
|
|
1430
1443
|
}), {
|
|
1431
|
-
isDataSourceV2:
|
|
1444
|
+
isDataSourceV2: re,
|
|
1432
1445
|
v1State: { forceUpdate: H }
|
|
1433
1446
|
} = Se(
|
|
1434
1447
|
"ArchbasePanelTemplate",
|
|
1435
1448
|
r
|
|
1436
|
-
),
|
|
1437
|
-
const s = { ...
|
|
1438
|
-
return s.allowAdd && s.onAddExecute &&
|
|
1449
|
+
), k = be(() => {
|
|
1450
|
+
const s = { ...er, ...V }, z = (ie) => F.isAvailable ? (F.registerAction(), F.hasPermission()) : !0, O = [];
|
|
1451
|
+
return s.allowAdd && s.onAddExecute && z() && O.push({
|
|
1439
1452
|
id: "1",
|
|
1440
|
-
icon: /* @__PURE__ */ e(
|
|
1453
|
+
icon: /* @__PURE__ */ e(Qe, {}),
|
|
1441
1454
|
color: "green",
|
|
1442
1455
|
label: s.labelAdd ? s.labelAdd : m().t("archbase:New"),
|
|
1443
1456
|
executeAction: () => {
|
|
@@ -1445,9 +1458,9 @@ function pr({
|
|
|
1445
1458
|
},
|
|
1446
1459
|
enabled: !0,
|
|
1447
1460
|
hint: "Clique para criar."
|
|
1448
|
-
}), s.allowEdit && s.onEditExecute &&
|
|
1461
|
+
}), s.allowEdit && s.onEditExecute && z() && O.push({
|
|
1449
1462
|
id: "2",
|
|
1450
|
-
icon: /* @__PURE__ */ e(
|
|
1463
|
+
icon: /* @__PURE__ */ e(Xe, {}),
|
|
1451
1464
|
color: "blue",
|
|
1452
1465
|
label: s.labelEdit ? s.labelEdit : m().t("archbase:Edit"),
|
|
1453
1466
|
executeAction: () => {
|
|
@@ -1455,9 +1468,9 @@ function pr({
|
|
|
1455
1468
|
},
|
|
1456
1469
|
enabled: !r.isEmpty() && r.isBrowsing(),
|
|
1457
1470
|
hint: "Clique para editar."
|
|
1458
|
-
}), s.allowRemove && s.onRemoveExecute &&
|
|
1471
|
+
}), s.allowRemove && s.onRemoveExecute && z() && O.push({
|
|
1459
1472
|
id: "3",
|
|
1460
|
-
icon: /* @__PURE__ */ e(
|
|
1473
|
+
icon: /* @__PURE__ */ e(Ye, {}),
|
|
1461
1474
|
color: "red",
|
|
1462
1475
|
label: s.labelRemove ? s.labelRemove : m().t("archbase:Remove"),
|
|
1463
1476
|
executeAction: () => {
|
|
@@ -1465,9 +1478,9 @@ function pr({
|
|
|
1465
1478
|
},
|
|
1466
1479
|
enabled: !r.isEmpty() && r.isBrowsing(),
|
|
1467
1480
|
hint: "Clique para remover."
|
|
1468
|
-
}), s.allowView && s.onView &&
|
|
1481
|
+
}), s.allowView && s.onView && z() && O.push({
|
|
1469
1482
|
id: "4",
|
|
1470
|
-
icon: /* @__PURE__ */ e(
|
|
1483
|
+
icon: /* @__PURE__ */ e(Ze, {}),
|
|
1471
1484
|
color: "green",
|
|
1472
1485
|
label: s.labelView ? s.labelView : m().t("archbase:View"),
|
|
1473
1486
|
executeAction: () => {
|
|
@@ -1476,117 +1489,117 @@ function pr({
|
|
|
1476
1489
|
enabled: !r.isEmpty() && r.isBrowsing(),
|
|
1477
1490
|
hint: "Clique para visualizar."
|
|
1478
1491
|
}), s.customUserActions && s.positionCustomUserActions === "before" ? [...s.customUserActions, ...O] : s.customUserActions && s.positionCustomUserActions === "after" ? [...O, ...s.customUserActions] : O;
|
|
1479
|
-
}, [V, r, F]),
|
|
1480
|
-
R({
|
|
1481
|
-
},
|
|
1482
|
-
R({
|
|
1483
|
-
},
|
|
1484
|
-
R({
|
|
1485
|
-
},
|
|
1492
|
+
}, [V, r, F]), D = (s, z) => {
|
|
1493
|
+
R({ ...G, currentFilter: s, activeFilterIndex: z });
|
|
1494
|
+
}, $ = (s) => {
|
|
1495
|
+
R({ ...G, expandedFilter: s });
|
|
1496
|
+
}, J = (s, z) => {
|
|
1497
|
+
R({ ...G, currentFilter: s, activeFilterIndex: z });
|
|
1498
|
+
}, U = () => {
|
|
1486
1499
|
}, W = {
|
|
1487
1500
|
menuButtonColor: "blue.5",
|
|
1488
1501
|
menuPosition: "left"
|
|
1489
|
-
},
|
|
1502
|
+
}, I = {
|
|
1490
1503
|
headerFlexGrow: "left",
|
|
1491
1504
|
footerFlexGrow: "right"
|
|
1492
1505
|
// footerGridColumns: {},
|
|
1493
|
-
},
|
|
1506
|
+
}, Z = { ...W, ...q }, fe = { ...I, ...P };
|
|
1494
1507
|
return /* @__PURE__ */ e(
|
|
1495
1508
|
Ae,
|
|
1496
1509
|
{
|
|
1497
1510
|
resourceName: x,
|
|
1498
1511
|
resourceDescription: y,
|
|
1499
|
-
requiredPermissions:
|
|
1500
|
-
fallbackComponent:
|
|
1501
|
-
onSecurityReady:
|
|
1502
|
-
onAccessDenied:
|
|
1512
|
+
requiredPermissions: Y,
|
|
1513
|
+
fallbackComponent: _,
|
|
1514
|
+
onSecurityReady: S?.onSecurityReady,
|
|
1515
|
+
onAccessDenied: S?.onAccessDenied,
|
|
1503
1516
|
children: /* @__PURE__ */ e(
|
|
1504
|
-
|
|
1517
|
+
wt,
|
|
1505
1518
|
{
|
|
1506
|
-
innerRef:
|
|
1519
|
+
innerRef: N,
|
|
1507
1520
|
width: T,
|
|
1508
1521
|
height: v,
|
|
1509
1522
|
radius: A,
|
|
1510
|
-
withBorder:
|
|
1523
|
+
withBorder: ee,
|
|
1511
1524
|
isError: o,
|
|
1512
1525
|
error: u,
|
|
1513
1526
|
clearError: f,
|
|
1514
1527
|
title: t,
|
|
1515
1528
|
defaultDebug: h,
|
|
1516
1529
|
debugOptions: b,
|
|
1517
|
-
style:
|
|
1518
|
-
options:
|
|
1519
|
-
headerLeft: /* @__PURE__ */ e(
|
|
1530
|
+
style: X,
|
|
1531
|
+
options: fe,
|
|
1532
|
+
headerLeft: /* @__PURE__ */ e(xt, { actions: k, options: Z }),
|
|
1520
1533
|
headerRight: /* @__PURE__ */ e(
|
|
1521
|
-
|
|
1534
|
+
it,
|
|
1522
1535
|
{
|
|
1523
1536
|
id: a.componentName,
|
|
1524
1537
|
viewName: a.viewName,
|
|
1525
1538
|
apiVersion: a.apiVersion,
|
|
1526
1539
|
ref: w,
|
|
1527
|
-
variant: B ||
|
|
1528
|
-
expandedFilter:
|
|
1540
|
+
variant: B || E.variant,
|
|
1541
|
+
expandedFilter: G.expandedFilter,
|
|
1529
1542
|
persistenceDelegator: l,
|
|
1530
|
-
currentFilter:
|
|
1531
|
-
activeFilterIndex:
|
|
1532
|
-
onSelectedFilter:
|
|
1533
|
-
onFilterChanged:
|
|
1534
|
-
onSearchByFilter:
|
|
1535
|
-
onToggleExpandedFilter:
|
|
1543
|
+
currentFilter: G.currentFilter,
|
|
1544
|
+
activeFilterIndex: G.activeFilterIndex,
|
|
1545
|
+
onSelectedFilter: J,
|
|
1546
|
+
onFilterChanged: D,
|
|
1547
|
+
onSearchByFilter: U,
|
|
1548
|
+
onToggleExpandedFilter: $,
|
|
1536
1549
|
width: "660px",
|
|
1537
1550
|
height: "170px",
|
|
1538
1551
|
children: d
|
|
1539
1552
|
}
|
|
1540
1553
|
),
|
|
1541
|
-
footerRight: c && /* @__PURE__ */ e(
|
|
1542
|
-
children:
|
|
1554
|
+
footerRight: c && /* @__PURE__ */ e(dt, { total: 10 }),
|
|
1555
|
+
children: M
|
|
1543
1556
|
}
|
|
1544
1557
|
)
|
|
1545
1558
|
}
|
|
1546
1559
|
);
|
|
1547
1560
|
}
|
|
1548
|
-
function
|
|
1561
|
+
function yr() {
|
|
1549
1562
|
return /* @__PURE__ */ e("div", { children: "SEARCH TEMPLATE" });
|
|
1550
1563
|
}
|
|
1551
|
-
const
|
|
1552
|
-
function
|
|
1553
|
-
const [r, a] =
|
|
1564
|
+
const ot = Ut(void 0);
|
|
1565
|
+
function Cr({ children: t }) {
|
|
1566
|
+
const [r, a] = te({}), d = Ge((f, T) => {
|
|
1554
1567
|
a((v) => ({ ...v, [f]: T }));
|
|
1555
|
-
}, []), n =
|
|
1568
|
+
}, []), n = Ge((f) => {
|
|
1556
1569
|
a((T) => {
|
|
1557
1570
|
const v = { ...T };
|
|
1558
1571
|
return delete v[f], v;
|
|
1559
1572
|
});
|
|
1560
|
-
}, []), o =
|
|
1573
|
+
}, []), o = Ge(() => {
|
|
1561
1574
|
a({});
|
|
1562
|
-
}, []), u =
|
|
1563
|
-
return /* @__PURE__ */ e(
|
|
1575
|
+
}, []), u = Ge((f) => r[f], [r]);
|
|
1576
|
+
return /* @__PURE__ */ e(ot.Provider, { value: { errors: r, setError: d, clearError: n, clearAll: o, getError: u }, children: t });
|
|
1564
1577
|
}
|
|
1565
|
-
function
|
|
1566
|
-
return
|
|
1578
|
+
function Fr() {
|
|
1579
|
+
return pt(ot);
|
|
1567
1580
|
}
|
|
1568
|
-
function
|
|
1569
|
-
const t =
|
|
1581
|
+
function Rr() {
|
|
1582
|
+
const t = pt(ot);
|
|
1570
1583
|
if (!t)
|
|
1571
1584
|
throw new Error("useRequiredValidationErrors must be used within ValidationErrorsProvider");
|
|
1572
1585
|
return t;
|
|
1573
1586
|
}
|
|
1574
1587
|
export {
|
|
1575
|
-
|
|
1588
|
+
mr as ArchbaseAdvancedSmartButton,
|
|
1576
1589
|
Ae as ArchbaseConditionalSecurityWrapper,
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1590
|
+
xr as ArchbaseFormModalTemplate,
|
|
1591
|
+
gr as ArchbaseFormTemplate,
|
|
1592
|
+
br as ArchbaseGridTemplate,
|
|
1593
|
+
wr as ArchbaseMasonryTemplate,
|
|
1594
|
+
vr as ArchbaseModalTemplate,
|
|
1595
|
+
Ar as ArchbasePanelTemplate,
|
|
1596
|
+
yr as ArchbaseSearchTemplate,
|
|
1597
|
+
ne as ArchbaseSmartActionButton,
|
|
1598
|
+
wt as ArchbaseSpaceTemplate,
|
|
1599
|
+
Cr as ValidationErrorsProvider,
|
|
1600
|
+
pr as useConditionalSecurity,
|
|
1588
1601
|
ge as useOptionalTemplateSecurity,
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1602
|
+
Rr as useRequiredValidationErrors,
|
|
1603
|
+
fr as useTemplateSecurityAvailable,
|
|
1604
|
+
Fr as useValidationErrors
|
|
1592
1605
|
};
|