@tesouro/embedded-components-react 0.11.170 → 0.11.175

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 (43) hide show
  1. package/dist/index.d.ts +6 -0
  2. package/dist/lib/ReceivablesWidget.d.ts +6 -0
  3. package/dist/lib/WidgetSuite.d.ts +6 -0
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index26.js +75 -66
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +62 -53
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +44 -38
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +331 -326
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index46.js +10 -8
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index47.js +190 -187
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +12 -19
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +25 -23
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +4 -7
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +23 -24
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js +5 -5
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index16.js +196 -187
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +6 -1
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index8.js +20 -17
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index18.js +11 -14
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js +157 -161
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index6.js +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +4 -8
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +5 -27
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +32 -2
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +2 -29
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/index.js +7 -6
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/resolveBillDueDate.js +22 -0
  28. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/details.js +116 -98
  29. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +99 -92
  30. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +7 -1
  31. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurringSeries.js +15 -24
  32. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js +59 -69
  33. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  34. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +7 -5
  35. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/DateDisclosure/DateDisclosure.js +28 -0
  36. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/DueDateText/DueDateText.js +19 -0
  37. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/index.js +28 -27
  38. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/dueDateDisplay.js +23 -0
  39. package/package.json +1 -1
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +0 -2
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +0 -6
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +0 -33
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +0 -2
@@ -1,28 +1,6 @@
1
- import { Popover as e, PopoverContent as t, PopoverTrigger as n } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { useState as r } from "react";
3
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
4
1
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js
5
- function o({ children: o, date: s }) {
6
- let [c, l] = r(!1);
7
- return /* @__PURE__ */ a(e, {
8
- open: c,
9
- onOpenChange: l,
10
- children: [/* @__PURE__ */ i(n, {
11
- type: "button",
12
- className: "ttw:cursor-default",
13
- onPointerEnter: (e) => {
14
- e.pointerType === "mouse" && l(!0);
15
- },
16
- onPointerLeave: (e) => {
17
- e.pointerType === "mouse" && l(!1);
18
- },
19
- onClick: (e) => e.stopPropagation(),
20
- children: o
21
- }), /* @__PURE__ */ i(t, {
22
- onOpenAutoFocus: (e) => e.preventDefault(),
23
- className: "ttw:w-auto ttw:px-3 ttw:py-1.5 ttw:text-xs",
24
- children: s
25
- })]
26
- });
27
- }
28
- export { o as DateDisclosure };
2
+ var e = {
3
+ revealValue: "Show value",
4
+ hideValue: "Hide value"
5
+ };
6
+ export { e as REVEALABLE_FIELD_LABELS_EN };
@@ -1,3 +1,33 @@
1
+ import { Button as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { REVEALABLE_FIELD_LABELS_EN as t } from "./index20.js";
3
+ import { useState as n } from "react";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ import { Eye as a, EyeOff as o } from "lucide-react";
1
6
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js
2
- var e = { overdue: "Overdue" };
3
- export { e as DUE_DATE_VALUE_LABELS_EN };
7
+ function s({ field: s, labels: c }) {
8
+ let l = {
9
+ ...t,
10
+ ...c
11
+ }, [u, d] = n(!1), f = s.maskedValue && !u ? s.maskedValue : s.value;
12
+ return /* @__PURE__ */ i("div", {
13
+ className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-3",
14
+ children: [/* @__PURE__ */ i("div", {
15
+ className: "ttw:min-w-0",
16
+ children: [/* @__PURE__ */ r("dt", {
17
+ className: "ttw:text-xs ttw:text-muted-foreground",
18
+ children: s.label
19
+ }), /* @__PURE__ */ r("dd", {
20
+ className: "ttw:break-words ttw:text-sm ttw:font-medium",
21
+ children: f
22
+ })]
23
+ }), s.maskedValue ? /* @__PURE__ */ r(e, {
24
+ type: "button",
25
+ variant: "ghost",
26
+ size: "icon",
27
+ "aria-label": u ? l.hideValue : l.revealValue,
28
+ onClick: () => d((e) => !e),
29
+ children: r(u ? o : a, { className: "ttw:size-4" })
30
+ }) : null]
31
+ });
32
+ }
33
+ export { s as RevealableField, s as default };
@@ -1,29 +1,2 @@
1
- import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { DUE_DATE_VALUE_LABELS_EN as t } from "./index21.js";
3
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
- import { AlertTriangleIcon as i } from "lucide-react";
5
- // ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js
6
- function a({ value: a, tone: o = "default", labels: s, className: c }) {
7
- let l = {
8
- ...t,
9
- ...s
10
- };
11
- return o === "danger" ? /* @__PURE__ */ r("span", {
12
- className: e("ttw:inline-flex ttw:items-center ttw:gap-1 ttw:whitespace-nowrap ttw:font-medium ttw:text-destructive", c),
13
- children: [
14
- /* @__PURE__ */ n(i, {
15
- "aria-hidden": !0,
16
- className: "ttw:size-3.5 ttw:shrink-0"
17
- }),
18
- a,
19
- /* @__PURE__ */ n("span", {
20
- className: "ttw:sr-only",
21
- children: l.overdue
22
- })
23
- ]
24
- }) : /* @__PURE__ */ n("span", {
25
- className: c,
26
- children: a
27
- });
28
- }
29
- export { a as DueDateValue, a as default };
1
+ import "./index20.js";
2
+ import "./index21.js";
@@ -10,9 +10,10 @@ import { maskAccountNumber as S } from "./lib/maskAccountNumber.js";
10
10
  import { payableRemoval as C } from "./lib/payableRemoval.js";
11
11
  import "./lib/payableTotals.js";
12
12
  import { resolveAmountDueMinorUnits as w } from "./lib/resolveAmountDue.js";
13
- import { resolveLineItemAmountMinorUnits as T } from "./lib/resolveLineItemAmount.js";
14
- import { resolveLineItemQuantity as E } from "./lib/resolveLineItemQuantity.js";
15
- import { resolveVendor as D, resolveVendorName as O } from "./lib/resolveVendor.js";
16
- import { BILL_PAY_WIDGET_NAME as k } from "./lib/widgetName.js";
17
- import { buildGroupCollapse as A } from "./lib/groupCollapse.js";
18
- export { e as AWAITING_APPROVAL_LABEL_EN, t as AWAITING_APPROVAL_UNKNOWN_LABEL_EN, n as BILL_DETAIL_ACTIONS_LABELS_EN, k as BILL_PAY_WIDGET_NAME, u as DuplicateVerdict, r as PAYMENT_HISTORY_LABELS_EN, i as SCHEDULED_RELATIVE_DAY_LABELS_EN, a as SCHEDULED_STATUS_BADGE_LABEL_EN, o as SCHEDULED_SUMMARY_LABEL_EN, A as buildGroupCollapse, g as compareByArrival, p as countSuspectedPayableDuplicateGroups, _ as duplicateVerdictMatches, d as formatBillMoney, f as formatScheduledDateLabel, v as groupSuspectedDuplicates, m as hasSuspectedPayableDuplicate, b as isEditablePayableStatus, x as isLiveScheduledPaymentRecord, S as maskAccountNumber, s as mergeBillDetailActionsLabels, c as mergeDecisionDialogCopy, l as mergePaymentHistoryMethodLabels, C as payableRemoval, w as resolveAmountDueMinorUnits, y as resolveDuplicateOriginalId, T as resolveLineItemAmountMinorUnits, E as resolveLineItemQuantity, D as resolveVendor, O as resolveVendorName, h as suspectedPayableDuplicates };
13
+ import { BILL_DUE_DATE_LABELS_EN as T, resolveBillDueDate as E } from "./lib/resolveBillDueDate.js";
14
+ import { resolveLineItemAmountMinorUnits as D } from "./lib/resolveLineItemAmount.js";
15
+ import { resolveLineItemQuantity as O } from "./lib/resolveLineItemQuantity.js";
16
+ import { resolveVendor as k, resolveVendorName as A } from "./lib/resolveVendor.js";
17
+ import { BILL_PAY_WIDGET_NAME as j } from "./lib/widgetName.js";
18
+ import { buildGroupCollapse as M } from "./lib/groupCollapse.js";
19
+ export { e as AWAITING_APPROVAL_LABEL_EN, t as AWAITING_APPROVAL_UNKNOWN_LABEL_EN, n as BILL_DETAIL_ACTIONS_LABELS_EN, T as BILL_DUE_DATE_LABELS_EN, j as BILL_PAY_WIDGET_NAME, u as DuplicateVerdict, r as PAYMENT_HISTORY_LABELS_EN, i as SCHEDULED_RELATIVE_DAY_LABELS_EN, a as SCHEDULED_STATUS_BADGE_LABEL_EN, o as SCHEDULED_SUMMARY_LABEL_EN, M as buildGroupCollapse, g as compareByArrival, p as countSuspectedPayableDuplicateGroups, _ as duplicateVerdictMatches, d as formatBillMoney, f as formatScheduledDateLabel, v as groupSuspectedDuplicates, m as hasSuspectedPayableDuplicate, b as isEditablePayableStatus, x as isLiveScheduledPaymentRecord, S as maskAccountNumber, s as mergeBillDetailActionsLabels, c as mergeDecisionDialogCopy, l as mergePaymentHistoryMethodLabels, C as payableRemoval, w as resolveAmountDueMinorUnits, E as resolveBillDueDate, y as resolveDuplicateOriginalId, D as resolveLineItemAmountMinorUnits, O as resolveLineItemQuantity, k as resolveVendor, A as resolveVendorName, h as suspectedPayableDuplicates };
@@ -0,0 +1,22 @@
1
+ import { resolveDueDateDisplay as e } from "../../../../shared/util/dist/lib/dueDateDisplay.js";
2
+ import { formatCalendarDate as t } from "../../../../shared/util/dist/lib/formatCalendarDate.js";
3
+ import "../../../../shared/util/dist/index.js";
4
+ // ../../libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/resolveBillDueDate.js
5
+ var n = {
6
+ today: "Today",
7
+ tomorrow: "Tomorrow",
8
+ dayOverdue: "{days} day overdue",
9
+ daysOverdue: "{days} days overdue",
10
+ overdueAccessibleName: "{overdue}, due {date}"
11
+ };
12
+ function r({ status: n, dueDate: r, today: i, isScheduled: a = !1, labels: o, emptyLabel: s = "" }) {
13
+ let c = e({
14
+ dueDate: r,
15
+ dateLabel: t(r) || s,
16
+ today: i,
17
+ isUnpaid: n !== "paid" && n !== "canceled",
18
+ labels: o
19
+ });
20
+ return a && c.overdueLabel ? { label: c.label } : c;
21
+ }
22
+ export { n as BILL_DUE_DATE_LABELS_EN, r as resolveBillDueDate };
@@ -82,25 +82,43 @@ function h({ paymentReminder: e, overdueReminder: t, remindersConfigured: n, mes
82
82
  ].filter((e) => typeof e == "number"), a = (t?.terms ?? []).map((e) => e.days_after).filter((e) => typeof e == "number"), o = [];
83
83
  return i.length > 0 && o.push(`${m(i, r)} ${r.detailsRemindersBefore}`), a.length > 0 && o.push(`${m(a, r)} ${r.detailsRemindersAfter}`), o.length > 0 ? o.join("\n") : n ? "-" : r.detailsRemindersNone;
84
84
  }
85
- function g(e, t) {
86
- return {
85
+ function g(e, t, n) {
86
+ return ((e.interval > 1 ? n : t)[e.frequency] ?? "").replace("{interval}", String(e.interval));
87
+ }
88
+ function _(e, t) {
89
+ return g(e, {
87
90
  day: t.detailsFrequencyDay,
88
91
  week: t.detailsFrequencyWeek,
89
92
  month: t.detailsFrequencyMonth,
90
93
  quarter: t.detailsFrequencyQuarter,
91
94
  year: t.detailsFrequencyYear
92
- }[e] ?? "";
95
+ }, {
96
+ day: t.listSeriesEveryDays,
97
+ week: t.listSeriesEveryWeeks,
98
+ month: t.listSeriesEveryMonths,
99
+ quarter: t.listSeriesEveryQuarters,
100
+ year: t.listSeriesEveryYears
101
+ });
93
102
  }
94
- function _(e, t) {
95
- return {
103
+ function v(e, t) {
104
+ return g(e, {
96
105
  day: t.detailsPeriodDay,
97
106
  week: t.detailsPeriodWeek,
98
107
  month: t.detailsPeriodMonth,
99
108
  quarter: t.detailsPeriodQuarter,
100
109
  year: t.detailsPeriodYear
101
- }[e] ?? "";
110
+ }, {
111
+ day: t.detailsPeriodEveryDays,
112
+ week: t.detailsPeriodEveryWeeks,
113
+ month: t.detailsPeriodEveryMonths,
114
+ quarter: t.detailsPeriodEveryQuarters,
115
+ year: t.detailsPeriodEveryYears
116
+ });
102
117
  }
103
- function v(e, t) {
118
+ function ee(e, t) {
119
+ return e.interval > 1 ? t.detailsScheduleTitleEvery.replace("{period}", v(e, t)) : t.detailsScheduleTitle.replace("{frequency}", _(e, t));
120
+ }
121
+ function y(e, t) {
104
122
  return {
105
123
  active: t.detailsSeriesStatusActive,
106
124
  paused: t.detailsSeriesStatusPaused,
@@ -108,17 +126,17 @@ function v(e, t) {
108
126
  completed: t.detailsSeriesStatusCompleted
109
127
  }[e] ?? "";
110
128
  }
111
- var ee = {
129
+ var b = {
112
130
  active: "info",
113
131
  paused: "warning",
114
132
  canceled: "danger",
115
133
  completed: "success"
116
- }, te = {
134
+ }, x = {
117
135
  active: "forward",
118
136
  paused: "pause",
119
137
  canceled: "ban",
120
138
  completed: "check"
121
- }, y = {
139
+ }, S = {
122
140
  pending: "neutral",
123
141
  skipped: "warning",
124
142
  canceled: "danger",
@@ -126,7 +144,7 @@ var ee = {
126
144
  send_failed: "danger",
127
145
  completed: "success"
128
146
  };
129
- function b(e, t) {
147
+ function C(e, t) {
130
148
  return {
131
149
  pending: t.detailsIterationStatusPending,
132
150
  skipped: t.detailsIterationStatusSkipped,
@@ -136,13 +154,13 @@ function b(e, t) {
136
154
  completed: t.detailsIterationStatusCompleted
137
155
  }[e] ?? "";
138
156
  }
139
- function x(e, t, n) {
140
- return n.detailsSeriesTitle.replace("{name}", e.counterpart_name ?? n.invoiceType).replace("{frequency}", g(t.frequency, n));
157
+ function w(e, t, n) {
158
+ return n.detailsSeriesTitle.replace("{name}", e.counterpart_name ?? n.invoiceType).replace("{frequency}", _(t, n));
141
159
  }
142
- function S(e, t) {
160
+ function T(e, t) {
143
161
  return t[e] ?? t.unknown;
144
162
  }
145
- function ne({ invoice: e, recurrence: t, iterationInvoices: n, date: r, statusLabels: i, messages: a, onOpenReceivable: s }) {
163
+ function E({ invoice: e, recurrence: t, iterationInvoices: n, date: r, statusLabels: i, messages: a, onOpenReceivable: s }) {
146
164
  return (t.iterations ?? []).map((t, c) => {
147
165
  let l = t.issued_invoice_id, u = l ? n.get(l) : void 0, d = u ?? e;
148
166
  return {
@@ -155,12 +173,12 @@ function ne({ invoice: e, recurrence: t, iterationInvoices: n, date: r, statusLa
155
173
  }),
156
174
  chip: u ? {
157
175
  kind: "invoice",
158
- label: S(u.status, i),
176
+ label: T(u.status, i),
159
177
  status: u.status
160
178
  } : {
161
179
  kind: "iteration",
162
- label: b(t.status, a),
163
- tone: y[t.status] ?? "neutral"
180
+ label: C(t.status, a),
181
+ tone: S[t.status] ?? "neutral"
164
182
  },
165
183
  numberLabel: l ? u?.document_id ?? "" : a.detailsPending,
166
184
  onOpen: u ? () => s(u.id) : void 0,
@@ -168,7 +186,7 @@ function ne({ invoice: e, recurrence: t, iterationInvoices: n, date: r, statusLa
168
186
  };
169
187
  });
170
188
  }
171
- function C(e) {
189
+ function te(e) {
172
190
  if (!e?.line1) return;
173
191
  let t = [e.city, [e.state, e.postal_code].filter(Boolean).join(" ")].filter(Boolean).join(", ");
174
192
  return [
@@ -177,7 +195,7 @@ function C(e) {
177
195
  e.country ? l(e.country) : void 0
178
196
  ].filter(Boolean).join(", ");
179
197
  }
180
- function re(e, t, n) {
198
+ function ne(e, t, n) {
181
199
  let r = {
182
200
  label: n.detailsAmountReceived,
183
201
  value: t(e.amount_paid)
@@ -239,7 +257,7 @@ function re(e, t, n) {
239
257
  };
240
258
  }
241
259
  }
242
- function ie(t, i, a) {
260
+ function re(t, i, a) {
243
261
  let o = t.line_items.reduce((t, n) => {
244
262
  let r = n.total_before_tax ?? 0;
245
263
  return e(n.tax_status) ? {
@@ -284,132 +302,132 @@ function ie(t, i, a) {
284
302
  emphasis: !0
285
303
  }), m;
286
304
  }
287
- var ae = {
305
+ var ie = {
288
306
  primary: [],
289
307
  overflow: []
290
308
  };
291
- function w({ receivable: e, pdfUrl: n, paymentReminder: r, overdueReminder: l, depositAccount: u, isAccountListIncomplete: m, recurrence: y, paymentRecords: b = [], isLoadingPaymentRecords: S = !1, iterationInvoices: w = /* @__PURE__ */ new Map(), auditHistory: T, statusLabels: E, messages: D, canRecordPayment: O, hasBeenSent: oe = !1, canWrite: k = !0, onOpenReceivable: A, onOpenCustomer: j, now: M }) {
309
+ function D({ receivable: e, pdfUrl: n, paymentReminder: r, overdueReminder: l, depositAccount: u, isAccountListIncomplete: m, recurrence: g, paymentRecords: S = [], isLoadingPaymentRecords: C = !1, iterationInvoices: T = /* @__PURE__ */ new Map(), auditHistory: D, statusLabels: O, messages: k, canRecordPayment: ae, hasBeenSent: oe = !1, canWrite: A = !0, onOpenReceivable: j, onOpenCustomer: M, now: se }) {
292
310
  if (!e || e.type !== "invoice") return;
293
311
  let N = e, P = (e) => o({
294
312
  amount: e ?? 0,
295
313
  currency: N.currency,
296
314
  fallback: ""
297
- }), F = (e) => a(e, "-"), I = (e) => e ? F(e) : D.detailsPending, { status: L } = N, R = L === "canceled", z = L === "recurring" ? y : void 0, B = N.recurrence_id && L !== "recurring" ? y : void 0, V = L === "overdue" ? s(N.due_date, M) : 0, { amountTone: se, amountRows: H } = re(N, P, D), U = N.counterpart_contact, W = C(N.counterpart_billing_address), G = N.counterpart_id, ce = N.counterpart_name ? {
298
- label: D.detailsCustomerName,
315
+ }), F = (e) => a(e, "-"), I = (e) => e ? F(e) : k.detailsPending, { status: L } = N, R = L === "canceled", z = L === "recurring" ? g : void 0, B = N.recurrence_id && L !== "recurring" ? g : void 0, V = L === "overdue" ? s(N.due_date, se) : 0, { amountTone: H, amountRows: U } = ne(N, P, k), W = N.counterpart_contact, G = te(N.counterpart_billing_address), K = N.counterpart_id, ce = N.counterpart_name ? {
316
+ label: k.detailsCustomerName,
299
317
  name: N.counterpart_name,
300
- onOpen: j && G ? () => j(G) : void 0
318
+ onOpen: M && K ? () => M(K) : void 0
301
319
  } : void 0, le = [
302
- ...U?.email ? [{
303
- label: D.detailsCustomerEmail,
304
- value: U.email
320
+ ...W?.email ? [{
321
+ label: k.detailsCustomerEmail,
322
+ value: W.email
305
323
  }] : [],
306
- ...U?.phone ? [{
307
- label: D.detailsCustomerPhone,
308
- value: U.phone
324
+ ...W?.phone ? [{
325
+ label: k.detailsCustomerPhone,
326
+ value: W.phone
309
327
  }] : [],
310
- ...W ? [{
311
- label: D.detailsCustomerAddress,
312
- value: W
328
+ ...G ? [{
329
+ label: k.detailsCustomerAddress,
330
+ value: G
313
331
  }] : []
314
- ], K = {
315
- label: D.detailsPaymentReminders,
332
+ ], q = {
333
+ label: k.detailsPaymentReminders,
316
334
  value: h({
317
335
  paymentReminder: r,
318
336
  overdueReminder: l,
319
337
  remindersConfigured: !!(N.payment_reminder_id || N.overdue_reminder_id),
320
- messages: D
338
+ messages: k
321
339
  })
322
- }, q = {
323
- label: D.detailsDepositAccount,
324
- value: u ? c(u, D) : m && N.bank_account_id ? "-" : D.detailsNotProvided
325
340
  }, J = {
326
- label: D.detailsPaymentTerms,
327
- value: N.payment_terms?.name ?? D.detailsPending
328
- }, Y = z ? [
341
+ label: k.detailsDepositAccount,
342
+ value: u ? c(u, k) : m && N.bank_account_id ? "-" : k.detailsNotProvided
343
+ }, Y = {
344
+ label: k.detailsPaymentTerms,
345
+ value: N.payment_terms?.name ?? k.detailsPending
346
+ }, ue = z ? [
329
347
  {
330
- label: D.detailsFrequency,
331
- value: g(z.frequency, D)
348
+ label: k.detailsFrequency,
349
+ value: _(z, k)
332
350
  },
333
351
  {
334
- label: D.detailsInvoiceAmount,
352
+ label: k.detailsInvoiceAmount,
335
353
  value: P(N.total_amount)
336
354
  },
337
- J,
338
- K,
355
+ Y,
356
+ q,
339
357
  {
340
- label: D.detailsPoNumber,
341
- value: N.purchase_order || D.detailsNotProvided
358
+ label: k.detailsPoNumber,
359
+ value: N.purchase_order || k.detailsNotProvided
342
360
  },
343
- q
361
+ J
344
362
  ] : [
345
363
  ...N.document_id ? [{
346
- label: D.detailsInvoiceNumber,
364
+ label: k.detailsInvoiceNumber,
347
365
  value: N.document_id
348
366
  }] : [],
349
367
  {
350
- label: D.detailsInvoiceAmount,
368
+ label: k.detailsInvoiceAmount,
351
369
  value: P(N.total_amount)
352
370
  },
353
371
  {
354
- label: D.detailsInvoiceDate,
372
+ label: k.detailsInvoiceDate,
355
373
  value: I(N.issue_date)
356
374
  },
357
375
  {
358
- label: D.detailsDueDate,
376
+ label: k.detailsDueDate,
359
377
  value: I(N.due_date)
360
378
  },
361
- J,
362
- K,
379
+ Y,
380
+ q,
363
381
  ...N.purchase_order ? [{
364
- label: D.detailsPoNumber,
382
+ label: k.detailsPoNumber,
365
383
  value: N.purchase_order
366
384
  }] : [],
367
- q
368
- ], X = z ? void 0 : i(N), { primary: Z, overflow: Q } = k ? d[L] ?? {
385
+ J
386
+ ], X = z ? void 0 : i(N), { primary: Z, overflow: Q } = A ? d[L] ?? {
369
387
  primary: [],
370
388
  overflow: ["clone"]
371
- } : ae;
372
- if (z && k) {
389
+ } : ie;
390
+ if (z && A) {
373
391
  let e = z.status === "active" || z.status === "paused";
374
392
  Q = z.status === "active" ? ["pauseRecurrence", "cancelRecurrence"] : z.status === "paused" ? ["resumeRecurrence", "cancelRecurrence"] : [], Z = e ? ["edit"] : [];
375
393
  }
376
- O || (Z = Z.filter((e) => e !== "recordPayment"));
377
- let ue = f.has(L) ? {
378
- rows: b.map((e) => ({
394
+ ae || (Z = Z.filter((e) => e !== "recordPayment"));
395
+ let de = f.has(L) ? {
396
+ rows: S.map((e) => ({
379
397
  id: e.id,
380
398
  dateLabel: F(e.paid_at),
381
399
  amountLabel: P(e.amount)
382
400
  })),
383
401
  totalLabel: P(N.amount_paid),
384
402
  emptyTone: L === "overdue" ? "danger" : "default",
385
- isLoading: S
386
- } : void 0, de = z ? {
387
- statusLabel: v(z.status, D),
388
- statusTone: ee[z.status] ?? "neutral",
389
- statusIcon: te[z.status],
403
+ isLoading: C
404
+ } : void 0, fe = z ? {
405
+ statusLabel: y(z.status, k),
406
+ statusTone: b[z.status] ?? "neutral",
407
+ statusIcon: x[z.status],
390
408
  amountLabel: P(N.total_amount),
391
- amountPeriodLabel: _(z.frequency, D),
409
+ amountPeriodLabel: v(z, k),
392
410
  startsOnLabel: I(z.start_date),
393
411
  endsOnLabel: F(z.end_date ?? (z.max_occurrences ? z.iterations?.at(-1)?.issue_at : void 0)),
394
- scheduleTitle: D.detailsScheduleTitle.replace("{frequency}", g(z.frequency, D)),
395
- schedule: ne({
412
+ scheduleTitle: ee(z, k),
413
+ schedule: E({
396
414
  invoice: N,
397
415
  recurrence: z,
398
- iterationInvoices: w,
416
+ iterationInvoices: T,
399
417
  date: F,
400
- statusLabels: E,
401
- messages: D,
402
- onOpenReceivable: A
418
+ statusLabels: O,
419
+ messages: k,
420
+ onOpenReceivable: j
403
421
  })
404
- } : void 0, $ = B ? x(N, B, D) : void 0, fe = B && $ ? {
422
+ } : void 0, $ = B ? w(N, B, k) : void 0, pe = B && $ ? {
405
423
  title: $,
406
- backLabel: D.detailsSeriesBack.replace("{title}", $),
407
- onOpen: () => A(B.invoice_id)
424
+ backLabel: k.detailsSeriesBack.replace("{title}", $),
425
+ onOpen: () => j(B.invoice_id)
408
426
  } : void 0;
409
427
  return {
410
428
  id: N.id,
411
429
  type: N.type,
412
- title: z ? x(N, z, D) : N.counterpart_name ?? D.invoiceType,
430
+ title: N.counterpart_name ?? k.invoiceType,
413
431
  status: L,
414
432
  statusTone: p[L] ?? "neutral",
415
433
  pdfUrl: n,
@@ -421,38 +439,38 @@ function w({ receivable: e, pdfUrl: n, paymentReminder: r, overdueReminder: l, d
421
439
  totalLabel: P(e.total_before_tax ?? (e.product.price?.value ?? 0) * e.quantity)
422
440
  })),
423
441
  panel: {
424
- subtitle: z ? D.detailsSeriesSubtitle : N.document_id ? D.detailsInvoiceSubtitle.replace("{number}", N.document_id) : void 0,
425
- statusLabel: L === "partially_paid" ? E.issued : E[L] ?? E.unknown,
442
+ subtitle: z ? k.detailsSeriesSubtitle.replace("{frequency}", _(z, k)) : N.document_id ? k.detailsInvoiceSubtitle.replace("{number}", N.document_id) : void 0,
443
+ statusLabel: L === "partially_paid" ? O.issued : O[L] ?? O.unknown,
426
444
  recurring: !!N.recurrence_id || L === "recurring",
427
- overdueLabel: V > 0 ? D.detailsDaysOverdue.replace("{days}", String(V)) : void 0,
428
- amountTone: se,
429
- amountRows: H,
445
+ overdueLabel: V > 0 ? k.detailsDaysOverdue.replace("{days}", String(V)) : void 0,
446
+ amountTone: H,
447
+ amountRows: U,
430
448
  issueDateLabel: I(N.issue_date),
431
449
  dueDateLabel: R ? F(N.updated_at) : I(N.due_date),
432
- dueDateCaption: R ? D.detailsCancelledOnCaption : D.detailsDueDate,
433
- paymentHistory: ue,
450
+ dueDateCaption: R ? k.detailsCancelledOnCaption : k.detailsDueDate,
451
+ paymentHistory: de,
434
452
  customerName: ce,
435
453
  customerContact: le,
436
- recurringSeries: de,
437
- seriesLink: fe,
438
- billingItems: Y,
454
+ recurringSeries: fe,
455
+ seriesLink: pe,
456
+ billingItems: ue,
439
457
  lineItemsSection: z ? void 0 : {
440
458
  countLabel: String(N.line_items.length),
441
- totals: ie(N, P, D)
459
+ totals: re(N, P, k)
442
460
  },
443
461
  notes: X && {
444
462
  ...X,
445
463
  countLabel: String([X.opening, X.closing].filter(Boolean).length)
446
464
  },
447
- attachments: t(N, D),
448
- auditHistory: T,
465
+ attachments: t(N, k),
466
+ auditHistory: D,
449
467
  primaryActions: Z,
450
468
  overflowActions: Q,
451
- actionLabels: { send: oe ? D.detailsResendButton : D.detailsSendButton }
469
+ actionLabels: { send: oe ? k.detailsResendButton : k.detailsSendButton }
452
470
  }
453
471
  };
454
472
  }
455
- function T(e, t, n) {
473
+ function O(e, t, n) {
456
474
  if (!e) return {
457
475
  title: n.detailsNotFoundTitle,
458
476
  description: n.detailsNotFoundDescription.replace("{invoiceId}", t)
@@ -462,4 +480,4 @@ function T(e, t, n) {
462
480
  description: n.detailsUnsupportedDescription.replace("{type}", e.type)
463
481
  };
464
482
  }
465
- export { T as buildDetailsMessageView, w as buildReceivableDetailsView, h as formatReminderSchedule, g as frequencyLabel, v as seriesStatusLabel };
483
+ export { O as buildDetailsMessageView, D as buildReceivableDetailsView, h as formatReminderSchedule, _ as frequencyLabel, y as seriesStatusLabel };