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