@tesouro/embedded-components-react 0.11.34 → 0.11.35
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 +1 -0
- package/dist/index.d.ts +8 -1
- package/dist/lib/SettingsWidget.d.ts +8 -1
- package/dist/lib/WidgetSuite.d.ts +7 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/SettingsWidget/SettingsWidget.js +70 -64
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index12.js +61 -59
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +228 -227
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -759,6 +759,7 @@ A single navigable settings surface combining profile, team, invoice, bill-pay,
|
|
|
759
759
|
| Prop | Type | Default | Description |
|
|
760
760
|
| ------------------------- | -------------------------------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------ |
|
|
761
761
|
| `acceptInviteRedirectUri` | `string` | Same-origin `/accept-invite` | Where Team invite emails link to; set it when your landing route differs or the origin isn't allowlisted. |
|
|
762
|
+
| `teamInitialView` | `'invite'` | `undefined` | Opens the Team section on the invite form when the user may invite. Pair with a Team `selectedSection`. |
|
|
762
763
|
| `labels` | `Partial<Labels>` | English labels | Overrides the settings heading copy. |
|
|
763
764
|
| `featureLabels` | `Partial<FeatureLabels>` | English labels | Overrides section labels. |
|
|
764
765
|
| `profileContent` | `ReactNode` | Profile widget | Replaces the profile section content. |
|
package/dist/index.d.ts
CHANGED
|
@@ -3968,6 +3968,13 @@ interface SettingsWidgetProps extends WidgetProviderProps {
|
|
|
3968
3968
|
* registered landing route differs from that default, or the origin is
|
|
3969
3969
|
* not on the OIDC redirect-URI allowlist (preview/localhost). */
|
|
3970
3970
|
acceptInviteRedirectUri?: string;
|
|
3971
|
+
/** Forwarded to the embedded Team section's {@link TeamWidget} as its
|
|
3972
|
+
* `initialView`. `'invite'` opens the Team section on the Invite team member
|
|
3973
|
+
* form when the user may invite, else on the team list. Pair it with
|
|
3974
|
+
* `selectedSection` or `defaultSelectedSection` set to the Team section.
|
|
3975
|
+
* Spent once the user leaves the Team section, so returning to it shows the
|
|
3976
|
+
* list. */
|
|
3977
|
+
teamInitialView?: 'invite';
|
|
3971
3978
|
/** Forwarded to the embedded Help section's {@link HelpWidget} — where its
|
|
3972
3979
|
* "Contact Us" line links (a support page URL or a `mailto:`). The line is
|
|
3973
3980
|
* hidden entirely when unset, since the package has no tenant-agnostic
|
|
@@ -4011,7 +4018,7 @@ interface SettingsWidgetProps extends WidgetProviderProps {
|
|
|
4011
4018
|
invoiceContent?: ReactNode;
|
|
4012
4019
|
legalContent?: ReactNode;
|
|
4013
4020
|
}
|
|
4014
|
-
declare function SettingsWidget({ labels, featureLabels, acceptInviteRedirectUri, helpContactUrl, helpFaq, profileContactUrl, selectedSection, defaultSelectedSection, onSelectedSectionChange, additionalSections, profileContent, teamContent, billPayContent, helpContent, expenseContent, accountingContent, invoiceContent, legalContent, ...widgetProviderProps }: SettingsWidgetProps): React.JSX.Element;
|
|
4021
|
+
declare function SettingsWidget({ labels, featureLabels, acceptInviteRedirectUri, teamInitialView, helpContactUrl, helpFaq, profileContactUrl, selectedSection, defaultSelectedSection, onSelectedSectionChange, additionalSections, profileContent, teamContent, billPayContent, helpContent, expenseContent, accountingContent, invoiceContent, legalContent, ...widgetProviderProps }: SettingsWidgetProps): React.JSX.Element;
|
|
4015
4022
|
|
|
4016
4023
|
interface TransfersWidgetLabels {
|
|
4017
4024
|
widgetTitle: string;
|
|
@@ -721,6 +721,13 @@ interface SettingsWidgetProps extends WidgetProviderProps {
|
|
|
721
721
|
* registered landing route differs from that default, or the origin is
|
|
722
722
|
* not on the OIDC redirect-URI allowlist (preview/localhost). */
|
|
723
723
|
acceptInviteRedirectUri?: string;
|
|
724
|
+
/** Forwarded to the embedded Team section's {@link TeamWidget} as its
|
|
725
|
+
* `initialView`. `'invite'` opens the Team section on the Invite team member
|
|
726
|
+
* form when the user may invite, else on the team list. Pair it with
|
|
727
|
+
* `selectedSection` or `defaultSelectedSection` set to the Team section.
|
|
728
|
+
* Spent once the user leaves the Team section, so returning to it shows the
|
|
729
|
+
* list. */
|
|
730
|
+
teamInitialView?: 'invite';
|
|
724
731
|
/** Forwarded to the embedded Help section's {@link HelpWidget} — where its
|
|
725
732
|
* "Contact Us" line links (a support page URL or a `mailto:`). The line is
|
|
726
733
|
* hidden entirely when unset, since the package has no tenant-agnostic
|
|
@@ -764,7 +771,7 @@ interface SettingsWidgetProps extends WidgetProviderProps {
|
|
|
764
771
|
invoiceContent?: ReactNode;
|
|
765
772
|
legalContent?: ReactNode;
|
|
766
773
|
}
|
|
767
|
-
declare function SettingsWidget({ labels, featureLabels, acceptInviteRedirectUri, helpContactUrl, helpFaq, profileContactUrl, selectedSection, defaultSelectedSection, onSelectedSectionChange, additionalSections, profileContent, teamContent, billPayContent, helpContent, expenseContent, accountingContent, invoiceContent, legalContent, ...widgetProviderProps }: SettingsWidgetProps): React.JSX.Element;
|
|
774
|
+
declare function SettingsWidget({ labels, featureLabels, acceptInviteRedirectUri, teamInitialView, helpContactUrl, helpFaq, profileContactUrl, selectedSection, defaultSelectedSection, onSelectedSectionChange, additionalSections, profileContent, teamContent, billPayContent, helpContent, expenseContent, accountingContent, invoiceContent, legalContent, ...widgetProviderProps }: SettingsWidgetProps): React.JSX.Element;
|
|
768
775
|
|
|
769
776
|
export { HELP_FAQ_EN, SettingsSection, SettingsWidget };
|
|
770
777
|
export type { HelpFaqAnswer, HelpFaqBullet, HelpFaqBulletType, HelpFaqItem, HelpFaqSection, SettingsWidgetAdditionalSection, FeatureLabels as SettingsWidgetFeatureLabels, Labels as SettingsWidgetLabels, SettingsWidgetProps, SettingsWidgetSection, SettingsWidgetSectionId };
|
|
@@ -2891,6 +2891,13 @@ interface SettingsWidgetProps extends WidgetProviderProps {
|
|
|
2891
2891
|
* registered landing route differs from that default, or the origin is
|
|
2892
2892
|
* not on the OIDC redirect-URI allowlist (preview/localhost). */
|
|
2893
2893
|
acceptInviteRedirectUri?: string;
|
|
2894
|
+
/** Forwarded to the embedded Team section's {@link TeamWidget} as its
|
|
2895
|
+
* `initialView`. `'invite'` opens the Team section on the Invite team member
|
|
2896
|
+
* form when the user may invite, else on the team list. Pair it with
|
|
2897
|
+
* `selectedSection` or `defaultSelectedSection` set to the Team section.
|
|
2898
|
+
* Spent once the user leaves the Team section, so returning to it shows the
|
|
2899
|
+
* list. */
|
|
2900
|
+
teamInitialView?: 'invite';
|
|
2894
2901
|
/** Forwarded to the embedded Help section's {@link HelpWidget} — where its
|
|
2895
2902
|
* "Contact Us" line links (a support page URL or a `mailto:`). The line is
|
|
2896
2903
|
* hidden entirely when unset, since the package has no tenant-agnostic
|
|
@@ -29,11 +29,11 @@ import { HelpWidget as _ } from "../../../../help/feature/dist/index3.js";
|
|
|
29
29
|
import "../../../../help/feature/dist/index.js";
|
|
30
30
|
import { ProfileWidget as v } from "../../../../profile/feature/dist/index4.js";
|
|
31
31
|
import "../../../../profile/feature/dist/index.js";
|
|
32
|
-
import { useCallback as y, useEffect as b, useRef as x } from "react";
|
|
33
|
-
import { jsx as
|
|
34
|
-
import { useControllableState as
|
|
32
|
+
import { useCallback as y, useEffect as b, useRef as x, useState as S } from "react";
|
|
33
|
+
import { jsx as C } from "react/jsx-runtime";
|
|
34
|
+
import { useControllableState as w } from "@radix-ui/react-use-controllable-state";
|
|
35
35
|
// ../../libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/SettingsWidget/SettingsWidget.js
|
|
36
|
-
var
|
|
36
|
+
var T = {
|
|
37
37
|
[s.Profile]: [],
|
|
38
38
|
[s.Team]: [t.UserReadOrg],
|
|
39
39
|
[s.Invoice]: [t.InvoiceReadOrg, t.OrganizationSettingsWriteOrg],
|
|
@@ -48,106 +48,112 @@ var w = {
|
|
|
48
48
|
[s.Legal]: [],
|
|
49
49
|
[s.Help]: []
|
|
50
50
|
};
|
|
51
|
-
function
|
|
52
|
-
let
|
|
51
|
+
function E({ labels: t, featureLabels: r, acceptInviteRedirectUri: u, teamInitialView: E, helpContactUrl: D, helpFaq: O, profileContactUrl: k, selectedSection: A, defaultSelectedSection: j, onSelectedSectionChange: M, additionalSections: N, profileContent: ee, teamContent: te, billPayContent: ne, helpContent: P, expenseContent: F, accountingContent: I, invoiceContent: L, legalContent: R }) {
|
|
52
|
+
let z = {
|
|
53
53
|
...o,
|
|
54
54
|
...r
|
|
55
|
-
},
|
|
55
|
+
}, B = x(null), V = n();
|
|
56
56
|
b(() => {
|
|
57
|
-
|
|
58
|
-
}, [
|
|
59
|
-
let { initResponse:
|
|
57
|
+
V(l.Mounted);
|
|
58
|
+
}, [V]);
|
|
59
|
+
let { initResponse: H } = i(), U = H?.scopes, [W, G] = S("unseen"), K = W === "spent", q = [
|
|
60
60
|
{
|
|
61
61
|
id: s.Profile,
|
|
62
|
-
label:
|
|
63
|
-
content:
|
|
62
|
+
label: z.profileSection,
|
|
63
|
+
content: ee ?? /* @__PURE__ */ C(v, { contactUrl: k })
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
id: s.Team,
|
|
67
|
-
label:
|
|
68
|
-
content:
|
|
67
|
+
label: z.teamSection,
|
|
68
|
+
content: te ?? /* @__PURE__ */ C(m, {
|
|
69
|
+
acceptInviteRedirectUri: u,
|
|
70
|
+
initialView: K ? void 0 : E
|
|
71
|
+
})
|
|
69
72
|
},
|
|
70
73
|
{
|
|
71
74
|
id: s.Invoice,
|
|
72
|
-
label:
|
|
73
|
-
content:
|
|
75
|
+
label: z.invoiceSection,
|
|
76
|
+
content: L ?? /* @__PURE__ */ C(f, { ref: B })
|
|
74
77
|
},
|
|
75
78
|
{
|
|
76
79
|
id: s.Expense,
|
|
77
|
-
label:
|
|
78
|
-
content:
|
|
79
|
-
approvalsLabel:
|
|
80
|
-
requirementsLabel:
|
|
80
|
+
label: z.expenseSection,
|
|
81
|
+
content: F ?? /* @__PURE__ */ C(d, {
|
|
82
|
+
approvalsLabel: z.expenseApprovalsTab,
|
|
83
|
+
requirementsLabel: z.expenseRequirementsTab
|
|
81
84
|
})
|
|
82
85
|
},
|
|
83
86
|
{
|
|
84
87
|
id: s.BillPay,
|
|
85
|
-
label:
|
|
86
|
-
content:
|
|
88
|
+
label: z.billPaySection,
|
|
89
|
+
content: ne ?? /* @__PURE__ */ C(a, {
|
|
87
90
|
showHeaderTitle: !1,
|
|
88
|
-
componentLabels: { header: { Description:
|
|
91
|
+
componentLabels: { header: { Description: z.billPayDescription } }
|
|
89
92
|
})
|
|
90
93
|
},
|
|
91
94
|
{
|
|
92
95
|
id: s.Accounting,
|
|
93
|
-
label:
|
|
94
|
-
content:
|
|
96
|
+
label: z.accountingSection,
|
|
97
|
+
content: I ?? /* @__PURE__ */ C(g, {})
|
|
95
98
|
},
|
|
96
99
|
{
|
|
97
100
|
id: s.Legal,
|
|
98
|
-
label:
|
|
99
|
-
content:
|
|
101
|
+
label: z.legalSection,
|
|
102
|
+
content: R ?? /* @__PURE__ */ C(p, {})
|
|
100
103
|
},
|
|
101
104
|
{
|
|
102
105
|
id: s.Help,
|
|
103
|
-
label:
|
|
104
|
-
content:
|
|
105
|
-
contactUrl:
|
|
106
|
-
faq:
|
|
106
|
+
label: z.helpSection,
|
|
107
|
+
content: P ?? /* @__PURE__ */ C(_, {
|
|
108
|
+
contactUrl: D,
|
|
109
|
+
faq: O
|
|
107
110
|
})
|
|
108
111
|
}
|
|
109
|
-
],
|
|
110
|
-
prop:
|
|
111
|
-
defaultProp:
|
|
112
|
-
onChange:
|
|
112
|
+
], J = c(q.filter((t) => T[t.id].every((t) => e(U, [t]))), N ?? []), Y = J[0]?.id ?? "", [X, Z] = w({
|
|
113
|
+
prop: A,
|
|
114
|
+
defaultProp: j ?? Y,
|
|
115
|
+
onChange: M,
|
|
113
116
|
caller: "SettingsWidget"
|
|
114
|
-
}),
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
117
|
+
}), Q = J.some((e) => e.id === X) ? X : Y, $ = Q === s.Team;
|
|
118
|
+
W === "unseen" && $ ? G("showing") : W === "showing" && !$ && G("spent");
|
|
119
|
+
let re = y((e) => {
|
|
120
|
+
let t = B.current;
|
|
121
|
+
Q !== s.Invoice || !t ? Z(e) : t.confirmLeave().then((t) => {
|
|
122
|
+
t && Z(e);
|
|
118
123
|
});
|
|
119
|
-
}, [
|
|
120
|
-
return /* @__PURE__ */
|
|
124
|
+
}, [Q, Z]);
|
|
125
|
+
return /* @__PURE__ */ C(h, {
|
|
121
126
|
labels: t,
|
|
122
|
-
sections:
|
|
123
|
-
selectedSectionId:
|
|
124
|
-
onSectionChange:
|
|
127
|
+
sections: J,
|
|
128
|
+
selectedSectionId: Q,
|
|
129
|
+
onSectionChange: re
|
|
125
130
|
});
|
|
126
131
|
}
|
|
127
|
-
function
|
|
128
|
-
return /* @__PURE__ */
|
|
129
|
-
...
|
|
132
|
+
function D({ labels: e, featureLabels: t, acceptInviteRedirectUri: n, teamInitialView: i, helpContactUrl: a, helpFaq: o, profileContactUrl: s, selectedSection: c, defaultSelectedSection: l, onSelectedSectionChange: d, additionalSections: f, profileContent: p, teamContent: m, billPayContent: h, helpContent: g, expenseContent: _, accountingContent: v, invoiceContent: y, legalContent: b, ...x }) {
|
|
133
|
+
return /* @__PURE__ */ C(r, {
|
|
134
|
+
...x,
|
|
130
135
|
widgetName: u,
|
|
131
|
-
children: /* @__PURE__ */
|
|
136
|
+
children: /* @__PURE__ */ C(E, {
|
|
132
137
|
labels: e,
|
|
133
138
|
featureLabels: t,
|
|
134
139
|
acceptInviteRedirectUri: n,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
140
|
+
teamInitialView: i,
|
|
141
|
+
helpContactUrl: a,
|
|
142
|
+
helpFaq: o,
|
|
143
|
+
profileContactUrl: s,
|
|
144
|
+
selectedSection: c,
|
|
145
|
+
defaultSelectedSection: l,
|
|
146
|
+
onSelectedSectionChange: d,
|
|
147
|
+
additionalSections: f,
|
|
148
|
+
profileContent: p,
|
|
149
|
+
teamContent: m,
|
|
150
|
+
billPayContent: h,
|
|
151
|
+
helpContent: g,
|
|
152
|
+
expenseContent: _,
|
|
153
|
+
accountingContent: v,
|
|
154
|
+
invoiceContent: y,
|
|
155
|
+
legalContent: b
|
|
150
156
|
})
|
|
151
157
|
});
|
|
152
158
|
}
|
|
153
|
-
export {
|
|
159
|
+
export { D as SettingsWidget, D as default };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index12.js
CHANGED
|
@@ -12,18 +12,18 @@ import "../../../../shared/data-access/dist/index.js";
|
|
|
12
12
|
import "../../../../shared/ui/dist/index.js";
|
|
13
13
|
import { useAnalyticsTrack as o } from "../../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
14
14
|
import "../../../../shared/feature/dist/index.js";
|
|
15
|
-
import { TeamWidgetAnalyticsEvent as
|
|
16
|
-
import { useInviteUserMutation as
|
|
17
|
-
import { useAllTeamMembersQuery as
|
|
18
|
-
import { useAllDepartmentsQuery as
|
|
15
|
+
import { TeamWidgetAnalyticsEvent as s } from "./index2.js";
|
|
16
|
+
import { useInviteUserMutation as c } from "../../data-access/dist/index7.js";
|
|
17
|
+
import { useAllTeamMembersQuery as ee } from "../../data-access/dist/index14.js";
|
|
18
|
+
import { useAllDepartmentsQuery as te } from "../../data-access/dist/index17.js";
|
|
19
19
|
import { useAllLocationsQuery as ne } from "../../data-access/dist/index21.js";
|
|
20
20
|
import "../../data-access/dist/index.js";
|
|
21
21
|
import { toNamedSelectOptions as l, toReportingManagerOptions as re, toRoleCardOptions as ie } from "./index11.js";
|
|
22
22
|
import { isAccountsSectionVisibleForRole as ae, isAdminPermissionSet as oe, isDebitCardAdminPermissionSet as se, isEmployeePermissionSet as u, toAccountAccessInputs as ce, toAccountAccessOptions as le } from "./index7.js";
|
|
23
|
-
import { resolveAcceptInviteRedirectUri as
|
|
24
|
-
import { useMemo as
|
|
23
|
+
import { resolveAcceptInviteRedirectUri as d } from "./index8.js";
|
|
24
|
+
import { useMemo as f, useState as p } from "react";
|
|
25
25
|
// ../../libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index12.js
|
|
26
|
-
var
|
|
26
|
+
var m = {
|
|
27
27
|
name: "",
|
|
28
28
|
email: "",
|
|
29
29
|
department: "",
|
|
@@ -31,83 +31,85 @@ var p = {
|
|
|
31
31
|
reportingManager: "",
|
|
32
32
|
role: "",
|
|
33
33
|
accountAccess: []
|
|
34
|
-
},
|
|
35
|
-
function
|
|
36
|
-
let
|
|
34
|
+
}, ue = /^\S+@\S+\.\S+$/;
|
|
35
|
+
function h({ canInvite: h, canReadDirectory: de, canManageAccountAccess: g, canReadInternalAccounts: _, canReadExternalAccounts: v, canGrantDebitCardAccess: y = !1, roles: b, roleCatalog: x = [], organizationId: S, featureLabels: C, acceptInviteRedirectUri: fe, openOnArrival: pe = !1 }) {
|
|
36
|
+
let me = o(), [w, T] = p(!1), [he, ge] = p(pe);
|
|
37
|
+
he && h && (ge(!1), T(!0));
|
|
38
|
+
let [E, D] = p(m), [_e, O] = p({}), k = c(), A = w && h && de, j = te({ enabled: A }), M = ne({ enabled: A }), N = ee({
|
|
37
39
|
Status: "ACTIVE",
|
|
38
|
-
enabled:
|
|
39
|
-
}),
|
|
40
|
-
roleIds:
|
|
41
|
-
enabled:
|
|
42
|
-
}),
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
y,
|
|
40
|
+
enabled: A
|
|
41
|
+
}), P = w && h && g, F = n({ enabled: P && _ }), I = i({ enabled: P && v }), L = w && h, ve = f(() => b.map((e) => e.id), [b]), R = a({
|
|
42
|
+
roleIds: ve,
|
|
43
|
+
enabled: L
|
|
44
|
+
}), z = w && h && y, B = r({ enabled: z }), ye = f(() => ie(b), [b]), be = f(() => j.isComplete ? l(j.data?.data ?? []) : [], [j.isComplete, j.data?.data]), xe = f(() => M.isComplete ? l(M.data?.data ?? []) : [], [M.isComplete, M.data?.data]), Se = f(() => N.isComplete ? re(N.data?.data ?? [], x, C, S) : [], [
|
|
45
|
+
N.isComplete,
|
|
46
|
+
N.data?.data,
|
|
46
47
|
x,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
C,
|
|
49
|
+
S
|
|
50
|
+
]), V = A && !j.isComplete && !j.isError, H = A && !M.isComplete && !M.isError, U = A && !N.isComplete && !N.isError, Ce = A && j.isError, we = A && M.isError, Te = A && N.isError, Ee = !_ || !!F.data && !F.hasNextPage && !F.isFetchingNextPage, De = !v || !!I.data && !I.hasNextPage && !I.isFetchingNextPage, W = !!E.role && R.resolvingRoleIds.has(E.role), G = L && !!E.role && (W || !R.byRoleId.has(E.role)) && !W, K = P && (_ && F.isError || v && I.isError || G), q = P && !K && (!Ee || !De || W), J = f(() => le(_ ? F.data?.data ?? [] : [], v ? I.data?.data ?? [] : [], {
|
|
51
|
+
checking: C.accountTypeChecking,
|
|
52
|
+
savings: C.accountTypeSavings
|
|
51
53
|
}), [
|
|
52
|
-
g,
|
|
53
54
|
_,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
v,
|
|
56
|
+
F.data?.data,
|
|
57
|
+
I.data?.data,
|
|
58
|
+
C.accountTypeChecking,
|
|
59
|
+
C.accountTypeSavings
|
|
60
|
+
]), Oe = J.options, Y = R.byRoleId.get(E.role), X = oe(Y), Z = z && se(Y), Q = Z && (t(B) || B.isFetching), ke = Z && B.isError, $ = g && ae(!!E.role, u(Y)), Ae = g && u(Y), je = $ ? X ? "admin" : "picker" : Ae ? "employee" : "hidden";
|
|
59
61
|
return {
|
|
60
|
-
isInviteOpen:
|
|
61
|
-
inviteForm:
|
|
62
|
-
inviteErrors:
|
|
63
|
-
isInviting:
|
|
64
|
-
inviteErrorMessage:
|
|
65
|
-
roleOptions:
|
|
66
|
-
departmentOptions:
|
|
67
|
-
locationOptions:
|
|
68
|
-
reportingManagerOptions:
|
|
69
|
-
accountAccessOptions:
|
|
62
|
+
isInviteOpen: w,
|
|
63
|
+
inviteForm: E,
|
|
64
|
+
inviteErrors: _e,
|
|
65
|
+
isInviting: k.isPending,
|
|
66
|
+
inviteErrorMessage: k.isError ? C.inviteFailedError : void 0,
|
|
67
|
+
roleOptions: ye,
|
|
68
|
+
departmentOptions: be,
|
|
69
|
+
locationOptions: xe,
|
|
70
|
+
reportingManagerOptions: Se,
|
|
71
|
+
accountAccessOptions: Oe,
|
|
70
72
|
departmentsLoading: V,
|
|
71
73
|
locationsLoading: H,
|
|
72
74
|
reportingManagersLoading: U,
|
|
73
|
-
departmentsError:
|
|
74
|
-
locationsError:
|
|
75
|
-
reportingManagersError:
|
|
75
|
+
departmentsError: Ce,
|
|
76
|
+
locationsError: we,
|
|
77
|
+
reportingManagersError: Te,
|
|
76
78
|
accountAccessLoading: q,
|
|
77
79
|
accountAccessError: K,
|
|
78
|
-
accountAccessMode:
|
|
80
|
+
accountAccessMode: je,
|
|
79
81
|
isInviteSubmitBlocked: Q,
|
|
80
82
|
openInviteForm: () => {
|
|
81
|
-
|
|
83
|
+
h && (D(m), O({}), k.reset(), T(!0));
|
|
82
84
|
},
|
|
83
85
|
closeInviteForm: () => {
|
|
84
|
-
|
|
86
|
+
T(!1);
|
|
85
87
|
},
|
|
86
|
-
onInviteFormChange:
|
|
88
|
+
onInviteFormChange: D,
|
|
87
89
|
onInviteSubmit: () => {
|
|
88
|
-
if (!
|
|
89
|
-
let t = {}, n =
|
|
90
|
-
n || (t.name =
|
|
91
|
-
let i =
|
|
92
|
-
if (
|
|
93
|
-
let a = $ ? X ? J.allAccountIds :
|
|
94
|
-
|
|
90
|
+
if (!h || V || H || U || $ && (q || K) || W || Q) return;
|
|
91
|
+
let t = {}, n = E.name.trim(), r = E.email.trim();
|
|
92
|
+
n || (t.name = C.nameRequiredError), r ? ue.test(r) || (t.email = C.emailInvalidError) : t.email = C.emailRequiredError;
|
|
93
|
+
let i = E.role;
|
|
94
|
+
if (b.some((e) => e.id === i) ? G ? t.role = C.rolePermissionsUnavailableError : X && !g ? t.role = C.roleNeedsAccountAccessError : ke && (t.role = C.debitCardsUnavailableError, B.refetch()) : t.role = C.roleRequiredError, O(t), t.name || t.email || t.role) return;
|
|
95
|
+
let a = $ ? X ? J.allAccountIds : E.accountAccess : [], o = ce(a, J.descriptors), c = Z ? (B.data?.data ?? []).map((e) => e.id) : [];
|
|
96
|
+
k.mutate({
|
|
95
97
|
body: {
|
|
96
98
|
name: n,
|
|
97
99
|
email: r,
|
|
98
100
|
status: "INVITED",
|
|
99
|
-
reportingManagerUserId:
|
|
101
|
+
reportingManagerUserId: E.reportingManager || null,
|
|
100
102
|
permissionIds: [],
|
|
101
|
-
redirectUri:
|
|
103
|
+
redirectUri: d(fe)
|
|
102
104
|
},
|
|
103
105
|
roleId: i,
|
|
104
|
-
departmentId:
|
|
105
|
-
locationId:
|
|
106
|
+
departmentId: E.department || void 0,
|
|
107
|
+
locationId: E.location || void 0,
|
|
106
108
|
bankAccountAccess: o,
|
|
107
|
-
debitCardIds:
|
|
109
|
+
debitCardIds: c
|
|
108
110
|
}, {
|
|
109
111
|
onSuccess: (t) => {
|
|
110
|
-
|
|
112
|
+
me(s.MemberInvited, { memberId: t?.id }), T(!1), t?.debitCardAccessError === void 0 ? e.success(C.inviteSuccessToast) : (console.error("Failed to grant card access to invite:", t.debitCardAccessError), e.warning(C.inviteCardAccessWarningToast));
|
|
111
113
|
},
|
|
112
114
|
onError: (e) => {
|
|
113
115
|
console.error("Failed to send team invite:", e);
|
|
@@ -116,4 +118,4 @@ function m({ canInvite: m, canReadDirectory: fe, canManageAccountAccess: h, canR
|
|
|
116
118
|
}
|
|
117
119
|
};
|
|
118
120
|
}
|
|
119
|
-
export {
|
|
121
|
+
export { h as useInviteForm };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js
CHANGED
|
@@ -44,319 +44,320 @@ var Ve = [
|
|
|
44
44
|
5,
|
|
45
45
|
10,
|
|
46
46
|
25
|
|
47
|
-
], He = 10, Ue = [n.UserReadOrg],
|
|
48
|
-
function
|
|
49
|
-
let
|
|
47
|
+
], 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];
|
|
48
|
+
function m({ labels: i, featureLabels: a, acceptInviteRedirectUri: m, initialView: h }) {
|
|
49
|
+
let g = c(() => ({
|
|
50
50
|
...ce,
|
|
51
51
|
...a
|
|
52
|
-
}), [a]),
|
|
52
|
+
}), [a]), et = r();
|
|
53
53
|
s(() => {
|
|
54
|
-
|
|
55
|
-
}, [
|
|
56
|
-
let { organizationId:
|
|
57
|
-
canRead:
|
|
58
|
-
canWrite:
|
|
59
|
-
featureLabels:
|
|
60
|
-
}),
|
|
61
|
-
canRead:
|
|
62
|
-
canWrite:
|
|
63
|
-
featureLabels:
|
|
64
|
-
}),
|
|
54
|
+
et(le.Mounted);
|
|
55
|
+
}, [et]);
|
|
56
|
+
let { organizationId: tt, widgetToken: nt, initResponse: _ } = ie(), { organizationStatus: rt } = te(), v = tt ?? (rt === e.Rotating ? _?.organizationId : void 0), y = _?.userId ?? void 0, it = !oe(), at = se(), ot = !!ae(), b = !!(tt && nt), st = !!(v && nt), x = c(() => t(_?.scopes, Ue), [_?.scopes]), S = st && x && !!_, C = _?.scopes, w = t(C, qe), ct = t(C, Je), lt = b && t(C, p) && w && ct, ut = b && x && t(C, p), dt = b && t(C, We), ft = b && t(C, Ge), pt = b && w && ct, mt = b && t(C, Ke), ht = b && x && t(C, [n.UserWriteOrg]), T = b && t(C, Ye), E = b && t(C, Xe), D = b && t(C, Ze) && T && E, gt = b && t(C, Qe) && t(C, $e), [O, _t] = l("members"), k = pe({
|
|
57
|
+
canRead: x && O === "departments",
|
|
58
|
+
canWrite: ht,
|
|
59
|
+
featureLabels: g
|
|
60
|
+
}), A = Ce({
|
|
61
|
+
canRead: x && O === "locations",
|
|
62
|
+
canWrite: ht,
|
|
63
|
+
featureLabels: g
|
|
64
|
+
}), vt = [
|
|
65
65
|
{
|
|
66
66
|
id: "members",
|
|
67
|
-
label:
|
|
67
|
+
label: g.teamMembersTab
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
id: "departments",
|
|
71
|
-
label:
|
|
71
|
+
label: g.departmentsTab
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
74
|
id: "locations",
|
|
75
|
-
label:
|
|
75
|
+
label: g.locationsTab
|
|
76
76
|
}
|
|
77
|
-
], [
|
|
78
|
-
Limit:
|
|
77
|
+
], [yt, j] = l(), [M, bt] = l(He), [xt, N] = l(0), [P, F] = l(), I = (lt || pt) && w, St = S && w && (!!P || !I), [Ct, wt] = l(), L = de({
|
|
78
|
+
Limit: M,
|
|
79
79
|
Status: "ALL",
|
|
80
|
-
PaginationToken:
|
|
81
|
-
enabled:
|
|
82
|
-
}),
|
|
83
|
-
organizationId:
|
|
84
|
-
organizationTypes:
|
|
85
|
-
}), [
|
|
86
|
-
let e =
|
|
87
|
-
return ye(e,
|
|
80
|
+
PaginationToken: yt,
|
|
81
|
+
enabled: S
|
|
82
|
+
}), Tt = _?.organizationTypes ?? [], R = c(() => ({
|
|
83
|
+
organizationId: v ?? "",
|
|
84
|
+
organizationTypes: Tt
|
|
85
|
+
}), [v, Tt]), z = ne({ enabled: St }), Et = c(() => ve(z.data?.data ?? [], R), [z.data?.data, R]), B = S ? L.data?.data ?? [] : [], V = ue({ enabled: I }), H = c(() => ge(V.data?.data ?? [], R), [V.data, R]), Dt = c(() => {
|
|
86
|
+
let e = I ? V.data?.data ?? [] : z.data?.data ?? [];
|
|
87
|
+
return ye(e, R);
|
|
88
88
|
}, [
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
]),
|
|
94
|
-
canInvite:
|
|
95
|
-
canReadDirectory:
|
|
96
|
-
canManageAccountAccess:
|
|
97
|
-
canReadInternalAccounts:
|
|
98
|
-
canReadExternalAccounts:
|
|
99
|
-
canGrantDebitCardAccess:
|
|
100
|
-
roles:
|
|
101
|
-
roleCatalog:
|
|
102
|
-
organizationId:
|
|
103
|
-
featureLabels:
|
|
104
|
-
acceptInviteRedirectUri:
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
89
|
+
I,
|
|
90
|
+
V.data,
|
|
91
|
+
z.data,
|
|
92
|
+
R
|
|
93
|
+
]), Ot = Et.length > 0 && !z.isResolving && !z.isError, kt = c(() => ve(V.data?.data ?? [], R), [V.data, R]), U = Ot ? Et : kt, At = xe(B, g, F, U, v), jt = !!V.data, Mt = H.length > 0, Nt = lt && jt && Mt, Pt = pt && jt && Mt, W = Se({
|
|
94
|
+
canInvite: Nt,
|
|
95
|
+
canReadDirectory: x,
|
|
96
|
+
canManageAccountAccess: D,
|
|
97
|
+
canReadInternalAccounts: T,
|
|
98
|
+
canReadExternalAccounts: E,
|
|
99
|
+
canGrantDebitCardAccess: gt,
|
|
100
|
+
roles: H,
|
|
101
|
+
roleCatalog: U,
|
|
102
|
+
organizationId: v,
|
|
103
|
+
featureLabels: g,
|
|
104
|
+
acceptInviteRedirectUri: m,
|
|
105
|
+
openOnArrival: h === "invite"
|
|
106
|
+
}), G = De({
|
|
107
|
+
canEditAnyProfile: dt,
|
|
108
|
+
canEditOrgProfile: ft,
|
|
109
|
+
organizationId: v,
|
|
110
|
+
currentUserId: y,
|
|
111
|
+
canEditRole: Pt,
|
|
112
|
+
canReadDirectory: x,
|
|
113
|
+
canManageAccountAccess: D,
|
|
114
|
+
canReadInternalAccounts: T,
|
|
115
|
+
canReadExternalAccounts: E,
|
|
116
|
+
members: B,
|
|
117
|
+
roles: H,
|
|
118
|
+
allRoles: Dt,
|
|
119
|
+
roleCatalog: U,
|
|
120
|
+
featureLabels: g
|
|
121
|
+
}), K = Oe({
|
|
122
|
+
canDeactivate: mt,
|
|
123
|
+
canResendInvite: ut,
|
|
124
|
+
members: B,
|
|
125
|
+
featureLabels: g,
|
|
126
|
+
acceptInviteRedirectUri: m
|
|
127
|
+
}), Ft = L.data?.nextPaginationToken, It = L.data?.prevPaginationToken, q = P ? B.find((e) => e.id === P) : void 0, J = fe({ enabled: !!q && x }), Lt = J.data?.data ?? B, Y = q ? he(Lt, q.reportingManagerUserId) : void 0, Rt = c(() => q && J.isComplete ? _e(J.data?.data ?? [], q.id, g, U, v) : [], [
|
|
128
|
+
q,
|
|
129
|
+
J.isComplete,
|
|
130
|
+
J.data?.data,
|
|
131
|
+
g,
|
|
132
|
+
U,
|
|
133
|
+
v
|
|
134
|
+
]), zt = !!L.data, X = zt && !!P && !q;
|
|
134
135
|
s(() => {
|
|
135
|
-
|
|
136
|
-
}, [
|
|
137
|
-
let
|
|
136
|
+
X && F(void 0);
|
|
137
|
+
}, [X]);
|
|
138
|
+
let Bt = L.isError;
|
|
138
139
|
s(() => {
|
|
139
|
-
|
|
140
|
-
}, [
|
|
141
|
-
let
|
|
142
|
-
member:
|
|
143
|
-
organizationId:
|
|
144
|
-
canEditAnyProfile:
|
|
145
|
-
canEditOrgProfile:
|
|
146
|
-
currentUserId:
|
|
147
|
-
})),
|
|
148
|
-
member:
|
|
149
|
-
organizationId:
|
|
150
|
-
canEditRole:
|
|
151
|
-
currentUserId:
|
|
152
|
-
})),
|
|
153
|
-
selectedMember:
|
|
154
|
-
canReadInternalAccounts:
|
|
155
|
-
canReadExternalAccounts:
|
|
156
|
-
featureLabels:
|
|
157
|
-
allRoles:
|
|
158
|
-
}), $ = c(() =>
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
140
|
+
Bt && (j(void 0), N(0));
|
|
141
|
+
}, [Bt]);
|
|
142
|
+
let Vt = At.length, Ht = Vt === 0 ? 0 : xt * M + 1, Ut = xt * M + Vt, Wt = `${g.viewingRangeLabel} ${Ht}-${Ut}`, Z = me(q), Gt = !!(q && Te({
|
|
143
|
+
member: q,
|
|
144
|
+
organizationId: v,
|
|
145
|
+
canEditAnyProfile: dt,
|
|
146
|
+
canEditOrgProfile: ft,
|
|
147
|
+
currentUserId: y
|
|
148
|
+
})), Kt = !!(q && Ee({
|
|
149
|
+
member: q,
|
|
150
|
+
organizationId: v,
|
|
151
|
+
canEditRole: Pt,
|
|
152
|
+
currentUserId: y
|
|
153
|
+
})), qt = D && !!q && q?.id !== y, Jt = Gt || Kt || qt, Q = we({
|
|
154
|
+
selectedMember: q && Z ? q : void 0,
|
|
155
|
+
canReadInternalAccounts: T,
|
|
156
|
+
canReadExternalAccounts: E,
|
|
157
|
+
featureLabels: g,
|
|
158
|
+
allRoles: Dt
|
|
159
|
+
}), $ = c(() => q ? be(q, g, U, v) : void 0, [
|
|
160
|
+
q,
|
|
161
|
+
g,
|
|
162
|
+
U,
|
|
163
|
+
v
|
|
163
164
|
]);
|
|
164
165
|
return /* @__PURE__ */ f(u, { children: [
|
|
165
166
|
/* @__PURE__ */ d(re, {}),
|
|
166
|
-
|
|
167
|
-
open:
|
|
168
|
-
memberName:
|
|
169
|
-
memberEmail:
|
|
167
|
+
G.isEditOpen ? /* @__PURE__ */ d(Ae, {
|
|
168
|
+
open: G.isEditOpen,
|
|
169
|
+
memberName: G.editMemberName,
|
|
170
|
+
memberEmail: G.editMemberEmail,
|
|
170
171
|
memberInitials: $?.initials,
|
|
171
|
-
avatarSeed:
|
|
172
|
+
avatarSeed: q?.email,
|
|
172
173
|
roleBadgeLabel: $?.roleCardTitle,
|
|
173
174
|
statusLabel: $?.statusLabel,
|
|
174
175
|
statusTone: $?.statusTone,
|
|
175
176
|
lastSignInLabel: $?.lastSignInLabel,
|
|
176
|
-
form:
|
|
177
|
-
roleOptions: K.roleOptions,
|
|
178
|
-
departmentOptions: K.departmentOptions,
|
|
179
|
-
locationOptions: K.locationOptions,
|
|
180
|
-
reportingManagerOptions: K.reportingManagerOptions,
|
|
181
|
-
departmentsLoading: K.departmentsLoading,
|
|
182
|
-
locationsLoading: K.locationsLoading,
|
|
183
|
-
reportingManagersLoading: K.reportingManagersLoading,
|
|
184
|
-
departmentsError: K.departmentsError,
|
|
185
|
-
locationsError: K.locationsError,
|
|
186
|
-
reportingManagersError: K.reportingManagersError,
|
|
187
|
-
errors: K.editErrors,
|
|
188
|
-
submitErrorMessage: K.editErrorMessage,
|
|
189
|
-
isSubmitting: K.isSavingEdit,
|
|
190
|
-
isNameDisabled: K.isEditNameDisabled,
|
|
191
|
-
isRoleDisabled: K.isEditRoleDisabled,
|
|
192
|
-
isGroupDisabled: K.isEditGroupDisabled,
|
|
193
|
-
isReportingManagerDisabled: K.isEditReportingManagerDisabled,
|
|
194
|
-
isSaveDisabled: K.isEditSaveDisabled,
|
|
195
|
-
accountAccessMode: K.accountAccessMode,
|
|
196
|
-
accountAccessRows: K.accountAccessRows,
|
|
197
|
-
onAccountAccessToggle: K.onAccountAccessToggle,
|
|
198
|
-
isAccountAccessLoading: K.isAccountAccessLoading,
|
|
199
|
-
accountAccessErrorMessage: K.accountAccessErrorMessage,
|
|
200
|
-
onOpenChange: K.onEditOpenChange,
|
|
201
|
-
onFormChange: K.onEditFormChange,
|
|
202
|
-
onSubmit: K.onEditSubmit,
|
|
203
|
-
labels: i
|
|
204
|
-
}) : J ? /* @__PURE__ */ d(Pe, {
|
|
205
|
-
...be(J, m, W, g),
|
|
206
|
-
avatarSeed: J.email,
|
|
207
|
-
reportingManagerName: X?.name,
|
|
208
|
-
reportingManagerInitials: X?.initials,
|
|
209
|
-
reportingManagerSeed: X?.email,
|
|
210
|
-
directReports: It,
|
|
211
|
-
accountAccessLabel: Q.detailAccountAccessLabel,
|
|
212
|
-
accountAccessRows: Q.detailAccounts,
|
|
213
|
-
isAccountAccessLoading: Q.detailAccountsLoading,
|
|
214
|
-
isRoleLoading: S && B.isResolving,
|
|
215
|
-
onBackClick: () => {
|
|
216
|
-
St(F), I(void 0);
|
|
217
|
-
},
|
|
218
|
-
onEditClick: qt && Z ? () => K.openMemberEdit(J.id) : void 0,
|
|
219
|
-
onResendClick: T && (J.status ?? "").trim().toUpperCase() === "INVITED" ? () => q.openResendConfirmation(J.id) : void 0,
|
|
220
|
-
onDeactivateClick: ft && Z && at && J.id !== _ ? () => q.openDeactivateConfirmation(J.id) : void 0,
|
|
221
|
-
labels: i
|
|
222
|
-
}) : G.isInviteOpen ? /* @__PURE__ */ d(ke, {
|
|
223
|
-
form: G.inviteForm,
|
|
177
|
+
form: G.editForm,
|
|
224
178
|
roleOptions: G.roleOptions,
|
|
225
179
|
departmentOptions: G.departmentOptions,
|
|
226
180
|
locationOptions: G.locationOptions,
|
|
227
181
|
reportingManagerOptions: G.reportingManagerOptions,
|
|
228
|
-
accountAccessOptions: G.accountAccessOptions,
|
|
229
182
|
departmentsLoading: G.departmentsLoading,
|
|
230
183
|
locationsLoading: G.locationsLoading,
|
|
231
184
|
reportingManagersLoading: G.reportingManagersLoading,
|
|
232
185
|
departmentsError: G.departmentsError,
|
|
233
186
|
locationsError: G.locationsError,
|
|
234
187
|
reportingManagersError: G.reportingManagersError,
|
|
235
|
-
|
|
236
|
-
|
|
188
|
+
errors: G.editErrors,
|
|
189
|
+
submitErrorMessage: G.editErrorMessage,
|
|
190
|
+
isSubmitting: G.isSavingEdit,
|
|
191
|
+
isNameDisabled: G.isEditNameDisabled,
|
|
192
|
+
isRoleDisabled: G.isEditRoleDisabled,
|
|
193
|
+
isGroupDisabled: G.isEditGroupDisabled,
|
|
194
|
+
isReportingManagerDisabled: G.isEditReportingManagerDisabled,
|
|
195
|
+
isSaveDisabled: G.isEditSaveDisabled,
|
|
237
196
|
accountAccessMode: G.accountAccessMode,
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
197
|
+
accountAccessRows: G.accountAccessRows,
|
|
198
|
+
onAccountAccessToggle: G.onAccountAccessToggle,
|
|
199
|
+
isAccountAccessLoading: G.isAccountAccessLoading,
|
|
200
|
+
accountAccessErrorMessage: G.accountAccessErrorMessage,
|
|
201
|
+
onOpenChange: G.onEditOpenChange,
|
|
202
|
+
onFormChange: G.onEditFormChange,
|
|
203
|
+
onSubmit: G.onEditSubmit,
|
|
204
|
+
labels: i
|
|
205
|
+
}) : q ? /* @__PURE__ */ d(Pe, {
|
|
206
|
+
...be(q, g, U, v),
|
|
207
|
+
avatarSeed: q.email,
|
|
208
|
+
reportingManagerName: Y?.name,
|
|
209
|
+
reportingManagerInitials: Y?.initials,
|
|
210
|
+
reportingManagerSeed: Y?.email,
|
|
211
|
+
directReports: Rt,
|
|
212
|
+
accountAccessLabel: Q.detailAccountAccessLabel,
|
|
213
|
+
accountAccessRows: Q.detailAccounts,
|
|
214
|
+
isAccountAccessLoading: Q.detailAccountsLoading,
|
|
215
|
+
isRoleLoading: w && z.isResolving,
|
|
216
|
+
onBackClick: () => {
|
|
217
|
+
wt(P), F(void 0);
|
|
218
|
+
},
|
|
219
|
+
onEditClick: Jt && Z ? () => G.openMemberEdit(q.id) : void 0,
|
|
220
|
+
onResendClick: ut && (q.status ?? "").trim().toUpperCase() === "INVITED" ? () => K.openResendConfirmation(q.id) : void 0,
|
|
221
|
+
onDeactivateClick: mt && Z && it && q.id !== y ? () => K.openDeactivateConfirmation(q.id) : void 0,
|
|
222
|
+
labels: i
|
|
223
|
+
}) : W.isInviteOpen ? /* @__PURE__ */ d(ke, {
|
|
224
|
+
form: W.inviteForm,
|
|
225
|
+
roleOptions: W.roleOptions,
|
|
226
|
+
departmentOptions: W.departmentOptions,
|
|
227
|
+
locationOptions: W.locationOptions,
|
|
228
|
+
reportingManagerOptions: W.reportingManagerOptions,
|
|
229
|
+
accountAccessOptions: W.accountAccessOptions,
|
|
230
|
+
departmentsLoading: W.departmentsLoading,
|
|
231
|
+
locationsLoading: W.locationsLoading,
|
|
232
|
+
reportingManagersLoading: W.reportingManagersLoading,
|
|
233
|
+
departmentsError: W.departmentsError,
|
|
234
|
+
locationsError: W.locationsError,
|
|
235
|
+
reportingManagersError: W.reportingManagersError,
|
|
236
|
+
accountAccessLoading: W.accountAccessLoading,
|
|
237
|
+
accountAccessError: W.accountAccessError,
|
|
238
|
+
accountAccessMode: W.accountAccessMode,
|
|
239
|
+
errors: W.inviteErrors,
|
|
240
|
+
submitErrorMessage: W.inviteErrorMessage,
|
|
241
|
+
isSubmitting: W.isInviting,
|
|
242
|
+
isSubmitBlocked: W.isInviteSubmitBlocked,
|
|
243
|
+
onFormChange: W.onInviteFormChange,
|
|
244
|
+
onBackClick: W.closeInviteForm,
|
|
245
|
+
onCancel: W.closeInviteForm,
|
|
246
|
+
onSubmit: W.onInviteSubmit,
|
|
246
247
|
labels: i
|
|
247
248
|
}) : /* @__PURE__ */ d("div", {
|
|
248
249
|
className: "ttw:space-y-4 ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:p-6",
|
|
249
250
|
children: /* @__PURE__ */ d(Fe, {
|
|
250
|
-
tabs:
|
|
251
|
-
activeTabId:
|
|
252
|
-
onTabChange:
|
|
253
|
-
children:
|
|
251
|
+
tabs: vt,
|
|
252
|
+
activeTabId: O,
|
|
253
|
+
onTabChange: _t,
|
|
254
|
+
children: O === "departments" ? /* @__PURE__ */ f(u, { children: [
|
|
254
255
|
/* @__PURE__ */ d(Me, {
|
|
255
256
|
icon: /* @__PURE__ */ d(Le, { className: "ttw:size-4" }),
|
|
256
|
-
...
|
|
257
|
+
...k.panel
|
|
257
258
|
}),
|
|
258
|
-
/* @__PURE__ */ d(je, { ...
|
|
259
|
+
/* @__PURE__ */ d(je, { ...k.drawer }),
|
|
259
260
|
/* @__PURE__ */ d(o, {
|
|
260
|
-
open:
|
|
261
|
+
open: k.deleteDialog.open,
|
|
261
262
|
icon: /* @__PURE__ */ d(Be, {
|
|
262
263
|
"aria-hidden": !0,
|
|
263
264
|
className: "ttw:size-6"
|
|
264
265
|
}),
|
|
265
|
-
title:
|
|
266
|
-
description:
|
|
267
|
-
subjectName:
|
|
268
|
-
confirmButtonLabel:
|
|
269
|
-
errorMessage:
|
|
270
|
-
isConfirming:
|
|
271
|
-
onOpenChange:
|
|
272
|
-
onConfirm:
|
|
266
|
+
title: g.departmentDeleteDialogTitle,
|
|
267
|
+
description: g.departmentDeleteDialogDescription,
|
|
268
|
+
subjectName: k.deleteDialog.subjectName,
|
|
269
|
+
confirmButtonLabel: g.departmentDeleteConfirmButton,
|
|
270
|
+
errorMessage: k.deleteDialog.errorMessage,
|
|
271
|
+
isConfirming: k.deleteDialog.isConfirming,
|
|
272
|
+
onOpenChange: k.deleteDialog.onOpenChange,
|
|
273
|
+
onConfirm: k.deleteDialog.onConfirm,
|
|
273
274
|
labels: i
|
|
274
275
|
})
|
|
275
|
-
] }) :
|
|
276
|
+
] }) : O === "locations" ? /* @__PURE__ */ f(u, { children: [
|
|
276
277
|
/* @__PURE__ */ d(Me, {
|
|
277
278
|
icon: /* @__PURE__ */ d(ze, { className: "ttw:size-4" }),
|
|
278
|
-
...
|
|
279
|
+
...A.panel
|
|
279
280
|
}),
|
|
280
|
-
/* @__PURE__ */ d(je, { ...
|
|
281
|
+
/* @__PURE__ */ d(je, { ...A.drawer }),
|
|
281
282
|
/* @__PURE__ */ d(o, {
|
|
282
|
-
open:
|
|
283
|
+
open: A.deleteDialog.open,
|
|
283
284
|
icon: /* @__PURE__ */ d(Be, {
|
|
284
285
|
"aria-hidden": !0,
|
|
285
286
|
className: "ttw:size-6"
|
|
286
287
|
}),
|
|
287
|
-
title:
|
|
288
|
-
description:
|
|
289
|
-
subjectName:
|
|
290
|
-
confirmButtonLabel:
|
|
291
|
-
errorMessage:
|
|
292
|
-
isConfirming:
|
|
293
|
-
onOpenChange:
|
|
294
|
-
onConfirm:
|
|
288
|
+
title: g.locationDeleteDialogTitle,
|
|
289
|
+
description: g.locationDeleteDialogDescription,
|
|
290
|
+
subjectName: A.deleteDialog.subjectName,
|
|
291
|
+
confirmButtonLabel: g.locationDeleteConfirmButton,
|
|
292
|
+
errorMessage: A.deleteDialog.errorMessage,
|
|
293
|
+
isConfirming: A.deleteDialog.isConfirming,
|
|
294
|
+
onOpenChange: A.deleteDialog.onOpenChange,
|
|
295
|
+
onConfirm: A.deleteDialog.onConfirm,
|
|
295
296
|
labels: i
|
|
296
297
|
})
|
|
297
298
|
] }) : /* @__PURE__ */ d(Ne, {
|
|
298
|
-
rows:
|
|
299
|
-
isLoading: !
|
|
300
|
-
isError:
|
|
301
|
-
showPagination:
|
|
302
|
-
isPreviousPageDisabled: !
|
|
303
|
-
isNextPageDisabled: !
|
|
304
|
-
pageSize:
|
|
299
|
+
rows: At,
|
|
300
|
+
isLoading: !ot && (ee(rt) && !L.data || at && !_ || S && L.isLoading),
|
|
301
|
+
isError: ot || S && L.isError,
|
|
302
|
+
showPagination: S && zt && !L.isError,
|
|
303
|
+
isPreviousPageDisabled: !It,
|
|
304
|
+
isNextPageDisabled: !Ft,
|
|
305
|
+
pageSize: M,
|
|
305
306
|
pageSizeOptions: Ve,
|
|
306
|
-
rangeLabel:
|
|
307
|
+
rangeLabel: Wt,
|
|
307
308
|
onPageSizeChange: (e) => {
|
|
308
|
-
|
|
309
|
+
bt(e), j(void 0), N(0);
|
|
309
310
|
},
|
|
310
|
-
autoFocusRowKey:
|
|
311
|
+
autoFocusRowKey: Ct,
|
|
311
312
|
onPreviousPageClick: () => {
|
|
312
|
-
|
|
313
|
+
j(It ?? void 0), N((e) => Math.max(0, e - 1));
|
|
313
314
|
},
|
|
314
315
|
onNextPageClick: () => {
|
|
315
|
-
|
|
316
|
+
j(Ft ?? void 0), N((e) => e + 1);
|
|
316
317
|
},
|
|
317
|
-
onInviteClick:
|
|
318
|
+
onInviteClick: Nt ? W.openInviteForm : void 0,
|
|
318
319
|
labels: i
|
|
319
320
|
})
|
|
320
321
|
})
|
|
321
322
|
}),
|
|
322
323
|
/* @__PURE__ */ d(o, {
|
|
323
|
-
open:
|
|
324
|
+
open: K.isDeactivateOpen,
|
|
324
325
|
icon: /* @__PURE__ */ d(Ie, {
|
|
325
326
|
"aria-hidden": !0,
|
|
326
327
|
className: "ttw:size-6"
|
|
327
328
|
}),
|
|
328
|
-
title:
|
|
329
|
-
description:
|
|
330
|
-
subjectName:
|
|
331
|
-
subjectDetail:
|
|
332
|
-
confirmButtonLabel:
|
|
333
|
-
errorMessage:
|
|
334
|
-
isConfirming:
|
|
335
|
-
onOpenChange:
|
|
336
|
-
onConfirm:
|
|
329
|
+
title: g.deactivateDialogTitle,
|
|
330
|
+
description: g.deactivateDialogDescription,
|
|
331
|
+
subjectName: K.deactivateMemberName,
|
|
332
|
+
subjectDetail: K.deactivateMemberEmail,
|
|
333
|
+
confirmButtonLabel: g.deactivateConfirmButton,
|
|
334
|
+
errorMessage: K.deactivateErrorMessage,
|
|
335
|
+
isConfirming: K.isDeactivating,
|
|
336
|
+
onOpenChange: K.onDeactivateOpenChange,
|
|
337
|
+
onConfirm: K.onDeactivateConfirm,
|
|
337
338
|
labels: i
|
|
338
339
|
}),
|
|
339
340
|
/* @__PURE__ */ d(o, {
|
|
340
|
-
open:
|
|
341
|
+
open: K.isResendOpen,
|
|
341
342
|
icon: /* @__PURE__ */ d(Re, {
|
|
342
343
|
"aria-hidden": !0,
|
|
343
344
|
className: "ttw:size-6"
|
|
344
345
|
}),
|
|
345
|
-
title:
|
|
346
|
-
description:
|
|
347
|
-
subjectName:
|
|
348
|
-
subjectDetail:
|
|
349
|
-
confirmButtonLabel:
|
|
346
|
+
title: g.resendDialogTitle,
|
|
347
|
+
description: g.resendDialogDescription,
|
|
348
|
+
subjectName: K.resendMemberName,
|
|
349
|
+
subjectDetail: K.resendMemberEmail,
|
|
350
|
+
confirmButtonLabel: g.resendConfirmButton,
|
|
350
351
|
confirmVariant: "default",
|
|
351
|
-
errorMessage:
|
|
352
|
-
isConfirming:
|
|
353
|
-
onOpenChange:
|
|
354
|
-
onConfirm:
|
|
352
|
+
errorMessage: K.resendErrorMessage,
|
|
353
|
+
isConfirming: K.isResending,
|
|
354
|
+
onOpenChange: K.onResendOpenChange,
|
|
355
|
+
onConfirm: K.onResendConfirm,
|
|
355
356
|
labels: i
|
|
356
357
|
})
|
|
357
358
|
] });
|
|
358
359
|
}
|
|
359
|
-
function
|
|
360
|
+
function h({ baseUrl: e, widgetToken: ee, organizationId: te, configClient: t, gatewayRouting: n, linkComponent: ne, uiFramework: re, errorFallback: r, onError: ie, analytics: ae, disclosuresAcceptance: oe, providerLabels: se, ...ce }) {
|
|
360
361
|
return /* @__PURE__ */ d(i, {
|
|
361
362
|
widgetName: a,
|
|
362
363
|
baseUrl: e,
|
|
@@ -371,7 +372,7 @@ function m({ baseUrl: e, widgetToken: ee, organizationId: te, configClient: t, g
|
|
|
371
372
|
analytics: ae,
|
|
372
373
|
disclosuresAcceptance: oe,
|
|
373
374
|
providerLabels: se,
|
|
374
|
-
children: /* @__PURE__ */ d(
|
|
375
|
+
children: /* @__PURE__ */ d(m, { ...ce })
|
|
375
376
|
});
|
|
376
377
|
}
|
|
377
|
-
export {
|
|
378
|
+
export { h as TeamWidget, h as default };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.11.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.11.35", n = "87bc768e53b0eb0bddfcf93a788d2a1242276071", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|