@archbase/template 4.0.19 → 4.0.20

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