@tesouro/embedded-components-react 0.3.9 → 0.3.12

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 (69) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/lib/BillPayWidget.js +1 -1
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +8 -8
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +13 -14
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +7 -46
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +54 -16
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +24 -52
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +61 -113
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +123 -13
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +11 -31
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +40 -50
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +51 -5
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +5 -72
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +71 -48
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +48 -79
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +91 -33
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +33 -137
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +138 -67
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +63 -200
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +194 -184
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +180 -50
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +64 -12
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +12 -46
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +46 -30
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +26 -158
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +159 -31
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +32 -98
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +102 -13
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +13 -241
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +244 -4
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +4 -29
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +28 -81
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +77 -130
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +145 -3
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +3 -4
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +2 -43
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +45 -1
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +1 -8
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +6 -9
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +9 -92
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +94 -3
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +3 -9
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +7 -20
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +14 -51
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +59 -3
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +3 -110
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +107 -8
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +8 -40
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +38 -15
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +18 -98
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +92 -173
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +180 -4
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +5 -8
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +6 -112
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +114 -1
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +0 -24
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +25 -0
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +56 -18
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +4 -1
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +75 -46
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +3 -2
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +120 -115
  63. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index7.js +45 -44
  64. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +846 -817
  65. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/scopes.js +1 -0
  66. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  67. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +1 -1
  68. package/dist/packages/shared-ui-shadcn/dist/index.js +1998 -1935
  69. package/package.json +1 -1
@@ -1,114 +1,8 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
6
- import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
7
- import "../../../shared/data-access/dist/index.js";
8
- import { EmbeddedToaster as n } from "../../../shared/ui/dist/lib/EmbeddedToaster.js";
9
- import "../../../shared/ui/dist/index.js";
10
- import { useAnalyticsTrack as r } from "../../../shared/feature/dist/lib/analytics/hooks.js";
11
- import { WidgetProvider as i } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
12
- import { useWidgetConfig as a } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
13
- import "../../../shared/feature/dist/index.js";
14
- import { BillPayWidgetUi as o } from "../../ui/dist/index44.js";
15
- import { BillUploadStatusTray as s } from "../../ui/dist/index63.js";
16
- import "../../ui/dist/index.js";
17
- import { ApprovalPoliciesSettings as c } from "../../../shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js";
18
- import "../../../shared/approval-policy/feature/dist/index.js";
19
- import { useBillUploadQueue as l } from "./index50.js";
20
- import "./index51.js";
21
- import { billsTabTestIds as u } from "./index59.js";
22
- import { BillsTab as d } from "./index61.js";
23
- import "./index62.js";
24
- import { BillPayWidgetAnalyticsEvent as f, WIDGET_NAME as p } from "./index45.js";
25
- import { DEFAULT_TABS_LABELS as m } from "./index63.js";
26
- import { CounterpartsWidget as h } from "../../../counterparts-widget/feature/dist/index8.js";
27
- import "../../../counterparts-widget/feature/dist/index.js";
28
- import { useCallback as g, useEffect as _, useState as v } from "react";
29
- import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
30
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js
31
- var S = {
32
- Bills: "bills",
33
- Vendors: "vendors",
34
- Settings: "settings"
35
- }, C = [
36
- S.Bills,
37
- S.Vendors,
38
- S.Settings
39
- ];
40
- function w({ labels: i, tabsLabels: p, approvalPolicyLabels: w, approvalPolicyComponentLabels: T, vendorLabels: E, poweredByBankName: D }) {
41
- let O = r();
42
- _(() => {
43
- O(f.Mounted);
44
- }, [O]);
45
- let k = {
46
- ...m,
47
- ...p
48
- }, { initResponse: A } = a(), j = e(A?.scopes, [t.ApprovalPolicyWriteOrg]), M = !A || j, [N, P] = v(S.Bills), [F, I] = v(), L = g((e) => {
49
- P(S.Bills), I(e);
50
- }, []), R = l({ onOpenBill: L }), z = [{
51
- id: S.Bills,
52
- label: k.bills,
53
- content: /* @__PURE__ */ b(d, {
54
- onEnqueueFiles: R.enqueue,
55
- openPayableId: F,
56
- onOpenPayableHandled: () => I(void 0),
57
- poweredByBankName: D
58
- })
59
- }, {
60
- id: S.Vendors,
61
- label: k.vendors,
62
- content: /* @__PURE__ */ b(h, {
63
- ...E,
64
- counterpartType: "vendor",
65
- onViewAllDocuments: () => P(S.Bills)
66
- })
67
- }];
68
- M && z.push({
69
- id: S.Settings,
70
- label: k.settings,
71
- content: /* @__PURE__ */ b(c, {
72
- labels: w,
73
- componentLabels: T
74
- })
75
- });
76
- let B = z.some((e) => e.id === N) ? N : C.find((e) => z.some((t) => t.id === e)) ?? z[0]?.id ?? "";
77
- return /* @__PURE__ */ x(y, { children: [
78
- /* @__PURE__ */ b(n, {}),
79
- /* @__PURE__ */ b(o, {
80
- labels: i,
81
- tabs: z,
82
- selectedTabId: B,
83
- onTabChange: P
84
- }),
85
- R.isVisible ? /* @__PURE__ */ b(s, {
86
- sections: R.sections,
87
- summaryLabel: R.summaryLabel,
88
- collapsed: R.collapsed,
89
- onToggleCollapsed: R.onToggleCollapsed,
90
- onClose: R.onClose,
91
- testId: u.uploadTray
92
- }) : null
93
- ] });
94
- }
95
- function T({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: l, onError: u, analytics: d, disclosuresAcceptance: f, ...m }) {
96
- return /* @__PURE__ */ b(i, {
97
- widgetName: p,
98
- baseUrl: e,
99
- widgetToken: t,
100
- organizationId: n,
101
- configClient: r,
102
- gatewayRouting: a,
103
- linkComponent: o,
104
- implementation: s,
105
- uiFramework: c,
106
- errorFallback: l,
107
- onError: u,
108
- analytics: d,
109
- disclosuresAcceptance: f,
110
- children: /* @__PURE__ */ b(w, { ...m })
111
- });
112
- }
2
+ var e = {
3
+ bills: "Bills",
4
+ vendors: "Vendors",
5
+ settings: "Settings"
6
+ };
113
7
  //#endregion
