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