@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.
- package/dist/index.js +1 -1
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +13 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +7 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +54 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +24 -52
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +61 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +123 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +11 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +40 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +51 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +5 -72
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +71 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +48 -79
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +91 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +33 -137
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +138 -67
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +63 -200
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +194 -184
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +180 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +64 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +12 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +46 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +26 -158
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +159 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +32 -98
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +102 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +13 -241
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +244 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +4 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +28 -81
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +77 -130
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +145 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +2 -43
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +45 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +6 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +9 -92
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +94 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +3 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +7 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +14 -51
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +59 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +3 -110
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +107 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +8 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +38 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +18 -98
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +92 -173
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +180 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +5 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +6 -112
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +114 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +0 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +56 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +75 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +120 -115
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index7.js +45 -44
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +846 -817
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/scopes.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index7.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +1998 -1935
- 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
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
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 {
|
|
8
|
+
export { e as DEFAULT_TABS_LABELS };
|
|
@@ -1 +1,114 @@
|
|
|
1
|
-
|
|
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,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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
|
|
6
|
-
|
|
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__ */
|
|
12
|
+
children: /* @__PURE__ */ u(e, {
|
|
9
13
|
type: "button",
|
|
10
|
-
variant: "outline",
|
|
14
|
+
variant: b ? "ghost" : "outline",
|
|
11
15
|
size: "icon",
|
|
12
|
-
"aria-label":
|
|
13
|
-
"data-testid":
|
|
14
|
-
children: /* @__PURE__ */
|
|
16
|
+
"aria-label": g,
|
|
17
|
+
"data-testid": v,
|
|
18
|
+
children: /* @__PURE__ */ u(x, { className: "ttw:size-4" })
|
|
15
19
|
})
|
|
16
|
-
}), /* @__PURE__ */
|
|
20
|
+
}), /* @__PURE__ */ u(n, {
|
|
17
21
|
align: "end",
|
|
18
|
-
children:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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 {
|
|
64
|
+
export { m as BillOverflowMenu, m as default };
|
|
@@ -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 {
|
|
4
|
-
import { jsx as
|
|
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
|
|
7
|
-
let
|
|
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
|
-
...
|
|
10
|
-
}, [
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}, [
|
|
14
|
-
|
|
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__ */
|
|
19
|
-
"data-testid":
|
|
20
|
+
children: /* @__PURE__ */ m(t, {
|
|
21
|
+
"data-testid": x,
|
|
20
22
|
children: [
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
50
|
+
g.reason ? /* @__PURE__ */ m("div", {
|
|
27
51
|
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
28
|
-
children: [/* @__PURE__ */
|
|
29
|
-
htmlFor:
|
|
30
|
-
children: [
|
|
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:
|
|
56
|
+
children: g.reason.optionalHint
|
|
33
57
|
})]
|
|
34
|
-
}), /* @__PURE__ */
|
|
35
|
-
id:
|
|
36
|
-
value:
|
|
37
|
-
placeholder:
|
|
38
|
-
onChange: (e) =>
|
|
39
|
-
disabled:
|
|
40
|
-
"data-testid":
|
|
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__ */
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
})
|
|
89
|
+
});
|
|
61
90
|
}
|
|
62
91
|
//#endregion
|
|
63
|
-
export {
|
|
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
|
|
32
|
-
forceRejectButton: "Reject
|
|
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",
|