114
- export { T as BillPayWidgetNative, T as default };
8
+ export { e as DEFAULT_TABS_LABELS };
@@ -1 +1,114 @@
1
- import "./index64.js";
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
6
+ import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
7
+ import "../../../shared/data-access/dist/index.js";
8
+ import { EmbeddedToaster as n } from "../../../shared/ui/dist/lib/EmbeddedToaster.js";
9
+ import "../../../shared/ui/dist/index.js";
10
+ import { useAnalyticsTrack as r } from "../../../shared/feature/dist/lib/analytics/hooks.js";
11
+ import { WidgetProvider as i } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
12
+ import { useWidgetConfig as a } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
13
+ import "../../../shared/feature/dist/index.js";
14
+ import { BillPayWidgetUi as o } from "../../ui/dist/index44.js";
15
+ import { BillUploadStatusTray as s } from "../../ui/dist/index63.js";
16
+ import "../../ui/dist/index.js";
17
+ import { ApprovalPoliciesSettings as c } from "../../../shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js";
18
+ import "../../../shared/approval-policy/feature/dist/index.js";
19
+ import { useBillUploadQueue as l } from "./index51.js";
20
+ import "./index52.js";
21
+ import { billsTabTestIds as u } from "./index60.js";
22
+ import { BillsTab as d } from "./index62.js";
23
+ import "./index63.js";
24
+ import { BillPayWidgetAnalyticsEvent as f, WIDGET_NAME as p } from "./index46.js";
25
+ import { DEFAULT_TABS_LABELS as m } from "./index64.js";
26
+ import { CounterpartsWidget as h } from "../../../counterparts-widget/feature/dist/index8.js";
27
+ import "../../../counterparts-widget/feature/dist/index.js";
28
+ import { useCallback as g, useEffect as _, useState as v } from "react";
29
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
30
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js
31
+ var S = {
32
+ Bills: "bills",
33
+ Vendors: "vendors",
34
+ Settings: "settings"
35
+ }, C = [
36
+ S.Bills,
37
+ S.Vendors,
38
+ S.Settings
39
+ ];
40
+ function w({ labels: i, tabsLabels: p, approvalPolicyLabels: w, approvalPolicyComponentLabels: T, vendorLabels: E, poweredByBankName: D }) {
41
+ let O = r();
42
+ _(() => {
43
+ O(f.Mounted);
44
+ }, [O]);
45
+ let k = {
46
+ ...m,
47
+ ...p
48
+ }, { initResponse: A } = a(), j = e(A?.scopes, [t.ApprovalPolicyWriteOrg]), M = !A || j, [N, P] = v(S.Bills), [F, I] = v(), L = g((e) => {
49
+ P(S.Bills), I(e);
50
+ }, []), R = l({ onOpenBill: L }), z = [{
51
+ id: S.Bills,
52
+ label: k.bills,
53
+ content: /* @__PURE__ */ b(d, {
54
+ onEnqueueFiles: R.enqueue,
55
+ openPayableId: F,
56
+ onOpenPayableHandled: () => I(void 0),
57
+ poweredByBankName: D
58
+ })
59
+ }, {
60
+ id: S.Vendors,
61
+ label: k.vendors,
62
+ content: /* @__PURE__ */ b(h, {
63
+ ...E,
64
+ counterpartType: "vendor",
65
+ onViewAllDocuments: () => P(S.Bills)
66
+ })
67
+ }];
68
+ M && z.push({
69
+ id: S.Settings,
70
+ label: k.settings,
71
+ content: /* @__PURE__ */ b(c, {
72
+ labels: w,
73
+ componentLabels: T
74
+ })
75
+ });
76
+ let B = z.some((e) => e.id === N) ? N : C.find((e) => z.some((t) => t.id === e)) ?? z[0]?.id ?? "";
77
+ return /* @__PURE__ */ x(y, { children: [
78
+ /* @__PURE__ */ b(n, {}),
79
+ /* @__PURE__ */ b(o, {
80
+ labels: i,
81
+ tabs: z,
82
+ selectedTabId: B,
83
+ onTabChange: P
84
+ }),
85
+ R.isVisible ? /* @__PURE__ */ b(s, {
86
+ sections: R.sections,
87
+ summaryLabel: R.summaryLabel,
88
+ collapsed: R.collapsed,
89
+ onToggleCollapsed: R.onToggleCollapsed,
90
+ onClose: R.onClose,
91
+ testId: u.uploadTray
92
+ }) : null
93
+ ] });
94
+ }
95
+ function T({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: l, onError: u, analytics: d, disclosuresAcceptance: f, ...m }) {
96
+ return /* @__PURE__ */ b(i, {
97
+ widgetName: p,
98
+ baseUrl: e,
99
+ widgetToken: t,
100
+ organizationId: n,
101
+ configClient: r,
102
+ gatewayRouting: a,
103
+ linkComponent: o,
104
+ implementation: s,
105
+ uiFramework: c,
106
+ errorFallback: l,
107
+ onError: u,
108
+ analytics: d,
109
+ disclosuresAcceptance: f,
110
+ children: /* @__PURE__ */ b(w, { ...m })
111
+ });
112
+ }
113
+ //#endregion
114
+ export { T as BillPayWidgetNative, T as default };
@@ -1,25 +1 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import { Implementation as e } from "../../../shared/feature/dist/lib/WidgetProvider/types.js";
6
- import { useWidgetConfig as t } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
7
- import "../../../shared/feature/dist/index.js";
8
- import { BillPayWidgetMonite as n } from "./index46.js";
9
- import "./index47.js";
10
- import { BillPayWidgetNative as r } from "./index64.js";
11
1
  import "./index65.js";
