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