@tesouro/embedded-components-react 0.11.253 → 0.11.255

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 (111) hide show
  1. package/dist/index.css +9 -344
  2. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index23.js +35 -38
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index26.js +21 -14
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +3 -105
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index28.js +4 -0
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +47 -47
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index34.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index4.js +87 -90
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +238 -248
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index46.js +15 -34
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index47.js +199 -202
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index5.js +16 -14
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index.js +25 -25
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index10.js +18 -32
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index11.js +150 -19
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index12.js +2 -150
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index13.js +75 -1
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +272 -70
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +1 -279
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index16.js +20 -2
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index17.js +51 -16
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index18.js +2 -55
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index19.js +34 -2
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index20.js +369 -30
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index21.js +2 -373
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index22.js +22 -2
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index23.js +124 -20
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index24.js +2 -126
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index25.js +30 -1
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index26.js +51 -29
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index27.js +1 -52
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index28.js +54 -1
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index29.js +10 -54
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index3.js +35 -35
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index30.js +133 -10
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index31.js +1 -198
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index32.js +30 -2
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +52 -43
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +2 -315
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index35.js +15 -2
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index36.js +158 -14
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index37.js +2 -162
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index38.js +3 -2
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index39.js +19 -2
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index40.js +2 -35
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index41.js +9 -2
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index42.js +31 -8
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index43.js +2 -33
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index44.js +6 -2
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index45.js +27 -5
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index46.js +2 -29
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index47.js +13 -2
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index48.js +100 -11
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index49.js +2 -107
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js +12 -16
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index50.js +9 -2
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index51.js +41 -8
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index52.js +2 -52
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index6.js +1 -22
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index7.js +31 -1
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index8.js +1 -31
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index9.js +34 -1
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index14.js +1 -3
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index19.js +2 -6
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index15.js +1 -1
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index17.js +2 -6
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index10.js +119 -104
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index11.js +2 -2
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index14.js +1 -1
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index2.js +2 -1
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index4.js +11 -11
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index9.js +9 -4
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index.js +8 -8
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index10.js +76 -171
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index11.js +1 -1
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index12.js +33 -0
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index13.js +9 -0
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index14.js +126 -0
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index15.js +2 -0
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index2.js +23 -29
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index3.js +32 -126
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index4.js +14 -2
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +3 -13
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index6.js +28 -104
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index7.js +72 -1
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index8.js +2 -33
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index9.js +12 -7
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +6 -9
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +6 -9
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +32 -31
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index2.js +4 -2
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index3.js +15 -5
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index4.js +53 -84
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/index.js +17 -18
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/billDetailLabels.js +12 -12
  97. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index.js +4 -4
  98. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index3.js +9 -9
  99. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index4.js +13 -14
  100. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  101. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/document/documentPreview.js +1 -1
  102. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +20 -19
  103. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/MaskedAccountNumber/MaskedAccountNumber.js +30 -34
  104. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/TooltipIconButton/TooltipIconButton.js +55 -0
  105. package/dist/packages/shared-ui-shadcn/dist/index.js +1322 -1312
  106. package/package.json +1 -1
  107. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index53.js +0 -2
  108. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +0 -6
  109. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +0 -31
  110. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +0 -2
  111. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/maskAccountNumber.js +0 -5
@@ -1,74 +1,276 @@
1
- import { AUDIT_HISTORY_LABELS_EN as e, REQUIRED_FIELDS_LEGEND_LABELS_EN as t, mergeRequiredFieldsLegendLabels as n } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { BILL_STATUS_BADGE_LABELS_EN as r } from "../../../../shared/document-status/ui/dist/index2.js";
1
+ import { Alert as e, AlertDescription as t, AuditHistoryList as n, Button as r, CollapsibleSection as i, DescriptionList as a, DisplayAmount as o, Heading as s, RequiredFieldsLegend as c, Skeleton as l, Typography as u, cn as d } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { ErrorState as f } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
3
+ import { LoadingRegion as p } from "../../../../shared/ui/dist/lib/LoadingRegion/LoadingRegion.js";
4
+ import { InlineErrorAlert as m } from "../../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
5
+ import { HintDisclosure as h } from "../../../../shared/ui/dist/lib/HintDisclosure/HintDisclosure.js";
6
+ import { DueDateText as g } from "../../../../shared/ui/dist/lib/DueDateText/DueDateText.js";
7
+ import "../../../../shared/ui/dist/index.js";
8
+ import { BillStatusBadge as _ } from "../../../../shared/document-status/ui/dist/index4.js";
3
9
  import "../../../../shared/document-status/ui/dist/index.js";
