@archbase/security-ui 4.1.0 → 4.1.1

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.
Files changed (33) hide show
  1. package/dist/ApiTokenModal.d.ts +17 -0
  2. package/dist/ArchbaseApiTokenView.d.ts +6 -0
  3. package/dist/ArchbaseDualListSelector.d.ts +15 -0
  4. package/dist/ArchbaseSecurityView.d.ts +4 -0
  5. package/dist/GroupModal.d.ts +17 -0
  6. package/dist/PermissionsSelectorModal.d.ts +7 -0
  7. package/dist/ProfileModal.d.ts +17 -0
  8. package/dist/RenderProfileUserItem.d.ts +9 -0
  9. package/dist/UserModal.d.ts +57 -0
  10. package/dist/archbase-security-ui-4.1.1.tgz +0 -0
  11. package/dist/index.d.ts +18 -0
  12. package/dist/index.js +1091 -1128
  13. package/dist/securityDiagnostics/ArchbaseSecurityDiagnosticsView.d.ts +2 -0
  14. package/dist/securityDiagnostics/DiagnosticPrimitives.d.ts +34 -0
  15. package/dist/securityDiagnostics/EffectiveAccessPanel.d.ts +6 -0
  16. package/dist/securityDiagnostics/OverviewPanel.d.ts +6 -0
  17. package/dist/securityDiagnostics/SimulationPanel.d.ts +6 -0
  18. package/dist/securityDiagnostics/index.d.ts +6 -0
  19. package/dist/securityDiagnostics/types.d.ts +102 -0
  20. package/dist/securityView/SecurityGridPanel.d.ts +22 -0
  21. package/dist/securityView/SecurityRowActions.d.ts +15 -0
  22. package/dist/securityView/SecurityToolbarActions.d.ts +7 -0
  23. package/dist/securityView/UserItem.d.ts +7 -0
  24. package/dist/securityView/columns.d.ts +8 -0
  25. package/dist/securityView/index.d.ts +8 -0
  26. package/dist/securityView/noUserAvatar.d.ts +7 -0
  27. package/dist/securityView/types.d.ts +35 -0
  28. package/dist/securityView/useSecurityEntityActions.d.ts +32 -0
  29. package/package.json +6 -6
  30. package/dist/archbase-security-ui-4.1.0.tgz +0 -0
  31. package/dist/index.cjs +0 -10
  32. package/dist/index.cjs.map +0 -1
  33. package/dist/index.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,158 +1,120 @@
