@tesouro/embedded-components-react 0.5.228 → 0.5.230
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 +22 -21
- package/dist/index.d.ts +34 -1
- package/dist/index.js +1 -1
- package/dist/lib/ReceivablesWidget.d.ts +34 -1
- package/dist/lib/ReceivablesWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index5.js +32 -33
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +34 -32
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index10.js +120 -52
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index11.js +44 -100
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +93 -337
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +356 -211
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index14.js +225 -157
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +152 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +18 -221
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +224 -56
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +126 -231
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +53 -298
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index20.js +232 -43
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +295 -118
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index22.js +38 -145
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +126 -46
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index24.js +145 -117
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index25.js +38 -91
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index26.js +113 -107
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index27.js +94 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index28.js +104 -619
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index29.js +34 -41
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index30.js +635 -34
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index31.js +39 -77
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index32.js +34 -117
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index33.js +75 -318
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index34.js +139 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index35.js +340 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index8.js +55 -468
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +443 -97
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +24 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +32 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +205 -84
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +161 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +12 -20
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +23 -40
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +2 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +90 -68
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +3 -20
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +20 -12
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +40 -30
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +14 -7
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +15 -301
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +73 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +17 -45
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +12 -68
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +26 -490
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +294 -95
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +48 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +72 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +496 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index3.js +121 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +97 -91
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +2 -236
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +1 -249
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +89 -82
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +23 -54
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +223 -340
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +249 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +100 -216
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +93 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +59 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +353 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index5.js +35 -29
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +2 -216
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +9 -159
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +27 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +216 -23
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/index.js +12 -12
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +0 -28
package/README.md
CHANGED
|
@@ -503,27 +503,28 @@ Lists, creates, edits and acts on an organization's invoices, quotes and credit
|
|
|
503
503
|
|
|
504
504
|
#### Props
|
|
505
505
|
|
|
506
|
-
| Prop | Type | Default | Description
|
|
507
|
-
| -------------------------- | ---------------------------------------------------- | ---------------------------------------- |
|
|
508
|
-
| `defaultTab` | `ReceivablesWidgetTab` | `'invoices'` | Initial tab; if omitted or disabled, the widget starts on the first enabled tab.
|
|
509
|
-
| `enabledTabs` | `ReceivablesWidgetTab[]` | `['invoices', 'quotes', 'credit_notes']` | Tabs visible to the user. Duplicate or unknown values are ignored.
|
|
510
|
-
| `pageSizeOptions` | `number[]` | `[10, 25, 50, 100]` | Rows-per-page choices. The first page loads with a page size of `10`.
|
|
511
|
-
| `onReceivableCreated` | `(id: string, type: ReceivableDocumentType) => void` | `undefined` | Called after a create or clone succeeds.
|
|
512
|
-
| `onReceivableOpened` | `(id: string, type: ReceivableDocumentType) => void` | `undefined` | Called when the user opens a row's details panel.
|
|
513
|
-
| `onTemplateSettingsClick` | `() => void` | `undefined` | Shows a template settings action in the header and calls this handler when clicked.
|
|
514
|
-
| `embeddedBankName` | `string` | `undefined` | Sponsor bank name shown as "Powered by {embeddedBankName}" next to embedded accounts in the invoice payment-account picker. Omitted when unset.
|
|
515
|
-
| `screenLabels` | `ReceivablesScreenLabelOverrides` | English labels | Table, tab, filter, empty, error, action and status badge copy.
|
|
516
|
-
| `formLabels` | `Partial<ReceivableFormSheetLabels>` | English labels | Create/edit form copy; the save and issue buttons are in `messageLabels`.
|
|
517
|
-
| `detailsLabels` | `ReceivableDetailsPanelLabelOverrides` | English labels | Details panel copy. Status badge copy comes from `screenLabels.statusBadge`.
|
|
518
|
-
| `sendLabels` | `Partial<ReceivableSendDialogLabels>` | English labels | Send-email dialog copy.
|
|
519
|
-
| `paymentLabels` | `Partial<ReceivablePaymentDialogLabels>` | English labels | Manual payment dialog copy.
|
|
520
|
-
| `actionLabels` | `Partial<ReceivableActionDialogLabels>` | English labels | Confirmation dialog buttons; per-action titles come from `messageLabels`.
|
|
521
|
-
| `
|
|
522
|
-
| `
|
|
523
|
-
| `
|
|
524
|
-
| `
|
|
525
|
-
| `
|
|
526
|
-
| `
|
|
506
|
+
| Prop | Type | Default | Description |
|
|
507
|
+
| -------------------------- | ---------------------------------------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
508
|
+
| `defaultTab` | `ReceivablesWidgetTab` | `'invoices'` | Initial tab; if omitted or disabled, the widget starts on the first enabled tab. |
|
|
509
|
+
| `enabledTabs` | `ReceivablesWidgetTab[]` | `['invoices', 'quotes', 'credit_notes']` | Tabs visible to the user. Duplicate or unknown values are ignored. |
|
|
510
|
+
| `pageSizeOptions` | `number[]` | `[10, 25, 50, 100]` | Rows-per-page choices. The first page loads with a page size of `10`. |
|
|
511
|
+
| `onReceivableCreated` | `(id: string, type: ReceivableDocumentType) => void` | `undefined` | Called after a create or clone succeeds. |
|
|
512
|
+
| `onReceivableOpened` | `(id: string, type: ReceivableDocumentType) => void` | `undefined` | Called when the user opens a row's details panel. |
|
|
513
|
+
| `onTemplateSettingsClick` | `() => void` | `undefined` | Shows a template settings action in the header and calls this handler when clicked. |
|
|
514
|
+
| `embeddedBankName` | `string` | `undefined` | Sponsor bank name shown as "Powered by {embeddedBankName}" next to embedded accounts in the invoice payment-account picker. Omitted when unset. |
|
|
515
|
+
| `screenLabels` | `ReceivablesScreenLabelOverrides` | English labels | Table, tab, filter, empty, error, action and status badge copy. |
|
|
516
|
+
| `formLabels` | `Partial<ReceivableFormSheetLabels>` | English labels | Create/edit form copy; the save and issue buttons are in `messageLabels`. |
|
|
517
|
+
| `detailsLabels` | `ReceivableDetailsPanelLabelOverrides` | English labels | Details panel copy. Status badge copy comes from `screenLabels.statusBadge`. |
|
|
518
|
+
| `sendLabels` | `Partial<ReceivableSendDialogLabels>` | English labels | Send-email dialog copy. |
|
|
519
|
+
| `paymentLabels` | `Partial<ReceivablePaymentDialogLabels>` | English labels | Manual payment dialog copy. |
|
|
520
|
+
| `actionLabels` | `Partial<ReceivableActionDialogLabels>` | English labels | Confirmation dialog buttons; per-action titles come from `messageLabels`. |
|
|
521
|
+
| `actionsModalLabels` | `Partial<ReceivableActionsModalLabels>` | English labels | Copy of the modal shown after a create: the email step and the save-items-as-products step. Its titles, toasts and select-all toggle are in `messageLabels`. |
|
|
522
|
+
| `counterpartFormLabels` | `PartialDeep<CounterpartFormSheetLabels>` | English labels | Inline customer creation copy. |
|
|
523
|
+
| `measureUnitsLabels` | `Partial<MeasureUnitsManagerLabels>` | English labels | Measure-unit manager copy. |
|
|
524
|
+
| `measureUnitDeleteLabels` | `Partial<MeasureUnitDeleteDialogLabels>` | English labels | Measure-unit delete confirmation copy. |
|
|
525
|
+
| `messageLabels` | `Partial<ReceivableMessageLabels>` | English labels | Validation, fallback, details panel, reminder and confirmation messages, including the form's save and issue buttons and a new reminder's subject and body. |
|
|
526
|
+
| `productMessageLabels` | `Partial<ProductMessageLabels>` | English labels | Product validation and error messages. |
|
|
527
|
+
| `counterpartMessageLabels` | `Partial<CounterpartMessageLabels>` | English labels | Customer validation and error messages. |
|
|
527
528
|
|
|
528
529
|
### SettingsWidget
|
|
529
530
|
|
package/dist/index.d.ts
CHANGED
|
@@ -4808,6 +4808,22 @@ interface ProductMessageLabels {
|
|
|
4808
4808
|
updateMeasureUnitError: string;
|
|
4809
4809
|
}
|
|
4810
4810
|
|
|
4811
|
+
interface ReceivableActionsModalLabels {
|
|
4812
|
+
issueDescription: string;
|
|
4813
|
+
toLabel: string;
|
|
4814
|
+
subjectLabel: string;
|
|
4815
|
+
messageLabel: string;
|
|
4816
|
+
messagePlaceholder: string;
|
|
4817
|
+
attachmentsLabel: string;
|
|
4818
|
+
attachmentsCaption: string;
|
|
4819
|
+
skipButton: string;
|
|
4820
|
+
sendButton: string;
|
|
4821
|
+
productsQuestion: string;
|
|
4822
|
+
productsCaption: string;
|
|
4823
|
+
productsAllLabel: string;
|
|
4824
|
+
saveItemsButton: string;
|
|
4825
|
+
}
|
|
4826
|
+
|
|
4811
4827
|
interface ReceivableBillingSectionLabels {
|
|
4812
4828
|
billingHeading: string;
|
|
4813
4829
|
billingDescription: string;
|
|
@@ -5288,6 +5304,22 @@ interface ReceivableMessageLabels {
|
|
|
5288
5304
|
unknownError: string;
|
|
5289
5305
|
/** `{message}` is the first reasons, `{count}` how many more there are. */
|
|
5290
5306
|
apiErrorsSummary: string;
|
|
5307
|
+
/** `{name}` is replaced with the customer's name. */
|
|
5308
|
+
actionsIssueTitle: string;
|
|
5309
|
+
/** `{documentId}` and `{name}` are replaced with the invoice number and customer name. */
|
|
5310
|
+
actionsSubjectWithNumber: string;
|
|
5311
|
+
/** `{name}` is replaced with the customer's name. */
|
|
5312
|
+
actionsSubject: string;
|
|
5313
|
+
actionsSendSucceeded: string;
|
|
5314
|
+
actionsSendFailed: string;
|
|
5315
|
+
actionsTitleSent: string;
|
|
5316
|
+
actionsTitleIssued: string;
|
|
5317
|
+
actionsTitleRecurrence: string;
|
|
5318
|
+
actionsTitleDraft: string;
|
|
5319
|
+
actionsSelectAll: string;
|
|
5320
|
+
actionsDeselectAll: string;
|
|
5321
|
+
actionsProductsSaved: string;
|
|
5322
|
+
actionsProductsSaveFailed: string;
|
|
5291
5323
|
/** `{taxId}` is replaced with the party's tax ID. */
|
|
5292
5324
|
previewTaxId: string;
|
|
5293
5325
|
previewTaxableYes: string;
|
|
@@ -5333,6 +5365,7 @@ interface ReceivablesWidgetOwnProps {
|
|
|
5333
5365
|
sendLabels?: Partial<ReceivableSendDialogLabels>;
|
|
5334
5366
|
paymentLabels?: Partial<ReceivablePaymentDialogLabels>;
|
|
5335
5367
|
actionLabels?: Partial<ReceivableActionDialogLabels>;
|
|
5368
|
+
actionsModalLabels?: Partial<ReceivableActionsModalLabels>;
|
|
5336
5369
|
counterpartFormLabels?: PartialDeep<CounterpartFormSheetLabels>;
|
|
5337
5370
|
measureUnitsLabels?: Partial<MeasureUnitsManagerLabels>;
|
|
5338
5371
|
measureUnitDeleteLabels?: Partial<MeasureUnitDeleteDialogLabels>;
|
|
@@ -5771,4 +5804,4 @@ interface GapCoverageAlertProps {
|
|
|
5771
5804
|
type PendingFeatureStyleSources = CheckAmountAndDetailScreenProps | GapCoverageAlertProps | NoPolicyBannerProps;
|
|
5772
5805
|
|
|
5773
5806
|
export { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, ADDITIONAL_OWNERS_LABELS_EN, APPLICATION_STATUS_LABELS_EN, AcceptDisclosuresWidget, BALANCES_WIDGET_LABELS_EN, BUSINESS_DETAILS_LABELS_EN, BalancesWidget, BankAccountOnboardingWidget, BankAccountsWidget, BillPayWidget, CardDetailsWidget, CounterpartsWidget, CreditCardsWidget, CustomersWidget, DebitCardsWidget, ERROR_STATE_ID, ExpenseManagementWidget, HELP_FAQ_EN, INSIGHTS_FEATURE_LABELS_EN, INSIGHTS_WIDGET_LABELS_EN, Implementation, InsightsWidget, ReceivablesWidgetMonite as InvoicingWidget, LinkedAccountsWidget, MARKETING_WIDGET_LABELS_EN, MARKETING_WIDGET_STATUS_LABELS_EN, MarketingBenefitIcon, MarketingWidget, PERSONAL_DETAILS_LABELS_EN, ProductsWidget, RESULT_LABELS_EN, ReceivablesWidget, RefreshingRootWidgetProvider, RootWidgetProvider, SINGLE_INSIGHT_LABELS_EN, Scope, SettingsSection, SettingsWidget, DEFAULT_FEATURE_LABELS as TRANSFERS_FEATURE_LABELS_EN, TRANSFERS_WIDGET_LABELS_EN, TransfersWidget, UIFramework, UploadReceiptWidget, WIDGET_SUITE_DEFAULT_SECTIONS, WIDGET_SUITE_LABELS_EN, WidgetProvider, WidgetSuite, WidgetSuiteSectionId, WidgetTokenRefreshProvider, cloneEmbeddedClient, getGlobalWidgetConfig, getGlobalWidgetInitState, isScope, registerDesignSystemEnsurer, registerUIRenderers, setGlobalWidgetConfig, subscribeToGlobalWidgetInitState, updateGlobalWidgetConfig, useDisclosuresAcceptanceSurface, useOwnWidgetConfig, useRefetchWidget, useWidgetConfig, useWidgetError, useWidgetInitStaleForToken, useWidgetLoading, useWidgetToken };
|
|
5774
|
-
export type { AcceptDisclosuresWidgetLabels, AcceptDisclosuresWidgetProps, AccordionItemCardLabels, Labels$3 as AccountDetailsWidgetLabels, ActivateCardPanelLabels, AdditionalOwner, AdditionalOwnersLabels, AddressFormSheetLabels, ApplicationStatusLabelValues, ApplicationStatusLabels, ApplicationStatusNoticeLabels, BalancesWidgetLabels, BalancesWidgetProps, BankAccountFormSheetLabels, BankAccountOnboardingWidgetLabels, BankAccountOnboardingWidgetProps, FeatureLabels$3 as BankAccountsWidgetFeatureLabels, Labels$4 as BankAccountsWidgetLabels, BankAccountsWidgetProps, BillPayWidgetProps, BusinessDetailsLabels, BusinessDetailsValues, CardDetailsFeatureLabels, CardDetailsPanelLabels as CardDetailsWidgetLabels, CardDetailsWidgetProps, CardsFeatureLabels, CardsListLabels as CardsLabels, CardsPagination, CompanyStructureValue, ConfirmDeleteDialogLabels, CounterpartActionTarget, CounterpartDetailsSheetLabels, CounterpartFormSheetLabels, CounterpartMessageLabels, CounterpartMode, CounterpartsScreenLabels, CounterpartsWidgetProps, CreditCardsWidgetProps, CustomersWidgetOwnProps, CustomersWidgetProps, DebitCardsWidgetProps, DisclosureLinks, EmbeddedClient, Labels$2 as ExpenseManagementWidgetLabels, ExpenseManagementWidgetProps, FileViewerLabels, HelpFaqAnswer, HelpFaqBullet, HelpFaqBulletType, HelpFaqItem, HelpFaqSection, InsightsFeatureLabels, InsightsWidgetLabels, InsightsWidgetProps, ReceivablesWidgetMoniteProps as InvoicingWidgetProps, LinkComponent, LinkComponentProps, FeatureLabels$2 as LinkedAccountsWidgetFeatureLabels, Labels$1 as LinkedAccountsWidgetLabels, LinkedAccountsWidgetProps, MarketingStatusLabelValues, MarketingStatusNoticeLabels, MarketingWidgetAppearance, MarketingWidgetBenefit, MarketingWidgetContent, MarketingWidgetHowItWorksStep, MarketingWidgetImage, MarketingWidgetLabels, MarketingWidgetProps, MarketingWidgetStatusLabels, MeasureUnitDeleteDialogLabels, MeasureUnitsManagerLabels, PendingFeatureStyleSources, PersonalDetailsLabels, PersonalDetailsValues, ProductDeleteDialogLabels, ProductDetailsSheetLabels, ProductFormSheetLabels, ProductMessageLabels, ProductsScreenLabels, ProductsWidgetProps, ReceiptMatchSummary, ReceivableActionDialogLabels, ReceivableDetailsPanelLabelOverrides, ReceivableDetailsPanelLabels, ReceivableDocumentType, ReceivableFormSheetLabels, ReceivableMessageLabels, ReceivablePaymentDialogLabels, ReceivableSendDialogLabels, ReceivableStatusBadgeLabels, ReceivablesScreenLabelOverrides, ReceivablesScreenLabels, ReceivablesWidgetProps, ReceivablesWidgetTab, RefreshingRootWidgetProviderProps, ResultLabels, RootWidgetProviderProps, SettingsWidgetAdditionalSection, FeatureLabels$1 as SettingsWidgetFeatureLabels, Labels as SettingsWidgetLabels, SettingsWidgetProps, SettingsWidgetSection, SettingsWidgetSectionId, SingleInsightLabels, TransactionDetailsActionsLabels, TransactionDetailsLabels, FeatureLabels as TransfersWidgetFeatureLabels, TransfersWidgetLabels, TransfersWidgetProps, UploadReceiptWidgetProps, WidgetConfig, WidgetConfigInput, WidgetInitResponse, WidgetInitState, WidgetProviderLabels, WidgetProviderProps, WidgetSuiteCardsLabels, WidgetSuiteDashboardLabels, WidgetSuiteDisclosureLabels, WidgetSuiteExpensesLabels, WidgetSuiteLabelOverrides, WidgetSuiteLabels, WidgetSuiteMenuLabels, WidgetSuiteOnboardingGateLabels, WidgetSuiteOnboardingLabels, WidgetSuiteProps, WidgetSuiteSectionContentLabels, WidgetSuiteSectionTitleLabels, WidgetTokenFetcher, WidgetTokenManager, WidgetTokenRefreshProviderProps, WidgetTokenState };
|
|
5807
|
+
export type { AcceptDisclosuresWidgetLabels, AcceptDisclosuresWidgetProps, AccordionItemCardLabels, Labels$3 as AccountDetailsWidgetLabels, ActivateCardPanelLabels, AdditionalOwner, AdditionalOwnersLabels, AddressFormSheetLabels, ApplicationStatusLabelValues, ApplicationStatusLabels, ApplicationStatusNoticeLabels, BalancesWidgetLabels, BalancesWidgetProps, BankAccountFormSheetLabels, BankAccountOnboardingWidgetLabels, BankAccountOnboardingWidgetProps, FeatureLabels$3 as BankAccountsWidgetFeatureLabels, Labels$4 as BankAccountsWidgetLabels, BankAccountsWidgetProps, BillPayWidgetProps, BusinessDetailsLabels, BusinessDetailsValues, CardDetailsFeatureLabels, CardDetailsPanelLabels as CardDetailsWidgetLabels, CardDetailsWidgetProps, CardsFeatureLabels, CardsListLabels as CardsLabels, CardsPagination, CompanyStructureValue, ConfirmDeleteDialogLabels, CounterpartActionTarget, CounterpartDetailsSheetLabels, CounterpartFormSheetLabels, CounterpartMessageLabels, CounterpartMode, CounterpartsScreenLabels, CounterpartsWidgetProps, CreditCardsWidgetProps, CustomersWidgetOwnProps, CustomersWidgetProps, DebitCardsWidgetProps, DisclosureLinks, EmbeddedClient, Labels$2 as ExpenseManagementWidgetLabels, ExpenseManagementWidgetProps, FileViewerLabels, HelpFaqAnswer, HelpFaqBullet, HelpFaqBulletType, HelpFaqItem, HelpFaqSection, InsightsFeatureLabels, InsightsWidgetLabels, InsightsWidgetProps, ReceivablesWidgetMoniteProps as InvoicingWidgetProps, LinkComponent, LinkComponentProps, FeatureLabels$2 as LinkedAccountsWidgetFeatureLabels, Labels$1 as LinkedAccountsWidgetLabels, LinkedAccountsWidgetProps, MarketingStatusLabelValues, MarketingStatusNoticeLabels, MarketingWidgetAppearance, MarketingWidgetBenefit, MarketingWidgetContent, MarketingWidgetHowItWorksStep, MarketingWidgetImage, MarketingWidgetLabels, MarketingWidgetProps, MarketingWidgetStatusLabels, MeasureUnitDeleteDialogLabels, MeasureUnitsManagerLabels, PendingFeatureStyleSources, PersonalDetailsLabels, PersonalDetailsValues, ProductDeleteDialogLabels, ProductDetailsSheetLabels, ProductFormSheetLabels, ProductMessageLabels, ProductsScreenLabels, ProductsWidgetProps, ReceiptMatchSummary, ReceivableActionDialogLabels, ReceivableActionsModalLabels, ReceivableDetailsPanelLabelOverrides, ReceivableDetailsPanelLabels, ReceivableDocumentType, ReceivableFormSheetLabels, ReceivableMessageLabels, ReceivablePaymentDialogLabels, ReceivableSendDialogLabels, ReceivableStatusBadgeLabels, ReceivablesScreenLabelOverrides, ReceivablesScreenLabels, ReceivablesWidgetProps, ReceivablesWidgetTab, RefreshingRootWidgetProviderProps, ResultLabels, RootWidgetProviderProps, SettingsWidgetAdditionalSection, FeatureLabels$1 as SettingsWidgetFeatureLabels, Labels as SettingsWidgetLabels, SettingsWidgetProps, SettingsWidgetSection, SettingsWidgetSectionId, SingleInsightLabels, TransactionDetailsActionsLabels, TransactionDetailsLabels, FeatureLabels as TransfersWidgetFeatureLabels, TransfersWidgetLabels, TransfersWidgetProps, UploadReceiptWidgetProps, WidgetConfig, WidgetConfigInput, WidgetInitResponse, WidgetInitState, WidgetProviderLabels, WidgetProviderProps, WidgetSuiteCardsLabels, WidgetSuiteDashboardLabels, WidgetSuiteDisclosureLabels, WidgetSuiteExpensesLabels, WidgetSuiteLabelOverrides, WidgetSuiteLabels, WidgetSuiteMenuLabels, WidgetSuiteOnboardingGateLabels, WidgetSuiteOnboardingLabels, WidgetSuiteProps, WidgetSuiteSectionContentLabels, WidgetSuiteSectionTitleLabels, WidgetTokenFetcher, WidgetTokenManager, WidgetTokenRefreshProviderProps, WidgetTokenState };
|
package/dist/index.js
CHANGED
|
@@ -27,7 +27,7 @@ import { InsightsWidget as L } from "./libs/tesouro-embedded-components-react/in
|
|
|
27
27
|
import { UploadReceiptWidget as R } from "./libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index2.js";
|
|
28
28
|
import { ExpenseManagementWidget as z } from "./libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index21.js";
|
|
29
29
|
import { InvoicingWidget as B } from "./libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index3.js";
|
|
30
|
-
import { ReceivablesWidget as V } from "./libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/
|
|
30
|
+
import { ReceivablesWidget as V } from "./libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index35.js";
|
|
31
31
|
import { SettingsSection as H } from "./libs/tesouro-embedded-components-react/settings-widget/feature/dist/index4.js";
|
|
32
32
|
import { HELP_FAQ_EN as U } from "./libs/tesouro-embedded-components-react/settings-widget/help/ui/contract/dist/index3.js";
|
|
33
33
|
import { SettingsWidget as W } from "./libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js";
|
|
@@ -868,6 +868,22 @@ interface ProductMessageLabels {
|
|
|
868
868
|
updateMeasureUnitError: string;
|
|
869
869
|
}
|
|
870
870
|
|
|
871
|
+
interface ReceivableActionsModalLabels {
|
|
872
|
+
issueDescription: string;
|
|
873
|
+
toLabel: string;
|
|
874
|
+
subjectLabel: string;
|
|
875
|
+
messageLabel: string;
|
|
876
|
+
messagePlaceholder: string;
|
|
877
|
+
attachmentsLabel: string;
|
|
878
|
+
attachmentsCaption: string;
|
|
879
|
+
skipButton: string;
|
|
880
|
+
sendButton: string;
|
|
881
|
+
productsQuestion: string;
|
|
882
|
+
productsCaption: string;
|
|
883
|
+
productsAllLabel: string;
|
|
884
|
+
saveItemsButton: string;
|
|
885
|
+
}
|
|
886
|
+
|
|
871
887
|
interface ReceivableBillingSectionLabels {
|
|
872
888
|
billingHeading: string;
|
|
873
889
|
billingDescription: string;
|
|
@@ -1348,6 +1364,22 @@ interface ReceivableMessageLabels {
|
|
|
1348
1364
|
unknownError: string;
|
|
1349
1365
|
/** `{message}` is the first reasons, `{count}` how many more there are. */
|
|
1350
1366
|
apiErrorsSummary: string;
|
|
1367
|
+
/** `{name}` is replaced with the customer's name. */
|
|
1368
|
+
actionsIssueTitle: string;
|
|
1369
|
+
/** `{documentId}` and `{name}` are replaced with the invoice number and customer name. */
|
|
1370
|
+
actionsSubjectWithNumber: string;
|
|
1371
|
+
/** `{name}` is replaced with the customer's name. */
|
|
1372
|
+
actionsSubject: string;
|
|
1373
|
+
actionsSendSucceeded: string;
|
|
1374
|
+
actionsSendFailed: string;
|
|
1375
|
+
actionsTitleSent: string;
|
|
1376
|
+
actionsTitleIssued: string;
|
|
1377
|
+
actionsTitleRecurrence: string;
|
|
1378
|
+
actionsTitleDraft: string;
|
|
1379
|
+
actionsSelectAll: string;
|
|
1380
|
+
actionsDeselectAll: string;
|
|
1381
|
+
actionsProductsSaved: string;
|
|
1382
|
+
actionsProductsSaveFailed: string;
|
|
1351
1383
|
/** `{taxId}` is replaced with the party's tax ID. */
|
|
1352
1384
|
previewTaxId: string;
|
|
1353
1385
|
previewTaxableYes: string;
|
|
@@ -1393,6 +1425,7 @@ interface ReceivablesWidgetOwnProps {
|
|
|
1393
1425
|
sendLabels?: Partial<ReceivableSendDialogLabels>;
|
|
1394
1426
|
paymentLabels?: Partial<ReceivablePaymentDialogLabels>;
|
|
1395
1427
|
actionLabels?: Partial<ReceivableActionDialogLabels>;
|
|
1428
|
+
actionsModalLabels?: Partial<ReceivableActionsModalLabels>;
|
|
1396
1429
|
counterpartFormLabels?: PartialDeep<CounterpartFormSheetLabels>;
|
|
1397
1430
|
measureUnitsLabels?: Partial<MeasureUnitsManagerLabels>;
|
|
1398
1431
|
measureUnitDeleteLabels?: Partial<MeasureUnitDeleteDialogLabels>;
|
|
@@ -1405,4 +1438,4 @@ type ReceivablesWidgetProps = WidgetProviderProps & ReceivablesWidgetOwnProps;
|
|
|
1405
1438
|
declare function ReceivablesWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: ReceivablesWidgetProps): React.JSX.Element;
|
|
1406
1439
|
|
|
1407
1440
|
export { ReceivablesWidget };
|
|
1408
|
-
export type { CounterpartFormSheetLabels, CounterpartMessageLabels, MeasureUnitDeleteDialogLabels, MeasureUnitsManagerLabels, ProductFormSheetLabels, ProductMessageLabels, ReceivableActionDialogLabels, ReceivableDetailsPanelLabelOverrides, ReceivableDetailsPanelLabels, ReceivableDocumentType, ReceivableFormSheetLabels, ReceivableMessageLabels, ReceivablePaymentDialogLabels, ReceivableSendDialogLabels, ReceivableStatusBadgeLabels, ReceivablesScreenLabelOverrides, ReceivablesScreenLabels, ReceivablesWidgetProps, ReceivablesWidgetTab };
|
|
1441
|
+
export type { CounterpartFormSheetLabels, CounterpartMessageLabels, MeasureUnitDeleteDialogLabels, MeasureUnitsManagerLabels, ProductFormSheetLabels, ProductMessageLabels, ReceivableActionDialogLabels, ReceivableActionsModalLabels, ReceivableDetailsPanelLabelOverrides, ReceivableDetailsPanelLabels, ReceivableDocumentType, ReceivableFormSheetLabels, ReceivableMessageLabels, ReceivablePaymentDialogLabels, ReceivableSendDialogLabels, ReceivableStatusBadgeLabels, ReceivablesScreenLabelOverrides, ReceivablesScreenLabels, ReceivablesWidgetProps, ReceivablesWidgetTab };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ReceivablesWidget as e } from "../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/
|
|
1
|
+
import { ReceivablesWidget as e } from "../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index35.js";
|
|
2
2
|
import "../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js";
|
|
3
3
|
export { e as ReceivablesWidget };
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import "../../../shared/data-access/dist/index.js";
|
|
|
3
3
|
import "./index2.js";
|
|
4
4
|
import { useCreateEntityBankAccountMutation as t, usePaymentAccountsQuery as n } from "./index3.js";
|
|
5
5
|
import { useDeleteReceivableAttachmentMutation as r, useUploadReceivableAttachmentMutation as i } from "./index4.js";
|
|
6
|
-
import { useSendReceivableEmailMutation as a } from "./
|
|
6
|
+
import { useSendReceivableEmailMutation as a } from "./index6.js";
|
|
7
7
|
import { useAcceptReceivableMutation as o, useCancelReceivableMutation as s, useCloneReceivableMutation as c, useCreateReceivableMutation as l, useDeclineReceivableMutation as u, useDeleteReceivableMutation as d, useIssueReceivableMutation as f, useUpdateReceivableMutation as p } from "./index7.js";
|
|
8
8
|
import "./index8.js";
|
|
9
9
|
import { useMarkReceivablePaidMutation as m, useMarkReceivablePartiallyPaidMutation as h, useMarkReceivableUncollectibleMutation as g } from "./index9.js";
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js
CHANGED
|
@@ -10,7 +10,7 @@ import { useEmbedApi as l } from "../../../shared/data-access/dist/lib/EmbedApiC
|
|
|
10
10
|
import { organizationHeaders as u } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
11
11
|
import "../../../shared/data-access/dist/index.js";
|
|
12
12
|
import { overdueRemindersInvalidationKey as d, paymentRemindersInvalidationKey as f, recurrenceInvalidationKey as p, recurrencesInvalidationKey as m } from "./index2.js";
|
|
13
|
-
import { invalidateReceivable as h } from "./
|
|
13
|
+
import { invalidateReceivable as h } from "./index5.js";
|
|
14
14
|
import { useMutation as g, useQuery as _ } from "@tanstack/react-query";
|
|
15
15
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js
|
|
16
16
|
function v() {
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index5.js
CHANGED
|
@@ -1,37 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { postReceivablesIdSend as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
-
import { invalidateAllClients as t } from "../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
7
|
-
import { useEmbedApi as n } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
-
import { organizationHeaders as r } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
1
|
+
import { invalidateAllClients as e } from "../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
9
2
|
import "../../../shared/data-access/dist/index.js";
|
|
10
|
-
import { receivableHistoryInvalidationKey as i,
|
|
11
|
-
import { useMutation as o } from "@tanstack/react-query";
|
|
3
|
+
import { receivableHistoryInvalidationKey as t, receivableInvalidationKey as n, receivablePdfInvalidationKey as r, receivablesAnalyticsInvalidationKey as i, receivablesInvalidationKey as a } from "./index2.js";
|
|
12
4
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index5.js
|
|
13
|
-
function s
|
|
14
|
-
let
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
5
|
+
async function o({ client: o, organizationId: s, receivableId: c }) {
|
|
6
|
+
let l = [
|
|
7
|
+
a({
|
|
8
|
+
client: o,
|
|
9
|
+
organizationId: s
|
|
10
|
+
}),
|
|
11
|
+
i({
|
|
12
|
+
client: o,
|
|
13
|
+
organizationId: s
|
|
14
|
+
}),
|
|
15
|
+
...c ? [
|
|
16
|
+
n({
|
|
17
|
+
client: o,
|
|
18
|
+
organizationId: s,
|
|
19
|
+
receivableId: c
|
|
20
|
+
}),
|
|
21
|
+
t({
|
|
22
|
+
client: o,
|
|
23
|
+
organizationId: s,
|
|
24
|
+
receivableId: c
|
|
25
|
+
}),
|
|
26
|
+
r({
|
|
27
|
+
client: o,
|
|
28
|
+
organizationId: s,
|
|
29
|
+
receivableId: c
|
|
30
|
+
})
|
|
31
|
+
] : []
|
|
32
|
+
];
|
|
33
|
+
await Promise.all(l.map((t) => e(t)));
|
|
35
34
|
}
|
|
36
35
|
//#endregion
|
|
37
|
-
export {
|
|
36
|
+
export { o as invalidateReceivable };
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js
CHANGED
|
@@ -1,36 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { postReceivablesIdSend as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
+
import { invalidateAllClients as t } from "../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
7
|
+
import { useEmbedApi as n } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
+
import { organizationHeaders as r } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
2
9
|
import "../../../shared/data-access/dist/index.js";
|
|
3
|
-
import {
|
|
10
|
+
import { receivableMailsInvalidationKey as i } from "./index2.js";
|
|
11
|
+
import { invalidateReceivable as a } from "./index5.js";
|
|
12
|
+
import { useMutation as o } from "@tanstack/react-query";
|
|
4
13
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js
|
|
5
|
-
|
|
6
|
-
let
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
client: o,
|
|
28
|
-
organizationId: s,
|
|
29
|
-
receivableId: c
|
|
30
|
-
})
|
|
31
|
-
] : []
|
|
32
|
-
];
|
|
33
|
-
await Promise.all(l.map((t) => e(t)));
|
|
14
|
+
function s() {
|
|
15
|
+
let { client: s, organizationId: c } = n();
|
|
16
|
+
return o({
|
|
17
|
+
mutationFn: async ({ path: t, body: n }) => {
|
|
18
|
+
let { data: i } = await e({
|
|
19
|
+
client: s,
|
|
20
|
+
headers: r(c),
|
|
21
|
+
path: t,
|
|
22
|
+
body: n,
|
|
23
|
+
throwOnError: !0
|
|
24
|
+
});
|
|
25
|
+
return i;
|
|
26
|
+
},
|
|
27
|
+
onSuccess: async (e, n) => {
|
|
28
|
+
let r = {
|
|
29
|
+
client: s,
|
|
30
|
+
organizationId: c,
|
|
31
|
+
receivableId: n.path.receivable_id
|
|
32
|
+
};
|
|
33
|
+
await Promise.all([t(i(r)), a(r)]);
|
|
34
|
+
}
|
|
35
|
+
});
|
|
34
36
|
}
|
|
35
37
|
//#endregion
|
|
36
|
-
export {
|
|
38
|
+
export { s as useSendReceivableEmailMutation };
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js
CHANGED
|
@@ -6,7 +6,7 @@ import { deleteReceivablesId as e, patchReceivablesId as t, postReceivables as n
|
|
|
6
6
|
import { useEmbedApi as c } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
7
7
|
import { organizationHeaders as l } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
8
8
|
import "../../../shared/data-access/dist/index.js";
|
|
9
|
-
import { invalidateReceivable as u } from "./
|
|
9
|
+
import { invalidateReceivable as u } from "./index5.js";
|
|
10
10
|
import { useMutation as d } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js
|
|
12
12
|
function f() {
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index10.js
CHANGED
|
@@ -1,59 +1,127 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { RECEIVABLE_PAYMENT_TERMS_CUSTOM_DATE as e, RECEIVABLE_PAYMENT_TERMS_RECEIPT_DUE as t } from "../../ui/dist/index15.js";
|
|
2
|
+
import "../../ui/dist/index.js";
|
|
3
|
+
import { addDays as n, addYears as r, format as i, isValid as a, max as o, min as s, parseISO as c, subYears as l } from "date-fns";
|
|
3
4
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index10.js
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
function u(e) {
|
|
5
|
+
var u = "MMM d, yyyy", d = "yyyy-MM-dd", f = 10, p = 5;
|
|
6
|
+
function m(e) {
|
|
7
|
+
let t = (e) => e ? {
|
|
8
|
+
number_of_days: e.number_of_days ?? null,
|
|
9
|
+
discount: e.discount ?? null
|
|
10
|
+
} : null;
|
|
11
|
+
return JSON.stringify({
|
|
12
|
+
name: e.name,
|
|
13
|
+
description: e.description ?? null,
|
|
14
|
+
term_final: { number_of_days: e.term_final?.number_of_days ?? null },
|
|
15
|
+
term_1: t(e.term_1),
|
|
16
|
+
term_2: t(e.term_2)
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function h(e) {
|
|
20
|
+
let t = /* @__PURE__ */ new Set();
|
|
21
|
+
return e.filter((e) => {
|
|
22
|
+
let n = m(e);
|
|
23
|
+
return !t.has(n) && (t.add(n), !0);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function g(e) {
|
|
27
|
+
return i(e, u);
|
|
28
|
+
}
|
|
29
|
+
function _(e, t) {
|
|
30
|
+
let r = e.term_final?.number_of_days;
|
|
31
|
+
return r ? n(t, r) : void 0;
|
|
32
|
+
}
|
|
33
|
+
function v(e, t = /* @__PURE__ */ new Date()) {
|
|
34
|
+
let n = c(e);
|
|
35
|
+
return a(n) ? n : t;
|
|
36
|
+
}
|
|
37
|
+
function y(e, t) {
|
|
38
|
+
let n = _(e, t);
|
|
40
39
|
return {
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
value: e.id,
|
|
41
|
+
label: e.name,
|
|
42
|
+
...n ? { dueDateLabel: g(n) } : {}
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
function b(e) {
|
|
46
|
+
return e ? c(e) : void 0;
|
|
47
|
+
}
|
|
48
|
+
function x({ terms: e, isLoading: t, fields: n, customDatePickerOpen: r, isRecurring: i = !1, messages: a, issueDate: o = /* @__PURE__ */ new Date() }) {
|
|
49
|
+
if (t) return { kind: "loading" };
|
|
50
|
+
let s = h(e ?? []).map((e) => y(e, o)), c = b(n.paymentTermsCustomDate), l;
|
|
51
|
+
if (n.paymentTermsId === "receipt_due") l = { kind: "receiptDue" };
|
|
52
|
+
else if (n.paymentTermsId === "custom") l = {
|
|
53
|
+
kind: "customDate",
|
|
54
|
+
hasDate: !!c,
|
|
55
|
+
dateLabel: c ? g(c) : a.paymentTermsCustomDatePlaceholder
|
|
56
|
+
};
|
|
57
|
+
else {
|
|
58
|
+
let e = s.find((e) => e.value === n.paymentTermsId);
|
|
59
|
+
e && (l = {
|
|
60
|
+
kind: "term",
|
|
61
|
+
option: e
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
kind: "ready",
|
|
66
|
+
value: n.paymentTermsId,
|
|
67
|
+
options: s,
|
|
68
|
+
selection: l,
|
|
69
|
+
customDatePicker: { open: r },
|
|
70
|
+
showCustomDate: !i,
|
|
71
|
+
...i ? { description: a.recurrenceSeriesPaymentTerms } : {}
|
|
72
|
+
};
|
|
51
73
|
}
|
|
52
|
-
function
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
74
|
+
function S(e, t = /* @__PURE__ */ new Date()) {
|
|
75
|
+
let n = b(e), i = l(t, f), a = r(t, p);
|
|
76
|
+
return {
|
|
77
|
+
selected: n,
|
|
78
|
+
startMonth: n ? s([i, n]) : i,
|
|
79
|
+
endMonth: n ? o([a, n]) : a
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function C(e, t) {
|
|
83
|
+
return t === "custom" ? {
|
|
84
|
+
paymentTermsId: t,
|
|
85
|
+
paymentTermsCustomDate: e.paymentTermsId === "custom" ? e.paymentTermsCustomDate : ""
|
|
86
|
+
} : {
|
|
87
|
+
paymentTermsId: t,
|
|
88
|
+
paymentTermsCustomDate: ""
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function w(e) {
|
|
92
|
+
return e.paymentTermsId === "custom" && !e.paymentTermsCustomDate ? {
|
|
93
|
+
paymentTermsId: "",
|
|
94
|
+
paymentTermsCustomDate: ""
|
|
95
|
+
} : e;
|
|
96
|
+
}
|
|
97
|
+
function T(e) {
|
|
98
|
+
return e ? i(e, d) : "";
|
|
99
|
+
}
|
|
100
|
+
function E(e) {
|
|
101
|
+
return e.paymentTermsId === "custom" ? e.paymentTermsCustomDate ? { payment_terms: { term_final: { end_date: e.paymentTermsCustomDate } } } : { payment_terms: { term_final: { number_of_days: 0 } } } : e.paymentTermsId === "receipt_due" ? { payment_terms: { term_final: { number_of_days: 0 } } } : e.paymentTermsId ? { payment_terms_id: e.paymentTermsId } : {};
|
|
102
|
+
}
|
|
103
|
+
function D(e) {
|
|
104
|
+
return e.paymentTermsId ? E(e) : {
|
|
105
|
+
payment_terms_id: null,
|
|
106
|
+
payment_terms: null
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function O(n) {
|
|
110
|
+
if (n?.id) return {
|
|
111
|
+
paymentTermsId: n.id,
|
|
112
|
+
paymentTermsCustomDate: ""
|
|
113
|
+
};
|
|
114
|
+
let r = n?.term_final?.end_date;
|
|
115
|
+
return r ? {
|
|
116
|
+
paymentTermsId: e,
|
|
117
|
+
paymentTermsCustomDate: r.slice(0, 10)
|
|
118
|
+
} : n?.term_final?.number_of_days === 0 ? {
|
|
119
|
+
paymentTermsId: t,
|
|
120
|
+
paymentTermsCustomDate: ""
|
|
121
|
+
} : {
|
|
122
|
+
paymentTermsId: "",
|
|
123
|
+
paymentTermsCustomDate: ""
|
|
124
|
+
};
|
|
57
125
|
}
|
|
58
126
|
//#endregion
|
|
59
|
-
export {
|
|
127
|
+
export { S as buildCustomDateCalendar, E as buildPaymentTermsPayload, D as buildPaymentTermsUpdatePayload, x as buildPaymentTermsView, w as closeCustomDatePickerFields, h as dedupePaymentTerms, g as formatTermDate, O as paymentTermsToFormFields, v as resolveIssueDate, C as selectPaymentTermsFields, _ as termDueDate, T as toCustomDateValue };
|