4
- import { APPROVAL_POLICY_CARD_LABELS_EN as i } from "./index2.js";
10
+ import { ApprovalPolicyCard as v } from "./index3.js";
5
11
  import "./index4.js";
6
- import { VENDOR_SUMMARY_CARD_LABELS_EN as a } from "./index11.js";
7
- import "./index13.js";
12
+ import { BillRejectionNotice as y } from "./index5.js";
13
+ import "./index6.js";
14
+ import { PaymentHistoryList as b } from "./index7.js";
15
+ import "./index8.js";
16
+ import { VendorSummaryCard as x } from "./index11.js";
17
+ import "./index12.js";
18
+ import { mergeBillDetailBodyLabels as S } from "./index13.js";
19
+ import { useMemo as C } from "react";
20
+ import { jsx as w, jsxs as T } from "react/jsx-runtime";
21
+ import { TriangleAlertIcon as E } from "lucide-react";
8
22
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js
9
- var o = {
10
- ...e,
11
- error: "Couldn't load audit history.",
12
- namesError: "Some names could not be loaded."
13
- }, s = {
14
- errorTitle: "Couldn't load this bill",
15
- errorDescription: "Something went wrong. Try again.",
16
- amountDueHeading: "Amount due",
17
- amountPaidHeading: "Amount paid",
18
- invoiceDateLabel: "Invoice date",
19
- dueDateLabel: "Due date",
20
- approvalOverrideNotice: "You can approve or reject this bill from the menu in the top right, bypassing any remaining approvers.",
21
- payToHeading: "Pay to",
22
- payToHeadingPaid: "Paid to",
23
- vendorRow: "Vendor",
24
- paymentInstructionsRow: "ACH bank account",
25
- invoiceDetailsHeading: "Invoice details",
26
- addPaymentInstructions: "Add payment instructions",
27
- missingPaymentInstructionsBanner: "Missing payment instructions, which are required to send a payment",
28
- descriptionAndGlCodeColumn: "Description and GL code",
29
- qtyPriceColumn: "Qty/Price",
30
- amountColumn: "Amount",
31
- paymentHistoryHeading: "Payment history",
32
- paymentHistoryErrorDescription: "Couldn't load payment history.",
33
- history: o,
34
- statusBadge: r,
35
- approvalPolicy: i,
36
- payToCard: {
37
- ...a,
38
- editAction: "Edit vendor"
39
- },
40
- requiredFieldsLegend: t
41
- };
42
- function c(e) {
43
- let t = {
44
- ...s.payToCard.ach.fieldMarkers,
45
- ...e?.payToCard?.ach?.fieldMarkers
46
- };
47
- return {
48
- ...s,
49
- ...e,
50
- statusBadge: {
51
- ...s.statusBadge,
52
- ...e?.statusBadge
53
- },
54
- approvalPolicy: {
55
- ...s.approvalPolicy,
56
- ...e?.approvalPolicy
57
- },
58
- payToCard: {
59
- ...s.payToCard,
60
- ...e?.payToCard,
61
- ach: {
62
- ...s.payToCard.ach,
63
- ...e?.payToCard?.ach,
64
- fieldMarkers: t
65
- }
66
- },
67
- history: {
68
- ...s.history,
69
- ...e?.history
70
- },
71
- requiredFieldsLegend: n(t, e?.requiredFieldsLegend)
72
- };
23
+ function D({ heading: e, collapsible: t, defaultOpen: n = !0, children: r }) {
24
+ return t ? /* @__PURE__ */ w(i, {
25
+ defaultOpen: n,
26
+ heading: e,
27
+ children: /* @__PURE__ */ w("div", {
28
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
29
+ children: r
30
+ })
31
+ }) : /* @__PURE__ */ T("section", {
32
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
33
+ children: [/* @__PURE__ */ w(s, {
34
+ variant: "section",
35
+ level: 3,
36
+ children: e
37
+ }), r]
38
+ });
73
39
  }
74
- export { o as BILL_AUDIT_HISTORY_SECTION_LABELS_EN, s as BILL_DETAIL_BODY_LABELS_EN, c as mergeBillDetailBodyLabels };
40
+ function O({ view: e, isLoading: t, isError: n }) {
41
+ return !(!e || t || n);
42
+ }
43
+ var k = "ttw:px-3 ttw:py-2", A = "ttw:py-2 ttw:pr-3";
44
+ function j({ view: s, statusDetail: O, statusDetailDate: j, showApprovalOverrideNotice: M, awaitingApprovalNotice: N, payTo: P, paymentHistoryError: F, paymentHistoryLoading: I, historyError: L, historyLoading: R, historyNamesError: z, collapsibleSections: B = !1, workflowActions: V, isLoading: H, isError: U, labels: W }) {
45
+ let G = C(() => S(W), [W]), K = C(() => ({
46
+ ...G.payToCard,
47
+ payToHeading: s?.paidOnLabel ? G.payToHeadingPaid : G.payToHeading,
48
+ vendorLabel: G.vendorRow,
49
+ achBankAccountLabel: G.paymentInstructionsRow
50
+ }), [G, s?.paidOnLabel]);
51
+ if (U) return /* @__PURE__ */ w(f, {
52
+ title: G.errorTitle,
53
+ description: G.errorDescription
54
+ });
55
+ if (H || !s) return /* @__PURE__ */ T(p, {
56
+ isLoading: !0,
57
+ loadingLabel: G.loadingLabel,
58
+ className: "ttw:flex ttw:flex-col ttw:gap-6",
59
+ children: [
60
+ /* @__PURE__ */ w(l, { className: "ttw:h-40 ttw:w-full" }),
61
+ /* @__PURE__ */ w(l, { className: "ttw:h-32 ttw:w-full" }),
62
+ /* @__PURE__ */ w(l, { className: "ttw:h-24 ttw:w-full" })
63
+ ]
64
+ });
65
+ let q = P?.paymentInstructions, J = q?.onAdd, Y = O ?? s.paidOnLabel, X = Y ? /* @__PURE__ */ w("span", {
66
+ className: "ttw:text-sm ttw:text-muted-foreground",
67
+ children: Y
68
+ }) : null, Z = P?.editForm ? /* @__PURE__ */ T("div", {
69
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
70
+ children: [P.editForm, /* @__PURE__ */ w(x, {
71
+ summary: s.payTo,
72
+ paymentInstructions: q,
73
+ detailsWarning: P?.detailsWarning,
74
+ hideHeading: B,
75
+ labels: K
76
+ })]
77
+ }) : /* @__PURE__ */ w(x, {
78
+ summary: s.payTo,
79
+ onEdit: P?.onEdit,
80
+ paymentInstructions: q,
81
+ detailsWarning: P?.detailsWarning,
82
+ hideHeading: B,
83
+ labels: K
84
+ });
85
+ return /* @__PURE__ */ T("div", {
86
+ className: "ttw:flex ttw:flex-col ttw:gap-6",
87
+ children: [
88
+ J ? /* @__PURE__ */ T(e, {
89
+ variant: "warning",
90
+ children: [/* @__PURE__ */ w(E, { "aria-hidden": !0 }), /* @__PURE__ */ T(t, {
91
+ className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-3",
92
+ children: [/* @__PURE__ */ w("span", { children: G.missingPaymentInstructionsBanner }), /* @__PURE__ */ w(r, {
93
+ type: "button",
94
+ variant: "outline",
95
+ size: "sm",
96
+ onClick: J,
97
+ children: G.addPaymentInstructions
98
+ })]
99
+ })]
100
+ }) : null,
101
+ /* @__PURE__ */ T("section", {
102
+ className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-muted ttw:p-4",
103
+ children: [
104
+ /* @__PURE__ */ T("div", {
105
+ className: "ttw:flex ttw:flex-wrap ttw:gap-x-12 ttw:gap-y-2",
106
+ children: [/* @__PURE__ */ T("div", {
107
+ className: "ttw:flex ttw:flex-col ttw:gap-1",
108
+ children: [/* @__PURE__ */ w(u, {
109
+ variant: "caption",
110
+ color: "muted",
111
+ children: G.amountDueHeading
112
+ }), /* @__PURE__ */ w(o, {
113
+ component: "span",
114
+ children: s.amountDue
115
+ })]
116
+ }), s.amountPaid ? /* @__PURE__ */ T("div", {
117
+ className: "ttw:flex ttw:flex-col ttw:gap-1",
118
+ children: [/* @__PURE__ */ w(u, {
119
+ variant: "caption",
120
+ color: "muted",
121
+ children: G.amountPaidHeading
122
+ }), /* @__PURE__ */ w(o, {
123
+ component: "span",
124
+ children: s.amountPaid
125
+ })]
126
+ }) : null]
127
+ }),
128
+ /* @__PURE__ */ T("div", {
129
+ className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2",
130
+ children: [/* @__PURE__ */ w(_, {
131
+ status: s.status,
132
+ tone: s.statusTone,
133
+ labels: G.statusBadge
134
+ }), X && j ? /* @__PURE__ */ w(h, {
135
+ hint: j,
136
+ children: X
137
+ }) : X]
138
+ }),
139
+ /* @__PURE__ */ T("div", {
140
+ className: "ttw:flex ttw:flex-wrap ttw:gap-x-12 ttw:gap-y-2",
141
+ children: [/* @__PURE__ */ T("div", {
142
+ className: "ttw:flex ttw:flex-col",
143
+ children: [/* @__PURE__ */ w(u, {
144
+ variant: "caption",
145
+ color: "muted",
146
+ children: G.invoiceDateLabel
147
+ }), /* @__PURE__ */ w("span", {
148
+ className: "ttw:text-sm ttw:font-medium",
149
+ children: s.invoiceDateLabel
150
+ })]
151
+ }), /* @__PURE__ */ T("div", {
152
+ className: "ttw:flex ttw:flex-col",
153
+ children: [/* @__PURE__ */ w(u, {
154
+ variant: "caption",
155
+ color: "muted",
156
+ children: G.dueDateLabel
157
+ }), /* @__PURE__ */ w("span", {
158
+ className: "ttw:text-sm ttw:font-medium",
159
+ children: /* @__PURE__ */ w(g, {
160
+ label: s.dueDateLabel,
161
+ overdueLabel: s.dueDateOverdueLabel,
162
+ accessibleLabel: s.dueDateAccessibleLabel
163
+ })
164
+ })]
165
+ })]
166
+ }),
167
+ s.rejection ? /* @__PURE__ */ w(y, { ...s.rejection }) : null,
168
+ M ? /* @__PURE__ */ w(u, {
169
+ variant: "caption",
170
+ color: "muted",
171
+ children: G.approvalOverrideNotice
172
+ }) : N ? /* @__PURE__ */ w(u, {
173
+ variant: "caption",
174
+ color: "muted",
175
+ children: N
176
+ }) : null,
177
+ V ? /* @__PURE__ */ w("div", {
178
+ className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2",
179
+ children: V
180
+ }) : null
181
+ ]
182
+ }),
183
+ q?.isOpen ? /* @__PURE__ */ w(c, { labels: G.requiredFieldsLegend }) : null,
184
+ B ? /* @__PURE__ */ w(i, {
185
+ defaultOpen: !0,
186
+ heading: K.payToHeading,
187
+ children: Z
188
+ }) : Z,
189
+ s.paymentHistory.length || F || I ? /* @__PURE__ */ w(D, {
190
+ heading: G.paymentHistoryHeading,
191
+ collapsible: B,
192
+ children: F ? /* @__PURE__ */ w(m, { children: G.paymentHistoryErrorDescription }) : I ? /* @__PURE__ */ w(p, {
193
+ isLoading: !0,
194
+ loadingLabel: G.paymentHistoryLoadingLabel,
195
+ children: /* @__PURE__ */ w(l, { className: "ttw:h-9 ttw:w-full" })
196
+ }) : /* @__PURE__ */ w(b, { records: s.paymentHistory })
197
+ }) : null,
198
+ /* @__PURE__ */ T(D, {
199
+ heading: G.invoiceDetailsHeading,
200
+ collapsible: B,
201
+ children: [/* @__PURE__ */ w(a, { items: s.invoiceFields }), /* @__PURE__ */ T("table", {
202
+ className: "ttw:w-full ttw:text-sm",
203
+ children: [/* @__PURE__ */ w("thead", { children: /* @__PURE__ */ T("tr", {
204
+ className: "ttw:bg-muted/50 ttw:text-xs ttw:text-muted-foreground",
205
+ children: [
206
+ /* @__PURE__ */ w("th", {
207
+ className: d(A, "ttw:text-left ttw:font-normal"),
208
+ children: G.descriptionAndGlCodeColumn
209
+ }),
210
+ /* @__PURE__ */ w("th", {
211
+ className: d(k, "ttw:text-right ttw:font-normal"),
212
+ children: G.qtyPriceColumn
213
+ }),
214
+ /* @__PURE__ */ w("th", {
215
+ className: d(k, "ttw:text-right ttw:font-normal"),
216
+ children: G.amountColumn
217
+ })
218
+ ]
219
+ }) }), /* @__PURE__ */ T("tbody", { children: [s.lineItems.map((e) => /* @__PURE__ */ T("tr", {
220
+ className: "ttw:border-b ttw:border-border",
221
+ children: [
222
+ /* @__PURE__ */ w("td", {
223
+ className: A,
224
+ children: /* @__PURE__ */ T("div", {
225
+ className: "ttw:flex ttw:flex-col",
226
+ children: [/* @__PURE__ */ w("span", { children: e.description }), /* @__PURE__ */ w("span", {
227
+ className: "ttw:text-xs ttw:text-muted-foreground",
228
+ children: e.glCodeLabel
229
+ })]
230
+ })
231
+ }),
232
+ /* @__PURE__ */ w("td", {
233
+ className: d(k, "ttw:text-right ttw:whitespace-nowrap ttw:text-muted-foreground ttw:tabular-nums"),
234
+ children: e.qtyPriceLabel
235
+ }),
236
+ /* @__PURE__ */ w("td", {
237
+ className: d(k, "ttw:text-right ttw:whitespace-nowrap ttw:tabular-nums"),
238
+ children: e.amount
239
+ })
240
+ ]
241
+ }, e.id)), s.amountRows.map((e) => /* @__PURE__ */ T("tr", {
242
+ className: d(e.emphasis ? "ttw:font-semibold" : "ttw:text-muted-foreground"),
243
+ children: [/* @__PURE__ */ w("td", {
244
+ colSpan: 2,
245
+ className: A,
246
+ children: e.label
247
+ }), /* @__PURE__ */ w("td", {
248
+ className: d(k, "ttw:text-right ttw:whitespace-nowrap ttw:tabular-nums", e.emphasis && "ttw:text-foreground"),
249
+ children: e.value
250
+ })]
251
+ }, e.label))] })]
252
+ })]
253
+ }),
254
+ s.approvalPolicy ? /* @__PURE__ */ w(v, {
255
+ view: s.approvalPolicy,
256
+ labels: G.approvalPolicy
257
+ }) : null,
258
+ /* @__PURE__ */ T(D, {
259
+ heading: G.history.heading,
260
+ collapsible: B,
261
+ defaultOpen: !1,
262
+ children: [z ? /* @__PURE__ */ w(u, {
263
+ variant: "caption",
264
+ color: "muted",
265
+ children: G.history.namesError
266
+ }) : null, /* @__PURE__ */ w(n, {
267
+ rows: s.history,
268
+ isLoading: R,
269
+ isError: L,
270
+ labels: G.history
271
+ })]
272
+ })
273
+ ]
274
+ });
275
+ }
276
+ export { j as BillDetailBody, j as default, O as isBillDetailReady };
@@ -1,280 +1,2 @@
1
- import { AuditHistoryList as e, Badge as t, Button as n, RequiredFieldsLegend as r, Skeleton as i, Typography as a, cn as o } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { ErrorState as s } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
3
- import { DueDateText as c } from "../../../../shared/ui/dist/lib/DueDateText/DueDateText.js";
4
- import "../../../../shared/ui/dist/index.js";
5
- import { BillActionButtons as l, NO_BILL_ACTIONS as u } from "../../../ui/dist/index2.js";
6
- import "../../../ui/dist/index.js";
7
- import { BillStatusBadge as d } from "../../../../shared/document-status/ui/dist/index4.js";
8
- import "../../../../shared/document-status/ui/dist/index.js";
9
- import { ApprovalPolicyCard as f } from "./index3.js";
10
- import "./index4.js";
11
- import { BillRejectionNotice as p } from "./index6.js";
12
- import "./index7.js";
13
- import { PaymentHistoryList as m } from "./index8.js";
14
- import "./index9.js";
15
- import { VendorSummaryCard as h } from "./index12.js";
16
1
  import "./index13.js";
17
- import { mergeBillDetailBodyLabels as g } from "./index14.js";
18
- import { ScheduledSummaryBadge as _ } from "./index5.js";
19
- import { useMemo as v } from "react";
20
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
21
- import { AlertTriangle as x } from "lucide-react";
22
- // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js
23
- var S = "ttw:text-base ttw:font-semibold", C = "ttw:px-3 ttw:py-2", w = "ttw:py-2 ttw:pr-3", T = "ttw:flex ttw:items-start ttw:gap-4 ttw:py-2.5", E = "ttw:w-[140px] ttw:shrink-0 ttw:text-sm ttw:font-medium ttw:text-muted-foreground";
24
- function D({ view: D, actions: O = u, scheduledSummary: k, scheduledSummaryDate: A, scheduledStatusLabel: j, showApprovalOverrideNotice: M, awaitingApprovalNotice: N, payTo: P, paymentHistoryError: F, paymentHistoryLoading: I, historyError: L, historyLoading: R, historyNamesError: z, isLoading: B, isError: V, labels: H }) {
25
- let U = v(() => g(H), [H]), W = v(() => ({
26
- ...U.payToCard,
27
- payToHeading: D?.paidOnLabel ? U.payToHeadingPaid : U.payToHeading,
28
- vendorLabel: U.vendorRow,
29
- achBankAccountLabel: U.paymentInstructionsRow
30
- }), [U, D?.paidOnLabel]), G = v(() => ({
31
- ...U.statusBadge,
32
- ...j ? { scheduled: j } : void 0
33
- }), [U.statusBadge, j]);
34
- if (V) return /* @__PURE__ */ y(s, {
35
- title: U.errorTitle,
36
- description: U.errorDescription
37
- });
38
- if (B || !D) return /* @__PURE__ */ b("div", {
39
- "aria-hidden": !0,
40
- className: "ttw:flex ttw:flex-col ttw:gap-6",
41
- children: [
42
- /* @__PURE__ */ y(i, { className: "ttw:h-40 ttw:w-full" }),
43
- /* @__PURE__ */ y(i, { className: "ttw:h-32 ttw:w-full" }),
44
- /* @__PURE__ */ y(i, { className: "ttw:h-24 ttw:w-full" })
45
- ]
46
- });
47
- let K = P?.paymentInstructions, q = K?.onAdd;
48
- return /* @__PURE__ */ b("div", {
49
- className: "ttw:flex ttw:flex-col ttw:gap-6",
50
- children: [
51
- q ? /* @__PURE__ */ b("div", {
52
- className: "ttw:flex ttw:items-center ttw:gap-3 ttw:rounded-md ttw:border ttw:border-amber-200 ttw:bg-amber-50 ttw:px-3 ttw:py-2.5",
53
- children: [
54
- /* @__PURE__ */ y(x, { className: "ttw:size-4 ttw:shrink-0 ttw:text-amber-800" }),
55
- /* @__PURE__ */ y("p", {
56
- className: "ttw:flex-1 ttw:text-sm ttw:text-foreground",
57
- children: U.missingPaymentInstructionsBanner
58
- }),
59
- /* @__PURE__ */ y(n, {
60
- type: "button",
61
- variant: "outline",
62
- size: "sm",
63
- onClick: q,
64
- children: U.addPaymentInstructions
65
- })
66
- ]
67
- }) : null,
68
- /* @__PURE__ */ b("section", {
69
- className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-muted ttw:p-4",
70
- children: [
71
- D.paidOnLabel ? /* @__PURE__ */ b("div", {
72
- className: "ttw:grid ttw:grid-cols-2 ttw:gap-x-6",
73
- children: [/* @__PURE__ */ b("div", {
74
- className: "ttw:flex ttw:flex-col ttw:gap-1",
75
- children: [/* @__PURE__ */ y("span", {
76
- className: "ttw:text-sm ttw:text-muted-foreground",
77
- children: U.amountDueHeading
78
- }), /* @__PURE__ */ y("span", {
79
- className: "ttw:text-3xl ttw:font-semibold",
80
- children: D.amountDue
81
- })]
82
- }), /* @__PURE__ */ b("div", {
83
- className: "ttw:flex ttw:flex-col ttw:gap-1",
84
- children: [/* @__PURE__ */ y("span", {
85
- className: "ttw:text-sm ttw:text-muted-foreground",
86
- children: U.amountPaidHeading
87
- }), /* @__PURE__ */ y("span", {
88
- className: "ttw:text-3xl ttw:font-semibold ttw:text-emerald-600",
89
- children: D.amountPaid
90
- })]
91
- })]
92
- }) : /* @__PURE__ */ b("div", {
93
- className: "ttw:flex ttw:flex-col ttw:gap-1",
94
- children: [/* @__PURE__ */ y("span", {
95
- className: "ttw:text-sm ttw:text-muted-foreground",
96
- children: U.amountDueHeading
97
- }), /* @__PURE__ */ y("span", {
98
- className: "ttw:text-3xl ttw:font-semibold",
99
- children: D.amountDue
100
- })]
101
- }),
102
- /* @__PURE__ */ y("div", { children: D.paidOnLabel ? /* @__PURE__ */ y(t, {
103
- variant: "outline",
104
- className: "ttw:border-emerald-200 ttw:bg-emerald-50 ttw:text-emerald-700",
105
- children: D.paidOnLabel
106
- }) : k ? /* @__PURE__ */ y(_, {
107
- summary: k,
108
- date: A
109
- }) : /* @__PURE__ */ y(d, {
110
- status: D.status,
111
- tone: D.statusTone,
112
- labels: G
113
- }) }),
114
- /* @__PURE__ */ b("div", {
115
- className: "ttw:grid ttw:grid-cols-2 ttw:gap-x-6",
116
- children: [/* @__PURE__ */ b("div", {
117
- className: "ttw:flex ttw:flex-col",
118
- children: [/* @__PURE__ */ y("span", {
119
- className: "ttw:text-xs ttw:text-muted-foreground",
120
- children: U.invoiceDateLabel
121
- }), /* @__PURE__ */ y("span", {
122
- className: "ttw:text-sm ttw:font-medium",
123
- children: D.invoiceDateLabel
124
- })]
125
- }), /* @__PURE__ */ b("div", {
126
- className: "ttw:flex ttw:flex-col",
127
- children: [/* @__PURE__ */ y("span", {
128
- className: "ttw:text-xs ttw:text-muted-foreground",
129
- children: U.dueDateLabel
130
- }), /* @__PURE__ */ y("span", {
131
- className: "ttw:text-sm ttw:font-medium",
132
- children: /* @__PURE__ */ y(c, {
133
- label: D.dueDateLabel,
134
- overdueLabel: D.dueDateOverdueLabel,
135
- accessibleLabel: D.dueDateAccessibleLabel
136
- })
137
- })]
138
- })]
139
- }),
140
- D.rejection ? /* @__PURE__ */ y(p, { ...D.rejection }) : null,
141
- M ? /* @__PURE__ */ y(a, {
142
- variant: "caption",
143
- color: "muted",
144
- children: U.approvalOverrideNotice
145
- }) : N ? /* @__PURE__ */ y(a, {
146
- variant: "caption",
147
- color: "muted",
148
- children: N
149
- }) : null,
150
- !k && O.row.length ? /* @__PURE__ */ y("div", {
151
- className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2",
152
- children: /* @__PURE__ */ y(l, { actions: O.row })
153
- }) : null
154
- ]
155
- }),
156
- K?.isOpen ? /* @__PURE__ */ y(r, { labels: U.requiredFieldsLegend }) : null,
157
- P?.editForm ? /* @__PURE__ */ b("div", {
158
- className: "ttw:flex ttw:flex-col ttw:gap-3",
159
- children: [P.editForm, /* @__PURE__ */ y(h, {
160
- summary: D.payTo,
161
- paymentInstructions: K,
162
- detailsWarning: P?.detailsWarning,
163
- labels: W
164
- })]
165
- }) : /* @__PURE__ */ y(h, {
166
- summary: D.payTo,
167
- onEdit: P?.onEdit,
168
- paymentInstructions: K,
169
- detailsWarning: P?.detailsWarning,
170
- labels: W
171
- }),
172
- D.paymentHistory.length || F || I ? /* @__PURE__ */ b("section", {
173
- className: "ttw:flex ttw:flex-col ttw:gap-3",
174
- children: [/* @__PURE__ */ y("h3", {
175
- className: S,
176
- children: U.paymentHistoryHeading
177
- }), F ? /* @__PURE__ */ y("p", {
178
- className: "ttw:text-sm ttw:text-muted-foreground",
179
- children: U.paymentHistoryErrorDescription
180
- }) : I ? /* @__PURE__ */ y(i, { className: "ttw:h-9 ttw:w-full" }) : /* @__PURE__ */ y(m, { records: D.paymentHistory })]
181
- }) : null,
182
- /* @__PURE__ */ b("section", {
183
- className: "ttw:flex ttw:flex-col ttw:gap-3",
184
- children: [/* @__PURE__ */ y("h3", {
185
- className: S,
186
- children: U.invoiceDetailsHeading
187
- }), /* @__PURE__ */ y("dl", {
188
- className: "ttw:flex ttw:flex-col ttw:divide-y ttw:divide-border",
189
- children: D.invoiceFields.map((e) => /* @__PURE__ */ b("div", {
190
- className: T,
191
- children: [/* @__PURE__ */ y("dt", {
192
- className: E,
193
- children: e.label
194
- }), /* @__PURE__ */ y("dd", {
195
- className: "ttw:text-sm ttw:font-medium ttw:text-foreground",
196
- children: e.value
197
- })]
198
- }, e.label))
199
- })]
200
- }),
201
- /* @__PURE__ */ y("section", { children: /* @__PURE__ */ b("table", {
202
- className: "ttw:w-full ttw:text-sm",
203
- children: [/* @__PURE__ */ y("thead", { children: /* @__PURE__ */ b("tr", {
204
- className: "ttw:bg-muted/50 ttw:text-xs ttw:text-muted-foreground",
205
- children: [
206
- /* @__PURE__ */ y("th", {
207
- className: o(w, "ttw:text-left ttw:font-normal"),
208
- children: U.descriptionAndGlCodeColumn
209
- }),
210
- /* @__PURE__ */ y("th", {
211
- className: o(C, "ttw:text-right ttw:font-normal"),
212
- children: U.qtyPriceColumn
213
- }),
214
- /* @__PURE__ */ y("th", {
215
- className: o(C, "ttw:text-right ttw:font-normal"),
216
- children: U.amountColumn
217
- })
218
- ]
219
- }) }), /* @__PURE__ */ b("tbody", { children: [D.lineItems.map((e) => /* @__PURE__ */ b("tr", {
220
- className: "ttw:border-b ttw:border-border",
221
- children: [
222
- /* @__PURE__ */ y("td", {
223
- className: w,
224
- children: /* @__PURE__ */ b("div", {
225
- className: "ttw:flex ttw:flex-col",
226
- children: [/* @__PURE__ */ y("span", { children: e.description }), /* @__PURE__ */ y("span", {
227
- className: "ttw:text-xs ttw:text-muted-foreground",
228
- children: e.glCodeLabel
229
- })]
230
- })
231
- }),
232
- /* @__PURE__ */ y("td", {
233
- className: o(C, "ttw:text-right ttw:whitespace-nowrap ttw:text-muted-foreground"),
234
- children: e.qtyPriceLabel
235
- }),
236
- /* @__PURE__ */ y("td", {
237
- className: o(C, "ttw:text-right ttw:whitespace-nowrap"),
238
- children: e.amount
239
- })
240
- ]
241
- }, e.id)), D.amountRows.map((e) => /* @__PURE__ */ b("tr", {
242
- className: o(e.emphasis ? "ttw:font-semibold" : "ttw:text-muted-foreground"),
243
- children: [/* @__PURE__ */ y("td", {
244
- colSpan: 2,
245
- className: w,
246
- children: e.label
247
- }), /* @__PURE__ */ y("td", {
248
- className: o(C, "ttw:text-right ttw:whitespace-nowrap", e.emphasis && "ttw:text-foreground"),
249
- children: e.value
250
- })]
251
- }, e.label))] })]
252
- }) }),
253
- D.approvalPolicy ? /* @__PURE__ */ y(f, {
254
- view: D.approvalPolicy,
255
- labels: U.approvalPolicy
256
- }) : null,
257
- /* @__PURE__ */ b("section", {
258
- className: "ttw:flex ttw:flex-col ttw:gap-3",
259
- children: [
260
- /* @__PURE__ */ y("h3", {
261
- className: S,
262
- children: U.history.heading
263
- }),
264
- z ? /* @__PURE__ */ y(a, {
265
- variant: "caption",
266
- color: "muted",
267
- children: U.history.namesError
268
- }) : null,
269
- /* @__PURE__ */ y(e, {
270
- rows: D.history,
271
- isLoading: R,
272
- isError: L,
273
- labels: U.history
274
- })
275
- ]
276
- })
277
- ]
278
- });
279
- }
280
- export { D as BillDetailBody, D as default };
2
+ import "./index14.js";
@@ -1,2 +1,20 @@
1
- import "./index14.js";
2
- import "./index15.js";
1
+ import { LABEL_LABELS_EN as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index16.js
3
+ var t = {
4
+ invoiceNumber: "Invoice number",
5
+ invoiceDate: "Invoice date",
6
+ dueDate: "Due date",
7
+ poNumber: "PO number",
8
+ fieldMarkers: e
9
+ };
10
+ function n(e) {
11
+ return {
12
+ ...t,
13
+ ...e,
14
+ fieldMarkers: {
15
+ ...t.fieldMarkers,
16
+ ...e?.fieldMarkers
17
+ }
18
+ };
19
+ }
20
+ export { t as BILL_FORM_FIELDS_LABELS_EN, n as mergeBillFormFieldsLabels };