@archbase/security-ui 4.0.35 → 4.0.37

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,13 +1,13 @@
1
- import { Modal as Fe, ScrollArea as ye, Stack as oe, Grid as D, Group as $, Button as U, Paper as Y, Box as He, Text as H, List as De, Checkbox as Je, Tooltip as se, ActionIcon as B, Flex as te, Space as sr, Input as he, useTree as Ze, useMantineColorScheme as Oe, TextInput as Qe, Tree as Ye, Badge as Se, Tabs as ie, RingProgress as Jr } from "@mantine/core";
2
- import { getI18nextInstance as t, ARCHBASE_IOC_API_TYPE as X, emit as ze, builder as Te, convertDateToISOString as Zr, processErrorMessage as Ae, getKeyByEnumValue as le, useArchbaseTheme as nr, useArchbaseValidator as Qr, useArchbaseTranslation as Yr, useValidationErrors as Xr, processDetailErrorMessage as Ie } from "@archbase/core";
3
- import { ArchbaseEdit as ee, ArchbaseNotifications as Q, ArchbasePasswordEdit as Kr, ArchbaseSelect as _r, ArchbaseCheckbox as xe, ArchbaseAvatarEdit as ea, ArchbaseAsyncSelect as ra, Columns as me, ArchbaseDataGridColumn as y, ArchbaseDataGrid as be, ArchbaseDialog as K } from "@archbase/components";
4
- import { useArchbaseV1V2Compatibility as ke, useArchbaseDataSourceListener as Xe, useArchbaseRemoteServiceApi as _, useArchbaseRemoteDataSource as Me, ArchbaseDataSource as aa, useArchbaseStore as ir, useArchbaseRemoteDataSourceV2 as we, useArchbaseDataSource as ta } from "@archbase/data";
5
- import { useState as M, useCallback as ge, useEffect as Re, forwardRef as oa, useMemo as pe, useRef as je } from "react";
6
- import { IconArrowRight as lr, IconArrowLeft as cr, IconChevronDown as Ke, IconBorderCornerSquare as _e, IconEye as $e, IconEdit as fe, IconTrashX as Ce, IconShieldCheckered as Le, IconPlus as Ee } from "@tabler/icons-react";
7
- import { UserGroupDto as er, SecurityType as k, UserDto as sa, GroupDto as na, ProfileDto as ia, ApiTokenDto as la } from "@archbase/security";
8
- import { DateTimePicker as ca } from "@mantine/dates";
9
- import { useFocusTrap as da, useDebouncedValue as rr } from "@mantine/hooks";
10
- import { ArchbaseSpaceFixed as ua, ArchbaseSpaceFill as ha, ArchbaseSpaceBottom as xa } from "@archbase/layout";
1
+ import { Modal as Fe, ScrollArea as ye, Stack as oe, Grid as z, Group as $, Button as M, Paper as Y, Box as He, Text as H, List as De, Checkbox as Je, Tooltip as se, ActionIcon as B, Flex as te, Space as sr, Input as he, useTree as Ze, useMantineColorScheme as Oe, TextInput as Qe, Tree as Ye, Badge as Se, Tabs as ie, RingProgress as Zr } from "@mantine/core";
2
+ import { getI18nextInstance as t, ARCHBASE_IOC_API_TYPE as X, emit as Ee, builder as Te, convertDateToISOString as Qr, processErrorMessage as Ae, getKeyByEnumValue as le, useArchbaseTheme as nr, useArchbaseValidator as Yr, useArchbaseTranslation as Xr, useValidationErrors as Kr, processDetailErrorMessage as ze } from "@archbase/core";
3
+ import { ArchbaseEdit as ee, ArchbaseNotifications as Q, ArchbasePasswordEdit as _r, ArchbaseSelect as ea, ArchbaseCheckbox as xe, ArchbaseAvatarEdit as ra, ArchbaseAsyncSelect as aa, Columns as me, ArchbaseDataGridColumn as f, ArchbaseDataGrid as be, ArchbaseDialog as K } from "@archbase/components";
4
+ import { useArchbaseV1V2Compatibility as ke, useArchbaseDataSourceListener as Xe, useArchbaseRemoteServiceApi as _, useArchbaseRemoteDataSource as Ue, ArchbaseDataSource as ta, useArchbaseStore as ir, useArchbaseRemoteDataSourceV2 as we, useArchbaseDataSource as oa } from "@archbase/data";
5
+ import { useState as U, useCallback as ge, useEffect as Re, forwardRef as sa, useMemo as pe, useRef as je } from "react";
6
+ import { IconArrowRight as lr, IconArrowLeft as cr, IconChevronDown as Ke, IconBorderCornerSquare as _e, IconEye as $e, IconEdit as fe, IconTrashX as Ce, IconShieldCheckered as Le, IconPlus as Ie } from "@tabler/icons-react";
7
+ import { UserGroupDto as er, SecurityType as R, UserDto as na, GroupDto as ia, ProfileDto as la, ApiTokenDto as ca } from "@archbase/security";
8
+ import { DateTimePicker as da } from "@mantine/dates";
9
+ import { useFocusTrap as ua, useDebouncedValue as rr } from "@mantine/hooks";
10
+ import { ArchbaseSpaceFixed as ha, ArchbaseSpaceFill as xa, ArchbaseSpaceBottom as pa } from "@archbase/layout";
11
11
  var Ve = { exports: {} }, ve = {};
12
12
  /**
13
13
  * @license React
@@ -19,54 +19,54 @@ var Ve = { exports: {} }, ve = {};
19
19
  * LICENSE file in the root directory of this source tree.
20
20
  */
21
21
  var ar;
