@tesouro/embedded-components-react 0.4.28 → 0.4.30

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 (93) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/lib/BillPayWidget.js +1 -1
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +2 -2
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js +15 -82
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js +87 -25
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index18.js +36 -0
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +12 -12
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +5 -70
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +64 -37
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +38 -110
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +104 -73
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +87 -7
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +7 -21
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +17 -22
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +23 -63
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +66 -2
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +2 -77
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +78 -3
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +4 -5
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +5 -4
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +3 -32
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +30 -39
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +37 -166
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +164 -39
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +48 -1
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +1 -50
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +45 -11
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +13 -8
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +8 -14
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +7 -59
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +64 -8
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +8 -24
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +18 -136
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +139 -16
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +24 -4
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +4 -41
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +39 -88
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +79 -85
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +96 -3
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +3 -49
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +47 -119
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +135 -33
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +33 -186
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +186 -75
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +75 -21
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +22 -232
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +223 -210
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +14 -25
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +202 -103
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +121 -13
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +12 -47
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +47 -31
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +27 -198
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +198 -30
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +30 -234
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +240 -19
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +19 -425
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +433 -4
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +25 -24
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +4 -38
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +35 -218
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +224 -3
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +3 -4
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +2 -44
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +46 -1
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +1 -8
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +6 -10
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +10 -110
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +112 -3
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +21 -57
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +3 -127
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +124 -8
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +8 -7
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +8 -46
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +43 -18
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +20 -28
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +27 -82
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +83 -47
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +47 -250
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +239 -101
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +58 -5
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +107 -202
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +209 -3
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +4 -8
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +6 -113
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +115 -1
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +0 -24
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +25 -0
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +5 -4
  90. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +1784 -1769
  91. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  92. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  93. package/package.json +1 -1
