@archbase/template 3.0.0 → 3.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,16 +1,16 @@
1
- import { jsx as e, Fragment as Fe, jsxs as C } from "react/jsx-runtime";
2
- import { Button as Pe, Paper as Je, Box as Se, ScrollArea as it, LoadingOverlay as ot, Group as ge, useMantineColorScheme as He, Modal as lt, Flex as ce, px as vt, Text as bt, Grid as he, Pagination as st } from "@mantine/core";
3
- import { useForceUpdate as at, useUncontrolled as wt, useHotkeys as At } from "@mantine/hooks";
4
- import { IconBug as Ge, IconDeviceFloppy as yt, IconX as Te, IconCheck as ct, IconPlus as We, IconEdit as Ke, IconTrash as Qe, IconEye as Xe } from "@tabler/icons-react";
5
- import { useArchbaseAppContext as xe, useValidationErrors as Ct, ValidationErrorsProvider as dt, getI18nextInstance as p, processErrorMessage as ae, useArchbaseTheme as Ye, emit as Ft, useArchbaseTranslation as Rt } from "@archbase/core";
6
- import Ie, { useMemo as Ce, useState as te, forwardRef as Et, useRef as se, useImperativeHandle as It, useEffect as ut, Fragment as Tt, Profiler as Dt, createContext as Vt, useCallback as Be, useContext as ht } from "react";
7
- import { useArchbaseV1V2Compatibility as De, useArchbaseDataSourceListener as Ze, DataSourceEventNames as fe } from "@archbase/data";
8
- import { ArchbaseAlert as $e, ArchbaseDialog as ft, ArchbaseDataGrid as St, GridToolBarActions as Bt, ArchbaseDebugInspector as Nt, ArchbaseMasonryProvider as Pt, ArchbaseMasonryResponsive as Gt, ArchbaseMasonry as $t, ArchbaseActionButtons as mt } from "@archbase/components";
9
- import { ArchbaseSpaceFixed as Oe, ArchbaseSpaceTop as pt, ArchbaseSpaceFill as et, ArchbaseForm as gt, ArchbaseSpaceBottom as tt } from "@archbase/layout";
10
- import { ArchbaseQueryBuilder as rt, buildFrom as Ut, ArchbaseGlobalFilter as jt } from "@archbase/advanced";
11
- import Ne from "@rehooks/component-size";
12
- import { uniqueId as Lt } from "lodash";
13
- const kt = {
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";
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 = {
14
14
  isAvailable: !1,
15
15
  hasPermission: () => !0,
16
16
  // Default: sempre permite
@@ -21,20 +21,20 @@ const kt = {
21
21
  canEdit: !0,
22
22
  canDelete: !0,
23
23
  canView: !0
24
- }, me = (t) => Ce(() => kt, []), lr = () => !1, ie = ({
24
+ }, ge = (t) => be(() => Wt, []), fr = () => !1, ne = ({
25
25
  actionName: t,
26
26
  actionDescription: r,
27
27
  children: a,
28
28
  fallback: d = null,
29
29
  autoRegister: n = !0,
30
30
  onClick: o,
31
- ...h
31
+ ...u
32
32
  }) => {
33
- const m = me();
34
- return Ie.useEffect(() => {
35
- n && t && r && m.isAvailable && m.registerAction();
36
- }, [t, r, n, m.isAvailable, m.registerAction]), !t || !m.isAvailable ? /* @__PURE__ */ e(Pe, { onClick: o, ...h, children: a }) : m.hasPermission() ? /* @__PURE__ */ e(Pe, { onClick: o, ...h, children: a }) : /* @__PURE__ */ e(Fe, { children: d });
37
- }, sr = ({
33
+ const f = ge();
34
+ return Be.useEffect(() => {
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 = ({
38
38
  actionName: t,
39
39
  actionDescription: r,
40
40
  children: a,
@@ -42,104 +42,104 @@ const kt = {
42
42
  onClick: n,
43
43
  ...o
44
44
  }) => {
45
- const [h, m] = Ie.useState(null), [T, v] = Ie.useState(!1);
46
- return Ie.useEffect(() => {
45
+ const [u, f] = Be.useState(null), [T, v] = Be.useState(!1);
46
+ return Be.useEffect(() => {
47
47
  if (!t) {
48
- m(/* @__PURE__ */ e(Pe, { onClick: n, ...o, children: a }));
48
+ f(/* @__PURE__ */ e(Ue, { onClick: n, ...o, children: a }));
49
49
  return;
50
50
  }
51
- v(!1), m(/* @__PURE__ */ e(Pe, { onClick: n, ...o, children: a }));
52
- }, [t, r, a, d, o]), /* @__PURE__ */ e(Fe, { children: h });
53
- }, ve = ({
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 = ({
54
54
  children: t
55
- }) => /* @__PURE__ */ e(Fe, { children: t }), ar = (t) => Ce(() => ({
55
+ }) => /* @__PURE__ */ e(Ee, { children: t }), pr = (t) => be(() => ({
56
56
  shouldWrap: !1,
57
57
  isSecurityAvailable: !1,
58
58
  hasResourceName: !!t
59
59
  }), [t]);
60
- function cr({
60
+ function gr({
61
61
  innerRef: t,
62
62
  title: r,
63
63
  isError: a = !1,
64
64
  isCanceling: d = !1,
65
65
  isSaving: n = !1,
66
66
  error: o = "",
67
- clearError: h = () => {
67
+ clearError: u = () => {
68
68
  },
69
- autoCloseAlertError: m = 15e3,
69
+ autoCloseAlertError: f = 15e3,
70
70
  width: T = "100%",
71
71
  height: v = "100%",
72
- withBorder: O = !0,
72
+ withBorder: ee = !0,
73
73
  children: l,
74
74
  radius: c,
75
- variant: q,
75
+ variant: M,
76
76
  footerAlign: A = "left",
77
- footerContent: D,
78
- dataSource: f,
77
+ footerContent: V,
78
+ dataSource: h,
79
79
  onSave: B,
80
- onCancel: W,
81
- onBeforeSave: N,
82
- onAfterSave: Y,
80
+ onCancel: q,
81
+ onBeforeSave: P,
82
+ onAfterSave: X,
83
83
  onBeforeCancel: b,
84
84
  onAfterCancel: x,
85
85
  onError: y,
86
86
  // Props de segurança (opcionais)
87
- resourceName: Z,
88
- resourceDescription: K,
89
- requiredPermissions: P,
87
+ resourceName: Y,
88
+ resourceDescription: _,
89
+ requiredPermissions: S,
90
90
  fallbackComponent: E,
91
91
  securityOptions: F,
92
- ...G
92
+ ...N
93
93
  }) {
94
- const w = xe(), [$, R] = te(a), [re, Q] = te(o), M = at();
95
- me({
94
+ const w = we(), [G, R] = te(a), [re, H] = te(o), k = ut();
95
+ ge({
96
96
  autoRegisterActions: F?.autoRegisterActions ?? !0
97
97
  });
98
- const V = De(
98
+ const D = Se(
99
99
  "ArchbaseFormTemplate",
100
- f,
100
+ h,
101
101
  void 0,
102
102
  void 0
103
103
  );
104
- Ze({
105
- dataSource: f,
104
+ et({
105
+ dataSource: h,
106
106
  listener: (I) => {
107
- I.type === fe.onError && (R(!0), Q(I.error)), (I.type === fe.afterEdit || I.type === fe.afterInsert) && (V.isDataSourceV2 || M());
107
+ I.type === pe.onError && (R(!0), H(I.error)), (I.type === pe.afterEdit || I.type === pe.afterInsert) && (D.isDataSourceV2 || k());
108
108
  }
109
109
  });
110
- const U = Ct(), _ = async (I) => {
110
+ const $ = Dt(), J = async (I) => {
111
111
  try {
112
- B ? B(I) : (N && await N(I), f.isBrowsing() || f.save().then(() => {
113
- U?.clearAll(), Y && Y(I);
114
- }).catch((ee) => {
115
- y && y(ae(ee)), R(!0), Q(ae(ee));
112
+ B ? B(I) : (P && await P(I), h.isBrowsing() || h.save().then(() => {
113
+ $?.clearAll(), X && X(I);
114
+ }).catch((Z) => {
115
+ y && y(de(Z)), R(!0), H(de(Z));
116
116
  }));
117
- } catch (ee) {
118
- y && y(ae(ee)), R(!0), Q(ae(ee));
117
+ } catch (Z) {
118
+ y && y(de(Z)), R(!0), H(de(Z));
119
119
  }
120
- }, J = () => {
120
+ }, U = () => {
121
121
  try {
122
- W ? W() : (b && b(), f.isBrowsing() || f.cancel(), U?.clearAll(), x && x());
122
+ q ? q() : (b && b(), h.isBrowsing() || h.cancel(), $?.clearAll(), x && x());
123
123
  } catch (I) {
124
- y && y(ae(I)), R(!0), Q(ae(I));
124
+ y && y(de(I)), R(!0), H(de(I));
125
125
  }
126
- }, X = () => {
127
- h && h(), R(!1), Q("");
126
+ }, W = () => {
127
+ u && u(), R(!1), H("");
128
128
  };
129
129
  return /* @__PURE__ */ e(
130
- ve,
130
+ Ae,
131
131
  {
132
- resourceName: Z,
133
- resourceDescription: K,
134
- requiredPermissions: P,
132
+ resourceName: Y,
133
+ resourceDescription: _,
134
+ requiredPermissions: S,
135
135
  fallbackComponent: E,
136
136
  onSecurityReady: F?.onSecurityReady,
137
137
  onAccessDenied: F?.onAccessDenied,
138
- children: /* @__PURE__ */ e(dt, { children: /* @__PURE__ */ C(
139
- Je,
138
+ children: /* @__PURE__ */ e(ft, { children: /* @__PURE__ */ C(
139
+ We,
140
140
  {
141
141
  ref: t,
142
- withBorder: O,
142
+ withBorder: ee,
143
143
  radius: c,
144
144
  style: {
145
145
  width: T,
@@ -149,22 +149,22 @@ function cr({
149
149
  padding: 4
150
150
  },
151
151
  children: [
152
- $ && /* @__PURE__ */ e(Se, { style: { flexShrink: 0 }, children: /* @__PURE__ */ e(
153
- $e,
152
+ G && /* @__PURE__ */ e(Ne, { style: { flexShrink: 0 }, children: /* @__PURE__ */ e(
153
+ Le,
154
154
  {
155
- autoClose: m,
155
+ autoClose: f,
156
156
  withCloseButton: !0,
157
157
  withBorder: !0,
158
- icon: /* @__PURE__ */ e(Ge, { size: "1.4rem" }),
159
- title: p().t("WARNING"),
158
+ icon: /* @__PURE__ */ e(je, { size: "1.4rem" }),
159
+ title: m().t("WARNING"),
160
160
  titleColor: "rgb(250, 82, 82)",
161
- variant: q ?? w.variant,
162
- onClose: X,
161
+ variant: M ?? w.variant,
162
+ onClose: W,
163
163
  children: /* @__PURE__ */ e("span", { children: re })
164
164
  }
165
165
  ) }),
166
166
  /* @__PURE__ */ C(
167
- it,
167
+ st,
168
168
  {
169
169
  style: {
170
170
  flex: 1,
@@ -173,13 +173,13 @@ function cr({
173
173
  padding: "calc(0.625rem / 2)"
174
174
  },
175
175
  children: [
176
- /* @__PURE__ */ e(ot, { visible: d || n, opacity: 0.3 }),
176
+ /* @__PURE__ */ e(at, { visible: d || n, opacity: 0.3 }),
177
177
  l
178
178
  ]
179
179
  }
180
180
  ),
181
181
  /* @__PURE__ */ C(
182
- Se,
182
+ Ne,
183
183
  {
184
184
  style: {
185
185
  flexShrink: 0,
@@ -190,46 +190,46 @@ function cr({
190
190
  gap: "1rem"
191
191
  },
192
192
  children: [
193
- A === "right" && D && /* @__PURE__ */ e(Se, { style: { flex: 1 }, children: D }),
194
- f && !f.isBrowsing() ? /* @__PURE__ */ C(ge, { gap: "md", children: [
193
+ A === "right" && V && /* @__PURE__ */ e(Ne, { style: { flex: 1 }, children: V }),
194
+ h && !h.isBrowsing() ? /* @__PURE__ */ C(ve, { gap: "md", children: [
195
195
  /* @__PURE__ */ e(
196
- ie,
196
+ ne,
197
197
  {
198
198
  actionName: "save",
199
- actionDescription: `Salvar ${K || "registro"}`,
200
- leftSection: /* @__PURE__ */ e(yt, {}),
201
- onClick: () => _(f.getCurrentRecord()),
202
- disabled: f && f.isBrowsing(),
203
- variant: q ?? w.variant,
199
+ actionDescription: `Salvar ${_ || "registro"}`,
200
+ leftSection: /* @__PURE__ */ e(Vt, {}),
201
+ onClick: () => J(h.getCurrentRecord()),
202
+ disabled: h && h.isBrowsing(),
203
+ variant: M ?? w.variant,
204
204
  color: "green",
205
- children: `${p().t("Ok")}`
205
+ children: `${m().t("Ok")}`
206
206
  }
207
207
  ),
208
208
  /* @__PURE__ */ e(
209
- ie,
209
+ ne,
210
210
  {
211
211
  actionName: "cancel",
212
212
  actionDescription: "Cancelar operação",
213
- leftSection: /* @__PURE__ */ e(Te, {}),
214
- onClick: J,
215
- disabled: f && f.isBrowsing(),
216
- variant: q ?? w.variant,
213
+ leftSection: /* @__PURE__ */ e(Pe, {}),
214
+ onClick: U,
215
+ disabled: h && h.isBrowsing(),
216
+ variant: M ?? w.variant,
217
217
  color: "red",
218
- children: `${p().t("Cancel")}`
218
+ children: `${m().t("Cancel")}`
219
219
  }
220
220
  )
221
- ] }) : /* @__PURE__ */ e(ge, { gap: "md", children: /* @__PURE__ */ e(
222
- ie,
221
+ ] }) : /* @__PURE__ */ e(ve, { gap: "md", children: /* @__PURE__ */ e(
222
+ ne,
223
223
  {
224
224
  actionName: "close",
225
225
  actionDescription: "Fechar formulário",
226
- leftSection: /* @__PURE__ */ e(Te, {}),
227
- onClick: J,
228
- variant: q ?? w.variant,
229
- children: `${p().t("Close")}`
226
+ leftSection: /* @__PURE__ */ e(Pe, {}),
227
+ onClick: U,
228
+ variant: M ?? w.variant,
229
+ children: `${m().t("Close")}`
230
230
  }
231
231
  ) }),
232
- (A === "left" || A === "center") && D && /* @__PURE__ */ e(Se, { style: { flex: A === "left" ? 1 : 0, textAlign: "right" }, children: D })
232
+ (A === "left" || A === "center") && V && /* @__PURE__ */ e(Ne, { style: { flex: A === "left" ? 1 : 0, textAlign: "right" }, children: V })
233
233
  ]
234
234
  }
235
235
  )
@@ -239,177 +239,177 @@ function cr({
239
239
  }
240
240
  );
241
241
  }
242
- function dr({
242
+ function xr({
243
243
  title: t,
244
244
  withOverlay: r = !0,
245
245
  overlayProps: a,
246
246
  children: d,
247
247
  withCloseButton: n = !0,
248
248
  closeButtonProps: o,
249
- opened: h,
250
- fullScreen: m,
249
+ opened: u,
250
+ fullScreen: f,
251
251
  centered: T,
252
252
  variant: v,
253
- closeOnEscape: O = !0,
253
+ closeOnEscape: ee = !0,
254
254
  size: l,
255
255
  dataSource: c,
256
- height: q,
256
+ height: M,
257
257
  userActions: A,
258
- onAfterSave: D,
259
- onClickOk: f,
258
+ onAfterSave: V,
259
+ onClickOk: h,
260
260
  onClickCancel: B,
261
- onBeforeOk: W,
262
- onCustomSave: N,
263
- isError: Y,
261
+ onBeforeOk: q,
262
+ onCustomSave: P,
263
+ isError: X,
264
264
  error: b = "",
265
265
  clearError: x = () => {
266
266
  },
267
267
  onError: y,
268
- autoCloseAlertError: Z = 15e3,
269
- loadingOverlayStyles: K,
268
+ autoCloseAlertError: Y = 15e3,
269
+ loadingOverlayStyles: _,
270
270
  // Props de segurança (opcionais)
271
- resourceName: P,
271
+ resourceName: S,
272
272
  resourceDescription: E,
273
273
  requiredPermissions: F,
274
- fallbackComponent: G,
274
+ fallbackComponent: N,
275
275
  securityOptions: w,
276
- ...$
276
+ ...G
277
277
  }) {
278
- const R = xe(), re = Ye(), { colorScheme: Q } = He(), [M, V] = te(Y), [U, _] = te(b), [J, X] = te(!1), I = at();
279
- me({
278
+ const R = we(), re = Oe(), { colorScheme: H } = Ke(), [k, D] = te(X), [$, J] = te(b), [U, W] = te(!1), I = ut();
279
+ ge({
280
280
  resourceDescription: E || t?.toString(),
281
281
  autoRegisterActions: w?.autoRegisterActions ?? !0
282
282
  });
283
- const ee = De(
283
+ const Z = Se(
284
284
  "ArchbaseFormModalTemplate",
285
285
  c,
286
286
  void 0,
287
287
  void 0
288
288
  );
289
- Ze({
289
+ et({
290
290
  dataSource: c,
291
- listener: (j) => {
292
- j.type === fe.onError && (V(!0), _(j.error)), (j.type === fe.afterEdit || j.type === fe.afterInsert) && (ee.isDataSourceV2 || I());
291
+ listener: (K) => {
292
+ K.type === pe.onError && (D(!0), J(K.error)), (K.type === pe.afterEdit || K.type === pe.afterInsert) && (Z.isDataSourceV2 || I());
293
293
  }
294
294
  });
295
- const ue = async () => {
295
+ const fe = async () => {
296
296
  if (c && !c.isBrowsing())
297
297
  try {
298
- X(!0), await c.save(), D && D(c.getCurrentRecord());
299
- } catch (j) {
300
- return y && y(ae(j)), V(!0), _(ae(j)), X(!1), !1;
298
+ W(!0), await c.save(), V && V(c.getCurrentRecord());
299
+ } catch (K) {
300
+ return y && y(de(K)), D(!0), J(de(K)), W(!1), !1;
301
301
  }
302
- return X(!1), !0;
302
+ return W(!1), !0;
303
303
  }, s = () => {
304
304
  if (c && !c.isBrowsing())
305
305
  try {
306
306
  c.cancel();
307
307
  } catch {
308
308
  }
309
- }, H = async () => {
310
- if (N)
311
- c && N(c.getCurrentRecord(), () => {
312
- f && f();
309
+ }, z = async () => {
310
+ if (P)
311
+ c && P(c.getCurrentRecord(), () => {
312
+ h && h();
313
313
  });
314
- else if (W) {
315
- const j = W(c.getCurrentRecord());
316
- j instanceof Promise && j.then(async () => {
317
- await ue() && f && f();
318
- }).catch((be) => {
319
- y && y(ae(be)), V(!0), _(ae(be));
314
+ else if (q) {
315
+ const K = q(c.getCurrentRecord());
316
+ K instanceof Promise && K.then(async () => {
317
+ await fe() && h && h();
318
+ }).catch((ye) => {
319
+ y && y(de(ye)), D(!0), J(de(ye));
320
320
  });
321
321
  } else
322
- await ue() && f && f();
323
- }, S = () => {
322
+ await fe() && h && h();
323
+ }, O = () => {
324
324
  s(), B && B();
325
+ }, ie = () => {
326
+ gt.showWarning(m().t("archbase:Click on Ok or Cancel to close"));
325
327
  }, oe = () => {
326
- ft.showWarning(p().t("archbase:Click on Ok or Cancel to close"));
327
- }, pe = () => {
328
- x && x(), V(!1), _("");
328
+ x && x(), D(!1), J("");
329
329
  };
330
330
  return /* @__PURE__ */ e(
331
- ve,
331
+ Ae,
332
332
  {
333
- resourceName: P,
333
+ resourceName: S,
334
334
  resourceDescription: E,
335
335
  requiredPermissions: F,
336
- fallbackComponent: G,
336
+ fallbackComponent: N,
337
337
  onSecurityReady: w?.onSecurityReady,
338
338
  onAccessDenied: w?.onAccessDenied,
339
339
  children: /* @__PURE__ */ e(
340
- lt,
340
+ ct,
341
341
  {
342
342
  title: t,
343
343
  withOverlay: r,
344
344
  overlayProps: a || {
345
- color: Q === "dark" ? re.colors.dark[7] : re.colors.gray[6],
345
+ color: H === "dark" ? re.colors.dark[7] : re.colors.gray[6],
346
346
  opacity: 0.25
347
347
  },
348
348
  withCloseButton: n,
349
349
  closeButtonProps: o,
350
- onClose: oe,
351
- opened: h,
352
- fullScreen: m,
350
+ onClose: ie,
351
+ opened: u,
352
+ fullScreen: f,
353
353
  centered: T,
354
- closeOnEscape: O,
354
+ closeOnEscape: ee,
355
355
  size: l,
356
- ...$,
357
- children: /* @__PURE__ */ C(dt, { children: [
358
- /* @__PURE__ */ e(ot, { styles: K, visible: J, opacity: 0.8 }),
359
- /* @__PURE__ */ C(Oe, { height: q, children: [
360
- M ? /* @__PURE__ */ e(pt, { size: "100px", children: /* @__PURE__ */ e(
361
- $e,
356
+ ...G,
357
+ children: /* @__PURE__ */ C(ft, { children: [
358
+ /* @__PURE__ */ e(at, { styles: _, visible: U, opacity: 0.8 }),
359
+ /* @__PURE__ */ C(tt, { height: M, children: [
360
+ k ? /* @__PURE__ */ e(vt, { size: "100px", children: /* @__PURE__ */ e(
361
+ Le,
362
362
  {
363
- autoClose: Z,
363
+ autoClose: Y,
364
364
  withCloseButton: !0,
365
365
  withBorder: !0,
366
- icon: /* @__PURE__ */ e(Ge, { size: "1.4rem" }),
367
- title: p().t("WARNING"),
366
+ icon: /* @__PURE__ */ e(je, { size: "1.4rem" }),
367
+ title: m().t("WARNING"),
368
368
  titleColor: "rgb(250, 82, 82)",
369
369
  variant: v ?? R.variant,
370
- onClose: pe,
371
- children: /* @__PURE__ */ e("span", { children: U })
370
+ onClose: oe,
371
+ children: /* @__PURE__ */ e("span", { children: $ })
372
372
  }
373
373
  ) }) : null,
374
- /* @__PURE__ */ e(et, { children: /* @__PURE__ */ e(gt, { children: d }) }),
375
- /* @__PURE__ */ e(tt, { size: "40px", children: /* @__PURE__ */ C(ce, { justify: "space-between", align: "center", children: [
376
- /* @__PURE__ */ e(ge, { children: A }),
377
- c && !c.isBrowsing() ? /* @__PURE__ */ C(ge, { gap: "md", children: [
374
+ /* @__PURE__ */ e(rt, { children: /* @__PURE__ */ e(bt, { children: d }) }),
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: [
378
378
  /* @__PURE__ */ e(
379
- ie,
379
+ ne,
380
380
  {
381
381
  actionName: "save",
382
382
  actionDescription: `Salvar ${E || t || "registro"}`,
383
- leftSection: /* @__PURE__ */ e(ct, {}),
384
- onClick: H,
383
+ leftSection: /* @__PURE__ */ e(ht, {}),
384
+ onClick: z,
385
385
  disabled: c && c.isBrowsing(),
386
386
  variant: v ?? R.variant,
387
387
  color: "green",
388
- children: `${p().t("Ok")}`
388
+ children: `${m().t("Ok")}`
389
389
  }
390
390
  ),
391
391
  /* @__PURE__ */ e(
392
- ie,
392
+ ne,
393
393
  {
394
394
  actionName: "cancel",
395
395
  actionDescription: "Cancelar operação",
396
- leftSection: /* @__PURE__ */ e(Te, {}),
397
- onClick: S,
396
+ leftSection: /* @__PURE__ */ e(Pe, {}),
397
+ onClick: O,
398
398
  disabled: c && c.isBrowsing(),
399
399
  variant: v ?? R.variant,
400
400
  color: "red",
401
- children: `${p().t("Cancel")}`
401
+ children: `${m().t("Cancel")}`
402
402
  }
403
403
  )
404
- ] }) : /* @__PURE__ */ e(ge, { gap: "md", children: /* @__PURE__ */ e(
405
- ie,
404
+ ] }) : /* @__PURE__ */ e(ve, { gap: "md", children: /* @__PURE__ */ e(
405
+ ne,
406
406
  {
407
407
  actionName: "close",
408
408
  actionDescription: "Fechar janela",
409
- leftSection: /* @__PURE__ */ e(Te, {}),
410
- onClick: S,
409
+ leftSection: /* @__PURE__ */ e(Pe, {}),
410
+ onClick: O,
411
411
  variant: v ?? R.variant,
412
- children: `${p().t("Close")}`
412
+ children: `${m().t("Close")}`
413
413
  }
414
414
  ) })
415
415
  ] }) })
@@ -420,96 +420,96 @@ function dr({
420
420
  }
421
421
  );
422
422
  }
423
- function ur({
423
+ function vr({
424
424
  title: t,
425
425
  withOverlay: r = !0,
426
426
  overlayProps: a,
427
427
  children: d,
428
428
  withCloseButton: n = !0,
429
429
  closeButtonProps: o,
430
- opened: h,
431
- fullScreen: m,
430
+ opened: u,
431
+ fullScreen: f,
432
432
  centered: T,
433
433
  variant: v,
434
- closeOnEscape: O = !0,
434
+ closeOnEscape: ee = !0,
435
435
  size: l,
436
436
  height: c,
437
- onlyOkButton: q = !1,
437
+ onlyOkButton: M = !1,
438
438
  onClose: A,
439
- onClickOk: D,
440
- onClickCancel: f,
439
+ onClickOk: V,
440
+ onClickCancel: h,
441
441
  userActions: B,
442
442
  // Props de segurança (opcionais)
443
- resourceName: W,
444
- resourceDescription: N,
445
- requiredPermissions: Y,
443
+ resourceName: q,
444
+ resourceDescription: P,
445
+ requiredPermissions: X,
446
446
  fallbackComponent: b,
447
447
  securityOptions: x
448
448
  }) {
449
- const y = xe(), Z = Ye(), { colorScheme: K } = He();
450
- me({
449
+ const y = we(), Y = Oe(), { colorScheme: _ } = Ke();
450
+ ge({
451
451
  autoRegisterActions: x?.autoRegisterActions ?? !0
452
452
  });
453
- const P = () => {
454
- D && D(), A();
453
+ const S = () => {
454
+ V && V(), A();
455
455
  }, E = () => {
456
- f && f(), A();
456
+ h && h(), A();
457
457
  }, F = () => {
458
- ft.showWarning(p().t("Click on Ok or Cancel to close"));
458
+ gt.showWarning(m().t("Click on Ok or Cancel to close"));
459
459
  };
460
460
  return /* @__PURE__ */ e(
461
- ve,
461
+ Ae,
462
462
  {
463
- resourceName: W,
464
- resourceDescription: N,
465
- requiredPermissions: Y,
463
+ resourceName: q,
464
+ resourceDescription: P,
465
+ requiredPermissions: X,
466
466
  fallbackComponent: b,
467
467
  onSecurityReady: x?.onSecurityReady,
468
468
  onAccessDenied: x?.onAccessDenied,
469
469
  children: /* @__PURE__ */ e(
470
- lt,
470
+ ct,
471
471
  {
472
472
  title: t,
473
473
  withOverlay: r,
474
474
  overlayProps: a || {
475
- color: K === "dark" ? Z.colors.dark[7] : Z.colors.gray[6],
475
+ color: _ === "dark" ? Y.colors.dark[7] : Y.colors.gray[6],
476
476
  opacity: 0.25
477
477
  },
478
478
  withCloseButton: n,
479
479
  closeButtonProps: o,
480
480
  onClose: F,
481
- opened: h,
482
- fullScreen: m,
481
+ opened: u,
482
+ fullScreen: f,
483
483
  centered: T,
484
- closeOnEscape: O,
484
+ closeOnEscape: ee,
485
485
  size: l,
486
- children: /* @__PURE__ */ C(Oe, { height: c, children: [
487
- /* @__PURE__ */ e(et, { children: /* @__PURE__ */ e(gt, { children: d }) }),
488
- /* @__PURE__ */ e(tt, { size: "40px", children: /* @__PURE__ */ C(ce, { justify: "space-between", align: "center", children: [
489
- /* @__PURE__ */ e(ge, { children: B }),
490
- /* @__PURE__ */ C(ge, { gap: "md", children: [
486
+ children: /* @__PURE__ */ C(tt, { height: c, children: [
487
+ /* @__PURE__ */ e(rt, { children: /* @__PURE__ */ e(bt, { children: d }) }),
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: [
491
491
  /* @__PURE__ */ e(
492
- ie,
492
+ ne,
493
493
  {
494
494
  actionName: "save",
495
- actionDescription: `Salvar ${N || "registro"}`,
496
- leftSection: /* @__PURE__ */ e(ct, {}),
497
- onClick: P,
495
+ actionDescription: `Salvar ${P || "registro"}`,
496
+ leftSection: /* @__PURE__ */ e(ht, {}),
497
+ onClick: S,
498
498
  variant: v ?? y.variant,
499
499
  color: "green",
500
- children: `${p().t("Ok")}`
500
+ children: `${m().t("Ok")}`
501
501
  }
502
502
  ),
503
- q ? null : /* @__PURE__ */ e(
504
- ie,
503
+ M ? null : /* @__PURE__ */ e(
504
+ ne,
505
505
  {
506
506
  actionName: "cancel",
507
507
  actionDescription: "Cancelar operação",
508
- leftSection: /* @__PURE__ */ e(Te, {}),
508
+ leftSection: /* @__PURE__ */ e(Pe, {}),
509
509
  onClick: E,
510
510
  variant: v ?? y.variant,
511
511
  color: "red",
512
- children: f ? `${p().t("Cancel")}` : `${p().t("Close")}`
512
+ children: h ? `${m().t("Cancel")}` : `${m().t("Close")}`
513
513
  }
514
514
  )
515
515
  ] })
@@ -520,7 +520,7 @@ function ur({
520
520
  }
521
521
  );
522
522
  }
523
- const zt = (t, r, a) => {
523
+ const Kt = (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,169 +531,178 @@ const zt = (t, r, a) => {
531
531
  }
532
532
  return r.getValue(`${t.viewName}_${t.componentName}`);
533
533
  };
534
- function qt(t, r) {
534
+ function Qt(t, r) {
535
535
  const {
536
536
  title: a,
537
537
  printTitle: d,
538
538
  dataSource: n,
539
539
  filterOptions: o,
540
- pageSize: h = 15,
541
- pageIndex: m = 0,
540
+ pageSize: u = 15,
541
+ pageIndex: f = 0,
542
542
  columns: T,
543
543
  filterFields: v,
544
- logoPrint: O,
544
+ logoPrint: ee,
545
545
  userActions: l,
546
546
  userRowActions: c,
547
- customRenderRowActions: q,
547
+ customRenderRowActions: M,
548
548
  innerRef: A,
549
- isLoading: D = !1,
550
- isLoadingFilter: f = !1,
549
+ isLoading: V = !1,
550
+ isLoadingFilter: h = !1,
551
551
  isError: B = !1,
552
- enableTopToolbar: W = !0,
553
- enableTopToolbarActions: N = !0,
554
- error: Y = "",
552
+ enableTopToolbar: q = !0,
553
+ enableTopToolbarActions: P = !0,
554
+ error: X = "",
555
555
  clearError: b = () => {
556
556
  },
557
557
  filterType: x,
558
558
  width: y = "100%",
559
- height: Z = "100%",
560
- onSearchByFilter: K,
561
- getRowId: P,
559
+ height: Y = "100%",
560
+ onSearchByFilter: _,
561
+ getRowId: S,
562
562
  withBorder: E = !0,
563
563
  filterPersistenceDelegator: F,
564
- variant: G,
564
+ variant: N,
565
565
  store: w,
566
- cellPadding: $,
566
+ cellPadding: G,
567
567
  bottomToolbarMinHeight: R,
568
568
  enableRowSelection: re = !0,
569
- enableRowNumbers: Q = !0,
570
- enableRowActions: M = !0,
571
- positionActionsColumn: V = "first",
572
- tableHeadCellPadding: U,
573
- renderDetailPanel: _,
574
- renderTopToolbar: J,
575
- toolbarAlignment: X = "right",
576
- toolbarLeftContent: I,
577
- onSelectedRowsChanged: ee,
578
- onCellDoubleClick: ue,
579
- paginationLabels: s,
569
+ enableRowNumbers: H = !0,
570
+ enableRowActions: k = !0,
571
+ positionActionsColumn: D = "first",
572
+ actionsColumnWidth: $,
573
+ tableHeadCellPadding: J,
574
+ renderDetailPanel: U,
575
+ renderTopToolbar: W,
576
+ toolbarAlignment: I = "right",
577
+ toolbarLeftContent: Z,
578
+ onSelectedRowsChanged: fe,
579
+ onCellDoubleClick: s,
580
+ onFilterModelChange: z,
581
+ paginationLabels: O,
580
582
  // Props de segurança (opcionais)
581
- resourceName: H,
582
- resourceDescription: S,
583
- requiredPermissions: oe,
584
- fallbackComponent: pe,
585
- securityOptions: j
586
- } = t, be = se(null), L = se(null);
587
- Ye();
588
- const { colorScheme: Ve } = He();
589
- me({
590
- autoRegisterActions: j?.autoRegisterActions ?? !0
583
+ resourceName: ie,
584
+ resourceDescription: oe,
585
+ requiredPermissions: K,
586
+ fallbackComponent: ye,
587
+ securityOptions: xe,
588
+ // Props para controle de bordas internas
589
+ withToolbarBorder: Ie,
590
+ withPaginationBorder: Me,
591
+ toolbarPadding: ke,
592
+ paginationPadding: ze,
593
+ rowHeight: qe
594
+ } = t, _e = ae(null), j = ae(null);
595
+ Oe();
596
+ const { colorScheme: lt } = Ke();
597
+ ge({
598
+ autoRegisterActions: xe?.autoRegisterActions ?? !0
591
599
  });
592
- const we = De(
600
+ const Ce = Se(
593
601
  "ArchbaseGridTemplate",
594
602
  n,
595
603
  void 0,
596
604
  void 0
597
605
  );
598
- It(r, () => ({
606
+ Nt(r, () => ({
599
607
  refreshData: () => {
600
- L.current && L.current.refreshData();
608
+ j.current && j.current.refreshData();
601
609
  },
602
- getSelectedRows: () => L.current ? L.current.getSelectedRows() : [],
610
+ getSelectedRows: () => j.current ? j.current.getSelectedRows() : [],
603
611
  clearSelection: () => {
604
- L.current && L.current.clearSelection();
612
+ j.current && j.current.clearSelection();
605
613
  },
606
614
  exportData: () => {
607
- L.current && L.current.exportData();
615
+ j.current && j.current.exportData();
608
616
  },
609
617
  printData: () => {
610
- L.current && L.current.printData();
618
+ j.current && j.current.printData();
611
619
  },
612
- getDataGridRef: () => L
613
- }), [L]);
614
- const [k, Ae] = te({
620
+ getDataGridRef: () => j,
621
+ getFilterModel: () => j.current ? j.current.getFilterModel() : { items: [], quickFilterValues: [] }
622
+ }), [j]);
623
+ const [L, Fe] = te({
615
624
  activeFilterIndex: -1,
616
625
  currentFilter: void 0,
617
626
  expandedFilter: !1
618
627
  });
619
- ut(() => {
620
- const u = zt(o, w, F);
621
- Ae(u);
622
- }, [f]);
623
- const Ue = (u) => {
624
- if (q)
625
- return q(u);
628
+ mt(() => {
629
+ const g = Kt(o, w, F);
630
+ Fe(g);
631
+ }, [h]);
632
+ const He = (g) => {
633
+ if (M)
634
+ return M(g);
626
635
  if (!c || !c.actions)
627
636
  return;
628
- const ne = c.actions;
637
+ const ce = c.actions;
629
638
  return /* @__PURE__ */ e(
630
- ne,
639
+ ce,
631
640
  {
632
- onEditRow: c.onEditRow ? (z) => c.onEditRow && c.onEditRow(z) : void 0,
633
- onRemoveRow: c.onRemoveRow ? (z) => c.onRemoveRow && c.onRemoveRow(z) : void 0,
634
- onViewRow: c.onViewRow ? (z) => c.onViewRow && c.onViewRow(z) : void 0,
635
- row: u,
636
- variant: G ?? de.variant
641
+ onEditRow: c.onEditRow ? (Q) => c.onEditRow && c.onEditRow(Q) : void 0,
642
+ onRemoveRow: c.onRemoveRow ? (Q) => c.onRemoveRow && c.onRemoveRow(Q) : void 0,
643
+ onViewRow: c.onViewRow ? (Q) => c.onViewRow && c.onViewRow(Q) : void 0,
644
+ row: g,
645
+ variant: N ?? he.variant
637
646
  }
638
647
  );
639
- }, de = xe(), ye = se(null);
640
- Ie.useEffect(() => {
641
- A && A.current !== ye.current && A.current && ye.current && (A.current = ye.current);
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);
642
651
  }, [A]);
643
- const je = (u, ne) => {
644
- const z = { ...k, currentFilter: u, activeFilterIndex: ne };
645
- Ae(z), w && o && w?.setValue(`${o.viewName}_${o.componentName}`, z);
646
- }, Le = (u) => {
647
- const ne = { ...k, expandedFilter: u };
648
- Ae(ne), w && o && w?.setValue(`${o.viewName}_${o.componentName}`, ne);
649
- }, ke = (u, ne) => {
650
- const z = { ...k, currentFilter: u, activeFilterIndex: ne };
651
- Ae(z), w && o && w?.setValue(`${o.viewName}_${o.componentName}`, z);
652
- }, ze = () => {
653
- if (k.currentFilter)
654
- if (K)
655
- K();
656
- else if (k.currentFilter.filter.filterType === "quick") {
657
- const u = n.getOptions();
658
- k.currentFilter.filter.quickFilterText && k.currentFilter.filter.quickFilterText !== "" ? (u.filter = JSON.stringify({
659
- search: k.currentFilter.filter.quickFilterText,
660
- fields: k.currentFilter.filter.quickFilterFieldsText
661
- }), u.sort = k.currentFilter.sort.quickFilterSort ? k.currentFilter.sort.quickFilterSort.split(",") : []) : (u.filter = void 0, u.sort = void 0), n.refreshData(u), we.isDataSourceV2 || we.v1State.forceUpdate();
652
+ const i = (g, ce) => {
653
+ const Q = { ...L, currentFilter: g, activeFilterIndex: ce };
654
+ Fe(Q), w && o && w?.setValue(`${o.viewName}_${o.componentName}`, Q);
655
+ }, p = (g) => {
656
+ const ce = { ...L, expandedFilter: g };
657
+ Fe(ce), w && o && w?.setValue(`${o.viewName}_${o.componentName}`, ce);
658
+ }, le = (g, ce) => {
659
+ const Q = { ...L, currentFilter: g, activeFilterIndex: ce };
660
+ Fe(Q), w && o && w?.setValue(`${o.viewName}_${o.componentName}`, Q);
661
+ }, se = () => {
662
+ if (L.currentFilter)
663
+ if (_)
664
+ _();
665
+ else if (L.currentFilter.filter.filterType === "quick") {
666
+ const g = n.getOptions();
667
+ L.currentFilter.filter.quickFilterText && L.currentFilter.filter.quickFilterText !== "" ? (g.filter = JSON.stringify({
668
+ search: L.currentFilter.filter.quickFilterText,
669
+ 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();
662
671
  } else {
663
- const u = Ut(k.currentFilter);
664
- if (u && u.expressionNode) {
665
- const ne = Ft(u.expressionNode), z = n.getOptions();
666
- z.filter = ne, z.sort = u?.sortStrings, n.refreshData(z), we.isDataSourceV2 || we.v1State.forceUpdate();
672
+ const g = _t(L.currentFilter);
673
+ 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();
667
676
  }
668
677
  }
669
678
  };
670
- let Re, Ee;
671
- const qe = (u) => {
672
- Re = u;
673
- }, Me = (u) => {
674
- Ee = u;
675
- }, i = () => {
676
- Ee && Ee();
677
- }, g = () => {
678
- Re && Re();
679
- }, le = () => x === "none" ? /* @__PURE__ */ e("div", {}) : x === "advanced" ? /* @__PURE__ */ e(
680
- rt,
679
+ let Te, Ve;
680
+ const De = (g) => {
681
+ Te = g;
682
+ }, At = (g) => {
683
+ Ve = g;
684
+ }, yt = () => {
685
+ Ve && Ve();
686
+ }, Ct = () => {
687
+ Te && Te();
688
+ }, Ft = () => x === "none" ? /* @__PURE__ */ e("div", {}) : x === "advanced" ? /* @__PURE__ */ e(
689
+ it,
681
690
  {
682
691
  id: o?.componentName,
683
692
  viewName: o?.viewName,
684
693
  apiVersion: o?.apiVersion,
685
- ref: be,
686
- variant: G ?? de.variant,
687
- expandedFilter: k.expandedFilter,
694
+ ref: _e,
695
+ variant: N ?? he.variant,
696
+ expandedFilter: L.expandedFilter,
688
697
  persistenceDelegator: F,
689
- currentFilter: k.currentFilter,
690
- activeFilterIndex: k.activeFilterIndex,
691
- onSelectedFilter: ke,
692
- onFilterChanged: je,
693
- onSearchByFilter: ze,
694
- onToggleExpandedFilter: Le,
695
- onExport: i,
696
- onPrint: g,
698
+ currentFilter: L.currentFilter,
699
+ activeFilterIndex: L.activeFilterIndex,
700
+ onSelectedFilter: le,
701
+ onFilterChanged: i,
702
+ onSearchByFilter: se,
703
+ onToggleExpandedFilter: p,
704
+ onExport: yt,
705
+ onPrint: Ct,
697
706
  showExportButton: !0,
698
707
  showPrintButton: !0,
699
708
  width: "560px",
@@ -702,127 +711,134 @@ function qt(t, r) {
702
711
  }
703
712
  ) : x === "normal" ? /* @__PURE__ */ e("div", {}) : /* @__PURE__ */ e("div", {});
704
713
  return /* @__PURE__ */ e(
705
- ve,
714
+ Ae,
706
715
  {
707
- resourceName: H,
708
- resourceDescription: S,
709
- requiredPermissions: oe,
710
- fallbackComponent: pe,
711
- onSecurityReady: j?.onSecurityReady,
712
- onAccessDenied: j?.onAccessDenied,
713
- children: /* @__PURE__ */ C(Je, { withBorder: E, ref: ye, style: { overflow: "none", height: "calc(100% - 4px)" }, children: [
716
+ resourceName: ie,
717
+ resourceDescription: oe,
718
+ requiredPermissions: K,
719
+ fallbackComponent: ye,
720
+ onSecurityReady: xe?.onSecurityReady,
721
+ onAccessDenied: xe?.onAccessDenied,
722
+ children: /* @__PURE__ */ C(We, { withBorder: E, ref: Re, style: { height: "calc(100% - 4px)" }, children: [
714
723
  B ? /* @__PURE__ */ e(
715
- $e,
724
+ Le,
716
725
  {
717
726
  autoClose: 2e4,
718
727
  withCloseButton: !0,
719
728
  withBorder: !0,
720
- icon: /* @__PURE__ */ e(Ge, { size: "1.4rem" }),
721
- title: p().t("archbase:WARNING"),
729
+ icon: /* @__PURE__ */ e(je, { size: "1.4rem" }),
730
+ title: m().t("archbase:WARNING"),
722
731
  titleColor: "rgb(250, 82, 82)",
723
- variant: G ?? de.variant,
732
+ variant: N ?? he.variant,
724
733
  onClose: () => b && b(),
725
- children: /* @__PURE__ */ e("span", { children: Y })
734
+ children: /* @__PURE__ */ e("span", { children: X })
726
735
  }
727
736
  ) : null,
728
737
  /* @__PURE__ */ C(
729
- St,
738
+ jt,
730
739
  {
731
- gridRef: L,
740
+ gridRef: j,
732
741
  printTitle: d || a,
733
- logoPrint: O,
742
+ logoPrint: ee,
734
743
  width: y,
735
- height: Z,
744
+ height: Y,
736
745
  withBorder: E,
737
746
  dataSource: n,
738
747
  enableColumnResizing: !0,
739
- enableRowNumbers: Q,
748
+ enableRowNumbers: H,
740
749
  enableRowSelection: re,
741
- enableRowActions: M,
742
- enableTopToolbar: W,
743
- enableTopToolbarActions: N,
750
+ enableRowActions: k,
751
+ enableTopToolbar: q,
752
+ enableTopToolbarActions: P,
744
753
  manualPagination: !0,
745
754
  manualSorting: !0,
746
- isLoading: D,
747
- pageSize: h,
748
- pageIndex: m,
755
+ isLoading: V,
756
+ pageSize: u,
757
+ pageIndex: f,
749
758
  allowColumnFilters: x !== "none",
750
759
  enableGlobalFilter: x !== "none",
751
760
  renderToolbarInternalActions: x == "none" ? () => /* @__PURE__ */ e("div", {}) : void 0,
752
761
  allowExportData: !0,
753
762
  allowPrintData: !0,
754
- onSelectedRowsChanged: ee,
755
- onCellDoubleClick: ue,
756
- renderRowActions: M ? Ue : void 0,
757
- positionActionsColumn: V,
758
- toolbarAlignment: X,
759
- toolbarLeftContent: I,
760
- renderToolbarActions: x === "advanced" || x === "none" ? le : void 0,
761
- paginationLabels: s,
762
- cellPadding: $,
763
+ onSelectedRowsChanged: fe,
764
+ onCellDoubleClick: s,
765
+ onFilterModelChange: z,
766
+ renderRowActions: k ? He : void 0,
767
+ positionActionsColumn: D,
768
+ actionsColumnWidth: $,
769
+ toolbarAlignment: I,
770
+ toolbarLeftContent: Je,
771
+ renderToolbarActions: x === "advanced" || x === "none" ? Ft : void 0,
772
+ paginationLabels: O,
773
+ cellPadding: G,
763
774
  bottomToolbarMinHeight: R,
764
- tableHeadCellPadding: U,
765
- getRowId: P,
766
- renderDetailPanel: _ ? ({ row: u }) => _({ row: u }) : void 0,
767
- renderTopToolbar: J,
768
- onExport: Me,
769
- onPrint: qe,
770
- variant: G,
775
+ tableHeadCellPadding: J,
776
+ getRowId: S,
777
+ renderDetailPanel: U ? ({ row: g }) => U({ row: g }) : void 0,
778
+ renderTopToolbar: W,
779
+ onExport: At,
780
+ onPrint: De,
781
+ variant: N,
782
+ withToolbarBorder: Ie,
783
+ withPaginationBorder: Me,
784
+ toolbarPadding: ke,
785
+ paginationPadding: ze,
786
+ rowHeight: qe,
771
787
  children: [
772
788
  T,
773
- l?.visible ? /* @__PURE__ */ e(Bt, { children: /* @__PURE__ */ C(Fe, { children: [
789
+ l?.visible ? /* @__PURE__ */ e(Lt, { children: /* @__PURE__ */ C(Ee, { children: [
774
790
  /* @__PURE__ */ e("h3", { className: "only-print", children: d || a }),
775
- /* @__PURE__ */ e("div", { className: "no-print", children: /* @__PURE__ */ C(ce, { gap: "8px", rowGap: "8px", children: [
791
+ /* @__PURE__ */ e("div", { className: "no-print", children: /* @__PURE__ */ C(ue, { gap: "8px", rowGap: "8px", children: [
776
792
  l.customUserActions && l.customUserActionsPosition === "left" ? l.customUserActions : null,
777
793
  l.onAddExecute ? /* @__PURE__ */ e(
778
- ie,
794
+ ne,
779
795
  {
780
796
  actionName: "add",
781
- actionDescription: `Adicionar novo ${S || "registro"}`,
797
+ actionDescription: `Adicionar novo ${oe || "registro"}`,
782
798
  color: "green",
783
- variant: G ?? de.variant,
784
- leftSection: /* @__PURE__ */ e(We, {}),
799
+ variant: N ?? he.variant,
800
+ leftSection: /* @__PURE__ */ e(Qe, {}),
785
801
  onClick: () => l && l.onAddExecute && l.onAddExecute(),
786
- children: l.labelAdd || p().t("archbase:New")
802
+ children: l.labelAdd || m().t("archbase:New")
787
803
  }
788
804
  ) : null,
789
805
  l.onEditExecute ? /* @__PURE__ */ e(
790
- ie,
806
+ ne,
791
807
  {
792
808
  actionName: "edit",
793
- actionDescription: `Editar ${S || "registro"}`,
809
+ actionDescription: `Editar ${oe || "registro"}`,
794
810
  color: "blue",
795
- leftSection: /* @__PURE__ */ e(Ke, {}),
811
+ leftSection: /* @__PURE__ */ e(Xe, {}),
796
812
  disabled: !n.isBrowsing() || n.isEmpty(),
797
- variant: G ?? de.variant,
813
+ variant: N ?? he.variant,
798
814
  onClick: () => l && l.onEditExecute && l.onEditExecute(),
799
- children: l.labelEdit || p().t("archbase:Edit")
815
+ children: l.labelEdit || m().t("archbase:Edit")
800
816
  }
801
817
  ) : null,
802
818
  l.onRemoveExecute ? /* @__PURE__ */ e(
803
- ie,
819
+ ne,
804
820
  {
805
821
  actionName: "delete",
806
- actionDescription: `Remover ${S || "registro"}`,
822
+ actionDescription: `Remover ${oe || "registro"}`,
807
823
  color: "red",
808
- leftSection: /* @__PURE__ */ e(Qe, {}),
824
+ leftSection: /* @__PURE__ */ e(Ye, {}),
809
825
  disabled: !l?.allowRemove || !n.isBrowsing() || n.isEmpty(),
810
- variant: G ?? de.variant,
826
+ variant: N ?? he.variant,
811
827
  onClick: () => l && l.onRemoveExecute && l.onRemoveExecute(),
812
- children: l.labelRemove || p().t("archbase:Remove")
828
+ children: l.labelRemove || m().t("archbase:Remove")
813
829
  }
814
830
  ) : null,
815
831
  l.onViewExecute ? /* @__PURE__ */ e(
816
- ie,
832
+ ne,
817
833
  {
818
834
  actionName: "view",
819
- actionDescription: `Visualizar ${S || "registro"}`,
835
+ actionDescription: `Visualizar ${oe || "registro"}`,
820
836
  color: "gray.7",
821
- leftSection: /* @__PURE__ */ e(Xe, {}),
837
+ leftSection: /* @__PURE__ */ e(Ze, {}),
822
838
  disabled: !n.isBrowsing() || n.isEmpty(),
823
- variant: G ?? de.variant,
839
+ variant: N ?? he.variant,
824
840
  onClick: () => l && l.onViewExecute && l.onViewExecute(),
825
- children: l.labelView || p().t("archbase:View")
841
+ children: l.labelView || m().t("archbase:View")
826
842
  }
827
843
  ) : null,
828
844
  l.customUserActions && l.customUserActionsPosition === "right" ? l.customUserActions : null
@@ -835,13 +851,13 @@ function qt(t, r) {
835
851
  }
836
852
  );
837
853
  }
838
- const hr = Et(qt);
839
- function Mt(t, r, a, d) {
854
+ const br = St(Qt);
855
+ function Xt(t, r, a, d) {
840
856
  if (t && t.headerGridColumns) {
841
- 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" }, h = t.headerGridColumns.right ? t.headerGridColumns.right : { xs: "auto", sm: "auto", md: "auto", lg: "auto" };
842
- return /* @__PURE__ */ C(he, { m: 0, gutter: "xs", justify: "center", align: "center", grow: !0, children: [
857
+ 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
+ return /* @__PURE__ */ C(me, { m: 0, gutter: "xs", justify: "center", align: "center", grow: !0, children: [
843
859
  /* @__PURE__ */ e(
844
- he.Col,
860
+ me.Col,
845
861
  {
846
862
  span: {
847
863
  xs: n.xs,
@@ -859,7 +875,7 @@ function Mt(t, r, a, d) {
859
875
  }
860
876
  ),
861
877
  /* @__PURE__ */ e(
862
- he.Col,
878
+ me.Col,
863
879
  {
864
880
  span: {
865
881
  xs: o.xs,
@@ -876,13 +892,13 @@ function Mt(t, r, a, d) {
876
892
  }
877
893
  ),
878
894
  /* @__PURE__ */ e(
879
- he.Col,
895
+ me.Col,
880
896
  {
881
897
  span: {
882
- xs: h.xs,
883
- sm: h.sm,
884
- md: h.md,
885
- lg: h.lg
898
+ xs: u.xs,
899
+ sm: u.sm,
900
+ md: u.md,
901
+ lg: u.lg
886
902
  },
887
903
  style: {
888
904
  border: d ? "1px dashed" : "",
@@ -895,15 +911,15 @@ function Mt(t, r, a, d) {
895
911
  )
896
912
  ] });
897
913
  } else {
898
- const n = t && t.headerFlexGrow ? t.headerFlexGrow : "even", o = t && t.headerFlexRightJustifyContent ? t.headerFlexRightJustifyContent : "flex-end", h = t && t.headerFlexLeftJustifyContent ? t.headerFlexLeftJustifyContent : "flex-start";
899
- return /* @__PURE__ */ C(ce, { justify: "space-between", children: [
914
+ const n = t && t.headerFlexGrow ? t.headerFlexGrow : "even", o = t && t.headerFlexRightJustifyContent ? t.headerFlexRightJustifyContent : "flex-end", u = t && t.headerFlexLeftJustifyContent ? t.headerFlexLeftJustifyContent : "flex-start";
915
+ return /* @__PURE__ */ C(ue, { justify: "space-between", children: [
900
916
  /* @__PURE__ */ e(
901
- ce,
917
+ ue,
902
918
  {
903
919
  w: n === "left" || n === "even" ? "100%" : void 0,
904
920
  maw: n === "left" || n === "even" ? void 0 : "100%",
905
921
  align: "center",
906
- justify: h,
922
+ justify: u,
907
923
  style: {
908
924
  border: d ? "1px dashed" : ""
909
925
  },
@@ -911,7 +927,7 @@ function Mt(t, r, a, d) {
911
927
  }
912
928
  ),
913
929
  /* @__PURE__ */ e(
914
- ce,
930
+ ue,
915
931
  {
916
932
  w: n === "right" || n === "even" ? "100%" : void 0,
917
933
  maw: n === "right" || n === "even" ? void 0 : "100%",
@@ -926,12 +942,12 @@ function Mt(t, r, a, d) {
926
942
  ] });
927
943
  }
928
944
  }
929
- function _t(t, r, a, d) {
945
+ function Yt(t, r, a, d) {
930
946
  if (t && t.footerGridColumns) {
931
- 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" }, h = t.footerGridColumns.right ? t.footerGridColumns.right : { xs: "content", sm: "content", md: "content", lg: "content" };
932
- return /* @__PURE__ */ C(he, { m: 0, gutter: "xs", justify: "center", align: "center", grow: !0, children: [
947
+ 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
+ return /* @__PURE__ */ C(me, { m: 0, gutter: "xs", justify: "center", align: "center", grow: !0, children: [
933
949
  /* @__PURE__ */ e(
934
- he.Col,
950
+ me.Col,
935
951
  {
936
952
  span: {
937
953
  xs: n.xs,
@@ -949,7 +965,7 @@ function _t(t, r, a, d) {
949
965
  }
950
966
  ),
951
967
  /* @__PURE__ */ e(
952
- he.Col,
968
+ me.Col,
953
969
  {
954
970
  span: {
955
971
  xs: o.xs,
@@ -966,13 +982,13 @@ function _t(t, r, a, d) {
966
982
  }
967
983
  ),
968
984
  /* @__PURE__ */ e(
969
- he.Col,
985
+ me.Col,
970
986
  {
971
987
  span: {
972
- xs: h.xs,
973
- sm: h.sm,
974
- md: h.md,
975
- lg: h.lg
988
+ xs: u.xs,
989
+ sm: u.sm,
990
+ md: u.md,
991
+ lg: u.lg
976
992
  },
977
993
  style: {
978
994
  border: d ? "1px dashed" : "",
@@ -985,15 +1001,15 @@ function _t(t, r, a, d) {
985
1001
  )
986
1002
  ] });
987
1003
  } else {
988
- const n = t && t.footerFlexGrow ? t.footerFlexGrow : "even", o = t && t.footerFlexRightJustifyContent ? t.footerFlexRightJustifyContent : "flex-end", h = t && t.footerFlexLeftJustifyContent ? t.footerFlexLeftJustifyContent : "flex-start";
989
- return /* @__PURE__ */ C(ce, { justify: "space-between", children: [
1004
+ const n = t && t.footerFlexGrow ? t.footerFlexGrow : "even", o = t && t.footerFlexRightJustifyContent ? t.footerFlexRightJustifyContent : "flex-end", u = t && t.footerFlexLeftJustifyContent ? t.footerFlexLeftJustifyContent : "flex-start";
1005
+ return /* @__PURE__ */ C(ue, { justify: "space-between", children: [
990
1006
  /* @__PURE__ */ e(
991
- ce,
1007
+ ue,
992
1008
  {
993
1009
  w: n === "left" || n === "even" ? "100%" : void 0,
994
1010
  maw: n === "left" || n === "even" ? void 0 : "100%",
995
1011
  align: "center",
996
- justify: h,
1012
+ justify: u,
997
1013
  style: {
998
1014
  border: d ? "1px dashed" : "",
999
1015
  height: "auto",
@@ -1003,7 +1019,7 @@ function _t(t, r, a, d) {
1003
1019
  }
1004
1020
  ),
1005
1021
  /* @__PURE__ */ e(
1006
- ce,
1022
+ ue,
1007
1023
  {
1008
1024
  w: n === "right" || n === "even" ? "100%" : void 0,
1009
1025
  maw: n === "right" || n === "even" ? void 0 : "100%",
@@ -1020,28 +1036,28 @@ function _t(t, r, a, d) {
1020
1036
  ] });
1021
1037
  }
1022
1038
  }
1023
- function xt({
1039
+ function wt({
1024
1040
  title: t,
1025
1041
  innerRef: r,
1026
1042
  isError: a = !1,
1027
1043
  error: d = "",
1028
1044
  clearError: n,
1029
1045
  width: o = "100%",
1030
- height: h = "100%",
1031
- withBorder: m = !0,
1046
+ height: u = "100%",
1047
+ withBorder: f = !0,
1032
1048
  children: T,
1033
1049
  radius: v,
1034
- debug: O,
1050
+ debug: ee,
1035
1051
  defaultDebug: l,
1036
1052
  headerLeft: c,
1037
- headerMiddle: q,
1053
+ headerMiddle: M,
1038
1054
  headerRight: A,
1039
- footerLeft: D,
1040
- footerMiddle: f,
1055
+ footerLeft: V,
1056
+ footerMiddle: h,
1041
1057
  footerRight: B,
1042
- variant: W,
1043
- options: N = {},
1044
- style: Y,
1058
+ variant: q,
1059
+ options: P = {},
1060
+ style: X,
1045
1061
  debugOptions: b = {
1046
1062
  debugLayoutHotKey: "ctrl+shift+S",
1047
1063
  debugObjectInspectorHotKey: "ctrl+shift+D",
@@ -1050,70 +1066,70 @@ function xt({
1050
1066
  // Props de segurança (opcionais)
1051
1067
  resourceName: x,
1052
1068
  resourceDescription: y,
1053
- requiredPermissions: Z,
1054
- fallbackComponent: K,
1055
- securityOptions: P
1069
+ requiredPermissions: Y,
1070
+ fallbackComponent: _,
1071
+ securityOptions: S
1056
1072
  }) {
1057
- const [E, F] = wt({
1058
- value: O,
1073
+ const [E, F] = It({
1074
+ value: ee,
1059
1075
  defaultValue: l,
1060
1076
  finalValue: !1
1061
1077
  });
1062
- At([[b && b.debugLayoutHotKey, () => F(!E)]]);
1063
- const G = xe(), { t: w } = Rt();
1064
- me({
1065
- autoRegisterActions: P?.autoRegisterActions ?? !0
1078
+ Tt([[b && b.debugLayoutHotKey, () => F(!E)]]);
1079
+ const N = we(), { t: w } = Pt();
1080
+ ge({
1081
+ autoRegisterActions: S?.autoRegisterActions ?? !0
1066
1082
  });
1067
- const $ = se(null), R = r || $, re = se(null), Q = se(null), M = Ne(re), V = Ne(Q), U = Ne(R), _ = Ce(() => ({
1068
- height: U.height - M.height - V.height - Number(vt("0.625rem")),
1069
- width: U.width - M.width - V.width
1070
- }), [U.height, U.width, M.height, M.width, V.height, V.width]), J = se(l);
1071
- ut(() => {
1072
- l !== J.current && (F(l), J.current = l);
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
+ width: $.width - k.width - D.width
1086
+ }), [$.height, $.width, k.height, k.width, D.height, D.width]), U = ae(l);
1087
+ mt(() => {
1088
+ l !== U.current && (F(l), U.current = l);
1073
1089
  }, [l, F]);
1074
- const X = /* @__PURE__ */ C(Fe, { children: [
1090
+ const W = /* @__PURE__ */ C(Ee, { children: [
1075
1091
  /* @__PURE__ */ e(
1076
- Je,
1092
+ We,
1077
1093
  {
1078
1094
  ref: R,
1079
- withBorder: m,
1095
+ withBorder: f,
1080
1096
  radius: v,
1081
- style: { width: o, height: h, padding: 4, ...Y },
1082
- children: /* @__PURE__ */ C(Oe, { height: "100%", children: [
1083
- /* @__PURE__ */ e(pt, { size: M.height, children: /* @__PURE__ */ e("div", { ref: re, children: Mt(N, c, A, E) }) }),
1084
- /* @__PURE__ */ e(et, { children: /* @__PURE__ */ e(
1085
- it,
1097
+ style: { width: o, height: u, padding: 4, ...X },
1098
+ 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) }) }),
1100
+ /* @__PURE__ */ e(rt, { children: /* @__PURE__ */ e(
1101
+ st,
1086
1102
  {
1087
- h: _.height,
1103
+ h: J.height,
1088
1104
  style: {
1089
1105
  border: E ? "1px dashed" : "",
1090
1106
  padding: "calc(0.625rem / 2)"
1091
1107
  },
1092
- children: T ? /* @__PURE__ */ C(Tt, { children: [
1108
+ children: T ? /* @__PURE__ */ C(Gt, { children: [
1093
1109
  a && /* @__PURE__ */ e(
1094
- $e,
1110
+ Le,
1095
1111
  {
1096
1112
  autoClose: 2e4,
1097
1113
  withCloseButton: !0,
1098
1114
  withBorder: !0,
1099
- icon: /* @__PURE__ */ e(Ge, { size: "1.4rem" }),
1115
+ icon: /* @__PURE__ */ e(je, { size: "1.4rem" }),
1100
1116
  title: `${w("WARNING")}`,
1101
1117
  titleColor: "rgb(250, 82, 82)",
1102
- variant: W ?? G.variant,
1118
+ variant: q ?? N.variant,
1103
1119
  onClose: () => n && n(),
1104
1120
  children: /* @__PURE__ */ e("span", { children: d })
1105
1121
  }
1106
1122
  ),
1107
1123
  T
1108
- ] }) : E && /* @__PURE__ */ e(ce, { h: _.height + 80, justify: "center", align: "center", wrap: "wrap", children: /* @__PURE__ */ e(bt, { size: "lg", children: "INSIRA O CONTEÚDO DO PAINEL AQUI." }) })
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." }) })
1109
1125
  }
1110
1126
  ) }),
1111
- /* @__PURE__ */ e(tt, { size: V.height, children: /* @__PURE__ */ e("div", { ref: Q, children: _t(N, D, B, E) }) })
1127
+ /* @__PURE__ */ e(nt, { size: D.height, children: /* @__PURE__ */ e("div", { ref: H, children: Yt(P, V, B, E) }) })
1112
1128
  ] })
1113
1129
  }
1114
1130
  ),
1115
1131
  /* @__PURE__ */ e(
1116
- Nt,
1132
+ Mt,
1117
1133
  {
1118
1134
  debugObjectInspectorHotKey: b && b.debugObjectInspectorHotKey,
1119
1135
  objectsToInspect: b && b.objectsToInspect
@@ -1121,19 +1137,19 @@ function xt({
1121
1137
  )
1122
1138
  ] });
1123
1139
  return /* @__PURE__ */ e(
1124
- ve,
1140
+ Ae,
1125
1141
  {
1126
1142
  resourceName: x,
1127
1143
  resourceDescription: y,
1128
- requiredPermissions: Z,
1129
- fallbackComponent: K,
1130
- onSecurityReady: P?.onSecurityReady,
1131
- onAccessDenied: P?.onAccessDenied,
1132
- children: X
1144
+ requiredPermissions: Y,
1145
+ fallbackComponent: _,
1146
+ onSecurityReady: S?.onSecurityReady,
1147
+ onAccessDenied: S?.onAccessDenied,
1148
+ children: W
1133
1149
  }
1134
1150
  );
1135
1151
  }
1136
- const Jt = {
1152
+ const Zt = {
1137
1153
  visible: !0,
1138
1154
  allowAdd: !0,
1139
1155
  allowEdit: !0,
@@ -1141,10 +1157,10 @@ const Jt = {
1141
1157
  allowRemove: !0,
1142
1158
  positionCustomUserActions: "after"
1143
1159
  };
1144
- function Ht(t, r, a, d, n, o) {
1160
+ function Ot(t, r, a, d, n, o) {
1145
1161
  console.log(`Render de "${t}" na fase "${r}": ${a}ms`);
1146
1162
  }
1147
- function fr({
1163
+ function wr({
1148
1164
  title: t,
1149
1165
  dataSource: r,
1150
1166
  // dataSourceEdition,
@@ -1154,222 +1170,222 @@ function fr({
1154
1170
  filterFields: n,
1155
1171
  innerRef: o,
1156
1172
  //isLoading = false,
1157
- debug: h = !1,
1158
- filterType: m = "normal",
1173
+ debug: u = !1,
1174
+ filterType: f = "normal",
1159
1175
  isError: T = !1,
1160
1176
  error: v = "",
1161
- clearError: O = () => {
1177
+ clearError: ee = () => {
1162
1178
  },
1163
1179
  width: l = "100%",
1164
1180
  height: c = "100%",
1165
- withBorder: q = !0,
1181
+ withBorder: M = !0,
1166
1182
  filterPersistenceDelegator: A,
1167
- withPagination: D = !0,
1168
- radius: f,
1183
+ withPagination: V = !0,
1184
+ radius: h,
1169
1185
  userActions: B,
1170
- columnsCountBreakPoints: W,
1171
- columnsCount: N,
1172
- gutter: Y,
1186
+ columnsCountBreakPoints: q,
1187
+ columnsCount: P,
1188
+ gutter: X,
1173
1189
  component: b,
1174
1190
  activeIndex: x,
1175
1191
  activeBackgroundColor: y,
1176
- activeColor: Z,
1177
- onItemEnter: K,
1178
- onItemLeave: P,
1192
+ activeColor: Y,
1193
+ onItemEnter: _,
1194
+ onItemLeave: S,
1179
1195
  style: E,
1180
1196
  actionsButtonsOptions: F,
1181
- spaceOptions: G,
1197
+ spaceOptions: N,
1182
1198
  variant: w,
1183
- id: $ = Lt("masonry"),
1199
+ id: G = Jt("masonry"),
1184
1200
  debugOptions: R,
1185
1201
  // Props de segurança (opcionais)
1186
1202
  resourceName: re,
1187
- resourceDescription: Q,
1188
- requiredPermissions: M,
1189
- fallbackComponent: V,
1190
- securityOptions: U
1203
+ resourceDescription: H,
1204
+ requiredPermissions: k,
1205
+ fallbackComponent: D,
1206
+ securityOptions: $
1191
1207
  }) {
1192
- const _ = xe(), J = me({
1193
- autoRegisterActions: U?.autoRegisterActions ?? !0
1194
- }), [X] = te($), I = o || se(null), ee = se(null), [ue, s] = te(r.getCurrentPage()), [H, S] = te(
1208
+ const J = we(), U = ge({
1209
+ autoRegisterActions: $?.autoRegisterActions ?? !0
1210
+ }), [W] = te(G), I = o || ae(null), Z = ae(null), [fe, s] = te(r.getCurrentPage()), [z, O] = te(
1195
1211
  x || (r && r.getTotalRecords() > 0 ? 0 : -1)
1196
1212
  );
1197
- Ne(I);
1198
- const [oe, pe] = te({
1213
+ $e(I);
1214
+ const [ie, oe] = te({
1199
1215
  activeFilterIndex: -1,
1200
1216
  expandedFilter: !1
1201
- }), [j, be] = te(0), {
1202
- isDataSourceV2: L,
1203
- v1State: { forceUpdate: Ve }
1204
- } = De(
1217
+ }), [K, ye] = te(0), {
1218
+ isDataSourceV2: xe,
1219
+ v1State: { forceUpdate: Ie }
1220
+ } = Se(
1205
1221
  "ArchbaseMasonryTemplate",
1206
1222
  r
1207
1223
  );
1208
- Ze({
1224
+ et({
1209
1225
  dataSource: r,
1210
1226
  listener: (i) => {
1211
- (i.type === fe.afterRemove || i.type === fe.refreshData) && (be((g) => g + 1), L || Ve());
1227
+ (i.type === pe.afterRemove || i.type === pe.refreshData) && (ye((p) => p + 1), xe || Ie());
1212
1228
  }
1213
1229
  });
1214
- const we = Ce(() => {
1215
- const i = { ...Jt, ...B }, g = [], le = (u) => J.isAvailable ? (J.registerAction(), J.hasPermission()) : !0;
1216
- return i.allowAdd && i.onAddExecute && le() && g.push({
1230
+ const Me = be(() => {
1231
+ const i = { ...Zt, ...B }, p = [], le = (se) => U.isAvailable ? (U.registerAction(), U.hasPermission()) : !0;
1232
+ return i.allowAdd && i.onAddExecute && le() && p.push({
1217
1233
  id: "actAdd",
1218
- icon: /* @__PURE__ */ e(We, {}),
1234
+ icon: /* @__PURE__ */ e(Qe, {}),
1219
1235
  color: "green",
1220
- label: i.labelAdd ? i.labelAdd : p().t("archbase:New"),
1236
+ label: i.labelAdd ? i.labelAdd : m().t("archbase:New"),
1221
1237
  executeAction: () => {
1222
1238
  i && i.onAddExecute && i.onAddExecute();
1223
1239
  },
1224
1240
  enabled: !0,
1225
- hint: `${p().t("archbase:Clique para criar um novo registro")}`
1226
- }), i.allowEdit && i.onEditExecute && le() && g.push({
1241
+ hint: `${m().t("archbase:Clique para criar um novo registro")}`
1242
+ }), i.allowEdit && i.onEditExecute && le() && p.push({
1227
1243
  id: "actEdit",
1228
- icon: /* @__PURE__ */ e(Ke, {}),
1244
+ icon: /* @__PURE__ */ e(Xe, {}),
1229
1245
  color: "blue",
1230
- label: i.labelEdit ? i.labelEdit : p().t("archbase:Edit"),
1246
+ label: i.labelEdit ? i.labelEdit : m().t("archbase:Edit"),
1231
1247
  executeAction: () => {
1232
1248
  i && i.onEditExecute && i.onEditExecute();
1233
1249
  },
1234
1250
  enabled: !r.isEmpty() && r.isBrowsing(),
1235
- hint: `${p().t("archbase:Clique para editar o registro")}`
1236
- }), i.allowRemove && i.onRemoveExecute && le() && g.push({
1251
+ hint: `${m().t("archbase:Clique para editar o registro")}`
1252
+ }), i.allowRemove && i.onRemoveExecute && le() && p.push({
1237
1253
  id: "actRemove",
1238
- icon: /* @__PURE__ */ e(Qe, {}),
1254
+ icon: /* @__PURE__ */ e(Ye, {}),
1239
1255
  color: "red",
1240
- label: i.labelRemove ? i.labelRemove : p().t("archbase:Remove"),
1256
+ label: i.labelRemove ? i.labelRemove : m().t("archbase:Remove"),
1241
1257
  executeAction: () => {
1242
1258
  i && i.onRemoveExecute && i.onRemoveExecute();
1243
1259
  },
1244
1260
  enabled: !r.isEmpty() && r.isBrowsing(),
1245
- hint: `${p().t("archbase:Clique para remover o registro")}`
1246
- }), i.allowView && i.onViewExecute && le() && g.push({
1261
+ hint: `${m().t("archbase:Clique para remover o registro")}`
1262
+ }), i.allowView && i.onViewExecute && le() && p.push({
1247
1263
  id: "actView",
1248
- icon: /* @__PURE__ */ e(Xe, {}),
1249
- label: i.labelView ? i.labelView : p().t("archbase:View"),
1264
+ icon: /* @__PURE__ */ e(Ze, {}),
1265
+ label: i.labelView ? i.labelView : m().t("archbase:View"),
1250
1266
  executeAction: () => {
1251
1267
  i && i.onViewExecute && i.onViewExecute();
1252
1268
  },
1253
1269
  enabled: !r.isEmpty() && r.isBrowsing(),
1254
- hint: `${p().t("archbase:Clique para visualizar o registro")}`
1255
- }), i.customUserActions && i.positionCustomUserActions === "before" ? [...i.customUserActions, ...g] : i.customUserActions && i.positionCustomUserActions === "after" ? [...g, ...i.customUserActions] : g;
1256
- }, [B, r, J]), k = Ce(() => {
1270
+ hint: `${m().t("archbase:Clique para visualizar o registro")}`
1271
+ }), i.customUserActions && i.positionCustomUserActions === "before" ? [...i.customUserActions, ...p] : i.customUserActions && i.positionCustomUserActions === "after" ? [...p, ...i.customUserActions] : p;
1272
+ }, [B, r, U]), ke = be(() => {
1257
1273
  if (b) {
1258
1274
  const i = b.type;
1259
- let g = {};
1260
- return b.props && (g = b.props), r.browseRecords().map((le, u) => {
1261
- const ne = `${X}_${u}`, z = `${X}_${u}`;
1262
- let _e = le.active === void 0 ? !1 : le.active;
1263
- return H >= 0 && (_e = !1, H === u && (_e = !0)), /* @__PURE__ */ e(
1275
+ let p = {};
1276
+ 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(
1264
1280
  i,
1265
1281
  {
1266
- id: z,
1267
- active: _e,
1268
- index: u,
1282
+ id: Ve,
1283
+ active: De,
1284
+ index: se,
1269
1285
  dataSource: r,
1270
1286
  recordData: le,
1271
1287
  disabled: le.disabled,
1272
- ...g
1288
+ ...p
1273
1289
  },
1274
- ne
1290
+ Te
1275
1291
  );
1276
1292
  });
1277
1293
  }
1278
1294
  return [];
1279
- }, [H, b, X, r, j]), Ae = (i, g) => {
1280
- pe({ ...oe, currentFilter: i, activeFilterIndex: g });
1281
- }, Ue = (i) => {
1282
- pe({ ...oe, expandedFilter: i });
1283
- }, de = (i, g) => {
1284
- pe({ ...oe, currentFilter: i, activeFilterIndex: g });
1285
- }, ye = () => {
1286
- }, je = (i, g) => {
1287
- S(i), r && r.gotoRecordByData(g);
1288
- }, Le = (i) => {
1295
+ }, [z, b, W, r, K]), ze = (i, p) => {
1296
+ oe({ ...ie, currentFilter: i, activeFilterIndex: p });
1297
+ }, qe = (i) => {
1298
+ oe({ ...ie, expandedFilter: i });
1299
+ }, _e = (i, p) => {
1300
+ oe({ ...ie, currentFilter: i, activeFilterIndex: p });
1301
+ }, j = () => {
1302
+ }, lt = (i, p) => {
1303
+ O(i), r && r.gotoRecordByData(p);
1304
+ }, Ce = (i) => {
1289
1305
  if (r) {
1290
- const g = r.getOptions();
1291
- g.filter = i, g.currentPage = ue, r.refreshData(g), L || Ve();
1306
+ const p = r.getOptions();
1307
+ p.filter = i, p.currentPage = fe, r.refreshData(p), xe || Ie();
1292
1308
  }
1293
- }, ke = (i) => {
1309
+ }, L = (i) => {
1294
1310
  if (r) {
1295
- const g = r.getOptions();
1296
- g.currentPage = i, r.refreshData(g), L || Ve();
1311
+ const p = r.getOptions();
1312
+ p.currentPage = i, r.refreshData(p), xe || Ie();
1297
1313
  }
1298
- }, ze = () => m === "normal" && d ? /* @__PURE__ */ e(
1299
- jt,
1314
+ }, Fe = () => f === "normal" && d ? /* @__PURE__ */ e(
1315
+ Ht,
1300
1316
  {
1301
1317
  searchableFields: d,
1302
- onFilter: Le,
1318
+ onFilter: Ce,
1303
1319
  minFilterValueLength: 1
1304
1320
  }
1305
- ) : m === "advanced" ? /* @__PURE__ */ e(Dt, { id: `profile_${a.componentName}`, onRender: Ht, children: /* @__PURE__ */ e(
1306
- rt,
1321
+ ) : f === "advanced" ? /* @__PURE__ */ e($t, { id: `profile_${a.componentName}`, onRender: Ot, children: /* @__PURE__ */ e(
1322
+ it,
1307
1323
  {
1308
1324
  id: a.componentName,
1309
1325
  viewName: a.viewName,
1310
1326
  apiVersion: a.apiVersion,
1311
- ref: ee,
1312
- variant: w || _.variant,
1313
- expandedFilter: oe.expandedFilter,
1327
+ ref: Z,
1328
+ variant: w || J.variant,
1329
+ expandedFilter: ie.expandedFilter,
1314
1330
  persistenceDelegator: A,
1315
- currentFilter: oe.currentFilter,
1316
- activeFilterIndex: oe.activeFilterIndex,
1317
- onSelectedFilter: de,
1318
- onFilterChanged: Ae,
1319
- onSearchByFilter: ye,
1320
- onToggleExpandedFilter: Ue,
1331
+ currentFilter: ie.currentFilter,
1332
+ activeFilterIndex: ie.activeFilterIndex,
1333
+ onSelectedFilter: _e,
1334
+ onFilterChanged: ze,
1335
+ onSearchByFilter: j,
1336
+ onToggleExpandedFilter: qe,
1321
1337
  width: "660px",
1322
1338
  height: "170px",
1323
1339
  children: n
1324
1340
  }
1325
- ) }) : /* @__PURE__ */ e(Fe, {}), Re = {
1341
+ ) }) : /* @__PURE__ */ e(Ee, {}), He = {
1326
1342
  menuButtonColor: "blue.5",
1327
1343
  menuPosition: "left"
1328
- }, Ee = {
1344
+ }, he = {
1329
1345
  headerFlexGrow: "left",
1330
1346
  footerGridColumns: {}
1331
- }, qe = { ...Re, ...F }, Me = { ...Ee, ...G };
1347
+ }, Re = { ...He, ...F }, Je = { ...he, ...N };
1332
1348
  return /* @__PURE__ */ e(
1333
- ve,
1349
+ Ae,
1334
1350
  {
1335
1351
  resourceName: re,
1336
- resourceDescription: Q,
1337
- requiredPermissions: M,
1338
- fallbackComponent: V,
1339
- onSecurityReady: U?.onSecurityReady,
1340
- onAccessDenied: U?.onAccessDenied,
1352
+ resourceDescription: H,
1353
+ requiredPermissions: k,
1354
+ fallbackComponent: D,
1355
+ onSecurityReady: $?.onSecurityReady,
1356
+ onAccessDenied: $?.onAccessDenied,
1341
1357
  children: /* @__PURE__ */ e(
1342
- xt,
1358
+ wt,
1343
1359
  {
1344
1360
  innerRef: I,
1345
1361
  width: l,
1346
1362
  height: c,
1347
- radius: f,
1348
- withBorder: q,
1363
+ radius: h,
1364
+ withBorder: M,
1349
1365
  isError: T,
1350
1366
  error: v,
1351
- clearError: O,
1367
+ clearError: ee,
1352
1368
  title: t,
1353
- defaultDebug: h,
1369
+ defaultDebug: u,
1354
1370
  debugOptions: R,
1355
1371
  style: E,
1356
- options: Me,
1357
- headerLeft: /* @__PURE__ */ e(mt, { actions: we, options: qe }),
1358
- headerRight: ze(),
1359
- footerRight: D ? /* @__PURE__ */ e(st, { total: r.getTotalPages(), onChange: ke }) : void 0,
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,
1360
1376
  children: /* @__PURE__ */ e(
1361
- Pt,
1377
+ kt,
1362
1378
  {
1363
1379
  value: {
1364
1380
  dataSource: r,
1365
- ownerId: $,
1366
- handleSelectItem: je,
1381
+ ownerId: G,
1382
+ handleSelectItem: lt,
1367
1383
  activeBackgroundColor: y,
1368
- activeColor: Z,
1369
- onItemEnter: K,
1370
- onItemLeave: P
1384
+ activeColor: Y,
1385
+ onItemEnter: _,
1386
+ onItemLeave: S
1371
1387
  },
1372
- children: /* @__PURE__ */ e(Gt, { columnsCountBreakPoints: W, children: /* @__PURE__ */ e($t, { gutter: Y, columnsCount: N, children: k }) })
1388
+ children: /* @__PURE__ */ e(zt, { columnsCountBreakPoints: q, children: /* @__PURE__ */ e(qt, { gutter: X, columnsCount: P, children: ke }) })
1373
1389
  }
1374
1390
  )
1375
1391
  }
@@ -1377,7 +1393,7 @@ function fr({
1377
1393
  }
1378
1394
  );
1379
1395
  }
1380
- const Wt = {
1396
+ const er = {
1381
1397
  visible: !0,
1382
1398
  allowAdd: !0,
1383
1399
  allowEdit: !0,
@@ -1385,7 +1401,7 @@ const Wt = {
1385
1401
  allowRemove: !0,
1386
1402
  positionCustomUserActions: "after"
1387
1403
  };
1388
- function mr({
1404
+ function Ar({
1389
1405
  title: t,
1390
1406
  dataSource: r,
1391
1407
  // dataSourceEdition,
@@ -1395,195 +1411,195 @@ function mr({
1395
1411
  innerRef: n,
1396
1412
  //isLoading = false,
1397
1413
  isError: o = !1,
1398
- error: h = "",
1399
- clearError: m = () => {
1414
+ error: u = "",
1415
+ clearError: f = () => {
1400
1416
  },
1401
1417
  width: T = "100%",
1402
1418
  height: v = "100%",
1403
- withBorder: O = !0,
1419
+ withBorder: ee = !0,
1404
1420
  filterPersistenceDelegator: l,
1405
1421
  withPagination: c = !0,
1406
- children: q,
1422
+ children: M,
1407
1423
  radius: A,
1408
- userActions: D,
1409
- debug: f = !1,
1424
+ userActions: V,
1425
+ debug: h = !1,
1410
1426
  variant: B,
1411
- actionsButtonsOptions: W,
1412
- spaceOptions: N,
1413
- style: Y,
1427
+ actionsButtonsOptions: q,
1428
+ spaceOptions: P,
1429
+ style: X,
1414
1430
  debugOptions: b,
1415
1431
  // Props de segurança (opcionais)
1416
1432
  resourceName: x,
1417
1433
  resourceDescription: y,
1418
- requiredPermissions: Z,
1419
- fallbackComponent: K,
1420
- securityOptions: P
1434
+ requiredPermissions: Y,
1435
+ fallbackComponent: _,
1436
+ securityOptions: S
1421
1437
  }) {
1422
- const E = xe(), F = me({
1423
- autoRegisterActions: P?.autoRegisterActions ?? !0
1424
- }), G = n || se(null), w = se(null), [$, R] = te({
1438
+ const E = we(), F = ge({
1439
+ autoRegisterActions: S?.autoRegisterActions ?? !0
1440
+ }), N = n || ae(null), w = ae(null), [G, R] = te({
1425
1441
  activeFilterIndex: -1,
1426
1442
  expandedFilter: !1
1427
1443
  }), {
1428
1444
  isDataSourceV2: re,
1429
- v1State: { forceUpdate: Q }
1430
- } = De(
1445
+ v1State: { forceUpdate: H }
1446
+ } = Se(
1431
1447
  "ArchbasePanelTemplate",
1432
1448
  r
1433
- ), M = Ce(() => {
1434
- const s = { ...Wt, ...D }, H = (oe) => F.isAvailable ? (F.registerAction(), F.hasPermission()) : !0, S = [];
1435
- return s.allowAdd && s.onAddExecute && H() && S.push({
1449
+ ), k = be(() => {
1450
+ const s = { ...er, ...V }, z = (ie) => F.isAvailable ? (F.registerAction(), F.hasPermission()) : !0, O = [];
1451
+ return s.allowAdd && s.onAddExecute && z() && O.push({
1436
1452
  id: "1",
1437
- icon: /* @__PURE__ */ e(We, {}),
1453
+ icon: /* @__PURE__ */ e(Qe, {}),
1438
1454
  color: "green",
1439
- label: s.labelAdd ? s.labelAdd : p().t("archbase:New"),
1455
+ label: s.labelAdd ? s.labelAdd : m().t("archbase:New"),
1440
1456
  executeAction: () => {
1441
1457
  s && s.onAddExecute && s.onAddExecute();
1442
1458
  },
1443
1459
  enabled: !0,
1444
1460
  hint: "Clique para criar."
1445
- }), s.allowEdit && s.onEditExecute && H() && S.push({
1461
+ }), s.allowEdit && s.onEditExecute && z() && O.push({
1446
1462
  id: "2",
1447
- icon: /* @__PURE__ */ e(Ke, {}),
1463
+ icon: /* @__PURE__ */ e(Xe, {}),
1448
1464
  color: "blue",
1449
- label: s.labelEdit ? s.labelEdit : p().t("archbase:Edit"),
1465
+ label: s.labelEdit ? s.labelEdit : m().t("archbase:Edit"),
1450
1466
  executeAction: () => {
1451
1467
  s && s.onEditExecute && s.onEditExecute();
1452
1468
  },
1453
1469
  enabled: !r.isEmpty() && r.isBrowsing(),
1454
1470
  hint: "Clique para editar."
1455
- }), s.allowRemove && s.onRemoveExecute && H() && S.push({
1471
+ }), s.allowRemove && s.onRemoveExecute && z() && O.push({
1456
1472
  id: "3",
1457
- icon: /* @__PURE__ */ e(Qe, {}),
1473
+ icon: /* @__PURE__ */ e(Ye, {}),
1458
1474
  color: "red",
1459
- label: s.labelRemove ? s.labelRemove : p().t("archbase:Remove"),
1475
+ label: s.labelRemove ? s.labelRemove : m().t("archbase:Remove"),
1460
1476
  executeAction: () => {
1461
1477
  s && s.onRemoveExecute && s.onRemoveExecute();
1462
1478
  },
1463
1479
  enabled: !r.isEmpty() && r.isBrowsing(),
1464
1480
  hint: "Clique para remover."
1465
- }), s.allowView && s.onView && H() && S.push({
1481
+ }), s.allowView && s.onView && z() && O.push({
1466
1482
  id: "4",
1467
- icon: /* @__PURE__ */ e(Xe, {}),
1483
+ icon: /* @__PURE__ */ e(Ze, {}),
1468
1484
  color: "green",
1469
- label: s.labelView ? s.labelView : p().t("archbase:View"),
1485
+ label: s.labelView ? s.labelView : m().t("archbase:View"),
1470
1486
  executeAction: () => {
1471
1487
  s && s.onView && s.onView();
1472
1488
  },
1473
1489
  enabled: !r.isEmpty() && r.isBrowsing(),
1474
1490
  hint: "Clique para visualizar."
1475
- }), s.customUserActions && s.positionCustomUserActions === "before" ? [...s.customUserActions, ...S] : s.customUserActions && s.positionCustomUserActions === "after" ? [...S, ...s.customUserActions] : S;
1476
- }, [D, r, F]), V = (s, H) => {
1477
- R({ ...$, currentFilter: s, activeFilterIndex: H });
1478
- }, U = (s) => {
1479
- R({ ...$, expandedFilter: s });
1480
- }, _ = (s, H) => {
1481
- R({ ...$, currentFilter: s, activeFilterIndex: H });
1482
- }, J = () => {
1483
- }, X = {
1491
+ }), s.customUserActions && s.positionCustomUserActions === "before" ? [...s.customUserActions, ...O] : s.customUserActions && s.positionCustomUserActions === "after" ? [...O, ...s.customUserActions] : O;
1492
+ }, [V, r, F]), D = (s, z) => {
1493
+ R({ ...G, currentFilter: s, activeFilterIndex: z });
1494
+ }, $ = (s) => {
1495
+ R({ ...G, expandedFilter: s });
1496
+ }, J = (s, z) => {
1497
+ R({ ...G, currentFilter: s, activeFilterIndex: z });
1498
+ }, U = () => {
1499
+ }, W = {
1484
1500
  menuButtonColor: "blue.5",
1485
1501
  menuPosition: "left"
1486
1502
  }, I = {
1487
1503
  headerFlexGrow: "left",
1488
1504
  footerFlexGrow: "right"
1489
1505
  // footerGridColumns: {},
1490
- }, ee = { ...X, ...W }, ue = { ...I, ...N };
1506
+ }, Z = { ...W, ...q }, fe = { ...I, ...P };
1491
1507
  return /* @__PURE__ */ e(
1492
- ve,
1508
+ Ae,
1493
1509
  {
1494
1510
  resourceName: x,
1495
1511
  resourceDescription: y,
1496
- requiredPermissions: Z,
1497
- fallbackComponent: K,
1498
- onSecurityReady: P?.onSecurityReady,
1499
- onAccessDenied: P?.onAccessDenied,
1512
+ requiredPermissions: Y,
1513
+ fallbackComponent: _,
1514
+ onSecurityReady: S?.onSecurityReady,
1515
+ onAccessDenied: S?.onAccessDenied,
1500
1516
  children: /* @__PURE__ */ e(
1501
- xt,
1517
+ wt,
1502
1518
  {
1503
- innerRef: G,
1519
+ innerRef: N,
1504
1520
  width: T,
1505
1521
  height: v,
1506
1522
  radius: A,
1507
- withBorder: O,
1523
+ withBorder: ee,
1508
1524
  isError: o,
1509
- error: h,
1510
- clearError: m,
1525
+ error: u,
1526
+ clearError: f,
1511
1527
  title: t,
1512
- defaultDebug: f,
1528
+ defaultDebug: h,
1513
1529
  debugOptions: b,
1514
- style: Y,
1515
- options: ue,
1516
- headerLeft: /* @__PURE__ */ e(mt, { actions: M, options: ee }),
1530
+ style: X,
1531
+ options: fe,
1532
+ headerLeft: /* @__PURE__ */ e(xt, { actions: k, options: Z }),
1517
1533
  headerRight: /* @__PURE__ */ e(
1518
- rt,
1534
+ it,
1519
1535
  {
1520
1536
  id: a.componentName,
1521
1537
  viewName: a.viewName,
1522
1538
  apiVersion: a.apiVersion,
1523
1539
  ref: w,
1524
1540
  variant: B || E.variant,
1525
- expandedFilter: $.expandedFilter,
1541
+ expandedFilter: G.expandedFilter,
1526
1542
  persistenceDelegator: l,
1527
- currentFilter: $.currentFilter,
1528
- activeFilterIndex: $.activeFilterIndex,
1529
- onSelectedFilter: _,
1530
- onFilterChanged: V,
1531
- onSearchByFilter: J,
1532
- onToggleExpandedFilter: U,
1543
+ currentFilter: G.currentFilter,
1544
+ activeFilterIndex: G.activeFilterIndex,
1545
+ onSelectedFilter: J,
1546
+ onFilterChanged: D,
1547
+ onSearchByFilter: U,
1548
+ onToggleExpandedFilter: $,
1533
1549
  width: "660px",
1534
1550
  height: "170px",
1535
1551
  children: d
1536
1552
  }
1537
1553
  ),
1538
- footerRight: c && /* @__PURE__ */ e(st, { total: 10 }),
1539
- children: q
1554
+ footerRight: c && /* @__PURE__ */ e(dt, { total: 10 }),
1555
+ children: M
1540
1556
  }
1541
1557
  )
1542
1558
  }
1543
1559
  );
1544
1560
  }
1545
- function pr() {
1561
+ function yr() {
1546
1562
  return /* @__PURE__ */ e("div", { children: "SEARCH TEMPLATE" });
1547
1563
  }
1548
- const nt = Vt(void 0);
1549
- function gr({ children: t }) {
1550
- const [r, a] = te({}), d = Be((m, T) => {
1551
- a((v) => ({ ...v, [m]: T }));
1552
- }, []), n = Be((m) => {
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) => {
1553
1569
  a((T) => {
1554
1570
  const v = { ...T };
1555
- return delete v[m], v;
1571
+ return delete v[f], v;
1556
1572
  });
1557
- }, []), o = Be(() => {
1573
+ }, []), o = Ge(() => {
1558
1574
  a({});
1559
- }, []), h = Be((m) => r[m], [r]);
1560
- return /* @__PURE__ */ e(nt.Provider, { value: { errors: r, setError: d, clearError: n, clearAll: o, getError: h }, children: t });
1575
+ }, []), u = Ge((f) => r[f], [r]);
1576
+ return /* @__PURE__ */ e(ot.Provider, { value: { errors: r, setError: d, clearError: n, clearAll: o, getError: u }, children: t });
1561
1577
  }
1562
- function xr() {
1563
- return ht(nt);
1578
+ function Fr() {
1579
+ return pt(ot);
1564
1580
  }
1565
- function vr() {
1566
- const t = ht(nt);
1581
+ function Rr() {
1582
+ const t = pt(ot);
1567
1583
  if (!t)
1568
1584
  throw new Error("useRequiredValidationErrors must be used within ValidationErrorsProvider");
1569
1585
  return t;
1570
1586
  }
1571
1587
  export {
1572
- sr as ArchbaseAdvancedSmartButton,
1573
- ve as ArchbaseConditionalSecurityWrapper,
1574
- dr as ArchbaseFormModalTemplate,
1575
- cr as ArchbaseFormTemplate,
1576
- hr as ArchbaseGridTemplate,
1577
- fr as ArchbaseMasonryTemplate,
1578
- ur as ArchbaseModalTemplate,
1579
- mr as ArchbasePanelTemplate,
1580
- pr as ArchbaseSearchTemplate,
1581
- ie as ArchbaseSmartActionButton,
1582
- xt as ArchbaseSpaceTemplate,
1583
- gr as ValidationErrorsProvider,
1584
- ar as useConditionalSecurity,
1585
- me as useOptionalTemplateSecurity,
1586
- vr as useRequiredValidationErrors,
1587
- lr as useTemplateSecurityAvailable,
1588
- xr as useValidationErrors
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,
1597
+ ne as ArchbaseSmartActionButton,
1598
+ wt as ArchbaseSpaceTemplate,
1599
+ Cr as ValidationErrorsProvider,
1600
+ pr as useConditionalSecurity,
1601
+ ge as useOptionalTemplateSecurity,
1602
+ Rr as useRequiredValidationErrors,
1603
+ fr as useTemplateSecurityAvailable,
1604
+ Fr as useValidationErrors
1589
1605
  };