22
- function pa() {
22
+ function fa() {
23
23
  if (ar)
24
24
  return ve;
25
25
  ar = 1;
26
- var r = Symbol.for("react.transitional.element"), h = Symbol.for("react.fragment");
27
- function w(d, l, f) {
26
+ var r = Symbol.for("react.transitional.element"), u = Symbol.for("react.fragment");
27
+ function w(l, c, m) {
28
28
  var S = null;
29
- if (f !== void 0 && (S = "" + f), l.key !== void 0 && (S = "" + l.key), "key" in l) {
30
- f = {};
31
- for (var u in l)
32
- u !== "key" && (f[u] = l[u]);
29
+ if (m !== void 0 && (S = "" + m), c.key !== void 0 && (S = "" + c.key), "key" in c) {
30
+ m = {};
31
+ for (var h in c)
32
+ h !== "key" && (m[h] = c[h]);
33
33
  } else
34
- f = l;
35
- return l = f.ref, {
34
+ m = c;
35
+ return c = m.ref, {
36
36
  $$typeof: r,
37
- type: d,
37
+ type: l,
38
38
  key: S,
39
- ref: l !== void 0 ? l : null,
40
- props: f
39
+ ref: c !== void 0 ? c : null,
40
+ props: m
41
41
  };
42
42
  }
43
- return ve.Fragment = h, ve.jsx = w, ve.jsxs = w, ve;
43
+ return ve.Fragment = u, ve.jsx = w, ve.jsxs = w, ve;
44
44
  }
45
45
  var tr;
46
- function fa() {
47
- return tr || (tr = 1, Ve.exports = pa()), Ve.exports;
46
+ function ma() {
47
+ return tr || (tr = 1, Ve.exports = fa()), Ve.exports;
48
48
  }
49
- var e = fa();
50
- const ma = (r) => {
51
- const h = { ...r.options ?? {} }, w = () => {
52
- r.onCustomSave ? r.onCustomSave(r.dataSource.getCurrentRecord(), (l) => {
53
- l && r.onAfterSave && r.onAfterSave(r.dataSource.getCurrentRecord()), r.onClickOk(r.dataSource.getCurrentRecord(), l);
49
+ var e = ma();
50
+ const ba = (r) => {
51
+ const u = { ...r.options ?? {} }, w = () => {
52
+ r.onCustomSave ? r.onCustomSave(r.dataSource.getCurrentRecord(), (c) => {
53
+ c && r.onAfterSave && r.onAfterSave(r.dataSource.getCurrentRecord()), r.onClickOk(r.dataSource.getCurrentRecord(), c);
54
54
  }) : r.onClickOk(r.dataSource.getCurrentRecord(), !0);
55
- }, d = () => {
55
+ }, l = () => {
56
56
  r.onClickCancel(r.dataSource.getCurrentRecord());
57
57
  };
58
58
  return /* @__PURE__ */ e.jsx(
59
59
  Fe,
60
60
  {
61
61
  opened: r.opened,
62
- onClose: d,
62
+ onClose: l,
63
63
  title: t().t("archbase:Perfil"),
64
64
  size: "60%",
65
65
  styles: { content: { maxWidth: 1e3 } },
66
66
  children: /* @__PURE__ */ e.jsx(ye, { style: { height: "460px" }, children: /* @__PURE__ */ e.jsxs(oe, { w: "98%", children: [
67
- h?.customContentBefore && h.customContentBefore(r.dataSource.getCurrentRecord()),
68
- /* @__PURE__ */ e.jsxs(D, { children: [
69
- /* @__PURE__ */ e.jsx(D.Col, { span: { base: 12, md: 12, lg: 12 }, children: /* @__PURE__ */ e.jsx(
67
+ u?.customContentBefore && u.customContentBefore(r.dataSource.getCurrentRecord()),
68
+ /* @__PURE__ */ e.jsxs(z, { children: [
69
+ /* @__PURE__ */ e.jsx(z.Col, { span: { base: 12, md: 12, lg: 12 }, children: /* @__PURE__ */ e.jsx(
70
70
  ee,
71
71
  {
72
72
  label: `${t().t("archbase:Nome do perfil")}`,
@@ -75,7 +75,7 @@ const ma = (r) => {
75
75
  dataField: "name"
76
76
  }
77
77
  ) }),
78
- /* @__PURE__ */ e.jsx(D.Col, { span: { base: 12, md: 12, lg: 12 }, children: /* @__PURE__ */ e.jsx(
78
+ /* @__PURE__ */ e.jsx(z.Col, { span: { base: 12, md: 12, lg: 12 }, children: /* @__PURE__ */ e.jsx(
79
79
  ee,
80
80
  {
81
81
  label: `${t().t("archbase:Descrição do perfil")}`,
@@ -85,24 +85,24 @@ const ma = (r) => {
85
85
  }
86
86
  ) })
87
87
  ] }),
88
- h?.customContentAfter && h.customContentAfter(r.dataSource.getCurrentRecord()),
88
+ u?.customContentAfter && u.customContentAfter(r.dataSource.getCurrentRecord()),
89
89
  /* @__PURE__ */ e.jsxs($, { justify: "flex-end", mt: "md", children: [
90
- /* @__PURE__ */ e.jsx(U, { variant: "default", onClick: d, children: t().t("archbase:Cancelar") }),
91
- /* @__PURE__ */ e.jsx(U, { onClick: w, children: t().t("archbase:Salvar") })
90
+ /* @__PURE__ */ e.jsx(M, { variant: "default", onClick: l, children: t().t("archbase:Cancelar") }),
91
+ /* @__PURE__ */ e.jsx(M, { onClick: w, children: t().t("archbase:Salvar") })
92
92
  ] })
93
93
  ] }) })
94
94
  }
95
95
  );
96
96
  };
97
- function ba({
97
+ function ga({
98
98
  availableItemsDS: r,
99
- assignedItemsDS: h,
99
+ assignedItemsDS: u,
100
100
  idFieldAvailable: w,
101
- labelFieldAvailable: d,
102
- idFieldAssigned: l,
103
- labelFieldAssigned: f,
101
+ labelFieldAvailable: l,
102
+ idFieldAssigned: c,
103
+ labelFieldAssigned: m,
104
104
  handleCreateAssociationObject: S,
105
- width: u = "400px",
105
+ width: h = "400px",
106
106
  height: P = "200px",
107
107
  titleAvailable: p = "Disponíveis",
108
108
  titleAssigned: C = "Selecionados"
@@ -115,41 +115,41 @@ function ba({
115
115
  );
116
116
  const i = ke(
117
117
  "ArchbaseDualListSelector-Assigned",
118
- h,
118
+ u,
119
119
  void 0,
120
120
  []
121
- ), [c, L] = M([]), [b, re] = M([]), [J, ae] = M([]), [Z, F] = M([]), N = ge(() => {
122
- r && L(r.browseRecords()), h && re(h.browseRecords());
123
- }, [r, h]);
121
+ ), [d, L] = U([]), [g, re] = U([]), [J, ae] = U([]), [Z, D] = U([]), N = ge(() => {
122
+ r && L(r.browseRecords()), u && re(u.browseRecords());
123
+ }, [r, u]);
124
124
  Xe({
125
125
  dataSource: r,
126
126
  listener: () => N()
127
127
  }), Xe({
128
- dataSource: h,
128
+ dataSource: u,
129
129
  listener: () => N()
130
130
  }), Re(() => {
131
131
  N();
132
132
  }, [N]);
133
- const I = (x, g) => typeof g == "function" ? g(x) : x[g], q = (x, g) => typeof g == "function" ? g(x) : x[g], o = (x, g) => {
134
- x((m) => m.includes(g) ? m.filter((ce) => ce !== g) : [...m, g]);
135
- }, R = () => {
133
+ const I = (x, j) => typeof j == "function" ? j(x) : x[j], q = (x, j) => typeof j == "function" ? j(x) : x[j], o = (x, j) => {
134
+ x((b) => b.includes(j) ? b.filter((ce) => ce !== j) : [...b, j]);
135
+ }, F = () => {
136
136
  J.forEach((x) => {
137
- const g = c.find((m) => I(m, w) === x);
138
- if (g) {
139
- const m = S(g);
140
- i.isDataSourceV2 ? (h.insert(m), h.save()) : (h.insert(m), h.save(), i.v1State.forceUpdate());
137
+ const j = d.find((b) => I(b, w) === x);
138
+ if (j) {
139
+ const b = S(j);
140
+ i.isDataSourceV2 ? (u.insert(b), u.save()) : (u.insert(b), u.save(), i.v1State.forceUpdate());
141
141
  }
142
142
  }), ae([]);
143
143
  }, W = () => {
144
144
  Z.forEach((x) => {
145
- const g = b.find((m) => I(m, l) === x);
146
- if (g) {
147
- const m = typeof l == "function" ? { customId: l(g) } : { [l]: x };
148
- i.isDataSourceV2 ? h.remove(() => h.locate(m)) : (h.remove(() => h.locate(m)), i.v1State.forceUpdate());
145
+ const j = g.find((b) => I(b, c) === x);
146
+ if (j) {
147
+ const b = typeof c == "function" ? { customId: c(j) } : { [c]: x };
148
+ i.isDataSourceV2 ? u.remove(() => u.locate(b)) : (u.remove(() => u.locate(b)), i.v1State.forceUpdate());
149
149
  }
150
- }), F([]);
150
+ }), D([]);
151
151
  };
152
- return /* @__PURE__ */ e.jsxs(Y, { withBorder: !0, style: { display: "flex", width: u, height: P }, children: [
152
+ return /* @__PURE__ */ e.jsxs(Y, { withBorder: !0, style: { display: "flex", width: h, height: P }, children: [
153
153
  /* @__PURE__ */ e.jsxs(He, { style: { minWidth: "44%", minHeight: P }, children: [
154
154
  /* @__PURE__ */ e.jsx(H, { children: p }),
155
155
  /* @__PURE__ */ e.jsx(
@@ -165,14 +165,14 @@ function ba({
165
165
  overflowX: "hidden",
166
166
  height: "calc(100% - 32px)"
167
167
  },
168
- children: c.map((x) => /* @__PURE__ */ e.jsx(De.Item, { children: /* @__PURE__ */ e.jsx(
168
+ children: d.map((x) => /* @__PURE__ */ e.jsx(De.Item, { children: /* @__PURE__ */ e.jsx(
169
169
  Je,
170
170
  {
171
- label: q(x, d),
171
+ label: q(x, l),
172
172
  checked: J.includes(I(x, w)),
173
173
  onChange: () => o(ae, I(x, w)),
174
- disabled: b.some(
175
- (g) => I(g, l) === I(x, w)
174
+ disabled: g.some(
175
+ (j) => I(j, c) === I(x, w)
176
176
  )
177
177
  }
178
178
  ) }, I(x, w)))
@@ -180,7 +180,7 @@ function ba({
180
180
  )
181
181
  ] }),
182
182
  /* @__PURE__ */ e.jsxs(oe, { gap: 5, style: { minWidth: "10%" }, justify: "center", align: "center", children: [
183
- /* @__PURE__ */ e.jsx(se, { label: "Adicionar", children: /* @__PURE__ */ e.jsx(B, { onClick: R, disabled: !J.length, children: /* @__PURE__ */ e.jsx(lr, {}) }) }),
183
+ /* @__PURE__ */ e.jsx(se, { label: "Adicionar", children: /* @__PURE__ */ e.jsx(B, { onClick: F, disabled: !J.length, children: /* @__PURE__ */ e.jsx(lr, {}) }) }),
184
184
  /* @__PURE__ */ e.jsx(se, { label: "Remover", children: /* @__PURE__ */ e.jsx(B, { onClick: W, disabled: !Z.length, children: /* @__PURE__ */ e.jsx(cr, {}) }) })
185
185
  ] }),
186
186
  /* @__PURE__ */ e.jsxs(He, { style: { minWidth: "44%", minHeight: P }, children: [
@@ -198,25 +198,25 @@ function ba({
198
198
  overflowX: "hidden",
199
199
  height: "calc(100% - 32px)"
200
200
  },
201
- children: b.map((x) => /* @__PURE__ */ e.jsx(De.Item, { children: /* @__PURE__ */ e.jsx(
201
+ children: g.map((x) => /* @__PURE__ */ e.jsx(De.Item, { children: /* @__PURE__ */ e.jsx(
202
202
  Je,
203
203
  {
204
- label: q(x, f),
205
- checked: Z.includes(I(x, l)),
206
- onChange: () => o(F, I(x, l))
204
+ label: q(x, m),
205
+ checked: Z.includes(I(x, c)),
206
+ onChange: () => o(D, I(x, c))
207
207
  }
208
- ) }, I(x, l)))
208
+ ) }, I(x, c)))
209
209
  }
210
210
  )
211
211
  ] })
212
212
  ] });
213
213
  }
214
- const ga = oa(
215
- ({ image: r, label: h, description: w, origin: d, ...l }, f) => /* @__PURE__ */ e.jsx("div", { ref: f, ...l, children: /* @__PURE__ */ e.jsxs(te, { children: [
216
- /* @__PURE__ */ e.jsx(H, { size: "sm", fw: 600, children: d ? d.name : "" }),
214
+ const ja = sa(
215
+ ({ image: r, label: u, description: w, origin: l, ...c }, m) => /* @__PURE__ */ e.jsx("div", { ref: m, ...c, children: /* @__PURE__ */ e.jsxs(te, { children: [
216
+ /* @__PURE__ */ e.jsx(H, { size: "sm", fw: 600, children: l ? l.name : "" }),
217
217
  /* @__PURE__ */ e.jsx(sr, { w: "lg" })
218
218
  ] }) })
219
- ), ja = {
219
+ ), ya = {
220
220
  // Campos de identificação
221
221
  showNickname: !0,
222
222
  // Campos de perfil e grupos
@@ -235,27 +235,28 @@ const ga = oa(
235
235
  requiredNickname: !0,
236
236
  avatarMaxSizeKB: 2e3,
237
237
  avatarImageQuality: 1,
238
+ avatarMaxOutputSizePx: 512,
238
239
  allowEditEmail: !0
239
- }, ya = (r) => {
240
- const [h, w] = M(""), d = { ...ja, ...r.options ?? {} }, l = _(X.Group), { dataSource: f } = Me({
240
+ }, wa = (r) => {
241
+ const [u, w] = U(""), l = { ...ya, ...r.options ?? {} }, c = _(X.Group), { dataSource: m } = Ue({
241
242
  name: "dsGroups",
242
- service: l,
243
+ service: c,
243
244
  pageSize: 9999,
244
245
  loadOnStart: !0,
245
246
  sort: ["name:asc"],
246
- onError: (i, c) => {
247
- Q.showError(t().t("archbase:WARNING"), i, c);
247
+ onError: (i, d) => {
248
+ Q.showError(t().t("archbase:WARNING"), i, d);
248
249
  }
249
250
  });
250
251
  console.log("versão 12/05/2026");
251
- const S = _(X.Profile), { dataSource: u } = Me({
252
+ const S = _(X.Profile), { dataSource: h } = Ue({
252
253
  name: "dsProfiles",
253
254
  service: S,
254
255
  pageSize: 9999,
255
256
  loadOnStart: !0,
256
257
  sort: ["name:asc"],
257
- onError: (i, c) => {
258
- Q.showError(t().t("archbase:WARNING"), i, c);
258
+ onError: (i, d) => {
259
+ Q.showError(t().t("archbase:WARNING"), i, d);
259
260
  }
260
261
  });
261
262
  Re(() => {
@@ -263,13 +264,13 @@ const ga = oa(
263
264
  }, [r.dataSource.getFieldValue("password")]);
264
265
  const P = async () => {
265
266
  if (r.dataSource.isInserting()) {
266
- if (d.userDefaultProfile) {
267
- const i = ze(Te.eq("name", d.userDefaultProfile)), c = await S.findAllWithFilter(i, 0, 1);
268
- c && c.content.length > 0 && r.dataSource.setFieldValue("profile", c.content[0]);
267
+ if (l.userDefaultProfile) {
268
+ const i = Ee(Te.eq("name", l.userDefaultProfile)), d = await S.findAllWithFilter(i, 0, 1);
269
+ d && d.content.length > 0 && r.dataSource.setFieldValue("profile", d.content[0]);
269
270
  }
270
- if (d.userDefaultGroups) {
271
- const i = ze(Te.in("name", d.userDefaultGroups)), c = await l.findAllWithFilter(i, 0, 500);
272
- c && c.content.length > 0 && r.dataSource.setFieldValue("groups", c.content.map((L) => er.newInstance(L)));
271
+ if (l.userDefaultGroups) {
272
+ const i = Ee(Te.in("name", l.userDefaultGroups)), d = await c.findAllWithFilter(i, 0, 500);
273
+ d && d.content.length > 0 && r.dataSource.setFieldValue("groups", d.content.map((L) => er.newInstance(L)));
273
274
  }
274
275
  }
275
276
  };
@@ -282,8 +283,8 @@ const ga = oa(
282
283
  w(t().t("archbase:Informe a senha"));
283
284
  return;
284
285
  }
285
- r.onCustomSave ? r.onCustomSave(i, (c) => {
286
- c && r.onAfterSave && r.onAfterSave(i), r.onClickOk(i, c);
286
+ r.onCustomSave ? r.onCustomSave(i, (d) => {
287
+ d && r.onAfterSave && r.onAfterSave(i), r.onClickOk(i, d);
287
288
  }) : r.onClickOk(i, !0);
288
289
  }, C = () => {
289
290
  r.onClickCancel(r.dataSource.getCurrentRecord());
@@ -298,9 +299,9 @@ const ga = oa(
298
299
  styles: { content: { maxWidth: 1e3 } },
299
300
  children: [
300
301
  /* @__PURE__ */ e.jsx(ye, { style: { height: "500px" }, children: /* @__PURE__ */ e.jsxs(oe, { w: "98%", children: [
301
- d?.customContentBefore && /* @__PURE__ */ e.jsx(e.Fragment, { children: d.customContentBefore(r.dataSource.getCurrentRecord()) }),
302
- /* @__PURE__ */ e.jsxs(D, { children: [
303
- /* @__PURE__ */ e.jsx(D.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e.jsxs($, { children: [
302
+ l?.customContentBefore && /* @__PURE__ */ e.jsx(e.Fragment, { children: l.customContentBefore(r.dataSource.getCurrentRecord()) }),
303
+ /* @__PURE__ */ e.jsxs(z, { children: [
304
+ /* @__PURE__ */ e.jsx(z.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e.jsxs($, { children: [
304
305
  /* @__PURE__ */ e.jsx(
305
306
  ee,
306
307
  {
@@ -312,18 +313,18 @@ const ga = oa(
312
313
  width: "calc(100% - 208px)"
313
314
  }
314
315
  ),
315
- d.showNickname && /* @__PURE__ */ e.jsx(
316
+ l.showNickname && /* @__PURE__ */ e.jsx(
316
317
  ee,
317
318
  {
318
319
  label: `${t().t("archbase:Apelido")}`,
319
320
  placeholder: `${t().t("archbase:Apelido")}`,
320
321
  dataSource: r.dataSource,
321
322
  dataField: "nickname",
322
- required: d.requiredNickname
323
+ required: l.requiredNickname
323
324
  }
324
325
  )
325
326
  ] }) }),
326
- /* @__PURE__ */ e.jsx(D.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e.jsx(
327
+ /* @__PURE__ */ e.jsx(z.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e.jsx(
327
328
  ee,
328
329
  {
329
330
  label: `${t().t("archbase:Descrição do usuário")}`,
@@ -334,8 +335,8 @@ const ga = oa(
334
335
  }
335
336
  ) })
336
337
  ] }),
337
- /* @__PURE__ */ e.jsxs(D, { children: [
338
- /* @__PURE__ */ e.jsx(D.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e.jsx(
338
+ /* @__PURE__ */ e.jsxs(z, { children: [
339
+ /* @__PURE__ */ e.jsx(z.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e.jsx(
339
340
  ee,
340
341
  {
341
342
  label: `${t().t("archbase:E-mail")}`,
@@ -343,39 +344,39 @@ const ga = oa(
343
344
  dataSource: r.dataSource,
344
345
  onChangeValue: (i) => r.dataSource.setFieldValue("userName", i),
345
346
  dataField: "email",
346
- readOnly: r.dataSource.isEditing() ? !d.allowEditEmail : !1,
347
+ readOnly: r.dataSource.isEditing() ? !l.allowEditEmail : !1,
347
348
  required: !0
348
349
  }
349
350
  ) }),
350
- /* @__PURE__ */ e.jsx(D.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e.jsx(
351
- Kr,
351
+ /* @__PURE__ */ e.jsx(z.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e.jsx(
352
+ _r,
352
353
  {
353
354
  label: `${t().t("archbase:Senha usuário")}`,
354
355
  dataSource: r.dataSource,
355
356
  dataField: "password",
356
- error: h,
357
+ error: u,
357
358
  required: r.dataSource.getFieldValue("isNewUser")
358
359
  }
359
360
  ) })
360
361
  ] }),
361
- /* @__PURE__ */ e.jsx(D, { children: d.showProfile && /* @__PURE__ */ e.jsx(D.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e.jsx(
362
- _r,
362
+ /* @__PURE__ */ e.jsx(z, { children: l.showProfile && /* @__PURE__ */ e.jsx(z.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e.jsx(
363
+ ea,
363
364
  {
364
365
  label: `${t().t("archbase:Perfil do usuário")}`,
365
366
  dataSource: r.dataSource,
366
367
  dataField: "profile",
367
- options: u,
368
+ options: h,
368
369
  allowDeselect: !0,
369
370
  optionsLabelField: "nome",
370
- itemComponent: ga,
371
+ itemComponent: ja,
371
372
  getOptionLabel: (i) => i.name,
372
373
  getOptionValue: (i) => i.id
373
374
  }
374
375
  ) }) }),
375
- /* @__PURE__ */ e.jsxs(D, { children: [
376
- /* @__PURE__ */ e.jsx(D.Col, { span: { base: 12 }, children: d.showAccountConfigLabel && /* @__PURE__ */ e.jsx(H, { fz: 14, fw: 500, children: "Informe" }) }),
377
- /* @__PURE__ */ e.jsx(D.Col, { span: { base: 12, md: 4, lg: 4 }, children: /* @__PURE__ */ e.jsxs(oe, { gap: "lg", children: [
378
- d.showChangePasswordOnNextLogin && /* @__PURE__ */ e.jsx(he.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
376
+ /* @__PURE__ */ e.jsxs(z, { children: [
377
+ /* @__PURE__ */ e.jsx(z.Col, { span: { base: 12 }, children: l.showAccountConfigLabel && /* @__PURE__ */ e.jsx(H, { fz: 14, fw: 500, children: "Informe" }) }),
378
+ /* @__PURE__ */ e.jsx(z.Col, { span: { base: 12, md: 4, lg: 4 }, children: /* @__PURE__ */ e.jsxs(oe, { gap: "lg", children: [
379
+ l.showChangePasswordOnNextLogin && /* @__PURE__ */ e.jsx(he.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
379
380
  xe,
380
381
  {
381
382
  dataSource: r.dataSource,
@@ -383,7 +384,7 @@ const ga = oa(
383
384
  label: `${t().t("archbase:Deve alterar senha próximo login ?")}`
384
385
  }
385
386
  ) }),
386
- d.showAllowPasswordChange && /* @__PURE__ */ e.jsx(he.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
387
+ l.showAllowPasswordChange && /* @__PURE__ */ e.jsx(he.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
387
388
  xe,
388
389
  {
389
390
  dataSource: r.dataSource,
@@ -391,7 +392,7 @@ const ga = oa(
391
392
  label: `${t().t("archbase:Pode alterar a senha ?")}`
392
393
  }
393
394
  ) }),
394
- d.showPasswordNeverExpires && /* @__PURE__ */ e.jsx(he.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
395
+ l.showPasswordNeverExpires && /* @__PURE__ */ e.jsx(he.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
395
396
  xe,
396
397
  {
397
398
  dataSource: r.dataSource,
@@ -400,8 +401,8 @@ const ga = oa(
400
401
  }
401
402
  ) })
402
403
  ] }) }),
403
- /* @__PURE__ */ e.jsx(D.Col, { span: { base: 12, md: 4, lg: 4 }, children: /* @__PURE__ */ e.jsxs(oe, { gap: "lg", children: [
404
- d.showAccountDeactivated && /* @__PURE__ */ e.jsx(he.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
404
+ /* @__PURE__ */ e.jsx(z.Col, { span: { base: 12, md: 4, lg: 4 }, children: /* @__PURE__ */ e.jsxs(oe, { gap: "lg", children: [
405
+ l.showAccountDeactivated && /* @__PURE__ */ e.jsx(he.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
405
406
  xe,
406
407
  {
407
408
  dataSource: r.dataSource,
@@ -409,7 +410,7 @@ const ga = oa(
409
410
  label: `${t().t("archbase:Conta desativada ?")}`
410
411
  }
411
412
  ) }),
412
- d.showAccountLocked && /* @__PURE__ */ e.jsx(he.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
413
+ l.showAccountLocked && /* @__PURE__ */ e.jsx(he.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
413
414
  xe,
414
415
  {
415
416
  dataSource: r.dataSource,
@@ -417,7 +418,7 @@ const ga = oa(
417
418
  label: `${t().t("archbase:Conta bloqueada ?")}`
418
419
  }
419
420
  ) }),
420
- d.showIsAdministrator && /* @__PURE__ */ e.jsx(he.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
421
+ l.showIsAdministrator && /* @__PURE__ */ e.jsx(he.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
421
422
  xe,
422
423
  {
423
424
  dataSource: r.dataSource,
@@ -426,27 +427,28 @@ const ga = oa(
426
427
  }
427
428
  ) })
428
429
  ] }) }),
429
- /* @__PURE__ */ e.jsx(D.Col, { span: { base: 12, md: 4, lg: 4 }, children: /* @__PURE__ */ e.jsx(oe, { gap: "lg", children: /* @__PURE__ */ e.jsx(
430
- ea,
430
+ /* @__PURE__ */ e.jsx(z.Col, { span: { base: 12, md: 4, lg: 4 }, children: /* @__PURE__ */ e.jsx(oe, { gap: "lg", children: /* @__PURE__ */ e.jsx(
431
+ ra,
431
432
  {
432
433
  label: t().t("archbase:Foto do usuário"),
433
434
  dataSource: r.dataSource,
434
435
  dataField: "avatar",
435
436
  width: 120,
436
437
  height: 120,
437
- maxSizeKB: d.avatarMaxSizeKB,
438
- imageQuality: d.avatarImageQuality
438
+ maxSizeKB: l.avatarMaxSizeKB,
439
+ imageQuality: l.avatarImageQuality,
440
+ maxOutputSizePx: l.avatarMaxOutputSizePx
439
441
  }
440
442
  ) }) })
441
443
  ] }),
442
- d.showGroups && /* @__PURE__ */ e.jsxs(D, { children: [
443
- /* @__PURE__ */ e.jsx(D.Col, { span: { base: 12 }, children: /* @__PURE__ */ e.jsx(H, { fz: 14, fw: 500, children: "Grupos" }) }),
444
- /* @__PURE__ */ e.jsx(D.Col, { span: { base: 12 }, children: /* @__PURE__ */ e.jsx(
445
- ba,
444
+ l.showGroups && /* @__PURE__ */ e.jsxs(z, { children: [
445
+ /* @__PURE__ */ e.jsx(z.Col, { span: { base: 12 }, children: /* @__PURE__ */ e.jsx(H, { fz: 14, fw: 500, children: "Grupos" }) }),
446
+ /* @__PURE__ */ e.jsx(z.Col, { span: { base: 12 }, children: /* @__PURE__ */ e.jsx(
447
+ ga,
446
448
  {
447
449
  titleAvailable: t().t("archbase:Disponíveis"),
448
450
  titleAssigned: t().t("archbase:Selecionados"),
449
- assignedItemsDS: new aa("dsDualList", {
451
+ assignedItemsDS: new ta("dsDualList", {
450
452
  records: r.dataSource.getFieldValue("groups"),
451
453
  grandTotalRecords: r.dataSource.getFieldValue("groups").length,
452
454
  currentPage: 0,
@@ -455,7 +457,7 @@ const ga = oa(
455
457
  }),
456
458
  width: "100%",
457
459
  height: "200px",
458
- availableItemsDS: f,
460
+ availableItemsDS: m,
459
461
  handleCreateAssociationObject: (i) => er.newInstance(i),
460
462
  idFieldAssigned: (i) => i && i.group ? i.group.id : "",
461
463
  idFieldAvailable: "id",
@@ -464,36 +466,36 @@ const ga = oa(
464
466
  }
465
467
  ) })
466
468
  ] }),
467
- d?.customContentAfter && /* @__PURE__ */ e.jsx(e.Fragment, { children: d.customContentAfter(r.dataSource.getCurrentRecord()) }),
469
+ l?.customContentAfter && /* @__PURE__ */ e.jsx(e.Fragment, { children: l.customContentAfter(r.dataSource.getCurrentRecord()) }),
468
470
  /* @__PURE__ */ e.jsx(sr, { h: "12px" })
469
471
  ] }) }),
470
472
  /* @__PURE__ */ e.jsxs($, { justify: "flex-end", mt: "md", children: [
471
- /* @__PURE__ */ e.jsx(U, { variant: "default", onClick: C, children: t().t("archbase:Cancelar") }),
472
- /* @__PURE__ */ e.jsx(U, { onClick: p, children: t().t("archbase:Salvar") })
473
+ /* @__PURE__ */ e.jsx(M, { variant: "default", onClick: C, children: t().t("archbase:Cancelar") }),
474
+ /* @__PURE__ */ e.jsx(M, { onClick: p, children: t().t("archbase:Salvar") })
473
475
  ] })
474
476
  ]
475
477
  }
476
478
  );
477
- }, wa = (r) => {
478
- const h = { ...r.options ?? {} }, w = () => {
479
- r.onCustomSave ? r.onCustomSave(r.dataSource.getCurrentRecord(), (l) => {
480
- l && r.onAfterSave && r.onAfterSave(r.dataSource.getCurrentRecord()), r.onClickOk(r.dataSource.getCurrentRecord(), l);
479
+ }, va = (r) => {
480
+ const u = { ...r.options ?? {} }, w = () => {
481
+ r.onCustomSave ? r.onCustomSave(r.dataSource.getCurrentRecord(), (c) => {
482
+ c && r.onAfterSave && r.onAfterSave(r.dataSource.getCurrentRecord()), r.onClickOk(r.dataSource.getCurrentRecord(), c);
481
483
  }) : r.onClickOk(r.dataSource.getCurrentRecord(), !0);
482
- }, d = () => {
484
+ }, l = () => {
483
485
  r.onClickCancel(r.dataSource.getCurrentRecord());
484
486
  };
485
487
  return /* @__PURE__ */ e.jsx(
486
488
  Fe,
487
489
  {
488
490
  opened: r.opened,
489
- onClose: d,
491
+ onClose: l,
490
492
  title: t().t("archbase:Grupo"),
491
493
  size: "60%",
492
494
  styles: { content: { maxWidth: 1e3 } },
493
495
  children: /* @__PURE__ */ e.jsx(ye, { style: { height: "460px" }, children: /* @__PURE__ */ e.jsxs(oe, { w: "98%", children: [
494
- h?.customContentBefore && h.customContentBefore(r.dataSource.getCurrentRecord()),
495
- /* @__PURE__ */ e.jsxs(D, { children: [
496
- /* @__PURE__ */ e.jsx(D.Col, { span: { base: 12 }, children: /* @__PURE__ */ e.jsx(
496
+ u?.customContentBefore && u.customContentBefore(r.dataSource.getCurrentRecord()),
497
+ /* @__PURE__ */ e.jsxs(z, { children: [
498
+ /* @__PURE__ */ e.jsx(z.Col, { span: { base: 12 }, children: /* @__PURE__ */ e.jsx(
497
499
  ee,
498
500
  {
499
501
  label: `${t().t("archbase:Nome do grupo")}`,
@@ -502,7 +504,7 @@ const ga = oa(
502
504
  dataField: "name"
503
505
  }
504
506
  ) }),
505
- /* @__PURE__ */ e.jsx(D.Col, { span: { base: 12 }, children: /* @__PURE__ */ e.jsx(
507
+ /* @__PURE__ */ e.jsx(z.Col, { span: { base: 12 }, children: /* @__PURE__ */ e.jsx(
506
508
  ee,
507
509
  {
508
510
  label: `${t().t("archbase:Descrição do grupo")}`,
@@ -512,47 +514,47 @@ const ga = oa(
512
514
  }
513
515
  ) })
514
516
  ] }),
515
- h?.customContentAfter && h.customContentAfter(r.dataSource.getCurrentRecord()),
517
+ u?.customContentAfter && u.customContentAfter(r.dataSource.getCurrentRecord()),
516
518
  /* @__PURE__ */ e.jsxs($, { justify: "flex-end", mt: "md", children: [
517
- /* @__PURE__ */ e.jsx(U, { variant: "default", onClick: d, children: t().t("archbase:Cancelar") }),
518
- /* @__PURE__ */ e.jsx(U, { onClick: w, children: t().t("archbase:Salvar") })
519
+ /* @__PURE__ */ e.jsx(M, { variant: "default", onClick: l, children: t().t("archbase:Cancelar") }),
520
+ /* @__PURE__ */ e.jsx(M, { onClick: w, children: t().t("archbase:Salvar") })
519
521
  ] })
520
522
  ] }) })
521
523
  }
522
524
  );
523
- }, va = ({ image: r, label: h, description: w, ...d }) => /* @__PURE__ */ e.jsx("div", { ...d, children: /* @__PURE__ */ e.jsxs($, { grow: !0, children: [
525
+ }, Ca = ({ image: r, label: u, description: w, ...l }) => /* @__PURE__ */ e.jsx("div", { ...l, children: /* @__PURE__ */ e.jsxs($, { grow: !0, children: [
524
526
  /* @__PURE__ */ e.jsx("img", { style: { maxWidth: "32px" }, src: r }),
525
527
  /* @__PURE__ */ e.jsxs("div", { children: [
526
- /* @__PURE__ */ e.jsx(H, { size: "sm", children: h }),
528
+ /* @__PURE__ */ e.jsx(H, { size: "sm", children: u }),
527
529
  /* @__PURE__ */ e.jsx(H, { size: "xs", opacity: 0.65, children: w })
528
530
  ] })
529
- ] }) }), Ca = (r) => {
530
- da();
531
- const [h, w] = M(), d = _(X.User), l = ke(
531
+ ] }) }), Sa = (r) => {
532
+ ua();
533
+ const [u, w] = U(), l = _(X.User), c = ke(
532
534
  "ApiTokenModal",
533
535
  r.dataSource,
534
536
  "expirationDate",
535
537
  ""
536
- ), f = (p) => {
538
+ ), m = (p) => {
537
539
  if (!p)
538
- l.handleValueChange(void 0);
540
+ c.handleValueChange(void 0);
539
541
  else {
540
- const C = typeof p == "string" ? new Date(p) : p, i = Zr(C);
541
- l.handleValueChange(i);
542
+ const C = typeof p == "string" ? new Date(p) : p, i = Qr(C);
543
+ c.handleValueChange(i);
542
544
  }
543
545
  w(p);
544
- }, S = async (p, C) => new Promise(async (i, c) => {
546
+ }, S = async (p, C) => new Promise(async (i, d) => {
545
547
  try {
546
- const L = ze(Te.or(Te.eq("name", `^*${C.trim()}*`))), b = await d.findAllWithFilter(L, p, 20);
548
+ const L = Ee(Te.or(Te.eq("name", `^*${C.trim()}*`))), g = await l.findAllWithFilter(L, p, 20);
547
549
  i({
548
- options: b.content,
549
- page: b.pageable.pageNumber,
550
- totalPages: b.totalPages
550
+ options: g.content,
551
+ page: g.pageable.pageNumber,
552
+ totalPages: g.totalPages
551
553
  });
552
554
  } catch (L) {
553
- c(Ae(L));
555
+ d(Ae(L));
554
556
  }
555
- }), u = () => {
557
+ }), h = () => {
556
558
  r.onCustomSave ? r.onCustomSave(r.dataSource.current, (p) => {
557
559
  p && r.onAfterSave && r.onAfterSave(r.dataSource.current), r.onClickOk(r.dataSource.current, p);
558
560
  }) : r.onClickOk(r.dataSource.current, !0);
@@ -587,17 +589,17 @@ const ga = oa(
587
589
  }
588
590
  ),
589
591
  /* @__PURE__ */ e.jsx(
590
- ca,
592
+ da,
591
593
  {
592
594
  withSeconds: !0,
593
- value: h,
594
- onChange: f,
595
+ value: u,
596
+ onChange: m,
595
597
  label: "Data/hora expiração",
596
598
  placeholder: "Selecione a data de expiração"
597
599
  }
598
600
  ),
599
601
  /* @__PURE__ */ e.jsx(
600
- ra,
602
+ aa,
601
603
  {
602
604
  label: `${t().t("archbase:Usuário")}`,
603
605
  dataSource: r.dataSource,
@@ -608,23 +610,23 @@ const ga = oa(
608
610
  getOptions: S,
609
611
  debounceTime: 500,
610
612
  minCharsToSearch: 1,
611
- itemComponent: va
613
+ itemComponent: Ca
612
614
  }
613
615
  )
614
616
  ] }),
615
617
  /* @__PURE__ */ e.jsxs($, { justify: "flex-end", mt: "md", children: [
616
- /* @__PURE__ */ e.jsx(U, { variant: "default", onClick: P, children: t().t("archbase:Cancelar") }),
617
- /* @__PURE__ */ e.jsx(U, { onClick: u, children: t().t("archbase:Salvar") })
618
+ /* @__PURE__ */ e.jsx(M, { variant: "default", onClick: P, children: t().t("archbase:Cancelar") }),
619
+ /* @__PURE__ */ e.jsx(M, { onClick: h, children: t().t("archbase:Salvar") })
618
620
  ] })
619
621
  ]
620
622
  }
621
623
  );
622
624
  }, or = (r) => {
623
- const h = "->";
624
- return r.includes(h) ? r.split(h).map((l) => l.trim()).map((l) => t().t(l)).join(` ${h} `) : t().t(r);
625
+ const u = "->";
626
+ return r.includes(u) ? r.split(u).map((c) => c.trim()).map((c) => t().t(c)).join(` ${u} `) : t().t(r);
625
627
  };
626
- function Ue({ dataSource: r, opened: h, close: w }) {
627
- const d = pe(() => r?.getFieldValue("name") || "", [r]), l = pe(() => r?.getFieldValue("id") || "", [r]), f = pe(() => r?.getFieldValue("type") || "", [r]), S = Ze(), u = Ze(), [P, p] = M([]), [C, i] = M([]), [c, L] = M(), [b, re] = M(), [J, ae] = M(""), [Z] = rr(J, 200), [F, N] = M(""), [I] = rr(F, 200), q = _(X.Resource), { colorScheme: o } = Oe(), R = o === "dark" ? "var(--mantine-primary-color-7)" : "var(--mantine-primary-color-4)", W = pe(() => C.sort((s, n) => s.resourceDescription.localeCompare(n.resourceDescription)).map((s) => ({
628
+ function Me({ dataSource: r, opened: u, close: w }) {
629
+ const l = pe(() => r?.getFieldValue("name") || "", [r]), c = pe(() => r?.getFieldValue("id") || "", [r]), m = pe(() => r?.getFieldValue("type") || "", [r]), S = Ze(), h = Ze(), [P, p] = U([]), [C, i] = U([]), [d, L] = U(), [g, re] = U(), [J, ae] = U(""), [Z] = rr(J, 200), [D, N] = U(""), [I] = rr(D, 200), q = _(X.Resource), { colorScheme: o } = Oe(), F = o === "dark" ? "var(--mantine-primary-color-7)" : "var(--mantine-primary-color-4)", W = pe(() => C.sort((s, n) => s.resourceDescription.localeCompare(n.resourceDescription)).map((s) => ({
628
630
  value: s.resourceId,
629
631
  label: s.resourceDescription,
630
632
  children: s.permissions.filter((n) => n.actionDescription.toLowerCase().includes(I.toLowerCase())).sort((n, G) => n.actionDescription.localeCompare(G.actionDescription)).map((n) => ({
@@ -636,7 +638,7 @@ function Ue({ dataSource: r, opened: h, close: w }) {
636
638
  owner: s
637
639
  }
638
640
  }))
639
- })), [C, I]), x = pe(() => C.map((s) => s.permissions.map((n) => n.actionId)).flat(), [C]), g = pe(() => P.sort((s, n) => s.resourceDescription.localeCompare(n.resourceDescription)).map((s) => ({
641
+ })), [C, I]), x = pe(() => C.map((s) => s.permissions.map((n) => n.actionId)).flat(), [C]), j = pe(() => P.sort((s, n) => s.resourceDescription.localeCompare(n.resourceDescription)).map((s) => ({
640
642
  value: s.resourceId,
641
643
  label: s.resourceDescription,
642
644
  children: s.permissions.filter((n) => n.actionDescription.toLowerCase().includes(Z.toLowerCase())).sort((n, G) => n.actionDescription.localeCompare(G.actionDescription)).map((n) => {
@@ -645,42 +647,42 @@ function Ue({ dataSource: r, opened: h, close: w }) {
645
647
  value: n.actionId,
646
648
  label: n.actionDescription,
647
649
  nodeProps: {
648
- granted: x.includes(n.actionId) && G?.types?.includes(le(k, f)),
650
+ granted: x.includes(n.actionId) && G?.types?.includes(le(R, m)),
649
651
  owner: s
650
652
  }
651
653
  };
652
654
  })
653
- })), [P, C, x, f, Z]), m = ge(async () => {
654
- if (l) {
655
- const s = await q.getPermissionsBySecurityId(l, f), n = await q.getAllPermissionsAvailable();
655
+ })), [P, C, x, m, Z]), b = ge(async () => {
656
+ if (c) {
657
+ const s = await q.getPermissionsBySecurityId(c, m), n = await q.getAllPermissionsAvailable();
656
658
  p(n), i(s);
657
659
  }
658
- }, [l, f]), ce = ge(() => {
659
- c?.value && l && q.createPermission(l, c.value, f).then((s) => {
660
+ }, [c, m]), ce = ge(() => {
661
+ d?.value && c && q.createPermission(c, d.value, m).then((s) => {
660
662
  if (s) {
661
663
  i((E) => {
662
664
  let A;
663
- return E.map((j) => j.resourceId).includes(s.resourceId) ? A = E.map((j) => j.resourceId === s.resourceId ? j.permissions.map((T) => T.actionId).includes(c.value) ? {
664
- ...j,
665
- permissions: j.permissions.map(
666
- (T) => T.actionId === c.value ? {
665
+ return E.map((y) => y.resourceId).includes(s.resourceId) ? A = E.map((y) => y.resourceId === s.resourceId ? y.permissions.map((T) => T.actionId).includes(d.value) ? {
666
+ ...y,
667
+ permissions: y.permissions.map(
668
+ (T) => T.actionId === d.value ? {
667
669
  ...T,
668
670
  permissionId: s.permissionId,
669
- types: [...T.types ?? [], le(k, f)]
671
+ types: [...T.types ?? [], le(R, m)]
670
672
  } : T
671
673
  )
672
674
  } : {
673
- ...j,
675
+ ...y,
674
676
  permissions: [
675
- ...j.permissions ?? [],
677
+ ...y.permissions ?? [],
676
678
  {
677
679
  actionId: s.actionId,
678
680
  actionDescription: s.actionDescription,
679
681
  permissionId: s.permissionId,
680
- types: [le(k, f)]
682
+ types: [le(R, m)]
681
683
  }
682
684
  ]
683
- } : j) : A = [
685
+ } : y) : A = [
684
686
  ...E,
685
687
  {
686
688
  resourceId: s.resourceId,
@@ -690,45 +692,45 @@ function Ue({ dataSource: r, opened: h, close: w }) {
690
692
  actionId: s.actionId,
691
693
  actionDescription: s.actionDescription,
692
694
  permissionId: s.permissionId,
693
- types: [le(k, f)]
695
+ types: [le(R, m)]
694
696
  }
695
697
  ]
696
698
  }
697
699
  ], A;
698
700
  });
699
- const n = g.filter((E) => E.value === c?.nodeProps?.owner?.resourceId).map((E) => E.children).flat(), G = n.map((E) => E.value).indexOf(c.value), v = n.find((E, A) => !E?.nodeProps?.granted && E?.value !== c.value && (n.length > G + 1 ? A > G : !0));
700
- v?.value && S.select(v.value), u.expand(s.resourceId), L(v);
701
+ const n = j.filter((E) => E.value === d?.nodeProps?.owner?.resourceId).map((E) => E.children).flat(), G = n.map((E) => E.value).indexOf(d.value), v = n.find((E, A) => !E?.nodeProps?.granted && E?.value !== d.value && (n.length > G + 1 ? A > G : !0));
702
+ v?.value && S.select(v.value), h.expand(s.resourceId), L(v);
701
703
  }
702
704
  });
703
- }, [c, l, f, q, g, P, C, S, u]), ne = ge(() => {
704
- b?.nodeProps?.permissionId && q.deletePermission(b.nodeProps.permissionId).then(() => {
705
+ }, [d, c, m, q, j, P, C, S, h]), ne = ge(() => {
706
+ g?.nodeProps?.permissionId && q.deletePermission(g.nodeProps.permissionId).then(() => {
705
707
  i((v) => [...v].filter((A) => {
706
- let j = !0;
708
+ let y = !0;
707
709
  return A.permissions?.forEach((T) => {
708
- T.permissionId !== void 0 && T.permissionId === b?.nodeProps?.permissionId && A.permissions.length === 1 && T?.types?.length === 1 && T.types[0] === le(k, f) && (j = !1);
709
- }), j;
710
+ T.permissionId !== void 0 && T.permissionId === g?.nodeProps?.permissionId && A.permissions.length === 1 && T?.types?.length === 1 && T.types[0] === le(R, m) && (y = !1);
711
+ }), y;
710
712
  }).map((A) => {
711
- const j = b?.nodeProps?.owner;
712
- return A.resourceId === j.resourceId ? b?.nodeProps?.types?.length === 1 ? {
713
+ const y = g?.nodeProps?.owner;
714
+ return A.resourceId === y.resourceId ? g?.nodeProps?.types?.length === 1 ? {
713
715
  ...A,
714
- permissions: [...(A.permissions ?? []).filter((T) => T.permissionId !== b?.nodeProps?.permissionId)]
716
+ permissions: [...(A.permissions ?? []).filter((T) => T.permissionId !== g?.nodeProps?.permissionId)]
715
717
  } : {
716
718
  ...A,
717
- permissions: (A.permissions ?? []).map((T) => T.actionId === b.value ? {
719
+ permissions: (A.permissions ?? []).map((T) => T.actionId === g.value ? {
718
720
  actionId: T.actionId,
719
721
  actionDescription: T.actionDescription,
720
- types: [...T.types?.filter((de) => de && de !== le(k, f)) ?? []]
722
+ types: [...T.types?.filter((de) => de && de !== le(R, m)) ?? []]
721
723
  } : T)
722
724
  } : A;
723
725
  }));
724
- const s = W.filter((v) => v.value === b?.nodeProps?.owner?.resourceId).map((v) => v.children).flat(), n = s.map((v) => v.value).indexOf(b.value), G = s.find((v, E) => v?.nodeProps?.types.includes(le(k, f)) && v?.value !== b.value && (s.length > n + 1 ? E > n : !0));
725
- G?.value && u.select(G.value), re(G);
726
+ const s = W.filter((v) => v.value === g?.nodeProps?.owner?.resourceId).map((v) => v.children).flat(), n = s.map((v) => v.value).indexOf(g.value), G = s.find((v, E) => v?.nodeProps?.types.includes(le(R, m)) && v?.value !== g.value && (s.length > n + 1 ? E > n : !0));
727
+ G?.value && h.select(G.value), re(G);
726
728
  });
727
- }, [b, q, f, W, C, u]);
729
+ }, [g, q, m, W, C, h]);
728
730
  return Re(() => {
729
- h && r && (L(void 0), re(void 0), ae(""), N(""), u.collapseAllNodes(), S.collapseAllNodes(), m());
730
- }, [h, f, l, m]), r ? /* @__PURE__ */ e.jsx(Fe, { opened: h, onClose: w, title: `${t().t(`archbase:${f}`)}: ${d}`, size: "80%", styles: { root: { overflow: "hidden" } }, children: /* @__PURE__ */ e.jsxs(ua, { height: "540px", children: [
731
- /* @__PURE__ */ e.jsx(ha, { children: /* @__PURE__ */ e.jsx(Y, { withBorder: !0, my: 20, p: 20, style: { height: "calc(100% - 40px)", overflow: "hidden", display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ e.jsxs("div", { style: { flex: 1, display: "flex", flexDirection: "row", overflow: "hidden", minHeight: 0, gap: "8px" }, children: [
731
+ u && r && (L(void 0), re(void 0), ae(""), N(""), h.collapseAllNodes(), S.collapseAllNodes(), b());
732
+ }, [u, m, c, b]), r ? /* @__PURE__ */ e.jsx(Fe, { opened: u, onClose: w, title: `${t().t(`archbase:${m}`)}: ${l}`, size: "80%", styles: { root: { overflow: "hidden" } }, children: /* @__PURE__ */ e.jsxs(ha, { height: "540px", children: [
733
+ /* @__PURE__ */ e.jsx(xa, { children: /* @__PURE__ */ e.jsx(Y, { withBorder: !0, my: 20, p: 20, style: { height: "calc(100% - 40px)", overflow: "hidden", display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ e.jsxs("div", { style: { flex: 1, display: "flex", flexDirection: "row", overflow: "hidden", minHeight: 0, gap: "8px" }, children: [
732
734
  /* @__PURE__ */ e.jsxs("div", { style: { flex: 9, display: "flex", flexDirection: "column", overflow: "hidden", minHeight: 0 }, children: [
733
735
  /* @__PURE__ */ e.jsxs($, { mb: 20, children: [
734
736
  /* @__PURE__ */ e.jsx(H, { children: t().t("archbase:Available") }),
@@ -745,12 +747,12 @@ function Ue({ dataSource: r, opened: h, close: w }) {
745
747
  /* @__PURE__ */ e.jsx(ye, { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ e.jsx(
746
748
  Ye,
747
749
  {
748
- data: g,
750
+ data: j,
749
751
  selectOnClick: !0,
750
752
  allowRangeSelection: !1,
751
753
  tree: S,
752
754
  renderNode: ({ level: s, node: n, expanded: G, hasChildren: v, selected: E, elementProps: A }) => {
753
- const j = n?.nodeProps?.granted, T = j ? "dimmed" : void 0, de = j ? "line-through" : void 0, V = ge((Pe) => {
755
+ const y = n?.nodeProps?.granted, T = y ? "dimmed" : void 0, de = y ? "line-through" : void 0, V = ge((Pe) => {
754
756
  L(n), A.onClick(Pe);
755
757
  }, [n, A.onClick]);
756
758
  return /* @__PURE__ */ e.jsxs(
@@ -759,7 +761,7 @@ function Ue({ dataSource: r, opened: h, close: w }) {
759
761
  ml: v ? 0 : 5,
760
762
  gap: 5,
761
763
  ...A,
762
- bg: E && s === 2 ? R : "",
764
+ bg: E && s === 2 ? F : "",
763
765
  onClick: V,
764
766
  children: [
765
767
  v && /* @__PURE__ */ e.jsx(
@@ -792,8 +794,8 @@ function Ue({ dataSource: r, opened: h, close: w }) {
792
794
  ) })
793
795
  ] }),
794
796
  /* @__PURE__ */ e.jsx("div", { style: { flex: 2, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e.jsxs(oe, { gap: 5, align: "center", children: [
795
- /* @__PURE__ */ e.jsx(se, { label: t().t("archbase:Add"), children: /* @__PURE__ */ e.jsx(B, { onClick: ce, disabled: !c || c?.nodeProps?.granted || !c.nodeProps, children: /* @__PURE__ */ e.jsx(lr, {}) }) }),
796
- /* @__PURE__ */ e.jsx(se, { label: t().t("archbase:Remove"), children: /* @__PURE__ */ e.jsx(B, { onClick: ne, disabled: !b || !b?.nodeProps?.permissionId || !b.nodeProps, children: /* @__PURE__ */ e.jsx(cr, {}) }) })
797
+ /* @__PURE__ */ e.jsx(se, { label: t().t("archbase:Add"), children: /* @__PURE__ */ e.jsx(B, { onClick: ce, disabled: !d || d?.nodeProps?.granted || !d.nodeProps, children: /* @__PURE__ */ e.jsx(lr, {}) }) }),
798
+ /* @__PURE__ */ e.jsx(se, { label: t().t("archbase:Remove"), children: /* @__PURE__ */ e.jsx(B, { onClick: ne, disabled: !g || !g?.nodeProps?.permissionId || !g.nodeProps, children: /* @__PURE__ */ e.jsx(cr, {}) }) })
797
799
  ] }) }),
798
800
  /* @__PURE__ */ e.jsxs("div", { style: { flex: 9, display: "flex", flexDirection: "column", overflow: "hidden", minHeight: 0 }, children: [
799
801
  /* @__PURE__ */ e.jsxs($, { mb: 20, children: [
@@ -802,7 +804,7 @@ function Ue({ dataSource: r, opened: h, close: w }) {
802
804
  Qe,
803
805
  {
804
806
  size: "xs",
805
- value: F,
807
+ value: D,
806
808
  onChange: (s) => N(s.target.value),
807
809
  placeholder: t().t("archbase:Filter granted permissions")
808
810
  }
@@ -814,9 +816,9 @@ function Ue({ dataSource: r, opened: h, close: w }) {
814
816
  data: W,
815
817
  selectOnClick: !0,
816
818
  allowRangeSelection: !1,
817
- tree: u,
819
+ tree: h,
818
820
  renderNode: ({ level: s, node: n, expanded: G, hasChildren: v, selected: E, elementProps: A }) => {
819
- const j = ge((T) => {
821
+ const y = ge((T) => {
820
822
  re(n), A.onClick(T);
821
823
  }, [n, A.onClick]);
822
824
  return /* @__PURE__ */ e.jsxs(
@@ -825,8 +827,8 @@ function Ue({ dataSource: r, opened: h, close: w }) {
825
827
  ml: v ? 0 : 5,
826
828
  gap: 5,
827
829
  ...A,
828
- bg: E && s === 2 ? R : "",
829
- onClick: j,
830
+ bg: E && s === 2 ? F : "",
831
+ onClick: y,
830
832
  children: [
831
833
  v && /* @__PURE__ */ e.jsx(
832
834
  Ke,
@@ -854,22 +856,22 @@ function Ue({ dataSource: r, opened: h, close: w }) {
854
856
  ) })
855
857
  ] })
856
858
  ] }) }) }),
857
- /* @__PURE__ */ e.jsx(xa, { size: "40px", children: /* @__PURE__ */ e.jsx($, { justify: "flex-end", children: /* @__PURE__ */ e.jsx(U, { onClick: w, children: t().t("archbase:Close") }) }) })
859
+ /* @__PURE__ */ e.jsx(pa, { size: "40px", children: /* @__PURE__ */ e.jsx($, { justify: "flex-end", children: /* @__PURE__ */ e.jsx(M, { onClick: w, children: t().t("archbase:Close") }) }) })
858
860
  ] }) }) : null;
859
861
  }
860
- const Ne = "data:image/png;base64,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", Sa = (r) => r.groups ? /* @__PURE__ */ e.jsx("div", { style: { display: "flex" }, children: r.groups ? r.groups.map((h, w) => /* @__PURE__ */ e.jsx("div", { style: { paddingRight: "2px" }, children: /* @__PURE__ */ e.jsx(Se, { color: "blue", children: h.group?.name }) }, w)) : null }) : null, Aa = (r) => r.profile ? /* @__PURE__ */ e.jsx(Se, { color: "green", children: r.profile?.name }) : null;
861
- function $a({
862
+ const Ne = "data:image/png;base64,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", Aa = (r) => r.groups ? /* @__PURE__ */ e.jsx("div", { style: { display: "flex" }, children: r.groups.slice().sort((u, w) => (u.group?.name ?? "").localeCompare(w.group?.name ?? "")).map((u, w) => /* @__PURE__ */ e.jsx("div", { style: { paddingRight: "2px" }, children: /* @__PURE__ */ e.jsx(Se, { color: "blue", children: u.group?.name }) }, w)) }) : null, Ta = (r) => r.profile ? /* @__PURE__ */ e.jsx(Se, { color: "green", children: r.profile?.name }) : null;
863
+ function La({
862
864
  height: r = "400px",
863
- width: h = "100%",
865
+ width: u = "100%",
864
866
  createEntitiesWithId: w = !0,
865
- userModalOptions: d,
866
- profileModalOptions: l,
867
- groupModalOptions: f,
867
+ userModalOptions: l,
868
+ profileModalOptions: c,
869
+ groupModalOptions: m,
868
870
  options: S
869
871
  }) {
870
- const u = nr();
872
+ const h = nr();
871
873
  ir("securityStore");
872
- const P = Qr(), { colorScheme: p } = Oe(), [C, i] = M(void 0), [c, L] = M("users"), b = _(X.User), re = _(X.Group), J = _(X.Resource), ae = _(X.Profile), [Z, F] = M(""), [N, I] = M(""), q = _(X.AccessToken), { t: o } = Yr(), R = je(null), W = je(null), x = je(null), g = je(null), m = je(null), ce = (a) => a.id, ne = (a) => a.id, s = (a) => a.id, n = (a) => a.id, G = (a) => a.id, {
874
+ const P = Yr(), { colorScheme: p } = Oe(), [C, i] = U(void 0), [d, L] = U("users"), g = _(X.User), re = _(X.Group), J = _(X.Resource), ae = _(X.Profile), [Z, D] = U(""), [N, I] = U(""), q = _(X.AccessToken), { t: o } = Xr(), F = je(null), W = je(null), x = je(null), j = je(null), b = je(null), ce = (a) => a.id, ne = (a) => a.id, s = (a) => a.id, n = (a) => a.id, G = (a) => a.id, {
873
875
  dataSource: v,
874
876
  isLoading: E,
875
877
  refreshData: A
@@ -879,20 +881,20 @@ function $a({
879
881
  validator: P,
880
882
  pageSize: 25,
881
883
  defaultSortFields: ["user.email", "expirationTime:desc"],
882
- onError: (a, z) => {
883
- i(a), Q.showError(`${o("archbase:WARNING")}`, a, z);
884
+ onError: (a, k) => {
885
+ i(a), Q.showError(`${o("archbase:WARNING")}`, a, k);
884
886
  }
885
887
  }), {
886
- dataSource: j,
888
+ dataSource: y,
887
889
  isLoading: T,
888
890
  refreshData: de
889
891
  } = we({
890
892
  name: "dsUsers",
891
- service: b,
893
+ service: g,
892
894
  validator: P,
893
895
  pageSize: 25,
894
- onError: (a, z) => {
895
- i(a), Q.showError(`${o("archbase:WARNING")}`, a, z);
896
+ onError: (a, k) => {
897
+ i(a), Q.showError(`${o("archbase:WARNING")}`, a, k);
896
898
  }
897
899
  }), {
898
900
  dataSource: V,
@@ -903,8 +905,8 @@ function $a({
903
905
  service: re,
904
906
  validator: P,
905
907
  pageSize: 25,
906
- onError: (a, z) => {
907
- i(a), Q.showError(`${o("archbase:WARNING")}`, a, z);
908
+ onError: (a, k) => {
909
+ i(a), Q.showError(`${o("archbase:WARNING")}`, a, k);
908
910
  }
909
911
  }), {
910
912
  dataSource: O,
@@ -915,8 +917,8 @@ function $a({
915
917
  service: ae,
916
918
  validator: P,
917
919
  pageSize: 25,
918
- onError: (a, z) => {
919
- i(a), Q.showError(`${o("archbase:WARNING")}`, a, z);
920
+ onError: (a, k) => {
921
+ i(a), Q.showError(`${o("archbase:WARNING")}`, a, k);
920
922
  }
921
923
  }), {
922
924
  dataSource: xr,
@@ -927,16 +929,16 @@ function $a({
927
929
  service: J,
928
930
  validator: P,
929
931
  pageSize: 25,
930
- onError: (a, z) => {
931
- i(a), Q.showError(`${o("archbase:WARNING")}`, a, z);
932
+ onError: (a, k) => {
933
+ i(a), Q.showError(`${o("archbase:WARNING")}`, a, k);
932
934
  }
933
935
  });
934
936
  Re(() => {
935
- A({ filter: ze(Te.eq("revoked", "false")) }), de(), dr(), hr(), fr();
937
+ A({ filter: Ee(Te.eq("revoked", "false")) }), de(), dr(), hr(), fr();
936
938
  }, []);
937
939
  const mr = /* @__PURE__ */ e.jsxs(me, { children: [
938
940
  /* @__PURE__ */ e.jsx(
939
- y,
941
+ f,
940
942
  {
941
943
  dataField: "user.avatar",
942
944
  dataType: "image",
@@ -950,11 +952,12 @@ function $a({
950
952
  }
951
953
  ),
952
954
  inputFilterType: "text",
953
- align: "center"
955
+ align: "center",
956
+ exportable: !1
954
957
  }
955
958
  ),
956
959
  /* @__PURE__ */ e.jsx(
957
- y,
960
+ f,
958
961
  {
959
962
  dataField: "user.userName",
960
963
  dataType: "text",
@@ -964,7 +967,7 @@ function $a({
964
967
  }
965
968
  ),
966
969
  /* @__PURE__ */ e.jsx(
967
- y,
970
+ f,
968
971
  {
969
972
  dataField: "user.email",
970
973
  dataType: "text",
@@ -974,7 +977,7 @@ function $a({
974
977
  }
975
978
  ),
976
979
  /* @__PURE__ */ e.jsx(
977
- y,
980
+ f,
978
981
  {
979
982
  dataField: "expirationDate",
980
983
  dataType: "text",
@@ -985,7 +988,7 @@ function $a({
985
988
  }
986
989
  ),
987
990
  /* @__PURE__ */ e.jsx(
988
- y,
991
+ f,
989
992
  {
990
993
  dataField: "revoked",
991
994
  dataType: "boolean",
@@ -994,7 +997,7 @@ function $a({
994
997
  }
995
998
  ),
996
999
  /* @__PURE__ */ e.jsx(
997
- y,
1000
+ f,
998
1001
  {
999
1002
  dataField: "expired",
1000
1003
  dataType: "boolean",
@@ -1003,7 +1006,7 @@ function $a({
1003
1006
  }
1004
1007
  ),
1005
1008
  /* @__PURE__ */ e.jsx(
1006
- y,
1009
+ f,
1007
1010
  {
1008
1011
  dataField: "token",
1009
1012
  dataType: "text",
@@ -1014,7 +1017,7 @@ function $a({
1014
1017
  )
1015
1018
  ] }), br = /* @__PURE__ */ e.jsxs(me, { children: [
1016
1019
  /* @__PURE__ */ e.jsx(
1017
- y,
1020
+ f,
1018
1021
  {
1019
1022
  dataField: "avatar",
1020
1023
  dataType: "image",
@@ -1030,41 +1033,45 @@ function $a({
1030
1033
  enableSorting: !1,
1031
1034
  enableColumnFilter: !1,
1032
1035
  enableGlobalFilter: !1,
1033
- align: "center"
1036
+ align: "center",
1037
+ exportable: !1
1034
1038
  }
1035
1039
  ),
1036
1040
  /* @__PURE__ */ e.jsx(
1037
- y,
1041
+ f,
1038
1042
  {
1039
1043
  dataField: "name",
1040
1044
  dataType: "text",
1041
1045
  size: 300,
1042
1046
  header: `${o("archbase:Nome")}`,
1043
- inputFilterType: "text"
1047
+ inputFilterType: "text",
1048
+ truncate: !0
1044
1049
  }
1045
1050
  ),
1046
1051
  /* @__PURE__ */ e.jsx(
1047
- y,
1052
+ f,
1048
1053
  {
1049
1054
  dataField: "nickname",
1050
1055
  dataType: "text",
1051
1056
  size: 120,
1052
1057
  header: `${o("archbase:Apelido")}`,
1053
- inputFilterType: "text"
1058
+ inputFilterType: "text",
1059
+ truncate: !0
1054
1060
  }
1055
1061
  ),
1056
1062
  /* @__PURE__ */ e.jsx(
1057
- y,
1063
+ f,
1058
1064
  {
1059
1065
  dataField: "email",
1060
1066
  dataType: "text",
1061
1067
  header: `${o("archbase:Email")}`,
1062
1068
  size: 300,
1063
- inputFilterType: "text"
1069
+ inputFilterType: "text",
1070
+ truncate: !0
1064
1071
  }
1065
1072
  ),
1066
1073
  /* @__PURE__ */ e.jsx(
1067
- y,
1074
+ f,
1068
1075
  {
1069
1076
  dataField: "accountDeactivated",
1070
1077
  dataType: "boolean",
@@ -1074,31 +1081,32 @@ function $a({
1074
1081
  }
1075
1082
  ),
1076
1083
  /* @__PURE__ */ e.jsx(
1077
- y,
1084
+ f,
1078
1085
  {
1079
1086
  dataField: "profile.name",
1080
1087
  dataType: "text",
1081
1088
  header: `${o("archbase:Perfil")}`,
1082
1089
  size: 200,
1083
- render: (a) => Aa(a.row),
1090
+ render: (a) => Ta(a.row),
1084
1091
  inputFilterType: "text"
1085
1092
  }
1086
1093
  ),
1087
1094
  /* @__PURE__ */ e.jsx(
1088
- y,
1095
+ f,
1089
1096
  {
1090
1097
  dataField: "groups",
1091
1098
  dataType: "text",
1092
1099
  size: 300,
1093
1100
  header: `${o("archbase:Grupos")}`,
1094
- render: (a) => Sa(a.row),
1101
+ render: (a) => Aa(a.row),
1102
+ exportValue: (a) => a.groups?.slice().sort((k, Jr) => (k.group?.name ?? "").localeCompare(Jr.group?.name ?? "")).map((k) => k.group?.name).filter(Boolean).join(", ") || "",
1095
1103
  enableSorting: !1,
1096
1104
  enableColumnFilter: !1,
1097
1105
  enableGlobalFilter: !1
1098
1106
  }
1099
1107
  ),
1100
1108
  /* @__PURE__ */ e.jsx(
1101
- y,
1109
+ f,
1102
1110
  {
1103
1111
  dataField: "isAdministrator",
1104
1112
  dataType: "boolean",
@@ -1107,7 +1115,7 @@ function $a({
1107
1115
  }
1108
1116
  ),
1109
1117
  /* @__PURE__ */ e.jsx(
1110
- y,
1118
+ f,
1111
1119
  {
1112
1120
  dataField: "changePasswordOnNextLogin",
1113
1121
  dataType: "boolean",
@@ -1117,7 +1125,7 @@ function $a({
1117
1125
  }
1118
1126
  ),
1119
1127
  /* @__PURE__ */ e.jsx(
1120
- y,
1128
+ f,
1121
1129
  {
1122
1130
  dataField: "allowPasswordChange",
1123
1131
  dataType: "boolean",
@@ -1127,7 +1135,7 @@ function $a({
1127
1135
  }
1128
1136
  ),
1129
1137
  /* @__PURE__ */ e.jsx(
1130
- y,
1138
+ f,
1131
1139
  {
1132
1140
  dataField: "allowMultipleLogins",
1133
1141
  dataType: "boolean",
@@ -1137,7 +1145,7 @@ function $a({
1137
1145
  }
1138
1146
  ),
1139
1147
  /* @__PURE__ */ e.jsx(
1140
- y,
1148
+ f,
1141
1149
  {
1142
1150
  dataField: "passwordNeverExpires",
1143
1151
  dataType: "boolean",
@@ -1147,7 +1155,7 @@ function $a({
1147
1155
  }
1148
1156
  ),
1149
1157
  /* @__PURE__ */ e.jsx(
1150
- y,
1158
+ f,
1151
1159
  {
1152
1160
  dataField: "accountLocked",
1153
1161
  dataType: "boolean",
@@ -1157,7 +1165,7 @@ function $a({
1157
1165
  }
1158
1166
  ),
1159
1167
  /* @__PURE__ */ e.jsx(
1160
- y,
1168
+ f,
1161
1169
  {
1162
1170
  dataField: "unlimitedAccessHours",
1163
1171
  dataType: "boolean",
@@ -1168,7 +1176,7 @@ function $a({
1168
1176
  )
1169
1177
  ] }), gr = /* @__PURE__ */ e.jsxs(me, { children: [
1170
1178
  /* @__PURE__ */ e.jsx(
1171
- y,
1179
+ f,
1172
1180
  {
1173
1181
  dataField: "name",
1174
1182
  dataType: "text",
@@ -1178,7 +1186,7 @@ function $a({
1178
1186
  }
1179
1187
  ),
1180
1188
  /* @__PURE__ */ e.jsx(
1181
- y,
1189
+ f,
1182
1190
  {
1183
1191
  dataField: "description",
1184
1192
  dataType: "text",
@@ -1189,7 +1197,7 @@ function $a({
1189
1197
  )
1190
1198
  ] }), jr = /* @__PURE__ */ e.jsxs(me, { children: [
1191
1199
  /* @__PURE__ */ e.jsx(
1192
- y,
1200
+ f,
1193
1201
  {
1194
1202
  dataField: "name",
1195
1203
  dataType: "text",
@@ -1199,7 +1207,7 @@ function $a({
1199
1207
  }
1200
1208
  ),
1201
1209
  /* @__PURE__ */ e.jsx(
1202
- y,
1210
+ f,
1203
1211
  {
1204
1212
  dataField: "description",
1205
1213
  dataType: "text",
@@ -1210,7 +1218,7 @@ function $a({
1210
1218
  )
1211
1219
  ] }), yr = /* @__PURE__ */ e.jsxs(me, { children: [
1212
1220
  /* @__PURE__ */ e.jsx(
1213
- y,
1221
+ f,
1214
1222
  {
1215
1223
  dataField: "name",
1216
1224
  dataType: "text",
@@ -1220,7 +1228,7 @@ function $a({
1220
1228
  }
1221
1229
  ),
1222
1230
  /* @__PURE__ */ e.jsx(
1223
- y,
1231
+ f,
1224
1232
  {
1225
1233
  dataField: "description",
1226
1234
  dataType: "text",
@@ -1230,34 +1238,34 @@ function $a({
1230
1238
  }
1231
1239
  )
1232
1240
  ] }), wr = () => {
1233
- const a = sa.newInstance();
1234
- w || (a.id = void 0), j.insert(a), F(k.USER);
1241
+ const a = na.newInstance();
1242
+ w || (a.id = void 0), y.insert(a), D(R.USER);
1235
1243
  }, vr = (a) => {
1236
- j.isEmpty() || j.gotoRecordByData(a) && (j.edit(), F(k.USER));
1244
+ y.isEmpty() || y.gotoRecordByData(a) && (y.edit(), D(R.USER));
1237
1245
  }, Cr = (a) => {
1238
- j.isEmpty() || j.gotoRecordByData(a) && K.showConfirmDialogYesNo(
1246
+ y.isEmpty() || y.gotoRecordByData(a) && K.showConfirmDialogYesNo(
1239
1247
  `${o("archbase:Confirme")}`,
1240
1248
  `${o("archbase:Deseja remover o usuário ")}${a.name} ?`,
1241
1249
  () => {
1242
- j.remove();
1250
+ y.remove();
1243
1251
  },
1244
1252
  () => {
1245
1253
  }
1246
1254
  );
1247
1255
  }, Sr = (a) => {
1248
- j.isEmpty() || j.gotoRecordByData(a) && F(k.USER);
1256
+ y.isEmpty() || y.gotoRecordByData(a) && D(R.USER);
1249
1257
  }, Ar = (a) => /* @__PURE__ */ e.jsxs($, { gap: 1, wrap: "nowrap", children: [
1250
1258
  S?.beforeDefaultUserActions?.(a),
1251
- /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Sr(a), children: /* @__PURE__ */ e.jsx($e, { size: 20, color: p === "dark" ? u.colors.blue[8] : u.colors.blue[4] }) }),
1252
- /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => vr(a), children: /* @__PURE__ */ e.jsx(fe, { size: 20, color: p === "dark" ? u.colors.yellow[8] : u.colors.yellow[4] }) }),
1253
- /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Cr(a), children: /* @__PURE__ */ e.jsx(Ce, { size: 20, color: p === "dark" ? u.colors.red[8] : u.colors.red[4] }) }),
1254
- /* @__PURE__ */ e.jsx(se, { withinPortal: !0, withArrow: !0, position: "left", label: `${o("archbase:Edit permissions")}`, children: /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: Be, children: /* @__PURE__ */ e.jsx(Le, { size: 20, color: p === "dark" ? u.colors.green[8] : u.colors.green[4] }) }) }),
1259
+ /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Sr(a), children: /* @__PURE__ */ e.jsx($e, { size: 20, color: p === "dark" ? h.colors.blue[8] : h.colors.blue[4] }) }),
1260
+ /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => vr(a), children: /* @__PURE__ */ e.jsx(fe, { size: 20, color: p === "dark" ? h.colors.yellow[8] : h.colors.yellow[4] }) }),
1261
+ /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Cr(a), children: /* @__PURE__ */ e.jsx(Ce, { size: 20, color: p === "dark" ? h.colors.red[8] : h.colors.red[4] }) }),
1262
+ /* @__PURE__ */ e.jsx(se, { withinPortal: !0, withArrow: !0, position: "left", label: `${o("archbase:Edit permissions")}`, children: /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: Be, children: /* @__PURE__ */ e.jsx(Le, { size: 20, color: p === "dark" ? h.colors.green[8] : h.colors.green[4] }) }) }),
1255
1263
  S?.afterDefaultUserActions?.(a)
1256
1264
  ] }), Tr = () => {
1257
- const a = na.newInstance();
1258
- w || (a.id = void 0), V.insert(a), F(k.GROUP);
1265
+ const a = ia.newInstance();
1266
+ w || (a.id = void 0), V.insert(a), D(R.GROUP);
1259
1267
  }, kr = (a) => {
1260
- V.isEmpty() || V.gotoRecordByData(a) && (V.isEditing() || V.edit(), F(k.GROUP));
1268
+ V.isEmpty() || V.gotoRecordByData(a) && (V.isEditing() || V.edit(), D(R.GROUP));
1261
1269
  }, Rr = (a) => {
1262
1270
  V.isEmpty() || V.gotoRecordByData(a) && K.showConfirmDialogYesNo(
1263
1271
  `${o("archbase:Confirme")}`,
@@ -1269,47 +1277,47 @@ function $a({
1269
1277
  }
1270
1278
  );
1271
1279
  }, Fr = (a) => {
1272
- V.isEmpty() || V.gotoRecordByData(a) && F(k.GROUP);
1280
+ V.isEmpty() || V.gotoRecordByData(a) && D(R.GROUP);
1273
1281
  }, Dr = (a) => /* @__PURE__ */ e.jsxs($, { gap: 1, wrap: "nowrap", children: [
1274
1282
  S?.beforeDefaultGroupActions?.(a),
1275
- /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Fr(a), children: /* @__PURE__ */ e.jsx($e, { size: 20, color: p === "dark" ? u.colors.blue[8] : u.colors.blue[4] }) }),
1276
- /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => kr(a), children: /* @__PURE__ */ e.jsx(fe, { size: 20, color: p === "dark" ? u.colors.yellow[8] : u.colors.yellow[4] }) }),
1277
- /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Rr(a), children: /* @__PURE__ */ e.jsx(Ce, { size: 20, color: p === "dark" ? u.colors.red[8] : u.colors.red[4] }) }),
1278
- /* @__PURE__ */ e.jsx(se, { withinPortal: !0, withArrow: !0, position: "left", label: `${o("archbase:Edit permissions")}`, children: /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: We, children: /* @__PURE__ */ e.jsx(Le, { size: 20, color: p === "dark" ? u.colors.green[8] : u.colors.green[4] }) }) }),
1283
+ /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Fr(a), children: /* @__PURE__ */ e.jsx($e, { size: 20, color: p === "dark" ? h.colors.blue[8] : h.colors.blue[4] }) }),
1284
+ /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => kr(a), children: /* @__PURE__ */ e.jsx(fe, { size: 20, color: p === "dark" ? h.colors.yellow[8] : h.colors.yellow[4] }) }),
1285
+ /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Rr(a), children: /* @__PURE__ */ e.jsx(Ce, { size: 20, color: p === "dark" ? h.colors.red[8] : h.colors.red[4] }) }),
1286
+ /* @__PURE__ */ e.jsx(se, { withinPortal: !0, withArrow: !0, position: "left", label: `${o("archbase:Edit permissions")}`, children: /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: We, children: /* @__PURE__ */ e.jsx(Le, { size: 20, color: p === "dark" ? h.colors.green[8] : h.colors.green[4] }) }) }),
1279
1287
  S?.afterDefaultGroupActions?.(a)
1280
- ] }), ue = Xr(), Ir = async () => {
1288
+ ] }), ue = Kr(), zr = async () => {
1281
1289
  try {
1282
- await j.save();
1290
+ await y.save();
1283
1291
  } catch {
1284
1292
  return;
1285
1293
  }
1286
- F(""), ue?.clearAll();
1287
- }, Er = () => {
1288
- F(""), j.isBrowsing() || j.cancel(), ue?.clearAll();
1289
- }, zr = async () => {
1294
+ D(""), ue?.clearAll();
1295
+ }, Ir = () => {
1296
+ D(""), y.isBrowsing() || y.cancel(), ue?.clearAll();
1297
+ }, Er = async () => {
1290
1298
  try {
1291
1299
  await V.save();
1292
1300
  } catch {
1293
1301
  return;
1294
1302
  }
1295
- F(""), ue?.clearAll();
1303
+ D(""), ue?.clearAll();
1296
1304
  }, Pr = () => {
1297
- F(""), V.isBrowsing() || V.cancel(), ue?.clearAll();
1305
+ D(""), V.isBrowsing() || V.cancel(), ue?.clearAll();
1298
1306
  }, Gr = async () => {
1299
1307
  try {
1300
1308
  await O.save();
1301
1309
  } catch {
1302
1310
  return;
1303
1311
  }
1304
- F(""), ue?.clearAll();
1312
+ D(""), ue?.clearAll();
1305
1313
  }, $r = () => {
1306
- F(""), O.isBrowsing() || O.cancel(), ue?.clearAll();
1314
+ D(""), O.isBrowsing() || O.cancel(), ue?.clearAll();
1307
1315
  }, Lr = () => {
1308
- const a = ia.newInstance();
1309
- w || (a.id = void 0), O.insert(a), F(k.PROFILE);
1316
+ const a = la.newInstance();
1317
+ w || (a.id = void 0), O.insert(a), D(R.PROFILE);
1310
1318
  }, Vr = (a) => {
1311
- O.isEmpty() || O.gotoRecordByData(a) && (O.isEditing() || O.edit(), F(k.PROFILE));
1312
- }, Ur = (a) => {
1319
+ O.isEmpty() || O.gotoRecordByData(a) && (O.isEditing() || O.edit(), D(R.PROFILE));
1320
+ }, Mr = (a) => {
1313
1321
  O.isEmpty() || O.gotoRecordByData(a) && K.showConfirmDialogYesNo(
1314
1322
  `${o("archbase:Confirme")}`,
1315
1323
  `${o("archbase:Deseja remover o perfil ")}${a.name} ?`,
@@ -1319,14 +1327,14 @@ function $a({
1319
1327
  () => {
1320
1328
  }
1321
1329
  );
1322
- }, Mr = (a) => {
1323
- O.isEmpty() || O.gotoRecordByData(a) && F(k.PROFILE);
1330
+ }, Ur = (a) => {
1331
+ O.isEmpty() || O.gotoRecordByData(a) && D(R.PROFILE);
1324
1332
  }, Nr = (a) => /* @__PURE__ */ e.jsxs($, { gap: 1, wrap: "nowrap", children: [
1325
1333
  S?.beforeDefaultProfileActions?.(a),
1326
- /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Mr(a), children: /* @__PURE__ */ e.jsx($e, { size: 20, color: p === "dark" ? u.colors.blue[8] : u.colors.blue[4] }) }),
1327
- /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Vr(a), children: /* @__PURE__ */ e.jsx(fe, { size: 20, color: p === "dark" ? u.colors.yellow[8] : u.colors.yellow[4] }) }),
1328
- /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Ur(a), children: /* @__PURE__ */ e.jsx(Ce, { size: 20, color: p === "dark" ? u.colors.red[8] : u.colors.red[4] }) }),
1329
- /* @__PURE__ */ e.jsx(se, { withinPortal: !0, withArrow: !0, position: "left", label: `${o("archbase:Edit permissions")}`, children: /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: qe, children: /* @__PURE__ */ e.jsx(Le, { size: 20, color: p === "dark" ? u.colors.green[8] : u.colors.green[4] }) }) }),
1334
+ /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Ur(a), children: /* @__PURE__ */ e.jsx($e, { size: 20, color: p === "dark" ? h.colors.blue[8] : h.colors.blue[4] }) }),
1335
+ /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Vr(a), children: /* @__PURE__ */ e.jsx(fe, { size: 20, color: p === "dark" ? h.colors.yellow[8] : h.colors.yellow[4] }) }),
1336
+ /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: () => Mr(a), children: /* @__PURE__ */ e.jsx(Ce, { size: 20, color: p === "dark" ? h.colors.red[8] : h.colors.red[4] }) }),
1337
+ /* @__PURE__ */ e.jsx(se, { withinPortal: !0, withArrow: !0, position: "left", label: `${o("archbase:Edit permissions")}`, children: /* @__PURE__ */ e.jsx(B, { variant: "transparent", onClick: qe, children: /* @__PURE__ */ e.jsx(Le, { size: 20, color: p === "dark" ? h.colors.green[8] : h.colors.green[4] }) }) }),
1330
1338
  S?.afterDefaultProfileActions?.(a)
1331
1339
  ] }), Or = () => {
1332
1340
  const a = v.getCurrentRecord();
@@ -1339,11 +1347,11 @@ function $a({
1339
1347
  `${o("mentors:Informação")}`,
1340
1348
  `${o("mentors:Token de Acesso revogado com sucesso!")}`
1341
1349
  ), v.refreshData();
1342
- }).catch((z) => {
1350
+ }).catch((k) => {
1343
1351
  K.showErrorWithDetails(
1344
1352
  `${o("mentors:Atenção")}`,
1345
- Ae(z),
1346
- Ie(z)
1353
+ Ae(k),
1354
+ ze(k)
1347
1355
  );
1348
1356
  });
1349
1357
  },
@@ -1351,33 +1359,33 @@ function $a({
1351
1359
  }
1352
1360
  );
1353
1361
  }, Be = () => {
1354
- I(k.USER);
1362
+ I(R.USER);
1355
1363
  }, We = () => {
1356
- I(k.GROUP);
1364
+ I(R.GROUP);
1357
1365
  }, qe = () => {
1358
- I(k.PROFILE);
1366
+ I(R.PROFILE);
1359
1367
  }, Ge = () => {
1360
1368
  I("");
1361
1369
  }, Br = () => /* @__PURE__ */ e.jsxs(te, { justify: "space-between", style: { width: "50%" }, children: [
1362
1370
  /* @__PURE__ */ e.jsxs($, { align: "end", gap: "4px", wrap: "nowrap", children: [
1363
- /* @__PURE__ */ e.jsx(U, { color: "green", leftSection: /* @__PURE__ */ e.jsx(Ee, {}), onClick: wr, children: `${o("archbase:New")}` }),
1364
- /* @__PURE__ */ e.jsx(U, { color: "blue", leftSection: /* @__PURE__ */ e.jsx(fe, {}), onClick: Be, children: `${o("archbase:Edit permissions")}` })
1371
+ /* @__PURE__ */ e.jsx(M, { color: "green", leftSection: /* @__PURE__ */ e.jsx(Ie, {}), onClick: wr, children: `${o("archbase:New")}` }),
1372
+ /* @__PURE__ */ e.jsx(M, { color: "blue", leftSection: /* @__PURE__ */ e.jsx(fe, {}), onClick: Be, children: `${o("archbase:Edit permissions")}` })
1365
1373
  ] }),
1366
1374
  /* @__PURE__ */ e.jsx(te, { align: "flex-start", justify: "flex-end", style: { width: "200px" } })
1367
1375
  ] }), Wr = () => /* @__PURE__ */ e.jsxs(te, { justify: "space-between", style: { width: "50%" }, children: [
1368
1376
  /* @__PURE__ */ e.jsxs($, { align: "end", gap: "4px", wrap: "nowrap", children: [
1369
- /* @__PURE__ */ e.jsx(U, { color: "green", leftSection: /* @__PURE__ */ e.jsx(Ee, {}), onClick: Tr, children: `${o("archbase:New")}` }),
1370
- /* @__PURE__ */ e.jsx(U, { color: "blue", leftSection: /* @__PURE__ */ e.jsx(fe, {}), onClick: We, children: `${o("archbase:Edit permissions")}` })
1377
+ /* @__PURE__ */ e.jsx(M, { color: "green", leftSection: /* @__PURE__ */ e.jsx(Ie, {}), onClick: Tr, children: `${o("archbase:New")}` }),
1378
+ /* @__PURE__ */ e.jsx(M, { color: "blue", leftSection: /* @__PURE__ */ e.jsx(fe, {}), onClick: We, children: `${o("archbase:Edit permissions")}` })
1371
1379
  ] }),
1372
1380
  /* @__PURE__ */ e.jsx(te, { align: "flex-start", justify: "flex-end", style: { width: "200px" } })
1373
1381
  ] }), qr = () => /* @__PURE__ */ e.jsxs(te, { justify: "space-between", style: { width: "50%" }, children: [
1374
1382
  /* @__PURE__ */ e.jsxs($, { align: "end", gap: "4px", wrap: "nowrap", children: [
1375
- /* @__PURE__ */ e.jsx(U, { color: "green", leftSection: /* @__PURE__ */ e.jsx(Ee, {}), onClick: Lr, children: `${o("archbase:New")}` }),
1376
- /* @__PURE__ */ e.jsx(U, { color: "blue", leftSection: /* @__PURE__ */ e.jsx(fe, {}), onClick: qe, children: `${o("archbase:Edit permissions")}` })
1383
+ /* @__PURE__ */ e.jsx(M, { color: "green", leftSection: /* @__PURE__ */ e.jsx(Ie, {}), onClick: Lr, children: `${o("archbase:New")}` }),
1384
+ /* @__PURE__ */ e.jsx(M, { color: "blue", leftSection: /* @__PURE__ */ e.jsx(fe, {}), onClick: qe, children: `${o("archbase:Edit permissions")}` })
1377
1385
  ] }),
1378
1386
  /* @__PURE__ */ e.jsx(te, { align: "flex-start", justify: "flex-end", style: { width: "200px" } })
1379
1387
  ] }), Hr = () => /* @__PURE__ */ e.jsx(te, { justify: "space-between", style: { width: "50%" }, children: /* @__PURE__ */ e.jsx($, { align: "start", gap: "4px", wrap: "nowrap", children: /* @__PURE__ */ e.jsx(
1380
- U,
1388
+ M,
1381
1389
  {
1382
1390
  disabled: !v.getCurrentRecord(),
1383
1391
  color: "red",
@@ -1387,7 +1395,7 @@ function $a({
1387
1395
  }
1388
1396
  ) }) });
1389
1397
  return /* @__PURE__ */ e.jsxs(Y, { p: "md", style: { height: r, display: "flex", flexDirection: "column" }, children: [
1390
- /* @__PURE__ */ e.jsx(ie, { variant: "pills", value: c, onChange: L, children: /* @__PURE__ */ e.jsxs(ie.List, { children: [
1398
+ /* @__PURE__ */ e.jsx(ie, { variant: "pills", value: d, onChange: L, children: /* @__PURE__ */ e.jsxs(ie.List, { children: [
1391
1399
  /* @__PURE__ */ e.jsx(ie.Tab, { value: "users", children: `${o("Usuários")}` }),
1392
1400
  /* @__PURE__ */ e.jsx(ie.Tab, { value: "groups", children: `${o("Grupos")}` }),
1393
1401
  /* @__PURE__ */ e.jsx(ie.Tab, { value: "profiles", children: `${o("Perfis")}` }),
@@ -1400,7 +1408,7 @@ function $a({
1400
1408
  withBorder: !0,
1401
1409
  mt: "md",
1402
1410
  style: {
1403
- display: c === "users" ? "flex" : "none",
1411
+ display: d === "users" ? "flex" : "none",
1404
1412
  width: "100%",
1405
1413
  flex: 1,
1406
1414
  minHeight: 0,
@@ -1409,12 +1417,12 @@ function $a({
1409
1417
  children: /* @__PURE__ */ e.jsx(
1410
1418
  be,
1411
1419
  {
1412
- gridRef: R,
1420
+ gridRef: F,
1413
1421
  printTitle: "Usuários",
1414
1422
  width: "100%",
1415
1423
  height: "100%",
1416
1424
  withBorder: !1,
1417
- dataSource: j,
1425
+ dataSource: y,
1418
1426
  withColumnBorders: !0,
1419
1427
  striped: !0,
1420
1428
  enableTopToolbar: !0,
@@ -1439,7 +1447,7 @@ function $a({
1439
1447
  withBorder: !0,
1440
1448
  mt: "md",
1441
1449
  style: {
1442
- display: c === "groups" ? "flex" : "none",
1450
+ display: d === "groups" ? "flex" : "none",
1443
1451
  flex: 1,
1444
1452
  minHeight: 0,
1445
1453
  overflow: "auto"
@@ -1477,7 +1485,7 @@ function $a({
1477
1485
  withBorder: !0,
1478
1486
  mt: "md",
1479
1487
  style: {
1480
- display: c === "profiles" ? "flex" : "none",
1488
+ display: d === "profiles" ? "flex" : "none",
1481
1489
  flex: 1,
1482
1490
  minHeight: 0,
1483
1491
  overflow: "auto"
@@ -1515,7 +1523,7 @@ function $a({
1515
1523
  withBorder: !0,
1516
1524
  mt: "md",
1517
1525
  style: {
1518
- display: c === "resources" ? "flex" : "none",
1526
+ display: d === "resources" ? "flex" : "none",
1519
1527
  flex: 1,
1520
1528
  minHeight: 0,
1521
1529
  overflow: "auto"
@@ -1523,7 +1531,7 @@ function $a({
1523
1531
  children: /* @__PURE__ */ e.jsx(
1524
1532
  be,
1525
1533
  {
1526
- gridRef: g,
1534
+ gridRef: j,
1527
1535
  printTitle: "Recursos",
1528
1536
  width: "100%",
1529
1537
  height: "100%",
@@ -1550,7 +1558,7 @@ function $a({
1550
1558
  withBorder: !0,
1551
1559
  mt: "md",
1552
1560
  style: {
1553
- display: c === "accessTokens" ? "flex" : "none",
1561
+ display: d === "accessTokens" ? "flex" : "none",
1554
1562
  width: "100%",
1555
1563
  flex: 1,
1556
1564
  minHeight: 0,
@@ -1559,7 +1567,7 @@ function $a({
1559
1567
  children: /* @__PURE__ */ e.jsx(
1560
1568
  be,
1561
1569
  {
1562
- gridRef: m,
1570
+ gridRef: b,
1563
1571
  printTitle: "Tokens de API",
1564
1572
  width: "100%",
1565
1573
  height: "100%",
@@ -1581,54 +1589,54 @@ function $a({
1581
1589
  )
1582
1590
  }
1583
1591
  ),
1584
- Z === k.USER ? /* @__PURE__ */ e.jsx(
1585
- ya,
1592
+ Z === R.USER ? /* @__PURE__ */ e.jsx(
1593
+ wa,
1586
1594
  {
1587
- onClickOk: Ir,
1595
+ onClickOk: zr,
1588
1596
  opened: !0,
1589
- dataSource: j,
1590
- onClickCancel: Er,
1591
- options: d
1597
+ dataSource: y,
1598
+ onClickCancel: Ir,
1599
+ options: l
1592
1600
  }
1593
1601
  ) : null,
1594
- Z === k.GROUP ? /* @__PURE__ */ e.jsx(
1595
- wa,
1602
+ Z === R.GROUP ? /* @__PURE__ */ e.jsx(
1603
+ va,
1596
1604
  {
1597
- onClickOk: zr,
1605
+ onClickOk: Er,
1598
1606
  opened: !0,
1599
1607
  dataSource: V,
1600
1608
  onClickCancel: Pr,
1601
- options: f
1609
+ options: m
1602
1610
  }
1603
1611
  ) : null,
1604
- Z === k.PROFILE ? /* @__PURE__ */ e.jsx(
1605
- ma,
1612
+ Z === R.PROFILE ? /* @__PURE__ */ e.jsx(
1613
+ ba,
1606
1614
  {
1607
1615
  onClickOk: Gr,
1608
1616
  opened: !0,
1609
1617
  dataSource: O,
1610
1618
  onClickCancel: $r,
1611
- options: l
1619
+ options: c
1612
1620
  }
1613
1621
  ) : null,
1614
- N === k.USER ? /* @__PURE__ */ e.jsx(
1615
- Ue,
1622
+ N === R.USER ? /* @__PURE__ */ e.jsx(
1623
+ Me,
1616
1624
  {
1617
- dataSource: j,
1625
+ dataSource: y,
1618
1626
  opened: !!N,
1619
1627
  close: Ge
1620
1628
  }
1621
1629
  ) : null,
1622
- N === k.GROUP ? /* @__PURE__ */ e.jsx(
1623
- Ue,
1630
+ N === R.GROUP ? /* @__PURE__ */ e.jsx(
1631
+ Me,
1624
1632
  {
1625
1633
  dataSource: V,
1626
1634
  opened: !!N,
1627
1635
  close: Ge
1628
1636
  }
1629
1637
  ) : null,
1630
- N === k.PROFILE ? /* @__PURE__ */ e.jsx(
1631
- Ue,
1638
+ N === R.PROFILE ? /* @__PURE__ */ e.jsx(
1639
+ Me,
1632
1640
  {
1633
1641
  dataSource: O,
1634
1642
  opened: !!N,
@@ -1637,48 +1645,48 @@ function $a({
1637
1645
  ) : null
1638
1646
  ] });
1639
1647
  }
1640
- function La({ height: r = "400px", width: h = "100%" }) {
1648
+ function Va({ height: r = "400px", width: u = "100%" }) {
1641
1649
  nr();
1642
- const w = ir("apiTokenStore"), d = { validateEntity: () => [] }, { colorScheme: l } = Oe(), [f, S] = M(void 0), u = _(X.ApiToken), [P, p] = M(""), C = je(null), i = (R) => R.id, { dataSource: c } = ta({
1650
+ const w = ir("apiTokenStore"), l = { validateEntity: () => [] }, { colorScheme: c } = Oe(), [m, S] = U(void 0), h = _(X.ApiToken), [P, p] = U(""), C = je(null), i = (F) => F.id, { dataSource: d } = oa({
1643
1651
  initialData: [],
1644
1652
  name: "dataSource"
1645
1653
  }), L = ke(
1646
1654
  "ArchbaseApiTokenView-LocalDataSource",
1647
- c,
1655
+ d,
1648
1656
  void 0,
1649
1657
  void 0
1650
- ), { dataSource: b, isLoading: re } = Me({
1658
+ ), { dataSource: g, isLoading: re } = Ue({
1651
1659
  name: "dsApiToken",
1652
- service: u,
1660
+ service: h,
1653
1661
  store: w,
1654
- validator: d,
1662
+ validator: l,
1655
1663
  pageSize: 25,
1656
1664
  loadOnStart: !0,
1657
- onLoadComplete: (R) => {
1665
+ onLoadComplete: (F) => {
1658
1666
  },
1659
- onDestroy: (R) => {
1667
+ onDestroy: (F) => {
1660
1668
  },
1661
- onError: (R, W) => {
1662
- S(R), Q.showError(t().t("archbase:WARNING"), R, W);
1669
+ onError: (F, W) => {
1670
+ S(F), Q.showError(t().t("archbase:WARNING"), F, W);
1663
1671
  }
1664
1672
  }), J = ke(
1665
1673
  "ArchbaseApiTokenView-RemoteDataSource",
1666
- b,
1674
+ g,
1667
1675
  void 0,
1668
1676
  void 0
1669
1677
  ), ae = `calc(${r} - 40px)`, Z = /* @__PURE__ */ e.jsxs(me, { children: [
1670
1678
  /* @__PURE__ */ e.jsx(
1671
- y,
1679
+ f,
1672
1680
  {
1673
1681
  dataField: "user.avatar",
1674
1682
  dataType: "image",
1675
1683
  size: 80,
1676
1684
  header: "Foto",
1677
- render: (R) => /* @__PURE__ */ e.jsx(
1685
+ render: (F) => /* @__PURE__ */ e.jsx(
1678
1686
  "img",
1679
1687
  {
1680
1688
  style: { borderRadius: 50, height: "32px", maxHeight: "32px" },
1681
- src: R.row.user && R.row.user.avatar ? atob(R.row.user.avatar) : Ne
1689
+ src: F.row.user && F.row.user.avatar ? atob(F.row.user.avatar) : Ne
1682
1690
  }
1683
1691
  ),
1684
1692
  inputFilterType: "text",
@@ -1686,7 +1694,7 @@ function La({ height: r = "400px", width: h = "100%" }) {
1686
1694
  }
1687
1695
  ),
1688
1696
  /* @__PURE__ */ e.jsx(
1689
- y,
1697
+ f,
1690
1698
  {
1691
1699
  dataField: "user.userName",
1692
1700
  dataType: "text",
@@ -1696,7 +1704,7 @@ function La({ height: r = "400px", width: h = "100%" }) {
1696
1704
  }
1697
1705
  ),
1698
1706
  /* @__PURE__ */ e.jsx(
1699
- y,
1707
+ f,
1700
1708
  {
1701
1709
  dataField: "user.email",
1702
1710
  dataType: "text",
@@ -1706,7 +1714,27 @@ function La({ height: r = "400px", width: h = "100%" }) {
1706
1714
  }
1707
1715
  ),
1708
1716
  /* @__PURE__ */ e.jsx(
1709
- y,
1717
+ f,
1718
+ {
1719
+ dataField: "name",
1720
+ dataType: "text",
1721
+ header: "Nome",
1722
+ size: 240,
1723
+ inputFilterType: "text"
1724
+ }
1725
+ ),
1726
+ /* @__PURE__ */ e.jsx(
1727
+ f,
1728
+ {
1729
+ dataField: "description",
1730
+ dataType: "text",
1731
+ header: "Descrição",
1732
+ size: 300,
1733
+ inputFilterType: "text"
1734
+ }
1735
+ ),
1736
+ /* @__PURE__ */ e.jsx(
1737
+ f,
1710
1738
  {
1711
1739
  dataField: "token",
1712
1740
  dataType: "text",
@@ -1717,7 +1745,7 @@ function La({ height: r = "400px", width: h = "100%" }) {
1717
1745
  }
1718
1746
  ),
1719
1747
  /* @__PURE__ */ e.jsx(
1720
- y,
1748
+ f,
1721
1749
  {
1722
1750
  dataField: "tenantId",
1723
1751
  dataType: "text",
@@ -1728,41 +1756,41 @@ function La({ height: r = "400px", width: h = "100%" }) {
1728
1756
  }
1729
1757
  ),
1730
1758
  /* @__PURE__ */ e.jsx(
1731
- y,
1759
+ f,
1732
1760
  {
1733
1761
  dataField: "expirationDate",
1734
1762
  dataType: "text",
1735
1763
  size: 240,
1736
1764
  header: "Validade",
1737
- render: (R) => {
1738
- if (!R.row.expirationDate)
1765
+ render: (F) => {
1766
+ if (!F.row.expirationDate)
1739
1767
  return /* @__PURE__ */ e.jsx(H, { c: "dimmed", children: "Sem expiração" });
1740
1768
  const W = /* @__PURE__ */ new Date();
1741
1769
  W.setHours(0, 0, 0, 0);
1742
- const x = new Date(R.row.expirationDate);
1770
+ const x = new Date(F.row.expirationDate);
1743
1771
  x.setHours(0, 0, 0, 0);
1744
- const g = x.getTime() - W.getTime(), m = Math.ceil(g / (1e3 * 60 * 60 * 24));
1745
- let ne = Math.max(0, Math.min(100, m / 365 * 100)), s = "green", n = "";
1746
- m < 0 ? (s = "red", ne = 100, n = `Vencido há ${Math.abs(m)} dia${Math.abs(m) !== 1 ? "s" : ""}`) : m === 0 ? (s = "red", ne = 5, n = "Vence hoje") : m <= 7 ? (s = "red", n = `${m} dia${m !== 1 ? "s" : ""}`) : m <= 30 ? (s = "orange", n = `${m} dias`) : m <= 90 ? (s = "yellow", n = `${m} dias`) : (s = "green", n = `${m} dias`);
1747
- const G = m < 0 ? `Vencido em ${x.toLocaleDateString()}` : `Expira em ${x.toLocaleDateString()}`;
1772
+ const j = x.getTime() - W.getTime(), b = Math.ceil(j / (1e3 * 60 * 60 * 24));
1773
+ let ne = Math.max(0, Math.min(100, b / 365 * 100)), s = "green", n = "";
1774
+ b < 0 ? (s = "red", ne = 100, n = `Vencido há ${Math.abs(b)} dia${Math.abs(b) !== 1 ? "s" : ""}`) : b === 0 ? (s = "red", ne = 5, n = "Vence hoje") : b <= 7 ? (s = "red", n = `${b} dia${b !== 1 ? "s" : ""}`) : b <= 30 ? (s = "orange", n = `${b} dias`) : b <= 90 ? (s = "yellow", n = `${b} dias`) : (s = "green", n = `${b} dias`);
1775
+ const G = b < 0 ? `Vencido em ${x.toLocaleDateString()}` : `Expira em ${x.toLocaleDateString()}`;
1748
1776
  return /* @__PURE__ */ e.jsx(se, { label: G, withArrow: !0, children: /* @__PURE__ */ e.jsxs($, { gap: "xs", wrap: "nowrap", children: [
1749
1777
  /* @__PURE__ */ e.jsx(
1750
- Jr,
1778
+ Zr,
1751
1779
  {
1752
1780
  size: 36,
1753
1781
  thickness: 4,
1754
1782
  roundCaps: !0,
1755
- sections: [{ value: m < 0 ? 100 : ne, color: s }]
1783
+ sections: [{ value: b < 0 ? 100 : ne, color: s }]
1756
1784
  }
1757
1785
  ),
1758
- /* @__PURE__ */ e.jsx(H, { size: "sm", c: m < 0 ? "red" : void 0, fw: m <= 7 ? 600 : void 0, children: n })
1786
+ /* @__PURE__ */ e.jsx(H, { size: "sm", c: b < 0 ? "red" : void 0, fw: b <= 7 ? 600 : void 0, children: n })
1759
1787
  ] }) });
1760
1788
  },
1761
1789
  inputFilterType: "text"
1762
1790
  }
1763
1791
  ),
1764
1792
  /* @__PURE__ */ e.jsx(
1765
- y,
1793
+ f,
1766
1794
  {
1767
1795
  dataField: "activated",
1768
1796
  dataType: "boolean",
@@ -1771,7 +1799,7 @@ function La({ height: r = "400px", width: h = "100%" }) {
1771
1799
  }
1772
1800
  ),
1773
1801
  /* @__PURE__ */ e.jsx(
1774
- y,
1802
+ f,
1775
1803
  {
1776
1804
  dataField: "revoked",
1777
1805
  dataType: "boolean",
@@ -1779,23 +1807,23 @@ function La({ height: r = "400px", width: h = "100%" }) {
1779
1807
  inputFilterType: "checkbox"
1780
1808
  }
1781
1809
  )
1782
- ] }), F = () => {
1783
- c.insert(la.newInstance()), c && !L.isDataSourceV2 && L.v1State.forceUpdate(), p("apiToken");
1810
+ ] }), D = () => {
1811
+ d.insert(ca.newInstance()), d && !L.isDataSourceV2 && L.v1State.forceUpdate(), p("apiToken");
1784
1812
  }, N = () => {
1785
- b.getCurrentRecord() && K.showConfirmDialogYesNo(
1813
+ g.getCurrentRecord() && K.showConfirmDialogYesNo(
1786
1814
  `${t().t("archbase:Confirme")}`,
1787
- `${t().t("archbase:Deseja revogar o token de API do usuário ")}${b.getCurrentRecord().user.name} ?`,
1815
+ `${t().t("archbase:Deseja revogar o token de API do usuário ")}${g.getCurrentRecord().user.name} ?`,
1788
1816
  async () => {
1789
- await u.revoke(b.getCurrentRecord().token).then(async () => {
1817
+ await h.revoke(g.getCurrentRecord().token).then(async () => {
1790
1818
  Q.showSuccess(
1791
1819
  `${t().t("mentors:Informação")}`,
1792
1820
  `${t().t("mentors:Token de API revogado com sucesso!")}`
1793
- ), b.refreshData(), b && !J.isDataSourceV2 && J.v1State.forceUpdate();
1794
- }).catch((R) => {
1821
+ ), g.refreshData(), g && !J.isDataSourceV2 && J.v1State.forceUpdate();
1822
+ }).catch((F) => {
1795
1823
  K.showErrorWithDetails(
1796
1824
  `${t().t("mentors:Atenção")}`,
1797
- Ae(R),
1798
- Ie(R)
1825
+ Ae(F),
1826
+ ze(F)
1799
1827
  );
1800
1828
  });
1801
1829
  },
@@ -1804,11 +1832,11 @@ function La({ height: r = "400px", width: h = "100%" }) {
1804
1832
  );
1805
1833
  }, I = () => {
1806
1834
  p("");
1807
- }, q = async (R, W) => {
1808
- const x = c.getCurrentRecord();
1835
+ }, q = async (F, W) => {
1836
+ const x = d.getCurrentRecord();
1809
1837
  if (x)
1810
1838
  try {
1811
- if (c.validate(), !x.user || !x.user.email) {
1839
+ if (d.validate(), !x.user || !x.user.email) {
1812
1840
  K.showErrorWithDetails(
1813
1841
  `${t().t("archbase:WARNING")}`,
1814
1842
  `${t().t("archbase:Selecione um usuário para o token de API")}`,
@@ -1816,28 +1844,28 @@ function La({ height: r = "400px", width: h = "100%" }) {
1816
1844
  );
1817
1845
  return;
1818
1846
  }
1819
- await u.create(x.user.email, x.expirationDate, x.name, x.description).then(async (g) => {
1820
- c.cancel(), c && !L.isDataSourceV2 && L.v1State.forceUpdate(), b.append(g), b && !J.isDataSourceV2 && J.v1State.forceUpdate(), Q.showSuccess(
1847
+ await h.create(x.user.email, x.expirationDate, x.name, x.description).then(async (j) => {
1848
+ d.cancel(), d && !L.isDataSourceV2 && L.v1State.forceUpdate(), g.append(j), g && !J.isDataSourceV2 && J.v1State.forceUpdate(), Q.showSuccess(
1821
1849
  `${t().t("mentors:Informação")}`,
1822
1850
  `${t().t("mentors:Token de API gerado com sucesso!")}`
1823
1851
  ), W && W(!0);
1824
- }).catch((g) => {
1852
+ }).catch((j) => {
1825
1853
  K.showErrorWithDetails(
1826
1854
  `${t().t("mentors:Atenção")}`,
1827
- Ae(g),
1828
- Ie(g)
1855
+ Ae(j),
1856
+ ze(j)
1829
1857
  );
1830
1858
  });
1831
- } catch (g) {
1859
+ } catch (j) {
1832
1860
  K.showErrorWithDetails(
1833
1861
  `${t().t("mentors:Atenção")}`,
1834
- Ae(g),
1835
- Ie(g)
1862
+ Ae(j),
1863
+ ze(j)
1836
1864
  );
1837
1865
  }
1838
1866
  }, o = () => /* @__PURE__ */ e.jsx(te, { justify: "space-between", style: { width: "50%" }, children: /* @__PURE__ */ e.jsxs($, { align: "start", gap: "2px", wrap: "nowrap", children: [
1839
- /* @__PURE__ */ e.jsx(U, { color: "green", leftSection: /* @__PURE__ */ e.jsx(Ee, {}), onClick: F, children: t().t("archbase:New") }),
1840
- /* @__PURE__ */ e.jsx(U, { disabled: !b.getCurrentRecord(), color: "red", leftSection: /* @__PURE__ */ e.jsx(Ce, {}), onClick: N, children: t().t("archbase:Revoke") })
1867
+ /* @__PURE__ */ e.jsx(M, { color: "green", leftSection: /* @__PURE__ */ e.jsx(Ie, {}), onClick: D, children: t().t("archbase:New") }),
1868
+ /* @__PURE__ */ e.jsx(M, { disabled: !g.getCurrentRecord(), color: "red", leftSection: /* @__PURE__ */ e.jsx(Ce, {}), onClick: N, children: t().t("archbase:Revoke") })
1841
1869
  ] }) });
1842
1870
  return /* @__PURE__ */ e.jsxs(Y, { p: "md", style: { height: r, display: "flex", flexDirection: "column" }, children: [
1843
1871
  /* @__PURE__ */ e.jsx(
@@ -1860,15 +1888,15 @@ function La({ height: r = "400px", width: h = "100%" }) {
1860
1888
  width: "100%",
1861
1889
  height: "100%",
1862
1890
  withBorder: !1,
1863
- dataSource: b,
1891
+ dataSource: g,
1864
1892
  withColumnBorders: !0,
1865
1893
  striped: !0,
1866
1894
  enableTopToolbar: !0,
1867
1895
  enableRowActions: !1,
1868
1896
  pageSize: 50,
1869
1897
  isLoading: re,
1870
- isError: !!f,
1871
- error: f,
1898
+ isError: !!m,
1899
+ error: m,
1872
1900
  enableGlobalFilter: !0,
1873
1901
  getRowId: i,
1874
1902
  toolbarLeftContent: o(),
@@ -1878,11 +1906,11 @@ function La({ height: r = "400px", width: h = "100%" }) {
1878
1906
  }
1879
1907
  ),
1880
1908
  P === "apiToken" ? /* @__PURE__ */ e.jsx(
1881
- Ca,
1909
+ Sa,
1882
1910
  {
1883
1911
  onClickOk: I,
1884
1912
  opened: !0,
1885
- dataSource: c,
1913
+ dataSource: d,
1886
1914
  onCustomSave: q,
1887
1915
  onClickCancel: I
1888
1916
  }
@@ -1890,14 +1918,14 @@ function La({ height: r = "400px", width: h = "100%" }) {
1890
1918
  ] });
1891
1919
  }
1892
1920
  export {
1893
- Ca as ApiTokenModal,
1894
- La as ArchbaseApiTokenView,
1895
- ba as ArchbaseDualListSelector,
1896
- $a as ArchbaseSecurityView,
1897
- wa as GroupModal,
1898
- Ue as PermissionsSelectorModal,
1899
- ma as ProfileModal,
1900
- ga as RenderProfileUserItem,
1901
- ya as UserModal
1921
+ Sa as ApiTokenModal,
1922
+ Va as ArchbaseApiTokenView,
1923
+ ga as ArchbaseDualListSelector,
1924
+ La as ArchbaseSecurityView,
1925
+ va as GroupModal,
1926
+ Me as PermissionsSelectorModal,
1927
+ ba as ProfileModal,
1928
+ ja as RenderProfileUserItem,
1929
+ wa as UserModal
1902
1930
  };
1903
1931
  //# sourceMappingURL=index.js.map