@tesouro/embedded-components-react 0.4.15 → 0.4.17

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 (125) hide show
  1. package/dist/index.css +39 -2
  2. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +5 -4
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +47 -21
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +22 -77
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js +75 -24
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js +36 -0
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +63 -43
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +2 -2
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +2 -2
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +64 -48
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +2 -1
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +10 -2
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +1 -1
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +141 -118
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +93 -93
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +83 -67
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +235 -218
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +5 -5
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +19 -12
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +1 -0
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +42 -24
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +1 -1
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +1 -1
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +17 -17
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +1 -1
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +1 -1
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +2 -2
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +2 -2
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +39 -39
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +2 -10
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +8 -50
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +52 -2
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index103.js +2 -0
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +1 -0
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +7 -7
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +26 -49
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +19 -306
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +154 -2
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +2 -9
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +60 -45
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +251 -1
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +2 -18
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +7 -48
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +49 -2
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +2 -23
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +15 -337
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +50 -2
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +2 -16
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +21 -118
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +340 -2
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +2 -12
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +10 -97
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +99 -2
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +1 -12
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +11 -57
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +58 -1
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +1 -54
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +52 -10
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +10 -179
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +181 -1
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +2 -4
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +2 -39
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +41 -2
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +2 -7
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +5 -90
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +92 -2
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +2 -4
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +2 -14
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +16 -2
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +1 -87
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +83 -291
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +292 -9
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +13 -1
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +1 -8
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +6 -37
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +39 -2
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +2 -39
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +36 -9
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +10 -199
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +201 -3
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +3 -17
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +15 -345
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +345 -8
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +6 -4
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +7 -91
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +93 -0
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +2 -127
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +122 -25
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +26 -87
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +94 -2
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +2 -7
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +5 -28
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +30 -2
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +2 -7
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +5 -32
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +34 -2
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +2 -12
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +10 -104
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +105 -1
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +2 -17
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +15 -123
  104. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +125 -2
  105. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +2 -18
  106. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +14 -6
  107. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +7 -167
  108. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +170 -2
  109. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +2 -14
  110. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +11 -105
  111. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +108 -2
  112. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index4.js +8 -8
  113. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +4 -4
  114. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index.js +5 -5
  115. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +19 -19
  116. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +39 -33
  117. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/subEntityForms.js +15 -15
  118. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useAddressForm.js +9 -9
  119. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js +7 -7
  120. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +37 -37
  121. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartSelector.js +15 -15
  122. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js +7 -7
  123. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  124. package/package.json +1 -1
  125. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +0 -2
