@archbase/security-ui 4.2.2 → 4.2.4
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/archbase-security-ui-4.2.4.tgz +0 -0
- package/dist/index.js +1507 -1287
- package/dist/securityDiagnostics/SimulationPanel.d.ts +1 -0
- package/dist/securityDiagnostics/explorer/FiltroDeLista.d.ts +30 -0
- package/dist/securityDiagnostics/explorer/SeletorEmArvore.d.ts +27 -0
- package/package.json +7 -7
- package/dist/archbase-security-ui-4.2.2.tgz +0 -0
package/dist/index.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { jsx as e, jsxs as r, Fragment as
|
|
2
|
-
import { Modal as
|
|
3
|
-
import { getI18nextInstance as g, resolveArchbasePasswordPolicy as
|
|
4
|
-
import { ArchbaseEdit as ne, ArchbaseNotifications as
|
|
5
|
-
import { useArchbaseV1V2Compatibility as Ne, useArchbaseDataSourceListener as
|
|
6
|
-
import { useState as
|
|
7
|
-
import { IconArrowRight as
|
|
8
|
-
import { UserGroupDto as
|
|
9
|
-
import { DateTimePicker as
|
|
10
|
-
import { useFocusTrap as
|
|
11
|
-
import { ArchbaseSpaceFixed as
|
|
12
|
-
const
|
|
13
|
-
const t = { ...a.options ?? {} },
|
|
14
|
-
a.onCustomSave ? a.onCustomSave(a.dataSource.getCurrentRecord(), (
|
|
15
|
-
|
|
1
|
+
import { jsx as e, jsxs as r, Fragment as xe } from "react/jsx-runtime";
|
|
2
|
+
import { Modal as $e, ScrollArea as ce, Stack as V, Grid as H, Group as O, Button as X, Paper as re, Box as _, Text as h, List as Me, Checkbox as la, Tooltip as ke, ActionIcon as me, Flex as Fe, Space as Ra, Input as Te, useTree as ca, useMantineColorScheme as qe, TextInput as fe, Tree as da, Badge as Q, Tabs as Ce, RingProgress as Ka, SimpleGrid as He, Table as C, Drawer as Ja, Loader as se, Alert as be, Pagination as Xa, CloseButton as Ya, Chip as ua, Popover as Je, UnstyledButton as ze } from "@mantine/core";
|
|
3
|
+
import { getI18nextInstance as g, resolveArchbasePasswordPolicy as _a, ARCHBASE_IOC_API_TYPE as K, emit as Ge, builder as De, validateArchbasePassword as er, convertDateToISOString as ar, processErrorMessage as ge, getKeyByEnumValue as Se, useArchbaseTheme as oa, useArchbaseValidator as rr, useArchbaseTranslation as tr, useValidationErrors as ir, processDetailErrorMessage as Ve } from "@archbase/core";
|
|
4
|
+
import { ArchbaseEdit as ne, ArchbaseNotifications as oe, ArchbasePasswordEdit as or, ArchbaseSelect as nr, ArchbaseCheckbox as Ae, ArchbaseAvatarEdit as sr, ArchbaseAsyncSelect as lr, Columns as Ie, ArchbaseDataGridColumn as $, ArchbaseDataGrid as za, ArchbaseDialog as pe } from "@archbase/components";
|
|
5
|
+
import { useArchbaseV1V2Compatibility as Ne, useArchbaseDataSourceListener as ha, useArchbaseRemoteServiceApi as J, useArchbaseRemoteDataSource as ta, ArchbaseDataSource as cr, useArchbaseStore as ka, useArchbaseRemoteDataSourceV2 as Ee, useArchbaseDataSource as dr } from "@archbase/data";
|
|
6
|
+
import { useState as x, useCallback as ae, useEffect as ee, forwardRef as ur, useMemo as ie, useRef as Re } from "react";
|
|
7
|
+
import { IconArrowRight as Ia, IconArrowLeft as Ea, IconChevronDown as pa, IconBorderCornerSquare as ma, IconEye as hr, IconEdit as Pa, IconTrashX as na, IconShieldCheckered as pr, IconPlus as Fa } from "@tabler/icons-react";
|
|
8
|
+
import { UserGroupDto as ga, SecurityType as Y, UserDto as mr, GroupDto as gr, ProfileDto as fr, ApiTokenDto as br } from "@archbase/security";
|
|
9
|
+
import { DateTimePicker as vr } from "@mantine/dates";
|
|
10
|
+
import { useFocusTrap as yr, useDebouncedValue as ia } from "@mantine/hooks";
|
|
11
|
+
import { ArchbaseSpaceFixed as wr, ArchbaseSpaceFill as Cr, ArchbaseSpaceBottom as Sr } from "@archbase/layout";
|
|
12
|
+
const xr = (a) => {
|
|
13
|
+
const t = { ...a.options ?? {} }, n = () => {
|
|
14
|
+
a.onCustomSave ? a.onCustomSave(a.dataSource.getCurrentRecord(), (d) => {
|
|
15
|
+
d && a.onAfterSave && a.onAfterSave(a.dataSource.getCurrentRecord()), a.onClickOk(a.dataSource.getCurrentRecord(), d);
|
|
16
16
|
}) : a.onClickOk(a.dataSource.getCurrentRecord(), !0);
|
|
17
|
-
},
|
|
17
|
+
}, s = () => {
|
|
18
18
|
a.onClickCancel(a.dataSource.getCurrentRecord());
|
|
19
19
|
};
|
|
20
20
|
return /* @__PURE__ */ e(
|
|
21
|
-
|
|
21
|
+
$e,
|
|
22
22
|
{
|
|
23
23
|
opened: a.opened,
|
|
24
|
-
onClose:
|
|
24
|
+
onClose: s,
|
|
25
25
|
title: g().t("archbase:Perfil"),
|
|
26
26
|
size: "60%",
|
|
27
27
|
styles: { content: { maxWidth: 1e3 } },
|
|
28
|
-
children: /* @__PURE__ */ e(
|
|
28
|
+
children: /* @__PURE__ */ e(ce, { style: { height: "460px" }, children: /* @__PURE__ */ r(V, { w: "98%", children: [
|
|
29
29
|
t?.customContentBefore && t.customContentBefore(a.dataSource.getCurrentRecord()),
|
|
30
|
-
/* @__PURE__ */ r(
|
|
31
|
-
/* @__PURE__ */ e(
|
|
30
|
+
/* @__PURE__ */ r(H, { children: [
|
|
31
|
+
/* @__PURE__ */ e(H.Col, { span: { base: 12, md: 12, lg: 12 }, children: /* @__PURE__ */ e(
|
|
32
32
|
ne,
|
|
33
33
|
{
|
|
34
34
|
label: `${g().t("archbase:Nome do perfil")}`,
|
|
@@ -37,7 +37,7 @@ const fr = (a) => {
|
|
|
37
37
|
dataField: "name"
|
|
38
38
|
}
|
|
39
39
|
) }),
|
|
40
|
-
/* @__PURE__ */ e(
|
|
40
|
+
/* @__PURE__ */ e(H.Col, { span: { base: 12, md: 12, lg: 12 }, children: /* @__PURE__ */ e(
|
|
41
41
|
ne,
|
|
42
42
|
{
|
|
43
43
|
label: `${g().t("archbase:Descrição do perfil")}`,
|
|
@@ -48,26 +48,26 @@ const fr = (a) => {
|
|
|
48
48
|
) })
|
|
49
49
|
] }),
|
|
50
50
|
t?.customContentAfter && t.customContentAfter(a.dataSource.getCurrentRecord()),
|
|
51
|
-
/* @__PURE__ */ r(
|
|
52
|
-
/* @__PURE__ */ e(
|
|
53
|
-
/* @__PURE__ */ e(
|
|
51
|
+
/* @__PURE__ */ r(O, { justify: "flex-end", mt: "md", children: [
|
|
52
|
+
/* @__PURE__ */ e(X, { variant: "default", onClick: s, children: g().t("archbase:Cancelar") }),
|
|
53
|
+
/* @__PURE__ */ e(X, { onClick: n, children: g().t("archbase:Salvar") })
|
|
54
54
|
] })
|
|
55
55
|
] }) })
|
|
56
56
|
}
|
|
57
57
|
);
|
|
58
58
|
};
|
|
59
|
-
function
|
|
59
|
+
function Tr({
|
|
60
60
|
availableItemsDS: a,
|
|
61
61
|
assignedItemsDS: t,
|
|
62
|
-
idFieldAvailable:
|
|
63
|
-
labelFieldAvailable:
|
|
64
|
-
idFieldAssigned:
|
|
65
|
-
labelFieldAssigned:
|
|
62
|
+
idFieldAvailable: n,
|
|
63
|
+
labelFieldAvailable: s,
|
|
64
|
+
idFieldAssigned: d,
|
|
65
|
+
labelFieldAssigned: u,
|
|
66
66
|
handleCreateAssociationObject: c,
|
|
67
|
-
width:
|
|
68
|
-
height:
|
|
69
|
-
titleAvailable:
|
|
70
|
-
titleAssigned:
|
|
67
|
+
width: T = "400px",
|
|
68
|
+
height: R = "200px",
|
|
69
|
+
titleAvailable: m = "Disponíveis",
|
|
70
|
+
titleAssigned: S = "Selecionados"
|
|
71
71
|
}) {
|
|
72
72
|
Ne(
|
|
73
73
|
"ArchbaseDualListSelector-Available",
|
|
@@ -75,47 +75,47 @@ function br({
|
|
|
75
75
|
void 0,
|
|
76
76
|
[]
|
|
77
77
|
);
|
|
78
|
-
const
|
|
78
|
+
const A = Ne(
|
|
79
79
|
"ArchbaseDualListSelector-Assigned",
|
|
80
80
|
t,
|
|
81
81
|
void 0,
|
|
82
82
|
[]
|
|
83
|
-
), [
|
|
84
|
-
a &&
|
|
83
|
+
), [w, E] = x([]), [v, y] = x([]), [o, l] = x([]), [p, b] = x([]), L = ae(() => {
|
|
84
|
+
a && E(a.browseRecords()), t && y(t.browseRecords());
|
|
85
85
|
}, [a, t]);
|
|
86
|
-
|
|
86
|
+
ha({
|
|
87
87
|
dataSource: a,
|
|
88
|
-
listener: () =>
|
|
89
|
-
}),
|
|
88
|
+
listener: () => L()
|
|
89
|
+
}), ha({
|
|
90
90
|
dataSource: t,
|
|
91
|
-
listener: () =>
|
|
91
|
+
listener: () => L()
|
|
92
92
|
}), ee(() => {
|
|
93
|
-
|
|
94
|
-
}, [
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
},
|
|
98
|
-
|
|
99
|
-
const
|
|
100
|
-
if (
|
|
101
|
-
const
|
|
102
|
-
|
|
93
|
+
L();
|
|
94
|
+
}, [L]);
|
|
95
|
+
const F = (f, I) => typeof I == "function" ? I(f) : f[I], i = (f, I) => typeof I == "function" ? I(f) : f[I], D = (f, I) => {
|
|
96
|
+
f((N) => N.includes(I) ? N.filter((ye) => ye !== I) : [...N, I]);
|
|
97
|
+
}, P = () => {
|
|
98
|
+
o.forEach((f) => {
|
|
99
|
+
const I = w.find((N) => F(N, n) === f);
|
|
100
|
+
if (I) {
|
|
101
|
+
const N = c(I);
|
|
102
|
+
A.isDataSourceV2 ? (t.insert(N), t.save()) : (t.insert(N), t.save(), A.v1State.forceUpdate());
|
|
103
103
|
}
|
|
104
104
|
}), l([]);
|
|
105
|
-
},
|
|
106
|
-
|
|
107
|
-
const
|
|
108
|
-
if (
|
|
109
|
-
const
|
|
110
|
-
|
|
105
|
+
}, G = () => {
|
|
106
|
+
p.forEach((f) => {
|
|
107
|
+
const I = v.find((N) => F(N, d) === f);
|
|
108
|
+
if (I) {
|
|
109
|
+
const N = typeof d == "function" ? { customId: d(I) } : { [d]: f };
|
|
110
|
+
A.isDataSourceV2 ? t.remove(() => t.locate(N)) : (t.remove(() => t.locate(N)), A.v1State.forceUpdate());
|
|
111
111
|
}
|
|
112
|
-
}),
|
|
112
|
+
}), b([]);
|
|
113
113
|
};
|
|
114
|
-
return /* @__PURE__ */ r(
|
|
115
|
-
/* @__PURE__ */ r(
|
|
116
|
-
/* @__PURE__ */ e(
|
|
114
|
+
return /* @__PURE__ */ r(re, { withBorder: !0, style: { display: "flex", width: T, height: R }, children: [
|
|
115
|
+
/* @__PURE__ */ r(_, { style: { minWidth: "44%", minHeight: R }, children: [
|
|
116
|
+
/* @__PURE__ */ e(h, { children: m }),
|
|
117
117
|
/* @__PURE__ */ e(
|
|
118
|
-
|
|
118
|
+
Me,
|
|
119
119
|
{
|
|
120
120
|
spacing: "xs",
|
|
121
121
|
size: "sm",
|
|
@@ -127,28 +127,28 @@ function br({
|
|
|
127
127
|
overflowX: "hidden",
|
|
128
128
|
height: "calc(100% - 32px)"
|
|
129
129
|
},
|
|
130
|
-
children:
|
|
131
|
-
|
|
130
|
+
children: w.map((f) => /* @__PURE__ */ e(Me.Item, { children: /* @__PURE__ */ e(
|
|
131
|
+
la,
|
|
132
132
|
{
|
|
133
|
-
label:
|
|
134
|
-
checked:
|
|
135
|
-
onChange: () =>
|
|
136
|
-
disabled:
|
|
137
|
-
(
|
|
133
|
+
label: i(f, s),
|
|
134
|
+
checked: o.includes(F(f, n)),
|
|
135
|
+
onChange: () => D(l, F(f, n)),
|
|
136
|
+
disabled: v.some(
|
|
137
|
+
(I) => F(I, d) === F(f, n)
|
|
138
138
|
)
|
|
139
139
|
}
|
|
140
|
-
) },
|
|
140
|
+
) }, F(f, n)))
|
|
141
141
|
}
|
|
142
142
|
)
|
|
143
143
|
] }),
|
|
144
|
-
/* @__PURE__ */ r(
|
|
145
|
-
/* @__PURE__ */ e(
|
|
146
|
-
/* @__PURE__ */ e(
|
|
144
|
+
/* @__PURE__ */ r(V, { gap: 5, style: { minWidth: "10%" }, justify: "center", align: "center", children: [
|
|
145
|
+
/* @__PURE__ */ e(ke, { label: "Adicionar", children: /* @__PURE__ */ e(me, { onClick: P, disabled: !o.length, children: /* @__PURE__ */ e(Ia, {}) }) }),
|
|
146
|
+
/* @__PURE__ */ e(ke, { label: "Remover", children: /* @__PURE__ */ e(me, { onClick: G, disabled: !p.length, children: /* @__PURE__ */ e(Ea, {}) }) })
|
|
147
147
|
] }),
|
|
148
|
-
/* @__PURE__ */ r(
|
|
149
|
-
/* @__PURE__ */ e(
|
|
148
|
+
/* @__PURE__ */ r(_, { style: { minWidth: "44%", minHeight: R }, children: [
|
|
149
|
+
/* @__PURE__ */ e(h, { children: S }),
|
|
150
150
|
/* @__PURE__ */ e(
|
|
151
|
-
|
|
151
|
+
Me,
|
|
152
152
|
{
|
|
153
153
|
spacing: "xs",
|
|
154
154
|
size: "sm",
|
|
@@ -160,25 +160,25 @@ function br({
|
|
|
160
160
|
overflowX: "hidden",
|
|
161
161
|
height: "calc(100% - 32px)"
|
|
162
162
|
},
|
|
163
|
-
children:
|
|
164
|
-
|
|
163
|
+
children: v.map((f) => /* @__PURE__ */ e(Me.Item, { children: /* @__PURE__ */ e(
|
|
164
|
+
la,
|
|
165
165
|
{
|
|
166
|
-
label:
|
|
167
|
-
checked:
|
|
168
|
-
onChange: () =>
|
|
166
|
+
label: i(f, u),
|
|
167
|
+
checked: p.includes(F(f, d)),
|
|
168
|
+
onChange: () => D(b, F(f, d))
|
|
169
169
|
}
|
|
170
|
-
) },
|
|
170
|
+
) }, F(f, d)))
|
|
171
171
|
}
|
|
172
172
|
)
|
|
173
173
|
] })
|
|
174
174
|
] });
|
|
175
175
|
}
|
|
176
|
-
const
|
|
177
|
-
({ image: a, label: t, description:
|
|
178
|
-
/* @__PURE__ */ e(
|
|
179
|
-
/* @__PURE__ */ e(
|
|
176
|
+
const Ar = ur(
|
|
177
|
+
({ image: a, label: t, description: n, origin: s, ...d }, u) => /* @__PURE__ */ e("div", { ref: u, ...d, children: /* @__PURE__ */ r(Fe, { children: [
|
|
178
|
+
/* @__PURE__ */ e(h, { size: "sm", fw: 600, children: s ? s.name : "" }),
|
|
179
|
+
/* @__PURE__ */ e(Ra, { w: "lg" })
|
|
180
180
|
] }) })
|
|
181
|
-
),
|
|
181
|
+
), Rr = {
|
|
182
182
|
// Campos de identificação
|
|
183
183
|
showNickname: !0,
|
|
184
184
|
// Campos de perfil e grupos
|
|
@@ -202,84 +202,84 @@ const vr = ir(
|
|
|
202
202
|
avatarImageQuality: 1,
|
|
203
203
|
avatarMaxOutputSizePx: 512,
|
|
204
204
|
allowEditEmail: !0
|
|
205
|
-
},
|
|
206
|
-
const [t,
|
|
207
|
-
const
|
|
208
|
-
return l === "email" &&
|
|
209
|
-
}).filter((l) => typeof l == "string" && l.trim().length >= 3) : [],
|
|
210
|
-
...
|
|
211
|
-
blocklist: [...
|
|
212
|
-
} : void 0,
|
|
205
|
+
}, zr = (a) => {
|
|
206
|
+
const [t, n] = x(""), s = { ...Rr, ...a.options ?? {} }, d = a.dataSource.getFieldValue("passwordChangedAt"), u = d ? new Date(d) : void 0, c = u && !Number.isNaN(u.getTime()) ? u.toLocaleString() : void 0, T = _a(s.passwordPolicy), R = s.forbidPersonalDataInPassword ? ["name", "nickname", "email"].map((l) => {
|
|
207
|
+
const p = a.dataSource.getFieldValue(l);
|
|
208
|
+
return l === "email" && p ? p.split("@")[0] : p;
|
|
209
|
+
}).filter((l) => typeof l == "string" && l.trim().length >= 3) : [], m = T ? {
|
|
210
|
+
...T,
|
|
211
|
+
blocklist: [...T.blocklist ?? [], ...R]
|
|
212
|
+
} : void 0, S = J(K.Group), { dataSource: A } = ta({
|
|
213
213
|
name: "dsGroups",
|
|
214
|
-
service:
|
|
214
|
+
service: S,
|
|
215
215
|
pageSize: 9999,
|
|
216
216
|
loadOnStart: !0,
|
|
217
217
|
sort: ["name:asc"],
|
|
218
|
-
onError: (l,
|
|
219
|
-
|
|
218
|
+
onError: (l, p) => {
|
|
219
|
+
oe.showError(g().t("archbase:WARNING"), l, p);
|
|
220
220
|
}
|
|
221
221
|
});
|
|
222
222
|
console.log("versão 12/05/2026");
|
|
223
|
-
const
|
|
223
|
+
const w = J(K.Profile), { dataSource: E } = ta({
|
|
224
224
|
name: "dsProfiles",
|
|
225
|
-
service:
|
|
225
|
+
service: w,
|
|
226
226
|
pageSize: 9999,
|
|
227
227
|
loadOnStart: !0,
|
|
228
228
|
sort: ["name:asc"],
|
|
229
|
-
onError: (l,
|
|
230
|
-
|
|
229
|
+
onError: (l, p) => {
|
|
230
|
+
oe.showError(g().t("archbase:WARNING"), l, p);
|
|
231
231
|
}
|
|
232
232
|
});
|
|
233
233
|
ee(() => {
|
|
234
|
-
|
|
234
|
+
n("");
|
|
235
235
|
}, [a.dataSource.getFieldValue("password")]);
|
|
236
|
-
const
|
|
236
|
+
const v = async () => {
|
|
237
237
|
if (a.dataSource.isInserting()) {
|
|
238
|
-
if (
|
|
239
|
-
const l =
|
|
240
|
-
|
|
238
|
+
if (s.userDefaultProfile) {
|
|
239
|
+
const l = Ge(De.eq("name", s.userDefaultProfile)), p = await w.findAllWithFilter(l, 0, 1);
|
|
240
|
+
p && p.content.length > 0 && a.dataSource.setFieldValue("profile", p.content[0]);
|
|
241
241
|
}
|
|
242
|
-
if (
|
|
243
|
-
const l =
|
|
244
|
-
|
|
242
|
+
if (s.userDefaultGroups) {
|
|
243
|
+
const l = Ge(De.in("name", s.userDefaultGroups)), p = await S.findAllWithFilter(l, 0, 500);
|
|
244
|
+
p && p.content.length > 0 && a.dataSource.setFieldValue("groups", p.content.map((b) => ga.newInstance(b)));
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
247
|
};
|
|
248
248
|
ee(() => {
|
|
249
|
-
a.opened &&
|
|
249
|
+
a.opened && v();
|
|
250
250
|
}, [a.opened]);
|
|
251
|
-
const
|
|
251
|
+
const y = () => {
|
|
252
252
|
const l = a.dataSource.getCurrentRecord();
|
|
253
253
|
if (!l.password && a.dataSource.isInserting()) {
|
|
254
|
-
|
|
254
|
+
n(g().t("archbase:Informe a senha"));
|
|
255
255
|
return;
|
|
256
256
|
}
|
|
257
|
-
if (
|
|
258
|
-
const
|
|
259
|
-
if (!
|
|
260
|
-
|
|
257
|
+
if (m && l.password) {
|
|
258
|
+
const p = er(l.password, m);
|
|
259
|
+
if (!p.valid) {
|
|
260
|
+
n(p.error);
|
|
261
261
|
return;
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
|
-
a.onCustomSave ? a.onCustomSave(l, (
|
|
265
|
-
|
|
264
|
+
a.onCustomSave ? a.onCustomSave(l, (p) => {
|
|
265
|
+
p && a.onAfterSave && a.onAfterSave(l), a.onClickOk(l, p);
|
|
266
266
|
}) : a.onClickOk(l, !0);
|
|
267
|
-
},
|
|
267
|
+
}, o = () => {
|
|
268
268
|
a.onClickCancel(a.dataSource.getCurrentRecord());
|
|
269
269
|
};
|
|
270
270
|
return /* @__PURE__ */ r(
|
|
271
|
-
|
|
271
|
+
$e,
|
|
272
272
|
{
|
|
273
273
|
opened: a.opened,
|
|
274
|
-
onClose:
|
|
274
|
+
onClose: o,
|
|
275
275
|
title: g().t("archbase:Usuário"),
|
|
276
276
|
size: "80%",
|
|
277
277
|
styles: { content: { maxWidth: 1e3 } },
|
|
278
278
|
children: [
|
|
279
|
-
/* @__PURE__ */ e(
|
|
280
|
-
|
|
281
|
-
/* @__PURE__ */ r(
|
|
282
|
-
/* @__PURE__ */ e(
|
|
279
|
+
/* @__PURE__ */ e(ce, { style: { height: "500px" }, children: /* @__PURE__ */ r(V, { w: "98%", children: [
|
|
280
|
+
s?.customContentBefore && /* @__PURE__ */ e(xe, { children: s.customContentBefore(a.dataSource.getCurrentRecord()) }),
|
|
281
|
+
/* @__PURE__ */ r(H, { children: [
|
|
282
|
+
/* @__PURE__ */ e(H.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ r(O, { children: [
|
|
283
283
|
/* @__PURE__ */ e(
|
|
284
284
|
ne,
|
|
285
285
|
{
|
|
@@ -291,18 +291,18 @@ const vr = ir(
|
|
|
291
291
|
width: "calc(100% - 208px)"
|
|
292
292
|
}
|
|
293
293
|
),
|
|
294
|
-
|
|
294
|
+
s.showNickname && /* @__PURE__ */ e(
|
|
295
295
|
ne,
|
|
296
296
|
{
|
|
297
297
|
label: `${g().t("archbase:Apelido")}`,
|
|
298
298
|
placeholder: `${g().t("archbase:Apelido")}`,
|
|
299
299
|
dataSource: a.dataSource,
|
|
300
300
|
dataField: "nickname",
|
|
301
|
-
required:
|
|
301
|
+
required: s.requiredNickname
|
|
302
302
|
}
|
|
303
303
|
)
|
|
304
304
|
] }) }),
|
|
305
|
-
/* @__PURE__ */ e(
|
|
305
|
+
/* @__PURE__ */ e(H.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e(
|
|
306
306
|
ne,
|
|
307
307
|
{
|
|
308
308
|
label: `${g().t("archbase:Descrição do usuário")}`,
|
|
@@ -313,8 +313,8 @@ const vr = ir(
|
|
|
313
313
|
}
|
|
314
314
|
) })
|
|
315
315
|
] }),
|
|
316
|
-
/* @__PURE__ */ r(
|
|
317
|
-
/* @__PURE__ */ e(
|
|
316
|
+
/* @__PURE__ */ r(H, { children: [
|
|
317
|
+
/* @__PURE__ */ e(H.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e(
|
|
318
318
|
ne,
|
|
319
319
|
{
|
|
320
320
|
label: `${g().t("archbase:E-mail")}`,
|
|
@@ -322,41 +322,41 @@ const vr = ir(
|
|
|
322
322
|
dataSource: a.dataSource,
|
|
323
323
|
onChangeValue: (l) => a.dataSource.setFieldValue("userName", l),
|
|
324
324
|
dataField: "email",
|
|
325
|
-
readOnly: a.dataSource.isEditing() ? !
|
|
325
|
+
readOnly: a.dataSource.isEditing() ? !s.allowEditEmail : !1,
|
|
326
326
|
required: !0
|
|
327
327
|
}
|
|
328
328
|
) }),
|
|
329
|
-
/* @__PURE__ */ e(
|
|
330
|
-
|
|
329
|
+
/* @__PURE__ */ e(H.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e(
|
|
330
|
+
or,
|
|
331
331
|
{
|
|
332
332
|
label: `${g().t("archbase:Senha usuário")}`,
|
|
333
333
|
dataSource: a.dataSource,
|
|
334
334
|
dataField: "password",
|
|
335
335
|
error: t,
|
|
336
336
|
required: a.dataSource.getFieldValue("isNewUser"),
|
|
337
|
-
passwordPolicy:
|
|
338
|
-
showPasswordRequirements:
|
|
337
|
+
passwordPolicy: m,
|
|
338
|
+
showPasswordRequirements: s.showPasswordRequirements
|
|
339
339
|
}
|
|
340
340
|
) })
|
|
341
341
|
] }),
|
|
342
|
-
/* @__PURE__ */ e(
|
|
343
|
-
|
|
342
|
+
/* @__PURE__ */ e(H, { children: s.showProfile && /* @__PURE__ */ e(H.Col, { span: { base: 12, md: 6, lg: 6 }, children: /* @__PURE__ */ e(
|
|
343
|
+
nr,
|
|
344
344
|
{
|
|
345
345
|
label: `${g().t("archbase:Perfil do usuário")}`,
|
|
346
346
|
dataSource: a.dataSource,
|
|
347
347
|
dataField: "profile",
|
|
348
|
-
options:
|
|
348
|
+
options: E,
|
|
349
349
|
allowDeselect: !0,
|
|
350
350
|
optionsLabelField: "nome",
|
|
351
|
-
itemComponent:
|
|
351
|
+
itemComponent: Ar,
|
|
352
352
|
getOptionLabel: (l) => l.name,
|
|
353
353
|
getOptionValue: (l) => l.id
|
|
354
354
|
}
|
|
355
355
|
) }) }),
|
|
356
|
-
/* @__PURE__ */ r(
|
|
357
|
-
/* @__PURE__ */ e(
|
|
358
|
-
/* @__PURE__ */ e(
|
|
359
|
-
|
|
356
|
+
/* @__PURE__ */ r(H, { children: [
|
|
357
|
+
/* @__PURE__ */ e(H.Col, { span: { base: 12 }, children: s.showAccountConfigLabel && /* @__PURE__ */ e(h, { fz: 14, fw: 500, children: "Informe" }) }),
|
|
358
|
+
/* @__PURE__ */ e(H.Col, { span: { base: 12, md: 4, lg: 4 }, children: /* @__PURE__ */ r(V, { gap: "lg", children: [
|
|
359
|
+
s.showChangePasswordOnNextLogin && /* @__PURE__ */ e(Te.Wrapper, { label: "", children: /* @__PURE__ */ e(
|
|
360
360
|
Ae,
|
|
361
361
|
{
|
|
362
362
|
dataSource: a.dataSource,
|
|
@@ -364,7 +364,7 @@ const vr = ir(
|
|
|
364
364
|
label: `${g().t("archbase:Deve alterar senha próximo login ?")}`
|
|
365
365
|
}
|
|
366
366
|
) }),
|
|
367
|
-
|
|
367
|
+
s.showAllowPasswordChange && /* @__PURE__ */ e(Te.Wrapper, { label: "", children: /* @__PURE__ */ e(
|
|
368
368
|
Ae,
|
|
369
369
|
{
|
|
370
370
|
dataSource: a.dataSource,
|
|
@@ -372,7 +372,7 @@ const vr = ir(
|
|
|
372
372
|
label: `${g().t("archbase:Pode alterar a senha ?")}`
|
|
373
373
|
}
|
|
374
374
|
) }),
|
|
375
|
-
|
|
375
|
+
s.showPasswordNeverExpires && /* @__PURE__ */ r(Te.Wrapper, { label: "", children: [
|
|
376
376
|
/* @__PURE__ */ e(
|
|
377
377
|
Ae,
|
|
378
378
|
{
|
|
@@ -381,14 +381,14 @@ const vr = ir(
|
|
|
381
381
|
label: `${g().t("archbase:Senha nunca expira ?")}`
|
|
382
382
|
}
|
|
383
383
|
),
|
|
384
|
-
/* @__PURE__ */ e(
|
|
384
|
+
/* @__PURE__ */ e(h, { fz: 12, c: "dimmed", children: g().t(
|
|
385
385
|
'archbase:Desmarcado, a senha expira conforme a política de validade do servidor. Para exigir a troca agora, use "Deve alterar senha próximo login".'
|
|
386
386
|
) })
|
|
387
387
|
] }),
|
|
388
|
-
|
|
388
|
+
s.showPasswordChangedAt && c && /* @__PURE__ */ e(h, { fz: 12, c: "dimmed", children: `${g().t("archbase:Última troca de senha")}: ${c}` })
|
|
389
389
|
] }) }),
|
|
390
|
-
/* @__PURE__ */ e(
|
|
391
|
-
|
|
390
|
+
/* @__PURE__ */ e(H.Col, { span: { base: 12, md: 4, lg: 4 }, children: /* @__PURE__ */ r(V, { gap: "lg", children: [
|
|
391
|
+
s.showAccountDeactivated && /* @__PURE__ */ e(Te.Wrapper, { label: "", children: /* @__PURE__ */ e(
|
|
392
392
|
Ae,
|
|
393
393
|
{
|
|
394
394
|
dataSource: a.dataSource,
|
|
@@ -396,7 +396,7 @@ const vr = ir(
|
|
|
396
396
|
label: `${g().t("archbase:Conta desativada ?")}`
|
|
397
397
|
}
|
|
398
398
|
) }),
|
|
399
|
-
|
|
399
|
+
s.showAccountLocked && /* @__PURE__ */ e(Te.Wrapper, { label: "", children: /* @__PURE__ */ e(
|
|
400
400
|
Ae,
|
|
401
401
|
{
|
|
402
402
|
dataSource: a.dataSource,
|
|
@@ -404,7 +404,7 @@ const vr = ir(
|
|
|
404
404
|
label: `${g().t("archbase:Conta bloqueada ?")}`
|
|
405
405
|
}
|
|
406
406
|
) }),
|
|
407
|
-
|
|
407
|
+
s.showIsAdministrator && /* @__PURE__ */ e(Te.Wrapper, { label: "", children: /* @__PURE__ */ e(
|
|
408
408
|
Ae,
|
|
409
409
|
{
|
|
410
410
|
dataSource: a.dataSource,
|
|
@@ -413,28 +413,28 @@ const vr = ir(
|
|
|
413
413
|
}
|
|
414
414
|
) })
|
|
415
415
|
] }) }),
|
|
416
|
-
/* @__PURE__ */ e(
|
|
417
|
-
|
|
416
|
+
/* @__PURE__ */ e(H.Col, { span: { base: 12, md: 4, lg: 4 }, children: /* @__PURE__ */ e(V, { gap: "lg", children: /* @__PURE__ */ e(
|
|
417
|
+
sr,
|
|
418
418
|
{
|
|
419
419
|
label: g().t("archbase:Foto do usuário"),
|
|
420
420
|
dataSource: a.dataSource,
|
|
421
421
|
dataField: "avatar",
|
|
422
422
|
width: 120,
|
|
423
423
|
height: 120,
|
|
424
|
-
maxSizeKB:
|
|
425
|
-
imageQuality:
|
|
426
|
-
maxOutputSizePx:
|
|
424
|
+
maxSizeKB: s.avatarMaxSizeKB,
|
|
425
|
+
imageQuality: s.avatarImageQuality,
|
|
426
|
+
maxOutputSizePx: s.avatarMaxOutputSizePx
|
|
427
427
|
}
|
|
428
428
|
) }) })
|
|
429
429
|
] }),
|
|
430
|
-
|
|
431
|
-
/* @__PURE__ */ e(
|
|
432
|
-
/* @__PURE__ */ e(
|
|
433
|
-
|
|
430
|
+
s.showGroups && /* @__PURE__ */ r(H, { children: [
|
|
431
|
+
/* @__PURE__ */ e(H.Col, { span: { base: 12 }, children: /* @__PURE__ */ e(h, { fz: 14, fw: 500, children: "Grupos" }) }),
|
|
432
|
+
/* @__PURE__ */ e(H.Col, { span: { base: 12 }, children: /* @__PURE__ */ e(
|
|
433
|
+
Tr,
|
|
434
434
|
{
|
|
435
435
|
titleAvailable: g().t("archbase:Disponíveis"),
|
|
436
436
|
titleAssigned: g().t("archbase:Selecionados"),
|
|
437
|
-
assignedItemsDS: new
|
|
437
|
+
assignedItemsDS: new cr("dsDualList", {
|
|
438
438
|
records: a.dataSource.getFieldValue("groups"),
|
|
439
439
|
grandTotalRecords: a.dataSource.getFieldValue("groups").length,
|
|
440
440
|
currentPage: 0,
|
|
@@ -443,8 +443,8 @@ const vr = ir(
|
|
|
443
443
|
}),
|
|
444
444
|
width: "100%",
|
|
445
445
|
height: "200px",
|
|
446
|
-
availableItemsDS:
|
|
447
|
-
handleCreateAssociationObject: (l) =>
|
|
446
|
+
availableItemsDS: A,
|
|
447
|
+
handleCreateAssociationObject: (l) => ga.newInstance(l),
|
|
448
448
|
idFieldAssigned: (l) => l && l.group ? l.group.id : "",
|
|
449
449
|
idFieldAvailable: "id",
|
|
450
450
|
labelFieldAssigned: (l) => l && l.group ? l.group.name : "",
|
|
@@ -452,36 +452,36 @@ const vr = ir(
|
|
|
452
452
|
}
|
|
453
453
|
) })
|
|
454
454
|
] }),
|
|
455
|
-
|
|
456
|
-
/* @__PURE__ */ e(
|
|
455
|
+
s?.customContentAfter && /* @__PURE__ */ e(xe, { children: s.customContentAfter(a.dataSource.getCurrentRecord()) }),
|
|
456
|
+
/* @__PURE__ */ e(Ra, { h: "12px" })
|
|
457
457
|
] }) }),
|
|
458
|
-
/* @__PURE__ */ r(
|
|
459
|
-
/* @__PURE__ */ e(
|
|
460
|
-
/* @__PURE__ */ e(
|
|
458
|
+
/* @__PURE__ */ r(O, { justify: "flex-end", mt: "md", children: [
|
|
459
|
+
/* @__PURE__ */ e(X, { variant: "default", onClick: o, children: g().t("archbase:Cancelar") }),
|
|
460
|
+
/* @__PURE__ */ e(X, { onClick: y, children: g().t("archbase:Salvar") })
|
|
461
461
|
] })
|
|
462
462
|
]
|
|
463
463
|
}
|
|
464
464
|
);
|
|
465
|
-
},
|
|
466
|
-
const t = { ...a.options ?? {} },
|
|
467
|
-
a.onCustomSave ? a.onCustomSave(a.dataSource.getCurrentRecord(), (
|
|
468
|
-
|
|
465
|
+
}, kr = (a) => {
|
|
466
|
+
const t = { ...a.options ?? {} }, n = () => {
|
|
467
|
+
a.onCustomSave ? a.onCustomSave(a.dataSource.getCurrentRecord(), (d) => {
|
|
468
|
+
d && a.onAfterSave && a.onAfterSave(a.dataSource.getCurrentRecord()), a.onClickOk(a.dataSource.getCurrentRecord(), d);
|
|
469
469
|
}) : a.onClickOk(a.dataSource.getCurrentRecord(), !0);
|
|
470
|
-
},
|
|
470
|
+
}, s = () => {
|
|
471
471
|
a.onClickCancel(a.dataSource.getCurrentRecord());
|
|
472
472
|
};
|
|
473
473
|
return /* @__PURE__ */ e(
|
|
474
|
-
|
|
474
|
+
$e,
|
|
475
475
|
{
|
|
476
476
|
opened: a.opened,
|
|
477
|
-
onClose:
|
|
477
|
+
onClose: s,
|
|
478
478
|
title: g().t("archbase:Grupo"),
|
|
479
479
|
size: "60%",
|
|
480
480
|
styles: { content: { maxWidth: 1e3 } },
|
|
481
|
-
children: /* @__PURE__ */ e(
|
|
481
|
+
children: /* @__PURE__ */ e(ce, { style: { height: "460px" }, children: /* @__PURE__ */ r(V, { w: "98%", children: [
|
|
482
482
|
t?.customContentBefore && t.customContentBefore(a.dataSource.getCurrentRecord()),
|
|
483
|
-
/* @__PURE__ */ r(
|
|
484
|
-
/* @__PURE__ */ e(
|
|
483
|
+
/* @__PURE__ */ r(H, { children: [
|
|
484
|
+
/* @__PURE__ */ e(H.Col, { span: { base: 12 }, children: /* @__PURE__ */ e(
|
|
485
485
|
ne,
|
|
486
486
|
{
|
|
487
487
|
label: `${g().t("archbase:Nome do grupo")}`,
|
|
@@ -490,7 +490,7 @@ const vr = ir(
|
|
|
490
490
|
dataField: "name"
|
|
491
491
|
}
|
|
492
492
|
) }),
|
|
493
|
-
/* @__PURE__ */ e(
|
|
493
|
+
/* @__PURE__ */ e(H.Col, { span: { base: 12 }, children: /* @__PURE__ */ e(
|
|
494
494
|
ne,
|
|
495
495
|
{
|
|
496
496
|
label: `${g().t("archbase:Descrição do grupo")}`,
|
|
@@ -501,63 +501,63 @@ const vr = ir(
|
|
|
501
501
|
) })
|
|
502
502
|
] }),
|
|
503
503
|
t?.customContentAfter && t.customContentAfter(a.dataSource.getCurrentRecord()),
|
|
504
|
-
/* @__PURE__ */ r(
|
|
505
|
-
/* @__PURE__ */ e(
|
|
506
|
-
/* @__PURE__ */ e(
|
|
504
|
+
/* @__PURE__ */ r(O, { justify: "flex-end", mt: "md", children: [
|
|
505
|
+
/* @__PURE__ */ e(X, { variant: "default", onClick: s, children: g().t("archbase:Cancelar") }),
|
|
506
|
+
/* @__PURE__ */ e(X, { onClick: n, children: g().t("archbase:Salvar") })
|
|
507
507
|
] })
|
|
508
508
|
] }) })
|
|
509
509
|
}
|
|
510
510
|
);
|
|
511
|
-
},
|
|
511
|
+
}, Ir = ({ image: a, label: t, description: n, ...s }) => /* @__PURE__ */ e("div", { ...s, children: /* @__PURE__ */ r(O, { grow: !0, children: [
|
|
512
512
|
/* @__PURE__ */ e("img", { style: { maxWidth: "32px" }, src: a }),
|
|
513
513
|
/* @__PURE__ */ r("div", { children: [
|
|
514
|
-
/* @__PURE__ */ e(
|
|
515
|
-
/* @__PURE__ */ e(
|
|
514
|
+
/* @__PURE__ */ e(h, { size: "sm", children: t }),
|
|
515
|
+
/* @__PURE__ */ e(h, { size: "xs", opacity: 0.65, children: n })
|
|
516
516
|
] })
|
|
517
|
-
] }) }),
|
|
518
|
-
|
|
519
|
-
const [t,
|
|
517
|
+
] }) }), Er = (a) => {
|
|
518
|
+
yr();
|
|
519
|
+
const [t, n] = x(), s = J(K.User), d = Ne(
|
|
520
520
|
"ApiTokenModal",
|
|
521
521
|
a.dataSource,
|
|
522
522
|
"expirationDate",
|
|
523
523
|
""
|
|
524
524
|
);
|
|
525
|
-
process.env.NODE_ENV === "development" && a.dataSource && console.log(`[ApiTokenModal] DataSource version: ${
|
|
526
|
-
const
|
|
527
|
-
if (!
|
|
528
|
-
|
|
525
|
+
process.env.NODE_ENV === "development" && a.dataSource && console.log(`[ApiTokenModal] DataSource version: ${d.dataSourceVersion}`);
|
|
526
|
+
const u = (m) => {
|
|
527
|
+
if (!m)
|
|
528
|
+
d.handleValueChange(void 0);
|
|
529
529
|
else {
|
|
530
|
-
const
|
|
531
|
-
|
|
530
|
+
const S = typeof m == "string" ? new Date(m) : m, A = ar(S);
|
|
531
|
+
d.handleValueChange(A);
|
|
532
532
|
}
|
|
533
|
-
|
|
534
|
-
}, c = async (
|
|
533
|
+
n(m);
|
|
534
|
+
}, c = async (m, S) => new Promise(async (A, w) => {
|
|
535
535
|
try {
|
|
536
|
-
const
|
|
537
|
-
|
|
538
|
-
options:
|
|
539
|
-
page:
|
|
540
|
-
totalPages:
|
|
536
|
+
const E = Ge(De.or(De.eq("name", `^*${S.trim()}*`))), v = await s.findAllWithFilter(E, m, 20);
|
|
537
|
+
A({
|
|
538
|
+
options: v.content,
|
|
539
|
+
page: v.pageable.pageNumber,
|
|
540
|
+
totalPages: v.totalPages
|
|
541
541
|
});
|
|
542
|
-
} catch (
|
|
543
|
-
|
|
542
|
+
} catch (E) {
|
|
543
|
+
w(ge(E));
|
|
544
544
|
}
|
|
545
|
-
}),
|
|
546
|
-
a.onCustomSave ? a.onCustomSave(a.dataSource.current, (
|
|
547
|
-
|
|
545
|
+
}), T = () => {
|
|
546
|
+
a.onCustomSave ? a.onCustomSave(a.dataSource.current, (m) => {
|
|
547
|
+
m && a.onAfterSave && a.onAfterSave(a.dataSource.current), a.onClickOk(a.dataSource.current, m);
|
|
548
548
|
}) : a.onClickOk(a.dataSource.current, !0);
|
|
549
|
-
},
|
|
549
|
+
}, R = () => {
|
|
550
550
|
a.onClickCancel(a.dataSource.current);
|
|
551
551
|
};
|
|
552
552
|
return /* @__PURE__ */ r(
|
|
553
|
-
|
|
553
|
+
$e,
|
|
554
554
|
{
|
|
555
555
|
opened: a.opened,
|
|
556
|
-
onClose:
|
|
556
|
+
onClose: R,
|
|
557
557
|
title: g().t("archbase:Token de API"),
|
|
558
558
|
size: "50%",
|
|
559
559
|
children: [
|
|
560
|
-
/* @__PURE__ */ r(
|
|
560
|
+
/* @__PURE__ */ r(ce, { style: { height: "300px" }, children: [
|
|
561
561
|
/* @__PURE__ */ e(
|
|
562
562
|
ne,
|
|
563
563
|
{
|
|
@@ -577,201 +577,201 @@ const vr = ir(
|
|
|
577
577
|
}
|
|
578
578
|
),
|
|
579
579
|
/* @__PURE__ */ e(
|
|
580
|
-
|
|
580
|
+
vr,
|
|
581
581
|
{
|
|
582
582
|
withSeconds: !0,
|
|
583
583
|
value: t,
|
|
584
|
-
onChange:
|
|
584
|
+
onChange: u,
|
|
585
585
|
label: "Data/hora expiração",
|
|
586
586
|
placeholder: "Selecione a data de expiração"
|
|
587
587
|
}
|
|
588
588
|
),
|
|
589
589
|
/* @__PURE__ */ e(
|
|
590
|
-
|
|
590
|
+
lr,
|
|
591
591
|
{
|
|
592
592
|
label: `${g().t("archbase:Usuário")}`,
|
|
593
593
|
dataSource: a.dataSource,
|
|
594
594
|
dataField: "user",
|
|
595
595
|
placeholder: `${g().t("archbase:Digite aqui o nome do usuário")}`,
|
|
596
|
-
getOptionLabel: (
|
|
597
|
-
getOptionValue: (
|
|
596
|
+
getOptionLabel: (m) => m && m.email ? m.email : "",
|
|
597
|
+
getOptionValue: (m) => m && m.id ? m.id.toString() : "",
|
|
598
598
|
getOptions: c,
|
|
599
599
|
debounceTime: 500,
|
|
600
600
|
minCharsToSearch: 1,
|
|
601
|
-
itemComponent:
|
|
601
|
+
itemComponent: Ir
|
|
602
602
|
}
|
|
603
603
|
)
|
|
604
604
|
] }),
|
|
605
|
-
/* @__PURE__ */ r(
|
|
606
|
-
/* @__PURE__ */ e(
|
|
607
|
-
/* @__PURE__ */ e(
|
|
605
|
+
/* @__PURE__ */ r(O, { justify: "flex-end", mt: "md", children: [
|
|
606
|
+
/* @__PURE__ */ e(X, { variant: "default", onClick: R, children: g().t("archbase:Cancelar") }),
|
|
607
|
+
/* @__PURE__ */ e(X, { onClick: T, children: g().t("archbase:Salvar") })
|
|
608
608
|
] })
|
|
609
609
|
]
|
|
610
610
|
}
|
|
611
611
|
);
|
|
612
|
-
},
|
|
612
|
+
}, fa = (a) => {
|
|
613
613
|
const t = "->";
|
|
614
|
-
return a.includes(t) ? a.split(t).map((
|
|
614
|
+
return a.includes(t) ? a.split(t).map((d) => d.trim()).map((d) => g().t(d)).join(` ${t} `) : g().t(a);
|
|
615
615
|
};
|
|
616
|
-
function
|
|
617
|
-
const
|
|
618
|
-
value:
|
|
619
|
-
label:
|
|
620
|
-
children:
|
|
616
|
+
function Xe({ dataSource: a, opened: t, close: n }) {
|
|
617
|
+
const s = ie(() => a?.getFieldValue("name") || "", [a]), d = ie(() => a?.getFieldValue("id") || "", [a]), u = ie(() => a?.getFieldValue("type") || "", [a]), c = ca(), T = ca(), [R, m] = x([]), [S, A] = x([]), [w, E] = x(), [v, y] = x(), [o, l] = x(""), [p] = ia(o, 200), [b, L] = x(""), [F] = ia(b, 200), i = J(K.Resource), { colorScheme: D } = qe(), P = D === "dark" ? "var(--mantine-primary-color-7)" : "var(--mantine-primary-color-4)", G = ie(() => S.sort((z, k) => z.resourceDescription.localeCompare(k.resourceDescription)).map((z) => ({
|
|
618
|
+
value: z.resourceId,
|
|
619
|
+
label: z.resourceDescription,
|
|
620
|
+
children: z.permissions.filter((k) => k.actionDescription.toLowerCase().includes(F.toLowerCase())).sort((k, q) => k.actionDescription.localeCompare(q.actionDescription)).map((k) => ({
|
|
621
621
|
value: k.actionId,
|
|
622
622
|
label: k.actionDescription,
|
|
623
623
|
nodeProps: {
|
|
624
624
|
permissionId: k.permissionId,
|
|
625
625
|
types: k.types ?? [],
|
|
626
|
-
owner:
|
|
626
|
+
owner: z
|
|
627
627
|
}
|
|
628
628
|
}))
|
|
629
|
-
})), [
|
|
630
|
-
value:
|
|
631
|
-
label:
|
|
632
|
-
children:
|
|
633
|
-
const
|
|
629
|
+
})), [S, F]), f = ie(() => S.map((z) => z.permissions.map((k) => k.actionId)).flat(), [S]), I = ie(() => R.sort((z, k) => z.resourceDescription.localeCompare(k.resourceDescription)).map((z) => ({
|
|
630
|
+
value: z.resourceId,
|
|
631
|
+
label: z.resourceDescription,
|
|
632
|
+
children: z.permissions.filter((k) => k.actionDescription.toLowerCase().includes(p.toLowerCase())).sort((k, q) => k.actionDescription.localeCompare(q.actionDescription)).map((k) => {
|
|
633
|
+
const q = S.find((U) => U.resourceId === z.resourceId)?.permissions.find((U) => U.actionId === k.actionId);
|
|
634
634
|
return {
|
|
635
635
|
value: k.actionId,
|
|
636
636
|
label: k.actionDescription,
|
|
637
637
|
nodeProps: {
|
|
638
|
-
granted:
|
|
639
|
-
owner:
|
|
638
|
+
granted: f.includes(k.actionId) && q?.types?.includes(Se(Y, u)),
|
|
639
|
+
owner: z
|
|
640
640
|
}
|
|
641
641
|
};
|
|
642
642
|
})
|
|
643
|
-
})), [
|
|
644
|
-
if (
|
|
645
|
-
const
|
|
646
|
-
|
|
643
|
+
})), [R, S, f, u, p]), N = ae(async () => {
|
|
644
|
+
if (d) {
|
|
645
|
+
const z = await i.getPermissionsBySecurityId(d, u), k = await i.getAllPermissionsAvailable();
|
|
646
|
+
m(k), A(z);
|
|
647
647
|
}
|
|
648
|
-
}, [
|
|
649
|
-
|
|
650
|
-
if (
|
|
651
|
-
|
|
652
|
-
let
|
|
653
|
-
return
|
|
654
|
-
...
|
|
655
|
-
permissions:
|
|
656
|
-
(
|
|
657
|
-
...
|
|
658
|
-
permissionId:
|
|
659
|
-
types: [...
|
|
660
|
-
} :
|
|
648
|
+
}, [d, u]), ye = ae(() => {
|
|
649
|
+
w?.value && d && i.createPermission(d, w.value, u).then((z) => {
|
|
650
|
+
if (z) {
|
|
651
|
+
A((j) => {
|
|
652
|
+
let B;
|
|
653
|
+
return j.map((Z) => Z.resourceId).includes(z.resourceId) ? B = j.map((Z) => Z.resourceId === z.resourceId ? Z.permissions.map((W) => W.actionId).includes(w.value) ? {
|
|
654
|
+
...Z,
|
|
655
|
+
permissions: Z.permissions.map(
|
|
656
|
+
(W) => W.actionId === w.value ? {
|
|
657
|
+
...W,
|
|
658
|
+
permissionId: z.permissionId,
|
|
659
|
+
types: [...W.types ?? [], Se(Y, u)]
|
|
660
|
+
} : W
|
|
661
661
|
)
|
|
662
662
|
} : {
|
|
663
|
-
...
|
|
663
|
+
...Z,
|
|
664
664
|
permissions: [
|
|
665
|
-
...
|
|
665
|
+
...Z.permissions ?? [],
|
|
666
666
|
{
|
|
667
|
-
actionId:
|
|
668
|
-
actionDescription:
|
|
669
|
-
permissionId:
|
|
670
|
-
types: [
|
|
667
|
+
actionId: z.actionId,
|
|
668
|
+
actionDescription: z.actionDescription,
|
|
669
|
+
permissionId: z.permissionId,
|
|
670
|
+
types: [Se(Y, u)]
|
|
671
671
|
}
|
|
672
672
|
]
|
|
673
|
-
} :
|
|
674
|
-
...
|
|
673
|
+
} : Z) : B = [
|
|
674
|
+
...j,
|
|
675
675
|
{
|
|
676
|
-
resourceId:
|
|
677
|
-
resourceDescription:
|
|
676
|
+
resourceId: z.resourceId,
|
|
677
|
+
resourceDescription: z.resourceDescription,
|
|
678
678
|
permissions: [
|
|
679
679
|
{
|
|
680
|
-
actionId:
|
|
681
|
-
actionDescription:
|
|
682
|
-
permissionId:
|
|
683
|
-
types: [
|
|
680
|
+
actionId: z.actionId,
|
|
681
|
+
actionDescription: z.actionDescription,
|
|
682
|
+
permissionId: z.permissionId,
|
|
683
|
+
types: [Se(Y, u)]
|
|
684
684
|
}
|
|
685
685
|
]
|
|
686
686
|
}
|
|
687
|
-
],
|
|
687
|
+
], B;
|
|
688
688
|
});
|
|
689
|
-
const k =
|
|
690
|
-
|
|
689
|
+
const k = I.filter((j) => j.value === w?.nodeProps?.owner?.resourceId).map((j) => j.children).flat(), q = k.map((j) => j.value).indexOf(w.value), U = k.find((j, B) => !j?.nodeProps?.granted && j?.value !== w.value && (k.length > q + 1 ? B > q : !0));
|
|
690
|
+
U?.value && c.select(U.value), T.expand(z.resourceId), E(U);
|
|
691
691
|
}
|
|
692
692
|
});
|
|
693
|
-
}, [
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
let
|
|
697
|
-
return
|
|
698
|
-
|
|
699
|
-
}),
|
|
700
|
-
}).map((
|
|
701
|
-
const
|
|
702
|
-
return
|
|
703
|
-
...
|
|
704
|
-
permissions: [...(
|
|
693
|
+
}, [w, d, u, i, I, R, S, c, T]), we = ae(() => {
|
|
694
|
+
v?.nodeProps?.permissionId && i.deletePermission(v.nodeProps.permissionId).then(() => {
|
|
695
|
+
A((U) => [...U].filter((B) => {
|
|
696
|
+
let Z = !0;
|
|
697
|
+
return B.permissions?.forEach((W) => {
|
|
698
|
+
W.permissionId !== void 0 && W.permissionId === v?.nodeProps?.permissionId && B.permissions.length === 1 && W?.types?.length === 1 && W.types[0] === Se(Y, u) && (Z = !1);
|
|
699
|
+
}), Z;
|
|
700
|
+
}).map((B) => {
|
|
701
|
+
const Z = v?.nodeProps?.owner;
|
|
702
|
+
return B.resourceId === Z.resourceId ? v?.nodeProps?.types?.length === 1 ? {
|
|
703
|
+
...B,
|
|
704
|
+
permissions: [...(B.permissions ?? []).filter((W) => W.permissionId !== v?.nodeProps?.permissionId)]
|
|
705
705
|
} : {
|
|
706
|
-
...
|
|
707
|
-
permissions: (
|
|
708
|
-
actionId:
|
|
709
|
-
actionDescription:
|
|
710
|
-
types: [...
|
|
711
|
-
} :
|
|
712
|
-
} :
|
|
706
|
+
...B,
|
|
707
|
+
permissions: (B.permissions ?? []).map((W) => W.actionId === v.value ? {
|
|
708
|
+
actionId: W.actionId,
|
|
709
|
+
actionDescription: W.actionDescription,
|
|
710
|
+
types: [...W.types?.filter((le) => le && le !== Se(Y, u)) ?? []]
|
|
711
|
+
} : W)
|
|
712
|
+
} : B;
|
|
713
713
|
}));
|
|
714
|
-
const
|
|
715
|
-
|
|
714
|
+
const z = G.filter((U) => U.value === v?.nodeProps?.owner?.resourceId).map((U) => U.children).flat(), k = z.map((U) => U.value).indexOf(v.value), q = z.find((U, j) => U?.nodeProps?.types.includes(Se(Y, u)) && U?.value !== v.value && (z.length > k + 1 ? j > k : !0));
|
|
715
|
+
q?.value && T.select(q.value), y(q);
|
|
716
716
|
});
|
|
717
|
-
}, [
|
|
717
|
+
}, [v, i, u, G, S, T]);
|
|
718
718
|
return ee(() => {
|
|
719
|
-
t && a && (
|
|
720
|
-
}, [t,
|
|
721
|
-
/* @__PURE__ */ e(
|
|
719
|
+
t && a && (E(void 0), y(void 0), l(""), L(""), T.collapseAllNodes(), c.collapseAllNodes(), N());
|
|
720
|
+
}, [t, u, d, N]), a ? /* @__PURE__ */ e($e, { opened: t, onClose: n, title: `${g().t(`archbase:${u}`)}: ${s}`, size: "80%", styles: { root: { overflow: "hidden" } }, children: /* @__PURE__ */ r(wr, { height: "540px", children: [
|
|
721
|
+
/* @__PURE__ */ e(Cr, { children: /* @__PURE__ */ e(re, { withBorder: !0, my: 20, p: 20, style: { height: "calc(100% - 40px)", overflow: "hidden", display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ r("div", { style: { flex: 1, display: "flex", flexDirection: "row", overflow: "hidden", minHeight: 0, gap: "8px" }, children: [
|
|
722
722
|
/* @__PURE__ */ r("div", { style: { flex: 9, display: "flex", flexDirection: "column", overflow: "hidden", minHeight: 0 }, children: [
|
|
723
|
-
/* @__PURE__ */ r(
|
|
724
|
-
/* @__PURE__ */ e(
|
|
723
|
+
/* @__PURE__ */ r(O, { mb: 20, children: [
|
|
724
|
+
/* @__PURE__ */ e(h, { children: g().t("archbase:Available") }),
|
|
725
725
|
/* @__PURE__ */ e(
|
|
726
|
-
|
|
726
|
+
fe,
|
|
727
727
|
{
|
|
728
728
|
size: "xs",
|
|
729
|
-
value:
|
|
730
|
-
onChange: (
|
|
729
|
+
value: o,
|
|
730
|
+
onChange: (z) => l(z.target.value),
|
|
731
731
|
placeholder: g().t("archbase:Filter available permissions")
|
|
732
732
|
}
|
|
733
733
|
)
|
|
734
734
|
] }),
|
|
735
|
-
/* @__PURE__ */ e(
|
|
736
|
-
|
|
735
|
+
/* @__PURE__ */ e(ce, { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ e(
|
|
736
|
+
da,
|
|
737
737
|
{
|
|
738
|
-
data:
|
|
738
|
+
data: I,
|
|
739
739
|
selectOnClick: !0,
|
|
740
740
|
allowRangeSelection: !1,
|
|
741
741
|
tree: c,
|
|
742
|
-
renderNode: ({ level:
|
|
743
|
-
const
|
|
744
|
-
|
|
745
|
-
}, [k,
|
|
742
|
+
renderNode: ({ level: z, node: k, expanded: q, hasChildren: U, selected: j, elementProps: B }) => {
|
|
743
|
+
const Z = k?.nodeProps?.granted, W = Z ? "dimmed" : void 0, le = Z ? "line-through" : void 0, je = ae((Ze) => {
|
|
744
|
+
E(k), B.onClick(Ze);
|
|
745
|
+
}, [k, B.onClick]);
|
|
746
746
|
return /* @__PURE__ */ r(
|
|
747
|
-
|
|
747
|
+
O,
|
|
748
748
|
{
|
|
749
|
-
ml:
|
|
749
|
+
ml: U ? 0 : 5,
|
|
750
750
|
gap: 5,
|
|
751
|
-
...
|
|
752
|
-
bg:
|
|
753
|
-
onClick:
|
|
751
|
+
...B,
|
|
752
|
+
bg: j && z === 2 ? P : "",
|
|
753
|
+
onClick: je,
|
|
754
754
|
children: [
|
|
755
|
-
|
|
756
|
-
|
|
755
|
+
U && /* @__PURE__ */ e(
|
|
756
|
+
pa,
|
|
757
757
|
{
|
|
758
758
|
size: 18,
|
|
759
|
-
style: { transform:
|
|
759
|
+
style: { transform: q ? "rotate(0deg)" : "rotate(-90deg)" }
|
|
760
760
|
}
|
|
761
761
|
),
|
|
762
|
-
!
|
|
763
|
-
|
|
762
|
+
!U && /* @__PURE__ */ e(
|
|
763
|
+
ma,
|
|
764
764
|
{
|
|
765
765
|
size: 12,
|
|
766
766
|
style: { transform: "rotate(-90deg)", marginTop: "-5px" }
|
|
767
767
|
}
|
|
768
768
|
),
|
|
769
769
|
/* @__PURE__ */ e(
|
|
770
|
-
|
|
770
|
+
h,
|
|
771
771
|
{
|
|
772
|
-
c:
|
|
773
|
-
td:
|
|
774
|
-
children:
|
|
772
|
+
c: W,
|
|
773
|
+
td: le,
|
|
774
|
+
children: fa(k.label)
|
|
775
775
|
}
|
|
776
776
|
)
|
|
777
777
|
]
|
|
@@ -781,61 +781,61 @@ function Ke({ dataSource: a, opened: t, close: o }) {
|
|
|
781
781
|
}
|
|
782
782
|
) })
|
|
783
783
|
] }),
|
|
784
|
-
/* @__PURE__ */ e("div", { style: { flex: 2, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ r(
|
|
785
|
-
/* @__PURE__ */ e(
|
|
786
|
-
/* @__PURE__ */ e(
|
|
784
|
+
/* @__PURE__ */ e("div", { style: { flex: 2, display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ r(V, { gap: 5, align: "center", children: [
|
|
785
|
+
/* @__PURE__ */ e(ke, { label: g().t("archbase:Add"), children: /* @__PURE__ */ e(me, { onClick: ye, disabled: !w || w?.nodeProps?.granted || !w.nodeProps, children: /* @__PURE__ */ e(Ia, {}) }) }),
|
|
786
|
+
/* @__PURE__ */ e(ke, { label: g().t("archbase:Remove"), children: /* @__PURE__ */ e(me, { onClick: we, disabled: !v || !v?.nodeProps?.permissionId || !v.nodeProps, children: /* @__PURE__ */ e(Ea, {}) }) })
|
|
787
787
|
] }) }),
|
|
788
788
|
/* @__PURE__ */ r("div", { style: { flex: 9, display: "flex", flexDirection: "column", overflow: "hidden", minHeight: 0 }, children: [
|
|
789
|
-
/* @__PURE__ */ r(
|
|
790
|
-
/* @__PURE__ */ e(
|
|
789
|
+
/* @__PURE__ */ r(O, { mb: 20, children: [
|
|
790
|
+
/* @__PURE__ */ e(h, { children: g().t("archbase:Granted") }),
|
|
791
791
|
/* @__PURE__ */ e(
|
|
792
|
-
|
|
792
|
+
fe,
|
|
793
793
|
{
|
|
794
794
|
size: "xs",
|
|
795
|
-
value:
|
|
796
|
-
onChange: (
|
|
795
|
+
value: b,
|
|
796
|
+
onChange: (z) => L(z.target.value),
|
|
797
797
|
placeholder: g().t("archbase:Filter granted permissions")
|
|
798
798
|
}
|
|
799
799
|
)
|
|
800
800
|
] }),
|
|
801
|
-
/* @__PURE__ */ e(
|
|
802
|
-
|
|
801
|
+
/* @__PURE__ */ e(ce, { style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ e(
|
|
802
|
+
da,
|
|
803
803
|
{
|
|
804
|
-
data:
|
|
804
|
+
data: G,
|
|
805
805
|
selectOnClick: !0,
|
|
806
806
|
allowRangeSelection: !1,
|
|
807
|
-
tree:
|
|
808
|
-
renderNode: ({ level:
|
|
809
|
-
const
|
|
810
|
-
|
|
811
|
-
}, [k,
|
|
807
|
+
tree: T,
|
|
808
|
+
renderNode: ({ level: z, node: k, expanded: q, hasChildren: U, selected: j, elementProps: B }) => {
|
|
809
|
+
const Z = ae((W) => {
|
|
810
|
+
y(k), B.onClick(W);
|
|
811
|
+
}, [k, B.onClick]);
|
|
812
812
|
return /* @__PURE__ */ r(
|
|
813
|
-
|
|
813
|
+
O,
|
|
814
814
|
{
|
|
815
|
-
ml:
|
|
815
|
+
ml: U ? 0 : 5,
|
|
816
816
|
gap: 5,
|
|
817
|
-
...
|
|
818
|
-
bg:
|
|
819
|
-
onClick:
|
|
817
|
+
...B,
|
|
818
|
+
bg: j && z === 2 ? P : "",
|
|
819
|
+
onClick: Z,
|
|
820
820
|
children: [
|
|
821
|
-
|
|
822
|
-
|
|
821
|
+
U && /* @__PURE__ */ e(
|
|
822
|
+
pa,
|
|
823
823
|
{
|
|
824
824
|
size: 18,
|
|
825
|
-
style: { transform:
|
|
825
|
+
style: { transform: q ? "rotate(0deg)" : "rotate(-90deg)" }
|
|
826
826
|
}
|
|
827
827
|
),
|
|
828
|
-
!
|
|
829
|
-
|
|
828
|
+
!U && /* @__PURE__ */ e(
|
|
829
|
+
ma,
|
|
830
830
|
{
|
|
831
831
|
size: 12,
|
|
832
832
|
style: { transform: "rotate(-90deg)", marginTop: "-5px" }
|
|
833
833
|
}
|
|
834
834
|
),
|
|
835
|
-
/* @__PURE__ */ e(
|
|
836
|
-
k?.nodeProps?.types?.includes("USER") && /* @__PURE__ */ e(
|
|
837
|
-
k?.nodeProps?.types?.includes("GROUP") && /* @__PURE__ */ e(
|
|
838
|
-
k?.nodeProps?.types?.includes("PROFILE") && /* @__PURE__ */ e(
|
|
835
|
+
/* @__PURE__ */ e(h, { children: fa(k.label) }),
|
|
836
|
+
k?.nodeProps?.types?.includes("USER") && /* @__PURE__ */ e(Q, { color: "blue", children: g().t("archbase:user") }),
|
|
837
|
+
k?.nodeProps?.types?.includes("GROUP") && /* @__PURE__ */ e(Q, { color: "orange", children: g().t("archbase:group") }),
|
|
838
|
+
k?.nodeProps?.types?.includes("PROFILE") && /* @__PURE__ */ e(Q, { color: "pink", children: g().t("archbase:profile") })
|
|
839
839
|
]
|
|
840
840
|
}
|
|
841
841
|
);
|
|
@@ -844,12 +844,12 @@ function Ke({ dataSource: a, opened: t, close: o }) {
|
|
|
844
844
|
) })
|
|
845
845
|
] })
|
|
846
846
|
] }) }) }),
|
|
847
|
-
/* @__PURE__ */ e(
|
|
847
|
+
/* @__PURE__ */ e(Sr, { size: "40px", children: /* @__PURE__ */ e(O, { justify: "flex-end", children: /* @__PURE__ */ e(X, { onClick: n, children: g().t("archbase:Close") }) }) })
|
|
848
848
|
] }) }) : null;
|
|
849
849
|
}
|
|
850
|
-
const
|
|
850
|
+
const sa = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAAABj1BMVEUAAADMzMzLy8vAwMDLy8vLy8vLy8vMzMzKysrR0dHPz8/MzMzNzc3KysrMzMzKysrLy8vLy8vLy8vJycnR0dHMzMzPz8/Ozs7MzMxPT0/Nzc1UVFTJyclTU1PMzMzKysrMzMzJycldXV1iYmLMzMzIyMhNTU1NTU3MzMzLy8vNzc3MzMxVVVXLy8vMzMzLy8vLy8tNTU3MzMzOzs5QUFDLy8vKyspRUVFRUVHMzMxZWVlycnLLy8tUVFTJycnKyspZWVlXV1dhYWHGxsZMTExQUFBPT0/Ozs7Ly8vPz89SUlJSUlLMzMxVVVVWVlZVVVXKysptbW1bW1t6enpmZmbLy8tKSkrQ0NDOzs5FRUXNzc1NTU3S0tLU1NRHR0dSUlKzs7ORkZF4eHhPT0/Jycm9vb26urp8fHxYWFisrKylpaWdnZ11dXVubm5fX1+8vLy3t7ehoaFkZGRVVVXBwcG/v7+vr6+ZmZmUlJSNjY2GhoZzc3NcXFzGxsbDw8Ofn5+WlpaBgYGwsLCpqalqampaWRCJAAAAVXRSTlMA+YUG1M7Df1AQ8urbdWdiXjo2HQkE+/vu4qqIcV1bRDEpIRwXFO/q2ZiObWJZSiv+9uTe3cq8s6qkgX55b1pWR0YVDfvJyLCcmZWTi2lZVz82LRcUQGGNCgAAA9pJREFUWMPll2db2zAQgJ0AgUIYDSl7tZRZ6N57793akizZCSSEEJKw9yi0/eHtEwgid5IxfOX9mnvenM93J8s4tZw5391Q3/Hu0mj3lTMnllys+hi6HqBCCCIEDVwPDVddPEEqXW9qiEOoeQAlDqlpGz1eYo2VYSFsE2ELcSPY6FvTV1njUFMDdVqCff48DWGgAdhOuMtPie8JrUaWq+3I5zs76Jg+cG50e3seVxPTF6S63svT0URNn1BSqffUEhvHE/ofgn8x9aZLKJpcja/sZnO57Pp0yqbIVKv2VDUBD93amedsn0QuA1U2eazynG8BceRPnrnWAczdmAERtLoHe6IhAaJWLWaVwNLLBPxXxQskCjogZse1ICz2G+TkDKNGbAb5THELwzaXQB2bzpZ6zt0GD5acZ5bKNA4LGSorET2BDz/NLDVT0FQywGW34GT81YhYForKo4dbCHjsVMLSEJuxgWnUkMAKkTmmE7E52ExhuX2vBGDzj+lFa7AKzRHUQ1K0qheNQZETPHj3FQSKfulF0zCYlpcVpyyAlseypcOdojC6uThxdQLt94mYTpRI2WjvduyL3kqRbGxXk1A+iYJFmywRhEyCIuEZwUXqq7Hxb+M60QYOtlsaZa3BT7PazuZxisP3VkA3/MX79a8QHH5574iWtfbZ2RDRUBDVA5HPzsbvvw6LaMZraLGodu9YdEzPhsRrBCIq985FLDKpto8mKY4WD+VWQymlXWVjpydshaiuILpcEKGxjSkfLE4VwaSqIOq5aioQ40w1IMRUEUEjgrctXkaqEZFDi1lccL1fGd5s94RKRLMMJZSTHrBGcEfiMxJ3Ne5HeYhg7CX03vgsVUZGiuesLBJqSrzUcNxgFBxHMGA2gVeRAjFkFOkJmCqSebekqzeTyrDmQ182IV8NEJtQNtytc+irBn5rwUHLqMJEvSGJlitCCCr2BsVRNFzyGdklcEQcHwAZop58SRmqEt2aZ3iJpChMuyJqlPC1CQRs51RDm08RdIAAhpzD6dCpvPpjNJ2hh5NyhvCFb5DIq0F83NKd/VY2LlWkXHFXjlTTfU1qlzNLC+OTs8Tev0JElHfZQkpkaT0GNEiVWJ8oqIjm8vdQ2GR7bAFrsGphbZHYQnthC5orm8y1fOCy9Fhy2NDyANVYr3IfGB6MXOM+Rdc+GZ48venLxG8+M46g9y734bl7wTiazlZ+hKZ1xPBFb/sA99D0t/cafrnQ3sq50sJb2+FTefOz804/50DC+++MPDeOTe+XD68GeJGXA6/ff4bJ+OfHt2edj+7ff9T59Ptz47TyD0dpv5fjoIC3AAAAAElFTkSuQmCC", Pr = (a) => a.groups ? /* @__PURE__ */ e("div", { style: { display: "flex" }, children: a.groups.slice().sort((t, n) => (t.group?.name ?? "").localeCompare(n.group?.name ?? "")).map((t, n) => /* @__PURE__ */ e("div", { style: { paddingRight: "2px" }, children: /* @__PURE__ */ e(Q, { color: "blue", children: t.group?.name }) }, n)) }) : null, Fr = (a) => a.profile ? /* @__PURE__ */ e(Q, { color: "green", children: a.profile?.name }) : null, Dr = (a) => /* @__PURE__ */ r(Ie, { children: [
|
|
851
851
|
/* @__PURE__ */ e(
|
|
852
|
-
|
|
852
|
+
$,
|
|
853
853
|
{
|
|
854
854
|
dataField: "user.avatar",
|
|
855
855
|
dataType: "image",
|
|
@@ -859,7 +859,7 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
859
859
|
"img",
|
|
860
860
|
{
|
|
861
861
|
style: { borderRadius: 50, height: "32px", maxHeight: "32px" },
|
|
862
|
-
src: t.row.user && t.row.user.avatar ? atob(t.row.user.avatar) :
|
|
862
|
+
src: t.row.user && t.row.user.avatar ? atob(t.row.user.avatar) : sa
|
|
863
863
|
}
|
|
864
864
|
),
|
|
865
865
|
inputFilterType: "text",
|
|
@@ -868,7 +868,7 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
868
868
|
}
|
|
869
869
|
),
|
|
870
870
|
/* @__PURE__ */ e(
|
|
871
|
-
|
|
871
|
+
$,
|
|
872
872
|
{
|
|
873
873
|
dataField: "user.userName",
|
|
874
874
|
dataType: "text",
|
|
@@ -878,7 +878,7 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
878
878
|
}
|
|
879
879
|
),
|
|
880
880
|
/* @__PURE__ */ e(
|
|
881
|
-
|
|
881
|
+
$,
|
|
882
882
|
{
|
|
883
883
|
dataField: "user.email",
|
|
884
884
|
dataType: "text",
|
|
@@ -888,18 +888,18 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
888
888
|
}
|
|
889
889
|
),
|
|
890
890
|
/* @__PURE__ */ e(
|
|
891
|
-
|
|
891
|
+
$,
|
|
892
892
|
{
|
|
893
893
|
dataField: "expirationDate",
|
|
894
894
|
dataType: "text",
|
|
895
895
|
size: 300,
|
|
896
896
|
header: `${a("archbase:Expira em")}`,
|
|
897
|
-
render: (t) => /* @__PURE__ */ e(
|
|
897
|
+
render: (t) => /* @__PURE__ */ e(h, { size: "sm", children: t.row.expirationDate }),
|
|
898
898
|
inputFilterType: "text"
|
|
899
899
|
}
|
|
900
900
|
),
|
|
901
901
|
/* @__PURE__ */ e(
|
|
902
|
-
|
|
902
|
+
$,
|
|
903
903
|
{
|
|
904
904
|
dataField: "revoked",
|
|
905
905
|
dataType: "boolean",
|
|
@@ -908,7 +908,7 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
908
908
|
}
|
|
909
909
|
),
|
|
910
910
|
/* @__PURE__ */ e(
|
|
911
|
-
|
|
911
|
+
$,
|
|
912
912
|
{
|
|
913
913
|
dataField: "expired",
|
|
914
914
|
dataType: "boolean",
|
|
@@ -917,7 +917,7 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
917
917
|
}
|
|
918
918
|
),
|
|
919
919
|
/* @__PURE__ */ e(
|
|
920
|
-
|
|
920
|
+
$,
|
|
921
921
|
{
|
|
922
922
|
dataField: "token",
|
|
923
923
|
dataType: "text",
|
|
@@ -926,9 +926,9 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
926
926
|
inputFilterType: "text"
|
|
927
927
|
}
|
|
928
928
|
)
|
|
929
|
-
] }),
|
|
929
|
+
] }), Nr = (a) => /* @__PURE__ */ r(Ie, { children: [
|
|
930
930
|
/* @__PURE__ */ e(
|
|
931
|
-
|
|
931
|
+
$,
|
|
932
932
|
{
|
|
933
933
|
dataField: "avatar",
|
|
934
934
|
dataType: "image",
|
|
@@ -938,7 +938,7 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
938
938
|
"img",
|
|
939
939
|
{
|
|
940
940
|
style: { borderRadius: 50, height: "32px", maxHeight: "32px" },
|
|
941
|
-
src: t.row.avatar ? atob(t.row.avatar) :
|
|
941
|
+
src: t.row.avatar ? atob(t.row.avatar) : sa
|
|
942
942
|
}
|
|
943
943
|
),
|
|
944
944
|
enableSorting: !1,
|
|
@@ -949,7 +949,7 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
949
949
|
}
|
|
950
950
|
),
|
|
951
951
|
/* @__PURE__ */ e(
|
|
952
|
-
|
|
952
|
+
$,
|
|
953
953
|
{
|
|
954
954
|
dataField: "name",
|
|
955
955
|
dataType: "text",
|
|
@@ -960,7 +960,7 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
960
960
|
}
|
|
961
961
|
),
|
|
962
962
|
/* @__PURE__ */ e(
|
|
963
|
-
|
|
963
|
+
$,
|
|
964
964
|
{
|
|
965
965
|
dataField: "nickname",
|
|
966
966
|
dataType: "text",
|
|
@@ -971,7 +971,7 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
971
971
|
}
|
|
972
972
|
),
|
|
973
973
|
/* @__PURE__ */ e(
|
|
974
|
-
|
|
974
|
+
$,
|
|
975
975
|
{
|
|
976
976
|
dataField: "email",
|
|
977
977
|
dataType: "text",
|
|
@@ -982,7 +982,7 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
982
982
|
}
|
|
983
983
|
),
|
|
984
984
|
/* @__PURE__ */ e(
|
|
985
|
-
|
|
985
|
+
$,
|
|
986
986
|
{
|
|
987
987
|
dataField: "accountDeactivated",
|
|
988
988
|
dataType: "boolean",
|
|
@@ -992,32 +992,32 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
992
992
|
}
|
|
993
993
|
),
|
|
994
994
|
/* @__PURE__ */ e(
|
|
995
|
-
|
|
995
|
+
$,
|
|
996
996
|
{
|
|
997
997
|
dataField: "profile.name",
|
|
998
998
|
dataType: "text",
|
|
999
999
|
header: `${a("archbase:Perfil")}`,
|
|
1000
1000
|
size: 200,
|
|
1001
|
-
render: (t) =>
|
|
1001
|
+
render: (t) => Fr(t.row),
|
|
1002
1002
|
inputFilterType: "text"
|
|
1003
1003
|
}
|
|
1004
1004
|
),
|
|
1005
1005
|
/* @__PURE__ */ e(
|
|
1006
|
-
|
|
1006
|
+
$,
|
|
1007
1007
|
{
|
|
1008
1008
|
dataField: "groups",
|
|
1009
1009
|
dataType: "text",
|
|
1010
1010
|
size: 300,
|
|
1011
1011
|
header: `${a("archbase:Grupos")}`,
|
|
1012
|
-
render: (t) =>
|
|
1013
|
-
exportValue: (t) => t.groups?.slice().sort((
|
|
1012
|
+
render: (t) => Pr(t.row),
|
|
1013
|
+
exportValue: (t) => t.groups?.slice().sort((n, s) => (n.group?.name ?? "").localeCompare(s.group?.name ?? "")).map((n) => n.group?.name).filter(Boolean).join(", ") || "",
|
|
1014
1014
|
enableSorting: !1,
|
|
1015
1015
|
enableColumnFilter: !1,
|
|
1016
1016
|
enableGlobalFilter: !1
|
|
1017
1017
|
}
|
|
1018
1018
|
),
|
|
1019
1019
|
/* @__PURE__ */ e(
|
|
1020
|
-
|
|
1020
|
+
$,
|
|
1021
1021
|
{
|
|
1022
1022
|
dataField: "isAdministrator",
|
|
1023
1023
|
dataType: "boolean",
|
|
@@ -1026,7 +1026,7 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
1026
1026
|
}
|
|
1027
1027
|
),
|
|
1028
1028
|
/* @__PURE__ */ e(
|
|
1029
|
-
|
|
1029
|
+
$,
|
|
1030
1030
|
{
|
|
1031
1031
|
dataField: "changePasswordOnNextLogin",
|
|
1032
1032
|
dataType: "boolean",
|
|
@@ -1036,7 +1036,7 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
1036
1036
|
}
|
|
1037
1037
|
),
|
|
1038
1038
|
/* @__PURE__ */ e(
|
|
1039
|
-
|
|
1039
|
+
$,
|
|
1040
1040
|
{
|
|
1041
1041
|
dataField: "allowPasswordChange",
|
|
1042
1042
|
dataType: "boolean",
|
|
@@ -1046,7 +1046,7 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
1046
1046
|
}
|
|
1047
1047
|
),
|
|
1048
1048
|
/* @__PURE__ */ e(
|
|
1049
|
-
|
|
1049
|
+
$,
|
|
1050
1050
|
{
|
|
1051
1051
|
dataField: "allowMultipleLogins",
|
|
1052
1052
|
dataType: "boolean",
|
|
@@ -1056,7 +1056,7 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
1056
1056
|
}
|
|
1057
1057
|
),
|
|
1058
1058
|
/* @__PURE__ */ e(
|
|
1059
|
-
|
|
1059
|
+
$,
|
|
1060
1060
|
{
|
|
1061
1061
|
dataField: "passwordNeverExpires",
|
|
1062
1062
|
dataType: "boolean",
|
|
@@ -1066,7 +1066,7 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
1066
1066
|
}
|
|
1067
1067
|
),
|
|
1068
1068
|
/* @__PURE__ */ e(
|
|
1069
|
-
|
|
1069
|
+
$,
|
|
1070
1070
|
{
|
|
1071
1071
|
dataField: "passwordChangedAt",
|
|
1072
1072
|
dataType: "datetime",
|
|
@@ -1076,7 +1076,7 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
1076
1076
|
}
|
|
1077
1077
|
),
|
|
1078
1078
|
/* @__PURE__ */ e(
|
|
1079
|
-
|
|
1079
|
+
$,
|
|
1080
1080
|
{
|
|
1081
1081
|
dataField: "accountLocked",
|
|
1082
1082
|
dataType: "boolean",
|
|
@@ -1086,7 +1086,7 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
1086
1086
|
}
|
|
1087
1087
|
),
|
|
1088
1088
|
/* @__PURE__ */ e(
|
|
1089
|
-
|
|
1089
|
+
$,
|
|
1090
1090
|
{
|
|
1091
1091
|
dataField: "unlimitedAccessHours",
|
|
1092
1092
|
dataType: "boolean",
|
|
@@ -1095,9 +1095,9 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
1095
1095
|
size: 140
|
|
1096
1096
|
}
|
|
1097
1097
|
)
|
|
1098
|
-
] }),
|
|
1098
|
+
] }), Or = (a) => /* @__PURE__ */ r(Ie, { children: [
|
|
1099
1099
|
/* @__PURE__ */ e(
|
|
1100
|
-
|
|
1100
|
+
$,
|
|
1101
1101
|
{
|
|
1102
1102
|
dataField: "name",
|
|
1103
1103
|
dataType: "text",
|
|
@@ -1107,7 +1107,7 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
1107
1107
|
}
|
|
1108
1108
|
),
|
|
1109
1109
|
/* @__PURE__ */ e(
|
|
1110
|
-
|
|
1110
|
+
$,
|
|
1111
1111
|
{
|
|
1112
1112
|
dataField: "description",
|
|
1113
1113
|
dataType: "text",
|
|
@@ -1116,9 +1116,9 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
1116
1116
|
inputFilterType: "text"
|
|
1117
1117
|
}
|
|
1118
1118
|
)
|
|
1119
|
-
] }),
|
|
1119
|
+
] }), $r = (a) => /* @__PURE__ */ r(Ie, { children: [
|
|
1120
1120
|
/* @__PURE__ */ e(
|
|
1121
|
-
|
|
1121
|
+
$,
|
|
1122
1122
|
{
|
|
1123
1123
|
dataField: "name",
|
|
1124
1124
|
dataType: "text",
|
|
@@ -1128,7 +1128,7 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
1128
1128
|
}
|
|
1129
1129
|
),
|
|
1130
1130
|
/* @__PURE__ */ e(
|
|
1131
|
-
|
|
1131
|
+
$,
|
|
1132
1132
|
{
|
|
1133
1133
|
dataField: "description",
|
|
1134
1134
|
dataType: "text",
|
|
@@ -1137,9 +1137,9 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
1137
1137
|
inputFilterType: "text"
|
|
1138
1138
|
}
|
|
1139
1139
|
)
|
|
1140
|
-
] }),
|
|
1140
|
+
] }), Lr = (a) => /* @__PURE__ */ r(Ie, { children: [
|
|
1141
1141
|
/* @__PURE__ */ e(
|
|
1142
|
-
|
|
1142
|
+
$,
|
|
1143
1143
|
{
|
|
1144
1144
|
dataField: "name",
|
|
1145
1145
|
dataType: "text",
|
|
@@ -1149,7 +1149,7 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
1149
1149
|
}
|
|
1150
1150
|
),
|
|
1151
1151
|
/* @__PURE__ */ e(
|
|
1152
|
-
|
|
1152
|
+
$,
|
|
1153
1153
|
{
|
|
1154
1154
|
dataField: "description",
|
|
1155
1155
|
dataType: "text",
|
|
@@ -1159,23 +1159,23 @@ const ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABMCAMAAAD5ogFjAA
|
|
|
1159
1159
|
}
|
|
1160
1160
|
)
|
|
1161
1161
|
] });
|
|
1162
|
-
function
|
|
1162
|
+
function Pe({
|
|
1163
1163
|
active: a,
|
|
1164
1164
|
printTitle: t,
|
|
1165
|
-
gridRef:
|
|
1166
|
-
dataSource:
|
|
1167
|
-
isLoading:
|
|
1168
|
-
error:
|
|
1165
|
+
gridRef: n,
|
|
1166
|
+
dataSource: s,
|
|
1167
|
+
isLoading: d,
|
|
1168
|
+
error: u,
|
|
1169
1169
|
getRowId: c,
|
|
1170
|
-
striped:
|
|
1171
|
-
enableRowActions:
|
|
1172
|
-
toolbarLeftContent:
|
|
1173
|
-
renderRowActions:
|
|
1174
|
-
actionsColumnWidth:
|
|
1175
|
-
children:
|
|
1170
|
+
striped: T = !1,
|
|
1171
|
+
enableRowActions: R = !0,
|
|
1172
|
+
toolbarLeftContent: m,
|
|
1173
|
+
renderRowActions: S,
|
|
1174
|
+
actionsColumnWidth: A,
|
|
1175
|
+
children: w
|
|
1176
1176
|
}) {
|
|
1177
1177
|
return /* @__PURE__ */ e(
|
|
1178
|
-
|
|
1178
|
+
re,
|
|
1179
1179
|
{
|
|
1180
1180
|
withBorder: !0,
|
|
1181
1181
|
mt: "md",
|
|
@@ -1187,62 +1187,62 @@ function ze({
|
|
|
1187
1187
|
overflow: "auto"
|
|
1188
1188
|
},
|
|
1189
1189
|
children: /* @__PURE__ */ e(
|
|
1190
|
-
|
|
1190
|
+
za,
|
|
1191
1191
|
{
|
|
1192
|
-
gridRef:
|
|
1192
|
+
gridRef: n,
|
|
1193
1193
|
printTitle: t,
|
|
1194
1194
|
width: "100%",
|
|
1195
1195
|
height: "100%",
|
|
1196
1196
|
withBorder: !1,
|
|
1197
|
-
dataSource:
|
|
1197
|
+
dataSource: s,
|
|
1198
1198
|
withColumnBorders: !0,
|
|
1199
|
-
striped:
|
|
1199
|
+
striped: T,
|
|
1200
1200
|
enableTopToolbar: !0,
|
|
1201
|
-
enableRowActions:
|
|
1201
|
+
enableRowActions: R,
|
|
1202
1202
|
pageSize: 50,
|
|
1203
|
-
isLoading:
|
|
1204
|
-
isError: !!
|
|
1205
|
-
error:
|
|
1203
|
+
isLoading: d,
|
|
1204
|
+
isError: !!u,
|
|
1205
|
+
error: u,
|
|
1206
1206
|
enableGlobalFilter: !0,
|
|
1207
1207
|
getRowId: c,
|
|
1208
|
-
toolbarLeftContent:
|
|
1209
|
-
renderRowActions:
|
|
1210
|
-
actionsColumnWidth:
|
|
1211
|
-
children:
|
|
1208
|
+
toolbarLeftContent: m,
|
|
1209
|
+
renderRowActions: S,
|
|
1210
|
+
actionsColumnWidth: A,
|
|
1211
|
+
children: w
|
|
1212
1212
|
}
|
|
1213
1213
|
)
|
|
1214
1214
|
}
|
|
1215
1215
|
);
|
|
1216
1216
|
}
|
|
1217
|
-
function
|
|
1217
|
+
function Ye({
|
|
1218
1218
|
dataSource: a,
|
|
1219
1219
|
securityType: t,
|
|
1220
|
-
newInstance:
|
|
1221
|
-
createEntitiesWithId:
|
|
1222
|
-
removeMessageKey:
|
|
1223
|
-
setOpenedModal:
|
|
1220
|
+
newInstance: n,
|
|
1221
|
+
createEntitiesWithId: s,
|
|
1222
|
+
removeMessageKey: d,
|
|
1223
|
+
setOpenedModal: u,
|
|
1224
1224
|
setOpenedPermissionsModal: c,
|
|
1225
|
-
validationContext:
|
|
1226
|
-
t:
|
|
1225
|
+
validationContext: T,
|
|
1226
|
+
t: R
|
|
1227
1227
|
}) {
|
|
1228
|
-
const
|
|
1228
|
+
const m = a, S = (p) => m.isEmpty() ? null : m.gotoRecordByData(p) ?? null;
|
|
1229
1229
|
return {
|
|
1230
1230
|
handleAdd: () => {
|
|
1231
|
-
const
|
|
1232
|
-
|
|
1231
|
+
const p = n();
|
|
1232
|
+
s || (p.id = void 0), m.insert(p), u(t);
|
|
1233
1233
|
},
|
|
1234
|
-
handleViewRow: (
|
|
1235
|
-
|
|
1234
|
+
handleViewRow: (p) => {
|
|
1235
|
+
S(p) && u(t);
|
|
1236
1236
|
},
|
|
1237
|
-
handleEditRow: (
|
|
1238
|
-
|
|
1237
|
+
handleEditRow: (p) => {
|
|
1238
|
+
S(p) && (m.isEditing() || m.edit(), u(t));
|
|
1239
1239
|
},
|
|
1240
|
-
handleRemoveRow: (
|
|
1241
|
-
|
|
1242
|
-
`${
|
|
1243
|
-
`${
|
|
1240
|
+
handleRemoveRow: (p) => {
|
|
1241
|
+
S(p) && pe.showConfirmDialogYesNo(
|
|
1242
|
+
`${R("archbase:Confirme")}`,
|
|
1243
|
+
`${R(d)}${p.name} ?`,
|
|
1244
1244
|
() => {
|
|
1245
|
-
|
|
1245
|
+
m.remove();
|
|
1246
1246
|
},
|
|
1247
1247
|
() => {
|
|
1248
1248
|
}
|
|
@@ -1250,428 +1250,428 @@ function Qe({
|
|
|
1250
1250
|
},
|
|
1251
1251
|
handleSaveModal: async () => {
|
|
1252
1252
|
try {
|
|
1253
|
-
await
|
|
1253
|
+
await m.save();
|
|
1254
1254
|
} catch {
|
|
1255
1255
|
return;
|
|
1256
1256
|
}
|
|
1257
|
-
|
|
1257
|
+
u(""), T?.clearAll();
|
|
1258
1258
|
},
|
|
1259
1259
|
handleCancelModal: () => {
|
|
1260
|
-
|
|
1260
|
+
u(""), m.isBrowsing() || m.cancel(), T?.clearAll();
|
|
1261
1261
|
},
|
|
1262
1262
|
handleOpenPermissionsModal: () => {
|
|
1263
1263
|
c(t);
|
|
1264
1264
|
}
|
|
1265
1265
|
};
|
|
1266
1266
|
}
|
|
1267
|
-
function
|
|
1267
|
+
function _e({
|
|
1268
1268
|
row: a,
|
|
1269
1269
|
onView: t,
|
|
1270
|
-
onEdit:
|
|
1271
|
-
onRemove:
|
|
1272
|
-
onEditPermissions:
|
|
1273
|
-
before:
|
|
1270
|
+
onEdit: n,
|
|
1271
|
+
onRemove: s,
|
|
1272
|
+
onEditPermissions: d,
|
|
1273
|
+
before: u,
|
|
1274
1274
|
after: c,
|
|
1275
|
-
t:
|
|
1275
|
+
t: T
|
|
1276
1276
|
}) {
|
|
1277
|
-
const
|
|
1278
|
-
return /* @__PURE__ */ r(
|
|
1279
|
-
|
|
1280
|
-
/* @__PURE__ */ e(
|
|
1281
|
-
/* @__PURE__ */ e(
|
|
1282
|
-
/* @__PURE__ */ e(
|
|
1283
|
-
/* @__PURE__ */ e(
|
|
1277
|
+
const R = oa(), { colorScheme: m } = qe(), S = m === "dark", A = (w) => S ? R.colors[w][8] : R.colors[w][4];
|
|
1278
|
+
return /* @__PURE__ */ r(O, { gap: 1, wrap: "nowrap", children: [
|
|
1279
|
+
u?.(a),
|
|
1280
|
+
/* @__PURE__ */ e(me, { variant: "transparent", onClick: () => t(a), children: /* @__PURE__ */ e(hr, { size: 20, color: A("blue") }) }),
|
|
1281
|
+
/* @__PURE__ */ e(me, { variant: "transparent", onClick: () => n(a), children: /* @__PURE__ */ e(Pa, { size: 20, color: A("yellow") }) }),
|
|
1282
|
+
/* @__PURE__ */ e(me, { variant: "transparent", onClick: () => s(a), children: /* @__PURE__ */ e(na, { size: 20, color: A("red") }) }),
|
|
1283
|
+
/* @__PURE__ */ e(ke, { withinPortal: !0, withArrow: !0, position: "left", label: `${T("archbase:Edit permissions")}`, children: /* @__PURE__ */ e(me, { variant: "transparent", onClick: d, children: /* @__PURE__ */ e(pr, { size: 20, color: A("green") }) }) }),
|
|
1284
1284
|
c?.(a)
|
|
1285
1285
|
] });
|
|
1286
1286
|
}
|
|
1287
|
-
const
|
|
1288
|
-
/* @__PURE__ */ r(
|
|
1289
|
-
/* @__PURE__ */ e(
|
|
1290
|
-
/* @__PURE__ */ e(
|
|
1287
|
+
const ea = ({ onAdd: a, onEditPermissions: t, t: n }) => /* @__PURE__ */ r(Fe, { justify: "space-between", style: { width: "50%" }, children: [
|
|
1288
|
+
/* @__PURE__ */ r(O, { align: "end", gap: "4px", wrap: "nowrap", children: [
|
|
1289
|
+
/* @__PURE__ */ e(X, { color: "green", leftSection: /* @__PURE__ */ e(Fa, {}), onClick: a, children: `${n("archbase:New")}` }),
|
|
1290
|
+
/* @__PURE__ */ e(X, { color: "blue", leftSection: /* @__PURE__ */ e(Pa, {}), onClick: t, children: `${n("archbase:Edit permissions")}` })
|
|
1291
1291
|
] }),
|
|
1292
|
-
/* @__PURE__ */ e(
|
|
1292
|
+
/* @__PURE__ */ e(Fe, { align: "flex-start", justify: "flex-end", style: { width: "200px" } })
|
|
1293
1293
|
] });
|
|
1294
|
-
function
|
|
1294
|
+
function mt({
|
|
1295
1295
|
height: a = "400px",
|
|
1296
1296
|
width: t = "100%",
|
|
1297
|
-
createEntitiesWithId:
|
|
1298
|
-
userModalOptions:
|
|
1299
|
-
profileModalOptions:
|
|
1300
|
-
groupModalOptions:
|
|
1297
|
+
createEntitiesWithId: n = !0,
|
|
1298
|
+
userModalOptions: s,
|
|
1299
|
+
profileModalOptions: d,
|
|
1300
|
+
groupModalOptions: u,
|
|
1301
1301
|
options: c
|
|
1302
1302
|
}) {
|
|
1303
|
-
|
|
1304
|
-
const
|
|
1305
|
-
dataSource:
|
|
1306
|
-
isLoading:
|
|
1307
|
-
refreshData:
|
|
1308
|
-
} =
|
|
1303
|
+
oa(), ka("securityStore");
|
|
1304
|
+
const T = rr(), { colorScheme: R } = qe(), [m, S] = x(void 0), [A, w] = x("users"), E = J(K.User), v = J(K.Group), y = J(K.Resource), o = J(K.Profile), [l, p] = x(""), [b, L] = x(""), F = J(K.AccessToken), { t: i } = tr(), D = Re(null), P = Re(null), G = Re(null), f = Re(null), I = Re(null), N = (M) => M.id, ye = (M) => M.id, we = (M) => M.id, z = (M) => M.id, k = (M) => M.id, {
|
|
1305
|
+
dataSource: q,
|
|
1306
|
+
isLoading: U,
|
|
1307
|
+
refreshData: j
|
|
1308
|
+
} = Ee({
|
|
1309
1309
|
name: "accessTokenApi",
|
|
1310
|
-
service:
|
|
1311
|
-
validator:
|
|
1310
|
+
service: F,
|
|
1311
|
+
validator: T,
|
|
1312
1312
|
pageSize: 25,
|
|
1313
1313
|
defaultSortFields: ["user.email", "expirationTime:desc"],
|
|
1314
|
-
onError: (
|
|
1315
|
-
|
|
1314
|
+
onError: (M, te) => {
|
|
1315
|
+
S(M), oe.showError(`${i("archbase:WARNING")}`, M, te);
|
|
1316
1316
|
}
|
|
1317
1317
|
}), {
|
|
1318
|
-
dataSource:
|
|
1319
|
-
isLoading:
|
|
1320
|
-
refreshData:
|
|
1321
|
-
} =
|
|
1318
|
+
dataSource: B,
|
|
1319
|
+
isLoading: Z,
|
|
1320
|
+
refreshData: W
|
|
1321
|
+
} = Ee({
|
|
1322
1322
|
name: "dsUsers",
|
|
1323
|
-
service:
|
|
1324
|
-
validator:
|
|
1323
|
+
service: E,
|
|
1324
|
+
validator: T,
|
|
1325
1325
|
pageSize: 25,
|
|
1326
|
-
onError: (
|
|
1327
|
-
|
|
1326
|
+
onError: (M, te) => {
|
|
1327
|
+
S(M), oe.showError(`${i("archbase:WARNING")}`, M, te);
|
|
1328
1328
|
}
|
|
1329
1329
|
}), {
|
|
1330
|
-
dataSource:
|
|
1331
|
-
isLoading:
|
|
1332
|
-
refreshData:
|
|
1333
|
-
} =
|
|
1330
|
+
dataSource: le,
|
|
1331
|
+
isLoading: je,
|
|
1332
|
+
refreshData: Ze
|
|
1333
|
+
} = Ee({
|
|
1334
1334
|
name: "dsGroups",
|
|
1335
|
-
service:
|
|
1336
|
-
validator:
|
|
1335
|
+
service: v,
|
|
1336
|
+
validator: T,
|
|
1337
1337
|
pageSize: 25,
|
|
1338
|
-
onError: (
|
|
1339
|
-
|
|
1338
|
+
onError: (M, te) => {
|
|
1339
|
+
S(M), oe.showError(`${i("archbase:WARNING")}`, M, te);
|
|
1340
1340
|
}
|
|
1341
1341
|
}), {
|
|
1342
|
-
dataSource:
|
|
1343
|
-
isLoading:
|
|
1344
|
-
refreshData:
|
|
1345
|
-
} =
|
|
1342
|
+
dataSource: Le,
|
|
1343
|
+
isLoading: Na,
|
|
1344
|
+
refreshData: Oa
|
|
1345
|
+
} = Ee({
|
|
1346
1346
|
name: "dsProfile",
|
|
1347
|
-
service:
|
|
1348
|
-
validator:
|
|
1347
|
+
service: o,
|
|
1348
|
+
validator: T,
|
|
1349
1349
|
pageSize: 25,
|
|
1350
|
-
onError: (
|
|
1351
|
-
|
|
1350
|
+
onError: (M, te) => {
|
|
1351
|
+
S(M), oe.showError(`${i("archbase:WARNING")}`, M, te);
|
|
1352
1352
|
}
|
|
1353
1353
|
}), {
|
|
1354
|
-
dataSource:
|
|
1355
|
-
isLoading:
|
|
1356
|
-
refreshData:
|
|
1357
|
-
} =
|
|
1354
|
+
dataSource: $a,
|
|
1355
|
+
isLoading: La,
|
|
1356
|
+
refreshData: Ma
|
|
1357
|
+
} = Ee({
|
|
1358
1358
|
name: "dsResources",
|
|
1359
|
-
service:
|
|
1360
|
-
validator:
|
|
1359
|
+
service: y,
|
|
1360
|
+
validator: T,
|
|
1361
1361
|
pageSize: 25,
|
|
1362
|
-
onError: (
|
|
1363
|
-
|
|
1362
|
+
onError: (M, te) => {
|
|
1363
|
+
S(M), oe.showError(`${i("archbase:WARNING")}`, M, te);
|
|
1364
1364
|
}
|
|
1365
1365
|
});
|
|
1366
1366
|
ee(() => {
|
|
1367
|
-
|
|
1367
|
+
j({ filter: Ge(De.eq("revoked", "false")) }), W(), Ze(), Oa(), Ma();
|
|
1368
1368
|
}, []);
|
|
1369
|
-
const
|
|
1370
|
-
dataSource:
|
|
1371
|
-
securityType:
|
|
1372
|
-
newInstance: () =>
|
|
1373
|
-
createEntitiesWithId:
|
|
1369
|
+
const Va = Dr(i), Ga = Nr(i), Ua = Or(i), Ba = $r(i), Wa = Lr(i), Qe = ir(), de = Ye({
|
|
1370
|
+
dataSource: B,
|
|
1371
|
+
securityType: Y.USER,
|
|
1372
|
+
newInstance: () => mr.newInstance(),
|
|
1373
|
+
createEntitiesWithId: n,
|
|
1374
1374
|
removeMessageKey: "archbase:Deseja remover o usuário ",
|
|
1375
|
-
setOpenedModal:
|
|
1376
|
-
setOpenedPermissionsModal:
|
|
1377
|
-
validationContext:
|
|
1378
|
-
t:
|
|
1379
|
-
}),
|
|
1380
|
-
dataSource:
|
|
1381
|
-
securityType:
|
|
1382
|
-
newInstance: () =>
|
|
1383
|
-
createEntitiesWithId:
|
|
1375
|
+
setOpenedModal: p,
|
|
1376
|
+
setOpenedPermissionsModal: L,
|
|
1377
|
+
validationContext: Qe,
|
|
1378
|
+
t: i
|
|
1379
|
+
}), ue = Ye({
|
|
1380
|
+
dataSource: le,
|
|
1381
|
+
securityType: Y.GROUP,
|
|
1382
|
+
newInstance: () => gr.newInstance(),
|
|
1383
|
+
createEntitiesWithId: n,
|
|
1384
1384
|
removeMessageKey: "archbase:Deseja remover o grupo ",
|
|
1385
|
-
setOpenedModal:
|
|
1386
|
-
setOpenedPermissionsModal:
|
|
1387
|
-
validationContext:
|
|
1388
|
-
t:
|
|
1389
|
-
}),
|
|
1390
|
-
dataSource:
|
|
1391
|
-
securityType:
|
|
1392
|
-
newInstance: () =>
|
|
1393
|
-
createEntitiesWithId:
|
|
1385
|
+
setOpenedModal: p,
|
|
1386
|
+
setOpenedPermissionsModal: L,
|
|
1387
|
+
validationContext: Qe,
|
|
1388
|
+
t: i
|
|
1389
|
+
}), he = Ye({
|
|
1390
|
+
dataSource: Le,
|
|
1391
|
+
securityType: Y.PROFILE,
|
|
1392
|
+
newInstance: () => fr.newInstance(),
|
|
1393
|
+
createEntitiesWithId: n,
|
|
1394
1394
|
removeMessageKey: "archbase:Deseja remover o perfil ",
|
|
1395
|
-
setOpenedModal:
|
|
1396
|
-
setOpenedPermissionsModal:
|
|
1397
|
-
validationContext:
|
|
1398
|
-
t:
|
|
1399
|
-
}),
|
|
1400
|
-
|
|
1401
|
-
{
|
|
1402
|
-
row: $,
|
|
1403
|
-
onView: ce.handleViewRow,
|
|
1404
|
-
onEdit: ce.handleEditRow,
|
|
1405
|
-
onRemove: ce.handleRemoveRow,
|
|
1406
|
-
onEditPermissions: ce.handleOpenPermissionsModal,
|
|
1407
|
-
before: c?.beforeDefaultUserActions,
|
|
1408
|
-
after: c?.afterDefaultUserActions,
|
|
1409
|
-
t: b
|
|
1410
|
-
}
|
|
1411
|
-
), Ma = ($) => /* @__PURE__ */ e(
|
|
1412
|
-
Je,
|
|
1395
|
+
setOpenedModal: p,
|
|
1396
|
+
setOpenedPermissionsModal: L,
|
|
1397
|
+
validationContext: Qe,
|
|
1398
|
+
t: i
|
|
1399
|
+
}), qa = (M) => /* @__PURE__ */ e(
|
|
1400
|
+
_e,
|
|
1413
1401
|
{
|
|
1414
|
-
row:
|
|
1402
|
+
row: M,
|
|
1415
1403
|
onView: de.handleViewRow,
|
|
1416
1404
|
onEdit: de.handleEditRow,
|
|
1417
1405
|
onRemove: de.handleRemoveRow,
|
|
1418
1406
|
onEditPermissions: de.handleOpenPermissionsModal,
|
|
1419
|
-
before: c?.
|
|
1420
|
-
after: c?.
|
|
1421
|
-
t:
|
|
1407
|
+
before: c?.beforeDefaultUserActions,
|
|
1408
|
+
after: c?.afterDefaultUserActions,
|
|
1409
|
+
t: i
|
|
1422
1410
|
}
|
|
1423
|
-
),
|
|
1424
|
-
|
|
1411
|
+
), Ha = (M) => /* @__PURE__ */ e(
|
|
1412
|
+
_e,
|
|
1425
1413
|
{
|
|
1426
|
-
row:
|
|
1414
|
+
row: M,
|
|
1427
1415
|
onView: ue.handleViewRow,
|
|
1428
1416
|
onEdit: ue.handleEditRow,
|
|
1429
1417
|
onRemove: ue.handleRemoveRow,
|
|
1430
1418
|
onEditPermissions: ue.handleOpenPermissionsModal,
|
|
1419
|
+
before: c?.beforeDefaultGroupActions,
|
|
1420
|
+
after: c?.afterDefaultGroupActions,
|
|
1421
|
+
t: i
|
|
1422
|
+
}
|
|
1423
|
+
), ja = (M) => /* @__PURE__ */ e(
|
|
1424
|
+
_e,
|
|
1425
|
+
{
|
|
1426
|
+
row: M,
|
|
1427
|
+
onView: he.handleViewRow,
|
|
1428
|
+
onEdit: he.handleEditRow,
|
|
1429
|
+
onRemove: he.handleRemoveRow,
|
|
1430
|
+
onEditPermissions: he.handleOpenPermissionsModal,
|
|
1431
1431
|
before: c?.beforeDefaultProfileActions,
|
|
1432
1432
|
after: c?.afterDefaultProfileActions,
|
|
1433
|
-
t:
|
|
1433
|
+
t: i
|
|
1434
1434
|
}
|
|
1435
|
-
),
|
|
1436
|
-
const
|
|
1437
|
-
|
|
1438
|
-
`${
|
|
1439
|
-
`${
|
|
1435
|
+
), Za = () => {
|
|
1436
|
+
const M = q.getCurrentRecord();
|
|
1437
|
+
M && pe.showConfirmDialogYesNo(
|
|
1438
|
+
`${i("archbase:Confirme")}`,
|
|
1439
|
+
`${i("archbase:Deseja revogar o token de Acesso do usuário ")}${M.user.name} ?`,
|
|
1440
1440
|
async () => {
|
|
1441
|
-
await
|
|
1442
|
-
|
|
1443
|
-
`${
|
|
1444
|
-
`${
|
|
1445
|
-
),
|
|
1446
|
-
}).catch((
|
|
1447
|
-
|
|
1448
|
-
`${
|
|
1449
|
-
ge(
|
|
1450
|
-
Ve(
|
|
1441
|
+
await F.revoke(M.token).then(async () => {
|
|
1442
|
+
oe.showSuccess(
|
|
1443
|
+
`${i("mentors:Informação")}`,
|
|
1444
|
+
`${i("mentors:Token de Acesso revogado com sucesso!")}`
|
|
1445
|
+
), q.refreshData();
|
|
1446
|
+
}).catch((te) => {
|
|
1447
|
+
pe.showErrorWithDetails(
|
|
1448
|
+
`${i("mentors:Atenção")}`,
|
|
1449
|
+
ge(te),
|
|
1450
|
+
Ve(te)
|
|
1451
1451
|
);
|
|
1452
1452
|
});
|
|
1453
1453
|
},
|
|
1454
1454
|
() => {
|
|
1455
1455
|
}
|
|
1456
1456
|
);
|
|
1457
|
-
},
|
|
1458
|
-
|
|
1459
|
-
},
|
|
1460
|
-
|
|
1457
|
+
}, Ke = () => {
|
|
1458
|
+
L("");
|
|
1459
|
+
}, Qa = () => /* @__PURE__ */ e(Fe, { justify: "space-between", style: { width: "50%" }, children: /* @__PURE__ */ e(O, { align: "start", gap: "4px", wrap: "nowrap", children: /* @__PURE__ */ e(
|
|
1460
|
+
X,
|
|
1461
1461
|
{
|
|
1462
|
-
disabled: !
|
|
1462
|
+
disabled: !q.getCurrentRecord(),
|
|
1463
1463
|
color: "red",
|
|
1464
|
-
leftSection: /* @__PURE__ */ e(
|
|
1465
|
-
onClick:
|
|
1466
|
-
children: `${
|
|
1464
|
+
leftSection: /* @__PURE__ */ e(na, {}),
|
|
1465
|
+
onClick: Za,
|
|
1466
|
+
children: `${i("archbase:Revoke")}`
|
|
1467
1467
|
}
|
|
1468
1468
|
) }) });
|
|
1469
|
-
return /* @__PURE__ */ r(
|
|
1470
|
-
/* @__PURE__ */ e(
|
|
1471
|
-
/* @__PURE__ */ e(
|
|
1472
|
-
/* @__PURE__ */ e(
|
|
1473
|
-
/* @__PURE__ */ e(
|
|
1474
|
-
/* @__PURE__ */ e(
|
|
1475
|
-
/* @__PURE__ */ e(
|
|
1469
|
+
return /* @__PURE__ */ r(re, { p: "md", style: { height: a, display: "flex", flexDirection: "column" }, children: [
|
|
1470
|
+
/* @__PURE__ */ e(Ce, { variant: "pills", value: A, onChange: w, children: /* @__PURE__ */ r(Ce.List, { children: [
|
|
1471
|
+
/* @__PURE__ */ e(Ce.Tab, { value: "users", children: `${i("Usuários")}` }),
|
|
1472
|
+
/* @__PURE__ */ e(Ce.Tab, { value: "groups", children: `${i("Grupos")}` }),
|
|
1473
|
+
/* @__PURE__ */ e(Ce.Tab, { value: "profiles", children: `${i("Perfis")}` }),
|
|
1474
|
+
/* @__PURE__ */ e(Ce.Tab, { value: "resources", children: `${i("Recursos")}` }),
|
|
1475
|
+
/* @__PURE__ */ e(Ce.Tab, { value: "accessTokens", children: `${i("Tokens Acesso")}` })
|
|
1476
1476
|
] }) }),
|
|
1477
1477
|
/* @__PURE__ */ e(
|
|
1478
|
-
|
|
1478
|
+
Pe,
|
|
1479
1479
|
{
|
|
1480
|
-
active:
|
|
1480
|
+
active: A === "users",
|
|
1481
1481
|
printTitle: "Usuários",
|
|
1482
|
-
gridRef:
|
|
1483
|
-
dataSource:
|
|
1484
|
-
isLoading:
|
|
1485
|
-
error:
|
|
1486
|
-
getRowId:
|
|
1482
|
+
gridRef: D,
|
|
1483
|
+
dataSource: B,
|
|
1484
|
+
isLoading: Z,
|
|
1485
|
+
error: m,
|
|
1486
|
+
getRowId: N,
|
|
1487
1487
|
striped: !0,
|
|
1488
1488
|
toolbarLeftContent: /* @__PURE__ */ e(
|
|
1489
|
-
|
|
1489
|
+
ea,
|
|
1490
1490
|
{
|
|
1491
|
-
onAdd:
|
|
1492
|
-
onEditPermissions:
|
|
1493
|
-
t:
|
|
1491
|
+
onAdd: de.handleAdd,
|
|
1492
|
+
onEditPermissions: de.handleOpenPermissionsModal,
|
|
1493
|
+
t: i
|
|
1494
1494
|
}
|
|
1495
1495
|
),
|
|
1496
|
-
renderRowActions:
|
|
1496
|
+
renderRowActions: qa,
|
|
1497
1497
|
actionsColumnWidth: c?.userActionsColumnWidth,
|
|
1498
|
-
children:
|
|
1498
|
+
children: Ga
|
|
1499
1499
|
}
|
|
1500
1500
|
),
|
|
1501
1501
|
/* @__PURE__ */ e(
|
|
1502
|
-
|
|
1502
|
+
Pe,
|
|
1503
1503
|
{
|
|
1504
|
-
active:
|
|
1504
|
+
active: A === "groups",
|
|
1505
1505
|
printTitle: "Grupos",
|
|
1506
|
-
gridRef:
|
|
1507
|
-
dataSource:
|
|
1508
|
-
isLoading:
|
|
1509
|
-
error:
|
|
1510
|
-
getRowId:
|
|
1506
|
+
gridRef: P,
|
|
1507
|
+
dataSource: le,
|
|
1508
|
+
isLoading: je,
|
|
1509
|
+
error: m,
|
|
1510
|
+
getRowId: ye,
|
|
1511
1511
|
toolbarLeftContent: /* @__PURE__ */ e(
|
|
1512
|
-
|
|
1512
|
+
ea,
|
|
1513
1513
|
{
|
|
1514
|
-
onAdd:
|
|
1515
|
-
onEditPermissions:
|
|
1516
|
-
t:
|
|
1514
|
+
onAdd: ue.handleAdd,
|
|
1515
|
+
onEditPermissions: ue.handleOpenPermissionsModal,
|
|
1516
|
+
t: i
|
|
1517
1517
|
}
|
|
1518
1518
|
),
|
|
1519
|
-
renderRowActions:
|
|
1519
|
+
renderRowActions: Ha,
|
|
1520
1520
|
actionsColumnWidth: c?.groupActionsColumnWidth,
|
|
1521
|
-
children:
|
|
1521
|
+
children: Ua
|
|
1522
1522
|
}
|
|
1523
1523
|
),
|
|
1524
1524
|
/* @__PURE__ */ e(
|
|
1525
|
-
|
|
1525
|
+
Pe,
|
|
1526
1526
|
{
|
|
1527
|
-
active:
|
|
1527
|
+
active: A === "profiles",
|
|
1528
1528
|
printTitle: "Perfis",
|
|
1529
|
-
gridRef:
|
|
1530
|
-
dataSource:
|
|
1531
|
-
isLoading:
|
|
1532
|
-
error:
|
|
1533
|
-
getRowId:
|
|
1529
|
+
gridRef: G,
|
|
1530
|
+
dataSource: Le,
|
|
1531
|
+
isLoading: Na,
|
|
1532
|
+
error: m,
|
|
1533
|
+
getRowId: we,
|
|
1534
1534
|
toolbarLeftContent: /* @__PURE__ */ e(
|
|
1535
|
-
|
|
1535
|
+
ea,
|
|
1536
1536
|
{
|
|
1537
|
-
onAdd:
|
|
1538
|
-
onEditPermissions:
|
|
1539
|
-
t:
|
|
1537
|
+
onAdd: he.handleAdd,
|
|
1538
|
+
onEditPermissions: he.handleOpenPermissionsModal,
|
|
1539
|
+
t: i
|
|
1540
1540
|
}
|
|
1541
1541
|
),
|
|
1542
|
-
renderRowActions:
|
|
1542
|
+
renderRowActions: ja,
|
|
1543
1543
|
actionsColumnWidth: c?.profileActionsColumnWidth,
|
|
1544
|
-
children:
|
|
1544
|
+
children: Ba
|
|
1545
1545
|
}
|
|
1546
1546
|
),
|
|
1547
1547
|
/* @__PURE__ */ e(
|
|
1548
|
-
|
|
1548
|
+
Pe,
|
|
1549
1549
|
{
|
|
1550
|
-
active:
|
|
1550
|
+
active: A === "resources",
|
|
1551
1551
|
printTitle: "Recursos",
|
|
1552
|
-
gridRef:
|
|
1553
|
-
dataSource:
|
|
1554
|
-
isLoading:
|
|
1555
|
-
error:
|
|
1556
|
-
getRowId:
|
|
1552
|
+
gridRef: f,
|
|
1553
|
+
dataSource: $a,
|
|
1554
|
+
isLoading: La,
|
|
1555
|
+
error: m,
|
|
1556
|
+
getRowId: z,
|
|
1557
1557
|
enableRowActions: !1,
|
|
1558
|
-
children:
|
|
1558
|
+
children: Wa
|
|
1559
1559
|
}
|
|
1560
1560
|
),
|
|
1561
1561
|
/* @__PURE__ */ e(
|
|
1562
|
-
|
|
1562
|
+
Pe,
|
|
1563
1563
|
{
|
|
1564
|
-
active:
|
|
1564
|
+
active: A === "accessTokens",
|
|
1565
1565
|
printTitle: "Tokens de API",
|
|
1566
|
-
gridRef:
|
|
1567
|
-
dataSource:
|
|
1568
|
-
isLoading:
|
|
1569
|
-
error:
|
|
1566
|
+
gridRef: I,
|
|
1567
|
+
dataSource: q,
|
|
1568
|
+
isLoading: U,
|
|
1569
|
+
error: m,
|
|
1570
1570
|
getRowId: k,
|
|
1571
1571
|
striped: !0,
|
|
1572
1572
|
enableRowActions: !1,
|
|
1573
|
-
toolbarLeftContent:
|
|
1574
|
-
children:
|
|
1573
|
+
toolbarLeftContent: Qa(),
|
|
1574
|
+
children: Va
|
|
1575
1575
|
}
|
|
1576
1576
|
),
|
|
1577
|
-
l ===
|
|
1578
|
-
|
|
1579
|
-
{
|
|
1580
|
-
onClickOk: ce.handleSaveModal,
|
|
1581
|
-
opened: !0,
|
|
1582
|
-
dataSource: M,
|
|
1583
|
-
onClickCancel: ce.handleCancelModal,
|
|
1584
|
-
options: i
|
|
1585
|
-
}
|
|
1586
|
-
) : null,
|
|
1587
|
-
l === X.GROUP ? /* @__PURE__ */ e(
|
|
1588
|
-
Cr,
|
|
1577
|
+
l === Y.USER ? /* @__PURE__ */ e(
|
|
1578
|
+
zr,
|
|
1589
1579
|
{
|
|
1590
1580
|
onClickOk: de.handleSaveModal,
|
|
1591
1581
|
opened: !0,
|
|
1592
|
-
dataSource:
|
|
1582
|
+
dataSource: B,
|
|
1593
1583
|
onClickCancel: de.handleCancelModal,
|
|
1594
|
-
options:
|
|
1584
|
+
options: s
|
|
1595
1585
|
}
|
|
1596
1586
|
) : null,
|
|
1597
|
-
l ===
|
|
1598
|
-
|
|
1587
|
+
l === Y.GROUP ? /* @__PURE__ */ e(
|
|
1588
|
+
kr,
|
|
1599
1589
|
{
|
|
1600
1590
|
onClickOk: ue.handleSaveModal,
|
|
1601
1591
|
opened: !0,
|
|
1602
|
-
dataSource:
|
|
1592
|
+
dataSource: le,
|
|
1603
1593
|
onClickCancel: ue.handleCancelModal,
|
|
1604
1594
|
options: u
|
|
1605
1595
|
}
|
|
1606
1596
|
) : null,
|
|
1607
|
-
|
|
1608
|
-
|
|
1597
|
+
l === Y.PROFILE ? /* @__PURE__ */ e(
|
|
1598
|
+
xr,
|
|
1599
|
+
{
|
|
1600
|
+
onClickOk: he.handleSaveModal,
|
|
1601
|
+
opened: !0,
|
|
1602
|
+
dataSource: Le,
|
|
1603
|
+
onClickCancel: he.handleCancelModal,
|
|
1604
|
+
options: d
|
|
1605
|
+
}
|
|
1606
|
+
) : null,
|
|
1607
|
+
b === Y.USER ? /* @__PURE__ */ e(
|
|
1608
|
+
Xe,
|
|
1609
1609
|
{
|
|
1610
|
-
dataSource:
|
|
1611
|
-
opened: !!
|
|
1612
|
-
close:
|
|
1610
|
+
dataSource: B,
|
|
1611
|
+
opened: !!b,
|
|
1612
|
+
close: Ke
|
|
1613
1613
|
}
|
|
1614
1614
|
) : null,
|
|
1615
|
-
|
|
1616
|
-
|
|
1615
|
+
b === Y.GROUP ? /* @__PURE__ */ e(
|
|
1616
|
+
Xe,
|
|
1617
1617
|
{
|
|
1618
|
-
dataSource:
|
|
1619
|
-
opened: !!
|
|
1620
|
-
close:
|
|
1618
|
+
dataSource: le,
|
|
1619
|
+
opened: !!b,
|
|
1620
|
+
close: Ke
|
|
1621
1621
|
}
|
|
1622
1622
|
) : null,
|
|
1623
|
-
|
|
1624
|
-
|
|
1623
|
+
b === Y.PROFILE ? /* @__PURE__ */ e(
|
|
1624
|
+
Xe,
|
|
1625
1625
|
{
|
|
1626
|
-
dataSource:
|
|
1627
|
-
opened: !!
|
|
1628
|
-
close:
|
|
1626
|
+
dataSource: Le,
|
|
1627
|
+
opened: !!b,
|
|
1628
|
+
close: Ke
|
|
1629
1629
|
}
|
|
1630
1630
|
) : null
|
|
1631
1631
|
] });
|
|
1632
1632
|
}
|
|
1633
|
-
function
|
|
1634
|
-
|
|
1635
|
-
const
|
|
1633
|
+
function gt({ height: a = "400px", width: t = "100%" }) {
|
|
1634
|
+
oa();
|
|
1635
|
+
const n = ka("apiTokenStore"), s = { validateEntity: () => [] }, { colorScheme: d } = qe(), [u, c] = x(void 0), T = J(K.ApiToken), [R, m] = x(""), S = Re(null), A = (P) => P.id, { dataSource: w } = dr({
|
|
1636
1636
|
initialData: [],
|
|
1637
1637
|
name: "dataSource"
|
|
1638
|
-
}),
|
|
1638
|
+
}), E = Ne(
|
|
1639
1639
|
"ArchbaseApiTokenView-LocalDataSource",
|
|
1640
|
-
|
|
1640
|
+
w,
|
|
1641
1641
|
void 0,
|
|
1642
1642
|
void 0
|
|
1643
|
-
), { dataSource:
|
|
1643
|
+
), { dataSource: v, isLoading: y } = ta({
|
|
1644
1644
|
name: "dsApiToken",
|
|
1645
|
-
service:
|
|
1646
|
-
store:
|
|
1647
|
-
validator:
|
|
1645
|
+
service: T,
|
|
1646
|
+
store: n,
|
|
1647
|
+
validator: s,
|
|
1648
1648
|
pageSize: 25,
|
|
1649
1649
|
loadOnStart: !0,
|
|
1650
|
-
onLoadComplete: (
|
|
1650
|
+
onLoadComplete: (P) => {
|
|
1651
1651
|
},
|
|
1652
|
-
onDestroy: (
|
|
1652
|
+
onDestroy: (P) => {
|
|
1653
1653
|
},
|
|
1654
|
-
onError: (
|
|
1655
|
-
c(
|
|
1654
|
+
onError: (P, G) => {
|
|
1655
|
+
c(P), oe.showError(g().t("archbase:WARNING"), P, G);
|
|
1656
1656
|
}
|
|
1657
|
-
}),
|
|
1657
|
+
}), o = Ne(
|
|
1658
1658
|
"ArchbaseApiTokenView-RemoteDataSource",
|
|
1659
|
-
|
|
1659
|
+
v,
|
|
1660
1660
|
void 0,
|
|
1661
1661
|
void 0
|
|
1662
|
-
), l = `calc(${a} - 40px)`,
|
|
1662
|
+
), l = `calc(${a} - 40px)`, p = /* @__PURE__ */ r(Ie, { children: [
|
|
1663
1663
|
/* @__PURE__ */ e(
|
|
1664
|
-
|
|
1664
|
+
$,
|
|
1665
1665
|
{
|
|
1666
1666
|
dataField: "user.avatar",
|
|
1667
1667
|
dataType: "image",
|
|
1668
1668
|
size: 80,
|
|
1669
1669
|
header: "Foto",
|
|
1670
|
-
render: (
|
|
1670
|
+
render: (P) => /* @__PURE__ */ e(
|
|
1671
1671
|
"img",
|
|
1672
1672
|
{
|
|
1673
1673
|
style: { borderRadius: 50, height: "32px", maxHeight: "32px" },
|
|
1674
|
-
src:
|
|
1674
|
+
src: P.row.user && P.row.user.avatar ? atob(P.row.user.avatar) : sa
|
|
1675
1675
|
}
|
|
1676
1676
|
),
|
|
1677
1677
|
inputFilterType: "text",
|
|
@@ -1679,7 +1679,7 @@ function nt({ height: a = "400px", width: t = "100%" }) {
|
|
|
1679
1679
|
}
|
|
1680
1680
|
),
|
|
1681
1681
|
/* @__PURE__ */ e(
|
|
1682
|
-
|
|
1682
|
+
$,
|
|
1683
1683
|
{
|
|
1684
1684
|
dataField: "user.userName",
|
|
1685
1685
|
dataType: "text",
|
|
@@ -1689,7 +1689,7 @@ function nt({ height: a = "400px", width: t = "100%" }) {
|
|
|
1689
1689
|
}
|
|
1690
1690
|
),
|
|
1691
1691
|
/* @__PURE__ */ e(
|
|
1692
|
-
|
|
1692
|
+
$,
|
|
1693
1693
|
{
|
|
1694
1694
|
dataField: "user.email",
|
|
1695
1695
|
dataType: "text",
|
|
@@ -1699,7 +1699,7 @@ function nt({ height: a = "400px", width: t = "100%" }) {
|
|
|
1699
1699
|
}
|
|
1700
1700
|
),
|
|
1701
1701
|
/* @__PURE__ */ e(
|
|
1702
|
-
|
|
1702
|
+
$,
|
|
1703
1703
|
{
|
|
1704
1704
|
dataField: "name",
|
|
1705
1705
|
dataType: "text",
|
|
@@ -1709,7 +1709,7 @@ function nt({ height: a = "400px", width: t = "100%" }) {
|
|
|
1709
1709
|
}
|
|
1710
1710
|
),
|
|
1711
1711
|
/* @__PURE__ */ e(
|
|
1712
|
-
|
|
1712
|
+
$,
|
|
1713
1713
|
{
|
|
1714
1714
|
dataField: "description",
|
|
1715
1715
|
dataType: "text",
|
|
@@ -1719,7 +1719,7 @@ function nt({ height: a = "400px", width: t = "100%" }) {
|
|
|
1719
1719
|
}
|
|
1720
1720
|
),
|
|
1721
1721
|
/* @__PURE__ */ e(
|
|
1722
|
-
|
|
1722
|
+
$,
|
|
1723
1723
|
{
|
|
1724
1724
|
dataField: "token",
|
|
1725
1725
|
dataType: "text",
|
|
@@ -1730,7 +1730,7 @@ function nt({ height: a = "400px", width: t = "100%" }) {
|
|
|
1730
1730
|
}
|
|
1731
1731
|
),
|
|
1732
1732
|
/* @__PURE__ */ e(
|
|
1733
|
-
|
|
1733
|
+
$,
|
|
1734
1734
|
{
|
|
1735
1735
|
dataField: "tenantId",
|
|
1736
1736
|
dataType: "text",
|
|
@@ -1741,41 +1741,41 @@ function nt({ height: a = "400px", width: t = "100%" }) {
|
|
|
1741
1741
|
}
|
|
1742
1742
|
),
|
|
1743
1743
|
/* @__PURE__ */ e(
|
|
1744
|
-
|
|
1744
|
+
$,
|
|
1745
1745
|
{
|
|
1746
1746
|
dataField: "expirationDate",
|
|
1747
1747
|
dataType: "text",
|
|
1748
1748
|
size: 240,
|
|
1749
1749
|
header: "Validade",
|
|
1750
|
-
render: (
|
|
1751
|
-
if (!
|
|
1752
|
-
return /* @__PURE__ */ e(
|
|
1753
|
-
const
|
|
1754
|
-
|
|
1755
|
-
const
|
|
1756
|
-
|
|
1757
|
-
const
|
|
1758
|
-
let
|
|
1759
|
-
|
|
1760
|
-
const
|
|
1761
|
-
return /* @__PURE__ */ e(
|
|
1750
|
+
render: (P) => {
|
|
1751
|
+
if (!P.row.expirationDate)
|
|
1752
|
+
return /* @__PURE__ */ e(h, { c: "dimmed", children: "Sem expiração" });
|
|
1753
|
+
const G = /* @__PURE__ */ new Date();
|
|
1754
|
+
G.setHours(0, 0, 0, 0);
|
|
1755
|
+
const f = new Date(P.row.expirationDate);
|
|
1756
|
+
f.setHours(0, 0, 0, 0);
|
|
1757
|
+
const I = f.getTime() - G.getTime(), N = Math.ceil(I / (1e3 * 60 * 60 * 24));
|
|
1758
|
+
let we = Math.max(0, Math.min(100, N / 365 * 100)), z = "green", k = "";
|
|
1759
|
+
N < 0 ? (z = "red", we = 100, k = `Vencido há ${Math.abs(N)} dia${Math.abs(N) !== 1 ? "s" : ""}`) : N === 0 ? (z = "red", we = 5, k = "Vence hoje") : N <= 7 ? (z = "red", k = `${N} dia${N !== 1 ? "s" : ""}`) : N <= 30 ? (z = "orange", k = `${N} dias`) : N <= 90 ? (z = "yellow", k = `${N} dias`) : (z = "green", k = `${N} dias`);
|
|
1760
|
+
const q = N < 0 ? `Vencido em ${f.toLocaleDateString()}` : `Expira em ${f.toLocaleDateString()}`;
|
|
1761
|
+
return /* @__PURE__ */ e(ke, { label: q, withArrow: !0, children: /* @__PURE__ */ r(O, { gap: "xs", wrap: "nowrap", children: [
|
|
1762
1762
|
/* @__PURE__ */ e(
|
|
1763
|
-
|
|
1763
|
+
Ka,
|
|
1764
1764
|
{
|
|
1765
1765
|
size: 36,
|
|
1766
1766
|
thickness: 4,
|
|
1767
1767
|
roundCaps: !0,
|
|
1768
|
-
sections: [{ value:
|
|
1768
|
+
sections: [{ value: N < 0 ? 100 : we, color: z }]
|
|
1769
1769
|
}
|
|
1770
1770
|
),
|
|
1771
|
-
/* @__PURE__ */ e(
|
|
1771
|
+
/* @__PURE__ */ e(h, { size: "sm", c: N < 0 ? "red" : void 0, fw: N <= 7 ? 600 : void 0, children: k })
|
|
1772
1772
|
] }) });
|
|
1773
1773
|
},
|
|
1774
1774
|
inputFilterType: "text"
|
|
1775
1775
|
}
|
|
1776
1776
|
),
|
|
1777
1777
|
/* @__PURE__ */ e(
|
|
1778
|
-
|
|
1778
|
+
$,
|
|
1779
1779
|
{
|
|
1780
1780
|
dataField: "activated",
|
|
1781
1781
|
dataType: "boolean",
|
|
@@ -1784,7 +1784,7 @@ function nt({ height: a = "400px", width: t = "100%" }) {
|
|
|
1784
1784
|
}
|
|
1785
1785
|
),
|
|
1786
1786
|
/* @__PURE__ */ e(
|
|
1787
|
-
|
|
1787
|
+
$,
|
|
1788
1788
|
{
|
|
1789
1789
|
dataField: "revoked",
|
|
1790
1790
|
dataType: "boolean",
|
|
@@ -1792,66 +1792,66 @@ function nt({ height: a = "400px", width: t = "100%" }) {
|
|
|
1792
1792
|
inputFilterType: "checkbox"
|
|
1793
1793
|
}
|
|
1794
1794
|
)
|
|
1795
|
-
] }),
|
|
1796
|
-
|
|
1797
|
-
},
|
|
1798
|
-
|
|
1795
|
+
] }), b = () => {
|
|
1796
|
+
w.insert(br.newInstance()), w && !E.isDataSourceV2 && E.v1State.forceUpdate(), m("apiToken");
|
|
1797
|
+
}, L = () => {
|
|
1798
|
+
v.getCurrentRecord() && pe.showConfirmDialogYesNo(
|
|
1799
1799
|
`${g().t("archbase:Confirme")}`,
|
|
1800
|
-
`${g().t("archbase:Deseja revogar o token de API do usuário ")}${
|
|
1800
|
+
`${g().t("archbase:Deseja revogar o token de API do usuário ")}${v.getCurrentRecord().user.name} ?`,
|
|
1801
1801
|
async () => {
|
|
1802
|
-
await
|
|
1803
|
-
|
|
1802
|
+
await T.revoke(v.getCurrentRecord().token).then(async () => {
|
|
1803
|
+
oe.showSuccess(
|
|
1804
1804
|
`${g().t("mentors:Informação")}`,
|
|
1805
1805
|
`${g().t("mentors:Token de API revogado com sucesso!")}`
|
|
1806
|
-
),
|
|
1807
|
-
}).catch((
|
|
1808
|
-
|
|
1806
|
+
), v.refreshData(), v && !o.isDataSourceV2 && o.v1State.forceUpdate();
|
|
1807
|
+
}).catch((P) => {
|
|
1808
|
+
pe.showErrorWithDetails(
|
|
1809
1809
|
`${g().t("mentors:Atenção")}`,
|
|
1810
|
-
ge(
|
|
1811
|
-
Ve(
|
|
1810
|
+
ge(P),
|
|
1811
|
+
Ve(P)
|
|
1812
1812
|
);
|
|
1813
1813
|
});
|
|
1814
1814
|
},
|
|
1815
1815
|
() => {
|
|
1816
1816
|
}
|
|
1817
1817
|
);
|
|
1818
|
-
},
|
|
1819
|
-
|
|
1820
|
-
},
|
|
1821
|
-
const
|
|
1822
|
-
if (
|
|
1818
|
+
}, F = () => {
|
|
1819
|
+
m("");
|
|
1820
|
+
}, i = async (P, G) => {
|
|
1821
|
+
const f = w.getCurrentRecord();
|
|
1822
|
+
if (f)
|
|
1823
1823
|
try {
|
|
1824
|
-
if (
|
|
1825
|
-
|
|
1824
|
+
if (w.validate(), !f.user || !f.user.email) {
|
|
1825
|
+
pe.showErrorWithDetails(
|
|
1826
1826
|
`${g().t("archbase:WARNING")}`,
|
|
1827
1827
|
`${g().t("archbase:Selecione um usuário para o token de API")}`,
|
|
1828
1828
|
""
|
|
1829
1829
|
);
|
|
1830
1830
|
return;
|
|
1831
1831
|
}
|
|
1832
|
-
await
|
|
1833
|
-
|
|
1832
|
+
await T.create(f.user.email, f.expirationDate, f.name, f.description).then(async (I) => {
|
|
1833
|
+
w.cancel(), w && !E.isDataSourceV2 && E.v1State.forceUpdate(), v.append(I), v && !o.isDataSourceV2 && o.v1State.forceUpdate(), oe.showSuccess(
|
|
1834
1834
|
`${g().t("mentors:Informação")}`,
|
|
1835
1835
|
`${g().t("mentors:Token de API gerado com sucesso!")}`
|
|
1836
|
-
),
|
|
1837
|
-
}).catch((
|
|
1838
|
-
|
|
1836
|
+
), G && G(!0);
|
|
1837
|
+
}).catch((I) => {
|
|
1838
|
+
pe.showErrorWithDetails(
|
|
1839
1839
|
`${g().t("mentors:Atenção")}`,
|
|
1840
|
-
ge(
|
|
1841
|
-
Ve(
|
|
1840
|
+
ge(I),
|
|
1841
|
+
Ve(I)
|
|
1842
1842
|
);
|
|
1843
1843
|
});
|
|
1844
|
-
} catch (
|
|
1845
|
-
|
|
1844
|
+
} catch (I) {
|
|
1845
|
+
pe.showErrorWithDetails(
|
|
1846
1846
|
`${g().t("mentors:Atenção")}`,
|
|
1847
|
-
ge(
|
|
1848
|
-
Ve(
|
|
1847
|
+
ge(I),
|
|
1848
|
+
Ve(I)
|
|
1849
1849
|
);
|
|
1850
1850
|
}
|
|
1851
1851
|
};
|
|
1852
|
-
return /* @__PURE__ */ r(
|
|
1852
|
+
return /* @__PURE__ */ r(re, { p: "md", style: { height: a, display: "flex", flexDirection: "column" }, children: [
|
|
1853
1853
|
/* @__PURE__ */ e(
|
|
1854
|
-
|
|
1854
|
+
re,
|
|
1855
1855
|
{
|
|
1856
1856
|
withBorder: !0,
|
|
1857
1857
|
style: {
|
|
@@ -1863,46 +1863,46 @@ function nt({ height: a = "400px", width: t = "100%" }) {
|
|
|
1863
1863
|
overflow: "auto"
|
|
1864
1864
|
},
|
|
1865
1865
|
children: /* @__PURE__ */ e(
|
|
1866
|
-
|
|
1866
|
+
za,
|
|
1867
1867
|
{
|
|
1868
|
-
gridRef:
|
|
1868
|
+
gridRef: S,
|
|
1869
1869
|
printTitle: "Tokens de API",
|
|
1870
1870
|
width: "100%",
|
|
1871
1871
|
height: "100%",
|
|
1872
1872
|
withBorder: !1,
|
|
1873
|
-
dataSource:
|
|
1873
|
+
dataSource: v,
|
|
1874
1874
|
withColumnBorders: !0,
|
|
1875
1875
|
striped: !0,
|
|
1876
1876
|
enableTopToolbar: !0,
|
|
1877
1877
|
enableRowActions: !1,
|
|
1878
1878
|
pageSize: 50,
|
|
1879
|
-
isLoading:
|
|
1880
|
-
isError: !!
|
|
1881
|
-
error:
|
|
1879
|
+
isLoading: y,
|
|
1880
|
+
isError: !!u,
|
|
1881
|
+
error: u,
|
|
1882
1882
|
enableGlobalFilter: !0,
|
|
1883
|
-
getRowId:
|
|
1884
|
-
toolbarLeftContent: /* @__PURE__ */ e(
|
|
1885
|
-
/* @__PURE__ */ e(
|
|
1886
|
-
/* @__PURE__ */ e(
|
|
1883
|
+
getRowId: A,
|
|
1884
|
+
toolbarLeftContent: /* @__PURE__ */ e(Fe, { justify: "space-between", style: { width: "50%" }, children: /* @__PURE__ */ r(O, { align: "start", gap: "2px", wrap: "nowrap", children: [
|
|
1885
|
+
/* @__PURE__ */ e(X, { color: "green", leftSection: /* @__PURE__ */ e(Fa, {}), onClick: b, children: g().t("archbase:New") }),
|
|
1886
|
+
/* @__PURE__ */ e(X, { disabled: !v.getCurrentRecord(), color: "red", leftSection: /* @__PURE__ */ e(na, {}), onClick: L, children: g().t("archbase:Revoke") })
|
|
1887
1887
|
] }) }),
|
|
1888
|
-
children:
|
|
1888
|
+
children: p
|
|
1889
1889
|
}
|
|
1890
1890
|
)
|
|
1891
1891
|
}
|
|
1892
1892
|
),
|
|
1893
|
-
|
|
1894
|
-
|
|
1893
|
+
R === "apiToken" ? /* @__PURE__ */ e(
|
|
1894
|
+
Er,
|
|
1895
1895
|
{
|
|
1896
|
-
onClickOk:
|
|
1896
|
+
onClickOk: F,
|
|
1897
1897
|
opened: !0,
|
|
1898
|
-
dataSource:
|
|
1899
|
-
onCustomSave:
|
|
1900
|
-
onClickCancel:
|
|
1898
|
+
dataSource: w,
|
|
1899
|
+
onCustomSave: i,
|
|
1900
|
+
onClickCancel: F
|
|
1901
1901
|
}
|
|
1902
1902
|
) : null
|
|
1903
1903
|
] });
|
|
1904
1904
|
}
|
|
1905
|
-
const
|
|
1905
|
+
const Ue = (a) => {
|
|
1906
1906
|
switch (a) {
|
|
1907
1907
|
case "critical":
|
|
1908
1908
|
return "red";
|
|
@@ -1913,114 +1913,114 @@ const Ge = (a) => {
|
|
|
1913
1913
|
default:
|
|
1914
1914
|
return "gray";
|
|
1915
1915
|
}
|
|
1916
|
-
},
|
|
1917
|
-
const
|
|
1916
|
+
}, Mr = ({ card: a, onOpen: t }) => {
|
|
1917
|
+
const n = !!(t && a.metric);
|
|
1918
1918
|
return /* @__PURE__ */ e(
|
|
1919
|
-
|
|
1919
|
+
re,
|
|
1920
1920
|
{
|
|
1921
1921
|
withBorder: !0,
|
|
1922
1922
|
radius: "md",
|
|
1923
1923
|
p: "sm",
|
|
1924
|
-
role:
|
|
1925
|
-
tabIndex:
|
|
1926
|
-
"aria-label":
|
|
1927
|
-
onClick:
|
|
1928
|
-
onKeyDown:
|
|
1929
|
-
(
|
|
1924
|
+
role: n ? "button" : void 0,
|
|
1925
|
+
tabIndex: n ? 0 : void 0,
|
|
1926
|
+
"aria-label": n ? `Ver os itens de ${a.label}` : void 0,
|
|
1927
|
+
onClick: n ? () => t?.(a) : void 0,
|
|
1928
|
+
onKeyDown: n ? (s) => {
|
|
1929
|
+
(s.key === "Enter" || s.key === " ") && (s.preventDefault(), t?.(a));
|
|
1930
1930
|
} : void 0,
|
|
1931
1931
|
style: {
|
|
1932
|
-
borderLeft: `3px solid var(--mantine-color-${
|
|
1933
|
-
cursor:
|
|
1932
|
+
borderLeft: `3px solid var(--mantine-color-${Ue(a.severity)}-6)`,
|
|
1933
|
+
cursor: n ? "pointer" : void 0
|
|
1934
1934
|
},
|
|
1935
|
-
children: /* @__PURE__ */ r(
|
|
1936
|
-
/* @__PURE__ */ r(
|
|
1937
|
-
/* @__PURE__ */ e(
|
|
1938
|
-
a.of ? /* @__PURE__ */ e(
|
|
1935
|
+
children: /* @__PURE__ */ r(V, { gap: 4, children: [
|
|
1936
|
+
/* @__PURE__ */ r(O, { gap: 8, align: "baseline", wrap: "wrap", children: [
|
|
1937
|
+
/* @__PURE__ */ e(h, { fw: 600, size: "1.7rem", lh: 1.05, c: Ue(a.severity), children: a.value }),
|
|
1938
|
+
a.of ? /* @__PURE__ */ e(h, { size: "xs", c: "dimmed", children: a.of }) : null
|
|
1939
1939
|
] }),
|
|
1940
|
-
/* @__PURE__ */ e(
|
|
1941
|
-
a.description ? /* @__PURE__ */ e(
|
|
1940
|
+
/* @__PURE__ */ e(h, { size: "sm", fw: 550, children: a.label }),
|
|
1941
|
+
a.description ? /* @__PURE__ */ e(h, { size: "xs", c: "dimmed", lh: 1.45, children: a.description }) : null
|
|
1942
1942
|
] })
|
|
1943
1943
|
}
|
|
1944
1944
|
);
|
|
1945
|
-
},
|
|
1946
|
-
/* @__PURE__ */ e(
|
|
1947
|
-
/* @__PURE__ */ r(
|
|
1948
|
-
/* @__PURE__ */ e(
|
|
1949
|
-
/* @__PURE__ */ e(
|
|
1945
|
+
}, Vr = ({ cards: a, onOpenCard: t }) => /* @__PURE__ */ e(He, { cols: { base: 1, sm: 2, lg: 3, xl: 4 }, spacing: "xs", children: a.map((n, s) => /* @__PURE__ */ e(Mr, { card: n, onOpen: t }, `${n.label}-${s}`)) }), Gr = ({ flags: a }) => /* @__PURE__ */ e(He, { cols: { base: 1, sm: 2, lg: 4 }, spacing: "xs", children: a.map((t) => /* @__PURE__ */ e(re, { withBorder: !0, radius: "md", p: "sm", children: /* @__PURE__ */ r(V, { gap: 3, children: [
|
|
1946
|
+
/* @__PURE__ */ e(h, { size: "10px", c: "dimmed", ff: "monospace", style: { wordBreak: "break-all" }, children: t.key }),
|
|
1947
|
+
/* @__PURE__ */ r(O, { gap: 7, wrap: "nowrap", children: [
|
|
1948
|
+
/* @__PURE__ */ e(Q, { size: "xs", circle: !0, color: Ue(t.severity) }),
|
|
1949
|
+
/* @__PURE__ */ e(h, { size: "sm", fw: 550, children: t.value })
|
|
1950
1950
|
] }),
|
|
1951
|
-
t.description ? /* @__PURE__ */ e(
|
|
1952
|
-
] }) }, t.key)) }),
|
|
1953
|
-
/* @__PURE__ */ e(
|
|
1954
|
-
/* @__PURE__ */ e(
|
|
1955
|
-
] }, `${t.label}-${
|
|
1956
|
-
/* @__PURE__ */ r(
|
|
1957
|
-
/* @__PURE__ */ e(
|
|
1958
|
-
t ? /* @__PURE__ */ e(
|
|
1951
|
+
t.description ? /* @__PURE__ */ e(h, { size: "xs", c: "dimmed", lh: 1.4, children: t.description }) : null
|
|
1952
|
+
] }) }, t.key)) }), Ur = ({ attributes: a }) => /* @__PURE__ */ e(V, { gap: 7, children: a.map((t, n) => /* @__PURE__ */ r(O, { gap: 12, wrap: "nowrap", justify: "space-between", children: [
|
|
1953
|
+
/* @__PURE__ */ e(h, { size: "sm", c: "dimmed", children: t.label }),
|
|
1954
|
+
/* @__PURE__ */ e(h, { size: "sm", fw: 600, ta: "right", children: t.value })
|
|
1955
|
+
] }, `${t.label}-${n}`)) }), ve = ({ title: a, hint: t, children: n }) => /* @__PURE__ */ r(V, { gap: "xs", children: [
|
|
1956
|
+
/* @__PURE__ */ r(O, { gap: 10, align: "baseline", wrap: "wrap", children: [
|
|
1957
|
+
/* @__PURE__ */ e(h, { size: "xs", fw: 650, tt: "uppercase", style: { letterSpacing: ".05em" }, children: a }),
|
|
1958
|
+
t ? /* @__PURE__ */ e(h, { size: "xs", c: "dimmed", children: t }) : null
|
|
1959
1959
|
] }),
|
|
1960
|
-
|
|
1961
|
-
] }),
|
|
1962
|
-
const
|
|
1963
|
-
|
|
1964
|
-
), [
|
|
1960
|
+
n
|
|
1961
|
+
] }), Oe = ({ children: a, maxHeight: t = 420 }) => /* @__PURE__ */ e(ce.Autosize, { mah: t, type: "hover", offsetScrollbars: !0, children: /* @__PURE__ */ e(C.ScrollContainer, { minWidth: 480, type: "native", children: a }) }), Br = 25, Wr = ({ card: a, onClose: t }) => {
|
|
1962
|
+
const n = J(
|
|
1963
|
+
K.SecurityDiagnostics
|
|
1964
|
+
), [s, d] = x([]), [u, c] = x(1), [T, R] = x(1), [m, S] = x(0), [A, w] = x(!1), [E, v] = x(null), y = a?.metric;
|
|
1965
1965
|
return ee(() => {
|
|
1966
1966
|
c(1);
|
|
1967
|
-
}, [
|
|
1968
|
-
if (!
|
|
1967
|
+
}, [y]), ee(() => {
|
|
1968
|
+
if (!y)
|
|
1969
1969
|
return;
|
|
1970
|
-
let
|
|
1971
|
-
return
|
|
1972
|
-
|
|
1970
|
+
let o = !1;
|
|
1971
|
+
return w(!0), v(null), n.getOverviewItems(y, u - 1, Br).then((l) => {
|
|
1972
|
+
o || (d(l.content ?? []), S(l.totalElements ?? 0), R(Math.max(l.totalPages ?? 1, 1)));
|
|
1973
1973
|
}).catch((l) => {
|
|
1974
|
-
|
|
1974
|
+
o || v(l instanceof Error ? l.message : "Não foi possível carregar os itens.");
|
|
1975
1975
|
}).finally(() => {
|
|
1976
|
-
|
|
1976
|
+
o || w(!1);
|
|
1977
1977
|
}), () => {
|
|
1978
|
-
|
|
1978
|
+
o = !0;
|
|
1979
1979
|
};
|
|
1980
|
-
}, [
|
|
1981
|
-
|
|
1980
|
+
}, [n, y, u]), /* @__PURE__ */ e(
|
|
1981
|
+
Ja,
|
|
1982
1982
|
{
|
|
1983
1983
|
opened: !!a,
|
|
1984
1984
|
onClose: t,
|
|
1985
1985
|
position: "right",
|
|
1986
1986
|
size: "xl",
|
|
1987
|
-
title: /* @__PURE__ */ r(
|
|
1988
|
-
/* @__PURE__ */ e(
|
|
1989
|
-
a?.description ? /* @__PURE__ */ e(
|
|
1987
|
+
title: /* @__PURE__ */ r(V, { gap: 2, children: [
|
|
1988
|
+
/* @__PURE__ */ e(h, { fw: 600, children: a?.label }),
|
|
1989
|
+
a?.description ? /* @__PURE__ */ e(h, { size: "xs", c: "dimmed", lh: 1.4, children: a.description }) : null
|
|
1990
1990
|
] }),
|
|
1991
|
-
children: /* @__PURE__ */ r(
|
|
1992
|
-
/* @__PURE__ */ r(
|
|
1993
|
-
/* @__PURE__ */ r(
|
|
1994
|
-
|
|
1991
|
+
children: /* @__PURE__ */ r(V, { gap: "sm", children: [
|
|
1992
|
+
/* @__PURE__ */ r(O, { gap: 8, children: [
|
|
1993
|
+
/* @__PURE__ */ r(Q, { variant: "light", children: [
|
|
1994
|
+
m,
|
|
1995
1995
|
" ",
|
|
1996
|
-
|
|
1996
|
+
m === 1 ? "item" : "itens"
|
|
1997
1997
|
] }),
|
|
1998
|
-
|
|
1998
|
+
A ? /* @__PURE__ */ e(se, { size: "xs" }) : null
|
|
1999
1999
|
] }),
|
|
2000
|
-
|
|
2001
|
-
!
|
|
2002
|
-
|
|
2000
|
+
E ? /* @__PURE__ */ e(be, { color: "red", title: "Erro ao carregar", children: E }) : null,
|
|
2001
|
+
!A && !E && s.length === 0 ? /* @__PURE__ */ e(h, { size: "sm", c: "dimmed", children: "Nada aqui — o número é zero." }) : null,
|
|
2002
|
+
s.length > 0 ? (
|
|
2003
2003
|
// O scroll fica NA TABELA, não no drawer: rolando o drawer, o cabeçalho some e
|
|
2004
2004
|
// uma coluna de valores sem cabeçalho deixa de dizer o que é. Aqui o cabeçalho
|
|
2005
2005
|
// gruda e o título, a contagem e a paginação ficam onde estavam.
|
|
2006
|
-
/* @__PURE__ */ e(
|
|
2007
|
-
/* @__PURE__ */ e(
|
|
2008
|
-
/* @__PURE__ */ e(
|
|
2009
|
-
/* @__PURE__ */ e(
|
|
2010
|
-
/* @__PURE__ */ e(
|
|
2006
|
+
/* @__PURE__ */ e(Oe, { maxHeight: "calc(100vh - 260px)", children: /* @__PURE__ */ r(C, { striped: !0, highlightOnHover: !0, withTableBorder: !0, stickyHeader: !0, children: [
|
|
2007
|
+
/* @__PURE__ */ e(C.Thead, { children: /* @__PURE__ */ r(C.Tr, { children: [
|
|
2008
|
+
/* @__PURE__ */ e(C.Th, { children: "Item" }),
|
|
2009
|
+
/* @__PURE__ */ e(C.Th, { children: "Onde" }),
|
|
2010
|
+
/* @__PURE__ */ e(C.Th, { children: "Por que está aqui" })
|
|
2011
2011
|
] }) }),
|
|
2012
|
-
/* @__PURE__ */ e(
|
|
2013
|
-
/* @__PURE__ */ e(
|
|
2014
|
-
/* @__PURE__ */ e(
|
|
2015
|
-
/* @__PURE__ */ e(
|
|
2016
|
-
] },
|
|
2012
|
+
/* @__PURE__ */ e(C.Tbody, { children: s.map((o) => /* @__PURE__ */ r(C.Tr, { children: [
|
|
2013
|
+
/* @__PURE__ */ e(C.Td, { children: /* @__PURE__ */ e(h, { size: "sm", fw: 550, children: o.label }) }),
|
|
2014
|
+
/* @__PURE__ */ e(C.Td, { children: /* @__PURE__ */ e(h, { size: "xs", c: "dimmed", children: o.detail }) }),
|
|
2015
|
+
/* @__PURE__ */ e(C.Td, { children: /* @__PURE__ */ e(h, { size: "xs", children: o.reason }) })
|
|
2016
|
+
] }, o.id)) })
|
|
2017
2017
|
] }) })
|
|
2018
2018
|
) : null,
|
|
2019
|
-
|
|
2019
|
+
T > 1 ? /* @__PURE__ */ e(O, { justify: "center", children: /* @__PURE__ */ e(Xa, { value: u, onChange: c, total: T, size: "sm" }) }) : null
|
|
2020
2020
|
] })
|
|
2021
2021
|
}
|
|
2022
2022
|
);
|
|
2023
|
-
},
|
|
2023
|
+
}, qr = (a, t) => t > 0 ? ` · ${Math.round(a / t * 100)}%` : "", Hr = (a) => {
|
|
2024
2024
|
const t = a.flags;
|
|
2025
2025
|
return [
|
|
2026
2026
|
{
|
|
@@ -2052,12 +2052,12 @@ const Ge = (a) => {
|
|
|
2052
2052
|
description: t.scanConfigured ? "O catálogo se alimenta do código." : "O catálogo não se alimenta do código."
|
|
2053
2053
|
}
|
|
2054
2054
|
];
|
|
2055
|
-
},
|
|
2055
|
+
}, jr = (a) => [
|
|
2056
2056
|
{
|
|
2057
2057
|
severity: "critical",
|
|
2058
2058
|
value: a.permissionsPointingToInactive,
|
|
2059
2059
|
metric: "PERMISSIONS_POINTING_TO_INACTIVE",
|
|
2060
|
-
of: `de ${a.permissions}${
|
|
2060
|
+
of: `de ${a.permissions}${qr(a.permissionsPointingToInactive, a.permissions)}`,
|
|
2061
2061
|
label: "Permissões inertes",
|
|
2062
2062
|
description: "Apontam para ação ou recurso inativo. É o acesso que o operador acredita ter concedido."
|
|
2063
2063
|
},
|
|
@@ -2101,448 +2101,620 @@ const Ge = (a) => {
|
|
|
2101
2101
|
label: "Ninguém tem",
|
|
2102
2102
|
description: "Capacidade existe no catálogo e não foi concedida a ninguém."
|
|
2103
2103
|
}
|
|
2104
|
-
],
|
|
2105
|
-
const
|
|
2106
|
-
|
|
2107
|
-
), [
|
|
2104
|
+
], ba = ({ slots: a, onError: t }) => {
|
|
2105
|
+
const n = J(
|
|
2106
|
+
K.SecurityDiagnostics
|
|
2107
|
+
), [s, d] = x(void 0), [u, c] = x(!0), [T, R] = x(void 0), [m, S] = x(null);
|
|
2108
2108
|
ee(() => {
|
|
2109
|
-
let
|
|
2110
|
-
return c(!0),
|
|
2111
|
-
|
|
2112
|
-
}).catch((
|
|
2113
|
-
if (
|
|
2114
|
-
const
|
|
2115
|
-
|
|
2109
|
+
let E = !0;
|
|
2110
|
+
return c(!0), n.getOverview().then((v) => {
|
|
2111
|
+
E && (d(v), R(void 0));
|
|
2112
|
+
}).catch((v) => {
|
|
2113
|
+
if (E) {
|
|
2114
|
+
const y = ge(v);
|
|
2115
|
+
R(y), t?.(y);
|
|
2116
2116
|
}
|
|
2117
2117
|
}).finally(() => {
|
|
2118
|
-
|
|
2118
|
+
E && c(!1);
|
|
2119
2119
|
}), () => {
|
|
2120
|
-
|
|
2120
|
+
E = !1;
|
|
2121
2121
|
};
|
|
2122
|
-
}, [
|
|
2123
|
-
const
|
|
2124
|
-
() =>
|
|
2125
|
-
[
|
|
2126
|
-
),
|
|
2127
|
-
() =>
|
|
2128
|
-
[
|
|
2122
|
+
}, [n]);
|
|
2123
|
+
const A = ie(
|
|
2124
|
+
() => s ? [...Hr(s), ...a?.additionalFlags?.(s) ?? []] : [],
|
|
2125
|
+
[s, a]
|
|
2126
|
+
), w = ie(
|
|
2127
|
+
() => s ? [...jr(s), ...a?.additionalOverviewCards?.(s) ?? []] : [],
|
|
2128
|
+
[s, a]
|
|
2129
2129
|
);
|
|
2130
|
-
return
|
|
2130
|
+
return u ? /* @__PURE__ */ e(se, { size: "sm" }) : T ? /* @__PURE__ */ e(be, { color: "red", title: "Não foi possível ler o diagnóstico", children: T }) : s ? /* @__PURE__ */ r(V, { gap: "lg", children: [
|
|
2131
2131
|
/* @__PURE__ */ r(ve, { title: "Proteções", hint: "de AccessOverview.flags", children: [
|
|
2132
|
-
/* @__PURE__ */ e(
|
|
2133
|
-
/* @__PURE__ */ e(
|
|
2132
|
+
/* @__PURE__ */ e(Gr, { flags: A }),
|
|
2133
|
+
/* @__PURE__ */ e(h, { size: "xs", c: "dimmed", lh: 1.45, children: "Todas nascem com o padrão compatível — ligadas só quando alguém decide." })
|
|
2134
2134
|
] }),
|
|
2135
|
-
/* @__PURE__ */ e(ve, { title: "Catálogo e concessões", hint: "contagens vivas", children: /* @__PURE__ */ e(
|
|
2136
|
-
a?.afterOverview?.(
|
|
2137
|
-
/* @__PURE__ */ e(
|
|
2135
|
+
/* @__PURE__ */ e(ve, { title: "Catálogo e concessões", hint: "contagens vivas", children: /* @__PURE__ */ e(Vr, { cards: w, onOpenCard: S }) }),
|
|
2136
|
+
a?.afterOverview?.(s),
|
|
2137
|
+
/* @__PURE__ */ e(Wr, { card: m, onClose: () => S(null) })
|
|
2138
2138
|
] }) : null;
|
|
2139
|
-
},
|
|
2139
|
+
}, Be = ({ value: a, onChange: t, assunto: n, visiveis: s, total: d }) => {
|
|
2140
|
+
const u = typeof s == "number" && typeof d == "number" && s < d;
|
|
2141
|
+
return /* @__PURE__ */ e(
|
|
2142
|
+
fe,
|
|
2143
|
+
{
|
|
2144
|
+
size: "xs",
|
|
2145
|
+
value: a,
|
|
2146
|
+
onChange: (c) => t(c.currentTarget.value),
|
|
2147
|
+
placeholder: n ? `Filtrar ${n}…` : "Filtrar…",
|
|
2148
|
+
"aria-label": n ? `Filtrar ${n}` : "Filtrar",
|
|
2149
|
+
description: u ? `${s} de ${d}` : void 0,
|
|
2150
|
+
rightSection: a ? /* @__PURE__ */ e(Ya, { size: "sm", onClick: () => t(""), "aria-label": "Limpar filtro" }) : null
|
|
2151
|
+
}
|
|
2152
|
+
);
|
|
2153
|
+
}, Zr = /[̀-ͯ]/g, va = (a) => a.toLocaleLowerCase().normalize("NFD").replace(Zr, ""), We = (a, t) => {
|
|
2154
|
+
const [n, s] = x(""), d = ie(() => {
|
|
2155
|
+
const u = va(n.trim());
|
|
2156
|
+
return u ? a.filter(
|
|
2157
|
+
(c) => t(c).some((T) => T ? va(T).includes(u) : !1)
|
|
2158
|
+
) : a;
|
|
2159
|
+
}, [a, n]);
|
|
2160
|
+
return { filtro: n, setFiltro: s, filtrados: d };
|
|
2161
|
+
}, ya = {
|
|
2140
2162
|
EFFECTIVE: { label: "Efetiva", color: "green" },
|
|
2141
2163
|
INERT: { label: "Inerte", color: "orange" },
|
|
2142
2164
|
DENIED: { label: "Negada", color: "red" }
|
|
2143
|
-
},
|
|
2165
|
+
}, Qr = { GROUP: "grupo", PROFILE: "perfil", USER: "direto" }, Kr = [
|
|
2144
2166
|
{ value: "all", label: "Todas" },
|
|
2145
2167
|
{ value: "EFFECTIVE", label: "Só efetivas" },
|
|
2146
2168
|
{ value: "INERT", label: "Só inertes" },
|
|
2147
2169
|
{ value: "DENIED", label: "Negadas" },
|
|
2148
2170
|
{ value: "inherited", label: "Só herdadas" }
|
|
2149
|
-
],
|
|
2150
|
-
const
|
|
2151
|
-
|
|
2152
|
-
), [
|
|
2153
|
-
async (
|
|
2154
|
-
const
|
|
2155
|
-
if (
|
|
2156
|
-
|
|
2171
|
+
], Jr = ({ slots: a, onError: t, userId: n }) => {
|
|
2172
|
+
const s = J(
|
|
2173
|
+
K.SecurityDiagnostics
|
|
2174
|
+
), [d, u] = x(""), [c, T] = x(void 0), [R, m] = x(!1), [S, A] = x(void 0), [w, E] = x("all"), v = !!n, y = ae(
|
|
2175
|
+
async (i) => {
|
|
2176
|
+
const D = i.trim();
|
|
2177
|
+
if (D) {
|
|
2178
|
+
m(!0), A(void 0);
|
|
2157
2179
|
try {
|
|
2158
|
-
const
|
|
2159
|
-
|
|
2160
|
-
} catch (
|
|
2161
|
-
const
|
|
2162
|
-
|
|
2180
|
+
const P = D.includes("@") ? await s.getEffectiveAccessByEmail(D) : await s.getEffectiveAccessByUserId(D);
|
|
2181
|
+
T(P);
|
|
2182
|
+
} catch (P) {
|
|
2183
|
+
const G = ge(P);
|
|
2184
|
+
A(G), t?.(G), T(void 0);
|
|
2163
2185
|
} finally {
|
|
2164
|
-
|
|
2186
|
+
m(!1);
|
|
2165
2187
|
}
|
|
2166
2188
|
}
|
|
2167
2189
|
},
|
|
2168
|
-
[
|
|
2169
|
-
),
|
|
2190
|
+
[s, t]
|
|
2191
|
+
), o = ie(() => c ? [
|
|
2170
2192
|
{ label: "Perfil", value: c.profileName || "—" },
|
|
2171
2193
|
{ label: "Grupos", value: c.groupNames.length ? c.groupNames.join(", ") : "—" },
|
|
2172
2194
|
...a?.userAttributes?.(c) ?? []
|
|
2173
|
-
] : [], [c, a]), l = ie(() => c ?
|
|
2195
|
+
] : [], [c, a]), l = ie(() => c ? w === "all" ? c.capabilities : w === "inherited" ? c.capabilities.filter((i) => i.grantedByType !== "USER") : c.capabilities.filter((i) => i.situation === w) : [], [c, w]), {
|
|
2196
|
+
filtro: p,
|
|
2197
|
+
setFiltro: b,
|
|
2198
|
+
filtrados: L
|
|
2199
|
+
} = We(l, (i) => [i.resource, i.action, i.grantedByName]);
|
|
2174
2200
|
ee(() => {
|
|
2175
|
-
|
|
2176
|
-
}, [
|
|
2177
|
-
const
|
|
2178
|
-
return /* @__PURE__ */ r(
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
}) : /* @__PURE__ */ r(
|
|
2201
|
+
n && (E("all"), y(n));
|
|
2202
|
+
}, [n, y]);
|
|
2203
|
+
const F = a?.additionalCapabilityColumns ?? [];
|
|
2204
|
+
return /* @__PURE__ */ r(V, { gap: "lg", children: [
|
|
2205
|
+
v ? null : /* @__PURE__ */ e(ve, { title: "Consultar", hint: "por e-mail ou id do usuário", children: a?.renderUserSearch ? a.renderUserSearch((i) => {
|
|
2206
|
+
u(i), y(i);
|
|
2207
|
+
}) : /* @__PURE__ */ r(O, { gap: "xs", align: "flex-end", children: [
|
|
2182
2208
|
/* @__PURE__ */ e(
|
|
2183
|
-
|
|
2209
|
+
fe,
|
|
2184
2210
|
{
|
|
2185
2211
|
style: { flex: 1, minWidth: 240 },
|
|
2186
2212
|
label: "Usuário",
|
|
2187
2213
|
placeholder: "pessoa@empresa.com.br",
|
|
2188
|
-
value:
|
|
2189
|
-
onChange: (
|
|
2190
|
-
onKeyDown: (
|
|
2191
|
-
|
|
2214
|
+
value: d,
|
|
2215
|
+
onChange: (i) => u(i.currentTarget.value),
|
|
2216
|
+
onKeyDown: (i) => {
|
|
2217
|
+
i.key === "Enter" && y(d);
|
|
2192
2218
|
}
|
|
2193
2219
|
}
|
|
2194
2220
|
),
|
|
2195
|
-
/* @__PURE__ */ e(
|
|
2221
|
+
/* @__PURE__ */ e(X, { onClick: () => void y(d), loading: R, children: "Consultar" })
|
|
2196
2222
|
] }) }),
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
c ? /* @__PURE__ */ r(
|
|
2200
|
-
/* @__PURE__ */ e(
|
|
2201
|
-
/* @__PURE__ */ r(
|
|
2202
|
-
/* @__PURE__ */ e(
|
|
2203
|
-
c.administrator ? /* @__PURE__ */ e(
|
|
2204
|
-
c.enabled ? null : /* @__PURE__ */ e(
|
|
2223
|
+
S ? /* @__PURE__ */ e(be, { color: "red", title: "Não foi possível ler o efetivo", children: S }) : null,
|
|
2224
|
+
R && !c ? /* @__PURE__ */ e(se, { size: "sm" }) : null,
|
|
2225
|
+
c ? /* @__PURE__ */ r(xe, { children: [
|
|
2226
|
+
/* @__PURE__ */ e(re, { withBorder: !0, radius: "md", p: "md", children: /* @__PURE__ */ r(V, { gap: "sm", children: [
|
|
2227
|
+
/* @__PURE__ */ r(O, { gap: 8, wrap: "wrap", align: "center", children: [
|
|
2228
|
+
/* @__PURE__ */ e(h, { fw: 620, children: c.userLabel }),
|
|
2229
|
+
c.administrator ? /* @__PURE__ */ e(Q, { color: "red", children: "administrador" }) : null,
|
|
2230
|
+
c.enabled ? null : /* @__PURE__ */ e(Q, { color: "red", children: "conta desativada" }),
|
|
2205
2231
|
a?.afterUserBadges?.(c)
|
|
2206
2232
|
] }),
|
|
2207
|
-
/* @__PURE__ */ e(
|
|
2233
|
+
/* @__PURE__ */ e(Ur, { attributes: o })
|
|
2208
2234
|
] }) }),
|
|
2209
2235
|
c.administrator ? /* @__PURE__ */ r(be, { color: "orange", title: "Administrador passa direto", children: [
|
|
2210
2236
|
"O portão GRANT concede sem consultar o catálogo. A lista abaixo vir vazia não é falta de dado — é o atalho que a flag ",
|
|
2211
2237
|
/* @__PURE__ */ e("code", { children: "isAdministrator" }),
|
|
2212
2238
|
" representa."
|
|
2213
2239
|
] }) : null,
|
|
2214
|
-
/* @__PURE__ */ e(
|
|
2240
|
+
/* @__PURE__ */ e(He, { cols: { base: 2, sm: 4 }, spacing: "xs", children: [
|
|
2215
2241
|
["concedidas", c.granted, "neutral"],
|
|
2216
2242
|
["efetivas", c.effective, "ok"],
|
|
2217
2243
|
["inertes", c.inert, "warning"],
|
|
2218
2244
|
["negadas", c.denied, "critical"]
|
|
2219
|
-
].map(([
|
|
2220
|
-
/* @__PURE__ */ e(
|
|
2221
|
-
/* @__PURE__ */ e(
|
|
2222
|
-
] }) },
|
|
2245
|
+
].map(([i, D, P]) => /* @__PURE__ */ e(re, { withBorder: !0, radius: "md", p: "sm", children: /* @__PURE__ */ r(V, { gap: 2, children: [
|
|
2246
|
+
/* @__PURE__ */ e(h, { size: "1.3rem", fw: 620, c: Ue(P), children: D }),
|
|
2247
|
+
/* @__PURE__ */ e(h, { size: "xs", c: "dimmed", children: i })
|
|
2248
|
+
] }) }, i)) }),
|
|
2223
2249
|
a?.afterEffectiveTally?.(c),
|
|
2224
|
-
/* @__PURE__ */ r(ve, { title: "Capacidades", hint: `${
|
|
2225
|
-
/* @__PURE__ */ e(
|
|
2226
|
-
/* @__PURE__ */ e(
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2250
|
+
/* @__PURE__ */ r(ve, { title: "Capacidades", hint: `${c.capabilities.length} no total`, children: [
|
|
2251
|
+
/* @__PURE__ */ e(ua.Group, { multiple: !1, value: w, onChange: (i) => E(i), children: /* @__PURE__ */ e(O, { gap: 6, children: Kr.map((i) => /* @__PURE__ */ e(ua, { value: i.value, size: "xs", variant: "outline", children: i.label }, i.value)) }) }),
|
|
2252
|
+
/* @__PURE__ */ e(
|
|
2253
|
+
Be,
|
|
2254
|
+
{
|
|
2255
|
+
value: p,
|
|
2256
|
+
onChange: b,
|
|
2257
|
+
assunto: "capacidades",
|
|
2258
|
+
visiveis: L.length,
|
|
2259
|
+
total: l.length
|
|
2260
|
+
}
|
|
2261
|
+
),
|
|
2262
|
+
/* @__PURE__ */ e(Oe, { maxHeight: "calc(100vh - 460px)", children: /* @__PURE__ */ r(C, { striped: !0, highlightOnHover: !0, withTableBorder: !0, stickyHeader: !0, children: [
|
|
2263
|
+
/* @__PURE__ */ e(C.Thead, { children: /* @__PURE__ */ r(C.Tr, { children: [
|
|
2264
|
+
/* @__PURE__ */ e(C.Th, { children: "Capacidade" }),
|
|
2265
|
+
/* @__PURE__ */ e(C.Th, { children: "Origem" }),
|
|
2266
|
+
/* @__PURE__ */ e(C.Th, { children: "Situação" }),
|
|
2267
|
+
F.map((i) => /* @__PURE__ */ e(C.Th, { children: i.header }, i.header))
|
|
2232
2268
|
] }) }),
|
|
2233
|
-
/* @__PURE__ */ r(
|
|
2234
|
-
|
|
2235
|
-
/* @__PURE__ */ e(
|
|
2236
|
-
|
|
2269
|
+
/* @__PURE__ */ r(C.Tbody, { children: [
|
|
2270
|
+
L.map((i, D) => /* @__PURE__ */ r(C.Tr, { children: [
|
|
2271
|
+
/* @__PURE__ */ e(C.Td, { children: /* @__PURE__ */ r(h, { size: "sm", ff: "monospace", children: [
|
|
2272
|
+
i.resource,
|
|
2237
2273
|
":",
|
|
2238
|
-
|
|
2274
|
+
i.action
|
|
2239
2275
|
] }) }),
|
|
2240
|
-
/* @__PURE__ */ e(
|
|
2241
|
-
/* @__PURE__ */ r(
|
|
2242
|
-
|
|
2276
|
+
/* @__PURE__ */ e(C.Td, { children: /* @__PURE__ */ r(h, { size: "sm", children: [
|
|
2277
|
+
/* @__PURE__ */ r(h, { span: !0, c: "dimmed", children: [
|
|
2278
|
+
Qr[i.grantedByType] ?? i.grantedByType,
|
|
2243
2279
|
" "
|
|
2244
2280
|
] }),
|
|
2245
|
-
|
|
2281
|
+
i.grantedByName
|
|
2246
2282
|
] }) }),
|
|
2247
|
-
/* @__PURE__ */ e(
|
|
2248
|
-
|
|
2249
|
-
] }, `${
|
|
2250
|
-
l.length === 0 ? /* @__PURE__ */ e(
|
|
2283
|
+
/* @__PURE__ */ e(C.Td, { children: /* @__PURE__ */ e(Q, { color: ya[i.situation].color, variant: "light", children: ya[i.situation].label }) }),
|
|
2284
|
+
F.map((P) => /* @__PURE__ */ e(C.Td, { children: P.render(i, c) }, P.header))
|
|
2285
|
+
] }, `${i.resource}:${i.action}:${D}`)),
|
|
2286
|
+
l.length === 0 ? /* @__PURE__ */ e(C.Tr, { children: /* @__PURE__ */ e(C.Td, { colSpan: 3 + F.length, children: /* @__PURE__ */ e(h, { size: "sm", c: "dimmed", ta: "center", py: "md", children: "Nenhuma capacidade neste filtro." }) }) }) : null
|
|
2251
2287
|
] })
|
|
2252
2288
|
] }) })
|
|
2253
2289
|
] })
|
|
2254
2290
|
] }) : null
|
|
2255
2291
|
] });
|
|
2256
|
-
},
|
|
2292
|
+
}, wa = 40, Ca = ({
|
|
2293
|
+
label: a,
|
|
2294
|
+
valor: t,
|
|
2295
|
+
placeholder: n,
|
|
2296
|
+
branch: s,
|
|
2297
|
+
somenteFolhas: d,
|
|
2298
|
+
onSelecionar: u
|
|
2299
|
+
}) => {
|
|
2300
|
+
const c = J(
|
|
2301
|
+
K.SecurityDiagnostics
|
|
2302
|
+
), [T, R] = x(!1), [m, S] = x(""), [A, w] = x([]), [E, v] = x({}), [y, o] = x(), [l, p] = x(!1), [b, L] = x(), F = ae(
|
|
2303
|
+
async (f) => {
|
|
2304
|
+
p(!0), L(void 0);
|
|
2305
|
+
try {
|
|
2306
|
+
const I = await c.browse(s, { q: f || void 0, page: 0, size: wa });
|
|
2307
|
+
w(I.content ?? []);
|
|
2308
|
+
} catch (I) {
|
|
2309
|
+
L(I instanceof Error ? I.message : "Não foi possível carregar.");
|
|
2310
|
+
} finally {
|
|
2311
|
+
p(!1);
|
|
2312
|
+
}
|
|
2313
|
+
},
|
|
2314
|
+
[c, s]
|
|
2315
|
+
);
|
|
2316
|
+
ee(() => {
|
|
2317
|
+
if (!T)
|
|
2318
|
+
return;
|
|
2319
|
+
const f = setTimeout(() => void F(m), m ? 300 : 0);
|
|
2320
|
+
return () => clearTimeout(f);
|
|
2321
|
+
}, [T, m, F]);
|
|
2322
|
+
const i = ae(
|
|
2323
|
+
async (f) => {
|
|
2324
|
+
if (y === f.id) {
|
|
2325
|
+
o(void 0);
|
|
2326
|
+
return;
|
|
2327
|
+
}
|
|
2328
|
+
if (o(f.id), !E[f.id])
|
|
2329
|
+
try {
|
|
2330
|
+
const I = await c.browse(s, { parentId: f.id, page: 0, size: wa });
|
|
2331
|
+
v((N) => ({ ...N, [f.id]: I.content ?? [] }));
|
|
2332
|
+
} catch (I) {
|
|
2333
|
+
L(I instanceof Error ? I.message : "Não foi possível abrir.");
|
|
2334
|
+
}
|
|
2335
|
+
},
|
|
2336
|
+
[c, s, y, E]
|
|
2337
|
+
), D = (f, I) => {
|
|
2338
|
+
u(f, I), R(!1);
|
|
2339
|
+
}, P = (f, I) => {
|
|
2340
|
+
const N = f.hasChildren;
|
|
2341
|
+
return /* @__PURE__ */ e(
|
|
2342
|
+
ze,
|
|
2343
|
+
{
|
|
2344
|
+
onClick: () => N && d ? void i(f) : D(f, I),
|
|
2345
|
+
style: {
|
|
2346
|
+
display: "block",
|
|
2347
|
+
width: "100%",
|
|
2348
|
+
padding: "5px 8px",
|
|
2349
|
+
paddingLeft: I ? 24 : 8,
|
|
2350
|
+
borderRadius: 4
|
|
2351
|
+
},
|
|
2352
|
+
children: /* @__PURE__ */ r(O, { gap: 6, wrap: "nowrap", children: [
|
|
2353
|
+
/* @__PURE__ */ e(h, { size: "sm", fw: !d || !N ? 500 : 600, truncate: !0, children: f.label }),
|
|
2354
|
+
f.badge ? /* @__PURE__ */ e(h, { size: "xs", c: "dimmed", children: f.badge }) : null
|
|
2355
|
+
] })
|
|
2356
|
+
},
|
|
2357
|
+
`${I?.id ?? "raiz"}:${f.id}`
|
|
2358
|
+
);
|
|
2359
|
+
}, G = (f) => /* @__PURE__ */ r(_, { children: [
|
|
2360
|
+
P(f),
|
|
2361
|
+
y === f.id ? (E[f.id] ?? []).map((I) => P(I, f)) : null
|
|
2362
|
+
] }, `ramo:${f.id}`);
|
|
2363
|
+
return /* @__PURE__ */ r(Je, { opened: T, onChange: R, width: 340, position: "bottom-start", withinPortal: !0, shadow: "md", children: [
|
|
2364
|
+
/* @__PURE__ */ e(Je.Target, { children: /* @__PURE__ */ e(
|
|
2365
|
+
fe,
|
|
2366
|
+
{
|
|
2367
|
+
label: a,
|
|
2368
|
+
placeholder: n,
|
|
2369
|
+
value: t ?? "",
|
|
2370
|
+
readOnly: !0,
|
|
2371
|
+
onClick: () => R((f) => !f),
|
|
2372
|
+
styles: { input: { cursor: "pointer" } }
|
|
2373
|
+
}
|
|
2374
|
+
) }),
|
|
2375
|
+
/* @__PURE__ */ r(Je.Dropdown, { p: 6, children: [
|
|
2376
|
+
/* @__PURE__ */ e(
|
|
2377
|
+
fe,
|
|
2378
|
+
{
|
|
2379
|
+
size: "xs",
|
|
2380
|
+
placeholder: "Buscar…",
|
|
2381
|
+
value: m,
|
|
2382
|
+
onChange: (f) => S(f.currentTarget.value),
|
|
2383
|
+
mb: 6,
|
|
2384
|
+
autoFocus: !0
|
|
2385
|
+
}
|
|
2386
|
+
),
|
|
2387
|
+
l ? /* @__PURE__ */ r(O, { gap: 6, p: 6, children: [
|
|
2388
|
+
/* @__PURE__ */ e(se, { size: "xs" }),
|
|
2389
|
+
/* @__PURE__ */ e(h, { size: "xs", c: "dimmed", children: "Carregando…" })
|
|
2390
|
+
] }) : null,
|
|
2391
|
+
b ? /* @__PURE__ */ e(h, { size: "xs", c: "red", p: 6, children: b }) : null,
|
|
2392
|
+
!l && !b && A.length === 0 ? /* @__PURE__ */ e(h, { size: "xs", c: "dimmed", p: 6, children: "Nada encontrado." }) : null,
|
|
2393
|
+
/* @__PURE__ */ e(ce.Autosize, { mah: 280, type: "hover", children: A.map((f) => G(f)) })
|
|
2394
|
+
] })
|
|
2395
|
+
] });
|
|
2396
|
+
}, Xr = [
|
|
2257
2397
|
{ gate: "IDENTITY", titulo: "Identidade", papel: "só nega", pergunta: "O principal é resolvível e a conta está ativa?" },
|
|
2258
2398
|
{ gate: "SCOPE", titulo: "Escopo", papel: "só nega", pergunta: "A concessão vale para o tenant, empresa e projeto pedidos?" },
|
|
2259
2399
|
{ gate: "RESTRICTION", titulo: "Restrições", papel: "só nega", pergunta: "Perfil, papel e persona exigidos pela anotação." },
|
|
2260
2400
|
{ gate: "LEVEL", titulo: "Nível", papel: "só nega", pergunta: "O nível da pessoa alcança o piso da capacidade?" },
|
|
2261
2401
|
{ gate: "GRANT", titulo: "Concessão", papel: "concede", pergunta: "Existe permissão, sem negação explícita?" }
|
|
2262
|
-
],
|
|
2263
|
-
const
|
|
2264
|
-
|
|
2265
|
-
), [
|
|
2402
|
+
], Yr = ({ slots: a, onError: t, initial: n }) => {
|
|
2403
|
+
const s = J(
|
|
2404
|
+
K.SecurityDiagnostics
|
|
2405
|
+
), [d, u] = x(""), [c, T] = x(""), [R, m] = x(""), [S, A] = x(""), [w, E] = x({}), [v, y] = x(void 0), [o, l] = x(!1), [p, b] = x(void 0);
|
|
2266
2406
|
ee(() => {
|
|
2267
|
-
|
|
2268
|
-
}, [
|
|
2269
|
-
const
|
|
2270
|
-
if (!(!
|
|
2271
|
-
|
|
2407
|
+
n && (n.userId && u(n.userId), n.userLabel && T(n.userLabel), n.resource && m(n.resource), n.action && A(n.action), y(void 0));
|
|
2408
|
+
}, [n?.userId, n?.userLabel, n?.resource, n?.action]);
|
|
2409
|
+
const L = ae(async () => {
|
|
2410
|
+
if (!(!d.trim() || !R.trim() || !S.trim())) {
|
|
2411
|
+
l(!0), b(void 0);
|
|
2272
2412
|
try {
|
|
2273
|
-
const
|
|
2274
|
-
...
|
|
2275
|
-
resource:
|
|
2276
|
-
action:
|
|
2277
|
-
companyId:
|
|
2278
|
-
projectId:
|
|
2413
|
+
const i = d.trim(), D = await s.simulate({
|
|
2414
|
+
...i.includes("@") ? { email: i } : { userId: i },
|
|
2415
|
+
resource: R.trim(),
|
|
2416
|
+
action: S.trim(),
|
|
2417
|
+
companyId: w.companyId,
|
|
2418
|
+
projectId: w.projectId
|
|
2279
2419
|
});
|
|
2280
|
-
|
|
2281
|
-
} catch (
|
|
2282
|
-
const
|
|
2283
|
-
|
|
2420
|
+
y(D);
|
|
2421
|
+
} catch (i) {
|
|
2422
|
+
const D = ge(i);
|
|
2423
|
+
b(D), t?.(D), y(void 0);
|
|
2284
2424
|
} finally {
|
|
2285
|
-
|
|
2425
|
+
l(!1);
|
|
2286
2426
|
}
|
|
2287
2427
|
}
|
|
2288
|
-
}, [
|
|
2289
|
-
const
|
|
2290
|
-
return
|
|
2428
|
+
}, [s, d, R, S, w, t]), F = (i, D) => {
|
|
2429
|
+
const P = D.chain?.find((G) => G.gate === i);
|
|
2430
|
+
return P ? P.passed ? "passou" : "negou" : "nao-avaliado";
|
|
2291
2431
|
};
|
|
2292
|
-
return /* @__PURE__ */ r(
|
|
2293
|
-
/* @__PURE__ */ e(
|
|
2294
|
-
/* @__PURE__ */ r(
|
|
2432
|
+
return /* @__PURE__ */ r(V, { gap: "lg", children: [
|
|
2433
|
+
/* @__PURE__ */ e(re, { withBorder: !0, radius: "md", p: "md", children: /* @__PURE__ */ r(V, { gap: "sm", children: [
|
|
2434
|
+
/* @__PURE__ */ r(He, { cols: { base: 1, sm: 2, lg: 4 }, spacing: "xs", children: [
|
|
2295
2435
|
/* @__PURE__ */ e(
|
|
2296
|
-
|
|
2436
|
+
Ca,
|
|
2297
2437
|
{
|
|
2298
2438
|
label: "Usuário",
|
|
2299
|
-
placeholder: "
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
me,
|
|
2306
|
-
{
|
|
2307
|
-
label: "Recurso",
|
|
2308
|
-
placeholder: "tms.ordemservico",
|
|
2309
|
-
value: c,
|
|
2310
|
-
onChange: (T) => I(T.currentTarget.value)
|
|
2439
|
+
placeholder: "escolher pessoa",
|
|
2440
|
+
branch: "USERS",
|
|
2441
|
+
valor: c || d,
|
|
2442
|
+
onSelecionar: (i) => {
|
|
2443
|
+
u(i.id), T(i.label);
|
|
2444
|
+
}
|
|
2311
2445
|
}
|
|
2312
2446
|
),
|
|
2313
2447
|
/* @__PURE__ */ e(
|
|
2314
|
-
|
|
2448
|
+
Ca,
|
|
2315
2449
|
{
|
|
2316
|
-
label: "
|
|
2317
|
-
placeholder: "
|
|
2318
|
-
|
|
2319
|
-
|
|
2450
|
+
label: "Recurso e ação",
|
|
2451
|
+
placeholder: "escolher capacidade",
|
|
2452
|
+
branch: "RESOURCES",
|
|
2453
|
+
somenteFolhas: !0,
|
|
2454
|
+
valor: R && S ? `${R} · ${S}` : "",
|
|
2455
|
+
onSelecionar: (i, D) => {
|
|
2456
|
+
A(i.label), D && m(D.label);
|
|
2457
|
+
}
|
|
2320
2458
|
}
|
|
2321
2459
|
),
|
|
2322
2460
|
/* @__PURE__ */ e(
|
|
2323
|
-
|
|
2461
|
+
fe,
|
|
2324
2462
|
{
|
|
2325
2463
|
label: "Empresa (opcional)",
|
|
2326
2464
|
placeholder: "companyId",
|
|
2327
|
-
value:
|
|
2328
|
-
onChange: (
|
|
2465
|
+
value: w.companyId ?? "",
|
|
2466
|
+
onChange: (i) => E((D) => ({ ...D, companyId: i.currentTarget.value || void 0 }))
|
|
2329
2467
|
}
|
|
2330
2468
|
)
|
|
2331
2469
|
] }),
|
|
2332
|
-
a?.afterSimulationFields?.((
|
|
2333
|
-
/* @__PURE__ */ r(
|
|
2334
|
-
/* @__PURE__ */ e(
|
|
2335
|
-
/* @__PURE__ */ e(
|
|
2470
|
+
a?.afterSimulationFields?.((i) => E((D) => ({ ...D, ...i }))),
|
|
2471
|
+
/* @__PURE__ */ r(O, { gap: "xs", align: "center", children: [
|
|
2472
|
+
/* @__PURE__ */ e(X, { onClick: () => void L(), loading: o, children: "Simular" }),
|
|
2473
|
+
/* @__PURE__ */ e(h, { size: "xs", c: "dimmed", children: "Somente leitura — não altera permissão nenhuma." })
|
|
2336
2474
|
] })
|
|
2337
2475
|
] }) }),
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
/* @__PURE__ */ e(ve, { title: "Cadeia de decisão", hint: "os quatro primeiros só negam; só o quinto concede", children: /* @__PURE__ */ e(
|
|
2342
|
-
const
|
|
2343
|
-
return /* @__PURE__ */ r(
|
|
2344
|
-
/* @__PURE__ */ e(
|
|
2345
|
-
/* @__PURE__ */ r(
|
|
2346
|
-
/* @__PURE__ */ r(
|
|
2476
|
+
p ? /* @__PURE__ */ e(be, { color: "red", title: "Não foi possível simular", children: p }) : null,
|
|
2477
|
+
o && !v ? /* @__PURE__ */ e(se, { size: "sm" }) : null,
|
|
2478
|
+
v ? /* @__PURE__ */ r(xe, { children: [
|
|
2479
|
+
/* @__PURE__ */ e(ve, { title: "Cadeia de decisão", hint: "os quatro primeiros só negam; só o quinto concede", children: /* @__PURE__ */ e(re, { withBorder: !0, radius: "md", p: "md", children: /* @__PURE__ */ e(V, { gap: "sm", children: Xr.map((i, D) => {
|
|
2480
|
+
const P = F(i.gate, v), G = v.chain?.find((f) => f.gate === i.gate)?.detail;
|
|
2481
|
+
return /* @__PURE__ */ r(O, { align: "flex-start", wrap: "nowrap", gap: "sm", children: [
|
|
2482
|
+
/* @__PURE__ */ e(h, { size: "xs", ff: "monospace", c: "dimmed", w: 16, children: D + 1 }),
|
|
2483
|
+
/* @__PURE__ */ r(V, { gap: 2, style: { flex: 1, minWidth: 0 }, children: [
|
|
2484
|
+
/* @__PURE__ */ r(O, { gap: 8, align: "baseline", wrap: "wrap", children: [
|
|
2347
2485
|
/* @__PURE__ */ e(
|
|
2348
|
-
|
|
2486
|
+
h,
|
|
2349
2487
|
{
|
|
2350
2488
|
size: "sm",
|
|
2351
2489
|
fw: 600,
|
|
2352
|
-
c:
|
|
2353
|
-
opacity:
|
|
2354
|
-
children:
|
|
2490
|
+
c: P === "negou" ? "red" : void 0,
|
|
2491
|
+
opacity: P === "nao-avaliado" ? 0.5 : 1,
|
|
2492
|
+
children: i.titulo
|
|
2355
2493
|
}
|
|
2356
2494
|
),
|
|
2357
|
-
/* @__PURE__ */ r(
|
|
2495
|
+
/* @__PURE__ */ r(h, { size: "xs", c: "dimmed", children: [
|
|
2358
2496
|
"· ",
|
|
2359
|
-
|
|
2497
|
+
i.papel
|
|
2360
2498
|
] })
|
|
2361
2499
|
] }),
|
|
2362
|
-
/* @__PURE__ */ e(
|
|
2363
|
-
|
|
2500
|
+
/* @__PURE__ */ e(h, { size: "xs", c: "dimmed", opacity: P === "nao-avaliado" ? 0.5 : 1, children: i.pergunta }),
|
|
2501
|
+
G ? /* @__PURE__ */ e(h, { size: "xs", c: "dimmed", children: G }) : null
|
|
2364
2502
|
] }),
|
|
2365
2503
|
/* @__PURE__ */ e(
|
|
2366
|
-
|
|
2504
|
+
Q,
|
|
2367
2505
|
{
|
|
2368
2506
|
variant: "light",
|
|
2369
|
-
color:
|
|
2370
|
-
children:
|
|
2507
|
+
color: P === "negou" ? "red" : P === "passou" ? "green" : "gray",
|
|
2508
|
+
children: P === "nao-avaliado" ? "não avaliado" : P
|
|
2371
2509
|
}
|
|
2372
2510
|
)
|
|
2373
|
-
] },
|
|
2511
|
+
] }, i.gate);
|
|
2374
2512
|
}) }) }) }),
|
|
2375
|
-
/* @__PURE__ */ e(be, { color:
|
|
2376
|
-
/* @__PURE__ */ e(
|
|
2377
|
-
/* @__PURE__ */ r(
|
|
2513
|
+
/* @__PURE__ */ e(be, { color: v.allowed ? "green" : "red", title: v.allowed ? "Pode" : "Não pode", children: /* @__PURE__ */ r(V, { gap: 6, children: [
|
|
2514
|
+
/* @__PURE__ */ e(h, { size: "sm", children: v.message }),
|
|
2515
|
+
/* @__PURE__ */ r(h, { size: "xs", ff: "monospace", c: "dimmed", children: [
|
|
2378
2516
|
"reasonCode: ",
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2517
|
+
v.reasonCode,
|
|
2518
|
+
v.deniedAt ? ` · deniedAt: ${v.deniedAt}` : "",
|
|
2519
|
+
v.grantedByName ? ` · grantedBy: ${v.grantedByName}` : ""
|
|
2382
2520
|
] })
|
|
2383
2521
|
] }) }),
|
|
2384
|
-
a?.afterDecision?.(
|
|
2522
|
+
a?.afterDecision?.(v)
|
|
2385
2523
|
] }) : null
|
|
2386
2524
|
] });
|
|
2387
|
-
},
|
|
2525
|
+
}, Da = (a) => {
|
|
2388
2526
|
switch (a) {
|
|
2389
2527
|
case "EFFECTIVE":
|
|
2390
|
-
return /* @__PURE__ */ e(
|
|
2528
|
+
return /* @__PURE__ */ e(Q, { size: "sm", color: "green", variant: "light", children: "vale" });
|
|
2391
2529
|
case "INERT":
|
|
2392
|
-
return /* @__PURE__ */ e(
|
|
2530
|
+
return /* @__PURE__ */ e(Q, { size: "sm", color: "yellow", variant: "light", children: "não vale" });
|
|
2393
2531
|
case "DENIED":
|
|
2394
|
-
return /* @__PURE__ */ e(
|
|
2532
|
+
return /* @__PURE__ */ e(Q, { size: "sm", color: "red", variant: "light", children: "bloqueada" });
|
|
2395
2533
|
default:
|
|
2396
|
-
return /* @__PURE__ */ e(
|
|
2534
|
+
return /* @__PURE__ */ e(Q, { size: "sm", color: "gray", variant: "light", children: "—" });
|
|
2397
2535
|
}
|
|
2398
|
-
},
|
|
2399
|
-
const
|
|
2400
|
-
|
|
2401
|
-
), [c,
|
|
2536
|
+
}, _r = ({ id: a, label: t, slots: n, onSelectUser: s, onSimulate: d }) => {
|
|
2537
|
+
const u = J(
|
|
2538
|
+
K.SecurityDiagnostics
|
|
2539
|
+
), [c, T] = x([]), {
|
|
2540
|
+
filtro: R,
|
|
2541
|
+
setFiltro: m,
|
|
2542
|
+
filtrados: S
|
|
2543
|
+
} = We(c, (o) => [o.userName, o.email, o.via]), [A, w] = x(!0), [E, v] = x();
|
|
2402
2544
|
ee(() => {
|
|
2403
|
-
let
|
|
2404
|
-
return
|
|
2405
|
-
|
|
2406
|
-
}).catch((
|
|
2407
|
-
|
|
2545
|
+
let o = !1;
|
|
2546
|
+
return w(!0), v(void 0), u.getReach(a).then((l) => {
|
|
2547
|
+
o || T(l ?? []);
|
|
2548
|
+
}).catch((l) => {
|
|
2549
|
+
o || v(l instanceof Error ? l.message : "Não foi possível carregar.");
|
|
2408
2550
|
}).finally(() => {
|
|
2409
|
-
|
|
2551
|
+
o || w(!1);
|
|
2410
2552
|
}), () => {
|
|
2411
|
-
|
|
2553
|
+
o = !0;
|
|
2412
2554
|
};
|
|
2413
|
-
}, [
|
|
2414
|
-
const
|
|
2415
|
-
return /* @__PURE__ */ r(
|
|
2416
|
-
/* @__PURE__ */ r(
|
|
2417
|
-
/* @__PURE__ */ e(
|
|
2418
|
-
/* @__PURE__ */ e(
|
|
2555
|
+
}, [u, a]);
|
|
2556
|
+
const y = c.filter((o) => o.kind === "ADMINISTRADOR").length;
|
|
2557
|
+
return /* @__PURE__ */ r(V, { gap: "lg", children: [
|
|
2558
|
+
/* @__PURE__ */ r(V, { gap: 4, children: [
|
|
2559
|
+
/* @__PURE__ */ e(h, { fw: 620, size: "xl", ff: "monospace", children: t }),
|
|
2560
|
+
/* @__PURE__ */ e(h, { size: "sm", c: "dimmed", children: "Quem alcança esta capacidade, e por qual via." })
|
|
2419
2561
|
] }),
|
|
2420
|
-
|
|
2562
|
+
E ? /* @__PURE__ */ e(be, { color: "red", title: "Erro ao carregar", children: E }) : null,
|
|
2421
2563
|
/* @__PURE__ */ e(
|
|
2422
2564
|
ve,
|
|
2423
2565
|
{
|
|
2424
2566
|
title: "Quem alcança",
|
|
2425
|
-
hint:
|
|
2426
|
-
children:
|
|
2427
|
-
/* @__PURE__ */ e(
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2567
|
+
hint: A ? "carregando…" : `${c.length} ${c.length === 1 ? "pessoa" : "pessoas"}`,
|
|
2568
|
+
children: A ? /* @__PURE__ */ e(se, { size: "sm" }) : c.length === 0 ? /* @__PURE__ */ e(h, { size: "sm", c: "dimmed", children: "Ninguém. A capacidade existe no catálogo e nunca foi concedida." }) : /* @__PURE__ */ r(xe, { children: [
|
|
2569
|
+
/* @__PURE__ */ e(
|
|
2570
|
+
Be,
|
|
2571
|
+
{
|
|
2572
|
+
value: R,
|
|
2573
|
+
onChange: m,
|
|
2574
|
+
assunto: "pessoas",
|
|
2575
|
+
visiveis: S.length,
|
|
2576
|
+
total: c.length
|
|
2577
|
+
}
|
|
2578
|
+
),
|
|
2579
|
+
/* @__PURE__ */ e(Oe, { children: /* @__PURE__ */ r(C, { striped: !0, highlightOnHover: !0, withTableBorder: !0, stickyHeader: !0, children: [
|
|
2580
|
+
/* @__PURE__ */ e(C.Thead, { children: /* @__PURE__ */ r(C.Tr, { children: [
|
|
2581
|
+
/* @__PURE__ */ e(C.Th, { children: "Pessoa" }),
|
|
2582
|
+
/* @__PURE__ */ e(C.Th, { children: "Por qual via" }),
|
|
2583
|
+
/* @__PURE__ */ e(C.Th, { children: "Situação" })
|
|
2432
2584
|
] }) }),
|
|
2433
|
-
/* @__PURE__ */ e(
|
|
2434
|
-
|
|
2585
|
+
/* @__PURE__ */ e(C.Tbody, { children: S.map((o) => /* @__PURE__ */ r(
|
|
2586
|
+
C.Tr,
|
|
2435
2587
|
{
|
|
2436
|
-
style: { cursor:
|
|
2437
|
-
onClick: () =>
|
|
2588
|
+
style: { cursor: s ? "pointer" : void 0 },
|
|
2589
|
+
onClick: () => s?.(o.userId, o.userName),
|
|
2438
2590
|
children: [
|
|
2439
|
-
/* @__PURE__ */ e(
|
|
2440
|
-
/* @__PURE__ */ e(
|
|
2441
|
-
/* @__PURE__ */ e(
|
|
2591
|
+
/* @__PURE__ */ e(C.Td, { children: /* @__PURE__ */ r(V, { gap: 0, children: [
|
|
2592
|
+
/* @__PURE__ */ e(h, { size: "sm", fw: 550, children: o.userName }),
|
|
2593
|
+
/* @__PURE__ */ e(h, { size: "xs", c: "dimmed", children: o.email })
|
|
2442
2594
|
] }) }),
|
|
2443
|
-
/* @__PURE__ */ e(
|
|
2444
|
-
/* @__PURE__ */ e(
|
|
2445
|
-
|
|
2595
|
+
/* @__PURE__ */ e(C.Td, { children: /* @__PURE__ */ r(O, { gap: 6, children: [
|
|
2596
|
+
/* @__PURE__ */ e(h, { size: "xs", c: "dimmed", children: o.via }),
|
|
2597
|
+
o.kind === "ADMINISTRADOR" ? /* @__PURE__ */ e(Q, { size: "xs", color: "yellow", variant: "light", children: "atalho" }) : null
|
|
2446
2598
|
] }) }),
|
|
2447
|
-
/* @__PURE__ */ e(
|
|
2599
|
+
/* @__PURE__ */ e(C.Td, { children: Da(o.situation) })
|
|
2448
2600
|
]
|
|
2449
2601
|
},
|
|
2450
|
-
|
|
2602
|
+
o.userId
|
|
2451
2603
|
)) })
|
|
2452
2604
|
] }) }),
|
|
2453
|
-
|
|
2454
|
-
|
|
2605
|
+
y > 0 ? /* @__PURE__ */ r(h, { size: "xs", c: "dimmed", lh: 1.5, children: [
|
|
2606
|
+
y === 1 ? "Uma conta alcança" : `${y} contas alcançam`,
|
|
2455
2607
|
" pelo atalho de administrador — sem concessão nenhuma. Revisar permissões não muda o que elas podem."
|
|
2456
2608
|
] }) : null
|
|
2457
2609
|
] })
|
|
2458
2610
|
}
|
|
2459
2611
|
),
|
|
2460
|
-
|
|
2461
|
-
|
|
2612
|
+
n?.afterReachList?.(a, c),
|
|
2613
|
+
d ? /* @__PURE__ */ r(h, { size: "xs", c: "dimmed", children: [
|
|
2462
2614
|
"Para testar uma pessoa específica contra esta capacidade, use ",
|
|
2463
2615
|
/* @__PURE__ */ e("strong", { children: "Simular" }),
|
|
2464
2616
|
" na árvore — ela já vem escolhida."
|
|
2465
2617
|
] }) : null
|
|
2466
2618
|
] });
|
|
2467
|
-
},
|
|
2468
|
-
const
|
|
2469
|
-
|
|
2470
|
-
), [
|
|
2619
|
+
}, Sa = ({ id: a, kind: t, slots: n, onSelectUser: s }) => {
|
|
2620
|
+
const d = J(
|
|
2621
|
+
K.SecurityDiagnostics
|
|
2622
|
+
), [u, c] = x(), [T, R] = x(!0), [m, S] = x(), {
|
|
2623
|
+
filtro: A,
|
|
2624
|
+
setFiltro: w,
|
|
2625
|
+
filtrados: E
|
|
2626
|
+
} = We(u?.members ?? [], (b) => [b.name, b.email, b.profileName ?? void 0]), {
|
|
2627
|
+
filtro: v,
|
|
2628
|
+
setFiltro: y,
|
|
2629
|
+
filtrados: o
|
|
2630
|
+
} = We(u?.grants ?? [], (b) => [b.resource, b.action]);
|
|
2471
2631
|
if (ee(() => {
|
|
2472
|
-
let
|
|
2473
|
-
return
|
|
2474
|
-
|
|
2475
|
-
}).catch((
|
|
2476
|
-
|
|
2632
|
+
let b = !1;
|
|
2633
|
+
return R(!0), S(void 0), (t === "GROUP" ? d.getGroup(a) : d.getProfile(a)).then((F) => {
|
|
2634
|
+
b || c(F);
|
|
2635
|
+
}).catch((F) => {
|
|
2636
|
+
b || S(F instanceof Error ? F.message : "Não foi possível carregar.");
|
|
2477
2637
|
}).finally(() => {
|
|
2478
|
-
|
|
2638
|
+
b || R(!1);
|
|
2479
2639
|
}), () => {
|
|
2480
|
-
|
|
2640
|
+
b = !0;
|
|
2481
2641
|
};
|
|
2482
|
-
}, [
|
|
2483
|
-
return /* @__PURE__ */ r(
|
|
2484
|
-
/* @__PURE__ */ e(
|
|
2485
|
-
/* @__PURE__ */ e(
|
|
2642
|
+
}, [d, a, t]), T)
|
|
2643
|
+
return /* @__PURE__ */ r(O, { gap: 8, children: [
|
|
2644
|
+
/* @__PURE__ */ e(se, { size: "sm" }),
|
|
2645
|
+
/* @__PURE__ */ e(h, { size: "sm", c: "dimmed", children: "Carregando…" })
|
|
2486
2646
|
] });
|
|
2487
|
-
if (
|
|
2488
|
-
return /* @__PURE__ */ e(be, { color: "red", title: "Erro ao carregar", children:
|
|
2489
|
-
if (!
|
|
2647
|
+
if (m)
|
|
2648
|
+
return /* @__PURE__ */ e(be, { color: "red", title: "Erro ao carregar", children: m });
|
|
2649
|
+
if (!u)
|
|
2490
2650
|
return null;
|
|
2491
|
-
const
|
|
2492
|
-
return /* @__PURE__ */ r(
|
|
2493
|
-
/* @__PURE__ */ r(
|
|
2494
|
-
/* @__PURE__ */ r(
|
|
2495
|
-
/* @__PURE__ */ e(
|
|
2496
|
-
/* @__PURE__ */ e(
|
|
2651
|
+
const l = t === "GROUP" ? "grupo" : "perfil", p = n?.additionalMemberColumns ?? [];
|
|
2652
|
+
return /* @__PURE__ */ r(V, { gap: "lg", children: [
|
|
2653
|
+
/* @__PURE__ */ r(V, { gap: 4, children: [
|
|
2654
|
+
/* @__PURE__ */ r(O, { gap: 8, children: [
|
|
2655
|
+
/* @__PURE__ */ e(h, { fw: 620, size: "xl", children: u.groupName }),
|
|
2656
|
+
/* @__PURE__ */ e(Q, { variant: "light", children: l })
|
|
2497
2657
|
] }),
|
|
2498
|
-
|
|
2658
|
+
u.description ? /* @__PURE__ */ e(h, { size: "sm", c: "dimmed", children: u.description }) : null
|
|
2499
2659
|
] }),
|
|
2500
2660
|
/* @__PURE__ */ r(
|
|
2501
2661
|
ve,
|
|
2502
2662
|
{
|
|
2503
2663
|
title: "Membros",
|
|
2504
|
-
hint: `${
|
|
2664
|
+
hint: `${u.members.length} — o total de cada um soma todas as origens`,
|
|
2505
2665
|
children: [
|
|
2506
|
-
|
|
2666
|
+
u.members.length === 0 ? /* @__PURE__ */ r(h, { size: "sm", c: "dimmed", children: [
|
|
2507
2667
|
"Ninguém está ",
|
|
2508
2668
|
t === "GROUP" ? "neste grupo" : "com este perfil",
|
|
2509
2669
|
"."
|
|
2510
|
-
] }) : /* @__PURE__ */
|
|
2511
|
-
/* @__PURE__ */ e(
|
|
2512
|
-
|
|
2513
|
-
/* @__PURE__ */ e(y.Th, { children: "Perfil" }),
|
|
2514
|
-
/* @__PURE__ */ e(y.Th, { ta: "right", children: "Concedidas" }),
|
|
2515
|
-
/* @__PURE__ */ e(y.Th, { ta: "right", children: "Valem" }),
|
|
2516
|
-
/* @__PURE__ */ e(y.Th, { ta: "right", children: "Não valem" }),
|
|
2517
|
-
/* @__PURE__ */ e(y.Th, { ta: "right", children: "Bloqueadas" }),
|
|
2518
|
-
n.map((s) => /* @__PURE__ */ e(y.Th, { children: s.header }, s.header))
|
|
2519
|
-
] }) }),
|
|
2520
|
-
/* @__PURE__ */ e(y.Tbody, { children: h.members.map((s) => /* @__PURE__ */ r(
|
|
2521
|
-
y.Tr,
|
|
2670
|
+
] }) : /* @__PURE__ */ r(xe, { children: [
|
|
2671
|
+
/* @__PURE__ */ e(
|
|
2672
|
+
Be,
|
|
2522
2673
|
{
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2674
|
+
value: A,
|
|
2675
|
+
onChange: w,
|
|
2676
|
+
assunto: "pessoas",
|
|
2677
|
+
visiveis: E.length,
|
|
2678
|
+
total: u.members.length
|
|
2679
|
+
}
|
|
2680
|
+
),
|
|
2681
|
+
/* @__PURE__ */ e(Oe, { children: /* @__PURE__ */ r(C, { striped: !0, highlightOnHover: !0, withTableBorder: !0, stickyHeader: !0, children: [
|
|
2682
|
+
/* @__PURE__ */ e(C.Thead, { children: /* @__PURE__ */ r(C.Tr, { children: [
|
|
2683
|
+
/* @__PURE__ */ e(C.Th, { children: "Pessoa" }),
|
|
2684
|
+
/* @__PURE__ */ e(C.Th, { children: "Perfil" }),
|
|
2685
|
+
/* @__PURE__ */ e(C.Th, { ta: "right", children: "Concedidas" }),
|
|
2686
|
+
/* @__PURE__ */ e(C.Th, { ta: "right", children: "Valem" }),
|
|
2687
|
+
/* @__PURE__ */ e(C.Th, { ta: "right", children: "Não valem" }),
|
|
2688
|
+
/* @__PURE__ */ e(C.Th, { ta: "right", children: "Bloqueadas" }),
|
|
2689
|
+
p.map((b) => /* @__PURE__ */ e(C.Th, { children: b.header }, b.header))
|
|
2690
|
+
] }) }),
|
|
2691
|
+
/* @__PURE__ */ e(C.Tbody, { children: E.map((b) => /* @__PURE__ */ r(
|
|
2692
|
+
C.Tr,
|
|
2693
|
+
{
|
|
2694
|
+
style: { cursor: s ? "pointer" : void 0 },
|
|
2695
|
+
onClick: () => s?.(b.userId, b.name),
|
|
2696
|
+
children: [
|
|
2697
|
+
/* @__PURE__ */ e(C.Td, { children: /* @__PURE__ */ r(V, { gap: 0, children: [
|
|
2698
|
+
/* @__PURE__ */ r(O, { gap: 6, children: [
|
|
2699
|
+
/* @__PURE__ */ e(h, { size: "sm", fw: 550, children: b.name }),
|
|
2700
|
+
b.administrator ? /* @__PURE__ */ e(Q, { size: "xs", color: "yellow", variant: "light", children: "administrador" }) : null,
|
|
2701
|
+
b.enabled ? null : /* @__PURE__ */ e(Q, { size: "xs", color: "red", variant: "light", children: "desativada" })
|
|
2702
|
+
] }),
|
|
2703
|
+
/* @__PURE__ */ e(h, { size: "xs", c: "dimmed", children: b.email })
|
|
2704
|
+
] }) }),
|
|
2705
|
+
/* @__PURE__ */ e(C.Td, { children: /* @__PURE__ */ e(h, { size: "xs", c: "dimmed", children: b.profileName ?? "—" }) }),
|
|
2706
|
+
/* @__PURE__ */ e(C.Td, { ta: "right", children: b.total }),
|
|
2707
|
+
/* @__PURE__ */ e(C.Td, { ta: "right", c: "green", children: b.effective }),
|
|
2708
|
+
/* @__PURE__ */ e(C.Td, { ta: "right", c: "yellow.7", children: b.inert }),
|
|
2709
|
+
/* @__PURE__ */ e(C.Td, { ta: "right", c: "red", children: b.denied }),
|
|
2710
|
+
p.map((L) => /* @__PURE__ */ e(C.Td, { children: L.render(b, u) }, L.header))
|
|
2711
|
+
]
|
|
2712
|
+
},
|
|
2713
|
+
b.userId
|
|
2714
|
+
)) })
|
|
2715
|
+
] }) })
|
|
2716
|
+
] }),
|
|
2717
|
+
/* @__PURE__ */ r(h, { size: "xs", c: "dimmed", lh: 1.5, children: [
|
|
2546
2718
|
"O total do membro não é o total ",
|
|
2547
2719
|
t === "GROUP" ? "do grupo" : "do perfil",
|
|
2548
2720
|
": ele soma o que vem de outras vias. Clique numa pessoa para ver a lista dela."
|
|
@@ -2550,29 +2722,41 @@ const Ge = (a) => {
|
|
|
2550
2722
|
]
|
|
2551
2723
|
}
|
|
2552
2724
|
),
|
|
2553
|
-
/* @__PURE__ */ e(ve, { title: `O que este ${
|
|
2554
|
-
/* @__PURE__ */ e(
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2725
|
+
/* @__PURE__ */ e(ve, { title: `O que este ${l} concede`, hint: "a parte que é responsabilidade dele", children: u.grants.length === 0 ? /* @__PURE__ */ e(h, { size: "sm", c: "dimmed", children: "Nada concedido por esta via." }) : /* @__PURE__ */ r(xe, { children: [
|
|
2726
|
+
/* @__PURE__ */ e(
|
|
2727
|
+
Be,
|
|
2728
|
+
{
|
|
2729
|
+
value: v,
|
|
2730
|
+
onChange: y,
|
|
2731
|
+
assunto: "capacidades",
|
|
2732
|
+
visiveis: o.length,
|
|
2733
|
+
total: u.grants.length
|
|
2734
|
+
}
|
|
2735
|
+
),
|
|
2736
|
+
/* @__PURE__ */ e(Oe, { children: /* @__PURE__ */ r(C, { striped: !0, withTableBorder: !0, stickyHeader: !0, children: [
|
|
2737
|
+
/* @__PURE__ */ e(C.Thead, { children: /* @__PURE__ */ r(C.Tr, { children: [
|
|
2738
|
+
/* @__PURE__ */ e(C.Th, { children: "Capacidade" }),
|
|
2739
|
+
/* @__PURE__ */ e(C.Th, { children: "Situação" })
|
|
2563
2740
|
] }) }),
|
|
2564
|
-
/* @__PURE__ */ e(
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2741
|
+
/* @__PURE__ */ e(C.Tbody, { children: o.map((b, L) => /* @__PURE__ */ r(C.Tr, { children: [
|
|
2742
|
+
/* @__PURE__ */ e(C.Td, { children: /* @__PURE__ */ r(h, { size: "sm", ff: "monospace", children: [
|
|
2743
|
+
b.resource,
|
|
2744
|
+
" · ",
|
|
2745
|
+
b.action
|
|
2746
|
+
] }) }),
|
|
2747
|
+
/* @__PURE__ */ e(C.Td, { children: Da(b.situation) })
|
|
2748
|
+
] }, `${b.resource}-${b.action}-${L}`)) })
|
|
2749
|
+
] }) })
|
|
2750
|
+
] }) }),
|
|
2751
|
+
n?.afterGroupMembers?.(u)
|
|
2568
2752
|
] });
|
|
2569
|
-
},
|
|
2753
|
+
}, xa = 50, aa = [
|
|
2570
2754
|
{ branch: "USERS", label: "Pessoas" },
|
|
2571
2755
|
{ branch: "GROUPS", label: "Grupos" },
|
|
2572
2756
|
{ branch: "PROFILES", label: "Perfis" },
|
|
2573
2757
|
{ branch: "RESOURCES", label: "Recursos" }
|
|
2574
|
-
],
|
|
2575
|
-
|
|
2758
|
+
], ra = { nodes: [], total: 0, carregando: !1, carregouTudo: !1 }, et = ({ aberta: a }) => /* @__PURE__ */ e(
|
|
2759
|
+
_,
|
|
2576
2760
|
{
|
|
2577
2761
|
"aria-hidden": !0,
|
|
2578
2762
|
style: {
|
|
@@ -2584,7 +2768,7 @@ const Ge = (a) => {
|
|
|
2584
2768
|
justifyContent: "center"
|
|
2585
2769
|
},
|
|
2586
2770
|
children: /* @__PURE__ */ e(
|
|
2587
|
-
|
|
2771
|
+
_,
|
|
2588
2772
|
{
|
|
2589
2773
|
style: {
|
|
2590
2774
|
width: 0,
|
|
@@ -2600,218 +2784,235 @@ const Ge = (a) => {
|
|
|
2600
2784
|
}
|
|
2601
2785
|
)
|
|
2602
2786
|
}
|
|
2603
|
-
),
|
|
2604
|
-
const
|
|
2605
|
-
|
|
2606
|
-
), [
|
|
2607
|
-
async (
|
|
2608
|
-
const
|
|
2609
|
-
if (
|
|
2787
|
+
), at = ({ selected: a, onSelect: t }) => {
|
|
2788
|
+
const n = J(
|
|
2789
|
+
K.SecurityDiagnostics
|
|
2790
|
+
), [s, d] = x(""), [u] = ia(s, 300), [c, T] = x({}), [R, m] = x({}), S = (o, l) => l ? `${o}:${l}` : o, A = ae(
|
|
2791
|
+
async (o, l, p) => {
|
|
2792
|
+
const b = S(o, l), L = R[b] ?? ra;
|
|
2793
|
+
if (L.carregando || p && L.carregouTudo)
|
|
2610
2794
|
return;
|
|
2611
|
-
const
|
|
2612
|
-
|
|
2795
|
+
const F = p ? Math.floor(L.nodes.length / xa) : 0;
|
|
2796
|
+
m((i) => ({ ...i, [b]: { ...i[b] ?? ra, carregando: !0, erro: void 0 } }));
|
|
2613
2797
|
try {
|
|
2614
|
-
const
|
|
2798
|
+
const i = await n.browse(o, {
|
|
2615
2799
|
parentId: l,
|
|
2616
|
-
q:
|
|
2617
|
-
page:
|
|
2618
|
-
size:
|
|
2800
|
+
q: u || void 0,
|
|
2801
|
+
page: F,
|
|
2802
|
+
size: xa
|
|
2619
2803
|
});
|
|
2620
|
-
|
|
2621
|
-
const
|
|
2804
|
+
m((D) => {
|
|
2805
|
+
const G = [...p ? D[b]?.nodes ?? [] : [], ...i.content ?? []];
|
|
2622
2806
|
return {
|
|
2623
|
-
...
|
|
2624
|
-
[
|
|
2625
|
-
nodes:
|
|
2626
|
-
total:
|
|
2807
|
+
...D,
|
|
2808
|
+
[b]: {
|
|
2809
|
+
nodes: G,
|
|
2810
|
+
total: i.totalElements ?? G.length,
|
|
2627
2811
|
carregando: !1,
|
|
2628
|
-
carregouTudo:
|
|
2812
|
+
carregouTudo: G.length >= (i.totalElements ?? 0)
|
|
2629
2813
|
}
|
|
2630
2814
|
};
|
|
2631
2815
|
});
|
|
2632
|
-
} catch (
|
|
2633
|
-
|
|
2634
|
-
...
|
|
2635
|
-
[
|
|
2636
|
-
...
|
|
2816
|
+
} catch (i) {
|
|
2817
|
+
m((D) => ({
|
|
2818
|
+
...D,
|
|
2819
|
+
[b]: {
|
|
2820
|
+
...D[b] ?? ra,
|
|
2637
2821
|
carregando: !1,
|
|
2638
|
-
erro:
|
|
2822
|
+
erro: i instanceof Error ? i.message : "Não foi possível carregar."
|
|
2639
2823
|
}
|
|
2640
2824
|
}));
|
|
2641
2825
|
}
|
|
2642
2826
|
},
|
|
2643
|
-
[
|
|
2827
|
+
[n, u, R]
|
|
2644
2828
|
);
|
|
2645
2829
|
ee(() => {
|
|
2646
|
-
if (
|
|
2647
|
-
const
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
}),
|
|
2830
|
+
if (m({}), u) {
|
|
2831
|
+
const o = {};
|
|
2832
|
+
aa.forEach((l) => {
|
|
2833
|
+
o[l.branch] = !0;
|
|
2834
|
+
}), T((l) => ({ ...l, ...o }));
|
|
2651
2835
|
}
|
|
2652
|
-
}, [
|
|
2653
|
-
|
|
2654
|
-
c[
|
|
2836
|
+
}, [u]), ee(() => {
|
|
2837
|
+
aa.forEach((o) => {
|
|
2838
|
+
c[o.branch] && !R[o.branch] && A(o.branch, void 0, !1);
|
|
2655
2839
|
});
|
|
2656
|
-
}, [c,
|
|
2657
|
-
const
|
|
2658
|
-
const
|
|
2659
|
-
return /* @__PURE__ */ r(
|
|
2840
|
+
}, [c, R, u]);
|
|
2841
|
+
const w = (o) => T((l) => ({ ...l, [o]: !l[o] })), E = (o) => o === "critical" ? "red" : o === "warning" ? "yellow" : void 0, v = (o, l, p) => {
|
|
2842
|
+
const b = S("ACTIONS_OF_RESOURCE", o.id), L = !!c[b], F = R[b], i = a?.kind === o.kind && a?.id === o.id;
|
|
2843
|
+
return /* @__PURE__ */ r(_, { children: [
|
|
2660
2844
|
/* @__PURE__ */ e(
|
|
2661
|
-
|
|
2845
|
+
ze,
|
|
2662
2846
|
{
|
|
2663
2847
|
onClick: () => {
|
|
2664
|
-
t({ kind:
|
|
2848
|
+
t({ kind: o.kind, id: o.id, label: o.label, parentLabel: p }), o.hasChildren && (w(b), F || A("ACTIONS_OF_RESOURCE", o.id, !1));
|
|
2665
2849
|
},
|
|
2666
|
-
"aria-current":
|
|
2667
|
-
"aria-expanded":
|
|
2850
|
+
"aria-current": i ? "true" : void 0,
|
|
2851
|
+
"aria-expanded": o.hasChildren ? L : void 0,
|
|
2668
2852
|
style: {
|
|
2669
2853
|
display: "block",
|
|
2670
2854
|
width: "100%",
|
|
2671
2855
|
padding: "5px 8px",
|
|
2672
2856
|
paddingLeft: 8 + l * 14,
|
|
2673
2857
|
borderRadius: 5,
|
|
2674
|
-
background:
|
|
2858
|
+
background: i ? "var(--mantine-color-blue-light)" : void 0
|
|
2675
2859
|
},
|
|
2676
|
-
children: /* @__PURE__ */ r(
|
|
2677
|
-
|
|
2678
|
-
/* @__PURE__ */ e(
|
|
2679
|
-
|
|
2860
|
+
children: /* @__PURE__ */ r(O, { gap: 7, wrap: "nowrap", children: [
|
|
2861
|
+
o.severity ? /* @__PURE__ */ e(Q, { size: "xs", circle: !0, color: E(o.severity) }) : /* @__PURE__ */ e(_, { w: 8 }),
|
|
2862
|
+
/* @__PURE__ */ e(h, { size: "sm", fw: i ? 600 : 400, truncate: !0, style: { flex: 1 }, children: o.label }),
|
|
2863
|
+
o.badge ? /* @__PURE__ */ e(h, { size: "xs", c: "dimmed", ff: "monospace", children: o.badge }) : null
|
|
2680
2864
|
] })
|
|
2681
2865
|
}
|
|
2682
2866
|
),
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
/* @__PURE__ */ e(
|
|
2687
|
-
/* @__PURE__ */ e(
|
|
2867
|
+
o.hasChildren && L ? /* @__PURE__ */ r(_, { children: [
|
|
2868
|
+
F?.nodes.map((D) => v(D, l + 1, o.label)),
|
|
2869
|
+
F?.carregando ? /* @__PURE__ */ r(O, { gap: 6, pl: 8 + (l + 1) * 14, py: 4, children: [
|
|
2870
|
+
/* @__PURE__ */ e(se, { size: "xs" }),
|
|
2871
|
+
/* @__PURE__ */ e(h, { size: "xs", c: "dimmed", children: "carregando…" })
|
|
2688
2872
|
] }) : null,
|
|
2689
|
-
|
|
2690
|
-
|
|
2873
|
+
F && !F.erro && !F.carregouTudo && !F.carregando && F.total > F.nodes.length ? /* @__PURE__ */ e(
|
|
2874
|
+
ze,
|
|
2691
2875
|
{
|
|
2692
|
-
onClick: () => void
|
|
2876
|
+
onClick: () => void A("ACTIONS_OF_RESOURCE", o.id, !0),
|
|
2693
2877
|
style: { paddingLeft: 8 + (l + 1) * 14, paddingTop: 3, paddingBottom: 3 },
|
|
2694
|
-
children: /* @__PURE__ */ r(
|
|
2878
|
+
children: /* @__PURE__ */ r(h, { size: "xs", c: "blue", children: [
|
|
2695
2879
|
"mais ",
|
|
2696
|
-
|
|
2880
|
+
F.total - F.nodes.length,
|
|
2697
2881
|
" →"
|
|
2698
2882
|
] })
|
|
2699
2883
|
}
|
|
2700
2884
|
) : null
|
|
2701
2885
|
] }) : null
|
|
2702
|
-
] }, `${
|
|
2703
|
-
},
|
|
2704
|
-
return /* @__PURE__ */ r(
|
|
2886
|
+
] }, `${o.kind}-${o.id}`);
|
|
2887
|
+
}, y = ie(() => aa, []);
|
|
2888
|
+
return /* @__PURE__ */ r(_, { children: [
|
|
2705
2889
|
/* @__PURE__ */ e(
|
|
2706
|
-
|
|
2890
|
+
fe,
|
|
2707
2891
|
{
|
|
2708
2892
|
size: "xs",
|
|
2709
2893
|
placeholder: "Buscar pessoa, grupo, capacidade…",
|
|
2710
|
-
value:
|
|
2711
|
-
onChange: (
|
|
2894
|
+
value: s,
|
|
2895
|
+
onChange: (o) => d(o.currentTarget.value),
|
|
2712
2896
|
"aria-label": "Buscar na árvore",
|
|
2713
2897
|
mb: "xs",
|
|
2714
|
-
rightSection:
|
|
2898
|
+
rightSection: s && s !== u ? /* @__PURE__ */ e(se, { size: "xs" }) : null
|
|
2715
2899
|
}
|
|
2716
2900
|
),
|
|
2717
|
-
|
|
2718
|
-
const l = !!c[
|
|
2719
|
-
return /* @__PURE__ */ r(
|
|
2901
|
+
y.map((o) => {
|
|
2902
|
+
const l = !!c[o.branch], p = R[o.branch];
|
|
2903
|
+
return /* @__PURE__ */ r(_, { mb: 2, children: [
|
|
2720
2904
|
/* @__PURE__ */ e(
|
|
2721
|
-
|
|
2905
|
+
ze,
|
|
2722
2906
|
{
|
|
2723
2907
|
onClick: () => {
|
|
2724
|
-
|
|
2908
|
+
w(o.branch), p || A(o.branch, void 0, !1);
|
|
2725
2909
|
},
|
|
2726
2910
|
"aria-expanded": l,
|
|
2727
2911
|
style: { display: "block", width: "100%", padding: "5px 8px", borderRadius: 5 },
|
|
2728
|
-
children: /* @__PURE__ */ r(
|
|
2729
|
-
/* @__PURE__ */ e(
|
|
2730
|
-
/* @__PURE__ */ e(
|
|
2731
|
-
|
|
2912
|
+
children: /* @__PURE__ */ r(O, { gap: 7, wrap: "nowrap", children: [
|
|
2913
|
+
/* @__PURE__ */ e(et, { aberta: l }),
|
|
2914
|
+
/* @__PURE__ */ e(h, { size: "sm", fw: 600, style: { flex: 1 }, children: o.label }),
|
|
2915
|
+
p ? /* @__PURE__ */ e(h, { size: "xs", c: "dimmed", ff: "monospace", children: p.total }) : null
|
|
2732
2916
|
] })
|
|
2733
2917
|
}
|
|
2734
2918
|
),
|
|
2735
|
-
l ? /* @__PURE__ */ r(
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
/* @__PURE__ */ e(
|
|
2740
|
-
/* @__PURE__ */ e(
|
|
2919
|
+
l ? /* @__PURE__ */ r(_, { children: [
|
|
2920
|
+
p?.erro ? /* @__PURE__ */ e(h, { size: "xs", c: "red", pl: 22, py: 4, children: p.erro }) : null,
|
|
2921
|
+
p?.nodes.map((b) => v(b, 1)),
|
|
2922
|
+
p?.carregando ? /* @__PURE__ */ r(O, { gap: 6, pl: 22, py: 4, children: [
|
|
2923
|
+
/* @__PURE__ */ e(se, { size: "xs" }),
|
|
2924
|
+
/* @__PURE__ */ e(h, { size: "xs", c: "dimmed", children: "carregando…" })
|
|
2741
2925
|
] }) : null,
|
|
2742
|
-
|
|
2743
|
-
|
|
2926
|
+
p && !p.erro && !p.carregouTudo && !p.carregando && p.total > p.nodes.length ? /* @__PURE__ */ e(
|
|
2927
|
+
ze,
|
|
2744
2928
|
{
|
|
2745
|
-
onClick: () => void
|
|
2929
|
+
onClick: () => void A(o.branch, void 0, !0),
|
|
2746
2930
|
style: { paddingLeft: 22, paddingTop: 3, paddingBottom: 3 },
|
|
2747
|
-
children: /* @__PURE__ */ r(
|
|
2931
|
+
children: /* @__PURE__ */ r(h, { size: "xs", c: "blue", children: [
|
|
2748
2932
|
"mais ",
|
|
2749
|
-
|
|
2933
|
+
p.total - p.nodes.length,
|
|
2750
2934
|
" →"
|
|
2751
2935
|
] })
|
|
2752
2936
|
}
|
|
2753
2937
|
) : null,
|
|
2754
|
-
|
|
2938
|
+
p && !p.erro && p.nodes.length === 0 && !p.carregando ? /* @__PURE__ */ e(h, { size: "xs", c: "dimmed", pl: 22, py: 4, children: u ? "Nada encontrado." : "Vazio." }) : null
|
|
2755
2939
|
] }) : null
|
|
2756
|
-
] },
|
|
2940
|
+
] }, o.branch);
|
|
2757
2941
|
})
|
|
2758
2942
|
] });
|
|
2759
|
-
},
|
|
2943
|
+
}, rt = () => /* @__PURE__ */ e(
|
|
2944
|
+
_,
|
|
2945
|
+
{
|
|
2946
|
+
"aria-hidden": !0,
|
|
2947
|
+
style: {
|
|
2948
|
+
width: 0,
|
|
2949
|
+
height: 0,
|
|
2950
|
+
borderRight: "5px solid currentColor",
|
|
2951
|
+
borderTop: "4px solid transparent",
|
|
2952
|
+
borderBottom: "4px solid transparent"
|
|
2953
|
+
}
|
|
2954
|
+
}
|
|
2955
|
+
), Ta = { kind: "OVERVIEW", id: "overview", label: "Panorama" }, Aa = { kind: "SIMULATE", id: "simulate", label: "Simular acesso" }, ft = ({
|
|
2760
2956
|
height: a = "100%",
|
|
2761
2957
|
width: t = "100%",
|
|
2762
|
-
slots:
|
|
2763
|
-
onError:
|
|
2958
|
+
slots: n,
|
|
2959
|
+
onError: s
|
|
2764
2960
|
}) => {
|
|
2765
|
-
const [
|
|
2766
|
-
|
|
2767
|
-
}, []),
|
|
2768
|
-
(
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2961
|
+
const [d, u] = x(Ta), [c, T] = x([]), [R, m] = x({}), S = ae((y) => {
|
|
2962
|
+
u((o) => o.kind === y.kind && o.id === y.id ? o : (T((l) => [...l, o]), y)), y.kind === "USER" && m((o) => ({ ...o, userId: y.id, userLabel: y.label })), y.kind === "ACTION" && m((o) => ({ ...o, action: y.label, resource: y.parentLabel }));
|
|
2963
|
+
}, []), A = ae(() => {
|
|
2964
|
+
T((y) => {
|
|
2965
|
+
const o = y[y.length - 1];
|
|
2966
|
+
return o ? (u(o), y.slice(0, -1)) : y;
|
|
2967
|
+
});
|
|
2968
|
+
}, []), w = ae(
|
|
2969
|
+
(y, o) => S({ kind: "USER", id: y, label: o }),
|
|
2970
|
+
[S]
|
|
2971
|
+
), E = (y) => /* @__PURE__ */ e(
|
|
2972
|
+
ze,
|
|
2772
2973
|
{
|
|
2773
|
-
onClick: () =>
|
|
2774
|
-
"aria-current":
|
|
2974
|
+
onClick: () => S(y),
|
|
2975
|
+
"aria-current": d.kind === y.kind ? "true" : void 0,
|
|
2775
2976
|
style: {
|
|
2776
2977
|
display: "block",
|
|
2777
2978
|
width: "100%",
|
|
2778
2979
|
padding: "6px 8px",
|
|
2779
2980
|
borderRadius: 5,
|
|
2780
|
-
background:
|
|
2981
|
+
background: d.kind === y.kind ? "var(--mantine-color-blue-light)" : void 0
|
|
2781
2982
|
},
|
|
2782
|
-
children: /* @__PURE__ */ e(
|
|
2983
|
+
children: /* @__PURE__ */ e(h, { size: "sm", fw: d.kind === y.kind ? 600 : 500, children: y.label })
|
|
2783
2984
|
},
|
|
2784
|
-
|
|
2785
|
-
),
|
|
2786
|
-
switch (
|
|
2985
|
+
y.id
|
|
2986
|
+
), v = () => {
|
|
2987
|
+
switch (d.kind) {
|
|
2787
2988
|
case "OVERVIEW":
|
|
2788
|
-
return /* @__PURE__ */ e(
|
|
2989
|
+
return /* @__PURE__ */ e(ba, { slots: n, onError: s });
|
|
2789
2990
|
case "SIMULATE":
|
|
2790
|
-
return /* @__PURE__ */ e(
|
|
2991
|
+
return /* @__PURE__ */ e(Yr, { slots: n, onError: s, initial: R });
|
|
2791
2992
|
case "USER":
|
|
2792
|
-
return /* @__PURE__ */ e(
|
|
2993
|
+
return /* @__PURE__ */ e(Jr, { slots: n, onError: s, userId: d.id });
|
|
2793
2994
|
case "GROUP":
|
|
2794
|
-
return /* @__PURE__ */ e(
|
|
2995
|
+
return /* @__PURE__ */ e(Sa, { id: d.id, kind: "GROUP", slots: n, onSelectUser: w });
|
|
2795
2996
|
case "PROFILE":
|
|
2796
|
-
return /* @__PURE__ */ e(
|
|
2997
|
+
return /* @__PURE__ */ e(Sa, { id: d.id, kind: "PROFILE", slots: n, onSelectUser: w });
|
|
2797
2998
|
case "ACTION":
|
|
2798
2999
|
return /* @__PURE__ */ e(
|
|
2799
|
-
|
|
3000
|
+
_r,
|
|
2800
3001
|
{
|
|
2801
|
-
id:
|
|
2802
|
-
label:
|
|
2803
|
-
slots:
|
|
2804
|
-
onSelectUser:
|
|
2805
|
-
onSimulate: () =>
|
|
3002
|
+
id: d.id,
|
|
3003
|
+
label: d.parentLabel ? `${d.parentLabel} · ${d.label}` : d.label,
|
|
3004
|
+
slots: n,
|
|
3005
|
+
onSelectUser: w,
|
|
3006
|
+
onSimulate: () => S(Aa)
|
|
2806
3007
|
}
|
|
2807
3008
|
);
|
|
2808
3009
|
case "RESOURCE":
|
|
2809
|
-
return /* @__PURE__ */ r(
|
|
2810
|
-
/* @__PURE__ */ e(
|
|
2811
|
-
/* @__PURE__ */ e(
|
|
3010
|
+
return /* @__PURE__ */ r(V, { gap: "xs", children: [
|
|
3011
|
+
/* @__PURE__ */ e(h, { fw: 620, size: "xl", ff: "monospace", children: d.label }),
|
|
3012
|
+
/* @__PURE__ */ e(h, { size: "sm", c: "dimmed", children: "Abra o recurso na árvore para ver as ações. Cada ação responde quem alcança." })
|
|
2812
3013
|
] });
|
|
2813
3014
|
default:
|
|
2814
|
-
return /* @__PURE__ */ e(
|
|
3015
|
+
return /* @__PURE__ */ e(ba, { slots: n, onError: s });
|
|
2815
3016
|
}
|
|
2816
3017
|
};
|
|
2817
3018
|
return (
|
|
@@ -2819,7 +3020,7 @@ const Ge = (a) => {
|
|
|
2819
3020
|
// não uma fração de doze, e o `minmax(0, 1fr)` é o que impede uma tabela larga no painel de
|
|
2820
3021
|
// empurrar a árvore para fora da tela.
|
|
2821
3022
|
/* @__PURE__ */ r(
|
|
2822
|
-
|
|
3023
|
+
_,
|
|
2823
3024
|
{
|
|
2824
3025
|
style: {
|
|
2825
3026
|
width: t,
|
|
@@ -2836,31 +3037,50 @@ const Ge = (a) => {
|
|
|
2836
3037
|
className: "archbase-security-explorer",
|
|
2837
3038
|
children: [
|
|
2838
3039
|
/* @__PURE__ */ e(
|
|
2839
|
-
|
|
3040
|
+
re,
|
|
2840
3041
|
{
|
|
2841
3042
|
withBorder: !0,
|
|
2842
3043
|
radius: "md",
|
|
2843
3044
|
p: "xs",
|
|
2844
3045
|
style: { display: "flex", flexDirection: "column", minHeight: 0, overflow: "hidden" },
|
|
2845
|
-
children: /* @__PURE__ */ r(
|
|
2846
|
-
|
|
2847
|
-
(
|
|
3046
|
+
children: /* @__PURE__ */ r(V, { gap: 2, style: { flex: 1, minHeight: 0 }, children: [
|
|
3047
|
+
n?.renderUserSearch ? /* @__PURE__ */ e(_, { mb: 4, children: n.renderUserSearch(
|
|
3048
|
+
(y) => S({ kind: "USER", id: y, label: y })
|
|
2848
3049
|
) }) : null,
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
/* @__PURE__ */ e(
|
|
2852
|
-
/* @__PURE__ */ e(
|
|
3050
|
+
E(Ta),
|
|
3051
|
+
E(Aa),
|
|
3052
|
+
/* @__PURE__ */ e(_, { my: 6, style: { borderTop: "1px solid var(--mantine-color-default-border)" } }),
|
|
3053
|
+
/* @__PURE__ */ e(ce, { type: "hover", style: { flex: 1, minHeight: 0 }, children: /* @__PURE__ */ e(at, { selected: d, onSelect: S }) })
|
|
2853
3054
|
] })
|
|
2854
3055
|
}
|
|
2855
3056
|
),
|
|
2856
|
-
/* @__PURE__ */
|
|
2857
|
-
|
|
3057
|
+
/* @__PURE__ */ r(
|
|
3058
|
+
re,
|
|
2858
3059
|
{
|
|
2859
3060
|
withBorder: !0,
|
|
2860
3061
|
radius: "md",
|
|
2861
3062
|
p: "md",
|
|
2862
|
-
style: { minWidth: 0, minHeight: 0,
|
|
2863
|
-
children:
|
|
3063
|
+
style: { minWidth: 0, minHeight: 0, display: "flex", flexDirection: "column", overflow: "hidden" },
|
|
3064
|
+
children: [
|
|
3065
|
+
c.length > 0 ? /* @__PURE__ */ r(O, { gap: 6, mb: "xs", style: { flexShrink: 0 }, children: [
|
|
3066
|
+
/* @__PURE__ */ e(
|
|
3067
|
+
X,
|
|
3068
|
+
{
|
|
3069
|
+
size: "compact-sm",
|
|
3070
|
+
variant: "subtle",
|
|
3071
|
+
onClick: A,
|
|
3072
|
+
leftSection: /* @__PURE__ */ e(rt, {}),
|
|
3073
|
+
"aria-label": "Voltar para o item anterior",
|
|
3074
|
+
children: "Voltar"
|
|
3075
|
+
}
|
|
3076
|
+
),
|
|
3077
|
+
/* @__PURE__ */ r(h, { size: "xs", c: "dimmed", truncate: !0, children: [
|
|
3078
|
+
"para ",
|
|
3079
|
+
c[c.length - 1]?.label
|
|
3080
|
+
] })
|
|
3081
|
+
] }) : null,
|
|
3082
|
+
/* @__PURE__ */ e(_, { style: { flex: 1, minHeight: 0, display: "flex", flexDirection: "column" }, children: v() })
|
|
3083
|
+
]
|
|
2864
3084
|
}
|
|
2865
3085
|
)
|
|
2866
3086
|
]
|
|
@@ -2869,29 +3089,29 @@ const Ge = (a) => {
|
|
|
2869
3089
|
);
|
|
2870
3090
|
};
|
|
2871
3091
|
export {
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
3092
|
+
_r as ActionNodePanel,
|
|
3093
|
+
Er as ApiTokenModal,
|
|
3094
|
+
gt as ArchbaseApiTokenView,
|
|
3095
|
+
Tr as ArchbaseDualListSelector,
|
|
3096
|
+
ft as ArchbaseSecurityDiagnosticsView,
|
|
3097
|
+
mt as ArchbaseSecurityView,
|
|
3098
|
+
Ur as AttributeList,
|
|
3099
|
+
Jr as EffectiveAccessPanel,
|
|
3100
|
+
Gr as FlagStrip,
|
|
3101
|
+
kr as GroupModal,
|
|
3102
|
+
Sa as GroupNodePanel,
|
|
3103
|
+
Mr as MetricCard,
|
|
3104
|
+
Vr as MetricCards,
|
|
3105
|
+
Wr as OverviewItemsDrawer,
|
|
3106
|
+
ba as OverviewPanel,
|
|
3107
|
+
Xe as PermissionsSelectorModal,
|
|
3108
|
+
xr as ProfileModal,
|
|
3109
|
+
Ar as RenderProfileUserItem,
|
|
2890
3110
|
ve as Section,
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
3111
|
+
at as SecurityTree,
|
|
3112
|
+
Yr as SimulationPanel,
|
|
3113
|
+
Oe as TabelaRolavel,
|
|
3114
|
+
zr as UserModal,
|
|
3115
|
+
Ue as severityColor,
|
|
3116
|
+
Da as situacaoBadge
|
|
2897
3117
|
};
|