@tesouro/embedded-components-react 0.11.71 → 0.11.72
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/README.md +1 -0
- package/dist/index.css +35 -192
- package/dist/index.d.ts +75 -71
- package/dist/lib/SettingsWidget.d.ts +5 -1
- package/dist/lib/WidgetSuite.d.ts +4 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index3.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index4.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index6.js +196 -131
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index3.js +11 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index4.js +5 -3
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index5.js +38 -32
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index6.js +103 -75
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index7.js +140 -168
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index8.js +97 -87
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/feature/dist/index7.js +11 -7
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/feature/dist/index8.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index2.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index3.js +134 -177
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index4.js +110 -176
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index5.js +28 -38
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/ExpenseSettingsTabs/ExpenseSettingsTabs.js +13 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/SettingsWidget/SettingsWidget.js +28 -24
- package/dist/libs/tesouro-embedded-components-react/settings-widget/help/ui/shadcn/dist/index3.js +35 -31
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index10.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index7.js +1 -5
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index8.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index11.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index12.js +22 -36
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index16.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index17.js +54 -60
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index20.js +75 -60
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index3.js +42 -27
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index6.js +89 -82
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index9.js +39 -38
- package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/feature/dist/index4.js +32 -32
- package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/ui/dist/index3.js +56 -71
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index10.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index12.js +86 -66
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index13.js +51 -51
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index15.js +146 -132
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +95 -99
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index3.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index4.js +8 -27
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index5.js +69 -72
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index6.js +51 -51
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index.js +9 -11
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index10.js +83 -298
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index11.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index12.js +122 -75
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index13.js +41 -15
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index14.js +7 -131
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index15.js +147 -48
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index16.js +240 -11
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index17.js +15 -173
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index2.js +38 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index3.js +5 -46
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index4.js +52 -45
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index5.js +101 -25
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index6.js +40 -98
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index7.js +415 -40
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index8.js +261 -332
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index9.js +15 -8
- package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApprovalPolicyRules.js +136 -122
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +16 -17
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index12.js +99 -100
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index16.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index17.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index18.js +10 -55
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index19.js +34 -8
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index20.js +8 -84
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index21.js +86 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index3.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index5.js +17 -18
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index7.js +33 -42
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +24 -24
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/FileDropZone/FileDropZone.js +62 -0
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/LoadingRegion/LoadingRegion.js +1 -0
- package/dist/packages/shared-ui-shadcn/dist/index.js +2301 -2283
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index18.js +0 -291
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index19.js +0 -22
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/avatarSwatch.js +0 -26
package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index12.js
CHANGED
|
@@ -12,18 +12,18 @@ import "../../../../shared/data-access/dist/index.js";
|
|
|
12
12
|
import "../../../../shared/ui/dist/index.js";
|
|
13
13
|
import { useAnalyticsTrack as o } from "../../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
14
14
|
import "../../../../shared/feature/dist/index.js";
|
|
15
|
-
import { TeamWidgetAnalyticsEvent as
|
|
16
|
-
import { useInviteUserMutation as
|
|
17
|
-
import { useAllTeamMembersQuery as
|
|
18
|
-
import { useAllDepartmentsQuery as
|
|
19
|
-
import { useAllLocationsQuery as
|
|
15
|
+
import { TeamWidgetAnalyticsEvent as ee } from "./index2.js";
|
|
16
|
+
import { useInviteUserMutation as s } from "../../data-access/dist/index7.js";
|
|
17
|
+
import { useAllTeamMembersQuery as te } from "../../data-access/dist/index14.js";
|
|
18
|
+
import { useAllDepartmentsQuery as ne } from "../../data-access/dist/index17.js";
|
|
19
|
+
import { useAllLocationsQuery as re } from "../../data-access/dist/index21.js";
|
|
20
20
|
import "../../data-access/dist/index.js";
|
|
21
|
-
import { toNamedSelectOptions as
|
|
22
|
-
import { isAccountsSectionVisibleForRole as
|
|
23
|
-
import { resolveAcceptInviteRedirectUri as
|
|
24
|
-
import { useMemo as
|
|
21
|
+
import { toNamedSelectOptions as c, toReportingManagerOptions as ie, toRoleCardOptions as ae } from "./index11.js";
|
|
22
|
+
import { isAccountsSectionVisibleForRole as oe, isAdminPermissionSet as se, isDebitCardAdminPermissionSet as ce, isEmployeePermissionSet as l, toAccountAccessInputs as le, toAccountAccessOptions as ue } from "./index7.js";
|
|
23
|
+
import { resolveAcceptInviteRedirectUri as de } from "./index8.js";
|
|
24
|
+
import { useMemo as u, useState as d } from "react";
|
|
25
25
|
// ../../libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index12.js
|
|
26
|
-
var
|
|
26
|
+
var f = {
|
|
27
27
|
name: "",
|
|
28
28
|
email: "",
|
|
29
29
|
department: "",
|
|
@@ -31,85 +31,105 @@ var m = {
|
|
|
31
31
|
reportingManager: "",
|
|
32
32
|
role: "",
|
|
33
33
|
accountAccess: []
|
|
34
|
-
},
|
|
35
|
-
function
|
|
36
|
-
let
|
|
37
|
-
|
|
38
|
-
let [
|
|
34
|
+
}, p = /^\S+@\S+\.\S+$/;
|
|
35
|
+
function m({ canInvite: m, canReadDirectory: fe, canManageAccountAccess: h, canReadInternalAccounts: g, canReadExternalAccounts: _, canGrantDebitCardAccess: pe = !1, roles: v, roleCatalog: y = [], organizationId: b, featureLabels: x, acceptInviteRedirectUri: me, openOnArrival: he = !1 }) {
|
|
36
|
+
let ge = o(), [S, C] = d(!1), [_e, ve] = d(he);
|
|
37
|
+
_e && m && (ve(!1), C(!0));
|
|
38
|
+
let [w, T] = d(f), [ye, E] = d({}), [be, D] = d(!1), O = s(), k = S && m && fe, A = ne({ enabled: k }), j = re({ enabled: k }), M = te({
|
|
39
39
|
Status: "ACTIVE",
|
|
40
|
-
enabled:
|
|
41
|
-
}),
|
|
42
|
-
roleIds:
|
|
43
|
-
enabled:
|
|
44
|
-
}),
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
enabled: k
|
|
41
|
+
}), N = S && m && h, P = n({ enabled: N && g }), F = i({ enabled: N && _ }), I = S && m, xe = u(() => v.map((e) => e.id), [v]), L = a({
|
|
42
|
+
roleIds: xe,
|
|
43
|
+
enabled: I
|
|
44
|
+
}), R = S && m && pe, z = r({ enabled: R }), Se = u(() => ae(v), [v]), Ce = u(() => A.isComplete ? c(A.data?.data ?? []) : [], [A.isComplete, A.data?.data]), we = u(() => j.isComplete ? c(j.data?.data ?? []) : [], [j.isComplete, j.data?.data]), Te = u(() => M.isComplete ? ie(M.data?.data ?? [], y, x, b) : [], [
|
|
45
|
+
M.isComplete,
|
|
46
|
+
M.data?.data,
|
|
47
|
+
y,
|
|
47
48
|
x,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
savings: C.accountTypeSavings
|
|
49
|
+
b
|
|
50
|
+
]), B = k && !A.isComplete && !A.isError, V = k && !j.isComplete && !j.isError, H = k && !M.isComplete && !M.isError, U = k && A.isError, Ee = k && j.isError, De = k && M.isError, Oe = !g || !!P.data && !P.hasNextPage && !P.isFetchingNextPage, ke = !_ || !!F.data && !F.hasNextPage && !F.isFetchingNextPage, W = !!w.role && L.resolvingRoleIds.has(w.role), G = I && !!w.role && (W || !L.byRoleId.has(w.role)) && !W, K = N && (g && P.isError || _ && F.isError || G), q = N && !K && (!Oe || !ke || W), J = u(() => ue(g ? P.data?.data ?? [] : [], _ ? F.data?.data ?? [] : [], {
|
|
51
|
+
checking: x.accountTypeChecking,
|
|
52
|
+
savings: x.accountTypeSavings
|
|
53
53
|
}), [
|
|
54
|
+
g,
|
|
54
55
|
_,
|
|
55
|
-
|
|
56
|
+
P.data?.data,
|
|
56
57
|
F.data?.data,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
x.accountTypeChecking,
|
|
59
|
+
x.accountTypeSavings
|
|
60
|
+
]), Ae = u(() => J.options.map((e) => ({
|
|
61
|
+
...e,
|
|
62
|
+
sourceLabel: e.source === "internal" ? x.accountSourceInternal : x.accountSourceExternal
|
|
63
|
+
})), [
|
|
64
|
+
J.options,
|
|
65
|
+
x.accountSourceInternal,
|
|
66
|
+
x.accountSourceExternal
|
|
67
|
+
]), Y = L.byRoleId.get(w.role), X = se(Y), Z = R && ce(Y), Q = Z && (t(z) || z.isFetching), je = Z && z.isError, $ = h && oe(!!w.role, l(Y)), Me = h && l(Y), Ne = $ ? X ? "admin" : "picker" : Me ? "employee" : "hidden";
|
|
61
68
|
return {
|
|
62
|
-
isInviteOpen:
|
|
63
|
-
inviteForm:
|
|
64
|
-
inviteErrors:
|
|
65
|
-
isInviting:
|
|
66
|
-
inviteErrorMessage:
|
|
67
|
-
roleOptions:
|
|
68
|
-
departmentOptions:
|
|
69
|
-
locationOptions:
|
|
70
|
-
reportingManagerOptions:
|
|
71
|
-
accountAccessOptions:
|
|
72
|
-
departmentsLoading:
|
|
73
|
-
locationsLoading:
|
|
74
|
-
reportingManagersLoading:
|
|
75
|
-
departmentsError:
|
|
76
|
-
locationsError:
|
|
77
|
-
reportingManagersError:
|
|
69
|
+
isInviteOpen: S,
|
|
70
|
+
inviteForm: w,
|
|
71
|
+
inviteErrors: ye,
|
|
72
|
+
isInviting: O.isPending,
|
|
73
|
+
inviteErrorMessage: O.isError ? x.inviteFailedError : void 0,
|
|
74
|
+
roleOptions: Se,
|
|
75
|
+
departmentOptions: Ce,
|
|
76
|
+
locationOptions: we,
|
|
77
|
+
reportingManagerOptions: Te,
|
|
78
|
+
accountAccessOptions: Ae,
|
|
79
|
+
departmentsLoading: B,
|
|
80
|
+
locationsLoading: V,
|
|
81
|
+
reportingManagersLoading: H,
|
|
82
|
+
departmentsError: U,
|
|
83
|
+
locationsError: Ee,
|
|
84
|
+
reportingManagersError: De,
|
|
78
85
|
accountAccessLoading: q,
|
|
79
86
|
accountAccessError: K,
|
|
80
|
-
|
|
87
|
+
onRetryAccountAccess: () => {
|
|
88
|
+
g && P.isError && P.refetch(), _ && F.isError && F.refetch();
|
|
89
|
+
},
|
|
90
|
+
accountAccessMode: Ne,
|
|
81
91
|
isInviteSubmitBlocked: Q,
|
|
82
92
|
openInviteForm: () => {
|
|
83
|
-
|
|
93
|
+
m && (T(f), E({}), D(!1), O.reset(), C(!0));
|
|
84
94
|
},
|
|
85
95
|
closeInviteForm: () => {
|
|
86
|
-
|
|
96
|
+
C(!1);
|
|
97
|
+
},
|
|
98
|
+
onInviteFormChange: (e) => {
|
|
99
|
+
T(e), be && E((t) => {
|
|
100
|
+
let n = e.name.trim(), r = e.email.trim();
|
|
101
|
+
return {
|
|
102
|
+
name: n ? void 0 : x.nameRequiredError,
|
|
103
|
+
email: r ? p.test(r) ? void 0 : x.emailInvalidError : x.emailRequiredError,
|
|
104
|
+
role: e.role === w.role ? t.role : v.some((t) => t.id === e.role) ? void 0 : x.roleRequiredError
|
|
105
|
+
};
|
|
106
|
+
});
|
|
87
107
|
},
|
|
88
|
-
onInviteFormChange: D,
|
|
89
108
|
onInviteSubmit: () => {
|
|
90
|
-
if (!
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
109
|
+
if (!m || B || V || H || $ && (q || K) || W || Q) return;
|
|
110
|
+
D(!0);
|
|
111
|
+
let t = {}, n = w.name.trim(), r = w.email.trim();
|
|
112
|
+
n || (t.name = x.nameRequiredError), r ? p.test(r) || (t.email = x.emailInvalidError) : t.email = x.emailRequiredError;
|
|
113
|
+
let i = w.role;
|
|
114
|
+
if (v.some((e) => e.id === i) ? G ? t.role = x.rolePermissionsUnavailableError : X && !h ? t.role = x.roleNeedsAccountAccessError : je && (t.role = x.debitCardsUnavailableError, z.refetch()) : t.role = x.roleRequiredError, E(t), t.name || t.email || t.role) return;
|
|
115
|
+
let a = $ ? X ? J.allAccountIds : w.accountAccess : [], o = le(a, J.descriptors), s = Z ? (z.data?.data ?? []).map((e) => e.id) : [];
|
|
116
|
+
O.mutate({
|
|
97
117
|
body: {
|
|
98
118
|
name: n,
|
|
99
119
|
email: r,
|
|
100
120
|
status: "INVITED",
|
|
101
|
-
reportingManagerUserId:
|
|
121
|
+
reportingManagerUserId: w.reportingManager || null,
|
|
102
122
|
permissionIds: [],
|
|
103
|
-
redirectUri:
|
|
123
|
+
redirectUri: de(me)
|
|
104
124
|
},
|
|
105
125
|
roleId: i,
|
|
106
|
-
departmentId:
|
|
107
|
-
locationId:
|
|
126
|
+
departmentId: w.department || void 0,
|
|
127
|
+
locationId: w.location || void 0,
|
|
108
128
|
bankAccountAccess: o,
|
|
109
|
-
debitCardIds:
|
|
129
|
+
debitCardIds: s
|
|
110
130
|
}, {
|
|
111
131
|
onSuccess: (t) => {
|
|
112
|
-
|
|
132
|
+
ge(ee.MemberInvited, { memberId: t?.id }), C(!1), t?.debitCardAccessError === void 0 ? e.success(x.inviteSuccessToast) : (console.error("Failed to grant card access to invite:", t.debitCardAccessError), e.warning(x.inviteCardAccessWarningToast));
|
|
113
133
|
},
|
|
114
134
|
onError: (e) => {
|
|
115
135
|
console.error("Failed to send team invite:", e);
|
|
@@ -118,4 +138,4 @@ function h({ canInvite: h, canReadDirectory: de, canManageAccountAccess: g, canR
|
|
|
118
138
|
}
|
|
119
139
|
};
|
|
120
140
|
}
|
|
121
|
-
export {
|
|
141
|
+
export { m as useInviteForm };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index13.js
CHANGED
|
@@ -2,33 +2,32 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import { useGroupAdmin as
|
|
7
|
-
import { useAllTeamMembersQuery as
|
|
8
|
-
import { useAllLocationsQuery as
|
|
9
|
-
import { useLocationMembersQuery as
|
|
10
|
-
import { useCreateLocationMutation as
|
|
5
|
+
import { buildMemberDirectory as e } from "./index4.js";
|
|
6
|
+
import { useGroupAdmin as t } from "./index5.js";
|
|
7
|
+
import { useAllTeamMembersQuery as n } from "../../data-access/dist/index14.js";
|
|
8
|
+
import { useAllLocationsQuery as r } from "../../data-access/dist/index21.js";
|
|
9
|
+
import { useLocationMembersQuery as i } from "../../data-access/dist/index22.js";
|
|
10
|
+
import { useCreateLocationMutation as a, useDeactivateLocationMutation as o, useLocationMembersMutation as s, useUpdateLocationMutation as c } from "../../data-access/dist/index23.js";
|
|
11
11
|
import "../../data-access/dist/index.js";
|
|
12
|
-
import { useMemo as
|
|
12
|
+
import { useMemo as l } from "react";
|
|
13
13
|
// ../../libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index13.js
|
|
14
|
-
function
|
|
15
|
-
let
|
|
14
|
+
function u({ canRead: u, canWrite: d, featureLabels: f }) {
|
|
15
|
+
let p = n({
|
|
16
16
|
Status: "ALL",
|
|
17
|
-
enabled:
|
|
18
|
-
}),
|
|
19
|
-
return
|
|
20
|
-
canRead:
|
|
21
|
-
canWrite:
|
|
22
|
-
directory:
|
|
23
|
-
directoryReady:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
useEditMembers: (e) => a({
|
|
17
|
+
enabled: u
|
|
18
|
+
}), m = p.data?.data, h = l(() => e(m ?? []), [m]);
|
|
19
|
+
return t({
|
|
20
|
+
canRead: u,
|
|
21
|
+
canWrite: d,
|
|
22
|
+
directory: h,
|
|
23
|
+
directoryReady: p.isComplete,
|
|
24
|
+
useListQuery: () => r({ enabled: u }),
|
|
25
|
+
useEditMembers: (e) => i({
|
|
27
26
|
locationId: e,
|
|
28
|
-
enabled:
|
|
27
|
+
enabled: d
|
|
29
28
|
}),
|
|
30
29
|
useMutations: () => {
|
|
31
|
-
let e =
|
|
30
|
+
let e = a(), t = c(), n = o(), r = s();
|
|
32
31
|
return {
|
|
33
32
|
create: (t) => e.mutateAsync({ name: t }),
|
|
34
33
|
rename: (e, n) => t.mutateAsync({
|
|
@@ -50,40 +49,41 @@ function d({ canRead: d, canWrite: f, featureLabels: p }) {
|
|
|
50
49
|
};
|
|
51
50
|
},
|
|
52
51
|
panelLabels: {
|
|
53
|
-
title:
|
|
54
|
-
addButton:
|
|
55
|
-
nameColumn:
|
|
56
|
-
assignedColumn:
|
|
57
|
-
actionsColumn:
|
|
58
|
-
editAction:
|
|
59
|
-
deleteAction:
|
|
60
|
-
emptyMessage:
|
|
61
|
-
loadingLabel:
|
|
62
|
-
errorTitle:
|
|
63
|
-
errorDescription:
|
|
64
|
-
rowActionsAriaLabel:
|
|
52
|
+
title: f.locationsTitle,
|
|
53
|
+
addButton: f.locationsAddButton,
|
|
54
|
+
nameColumn: f.groupNameColumn,
|
|
55
|
+
assignedColumn: f.groupAssignedColumn,
|
|
56
|
+
actionsColumn: f.groupActionsColumn,
|
|
57
|
+
editAction: f.groupEditAction,
|
|
58
|
+
deleteAction: f.locationDeleteAction,
|
|
59
|
+
emptyMessage: f.locationsEmpty,
|
|
60
|
+
loadingLabel: f.locationsLoading,
|
|
61
|
+
errorTitle: f.locationsErrorTitle,
|
|
62
|
+
errorDescription: f.locationsErrorDescription,
|
|
63
|
+
rowActionsAriaLabel: f.groupRowActionsAriaLabel
|
|
65
64
|
},
|
|
66
65
|
drawerLabels: {
|
|
67
|
-
createTitle:
|
|
68
|
-
editTitle:
|
|
69
|
-
description:
|
|
70
|
-
nameLabel:
|
|
71
|
-
namePlaceholder:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
66
|
+
createTitle: f.locationCreateTitle,
|
|
67
|
+
editTitle: f.locationEditTitle,
|
|
68
|
+
description: f.locationDrawerDescription,
|
|
69
|
+
nameLabel: f.locationNameLabel,
|
|
70
|
+
namePlaceholder: f.locationNamePlaceholder,
|
|
71
|
+
nameRequired: f.groupNameRequired,
|
|
72
|
+
membersLabel: f.groupMembersLabel,
|
|
73
|
+
membersSearchPlaceholder: f.groupMembersSearchPlaceholder,
|
|
74
|
+
membersEmptyMessage: f.groupMembersEmpty,
|
|
75
|
+
cancelButton: f.groupCancelButton,
|
|
76
|
+
saveButton: f.groupSaveButton,
|
|
77
|
+
close: f.groupCloseButton,
|
|
78
|
+
deleteButton: f.locationDeleteAction
|
|
79
79
|
},
|
|
80
80
|
countLabels: {
|
|
81
|
-
memberSingular:
|
|
82
|
-
memberPlural:
|
|
83
|
-
noMembers:
|
|
81
|
+
memberSingular: f.groupMemberSingular,
|
|
82
|
+
memberPlural: f.groupMemberPlural,
|
|
83
|
+
noMembers: f.groupNoMembers
|
|
84
84
|
},
|
|
85
|
-
saveFailedMessage:
|
|
86
|
-
deleteFailedMessage:
|
|
85
|
+
saveFailedMessage: f.locationSaveFailed,
|
|
86
|
+
deleteFailedMessage: f.locationDeleteFailed
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
|
-
export {
|
|
89
|
+
export { u as useLocationsAdmin };
|