@tesouro/embedded-components-react 0.5.214 → 0.5.216
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/dist/index.d.ts +144 -3
- package/dist/index.js +14 -13
- package/dist/lib/BankAccountOnboardingWidget.d.ts +56 -2
- package/dist/lib/BankAccountOnboardingWidget.js +4 -3
- package/dist/lib/MarketingWidget.js +1 -1
- package/dist/lib/ReceivablesWidget.d.ts +88 -1
- package/dist/lib/ReceivablesWidget.js +1 -1
- package/dist/lib/WidgetSuite.d.ts +53 -0
- package/dist/libs/shared/util-validation/dist/index5.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index11.js +72 -72
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index12.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index13.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index14.js +60 -60
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index15.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index16.js +16 -16
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index21.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index22.js +71 -5
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index23.js +95 -33
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index24.js +6 -17
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index25.js +16 -616
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index26.js +669 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +15 -13
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index10.js +52 -37
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +31 -37
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js +33 -89
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js +39 -12
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index14.js +98 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +14 -4
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js +2 -185
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js +4 -30
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +183 -21
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +26 -66
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +21 -233
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +66 -27
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +233 -26
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +27 -72
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +26 -85
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +74 -8
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +83 -55
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +6 -7
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +37 -42
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js +64 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js +7 -33
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +63 -67
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +160 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js +6 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index2.js +32 -25
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +25 -200
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js +175 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index8.js +1 -101
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index9.js +92 -71
- 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 +44 -100
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index11.js +93 -421
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +442 -112
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +166 -157
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index14.js +150 -204
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +202 -31
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +32 -145
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +145 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +44 -58
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +113 -87
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index20.js +58 -116
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +83 -357
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index22.js +111 -65
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +449 -99
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index24.js +68 -281
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index25.js +115 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index26.js +314 -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/index6.js +34 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index8.js +444 -92
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +113 -52
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +18 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +2 -92
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +95 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +3 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +24 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +1 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +3 -18
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +18 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +0 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +0 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +1 -264
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +258 -42
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +38 -62
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +61 -463
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +457 -89
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +91 -234
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +89 -82
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +22 -338
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +236 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index3.js +26 -204
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +249 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +93 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +344 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +208 -32
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index5.js +29 -202
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +183 -137
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +157 -12
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +10 -19
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +23 -2
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index5.js +16 -19
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index6.js +157 -16
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +40 -40
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/onboardingSuppressionReason.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +167 -156
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +66 -34
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/index.js +2 -1
- 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/feature/dist/lib/application/bankAccountApplication.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index16.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +13 -13
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index7.js +0 -161
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { Calendar as e, Skeleton as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { EmbeddedToaster as n } from "../../../shared/ui/dist/lib/EmbeddedToaster.js";
|
|
7
|
+
import "../../../shared/ui/dist/index.js";
|
|
8
|
+
import { useAnalyticsTrack as r } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
9
|
+
import { WidgetProvider as i } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
10
|
+
import "../../../shared/feature/dist/index.js";
|
|
11
|
+
import { CounterpartFormSheet as a } from "../../../shared/counterpart-management/ui/dist/index9.js";
|
|
12
|
+
import { CounterpartSelector as o } from "../../../shared/counterpart-management/feature/dist/lib/CounterpartSelector.js";
|
|
13
|
+
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
14
|
+
import { ReceivablesWidgetAnalyticsEvent as s, WIDGET_NAME as c } from "./index2.js";
|
|
15
|
+
import { PAGE_SIZE_OPTIONS as l } from "./index4.js";
|
|
16
|
+
import { ReceivableActionDialog as u } from "../../ui/dist/index5.js";
|
|
17
|
+
import { ReceivableBankAccountSection as d } from "../../ui/dist/index6.js";
|
|
18
|
+
import { ReceivableBillingSection as f } from "../../ui/dist/index11.js";
|
|
19
|
+
import { ReceivableDetailsSheet as p } from "../../ui/dist/index22.js";
|
|
20
|
+
import { ReceivableFormSheet as m } from "../../ui/dist/index25.js";
|
|
21
|
+
import { ReceivablePaymentDialog as h } from "../../ui/dist/index26.js";
|
|
22
|
+
import { ReceivableRecurrenceEmailDialog as g } from "../../ui/dist/index27.js";
|
|
23
|
+
import { ReceivableRecurrenceSection as _ } from "../../ui/dist/index29.js";
|
|
24
|
+
import { ReceivableRemindersSection as v } from "../../ui/dist/index31.js";
|
|
25
|
+
import { ReceivableSendDialog as y } from "../../ui/dist/index32.js";
|
|
26
|
+
import { ReceivablesScreen as b } from "../../ui/dist/index33.js";
|
|
27
|
+
import "../../ui/dist/index.js";
|
|
28
|
+
import { ReceivableAttachmentsSection as x } from "./index5.js";
|
|
29
|
+
import { MeasureUnitsManagerContainer as S } from "../../../shared/product-catalog/feature/dist/lib/MeasureUnitsManagerContainer.js";
|
|
30
|
+
import { ProductSelector as C } from "../../../shared/product-catalog/feature/dist/lib/ProductSelector.js";
|
|
31
|
+
import "../../../shared/product-catalog/feature/dist/index.js";
|
|
32
|
+
import { useReceivablesWidget as w } from "./index25.js";
|
|
33
|
+
import { useEffect as T, useId as E, useState as D } from "react";
|
|
34
|
+
import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
35
|
+
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index26.js
|
|
36
|
+
function j({ counterpartFormLabels: i, counterpartMessageLabels: c, defaultTab: j, detailsLabels: M, embeddedBankName: N, enabledTabs: P, formLabels: F, measureUnitDeleteLabels: I, measureUnitsLabels: L, messageLabels: R, onReceivableCreated: z, onReceivableOpened: B, onTemplateSettingsClick: V, pageSizeOptions: H = l, paymentLabels: U, productMessageLabels: W, screenLabels: G, sendLabels: K, actionLabels: q }) {
|
|
37
|
+
let J = r();
|
|
38
|
+
T(() => {
|
|
39
|
+
J(s.Mounted);
|
|
40
|
+
}, [J]);
|
|
41
|
+
let Y = w({
|
|
42
|
+
counterpartMessageLabels: c,
|
|
43
|
+
defaultTab: j,
|
|
44
|
+
embeddedBankName: N,
|
|
45
|
+
enabledTabs: P,
|
|
46
|
+
messageLabels: R,
|
|
47
|
+
onReceivableCreated: z,
|
|
48
|
+
onReceivableOpened: B
|
|
49
|
+
}), [X, Z] = D(!1), Q = E(), $ = E(), ee = E(), te = E();
|
|
50
|
+
return /* @__PURE__ */ A(O, { children: [
|
|
51
|
+
/* @__PURE__ */ k(n, {}),
|
|
52
|
+
/* @__PURE__ */ k(b, {
|
|
53
|
+
rows: Y.table.rows,
|
|
54
|
+
activeTab: Y.activeTab,
|
|
55
|
+
enabledTabs: Y.enabledTabs,
|
|
56
|
+
onTabChange: Y.setActiveTab,
|
|
57
|
+
isLoading: Y.table.isLoading,
|
|
58
|
+
isError: Y.table.isError,
|
|
59
|
+
sorting: Y.table.sorting,
|
|
60
|
+
onSortingChange: Y.table.onSortingChange,
|
|
61
|
+
pageSize: Y.table.pageSize,
|
|
62
|
+
onPageSizeChange: Y.table.onPageSizeChange,
|
|
63
|
+
pageSizeOptions: H,
|
|
64
|
+
hasNextPage: Y.table.hasNextPage,
|
|
65
|
+
hasPrevPage: Y.table.hasPrevPage,
|
|
66
|
+
onNextPage: Y.table.onNextPage,
|
|
67
|
+
onPrevPage: Y.table.onPrevPage,
|
|
68
|
+
searchValue: Y.table.searchValue,
|
|
69
|
+
onSearchChange: Y.table.onSearchChange,
|
|
70
|
+
statusFilter: Y.table.statusFilter,
|
|
71
|
+
statusOptions: Y.table.statusOptions,
|
|
72
|
+
onStatusFilterChange: Y.table.onStatusFilterChange,
|
|
73
|
+
isFiltering: Y.table.isFiltering,
|
|
74
|
+
onCreateClick: Y.openCreate,
|
|
75
|
+
onTemplateSettingsClick: V,
|
|
76
|
+
onRowClick: Y.handleRowClick,
|
|
77
|
+
onActionClick: Y.handleActionClick,
|
|
78
|
+
onRetry: Y.table.onRetry,
|
|
79
|
+
labels: G
|
|
80
|
+
}),
|
|
81
|
+
/* @__PURE__ */ k(m, {
|
|
82
|
+
open: Y.form.open,
|
|
83
|
+
onOpenChange: (e) => {
|
|
84
|
+
e || Y.form.close();
|
|
85
|
+
},
|
|
86
|
+
mode: Y.form.mode,
|
|
87
|
+
values: Y.form.sheetValues,
|
|
88
|
+
errors: Y.form.errors,
|
|
89
|
+
currencyOptions: Y.form.currencyOptions,
|
|
90
|
+
unitOptions: Y.form.lineItemUnitOptions,
|
|
91
|
+
currencySymbol: Y.form.currencySymbol,
|
|
92
|
+
lineItemControls: Y.form.lineItemControls,
|
|
93
|
+
autoFocusLineItemId: Y.form.autoFocusLineItemId,
|
|
94
|
+
lineItemsLoading: Y.form.lineItemsLoading,
|
|
95
|
+
inProgress: Y.form.isSubmitting,
|
|
96
|
+
customerSelector: /* @__PURE__ */ k(o, {
|
|
97
|
+
mode: "customer",
|
|
98
|
+
value: Y.form.values.customerId || void 0,
|
|
99
|
+
onValueChange: (e) => Y.form.updateValues({ customerId: e }),
|
|
100
|
+
onCreateClick: Y.form.openCounterpartCreate
|
|
101
|
+
}),
|
|
102
|
+
renderProductSelector: (e, t) => /* @__PURE__ */ k(C, {
|
|
103
|
+
...t,
|
|
104
|
+
inputValue: e.name,
|
|
105
|
+
selectedProductId: Y.form.values.lineItems.find((t) => t.id === e.id)?.productId || void 0,
|
|
106
|
+
currency: Y.form.values.currency,
|
|
107
|
+
maxLength: 100,
|
|
108
|
+
onInputValueChange: (t) => Y.form.updateLineItem(e.id, { name: t }),
|
|
109
|
+
onProductSelect: (t) => Y.form.selectProduct(e.id, t)
|
|
110
|
+
}),
|
|
111
|
+
onChange: Y.form.updateValues,
|
|
112
|
+
onLineItemChange: Y.form.updateLineItem,
|
|
113
|
+
onLineItemCommit: Y.form.commitLineItem,
|
|
114
|
+
onLineItemQuantityStep: Y.form.stepLineItem,
|
|
115
|
+
onTaxRateCommit: Y.form.commitTaxRate,
|
|
116
|
+
onDiscountFocus: Y.form.focusDiscount,
|
|
117
|
+
onDiscountCommit: Y.form.commitDiscount,
|
|
118
|
+
totals: Y.form.totalsView,
|
|
119
|
+
onManageUnits: () => Z(!0),
|
|
120
|
+
onAddLineItem: Y.form.addLineItem,
|
|
121
|
+
onRemoveLineItem: Y.form.removeLineItem,
|
|
122
|
+
showDueDateField: Y.form.showDueDateField,
|
|
123
|
+
billingSection: Y.form.showBillingSection && /* @__PURE__ */ k(f, {
|
|
124
|
+
idPrefix: Q,
|
|
125
|
+
paymentTerms: Y.form.paymentTerms.view,
|
|
126
|
+
paymentTermsError: Y.form.errors.paymentTermsId,
|
|
127
|
+
disabled: Y.form.isSubmitting,
|
|
128
|
+
onPaymentTermsChange: Y.form.paymentTerms.select,
|
|
129
|
+
onCustomDatePickerOpenChange: Y.form.paymentTerms.changeCustomDatePickerOpen,
|
|
130
|
+
customDateCalendar: /* @__PURE__ */ k(e, {
|
|
131
|
+
mode: "single",
|
|
132
|
+
captionLayout: "dropdown",
|
|
133
|
+
...Y.form.paymentTerms.calendar,
|
|
134
|
+
onSelect: Y.form.paymentTerms.selectCustomDate
|
|
135
|
+
}),
|
|
136
|
+
recurrenceSection: Y.form.showRecurrenceSection && (Y.form.recurrenceLoading ? /* @__PURE__ */ k(t, { className: "ttw:h-9 ttw:w-full" }) : /* @__PURE__ */ k(_, {
|
|
137
|
+
idPrefix: $,
|
|
138
|
+
view: Y.form.recurrence.view,
|
|
139
|
+
disabled: Y.form.isSubmitting,
|
|
140
|
+
onFrequencyChange: Y.form.recurrence.changeFrequency,
|
|
141
|
+
onMonthDayChange: Y.form.recurrence.changeMonthDay,
|
|
142
|
+
onWeekdayChange: Y.form.recurrence.changeWeekday,
|
|
143
|
+
onStartDateChange: Y.form.recurrence.changeStartDate,
|
|
144
|
+
onEndModeChange: Y.form.recurrence.changeEndMode,
|
|
145
|
+
onEndDateChange: Y.form.recurrence.changeEndDate,
|
|
146
|
+
onMaxOccurrencesChange: Y.form.recurrence.changeMaxOccurrences,
|
|
147
|
+
onCreationModeChange: Y.form.recurrence.changeCreationMode,
|
|
148
|
+
onSetUpEmailClick: Y.form.recurrence.setUpEmail,
|
|
149
|
+
emailDialog: /* @__PURE__ */ k(g, {
|
|
150
|
+
idPrefix: $,
|
|
151
|
+
view: Y.form.recurrence.emailView,
|
|
152
|
+
onOpenChange: Y.form.recurrence.changeEmailOpen,
|
|
153
|
+
onChange: Y.form.recurrence.changeEmail,
|
|
154
|
+
onSave: Y.form.recurrence.saveEmail,
|
|
155
|
+
labels: F
|
|
156
|
+
}),
|
|
157
|
+
labels: F
|
|
158
|
+
})),
|
|
159
|
+
labels: F
|
|
160
|
+
}),
|
|
161
|
+
remindersSection: Y.form.reminders.view && /* @__PURE__ */ k(v, {
|
|
162
|
+
idPrefix: te,
|
|
163
|
+
view: Y.form.reminders.view,
|
|
164
|
+
onToggle: Y.form.reminders.toggle,
|
|
165
|
+
onPaymentReminderSelect: Y.form.reminders.selectPaymentReminder,
|
|
166
|
+
onOverdueReminderSelect: Y.form.reminders.selectOverdueReminder,
|
|
167
|
+
onBeforeDueInputChange: Y.form.reminders.changeBeforeDueInput,
|
|
168
|
+
onBeforeDueSave: Y.form.reminders.saveBeforeDue,
|
|
169
|
+
onOverdueTermChange: Y.form.reminders.changeOverdueTerm,
|
|
170
|
+
onOverdueAddTerm: Y.form.reminders.addOverdueTerm,
|
|
171
|
+
onOverdueClear: Y.form.reminders.clearOverdueTerms,
|
|
172
|
+
onOverdueSave: Y.form.reminders.saveOverdue,
|
|
173
|
+
labels: F
|
|
174
|
+
}),
|
|
175
|
+
bankAccountSection: /* @__PURE__ */ k(d, {
|
|
176
|
+
idPrefix: ee,
|
|
177
|
+
view: Y.form.bankAccount.view,
|
|
178
|
+
disabled: Y.form.isSubmitting,
|
|
179
|
+
onAccountSelect: Y.form.bankAccount.selectAccount,
|
|
180
|
+
onAddAccountClick: Y.form.bankAccount.openAddAccount,
|
|
181
|
+
onFormChange: Y.form.bankAccount.updateAccountForm,
|
|
182
|
+
onFormSave: Y.form.bankAccount.saveAccount,
|
|
183
|
+
onFormCancel: Y.form.bankAccount.cancelAddAccount,
|
|
184
|
+
labels: F
|
|
185
|
+
}),
|
|
186
|
+
attachmentsSection: Y.form.attachmentsView && /* @__PURE__ */ k(x, {
|
|
187
|
+
view: Y.form.attachmentsView,
|
|
188
|
+
disabled: Y.form.isSubmitting,
|
|
189
|
+
onFilesSelect: Y.form.selectAttachmentFiles,
|
|
190
|
+
onIncludeInEmailChange: Y.form.setAttachmentIncludeInEmail,
|
|
191
|
+
onRemove: Y.form.removeAttachment,
|
|
192
|
+
labels: F
|
|
193
|
+
}),
|
|
194
|
+
cancelDisabled: Y.form.attachmentsUploading,
|
|
195
|
+
saveDisabled: Y.form.saveDisabled,
|
|
196
|
+
submitLabel: Y.form.submitLabel,
|
|
197
|
+
onSubmit: Y.form.submit,
|
|
198
|
+
onCancel: Y.form.close,
|
|
199
|
+
labels: F
|
|
200
|
+
}),
|
|
201
|
+
/* @__PURE__ */ k(p, {
|
|
202
|
+
open: Y.detailsOpen,
|
|
203
|
+
onOpenChange: (e) => {
|
|
204
|
+
e || Y.closeDetails();
|
|
205
|
+
},
|
|
206
|
+
details: Y.details.detailsView,
|
|
207
|
+
isLoading: Y.details.isLoading,
|
|
208
|
+
isError: Y.details.isError,
|
|
209
|
+
onActionClick: Y.handleDetailsActionClick,
|
|
210
|
+
onClose: Y.closeDetails,
|
|
211
|
+
labels: M
|
|
212
|
+
}),
|
|
213
|
+
/* @__PURE__ */ k(y, {
|
|
214
|
+
open: Y.actions.sendOpen,
|
|
215
|
+
onOpenChange: (e) => {
|
|
216
|
+
e || Y.actions.closeSend();
|
|
217
|
+
},
|
|
218
|
+
values: Y.actions.sendValues,
|
|
219
|
+
errors: Y.actions.sendErrors,
|
|
220
|
+
inProgress: Y.actions.sendInProgress,
|
|
221
|
+
onChange: (e) => Y.actions.setSendValues((t) => ({
|
|
222
|
+
...t,
|
|
223
|
+
...e
|
|
224
|
+
})),
|
|
225
|
+
onSubmit: Y.actions.submitSend,
|
|
226
|
+
onCancel: Y.actions.closeSend,
|
|
227
|
+
labels: K
|
|
228
|
+
}),
|
|
229
|
+
/* @__PURE__ */ k(h, {
|
|
230
|
+
open: Y.actions.paymentOpen,
|
|
231
|
+
onOpenChange: (e) => {
|
|
232
|
+
e || Y.actions.closePayment();
|
|
233
|
+
},
|
|
234
|
+
values: Y.actions.paymentValues,
|
|
235
|
+
errors: Y.actions.paymentErrors,
|
|
236
|
+
inProgress: Y.actions.paymentInProgress,
|
|
237
|
+
onChange: (e) => Y.actions.setPaymentValues((t) => ({
|
|
238
|
+
...t,
|
|
239
|
+
...e
|
|
240
|
+
})),
|
|
241
|
+
onSubmit: Y.actions.submitPayment,
|
|
242
|
+
onCancel: Y.actions.closePayment,
|
|
243
|
+
labels: U
|
|
244
|
+
}),
|
|
245
|
+
Y.actions.actionDialog && /* @__PURE__ */ k(u, {
|
|
246
|
+
open: !!Y.actions.actionTarget,
|
|
247
|
+
onOpenChange: (e) => {
|
|
248
|
+
e || Y.actions.closeAction();
|
|
249
|
+
},
|
|
250
|
+
title: Y.actions.actionDialog.title,
|
|
251
|
+
description: Y.actions.actionDialog.description,
|
|
252
|
+
confirmLabel: Y.actions.actionDialog.confirmLabel,
|
|
253
|
+
destructive: Y.actions.actionDialog.destructive,
|
|
254
|
+
error: Y.actions.actionError,
|
|
255
|
+
inProgress: Y.actions.actionInProgress,
|
|
256
|
+
onConfirm: Y.actions.confirmAction,
|
|
257
|
+
onCancel: Y.actions.closeAction,
|
|
258
|
+
labels: q
|
|
259
|
+
}),
|
|
260
|
+
/* @__PURE__ */ k(a, {
|
|
261
|
+
open: Y.form.counterpartView === "create",
|
|
262
|
+
onOpenChange: (e) => {
|
|
263
|
+
e || Y.form.counterpartForm.close();
|
|
264
|
+
},
|
|
265
|
+
mode: "create",
|
|
266
|
+
values: Y.form.counterpartForm.values,
|
|
267
|
+
errors: Y.form.counterpartForm.errors,
|
|
268
|
+
stateOptions: Y.form.stateOptions,
|
|
269
|
+
inProgress: Y.form.counterpartForm.isSubmitting,
|
|
270
|
+
onChange: (e) => Y.form.counterpartForm.setValues((t) => ({
|
|
271
|
+
...t,
|
|
272
|
+
...e
|
|
273
|
+
})),
|
|
274
|
+
onAddressChange: (e) => Y.form.counterpartForm.setValues((t) => ({
|
|
275
|
+
...t,
|
|
276
|
+
address: {
|
|
277
|
+
...t.address,
|
|
278
|
+
...e
|
|
279
|
+
}
|
|
280
|
+
})),
|
|
281
|
+
onSubmit: Y.form.counterpartForm.submit,
|
|
282
|
+
onCancel: Y.form.counterpartForm.close,
|
|
283
|
+
labels: i
|
|
284
|
+
}),
|
|
285
|
+
/* @__PURE__ */ k(S, {
|
|
286
|
+
open: X,
|
|
287
|
+
onClose: () => Z(!1),
|
|
288
|
+
managerLabels: L,
|
|
289
|
+
deleteLabels: I,
|
|
290
|
+
messageLabels: W
|
|
291
|
+
})
|
|
292
|
+
] });
|
|
293
|
+
}
|
|
294
|
+
function M({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: l, errorFallback: u, onError: d, analytics: f, disclosuresAcceptance: p, providerLabels: m, ...h }) {
|
|
295
|
+
return /* @__PURE__ */ k(i, {
|
|
296
|
+
widgetName: c,
|
|
297
|
+
baseUrl: e,
|
|
298
|
+
widgetToken: t,
|
|
299
|
+
organizationId: n,
|
|
300
|
+
configClient: r,
|
|
301
|
+
gatewayRouting: a,
|
|
302
|
+
linkComponent: o,
|
|
303
|
+
implementation: s,
|
|
304
|
+
uiFramework: l,
|
|
305
|
+
errorFallback: u,
|
|
306
|
+
onError: d,
|
|
307
|
+
analytics: f,
|
|
308
|
+
disclosuresAcceptance: p,
|
|
309
|
+
providerLabels: m,
|
|
310
|
+
children: /* @__PURE__ */ k(j, { ...h })
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
//#endregion
|
|
314
|
+
export { M as ReceivablesWidget, M as default };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { ReceivableAttachmentsSection as e } from "../../ui/dist/
|
|
5
|
+
import { ReceivableAttachmentsSection as e } from "../../ui/dist/index7.js";
|
|
6
6
|
import "../../ui/dist/index.js";
|
|
7
7
|
import { useRef as t, useState as n } from "react";
|
|
8
8
|
import { jsx as r } from "react/jsx-runtime";
|
|
@@ -106,11 +106,22 @@ function x({ id: e, name: t, quantity: n, price: r, measureUnitId: i, taxable: a
|
|
|
106
106
|
function S(e) {
|
|
107
107
|
return !e.name.trim();
|
|
108
108
|
}
|
|
109
|
-
function C(e) {
|
|
109
|
+
function C(e, t) {
|
|
110
|
+
let n = 0;
|
|
111
|
+
return e.map((e) => {
|
|
112
|
+
if (S(e)) return e;
|
|
113
|
+
let r = t[n++]?.id;
|
|
114
|
+
return r ? {
|
|
115
|
+
...e,
|
|
116
|
+
id: r
|
|
117
|
+
} : e;
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
function w(e) {
|
|
110
121
|
let t = e.filter((e) => !S(e));
|
|
111
122
|
return t.length > 0 ? t : e.slice(0, 1);
|
|
112
123
|
}
|
|
113
|
-
function
|
|
124
|
+
function T({ product: e, currency: t, unitNamesById: n }) {
|
|
114
125
|
let r = e.measure_unit_id ?? "";
|
|
115
126
|
return {
|
|
116
127
|
productId: e.id,
|
|
@@ -124,13 +135,13 @@ function w({ product: e, currency: t, unitNamesById: n }) {
|
|
|
124
135
|
} : {}
|
|
125
136
|
};
|
|
126
137
|
}
|
|
127
|
-
function
|
|
138
|
+
function E(e) {
|
|
128
139
|
return e.quantity === void 0 ? e : {
|
|
129
140
|
...e,
|
|
130
141
|
quantity: i(e.quantity)
|
|
131
142
|
};
|
|
132
143
|
}
|
|
133
|
-
function
|
|
144
|
+
function D({ lineItem: e, field: t, rowCount: r, currency: l, separators: u = n() }) {
|
|
134
145
|
if (t === "price") return {
|
|
135
146
|
kind: "update",
|
|
136
147
|
patch: { price: s(c(e.price, l, u), l) }
|
|
@@ -144,7 +155,7 @@ function E({ lineItem: e, field: t, rowCount: r, currency: l, separators: u = n(
|
|
|
144
155
|
patch: { quantity: String(d) }
|
|
145
156
|
};
|
|
146
157
|
}
|
|
147
|
-
function
|
|
158
|
+
function O({ lineItem: e, step: t, rowCount: n }) {
|
|
148
159
|
if (S(e)) return;
|
|
149
160
|
let r = o(Math.max(0, a(e.quantity)) + t);
|
|
150
161
|
return r <= 0 && n > 1 ? { kind: "remove" } : {
|
|
@@ -152,7 +163,7 @@ function D({ lineItem: e, step: t, rowCount: n }) {
|
|
|
152
163
|
patch: { quantity: String(Math.max(n > 1 ? 0 : 1, r)) }
|
|
153
164
|
};
|
|
154
165
|
}
|
|
155
|
-
function
|
|
166
|
+
function k(e) {
|
|
156
167
|
return Object.fromEntries(e.map((t) => {
|
|
157
168
|
let n = !S(t), r = a(t.quantity);
|
|
158
169
|
return [t.id, {
|
|
@@ -161,7 +172,7 @@ function O(e) {
|
|
|
161
172
|
}];
|
|
162
173
|
}));
|
|
163
174
|
}
|
|
164
|
-
function
|
|
175
|
+
function A(e, t, n = !1) {
|
|
165
176
|
return e.taxable ? {
|
|
166
177
|
tax_status: "taxable",
|
|
167
178
|
tax_rate_value: h(e, p(t), n)
|
|
@@ -170,8 +181,8 @@ function k(e, t, n = !1) {
|
|
|
170
181
|
tax_rate_value: void 0
|
|
171
182
|
};
|
|
172
183
|
}
|
|
173
|
-
function
|
|
174
|
-
let i = e.measureUnitId ? r[e.measureUnitId] : void 0, { tax_status: o, tax_rate_value: s } =
|
|
184
|
+
function j({ lineItem: e, currency: t, taxRate: n, unitNamesById: r }) {
|
|
185
|
+
let i = e.measureUnitId ? r[e.measureUnitId] : void 0, { tax_status: o, tax_rate_value: s } = A(e, n);
|
|
175
186
|
return {
|
|
176
187
|
quantity: a(e.quantity),
|
|
177
188
|
tax_status: o,
|
|
@@ -187,8 +198,8 @@ function A({ lineItem: e, currency: t, taxRate: n, unitNamesById: r }) {
|
|
|
187
198
|
tax_rate_value: s
|
|
188
199
|
};
|
|
189
200
|
}
|
|
190
|
-
function
|
|
191
|
-
let o = e.measureUnitId && i[e.measureUnitId] || e.measureUnitName || void 0, { tax_status: s, tax_rate_value: l } =
|
|
201
|
+
function M({ lineItem: e, currency: t, taxRate: n, keepSavedRate: r, unitNamesById: i }) {
|
|
202
|
+
let o = e.measureUnitId && i[e.measureUnitId] || e.measureUnitName || void 0, { tax_status: s, tax_rate_value: l } = A(e, n, r);
|
|
192
203
|
return {
|
|
193
204
|
quantity: a(e.quantity),
|
|
194
205
|
tax_status: s,
|
|
@@ -205,7 +216,7 @@ function j({ lineItem: e, currency: t, taxRate: n, keepSavedRate: r, unitNamesBy
|
|
|
205
216
|
discount: e.savedDiscount
|
|
206
217
|
};
|
|
207
218
|
}
|
|
208
|
-
function
|
|
219
|
+
function N({ lineItem: e, currency: t, units: n }) {
|
|
209
220
|
let r = e.product.measure_unit;
|
|
210
221
|
return {
|
|
211
222
|
id: e.id,
|
|
@@ -213,7 +224,7 @@ function M({ lineItem: e, currency: t, units: n }) {
|
|
|
213
224
|
name: e.product.name,
|
|
214
225
|
quantity: String(e.quantity),
|
|
215
226
|
price: s(e.product.price?.value ?? 0, t),
|
|
216
|
-
measureUnitId:
|
|
227
|
+
measureUnitId: F(r?.id ?? "", r?.name ?? "", n),
|
|
217
228
|
measureUnitName: r?.name ?? "",
|
|
218
229
|
productType: e.product.type ?? "product",
|
|
219
230
|
taxable: g(e.tax_status),
|
|
@@ -222,17 +233,17 @@ function M({ lineItem: e, currency: t, units: n }) {
|
|
|
222
233
|
savedDiscount: e.discount ?? void 0
|
|
223
234
|
};
|
|
224
235
|
}
|
|
225
|
-
function
|
|
236
|
+
function P(e, t) {
|
|
226
237
|
if (!t) return;
|
|
227
238
|
let n = t.toLowerCase();
|
|
228
239
|
return e.find((e) => e.name.toLowerCase() === n);
|
|
229
240
|
}
|
|
230
|
-
function
|
|
231
|
-
return n?.length ? ((e ? n.find((t) => t.id === e) : void 0) ??
|
|
241
|
+
function F(e, t, n) {
|
|
242
|
+
return n?.length ? ((e ? n.find((t) => t.id === e) : void 0) ?? P(n, t))?.id ?? (t ? "" : e) : e;
|
|
232
243
|
}
|
|
233
|
-
function
|
|
244
|
+
function I(e, t) {
|
|
234
245
|
let n = !1, r = e.map((e) => {
|
|
235
|
-
let r =
|
|
246
|
+
let r = F(e.measureUnitId, e.measureUnitName, t);
|
|
236
247
|
return r === e.measureUnitId ? e : (n = !0, {
|
|
237
248
|
...e,
|
|
238
249
|
measureUnitId: r
|
|
@@ -240,18 +251,18 @@ function F(e, t) {
|
|
|
240
251
|
});
|
|
241
252
|
return n ? r : e;
|
|
242
253
|
}
|
|
243
|
-
function
|
|
254
|
+
function L(n) {
|
|
244
255
|
return new Intl.NumberFormat().format(t / 10 ** e(n));
|
|
245
256
|
}
|
|
246
|
-
function
|
|
257
|
+
function R(e, { currency: t, messages: n }) {
|
|
247
258
|
let r = {};
|
|
248
259
|
for (let i of e) {
|
|
249
260
|
let e = {};
|
|
250
|
-
i.name.length > 100 && (e.name = n.lineItemNameTooLong), c(i.price, t) > 9e15 && (e.price = n.lineItemPriceTooHigh.replace("{maxAmount}",
|
|
261
|
+
i.name.length > 100 && (e.name = n.lineItemNameTooLong), c(i.price, t) > 9e15 && (e.price = n.lineItemPriceTooHigh.replace("{maxAmount}", L(t))), Object.keys(e).length > 0 && (r[i.id] = e);
|
|
251
262
|
}
|
|
252
263
|
return Object.keys(r).length > 0 ? r : void 0;
|
|
253
264
|
}
|
|
254
|
-
function
|
|
265
|
+
function z(e, t) {
|
|
255
266
|
let n = Object.values(e ?? {}), r = [t, ...[
|
|
256
267
|
"name",
|
|
257
268
|
"quantity",
|
|
@@ -261,4 +272,4 @@ function R(e, t) {
|
|
|
261
272
|
return r.length > 0 ? r : void 0;
|
|
262
273
|
}
|
|
263
274
|
//#endregion
|
|
264
|
-
export { t as MAX_AMOUNT_MINOR_UNITS,
|
|
275
|
+
export { t as MAX_AMOUNT_MINOR_UNITS, k as buildLineItemControls, D as commitLineItemField, f as commitTaxRateInput, u as convertPriceInput, b as createLineItem, r as escapeRegex, s as formatPriceInput, v as getCurrencySymbol, n as getNumberSeparators, S as isBlankLineItem, g as isLineItemTaxable, m as keepsSavedTaxRates, T as lineItemFromProduct, h as lineItemTaxRateMinorUnits, j as lineItemToCreatePayload, M as lineItemToUpdatePayload, L as maxAmountLabel, l as parseLocaleDecimal, a as parseQuantity, c as priceInputToMinorUnits, C as reconcileLineItemIds, I as reconcileMeasureUnits, N as responseLineItemToFormValues, E as sanitizeLineItemPatch, i as sanitizeQuantityInput, d as sanitizeTaxRateInput, O as stepLineItemQuantity, w as stripBlankLineItems, z as summarizeLineItemErrors, _ as taxRateFromLineItems, p as taxRateToMinorUnits, x as toSheetLineItem, R as validateLineItems };
|