@tesouro/embedded-components-react 0.5.45 → 0.5.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -5
- package/dist/index.d.ts +54 -24
- package/dist/lib/BankAccountOnboardingWidget.d.ts +15 -1
- package/dist/lib/BillPayWidget.d.ts +16 -1
- package/dist/lib/SettingsWidget.d.ts +1 -0
- package/dist/lib/WidgetSuite.d.ts +1 -0
- package/dist/lib/monite-sdk.d.ts +2 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index10.js +12 -8
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index22.js +233 -211
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +12 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +7 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +387 -387
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +119 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +1 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +55 -70
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +9 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +163 -151
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index6.js +77 -77
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseApprovalPoliciesWidget/lib/ExpenseApprovalsPage.js +17 -10
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseApprovalPoliciesWidget/lib/labels.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index382.js +10 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index394.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index616.js +23 -23
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index3.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +13 -4
- package/dist/libs/tesouro-embedded-components-react/settings-widget/help/ui/shadcn/dist/index3.js +27 -29
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js +29 -28
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +13 -13
- 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
|
@@ -253,11 +253,13 @@ A Monite-backed bill pay widget wrapped in Tesouro widget auth and theming.
|
|
|
253
253
|
|
|
254
254
|
#### Props
|
|
255
255
|
|
|
256
|
-
| Prop | Type | Default | Description
|
|
257
|
-
| -------------------- | ------------------------------------ | ------------ |
|
|
258
|
-
| `pageTitleComponent` | `(children: ReactNode) => ReactNode` | Pass-through | Customizes Monite's page title action region.
|
|
259
|
-
| `finopsThemeColors` | `FinopsThemeColors` | `undefined` | Optional Monite theme color overrides.
|
|
260
|
-
| `
|
|
256
|
+
| Prop | Type | Default | Description |
|
|
257
|
+
| -------------------- | ------------------------------------ | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
258
|
+
| `pageTitleComponent` | `(children: ReactNode) => ReactNode` | Pass-through | Customizes Monite's page title action region. |
|
|
259
|
+
| `finopsThemeColors` | `FinopsThemeColors` | `undefined` | Optional Monite theme color overrides. |
|
|
260
|
+
| `initialTab` | `'bills' \| 'vendors'` | `'bills'` | Tab to open on initial mount. Native implementation only (`implementation="native"`); has no effect under the default Monite implementation. |
|
|
261
|
+
| `poweredByBankName` | `string` | `undefined` | Bank shown as "Powered by {bank}" next to the source account when paying a bill. Native implementation only (`implementation="native"`); has no effect under the default Monite implementation. |
|
|
262
|
+
| `onSettingsClick` | `() => void` | `undefined` | Opens your bill pay settings surface from a cog beside the bill list's "Add bill" button. The cog renders only when this is supplied and the user's scopes reach that surface. Native implementation only; under Monite, build a settings button into `pageTitleComponent` instead. |
|
|
261
263
|
|
|
262
264
|
### CreditCardsWidget
|
|
263
265
|
|
package/dist/index.d.ts
CHANGED
|
@@ -2534,6 +2534,7 @@ interface FeatureLabels$2 {
|
|
|
2534
2534
|
teamSection: string;
|
|
2535
2535
|
invoiceSection: string;
|
|
2536
2536
|
billPaySection: string;
|
|
2537
|
+
billPayDescription: string;
|
|
2537
2538
|
accountingSection: string;
|
|
2538
2539
|
tagsSection: string;
|
|
2539
2540
|
expenseSection: string;
|
|
@@ -3558,29 +3559,6 @@ type BillPayWidgetMoniteProps = MoniteRegionProviderProps & Omit<PayablesProps,
|
|
|
3558
3559
|
pageTitleComponent?: PayablesProps['pageTitleComponent'];
|
|
3559
3560
|
};
|
|
3560
3561
|
|
|
3561
|
-
type BillPayWidgetProps = BillPayWidgetMoniteProps & {
|
|
3562
|
-
/** Bank shown as "Powered by {bank}" next to the source account when paying a bill. Native implementation only; ignored under `monite`. */
|
|
3563
|
-
poweredByBankName?: string;
|
|
3564
|
-
};
|
|
3565
|
-
/**
|
|
3566
|
-
* BillPay widget entry point — selects the rendering implementation.
|
|
3567
|
-
*
|
|
3568
|
-
* BillPay is deliberately **pinned to `monite`** until the Tesouro-native
|
|
3569
|
-
* (shadcn) build reaches parity (epic EMBD-2171;
|
|
3570
|
-
* `docs/billpay-usification-shadcn/technical-design.md` §2). `native` is the
|
|
3571
|
-
* global default across widgets, so BillPay applies its own `monite` fallback
|
|
3572
|
-
* whenever *nothing* selects an implementation — this is what keeps the native
|
|
3573
|
-
* build off by default.
|
|
3574
|
-
*
|
|
3575
|
-
* An explicit selection is still honored, whether it comes from this widget's
|
|
3576
|
-
* `implementation` prop or from the provider/global cascade
|
|
3577
|
-
* (`RootWidgetProvider implementation="native"`, `setGlobalWidgetConfig`). We
|
|
3578
|
-
* read the *raw* cascade value (undefined when unset) rather than the resolved
|
|
3579
|
-
* one so the global `native` default does not leak past the pin. The cutover is
|
|
3580
|
-
* a one-line change: drop the `monite` fallback once native is at parity.
|
|
3581
|
-
*/
|
|
3582
|
-
declare function BillPayWidget({ implementation, ...props }: BillPayWidgetProps): React.JSX.Element;
|
|
3583
|
-
|
|
3584
3562
|
/**
|
|
3585
3563
|
* Co-located user-facing strings for the counterparts widget UI. Each component
|
|
3586
3564
|
* takes a `labels?: Partial<...Labels>` prop merged over the matching
|
|
@@ -3731,6 +3709,44 @@ type CounterpartsWidgetProps = WidgetProviderProps & CounterpartsWidgetOwnProps;
|
|
|
3731
3709
|
*/
|
|
3732
3710
|
declare function CounterpartsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: CounterpartsWidgetProps): React.JSX.Element;
|
|
3733
3711
|
|
|
3712
|
+
declare const TabId: {
|
|
3713
|
+
readonly Bills: "bills";
|
|
3714
|
+
readonly Vendors: "vendors";
|
|
3715
|
+
};
|
|
3716
|
+
type BillPayWidgetNativeTabId = (typeof TabId)[keyof typeof TabId];
|
|
3717
|
+
|
|
3718
|
+
type BillPayWidgetProps = BillPayWidgetMoniteProps & {
|
|
3719
|
+
/** Tab to open on initial mount. Native implementation only; ignored under `monite`. */
|
|
3720
|
+
initialTab?: BillPayWidgetNativeTabId;
|
|
3721
|
+
/** Bank shown as "Powered by {bank}" next to the source account when paying a bill. Native implementation only; ignored under `monite`. */
|
|
3722
|
+
poweredByBankName?: string;
|
|
3723
|
+
/**
|
|
3724
|
+
* Opens the host's bill-pay settings surface, from a cog beside the bill
|
|
3725
|
+
* list's "Add bill" button. Rendered only for a user whose scopes reach that
|
|
3726
|
+
* surface. Native implementation only; under `monite` the equivalent is a
|
|
3727
|
+
* settings button the host builds into `pageTitleComponent`.
|
|
3728
|
+
*/
|
|
3729
|
+
onSettingsClick?: () => void;
|
|
3730
|
+
};
|
|
3731
|
+
/**
|
|
3732
|
+
* BillPay widget entry point — selects the rendering implementation.
|
|
3733
|
+
*
|
|
3734
|
+
* BillPay is deliberately **pinned to `monite`** until the Tesouro-native
|
|
3735
|
+
* (shadcn) build reaches parity (epic EMBD-2171;
|
|
3736
|
+
* `docs/billpay-usification-shadcn/technical-design.md` §2). `native` is the
|
|
3737
|
+
* global default across widgets, so BillPay applies its own `monite` fallback
|
|
3738
|
+
* whenever *nothing* selects an implementation — this is what keeps the native
|
|
3739
|
+
* build off by default.
|
|
3740
|
+
*
|
|
3741
|
+
* An explicit selection is still honored, whether it comes from this widget's
|
|
3742
|
+
* `implementation` prop or from the provider/global cascade
|
|
3743
|
+
* (`RootWidgetProvider implementation="native"`, `setGlobalWidgetConfig`). We
|
|
3744
|
+
* read the *raw* cascade value (undefined when unset) rather than the resolved
|
|
3745
|
+
* one so the global `native` default does not leak past the pin. The cutover is
|
|
3746
|
+
* a one-line change: drop the `monite` fallback once native is at parity.
|
|
3747
|
+
*/
|
|
3748
|
+
declare function BillPayWidget({ implementation, initialTab, onSettingsClick, ...props }: BillPayWidgetProps): React.JSX.Element;
|
|
3749
|
+
|
|
3734
3750
|
interface Labels$1 {
|
|
3735
3751
|
description: string;
|
|
3736
3752
|
receiptsTab: string;
|
|
@@ -4476,6 +4492,20 @@ interface BankAccountOnboardingWidgetInnerProps {
|
|
|
4476
4492
|
* already started one. Set by the resume layer, not by hosts.
|
|
4477
4493
|
*/
|
|
4478
4494
|
initialApplicationId?: string | null;
|
|
4495
|
+
/**
|
|
4496
|
+
* The token the resume read that produced `initialApplicationId` was made
|
|
4497
|
+
* under. Set by the resume layer, not by hosts.
|
|
4498
|
+
*/
|
|
4499
|
+
initialBoundAuthEpoch?: number;
|
|
4500
|
+
/**
|
|
4501
|
+
* The application this session may still write to, with the auth epoch it
|
|
4502
|
+
* was bound under, or null once there is none. Reported up to the session
|
|
4503
|
+
* scope, not to hosts.
|
|
4504
|
+
*/
|
|
4505
|
+
onEditableDraftChange?: (draft: {
|
|
4506
|
+
applicationId: string;
|
|
4507
|
+
authEpoch: number;
|
|
4508
|
+
} | null) => void;
|
|
4479
4509
|
bankLogoSrc?: string;
|
|
4480
4510
|
/**
|
|
4481
4511
|
* Host-resolved disclosure URLs for the business-details agreement step.
|
|
@@ -4510,7 +4540,7 @@ interface BankAccountOnboardingWidgetInnerProps {
|
|
|
4510
4540
|
*/
|
|
4511
4541
|
isFullScreenInline?: boolean;
|
|
4512
4542
|
}
|
|
4513
|
-
type BankAccountOnboardingWidgetProps = WidgetProviderProps & Omit<BankAccountOnboardingWidgetInnerProps, 'initialApplicationId' | 'initialBusinessDetails' | 'initialPersonalDetails' | 'initialAdditionalOwners'> & {
|
|
4543
|
+
type BankAccountOnboardingWidgetProps = WidgetProviderProps & Omit<BankAccountOnboardingWidgetInnerProps, 'initialApplicationId' | 'initialBoundAuthEpoch' | 'initialBusinessDetails' | 'initialPersonalDetails' | 'initialAdditionalOwners' | 'onEditableDraftChange'> & {
|
|
4514
4544
|
initialBusinessDetails?: Partial<HostSupplied<BusinessDetailsValues>>;
|
|
4515
4545
|
initialPersonalDetails?: Partial<HostSupplied<PersonalDetailsValues>>;
|
|
4516
4546
|
initialAdditionalOwners?: HostSuppliedOwner[];
|
|
@@ -973,6 +973,20 @@ interface BankAccountOnboardingWidgetInnerProps {
|
|
|
973
973
|
* already started one. Set by the resume layer, not by hosts.
|
|
974
974
|
*/
|
|
975
975
|
initialApplicationId?: string | null;
|
|
976
|
+
/**
|
|
977
|
+
* The token the resume read that produced `initialApplicationId` was made
|
|
978
|
+
* under. Set by the resume layer, not by hosts.
|
|
979
|
+
*/
|
|
980
|
+
initialBoundAuthEpoch?: number;
|
|
981
|
+
/**
|
|
982
|
+
* The application this session may still write to, with the auth epoch it
|
|
983
|
+
* was bound under, or null once there is none. Reported up to the session
|
|
984
|
+
* scope, not to hosts.
|
|
985
|
+
*/
|
|
986
|
+
onEditableDraftChange?: (draft: {
|
|
987
|
+
applicationId: string;
|
|
988
|
+
authEpoch: number;
|
|
989
|
+
} | null) => void;
|
|
976
990
|
bankLogoSrc?: string;
|
|
977
991
|
/**
|
|
978
992
|
* Host-resolved disclosure URLs for the business-details agreement step.
|
|
@@ -1007,7 +1021,7 @@ interface BankAccountOnboardingWidgetInnerProps {
|
|
|
1007
1021
|
*/
|
|
1008
1022
|
isFullScreenInline?: boolean;
|
|
1009
1023
|
}
|
|
1010
|
-
type BankAccountOnboardingWidgetProps = WidgetProviderProps & Omit<BankAccountOnboardingWidgetInnerProps, 'initialApplicationId' | 'initialBusinessDetails' | 'initialPersonalDetails' | 'initialAdditionalOwners'> & {
|
|
1024
|
+
type BankAccountOnboardingWidgetProps = WidgetProviderProps & Omit<BankAccountOnboardingWidgetInnerProps, 'initialApplicationId' | 'initialBoundAuthEpoch' | 'initialBusinessDetails' | 'initialPersonalDetails' | 'initialAdditionalOwners' | 'onEditableDraftChange'> & {
|
|
1011
1025
|
initialBusinessDetails?: Partial<HostSupplied<BusinessDetailsValues>>;
|
|
1012
1026
|
initialPersonalDetails?: Partial<HostSupplied<PersonalDetailsValues>>;
|
|
1013
1027
|
initialAdditionalOwners?: HostSuppliedOwner[];
|
|
@@ -784,9 +784,24 @@ type BillPayWidgetMoniteProps = MoniteRegionProviderProps & Omit<PayablesProps,
|
|
|
784
784
|
pageTitleComponent?: PayablesProps['pageTitleComponent'];
|
|
785
785
|
};
|
|
786
786
|
|
|
787
|
+
declare const TabId: {
|
|
788
|
+
readonly Bills: "bills";
|
|
789
|
+
readonly Vendors: "vendors";
|
|
790
|
+
};
|
|
791
|
+
type BillPayWidgetNativeTabId = (typeof TabId)[keyof typeof TabId];
|
|
792
|
+
|
|
787
793
|
type BillPayWidgetProps = BillPayWidgetMoniteProps & {
|
|
794
|
+
/** Tab to open on initial mount. Native implementation only; ignored under `monite`. */
|
|
795
|
+
initialTab?: BillPayWidgetNativeTabId;
|
|
788
796
|
/** Bank shown as "Powered by {bank}" next to the source account when paying a bill. Native implementation only; ignored under `monite`. */
|
|
789
797
|
poweredByBankName?: string;
|
|
798
|
+
/**
|
|
799
|
+
* Opens the host's bill-pay settings surface, from a cog beside the bill
|
|
800
|
+
* list's "Add bill" button. Rendered only for a user whose scopes reach that
|
|
801
|
+
* surface. Native implementation only; under `monite` the equivalent is a
|
|
802
|
+
* settings button the host builds into `pageTitleComponent`.
|
|
803
|
+
*/
|
|
804
|
+
onSettingsClick?: () => void;
|
|
790
805
|
};
|
|
791
806
|
/**
|
|
792
807
|
* BillPay widget entry point — selects the rendering implementation.
|
|
@@ -805,7 +820,7 @@ type BillPayWidgetProps = BillPayWidgetMoniteProps & {
|
|
|
805
820
|
* one so the global `native` default does not leak past the pin. The cutover is
|
|
806
821
|
* a one-line change: drop the `monite` fallback once native is at parity.
|
|
807
822
|
*/
|
|
808
|
-
declare function BillPayWidget({ implementation, ...props }: BillPayWidgetProps): React.JSX.Element;
|
|
823
|
+
declare function BillPayWidget({ implementation, initialTab, onSettingsClick, ...props }: BillPayWidgetProps): React.JSX.Element;
|
|
809
824
|
|
|
810
825
|
export { BillPayWidget };
|
|
811
826
|
export type { BillPayWidgetProps };
|
package/dist/lib/monite-sdk.d.ts
CHANGED
|
@@ -74480,6 +74480,8 @@ declare function Integrations(): _emotion_react_jsx_runtime.JSX.Element;
|
|
|
74480
74480
|
type TemplateSettingsProps = {
|
|
74481
74481
|
/** Flag that controls whether settings are shown inside a side panel or not */
|
|
74482
74482
|
isDialog?: boolean;
|
|
74483
|
+
/** The Settings shell can own the section title when this is embedded there. */
|
|
74484
|
+
showHeader?: boolean;
|
|
74483
74485
|
/** Flag that controls whether dialog is open or not. It's meant to be passed in when isDialog is true */
|
|
74484
74486
|
isOpen?: boolean;
|
|
74485
74487
|
/** Callback function that is called when you close the dialog. It's meant to be passed in when isDialog is true */
|
|
@@ -13,18 +13,22 @@ var a = "DRAFT", o = "BANK_ACCOUNT", s = "STARTED_BY_YOU";
|
|
|
13
13
|
function c(e) {
|
|
14
14
|
return e.find((e) => e.product === o && e.ownership === s && e.status === a && !!e.applicationId && !!e.clientSecret);
|
|
15
15
|
}
|
|
16
|
-
function l() {
|
|
17
|
-
|
|
16
|
+
function l(e) {
|
|
17
|
+
return e.filter((e) => e.product === o && e.ownership === s).map((e) => e.applicationId).filter((e) => !!e);
|
|
18
|
+
}
|
|
19
|
+
function u() {
|
|
20
|
+
let { client: a, widgetToken: o, authEpoch: s } = e(), u = !!o, d = i({
|
|
18
21
|
...n(t({ client: a }), s),
|
|
19
|
-
enabled:
|
|
22
|
+
enabled: u,
|
|
20
23
|
retry: 2,
|
|
21
24
|
retryDelay: 300
|
|
22
|
-
}),
|
|
25
|
+
}), f = u && r(d), p = f && !d.isError ? d.data?.applications ?? null : null, m = p ? c(p) : void 0;
|
|
23
26
|
return {
|
|
24
|
-
applicationId:
|
|
25
|
-
clientSecret:
|
|
26
|
-
isResolved:
|
|
27
|
+
applicationId: m?.applicationId ?? null,
|
|
28
|
+
clientSecret: m?.clientSecret ?? null,
|
|
29
|
+
isResolved: f,
|
|
30
|
+
ownApplicationIds: p ? l(p) : null
|
|
27
31
|
};
|
|
28
32
|
}
|
|
29
33
|
//#endregion
|
|
30
|
-
export {
|
|
34
|
+
export { u as useResumableBankAccountApplication };
|