@tesouro/embedded-components-react 0.4.24 → 0.4.26
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/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +2219 -2220
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useRolePermissionsQueries.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index11.js +45 -36
- package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index12.js +64 -60
- package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index14.js +56 -47
- package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index15.js +157 -143
- package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index16.js +12 -15
- package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index17.js +271 -261
- package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index3.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index7.js +19 -22
- package/package.json +1 -1
|
@@ -1,32 +1,29 @@
|
|
|
1
|
+
import { Scope as e } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
2
|
+
import "../../../shared/data-access/dist/index.js";
|
|
1
3
|
//#region ../../libs/tesouro-embedded-components-react/team-widget/feature/dist/index7.js
|
|
2
|
-
|
|
3
|
-
return e.toLowerCase().split(":").map((e) => e.trim()).filter(Boolean).some((e) => e === t);
|
|
4
|
-
}
|
|
5
|
-
function t(t) {
|
|
6
|
-
return e(t, "admin");
|
|
7
|
-
}
|
|
8
|
-
function n(t) {
|
|
9
|
-
return e(t, "employee");
|
|
10
|
-
}
|
|
4
|
+
var t = e.BankAccountWriteOrg, n = [e.BankAccountReadOrg, e.ExternalBankAccountReadOrg];
|
|
11
5
|
function r(e) {
|
|
12
|
-
return !!e
|
|
6
|
+
return !!e?.has(t);
|
|
7
|
+
}
|
|
8
|
+
function i(e) {
|
|
9
|
+
return e ? !n.some((t) => e.has(t)) : !1;
|
|
13
10
|
}
|
|
14
|
-
function
|
|
15
|
-
return e
|
|
11
|
+
function a(e, t) {
|
|
12
|
+
return e && !t;
|
|
16
13
|
}
|
|
17
|
-
function
|
|
14
|
+
function o(e) {
|
|
18
15
|
return `••••${(e ?? "").trim().slice(-4)}`;
|
|
19
16
|
}
|
|
20
|
-
function
|
|
17
|
+
function s(e, t) {
|
|
21
18
|
return e?.trim() || t;
|
|
22
19
|
}
|
|
23
|
-
function
|
|
20
|
+
function c(e, t, n) {
|
|
24
21
|
let r = [], i = /* @__PURE__ */ new Map();
|
|
25
22
|
for (let t of e) {
|
|
26
|
-
let e =
|
|
23
|
+
let e = o(t.accountNumber);
|
|
27
24
|
r.push({
|
|
28
25
|
value: t.id,
|
|
29
|
-
name:
|
|
26
|
+
name: s(t.nickname, e),
|
|
30
27
|
typeLabel: n.checking,
|
|
31
28
|
maskedNumber: e,
|
|
32
29
|
source: "internal"
|
|
@@ -36,10 +33,10 @@ function s(e, t, n) {
|
|
|
36
33
|
});
|
|
37
34
|
}
|
|
38
35
|
for (let e of t) {
|
|
39
|
-
let t =
|
|
36
|
+
let t = o(e.accountNumber);
|
|
40
37
|
r.push({
|
|
41
38
|
value: e.id,
|
|
42
|
-
name:
|
|
39
|
+
name: s(e.nickname, t),
|
|
43
40
|
typeLabel: e.type === "SAVINGS" ? n.savings : n.checking,
|
|
44
41
|
maskedNumber: t,
|
|
45
42
|
source: "external"
|
|
@@ -54,11 +51,11 @@ function s(e, t, n) {
|
|
|
54
51
|
allAccountIds: r.map((e) => e.value)
|
|
55
52
|
};
|
|
56
53
|
}
|
|
57
|
-
function
|
|
54
|
+
function l(e, t) {
|
|
58
55
|
return e.map((e) => t.get(e)).filter((e) => !!e);
|
|
59
56
|
}
|
|
60
|
-
function
|
|
57
|
+
function u({ isAdmin: e, accessibleCount: t, totalCount: n, labels: r }) {
|
|
61
58
|
return e ? r.accountAccessAll : t <= 0 ? r.accountAccessNone : `${t} ${t === 1 ? r.accountAccessCountSingular : r.accountAccessCountPlural}${n > 0 ? ` ${r.accountAccessOf} ${n}` : ""}`;
|
|
62
59
|
}
|
|
63
60
|
//#endregion
|
|
64
|
-
export {
|
|
61
|
+
export { t as ACCOUNT_ACCESS_ADMIN_PERMISSION_KEY, n as ACCOUNT_ACCESS_VISIBILITY_PERMISSION_KEYS, u as formatAccountAccessLabel, a as isAccountsSectionVisibleForRole, r as isAdminPermissionSet, i as isEmployeePermissionSet, o as maskAccountNumber, l as toAccountAccessInputs, c as toAccountAccessOptions };
|