@archbase/template 3.0.3 → 3.0.4

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,16 +1,16 @@
1
- import { jsx as e, Fragment as Ee, jsxs as C } from "react/jsx-runtime";
2
- import { Button as Ue, Paper as We, Box as Ne, ScrollArea as st, LoadingOverlay as at, Group as ve, useMantineColorScheme as Ke, Modal as ct, Flex as ue, px as Rt, Text as Et, Grid as me, Pagination as dt } from "@mantine/core";
3
- import { useForceUpdate as ut, useUncontrolled as It, useHotkeys as Tt } from "@mantine/hooks";
4
- import { IconBug as je, IconDeviceFloppy as Vt, IconX as Pe, IconCheck as ht, IconPlus as Qe, IconEdit as Xe, IconTrash as Ye, IconEye as Ze } from "@tabler/icons-react";
5
- import { useArchbaseAppContext as we, useValidationErrors as Dt, ValidationErrorsProvider as ft, getI18nextInstance as m, processErrorMessage as de, useArchbaseTheme as Oe, emit as Bt, useArchbaseTranslation as Pt } from "@archbase/core";
6
- import Be, { useMemo as be, useState as te, forwardRef as St, useRef as ae, useImperativeHandle as Nt, useEffect as mt, Fragment as Gt, Profiler as $t, createContext as Ut, useCallback as Ge, useContext as pt } from "react";
7
- import { useArchbaseV1V2Compatibility as Se, useArchbaseDataSourceListener as et, DataSourceEventNames as pe } from "@archbase/data";
8
- import { ArchbaseAlert as Le, ArchbaseDialog as gt, ArchbaseDataGrid as jt, GridToolBarActions as Lt, ArchbaseDebugInspector as Mt, ArchbaseMasonryProvider as kt, ArchbaseMasonryResponsive as zt, ArchbaseMasonry as qt, ArchbaseActionButtons as xt } from "@archbase/components";
1
+ import { jsx as e, Fragment as Ie, jsxs as C } from "react/jsx-runtime";
2
+ import { Button as $e, Paper as We, Box as Se, ScrollArea as st, LoadingOverlay as at, Group as be, useMantineColorScheme as Ke, Modal as ct, Flex as ue, px as Et, Text as It, Grid as me, Pagination as dt } from "@mantine/core";
3
+ import { useForceUpdate as ut, useUncontrolled as Tt, useHotkeys as Vt } from "@mantine/hooks";
4
+ import { IconBug as Ue, IconDeviceFloppy as Dt, IconX as Be, IconCheck as ht, IconPlus as Qe, IconEdit as Xe, IconTrash as Ye, IconEye as Ze } from "@tabler/icons-react";
5
+ import { useArchbaseAppContext as Ae, useValidationErrors as Bt, ValidationErrorsProvider as ft, getI18nextInstance as m, processErrorMessage as de, useArchbaseTheme as Oe, emit as Pt, useArchbaseTranslation as St } from "@archbase/core";
6
+ import De, { useMemo as we, useState as te, forwardRef as Nt, useRef as ae, useImperativeHandle as Gt, useEffect as mt, Fragment as $t, Profiler as Ut, createContext as jt, useCallback as Ne, useContext as pt } from "react";
7
+ import { useArchbaseV1V2Compatibility as Pe, useArchbaseDataSourceListener as et, DataSourceEventNames as pe } from "@archbase/data";
8
+ import { ArchbaseAlert as je, ArchbaseDialog as gt, ArchbaseDataGrid as Lt, GridToolBarActions as Mt, ArchbaseDebugInspector as kt, ArchbaseMasonryProvider as zt, ArchbaseMasonryResponsive as qt, ArchbaseMasonry as _t, ArchbaseActionButtons as xt } from "@archbase/components";
9
9
  import { ArchbaseSpaceFixed as tt, ArchbaseSpaceTop as vt, ArchbaseSpaceFill as rt, ArchbaseForm as bt, ArchbaseSpaceBottom as nt } from "@archbase/layout";
