@archbase/template 4.0.2 → 4.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +460 -460
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  import { jsx as e, Fragment as qe, jsxs as c } from "react/jsx-runtime";
2
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";
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 rt, IconEye as Rt } from "@tabler/icons-react";
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";
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 nt, Fragment as en, Profiler as tn, createContext as nn, useContext as $t } from "react";
7
- import { useArchbaseV1V2Compatibility as We, useArchbaseDataSourceListener as it, DataSourceEventNames as Ie, ArchbaseDataSource as rn } from "@archbase/data";
8
- import { ArchbaseAlert as Qe, ArchbaseDialog as St, ArchbaseDataGrid as Lt, GridToolBarActions as ln, ArchbaseDebugInspector as on, ArchbaseMasonryProvider as an, ArchbaseMasonryResponsive as cn, ArchbaseMasonry as sn, ArchbaseActionButtons as dn } from "@archbase/components";
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";
9
9
  import { ArchbaseSpaceFixed as ht, ArchbaseSpaceTop as It, ArchbaseSpaceFill as ft, ArchbaseForm as jt, ArchbaseSpaceBottom as mt } from "@archbase/layout";
10
- import { ArchbaseQueryBuilder as Dt, buildFrom as un, ArchbaseGlobalFilter as hn } from "@archbase/advanced";
10
+ import { ArchbaseQueryBuilder as Dt, buildFrom as dr, ArchbaseGlobalFilter as ur } from "@archbase/advanced";
11
11
  import ct from "@rehooks/component-size";
