@tesouro/embedded-components-react 0.9.51 → 0.9.54
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 +0 -1
- package/dist/index.d.ts +1 -9
- package/dist/lib/ReceivablesWidget.d.ts +1 -9
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +56 -57
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +40 -50
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index16.js +53 -51
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +282 -282
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index3.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js
CHANGED
|
@@ -6,373 +6,373 @@ import { OrganizationStatus as e, isOrganizationOnItsWay as ee } from "../../../
|
|
|
6
6
|
import { useEmbedApi as te } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
7
7
|
import { hasAnyScope as t } from "../../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
8
8
|
import { Scope as n } from "../../../../shared/data-access/dist/lib/scopes.js";
|
|
9
|
-
import { useAllOrganizationRolesQuery as
|
|
9
|
+
import { useAllOrganizationRolesQuery as ne } from "../../../../shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js";
|
|
10
10
|
import "../../../../shared/data-access/dist/index.js";
|
|
11
|
-
import { EmbeddedToaster as
|
|
11
|
+
import { EmbeddedToaster as re } from "../../../../shared/ui/dist/lib/EmbeddedToaster.js";
|
|
12
12
|
import "../../../../shared/ui/dist/index.js";
|
|
13
|
-
import { useAnalyticsTrack as
|
|
13
|
+
import { useAnalyticsTrack as r } from "../../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
14
14
|
import { WidgetProvider as i } from "../../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
15
|
-
import { useWidgetConfig as ie, useWidgetError as ae,
|
|
15
|
+
import { useWidgetConfig as ie, useWidgetError as ae, useWidgetInitStaleForToken as oe, useWidgetLoading as se } from "../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
16
16
|
import "../../../../shared/feature/dist/index.js";
|
|
17
|
-
import { DEFAULT_FEATURE_LABELS as
|
|
18
|
-
import { TeamWidgetAnalyticsEvent as
|
|
19
|
-
import { useRolesQuery as
|
|
20
|
-
import { useTeamMembersQuery as
|
|
21
|
-
import { useAllTeamMembersQuery as
|
|
17
|
+
import { DEFAULT_FEATURE_LABELS as ce } from "./index3.js";
|
|
18
|
+
import { TeamWidgetAnalyticsEvent as le, WIDGET_NAME as a } from "./index2.js";
|
|
19
|
+
import { useRolesQuery as ue } from "../../data-access/dist/index12.js";
|
|
20
|
+
import { useTeamMembersQuery as de } from "../../data-access/dist/index13.js";
|
|
21
|
+
import { useAllTeamMembersQuery as fe } from "../../data-access/dist/index14.js";
|
|
22
22
|
import "../../data-access/dist/index.js";
|
|
23
|
-
import { useDepartmentsAdmin as
|
|
24
|
-
import { isMemberActionable as
|
|
25
|
-
import { useInviteForm as
|
|
26
|
-
import { useLocationsAdmin as
|
|
27
|
-
import { useMemberAccountAccess as
|
|
28
|
-
import { canEditMemberProfile as
|
|
29
|
-
import { useTeamActions as
|
|
30
|
-
import { InviteTeamMemberForm as
|
|
31
|
-
import { EditTeamMemberPanel as
|
|
32
|
-
import { GroupAdminDrawer as
|
|
33
|
-
import { GroupAdminPanel as
|
|
34
|
-
import { TeamActionDialog as
|
|
35
|
-
import { TeamMembersTable as
|
|
36
|
-
import { TeamMemberDetails as
|
|
37
|
-
import { TeamTabs as
|
|
23
|
+
import { useDepartmentsAdmin as pe } from "./index6.js";
|
|
24
|
+
import { isMemberActionable as me, resolveReportingManager as he, toAssignableRoles as ge, toDirectReportRows as _e, toRoleDisplayCatalog as ve, toScopedRoles as ye, toTeamMemberDetails as be, toTeamMemberRows as xe } from "./index11.js";
|
|
25
|
+
import { useInviteForm as Se } from "./index12.js";
|
|
26
|
+
import { useLocationsAdmin as Ce } from "./index13.js";
|
|
27
|
+
import { useMemberAccountAccess as we } from "./index14.js";
|
|
28
|
+
import { canEditMemberProfile as Te, canEditMemberRole as Ee, useMemberEdit as De } from "./index15.js";
|
|
29
|
+
import { useTeamActions as Oe } from "./index16.js";
|
|
30
|
+
import { InviteTeamMemberForm as ke } from "../../ui/dist/index8.js";
|
|
31
|
+
import { EditTeamMemberPanel as Ae } from "../../ui/dist/index10.js";
|
|
32
|
+
import { GroupAdminDrawer as je } from "../../ui/dist/index12.js";
|
|
33
|
+
import { GroupAdminPanel as Me } from "../../ui/dist/index14.js";
|
|
34
|
+
import { TeamActionDialog as o } from "../../ui/dist/index15.js";
|
|
35
|
+
import { TeamMembersTable as Ne } from "../../ui/dist/index17.js";
|
|
36
|
+
import { TeamMemberDetails as Pe } from "../../ui/dist/index18.js";
|
|
37
|
+
import { TeamTabs as Fe } from "../../ui/dist/index19.js";
|
|
38
38
|
import "../../ui/dist/index.js";
|
|
39
|
-
import { useEffect as
|
|
40
|
-
import { Fragment as
|
|
41
|
-
import { Ban as
|
|
39
|
+
import { useEffect as s, useMemo as c, useState as l } from "react";
|
|
40
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
41
|
+
import { Ban as Ie, Building2 as Le, MailIcon as Re, MapPin as ze, Trash2 as Be } from "lucide-react";
|
|
42
42
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js
|
|
43
|
-
var
|
|
43
|
+
var Ve = [
|
|
44
44
|
5,
|
|
45
45
|
10,
|
|
46
46
|
25
|
|
47
|
-
],
|
|
48
|
-
function
|
|
49
|
-
let
|
|
50
|
-
...
|
|
51
|
-
...
|
|
52
|
-
}), [
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}, [
|
|
56
|
-
let { organizationId:
|
|
57
|
-
canRead:
|
|
58
|
-
canWrite:
|
|
59
|
-
featureLabels:
|
|
60
|
-
}),
|
|
61
|
-
canRead:
|
|
62
|
-
canWrite:
|
|
63
|
-
featureLabels:
|
|
64
|
-
}),
|
|
47
|
+
], He = 10, Ue = [n.UserReadOrg], We = [n.UserWriteOrg, n.UserWriteAll], Ge = [n.UserWriteAll], Ke = [n.UserWriteOrg], qe = [n.UserWriteOrg], Je = [n.RoleReadOrg], Ye = [n.UserWriteOrg], Xe = [n.BankAccountReadOrg], Ze = [n.ExternalBankAccountReadOrg], Qe = [n.BankAccountWriteOrg], $e = [n.DebitCardReadOrg], et = [n.DebitCardIssueOrg];
|
|
48
|
+
function p({ labels: i, featureLabels: a, acceptInviteRedirectUri: p }) {
|
|
49
|
+
let m = c(() => ({
|
|
50
|
+
...ce,
|
|
51
|
+
...a
|
|
52
|
+
}), [a]), tt = r();
|
|
53
|
+
s(() => {
|
|
54
|
+
tt(le.Mounted);
|
|
55
|
+
}, [tt]);
|
|
56
|
+
let { organizationId: nt, widgetToken: rt, initResponse: h } = ie(), { organizationStatus: it } = te(), g = nt ?? (it === e.Rotating ? h?.organizationId : void 0), _ = h?.userId ?? void 0, at = !oe(), ot = se(), st = !!ae(), v = !!(nt && rt), ct = !!(g && rt), y = c(() => t(h?.scopes, Ue), [h?.scopes]), b = ct && y && !!h, x = h?.scopes, S = t(x, Je), C = t(x, Ye), w = v && t(x, We) && S && C, T = v && y && t(x, We), lt = v && t(x, Ge), ut = v && t(x, Ke), dt = v && S && C, ft = v && t(x, qe), pt = v && y && t(x, [n.UserWriteOrg]), E = v && t(x, Xe), D = v && t(x, Ze), O = v && t(x, Qe) && E && D, mt = v && t(x, $e) && t(x, et), [k, ht] = l("members"), A = pe({
|
|
57
|
+
canRead: y && k === "departments",
|
|
58
|
+
canWrite: pt,
|
|
59
|
+
featureLabels: m
|
|
60
|
+
}), j = Ce({
|
|
61
|
+
canRead: y && k === "locations",
|
|
62
|
+
canWrite: pt,
|
|
63
|
+
featureLabels: m
|
|
64
|
+
}), gt = [
|
|
65
65
|
{
|
|
66
66
|
id: "members",
|
|
67
|
-
label:
|
|
67
|
+
label: m.teamMembersTab
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
id: "departments",
|
|
71
|
-
label:
|
|
71
|
+
label: m.departmentsTab
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
74
|
id: "locations",
|
|
75
|
-
label:
|
|
75
|
+
label: m.locationsTab
|
|
76
76
|
}
|
|
77
|
-
], [
|
|
78
|
-
Limit:
|
|
77
|
+
], [_t, M] = l(), [N, vt] = l(He), [yt, P] = l(0), [F, I] = l(), L = (w || dt) && S, bt = b && S && (!!F || !L), [xt, St] = l(), R = de({
|
|
78
|
+
Limit: N,
|
|
79
79
|
Status: "ALL",
|
|
80
|
-
PaginationToken:
|
|
81
|
-
enabled:
|
|
82
|
-
}),
|
|
83
|
-
organizationId:
|
|
84
|
-
organizationTypes:
|
|
85
|
-
}), [
|
|
86
|
-
let e =
|
|
87
|
-
return
|
|
80
|
+
PaginationToken: _t,
|
|
81
|
+
enabled: b
|
|
82
|
+
}), Ct = h?.organizationTypes ?? [], z = c(() => ({
|
|
83
|
+
organizationId: g ?? "",
|
|
84
|
+
organizationTypes: Ct
|
|
85
|
+
}), [g, Ct]), B = ne({ enabled: bt }), wt = c(() => ve(B.data?.data ?? [], z), [B.data?.data, z]), V = b ? R.data?.data ?? [] : [], H = ue({ enabled: L }), U = c(() => ge(H.data?.data ?? [], z), [H.data, z]), Tt = c(() => {
|
|
86
|
+
let e = L ? H.data?.data ?? [] : B.data?.data ?? [];
|
|
87
|
+
return ye(e, z);
|
|
88
88
|
}, [
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
]),
|
|
94
|
-
canInvite:
|
|
95
|
-
canReadDirectory:
|
|
96
|
-
canManageAccountAccess:
|
|
97
|
-
canReadInternalAccounts:
|
|
98
|
-
canReadExternalAccounts:
|
|
99
|
-
canGrantDebitCardAccess:
|
|
100
|
-
roles:
|
|
101
|
-
roleCatalog:
|
|
102
|
-
organizationId:
|
|
103
|
-
featureLabels:
|
|
104
|
-
acceptInviteRedirectUri:
|
|
105
|
-
}),
|
|
106
|
-
canEditAnyProfile:
|
|
107
|
-
canEditOrgProfile:
|
|
108
|
-
organizationId:
|
|
109
|
-
currentUserId:
|
|
110
|
-
canEditRole:
|
|
111
|
-
canReadDirectory:
|
|
112
|
-
canManageAccountAccess:
|
|
113
|
-
canReadInternalAccounts:
|
|
114
|
-
canReadExternalAccounts:
|
|
115
|
-
members:
|
|
116
|
-
roles:
|
|
117
|
-
allRoles:
|
|
118
|
-
roleCatalog:
|
|
119
|
-
featureLabels:
|
|
120
|
-
}),
|
|
121
|
-
canDeactivate:
|
|
122
|
-
canResendInvite:
|
|
123
|
-
members:
|
|
124
|
-
featureLabels:
|
|
125
|
-
acceptInviteRedirectUri:
|
|
126
|
-
}),
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
]),
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}, [
|
|
137
|
-
let
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}, [
|
|
141
|
-
let
|
|
142
|
-
member:
|
|
143
|
-
organizationId:
|
|
144
|
-
canEditAnyProfile:
|
|
145
|
-
canEditOrgProfile:
|
|
146
|
-
currentUserId:
|
|
147
|
-
})),
|
|
148
|
-
member:
|
|
149
|
-
organizationId:
|
|
150
|
-
canEditRole:
|
|
151
|
-
currentUserId:
|
|
152
|
-
})),
|
|
153
|
-
selectedMember:
|
|
154
|
-
canReadInternalAccounts:
|
|
155
|
-
canReadExternalAccounts:
|
|
156
|
-
featureLabels:
|
|
157
|
-
allRoles:
|
|
158
|
-
}), $ =
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
89
|
+
L,
|
|
90
|
+
H.data,
|
|
91
|
+
B.data,
|
|
92
|
+
z
|
|
93
|
+
]), Et = wt.length > 0 && !B.isResolving && !B.isError, Dt = c(() => ve(H.data?.data ?? [], z), [H.data, z]), W = Et ? wt : Dt, Ot = xe(V, m, I, W, g), kt = !!H.data, At = U.length > 0, jt = w && kt && At, Mt = dt && kt && At, G = Se({
|
|
94
|
+
canInvite: jt,
|
|
95
|
+
canReadDirectory: y,
|
|
96
|
+
canManageAccountAccess: O,
|
|
97
|
+
canReadInternalAccounts: E,
|
|
98
|
+
canReadExternalAccounts: D,
|
|
99
|
+
canGrantDebitCardAccess: mt,
|
|
100
|
+
roles: U,
|
|
101
|
+
roleCatalog: W,
|
|
102
|
+
organizationId: g,
|
|
103
|
+
featureLabels: m,
|
|
104
|
+
acceptInviteRedirectUri: p
|
|
105
|
+
}), K = De({
|
|
106
|
+
canEditAnyProfile: lt,
|
|
107
|
+
canEditOrgProfile: ut,
|
|
108
|
+
organizationId: g,
|
|
109
|
+
currentUserId: _,
|
|
110
|
+
canEditRole: Mt,
|
|
111
|
+
canReadDirectory: y,
|
|
112
|
+
canManageAccountAccess: O,
|
|
113
|
+
canReadInternalAccounts: E,
|
|
114
|
+
canReadExternalAccounts: D,
|
|
115
|
+
members: V,
|
|
116
|
+
roles: U,
|
|
117
|
+
allRoles: Tt,
|
|
118
|
+
roleCatalog: W,
|
|
119
|
+
featureLabels: m
|
|
120
|
+
}), q = Oe({
|
|
121
|
+
canDeactivate: ft,
|
|
122
|
+
canResendInvite: T,
|
|
123
|
+
members: V,
|
|
124
|
+
featureLabels: m,
|
|
125
|
+
acceptInviteRedirectUri: p
|
|
126
|
+
}), Nt = R.data?.nextPaginationToken, Pt = R.data?.prevPaginationToken, J = F ? V.find((e) => e.id === F) : void 0, Y = fe({ enabled: !!J && y }), Ft = Y.data?.data ?? V, X = J ? he(Ft, J.reportingManagerUserId) : void 0, It = c(() => J && Y.isComplete ? _e(Y.data?.data ?? [], J.id, m, W, g) : [], [
|
|
127
|
+
J,
|
|
128
|
+
Y.isComplete,
|
|
129
|
+
Y.data?.data,
|
|
130
|
+
m,
|
|
131
|
+
W,
|
|
132
|
+
g
|
|
133
|
+
]), Lt = !!R.data, Rt = Lt && !!F && !J;
|
|
134
|
+
s(() => {
|
|
135
|
+
Rt && I(void 0);
|
|
136
|
+
}, [Rt]);
|
|
137
|
+
let zt = R.isError;
|
|
138
|
+
s(() => {
|
|
139
|
+
zt && (M(void 0), P(0));
|
|
140
|
+
}, [zt]);
|
|
141
|
+
let Bt = Ot.length, Vt = Bt === 0 ? 0 : yt * N + 1, Ht = yt * N + Bt, Ut = `${m.viewingRangeLabel} ${Vt}-${Ht}`, Z = me(J), Wt = !!(J && Te({
|
|
142
|
+
member: J,
|
|
143
|
+
organizationId: g,
|
|
144
|
+
canEditAnyProfile: lt,
|
|
145
|
+
canEditOrgProfile: ut,
|
|
146
|
+
currentUserId: _
|
|
147
|
+
})), Gt = !!(J && Ee({
|
|
148
|
+
member: J,
|
|
149
|
+
organizationId: g,
|
|
150
|
+
canEditRole: Mt,
|
|
151
|
+
currentUserId: _
|
|
152
|
+
})), Kt = O && !!J && J?.id !== _, qt = Wt || Gt || Kt, Q = we({
|
|
153
|
+
selectedMember: J && Z ? J : void 0,
|
|
154
|
+
canReadInternalAccounts: E,
|
|
155
|
+
canReadExternalAccounts: D,
|
|
156
|
+
featureLabels: m,
|
|
157
|
+
allRoles: Tt
|
|
158
|
+
}), $ = c(() => J ? be(J, m, W, g) : void 0, [
|
|
159
|
+
J,
|
|
160
|
+
m,
|
|
161
|
+
W,
|
|
162
|
+
g
|
|
163
163
|
]);
|
|
164
|
-
return /* @__PURE__ */
|
|
165
|
-
/* @__PURE__ */
|
|
166
|
-
|
|
167
|
-
open:
|
|
168
|
-
memberName:
|
|
169
|
-
memberEmail:
|
|
164
|
+
return /* @__PURE__ */ f(u, { children: [
|
|
165
|
+
/* @__PURE__ */ d(re, {}),
|
|
166
|
+
K.isEditOpen ? /* @__PURE__ */ d(Ae, {
|
|
167
|
+
open: K.isEditOpen,
|
|
168
|
+
memberName: K.editMemberName,
|
|
169
|
+
memberEmail: K.editMemberEmail,
|
|
170
170
|
memberInitials: $?.initials,
|
|
171
|
-
avatarSeed:
|
|
171
|
+
avatarSeed: J?.email,
|
|
172
172
|
roleBadgeLabel: $?.roleCardTitle,
|
|
173
173
|
statusLabel: $?.statusLabel,
|
|
174
174
|
statusTone: $?.statusTone,
|
|
175
175
|
lastSignInLabel: $?.lastSignInLabel,
|
|
176
|
-
form:
|
|
176
|
+
form: K.editForm,
|
|
177
|
+
roleOptions: K.roleOptions,
|
|
178
|
+
departmentOptions: K.departmentOptions,
|
|
179
|
+
locationOptions: K.locationOptions,
|
|
180
|
+
reportingManagerOptions: K.reportingManagerOptions,
|
|
181
|
+
departmentsLoading: K.departmentsLoading,
|
|
182
|
+
locationsLoading: K.locationsLoading,
|
|
183
|
+
reportingManagersLoading: K.reportingManagersLoading,
|
|
184
|
+
departmentsError: K.departmentsError,
|
|
185
|
+
locationsError: K.locationsError,
|
|
186
|
+
reportingManagersError: K.reportingManagersError,
|
|
187
|
+
errors: K.editErrors,
|
|
188
|
+
submitErrorMessage: K.editErrorMessage,
|
|
189
|
+
isSubmitting: K.isSavingEdit,
|
|
190
|
+
isNameDisabled: K.isEditNameDisabled,
|
|
191
|
+
isRoleDisabled: K.isEditRoleDisabled,
|
|
192
|
+
isGroupDisabled: K.isEditGroupDisabled,
|
|
193
|
+
isReportingManagerDisabled: K.isEditReportingManagerDisabled,
|
|
194
|
+
isSaveDisabled: K.isEditSaveDisabled,
|
|
195
|
+
accountAccessMode: K.accountAccessMode,
|
|
196
|
+
accountAccessRows: K.accountAccessRows,
|
|
197
|
+
onAccountAccessToggle: K.onAccountAccessToggle,
|
|
198
|
+
isAccountAccessLoading: K.isAccountAccessLoading,
|
|
199
|
+
accountAccessErrorMessage: K.accountAccessErrorMessage,
|
|
200
|
+
onOpenChange: K.onEditOpenChange,
|
|
201
|
+
onFormChange: K.onEditFormChange,
|
|
202
|
+
onSubmit: K.onEditSubmit,
|
|
203
|
+
labels: i
|
|
204
|
+
}) : J ? /* @__PURE__ */ d(Pe, {
|
|
205
|
+
...be(J, m, W, g),
|
|
206
|
+
avatarSeed: J.email,
|
|
207
|
+
reportingManagerName: X?.name,
|
|
208
|
+
reportingManagerInitials: X?.initials,
|
|
209
|
+
reportingManagerSeed: X?.email,
|
|
210
|
+
directReports: It,
|
|
211
|
+
accountAccessLabel: Q.detailAccountAccessLabel,
|
|
212
|
+
accountAccessRows: Q.detailAccounts,
|
|
213
|
+
isAccountAccessLoading: Q.detailAccountsLoading,
|
|
214
|
+
isRoleLoading: S && B.isResolving,
|
|
215
|
+
onBackClick: () => {
|
|
216
|
+
St(F), I(void 0);
|
|
217
|
+
},
|
|
218
|
+
onEditClick: qt && Z ? () => K.openMemberEdit(J.id) : void 0,
|
|
219
|
+
onResendClick: T && (J.status ?? "").trim().toUpperCase() === "INVITED" ? () => q.openResendConfirmation(J.id) : void 0,
|
|
220
|
+
onDeactivateClick: ft && Z && at && J.id !== _ ? () => q.openDeactivateConfirmation(J.id) : void 0,
|
|
221
|
+
labels: i
|
|
222
|
+
}) : G.isInviteOpen ? /* @__PURE__ */ d(ke, {
|
|
223
|
+
form: G.inviteForm,
|
|
177
224
|
roleOptions: G.roleOptions,
|
|
178
225
|
departmentOptions: G.departmentOptions,
|
|
179
226
|
locationOptions: G.locationOptions,
|
|
180
227
|
reportingManagerOptions: G.reportingManagerOptions,
|
|
228
|
+
accountAccessOptions: G.accountAccessOptions,
|
|
181
229
|
departmentsLoading: G.departmentsLoading,
|
|
182
230
|
locationsLoading: G.locationsLoading,
|
|
183
231
|
reportingManagersLoading: G.reportingManagersLoading,
|
|
184
232
|
departmentsError: G.departmentsError,
|
|
185
233
|
locationsError: G.locationsError,
|
|
186
234
|
reportingManagersError: G.reportingManagersError,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
isSubmitting: G.isSavingEdit,
|
|
190
|
-
isNameDisabled: G.isEditNameDisabled,
|
|
191
|
-
isRoleDisabled: G.isEditRoleDisabled,
|
|
192
|
-
isGroupDisabled: G.isEditGroupDisabled,
|
|
193
|
-
isReportingManagerDisabled: G.isEditReportingManagerDisabled,
|
|
194
|
-
isSaveDisabled: G.isEditSaveDisabled,
|
|
235
|
+
accountAccessLoading: G.accountAccessLoading,
|
|
236
|
+
accountAccessError: G.accountAccessError,
|
|
195
237
|
accountAccessMode: G.accountAccessMode,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
}) : q ? /* @__PURE__ */ f(Me, {
|
|
205
|
-
...ve(q, g, U, v),
|
|
206
|
-
avatarSeed: q.email,
|
|
207
|
-
reportingManagerName: Y?.name,
|
|
208
|
-
reportingManagerInitials: Y?.initials,
|
|
209
|
-
reportingManagerSeed: Y?.email,
|
|
210
|
-
directReports: Ft,
|
|
211
|
-
accountAccessLabel: Q.detailAccountAccessLabel,
|
|
212
|
-
accountAccessRows: Q.detailAccounts,
|
|
213
|
-
isAccountAccessLoading: Q.detailAccountsLoading,
|
|
214
|
-
isRoleLoading: w && z.isResolving,
|
|
215
|
-
onBackClick: () => {
|
|
216
|
-
xt(P), F(void 0);
|
|
217
|
-
},
|
|
218
|
-
onEditClick: Gt && Z ? () => G.openMemberEdit(q.id) : void 0,
|
|
219
|
-
onResendClick: st && (q.status ?? "").trim().toUpperCase() === "INVITED" ? () => K.openResendConfirmation(q.id) : void 0,
|
|
220
|
-
onDeactivateClick: dt && Z ? () => K.openDeactivateConfirmation(q.id) : void 0,
|
|
238
|
+
errors: G.inviteErrors,
|
|
239
|
+
submitErrorMessage: G.inviteErrorMessage,
|
|
240
|
+
isSubmitting: G.isInviting,
|
|
241
|
+
isSubmitBlocked: G.isInviteSubmitBlocked,
|
|
242
|
+
onFormChange: G.onInviteFormChange,
|
|
243
|
+
onBackClick: G.closeInviteForm,
|
|
244
|
+
onCancel: G.closeInviteForm,
|
|
245
|
+
onSubmit: G.onInviteSubmit,
|
|
221
246
|
labels: i
|
|
222
|
-
}) :
|
|
223
|
-
form: W.inviteForm,
|
|
224
|
-
roleOptions: W.roleOptions,
|
|
225
|
-
departmentOptions: W.departmentOptions,
|
|
226
|
-
locationOptions: W.locationOptions,
|
|
227
|
-
reportingManagerOptions: W.reportingManagerOptions,
|
|
228
|
-
accountAccessOptions: W.accountAccessOptions,
|
|
229
|
-
departmentsLoading: W.departmentsLoading,
|
|
230
|
-
locationsLoading: W.locationsLoading,
|
|
231
|
-
reportingManagersLoading: W.reportingManagersLoading,
|
|
232
|
-
departmentsError: W.departmentsError,
|
|
233
|
-
locationsError: W.locationsError,
|
|
234
|
-
reportingManagersError: W.reportingManagersError,
|
|
235
|
-
accountAccessLoading: W.accountAccessLoading,
|
|
236
|
-
accountAccessError: W.accountAccessError,
|
|
237
|
-
accountAccessMode: W.accountAccessMode,
|
|
238
|
-
errors: W.inviteErrors,
|
|
239
|
-
submitErrorMessage: W.inviteErrorMessage,
|
|
240
|
-
isSubmitting: W.isInviting,
|
|
241
|
-
isSubmitBlocked: W.isInviteSubmitBlocked,
|
|
242
|
-
onFormChange: W.onInviteFormChange,
|
|
243
|
-
onBackClick: W.closeInviteForm,
|
|
244
|
-
onCancel: W.closeInviteForm,
|
|
245
|
-
onSubmit: W.onInviteSubmit,
|
|
246
|
-
labels: i
|
|
247
|
-
}) : /* @__PURE__ */ f("div", {
|
|
247
|
+
}) : /* @__PURE__ */ d("div", {
|
|
248
248
|
className: "ttw:space-y-4 ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:p-6",
|
|
249
|
-
children: /* @__PURE__ */
|
|
250
|
-
tabs:
|
|
251
|
-
activeTabId:
|
|
252
|
-
onTabChange:
|
|
253
|
-
children:
|
|
254
|
-
/* @__PURE__ */
|
|
255
|
-
icon: /* @__PURE__ */
|
|
256
|
-
...k.panel
|
|
257
|
-
}),
|
|
258
|
-
/* @__PURE__ */ f(ke, { ...k.drawer }),
|
|
259
|
-
/* @__PURE__ */ f(s, {
|
|
260
|
-
open: k.deleteDialog.open,
|
|
261
|
-
icon: /* @__PURE__ */ f(Re, {
|
|
262
|
-
"aria-hidden": !0,
|
|
263
|
-
className: "ttw:size-6"
|
|
264
|
-
}),
|
|
265
|
-
title: g.departmentDeleteDialogTitle,
|
|
266
|
-
description: g.departmentDeleteDialogDescription,
|
|
267
|
-
subjectName: k.deleteDialog.subjectName,
|
|
268
|
-
confirmButtonLabel: g.departmentDeleteConfirmButton,
|
|
269
|
-
errorMessage: k.deleteDialog.errorMessage,
|
|
270
|
-
isConfirming: k.deleteDialog.isConfirming,
|
|
271
|
-
onOpenChange: k.deleteDialog.onOpenChange,
|
|
272
|
-
onConfirm: k.deleteDialog.onConfirm,
|
|
273
|
-
labels: i
|
|
274
|
-
})
|
|
275
|
-
] }) : O === "locations" ? /* @__PURE__ */ p(d, { children: [
|
|
276
|
-
/* @__PURE__ */ f(Ae, {
|
|
277
|
-
icon: /* @__PURE__ */ f(Le, { className: "ttw:size-4" }),
|
|
249
|
+
children: /* @__PURE__ */ d(Fe, {
|
|
250
|
+
tabs: gt,
|
|
251
|
+
activeTabId: k,
|
|
252
|
+
onTabChange: ht,
|
|
253
|
+
children: k === "departments" ? /* @__PURE__ */ f(u, { children: [
|
|
254
|
+
/* @__PURE__ */ d(Me, {
|
|
255
|
+
icon: /* @__PURE__ */ d(Le, { className: "ttw:size-4" }),
|
|
278
256
|
...A.panel
|
|
279
257
|
}),
|
|
280
|
-
/* @__PURE__ */
|
|
281
|
-
/* @__PURE__ */
|
|
258
|
+
/* @__PURE__ */ d(je, { ...A.drawer }),
|
|
259
|
+
/* @__PURE__ */ d(o, {
|
|
282
260
|
open: A.deleteDialog.open,
|
|
283
|
-
icon: /* @__PURE__ */
|
|
261
|
+
icon: /* @__PURE__ */ d(Be, {
|
|
284
262
|
"aria-hidden": !0,
|
|
285
263
|
className: "ttw:size-6"
|
|
286
264
|
}),
|
|
287
|
-
title:
|
|
288
|
-
description:
|
|
265
|
+
title: m.departmentDeleteDialogTitle,
|
|
266
|
+
description: m.departmentDeleteDialogDescription,
|
|
289
267
|
subjectName: A.deleteDialog.subjectName,
|
|
290
|
-
confirmButtonLabel:
|
|
268
|
+
confirmButtonLabel: m.departmentDeleteConfirmButton,
|
|
291
269
|
errorMessage: A.deleteDialog.errorMessage,
|
|
292
270
|
isConfirming: A.deleteDialog.isConfirming,
|
|
293
271
|
onOpenChange: A.deleteDialog.onOpenChange,
|
|
294
272
|
onConfirm: A.deleteDialog.onConfirm,
|
|
295
273
|
labels: i
|
|
296
274
|
})
|
|
297
|
-
] }) : /* @__PURE__ */ f(
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
275
|
+
] }) : k === "locations" ? /* @__PURE__ */ f(u, { children: [
|
|
276
|
+
/* @__PURE__ */ d(Me, {
|
|
277
|
+
icon: /* @__PURE__ */ d(ze, { className: "ttw:size-4" }),
|
|
278
|
+
...j.panel
|
|
279
|
+
}),
|
|
280
|
+
/* @__PURE__ */ d(je, { ...j.drawer }),
|
|
281
|
+
/* @__PURE__ */ d(o, {
|
|
282
|
+
open: j.deleteDialog.open,
|
|
283
|
+
icon: /* @__PURE__ */ d(Be, {
|
|
284
|
+
"aria-hidden": !0,
|
|
285
|
+
className: "ttw:size-6"
|
|
286
|
+
}),
|
|
287
|
+
title: m.locationDeleteDialogTitle,
|
|
288
|
+
description: m.locationDeleteDialogDescription,
|
|
289
|
+
subjectName: j.deleteDialog.subjectName,
|
|
290
|
+
confirmButtonLabel: m.locationDeleteConfirmButton,
|
|
291
|
+
errorMessage: j.deleteDialog.errorMessage,
|
|
292
|
+
isConfirming: j.deleteDialog.isConfirming,
|
|
293
|
+
onOpenChange: j.deleteDialog.onOpenChange,
|
|
294
|
+
onConfirm: j.deleteDialog.onConfirm,
|
|
295
|
+
labels: i
|
|
296
|
+
})
|
|
297
|
+
] }) : /* @__PURE__ */ d(Ne, {
|
|
298
|
+
rows: Ot,
|
|
299
|
+
isLoading: !st && (ee(it) && !R.data || ot && !h || b && R.isLoading),
|
|
300
|
+
isError: st || b && R.isError,
|
|
301
|
+
showPagination: b && Lt && !R.isError,
|
|
302
|
+
isPreviousPageDisabled: !Pt,
|
|
303
|
+
isNextPageDisabled: !Nt,
|
|
304
|
+
pageSize: N,
|
|
305
|
+
pageSizeOptions: Ve,
|
|
306
|
+
rangeLabel: Ut,
|
|
307
307
|
onPageSizeChange: (e) => {
|
|
308
|
-
|
|
308
|
+
vt(e), M(void 0), P(0);
|
|
309
309
|
},
|
|
310
|
-
autoFocusRowKey:
|
|
310
|
+
autoFocusRowKey: xt,
|
|
311
311
|
onPreviousPageClick: () => {
|
|
312
|
-
|
|
312
|
+
M(Pt ?? void 0), P((e) => Math.max(0, e - 1));
|
|
313
313
|
},
|
|
314
314
|
onNextPageClick: () => {
|
|
315
|
-
|
|
315
|
+
M(Nt ?? void 0), P((e) => e + 1);
|
|
316
316
|
},
|
|
317
|
-
onInviteClick:
|
|
317
|
+
onInviteClick: jt ? G.openInviteForm : void 0,
|
|
318
318
|
labels: i
|
|
319
319
|
})
|
|
320
320
|
})
|
|
321
321
|
}),
|
|
322
|
-
/* @__PURE__ */
|
|
323
|
-
open:
|
|
324
|
-
icon: /* @__PURE__ */
|
|
322
|
+
/* @__PURE__ */ d(o, {
|
|
323
|
+
open: q.isDeactivateOpen,
|
|
324
|
+
icon: /* @__PURE__ */ d(Ie, {
|
|
325
325
|
"aria-hidden": !0,
|
|
326
326
|
className: "ttw:size-6"
|
|
327
327
|
}),
|
|
328
|
-
title:
|
|
329
|
-
description:
|
|
330
|
-
subjectName:
|
|
331
|
-
subjectDetail:
|
|
332
|
-
confirmButtonLabel:
|
|
333
|
-
errorMessage:
|
|
334
|
-
isConfirming:
|
|
335
|
-
onOpenChange:
|
|
336
|
-
onConfirm:
|
|
328
|
+
title: m.deactivateDialogTitle,
|
|
329
|
+
description: m.deactivateDialogDescription,
|
|
330
|
+
subjectName: q.deactivateMemberName,
|
|
331
|
+
subjectDetail: q.deactivateMemberEmail,
|
|
332
|
+
confirmButtonLabel: m.deactivateConfirmButton,
|
|
333
|
+
errorMessage: q.deactivateErrorMessage,
|
|
334
|
+
isConfirming: q.isDeactivating,
|
|
335
|
+
onOpenChange: q.onDeactivateOpenChange,
|
|
336
|
+
onConfirm: q.onDeactivateConfirm,
|
|
337
337
|
labels: i
|
|
338
338
|
}),
|
|
339
|
-
/* @__PURE__ */
|
|
340
|
-
open:
|
|
341
|
-
icon: /* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ d(o, {
|
|
340
|
+
open: q.isResendOpen,
|
|
341
|
+
icon: /* @__PURE__ */ d(Re, {
|
|
342
342
|
"aria-hidden": !0,
|
|
343
343
|
className: "ttw:size-6"
|
|
344
344
|
}),
|
|
345
|
-
title:
|
|
346
|
-
description:
|
|
347
|
-
subjectName:
|
|
348
|
-
subjectDetail:
|
|
349
|
-
confirmButtonLabel:
|
|
345
|
+
title: m.resendDialogTitle,
|
|
346
|
+
description: m.resendDialogDescription,
|
|
347
|
+
subjectName: q.resendMemberName,
|
|
348
|
+
subjectDetail: q.resendMemberEmail,
|
|
349
|
+
confirmButtonLabel: m.resendConfirmButton,
|
|
350
350
|
confirmVariant: "default",
|
|
351
|
-
errorMessage:
|
|
352
|
-
isConfirming:
|
|
353
|
-
onOpenChange:
|
|
354
|
-
onConfirm:
|
|
351
|
+
errorMessage: q.resendErrorMessage,
|
|
352
|
+
isConfirming: q.isResending,
|
|
353
|
+
onOpenChange: q.onResendOpenChange,
|
|
354
|
+
onConfirm: q.onResendConfirm,
|
|
355
355
|
labels: i
|
|
356
356
|
})
|
|
357
357
|
] });
|
|
358
358
|
}
|
|
359
|
-
function
|
|
360
|
-
return /* @__PURE__ */
|
|
361
|
-
widgetName:
|
|
359
|
+
function m({ baseUrl: e, widgetToken: ee, organizationId: te, configClient: t, gatewayRouting: n, linkComponent: ne, uiFramework: re, errorFallback: r, onError: ie, analytics: ae, disclosuresAcceptance: oe, providerLabels: se, ...ce }) {
|
|
360
|
+
return /* @__PURE__ */ d(i, {
|
|
361
|
+
widgetName: a,
|
|
362
362
|
baseUrl: e,
|
|
363
363
|
widgetToken: ee,
|
|
364
364
|
organizationId: te,
|
|
365
365
|
configClient: t,
|
|
366
366
|
gatewayRouting: n,
|
|
367
|
-
linkComponent:
|
|
368
|
-
uiFramework:
|
|
369
|
-
errorFallback:
|
|
367
|
+
linkComponent: ne,
|
|
368
|
+
uiFramework: re,
|
|
369
|
+
errorFallback: r,
|
|
370
370
|
onError: ie,
|
|
371
371
|
analytics: ae,
|
|
372
372
|
disclosuresAcceptance: oe,
|
|
373
373
|
providerLabels: se,
|
|
374
|
-
children: /* @__PURE__ */
|
|
374
|
+
children: /* @__PURE__ */ d(p, { ...ce })
|
|
375
375
|
});
|
|
376
376
|
}
|
|
377
377
|
//#endregion
|
|
378
|
-
export {
|
|
378
|
+
export { m as TeamWidget, m as default };
|