@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,89 +1,89 @@
|
|
|
1
|
-
import { Command as e, CommandGroup as t, CommandInput as n, CommandItem as r, CommandList as i, CommandSeparator as a,
|
|
2
|
-
import {
|
|
3
|
-
import { useId as
|
|
4
|
-
import { jsx as
|
|
5
|
-
import { ChevronDown as
|
|
1
|
+
import { Command as e, CommandGroup as t, CommandInput as n, CommandItem as r, CommandList as i, CommandSeparator as a, FieldRequirement as o, Label as s, Popover as c, PopoverContent as l, PopoverTrigger as u, Skeleton as d, cn as f } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { mergeVendorSearchComboboxLabels as p } from "./index42.js";
|
|
3
|
+
import { useId as m, useState as h } from "react";
|
|
4
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
5
|
+
import { ChevronDown as v, Plus as y } from "lucide-react";
|
|
6
6
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
let O =
|
|
10
|
-
|
|
11
|
-
...D
|
|
12
|
-
}, k = p(), [A, j] = m(!1);
|
|
13
|
-
return /* @__PURE__ */ g("div", {
|
|
7
|
+
var b = 5, x = "ttw:min-h-44";
|
|
8
|
+
function S({ query: S, onQueryChange: C, results: w, isLoading: T, onAddVendor: E, testId: D, labels: O }) {
|
|
9
|
+
let k = p(O), A = m(), [j, M] = h(!1);
|
|
10
|
+
return /* @__PURE__ */ _("div", {
|
|
14
11
|
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
15
|
-
"data-testid":
|
|
16
|
-
children: [/* @__PURE__ */
|
|
17
|
-
htmlFor:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
"data-testid": D,
|
|
13
|
+
children: [/* @__PURE__ */ g(s, {
|
|
14
|
+
htmlFor: A,
|
|
15
|
+
requirement: o.Required,
|
|
16
|
+
labels: k.fieldMarkers,
|
|
17
|
+
children: k.fieldLabel
|
|
18
|
+
}), /* @__PURE__ */ _(c, {
|
|
19
|
+
open: j,
|
|
20
|
+
onOpenChange: M,
|
|
21
|
+
children: [/* @__PURE__ */ g(u, {
|
|
23
22
|
asChild: !0,
|
|
24
|
-
children: /* @__PURE__ */
|
|
23
|
+
children: /* @__PURE__ */ _("button", {
|
|
25
24
|
type: "button",
|
|
26
|
-
id:
|
|
25
|
+
id: A,
|
|
27
26
|
role: "combobox",
|
|
28
|
-
"aria-expanded":
|
|
27
|
+
"aria-expanded": j,
|
|
28
|
+
"aria-required": !0,
|
|
29
29
|
className: "ttw:flex ttw:h-10 ttw:w-full ttw:items-center ttw:justify-between ttw:gap-2 ttw:rounded-md ttw:border ttw:border-border ttw:bg-background ttw:px-3 ttw:text-left ttw:text-sm ttw:shadow-xs ttw:outline-none ttw:focus-visible:border-ring ttw:focus-visible:ring-[3px] ttw:focus-visible:ring-ring/50",
|
|
30
|
-
children: [/* @__PURE__ */
|
|
30
|
+
children: [/* @__PURE__ */ g("span", {
|
|
31
31
|
className: "ttw:min-w-0 ttw:flex-1 ttw:truncate ttw:text-muted-foreground",
|
|
32
|
-
children:
|
|
33
|
-
}), /* @__PURE__ */
|
|
32
|
+
children: k.triggerPlaceholder
|
|
33
|
+
}), /* @__PURE__ */ g(v, {
|
|
34
34
|
"aria-hidden": !0,
|
|
35
35
|
className: "ttw:size-4 ttw:shrink-0 ttw:opacity-50"
|
|
36
36
|
})]
|
|
37
37
|
})
|
|
38
|
-
}), /* @__PURE__ */
|
|
38
|
+
}), /* @__PURE__ */ g(l, {
|
|
39
39
|
align: "start",
|
|
40
40
|
className: "ttw:w-[var(--radix-popover-trigger-width)] ttw:p-0",
|
|
41
|
-
children: /* @__PURE__ */
|
|
41
|
+
children: /* @__PURE__ */ _(e, {
|
|
42
42
|
shouldFilter: !1,
|
|
43
|
-
children: [/* @__PURE__ */
|
|
44
|
-
value:
|
|
45
|
-
onValueChange:
|
|
46
|
-
placeholder:
|
|
47
|
-
"aria-label":
|
|
48
|
-
}), /* @__PURE__ */
|
|
49
|
-
className:
|
|
43
|
+
children: [/* @__PURE__ */ g(n, {
|
|
44
|
+
value: S,
|
|
45
|
+
onValueChange: C,
|
|
46
|
+
placeholder: k.placeholder,
|
|
47
|
+
"aria-label": k.placeholder
|
|
48
|
+
}), /* @__PURE__ */ _(i, {
|
|
49
|
+
className: f("ttw:max-h-72", x),
|
|
50
50
|
children: [
|
|
51
|
-
|
|
51
|
+
T ? /* @__PURE__ */ _("div", {
|
|
52
52
|
className: "ttw:flex ttw:flex-col ttw:gap-2 ttw:p-2",
|
|
53
53
|
"aria-busy": "true",
|
|
54
|
-
children: [/* @__PURE__ */
|
|
54
|
+
children: [/* @__PURE__ */ g("span", {
|
|
55
55
|
className: "ttw:sr-only",
|
|
56
|
-
children:
|
|
57
|
-
}), Array.from({ length:
|
|
56
|
+
children: k.loading
|
|
57
|
+
}), Array.from({ length: b }).map((e, t) => /* @__PURE__ */ _("div", {
|
|
58
58
|
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4 ttw:px-2 ttw:py-1.5",
|
|
59
|
-
children: [/* @__PURE__ */
|
|
59
|
+
children: [/* @__PURE__ */ g(d, {
|
|
60
60
|
height: 14,
|
|
61
61
|
width: "55%"
|
|
62
|
-
}), /* @__PURE__ */
|
|
62
|
+
}), /* @__PURE__ */ g(d, {
|
|
63
63
|
height: 14,
|
|
64
64
|
width: "30%"
|
|
65
65
|
})]
|
|
66
66
|
}, t))]
|
|
67
|
-
}) :
|
|
68
|
-
className:
|
|
69
|
-
children:
|
|
70
|
-
}) : /* @__PURE__ */
|
|
67
|
+
}) : w.length === 0 ? /* @__PURE__ */ g("div", {
|
|
68
|
+
className: f("ttw:flex ttw:items-center ttw:justify-center ttw:py-6 ttw:text-center ttw:text-sm", x),
|
|
69
|
+
children: k.emptyResults
|
|
70
|
+
}) : /* @__PURE__ */ g(t, { children: w.map((e, t) => /* @__PURE__ */ _(r, {
|
|
71
71
|
value: `${e.name} ${e.email} ${t}`,
|
|
72
72
|
onSelect: () => e.onSelect(),
|
|
73
|
-
children: [/* @__PURE__ */
|
|
73
|
+
children: [/* @__PURE__ */ g("span", {
|
|
74
74
|
className: "ttw:text-foreground",
|
|
75
75
|
children: e.name
|
|
76
|
-
}), /* @__PURE__ */
|
|
76
|
+
}), /* @__PURE__ */ g("span", {
|
|
77
77
|
className: "ttw:ml-auto ttw:text-muted-foreground",
|
|
78
78
|
children: e.email
|
|
79
79
|
})]
|
|
80
80
|
}, `${e.name}:${e.email}:${t}`)) }),
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ g(a, {}),
|
|
82
|
+
/* @__PURE__ */ _(r, {
|
|
83
83
|
value: "__add_vendor__",
|
|
84
|
-
onSelect:
|
|
84
|
+
onSelect: E,
|
|
85
85
|
className: "ttw:sticky ttw:bottom-0 ttw:bg-popover ttw:text-primary",
|
|
86
|
-
children: [/* @__PURE__ */
|
|
86
|
+
children: [/* @__PURE__ */ g(y, { className: "ttw:size-4 ttw:text-primary" }), k.addVendorAction]
|
|
87
87
|
})
|
|
88
88
|
]
|
|
89
89
|
})]
|
|
@@ -93,4 +93,4 @@ function x({ query: x, onQueryChange: S, results: C, isLoading: w, onAddVendor:
|
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
95
|
//#endregion
|
|
96
|
-
export {
|
|
96
|
+
export { S as VendorSearchCombobox, S as default };
|
|
@@ -1,13 +1,32 @@
|
|
|
1
1
|
import { VENDOR_SUMMARY_CARD_LABELS_EN as e } from "./index27.js";
|
|
2
2
|
import "./index29.js";
|
|
3
|
-
import { VENDOR_SEARCH_COMBOBOX_LABELS_EN as t } from "./index42.js";
|
|
3
|
+
import { VENDOR_SEARCH_COMBOBOX_LABELS_EN as t, mergeVendorSearchComboboxLabels as n } from "./index42.js";
|
|
4
4
|
import "./index44.js";
|
|
5
5
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js
|
|
6
|
-
var
|
|
6
|
+
var r = {
|
|
7
7
|
heading: "Who are you paying?",
|
|
8
8
|
summaryCard: e,
|
|
9
9
|
search: t,
|
|
10
10
|
noVendorPlaceholder: "No vendor selected"
|
|
11
11
|
};
|
|
12
|
+
function i(e) {
|
|
13
|
+
return {
|
|
14
|
+
...r,
|
|
15
|
+
...e,
|
|
16
|
+
summaryCard: {
|
|
17
|
+
...r.summaryCard,
|
|
18
|
+
...e?.summaryCard,
|
|
19
|
+
ach: {
|
|
20
|
+
...r.summaryCard.ach,
|
|
21
|
+
...e?.summaryCard?.ach,
|
|
22
|
+
fieldMarkers: {
|
|
23
|
+
...r.summaryCard.ach.fieldMarkers,
|
|
24
|
+
...e?.summaryCard?.ach?.fieldMarkers
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
search: n(e?.search)
|
|
29
|
+
};
|
|
30
|
+
}
|
|
12
31
|
//#endregion
|
|
13
|
-
export {
|
|
32
|
+
export { r as VENDOR_SECTION_LABELS_EN, i as mergeVendorSectionLabels };
|
|
@@ -3,26 +3,11 @@ import { VendorSummaryCard as t } from "./index28.js";
|
|
|
3
3
|
import "./index29.js";
|
|
4
4
|
import { VendorSearchCombobox as n } from "./index43.js";
|
|
5
5
|
import "./index44.js";
|
|
6
|
-
import {
|
|
6
|
+
import { mergeVendorSectionLabels as r } from "./index45.js";
|
|
7
7
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
8
8
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js
|
|
9
9
|
function o(o) {
|
|
10
|
-
let { onEdit: s, error: c, testId: l, labels: u, disabled: d } = o, f =
|
|
11
|
-
...r,
|
|
12
|
-
...u,
|
|
13
|
-
summaryCard: {
|
|
14
|
-
...r.summaryCard,
|
|
15
|
-
...u?.summaryCard,
|
|
16
|
-
ach: {
|
|
17
|
-
...r.summaryCard.ach,
|
|
18
|
-
...u?.summaryCard?.ach
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
search: {
|
|
22
|
-
...r.search,
|
|
23
|
-
...u?.search
|
|
24
|
-
}
|
|
25
|
-
};
|
|
10
|
+
let { onEdit: s, error: c, testId: l, labels: u, disabled: d } = o, f = r(u);
|
|
26
11
|
return /* @__PURE__ */ a("section", {
|
|
27
12
|
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
28
13
|
"data-invalid": c ? !0 : void 0,
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LABEL_LABELS_EN as e, REQUIRED_FIELDS_LEGEND_LABELS_EN as t, mergeRequiredFieldsLegendLabels as n } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { BILL_DETAIL_BODY_LABELS_EN as r, mergeBillDetailBodyLabels as i } from "./index30.js";
|
|
2
3
|
import "./index32.js";
|
|
3
|
-
import { BILL_FORM_FIELDS_LABELS_EN as
|
|
4
|
+
import { BILL_FORM_FIELDS_LABELS_EN as a, mergeBillFormFieldsLabels as o } from "./index33.js";
|
|
4
5
|
import "./index35.js";
|
|
5
|
-
import { LINE_ITEMS_SECTION_LABELS_EN as
|
|
6
|
+
import { LINE_ITEMS_SECTION_LABELS_EN as s, mergeLineItemsSectionLabels as c } from "./index39.js";
|
|
6
7
|
import "./index41.js";
|
|
7
|
-
import { VENDOR_SECTION_LABELS_EN as
|
|
8
|
+
import { VENDOR_SECTION_LABELS_EN as l, mergeVendorSectionLabels as u } from "./index45.js";
|
|
8
9
|
import "./index47.js";
|
|
9
10
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js
|
|
10
|
-
var
|
|
11
|
+
var d = {
|
|
11
12
|
closeButton: "Close",
|
|
12
13
|
collapseButton: "Exit full screen",
|
|
13
14
|
menuTrigger: "More actions",
|
|
@@ -16,41 +17,40 @@ var a = {
|
|
|
16
17
|
submitButton: "Submit",
|
|
17
18
|
saveButton: "Save",
|
|
18
19
|
hiddenDescription: "Enter the details of the bill you want to pay.",
|
|
19
|
-
vendorSection:
|
|
20
|
-
detailsFields:
|
|
21
|
-
lineItems:
|
|
22
|
-
detailBody:
|
|
20
|
+
vendorSection: l,
|
|
21
|
+
detailsFields: a,
|
|
22
|
+
lineItems: s,
|
|
23
|
+
detailBody: r,
|
|
24
|
+
requiredFieldsLegend: t,
|
|
25
|
+
fieldMarkers: e
|
|
23
26
|
};
|
|
24
|
-
function
|
|
27
|
+
function f(e) {
|
|
28
|
+
let t = {
|
|
29
|
+
...d.fieldMarkers,
|
|
30
|
+
...e?.fieldMarkers
|
|
31
|
+
};
|
|
25
32
|
return {
|
|
26
|
-
...
|
|
33
|
+
...d,
|
|
27
34
|
...e,
|
|
28
|
-
|
|
29
|
-
|
|
35
|
+
fieldMarkers: t,
|
|
36
|
+
vendorSection: u({
|
|
30
37
|
...e?.vendorSection,
|
|
31
|
-
summaryCard: {
|
|
32
|
-
...a.vendorSection.summaryCard,
|
|
33
|
-
...e?.vendorSection?.summaryCard,
|
|
34
|
-
ach: {
|
|
35
|
-
...a.vendorSection.summaryCard.ach,
|
|
36
|
-
...e?.vendorSection?.summaryCard?.ach
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
38
|
search: {
|
|
40
|
-
|
|
39
|
+
fieldMarkers: t,
|
|
41
40
|
...e?.vendorSection?.search
|
|
42
41
|
}
|
|
43
|
-
},
|
|
44
|
-
detailsFields: {
|
|
45
|
-
|
|
42
|
+
}),
|
|
43
|
+
detailsFields: o({
|
|
44
|
+
fieldMarkers: t,
|
|
46
45
|
...e?.detailsFields
|
|
47
|
-
},
|
|
48
|
-
lineItems: {
|
|
49
|
-
|
|
46
|
+
}),
|
|
47
|
+
lineItems: c({
|
|
48
|
+
fieldMarkers: t,
|
|
50
49
|
...e?.lineItems
|
|
51
|
-
},
|
|
52
|
-
detailBody:
|
|
50
|
+
}),
|
|
51
|
+
detailBody: i(e?.detailBody),
|
|
52
|
+
requiredFieldsLegend: n(t, e?.requiredFieldsLegend)
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
//#endregion
|
|
56
|
-
export {
|
|
56
|
+
export { d as BILL_CREATE_SCREEN_LABELS_EN, f as mergeBillCreateScreenLabels };
|
|
@@ -1,190 +1,191 @@
|
|
|
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
|
|
2
|
-
import { InlineErrorAlert as
|
|
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 ee, DropdownMenuSeparator as u, DropdownMenuTrigger as d, RequiredFieldsLegend as f } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { InlineErrorAlert as te } from "../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
|
|
3
3
|
import "../../../shared/ui/dist/index.js";
|
|
4
|
-
import { BillDetailBody as
|
|
4
|
+
import { BillDetailBody as p } from "./index31.js";
|
|
5
5
|
import "./index32.js";
|
|
6
|
-
import { BillFormFields as
|
|
6
|
+
import { BillFormFields as m } from "./index34.js";
|
|
7
7
|
import "./index35.js";
|
|
8
|
-
import { groupBySectionHeading as
|
|
8
|
+
import { groupBySectionHeading as h } from "./index36.js";
|
|
9
9
|
import "./index38.js";
|
|
10
|
-
import { LineItemsSection as
|
|
10
|
+
import { LineItemsSection as g } from "./index40.js";
|
|
11
11
|
import "./index41.js";
|
|
12
|
-
import { VendorSection as
|
|
12
|
+
import { VendorSection as _ } from "./index46.js";
|
|
13
13
|
import "./index47.js";
|
|
14
|
-
import { mergeBillCreateScreenLabels as
|
|
15
|
-
import { useFocusFirstInvalidField as
|
|
16
|
-
import { Fragment as
|
|
17
|
-
import { Fragment as
|
|
18
|
-
import { Minimize2 as
|
|
14
|
+
import { mergeBillCreateScreenLabels as v } from "./index48.js";
|
|
15
|
+
import { useFocusFirstInvalidField as y } from "./index49.js";
|
|
16
|
+
import { Fragment as b, useId as x } from "react";
|
|
17
|
+
import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
18
|
+
import { Minimize2 as ne, MoreVertical as T, X as E } from "lucide-react";
|
|
19
19
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js
|
|
20
|
-
function
|
|
21
|
-
let
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
open:
|
|
24
|
-
onOpenChange:
|
|
25
|
-
children: /* @__PURE__ */
|
|
20
|
+
function D({ open: D, onOpenChange: O, title: k, subtitle: A, notice: j, vendor: M, values: N, errors: P, onChange: F, lineItems: I, documentPanel: L, menuItems: R, readOnly: z, detail: B, detailEdit: V, isLineItemsLoading: H, isSaving: U, isSavingDraft: W, isSubmitting: G, showSubmit: K = !0, onCancel: q, onCollapse: J, onSaveDraft: Y, onFinalize: X, scrollToErrorToken: Z, testId: re, labels: ie }) {
|
|
21
|
+
let ae = x(), Q = v(ie), $ = !!(z && B), oe = R ? h(R) : [], se = y(Z);
|
|
22
|
+
return /* @__PURE__ */ C(t, {
|
|
23
|
+
open: D,
|
|
24
|
+
onOpenChange: O,
|
|
25
|
+
children: /* @__PURE__ */ w(n, {
|
|
26
26
|
showCloseButton: !1,
|
|
27
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":
|
|
28
|
+
"data-testid": re,
|
|
29
29
|
children: [
|
|
30
|
-
/* @__PURE__ */
|
|
30
|
+
/* @__PURE__ */ w(i, {
|
|
31
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__ */
|
|
32
|
+
children: [/* @__PURE__ */ w("div", {
|
|
33
33
|
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
34
34
|
children: [
|
|
35
|
-
/* @__PURE__ */
|
|
35
|
+
/* @__PURE__ */ C(a, {
|
|
36
36
|
className: "ttw:text-xl ttw:font-semibold",
|
|
37
|
-
children:
|
|
37
|
+
children: k
|
|
38
38
|
}),
|
|
39
|
-
|
|
39
|
+
A ? /* @__PURE__ */ C("p", {
|
|
40
40
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
41
|
-
children:
|
|
41
|
+
children: A
|
|
42
42
|
}) : null,
|
|
43
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ C(r, {
|
|
44
44
|
className: "ttw:sr-only",
|
|
45
45
|
children: Q.hiddenDescription
|
|
46
46
|
})
|
|
47
47
|
]
|
|
48
|
-
}), /* @__PURE__ */
|
|
48
|
+
}), /* @__PURE__ */ w("div", {
|
|
49
49
|
className: "ttw:flex ttw:items-center ttw:gap-1",
|
|
50
50
|
children: [
|
|
51
|
-
|
|
51
|
+
J ? /* @__PURE__ */ C(e, {
|
|
52
52
|
type: "button",
|
|
53
53
|
variant: "ghost",
|
|
54
54
|
size: "icon",
|
|
55
55
|
"aria-label": Q.collapseButton,
|
|
56
|
-
disabled:
|
|
57
|
-
onClick:
|
|
58
|
-
children: /* @__PURE__ */
|
|
56
|
+
disabled: U,
|
|
57
|
+
onClick: J,
|
|
58
|
+
children: /* @__PURE__ */ C(ne, { className: "ttw:size-4 ttw:rotate-90" })
|
|
59
59
|
}) : null,
|
|
60
|
-
|
|
60
|
+
R && R.length > 0 ? /* @__PURE__ */ w(o, { children: [/* @__PURE__ */ C(d, {
|
|
61
61
|
asChild: !0,
|
|
62
|
-
children: /* @__PURE__ */
|
|
62
|
+
children: /* @__PURE__ */ C(e, {
|
|
63
63
|
type: "button",
|
|
64
64
|
variant: "ghost",
|
|
65
65
|
size: "icon",
|
|
66
66
|
"aria-label": Q.menuTrigger,
|
|
67
|
-
disabled:
|
|
68
|
-
children: /* @__PURE__ */
|
|
67
|
+
disabled: U,
|
|
68
|
+
children: /* @__PURE__ */ C(T, { className: "ttw:size-4" })
|
|
69
69
|
})
|
|
70
|
-
}), /* @__PURE__ */
|
|
70
|
+
}), /* @__PURE__ */ C(s, {
|
|
71
71
|
align: "end",
|
|
72
|
-
children:
|
|
72
|
+
children: oe.map((e, t) => {
|
|
73
73
|
let n = e.items.map((e) => {
|
|
74
74
|
let t = e.icon;
|
|
75
|
-
return /* @__PURE__ */
|
|
75
|
+
return /* @__PURE__ */ w(l, {
|
|
76
76
|
variant: e.destructive ? "destructive" : void 0,
|
|
77
77
|
disabled: e.disabled,
|
|
78
78
|
onSelect: e.onSelect,
|
|
79
|
-
children: [t ? /* @__PURE__ */
|
|
79
|
+
children: [t ? /* @__PURE__ */ C(t, { className: "ttw:size-4" }) : null, e.label]
|
|
80
80
|
}, e.id);
|
|
81
81
|
});
|
|
82
|
-
if (!e.heading) return /* @__PURE__ */
|
|
83
|
-
let r = `${
|
|
84
|
-
return /* @__PURE__ */
|
|
85
|
-
t > 0 ? /* @__PURE__ */
|
|
86
|
-
/* @__PURE__ */
|
|
82
|
+
if (!e.heading) return /* @__PURE__ */ C(b, { children: n }, e.items[0]?.id);
|
|
83
|
+
let r = `${ae}-${t}`;
|
|
84
|
+
return /* @__PURE__ */ w(b, { children: [
|
|
85
|
+
t > 0 ? /* @__PURE__ */ C(u, {}) : null,
|
|
86
|
+
/* @__PURE__ */ C(ee, {
|
|
87
87
|
id: r,
|
|
88
88
|
className: "ttw:py-1 ttw:text-xs ttw:font-medium ttw:text-muted-foreground",
|
|
89
89
|
children: e.heading
|
|
90
90
|
}),
|
|
91
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ C(c, {
|
|
92
92
|
"aria-labelledby": r,
|
|
93
93
|
children: n
|
|
94
94
|
})
|
|
95
95
|
] }, e.items[0]?.id);
|
|
96
96
|
})
|
|
97
97
|
})] }) : null,
|
|
98
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ C(e, {
|
|
99
99
|
type: "button",
|
|
100
100
|
variant: "ghost",
|
|
101
101
|
size: "icon",
|
|
102
102
|
"aria-label": Q.closeButton,
|
|
103
|
-
disabled:
|
|
104
|
-
onClick:
|
|
105
|
-
children: /* @__PURE__ */
|
|
103
|
+
disabled: U,
|
|
104
|
+
onClick: q,
|
|
105
|
+
children: /* @__PURE__ */ C(E, { className: "ttw:size-4" })
|
|
106
106
|
})
|
|
107
107
|
]
|
|
108
108
|
})]
|
|
109
109
|
}),
|
|
110
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ w("div", {
|
|
111
111
|
className: "ttw:grid ttw:flex-1 ttw:grid-cols-2 ttw:overflow-hidden",
|
|
112
|
-
children: [/* @__PURE__ */
|
|
113
|
-
ref:
|
|
112
|
+
children: [/* @__PURE__ */ w("div", {
|
|
113
|
+
ref: se,
|
|
114
114
|
className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:overflow-y-auto ttw:px-6 ttw:py-6",
|
|
115
115
|
children: [
|
|
116
|
-
|
|
116
|
+
P?.form ? /* @__PURE__ */ C("div", {
|
|
117
117
|
"data-invalid": "true",
|
|
118
|
-
children: /* @__PURE__ */
|
|
118
|
+
children: /* @__PURE__ */ C(te, { children: P.form })
|
|
119
119
|
}) : null,
|
|
120
|
-
|
|
120
|
+
j ? /* @__PURE__ */ C("div", {
|
|
121
121
|
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
122
|
-
children:
|
|
122
|
+
children: j
|
|
123
123
|
}) : null,
|
|
124
|
-
$ ? /* @__PURE__ */
|
|
125
|
-
...
|
|
124
|
+
$ ? /* @__PURE__ */ C(p, {
|
|
125
|
+
...B,
|
|
126
126
|
labels: Q.detailBody
|
|
127
|
-
}) : /* @__PURE__ */
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
127
|
+
}) : /* @__PURE__ */ w(S, { children: [
|
|
128
|
+
/* @__PURE__ */ C(f, { labels: Q.requiredFieldsLegend }),
|
|
129
|
+
/* @__PURE__ */ C(_, {
|
|
130
|
+
...M,
|
|
131
|
+
onEdit: z ? void 0 : M.onEdit,
|
|
132
|
+
disabled: z,
|
|
132
133
|
labels: Q.vendorSection
|
|
133
134
|
}),
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
values:
|
|
136
|
-
errors:
|
|
137
|
-
onChange:
|
|
138
|
-
disabled:
|
|
135
|
+
/* @__PURE__ */ C(m, {
|
|
136
|
+
values: N,
|
|
137
|
+
errors: P,
|
|
138
|
+
onChange: F,
|
|
139
|
+
disabled: z,
|
|
139
140
|
labels: Q.detailsFields
|
|
140
141
|
}),
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
...
|
|
143
|
-
disabled:
|
|
142
|
+
/* @__PURE__ */ C(g, {
|
|
143
|
+
...I,
|
|
144
|
+
disabled: I.disabled || H || z,
|
|
144
145
|
labels: Q.lineItems
|
|
145
146
|
})
|
|
146
147
|
] })
|
|
147
148
|
]
|
|
148
|
-
}), /* @__PURE__ */
|
|
149
|
+
}), /* @__PURE__ */ C("div", {
|
|
149
150
|
className: "ttw:overflow-y-auto ttw:bg-muted/30 ttw:px-6 ttw:py-6",
|
|
150
|
-
children:
|
|
151
|
+
children: L
|
|
151
152
|
})]
|
|
152
153
|
}),
|
|
153
|
-
$ ?
|
|
154
|
+
$ ? V ? /* @__PURE__ */ w("div", {
|
|
154
155
|
className: "ttw:flex ttw:justify-end ttw:gap-2 ttw:border-t ttw:border-border ttw:px-6 ttw:py-4",
|
|
155
|
-
children: [/* @__PURE__ */
|
|
156
|
+
children: [/* @__PURE__ */ C(e, {
|
|
156
157
|
type: "button",
|
|
157
158
|
variant: "ghost",
|
|
158
|
-
disabled:
|
|
159
|
-
onClick:
|
|
159
|
+
disabled: V.isSaving,
|
|
160
|
+
onClick: V.onCancel,
|
|
160
161
|
children: Q.cancelButton
|
|
161
|
-
}), /* @__PURE__ */
|
|
162
|
+
}), /* @__PURE__ */ C(e, {
|
|
162
163
|
type: "button",
|
|
163
|
-
onClick:
|
|
164
|
-
loading:
|
|
165
|
-
disabled:
|
|
164
|
+
onClick: V.onSave,
|
|
165
|
+
loading: V.isSaving,
|
|
166
|
+
disabled: V.isSaving,
|
|
166
167
|
children: Q.saveButton
|
|
167
168
|
})]
|
|
168
|
-
}) : null : /* @__PURE__ */
|
|
169
|
+
}) : null : /* @__PURE__ */ w("div", {
|
|
169
170
|
className: "ttw:flex ttw:justify-end ttw:gap-2 ttw:border-t ttw:border-border ttw:px-6 ttw:py-4",
|
|
170
|
-
children: [/* @__PURE__ */
|
|
171
|
+
children: [/* @__PURE__ */ C(e, {
|
|
171
172
|
type: "button",
|
|
172
173
|
variant: "ghost",
|
|
173
|
-
disabled:
|
|
174
|
-
onClick:
|
|
175
|
-
children:
|
|
176
|
-
}),
|
|
177
|
-
type: "button",
|
|
178
|
-
variant: G ? "secondary" : "default",
|
|
179
|
-
onClick: J,
|
|
180
|
-
loading: U,
|
|
181
|
-
disabled: H || W || V,
|
|
182
|
-
children: Q.saveDraftButton
|
|
183
|
-
}), G ? /* @__PURE__ */ S(e, {
|
|
174
|
+
disabled: U,
|
|
175
|
+
onClick: q,
|
|
176
|
+
children: z ? Q.closeButton : Q.cancelButton
|
|
177
|
+
}), z ? null : /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(e, {
|
|
184
178
|
type: "button",
|
|
179
|
+
variant: K ? "secondary" : "default",
|
|
185
180
|
onClick: Y,
|
|
186
181
|
loading: W,
|
|
187
|
-
disabled:
|
|
182
|
+
disabled: U || G || H,
|
|
183
|
+
children: Q.saveDraftButton
|
|
184
|
+
}), K ? /* @__PURE__ */ C(e, {
|
|
185
|
+
type: "button",
|
|
186
|
+
onClick: X,
|
|
187
|
+
loading: G,
|
|
188
|
+
disabled: U || W || H,
|
|
188
189
|
children: Q.submitButton
|
|
189
190
|
}) : null] })]
|
|
190
191
|
})
|
|
@@ -193,4 +194,4 @@ function E({ open: E, onOpenChange: D, title: O, subtitle: k, notice: A, vendor:
|
|
|
193
194
|
});
|
|
194
195
|
}
|
|
195
196
|
//#endregion
|
|
196
|
-
export {
|
|
197
|
+
export { D as BillCreateScreen, D as default };
|
|
@@ -1,7 +1,19 @@
|
|
|
1
|
+
import { LABEL_LABELS_EN as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
1
2
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js
|
|
2
|
-
var
|
|
3
|
+
var t = {
|
|
3
4
|
cancelButton: "Cancel",
|
|
4
|
-
orConnector: "or"
|
|
5
|
+
orConnector: "or",
|
|
6
|
+
fieldMarkers: e
|
|
5
7
|
};
|
|
8
|
+
function n(e) {
|
|
9
|
+
return {
|
|
10
|
+
...t,
|
|
11
|
+
...e,
|
|
12
|
+
fieldMarkers: {
|
|
13
|
+
...t.fieldMarkers,
|
|
14
|
+
...e?.fieldMarkers
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
6
18
|
//#endregion
|
|
7
|
-
export {
|
|
19
|
+
export { t as BILL_DECISION_DIALOG_LABELS_EN, n as mergeBillDecisionDialogLabels };
|