@tesouro/embedded-components-react 0.5.109 → 0.5.111
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 +29 -10
- package/dist/index.css +0 -3
- package/dist/lib/monite-sdk.d.ts +2 -29
- package/dist/lib/monite-sdk.js +4 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index.js +5 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index166.js +123 -123
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index21.js +1 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index22.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index426.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index440.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index453.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index458.js +7 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index459.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index509.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index536.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index585.js +1 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index586.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index600.js +64 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index601.js +32 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index602.js +2 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index603.js +33 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index604.js +14 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index605.js +29 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index606.js +29 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index607.js +2 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index608.js +93 -18
- 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/monite-wrapper/feature/dist/lib/MoniteWrapper.js +2 -6
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index609.js +0 -73
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index610.js +0 -120
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index611.js +0 -80
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index612.js +0 -146
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index613.js +0 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index614.js +0 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index615.js +0 -91
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index616.js +0 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index617.js +0 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index618.js +0 -71
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index619.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index620.js +0 -66
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index621.js +0 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index622.js +0 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index623.js +0 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index624.js +0 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index625.js +0 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index626.js +0 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index627.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index628.js +0 -97
package/README.md
CHANGED
|
@@ -49,13 +49,13 @@ boundary.
|
|
|
49
49
|
|
|
50
50
|
### Entry points
|
|
51
51
|
|
|
52
|
-
| Import path | What you get
|
|
53
|
-
| ------------------------------------------------- |
|
|
54
|
-
| `@tesouro/embedded-components-react` | All widgets, `WidgetSuite`, plus `RootWidgetProvider` / `WidgetProvider`.
|
|
55
|
-
| `@tesouro/embedded-components-react/styles.css` | The widget stylesheet — see [About the stylesheet](#about-the-stylesheet).
|
|
56
|
-
| `@tesouro/embedded-components-react/core` | Framework-agnostic token utilities (`createWidgetTokenManager`).
|
|
57
|
-
| `@tesouro/embedded-components-react/monite-sdk` | Monite
|
|
58
|
-
| `@tesouro/embedded-components-react/experimental` | Work in progress — no compatibility promise. See [below](#experimental-entry-point).
|
|
52
|
+
| Import path | What you get |
|
|
53
|
+
| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
|
|
54
|
+
| `@tesouro/embedded-components-react` | All widgets, `WidgetSuite`, plus `RootWidgetProvider` / `WidgetProvider`. |
|
|
55
|
+
| `@tesouro/embedded-components-react/styles.css` | The widget stylesheet — see [About the stylesheet](#about-the-stylesheet). |
|
|
56
|
+
| `@tesouro/embedded-components-react/core` | Framework-agnostic token utilities (`createWidgetTokenManager`). |
|
|
57
|
+
| `@tesouro/embedded-components-react/monite-sdk` | Legacy Monite surface, being removed — no compatibility promise. See [below](#monite-sdk-entry-point). |
|
|
58
|
+
| `@tesouro/embedded-components-react/experimental` | Work in progress — no compatibility promise. See [below](#experimental-entry-point). |
|
|
59
59
|
|
|
60
60
|
### Experimental entry point
|
|
61
61
|
|
|
@@ -74,9 +74,28 @@ is **outside this package's semver contract**:
|
|
|
74
74
|
Use it only when we have pointed you at a specific module, and pin the package
|
|
75
75
|
to an exact version if you do.
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
The supported surface — the main entry point, `./core`, `./lib/*` and the
|
|
78
|
+
stylesheet — carries the normal compatibility promise and is unaffected by churn
|
|
79
|
+
on this path. `./monite-sdk` does not; see below.
|
|
80
|
+
|
|
81
|
+
### Monite SDK entry point
|
|
82
|
+
|
|
83
|
+
`@tesouro/embedded-components-react/monite-sdk` is a **legacy compatibility
|
|
84
|
+
export, not an integration surface.** It exists because an earlier generation of
|
|
85
|
+
Tesouro's own apps mounted Monite components directly. It was never meant for
|
|
86
|
+
anyone else to build on, and it is **outside this package's compatibility
|
|
87
|
+
promise**, on the same footing as `./experimental`:
|
|
88
|
+
|
|
89
|
+
- Its exports are **being removed**, surface by surface, as each Monite-backed
|
|
90
|
+
screen is replaced by a native Tesouro widget. Names disappear from it with no
|
|
91
|
+
deprecation window.
|
|
92
|
+
- It is deliberately undocumented here — no prop tables, no reference entries.
|
|
93
|
+
- The subpath itself goes away once nothing needs it.
|
|
94
|
+
|
|
95
|
+
Every Monite-backed widget on the main entry point already wraps Monite for you
|
|
96
|
+
and exposes Tesouro props. That is the surface to build on. Reach for
|
|
97
|
+
`./monite-sdk` only if we have pointed you at it, and pin an exact version if
|
|
98
|
+
you do.
|
|
80
99
|
|
|
81
100
|
### About the stylesheet
|
|
82
101
|
|
package/dist/index.css
CHANGED
|
@@ -2742,9 +2742,6 @@
|
|
|
2742
2742
|
.ttw\:bg-zinc-100 {
|
|
2743
2743
|
background-color: var(--ttw-color-zinc-100);
|
|
2744
2744
|
}
|
|
2745
|
-
.ttw\:bg-zinc-200 {
|
|
2746
|
-
background-color: var(--ttw-color-zinc-200);
|
|
2747
|
-
}
|
|
2748
2745
|
.ttw\:bg-zinc-300 {
|
|
2749
2746
|
background-color: var(--ttw-color-zinc-300);
|
|
2750
2747
|
}
|
package/dist/lib/monite-sdk.d.ts
CHANGED
|
@@ -72336,9 +72336,6 @@ interface CreateReceivablesProps {
|
|
|
72336
72336
|
*/
|
|
72337
72337
|
declare const CreateReceivables: (props: CreateReceivablesProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
72338
72338
|
|
|
72339
|
-
type ARDocumentType = 'invoice' | 'quote' | 'credit_note' | 'delivery_note';
|
|
72340
|
-
type APDocumentType = 'purchase_order';
|
|
72341
|
-
|
|
72342
72339
|
interface IconWrapperEvents {
|
|
72343
72340
|
onHover?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
72344
72341
|
onFocus?: (event: FocusEvent<HTMLButtonElement>) => void;
|
|
@@ -72493,17 +72490,6 @@ interface FinancingSettings {
|
|
|
72493
72490
|
*/
|
|
72494
72491
|
financeSteps: FinanceStep[];
|
|
72495
72492
|
}
|
|
72496
|
-
/** TemplateSettings now only supports 2 settings */
|
|
72497
|
-
interface TemplateSettings$1 {
|
|
72498
|
-
/**
|
|
72499
|
-
* List of available AR documents for customisation, defaults to all of the documents.
|
|
72500
|
-
*/
|
|
72501
|
-
availableARDocuments: ARDocumentType[];
|
|
72502
|
-
/**
|
|
72503
|
-
* List of available AP documents for customisation, defaults to all of the documents.
|
|
72504
|
-
*/
|
|
72505
|
-
availableAPDocuments: APDocumentType[];
|
|
72506
|
-
}
|
|
72507
72493
|
/**
|
|
72508
72494
|
* Action handlers for custom payment flows in payable operations.
|
|
72509
72495
|
*
|
|
@@ -72627,7 +72613,6 @@ interface ComponentSettings {
|
|
|
72627
72613
|
} & TablePaginationSettings;
|
|
72628
72614
|
onboarding: Partial<OnboardingSettings>;
|
|
72629
72615
|
financing: Partial<FinancingSettings>;
|
|
72630
|
-
templateSettings: Partial<TemplateSettings$1>;
|
|
72631
72616
|
}
|
|
72632
72617
|
|
|
72633
72618
|
type UsePayableDetailsProps = {
|
|
@@ -74477,18 +74462,6 @@ declare const Dialog: ({ ref, ...props }: MoniteDialogProps & {
|
|
|
74477
74462
|
|
|
74478
74463
|
declare function Integrations(): _emotion_react_jsx_runtime.JSX.Element;
|
|
74479
74464
|
|
|
74480
|
-
type TemplateSettingsProps = {
|
|
74481
|
-
/** Flag that controls whether settings are shown inside a side panel or not */
|
|
74482
|
-
isDialog?: boolean;
|
|
74483
|
-
/** The Settings shell can own the section title when this is embedded there. */
|
|
74484
|
-
showHeader?: boolean;
|
|
74485
|
-
/** Flag that controls whether dialog is open or not. It's meant to be passed in when isDialog is true */
|
|
74486
|
-
isOpen?: boolean;
|
|
74487
|
-
/** Callback function that is called when you close the dialog. It's meant to be passed in when isDialog is true */
|
|
74488
|
-
handleCloseDialog?: () => void;
|
|
74489
|
-
};
|
|
74490
|
-
declare const TemplateSettings: (props: TemplateSettingsProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
74491
|
-
|
|
74492
74465
|
declare const FinanceBanner: (props: FinanceBannerProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
74493
74466
|
type FinanceBannerProps = {
|
|
74494
74467
|
/** `enableServicingBanner` is a boolean flag that enables the `FinanceBanner` to be a small summarized version of the financing tab, but only works when entity is onboarded and is servicing. */
|
|
@@ -75007,5 +74980,5 @@ declare const MoniteAPIProvider: ({ children, APIContext, }: {
|
|
|
75007
74980
|
APIContext: Context<QraftContextValue>;
|
|
75008
74981
|
}) => _emotion_react_jsx_runtime.JSX.Element;
|
|
75009
74982
|
|
|
75010
|
-
export { schema_d as APISchema, ApprovalPolicies, ApprovalPoliciesTable, ApprovalPolicyDetails, ApprovalRequests, ApprovalRequestsTable, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, CounterpartAutocomplete, CounterpartDetails, Counterparts, CreateProduct, CreateReceivables, CreditNotesTable, CustomersTable, Dialog, FinanceBanner, FinanceIntegrationCard, FinanceInvoice, FinanceTab, Integrations, InvoicesTable, LOGO_MAX_FILE_SIZE_IN_MB, LOGO_SUPPORTED_FORMATS, MoniteAPIProvider, MoniteProvider, MoniteScopedProviders, OCR_SUPPORTED_FORMATS, PageHeader, PayableDetails, Payables, PayablesTable, ProductDetails, Products, ProductsTable, QuotesTable, Receivables, ReceivablesTable, ReceivablesTableTabEnum, RootElementsProvider, TagFormModal, Tags, TagsTable,
|
|
75011
|
-
export type { ApprovalPolicyDetailsProps, ComponentSettings, CounterpartResponse, CounterpartsAutocompleteOptionProps, CountriesType, CountryType, CreateMoniteAPIClientOptions, CreateMoniteAPIClientResult, CreateProductProps, CreateReceivableResult, CreateReceivableSubmitMode, CreateReceivablesProps, CreditNotesTableSortModel, CurrenciesType, CurrencyGroup, CurrencyType, CustomersTableProps, InvoicesTableProps, MoniteApprovalRequestStatusChipProps, MoniteApprovalStatusChipProps, MoniteCounterpartStatusChipProps, MoniteDialogProps, MoniteInvoiceRecurrenceIterationStatusChipProps, MoniteInvoiceRecurrenceStatusChipProps, MoniteInvoiceStatusChipProps, MonitePayableStatusChipProps, MoniteReceivablesTableProps, MoniteSettings, PaginationLayout, PaginationPosition, PayActionHandlers, PayablesDetailsProps, PayablesProps, ProductDetailsProps, ProductTableProps, ProductsProps, QuotesTableSortModel, ReceivableGridSortModel, ReceivablesProps, ReceivablesTableProps,
|
|
74983
|
+
export { schema_d as APISchema, ApprovalPolicies, ApprovalPoliciesTable, ApprovalPolicyDetails, ApprovalRequests, ApprovalRequestsTable, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, CounterpartAutocomplete, CounterpartDetails, Counterparts, CreateProduct, CreateReceivables, CreditNotesTable, CustomersTable, Dialog, FinanceBanner, FinanceIntegrationCard, FinanceInvoice, FinanceTab, Integrations, InvoicesTable, LOGO_MAX_FILE_SIZE_IN_MB, LOGO_SUPPORTED_FORMATS, MoniteAPIProvider, MoniteProvider, MoniteScopedProviders, OCR_SUPPORTED_FORMATS, PageHeader, PayableDetails, Payables, PayablesTable, ProductDetails, Products, ProductsTable, QuotesTable, Receivables, ReceivablesTable, ReceivablesTableTabEnum, RootElementsProvider, TagFormModal, Tags, TagsTable, VendorsTable, breakpoints, countryCurrencyList, createAPIClient, dateStringToLocalDate, defaultAvailableCountries, defaultAvailableCurrencies, defaultCounterpartColumnWidth, filterOptions, formatDateRangeFilterChip, formatFilterChipMultiSelectValueSegment, getCounterpartName, getCountries, getCountriesArray, getCurrencies, getCurrenciesArray, getEntityName, getGroupTitleForOption, getIndividualName, getIndividualNameWithFallback, getPayableRefetchInterval, getUserDisplayName, rateMajorToMinor, rateMinorToMajor, sortCurrencyOptionsByGroup, useApprovalPolicyById, useAreCounterpartsLoading, useAutosizeGridColumns, useCancelPayableById, useComboboxAnchor, useComponentSettings, useCounterpartAddresses, useCounterpartById, useCounterpartContactList, useCounterpartList, useCounterpartVatList, useCreatePayable, useCreatePayableLineItem, useCreatePaymentRecord, useCurrencies, useDebounce, useDebounceCallback, useDeletePayable, useDeletePayableLineItem, useDialog, useEntitySettings, useEntityUserByAuthToken, useEntityUserById, useEntityUserNames, useFileById, useFileInput, useForceApprovePayable, useForceRejectPayable, useFormPersist, useGetPayableApprovalRequests, useGetPayableById, useGetPayableCounterpart, useGetPayableLineItems, useGetPayablesAnalytics, useGetReceivableById, useIsDesktopScreen, useIsExtraLargeDesktopScreen, useIsLargeDesktopScreen, useIsLargerThan, useIsMobile, useIsMobileScreen, useIsMounted, useIsSmallerThan, useIsTabletScreen, useLedgerAccounts, useLocalStorageFields, useMe, useMediaQuery, useMenuButton, useMoniteContext, useMyEntity, useOptionalFields, usePatchEntitiesIdSettings, usePayButtonVisibility, usePayableCallbacks, usePayableDetailsThemeProps, usePayablePaymentIntentsAndRecords, usePaymentIntentById, usePaymentRecordById, usePaymentRecords, useReceivablesTableProps, useReopenPayable, useRootElements, useSubmitPayableForApproval, useUpdatePayable, useUpdatePayableLineItem };
|
|
74984
|
+
export type { ApprovalPolicyDetailsProps, ComponentSettings, CounterpartResponse, CounterpartsAutocompleteOptionProps, CountriesType, CountryType, CreateMoniteAPIClientOptions, CreateMoniteAPIClientResult, CreateProductProps, CreateReceivableResult, CreateReceivableSubmitMode, CreateReceivablesProps, CreditNotesTableSortModel, CurrenciesType, CurrencyGroup, CurrencyType, CustomersTableProps, InvoicesTableProps, MoniteApprovalRequestStatusChipProps, MoniteApprovalStatusChipProps, MoniteCounterpartStatusChipProps, MoniteDialogProps, MoniteInvoiceRecurrenceIterationStatusChipProps, MoniteInvoiceRecurrenceStatusChipProps, MoniteInvoiceStatusChipProps, MonitePayableStatusChipProps, MoniteReceivablesTableProps, MoniteSettings, PaginationLayout, PaginationPosition, PayActionHandlers, PayablesDetailsProps, PayablesProps, ProductDetailsProps, ProductTableProps, ProductsProps, QuotesTableSortModel, ReceivableGridSortModel, ReceivablesProps, ReceivablesTableProps, UseEntityUserNamesParams, UseFileInputOptions, VendorDetailsProps, VendorsTableProps };
|
package/dist/lib/monite-sdk.js
CHANGED
|
@@ -87,9 +87,8 @@ import { FinanceIntegrationCard as Mt } from "../libs/tesouro-embedded-component
|
|
|
87
87
|
import { FinanceInvoice as Nt } from "../libs/tesouro-embedded-components-react/monite-sdk/dist/index590.js";
|
|
88
88
|
import { FinanceTab as Pt } from "../libs/tesouro-embedded-components-react/monite-sdk/dist/index595.js";
|
|
89
89
|
import { Integrations as Ft } from "../libs/tesouro-embedded-components-react/monite-sdk/dist/index598.js";
|
|
90
|
-
import {
|
|
91
|
-
import {
|
|
92
|
-
import {
|
|
93
|
-
import { toast as zt } from "../libs/tesouro-embedded-components-react/monite-sdk/dist/index627.js";
|
|
90
|
+
import { MoniteAPIProvider as It } from "../libs/tesouro-embedded-components-react/monite-sdk/dist/index605.js";
|
|
91
|
+
import { MoniteProvider as Lt } from "../libs/tesouro-embedded-components-react/monite-sdk/dist/index606.js";
|
|
92
|
+
import { toast as Rt } from "../libs/tesouro-embedded-components-react/monite-sdk/dist/index607.js";
|
|
94
93
|
import "../libs/tesouro-embedded-components-react/monite-sdk/dist/index.js";
|
|
95
|
-
export { Ge as ApprovalPolicies, Ue as ApprovalPoliciesTable, He as ApprovalPolicyDetails, qe as ApprovalRequests, Ke as ApprovalRequestsTable, w as Combobox, T as ComboboxChip, E as ComboboxChips, D as ComboboxChipsInput, O as ComboboxCollection, k as ComboboxContent, A as ComboboxEmpty, j as ComboboxGroup, M as ComboboxInput, N as ComboboxItem, P as ComboboxLabel, F as ComboboxList, I as ComboboxSeparator, L as ComboboxTrigger, R as ComboboxValue, Be as CounterpartAutocomplete, Ie as CounterpartDetails, ze as Counterparts, Dt as CreateProduct, bt as CreateReceivables, yt as CreditNotesTable, Le as CustomersTable, Ne as Dialog, jt as FinanceBanner, Mt as FinanceIntegrationCard, Nt as FinanceInvoice, Pt as FinanceTab, Ft as Integrations, _t as InvoicesTable, de as LOGO_MAX_FILE_SIZE_IN_MB, fe as LOGO_SUPPORTED_FORMATS,
|
|
94
|
+
export { Ge as ApprovalPolicies, Ue as ApprovalPoliciesTable, He as ApprovalPolicyDetails, qe as ApprovalRequests, Ke as ApprovalRequestsTable, w as Combobox, T as ComboboxChip, E as ComboboxChips, D as ComboboxChipsInput, O as ComboboxCollection, k as ComboboxContent, A as ComboboxEmpty, j as ComboboxGroup, M as ComboboxInput, N as ComboboxItem, P as ComboboxLabel, F as ComboboxList, I as ComboboxSeparator, L as ComboboxTrigger, R as ComboboxValue, Be as CounterpartAutocomplete, Ie as CounterpartDetails, ze as Counterparts, Dt as CreateProduct, bt as CreateReceivables, yt as CreditNotesTable, Le as CustomersTable, Ne as Dialog, jt as FinanceBanner, Mt as FinanceIntegrationCard, Nt as FinanceInvoice, Pt as FinanceTab, Ft as Integrations, _t as InvoicesTable, de as LOGO_MAX_FILE_SIZE_IN_MB, fe as LOGO_SUPPORTED_FORMATS, It as MoniteAPIProvider, Lt as MoniteProvider, Fe as MoniteScopedProviders, pe as OCR_SUPPORTED_FORMATS, We as PageHeader, mt as PayableDetails, gt as Payables, ht as PayablesTable, Et as ProductDetails, Ot as Products, Tt as ProductsTable, vt as QuotesTable, wt as Receivables, xt as ReceivablesTable, St as ReceivablesTableTabEnum, ce as RootElementsProvider, Ve as TagFormModal, At as Tags, kt as TagsTable, Re as VendorsTable, we as breakpoints, t as countryCurrencyList, e as createAPIClient, g as dateStringToLocalDate, n as defaultAvailableCountries, a as defaultAvailableCurrencies, he as defaultCounterpartColumnWidth, o as filterOptions, _ as formatDateRangeFilterChip, v as formatFilterChipMultiSelectValueSegment, S as getCounterpartName, r as getCountries, i as getCountriesArray, s as getCurrencies, c as getCurrenciesArray, X as getEntityName, l as getGroupTitleForOption, p as getIndividualName, m as getIndividualNameWithFallback, $e as getPayableRefetchInterval, h as getUserDisplayName, u as rateMajorToMinor, d as rateMinorToMajor, f as sortCurrencyOptionsByGroup, Rt as toast, J as useApprovalPolicyById, ge as useAreCounterpartsLoading, _e as useAutosizeGridColumns, ct as useCancelPayableById, z as useComboboxAnchor, Ce as useComponentSettings, H as useCounterpartAddresses, x as useCounterpartById, W as useCounterpartContactList, V as useCounterpartList, U as useCounterpartVatList, rt as useCreatePayable, at as useCreatePayableLineItem, $ as useCreatePaymentRecord, C as useCurrencies, be as useDebounce, xe as useDebounceCallback, pt as useDeletePayable, st as useDeletePayableLineItem, Pe as useDialog, ie as useEntitySettings, G as useEntityUserByAuthToken, K as useEntityUserById, q as useEntityUserNames, Y as useFileById, me as useFileInput, dt as useForceApprovePayable, ut as useForceRejectPayable, ve as useFormPersist, nt as useGetPayableApprovalRequests, et as useGetPayableById, Je as useGetPayableCounterpart, tt as useGetPayableLineItems, B as useGetPayablesAnalytics, oe as useGetReceivableById, Te as useIsDesktopScreen, Ee as useIsExtraLargeDesktopScreen, De as useIsLargeDesktopScreen, Oe as useIsLargerThan, Se as useIsMobile, ke as useIsMobileScreen, y as useIsMounted, Ae as useIsSmallerThan, je as useIsTabletScreen, Qe as useLedgerAccounts, ye as useLocalStorageFields, Z as useMe, Me as useMediaQuery, ue as useMenuButton, b as useMoniteContext, Q as useMyEntity, se as useOptionalFields, ae as usePatchEntitiesIdSettings, Ze as usePayButtonVisibility, Xe as usePayableCallbacks, Ye as usePayableDetailsThemeProps, ee as usePayablePaymentIntentsAndRecords, re as usePaymentIntentById, te as usePaymentRecordById, ne as usePaymentRecords, Ct as useReceivablesTableProps, ft as useReopenPayable, le as useRootElements, lt as useSubmitPayableForApproval, it as useUpdatePayable, ot as useUpdatePayableLineItem };
|
|
@@ -91,9 +91,8 @@ import { FinanceIntegrationCard as Mt } from "./index588.js";
|
|
|
91
91
|
import { FinanceInvoice as Nt } from "./index590.js";
|
|
92
92
|
import { FinanceTab as Pt } from "./index595.js";
|
|
93
93
|
import { Integrations as Ft } from "./index598.js";
|
|
94
|
-
import
|
|
95
|
-
import "./
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
|
|
99
|
-
export { Ge as ApprovalPolicies, Ue as ApprovalPoliciesTable, He as ApprovalPolicyDetails, qe as ApprovalRequests, Ke as ApprovalRequestsTable, w as Combobox, T as ComboboxChip, E as ComboboxChips, D as ComboboxChipsInput, O as ComboboxCollection, k as ComboboxContent, A as ComboboxEmpty, j as ComboboxGroup, M as ComboboxInput, N as ComboboxItem, P as ComboboxLabel, F as ComboboxList, I as ComboboxSeparator, L as ComboboxTrigger, R as ComboboxValue, Be as CounterpartAutocomplete, Ie as CounterpartDetails, ze as Counterparts, Dt as CreateProduct, bt as CreateReceivables, yt as CreditNotesTable, Le as CustomersTable, Ne as Dialog, jt as FinanceBanner, Mt as FinanceIntegrationCard, Nt as FinanceInvoice, Pt as FinanceTab, Ft as Integrations, _t as InvoicesTable, de as LOGO_MAX_FILE_SIZE_IN_MB, fe as LOGO_SUPPORTED_FORMATS, Lt as MoniteAPIProvider, Rt as MoniteProvider, Fe as MoniteScopedProviders, pe as OCR_SUPPORTED_FORMATS, We as PageHeader, mt as PayableDetails, gt as Payables, ht as PayablesTable, Et as ProductDetails, Ot as Products, Tt as ProductsTable, vt as QuotesTable, wt as Receivables, xt as ReceivablesTable, St as ReceivablesTableTabEnum, ce as RootElementsProvider, Ve as TagFormModal, At as Tags, kt as TagsTable, It as TemplateSettings, Re as VendorsTable, we as breakpoints, t as countryCurrencyList, e as createAPIClient, g as dateStringToLocalDate, n as defaultAvailableCountries, a as defaultAvailableCurrencies, he as defaultCounterpartColumnWidth, o as filterOptions, _ as formatDateRangeFilterChip, v as formatFilterChipMultiSelectValueSegment, S as getCounterpartName, r as getCountries, i as getCountriesArray, s as getCurrencies, c as getCurrenciesArray, X as getEntityName, l as getGroupTitleForOption, p as getIndividualName, m as getIndividualNameWithFallback, $e as getPayableRefetchInterval, h as getUserDisplayName, u as rateMajorToMinor, d as rateMinorToMajor, f as sortCurrencyOptionsByGroup, zt as toast, J as useApprovalPolicyById, ge as useAreCounterpartsLoading, _e as useAutosizeGridColumns, ct as useCancelPayableById, z as useComboboxAnchor, Ce as useComponentSettings, H as useCounterpartAddresses, x as useCounterpartById, W as useCounterpartContactList, V as useCounterpartList, U as useCounterpartVatList, rt as useCreatePayable, at as useCreatePayableLineItem, $ as useCreatePaymentRecord, C as useCurrencies, be as useDebounce, xe as useDebounceCallback, pt as useDeletePayable, st as useDeletePayableLineItem, Pe as useDialog, ie as useEntitySettings, G as useEntityUserByAuthToken, K as useEntityUserById, q as useEntityUserNames, Y as useFileById, me as useFileInput, dt as useForceApprovePayable, ut as useForceRejectPayable, ve as useFormPersist, nt as useGetPayableApprovalRequests, et as useGetPayableById, Je as useGetPayableCounterpart, tt as useGetPayableLineItems, B as useGetPayablesAnalytics, oe as useGetReceivableById, Te as useIsDesktopScreen, Ee as useIsExtraLargeDesktopScreen, De as useIsLargeDesktopScreen, Oe as useIsLargerThan, Se as useIsMobile, ke as useIsMobileScreen, y as useIsMounted, Ae as useIsSmallerThan, je as useIsTabletScreen, Qe as useLedgerAccounts, ye as useLocalStorageFields, Z as useMe, Me as useMediaQuery, ue as useMenuButton, b as useMoniteContext, Q as useMyEntity, se as useOptionalFields, ae as usePatchEntitiesIdSettings, Ze as usePayButtonVisibility, Xe as usePayableCallbacks, Ye as usePayableDetailsThemeProps, ee as usePayablePaymentIntentsAndRecords, re as usePaymentIntentById, te as usePaymentRecordById, ne as usePaymentRecords, Ct as useReceivablesTableProps, ft as useReopenPayable, le as useRootElements, lt as useSubmitPayableForApproval, it as useUpdatePayable, ot as useUpdatePayableLineItem };
|
|
94
|
+
import "./index600.js";
|
|
95
|
+
import { MoniteAPIProvider as It } from "./index605.js";
|
|
96
|
+
import { MoniteProvider as Lt } from "./index606.js";
|
|
97
|
+
import { toast as Rt } from "./index607.js";
|
|
98
|
+
export { Ge as ApprovalPolicies, Ue as ApprovalPoliciesTable, He as ApprovalPolicyDetails, qe as ApprovalRequests, Ke as ApprovalRequestsTable, w as Combobox, T as ComboboxChip, E as ComboboxChips, D as ComboboxChipsInput, O as ComboboxCollection, k as ComboboxContent, A as ComboboxEmpty, j as ComboboxGroup, M as ComboboxInput, N as ComboboxItem, P as ComboboxLabel, F as ComboboxList, I as ComboboxSeparator, L as ComboboxTrigger, R as ComboboxValue, Be as CounterpartAutocomplete, Ie as CounterpartDetails, ze as Counterparts, Dt as CreateProduct, bt as CreateReceivables, yt as CreditNotesTable, Le as CustomersTable, Ne as Dialog, jt as FinanceBanner, Mt as FinanceIntegrationCard, Nt as FinanceInvoice, Pt as FinanceTab, Ft as Integrations, _t as InvoicesTable, de as LOGO_MAX_FILE_SIZE_IN_MB, fe as LOGO_SUPPORTED_FORMATS, It as MoniteAPIProvider, Lt as MoniteProvider, Fe as MoniteScopedProviders, pe as OCR_SUPPORTED_FORMATS, We as PageHeader, mt as PayableDetails, gt as Payables, ht as PayablesTable, Et as ProductDetails, Ot as Products, Tt as ProductsTable, vt as QuotesTable, wt as Receivables, xt as ReceivablesTable, St as ReceivablesTableTabEnum, ce as RootElementsProvider, Ve as TagFormModal, At as Tags, kt as TagsTable, Re as VendorsTable, we as breakpoints, t as countryCurrencyList, e as createAPIClient, g as dateStringToLocalDate, n as defaultAvailableCountries, a as defaultAvailableCurrencies, he as defaultCounterpartColumnWidth, o as filterOptions, _ as formatDateRangeFilterChip, v as formatFilterChipMultiSelectValueSegment, S as getCounterpartName, r as getCountries, i as getCountriesArray, s as getCurrencies, c as getCurrenciesArray, X as getEntityName, l as getGroupTitleForOption, p as getIndividualName, m as getIndividualNameWithFallback, $e as getPayableRefetchInterval, h as getUserDisplayName, u as rateMajorToMinor, d as rateMinorToMajor, f as sortCurrencyOptionsByGroup, Rt as toast, J as useApprovalPolicyById, ge as useAreCounterpartsLoading, _e as useAutosizeGridColumns, ct as useCancelPayableById, z as useComboboxAnchor, Ce as useComponentSettings, H as useCounterpartAddresses, x as useCounterpartById, W as useCounterpartContactList, V as useCounterpartList, U as useCounterpartVatList, rt as useCreatePayable, at as useCreatePayableLineItem, $ as useCreatePaymentRecord, C as useCurrencies, be as useDebounce, xe as useDebounceCallback, pt as useDeletePayable, st as useDeletePayableLineItem, Pe as useDialog, ie as useEntitySettings, G as useEntityUserByAuthToken, K as useEntityUserById, q as useEntityUserNames, Y as useFileById, me as useFileInput, dt as useForceApprovePayable, ut as useForceRejectPayable, ve as useFormPersist, nt as useGetPayableApprovalRequests, et as useGetPayableById, Je as useGetPayableCounterpart, tt as useGetPayableLineItems, B as useGetPayablesAnalytics, oe as useGetReceivableById, Te as useIsDesktopScreen, Ee as useIsExtraLargeDesktopScreen, De as useIsLargeDesktopScreen, Oe as useIsLargerThan, Se as useIsMobile, ke as useIsMobileScreen, y as useIsMounted, Ae as useIsSmallerThan, je as useIsTabletScreen, Qe as useLedgerAccounts, ye as useLocalStorageFields, Z as useMe, Me as useMediaQuery, ue as useMenuButton, b as useMoniteContext, Q as useMyEntity, se as useOptionalFields, ae as usePatchEntitiesIdSettings, Ze as usePayButtonVisibility, Xe as usePayableCallbacks, Ye as usePayableDetailsThemeProps, ee as usePayablePaymentIntentsAndRecords, re as usePaymentIntentById, te as usePaymentRecordById, ne as usePaymentRecords, Ct as useReceivablesTableProps, ft as useReopenPayable, le as useRootElements, lt as useSubmitPayableForApproval, it as useUpdatePayable, ot as useUpdatePayableLineItem };
|
|
@@ -7,10 +7,10 @@ import { isLineItemTaxable as i } from "./index162.js";
|
|
|
7
7
|
import { getTotalsRowVisibility as a } from "./index163.js";
|
|
8
8
|
import { getDaysOverdue as ee } from "./index164.js";
|
|
9
9
|
import { formatReminderSchedule as te } from "./index165.js";
|
|
10
|
-
import { rateMinorToMajor as
|
|
11
|
-
import { parseISO as
|
|
10
|
+
import { rateMinorToMajor as ne } from "./index161.js";
|
|
11
|
+
import { parseISO as o } from "date-fns";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index166.js
|
|
13
|
-
var
|
|
13
|
+
var s = /^\d{4}-\d{2}-\d{2}$/, c = (e, t) => {
|
|
14
14
|
switch (t) {
|
|
15
15
|
case "draft": return e._("Draft");
|
|
16
16
|
case "issuing": return e._("Issuing");
|
|
@@ -27,7 +27,7 @@ var c = /^\d{4}-\d{2}-\d{2}$/, l = (e, t) => {
|
|
|
27
27
|
case "deleted": return e._("Deleted");
|
|
28
28
|
default: return e._("Unknown");
|
|
29
29
|
}
|
|
30
|
-
},
|
|
30
|
+
}, l = (e, t) => {
|
|
31
31
|
switch (t) {
|
|
32
32
|
case "day": return e._("Daily");
|
|
33
33
|
case "week": return e._("Weekly");
|
|
@@ -36,7 +36,7 @@ var c = /^\d{4}-\d{2}-\d{2}$/, l = (e, t) => {
|
|
|
36
36
|
case "year": return e._("Yearly");
|
|
37
37
|
default: return "";
|
|
38
38
|
}
|
|
39
|
-
},
|
|
39
|
+
}, u = (e, t) => {
|
|
40
40
|
switch (t) {
|
|
41
41
|
case "day": return e._("each day");
|
|
42
42
|
case "week": return e._("each week");
|
|
@@ -45,13 +45,13 @@ var c = /^\d{4}-\d{2}-\d{2}$/, l = (e, t) => {
|
|
|
45
45
|
case "year": return e._("each year");
|
|
46
46
|
default: return "";
|
|
47
47
|
}
|
|
48
|
-
},
|
|
48
|
+
}, d = [
|
|
49
49
|
"issued",
|
|
50
50
|
"overdue",
|
|
51
51
|
"partially_paid",
|
|
52
52
|
"paid",
|
|
53
53
|
"uncollectible"
|
|
54
|
-
],
|
|
54
|
+
], f = {
|
|
55
55
|
draft: {
|
|
56
56
|
primary: [
|
|
57
57
|
"edit",
|
|
@@ -93,147 +93,147 @@ var c = /^\d{4}-\d{2}-\d{2}$/, l = (e, t) => {
|
|
|
93
93
|
overflow: []
|
|
94
94
|
}
|
|
95
95
|
};
|
|
96
|
-
function
|
|
97
|
-
let
|
|
96
|
+
function p(p, m, re, { i18n: h, formatCurrencyToDisplay: g, locale: _ }, v = !1, y = {}, b) {
|
|
97
|
+
let x = p.currency, S = (e) => g(e ?? 0, x) ?? "", C = (e) => g(e, x, !0, !0) ?? "", w = (e) => e ? h.date(s.test(e) ? o(e) : e, _.dateFormat) : "-", T = (e) => e ? w(e) : h._("Pending"), E = p.status, D = E === "canceled", O = E === "overdue", k = p.tax_mode === "inclusive", ie = !!p.recurrence_id || E === "recurring", A = E === "recurring" && !!m, ae = !!p.recurrence_id && E !== "recurring", j = O ? ee(p.due_date) : 0, M = "default", N = [];
|
|
98
98
|
switch (E) {
|
|
99
99
|
case "draft":
|
|
100
100
|
case "recurring":
|
|
101
101
|
N.push({
|
|
102
|
-
label:
|
|
103
|
-
value:
|
|
102
|
+
label: h._("Invoice amount"),
|
|
103
|
+
value: S(p.total_amount),
|
|
104
104
|
emphasis: !0
|
|
105
105
|
});
|
|
106
106
|
break;
|
|
107
107
|
case "issued":
|
|
108
108
|
case "overdue":
|
|
109
109
|
M = O ? "danger" : "default", N.push({
|
|
110
|
-
label:
|
|
111
|
-
value:
|
|
110
|
+
label: h._("Balance due"),
|
|
111
|
+
value: S(p.amount_due),
|
|
112
112
|
emphasis: !0
|
|
113
|
-
}), (
|
|
114
|
-
label:
|
|
115
|
-
value:
|
|
113
|
+
}), (p.amount_paid ?? 0) > 0 && N.push({
|
|
114
|
+
label: h._("Amount received"),
|
|
115
|
+
value: S(p.amount_paid),
|
|
116
116
|
tone: "success"
|
|
117
117
|
});
|
|
118
118
|
break;
|
|
119
119
|
case "partially_paid":
|
|
120
120
|
N.push({
|
|
121
|
-
label:
|
|
122
|
-
value:
|
|
121
|
+
label: h._("Balance due"),
|
|
122
|
+
value: S(p.amount_due),
|
|
123
123
|
emphasis: !0
|
|
124
124
|
}, {
|
|
125
|
-
label:
|
|
126
|
-
value:
|
|
125
|
+
label: h._("Amount received"),
|
|
126
|
+
value: S(p.amount_paid),
|
|
127
127
|
tone: "success"
|
|
128
128
|
});
|
|
129
129
|
break;
|
|
130
130
|
case "paid":
|
|
131
131
|
M = "success", N.push({
|
|
132
|
-
label:
|
|
133
|
-
value:
|
|
132
|
+
label: h._("Amount received"),
|
|
133
|
+
value: S(p.amount_paid),
|
|
134
134
|
emphasis: !0
|
|
135
135
|
});
|
|
136
136
|
break;
|
|
137
137
|
case "canceled":
|
|
138
138
|
M = "muted", N.push({
|
|
139
|
-
label:
|
|
140
|
-
value:
|
|
139
|
+
label: h._("Cancelled amount"),
|
|
140
|
+
value: S(p.total_amount),
|
|
141
141
|
emphasis: !0
|
|
142
142
|
});
|
|
143
143
|
break;
|
|
144
144
|
case "uncollectible":
|
|
145
145
|
M = "muted", N.push({
|
|
146
|
-
label:
|
|
147
|
-
value:
|
|
146
|
+
label: h._("Amount written off"),
|
|
147
|
+
value: S(p.amount_due),
|
|
148
148
|
emphasis: !0
|
|
149
149
|
});
|
|
150
150
|
break;
|
|
151
151
|
default: N.push({
|
|
152
|
-
label:
|
|
153
|
-
value:
|
|
152
|
+
label: h._("Invoice amount"),
|
|
153
|
+
value: S(p.total_amount),
|
|
154
154
|
emphasis: !0
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
|
-
let P =
|
|
157
|
+
let P = p.counterpart_contact, F = p.counterpart_billing_address, I = F?.country ? e(h)[F.country] : void 0, L = [F?.city, [F?.state, F?.postal_code].filter(Boolean).join(" ")].filter(Boolean).join(", "), R = F?.line1 ? [
|
|
158
158
|
`${F.line1}${F.line2 ? ` ${F.line2}` : ""}`,
|
|
159
159
|
L,
|
|
160
160
|
I
|
|
161
161
|
].filter(Boolean).join(", ") : void 0, z = [];
|
|
162
162
|
P?.email && z.push({
|
|
163
|
-
label:
|
|
163
|
+
label: h._("Email"),
|
|
164
164
|
value: P.email
|
|
165
165
|
}), P?.phone && z.push({
|
|
166
|
-
label:
|
|
166
|
+
label: h._("Phone"),
|
|
167
167
|
value: P.phone
|
|
168
168
|
}), R && z.push({
|
|
169
|
-
label:
|
|
169
|
+
label: h._("Address"),
|
|
170
170
|
value: R
|
|
171
171
|
});
|
|
172
|
-
let B = !!(
|
|
173
|
-
label:
|
|
174
|
-
value: H ? r(H,
|
|
172
|
+
let B = !!(p.payment_reminder_id || p.overdue_reminder_id), V = te(y.paymentReminder, y.overdueReminder, h, B), H = b?.account, U = b ? [{
|
|
173
|
+
label: h._("Deposit account"),
|
|
174
|
+
value: H ? r(H, h) : b.isListIncomplete && p.bank_account_id ? "-" : h._("Not provided")
|
|
175
175
|
}] : [], W = A ? [
|
|
176
176
|
{
|
|
177
|
-
label:
|
|
178
|
-
value:
|
|
177
|
+
label: h._("Frequency"),
|
|
178
|
+
value: m ? l(h, m.frequency) : "-"
|
|
179
179
|
},
|
|
180
180
|
{
|
|
181
|
-
label:
|
|
182
|
-
value:
|
|
181
|
+
label: h._("Invoice amount"),
|
|
182
|
+
value: S(p.total_amount)
|
|
183
183
|
},
|
|
184
184
|
{
|
|
185
|
-
label:
|
|
186
|
-
value:
|
|
185
|
+
label: h._("Payment terms"),
|
|
186
|
+
value: p.payment_terms?.name ?? h._("Pending")
|
|
187
187
|
},
|
|
188
188
|
{
|
|
189
|
-
label:
|
|
189
|
+
label: h._("Payment reminders"),
|
|
190
190
|
value: V
|
|
191
191
|
},
|
|
192
192
|
{
|
|
193
|
-
label:
|
|
194
|
-
value:
|
|
193
|
+
label: h._("PO number"),
|
|
194
|
+
value: p.purchase_order || h._("Not provided")
|
|
195
195
|
},
|
|
196
196
|
...U
|
|
197
197
|
] : [
|
|
198
|
-
...
|
|
199
|
-
label:
|
|
200
|
-
value:
|
|
198
|
+
...p.document_id ? [{
|
|
199
|
+
label: h._("Invoice number"),
|
|
200
|
+
value: p.document_id
|
|
201
201
|
}] : [],
|
|
202
202
|
{
|
|
203
|
-
label:
|
|
204
|
-
value:
|
|
203
|
+
label: h._("Invoice amount"),
|
|
204
|
+
value: S(p.total_amount)
|
|
205
205
|
},
|
|
206
206
|
{
|
|
207
|
-
label:
|
|
208
|
-
value: T(
|
|
207
|
+
label: h._("Invoice date"),
|
|
208
|
+
value: T(p.issue_date)
|
|
209
209
|
},
|
|
210
210
|
{
|
|
211
|
-
label:
|
|
212
|
-
value: T(
|
|
211
|
+
label: h._("Due date"),
|
|
212
|
+
value: T(p.due_date)
|
|
213
213
|
},
|
|
214
214
|
{
|
|
215
|
-
label:
|
|
216
|
-
value:
|
|
215
|
+
label: h._("Payment terms"),
|
|
216
|
+
value: p.payment_terms?.name ?? h._("Pending")
|
|
217
217
|
},
|
|
218
218
|
{
|
|
219
|
-
label:
|
|
219
|
+
label: h._("Payment reminders"),
|
|
220
220
|
value: V
|
|
221
221
|
},
|
|
222
|
-
...
|
|
223
|
-
label:
|
|
224
|
-
value:
|
|
222
|
+
...p.purchase_order ? [{
|
|
223
|
+
label: h._("PO number"),
|
|
224
|
+
value: p.purchase_order
|
|
225
225
|
}] : [],
|
|
226
226
|
...U
|
|
227
|
-
], G = (
|
|
227
|
+
], G = (p.line_items ?? []).map((e, t) => {
|
|
228
228
|
let n = k ? e?.product?.price_after_tax?.value : e?.product?.price?.value, r = k ? e?.total_after_tax : e?.total_before_tax ?? (e?.product?.price?.value ?? 0) * (e?.quantity ?? 0);
|
|
229
229
|
return {
|
|
230
230
|
id: `${e?.product?.id ?? "item"}-${t}`,
|
|
231
231
|
name: e?.product?.name ?? "",
|
|
232
232
|
quantityLabel: String(e?.quantity ?? 0),
|
|
233
|
-
unitPriceLabel:
|
|
234
|
-
totalLabel:
|
|
233
|
+
unitPriceLabel: S(n),
|
|
234
|
+
totalLabel: S(r)
|
|
235
235
|
};
|
|
236
|
-
}), K = (
|
|
236
|
+
}), K = (p.line_items ?? []).reduce((e, t) => {
|
|
237
237
|
let n = t?.total_before_tax ?? 0, r = i(t?.tax_status);
|
|
238
238
|
return {
|
|
239
239
|
taxableItemsSubtotal: e.taxableItemsSubtotal + (r ? n : 0),
|
|
@@ -243,69 +243,69 @@ function m(m, h, ne, { i18n: g, formatCurrencyToDisplay: _, locale: v }, y = !1,
|
|
|
243
243
|
taxableItemsSubtotal: 0,
|
|
244
244
|
nonTaxableItemsSubtotal: 0
|
|
245
245
|
}), q = n({
|
|
246
|
-
discount:
|
|
246
|
+
discount: p.discount,
|
|
247
247
|
subtotal: K.taxableItemsSubtotal + K.nonTaxableItemsSubtotal
|
|
248
248
|
}), J = a({
|
|
249
249
|
...K,
|
|
250
250
|
discountAmount: q
|
|
251
|
-
}),
|
|
252
|
-
label:
|
|
253
|
-
value:
|
|
254
|
-
}] : [], { taxableSubtotal:
|
|
251
|
+
}), oe = J.showDiscounts ? [{
|
|
252
|
+
label: h._("Discount"),
|
|
253
|
+
value: C(-q)
|
|
254
|
+
}] : [], { taxableSubtotal: se, nonTaxableSubtotal: ce } = t({
|
|
255
255
|
...K,
|
|
256
256
|
discountAmount: q
|
|
257
|
-
}),
|
|
258
|
-
label:
|
|
259
|
-
value:
|
|
257
|
+
}), le = [...J.showNonTaxableSubtotal ? [{
|
|
258
|
+
label: h._("Non-taxable subtotal"),
|
|
259
|
+
value: S(ce),
|
|
260
260
|
tone: "muted"
|
|
261
261
|
}] : [], ...J.showTaxableSubtotal ? [{
|
|
262
|
-
label:
|
|
263
|
-
value:
|
|
262
|
+
label: h._("Taxable subtotal"),
|
|
263
|
+
value: S(se),
|
|
264
264
|
tone: "muted"
|
|
265
|
-
}] : []],
|
|
265
|
+
}] : []], ue = [
|
|
266
266
|
{
|
|
267
|
-
label:
|
|
268
|
-
value:
|
|
267
|
+
label: h._("Subtotal"),
|
|
268
|
+
value: S(p.subtotal)
|
|
269
269
|
},
|
|
270
|
-
...
|
|
271
|
-
...
|
|
272
|
-
...(
|
|
273
|
-
label:
|
|
274
|
-
value:
|
|
270
|
+
...oe,
|
|
271
|
+
...le,
|
|
272
|
+
...(p.total_tax_amounts ?? []).map((e) => ({
|
|
273
|
+
label: h._("Tax ({rate}%)", { rate: ne(e?.value ?? 0) }),
|
|
274
|
+
value: S(e?.amount)
|
|
275
275
|
})),
|
|
276
276
|
{
|
|
277
|
-
label:
|
|
278
|
-
value:
|
|
277
|
+
label: h._("Total"),
|
|
278
|
+
value: S(p.total_amount),
|
|
279
279
|
emphasis: !0
|
|
280
280
|
}
|
|
281
|
-
],
|
|
282
|
-
rows:
|
|
281
|
+
], Y = d.includes(E) ? {
|
|
282
|
+
rows: re.map((e) => ({
|
|
283
283
|
id: e.id,
|
|
284
|
-
dateLabel:
|
|
285
|
-
amountLabel:
|
|
284
|
+
dateLabel: w(e.paid_at),
|
|
285
|
+
amountLabel: S(e.amount)
|
|
286
286
|
})),
|
|
287
|
-
totalLabel:
|
|
287
|
+
totalLabel: S(p.amount_paid),
|
|
288
288
|
emptyTone: O ? "danger" : "default",
|
|
289
|
-
loading:
|
|
290
|
-
} : void 0,
|
|
291
|
-
status:
|
|
292
|
-
amountLabel:
|
|
293
|
-
amountPeriodLabel:
|
|
294
|
-
startsOnLabel: T(
|
|
295
|
-
endsOnLabel:
|
|
296
|
-
scheduleTitle:
|
|
297
|
-
} : void 0,
|
|
298
|
-
title:
|
|
299
|
-
name:
|
|
300
|
-
frequency:
|
|
289
|
+
loading: v
|
|
290
|
+
} : void 0, de = A && m ? {
|
|
291
|
+
status: m.status,
|
|
292
|
+
amountLabel: S(p.total_amount),
|
|
293
|
+
amountPeriodLabel: u(h, m.frequency),
|
|
294
|
+
startsOnLabel: T(m.start_date),
|
|
295
|
+
endsOnLabel: m.end_date ? w(m.end_date) : "-",
|
|
296
|
+
scheduleTitle: h._("{frequency} schedule", { frequency: l(h, m.frequency) })
|
|
297
|
+
} : void 0, fe = ae && m ? {
|
|
298
|
+
title: h._("{name} - {frequency}", {
|
|
299
|
+
name: p.counterpart_name ?? h._("Invoice"),
|
|
300
|
+
frequency: l(h, m.frequency)
|
|
301
301
|
}),
|
|
302
|
-
invoiceId:
|
|
303
|
-
} : void 0, X =
|
|
302
|
+
invoiceId: m.invoice_id
|
|
303
|
+
} : void 0, X = f[E] ?? {
|
|
304
304
|
primary: [],
|
|
305
305
|
overflow: ["clone"]
|
|
306
306
|
}, Z = X.overflow, Q = X.primary;
|
|
307
|
-
if (A &&
|
|
308
|
-
switch (
|
|
307
|
+
if (A && m) {
|
|
308
|
+
switch (m.status) {
|
|
309
309
|
case "active":
|
|
310
310
|
Z = ["pauseRecurrence", "cancelRecurrence"];
|
|
311
311
|
break;
|
|
@@ -314,38 +314,38 @@ function m(m, h, ne, { i18n: g, formatCurrencyToDisplay: _, locale: v }, y = !1,
|
|
|
314
314
|
break;
|
|
315
315
|
default: Z = [];
|
|
316
316
|
}
|
|
317
|
-
(
|
|
317
|
+
(m.status === "active" || m.status === "paused") && (Q = ["edit"]);
|
|
318
318
|
}
|
|
319
|
-
let $ =
|
|
319
|
+
let $ = p.counterpart_name ?? h._("Invoice");
|
|
320
320
|
return {
|
|
321
|
-
title: A &&
|
|
321
|
+
title: A && m ? h._("{name} - {frequency}", {
|
|
322
322
|
name: $,
|
|
323
|
-
frequency:
|
|
323
|
+
frequency: l(h, m.frequency)
|
|
324
324
|
}) : $,
|
|
325
325
|
status: E,
|
|
326
|
-
statusLabel:
|
|
327
|
-
subtitle: A ?
|
|
328
|
-
recurring:
|
|
329
|
-
overdueLabel: O && j > 0 ?
|
|
326
|
+
statusLabel: c(h, E),
|
|
327
|
+
subtitle: A ? h._("Recurring series") : p.document_id ? h._("Invoice: {number}", { number: p.document_id }) : void 0,
|
|
328
|
+
recurring: ie,
|
|
329
|
+
overdueLabel: O && j > 0 ? h._("{days} days overdue", { days: j }) : void 0,
|
|
330
330
|
amountTone: M,
|
|
331
331
|
amountRows: N,
|
|
332
|
-
invoiceDateLabel: T(
|
|
333
|
-
dueDateLabel:
|
|
334
|
-
dueDateCaption: D ?
|
|
335
|
-
paymentHistory:
|
|
332
|
+
invoiceDateLabel: T(p.issue_date),
|
|
333
|
+
dueDateLabel: D ? w(p.updated_at) : T(p.due_date),
|
|
334
|
+
dueDateCaption: D ? h._("Cancelled on") : h._("Due date"),
|
|
335
|
+
paymentHistory: Y,
|
|
336
336
|
customerContact: z,
|
|
337
|
-
recurringSeries:
|
|
338
|
-
seriesLink:
|
|
337
|
+
recurringSeries: de,
|
|
338
|
+
seriesLink: fe,
|
|
339
339
|
billingItems: W,
|
|
340
340
|
lineItems: G,
|
|
341
|
-
lineItemTotals:
|
|
342
|
-
notes:
|
|
343
|
-
opening:
|
|
344
|
-
closing:
|
|
341
|
+
lineItemTotals: ue,
|
|
342
|
+
notes: p.memo || p.footer ? {
|
|
343
|
+
opening: p.memo || void 0,
|
|
344
|
+
closing: p.footer || void 0
|
|
345
345
|
} : void 0,
|
|
346
346
|
primaryActions: Q,
|
|
347
347
|
overflowActions: Z
|
|
348
348
|
};
|
|
349
349
|
}
|
|
350
350
|
//#endregion
|
|
351
|
-
export {
|
|
351
|
+
export { p as buildInvoiceDetailsView };
|
|
@@ -120,16 +120,7 @@ var a = [10, 25], o = (o, s) => ({
|
|
|
120
120
|
onWorkingCapitalOnboardingComplete: s?.onboarding?.onWorkingCapitalOnboardingComplete,
|
|
121
121
|
onPaymentsOnboardingComplete: s?.onboarding?.onPaymentsOnboardingComplete
|
|
122
122
|
},
|
|
123
|
-
financing: s?.financing ?? {}
|
|
124
|
-
templateSettings: {
|
|
125
|
-
availableARDocuments: s?.templateSettings?.availableARDocuments ?? [
|
|
126
|
-
"invoice",
|
|
127
|
-
"credit_note",
|
|
128
|
-
"quote",
|
|
129
|
-
"delivery_note"
|
|
130
|
-
],
|
|
131
|
-
availableAPDocuments: s?.templateSettings?.availableAPDocuments ?? ["purchase_order"]
|
|
132
|
-
}
|
|
123
|
+
financing: s?.financing ?? {}
|
|
133
124
|
});
|
|
134
125
|
//#endregion
|
|
135
126
|
export { o as getDefaultComponentSettings };
|