@archbase/security-ui 4.0.40 → 4.0.42

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