12
- import { jsx as i } from "react/jsx-runtime";
13
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js
14
- function a({ implementation: a, ...o }) {
15
- let s = t().implementation, c = a ?? s ?? e.Monite;
16
- return c === e.Native ? /* @__PURE__ */ i(r, {
17
- implementation: c,
18
- ...o
19
- }) : /* @__PURE__ */ i(n, {
20
- implementation: c,
21
- ...o
22
- });
23
- }
24
- //#endregion
25
- export { a as BillPayWidget, a as default };
@@ -0,0 +1,25 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { Implementation as e } from "../../../shared/feature/dist/lib/WidgetProvider/types.js";
6
+ import { useWidgetConfig as t } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
7
+ import "../../../shared/feature/dist/index.js";
8
+ import { BillPayWidgetMonite as n } from "./index47.js";
9
+ import "./index48.js";
10
+ import { BillPayWidgetNative as r } from "./index65.js";
11
+ import "./index66.js";
12
+ import { jsx as i } from "react/jsx-runtime";
13
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js
14
+ function a({ implementation: a, ...o }) {
15
+ let s = t().implementation, c = a ?? s ?? e.Monite;
16
+ return c === e.Native ? /* @__PURE__ */ i(r, {
17
+ implementation: c,
18
+ ...o
19
+ }) : /* @__PURE__ */ i(n, {
20
+ implementation: c,
21
+ ...o
22
+ });
23
+ }
24
+ //#endregion
25
+ export { a as BillPayWidget, a as default };
@@ -1,26 +1,64 @@
1
- import { Button as e, DropdownMenu as t, DropdownMenuContent as n, DropdownMenuItem as r, DropdownMenuTrigger as i } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
3
- import { MoreVerticalIcon as s } from "lucide-react";
1
+ import { Button as e, DropdownMenu as t, DropdownMenuContent as n, DropdownMenuGroup as r, DropdownMenuItem as i, DropdownMenuLabel as a, DropdownMenuSeparator as o, DropdownMenuTrigger as s } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { Fragment as c, useId as l } from "react";
3
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
4
+ import { MoreHorizontalIcon as f, MoreVerticalIcon as p } from "lucide-react";
4
5
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js
5
- function c({ actions: c, triggerLabel: l, testId: u }) {
6
- return c.length ? /* @__PURE__ */ o(t, { children: [/* @__PURE__ */ a(i, {
6
+ function m({ actions: m, triggerLabel: g, placement: _ = "row", testId: v }) {
7
+ let y = l();
8
+ if (!m.length) return null;
9
+ let b = _ === "header", x = b ? f : p, S = h(m);
10
+ return /* @__PURE__ */ d(t, { children: [/* @__PURE__ */ u(s, {
7
11
  asChild: !0,
8
- children: /* @__PURE__ */ a(e, {
12
+ children: /* @__PURE__ */ u(e, {
9
13
  type: "button",
10
- variant: "outline",
14
+ variant: b ? "ghost" : "outline",
11
15
  size: "icon",
12
- "aria-label": l,
13
- "data-testid": u,
14
- children: /* @__PURE__ */ a(s, { className: "ttw:size-4" })
16
+ "aria-label": g,
17
+ "data-testid": v,
18
+ children: /* @__PURE__ */ u(x, { className: "ttw:size-4" })
15
19
  })
16
- }), /* @__PURE__ */ a(n, {
20
+ }), /* @__PURE__ */ u(n, {
17
21
  align: "end",
18
- children: c.map((e) => /* @__PURE__ */ a(r, {
19
- disabled: e.disabled,
20
- onClick: e.onSelect,
21
- children: e.label
22
- }, e.id))
23
- })] }) : null;
22
+ children: S.map((e, t) => {
23
+ let n = e.actions.map((e) => {
24
+ let t = e.icon;
25
+ return /* @__PURE__ */ d(i, {
26
+ disabled: e.disabled,
27
+ onClick: e.onSelect,
28
+ children: [t ? /* @__PURE__ */ u(t, { className: "ttw:size-4" }) : null, e.label]
29
+ }, e.id);
30
+ });
31
+ if (!e.heading) return /* @__PURE__ */ u(c, { children: n }, e.actions[0]?.id);
32
+ let s = `${y}-${t}`;
33
+ return /* @__PURE__ */ d(c, { children: [
34
+ t > 0 ? /* @__PURE__ */ u(o, {}) : null,
35
+ /* @__PURE__ */ u(a, {
36
+ id: s,
37
+ className: "ttw:py-1 ttw:text-xs ttw:font-medium ttw:text-muted-foreground",
38
+ children: e.heading
39
+ }),
40
+ /* @__PURE__ */ u(r, {
41
+ "aria-labelledby": s,
42
+ children: n
43
+ })
44
+ ] }, e.actions[0]?.id);
45
+ })
46
+ })] });
47
+ }
48
+ function h(e) {
49
+ let t = [];
50
+ for (let n of e) {
51
+ let e = t.at(-1);
52
+ if (e && e.heading === n.sectionHeading) {
53
+ e.actions = [...e.actions, n];
54
+ continue;
55
+ }
56
+ t.push({
57
+ heading: n.sectionHeading,
58
+ actions: [n]
59
+ });
60
+ }
61
+ return t;
24
62
  }
25
63
  //#endregion
26
- export { c as BillOverflowMenu, c as default };
64
+ export { m as BillOverflowMenu, m as default };
@@ -1,4 +1,7 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js
2
- var e = { cancelButton: "Back" };
2
+ var e = {
3
+ cancelButton: "Cancel",
4
+ orConnector: "or"
5
+ };
3
6
  //#endregion
4
7
  export { e as BILL_DECISION_DIALOG_LABELS_EN };
@@ -1,63 +1,92 @@
1
1
  import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o, Label as s, Textarea as c } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
2
  import { BILL_DECISION_DIALOG_LABELS_EN as l } from "./index46.js";
3
- import { useEffect as u, useState as d } from "react";
4
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
3
+ import { Fragment as u, useEffect as d, useState as f } from "react";
4
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
5
5
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js
6
- function m({ open: m, copy: h, onConfirm: g, onCancel: _, isPending: v, labels: y, testId: b, confirmTestId: x, reasonTestId: S, reasonFieldId: C = "bill-decision-reason" }) {
7
- let w = {
6
+ function h({ open: h, copy: g, onConfirm: _, onCancel: v, isPending: y, labels: b, testId: x, confirmTestId: S, reasonTestId: C, reasonFieldId: w = "bill-decision-reason" }) {
7
+ let T = {
8
8
  ...l,
9
- ...y
10
- }, [T, E] = d("");
11
- return u(() => {
12
- m || E("");
13
- }, [m]), h ? /* @__PURE__ */ f(e, {
14
- open: m,
9
+ ...b
10
+ }, [E, D] = f("");
11
+ if (d(() => {
12
+ h || D("");
13
+ }, [h]), !g) return null;
14
+ let { alignment: O = "start", icon: k, tone: A = "default", actionWidth: j = "auto" } = g.presentation ?? {}, M = O === "center", N = j === "equal", P = g.pendingApprovers ?? [];
15
+ return /* @__PURE__ */ p(e, {
16
+ open: h,
15
17
  onOpenChange: (e) => {
16
- e || _();
18
+ e || v();
17
19
  },
18
- children: /* @__PURE__ */ p(t, {
19
- "data-testid": b,
20
+ children: /* @__PURE__ */ m(t, {
21
+ "data-testid": x,
20
22
  children: [
21
- /* @__PURE__ */ p(i, { children: [/* @__PURE__ */ f(a, { children: h.title }), /* @__PURE__ */ f(n, { children: h.description })] }),
22
- h.warning ? /* @__PURE__ */ f("p", {
23
- className: "ttw:rounded-md ttw:border ttw:border-border ttw:bg-muted ttw:p-3 ttw:text-sm ttw:text-foreground",
24
- children: h.warning
23
+ /* @__PURE__ */ m(i, {
24
+ className: M ? "ttw:items-center ttw:sm:text-center" : void 0,
25
+ children: [
26
+ k ? /* @__PURE__ */ p("span", {
27
+ className: A === "destructive" ? "ttw:flex ttw:size-11 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-destructive" : "ttw:flex ttw:size-11 ttw:items-center ttw:justify-center ttw:rounded-full ttw:bg-muted",
28
+ children: /* @__PURE__ */ p(k, { className: A === "destructive" ? "ttw:size-4 ttw:text-white" : "ttw:size-4 ttw:text-foreground" })
29
+ }) : null,
30
+ /* @__PURE__ */ p(a, { children: g.title }),
31
+ /* @__PURE__ */ p(n, { children: g.description })
32
+ ]
33
+ }),
34
+ P.length > 0 ? /* @__PURE__ */ p("div", {
35
+ className: "ttw:flex ttw:flex-col ttw:items-center ttw:gap-1 ttw:rounded-md ttw:bg-muted ttw:px-3 ttw:py-3",
36
+ children: /* @__PURE__ */ p("ul", {
37
+ className: "ttw:flex ttw:flex-col ttw:items-center ttw:gap-1",
38
+ children: P.map((e) => /* @__PURE__ */ p("li", {
39
+ className: "ttw:list-disc ttw:text-sm ttw:text-foreground",
40
+ children: e.names.map((e, t) => /* @__PURE__ */ m(u, { children: [t > 0 ? /* @__PURE__ */ p("span", {
41
+ className: "ttw:text-muted-foreground",
42
+ children: ` ${T.orConnector} `
43
+ }) : null, /* @__PURE__ */ p("span", {
44
+ className: "ttw:font-medium",
45
+ children: e
46
+ })] }, e))
47
+ }, e.id))
48
+ })
25
49
  }) : null,
26
- h.reason ? /* @__PURE__ */ p("div", {
50
+ g.reason ? /* @__PURE__ */ m("div", {
27
51
  className: "ttw:flex ttw:flex-col ttw:gap-2",
28
- children: [/* @__PURE__ */ p(s, {
29
- htmlFor: C,
30
- children: [h.reason.label, /* @__PURE__ */ f("span", {
52
+ children: [/* @__PURE__ */ m(s, {
53
+ htmlFor: w,
54
+ children: [g.reason.label, /* @__PURE__ */ p("span", {
31
55
  className: "ttw:ml-1 ttw:text-muted-foreground",
32
- children: h.reason.optionalHint
56
+ children: g.reason.optionalHint
33
57
  })]
34
- }), /* @__PURE__ */ f(c, {
35
- id: C,
36
- value: T,
37
- placeholder: h.reason.placeholder,
38
- onChange: (e) => E(e.target.value),
39
- disabled: v,
40
- "data-testid": S
58
+ }), /* @__PURE__ */ p(c, {
59
+ id: w,
60
+ value: E,
61
+ placeholder: g.reason.placeholder,
62
+ onChange: (e) => D(e.target.value),
63
+ disabled: y,
64
+ "data-testid": C
41
65
  })]
42
66
  }) : null,
43
- /* @__PURE__ */ p(r, { children: [/* @__PURE__ */ f(o, {
44
- type: "button",
45
- variant: "outline",
46
- onClick: _,
47
- disabled: v,
48
- children: w.cancelButton
49
- }), /* @__PURE__ */ f(o, {
50
- type: "button",
51
- variant: "default",
52
- loading: v,
53
- disabled: v,
54
- onClick: () => g(h.reason ? T.trim() : void 0),
55
- "data-testid": x,
56
- children: h.confirmButton
57
- })] })
67
+ /* @__PURE__ */ m(r, {
68
+ className: M ? "ttw:sm:justify-center" : void 0,
69
+ children: [/* @__PURE__ */ p(o, {
70
+ type: "button",
71
+ variant: "outline",
72
+ onClick: v,
73
+ disabled: y,
74
+ className: N ? "ttw:flex-1" : void 0,
75
+ children: T.cancelButton
76
+ }), /* @__PURE__ */ p(o, {
77
+ type: "button",
78
+ variant: A === "destructive" ? "destructive" : "default",
79
+ loading: y,
80
+ disabled: y,
81
+ onClick: () => _(g.reason ? E.trim() : void 0),
82
+ className: N ? "ttw:flex-1" : void 0,
83
+ "data-testid": S,
84
+ children: g.confirmButton
85
+ })]
86
+ })
58
87
  ]
59
88
  })
60
- }) : null;
89
+ });
61
90
  }
62
91
  //#endregion
63
- export { m as BillDecisionDialog, m as default };
92
+ export { h as BillDecisionDialog, h as default };
@@ -28,8 +28,9 @@ var a = {
28
28
  cancelButton: "Cancel bill",
29
29
  cancelScheduledPaymentButton: "Cancel scheduled payment",
30
30
  reopenButton: "Reopen bill",
31
- forceApproveButton: "Approve without policy",
32
- forceRejectButton: "Reject without policy",
31
+ forceApproveButton: "Approve",
32
+ forceRejectButton: "Reject",
33
+ policyOverridesGroup: "Policy overrides",
33
34
  overflowMenuTrigger: "Bill actions",
34
35
  expandButton: "Open full screen",
35
36
  closeButton: "Close",