@tesouro/embedded-components-react 0.3.1 → 0.3.5

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