@tesouro/embedded-components-react 0.5.95 → 0.5.97
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 +5 -5
- package/dist/experimental/index.d.ts +3 -274
- package/dist/experimental/index.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index2.js +13 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index3.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index4.js +29 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index5.js +29 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index6.js +29 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index7.js +22 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index2.js +5 -0
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/feature/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/feature/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/feature/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/feature/dist/index6.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/feature/dist/index7.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/feature/dist/index8.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/CardArt.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/CardControls/CardControlRow.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/CardControls/CardControls.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/CardControls/MerchantCategoriesControl.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/CardControls/PerTransactionMaximumControl.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/CardControls/SpendLimitControl.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/CardControls/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/CardControls/limitDecimalPlaces.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/CreateCardWidget.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/ManualAddressFields.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/PreparingView.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/SetupView.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/SuccessView.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/types.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index2.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/shared/util/dist/lib/widgetName.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index.js +1 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +86 -77
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
- package/dist/experimental/InvoiceSettings.d.ts +0 -902
- package/dist/experimental/InvoiceSettings.js +0 -3
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/data-access/dist/index2.js +0 -13
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/data-access/dist/index3.js +0 -18
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/data-access/dist/index4.js +0 -29
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/data-access/dist/index5.js +0 -29
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/data-access/dist/index6.js +0 -29
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/data-access/dist/index7.js +0 -22
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index2.js +0 -4
- /package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/data-access/dist/index.js +0 -0
- /package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/feature/dist/index.js +0 -0
- /package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/index.js +0 -0
package/README.md
CHANGED
|
@@ -519,7 +519,7 @@ A self-contained native widget for listing, creating, editing, and acting on cus
|
|
|
519
519
|
|
|
520
520
|
### SettingsWidget
|
|
521
521
|
|
|
522
|
-
A composite settings widget that combines
|
|
522
|
+
A composite settings widget that combines profile, team, invoice, bill-pay, expense, accounting, tags, legal and help settings in one navigable surface.
|
|
523
523
|
|
|
524
524
|
#### Props
|
|
525
525
|
|
|
@@ -530,10 +530,10 @@ A composite settings widget that combines Monite document settings, tags, GL cod
|
|
|
530
530
|
| `featureLabels` | `Partial<FeatureLabels>` | English labels | Overrides section labels. |
|
|
531
531
|
| `profileContent` | `ReactNode` | Profile widget | Replaces the profile section content. |
|
|
532
532
|
| `teamContent` | `ReactNode` | Empty | Supplies the team section content. |
|
|
533
|
-
| `invoiceContent` | `ReactNode` |
|
|
534
|
-
| `billPayContent` | `ReactNode` |
|
|
533
|
+
| `invoiceContent` | `ReactNode` | Invoice settings widget | Replaces invoice settings content. |
|
|
534
|
+
| `billPayContent` | `ReactNode` | Approval policies settings | Replaces bill-pay settings content. |
|
|
535
535
|
| `accountingContent` | `ReactNode` | Chart of accounts widget | Replaces accounting content. |
|
|
536
|
-
| `tagsContent` | `ReactNode` |
|
|
536
|
+
| `tagsContent` | `ReactNode` | Tags widget | Replaces tags content. |
|
|
537
537
|
| `expenseContent` | `ReactNode` | Expense policies and requirements | Replaces expense content. |
|
|
538
538
|
| `legalContent` | `ReactNode` | Bank disclosures widget | Replaces the Legal section content. |
|
|
539
539
|
| `profileContactUrl` | `string` | `undefined` | Forwarded to the Profile section's widget — where its "to change this information, contact your bank" line links. Left unset, the card shows the plain unlinked sentence instead; the bank name comes from widget init. |
|
|
@@ -544,7 +544,7 @@ A composite settings widget that combines Monite document settings, tags, GL cod
|
|
|
544
544
|
| `helpContactUrl` | `string` | `undefined` | Forwarded to the Help section's widget — where its "Contact Us" line links (a support page URL or a `mailto:`). The line is hidden while unset, since the package has no tenant-agnostic support address to fall back on; the bank name in that line comes from widget init. |
|
|
545
545
|
| `helpFaq` | `HelpFaqSection[]` | `HELP_FAQ_EN` | Forwarded to the Help section: the FAQ it renders. Extend the exported `HELP_FAQ_EN` and pass the result to answer questions the package cannot (passwords, for example) without replacing the whole section. |
|
|
546
546
|
| `helpContent` | `ReactNode` | Help widget | Replaces the help section content. |
|
|
547
|
-
| `finopsThemeColors` | `FinopsThemeColors` | `undefined` | Optional Monite theme color overrides.
|
|
547
|
+
| `finopsThemeColors` | `FinopsThemeColors` | `undefined` | Optional Monite theme color overrides. Nothing under this widget renders Monite any more, so it currently changes nothing here; it is still accepted rather than removed in the same release as the section it themed. |
|
|
548
548
|
|
|
549
549
|
### TransfersWidget
|
|
550
550
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ComponentType, AnchorHTMLAttributes, ReactNode, ErrorInfo
|
|
2
|
+
import { ComponentType, AnchorHTMLAttributes, ReactNode, ErrorInfo } from 'react';
|
|
3
3
|
import { FallbackProps } from 'react-error-boundary';
|
|
4
4
|
|
|
5
5
|
type AuthToken = string | undefined;
|
|
@@ -627,277 +627,6 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
|
|
|
627
627
|
providerLabels?: Partial<WidgetProviderLabels>;
|
|
628
628
|
}
|
|
629
629
|
|
|
630
|
-
/**
|
|
631
|
-
* Co-located user-facing strings for this component. It takes a
|
|
632
|
-
* `labels?: Partial<…Labels>` prop merged over the `*_LABELS_EN` default.
|
|
633
|
-
*
|
|
634
|
-
* Flat, deliberately: a nested group would need `PartialDeep` from type-fest
|
|
635
|
-
* plus an explicit per-group merge (AGENTS.md), and none of this copy groups
|
|
636
|
-
* naturally.
|
|
637
|
-
*
|
|
638
|
-
* The English strings are ported verbatim from the Monite `templateSettings`
|
|
639
|
-
* screen so the native widget reads identically during side-by-side review
|
|
640
|
-
* (EMBD-5846). Reword in a separate commit, never inside the port.
|
|
641
|
-
*/
|
|
642
|
-
interface InvoiceSettingsPanelLabels {
|
|
643
|
-
submitButton: string;
|
|
644
|
-
/**
|
|
645
|
-
* Copy for the load-failure state. No Monite counterpart: its screen had no
|
|
646
|
-
* error branch at all, so this is new rather than ported.
|
|
647
|
-
*/
|
|
648
|
-
errorTitle: string;
|
|
649
|
-
errorDescription: string;
|
|
650
|
-
errorRetry: string;
|
|
651
|
-
/**
|
|
652
|
-
* Accessible name for the loading spinner. The shared `Spinner` takes no
|
|
653
|
-
* `labels` prop — its English default is an attribute on the element it
|
|
654
|
-
* renders, overridable only through `aria-label` — so without this the panel
|
|
655
|
-
* would announce English to a screen reader on an otherwise localized page.
|
|
656
|
-
*/
|
|
657
|
-
loading: string;
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
/**
|
|
661
|
-
* Co-located user-facing strings for this component. It takes a
|
|
662
|
-
* `labels?: Partial<…Labels>` prop merged over the `*_LABELS_EN` default.
|
|
663
|
-
*
|
|
664
|
-
* Flat, deliberately: a nested group would need `PartialDeep` from type-fest
|
|
665
|
-
* plus an explicit per-group merge (AGENTS.md), and none of this copy groups
|
|
666
|
-
* naturally.
|
|
667
|
-
*
|
|
668
|
-
* The English strings are ported verbatim from the Monite `templateSettings`
|
|
669
|
-
* screen so the native widget reads identically during side-by-side review
|
|
670
|
-
* (EMBD-5846). Reword in a separate commit, never inside the port.
|
|
671
|
-
*/
|
|
672
|
-
interface InvoiceNumberingSectionLabels {
|
|
673
|
-
title: string;
|
|
674
|
-
description: string;
|
|
675
|
-
previewLabel: string;
|
|
676
|
-
invoicePrefixLabel: string;
|
|
677
|
-
startingNumberLabel: string;
|
|
678
|
-
digitCountLabel: string;
|
|
679
|
-
includeDateLabel: string;
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
/**
|
|
683
|
-
* Co-located user-facing strings for this component. It takes a
|
|
684
|
-
* `labels?: Partial<…Labels>` prop merged over the `*_LABELS_EN` default.
|
|
685
|
-
*
|
|
686
|
-
* Flat, deliberately: a nested group would need `PartialDeep` from type-fest
|
|
687
|
-
* plus an explicit per-group merge (AGENTS.md), and none of this copy groups
|
|
688
|
-
* naturally.
|
|
689
|
-
*
|
|
690
|
-
* The English strings are ported verbatim from the Monite `templateSettings`
|
|
691
|
-
* screen so the native widget reads identically during side-by-side review
|
|
692
|
-
* (EMBD-5846). Reword in a separate commit, never inside the port.
|
|
693
|
-
*/
|
|
694
|
-
interface PdfSettingsSectionLabels {
|
|
695
|
-
title: string;
|
|
696
|
-
description: string;
|
|
697
|
-
bankDetailsTitle: string;
|
|
698
|
-
bankDetailsDescription: string;
|
|
699
|
-
/** Accessible name for the bank-details switch. */
|
|
700
|
-
bankDetailsToggle: string;
|
|
701
|
-
paidInvoicesTitle: string;
|
|
702
|
-
paidInvoicesDescription: string;
|
|
703
|
-
/** Emphasised second line under the paid-invoices description. */
|
|
704
|
-
paidInvoicesWarning: string;
|
|
705
|
-
/** Accessible name for the paid-invoices switch. */
|
|
706
|
-
paidInvoicesToggle: string;
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
/**
|
|
710
|
-
* Co-located user-facing strings for this component. It takes a
|
|
711
|
-
* `labels?: Partial<…Labels>` prop merged over the `*_LABELS_EN` default.
|
|
712
|
-
*
|
|
713
|
-
* Flat, deliberately: a nested group would need `PartialDeep` from type-fest
|
|
714
|
-
* plus an explicit per-group merge (AGENTS.md), and none of this copy groups
|
|
715
|
-
* naturally.
|
|
716
|
-
*
|
|
717
|
-
* The English strings are ported verbatim from the Monite `templateSettings`
|
|
718
|
-
* screen so the native widget reads identically during side-by-side review
|
|
719
|
-
* (EMBD-5846). Reword in a separate commit, never inside the port.
|
|
720
|
-
*/
|
|
721
|
-
interface DiscardChangesDialogLabels {
|
|
722
|
-
title: string;
|
|
723
|
-
/** First paragraph of the body. */
|
|
724
|
-
message: string;
|
|
725
|
-
/** Second paragraph of the body. */
|
|
726
|
-
question: string;
|
|
727
|
-
confirmButton: string;
|
|
728
|
-
cancelButton: string;
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
/**
|
|
732
|
-
* Co-located user-facing strings for the logo dropzone. Ported from Monite's
|
|
733
|
-
* `DragAndDropBox`, with the accessibility copy its markup never had.
|
|
734
|
-
*/
|
|
735
|
-
interface LogoDropzoneLabels {
|
|
736
|
-
dropPrefix: string;
|
|
737
|
-
browseAction: string;
|
|
738
|
-
/**
|
|
739
|
-
* The accepted formats and the size cap, already formatted. The component is
|
|
740
|
-
* presentational, so it never turns a numeric limit into copy: the owner
|
|
741
|
-
* holds the cap and the units, and overrides this label from its own
|
|
742
|
-
* constant.
|
|
743
|
-
*/
|
|
744
|
-
fileTypesHint: string;
|
|
745
|
-
/** Shown when `status` is `'error'` and the owner supplied no message. */
|
|
746
|
-
genericError: string;
|
|
747
|
-
/** Accessible name for the progress bar, while an upload is in flight. */
|
|
748
|
-
uploadProgress: string;
|
|
749
|
-
/** Announced once an upload finishes, where the bar carries no meaning. */
|
|
750
|
-
uploadComplete: string;
|
|
751
|
-
/** Accessible name for the button that clears a failed upload. */
|
|
752
|
-
dismissError: string;
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
/**
|
|
756
|
-
* Co-located user-facing strings for the branding section. Ported from Monite's
|
|
757
|
-
* `LogoSection`, plus the accessible names its icon buttons carried inline.
|
|
758
|
-
*/
|
|
759
|
-
interface LogoSectionLabels {
|
|
760
|
-
title: string;
|
|
761
|
-
description: string;
|
|
762
|
-
uploadTitle: string;
|
|
763
|
-
uploadDescription: string;
|
|
764
|
-
/** Alt text for the current logo. */
|
|
765
|
-
logoAlt: string;
|
|
766
|
-
/** Shown over the current logo while a file is dragged across it. */
|
|
767
|
-
dropToReplace: string;
|
|
768
|
-
/** Accessible name for the icon button that replaces the logo. */
|
|
769
|
-
editLogo: string;
|
|
770
|
-
/** Accessible name for the icon button that removes the logo. */
|
|
771
|
-
deleteLogo: string;
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
/**
|
|
775
|
-
* Validation copy for the invoice-settings form.
|
|
776
|
-
*
|
|
777
|
-
* It lives in the feature layer rather than beside the controls it appears
|
|
778
|
-
* under, because the messages are produced by the schema, not by a component:
|
|
779
|
-
* the UI takes already-resolved strings through its `errors` prop and has no
|
|
780
|
-
* idea a rule exists. Passing them into the schema keeps the validators pure —
|
|
781
|
-
* they format a message, they do not look one up — and keeps every string a
|
|
782
|
-
* consumer can see in one overridable place.
|
|
783
|
-
*
|
|
784
|
-
* Exposed on the widget as `messageLabels`, matching the channel the chart of
|
|
785
|
-
* accounts and tags widgets use for the same job.
|
|
786
|
-
*/
|
|
787
|
-
interface InvoiceSettingsMessageLabels {
|
|
788
|
-
invoicePrefixRequired: string;
|
|
789
|
-
invoicePrefixTooLong: string;
|
|
790
|
-
customPrefixTooLong: string;
|
|
791
|
-
digitCountTooLow: string;
|
|
792
|
-
digitCountTooHigh: string;
|
|
793
|
-
/**
|
|
794
|
-
* The four document prefixes this screen does not render. A user cannot
|
|
795
|
-
* reach this message through the UI; it exists so a value that arrives empty
|
|
796
|
-
* from the API fails loudly in tests rather than silently patching a blank
|
|
797
|
-
* prefix over a good one.
|
|
798
|
-
*/
|
|
799
|
-
documentPrefixRequired: string;
|
|
800
|
-
/**
|
|
801
|
-
* `nextNumber` is the number the API will issue next for that document type,
|
|
802
|
-
* which is the floor it will accept.
|
|
803
|
-
*/
|
|
804
|
-
numberBelowNext: (nextNumber: number) => string;
|
|
805
|
-
/**
|
|
806
|
-
* Logo rejections. The first two are decided here rather than by the API, so
|
|
807
|
-
* the user hears about a bad file before uploading it; the third stands in
|
|
808
|
-
* for an API failure whose own message is not written for an end user.
|
|
809
|
-
*/
|
|
810
|
-
logoWrongFormat: string;
|
|
811
|
-
logoTooLarge: (maxSizeMb: number) => string;
|
|
812
|
-
logoUploadFailed: string;
|
|
813
|
-
/**
|
|
814
|
-
* The dropzone's format-and-size hint. It lives here, beside the rejection
|
|
815
|
-
* copy, because both are formatted from the one cap this widget enforces —
|
|
816
|
-
* the UI lib ships its own default, and a hint that advertised a different
|
|
817
|
-
* number from the one being enforced is exactly the drift this prevents.
|
|
818
|
-
*/
|
|
819
|
-
logoFileTypesHint: (maxSizeMb: number) => string;
|
|
820
|
-
/**
|
|
821
|
-
* Toast copy, ported verbatim from the Monite hooks these replace
|
|
822
|
-
* (`usePatchEntitySettings`, `useDeleteEntityLogo`) so the native widget
|
|
823
|
-
* reads identically during side-by-side review. Reword in a separate commit,
|
|
824
|
-
* never inside the port.
|
|
825
|
-
*
|
|
826
|
-
* `settingsSaveFailed` has no Monite counterpart — that mutation toasted only
|
|
827
|
-
* on success, so a failed save said nothing at all. There is no inline
|
|
828
|
-
* surface for it on this screen, unlike a rejected logo.
|
|
829
|
-
*/
|
|
830
|
-
settingsSaved: string;
|
|
831
|
-
settingsSaveFailed: string;
|
|
832
|
-
logoDeleted: string;
|
|
833
|
-
logoDeleteFailed: string;
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
/**
|
|
837
|
-
* Label override channels, one per surface the widget mounts, matching the
|
|
838
|
-
* chart-of-accounts and tags widgets. A single `labels` bag would collide the
|
|
839
|
-
* moment two of these components named a key the same way.
|
|
840
|
-
*/
|
|
841
|
-
interface InvoiceSettingsLabelProps {
|
|
842
|
-
panelLabels?: Partial<InvoiceSettingsPanelLabels>;
|
|
843
|
-
numberingLabels?: Partial<InvoiceNumberingSectionLabels>;
|
|
844
|
-
pdfLabels?: Partial<PdfSettingsSectionLabels>;
|
|
845
|
-
logoLabels?: Partial<LogoSectionLabels>;
|
|
846
|
-
dropzoneLabels?: Partial<LogoDropzoneLabels>;
|
|
847
|
-
discardLabels?: Partial<DiscardChangesDialogLabels>;
|
|
848
|
-
/** Validation and upload-rejection copy. */
|
|
849
|
-
messageLabels?: Partial<InvoiceSettingsMessageLabels>;
|
|
850
|
-
}
|
|
851
|
-
/**
|
|
852
|
-
* What a host can ask this widget before navigating away from it.
|
|
853
|
-
*
|
|
854
|
-
* Widgets never touch the host's router, so the widget cannot stop a navigation
|
|
855
|
-
* itself — it can only answer whether one is safe. The host asks, the user
|
|
856
|
-
* answers the discard dialog, and the host proceeds or does not.
|
|
857
|
-
*
|
|
858
|
-
* ```tsx
|
|
859
|
-
* const invoiceSettings = useRef<InvoiceSettingsHandle>(null);
|
|
860
|
-
* // ...before switching away from the Invoices section:
|
|
861
|
-
* if (await invoiceSettings.current?.confirmLeave()) setSection(next);
|
|
862
|
-
* ```
|
|
863
|
-
*
|
|
864
|
-
* **Nothing calls this yet — the Settings shell wires it in EMBD-5849**, and
|
|
865
|
-
* until it does the discard dialog cannot appear. That is not a regression from
|
|
866
|
-
* the screen this replaces: Monite opened the same dialog from exactly one
|
|
867
|
-
* place, its side sheet's close handler, and no caller in this repo has ever
|
|
868
|
-
* passed the `isDialog` prop that renders the sheet. The dialog has been
|
|
869
|
-
* unreachable in both mounts of `TemplateSettings` for as long as they have
|
|
870
|
-
* existed.
|
|
871
|
-
*
|
|
872
|
-
* The bug that makes wiring it worth doing is real and predates this port: the
|
|
873
|
-
* shell's `TabsContent` has no `forceMount`, so switching sections unmounts
|
|
874
|
-
* this widget and throws away unsaved edits with no warning. An unmount cannot
|
|
875
|
-
* be blocked from inside, so `onSectionChange` is the only place to intervene —
|
|
876
|
-
* which is why this is a question the host asks rather than something the
|
|
877
|
-
* widget enforces.
|
|
878
|
-
*/
|
|
879
|
-
interface InvoiceSettingsHandle {
|
|
880
|
-
/** `true` when there is nothing unsaved, or the user chose to discard. */
|
|
881
|
-
confirmLeave: () => Promise<boolean>;
|
|
882
|
-
}
|
|
883
|
-
type InvoiceSettingsProps = WidgetProviderProps & InvoiceSettingsLabelProps & {
|
|
884
|
-
ref?: Ref<InvoiceSettingsHandle>;
|
|
885
|
-
};
|
|
886
|
-
/**
|
|
887
|
-
* Entity invoice settings: document numbering, PDF options and the logo.
|
|
888
|
-
*
|
|
889
|
-
* Native throughout as of EMBD-5848 — it was a thin wrapper over Monite's
|
|
890
|
-
* `TemplateSettings` from EMBD-5846 until the presentational layer (EMBD-5845,
|
|
891
|
-
* EMBD-5847) and the REST hooks (EMBD-5844) were both in place. The Settings
|
|
892
|
-
* widget's Invoices tab still mounts the Monite screen until EMBD-5849 cuts it
|
|
893
|
-
* over; that screen goes in EMBD-5850.
|
|
894
|
-
*
|
|
895
|
-
* `WidgetProvider` rather than `MoniteRegionProvider`: nothing here renders
|
|
896
|
-
* Monite any more, so the Monite wrapper and its `finopsThemeColors` prop have
|
|
897
|
-
* both gone from this widget's public surface.
|
|
898
|
-
*/
|
|
899
|
-
declare function InvoiceSettings({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, analytics, disclosuresAcceptance, providerLabels, errorFallback, onError, ref, ...labelProps }: InvoiceSettingsProps): React.JSX.Element;
|
|
900
|
-
|
|
901
630
|
interface CheckAmountAndDetailScreenLabels {
|
|
902
631
|
title: string;
|
|
903
632
|
backButton: string;
|
|
@@ -1008,5 +737,5 @@ interface RemoteCheckCaptureWidgetProps extends WidgetProviderProps {
|
|
|
1008
737
|
}
|
|
1009
738
|
declare function RemoteCheckCaptureWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, labels, onDepositComplete, }: RemoteCheckCaptureWidgetProps): React.JSX.Element;
|
|
1010
739
|
|
|
1011
|
-
export {
|
|
1012
|
-
export type {
|
|
740
|
+
export { RemoteCheckCaptureWidget };
|
|
741
|
+
export type { RemoteCheckCaptureWidgetProps };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./InvoiceSettings.js";
|
|
3
|
-
import { RemoteCheckCaptureWidget as t } from "../libs/tesouro-embedded-components-react/remote-check-capture/feature/dist/lib/RemoteCheckCaptureWidget/RemoteCheckCaptureWidget.js";
|
|
1
|
+
import { RemoteCheckCaptureWidget as e } from "../libs/tesouro-embedded-components-react/remote-check-capture/feature/dist/lib/RemoteCheckCaptureWidget/RemoteCheckCaptureWidget.js";
|
|
4
2
|
import "./RemoteCheckCapture.js";
|
|
5
|
-
export { e as
|
|
3
|
+
export { e as RemoteCheckCaptureWidget };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useEmbedApi as e } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
|
+
import "../../../../shared/data-access/dist/index.js";
|
|
7
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index2.js
|
|
8
|
+
function t() {
|
|
9
|
+
let { organizationId: t, widgetToken: n } = e();
|
|
10
|
+
return { isReady: !!(t && n) };
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { t as useCreateCard };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { organizationHeaders as e } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
2
|
+
import { getDebitCardsQueryKey as t, getVelocityControlsQueryKey as n } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
3
|
+
import "../../../../shared/data-access/dist/index.js";
|
|
4
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index3.js
|
|
5
|
+
function r({ client: n, organizationId: r }) {
|
|
6
|
+
return t({
|
|
7
|
+
client: n,
|
|
8
|
+
headers: e(r)
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function i({ client: t, organizationId: r }) {
|
|
12
|
+
return n({
|
|
13
|
+
client: t,
|
|
14
|
+
headers: e(r)
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { r as debitCardsInvalidationKey, i as velocityControlsInvalidationKey };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { invalidateAllClients as e } from "../../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
6
|
+
import { useEmbedApi as t } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
7
|
+
import { organizationHeaders as n } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
8
|
+
import { createDebitCardMutation as r } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
9
|
+
import "../../../../shared/data-access/dist/index.js";
|
|
10
|
+
import { debitCardsInvalidationKey as i } from "./index3.js";
|
|
11
|
+
import { useMutation as a } from "@tanstack/react-query";
|
|
12
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index4.js
|
|
13
|
+
function o() {
|
|
14
|
+
let { client: o, organizationId: s } = t(), c = n(s), l = r({
|
|
15
|
+
client: o,
|
|
16
|
+
headers: c
|
|
17
|
+
});
|
|
18
|
+
return a({
|
|
19
|
+
...l,
|
|
20
|
+
onSuccess: async (...t) => {
|
|
21
|
+
await e(i({
|
|
22
|
+
client: o,
|
|
23
|
+
organizationId: s
|
|
24
|
+
})), await l.onSuccess?.(...t);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { o as useCreateDebitCardMutation };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { invalidateAllClients as e } from "../../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
6
|
+
import { useEmbedApi as t } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
7
|
+
import { organizationHeaders as n } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
8
|
+
import { createVelocityControlMutation as r } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
9
|
+
import "../../../../shared/data-access/dist/index.js";
|
|
10
|
+
import { velocityControlsInvalidationKey as i } from "./index3.js";
|
|
11
|
+
import { useMutation as a } from "@tanstack/react-query";
|
|
12
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index5.js
|
|
13
|
+
function o() {
|
|
14
|
+
let { client: o, organizationId: s } = t(), c = n(s), l = r({
|
|
15
|
+
client: o,
|
|
16
|
+
headers: c
|
|
17
|
+
});
|
|
18
|
+
return a({
|
|
19
|
+
...l,
|
|
20
|
+
onSuccess: async (...t) => {
|
|
21
|
+
await e(i({
|
|
22
|
+
client: o,
|
|
23
|
+
organizationId: s
|
|
24
|
+
})), await l.onSuccess?.(...t);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { o as useCreateVelocityControlMutation };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { invalidateAllClients as e } from "../../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
6
|
+
import { useEmbedApi as t } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
7
|
+
import { organizationHeaders as n } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
8
|
+
import { manageDebitCardAccessMutation as r } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
9
|
+
import "../../../../shared/data-access/dist/index.js";
|
|
10
|
+
import { debitCardsInvalidationKey as i } from "./index3.js";
|
|
11
|
+
import { useMutation as a } from "@tanstack/react-query";
|
|
12
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index6.js
|
|
13
|
+
function o() {
|
|
14
|
+
let { client: o, organizationId: s } = t(), c = n(s), l = r({
|
|
15
|
+
client: o,
|
|
16
|
+
headers: c
|
|
17
|
+
});
|
|
18
|
+
return a({
|
|
19
|
+
...l,
|
|
20
|
+
onSuccess: async (...t) => {
|
|
21
|
+
await e(i({
|
|
22
|
+
client: o,
|
|
23
|
+
organizationId: s
|
|
24
|
+
})), await l.onSuccess?.(...t);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { o as useManageDebitCardAccessMutation };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useEmbedApi as e } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
|
+
import { getOrganizationOptions as t } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
+
import { withAuthEpoch as n } from "../../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
8
|
+
import "../../../../shared/data-access/dist/index.js";
|
|
9
|
+
import { useQuery as r } from "@tanstack/react-query";
|
|
10
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index7.js
|
|
11
|
+
function i({ enabled: i } = {}) {
|
|
12
|
+
let { client: a, organizationId: o, widgetToken: s, authEpoch: c } = e(), l = t({
|
|
13
|
+
client: a,
|
|
14
|
+
path: { organizationId: o ?? "" }
|
|
15
|
+
});
|
|
16
|
+
return r({
|
|
17
|
+
...n(l, c),
|
|
18
|
+
enabled: !!(o && s) && (i === !0 || i === void 0)
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { i as useCreateCardOrganizationQuery };
|
package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index2.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CARDS_WIDGET_NAME as e } from "../../../shared/util/dist/lib/widgetName.js";
|
|
2
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index2.js
|
|
3
|
+
var t = `${e}.create_card`, n = { Mounted: `${t}.mounted` };
|
|
4
|
+
//#endregion
|
|
5
|
+
export { n as CreateCardWidgetAnalyticsEvent, t as WIDGET_NAME };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MailingOptionValue as e } from "../../ui/dist/lib/CreateCardWidget/types.js";
|
|
2
2
|
import "../../ui/dist/index.js";
|
|
3
|
-
//#region ../../libs/tesouro-embedded-components-react/create-card
|
|
3
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index3.js
|
|
4
4
|
var t = {
|
|
5
5
|
Virtual: "virtual",
|
|
6
6
|
Physical: "physical"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { parseDecimalAmountToMinorUnits as e } from "
|
|
2
|
-
//#region ../../libs/tesouro-embedded-components-react/create-card
|
|
1
|
+
import { parseDecimalAmountToMinorUnits as e } from "../../../../shared/util/dist/lib/parseDecimalAmountToMinorUnits.js";
|
|
2
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index4.js
|
|
3
3
|
var t = {
|
|
4
4
|
OneTime: "LIFETIME",
|
|
5
5
|
Daily: "DAY",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { hasAnyScope as e } from "
|
|
2
|
-
import { Scope as t } from "
|
|
3
|
-
import "
|
|
4
|
-
//#region ../../libs/tesouro-embedded-components-react/create-card
|
|
1
|
+
import { hasAnyScope as e } from "../../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
2
|
+
import { Scope as t } from "../../../../shared/data-access/dist/lib/scopes.js";
|
|
3
|
+
import "../../../../shared/data-access/dist/index.js";
|
|
4
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index6.js
|
|
5
5
|
var n = "authorization_control:write:org";
|
|
6
6
|
function r(r) {
|
|
7
7
|
let i = new Set(r ?? []);
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { Scope as e } from "
|
|
6
|
-
import { useAllOrganizationUsersQuery as t } from "
|
|
7
|
-
import "
|
|
5
|
+
import { Scope as e } from "../../../../shared/data-access/dist/lib/scopes.js";
|
|
6
|
+
import { useAllOrganizationUsersQuery as t } from "../../../../shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js";
|
|
7
|
+
import "../../../../shared/data-access/dist/index.js";
|
|
8
8
|
import { useCallback as n, useMemo as r } from "react";
|
|
9
|
-
//#region ../../libs/tesouro-embedded-components-react/create-card
|
|
9
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index7.js
|
|
10
10
|
var i = e.DebitCardReadOrg;
|
|
11
11
|
function a(e) {
|
|
12
12
|
let t = e.name?.trim(), n = e.email?.trim();
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { toast as e } from "
|
|
6
|
-
import { Scope as t } from "
|
|
7
|
-
import { useAllBankAccountsQuery as n } from "
|
|
8
|
-
import { useAllMerchantCategoryGroupsQuery as r } from "
|
|
9
|
-
import { useAllOrganizationUsersQuery as i } from "
|
|
10
|
-
import "
|
|
11
|
-
import { EmbeddedToaster as a } from "
|
|
12
|
-
import "
|
|
13
|
-
import { useAnalyticsTrack as o } from "
|
|
14
|
-
import { WidgetProvider as s } from "
|
|
15
|
-
import { getStateOptions as ee } from "
|
|
16
|
-
import { useWidgetConfig as te } from "
|
|
17
|
-
import "
|
|
18
|
-
import { filterUsersForOrganization as ne } from "
|
|
5
|
+
import { toast as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { Scope as t } from "../../../../shared/data-access/dist/lib/scopes.js";
|
|
7
|
+
import { useAllBankAccountsQuery as n } from "../../../../shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js";
|
|
8
|
+
import { useAllMerchantCategoryGroupsQuery as r } from "../../../../shared/data-access/dist/lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js";
|
|
9
|
+
import { useAllOrganizationUsersQuery as i } from "../../../../shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js";
|
|
10
|
+
import "../../../../shared/data-access/dist/index.js";
|
|
11
|
+
import { EmbeddedToaster as a } from "../../../../shared/ui/dist/lib/EmbeddedToaster.js";
|
|
12
|
+
import "../../../../shared/ui/dist/index.js";
|
|
13
|
+
import { useAnalyticsTrack as o } from "../../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
14
|
+
import { WidgetProvider as s } from "../../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
15
|
+
import { getStateOptions as ee } from "../../../../shared/util/dist/lib/usStates.js";
|
|
16
|
+
import { useWidgetConfig as te } from "../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
17
|
+
import "../../../../shared/feature/dist/index.js";
|
|
18
|
+
import { filterUsersForOrganization as ne } from "../../../../../shared/util-validation/dist/index7.js";
|
|
19
19
|
import { CREATE_CARD_WIDGET_LABELS_EN as c } from "../../ui/dist/lib/CreateCardWidget/labels.js";
|
|
20
20
|
import { CreateCardView as l, MailingOptionValue as u } from "../../ui/dist/lib/CreateCardWidget/types.js";
|
|
21
21
|
import { CreateCardWidget as re } from "../../ui/dist/lib/CreateCardWidget/CreateCardWidget.js";
|
|
@@ -34,7 +34,7 @@ import { useCreateCardOrganizationQuery as xe } from "../../data-access/dist/ind
|
|
|
34
34
|
import "../../data-access/dist/index.js";
|
|
35
35
|
import { useEffect as p, useMemo as m, useRef as h, useState as g } from "react";
|
|
36
36
|
import { Fragment as Se, jsx as _, jsxs as Ce } from "react/jsx-runtime";
|
|
37
|
-
//#region ../../libs/tesouro-embedded-components-react/create-card
|
|
37
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index8.js
|
|
38
38
|
var we = t.DebitCardIssueOrg, Te = {
|
|
39
39
|
street: "",
|
|
40
40
|
city: "",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { cn as e } from "
|
|
1
|
+
import { cn as e } from "../../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
-
//#region ../../libs/tesouro-embedded-components-react/create-card
|
|
3
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/CardArt.js
|
|
4
4
|
function n({ src: n, alt: r, className: i }) {
|
|
5
5
|
return /* @__PURE__ */ t("img", {
|
|
6
6
|
src: n,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Collapsible as e, CollapsibleContent as t, Switch as n } from "
|
|
1
|
+
import { Collapsible as e, CollapsibleContent as t, Switch as n } from "../../../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
2
|
import { useId as r } from "react";
|
|
3
3
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
4
|
-
//#region ../../libs/tesouro-embedded-components-react/create-card
|
|
4
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/CardControls/CardControlRow.js
|
|
5
5
|
function o({ title: o, description: s, checked: c, onCheckedChange: l, disabled: u = !1, children: d }) {
|
|
6
6
|
let f = r(), p = `${f}-title`, m = `${f}-description`, h = `${f}-drawer`;
|
|
7
7
|
return /* @__PURE__ */ a("div", {
|