@tesouro/embedded-components-react 0.4.31 → 0.5.1

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 (75) hide show
  1. package/README.md +17 -47
  2. package/dist/index.d.ts +2 -27
  3. package/dist/index.js +21 -27
  4. package/dist/lib/BillPayWidget.js +1 -1
  5. package/dist/lib/ExpenseManagementWidget.js +1 -1
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +10 -9
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +14 -88
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +8 -96
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +91 -3
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +96 -48
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +3 -137
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +49 -35
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +129 -180
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +32 -74
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +186 -21
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +70 -226
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +22 -219
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +221 -109
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +220 -13
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +119 -46
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +13 -32
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +43 -198
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +29 -32
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +186 -222
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +37 -19
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +229 -420
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +21 -4
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +429 -34
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +4 -224
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +38 -3
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +222 -2
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +3 -46
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +4 -1
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +44 -6
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +1 -12
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +6 -110
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +12 -3
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +109 -124
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +3 -11
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +124 -7
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +8 -45
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +8 -21
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +45 -28
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +20 -83
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +28 -47
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +76 -243
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +48 -113
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +239 -196
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +115 -4
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +207 -5
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +3 -114
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +8 -1
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +106 -16
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +1 -0
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +25 -0
  56. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index.js +3 -3
  57. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index10.js +74 -1
  58. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index11.js +11 -247
  59. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index12.js +2 -2
  60. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index13.js +34 -57
  61. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index14.js +1 -0
  62. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index8.js +253 -2
  63. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index9.js +2 -48
  64. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/index.js +2 -1
  65. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ReceiptMatchWidget/lib/ReceiptMatchLauncher.js +28 -0
  66. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ReceiptMatchWidget/lib/labels.js +4 -1
  67. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  68. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  69. package/package.json +1 -1
  70. package/dist/lib/ExpenseApprovalPoliciesWidget.d.ts +0 -639
  71. package/dist/lib/ExpenseApprovalPoliciesWidget.js +0 -3
  72. package/dist/lib/ExpenseRequirementsWidget.d.ts +0 -639
  73. package/dist/lib/ExpenseRequirementsWidget.js +0 -3
  74. package/dist/lib/ReceiptMatchWidget.d.ts +0 -640
  75. package/dist/lib/ReceiptMatchWidget.js +0 -3
