@tesouro/embedded-components-react 0.3.1 → 0.3.2
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 +7 -10
- package/dist/experimental/WidgetSuite.d.ts +2 -2
- package/dist/experimental/index.d.ts +2 -2
- package/dist/index.d.ts +1 -23
- package/dist/lib/BankAccountsWidget.d.ts +0 -1
- package/dist/lib/ChartOfAccountsWidget.d.ts +1 -5
- package/dist/lib/CounterpartsWidget.d.ts +0 -9
- package/dist/lib/ExpenseManagementWidget.d.ts +0 -1
- package/dist/lib/ProductsWidget.d.ts +0 -1
- package/dist/lib/ReceivablesWidget.d.ts +0 -1
- package/dist/lib/SettingsWidget.d.ts +0 -1
- package/dist/lib/TagsWidget.d.ts +0 -1
- package/dist/lib/TeamWidget.d.ts +0 -3
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index8.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +64 -65
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankAccountsWidgetUi.js +35 -36
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankingHeader.js +35 -42
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/labels.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +1 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +4 -7
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +106 -107
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js +85 -93
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/ExpenseManagementWidgetUi.js +4 -7
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/labels.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/ui/dist/index2.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/ui/dist/index3.js +113 -115
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +150 -155
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index2.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index4.js +86 -91
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index5.js +20 -22
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +2 -6
- package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js +25 -26
- package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/tags-widget/ui/dist/index2.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/tags-widget/ui/dist/index3.js +67 -68
- package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index17.js +239 -241
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +1 -6
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +53 -53
- 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
|
|
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
|
|
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
|
|
17
|
-
import { TeamWidgetAnalyticsEvent as
|
|
18
|
-
import { useRolesQuery as
|
|
19
|
-
import { useTeamMembersQuery as
|
|
20
|
-
import { useAllTeamMembersQuery as
|
|
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
|
|
23
|
-
import { isMemberActionable as
|
|
24
|
-
import { useInviteForm as
|
|
25
|
-
import { useLocationsAdmin as
|
|
26
|
-
import { useMemberAccountAccess as
|
|
27
|
-
import { canEditMemberProfile as
|
|
28
|
-
import { useTeamActions as
|
|
29
|
-
import { InviteTeamMemberForm as
|
|
30
|
-
import { EditTeamMemberPanel as
|
|
31
|
-
import { GroupAdminDrawer as
|
|
32
|
-
import { GroupAdminPanel as
|
|
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
|
|
35
|
-
import { TeamMemberDetails as
|
|
36
|
-
import { TeamTabs as
|
|
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
|
|
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
|
|
41
|
+
var Fe = [
|
|
43
42
|
5,
|
|
44
43
|
10,
|
|
45
44
|
25
|
|
46
|
-
],
|
|
47
|
-
function h({ labels: r, featureLabels:
|
|
48
|
-
let
|
|
49
|
-
...
|
|
50
|
-
...
|
|
51
|
-
}), [
|
|
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
|
-
|
|
54
|
-
}, [
|
|
55
|
-
let { organizationId: v, widgetToken:
|
|
56
|
-
canRead: S &&
|
|
57
|
-
canWrite:
|
|
58
|
-
featureLabels:
|
|
59
|
-
}),
|
|
60
|
-
canRead: S &&
|
|
61
|
-
canWrite:
|
|
62
|
-
featureLabels:
|
|
63
|
-
}),
|
|
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:
|
|
65
|
+
label: g.teamMembersTab
|
|
67
66
|
},
|
|
68
67
|
{
|
|
69
68
|
id: "departments",
|
|
70
|
-
label:
|
|
69
|
+
label: g.departmentsTab
|
|
71
70
|
},
|
|
72
71
|
{
|
|
73
72
|
id: "locations",
|
|
74
|
-
label:
|
|
73
|
+
label: g.locationsTab
|
|
75
74
|
}
|
|
76
|
-
], [
|
|
77
|
-
Limit:
|
|
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:
|
|
78
|
+
PaginationToken: it,
|
|
80
79
|
enabled: C
|
|
81
|
-
}),
|
|
80
|
+
}), dt = y?.organizationTypes ?? [], z = l(() => ({
|
|
82
81
|
organizationId: v ?? "",
|
|
83
|
-
organizationTypes:
|
|
84
|
-
}), [v,
|
|
85
|
-
canInvite:
|
|
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:
|
|
88
|
-
canReadInternalAccounts:
|
|
89
|
-
canReadExternalAccounts:
|
|
90
|
-
roles:
|
|
91
|
-
roleCatalog:
|
|
86
|
+
canManageAccountAccess: k,
|
|
87
|
+
canReadInternalAccounts: D,
|
|
88
|
+
canReadExternalAccounts: O,
|
|
89
|
+
roles: U,
|
|
90
|
+
roleCatalog: W,
|
|
92
91
|
organizationId: v,
|
|
93
|
-
featureLabels:
|
|
94
|
-
acceptInviteRedirectUri:
|
|
95
|
-
}),
|
|
96
|
-
canEditAnyProfile:
|
|
97
|
-
canEditOrgProfile:
|
|
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:
|
|
99
|
+
canEditRole: yt,
|
|
101
100
|
canReadDirectory: S,
|
|
102
|
-
canManageAccountAccess:
|
|
103
|
-
canReadInternalAccounts:
|
|
104
|
-
canReadExternalAccounts:
|
|
105
|
-
members:
|
|
106
|
-
roles:
|
|
107
|
-
roleCatalog:
|
|
108
|
-
featureLabels:
|
|
109
|
-
}),
|
|
110
|
-
canDeactivate:
|
|
111
|
-
canResendInvite:
|
|
112
|
-
members:
|
|
113
|
-
featureLabels:
|
|
114
|
-
acceptInviteRedirectUri:
|
|
115
|
-
}),
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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
|
-
]),
|
|
121
|
+
]), wt = !!R.data, Tt = wt && !!I && !J;
|
|
123
122
|
c(() => {
|
|
124
|
-
|
|
125
|
-
}, [
|
|
126
|
-
let
|
|
123
|
+
Tt && L(void 0);
|
|
124
|
+
}, [Tt]);
|
|
125
|
+
let Et = R.isError;
|
|
127
126
|
c(() => {
|
|
128
|
-
|
|
129
|
-
}, [
|
|
130
|
-
let
|
|
131
|
-
member:
|
|
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:
|
|
134
|
-
canEditOrgProfile:
|
|
132
|
+
canEditAnyProfile: Ze,
|
|
133
|
+
canEditOrgProfile: Qe,
|
|
135
134
|
currentUserId: b
|
|
136
|
-
})),
|
|
137
|
-
member:
|
|
135
|
+
})), Mt = !!(J && be({
|
|
136
|
+
member: J,
|
|
138
137
|
organizationId: v,
|
|
139
|
-
canEditRole:
|
|
138
|
+
canEditRole: yt,
|
|
140
139
|
currentUserId: b
|
|
141
|
-
})),
|
|
142
|
-
selectedMember:
|
|
143
|
-
canReadInternalAccounts:
|
|
144
|
-
canReadExternalAccounts:
|
|
145
|
-
featureLabels:
|
|
146
|
-
}), $ = l(() =>
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
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
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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:
|
|
158
|
+
avatarSeed: J?.email,
|
|
161
159
|
roleBadgeLabel: $?.roleCardTitle,
|
|
162
160
|
statusLabel: $?.statusLabel,
|
|
163
161
|
statusTone: $?.statusTone,
|
|
164
162
|
lastSignInLabel: $?.lastSignInLabel,
|
|
165
|
-
form:
|
|
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
|
-
|
|
177
|
-
|
|
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
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
onSubmit: G.
|
|
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(
|
|
238
|
-
tabs:
|
|
239
|
-
activeTabId:
|
|
240
|
-
onTabChange:
|
|
241
|
-
children:
|
|
242
|
-
/* @__PURE__ */ f(
|
|
243
|
-
icon: /* @__PURE__ */ f(
|
|
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(
|
|
244
|
+
/* @__PURE__ */ f(Te, { ...j.drawer }),
|
|
269
245
|
/* @__PURE__ */ f(s, {
|
|
270
246
|
open: j.deleteDialog.open,
|
|
271
|
-
icon: /* @__PURE__ */ f(
|
|
247
|
+
icon: /* @__PURE__ */ f(Pe, {
|
|
272
248
|
"aria-hidden": !0,
|
|
273
249
|
className: "ttw:size-6"
|
|
274
250
|
}),
|
|
275
|
-
title:
|
|
276
|
-
description:
|
|
251
|
+
title: g.departmentDeleteDialogTitle,
|
|
252
|
+
description: g.departmentDeleteDialogDescription,
|
|
277
253
|
subjectName: j.deleteDialog.subjectName,
|
|
278
|
-
confirmButtonLabel:
|
|
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__ */
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
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
|
-
|
|
294
|
+
at(e), N(void 0), F(0);
|
|
297
295
|
},
|
|
298
|
-
autoFocusRowKey:
|
|
296
|
+
autoFocusRowKey: lt,
|
|
299
297
|
onPreviousPageClick: () => {
|
|
300
|
-
|
|
298
|
+
N(xt ?? void 0), F((e) => Math.max(0, e - 1));
|
|
301
299
|
},
|
|
302
300
|
onNextPageClick: () => {
|
|
303
|
-
|
|
301
|
+
N(bt ?? void 0), F((e) => e + 1);
|
|
304
302
|
},
|
|
305
|
-
onInviteClick:
|
|
303
|
+
onInviteClick: vt ? G.openInviteForm : void 0,
|
|
306
304
|
labels: r
|
|
307
305
|
})
|
|
308
306
|
})
|
|
309
307
|
}),
|
|
310
308
|
/* @__PURE__ */ f(s, {
|
|
311
|
-
open:
|
|
312
|
-
icon: /* @__PURE__ */ f(
|
|
309
|
+
open: q.isDeactivateOpen,
|
|
310
|
+
icon: /* @__PURE__ */ f(Ae, {
|
|
313
311
|
"aria-hidden": !0,
|
|
314
312
|
className: "ttw:size-6"
|
|
315
313
|
}),
|
|
316
|
-
title:
|
|
317
|
-
description:
|
|
318
|
-
subjectName:
|
|
319
|
-
subjectDetail:
|
|
320
|
-
confirmButtonLabel:
|
|
321
|
-
errorMessage:
|
|
322
|
-
isConfirming:
|
|
323
|
-
onOpenChange:
|
|
324
|
-
onConfirm:
|
|
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:
|
|
329
|
-
icon: /* @__PURE__ */ f(
|
|
326
|
+
open: q.isResendOpen,
|
|
327
|
+
icon: /* @__PURE__ */ f(Me, {
|
|
330
328
|
"aria-hidden": !0,
|
|
331
329
|
className: "ttw:size-6"
|
|
332
330
|
}),
|
|
333
|
-
title:
|
|
334
|
-
description:
|
|
335
|
-
subjectName:
|
|
336
|
-
subjectDetail:
|
|
337
|
-
confirmButtonLabel:
|
|
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:
|
|
340
|
-
isConfirming:
|
|
341
|
-
onOpenChange:
|
|
342
|
-
onConfirm:
|
|
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:
|
|
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:
|
|
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:
|
|
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 };
|