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