@archbase/template 3.0.21 → 3.0.23

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 Be, jsxs as x } from "react/jsx-runtime";
2
- import { Button as qe, Paper as Je, Box as Oe, ScrollArea as vt, LoadingOverlay as wt, Group as se, useMantineColorScheme as Xe, Modal as ut, Flex as me, px as Bt, Text as Se, Grid as ye, Pagination as yt, Stack as Vt } from "@mantine/core";
3
- import { useForceUpdate as ht, useUncontrolled as Nt, useHotkeys as kt } from "@mantine/hooks";
4
- import { IconBug as _e, IconDeviceFloppy as Pt, IconX as Te, IconCheck as je, IconPlus as ft, IconEdit as mt, IconTrash as Ye, IconEye as gt } from "@tabler/icons-react";
5
- import { useArchbaseAppContext as Fe, useValidationErrors as Gt, ValidationErrorsProvider as Ft, getI18nextInstance as C, processErrorMessage as ge, useArchbaseTheme as Ze, emit as $t, useArchbaseTranslation as Lt } from "@archbase/core";
6
- import He, { useMemo as Ie, useState as W, useCallback as Q, forwardRef as At, useRef as fe, useImperativeHandle as Rt, useEffect as Qe, Fragment as zt, Profiler as Mt, createContext as Ut, useContext as Et } from "react";
7
- import { useArchbaseV1V2Compatibility as Ve, useArchbaseDataSourceListener as et, DataSourceEventNames as be, ArchbaseDataSource as jt } from "@archbase/data";
8
- import { ArchbaseAlert as We, ArchbaseDialog as pt, ArchbaseDataGrid as St, GridToolBarActions as Ht, ArchbaseDebugInspector as qt, ArchbaseMasonryProvider as Jt, ArchbaseMasonryResponsive as _t, ArchbaseMasonry as Wt, ArchbaseActionButtons as Ot } from "@archbase/components";
9
- import { ArchbaseSpaceFixed as tt, ArchbaseSpaceTop as bt, ArchbaseSpaceFill as nt, ArchbaseForm as It, ArchbaseSpaceBottom as rt } from "@archbase/layout";
10
- import { ArchbaseQueryBuilder as Ct, buildFrom as Kt, ArchbaseGlobalFilter as Qt } from "@archbase/advanced";
11
- import Ke from "@rehooks/component-size";
12
- import { uniqueId as Xt } from "lodash";
13
- const Yt = {
1
+ import { jsx as e, Fragment as ke, jsxs as x } from "react/jsx-runtime";
2
+ import { Button as We, Paper as Oe, Box as Xe, ScrollArea as Ft, LoadingOverlay as Rt, Group as se, useMantineColorScheme as Ze, Modal as ft, Flex as ge, px as Pt, Text as Te, Grid as Fe, Pagination as At, Stack as kt } from "@mantine/core";
3
+ import { useForceUpdate as mt, useUncontrolled as Gt, useHotkeys as $t } from "@mantine/hooks";
4
+ import { IconBug as Ke, IconDeviceFloppy as zt, IconX as Pe, IconCheck as qe, IconPlus as gt, IconEdit as pt, IconTrash as et, IconEye as bt } from "@tabler/icons-react";
5
+ import { useArchbaseAppContext as Re, useValidationErrors as Lt, ValidationErrorsProvider as Et, getI18nextInstance as C, processErrorMessage as pe, useArchbaseTheme as tt, emit as Mt, useArchbaseTranslation as Ut } from "@archbase/core";
6
+ import Je, { useMemo as Be, useState as O, useCallback as Q, forwardRef as St, useRef as ue, useImperativeHandle as It, useEffect as _e, Fragment as jt, Profiler as Ht, createContext as qt, useContext as Dt } from "react";
7
+ import { useArchbaseV1V2Compatibility as Ge, useArchbaseDataSourceListener as nt, DataSourceEventNames as Ce, ArchbaseDataSource as Jt } from "@archbase/data";
8
+ import { ArchbaseAlert as Qe, ArchbaseDialog as Ct, ArchbaseDataGrid as Tt, GridToolBarActions as _t, ArchbaseDebugInspector as Wt, ArchbaseMasonryProvider as Ot, ArchbaseMasonryResponsive as Kt, ArchbaseMasonry as Qt, ArchbaseActionButtons as Xt } from "@archbase/components";
9
+ import { ArchbaseSpaceFixed as rt, ArchbaseSpaceTop as xt, ArchbaseSpaceFill as it, ArchbaseForm as Bt, ArchbaseSpaceBottom as ot } from "@archbase/layout";
10
+ import { ArchbaseQueryBuilder as vt, buildFrom as Yt, ArchbaseGlobalFilter as Zt } from "@archbase/advanced";
11
+ import Ye from "@rehooks/component-size";
12
+ import { uniqueId as en } from "lodash";
13
+ const tn = {
14
14
  isAvailable: !1,
15
15
  hasPermission: () => !0,
16
16
  // Default: sempre permite
@@ -21,209 +21,209 @@ const Yt = {
21
21
  canEdit: !0,
22
22
  canDelete: !0,
23
23
  canView: !0
24
- }, Ae = (t) => Ie(() => Yt, []), xn = () => !1;
25
- function vn(t) {
24
+ }, Ae = (t) => Be(() => tn, []), yn = () => !1;
25
+ function Fn(t) {
26
26
  const {
27
27
  onSelect: n,
28
28
  onSelectMultiple: l,
29
- initialValue: h = null,
29
+ initialValue: f = null,
30
30
  initialValues: r = [],
31
31
  selectionMode: i = "single",
32
32
  autoClose: c = !0,
33
- onOpen: p,
34
- onClose: u
35
- } = t || {}, [v, G] = W(!1), [o, a] = W(h), [D, F] = W(r), S = Q(() => {
36
- G(!0), p?.();
37
- }, [p]), f = Q(() => {
38
- G(!1), u?.();
39
- }, [u]), d = Q(() => {
40
- a(null), F([]);
41
- }, []), I = Q(
42
- (m) => {
43
- a(m), F([m]), n?.(m), c && (G(!1), u?.());
33
+ onOpen: b,
34
+ onClose: h
35
+ } = t || {}, [v, G] = O(!1), [o, a] = O(f), [S, w] = O(r), E = Q(() => {
36
+ G(!0), b?.();
37
+ }, [b]), g = Q(() => {
38
+ G(!1), h?.();
39
+ }, [h]), d = Q(() => {
40
+ a(null), w([]);
41
+ }, []), R = Q(
42
+ (p) => {
43
+ a(p), w([p]), n?.(p), c && (G(!1), h?.());
44
44
  },
45
- [n, c, u]
46
- ), T = Q(
47
- (m) => {
48
- F(m), a(m.length > 0 ? m[0] : null), l?.(m), c && (G(!1), u?.());
45
+ [n, c, h]
46
+ ), I = Q(
47
+ (p) => {
48
+ w(p), a(p.length > 0 ? p[0] : null), l?.(p), c && (G(!1), h?.());
49
49
  },
50
- [l, c, u]
51
- ), z = Q(() => {
52
- G(!1), u?.();
53
- }, [u]), A = Ie(
50
+ [l, c, h]
51
+ ), L = Q(() => {
52
+ G(!1), h?.();
53
+ }, [h]), y = Be(
54
54
  () => ({
55
55
  opened: v,
56
- onClose: z,
57
- onSelect: I,
58
- onSelectMultiple: T,
56
+ onClose: L,
57
+ onSelect: R,
58
+ onSelectMultiple: I,
59
59
  selectionMode: i,
60
- initialSelectedItems: i === "multiple" ? D : o ? [o] : void 0
60
+ initialSelectedItems: i === "multiple" ? S : o ? [o] : void 0
61
61
  }),
62
- [v, z, I, T, i, o, D]
62
+ [v, L, R, I, i, o, S]
63
63
  );
64
64
  return {
65
65
  // Estado
66
66
  opened: v,
67
67
  selectedItem: o,
68
- selectedItems: D,
68
+ selectedItems: S,
69
69
  // Ações
70
- open: S,
71
- close: f,
70
+ open: E,
71
+ close: g,
72
72
  clear: d,
73
73
  setSelectedItem: a,
74
- setSelectedItems: F,
74
+ setSelectedItems: w,
75
75
  // Handlers
76
- handleSelect: I,
77
- handleSelectMultiple: T,
78
- handleClose: z,
76
+ handleSelect: R,
77
+ handleSelectMultiple: I,
78
+ handleClose: L,
79
79
  // Props para template
80
- lookupProps: A
80
+ lookupProps: y
81
81
  };
82
82
  }
83
83
  const ee = ({
84
84
  actionName: t,
85
85
  actionDescription: n,
86
86
  children: l,
87
- fallback: h = null,
87
+ fallback: f = null,
88
88
  autoRegister: r = !0,
89
89
  onClick: i,
90
90
  ...c
91
91
  }) => {
92
- const p = Ae();
93
- return He.useEffect(() => {
94
- r && t && n && p.isAvailable && p.registerAction();
95
- }, [t, n, r, p.isAvailable, p.registerAction]), !t || !p.isAvailable ? /* @__PURE__ */ e(qe, { onClick: i, ...c, children: l }) : p.hasPermission() ? /* @__PURE__ */ e(qe, { onClick: i, ...c, children: l }) : /* @__PURE__ */ e(Be, { children: h });
96
- }, wn = ({
92
+ const b = Ae();
93
+ return Je.useEffect(() => {
94
+ r && t && n && b.isAvailable && b.registerAction();
95
+ }, [t, n, r, b.isAvailable, b.registerAction]), !t || !b.isAvailable ? /* @__PURE__ */ e(We, { onClick: i, ...c, children: l }) : b.hasPermission() ? /* @__PURE__ */ e(We, { onClick: i, ...c, children: l }) : /* @__PURE__ */ e(ke, { children: f });
96
+ }, Rn = ({
97
97
  actionName: t,
98
98
  actionDescription: n,
99
99
  children: l,
100
- fallback: h = null,
100
+ fallback: f = null,
101
101
  onClick: r,
102
102
  ...i
103
103
  }) => {
104
- const [c, p] = He.useState(null), [u, v] = He.useState(!1);
105
- return He.useEffect(() => {
104
+ const [c, b] = Je.useState(null), [h, v] = Je.useState(!1);
105
+ return Je.useEffect(() => {
106
106
  if (!t) {
107
- p(/* @__PURE__ */ e(qe, { onClick: r, ...i, children: l }));
107
+ b(/* @__PURE__ */ e(We, { onClick: r, ...i, children: l }));
108
108
  return;
109
109
  }
110
- v(!1), p(/* @__PURE__ */ e(qe, { onClick: r, ...i, children: l }));
111
- }, [t, n, l, h, i]), /* @__PURE__ */ e(Be, { children: c });
112
- }, Re = ({
110
+ v(!1), b(/* @__PURE__ */ e(We, { onClick: r, ...i, children: l }));
111
+ }, [t, n, l, f, i]), /* @__PURE__ */ e(ke, { children: c });
112
+ }, Ee = ({
113
113
  children: t
114
- }) => /* @__PURE__ */ e(Be, { children: t }), yn = (t) => Ie(() => ({
114
+ }) => /* @__PURE__ */ e(ke, { children: t }), An = (t) => Be(() => ({
115
115
  shouldWrap: !1,
116
116
  isSecurityAvailable: !1,
117
117
  hasResourceName: !!t
118
118
  }), [t]);
119
- function Fn({
119
+ function En({
120
120
  innerRef: t,
121
121
  title: n,
122
122
  isError: l = !1,
123
- isCanceling: h = !1,
123
+ isCanceling: f = !1,
124
124
  isSaving: r = !1,
125
125
  error: i = "",
126
126
  clearError: c = () => {
127
127
  },
128
- autoCloseAlertError: p = 15e3,
129
- width: u = "100%",
128
+ autoCloseAlertError: b = 15e3,
129
+ width: h = "100%",
130
130
  height: v = "100%",
131
131
  withBorder: G = !0,
132
132
  children: o,
133
133
  radius: a,
134
- variant: D,
135
- footerAlign: F = "left",
136
- footerContent: S,
137
- dataSource: f,
134
+ variant: S,
135
+ footerAlign: w = "left",
136
+ footerContent: E,
137
+ dataSource: g,
138
138
  onSave: d,
139
- onCancel: I,
140
- onBeforeSave: T,
141
- onAfterSave: z,
142
- onBeforeCancel: A,
143
- onAfterCancel: m,
144
- onError: B,
139
+ onCancel: R,
140
+ onBeforeSave: I,
141
+ onAfterSave: L,
142
+ onBeforeCancel: y,
143
+ onAfterCancel: p,
144
+ onError: D,
145
145
  // Props de segurança (opcionais)
146
146
  resourceName: oe,
147
147
  resourceDescription: te,
148
- requiredPermissions: O,
148
+ requiredPermissions: K,
149
149
  fallbackComponent: M,
150
- securityOptions: N,
151
- ...E
150
+ securityOptions: B,
151
+ ...A
152
152
  }) {
153
- const V = Fe(), [X, k] = W(l), [Y, ne] = W(i), Z = ht();
153
+ const T = Re(), [X, V] = O(l), [Y, ne] = O(i), Z = mt();
154
154
  Ae({
155
- autoRegisterActions: N?.autoRegisterActions ?? !0
155
+ autoRegisterActions: B?.autoRegisterActions ?? !0
156
156
  });
157
- const U = Ve(
157
+ const U = Ge(
158
158
  "ArchbaseFormTemplate",
159
- f,
159
+ g,
160
160
  void 0,
161
161
  void 0
162
162
  );
163
- et({
164
- dataSource: f,
163
+ nt({
164
+ dataSource: g,
165
165
  listener: (j) => {
166
- j.type === be.onError && (k(!0), ne(j.error)), (j.type === be.afterEdit || j.type === be.afterInsert) && (U.isDataSourceV2 || Z());
166
+ j.type === Ce.onError && (V(!0), ne(j.error)), (j.type === Ce.afterEdit || j.type === Ce.afterInsert) && (U.isDataSourceV2 || Z());
167
167
  }
168
168
  });
169
- const $ = Gt(), J = async (j) => {
169
+ const $ = Lt(), _ = async (j) => {
170
170
  try {
171
- d ? d(j) : (T && await T(j), f.isBrowsing() || f.save().then(() => {
172
- $?.clearAll(), z && z(j);
171
+ d ? d(j) : (I && await I(j), g.isBrowsing() || g.save().then(() => {
172
+ $?.clearAll(), L && L(j);
173
173
  }).catch((le) => {
174
- B && B(ge(le)), k(!0), ne(ge(le));
174
+ D && D(pe(le)), V(!0), ne(pe(le));
175
175
  }));
176
176
  } catch (le) {
177
- B && B(ge(le)), k(!0), ne(ge(le));
177
+ D && D(pe(le)), V(!0), ne(pe(le));
178
178
  }
179
179
  }, re = () => {
180
180
  try {
181
- I ? I() : (A && A(), f.isBrowsing() || f.cancel(), $?.clearAll(), m && m());
181
+ R ? R() : (y && y(), g.isBrowsing() || g.cancel(), $?.clearAll(), p && p());
182
182
  } catch (j) {
183
- B && B(ge(j)), k(!0), ne(ge(j));
183
+ D && D(pe(j)), V(!0), ne(pe(j));
184
184
  }
185
185
  }, ie = () => {
186
- c && c(), k(!1), ne("");
186
+ c && c(), V(!1), ne("");
187
187
  };
188
188
  return /* @__PURE__ */ e(
189
- Re,
189
+ Ee,
190
190
  {
191
191
  resourceName: oe,
192
192
  resourceDescription: te,
193
- requiredPermissions: O,
193
+ requiredPermissions: K,
194
194
  fallbackComponent: M,
195
- onSecurityReady: N?.onSecurityReady,
196
- onAccessDenied: N?.onAccessDenied,
197
- children: /* @__PURE__ */ e(Ft, { children: /* @__PURE__ */ x(
198
- Je,
195
+ onSecurityReady: B?.onSecurityReady,
196
+ onAccessDenied: B?.onAccessDenied,
197
+ children: /* @__PURE__ */ e(Et, { children: /* @__PURE__ */ x(
198
+ Oe,
199
199
  {
200
200
  ref: t,
201
201
  withBorder: G,
202
202
  radius: a,
203
203
  style: {
204
- width: u,
204
+ width: h,
205
205
  height: v,
206
206
  display: "flex",
207
207
  flexDirection: "column",
208
208
  padding: 4
209
209
  },
210
210
  children: [
211
- X && /* @__PURE__ */ e(Oe, { style: { flexShrink: 0 }, children: /* @__PURE__ */ e(
212
- We,
211
+ X && /* @__PURE__ */ e(Xe, { style: { flexShrink: 0 }, children: /* @__PURE__ */ e(
212
+ Qe,
213
213
  {
214
- autoClose: p,
214
+ autoClose: b,
215
215
  withCloseButton: !0,
216
216
  withBorder: !0,
217
- icon: /* @__PURE__ */ e(_e, { size: "1.4rem" }),
217
+ icon: /* @__PURE__ */ e(Ke, { size: "1.4rem" }),
218
218
  title: C().t("WARNING"),
219
219
  titleColor: "rgb(250, 82, 82)",
220
- variant: D ?? V.variant,
220
+ variant: S ?? T.variant,
221
221
  onClose: ie,
222
222
  children: /* @__PURE__ */ e("span", { children: Y })
223
223
  }
224
224
  ) }),
225
225
  /* @__PURE__ */ x(
226
- vt,
226
+ Ft,
227
227
  {
228
228
  style: {
229
229
  flex: 1,
@@ -232,34 +232,34 @@ function Fn({
232
232
  padding: "calc(0.625rem / 2)"
233
233
  },
234
234
  children: [
235
- /* @__PURE__ */ e(wt, { visible: h || r, opacity: 0.3 }),
235
+ /* @__PURE__ */ e(Rt, { visible: f || r, opacity: 0.3 }),
236
236
  o
237
237
  ]
238
238
  }
239
239
  ),
240
240
  /* @__PURE__ */ x(
241
- Oe,
241
+ Xe,
242
242
  {
243
243
  style: {
244
244
  flexShrink: 0,
245
245
  padding: "calc(0.625rem / 2)",
246
246
  display: "flex",
247
- justifyContent: F === "center" ? "center" : "space-between",
247
+ justifyContent: w === "center" ? "center" : "space-between",
248
248
  alignItems: "center",
249
249
  gap: "1rem"
250
250
  },
251
251
  children: [
252
- F === "right" && S && /* @__PURE__ */ e(Oe, { style: { flex: 1 }, children: S }),
253
- f && !f.isBrowsing() ? /* @__PURE__ */ x(se, { gap: "md", children: [
252
+ w === "right" && E && /* @__PURE__ */ e(Xe, { style: { flex: 1 }, children: E }),
253
+ g && !g.isBrowsing() ? /* @__PURE__ */ x(se, { gap: "md", children: [
254
254
  /* @__PURE__ */ e(
255
255
  ee,
256
256
  {
257
257
  actionName: "save",
258
258
  actionDescription: `Salvar ${te || "registro"}`,
259
- leftSection: /* @__PURE__ */ e(Pt, {}),
260
- onClick: () => J(f.getCurrentRecord()),
261
- disabled: f && f.isBrowsing(),
262
- variant: D ?? V.variant,
259
+ leftSection: /* @__PURE__ */ e(zt, {}),
260
+ onClick: () => _(g.getCurrentRecord()),
261
+ disabled: g && g.isBrowsing(),
262
+ variant: S ?? T.variant,
263
263
  color: "green",
264
264
  children: `${C().t("Ok")}`
265
265
  }
@@ -269,10 +269,10 @@ function Fn({
269
269
  {
270
270
  actionName: "cancel",
271
271
  actionDescription: "Cancelar operação",
272
- leftSection: /* @__PURE__ */ e(Te, {}),
272
+ leftSection: /* @__PURE__ */ e(Pe, {}),
273
273
  onClick: re,
274
- disabled: f && f.isBrowsing(),
275
- variant: D ?? V.variant,
274
+ disabled: g && g.isBrowsing(),
275
+ variant: S ?? T.variant,
276
276
  color: "red",
277
277
  children: `${C().t("Cancel")}`
278
278
  }
@@ -282,13 +282,13 @@ function Fn({
282
282
  {
283
283
  actionName: "close",
284
284
  actionDescription: "Fechar formulário",
285
- leftSection: /* @__PURE__ */ e(Te, {}),
285
+ leftSection: /* @__PURE__ */ e(Pe, {}),
286
286
  onClick: re,
287
- variant: D ?? V.variant,
287
+ variant: S ?? T.variant,
288
288
  children: `${C().t("Close")}`
289
289
  }
290
290
  ) }),
291
- (F === "left" || F === "center") && S && /* @__PURE__ */ e(Oe, { style: { flex: F === "left" ? 1 : 0, textAlign: "right" }, children: S })
291
+ (w === "left" || w === "center") && E && /* @__PURE__ */ e(Xe, { style: { flex: w === "left" ? 1 : 0, textAlign: "right" }, children: E })
292
292
  ]
293
293
  }
294
294
  )
@@ -298,65 +298,65 @@ function Fn({
298
298
  }
299
299
  );
300
300
  }
301
- function An({
301
+ function Sn({
302
302
  title: t,
303
303
  withOverlay: n = !0,
304
304
  overlayProps: l,
305
- children: h,
305
+ children: f,
306
306
  withCloseButton: r = !0,
307
307
  closeButtonProps: i,
308
308
  opened: c,
309
- fullScreen: p,
310
- centered: u,
309
+ fullScreen: b,
310
+ centered: h,
311
311
  variant: v,
312
312
  closeOnEscape: G = !0,
313
313
  size: o,
314
314
  dataSource: a,
315
- height: D,
316
- userActions: F,
317
- onAfterSave: S,
318
- onClickOk: f,
315
+ height: S,
316
+ userActions: w,
317
+ onAfterSave: E,
318
+ onClickOk: g,
319
319
  onClickCancel: d,
320
- onBeforeOk: I,
321
- onCustomSave: T,
322
- isError: z,
323
- error: A = "",
324
- clearError: m = () => {
320
+ onBeforeOk: R,
321
+ onCustomSave: I,
322
+ isError: L,
323
+ error: y = "",
324
+ clearError: p = () => {
325
325
  },
326
- onError: B,
326
+ onError: D,
327
327
  autoCloseAlertError: oe = 15e3,
328
328
  loadingOverlayStyles: te,
329
329
  // Props de segurança (opcionais)
330
- resourceName: O,
330
+ resourceName: K,
331
331
  resourceDescription: M,
332
- requiredPermissions: N,
333
- fallbackComponent: E,
334
- securityOptions: V,
332
+ requiredPermissions: B,
333
+ fallbackComponent: A,
334
+ securityOptions: T,
335
335
  ...X
336
336
  }) {
337
- const k = Fe(), Y = Ze(), { colorScheme: ne } = Xe(), [Z, U] = W(z), [$, J] = W(A), [re, ie] = W(!1), j = ht();
337
+ const V = Re(), Y = tt(), { colorScheme: ne } = Ze(), [Z, U] = O(L), [$, _] = O(y), [re, ie] = O(!1), j = mt();
338
338
  Ae({
339
339
  resourceDescription: M || t?.toString(),
340
- autoRegisterActions: V?.autoRegisterActions ?? !0
340
+ autoRegisterActions: T?.autoRegisterActions ?? !0
341
341
  });
342
- const le = Ve(
342
+ const le = Ge(
343
343
  "ArchbaseFormModalTemplate",
344
344
  a,
345
345
  void 0,
346
346
  void 0
347
347
  );
348
- et({
348
+ nt({
349
349
  dataSource: a,
350
350
  listener: (H) => {
351
- H.type === be.onError && (U(!0), J(H.error)), (H.type === be.afterEdit || H.type === be.afterInsert) && (le.isDataSourceV2 || j());
351
+ H.type === Ce.onError && (U(!0), _(H.error)), (H.type === Ce.afterEdit || H.type === Ce.afterInsert) && (le.isDataSourceV2 || j());
352
352
  }
353
353
  });
354
- const de = async () => {
354
+ const he = async () => {
355
355
  if (a && !a.isBrowsing())
356
356
  try {
357
- ie(!0), await a.save(), S && S(a.getCurrentRecord());
357
+ ie(!0), await a.save(), E && E(a.getCurrentRecord());
358
358
  } catch (H) {
359
- return B && B(ge(H)), U(!0), J(ge(H)), ie(!1), !1;
359
+ return D && D(pe(H)), U(!0), _(pe(H)), ie(!1), !1;
360
360
  }
361
361
  return ie(!1), !0;
362
362
  }, s = () => {
@@ -365,38 +365,38 @@ function An({
365
365
  a.cancel();
366
366
  } catch {
367
367
  }
368
- }, P = async () => {
369
- if (T)
370
- a && T(a.getCurrentRecord(), () => {
371
- f && f();
368
+ }, N = async () => {
369
+ if (I)
370
+ a && I(a.getCurrentRecord(), () => {
371
+ g && g();
372
372
  });
373
- else if (I) {
374
- const H = I(a.getCurrentRecord());
373
+ else if (R) {
374
+ const H = R(a.getCurrentRecord());
375
375
  H instanceof Promise && H.then(async () => {
376
- await de() && f && f();
377
- }).catch((pe) => {
378
- B && B(ge(pe)), U(!0), J(ge(pe));
376
+ await he() && g && g();
377
+ }).catch((be) => {
378
+ D && D(pe(be)), U(!0), _(pe(be));
379
379
  });
380
380
  } else
381
- await de() && f && f();
382
- }, _ = () => {
381
+ await he() && g && g();
382
+ }, W = () => {
383
383
  s(), d && d();
384
- }, Ce = () => {
385
- pt.showWarning(C().t("archbase:Click on Ok or Cancel to close"));
386
- }, ue = () => {
387
- m && m(), U(!1), J("");
384
+ }, xe = () => {
385
+ Ct.showWarning(C().t("archbase:Click on Ok or Cancel to close"));
386
+ }, fe = () => {
387
+ p && p(), U(!1), _("");
388
388
  };
389
389
  return /* @__PURE__ */ e(
390
- Re,
390
+ Ee,
391
391
  {
392
- resourceName: O,
392
+ resourceName: K,
393
393
  resourceDescription: M,
394
- requiredPermissions: N,
395
- fallbackComponent: E,
396
- onSecurityReady: V?.onSecurityReady,
397
- onAccessDenied: V?.onAccessDenied,
394
+ requiredPermissions: B,
395
+ fallbackComponent: A,
396
+ onSecurityReady: T?.onSecurityReady,
397
+ onAccessDenied: T?.onAccessDenied,
398
398
  children: /* @__PURE__ */ e(
399
- ut,
399
+ ft,
400
400
  {
401
401
  title: t,
402
402
  withOverlay: n,
@@ -406,43 +406,43 @@ function An({
406
406
  },
407
407
  withCloseButton: r,
408
408
  closeButtonProps: i,
409
- onClose: Ce,
409
+ onClose: xe,
410
410
  opened: c,
411
- fullScreen: p,
412
- centered: u,
411
+ fullScreen: b,
412
+ centered: h,
413
413
  closeOnEscape: G,
414
414
  size: o,
415
415
  ...X,
416
- children: /* @__PURE__ */ x(Ft, { children: [
417
- /* @__PURE__ */ e(wt, { styles: te, visible: re, opacity: 0.8 }),
418
- /* @__PURE__ */ x(tt, { height: D, children: [
419
- Z ? /* @__PURE__ */ e(bt, { size: "100px", children: /* @__PURE__ */ e(
420
- We,
416
+ children: /* @__PURE__ */ x(Et, { children: [
417
+ /* @__PURE__ */ e(Rt, { styles: te, visible: re, opacity: 0.8 }),
418
+ /* @__PURE__ */ x(rt, { height: S, children: [
419
+ Z ? /* @__PURE__ */ e(xt, { size: "100px", children: /* @__PURE__ */ e(
420
+ Qe,
421
421
  {
422
422
  autoClose: oe,
423
423
  withCloseButton: !0,
424
424
  withBorder: !0,
425
- icon: /* @__PURE__ */ e(_e, { size: "1.4rem" }),
425
+ icon: /* @__PURE__ */ e(Ke, { size: "1.4rem" }),
426
426
  title: C().t("WARNING"),
427
427
  titleColor: "rgb(250, 82, 82)",
428
- variant: v ?? k.variant,
429
- onClose: ue,
428
+ variant: v ?? V.variant,
429
+ onClose: fe,
430
430
  children: /* @__PURE__ */ e("span", { children: $ })
431
431
  }
432
432
  ) }) : null,
433
- /* @__PURE__ */ e(nt, { children: /* @__PURE__ */ e(It, { children: h }) }),
434
- /* @__PURE__ */ e(rt, { size: "40px", children: /* @__PURE__ */ x(me, { justify: "space-between", align: "center", children: [
435
- /* @__PURE__ */ e(se, { children: F }),
433
+ /* @__PURE__ */ e(it, { children: /* @__PURE__ */ e(Bt, { children: f }) }),
434
+ /* @__PURE__ */ e(ot, { size: "40px", children: /* @__PURE__ */ x(ge, { justify: "space-between", align: "center", children: [
435
+ /* @__PURE__ */ e(se, { children: w }),
436
436
  a && !a.isBrowsing() ? /* @__PURE__ */ x(se, { gap: "md", children: [
437
437
  /* @__PURE__ */ e(
438
438
  ee,
439
439
  {
440
440
  actionName: "save",
441
441
  actionDescription: `Salvar ${M || t || "registro"}`,
442
- leftSection: /* @__PURE__ */ e(je, {}),
443
- onClick: P,
442
+ leftSection: /* @__PURE__ */ e(qe, {}),
443
+ onClick: N,
444
444
  disabled: a && a.isBrowsing(),
445
- variant: v ?? k.variant,
445
+ variant: v ?? V.variant,
446
446
  color: "green",
447
447
  children: `${C().t("Ok")}`
448
448
  }
@@ -452,10 +452,10 @@ function An({
452
452
  {
453
453
  actionName: "cancel",
454
454
  actionDescription: "Cancelar operação",
455
- leftSection: /* @__PURE__ */ e(Te, {}),
456
- onClick: _,
455
+ leftSection: /* @__PURE__ */ e(Pe, {}),
456
+ onClick: W,
457
457
  disabled: a && a.isBrowsing(),
458
- variant: v ?? k.variant,
458
+ variant: v ?? V.variant,
459
459
  color: "red",
460
460
  children: `${C().t("Cancel")}`
461
461
  }
@@ -465,9 +465,9 @@ function An({
465
465
  {
466
466
  actionName: "close",
467
467
  actionDescription: "Fechar janela",
468
- leftSection: /* @__PURE__ */ e(Te, {}),
469
- onClick: _,
470
- variant: v ?? k.variant,
468
+ leftSection: /* @__PURE__ */ e(Pe, {}),
469
+ onClick: W,
470
+ variant: v ?? V.variant,
471
471
  children: `${C().t("Close")}`
472
472
  }
473
473
  ) })
@@ -479,54 +479,54 @@ function An({
479
479
  }
480
480
  );
481
481
  }
482
- function Rn({
482
+ function In({
483
483
  title: t,
484
484
  withOverlay: n = !0,
485
485
  overlayProps: l,
486
- children: h,
486
+ children: f,
487
487
  withCloseButton: r = !0,
488
488
  closeButtonProps: i,
489
489
  opened: c,
490
- fullScreen: p,
491
- centered: u,
490
+ fullScreen: b,
491
+ centered: h,
492
492
  variant: v,
493
493
  closeOnEscape: G = !0,
494
494
  size: o,
495
495
  height: a,
496
- onlyOkButton: D = !1,
497
- onClose: F,
498
- onClickOk: S,
499
- onClickCancel: f,
496
+ onlyOkButton: S = !1,
497
+ onClose: w,
498
+ onClickOk: E,
499
+ onClickCancel: g,
500
500
  userActions: d,
501
501
  // Props de segurança (opcionais)
502
- resourceName: I,
503
- resourceDescription: T,
504
- requiredPermissions: z,
505
- fallbackComponent: A,
506
- securityOptions: m
502
+ resourceName: R,
503
+ resourceDescription: I,
504
+ requiredPermissions: L,
505
+ fallbackComponent: y,
506
+ securityOptions: p
507
507
  }) {
508
- const B = Fe(), oe = Ze(), { colorScheme: te } = Xe();
508
+ const D = Re(), oe = tt(), { colorScheme: te } = Ze();
509
509
  Ae({
510
- autoRegisterActions: m?.autoRegisterActions ?? !0
510
+ autoRegisterActions: p?.autoRegisterActions ?? !0
511
511
  });
512
- const O = () => {
513
- S && S(), F();
512
+ const K = () => {
513
+ E && E(), w();
514
514
  }, M = () => {
515
- f && f(), F();
516
- }, N = () => {
517
- pt.showWarning(C().t("Click on Ok or Cancel to close"));
515
+ g && g(), w();
516
+ }, B = () => {
517
+ Ct.showWarning(C().t("Click on Ok or Cancel to close"));
518
518
  };
519
519
  return /* @__PURE__ */ e(
520
- Re,
520
+ Ee,
521
521
  {
522
- resourceName: I,
523
- resourceDescription: T,
524
- requiredPermissions: z,
525
- fallbackComponent: A,
526
- onSecurityReady: m?.onSecurityReady,
527
- onAccessDenied: m?.onAccessDenied,
522
+ resourceName: R,
523
+ resourceDescription: I,
524
+ requiredPermissions: L,
525
+ fallbackComponent: y,
526
+ onSecurityReady: p?.onSecurityReady,
527
+ onAccessDenied: p?.onAccessDenied,
528
528
  children: /* @__PURE__ */ e(
529
- ut,
529
+ ft,
530
530
  {
531
531
  title: t,
532
532
  withOverlay: n,
@@ -536,39 +536,39 @@ function Rn({
536
536
  },
537
537
  withCloseButton: r,
538
538
  closeButtonProps: i,
539
- onClose: N,
539
+ onClose: B,
540
540
  opened: c,
541
- fullScreen: p,
542
- centered: u,
541
+ fullScreen: b,
542
+ centered: h,
543
543
  closeOnEscape: G,
544
544
  size: o,
545
- children: /* @__PURE__ */ x(tt, { height: a, children: [
546
- /* @__PURE__ */ e(nt, { children: /* @__PURE__ */ e(It, { children: h }) }),
547
- /* @__PURE__ */ e(rt, { size: "40px", children: /* @__PURE__ */ x(me, { justify: "space-between", align: "center", children: [
545
+ children: /* @__PURE__ */ x(rt, { height: a, children: [
546
+ /* @__PURE__ */ e(it, { children: /* @__PURE__ */ e(Bt, { children: f }) }),
547
+ /* @__PURE__ */ e(ot, { size: "40px", children: /* @__PURE__ */ x(ge, { justify: "space-between", align: "center", children: [
548
548
  /* @__PURE__ */ e(se, { children: d }),
549
549
  /* @__PURE__ */ x(se, { gap: "md", children: [
550
550
  /* @__PURE__ */ e(
551
551
  ee,
552
552
  {
553
553
  actionName: "save",
554
- actionDescription: `Salvar ${T || "registro"}`,
555
- leftSection: /* @__PURE__ */ e(je, {}),
556
- onClick: O,
557
- variant: v ?? B.variant,
554
+ actionDescription: `Salvar ${I || "registro"}`,
555
+ leftSection: /* @__PURE__ */ e(qe, {}),
556
+ onClick: K,
557
+ variant: v ?? D.variant,
558
558
  color: "green",
559
559
  children: `${C().t("Ok")}`
560
560
  }
561
561
  ),
562
- D ? null : /* @__PURE__ */ e(
562
+ S ? null : /* @__PURE__ */ e(
563
563
  ee,
564
564
  {
565
565
  actionName: "cancel",
566
566
  actionDescription: "Cancelar operação",
567
- leftSection: /* @__PURE__ */ e(Te, {}),
567
+ leftSection: /* @__PURE__ */ e(Pe, {}),
568
568
  onClick: M,
569
- variant: v ?? B.variant,
569
+ variant: v ?? D.variant,
570
570
  color: "red",
571
- children: f ? `${C().t("Cancel")}` : `${C().t("Close")}`
571
+ children: g ? `${C().t("Cancel")}` : `${C().t("Close")}`
572
572
  }
573
573
  )
574
574
  ] })
@@ -579,91 +579,91 @@ function Rn({
579
579
  }
580
580
  );
581
581
  }
582
- const Zt = (t, n, l) => {
582
+ const nn = (t, n, l) => {
583
583
  if (!t || !n || !n.existsValue(`${t.viewName}_${t.componentName}`)) {
584
- let h = -1, r;
585
- return l && l.getFilters().length > 0 && (h = 0, r = JSON.parse(l.getFirstFilter()?.filter)), {
586
- activeFilterIndex: h,
584
+ let f = -1, r;
585
+ return l && l.getFilters().length > 0 && (f = 0, r = JSON.parse(l.getFirstFilter()?.filter)), {
586
+ activeFilterIndex: f,
587
587
  expandedFilter: !1,
588
588
  currentFilter: r
589
589
  };
590
590
  }
591
591
  return n.getValue(`${t.viewName}_${t.componentName}`);
592
592
  };
593
- function en(t, n) {
593
+ function rn(t, n) {
594
594
  const {
595
595
  title: l,
596
- printTitle: h,
596
+ printTitle: f,
597
597
  dataSource: r,
598
598
  filterOptions: i,
599
599
  pageSize: c = 15,
600
- pageIndex: p = 0,
601
- columns: u,
600
+ pageIndex: b = 0,
601
+ columns: h,
602
602
  filterFields: v,
603
603
  logoPrint: G,
604
604
  userActions: o,
605
605
  userRowActions: a,
606
- customRenderRowActions: D,
607
- innerRef: F,
608
- isLoading: S = !1,
609
- isLoadingFilter: f = !1,
606
+ customRenderRowActions: S,
607
+ innerRef: w,
608
+ isLoading: E = !1,
609
+ isLoadingFilter: g = !1,
610
610
  isError: d = !1,
611
- enableTopToolbar: I = !0,
612
- enableTopToolbarActions: T = !0,
613
- error: z = "",
614
- clearError: A = () => {
611
+ enableTopToolbar: R = !0,
612
+ enableTopToolbarActions: I = !0,
613
+ error: L = "",
614
+ clearError: y = () => {
615
615
  },
616
- filterType: m,
617
- width: B = "100%",
616
+ filterType: p,
617
+ width: D = "100%",
618
618
  height: oe = "100%",
619
619
  onSearchByFilter: te,
620
- getRowId: O,
620
+ getRowId: K,
621
621
  withBorder: M = !0,
622
- filterPersistenceDelegator: N,
623
- variant: E,
624
- store: V,
622
+ filterPersistenceDelegator: B,
623
+ variant: A,
624
+ store: T,
625
625
  cellPadding: X,
626
- bottomToolbarMinHeight: k,
626
+ bottomToolbarMinHeight: V,
627
627
  enableRowSelection: Y = !0,
628
628
  enableRowNumbers: ne = !0,
629
629
  enableRowActions: Z = !0,
630
630
  positionActionsColumn: U = "first",
631
631
  actionsColumnWidth: $,
632
- tableHeadCellPadding: J,
632
+ tableHeadCellPadding: _,
633
633
  renderDetailPanel: re,
634
634
  renderTopToolbar: ie,
635
635
  toolbarAlignment: j = "right",
636
636
  toolbarLeftContent: le,
637
- onSelectedRowsChanged: de,
637
+ onSelectedRowsChanged: he,
638
638
  onCellDoubleClick: s,
639
- onFilterModelChange: P,
640
- paginationLabels: _,
639
+ onFilterModelChange: N,
640
+ paginationLabels: W,
641
641
  // Props de segurança (opcionais)
642
- resourceName: Ce,
643
- resourceDescription: ue,
642
+ resourceName: xe,
643
+ resourceDescription: fe,
644
644
  requiredPermissions: H,
645
- fallbackComponent: pe,
646
- securityOptions: ve,
645
+ fallbackComponent: be,
646
+ securityOptions: ye,
647
647
  // Props para controle de bordas internas
648
- withToolbarBorder: Ne,
649
- withPaginationBorder: De,
650
- toolbarPadding: L,
648
+ withToolbarBorder: $e,
649
+ withPaginationBorder: Ve,
650
+ toolbarPadding: z,
651
651
  paginationPadding: ae,
652
- rowHeight: ke,
653
- hideFooter: Ee = !0
654
- } = t, Pe = fe(null), q = fe(null);
655
- Ze();
656
- const { colorScheme: Ge } = Xe();
652
+ rowHeight: ze,
653
+ hideFooter: Se = !0
654
+ } = t, Le = ue(null), q = ue(null);
655
+ tt();
656
+ const { colorScheme: Me } = Ze();
657
657
  Ae({
658
- autoRegisterActions: ve?.autoRegisterActions ?? !0
658
+ autoRegisterActions: ye?.autoRegisterActions ?? !0
659
659
  });
660
- const ce = Ve(
660
+ const ve = Ge(
661
661
  "ArchbaseGridTemplate",
662
662
  r,
663
663
  void 0,
664
664
  void 0
665
665
  );
666
- Rt(n, () => ({
666
+ It(n, () => ({
667
667
  refreshData: () => {
668
668
  q.current && q.current.refreshData();
669
669
  },
@@ -680,127 +680,127 @@ function en(t, n) {
680
680
  getDataGridRef: () => q,
681
681
  getFilterModel: () => q.current ? q.current.getFilterModel() : { items: [], quickFilterValues: [] }
682
682
  }), [q]);
683
- const [w, y] = W({
683
+ const [m, P] = O({
684
684
  activeFilterIndex: -1,
685
685
  currentFilter: void 0,
686
686
  expandedFilter: !1
687
687
  });
688
- Qe(() => {
689
- const R = Zt(i, V, N);
690
- y(R);
691
- }, [f]);
692
- const we = (R) => {
693
- if (D)
694
- return D(R);
688
+ _e(() => {
689
+ const F = nn(i, T, B);
690
+ P(F);
691
+ }, [g]);
692
+ const J = (F) => {
693
+ if (S)
694
+ return S(F);
695
695
  if (!a || !a.actions)
696
696
  return;
697
- const g = a.actions;
697
+ const me = a.actions;
698
698
  return /* @__PURE__ */ e(
699
- g,
699
+ me,
700
700
  {
701
- onEditRow: a.onEditRow ? (b) => a.onEditRow && a.onEditRow(b) : void 0,
702
- onRemoveRow: a.onRemoveRow ? (b) => a.onRemoveRow && a.onRemoveRow(b) : void 0,
703
- onViewRow: a.onViewRow ? (b) => a.onViewRow && a.onViewRow(b) : void 0,
704
- row: R,
705
- variant: E ?? K.variant
701
+ onEditRow: a.onEditRow ? (u) => a.onEditRow && a.onEditRow(u) : void 0,
702
+ onRemoveRow: a.onRemoveRow ? (u) => a.onRemoveRow && a.onRemoveRow(u) : void 0,
703
+ onViewRow: a.onViewRow ? (u) => a.onViewRow && a.onViewRow(u) : void 0,
704
+ row: F,
705
+ variant: A ?? ce.variant
706
706
  }
707
707
  );
708
- }, K = Fe(), he = fe(null), $e = d ? !1 : S, xe = Ie(() => le, [le]);
709
- He.useEffect(() => {
710
- F && F.current !== he.current && F.current && he.current && (F.current = he.current);
711
- }, [F]);
712
- const it = (R, g) => {
713
- const b = { ...w, currentFilter: R, activeFilterIndex: g };
714
- y(b), V && i && V?.setValue(`${i.viewName}_${i.componentName}`, b);
715
- }, ot = (R) => {
716
- const g = { ...w, expandedFilter: R };
717
- y(g), V && i && V?.setValue(`${i.viewName}_${i.componentName}`, g);
718
- }, Le = (R, g) => {
719
- const b = { ...w, currentFilter: R, activeFilterIndex: g };
720
- y(b), V && i && V?.setValue(`${i.viewName}_${i.componentName}`, b);
721
- }, ze = () => {
722
- if (w.currentFilter)
708
+ }, ce = Re(), de = ue(null), we = d ? !1 : E, Ie = Be(() => le, [le]);
709
+ Je.useEffect(() => {
710
+ w && w.current !== de.current && w.current && de.current && (w.current = de.current);
711
+ }, [w]);
712
+ const Ue = (F, me) => {
713
+ const u = { ...m, currentFilter: F, activeFilterIndex: me };
714
+ P(u), T && i && T?.setValue(`${i.viewName}_${i.componentName}`, u);
715
+ }, lt = (F) => {
716
+ const me = { ...m, expandedFilter: F };
717
+ P(me), T && i && T?.setValue(`${i.viewName}_${i.componentName}`, me);
718
+ }, at = (F, me) => {
719
+ const u = { ...m, currentFilter: F, activeFilterIndex: me };
720
+ P(u), T && i && T?.setValue(`${i.viewName}_${i.componentName}`, u);
721
+ }, je = () => {
722
+ if (m.currentFilter)
723
723
  if (te)
724
724
  te();
725
- else if (w.currentFilter.filter.filterType === "quick") {
726
- const R = r.getOptions();
727
- w.currentFilter.filter.quickFilterText && w.currentFilter.filter.quickFilterText !== "" ? (R.filter = JSON.stringify({
728
- search: w.currentFilter.filter.quickFilterText,
729
- fields: w.currentFilter.filter.quickFilterFieldsText
730
- }), R.sort = w.currentFilter.sort.quickFilterSort ? w.currentFilter.sort.quickFilterSort.split(",") : []) : (R.filter = void 0, R.sort = void 0), r.refreshData(R), ce.isDataSourceV2 || ce.v1State.forceUpdate();
725
+ else if (m.currentFilter.filter.filterType === "quick") {
726
+ const F = r.getOptions();
727
+ m.currentFilter.filter.quickFilterText && m.currentFilter.filter.quickFilterText !== "" ? (F.filter = JSON.stringify({
728
+ search: m.currentFilter.filter.quickFilterText,
729
+ fields: m.currentFilter.filter.quickFilterFieldsText
730
+ }), F.sort = m.currentFilter.sort.quickFilterSort ? m.currentFilter.sort.quickFilterSort.split(",") : []) : (F.filter = void 0, F.sort = void 0), r.refreshData(F), ve.isDataSourceV2 || ve.v1State.forceUpdate();
731
731
  } else {
732
- const R = Kt(w.currentFilter);
733
- if (R && R.expressionNode) {
734
- const g = $t(R.expressionNode), b = r.getOptions();
735
- b.filter = g, b.sort = R?.sortStrings, r.refreshData(b), ce.isDataSourceV2 || ce.v1State.forceUpdate();
732
+ const F = Yt(m.currentFilter);
733
+ if (F && F.expressionNode) {
734
+ const me = Mt(F.expressionNode), u = r.getOptions();
735
+ u.filter = me, u.sort = F?.sortStrings, r.refreshData(u), ve.isDataSourceV2 || ve.v1State.forceUpdate();
736
736
  }
737
737
  }
738
738
  };
739
- let Me, Ue;
740
- const lt = (R) => {
741
- Me = R;
742
- }, at = (R) => {
743
- Ue = R;
744
- }, st = () => {
745
- Ue && Ue();
746
- }, ct = () => {
747
- Me && Me();
748
- }, dt = () => m === "none" ? /* @__PURE__ */ e("div", {}) : m === "advanced" ? /* @__PURE__ */ e(
749
- Ct,
739
+ let De, He;
740
+ const st = (F) => {
741
+ De = F;
742
+ }, ct = (F) => {
743
+ He = F;
744
+ }, dt = () => {
745
+ He && He();
746
+ }, ut = () => {
747
+ De && De();
748
+ }, ht = () => p === "none" ? /* @__PURE__ */ e("div", {}) : p === "advanced" ? /* @__PURE__ */ e(
749
+ vt,
750
750
  {
751
751
  id: i?.componentName,
752
752
  viewName: i?.viewName,
753
753
  apiVersion: i?.apiVersion,
754
- ref: Pe,
755
- variant: E ?? K.variant,
756
- expandedFilter: w.expandedFilter,
757
- persistenceDelegator: N,
758
- currentFilter: w.currentFilter,
759
- activeFilterIndex: w.activeFilterIndex,
760
- onSelectedFilter: Le,
761
- onFilterChanged: it,
762
- onSearchByFilter: ze,
763
- onToggleExpandedFilter: ot,
764
- onExport: st,
765
- onPrint: ct,
754
+ ref: Le,
755
+ variant: A ?? ce.variant,
756
+ expandedFilter: m.expandedFilter,
757
+ persistenceDelegator: B,
758
+ currentFilter: m.currentFilter,
759
+ activeFilterIndex: m.activeFilterIndex,
760
+ onSelectedFilter: at,
761
+ onFilterChanged: Ue,
762
+ onSearchByFilter: je,
763
+ onToggleExpandedFilter: lt,
764
+ onExport: dt,
765
+ onPrint: ut,
766
766
  showExportButton: !0,
767
767
  showPrintButton: !0,
768
768
  width: "560px",
769
769
  height: "170px",
770
770
  children: v
771
771
  }
772
- ) : m === "normal" ? /* @__PURE__ */ e("div", {}) : /* @__PURE__ */ e("div", {});
772
+ ) : p === "normal" ? /* @__PURE__ */ e("div", {}) : /* @__PURE__ */ e("div", {});
773
773
  return /* @__PURE__ */ e(
774
- Re,
774
+ Ee,
775
775
  {
776
- resourceName: Ce,
777
- resourceDescription: ue,
776
+ resourceName: xe,
777
+ resourceDescription: fe,
778
778
  requiredPermissions: H,
779
- fallbackComponent: pe,
780
- onSecurityReady: ve?.onSecurityReady,
781
- onAccessDenied: ve?.onAccessDenied,
782
- children: /* @__PURE__ */ x(Je, { withBorder: M, ref: he, style: { height: "100%" }, children: [
779
+ fallbackComponent: be,
780
+ onSecurityReady: ye?.onSecurityReady,
781
+ onAccessDenied: ye?.onAccessDenied,
782
+ children: /* @__PURE__ */ x(Oe, { withBorder: M, ref: de, style: { height: "100%" }, children: [
783
783
  d ? /* @__PURE__ */ e(
784
- We,
784
+ Qe,
785
785
  {
786
786
  autoClose: 2e4,
787
787
  withCloseButton: !0,
788
788
  withBorder: !0,
789
- icon: /* @__PURE__ */ e(_e, { size: "1.4rem" }),
789
+ icon: /* @__PURE__ */ e(Ke, { size: "1.4rem" }),
790
790
  title: C().t("archbase:WARNING"),
791
791
  titleColor: "rgb(250, 82, 82)",
792
- variant: E ?? K.variant,
793
- onClose: () => A && A(),
794
- children: /* @__PURE__ */ e("span", { children: z })
792
+ variant: A ?? ce.variant,
793
+ onClose: () => y && y(),
794
+ children: /* @__PURE__ */ e("span", { children: L })
795
795
  }
796
796
  ) : null,
797
797
  /* @__PURE__ */ x(
798
- St,
798
+ Tt,
799
799
  {
800
800
  gridRef: q,
801
- printTitle: h || l,
801
+ printTitle: f || l,
802
802
  logoPrint: G,
803
- width: B,
803
+ width: D,
804
804
  height: oe,
805
805
  withBorder: !1,
806
806
  dataSource: r,
@@ -808,57 +808,57 @@ function en(t, n) {
808
808
  enableRowNumbers: ne,
809
809
  enableRowSelection: Y,
810
810
  enableRowActions: Z,
811
- enableTopToolbar: I,
812
- enableTopToolbarActions: T,
811
+ enableTopToolbar: R,
812
+ enableTopToolbarActions: I,
813
813
  manualPagination: !0,
814
814
  manualSorting: !0,
815
- isLoading: $e,
815
+ isLoading: we,
816
816
  pageSize: c,
817
- pageIndex: p,
818
- allowColumnFilters: m !== "none",
819
- enableGlobalFilter: m !== "none",
820
- renderToolbarInternalActions: m == "none" ? () => /* @__PURE__ */ e("div", {}) : void 0,
817
+ pageIndex: b,
818
+ allowColumnFilters: p !== "none",
819
+ enableGlobalFilter: p !== "none",
820
+ renderToolbarInternalActions: p == "none" ? () => /* @__PURE__ */ e("div", {}) : void 0,
821
821
  allowExportData: !0,
822
822
  allowPrintData: !0,
823
- onSelectedRowsChanged: de,
823
+ onSelectedRowsChanged: he,
824
824
  onCellDoubleClick: s,
825
- onFilterModelChange: P,
826
- renderRowActions: Z ? we : void 0,
825
+ onFilterModelChange: N,
826
+ renderRowActions: Z ? J : void 0,
827
827
  positionActionsColumn: U,
828
828
  actionsColumnWidth: $,
829
829
  toolbarAlignment: j,
830
- toolbarLeftContent: xe,
831
- renderToolbarActions: m === "advanced" || m === "none" ? dt : void 0,
832
- paginationLabels: _,
830
+ toolbarLeftContent: Ie,
831
+ renderToolbarActions: p === "advanced" || p === "none" ? ht : void 0,
832
+ paginationLabels: W,
833
833
  cellPadding: X,
834
- bottomToolbarMinHeight: k,
835
- tableHeadCellPadding: J,
836
- getRowId: O,
837
- renderDetailPanel: re ? ({ row: R }) => re({ row: R }) : void 0,
834
+ bottomToolbarMinHeight: V,
835
+ tableHeadCellPadding: _,
836
+ getRowId: K,
837
+ renderDetailPanel: re ? ({ row: F }) => re({ row: F }) : void 0,
838
838
  renderTopToolbar: ie,
839
- onExport: at,
840
- onPrint: lt,
841
- variant: E,
842
- withToolbarBorder: Ne,
843
- withPaginationBorder: De,
844
- toolbarPadding: L,
839
+ onExport: ct,
840
+ onPrint: st,
841
+ variant: A,
842
+ withToolbarBorder: $e,
843
+ withPaginationBorder: Ve,
844
+ toolbarPadding: z,
845
845
  paginationPadding: ae,
846
- rowHeight: ke,
847
- hideFooter: Ee,
846
+ rowHeight: ze,
847
+ hideFooter: Se,
848
848
  children: [
849
- u,
850
- o?.visible ? /* @__PURE__ */ e(Ht, { children: /* @__PURE__ */ x(Be, { children: [
851
- /* @__PURE__ */ e("h3", { className: "only-print", children: h || l }),
852
- /* @__PURE__ */ e("div", { className: "no-print", children: /* @__PURE__ */ x(me, { gap: "8px", rowGap: "8px", children: [
849
+ h,
850
+ o?.visible ? /* @__PURE__ */ e(_t, { children: /* @__PURE__ */ x(ke, { children: [
851
+ /* @__PURE__ */ e("h3", { className: "only-print", children: f || l }),
852
+ /* @__PURE__ */ e("div", { className: "no-print", children: /* @__PURE__ */ x(ge, { gap: "8px", rowGap: "8px", children: [
853
853
  o.customUserActions && o.customUserActionsPosition === "left" ? o.customUserActions : null,
854
854
  o.onAddExecute ? /* @__PURE__ */ e(
855
855
  ee,
856
856
  {
857
857
  actionName: "add",
858
- actionDescription: `Adicionar novo ${ue || "registro"}`,
858
+ actionDescription: `Adicionar novo ${fe || "registro"}`,
859
859
  color: "green",
860
- variant: E ?? K.variant,
861
- leftSection: /* @__PURE__ */ e(ft, {}),
860
+ variant: A ?? ce.variant,
861
+ leftSection: /* @__PURE__ */ e(gt, {}),
862
862
  onClick: () => o && o.onAddExecute && o.onAddExecute(),
863
863
  children: o.labelAdd || C().t("archbase:New")
864
864
  }
@@ -867,11 +867,11 @@ function en(t, n) {
867
867
  ee,
868
868
  {
869
869
  actionName: "edit",
870
- actionDescription: `Editar ${ue || "registro"}`,
870
+ actionDescription: `Editar ${fe || "registro"}`,
871
871
  color: "blue",
872
- leftSection: /* @__PURE__ */ e(mt, {}),
872
+ leftSection: /* @__PURE__ */ e(pt, {}),
873
873
  disabled: !r.isBrowsing() || r.isEmpty(),
874
- variant: E ?? K.variant,
874
+ variant: A ?? ce.variant,
875
875
  onClick: () => o && o.onEditExecute && o.onEditExecute(),
876
876
  children: o.labelEdit || C().t("archbase:Edit")
877
877
  }
@@ -880,11 +880,11 @@ function en(t, n) {
880
880
  ee,
881
881
  {
882
882
  actionName: "delete",
883
- actionDescription: `Remover ${ue || "registro"}`,
883
+ actionDescription: `Remover ${fe || "registro"}`,
884
884
  color: "red",
885
- leftSection: /* @__PURE__ */ e(Ye, {}),
885
+ leftSection: /* @__PURE__ */ e(et, {}),
886
886
  disabled: !o?.allowRemove || !r.isBrowsing() || r.isEmpty(),
887
- variant: E ?? K.variant,
887
+ variant: A ?? ce.variant,
888
888
  onClick: () => o && o.onRemoveExecute && o.onRemoveExecute(),
889
889
  children: o.labelRemove || C().t("archbase:Remove")
890
890
  }
@@ -893,11 +893,11 @@ function en(t, n) {
893
893
  ee,
894
894
  {
895
895
  actionName: "view",
896
- actionDescription: `Visualizar ${ue || "registro"}`,
896
+ actionDescription: `Visualizar ${fe || "registro"}`,
897
897
  color: "gray.7",
898
- leftSection: /* @__PURE__ */ e(gt, {}),
898
+ leftSection: /* @__PURE__ */ e(bt, {}),
899
899
  disabled: !r.isBrowsing() || r.isEmpty(),
900
- variant: E ?? K.variant,
900
+ variant: A ?? ce.variant,
901
901
  onClick: () => o && o.onViewExecute && o.onViewExecute(),
902
902
  children: o.labelView || C().t("archbase:View")
903
903
  }
@@ -912,13 +912,13 @@ function en(t, n) {
912
912
  }
913
913
  );
914
914
  }
915
- const En = At(en);
916
- function tn(t, n, l, h) {
915
+ const Dn = St(rn);
916
+ function on(t, n, l, f) {
917
917
  if (t && t.headerGridColumns) {
918
918
  const r = t.headerGridColumns.left ? t.headerGridColumns.left : { xs: "auto", sm: "auto", md: "auto", lg: "auto" }, i = t.headerGridColumns.middle ? t.headerGridColumns.middle : { xs: "auto", sm: "auto", md: "auto", lg: "auto" }, c = t.headerGridColumns.right ? t.headerGridColumns.right : { xs: "auto", sm: "auto", md: "auto", lg: "auto" };
919
- return /* @__PURE__ */ x(ye, { m: 0, gutter: "xs", justify: "center", align: "center", grow: !0, children: [
919
+ return /* @__PURE__ */ x(Fe, { m: 0, gutter: "xs", justify: "center", align: "center", grow: !0, children: [
920
920
  /* @__PURE__ */ e(
921
- ye.Col,
921
+ Fe.Col,
922
922
  {
923
923
  span: {
924
924
  xs: r.xs,
@@ -927,7 +927,7 @@ function tn(t, n, l, h) {
927
927
  lg: r.lg
928
928
  },
929
929
  style: {
930
- border: h ? "1px dashed" : "",
930
+ border: f ? "1px dashed" : "",
931
931
  display: "flex",
932
932
  justifyContent: "flex-start",
933
933
  alignItems: "center"
@@ -936,7 +936,7 @@ function tn(t, n, l, h) {
936
936
  }
937
937
  ),
938
938
  /* @__PURE__ */ e(
939
- ye.Col,
939
+ Fe.Col,
940
940
  {
941
941
  span: {
942
942
  xs: i.xs,
@@ -945,7 +945,7 @@ function tn(t, n, l, h) {
945
945
  lg: i.lg
946
946
  },
947
947
  style: {
948
- border: h ? "1px dashed" : "",
948
+ border: f ? "1px dashed" : "",
949
949
  display: "flex",
950
950
  justifyContent: "center",
951
951
  alignItems: "center"
@@ -953,7 +953,7 @@ function tn(t, n, l, h) {
953
953
  }
954
954
  ),
955
955
  /* @__PURE__ */ e(
956
- ye.Col,
956
+ Fe.Col,
957
957
  {
958
958
  span: {
959
959
  xs: c.xs,
@@ -962,7 +962,7 @@ function tn(t, n, l, h) {
962
962
  lg: c.lg
963
963
  },
964
964
  style: {
965
- border: h ? "1px dashed" : "",
965
+ border: f ? "1px dashed" : "",
966
966
  display: "flex",
967
967
  justifyContent: "flex-end",
968
968
  alignItems: "center"
@@ -973,29 +973,29 @@ function tn(t, n, l, h) {
973
973
  ] });
974
974
  } else {
975
975
  const r = t && t.headerFlexGrow ? t.headerFlexGrow : "even", i = t && t.headerFlexRightJustifyContent ? t.headerFlexRightJustifyContent : "flex-end", c = t && t.headerFlexLeftJustifyContent ? t.headerFlexLeftJustifyContent : "flex-start";
976
- return /* @__PURE__ */ x(me, { justify: "space-between", children: [
976
+ return /* @__PURE__ */ x(ge, { justify: "space-between", children: [
977
977
  /* @__PURE__ */ e(
978
- me,
978
+ ge,
979
979
  {
980
980
  w: r === "left" || r === "even" ? "100%" : void 0,
981
981
  maw: r === "left" || r === "even" ? void 0 : "100%",
982
982
  align: "center",
983
983
  justify: c,
984
984
  style: {
985
- border: h ? "1px dashed" : ""
985
+ border: f ? "1px dashed" : ""
986
986
  },
987
987
  children: n
988
988
  }
989
989
  ),
990
990
  /* @__PURE__ */ e(
991
- me,
991
+ ge,
992
992
  {
993
993
  w: r === "right" || r === "even" ? "100%" : void 0,
994
994
  maw: r === "right" || r === "even" ? void 0 : "100%",
995
995
  align: "center",
996
996
  justify: i,
997
997
  style: {
998
- border: h ? "1px dashed" : ""
998
+ border: f ? "1px dashed" : ""
999
999
  },
1000
1000
  children: l
1001
1001
  }
@@ -1003,12 +1003,12 @@ function tn(t, n, l, h) {
1003
1003
  ] });
1004
1004
  }
1005
1005
  }
1006
- function nn(t, n, l, h) {
1006
+ function ln(t, n, l, f) {
1007
1007
  if (t && t.footerGridColumns) {
1008
1008
  const r = t.footerGridColumns.left ? t.footerGridColumns.left : { xs: "content", sm: "content", md: "content", lg: "content" }, i = t.footerGridColumns.middle ? t.footerGridColumns.middle : { xs: "auto", sm: "auto", md: "auto", lg: "auto" }, c = t.footerGridColumns.right ? t.footerGridColumns.right : { xs: "content", sm: "content", md: "content", lg: "content" };
1009
- return /* @__PURE__ */ x(ye, { m: 0, gutter: "xs", justify: "center", align: "center", grow: !0, children: [
1009
+ return /* @__PURE__ */ x(Fe, { m: 0, gutter: "xs", justify: "center", align: "center", grow: !0, children: [
1010
1010
  /* @__PURE__ */ e(
1011
- ye.Col,
1011
+ Fe.Col,
1012
1012
  {
1013
1013
  span: {
1014
1014
  xs: r.xs,
@@ -1017,7 +1017,7 @@ function nn(t, n, l, h) {
1017
1017
  lg: r.lg
1018
1018
  },
1019
1019
  style: {
1020
- border: h ? "1px dashed" : "",
1020
+ border: f ? "1px dashed" : "",
1021
1021
  display: "flex",
1022
1022
  justifyContent: "flex-start",
1023
1023
  alignItems: "center"
@@ -1026,7 +1026,7 @@ function nn(t, n, l, h) {
1026
1026
  }
1027
1027
  ),
1028
1028
  /* @__PURE__ */ e(
1029
- ye.Col,
1029
+ Fe.Col,
1030
1030
  {
1031
1031
  span: {
1032
1032
  xs: i.xs,
@@ -1035,7 +1035,7 @@ function nn(t, n, l, h) {
1035
1035
  lg: i.lg
1036
1036
  },
1037
1037
  style: {
1038
- border: h ? "1px dashed" : "",
1038
+ border: f ? "1px dashed" : "",
1039
1039
  display: "flex",
1040
1040
  justifyContent: "center",
1041
1041
  alignItems: "center"
@@ -1043,7 +1043,7 @@ function nn(t, n, l, h) {
1043
1043
  }
1044
1044
  ),
1045
1045
  /* @__PURE__ */ e(
1046
- ye.Col,
1046
+ Fe.Col,
1047
1047
  {
1048
1048
  span: {
1049
1049
  xs: c.xs,
@@ -1052,7 +1052,7 @@ function nn(t, n, l, h) {
1052
1052
  lg: c.lg
1053
1053
  },
1054
1054
  style: {
1055
- border: h ? "1px dashed" : "",
1055
+ border: f ? "1px dashed" : "",
1056
1056
  display: "flex",
1057
1057
  justifyContent: "flex-end",
1058
1058
  alignItems: "center"
@@ -1063,16 +1063,16 @@ function nn(t, n, l, h) {
1063
1063
  ] });
1064
1064
  } else {
1065
1065
  const r = t && t.footerFlexGrow ? t.footerFlexGrow : "even", i = t && t.footerFlexRightJustifyContent ? t.footerFlexRightJustifyContent : "flex-end", c = t && t.footerFlexLeftJustifyContent ? t.footerFlexLeftJustifyContent : "flex-start";
1066
- return /* @__PURE__ */ x(me, { justify: "space-between", children: [
1066
+ return /* @__PURE__ */ x(ge, { justify: "space-between", children: [
1067
1067
  /* @__PURE__ */ e(
1068
- me,
1068
+ ge,
1069
1069
  {
1070
1070
  w: r === "left" || r === "even" ? "100%" : void 0,
1071
1071
  maw: r === "left" || r === "even" ? void 0 : "100%",
1072
1072
  align: "center",
1073
1073
  justify: c,
1074
1074
  style: {
1075
- border: h ? "1px dashed" : "",
1075
+ border: f ? "1px dashed" : "",
1076
1076
  height: "auto",
1077
1077
  padding: n && "calc(0.625rem / 2)"
1078
1078
  },
@@ -1080,14 +1080,14 @@ function nn(t, n, l, h) {
1080
1080
  }
1081
1081
  ),
1082
1082
  /* @__PURE__ */ e(
1083
- me,
1083
+ ge,
1084
1084
  {
1085
1085
  w: r === "right" || r === "even" ? "100%" : void 0,
1086
1086
  maw: r === "right" || r === "even" ? void 0 : "100%",
1087
1087
  align: "center",
1088
1088
  justify: i,
1089
1089
  style: {
1090
- border: h ? "1px dashed" : "",
1090
+ border: f ? "1px dashed" : "",
1091
1091
  height: "auto",
1092
1092
  padding: l && "calc(0.625rem / 2)"
1093
1093
  },
@@ -1097,285 +1097,285 @@ function nn(t, n, l, h) {
1097
1097
  ] });
1098
1098
  }
1099
1099
  }
1100
- function Dt({
1100
+ function Vt({
1101
1101
  title: t,
1102
1102
  innerRef: n,
1103
1103
  isError: l = !1,
1104
- error: h = "",
1104
+ error: f = "",
1105
1105
  clearError: r,
1106
1106
  width: i = "100%",
1107
1107
  height: c = "100%",
1108
- withBorder: p = !0,
1109
- children: u,
1108
+ withBorder: b = !0,
1109
+ children: h,
1110
1110
  radius: v,
1111
1111
  debug: G,
1112
1112
  defaultDebug: o,
1113
1113
  headerLeft: a,
1114
- headerMiddle: D,
1115
- headerRight: F,
1116
- footerLeft: S,
1117
- footerMiddle: f,
1114
+ headerMiddle: S,
1115
+ headerRight: w,
1116
+ footerLeft: E,
1117
+ footerMiddle: g,
1118
1118
  footerRight: d,
1119
- variant: I,
1120
- options: T = {},
1121
- style: z,
1122
- debugOptions: A = {
1119
+ variant: R,
1120
+ options: I = {},
1121
+ style: L,
1122
+ debugOptions: y = {
1123
1123
  debugLayoutHotKey: "ctrl+shift+S",
1124
1124
  debugObjectInspectorHotKey: "ctrl+shift+D",
1125
1125
  objectsToInspect: []
1126
1126
  },
1127
1127
  // Props de segurança (opcionais)
1128
- resourceName: m,
1129
- resourceDescription: B,
1128
+ resourceName: p,
1129
+ resourceDescription: D,
1130
1130
  requiredPermissions: oe,
1131
1131
  fallbackComponent: te,
1132
- securityOptions: O
1132
+ securityOptions: K
1133
1133
  }) {
1134
- const [M, N] = Nt({
1134
+ const [M, B] = Gt({
1135
1135
  value: G,
1136
1136
  defaultValue: o,
1137
1137
  finalValue: !1
1138
1138
  });
1139
- kt([[A && A.debugLayoutHotKey, () => N(!M)]]);
1140
- const E = Fe(), { t: V } = Lt();
1139
+ $t([[y && y.debugLayoutHotKey, () => B(!M)]]);
1140
+ const A = Re(), { t: T } = Ut();
1141
1141
  Ae({
1142
- autoRegisterActions: O?.autoRegisterActions ?? !0
1142
+ autoRegisterActions: K?.autoRegisterActions ?? !0
1143
1143
  });
1144
- const X = fe(null), k = n || X, Y = fe(null), ne = fe(null), Z = Ke(Y), U = Ke(ne), $ = Ke(k), J = Ie(() => ({
1145
- height: $.height - Z.height - U.height - Number(Bt("0.625rem")),
1144
+ const X = ue(null), V = n || X, Y = ue(null), ne = ue(null), Z = Ye(Y), U = Ye(ne), $ = Ye(V), _ = Be(() => ({
1145
+ height: $.height - Z.height - U.height - Number(Pt("0.625rem")),
1146
1146
  width: $.width - Z.width - U.width
1147
- }), [$.height, $.width, Z.height, Z.width, U.height, U.width]), re = fe(o);
1148
- Qe(() => {
1149
- o !== re.current && (N(o), re.current = o);
1150
- }, [o, N]);
1151
- const ie = /* @__PURE__ */ x(Be, { children: [
1147
+ }), [$.height, $.width, Z.height, Z.width, U.height, U.width]), re = ue(o);
1148
+ _e(() => {
1149
+ o !== re.current && (B(o), re.current = o);
1150
+ }, [o, B]);
1151
+ const ie = /* @__PURE__ */ x(ke, { children: [
1152
1152
  /* @__PURE__ */ e(
1153
- Je,
1153
+ Oe,
1154
1154
  {
1155
- ref: k,
1156
- withBorder: p,
1155
+ ref: V,
1156
+ withBorder: b,
1157
1157
  radius: v,
1158
- style: { width: i, height: c, padding: 4, ...z },
1159
- children: /* @__PURE__ */ x(tt, { height: "100%", children: [
1160
- /* @__PURE__ */ e(bt, { size: Z.height, children: /* @__PURE__ */ e("div", { ref: Y, children: tn(T, a, F, M) }) }),
1161
- /* @__PURE__ */ e(nt, { children: /* @__PURE__ */ e(
1162
- vt,
1158
+ style: { width: i, height: c, padding: 4, ...L },
1159
+ children: /* @__PURE__ */ x(rt, { height: "100%", children: [
1160
+ /* @__PURE__ */ e(xt, { size: Z.height, children: /* @__PURE__ */ e("div", { ref: Y, children: on(I, a, w, M) }) }),
1161
+ /* @__PURE__ */ e(it, { children: /* @__PURE__ */ e(
1162
+ Ft,
1163
1163
  {
1164
- h: J.height,
1164
+ h: _.height,
1165
1165
  style: {
1166
1166
  border: M ? "1px dashed" : "",
1167
1167
  padding: "calc(0.625rem / 2)"
1168
1168
  },
1169
- children: u ? /* @__PURE__ */ x(zt, { children: [
1169
+ children: h ? /* @__PURE__ */ x(jt, { children: [
1170
1170
  l && /* @__PURE__ */ e(
1171
- We,
1171
+ Qe,
1172
1172
  {
1173
1173
  autoClose: 2e4,
1174
1174
  withCloseButton: !0,
1175
1175
  withBorder: !0,
1176
- icon: /* @__PURE__ */ e(_e, { size: "1.4rem" }),
1177
- title: `${V("WARNING")}`,
1176
+ icon: /* @__PURE__ */ e(Ke, { size: "1.4rem" }),
1177
+ title: `${T("WARNING")}`,
1178
1178
  titleColor: "rgb(250, 82, 82)",
1179
- variant: I ?? E.variant,
1179
+ variant: R ?? A.variant,
1180
1180
  onClose: () => r && r(),
1181
- children: /* @__PURE__ */ e("span", { children: h })
1181
+ children: /* @__PURE__ */ e("span", { children: f })
1182
1182
  }
1183
1183
  ),
1184
- u
1185
- ] }) : M && /* @__PURE__ */ e(me, { h: J.height + 80, justify: "center", align: "center", wrap: "wrap", children: /* @__PURE__ */ e(Se, { size: "lg", children: "INSIRA O CONTEÚDO DO PAINEL AQUI." }) })
1184
+ h
1185
+ ] }) : M && /* @__PURE__ */ e(ge, { h: _.height + 80, justify: "center", align: "center", wrap: "wrap", children: /* @__PURE__ */ e(Te, { size: "lg", children: "INSIRA O CONTEÚDO DO PAINEL AQUI." }) })
1186
1186
  }
1187
1187
  ) }),
1188
- /* @__PURE__ */ e(rt, { size: U.height, children: /* @__PURE__ */ e("div", { ref: ne, children: nn(T, S, d, M) }) })
1188
+ /* @__PURE__ */ e(ot, { size: U.height, children: /* @__PURE__ */ e("div", { ref: ne, children: ln(I, E, d, M) }) })
1189
1189
  ] })
1190
1190
  }
1191
1191
  ),
1192
1192
  /* @__PURE__ */ e(
1193
- qt,
1193
+ Wt,
1194
1194
  {
1195
- debugObjectInspectorHotKey: A && A.debugObjectInspectorHotKey,
1196
- objectsToInspect: A && A.objectsToInspect
1195
+ debugObjectInspectorHotKey: y && y.debugObjectInspectorHotKey,
1196
+ objectsToInspect: y && y.objectsToInspect
1197
1197
  }
1198
1198
  )
1199
1199
  ] });
1200
1200
  return /* @__PURE__ */ e(
1201
- Re,
1201
+ Ee,
1202
1202
  {
1203
- resourceName: m,
1204
- resourceDescription: B,
1203
+ resourceName: p,
1204
+ resourceDescription: D,
1205
1205
  requiredPermissions: oe,
1206
1206
  fallbackComponent: te,
1207
- onSecurityReady: O?.onSecurityReady,
1208
- onAccessDenied: O?.onAccessDenied,
1207
+ onSecurityReady: K?.onSecurityReady,
1208
+ onAccessDenied: K?.onAccessDenied,
1209
1209
  children: ie
1210
1210
  }
1211
1211
  );
1212
1212
  }
1213
- function rn(t, n, l, h, r, i) {
1213
+ function an(t, n, l, f, r, i) {
1214
1214
  console.log(`Render de "${t}" na fase "${n}": ${l}ms`);
1215
1215
  }
1216
- function Sn({
1216
+ function Tn({
1217
1217
  title: t,
1218
1218
  dataSource: n,
1219
1219
  // dataSourceEdition,
1220
1220
  filterOptions: l,
1221
- globalFilterFieldNames: h,
1221
+ globalFilterFieldNames: f,
1222
1222
  //pageSize,
1223
1223
  filterFields: r,
1224
1224
  innerRef: i,
1225
1225
  //isLoading = false,
1226
1226
  debug: c = !1,
1227
- filterType: p = "normal",
1228
- isError: u = !1,
1227
+ filterType: b = "normal",
1228
+ isError: h = !1,
1229
1229
  error: v = "",
1230
1230
  clearError: G = () => {
1231
1231
  },
1232
1232
  width: o = "100%",
1233
1233
  height: a = "100%",
1234
- withBorder: D = !0,
1235
- filterPersistenceDelegator: F,
1236
- withPagination: S = !0,
1237
- radius: f,
1234
+ withBorder: S = !0,
1235
+ filterPersistenceDelegator: w,
1236
+ withPagination: E = !0,
1237
+ radius: g,
1238
1238
  userActions: d,
1239
- columnsCountBreakPoints: I,
1240
- columnsCount: T,
1241
- gutter: z,
1242
- component: A,
1243
- activeIndex: m,
1244
- activeBackgroundColor: B,
1239
+ columnsCountBreakPoints: R,
1240
+ columnsCount: I,
1241
+ gutter: L,
1242
+ component: y,
1243
+ activeIndex: p,
1244
+ activeBackgroundColor: D,
1245
1245
  activeColor: oe,
1246
1246
  onItemEnter: te,
1247
- onItemLeave: O,
1247
+ onItemLeave: K,
1248
1248
  style: M,
1249
- spaceOptions: N,
1250
- variant: E,
1251
- id: V = Xt("masonry"),
1249
+ spaceOptions: B,
1250
+ variant: A,
1251
+ id: T = en("masonry"),
1252
1252
  debugOptions: X,
1253
1253
  // Props de segurança (opcionais)
1254
- resourceName: k,
1254
+ resourceName: V,
1255
1255
  resourceDescription: Y,
1256
1256
  requiredPermissions: ne,
1257
1257
  fallbackComponent: Z,
1258
1258
  securityOptions: U
1259
1259
  }) {
1260
- const $ = Fe(), [J] = W(V), re = i || fe(null), ie = fe(null), [j, le] = W(n.getCurrentPage()), [de, s] = W(
1261
- m || (n && n.getTotalRecords() > 0 ? 0 : -1)
1260
+ const $ = Re(), [_] = O(T), re = i || ue(null), ie = ue(null), [j, le] = O(n.getCurrentPage()), [he, s] = O(
1261
+ p || (n && n.getTotalRecords() > 0 ? 0 : -1)
1262
1262
  );
1263
- Ke(re);
1264
- const [P, _] = W({
1263
+ Ye(re);
1264
+ const [N, W] = O({
1265
1265
  activeFilterIndex: -1,
1266
1266
  expandedFilter: !1
1267
- }), [Ce, ue] = W(0), {
1267
+ }), [xe, fe] = O(0), {
1268
1268
  isDataSourceV2: H,
1269
- v1State: { forceUpdate: pe }
1270
- } = Ve(
1269
+ v1State: { forceUpdate: be }
1270
+ } = Ge(
1271
1271
  "ArchbaseMasonryTemplate",
1272
1272
  n
1273
1273
  );
1274
- et({
1274
+ nt({
1275
1275
  dataSource: n,
1276
- listener: (w) => {
1277
- (w.type === be.afterRemove || w.type === be.refreshData) && (ue((y) => y + 1), H || pe());
1276
+ listener: (m) => {
1277
+ (m.type === Ce.afterRemove || m.type === Ce.refreshData) && (fe((P) => P + 1), H || be());
1278
1278
  }
1279
1279
  });
1280
- const ve = Ie(() => {
1281
- if (A) {
1282
- const w = A.type;
1283
- let y = {};
1284
- return A.props && (y = A.props), n.browseRecords().map((we, K) => {
1285
- const he = `${J}_${K}`, $e = `${J}_${K}`;
1286
- let xe = we.active === void 0 ? !1 : we.active;
1287
- return de >= 0 && (xe = !1, de === K && (xe = !0)), /* @__PURE__ */ e(
1288
- w,
1280
+ const ye = Be(() => {
1281
+ if (y) {
1282
+ const m = y.type;
1283
+ let P = {};
1284
+ return y.props && (P = y.props), n.browseRecords().map((J, ce) => {
1285
+ const de = `${_}_${ce}`, we = `${_}_${ce}`;
1286
+ let Ie = J.active === void 0 ? !1 : J.active;
1287
+ return he >= 0 && (Ie = !1, he === ce && (Ie = !0)), /* @__PURE__ */ e(
1288
+ m,
1289
1289
  {
1290
- id: $e,
1291
- active: xe,
1292
- index: K,
1290
+ id: we,
1291
+ active: Ie,
1292
+ index: ce,
1293
1293
  dataSource: n,
1294
- recordData: we,
1295
- disabled: we.disabled,
1296
- ...y
1294
+ recordData: J,
1295
+ disabled: J.disabled,
1296
+ ...P
1297
1297
  },
1298
- he
1298
+ de
1299
1299
  );
1300
1300
  });
1301
1301
  }
1302
1302
  return [];
1303
- }, [de, A, J, n, Ce]), Ne = (w, y) => {
1304
- _({ ...P, currentFilter: w, activeFilterIndex: y });
1305
- }, De = (w) => {
1306
- _({ ...P, expandedFilter: w });
1307
- }, L = (w, y) => {
1308
- _({ ...P, currentFilter: w, activeFilterIndex: y });
1303
+ }, [he, y, _, n, xe]), $e = (m, P) => {
1304
+ W({ ...N, currentFilter: m, activeFilterIndex: P });
1305
+ }, Ve = (m) => {
1306
+ W({ ...N, expandedFilter: m });
1307
+ }, z = (m, P) => {
1308
+ W({ ...N, currentFilter: m, activeFilterIndex: P });
1309
1309
  }, ae = () => {
1310
- }, ke = (w, y) => {
1311
- s(w), n && n.gotoRecordByData(y);
1312
- }, Ee = (w) => {
1310
+ }, ze = (m, P) => {
1311
+ s(m), n && n.gotoRecordByData(P);
1312
+ }, Se = (m) => {
1313
1313
  if (n) {
1314
- const y = n.getOptions();
1315
- y.filter = w, y.currentPage = j, n.refreshData(y), H || pe();
1314
+ const P = n.getOptions();
1315
+ P.filter = m, P.currentPage = j, n.refreshData(P), H || be();
1316
1316
  }
1317
- }, Pe = (w) => {
1317
+ }, Le = (m) => {
1318
1318
  if (n) {
1319
- const y = n.getOptions();
1320
- y.currentPage = w, n.refreshData(y), H || pe();
1319
+ const P = n.getOptions();
1320
+ P.currentPage = m, n.refreshData(P), H || be();
1321
1321
  }
1322
- }, q = () => p === "normal" && h ? /* @__PURE__ */ e(
1323
- Qt,
1322
+ }, q = () => b === "normal" && f ? /* @__PURE__ */ e(
1323
+ Zt,
1324
1324
  {
1325
- searchableFields: h,
1326
- onFilter: Ee,
1325
+ searchableFields: f,
1326
+ onFilter: Se,
1327
1327
  minFilterValueLength: 1
1328
1328
  }
1329
- ) : p === "advanced" ? /* @__PURE__ */ e(Mt, { id: `profile_${l.componentName}`, onRender: rn, children: /* @__PURE__ */ e(
1330
- Ct,
1329
+ ) : b === "advanced" ? /* @__PURE__ */ e(Ht, { id: `profile_${l.componentName}`, onRender: an, children: /* @__PURE__ */ e(
1330
+ vt,
1331
1331
  {
1332
1332
  id: l.componentName,
1333
1333
  viewName: l.viewName,
1334
1334
  apiVersion: l.apiVersion,
1335
1335
  ref: ie,
1336
- variant: E || $.variant,
1337
- expandedFilter: P.expandedFilter,
1338
- persistenceDelegator: F,
1339
- currentFilter: P.currentFilter,
1340
- activeFilterIndex: P.activeFilterIndex,
1341
- onSelectedFilter: L,
1342
- onFilterChanged: Ne,
1336
+ variant: A || $.variant,
1337
+ expandedFilter: N.expandedFilter,
1338
+ persistenceDelegator: w,
1339
+ currentFilter: N.currentFilter,
1340
+ activeFilterIndex: N.activeFilterIndex,
1341
+ onSelectedFilter: z,
1342
+ onFilterChanged: $e,
1343
1343
  onSearchByFilter: ae,
1344
- onToggleExpandedFilter: De,
1344
+ onToggleExpandedFilter: Ve,
1345
1345
  width: "660px",
1346
1346
  height: "170px",
1347
1347
  children: r
1348
1348
  }
1349
- ) }) : /* @__PURE__ */ e(Be, {}), ce = { ...{
1349
+ ) }) : /* @__PURE__ */ e(ke, {}), ve = { ...{
1350
1350
  headerFlexGrow: "left",
1351
1351
  footerGridColumns: {}
1352
- }, ...N };
1352
+ }, ...B };
1353
1353
  return /* @__PURE__ */ e(
1354
- Re,
1354
+ Ee,
1355
1355
  {
1356
- resourceName: k,
1356
+ resourceName: V,
1357
1357
  resourceDescription: Y,
1358
1358
  requiredPermissions: ne,
1359
1359
  fallbackComponent: Z,
1360
1360
  onSecurityReady: U?.onSecurityReady,
1361
1361
  onAccessDenied: U?.onAccessDenied,
1362
1362
  children: /* @__PURE__ */ e(
1363
- Dt,
1363
+ Vt,
1364
1364
  {
1365
1365
  innerRef: re,
1366
1366
  width: o,
1367
1367
  height: a,
1368
- radius: f,
1369
- withBorder: D,
1370
- isError: u,
1368
+ radius: g,
1369
+ withBorder: S,
1370
+ isError: h,
1371
1371
  error: v,
1372
1372
  clearError: G,
1373
1373
  title: t,
1374
1374
  defaultDebug: c,
1375
1375
  debugOptions: X,
1376
1376
  style: M,
1377
- options: ce,
1378
- headerLeft: d?.visible !== !1 ? /* @__PURE__ */ x(me, { gap: "8px", rowGap: "8px", children: [
1377
+ options: ve,
1378
+ headerLeft: d?.visible !== !1 ? /* @__PURE__ */ x(ge, { gap: "8px", rowGap: "8px", children: [
1379
1379
  d?.customUserActions && d?.customUserActionsPosition === "left" ? d.customUserActions : null,
1380
1380
  d?.allowAdd !== !1 && d?.onAddExecute ? /* @__PURE__ */ e(
1381
1381
  ee,
@@ -1383,8 +1383,8 @@ function Sn({
1383
1383
  actionName: "add",
1384
1384
  actionDescription: `Adicionar novo ${Y || "registro"}`,
1385
1385
  color: "green",
1386
- variant: E ?? $.variant,
1387
- leftSection: /* @__PURE__ */ e(ft, {}),
1386
+ variant: A ?? $.variant,
1387
+ leftSection: /* @__PURE__ */ e(gt, {}),
1388
1388
  onClick: () => d.onAddExecute(),
1389
1389
  children: d.labelAdd || C().t("archbase:New")
1390
1390
  }
@@ -1395,9 +1395,9 @@ function Sn({
1395
1395
  actionName: "edit",
1396
1396
  actionDescription: `Editar ${Y || "registro"}`,
1397
1397
  color: "blue",
1398
- leftSection: /* @__PURE__ */ e(mt, {}),
1398
+ leftSection: /* @__PURE__ */ e(pt, {}),
1399
1399
  disabled: !n.isBrowsing() || n.isEmpty(),
1400
- variant: E ?? $.variant,
1400
+ variant: A ?? $.variant,
1401
1401
  onClick: () => d.onEditExecute(),
1402
1402
  children: d.labelEdit || C().t("archbase:Edit")
1403
1403
  }
@@ -1408,9 +1408,9 @@ function Sn({
1408
1408
  actionName: "delete",
1409
1409
  actionDescription: `Remover ${Y || "registro"}`,
1410
1410
  color: "red",
1411
- leftSection: /* @__PURE__ */ e(Ye, {}),
1411
+ leftSection: /* @__PURE__ */ e(et, {}),
1412
1412
  disabled: !n.isBrowsing() || n.isEmpty(),
1413
- variant: E ?? $.variant,
1413
+ variant: A ?? $.variant,
1414
1414
  onClick: () => d.onRemoveExecute(),
1415
1415
  children: d.labelRemove || C().t("archbase:Remove")
1416
1416
  }
@@ -1421,9 +1421,9 @@ function Sn({
1421
1421
  actionName: "view",
1422
1422
  actionDescription: `Visualizar ${Y || "registro"}`,
1423
1423
  color: "gray.7",
1424
- leftSection: /* @__PURE__ */ e(gt, {}),
1424
+ leftSection: /* @__PURE__ */ e(bt, {}),
1425
1425
  disabled: !n.isBrowsing() || n.isEmpty(),
1426
- variant: E ?? $.variant,
1426
+ variant: A ?? $.variant,
1427
1427
  onClick: () => d.onViewExecute(),
1428
1428
  children: d.labelView || C().t("archbase:View")
1429
1429
  }
@@ -1431,20 +1431,20 @@ function Sn({
1431
1431
  d?.customUserActions && d?.customUserActionsPosition === "right" ? d.customUserActions : null
1432
1432
  ] }) : void 0,
1433
1433
  headerRight: q(),
1434
- footerRight: S ? /* @__PURE__ */ e(yt, { total: n.getTotalPages(), onChange: Pe }) : void 0,
1434
+ footerRight: E ? /* @__PURE__ */ e(At, { total: n.getTotalPages(), onChange: Le }) : void 0,
1435
1435
  children: /* @__PURE__ */ e(
1436
- Jt,
1436
+ Ot,
1437
1437
  {
1438
1438
  value: {
1439
1439
  dataSource: n,
1440
- ownerId: V,
1441
- handleSelectItem: ke,
1442
- activeBackgroundColor: B,
1440
+ ownerId: T,
1441
+ handleSelectItem: ze,
1442
+ activeBackgroundColor: D,
1443
1443
  activeColor: oe,
1444
1444
  onItemEnter: te,
1445
- onItemLeave: O
1445
+ onItemLeave: K
1446
1446
  },
1447
- children: /* @__PURE__ */ e(_t, { columnsCountBreakPoints: I, children: /* @__PURE__ */ e(Wt, { gutter: z, columnsCount: T, children: ve }) })
1447
+ children: /* @__PURE__ */ e(Kt, { columnsCountBreakPoints: R, children: /* @__PURE__ */ e(Qt, { gutter: L, columnsCount: I, children: ye }) })
1448
1448
  }
1449
1449
  )
1450
1450
  }
@@ -1452,7 +1452,7 @@ function Sn({
1452
1452
  }
1453
1453
  );
1454
1454
  }
1455
- const on = {
1455
+ const sn = {
1456
1456
  visible: !0,
1457
1457
  allowAdd: !0,
1458
1458
  allowEdit: !0,
@@ -1460,56 +1460,56 @@ const on = {
1460
1460
  allowRemove: !0,
1461
1461
  positionCustomUserActions: "after"
1462
1462
  };
1463
- function In({
1463
+ function Bn({
1464
1464
  title: t,
1465
1465
  dataSource: n,
1466
1466
  // dataSourceEdition,
1467
1467
  filterOptions: l,
1468
1468
  //pageSize,
1469
- filterFields: h,
1469
+ filterFields: f,
1470
1470
  innerRef: r,
1471
1471
  //isLoading = false,
1472
1472
  isError: i = !1,
1473
1473
  error: c = "",
1474
- clearError: p = () => {
1474
+ clearError: b = () => {
1475
1475
  },
1476
- width: u = "100%",
1476
+ width: h = "100%",
1477
1477
  height: v = "100%",
1478
1478
  withBorder: G = !0,
1479
1479
  filterPersistenceDelegator: o,
1480
1480
  withPagination: a = !0,
1481
- children: D,
1482
- radius: F,
1483
- userActions: S,
1484
- debug: f = !1,
1481
+ children: S,
1482
+ radius: w,
1483
+ userActions: E,
1484
+ debug: g = !1,
1485
1485
  variant: d,
1486
- actionsButtonsOptions: I,
1487
- spaceOptions: T,
1488
- style: z,
1489
- debugOptions: A,
1486
+ actionsButtonsOptions: R,
1487
+ spaceOptions: I,
1488
+ style: L,
1489
+ debugOptions: y,
1490
1490
  // Props de segurança (opcionais)
1491
- resourceName: m,
1492
- resourceDescription: B,
1491
+ resourceName: p,
1492
+ resourceDescription: D,
1493
1493
  requiredPermissions: oe,
1494
1494
  fallbackComponent: te,
1495
- securityOptions: O
1495
+ securityOptions: K
1496
1496
  }) {
1497
- const M = Fe(), N = Ae({
1498
- autoRegisterActions: O?.autoRegisterActions ?? !0
1499
- }), E = r || fe(null), V = fe(null), [X, k] = W({
1497
+ const M = Re(), B = Ae({
1498
+ autoRegisterActions: K?.autoRegisterActions ?? !0
1499
+ }), A = r || ue(null), T = ue(null), [X, V] = O({
1500
1500
  activeFilterIndex: -1,
1501
1501
  expandedFilter: !1
1502
1502
  }), {
1503
1503
  isDataSourceV2: Y,
1504
1504
  v1State: { forceUpdate: ne }
1505
- } = Ve(
1505
+ } = Ge(
1506
1506
  "ArchbasePanelTemplate",
1507
1507
  n
1508
- ), Z = Ie(() => {
1509
- const s = { ...on, ...S }, P = (Ce) => N.isAvailable ? (N.registerAction(), N.hasPermission()) : !0, _ = [];
1510
- return s.allowAdd && s.onAddExecute && P() && _.push({
1508
+ ), Z = Be(() => {
1509
+ const s = { ...sn, ...E }, N = (xe) => B.isAvailable ? (B.registerAction(), B.hasPermission()) : !0, W = [];
1510
+ return s.allowAdd && s.onAddExecute && N() && W.push({
1511
1511
  id: "1",
1512
- icon: /* @__PURE__ */ e(ft, {}),
1512
+ icon: /* @__PURE__ */ e(gt, {}),
1513
1513
  color: "green",
1514
1514
  label: s.labelAdd ? s.labelAdd : C().t("archbase:New"),
1515
1515
  executeAction: () => {
@@ -1517,9 +1517,9 @@ function In({
1517
1517
  },
1518
1518
  enabled: !0,
1519
1519
  hint: "Clique para criar."
1520
- }), s.allowEdit && s.onEditExecute && P() && _.push({
1520
+ }), s.allowEdit && s.onEditExecute && N() && W.push({
1521
1521
  id: "2",
1522
- icon: /* @__PURE__ */ e(mt, {}),
1522
+ icon: /* @__PURE__ */ e(pt, {}),
1523
1523
  color: "blue",
1524
1524
  label: s.labelEdit ? s.labelEdit : C().t("archbase:Edit"),
1525
1525
  executeAction: () => {
@@ -1527,9 +1527,9 @@ function In({
1527
1527
  },
1528
1528
  enabled: !n.isEmpty() && n.isBrowsing(),
1529
1529
  hint: "Clique para editar."
1530
- }), s.allowRemove && s.onRemoveExecute && P() && _.push({
1530
+ }), s.allowRemove && s.onRemoveExecute && N() && W.push({
1531
1531
  id: "3",
1532
- icon: /* @__PURE__ */ e(Ye, {}),
1532
+ icon: /* @__PURE__ */ e(et, {}),
1533
1533
  color: "red",
1534
1534
  label: s.labelRemove ? s.labelRemove : C().t("archbase:Remove"),
1535
1535
  executeAction: () => {
@@ -1537,9 +1537,9 @@ function In({
1537
1537
  },
1538
1538
  enabled: !n.isEmpty() && n.isBrowsing(),
1539
1539
  hint: "Clique para remover."
1540
- }), s.allowView && s.onView && P() && _.push({
1540
+ }), s.allowView && s.onView && N() && W.push({
1541
1541
  id: "4",
1542
- icon: /* @__PURE__ */ e(gt, {}),
1542
+ icon: /* @__PURE__ */ e(bt, {}),
1543
1543
  color: "green",
1544
1544
  label: s.labelView ? s.labelView : C().t("archbase:View"),
1545
1545
  executeAction: () => {
@@ -1547,13 +1547,13 @@ function In({
1547
1547
  },
1548
1548
  enabled: !n.isEmpty() && n.isBrowsing(),
1549
1549
  hint: "Clique para visualizar."
1550
- }), s.customUserActions && s.positionCustomUserActions === "before" ? [...s.customUserActions, ..._] : s.customUserActions && s.positionCustomUserActions === "after" ? [..._, ...s.customUserActions] : _;
1551
- }, [S, n, N]), U = (s, P) => {
1552
- k({ ...X, currentFilter: s, activeFilterIndex: P });
1550
+ }), s.customUserActions && s.positionCustomUserActions === "before" ? [...s.customUserActions, ...W] : s.customUserActions && s.positionCustomUserActions === "after" ? [...W, ...s.customUserActions] : W;
1551
+ }, [E, n, B]), U = (s, N) => {
1552
+ V({ ...X, currentFilter: s, activeFilterIndex: N });
1553
1553
  }, $ = (s) => {
1554
- k({ ...X, expandedFilter: s });
1555
- }, J = (s, P) => {
1556
- k({ ...X, currentFilter: s, activeFilterIndex: P });
1554
+ V({ ...X, expandedFilter: s });
1555
+ }, _ = (s, N) => {
1556
+ V({ ...X, currentFilter: s, activeFilterIndex: N });
1557
1557
  }, re = () => {
1558
1558
  }, ie = {
1559
1559
  menuButtonColor: "blue.5",
@@ -1562,147 +1562,147 @@ function In({
1562
1562
  headerFlexGrow: "left",
1563
1563
  footerFlexGrow: "right"
1564
1564
  // footerGridColumns: {},
1565
- }, le = { ...ie, ...I }, de = { ...j, ...T };
1565
+ }, le = { ...ie, ...R }, he = { ...j, ...I };
1566
1566
  return /* @__PURE__ */ e(
1567
- Re,
1567
+ Ee,
1568
1568
  {
1569
- resourceName: m,
1570
- resourceDescription: B,
1569
+ resourceName: p,
1570
+ resourceDescription: D,
1571
1571
  requiredPermissions: oe,
1572
1572
  fallbackComponent: te,
1573
- onSecurityReady: O?.onSecurityReady,
1574
- onAccessDenied: O?.onAccessDenied,
1573
+ onSecurityReady: K?.onSecurityReady,
1574
+ onAccessDenied: K?.onAccessDenied,
1575
1575
  children: /* @__PURE__ */ e(
1576
- Dt,
1576
+ Vt,
1577
1577
  {
1578
- innerRef: E,
1579
- width: u,
1578
+ innerRef: A,
1579
+ width: h,
1580
1580
  height: v,
1581
- radius: F,
1581
+ radius: w,
1582
1582
  withBorder: G,
1583
1583
  isError: i,
1584
1584
  error: c,
1585
- clearError: p,
1585
+ clearError: b,
1586
1586
  title: t,
1587
- defaultDebug: f,
1588
- debugOptions: A,
1589
- style: z,
1590
- options: de,
1591
- headerLeft: /* @__PURE__ */ e(Ot, { actions: Z, options: le }),
1587
+ defaultDebug: g,
1588
+ debugOptions: y,
1589
+ style: L,
1590
+ options: he,
1591
+ headerLeft: /* @__PURE__ */ e(Xt, { actions: Z, options: le }),
1592
1592
  headerRight: /* @__PURE__ */ e(
1593
- Ct,
1593
+ vt,
1594
1594
  {
1595
1595
  id: l.componentName,
1596
1596
  viewName: l.viewName,
1597
1597
  apiVersion: l.apiVersion,
1598
- ref: V,
1598
+ ref: T,
1599
1599
  variant: d || M.variant,
1600
1600
  expandedFilter: X.expandedFilter,
1601
1601
  persistenceDelegator: o,
1602
1602
  currentFilter: X.currentFilter,
1603
1603
  activeFilterIndex: X.activeFilterIndex,
1604
- onSelectedFilter: J,
1604
+ onSelectedFilter: _,
1605
1605
  onFilterChanged: U,
1606
1606
  onSearchByFilter: re,
1607
1607
  onToggleExpandedFilter: $,
1608
1608
  width: "660px",
1609
1609
  height: "170px",
1610
- children: h
1610
+ children: f
1611
1611
  }
1612
1612
  ),
1613
- footerRight: a && /* @__PURE__ */ e(yt, { total: 10 }),
1614
- children: D
1613
+ footerRight: a && /* @__PURE__ */ e(At, { total: 10 }),
1614
+ children: S
1615
1615
  }
1616
1616
  )
1617
1617
  }
1618
1618
  );
1619
1619
  }
1620
- function Dn() {
1620
+ function Vn() {
1621
1621
  return /* @__PURE__ */ e("div", { children: "SEARCH TEMPLATE" });
1622
1622
  }
1623
- function ln(t, n) {
1623
+ function cn(t, n) {
1624
1624
  const {
1625
1625
  // Props obrigatórias
1626
1626
  opened: l,
1627
- title: h,
1627
+ title: f,
1628
1628
  children: r,
1629
1629
  onClose: i,
1630
1630
  idField: c,
1631
- displayField: p,
1631
+ displayField: b,
1632
1632
  // Seleção
1633
- selectionMode: u = "single",
1633
+ selectionMode: h = "single",
1634
1634
  onSelect: v,
1635
1635
  onSelectMultiple: G,
1636
1636
  initialSelectedItems: o,
1637
1637
  selectOnDoubleClick: a = !0,
1638
- onBeforeConfirm: D,
1639
- onAfterConfirm: F,
1638
+ onBeforeConfirm: S,
1639
+ onAfterConfirm: w,
1640
1640
  // DataSource
1641
- dataSource: S,
1642
- loadData: f,
1641
+ dataSource: E,
1642
+ loadData: g,
1643
1643
  searchFields: d = "",
1644
- pageSize: I = 100,
1644
+ pageSize: R = 100,
1645
1645
  // Aparência
1646
- displaySubField: T,
1647
- renderSelectedItem: z,
1648
- renderSelectedItems: A,
1649
- icon: m,
1650
- modalSize: B = "70%",
1646
+ displaySubField: I,
1647
+ renderSelectedItem: L,
1648
+ renderSelectedItems: y,
1649
+ icon: p,
1650
+ modalSize: D = "70%",
1651
1651
  modalHeight: oe = "600px",
1652
1652
  gridHeight: te = 400,
1653
- rowHeight: O,
1653
+ rowHeight: K,
1654
1654
  selectionIndicatorColor: M = "blue.0",
1655
- showSelectionIndicator: N = !0,
1655
+ showSelectionIndicator: B = !0,
1656
1656
  // Múltipla seleção
1657
- maxSelections: E,
1658
- showSelectionCount: V = !0,
1657
+ maxSelections: A,
1658
+ showSelectionCount: T = !0,
1659
1659
  allowClearAll: X = !0,
1660
1660
  // Estado
1661
- isLoading: k,
1661
+ isLoading: V,
1662
1662
  isError: Y = !1,
1663
1663
  error: ne = "",
1664
1664
  clearError: Z,
1665
1665
  autoCloseAlertError: U = 15e3,
1666
1666
  onError: $,
1667
1667
  // Customização
1668
- userActions: J,
1668
+ userActions: _,
1669
1669
  labels: re,
1670
1670
  variant: ie,
1671
1671
  // Segurança
1672
1672
  resourceName: j,
1673
1673
  resourceDescription: le,
1674
- requiredPermissions: de,
1674
+ requiredPermissions: he,
1675
1675
  fallbackComponent: s,
1676
- securityOptions: P
1677
- } = t, _ = Fe(), Ce = Ze(), { colorScheme: ue } = Xe(), H = ue === "dark", pe = ht(), ve = H ? "dark.5" : M, [Ne, De] = W(!1), [L, ae] = W(o || []), [ke, Ee] = W(!1), [Pe, q] = W(""), Ge = fe(null), ce = !!S, y = Q(() => ce && S ? S : (Ge.current || (Ge.current = new jt("dsLookup", {
1676
+ securityOptions: N
1677
+ } = t, W = Re(), xe = tt(), { colorScheme: fe } = Ze(), H = fe === "dark", be = mt(), ye = H ? "dark.5" : M, [$e, Ve] = O(!1), [z, ae] = O(o || []), [ze, Se] = O(!1), [Le, q] = O(""), Me = ue(null), ve = ue([]), m = !!E, J = Q(() => m && E ? E : (Me.current || (Me.current = new Jt("dsLookup", {
1678
1678
  records: [],
1679
1679
  grandTotalRecords: 0,
1680
1680
  currentPage: 0,
1681
1681
  totalPages: 0,
1682
- pageSize: I
1683
- })), Ge.current), [ce, S, I])();
1682
+ pageSize: R
1683
+ })), Me.current), [m, E, R])();
1684
1684
  Ae({
1685
- autoRegisterActions: P?.autoRegisterActions ?? !0
1685
+ autoRegisterActions: N?.autoRegisterActions ?? !0
1686
1686
  });
1687
- const we = Ve(
1687
+ const ce = Ge(
1688
1688
  "ArchbaseLookupDataTemplate",
1689
- y,
1689
+ J,
1690
1690
  void 0,
1691
1691
  void 0
1692
1692
  );
1693
- et({
1694
- dataSource: y,
1695
- listener: (g) => {
1696
- if (g.type === be.onError && (Ee(!0), q(g.error || "")), g.type === be.afterScroll) {
1697
- if (u === "single") {
1698
- const b = y.getCurrentRecord();
1699
- b && ae([b]);
1693
+ nt({
1694
+ dataSource: J,
1695
+ listener: (u) => {
1696
+ if (u.type === Ce.onError && (Se(!0), q(u.error || "")), u.type === Ce.afterScroll) {
1697
+ if (h === "single") {
1698
+ const k = J.getCurrentRecord();
1699
+ k && ae([k]);
1700
1700
  }
1701
- we.isDataSourceV2 || pe();
1701
+ ce.isDataSourceV2 || be();
1702
1702
  }
1703
1703
  }
1704
1704
  });
1705
- const K = {
1705
+ const de = {
1706
1706
  okButton: C().t("archbase:Ok"),
1707
1707
  cancelButton: C().t("archbase:Cancel"),
1708
1708
  clearButton: C().t("archbase:Clear"),
@@ -1711,202 +1711,223 @@ function ln(t, n) {
1711
1711
  noItemSelected: C().t("archbase:No item selected"),
1712
1712
  itemsSelected: C().t("archbase:items selected"),
1713
1713
  ...re
1714
- }, he = Q(
1715
- async (g) => {
1716
- if (!(ce || !f)) {
1717
- De(!0);
1714
+ };
1715
+ _e(() => {
1716
+ if (m)
1717
+ return;
1718
+ const u = (k) => {
1719
+ const Ne = ve.current;
1720
+ if (Ne.length === 0)
1721
+ return;
1722
+ const Nt = k?.currentPage ?? 0, yt = k?.pageSize ?? R;
1723
+ J.open({
1724
+ records: Ne,
1725
+ grandTotalRecords: Ne.length,
1726
+ currentPage: Nt,
1727
+ totalPages: Math.ceil(Ne.length / yt),
1728
+ pageSize: yt
1729
+ });
1730
+ };
1731
+ return J.emitter.on("refreshData", u), () => {
1732
+ J.emitter.off("refreshData", u);
1733
+ };
1734
+ }, [m, J, R]);
1735
+ const we = Q(
1736
+ async (u) => {
1737
+ if (!(m || !g)) {
1738
+ Ve(!0);
1718
1739
  try {
1719
- const b = await f(g, d);
1720
- y.open({
1721
- records: b,
1722
- grandTotalRecords: b.length,
1740
+ const k = await g(u, d);
1741
+ ve.current = k, J.open({
1742
+ records: k,
1743
+ grandTotalRecords: k.length,
1723
1744
  currentPage: 0,
1724
- totalPages: Math.ceil(b.length / I),
1725
- pageSize: I
1745
+ totalPages: Math.ceil(k.length / R),
1746
+ pageSize: R
1726
1747
  });
1727
- } catch (b) {
1728
- Ee(!0), q(ge(b)), $?.(b);
1748
+ } catch (k) {
1749
+ Se(!0), q(pe(k)), $?.(k);
1729
1750
  } finally {
1730
- De(!1);
1751
+ Ve(!1);
1731
1752
  }
1732
1753
  }
1733
1754
  },
1734
- [ce, f, d, I, y, $]
1735
- ), $e = Q(
1736
- (g) => {
1737
- const b = g?.quickFilterValues?.[0] || "";
1738
- f && !ce && he(b);
1755
+ [m, g, d, R, J, $]
1756
+ ), Ie = Q(
1757
+ (u) => {
1758
+ const k = u?.quickFilterValues?.[0] || "";
1759
+ g && !m && we(k);
1739
1760
  },
1740
- [f, ce, he]
1761
+ [g, m, we]
1741
1762
  );
1742
- Qe(() => {
1743
- l && (o?.length ? ae(o) : ae([]), he());
1744
- }, [l]), Qe(() => {
1763
+ _e(() => {
1764
+ l && (o?.length ? ae(o) : ae([]), we());
1765
+ }, [l]), _e(() => {
1745
1766
  o && ae(o);
1746
1767
  }, [o]);
1747
- const xe = Q(
1748
- (g) => {
1749
- u === "single" ? ae(g.slice(0, 1)) : E && g.length > E ? ae(g.slice(0, E)) : ae(g);
1768
+ const Ue = Q(
1769
+ (u) => {
1770
+ h === "single" ? ae(u.slice(0, 1)) : A && u.length > A ? ae(u.slice(0, A)) : ae(u);
1750
1771
  },
1751
- [u, E]
1752
- ), it = Q(
1753
- (g) => {
1754
- if (u === "single" && a) {
1755
- const b = y.getCurrentRecord();
1756
- b && (v?.(b), i());
1772
+ [h, A]
1773
+ ), lt = Q(
1774
+ (u) => {
1775
+ if (h === "single" && a) {
1776
+ const k = J.getCurrentRecord();
1777
+ k && (v?.(k), i());
1757
1778
  }
1758
1779
  },
1759
- [u, a, y, v, i]
1760
- ), ot = Q(() => {
1780
+ [h, a, J, v, i]
1781
+ ), at = Q(() => {
1761
1782
  ae([]);
1762
- }, []), Le = Q(async () => {
1763
- D && !await D(L) || (u === "single" ? L.length > 0 && v?.(L[0]) : G?.(L), F?.(L), i());
1764
- }, [L, u, v, G, D, F, i]), ze = Q(() => {
1783
+ }, []), je = Q(async () => {
1784
+ S && !await S(z) || (h === "single" ? z.length > 0 && v?.(z[0]) : G?.(z), w?.(z), i());
1785
+ }, [z, h, v, G, S, w, i]), De = Q(() => {
1765
1786
  i();
1766
- }, [i]), Me = () => {
1767
- pt.showWarning(C().t("archbase:Click on Ok or Cancel to close"));
1768
- }, Ue = () => {
1769
- Z?.(), Ee(!1), q("");
1787
+ }, [i]), He = () => {
1788
+ Ct.showWarning(C().t("archbase:Click on Ok or Cancel to close"));
1789
+ }, st = () => {
1790
+ Z?.(), Se(!1), q("");
1770
1791
  };
1771
- Rt(
1792
+ It(
1772
1793
  n,
1773
1794
  () => ({
1774
- getSelectedItems: () => L,
1775
- getSelectedItem: () => L[0] || null,
1795
+ getSelectedItems: () => z,
1796
+ getSelectedItem: () => z[0] || null,
1776
1797
  clearSelection: () => ae([]),
1777
- selectItems: (g) => xe(g),
1778
- selectItem: (g) => ae([g]),
1779
- deselectItem: (g) => {
1780
- ae((b) => b.filter((Tt) => Tt[c] !== g[c]));
1798
+ selectItems: (u) => Ue(u),
1799
+ selectItem: (u) => ae([u]),
1800
+ deselectItem: (u) => {
1801
+ ae((k) => k.filter((Ne) => Ne[c] !== u[c]));
1781
1802
  },
1782
- refreshData: () => he(),
1783
- getDataSource: () => y,
1803
+ refreshData: () => we(),
1804
+ getDataSource: () => J,
1784
1805
  confirmSelection: async () => {
1785
- await Le();
1806
+ await je();
1786
1807
  },
1787
- cancelSelection: ze
1808
+ cancelSelection: De
1788
1809
  }),
1789
- [L, xe, c, he, y, Le, ze]
1810
+ [z, Ue, c, we, J, je, De]
1790
1811
  );
1791
- const lt = Q(
1792
- (g) => {
1793
- const b = g[c];
1794
- return b !== void 0 ? b : "";
1812
+ const ct = Q(
1813
+ (u) => {
1814
+ const k = u[c];
1815
+ return k !== void 0 ? k : "";
1795
1816
  },
1796
1817
  [c]
1797
- ), at = k || Ne, st = ne || Pe, ct = Y || ke, dt = /* @__PURE__ */ x(se, { gap: "sm", children: [
1798
- m,
1799
- /* @__PURE__ */ e(Se, { fw: 600, children: h })
1800
- ] }), R = () => {
1801
- if (!N)
1818
+ ), dt = V || $e, ut = ne || Le, ht = Y || ze, F = /* @__PURE__ */ x(se, { gap: "sm", children: [
1819
+ p,
1820
+ /* @__PURE__ */ e(Te, { fw: 600, children: f })
1821
+ ] }), me = () => {
1822
+ if (!B)
1802
1823
  return null;
1803
- if (u === "single" && L.length > 0 && z)
1804
- return z(L[0]);
1805
- if (u === "multiple" && L.length > 0 && A)
1806
- return A(L);
1807
- if (u === "single" && L.length > 0) {
1808
- const g = L[0];
1809
- return /* @__PURE__ */ e(Je, { withBorder: !0, p: "sm", radius: "md", bg: ve, children: /* @__PURE__ */ x(se, { justify: "space-between", children: [
1824
+ if (h === "single" && z.length > 0 && L)
1825
+ return L(z[0]);
1826
+ if (h === "multiple" && z.length > 0 && y)
1827
+ return y(z);
1828
+ if (h === "single" && z.length > 0) {
1829
+ const u = z[0];
1830
+ return /* @__PURE__ */ e(Oe, { withBorder: !0, p: "sm", radius: "md", bg: ye, children: /* @__PURE__ */ x(se, { justify: "space-between", children: [
1810
1831
  /* @__PURE__ */ x(se, { gap: "xs", children: [
1811
- /* @__PURE__ */ e(je, { size: 16, color: "green" }),
1812
- /* @__PURE__ */ x(Se, { size: "sm", fw: 500, children: [
1813
- K.selectedLabel,
1832
+ /* @__PURE__ */ e(qe, { size: 16, color: "green" }),
1833
+ /* @__PURE__ */ x(Te, { size: "sm", fw: 500, children: [
1834
+ de.selectedLabel,
1814
1835
  ":"
1815
1836
  ] }),
1816
- /* @__PURE__ */ e(Se, { size: "sm", fw: 600, children: String(g[p]) }),
1817
- T && /* @__PURE__ */ e(Se, { size: "sm", c: H ? "gray.4" : "dimmed", children: String(g[T] || "") })
1837
+ /* @__PURE__ */ e(Te, { size: "sm", fw: 600, children: String(u[b]) }),
1838
+ I && /* @__PURE__ */ e(Te, { size: "sm", c: H ? "gray.4" : "dimmed", children: String(u[I] || "") })
1818
1839
  ] }),
1819
- /* @__PURE__ */ e(Se, { size: "xs", c: H ? "gray.4" : "dimmed", children: K.doubleClickHint })
1840
+ /* @__PURE__ */ e(Te, { size: "xs", c: H ? "gray.4" : "dimmed", children: de.doubleClickHint })
1820
1841
  ] }) });
1821
1842
  }
1822
- return u === "multiple" && L.length > 0 ? /* @__PURE__ */ e(Je, { withBorder: !0, p: "sm", radius: "md", bg: ve, children: /* @__PURE__ */ x(se, { justify: "space-between", children: [
1843
+ return h === "multiple" && z.length > 0 ? /* @__PURE__ */ e(Oe, { withBorder: !0, p: "sm", radius: "md", bg: ye, children: /* @__PURE__ */ x(se, { justify: "space-between", children: [
1823
1844
  /* @__PURE__ */ x(se, { gap: "xs", children: [
1824
- /* @__PURE__ */ e(je, { size: 16, color: "green" }),
1825
- /* @__PURE__ */ x(Se, { size: "sm", fw: 500, children: [
1826
- L.length,
1845
+ /* @__PURE__ */ e(qe, { size: 16, color: "green" }),
1846
+ /* @__PURE__ */ x(Te, { size: "sm", fw: 500, children: [
1847
+ z.length,
1827
1848
  " ",
1828
- K.itemsSelected
1849
+ de.itemsSelected
1829
1850
  ] })
1830
1851
  ] }),
1831
1852
  X && /* @__PURE__ */ e(
1832
- qe,
1853
+ We,
1833
1854
  {
1834
1855
  size: "xs",
1835
1856
  variant: "subtle",
1836
1857
  color: "red",
1837
- leftSection: /* @__PURE__ */ e(Ye, { size: 14 }),
1838
- onClick: ot,
1839
- children: K.clearButton
1858
+ leftSection: /* @__PURE__ */ e(et, { size: 14 }),
1859
+ onClick: at,
1860
+ children: de.clearButton
1840
1861
  }
1841
1862
  )
1842
1863
  ] }) }) : null;
1843
1864
  };
1844
1865
  return /* @__PURE__ */ e(
1845
- Re,
1866
+ Ee,
1846
1867
  {
1847
1868
  resourceName: j,
1848
1869
  resourceDescription: le,
1849
- requiredPermissions: de,
1870
+ requiredPermissions: he,
1850
1871
  fallbackComponent: s,
1851
- onSecurityReady: P?.onSecurityReady,
1852
- onAccessDenied: P?.onAccessDenied,
1872
+ onSecurityReady: N?.onSecurityReady,
1873
+ onAccessDenied: N?.onAccessDenied,
1853
1874
  children: /* @__PURE__ */ e(
1854
- ut,
1875
+ ft,
1855
1876
  {
1856
- title: dt,
1877
+ title: F,
1857
1878
  opened: l,
1858
- onClose: Me,
1859
- size: B,
1879
+ onClose: He,
1880
+ size: D,
1860
1881
  centered: !0,
1861
1882
  closeOnEscape: !1,
1862
1883
  closeOnClickOutside: !1,
1863
1884
  withCloseButton: !1,
1864
1885
  overlayProps: {
1865
- color: ue === "dark" ? Ce.colors.dark[7] : Ce.colors.gray[6],
1886
+ color: fe === "dark" ? xe.colors.dark[7] : xe.colors.gray[6],
1866
1887
  opacity: 0.25
1867
1888
  },
1868
- children: /* @__PURE__ */ x(tt, { height: oe, children: [
1869
- ct && /* @__PURE__ */ e(bt, { size: "100px", children: /* @__PURE__ */ e(
1870
- We,
1889
+ children: /* @__PURE__ */ x(rt, { height: oe, children: [
1890
+ ht && /* @__PURE__ */ e(xt, { size: "100px", children: /* @__PURE__ */ e(
1891
+ Qe,
1871
1892
  {
1872
1893
  autoClose: U,
1873
1894
  withCloseButton: !0,
1874
1895
  withBorder: !0,
1875
- icon: /* @__PURE__ */ e(_e, { size: "1.4rem" }),
1896
+ icon: /* @__PURE__ */ e(Ke, { size: "1.4rem" }),
1876
1897
  title: C().t("archbase:WARNING"),
1877
1898
  titleColor: "rgb(250, 82, 82)",
1878
- variant: ie ?? _.variant,
1879
- onClose: Ue,
1880
- children: /* @__PURE__ */ e("span", { children: st })
1899
+ variant: ie ?? W.variant,
1900
+ onClose: st,
1901
+ children: /* @__PURE__ */ e("span", { children: ut })
1881
1902
  }
1882
1903
  ) }),
1883
- /* @__PURE__ */ e(nt, { children: /* @__PURE__ */ x(Vt, { gap: "md", h: "100%", children: [
1884
- J && /* @__PURE__ */ e(se, { justify: "flex-end", children: J }),
1904
+ /* @__PURE__ */ e(it, { children: /* @__PURE__ */ x(kt, { gap: "md", h: "100%", children: [
1905
+ _ && /* @__PURE__ */ e(se, { justify: "flex-end", children: _ }),
1885
1906
  /* @__PURE__ */ e(
1886
- St,
1907
+ Tt,
1887
1908
  {
1888
- dataSource: y,
1909
+ dataSource: J,
1889
1910
  height: te,
1890
- rowHeight: O,
1911
+ rowHeight: K,
1891
1912
  withBorder: !0,
1892
1913
  striped: !0,
1893
1914
  highlightOnHover: !0,
1894
- isLoading: at,
1895
- enableRowSelection: u === "multiple",
1915
+ isLoading: dt,
1916
+ enableRowSelection: h === "multiple",
1896
1917
  enableRowNumbers: !0,
1897
1918
  enableColumnFilterModes: !0,
1898
1919
  enableTopToolbar: !0,
1899
1920
  enableGlobalFilter: !0,
1900
- getRowId: lt,
1901
- onCellDoubleClick: it,
1902
- onSelectedRowsChanged: u === "multiple" ? xe : void 0,
1903
- onFilterModelChange: $e,
1921
+ getRowId: ct,
1922
+ onCellDoubleClick: lt,
1923
+ onSelectedRowsChanged: h === "multiple" ? Ue : void 0,
1924
+ onFilterModelChange: Ie,
1904
1925
  children: r
1905
1926
  }
1906
1927
  ),
1907
- R()
1928
+ me()
1908
1929
  ] }) }),
1909
- /* @__PURE__ */ e(rt, { size: "50px", children: /* @__PURE__ */ x(me, { justify: "space-between", align: "center", children: [
1930
+ /* @__PURE__ */ e(ot, { size: "50px", children: /* @__PURE__ */ x(ge, { justify: "space-between", align: "center", children: [
1910
1931
  /* @__PURE__ */ e(se, {}),
1911
1932
  /* @__PURE__ */ x(se, { gap: "md", children: [
1912
1933
  /* @__PURE__ */ e(
@@ -1914,12 +1935,12 @@ function ln(t, n) {
1914
1935
  {
1915
1936
  actionName: "confirm",
1916
1937
  actionDescription: "Confirmar seleção",
1917
- leftSection: /* @__PURE__ */ e(je, {}),
1918
- onClick: Le,
1919
- disabled: L.length === 0,
1920
- variant: ie ?? _.variant,
1938
+ leftSection: /* @__PURE__ */ e(qe, {}),
1939
+ onClick: je,
1940
+ disabled: z.length === 0,
1941
+ variant: ie ?? W.variant,
1921
1942
  color: "green",
1922
- children: K.okButton
1943
+ children: de.okButton
1923
1944
  }
1924
1945
  ),
1925
1946
  /* @__PURE__ */ e(
@@ -1927,11 +1948,11 @@ function ln(t, n) {
1927
1948
  {
1928
1949
  actionName: "cancel",
1929
1950
  actionDescription: "Cancelar seleção",
1930
- leftSection: /* @__PURE__ */ e(Te, {}),
1931
- onClick: ze,
1932
- variant: ie ?? _.variant,
1951
+ leftSection: /* @__PURE__ */ e(Pe, {}),
1952
+ onClick: De,
1953
+ variant: ie ?? W.variant,
1933
1954
  color: "red",
1934
- children: K.cancelButton
1955
+ children: de.cancelButton
1935
1956
  }
1936
1957
  )
1937
1958
  ] })
@@ -1942,47 +1963,47 @@ function ln(t, n) {
1942
1963
  }
1943
1964
  );
1944
1965
  }
1945
- const Tn = At(ln), xt = Ut(void 0);
1946
- function Bn({ children: t }) {
1947
- const [n, l] = W({}), h = Q((p, u) => {
1948
- l((v) => ({ ...v, [p]: u }));
1949
- }, []), r = Q((p) => {
1950
- l((u) => {
1951
- const v = { ...u };
1952
- return delete v[p], v;
1966
+ const Nn = St(cn), wt = qt(void 0);
1967
+ function Pn({ children: t }) {
1968
+ const [n, l] = O({}), f = Q((b, h) => {
1969
+ l((v) => ({ ...v, [b]: h }));
1970
+ }, []), r = Q((b) => {
1971
+ l((h) => {
1972
+ const v = { ...h };
1973
+ return delete v[b], v;
1953
1974
  });
1954
1975
  }, []), i = Q(() => {
1955
1976
  l({});
1956
- }, []), c = Q((p) => n[p], [n]);
1957
- return /* @__PURE__ */ e(xt.Provider, { value: { errors: n, setError: h, clearError: r, clearAll: i, getError: c }, children: t });
1977
+ }, []), c = Q((b) => n[b], [n]);
1978
+ return /* @__PURE__ */ e(wt.Provider, { value: { errors: n, setError: f, clearError: r, clearAll: i, getError: c }, children: t });
1958
1979
  }
1959
- function Vn() {
1960
- return Et(xt);
1980
+ function kn() {
1981
+ return Dt(wt);
1961
1982
  }
1962
- function Nn() {
1963
- const t = Et(xt);
1983
+ function Gn() {
1984
+ const t = Dt(wt);
1964
1985
  if (!t)
1965
1986
  throw new Error("useRequiredValidationErrors must be used within ValidationErrorsProvider");
1966
1987
  return t;
1967
1988
  }
1968
1989
  export {
1969
- wn as ArchbaseAdvancedSmartButton,
1970
- Re as ArchbaseConditionalSecurityWrapper,
1971
- An as ArchbaseFormModalTemplate,
1972
- Fn as ArchbaseFormTemplate,
1973
- En as ArchbaseGridTemplate,
1974
- Tn as ArchbaseLookupDataTemplate,
1975
- Sn as ArchbaseMasonryTemplate,
1976
- Rn as ArchbaseModalTemplate,
1977
- In as ArchbasePanelTemplate,
1978
- Dn as ArchbaseSearchTemplate,
1990
+ Rn as ArchbaseAdvancedSmartButton,
1991
+ Ee as ArchbaseConditionalSecurityWrapper,
1992
+ Sn as ArchbaseFormModalTemplate,
1993
+ En as ArchbaseFormTemplate,
1994
+ Dn as ArchbaseGridTemplate,
1995
+ Nn as ArchbaseLookupDataTemplate,
1996
+ Tn as ArchbaseMasonryTemplate,
1997
+ In as ArchbaseModalTemplate,
1998
+ Bn as ArchbasePanelTemplate,
1999
+ Vn as ArchbaseSearchTemplate,
1979
2000
  ee as ArchbaseSmartActionButton,
1980
- Dt as ArchbaseSpaceTemplate,
1981
- Bn as ValidationErrorsProvider,
1982
- vn as useArchbaseLookup,
1983
- yn as useConditionalSecurity,
2001
+ Vt as ArchbaseSpaceTemplate,
2002
+ Pn as ValidationErrorsProvider,
2003
+ Fn as useArchbaseLookup,
2004
+ An as useConditionalSecurity,
1984
2005
  Ae as useOptionalTemplateSecurity,
1985
- Nn as useRequiredValidationErrors,
1986
- xn as useTemplateSecurityAvailable,
1987
- Vn as useValidationErrors
2006
+ Gn as useRequiredValidationErrors,
2007
+ yn as useTemplateSecurityAvailable,
2008
+ kn as useValidationErrors
1988
2009
  };