@@ -1,2 +1,59 @@
1
+ import { Typography as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { VendorSummaryCard as t } from "./index27.js";
3
+ import "./index28.js";
4
+ import { VendorSearchCombobox as n } from "./index42.js";
1
5
  import "./index43.js";
2
- import "./index44.js";
6
+ import { VENDOR_SECTION_LABELS_EN as r } from "./index44.js";
7
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
8
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js
9
+ function o(o) {
10
+ let { onEdit: s, onClear: c, error: l, testId: u, labels: d, disabled: f } = o, p = {
11
+ ...r,
12
+ ...d,
13
+ summaryCard: {
14
+ ...r.summaryCard,
15
+ ...d?.summaryCard,
16
+ ach: {
17
+ ...r.summaryCard.ach,
18
+ ...d?.summaryCard?.ach
19
+ }
20
+ },
21
+ search: {
22
+ ...r.search,
23
+ ...d?.search
24
+ }
25
+ };
26
+ return /* @__PURE__ */ a("section", {
27
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
28
+ "data-invalid": l ? !0 : void 0,
29
+ "data-testid": u,
30
+ children: [
31
+ /* @__PURE__ */ i(e, {
32
+ component: "h2",
33
+ variant: "h6",
34
+ className: "ttw:font-semibold",
35
+ children: p.heading
36
+ }),
37
+ o.mode === "resolved" ? /* @__PURE__ */ i(t, {
38
+ summary: o.summary,
39
+ onEdit: s,
40
+ onClear: c,
41
+ paymentInstructions: f ? void 0 : o.paymentInstructions,
42
+ labels: p.summaryCard
43
+ }) : f ? /* @__PURE__ */ i(e, {
44
+ variant: "body2",
45
+ className: "ttw:text-muted-foreground",
46
+ children: p.noVendorPlaceholder
47
+ }) : o.mode === "selecting" ? /* @__PURE__ */ i(n, {
48
+ ...o.search,
49
+ labels: p.search
50
+ }) : o.newVendorForm,
51
+ l ? /* @__PURE__ */ i("p", {
52
+ className: "ttw:text-sm ttw:text-destructive",
53
+ children: l
54
+ }) : null
55
+ ]
56
+ });
57
+ }
58
+ //#endregion
59
+ export { o as VendorSection, o as default };
@@ -1,55 +1,2 @@
1
- import { BILL_DETAIL_BODY_LABELS_EN as e, mergeBillDetailBodyLabels as t } from "./index25.js";
2
- import "./index27.js";
3
- import { BILL_FORM_FIELDS_LABELS_EN as n } from "./index28.js";
4
- import "./index30.js";
5
- import { LINE_ITEMS_SECTION_LABELS_EN as r } from "./index34.js";
6
- import "./index36.js";
7
- import { VENDOR_SECTION_LABELS_EN as i } from "./index43.js";
1
+ import "./index44.js";
8
2
  import "./index45.js";
9
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js
10
- var a = {
11
- closeButton: "Close",
12
- collapseButton: "Exit full screen",
13
- menuTrigger: "More actions",
14
- cancelButton: "Cancel",
15
- saveDraftButton: "Save and close",
16
- finalizeButton: "Finalize",
17
- hiddenDescription: "Enter the details of the bill you want to pay.",
18
- vendorSection: i,
19
- detailsFields: n,
20
- lineItems: r,
21
- detailBody: e
22
- };
23
- function o(e) {
24
- return {
25
- ...a,
26
- ...e,
27
- vendorSection: {
28
- ...a.vendorSection,
29
- ...e?.vendorSection,
30
- summaryCard: {
31
- ...a.vendorSection.summaryCard,
32
- ...e?.vendorSection?.summaryCard,
33
- ach: {
34
- ...a.vendorSection.summaryCard.ach,
35
- ...e?.vendorSection?.summaryCard?.ach
36
- }
37
- },
38
- search: {
39
- ...a.vendorSection.search,
40
- ...e?.vendorSection?.search
41
- }
42
- },
43
- detailsFields: {
44
- ...a.detailsFields,
45
- ...e?.detailsFields
46
- },
47
- lineItems: {
48
- ...a.lineItems,
49
- ...e?.lineItems
50
- },
51
- detailBody: t(e?.detailBody)
52
- };
53
- }
54
- //#endregion
55
- export { a as BILL_CREATE_SCREEN_LABELS_EN, o as mergeBillCreateScreenLabels };
@@ -1,13 +1,55 @@
1
- import { useEffect as e, useRef as t } from "react";
1
+ import { BILL_DETAIL_BODY_LABELS_EN as e, mergeBillDetailBodyLabels as t } from "./index29.js";
2
+ import "./index31.js";
3
+ import { BILL_FORM_FIELDS_LABELS_EN as n } from "./index32.js";
4
+ import "./index34.js";
5
+ import { LINE_ITEMS_SECTION_LABELS_EN as r } from "./index38.js";
6
+ import "./index40.js";
7
+ import { VENDOR_SECTION_LABELS_EN as i } from "./index44.js";
8
+ import "./index46.js";
2
9
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js
3
- function n(n) {
4
- let r = t(null), i = t(n);
5
- return e(() => {
6
- if (n === i.current) return;
7
- i.current = n;
8
- let e = r.current?.querySelector("[aria-invalid=\"true\"], [data-invalid=\"true\"]");
9
- e?.scrollIntoView({ block: "center" }), e?.focus({ preventScroll: !0 });
10
- }, [n]), r;
10
+ var a = {
11
+ closeButton: "Close",
12
+ collapseButton: "Exit full screen",
13
+ menuTrigger: "More actions",
14
+ cancelButton: "Cancel",
15
+ saveDraftButton: "Save and close",
16
+ finalizeButton: "Finalize",
17
+ hiddenDescription: "Enter the details of the bill you want to pay.",
18
+ vendorSection: i,
19
+ detailsFields: n,
20
+ lineItems: r,
21
+ detailBody: e
22
+ };
23
+ function o(e) {
24
+ return {
25
+ ...a,
26
+ ...e,
27
+ vendorSection: {
28
+ ...a.vendorSection,
29
+ ...e?.vendorSection,
30
+ summaryCard: {
31
+ ...a.vendorSection.summaryCard,
32
+ ...e?.vendorSection?.summaryCard,
33
+ ach: {
34
+ ...a.vendorSection.summaryCard.ach,
35
+ ...e?.vendorSection?.summaryCard?.ach
36
+ }
37
+ },
38
+ search: {
39
+ ...a.vendorSection.search,
40
+ ...e?.vendorSection?.search
41
+ }
42
+ },
43
+ detailsFields: {
44
+ ...a.detailsFields,
45
+ ...e?.detailsFields
46
+ },
47
+ lineItems: {
48
+ ...a.lineItems,
49
+ ...e?.lineItems
50
+ },
51
+ detailBody: t(e?.detailBody)
52
+ };
11
53
  }
12
54
  //#endregion
13
- export { n as useFocusFirstInvalidField };
55
+ export { a as BILL_CREATE_SCREEN_LABELS_EN, o as mergeBillCreateScreenLabels };
@@ -1,182 +1,13 @@
1
- import { Button as e, Dialog as t, DialogContent as n, DialogDescription as r, DialogHeader as i, DialogTitle as a, DropdownMenu as o, DropdownMenuContent as s, DropdownMenuGroup as c, DropdownMenuItem as l, DropdownMenuLabel as u, DropdownMenuSeparator as ee, DropdownMenuTrigger as d } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { InlineErrorAlert as f } from "../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
3
- import "../../../shared/ui/dist/index.js";
4
- import { BillDetailBody as te } from "./index26.js";
5
- import "./index27.js";
6
- import { BillFormFields as p } from "./index29.js";
7
- import "./index30.js";
8
- import { groupBySectionHeading as m } from "./index31.js";
9
- import "./index33.js";
10
- import { LineItemsSection as h } from "./index35.js";
11
- import "./index36.js";
12
- import { VendorSection as g } from "./index44.js";
13
- import "./index45.js";
14
- import { mergeBillCreateScreenLabels as _ } from "./index46.js";
15
- import { useFocusFirstInvalidField as v } from "./index47.js";
16
- import { Fragment as y, useId as b } from "react";
17
- import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
18
- import { Minimize2 as w, MoreVertical as ne, X as T } from "lucide-react";
1
+ import { useEffect as e, useRef as t } from "react";
19
2
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js
20
- function E({ open: E, onOpenChange: D, title: O, subtitle: k, notice: A, vendor: j, values: M, errors: N, onChange: P, lineItems: F, documentPanel: I, menuItems: L, readOnly: R, detail: z, isLineItemsLoading: B, isSaving: V, isSavingDraft: H, isFinalizing: U, showFinalize: W = !0, onCancel: G, onCollapse: K, onSaveDraft: q, onFinalize: J, scrollToErrorToken: Y, testId: X, labels: Z }) {
21
- let re = b(), Q = _(Z), $ = !!(R && z), ie = L ? m(L) : [], ae = v(Y);
22
- return /* @__PURE__ */ S(t, {
23
- open: E,
24
- onOpenChange: D,
25
- children: /* @__PURE__ */ C(n, {
26
- showCloseButton: !1,
27
- className: "ttw:flex ttw:h-[calc(100vh-3rem)] ttw:w-[calc(100vw-3rem)] ttw:max-w-[calc(100vw-3rem)] ttw:flex-col ttw:gap-0 ttw:p-0",
28
- "data-testid": X,
29
- children: [
30
- /* @__PURE__ */ C(i, {
31
- className: "ttw:flex ttw:flex-row ttw:items-start ttw:justify-between ttw:border-b ttw:border-border ttw:px-6 ttw:py-4",
32
- children: [/* @__PURE__ */ C("div", {
33
- className: "ttw:flex ttw:flex-col ttw:gap-0.5",
34
- children: [
35
- /* @__PURE__ */ S(a, {
36
- className: "ttw:text-xl ttw:font-semibold",
37
- children: O
38
- }),
39
- k ? /* @__PURE__ */ S("p", {
40
- className: "ttw:text-sm ttw:text-muted-foreground",
41
- children: k
42
- }) : null,
43
- /* @__PURE__ */ S(r, {
44
- className: "ttw:sr-only",
45
- children: Q.hiddenDescription
46
- })
47
- ]
48
- }), /* @__PURE__ */ C("div", {
49
- className: "ttw:flex ttw:items-center ttw:gap-1",
50
- children: [
51
- K ? /* @__PURE__ */ S(e, {
52
- type: "button",
53
- variant: "ghost",
54
- size: "icon",
55
- "aria-label": Q.collapseButton,
56
- disabled: V,
57
- onClick: K,
58
- children: /* @__PURE__ */ S(w, { className: "ttw:size-4" })
59
- }) : null,
60
- L && L.length > 0 ? /* @__PURE__ */ C(o, { children: [/* @__PURE__ */ S(d, {
61
- asChild: !0,
62
- children: /* @__PURE__ */ S(e, {
63
- type: "button",
64
- variant: "ghost",
65
- size: "icon",
66
- "aria-label": Q.menuTrigger,
67
- disabled: V,
68
- children: /* @__PURE__ */ S(ne, { className: "ttw:size-4" })
69
- })
70
- }), /* @__PURE__ */ S(s, {
71
- align: "end",
72
- children: ie.map((e, t) => {
73
- let n = e.items.map((e) => {
74
- let t = e.icon;
75
- return /* @__PURE__ */ C(l, {
76
- variant: e.destructive ? "destructive" : void 0,
77
- disabled: e.disabled,
78
- onSelect: e.onSelect,
79
- children: [t ? /* @__PURE__ */ S(t, { className: "ttw:size-4" }) : null, e.label]
80
- }, e.id);
81
- });
82
- if (!e.heading) return /* @__PURE__ */ S(y, { children: n }, e.items[0]?.id);
83
- let r = `${re}-${t}`;
84
- return /* @__PURE__ */ C(y, { children: [
85
- t > 0 ? /* @__PURE__ */ S(ee, {}) : null,
86
- /* @__PURE__ */ S(u, {
87
- id: r,
88
- className: "ttw:py-1 ttw:text-xs ttw:font-medium ttw:text-muted-foreground",
89
- children: e.heading
90
- }),
91
- /* @__PURE__ */ S(c, {
92
- "aria-labelledby": r,
93
- children: n
94
- })
95
- ] }, e.items[0]?.id);
96
- })
97
- })] }) : null,
98
- /* @__PURE__ */ S(e, {
99
- type: "button",
100
- variant: "ghost",
101
- size: "icon",
102
- "aria-label": Q.closeButton,
103
- disabled: V,
104
- onClick: G,
105
- children: /* @__PURE__ */ S(T, { className: "ttw:size-4" })
106
- })
107
- ]
108
- })]
109
- }),
110
- /* @__PURE__ */ C("div", {
111
- className: "ttw:grid ttw:flex-1 ttw:grid-cols-2 ttw:overflow-hidden",
112
- children: [/* @__PURE__ */ C("div", {
113
- ref: ae,
114
- className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:overflow-y-auto ttw:px-6 ttw:py-6",
115
- children: [
116
- N?.form ? /* @__PURE__ */ S("div", {
117
- "data-invalid": "true",
118
- children: /* @__PURE__ */ S(f, { children: N.form })
119
- }) : null,
120
- A ? /* @__PURE__ */ S("div", {
121
- className: "ttw:flex ttw:flex-col ttw:gap-3",
122
- children: A
123
- }) : null,
124
- $ ? /* @__PURE__ */ S(te, {
125
- ...z,
126
- labels: Q.detailBody
127
- }) : /* @__PURE__ */ C(x, { children: [
128
- /* @__PURE__ */ S(g, {
129
- ...j,
130
- onEdit: R ? void 0 : j.onEdit,
131
- onClear: R ? void 0 : j.onClear,
132
- disabled: R,
133
- labels: Q.vendorSection
134
- }),
135
- /* @__PURE__ */ S(p, {
136
- values: M,
137
- errors: N,
138
- onChange: P,
139
- disabled: R,
140
- labels: Q.detailsFields
141
- }),
142
- /* @__PURE__ */ S(h, {
143
- ...F,
144
- disabled: F.disabled || B || R,
145
- labels: Q.lineItems
146
- })
147
- ] })
148
- ]
149
- }), /* @__PURE__ */ S("div", {
150
- className: "ttw:overflow-y-auto ttw:bg-muted/30 ttw:px-6 ttw:py-6",
151
- children: I
152
- })]
153
- }),
154
- $ ? null : /* @__PURE__ */ C("div", {
155
- className: "ttw:flex ttw:justify-end ttw:gap-2 ttw:border-t ttw:border-border ttw:px-6 ttw:py-4",
156
- children: [/* @__PURE__ */ S(e, {
157
- type: "button",
158
- variant: "ghost",
159
- disabled: V,
160
- onClick: G,
161
- children: R ? Q.closeButton : Q.cancelButton
162
- }), R ? null : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(e, {
163
- type: "button",
164
- variant: W ? "secondary" : "default",
165
- onClick: q,
166
- loading: H,
167
- disabled: V || U || B || j.mode === "creating",
168
- children: Q.saveDraftButton
169
- }), W ? /* @__PURE__ */ S(e, {
170
- type: "button",
171
- onClick: J,
172
- loading: U,
173
- disabled: V || H || B || j.mode === "creating",
174
- children: Q.finalizeButton
175
- }) : null] })]
176
- })
177
- ]
178
- })
179
- });
3
+ function n(n) {
4
+ let r = t(null), i = t(n);
5
+ return e(() => {
6
+ if (n === i.current) return;
7
+ i.current = n;
8
+ let e = r.current?.querySelector("[aria-invalid=\"true\"], [data-invalid=\"true\"]");
9
+ e?.scrollIntoView({ block: "center" }), e?.focus({ preventScroll: !0 });
10
+ }, [n]), r;
180
11
  }
