@archbase/template 4.0.29 → 4.0.31

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,10 +1,10 @@
1
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";
2
+ import { Button as Oe, Paper as _e, Box as ge, Flex as ve, Group as oe, ActionIcon as bt, Title as Bt, Text as Ee, ScrollArea as Ze, LoadingOverlay as Ct, useMantineColorScheme as ct, Modal as yt, 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
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
- 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";
5
+ import { useArchbaseAppContext as Me, useValidationErrors as Pt, ValidationErrorsProvider as Et, getI18nextInstance as p, processErrorMessage as xe, useArchbaseTheme as ut, emit as Yt, useArchbaseTranslation as Zt } from "@archbase/core";
6
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";
7
+ import { useArchbaseV1V2Compatibility as We, useArchbaseDataSourceListener as it, DataSourceEventNames as ye, ArchbaseDataSource as nr } from "@archbase/data";
8
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";
@@ -34,7 +34,7 @@ function Vr(t) {
34
34
  onClose: a
35
35
  } = t || {}, [v, j] = H(!1), [l, c] = H(f), [_, D] = H(n), C = Z(() => {
36
36
  j(!0), x?.();
37
- }, [x]), b = Z(() => {
37
+ }, [x]), y = Z(() => {
38
38
  j(!1), a?.();
39
39
  }, [a]), m = Z(() => {
40
40
  c(null), D([]);
@@ -68,7 +68,7 @@ function Vr(t) {
68
68
  selectedItems: _,
69
69
  // Ações
70
70
  open: C,
71
- close: b,
71
+ close: y,
72
72
  clear: m,
73
73
  setSelectedItem: c,
74
74
  setSelectedItems: D,
@@ -134,7 +134,7 @@ function Gr({
134
134
  children: _,
135
135
  radius: D,
136
136
  variant: C,
137
- buttonsPosition: b = "footer",
137
+ buttonsPosition: y = "footer",
138
138
  saveLabel: m,
139
139
  cancelLabel: z,
140
140
  onBack: w,
@@ -172,7 +172,7 @@ function Gr({
172
172
  it({
173
173
  dataSource: u,
174
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());
175
+ T.type === ye.onError && (se(!0), ne(T.error)), T.type === ye.onFieldError && N && T.fieldName && T.error && N.setError(T.fieldName, T.error), (T.type === ye.afterEdit || T.type === ye.afterInsert) && ($.isDataSourceV2 || d());
176
176
  }
177
177
  });
178
178
  const Fe = Z((T, S) => ({
@@ -198,7 +198,7 @@ function Gr({
198
198
  }
199
199
  }, Re = () => {
200
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: [
201
+ }, Pe = u && !u.isBrowsing(), ce = y === "header" || y === "both", L = y === "footer" || y === "both", de = () => /* @__PURE__ */ e(oe, { gap: "sm", children: Pe ? /* @__PURE__ */ s(qe, { children: [
202
202
  /* @__PURE__ */ e(
203
203
  K,
204
204
  {
@@ -208,7 +208,7 @@ function Gr({
208
208
  onClick: Ae,
209
209
  variant: "default",
210
210
  loading: n,
211
- children: z || g().t("Cancel")
211
+ children: z || p().t("Cancel")
212
212
  }
213
213
  ),
214
214
  /* @__PURE__ */ e(
@@ -221,7 +221,7 @@ function Gr({
221
221
  variant: C ?? O.variant,
222
222
  color: "blue",
223
223
  loading: i,
224
- children: m || g().t("Ok")
224
+ children: m || p().t("Ok")
225
225
  }
226
226
  )
227
227
  ] }) : /* @__PURE__ */ e(
@@ -232,10 +232,10 @@ function Gr({
232
232
  leftSection: /* @__PURE__ */ e(ze, { size: 16 }),
233
233
  onClick: Ae,
234
234
  variant: "default",
235
- children: g().t("Close")
235
+ children: p().t("Close")
236
236
  }
237
237
  ) }), Ge = () => /* @__PURE__ */ s(
238
- pe,
238
+ ge,
239
239
  {
240
240
  style: {
241
241
  flexShrink: 0,
@@ -246,7 +246,7 @@ function Gr({
246
246
  gap: "1rem"
247
247
  },
248
248
  children: [
249
- G === "right" && F && /* @__PURE__ */ e(pe, { style: { flex: 1 }, children: F }),
249
+ G === "right" && F && /* @__PURE__ */ e(ge, { style: { flex: 1 }, children: F }),
250
250
  Pe ? /* @__PURE__ */ s(oe, { gap: "md", children: [
251
251
  /* @__PURE__ */ e(
252
252
  K,
@@ -258,7 +258,7 @@ function Gr({
258
258
  disabled: u && u.isBrowsing(),
259
259
  variant: C ?? O.variant,
260
260
  color: "green",
261
- children: m || `${g().t("Ok")}`
261
+ children: m || `${p().t("Ok")}`
262
262
  }
263
263
  ),
264
264
  /* @__PURE__ */ e(
@@ -271,7 +271,7 @@ function Gr({
271
271
  disabled: u && u.isBrowsing(),
272
272
  variant: C ?? O.variant,
273
273
  color: "red",
274
- children: z || `${g().t("Cancel")}`
274
+ children: z || `${p().t("Cancel")}`
275
275
  }
276
276
  )
277
277
  ] }) : /* @__PURE__ */ e(oe, { gap: "md", children: /* @__PURE__ */ e(
@@ -282,10 +282,10 @@ function Gr({
282
282
  leftSection: /* @__PURE__ */ e(ze, {}),
283
283
  onClick: Ae,
284
284
  variant: C ?? O.variant,
285
- children: `${g().t("Close")}`
285
+ children: `${p().t("Close")}`
286
286
  }
287
287
  ) }),
288
- (G === "left" || G === "center") && F && /* @__PURE__ */ e(pe, { style: { flex: G === "left" ? 1 : 0, textAlign: "right" }, children: F })
288
+ (G === "left" || G === "center") && F && /* @__PURE__ */ e(ge, { style: { flex: G === "left" ? 1 : 0, textAlign: "right" }, children: F })
289
289
  ]
290
290
  }
291
291
  );
@@ -313,27 +313,27 @@ function Gr({
313
313
  },
314
314
  children: [
315
315
  ce && /* @__PURE__ */ e(
316
- pe,
316
+ ge,
317
317
  {
318
318
  style: {
319
319
  flexShrink: 0,
320
320
  padding: "16px 24px",
321
- borderBottom: "1px solid var(--mantine-color-gray-2)"
321
+ borderBottom: "1px solid var(--mantine-color-default-border)"
322
322
  },
323
323
  children: /* @__PURE__ */ s(ve, { justify: "space-between", align: "center", children: [
324
324
  /* @__PURE__ */ s(oe, { gap: "md", children: [
325
325
  w && /* @__PURE__ */ e(
326
- yt,
326
+ bt,
327
327
  {
328
328
  variant: "subtle",
329
329
  color: "gray",
330
330
  size: "lg",
331
331
  onClick: w,
332
- style: { border: "1px solid var(--mantine-color-gray-3)" },
332
+ style: { border: "1px solid var(--mantine-color-default-border)" },
333
333
  children: /* @__PURE__ */ e(Vt, { size: 18 })
334
334
  }
335
335
  ),
336
- (r || o) && /* @__PURE__ */ s(pe, { children: [
336
+ (r || o) && /* @__PURE__ */ s(ge, { children: [
337
337
  r && /* @__PURE__ */ e(Bt, { order: 4, fw: 600, children: r }),
338
338
  o && /* @__PURE__ */ e(Ee, { size: "sm", c: "dimmed", children: o })
339
339
  ] })
@@ -342,14 +342,14 @@ function Gr({
342
342
  ] })
343
343
  }
344
344
  ),
345
- Y && /* @__PURE__ */ e(pe, { style: { flexShrink: 0, padding: ce ? "16px 24px 0" : void 0 }, children: /* @__PURE__ */ e(
345
+ Y && /* @__PURE__ */ e(ge, { style: { flexShrink: 0, padding: ce ? "16px 24px 0" : void 0 }, children: /* @__PURE__ */ e(
346
346
  Qe,
347
347
  {
348
348
  autoClose: v,
349
349
  withCloseButton: !0,
350
350
  withBorder: !0,
351
351
  icon: /* @__PURE__ */ e(Ke, { size: "1.4rem" }),
352
- title: g().t("WARNING"),
352
+ title: p().t("WARNING"),
353
353
  titleColor: "rgb(250, 82, 82)",
354
354
  variant: C ?? O.variant,
355
355
  onClose: Re,
@@ -394,7 +394,7 @@ function $r({
394
394
  height: _,
395
395
  userActions: D,
396
396
  onAfterSave: C,
397
- onClickOk: b,
397
+ onClickOk: y,
398
398
  onClickCancel: m,
399
399
  onBeforeOk: z,
400
400
  onCustomSave: w,
@@ -427,7 +427,7 @@ function $r({
427
427
  it({
428
428
  dataSource: c,
429
429
  listener: (B) => {
430
- B.type === be.onError && (J(!0), W(B.error)), (B.type === be.afterEdit || B.type === be.afterInsert) && (we.isDataSourceV2 || se());
430
+ B.type === ye.onError && (J(!0), W(B.error)), (B.type === ye.afterEdit || B.type === ye.afterInsert) && (we.isDataSourceV2 || se());
431
431
  }
432
432
  });
433
433
  const ne = async () => {
@@ -447,21 +447,21 @@ function $r({
447
447
  }, $ = async () => {
448
448
  if (w)
449
449
  c && w(c.getCurrentRecord(), () => {
450
- b && b();
450
+ y && y();
451
451
  });
452
452
  else if (z) {
453
453
  const B = z(c.getCurrentRecord());
454
454
  B instanceof Promise ? B.then(async () => {
455
- await ne() && b && b();
455
+ await ne() && y && y();
456
456
  }).catch((fe) => {
457
457
  X && X(xe(fe)), J(!0), W(xe(fe));
458
- }) : (B === !0 || B === void 0) && await ne() && b && b();
458
+ }) : (B === !0 || B === void 0) && await ne() && y && y();
459
459
  } else
460
- await ne() && b && b();
460
+ await ne() && y && y();
461
461
  }, N = () => {
462
462
  d(), m && m();
463
463
  }, Fe = () => {
464
- St.showWarning(g().t("archbase:Click on Ok or Cancel to close"));
464
+ St.showWarning(p().t("archbase:Click on Ok or Cancel to close"));
465
465
  }, he = () => {
466
466
  u && u(), J(!1), W("");
467
467
  };
@@ -475,7 +475,7 @@ function $r({
475
475
  onSecurityReady: k?.onSecurityReady,
476
476
  onAccessDenied: k?.onAccessDenied,
477
477
  children: /* @__PURE__ */ e(
478
- bt,
478
+ yt,
479
479
  {
480
480
  title: t,
481
481
  withOverlay: r,
@@ -502,7 +502,7 @@ function $r({
502
502
  withCloseButton: !0,
503
503
  withBorder: !0,
504
504
  icon: /* @__PURE__ */ e(Ke, { size: "1.4rem" }),
505
- title: g().t("WARNING"),
505
+ title: p().t("WARNING"),
506
506
  titleColor: "rgb(250, 82, 82)",
507
507
  variant: v ?? E.variant,
508
508
  onClose: he,
@@ -523,7 +523,7 @@ function $r({
523
523
  disabled: c && c.isBrowsing(),
524
524
  variant: v ?? E.variant,
525
525
  color: "green",
526
- children: `${g().t("Ok")}`
526
+ children: `${p().t("Ok")}`
527
527
  }
528
528
  ),
529
529
  /* @__PURE__ */ e(
@@ -536,7 +536,7 @@ function $r({
536
536
  disabled: c && c.isBrowsing(),
537
537
  variant: v ?? E.variant,
538
538
  color: "red",
539
- children: `${g().t("Cancel")}`
539
+ children: `${p().t("Cancel")}`
540
540
  }
541
541
  )
542
542
  ] }) : /* @__PURE__ */ e(oe, { gap: "md", children: /* @__PURE__ */ e(
@@ -547,7 +547,7 @@ function $r({
547
547
  leftSection: /* @__PURE__ */ e(ze, {}),
548
548
  onClick: N,
549
549
  variant: v ?? E.variant,
550
- children: `${g().t("Close")}`
550
+ children: `${p().t("Close")}`
551
551
  }
552
552
  ) })
553
553
  ] }) })
@@ -575,7 +575,7 @@ function Lr({
575
575
  onlyOkButton: _ = !1,
576
576
  onClose: D,
577
577
  onClickOk: C,
578
- onClickCancel: b,
578
+ onClickCancel: y,
579
579
  userActions: m,
580
580
  // Props de segurança (opcionais)
581
581
  resourceName: z,
@@ -591,9 +591,9 @@ function Lr({
591
591
  const Q = () => {
592
592
  C && C(), D();
593
593
  }, M = () => {
594
- b && b(), D();
594
+ y && y(), D();
595
595
  }, q = () => {
596
- St.showWarning(g().t("Click on Ok or Cancel to close"));
596
+ St.showWarning(p().t("Click on Ok or Cancel to close"));
597
597
  };
598
598
  return /* @__PURE__ */ e(
599
599
  He,
@@ -605,7 +605,7 @@ function Lr({
605
605
  onSecurityReady: u?.onSecurityReady,
606
606
  onAccessDenied: u?.onAccessDenied,
607
607
  children: /* @__PURE__ */ e(
608
- bt,
608
+ yt,
609
609
  {
610
610
  title: t,
611
611
  withOverlay: r,
@@ -635,7 +635,7 @@ function Lr({
635
635
  onClick: Q,
636
636
  variant: v ?? X.variant,
637
637
  color: "green",
638
- children: `${g().t("Ok")}`
638
+ children: `${p().t("Ok")}`
639
639
  }
640
640
  ),
641
641
  _ ? null : /* @__PURE__ */ e(
@@ -647,7 +647,7 @@ function Lr({
647
647
  onClick: M,
648
648
  variant: v ?? X.variant,
649
649
  color: "red",
650
- children: b ? `${g().t("Cancel")}` : `${g().t("Close")}`
650
+ children: y ? `${p().t("Cancel")}` : `${p().t("Close")}`
651
651
  }
652
652
  )
653
653
  ] })
@@ -669,7 +669,7 @@ const mr = (t, r, o) => {
669
669
  }
670
670
  return r.getValue(`${t.viewName}_${t.componentName}`);
671
671
  };
672
- function gr(t, r) {
672
+ function pr(t, r) {
673
673
  const {
674
674
  title: o,
675
675
  printTitle: f,
@@ -685,7 +685,7 @@ function gr(t, r) {
685
685
  customRenderRowActions: _,
686
686
  innerRef: D,
687
687
  isLoading: C = !1,
688
- isLoadingFilter: b = !1,
688
+ isLoadingFilter: y = !1,
689
689
  isError: m = !1,
690
690
  enableTopToolbar: z = !0,
691
691
  enableTopToolbarActions: w = !0,
@@ -759,7 +759,7 @@ function gr(t, r) {
759
759
  getDataGridRef: () => S,
760
760
  getFilterModel: () => S.current ? S.current.getFilterModel() : { items: [], quickFilterValues: [] }
761
761
  }), [S]);
762
- const [y, V] = H({
762
+ const [b, V] = H({
763
763
  activeFilterIndex: -1,
764
764
  currentFilter: void 0,
765
765
  expandedFilter: !1
@@ -767,7 +767,7 @@ function gr(t, r) {
767
767
  rt(() => {
768
768
  const I = mr(i, k, q);
769
769
  V(I);
770
- }, [b]);
770
+ }, [y]);
771
771
  const ke = (I) => {
772
772
  if (_)
773
773
  return _(I);
@@ -777,50 +777,50 @@ function gr(t, r) {
777
777
  return /* @__PURE__ */ e(
778
778
  Te,
779
779
  {
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,
780
+ onEditRow: c.onEditRow ? (be) => c.onEditRow && c.onEditRow(be) : void 0,
781
+ onRemoveRow: c.onRemoveRow ? (be) => c.onRemoveRow && c.onRemoveRow(be) : void 0,
782
+ onViewRow: c.onViewRow ? (be) => c.onViewRow && c.onViewRow(be) : void 0,
783
783
  row: I,
784
784
  variant: R ?? me.variant
785
785
  }
786
786
  );
787
- }, me = Me(), Be = Ie(null), De = m ? !1 : C, ge = Je(() => we, [we]);
787
+ }, me = Me(), Be = Ie(null), De = m ? !1 : C, pe = Je(() => we, [we]);
788
788
  tt.useEffect(() => {
789
789
  D && D.current !== Be.current && D.current && Be.current && (D.current = Be.current);
790
790
  }, [D]);
791
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);
792
+ const be = { ...b, currentFilter: I, activeFilterIndex: Te };
793
+ V(be), k && i && k?.setValue(`${i.viewName}_${i.componentName}`, be);
794
794
  }, ie = (I) => {
795
- const Te = { ...y, expandedFilter: I };
795
+ const Te = { ...b, expandedFilter: I };
796
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);
797
+ }, g = (I, Te) => {
798
+ const be = { ...b, currentFilter: I, activeFilterIndex: Te };
799
+ V(be), k && i && k?.setValue(`${i.viewName}_${i.componentName}`, be);
800
800
  }, Ce = () => {
801
- if (y.currentFilter)
801
+ if (b.currentFilter)
802
802
  if (ae)
803
803
  ae();
804
- else if (y.currentFilter.filter.filterType === "quick") {
804
+ else if (b.currentFilter.filter.filterType === "quick") {
805
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();
806
+ b.currentFilter.filter.quickFilterText && b.currentFilter.filter.quickFilterText !== "" ? (I.filter = JSON.stringify({
807
+ search: b.currentFilter.filter.quickFilterText,
808
+ fields: b.currentFilter.filter.quickFilterFieldsText
809
+ }), I.sort = b.currentFilter.sort.quickFilterSort ? b.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 I = dr(y.currentFilter);
811
+ const I = dr(b.currentFilter);
812
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();
813
+ const Te = Yt(I.expressionNode), be = n.getOptions();
814
+ be.filter = Te, be.sort = I?.sortStrings, n.refreshData(be), Le.isDataSourceV2 || Le.v1State.forceUpdate();
815
815
  }
816
816
  }
817
817
  };
818
818
  let Ne, je;
819
- const gt = (I) => {
819
+ const pt = (I) => {
820
820
  Ne = I;
821
821
  }, Xe = (I) => {
822
822
  je = I;
823
- }, pt = () => {
823
+ }, gt = () => {
824
824
  je && je();
825
825
  }, xt = () => {
826
826
  Ne && Ne();
@@ -832,15 +832,15 @@ function gr(t, r) {
832
832
  apiVersion: i?.apiVersion,
833
833
  ref: T,
834
834
  variant: R ?? me.variant,
835
- expandedFilter: y.expandedFilter,
835
+ expandedFilter: b.expandedFilter,
836
836
  persistenceDelegator: q,
837
- currentFilter: y.currentFilter,
838
- activeFilterIndex: y.activeFilterIndex,
839
- onSelectedFilter: p,
837
+ currentFilter: b.currentFilter,
838
+ activeFilterIndex: b.activeFilterIndex,
839
+ onSelectedFilter: g,
840
840
  onFilterChanged: lt,
841
841
  onSearchByFilter: Ce,
842
842
  onToggleExpandedFilter: ie,
843
- onExport: pt,
843
+ onExport: gt,
844
844
  onPrint: xt,
845
845
  showExportButton: !0,
846
846
  showPrintButton: !0,
@@ -866,7 +866,7 @@ function gr(t, r) {
866
866
  withCloseButton: !0,
867
867
  withBorder: !0,
868
868
  icon: /* @__PURE__ */ e(Ke, { size: "1.4rem" }),
869
- title: g().t("archbase:WARNING"),
869
+ title: p().t("archbase:WARNING"),
870
870
  titleColor: "rgb(250, 82, 82)",
871
871
  variant: R ?? me.variant,
872
872
  onClose: () => F && F(),
@@ -906,7 +906,7 @@ function gr(t, r) {
906
906
  positionActionsColumn: J,
907
907
  actionsColumnWidth: U,
908
908
  toolbarAlignment: se,
909
- toolbarLeftContent: ge,
909
+ toolbarLeftContent: pe,
910
910
  renderToolbarActions: u === "advanced" || u === "none" ? Ye : void 0,
911
911
  paginationLabels: N,
912
912
  cellPadding: le,
@@ -916,7 +916,7 @@ function gr(t, r) {
916
916
  renderDetailPanel: O ? ({ row: I }) => O({ row: I }) : void 0,
917
917
  renderTopToolbar: Y,
918
918
  onExport: Xe,
919
- onPrint: gt,
919
+ onPrint: pt,
920
920
  variant: R,
921
921
  withToolbarBorder: Re,
922
922
  withPaginationBorder: Pe,
@@ -939,7 +939,7 @@ function gr(t, r) {
939
939
  variant: R ?? me.variant,
940
940
  leftSection: /* @__PURE__ */ e(Ft, {}),
941
941
  onClick: () => l && l.onAddExecute && l.onAddExecute(),
942
- children: l.labelAdd || g().t("archbase:New")
942
+ children: l.labelAdd || p().t("archbase:New")
943
943
  }
944
944
  ) : null,
945
945
  l.onEditExecute ? /* @__PURE__ */ e(
@@ -952,7 +952,7 @@ function gr(t, r) {
952
952
  disabled: !n.isBrowsing() || n.isEmpty(),
953
953
  variant: R ?? me.variant,
954
954
  onClick: () => l && l.onEditExecute && l.onEditExecute(),
955
- children: l.labelEdit || g().t("archbase:Edit")
955
+ children: l.labelEdit || p().t("archbase:Edit")
956
956
  }
957
957
  ) : null,
958
958
  l.onRemoveExecute ? /* @__PURE__ */ e(
@@ -965,7 +965,7 @@ function gr(t, r) {
965
965
  disabled: !l?.allowRemove || !n.isBrowsing() || n.isEmpty(),
966
966
  variant: R ?? me.variant,
967
967
  onClick: () => l && l.onRemoveExecute && l.onRemoveExecute(),
968
- children: l.labelRemove || g().t("archbase:Remove")
968
+ children: l.labelRemove || p().t("archbase:Remove")
969
969
  }
970
970
  ) : null,
971
971
  l.onViewExecute ? /* @__PURE__ */ e(
@@ -978,7 +978,7 @@ function gr(t, r) {
978
978
  disabled: !n.isBrowsing() || n.isEmpty(),
979
979
  variant: R ?? me.variant,
980
980
  onClick: () => l && l.onViewExecute && l.onViewExecute(),
981
- children: l.labelView || g().t("archbase:View")
981
+ children: l.labelView || p().t("archbase:View")
982
982
  }
983
983
  ) : null,
984
984
  l.customUserActions && l.customUserActionsPosition === "right" ? l.customUserActions : null
@@ -991,8 +991,8 @@ function gr(t, r) {
991
991
  }
992
992
  );
993
993
  }
994
- const jr = zt(gr);
995
- function pr(t, r, o, f) {
994
+ const jr = zt(pr);
995
+ function gr(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
998
  return /* @__PURE__ */ s(Se, { m: 0, gap: "xs", justify: "center", align: "center", grow: !0, children: [
@@ -1193,7 +1193,7 @@ function Mt({
1193
1193
  headerMiddle: _,
1194
1194
  headerRight: D,
1195
1195
  footerLeft: C,
1196
- footerMiddle: b,
1196
+ footerMiddle: y,
1197
1197
  footerRight: m,
1198
1198
  variant: z,
1199
1199
  options: w = {},
@@ -1236,7 +1236,7 @@ function Mt({
1236
1236
  radius: v,
1237
1237
  style: { width: i, height: h, padding: 4, ...G },
1238
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) }) }),
1239
+ /* @__PURE__ */ e(It, { size: re.height, children: /* @__PURE__ */ e("div", { ref: te, children: gr(w, c, D, M) }) }),
1240
1240
  /* @__PURE__ */ e(ft, { children: /* @__PURE__ */ e(
1241
1241
  Ze,
1242
1242
  {
@@ -1289,7 +1289,7 @@ function Mt({
1289
1289
  }
1290
1290
  );
1291
1291
  }
1292
- function yr(t, r, o, f, n, i) {
1292
+ function br(t, r, o, f, n, i) {
1293
1293
  console.log(`Render de "${t}" na fase "${r}": ${o}ms`);
1294
1294
  }
1295
1295
  function Mr({
@@ -1313,7 +1313,7 @@ function Mr({
1313
1313
  withBorder: _ = !0,
1314
1314
  filterPersistenceDelegator: D,
1315
1315
  withPagination: C = !0,
1316
- radius: b,
1316
+ radius: y,
1317
1317
  userActions: m,
1318
1318
  columnsCountBreakPoints: z,
1319
1319
  columnsCount: w,
@@ -1352,22 +1352,22 @@ function Mr({
1352
1352
  );
1353
1353
  it({
1354
1354
  dataSource: r,
1355
- listener: (y) => {
1356
- (y.type === be.afterRemove || y.type === be.refreshData) && (he((V) => V + 1), B || fe());
1355
+ listener: (b) => {
1356
+ (b.type === ye.afterRemove || b.type === ye.refreshData) && (he((V) => V + 1), B || fe());
1357
1357
  }
1358
1358
  });
1359
1359
  const Ae = Je(() => {
1360
1360
  if (F) {
1361
- const y = F.type;
1361
+ const b = F.type;
1362
1362
  let V = {};
1363
1363
  return F.props && (V = F.props), r.browseRecords().map((ke, me) => {
1364
1364
  const Be = `${W}_${me}`, De = `${W}_${me}`;
1365
- let ge = ke.active === void 0 ? !1 : ke.active;
1366
- return ne >= 0 && (ge = !1, ne === me && (ge = !0)), /* @__PURE__ */ e(
1367
- y,
1365
+ let pe = ke.active === void 0 ? !1 : ke.active;
1366
+ return ne >= 0 && (pe = !1, ne === me && (pe = !0)), /* @__PURE__ */ e(
1367
+ b,
1368
1368
  {
1369
1369
  id: De,
1370
- active: ge,
1370
+ active: pe,
1371
1371
  index: me,
1372
1372
  dataSource: r,
1373
1373
  recordData: ke,
@@ -1379,24 +1379,24 @@ function Mr({
1379
1379
  });
1380
1380
  }
1381
1381
  return [];
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 });
1382
+ }, [ne, F, W, r, Fe]), Re = (b, V) => {
1383
+ N({ ...$, currentFilter: b, activeFilterIndex: V });
1384
+ }, Pe = (b) => {
1385
+ N({ ...$, expandedFilter: b });
1386
+ }, ce = (b, V) => {
1387
+ N({ ...$, currentFilter: b, activeFilterIndex: V });
1388
1388
  }, L = () => {
1389
- }, de = (y, V) => {
1390
- d(y), r && r.gotoRecordByData(V);
1391
- }, Ge = (y) => {
1389
+ }, de = (b, V) => {
1390
+ d(b), r && r.gotoRecordByData(V);
1391
+ }, Ge = (b) => {
1392
1392
  if (r) {
1393
1393
  const V = r.getOptions();
1394
- V.filter = y, V.currentPage = se, r.refreshData(V), B || fe();
1394
+ V.filter = b, V.currentPage = se, r.refreshData(V), B || fe();
1395
1395
  }
1396
- }, T = (y) => {
1396
+ }, T = (b) => {
1397
1397
  if (r) {
1398
1398
  const V = r.getOptions();
1399
- V.currentPage = y, r.refreshData(V), B || fe();
1399
+ V.currentPage = b, r.refreshData(V), B || fe();
1400
1400
  }
1401
1401
  }, S = () => x === "normal" && f ? /* @__PURE__ */ e(
1402
1402
  ur,
@@ -1405,7 +1405,7 @@ function Mr({
1405
1405
  onFilter: Ge,
1406
1406
  minFilterValueLength: 1
1407
1407
  }
1408
- ) : x === "advanced" ? /* @__PURE__ */ e(tr, { id: `profile_${o.componentName}`, onRender: yr, children: /* @__PURE__ */ e(
1408
+ ) : x === "advanced" ? /* @__PURE__ */ e(tr, { id: `profile_${o.componentName}`, onRender: br, children: /* @__PURE__ */ e(
1409
1409
  Dt,
1410
1410
  {
1411
1411
  id: o.componentName,
@@ -1444,7 +1444,7 @@ function Mr({
1444
1444
  innerRef: O,
1445
1445
  width: l,
1446
1446
  height: c,
1447
- radius: b,
1447
+ radius: y,
1448
1448
  withBorder: _,
1449
1449
  isError: a,
1450
1450
  error: v,
@@ -1465,7 +1465,7 @@ function Mr({
1465
1465
  variant: R ?? U.variant,
1466
1466
  leftSection: /* @__PURE__ */ e(Ft, {}),
1467
1467
  onClick: () => m.onAddExecute(),
1468
- children: m.labelAdd || g().t("archbase:New")
1468
+ children: m.labelAdd || p().t("archbase:New")
1469
1469
  }
1470
1470
  ) : null,
1471
1471
  m?.allowEdit !== !1 && m?.onEditExecute ? /* @__PURE__ */ e(
@@ -1478,7 +1478,7 @@ function Mr({
1478
1478
  disabled: !r.isBrowsing() || r.isEmpty(),
1479
1479
  variant: R ?? U.variant,
1480
1480
  onClick: () => m.onEditExecute(),
1481
- children: m.labelEdit || g().t("archbase:Edit")
1481
+ children: m.labelEdit || p().t("archbase:Edit")
1482
1482
  }
1483
1483
  ) : null,
1484
1484
  m?.allowRemove !== !1 && m?.onRemoveExecute ? /* @__PURE__ */ e(
@@ -1491,7 +1491,7 @@ function Mr({
1491
1491
  disabled: !r.isBrowsing() || r.isEmpty(),
1492
1492
  variant: R ?? U.variant,
1493
1493
  onClick: () => m.onRemoveExecute(),
1494
- children: m.labelRemove || g().t("archbase:Remove")
1494
+ children: m.labelRemove || p().t("archbase:Remove")
1495
1495
  }
1496
1496
  ) : null,
1497
1497
  m?.allowView !== !1 && m?.onViewExecute ? /* @__PURE__ */ e(
@@ -1504,7 +1504,7 @@ function Mr({
1504
1504
  disabled: !r.isBrowsing() || r.isEmpty(),
1505
1505
  variant: R ?? U.variant,
1506
1506
  onClick: () => m.onViewExecute(),
1507
- children: m.labelView || g().t("archbase:View")
1507
+ children: m.labelView || p().t("archbase:View")
1508
1508
  }
1509
1509
  ) : null,
1510
1510
  m?.customUserActions && m?.customUserActionsPosition === "right" ? m.customUserActions : null
@@ -1560,7 +1560,7 @@ function Ur({
1560
1560
  children: _,
1561
1561
  radius: D,
1562
1562
  userActions: C,
1563
- debug: b = !1,
1563
+ debug: y = !1,
1564
1564
  variant: m,
1565
1565
  actionsButtonsOptions: z,
1566
1566
  spaceOptions: w,
@@ -1590,7 +1590,7 @@ function Ur({
1590
1590
  id: "1",
1591
1591
  icon: /* @__PURE__ */ e(Ft, {}),
1592
1592
  color: "green",
1593
- label: d.labelAdd ? d.labelAdd : g().t("archbase:New"),
1593
+ label: d.labelAdd ? d.labelAdd : p().t("archbase:New"),
1594
1594
  executeAction: () => {
1595
1595
  d && d.onAddExecute && d.onAddExecute();
1596
1596
  },
@@ -1600,7 +1600,7 @@ function Ur({
1600
1600
  id: "2",
1601
1601
  icon: /* @__PURE__ */ e(At, {}),
1602
1602
  color: "blue",
1603
- label: d.labelEdit ? d.labelEdit : g().t("archbase:Edit"),
1603
+ label: d.labelEdit ? d.labelEdit : p().t("archbase:Edit"),
1604
1604
  executeAction: () => {
1605
1605
  d && d.onEditExecute && d.onEditExecute();
1606
1606
  },
@@ -1610,7 +1610,7 @@ function Ur({
1610
1610
  id: "3",
1611
1611
  icon: /* @__PURE__ */ e(nt, {}),
1612
1612
  color: "red",
1613
- label: d.labelRemove ? d.labelRemove : g().t("archbase:Remove"),
1613
+ label: d.labelRemove ? d.labelRemove : p().t("archbase:Remove"),
1614
1614
  executeAction: () => {
1615
1615
  d && d.onRemoveExecute && d.onRemoveExecute();
1616
1616
  },
@@ -1620,7 +1620,7 @@ function Ur({
1620
1620
  id: "4",
1621
1621
  icon: /* @__PURE__ */ e(Rt, {}),
1622
1622
  color: "green",
1623
- label: d.labelView ? d.labelView : g().t("archbase:View"),
1623
+ label: d.labelView ? d.labelView : p().t("archbase:View"),
1624
1624
  executeAction: () => {
1625
1625
  d && d.onView && d.onView();
1626
1626
  },
@@ -1663,7 +1663,7 @@ function Ur({
1663
1663
  error: h,
1664
1664
  clearError: x,
1665
1665
  title: t,
1666
- defaultDebug: b,
1666
+ defaultDebug: y,
1667
1667
  debugOptions: F,
1668
1668
  style: G,
1669
1669
  options: ne,
@@ -1719,7 +1719,7 @@ function _r({
1719
1719
  formSubtitle: _,
1720
1720
  statusBadge: D,
1721
1721
  tabs: C,
1722
- defaultTab: b,
1722
+ defaultTab: y,
1723
1723
  tabsVariant: m = "outline",
1724
1724
  children: z,
1725
1725
  // Layout
@@ -1761,7 +1761,7 @@ function _r({
1761
1761
  securityOptions: he,
1762
1762
  ...B
1763
1763
  }) {
1764
- const fe = Me(), [Ae, Re] = H(q), [Pe, ce] = H(R), [L, de] = H(b || (C?.[0]?.value ?? null)), Ge = dt();
1764
+ const fe = Me(), [Ae, Re] = H(q), [Pe, ce] = H(R), [L, de] = H(y || (C?.[0]?.value ?? null)), Ge = dt();
1765
1765
  Ue({
1766
1766
  autoRegisterActions: he?.autoRegisterActions ?? !0
1767
1767
  });
@@ -1773,19 +1773,19 @@ function _r({
1773
1773
  ), S = Pt();
1774
1774
  it({
1775
1775
  dataSource: E,
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());
1776
+ listener: (g) => {
1777
+ g.type === ye.onError && (Re(!0), ce(g.error)), g.type === ye.onFieldError && S && g.fieldName && g.error && S.setError(g.fieldName, g.error), (g.type === ye.afterEdit || g.type === ye.afterInsert) && (T.isDataSourceV2 || Ge());
1778
1778
  }
1779
1779
  });
1780
- const $e = Z((p, Ce) => ({
1780
+ const $e = Z((g, Ce) => ({
1781
1781
  closeAllowed: (Ne) => {
1782
1782
  }
1783
- }), []), Le = ne || $e, { closeAllowed: y } = Le(se || "", () => {
1784
- we && we() === !1 || y();
1785
- }), V = async (p) => {
1783
+ }), []), Le = ne || $e, { closeAllowed: b } = Le(se || "", () => {
1784
+ we && we() === !1 || b();
1785
+ }), V = async (g) => {
1786
1786
  try {
1787
- ue ? ue(p) : (J && await J(p), E.isBrowsing() || E.save().then(() => {
1788
- S?.clearAll(), U && U(p), y();
1787
+ ue ? ue(g) : (J && await J(g), E.isBrowsing() || E.save().then(() => {
1788
+ S?.clearAll(), U && U(g), b();
1789
1789
  }).catch((Ce) => {
1790
1790
  Y && Y(xe(Ce)), Re(!0), ce(xe(Ce));
1791
1791
  }));
@@ -1794,13 +1794,13 @@ function _r({
1794
1794
  }
1795
1795
  }, ke = () => {
1796
1796
  try {
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));
1797
+ re ? re(b) : (W && W(), E.isBrowsing() || E.cancel(), S?.clearAll(), O && O(), b());
1798
+ } catch (g) {
1799
+ Y && Y(xe(g)), Re(!0), ce(xe(g));
1800
1800
  }
1801
1801
  }, me = () => {
1802
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: [
1803
+ }, Be = l ? 12 : 12 - j, De = E && !E.isBrowsing(), pe = 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,7 +1810,7 @@ function _r({
1810
1810
  onClick: ke,
1811
1811
  variant: "default",
1812
1812
  loading: Q,
1813
- children: x || g().t("Cancel")
1813
+ children: x || p().t("Cancel")
1814
1814
  }
1815
1815
  ),
1816
1816
  /* @__PURE__ */ e(
@@ -1823,7 +1823,7 @@ function _r({
1823
1823
  variant: te ?? fe.variant,
1824
1824
  color: "blue",
1825
1825
  loading: M,
1826
- children: h || g().t("Ok")
1826
+ children: h || p().t("Ok")
1827
1827
  }
1828
1828
  )
1829
1829
  ] }) : /* @__PURE__ */ e(
@@ -1834,7 +1834,7 @@ function _r({
1834
1834
  leftSection: /* @__PURE__ */ e(ze, { size: 16 }),
1835
1835
  onClick: ke,
1836
1836
  variant: "default",
1837
- children: g().t("Close")
1837
+ children: p().t("Close")
1838
1838
  }
1839
1839
  ) });
1840
1840
  return /* @__PURE__ */ e(
@@ -1861,76 +1861,76 @@ function _r({
1861
1861
  },
1862
1862
  children: [
1863
1863
  /* @__PURE__ */ e(
1864
- pe,
1864
+ ge,
1865
1865
  {
1866
1866
  style: {
1867
1867
  flexShrink: 0,
1868
1868
  padding: "16px 24px",
1869
- borderBottom: "1px solid var(--mantine-color-gray-2)"
1869
+ borderBottom: "1px solid var(--mantine-color-default-border)"
1870
1870
  },
1871
1871
  children: /* @__PURE__ */ s(ve, { justify: "space-between", align: "center", children: [
1872
1872
  /* @__PURE__ */ s(oe, { gap: "md", children: [
1873
1873
  o && /* @__PURE__ */ e(
1874
- yt,
1874
+ bt,
1875
1875
  {
1876
1876
  variant: "subtle",
1877
1877
  color: "gray",
1878
1878
  size: "lg",
1879
1879
  onClick: o,
1880
- style: { border: "1px solid var(--mantine-color-gray-3)" },
1880
+ style: { border: "1px solid var(--mantine-color-default-border)" },
1881
1881
  children: /* @__PURE__ */ e(Vt, { size: 18 })
1882
1882
  }
1883
1883
  ),
1884
- /* @__PURE__ */ s(pe, { children: [
1884
+ /* @__PURE__ */ s(ge, { children: [
1885
1885
  /* @__PURE__ */ e(Bt, { order: 4, fw: 600, children: t }),
1886
1886
  r && /* @__PURE__ */ e(Ee, { size: "sm", c: "dimmed", children: r })
1887
1887
  ] })
1888
1888
  ] }),
1889
1889
  /* @__PURE__ */ s(oe, { gap: "sm", children: [
1890
- f?.map((p) => /* @__PURE__ */ e(
1890
+ f?.map((g) => /* @__PURE__ */ e(
1891
1891
  Oe,
1892
1892
  {
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
1893
+ variant: g.variant || "subtle",
1894
+ color: g.color,
1895
+ leftSection: g.icon,
1896
+ onClick: g.onClick,
1897
+ disabled: g.disabled,
1898
+ loading: g.loading,
1899
+ children: g.label
1900
1900
  },
1901
- p.id
1901
+ g.id
1902
1902
  )),
1903
1903
  n && i && /* @__PURE__ */ e(
1904
- yt,
1904
+ bt,
1905
1905
  {
1906
1906
  variant: "subtle",
1907
1907
  color: "red",
1908
1908
  size: "lg",
1909
1909
  onClick: i,
1910
- style: { border: "1px solid var(--mantine-color-gray-3)" },
1910
+ style: { border: "1px solid var(--mantine-color-default-border)" },
1911
1911
  children: /* @__PURE__ */ e(nt, { size: 18 })
1912
1912
  }
1913
1913
  ),
1914
- ge && ie()
1914
+ pe && ie()
1915
1915
  ] })
1916
1916
  ] })
1917
1917
  }
1918
1918
  ),
1919
- Ae && /* @__PURE__ */ e(pe, { style: { flexShrink: 0, padding: "0 24px" }, children: /* @__PURE__ */ e(
1919
+ Ae && /* @__PURE__ */ e(ge, { style: { flexShrink: 0, padding: "0 24px" }, children: /* @__PURE__ */ e(
1920
1920
  Qe,
1921
1921
  {
1922
1922
  autoClose: le,
1923
1923
  withCloseButton: !0,
1924
1924
  withBorder: !0,
1925
1925
  icon: /* @__PURE__ */ e(Ke, { size: "1.4rem" }),
1926
- title: g().t("WARNING"),
1926
+ title: p().t("WARNING"),
1927
1927
  titleColor: "rgb(250, 82, 82)",
1928
1928
  variant: te ?? fe.variant,
1929
1929
  onClose: me,
1930
1930
  children: /* @__PURE__ */ e("span", { children: Pe })
1931
1931
  }
1932
1932
  ) }),
1933
- /* @__PURE__ */ s(pe, { style: { flex: 1, minHeight: 0, padding: "24px" }, children: [
1933
+ /* @__PURE__ */ s(ge, { style: { flex: 1, minHeight: 0, padding: "24px" }, children: [
1934
1934
  /* @__PURE__ */ e(Ct, { visible: ae || Q || M, opacity: 0.3 }),
1935
1935
  /* @__PURE__ */ s(Se, { gap: "xl", style: { height: "100%" }, children: [
1936
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 }) }) }),
@@ -1943,19 +1943,19 @@ function _r({
1943
1943
  height: "100%",
1944
1944
  display: "flex",
1945
1945
  flexDirection: "column",
1946
- backgroundColor: "var(--mantine-color-white)"
1946
+ backgroundColor: "var(--mantine-color-body)"
1947
1947
  },
1948
1948
  children: [
1949
1949
  (c || D) && /* @__PURE__ */ e(
1950
- pe,
1950
+ ge,
1951
1951
  {
1952
1952
  style: {
1953
1953
  flexShrink: 0,
1954
1954
  padding: "16px 20px",
1955
- borderBottom: C ? "1px solid var(--mantine-color-gray-2)" : "none"
1955
+ borderBottom: C ? "1px solid var(--mantine-color-default-border)" : "none"
1956
1956
  },
1957
1957
  children: /* @__PURE__ */ s(ve, { justify: "space-between", align: "flex-start", children: [
1958
- /* @__PURE__ */ s(pe, { children: [
1958
+ /* @__PURE__ */ s(ge, { children: [
1959
1959
  c && /* @__PURE__ */ e(Ee, { fw: 600, size: "lg", children: c }),
1960
1960
  _ && /* @__PURE__ */ e(Ee, { size: "sm", c: "dimmed", mt: 4, children: _ })
1961
1961
  ] }),
@@ -1963,7 +1963,7 @@ function _r({
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__ */ s(
1966
+ /* @__PURE__ */ e(ge, { style: { flex: 1, minHeight: 0, display: "flex", flexDirection: "column" }, children: C && C.length > 0 ? /* @__PURE__ */ s(
1967
1967
  at,
1968
1968
  {
1969
1969
  value: L,
@@ -1971,23 +1971,23 @@ function _r({
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((p) => /* @__PURE__ */ e(
1974
+ /* @__PURE__ */ e(at.List, { style: { flexShrink: 0, padding: "0 20px" }, children: C.map((g) => /* @__PURE__ */ e(
1975
1975
  at.Tab,
1976
1976
  {
1977
- value: p.value,
1978
- leftSection: p.icon,
1979
- children: p.label
1977
+ value: g.value,
1978
+ leftSection: g.icon,
1979
+ children: g.label
1980
1980
  },
1981
- p.value
1981
+ g.value
1982
1982
  )) }),
1983
- C.map((p) => /* @__PURE__ */ e(
1983
+ C.map((g) => /* @__PURE__ */ e(
1984
1984
  at.Panel,
1985
1985
  {
1986
- value: p.value,
1986
+ value: g.value,
1987
1987
  style: { flex: 1, minHeight: 0 },
1988
- children: /* @__PURE__ */ e(Ze, { style: { height: "100%", padding: "20px" }, children: p.content })
1988
+ children: /* @__PURE__ */ e(Ze, { style: { height: "100%", padding: "20px" }, children: g.content })
1989
1989
  },
1990
- p.value
1990
+ g.value
1991
1991
  ))
1992
1992
  ]
1993
1993
  }
@@ -1998,12 +1998,12 @@ function _r({
1998
1998
  ] })
1999
1999
  ] }),
2000
2000
  lt && /* @__PURE__ */ e(
2001
- pe,
2001
+ ge,
2002
2002
  {
2003
2003
  style: {
2004
2004
  flexShrink: 0,
2005
2005
  padding: "16px 24px",
2006
- borderTop: "1px solid var(--mantine-color-gray-2)",
2006
+ borderTop: "1px solid var(--mantine-color-default-border)",
2007
2007
  display: "flex",
2008
2008
  justifyContent: "flex-end"
2009
2009
  },
@@ -2019,7 +2019,7 @@ function _r({
2019
2019
  function qr({ title: t, description: r, headerAction: o, children: f }) {
2020
2020
  return /* @__PURE__ */ s(_e, { withBorder: !0, radius: "md", p: "md", children: [
2021
2021
  /* @__PURE__ */ s(ve, { justify: "space-between", align: "flex-start", mb: r || o ? "sm" : 0, children: [
2022
- /* @__PURE__ */ s(pe, { children: [
2022
+ /* @__PURE__ */ s(ge, { children: [
2023
2023
  /* @__PURE__ */ e(Ee, { fw: 600, size: "sm", children: t }),
2024
2024
  r && /* @__PURE__ */ e(Ee, { size: "xs", c: "dimmed", mt: 2, children: r })
2025
2025
  ] }),
@@ -2031,7 +2031,7 @@ function qr({ title: t, description: r, headerAction: o, children: f }) {
2031
2031
  function Jr({ images: t, onAddImage: r, onRemoveImage: o, onSetCover: f, maxImages: n = 6 }) {
2032
2032
  const i = t.find((a) => a.isCover) || t[0], h = t.filter((a) => a.id !== i?.id), x = t.length < n;
2033
2033
  return /* @__PURE__ */ s(wt, { gap: "sm", children: [
2034
- i && /* @__PURE__ */ s(pe, { style: { position: "relative" }, children: [
2034
+ i && /* @__PURE__ */ s(ge, { style: { position: "relative" }, children: [
2035
2035
  /* @__PURE__ */ e(
2036
2036
  "img",
2037
2037
  {
@@ -2042,7 +2042,7 @@ function Jr({ images: t, onAddImage: r, onRemoveImage: o, onSetCover: f, maxImag
2042
2042
  height: 200,
2043
2043
  objectFit: "cover",
2044
2044
  borderRadius: "var(--mantine-radius-md)",
2045
- border: "1px solid var(--mantine-color-gray-3)"
2045
+ border: "1px solid var(--mantine-color-default-border)"
2046
2046
  }
2047
2047
  }
2048
2048
  ),
@@ -2058,7 +2058,7 @@ function Jr({ images: t, onAddImage: r, onRemoveImage: o, onSetCover: f, maxImag
2058
2058
  ] }),
2059
2059
  /* @__PURE__ */ s(Se, { gap: "sm", children: [
2060
2060
  h.map((a) => /* @__PURE__ */ e(Se.Col, { span: 4, children: /* @__PURE__ */ e(
2061
- pe,
2061
+ ge,
2062
2062
  {
2063
2063
  style: { position: "relative", cursor: f ? "pointer" : "default" },
2064
2064
  onClick: () => f?.(a.id),
@@ -2072,26 +2072,26 @@ function Jr({ images: t, onAddImage: r, onRemoveImage: o, onSetCover: f, maxImag
2072
2072
  height: 80,
2073
2073
  objectFit: "cover",
2074
2074
  borderRadius: "var(--mantine-radius-sm)",
2075
- border: "1px solid var(--mantine-color-gray-3)"
2075
+ border: "1px solid var(--mantine-color-default-border)"
2076
2076
  }
2077
2077
  }
2078
2078
  )
2079
2079
  }
2080
2080
  ) }, a.id)),
2081
2081
  x && r && /* @__PURE__ */ e(Se.Col, { span: 4, children: /* @__PURE__ */ e(
2082
- pe,
2082
+ ge,
2083
2083
  {
2084
2084
  onClick: r,
2085
2085
  style: {
2086
2086
  width: "100%",
2087
2087
  height: 80,
2088
- border: "2px dashed var(--mantine-color-gray-4)",
2088
+ border: "2px dashed var(--mantine-color-default-border)",
2089
2089
  borderRadius: "var(--mantine-radius-sm)",
2090
2090
  display: "flex",
2091
2091
  alignItems: "center",
2092
2092
  justifyContent: "center",
2093
2093
  cursor: "pointer",
2094
- backgroundColor: "var(--mantine-color-gray-0)"
2094
+ backgroundColor: "var(--mantine-color-default-hover)"
2095
2095
  },
2096
2096
  children: /* @__PURE__ */ e(Ee, { size: "xl", c: "dimmed", children: "+" })
2097
2097
  }
@@ -2118,7 +2118,7 @@ function Cr(t, r) {
2118
2118
  onAfterConfirm: D,
2119
2119
  // DataSource
2120
2120
  dataSource: C,
2121
- loadData: b,
2121
+ loadData: y,
2122
2122
  loadDataPaged: m,
2123
2123
  searchFields: z = "",
2124
2124
  pageSize: w = 100,
@@ -2154,17 +2154,17 @@ function Cr(t, r) {
2154
2154
  requiredPermissions: d,
2155
2155
  fallbackComponent: $,
2156
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", {
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, b] = H(0), [V, ke] = H(""), me = Ie(null), Be = Ie([]), De = !!m && !C, pe = !!C, ie = Z(() => pe && 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
2162
  pageSize: w
2163
- })), me.current), [ge, C, w])();
2163
+ })), me.current), [pe, C, w])();
2164
2164
  Ue({
2165
2165
  autoRegisterActions: N?.autoRegisterActions ?? !0
2166
2166
  });
2167
- const p = We(
2167
+ const g = We(
2168
2168
  "ArchbaseLookupDataTemplate",
2169
2169
  ie,
2170
2170
  void 0,
@@ -2173,27 +2173,27 @@ function Cr(t, r) {
2173
2173
  it({
2174
2174
  dataSource: ie,
2175
2175
  listener: (A) => {
2176
- if (A.type === be.onError && (T(!0), $e(A.error || "")), A.type === be.afterScroll) {
2176
+ if (A.type === ye.onError && (T(!0), $e(A.error || "")), A.type === ye.afterScroll) {
2177
2177
  if (a === "single") {
2178
2178
  const P = ie.getCurrentRecord();
2179
2179
  P && de([P]);
2180
2180
  }
2181
- p.isDataSourceV2 || Ae();
2181
+ g.isDataSourceV2 || Ae();
2182
2182
  }
2183
2183
  }
2184
2184
  });
2185
2185
  const Ce = {
2186
- okButton: g().t("archbase:Ok"),
2187
- cancelButton: g().t("archbase:Cancel"),
2188
- clearButton: g().t("archbase:Clear"),
2189
- selectedLabel: g().t("archbase:Selected"),
2190
- doubleClickHint: g().t("archbase:Double click to select"),
2191
- noItemSelected: g().t("archbase:No item selected"),
2192
- itemsSelected: g().t("archbase:items selected"),
2186
+ okButton: p().t("archbase:Ok"),
2187
+ cancelButton: p().t("archbase:Cancel"),
2188
+ clearButton: p().t("archbase:Clear"),
2189
+ selectedLabel: p().t("archbase:Selected"),
2190
+ doubleClickHint: p().t("archbase:Double click to select"),
2191
+ noItemSelected: p().t("archbase:No item selected"),
2192
+ itemsSelected: p().t("archbase:items selected"),
2193
2193
  ...Y
2194
2194
  }, Ne = Z(
2195
2195
  async (A, P) => {
2196
- if (!(ge || !m)) {
2196
+ if (!(pe || !m)) {
2197
2197
  ce(!0);
2198
2198
  try {
2199
2199
  const Ve = await m(A, w, P, z);
@@ -2203,7 +2203,7 @@ function Cr(t, r) {
2203
2203
  currentPage: A,
2204
2204
  totalPages: Ve.totalPages,
2205
2205
  pageSize: w
2206
- }), y(A);
2206
+ }), b(A);
2207
2207
  } catch (Ve) {
2208
2208
  T(!0), $e(xe(Ve)), W?.(Ve);
2209
2209
  } finally {
@@ -2211,15 +2211,15 @@ function Cr(t, r) {
2211
2211
  }
2212
2212
  }
2213
2213
  },
2214
- [ge, m, z, w, ie, W]
2214
+ [pe, m, z, w, ie, W]
2215
2215
  ), je = Z(
2216
2216
  async (A) => {
2217
2217
  if (De)
2218
2218
  return Ne(0, A);
2219
- if (!(ge || !b)) {
2219
+ if (!(pe || !y)) {
2220
2220
  ce(!0);
2221
2221
  try {
2222
- const P = await b(A, z);
2222
+ const P = await y(A, z);
2223
2223
  Be.current = P, ie.open({
2224
2224
  records: P,
2225
2225
  grandTotalRecords: P.length,
@@ -2234,20 +2234,20 @@ function Cr(t, r) {
2234
2234
  }
2235
2235
  }
2236
2236
  },
2237
- [ge, De, b, Ne, z, w, ie, W]
2238
- ), gt = Z(
2237
+ [pe, De, y, Ne, z, w, ie, W]
2238
+ ), pt = Z(
2239
2239
  (A) => {
2240
2240
  const P = A?.quickFilterValues?.[0] || "";
2241
2241
  if (ke(P), De) {
2242
2242
  Ne(0, P);
2243
2243
  return;
2244
2244
  }
2245
- b && !ge && je(P);
2245
+ y && !pe && je(P);
2246
2246
  },
2247
- [b, De, ge, je, Ne]
2247
+ [y, De, pe, je, Ne]
2248
2248
  );
2249
2249
  rt(() => {
2250
- if (ge)
2250
+ if (pe)
2251
2251
  return;
2252
2252
  const A = (P) => {
2253
2253
  const Ve = P?.currentPage ?? 0, kt = P?.pageSize ?? w;
@@ -2267,7 +2267,7 @@ function Cr(t, r) {
2267
2267
  return ie.emitter.on("refreshData", A), () => {
2268
2268
  ie.emitter.off("refreshData", A);
2269
2269
  };
2270
- }, [ge, De, ie, w, V, Ne]), rt(() => {
2270
+ }, [pe, De, ie, w, V, Ne]), rt(() => {
2271
2271
  o && (l?.length ? de(l) : de([]), je());
2272
2272
  }, [o]), rt(() => {
2273
2273
  l && de(l);
@@ -2277,7 +2277,7 @@ function Cr(t, r) {
2277
2277
  a === "single" ? de(A.slice(0, 1)) : k && A.length > k ? de(A.slice(0, k)) : de(A);
2278
2278
  },
2279
2279
  [a, k]
2280
- ), pt = Z(
2280
+ ), gt = Z(
2281
2281
  (A) => {
2282
2282
  if (a === "single" && c) {
2283
2283
  const P = ie.getCurrentRecord();
@@ -2292,8 +2292,8 @@ function Cr(t, r) {
2292
2292
  }, [L, a, v, j, _, D, i]), I = Z(() => {
2293
2293
  i();
2294
2294
  }, [i]), Te = () => {
2295
- St.showWarning(g().t("archbase:Click on Ok or Cancel to close"));
2296
- }, ye = () => {
2295
+ St.showWarning(p().t("archbase:Click on Ok or Cancel to close"));
2296
+ }, be = () => {
2297
2297
  J?.(), T(!1), $e("");
2298
2298
  };
2299
2299
  Gt(
@@ -2379,7 +2379,7 @@ function Cr(t, r) {
2379
2379
  onSecurityReady: N?.onSecurityReady,
2380
2380
  onAccessDenied: N?.onAccessDenied,
2381
2381
  children: /* @__PURE__ */ e(
2382
- bt,
2382
+ yt,
2383
2383
  {
2384
2384
  title: Jt,
2385
2385
  opened: o,
@@ -2401,10 +2401,10 @@ function Cr(t, r) {
2401
2401
  withCloseButton: !0,
2402
2402
  withBorder: !0,
2403
2403
  icon: /* @__PURE__ */ e(Ke, { size: "1.4rem" }),
2404
- title: g().t("archbase:WARNING"),
2404
+ title: p().t("archbase:WARNING"),
2405
2405
  titleColor: "rgb(250, 82, 82)",
2406
2406
  variant: se ?? Fe.variant,
2407
- onClose: ye,
2407
+ onClose: be,
2408
2408
  children: /* @__PURE__ */ e("span", { children: _t })
2409
2409
  }
2410
2410
  ) }),
@@ -2426,9 +2426,9 @@ function Cr(t, r) {
2426
2426
  enableTopToolbar: !0,
2427
2427
  enableGlobalFilter: !0,
2428
2428
  getRowId: Ut,
2429
- onCellDoubleClick: pt,
2429
+ onCellDoubleClick: gt,
2430
2430
  onSelectedRowsChanged: a === "multiple" ? Xe : void 0,
2431
- onFilterModelChange: gt,
2431
+ onFilterModelChange: pt,
2432
2432
  children: n
2433
2433
  }
2434
2434
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archbase/template",
3
- "version": "4.0.29",
3
+ "version": "4.0.31",
4
4
  "description": "Template components for Archbase React v3 - High-level templates and layouts",
5
5
  "author": "Edson Martins <edsonmartins2005@gmail.com>",
6
6
  "license": "MIT",
@@ -20,10 +20,10 @@
20
20
  "README.md"
21
21
  ],
22
22
  "peerDependencies": {
23
- "@mantine/core": "9.3.0",
24
- "@mantine/dates": "9.3.0",
25
- "@mantine/hooks": "9.3.0",
26
- "@mantine/modals": "9.3.0",
23
+ "@mantine/core": "9.3.2",
24
+ "@mantine/dates": "9.3.2",
25
+ "@mantine/hooks": "9.3.2",
26
+ "@mantine/modals": "9.3.2",
27
27
  "@tabler/icons-react": "^3.26.0",
28
28
  "react": "^18.3.0 || ^19.2.0",
29
29
  "react-dom": "^18.3.0 || ^19.2.0"
@@ -34,13 +34,13 @@
34
34
  "i18next": "^25.3.1",
35
35
  "lodash": "^4.17.21",
36
36
  "react-i18next": "^15.1.2",
37
- "@archbase/advanced": "4.0.29",
38
- "@archbase/components": "4.0.29",
39
- "@archbase/core": "4.0.29",
40
- "@archbase/data": "4.0.29",
41
- "@archbase/layout": "4.0.29",
42
- "@archbase/security": "4.0.29",
43
- "@archbase/security-ui": "4.0.29"
37
+ "@archbase/advanced": "4.0.31",
38
+ "@archbase/components": "4.0.31",
39
+ "@archbase/core": "4.0.31",
40
+ "@archbase/data": "4.0.31",
41
+ "@archbase/layout": "4.0.31",
42
+ "@archbase/security": "4.0.31",
43
+ "@archbase/security-ui": "4.0.31"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/react": "^19.0.6",
Binary file