@@ -1,38 +1,140 @@
1
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js
3
- var n = {
4
- previewUnavailable: "Preview not available for this file type.",
5
- openFile: "Open file"
6
- };
7
- function r(r, i = {}) {
8
- if (r.mimetype === "application/pdf") return /* @__PURE__ */ e("iframe", {
9
- src: `${r.url}#toolbar=0&navpanes=0`,
10
- title: r.name,
11
- referrerPolicy: "no-referrer",
12
- className: "ttw:h-full ttw:w-full ttw:border-0"
13
- });
14
- if (r.mimetype.startsWith("image/")) return /* @__PURE__ */ e("img", {
15
- src: r.url,
16
- alt: r.name,
17
- className: "ttw:max-h-full ttw:max-w-full ttw:object-contain"
18
- });
19
- let a = {
2
+ var e = {
3
+ payBill: "Pay bill",
4
+ markAsPaid: "Mark as paid",
5
+ reject: "Reject",
6
+ approve: "Approve",
7
+ cancel: "Cancel bill",
8
+ cancelScheduledPayment: "Cancel scheduled payment",
9
+ reopen: "Reopen bill",
10
+ forceApprove: "Approve",
11
+ forceReject: "Reject",
12
+ policyOverridesHeading: "Policy overrides",
13
+ decisionDialog: {
14
+ reject: {
15
+ title: "Reject this bill?",
16
+ description: "The bill goes back as rejected and nobody else is asked to approve it.",
17
+ confirmButton: "Reject bill",
18
+ reason: {
19
+ label: "Reason",
20
+ placeholder: "Tell the submitter what needs to change",
21
+ optionalHint: "Optional"
22
+ }
23
+ },
24
+ cancel: {
25
+ title: "Cancel this bill?",
26
+ description: "Cancelling is permanent. The bill can't be reopened, edited, or paid afterwards.",
27
+ confirmButton: "Cancel bill"
28
+ },
29
+ cancelScheduledPayment: {
30
+ title: "Cancel this scheduled payment?",
31
+ description: "The payment will not be sent. The bill stays ready to pay, so you can schedule it again for another date.",
32
+ confirmButton: "Cancel payment"
33
+ },
34
+ forceApprove: {
35
+ title: "Override approval policy?",
36
+ description: "The below people haven't approved this bill yet. Approving now will bypass their required review. This will be recorded in the audit history and can't be undone.",
37
+ confirmButton: "Override and approve",
38
+ noApprovalPolicy: {
39
+ title: "Approve this bill?",
40
+ description: "This bill has no approval policy applied. Approving now will be recorded in the audit history and can't be undone.",
41
+ confirmButton: "Approve bill"
42
+ }
43
+ },
44
+ forceReject: {
45
+ title: "Override approval policy?",
46
+ description: "The below people haven't approved this bill yet. Rejecting now will bypass their required review. This will be recorded in the audit history and can't be undone.",
47
+ confirmButton: "Override and reject",
48
+ noApprovalPolicy: {
49
+ title: "Reject this bill?",
50
+ description: "This bill has no approval policy applied. Rejecting now will be recorded in the audit history and can't be undone.",
51
+ confirmButton: "Reject bill"
52
+ }
53
+ },
54
+ cancelButton: "Cancel"
55
+ },
56
+ actionError: "Couldn't update this bill. Try again.",
57
+ actionSuccess: {
58
+ approve: "Bill approved.",
59
+ reject: "Bill rejected.",
60
+ markAsPaid: "Bill marked as paid.",
61
+ cancel: "Bill canceled.",
62
+ cancelScheduledPayment: "Scheduled payment canceled.",
63
+ reopen: "Bill reopened.",
64
+ forceApprove: "Bill approved, overriding the approval policy.",
65
+ forceReject: "Bill rejected, overriding the approval policy.",
66
+ forceApproveNoApprovalPolicy: "Bill approved.",
67
+ forceRejectNoApprovalPolicy: "Bill rejected."
68
+ }
69
+ }, t = (e) => `Payment scheduled for ${e}`, n = [
70
+ "reject",
71
+ "cancel",
72
+ "cancelScheduledPayment",
73
+ "forceApprove",
74
+ "forceReject"
75
+ ];
76
+ function r(e, t) {
77
+ let n = e.reason ? {
78
+ ...e.reason,
79
+ ...t?.reason
80
+ } : void 0, r = e.noApprovalPolicy ? {
81
+ ...e.noApprovalPolicy,
82
+ ...t?.noApprovalPolicy
83
+ } : void 0, i = {
84
+ ...e,
85
+ ...t,
86
+ reason: n,
87
+ noApprovalPolicy: r
88
+ };
89
+ return n || delete i.reason, r || delete i.noApprovalPolicy, i;
90
+ }
91
+ function i(e, t) {
92
+ let i = {
93
+ ...e,
94
+ ...t
95
+ };
96
+ for (let a of n) i[a] = r(e[a], t?.[a]);
97
+ return i;
98
+ }
99
+ function a(t) {
100
+ let n = e;
101
+ return {
20
102
  ...n,
21
- ...i
103
+ ...t,
104
+ decisionDialog: i(n.decisionDialog, t?.decisionDialog),
105
+ actionSuccess: {
106
+ ...n.actionSuccess,
107
+ ...t?.actionSuccess
108
+ }
109
+ };
110
+ }
111
+ var o = {
112
+ paymentHistorySentLabel: "Payment sent",
113
+ paymentHistoryScheduledLabel: "Payment scheduled",
114
+ paymentHistoryCanceledLabel: "Payment canceled",
115
+ paymentHistoryOtherLabel: "Payment",
116
+ paymentHistoryMethodSuffix: (e, t) => `${e} via ${t}`,
117
+ paymentHistoryOverpaidLabel: (e) => `+${e} overpaid`,
118
+ paymentHistoryMarkedPaidExternalLabel: "Marked as paid manually",
119
+ paymentHistoryMarkedPaidLabel: "Marked as paid",
120
+ paymentHistoryPartiallyPaidExternalLabel: "Partial payment marked manually",
121
+ paymentHistoryPartiallyPaidLabel: "Partial payment",
122
+ paymentHistoryRevertedLabel: "Payment reverted",
123
+ paymentHistoryMethodLabels: {
124
+ ach: "ACH",
125
+ us_ach: "ACH",
126
+ wire: "Wire",
127
+ check: "Check",
128
+ paper_check: "Check",
129
+ bank_account: "Bank transfer",
130
+ card: "Card"
131
+ }
132
+ };
133
+ function s(e) {
134
+ return {
135
+ ...o.paymentHistoryMethodLabels,
136
+ ...e
22
137
  };
23
- return /* @__PURE__ */ t("div", {
24
- className: "ttw:flex ttw:h-full ttw:w-full ttw:flex-col ttw:items-center ttw:justify-center ttw:gap-2 ttw:p-4 ttw:text-center",
25
- children: [/* @__PURE__ */ e("p", {
26
- className: "ttw:text-sm ttw:text-muted-foreground",
27
- children: a.previewUnavailable
28
- }), /* @__PURE__ */ e("a", {
29
- href: r.url,
30
- target: "_blank",
31
- rel: "noreferrer",
32
- className: "ttw:text-sm ttw:font-medium ttw:text-primary ttw:underline ttw:underline-offset-2",
33
- children: a.openFile
34
- })]
35
- });
36
138
  }
37
139
  //#endregion
38
- export { n as SOURCE_DOCUMENT_PREVIEW_LABELS_EN, r as createSourceDocumentPreview };
140
+ export { e as BILL_DETAIL_ACTIONS_LABELS_EN, o as PAYMENT_HISTORY_LABELS_EN, t as SCHEDULED_SUMMARY_LABEL_EN, a as mergeBillDetailActionsLabels, i as mergeDecisionDialogCopy, s as mergePaymentHistoryMethodLabels };
@@ -1,191 +1,38 @@
1
- import { BILL_REJECTED_BANNER_LABELS_EN as e } from "../../ui/dist/index68.js";
2
- import { UNSAVED_BILL_DIALOG_LABELS_EN as t } from "../../ui/dist/index105.js";
3
- import "../../ui/dist/index.js";
4
- import { PAY_BILL_FLOW_LABELS_EN as n, mergePayBillFlowLabels as r } from "./index24.js";
5
- import { MARK_AS_PAID_FLOW_LABELS_EN as i, mergeMarkAsPaidFlowLabels as a } from "./index15.js";
6
- import "./index18.js";
7
- import { APPROVAL_POLICY_RULE_COPY_EN as o } from "./index28.js";
8
- import { BILL_DETAIL_ACTIONS_LABELS_EN as s, PAYMENT_HISTORY_LABELS_EN as c, SCHEDULED_SUMMARY_LABEL_EN as l, mergeBillDetailActionsLabels as u, mergePaymentHistoryMethodLabels as d } from "./index43.js";
9
- import { SOURCE_DOCUMENT_PREVIEW_LABELS_EN as f } from "./index44.js";
1
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
10
2
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js
11
- var p = {
12
- unmappedValidationError: (e, t) => `${e}: ${t}`,
13
- unknownValidationField: "(unknown field)",
14
- requiredField: "This field is required.",
15
- saveFailed: "We could not save this bill. Try again.",
16
- discountTaxBlockedByLineItems: "Discount and Tax can't be saved on a bill with line items. Remove them, then save again.",
17
- finalizeFailed: "We could not submit this bill. Try again.",
18
- draftSaved: "Bill saved as a draft.",
19
- submittedSaved: "Bill updated.",
20
- submittedDemoted: "Bill updated. It moved back to Drafts because some required details are missing.",
21
- billFinalized: "Bill submitted for approval.",
22
- numbersOnly: "Enter numbers only.",
23
- unreadableMoney: "Enter a valid amount.",
24
- unusableQuantity: "Enter a quantity greater than 0.",
25
- lineItemsNeedAttention: "Check the highlighted line items before saving.",
26
- unreadableDiscount: "Enter a valid discount amount.",
27
- unreadableTax: "Enter a valid tax amount.",
28
- unreadableTotal: "Enter a valid total amount."
29
- }, m = {
30
- achMethod: "via ACH bank transfer",
31
- noMethod: "No payment method on file",
32
- accountHolder: "Account holder",
33
- routingNumber: "Routing number",
34
- accountNumber: "Account number",
35
- paymentMethodLoading: "Loading payment method...",
36
- paymentMethodUnavailable: "We could not load payment methods. Try again.",
37
- searchFailed: "We could not load vendors. Try again.",
38
- vendorDetailsFailed: "We could not load this vendor. Try again."
39
- }, h = {
40
- attachFailed: "We could not attach that file. Try again.",
41
- deleteFailed: "We could not remove that document. Try again.",
42
- noDocument: "No document attached to this bill.",
43
- pendingDeletionNotice: "This document will be removed when you save this bill.",
44
- preview: f
45
- }, g = {
46
- ...c,
47
- notProvided: "Not provided",
48
- paymentInstructionsValue: (e) => `Account ending in ${e}`,
49
- paymentInstructionsNotSet: "Not set",
50
- accountHolderFieldLabel: "Account holder",
51
- routingNumberFieldLabel: "Routing number",
52
- accountNumberFieldLabel: "Account number",
53
- invoiceDateRow: "Invoice date",
54
- dueDateRow: "Due date",
55
- invoiceNumberRow: "Invoice number",
56
- glCodeMissing: "GL code not specified",
57
- glCodeUnavailable: "GL code unavailable",
58
- qtyPriceValue: (e, t) => `${e} x ${t}`,
59
- subtotalRow: "Subtotal",
60
- taxRow: "Tax",
61
- discountRow: "Discounts",
62
- totalRow: "Total",
63
- paidOnLabel: (e) => `Paid on ${e}`,
64
- paymentInstructionsSaveError: "Couldn't save payment instructions. Try again.",
65
- paymentInstructionsLinkError: "Payment instructions were saved to the vendor, but couldn't be added to this bill. Try again.",
66
- rejectedByOn: (e, t) => `Rejected by ${e} on ${t}`,
67
- rejectedOn: (e) => `Rejected on ${e}`,
68
- rejectionMessage: (e) => `"${e}"`
69
- }, _ = {
70
- dateLabel: (e) => new Date(e).toLocaleString("en-US", {
71
- month: "short",
72
- day: "numeric",
73
- year: "numeric",
74
- hour: "numeric",
75
- minute: "2-digit"
76
- }),
77
- byActor: (e, t) => `${e} by ${t}`,
78
- billAdded: "Bill added",
79
- billUploaded: "Bill uploaded",
80
- billUpdated: "Bill updated",
81
- attachmentAdded: "Attachment added",
82
- submittedForApproval: "Submitted for approval",
83
- approvalRequested: "Approval requested",
84
- approved: "Approved",
85
- autoApproved: "Approved automatically",
86
- rejected: "Rejected",
87
- rejectedWithReason: (e) => `Rejected: ${e}`,
88
- reopened: "Reopened",
89
- markedAsPaid: "Marked as paid",
90
- markedAsPartiallyPaid: "Marked as partially paid",
91
- paymentReverted: "Payment reverted",
92
- statusChanged: (e) => `Status changed to ${e}`
93
- }, v = {
94
- newTitle: "New bill",
95
- extractedTitle: (e) => `Bill from ${e}`,
96
- viewTitle: (e) => `Bill from ${e}`,
97
- readOnlyTitle: "Bill details",
98
- addedOn: (e) => `Added on ${e}`,
99
- unsavedChanges: t,
100
- scheduledSummary: l,
101
- actions: s,
102
- detail: g,
103
- history: _,
104
- payBill: n,
105
- markAsPaid: i,
106
- approvalPolicyCopy: o,
107
- deleteDraft: {
108
- menuItem: "Delete draft",
109
- dialog: {
110
- title: "Delete this draft?",
111
- description: "The draft and anything entered on it are removed. This can't be undone.",
112
- confirmButton: "Delete draft"
113
- },
114
- error: "Couldn't delete this draft. Try again."
115
- },
116
- lineItemsGlCodeUnavailable: {
117
- loadError: "Couldn't load GL codes",
118
- noAccess: "You don't have access to GL codes",
119
- empty: "No GL codes set up yet"
120
- },
121
- rejectedBanner: e
3
+ var n = {
4
+ previewUnavailable: "Preview not available for this file type.",
5
+ openFile: "Open file"
122
6
  };
123
- function y(e) {
124
- return {
125
- ...v,
126
- ...e,
127
- actions: u(e?.actions),
128
- detail: {
129
- ...v.detail,
130
- ...e?.detail,
131
- paymentHistoryMethodLabels: d(e?.detail?.paymentHistoryMethodLabels)
132
- },
133
- history: {
134
- ...v.history,
135
- ...e?.history
136
- },
137
- payBill: r(e?.payBill),
138
- markAsPaid: a(e?.markAsPaid),
139
- lineItemsGlCodeUnavailable: {
140
- ...v.lineItemsGlCodeUnavailable,
141
- ...e?.lineItemsGlCodeUnavailable
142
- },
143
- unsavedChanges: {
144
- ...v.unsavedChanges,
145
- ...e?.unsavedChanges
146
- },
147
- rejectedBanner: {
148
- ...v.rejectedBanner,
149
- ...e?.rejectedBanner
150
- },
151
- approvalPolicyCopy: {
152
- ...v.approvalPolicyCopy,
153
- ...e?.approvalPolicyCopy
154
- },
155
- deleteDraft: {
156
- ...v.deleteDraft,
157
- ...e?.deleteDraft,
158
- dialog: (() => {
159
- let t = {
160
- ...v.deleteDraft.dialog,
161
- ...e?.deleteDraft?.dialog
162
- };
163
- return delete t.reason, t;
164
- })()
165
- }
7
+ function r(r, i = {}) {
8
+ if (r.mimetype === "application/pdf") return /* @__PURE__ */ e("iframe", {
9
+ src: `${r.url}#toolbar=0&navpanes=0`,
10
+ title: r.name,
11
+ referrerPolicy: "no-referrer",
12
+ className: "ttw:h-full ttw:w-full ttw:border-0"
13
+ });
14
+ if (r.mimetype.startsWith("image/")) return /* @__PURE__ */ e("img", {
15
+ src: r.url,
16
+ alt: r.name,
17
+ className: "ttw:max-h-full ttw:max-w-full ttw:object-contain"
18
+ });
19
+ let a = {
20
+ ...n,
21
+ ...i
166
22
  };
23
+ return /* @__PURE__ */ t("div", {
24
+ className: "ttw:flex ttw:h-full ttw:w-full ttw:flex-col ttw:items-center ttw:justify-center ttw:gap-2 ttw:p-4 ttw:text-center",
25
+ children: [/* @__PURE__ */ e("p", {
26
+ className: "ttw:text-sm ttw:text-muted-foreground",
27
+ children: a.previewUnavailable
28
+ }), /* @__PURE__ */ e("a", {
29
+ href: r.url,
30
+ target: "_blank",
31
+ rel: "noreferrer",
32
+ className: "ttw:text-sm ttw:font-medium ttw:text-primary ttw:underline ttw:underline-offset-2",
33
+ children: a.openFile
34
+ })]
35
+ });
167
36
  }
168
- var b = {
169
- createTitle: "New vendor",
170
- editTitle: "Edit vendor",
171
- close: "Close the vendor form",
172
- nameLabel: "Name",
173
- addAddress: "Add address (optional)",
174
- paymentMethodsHeading: "Accepted payment methods",
175
- paymentMethodsDescription: "How and where will the money be sent. Don't have these yet? No problem. You can save this vendor and add their payment details later — you just won't be able to send payments until you do.",
176
- achTitle: "ACH bank transfer",
177
- achDescription: "Fast, direct deposit to the vendor's bank. Arrives in 1–3 business days.",
178
- addBankAccount: "Add bank account",
179
- accountHolderNameLabel: "Account holder name",
180
- routingNumberLabel: "Routing number",
181
- accountNumberLabel: "Account number",
182
- achHelp: "Ask your vendor for this — it's usually on their invoice, W-9, or a payment instructions email they send you.",
183
- cancel: "Cancel",
184
- save: "Save vendor",
185
- discardConfirmTitle: "Discard unsaved changes?",
186
- discardConfirmDescription: "You've made changes to this vendor that haven't been saved. If you leave now, they'll be lost.",
187
- keepEditingAction: "Keep editing",
188
- discardChangesAction: "Discard changes"
189
- };
190
37
  //#endregion
191
- export { p as BILL_CREATE_MESSAGE_LABELS_EN, v as BILL_CREATE_SCREEN_LABELS_EN, g as BILL_DETAIL_VIEW_LABELS_EN, _ as BILL_HISTORY_LABELS_EN, h as SOURCE_DOCUMENT_CONTAINER_LABELS_EN, b as VENDOR_INLINE_FORM_LABELS_EN, m as VENDOR_SECTION_PROPS_LABELS_EN, y as mergeBillCreateScreenCopy };
38
+ export { n as SOURCE_DOCUMENT_PREVIEW_LABELS_EN, r as createSourceDocumentPreview };
@@ -1,80 +1,191 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import { useAttachPayableFileMutation as e } from "../../data-access/dist/index13.js";
6
- import "../../data-access/dist/index.js";
7
- import { SourceDocumentPanel as t } from "../../ui/dist/index103.js";
1
+ import { BILL_REJECTED_BANNER_LABELS_EN as e } from "../../ui/dist/index68.js";
2
+ import { UNSAVED_BILL_DIALOG_LABELS_EN as t } from "../../ui/dist/index105.js";
8
3
  import "../../ui/dist/index.js";
9
- import { createSourceDocumentPreview as n } from "./index44.js";
10
- import { SOURCE_DOCUMENT_CONTAINER_LABELS_EN as r } from "./index45.js";
11
- import { useEffect as i, useState as a } from "react";
12
- import { jsx as o } from "react/jsx-runtime";
4
+ import { PAY_BILL_FLOW_LABELS_EN as n, mergePayBillFlowLabels as r } from "./index25.js";
5
+ import { MARK_AS_PAID_FLOW_LABELS_EN as i, mergeMarkAsPaidFlowLabels as a } from "./index16.js";
6
+ import "./index19.js";
7
+ import { APPROVAL_POLICY_RULE_COPY_EN as o } from "./index29.js";
8
+ import { BILL_DETAIL_ACTIONS_LABELS_EN as s, PAYMENT_HISTORY_LABELS_EN as c, SCHEDULED_SUMMARY_LABEL_EN as l, mergeBillDetailActionsLabels as u, mergePaymentHistoryMethodLabels as d } from "./index44.js";
9
+ import { SOURCE_DOCUMENT_PREVIEW_LABELS_EN as f } from "./index45.js";
13
10
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js
14
- function s(e) {
15
- let [t, n] = a();
16
- return i(() => {
17
- if (!e) {
18
- n(void 0);
19
- return;
11
+ var p = {
12
+ unmappedValidationError: (e, t) => `${e}: ${t}`,
13
+ unknownValidationField: "(unknown field)",
14
+ requiredField: "This field is required.",
15
+ saveFailed: "We could not save this bill. Try again.",
16
+ discountTaxBlockedByLineItems: "Discount and Tax can't be saved on a bill with line items. Remove them, then save again.",
17
+ finalizeFailed: "We could not submit this bill. Try again.",
18
+ draftSaved: "Bill saved as a draft.",
19
+ submittedSaved: "Bill updated.",
20
+ submittedDemoted: "Bill updated. It moved back to Drafts because some required details are missing.",
21
+ billFinalized: "Bill submitted for approval.",
22
+ numbersOnly: "Enter numbers only.",
23
+ unreadableMoney: "Enter a valid amount.",
24
+ unusableQuantity: "Enter a quantity greater than 0.",
25
+ lineItemsNeedAttention: "Check the highlighted line items before saving.",
26
+ unreadableDiscount: "Enter a valid discount amount.",
27
+ unreadableTax: "Enter a valid tax amount.",
28
+ unreadableTotal: "Enter a valid total amount."
29
+ }, m = {
30
+ achMethod: "via ACH bank transfer",
31
+ noMethod: "No payment method on file",
32
+ accountHolder: "Account holder",
33
+ routingNumber: "Routing number",
34
+ accountNumber: "Account number",
35
+ paymentMethodLoading: "Loading payment method...",
36
+ paymentMethodUnavailable: "We could not load payment methods. Try again.",
37
+ searchFailed: "We could not load vendors. Try again.",
38
+ vendorDetailsFailed: "We could not load this vendor. Try again."
39
+ }, h = {
40
+ attachFailed: "We could not attach that file. Try again.",
41
+ deleteFailed: "We could not remove that document. Try again.",
42
+ noDocument: "No document attached to this bill.",
43
+ pendingDeletionNotice: "This document will be removed when you save this bill.",
44
+ preview: f
45
+ }, g = {
46
+ ...c,
47
+ notProvided: "Not provided",
48
+ paymentInstructionsValue: (e) => `Account ending in ${e}`,
49
+ paymentInstructionsNotSet: "Not set",
50
+ accountHolderFieldLabel: "Account holder",
51
+ routingNumberFieldLabel: "Routing number",
52
+ accountNumberFieldLabel: "Account number",
53
+ invoiceDateRow: "Invoice date",
54
+ dueDateRow: "Due date",
55
+ invoiceNumberRow: "Invoice number",
56
+ glCodeMissing: "GL code not specified",
57
+ glCodeUnavailable: "GL code unavailable",
58
+ qtyPriceValue: (e, t) => `${e} x ${t}`,
59
+ subtotalRow: "Subtotal",
60
+ taxRow: "Tax",
61
+ discountRow: "Discounts",
62
+ totalRow: "Total",
63
+ paidOnLabel: (e) => `Paid on ${e}`,
64
+ paymentInstructionsSaveError: "Couldn't save payment instructions. Try again.",
65
+ paymentInstructionsLinkError: "Payment instructions were saved to the vendor, but couldn't be added to this bill. Try again.",
66
+ rejectedByOn: (e, t) => `Rejected by ${e} on ${t}`,
67
+ rejectedOn: (e) => `Rejected on ${e}`,
68
+ rejectionMessage: (e) => `"${e}"`
69
+ }, _ = {
70
+ dateLabel: (e) => new Date(e).toLocaleString("en-US", {
71
+ month: "short",
72
+ day: "numeric",
73
+ year: "numeric",
74
+ hour: "numeric",
75
+ minute: "2-digit"
76
+ }),
77
+ byActor: (e, t) => `${e} by ${t}`,
78
+ billAdded: "Bill added",
79
+ billUploaded: "Bill uploaded",
80
+ billUpdated: "Bill updated",
81
+ attachmentAdded: "Attachment added",
82
+ submittedForApproval: "Submitted for approval",
83
+ approvalRequested: "Approval requested",
84
+ approved: "Approved",
85
+ autoApproved: "Approved automatically",
86
+ rejected: "Rejected",
87
+ rejectedWithReason: (e) => `Rejected: ${e}`,
88
+ reopened: "Reopened",
89
+ markedAsPaid: "Marked as paid",
90
+ markedAsPartiallyPaid: "Marked as partially paid",
91
+ paymentReverted: "Payment reverted",
92
+ statusChanged: (e) => `Status changed to ${e}`
93
+ }, v = {
94
+ newTitle: "New bill",
95
+ extractedTitle: (e) => `Bill from ${e}`,
96
+ viewTitle: (e) => `Bill from ${e}`,
97
+ readOnlyTitle: "Bill details",
98
+ addedOn: (e) => `Added on ${e}`,
99
+ unsavedChanges: t,
100
+ scheduledSummary: l,
101
+ actions: s,
102
+ detail: g,
103
+ history: _,
104
+ payBill: n,
105
+ markAsPaid: i,
106
+ approvalPolicyCopy: o,
107
+ deleteDraft: {
108
+ menuItem: "Delete draft",
109
+ dialog: {
110
+ title: "Delete this draft?",
111
+ description: "The draft and anything entered on it are removed. This can't be undone.",
112
+ confirmButton: "Delete draft"
113
+ },
114
+ error: "Couldn't delete this draft. Try again."
115
+ },
116
+ lineItemsGlCodeUnavailable: {
117
+ loadError: "Couldn't load GL codes",
118
+ noAccess: "You don't have access to GL codes",
119
+ empty: "No GL codes set up yet"
120
+ },
121
+ rejectedBanner: e
122
+ };
123
+ function y(e) {
124
+ return {
125
+ ...v,
126
+ ...e,
127
+ actions: u(e?.actions),
128
+ detail: {
129
+ ...v.detail,
130
+ ...e?.detail,
131
+ paymentHistoryMethodLabels: d(e?.detail?.paymentHistoryMethodLabels)
132
+ },
133
+ history: {
134
+ ...v.history,
135
+ ...e?.history
136
+ },
137
+ payBill: r(e?.payBill),
138
+ markAsPaid: a(e?.markAsPaid),
139
+ lineItemsGlCodeUnavailable: {
140
+ ...v.lineItemsGlCodeUnavailable,
141
+ ...e?.lineItemsGlCodeUnavailable
142
+ },
143
+ unsavedChanges: {
144
+ ...v.unsavedChanges,
145
+ ...e?.unsavedChanges
146
+ },
147
+ rejectedBanner: {
148
+ ...v.rejectedBanner,
149
+ ...e?.rejectedBanner
150
+ },
151
+ approvalPolicyCopy: {
152
+ ...v.approvalPolicyCopy,
153
+ ...e?.approvalPolicyCopy
154
+ },
155
+ deleteDraft: {
156
+ ...v.deleteDraft,
157
+ ...e?.deleteDraft,
158
+ dialog: (() => {
159
+ let t = {
160
+ ...v.deleteDraft.dialog,
161
+ ...e?.deleteDraft?.dialog
162
+ };
163
+ return delete t.reason, t;
164
+ })()
20
165
  }
21
- let t = URL.createObjectURL(e);
22
- return n(t), () => URL.revokeObjectURL(t);
23
- }, [e]), t;
24
- }
25
- function c({ payableId: i, file: a, isDocumentPending: c, pendingFileName: l, readOnly: u, staging: d, deletion: f, labels: p }) {
26
- let { stagedFile: m, onFileStaged: h, onClearStagedFile: g, isSaving: _ } = d ?? {}, { isPending: v, onRequest: y, onDetachNow: b, isDeleting: x, hasFailed: S } = f ?? {}, C = {
27
- ...r,
28
- ...p,
29
- preview: {
30
- ...r.preview,
31
- ...p?.preview
32
- }
33
- }, w = e(), T = s(m), E = !!(a && !v || m);
34
- if (!E && (c || w.isPending)) return /* @__PURE__ */ o(t, {
35
- mode: "loading",
36
- fileName: l
37
- });
38
- if (!E && u) return /* @__PURE__ */ o("div", {
39
- className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card ttw:p-4 ttw:text-sm ttw:text-muted-foreground",
40
- children: C.noDocument
41
- });
42
- if (!E) return /* @__PURE__ */ o(t, {
43
- mode: "upload",
44
- uploadStatus: w.isPending || x ? "uploading" : "idle",
45
- uploadErrorMessage: w.isError ? C.attachFailed : S ? C.deleteFailed : void 0,
46
- noticeMessage: v && !S ? C.pendingDeletionNotice : void 0,
47
- onFilesSelected: (e) => {
48
- let [t] = e;
49
- if (t) {
50
- if (i) {
51
- let e = () => w.mutate({
52
- path: { payable_id: i },
53
- file: t
54
- });
55
- if (v && b) {
56
- b().then(e, () => void 0);
57
- return;
58
- }
59
- e();
60
- } else h?.(t);
61
- }
62
- }
63
- });
64
- let D = a?.name ?? m?.name ?? "", O = n(a || {
65
- name: D,
66
- url: T ?? "",
67
- mimetype: m?.type ?? ""
68
- }, C.preview);
69
- return /* @__PURE__ */ o(t, {
70
- mode: "document",
71
- fileName: D,
72
- preview: O,
73
- isDeleting: x,
74
- deleteErrorMessage: S ? C.deleteFailed : void 0,
75
- onDownload: a ? () => window.open(a.url, "_blank", "noopener,noreferrer") : void 0,
76
- onDelete: u ? void 0 : a && i ? y : _ ? void 0 : g
77
- });
166
+ };
78
167
  }
168
+ var b = {
169
+ createTitle: "New vendor",
170
+ editTitle: "Edit vendor",
171
+ close: "Close the vendor form",
172
+ nameLabel: "Name",
173
+ addAddress: "Add address (optional)",
174
+ paymentMethodsHeading: "Accepted payment methods",
175
+ paymentMethodsDescription: "How and where will the money be sent. Don't have these yet? No problem. You can save this vendor and add their payment details later — you just won't be able to send payments until you do.",
176
+ achTitle: "ACH bank transfer",
177
+ achDescription: "Fast, direct deposit to the vendor's bank. Arrives in 1–3 business days.",
178
+ addBankAccount: "Add bank account",
179
+ accountHolderNameLabel: "Account holder name",
180
+ routingNumberLabel: "Routing number",
181
+ accountNumberLabel: "Account number",
182
+ achHelp: "Ask your vendor for this — it's usually on their invoice, W-9, or a payment instructions email they send you.",
183
+ cancel: "Cancel",
184
+ save: "Save vendor",
185
+ discardConfirmTitle: "Discard unsaved changes?",
186
+ discardConfirmDescription: "You've made changes to this vendor that haven't been saved. If you leave now, they'll be lost.",
187
+ keepEditingAction: "Keep editing",
188
+ discardChangesAction: "Discard changes"
189
+ };
79
190
  //#endregion
80
- export { c as SourceDocumentContainer, c as default };
191
+ export { p as BILL_CREATE_MESSAGE_LABELS_EN, v as BILL_CREATE_SCREEN_LABELS_EN, g as BILL_DETAIL_VIEW_LABELS_EN, _ as BILL_HISTORY_LABELS_EN, h as SOURCE_DOCUMENT_CONTAINER_LABELS_EN, b as VENDOR_INLINE_FORM_LABELS_EN, m as VENDOR_SECTION_PROPS_LABELS_EN, y as mergeBillCreateScreenCopy };