@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.
@@ -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 o } from "../../data-access/dist/index13.js";
19
- import { useAllTeamMembersQuery as se } from "../../data-access/dist/index14.js";
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 ce } from "./index6.js";
22
- import { isMemberActionable as le, resolveReportingManager as ue, toAssignableRoles as de, toDirectReportRows as fe, toRoleDisplayCatalog as pe, toTeamMemberDetails as me, toTeamMemberRows as he } from "./index11.js";
23
- import { useInviteForm as ge } from "./index12.js";
24
- import { useLocationsAdmin as _e } from "./index13.js";
25
- import { useMemberAccountAccess as ve } from "./index14.js";
26
- import { canEditMemberProfile as ye, canEditMemberRole as be, useMemberEdit as xe } from "./index15.js";
27
- import { useTeamActions as Se } from "./index16.js";
28
- import { InviteTeamMemberForm as Ce } from "../../ui/dist/index8.js";
29
- import { EditTeamMemberPanel as we } from "../../ui/dist/index10.js";
30
- import { GroupAdminDrawer as Te } from "../../ui/dist/index12.js";
31
- import { GroupAdminPanel as Ee } from "../../ui/dist/index14.js";
32
- import { TeamActionDialog as s } from "../../ui/dist/index15.js";
33
- import { TeamMembersTable as De } from "../../ui/dist/index16.js";
34
- import { TeamMemberDetails as Oe } from "../../ui/dist/index17.js";
35
- import { TeamTabs as ke } from "../../ui/dist/index18.js";
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 c, useMemo as l, useState as u } from "react";
38
- import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
39
- import { Ban as Ae, Building2 as je, MailIcon as Me, MapPin as Ne, Trash2 as Pe } from "lucide-react";
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 Fe = [
41
+ var Le = [
42
42
  5,
43
43
  10,
44
44
  25
45
- ], Ie = 10, Le = [t.UserReadOrg], m = [t.UserWriteOrg, t.UserWriteAll], Re = [t.UserWriteAll], ze = [t.UserWriteOrg], Be = [t.UserWriteOrg], Ve = [t.RoleReadOrg], He = [t.UserWriteOrg], Ue = [t.BankAccountReadOrg], We = [t.ExternalBankAccountReadOrg], Ge = [t.BankAccountWriteOrg];
46
- function h({ labels: r, featureLabels: i, acceptInviteRedirectUri: h }) {
47
- let g = l(() => ({
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]), _ = te();
51
- c(() => {
52
- _(oe.Mounted);
53
- }, [_]);
54
- let { organizationId: v, widgetToken: Ke, initResponse: y } = ne(), b = y?.userId ?? void 0, qe = ie(), Je = !!re(), x = !!(v && Ke), S = l(() => e(y?.scopes, Le), [y?.scopes]), C = x && S && !!y, w = y?.scopes, T = e(w, Ve), Ye = e(w, He), E = x && e(w, m) && T && Ye, Xe = x && S && e(w, m), Ze = x && e(w, Re), Qe = x && e(w, ze), $e = x && T && Ye, et = x && e(w, Be), tt = x && S && e(w, [t.UserWriteOrg]), D = x && e(w, Ue), O = x && e(w, We), k = x && e(w, Ge) && D && O, [A, nt] = u("members"), j = ce({
55
- canRead: S && A === "departments",
56
- canWrite: tt,
57
- featureLabels: g
58
- }), M = _e({
59
- canRead: S && A === "locations",
60
- canWrite: tt,
61
- featureLabels: g
62
- }), rt = [
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: g.teamMembersTab
65
+ label: h.teamMembersTab
66
66
  },
67
67
  {
68
68
  id: "departments",
69
- label: g.departmentsTab
69
+ label: h.departmentsTab
70
70
  },
71
71
  {
72
72
  id: "locations",
73
- label: g.locationsTab
73
+ label: h.locationsTab
74
74
  }
75
- ], [it, N] = u(), [P, at] = u(Ie), [ot, F] = u(0), [I, L] = u(), st = (E || $e) && T, ct = C && T && (!!I || !st), [lt, ut] = u(), R = o({
76
- Limit: P,
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: it,
79
- enabled: C
80
- }), dt = y?.organizationTypes ?? [], z = l(() => ({
81
- organizationId: v ?? "",
82
- organizationTypes: dt
83
- }), [v, dt]), B = ee({ enabled: ct }), ft = l(() => pe(B.data?.data ?? [], z), [B.data?.data, z]), V = C ? R.data?.data ?? [] : [], H = a({ enabled: st }), U = l(() => de(H.data?.data ?? [], z), [H.data, z]), pt = ft.length > 0 && !B.isResolving && !B.isError, mt = l(() => pe(H.data?.data ?? [], z), [H.data, z]), W = pt ? ft : mt, ht = he(V, g, L, W, v), gt = !!H.data, _t = U.length > 0, vt = E && gt && _t, yt = $e && gt && _t, G = ge({
84
- canInvite: vt,
85
- canReadDirectory: S,
86
- canManageAccountAccess: k,
87
- canReadInternalAccounts: D,
88
- canReadExternalAccounts: O,
89
- roles: U,
90
- roleCatalog: W,
91
- organizationId: v,
92
- featureLabels: g,
93
- acceptInviteRedirectUri: h
94
- }), K = xe({
95
- canEditAnyProfile: Ze,
96
- canEditOrgProfile: Qe,
97
- organizationId: v,
98
- currentUserId: b,
99
- canEditRole: yt,
100
- canReadDirectory: S,
101
- canManageAccountAccess: k,
102
- canReadInternalAccounts: D,
103
- canReadExternalAccounts: O,
104
- members: V,
105
- roles: U,
106
- roleCatalog: W,
107
- featureLabels: g
108
- }), q = Se({
109
- canDeactivate: et,
110
- canResendInvite: Xe,
111
- members: V,
112
- featureLabels: g,
113
- acceptInviteRedirectUri: h
114
- }), bt = R.data?.nextPaginationToken, xt = R.data?.prevPaginationToken, J = I ? V.find((e) => e.id === I) : void 0, Y = se({ enabled: !!J && S }), St = Y.data?.data ?? V, X = J ? ue(St, J.reportingManagerUserId) : void 0, Ct = l(() => J && Y.isComplete ? fe(Y.data?.data ?? [], J.id, g, W, v) : [], [
115
- J,
116
- Y.isComplete,
117
- Y.data?.data,
118
- g,
119
- W,
120
- v
121
- ]), wt = !!R.data, Tt = wt && !!I && !J;
122
- c(() => {
123
- Tt && L(void 0);
124
- }, [Tt]);
125
- let Et = R.isError;
126
- c(() => {
127
- Et && (N(void 0), F(0));
128
- }, [Et]);
129
- let Dt = ht.length, Ot = Dt === 0 ? 0 : ot * P + 1, kt = ot * P + Dt, At = `${g.viewingRangeLabel} ${Ot}-${kt}`, Z = le(J), jt = !!(J && ye({
130
- member: J,
131
- organizationId: v,
132
- canEditAnyProfile: Ze,
133
- canEditOrgProfile: Qe,
134
- currentUserId: b
135
- })), Mt = !!(J && be({
136
- member: J,
137
- organizationId: v,
138
- canEditRole: yt,
139
- currentUserId: b
140
- })), Nt = k && !!J && J?.id !== b, Pt = jt || Mt || Nt, Q = ve({
141
- selectedMember: J && Z ? J : void 0,
142
- canReadInternalAccounts: D,
143
- canReadExternalAccounts: O,
144
- featureLabels: g
145
- }), $ = l(() => J ? me(J, g, W, v) : void 0, [
146
- J,
147
- g,
148
- W,
149
- v
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__ */ p(d, { children: [
152
- /* @__PURE__ */ f(n, {}),
153
- K.isEditOpen ? /* @__PURE__ */ f(we, {
154
- open: K.isEditOpen,
155
- memberName: K.editMemberName,
156
- memberEmail: K.editMemberEmail,
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: J?.email,
168
+ avatarSeed: q?.email,
159
169
  roleBadgeLabel: $?.roleCardTitle,
160
170
  statusLabel: $?.statusLabel,
161
171
  statusTone: $?.statusTone,
162
172
  lastSignInLabel: $?.lastSignInLabel,
163
- form: K.editForm,
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
- accountAccessLoading: G.accountAccessLoading,
223
- accountAccessError: G.accountAccessError,
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
- errors: G.inviteErrors,
226
- submitErrorMessage: G.inviteErrorMessage,
227
- isSubmitting: G.isInviting,
228
- onFormChange: G.onInviteFormChange,
229
- onBackClick: G.closeInviteForm,
230
- onCancel: G.closeInviteForm,
231
- onSubmit: G.onInviteSubmit,
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__ */ f("div", {
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__ */ f(ke, {
236
- tabs: rt,
237
- activeTabId: A,
238
- onTabChange: nt,
239
- children: A === "departments" ? /* @__PURE__ */ p(d, { children: [
240
- /* @__PURE__ */ f(Ee, {
241
- icon: /* @__PURE__ */ f(je, { className: "ttw:size-4" }),
242
- ...j.panel
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__ */ f(Te, { ...j.drawer }),
245
- /* @__PURE__ */ f(s, {
246
- open: j.deleteDialog.open,
247
- icon: /* @__PURE__ */ f(Pe, {
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: g.departmentDeleteDialogTitle,
252
- description: g.departmentDeleteDialogDescription,
253
- subjectName: j.deleteDialog.subjectName,
254
- confirmButtonLabel: g.departmentDeleteConfirmButton,
255
- errorMessage: j.deleteDialog.errorMessage,
256
- isConfirming: j.deleteDialog.isConfirming,
257
- onOpenChange: j.deleteDialog.onOpenChange,
258
- onConfirm: j.deleteDialog.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
- ] }) : A === "locations" ? /* @__PURE__ */ p(d, { children: [
262
- /* @__PURE__ */ f(Ee, {
263
- icon: /* @__PURE__ */ f(Ne, { className: "ttw:size-4" }),
264
- ...M.panel
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__ */ f(Te, { ...M.drawer }),
267
- /* @__PURE__ */ f(s, {
268
- open: M.deleteDialog.open,
269
- icon: /* @__PURE__ */ f(Pe, {
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: g.locationDeleteDialogTitle,
274
- description: g.locationDeleteDialogDescription,
275
- subjectName: M.deleteDialog.subjectName,
276
- confirmButtonLabel: g.locationDeleteConfirmButton,
277
- errorMessage: M.deleteDialog.errorMessage,
278
- isConfirming: M.deleteDialog.isConfirming,
279
- onOpenChange: M.deleteDialog.onOpenChange,
280
- onConfirm: M.deleteDialog.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__ */ f(De, {
284
- rows: ht,
285
- isLoading: !Je && (!x || qe && !y || C && R.isLoading),
286
- isError: Je || C && R.isError,
287
- showPagination: C && wt && !R.isError,
288
- isPreviousPageDisabled: !xt,
289
- isNextPageDisabled: !bt,
290
- pageSize: P,
291
- pageSizeOptions: Fe,
292
- rangeLabel: At,
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
- at(e), N(void 0), F(0);
304
+ ct(e), j(void 0), N(0);
295
305
  },
296
- autoFocusRowKey: lt,
306
+ autoFocusRowKey: dt,
297
307
  onPreviousPageClick: () => {
298
- N(xt ?? void 0), F((e) => Math.max(0, e - 1));
308
+ j(wt ?? void 0), N((e) => Math.max(0, e - 1));
299
309
  },
300
310
  onNextPageClick: () => {
301
- N(bt ?? void 0), F((e) => e + 1);
311
+ j(Ct ?? void 0), N((e) => e + 1);
302
312
  },
303
- onInviteClick: vt ? G.openInviteForm : void 0,
313
+ onInviteClick: xt ? W.openInviteForm : void 0,
304
314
  labels: r
305
315
  })
306
316
  })
307
317
  }),
308
- /* @__PURE__ */ f(s, {
309
- open: q.isDeactivateOpen,
310
- icon: /* @__PURE__ */ f(Ae, {
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: g.deactivateDialogTitle,
315
- description: g.deactivateDialogDescription,
316
- subjectName: q.deactivateMemberName,
317
- subjectDetail: q.deactivateMemberEmail,
318
- confirmButtonLabel: g.deactivateConfirmButton,
319
- errorMessage: q.deactivateErrorMessage,
320
- isConfirming: q.isDeactivating,
321
- onOpenChange: q.onDeactivateOpenChange,
322
- onConfirm: q.onDeactivateConfirm,
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__ */ f(s, {
326
- open: q.isResendOpen,
327
- icon: /* @__PURE__ */ f(Me, {
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: g.resendDialogTitle,
332
- description: g.resendDialogDescription,
333
- subjectName: q.resendMemberName,
334
- subjectDetail: q.resendMemberEmail,
335
- confirmButtonLabel: g.resendConfirmButton,
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: q.resendErrorMessage,
338
- isConfirming: q.isResending,
339
- onOpenChange: q.onResendOpenChange,
340
- onConfirm: q.onResendConfirm,
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 g({ baseUrl: e, widgetToken: t, organizationId: ee, configClient: n, gatewayRouting: te, linkComponent: ne, implementation: re, uiFramework: ie, errorFallback: ae, onError: oe, analytics: a, disclosuresAcceptance: o, providerLabels: se, ...ce }) {
346
- return /* @__PURE__ */ f(r, {
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: o,
360
- providerLabels: se,
361
- children: /* @__PURE__ */ f(h, { ...ce })
369
+ disclosuresAcceptance: se,
370
+ providerLabels: ce,
371
+ children: /* @__PURE__ */ d(m, { ...le })
362
372
  });
363
373
  }
364
374
  //#endregion
365
- export { g as TeamWidget, g as default };
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",