12
- import { uniqueId as fn } from "lodash";
13
- const mn = {
12
+ import { uniqueId as hr } from "lodash";
13
+ const fr = {
14
14
  isAvailable: !1,
15
15
  hasPermission: () => !0,
16
16
  // Default: sempre permite
@@ -21,45 +21,45 @@ const mn = {
21
21
  canEdit: !0,
22
22
  canDelete: !0,
23
23
  canView: !0
24
- }, Ue = (t) => Je(() => mn, []), Vn = () => !1;
25
- function Pn(t) {
24
+ }, Ue = (t) => Je(() => fr, []), Nr = () => !1;
25
+ function Vr(t) {
26
26
  const {
27
- onSelect: n,
27
+ onSelect: r,
28
28
  onSelectMultiple: o,
29
29
  initialValue: f = null,
30
- initialValues: r = [],
30
+ initialValues: n = [],
31
31
  selectionMode: i = "single",
32
32
  autoClose: h = !0,
33
33
  onOpen: p,
34
34
  onClose: a
35
- } = t || {}, [v, $] = U(!1), [l, s] = U(f), [H, I] = U(r), C = Z(() => {
35
+ } = t || {}, [v, $] = U(!1), [l, s] = U(f), [H, I] = U(n), C = Z(() => {
36
36
  $(!0), p?.();
37
- }, [p]), A = Z(() => {
37
+ }, [p]), b = Z(() => {
38
38
  $(!1), a?.();
39
39
  }, [a]), m = Z(() => {
40
40
  s(null), I([]);
41
- }, []), N = Z(
41
+ }, []), V = Z(
42
42
  (u) => {
43
- s(u), I([u]), n?.(u), h && ($(!1), a?.());
43
+ s(u), I([u]), r?.(u), h && ($(!1), a?.());
44
44
  },
45
- [n, h, a]
46
- ), b = Z(
45
+ [r, h, a]
46
+ ), w = Z(
47
47
  (u) => {
48
48
  I(u), s(u.length > 0 ? u[0] : null), o?.(u), h && ($(!1), a?.());
49
49
  },
50
50
  [o, h, a]
51
- ), V = Z(() => {
51
+ ), P = Z(() => {
52
52
  $(!1), a?.();
53
- }, [a]), w = Je(
53
+ }, [a]), F = Je(
54
54
  () => ({
55
55
  opened: v,
56
- onClose: V,
57
- onSelect: N,
58
- onSelectMultiple: b,
56
+ onClose: P,
57
+ onSelect: V,
58
+ onSelectMultiple: w,
59
59
  selectionMode: i,
60
60
  initialSelectedItems: i === "multiple" ? H : l ? [l] : void 0
61
61
  }),
62
- [v, V, N, b, i, l, H]
62
+ [v, P, V, w, i, l, H]
63
63
  );
64
64
  return {
65
65
  // Estado
@@ -68,60 +68,60 @@ function Pn(t) {
68
68
  selectedItems: H,
69
69
  // Ações
70
70
  open: C,
71
- close: A,
71
+ close: b,
72
72
  clear: m,
73
73
  setSelectedItem: s,
74
74
  setSelectedItems: I,
75
75
  // Handlers
76
- handleSelect: N,
77
- handleSelectMultiple: b,
78
- handleClose: V,
76
+ handleSelect: V,
77
+ handleSelectMultiple: w,
78
+ handleClose: P,
79
79
  // Props para template
80
- lookupProps: w
80
+ lookupProps: F
81
81
  };
82
82
  }
83
83
  const K = ({
84
84
  actionName: t,
85
- actionDescription: n,
85
+ actionDescription: r,
86
86
  children: o,
87
87
  fallback: f = null,
88
- autoRegister: r = !0,
88
+ autoRegister: n = !0,
89
89
  onClick: i,
90
90
  ...h
91
91
  }) => {
92
92
  const p = Ue();
93
93
  return tt.useEffect(() => {
94
- r && t && n && p.isAvailable && p.registerAction();
95
- }, [t, n, r, 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 });
96
- }, zn = ({
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 });
96
+ }, Pr = ({
97
97
  actionName: t,
98
- actionDescription: n,
98
+ actionDescription: r,
99
99
  children: o,
100
100
  fallback: f = null,
101
- onClick: r,
101
+ onClick: n,
102
102
  ...i
103
103
  }) => {
104
104
  const [h, p] = tt.useState(null), [a, v] = tt.useState(!1);
105
105
  return tt.useEffect(() => {
106
106
  if (!t) {
107
- p(/* @__PURE__ */ e(Oe, { onClick: r, ...i, children: o }));
107
+ p(/* @__PURE__ */ e(Oe, { onClick: n, ...i, children: o }));
108
108
  return;
109
109
  }
110
- v(!1), p(/* @__PURE__ */ e(Oe, { onClick: r, ...i, children: o }));
111
- }, [t, n, o, f, i]), /* @__PURE__ */ e(qe, { children: h });
110
+ v(!1), p(/* @__PURE__ */ e(Oe, { onClick: n, ...i, children: o }));
111
+ }, [t, r, o, f, i]), /* @__PURE__ */ e(qe, { children: h });
112
112
  }, He = ({
113
113
  children: t
114
- }) => /* @__PURE__ */ e(qe, { children: t }), Gn = (t) => Je(() => ({
114
+ }) => /* @__PURE__ */ e(qe, { children: t }), zr = (t) => Je(() => ({
115
115
  shouldWrap: !1,
116
116
  isSecurityAvailable: !1,
117
117
  hasResourceName: !!t
118
118
  }), [t]);
119
- function $n({
119
+ function Gr({
120
120
  innerRef: t,
121
- title: n,
121
+ title: r,
122
122
  subtitle: o,
123
123
  isError: f = !1,
124
- isCanceling: r = !1,
124
+ isCanceling: n = !1,
125
125
  isSaving: i = !1,
126
126
  isLoading: h = !1,
127
127
  error: p = "",
@@ -134,12 +134,12 @@ function $n({
134
134
  children: H,
135
135
  radius: I,
136
136
  variant: C,
137
- buttonsPosition: A = "footer",
137
+ buttonsPosition: b = "footer",
138
138
  saveLabel: m,
139
- cancelLabel: N,
140
- onBack: b,
141
- footerAlign: V = "left",
142
- footerContent: w,
139
+ cancelLabel: V,
140
+ onBack: w,
141
+ footerAlign: P = "left",
142
+ footerContent: F,
143
143
  dataSource: u,
144
144
  onSave: X,
145
145
  onCancel: ee,
@@ -149,21 +149,21 @@ function $n({
149
149
  onAfterCancel: _,
150
150
  onError: R,
151
151
  routePath: T,
152
- onBeforeClose: ie,
152
+ onBeforeClose: le,
153
153
  useNavigationListener: E,
154
154
  // Props de segurança (opcionais)
155
155
  resourceName: te,
156
156
  resourceDescription: ue,
157
- requiredPermissions: ne,
157
+ requiredPermissions: re,
158
158
  fallbackComponent: q,
159
159
  securityOptions: j,
160
160
  ...J
161
161
  }) {
162
- const W = Me(), [Y, ce] = U(f), [be, le] = U(p), d = dt();
162
+ const W = Me(), [Y, ce] = U(f), [be, ne] = U(p), d = dt();
163
163
  Ue({
164
164
  autoRegisterActions: j?.autoRegisterActions ?? !0
165
165
  });
166
- const P = We(
166
+ const z = We(
167
167
  "ArchbaseFormTemplate",
168
168
  u,
169
169
  void 0,
@@ -172,33 +172,33 @@ function $n({
172
172
  it({
173
173
  dataSource: u,
174
174
  listener: (O) => {
175
- O.type === Ie.onError && (ce(!0), le(O.error)), (O.type === Ie.afterEdit || O.type === Ie.afterInsert) && (P.isDataSourceV2 || d());
175
+ O.type === Ie.onError && (ce(!0), ne(O.error)), (O.type === Ie.afterEdit || O.type === Ie.afterInsert) && (z.isDataSourceV2 || d());
176
176
  }
177
177
  });
178
178
  const M = Pt(), we = Z((O, D) => ({
179
179
  closeAllowed: ($e) => {
180
180
  }
181
- }), []), he = E || we, { closeAllowed: z } = he(T || "", () => {
182
- ie && ie() === !1 || z();
181
+ }), []), he = E || we, { closeAllowed: k } = he(T || "", () => {
182
+ le && le() === !1 || k();
183
183
  }), fe = async (O) => {
184
184
  try {
185
185
  X ? X(O) : (ae && await ae(O), u.isBrowsing() || u.save().then(() => {
186
- M?.clearAll(), Q && Q(O), E && z();
186
+ M?.clearAll(), Q && Q(O), E && k();
187
187
  }).catch((D) => {
188
- R && R(xe(D)), ce(!0), le(xe(D));
188
+ R && R(xe(D)), ce(!0), ne(xe(D));
189
189
  }));
190
190
  } catch (D) {
191
- R && R(xe(D)), ce(!0), le(xe(D));
191
+ R && R(xe(D)), ce(!0), ne(xe(D));
192
192
  }
193
193
  }, Fe = () => {
194
194
  try {
195
- ee ? ee.length > 0 ? ee(z) : ee() : (L && L(), u.isBrowsing() || u.cancel(), M?.clearAll(), _ && _(), E && z());
195
+ ee ? ee.length > 0 ? ee(k) : ee() : (L && L(), u.isBrowsing() || u.cancel(), M?.clearAll(), _ && _(), E && k());
196
196
  } catch (O) {
197
- R && R(xe(O)), ce(!0), le(xe(O));
197
+ R && R(xe(O)), ce(!0), ne(xe(O));
198
198
  }
199
199
  }, Ae = () => {
200
- a && a(), ce(!1), le("");
201
- }, Pe = u && !u.isBrowsing(), se = A === "header" || A === "both", G = A === "footer" || A === "both", de = () => /* @__PURE__ */ e(oe, { gap: "sm", children: Pe ? /* @__PURE__ */ c(qe, { children: [
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: [
202
202
  /* @__PURE__ */ e(
203
203
  K,
204
204
  {
@@ -207,8 +207,8 @@ function $n({
207
207
  leftSection: /* @__PURE__ */ e(ze, { size: 16 }),
208
208
  onClick: Fe,
209
209
  variant: "default",
210
- loading: r,
211
- children: N || g().t("Cancel")
210
+ loading: n,
211
+ children: V || g().t("Cancel")
212
212
  }
213
213
  ),
214
214
  /* @__PURE__ */ e(
@@ -241,12 +241,12 @@ function $n({
241
241
  flexShrink: 0,
242
242
  padding: "calc(0.625rem / 2)",
243
243
  display: "flex",
244
- justifyContent: V === "center" ? "center" : "space-between",
244
+ justifyContent: P === "center" ? "center" : "space-between",
245
245
  alignItems: "center",
246
246
  gap: "1rem"
247
247
  },
248
248
  children: [
249
- V === "right" && w && /* @__PURE__ */ e(pe, { style: { flex: 1 }, children: w }),
249
+ P === "right" && F && /* @__PURE__ */ e(pe, { style: { flex: 1 }, children: F }),
250
250
  Pe ? /* @__PURE__ */ c(oe, { gap: "md", children: [
251
251
  /* @__PURE__ */ e(
252
252
  K,
@@ -271,7 +271,7 @@ function $n({
271
271
  disabled: u && u.isBrowsing(),
272
272
  variant: C ?? W.variant,
273
273
  color: "red",
274
- children: N || `${g().t("Cancel")}`
274
+ children: V || `${g().t("Cancel")}`
275
275
  }
276
276
  )
277
277
  ] }) : /* @__PURE__ */ e(oe, { gap: "md", children: /* @__PURE__ */ e(
@@ -285,7 +285,7 @@ function $n({
285
285
  children: `${g().t("Close")}`
286
286
  }
287
287
  ) }),
288
- (V === "left" || V === "center") && w && /* @__PURE__ */ e(pe, { style: { flex: V === "left" ? 1 : 0, textAlign: "right" }, children: w })
288
+ (P === "left" || P === "center") && F && /* @__PURE__ */ e(pe, { style: { flex: P === "left" ? 1 : 0, textAlign: "right" }, children: F })
289
289
  ]
290
290
  }
291
291
  );
@@ -294,7 +294,7 @@ function $n({
294
294
  {
295
295
  resourceName: te,
296
296
  resourceDescription: ue,
297
- requiredPermissions: ne,
297
+ requiredPermissions: re,
298
298
  fallbackComponent: q,
299
299
  onSecurityReady: j?.onSecurityReady,
300
300
  onAccessDenied: j?.onAccessDenied,
@@ -322,19 +322,19 @@ function $n({
322
322
  },
323
323
  children: /* @__PURE__ */ c(Ce, { justify: "space-between", align: "center", children: [
324
324
  /* @__PURE__ */ c(oe, { gap: "md", children: [
325
- b && /* @__PURE__ */ e(
325
+ w && /* @__PURE__ */ e(
326
326
  vt,
327
327
  {
328
328
  variant: "subtle",
329
329
  color: "gray",
330
330
  size: "lg",
331
- onClick: b,
331
+ onClick: w,
332
332
  style: { border: "1px solid var(--mantine-color-gray-3)" },
333
333
  children: /* @__PURE__ */ e(Vt, { size: 18 })
334
334
  }
335
335
  ),
336
- (n || o) && /* @__PURE__ */ c(pe, { children: [
337
- n && /* @__PURE__ */ e(Bt, { order: 4, fw: 600, children: n }),
336
+ (r || o) && /* @__PURE__ */ c(pe, { children: [
337
+ r && /* @__PURE__ */ e(Bt, { order: 4, fw: 600, children: r }),
338
338
  o && /* @__PURE__ */ e(Re, { size: "sm", c: "dimmed", children: o })
339
339
  ] })
340
340
  ] }),
@@ -365,7 +365,7 @@ function $n({
365
365
  padding: se ? "24px" : "calc(0.625rem / 2)"
366
366
  },
367
367
  children: [
368
- /* @__PURE__ */ e(yt, { visible: h || r || i, opacity: 0.3 }),
368
+ /* @__PURE__ */ e(yt, { visible: h || n || i, opacity: 0.3 }),
369
369
  H
370
370
  ]
371
371
  }
@@ -377,12 +377,12 @@ function $n({
377
377
  }
378
378
  );
379
379
  }
380
- function Ln({
380
+ function $r({
381
381
  title: t,
382
- withOverlay: n = !0,
382
+ withOverlay: r = !0,
383
383
  overlayProps: o,
384
384
  children: f,
385
- withCloseButton: r = !0,
385
+ withCloseButton: n = !0,
386
386
  closeButtonProps: i,
387
387
  opened: h,
388
388
  fullScreen: p,
@@ -394,12 +394,12 @@ function Ln({
394
394
  height: H,
395
395
  userActions: I,
396
396
  onAfterSave: C,
397
- onClickOk: A,
397
+ onClickOk: b,
398
398
  onClickCancel: m,
399
- onBeforeOk: N,
400
- onCustomSave: b,
401
- isError: V,
402
- error: w = "",
399
+ onBeforeOk: V,
400
+ onCustomSave: w,
401
+ isError: P,
402
+ error: F = "",
403
403
  clearError: u = () => {
404
404
  },
405
405
  onError: X,
@@ -411,9 +411,9 @@ function Ln({
411
411
  requiredPermissions: _,
412
412
  fallbackComponent: R,
413
413
  securityOptions: T,
414
- ...ie
414
+ ...le
415
415
  }) {
416
- const E = Me(), te = ut(), { colorScheme: ue } = st(), [ne, q] = U(V), [j, J] = U(w), [W, Y] = U(!1), ce = dt();
416
+ const E = Me(), te = ut(), { colorScheme: ue } = st(), [re, q] = U(P), [j, J] = U(F), [W, Y] = U(!1), ce = dt();
417
417
  Ue({
418
418
  resourceDescription: L || t?.toString(),
419
419
  autoRegisterActions: T?.autoRegisterActions ?? !0
@@ -426,16 +426,16 @@ function Ln({
426
426
  );
427
427
  it({
428
428
  dataSource: s,
429
- listener: (z) => {
430
- z.type === Ie.onError && (q(!0), J(z.error)), (z.type === Ie.afterEdit || z.type === Ie.afterInsert) && (be.isDataSourceV2 || ce());
429
+ listener: (k) => {
430
+ k.type === Ie.onError && (q(!0), J(k.error)), (k.type === Ie.afterEdit || k.type === Ie.afterInsert) && (be.isDataSourceV2 || ce());
431
431
  }
432
432
  });
433
- const le = async () => {
433
+ const ne = async () => {
434
434
  if (s && !s.isBrowsing())
435
435
  try {
436
436
  Y(!0), await s.save(), C && C(s.getCurrentRecord());
437
- } catch (z) {
438
- return X && X(xe(z)), q(!0), J(xe(z)), Y(!1), !1;
437
+ } catch (k) {
438
+ return X && X(xe(k)), q(!0), J(xe(k)), Y(!1), !1;
439
439
  }
440
440
  return Y(!1), !0;
441
441
  }, d = () => {
@@ -444,20 +444,20 @@ function Ln({
444
444
  s.cancel();
445
445
  } catch {
446
446
  }
447
- }, P = async () => {
448
- if (b)
449
- s && b(s.getCurrentRecord(), () => {
450
- A && A();
447
+ }, z = async () => {
448
+ if (w)
449
+ s && w(s.getCurrentRecord(), () => {
450
+ b && b();
451
451
  });
452
- else if (N) {
453
- const z = N(s.getCurrentRecord());
454
- z instanceof Promise && z.then(async () => {
455
- await le() && A && A();
452
+ else if (V) {
453
+ const k = V(s.getCurrentRecord());
454
+ k instanceof Promise ? k.then(async () => {
455
+ await ne() && b && b();
456
456
  }).catch((fe) => {
457
457
  X && X(xe(fe)), q(!0), J(xe(fe));
458
- });
458
+ }) : (k === !0 || k === void 0) && await ne() && b && b();
459
459
  } else
460
- await le() && A && A();
460
+ await ne() && b && b();
461
461
  }, M = () => {
462
462
  d(), m && m();
463
463
  }, we = () => {
@@ -478,12 +478,12 @@ function Ln({
478
478
  bt,
479
479
  {
480
480
  title: t,
481
- withOverlay: n,
481
+ withOverlay: r,
482
482
  overlayProps: o || {
483
483
  color: ue === "dark" ? te.colors.dark[7] : te.colors.gray[6],
484
484
  opacity: 0.25
485
485
  },
486
- withCloseButton: r,
486
+ withCloseButton: n,
487
487
  closeButtonProps: i,
488
488
  onClose: we,
489
489
  opened: h,
@@ -491,11 +491,11 @@ function Ln({
491
491
  centered: a,
492
492
  closeOnEscape: $,
493
493
  size: l,
494
- ...ie,
494
+ ...le,
495
495
  children: /* @__PURE__ */ c(Et, { children: [
496
496
  /* @__PURE__ */ e(yt, { styles: ae, visible: W, opacity: 0.8 }),
497
497
  /* @__PURE__ */ c(ht, { height: H, children: [
498
- ne ? /* @__PURE__ */ e(It, { size: "100px", children: /* @__PURE__ */ e(
498
+ re ? /* @__PURE__ */ e(It, { size: "100px", children: /* @__PURE__ */ e(
499
499
  Qe,
500
500
  {
501
501
  autoClose: ee,
@@ -519,7 +519,7 @@ function Ln({
519
519
  actionName: "save",
520
520
  actionDescription: `Salvar ${L || t || "registro"}`,
521
521
  leftSection: /* @__PURE__ */ e(et, {}),
522
- onClick: P,
522
+ onClick: z,
523
523
  disabled: s && s.isBrowsing(),
524
524
  variant: v ?? E.variant,
525
525
  color: "green",
@@ -558,12 +558,12 @@ function Ln({
558
558
  }
559
559
  );
560
560
  }
561
- function jn({
561
+ function Lr({
562
562
  title: t,
563
- withOverlay: n = !0,
563
+ withOverlay: r = !0,
564
564
  overlayProps: o,
565
565
  children: f,
566
- withCloseButton: r = !0,
566
+ withCloseButton: n = !0,
567
567
  closeButtonProps: i,
568
568
  opened: h,
569
569
  fullScreen: p,
@@ -575,13 +575,13 @@ function jn({
575
575
  onlyOkButton: H = !1,
576
576
  onClose: I,
577
577
  onClickOk: C,
578
- onClickCancel: A,
578
+ onClickCancel: b,
579
579
  userActions: m,
580
580
  // Props de segurança (opcionais)
581
- resourceName: N,
582
- resourceDescription: b,
583
- requiredPermissions: V,
584
- fallbackComponent: w,
581
+ resourceName: V,
582
+ resourceDescription: w,
583
+ requiredPermissions: P,
584
+ fallbackComponent: F,
585
585
  securityOptions: u
586
586
  }) {
587
587
  const X = Me(), ee = ut(), { colorScheme: ae } = st();
@@ -591,29 +591,29 @@ function jn({
591
591
  const Q = () => {
592
592
  C && C(), I();
593
593
  }, L = () => {
594
- A && A(), I();
594
+ b && b(), I();
595
595
  }, _ = () => {
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: N,
602
- resourceDescription: b,
603
- requiredPermissions: V,
604
- fallbackComponent: w,
601
+ resourceName: V,
602
+ resourceDescription: w,
603
+ requiredPermissions: P,
604
+ fallbackComponent: F,
605
605
  onSecurityReady: u?.onSecurityReady,
606
606
  onAccessDenied: u?.onAccessDenied,
607
607
  children: /* @__PURE__ */ e(
608
608
  bt,
609
609
  {
610
610
  title: t,
611
- withOverlay: n,
611
+ withOverlay: r,
612
612
  overlayProps: o || {
613
613
  color: ae === "dark" ? ee.colors.dark[7] : ee.colors.gray[6],
614
614
  opacity: 0.25
615
615
  },
616
- withCloseButton: r,
616
+ withCloseButton: n,
617
617
  closeButtonProps: i,
618
618
  onClose: _,
619
619
  opened: h,
@@ -630,7 +630,7 @@ function jn({
630
630
  K,
631
631
  {
632
632
  actionName: "save",
633
- actionDescription: `Salvar ${b || "registro"}`,
633
+ actionDescription: `Salvar ${w || "registro"}`,
634
634
  leftSection: /* @__PURE__ */ e(et, {}),
635
635
  onClick: Q,
636
636
  variant: v ?? X.variant,
@@ -647,7 +647,7 @@ function jn({
647
647
  onClick: L,
648
648
  variant: v ?? X.variant,
649
649
  color: "red",
650
- children: A ? `${g().t("Cancel")}` : `${g().t("Close")}`
650
+ children: b ? `${g().t("Cancel")}` : `${g().t("Close")}`
651
651
  }
652
652
  )
653
653
  ] })
@@ -658,22 +658,22 @@ function jn({
658
658
  }
659
659
  );
660
660
  }
661
- const gn = (t, n, o) => {
662
- if (!t || !n || !n.existsValue(`${t.viewName}_${t.componentName}`)) {
663
- let f = -1, r;
664
- return o && o.getFilters().length > 0 && (f = 0, r = JSON.parse(o.getFirstFilter()?.filter)), {
661
+ const mr = (t, r, o) => {
662
+ if (!t || !r || !r.existsValue(`${t.viewName}_${t.componentName}`)) {
663
+ let f = -1, n;
664
+ return o && o.getFilters().length > 0 && (f = 0, n = JSON.parse(o.getFirstFilter()?.filter)), {
665
665
  activeFilterIndex: f,
666
666
  expandedFilter: !1,
667
- currentFilter: r
667
+ currentFilter: n
668
668
  };
669
669
  }
670
- return n.getValue(`${t.viewName}_${t.componentName}`);
670
+ return r.getValue(`${t.viewName}_${t.componentName}`);
671
671
  };
672
- function pn(t, n) {
672
+ function gr(t, r) {
673
673
  const {
674
674
  title: o,
675
675
  printTitle: f,
676
- dataSource: r,
676
+ dataSource: n,
677
677
  filterOptions: i,
678
678
  pageSize: h = 15,
679
679
  pageIndex: p = 0,
@@ -685,12 +685,12 @@ function pn(t, n) {
685
685
  customRenderRowActions: H,
686
686
  innerRef: I,
687
687
  isLoading: C = !1,
688
- isLoadingFilter: A = !1,
688
+ isLoadingFilter: b = !1,
689
689
  isError: m = !1,
690
- enableTopToolbar: N = !0,
691
- enableTopToolbarActions: b = !0,
692
- error: V = "",
693
- clearError: w = () => {
690
+ enableTopToolbar: V = !0,
691
+ enableTopToolbarActions: w = !0,
692
+ error: P = "",
693
+ clearError: F = () => {
694
694
  },
695
695
  filterType: u,
696
696
  width: X = "100%",
@@ -701,11 +701,11 @@ function pn(t, n) {
701
701
  filterPersistenceDelegator: _,
702
702
  variant: R,
703
703
  store: T,
704
- cellPadding: ie,
704
+ cellPadding: le,
705
705
  bottomToolbarMinHeight: E,
706
706
  enableRowSelection: te = !0,
707
707
  enableRowNumbers: ue = !0,
708
- enableRowActions: ne = !0,
708
+ enableRowActions: re = !0,
709
709
  positionActionsColumn: q = "first",
710
710
  actionsColumnWidth: j,
711
711
  tableHeadCellPadding: J,
@@ -713,14 +713,14 @@ function pn(t, n) {
713
713
  renderTopToolbar: Y,
714
714
  toolbarAlignment: ce = "right",
715
715
  toolbarLeftContent: be,
716
- onSelectedRowsChanged: le,
716
+ onSelectedRowsChanged: ne,
717
717
  onCellDoubleClick: d,
718
- onFilterModelChange: P,
718
+ onFilterModelChange: z,
719
719
  paginationLabels: M,
720
720
  // Props de segurança (opcionais)
721
721
  resourceName: we,
722
722
  resourceDescription: he,
723
- requiredPermissions: z,
723
+ requiredPermissions: k,
724
724
  fallbackComponent: fe,
725
725
  securityOptions: Fe,
726
726
  // Props para controle de bordas internas
@@ -738,11 +738,11 @@ function pn(t, n) {
738
738
  });
739
739
  const Le = We(
740
740
  "ArchbaseGridTemplate",
741
- r,
741
+ n,
742
742
  void 0,
743
743
  void 0
744
744
  );
745
- Gt(n, () => ({
745
+ Gt(r, () => ({
746
746
  refreshData: () => {
747
747
  D.current && D.current.refreshData();
748
748
  },
@@ -759,15 +759,15 @@ function pn(t, n) {
759
759
  getDataGridRef: () => D,
760
760
  getFilterModel: () => D.current ? D.current.getFilterModel() : { items: [], quickFilterValues: [] }
761
761
  }), [D]);
762
- const [x, k] = U({
762
+ const [x, B] = U({
763
763
  activeFilterIndex: -1,
764
764
  currentFilter: void 0,
765
765
  expandedFilter: !1
766
766
  });
767
- nt(() => {
768
- const S = gn(i, T, _);
769
- k(S);
770
- }, [A]);
767
+ rt(() => {
768
+ const S = mr(i, T, _);
769
+ B(S);
770
+ }, [b]);
771
771
  const ke = (S) => {
772
772
  if (H)
773
773
  return H(S);
@@ -790,28 +790,28 @@ function pn(t, n) {
790
790
  }, [I]);
791
791
  const lt = (S, Te) => {
792
792
  const ve = { ...x, currentFilter: S, activeFilterIndex: Te };
793
- k(ve), T && i && T?.setValue(`${i.viewName}_${i.componentName}`, ve);
794
- }, re = (S) => {
793
+ B(ve), T && i && T?.setValue(`${i.viewName}_${i.componentName}`, ve);
794
+ }, ie = (S) => {
795
795
  const Te = { ...x, expandedFilter: S };
796
- k(Te), T && i && T?.setValue(`${i.viewName}_${i.componentName}`, Te);
796
+ B(Te), T && i && T?.setValue(`${i.viewName}_${i.componentName}`, Te);
797
797
  }, y = (S, Te) => {
798
798
  const ve = { ...x, currentFilter: S, activeFilterIndex: Te };
799
- k(ve), T && i && T?.setValue(`${i.viewName}_${i.componentName}`, ve);
799
+ B(ve), T && i && T?.setValue(`${i.viewName}_${i.componentName}`, ve);
800
800
  }, ye = () => {
801
801
  if (x.currentFilter)
802
802
  if (ae)
803
803
  ae();
804
804
  else if (x.currentFilter.filter.filterType === "quick") {
805
- const S = r.getOptions();
805
+ const S = n.getOptions();
806
806
  x.currentFilter.filter.quickFilterText && x.currentFilter.filter.quickFilterText !== "" ? (S.filter = JSON.stringify({
807
807
  search: x.currentFilter.filter.quickFilterText,
808
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), r.refreshData(S), Le.isDataSourceV2 || Le.v1State.forceUpdate();
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();
810
810
  } else {
811
- const S = un(x.currentFilter);
811
+ const S = dr(x.currentFilter);
812
812
  if (S && S.expressionNode) {
813
- const Te = Yt(S.expressionNode), ve = r.getOptions();
814
- ve.filter = Te, ve.sort = S?.sortStrings, r.refreshData(ve), Le.isDataSourceV2 || Le.v1State.forceUpdate();
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();
815
815
  }
816
816
  }
817
817
  };
@@ -839,7 +839,7 @@ function pn(t, n) {
839
839
  onSelectedFilter: y,
840
840
  onFilterChanged: lt,
841
841
  onSearchByFilter: ye,
842
- onToggleExpandedFilter: re,
842
+ onToggleExpandedFilter: ie,
843
843
  onExport: pt,
844
844
  onPrint: xt,
845
845
  showExportButton: !0,
@@ -854,7 +854,7 @@ function pn(t, n) {
854
854
  {
855
855
  resourceName: we,
856
856
  resourceDescription: he,
857
- requiredPermissions: z,
857
+ requiredPermissions: k,
858
858
  fallbackComponent: fe,
859
859
  onSecurityReady: Fe?.onSecurityReady,
860
860
  onAccessDenied: Fe?.onAccessDenied,
@@ -869,8 +869,8 @@ function pn(t, n) {
869
869
  title: g().t("archbase:WARNING"),
870
870
  titleColor: "rgb(250, 82, 82)",
871
871
  variant: R ?? me.variant,
872
- onClose: () => w && w(),
873
- children: /* @__PURE__ */ e("span", { children: V })
872
+ onClose: () => F && F(),
873
+ children: /* @__PURE__ */ e("span", { children: P })
874
874
  }
875
875
  ) : null,
876
876
  /* @__PURE__ */ c(
@@ -882,13 +882,13 @@ function pn(t, n) {
882
882
  width: X,
883
883
  height: ee,
884
884
  withBorder: !1,
885
- dataSource: r,
885
+ dataSource: n,
886
886
  enableColumnResizing: !0,
887
887
  enableRowNumbers: ue,
888
888
  enableRowSelection: te,
889
- enableRowActions: ne,
890
- enableTopToolbar: N,
891
- enableTopToolbarActions: b,
889
+ enableRowActions: re,
890
+ enableTopToolbar: V,
891
+ enableTopToolbarActions: w,
892
892
  manualPagination: !0,
893
893
  manualSorting: !0,
894
894
  isLoading: De,
@@ -899,17 +899,17 @@ function pn(t, n) {
899
899
  renderToolbarInternalActions: u == "none" ? () => /* @__PURE__ */ e("div", {}) : void 0,
900
900
  allowExportData: !0,
901
901
  allowPrintData: !0,
902
- onSelectedRowsChanged: le,
902
+ onSelectedRowsChanged: ne,
903
903
  onCellDoubleClick: d,
904
- onFilterModelChange: P,
905
- renderRowActions: ne ? ke : void 0,
904
+ onFilterModelChange: z,
905
+ renderRowActions: re ? ke : void 0,
906
906
  positionActionsColumn: q,
907
907
  actionsColumnWidth: j,
908
908
  toolbarAlignment: ce,
909
909
  toolbarLeftContent: ge,
910
910
  renderToolbarActions: u === "advanced" || u === "none" ? Ye : void 0,
911
911
  paginationLabels: M,
912
- cellPadding: ie,
912
+ cellPadding: le,
913
913
  bottomToolbarMinHeight: E,
914
914
  tableHeadCellPadding: J,
915
915
  getRowId: Q,
@@ -926,7 +926,7 @@ function pn(t, n) {
926
926
  hideFooter: Ge,
927
927
  children: [
928
928
  a,
929
- l?.visible ? /* @__PURE__ */ e(ln, { children: /* @__PURE__ */ c(qe, { children: [
929
+ l?.visible ? /* @__PURE__ */ e(ir, { children: /* @__PURE__ */ c(qe, { children: [
930
930
  /* @__PURE__ */ e("h3", { className: "only-print", children: f || o }),
931
931
  /* @__PURE__ */ e("div", { className: "no-print", children: /* @__PURE__ */ c(Ce, { gap: "8px", rowGap: "8px", children: [
932
932
  l.customUserActions && l.customUserActionsPosition === "left" ? l.customUserActions : null,
@@ -949,7 +949,7 @@ function pn(t, n) {
949
949
  actionDescription: `Editar ${he || "registro"}`,
950
950
  color: "blue",
951
951
  leftSection: /* @__PURE__ */ e(At, {}),
952
- disabled: !r.isBrowsing() || r.isEmpty(),
952
+ disabled: !n.isBrowsing() || n.isEmpty(),
953
953
  variant: R ?? me.variant,
954
954
  onClick: () => l && l.onEditExecute && l.onEditExecute(),
955
955
  children: l.labelEdit || g().t("archbase:Edit")
@@ -961,8 +961,8 @@ function pn(t, n) {
961
961
  actionName: "delete",
962
962
  actionDescription: `Remover ${he || "registro"}`,
963
963
  color: "red",
964
- leftSection: /* @__PURE__ */ e(rt, {}),
965
- disabled: !l?.allowRemove || !r.isBrowsing() || r.isEmpty(),
964
+ leftSection: /* @__PURE__ */ e(nt, {}),
965
+ disabled: !l?.allowRemove || !n.isBrowsing() || n.isEmpty(),
966
966
  variant: R ?? me.variant,
967
967
  onClick: () => l && l.onRemoveExecute && l.onRemoveExecute(),
968
968
  children: l.labelRemove || g().t("archbase:Remove")
@@ -975,7 +975,7 @@ function pn(t, n) {
975
975
  actionDescription: `Visualizar ${he || "registro"}`,
976
976
  color: "gray.7",
977
977
  leftSection: /* @__PURE__ */ e(Rt, {}),
978
- disabled: !r.isBrowsing() || r.isEmpty(),
978
+ disabled: !n.isBrowsing() || n.isEmpty(),
979
979
  variant: R ?? me.variant,
980
980
  onClick: () => l && l.onViewExecute && l.onViewExecute(),
981
981
  children: l.labelView || g().t("archbase:View")
@@ -991,19 +991,19 @@ function pn(t, n) {
991
991
  }
992
992
  );
993
993
  }
994
- const Mn = zt(pn);
995
- function xn(t, n, o, f) {
994
+ const jr = zt(gr);
995
+ function pr(t, r, o, f) {
996
996
  if (t && t.headerGridColumns) {
997
- const r = t.headerGridColumns.left ? t.headerGridColumns.left : { xs: "auto", sm: "auto", md: "auto", lg: "auto" }, i = t.headerGridColumns.middle ? t.headerGridColumns.middle : { xs: "auto", sm: "auto", md: "auto", lg: "auto" }, h = t.headerGridColumns.right ? t.headerGridColumns.right : { xs: "auto", sm: "auto", md: "auto", lg: "auto" };
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
998
  return /* @__PURE__ */ c(Ee, { m: 0, gap: "xs", justify: "center", align: "center", grow: !0, children: [
999
999
  /* @__PURE__ */ e(
1000
1000
  Ee.Col,
1001
1001
  {
1002
1002
  span: {
1003
- xs: r.xs,
1004
- sm: r.sm,
1005
- md: r.md,
1006
- lg: r.lg
1003
+ xs: n.xs,
1004
+ sm: n.sm,
1005
+ md: n.md,
1006
+ lg: n.lg
1007
1007
  },
1008
1008
  style: {
1009
1009
  border: f ? "1px dashed" : "",
@@ -1011,7 +1011,7 @@ function xn(t, n, o, f) {
1011
1011
  justifyContent: "flex-start",
1012
1012
  alignItems: "center"
1013
1013
  },
1014
- children: n
1014
+ children: r
1015
1015
  }
1016
1016
  ),
1017
1017
  /* @__PURE__ */ e(
@@ -1051,26 +1051,26 @@ function xn(t, n, o, f) {
1051
1051
  )
1052
1052
  ] });
1053
1053
  } else {
1054
- const r = t && t.headerFlexGrow ? t.headerFlexGrow : "even", i = t && t.headerFlexRightJustifyContent ? t.headerFlexRightJustifyContent : "flex-end", h = t && t.headerFlexLeftJustifyContent ? t.headerFlexLeftJustifyContent : "flex-start";
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
1055
  return /* @__PURE__ */ c(Ce, { justify: "space-between", children: [
1056
1056
  /* @__PURE__ */ e(
1057
1057
  Ce,
1058
1058
  {
1059
- w: r === "left" || r === "even" ? "100%" : void 0,
1060
- maw: r === "left" || r === "even" ? void 0 : "100%",
1059
+ w: n === "left" || n === "even" ? "100%" : void 0,
1060
+ maw: n === "left" || n === "even" ? void 0 : "100%",
1061
1061
  align: "center",
1062
1062
  justify: h,
1063
1063
  style: {
1064
1064
  border: f ? "1px dashed" : ""
1065
1065
  },
1066
- children: n
1066
+ children: r
1067
1067
  }
1068
1068
  ),
1069
1069
  /* @__PURE__ */ e(
1070
1070
  Ce,
1071
1071
  {
1072
- w: r === "right" || r === "even" ? "100%" : void 0,
1073
- maw: r === "right" || r === "even" ? void 0 : "100%",
1072
+ w: n === "right" || n === "even" ? "100%" : void 0,
1073
+ maw: n === "right" || n === "even" ? void 0 : "100%",
1074
1074
  align: "center",
1075
1075
  justify: i,
1076
1076
  style: {
@@ -1082,18 +1082,18 @@ function xn(t, n, o, f) {
1082
1082
  ] });
1083
1083
  }
1084
1084
  }
1085
- function vn(t, n, o, f) {
1085
+ function xr(t, r, o, f) {
1086
1086
  if (t && t.footerGridColumns) {
1087
- const r = t.footerGridColumns.left ? t.footerGridColumns.left : { xs: "content", sm: "content", md: "content", lg: "content" }, i = t.footerGridColumns.middle ? t.footerGridColumns.middle : { xs: "auto", sm: "auto", md: "auto", lg: "auto" }, h = t.footerGridColumns.right ? t.footerGridColumns.right : { xs: "content", sm: "content", md: "content", lg: "content" };
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
1088
  return /* @__PURE__ */ c(Ee, { m: 0, gap: "xs", justify: "center", align: "center", grow: !0, children: [
1089
1089
  /* @__PURE__ */ e(
1090
1090
  Ee.Col,
1091
1091
  {
1092
1092
  span: {
1093
- xs: r.xs,
1094
- sm: r.sm,
1095
- md: r.md,
1096
- lg: r.lg
1093
+ xs: n.xs,
1094
+ sm: n.sm,
1095
+ md: n.md,
1096
+ lg: n.lg
1097
1097
  },
1098
1098
  style: {
1099
1099
  border: f ? "1px dashed" : "",
@@ -1101,7 +1101,7 @@ function vn(t, n, o, f) {
1101
1101
  justifyContent: "flex-start",
1102
1102
  alignItems: "center"
1103
1103
  },
1104
- children: n
1104
+ children: r
1105
1105
  }
1106
1106
  ),
1107
1107
  /* @__PURE__ */ e(
@@ -1141,28 +1141,28 @@ function vn(t, n, o, f) {
1141
1141
  )
1142
1142
  ] });
1143
1143
  } else {
1144
- const r = t && t.footerFlexGrow ? t.footerFlexGrow : "even", i = t && t.footerFlexRightJustifyContent ? t.footerFlexRightJustifyContent : "flex-end", h = t && t.footerFlexLeftJustifyContent ? t.footerFlexLeftJustifyContent : "flex-start";
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
1145
  return /* @__PURE__ */ c(Ce, { justify: "space-between", children: [
1146
1146
  /* @__PURE__ */ e(
1147
1147
  Ce,
1148
1148
  {
1149
- w: r === "left" || r === "even" ? "100%" : void 0,
1150
- maw: r === "left" || r === "even" ? void 0 : "100%",
1149
+ w: n === "left" || n === "even" ? "100%" : void 0,
1150
+ maw: n === "left" || n === "even" ? void 0 : "100%",
1151
1151
  align: "center",
1152
1152
  justify: h,
1153
1153
  style: {
1154
1154
  border: f ? "1px dashed" : "",
1155
1155
  height: "auto",
1156
- padding: n && "calc(0.625rem / 2)"
1156
+ padding: r && "calc(0.625rem / 2)"
1157
1157
  },
1158
- children: n
1158
+ children: r
1159
1159
  }
1160
1160
  ),
1161
1161
  /* @__PURE__ */ e(
1162
1162
  Ce,
1163
1163
  {
1164
- w: r === "right" || r === "even" ? "100%" : void 0,
1165
- maw: r === "right" || r === "even" ? void 0 : "100%",
1164
+ w: n === "right" || n === "even" ? "100%" : void 0,
1165
+ maw: n === "right" || n === "even" ? void 0 : "100%",
1166
1166
  align: "center",
1167
1167
  justify: i,
1168
1168
  style: {
@@ -1178,10 +1178,10 @@ function vn(t, n, o, f) {
1178
1178
  }
1179
1179
  function Mt({
1180
1180
  title: t,
1181
- innerRef: n,
1181
+ innerRef: r,
1182
1182
  isError: o = !1,
1183
1183
  error: f = "",
1184
- clearError: r,
1184
+ clearError: n,
1185
1185
  width: i = "100%",
1186
1186
  height: h = "100%",
1187
1187
  withBorder: p = !0,
@@ -1193,12 +1193,12 @@ function Mt({
1193
1193
  headerMiddle: H,
1194
1194
  headerRight: I,
1195
1195
  footerLeft: C,
1196
- footerMiddle: A,
1196
+ footerMiddle: b,
1197
1197
  footerRight: m,
1198
- variant: N,
1199
- options: b = {},
1200
- style: V,
1201
- debugOptions: w = {
1198
+ variant: V,
1199
+ options: w = {},
1200
+ style: P,
1201
+ debugOptions: F = {
1202
1202
  debugLayoutHotKey: "ctrl+shift+S",
1203
1203
  debugObjectInspectorHotKey: "ctrl+shift+D",
1204
1204
  objectsToInspect: []
@@ -1215,16 +1215,16 @@ function Mt({
1215
1215
  defaultValue: l,
1216
1216
  finalValue: !1
1217
1217
  });
1218
- Xt([[w && w.debugLayoutHotKey, () => _(!L)]]);
1218
+ Xt([[F && F.debugLayoutHotKey, () => _(!L)]]);
1219
1219
  const R = Me(), { t: T } = Zt();
1220
1220
  Ue({
1221
1221
  autoRegisterActions: Q?.autoRegisterActions ?? !0
1222
1222
  });
1223
- const ie = Se(null), E = n || ie, te = Se(null), ue = Se(null), ne = ct(te), q = ct(ue), j = ct(E), J = Je(() => ({
1224
- height: j.height - ne.height - q.height - Number(Ot("0.625rem")),
1225
- width: j.width - ne.width - q.width
1226
- }), [j.height, j.width, ne.height, ne.width, q.height, q.width]), W = Se(l);
1227
- nt(() => {
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);
1227
+ rt(() => {
1228
1228
  l !== W.current && (_(l), W.current = l);
1229
1229
  }, [l, _]);
1230
1230
  const Y = /* @__PURE__ */ c(qe, { children: [
@@ -1234,9 +1234,9 @@ function Mt({
1234
1234
  ref: E,
1235
1235
  withBorder: p,
1236
1236
  radius: v,
1237
- style: { width: i, height: h, padding: 4, ...V },
1237
+ style: { width: i, height: h, padding: 4, ...P },
1238
1238
  children: /* @__PURE__ */ c(ht, { height: "100%", children: [
1239
- /* @__PURE__ */ e(It, { size: ne.height, children: /* @__PURE__ */ e("div", { ref: te, children: xn(b, s, I, L) }) }),
1239
+ /* @__PURE__ */ e(It, { size: re.height, children: /* @__PURE__ */ e("div", { ref: te, children: pr(w, s, I, L) }) }),
1240
1240
  /* @__PURE__ */ e(ft, { children: /* @__PURE__ */ e(
1241
1241
  Ze,
1242
1242
  {
@@ -1245,7 +1245,7 @@ function Mt({
1245
1245
  border: L ? "1px dashed" : "",
1246
1246
  padding: "calc(0.625rem / 2)"
1247
1247
  },
1248
- children: a ? /* @__PURE__ */ c(en, { children: [
1248
+ children: a ? /* @__PURE__ */ c(er, { children: [
1249
1249
  o && /* @__PURE__ */ e(
1250
1250
  Qe,
1251
1251
  {
@@ -1255,8 +1255,8 @@ function Mt({
1255
1255
  icon: /* @__PURE__ */ e(Ke, { size: "1.4rem" }),
1256
1256
  title: `${T("WARNING")}`,
1257
1257
  titleColor: "rgb(250, 82, 82)",
1258
- variant: N ?? R.variant,
1259
- onClose: () => r && r(),
1258
+ variant: V ?? R.variant,
1259
+ onClose: () => n && n(),
1260
1260
  children: /* @__PURE__ */ e("span", { children: f })
1261
1261
  }
1262
1262
  ),
@@ -1264,15 +1264,15 @@ function Mt({
1264
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." }) })
1265
1265
  }
1266
1266
  ) }),
1267
- /* @__PURE__ */ e(mt, { size: q.height, children: /* @__PURE__ */ e("div", { ref: ue, children: vn(b, C, m, L) }) })
1267
+ /* @__PURE__ */ e(mt, { size: q.height, children: /* @__PURE__ */ e("div", { ref: ue, children: xr(w, C, m, L) }) })
1268
1268
  ] })
1269
1269
  }
1270
1270
  ),
1271
1271
  /* @__PURE__ */ e(
1272
- on,
1272
+ lr,
1273
1273
  {
1274
- debugObjectInspectorHotKey: w && w.debugObjectInspectorHotKey,
1275
- objectsToInspect: w && w.objectsToInspect
1274
+ debugObjectInspectorHotKey: F && F.debugObjectInspectorHotKey,
1275
+ objectsToInspect: F && F.objectsToInspect
1276
1276
  }
1277
1277
  )
1278
1278
  ] });
@@ -1289,17 +1289,17 @@ function Mt({
1289
1289
  }
1290
1290
  );
1291
1291
  }
1292
- function Cn(t, n, o, f, r, i) {
1293
- console.log(`Render de "${t}" na fase "${n}": ${o}ms`);
1292
+ function vr(t, r, o, f, n, i) {
1293
+ console.log(`Render de "${t}" na fase "${r}": ${o}ms`);
1294
1294
  }
1295
- function Un({
1295
+ function Mr({
1296
1296
  title: t,
1297
- dataSource: n,
1297
+ dataSource: r,
1298
1298
  // dataSourceEdition,
1299
1299
  filterOptions: o,
1300
1300
  globalFilterFieldNames: f,
1301
1301
  //pageSize,
1302
- filterFields: r,
1302
+ filterFields: n,
1303
1303
  innerRef: i,
1304
1304
  //isLoading = false,
1305
1305
  debug: h = !1,
@@ -1313,12 +1313,12 @@ function Un({
1313
1313
  withBorder: H = !0,
1314
1314
  filterPersistenceDelegator: I,
1315
1315
  withPagination: C = !0,
1316
- radius: A,
1316
+ radius: b,
1317
1317
  userActions: m,
1318
- columnsCountBreakPoints: N,
1319
- columnsCount: b,
1320
- gutter: V,
1321
- component: w,
1318
+ columnsCountBreakPoints: V,
1319
+ columnsCount: w,
1320
+ gutter: P,
1321
+ component: F,
1322
1322
  activeIndex: u,
1323
1323
  activeBackgroundColor: X,
1324
1324
  activeColor: ee,
@@ -1327,85 +1327,85 @@ function Un({
1327
1327
  style: L,
1328
1328
  spaceOptions: _,
1329
1329
  variant: R,
1330
- id: T = fn("masonry"),
1331
- debugOptions: ie,
1330
+ id: T = hr("masonry"),
1331
+ debugOptions: le,
1332
1332
  // Props de segurança (opcionais)
1333
1333
  resourceName: E,
1334
1334
  resourceDescription: te,
1335
1335
  requiredPermissions: ue,
1336
- fallbackComponent: ne,
1336
+ fallbackComponent: re,
1337
1337
  securityOptions: q
1338
1338
  }) {
1339
- const j = Me(), [J] = U(T), W = i || Se(null), Y = Se(null), [ce, be] = U(n.getCurrentPage()), [le, d] = U(
1340
- u || (n && n.getTotalRecords() > 0 ? 0 : -1)
1339
+ const j = Me(), [J] = U(T), W = i || Se(null), Y = Se(null), [ce, be] = U(r.getCurrentPage()), [ne, d] = U(
1340
+ u || (r && r.getTotalRecords() > 0 ? 0 : -1)
1341
1341
  );
1342
1342
  ct(W);
1343
- const [P, M] = U({
1343
+ const [z, M] = U({
1344
1344
  activeFilterIndex: -1,
1345
1345
  expandedFilter: !1
1346
1346
  }), [we, he] = U(0), {
1347
- isDataSourceV2: z,
1347
+ isDataSourceV2: k,
1348
1348
  v1State: { forceUpdate: fe }
1349
1349
  } = We(
1350
1350
  "ArchbaseMasonryTemplate",
1351
- n
1351
+ r
1352
1352
  );
1353
1353
  it({
1354
- dataSource: n,
1354
+ dataSource: r,
1355
1355
  listener: (x) => {
1356
- (x.type === Ie.afterRemove || x.type === Ie.refreshData) && (he((k) => k + 1), z || fe());
1356
+ (x.type === Ie.afterRemove || x.type === Ie.refreshData) && (he((B) => B + 1), k || fe());
1357
1357
  }
1358
1358
  });
1359
1359
  const Fe = Je(() => {
1360
- if (w) {
1361
- const x = w.type;
1362
- let k = {};
1363
- return w.props && (k = w.props), n.browseRecords().map((ke, me) => {
1360
+ if (F) {
1361
+ const x = F.type;
1362
+ let B = {};
1363
+ return F.props && (B = F.props), r.browseRecords().map((ke, me) => {
1364
1364
  const Be = `${J}_${me}`, De = `${J}_${me}`;
1365
1365
  let ge = ke.active === void 0 ? !1 : ke.active;
1366
- return le >= 0 && (ge = !1, le === me && (ge = !0)), /* @__PURE__ */ e(
1366
+ return ne >= 0 && (ge = !1, ne === me && (ge = !0)), /* @__PURE__ */ e(
1367
1367
  x,
1368
1368
  {
1369
1369
  id: De,
1370
1370
  active: ge,
1371
1371
  index: me,
1372
- dataSource: n,
1372
+ dataSource: r,
1373
1373
  recordData: ke,
1374
1374
  disabled: ke.disabled,
1375
- ...k
1375
+ ...B
1376
1376
  },
1377
1377
  Be
1378
1378
  );
1379
1379
  });
1380
1380
  }
1381
1381
  return [];
1382
- }, [le, w, J, n, we]), Ae = (x, k) => {
1383
- M({ ...P, currentFilter: x, activeFilterIndex: k });
1382
+ }, [ne, F, J, r, we]), Ae = (x, B) => {
1383
+ M({ ...z, currentFilter: x, activeFilterIndex: B });
1384
1384
  }, Pe = (x) => {
1385
- M({ ...P, expandedFilter: x });
1386
- }, se = (x, k) => {
1387
- M({ ...P, currentFilter: x, activeFilterIndex: k });
1385
+ M({ ...z, expandedFilter: x });
1386
+ }, se = (x, B) => {
1387
+ M({ ...z, currentFilter: x, activeFilterIndex: B });
1388
1388
  }, G = () => {
1389
- }, de = (x, k) => {
1390
- d(x), n && n.gotoRecordByData(k);
1389
+ }, de = (x, B) => {
1390
+ d(x), r && r.gotoRecordByData(B);
1391
1391
  }, Ge = (x) => {
1392
- if (n) {
1393
- const k = n.getOptions();
1394
- k.filter = x, k.currentPage = ce, n.refreshData(k), z || fe();
1392
+ if (r) {
1393
+ const B = r.getOptions();
1394
+ B.filter = x, B.currentPage = ce, r.refreshData(B), k || fe();
1395
1395
  }
1396
1396
  }, O = (x) => {
1397
- if (n) {
1398
- const k = n.getOptions();
1399
- k.currentPage = x, n.refreshData(k), z || fe();
1397
+ if (r) {
1398
+ const B = r.getOptions();
1399
+ B.currentPage = x, r.refreshData(B), k || fe();
1400
1400
  }
1401
1401
  }, D = () => p === "normal" && f ? /* @__PURE__ */ e(
1402
- hn,
1402
+ ur,
1403
1403
  {
1404
1404
  searchableFields: f,
1405
1405
  onFilter: Ge,
1406
1406
  minFilterValueLength: 1
1407
1407
  }
1408
- ) : p === "advanced" ? /* @__PURE__ */ e(tn, { id: `profile_${o.componentName}`, onRender: Cn, children: /* @__PURE__ */ e(
1408
+ ) : p === "advanced" ? /* @__PURE__ */ e(tr, { id: `profile_${o.componentName}`, onRender: vr, children: /* @__PURE__ */ e(
1409
1409
  Dt,
1410
1410
  {
1411
1411
  id: o.componentName,
@@ -1413,17 +1413,17 @@ function Un({
1413
1413
  apiVersion: o.apiVersion,
1414
1414
  ref: Y,
1415
1415
  variant: R || j.variant,
1416
- expandedFilter: P.expandedFilter,
1416
+ expandedFilter: z.expandedFilter,
1417
1417
  persistenceDelegator: I,
1418
- currentFilter: P.currentFilter,
1419
- activeFilterIndex: P.activeFilterIndex,
1418
+ currentFilter: z.currentFilter,
1419
+ activeFilterIndex: z.activeFilterIndex,
1420
1420
  onSelectedFilter: se,
1421
1421
  onFilterChanged: Ae,
1422
1422
  onSearchByFilter: G,
1423
1423
  onToggleExpandedFilter: Pe,
1424
1424
  width: "660px",
1425
1425
  height: "170px",
1426
- children: r
1426
+ children: n
1427
1427
  }
1428
1428
  ) }) : /* @__PURE__ */ e(qe, {}), Le = { ...{
1429
1429
  headerFlexGrow: "left",
@@ -1435,7 +1435,7 @@ function Un({
1435
1435
  resourceName: E,
1436
1436
  resourceDescription: te,
1437
1437
  requiredPermissions: ue,
1438
- fallbackComponent: ne,
1438
+ fallbackComponent: re,
1439
1439
  onSecurityReady: q?.onSecurityReady,
1440
1440
  onAccessDenied: q?.onAccessDenied,
1441
1441
  children: /* @__PURE__ */ e(
@@ -1444,14 +1444,14 @@ function Un({
1444
1444
  innerRef: W,
1445
1445
  width: l,
1446
1446
  height: s,
1447
- radius: A,
1447
+ radius: b,
1448
1448
  withBorder: H,
1449
1449
  isError: a,
1450
1450
  error: v,
1451
1451
  clearError: $,
1452
1452
  title: t,
1453
1453
  defaultDebug: h,
1454
- debugOptions: ie,
1454
+ debugOptions: le,
1455
1455
  style: L,
1456
1456
  options: Le,
1457
1457
  headerLeft: m?.visible !== !1 ? /* @__PURE__ */ c(Ce, { gap: "8px", rowGap: "8px", children: [
@@ -1475,7 +1475,7 @@ function Un({
1475
1475
  actionDescription: `Editar ${te || "registro"}`,
1476
1476
  color: "blue",
1477
1477
  leftSection: /* @__PURE__ */ e(At, {}),
1478
- disabled: !n.isBrowsing() || n.isEmpty(),
1478
+ disabled: !r.isBrowsing() || r.isEmpty(),
1479
1479
  variant: R ?? j.variant,
1480
1480
  onClick: () => m.onEditExecute(),
1481
1481
  children: m.labelEdit || g().t("archbase:Edit")
@@ -1487,8 +1487,8 @@ function Un({
1487
1487
  actionName: "delete",
1488
1488
  actionDescription: `Remover ${te || "registro"}`,
1489
1489
  color: "red",
1490
- leftSection: /* @__PURE__ */ e(rt, {}),
1491
- disabled: !n.isBrowsing() || n.isEmpty(),
1490
+ leftSection: /* @__PURE__ */ e(nt, {}),
1491
+ disabled: !r.isBrowsing() || r.isEmpty(),
1492
1492
  variant: R ?? j.variant,
1493
1493
  onClick: () => m.onRemoveExecute(),
1494
1494
  children: m.labelRemove || g().t("archbase:Remove")
@@ -1501,7 +1501,7 @@ function Un({
1501
1501
  actionDescription: `Visualizar ${te || "registro"}`,
1502
1502
  color: "gray.7",
1503
1503
  leftSection: /* @__PURE__ */ e(Rt, {}),
1504
- disabled: !n.isBrowsing() || n.isEmpty(),
1504
+ disabled: !r.isBrowsing() || r.isEmpty(),
1505
1505
  variant: R ?? j.variant,
1506
1506
  onClick: () => m.onViewExecute(),
1507
1507
  children: m.labelView || g().t("archbase:View")
@@ -1510,12 +1510,12 @@ function Un({
1510
1510
  m?.customUserActions && m?.customUserActionsPosition === "right" ? m.customUserActions : null
1511
1511
  ] }) : void 0,
1512
1512
  headerRight: D(),
1513
- footerRight: C ? /* @__PURE__ */ e(Nt, { total: n.getTotalPages(), onChange: O }) : void 0,
1513
+ footerRight: C ? /* @__PURE__ */ e(Nt, { total: r.getTotalPages(), onChange: O }) : void 0,
1514
1514
  children: /* @__PURE__ */ e(
1515
- an,
1515
+ or,
1516
1516
  {
1517
1517
  value: {
1518
- dataSource: n,
1518
+ dataSource: r,
1519
1519
  ownerId: T,
1520
1520
  handleSelectItem: de,
1521
1521
  activeBackgroundColor: X,
@@ -1523,7 +1523,7 @@ function Un({
1523
1523
  onItemEnter: ae,
1524
1524
  onItemLeave: Q
1525
1525
  },
1526
- children: /* @__PURE__ */ e(cn, { columnsCountBreakPoints: N, children: /* @__PURE__ */ e(sn, { gutter: V, columnsCount: b, children: Fe }) })
1526
+ children: /* @__PURE__ */ e(ar, { columnsCountBreakPoints: V, children: /* @__PURE__ */ e(cr, { gutter: P, columnsCount: w, children: Fe }) })
1527
1527
  }
1528
1528
  )
1529
1529
  }
@@ -1531,7 +1531,7 @@ function Un({
1531
1531
  }
1532
1532
  );
1533
1533
  }
1534
- const yn = {
1534
+ const Cr = {
1535
1535
  visible: !0,
1536
1536
  allowAdd: !0,
1537
1537
  allowEdit: !0,
@@ -1539,14 +1539,14 @@ const yn = {
1539
1539
  allowRemove: !0,
1540
1540
  positionCustomUserActions: "after"
1541
1541
  };
1542
- function Hn({
1542
+ function Ur({
1543
1543
  title: t,
1544
- dataSource: n,
1544
+ dataSource: r,
1545
1545
  // dataSourceEdition,
1546
1546
  filterOptions: o,
1547
1547
  //pageSize,
1548
1548
  filterFields: f,
1549
- innerRef: r,
1549
+ innerRef: n,
1550
1550
  //isLoading = false,
1551
1551
  isError: i = !1,
1552
1552
  error: h = "",
@@ -1560,12 +1560,12 @@ function Hn({
1560
1560
  children: H,
1561
1561
  radius: I,
1562
1562
  userActions: C,
1563
- debug: A = !1,
1563
+ debug: b = !1,
1564
1564
  variant: m,
1565
- actionsButtonsOptions: N,
1566
- spaceOptions: b,
1567
- style: V,
1568
- debugOptions: w,
1565
+ actionsButtonsOptions: V,
1566
+ spaceOptions: w,
1567
+ style: P,
1568
+ debugOptions: F,
1569
1569
  // Props de segurança (opcionais)
1570
1570
  resourceName: u,
1571
1571
  resourceDescription: X,
@@ -1575,7 +1575,7 @@ function Hn({
1575
1575
  }) {
1576
1576
  const L = Me(), _ = Ue({
1577
1577
  autoRegisterActions: Q?.autoRegisterActions ?? !0
1578
- }), R = r || Se(null), T = Se(null), [ie, E] = U({
1578
+ }), R = n || Se(null), T = Se(null), [le, E] = U({
1579
1579
  activeFilterIndex: -1,
1580
1580
  expandedFilter: !1
1581
1581
  }), {
@@ -1583,10 +1583,10 @@ function Hn({
1583
1583
  v1State: { forceUpdate: ue }
1584
1584
  } = We(
1585
1585
  "ArchbasePanelTemplate",
1586
- n
1587
- ), ne = Je(() => {
1588
- const d = { ...yn, ...C }, P = (we) => _.isAvailable ? (_.registerAction(), _.hasPermission()) : !0, M = [];
1589
- return d.allowAdd && d.onAddExecute && P() && M.push({
1586
+ r
1587
+ ), re = Je(() => {
1588
+ const d = { ...Cr, ...C }, z = (we) => _.isAvailable ? (_.registerAction(), _.hasPermission()) : !0, M = [];
1589
+ return d.allowAdd && d.onAddExecute && z() && M.push({
1590
1590
  id: "1",
1591
1591
  icon: /* @__PURE__ */ e(Ft, {}),
1592
1592
  color: "green",
@@ -1596,7 +1596,7 @@ function Hn({
1596
1596
  },
1597
1597
  enabled: !0,
1598
1598
  hint: "Clique para criar."
1599
- }), d.allowEdit && d.onEditExecute && P() && M.push({
1599
+ }), d.allowEdit && d.onEditExecute && z() && M.push({
1600
1600
  id: "2",
1601
1601
  icon: /* @__PURE__ */ e(At, {}),
1602
1602
  color: "blue",
@@ -1604,19 +1604,19 @@ function Hn({
1604
1604
  executeAction: () => {
1605
1605
  d && d.onEditExecute && d.onEditExecute();
1606
1606
  },
1607
- enabled: !n.isEmpty() && n.isBrowsing(),
1607
+ enabled: !r.isEmpty() && r.isBrowsing(),
1608
1608
  hint: "Clique para editar."
1609
- }), d.allowRemove && d.onRemoveExecute && P() && M.push({
1609
+ }), d.allowRemove && d.onRemoveExecute && z() && M.push({
1610
1610
  id: "3",
1611
- icon: /* @__PURE__ */ e(rt, {}),
1611
+ icon: /* @__PURE__ */ e(nt, {}),
1612
1612
  color: "red",
1613
1613
  label: d.labelRemove ? d.labelRemove : g().t("archbase:Remove"),
1614
1614
  executeAction: () => {
1615
1615
  d && d.onRemoveExecute && d.onRemoveExecute();
1616
1616
  },
1617
- enabled: !n.isEmpty() && n.isBrowsing(),
1617
+ enabled: !r.isEmpty() && r.isBrowsing(),
1618
1618
  hint: "Clique para remover."
1619
- }), d.allowView && d.onView && P() && M.push({
1619
+ }), d.allowView && d.onView && z() && M.push({
1620
1620
  id: "4",
1621
1621
  icon: /* @__PURE__ */ e(Rt, {}),
1622
1622
  color: "green",
@@ -1624,15 +1624,15 @@ function Hn({
1624
1624
  executeAction: () => {
1625
1625
  d && d.onView && d.onView();
1626
1626
  },
1627
- enabled: !n.isEmpty() && n.isBrowsing(),
1627
+ enabled: !r.isEmpty() && r.isBrowsing(),
1628
1628
  hint: "Clique para visualizar."
1629
1629
  }), d.customUserActions && d.positionCustomUserActions === "before" ? [...d.customUserActions, ...M] : d.customUserActions && d.positionCustomUserActions === "after" ? [...M, ...d.customUserActions] : M;
1630
- }, [C, n, _]), q = (d, P) => {
1631
- E({ ...ie, currentFilter: d, activeFilterIndex: P });
1630
+ }, [C, r, _]), q = (d, z) => {
1631
+ E({ ...le, currentFilter: d, activeFilterIndex: z });
1632
1632
  }, j = (d) => {
1633
- E({ ...ie, expandedFilter: d });
1634
- }, J = (d, P) => {
1635
- E({ ...ie, currentFilter: d, activeFilterIndex: P });
1633
+ E({ ...le, expandedFilter: d });
1634
+ }, J = (d, z) => {
1635
+ E({ ...le, currentFilter: d, activeFilterIndex: z });
1636
1636
  }, W = () => {
1637
1637
  }, Y = {
1638
1638
  menuButtonColor: "blue.5",
@@ -1641,7 +1641,7 @@ function Hn({
1641
1641
  headerFlexGrow: "left",
1642
1642
  footerFlexGrow: "right"
1643
1643
  // footerGridColumns: {},
1644
- }, be = { ...Y, ...N }, le = { ...ce, ...b };
1644
+ }, be = { ...Y, ...V }, ne = { ...ce, ...w };
1645
1645
  return /* @__PURE__ */ e(
1646
1646
  He,
1647
1647
  {
@@ -1663,11 +1663,11 @@ function Hn({
1663
1663
  error: h,
1664
1664
  clearError: p,
1665
1665
  title: t,
1666
- defaultDebug: A,
1667
- debugOptions: w,
1668
- style: V,
1669
- options: le,
1670
- headerLeft: /* @__PURE__ */ e(dn, { actions: ne, options: be }),
1666
+ defaultDebug: b,
1667
+ debugOptions: F,
1668
+ style: P,
1669
+ options: ne,
1670
+ headerLeft: /* @__PURE__ */ e(sr, { actions: re, options: be }),
1671
1671
  headerRight: /* @__PURE__ */ e(
1672
1672
  Dt,
1673
1673
  {
@@ -1676,10 +1676,10 @@ function Hn({
1676
1676
  apiVersion: o.apiVersion,
1677
1677
  ref: T,
1678
1678
  variant: m || L.variant,
1679
- expandedFilter: ie.expandedFilter,
1679
+ expandedFilter: le.expandedFilter,
1680
1680
  persistenceDelegator: l,
1681
- currentFilter: ie.currentFilter,
1682
- activeFilterIndex: ie.activeFilterIndex,
1681
+ currentFilter: le.currentFilter,
1682
+ activeFilterIndex: le.activeFilterIndex,
1683
1683
  onSelectedFilter: J,
1684
1684
  onFilterChanged: q,
1685
1685
  onSearchByFilter: W,
@@ -1696,16 +1696,16 @@ function Hn({
1696
1696
  }
1697
1697
  );
1698
1698
  }
1699
- function _n() {
1699
+ function Hr() {
1700
1700
  return /* @__PURE__ */ e("div", { children: "SEARCH TEMPLATE" });
1701
1701
  }
1702
- function qn({
1702
+ function _r({
1703
1703
  // Header
1704
1704
  title: t,
1705
- subtitle: n,
1705
+ subtitle: r,
1706
1706
  onBack: o,
1707
1707
  headerActions: f,
1708
- showDeleteButton: r = !1,
1708
+ showDeleteButton: n = !1,
1709
1709
  onDelete: i,
1710
1710
  saveLabel: h,
1711
1711
  cancelLabel: p,
@@ -1719,13 +1719,13 @@ function qn({
1719
1719
  formSubtitle: H,
1720
1720
  statusBadge: I,
1721
1721
  tabs: C,
1722
- defaultTab: A,
1722
+ defaultTab: b,
1723
1723
  tabsVariant: m = "outline",
1724
- children: N,
1724
+ children: V,
1725
1725
  // Layout
1726
- width: b = "100%",
1727
- height: V = "100%",
1728
- withBorder: w = !0,
1726
+ width: w = "100%",
1727
+ height: P = "100%",
1728
+ withBorder: F = !0,
1729
1729
  radius: u,
1730
1730
  style: X,
1731
1731
  // States
@@ -1737,13 +1737,13 @@ function qn({
1737
1737
  error: R = "",
1738
1738
  clearError: T = () => {
1739
1739
  },
1740
- autoCloseAlertError: ie = 15e3,
1740
+ autoCloseAlertError: le = 15e3,
1741
1741
  // DataSource
1742
1742
  dataSource: E,
1743
1743
  variant: te,
1744
1744
  // Callbacks
1745
1745
  onSave: ue,
1746
- onCancel: ne,
1746
+ onCancel: re,
1747
1747
  onBeforeSave: q,
1748
1748
  onAfterSave: j,
1749
1749
  onBeforeCancel: J,
@@ -1752,16 +1752,16 @@ function qn({
1752
1752
  // Navigation
1753
1753
  routePath: ce,
1754
1754
  onBeforeClose: be,
1755
- useNavigationListener: le,
1755
+ useNavigationListener: ne,
1756
1756
  // Security
1757
1757
  resourceName: d,
1758
- resourceDescription: P,
1758
+ resourceDescription: z,
1759
1759
  requiredPermissions: M,
1760
1760
  fallbackComponent: we,
1761
1761
  securityOptions: he,
1762
- ...z
1762
+ ...k
1763
1763
  }) {
1764
- const fe = Me(), [Fe, Ae] = U(_), [Pe, se] = U(R), [G, de] = U(A || (C?.[0]?.value ?? null)), Ge = dt();
1764
+ const fe = Me(), [Fe, Ae] = U(_), [Pe, se] = U(R), [G, de] = U(b || (C?.[0]?.value ?? null)), Ge = dt();
1765
1765
  Ue({
1766
1766
  autoRegisterActions: he?.autoRegisterActions ?? !0
1767
1767
  });
@@ -1780,9 +1780,9 @@ function qn({
1780
1780
  const D = Pt(), $e = Z((y, ye) => ({
1781
1781
  closeAllowed: (Ne) => {
1782
1782
  }
1783
- }), []), Le = le || $e, { closeAllowed: x } = Le(ce || "", () => {
1783
+ }), []), Le = ne || $e, { closeAllowed: x } = Le(ce || "", () => {
1784
1784
  be && be() === !1 || x();
1785
- }), k = async (y) => {
1785
+ }), B = async (y) => {
1786
1786
  try {
1787
1787
  ue ? ue(y) : (q && await q(y), E.isBrowsing() || E.save().then(() => {
1788
1788
  D?.clearAll(), j && j(y), x();
@@ -1794,13 +1794,13 @@ function qn({
1794
1794
  }
1795
1795
  }, ke = () => {
1796
1796
  try {
1797
- ne ? ne(x) : (J && J(), E.isBrowsing() || E.cancel(), D?.clearAll(), W && W(), x());
1797
+ re ? re(x) : (J && J(), E.isBrowsing() || E.cancel(), D?.clearAll(), W && W(), x());
1798
1798
  } catch (y) {
1799
1799
  Y && Y(xe(y)), Ae(!0), se(xe(y));
1800
1800
  }
1801
1801
  }, me = () => {
1802
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", re = () => /* @__PURE__ */ e(oe, { gap: "sm", children: De ? /* @__PURE__ */ c(qe, { children: [
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: [
1804
1804
  /* @__PURE__ */ e(
1805
1805
  K,
1806
1806
  {
@@ -1817,9 +1817,9 @@ function qn({
1817
1817
  K,
1818
1818
  {
1819
1819
  actionName: "save",
1820
- actionDescription: `Salvar ${P || "registro"}`,
1820
+ actionDescription: `Salvar ${z || "registro"}`,
1821
1821
  leftSection: /* @__PURE__ */ e(Ct, { size: 16 }),
1822
- onClick: () => k(E.getCurrentRecord()),
1822
+ onClick: () => B(E.getCurrentRecord()),
1823
1823
  variant: te ?? fe.variant,
1824
1824
  color: "blue",
1825
1825
  loading: L,
@@ -1841,7 +1841,7 @@ function qn({
1841
1841
  He,
1842
1842
  {
1843
1843
  resourceName: d,
1844
- resourceDescription: P,
1844
+ resourceDescription: z,
1845
1845
  requiredPermissions: M,
1846
1846
  fallbackComponent: we,
1847
1847
  onSecurityReady: he?.onSecurityReady,
@@ -1850,11 +1850,11 @@ function qn({
1850
1850
  _e,
1851
1851
  {
1852
1852
  ref: ee,
1853
- withBorder: w,
1853
+ withBorder: F,
1854
1854
  radius: u,
1855
1855
  style: {
1856
- width: b,
1857
- height: V,
1856
+ width: w,
1857
+ height: P,
1858
1858
  display: "flex",
1859
1859
  flexDirection: "column",
1860
1860
  ...X
@@ -1883,7 +1883,7 @@ function qn({
1883
1883
  ),
1884
1884
  /* @__PURE__ */ c(pe, { children: [
1885
1885
  /* @__PURE__ */ e(Bt, { order: 4, fw: 600, children: t }),
1886
- n && /* @__PURE__ */ e(Re, { size: "sm", c: "dimmed", children: n })
1886
+ r && /* @__PURE__ */ e(Re, { size: "sm", c: "dimmed", children: r })
1887
1887
  ] })
1888
1888
  ] }),
1889
1889
  /* @__PURE__ */ c(oe, { gap: "sm", children: [
@@ -1900,7 +1900,7 @@ function qn({
1900
1900
  },
1901
1901
  y.id
1902
1902
  )),
1903
- r && i && /* @__PURE__ */ e(
1903
+ n && i && /* @__PURE__ */ e(
1904
1904
  vt,
1905
1905
  {
1906
1906
  variant: "subtle",
@@ -1908,10 +1908,10 @@ function qn({
1908
1908
  size: "lg",
1909
1909
  onClick: i,
1910
1910
  style: { border: "1px solid var(--mantine-color-gray-3)" },
1911
- children: /* @__PURE__ */ e(rt, { size: 18 })
1911
+ children: /* @__PURE__ */ e(nt, { size: 18 })
1912
1912
  }
1913
1913
  ),
1914
- ge && re()
1914
+ ge && ie()
1915
1915
  ] })
1916
1916
  ] })
1917
1917
  }
@@ -1919,7 +1919,7 @@ function qn({
1919
1919
  Fe && /* @__PURE__ */ e(pe, { style: { flexShrink: 0, padding: "0 24px" }, children: /* @__PURE__ */ e(
1920
1920
  Qe,
1921
1921
  {
1922
- autoClose: ie,
1922
+ autoClose: le,
1923
1923
  withCloseButton: !0,
1924
1924
  withBorder: !0,
1925
1925
  icon: /* @__PURE__ */ e(Ke, { size: "1.4rem" }),
@@ -1991,7 +1991,7 @@ function qn({
1991
1991
  ))
1992
1992
  ]
1993
1993
  }
1994
- ) : /* @__PURE__ */ e(Ze, { style: { flex: 1, padding: "20px" }, children: N }) })
1994
+ ) : /* @__PURE__ */ e(Ze, { style: { flex: 1, padding: "20px" }, children: V }) })
1995
1995
  ]
1996
1996
  }
1997
1997
  ) })
@@ -2007,7 +2007,7 @@ function qn({
2007
2007
  display: "flex",
2008
2008
  justifyContent: "flex-end"
2009
2009
  },
2010
- children: re()
2010
+ children: ie()
2011
2011
  }
2012
2012
  )
2013
2013
  ]
@@ -2016,20 +2016,20 @@ function qn({
2016
2016
  }
2017
2017
  );
2018
2018
  }
2019
- function Jn({ title: t, description: n, headerAction: o, children: f }) {
2019
+ function qr({ title: t, description: r, headerAction: o, children: f }) {
2020
2020
  return /* @__PURE__ */ c(_e, { withBorder: !0, radius: "md", p: "md", children: [
2021
- /* @__PURE__ */ c(Ce, { justify: "space-between", align: "flex-start", mb: n || o ? "sm" : 0, children: [
2021
+ /* @__PURE__ */ c(Ce, { justify: "space-between", align: "flex-start", mb: r || o ? "sm" : 0, children: [
2022
2022
  /* @__PURE__ */ c(pe, { children: [
2023
2023
  /* @__PURE__ */ e(Re, { fw: 600, size: "sm", children: t }),
2024
- n && /* @__PURE__ */ e(Re, { size: "xs", c: "dimmed", mt: 2, children: n })
2024
+ r && /* @__PURE__ */ e(Re, { size: "xs", c: "dimmed", mt: 2, children: r })
2025
2025
  ] }),
2026
2026
  o
2027
2027
  ] }),
2028
2028
  f
2029
2029
  ] });
2030
2030
  }
2031
- function Wn({ images: t, onAddImage: n, onRemoveImage: o, onSetCover: f, maxImages: r = 6 }) {
2032
- const i = t.find((a) => a.isCover) || t[0], h = t.filter((a) => a.id !== i?.id), p = t.length < r;
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
2033
  return /* @__PURE__ */ c(wt, { gap: "sm", children: [
2034
2034
  i && /* @__PURE__ */ c(pe, { style: { position: "relative" }, children: [
2035
2035
  /* @__PURE__ */ e(
@@ -2078,10 +2078,10 @@ function Wn({ images: t, onAddImage: n, onRemoveImage: o, onSetCover: f, maxImag
2078
2078
  )
2079
2079
  }
2080
2080
  ) }, a.id)),
2081
- p && n && /* @__PURE__ */ e(Ee.Col, { span: 4, children: /* @__PURE__ */ e(
2081
+ p && r && /* @__PURE__ */ e(Ee.Col, { span: 4, children: /* @__PURE__ */ e(
2082
2082
  pe,
2083
2083
  {
2084
- onClick: n,
2084
+ onClick: r,
2085
2085
  style: {
2086
2086
  width: "100%",
2087
2087
  height: 80,
@@ -2099,12 +2099,12 @@ function Wn({ images: t, onAddImage: n, onRemoveImage: o, onSetCover: f, maxImag
2099
2099
  ] })
2100
2100
  ] });
2101
2101
  }
2102
- function bn(t, n) {
2102
+ function yr(t, r) {
2103
2103
  const {
2104
2104
  // Props obrigatórias
2105
2105
  opened: o,
2106
2106
  title: f,
2107
- children: r,
2107
+ children: n,
2108
2108
  onClose: i,
2109
2109
  idField: h,
2110
2110
  displayField: p,
@@ -2118,13 +2118,13 @@ function bn(t, n) {
2118
2118
  onAfterConfirm: I,
2119
2119
  // DataSource
2120
2120
  dataSource: C,
2121
- loadData: A,
2121
+ loadData: b,
2122
2122
  loadDataPaged: m,
2123
- searchFields: N = "",
2124
- pageSize: b = 100,
2123
+ searchFields: V = "",
2124
+ pageSize: w = 100,
2125
2125
  // Aparência
2126
- displaySubField: V,
2127
- renderSelectedItem: w,
2126
+ displaySubField: P,
2127
+ renderSelectedItem: F,
2128
2128
  renderSelectedItems: u,
2129
2129
  icon: X,
2130
2130
  modalSize: ee = "70%",
@@ -2135,12 +2135,12 @@ function bn(t, n) {
2135
2135
  showSelectionIndicator: R = !0,
2136
2136
  // Múltipla seleção
2137
2137
  maxSelections: T,
2138
- showSelectionCount: ie = !0,
2138
+ showSelectionCount: le = !0,
2139
2139
  allowClearAll: E = !0,
2140
2140
  // Estado
2141
2141
  isLoading: te,
2142
2142
  isError: ue = !1,
2143
- error: ne = "",
2143
+ error: re = "",
2144
2144
  clearError: q,
2145
2145
  autoCloseAlertError: j = 15e3,
2146
2146
  onError: J,
@@ -2150,33 +2150,33 @@ function bn(t, n) {
2150
2150
  variant: ce,
2151
2151
  // Segurança
2152
2152
  resourceName: be,
2153
- resourceDescription: le,
2153
+ resourceDescription: ne,
2154
2154
  requiredPermissions: d,
2155
- fallbackComponent: P,
2155
+ fallbackComponent: z,
2156
2156
  securityOptions: M
2157
- } = t, we = Me(), he = ut(), { colorScheme: z } = st(), fe = z === "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), [k, ke] = U(""), me = Se(null), Be = Se([]), De = !!m && !C, ge = !!C, re = Z(() => ge && C ? C : (me.current || (me.current = new rn("dsLookup", {
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", {
2158
2158
  records: [],
2159
2159
  grandTotalRecords: 0,
2160
2160
  currentPage: 0,
2161
2161
  totalPages: 0,
2162
- pageSize: b
2163
- })), me.current), [ge, C, b])();
2162
+ pageSize: w
2163
+ })), me.current), [ge, C, w])();
2164
2164
  Ue({
2165
2165
  autoRegisterActions: M?.autoRegisterActions ?? !0
2166
2166
  });
2167
2167
  const y = We(
2168
2168
  "ArchbaseLookupDataTemplate",
2169
- re,
2169
+ ie,
2170
2170
  void 0,
2171
2171
  void 0
2172
2172
  );
2173
2173
  it({
2174
- dataSource: re,
2175
- listener: (F) => {
2176
- if (F.type === Ie.onError && (O(!0), $e(F.error || "")), F.type === Ie.afterScroll) {
2174
+ dataSource: ie,
2175
+ listener: (A) => {
2176
+ if (A.type === Ie.onError && (O(!0), $e(A.error || "")), A.type === Ie.afterScroll) {
2177
2177
  if (a === "single") {
2178
- const B = re.getCurrentRecord();
2179
- B && de([B]);
2178
+ const N = ie.getCurrentRecord();
2179
+ N && de([N]);
2180
2180
  }
2181
2181
  y.isDataSourceV2 || Fe();
2182
2182
  }
@@ -2192,18 +2192,18 @@ function bn(t, n) {
2192
2192
  itemsSelected: g().t("archbase:items selected"),
2193
2193
  ...Y
2194
2194
  }, Ne = Z(
2195
- async (F, B) => {
2195
+ async (A, N) => {
2196
2196
  if (!(ge || !m)) {
2197
2197
  se(!0);
2198
2198
  try {
2199
- const Ve = await m(F, b, B, N);
2200
- re.open({
2199
+ const Ve = await m(A, w, N, V);
2200
+ ie.open({
2201
2201
  records: Ve.content,
2202
2202
  grandTotalRecords: Ve.totalElements,
2203
- currentPage: F,
2203
+ currentPage: A,
2204
2204
  totalPages: Ve.totalPages,
2205
- pageSize: b
2206
- }), x(F);
2205
+ pageSize: w
2206
+ }), x(A);
2207
2207
  } catch (Ve) {
2208
2208
  O(!0), $e(xe(Ve)), J?.(Ve);
2209
2209
  } finally {
@@ -2211,52 +2211,52 @@ function bn(t, n) {
2211
2211
  }
2212
2212
  }
2213
2213
  },
2214
- [ge, m, N, b, re, J]
2214
+ [ge, m, V, w, ie, J]
2215
2215
  ), je = Z(
2216
- async (F) => {
2216
+ async (A) => {
2217
2217
  if (De)
2218
- return Ne(0, F);
2219
- if (!(ge || !A)) {
2218
+ return Ne(0, A);
2219
+ if (!(ge || !b)) {
2220
2220
  se(!0);
2221
2221
  try {
2222
- const B = await A(F, N);
2223
- Be.current = B, re.open({
2224
- records: B,
2225
- grandTotalRecords: B.length,
2222
+ const N = await b(A, V);
2223
+ Be.current = N, ie.open({
2224
+ records: N,
2225
+ grandTotalRecords: N.length,
2226
2226
  currentPage: 0,
2227
- totalPages: Math.ceil(B.length / b),
2228
- pageSize: b
2227
+ totalPages: Math.ceil(N.length / w),
2228
+ pageSize: w
2229
2229
  });
2230
- } catch (B) {
2231
- O(!0), $e(xe(B)), J?.(B);
2230
+ } catch (N) {
2231
+ O(!0), $e(xe(N)), J?.(N);
2232
2232
  } finally {
2233
2233
  se(!1);
2234
2234
  }
2235
2235
  }
2236
2236
  },
2237
- [ge, De, A, Ne, N, b, re, J]
2237
+ [ge, De, b, Ne, V, w, ie, J]
2238
2238
  ), gt = Z(
2239
- (F) => {
2240
- const B = F?.quickFilterValues?.[0] || "";
2241
- if (ke(B), De) {
2242
- Ne(0, B);
2239
+ (A) => {
2240
+ const N = A?.quickFilterValues?.[0] || "";
2241
+ if (ke(N), De) {
2242
+ Ne(0, N);
2243
2243
  return;
2244
2244
  }
2245
- A && !ge && je(B);
2245
+ b && !ge && je(N);
2246
2246
  },
2247
- [A, De, ge, je, Ne]
2247
+ [b, De, ge, je, Ne]
2248
2248
  );
2249
- nt(() => {
2249
+ rt(() => {
2250
2250
  if (ge)
2251
2251
  return;
2252
- const F = (B) => {
2253
- const Ve = B?.currentPage ?? 0, kt = B?.pageSize ?? b;
2252
+ const A = (N) => {
2253
+ const Ve = N?.currentPage ?? 0, kt = N?.pageSize ?? w;
2254
2254
  if (De) {
2255
- Ne(Ve, k);
2255
+ Ne(Ve, B);
2256
2256
  return;
2257
2257
  }
2258
2258
  const ot = Be.current;
2259
- ot.length !== 0 && re.open({
2259
+ ot.length !== 0 && ie.open({
2260
2260
  records: ot,
2261
2261
  grandTotalRecords: ot.length,
2262
2262
  currentPage: Ve,
@@ -2264,27 +2264,27 @@ function bn(t, n) {
2264
2264
  pageSize: kt
2265
2265
  });
2266
2266
  };
2267
- return re.emitter.on("refreshData", F), () => {
2268
- re.emitter.off("refreshData", F);
2267
+ return ie.emitter.on("refreshData", A), () => {
2268
+ ie.emitter.off("refreshData", A);
2269
2269
  };
2270
- }, [ge, De, re, b, k, Ne]), nt(() => {
2270
+ }, [ge, De, ie, w, B, Ne]), rt(() => {
2271
2271
  o && (l?.length ? de(l) : de([]), je());
2272
- }, [o]), nt(() => {
2272
+ }, [o]), rt(() => {
2273
2273
  l && de(l);
2274
2274
  }, [l]);
2275
2275
  const Xe = Z(
2276
- (F) => {
2277
- a === "single" ? de(F.slice(0, 1)) : T && F.length > T ? de(F.slice(0, T)) : de(F);
2276
+ (A) => {
2277
+ a === "single" ? de(A.slice(0, 1)) : T && A.length > T ? de(A.slice(0, T)) : de(A);
2278
2278
  },
2279
2279
  [a, T]
2280
2280
  ), pt = Z(
2281
- (F) => {
2281
+ (A) => {
2282
2282
  if (a === "single" && s) {
2283
- const B = re.getCurrentRecord();
2284
- B && (v?.(B), i());
2283
+ const N = ie.getCurrentRecord();
2284
+ N && (v?.(N), i());
2285
2285
  }
2286
2286
  },
2287
- [a, s, re, v, i]
2287
+ [a, s, ie, v, i]
2288
2288
  ), xt = Z(() => {
2289
2289
  de([]);
2290
2290
  }, []), Ye = Z(async () => {
@@ -2297,43 +2297,43 @@ function bn(t, n) {
2297
2297
  q?.(), O(!1), $e("");
2298
2298
  };
2299
2299
  Gt(
2300
- n,
2300
+ r,
2301
2301
  () => ({
2302
2302
  getSelectedItems: () => G,
2303
2303
  getSelectedItem: () => G[0] || null,
2304
2304
  clearSelection: () => de([]),
2305
- selectItems: (F) => Xe(F),
2306
- selectItem: (F) => de([F]),
2307
- deselectItem: (F) => {
2308
- de((B) => B.filter((Ve) => Ve[h] !== F[h]));
2305
+ selectItems: (A) => Xe(A),
2306
+ selectItem: (A) => de([A]),
2307
+ deselectItem: (A) => {
2308
+ de((N) => N.filter((Ve) => Ve[h] !== A[h]));
2309
2309
  },
2310
2310
  refreshData: () => je(),
2311
- getDataSource: () => re,
2311
+ getDataSource: () => ie,
2312
2312
  confirmSelection: async () => {
2313
2313
  await Ye();
2314
2314
  },
2315
2315
  cancelSelection: S
2316
2316
  }),
2317
- [G, Xe, h, je, re, Ye, S]
2317
+ [G, Xe, h, je, ie, Ye, S]
2318
2318
  );
2319
2319
  const Ut = Z(
2320
- (F) => {
2321
- const B = F[h];
2322
- return B !== void 0 ? B : "";
2320
+ (A) => {
2321
+ const N = A[h];
2322
+ return N !== void 0 ? N : "";
2323
2323
  },
2324
2324
  [h]
2325
- ), Ht = te || Pe, _t = ne || D, qt = ue || Ge, Jt = /* @__PURE__ */ c(oe, { gap: "sm", children: [
2325
+ ), Ht = te || Pe, _t = re || D, qt = ue || Ge, Jt = /* @__PURE__ */ c(oe, { gap: "sm", children: [
2326
2326
  X,
2327
2327
  /* @__PURE__ */ e(Re, { fw: 600, children: f })
2328
2328
  ] }), Wt = () => {
2329
2329
  if (!R)
2330
2330
  return null;
2331
- if (a === "single" && G.length > 0 && w)
2332
- return w(G[0]);
2331
+ if (a === "single" && G.length > 0 && F)
2332
+ return F(G[0]);
2333
2333
  if (a === "multiple" && G.length > 0 && u)
2334
2334
  return u(G);
2335
2335
  if (a === "single" && G.length > 0) {
2336
- const F = G[0];
2336
+ const A = G[0];
2337
2337
  return /* @__PURE__ */ e(_e, { withBorder: !0, p: "sm", radius: "md", bg: Ae, children: /* @__PURE__ */ c(oe, { justify: "space-between", children: [
2338
2338
  /* @__PURE__ */ c(oe, { gap: "xs", children: [
2339
2339
  /* @__PURE__ */ e(et, { size: 16, color: "green" }),
@@ -2341,8 +2341,8 @@ function bn(t, n) {
2341
2341
  ye.selectedLabel,
2342
2342
  ":"
2343
2343
  ] }),
2344
- /* @__PURE__ */ e(Re, { size: "sm", fw: 600, children: String(F[p]) }),
2345
- V && /* @__PURE__ */ e(Re, { size: "sm", c: fe ? "gray.4" : "dimmed", children: String(F[V] || "") })
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] || "") })
2346
2346
  ] }),
2347
2347
  /* @__PURE__ */ e(Re, { size: "xs", c: fe ? "gray.4" : "dimmed", children: ye.doubleClickHint })
2348
2348
  ] }) });
@@ -2362,7 +2362,7 @@ function bn(t, n) {
2362
2362
  size: "xs",
2363
2363
  variant: "subtle",
2364
2364
  color: "red",
2365
- leftSection: /* @__PURE__ */ e(rt, { size: 14 }),
2365
+ leftSection: /* @__PURE__ */ e(nt, { size: 14 }),
2366
2366
  onClick: xt,
2367
2367
  children: ye.clearButton
2368
2368
  }
@@ -2373,9 +2373,9 @@ function bn(t, n) {
2373
2373
  He,
2374
2374
  {
2375
2375
  resourceName: be,
2376
- resourceDescription: le,
2376
+ resourceDescription: ne,
2377
2377
  requiredPermissions: d,
2378
- fallbackComponent: P,
2378
+ fallbackComponent: z,
2379
2379
  onSecurityReady: M?.onSecurityReady,
2380
2380
  onAccessDenied: M?.onAccessDenied,
2381
2381
  children: /* @__PURE__ */ e(
@@ -2390,7 +2390,7 @@ function bn(t, n) {
2390
2390
  closeOnClickOutside: !1,
2391
2391
  withCloseButton: !1,
2392
2392
  overlayProps: {
2393
- color: z === "dark" ? he.colors.dark[7] : he.colors.gray[6],
2393
+ color: k === "dark" ? he.colors.dark[7] : he.colors.gray[6],
2394
2394
  opacity: 0.25
2395
2395
  },
2396
2396
  children: /* @__PURE__ */ c(ht, { height: ae, children: [
@@ -2413,7 +2413,7 @@ function bn(t, n) {
2413
2413
  /* @__PURE__ */ e(
2414
2414
  Lt,
2415
2415
  {
2416
- dataSource: re,
2416
+ dataSource: ie,
2417
2417
  height: Q,
2418
2418
  rowHeight: L,
2419
2419
  withBorder: !0,
@@ -2429,7 +2429,7 @@ function bn(t, n) {
2429
2429
  onCellDoubleClick: pt,
2430
2430
  onSelectedRowsChanged: a === "multiple" ? Xe : void 0,
2431
2431
  onFilterModelChange: gt,
2432
- children: r
2432
+ children: n
2433
2433
  }
2434
2434
  ),
2435
2435
  Wt()
@@ -2470,50 +2470,50 @@ function bn(t, n) {
2470
2470
  }
2471
2471
  );
2472
2472
  }
2473
- const On = zt(bn), Tt = nn(void 0);
2474
- function Kn({ children: t }) {
2475
- const [n, o] = U({}), f = Z((p, a) => {
2473
+ const Wr = zt(yr), Tt = rr(void 0);
2474
+ function Or({ children: t }) {
2475
+ const [r, o] = U({}), f = Z((p, a) => {
2476
2476
  o((v) => ({ ...v, [p]: a }));
2477
- }, []), r = Z((p) => {
2477
+ }, []), n = Z((p) => {
2478
2478
  o((a) => {
2479
2479
  const v = { ...a };
2480
2480
  return delete v[p], v;
2481
2481
  });
2482
2482
  }, []), i = Z(() => {
2483
2483
  o({});
2484
- }, []), h = Z((p) => n[p], [n]);
2485
- return /* @__PURE__ */ e(Tt.Provider, { value: { errors: n, setError: f, clearError: r, clearAll: i, getError: h }, children: t });
2484
+ }, []), h = Z((p) => r[p], [r]);
2485
+ return /* @__PURE__ */ e(Tt.Provider, { value: { errors: r, setError: f, clearError: n, clearAll: i, getError: h }, children: t });
2486
2486
  }
2487
- function Qn() {
2487
+ function Kr() {
2488
2488
  return $t(Tt);
2489
2489
  }
2490
- function Xn() {
2490
+ function Qr() {
2491
2491
  const t = $t(Tt);
2492
2492
  if (!t)
2493
2493
  throw new Error("useRequiredValidationErrors must be used within ValidationErrorsProvider");
2494
2494
  return t;
2495
2495
  }
2496
2496
  export {
2497
- zn as ArchbaseAdvancedSmartButton,
2497
+ Pr as ArchbaseAdvancedSmartButton,
2498
2498
  He as ArchbaseConditionalSecurityWrapper,
2499
- Ln as ArchbaseFormModalTemplate,
2500
- $n as ArchbaseFormTemplate,
2501
- Mn as ArchbaseGridTemplate,
2502
- On as ArchbaseLookupDataTemplate,
2503
- Un as ArchbaseMasonryTemplate,
2504
- jn as ArchbaseModalTemplate,
2505
- Hn as ArchbasePanelTemplate,
2506
- _n as ArchbaseSearchTemplate,
2499
+ $r as ArchbaseFormModalTemplate,
2500
+ Gr as ArchbaseFormTemplate,
2501
+ jr as ArchbaseGridTemplate,
2502
+ Wr as ArchbaseLookupDataTemplate,
2503
+ Mr as ArchbaseMasonryTemplate,
2504
+ Lr as ArchbaseModalTemplate,
2505
+ Ur as ArchbasePanelTemplate,
2506
+ Hr as ArchbaseSearchTemplate,
2507
2507
  K as ArchbaseSmartActionButton,
2508
2508
  Mt as ArchbaseSpaceTemplate,
2509
- qn as ArchbaseTwoColumnFormTemplate,
2510
- Wn as FormImageGallery,
2511
- Jn as FormSectionCard,
2512
- Kn as ValidationErrorsProvider,
2513
- Pn as useArchbaseLookup,
2514
- Gn as useConditionalSecurity,
2509
+ _r as ArchbaseTwoColumnFormTemplate,
2510
+ Jr as FormImageGallery,
2511
+ qr as FormSectionCard,
2512
+ Or as ValidationErrorsProvider,
2513
+ Vr as useArchbaseLookup,
2514
+ zr as useConditionalSecurity,
2515
2515
  Ue as useOptionalTemplateSecurity,
2516
- Xn as useRequiredValidationErrors,
2517
- Vn as useTemplateSecurityAvailable,
2518
- Qn as useValidationErrors
2516
+ Qr as useRequiredValidationErrors,
2517
+ Nr as useTemplateSecurityAvailable,
2518
+ Kr as useValidationErrors
2519
2519
  };