@tesouro/embedded-components-react 0.7.22 → 0.7.24
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 +9 -1
- package/dist/lib/CounterpartsWidget.d.ts +9 -1
- package/dist/lib/CounterpartsWidgetPublic.d.ts +9 -1
- package/dist/lib/CustomersWidget.d.ts +9 -1
- package/dist/lib/ReceivablesWidget.d.ts +9 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartDetailsContainer.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartsWidget.js +50 -51
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index4.js +72 -128
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index5.js +183 -38
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index6.js +503 -193
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +57 -55
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +14 -14
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +114 -102
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js +12 -11
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index10.js +534 -7
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js +7 -179
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index12.js +179 -6
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index13.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index14.js +4 -28
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index15.js +28 -4
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index16.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +10 -2
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index7.js +140 -55
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index8.js +53 -47
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index9.js +51 -539
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index7.js +0 -520
package/dist/index.d.ts
CHANGED
|
@@ -4361,7 +4361,12 @@ interface CounterpartFormSheetLabels {
|
|
|
4361
4361
|
titleLabel: string;
|
|
4362
4362
|
emailLabel: string;
|
|
4363
4363
|
phoneLabel: string;
|
|
4364
|
+
/** Used by the inline fields; the sheet prefers the SSN/EIN keys and falls back to this. */
|
|
4364
4365
|
taxIdLabel: string;
|
|
4366
|
+
taxIdSsnLabel: string;
|
|
4367
|
+
taxIdEinLabel: string;
|
|
4368
|
+
taxIdSsnPlaceholder: string;
|
|
4369
|
+
taxIdEinPlaceholder: string;
|
|
4365
4370
|
customerTaxIdHelp: string;
|
|
4366
4371
|
vendorTaxIdHelp: string;
|
|
4367
4372
|
paymentRemindersLabel: string;
|
|
@@ -4382,7 +4387,10 @@ interface CounterpartFormSheetLabels {
|
|
|
4382
4387
|
accountNumberLabel?: string;
|
|
4383
4388
|
addAddress: string;
|
|
4384
4389
|
cancelButton: string;
|
|
4385
|
-
|
|
4390
|
+
/** @deprecated Superseded by `createButtonCustomer` / `createButtonVendor`. */
|
|
4391
|
+
createButton?: string;
|
|
4392
|
+
createButtonCustomer: string;
|
|
4393
|
+
createButtonVendor: string;
|
|
4386
4394
|
saveButton: string;
|
|
4387
4395
|
address: AddressFieldGroupLabels;
|
|
4388
4396
|
ach: AchFieldGroupLabels;
|
|
@@ -704,7 +704,12 @@ interface CounterpartFormSheetLabels {
|
|
|
704
704
|
titleLabel: string;
|
|
705
705
|
emailLabel: string;
|
|
706
706
|
phoneLabel: string;
|
|
707
|
+
/** Used by the inline fields; the sheet prefers the SSN/EIN keys and falls back to this. */
|
|
707
708
|
taxIdLabel: string;
|
|
709
|
+
taxIdSsnLabel: string;
|
|
710
|
+
taxIdEinLabel: string;
|
|
711
|
+
taxIdSsnPlaceholder: string;
|
|
712
|
+
taxIdEinPlaceholder: string;
|
|
708
713
|
customerTaxIdHelp: string;
|
|
709
714
|
vendorTaxIdHelp: string;
|
|
710
715
|
paymentRemindersLabel: string;
|
|
@@ -725,7 +730,10 @@ interface CounterpartFormSheetLabels {
|
|
|
725
730
|
accountNumberLabel?: string;
|
|
726
731
|
addAddress: string;
|
|
727
732
|
cancelButton: string;
|
|
728
|
-
|
|
733
|
+
/** @deprecated Superseded by `createButtonCustomer` / `createButtonVendor`. */
|
|
734
|
+
createButton?: string;
|
|
735
|
+
createButtonCustomer: string;
|
|
736
|
+
createButtonVendor: string;
|
|
729
737
|
saveButton: string;
|
|
730
738
|
address: AddressFieldGroupLabels;
|
|
731
739
|
ach: AchFieldGroupLabels;
|
|
@@ -704,7 +704,12 @@ interface CounterpartFormSheetLabels {
|
|
|
704
704
|
titleLabel: string;
|
|
705
705
|
emailLabel: string;
|
|
706
706
|
phoneLabel: string;
|
|
707
|
+
/** Used by the inline fields; the sheet prefers the SSN/EIN keys and falls back to this. */
|
|
707
708
|
taxIdLabel: string;
|
|
709
|
+
taxIdSsnLabel: string;
|
|
710
|
+
taxIdEinLabel: string;
|
|
711
|
+
taxIdSsnPlaceholder: string;
|
|
712
|
+
taxIdEinPlaceholder: string;
|
|
708
713
|
customerTaxIdHelp: string;
|
|
709
714
|
vendorTaxIdHelp: string;
|
|
710
715
|
paymentRemindersLabel: string;
|
|
@@ -725,7 +730,10 @@ interface CounterpartFormSheetLabels {
|
|
|
725
730
|
accountNumberLabel?: string;
|
|
726
731
|
addAddress: string;
|
|
727
732
|
cancelButton: string;
|
|
728
|
-
|
|
733
|
+
/** @deprecated Superseded by `createButtonCustomer` / `createButtonVendor`. */
|
|
734
|
+
createButton?: string;
|
|
735
|
+
createButtonCustomer: string;
|
|
736
|
+
createButtonVendor: string;
|
|
729
737
|
saveButton: string;
|
|
730
738
|
address: AddressFieldGroupLabels;
|
|
731
739
|
ach: AchFieldGroupLabels;
|
|
@@ -705,7 +705,12 @@ interface CounterpartFormSheetLabels {
|
|
|
705
705
|
titleLabel: string;
|
|
706
706
|
emailLabel: string;
|
|
707
707
|
phoneLabel: string;
|
|
708
|
+
/** Used by the inline fields; the sheet prefers the SSN/EIN keys and falls back to this. */
|
|
708
709
|
taxIdLabel: string;
|
|
710
|
+
taxIdSsnLabel: string;
|
|
711
|
+
taxIdEinLabel: string;
|
|
712
|
+
taxIdSsnPlaceholder: string;
|
|
713
|
+
taxIdEinPlaceholder: string;
|
|
709
714
|
customerTaxIdHelp: string;
|
|
710
715
|
vendorTaxIdHelp: string;
|
|
711
716
|
paymentRemindersLabel: string;
|
|
@@ -726,7 +731,10 @@ interface CounterpartFormSheetLabels {
|
|
|
726
731
|
accountNumberLabel?: string;
|
|
727
732
|
addAddress: string;
|
|
728
733
|
cancelButton: string;
|
|
729
|
-
|
|
734
|
+
/** @deprecated Superseded by `createButtonCustomer` / `createButtonVendor`. */
|
|
735
|
+
createButton?: string;
|
|
736
|
+
createButtonCustomer: string;
|
|
737
|
+
createButtonVendor: string;
|
|
730
738
|
saveButton: string;
|
|
731
739
|
address: AddressFieldGroupLabels;
|
|
732
740
|
ach: AchFieldGroupLabels;
|
|
@@ -793,7 +793,12 @@ interface CounterpartFormSheetLabels {
|
|
|
793
793
|
titleLabel: string;
|
|
794
794
|
emailLabel: string;
|
|
795
795
|
phoneLabel: string;
|
|
796
|
+
/** Used by the inline fields; the sheet prefers the SSN/EIN keys and falls back to this. */
|
|
796
797
|
taxIdLabel: string;
|
|
798
|
+
taxIdSsnLabel: string;
|
|
799
|
+
taxIdEinLabel: string;
|
|
800
|
+
taxIdSsnPlaceholder: string;
|
|
801
|
+
taxIdEinPlaceholder: string;
|
|
797
802
|
customerTaxIdHelp: string;
|
|
798
803
|
vendorTaxIdHelp: string;
|
|
799
804
|
paymentRemindersLabel: string;
|
|
@@ -814,7 +819,10 @@ interface CounterpartFormSheetLabels {
|
|
|
814
819
|
accountNumberLabel?: string;
|
|
815
820
|
addAddress: string;
|
|
816
821
|
cancelButton: string;
|
|
817
|
-
|
|
822
|
+
/** @deprecated Superseded by `createButtonCustomer` / `createButtonVendor`. */
|
|
823
|
+
createButton?: string;
|
|
824
|
+
createButtonCustomer: string;
|
|
825
|
+
createButtonVendor: string;
|
|
818
826
|
saveButton: string;
|
|
819
827
|
address: AddressFieldGroupLabels;
|
|
820
828
|
ach: AchFieldGroupLabels;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { Button as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
6
|
import { getStateOptions as t } from "../../../../shared/util/dist/lib/usStates.js";
|
|
7
7
|
import { AchFieldGroup as n } from "../../../../shared/counterpart-management/ui/dist/index5.js";
|
|
8
|
-
import { CounterpartFormFields as r, countErrors as i, useFocusFirstInvalidField as a } from "../../../../shared/counterpart-management/ui/dist/
|
|
8
|
+
import { CounterpartFormFields as r, countErrors as i, useFocusFirstInvalidField as a } from "../../../../shared/counterpart-management/ui/dist/index10.js";
|
|
9
9
|
import "../../../../shared/counterpart-management/ui/dist/index.js";
|
|
10
10
|
import { VendorSearchCombobox as o } from "../../ui/dist/index24.js";
|
|
11
11
|
import "../../ui/dist/index.js";
|
|
@@ -7,7 +7,7 @@ import "../../../../../shared/feature/dist/index.js";
|
|
|
7
7
|
import { getCounterpartPermissions as t } from "./permissions.js";
|
|
8
8
|
import { useCounterpartDetailsSheetView as n } from "./useCounterpartDetailsSheetView.js";
|
|
9
9
|
import { COUNTERPART_DETAILS_SHEET_LABELS_EN as r } from "../../../../ui/dist/index2.js";
|
|
10
|
-
import { CounterpartDetailsSheet as i } from "../../../../ui/dist/
|
|
10
|
+
import { CounterpartDetailsSheet as i } from "../../../../ui/dist/index6.js";
|
|
11
11
|
import "../../../../ui/dist/index.js";
|
|
12
12
|
import { useMemo as a } from "react";
|
|
13
13
|
import { jsx as o } from "react/jsx-runtime";
|
|
@@ -7,32 +7,33 @@ import "../../../../../shared/ui/dist/index.js";
|
|
|
7
7
|
import { useAnalyticsTrack as t } from "../../../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
8
8
|
import { WidgetProvider as n } from "../../../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
9
9
|
import "../../../../../shared/feature/dist/index.js";
|
|
10
|
-
import { CounterpartFormSheet as r } from "../../../../../shared/counterpart-management/ui/dist/
|
|
11
|
-
import { BankAccountFormSheet as i } from "../../../../../shared/counterpart-management/ui/dist/
|
|
12
|
-
import { ConfirmDeleteDialog as a } from "../../../../../shared/counterpart-management/ui/dist/
|
|
10
|
+
import { CounterpartFormSheet as r } from "../../../../../shared/counterpart-management/ui/dist/index10.js";
|
|
11
|
+
import { BankAccountFormSheet as i } from "../../../../../shared/counterpart-management/ui/dist/index12.js";
|
|
12
|
+
import { ConfirmDeleteDialog as a } from "../../../../../shared/counterpart-management/ui/dist/index15.js";
|
|
13
|
+
import { buildCounterpartFormTaxIdField as o } from "../../../../../shared/counterpart-management/feature/dist/lib/helpers.js";
|
|
13
14
|
import "../../../../../shared/counterpart-management/feature/dist/index.js";
|
|
14
|
-
import { CounterpartsWidgetAnalyticsEvent as
|
|
15
|
-
import { PAGE_SIZE_OPTIONS as
|
|
16
|
-
import { EDIT_FORM_FIELD_KEYS as
|
|
17
|
-
import { COUNTERPART_DETAILS_SHEET_LABELS_EN as
|
|
18
|
-
import { CounterpartsScreen as
|
|
19
|
-
import { CounterpartDetailsSheet as
|
|
15
|
+
import { CounterpartsWidgetAnalyticsEvent as s, WIDGET_NAME as c } from "../analytics/events.js";
|
|
16
|
+
import { PAGE_SIZE_OPTIONS as l } from "./constants.js";
|
|
17
|
+
import { EDIT_FORM_FIELD_KEYS as u, addressFormLabelOverrides as d, buildCounterpartEditFormView as f, editFormLabelOverrides as p, withAddressLabelOverrides as m } from "./viewModels.js";
|
|
18
|
+
import { COUNTERPART_DETAILS_SHEET_LABELS_EN as h } from "../../../../ui/dist/index2.js";
|
|
19
|
+
import { CounterpartsScreen as g } from "../../../../ui/dist/index3.js";
|
|
20
|
+
import { CounterpartDetailsSheet as _ } from "../../../../ui/dist/index6.js";
|
|
20
21
|
import "../../../../ui/dist/index.js";
|
|
21
|
-
import { useCounterpartsWidget as
|
|
22
|
-
import { useEffect as
|
|
23
|
-
import { Fragment as
|
|
22
|
+
import { useCounterpartsWidget as v } from "./useCounterpartsWidget.js";
|
|
23
|
+
import { useEffect as ee, useMemo as y } from "react";
|
|
24
|
+
import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
24
25
|
//#region ../../libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartsWidget.js
|
|
25
|
-
function
|
|
26
|
-
let
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}, [
|
|
30
|
-
let { stateOptions:
|
|
26
|
+
function C({ counterpartType: n, pageSizeOptions: c = l, onViewAllDocuments: C, onCreateDocument: w, screenLabels: T, formLabels: E, detailsLabels: D, bankAccountLabels: O, addressLabels: k, deleteLabels: A, messageLabels: j }) {
|
|
27
|
+
let M = t();
|
|
28
|
+
ee(() => {
|
|
29
|
+
M(s.Mounted);
|
|
30
|
+
}, [M]);
|
|
31
|
+
let { stateOptions: N, isEditDirty: P, isAddressDirty: te, selectedId: F, view: I, table: L, details: R, detailsSheetView: z, permissions: B, isPermissionLoading: V, form: H, bank: U, address: W, del: G, handleRowClick: K, closeDetails: q, handleEditProfile: J } = v({
|
|
31
32
|
counterpartType: n,
|
|
32
|
-
detailsLabels:
|
|
33
|
-
messageLabels:
|
|
34
|
-
}), Y = y(() =>
|
|
35
|
-
...
|
|
33
|
+
detailsLabels: D,
|
|
34
|
+
messageLabels: j
|
|
35
|
+
}), Y = y(() => m(D, k), [k, D]), X = y(() => d(k), [k]), Z = y(() => p(E), [E]), Q = y(() => I === "edit" ? f(n, H.values, H.errors, {
|
|
36
|
+
...h,
|
|
36
37
|
...Y,
|
|
37
38
|
...Z.labels
|
|
38
39
|
}) : void 0, [
|
|
@@ -46,9 +47,9 @@ function S({ counterpartType: n, pageSizeOptions: s = c, onViewAllDocuments: S,
|
|
|
46
47
|
id: F,
|
|
47
48
|
name: z.name
|
|
48
49
|
} : void 0, [z, F]);
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */
|
|
50
|
+
return /* @__PURE__ */ S(b, { children: [
|
|
51
|
+
/* @__PURE__ */ x(e, {}),
|
|
52
|
+
/* @__PURE__ */ x(g, {
|
|
52
53
|
mode: n,
|
|
53
54
|
counterparts: L.rows,
|
|
54
55
|
isLoading: V || L.isLoading,
|
|
@@ -57,7 +58,7 @@ function S({ counterpartType: n, pageSizeOptions: s = c, onViewAllDocuments: S,
|
|
|
57
58
|
onSortingChange: L.onSortingChange,
|
|
58
59
|
pageSize: L.pageSize,
|
|
59
60
|
onPageSizeChange: L.onPageSizeChange,
|
|
60
|
-
pageSizeOptions:
|
|
61
|
+
pageSizeOptions: c,
|
|
61
62
|
hasNextPage: L.hasNextPage,
|
|
62
63
|
hasPrevPage: L.hasPrevPage,
|
|
63
64
|
onNextPage: L.onNextPage,
|
|
@@ -72,11 +73,11 @@ function S({ counterpartType: n, pageSizeOptions: s = c, onViewAllDocuments: S,
|
|
|
72
73
|
onCreateClick: B.canCreate ? H.openCreate : () => void 0,
|
|
73
74
|
onRowClick: K,
|
|
74
75
|
onRetry: L.onRetry,
|
|
75
|
-
labels:
|
|
76
|
+
labels: T,
|
|
76
77
|
emptyStateTestId: "counterparts-widget-empty-state",
|
|
77
78
|
accessRestrictedTestId: "counterparts-widget-access-restricted"
|
|
78
79
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ x(r, {
|
|
80
81
|
open: I === "create",
|
|
81
82
|
onOpenChange: (e) => {
|
|
82
83
|
e || H.close();
|
|
@@ -85,7 +86,8 @@ function S({ counterpartType: n, pageSizeOptions: s = c, onViewAllDocuments: S,
|
|
|
85
86
|
counterpartMode: n,
|
|
86
87
|
values: H.values,
|
|
87
88
|
errors: H.errors,
|
|
88
|
-
stateOptions:
|
|
89
|
+
stateOptions: N,
|
|
90
|
+
taxIdField: o(H.values.entityType, n, E),
|
|
89
91
|
inProgress: H.isSubmitting,
|
|
90
92
|
submitDisabled: H.isSubmitting,
|
|
91
93
|
onChange: (e) => H.setValues((t) => ({
|
|
@@ -108,12 +110,9 @@ function S({ counterpartType: n, pageSizeOptions: s = c, onViewAllDocuments: S,
|
|
|
108
110
|
})),
|
|
109
111
|
onSubmit: H.submit,
|
|
110
112
|
onCancel: H.close,
|
|
111
|
-
|
|
112
|
-
sectionsToExpand: H.sectionsToExpand,
|
|
113
|
-
onAddressExpand: H.expandAddress,
|
|
114
|
-
labels: T
|
|
113
|
+
labels: E
|
|
115
114
|
}),
|
|
116
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ x(_, {
|
|
117
116
|
open: F !== void 0 && (I === "none" || I === "edit"),
|
|
118
117
|
onOpenChange: (e) => {
|
|
119
118
|
e || q();
|
|
@@ -132,8 +131,8 @@ function S({ counterpartType: n, pageSizeOptions: s = c, onViewAllDocuments: S,
|
|
|
132
131
|
onEditAddress: W.openEdit,
|
|
133
132
|
onAddBankAccount: U.form.openCreate,
|
|
134
133
|
onEditBankAccount: U.form.openEdit,
|
|
135
|
-
onViewAllDocuments:
|
|
136
|
-
onCreateDocument:
|
|
134
|
+
onViewAllDocuments: C && $ ? () => C($) : void 0,
|
|
135
|
+
onCreateDocument: w && $ ? () => w($) : void 0,
|
|
137
136
|
onDeleteBankAccount: (e) => G.requestDelete({
|
|
138
137
|
kind: "bankAccount",
|
|
139
138
|
id: e,
|
|
@@ -142,12 +141,12 @@ function S({ counterpartType: n, pageSizeOptions: s = c, onViewAllDocuments: S,
|
|
|
142
141
|
editForm: Q && {
|
|
143
142
|
...Q,
|
|
144
143
|
...Z,
|
|
145
|
-
stateOptions:
|
|
144
|
+
stateOptions: N,
|
|
146
145
|
inProgress: H.isSubmitting,
|
|
147
|
-
submitDisabled: !
|
|
146
|
+
submitDisabled: !P,
|
|
148
147
|
onFieldChange: (e, t) => H.setValues((n) => ({
|
|
149
148
|
...n,
|
|
150
|
-
[
|
|
149
|
+
[u[e]]: t
|
|
151
150
|
})),
|
|
152
151
|
onRemindersChange: (e) => H.setValues((t) => ({
|
|
153
152
|
...t,
|
|
@@ -167,9 +166,9 @@ function S({ counterpartType: n, pageSizeOptions: s = c, onViewAllDocuments: S,
|
|
|
167
166
|
hasExistingAddress: !!R.primaryAddress,
|
|
168
167
|
values: W.values,
|
|
169
168
|
errors: W.errors,
|
|
170
|
-
stateOptions:
|
|
169
|
+
stateOptions: N,
|
|
171
170
|
inProgress: W.isPending,
|
|
172
|
-
submitDisabled: !
|
|
171
|
+
submitDisabled: !te,
|
|
173
172
|
formError: W.formError,
|
|
174
173
|
...X,
|
|
175
174
|
onChange: (e) => W.setValues((t) => ({
|
|
@@ -181,7 +180,7 @@ function S({ counterpartType: n, pageSizeOptions: s = c, onViewAllDocuments: S,
|
|
|
181
180
|
} : void 0,
|
|
182
181
|
labels: Y
|
|
183
182
|
}),
|
|
184
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ x(i, {
|
|
185
184
|
open: U.form.sheet.open,
|
|
186
185
|
onOpenChange: (e) => {
|
|
187
186
|
e || U.form.close();
|
|
@@ -197,9 +196,9 @@ function S({ counterpartType: n, pageSizeOptions: s = c, onViewAllDocuments: S,
|
|
|
197
196
|
})),
|
|
198
197
|
onSubmit: U.form.submit,
|
|
199
198
|
onCancel: U.form.close,
|
|
200
|
-
labels:
|
|
199
|
+
labels: O
|
|
201
200
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ x(a, {
|
|
203
202
|
open: G.target !== null,
|
|
204
203
|
onOpenChange: (e) => {
|
|
205
204
|
e || G.close();
|
|
@@ -209,28 +208,28 @@ function S({ counterpartType: n, pageSizeOptions: s = c, onViewAllDocuments: S,
|
|
|
209
208
|
isDeleting: G.isDeleting,
|
|
210
209
|
onConfirm: G.confirm,
|
|
211
210
|
onCancel: G.close,
|
|
212
|
-
labels:
|
|
211
|
+
labels: A
|
|
213
212
|
})
|
|
214
213
|
] });
|
|
215
214
|
}
|
|
216
|
-
function
|
|
217
|
-
return /* @__PURE__ */
|
|
218
|
-
widgetName: h === !0 && e === void 0 && t === void 0 ? void 0 :
|
|
215
|
+
function w({ baseUrl: e, widgetToken: t, organizationId: r, configClient: i, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: l, errorFallback: u, onError: d, analytics: f, disclosuresAcceptance: p, providerLabels: m, passThrough: h, ...g }) {
|
|
216
|
+
return /* @__PURE__ */ x(n, {
|
|
217
|
+
widgetName: h === !0 && e === void 0 && t === void 0 ? void 0 : c,
|
|
219
218
|
baseUrl: e,
|
|
220
219
|
widgetToken: t,
|
|
221
220
|
organizationId: r,
|
|
222
221
|
configClient: i,
|
|
223
222
|
gatewayRouting: a,
|
|
224
223
|
linkComponent: o,
|
|
225
|
-
implementation:
|
|
224
|
+
implementation: s,
|
|
226
225
|
uiFramework: l,
|
|
227
226
|
errorFallback: u,
|
|
228
227
|
onError: d,
|
|
229
228
|
analytics: f,
|
|
230
229
|
disclosuresAcceptance: p,
|
|
231
230
|
providerLabels: m,
|
|
232
|
-
children: /* @__PURE__ */
|
|
231
|
+
children: /* @__PURE__ */ x(C, { ...g }, g.counterpartType)
|
|
233
232
|
});
|
|
234
233
|
}
|
|
235
234
|
//#endregion
|
|
236
|
-
export {
|
|
235
|
+
export { w as CounterpartsWidget, w as default };
|
|
@@ -131,8 +131,10 @@ function h(e) {
|
|
|
131
131
|
businessNameLabel: e.businessNameLabel,
|
|
132
132
|
rowEmail: e.emailLabel,
|
|
133
133
|
rowPhone: e.phoneLabel,
|
|
134
|
-
rowTaxIdSsn: e.taxIdLabel,
|
|
135
|
-
rowTaxIdEin: e.taxIdLabel,
|
|
134
|
+
rowTaxIdSsn: e.taxIdSsnLabel ?? e.taxIdLabel,
|
|
135
|
+
rowTaxIdEin: e.taxIdEinLabel ?? e.taxIdLabel,
|
|
136
|
+
taxIdSsnPlaceholder: e.taxIdSsnPlaceholder,
|
|
137
|
+
taxIdEinPlaceholder: e.taxIdEinPlaceholder,
|
|
136
138
|
customerTaxIdHelp: e.customerTaxIdHelp,
|
|
137
139
|
vendorTaxIdHelp: e.vendorTaxIdHelp,
|
|
138
140
|
remindersCheckboxLabel: e.paymentRemindersLabel,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { COUNTERPART_DETAILS_SHEET_LABELS_EN as e } from "./index2.js";
|
|
2
2
|
import { CounterpartsScreen as t } from "./index3.js";
|
|
3
|
-
import { CounterpartDetailsSheet as n } from "./
|
|
3
|
+
import { CounterpartDetailsSheet as n } from "./index6.js";
|
|
4
4
|
export { e as COUNTERPART_DETAILS_SHEET_LABELS_EN, n as CounterpartDetailsSheet, t as CounterpartsScreen };
|
|
@@ -124,7 +124,7 @@ var e = {
|
|
|
124
124
|
businessNameLabel: "Business name",
|
|
125
125
|
remindersCheckboxLabel: "Payment reminders",
|
|
126
126
|
remindersCheckboxDescription: "Send automatic reminders for unpaid customer invoices.",
|
|
127
|
-
taxIdSsnPlaceholder: "e.g., 034-56-
|
|
127
|
+
taxIdSsnPlaceholder: "e.g., 034-56-7890",
|
|
128
128
|
taxIdEinPlaceholder: "e.g., 12-3456789",
|
|
129
129
|
editingAddressHeading: "Editing address",
|
|
130
130
|
addingAddressHeading: "Adding address",
|
|
@@ -1,135 +1,79 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Button as e, LABEL_LABELS_EN as t, RequiredFieldsLegend as n, Spinner as r, Typography as i, mergeRequiredFieldsLegendLabels as a } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { CounterpartAddressFields as o } from "../../../shared/counterpart-management/ui/dist/index7.js";
|
|
3
|
+
import "../../../shared/counterpart-management/ui/dist/index.js";
|
|
4
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
3
5
|
//#region ../../libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index4.js
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
function l(e, t) {
|
|
7
|
+
return {
|
|
8
|
+
line1: e.streetAddressLabel,
|
|
9
|
+
line2: e.addressLine2Label,
|
|
10
|
+
city: e.cityLabel,
|
|
11
|
+
state: e.stateLabel,
|
|
12
|
+
statePlaceholder: e.statePlaceholder,
|
|
13
|
+
postalCode: e.postalCodeLabel,
|
|
14
|
+
country: e.countryLabel,
|
|
15
|
+
countryValue: e.countryUnitedStates,
|
|
16
|
+
fieldMarkers: t
|
|
17
|
+
};
|
|
7
18
|
}
|
|
8
|
-
function
|
|
9
|
-
let
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
city: `${h}-city`,
|
|
13
|
-
state: `${h}-state`,
|
|
14
|
-
postalCode: `${h}-postal-code`,
|
|
15
|
-
country: `${h}-country`
|
|
19
|
+
function u({ form: u, labels: d }) {
|
|
20
|
+
let f = {
|
|
21
|
+
...t,
|
|
22
|
+
...u.fieldMarkers
|
|
16
23
|
};
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
disabled: y,
|
|
33
|
-
"aria-invalid": !!_?.line1 || void 0,
|
|
34
|
-
onChange: (e) => b({ line1: e.target.value })
|
|
35
|
-
}),
|
|
36
|
-
/* @__PURE__ */ d(n, { errors: m(_?.line1) })
|
|
37
|
-
] }) }), /* @__PURE__ */ d(e, { children: /* @__PURE__ */ f(t, { children: [/* @__PURE__ */ d(r, {
|
|
38
|
-
htmlFor: C.line2,
|
|
39
|
-
requirement: "optional",
|
|
40
|
-
labels: S,
|
|
41
|
-
children: x.addressLine2Label
|
|
42
|
-
}), /* @__PURE__ */ d(i, {
|
|
43
|
-
id: C.line2,
|
|
44
|
-
className: "ttw:bg-background",
|
|
45
|
-
value: g.line2,
|
|
46
|
-
disabled: y,
|
|
47
|
-
onChange: (e) => b({ line2: e.target.value })
|
|
48
|
-
})] }) })]
|
|
49
|
-
}),
|
|
50
|
-
/* @__PURE__ */ f("div", {
|
|
51
|
-
className: "ttw:flex ttw:gap-4",
|
|
52
|
-
children: [/* @__PURE__ */ d(e, { children: /* @__PURE__ */ f(t, { children: [
|
|
53
|
-
/* @__PURE__ */ d(r, {
|
|
54
|
-
htmlFor: C.city,
|
|
55
|
-
requirement: "required",
|
|
56
|
-
labels: S,
|
|
57
|
-
children: x.cityLabel
|
|
58
|
-
}),
|
|
59
|
-
/* @__PURE__ */ d(i, {
|
|
60
|
-
id: C.city,
|
|
61
|
-
"aria-required": !0,
|
|
62
|
-
className: "ttw:bg-background",
|
|
63
|
-
value: g.city,
|
|
64
|
-
disabled: y,
|
|
65
|
-
"aria-invalid": !!_?.city || void 0,
|
|
66
|
-
onChange: (e) => b({ city: e.target.value })
|
|
67
|
-
}),
|
|
68
|
-
/* @__PURE__ */ d(n, { errors: m(_?.city) })
|
|
69
|
-
] }) }), /* @__PURE__ */ d(e, { children: /* @__PURE__ */ f(t, { children: [
|
|
70
|
-
/* @__PURE__ */ d(r, {
|
|
71
|
-
htmlFor: C.state,
|
|
72
|
-
requirement: "required",
|
|
73
|
-
labels: S,
|
|
74
|
-
children: x.stateLabel
|
|
75
|
-
}),
|
|
76
|
-
/* @__PURE__ */ f(a, {
|
|
77
|
-
value: g.state || void 0,
|
|
78
|
-
disabled: y,
|
|
79
|
-
onValueChange: (e) => b({ state: e }),
|
|
80
|
-
children: [/* @__PURE__ */ d(c, {
|
|
81
|
-
id: C.state,
|
|
82
|
-
"aria-required": !0,
|
|
83
|
-
className: "ttw:w-full ttw:bg-background",
|
|
84
|
-
"aria-invalid": !!_?.state || void 0,
|
|
85
|
-
children: /* @__PURE__ */ d(l, { placeholder: x.statePlaceholder })
|
|
86
|
-
}), /* @__PURE__ */ d(o, { children: v.map((e) => /* @__PURE__ */ d(s, {
|
|
87
|
-
value: e.value,
|
|
88
|
-
children: e.label
|
|
89
|
-
}, e.value)) })]
|
|
90
|
-
}),
|
|
91
|
-
/* @__PURE__ */ d(n, { errors: m(_?.state) })
|
|
92
|
-
] }) })]
|
|
93
|
-
}),
|
|
94
|
-
/* @__PURE__ */ f("div", {
|
|
95
|
-
className: "ttw:flex ttw:gap-4",
|
|
96
|
-
children: [/* @__PURE__ */ d(e, { children: /* @__PURE__ */ f(t, { children: [
|
|
97
|
-
/* @__PURE__ */ d(r, {
|
|
98
|
-
htmlFor: C.postalCode,
|
|
99
|
-
requirement: "required",
|
|
100
|
-
labels: S,
|
|
101
|
-
children: x.postalCodeLabel
|
|
24
|
+
return /* @__PURE__ */ c("form", {
|
|
25
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:rounded-[10px] ttw:border ttw:border-border ttw:bg-muted ttw:p-4",
|
|
26
|
+
onSubmit: (e) => {
|
|
27
|
+
e.preventDefault(), u.onSubmit();
|
|
28
|
+
},
|
|
29
|
+
children: [/* @__PURE__ */ c("div", {
|
|
30
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ s("div", {
|
|
33
|
+
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3 ttw:border-b ttw:border-border ttw:pt-6 ttw:pb-7",
|
|
34
|
+
children: /* @__PURE__ */ s(i, {
|
|
35
|
+
variant: "body1",
|
|
36
|
+
className: "ttw:font-medium",
|
|
37
|
+
children: u.hasExistingAddress ? d.editingAddressHeading : d.addingAddressHeading
|
|
38
|
+
})
|
|
102
39
|
}),
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
|
|
105
|
-
"
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
"aria-invalid": !!_?.postalCode || void 0,
|
|
110
|
-
onChange: (e) => b({ postalCode: e.target.value })
|
|
40
|
+
/* @__PURE__ */ s(n, { labels: a(f, u.requiredFieldsLegend) }),
|
|
41
|
+
u.formError && /* @__PURE__ */ s(i, {
|
|
42
|
+
variant: "body2",
|
|
43
|
+
color: "destructive",
|
|
44
|
+
role: "alert",
|
|
45
|
+
children: u.formError
|
|
111
46
|
}),
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
47
|
+
/* @__PURE__ */ s(o, {
|
|
48
|
+
idPrefix: "counterpart-address-form",
|
|
49
|
+
values: u.values,
|
|
50
|
+
errors: u.errors,
|
|
51
|
+
stateOptions: u.stateOptions,
|
|
52
|
+
disabled: u.inProgress,
|
|
53
|
+
onChange: u.onChange,
|
|
54
|
+
labels: l(d, {
|
|
55
|
+
...f,
|
|
56
|
+
...u.addressFieldMarkers
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
}), /* @__PURE__ */ c("div", {
|
|
61
|
+
className: "ttw:flex ttw:justify-end ttw:gap-4 ttw:pt-6",
|
|
62
|
+
children: [/* @__PURE__ */ s(e, {
|
|
63
|
+
type: "button",
|
|
64
|
+
variant: "outline",
|
|
65
|
+
className: "ttw:w-fit ttw:border-border",
|
|
66
|
+
disabled: u.inProgress,
|
|
67
|
+
onClick: u.onCancel,
|
|
68
|
+
children: d.cancelButton
|
|
69
|
+
}), /* @__PURE__ */ c(e, {
|
|
70
|
+
type: "submit",
|
|
71
|
+
className: "ttw:w-fit",
|
|
72
|
+
disabled: u.inProgress || u.submitDisabled,
|
|
73
|
+
children: [u.inProgress && /* @__PURE__ */ s(r, {}), d.saveButton]
|
|
74
|
+
})]
|
|
75
|
+
})]
|
|
76
|
+
});
|
|
133
77
|
}
|
|
134
78
|
//#endregion
|
|
135
|
-
export {
|
|
79
|
+
export { u as CounterpartAddressForm, l as addressFieldLabels };
|