@archbase/security-ui 3.0.11 → 3.0.13

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