@tesouro/embedded-components-react 0.5.51 → 0.5.53
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.d.ts +42 -1
- package/dist/lib/CounterpartsWidget.d.ts +41 -0
- package/dist/lib/ReceivablesWidget.d.ts +40 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +6 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +9 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +1 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +18 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +91 -88
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index104.js +18 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index106.js +113 -102
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +5 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +28 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +148 -147
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +15 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +39 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +16 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +203 -174
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +15 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +52 -52
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +22 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +2 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +31 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +97 -96
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +15 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +57 -61
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index4.js +189 -188
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index10.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index12.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index13.js +54 -37
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +23 -16
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index3.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index5.js +54 -41
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index6.js +88 -70
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index9.js +333 -282
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +3757 -3705
- package/package.json +1 -1
|
@@ -1,87 +1,83 @@
|
|
|
1
|
-
import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o,
|
|
2
|
-
import {
|
|
3
|
-
import { Fragment as
|
|
4
|
-
import { jsx as
|
|
1
|
+
import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o, FieldRequirement as s, Label as c, Textarea as l } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { mergeBillDecisionDialogLabels as u } from "./index55.js";
|
|
3
|
+
import { Fragment as d, useEffect as f, useState as p } from "react";
|
|
4
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
5
5
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js
|
|
6
|
-
function
|
|
7
|
-
let
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}, [
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
let { alignment: k = "start", icon: A, tone: j = "default", actionWidth: M = "auto" } = g.presentation ?? {}, N = k === "center", P = M === "equal", F = g.pendingApprovers ?? [];
|
|
15
|
-
return /* @__PURE__ */ p(e, {
|
|
16
|
-
open: h,
|
|
6
|
+
function g({ open: g, copy: _, onConfirm: v, onCancel: y, isPending: b, confirmIcon: x, labels: S, testId: C, confirmTestId: w, reasonTestId: T, reasonFieldId: E = "bill-decision-reason" }) {
|
|
7
|
+
let D = u(S), [O, k] = p("");
|
|
8
|
+
if (f(() => {
|
|
9
|
+
g || k("");
|
|
10
|
+
}, [g]), !_) return null;
|
|
11
|
+
let { alignment: A = "start", icon: j, tone: M = "default", actionWidth: N = "auto" } = _.presentation ?? {}, P = A === "center", F = N === "equal", I = _.pendingApprovers ?? [];
|
|
12
|
+
return /* @__PURE__ */ m(e, {
|
|
13
|
+
open: g,
|
|
17
14
|
onOpenChange: (e) => {
|
|
18
|
-
e ||
|
|
15
|
+
e || y();
|
|
19
16
|
},
|
|
20
|
-
children: /* @__PURE__ */
|
|
21
|
-
"data-testid":
|
|
17
|
+
children: /* @__PURE__ */ h(t, {
|
|
18
|
+
"data-testid": C,
|
|
22
19
|
children: [
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
className:
|
|
20
|
+
/* @__PURE__ */ h(i, {
|
|
21
|
+
className: P ? "ttw:items-center ttw:sm:text-center" : void 0,
|
|
25
22
|
children: [
|
|
26
|
-
|
|
27
|
-
className:
|
|
28
|
-
children: /* @__PURE__ */
|
|
23
|
+
j ? /* @__PURE__ */ m("span", {
|
|
24
|
+
className: M === "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",
|
|
25
|
+
children: /* @__PURE__ */ m(j, { className: M === "destructive" ? "ttw:size-4 ttw:text-white" : "ttw:size-4 ttw:text-foreground" })
|
|
29
26
|
}) : null,
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ m(a, { children: _.title }),
|
|
28
|
+
/* @__PURE__ */ m(n, { children: _.description })
|
|
32
29
|
]
|
|
33
30
|
}),
|
|
34
|
-
|
|
31
|
+
I.length > 0 ? /* @__PURE__ */ m("div", {
|
|
35
32
|
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__ */
|
|
33
|
+
children: /* @__PURE__ */ m("ul", {
|
|
37
34
|
className: "ttw:flex ttw:flex-col ttw:items-center ttw:gap-1",
|
|
38
|
-
children:
|
|
35
|
+
children: I.map((e) => /* @__PURE__ */ m("li", {
|
|
39
36
|
className: "ttw:list-disc ttw:text-sm ttw:text-foreground",
|
|
40
|
-
children: e.names.map((e, t) => /* @__PURE__ */
|
|
37
|
+
children: e.names.map((e, t) => /* @__PURE__ */ h(d, { children: [t > 0 ? /* @__PURE__ */ m("span", {
|
|
41
38
|
className: "ttw:text-muted-foreground",
|
|
42
|
-
children: ` ${
|
|
43
|
-
}) : null, /* @__PURE__ */
|
|
39
|
+
children: ` ${D.orConnector} `
|
|
40
|
+
}) : null, /* @__PURE__ */ m("span", {
|
|
44
41
|
className: "ttw:font-medium",
|
|
45
42
|
children: e
|
|
46
43
|
})] }, e))
|
|
47
44
|
}, e.id))
|
|
48
45
|
})
|
|
49
46
|
}) : null,
|
|
50
|
-
|
|
47
|
+
_.reason ? /* @__PURE__ */ h("div", {
|
|
51
48
|
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
52
|
-
children: [/* @__PURE__ */ m(
|
|
53
|
-
htmlFor:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
"data-testid": w
|
|
49
|
+
children: [/* @__PURE__ */ m(c, {
|
|
50
|
+
htmlFor: E,
|
|
51
|
+
requirement: s.Optional,
|
|
52
|
+
labels: D.fieldMarkers,
|
|
53
|
+
children: _.reason.label
|
|
54
|
+
}), /* @__PURE__ */ m(l, {
|
|
55
|
+
id: E,
|
|
56
|
+
value: O,
|
|
57
|
+
placeholder: _.reason.placeholder,
|
|
58
|
+
onChange: (e) => k(e.target.value),
|
|
59
|
+
disabled: b,
|
|
60
|
+
"data-testid": T
|
|
65
61
|
})]
|
|
66
62
|
}) : null,
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
className:
|
|
69
|
-
children: [/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ h(r, {
|
|
64
|
+
className: P ? "ttw:sm:justify-center" : void 0,
|
|
65
|
+
children: [/* @__PURE__ */ m(o, {
|
|
70
66
|
type: "button",
|
|
71
67
|
variant: "outline",
|
|
72
|
-
onClick:
|
|
73
|
-
disabled:
|
|
74
|
-
className:
|
|
75
|
-
children:
|
|
76
|
-
}), /* @__PURE__ */
|
|
68
|
+
onClick: y,
|
|
69
|
+
disabled: b,
|
|
70
|
+
className: F ? "ttw:flex-1" : void 0,
|
|
71
|
+
children: D.cancelButton
|
|
72
|
+
}), /* @__PURE__ */ h(o, {
|
|
77
73
|
type: "button",
|
|
78
|
-
variant:
|
|
79
|
-
loading:
|
|
80
|
-
disabled:
|
|
81
|
-
onClick: () => _
|
|
82
|
-
className:
|
|
83
|
-
"data-testid":
|
|
84
|
-
children: [
|
|
74
|
+
variant: M === "destructive" ? "destructive" : "default",
|
|
75
|
+
loading: b,
|
|
76
|
+
disabled: b,
|
|
77
|
+
onClick: () => v(_.reason ? O.trim() : void 0),
|
|
78
|
+
className: F ? "ttw:flex-1" : void 0,
|
|
79
|
+
"data-testid": w,
|
|
80
|
+
children: [b ? null : x, _.confirmButton]
|
|
85
81
|
})]
|
|
86
82
|
})
|
|
87
83
|
]
|
|
@@ -89,4 +85,4 @@ function h({ open: h, copy: g, onConfirm: _, onCancel: v, isPending: y, confirmI
|
|
|
89
85
|
});
|
|
90
86
|
}
|
|
91
87
|
//#endregion
|
|
92
|
-
export {
|
|
88
|
+
export { g as BillDecisionDialog, g as default };
|