@tesouro/embedded-components-react 0.7.16 → 0.7.18

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.
Files changed (46) hide show
  1. package/README.md +14 -14
  2. package/dist/index.css +9 -12
  3. package/dist/index.d.ts +70 -19
  4. package/dist/lib/CounterpartsWidget.d.ts +49 -6
  5. package/dist/lib/CounterpartsWidgetPublic.d.ts +49 -6
  6. package/dist/lib/CustomersWidget.d.ts +49 -6
  7. package/dist/lib/LinkedAccountsWidget.d.ts +20 -12
  8. package/dist/lib/WidgetSuite.d.ts +20 -12
  9. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index3.js +2 -1
  10. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartDetailsContainer.js +18 -13
  11. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartsWidget.js +146 -137
  12. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartDetailsSheetView.js +56 -55
  13. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsWidget.js +108 -77
  14. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js +181 -25
  15. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index.js +1 -1
  16. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +50 -7
  17. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index4.js +127 -596
  18. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index5.js +66 -0
  19. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index6.js +210 -0
  20. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index7.js +520 -0
  21. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +2 -1
  22. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useInvoicesFilter.js +10 -7
  23. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActionsModal.js +1 -1
  24. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesTable.js +1 -0
  25. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +141 -125
  26. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/forms.js +2 -1
  27. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/labels.js +11 -1
  28. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/summary.js +22 -0
  29. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/useLinkedAccountsWidget.js +182 -162
  30. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/mocks/linkedAccounts.js +1 -0
  31. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index10.js +36 -86
  32. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index11.js +1 -1
  33. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index12.js +17 -23
  34. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index14.js +6 -6
  35. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index15.js +14 -17
  36. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index16.js +3 -6
  37. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index5.js +168 -35
  38. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index6.js +70 -83
  39. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index7.js +11 -112
  40. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index8.js +6 -12
  41. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index9.js +82 -7
  42. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +11 -11
  43. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js +7 -7
  44. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +1 -8
  45. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  46. package/package.json +1 -1
@@ -6,88 +6,119 @@ import { getStateOptions as e } from "../../../../../shared/util/dist/lib/usStat
6
6
  import { useWidgetConfig as t, useWidgetError as n, useWidgetLoading as r } from "../../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
7
7
  import "../../../../../shared/feature/dist/index.js";
8
8
  import { COUNTERPART_MESSAGE_LABELS_EN as i } from "../../../../../shared/counterpart-management/feature/dist/lib/labels.js";
9
- import { hasSelectedText as a } from "../../../../../shared/counterpart-management/feature/dist/lib/helpers.js";
10
- import { useAddressForm as o } from "../../../../../shared/counterpart-management/feature/dist/lib/useAddressForm.js";
11
- import { useCounterpartForm as s } from "../../../../../shared/counterpart-management/feature/dist/lib/useCounterpartForm.js";
12
- import { useDeleteController as c } from "../../../../../shared/counterpart-management/feature/dist/lib/useDeleteController.js";
13
- import { useBankAccountForm as l } from "../../../../../shared/counterpart-management/feature/dist/lib/subEntityForms.js";
9
+ import { addressResponseToFormValues as a, counterpartToFormValues as o, hasSelectedText as s } from "../../../../../shared/counterpart-management/feature/dist/lib/helpers.js";
10
+ import { useAddressForm as c } from "../../../../../shared/counterpart-management/feature/dist/lib/useAddressForm.js";
11
+ import { useCounterpartForm as l } from "../../../../../shared/counterpart-management/feature/dist/lib/useCounterpartForm.js";
12
+ import { useDeleteController as u } from "../../../../../shared/counterpart-management/feature/dist/lib/useDeleteController.js";
13
+ import { useBankAccountForm as d } from "../../../../../shared/counterpart-management/feature/dist/lib/subEntityForms.js";
14
14
  import "../../../../../shared/counterpart-management/feature/dist/index.js";