181
12
  //#endregion
182
- export { E as BillCreateScreen, E as default };
13
+ export { n as useFocusFirstInvalidField };
@@ -1,2 +1,182 @@
1
+ import { Button as e, Dialog as t, DialogContent as n, DialogDescription as r, DialogHeader as i, DialogTitle as a, DropdownMenu as o, DropdownMenuContent as s, DropdownMenuGroup as c, DropdownMenuItem as l, DropdownMenuLabel as u, DropdownMenuSeparator as ee, DropdownMenuTrigger as d } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { InlineErrorAlert as f } from "../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
3
+ import "../../../shared/ui/dist/index.js";
4
+ import { BillDetailBody as te } from "./index30.js";
5
+ import "./index31.js";
6
+ import { BillFormFields as p } from "./index33.js";
7
+ import "./index34.js";
8
+ import { groupBySectionHeading as m } from "./index35.js";
9
+ import "./index37.js";
10
+ import { LineItemsSection as h } from "./index39.js";
11
+ import "./index40.js";
12
+ import { VendorSection as g } from "./index45.js";
1
13
  import "./index46.js";
2
- import "./index48.js";
14
+ import { mergeBillCreateScreenLabels as _ } from "./index47.js";
15
+ import { useFocusFirstInvalidField as v } from "./index48.js";
16
+ import { Fragment as y, useId as b } from "react";
17
+ import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
18
+ import { Minimize2 as w, MoreVertical as ne, X as T } from "lucide-react";
19
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js
20
+ function E({ open: E, onOpenChange: D, title: O, subtitle: k, notice: A, vendor: j, values: M, errors: N, onChange: P, lineItems: F, documentPanel: I, menuItems: L, readOnly: R, detail: z, isLineItemsLoading: B, isSaving: V, isSavingDraft: H, isFinalizing: U, showFinalize: W = !0, onCancel: G, onCollapse: K, onSaveDraft: q, onFinalize: J, scrollToErrorToken: Y, testId: X, labels: Z }) {
21
+ let re = b(), Q = _(Z), $ = !!(R && z), ie = L ? m(L) : [], ae = v(Y);
22
+ return /* @__PURE__ */ S(t, {
23
+ open: E,
24
+ onOpenChange: D,
25
+ children: /* @__PURE__ */ C(n, {
26
+ showCloseButton: !1,
27
+ className: "ttw:flex ttw:h-[calc(100vh-3rem)] ttw:w-[calc(100vw-3rem)] ttw:max-w-[calc(100vw-3rem)] ttw:flex-col ttw:gap-0 ttw:p-0",
28
+ "data-testid": X,
29
+ children: [
30
+ /* @__PURE__ */ C(i, {
31
+ className: "ttw:flex ttw:flex-row ttw:items-start ttw:justify-between ttw:border-b ttw:border-border ttw:px-6 ttw:py-4",
32
+ children: [/* @__PURE__ */ C("div", {
33
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
34
+ children: [
35
+ /* @__PURE__ */ S(a, {
36
+ className: "ttw:text-xl ttw:font-semibold",
37
+ children: O
38
+ }),
39
+ k ? /* @__PURE__ */ S("p", {
40
+ className: "ttw:text-sm ttw:text-muted-foreground",
41
+ children: k
42
+ }) : null,
43
+ /* @__PURE__ */ S(r, {
44
+ className: "ttw:sr-only",
45
+ children: Q.hiddenDescription
46
+ })
47
+ ]
48
+ }), /* @__PURE__ */ C("div", {
49
+ className: "ttw:flex ttw:items-center ttw:gap-1",
50
+ children: [
51
+ K ? /* @__PURE__ */ S(e, {
52
+ type: "button",
53
+ variant: "ghost",
54
+ size: "icon",
55
+ "aria-label": Q.collapseButton,
56
+ disabled: V,
57
+ onClick: K,
58
+ children: /* @__PURE__ */ S(w, { className: "ttw:size-4" })
59
+ }) : null,
60
+ L && L.length > 0 ? /* @__PURE__ */ C(o, { children: [/* @__PURE__ */ S(d, {
61
+ asChild: !0,
62
+ children: /* @__PURE__ */ S(e, {
63
+ type: "button",
64
+ variant: "ghost",
65
+ size: "icon",
66
+ "aria-label": Q.menuTrigger,
67
+ disabled: V,
68
+ children: /* @__PURE__ */ S(ne, { className: "ttw:size-4" })
69
+ })
70
+ }), /* @__PURE__ */ S(s, {
71
+ align: "end",
72
+ children: ie.map((e, t) => {
73
+ let n = e.items.map((e) => {
74
+ let t = e.icon;
75
+ return /* @__PURE__ */ C(l, {
76
+ variant: e.destructive ? "destructive" : void 0,
77
+ disabled: e.disabled,
78
+ onSelect: e.onSelect,
79
+ children: [t ? /* @__PURE__ */ S(t, { className: "ttw:size-4" }) : null, e.label]
80
+ }, e.id);
81
+ });
82
+ if (!e.heading) return /* @__PURE__ */ S(y, { children: n }, e.items[0]?.id);
83
+ let r = `${re}-${t}`;
84
+ return /* @__PURE__ */ C(y, { children: [
85
+ t > 0 ? /* @__PURE__ */ S(ee, {}) : null,
86
+ /* @__PURE__ */ S(u, {
87
+ id: r,
88
+ className: "ttw:py-1 ttw:text-xs ttw:font-medium ttw:text-muted-foreground",
89
+ children: e.heading
90
+ }),
91
+ /* @__PURE__ */ S(c, {
92
+ "aria-labelledby": r,
93
+ children: n
94
+ })
95
+ ] }, e.items[0]?.id);
96
+ })
97
+ })] }) : null,
98
+ /* @__PURE__ */ S(e, {
99
+ type: "button",
100
+ variant: "ghost",
101
+ size: "icon",
102
+ "aria-label": Q.closeButton,
103
+ disabled: V,
104
+ onClick: G,
105
+ children: /* @__PURE__ */ S(T, { className: "ttw:size-4" })
106
+ })
107
+ ]
108
+ })]
109
+ }),
110
+ /* @__PURE__ */ C("div", {
111
+ className: "ttw:grid ttw:flex-1 ttw:grid-cols-2 ttw:overflow-hidden",
112
+ children: [/* @__PURE__ */ C("div", {
113
+ ref: ae,
114
+ className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:overflow-y-auto ttw:px-6 ttw:py-6",
115
+ children: [
116
+ N?.form ? /* @__PURE__ */ S("div", {
117
+ "data-invalid": "true",
118
+ children: /* @__PURE__ */ S(f, { children: N.form })
119
+ }) : null,
120
+ A ? /* @__PURE__ */ S("div", {
121
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
122
+ children: A
123
+ }) : null,
124
+ $ ? /* @__PURE__ */ S(te, {
125
+ ...z,
126
+ labels: Q.detailBody
127
+ }) : /* @__PURE__ */ C(x, { children: [
128
+ /* @__PURE__ */ S(g, {
129
+ ...j,
130
+ onEdit: R ? void 0 : j.onEdit,
131
+ onClear: R ? void 0 : j.onClear,
132
+ disabled: R,
133
+ labels: Q.vendorSection
134
+ }),
135
+ /* @__PURE__ */ S(p, {
136
+ values: M,
137
+ errors: N,
138
+ onChange: P,
139
+ disabled: R,
140
+ labels: Q.detailsFields
141
+ }),
142
+ /* @__PURE__ */ S(h, {
143
+ ...F,
144
+ disabled: F.disabled || B || R,
145
+ labels: Q.lineItems
146
+ })
147
+ ] })
148
+ ]
149
+ }), /* @__PURE__ */ S("div", {
150
+ className: "ttw:overflow-y-auto ttw:bg-muted/30 ttw:px-6 ttw:py-6",
151
+ children: I
152
+ })]
153
+ }),
154
+ $ ? null : /* @__PURE__ */ C("div", {
155
+ className: "ttw:flex ttw:justify-end ttw:gap-2 ttw:border-t ttw:border-border ttw:px-6 ttw:py-4",
156
+ children: [/* @__PURE__ */ S(e, {
157
+ type: "button",
158
+ variant: "ghost",
159
+ disabled: V,
160
+ onClick: G,
161
+ children: R ? Q.closeButton : Q.cancelButton
162
+ }), R ? null : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(e, {
163
+ type: "button",
164
+ variant: W ? "secondary" : "default",
165
+ onClick: q,
166
+ loading: H,
167
+ disabled: V || U || B || j.mode === "creating",
168
+ children: Q.saveDraftButton
169
+ }), W ? /* @__PURE__ */ S(e, {
170
+ type: "button",
171
+ onClick: J,
172
+ loading: U,
173
+ disabled: V || H || B || j.mode === "creating",
174
+ children: Q.finalizeButton
175
+ }) : null] })]
176
+ })
177
+ ]
178
+ })
179
+ });
180
+ }
181
+ //#endregion
182
+ export { E as BillCreateScreen, E as default };
@@ -1,4 +1,2 @@
1
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js
2
- var e = { description: "Review, approve, and pay your bills." };
3
- //#endregion
4
- export { e as DEFAULT_LABELS };
1
+ import "./index47.js";
2
+ import "./index49.js";
@@ -1,41 +1,4 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import { Tabs as e, TabsContent as t, TabsList as n, TabsTrigger as r } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
- import { DEFAULT_LABELS as i } from "./index50.js";
7
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
8
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js
9
- function s({ labels: s, tabs: c, selectedTabId: l, onTabChange: u }) {
10
- let d = {
11
- ...i,
12
- ...s
13
- };
14
- return /* @__PURE__ */ o("section", {
15
- className: "ttw:w-full ttw:space-y-5",
16
- children: [/* @__PURE__ */ a("div", {
17
- className: "ttw:min-w-0",
18
- children: /* @__PURE__ */ a("p", {
19
- className: "ttw:text-sm ttw:text-muted-foreground",
20
- children: d.description
21
- })
22
- }), /* @__PURE__ */ o(e, {
23
- value: l,
24
- onValueChange: u,
25
- className: "ttw:w-full",
26
- children: [/* @__PURE__ */ a(n, {
27
- variant: "line",
28
- children: c.map((e) => /* @__PURE__ */ a(r, {
29
- value: e.id,
30
- children: e.label
31
- }, e.id))
32
- }), c.map((e) => /* @__PURE__ */ a(t, {
33
- value: e.id,
34
- className: "ttw:mt-6",
35
- children: e.content
36
- }, e.id))]
37
- })]
38
- });
39
- }
2
+ var e = { description: "Review, approve, and pay your bills." };
40
3
  //#endregion