@@ -1,52 +1,100 @@
1
- import { derivePayableStatus as e } from "./index8.js";
2
- import { BILL_STATUS_BADGE_LABELS_EN as t } from "../../ui/dist/index17.js";
3
- import "../../ui/dist/index.js";
1
+ import { formatCalendarDate as e } from "../../../shared/util/dist/lib/formatCalendarDate.js";
2
+ import { derivePayableStatus as t } from "./index8.js";
3
+ import { resolveVendor as n } from "./index9.js";
4
+ import { resolveAmountDueMinorUnits as r } from "./index21.js";
5
+ import { maskAccountNumber as i } from "./index23.js";
6
+ import { formatBillMoney as a } from "./index2.js";
7
+ import { resolveLineItemAmountMinorUnits as o } from "./index41.js";
8
+ import { getPaidAtLabel as s } from "./index42.js";
4
9
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js
5
- var n = /* @__PURE__ */ new Set([
6
- "credit_note_linked",
7
- "credit_note_unlinked",
8
- "line_item_added",
9
- "line_item_updated",
10
- "line_item_removed",
11
- "deleted"
12
- ]);
13
- function r(n, r, i) {
14
- switch (n) {
15
- case "payable_created": return r?.source_of_payable_data === "ocr" ? i.billUploaded : i.billAdded;
16
- case "payable_updated": return i.billUpdated;
17
- case "file_attached": return i.attachmentAdded;
18
- case "submitted_for_approval": return i.submittedForApproval;
19
- case "approval_requested": return i.approvalRequested;
20
- case "approval_action": {
21
- let e = r?.action, t = r?.reject_reason;
22
- return e === "approve" ? i.approved : e === "reject" ? typeof t == "string" && t ? i.rejectedWithReason(t) : i.rejected : void 0;
10
+ function c({ payable: c, lineItems: l, glCodeOptions: u, glCodeRosterAvailable: d = !0, history: f, paymentHistory: p, approvalPolicy: m, labels: h, hasScheduledPayment: g, rejection: _, payableAchInstructions: v, payableAchInstructionsReadable: y = !1 }) {
11
+ let b = c.currency, x = t({
12
+ apiStatus: c.status,
13
+ dueDate: c.due_date,
14
+ scheduledPaymentDate: c.scheduled_payment_date,
15
+ hasScheduledPayment: g
16
+ }), S = n(c), C = y ? v : S?.bank_account, w = C?.account_number, T = !!(C?.account_holder_name && C.routing_number && C.account_number), E = e(c.issued_at) || h.notProvided, D = e(c.due_date) || h.notProvided, O = new Map(u.map((e) => [e.value, e.label])), k = [
17
+ {
18
+ label: h.subtotalRow,
19
+ minorUnits: c.subtotal
20
+ },
21
+ {
22
+ label: h.discountRow,
23
+ minorUnits: c.discount
24
+ },
25
+ {
26
+ label: h.taxRow,
27
+ minorUnits: c.tax_amount
23
28
  }
24
- case "auto_approved": return i.autoApproved;
25
- case "reopened": return i.reopened;
26
- case "marked_as_paid": return i.markedAsPaid;
27
- case "marked_as_partially_paid": return i.markedAsPartiallyPaid;
28
- case "payment_reverted": return i.paymentReverted;
29
- case "status_changed": {
30
- let n = r?.new_status;
31
- if (typeof n != "string") return;
32
- let a = e({ apiStatus: n }).status;
33
- return i.statusChanged(t[a] ?? t.unknown);
34
- }
35
- default: return;
36
- }
37
- }
38
- function i(e, t, i) {
39
- let a = new Map(t.map((e) => [e.id, e.name]));
40
- return e.filter((e) => !n.has(e.event_type)).map((e) => {
41
- let t = r(e.event_type, e.event_data, i);
42
- if (!t) return;
43
- let n = e.entity_user_id ? a.get(e.entity_user_id) : void 0;
44
- return {
45
- id: e.id,
46
- dateLabel: i.dateLabel(e.timestamp),
47
- description: n ? i.byActor(t, n) : t
48
- };
49
- }).filter((e) => !!e);
29
+ ].map((e) => ({
30
+ label: e.label,
31
+ value: a(e.minorUnits, b)
32
+ })).filter((e) => !!e.value), A = a(c.total_amount, b);
33
+ A && k.push({
34
+ label: h.totalRow,
35
+ value: A,
36
+ emphasis: !0
37
+ });
38
+ let j = s(c);
39
+ return {
40
+ amountDue: a(r(c), b) ?? "",
41
+ amountPaid: j ? a(c.amount_paid, b) : void 0,
42
+ paidOnLabel: j ? h.paidOnLabel(j) : void 0,
43
+ invoiceDateLabel: E,
44
+ dueDateLabel: D,
45
+ dueDateTone: x.isOverdue ? "danger" : "default",
46
+ status: x.status,
47
+ statusTone: x.tone,
48
+ payTo: {
49
+ name: S?.name || h.notProvided,
50
+ email: S?.email ?? "",
51
+ methodLabel: T ? h.paymentInstructionsValue(w?.slice(-4) ?? "") : h.paymentInstructionsNotSet,
52
+ fields: T ? [
53
+ {
54
+ label: h.accountHolderFieldLabel,
55
+ value: C?.account_holder_name ?? ""
56
+ },
57
+ {
58
+ label: h.routingNumberFieldLabel,
59
+ value: C?.routing_number ?? ""
60
+ },
61
+ {
62
+ label: h.accountNumberFieldLabel,
63
+ value: w ?? "",
64
+ maskedValue: i(w ?? void 0)
65
+ }
66
+ ] : []
67
+ },
68
+ invoiceFields: [
69
+ {
70
+ label: h.invoiceDateRow,
71
+ value: E
72
+ },
73
+ {
74
+ label: h.dueDateRow,
75
+ value: D
76
+ },
77
+ {
78
+ label: h.invoiceNumberRow,
79
+ value: c.document_id || h.notProvided
80
+ }
81
+ ],
82
+ lineItems: l.map((e) => {
83
+ let t = a(e.unit_price, b);
84
+ return {
85
+ id: e.id,
86
+ description: e.name ?? e.description ?? "",
87
+ glCodeLabel: e.ledger_account_id ? O.get(e.ledger_account_id) ?? (d ? h.glCodeMissing : h.glCodeUnavailable) : h.glCodeMissing,
88
+ qtyPriceLabel: e.quantity != null && t ? h.qtyPriceValue(String(e.quantity), t) : "",
89
+ amount: a(o(e), b) ?? ""
90
+ };
91
+ }),
92
+ amountRows: k,
93
+ approvalPolicy: m,
94
+ paymentHistory: p,
95
+ history: f,
96
+ rejection: _
97
+ };
50
98
  }
51
99
  //#endregion
52
- export { i as buildBillHistory };
100
+ export { c as buildBillDetailView };
@@ -1,140 +1,6 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js
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 {
102
- ...n,
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
137
- };
2
+ function e({ isUnsavedPromptOpen: e, isLocked: t, isDirty: n }) {
3
+ return e ? "dismiss-prompt" : !t && n ? "prompt" : "close";
138
4
  }
139
5
  //#endregion
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 };
6
+ export { e as resolveEditorDismissal };
@@ -1,38 +1,52 @@
1
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
1
+ import { derivePayableStatus as e } from "./index8.js";
2
+ import { BILL_STATUS_BADGE_LABELS_EN as t } from "../../ui/dist/index17.js";
3
+ import "../../ui/dist/index.js";
2
4
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.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 = {
20
- ...n,
21
- ...i
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
- });
5
+ var n = /* @__PURE__ */ new Set([
6
+ "credit_note_linked",
7
+ "credit_note_unlinked",
8
+ "line_item_added",
9
+ "line_item_updated",
10
+ "line_item_removed",
11
+ "deleted"
12
+ ]);
13
+ function r(n, r, i) {
14
+ switch (n) {
15
+ case "payable_created": return r?.source_of_payable_data === "ocr" ? i.billUploaded : i.billAdded;
16
+ case "payable_updated": return i.billUpdated;
17
+ case "file_attached": return i.attachmentAdded;
18
+ case "submitted_for_approval": return i.submittedForApproval;
19
+ case "approval_requested": return i.approvalRequested;
20
+ case "approval_action": {
21
+ let e = r?.action, t = r?.reject_reason;
22
+ return e === "approve" ? i.approved : e === "reject" ? typeof t == "string" && t ? i.rejectedWithReason(t) : i.rejected : void 0;
23
+ }
24
+ case "auto_approved": return i.autoApproved;
25
+ case "reopened": return i.reopened;
26
+ case "marked_as_paid": return i.markedAsPaid;
27
+ case "marked_as_partially_paid": return i.markedAsPartiallyPaid;
28
+ case "payment_reverted": return i.paymentReverted;
29
+ case "status_changed": {
30
+ let n = r?.new_status;
31
+ if (typeof n != "string") return;
32
+ let a = e({ apiStatus: n }).status;
33
+ return i.statusChanged(t[a] ?? t.unknown);
34
+ }
35
+ default: return;
36
+ }
37
+ }
38
+ function i(e, t, i) {
39
+ let a = new Map(t.map((e) => [e.id, e.name]));
40
+ return e.filter((e) => !n.has(e.event_type)).map((e) => {
41
+ let t = r(e.event_type, e.event_data, i);
42
+ if (!t) return;
43
+ let n = e.entity_user_id ? a.get(e.entity_user_id) : void 0;
44
+ return {
45
+ id: e.id,
46
+ dateLabel: i.dateLabel(e.timestamp),
47
+ description: n ? i.byActor(t, n) : t
48
+ };
49
+ }).filter((e) => !!e);
36
50
  }
37
51
  //#endregion
38
- export { n as SOURCE_DOCUMENT_PREVIEW_LABELS_EN, r as createSourceDocumentPreview };
52
+ export { i as buildBillHistory };