@archbase/security 3.0.9 → 3.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +391 -382
- package/package.json +9 -9
- package/dist/archbase-security-3.0.9.tgz +0 -0
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import "reflect-metadata";
|
|
2
2
|
import * as I from "inversify";
|
|
3
|
-
import { decorate as
|
|
4
|
-
import { compressString as
|
|
3
|
+
import { decorate as xt, injectable as kt } from "inversify";
|
|
4
|
+
import { compressString as St, decompressString as It, IOCContainer as Pt, ARCHBASE_IOC_API_TYPE as G, processErrorMessage as ee, IsNotEmpty as J, IsOptional as re, IsBoolean as q, IsEmail as Tt, getKeyByEnumValue as Ve, useArchbasePasswordRemember as Ct, getI18nextInstance as S, useArchbaseTheme as Ut, isEmailValidate as _t, useArchbaseAppContext as Dt } from "@archbase/core";
|
|
5
5
|
import F from "crypto-js";
|
|
6
|
-
import { jwtDecode as
|
|
7
|
-
import { jsx as
|
|
8
|
-
import Ge, { useState as f, useEffect as z, createContext as Re, useMemo as
|
|
6
|
+
import { jwtDecode as Rt } from "jwt-decode";
|
|
7
|
+
import { jsx as d, jsxs as R, Fragment as te } from "react/jsx-runtime";
|
|
8
|
+
import Ge, { useState as f, useEffect as z, createContext as Re, useMemo as Je, useRef as Ke, useCallback as pe, useContext as Ne } from "react";
|
|
9
9
|
import { BehaviorSubject as ze } from "rxjs";
|
|
10
|
-
import { ArchbaseRemoteApiService as ce, useArchbaseStore as
|
|
10
|
+
import { ArchbaseRemoteApiService as ce, useArchbaseStore as qe } from "@archbase/data";
|
|
11
11
|
import { v4 as K } from "uuid";
|
|
12
|
-
import { Card as
|
|
13
|
-
import { useFocusTrap as
|
|
12
|
+
import { Card as Ye, Text as se, Divider as ye, Group as we, Select as Nt, Tooltip as Bt, Button as ie, TextInput as Ce, Loader as Xe, PasswordInput as Ue, Checkbox as Mt, Anchor as Ot, useMantineColorScheme as Lt, Box as $t, Stack as jt, Skeleton as fe } from "@mantine/core";
|
|
13
|
+
import { useFocusTrap as Qe } from "@mantine/hooks";
|
|
14
14
|
import { IconCopy as Ft } from "@tabler/icons-react";
|
|
15
15
|
import { ArchbaseDialog as We } from "@archbase/components";
|
|
16
16
|
import { useContainer as ve } from "inversify-react";
|
|
17
|
-
class
|
|
17
|
+
class Ze {
|
|
18
18
|
id;
|
|
19
19
|
displayName;
|
|
20
20
|
email;
|
|
@@ -24,10 +24,10 @@ class Xe {
|
|
|
24
24
|
this.id = e.id, this.displayName = e.displayName, this.email = e.email, this.photo = e.photo, this.isAdmin = e.isAdmin;
|
|
25
25
|
}
|
|
26
26
|
static newInstance() {
|
|
27
|
-
return new
|
|
27
|
+
return new Ze({});
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
class
|
|
30
|
+
class et {
|
|
31
31
|
username;
|
|
32
32
|
password;
|
|
33
33
|
remember;
|
|
@@ -35,10 +35,10 @@ class Qe {
|
|
|
35
35
|
this.username = e.username, this.password = e.password, this.remember = e.remember;
|
|
36
36
|
}
|
|
37
37
|
static newInstance() {
|
|
38
|
-
return new
|
|
38
|
+
return new et({});
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
const Q = "YngzI1guK3dGaElFcFY9MywqK3xgPzg/Ojg7eD8xRmg=",
|
|
41
|
+
const Q = "YngzI1guK3dGaElFcFY9MywqK3xgPzg/Ojg7eD8xRmg=", Se = "c1ab58e7-c113-4225-a190-a9e59d1207fc", Ie = "6faf6932-a0b5-457b-83b1-8d89ddbd91fd", Pe = "602b05c5-ec46-451e-aba6-187e463bc245", Te = "8b4a7c2d-9e5f-4163-b8a7-3f2c9d8e5a1b";
|
|
42
42
|
class Vt {
|
|
43
43
|
getUsernameAndPassword() {
|
|
44
44
|
try {
|
|
@@ -77,19 +77,19 @@ class Vt {
|
|
|
77
77
|
if (!s && !this.getToken())
|
|
78
78
|
return !0;
|
|
79
79
|
try {
|
|
80
|
-
const o =
|
|
80
|
+
const o = Rt(s.access_token);
|
|
81
81
|
if (!o)
|
|
82
82
|
return !0;
|
|
83
|
-
const a = Math.floor(Date.now() / 1e3),
|
|
84
|
-
return a >
|
|
83
|
+
const a = Math.floor(Date.now() / 1e3), l = o.exp;
|
|
84
|
+
return a > l - t;
|
|
85
85
|
} catch {
|
|
86
86
|
return !0;
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
saveToken(e) {
|
|
90
90
|
if (e) {
|
|
91
|
-
const t = JSON.stringify(e), s = F.AES.encrypt(t, Q).toString(), o =
|
|
92
|
-
localStorage.setItem(
|
|
91
|
+
const t = JSON.stringify(e), s = F.AES.encrypt(t, Q).toString(), o = St(s);
|
|
92
|
+
localStorage.setItem(Se, o);
|
|
93
93
|
} else
|
|
94
94
|
this.clearToken();
|
|
95
95
|
}
|
|
@@ -97,14 +97,14 @@ class Vt {
|
|
|
97
97
|
localStorage.removeItem(Ie), localStorage.removeItem(Pe);
|
|
98
98
|
}
|
|
99
99
|
clearToken() {
|
|
100
|
-
localStorage.removeItem(
|
|
100
|
+
localStorage.removeItem(Se);
|
|
101
101
|
}
|
|
102
102
|
getToken() {
|
|
103
103
|
try {
|
|
104
|
-
const e = localStorage.getItem(
|
|
104
|
+
const e = localStorage.getItem(Se);
|
|
105
105
|
if (!e)
|
|
106
106
|
return null;
|
|
107
|
-
const t =
|
|
107
|
+
const t = It(e), s = F.AES.decrypt(t, Q).toString(F.enc.Utf8);
|
|
108
108
|
return JSON.parse(s);
|
|
109
109
|
} catch {
|
|
110
110
|
return null;
|
|
@@ -130,16 +130,16 @@ class Vt {
|
|
|
130
130
|
localStorage.removeItem(Te);
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
|
|
134
|
-
function
|
|
133
|
+
xt(kt(), Vt);
|
|
134
|
+
function tt(r) {
|
|
135
135
|
const t = new Uint8Array(1);
|
|
136
|
-
return window.crypto.getRandomValues(t), t[0] >= Math.floor(256 / r) * r ?
|
|
136
|
+
return window.crypto.getRandomValues(t), t[0] >= Math.floor(256 / r) * r ? tt(r) : t[0] % r;
|
|
137
137
|
}
|
|
138
138
|
function zt(r) {
|
|
139
139
|
let e = "";
|
|
140
140
|
const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
141
141
|
for (let s = 0; s < r; s++)
|
|
142
|
-
e += t.charAt(
|
|
142
|
+
e += t.charAt(tt(t.length - 1));
|
|
143
143
|
return e;
|
|
144
144
|
}
|
|
145
145
|
async function Wt(r) {
|
|
@@ -150,7 +150,7 @@ async function Wt(r) {
|
|
|
150
150
|
const t = new TextEncoder().encode(r), s = await window.crypto.subtle.digest("SHA-256", t), o = String.fromCharCode(...new Uint8Array(s));
|
|
151
151
|
return btoa(o).replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_");
|
|
152
152
|
}
|
|
153
|
-
class
|
|
153
|
+
class rt extends Error {
|
|
154
154
|
status;
|
|
155
155
|
statusText;
|
|
156
156
|
constructor(e, t, s) {
|
|
@@ -171,15 +171,15 @@ async function Gt(r, e) {
|
|
|
171
171
|
}).then(async (t) => {
|
|
172
172
|
if (!t.ok) {
|
|
173
173
|
const s = await t.text();
|
|
174
|
-
throw new
|
|
174
|
+
throw new rt(t.status, t.statusText, s);
|
|
175
175
|
}
|
|
176
176
|
return t;
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
|
-
const
|
|
179
|
+
const st = "PKCE_code_verifier", _e = "ROCP_auth_state";
|
|
180
180
|
async function Jt(r, e) {
|
|
181
181
|
const t = zt(96);
|
|
182
|
-
return sessionStorage.setItem(
|
|
182
|
+
return sessionStorage.setItem(st, t), Wt(t).then((s) => {
|
|
183
183
|
const o = new URLSearchParams({
|
|
184
184
|
response_type: "code",
|
|
185
185
|
client_id: r.clientId,
|
|
@@ -188,15 +188,15 @@ async function Jt(r, e) {
|
|
|
188
188
|
code_challenge_method: "S256",
|
|
189
189
|
...r.extraAuthParameters
|
|
190
190
|
});
|
|
191
|
-
r.scope !== void 0 && o.append("scope", r.scope), sessionStorage.removeItem(
|
|
191
|
+
r.scope !== void 0 && o.append("scope", r.scope), sessionStorage.removeItem(_e);
|
|
192
192
|
const a = e ?? r.state;
|
|
193
|
-
a && (sessionStorage.setItem(
|
|
193
|
+
a && (sessionStorage.setItem(_e, a), o.append("state", a)), r?.preLogin && r.preLogin(), window.location.replace(`${r.authorizationEndpoint}?${o.toString()}`);
|
|
194
194
|
});
|
|
195
195
|
}
|
|
196
196
|
function Kt(r) {
|
|
197
197
|
return r.access_token !== void 0;
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function ot(r, e) {
|
|
200
200
|
return Gt(r, e).then((t) => t.json().then((s) => {
|
|
201
201
|
if (Kt(s))
|
|
202
202
|
return s;
|
|
@@ -204,7 +204,7 @@ function rt(r, e) {
|
|
|
204
204
|
}));
|
|
205
205
|
}
|
|
206
206
|
const qt = (r) => {
|
|
207
|
-
const t = new URLSearchParams(window.location.search).get("code"), s = window.sessionStorage.getItem(
|
|
207
|
+
const t = new URLSearchParams(window.location.search).get("code"), s = window.sessionStorage.getItem(st);
|
|
208
208
|
if (!t)
|
|
209
209
|
throw Error(`Parâmetro 'código' não encontrado na URL.
|
|
210
210
|
A autenticação ocorreu?`);
|
|
@@ -221,7 +221,7 @@ A autenticação ocorreu?`);
|
|
|
221
221
|
...r.extraTokenParameters,
|
|
222
222
|
...r.extraAuthParams
|
|
223
223
|
};
|
|
224
|
-
return
|
|
224
|
+
return ot(r.tokenEndpoint, o);
|
|
225
225
|
}, Yt = (r) => {
|
|
226
226
|
const { config: e, refreshToken: t } = r, s = {
|
|
227
227
|
grant_type: "refresh_token",
|
|
@@ -231,10 +231,10 @@ A autenticação ocorreu?`);
|
|
|
231
231
|
redirect_uri: e.redirectUri,
|
|
232
232
|
...e.extraTokenParameters
|
|
233
233
|
};
|
|
234
|
-
return
|
|
234
|
+
return ot(e.tokenEndpoint, s);
|
|
235
235
|
};
|
|
236
236
|
function Xt(r, e, t, s, o, a) {
|
|
237
|
-
const
|
|
237
|
+
const l = new URLSearchParams({
|
|
238
238
|
token: t || e,
|
|
239
239
|
token_type_hint: t ? "refresh_token" : "access_token",
|
|
240
240
|
client_id: r.clientId,
|
|
@@ -242,10 +242,10 @@ function Xt(r, e, t, s, o, a) {
|
|
|
242
242
|
ui_locales: window.navigator.languages.reduce((i, u) => i + " " + u),
|
|
243
243
|
...r.extraLogoutParameters
|
|
244
244
|
});
|
|
245
|
-
s &&
|
|
245
|
+
s && l.append("id_token_hint", s), o && l.append("state", o), a && l.append("logout_hint", a), window.location.replace(`${r.logoutEndpoint}?${l.toString()}`);
|
|
246
246
|
}
|
|
247
247
|
function Qt(r) {
|
|
248
|
-
const e = r.get("state"), t = sessionStorage.getItem(
|
|
248
|
+
const e = r.get("state"), t = sessionStorage.getItem(_e);
|
|
249
249
|
if (e !== t)
|
|
250
250
|
throw new Error(
|
|
251
251
|
'"state" valor recebido do servidor de autenticação não corresponde à solicitação do cliente. Possível falsificação de solicitação entre sites'
|
|
@@ -263,7 +263,7 @@ Continuando com o valor padrão.
|
|
|
263
263
|
Error: ${u.message}`
|
|
264
264
|
), e;
|
|
265
265
|
}
|
|
266
|
-
}),
|
|
266
|
+
}), l = (i) => {
|
|
267
267
|
if (i === void 0) {
|
|
268
268
|
a(i), s.removeItem(r);
|
|
269
269
|
return;
|
|
@@ -280,9 +280,9 @@ Error: ${u.message}`
|
|
|
280
280
|
u.storageArea === s && u.key === r && a(JSON.parse(u.newValue ?? ""));
|
|
281
281
|
};
|
|
282
282
|
return window.addEventListener("storage", i, !1), () => window.removeEventListener("storage", i, !1);
|
|
283
|
-
}), [o,
|
|
283
|
+
}), [o, l];
|
|
284
284
|
}
|
|
285
|
-
const
|
|
285
|
+
const Tr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
286
286
|
__proto__: null,
|
|
287
287
|
default: Z
|
|
288
288
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -296,21 +296,21 @@ function Zt(r) {
|
|
|
296
296
|
decodeToken: s = !0,
|
|
297
297
|
scope: o = void 0,
|
|
298
298
|
preLogin: a = () => null,
|
|
299
|
-
postLogin:
|
|
299
|
+
postLogin: l = () => null,
|
|
300
300
|
onRefreshTokenExpire: i = void 0,
|
|
301
301
|
storage: u = "local"
|
|
302
|
-
} = r,
|
|
302
|
+
} = r, m = {
|
|
303
303
|
...r,
|
|
304
304
|
autoLogin: e,
|
|
305
305
|
clearURL: t,
|
|
306
306
|
decodeToken: s,
|
|
307
307
|
scope: o,
|
|
308
308
|
preLogin: a,
|
|
309
|
-
postLogin:
|
|
309
|
+
postLogin: l,
|
|
310
310
|
onRefreshTokenExpire: i,
|
|
311
311
|
storage: u
|
|
312
312
|
};
|
|
313
|
-
return er(
|
|
313
|
+
return er(m), m;
|
|
314
314
|
}
|
|
315
315
|
function er(r) {
|
|
316
316
|
if (me(r?.clientId))
|
|
@@ -374,16 +374,16 @@ const ge = (r) => {
|
|
|
374
374
|
logOut: () => null,
|
|
375
375
|
error: null,
|
|
376
376
|
loginInProgress: !1
|
|
377
|
-
}),
|
|
378
|
-
const t =
|
|
377
|
+
}), Cr = ({ authConfig: r, children: e }) => {
|
|
378
|
+
const t = Je(() => Zt(r), [r]), [s, o] = Z(
|
|
379
379
|
"ROCP_refreshToken",
|
|
380
380
|
void 0,
|
|
381
381
|
t.storage
|
|
382
|
-
), [a,
|
|
382
|
+
), [a, l] = Z(
|
|
383
383
|
"ROCP_refreshTokenExpire",
|
|
384
384
|
oe(2 * ne),
|
|
385
385
|
t.storage
|
|
386
|
-
), [i, u] = Z("ROCP_token", "", t.storage), [
|
|
386
|
+
), [i, u] = Z("ROCP_token", "", t.storage), [m, b] = Z(
|
|
387
387
|
"ROCP_tokenExpire",
|
|
388
388
|
oe(ne),
|
|
389
389
|
t.storage
|
|
@@ -391,37 +391,37 @@ const ge = (r) => {
|
|
|
391
391
|
"ROCP_idToken",
|
|
392
392
|
void 0,
|
|
393
393
|
t.storage
|
|
394
|
-
), [
|
|
394
|
+
), [E, y] = Z(
|
|
395
395
|
"ROCP_loginInProgress",
|
|
396
396
|
!1,
|
|
397
397
|
t.storage
|
|
398
|
-
), [
|
|
398
|
+
), [x, U] = Z(
|
|
399
399
|
"ROCP_refreshInProgress",
|
|
400
400
|
!1,
|
|
401
401
|
t.storage
|
|
402
|
-
), [
|
|
402
|
+
), [_, O] = f(), [D, N] = f(), [k, A] = f(null);
|
|
403
403
|
let P;
|
|
404
404
|
function W() {
|
|
405
|
-
o(void 0), u(""),
|
|
405
|
+
o(void 0), u(""), b(oe(ne)), l(oe(ne)), C(void 0), O(void 0), N(void 0), y(!1);
|
|
406
406
|
}
|
|
407
407
|
function L(p, n) {
|
|
408
|
-
W(),
|
|
408
|
+
W(), A(null), t?.logoutEndpoint && Xt(t, i, s, h, p, n);
|
|
409
409
|
}
|
|
410
410
|
function B(p) {
|
|
411
|
-
W(),
|
|
411
|
+
W(), y(!0);
|
|
412
412
|
let n = p;
|
|
413
413
|
p && typeof p != "string" && (console.warn(
|
|
414
414
|
`O estado de login aprovado deve ser do tipo 'string'. Recebido'${p}'. Ignorando o valor...`
|
|
415
415
|
), n = void 0), Jt(t, n).catch((w) => {
|
|
416
|
-
console.error(w),
|
|
416
|
+
console.error(w), A(w.message), y(!1);
|
|
417
417
|
});
|
|
418
418
|
}
|
|
419
419
|
function H(p) {
|
|
420
420
|
u(p.access_token), o(p.refresh_token);
|
|
421
421
|
const n = t.tokenExpiresIn ?? p.expires_in ?? ne;
|
|
422
|
-
|
|
422
|
+
b(oe(n));
|
|
423
423
|
const w = t.refreshTokenExpiresIn ?? rr(n, p);
|
|
424
|
-
|
|
424
|
+
l(oe(w)), C(p.id_token);
|
|
425
425
|
try {
|
|
426
426
|
p.id_token && N(ge(p.id_token));
|
|
427
427
|
} catch (c) {
|
|
@@ -437,17 +437,17 @@ const ge = (r) => {
|
|
|
437
437
|
return p || !t.onRefreshTokenExpire ? B() : t.onRefreshTokenExpire({ login: B });
|
|
438
438
|
}
|
|
439
439
|
function $(p = !1) {
|
|
440
|
-
if (i && He(
|
|
440
|
+
if (i && He(m) && !(x && !p)) {
|
|
441
441
|
if (He(a))
|
|
442
442
|
return Y(p);
|
|
443
443
|
if (s) {
|
|
444
444
|
U(!0), Yt({ config: t, refreshToken: s }).then((n) => H(n)).catch((n) => {
|
|
445
|
-
if (n instanceof
|
|
445
|
+
if (n instanceof rt) {
|
|
446
446
|
if (n.status === 400)
|
|
447
447
|
return Y(p);
|
|
448
|
-
console.error(n),
|
|
448
|
+
console.error(n), A(n.message), p && B();
|
|
449
449
|
} else
|
|
450
|
-
n instanceof Error && (console.error(n),
|
|
450
|
+
n instanceof Error && (console.error(n), A(n.message), p && B());
|
|
451
451
|
}).finally(() => {
|
|
452
452
|
U(!1);
|
|
453
453
|
});
|
|
@@ -458,14 +458,14 @@ const ge = (r) => {
|
|
|
458
458
|
);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
z(() => (P = setInterval(() => $(), 1e4), () => clearInterval(P)), [i, s, a,
|
|
462
|
-
const X =
|
|
461
|
+
z(() => (P = setInterval(() => $(), 1e4), () => clearInterval(P)), [i, s, a, m]);
|
|
462
|
+
const X = Ke(!1);
|
|
463
463
|
return z(() => {
|
|
464
|
-
if (
|
|
464
|
+
if (E) {
|
|
465
465
|
const p = new URLSearchParams(window.location.search);
|
|
466
466
|
if (!p.get("code")) {
|
|
467
467
|
const n = p.get("error_description") || "Estado de autorização inválido. Atualizar a página pode resolver o problema.";
|
|
468
|
-
console.error(n),
|
|
468
|
+
console.error(n), A(n), L();
|
|
469
469
|
return;
|
|
470
470
|
}
|
|
471
471
|
if (!X.current) {
|
|
@@ -473,14 +473,14 @@ const ge = (r) => {
|
|
|
473
473
|
try {
|
|
474
474
|
Qt(p);
|
|
475
475
|
} catch (n) {
|
|
476
|
-
console.error(n),
|
|
476
|
+
console.error(n), A(n.message);
|
|
477
477
|
}
|
|
478
478
|
qt(t).then((n) => {
|
|
479
479
|
H(n), t?.postLogin && t.postLogin();
|
|
480
480
|
}).catch((n) => {
|
|
481
|
-
console.error(n),
|
|
481
|
+
console.error(n), A(n.message);
|
|
482
482
|
}).finally(() => {
|
|
483
|
-
t.clearURL && window.history.replaceState(null, "", window.location.pathname),
|
|
483
|
+
t.clearURL && window.history.replaceState(null, "", window.location.pathname), y(!1);
|
|
484
484
|
});
|
|
485
485
|
}
|
|
486
486
|
return;
|
|
@@ -498,15 +498,15 @@ const ge = (r) => {
|
|
|
498
498
|
console.warn(`Falha ao decodificar o token de acesso: ${p.message}`);
|
|
499
499
|
}
|
|
500
500
|
$(!0);
|
|
501
|
-
}, []), /* @__PURE__ */
|
|
501
|
+
}, []), /* @__PURE__ */ d(
|
|
502
502
|
sr.Provider,
|
|
503
503
|
{
|
|
504
|
-
value: { token: i, tokenData:
|
|
504
|
+
value: { token: i, tokenData: _, idToken: h, idTokenData: D, login: B, logOut: L, error: k, loginInProgress: E },
|
|
505
505
|
children: e
|
|
506
506
|
}
|
|
507
507
|
);
|
|
508
508
|
};
|
|
509
|
-
class
|
|
509
|
+
class nt {
|
|
510
510
|
resourceService;
|
|
511
511
|
resource;
|
|
512
512
|
actions;
|
|
@@ -515,7 +515,7 @@ class st {
|
|
|
515
515
|
error;
|
|
516
516
|
isAdmin;
|
|
517
517
|
constructor(e, t, s) {
|
|
518
|
-
this.resourceService =
|
|
518
|
+
this.resourceService = Pt.getContainer().get(G.Resource), this.resource = { resourceName: e, resourceDescription: t }, this.alreadyApplied = !1, this.actions = [], this.permissions = [], this.error = "", this.isAdmin = s;
|
|
519
519
|
}
|
|
520
520
|
registerAction(e, t) {
|
|
521
521
|
!this.alreadyApplied && this.actions.findIndex((s) => s.actionName === e) < 0 && this.actions.push({ actionName: e, actionDescription: t });
|
|
@@ -629,15 +629,15 @@ class V {
|
|
|
629
629
|
return t && (e["X-TENANT-ID"] = t.id), e;
|
|
630
630
|
}
|
|
631
631
|
}
|
|
632
|
-
function
|
|
632
|
+
function Ur() {
|
|
633
633
|
return V.getInstance();
|
|
634
634
|
}
|
|
635
635
|
var ae = /* @__PURE__ */ ((r) => (r.USER = "user", r.PROFILE = "profile", r.GROUP = "group", r))(ae || {}), or = Object.defineProperty, v = (r, e, t, s) => {
|
|
636
|
-
for (var o = void 0, a = r.length - 1,
|
|
637
|
-
(
|
|
636
|
+
for (var o = void 0, a = r.length - 1, l; a >= 0; a--)
|
|
637
|
+
(l = r[a]) && (o = l(e, t, o) || o);
|
|
638
638
|
return o && or(e, t, o), o;
|
|
639
639
|
}, nr = /* @__PURE__ */ ((r) => (r.VIEW = "VIEW", r.API = "API", r))(nr || {});
|
|
640
|
-
const
|
|
640
|
+
const it = class at {
|
|
641
641
|
id;
|
|
642
642
|
code;
|
|
643
643
|
version;
|
|
@@ -650,7 +650,7 @@ const ot = class nt {
|
|
|
650
650
|
constructor(e) {
|
|
651
651
|
this.id = e.id || "", this.code = e.code || "", this.version = e.version || 0, this.createEntityDate = e.createEntityDate || "", this.updateEntityDate = e.updateEntityDate || "", this.createdByUser = e.createdByUser || "", this.lastModifiedByUser = e.lastModifiedByUser || "", this.description = e.description || "", this.intervals = e.intervals ? e.intervals.map((t) => new ir(t)) : [];
|
|
652
652
|
}
|
|
653
|
-
static newInstance = () => new
|
|
653
|
+
static newInstance = () => new at({
|
|
654
654
|
id: K(),
|
|
655
655
|
intervals: []
|
|
656
656
|
});
|
|
@@ -659,9 +659,9 @@ v([
|
|
|
659
659
|
J({
|
|
660
660
|
message: "archbase:Informe a descrição do cronograma de acesso"
|
|
661
661
|
})
|
|
662
|
-
],
|
|
663
|
-
let
|
|
664
|
-
const
|
|
662
|
+
], it.prototype, "description");
|
|
663
|
+
let ct = it;
|
|
664
|
+
const Ae = class lt {
|
|
665
665
|
id;
|
|
666
666
|
code;
|
|
667
667
|
version;
|
|
@@ -674,9 +674,9 @@ const be = class at {
|
|
|
674
674
|
startTime;
|
|
675
675
|
endTime;
|
|
676
676
|
constructor(e) {
|
|
677
|
-
this.id = e.id || "", this.code = e.code || "", this.version = e.version || 0, this.createEntityDate = e.createEntityDate || (/* @__PURE__ */ new Date()).toISOString(), this.updateEntityDate = e.updateEntityDate || (/* @__PURE__ */ new Date()).toISOString(), this.createdByUser = e.createdByUser || "", this.lastModifiedByUser = e.lastModifiedByUser || "", this.accessSchedule = e.accessSchedule ? new
|
|
677
|
+
this.id = e.id || "", this.code = e.code || "", this.version = e.version || 0, this.createEntityDate = e.createEntityDate || (/* @__PURE__ */ new Date()).toISOString(), this.updateEntityDate = e.updateEntityDate || (/* @__PURE__ */ new Date()).toISOString(), this.createdByUser = e.createdByUser || "", this.lastModifiedByUser = e.lastModifiedByUser || "", this.accessSchedule = e.accessSchedule ? new ct(e.accessSchedule) : void 0, this.dayOfWeek = e.dayOfWeek || 0, this.startTime = e.startTime || "", this.endTime = e.endTime || "";
|
|
678
678
|
}
|
|
679
|
-
static newInstance = () => new
|
|
679
|
+
static newInstance = () => new lt({
|
|
680
680
|
id: K(),
|
|
681
681
|
dayOfWeek: (/* @__PURE__ */ new Date()).getDay(),
|
|
682
682
|
startTime: "08:00",
|
|
@@ -685,18 +685,18 @@ const be = class at {
|
|
|
685
685
|
};
|
|
686
686
|
v([
|
|
687
687
|
re()
|
|
688
|
-
],
|
|
688
|
+
], Ae.prototype, "accessSchedule");
|
|
689
689
|
v([
|
|
690
690
|
J({
|
|
691
691
|
message: "archbase:Informe a hora de início"
|
|
692
692
|
})
|
|
693
|
-
],
|
|
693
|
+
], Ae.prototype, "startTime");
|
|
694
694
|
v([
|
|
695
695
|
J({
|
|
696
696
|
message: "archbase:Informe a hora de término"
|
|
697
697
|
})
|
|
698
|
-
],
|
|
699
|
-
let ir =
|
|
698
|
+
], Ae.prototype, "endTime");
|
|
699
|
+
let ir = Ae;
|
|
700
700
|
class le {
|
|
701
701
|
id;
|
|
702
702
|
code;
|
|
@@ -725,7 +725,7 @@ v([
|
|
|
725
725
|
v([
|
|
726
726
|
re()
|
|
727
727
|
], le.prototype, "actions");
|
|
728
|
-
const de = class
|
|
728
|
+
const de = class dt {
|
|
729
729
|
id;
|
|
730
730
|
code;
|
|
731
731
|
version;
|
|
@@ -741,9 +741,9 @@ const de = class ct {
|
|
|
741
741
|
actionVersion;
|
|
742
742
|
isNewAction;
|
|
743
743
|
constructor(e) {
|
|
744
|
-
this.id = e.id || "", this.code = e.code || "", this.version = e.version || 0, this.createEntityDate = e.createEntityDate || (/* @__PURE__ */ new Date()).toISOString(), this.updateEntityDate = e.updateEntityDate || (/* @__PURE__ */ new Date()).toISOString(), this.createdByUser = e.createdByUser || "", this.lastModifiedByUser = e.lastModifiedByUser || "", this.name = e.name || "", this.description = e.description || "", this.resource = e.resource ? new
|
|
744
|
+
this.id = e.id || "", this.code = e.code || "", this.version = e.version || 0, this.createEntityDate = e.createEntityDate || (/* @__PURE__ */ new Date()).toISOString(), this.updateEntityDate = e.updateEntityDate || (/* @__PURE__ */ new Date()).toISOString(), this.createdByUser = e.createdByUser || "", this.lastModifiedByUser = e.lastModifiedByUser || "", this.name = e.name || "", this.description = e.description || "", this.resource = e.resource ? new ht(e.resource) : void 0, this.category = e.category || "", this.active = e.active || !1, this.actionVersion = e.actionVersion || "", this.isNewAction = e.isNewAction || !1;
|
|
745
745
|
}
|
|
746
|
-
static newInstance = () => new
|
|
746
|
+
static newInstance = () => new dt({
|
|
747
747
|
id: K(),
|
|
748
748
|
active: !0,
|
|
749
749
|
isNewAction: !0
|
|
@@ -810,7 +810,7 @@ class he extends le {
|
|
|
810
810
|
isNewGroup: !0
|
|
811
811
|
});
|
|
812
812
|
}
|
|
813
|
-
const
|
|
813
|
+
const be = class ut {
|
|
814
814
|
id;
|
|
815
815
|
code;
|
|
816
816
|
version;
|
|
@@ -827,7 +827,7 @@ const Ae = class lt {
|
|
|
827
827
|
constructor(e) {
|
|
828
828
|
this.id = e.id || "", this.code = e.code || "", this.version = e.version || 0, this.createEntityDate = e.createEntityDate || "", this.updateEntityDate = e.updateEntityDate || "", this.createdByUser = e.createdByUser || "", this.lastModifiedByUser = e.lastModifiedByUser || "", this.name = e.name || "", this.description = e.description || "", this.actions = e.actions || [], this.active = e.active || !1, this.type = e.type || "VIEW", this.isNewResource = e.isNewResource || !1;
|
|
829
829
|
}
|
|
830
|
-
static newInstance = () => new
|
|
830
|
+
static newInstance = () => new ut({
|
|
831
831
|
id: K(),
|
|
832
832
|
actions: [],
|
|
833
833
|
active: !0,
|
|
@@ -838,17 +838,17 @@ v([
|
|
|
838
838
|
J({
|
|
839
839
|
message: "archbase:Informe o nome para o recurso"
|
|
840
840
|
})
|
|
841
|
-
],
|
|
841
|
+
], be.prototype, "name");
|
|
842
842
|
v([
|
|
843
843
|
J({
|
|
844
844
|
message: "archbase:Informe a descrição para o recurso"
|
|
845
845
|
})
|
|
846
|
-
],
|
|
846
|
+
], be.prototype, "description");
|
|
847
847
|
v([
|
|
848
848
|
q()
|
|
849
|
-
],
|
|
850
|
-
let
|
|
851
|
-
const M = class
|
|
849
|
+
], be.prototype, "active");
|
|
850
|
+
let ht = be;
|
|
851
|
+
const M = class pt extends le {
|
|
852
852
|
userName;
|
|
853
853
|
password;
|
|
854
854
|
changePasswordOnNextLogin;
|
|
@@ -868,9 +868,9 @@ const M = class ut extends le {
|
|
|
868
868
|
type;
|
|
869
869
|
isNewUser;
|
|
870
870
|
constructor(e) {
|
|
871
|
-
super(e), this.type = ae.USER, this.userName = e.userName || "", this.password = e.password || "", this.changePasswordOnNextLogin = e.changePasswordOnNextLogin || !1, this.allowPasswordChange = e.allowPasswordChange || !1, this.allowMultipleLogins = e.allowMultipleLogins || !1, this.passwordNeverExpires = e.passwordNeverExpires || !1, this.accountDeactivated = e.accountDeactivated || !1, this.accountLocked = e.accountLocked || !1, this.unlimitedAccessHours = e.unlimitedAccessHours || !1, this.isAdministrator = e.isAdministrator || !1, this.accessSchedule = e.accessSchedule ? new
|
|
871
|
+
super(e), this.type = ae.USER, this.userName = e.userName || "", this.password = e.password || "", this.changePasswordOnNextLogin = e.changePasswordOnNextLogin || !1, this.allowPasswordChange = e.allowPasswordChange || !1, this.allowMultipleLogins = e.allowMultipleLogins || !1, this.passwordNeverExpires = e.passwordNeverExpires || !1, this.accountDeactivated = e.accountDeactivated || !1, this.accountLocked = e.accountLocked || !1, this.unlimitedAccessHours = e.unlimitedAccessHours || !1, this.isAdministrator = e.isAdministrator || !1, this.accessSchedule = e.accessSchedule ? new ct(e.accessSchedule) : void 0, this.groups = e.groups ? e.groups.map((t) => new Be(t)) : [], this.profile = e.profile ? new ue(e.profile) : void 0, this.email = e.email || "", this.avatar = e.avatar || void 0, this.isNewUser = e.isNewUser || !1, this.nickname = e.nickname;
|
|
872
872
|
}
|
|
873
|
-
static newInstance = () => new
|
|
873
|
+
static newInstance = () => new pt({
|
|
874
874
|
id: K(),
|
|
875
875
|
userName: "",
|
|
876
876
|
password: "",
|
|
@@ -921,7 +921,7 @@ v([
|
|
|
921
921
|
re()
|
|
922
922
|
], M.prototype, "profile");
|
|
923
923
|
v([
|
|
924
|
-
|
|
924
|
+
Tt(
|
|
925
925
|
{},
|
|
926
926
|
{
|
|
927
927
|
message: "archbase:Informe um email válido"
|
|
@@ -929,7 +929,7 @@ v([
|
|
|
929
929
|
)
|
|
930
930
|
], M.prototype, "email");
|
|
931
931
|
let Ee = M;
|
|
932
|
-
const Me = class
|
|
932
|
+
const Me = class De {
|
|
933
933
|
id;
|
|
934
934
|
code;
|
|
935
935
|
version;
|
|
@@ -943,7 +943,7 @@ const Me = class _e {
|
|
|
943
943
|
companyId;
|
|
944
944
|
projectId;
|
|
945
945
|
constructor(e) {
|
|
946
|
-
this.id = e.id || "", this.code = e.code || "", this.version = e.version || 0, this.createEntityDate = e.createEntityDate || "", this.updateEntityDate = e.updateEntityDate || "", this.createdByUser = e.createdByUser || "", this.lastModifiedByUser = e.lastModifiedByUser || "", this.security = e.security ?
|
|
946
|
+
this.id = e.id || "", this.code = e.code || "", this.version = e.version || 0, this.createEntityDate = e.createEntityDate || "", this.updateEntityDate = e.updateEntityDate || "", this.createdByUser = e.createdByUser || "", this.lastModifiedByUser = e.lastModifiedByUser || "", this.security = e.security ? De.createDtoFromJson(e.security) : void 0, this.action = e.action ? new ar(e.action) : void 0, this.tenantId = e.tenantId || "", this.companyId = e.companyId || "", this.projectId = e.projectId || "";
|
|
947
947
|
}
|
|
948
948
|
static createDtoFromJson(e) {
|
|
949
949
|
switch (e.type) {
|
|
@@ -957,7 +957,7 @@ const Me = class _e {
|
|
|
957
957
|
throw new Error("Unknown DTO type");
|
|
958
958
|
}
|
|
959
959
|
}
|
|
960
|
-
static newInstance = () => new
|
|
960
|
+
static newInstance = () => new De({
|
|
961
961
|
id: K(),
|
|
962
962
|
tenantId: "",
|
|
963
963
|
companyId: "",
|
|
@@ -1020,7 +1020,7 @@ class Le {
|
|
|
1020
1020
|
isNewAccessToken: !0
|
|
1021
1021
|
});
|
|
1022
1022
|
}
|
|
1023
|
-
class
|
|
1023
|
+
class ft extends ce {
|
|
1024
1024
|
constructor(e) {
|
|
1025
1025
|
super(e);
|
|
1026
1026
|
}
|
|
@@ -1047,9 +1047,9 @@ class ht extends ce {
|
|
|
1047
1047
|
return this.transform(t);
|
|
1048
1048
|
}
|
|
1049
1049
|
}
|
|
1050
|
-
I.decorate(I.inject(G.ApiClient),
|
|
1051
|
-
I.decorate(I.injectable(),
|
|
1052
|
-
class
|
|
1050
|
+
I.decorate(I.inject(G.ApiClient), ft, 0);
|
|
1051
|
+
I.decorate(I.injectable(), ft);
|
|
1052
|
+
class mt extends ce {
|
|
1053
1053
|
constructor(e) {
|
|
1054
1054
|
super(e);
|
|
1055
1055
|
}
|
|
@@ -1069,9 +1069,9 @@ class pt extends ce {
|
|
|
1069
1069
|
return e.isNewGroup;
|
|
1070
1070
|
}
|
|
1071
1071
|
}
|
|
1072
|
-
I.decorate(I.inject(G.ApiClient),
|
|
1073
|
-
I.decorate(I.injectable(),
|
|
1074
|
-
class
|
|
1072
|
+
I.decorate(I.inject(G.ApiClient), mt, 0);
|
|
1073
|
+
I.decorate(I.injectable(), mt);
|
|
1074
|
+
class gt extends ce {
|
|
1075
1075
|
constructor(e) {
|
|
1076
1076
|
super(e);
|
|
1077
1077
|
}
|
|
@@ -1091,9 +1091,9 @@ class ft extends ce {
|
|
|
1091
1091
|
return e.isNewProfile;
|
|
1092
1092
|
}
|
|
1093
1093
|
}
|
|
1094
|
-
I.decorate(I.inject(G.ApiClient),
|
|
1095
|
-
I.decorate(I.injectable(),
|
|
1096
|
-
class
|
|
1094
|
+
I.decorate(I.inject(G.ApiClient), gt, 0);
|
|
1095
|
+
I.decorate(I.injectable(), gt);
|
|
1096
|
+
class yt extends ce {
|
|
1097
1097
|
constructor(e) {
|
|
1098
1098
|
super(e);
|
|
1099
1099
|
}
|
|
@@ -1128,9 +1128,9 @@ class mt extends ce {
|
|
|
1128
1128
|
);
|
|
1129
1129
|
}
|
|
1130
1130
|
}
|
|
1131
|
-
I.decorate(I.inject(G.ApiClient),
|
|
1132
|
-
I.decorate(I.injectable(),
|
|
1133
|
-
class
|
|
1131
|
+
I.decorate(I.inject(G.ApiClient), yt, 0);
|
|
1132
|
+
I.decorate(I.injectable(), yt);
|
|
1133
|
+
class wt extends ce {
|
|
1134
1134
|
constructor(e) {
|
|
1135
1135
|
super(e);
|
|
1136
1136
|
}
|
|
@@ -1157,9 +1157,9 @@ class gt extends ce {
|
|
|
1157
1157
|
);
|
|
1158
1158
|
}
|
|
1159
1159
|
}
|
|
1160
|
-
I.decorate(I.inject(G.ApiClient),
|
|
1161
|
-
I.decorate(I.injectable(),
|
|
1162
|
-
class
|
|
1160
|
+
I.decorate(I.inject(G.ApiClient), wt, 0);
|
|
1161
|
+
I.decorate(I.injectable(), wt);
|
|
1162
|
+
class vt extends ce {
|
|
1163
1163
|
constructor(e) {
|
|
1164
1164
|
super(e);
|
|
1165
1165
|
}
|
|
@@ -1167,7 +1167,7 @@ class yt extends ce {
|
|
|
1167
1167
|
return V.getInstance().getHeaders();
|
|
1168
1168
|
}
|
|
1169
1169
|
transform(e) {
|
|
1170
|
-
return new
|
|
1170
|
+
return new ht(e);
|
|
1171
1171
|
}
|
|
1172
1172
|
getEndpoint() {
|
|
1173
1173
|
return "/api/v1/resource";
|
|
@@ -1221,60 +1221,60 @@ class yt extends ce {
|
|
|
1221
1221
|
);
|
|
1222
1222
|
}
|
|
1223
1223
|
}
|
|
1224
|
-
I.decorate(I.inject(G.ApiClient),
|
|
1225
|
-
I.decorate(I.injectable(),
|
|
1226
|
-
function
|
|
1224
|
+
I.decorate(I.inject(G.ApiClient), vt, 0);
|
|
1225
|
+
I.decorate(I.injectable(), vt);
|
|
1226
|
+
function Dr({
|
|
1227
1227
|
onLogin: r,
|
|
1228
1228
|
error: e,
|
|
1229
1229
|
onClickForgotPassword: t,
|
|
1230
1230
|
loginLabel: s = "Email",
|
|
1231
1231
|
loginPlaceholder: o,
|
|
1232
1232
|
afterInputs: a,
|
|
1233
|
-
showMockUsersSelector:
|
|
1233
|
+
showMockUsersSelector: l = !1,
|
|
1234
1234
|
mockUsers: i = [],
|
|
1235
1235
|
mockUsersGroupMap: u,
|
|
1236
|
-
options:
|
|
1237
|
-
onChangeUsername:
|
|
1236
|
+
options: m = {},
|
|
1237
|
+
onChangeUsername: b,
|
|
1238
1238
|
disabledLogin: h = !1,
|
|
1239
1239
|
isCheckingUsername: C = !1,
|
|
1240
|
-
showSignIn:
|
|
1240
|
+
showSignIn: E = !0
|
|
1241
1241
|
}) {
|
|
1242
|
-
const
|
|
1243
|
-
username:
|
|
1242
|
+
const y = Qe(), {
|
|
1243
|
+
username: x,
|
|
1244
1244
|
password: U,
|
|
1245
|
-
rememberMe:
|
|
1245
|
+
rememberMe: _,
|
|
1246
1246
|
clearRememberMe: O
|
|
1247
|
-
} =
|
|
1247
|
+
} = Ct(), [D, N] = f(x), [k, A] = f(U), [P, W] = f(_), [L, B] = f(!1), [H, Y] = f(null);
|
|
1248
1248
|
z(() => {
|
|
1249
1249
|
B(!!e);
|
|
1250
1250
|
}, [e]), z(() => {
|
|
1251
|
-
|
|
1252
|
-
}, [
|
|
1251
|
+
x !== D && (N(x), b?.(x)), U !== k && A(U), _ !== P && W(_);
|
|
1252
|
+
}, [x, U, _]);
|
|
1253
1253
|
const $ = () => {
|
|
1254
1254
|
B(!1);
|
|
1255
1255
|
}, X = () => {
|
|
1256
|
-
|
|
1256
|
+
D && k && r(D, k, P).finally(() => B(!0));
|
|
1257
1257
|
}, p = () => {
|
|
1258
1258
|
if (!u)
|
|
1259
|
-
return i.map((
|
|
1260
|
-
value:
|
|
1261
|
-
label:
|
|
1259
|
+
return i.map((g) => ({
|
|
1260
|
+
value: g.email,
|
|
1261
|
+
label: g.email
|
|
1262
1262
|
}));
|
|
1263
|
-
const c = i.reduce((
|
|
1263
|
+
const c = i.reduce((g, T) => {
|
|
1264
1264
|
const j = u[T.type];
|
|
1265
|
-
return j && (
|
|
1265
|
+
return j && (g[j] || (g[j] = []), g[j].push({
|
|
1266
1266
|
value: T.email,
|
|
1267
1267
|
label: T.email
|
|
1268
|
-
})),
|
|
1268
|
+
})), g;
|
|
1269
1269
|
}, {});
|
|
1270
|
-
return Object.entries(c).map(([
|
|
1271
|
-
group:
|
|
1270
|
+
return Object.entries(c).map(([g, T]) => ({
|
|
1271
|
+
group: g,
|
|
1272
1272
|
items: T
|
|
1273
1273
|
}));
|
|
1274
1274
|
}, n = () => {
|
|
1275
1275
|
if (H) {
|
|
1276
|
-
const c = i.find((
|
|
1277
|
-
c && (N(c.email),
|
|
1276
|
+
const c = i.find((g) => g.email === H);
|
|
1277
|
+
c && (N(c.email), A(c.password), $());
|
|
1278
1278
|
}
|
|
1279
1279
|
}, w = {
|
|
1280
1280
|
withBorder: !0,
|
|
@@ -1283,17 +1283,17 @@ function Rr({
|
|
|
1283
1283
|
mt: 30,
|
|
1284
1284
|
radius: "md",
|
|
1285
1285
|
w: 400,
|
|
1286
|
-
...
|
|
1286
|
+
...m.cardProps
|
|
1287
1287
|
};
|
|
1288
1288
|
return /* @__PURE__ */ R(
|
|
1289
|
-
|
|
1289
|
+
Ye,
|
|
1290
1290
|
{
|
|
1291
1291
|
...w,
|
|
1292
1292
|
pos: "relative",
|
|
1293
|
-
ref:
|
|
1293
|
+
ref: y,
|
|
1294
1294
|
children: [
|
|
1295
|
-
|
|
1296
|
-
/* @__PURE__ */
|
|
1295
|
+
E && /* @__PURE__ */ R(te, { children: [
|
|
1296
|
+
/* @__PURE__ */ d(
|
|
1297
1297
|
se,
|
|
1298
1298
|
{
|
|
1299
1299
|
c: "light-dark(var(--mantine-color-black), var(--mantine-color-white))",
|
|
@@ -1304,12 +1304,12 @@ function Rr({
|
|
|
1304
1304
|
children: S().t("archbase:signIn")
|
|
1305
1305
|
}
|
|
1306
1306
|
),
|
|
1307
|
-
/* @__PURE__ */
|
|
1307
|
+
/* @__PURE__ */ d(ye, { m: "md" })
|
|
1308
1308
|
] }),
|
|
1309
|
-
|
|
1310
|
-
|
|
1309
|
+
m?.customContentBefore,
|
|
1310
|
+
l && /* @__PURE__ */ R(te, { children: [
|
|
1311
1311
|
/* @__PURE__ */ R(we, { gap: "sm", mb: "md", children: [
|
|
1312
|
-
/* @__PURE__ */
|
|
1312
|
+
/* @__PURE__ */ d(
|
|
1313
1313
|
Nt,
|
|
1314
1314
|
{
|
|
1315
1315
|
placeholder: "Selecione um usuário mock",
|
|
@@ -1321,7 +1321,7 @@ function Rr({
|
|
|
1321
1321
|
style: { flexGrow: 1 }
|
|
1322
1322
|
}
|
|
1323
1323
|
),
|
|
1324
|
-
/* @__PURE__ */
|
|
1324
|
+
/* @__PURE__ */ d(Bt, { label: "Aplicar", children: /* @__PURE__ */ d(
|
|
1325
1325
|
ie,
|
|
1326
1326
|
{
|
|
1327
1327
|
variant: "light",
|
|
@@ -1329,51 +1329,51 @@ function Rr({
|
|
|
1329
1329
|
onClick: n,
|
|
1330
1330
|
disabled: !H,
|
|
1331
1331
|
"aria-label": "Aplicar usuário mock selecionado",
|
|
1332
|
-
children: /* @__PURE__ */
|
|
1332
|
+
children: /* @__PURE__ */ d(Ft, { size: 16 })
|
|
1333
1333
|
}
|
|
1334
1334
|
) })
|
|
1335
1335
|
] }),
|
|
1336
|
-
/* @__PURE__ */
|
|
1336
|
+
/* @__PURE__ */ d(ye, { mb: "md" })
|
|
1337
1337
|
] }),
|
|
1338
|
-
/* @__PURE__ */
|
|
1338
|
+
/* @__PURE__ */ d(
|
|
1339
1339
|
Ce,
|
|
1340
1340
|
{
|
|
1341
1341
|
label: s,
|
|
1342
1342
|
placeholder: o ?? S().t("archbase:usuario@email.com"),
|
|
1343
|
-
rightSection: C ? /* @__PURE__ */
|
|
1344
|
-
value:
|
|
1343
|
+
rightSection: C ? /* @__PURE__ */ d(Xe, { size: "xs" }) : null,
|
|
1344
|
+
value: D || "",
|
|
1345
1345
|
required: !0,
|
|
1346
1346
|
onChange: (c) => {
|
|
1347
|
-
N(c.currentTarget.value),
|
|
1347
|
+
N(c.currentTarget.value), b?.(c.currentTarget.value), $();
|
|
1348
1348
|
}
|
|
1349
1349
|
}
|
|
1350
1350
|
),
|
|
1351
|
-
/* @__PURE__ */
|
|
1351
|
+
/* @__PURE__ */ d(
|
|
1352
1352
|
Ue,
|
|
1353
1353
|
{
|
|
1354
1354
|
label: S().t("archbase:Password"),
|
|
1355
1355
|
placeholder: S().t("archbase:Sua senha"),
|
|
1356
1356
|
onChange: (c) => {
|
|
1357
|
-
|
|
1357
|
+
A(c.currentTarget.value), $();
|
|
1358
1358
|
},
|
|
1359
|
-
value:
|
|
1359
|
+
value: k || "",
|
|
1360
1360
|
required: !0,
|
|
1361
1361
|
mt: "md"
|
|
1362
1362
|
}
|
|
1363
1363
|
),
|
|
1364
1364
|
/* @__PURE__ */ R(we, { justify: "space-between", mt: "md", children: [
|
|
1365
|
-
/* @__PURE__ */
|
|
1365
|
+
/* @__PURE__ */ d(
|
|
1366
1366
|
Mt,
|
|
1367
1367
|
{
|
|
1368
1368
|
label: S().t("archbase:Lembre-me"),
|
|
1369
1369
|
checked: P,
|
|
1370
1370
|
onChange: (c) => {
|
|
1371
|
-
const
|
|
1372
|
-
W(
|
|
1371
|
+
const g = c.currentTarget.checked;
|
|
1372
|
+
W(g), g || O();
|
|
1373
1373
|
}
|
|
1374
1374
|
}
|
|
1375
1375
|
),
|
|
1376
|
-
t && /* @__PURE__ */
|
|
1376
|
+
t && /* @__PURE__ */ d(
|
|
1377
1377
|
Ot,
|
|
1378
1378
|
{
|
|
1379
1379
|
component: "button",
|
|
@@ -1386,19 +1386,19 @@ function Rr({
|
|
|
1386
1386
|
}
|
|
1387
1387
|
)
|
|
1388
1388
|
] }),
|
|
1389
|
-
|
|
1390
|
-
/* @__PURE__ */
|
|
1389
|
+
m?.afterInputs || a,
|
|
1390
|
+
/* @__PURE__ */ d(
|
|
1391
1391
|
ie,
|
|
1392
1392
|
{
|
|
1393
|
-
disabled: !
|
|
1393
|
+
disabled: !k || !D || h,
|
|
1394
1394
|
fullWidth: !0,
|
|
1395
1395
|
mt: "xl",
|
|
1396
1396
|
onClick: X,
|
|
1397
1397
|
children: S().t("archbase:signIn")
|
|
1398
1398
|
}
|
|
1399
1399
|
),
|
|
1400
|
-
|
|
1401
|
-
L && e && /* @__PURE__ */
|
|
1400
|
+
m?.customContentAfter,
|
|
1401
|
+
L && e && /* @__PURE__ */ d(se, { c: "red", mt: "sm", children: e })
|
|
1402
1402
|
]
|
|
1403
1403
|
}
|
|
1404
1404
|
);
|
|
@@ -1410,42 +1410,42 @@ const cr = {
|
|
|
1410
1410
|
padding: 30,
|
|
1411
1411
|
marginTop: 30
|
|
1412
1412
|
};
|
|
1413
|
-
function
|
|
1414
|
-
const
|
|
1413
|
+
function Rr({ error: r, onSendResetPasswordEmail: e, onResetPassword: t, onClickBackToLogin: s, validatePassword: o, validateToken: a, initialEmail: l = "", description: i, style: u }) {
|
|
1414
|
+
const m = Qe(), b = Ut(), { colorScheme: h } = Lt(), [C, E] = f(r ?? ""), [y, x] = f(l), [U, _] = f(""), [O, D] = f(""), [N, k] = f(""), [A, P] = f(!1), [W, L] = f(""), [B, H] = f(""), [Y, $] = f(""), [X, p] = f("");
|
|
1415
1415
|
async function n(c) {
|
|
1416
|
-
c && (
|
|
1416
|
+
c && (_t(c) ? await e(c).then(() => {
|
|
1417
1417
|
We.showSuccess(`${S().t("archbase:Um e-mail com instruções para redefinir sua senha foi enviado. Verifique sua caixa de entrada.")}`), P(!0);
|
|
1418
1418
|
}).catch(() => {
|
|
1419
1419
|
}) : L(`${S().t("archbase:Email inválido")}`));
|
|
1420
1420
|
}
|
|
1421
|
-
async function w(c,
|
|
1422
|
-
if (c &&
|
|
1423
|
-
let xe = "",
|
|
1424
|
-
a && (xe = a(), $(xe)), o && (
|
|
1421
|
+
async function w(c, g, T, j) {
|
|
1422
|
+
if (c && g && T) {
|
|
1423
|
+
let xe = "", ke = "", Fe = "";
|
|
1424
|
+
a && (xe = a(), $(xe)), o && (ke = o(), $(ke)), T !== j && (Fe = `${S().t("archbase:A nova senha e a confirmação devem ser iguais.")}`, p(Fe)), !ke && !xe && await t(c, g, T).then(() => {
|
|
1425
1425
|
We.showSuccess(`${S().t("archbase:Senha redefinida com sucesso.")}`), s(), P(!1);
|
|
1426
1426
|
}).catch(() => {
|
|
1427
|
-
|
|
1427
|
+
E(r || `${S().t("archbase:Erro ao redefinir senha.")}`);
|
|
1428
1428
|
});
|
|
1429
1429
|
}
|
|
1430
1430
|
}
|
|
1431
1431
|
return z(() => {
|
|
1432
|
-
r &&
|
|
1432
|
+
r && E(r);
|
|
1433
1433
|
}, [r]), z(() => {
|
|
1434
|
-
|
|
1435
|
-
}, [
|
|
1436
|
-
|
|
1434
|
+
E("");
|
|
1435
|
+
}, [y, U, O, N]), /* @__PURE__ */ R(
|
|
1436
|
+
Ye,
|
|
1437
1437
|
{
|
|
1438
1438
|
withBorder: !0,
|
|
1439
1439
|
shadow: "md",
|
|
1440
1440
|
radius: "md",
|
|
1441
|
-
ref:
|
|
1441
|
+
ref: m,
|
|
1442
1442
|
style: {
|
|
1443
1443
|
...cr,
|
|
1444
1444
|
...u
|
|
1445
1445
|
},
|
|
1446
1446
|
children: [
|
|
1447
|
-
|
|
1448
|
-
/* @__PURE__ */
|
|
1447
|
+
A ? /* @__PURE__ */ R(te, { children: [
|
|
1448
|
+
/* @__PURE__ */ d(
|
|
1449
1449
|
se,
|
|
1450
1450
|
{
|
|
1451
1451
|
c: "light-dark(var(--mantine-color-black), var(--mantine-color-white))",
|
|
@@ -1456,8 +1456,8 @@ function Nr({ error: r, onSendResetPasswordEmail: e, onResetPassword: t, onClick
|
|
|
1456
1456
|
children: S().t("archbase:Redefinir senha")
|
|
1457
1457
|
}
|
|
1458
1458
|
),
|
|
1459
|
-
/* @__PURE__ */
|
|
1460
|
-
/* @__PURE__ */
|
|
1459
|
+
/* @__PURE__ */ d(ye, { m: "xs" }),
|
|
1460
|
+
/* @__PURE__ */ d(
|
|
1461
1461
|
Ce,
|
|
1462
1462
|
{
|
|
1463
1463
|
label: S().t("archbase:Código de segurança"),
|
|
@@ -1465,53 +1465,53 @@ function Nr({ error: r, onSendResetPasswordEmail: e, onResetPassword: t, onClick
|
|
|
1465
1465
|
value: U || "",
|
|
1466
1466
|
required: !0,
|
|
1467
1467
|
onChange: (c) => {
|
|
1468
|
-
|
|
1468
|
+
_(c.currentTarget.value), H("");
|
|
1469
1469
|
},
|
|
1470
1470
|
error: B
|
|
1471
1471
|
}
|
|
1472
1472
|
),
|
|
1473
|
-
/* @__PURE__ */
|
|
1473
|
+
/* @__PURE__ */ d(
|
|
1474
1474
|
Ue,
|
|
1475
1475
|
{
|
|
1476
1476
|
label: S().t("archbase:Nova senha"),
|
|
1477
1477
|
placeholder: S().t("archbase:Nova senha"),
|
|
1478
1478
|
onChange: (c) => {
|
|
1479
|
-
|
|
1479
|
+
D(c.currentTarget.value), $(""), p("");
|
|
1480
1480
|
},
|
|
1481
1481
|
value: O,
|
|
1482
1482
|
required: !0,
|
|
1483
1483
|
error: Y
|
|
1484
1484
|
}
|
|
1485
1485
|
),
|
|
1486
|
-
/* @__PURE__ */
|
|
1486
|
+
/* @__PURE__ */ d(
|
|
1487
1487
|
Ue,
|
|
1488
1488
|
{
|
|
1489
1489
|
label: S().t("archbase:Confirmar senha"),
|
|
1490
1490
|
placeholder: S().t("archbase:Confirmar senha"),
|
|
1491
1491
|
onChange: (c) => {
|
|
1492
|
-
|
|
1492
|
+
k(c.currentTarget.value), p("");
|
|
1493
1493
|
},
|
|
1494
1494
|
value: N || "",
|
|
1495
1495
|
required: !0,
|
|
1496
1496
|
error: X
|
|
1497
1497
|
}
|
|
1498
1498
|
),
|
|
1499
|
-
/* @__PURE__ */
|
|
1499
|
+
/* @__PURE__ */ d(
|
|
1500
1500
|
ie,
|
|
1501
1501
|
{
|
|
1502
|
-
disabled: !
|
|
1502
|
+
disabled: !y || !U || !O || !N,
|
|
1503
1503
|
mt: "md",
|
|
1504
1504
|
fullWidth: !0,
|
|
1505
|
-
onClick: () => w(
|
|
1505
|
+
onClick: () => w(y, U, O, N),
|
|
1506
1506
|
children: `${S().t("archbase:Redefinir senha")}`
|
|
1507
1507
|
}
|
|
1508
1508
|
),
|
|
1509
|
-
/* @__PURE__ */
|
|
1509
|
+
/* @__PURE__ */ d(
|
|
1510
1510
|
ie,
|
|
1511
1511
|
{
|
|
1512
1512
|
mt: "6px",
|
|
1513
1513
|
fullWidth: !0,
|
|
1514
|
-
color: h === "dark" ?
|
|
1514
|
+
color: h === "dark" ? b.colors.dark[4] : b.colors.gray[7],
|
|
1515
1515
|
onClick: () => {
|
|
1516
1516
|
W || P(!1);
|
|
1517
1517
|
},
|
|
@@ -1519,7 +1519,7 @@ function Nr({ error: r, onSendResetPasswordEmail: e, onResetPassword: t, onClick
|
|
|
1519
1519
|
}
|
|
1520
1520
|
)
|
|
1521
1521
|
] }) : /* @__PURE__ */ R(te, { children: [
|
|
1522
|
-
/* @__PURE__ */
|
|
1522
|
+
/* @__PURE__ */ d(
|
|
1523
1523
|
se,
|
|
1524
1524
|
{
|
|
1525
1525
|
c: "light-dark(var(--mantine-color-black), var(--mantine-color-white))",
|
|
@@ -1530,55 +1530,64 @@ function Nr({ error: r, onSendResetPasswordEmail: e, onResetPassword: t, onClick
|
|
|
1530
1530
|
children: S().t("archbase:Redefinir senha")
|
|
1531
1531
|
}
|
|
1532
1532
|
),
|
|
1533
|
-
/* @__PURE__ */
|
|
1534
|
-
/* @__PURE__ */
|
|
1535
|
-
/* @__PURE__ */
|
|
1533
|
+
/* @__PURE__ */ d(se, { c: "dimmed", fz: 14, style: { textAlign: "justify" }, children: i }),
|
|
1534
|
+
/* @__PURE__ */ d(ye, { m: "md" }),
|
|
1535
|
+
/* @__PURE__ */ d(
|
|
1536
1536
|
Ce,
|
|
1537
1537
|
{
|
|
1538
1538
|
label: "Email",
|
|
1539
1539
|
placeholder: `${S().t("archbase:usuario@email.com")}`,
|
|
1540
|
-
value:
|
|
1540
|
+
value: y || "",
|
|
1541
1541
|
required: !0,
|
|
1542
1542
|
onChange: (c) => {
|
|
1543
|
-
|
|
1543
|
+
x(c.currentTarget.value), L("");
|
|
1544
1544
|
},
|
|
1545
1545
|
error: W
|
|
1546
1546
|
}
|
|
1547
1547
|
),
|
|
1548
|
-
/* @__PURE__ */
|
|
1548
|
+
/* @__PURE__ */ d(
|
|
1549
1549
|
ie,
|
|
1550
1550
|
{
|
|
1551
|
-
disabled: !
|
|
1551
|
+
disabled: !y,
|
|
1552
1552
|
mt: "md",
|
|
1553
1553
|
fullWidth: !0,
|
|
1554
|
-
onClick: () => n(
|
|
1554
|
+
onClick: () => n(y),
|
|
1555
1555
|
children: `${S().t("archbase:Enviar")}`
|
|
1556
1556
|
}
|
|
1557
1557
|
),
|
|
1558
|
-
/* @__PURE__ */
|
|
1558
|
+
/* @__PURE__ */ d(
|
|
1559
1559
|
ie,
|
|
1560
1560
|
{
|
|
1561
1561
|
mt: "6px",
|
|
1562
1562
|
fullWidth: !0,
|
|
1563
|
-
color: h === "dark" ?
|
|
1563
|
+
color: h === "dark" ? b.colors.dark[4] : b.colors.gray[7],
|
|
1564
1564
|
onClick: () => s && s(),
|
|
1565
1565
|
children: `${S().t("archbase:Voltar")}`
|
|
1566
1566
|
}
|
|
1567
1567
|
)
|
|
1568
1568
|
] }),
|
|
1569
|
-
C ? /* @__PURE__ */
|
|
1569
|
+
C ? /* @__PURE__ */ d(se, { c: "red", style: { textAlign: "justify" }, children: C }) : null
|
|
1570
1570
|
]
|
|
1571
1571
|
}
|
|
1572
1572
|
);
|
|
1573
1573
|
}
|
|
1574
|
-
const lr = () =>
|
|
1575
|
-
const s =
|
|
1576
|
-
|
|
1577
|
-
|
|
1574
|
+
const lr = () => Dt().user, At = "archbaseSecurityManagerStore", Nr = ({ resourceName: r, resourceDescription: e, enableSecurity: t = !0 }) => {
|
|
1575
|
+
const s = qe(At), o = lr(), a = o?.isAdmin ?? !1, l = o?.id, i = Ke(l), u = Je(() => {
|
|
1576
|
+
if (!t)
|
|
1577
|
+
return null;
|
|
1578
|
+
const m = l ? `${r}_${l}` : r;
|
|
1579
|
+
if (s && s.existsValue(m)) {
|
|
1580
|
+
const h = s.getValue(m);
|
|
1581
|
+
if (h && h.isAdmin === a)
|
|
1582
|
+
return h;
|
|
1583
|
+
}
|
|
1584
|
+
const b = new nt(r, e, a);
|
|
1585
|
+
return s && l && s.setValue(m, b), b;
|
|
1586
|
+
}, [t, r, e, a, l]);
|
|
1578
1587
|
return z(() => {
|
|
1579
|
-
|
|
1580
|
-
}, [
|
|
1581
|
-
},
|
|
1588
|
+
i.current = l;
|
|
1589
|
+
}, [l]), { securityManager: u };
|
|
1590
|
+
}, Br = ({
|
|
1582
1591
|
checkIntervalTokenHasExpired: r = 3e4,
|
|
1583
1592
|
// Verificar a 30 segundos
|
|
1584
1593
|
expirationThresholdOfToken: e = 300
|
|
@@ -1588,7 +1597,7 @@ const lr = () => Ut().user, wt = "archbaseSecurityManagerStore", dr = (r, e, t,
|
|
|
1588
1597
|
(n) => n.get(G.TokenManager)
|
|
1589
1598
|
), s = ve(
|
|
1590
1599
|
(n) => n.get(G.Authenticator)
|
|
1591
|
-
), [o, a] = f(null), [
|
|
1600
|
+
), [o, a] = f(null), [l, i] = f(!1), [u, m] = f(!0), [b, h] = f(!1), [C, E] = f(!1), [y, x] = f(""), [U, _] = f(""), [O, D] = f(null), N = qe(At), k = {
|
|
1592
1601
|
hasContextualLogin: typeof s.loginWithContext == "function",
|
|
1593
1602
|
hasFlexibleLogin: typeof s.loginFlexible == "function",
|
|
1594
1603
|
hasSocialLogin: typeof s.loginSocial == "function",
|
|
@@ -1597,82 +1606,82 @@ const lr = () => Ut().user, wt = "archbaseSecurityManagerStore", dr = (r, e, t,
|
|
|
1597
1606
|
};
|
|
1598
1607
|
z(() => {
|
|
1599
1608
|
const n = t.getUsername();
|
|
1600
|
-
if (n && n != "" &&
|
|
1609
|
+
if (n && n != "" && _(n), k.hasContextSupport && t.getContext) {
|
|
1601
1610
|
const c = t.getContext();
|
|
1602
1611
|
if (c)
|
|
1603
1612
|
try {
|
|
1604
|
-
const
|
|
1605
|
-
|
|
1606
|
-
} catch (
|
|
1607
|
-
console.warn("Erro ao carregar contexto salvo:",
|
|
1613
|
+
const g = typeof c == "string" ? JSON.parse(c) : c;
|
|
1614
|
+
D(g);
|
|
1615
|
+
} catch (g) {
|
|
1616
|
+
console.warn("Erro ao carregar contexto salvo:", g);
|
|
1608
1617
|
}
|
|
1609
1618
|
}
|
|
1610
1619
|
const w = t.getToken();
|
|
1611
|
-
w && (h(!0),
|
|
1620
|
+
w && (h(!0), x(""), E(!1), a(w)), m(!1);
|
|
1612
1621
|
}, []);
|
|
1613
|
-
const
|
|
1614
|
-
|
|
1622
|
+
const A = () => {
|
|
1623
|
+
E(!1), x("");
|
|
1615
1624
|
}, P = (n) => {
|
|
1616
|
-
i(!1), h(!1), t.clearToken(), n && t.clearUsernameAndPassword(),
|
|
1625
|
+
i(!1), h(!1), t.clearToken(), n && t.clearUsernameAndPassword(), k.hasContextSupport && t.clearContext && t.clearContext(), _(""), D(null), x(""), E(!1), N.clearAllValues();
|
|
1617
1626
|
}, W = async (n, w, c) => {
|
|
1618
1627
|
try {
|
|
1619
1628
|
i(!0), h(!1);
|
|
1620
|
-
const
|
|
1621
|
-
t.saveToken(
|
|
1622
|
-
} catch (
|
|
1623
|
-
i(!1), h(!1),
|
|
1629
|
+
const g = await s.login(n, w);
|
|
1630
|
+
t.saveToken(g), c && t.saveUsernameAndPassword(n, w), t.saveUsername(n), _(n), a(g), i(!1), h(!0);
|
|
1631
|
+
} catch (g) {
|
|
1632
|
+
i(!1), h(!1), x(ee(g)), E(!0);
|
|
1624
1633
|
}
|
|
1625
1634
|
}, L = async (n, w = !1) => {
|
|
1626
|
-
if (!
|
|
1635
|
+
if (!k.hasContextualLogin || !s.loginWithContext)
|
|
1627
1636
|
throw new Error("Login contextual não suportado por esta implementação do ArchbaseAuthenticator");
|
|
1628
1637
|
try {
|
|
1629
1638
|
i(!0), h(!1);
|
|
1630
|
-
const { context: c, user:
|
|
1639
|
+
const { context: c, user: g, ...T } = await s.loginWithContext(n), j = {
|
|
1631
1640
|
scope: "",
|
|
1632
1641
|
ext_expires_in: T.expires_in,
|
|
1633
1642
|
...T
|
|
1634
1643
|
};
|
|
1635
|
-
t.saveToken(j), w ? t.saveUsernameAndPassword(n.email, n.password) : t.clearUsernameAndPassword(), t.saveUsername(n.email),
|
|
1644
|
+
t.saveToken(j), w ? t.saveUsernameAndPassword(n.email, n.password) : t.clearUsernameAndPassword(), t.saveUsername(n.email), k.hasContextSupport && t.saveContext && c && (t.saveContext(JSON.stringify(c)), D(c)), _(n.email), a(j), i(!1), h(!0);
|
|
1636
1645
|
} catch (c) {
|
|
1637
|
-
throw i(!1), h(!1),
|
|
1646
|
+
throw i(!1), h(!1), x(ee(c)), E(!0), c;
|
|
1638
1647
|
}
|
|
1639
1648
|
}, B = async (n, w = !1) => {
|
|
1640
|
-
if (!
|
|
1649
|
+
if (!k.hasFlexibleLogin || !s.loginFlexible)
|
|
1641
1650
|
throw new Error("Login flexível não suportado por esta implementação do ArchbaseAuthenticator");
|
|
1642
1651
|
try {
|
|
1643
1652
|
i(!0), h(!1);
|
|
1644
|
-
const { context: c, user:
|
|
1653
|
+
const { context: c, user: g, ...T } = await s.loginFlexible(n), j = {
|
|
1645
1654
|
scope: "",
|
|
1646
1655
|
ext_expires_in: T.expires_in,
|
|
1647
1656
|
...T
|
|
1648
1657
|
};
|
|
1649
|
-
t.saveToken(j), w && t.saveUsernameAndPassword(n.identifier, n.password), t.saveUsername(
|
|
1658
|
+
t.saveToken(j), w && t.saveUsernameAndPassword(n.identifier, n.password), t.saveUsername(g.email || n.identifier), k.hasContextSupport && t.saveContext && c && (t.saveContext(JSON.stringify(c)), D(c)), _(g.email || n.identifier), a(j), i(!1), h(!0);
|
|
1650
1659
|
} catch (c) {
|
|
1651
|
-
throw i(!1), h(!1),
|
|
1660
|
+
throw i(!1), h(!1), x(ee(c)), E(!0), c;
|
|
1652
1661
|
}
|
|
1653
1662
|
}, H = async (n) => {
|
|
1654
|
-
if (!
|
|
1663
|
+
if (!k.hasSocialLogin || !s.loginSocial)
|
|
1655
1664
|
throw new Error("Login social não suportado por esta implementação do ArchbaseAuthenticator");
|
|
1656
1665
|
try {
|
|
1657
1666
|
i(!0), h(!1);
|
|
1658
|
-
const { context: w, user: c, ...
|
|
1667
|
+
const { context: w, user: c, ...g } = await s.loginSocial(n), T = {
|
|
1659
1668
|
scope: "",
|
|
1660
|
-
ext_expires_in:
|
|
1661
|
-
...
|
|
1669
|
+
ext_expires_in: g.expires_in,
|
|
1670
|
+
...g
|
|
1662
1671
|
};
|
|
1663
|
-
t.saveToken(T), t.saveUsername(c.email),
|
|
1672
|
+
t.saveToken(T), t.saveUsername(c.email), k.hasContextSupport && t.saveContext && w && (t.saveContext(JSON.stringify(w)), D(w)), _(c.email), a(T), i(!1), h(!0);
|
|
1664
1673
|
} catch (w) {
|
|
1665
|
-
throw i(!1), h(!1),
|
|
1674
|
+
throw i(!1), h(!1), x(ee(w)), E(!0), w;
|
|
1666
1675
|
}
|
|
1667
1676
|
}, Y = async (n) => {
|
|
1668
|
-
if (!
|
|
1677
|
+
if (!k.hasRegistration || !s.register)
|
|
1669
1678
|
throw new Error("Registro não suportado por esta implementação do ArchbaseAuthenticator");
|
|
1670
1679
|
try {
|
|
1671
1680
|
i(!0);
|
|
1672
1681
|
const w = await s.register(n);
|
|
1673
1682
|
return i(!1), w;
|
|
1674
1683
|
} catch (w) {
|
|
1675
|
-
throw i(!1),
|
|
1684
|
+
throw i(!1), x(ee(w)), E(!0), w;
|
|
1676
1685
|
}
|
|
1677
1686
|
}, $ = async () => s.getSupportedContexts ? await s.getSupportedContexts() : { supportedContexts: ["DEFAULT"], defaultContext: "DEFAULT" }, X = async (n) => s.validateContext ? await s.validateContext(n) : { context: n, supported: n === "DEFAULT" };
|
|
1678
1687
|
z(() => {
|
|
@@ -1697,26 +1706,26 @@ const lr = () => Ut().user, wt = "archbaseSecurityManagerStore", dr = (r, e, t,
|
|
|
1697
1706
|
login: W,
|
|
1698
1707
|
logout: P,
|
|
1699
1708
|
username: U,
|
|
1700
|
-
isAuthenticated:
|
|
1701
|
-
isAuthenticating:
|
|
1709
|
+
isAuthenticated: b,
|
|
1710
|
+
isAuthenticating: l,
|
|
1702
1711
|
isInitializing: u,
|
|
1703
1712
|
isError: C,
|
|
1704
|
-
error:
|
|
1705
|
-
clearError:
|
|
1713
|
+
error: y,
|
|
1714
|
+
clearError: A,
|
|
1706
1715
|
accessToken: o ? o.access_token : null,
|
|
1707
1716
|
// Métodos opcionais para autenticação avançada
|
|
1708
|
-
loginWithContext:
|
|
1709
|
-
loginFlexible:
|
|
1710
|
-
loginSocial:
|
|
1711
|
-
register:
|
|
1717
|
+
loginWithContext: k.hasContextualLogin ? L : void 0,
|
|
1718
|
+
loginFlexible: k.hasFlexibleLogin ? B : void 0,
|
|
1719
|
+
loginSocial: k.hasSocialLogin ? H : void 0,
|
|
1720
|
+
register: k.hasRegistration ? Y : void 0,
|
|
1712
1721
|
getSupportedContexts: $,
|
|
1713
1722
|
validateContext: X,
|
|
1714
1723
|
// Informações de contexto
|
|
1715
1724
|
context: O,
|
|
1716
1725
|
// Detecção de capacidades
|
|
1717
|
-
capabilities:
|
|
1726
|
+
capabilities: k
|
|
1718
1727
|
};
|
|
1719
|
-
},
|
|
1728
|
+
}, Mr = () => {
|
|
1720
1729
|
const r = ve(
|
|
1721
1730
|
(s) => s.get(G.TokenManager)
|
|
1722
1731
|
), [e, t] = f(null);
|
|
@@ -1726,7 +1735,7 @@ const lr = () => Ut().user, wt = "archbaseSecurityManagerStore", dr = (r, e, t,
|
|
|
1726
1735
|
}, []), {
|
|
1727
1736
|
token: e
|
|
1728
1737
|
};
|
|
1729
|
-
},
|
|
1738
|
+
}, Or = () => {
|
|
1730
1739
|
const r = ve(
|
|
1731
1740
|
(u) => u.get(G.Authenticator)
|
|
1732
1741
|
), [e, t] = f(!1), [s, o] = f("");
|
|
@@ -1734,13 +1743,13 @@ const lr = () => Ut().user, wt = "archbaseSecurityManagerStore", dr = (r, e, t,
|
|
|
1734
1743
|
sendResetPasswordEmail: async (u) => {
|
|
1735
1744
|
try {
|
|
1736
1745
|
return await r.sendResetPasswordEmail(u);
|
|
1737
|
-
} catch (
|
|
1738
|
-
throw o(ee(
|
|
1746
|
+
} catch (m) {
|
|
1747
|
+
throw o(ee(m)), t(!0), m;
|
|
1739
1748
|
}
|
|
1740
1749
|
},
|
|
1741
|
-
resetPassword: async (u,
|
|
1750
|
+
resetPassword: async (u, m, b) => {
|
|
1742
1751
|
try {
|
|
1743
|
-
return await r.resetPassword(u,
|
|
1752
|
+
return await r.resetPassword(u, m, b);
|
|
1744
1753
|
} catch (h) {
|
|
1745
1754
|
throw o(ee(h)), t(!0), h;
|
|
1746
1755
|
}
|
|
@@ -1751,116 +1760,116 @@ const lr = () => Ut().user, wt = "archbaseSecurityManagerStore", dr = (r, e, t,
|
|
|
1751
1760
|
t(!1), o("");
|
|
1752
1761
|
}
|
|
1753
1762
|
};
|
|
1754
|
-
},
|
|
1763
|
+
}, dr = () => /* @__PURE__ */ d($t, { p: "xl", style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ R(jt, { gap: "md", children: [
|
|
1755
1764
|
/* @__PURE__ */ R(we, { gap: "sm", children: [
|
|
1756
|
-
/* @__PURE__ */
|
|
1757
|
-
/* @__PURE__ */
|
|
1765
|
+
/* @__PURE__ */ d(Xe, { size: "sm" }),
|
|
1766
|
+
/* @__PURE__ */ d(se, { size: "sm", c: "dimmed", children: "Carregando permissões..." })
|
|
1758
1767
|
] }),
|
|
1759
|
-
/* @__PURE__ */
|
|
1760
|
-
/* @__PURE__ */
|
|
1768
|
+
/* @__PURE__ */ d(fe, { height: 40, radius: "sm" }),
|
|
1769
|
+
/* @__PURE__ */ d(fe, { height: 200, radius: "sm" }),
|
|
1761
1770
|
/* @__PURE__ */ R(we, { gap: "md", children: [
|
|
1762
|
-
/* @__PURE__ */
|
|
1763
|
-
/* @__PURE__ */
|
|
1771
|
+
/* @__PURE__ */ d(fe, { height: 36, width: 100, radius: "sm" }),
|
|
1772
|
+
/* @__PURE__ */ d(fe, { height: 36, width: 100, radius: "sm" })
|
|
1764
1773
|
] })
|
|
1765
|
-
] }) }), $e = Re(null),
|
|
1774
|
+
] }) }), $e = Re(null), Lr = ({
|
|
1766
1775
|
children: r,
|
|
1767
1776
|
user: e,
|
|
1768
1777
|
onError: t
|
|
1769
1778
|
}) => {
|
|
1770
|
-
const [s, o] = f(!1), [a,
|
|
1771
|
-
|
|
1772
|
-
}, [t]),
|
|
1779
|
+
const [s, o] = f(!1), [a, l] = f(null), [i] = f([]), u = e?.isAdministrator || !1, m = pe((y) => u ? !0 : i.includes(y), [i, u]), b = pe((y) => u ? !0 : y.some((x) => i.includes(x)), [i, u]), h = pe((y) => u ? !0 : y.every((x) => i.includes(x)), [i, u]), C = pe((y) => {
|
|
1780
|
+
l(y), y && t && t(y);
|
|
1781
|
+
}, [t]), E = {
|
|
1773
1782
|
user: e,
|
|
1774
1783
|
isLoading: s,
|
|
1775
|
-
hasGlobalPermission:
|
|
1776
|
-
hasAnyGlobalPermission:
|
|
1784
|
+
hasGlobalPermission: m,
|
|
1785
|
+
hasAnyGlobalPermission: b,
|
|
1777
1786
|
hasAllGlobalPermissions: h,
|
|
1778
1787
|
isAdmin: u,
|
|
1779
1788
|
error: a,
|
|
1780
1789
|
setError: C
|
|
1781
1790
|
};
|
|
1782
|
-
return /* @__PURE__ */
|
|
1783
|
-
},
|
|
1791
|
+
return /* @__PURE__ */ d($e.Provider, { value: E, children: r });
|
|
1792
|
+
}, bt = Re(null), ur = ({
|
|
1784
1793
|
children: r,
|
|
1785
1794
|
resourceName: e,
|
|
1786
1795
|
resourceDescription: t,
|
|
1787
1796
|
requiredPermissions: s = [],
|
|
1788
1797
|
fallbackComponent: o,
|
|
1789
1798
|
loadingComponent: a,
|
|
1790
|
-
onSecurityReady:
|
|
1799
|
+
onSecurityReady: l,
|
|
1791
1800
|
onError: i
|
|
1792
1801
|
}) => {
|
|
1793
1802
|
const u = Ne($e);
|
|
1794
1803
|
if (!u)
|
|
1795
1804
|
throw new Error("ArchbaseViewSecurityProvider deve ser usado dentro de um ArchbaseSecurityProvider");
|
|
1796
|
-
const { user:
|
|
1805
|
+
const { user: m, isAdmin: b } = u, [h, C] = f(null), [E, y] = f(!0), [x, U] = f(null);
|
|
1797
1806
|
if (Ge.useEffect(() => {
|
|
1798
|
-
if (!
|
|
1799
|
-
|
|
1807
|
+
if (!m) {
|
|
1808
|
+
y(!1);
|
|
1800
1809
|
return;
|
|
1801
1810
|
}
|
|
1802
|
-
const
|
|
1811
|
+
const A = new nt(e, t, b);
|
|
1803
1812
|
(async () => {
|
|
1804
|
-
|
|
1813
|
+
y(!0);
|
|
1805
1814
|
try {
|
|
1806
|
-
await
|
|
1807
|
-
C(
|
|
1815
|
+
await A.apply(() => {
|
|
1816
|
+
C(A), y(!1), l && l(A);
|
|
1808
1817
|
});
|
|
1809
1818
|
} catch {
|
|
1810
|
-
const L =
|
|
1811
|
-
U(L),
|
|
1819
|
+
const L = A.getError() || "Erro ao carregar permissões";
|
|
1820
|
+
U(L), y(!1), i && i(L);
|
|
1812
1821
|
}
|
|
1813
1822
|
})();
|
|
1814
|
-
}, [e, t,
|
|
1815
|
-
return a ? /* @__PURE__ */
|
|
1816
|
-
if (
|
|
1817
|
-
return /* @__PURE__ */
|
|
1823
|
+
}, [e, t, m, b, l, i]), E)
|
|
1824
|
+
return a ? /* @__PURE__ */ d(te, { children: a }) : /* @__PURE__ */ d(dr, {});
|
|
1825
|
+
if (x)
|
|
1826
|
+
return /* @__PURE__ */ d("div", { className: "archbase-security-error", children: /* @__PURE__ */ R("div", { children: [
|
|
1818
1827
|
"Erro ao carregar permissões: ",
|
|
1819
|
-
|
|
1828
|
+
x
|
|
1820
1829
|
] }) });
|
|
1821
|
-
if (!
|
|
1822
|
-
return o || /* @__PURE__ */
|
|
1830
|
+
if (!m)
|
|
1831
|
+
return o || /* @__PURE__ */ d("div", { className: "archbase-security-no-user", children: /* @__PURE__ */ d("div", { children: "É necessário fazer login para acessar esta área" }) });
|
|
1823
1832
|
if (s.length > 0 && h && !s.every(
|
|
1824
1833
|
(P) => h.hasPermission(P)
|
|
1825
1834
|
))
|
|
1826
1835
|
return o || /* @__PURE__ */ R("div", { className: "archbase-security-access-denied", children: [
|
|
1827
|
-
/* @__PURE__ */
|
|
1836
|
+
/* @__PURE__ */ d("div", { children: "Você não possui permissão para acessar esta área" }),
|
|
1828
1837
|
/* @__PURE__ */ R("small", { children: [
|
|
1829
1838
|
"Permissões necessárias: ",
|
|
1830
1839
|
s.join(", ")
|
|
1831
1840
|
] })
|
|
1832
1841
|
] });
|
|
1833
|
-
const
|
|
1842
|
+
const k = {
|
|
1834
1843
|
securityManager: h,
|
|
1835
|
-
hasPermission: (
|
|
1836
|
-
hasAnyPermission: (
|
|
1837
|
-
hasAllPermissions: (
|
|
1838
|
-
registerAction: (
|
|
1839
|
-
h?.registerAction(
|
|
1844
|
+
hasPermission: (A) => h?.hasPermission(A) || !1,
|
|
1845
|
+
hasAnyPermission: (A) => A.some((P) => h?.hasPermission(P) || !1),
|
|
1846
|
+
hasAllPermissions: (A) => A.every((P) => h?.hasPermission(P) || !1),
|
|
1847
|
+
registerAction: (A, P) => {
|
|
1848
|
+
h?.registerAction(A, P);
|
|
1840
1849
|
},
|
|
1841
|
-
isLoading:
|
|
1842
|
-
error:
|
|
1850
|
+
isLoading: E,
|
|
1851
|
+
error: x
|
|
1843
1852
|
};
|
|
1844
|
-
return /* @__PURE__ */
|
|
1845
|
-
},
|
|
1853
|
+
return /* @__PURE__ */ d(bt.Provider, { value: k, children: r });
|
|
1854
|
+
}, hr = () => {
|
|
1846
1855
|
const r = Ne($e);
|
|
1847
1856
|
if (!r)
|
|
1848
1857
|
throw new Error("useArchbaseSecurity deve ser usado dentro de um ArchbaseSecurityProvider");
|
|
1849
1858
|
return r;
|
|
1850
1859
|
}, je = () => {
|
|
1851
|
-
const r = Ne(
|
|
1860
|
+
const r = Ne(bt);
|
|
1852
1861
|
if (!r)
|
|
1853
1862
|
throw new Error("useArchbaseViewSecurity deve ser usado dentro de um ArchbaseViewSecurityProvider");
|
|
1854
1863
|
return r;
|
|
1855
|
-
},
|
|
1856
|
-
const t = je(), { hasPermission: s, hasAnyPermission: o, hasAllPermissions: a, registerAction:
|
|
1864
|
+
}, $r = (r, e) => {
|
|
1865
|
+
const t = je(), { hasPermission: s, hasAnyPermission: o, hasAllPermissions: a, registerAction: l, securityManager: i, isLoading: u, error: m } = t;
|
|
1857
1866
|
return Ge.useEffect(() => {
|
|
1858
|
-
r && e && (
|
|
1859
|
-
}, [r, e,
|
|
1867
|
+
r && e && (l("create", `Criar ${e}`), l("edit", `Editar ${e}`), l("delete", `Deletar ${e}`), l("view", `Visualizar ${e}`), l("list", `Listar ${e}`));
|
|
1868
|
+
}, [r, e, l]), {
|
|
1860
1869
|
hasPermission: s,
|
|
1861
1870
|
hasAnyPermission: o,
|
|
1862
1871
|
hasAllPermissions: a,
|
|
1863
|
-
registerAction:
|
|
1872
|
+
registerAction: l,
|
|
1864
1873
|
securityManager: i,
|
|
1865
1874
|
canCreate: s("create"),
|
|
1866
1875
|
canEdit: s("edit"),
|
|
@@ -1868,52 +1877,52 @@ const lr = () => Ut().user, wt = "archbaseSecurityManagerStore", dr = (r, e, t,
|
|
|
1868
1877
|
canView: s("view"),
|
|
1869
1878
|
canList: s("list"),
|
|
1870
1879
|
isLoading: u,
|
|
1871
|
-
error:
|
|
1880
|
+
error: m
|
|
1872
1881
|
};
|
|
1873
|
-
},
|
|
1882
|
+
}, jr = () => {
|
|
1874
1883
|
const r = je();
|
|
1875
1884
|
return {
|
|
1876
1885
|
check: r.hasPermission,
|
|
1877
1886
|
checkAny: r.hasAnyPermission,
|
|
1878
1887
|
checkAll: r.hasAllPermissions,
|
|
1879
|
-
isAdmin:
|
|
1888
|
+
isAdmin: hr().isAdmin
|
|
1880
1889
|
};
|
|
1881
|
-
},
|
|
1890
|
+
}, Et = ({
|
|
1882
1891
|
children: r,
|
|
1883
1892
|
actionName: e,
|
|
1884
1893
|
requiredPermissions: t = [],
|
|
1885
1894
|
requireAll: s = !0,
|
|
1886
1895
|
actionDescription: o,
|
|
1887
1896
|
fallback: a = null,
|
|
1888
|
-
autoRegister:
|
|
1897
|
+
autoRegister: l = !0
|
|
1889
1898
|
}) => {
|
|
1890
|
-
const { hasPermission: i, hasAnyPermission: u, hasAllPermissions:
|
|
1899
|
+
const { hasPermission: i, hasAnyPermission: u, hasAllPermissions: m, registerAction: b } = je();
|
|
1891
1900
|
z(() => {
|
|
1892
|
-
|
|
1893
|
-
}, [e, o,
|
|
1901
|
+
l && e && o && b(e, o);
|
|
1902
|
+
}, [e, o, l, b]);
|
|
1894
1903
|
let h = !1;
|
|
1895
|
-
return e ? h = i(e) : t.length > 0 ? h = s ?
|
|
1896
|
-
},
|
|
1904
|
+
return e ? h = i(e) : t.length > 0 ? h = s ? m(t) : u(t) : h = !0, h ? /* @__PURE__ */ d(te, { children: r }) : /* @__PURE__ */ d(te, { children: a });
|
|
1905
|
+
}, Fr = ({
|
|
1897
1906
|
actionName: r,
|
|
1898
1907
|
actionDescription: e,
|
|
1899
1908
|
children: t,
|
|
1900
1909
|
onClick: s,
|
|
1901
1910
|
disabled: o = !1,
|
|
1902
1911
|
className: a = "",
|
|
1903
|
-
style:
|
|
1912
|
+
style: l = {},
|
|
1904
1913
|
variant: i = "primary",
|
|
1905
1914
|
size: u = "medium",
|
|
1906
|
-
type:
|
|
1915
|
+
type: m = "button"
|
|
1907
1916
|
}) => {
|
|
1908
|
-
const
|
|
1909
|
-
const C = "archbase-secure-btn",
|
|
1910
|
-
return `${C} ${
|
|
1917
|
+
const b = () => {
|
|
1918
|
+
const C = "archbase-secure-btn", E = `archbase-secure-btn--${i}`, y = `archbase-secure-btn--${u}`;
|
|
1919
|
+
return `${C} ${E} ${y} ${a}`.trim();
|
|
1911
1920
|
}, h = () => {
|
|
1912
1921
|
const C = {
|
|
1913
1922
|
small: { padding: "4px 8px", fontSize: "12px" },
|
|
1914
1923
|
medium: { padding: "8px 16px", fontSize: "14px" },
|
|
1915
1924
|
large: { padding: "12px 24px", fontSize: "16px" }
|
|
1916
|
-
},
|
|
1925
|
+
}, E = {
|
|
1917
1926
|
primary: { backgroundColor: "#007bff", color: "white" },
|
|
1918
1927
|
secondary: { backgroundColor: "#6c757d", color: "white" },
|
|
1919
1928
|
danger: { backgroundColor: "#dc3545", color: "white" },
|
|
@@ -1927,43 +1936,43 @@ const lr = () => Ut().user, wt = "archbaseSecurityManagerStore", dr = (r, e, t,
|
|
|
1927
1936
|
fontWeight: "500",
|
|
1928
1937
|
opacity: o ? 0.6 : 1,
|
|
1929
1938
|
...C[u],
|
|
1930
|
-
...
|
|
1931
|
-
...
|
|
1939
|
+
...E[i],
|
|
1940
|
+
...l
|
|
1932
1941
|
};
|
|
1933
1942
|
};
|
|
1934
|
-
return /* @__PURE__ */
|
|
1935
|
-
|
|
1943
|
+
return /* @__PURE__ */ d(
|
|
1944
|
+
Et,
|
|
1936
1945
|
{
|
|
1937
1946
|
actionName: r,
|
|
1938
1947
|
actionDescription: e,
|
|
1939
1948
|
fallback: null,
|
|
1940
|
-
children: /* @__PURE__ */
|
|
1949
|
+
children: /* @__PURE__ */ d(
|
|
1941
1950
|
"button",
|
|
1942
1951
|
{
|
|
1943
|
-
type:
|
|
1952
|
+
type: m,
|
|
1944
1953
|
onClick: s,
|
|
1945
1954
|
disabled: o,
|
|
1946
|
-
className:
|
|
1955
|
+
className: b(),
|
|
1947
1956
|
style: h(),
|
|
1948
1957
|
children: t
|
|
1949
1958
|
}
|
|
1950
1959
|
)
|
|
1951
1960
|
}
|
|
1952
1961
|
);
|
|
1953
|
-
},
|
|
1962
|
+
}, Vr = ({
|
|
1954
1963
|
children: r,
|
|
1955
1964
|
actionName: e,
|
|
1956
1965
|
actionDescription: t,
|
|
1957
1966
|
showLabel: s = !0,
|
|
1958
1967
|
label: o,
|
|
1959
1968
|
fallbackText: a = "Campo não disponível",
|
|
1960
|
-
fallbackComponent:
|
|
1961
|
-
}) => e ? /* @__PURE__ */
|
|
1962
|
-
|
|
1969
|
+
fallbackComponent: l
|
|
1970
|
+
}) => e ? /* @__PURE__ */ d(
|
|
1971
|
+
Et,
|
|
1963
1972
|
{
|
|
1964
1973
|
actionName: e,
|
|
1965
1974
|
actionDescription: t,
|
|
1966
|
-
fallback:
|
|
1975
|
+
fallback: l || /* @__PURE__ */ R("div", { className: "archbase-secure-field-fallback", style: {
|
|
1967
1976
|
padding: "8px",
|
|
1968
1977
|
color: "#666",
|
|
1969
1978
|
fontStyle: "italic",
|
|
@@ -1979,61 +1988,61 @@ const lr = () => Ut().user, wt = "archbaseSecurityManagerStore", dr = (r, e, t,
|
|
|
1979
1988
|
] }),
|
|
1980
1989
|
children: r
|
|
1981
1990
|
}
|
|
1982
|
-
) : /* @__PURE__ */
|
|
1983
|
-
function
|
|
1991
|
+
) : /* @__PURE__ */ d(te, { children: r });
|
|
1992
|
+
function zr(r, e) {
|
|
1984
1993
|
return function(s) {
|
|
1985
|
-
const { resourceName: o, resourceDescription: a, requiredPermissions:
|
|
1986
|
-
return /* @__PURE__ */
|
|
1987
|
-
|
|
1994
|
+
const { resourceName: o, resourceDescription: a, requiredPermissions: l, fallbackComponent: i } = e;
|
|
1995
|
+
return /* @__PURE__ */ d(
|
|
1996
|
+
ur,
|
|
1988
1997
|
{
|
|
1989
1998
|
resourceName: o,
|
|
1990
1999
|
resourceDescription: a,
|
|
1991
|
-
requiredPermissions:
|
|
2000
|
+
requiredPermissions: l,
|
|
1992
2001
|
fallbackComponent: i,
|
|
1993
|
-
children: /* @__PURE__ */
|
|
2002
|
+
children: /* @__PURE__ */ d(r, { ...s })
|
|
1994
2003
|
}
|
|
1995
2004
|
);
|
|
1996
2005
|
};
|
|
1997
2006
|
}
|
|
1998
2007
|
export {
|
|
1999
|
-
|
|
2008
|
+
At as ARCHBASE_SECURITY_MANAGER_STORE,
|
|
2000
2009
|
ir as AccessIntervalDto,
|
|
2001
|
-
|
|
2010
|
+
ct as AccessScheduleDto,
|
|
2002
2011
|
Le as AccessTokenDto,
|
|
2003
2012
|
ar as ActionDto,
|
|
2004
2013
|
Oe as ApiTokenDto,
|
|
2005
|
-
|
|
2006
|
-
|
|
2014
|
+
wt as ArchbaseAccessTokenService,
|
|
2015
|
+
yt as ArchbaseApiTokenService,
|
|
2007
2016
|
sr as ArchbaseAuthContext,
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2017
|
+
Cr as ArchbaseAuthProvider,
|
|
2018
|
+
mt as ArchbaseGroupService,
|
|
2019
|
+
Dr as ArchbaseLogin,
|
|
2020
|
+
gt as ArchbaseProfileService,
|
|
2021
|
+
Et as ArchbaseProtectedComponent,
|
|
2022
|
+
Rr as ArchbaseResetPassword,
|
|
2023
|
+
vt as ArchbaseResourceService,
|
|
2024
|
+
Fr as ArchbaseSecureActionButton,
|
|
2025
|
+
Vr as ArchbaseSecureFormField,
|
|
2026
|
+
nt as ArchbaseSecurityManager,
|
|
2027
|
+
Lr as ArchbaseSecurityProvider,
|
|
2019
2028
|
V as ArchbaseTenantManager,
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2029
|
+
Ze as ArchbaseUser,
|
|
2030
|
+
ft as ArchbaseUserService,
|
|
2031
|
+
et as ArchbaseUsernameAndPassword,
|
|
2032
|
+
et as ArchbaseUsernameAndPasswordImpl,
|
|
2033
|
+
ur as ArchbaseViewSecurityProvider,
|
|
2025
2034
|
Te as CONTEXT_STORAGE_KEY,
|
|
2026
2035
|
Vt as DefaultArchbaseTokenManager,
|
|
2027
|
-
|
|
2036
|
+
dr as DefaultSecurityLoading,
|
|
2028
2037
|
Q as ENCRYPTION_KEY,
|
|
2029
|
-
|
|
2038
|
+
rt as FetchError,
|
|
2030
2039
|
he as GroupDto,
|
|
2031
2040
|
_r as PermissionDto,
|
|
2032
2041
|
ue as ProfileDto,
|
|
2033
|
-
|
|
2042
|
+
ht as ResourceDto,
|
|
2034
2043
|
le as SecurityDto,
|
|
2035
2044
|
ae as SecurityType,
|
|
2036
|
-
|
|
2045
|
+
Se as TOKEN_COOKIE_NAME,
|
|
2037
2046
|
nr as TipoRecurso,
|
|
2038
2047
|
Pe as USER_NAME,
|
|
2039
2048
|
Ie as USER_NAME_AND_PASSWORD,
|
|
@@ -2047,23 +2056,23 @@ export {
|
|
|
2047
2056
|
Yt as fetchWithRefreshToken,
|
|
2048
2057
|
Wt as generateCodeChallenge,
|
|
2049
2058
|
zt as generateRandomString,
|
|
2050
|
-
|
|
2059
|
+
tt as getRandomInteger,
|
|
2051
2060
|
rr as getRefreshExpiresIn,
|
|
2052
2061
|
Gt as postWithXForm,
|
|
2053
2062
|
Jt as redirectToLogin,
|
|
2054
2063
|
Xt as redirectToLogout,
|
|
2055
|
-
|
|
2056
|
-
|
|
2064
|
+
Br as useArchbaseAuthenticationManager,
|
|
2065
|
+
Mr as useArchbaseGetCurrentToken,
|
|
2057
2066
|
lr as useArchbaseGetLoggedUser,
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2067
|
+
jr as useArchbasePermissionCheck,
|
|
2068
|
+
Or as useArchbaseResetPassword,
|
|
2069
|
+
$r as useArchbaseSecureForm,
|
|
2070
|
+
hr as useArchbaseSecurity,
|
|
2071
|
+
Nr as useArchbaseSecurityManager,
|
|
2072
|
+
Ur as useArchbaseTenantManager,
|
|
2064
2073
|
je as useArchbaseViewSecurity,
|
|
2065
|
-
|
|
2074
|
+
Tr as useBrowserStorage,
|
|
2066
2075
|
er as validateConfig,
|
|
2067
2076
|
Qt as validateState,
|
|
2068
|
-
|
|
2077
|
+
zr as withArchbaseSecurity
|
|
2069
2078
|
};
|