41
- export { s as BillPayWidgetUi };
4
+ export { e as DEFAULT_LABELS };
@@ -1,2 +1,41 @@
1
- import "./index50.js";
2
- import "./index51.js";
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { Tabs as e, TabsContent as t, TabsList as n, TabsTrigger as r } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { DEFAULT_LABELS as i } from "./index51.js";
7
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
8
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js
9
+ function s({ labels: s, tabs: c, selectedTabId: l, onTabChange: u }) {
10
+ let d = {
11
+ ...i,
12
+ ...s
13
+ };
14
+ return /* @__PURE__ */ o("section", {
15
+ className: "ttw:w-full ttw:space-y-5",
16
+ children: [/* @__PURE__ */ a("div", {
17
+ className: "ttw:min-w-0",
18
+ children: /* @__PURE__ */ a("p", {
19
+ className: "ttw:text-sm ttw:text-muted-foreground",
20
+ children: d.description
21
+ })
22
+ }), /* @__PURE__ */ o(e, {
23
+ value: l,
24
+ onValueChange: u,
25
+ className: "ttw:w-full",
26
+ children: [/* @__PURE__ */ a(n, {
27
+ variant: "line",
28
+ children: c.map((e) => /* @__PURE__ */ a(r, {
29
+ value: e.id,
30
+ children: e.label
31
+ }, e.id))
32
+ }), c.map((e) => /* @__PURE__ */ a(t, {
33
+ value: e.id,
34
+ className: "ttw:mt-6",
35
+ children: e.content
36
+ }, e.id))]
37
+ })]
38
+ });
39
+ }
40
+ //#endregion
41
+ export { s as BillPayWidgetUi };
@@ -1,7 +1,2 @@
1
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js
2
- var e = {
3
- cancelButton: "Cancel",
4
- orConnector: "or"
5
- };
6
- //#endregion
7
- export { e as BILL_DECISION_DIALOG_LABELS_EN };
1
+ import "./index51.js";
2
+ import "./index52.js";