1
- import { Modal as Fe, ScrollArea as je, Stack as U, Grid as G, Group as D, Button as H, Paper as Y, Box as _e, Text as v, List as Ee, Checkbox as ea, Tooltip as ve, ActionIcon as de, Flex as Te, Space as pa, Input as ge, useTree as aa, useMantineColorScheme as Ne, TextInput as xe, Tree as ra, Badge as se, Tabs as Z, RingProgress as $a, SimpleGrid as Ve, Loader as Qe, Alert as Re, Chip as sa, Table as W } from "@mantine/core";
2
- import { getI18nextInstance as i, resolveArchbasePasswordPolicy as La, ARCHBASE_IOC_API_TYPE as Q, emit as $e, builder as ke, validateArchbasePassword as Na, convertDateToISOString as Va, processErrorMessage as ue, getKeyByEnumValue as pe, useArchbaseTheme as Xe, useArchbaseValidator as Ga, useArchbaseTranslation as Ma, useValidationErrors as Oa, processDetailErrorMessage as De } from "@archbase/core";
3
- import { ArchbaseEdit as re, ArchbaseNotifications as _, ArchbasePasswordEdit as Ua, ArchbaseSelect as Ba, ArchbaseCheckbox as fe, ArchbaseAvatarEdit as Wa, ArchbaseAsyncSelect as qa, Columns as we, ArchbaseDataGridColumn as S, ArchbaseDataGrid as xa, ArchbaseDialog as le } from "@archbase/components";
4
- import { useArchbaseV1V2Compatibility as Ie, useArchbaseDataSourceListener as ta, useArchbaseRemoteServiceApi as X, useArchbaseRemoteDataSource as Ze, ArchbaseDataSource as Ha, useArchbaseStore as ma, useArchbaseRemoteDataSourceV2 as Ce, useArchbaseDataSource as Ja } from "@archbase/data";
5
- import { useState as k, useCallback as ce, useEffect as ye, forwardRef as Za, useMemo as ae, useRef as be } from "react";
6
- import { IconArrowRight as ga, IconArrowLeft as fa, IconChevronDown as oa, IconBorderCornerSquare as ia, IconEye as Qa, IconEdit as ba, IconTrashX as Ye, IconShieldCheckered as Xa, IconPlus as ja, IconChartBar as Ya, IconListSearch as Ka, IconShieldSearch as _a } from "@tabler/icons-react";
7
- import { UserGroupDto as na, SecurityType as q, UserDto as er, GroupDto as ar, ProfileDto as rr, ApiTokenDto as sr } from "@archbase/security";
8
- import { DateTimePicker as tr } from "@mantine/dates";
9
- import { useFocusTrap as or, useDebouncedValue as la } from "@mantine/hooks";
10
- import { ArchbaseSpaceFixed as ir, ArchbaseSpaceFill as nr, ArchbaseSpaceBottom as lr } from "@archbase/layout";
11
- var Be = { exports: {} }, Se = {};
12
- /**
13
- * @license React
14
- * react-jsx-runtime.production.js
15
- *
16
- * Copyright (c) Meta Platforms, Inc. and affiliates.
17
- *
18
- * This source code is licensed under the MIT license found in the
19
- * LICENSE file in the root directory of this source tree.
20
- */
21
- var ca;
22
- function cr() {
23
- if (ca)
24
- return Se;
25
- ca = 1;
26
- var a = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment");
27
- function n(o, l, t) {
28
- var b = null;
29
- if (t !== void 0 && (b = "" + t), l.key !== void 0 && (b = "" + l.key), "key" in l) {
30
- t = {};
31
- for (var m in l)
32
- m !== "key" && (t[m] = l[m]);
33
- } else
34
- t = l;
35
- return l = t.ref, {
36
- $$typeof: a,
37
- type: o,
38
- key: b,
39
- ref: l !== void 0 ? l : null,
40
- props: t
41
- };
42
- }
43
- return Se.Fragment = r, Se.jsx = n, Se.jsxs = n, Se;
44
- }
45
- var da;
46
- function dr() {
47
- return da || (da = 1, Be.exports = cr()), Be.exports;
48
- }
49
- var e = dr();
50
- const ur = (a) => {
51
- const r = { ...a.options ?? {} }, n = () => {
52
- a.onCustomSave ? a.onCustomSave(a.dataSource.getCurrentRecord(), (l) => {
53
- l && a.onAfterSave && a.onAfterSave(a.dataSource.getCurrentRecord()), a.onClickOk(a.dataSource.getCurrentRecord(), l);
1
+ import { jsx as e, jsxs as o, Fragment as Ne } from "react/jsx-runtime";
2
+ import { Modal as ze, ScrollArea as we, Stack as W, Grid as O, Group as N, Button as Z, Paper as Y, Box as _e, Text as w, List as Ee, Checkbox as ea, Tooltip as Ce, ActionIcon as ue, Flex as Re, Space as ua, Input as be, useTree as aa, useMantineColorScheme as Ge, TextInput as ge, Tree as ra, Badge as te, Tabs as K, RingProgress as Ea, SimpleGrid as Me, Loader as Ke, Alert as ke, Chip as ta, Table as j } from "@mantine/core";
3
+ import { getI18nextInstance as s, resolveArchbasePasswordPolicy as $a, ARCHBASE_IOC_API_TYPE as Q, emit as Le, builder as Ie, validateArchbasePassword as Na, convertDateToISOString as La, processErrorMessage as he, getKeyByEnumValue as me, useArchbaseTheme as Qe, useArchbaseValidator as Va, useArchbaseTranslation as Ga, useValidationErrors as Ma, processDetailErrorMessage as $e } from "@archbase/core";
4
+ import { ArchbaseEdit as re, ArchbaseNotifications as ee, ArchbasePasswordEdit as Oa, ArchbaseSelect as Ua, ArchbaseCheckbox as ve, ArchbaseAvatarEdit as Ba, ArchbaseAsyncSelect as Wa, Columns as Ae, ArchbaseDataGridColumn as T, ArchbaseDataGrid as ha, ArchbaseDialog as ce } from "@archbase/components";
5
+ import { useArchbaseV1V2Compatibility as Pe, useArchbaseDataSourceListener as oa, useArchbaseRemoteServiceApi as X, useArchbaseRemoteDataSource as Je, ArchbaseDataSource as qa, useArchbaseStore as pa, useArchbaseRemoteDataSourceV2 as xe, useArchbaseDataSource as ja } from "@archbase/data";
6
+ import { useState as P, useCallback as de, useEffect as Se, forwardRef as Ha, useMemo as ae, useRef as ye } from "react";
7
+ import { IconArrowRight as ma, IconArrowLeft as ga, IconChevronDown as ia, IconBorderCornerSquare as na, IconEye as Za, IconEdit as fa, IconTrashX as Xe, IconShieldCheckered as Ja, IconPlus as ba, IconChartBar as Ka, IconListSearch as Qa, IconShieldSearch as Xa } from "@tabler/icons-react";
8
+ import { UserGroupDto as sa, SecurityType as H, UserDto as Ya, GroupDto as _a, ProfileDto as er, ApiTokenDto as ar } from "@archbase/security";
9
+ import { DateTimePicker as rr } from "@mantine/dates";
10
+ import { useFocusTrap as tr, useDebouncedValue as la } from "@mantine/hooks";
11
+ import { ArchbaseSpaceFixed as or, ArchbaseSpaceFill as ir, ArchbaseSpaceBottom as nr } from "@archbase/layout";
12
+ const sr = (a) => {
13
+ const r = { ...a.options ?? {} }, l = () => {
14
+ a.onCustomSave ? a.onCustomSave(a.dataSource.getCurrentRecord(), (h) => {
15
+ h && a.onAfterSave && a.onAfterSave(a.dataSource.getCurrentRecord()), a.onClickOk(a.dataSource.getCurrentRecord(), h);
54
16
  }) : a.onClickOk(a.dataSource.getCurrentRecord(), !0);
55
- }, o = () => {
17
+ }, i = () => {
56
18
  a.onClickCancel(a.dataSource.getCurrentRecord());
57
19
  };
58
- return /* @__PURE__ */ e.jsx(
59
- Fe,
20
+ return /* @__PURE__ */ e(
21
+ ze,
60
22
  {
61
23
  opened: a.opened,
62
- onClose: o,
63
- title: i().t("archbase:Perfil"),
24
+ onClose: i,
25
+ title: s().t("archbase:Perfil"),
64
26
  size: "60%",
65
27
  styles: { content: { maxWidth: 1e3 } },
66
- children: /* @__PURE__ */ e.jsx(je, { style: { height: "460px" }, children: /* @__PURE__ */ e.jsxs(U, { w: "98%", children: [
28
+ children: /* @__PURE__ */ e(we, { style: { height: "460px" }, children: /* @__PURE__ */ o(W, { w: "98%", children: [
67
29
  r?.customContentBefore && r.customContentBefore(a.dataSource.getCurrentRecord()),
68
- /* @__PURE__ */ e.jsxs(G, { children: [
69
- /* @__PURE__ */ e.jsx(G.Col, { span: { base: 12, md: 12, lg: 12 }, children: /* @__PURE__ */ e.jsx(
30
+ /* @__PURE__ */ o(O, { children: [
31
+ /* @__PURE__ */ e(O.Col, { span: { base: 12, md: 12, lg: 12 }, children: /* @__PURE__ */ e(
70
32
  re,
71
33
  {
72
- label: `${i().t("archbase:Nome do perfil")}`,
73
- placeholder: `${i().t("archbase:Informe o nome do perfil")}`,
34
+ label: `${s().t("archbase:Nome do perfil")}`,
35
+ placeholder: `${s().t("archbase:Informe o nome do perfil")}`,
74
36
  dataSource: a.dataSource,
75
37
  dataField: "name"
76
38
  }
77
39
  ) }),
78
- /* @__PURE__ */ e.jsx(G.Col, { span: { base: 12, md: 12, lg: 12 }, children: /* @__PURE__ */ e.jsx(
40
+ /* @__PURE__ */ e(O.Col, { span: { base: 12, md: 12, lg: 12 }, children: /* @__PURE__ */ e(
79
41
  re,
80
42
  {
81
- label: `${i().t("archbase:Descrição do perfil")}`,
82
- placeholder: `${i().t("archbase:Informe a descrição do perfil")}`,
43
+ label: `${s().t("archbase:Descrição do perfil")}`,
44
+ placeholder: `${s().t("archbase:Informe a descrição do perfil")}`,
83
45
  dataSource: a.dataSource,
84
46
  dataField: "description"
85
47
  }
86
48
  ) })
87
49
  ] }),
88
50
  r?.customContentAfter && r.customContentAfter(a.dataSource.getCurrentRecord()),
89
- /* @__PURE__ */ e.jsxs(D, { justify: "flex-end", mt: "md", children: [
90
- /* @__PURE__ */ e.jsx(H, { variant: "default", onClick: o, children: i().t("archbase:Cancelar") }),
91
- /* @__PURE__ */ e.jsx(H, { onClick: n, children: i().t("archbase:Salvar") })
51
+ /* @__PURE__ */ o(N, { justify: "flex-end", mt: "md", children: [
52
+ /* @__PURE__ */ e(Z, { variant: "default", onClick: i, children: s().t("archbase:Cancelar") }),
53
+ /* @__PURE__ */ e(Z, { onClick: l, children: s().t("archbase:Salvar") })
92
54
  ] })
93
55
  ] }) })
94
56
  }
95
57
  );
96
58
  };
97
- function hr({
59
+ function lr({
98
60
  availableItemsDS: a,
99
61
  assignedItemsDS: r,
100
- idFieldAvailable: n,
101
- labelFieldAvailable: o,
102
- idFieldAssigned: l,
103
- labelFieldAssigned: t,
104
- handleCreateAssociationObject: b,
105
- width: m = "400px",
106
- height: C = "200px",
62
+ idFieldAvailable: l,
63
+ labelFieldAvailable: i,
64
+ idFieldAssigned: h,
65
+ labelFieldAssigned: n,
66
+ handleCreateAssociationObject: A,
67
+ width: v = "400px",
68
+ height: x = "200px",
107
69
  titleAvailable: c = "Disponíveis",
108
- titleAssigned: y = "Selecionados"
70
+ titleAssigned: C = "Selecionados"
109
71
  }) {
110
- Ie(
72
+ Pe(
111
73
  "ArchbaseDualListSelector-Available",
112
74
  a,
113
75
  void 0,
114
76
  []
115
77
  );
116
- const u = Ie(
78
+ const u = Pe(
117
79
  "ArchbaseDualListSelector-Assigned",
118
80
  r,
119
81
  void 0,
120
82
  []
121
- ), [f, F] = k([]), [j, B] = k([]), [L, s] = k([]), [d, x] = k([]), I = ce(() => {
122
- a && F(a.browseRecords()), r && B(r.browseRecords());
83
+ ), [b, D] = P([]), [y, q] = P([]), [V, t] = P([]), [d, g] = P([]), F = de(() => {
84
+ a && D(a.browseRecords()), r && q(r.browseRecords());
123
85
  }, [a, r]);
124
- ta({
86
+ oa({
125
87
  dataSource: a,
126
- listener: () => I()
127
- }), ta({
88
+ listener: () => F()
89
+ }), oa({
128
90
  dataSource: r,
129
- listener: () => I()
130
- }), ye(() => {
131
- I();
132
- }, [I]);
133
- const P = (w, T) => typeof T == "function" ? T(w) : w[T], g = (w, T) => typeof T == "function" ? T(w) : w[T], ee = (w, T) => {
134
- w((A) => A.includes(T) ? A.filter((me) => me !== T) : [...A, T]);
135
- }, N = () => {
136
- L.forEach((w) => {
137
- const T = f.find((A) => P(A, n) === w);
138
- if (T) {
139
- const A = b(T);
140
- u.isDataSourceV2 ? (r.insert(A), r.save()) : (r.insert(A), r.save(), u.v1State.forceUpdate());
91
+ listener: () => F()
92
+ }), Se(() => {
93
+ F();
94
+ }, [F]);
95
+ const z = (S, k) => typeof k == "function" ? k(S) : S[k], f = (S, k) => typeof k == "function" ? k(S) : S[k], oe = (S, k) => {
96
+ S((R) => R.includes(k) ? R.filter((fe) => fe !== k) : [...R, k]);
97
+ }, G = () => {
98
+ V.forEach((S) => {
99
+ const k = b.find((R) => z(R, l) === S);
100
+ if (k) {
101
+ const R = A(k);
102
+ u.isDataSourceV2 ? (r.insert(R), r.save()) : (r.insert(R), r.save(), u.v1State.forceUpdate());
141
103
  }
142
- }), s([]);
104
+ }), t([]);
143
105
  }, J = () => {
144
- d.forEach((w) => {
145
- const T = j.find((A) => P(A, l) === w);
146
- if (T) {
147
- const A = typeof l == "function" ? { customId: l(T) } : { [l]: w };
148
- u.isDataSourceV2 ? r.remove(() => r.locate(A)) : (r.remove(() => r.locate(A)), u.v1State.forceUpdate());
106
+ d.forEach((S) => {
107
+ const k = y.find((R) => z(R, h) === S);
108
+ if (k) {
109
+ const R = typeof h == "function" ? { customId: h(k) } : { [h]: S };
110
+ u.isDataSourceV2 ? r.remove(() => r.locate(R)) : (r.remove(() => r.locate(R)), u.v1State.forceUpdate());
149
111
  }
150
- }), x([]);
112
+ }), g([]);
151
113
  };
152
- return /* @__PURE__ */ e.jsxs(Y, { withBorder: !0, style: { display: "flex", width: m, height: C }, children: [
153
- /* @__PURE__ */ e.jsxs(_e, { style: { minWidth: "44%", minHeight: C }, children: [
154
- /* @__PURE__ */ e.jsx(v, { children: c }),
155
- /* @__PURE__ */ e.jsx(
114
+ return /* @__PURE__ */ o(Y, { withBorder: !0, style: { display: "flex", width: v, height: x }, children: [
115
+ /* @__PURE__ */ o(_e, { style: { minWidth: "44%", minHeight: x }, children: [
116
+ /* @__PURE__ */ e(w, { children: c }),
117
+ /* @__PURE__ */ e(
156
118
  Ee,
157
119
  {
158
120
  spacing: "xs",
@@ -165,27 +127,27 @@ function hr({
165
127
  overflowX: "hidden",
166
128
  height: "calc(100% - 32px)"
167
129
  },
168
- children: f.map((w) => /* @__PURE__ */ e.jsx(Ee.Item, { children: /* @__PURE__ */ e.jsx(
130
+ children: b.map((S) => /* @__PURE__ */ e(Ee.Item, { children: /* @__PURE__ */ e(
169
131
  ea,
170
132
  {
171
- label: g(w, o),
172
- checked: L.includes(P(w, n)),
173
- onChange: () => ee(s, P(w, n)),
174
- disabled: j.some(
175
- (T) => P(T, l) === P(w, n)
133
+ label: f(S, i),
134
+ checked: V.includes(z(S, l)),
135
+ onChange: () => oe(t, z(S, l)),
136
+ disabled: y.some(
137
+ (k) => z(k, h) === z(S, l)
176
138
  )
177
139
  }
178
- ) }, P(w, n)))
140
+ ) }, z(S, l)))
179
141
  }
180
142
  )
181
143
  ] }),
182
- /* @__PURE__ */ e.jsxs(U, { gap: 5, style: { minWidth: "10%" }, justify: "center", align: "center", children: [
183
- /* @__PURE__ */ e.jsx(ve, { label: "Adicionar", children: /* @__PURE__ */ e.jsx(de, { onClick: N, disabled: !L.length, children: /* @__PURE__ */ e.jsx(ga, {}) }) }),
184
- /* @__PURE__ */ e.jsx(ve, { label: "Remover", children: /* @__PURE__ */ e.jsx(de, { onClick: J, disabled: !d.length, children: /* @__PURE__ */ e.jsx(fa, {}) }) })
144
+ /* @__PURE__ */ o(W, { gap: 5, style: { minWidth: "10%" }, justify: "center", align: "center", children: [
145
+ /* @__PURE__ */ e(Ce, { label: "Adicionar", children: /* @__PURE__ */ e(ue, { onClick: G, disabled: !V.length, children: /* @__PURE__ */ e(ma, {}) }) }),
146
+ /* @__PURE__ */ e(Ce, { label: "Remover", children: /* @__PURE__ */ e(ue, { onClick: J, disabled: !d.length, children: /* @__PURE__ */ e(ga, {}) }) })
185
147
  ] }),
186
- /* @__PURE__ */ e.jsxs(_e, { style: { minWidth: "44%", minHeight: C }, children: [
187
- /* @__PURE__ */ e.jsx(v, { children: y }),
188
- /* @__PURE__ */ e.jsx(
148
+ /* @__PURE__ */ o(_e, { style: { minWidth: "44%", minHeight: x }, children: [
149
+ /* @__PURE__ */ e(w, { children: C }),
150
+ /* @__PURE__ */ e(
189
151
  Ee,
190
152
  {
191
153
  spacing: "xs",
@@ -198,25 +160,25 @@ function hr({
198
160
  overflowX: "hidden",
199
161
  height: "calc(100% - 32px)"
200
162
  },
201
- children: j.map((w) => /* @__PURE__ */ e.jsx(Ee.Item, { children: /* @__PURE__ */ e.jsx(
163
+ children: y.map((S) => /* @__PURE__ */ e(Ee.Item, { children: /* @__PURE__ */ e(
202
164
  ea,
203
165
  {
204
- label: g(w, t),
205
- checked: d.includes(P(w, l)),
206
- onChange: () => ee(x, P(w, l))
166
+ label: f(S, n),
167
+ checked: d.includes(z(S, h)),
168
+ onChange: () => oe(g, z(S, h))
207
169
  }
208
- ) }, P(w, l)))
170
+ ) }, z(S, h)))
209
171
  }
210
172
  )
211
173
  ] })
212
174
  ] });
213
175
  }
214
- const pr = Za(
215
- ({ image: a, label: r, description: n, origin: o, ...l }, t) => /* @__PURE__ */ e.jsx("div", { ref: t, ...l, children: /* @__PURE__ */ e.jsxs(Te, { children: [
216
- /* @__PURE__ */ e.jsx(v, { size: "sm", fw: 600, children: o ? o.name : "" }),
217
- /* @__PURE__ */ e.jsx(pa, { w: "lg" })
176
+ const cr = Ha(
177
+ ({ image: a, label: r, description: l, origin: i, ...h }, n) => /* @__PURE__ */ e("div", { ref: n, ...h, children: /* @__PURE__ */ o(Re, { children: [
178
+ /* @__PURE__ */ e(w, { size: "sm", fw: 600, children: i ? i.name : "" }),
179
+ /* @__PURE__ */ e(ua, { w: "lg" })
218
180
  ] }) })
219
- ), xr = {
181
+ ), dr = {
220
182
  // Campos de identificação
221
183
  showNickname: !0,
222
184
  // Campos de perfil e grupos
@@ -240,239 +202,239 @@ const pr = Za(
240
202
  avatarImageQuality: 1,
241
203
  avatarMaxOutputSizePx: 512,
242
204
  allowEditEmail: !0
243
- }, mr = (a) => {
244
- const [r, n] = k(""), o = { ...xr, ...a.options ?? {} }, l = a.dataSource.getFieldValue("passwordChangedAt"), t = l ? new Date(l) : void 0, b = t && !Number.isNaN(t.getTime()) ? t.toLocaleString() : void 0, m = La(o.passwordPolicy), C = o.forbidPersonalDataInPassword ? ["name", "nickname", "email"].map((s) => {
245
- const d = a.dataSource.getFieldValue(s);
246
- return s === "email" && d ? d.split("@")[0] : d;
247
- }).filter((s) => typeof s == "string" && s.trim().length >= 3) : [], c = m ? {
248
- ...m,
249
- blocklist: [...m.blocklist ?? [], ...C]
250
- } : void 0, y = X(Q.Group), { dataSource: u } = Ze({
205
+ }, ur = (a) => {
206
+ const [r, l] = P(""), i = { ...dr, ...a.options ?? {} }, h = a.dataSource.getFieldValue("passwordChangedAt"), n = h ? new Date(h) : void 0, A = n && !Number.isNaN(n.getTime()) ? n.toLocaleString() : void 0, v = $a(i.passwordPolicy), x = i.forbidPersonalDataInPassword ? ["name", "nickname", "email"].map((t) => {
207
+ const d = a.dataSource.getFieldValue(t);
208
+ return t === "email" && d ? d.split("@")[0] : d;
209
+ }).filter((t) => typeof t == "string" && t.trim().length >= 3) : [], c = v ? {
210
+ ...v,
211
+ blocklist: [...v.blocklist ?? [], ...x]
212
+ } : void 0, C = X(Q.Group), { dataSource: u } = Je({
251
213
  name: "dsGroups",
252
- service: y,
214
+ service: C,
253
215
  pageSize: 9999,
254
216
  loadOnStart: !0,
255
217
  sort: ["name:asc"],
256
- onError: (s, d) => {
257
- _.showError(i().t("archbase:WARNING"), s, d);
218
+ onError: (t, d) => {
219
+ ee.showError(s().t("archbase:WARNING"), t, d);
258
220
  }
259
221
  });
260
222
  console.log("versão 12/05/2026");
261
- const f = X(Q.Profile), { dataSource: F } = Ze({
223
+ const b = X(Q.Profile), { dataSource: D } = Je({
262
224
  name: "dsProfiles",
263
- service: f,
225
+ service: b,
264
226
  pageSize: 9999,
265
227
  loadOnStart: !0,
266
228
  sort: ["name:asc"],
267
- onError: (s, d) => {
268
- _.showError(i().t("archbase:WARNING"), s, d);
229
+ onError: (t, d) => {
230
+ ee.showError(s().t("archbase:WARNING"), t, d);
269
231
  }
270
232
  });
271
- ye(() => {
272
- n("");
233
+ Se(() => {
234
+ l("");
273
235
  }, [a.dataSource.getFieldValue("password")]);
274
- const j = async () => {
236
+ const y = async () => {
275
237
  if (a.dataSource.isInserting()) {
276
- if (o.userDefaultProfile) {
277
- const s = $e(ke.eq("name", o.userDefaultProfile)), d = await f.findAllWithFilter(s, 0, 1);
238
+ if (i.userDefaultProfile) {
239
+ const t = Le(Ie.eq("name", i.userDefaultProfile)), d = await b.findAllWithFilter(t, 0, 1);
278
240
  d && d.content.length > 0 && a.dataSource.setFieldValue("profile", d.content[0]);
279
241
  }
280
- if (o.userDefaultGroups) {
281
- const s = $e(ke.in("name", o.userDefaultGroups)), d = await y.findAllWithFilter(s, 0, 500);
282
- d && d.content.length > 0 && a.dataSource.setFieldValue("groups", d.content.map((x) => na.newInstance(x)));
242
+ if (i.userDefaultGroups) {
243
+ const t = Le(Ie.in("name", i.userDefaultGroups)), d = await C.findAllWithFilter(t, 0, 500);
244
+ d && d.content.length > 0 && a.dataSource.setFieldValue("groups", d.content.map((g) => sa.newInstance(g)));
283
245
  }
284
246
  }
285
247
  };
286
- ye(() => {
287
- a.opened && j();
248
+ Se(() => {
249
+ a.opened && y();
288
250
  }, [a.opened]);
289
- const B = () => {
290
- const s = a.dataSource.getCurrentRecord();
291
- if (!s.password && a.dataSource.isInserting()) {
292
- n(i().t("archbase:Informe a senha"));
251
+ const q = () => {
252
+ const t = a.dataSource.getCurrentRecord();
253
+ if (!t.password && a.dataSource.isInserting()) {
254
+ l(s().t("archbase:Informe a senha"));
293
255
  return;
294
256
  }
295
- if (c && s.password) {
296
- const d = Na(s.password, c);
257
+ if (c && t.password) {
258
+ const d = Na(t.password, c);
297
259
  if (!d.valid) {
298
- n(d.error);
260
+ l(d.error);
299
261
  return;
300
262
  }
301
263
  }
302
- a.onCustomSave ? a.onCustomSave(s, (d) => {
303
- d && a.onAfterSave && a.onAfterSave(s), a.onClickOk(s, d);
304
- }) : a.onClickOk(s, !0);
305
- }, L = () => {
264
+ a.onCustomSave ? a.onCustomSave(t, (d) => {
265
+ d && a.onAfterSave && a.onAfterSave(t), a.onClickOk(t, d);
266
+ }) : a.onClickOk(t, !0);
267
+ }, V = () => {
306
268
  a.onClickCancel(a.dataSource.getCurrentRecord());
307
269
  };
308
- return /* @__PURE__ */ e.jsxs(
309
- Fe,
270
+ return /* @__PURE__ */ o(
271
+ ze,
310
272
  {
311
273
  opened: a.opened,
312
- onClose: L,
313
- title: i().t("archbase:Usuário"),
274
+ onClose: V,
275
+ title: s().t("archbase:Usuário"),
314
276
  size: "80%",
315
277
  styles: { content: { maxWidth: 1e3 } },
316
278
  children: [
317
- /* @__PURE__ */ e.jsx(je, { style: { height: "500px" }, children: /* @__PURE__ */ e.jsxs(U, { w: "98%", children: [
318
- o?.customContentBefore && /* @__PURE__ */ e.jsx(e.Fragment, { children: o.customContentBefore(a.dataSource.getCurrentRecord()) }),
319
- /* @__PURE__ */ e.jsxs(G, { children: [
320
- /* @__PURE__ */ e.jsx(G.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e.jsxs(D, { children: [
321
- /* @__PURE__ */ e.jsx(
279
+ /* @__PURE__ */ e(we, { style: { height: "500px" }, children: /* @__PURE__ */ o(W, { w: "98%", children: [
280
+ i?.customContentBefore && /* @__PURE__ */ e(Ne, { children: i.customContentBefore(a.dataSource.getCurrentRecord()) }),
281
+ /* @__PURE__ */ o(O, { children: [
282
+ /* @__PURE__ */ e(O.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ o(N, { children: [
283
+ /* @__PURE__ */ e(
322
284
  re,
323
285
  {
324
- label: `${i().t("archbase:Nome completo")}`,
325
- placeholder: `${i().t("archbase:Informe o nome completo do usuário")}`,
286
+ label: `${s().t("archbase:Nome completo")}`,
287
+ placeholder: `${s().t("archbase:Informe o nome completo do usuário")}`,
326
288
  dataSource: a.dataSource,
327
289
  dataField: "name",
328
290
  required: !0,
329
291
  width: "calc(100% - 208px)"
330
292
  }
331
293
  ),
332
- o.showNickname && /* @__PURE__ */ e.jsx(
294
+ i.showNickname && /* @__PURE__ */ e(
333
295
  re,
334
296
  {
335
- label: `${i().t("archbase:Apelido")}`,
336
- placeholder: `${i().t("archbase:Apelido")}`,
297
+ label: `${s().t("archbase:Apelido")}`,
298
+ placeholder: `${s().t("archbase:Apelido")}`,
337
299
  dataSource: a.dataSource,
338
300
  dataField: "nickname",
339
- required: o.requiredNickname
301
+ required: i.requiredNickname
340
302
  }
341
303
  )
342
304
  ] }) }),
343
- /* @__PURE__ */ e.jsx(G.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e.jsx(
305
+ /* @__PURE__ */ e(O.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e(
344
306
  re,
345
307
  {
346
- label: `${i().t("archbase:Descrição do usuário")}`,
347
- placeholder: `${i().t("archbase:Informe a descrição do usuário")}`,
308
+ label: `${s().t("archbase:Descrição do usuário")}`,
309
+ placeholder: `${s().t("archbase:Informe a descrição do usuário")}`,
348
310
  dataSource: a.dataSource,
349
311
  dataField: "description",
350
312
  required: !0
351
313
  }
352
314
  ) })
353
315
  ] }),
354
- /* @__PURE__ */ e.jsxs(G, { children: [
355
- /* @__PURE__ */ e.jsx(G.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e.jsx(
316
+ /* @__PURE__ */ o(O, { children: [
317
+ /* @__PURE__ */ e(O.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e(
356
318
  re,
357
319
  {
358
- label: `${i().t("archbase:E-mail")}`,
359
- placeholder: `${i().t("archbase:Informe o e-mail do usuário")}`,
320
+ label: `${s().t("archbase:E-mail")}`,
321
+ placeholder: `${s().t("archbase:Informe o e-mail do usuário")}`,
360
322
  dataSource: a.dataSource,
361
- onChangeValue: (s) => a.dataSource.setFieldValue("userName", s),
323
+ onChangeValue: (t) => a.dataSource.setFieldValue("userName", t),
362
324
  dataField: "email",
363
- readOnly: a.dataSource.isEditing() ? !o.allowEditEmail : !1,
325
+ readOnly: a.dataSource.isEditing() ? !i.allowEditEmail : !1,
364
326
  required: !0
365
327
  }
366
328
  ) }),
367
- /* @__PURE__ */ e.jsx(G.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e.jsx(
368
- Ua,
329
+ /* @__PURE__ */ e(O.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e(
330
+ Oa,
369
331
  {
370
- label: `${i().t("archbase:Senha usuário")}`,
332
+ label: `${s().t("archbase:Senha usuário")}`,
371
333
  dataSource: a.dataSource,
372
334
  dataField: "password",
373
335
  error: r,
374
336
  required: a.dataSource.getFieldValue("isNewUser"),
375
337
  passwordPolicy: c,
376
- showPasswordRequirements: o.showPasswordRequirements
338
+ showPasswordRequirements: i.showPasswordRequirements
377
339
  }
378
340
  ) })
379
341
  ] }),
380
- /* @__PURE__ */ e.jsx(G, { children: o.showProfile && /* @__PURE__ */ e.jsx(G.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e.jsx(
381
- Ba,
342
+ /* @__PURE__ */ e(O, { children: i.showProfile && /* @__PURE__ */ e(O.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e(
343
+ Ua,
382
344
  {
383
- label: `${i().t("archbase:Perfil do usuário")}`,
345
+ label: `${s().t("archbase:Perfil do usuário")}`,
384
346
  dataSource: a.dataSource,
385
347
  dataField: "profile",
386
- options: F,
348
+ options: D,
387
349
  allowDeselect: !0,
388
350
  optionsLabelField: "nome",
389
- itemComponent: pr,
390
- getOptionLabel: (s) => s.name,
391
- getOptionValue: (s) => s.id
351
+ itemComponent: cr,
352
+ getOptionLabel: (t) => t.name,
353
+ getOptionValue: (t) => t.id
392
354
  }
393
355
  ) }) }),
394
- /* @__PURE__ */ e.jsxs(G, { children: [
395
- /* @__PURE__ */ e.jsx(G.Col, { span: { base: 12 }, children: o.showAccountConfigLabel && /* @__PURE__ */ e.jsx(v, { fz: 14, fw: 500, children: "Informe" }) }),
396
- /* @__PURE__ */ e.jsx(G.Col, { span: { base: 12, md: 4, lg: 4 }, children: /* @__PURE__ */ e.jsxs(U, { gap: "lg", children: [
397
- o.showChangePasswordOnNextLogin && /* @__PURE__ */ e.jsx(ge.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
398
- fe,
356
+ /* @__PURE__ */ o(O, { children: [
357
+ /* @__PURE__ */ e(O.Col, { span: { base: 12 }, children: i.showAccountConfigLabel && /* @__PURE__ */ e(w, { fz: 14, fw: 500, children: "Informe" }) }),
358
+ /* @__PURE__ */ e(O.Col, { span: { base: 12, md: 4, lg: 4 }, children: /* @__PURE__ */ o(W, { gap: "lg", children: [
359
+ i.showChangePasswordOnNextLogin && /* @__PURE__ */ e(be.Wrapper, { label: "", children: /* @__PURE__ */ e(
360
+ ve,
399
361
  {
400
362
  dataSource: a.dataSource,
401
363
  dataField: "changePasswordOnNextLogin",
402
- label: `${i().t("archbase:Deve alterar senha próximo login ?")}`
364
+ label: `${s().t("archbase:Deve alterar senha próximo login ?")}`
403
365
  }
404
366
  ) }),
405
- o.showAllowPasswordChange && /* @__PURE__ */ e.jsx(ge.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
406
- fe,
367
+ i.showAllowPasswordChange && /* @__PURE__ */ e(be.Wrapper, { label: "", children: /* @__PURE__ */ e(
368
+ ve,
407
369
  {
408
370
  dataSource: a.dataSource,
409
371
  dataField: "allowPasswordChange",
410
- label: `${i().t("archbase:Pode alterar a senha ?")}`
372
+ label: `${s().t("archbase:Pode alterar a senha ?")}`
411
373
  }
412
374
  ) }),
413
- o.showPasswordNeverExpires && /* @__PURE__ */ e.jsxs(ge.Wrapper, { label: "", children: [
414
- /* @__PURE__ */ e.jsx(
415
- fe,
375
+ i.showPasswordNeverExpires && /* @__PURE__ */ o(be.Wrapper, { label: "", children: [
376
+ /* @__PURE__ */ e(
377
+ ve,
416
378
  {
417
379
  dataSource: a.dataSource,
418
380
  dataField: "passwordNeverExpires",
419
- label: `${i().t("archbase:Senha nunca expira ?")}`
381
+ label: `${s().t("archbase:Senha nunca expira ?")}`
420
382
  }
421
383
  ),
422
- /* @__PURE__ */ e.jsx(v, { fz: 12, c: "dimmed", children: i().t(
384
+ /* @__PURE__ */ e(w, { fz: 12, c: "dimmed", children: s().t(
423
385
  'archbase:Desmarcado, a senha expira conforme a política de validade do servidor. Para exigir a troca agora, use "Deve alterar senha próximo login".'
424
386
  ) })
425
387
  ] }),
426
- o.showPasswordChangedAt && b && /* @__PURE__ */ e.jsx(v, { fz: 12, c: "dimmed", children: `${i().t("archbase:Última troca de senha")}: ${b}` })
388
+ i.showPasswordChangedAt && A && /* @__PURE__ */ e(w, { fz: 12, c: "dimmed", children: `${s().t("archbase:Última troca de senha")}: ${A}` })
427
389
  ] }) }),
428
- /* @__PURE__ */ e.jsx(G.Col, { span: { base: 12, md: 4, lg: 4 }, children: /* @__PURE__ */ e.jsxs(U, { gap: "lg", children: [
429
- o.showAccountDeactivated && /* @__PURE__ */ e.jsx(ge.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
430
- fe,
390
+ /* @__PURE__ */ e(O.Col, { span: { base: 12, md: 4, lg: 4 }, children: /* @__PURE__ */ o(W, { gap: "lg", children: [
391
+ i.showAccountDeactivated && /* @__PURE__ */ e(be.Wrapper, { label: "", children: /* @__PURE__ */ e(
392
+ ve,
431
393
  {
432
394
  dataSource: a.dataSource,
433
395
  dataField: "accountDeactivated",
434
- label: `${i().t("archbase:Conta desativada ?")}`
396
+ label: `${s().t("archbase:Conta desativada ?")}`
435
397
  }
436
398
  ) }),
437
- o.showAccountLocked && /* @__PURE__ */ e.jsx(ge.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
438
- fe,
399
+ i.showAccountLocked && /* @__PURE__ */ e(be.Wrapper, { label: "", children: /* @__PURE__ */ e(
400
+ ve,
439
401
  {
440
402
  dataSource: a.dataSource,
441
403
  dataField: "accountLocked",
442
- label: `${i().t("archbase:Conta bloqueada ?")}`
404
+ label: `${s().t("archbase:Conta bloqueada ?")}`
443
405
  }
444
406
  ) }),
445
- o.showIsAdministrator && /* @__PURE__ */ e.jsx(ge.Wrapper, { label: "", children: /* @__PURE__ */ e.jsx(
446
- fe,
407
+ i.showIsAdministrator && /* @__PURE__ */ e(be.Wrapper, { label: "", children: /* @__PURE__ */ e(
408
+ ve,
447
409
  {
448
410
  dataSource: a.dataSource,
449
411
  dataField: "isAdministrator",
450
- label: `${i().t("archbase:Administrador ?")}`
412
+ label: `${s().t("archbase:Administrador ?")}`
451
413
  }
452
414
  ) })
453
415
  ] }) }),
454
- /* @__PURE__ */ e.jsx(G.Col, { span: { base: 12, md: 4, lg: 4 }, children: /* @__PURE__ */ e.jsx(U, { gap: "lg", children: /* @__PURE__ */ e.jsx(
455
- Wa,
416
+ /* @__PURE__ */ e(O.Col, { span: { base: 12, md: 4, lg: 4 }, children: /* @__PURE__ */ e(W, { gap: "lg", children: /* @__PURE__ */ e(
417
+ Ba,
456
418
  {
457
- label: i().t("archbase:Foto do usuário"),
419
+ label: s().t("archbase:Foto do usuário"),
458
420
  dataSource: a.dataSource,
459
421
  dataField: "avatar",
460
422
  width: 120,
461
423
  height: 120,
462
- maxSizeKB: o.avatarMaxSizeKB,
463
- imageQuality: o.avatarImageQuality,
464
- maxOutputSizePx: o.avatarMaxOutputSizePx
424
+ maxSizeKB: i.avatarMaxSizeKB,
425
+ imageQuality: i.avatarImageQuality,
426
+ maxOutputSizePx: i.avatarMaxOutputSizePx
465
427
  }
466
428
  ) }) })
467
429
  ] }),
468
- o.showGroups && /* @__PURE__ */ e.jsxs(G, { children: [
469
- /* @__PURE__ */ e.jsx(G.Col, { span: { base: 12 }, children: /* @__PURE__ */ e.jsx(v, { fz: 14, fw: 500, children: "Grupos" }) }),
470
- /* @__PURE__ */ e.jsx(G.Col, { span: { base: 12 }, children: /* @__PURE__ */ e.jsx(
471
- hr,
430
+ i.showGroups && /* @__PURE__ */ o(O, { children: [
431
+ /* @__PURE__ */ e(O.Col, { span: { base: 12 }, children: /* @__PURE__ */ e(w, { fz: 14, fw: 500, children: "Grupos" }) }),
432
+ /* @__PURE__ */ e(O.Col, { span: { base: 12 }, children: /* @__PURE__ */ e(
433
+ lr,
472
434
  {
473
- titleAvailable: i().t("archbase:Disponíveis"),
474
- titleAssigned: i().t("archbase:Selecionados"),
475
- assignedItemsDS: new Ha("dsDualList", {
435
+ titleAvailable: s().t("archbase:Disponíveis"),
436
+ titleAssigned: s().t("archbase:Selecionados"),
437
+ assignedItemsDS: new qa("dsDualList", {
476
438
  records: a.dataSource.getFieldValue("groups"),
477
439
  grandTotalRecords: a.dataSource.getFieldValue("groups").length,
478
440
  currentPage: 0,
@@ -482,332 +444,334 @@ const pr = Za(
482
444
  width: "100%",
483
445
  height: "200px",
484
446
  availableItemsDS: u,
485
- handleCreateAssociationObject: (s) => na.newInstance(s),
486
- idFieldAssigned: (s) => s && s.group ? s.group.id : "",
447
+ handleCreateAssociationObject: (t) => sa.newInstance(t),
448
+ idFieldAssigned: (t) => t && t.group ? t.group.id : "",
487
449
  idFieldAvailable: "id",
488
- labelFieldAssigned: (s) => s && s.group ? s.group.name : "",
450
+ labelFieldAssigned: (t) => t && t.group ? t.group.name : "",
489
451
  labelFieldAvailable: "name"
490
452
  }
491
453
  ) })
492
454
  ] }),
493
- o?.customContentAfter && /* @__PURE__ */ e.jsx(e.Fragment, { children: o.customContentAfter(a.dataSource.getCurrentRecord()) }),
494
- /* @__PURE__ */ e.jsx(pa, { h: "12px" })
455
+ i?.customContentAfter && /* @__PURE__ */ e(Ne, { children: i.customContentAfter(a.dataSource.getCurrentRecord()) }),
456
+ /* @__PURE__ */ e(ua, { h: "12px" })
495
457
  ] }) }),
496
- /* @__PURE__ */ e.jsxs(D, { justify: "flex-end", mt: "md", children: [
497
- /* @__PURE__ */ e.jsx(H, { variant: "default", onClick: L, children: i().t("archbase:Cancelar") }),
498
- /* @__PURE__ */ e.jsx(H, { onClick: B, children: i().t("archbase:Salvar") })
458
+ /* @__PURE__ */ o(N, { justify: "flex-end", mt: "md", children: [
459
+ /* @__PURE__ */ e(Z, { variant: "default", onClick: V, children: s().t("archbase:Cancelar") }),
460
+ /* @__PURE__ */ e(Z, { onClick: q, children: s().t("archbase:Salvar") })
499
461
  ] })
500
462
  ]
501
463
  }
502
464
  );
503
- }, gr = (a) => {
504
- const r = { ...a.options ?? {} }, n = () => {
505
- a.onCustomSave ? a.onCustomSave(a.dataSource.getCurrentRecord(), (l) => {
506
- l && a.onAfterSave && a.onAfterSave(a.dataSource.getCurrentRecord()), a.onClickOk(a.dataSource.getCurrentRecord(), l);
465
+ }, hr = (a) => {
466
+ const r = { ...a.options ?? {} }, l = () => {
467
+ a.onCustomSave ? a.onCustomSave(a.dataSource.getCurrentRecord(), (h) => {
468
+ h && a.onAfterSave && a.onAfterSave(a.dataSource.getCurrentRecord()), a.onClickOk(a.dataSource.getCurrentRecord(), h);
507
469
  }) : a.onClickOk(a.dataSource.getCurrentRecord(), !0);
508
- }, o = () => {
470
+ }, i = () => {
509
471
  a.onClickCancel(a.dataSource.getCurrentRecord());
510
472
  };
511
- return /* @__PURE__ */ e.jsx(
512
- Fe,
473
+ return /* @__PURE__ */ e(
474
+ ze,
513
475
  {
514
476
  opened: a.opened,
515
- onClose: o,
516
- title: i().t("archbase:Grupo"),
477
+ onClose: i,
478
+ title: s().t("archbase:Grupo"),
517
479
  size: "60%",
518
480
  styles: { content: { maxWidth: 1e3 } },
519
- children: /* @__PURE__ */ e.jsx(je, { style: { height: "460px" }, children: /* @__PURE__ */ e.jsxs(U, { w: "98%", children: [
481
+ children: /* @__PURE__ */ e(we, { style: { height: "460px" }, children: /* @__PURE__ */ o(W, { w: "98%", children: [
520
482
  r?.customContentBefore && r.customContentBefore(a.dataSource.getCurrentRecord()),
521
- /* @__PURE__ */ e.jsxs(G, { children: [
522
- /* @__PURE__ */ e.jsx(G.Col, { span: { base: 12 }, children: /* @__PURE__ */ e.jsx(
483
+ /* @__PURE__ */ o(O, { children: [
484
+ /* @__PURE__ */ e(O.Col, { span: { base: 12 }, children: /* @__PURE__ */ e(
523
485
  re,
524
486
  {
525
- label: `${i().t("archbase:Nome do grupo")}`,
526
- placeholder: `${i().t("archbase:Informe o nome do grupo")}`,
487
+ label: `${s().t("archbase:Nome do grupo")}`,
488
+ placeholder: `${s().t("archbase:Informe o nome do grupo")}`,
527
489
  dataSource: a.dataSource,
528
490
  dataField: "name"
529
491
  }
530
492
  ) }),
531
- /* @__PURE__ */ e.jsx(G.Col, { span: { base: 12 }, children: /* @__PURE__ */ e.jsx(
493
+ /* @__PURE__ */ e(O.Col, { span: { base: 12 }, children: /* @__PURE__ */ e(
532
494
  re,
533
495
  {
534
- label: `${i().t("archbase:Descrição do grupo")}`,
535
- placeholder: `${i().t("archbase:Informe a descrição do grupo")}`,
496
+ label: `${s().t("archbase:Descrição do grupo")}`,
497
+ placeholder: `${s().t("archbase:Informe a descrição do grupo")}`,
536
498
  dataSource: a.dataSource,
537
499
  dataField: "description"
538
500
  }
539
501
  ) })
540
502
  ] }),
541
503
  r?.customContentAfter && r.customContentAfter(a.dataSource.getCurrentRecord()),
542
- /* @__PURE__ */ e.jsxs(D, { justify: "flex-end", mt: "md", children: [
543
- /* @__PURE__ */ e.jsx(H, { variant: "default", onClick: o, children: i().t("archbase:Cancelar") }),
544
- /* @__PURE__ */ e.jsx(H, { onClick: n, children: i().t("archbase:Salvar") })
504
+ /* @__PURE__ */ o(N, { justify: "flex-end", mt: "md", children: [
505
+ /* @__PURE__ */ e(Z, { variant: "default", onClick: i, children: s().t("archbase:Cancelar") }),
506
+ /* @__PURE__ */ e(Z, { onClick: l, children: s().t("archbase:Salvar") })
545
507
  ] })
546
508
  ] }) })
547
509
  }
548
510
  );
549
- }, fr = ({ image: a, label: r, description: n, ...o }) => /* @__PURE__ */ e.jsx("div", { ...o, children: /* @__PURE__ */ e.jsxs(D, { grow: !0, children: [
550
- /* @__PURE__ */ e.jsx("img", { style: { maxWidth: "32px" }, src: a }),
551
- /* @__PURE__ */ e.jsxs("div", { children: [
552
- /* @__PURE__ */ e.jsx(v, { size: "sm", children: r }),
553
- /* @__PURE__ */ e.jsx(v, { size: "xs", opacity: 0.65, children: n })
511
+ }, pr = ({ image: a, label: r, description: l, ...i }) => /* @__PURE__ */ e("div", { ...i, children: /* @__PURE__ */ o(N, { grow: !0, children: [
512
+ /* @__PURE__ */ e("img", { style: { maxWidth: "32px" }, src: a }),
513
+ /* @__PURE__ */ o("div", { children: [
514
+ /* @__PURE__ */ e(w, { size: "sm", children: r }),
515
+ /* @__PURE__ */ e(w, { size: "xs", opacity: 0.65, children: l })
554
516
  ] })
555
- ] }) }), br = (a) => {
556
- or();
557
- const [r, n] = k(), o = X(Q.User), l = Ie(
517
+ ] }) }), mr = (a) => {
518
+ tr();
519
+ const [r, l] = P(), i = X(Q.User), h = Pe(
558
520
  "ApiTokenModal",
559
521
  a.dataSource,
560
522
  "expirationDate",
561
523
  ""
562
- ), t = (c) => {
524
+ );
525
+ process.env.NODE_ENV === "development" && a.dataSource && console.log(`[ApiTokenModal] DataSource version: ${h.dataSourceVersion}`);
526
+ const n = (c) => {
563
527
  if (!c)
564
- l.handleValueChange(void 0);
528
+ h.handleValueChange(void 0);
565
529
  else {
566
- const y = typeof c == "string" ? new Date(c) : c, u = Va(y);
567
- l.handleValueChange(u);
530
+ const C = typeof c == "string" ? new Date(c) : c, u = La(C);
531
+ h.handleValueChange(u);
568
532
  }
569
- n(c);
570
- }, b = async (c, y) => new Promise(async (u, f) => {
533
+ l(c);
534
+ }, A = async (c, C) => new Promise(async (u, b) => {
571
535
  try {
572
- const F = $e(ke.or(ke.eq("name", `^*${y.trim()}*`))), j = await o.findAllWithFilter(F, c, 20);
536
+ const D = Le(Ie.or(Ie.eq("name", `^*${C.trim()}*`))), y = await i.findAllWithFilter(D, c, 20);
573
537
  u({
574
- options: j.content,
575
- page: j.pageable.pageNumber,
576
- totalPages: j.totalPages
538
+ options: y.content,
539
+ page: y.pageable.pageNumber,
540
+ totalPages: y.totalPages
577
541
  });
578
- } catch (F) {
579
- f(ue(F));
542
+ } catch (D) {
543
+ b(he(D));
580
544
  }
581
- }), m = () => {
545
+ }), v = () => {
582
546
  a.onCustomSave ? a.onCustomSave(a.dataSource.current, (c) => {
583
547
  c && a.onAfterSave && a.onAfterSave(a.dataSource.current), a.onClickOk(a.dataSource.current, c);
584
548
  }) : a.onClickOk(a.dataSource.current, !0);
585
- }, C = () => {
549
+ }, x = () => {
586
550
  a.onClickCancel(a.dataSource.current);
587
551
  };
588
- return /* @__PURE__ */ e.jsxs(
589
- Fe,
552
+ return /* @__PURE__ */ o(
553
+ ze,
590
554
  {
591
555
  opened: a.opened,
592
- onClose: C,
593
- title: i().t("archbase:Token de API"),
556
+ onClose: x,
557
+ title: s().t("archbase:Token de API"),
594
558
  size: "50%",
595
559
  children: [
596
- /* @__PURE__ */ e.jsxs(je, { style: { height: "300px" }, children: [
597
- /* @__PURE__ */ e.jsx(
560
+ /* @__PURE__ */ o(we, { style: { height: "300px" }, children: [
561
+ /* @__PURE__ */ e(
598
562
  re,
599
563
  {
600
- label: `${i().t("archbase:Nome do token")}`,
601
- placeholder: `${i().t("archbase:Informe o nome do token")}`,
564
+ label: `${s().t("archbase:Nome do token")}`,
565
+ placeholder: `${s().t("archbase:Informe o nome do token")}`,
602
566
  dataSource: a.dataSource,
603
567
  dataField: "name"
604
568
  }
605
569
  ),
606
- /* @__PURE__ */ e.jsx(
570
+ /* @__PURE__ */ e(
607
571
  re,
608
572
  {
609
- label: `${i().t("archbase:Descrição do token")}`,
610
- placeholder: `${i().t("archbase:Informe a descrição do token")}`,
573
+ label: `${s().t("archbase:Descrição do token")}`,
574
+ placeholder: `${s().t("archbase:Informe a descrição do token")}`,
611
575
  dataSource: a.dataSource,
612
576
  dataField: "description"
613
577
  }
614
578
  ),
615
- /* @__PURE__ */ e.jsx(
616
- tr,
579
+ /* @__PURE__ */ e(
580
+ rr,
617
581
  {
618
582
  withSeconds: !0,
619
583
  value: r,
620
- onChange: t,
584
+ onChange: n,
621
585
  label: "Data/hora expiração",
622
586
  placeholder: "Selecione a data de expiração"
623
587
  }
624
588
  ),
625
- /* @__PURE__ */ e.jsx(
626
- qa,
589
+ /* @__PURE__ */ e(
590
+ Wa,
627
591
  {
628
- label: `${i().t("archbase:Usuário")}`,
592
+ label: `${s().t("archbase:Usuário")}`,
629
593
  dataSource: a.dataSource,
630
594
  dataField: "user",
631
- placeholder: `${i().t("archbase:Digite aqui o nome do usuário")}`,
595
+ placeholder: `${s().t("archbase:Digite aqui o nome do usuário")}`,
632
596
  getOptionLabel: (c) => c && c.email ? c.email : "",
633
597
  getOptionValue: (c) => c && c.id ? c.id.toString() : "",
634
- getOptions: b,
598
+ getOptions: A,
635
599
  debounceTime: 500,
636
600
  minCharsToSearch: 1,
637
- itemComponent: fr
601
+ itemComponent: pr
638
602
  }
639
603
  )
640
604
  ] }),
641
- /* @__PURE__ */ e.jsxs(D, { justify: "flex-end", mt: "md", children: [
642
- /* @__PURE__ */ e.jsx(H, { variant: "default", onClick: C, children: i().t("archbase:Cancelar") }),
643
- /* @__PURE__ */ e.jsx(H, { onClick: m, children: i().t("archbase:Salvar") })
605
+ /* @__PURE__ */ o(N, { justify: "flex-end", mt: "md", children: [
606
+ /* @__PURE__ */ e(Z, { variant: "default", onClick: x, children: s().t("archbase:Cancelar") }),
607
+ /* @__PURE__ */ e(Z, { onClick: v, children: s().t("archbase:Salvar") })
644
608
  ] })
645
609
  ]
646
610
  }
647
611
  );
648
- }, ua = (a) => {
612
+ }, ca = (a) => {
649
613
  const r = "->";
650
- return a.includes(r) ? a.split(r).map((l) => l.trim()).map((l) => i().t(l)).join(` ${r} `) : i().t(a);
614
+ return a.includes(r) ? a.split(r).map((h) => h.trim()).map((h) => s().t(h)).join(` ${r} `) : s().t(a);
651
615
  };
652
- function We({ dataSource: a, opened: r, close: n }) {
653
- const o = ae(() => a?.getFieldValue("name") || "", [a]), l = ae(() => a?.getFieldValue("id") || "", [a]), t = ae(() => a?.getFieldValue("type") || "", [a]), b = aa(), m = aa(), [C, c] = k([]), [y, u] = k([]), [f, F] = k(), [j, B] = k(), [L, s] = k(""), [d] = la(L, 200), [x, I] = k(""), [P] = la(x, 200), g = X(Q.Resource), { colorScheme: ee } = Ne(), N = ee === "dark" ? "var(--mantine-primary-color-7)" : "var(--mantine-primary-color-4)", J = ae(() => y.sort((h, p) => h.resourceDescription.localeCompare(p.resourceDescription)).map((h) => ({
654
- value: h.resourceId,
655
- label: h.resourceDescription,
656
- children: h.permissions.filter((p) => p.actionDescription.toLowerCase().includes(P.toLowerCase())).sort((p, V) => p.actionDescription.localeCompare(V.actionDescription)).map((p) => ({
657
- value: p.actionId,
658
- label: p.actionDescription,
616
+ function qe({ dataSource: a, opened: r, close: l }) {
617
+ const i = ae(() => a?.getFieldValue("name") || "", [a]), h = ae(() => a?.getFieldValue("id") || "", [a]), n = ae(() => a?.getFieldValue("type") || "", [a]), A = aa(), v = aa(), [x, c] = P([]), [C, u] = P([]), [b, D] = P(), [y, q] = P(), [V, t] = P(""), [d] = la(V, 200), [g, F] = P(""), [z] = la(g, 200), f = X(Q.Resource), { colorScheme: oe } = Ge(), G = oe === "dark" ? "var(--mantine-primary-color-7)" : "var(--mantine-primary-color-4)", J = ae(() => C.sort((p, m) => p.resourceDescription.localeCompare(m.resourceDescription)).map((p) => ({
618
+ value: p.resourceId,
619
+ label: p.resourceDescription,
620
+ children: p.permissions.filter((m) => m.actionDescription.toLowerCase().includes(z.toLowerCase())).sort((m, M) => m.actionDescription.localeCompare(M.actionDescription)).map((m) => ({
621
+ value: m.actionId,
622
+ label: m.actionDescription,
659
623
  nodeProps: {
660
- permissionId: p.permissionId,
661
- types: p.types ?? [],
662
- owner: h
624
+ permissionId: m.permissionId,
625
+ types: m.types ?? [],
626
+ owner: p
663
627
  }
664
628
  }))
665
- })), [y, P]), w = ae(() => y.map((h) => h.permissions.map((p) => p.actionId)).flat(), [y]), T = ae(() => C.sort((h, p) => h.resourceDescription.localeCompare(p.resourceDescription)).map((h) => ({
666
- value: h.resourceId,
667
- label: h.resourceDescription,
668
- children: h.permissions.filter((p) => p.actionDescription.toLowerCase().includes(d.toLowerCase())).sort((p, V) => p.actionDescription.localeCompare(V.actionDescription)).map((p) => {
669
- const V = y.find((z) => z.resourceId === h.resourceId)?.permissions.find((z) => z.actionId === p.actionId);
629
+ })), [C, z]), S = ae(() => C.map((p) => p.permissions.map((m) => m.actionId)).flat(), [C]), k = ae(() => x.sort((p, m) => p.resourceDescription.localeCompare(m.resourceDescription)).map((p) => ({
630
+ value: p.resourceId,
631
+ label: p.resourceDescription,
632
+ children: p.permissions.filter((m) => m.actionDescription.toLowerCase().includes(d.toLowerCase())).sort((m, M) => m.actionDescription.localeCompare(M.actionDescription)).map((m) => {
633
+ const M = C.find((E) => E.resourceId === p.resourceId)?.permissions.find((E) => E.actionId === m.actionId);
670
634
  return {
671
- value: p.actionId,
672
- label: p.actionDescription,
635
+ value: m.actionId,
636
+ label: m.actionDescription,
673
637
  nodeProps: {
674
- granted: w.includes(p.actionId) && V?.types?.includes(pe(q, t)),
675
- owner: h
638
+ granted: S.includes(m.actionId) && M?.types?.includes(me(H, n)),
639
+ owner: p
676
640
  }
677
641
  };
678
642
  })
679
- })), [C, y, w, t, d]), A = ce(async () => {
680
- if (l) {
681
- const h = await g.getPermissionsBySecurityId(l, t), p = await g.getAllPermissionsAvailable();
682
- c(p), u(h);
643
+ })), [x, C, S, n, d]), R = de(async () => {
644
+ if (h) {
645
+ const p = await f.getPermissionsBySecurityId(h, n), m = await f.getAllPermissionsAvailable();
646
+ c(m), u(p);
683
647
  }
684
- }, [l, t]), me = ce(() => {
685
- f?.value && l && g.createPermission(l, f.value, t).then((h) => {
686
- if (h) {
687
- u((M) => {
688
- let E;
689
- return M.map((O) => O.resourceId).includes(h.resourceId) ? E = M.map((O) => O.resourceId === h.resourceId ? O.permissions.map(($) => $.actionId).includes(f.value) ? {
690
- ...O,
691
- permissions: O.permissions.map(
692
- ($) => $.actionId === f.value ? {
693
- ...$,
694
- permissionId: h.permissionId,
695
- types: [...$.types ?? [], pe(q, t)]
696
- } : $
648
+ }, [h, n]), fe = de(() => {
649
+ b?.value && h && f.createPermission(h, b.value, n).then((p) => {
650
+ if (p) {
651
+ u((U) => {
652
+ let $;
653
+ return U.map((B) => B.resourceId).includes(p.resourceId) ? $ = U.map((B) => B.resourceId === p.resourceId ? B.permissions.map((L) => L.actionId).includes(b.value) ? {
654
+ ...B,
655
+ permissions: B.permissions.map(
656
+ (L) => L.actionId === b.value ? {
657
+ ...L,
658
+ permissionId: p.permissionId,
659
+ types: [...L.types ?? [], me(H, n)]
660
+ } : L
697
661
  )
698
662
  } : {
699
- ...O,
663
+ ...B,
700
664
  permissions: [
701
- ...O.permissions ?? [],
665
+ ...B.permissions ?? [],
702
666
  {
703
- actionId: h.actionId,
704
- actionDescription: h.actionDescription,
705
- permissionId: h.permissionId,
706
- types: [pe(q, t)]
667
+ actionId: p.actionId,
668
+ actionDescription: p.actionDescription,
669
+ permissionId: p.permissionId,
670
+ types: [me(H, n)]
707
671
  }
708
672
  ]
709
- } : O) : E = [
710
- ...M,
673
+ } : B) : $ = [
674
+ ...U,
711
675
  {
712
- resourceId: h.resourceId,
713
- resourceDescription: h.resourceDescription,
676
+ resourceId: p.resourceId,
677
+ resourceDescription: p.resourceDescription,
714
678
  permissions: [
715
679
  {
716
- actionId: h.actionId,
717
- actionDescription: h.actionDescription,
718
- permissionId: h.permissionId,
719
- types: [pe(q, t)]
680
+ actionId: p.actionId,
681
+ actionDescription: p.actionDescription,
682
+ permissionId: p.permissionId,
683
+ types: [me(H, n)]
720
684
  }
721
685
  ]
722
686
  }
723
- ], E;
687
+ ], $;
724
688
  });
725
- const p = T.filter((M) => M.value === f?.nodeProps?.owner?.resourceId).map((M) => M.children).flat(), V = p.map((M) => M.value).indexOf(f.value), z = p.find((M, E) => !M?.nodeProps?.granted && M?.value !== f.value && (p.length > V + 1 ? E > V : !0));
726
- z?.value && b.select(z.value), m.expand(h.resourceId), F(z);
689
+ const m = k.filter((U) => U.value === b?.nodeProps?.owner?.resourceId).map((U) => U.children).flat(), M = m.map((U) => U.value).indexOf(b.value), E = m.find((U, $) => !U?.nodeProps?.granted && U?.value !== b.value && (m.length > M + 1 ? $ > M : !0));
690
+ E?.value && A.select(E.value), v.expand(p.resourceId), D(E);
727
691
  }
728
692
  });
729
- }, [f, l, t, g, T, C, y, b, m]), he = ce(() => {
730
- j?.nodeProps?.permissionId && g.deletePermission(j.nodeProps.permissionId).then(() => {
731
- u((z) => [...z].filter((E) => {
732
- let O = !0;
733
- return E.permissions?.forEach(($) => {
734
- $.permissionId !== void 0 && $.permissionId === j?.nodeProps?.permissionId && E.permissions.length === 1 && $?.types?.length === 1 && $.types[0] === pe(q, t) && (O = !1);
735
- }), O;
736
- }).map((E) => {
737
- const O = j?.nodeProps?.owner;
738
- return E.resourceId === O.resourceId ? j?.nodeProps?.types?.length === 1 ? {
739
- ...E,
740
- permissions: [...(E.permissions ?? []).filter(($) => $.permissionId !== j?.nodeProps?.permissionId)]
693
+ }, [b, h, n, f, k, x, C, A, v]), pe = de(() => {
694
+ y?.nodeProps?.permissionId && f.deletePermission(y.nodeProps.permissionId).then(() => {
695
+ u((E) => [...E].filter(($) => {
696
+ let B = !0;
697
+ return $.permissions?.forEach((L) => {
698
+ L.permissionId !== void 0 && L.permissionId === y?.nodeProps?.permissionId && $.permissions.length === 1 && L?.types?.length === 1 && L.types[0] === me(H, n) && (B = !1);
699
+ }), B;
700
+ }).map(($) => {
701
+ const B = y?.nodeProps?.owner;
702
+ return $.resourceId === B.resourceId ? y?.nodeProps?.types?.length === 1 ? {
703
+ ...$,
704
+ permissions: [...($.permissions ?? []).filter((L) => L.permissionId !== y?.nodeProps?.permissionId)]
741
705
  } : {
742
- ...E,
743
- permissions: (E.permissions ?? []).map(($) => $.actionId === j.value ? {
744
- actionId: $.actionId,
745
- actionDescription: $.actionDescription,
746
- types: [...$.types?.filter((te) => te && te !== pe(q, t)) ?? []]
747
- } : $)
748
- } : E;
706
+ ...$,
707
+ permissions: ($.permissions ?? []).map((L) => L.actionId === y.value ? {
708
+ actionId: L.actionId,
709
+ actionDescription: L.actionDescription,
710
+ types: [...L.types?.filter((ie) => ie && ie !== me(H, n)) ?? []]
711
+ } : L)
712
+ } : $;
749
713
  }));
750
- const h = J.filter((z) => z.value === j?.nodeProps?.owner?.resourceId).map((z) => z.children).flat(), p = h.map((z) => z.value).indexOf(j.value), V = h.find((z, M) => z?.nodeProps?.types.includes(pe(q, t)) && z?.value !== j.value && (h.length > p + 1 ? M > p : !0));
751
- V?.value && m.select(V.value), B(V);
714
+ const p = J.filter((E) => E.value === y?.nodeProps?.owner?.resourceId).map((E) => E.children).flat(), m = p.map((E) => E.value).indexOf(y.value), M = p.find((E, U) => E?.nodeProps?.types.includes(me(H, n)) && E?.value !== y.value && (p.length > m + 1 ? U > m : !0));
715
+ M?.value && v.select(M.value), q(M);
752
716
  });
753
- }, [j, g, t, J, y, m]);
754
- return ye(() => {
755
- r && a && (F(void 0), B(void 0), s(""), I(""), m.collapseAllNodes(), b.collapseAllNodes(), A());
756
- }, [r, t, l, A]), a ? /* @__PURE__ */ e.jsx(Fe, { opened: r, onClose: n, title: `${i().t(`archbase:${t}`)}: ${o}`, size: "80%", styles: { root: { overflow: "hidden" } }, children: /* @__PURE__ */ e.jsxs(ir, { height: "540px", children: [
757
- /* @__PURE__ */ e.jsx(nr, { 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: [
758
- /* @__PURE__ */ e.jsxs("div", { style: { flex: 9, display: "flex", flexDirection: "column", overflow: "hidden", minHeight: 0 }, children: [
759
- /* @__PURE__ */ e.jsxs(D, { mb: 20, children: [
760
- /* @__PURE__ */ e.jsx(v, { children: i().t("archbase:Available") }),
761
- /* @__PURE__ */ e.jsx(
762
- xe,
717
+ }, [y, f, n, J, C, v]);
718
+ return Se(() => {
719
+ r && a && (D(void 0), q(void 0), t(""), F(""), v.collapseAllNodes(), A.collapseAllNodes(), R());
720
+ }, [r, n, h, R]), a ? /* @__PURE__ */ e(ze, { opened: r, onClose: l, title: `${s().t(`archbase:${n}`)}: ${i}`, size: "80%", styles: { root: { overflow: "hidden" } }, children: /* @__PURE__ */ o(or, { height: "540px", children: [
721
+ /* @__PURE__ */ e(ir, { children: /* @__PURE__ */ e(Y, { withBorder: !0, my: 20, p: 20, style: { height: "calc(100% - 40px)", overflow: "hidden", display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ o("div", { style: { flex: 1, display: "flex", flexDirection: "row", overflow: "hidden", minHeight: 0, gap: "8px" }, children: [
722
+ /* @__PURE__ */ o("div", { style: { flex: 9, display: "flex", flexDirection: "column", overflow: "hidden", minHeight: 0 }, children: [
723
+ /* @__PURE__ */ o(N, { mb: 20, children: [
724
+ /* @__PURE__ */ e(w, { children: s().t("archbase:Available") }),
725
+ /* @__PURE__ */ e(
726
+ ge,
763
727
  {
764
728
  size: "xs",
765
- value: L,
766
- onChange: (h) => s(h.target.value),
767
- placeholder: i().t("archbase:Filter available permissions")
729
+ value: V,
730
+ onChange: (p) => t(p.target.value),
731
+ placeholder: s().t("archbase:Filter available permissions")
768
732
  }
769
733
  )
770
734
  ] }),
771
- /* @__PURE__ */ e.jsx(je, { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ e.jsx(
735
+ /* @__PURE__ */ e(we, { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ e(
772
736
  ra,
773
737
  {
774
- data: T,
738
+ data: k,
775
739
  selectOnClick: !0,
776
740
  allowRangeSelection: !1,
777
- tree: b,
778
- renderNode: ({ level: h, node: p, expanded: V, hasChildren: z, selected: M, elementProps: E }) => {
779
- const O = p?.nodeProps?.granted, $ = O ? "dimmed" : void 0, te = O ? "line-through" : void 0, Ge = ce((Me) => {
780
- F(p), E.onClick(Me);
781
- }, [p, E.onClick]);
782
- return /* @__PURE__ */ e.jsxs(
783
- D,
741
+ tree: A,
742
+ renderNode: ({ level: p, node: m, expanded: M, hasChildren: E, selected: U, elementProps: $ }) => {
743
+ const B = m?.nodeProps?.granted, L = B ? "dimmed" : void 0, ie = B ? "line-through" : void 0, Oe = de((Ue) => {
744
+ D(m), $.onClick(Ue);
745
+ }, [m, $.onClick]);
746
+ return /* @__PURE__ */ o(
747
+ N,
784
748
  {
785
- ml: z ? 0 : 5,
749
+ ml: E ? 0 : 5,
786
750
  gap: 5,
787
- ...E,
788
- bg: M && h === 2 ? N : "",
789
- onClick: Ge,
751
+ ...$,
752
+ bg: U && p === 2 ? G : "",
753
+ onClick: Oe,
790
754
  children: [
791
- z && /* @__PURE__ */ e.jsx(
792
- oa,
755
+ E && /* @__PURE__ */ e(
756
+ ia,
793
757
  {
794
758
  size: 18,
795
- style: { transform: V ? "rotate(0deg)" : "rotate(-90deg)" }
759
+ style: { transform: M ? "rotate(0deg)" : "rotate(-90deg)" }
796
760
  }
797
761
  ),
798
- !z && /* @__PURE__ */ e.jsx(
799
- ia,
762
+ !E && /* @__PURE__ */ e(
763
+ na,
800
764
  {
801
765
  size: 12,
802
766
  style: { transform: "rotate(-90deg)", marginTop: "-5px" }
803
767
  }
804
768
  ),
805
- /* @__PURE__ */ e.jsx(
806
- v,
769
+ /* @__PURE__ */ e(
770
+ w,
807
771
  {
808
- c: $,
809
- td: te,
810
- children: ua(p.label)
772
+ c: L,
773
+ td: ie,
774
+ children: ca(m.label)
811
775
  }
812
776
  )
813
777
  ]
@@ -817,61 +781,61 @@ function We({ dataSource: a, opened: r, close: n }) {
817
781
  }
818
782
  ) })
819
783
  ] }),
820
- /* @__PURE__ */ e.jsx("div", { style: { flex: 2, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e.jsxs(U, { gap: 5, align: "center", children: [
821
- /* @__PURE__ */ e.jsx(ve, { label: i().t("archbase:Add"), children: /* @__PURE__ */ e.jsx(de, { onClick: me, disabled: !f || f?.nodeProps?.granted || !f.nodeProps, children: /* @__PURE__ */ e.jsx(ga, {}) }) }),
822
- /* @__PURE__ */ e.jsx(ve, { label: i().t("archbase:Remove"), children: /* @__PURE__ */ e.jsx(de, { onClick: he, disabled: !j || !j?.nodeProps?.permissionId || !j.nodeProps, children: /* @__PURE__ */ e.jsx(fa, {}) }) })
784
+ /* @__PURE__ */ e("div", { style: { flex: 2, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ o(W, { gap: 5, align: "center", children: [
785
+ /* @__PURE__ */ e(Ce, { label: s().t("archbase:Add"), children: /* @__PURE__ */ e(ue, { onClick: fe, disabled: !b || b?.nodeProps?.granted || !b.nodeProps, children: /* @__PURE__ */ e(ma, {}) }) }),
786
+ /* @__PURE__ */ e(Ce, { label: s().t("archbase:Remove"), children: /* @__PURE__ */ e(ue, { onClick: pe, disabled: !y || !y?.nodeProps?.permissionId || !y.nodeProps, children: /* @__PURE__ */ e(ga, {}) }) })
823
787
  ] }) }),
824
- /* @__PURE__ */ e.jsxs("div", { style: { flex: 9, display: "flex", flexDirection: "column", overflow: "hidden", minHeight: 0 }, children: [
825
- /* @__PURE__ */ e.jsxs(D, { mb: 20, children: [
826
- /* @__PURE__ */ e.jsx(v, { children: i().t("archbase:Granted") }),
827
- /* @__PURE__ */ e.jsx(
828
- xe,
788
+ /* @__PURE__ */ o("div", { style: { flex: 9, display: "flex", flexDirection: "column", overflow: "hidden", minHeight: 0 }, children: [
789
+ /* @__PURE__ */ o(N, { mb: 20, children: [
790
+ /* @__PURE__ */ e(w, { children: s().t("archbase:Granted") }),
791
+ /* @__PURE__ */ e(
792
+ ge,
829
793
  {
830
794
  size: "xs",
831
- value: x,
832
- onChange: (h) => I(h.target.value),
833
- placeholder: i().t("archbase:Filter granted permissions")
795
+ value: g,
796
+ onChange: (p) => F(p.target.value),
797
+ placeholder: s().t("archbase:Filter granted permissions")
834
798
  }
835
799
  )
836
800
  ] }),
837
- /* @__PURE__ */ e.jsx(je, { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ e.jsx(
801
+ /* @__PURE__ */ e(we, { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ e(
838
802
  ra,
839
803
  {
840
804
  data: J,
841
805
  selectOnClick: !0,
842
806
  allowRangeSelection: !1,
843
- tree: m,
844
- renderNode: ({ level: h, node: p, expanded: V, hasChildren: z, selected: M, elementProps: E }) => {
845
- const O = ce(($) => {
846
- B(p), E.onClick($);
847
- }, [p, E.onClick]);
848
- return /* @__PURE__ */ e.jsxs(
849
- D,
807
+ tree: v,
808
+ renderNode: ({ level: p, node: m, expanded: M, hasChildren: E, selected: U, elementProps: $ }) => {
809
+ const B = de((L) => {
810
+ q(m), $.onClick(L);
811
+ }, [m, $.onClick]);
812
+ return /* @__PURE__ */ o(
813
+ N,
850
814
  {
851
- ml: z ? 0 : 5,
815
+ ml: E ? 0 : 5,
852
816
  gap: 5,
853
- ...E,
854
- bg: M && h === 2 ? N : "",
855
- onClick: O,
817
+ ...$,
818
+ bg: U && p === 2 ? G : "",
819
+ onClick: B,
856
820
  children: [
857
- z && /* @__PURE__ */ e.jsx(
858
- oa,
821
+ E && /* @__PURE__ */ e(
822
+ ia,
859
823
  {
860
824
  size: 18,
861
- style: { transform: V ? "rotate(0deg)" : "rotate(-90deg)" }
825
+ style: { transform: M ? "rotate(0deg)" : "rotate(-90deg)" }
862
826
  }
863
827
  ),
864
- !z && /* @__PURE__ */ e.jsx(
865
- ia,
828
+ !E && /* @__PURE__ */ e(
829
+ na,
866
830
  {
867
831
  size: 12,
868
832
  style: { transform: "rotate(-90deg)", marginTop: "-5px" }
869
833
  }
870
834
  ),
871
- /* @__PURE__ */ e.jsx(v, { children: ua(p.label) }),
872
- p?.nodeProps?.types?.includes("USER") && /* @__PURE__ */ e.jsx(se, { color: "blue", children: i().t("archbase:user") }),
873
- p?.nodeProps?.types?.includes("GROUP") && /* @__PURE__ */ e.jsx(se, { color: "orange", children: i().t("archbase:group") }),
874
- p?.nodeProps?.types?.includes("PROFILE") && /* @__PURE__ */ e.jsx(se, { color: "pink", children: i().t("archbase:profile") })
835
+ /* @__PURE__ */ e(w, { children: ca(m.label) }),
836
+ m?.nodeProps?.types?.includes("USER") && /* @__PURE__ */ e(te, { color: "blue", children: s().t("archbase:user") }),
837
+ m?.nodeProps?.types?.includes("GROUP") && /* @__PURE__ */ e(te, { color: "orange", children: s().t("archbase:group") }),
838
+ m?.nodeProps?.types?.includes("PROFILE") && /* @__PURE__ */ e(te, { color: "pink", children: s().t("archbase:profile") })
875
839
  ]
876
840
  }
877
841
  );
@@ -880,22 +844,22 @@ function We({ dataSource: a, opened: r, close: n }) {
880
844
  ) })
881
845
  ] })
882
846
  ] }) }) }),
883
- /* @__PURE__ */ e.jsx(lr, { size: "40px", children: /* @__PURE__ */ e.jsx(D, { justify: "flex-end", children: /* @__PURE__ */ e.jsx(H, { onClick: n, children: i().t("archbase:Close") }) }) })
847
+ /* @__PURE__ */ e(nr, { size: "40px", children: /* @__PURE__ */ e(N, { justify: "flex-end", children: /* @__PURE__ */ e(Z, { onClick: l, children: s().t("archbase:Close") }) }) })
884
848
  ] }) }) : null;
885
849
  }
886
- const Ke = "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", jr = (a) => a.groups ? /* @__PURE__ */ e.jsx("div", { style: { display: "flex" }, children: a.groups.slice().sort((r, n) => (r.group?.name ?? "").localeCompare(n.group?.name ?? "")).map((r, n) => /* @__PURE__ */ e.jsx("div", { style: { paddingRight: "2px" }, children: /* @__PURE__ */ e.jsx(se, { color: "blue", children: r.group?.name }) }, n)) }) : null, vr = (a) => a.profile ? /* @__PURE__ */ e.jsx(se, { color: "green", children: a.profile?.name }) : null, yr = (a) => /* @__PURE__ */ e.jsxs(we, { children: [
887
- /* @__PURE__ */ e.jsx(
888
- S,
850
+ const Ye = "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", gr = (a) => a.groups ? /* @__PURE__ */ e("div", { style: { display: "flex" }, children: a.groups.slice().sort((r, l) => (r.group?.name ?? "").localeCompare(l.group?.name ?? "")).map((r, l) => /* @__PURE__ */ e("div", { style: { paddingRight: "2px" }, children: /* @__PURE__ */ e(te, { color: "blue", children: r.group?.name }) }, l)) }) : null, fr = (a) => a.profile ? /* @__PURE__ */ e(te, { color: "green", children: a.profile?.name }) : null, br = (a) => /* @__PURE__ */ o(Ae, { children: [
851
+ /* @__PURE__ */ e(
852
+ T,
889
853
  {
890
854
  dataField: "user.avatar",
891
855
  dataType: "image",
892
856
  size: 80,
893
857
  header: `${a("archbase:Foto")}`,
894
- render: (r) => /* @__PURE__ */ e.jsx(
858
+ render: (r) => /* @__PURE__ */ e(
895
859
  "img",
896
860
  {
897
861
  style: { borderRadius: 50, height: "32px", maxHeight: "32px" },
898
- src: r.row.user && r.row.user.avatar ? atob(r.row.user.avatar) : Ke
862
+ src: r.row.user && r.row.user.avatar ? atob(r.row.user.avatar) : Ye
899
863
  }
900
864
  ),
901
865
  inputFilterType: "text",
@@ -903,8 +867,8 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
903
867
  exportable: !1
904
868
  }
905
869
  ),
906
- /* @__PURE__ */ e.jsx(
907
- S,
870
+ /* @__PURE__ */ e(
871
+ T,
908
872
  {
909
873
  dataField: "user.userName",
910
874
  dataType: "text",
@@ -913,8 +877,8 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
913
877
  inputFilterType: "text"
914
878
  }
915
879
  ),
916
- /* @__PURE__ */ e.jsx(
917
- S,
880
+ /* @__PURE__ */ e(
881
+ T,
918
882
  {
919
883
  dataField: "user.email",
920
884
  dataType: "text",
@@ -923,19 +887,19 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
923
887
  inputFilterType: "text"
924
888
  }
925
889
  ),
926
- /* @__PURE__ */ e.jsx(
927
- S,
890
+ /* @__PURE__ */ e(
891
+ T,
928
892
  {
929
893
  dataField: "expirationDate",
930
894
  dataType: "text",
931
895
  size: 300,
932
896
  header: `${a("archbase:Expira em")}`,
933
- render: (r) => /* @__PURE__ */ e.jsx(v, { size: "sm", children: r.row.expirationDate }),
897
+ render: (r) => /* @__PURE__ */ e(w, { size: "sm", children: r.row.expirationDate }),
934
898
  inputFilterType: "text"
935
899
  }
936
900
  ),
937
- /* @__PURE__ */ e.jsx(
938
- S,
901
+ /* @__PURE__ */ e(
902
+ T,
939
903
  {
940
904
  dataField: "revoked",
941
905
  dataType: "boolean",
@@ -943,8 +907,8 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
943
907
  inputFilterType: "checkbox"
944
908
  }
945
909
  ),
946
- /* @__PURE__ */ e.jsx(
947
- S,
910
+ /* @__PURE__ */ e(
911
+ T,
948
912
  {
949
913
  dataField: "expired",
950
914
  dataType: "boolean",
@@ -952,8 +916,8 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
952
916
  inputFilterType: "checkbox"
953
917
  }
954
918
  ),
955
- /* @__PURE__ */ e.jsx(
956
- S,
919
+ /* @__PURE__ */ e(
920
+ T,
957
921
  {
958
922
  dataField: "token",
959
923
  dataType: "text",
@@ -962,19 +926,19 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
962
926
  inputFilterType: "text"
963
927
  }
964
928
  )
965
- ] }), wr = (a) => /* @__PURE__ */ e.jsxs(we, { children: [
966
- /* @__PURE__ */ e.jsx(
967
- S,
929
+ ] }), vr = (a) => /* @__PURE__ */ o(Ae, { children: [
930
+ /* @__PURE__ */ e(
931
+ T,
968
932
  {
969
933
  dataField: "avatar",
970
934
  dataType: "image",
971
935
  size: 80,
972
936
  header: `${a("archbase:Foto")}`,
973
- render: (r) => /* @__PURE__ */ e.jsx(
937
+ render: (r) => /* @__PURE__ */ e(
974
938
  "img",
975
939
  {
976
940
  style: { borderRadius: 50, height: "32px", maxHeight: "32px" },
977
- src: r.row.avatar ? atob(r.row.avatar) : Ke
941
+ src: r.row.avatar ? atob(r.row.avatar) : Ye
978
942
  }
979
943
  ),
980
944
  enableSorting: !1,
@@ -984,8 +948,8 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
984
948
  exportable: !1
985
949
  }
986
950
  ),
987
- /* @__PURE__ */ e.jsx(
988
- S,
951
+ /* @__PURE__ */ e(
952
+ T,
989
953
  {
990
954
  dataField: "name",
991
955
  dataType: "text",
@@ -995,8 +959,8 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
995
959
  truncate: !0
996
960
  }
997
961
  ),
998
- /* @__PURE__ */ e.jsx(
999
- S,
962
+ /* @__PURE__ */ e(
963
+ T,
1000
964
  {
1001
965
  dataField: "nickname",
1002
966
  dataType: "text",
@@ -1006,8 +970,8 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
1006
970
  truncate: !0
1007
971
  }
1008
972
  ),
1009
- /* @__PURE__ */ e.jsx(
1010
- S,
973
+ /* @__PURE__ */ e(
974
+ T,
1011
975
  {
1012
976
  dataField: "email",
1013
977
  dataType: "text",
@@ -1017,8 +981,8 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
1017
981
  truncate: !0
1018
982
  }
1019
983
  ),
1020
- /* @__PURE__ */ e.jsx(
1021
- S,
984
+ /* @__PURE__ */ e(
985
+ T,
1022
986
  {
1023
987
  dataField: "accountDeactivated",
1024
988
  dataType: "boolean",
@@ -1027,33 +991,33 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
1027
991
  size: 120
1028
992
  }
1029
993
  ),
1030
- /* @__PURE__ */ e.jsx(
1031
- S,
994
+ /* @__PURE__ */ e(
995
+ T,
1032
996
  {
1033
997
  dataField: "profile.name",
1034
998
  dataType: "text",
1035
999
  header: `${a("archbase:Perfil")}`,
1036
1000
  size: 200,
1037
- render: (r) => vr(r.row),
1001
+ render: (r) => fr(r.row),
1038
1002
  inputFilterType: "text"
1039
1003
  }
1040
1004
  ),
1041
- /* @__PURE__ */ e.jsx(
1042
- S,
1005
+ /* @__PURE__ */ e(
1006
+ T,
1043
1007
  {
1044
1008
  dataField: "groups",
1045
1009
  dataType: "text",
1046
1010
  size: 300,
1047
1011
  header: `${a("archbase:Grupos")}`,
1048
- render: (r) => jr(r.row),
1049
- exportValue: (r) => r.groups?.slice().sort((n, o) => (n.group?.name ?? "").localeCompare(o.group?.name ?? "")).map((n) => n.group?.name).filter(Boolean).join(", ") || "",
1012
+ render: (r) => gr(r.row),
1013
+ exportValue: (r) => r.groups?.slice().sort((l, i) => (l.group?.name ?? "").localeCompare(i.group?.name ?? "")).map((l) => l.group?.name).filter(Boolean).join(", ") || "",
1050
1014
  enableSorting: !1,
1051
1015
  enableColumnFilter: !1,
1052
1016
  enableGlobalFilter: !1
1053
1017
  }
1054
1018
  ),
1055
- /* @__PURE__ */ e.jsx(
1056
- S,
1019
+ /* @__PURE__ */ e(
1020
+ T,
1057
1021
  {
1058
1022
  dataField: "isAdministrator",
1059
1023
  dataType: "boolean",
@@ -1061,8 +1025,8 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
1061
1025
  inputFilterType: "checkbox"
1062
1026
  }
1063
1027
  ),
1064
- /* @__PURE__ */ e.jsx(
1065
- S,
1028
+ /* @__PURE__ */ e(
1029
+ T,
1066
1030
  {
1067
1031
  dataField: "changePasswordOnNextLogin",
1068
1032
  dataType: "boolean",
@@ -1071,8 +1035,8 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
1071
1035
  size: 120
1072
1036
  }
1073
1037
  ),
1074
- /* @__PURE__ */ e.jsx(
1075
- S,
1038
+ /* @__PURE__ */ e(
1039
+ T,
1076
1040
  {
1077
1041
  dataField: "allowPasswordChange",
1078
1042
  dataType: "boolean",
@@ -1081,8 +1045,8 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
1081
1045
  size: 120
1082
1046
  }
1083
1047
  ),
1084
- /* @__PURE__ */ e.jsx(
1085
- S,
1048
+ /* @__PURE__ */ e(
1049
+ T,
1086
1050
  {
1087
1051
  dataField: "allowMultipleLogins",
1088
1052
  dataType: "boolean",
@@ -1091,8 +1055,8 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
1091
1055
  size: 120
1092
1056
  }
1093
1057
  ),
1094
- /* @__PURE__ */ e.jsx(
1095
- S,
1058
+ /* @__PURE__ */ e(
1059
+ T,
1096
1060
  {
1097
1061
  dataField: "passwordNeverExpires",
1098
1062
  dataType: "boolean",
@@ -1101,8 +1065,8 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
1101
1065
  size: 120
1102
1066
  }
1103
1067
  ),
1104
- /* @__PURE__ */ e.jsx(
1105
- S,
1068
+ /* @__PURE__ */ e(
1069
+ T,
1106
1070
  {
1107
1071
  dataField: "passwordChangedAt",
1108
1072
  dataType: "datetime",
@@ -1111,8 +1075,8 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
1111
1075
  size: 160
1112
1076
  }
1113
1077
  ),
1114
- /* @__PURE__ */ e.jsx(
1115
- S,
1078
+ /* @__PURE__ */ e(
1079
+ T,
1116
1080
  {
1117
1081
  dataField: "accountLocked",
1118
1082
  dataType: "boolean",
@@ -1121,8 +1085,8 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
1121
1085
  size: 120
1122
1086
  }
1123
1087
  ),
1124
- /* @__PURE__ */ e.jsx(
1125
- S,
1088
+ /* @__PURE__ */ e(
1089
+ T,
1126
1090
  {
1127
1091
  dataField: "unlimitedAccessHours",
1128
1092
  dataType: "boolean",
@@ -1131,9 +1095,9 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
1131
1095
  size: 140
1132
1096
  }
1133
1097
  )
1134
- ] }), Cr = (a) => /* @__PURE__ */ e.jsxs(we, { children: [
1135
- /* @__PURE__ */ e.jsx(
1136
- S,
1098
+ ] }), yr = (a) => /* @__PURE__ */ o(Ae, { children: [
1099
+ /* @__PURE__ */ e(
1100
+ T,
1137
1101
  {
1138
1102
  dataField: "name",
1139
1103
  dataType: "text",
@@ -1142,8 +1106,8 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
1142
1106
  inputFilterType: "text"
1143
1107
  }
1144
1108
  ),
1145
- /* @__PURE__ */ e.jsx(
1146
- S,
1109
+ /* @__PURE__ */ e(
1110
+ T,
1147
1111
  {
1148
1112
  dataField: "description",
1149
1113
  dataType: "text",
@@ -1152,9 +1116,9 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
1152
1116
  inputFilterType: "text"
1153
1117
  }
1154
1118
  )
1155
- ] }), Sr = (a) => /* @__PURE__ */ e.jsxs(we, { children: [
1156
- /* @__PURE__ */ e.jsx(
1157
- S,
1119
+ ] }), wr = (a) => /* @__PURE__ */ o(Ae, { children: [
1120
+ /* @__PURE__ */ e(
1121
+ T,
1158
1122
  {
1159
1123
  dataField: "name",
1160
1124
  dataType: "text",
@@ -1163,8 +1127,8 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
1163
1127
  inputFilterType: "text"
1164
1128
  }
1165
1129
  ),
1166
- /* @__PURE__ */ e.jsx(
1167
- S,
1130
+ /* @__PURE__ */ e(
1131
+ T,
1168
1132
  {
1169
1133
  dataField: "description",
1170
1134
  dataType: "text",
@@ -1173,9 +1137,9 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
1173
1137
  inputFilterType: "text"
1174
1138
  }
1175
1139
  )
1176
- ] }), Ar = (a) => /* @__PURE__ */ e.jsxs(we, { children: [
1177
- /* @__PURE__ */ e.jsx(
1178
- S,
1140
+ ] }), Cr = (a) => /* @__PURE__ */ o(Ae, { children: [
1141
+ /* @__PURE__ */ e(
1142
+ T,
1179
1143
  {
1180
1144
  dataField: "name",
1181
1145
  dataType: "text",
@@ -1184,8 +1148,8 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
1184
1148
  inputFilterType: "text"
1185
1149
  }
1186
1150
  ),
1187
- /* @__PURE__ */ e.jsx(
1188
- S,
1151
+ /* @__PURE__ */ e(
1152
+ T,
1189
1153
  {
1190
1154
  dataField: "description",
1191
1155
  dataType: "text",
@@ -1195,22 +1159,22 @@ const Ke = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
1195
1159
  }
1196
1160
  )
1197
1161
  ] });
1198
- function Ae({
1162
+ function Te({
1199
1163
  active: a,
1200
1164
  printTitle: r,
1201
- gridRef: n,
1202
- dataSource: o,
1203
- isLoading: l,
1204
- error: t,
1205
- getRowId: b,
1206
- striped: m = !1,
1207
- enableRowActions: C = !0,
1165
+ gridRef: l,
1166
+ dataSource: i,
1167
+ isLoading: h,
1168
+ error: n,
1169
+ getRowId: A,
1170
+ striped: v = !1,
1171
+ enableRowActions: x = !0,
1208
1172
  toolbarLeftContent: c,
1209
- renderRowActions: y,
1173
+ renderRowActions: C,
1210
1174
  actionsColumnWidth: u,
1211
- children: f
1175
+ children: b
1212
1176
  }) {
1213
- return /* @__PURE__ */ e.jsx(
1177
+ return /* @__PURE__ */ e(
1214
1178
  Y,
1215
1179
  {
1216
1180
  withBorder: !0,
@@ -1222,61 +1186,61 @@ function Ae({
1222
1186
  minHeight: 0,
1223
1187
  overflow: "auto"
1224
1188
  },
1225
- children: /* @__PURE__ */ e.jsx(
1226
- xa,
1189
+ children: /* @__PURE__ */ e(
1190
+ ha,
1227
1191
  {
1228
- gridRef: n,
1192
+ gridRef: l,
1229
1193
  printTitle: r,
1230
1194
  width: "100%",
1231
1195
  height: "100%",
1232
1196
  withBorder: !1,
1233
- dataSource: o,
1197
+ dataSource: i,
1234
1198
  withColumnBorders: !0,
1235
- striped: m,
1199
+ striped: v,
1236
1200
  enableTopToolbar: !0,
1237
- enableRowActions: C,
1201
+ enableRowActions: x,
1238
1202
  pageSize: 50,
1239
- isLoading: l,
1240
- isError: !!t,
1241
- error: t,
1203
+ isLoading: h,
1204
+ isError: !!n,
1205
+ error: n,
1242
1206
  enableGlobalFilter: !0,
1243
- getRowId: b,
1207
+ getRowId: A,
1244
1208
  toolbarLeftContent: c,
1245
- renderRowActions: y,
1209
+ renderRowActions: C,
1246
1210
  actionsColumnWidth: u,
1247
- children: f
1211
+ children: b
1248
1212
  }
1249
1213
  )
1250
1214
  }
1251
1215
  );
1252
1216
  }
1253
- function qe({
1217
+ function je({
1254
1218
  dataSource: a,
1255
1219
  securityType: r,
1256
- newInstance: n,
1257
- createEntitiesWithId: o,
1258
- removeMessageKey: l,
1259
- setOpenedModal: t,
1260
- setOpenedPermissionsModal: b,
1261
- validationContext: m,
1262
- t: C
1220
+ newInstance: l,
1221
+ createEntitiesWithId: i,
1222
+ removeMessageKey: h,
1223
+ setOpenedModal: n,
1224
+ setOpenedPermissionsModal: A,
1225
+ validationContext: v,
1226
+ t: x
1263
1227
  }) {
1264
- const c = a, y = (d) => c.isEmpty() ? null : c.gotoRecordByData(d) ?? null;
1228
+ const c = a, C = (d) => c.isEmpty() ? null : c.gotoRecordByData(d) ?? null;
1265
1229
  return {
1266
1230
  handleAdd: () => {
1267
- const d = n();
1268
- o || (d.id = void 0), c.insert(d), t(r);
1231
+ const d = l();
1232
+ i || (d.id = void 0), c.insert(d), n(r);
1269
1233
  },
1270
1234
  handleViewRow: (d) => {
1271
- y(d) && t(r);
1235
+ C(d) && n(r);
1272
1236
  },
1273
1237
  handleEditRow: (d) => {
1274
- y(d) && (c.isEditing() || c.edit(), t(r));
1238
+ C(d) && (c.isEditing() || c.edit(), n(r));
1275
1239
  },
1276
1240
  handleRemoveRow: (d) => {
1277
- y(d) && le.showConfirmDialogYesNo(
1278
- `${C("archbase:Confirme")}`,
1279
- `${C(l)}${d.name} ?`,
1241
+ C(d) && ce.showConfirmDialogYesNo(
1242
+ `${x("archbase:Confirme")}`,
1243
+ `${x(h)}${d.name} ?`,
1280
1244
  () => {
1281
1245
  c.remove();
1282
1246
  },
@@ -1290,432 +1254,432 @@ function qe({
1290
1254
  } catch {
1291
1255
  return;
1292
1256
  }
1293
- t(""), m?.clearAll();
1257
+ n(""), v?.clearAll();
1294
1258
  },
1295
1259
  handleCancelModal: () => {
1296
- t(""), c.isBrowsing() || c.cancel(), m?.clearAll();
1260
+ n(""), c.isBrowsing() || c.cancel(), v?.clearAll();
1297
1261
  },
1298
1262
  handleOpenPermissionsModal: () => {
1299
- b(r);
1263
+ A(r);
1300
1264
  }
1301
1265
  };
1302
1266
  }
1303
1267
  function He({
1304
1268
  row: a,
1305
1269
  onView: r,
1306
- onEdit: n,
1307
- onRemove: o,
1308
- onEditPermissions: l,
1309
- before: t,
1310
- after: b,
1311
- t: m
1270
+ onEdit: l,
1271
+ onRemove: i,
1272
+ onEditPermissions: h,
1273
+ before: n,
1274
+ after: A,
1275
+ t: v
1312
1276
  }) {
1313
- const C = Xe(), { colorScheme: c } = Ne(), y = c === "dark", u = (f) => y ? C.colors[f][8] : C.colors[f][4];
1314
- return /* @__PURE__ */ e.jsxs(D, { gap: 1, wrap: "nowrap", children: [
1315
- t?.(a),
1316
- /* @__PURE__ */ e.jsx(de, { variant: "transparent", onClick: () => r(a), children: /* @__PURE__ */ e.jsx(Qa, { size: 20, color: u("blue") }) }),
1317
- /* @__PURE__ */ e.jsx(de, { variant: "transparent", onClick: () => n(a), children: /* @__PURE__ */ e.jsx(ba, { size: 20, color: u("yellow") }) }),
1318
- /* @__PURE__ */ e.jsx(de, { variant: "transparent", onClick: () => o(a), children: /* @__PURE__ */ e.jsx(Ye, { size: 20, color: u("red") }) }),
1319
- /* @__PURE__ */ e.jsx(ve, { withinPortal: !0, withArrow: !0, position: "left", label: `${m("archbase:Edit permissions")}`, children: /* @__PURE__ */ e.jsx(de, { variant: "transparent", onClick: l, children: /* @__PURE__ */ e.jsx(Xa, { size: 20, color: u("green") }) }) }),
1320
- b?.(a)
1277
+ const x = Qe(), { colorScheme: c } = Ge(), C = c === "dark", u = (b) => C ? x.colors[b][8] : x.colors[b][4];
1278
+ return /* @__PURE__ */ o(N, { gap: 1, wrap: "nowrap", children: [
1279
+ n?.(a),
1280
+ /* @__PURE__ */ e(ue, { variant: "transparent", onClick: () => r(a), children: /* @__PURE__ */ e(Za, { size: 20, color: u("blue") }) }),
1281
+ /* @__PURE__ */ e(ue, { variant: "transparent", onClick: () => l(a), children: /* @__PURE__ */ e(fa, { size: 20, color: u("yellow") }) }),
1282
+ /* @__PURE__ */ e(ue, { variant: "transparent", onClick: () => i(a), children: /* @__PURE__ */ e(Xe, { size: 20, color: u("red") }) }),
1283
+ /* @__PURE__ */ e(Ce, { withinPortal: !0, withArrow: !0, position: "left", label: `${v("archbase:Edit permissions")}`, children: /* @__PURE__ */ e(ue, { variant: "transparent", onClick: h, children: /* @__PURE__ */ e(Ja, { size: 20, color: u("green") }) }) }),
1284
+ A?.(a)
1321
1285
  ] });
1322
1286
  }
1323
- const Je = ({ onAdd: a, onEditPermissions: r, t: n }) => /* @__PURE__ */ e.jsxs(Te, { justify: "space-between", style: { width: "50%" }, children: [
1324
- /* @__PURE__ */ e.jsxs(D, { align: "end", gap: "4px", wrap: "nowrap", children: [
1325
- /* @__PURE__ */ e.jsx(H, { color: "green", leftSection: /* @__PURE__ */ e.jsx(ja, {}), onClick: a, children: `${n("archbase:New")}` }),
1326
- /* @__PURE__ */ e.jsx(H, { color: "blue", leftSection: /* @__PURE__ */ e.jsx(ba, {}), onClick: r, children: `${n("archbase:Edit permissions")}` })
1287
+ const Ze = ({ onAdd: a, onEditPermissions: r, t: l }) => /* @__PURE__ */ o(Re, { justify: "space-between", style: { width: "50%" }, children: [
1288
+ /* @__PURE__ */ o(N, { align: "end", gap: "4px", wrap: "nowrap", children: [
1289
+ /* @__PURE__ */ e(Z, { color: "green", leftSection: /* @__PURE__ */ e(ba, {}), onClick: a, children: `${l("archbase:New")}` }),
1290
+ /* @__PURE__ */ e(Z, { color: "blue", leftSection: /* @__PURE__ */ e(fa, {}), onClick: r, children: `${l("archbase:Edit permissions")}` })
1327
1291
  ] }),
1328
- /* @__PURE__ */ e.jsx(Te, { align: "flex-start", justify: "flex-end", style: { width: "200px" } })
1292
+ /* @__PURE__ */ e(Re, { align: "flex-start", justify: "flex-end", style: { width: "200px" } })
1329
1293
  ] });
1330
- function Xr({
1294
+ function Zr({
1331
1295
  height: a = "400px",
1332
1296
  width: r = "100%",
1333
- createEntitiesWithId: n = !0,
1334
- userModalOptions: o,
1335
- profileModalOptions: l,
1336
- groupModalOptions: t,
1337
- options: b
1297
+ createEntitiesWithId: l = !0,
1298
+ userModalOptions: i,
1299
+ profileModalOptions: h,
1300
+ groupModalOptions: n,
1301
+ options: A
1338
1302
  }) {
1339
- Xe(), ma("securityStore");
1340
- const m = Ga(), { colorScheme: C } = Ne(), [c, y] = k(void 0), [u, f] = k("users"), F = X(Q.User), j = X(Q.Group), B = X(Q.Resource), L = X(Q.Profile), [s, d] = k(""), [x, I] = k(""), P = X(Q.AccessToken), { t: g } = Ma(), ee = be(null), N = be(null), J = be(null), w = be(null), T = be(null), A = (R) => R.id, me = (R) => R.id, he = (R) => R.id, h = (R) => R.id, p = (R) => R.id, {
1341
- dataSource: V,
1342
- isLoading: z,
1343
- refreshData: M
1344
- } = Ce({
1303
+ Qe(), pa("securityStore");
1304
+ const v = Va(), { colorScheme: x } = Ge(), [c, C] = P(void 0), [u, b] = P("users"), D = X(Q.User), y = X(Q.Group), q = X(Q.Resource), V = X(Q.Profile), [t, d] = P(""), [g, F] = P(""), z = X(Q.AccessToken), { t: f } = Ga(), oe = ye(null), G = ye(null), J = ye(null), S = ye(null), k = ye(null), R = (I) => I.id, fe = (I) => I.id, pe = (I) => I.id, p = (I) => I.id, m = (I) => I.id, {
1305
+ dataSource: M,
1306
+ isLoading: E,
1307
+ refreshData: U
1308
+ } = xe({
1345
1309
  name: "accessTokenApi",
1346
- service: P,
1347
- validator: m,
1310
+ service: z,
1311
+ validator: v,
1348
1312
  pageSize: 25,
1349
1313
  defaultSortFields: ["user.email", "expirationTime:desc"],
1350
- onError: (R, K) => {
1351
- y(R), _.showError(`${g("archbase:WARNING")}`, R, K);
1314
+ onError: (I, _) => {
1315
+ C(I), ee.showError(`${f("archbase:WARNING")}`, I, _);
1352
1316
  }
1353
1317
  }), {
1354
- dataSource: E,
1355
- isLoading: O,
1356
- refreshData: $
1357
- } = Ce({
1318
+ dataSource: $,
1319
+ isLoading: B,
1320
+ refreshData: L
1321
+ } = xe({
1358
1322
  name: "dsUsers",
1359
- service: F,
1360
- validator: m,
1323
+ service: D,
1324
+ validator: v,
1361
1325
  pageSize: 25,
1362
- onError: (R, K) => {
1363
- y(R), _.showError(`${g("archbase:WARNING")}`, R, K);
1326
+ onError: (I, _) => {
1327
+ C(I), ee.showError(`${f("archbase:WARNING")}`, I, _);
1364
1328
  }
1365
1329
  }), {
1366
- dataSource: te,
1367
- isLoading: Ge,
1368
- refreshData: Me
1369
- } = Ce({
1330
+ dataSource: ie,
1331
+ isLoading: Oe,
1332
+ refreshData: Ue
1333
+ } = xe({
1370
1334
  name: "dsGroups",
1371
- service: j,
1372
- validator: m,
1335
+ service: y,
1336
+ validator: v,
1373
1337
  pageSize: 25,
1374
- onError: (R, K) => {
1375
- y(R), _.showError(`${g("archbase:WARNING")}`, R, K);
1338
+ onError: (I, _) => {
1339
+ C(I), ee.showError(`${f("archbase:WARNING")}`, I, _);
1376
1340
  }
1377
1341
  }), {
1378
- dataSource: ze,
1342
+ dataSource: De,
1379
1343
  isLoading: va,
1380
1344
  refreshData: ya
1381
- } = Ce({
1345
+ } = xe({
1382
1346
  name: "dsProfile",
1383
- service: L,
1384
- validator: m,
1347
+ service: V,
1348
+ validator: v,
1385
1349
  pageSize: 25,
1386
- onError: (R, K) => {
1387
- y(R), _.showError(`${g("archbase:WARNING")}`, R, K);
1350
+ onError: (I, _) => {
1351
+ C(I), ee.showError(`${f("archbase:WARNING")}`, I, _);
1388
1352
  }
1389
1353
  }), {
1390
1354
  dataSource: wa,
1391
1355
  isLoading: Ca,
1392
1356
  refreshData: Sa
1393
- } = Ce({
1357
+ } = xe({
1394
1358
  name: "dsResources",
1395
- service: B,
1396
- validator: m,
1359
+ service: q,
1360
+ validator: v,
1397
1361
  pageSize: 25,
1398
- onError: (R, K) => {
1399
- y(R), _.showError(`${g("archbase:WARNING")}`, R, K);
1362
+ onError: (I, _) => {
1363
+ C(I), ee.showError(`${f("archbase:WARNING")}`, I, _);
1400
1364
  }
1401
1365
  });
1402
- ye(() => {
1403
- M({ filter: $e(ke.eq("revoked", "false")) }), $(), Me(), ya(), Sa();
1366
+ Se(() => {
1367
+ U({ filter: Le(Ie.eq("revoked", "false")) }), L(), Ue(), ya(), Sa();
1404
1368
  }, []);
1405
- const Aa = yr(g), Ta = wr(g), Ra = Cr(g), ka = Sr(g), Ia = Ar(g), Oe = Oa(), oe = qe({
1406
- dataSource: E,
1407
- securityType: q.USER,
1408
- newInstance: () => er.newInstance(),
1409
- createEntitiesWithId: n,
1369
+ const Aa = br(f), xa = vr(f), Ta = yr(f), Ra = wr(f), ka = Cr(f), Be = Ma(), ne = je({
1370
+ dataSource: $,
1371
+ securityType: H.USER,
1372
+ newInstance: () => Ya.newInstance(),
1373
+ createEntitiesWithId: l,
1410
1374
  removeMessageKey: "archbase:Deseja remover o usuário ",
1411
1375
  setOpenedModal: d,
1412
- setOpenedPermissionsModal: I,
1413
- validationContext: Oe,
1414
- t: g
1415
- }), ie = qe({
1416
- dataSource: te,
1417
- securityType: q.GROUP,
1418
- newInstance: () => ar.newInstance(),
1419
- createEntitiesWithId: n,
1376
+ setOpenedPermissionsModal: F,
1377
+ validationContext: Be,
1378
+ t: f
1379
+ }), se = je({
1380
+ dataSource: ie,
1381
+ securityType: H.GROUP,
1382
+ newInstance: () => _a.newInstance(),
1383
+ createEntitiesWithId: l,
1420
1384
  removeMessageKey: "archbase:Deseja remover o grupo ",
1421
1385
  setOpenedModal: d,
1422
- setOpenedPermissionsModal: I,
1423
- validationContext: Oe,
1424
- t: g
1425
- }), ne = qe({
1426
- dataSource: ze,
1427
- securityType: q.PROFILE,
1428
- newInstance: () => rr.newInstance(),
1429
- createEntitiesWithId: n,
1386
+ setOpenedPermissionsModal: F,
1387
+ validationContext: Be,
1388
+ t: f
1389
+ }), le = je({
1390
+ dataSource: De,
1391
+ securityType: H.PROFILE,
1392
+ newInstance: () => er.newInstance(),
1393
+ createEntitiesWithId: l,
1430
1394
  removeMessageKey: "archbase:Deseja remover o perfil ",
1431
1395
  setOpenedModal: d,
1432
- setOpenedPermissionsModal: I,
1433
- validationContext: Oe,
1434
- t: g
1435
- }), Pa = (R) => /* @__PURE__ */ e.jsx(
1396
+ setOpenedPermissionsModal: F,
1397
+ validationContext: Be,
1398
+ t: f
1399
+ }), Ia = (I) => /* @__PURE__ */ e(
1436
1400
  He,
1437
1401
  {
1438
- row: R,
1439
- onView: oe.handleViewRow,
1440
- onEdit: oe.handleEditRow,
1441
- onRemove: oe.handleRemoveRow,
1442
- onEditPermissions: oe.handleOpenPermissionsModal,
1443
- before: b?.beforeDefaultUserActions,
1444
- after: b?.afterDefaultUserActions,
1445
- t: g
1402
+ row: I,
1403
+ onView: ne.handleViewRow,
1404
+ onEdit: ne.handleEditRow,
1405
+ onRemove: ne.handleRemoveRow,
1406
+ onEditPermissions: ne.handleOpenPermissionsModal,
1407
+ before: A?.beforeDefaultUserActions,
1408
+ after: A?.afterDefaultUserActions,
1409
+ t: f
1446
1410
  }
1447
- ), Fa = (R) => /* @__PURE__ */ e.jsx(
1411
+ ), Pa = (I) => /* @__PURE__ */ e(
1448
1412
  He,
1449
1413
  {
1450
- row: R,
1451
- onView: ie.handleViewRow,
1452
- onEdit: ie.handleEditRow,
1453
- onRemove: ie.handleRemoveRow,
1454
- onEditPermissions: ie.handleOpenPermissionsModal,
1455
- before: b?.beforeDefaultGroupActions,
1456
- after: b?.afterDefaultGroupActions,
1457
- t: g
1414
+ row: I,
1415
+ onView: se.handleViewRow,
1416
+ onEdit: se.handleEditRow,
1417
+ onRemove: se.handleRemoveRow,
1418
+ onEditPermissions: se.handleOpenPermissionsModal,
1419
+ before: A?.beforeDefaultGroupActions,
1420
+ after: A?.afterDefaultGroupActions,
1421
+ t: f
1458
1422
  }
1459
- ), za = (R) => /* @__PURE__ */ e.jsx(
1423
+ ), Fa = (I) => /* @__PURE__ */ e(
1460
1424
  He,
1461
1425
  {
1462
- row: R,
1463
- onView: ne.handleViewRow,
1464
- onEdit: ne.handleEditRow,
1465
- onRemove: ne.handleRemoveRow,
1466
- onEditPermissions: ne.handleOpenPermissionsModal,
1467
- before: b?.beforeDefaultProfileActions,
1468
- after: b?.afterDefaultProfileActions,
1469
- t: g
1426
+ row: I,
1427
+ onView: le.handleViewRow,
1428
+ onEdit: le.handleEditRow,
1429
+ onRemove: le.handleRemoveRow,
1430
+ onEditPermissions: le.handleOpenPermissionsModal,
1431
+ before: A?.beforeDefaultProfileActions,
1432
+ after: A?.afterDefaultProfileActions,
1433
+ t: f
1470
1434
  }
1471
- ), Ea = () => {
1472
- const R = V.getCurrentRecord();
1473
- R && le.showConfirmDialogYesNo(
1474
- `${g("archbase:Confirme")}`,
1475
- `${g("archbase:Deseja revogar o token de Acesso do usuário ")}${R.user.name} ?`,
1435
+ ), za = () => {
1436
+ const I = M.getCurrentRecord();
1437
+ I && ce.showConfirmDialogYesNo(
1438
+ `${f("archbase:Confirme")}`,
1439
+ `${f("archbase:Deseja revogar o token de Acesso do usuário ")}${I.user.name} ?`,
1476
1440
  async () => {
1477
- await P.revoke(R.token).then(async () => {
1478
- _.showSuccess(
1479
- `${g("mentors:Informação")}`,
1480
- `${g("mentors:Token de Acesso revogado com sucesso!")}`
1481
- ), V.refreshData();
1482
- }).catch((K) => {
1483
- le.showErrorWithDetails(
1484
- `${g("mentors:Atenção")}`,
1485
- ue(K),
1486
- De(K)
1441
+ await z.revoke(I.token).then(async () => {
1442
+ ee.showSuccess(
1443
+ `${f("mentors:Informação")}`,
1444
+ `${f("mentors:Token de Acesso revogado com sucesso!")}`
1445
+ ), M.refreshData();
1446
+ }).catch((_) => {
1447
+ ce.showErrorWithDetails(
1448
+ `${f("mentors:Atenção")}`,
1449
+ he(_),
1450
+ $e(_)
1487
1451
  );
1488
1452
  });
1489
1453
  },
1490
1454
  () => {
1491
1455
  }
1492
1456
  );
1493
- }, Ue = () => {
1494
- I("");
1495
- }, Da = () => /* @__PURE__ */ e.jsx(Te, { justify: "space-between", style: { width: "50%" }, children: /* @__PURE__ */ e.jsx(D, { align: "start", gap: "4px", wrap: "nowrap", children: /* @__PURE__ */ e.jsx(
1496
- H,
1457
+ }, We = () => {
1458
+ F("");
1459
+ }, Da = () => /* @__PURE__ */ e(Re, { justify: "space-between", style: { width: "50%" }, children: /* @__PURE__ */ e(N, { align: "start", gap: "4px", wrap: "nowrap", children: /* @__PURE__ */ e(
1460
+ Z,
1497
1461
  {
1498
- disabled: !V.getCurrentRecord(),
1462
+ disabled: !M.getCurrentRecord(),
1499
1463
  color: "red",
1500
- leftSection: /* @__PURE__ */ e.jsx(Ye, {}),
1501
- onClick: Ea,
1502
- children: `${g("archbase:Revoke")}`
1464
+ leftSection: /* @__PURE__ */ e(Xe, {}),
1465
+ onClick: za,
1466
+ children: `${f("archbase:Revoke")}`
1503
1467
  }
1504
1468
  ) }) });
1505
- return /* @__PURE__ */ e.jsxs(Y, { p: "md", style: { height: a, display: "flex", flexDirection: "column" }, children: [
1506
- /* @__PURE__ */ e.jsx(Z, { variant: "pills", value: u, onChange: f, children: /* @__PURE__ */ e.jsxs(Z.List, { children: [
1507
- /* @__PURE__ */ e.jsx(Z.Tab, { value: "users", children: `${g("Usuários")}` }),
1508
- /* @__PURE__ */ e.jsx(Z.Tab, { value: "groups", children: `${g("Grupos")}` }),
1509
- /* @__PURE__ */ e.jsx(Z.Tab, { value: "profiles", children: `${g("Perfis")}` }),
1510
- /* @__PURE__ */ e.jsx(Z.Tab, { value: "resources", children: `${g("Recursos")}` }),
1511
- /* @__PURE__ */ e.jsx(Z.Tab, { value: "accessTokens", children: `${g("Tokens Acesso")}` })
1469
+ return /* @__PURE__ */ o(Y, { p: "md", style: { height: a, display: "flex", flexDirection: "column" }, children: [
1470
+ /* @__PURE__ */ e(K, { variant: "pills", value: u, onChange: b, children: /* @__PURE__ */ o(K.List, { children: [
1471
+ /* @__PURE__ */ e(K.Tab, { value: "users", children: `${f("Usuários")}` }),
1472
+ /* @__PURE__ */ e(K.Tab, { value: "groups", children: `${f("Grupos")}` }),
1473
+ /* @__PURE__ */ e(K.Tab, { value: "profiles", children: `${f("Perfis")}` }),
1474
+ /* @__PURE__ */ e(K.Tab, { value: "resources", children: `${f("Recursos")}` }),
1475
+ /* @__PURE__ */ e(K.Tab, { value: "accessTokens", children: `${f("Tokens Acesso")}` })
1512
1476
  ] }) }),
1513
- /* @__PURE__ */ e.jsx(
1514
- Ae,
1477
+ /* @__PURE__ */ e(
1478
+ Te,
1515
1479
  {
1516
1480
  active: u === "users",
1517
1481
  printTitle: "Usuários",
1518
- gridRef: ee,
1519
- dataSource: E,
1520
- isLoading: O,
1482
+ gridRef: oe,
1483
+ dataSource: $,
1484
+ isLoading: B,
1521
1485
  error: c,
1522
- getRowId: A,
1486
+ getRowId: R,
1523
1487
  striped: !0,
1524
- toolbarLeftContent: /* @__PURE__ */ e.jsx(
1525
- Je,
1488
+ toolbarLeftContent: /* @__PURE__ */ e(
1489
+ Ze,
1526
1490
  {
1527
- onAdd: oe.handleAdd,
1528
- onEditPermissions: oe.handleOpenPermissionsModal,
1529
- t: g
1491
+ onAdd: ne.handleAdd,
1492
+ onEditPermissions: ne.handleOpenPermissionsModal,
1493
+ t: f
1530
1494
  }
1531
1495
  ),
1532
- renderRowActions: Pa,
1533
- actionsColumnWidth: b?.userActionsColumnWidth,
1534
- children: Ta
1496
+ renderRowActions: Ia,
1497
+ actionsColumnWidth: A?.userActionsColumnWidth,
1498
+ children: xa
1535
1499
  }
1536
1500
  ),
1537
- /* @__PURE__ */ e.jsx(
1538
- Ae,
1501
+ /* @__PURE__ */ e(
1502
+ Te,
1539
1503
  {
1540
1504
  active: u === "groups",
1541
1505
  printTitle: "Grupos",
1542
- gridRef: N,
1543
- dataSource: te,
1544
- isLoading: Ge,
1506
+ gridRef: G,
1507
+ dataSource: ie,
1508
+ isLoading: Oe,
1545
1509
  error: c,
1546
- getRowId: me,
1547
- toolbarLeftContent: /* @__PURE__ */ e.jsx(
1548
- Je,
1510
+ getRowId: fe,
1511
+ toolbarLeftContent: /* @__PURE__ */ e(
1512
+ Ze,
1549
1513
  {
1550
- onAdd: ie.handleAdd,
1551
- onEditPermissions: ie.handleOpenPermissionsModal,
1552
- t: g
1514
+ onAdd: se.handleAdd,
1515
+ onEditPermissions: se.handleOpenPermissionsModal,
1516
+ t: f
1553
1517
  }
1554
1518
  ),
1555
- renderRowActions: Fa,
1556
- actionsColumnWidth: b?.groupActionsColumnWidth,
1557
- children: Ra
1519
+ renderRowActions: Pa,
1520
+ actionsColumnWidth: A?.groupActionsColumnWidth,
1521
+ children: Ta
1558
1522
  }
1559
1523
  ),
1560
- /* @__PURE__ */ e.jsx(
1561
- Ae,
1524
+ /* @__PURE__ */ e(
1525
+ Te,
1562
1526
  {
1563
1527
  active: u === "profiles",
1564
1528
  printTitle: "Perfis",
1565
1529
  gridRef: J,
1566
- dataSource: ze,
1530
+ dataSource: De,
1567
1531
  isLoading: va,
1568
1532
  error: c,
1569
- getRowId: he,
1570
- toolbarLeftContent: /* @__PURE__ */ e.jsx(
1571
- Je,
1533
+ getRowId: pe,
1534
+ toolbarLeftContent: /* @__PURE__ */ e(
1535
+ Ze,
1572
1536
  {
1573
- onAdd: ne.handleAdd,
1574
- onEditPermissions: ne.handleOpenPermissionsModal,
1575
- t: g
1537
+ onAdd: le.handleAdd,
1538
+ onEditPermissions: le.handleOpenPermissionsModal,
1539
+ t: f
1576
1540
  }
1577
1541
  ),
1578
- renderRowActions: za,
1579
- actionsColumnWidth: b?.profileActionsColumnWidth,
1580
- children: ka
1542
+ renderRowActions: Fa,
1543
+ actionsColumnWidth: A?.profileActionsColumnWidth,
1544
+ children: Ra
1581
1545
  }
1582
1546
  ),
1583
- /* @__PURE__ */ e.jsx(
1584
- Ae,
1547
+ /* @__PURE__ */ e(
1548
+ Te,
1585
1549
  {
1586
1550
  active: u === "resources",
1587
1551
  printTitle: "Recursos",
1588
- gridRef: w,
1552
+ gridRef: S,
1589
1553
  dataSource: wa,
1590
1554
  isLoading: Ca,
1591
1555
  error: c,
1592
- getRowId: h,
1556
+ getRowId: p,
1593
1557
  enableRowActions: !1,
1594
- children: Ia
1558
+ children: ka
1595
1559
  }
1596
1560
  ),
1597
- /* @__PURE__ */ e.jsx(
1598
- Ae,
1561
+ /* @__PURE__ */ e(
1562
+ Te,
1599
1563
  {
1600
1564
  active: u === "accessTokens",
1601
1565
  printTitle: "Tokens de API",
1602
- gridRef: T,
1603
- dataSource: V,
1604
- isLoading: z,
1566
+ gridRef: k,
1567
+ dataSource: M,
1568
+ isLoading: E,
1605
1569
  error: c,
1606
- getRowId: p,
1570
+ getRowId: m,
1607
1571
  striped: !0,
1608
1572
  enableRowActions: !1,
1609
1573
  toolbarLeftContent: Da(),
1610
1574
  children: Aa
1611
1575
  }
1612
1576
  ),
1613
- s === q.USER ? /* @__PURE__ */ e.jsx(
1614
- mr,
1577
+ t === H.USER ? /* @__PURE__ */ e(
1578
+ ur,
1615
1579
  {
1616
- onClickOk: oe.handleSaveModal,
1580
+ onClickOk: ne.handleSaveModal,
1617
1581
  opened: !0,
1618
- dataSource: E,
1619
- onClickCancel: oe.handleCancelModal,
1620
- options: o
1582
+ dataSource: $,
1583
+ onClickCancel: ne.handleCancelModal,
1584
+ options: i
1621
1585
  }
1622
1586
  ) : null,
1623
- s === q.GROUP ? /* @__PURE__ */ e.jsx(
1624
- gr,
1587
+ t === H.GROUP ? /* @__PURE__ */ e(
1588
+ hr,
1625
1589
  {
1626
- onClickOk: ie.handleSaveModal,
1590
+ onClickOk: se.handleSaveModal,
1627
1591
  opened: !0,
1628
- dataSource: te,
1629
- onClickCancel: ie.handleCancelModal,
1630
- options: t
1592
+ dataSource: ie,
1593
+ onClickCancel: se.handleCancelModal,
1594
+ options: n
1631
1595
  }
1632
1596
  ) : null,
1633
- s === q.PROFILE ? /* @__PURE__ */ e.jsx(
1634
- ur,
1597
+ t === H.PROFILE ? /* @__PURE__ */ e(
1598
+ sr,
1635
1599
  {
1636
- onClickOk: ne.handleSaveModal,
1600
+ onClickOk: le.handleSaveModal,
1637
1601
  opened: !0,
1638
- dataSource: ze,
1639
- onClickCancel: ne.handleCancelModal,
1640
- options: l
1602
+ dataSource: De,
1603
+ onClickCancel: le.handleCancelModal,
1604
+ options: h
1641
1605
  }
1642
1606
  ) : null,
1643
- x === q.USER ? /* @__PURE__ */ e.jsx(
1644
- We,
1607
+ g === H.USER ? /* @__PURE__ */ e(
1608
+ qe,
1645
1609
  {
1646
- dataSource: E,
1647
- opened: !!x,
1648
- close: Ue
1610
+ dataSource: $,
1611
+ opened: !!g,
1612
+ close: We
1649
1613
  }
1650
1614
  ) : null,
1651
- x === q.GROUP ? /* @__PURE__ */ e.jsx(
1652
- We,
1615
+ g === H.GROUP ? /* @__PURE__ */ e(
1616
+ qe,
1653
1617
  {
1654
- dataSource: te,
1655
- opened: !!x,
1656
- close: Ue
1618
+ dataSource: ie,
1619
+ opened: !!g,
1620
+ close: We
1657
1621
  }
1658
1622
  ) : null,
1659
- x === q.PROFILE ? /* @__PURE__ */ e.jsx(
1660
- We,
1623
+ g === H.PROFILE ? /* @__PURE__ */ e(
1624
+ qe,
1661
1625
  {
1662
- dataSource: ze,
1663
- opened: !!x,
1664
- close: Ue
1626
+ dataSource: De,
1627
+ opened: !!g,
1628
+ close: We
1665
1629
  }
1666
1630
  ) : null
1667
1631
  ] });
1668
1632
  }
1669
- function Yr({ height: a = "400px", width: r = "100%" }) {
1670
- Xe();
1671
- const n = ma("apiTokenStore"), o = { validateEntity: () => [] }, { colorScheme: l } = Ne(), [t, b] = k(void 0), m = X(Q.ApiToken), [C, c] = k(""), y = be(null), u = (N) => N.id, { dataSource: f } = Ja({
1633
+ function Jr({ height: a = "400px", width: r = "100%" }) {
1634
+ Qe();
1635
+ const l = pa("apiTokenStore"), i = { validateEntity: () => [] }, { colorScheme: h } = Ge(), [n, A] = P(void 0), v = X(Q.ApiToken), [x, c] = P(""), C = ye(null), u = (G) => G.id, { dataSource: b } = ja({
1672
1636
  initialData: [],
1673
1637
  name: "dataSource"
1674
- }), F = Ie(
1638
+ }), D = Pe(
1675
1639
  "ArchbaseApiTokenView-LocalDataSource",
1676
- f,
1640
+ b,
1677
1641
  void 0,
1678
1642
  void 0
1679
- ), { dataSource: j, isLoading: B } = Ze({
1643
+ ), { dataSource: y, isLoading: q } = Je({
1680
1644
  name: "dsApiToken",
1681
- service: m,
1682
- store: n,
1683
- validator: o,
1645
+ service: v,
1646
+ store: l,
1647
+ validator: i,
1684
1648
  pageSize: 25,
1685
1649
  loadOnStart: !0,
1686
- onLoadComplete: (N) => {
1650
+ onLoadComplete: (G) => {
1687
1651
  },
1688
- onDestroy: (N) => {
1652
+ onDestroy: (G) => {
1689
1653
  },
1690
- onError: (N, J) => {
1691
- b(N), _.showError(i().t("archbase:WARNING"), N, J);
1654
+ onError: (G, J) => {
1655
+ A(G), ee.showError(s().t("archbase:WARNING"), G, J);
1692
1656
  }
1693
- }), L = Ie(
1657
+ }), V = Pe(
1694
1658
  "ArchbaseApiTokenView-RemoteDataSource",
1695
- j,
1659
+ y,
1696
1660
  void 0,
1697
1661
  void 0
1698
- ), s = `calc(${a} - 40px)`, d = /* @__PURE__ */ e.jsxs(we, { children: [
1699
- /* @__PURE__ */ e.jsx(
1700
- S,
1662
+ ), t = `calc(${a} - 40px)`, d = /* @__PURE__ */ o(Ae, { children: [
1663
+ /* @__PURE__ */ e(
1664
+ T,
1701
1665
  {
1702
1666
  dataField: "user.avatar",
1703
1667
  dataType: "image",
1704
1668
  size: 80,
1705
1669
  header: "Foto",
1706
- render: (N) => /* @__PURE__ */ e.jsx(
1670
+ render: (G) => /* @__PURE__ */ e(
1707
1671
  "img",
1708
1672
  {
1709
1673
  style: { borderRadius: 50, height: "32px", maxHeight: "32px" },
1710
- src: N.row.user && N.row.user.avatar ? atob(N.row.user.avatar) : Ke
1674
+ src: G.row.user && G.row.user.avatar ? atob(G.row.user.avatar) : Ye
1711
1675
  }
1712
1676
  ),
1713
1677
  inputFilterType: "text",
1714
1678
  align: "center"
1715
1679
  }
1716
1680
  ),
1717
- /* @__PURE__ */ e.jsx(
1718
- S,
1681
+ /* @__PURE__ */ e(
1682
+ T,
1719
1683
  {
1720
1684
  dataField: "user.userName",
1721
1685
  dataType: "text",
@@ -1724,8 +1688,8 @@ function Yr({ height: a = "400px", width: r = "100%" }) {
1724
1688
  inputFilterType: "text"
1725
1689
  }
1726
1690
  ),
1727
- /* @__PURE__ */ e.jsx(
1728
- S,
1691
+ /* @__PURE__ */ e(
1692
+ T,
1729
1693
  {
1730
1694
  dataField: "user.email",
1731
1695
  dataType: "text",
@@ -1734,8 +1698,8 @@ function Yr({ height: a = "400px", width: r = "100%" }) {
1734
1698
  inputFilterType: "text"
1735
1699
  }
1736
1700
  ),
1737
- /* @__PURE__ */ e.jsx(
1738
- S,
1701
+ /* @__PURE__ */ e(
1702
+ T,
1739
1703
  {
1740
1704
  dataField: "name",
1741
1705
  dataType: "text",
@@ -1744,8 +1708,8 @@ function Yr({ height: a = "400px", width: r = "100%" }) {
1744
1708
  inputFilterType: "text"
1745
1709
  }
1746
1710
  ),
1747
- /* @__PURE__ */ e.jsx(
1748
- S,
1711
+ /* @__PURE__ */ e(
1712
+ T,
1749
1713
  {
1750
1714
  dataField: "description",
1751
1715
  dataType: "text",
@@ -1754,8 +1718,8 @@ function Yr({ height: a = "400px", width: r = "100%" }) {
1754
1718
  inputFilterType: "text"
1755
1719
  }
1756
1720
  ),
1757
- /* @__PURE__ */ e.jsx(
1758
- S,
1721
+ /* @__PURE__ */ e(
1722
+ T,
1759
1723
  {
1760
1724
  dataField: "token",
1761
1725
  dataType: "text",
@@ -1765,8 +1729,8 @@ function Yr({ height: a = "400px", width: r = "100%" }) {
1765
1729
  enableClickToCopy: !0
1766
1730
  }
1767
1731
  ),
1768
- /* @__PURE__ */ e.jsx(
1769
- S,
1732
+ /* @__PURE__ */ e(
1733
+ T,
1770
1734
  {
1771
1735
  dataField: "tenantId",
1772
1736
  dataType: "text",
@@ -1776,42 +1740,42 @@ function Yr({ height: a = "400px", width: r = "100%" }) {
1776
1740
  enableClickToCopy: !0
1777
1741
  }
1778
1742
  ),
1779
- /* @__PURE__ */ e.jsx(
1780
- S,
1743
+ /* @__PURE__ */ e(
1744
+ T,
1781
1745
  {
1782
1746
  dataField: "expirationDate",
1783
1747
  dataType: "text",
1784
1748
  size: 240,
1785
1749
  header: "Validade",
1786
- render: (N) => {
1787
- if (!N.row.expirationDate)
1788
- return /* @__PURE__ */ e.jsx(v, { c: "dimmed", children: "Sem expiração" });
1750
+ render: (G) => {
1751
+ if (!G.row.expirationDate)
1752
+ return /* @__PURE__ */ e(w, { c: "dimmed", children: "Sem expiração" });
1789
1753
  const J = /* @__PURE__ */ new Date();
1790
1754
  J.setHours(0, 0, 0, 0);
1791
- const w = new Date(N.row.expirationDate);
1792
- w.setHours(0, 0, 0, 0);
1793
- const T = w.getTime() - J.getTime(), A = Math.ceil(T / (1e3 * 60 * 60 * 24));
1794
- let he = Math.max(0, Math.min(100, A / 365 * 100)), h = "green", p = "";
1795
- A < 0 ? (h = "red", he = 100, p = `Vencido há ${Math.abs(A)} dia${Math.abs(A) !== 1 ? "s" : ""}`) : A === 0 ? (h = "red", he = 5, p = "Vence hoje") : A <= 7 ? (h = "red", p = `${A} dia${A !== 1 ? "s" : ""}`) : A <= 30 ? (h = "orange", p = `${A} dias`) : A <= 90 ? (h = "yellow", p = `${A} dias`) : (h = "green", p = `${A} dias`);
1796
- const V = A < 0 ? `Vencido em ${w.toLocaleDateString()}` : `Expira em ${w.toLocaleDateString()}`;
1797
- return /* @__PURE__ */ e.jsx(ve, { label: V, withArrow: !0, children: /* @__PURE__ */ e.jsxs(D, { gap: "xs", wrap: "nowrap", children: [
1798
- /* @__PURE__ */ e.jsx(
1799
- $a,
1755
+ const S = new Date(G.row.expirationDate);
1756
+ S.setHours(0, 0, 0, 0);
1757
+ const k = S.getTime() - J.getTime(), R = Math.ceil(k / (1e3 * 60 * 60 * 24));
1758
+ let pe = Math.max(0, Math.min(100, R / 365 * 100)), p = "green", m = "";
1759
+ R < 0 ? (p = "red", pe = 100, m = `Vencido há ${Math.abs(R)} dia${Math.abs(R) !== 1 ? "s" : ""}`) : R === 0 ? (p = "red", pe = 5, m = "Vence hoje") : R <= 7 ? (p = "red", m = `${R} dia${R !== 1 ? "s" : ""}`) : R <= 30 ? (p = "orange", m = `${R} dias`) : R <= 90 ? (p = "yellow", m = `${R} dias`) : (p = "green", m = `${R} dias`);
1760
+ const M = R < 0 ? `Vencido em ${S.toLocaleDateString()}` : `Expira em ${S.toLocaleDateString()}`;
1761
+ return /* @__PURE__ */ e(Ce, { label: M, withArrow: !0, children: /* @__PURE__ */ o(N, { gap: "xs", wrap: "nowrap", children: [
1762
+ /* @__PURE__ */ e(
1763
+ Ea,
1800
1764
  {
1801
1765
  size: 36,
1802
1766
  thickness: 4,
1803
1767
  roundCaps: !0,
1804
- sections: [{ value: A < 0 ? 100 : he, color: h }]
1768
+ sections: [{ value: R < 0 ? 100 : pe, color: p }]
1805
1769
  }
1806
1770
  ),
1807
- /* @__PURE__ */ e.jsx(v, { size: "sm", c: A < 0 ? "red" : void 0, fw: A <= 7 ? 600 : void 0, children: p })
1771
+ /* @__PURE__ */ e(w, { size: "sm", c: R < 0 ? "red" : void 0, fw: R <= 7 ? 600 : void 0, children: m })
1808
1772
  ] }) });
1809
1773
  },
1810
1774
  inputFilterType: "text"
1811
1775
  }
1812
1776
  ),
1813
- /* @__PURE__ */ e.jsx(
1814
- S,
1777
+ /* @__PURE__ */ e(
1778
+ T,
1815
1779
  {
1816
1780
  dataField: "activated",
1817
1781
  dataType: "boolean",
@@ -1819,8 +1783,8 @@ function Yr({ height: a = "400px", width: r = "100%" }) {
1819
1783
  inputFilterType: "checkbox"
1820
1784
  }
1821
1785
  ),
1822
- /* @__PURE__ */ e.jsx(
1823
- S,
1786
+ /* @__PURE__ */ e(
1787
+ T,
1824
1788
  {
1825
1789
  dataField: "revoked",
1826
1790
  dataType: "boolean",
@@ -1828,117 +1792,117 @@ function Yr({ height: a = "400px", width: r = "100%" }) {
1828
1792
  inputFilterType: "checkbox"
1829
1793
  }
1830
1794
  )
1831
- ] }), x = () => {
1832
- f.insert(sr.newInstance()), f && !F.isDataSourceV2 && F.v1State.forceUpdate(), c("apiToken");
1833
- }, I = () => {
1834
- j.getCurrentRecord() && le.showConfirmDialogYesNo(
1835
- `${i().t("archbase:Confirme")}`,
1836
- `${i().t("archbase:Deseja revogar o token de API do usuário ")}${j.getCurrentRecord().user.name} ?`,
1795
+ ] }), g = () => {
1796
+ b.insert(ar.newInstance()), b && !D.isDataSourceV2 && D.v1State.forceUpdate(), c("apiToken");
1797
+ }, F = () => {
1798
+ y.getCurrentRecord() && ce.showConfirmDialogYesNo(
1799
+ `${s().t("archbase:Confirme")}`,
1800
+ `${s().t("archbase:Deseja revogar o token de API do usuário ")}${y.getCurrentRecord().user.name} ?`,
1837
1801
  async () => {
1838
- await m.revoke(j.getCurrentRecord().token).then(async () => {
1839
- _.showSuccess(
1840
- `${i().t("mentors:Informação")}`,
1841
- `${i().t("mentors:Token de API revogado com sucesso!")}`
1842
- ), j.refreshData(), j && !L.isDataSourceV2 && L.v1State.forceUpdate();
1843
- }).catch((N) => {
1844
- le.showErrorWithDetails(
1845
- `${i().t("mentors:Atenção")}`,
1846
- ue(N),
1847
- De(N)
1802
+ await v.revoke(y.getCurrentRecord().token).then(async () => {
1803
+ ee.showSuccess(
1804
+ `${s().t("mentors:Informação")}`,
1805
+ `${s().t("mentors:Token de API revogado com sucesso!")}`
1806
+ ), y.refreshData(), y && !V.isDataSourceV2 && V.v1State.forceUpdate();
1807
+ }).catch((G) => {
1808
+ ce.showErrorWithDetails(
1809
+ `${s().t("mentors:Atenção")}`,
1810
+ he(G),
1811
+ $e(G)
1848
1812
  );
1849
1813
  });
1850
1814
  },
1851
1815
  () => {
1852
1816
  }
1853
1817
  );
1854
- }, P = () => {
1818
+ }, z = () => {
1855
1819
  c("");
1856
- }, g = async (N, J) => {
1857
- const w = f.getCurrentRecord();
1858
- if (w)
1820
+ }, f = async (G, J) => {
1821
+ const S = b.getCurrentRecord();
1822
+ if (S)
1859
1823
  try {
1860
- if (f.validate(), !w.user || !w.user.email) {
1861
- le.showErrorWithDetails(
1862
- `${i().t("archbase:WARNING")}`,
1863
- `${i().t("archbase:Selecione um usuário para o token de API")}`,
1824
+ if (b.validate(), !S.user || !S.user.email) {
1825
+ ce.showErrorWithDetails(
1826
+ `${s().t("archbase:WARNING")}`,
1827
+ `${s().t("archbase:Selecione um usuário para o token de API")}`,
1864
1828
  ""
1865
1829
  );
1866
1830
  return;
1867
1831
  }
1868
- await m.create(w.user.email, w.expirationDate, w.name, w.description).then(async (T) => {
1869
- f.cancel(), f && !F.isDataSourceV2 && F.v1State.forceUpdate(), j.append(T), j && !L.isDataSourceV2 && L.v1State.forceUpdate(), _.showSuccess(
1870
- `${i().t("mentors:Informação")}`,
1871
- `${i().t("mentors:Token de API gerado com sucesso!")}`
1832
+ await v.create(S.user.email, S.expirationDate, S.name, S.description).then(async (k) => {
1833
+ b.cancel(), b && !D.isDataSourceV2 && D.v1State.forceUpdate(), y.append(k), y && !V.isDataSourceV2 && V.v1State.forceUpdate(), ee.showSuccess(
1834
+ `${s().t("mentors:Informação")}`,
1835
+ `${s().t("mentors:Token de API gerado com sucesso!")}`
1872
1836
  ), J && J(!0);
1873
- }).catch((T) => {
1874
- le.showErrorWithDetails(
1875
- `${i().t("mentors:Atenção")}`,
1876
- ue(T),
1877
- De(T)
1837
+ }).catch((k) => {
1838
+ ce.showErrorWithDetails(
1839
+ `${s().t("mentors:Atenção")}`,
1840
+ he(k),
1841
+ $e(k)
1878
1842
  );
1879
1843
  });
1880
- } catch (T) {
1881
- le.showErrorWithDetails(
1882
- `${i().t("mentors:Atenção")}`,
1883
- ue(T),
1884
- De(T)
1844
+ } catch (k) {
1845
+ ce.showErrorWithDetails(
1846
+ `${s().t("mentors:Atenção")}`,
1847
+ he(k),
1848
+ $e(k)
1885
1849
  );
1886
1850
  }
1887
- }, ee = () => /* @__PURE__ */ e.jsx(Te, { justify: "space-between", style: { width: "50%" }, children: /* @__PURE__ */ e.jsxs(D, { align: "start", gap: "2px", wrap: "nowrap", children: [
1888
- /* @__PURE__ */ e.jsx(H, { color: "green", leftSection: /* @__PURE__ */ e.jsx(ja, {}), onClick: x, children: i().t("archbase:New") }),
1889
- /* @__PURE__ */ e.jsx(H, { disabled: !j.getCurrentRecord(), color: "red", leftSection: /* @__PURE__ */ e.jsx(Ye, {}), onClick: I, children: i().t("archbase:Revoke") })
1890
- ] }) });
1891
- return /* @__PURE__ */ e.jsxs(Y, { p: "md", style: { height: a, display: "flex", flexDirection: "column" }, children: [
1892
- /* @__PURE__ */ e.jsx(
1851
+ };
1852
+ return /* @__PURE__ */ o(Y, { p: "md", style: { height: a, display: "flex", flexDirection: "column" }, children: [
1853
+ /* @__PURE__ */ e(
1893
1854
  Y,
1894
1855
  {
1895
1856
  withBorder: !0,
1896
1857
  style: {
1897
- height: s,
1858
+ height: t,
1898
1859
  display: "flex",
1899
1860
  width: "100%",
1900
1861
  flex: 1,
1901
1862
  minHeight: 0,
1902
1863
  overflow: "auto"
1903
1864
  },
1904
- children: /* @__PURE__ */ e.jsx(
1905
- xa,
1865
+ children: /* @__PURE__ */ e(
1866
+ ha,
1906
1867
  {
1907
- gridRef: y,
1868
+ gridRef: C,
1908
1869
  printTitle: "Tokens de API",
1909
1870
  width: "100%",
1910
1871
  height: "100%",
1911
1872
  withBorder: !1,
1912
- dataSource: j,
1873
+ dataSource: y,
1913
1874
  withColumnBorders: !0,
1914
1875
  striped: !0,
1915
1876
  enableTopToolbar: !0,
1916
1877
  enableRowActions: !1,
1917
1878
  pageSize: 50,
1918
- isLoading: B,
1919
- isError: !!t,
1920
- error: t,
1879
+ isLoading: q,
1880
+ isError: !!n,
1881
+ error: n,
1921
1882
  enableGlobalFilter: !0,
1922
1883
  getRowId: u,
1923
- toolbarLeftContent: ee(),
1884
+ toolbarLeftContent: /* @__PURE__ */ e(Re, { justify: "space-between", style: { width: "50%" }, children: /* @__PURE__ */ o(N, { align: "start", gap: "2px", wrap: "nowrap", children: [
1885
+ /* @__PURE__ */ e(Z, { color: "green", leftSection: /* @__PURE__ */ e(ba, {}), onClick: g, children: s().t("archbase:New") }),
1886
+ /* @__PURE__ */ e(Z, { disabled: !y.getCurrentRecord(), color: "red", leftSection: /* @__PURE__ */ e(Xe, {}), onClick: F, children: s().t("archbase:Revoke") })
1887
+ ] }) }),
1924
1888
  children: d
1925
1889
  }
1926
1890
  )
1927
1891
  }
1928
1892
  ),
1929
- C === "apiToken" ? /* @__PURE__ */ e.jsx(
1930
- br,
1893
+ x === "apiToken" ? /* @__PURE__ */ e(
1894
+ mr,
1931
1895
  {
1932
- onClickOk: P,
1896
+ onClickOk: z,
1933
1897
  opened: !0,
1934
- dataSource: f,
1935
- onCustomSave: g,
1936
- onClickCancel: P
1898
+ dataSource: b,
1899
+ onCustomSave: f,
1900
+ onClickCancel: z
1937
1901
  }
1938
1902
  ) : null
1939
1903
  ] });
1940
1904
  }
1941
- const Le = (a) => {
1905
+ const Ve = (a) => {
1942
1906
  switch (a) {
1943
1907
  case "critical":
1944
1908
  return "red";
@@ -1949,30 +1913,30 @@ const Le = (a) => {
1949
1913
  default:
1950
1914
  return "gray";
1951
1915
  }
1952
- }, Tr = ({ card: a }) => /* @__PURE__ */ e.jsx(Y, { withBorder: !0, radius: "md", p: "sm", style: { borderLeft: `3px solid var(--mantine-color-${Le(a.severity)}-6)` }, children: /* @__PURE__ */ e.jsxs(U, { gap: 4, children: [
1953
- /* @__PURE__ */ e.jsxs(D, { gap: 8, align: "baseline", wrap: "wrap", children: [
1954
- /* @__PURE__ */ e.jsx(v, { fw: 600, size: "1.7rem", lh: 1.05, c: Le(a.severity), children: a.value }),
1955
- a.of ? /* @__PURE__ */ e.jsx(v, { size: "xs", c: "dimmed", children: a.of }) : null
1916
+ }, Sr = ({ card: a }) => /* @__PURE__ */ e(Y, { withBorder: !0, radius: "md", p: "sm", style: { borderLeft: `3px solid var(--mantine-color-${Ve(a.severity)}-6)` }, children: /* @__PURE__ */ o(W, { gap: 4, children: [
1917
+ /* @__PURE__ */ o(N, { gap: 8, align: "baseline", wrap: "wrap", children: [
1918
+ /* @__PURE__ */ e(w, { fw: 600, size: "1.7rem", lh: 1.05, c: Ve(a.severity), children: a.value }),
1919
+ a.of ? /* @__PURE__ */ e(w, { size: "xs", c: "dimmed", children: a.of }) : null
1956
1920
  ] }),
1957
- /* @__PURE__ */ e.jsx(v, { size: "sm", fw: 550, children: a.label }),
1958
- a.description ? /* @__PURE__ */ e.jsx(v, { size: "xs", c: "dimmed", lh: 1.45, children: a.description }) : null
1959
- ] }) }), Rr = ({ cards: a }) => /* @__PURE__ */ e.jsx(Ve, { cols: { base: 1, sm: 2, lg: 3, xl: 4 }, spacing: "xs", children: a.map((r, n) => /* @__PURE__ */ e.jsx(Tr, { card: r }, `${r.label}-${n}`)) }), kr = ({ flags: a }) => /* @__PURE__ */ e.jsx(Ve, { cols: { base: 1, sm: 2, lg: 4 }, spacing: "xs", children: a.map((r) => /* @__PURE__ */ e.jsx(Y, { withBorder: !0, radius: "md", p: "sm", children: /* @__PURE__ */ e.jsxs(U, { gap: 3, children: [
1960
- /* @__PURE__ */ e.jsx(v, { size: "10px", c: "dimmed", ff: "monospace", style: { wordBreak: "break-all" }, children: r.key }),
1961
- /* @__PURE__ */ e.jsxs(D, { gap: 7, wrap: "nowrap", children: [
1962
- /* @__PURE__ */ e.jsx(se, { size: "xs", circle: !0, color: Le(r.severity) }),
1963
- /* @__PURE__ */ e.jsx(v, { size: "sm", fw: 550, children: r.value })
1921
+ /* @__PURE__ */ e(w, { size: "sm", fw: 550, children: a.label }),
1922
+ a.description ? /* @__PURE__ */ e(w, { size: "xs", c: "dimmed", lh: 1.45, children: a.description }) : null
1923
+ ] }) }), Ar = ({ cards: a }) => /* @__PURE__ */ e(Me, { cols: { base: 1, sm: 2, lg: 3, xl: 4 }, spacing: "xs", children: a.map((r, l) => /* @__PURE__ */ e(Sr, { card: r }, `${r.label}-${l}`)) }), xr = ({ flags: a }) => /* @__PURE__ */ e(Me, { cols: { base: 1, sm: 2, lg: 4 }, spacing: "xs", children: a.map((r) => /* @__PURE__ */ e(Y, { withBorder: !0, radius: "md", p: "sm", children: /* @__PURE__ */ o(W, { gap: 3, children: [
1924
+ /* @__PURE__ */ e(w, { size: "10px", c: "dimmed", ff: "monospace", style: { wordBreak: "break-all" }, children: r.key }),
1925
+ /* @__PURE__ */ o(N, { gap: 7, wrap: "nowrap", children: [
1926
+ /* @__PURE__ */ e(te, { size: "xs", circle: !0, color: Ve(r.severity) }),
1927
+ /* @__PURE__ */ e(w, { size: "sm", fw: 550, children: r.value })
1964
1928
  ] }),
1965
- r.description ? /* @__PURE__ */ e.jsx(v, { size: "xs", c: "dimmed", lh: 1.4, children: r.description }) : null
1966
- ] }) }, r.key)) }), Ir = ({ attributes: a }) => /* @__PURE__ */ e.jsx(U, { gap: 7, children: a.map((r, n) => /* @__PURE__ */ e.jsxs(D, { gap: 12, wrap: "nowrap", justify: "space-between", children: [
1967
- /* @__PURE__ */ e.jsx(v, { size: "sm", c: "dimmed", children: r.label }),
1968
- /* @__PURE__ */ e.jsx(v, { size: "sm", fw: 600, ta: "right", children: r.value })
1969
- ] }, `${r.label}-${n}`)) }), Pe = ({ title: a, hint: r, children: n }) => /* @__PURE__ */ e.jsxs(U, { gap: "xs", children: [
1970
- /* @__PURE__ */ e.jsxs(D, { gap: 10, align: "baseline", wrap: "wrap", children: [
1971
- /* @__PURE__ */ e.jsx(v, { size: "xs", fw: 650, tt: "uppercase", style: { letterSpacing: ".05em" }, children: a }),
1972
- r ? /* @__PURE__ */ e.jsx(v, { size: "xs", c: "dimmed", children: r }) : null
1929
+ r.description ? /* @__PURE__ */ e(w, { size: "xs", c: "dimmed", lh: 1.4, children: r.description }) : null
1930
+ ] }) }, r.key)) }), Tr = ({ attributes: a }) => /* @__PURE__ */ e(W, { gap: 7, children: a.map((r, l) => /* @__PURE__ */ o(N, { gap: 12, wrap: "nowrap", justify: "space-between", children: [
1931
+ /* @__PURE__ */ e(w, { size: "sm", c: "dimmed", children: r.label }),
1932
+ /* @__PURE__ */ e(w, { size: "sm", fw: 600, ta: "right", children: r.value })
1933
+ ] }, `${r.label}-${l}`)) }), Fe = ({ title: a, hint: r, children: l }) => /* @__PURE__ */ o(W, { gap: "xs", children: [
1934
+ /* @__PURE__ */ o(N, { gap: 10, align: "baseline", wrap: "wrap", children: [
1935
+ /* @__PURE__ */ e(w, { size: "xs", fw: 650, tt: "uppercase", style: { letterSpacing: ".05em" }, children: a }),
1936
+ r ? /* @__PURE__ */ e(w, { size: "xs", c: "dimmed", children: r }) : null
1973
1937
  ] }),
1974
- n
1975
- ] }), Pr = (a, r) => r > 0 ? ` · ${Math.round(a / r * 100)}%` : "", Fr = (a) => {
1938
+ l
1939
+ ] }), Rr = (a, r) => r > 0 ? ` · ${Math.round(a / r * 100)}%` : "", kr = (a) => {
1976
1940
  const r = a.flags;
1977
1941
  return [
1978
1942
  {
@@ -2004,11 +1968,11 @@ const Le = (a) => {
2004
1968
  description: r.scanConfigured ? "O catálogo se alimenta do código." : "O catálogo não se alimenta do código."
2005
1969
  }
2006
1970
  ];
2007
- }, zr = (a) => [
1971
+ }, Ir = (a) => [
2008
1972
  {
2009
1973
  severity: "critical",
2010
1974
  value: a.permissionsPointingToInactive,
2011
- of: `de ${a.permissions}${Pr(a.permissionsPointingToInactive, a.permissions)}`,
1975
+ of: `de ${a.permissions}${Rr(a.permissionsPointingToInactive, a.permissions)}`,
2012
1976
  label: "Permissões inertes",
2013
1977
  description: "Apontam para ação ou recurso inativo. É o acesso que o operador acredita ter concedido."
2014
1978
  },
@@ -2047,271 +2011,271 @@ const Le = (a) => {
2047
2011
  label: "Ninguém tem",
2048
2012
  description: "Capacidade existe no catálogo e não foi concedida a ninguém."
2049
2013
  }
2050
- ], Er = ({ slots: a, onError: r }) => {
2051
- const n = X(
2014
+ ], Pr = ({ slots: a, onError: r }) => {
2015
+ const l = X(
2052
2016
  Q.SecurityDiagnostics
2053
- ), [o, l] = k(void 0), [t, b] = k(!0), [m, C] = k(void 0);
2054
- ye(() => {
2017
+ ), [i, h] = P(void 0), [n, A] = P(!0), [v, x] = P(void 0);
2018
+ Se(() => {
2055
2019
  let u = !0;
2056
- return b(!0), n.getOverview().then((f) => {
2057
- u && (l(f), C(void 0));
2058
- }).catch((f) => {
2020
+ return A(!0), l.getOverview().then((b) => {
2021
+ u && (h(b), x(void 0));
2022
+ }).catch((b) => {
2059
2023
  if (u) {
2060
- const F = ue(f);
2061
- C(F), r?.(F);
2024
+ const D = he(b);
2025
+ x(D), r?.(D);
2062
2026
  }
2063
2027
  }).finally(() => {
2064
- u && b(!1);
2028
+ u && A(!1);
2065
2029
  }), () => {
2066
2030
  u = !1;
2067
2031
  };
2068
- }, [n]);
2032
+ }, [l]);
2069
2033
  const c = ae(
2070
- () => o ? [...Fr(o), ...a?.additionalFlags?.(o) ?? []] : [],
2071
- [o, a]
2072
- ), y = ae(
2073
- () => o ? [...zr(o), ...a?.additionalOverviewCards?.(o) ?? []] : [],
2074
- [o, a]
2034
+ () => i ? [...kr(i), ...a?.additionalFlags?.(i) ?? []] : [],
2035
+ [i, a]
2036
+ ), C = ae(
2037
+ () => i ? [...Ir(i), ...a?.additionalOverviewCards?.(i) ?? []] : [],
2038
+ [i, a]
2075
2039
  );
2076
- return t ? /* @__PURE__ */ e.jsx(Qe, { size: "sm" }) : m ? /* @__PURE__ */ e.jsx(Re, { color: "red", title: "Não foi possível ler o diagnóstico", children: m }) : o ? /* @__PURE__ */ e.jsxs(U, { gap: "lg", children: [
2077
- /* @__PURE__ */ e.jsxs(Pe, { title: "Proteções", hint: "de AccessOverview.flags", children: [
2078
- /* @__PURE__ */ e.jsx(kr, { flags: c }),
2079
- /* @__PURE__ */ e.jsx(v, { size: "xs", c: "dimmed", lh: 1.45, children: "Todas nascem com o padrão compatível — ligadas só quando alguém decide." })
2040
+ return n ? /* @__PURE__ */ e(Ke, { size: "sm" }) : v ? /* @__PURE__ */ e(ke, { color: "red", title: "Não foi possível ler o diagnóstico", children: v }) : i ? /* @__PURE__ */ o(W, { gap: "lg", children: [
2041
+ /* @__PURE__ */ o(Fe, { title: "Proteções", hint: "de AccessOverview.flags", children: [
2042
+ /* @__PURE__ */ e(xr, { flags: c }),
2043
+ /* @__PURE__ */ e(w, { size: "xs", c: "dimmed", lh: 1.45, children: "Todas nascem com o padrão compatível — ligadas só quando alguém decide." })
2080
2044
  ] }),
2081
- /* @__PURE__ */ e.jsx(Pe, { title: "Catálogo e concessões", hint: "contagens vivas", children: /* @__PURE__ */ e.jsx(Rr, { cards: y }) }),
2082
- a?.afterOverview?.(o)
2045
+ /* @__PURE__ */ e(Fe, { title: "Catálogo e concessões", hint: "contagens vivas", children: /* @__PURE__ */ e(Ar, { cards: C }) }),
2046
+ a?.afterOverview?.(i)
2083
2047
  ] }) : null;
2084
- }, ha = {
2048
+ }, da = {
2085
2049
  EFFECTIVE: { label: "Efetiva", color: "green" },
2086
2050
  INERT: { label: "Inerte", color: "orange" },
2087
2051
  DENIED: { label: "Negada", color: "red" }
2088
- }, Dr = { GROUP: "grupo", PROFILE: "perfil", USER: "direto" }, $r = [
2052
+ }, Fr = { GROUP: "grupo", PROFILE: "perfil", USER: "direto" }, zr = [
2089
2053
  { value: "all", label: "Todas" },
2090
2054
  { value: "EFFECTIVE", label: "Só efetivas" },
2091
2055
  { value: "INERT", label: "Só inertes" },
2092
2056
  { value: "DENIED", label: "Negadas" },
2093
2057
  { value: "inherited", label: "Só herdadas" }
2094
- ], Lr = ({ slots: a, onError: r }) => {
2095
- const n = X(
2058
+ ], Dr = ({ slots: a, onError: r }) => {
2059
+ const l = X(
2096
2060
  Q.SecurityDiagnostics
2097
- ), [o, l] = k(""), [t, b] = k(void 0), [m, C] = k(!1), [c, y] = k(void 0), [u, f] = k("all"), F = ce(
2098
- async (s) => {
2099
- const d = s.trim();
2061
+ ), [i, h] = P(""), [n, A] = P(void 0), [v, x] = P(!1), [c, C] = P(void 0), [u, b] = P("all"), D = de(
2062
+ async (t) => {
2063
+ const d = t.trim();
2100
2064
  if (d) {
2101
- C(!0), y(void 0);
2065
+ x(!0), C(void 0);
2102
2066
  try {
2103
- const x = d.includes("@") ? await n.getEffectiveAccessByEmail(d) : await n.getEffectiveAccessByUserId(d);
2104
- b(x);
2105
- } catch (x) {
2106
- const I = ue(x);
2107
- y(I), r?.(I), b(void 0);
2067
+ const g = d.includes("@") ? await l.getEffectiveAccessByEmail(d) : await l.getEffectiveAccessByUserId(d);
2068
+ A(g);
2069
+ } catch (g) {
2070
+ const F = he(g);
2071
+ C(F), r?.(F), A(void 0);
2108
2072
  } finally {
2109
- C(!1);
2073
+ x(!1);
2110
2074
  }
2111
2075
  }
2112
2076
  },
2113
- [n, r]
2114
- ), j = ae(() => t ? [
2115
- { label: "Perfil", value: t.profileName || "—" },
2116
- { label: "Grupos", value: t.groupNames.length ? t.groupNames.join(", ") : "—" },
2117
- ...a?.userAttributes?.(t) ?? []
2118
- ] : [], [t, a]), B = ae(() => t ? u === "all" ? t.capabilities : u === "inherited" ? t.capabilities.filter((s) => s.grantedByType !== "USER") : t.capabilities.filter((s) => s.situation === u) : [], [t, u]), L = a?.additionalCapabilityColumns ?? [];
2119
- return /* @__PURE__ */ e.jsxs(U, { gap: "lg", children: [
2120
- /* @__PURE__ */ e.jsx(Pe, { title: "Consultar", hint: "por e-mail ou id do usuário", children: a?.renderUserSearch ? a.renderUserSearch((s) => {
2121
- l(s), F(s);
2122
- }) : /* @__PURE__ */ e.jsxs(D, { gap: "xs", align: "flex-end", children: [
2123
- /* @__PURE__ */ e.jsx(
2124
- xe,
2077
+ [l, r]
2078
+ ), y = ae(() => n ? [
2079
+ { label: "Perfil", value: n.profileName || "—" },
2080
+ { label: "Grupos", value: n.groupNames.length ? n.groupNames.join(", ") : "—" },
2081
+ ...a?.userAttributes?.(n) ?? []
2082
+ ] : [], [n, a]), q = ae(() => n ? u === "all" ? n.capabilities : u === "inherited" ? n.capabilities.filter((t) => t.grantedByType !== "USER") : n.capabilities.filter((t) => t.situation === u) : [], [n, u]), V = a?.additionalCapabilityColumns ?? [];
2083
+ return /* @__PURE__ */ o(W, { gap: "lg", children: [
2084
+ /* @__PURE__ */ e(Fe, { title: "Consultar", hint: "por e-mail ou id do usuário", children: a?.renderUserSearch ? a.renderUserSearch((t) => {
2085
+ h(t), D(t);
2086
+ }) : /* @__PURE__ */ o(N, { gap: "xs", align: "flex-end", children: [
2087
+ /* @__PURE__ */ e(
2088
+ ge,
2125
2089
  {
2126
2090
  style: { flex: 1, minWidth: 240 },
2127
2091
  label: "Usuário",
2128
2092
  placeholder: "pessoa@empresa.com.br",
2129
- value: o,
2130
- onChange: (s) => l(s.currentTarget.value),
2131
- onKeyDown: (s) => {
2132
- s.key === "Enter" && F(o);
2093
+ value: i,
2094
+ onChange: (t) => h(t.currentTarget.value),
2095
+ onKeyDown: (t) => {
2096
+ t.key === "Enter" && D(i);
2133
2097
  }
2134
2098
  }
2135
2099
  ),
2136
- /* @__PURE__ */ e.jsx(H, { onClick: () => void F(o), loading: m, children: "Consultar" })
2100
+ /* @__PURE__ */ e(Z, { onClick: () => void D(i), loading: v, children: "Consultar" })
2137
2101
  ] }) }),
2138
- c ? /* @__PURE__ */ e.jsx(Re, { color: "red", title: "Não foi possível ler o efetivo", children: c }) : null,
2139
- m && !t ? /* @__PURE__ */ e.jsx(Qe, { size: "sm" }) : null,
2140
- t ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2141
- /* @__PURE__ */ e.jsx(Y, { withBorder: !0, radius: "md", p: "md", children: /* @__PURE__ */ e.jsxs(U, { gap: "sm", children: [
2142
- /* @__PURE__ */ e.jsxs(D, { gap: 8, wrap: "wrap", align: "center", children: [
2143
- /* @__PURE__ */ e.jsx(v, { fw: 620, children: t.userLabel }),
2144
- t.administrator ? /* @__PURE__ */ e.jsx(se, { color: "red", children: "administrador" }) : null,
2145
- t.enabled ? null : /* @__PURE__ */ e.jsx(se, { color: "red", children: "conta desativada" }),
2146
- a?.afterUserBadges?.(t)
2102
+ c ? /* @__PURE__ */ e(ke, { color: "red", title: "Não foi possível ler o efetivo", children: c }) : null,
2103
+ v && !n ? /* @__PURE__ */ e(Ke, { size: "sm" }) : null,
2104
+ n ? /* @__PURE__ */ o(Ne, { children: [
2105
+ /* @__PURE__ */ e(Y, { withBorder: !0, radius: "md", p: "md", children: /* @__PURE__ */ o(W, { gap: "sm", children: [
2106
+ /* @__PURE__ */ o(N, { gap: 8, wrap: "wrap", align: "center", children: [
2107
+ /* @__PURE__ */ e(w, { fw: 620, children: n.userLabel }),
2108
+ n.administrator ? /* @__PURE__ */ e(te, { color: "red", children: "administrador" }) : null,
2109
+ n.enabled ? null : /* @__PURE__ */ e(te, { color: "red", children: "conta desativada" }),
2110
+ a?.afterUserBadges?.(n)
2147
2111
  ] }),
2148
- /* @__PURE__ */ e.jsx(Ir, { attributes: j })
2112
+ /* @__PURE__ */ e(Tr, { attributes: y })
2149
2113
  ] }) }),
2150
- t.administrator ? /* @__PURE__ */ e.jsxs(Re, { color: "orange", title: "Administrador passa direto", children: [
2114
+ n.administrator ? /* @__PURE__ */ o(ke, { color: "orange", title: "Administrador passa direto", children: [
2151
2115
  "O portão GRANT concede sem consultar o catálogo. A lista abaixo vir vazia não é falta de dado — é o atalho que a flag ",
2152
- /* @__PURE__ */ e.jsx("code", { children: "isAdministrator" }),
2116
+ /* @__PURE__ */ e("code", { children: "isAdministrator" }),
2153
2117
  " representa."
2154
2118
  ] }) : null,
2155
- /* @__PURE__ */ e.jsx(Ve, { cols: { base: 2, sm: 4 }, spacing: "xs", children: [
2156
- ["concedidas", t.granted, "neutral"],
2157
- ["efetivas", t.effective, "ok"],
2158
- ["inertes", t.inert, "warning"],
2159
- ["negadas", t.denied, "critical"]
2160
- ].map(([s, d, x]) => /* @__PURE__ */ e.jsx(Y, { withBorder: !0, radius: "md", p: "sm", children: /* @__PURE__ */ e.jsxs(U, { gap: 2, children: [
2161
- /* @__PURE__ */ e.jsx(v, { size: "1.3rem", fw: 620, c: Le(x), children: d }),
2162
- /* @__PURE__ */ e.jsx(v, { size: "xs", c: "dimmed", children: s })
2163
- ] }) }, s)) }),
2164
- a?.afterEffectiveTally?.(t),
2165
- /* @__PURE__ */ e.jsxs(Pe, { title: "Capacidades", hint: `${B.length} de ${t.capabilities.length}`, children: [
2166
- /* @__PURE__ */ e.jsx(sa.Group, { multiple: !1, value: u, onChange: (s) => f(s), children: /* @__PURE__ */ e.jsx(D, { gap: 6, children: $r.map((s) => /* @__PURE__ */ e.jsx(sa, { value: s.value, size: "xs", variant: "outline", children: s.label }, s.value)) }) }),
2167
- /* @__PURE__ */ e.jsx(W.ScrollContainer, { minWidth: 640, children: /* @__PURE__ */ e.jsxs(W, { striped: !0, highlightOnHover: !0, withTableBorder: !0, children: [
2168
- /* @__PURE__ */ e.jsx(W.Thead, { children: /* @__PURE__ */ e.jsxs(W.Tr, { children: [
2169
- /* @__PURE__ */ e.jsx(W.Th, { children: "Capacidade" }),
2170
- /* @__PURE__ */ e.jsx(W.Th, { children: "Origem" }),
2171
- /* @__PURE__ */ e.jsx(W.Th, { children: "Situação" }),
2172
- L.map((s) => /* @__PURE__ */ e.jsx(W.Th, { children: s.header }, s.header))
2119
+ /* @__PURE__ */ e(Me, { cols: { base: 2, sm: 4 }, spacing: "xs", children: [
2120
+ ["concedidas", n.granted, "neutral"],
2121
+ ["efetivas", n.effective, "ok"],
2122
+ ["inertes", n.inert, "warning"],
2123
+ ["negadas", n.denied, "critical"]
2124
+ ].map(([t, d, g]) => /* @__PURE__ */ e(Y, { withBorder: !0, radius: "md", p: "sm", children: /* @__PURE__ */ o(W, { gap: 2, children: [
2125
+ /* @__PURE__ */ e(w, { size: "1.3rem", fw: 620, c: Ve(g), children: d }),
2126
+ /* @__PURE__ */ e(w, { size: "xs", c: "dimmed", children: t })
2127
+ ] }) }, t)) }),
2128
+ a?.afterEffectiveTally?.(n),
2129
+ /* @__PURE__ */ o(Fe, { title: "Capacidades", hint: `${q.length} de ${n.capabilities.length}`, children: [
2130
+ /* @__PURE__ */ e(ta.Group, { multiple: !1, value: u, onChange: (t) => b(t), children: /* @__PURE__ */ e(N, { gap: 6, children: zr.map((t) => /* @__PURE__ */ e(ta, { value: t.value, size: "xs", variant: "outline", children: t.label }, t.value)) }) }),
2131
+ /* @__PURE__ */ e(j.ScrollContainer, { minWidth: 640, children: /* @__PURE__ */ o(j, { striped: !0, highlightOnHover: !0, withTableBorder: !0, children: [
2132
+ /* @__PURE__ */ e(j.Thead, { children: /* @__PURE__ */ o(j.Tr, { children: [
2133
+ /* @__PURE__ */ e(j.Th, { children: "Capacidade" }),
2134
+ /* @__PURE__ */ e(j.Th, { children: "Origem" }),
2135
+ /* @__PURE__ */ e(j.Th, { children: "Situação" }),
2136
+ V.map((t) => /* @__PURE__ */ e(j.Th, { children: t.header }, t.header))
2173
2137
  ] }) }),
2174
- /* @__PURE__ */ e.jsxs(W.Tbody, { children: [
2175
- B.map((s, d) => /* @__PURE__ */ e.jsxs(W.Tr, { children: [
2176
- /* @__PURE__ */ e.jsx(W.Td, { children: /* @__PURE__ */ e.jsxs(v, { size: "sm", ff: "monospace", children: [
2177
- s.resource,
2138
+ /* @__PURE__ */ o(j.Tbody, { children: [
2139
+ q.map((t, d) => /* @__PURE__ */ o(j.Tr, { children: [
2140
+ /* @__PURE__ */ e(j.Td, { children: /* @__PURE__ */ o(w, { size: "sm", ff: "monospace", children: [
2141
+ t.resource,
2178
2142
  ":",
2179
- s.action
2143
+ t.action
2180
2144
  ] }) }),
2181
- /* @__PURE__ */ e.jsx(W.Td, { children: /* @__PURE__ */ e.jsxs(v, { size: "sm", children: [
2182
- /* @__PURE__ */ e.jsxs(v, { span: !0, c: "dimmed", children: [
2183
- Dr[s.grantedByType] ?? s.grantedByType,
2145
+ /* @__PURE__ */ e(j.Td, { children: /* @__PURE__ */ o(w, { size: "sm", children: [
2146
+ /* @__PURE__ */ o(w, { span: !0, c: "dimmed", children: [
2147
+ Fr[t.grantedByType] ?? t.grantedByType,
2184
2148
  " "
2185
2149
  ] }),
2186
- s.grantedByName
2150
+ t.grantedByName
2187
2151
  ] }) }),
2188
- /* @__PURE__ */ e.jsx(W.Td, { children: /* @__PURE__ */ e.jsx(se, { color: ha[s.situation].color, variant: "light", children: ha[s.situation].label }) }),
2189
- L.map((x) => /* @__PURE__ */ e.jsx(W.Td, { children: x.render(s, t) }, x.header))
2190
- ] }, `${s.resource}:${s.action}:${d}`)),
2191
- B.length === 0 ? /* @__PURE__ */ e.jsx(W.Tr, { children: /* @__PURE__ */ e.jsx(W.Td, { colSpan: 3 + L.length, children: /* @__PURE__ */ e.jsx(v, { size: "sm", c: "dimmed", ta: "center", py: "md", children: "Nenhuma capacidade neste filtro." }) }) }) : null
2152
+ /* @__PURE__ */ e(j.Td, { children: /* @__PURE__ */ e(te, { color: da[t.situation].color, variant: "light", children: da[t.situation].label }) }),
2153
+ V.map((g) => /* @__PURE__ */ e(j.Td, { children: g.render(t, n) }, g.header))
2154
+ ] }, `${t.resource}:${t.action}:${d}`)),
2155
+ q.length === 0 ? /* @__PURE__ */ e(j.Tr, { children: /* @__PURE__ */ e(j.Td, { colSpan: 3 + V.length, children: /* @__PURE__ */ e(w, { size: "sm", c: "dimmed", ta: "center", py: "md", children: "Nenhuma capacidade neste filtro." }) }) }) : null
2192
2156
  ] })
2193
2157
  ] }) })
2194
2158
  ] })
2195
2159
  ] }) : null
2196
2160
  ] });
2197
- }, Nr = [
2161
+ }, Er = [
2198
2162
  { gate: "IDENTITY", titulo: "Identidade", papel: "só nega", pergunta: "O principal é resolvível e a conta está ativa?" },
2199
2163
  { gate: "SCOPE", titulo: "Escopo", papel: "só nega", pergunta: "A concessão vale para o tenant, empresa e projeto pedidos?" },
2200
2164
  { gate: "RESTRICTION", titulo: "Restrições", papel: "só nega", pergunta: "Perfil, papel e persona exigidos pela anotação." },
2201
2165
  { gate: "LEVEL", titulo: "Nível", papel: "só nega", pergunta: "O nível da pessoa alcança o piso da capacidade?" },
2202
2166
  { gate: "GRANT", titulo: "Concessão", papel: "concede", pergunta: "Existe permissão, sem negação explícita?" }
2203
- ], Vr = ({ slots: a, onError: r }) => {
2204
- const n = X(
2167
+ ], $r = ({ slots: a, onError: r }) => {
2168
+ const l = X(
2205
2169
  Q.SecurityDiagnostics
2206
- ), [o, l] = k(""), [t, b] = k(""), [m, C] = k(""), [c, y] = k({}), [u, f] = k(void 0), [F, j] = k(!1), [B, L] = k(void 0), s = ce(async () => {
2207
- if (!(!o.trim() || !t.trim() || !m.trim())) {
2208
- j(!0), L(void 0);
2170
+ ), [i, h] = P(""), [n, A] = P(""), [v, x] = P(""), [c, C] = P({}), [u, b] = P(void 0), [D, y] = P(!1), [q, V] = P(void 0), t = de(async () => {
2171
+ if (!(!i.trim() || !n.trim() || !v.trim())) {
2172
+ y(!0), V(void 0);
2209
2173
  try {
2210
- const x = o.trim(), I = await n.simulate({
2211
- ...x.includes("@") ? { email: x } : { userId: x },
2212
- resource: t.trim(),
2213
- action: m.trim(),
2174
+ const g = i.trim(), F = await l.simulate({
2175
+ ...g.includes("@") ? { email: g } : { userId: g },
2176
+ resource: n.trim(),
2177
+ action: v.trim(),
2214
2178
  companyId: c.companyId,
2215
2179
  projectId: c.projectId
2216
2180
  });
2217
- f(I);
2218
- } catch (x) {
2219
- const I = ue(x);
2220
- L(I), r?.(I), f(void 0);
2181
+ b(F);
2182
+ } catch (g) {
2183
+ const F = he(g);
2184
+ V(F), r?.(F), b(void 0);
2221
2185
  } finally {
2222
- j(!1);
2186
+ y(!1);
2223
2187
  }
2224
2188
  }
2225
- }, [n, o, t, m, c, r]), d = (x, I) => {
2226
- const P = I.chain?.find((g) => g.gate === x);
2227
- return P ? P.passed ? "passou" : "negou" : "nao-avaliado";
2189
+ }, [l, i, n, v, c, r]), d = (g, F) => {
2190
+ const z = F.chain?.find((f) => f.gate === g);
2191
+ return z ? z.passed ? "passou" : "negou" : "nao-avaliado";
2228
2192
  };
2229
- return /* @__PURE__ */ e.jsxs(U, { gap: "lg", children: [
2230
- /* @__PURE__ */ e.jsx(Y, { withBorder: !0, radius: "md", p: "md", children: /* @__PURE__ */ e.jsxs(U, { gap: "sm", children: [
2231
- /* @__PURE__ */ e.jsxs(Ve, { cols: { base: 1, sm: 2, lg: 4 }, spacing: "xs", children: [
2232
- /* @__PURE__ */ e.jsx(
2233
- xe,
2193
+ return /* @__PURE__ */ o(W, { gap: "lg", children: [
2194
+ /* @__PURE__ */ e(Y, { withBorder: !0, radius: "md", p: "md", children: /* @__PURE__ */ o(W, { gap: "sm", children: [
2195
+ /* @__PURE__ */ o(Me, { cols: { base: 1, sm: 2, lg: 4 }, spacing: "xs", children: [
2196
+ /* @__PURE__ */ e(
2197
+ ge,
2234
2198
  {
2235
2199
  label: "Usuário",
2236
2200
  placeholder: "e-mail ou id",
2237
- value: o,
2238
- onChange: (x) => l(x.currentTarget.value)
2201
+ value: i,
2202
+ onChange: (g) => h(g.currentTarget.value)
2239
2203
  }
2240
2204
  ),
2241
- /* @__PURE__ */ e.jsx(
2242
- xe,
2205
+ /* @__PURE__ */ e(
2206
+ ge,
2243
2207
  {
2244
2208
  label: "Recurso",
2245
2209
  placeholder: "tms.ordemservico",
2246
- value: t,
2247
- onChange: (x) => b(x.currentTarget.value)
2210
+ value: n,
2211
+ onChange: (g) => A(g.currentTarget.value)
2248
2212
  }
2249
2213
  ),
2250
- /* @__PURE__ */ e.jsx(
2251
- xe,
2214
+ /* @__PURE__ */ e(
2215
+ ge,
2252
2216
  {
2253
2217
  label: "Ação",
2254
2218
  placeholder: "aprovar_custo",
2255
- value: m,
2256
- onChange: (x) => C(x.currentTarget.value)
2219
+ value: v,
2220
+ onChange: (g) => x(g.currentTarget.value)
2257
2221
  }
2258
2222
  ),
2259
- /* @__PURE__ */ e.jsx(
2260
- xe,
2223
+ /* @__PURE__ */ e(
2224
+ ge,
2261
2225
  {
2262
2226
  label: "Empresa (opcional)",
2263
2227
  placeholder: "companyId",
2264
2228
  value: c.companyId ?? "",
2265
- onChange: (x) => y((I) => ({ ...I, companyId: x.currentTarget.value || void 0 }))
2229
+ onChange: (g) => C((F) => ({ ...F, companyId: g.currentTarget.value || void 0 }))
2266
2230
  }
2267
2231
  )
2268
2232
  ] }),
2269
- a?.afterSimulationFields?.((x) => y((I) => ({ ...I, ...x }))),
2270
- /* @__PURE__ */ e.jsxs(D, { gap: "xs", align: "center", children: [
2271
- /* @__PURE__ */ e.jsx(H, { onClick: () => void s(), loading: F, children: "Simular" }),
2272
- /* @__PURE__ */ e.jsx(v, { size: "xs", c: "dimmed", children: "Somente leitura — não altera permissão nenhuma." })
2233
+ a?.afterSimulationFields?.((g) => C((F) => ({ ...F, ...g }))),
2234
+ /* @__PURE__ */ o(N, { gap: "xs", align: "center", children: [
2235
+ /* @__PURE__ */ e(Z, { onClick: () => void t(), loading: D, children: "Simular" }),
2236
+ /* @__PURE__ */ e(w, { size: "xs", c: "dimmed", children: "Somente leitura — não altera permissão nenhuma." })
2273
2237
  ] })
2274
2238
  ] }) }),
2275
- B ? /* @__PURE__ */ e.jsx(Re, { color: "red", title: "Não foi possível simular", children: B }) : null,
2276
- F && !u ? /* @__PURE__ */ e.jsx(Qe, { size: "sm" }) : null,
2277
- u ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2278
- /* @__PURE__ */ e.jsx(Pe, { title: "Cadeia de decisão", hint: "os quatro primeiros só negam; só o quinto concede", children: /* @__PURE__ */ e.jsx(Y, { withBorder: !0, radius: "md", p: "md", children: /* @__PURE__ */ e.jsx(U, { gap: "sm", children: Nr.map((x, I) => {
2279
- const P = d(x.gate, u), g = u.chain?.find((ee) => ee.gate === x.gate)?.detail;
2280
- return /* @__PURE__ */ e.jsxs(D, { align: "flex-start", wrap: "nowrap", gap: "sm", children: [
2281
- /* @__PURE__ */ e.jsx(v, { size: "xs", ff: "monospace", c: "dimmed", w: 16, children: I + 1 }),
2282
- /* @__PURE__ */ e.jsxs(U, { gap: 2, style: { flex: 1, minWidth: 0 }, children: [
2283
- /* @__PURE__ */ e.jsxs(D, { gap: 8, align: "baseline", wrap: "wrap", children: [
2284
- /* @__PURE__ */ e.jsx(
2285
- v,
2239
+ q ? /* @__PURE__ */ e(ke, { color: "red", title: "Não foi possível simular", children: q }) : null,
2240
+ D && !u ? /* @__PURE__ */ e(Ke, { size: "sm" }) : null,
2241
+ u ? /* @__PURE__ */ o(Ne, { children: [
2242
+ /* @__PURE__ */ e(Fe, { title: "Cadeia de decisão", hint: "os quatro primeiros só negam; só o quinto concede", children: /* @__PURE__ */ e(Y, { withBorder: !0, radius: "md", p: "md", children: /* @__PURE__ */ e(W, { gap: "sm", children: Er.map((g, F) => {
2243
+ const z = d(g.gate, u), f = u.chain?.find((oe) => oe.gate === g.gate)?.detail;
2244
+ return /* @__PURE__ */ o(N, { align: "flex-start", wrap: "nowrap", gap: "sm", children: [
2245
+ /* @__PURE__ */ e(w, { size: "xs", ff: "monospace", c: "dimmed", w: 16, children: F + 1 }),
2246
+ /* @__PURE__ */ o(W, { gap: 2, style: { flex: 1, minWidth: 0 }, children: [
2247
+ /* @__PURE__ */ o(N, { gap: 8, align: "baseline", wrap: "wrap", children: [
2248
+ /* @__PURE__ */ e(
2249
+ w,
2286
2250
  {
2287
2251
  size: "sm",
2288
2252
  fw: 600,
2289
- c: P === "negou" ? "red" : void 0,
2290
- opacity: P === "nao-avaliado" ? 0.5 : 1,
2291
- children: x.titulo
2253
+ c: z === "negou" ? "red" : void 0,
2254
+ opacity: z === "nao-avaliado" ? 0.5 : 1,
2255
+ children: g.titulo
2292
2256
  }
2293
2257
  ),
2294
- /* @__PURE__ */ e.jsxs(v, { size: "xs", c: "dimmed", children: [
2258
+ /* @__PURE__ */ o(w, { size: "xs", c: "dimmed", children: [
2295
2259
  "· ",
2296
- x.papel
2260
+ g.papel
2297
2261
  ] })
2298
2262
  ] }),
2299
- /* @__PURE__ */ e.jsx(v, { size: "xs", c: "dimmed", opacity: P === "nao-avaliado" ? 0.5 : 1, children: x.pergunta }),
2300
- g ? /* @__PURE__ */ e.jsx(v, { size: "xs", c: "dimmed", children: g }) : null
2263
+ /* @__PURE__ */ e(w, { size: "xs", c: "dimmed", opacity: z === "nao-avaliado" ? 0.5 : 1, children: g.pergunta }),
2264
+ f ? /* @__PURE__ */ e(w, { size: "xs", c: "dimmed", children: f }) : null
2301
2265
  ] }),
2302
- /* @__PURE__ */ e.jsx(
2303
- se,
2266
+ /* @__PURE__ */ e(
2267
+ te,
2304
2268
  {
2305
2269
  variant: "light",
2306
- color: P === "negou" ? "red" : P === "passou" ? "green" : "gray",
2307
- children: P === "nao-avaliado" ? "não avaliado" : P
2270
+ color: z === "negou" ? "red" : z === "passou" ? "green" : "gray",
2271
+ children: z === "nao-avaliado" ? "não avaliado" : z
2308
2272
  }
2309
2273
  )
2310
- ] }, x.gate);
2274
+ ] }, g.gate);
2311
2275
  }) }) }) }),
2312
- /* @__PURE__ */ e.jsx(Re, { color: u.allowed ? "green" : "red", title: u.allowed ? "Pode" : "Não pode", children: /* @__PURE__ */ e.jsxs(U, { gap: 6, children: [
2313
- /* @__PURE__ */ e.jsx(v, { size: "sm", children: u.message }),
2314
- /* @__PURE__ */ e.jsxs(v, { size: "xs", ff: "monospace", c: "dimmed", children: [
2276
+ /* @__PURE__ */ e(ke, { color: u.allowed ? "green" : "red", title: u.allowed ? "Pode" : "Não pode", children: /* @__PURE__ */ o(W, { gap: 6, children: [
2277
+ /* @__PURE__ */ e(w, { size: "sm", children: u.message }),
2278
+ /* @__PURE__ */ o(w, { size: "xs", ff: "monospace", c: "dimmed", children: [
2315
2279
  "reasonCode: ",
2316
2280
  u.reasonCode,
2317
2281
  u.deniedAt ? ` · deniedAt: ${u.deniedAt}` : "",
@@ -2321,46 +2285,45 @@ const Le = (a) => {
2321
2285
  a?.afterDecision?.(u)
2322
2286
  ] }) : null
2323
2287
  ] });
2324
- }, Gr = ["overview", "effective", "simulate"];
2288
+ }, Nr = ["overview", "effective", "simulate"];
2325
2289
  function Kr({
2326
2290
  height: a = "100%",
2327
2291
  width: r = "100%",
2328
- defaultTab: n = "overview",
2329
- tabs: o = Gr,
2330
- slots: l,
2331
- onError: t
2292
+ defaultTab: l = "overview",
2293
+ tabs: i = Nr,
2294
+ slots: h,
2295
+ onError: n
2332
2296
  }) {
2333
- const [b, m] = k(n), C = (c) => o.includes(c);
2334
- return /* @__PURE__ */ e.jsx(Y, { style: { height: a, width: r }, p: "md", withBorder: !1, children: /* @__PURE__ */ e.jsxs(Z, { value: b, onChange: m, variant: "pills", keepMounted: !1, children: [
2335
- /* @__PURE__ */ e.jsxs(Z.List, { mb: "md", children: [
2336
- C("overview") ? /* @__PURE__ */ e.jsx(Z.Tab, { value: "overview", leftSection: /* @__PURE__ */ e.jsx(Ya, { size: "1rem" }), children: "Panorama" }) : null,
2337
- C("effective") ? /* @__PURE__ */ e.jsx(Z.Tab, { value: "effective", leftSection: /* @__PURE__ */ e.jsx(Ka, { size: "1rem" }), children: "Efetivo do usuário" }) : null,
2338
- C("simulate") ? /* @__PURE__ */ e.jsx(Z.Tab, { value: "simulate", leftSection: /* @__PURE__ */ e.jsx(_a, { size: "1rem" }), children: "Simular" }) : null
2297
+ const [A, v] = P(l), x = (c) => i.includes(c);
2298
+ return /* @__PURE__ */ e(Y, { style: { height: a, width: r }, p: "md", withBorder: !1, children: /* @__PURE__ */ o(K, { value: A, onChange: v, variant: "pills", keepMounted: !1, children: [
2299
+ /* @__PURE__ */ o(K.List, { mb: "md", children: [
2300
+ x("overview") ? /* @__PURE__ */ e(K.Tab, { value: "overview", leftSection: /* @__PURE__ */ e(Ka, { size: "1rem" }), children: "Panorama" }) : null,
2301
+ x("effective") ? /* @__PURE__ */ e(K.Tab, { value: "effective", leftSection: /* @__PURE__ */ e(Qa, { size: "1rem" }), children: "Efetivo do usuário" }) : null,
2302
+ x("simulate") ? /* @__PURE__ */ e(K.Tab, { value: "simulate", leftSection: /* @__PURE__ */ e(Xa, { size: "1rem" }), children: "Simular" }) : null
2339
2303
  ] }),
2340
- C("overview") ? /* @__PURE__ */ e.jsx(Z.Panel, { value: "overview", children: /* @__PURE__ */ e.jsx(Er, { slots: l, onError: t }) }) : null,
2341
- C("effective") ? /* @__PURE__ */ e.jsx(Z.Panel, { value: "effective", children: /* @__PURE__ */ e.jsx(Lr, { slots: l, onError: t }) }) : null,
2342
- C("simulate") ? /* @__PURE__ */ e.jsx(Z.Panel, { value: "simulate", children: /* @__PURE__ */ e.jsx(Vr, { slots: l, onError: t }) }) : null
2304
+ x("overview") ? /* @__PURE__ */ e(K.Panel, { value: "overview", children: /* @__PURE__ */ e(Pr, { slots: h, onError: n }) }) : null,
2305
+ x("effective") ? /* @__PURE__ */ e(K.Panel, { value: "effective", children: /* @__PURE__ */ e(Dr, { slots: h, onError: n }) }) : null,
2306
+ x("simulate") ? /* @__PURE__ */ e(K.Panel, { value: "simulate", children: /* @__PURE__ */ e($r, { slots: h, onError: n }) }) : null
2343
2307
  ] }) });
2344
2308
  }
2345
2309
  export {
2346
- br as ApiTokenModal,
2347
- Yr as ArchbaseApiTokenView,
2348
- hr as ArchbaseDualListSelector,
2310
+ mr as ApiTokenModal,
2311
+ Jr as ArchbaseApiTokenView,
2312
+ lr as ArchbaseDualListSelector,
2349
2313
  Kr as ArchbaseSecurityDiagnosticsView,
2350
- Xr as ArchbaseSecurityView,
2351
- Ir as AttributeList,
2352
- Lr as EffectiveAccessPanel,
2353
- kr as FlagStrip,
2354
- gr as GroupModal,
2355
- Tr as MetricCard,
2356
- Rr as MetricCards,
2357
- Er as OverviewPanel,
2358
- We as PermissionsSelectorModal,
2359
- ur as ProfileModal,
2360
- pr as RenderProfileUserItem,
2361
- Pe as Section,
2362
- Vr as SimulationPanel,
2363
- mr as UserModal,
2364
- Le as severityColor
2314
+ Zr as ArchbaseSecurityView,
2315
+ Tr as AttributeList,
2316
+ Dr as EffectiveAccessPanel,
2317
+ xr as FlagStrip,
2318
+ hr as GroupModal,
2319
+ Sr as MetricCard,
2320
+ Ar as MetricCards,
2321
+ Pr as OverviewPanel,
2322
+ qe as PermissionsSelectorModal,
2323
+ sr as ProfileModal,
2324
+ cr as RenderProfileUserItem,
2325
+ Fe as Section,
2326
+ $r as SimulationPanel,
2327
+ ur as UserModal,
2328
+ Ve as severityColor
2365
2329
  };
2366
- //# sourceMappingURL=index.js.map