15
- import { getCounterpartPermissions as u } from "./permissions.js";
16
- import { useCounterpartsTable as d } from "./useCounterpartsTable.js";
17
- import { useCounterpartDetailsSheetView as f } from "./useCounterpartDetailsSheetView.js";
18
- import { COUNTERPART_DETAILS_SHEET_LABELS_EN as p } from "../../../../ui/dist/index2.js";
15
+ import { getCounterpartPermissions as f } from "./permissions.js";
16
+ import { useCounterpartsTable as p } from "./useCounterpartsTable.js";
17
+ import { useCounterpartDetailsSheetView as m } from "./useCounterpartDetailsSheetView.js";
18
+ import { COUNTERPART_DETAILS_SHEET_LABELS_EN as h } from "../../../../ui/dist/index2.js";
19
19
  import "../../../../ui/dist/index.js";
20
- import { useCallback as m, useEffect as h, useMemo as g, useState as _ } from "react";
20
+ import { useCallback as g, useEffect as _, useMemo as v, useState as y } from "react";
21
21
  //#region ../../libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsWidget.js
22
- function v({ counterpartType: v, detailsLabels: y, messageLabels: b }) {
23
- let { initResponse: x, widgetToken: S } = t(), C = r(), w = n(), T = g(() => ({
22
+ var b = {
23
+ line1: "",
24
+ line2: "",
25
+ city: "",
26
+ state: "",
27
+ postalCode: ""
28
+ };
29
+ function x(e, t) {
30
+ return e.line1 === t.line1 && e.line2 === t.line2 && e.city === t.city && e.state === t.state && e.postalCode === t.postalCode;
31
+ }
32
+ function S({ counterpartType: S, detailsLabels: C, messageLabels: w }) {
33
+ let { initResponse: T, widgetToken: E } = t(), D = r(), O = n(), k = v(() => ({
24
34
  ...i,
25
- ...b
26
- }), [b]), E = g(() => ({
27
- ...p,
28
- ...y
29
- }), [y]), D = v === "customer", O = g(() => e(), []), k = g(() => u(x?.scopes), [x?.scopes]), A = !(!S || x || w) || C && !x, [j, M] = _(), [N, P] = _("none"), F = k.canRead ? j : void 0;
30
- h(() => {
31
- k.canRead || (M(void 0), P("none"));
32
- }, [k.canRead]);
33
- let I = d({
34
- isCustomer: D,
35
- enabled: k.canRead,
36
- messages: T
37
- }), { details: L, detailsSheetView: R } = f({
38
- selectedId: F,
39
- isCustomer: D,
40
- enabled: k.canRead,
41
- detailsText: E
42
- }), z = s({
43
- view: N,
44
- setView: P,
45
- selectedId: F,
46
- setSelectedId: M,
47
- messages: T,
48
- counterpartType: v,
49
- counterpart: L.counterpart,
50
- primaryAddress: L.primaryAddress,
51
- bankAccounts: L.bankAccounts,
52
- isBankAccountsLoading: L.isBankAccountsLoading,
53
- isBankAccountsError: L.isBankAccountsError
54
- }), B = l({
55
- items: L.bankAccounts,
56
- selectedId: F,
57
- messages: T
58
- }), V = o({
59
- selectedId: F,
60
- primaryAddress: L.primaryAddress,
61
- messages: T
62
- });
35
+ ...w
36
+ }), [w]), A = v(() => ({
37
+ ...h,
38
+ ...C
39
+ }), [C]), j = S === "customer", M = v(() => e(), []), N = v(() => f(T?.scopes), [T?.scopes]), P = !(!E || T || O) || D && !T, [F, I] = y(), [L, R] = y("none"), z = N.canRead ? F : void 0;
40
+ _(() => {
41
+ N.canRead || (I(void 0), R("none"));
42
+ }, [N.canRead]);
43
+ let B = p({
44
+ isCustomer: j,
45
+ enabled: N.canRead,
46
+ messages: k
47
+ }), { details: V, detailsSheetView: H } = m({
48
+ selectedId: z,
49
+ isCustomer: j,
50
+ enabled: N.canRead,
51
+ detailsText: A
52
+ }), U = l({
53
+ view: L,
54
+ setView: R,
55
+ selectedId: z,
56
+ setSelectedId: I,
57
+ messages: k,
58
+ counterpartType: S,
59
+ counterpart: V.counterpart,
60
+ primaryAddress: j && L === "edit" ? void 0 : V.primaryAddress,
61
+ includeBankAccount: L === "create"
62
+ }), W = d({
63
+ items: V.bankAccounts,
64
+ selectedId: z,
65
+ messages: k
66
+ }), G = c({
67
+ selectedId: z,
68
+ primaryAddress: V.primaryAddress,
69
+ messages: k
70
+ }), K = u({
71
+ selectedId: z,
72
+ setSelectedId: I,
73
+ detailsView: V.detailsView,
74
+ messages: k
75
+ }), q = v(() => {
76
+ if (!V.counterpart) return !1;
77
+ let e = o(V.counterpart, V.primaryAddress), t = U.values;
78
+ return t.legalName !== e.legalName || t.firstName !== e.firstName || t.lastName !== e.lastName || t.email !== e.email || t.phone !== e.phone || t.taxId !== e.taxId || t.remindersEnabled !== e.remindersEnabled || !j && !x(t.address, e.address);
79
+ }, [
80
+ V.counterpart,
81
+ V.primaryAddress,
82
+ U.values,
83
+ j
84
+ ]), J = v(() => !x(G.values, V.primaryAddress ? a(V.primaryAddress) : b), [G.values, V.primaryAddress]), { close: Y } = G, { openEdit: X, setValues: Z } = U;
63
85
  return {
64
- stateOptions: O,
65
- selectedId: F,
66
- view: N,
67
- table: I,
68
- details: L,
69
- detailsSheetView: R,
70
- permissions: k,
71
- isPermissionLoading: A,
72
- form: z,
73
- bank: B,
74
- address: V,
75
- del: c({
76
- selectedId: F,
77
- setSelectedId: M,
78
- detailsView: L.detailsView,
79
- messages: T
80
- }),
81
- handleRowClick: m((e) => {
82
- k.canRead && !a() && (V.close(), M(e.id), P("none"));
83
- }, [k.canRead, V.close]),
84
- closeDetails: m(() => {
85
- V.close(), M(void 0);
86
- }, [V.close]),
87
- handleEditProfile: m(() => {
88
- V.close(), z.openEdit();
89
- }, [V.close, z.openEdit])
86
+ stateOptions: M,
87
+ isEditDirty: q,
88
+ isAddressDirty: J,
89
+ selectedId: z,
90
+ view: L,
91
+ table: B,
92
+ details: V,
93
+ detailsSheetView: H,
94
+ permissions: N,
95
+ isPermissionLoading: P,
96
+ form: U,
97
+ bank: W,
98
+ address: G,
99
+ del: K,
100
+ handleRowClick: g((e) => {
101
+ N.canRead && !s() && (Y(), I(e.id), R("none"));
102
+ }, [N.canRead, Y]),
103
+ closeDetails: g(() => {
104
+ Y(), I(void 0);
105
+ }, [Y]),
106
+ handleEditProfile: g(() => {
107
+ if (!j) {
108
+ Y(), X();
109
+ return;
110
+ }
111
+ X(), Z((e) => ({
112
+ ...e,
113
+ address: b
114
+ }));
115
+ }, [
116
+ Y,
117
+ X,
118
+ Z,
119
+ j
120
+ ])
90
121
  };
91
122
  }
92
123
  //#endregion
93
- export { v as useCounterpartsWidget };
124
+ export { S as useCounterpartsWidget };
@@ -1,54 +1,210 @@
1
- import { formatCounterpartDate as e, formatMoney as t } from "../../../../../shared/counterpart-management/feature/dist/lib/helpers.js";
1
+ import { formatMoney as e } from "../../../../../shared/counterpart-management/feature/dist/lib/helpers.js";
2
2
  import "../../../../../shared/counterpart-management/feature/dist/index.js";
3
3
  //#region ../../libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js
4
- function n(e) {
4
+ function t(e) {
5
5
  if (!e) return "";
6
6
  let t = [...e], n = t.flatMap((e, t) => /\d/.test(e) ? [t] : []);
7
7
  if (n.length <= 4) return "••••";
8
8
  let r = /* @__PURE__ */ new Set([...n.slice(0, 2), ...n.slice(-2)]);
9
9
  return t.map((e, t) => /\d/.test(e) && !r.has(t) ? "•" : e).join("");
10
10
  }
11
- var r = /* @__PURE__ */ new Set([
11
+ var n = /* @__PURE__ */ new Set([
12
12
  "new",
13
13
  "approve_in_progress",
14
14
  "waiting_to_be_paid",
15
15
  "partially_paid"
16
16
  ]);
17
- function i(e, t) {
18
- if (!t || !e || !r.has(e)) return !1;
19
- let n = /* @__PURE__ */ new Date();
20
- n.setUTCHours(0, 0, 0, 0);
17
+ function r(e, t) {
18
+ if (!t || !e || !n.has(e)) return !1;
19
+ let r = /* @__PURE__ */ new Date();
20
+ r.setUTCHours(0, 0, 0, 0);
21
21
  let i = new Date(t);
22
- return i.setUTCHours(0, 0, 0, 0), i.getTime() < n.getTime();
22
+ return i.setUTCHours(0, 0, 0, 0), i.getTime() < r.getTime();
23
23
  }
24
- function a(e) {
25
- return e ? e.split("_").filter(Boolean).map((e) => `${e.charAt(0).toUpperCase()}${e.slice(1)}`).join(" ") : "";
24
+ var i = {
25
+ draft: ["billStatusDraft", "billNeutral"],
26
+ new: ["billStatusReadyToSubmit", "billAccent"],
27
+ approve_in_progress: ["billStatusPendingApproval", "billInfo"],
28
+ waiting_to_be_paid: ["billStatusReadyToPay", "billSuccess"],
29
+ partially_paid: ["billStatusReadyToPay", "billSuccess"],
30
+ paid: ["billStatusPaid", "billSettled"],
31
+ canceled: ["billStatusCanceled", "billNeutral"],
32
+ rejected: ["billStatusRejected", "billDanger"]
33
+ }, a = {
34
+ draft: ["receivableStatusDraft", "invoiceNeutral"],
35
+ recurring: ["receivableStatusRecurring", "invoiceNeutral"],
36
+ issuing: ["receivableStatusIssuing", "invoiceCyan"],
37
+ issued: ["receivableStatusIssued", "invoiceCyan"],
38
+ accepted: ["receivableStatusAccepted", "invoiceSuccess"],
39
+ paid: ["receivableStatusPaid", "invoiceSuccess"],
40
+ partially_paid: ["receivableStatusPartiallyPaid", "invoicePurple"],
41
+ overdue: ["receivableStatusOverdue", "invoiceOrange"],
42
+ failed: ["receivableStatusFailed", "invoiceDanger"],
43
+ expired: ["receivableStatusExpired", "invoiceDanger"],
44
+ uncollectible: ["receivableStatusUncollectible", "invoiceDanger"],
45
+ canceled: ["receivableStatusCanceled", "invoiceDanger"],
46
+ declined: ["receivableStatusDeclined", "invoiceDanger"],
47
+ deleted: ["receivableStatusDeleted", "invoiceDanger"]
48
+ };
49
+ function o(e, t, n) {
50
+ let [r, o] = (t === "bill" ? i : a)[e ?? ""] ?? ["receivableStatusUnknown", t === "bill" ? "billNeutral" : "invoiceNeutral"];
51
+ return {
52
+ statusLabel: n[r],
53
+ statusTone: o
54
+ };
26
55
  }
27
- function o(e) {
28
- return e === "paid" ? "secondary" : "outline";
56
+ var s = new Intl.DateTimeFormat(void 0, {
57
+ day: "2-digit",
58
+ month: "short",
59
+ year: "numeric"
60
+ });
61
+ function c(e) {
62
+ if (!e) return "";
63
+ let t = new Date(e);
64
+ return Number.isNaN(t.getTime()) ? "" : s.format(t);
29
65
  }
30
- function s(n) {
31
- return (n ?? []).map((n) => ({
32
- id: n.id,
33
- amountLabel: t(n.total_amount ?? 0, n.currency ?? void 0),
34
- dateLabel: e(n.issued_at ?? n.issue_date ?? n.created_at ?? void 0),
35
- statusLabel: a(n.status ?? void 0),
36
- statusTone: o(n.status ?? void 0),
37
- isOverdue: i(n.status ?? void 0, n.due_date)
38
- }));
66
+ function l(t, n, i) {
67
+ return (t ?? []).map((t) => {
68
+ let a = t.status ?? void 0, s = n === "bill" && r(a, t.due_date), l = o(a, n, i);
69
+ return {
70
+ id: t.id,
71
+ amountLabel: e(t.total_amount ?? 0, t.currency ?? void 0),
72
+ dateLabel: c(t.issued_at ?? t.issue_date ?? t.created_at),
73
+ ...l,
74
+ isOverdue: s
75
+ };
76
+ });
39
77
  }
40
- function c(e) {
78
+ function u(e) {
41
79
  return e ? `•••• ${e.slice(-4)}` : "";
42
80
  }
43
- function l(e, t) {
81
+ function d(e, t) {
44
82
  if (e) return {
45
83
  id: e.id,
46
84
  title: t,
47
85
  accountHolderLabel: e.account_holder_name ?? "",
48
- accountNumberLabel: c(e.account_number),
86
+ accountNumberLabel: u(e.account_number),
49
87
  routingNumberLabel: e.routing_number ?? "",
50
88
  isIncomplete: !(e.account_holder_name && e.account_number && e.routing_number)
51
89
  };
52
90
  }
91
+ function f(e, t) {
92
+ if (!t) return e;
93
+ let n = t.address;
94
+ return {
95
+ ...m({
96
+ editingAddressHeading: t.title,
97
+ addingAddressHeading: t.title,
98
+ cancelButton: t.cancelButton,
99
+ saveButton: t.saveButton,
100
+ streetAddressLabel: n?.line1,
101
+ addressLine2Label: n?.line2,
102
+ cityLabel: n?.city,
103
+ stateLabel: n?.state,
104
+ statePlaceholder: n?.statePlaceholder,
105
+ postalCodeLabel: n?.postalCode,
106
+ countryLabel: n?.country,
107
+ countryUnitedStates: n?.countryValue
108
+ }),
109
+ ...e
110
+ };
111
+ }
112
+ function p(e) {
113
+ return e ? {
114
+ fieldMarkers: e.fieldMarkers,
115
+ addressFieldMarkers: e.address?.fieldMarkers,
116
+ requiredFieldsLegend: e.requiredFieldsLegend
117
+ } : {};
118
+ }
119
+ function m(e) {
120
+ return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
121
+ }
122
+ function h(e) {
123
+ if (!e) return {};
124
+ let t = e.address;
125
+ return {
126
+ labels: m({
127
+ editingCustomerDetailsHeading: e.editTitleCustomer,
128
+ editingVendorDetailsHeading: e.editTitleVendor,
129
+ firstNameLabel: e.firstNameLabel,
130
+ lastNameLabel: e.lastNameLabel,
131
+ businessNameLabel: e.businessNameLabel,
132
+ rowEmail: e.emailLabel,
133
+ rowPhone: e.phoneLabel,
134
+ rowTaxIdSsn: e.taxIdLabel,
135
+ rowTaxIdEin: e.taxIdLabel,
136
+ customerTaxIdHelp: e.customerTaxIdHelp,
137
+ vendorTaxIdHelp: e.vendorTaxIdHelp,
138
+ remindersCheckboxLabel: e.paymentRemindersLabel,
139
+ remindersCheckboxDescription: e.paymentRemindersDescription,
140
+ streetAddressLabel: t?.line1,
141
+ addressLine2Label: t?.line2,
142
+ cityLabel: t?.city,
143
+ stateLabel: t?.state,
144
+ statePlaceholder: t?.statePlaceholder,
145
+ postalCodeLabel: t?.postalCode,
146
+ countryLabel: t?.country,
147
+ countryUnitedStates: t?.countryValue,
148
+ cancelButton: e.cancelButton,
149
+ saveButton: e.saveButton
150
+ }),
151
+ fieldMarkers: e.fieldMarkers,
152
+ addressFieldMarkers: t?.fieldMarkers,
153
+ requiredFieldsLegend: e.requiredFieldsLegend
154
+ };
155
+ }
156
+ var g = {
157
+ firstName: "firstName",
158
+ lastName: "lastName",
159
+ businessName: "legalName",
160
+ email: "email",
161
+ phone: "phone",
162
+ taxId: "taxId"
163
+ };
164
+ function _(e, t, n, r) {
165
+ let i = e === "vendor", a = t.entityType === "individual";
166
+ return {
167
+ heading: i ? r.editingVendorDetailsHeading : r.editingCustomerDetailsHeading,
168
+ formError: n.form,
169
+ name: a ? {
170
+ kind: "person",
171
+ firstName: {
172
+ value: t.firstName,
173
+ error: n.firstName
174
+ },
175
+ lastName: {
176
+ value: t.lastName,
177
+ error: n.lastName
178
+ }
179
+ } : {
180
+ kind: "business",
181
+ businessName: {
182
+ value: t.legalName,
183
+ error: n.legalName
184
+ }
185
+ },
186
+ email: {
187
+ value: t.email,
188
+ error: n.email
189
+ },
190
+ phone: {
191
+ value: t.phone,
192
+ error: n.phone
193
+ },
194
+ taxId: {
195
+ value: t.taxId,
196
+ error: n.taxId,
197
+ label: a ? r.rowTaxIdSsn : r.rowTaxIdEin,
198
+ placeholder: a ? r.taxIdSsnPlaceholder : r.taxIdEinPlaceholder,
199
+ description: i ? r.vendorTaxIdHelp : r.customerTaxIdHelp
200
+ },
201
+ contactLayout: i ? "inline" : "stacked",
202
+ reminders: i ? void 0 : { checked: t.remindersEnabled },
203
+ address: i ? {
204
+ values: t.address,
205
+ errors: n.address
206
+ } : void 0
207
+ };
208
+ }
53
209
  //#endregion
54
- export { l as buildPaymentMethodView, s as buildRecentDocumentRows, n as maskTaxId };
210
+ export { g as EDIT_FORM_FIELD_KEYS, p as addressFormLabelOverrides, _ as buildCounterpartEditFormView, d as buildPaymentMethodView, l as buildRecentDocumentRows, h as editFormLabelOverrides, c as formatDetailsDate, t as maskTaxId, f as withAddressLabelOverrides };
@@ -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 "./index4.js";
3
+ import { CounterpartDetailsSheet as n } from "./index7.js";
4
4
  export { e as COUNTERPART_DETAILS_SHEET_LABELS_EN, n as CounterpartDetailsSheet, t as CounterpartsScreen };
@@ -35,8 +35,10 @@ var e = {
35
35
  }, t = {
36
36
  hiddenDescription: "Counterpart details",
37
37
  loadingTitle: "Loading...",
38
- errorTitle: "Counterpart not found",
39
- errorDescription: "We could not load this counterpart. Please try again.",
38
+ notFoundCustomerTitle: "Customer not found",
39
+ notFoundVendorTitle: "Vendor not found",
40
+ notFoundCustomerDescription: "Something went wrong while fetching this customer",
41
+ notFoundVendorDescription: "Something went wrong while fetching this vendor",
40
42
  openActionsMenu: "Open actions menu",
41
43
  closeAction: "Close",
42
44
  deleteCustomerAction: "Delete customer",
@@ -65,8 +67,6 @@ var e = {
65
67
  paymentMethodTitle: "ACH bank transfer",
66
68
  customerDetailsHeading: "Customer details",
67
69
  vendorDetailsHeading: "Vendor details",
68
- customerDetailsDescription: "Who are you billing?",
69
- vendorDetailsDescription: "Who are you paying?",
70
70
  rowType: "Type",
71
71
  rowName: "Name",
72
72
  rowEmail: "Email",
@@ -79,8 +79,7 @@ var e = {
79
79
  customerTaxIdHelp: "Required only if you'll issue a 1099 IRS form at year-end.",
80
80
  vendorTaxIdHelp: "Required only if you'll file a 1099 IRS form for this vendor at year-end.",
81
81
  addressHeading: "Address",
82
- customerAddressHeading: "Address (optional)",
83
- customerAddressDescription: "Where invoices are sent.",
82
+ customerAddressHeading: "Address",
84
83
  addAddressAction: "Add address",
85
84
  editAddressAction: "Edit address",
86
85
  noAddress: "No address on file.",
@@ -94,7 +93,51 @@ var e = {
94
93
  accountNumberLabel: "Account number",
95
94
  routingNumberLabel: "Routing number",
96
95
  noPaymentMethods: "No payment methods yet.",
97
- editButton: "Edit"
96
+ editButton: "Edit",
97
+ billStatusDraft: "Draft",
98
+ billStatusReadyToSubmit: "Ready to submit",
99
+ billStatusPendingApproval: "Pending review",
100
+ billStatusReadyToPay: "Ready to pay",
101
+ billStatusPaid: "Paid",
102
+ billStatusCanceled: "Cancelled",
103
+ billStatusRejected: "Rejected",
104
+ receivableStatusDraft: "Draft",
105
+ receivableStatusIssuing: "Issuing",
106
+ receivableStatusIssued: "Issued",
107
+ receivableStatusFailed: "Failed",
108
+ receivableStatusAccepted: "Accepted",
109
+ receivableStatusExpired: "Expired",
110
+ receivableStatusDeclined: "Declined",
111
+ receivableStatusRecurring: "Recurring",
112
+ receivableStatusPartiallyPaid: "Partially paid",
113
+ receivableStatusPaid: "Paid",
114
+ receivableStatusOverdue: "Overdue",
115
+ receivableStatusUncollectible: "Uncollectible",
116
+ receivableStatusCanceled: "Canceled",
117
+ receivableStatusDeleted: "Deleted",
118
+ receivableStatusUnknown: "Unknown",
119
+ optionalSuffix: "(optional)",
120
+ editingCustomerDetailsHeading: "Editing customer details",
121
+ editingVendorDetailsHeading: "Editing vendor details",
122
+ firstNameLabel: "First name",
123
+ lastNameLabel: "Last name",
124
+ businessNameLabel: "Business name",
125
+ remindersCheckboxLabel: "Payment reminders",
126
+ remindersCheckboxDescription: "Send automatic reminders for unpaid customer invoices.",
127
+ taxIdSsnPlaceholder: "e.g., 034-56-78890",
128
+ taxIdEinPlaceholder: "e.g., 12-3456789",
129
+ editingAddressHeading: "Editing address",
130
+ addingAddressHeading: "Adding address",
131
+ streetAddressLabel: "Address line 1",
132
+ addressLine2Label: "Address line 2",
133
+ cityLabel: "City",
134
+ stateLabel: "State",
135
+ statePlaceholder: "Select a state",
136
+ postalCodeLabel: "Postal code",
137
+ countryLabel: "Country",
138
+ countryUnitedStates: "United States",
139
+ cancelButton: "Cancel",
140
+ saveButton: "Save"
98
141
  };
99
142
  //#endregion
100
143
  export { e as COUNTERPARTS_SCREEN_LABELS_EN, t as COUNTERPART_DETAILS_SHEET_LABELS_EN };