@tesouro/embedded-components-react 0.5.153 → 0.5.155
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 +21 -19
- package/dist/index.css +0 -3
- package/dist/index.d.ts +106 -94
- package/dist/index.js +15 -15
- package/dist/lib/CreditCardsWidget.d.ts +6 -0
- package/dist/lib/DebitCardsWidget.d.ts +6 -0
- package/dist/lib/SettingsWidget.d.ts +0 -3
- package/dist/lib/WidgetSuite.d.ts +102 -9
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +45 -44
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index3.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index4.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +56 -64
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +34 -34
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +191 -231
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +91 -147
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index14.js +16 -10
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index16.js +19 -18
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index6.js +16 -15
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index9.js +15 -2
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index.js +0 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index10.js +0 -28
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index2.js +0 -27
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index3.js +0 -13
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index4.js +0 -34
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index5.js +0 -35
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index6.js +0 -33
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index7.js +0 -22
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index8.js +0 -25
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index9.js +0 -26
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index10.js +0 -62
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index11.js +0 -60
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index12.js +0 -107
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index2.js +0 -5
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index3.js +0 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index4.js +0 -14
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index5.js +0 -28
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index6.js +0 -99
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index7.js +0 -36
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index8.js +0 -80
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index9.js +0 -146
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index.js +0 -5
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index2.js +0 -41
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index3.js +0 -143
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index4.js +0 -36
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index5.js +0 -127
|
@@ -1113,7 +1113,7 @@ type BalancesWidgetPassthroughProps = Pick<BalancesWidgetWithContextProps, 'maxA
|
|
|
1113
1113
|
interface BalancesWidgetProps extends WidgetProviderProps, BalancesWidgetPassthroughProps {
|
|
1114
1114
|
}
|
|
1115
1115
|
|
|
1116
|
-
interface Labels$
|
|
1116
|
+
interface Labels$3 {
|
|
1117
1117
|
bankingTaglinePrefix: string;
|
|
1118
1118
|
availableBalanceLabel: string;
|
|
1119
1119
|
availableBalanceTooltip: string;
|
|
@@ -1151,7 +1151,7 @@ interface Labels$2 {
|
|
|
1151
1151
|
errorTitle: string;
|
|
1152
1152
|
}
|
|
1153
1153
|
|
|
1154
|
-
interface Labels$
|
|
1154
|
+
interface Labels$2 {
|
|
1155
1155
|
backToAccounts: string;
|
|
1156
1156
|
bankingTaglinePrefix: string;
|
|
1157
1157
|
availableBalanceLabel: string;
|
|
@@ -1214,7 +1214,7 @@ interface Labels$1 {
|
|
|
1214
1214
|
errorTitle: string;
|
|
1215
1215
|
}
|
|
1216
1216
|
|
|
1217
|
-
interface FeatureLabels$
|
|
1217
|
+
interface FeatureLabels$3 {
|
|
1218
1218
|
accountFallback: string;
|
|
1219
1219
|
createSuccessToast: string;
|
|
1220
1220
|
editSuccessToast: string;
|
|
@@ -1231,9 +1231,9 @@ interface FeatureLabels$2 {
|
|
|
1231
1231
|
}
|
|
1232
1232
|
|
|
1233
1233
|
interface BankAccountsWidgetProps extends WidgetProviderProps {
|
|
1234
|
-
labels?: Partial<Labels$
|
|
1235
|
-
accountDetailsLabels?: Partial<Labels$
|
|
1236
|
-
featureLabels?: Partial<FeatureLabels$
|
|
1234
|
+
labels?: Partial<Labels$3>;
|
|
1235
|
+
accountDetailsLabels?: Partial<Labels$2>;
|
|
1236
|
+
featureLabels?: Partial<FeatureLabels$3>;
|
|
1237
1237
|
isBankingTaglineVisible?: boolean;
|
|
1238
1238
|
/**
|
|
1239
1239
|
* Bank logo for the tagline row. The widget ships no bank artwork of its own —
|
|
@@ -1990,6 +1990,12 @@ interface CardsWidgetProps extends WidgetProviderProps {
|
|
|
1990
1990
|
* does nothing.
|
|
1991
1991
|
*/
|
|
1992
1992
|
onCreateCard?: () => void;
|
|
1993
|
+
/**
|
|
1994
|
+
* Your own markup for the start of the list's header row, beside Create card,
|
|
1995
|
+
* typically the heading you would otherwise render above the widget. The
|
|
1996
|
+
* widget renders no heading of its own, so you pick the element and level.
|
|
1997
|
+
*/
|
|
1998
|
+
headerStart?: ReactNode;
|
|
1993
1999
|
/**
|
|
1994
2000
|
* Called with the card's id when a row's Activate button is clicked. The button
|
|
1995
2001
|
* renders only on cards in `PENDING_ACTIVATION`, and only when the widget token
|
|
@@ -2113,6 +2119,87 @@ type InsightsWidgetPassthroughProps = Pick<InsightsWidgetWithContextProps, 'labe
|
|
|
2113
2119
|
interface InsightsWidgetProps extends WidgetProviderProps, InsightsWidgetPassthroughProps {
|
|
2114
2120
|
}
|
|
2115
2121
|
|
|
2122
|
+
interface Labels$1 {
|
|
2123
|
+
title: string;
|
|
2124
|
+
connectButton: string;
|
|
2125
|
+
verifyCtaButton: string;
|
|
2126
|
+
learnMoreButton: string;
|
|
2127
|
+
connectTitle: string;
|
|
2128
|
+
nicknameLabel: string;
|
|
2129
|
+
accountNumberLabel: string;
|
|
2130
|
+
routingNumberLabel: string;
|
|
2131
|
+
routingNumberError: string;
|
|
2132
|
+
typeLabel: string;
|
|
2133
|
+
accountTypePlaceholder: string;
|
|
2134
|
+
checkingOption: string;
|
|
2135
|
+
savingsOption: string;
|
|
2136
|
+
cancelButton: string;
|
|
2137
|
+
nextButton: string;
|
|
2138
|
+
backButton: string;
|
|
2139
|
+
/** Step indicator template, e.g. "Step {current}/{total}". */
|
|
2140
|
+
stepIndicator: string;
|
|
2141
|
+
connectStep1Heading: string;
|
|
2142
|
+
connectStep1Description: string;
|
|
2143
|
+
connectStep2Heading: string;
|
|
2144
|
+
connectStep2Description: string;
|
|
2145
|
+
teamMemberAccessTooltip: string;
|
|
2146
|
+
teamMembersLoadingLabel: string;
|
|
2147
|
+
teamMembersErrorTitle: string;
|
|
2148
|
+
teamMembersEmptyLabel: string;
|
|
2149
|
+
summaryCompletedHeading: string;
|
|
2150
|
+
summaryNextStepsHeading: string;
|
|
2151
|
+
summaryAccountPrefix: string;
|
|
2152
|
+
summaryStep1Title: string;
|
|
2153
|
+
summaryStep1Description: string;
|
|
2154
|
+
summaryStep2Title: string;
|
|
2155
|
+
summaryStep2Description: string;
|
|
2156
|
+
summaryStep3Title: string;
|
|
2157
|
+
summaryStep3Description: string;
|
|
2158
|
+
summaryStep4Title: string;
|
|
2159
|
+
summaryStep4Description: string;
|
|
2160
|
+
statusComplete: string;
|
|
2161
|
+
statusTodo: string;
|
|
2162
|
+
backToTransfersButton: string;
|
|
2163
|
+
saveButton: string;
|
|
2164
|
+
editButton: string;
|
|
2165
|
+
verifyButton: string;
|
|
2166
|
+
unlinkButton: string;
|
|
2167
|
+
linkButton: string;
|
|
2168
|
+
editTitle: string;
|
|
2169
|
+
verifyTitle: string;
|
|
2170
|
+
verifyDescription: string;
|
|
2171
|
+
verifySectionHeading: string;
|
|
2172
|
+
verifyExampleLabel: string;
|
|
2173
|
+
verifyExampleText: string;
|
|
2174
|
+
verifyAccountInProcess: string;
|
|
2175
|
+
verifySuccessTitle: string;
|
|
2176
|
+
verifySuccessDescription: string;
|
|
2177
|
+
unlinkTitle: string;
|
|
2178
|
+
unlinkDescription: string;
|
|
2179
|
+
unlinkConfirmButton: string;
|
|
2180
|
+
firstAmountLabel: string;
|
|
2181
|
+
secondAmountLabel: string;
|
|
2182
|
+
verifyAmountError: string;
|
|
2183
|
+
loadingLabel: string;
|
|
2184
|
+
errorTitle: string;
|
|
2185
|
+
actionErrorTitle: string;
|
|
2186
|
+
emptyTitle: string;
|
|
2187
|
+
emptyDescription: string;
|
|
2188
|
+
}
|
|
2189
|
+
|
|
2190
|
+
interface FeatureLabels$2 {
|
|
2191
|
+
accountFallback: string;
|
|
2192
|
+
accountLabel: string;
|
|
2193
|
+
pendingStatus: string;
|
|
2194
|
+
editSuccessToast: string;
|
|
2195
|
+
unlinkSuccessToast: string;
|
|
2196
|
+
}
|
|
2197
|
+
|
|
2198
|
+
interface LinkedAccountsWidgetProps extends WidgetProviderProps {
|
|
2199
|
+
labels?: Partial<Labels$1>;
|
|
2200
|
+
featureLabels?: Partial<FeatureLabels$2>;
|
|
2201
|
+
}
|
|
2202
|
+
|
|
2116
2203
|
interface Labels {
|
|
2117
2204
|
description?: string;
|
|
2118
2205
|
}
|
|
@@ -2173,7 +2260,6 @@ interface FeatureLabels$1 {
|
|
|
2173
2260
|
billPaySection: string;
|
|
2174
2261
|
billPayDescription: string;
|
|
2175
2262
|
accountingSection: string;
|
|
2176
|
-
tagsSection: string;
|
|
2177
2263
|
expenseSection: string;
|
|
2178
2264
|
legalSection: string;
|
|
2179
2265
|
helpSection: string;
|
|
@@ -2193,7 +2279,6 @@ declare const SettingsSection: {
|
|
|
2193
2279
|
readonly Expense: "expense";
|
|
2194
2280
|
readonly BillPay: "bill-pay";
|
|
2195
2281
|
readonly Accounting: "accounting";
|
|
2196
|
-
readonly Tags: "tags";
|
|
2197
2282
|
readonly Legal: "legal";
|
|
2198
2283
|
readonly Help: "help";
|
|
2199
2284
|
};
|
|
@@ -2271,7 +2356,6 @@ interface SettingsWidgetProps extends MoniteRegionProviderProps {
|
|
|
2271
2356
|
helpContent?: ReactNode;
|
|
2272
2357
|
expenseContent?: ReactNode;
|
|
2273
2358
|
accountingContent?: ReactNode;
|
|
2274
|
-
tagsContent?: ReactNode;
|
|
2275
2359
|
invoiceContent?: ReactNode;
|
|
2276
2360
|
legalContent?: ReactNode;
|
|
2277
2361
|
}
|
|
@@ -2524,6 +2608,7 @@ type WidgetSuiteOnboardingLabels = WidgetLabelProps<BankAccountOnboardingWidgetP
|
|
|
2524
2608
|
type WidgetSuiteCreditCardsLabels = WidgetLabelProps<CreditCardsWidgetProps>;
|
|
2525
2609
|
type WidgetSuiteDebitCardsLabels = WidgetLabelProps<DebitCardsWidgetProps>;
|
|
2526
2610
|
type WidgetSuiteTransfersLabels = WidgetLabelProps<TransfersWidgetProps>;
|
|
2611
|
+
type WidgetSuiteLinkedAccountsLabels = WidgetLabelProps<LinkedAccountsWidgetProps>;
|
|
2527
2612
|
type WidgetSuiteSettingsLabels = WidgetLabelProps<SettingsWidgetProps>;
|
|
2528
2613
|
/** The two widgets the Dashboard section pairs, each taking its own copy. */
|
|
2529
2614
|
interface WidgetSuiteDashboardLabels {
|
|
@@ -2565,6 +2650,7 @@ interface WidgetSuiteSectionContentLabels {
|
|
|
2565
2650
|
accounts?: WidgetSuiteAccountsLabels;
|
|
2566
2651
|
cards: WidgetSuiteCardsLabels;
|
|
2567
2652
|
transfers?: WidgetSuiteTransfersLabels;
|
|
2653
|
+
linkedAccounts?: WidgetSuiteLinkedAccountsLabels;
|
|
2568
2654
|
expenses: WidgetSuiteExpensesLabels;
|
|
2569
2655
|
settings?: WidgetSuiteSettingsLabels;
|
|
2570
2656
|
}
|
|
@@ -2690,6 +2776,13 @@ interface WidgetSuiteProps extends WidgetProviderProps {
|
|
|
2690
2776
|
* plain (non-clickable) text in that step, same as the widget's own default.
|
|
2691
2777
|
*/
|
|
2692
2778
|
onboardingDisclosureLinks?: DisclosureLinks;
|
|
2779
|
+
/**
|
|
2780
|
+
* Card artwork URL for the debit list's built-in Create card sheet. Host-resolved
|
|
2781
|
+
* for the same reason as `onboardingDisclosureLinks`: the package ships no
|
|
2782
|
+
* artwork. Omitted, Create card stays hidden. Credit has no in-package issuance
|
|
2783
|
+
* flow, so its Create card stays hidden either way.
|
|
2784
|
+
*/
|
|
2785
|
+
cardArtSrc?: string;
|
|
2693
2786
|
}
|
|
2694
2787
|
/**
|
|
2695
2788
|
* A suite of widgets bound together by navigation.
|
|
@@ -18,7 +18,7 @@ import "../../create-card/feature/dist/index.js";
|
|
|
18
18
|
import { useCallback as u, useMemo as d, useState as f } from "react";
|
|
19
19
|
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
20
20
|
//#region ../../libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js
|
|
21
|
-
function g({ cardProgram: e, pagination: t, defaultPagination: g, onPaginationChange: _, labels: v, featureLabels: y, selectedCardId: b, defaultSelectedCardId: x, onSelectedCardIdChange: S, cardDetailsLabels: C, cardDetailsFeatureLabels: w, cardDetailsActivateLabels: T, bankLogoSrc: E, bankLogoAlt: D, cardArtSrc: O, createCardLabels: k, createCardFeatureLabels: A, onCreateCard: j, onActivateCard: M }) {
|
|
21
|
+
function g({ cardProgram: e, pagination: t, defaultPagination: g, onPaginationChange: _, labels: v, featureLabels: y, selectedCardId: b, defaultSelectedCardId: x, onSelectedCardIdChange: S, cardDetailsLabels: C, cardDetailsFeatureLabels: w, cardDetailsActivateLabels: T, bankLogoSrc: E, bankLogoAlt: D, cardArtSrc: O, createCardLabels: k, createCardFeatureLabels: A, onCreateCard: j, onActivateCard: M, headerStart: ee }) {
|
|
22
22
|
let { selectedCardId: N, onSelectCard: P, onCreateCardClick: F, canCreateCard: I, canReadCards: L, ...R } = s({
|
|
23
23
|
cardProgram: e,
|
|
24
24
|
pagination: t,
|
|
@@ -39,15 +39,16 @@ function g({ cardProgram: e, pagination: t, defaultPagination: g, onPaginationCh
|
|
|
39
39
|
V(!1), P(e);
|
|
40
40
|
}, [P]), Z = e === "debit" && !!O && !!I && F === void 0, Q = B && N === null && Z;
|
|
41
41
|
B && (N !== null || !Z) && V(!1), Q ? K !== "create" && q("create") : N !== null && (K !== "details" && q("details"), N !== W && G(N));
|
|
42
|
-
let $ = K === "create",
|
|
42
|
+
let $ = K === "create", te = N !== null || Q;
|
|
43
43
|
return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(a, {
|
|
44
44
|
...R,
|
|
45
45
|
canCreateCard: I,
|
|
46
46
|
onCreateCardClick: F ?? J,
|
|
47
|
+
headerStart: ee,
|
|
47
48
|
labels: z,
|
|
48
49
|
testIds: r
|
|
49
50
|
}), /* @__PURE__ */ m(o, {
|
|
50
|
-
isOpen:
|
|
51
|
+
isOpen: te,
|
|
51
52
|
labels: $ ? z.createSheet : z.detailsSheet,
|
|
52
53
|
contentClassName: $ ? "ttw:overflow-hidden ttw:p-0 ttw:min-h-0" : void 0,
|
|
53
54
|
onClose: Y,
|
package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js
CHANGED
|
@@ -24,33 +24,34 @@ function C({ columnCount: e }) {
|
|
|
24
24
|
children: Array.from({ length: e }).map((e, n) => /* @__PURE__ */ _(a, { children: /* @__PURE__ */ _(t, { className: "ttw:h-4 ttw:w-24" }) }, n))
|
|
25
25
|
}, r)) });
|
|
26
26
|
}
|
|
27
|
-
function w({ rows: t, columns: g, isLoading: S = !1, isError: w = !1, canToggleShowMyCards: T = !1, isShowingMyCards: E = !0, onShowMyCardsChange: D, canCreateCard: O = !1, onCreateCardClick: k,
|
|
28
|
-
let
|
|
29
|
-
onPageSizeChange:
|
|
30
|
-
onPreviousPageClick:
|
|
31
|
-
onNextPageClick:
|
|
32
|
-
} : void 0,
|
|
27
|
+
function w({ rows: t, columns: g, isLoading: S = !1, isError: w = !1, canToggleShowMyCards: T = !1, isShowingMyCards: E = !0, onShowMyCardsChange: D, canCreateCard: O = !1, onCreateCardClick: k, headerStart: A, onRetry: j, isPaginationVisible: M = !1, pageSize: N = 10, pageSizeOptions: P = x, rangeLabel: F = "", isPreviousPageDisabled: I = !1, isNextPageDisabled: L = !1, onPageSizeChange: R, onPreviousPageClick: z, onNextPageClick: B, labels: V, testIds: H }) {
|
|
28
|
+
let U = m(), W = h(() => f(V), [V]), G = !!(O && k), K = R && z && B ? {
|
|
29
|
+
onPageSizeChange: R,
|
|
30
|
+
onPreviousPageClick: z,
|
|
31
|
+
onNextPageClick: B
|
|
32
|
+
} : void 0, q = g.length + 1;
|
|
33
33
|
return /* @__PURE__ */ v("section", {
|
|
34
|
-
"aria-label":
|
|
34
|
+
"aria-label": W.regionLabel,
|
|
35
35
|
"aria-busy": S || void 0,
|
|
36
|
-
"data-testid":
|
|
36
|
+
"data-testid": H?.root,
|
|
37
37
|
children: [
|
|
38
|
-
|
|
39
|
-
className: "ttw:mb-5 ttw:flex ttw:
|
|
40
|
-
children: /* @__PURE__ */ v(e, {
|
|
38
|
+
(G || A) && /* @__PURE__ */ v("header", {
|
|
39
|
+
className: "ttw:mb-5 ttw:flex ttw:items-center ttw:gap-4",
|
|
40
|
+
children: [A, G && /* @__PURE__ */ v(e, {
|
|
41
41
|
size: "sm",
|
|
42
42
|
disabled: S,
|
|
43
43
|
onClick: k,
|
|
44
|
+
className: "ttw:ml-auto",
|
|
44
45
|
children: [/* @__PURE__ */ _(b, {
|
|
45
46
|
"aria-hidden": !0,
|
|
46
47
|
className: "ttw:size-4"
|
|
47
|
-
}),
|
|
48
|
-
})
|
|
48
|
+
}), W.createCardButton]
|
|
49
|
+
})]
|
|
49
50
|
}),
|
|
50
51
|
S && /* @__PURE__ */ _("span", {
|
|
51
52
|
role: "status",
|
|
52
53
|
className: "ttw:sr-only",
|
|
53
|
-
children:
|
|
54
|
+
children: W.loadingLabel
|
|
54
55
|
}),
|
|
55
56
|
T && D && /* @__PURE__ */ v("div", {
|
|
56
57
|
className: "ttw:mb-4 ttw:flex ttw:items-center ttw:gap-3",
|
|
@@ -58,11 +59,11 @@ function w({ rows: t, columns: g, isLoading: S = !1, isError: w = !1, canToggleS
|
|
|
58
59
|
checked: E,
|
|
59
60
|
disabled: S,
|
|
60
61
|
onCheckedChange: D,
|
|
61
|
-
"aria-labelledby":
|
|
62
|
+
"aria-labelledby": U
|
|
62
63
|
}), /* @__PURE__ */ _("span", {
|
|
63
|
-
id:
|
|
64
|
+
id: U,
|
|
64
65
|
className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
|
|
65
|
-
children:
|
|
66
|
+
children: W.showMyCardsToggle
|
|
66
67
|
})]
|
|
67
68
|
}),
|
|
68
69
|
/* @__PURE__ */ v("div", {
|
|
@@ -71,61 +72,61 @@ function w({ rows: t, columns: g, isLoading: S = !1, isError: w = !1, canToggleS
|
|
|
71
72
|
className: "ttw:hover:bg-transparent",
|
|
72
73
|
children: [g.map((e) => /* @__PURE__ */ _(o, {
|
|
73
74
|
className: "ttw:text-sm",
|
|
74
|
-
children:
|
|
75
|
+
children: W.columnHeaders[e]
|
|
75
76
|
}, e)), /* @__PURE__ */ _(o, {
|
|
76
77
|
className: "ttw:w-[90px]",
|
|
77
78
|
children: /* @__PURE__ */ _("span", {
|
|
78
79
|
className: "ttw:sr-only",
|
|
79
|
-
children:
|
|
80
|
+
children: W.rowActionsColumn
|
|
80
81
|
})
|
|
81
82
|
})]
|
|
82
83
|
}) }), /* @__PURE__ */ _(i, { children: w ? /* @__PURE__ */ _(c, {
|
|
83
84
|
className: "ttw:hover:bg-transparent",
|
|
84
85
|
children: /* @__PURE__ */ _(a, {
|
|
85
|
-
colSpan:
|
|
86
|
+
colSpan: q,
|
|
86
87
|
className: "ttw:p-0",
|
|
87
88
|
children: /* @__PURE__ */ _(u, {
|
|
88
|
-
title:
|
|
89
|
-
description:
|
|
90
|
-
retryLabel:
|
|
91
|
-
onRetry:
|
|
92
|
-
testId:
|
|
89
|
+
title: W.errorTitle,
|
|
90
|
+
description: W.errorDescription,
|
|
91
|
+
retryLabel: W.retryButton,
|
|
92
|
+
onRetry: j,
|
|
93
|
+
testId: H?.error
|
|
93
94
|
})
|
|
94
95
|
})
|
|
95
|
-
}) : S ? /* @__PURE__ */ _(C, { columnCount:
|
|
96
|
+
}) : S ? /* @__PURE__ */ _(C, { columnCount: q }) : t.length === 0 ? /* @__PURE__ */ _(c, {
|
|
96
97
|
className: "ttw:hover:bg-transparent",
|
|
97
98
|
children: /* @__PURE__ */ _(a, {
|
|
98
|
-
colSpan:
|
|
99
|
+
colSpan: q,
|
|
99
100
|
className: "ttw:p-0",
|
|
100
101
|
children: /* @__PURE__ */ _(l, {
|
|
101
102
|
icon: /* @__PURE__ */ _(y, { className: "ttw:size-6 ttw:text-muted-foreground" }),
|
|
102
|
-
title:
|
|
103
|
-
description:
|
|
104
|
-
actionLabel:
|
|
103
|
+
title: W.emptyTitle,
|
|
104
|
+
description: W.emptyDescription,
|
|
105
|
+
actionLabel: G ? W.createCardButton : void 0,
|
|
105
106
|
actionIcon: /* @__PURE__ */ _(b, {
|
|
106
107
|
"aria-hidden": !0,
|
|
107
108
|
className: "ttw:size-4"
|
|
108
109
|
}),
|
|
109
|
-
onAction:
|
|
110
|
-
testId:
|
|
110
|
+
onAction: G ? k : void 0,
|
|
111
|
+
testId: H?.empty
|
|
111
112
|
})
|
|
112
113
|
})
|
|
113
114
|
}) : t.map((e) => /* @__PURE__ */ _(p, {
|
|
114
|
-
testIds:
|
|
115
|
+
testIds: H?.row,
|
|
115
116
|
row: e,
|
|
116
117
|
columns: g,
|
|
117
|
-
labels:
|
|
118
|
-
}, e.key)) })] }),
|
|
119
|
-
pageSize:
|
|
120
|
-
pageSizeOptions:
|
|
121
|
-
rangeLabel:
|
|
122
|
-
isPreviousDisabled:
|
|
123
|
-
isNextDisabled:
|
|
118
|
+
labels: W
|
|
119
|
+
}, e.key)) })] }), M && K && /* @__PURE__ */ _(d, {
|
|
120
|
+
pageSize: N,
|
|
121
|
+
pageSizeOptions: P,
|
|
122
|
+
rangeLabel: F,
|
|
123
|
+
isPreviousDisabled: I,
|
|
124
|
+
isNextDisabled: L,
|
|
124
125
|
isDisabled: S,
|
|
125
|
-
onPageSizeChange:
|
|
126
|
-
onPreviousPageClick:
|
|
127
|
-
onNextPageClick:
|
|
128
|
-
labels:
|
|
126
|
+
onPageSizeChange: K.onPageSizeChange,
|
|
127
|
+
onPreviousPageClick: K.onPreviousPageClick,
|
|
128
|
+
onNextPageClick: K.onNextPageClick,
|
|
129
|
+
labels: W.pagination
|
|
129
130
|
})]
|
|
130
131
|
})
|
|
131
132
|
]
|
|
@@ -18,25 +18,23 @@ import { SettingsWidgetAnalyticsEvent as l, WIDGET_NAME as u } from "./index2.js
|
|
|
18
18
|
import { ExpenseSettingsTabs as d } from "./index5.js";
|
|
19
19
|
import { InvoiceSettings as f } from "../../invoice-settings/feature/dist/index10.js";
|
|
20
20
|
import "../../invoice-settings/feature/dist/index.js";
|
|
21
|
-
import {
|
|
22
|
-
import "../../tags/feature/dist/index.js";
|
|
23
|
-
import { BankDisclosuresWidget as m } from "../../../shared/bank-disclosures/feature/dist/lib/BankDisclosuresWidget/BankDisclosuresWidget.js";
|
|
21
|
+
import { BankDisclosuresWidget as p } from "../../../shared/bank-disclosures/feature/dist/lib/BankDisclosuresWidget/BankDisclosuresWidget.js";
|
|
24
22
|
import "../../../shared/bank-disclosures/feature/dist/index.js";
|
|
25
|
-
import { TeamWidget as
|
|
23
|
+
import { TeamWidget as m } from "../../team/feature/dist/index17.js";
|
|
26
24
|
import "../../team/feature/dist/index.js";
|
|
27
|
-
import { SettingsWidgetUi as
|
|
25
|
+
import { SettingsWidgetUi as h } from "../../ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js";
|
|
28
26
|
import "../../ui/dist/index.js";
|
|
29
|
-
import { ChartOfAccountsWidget as
|
|
27
|
+
import { ChartOfAccountsWidget as g } from "../../chart-of-accounts/feature/dist/index8.js";
|
|
30
28
|
import "../../chart-of-accounts/feature/dist/index.js";
|
|
31
|
-
import { HelpWidget as
|
|
29
|
+
import { HelpWidget as _ } from "../../help/feature/dist/index3.js";
|
|
32
30
|
import "../../help/feature/dist/index.js";
|
|
33
|
-
import { ProfileWidget as
|
|
31
|
+
import { ProfileWidget as v } from "../../profile/feature/dist/index4.js";
|
|
34
32
|
import "../../profile/feature/dist/index.js";
|
|
35
|
-
import { useCallback as
|
|
36
|
-
import { jsx as
|
|
37
|
-
import { useControllableState as
|
|
33
|
+
import { useCallback as y, useEffect as b, useRef as x } from "react";
|
|
34
|
+
import { jsx as S } from "react/jsx-runtime";
|
|
35
|
+
import { useControllableState as C } from "@radix-ui/react-use-controllable-state";
|
|
38
36
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js
|
|
39
|
-
var
|
|
37
|
+
var w = {
|
|
40
38
|
[s.Profile]: [],
|
|
41
39
|
[s.Team]: [t.UserReadOrg],
|
|
42
40
|
[s.Invoice]: [t.OrganizationSettingsWriteOrg],
|
|
@@ -47,98 +45,92 @@ var T = {
|
|
|
47
45
|
t.UserReadOrg
|
|
48
46
|
],
|
|
49
47
|
[s.Accounting]: [t.AccountingConfigReadOrg],
|
|
50
|
-
[s.Tags]: [t.AccountingConfigReadOrg],
|
|
51
48
|
[s.Expense]: [t.ApprovalPolicyWriteOrg, t.ExpenseWriteOrg],
|
|
52
49
|
[s.Legal]: [],
|
|
53
50
|
[s.Help]: []
|
|
54
51
|
};
|
|
55
|
-
function
|
|
56
|
-
let
|
|
52
|
+
function T({ labels: t, featureLabels: a, acceptInviteRedirectUri: u, helpContactUrl: T, helpFaq: E, profileContactUrl: D, selectedSection: O, defaultSelectedSection: k, onSelectedSectionChange: A, additionalSections: j, profileContent: M, teamContent: N, billPayContent: P, helpContent: F, expenseContent: I, accountingContent: L, invoiceContent: R, legalContent: z }) {
|
|
53
|
+
let B = {
|
|
57
54
|
...o,
|
|
58
55
|
...a
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}, [
|
|
63
|
-
let { initResponse:
|
|
56
|
+
}, V = x(null), H = n();
|
|
57
|
+
b(() => {
|
|
58
|
+
H(l.Mounted);
|
|
59
|
+
}, [H]);
|
|
60
|
+
let { initResponse: U } = r(), W = U?.scopes, G = [
|
|
64
61
|
{
|
|
65
62
|
id: s.Profile,
|
|
66
|
-
label:
|
|
67
|
-
content:
|
|
63
|
+
label: B.profileSection,
|
|
64
|
+
content: M ?? /* @__PURE__ */ S(v, { contactUrl: D })
|
|
68
65
|
},
|
|
69
66
|
{
|
|
70
67
|
id: s.Team,
|
|
71
|
-
label:
|
|
72
|
-
content:
|
|
68
|
+
label: B.teamSection,
|
|
69
|
+
content: N ?? /* @__PURE__ */ S(m, { acceptInviteRedirectUri: u })
|
|
73
70
|
},
|
|
74
71
|
{
|
|
75
72
|
id: s.Invoice,
|
|
76
|
-
label:
|
|
77
|
-
content:
|
|
73
|
+
label: B.invoiceSection,
|
|
74
|
+
content: R ?? /* @__PURE__ */ S(f, { ref: V })
|
|
78
75
|
},
|
|
79
76
|
{
|
|
80
77
|
id: s.Expense,
|
|
81
|
-
label:
|
|
82
|
-
content:
|
|
83
|
-
approvalsLabel:
|
|
84
|
-
requirementsLabel:
|
|
78
|
+
label: B.expenseSection,
|
|
79
|
+
content: I ?? /* @__PURE__ */ S(d, {
|
|
80
|
+
approvalsLabel: B.expenseApprovalsTab,
|
|
81
|
+
requirementsLabel: B.expenseRequirementsTab
|
|
85
82
|
})
|
|
86
83
|
},
|
|
87
84
|
{
|
|
88
85
|
id: s.BillPay,
|
|
89
|
-
label:
|
|
90
|
-
content:
|
|
86
|
+
label: B.billPaySection,
|
|
87
|
+
content: P ?? /* @__PURE__ */ S(i, {
|
|
91
88
|
showHeaderTitle: !1,
|
|
92
|
-
componentLabels: { header: { Description:
|
|
89
|
+
componentLabels: { header: { Description: B.billPayDescription } }
|
|
93
90
|
})
|
|
94
91
|
},
|
|
95
92
|
{
|
|
96
93
|
id: s.Accounting,
|
|
97
|
-
label:
|
|
98
|
-
content:
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
id: s.Tags,
|
|
102
|
-
label: H.tagsSection,
|
|
103
|
-
content: z ?? /* @__PURE__ */ C(p, {})
|
|
94
|
+
label: B.accountingSection,
|
|
95
|
+
content: L ?? /* @__PURE__ */ S(g, {})
|
|
104
96
|
},
|
|
105
97
|
{
|
|
106
98
|
id: s.Legal,
|
|
107
|
-
label:
|
|
108
|
-
content:
|
|
99
|
+
label: B.legalSection,
|
|
100
|
+
content: z ?? /* @__PURE__ */ S(p, {})
|
|
109
101
|
},
|
|
110
102
|
{
|
|
111
103
|
id: s.Help,
|
|
112
|
-
label:
|
|
113
|
-
content:
|
|
114
|
-
contactUrl:
|
|
115
|
-
faq:
|
|
104
|
+
label: B.helpSection,
|
|
105
|
+
content: F ?? /* @__PURE__ */ S(_, {
|
|
106
|
+
contactUrl: T,
|
|
107
|
+
faq: E
|
|
116
108
|
})
|
|
117
109
|
}
|
|
118
|
-
],
|
|
119
|
-
prop:
|
|
120
|
-
defaultProp:
|
|
121
|
-
onChange:
|
|
110
|
+
], K = c(G.filter((t) => w[t.id].every((t) => e(W, [t]))), j ?? []), q = K[0]?.id ?? "", [J, Y] = C({
|
|
111
|
+
prop: O,
|
|
112
|
+
defaultProp: k ?? q,
|
|
113
|
+
onChange: A,
|
|
122
114
|
caller: "SettingsWidget"
|
|
123
|
-
}),
|
|
124
|
-
let t =
|
|
125
|
-
if (
|
|
126
|
-
|
|
115
|
+
}), X = K.some((e) => e.id === J) ? J : q, Z = y((e) => {
|
|
116
|
+
let t = V.current;
|
|
117
|
+
if (X !== s.Invoice || !t) {
|
|
118
|
+
Y(e);
|
|
127
119
|
return;
|
|
128
120
|
}
|
|
129
121
|
t.confirmLeave().then((t) => {
|
|
130
|
-
t &&
|
|
122
|
+
t && Y(e);
|
|
131
123
|
});
|
|
132
|
-
}, [
|
|
133
|
-
return /* @__PURE__ */
|
|
124
|
+
}, [X, Y]);
|
|
125
|
+
return /* @__PURE__ */ S(h, {
|
|
134
126
|
labels: t,
|
|
135
|
-
sections:
|
|
136
|
-
selectedSectionId:
|
|
137
|
-
onSectionChange:
|
|
127
|
+
sections: K,
|
|
128
|
+
selectedSectionId: X,
|
|
129
|
+
onSectionChange: Z
|
|
138
130
|
});
|
|
139
131
|
}
|
|
140
|
-
function
|
|
141
|
-
return /* @__PURE__ */
|
|
132
|
+
function E({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: o, implementation: s, uiFramework: c, errorFallback: l, onError: d, finopsThemeColors: f, analytics: p, disclosuresAcceptance: m, providerLabels: h, ...g }) {
|
|
133
|
+
return /* @__PURE__ */ S(a, {
|
|
142
134
|
widgetName: u,
|
|
143
135
|
baseUrl: e,
|
|
144
136
|
widgetToken: t,
|
|
@@ -154,8 +146,8 @@ function D({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gat
|
|
|
154
146
|
analytics: p,
|
|
155
147
|
disclosuresAcceptance: m,
|
|
156
148
|
providerLabels: h,
|
|
157
|
-
children: /* @__PURE__ */
|
|
149
|
+
children: /* @__PURE__ */ S(T, { ...g })
|
|
158
150
|
});
|
|
159
151
|
}
|
|
160
152
|
//#endregion
|
|
161
|
-
export {
|
|
153
|
+
export { E as SettingsWidget, E as default };
|