10
- import { ArchbaseQueryBuilder as it, buildFrom as _t, ArchbaseGlobalFilter as Ht } from "@archbase/advanced";
11
- import $e from "@rehooks/component-size";
12
- import { uniqueId as Jt } from "lodash";
13
- const Wt = {
10
+ import { ArchbaseQueryBuilder as it, buildFrom as Ht, ArchbaseGlobalFilter as Jt } from "@archbase/advanced";
11
+ import Ge from "@rehooks/component-size";
12
+ import { uniqueId as Wt } from "lodash";
13
+ const Kt = {
14
14
  isAvailable: !1,
15
15
  hasPermission: () => !0,
16
16
  // Default: sempre permite
@@ -21,7 +21,7 @@ const Wt = {
21
21
  canEdit: !0,
22
22
  canDelete: !0,
23
23
  canView: !0
24
- }, ge = (t) => be(() => Wt, []), fr = () => !1, ne = ({
24
+ }, ge = (t) => we(() => Kt, []), mr = () => !1, ne = ({
25
25
  actionName: t,
26
26
  actionDescription: r,
27
27
  children: a,
@@ -31,10 +31,10 @@ const Wt = {
31
31
  ...u
32
32
  }) => {
33
33
  const f = ge();
34
- return Be.useEffect(() => {
34
+ return De.useEffect(() => {
35
35
  n && t && r && f.isAvailable && f.registerAction();
36
- }, [t, r, n, f.isAvailable, f.registerAction]), !t || !f.isAvailable ? /* @__PURE__ */ e(Ue, { onClick: o, ...u, children: a }) : f.hasPermission() ? /* @__PURE__ */ e(Ue, { onClick: o, ...u, children: a }) : /* @__PURE__ */ e(Ee, { children: d });
37
- }, mr = ({
36
+ }, [t, r, n, f.isAvailable, f.registerAction]), !t || !f.isAvailable ? /* @__PURE__ */ e($e, { onClick: o, ...u, children: a }) : f.hasPermission() ? /* @__PURE__ */ e($e, { onClick: o, ...u, children: a }) : /* @__PURE__ */ e(Ie, { children: d });
37
+ }, pr = ({
38
38
  actionName: t,
39
39
  actionDescription: r,
40
40
  children: a,
@@ -42,22 +42,22 @@ const Wt = {
42
42
  onClick: n,
43
43
  ...o
44
44
  }) => {
45
- const [u, f] = Be.useState(null), [T, v] = Be.useState(!1);
46
- return Be.useEffect(() => {
45
+ const [u, f] = De.useState(null), [I, v] = De.useState(!1);
46
+ return De.useEffect(() => {
47
47
  if (!t) {
48
- f(/* @__PURE__ */ e(Ue, { onClick: n, ...o, children: a }));
48
+ f(/* @__PURE__ */ e($e, { onClick: n, ...o, children: a }));
49
49
  return;
50
50
  }
51
- v(!1), f(/* @__PURE__ */ e(Ue, { onClick: n, ...o, children: a }));
52
- }, [t, r, a, d, o]), /* @__PURE__ */ e(Ee, { children: u });
53
- }, Ae = ({
51
+ v(!1), f(/* @__PURE__ */ e($e, { onClick: n, ...o, children: a }));
52
+ }, [t, r, a, d, o]), /* @__PURE__ */ e(Ie, { children: u });
53
+ }, ye = ({
54
54
  children: t
55
- }) => /* @__PURE__ */ e(Ee, { children: t }), pr = (t) => be(() => ({
55
+ }) => /* @__PURE__ */ e(Ie, { children: t }), gr = (t) => we(() => ({
56
56
  shouldWrap: !1,
57
57
  isSecurityAvailable: !1,
58
58
  hasResourceName: !!t
59
59
  }), [t]);
60
- function gr({
60
+ function xr({
61
61
  innerRef: t,
62
62
  title: r,
63
63
  isError: a = !1,
@@ -67,14 +67,14 @@ function gr({
67
67
  clearError: u = () => {
68
68
  },
69
69
  autoCloseAlertError: f = 15e3,
70
- width: T = "100%",
70
+ width: I = "100%",
71
71
  height: v = "100%",
72
72
  withBorder: ee = !0,
73
73
  children: l,
74
74
  radius: c,
75
75
  variant: M,
76
76
  footerAlign: A = "left",
77
- footerContent: V,
77
+ footerContent: T,
78
78
  dataSource: h,
79
79
  onSave: B,
80
80
  onCancel: q,
@@ -87,15 +87,15 @@ function gr({
87
87
  resourceName: Y,
88
88
  resourceDescription: _,
89
89
  requiredPermissions: S,
90
- fallbackComponent: E,
90
+ fallbackComponent: V,
91
91
  securityOptions: F,
92
92
  ...N
93
93
  }) {
94
- const w = we(), [G, R] = te(a), [re, H] = te(o), k = ut();
94
+ const w = Ae(), [G, R] = te(a), [re, H] = te(o), k = ut();
95
95
  ge({
96
96
  autoRegisterActions: F?.autoRegisterActions ?? !0
97
97
  });
98
- const D = Se(
98
+ const D = Pe(
99
99
  "ArchbaseFormTemplate",
100
100
  h,
101
101
  void 0,
@@ -103,14 +103,14 @@ function gr({
103
103
  );
104
104
  et({
105
105
  dataSource: h,
106
- listener: (I) => {
107
- I.type === pe.onError && (R(!0), H(I.error)), (I.type === pe.afterEdit || I.type === pe.afterInsert) && (D.isDataSourceV2 || k());
106
+ listener: (E) => {
107
+ E.type === pe.onError && (R(!0), H(E.error)), (E.type === pe.afterEdit || E.type === pe.afterInsert) && (D.isDataSourceV2 || k());
108
108
  }
109
109
  });
110
- const $ = Dt(), J = async (I) => {
110
+ const $ = Bt(), J = async (E) => {
111
111
  try {
112
- B ? B(I) : (P && await P(I), h.isBrowsing() || h.save().then(() => {
113
- $?.clearAll(), X && X(I);
112
+ B ? B(E) : (P && await P(E), h.isBrowsing() || h.save().then(() => {
113
+ $?.clearAll(), X && X(E);
114
114
  }).catch((Z) => {
115
115
  y && y(de(Z)), R(!0), H(de(Z));
116
116
  }));
@@ -120,19 +120,19 @@ function gr({
120
120
  }, U = () => {
121
121
  try {
122
122
  q ? q() : (b && b(), h.isBrowsing() || h.cancel(), $?.clearAll(), x && x());
123
- } catch (I) {
124
- y && y(de(I)), R(!0), H(de(I));
123
+ } catch (E) {
124
+ y && y(de(E)), R(!0), H(de(E));
125
125
  }
126
126
  }, W = () => {
127
127
  u && u(), R(!1), H("");
128
128
  };
129
129
  return /* @__PURE__ */ e(
130
- Ae,
130
+ ye,
131
131
  {
132
132
  resourceName: Y,
133
133
  resourceDescription: _,
134
134
  requiredPermissions: S,
135
- fallbackComponent: E,
135
+ fallbackComponent: V,
136
136
  onSecurityReady: F?.onSecurityReady,
137
137
  onAccessDenied: F?.onAccessDenied,
138
138
  children: /* @__PURE__ */ e(ft, { children: /* @__PURE__ */ C(
@@ -142,20 +142,20 @@ function gr({
142
142
  withBorder: ee,
143
143
  radius: c,
144
144
  style: {
145
- width: T,
145
+ width: I,
146
146
  height: v,
147
147
  display: "flex",
148
148
  flexDirection: "column",
149
149
  padding: 4
150
150
  },
151
151
  children: [
152
- G && /* @__PURE__ */ e(Ne, { style: { flexShrink: 0 }, children: /* @__PURE__ */ e(
153
- Le,
152
+ G && /* @__PURE__ */ e(Se, { style: { flexShrink: 0 }, children: /* @__PURE__ */ e(
153
+ je,
154
154
  {
155
155
  autoClose: f,
156
156
  withCloseButton: !0,
157
157
  withBorder: !0,
158
- icon: /* @__PURE__ */ e(je, { size: "1.4rem" }),
158
+ icon: /* @__PURE__ */ e(Ue, { size: "1.4rem" }),
159
159
  title: m().t("WARNING"),
160
160
  titleColor: "rgb(250, 82, 82)",
161
161
  variant: M ?? w.variant,
@@ -179,7 +179,7 @@ function gr({
179
179
  }
180
180
  ),
181
181
  /* @__PURE__ */ C(
182
- Ne,
182
+ Se,
183
183
  {
184
184
  style: {
185
185
  flexShrink: 0,
@@ -190,14 +190,14 @@ function gr({
190
190
  gap: "1rem"
191
191
  },
192
192
  children: [
193
- A === "right" && V && /* @__PURE__ */ e(Ne, { style: { flex: 1 }, children: V }),
194
- h && !h.isBrowsing() ? /* @__PURE__ */ C(ve, { gap: "md", children: [
193
+ A === "right" && T && /* @__PURE__ */ e(Se, { style: { flex: 1 }, children: T }),
194
+ h && !h.isBrowsing() ? /* @__PURE__ */ C(be, { gap: "md", children: [
195
195
  /* @__PURE__ */ e(
196
196
  ne,
197
197
  {
198
198
  actionName: "save",
199
199
  actionDescription: `Salvar ${_ || "registro"}`,
200
- leftSection: /* @__PURE__ */ e(Vt, {}),
200
+ leftSection: /* @__PURE__ */ e(Dt, {}),
201
201
  onClick: () => J(h.getCurrentRecord()),
202
202
  disabled: h && h.isBrowsing(),
203
203
  variant: M ?? w.variant,
@@ -210,7 +210,7 @@ function gr({
210
210
  {
211
211
  actionName: "cancel",
212
212
  actionDescription: "Cancelar operação",
213
- leftSection: /* @__PURE__ */ e(Pe, {}),
213
+ leftSection: /* @__PURE__ */ e(Be, {}),
214
214
  onClick: U,
215
215
  disabled: h && h.isBrowsing(),
216
216
  variant: M ?? w.variant,
@@ -218,18 +218,18 @@ function gr({
218
218
  children: `${m().t("Cancel")}`
219
219
  }
220
220
  )
221
- ] }) : /* @__PURE__ */ e(ve, { gap: "md", children: /* @__PURE__ */ e(
221
+ ] }) : /* @__PURE__ */ e(be, { gap: "md", children: /* @__PURE__ */ e(
222
222
  ne,
223
223
  {
224
224
  actionName: "close",
225
225
  actionDescription: "Fechar formulário",
226
- leftSection: /* @__PURE__ */ e(Pe, {}),
226
+ leftSection: /* @__PURE__ */ e(Be, {}),
227
227
  onClick: U,
228
228
  variant: M ?? w.variant,
229
229
  children: `${m().t("Close")}`
230
230
  }
231
231
  ) }),
232
- (A === "left" || A === "center") && V && /* @__PURE__ */ e(Ne, { style: { flex: A === "left" ? 1 : 0, textAlign: "right" }, children: V })
232
+ (A === "left" || A === "center") && T && /* @__PURE__ */ e(Se, { style: { flex: A === "left" ? 1 : 0, textAlign: "right" }, children: T })
233
233
  ]
234
234
  }
235
235
  )
@@ -239,7 +239,7 @@ function gr({
239
239
  }
240
240
  );
241
241
  }
242
- function xr({
242
+ function vr({
243
243
  title: t,
244
244
  withOverlay: r = !0,
245
245
  overlayProps: a,
@@ -248,14 +248,14 @@ function xr({
248
248
  closeButtonProps: o,
249
249
  opened: u,
250
250
  fullScreen: f,
251
- centered: T,
251
+ centered: I,
252
252
  variant: v,
253
253
  closeOnEscape: ee = !0,
254
254
  size: l,
255
255
  dataSource: c,
256
256
  height: M,
257
257
  userActions: A,
258
- onAfterSave: V,
258
+ onAfterSave: T,
259
259
  onClickOk: h,
260
260
  onClickCancel: B,
261
261
  onBeforeOk: q,
@@ -269,18 +269,18 @@ function xr({
269
269
  loadingOverlayStyles: _,
270
270
  // Props de segurança (opcionais)
271
271
  resourceName: S,
272
- resourceDescription: E,
272
+ resourceDescription: V,
273
273
  requiredPermissions: F,
274
274
  fallbackComponent: N,
275
275
  securityOptions: w,
276
276
  ...G
277
277
  }) {
278
- const R = we(), re = Oe(), { colorScheme: H } = Ke(), [k, D] = te(X), [$, J] = te(b), [U, W] = te(!1), I = ut();
278
+ const R = Ae(), re = Oe(), { colorScheme: H } = Ke(), [k, D] = te(X), [$, J] = te(b), [U, W] = te(!1), E = ut();
279
279
  ge({
280
- resourceDescription: E || t?.toString(),
280
+ resourceDescription: V || t?.toString(),
281
281
  autoRegisterActions: w?.autoRegisterActions ?? !0
282
282
  });
283
- const Z = Se(
283
+ const Z = Pe(
284
284
  "ArchbaseFormModalTemplate",
285
285
  c,
286
286
  void 0,
@@ -289,13 +289,13 @@ function xr({
289
289
  et({
290
290
  dataSource: c,
291
291
  listener: (K) => {
292
- K.type === pe.onError && (D(!0), J(K.error)), (K.type === pe.afterEdit || K.type === pe.afterInsert) && (Z.isDataSourceV2 || I());
292
+ K.type === pe.onError && (D(!0), J(K.error)), (K.type === pe.afterEdit || K.type === pe.afterInsert) && (Z.isDataSourceV2 || E());
293
293
  }
294
294
  });
295
295
  const fe = async () => {
296
296
  if (c && !c.isBrowsing())
297
297
  try {
298
- W(!0), await c.save(), V && V(c.getCurrentRecord());
298
+ W(!0), await c.save(), T && T(c.getCurrentRecord());
299
299
  } catch (K) {
300
300
  return y && y(de(K)), D(!0), J(de(K)), W(!1), !1;
301
301
  }
@@ -315,8 +315,8 @@ function xr({
315
315
  const K = q(c.getCurrentRecord());
316
316
  K instanceof Promise && K.then(async () => {
317
317
  await fe() && h && h();
318
- }).catch((ye) => {
319
- y && y(de(ye)), D(!0), J(de(ye));
318
+ }).catch((Ce) => {
319
+ y && y(de(Ce)), D(!0), J(de(Ce));
320
320
  });
321
321
  } else
322
322
  await fe() && h && h();
@@ -328,10 +328,10 @@ function xr({
328
328
  x && x(), D(!1), J("");
329
329
  };
330
330
  return /* @__PURE__ */ e(
331
- Ae,
331
+ ye,
332
332
  {
333
333
  resourceName: S,
334
- resourceDescription: E,
334
+ resourceDescription: V,
335
335
  requiredPermissions: F,
336
336
  fallbackComponent: N,
337
337
  onSecurityReady: w?.onSecurityReady,
@@ -350,7 +350,7 @@ function xr({
350
350
  onClose: ie,
351
351
  opened: u,
352
352
  fullScreen: f,
353
- centered: T,
353
+ centered: I,
354
354
  closeOnEscape: ee,
355
355
  size: l,
356
356
  ...G,
@@ -358,12 +358,12 @@ function xr({
358
358
  /* @__PURE__ */ e(at, { styles: _, visible: U, opacity: 0.8 }),
359
359
  /* @__PURE__ */ C(tt, { height: M, children: [
360
360
  k ? /* @__PURE__ */ e(vt, { size: "100px", children: /* @__PURE__ */ e(
361
- Le,
361
+ je,
362
362
  {
363
363
  autoClose: Y,
364
364
  withCloseButton: !0,
365
365
  withBorder: !0,
366
- icon: /* @__PURE__ */ e(je, { size: "1.4rem" }),
366
+ icon: /* @__PURE__ */ e(Ue, { size: "1.4rem" }),
367
367
  title: m().t("WARNING"),
368
368
  titleColor: "rgb(250, 82, 82)",
369
369
  variant: v ?? R.variant,
@@ -373,13 +373,13 @@ function xr({
373
373
  ) }) : null,
374
374
  /* @__PURE__ */ e(rt, { children: /* @__PURE__ */ e(bt, { children: d }) }),
375
375
  /* @__PURE__ */ e(nt, { size: "40px", children: /* @__PURE__ */ C(ue, { justify: "space-between", align: "center", children: [
376
- /* @__PURE__ */ e(ve, { children: A }),
377
- c && !c.isBrowsing() ? /* @__PURE__ */ C(ve, { gap: "md", children: [
376
+ /* @__PURE__ */ e(be, { children: A }),
377
+ c && !c.isBrowsing() ? /* @__PURE__ */ C(be, { gap: "md", children: [
378
378
  /* @__PURE__ */ e(
379
379
  ne,
380
380
  {
381
381
  actionName: "save",
382
- actionDescription: `Salvar ${E || t || "registro"}`,
382
+ actionDescription: `Salvar ${V || t || "registro"}`,
383
383
  leftSection: /* @__PURE__ */ e(ht, {}),
384
384
  onClick: z,
385
385
  disabled: c && c.isBrowsing(),
@@ -393,7 +393,7 @@ function xr({
393
393
  {
394
394
  actionName: "cancel",
395
395
  actionDescription: "Cancelar operação",
396
- leftSection: /* @__PURE__ */ e(Pe, {}),
396
+ leftSection: /* @__PURE__ */ e(Be, {}),
397
397
  onClick: O,
398
398
  disabled: c && c.isBrowsing(),
399
399
  variant: v ?? R.variant,
@@ -401,12 +401,12 @@ function xr({
401
401
  children: `${m().t("Cancel")}`
402
402
  }
403
403
  )
404
- ] }) : /* @__PURE__ */ e(ve, { gap: "md", children: /* @__PURE__ */ e(
404
+ ] }) : /* @__PURE__ */ e(be, { gap: "md", children: /* @__PURE__ */ e(
405
405
  ne,
406
406
  {
407
407
  actionName: "close",
408
408
  actionDescription: "Fechar janela",
409
- leftSection: /* @__PURE__ */ e(Pe, {}),
409
+ leftSection: /* @__PURE__ */ e(Be, {}),
410
410
  onClick: O,
411
411
  variant: v ?? R.variant,
412
412
  children: `${m().t("Close")}`
@@ -420,7 +420,7 @@ function xr({
420
420
  }
421
421
  );
422
422
  }
423
- function vr({
423
+ function br({
424
424
  title: t,
425
425
  withOverlay: r = !0,
426
426
  overlayProps: a,
@@ -429,14 +429,14 @@ function vr({
429
429
  closeButtonProps: o,
430
430
  opened: u,
431
431
  fullScreen: f,
432
- centered: T,
432
+ centered: I,
433
433
  variant: v,
434
434
  closeOnEscape: ee = !0,
435
435
  size: l,
436
436
  height: c,
437
437
  onlyOkButton: M = !1,
438
438
  onClose: A,
439
- onClickOk: V,
439
+ onClickOk: T,
440
440
  onClickCancel: h,
441
441
  userActions: B,
442
442
  // Props de segurança (opcionais)
@@ -446,19 +446,19 @@ function vr({
446
446
  fallbackComponent: b,
447
447
  securityOptions: x
448
448
  }) {
449
- const y = we(), Y = Oe(), { colorScheme: _ } = Ke();
449
+ const y = Ae(), Y = Oe(), { colorScheme: _ } = Ke();
450
450
  ge({
451
451
  autoRegisterActions: x?.autoRegisterActions ?? !0
452
452
  });
453
453
  const S = () => {
454
- V && V(), A();
455
- }, E = () => {
454
+ T && T(), A();
455
+ }, V = () => {
456
456
  h && h(), A();
457
457
  }, F = () => {
458
458
  gt.showWarning(m().t("Click on Ok or Cancel to close"));
459
459
  };
460
460
  return /* @__PURE__ */ e(
461
- Ae,
461
+ ye,
462
462
  {
463
463
  resourceName: q,
464
464
  resourceDescription: P,
@@ -480,14 +480,14 @@ function vr({
480
480
  onClose: F,
481
481
  opened: u,
482
482
  fullScreen: f,
483
- centered: T,
483
+ centered: I,
484
484
  closeOnEscape: ee,
485
485
  size: l,
486
486
  children: /* @__PURE__ */ C(tt, { height: c, children: [
487
487
  /* @__PURE__ */ e(rt, { children: /* @__PURE__ */ e(bt, { children: d }) }),
488
488
  /* @__PURE__ */ e(nt, { size: "40px", children: /* @__PURE__ */ C(ue, { justify: "space-between", align: "center", children: [
489
- /* @__PURE__ */ e(ve, { children: B }),
490
- /* @__PURE__ */ C(ve, { gap: "md", children: [
489
+ /* @__PURE__ */ e(be, { children: B }),
490
+ /* @__PURE__ */ C(be, { gap: "md", children: [
491
491
  /* @__PURE__ */ e(
492
492
  ne,
493
493
  {
@@ -505,8 +505,8 @@ function vr({
505
505
  {
506
506
  actionName: "cancel",
507
507
  actionDescription: "Cancelar operação",
508
- leftSection: /* @__PURE__ */ e(Pe, {}),
509
- onClick: E,
508
+ leftSection: /* @__PURE__ */ e(Be, {}),
509
+ onClick: V,
510
510
  variant: v ?? y.variant,
511
511
  color: "red",
512
512
  children: h ? `${m().t("Cancel")}` : `${m().t("Close")}`
@@ -520,7 +520,7 @@ function vr({
520
520
  }
521
521
  );
522
522
  }
523
- const Kt = (t, r, a) => {
523
+ const Qt = (t, r, a) => {
524
524
  if (!t || !r || !r.existsValue(`${t.viewName}_${t.componentName}`)) {
525
525
  let d = -1, n;
526
526
  return a && a.getFilters().length > 0 && (d = 0, n = JSON.parse(a.getFirstFilter()?.filter)), {
@@ -531,7 +531,7 @@ const Kt = (t, r, a) => {
531
531
  }
532
532
  return r.getValue(`${t.viewName}_${t.componentName}`);
533
533
  };
534
- function Qt(t, r) {
534
+ function Xt(t, r) {
535
535
  const {
536
536
  title: a,
537
537
  printTitle: d,
@@ -539,14 +539,14 @@ function Qt(t, r) {
539
539
  filterOptions: o,
540
540
  pageSize: u = 15,
541
541
  pageIndex: f = 0,
542
- columns: T,
542
+ columns: I,
543
543
  filterFields: v,
544
544
  logoPrint: ee,
545
545
  userActions: l,
546
546
  userRowActions: c,
547
547
  customRenderRowActions: M,
548
548
  innerRef: A,
549
- isLoading: V = !1,
549
+ isLoading: T = !1,
550
550
  isLoadingFilter: h = !1,
551
551
  isError: B = !1,
552
552
  enableTopToolbar: q = !0,
@@ -559,7 +559,7 @@ function Qt(t, r) {
559
559
  height: Y = "100%",
560
560
  onSearchByFilter: _,
561
561
  getRowId: S,
562
- withBorder: E = !0,
562
+ withBorder: V = !0,
563
563
  filterPersistenceDelegator: F,
564
564
  variant: N,
565
565
  store: w,
@@ -573,7 +573,7 @@ function Qt(t, r) {
573
573
  tableHeadCellPadding: J,
574
574
  renderDetailPanel: U,
575
575
  renderTopToolbar: W,
576
- toolbarAlignment: I = "right",
576
+ toolbarAlignment: E = "right",
577
577
  toolbarLeftContent: Z,
578
578
  onSelectedRowsChanged: fe,
579
579
  onCellDoubleClick: s,
@@ -583,27 +583,28 @@ function Qt(t, r) {
583
583
  resourceName: ie,
584
584
  resourceDescription: oe,
585
585
  requiredPermissions: K,
586
- fallbackComponent: ye,
586
+ fallbackComponent: Ce,
587
587
  securityOptions: xe,
588
588
  // Props para controle de bordas internas
589
- withToolbarBorder: Ie,
590
- withPaginationBorder: Me,
591
- toolbarPadding: ke,
592
- paginationPadding: ze,
593
- rowHeight: qe
589
+ withToolbarBorder: Te,
590
+ withPaginationBorder: Le,
591
+ toolbarPadding: Me,
592
+ paginationPadding: ke,
593
+ rowHeight: ze,
594
+ hideFooter: qe = !0
594
595
  } = t, _e = ae(null), j = ae(null);
595
596
  Oe();
596
597
  const { colorScheme: lt } = Ke();
597
598
  ge({
598
599
  autoRegisterActions: xe?.autoRegisterActions ?? !0
599
600
  });
600
- const Ce = Se(
601
+ const Fe = Pe(
601
602
  "ArchbaseGridTemplate",
602
603
  n,
603
604
  void 0,
604
605
  void 0
605
606
  );
606
- Nt(r, () => ({
607
+ Gt(r, () => ({
607
608
  refreshData: () => {
608
609
  j.current && j.current.refreshData();
609
610
  },
@@ -620,14 +621,14 @@ function Qt(t, r) {
620
621
  getDataGridRef: () => j,
621
622
  getFilterModel: () => j.current ? j.current.getFilterModel() : { items: [], quickFilterValues: [] }
622
623
  }), [j]);
623
- const [L, Fe] = te({
624
+ const [L, Re] = te({
624
625
  activeFilterIndex: -1,
625
626
  currentFilter: void 0,
626
627
  expandedFilter: !1
627
628
  });
628
629
  mt(() => {
629
- const g = Kt(o, w, F);
630
- Fe(g);
630
+ const g = Qt(o, w, F);
631
+ Re(g);
631
632
  }, [h]);
632
633
  const He = (g) => {
633
634
  if (M)
@@ -645,20 +646,20 @@ function Qt(t, r) {
645
646
  variant: N ?? he.variant
646
647
  }
647
648
  );
648
- }, he = we(), Re = ae(null), Je = be(() => Z, [Z]);
649
- Be.useEffect(() => {
650
- A && A.current !== Re.current && A.current && Re.current && (A.current = Re.current);
649
+ }, he = Ae(), Ee = ae(null), i = we(() => Z, [Z]);
650
+ De.useEffect(() => {
651
+ A && A.current !== Ee.current && A.current && Ee.current && (A.current = Ee.current);
651
652
  }, [A]);
652
- const i = (g, ce) => {
653
+ const p = (g, ce) => {
653
654
  const Q = { ...L, currentFilter: g, activeFilterIndex: ce };
654
- Fe(Q), w && o && w?.setValue(`${o.viewName}_${o.componentName}`, Q);
655
- }, p = (g) => {
655
+ Re(Q), w && o && w?.setValue(`${o.viewName}_${o.componentName}`, Q);
656
+ }, le = (g) => {
656
657
  const ce = { ...L, expandedFilter: g };
657
- Fe(ce), w && o && w?.setValue(`${o.viewName}_${o.componentName}`, ce);
658
- }, le = (g, ce) => {
658
+ Re(ce), w && o && w?.setValue(`${o.viewName}_${o.componentName}`, ce);
659
+ }, se = (g, ce) => {
659
660
  const Q = { ...L, currentFilter: g, activeFilterIndex: ce };
660
- Fe(Q), w && o && w?.setValue(`${o.viewName}_${o.componentName}`, Q);
661
- }, se = () => {
661
+ Re(Q), w && o && w?.setValue(`${o.viewName}_${o.componentName}`, Q);
662
+ }, Je = () => {
662
663
  if (L.currentFilter)
663
664
  if (_)
664
665
  _();
@@ -667,25 +668,25 @@ function Qt(t, r) {
667
668
  L.currentFilter.filter.quickFilterText && L.currentFilter.filter.quickFilterText !== "" ? (g.filter = JSON.stringify({
668
669
  search: L.currentFilter.filter.quickFilterText,
669
670
  fields: L.currentFilter.filter.quickFilterFieldsText
670
- }), g.sort = L.currentFilter.sort.quickFilterSort ? L.currentFilter.sort.quickFilterSort.split(",") : []) : (g.filter = void 0, g.sort = void 0), n.refreshData(g), Ce.isDataSourceV2 || Ce.v1State.forceUpdate();
671
+ }), g.sort = L.currentFilter.sort.quickFilterSort ? L.currentFilter.sort.quickFilterSort.split(",") : []) : (g.filter = void 0, g.sort = void 0), n.refreshData(g), Fe.isDataSourceV2 || Fe.v1State.forceUpdate();
671
672
  } else {
672
- const g = _t(L.currentFilter);
673
+ const g = Ht(L.currentFilter);
673
674
  if (g && g.expressionNode) {
674
- const ce = Bt(g.expressionNode), Q = n.getOptions();
675
- Q.filter = ce, Q.sort = g?.sortStrings, n.refreshData(Q), Ce.isDataSourceV2 || Ce.v1State.forceUpdate();
675
+ const ce = Pt(g.expressionNode), Q = n.getOptions();
676
+ Q.filter = ce, Q.sort = g?.sortStrings, n.refreshData(Q), Fe.isDataSourceV2 || Fe.v1State.forceUpdate();
676
677
  }
677
678
  }
678
679
  };
679
- let Te, Ve;
680
- const De = (g) => {
681
- Te = g;
682
- }, At = (g) => {
680
+ let Ve, ve;
681
+ const At = (g) => {
683
682
  Ve = g;
684
- }, yt = () => {
685
- Ve && Ve();
683
+ }, yt = (g) => {
684
+ ve = g;
686
685
  }, Ct = () => {
687
- Te && Te();
688
- }, Ft = () => x === "none" ? /* @__PURE__ */ e("div", {}) : x === "advanced" ? /* @__PURE__ */ e(
686
+ ve && ve();
687
+ }, Ft = () => {
688
+ Ve && Ve();
689
+ }, Rt = () => x === "none" ? /* @__PURE__ */ e("div", {}) : x === "advanced" ? /* @__PURE__ */ e(
689
690
  it,
690
691
  {
691
692
  id: o?.componentName,
@@ -697,12 +698,12 @@ function Qt(t, r) {
697
698
  persistenceDelegator: F,
698
699
  currentFilter: L.currentFilter,
699
700
  activeFilterIndex: L.activeFilterIndex,
700
- onSelectedFilter: le,
701
- onFilterChanged: i,
702
- onSearchByFilter: se,
703
- onToggleExpandedFilter: p,
704
- onExport: yt,
705
- onPrint: Ct,
701
+ onSelectedFilter: se,
702
+ onFilterChanged: p,
703
+ onSearchByFilter: Je,
704
+ onToggleExpandedFilter: le,
705
+ onExport: Ct,
706
+ onPrint: Ft,
706
707
  showExportButton: !0,
707
708
  showPrintButton: !0,
708
709
  width: "560px",
@@ -711,22 +712,22 @@ function Qt(t, r) {
711
712
  }
712
713
  ) : x === "normal" ? /* @__PURE__ */ e("div", {}) : /* @__PURE__ */ e("div", {});
713
714
  return /* @__PURE__ */ e(
714
- Ae,
715
+ ye,
715
716
  {
716
717
  resourceName: ie,
717
718
  resourceDescription: oe,
718
719
  requiredPermissions: K,
719
- fallbackComponent: ye,
720
+ fallbackComponent: Ce,
720
721
  onSecurityReady: xe?.onSecurityReady,
721
722
  onAccessDenied: xe?.onAccessDenied,
722
- children: /* @__PURE__ */ C(We, { withBorder: E, ref: Re, style: { height: "calc(100% - 4px)" }, children: [
723
+ children: /* @__PURE__ */ C(We, { withBorder: V, ref: Ee, style: { height: "100%" }, children: [
723
724
  B ? /* @__PURE__ */ e(
724
- Le,
725
+ je,
725
726
  {
726
727
  autoClose: 2e4,
727
728
  withCloseButton: !0,
728
729
  withBorder: !0,
729
- icon: /* @__PURE__ */ e(je, { size: "1.4rem" }),
730
+ icon: /* @__PURE__ */ e(Ue, { size: "1.4rem" }),
730
731
  title: m().t("archbase:WARNING"),
731
732
  titleColor: "rgb(250, 82, 82)",
732
733
  variant: N ?? he.variant,
@@ -735,14 +736,14 @@ function Qt(t, r) {
735
736
  }
736
737
  ) : null,
737
738
  /* @__PURE__ */ C(
738
- jt,
739
+ Lt,
739
740
  {
740
741
  gridRef: j,
741
742
  printTitle: d || a,
742
743
  logoPrint: ee,
743
744
  width: y,
744
745
  height: Y,
745
- withBorder: E,
746
+ withBorder: !1,
746
747
  dataSource: n,
747
748
  enableColumnResizing: !0,
748
749
  enableRowNumbers: H,
@@ -752,7 +753,7 @@ function Qt(t, r) {
752
753
  enableTopToolbarActions: P,
753
754
  manualPagination: !0,
754
755
  manualSorting: !0,
755
- isLoading: V,
756
+ isLoading: T,
756
757
  pageSize: u,
757
758
  pageIndex: f,
758
759
  allowColumnFilters: x !== "none",
@@ -766,9 +767,9 @@ function Qt(t, r) {
766
767
  renderRowActions: k ? He : void 0,
767
768
  positionActionsColumn: D,
768
769
  actionsColumnWidth: $,
769
- toolbarAlignment: I,
770
- toolbarLeftContent: Je,
771
- renderToolbarActions: x === "advanced" || x === "none" ? Ft : void 0,
770
+ toolbarAlignment: E,
771
+ toolbarLeftContent: i,
772
+ renderToolbarActions: x === "advanced" || x === "none" ? Rt : void 0,
772
773
  paginationLabels: O,
773
774
  cellPadding: G,
774
775
  bottomToolbarMinHeight: R,
@@ -776,17 +777,18 @@ function Qt(t, r) {
776
777
  getRowId: S,
777
778
  renderDetailPanel: U ? ({ row: g }) => U({ row: g }) : void 0,
778
779
  renderTopToolbar: W,
779
- onExport: At,
780
- onPrint: De,
780
+ onExport: yt,
781
+ onPrint: At,
781
782
  variant: N,
782
- withToolbarBorder: Ie,
783
- withPaginationBorder: Me,
784
- toolbarPadding: ke,
785
- paginationPadding: ze,
786
- rowHeight: qe,
783
+ withToolbarBorder: Te,
784
+ withPaginationBorder: Le,
785
+ toolbarPadding: Me,
786
+ paginationPadding: ke,
787
+ rowHeight: ze,
788
+ hideFooter: qe,
787
789
  children: [
788
- T,
789
- l?.visible ? /* @__PURE__ */ e(Lt, { children: /* @__PURE__ */ C(Ee, { children: [
790
+ I,
791
+ l?.visible ? /* @__PURE__ */ e(Mt, { children: /* @__PURE__ */ C(Ie, { children: [
790
792
  /* @__PURE__ */ e("h3", { className: "only-print", children: d || a }),
791
793
  /* @__PURE__ */ e("div", { className: "no-print", children: /* @__PURE__ */ C(ue, { gap: "8px", rowGap: "8px", children: [
792
794
  l.customUserActions && l.customUserActionsPosition === "left" ? l.customUserActions : null,
@@ -851,8 +853,8 @@ function Qt(t, r) {
851
853
  }
852
854
  );
853
855
  }
854
- const br = St(Qt);
855
- function Xt(t, r, a, d) {
856
+ const wr = Nt(Xt);
857
+ function Yt(t, r, a, d) {
856
858
  if (t && t.headerGridColumns) {
857
859
  const n = t.headerGridColumns.left ? t.headerGridColumns.left : { xs: "auto", sm: "auto", md: "auto", lg: "auto" }, o = t.headerGridColumns.middle ? t.headerGridColumns.middle : { xs: "auto", sm: "auto", md: "auto", lg: "auto" }, u = t.headerGridColumns.right ? t.headerGridColumns.right : { xs: "auto", sm: "auto", md: "auto", lg: "auto" };
858
860
  return /* @__PURE__ */ C(me, { m: 0, gutter: "xs", justify: "center", align: "center", grow: !0, children: [
@@ -942,7 +944,7 @@ function Xt(t, r, a, d) {
942
944
  ] });
943
945
  }
944
946
  }
945
- function Yt(t, r, a, d) {
947
+ function Zt(t, r, a, d) {
946
948
  if (t && t.footerGridColumns) {
947
949
  const n = t.footerGridColumns.left ? t.footerGridColumns.left : { xs: "content", sm: "content", md: "content", lg: "content" }, o = t.footerGridColumns.middle ? t.footerGridColumns.middle : { xs: "auto", sm: "auto", md: "auto", lg: "auto" }, u = t.footerGridColumns.right ? t.footerGridColumns.right : { xs: "content", sm: "content", md: "content", lg: "content" };
948
950
  return /* @__PURE__ */ C(me, { m: 0, gutter: "xs", justify: "center", align: "center", grow: !0, children: [
@@ -1045,14 +1047,14 @@ function wt({
1045
1047
  width: o = "100%",
1046
1048
  height: u = "100%",
1047
1049
  withBorder: f = !0,
1048
- children: T,
1050
+ children: I,
1049
1051
  radius: v,
1050
1052
  debug: ee,
1051
1053
  defaultDebug: l,
1052
1054
  headerLeft: c,
1053
1055
  headerMiddle: M,
1054
1056
  headerRight: A,
1055
- footerLeft: V,
1057
+ footerLeft: T,
1056
1058
  footerMiddle: h,
1057
1059
  footerRight: B,
1058
1060
  variant: q,
@@ -1070,24 +1072,24 @@ function wt({
1070
1072
  fallbackComponent: _,
1071
1073
  securityOptions: S
1072
1074
  }) {
1073
- const [E, F] = It({
1075
+ const [V, F] = Tt({
1074
1076
  value: ee,
1075
1077
  defaultValue: l,
1076
1078
  finalValue: !1
1077
1079
  });
1078
- Tt([[b && b.debugLayoutHotKey, () => F(!E)]]);
1079
- const N = we(), { t: w } = Pt();
1080
+ Vt([[b && b.debugLayoutHotKey, () => F(!V)]]);
1081
+ const N = Ae(), { t: w } = St();
1080
1082
  ge({
1081
1083
  autoRegisterActions: S?.autoRegisterActions ?? !0
1082
1084
  });
1083
- const G = ae(null), R = r || G, re = ae(null), H = ae(null), k = $e(re), D = $e(H), $ = $e(R), J = be(() => ({
1084
- height: $.height - k.height - D.height - Number(Rt("0.625rem")),
1085
+ const G = ae(null), R = r || G, re = ae(null), H = ae(null), k = Ge(re), D = Ge(H), $ = Ge(R), J = we(() => ({
1086
+ height: $.height - k.height - D.height - Number(Et("0.625rem")),
1085
1087
  width: $.width - k.width - D.width
1086
1088
  }), [$.height, $.width, k.height, k.width, D.height, D.width]), U = ae(l);
1087
1089
  mt(() => {
1088
1090
  l !== U.current && (F(l), U.current = l);
1089
1091
  }, [l, F]);
1090
- const W = /* @__PURE__ */ C(Ee, { children: [
1092
+ const W = /* @__PURE__ */ C(Ie, { children: [
1091
1093
  /* @__PURE__ */ e(
1092
1094
  We,
1093
1095
  {
@@ -1096,23 +1098,23 @@ function wt({
1096
1098
  radius: v,
1097
1099
  style: { width: o, height: u, padding: 4, ...X },
1098
1100
  children: /* @__PURE__ */ C(tt, { height: "100%", children: [
1099
- /* @__PURE__ */ e(vt, { size: k.height, children: /* @__PURE__ */ e("div", { ref: re, children: Xt(P, c, A, E) }) }),
1101
+ /* @__PURE__ */ e(vt, { size: k.height, children: /* @__PURE__ */ e("div", { ref: re, children: Yt(P, c, A, V) }) }),
1100
1102
  /* @__PURE__ */ e(rt, { children: /* @__PURE__ */ e(
1101
1103
  st,
1102
1104
  {
1103
1105
  h: J.height,
1104
1106
  style: {
1105
- border: E ? "1px dashed" : "",
1107
+ border: V ? "1px dashed" : "",
1106
1108
  padding: "calc(0.625rem / 2)"
1107
1109
  },
1108
- children: T ? /* @__PURE__ */ C(Gt, { children: [
1110
+ children: I ? /* @__PURE__ */ C($t, { children: [
1109
1111
  a && /* @__PURE__ */ e(
1110
- Le,
1112
+ je,
1111
1113
  {
1112
1114
  autoClose: 2e4,
1113
1115
  withCloseButton: !0,
1114
1116
  withBorder: !0,
1115
- icon: /* @__PURE__ */ e(je, { size: "1.4rem" }),
1117
+ icon: /* @__PURE__ */ e(Ue, { size: "1.4rem" }),
1116
1118
  title: `${w("WARNING")}`,
1117
1119
  titleColor: "rgb(250, 82, 82)",
1118
1120
  variant: q ?? N.variant,
@@ -1120,16 +1122,16 @@ function wt({
1120
1122
  children: /* @__PURE__ */ e("span", { children: d })
1121
1123
  }
1122
1124
  ),
1123
- T
1124
- ] }) : E && /* @__PURE__ */ e(ue, { h: J.height + 80, justify: "center", align: "center", wrap: "wrap", children: /* @__PURE__ */ e(Et, { size: "lg", children: "INSIRA O CONTEÚDO DO PAINEL AQUI." }) })
1125
+ I
1126
+ ] }) : V && /* @__PURE__ */ e(ue, { h: J.height + 80, justify: "center", align: "center", wrap: "wrap", children: /* @__PURE__ */ e(It, { size: "lg", children: "INSIRA O CONTEÚDO DO PAINEL AQUI." }) })
1125
1127
  }
1126
1128
  ) }),
1127
- /* @__PURE__ */ e(nt, { size: D.height, children: /* @__PURE__ */ e("div", { ref: H, children: Yt(P, V, B, E) }) })
1129
+ /* @__PURE__ */ e(nt, { size: D.height, children: /* @__PURE__ */ e("div", { ref: H, children: Zt(P, T, B, V) }) })
1128
1130
  ] })
1129
1131
  }
1130
1132
  ),
1131
1133
  /* @__PURE__ */ e(
1132
- Mt,
1134
+ kt,
1133
1135
  {
1134
1136
  debugObjectInspectorHotKey: b && b.debugObjectInspectorHotKey,
1135
1137
  objectsToInspect: b && b.objectsToInspect
@@ -1137,7 +1139,7 @@ function wt({
1137
1139
  )
1138
1140
  ] });
1139
1141
  return /* @__PURE__ */ e(
1140
- Ae,
1142
+ ye,
1141
1143
  {
1142
1144
  resourceName: x,
1143
1145
  resourceDescription: y,
@@ -1149,7 +1151,7 @@ function wt({
1149
1151
  }
1150
1152
  );
1151
1153
  }
1152
- const Zt = {
1154
+ const Ot = {
1153
1155
  visible: !0,
1154
1156
  allowAdd: !0,
1155
1157
  allowEdit: !0,
@@ -1157,10 +1159,10 @@ const Zt = {
1157
1159
  allowRemove: !0,
1158
1160
  positionCustomUserActions: "after"
1159
1161
  };
1160
- function Ot(t, r, a, d, n, o) {
1162
+ function er(t, r, a, d, n, o) {
1161
1163
  console.log(`Render de "${t}" na fase "${r}": ${a}ms`);
1162
1164
  }
1163
- function wr({
1165
+ function Ar({
1164
1166
  title: t,
1165
1167
  dataSource: r,
1166
1168
  // dataSourceEdition,
@@ -1172,7 +1174,7 @@ function wr({
1172
1174
  //isLoading = false,
1173
1175
  debug: u = !1,
1174
1176
  filterType: f = "normal",
1175
- isError: T = !1,
1177
+ isError: I = !1,
1176
1178
  error: v = "",
1177
1179
  clearError: ee = () => {
1178
1180
  },
@@ -1180,7 +1182,7 @@ function wr({
1180
1182
  height: c = "100%",
1181
1183
  withBorder: M = !0,
1182
1184
  filterPersistenceDelegator: A,
1183
- withPagination: V = !0,
1185
+ withPagination: T = !0,
1184
1186
  radius: h,
1185
1187
  userActions: B,
1186
1188
  columnsCountBreakPoints: q,
@@ -1192,11 +1194,11 @@ function wr({
1192
1194
  activeColor: Y,
1193
1195
  onItemEnter: _,
1194
1196
  onItemLeave: S,
1195
- style: E,
1197
+ style: V,
1196
1198
  actionsButtonsOptions: F,
1197
1199
  spaceOptions: N,
1198
1200
  variant: w,
1199
- id: G = Jt("masonry"),
1201
+ id: G = Wt("masonry"),
1200
1202
  debugOptions: R,
1201
1203
  // Props de segurança (opcionais)
1202
1204
  resourceName: re,
@@ -1205,30 +1207,30 @@ function wr({
1205
1207
  fallbackComponent: D,
1206
1208
  securityOptions: $
1207
1209
  }) {
1208
- const J = we(), U = ge({
1210
+ const J = Ae(), U = ge({
1209
1211
  autoRegisterActions: $?.autoRegisterActions ?? !0
1210
- }), [W] = te(G), I = o || ae(null), Z = ae(null), [fe, s] = te(r.getCurrentPage()), [z, O] = te(
1212
+ }), [W] = te(G), E = o || ae(null), Z = ae(null), [fe, s] = te(r.getCurrentPage()), [z, O] = te(
1211
1213
  x || (r && r.getTotalRecords() > 0 ? 0 : -1)
1212
1214
  );
1213
- $e(I);
1215
+ Ge(E);
1214
1216
  const [ie, oe] = te({
1215
1217
  activeFilterIndex: -1,
1216
1218
  expandedFilter: !1
1217
- }), [K, ye] = te(0), {
1219
+ }), [K, Ce] = te(0), {
1218
1220
  isDataSourceV2: xe,
1219
- v1State: { forceUpdate: Ie }
1220
- } = Se(
1221
+ v1State: { forceUpdate: Te }
1222
+ } = Pe(
1221
1223
  "ArchbaseMasonryTemplate",
1222
1224
  r
1223
1225
  );
1224
1226
  et({
1225
1227
  dataSource: r,
1226
1228
  listener: (i) => {
1227
- (i.type === pe.afterRemove || i.type === pe.refreshData) && (ye((p) => p + 1), xe || Ie());
1229
+ (i.type === pe.afterRemove || i.type === pe.refreshData) && (Ce((p) => p + 1), xe || Te());
1228
1230
  }
1229
1231
  });
1230
- const Me = be(() => {
1231
- const i = { ...Zt, ...B }, p = [], le = (se) => U.isAvailable ? (U.registerAction(), U.hasPermission()) : !0;
1232
+ const Le = we(() => {
1233
+ const i = { ...Ot, ...B }, p = [], le = (se) => U.isAvailable ? (U.registerAction(), U.hasPermission()) : !0;
1232
1234
  return i.allowAdd && i.onAddExecute && le() && p.push({
1233
1235
  id: "actAdd",
1234
1236
  icon: /* @__PURE__ */ e(Qe, {}),
@@ -1269,56 +1271,56 @@ function wr({
1269
1271
  enabled: !r.isEmpty() && r.isBrowsing(),
1270
1272
  hint: `${m().t("archbase:Clique para visualizar o registro")}`
1271
1273
  }), i.customUserActions && i.positionCustomUserActions === "before" ? [...i.customUserActions, ...p] : i.customUserActions && i.positionCustomUserActions === "after" ? [...p, ...i.customUserActions] : p;
1272
- }, [B, r, U]), ke = be(() => {
1274
+ }, [B, r, U]), Me = we(() => {
1273
1275
  if (b) {
1274
1276
  const i = b.type;
1275
1277
  let p = {};
1276
1278
  return b.props && (p = b.props), r.browseRecords().map((le, se) => {
1277
- const Te = `${W}_${se}`, Ve = `${W}_${se}`;
1278
- let De = le.active === void 0 ? !1 : le.active;
1279
- return z >= 0 && (De = !1, z === se && (De = !0)), /* @__PURE__ */ e(
1279
+ const Je = `${W}_${se}`, Ve = `${W}_${se}`;
1280
+ let ve = le.active === void 0 ? !1 : le.active;
1281
+ return z >= 0 && (ve = !1, z === se && (ve = !0)), /* @__PURE__ */ e(
1280
1282
  i,
1281
1283
  {
1282
1284
  id: Ve,
1283
- active: De,
1285
+ active: ve,
1284
1286
  index: se,
1285
1287
  dataSource: r,
1286
1288
  recordData: le,
1287
1289
  disabled: le.disabled,
1288
1290
  ...p
1289
1291
  },
1290
- Te
1292
+ Je
1291
1293
  );
1292
1294
  });
1293
1295
  }
1294
1296
  return [];
1295
- }, [z, b, W, r, K]), ze = (i, p) => {
1297
+ }, [z, b, W, r, K]), ke = (i, p) => {
1296
1298
  oe({ ...ie, currentFilter: i, activeFilterIndex: p });
1297
- }, qe = (i) => {
1299
+ }, ze = (i) => {
1298
1300
  oe({ ...ie, expandedFilter: i });
1299
- }, _e = (i, p) => {
1301
+ }, qe = (i, p) => {
1300
1302
  oe({ ...ie, currentFilter: i, activeFilterIndex: p });
1301
- }, j = () => {
1302
- }, lt = (i, p) => {
1303
+ }, _e = () => {
1304
+ }, j = (i, p) => {
1303
1305
  O(i), r && r.gotoRecordByData(p);
1304
- }, Ce = (i) => {
1306
+ }, lt = (i) => {
1305
1307
  if (r) {
1306
1308
  const p = r.getOptions();
1307
- p.filter = i, p.currentPage = fe, r.refreshData(p), xe || Ie();
1309
+ p.filter = i, p.currentPage = fe, r.refreshData(p), xe || Te();
1308
1310
  }
1309
- }, L = (i) => {
1311
+ }, Fe = (i) => {
1310
1312
  if (r) {
1311
1313
  const p = r.getOptions();
1312
- p.currentPage = i, r.refreshData(p), xe || Ie();
1314
+ p.currentPage = i, r.refreshData(p), xe || Te();
1313
1315
  }
1314
- }, Fe = () => f === "normal" && d ? /* @__PURE__ */ e(
1315
- Ht,
1316
+ }, L = () => f === "normal" && d ? /* @__PURE__ */ e(
1317
+ Jt,
1316
1318
  {
1317
1319
  searchableFields: d,
1318
- onFilter: Ce,
1320
+ onFilter: lt,
1319
1321
  minFilterValueLength: 1
1320
1322
  }
1321
- ) : f === "advanced" ? /* @__PURE__ */ e($t, { id: `profile_${a.componentName}`, onRender: Ot, children: /* @__PURE__ */ e(
1323
+ ) : f === "advanced" ? /* @__PURE__ */ e(Ut, { id: `profile_${a.componentName}`, onRender: er, children: /* @__PURE__ */ e(
1322
1324
  it,
1323
1325
  {
1324
1326
  id: a.componentName,
@@ -1330,23 +1332,23 @@ function wr({
1330
1332
  persistenceDelegator: A,
1331
1333
  currentFilter: ie.currentFilter,
1332
1334
  activeFilterIndex: ie.activeFilterIndex,
1333
- onSelectedFilter: _e,
1334
- onFilterChanged: ze,
1335
- onSearchByFilter: j,
1336
- onToggleExpandedFilter: qe,
1335
+ onSelectedFilter: qe,
1336
+ onFilterChanged: ke,
1337
+ onSearchByFilter: _e,
1338
+ onToggleExpandedFilter: ze,
1337
1339
  width: "660px",
1338
1340
  height: "170px",
1339
1341
  children: n
1340
1342
  }
1341
- ) }) : /* @__PURE__ */ e(Ee, {}), He = {
1343
+ ) }) : /* @__PURE__ */ e(Ie, {}), Re = {
1342
1344
  menuButtonColor: "blue.5",
1343
1345
  menuPosition: "left"
1344
- }, he = {
1346
+ }, He = {
1345
1347
  headerFlexGrow: "left",
1346
1348
  footerGridColumns: {}
1347
- }, Re = { ...He, ...F }, Je = { ...he, ...N };
1349
+ }, he = { ...Re, ...F }, Ee = { ...He, ...N };
1348
1350
  return /* @__PURE__ */ e(
1349
- Ae,
1351
+ ye,
1350
1352
  {
1351
1353
  resourceName: re,
1352
1354
  resourceDescription: H,
@@ -1357,35 +1359,35 @@ function wr({
1357
1359
  children: /* @__PURE__ */ e(
1358
1360
  wt,
1359
1361
  {
1360
- innerRef: I,
1362
+ innerRef: E,
1361
1363
  width: l,
1362
1364
  height: c,
1363
1365
  radius: h,
1364
1366
  withBorder: M,
1365
- isError: T,
1367
+ isError: I,
1366
1368
  error: v,
1367
1369
  clearError: ee,
1368
1370
  title: t,
1369
1371
  defaultDebug: u,
1370
1372
  debugOptions: R,
1371
- style: E,
1372
- options: Je,
1373
- headerLeft: /* @__PURE__ */ e(xt, { actions: Me, options: Re }),
1374
- headerRight: Fe(),
1375
- footerRight: V ? /* @__PURE__ */ e(dt, { total: r.getTotalPages(), onChange: L }) : void 0,
1373
+ style: V,
1374
+ options: Ee,
1375
+ headerLeft: /* @__PURE__ */ e(xt, { actions: Le, options: he }),
1376
+ headerRight: L(),
1377
+ footerRight: T ? /* @__PURE__ */ e(dt, { total: r.getTotalPages(), onChange: Fe }) : void 0,
1376
1378
  children: /* @__PURE__ */ e(
1377
- kt,
1379
+ zt,
1378
1380
  {
1379
1381
  value: {
1380
1382
  dataSource: r,
1381
1383
  ownerId: G,
1382
- handleSelectItem: lt,
1384
+ handleSelectItem: j,
1383
1385
  activeBackgroundColor: y,
1384
1386
  activeColor: Y,
1385
1387
  onItemEnter: _,
1386
1388
  onItemLeave: S
1387
1389
  },
1388
- children: /* @__PURE__ */ e(zt, { columnsCountBreakPoints: q, children: /* @__PURE__ */ e(qt, { gutter: X, columnsCount: P, children: ke }) })
1390
+ children: /* @__PURE__ */ e(qt, { columnsCountBreakPoints: q, children: /* @__PURE__ */ e(_t, { gutter: X, columnsCount: P, children: Me }) })
1389
1391
  }
1390
1392
  )
1391
1393
  }
@@ -1393,7 +1395,7 @@ function wr({
1393
1395
  }
1394
1396
  );
1395
1397
  }
1396
- const er = {
1398
+ const tr = {
1397
1399
  visible: !0,
1398
1400
  allowAdd: !0,
1399
1401
  allowEdit: !0,
@@ -1401,7 +1403,7 @@ const er = {
1401
1403
  allowRemove: !0,
1402
1404
  positionCustomUserActions: "after"
1403
1405
  };
1404
- function Ar({
1406
+ function yr({
1405
1407
  title: t,
1406
1408
  dataSource: r,
1407
1409
  // dataSourceEdition,
@@ -1414,14 +1416,14 @@ function Ar({
1414
1416
  error: u = "",
1415
1417
  clearError: f = () => {
1416
1418
  },
1417
- width: T = "100%",
1419
+ width: I = "100%",
1418
1420
  height: v = "100%",
1419
1421
  withBorder: ee = !0,
1420
1422
  filterPersistenceDelegator: l,
1421
1423
  withPagination: c = !0,
1422
1424
  children: M,
1423
1425
  radius: A,
1424
- userActions: V,
1426
+ userActions: T,
1425
1427
  debug: h = !1,
1426
1428
  variant: B,
1427
1429
  actionsButtonsOptions: q,
@@ -1435,7 +1437,7 @@ function Ar({
1435
1437
  fallbackComponent: _,
1436
1438
  securityOptions: S
1437
1439
  }) {
1438
- const E = we(), F = ge({
1440
+ const V = Ae(), F = ge({
1439
1441
  autoRegisterActions: S?.autoRegisterActions ?? !0
1440
1442
  }), N = n || ae(null), w = ae(null), [G, R] = te({
1441
1443
  activeFilterIndex: -1,
@@ -1443,11 +1445,11 @@ function Ar({
1443
1445
  }), {
1444
1446
  isDataSourceV2: re,
1445
1447
  v1State: { forceUpdate: H }
1446
- } = Se(
1448
+ } = Pe(
1447
1449
  "ArchbasePanelTemplate",
1448
1450
  r
1449
- ), k = be(() => {
1450
- const s = { ...er, ...V }, z = (ie) => F.isAvailable ? (F.registerAction(), F.hasPermission()) : !0, O = [];
1451
+ ), k = we(() => {
1452
+ const s = { ...tr, ...T }, z = (ie) => F.isAvailable ? (F.registerAction(), F.hasPermission()) : !0, O = [];
1451
1453
  return s.allowAdd && s.onAddExecute && z() && O.push({
1452
1454
  id: "1",
1453
1455
  icon: /* @__PURE__ */ e(Qe, {}),
@@ -1489,7 +1491,7 @@ function Ar({
1489
1491
  enabled: !r.isEmpty() && r.isBrowsing(),
1490
1492
  hint: "Clique para visualizar."
1491
1493
  }), s.customUserActions && s.positionCustomUserActions === "before" ? [...s.customUserActions, ...O] : s.customUserActions && s.positionCustomUserActions === "after" ? [...O, ...s.customUserActions] : O;
1492
- }, [V, r, F]), D = (s, z) => {
1494
+ }, [T, r, F]), D = (s, z) => {
1493
1495
  R({ ...G, currentFilter: s, activeFilterIndex: z });
1494
1496
  }, $ = (s) => {
1495
1497
  R({ ...G, expandedFilter: s });
@@ -1499,13 +1501,13 @@ function Ar({
1499
1501
  }, W = {
1500
1502
  menuButtonColor: "blue.5",
1501
1503
  menuPosition: "left"
1502
- }, I = {
1504
+ }, E = {
1503
1505
  headerFlexGrow: "left",
1504
1506
  footerFlexGrow: "right"
1505
1507
  // footerGridColumns: {},
1506
- }, Z = { ...W, ...q }, fe = { ...I, ...P };
1508
+ }, Z = { ...W, ...q }, fe = { ...E, ...P };
1507
1509
  return /* @__PURE__ */ e(
1508
- Ae,
1510
+ ye,
1509
1511
  {
1510
1512
  resourceName: x,
1511
1513
  resourceDescription: y,
@@ -1517,7 +1519,7 @@ function Ar({
1517
1519
  wt,
1518
1520
  {
1519
1521
  innerRef: N,
1520
- width: T,
1522
+ width: I,
1521
1523
  height: v,
1522
1524
  radius: A,
1523
1525
  withBorder: ee,
@@ -1537,7 +1539,7 @@ function Ar({
1537
1539
  viewName: a.viewName,
1538
1540
  apiVersion: a.apiVersion,
1539
1541
  ref: w,
1540
- variant: B || E.variant,
1542
+ variant: B || V.variant,
1541
1543
  expandedFilter: G.expandedFilter,
1542
1544
  persistenceDelegator: l,
1543
1545
  currentFilter: G.currentFilter,
@@ -1558,48 +1560,48 @@ function Ar({
1558
1560
  }
1559
1561
  );
1560
1562
  }
1561
- function yr() {
1563
+ function Cr() {
1562
1564
  return /* @__PURE__ */ e("div", { children: "SEARCH TEMPLATE" });
1563
1565
  }
1564
- const ot = Ut(void 0);
1565
- function Cr({ children: t }) {
1566
- const [r, a] = te({}), d = Ge((f, T) => {
1567
- a((v) => ({ ...v, [f]: T }));
1568
- }, []), n = Ge((f) => {
1569
- a((T) => {
1570
- const v = { ...T };
1566
+ const ot = jt(void 0);
1567
+ function Fr({ children: t }) {
1568
+ const [r, a] = te({}), d = Ne((f, I) => {
1569
+ a((v) => ({ ...v, [f]: I }));
1570
+ }, []), n = Ne((f) => {
1571
+ a((I) => {
1572
+ const v = { ...I };
1571
1573
  return delete v[f], v;
1572
1574
  });
1573
- }, []), o = Ge(() => {
1575
+ }, []), o = Ne(() => {
1574
1576
  a({});
1575
- }, []), u = Ge((f) => r[f], [r]);
1577
+ }, []), u = Ne((f) => r[f], [r]);
1576
1578
  return /* @__PURE__ */ e(ot.Provider, { value: { errors: r, setError: d, clearError: n, clearAll: o, getError: u }, children: t });
1577
1579
  }
1578
- function Fr() {
1580
+ function Rr() {
1579
1581
  return pt(ot);
1580
1582
  }
1581
- function Rr() {
1583
+ function Er() {
1582
1584
  const t = pt(ot);
1583
1585
  if (!t)
1584
1586
  throw new Error("useRequiredValidationErrors must be used within ValidationErrorsProvider");
1585
1587
  return t;
1586
1588
  }
1587
1589
  export {
1588
- mr as ArchbaseAdvancedSmartButton,
1589
- Ae as ArchbaseConditionalSecurityWrapper,
1590
- xr as ArchbaseFormModalTemplate,
1591
- gr as ArchbaseFormTemplate,
1592
- br as ArchbaseGridTemplate,
1593
- wr as ArchbaseMasonryTemplate,
1594
- vr as ArchbaseModalTemplate,
1595
- Ar as ArchbasePanelTemplate,
1596
- yr as ArchbaseSearchTemplate,
1590
+ pr as ArchbaseAdvancedSmartButton,
1591
+ ye as ArchbaseConditionalSecurityWrapper,
1592
+ vr as ArchbaseFormModalTemplate,
1593
+ xr as ArchbaseFormTemplate,
1594
+ wr as ArchbaseGridTemplate,
1595
+ Ar as ArchbaseMasonryTemplate,
1596
+ br as ArchbaseModalTemplate,
1597
+ yr as ArchbasePanelTemplate,
1598
+ Cr as ArchbaseSearchTemplate,
1597
1599
  ne as ArchbaseSmartActionButton,
1598
1600
  wt as ArchbaseSpaceTemplate,
1599
- Cr as ValidationErrorsProvider,
1600
- pr as useConditionalSecurity,
1601
+ Fr as ValidationErrorsProvider,
1602
+ gr as useConditionalSecurity,
1601
1603
  ge as useOptionalTemplateSecurity,
1602
- Rr as useRequiredValidationErrors,
1603
- fr as useTemplateSecurityAvailable,
1604
- Fr as useValidationErrors
1604
+ Er as useRequiredValidationErrors,
1605
+ mr as useTemplateSecurityAvailable,
1606
+ Rr as useValidationErrors
1605
1607
  };
@@ -105,6 +105,8 @@ export interface ArchbaseGridTemplateProps<T extends Object, ID> extends Archbas
105
105
  paginationPadding?: string | number;
106
106
  /** Altura das linhas da grid. Default: 52 */
107
107
  rowHeight?: number;
108
+ /** Oculta o footer interno do MUI DataGrid. Default: true */
109
+ hideFooter?: boolean;
108
110
  }
109
111
  export interface ArchbaseGridTemplateRef {
110
112
  refreshData: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archbase/template",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
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",
@@ -30,13 +30,13 @@
30
30
  "react-dom": "^18.3.0 || ^19.2.0"
31
31
  },
32
32
  "dependencies": {
33
- "@archbase/advanced": "3.0.3",
34
- "@archbase/components": "3.0.3",
35
- "@archbase/core": "3.0.3",
36
- "@archbase/data": "3.0.3",
37
- "@archbase/layout": "3.0.3",
38
- "@archbase/security": "3.0.3",
39
- "@archbase/security-ui": "3.0.3",
33
+ "@archbase/advanced": "3.0.4",
34
+ "@archbase/components": "3.0.4",
35
+ "@archbase/core": "3.0.4",
36
+ "@archbase/data": "3.0.4",
37
+ "@archbase/layout": "3.0.4",
38
+ "@archbase/security": "3.0.4",
39
+ "@archbase/security-ui": "3.0.4",
40
40
  "@rehooks/component-size": "^1.0.3",
41
41
  "dayjs": "^1.11.13",
42
42
  "i18next": "^25.3.1",