@archbase/security-ui 4.0.40 → 4.0.41

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