@tesouro/embedded-components-react 0.11.250 → 0.11.254
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.css +9 -344
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index23.js +35 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index26.js +21 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +3 -105
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index28.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +47 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index34.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index4.js +87 -90
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +238 -248
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index46.js +15 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index47.js +199 -202
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index5.js +16 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index.js +25 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index10.js +18 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index11.js +150 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index12.js +2 -150
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index13.js +75 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +272 -70
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +1 -279
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index16.js +20 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index17.js +51 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index18.js +2 -55
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index19.js +34 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index20.js +369 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index21.js +2 -373
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index22.js +22 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index23.js +124 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index24.js +2 -126
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index25.js +30 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index26.js +51 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index27.js +1 -52
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index28.js +54 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index29.js +10 -54
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index3.js +35 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index30.js +133 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index31.js +1 -198
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index32.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +52 -43
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +2 -315
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index35.js +15 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index36.js +158 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index37.js +2 -162
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index38.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index39.js +19 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index40.js +2 -35
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index41.js +9 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index42.js +31 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index43.js +2 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index44.js +6 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index45.js +27 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index46.js +2 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index47.js +13 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index48.js +100 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index49.js +2 -107
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js +12 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index50.js +9 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index51.js +41 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index52.js +2 -52
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index6.js +1 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index7.js +31 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index8.js +1 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index9.js +34 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index14.js +1 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index19.js +2 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index15.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index17.js +2 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index10.js +119 -104
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index11.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index14.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index2.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index4.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index9.js +9 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index10.js +76 -171
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index11.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index12.js +33 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index13.js +9 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index14.js +126 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index15.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index2.js +23 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index3.js +32 -126
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index4.js +14 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +3 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index6.js +28 -104
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index7.js +72 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index8.js +2 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index9.js +12 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +6 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +6 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +32 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index2.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index3.js +15 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index4.js +53 -84
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/index.js +17 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/billDetailLabels.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index3.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index4.js +13 -14
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/document/documentPreview.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +20 -19
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/MaskedAccountNumber/MaskedAccountNumber.js +30 -34
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/TooltipIconButton/TooltipIconButton.js +55 -0
- package/dist/packages/shared-ui-shadcn/dist/index.js +1322 -1312
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index53.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +0 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +0 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/maskAccountNumber.js +0 -5
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index17.js
CHANGED
|
@@ -1,20 +1,55 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FieldRequirement as e, Input as t, Label as n } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { mergeBillFormFieldsLabels as r } from "./index16.js";
|
|
3
|
+
import { useId as i } from "react";
|
|
4
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
2
5
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index17.js
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
poNumber:
|
|
8
|
-
fieldMarkers: e
|
|
6
|
+
var s = 255, c = {
|
|
7
|
+
invoiceDate: e.Required,
|
|
8
|
+
dueDate: e.Required,
|
|
9
|
+
invoiceNumber: e.Required,
|
|
10
|
+
poNumber: e.Optional
|
|
9
11
|
};
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
function l({ values: l, errors: u, onChange: d, disabled: f, testId: p, labels: m }) {
|
|
13
|
+
let h = r(m), g = i(), _ = (r, i, p) => {
|
|
14
|
+
let m = `${g}-${r}`, _ = `${m}-error`, v = u?.[r], y = c[r];
|
|
15
|
+
return /* @__PURE__ */ o("div", {
|
|
16
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ a(n, {
|
|
19
|
+
htmlFor: m,
|
|
20
|
+
requirement: y,
|
|
21
|
+
labels: h.fieldMarkers,
|
|
22
|
+
children: i
|
|
23
|
+
}),
|
|
24
|
+
/* @__PURE__ */ a(t, {
|
|
25
|
+
id: m,
|
|
26
|
+
type: p,
|
|
27
|
+
value: l[r],
|
|
28
|
+
disabled: f,
|
|
29
|
+
"aria-required": y === e.Required || void 0,
|
|
30
|
+
maxLength: r === "poNumber" ? s : void 0,
|
|
31
|
+
"aria-invalid": v ? !0 : void 0,
|
|
32
|
+
"aria-describedby": v ? _ : void 0,
|
|
33
|
+
onChange: (e) => d({ [r]: e.target.value })
|
|
34
|
+
}),
|
|
35
|
+
v ? /* @__PURE__ */ a("p", {
|
|
36
|
+
id: _,
|
|
37
|
+
className: "ttw:text-sm ttw:text-destructive",
|
|
38
|
+
children: v
|
|
39
|
+
}) : null
|
|
40
|
+
]
|
|
41
|
+
});
|
|
18
42
|
};
|
|
43
|
+
return /* @__PURE__ */ o("div", {
|
|
44
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
45
|
+
"data-testid": p,
|
|
46
|
+
children: [/* @__PURE__ */ o("div", {
|
|
47
|
+
className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
|
|
48
|
+
children: [_("invoiceDate", h.invoiceDate, "date"), _("dueDate", h.dueDate, "date")]
|
|
49
|
+
}), /* @__PURE__ */ o("div", {
|
|
50
|
+
className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
|
|
51
|
+
children: [_("invoiceNumber", h.invoiceNumber), _("poNumber", h.poNumber)]
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
19
54
|
}
|
|
20
|
-
export {
|
|
55
|
+
export { l as BillFormFields, l as default };
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index18.js
CHANGED
|
@@ -1,55 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { useId as i } from "react";
|
|
4
|
-
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
-
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index18.js
|
|
6
|
-
var s = 255, c = {
|
|
7
|
-
invoiceDate: e.Required,
|
|
8
|
-
dueDate: e.Required,
|
|
9
|
-
invoiceNumber: e.Required,
|
|
10
|
-
poNumber: e.Optional
|
|
11
|
-
};
|
|
12
|
-
function l({ values: l, errors: u, onChange: d, disabled: f, testId: p, labels: m }) {
|
|
13
|
-
let h = r(m), g = i(), _ = (r, i, p) => {
|
|
14
|
-
let m = `${g}-${r}`, _ = `${m}-error`, v = u?.[r], y = c[r];
|
|
15
|
-
return /* @__PURE__ */ o("div", {
|
|
16
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
17
|
-
children: [
|
|
18
|
-
/* @__PURE__ */ a(n, {
|
|
19
|
-
htmlFor: m,
|
|
20
|
-
requirement: y,
|
|
21
|
-
labels: h.fieldMarkers,
|
|
22
|
-
children: i
|
|
23
|
-
}),
|
|
24
|
-
/* @__PURE__ */ a(t, {
|
|
25
|
-
id: m,
|
|
26
|
-
type: p,
|
|
27
|
-
value: l[r],
|
|
28
|
-
disabled: f,
|
|
29
|
-
"aria-required": y === e.Required || void 0,
|
|
30
|
-
maxLength: r === "poNumber" ? s : void 0,
|
|
31
|
-
"aria-invalid": v ? !0 : void 0,
|
|
32
|
-
"aria-describedby": v ? _ : void 0,
|
|
33
|
-
onChange: (e) => d({ [r]: e.target.value })
|
|
34
|
-
}),
|
|
35
|
-
v ? /* @__PURE__ */ a("p", {
|
|
36
|
-
id: _,
|
|
37
|
-
className: "ttw:text-sm ttw:text-destructive",
|
|
38
|
-
children: v
|
|
39
|
-
}) : null
|
|
40
|
-
]
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
return /* @__PURE__ */ o("div", {
|
|
44
|
-
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
45
|
-
"data-testid": p,
|
|
46
|
-
children: [/* @__PURE__ */ o("div", {
|
|
47
|
-
className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
|
|
48
|
-
children: [_("invoiceDate", h.invoiceDate, "date"), _("dueDate", h.dueDate, "date")]
|
|
49
|
-
}), /* @__PURE__ */ o("div", {
|
|
50
|
-
className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
|
|
51
|
-
children: [_("invoiceNumber", h.invoiceNumber), _("poNumber", h.poNumber)]
|
|
52
|
-
})]
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
export { l as BillFormFields, l as default };
|
|
1
|
+
import "./index16.js";
|
|
2
|
+
import "./index17.js";
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index19.js
CHANGED
|
@@ -1,2 +1,34 @@
|
|
|
1
|
-
import "
|
|
2
|
-
|
|
1
|
+
import { LABEL_LABELS_EN as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index19.js
|
|
3
|
+
var t = {
|
|
4
|
+
heading: "Line items",
|
|
5
|
+
helpText: "Enter a single amount for this payment, or split it into line items to assign a GL code to each one.",
|
|
6
|
+
description: "Description",
|
|
7
|
+
descriptionPlaceholder: "e.g., Office supplies",
|
|
8
|
+
glCode: "GL code",
|
|
9
|
+
glCodePlaceholder: "Select",
|
|
10
|
+
glCodeClear: "Clear GL code",
|
|
11
|
+
quantity: "Quantity",
|
|
12
|
+
price: "Price",
|
|
13
|
+
amount: "Amount",
|
|
14
|
+
currencySymbol: "$",
|
|
15
|
+
discount: "Discounts",
|
|
16
|
+
tax: "Tax",
|
|
17
|
+
totalAmount: "Total amount",
|
|
18
|
+
addLineItem: "+ Add line item",
|
|
19
|
+
increaseQuantity: (e) => `Increase quantity — line item ${e}`,
|
|
20
|
+
decreaseQuantity: (e) => `Decrease quantity — line item ${e}`,
|
|
21
|
+
removeLineItem: (e) => `Remove line item ${e}`,
|
|
22
|
+
fieldMarkers: e
|
|
23
|
+
};
|
|
24
|
+
function n(e) {
|
|
25
|
+
return {
|
|
26
|
+
...t,
|
|
27
|
+
...e,
|
|
28
|
+
fieldMarkers: {
|
|
29
|
+
...t.fieldMarkers,
|
|
30
|
+
...e?.fieldMarkers
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export { t as LINE_ITEMS_SECTION_LABELS_EN, n as mergeLineItemsSectionLabels };
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index20.js
CHANGED
|
@@ -1,34 +1,373 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Button as e, FieldRequirement as t, Input as n, InputGroup as r, InputGroupAddon as i, InputGroupInput as a, Label as o, Select as s, SelectContent as c, SelectItem as l, SelectTrigger as u, SelectValue as d, Separator as f, Tooltip as p, TooltipContent as m, TooltipProvider as h, TooltipTrigger as g, Typography as _, cn as v } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { TooltipIconButton as y } from "../../../../shared/ui/dist/lib/TooltipIconButton/TooltipIconButton.js";
|
|
3
|
+
import "../../../../shared/ui/dist/index.js";
|
|
4
|
+
import { mergeLineItemsSectionLabels as b } from "./index19.js";
|
|
5
|
+
import { useId as x } from "react";
|
|
6
|
+
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
7
|
+
import { Info as w, Minus as T, Plus as ee, Trash2 as E, X as D } from "lucide-react";
|
|
2
8
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index20.js
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
amount: "Amount",
|
|
14
|
-
currencySymbol: "$",
|
|
15
|
-
discount: "Discounts",
|
|
16
|
-
tax: "Tax",
|
|
17
|
-
totalAmount: "Total amount",
|
|
18
|
-
addLineItem: "+ Add line item",
|
|
19
|
-
increaseQuantity: (e) => `Increase quantity — line item ${e}`,
|
|
20
|
-
decreaseQuantity: (e) => `Decrease quantity — line item ${e}`,
|
|
21
|
-
removeLineItem: (e) => `Remove line item ${e}`,
|
|
22
|
-
fieldMarkers: e
|
|
9
|
+
var O = {
|
|
10
|
+
description: t.Required,
|
|
11
|
+
glCode: t.Optional,
|
|
12
|
+
quantity: t.Required,
|
|
13
|
+
price: t.Required,
|
|
14
|
+
amount: t.Required
|
|
15
|
+
}, k = {
|
|
16
|
+
discount: t.Optional,
|
|
17
|
+
tax: t.Optional,
|
|
18
|
+
total: t.Required
|
|
23
19
|
};
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
20
|
+
function A({ items: t, glCodeOptions: A, glCodeDisabled: j, glCodeUnavailableMessage: M, discount: N, onDiscountChange: P, onDiscountBlur: F, tax: I, onTaxChange: L, onTaxBlur: R, total: z, onTotalChange: B, onTotalBlur: V, onAddLineItem: H, errors: U, totalsErrors: W, disabled: G, testId: K, labels: q }) {
|
|
21
|
+
let J = b(q), Y = x(), X = t.length > 1, Z = M ? `${Y}-gl-code-unavailable` : void 0, Q = (e) => `${Y}-${e}-error`, $ = (e) => {
|
|
22
|
+
let t = W?.[e];
|
|
23
|
+
return t ? /* @__PURE__ */ S("p", {
|
|
24
|
+
id: Q(e),
|
|
25
|
+
className: "ttw:text-sm ttw:text-destructive ttw:text-right",
|
|
26
|
+
children: t
|
|
27
|
+
}) : null;
|
|
32
28
|
};
|
|
29
|
+
return /* @__PURE__ */ C("section", {
|
|
30
|
+
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
31
|
+
"data-testid": K,
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ S(_, {
|
|
34
|
+
component: "h2",
|
|
35
|
+
variant: "h6",
|
|
36
|
+
className: "ttw:font-semibold",
|
|
37
|
+
children: J.heading
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ S("p", {
|
|
40
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
41
|
+
children: J.helpText
|
|
42
|
+
}),
|
|
43
|
+
M ? /* @__PURE__ */ S("span", {
|
|
44
|
+
id: Z,
|
|
45
|
+
className: "ttw:sr-only",
|
|
46
|
+
children: M
|
|
47
|
+
}) : null,
|
|
48
|
+
t.map((t, f) => {
|
|
49
|
+
let _ = `${Y}-${t.id}`, b = U?.[t.id], x = (e) => `${_}-${e}-error`, k = (e) => b?.[e], N = (e) => {
|
|
50
|
+
let t = k(e);
|
|
51
|
+
return t ? /* @__PURE__ */ S("p", {
|
|
52
|
+
id: x(e),
|
|
53
|
+
className: "ttw:text-sm ttw:text-destructive",
|
|
54
|
+
children: t
|
|
55
|
+
}) : null;
|
|
56
|
+
};
|
|
57
|
+
return /* @__PURE__ */ S("div", {
|
|
58
|
+
className: "ttw:rounded-lg ttw:bg-muted ttw:p-4",
|
|
59
|
+
children: /* @__PURE__ */ C("div", {
|
|
60
|
+
className: "ttw:@container/line-item ttw:flex ttw:flex-col ttw:gap-3",
|
|
61
|
+
children: [
|
|
62
|
+
/* @__PURE__ */ C("div", {
|
|
63
|
+
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-2",
|
|
64
|
+
children: [/* @__PURE__ */ C("div", {
|
|
65
|
+
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
66
|
+
children: [X ? /* @__PURE__ */ C("span", {
|
|
67
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
68
|
+
children: [f + 1, "."]
|
|
69
|
+
}) : null, /* @__PURE__ */ S(o, {
|
|
70
|
+
htmlFor: `${_}-description`,
|
|
71
|
+
requirement: O.description,
|
|
72
|
+
labels: J.fieldMarkers,
|
|
73
|
+
children: J.description
|
|
74
|
+
})]
|
|
75
|
+
}), X ? /* @__PURE__ */ S(y, {
|
|
76
|
+
label: J.removeLineItem(f + 1),
|
|
77
|
+
icon: E,
|
|
78
|
+
disabled: G,
|
|
79
|
+
onClick: t.onRemove
|
|
80
|
+
}) : null]
|
|
81
|
+
}),
|
|
82
|
+
/* @__PURE__ */ C("div", {
|
|
83
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
84
|
+
children: [/* @__PURE__ */ S(n, {
|
|
85
|
+
id: `${_}-description`,
|
|
86
|
+
placeholder: J.descriptionPlaceholder,
|
|
87
|
+
value: t.description,
|
|
88
|
+
disabled: G,
|
|
89
|
+
"aria-required": !0,
|
|
90
|
+
"aria-invalid": k("description") ? !0 : void 0,
|
|
91
|
+
"aria-describedby": k("description") ? x("description") : void 0,
|
|
92
|
+
onChange: (e) => t.onChange({ description: e.target.value })
|
|
93
|
+
}), N("description")]
|
|
94
|
+
}),
|
|
95
|
+
/* @__PURE__ */ C("div", {
|
|
96
|
+
className: "ttw:grid ttw:grid-cols-1 ttw:@sm/line-item:grid-cols-3 ttw:@4xl/line-item:grid-cols-12 ttw:gap-3",
|
|
97
|
+
children: [
|
|
98
|
+
/* @__PURE__ */ C("div", {
|
|
99
|
+
className: "ttw:col-span-1 ttw:@sm/line-item:col-span-3 ttw:@4xl/line-item:col-span-5 ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
100
|
+
children: [
|
|
101
|
+
/* @__PURE__ */ C("div", {
|
|
102
|
+
className: "ttw:flex ttw:items-center ttw:gap-1",
|
|
103
|
+
children: [/* @__PURE__ */ S(o, {
|
|
104
|
+
htmlFor: `${_}-gl-code`,
|
|
105
|
+
requirement: O.glCode,
|
|
106
|
+
labels: J.fieldMarkers,
|
|
107
|
+
children: J.glCode
|
|
108
|
+
}), M ? /* @__PURE__ */ S(h, { children: /* @__PURE__ */ C(p, { children: [/* @__PURE__ */ S(g, {
|
|
109
|
+
type: "button",
|
|
110
|
+
className: "ttw:inline-flex ttw:shrink-0 ttw:cursor-help ttw:text-muted-foreground",
|
|
111
|
+
"aria-label": M,
|
|
112
|
+
children: /* @__PURE__ */ S(w, { className: "ttw:size-4" })
|
|
113
|
+
}), /* @__PURE__ */ S(m, { children: M })] }) }) : null]
|
|
114
|
+
}),
|
|
115
|
+
/* @__PURE__ */ C("div", {
|
|
116
|
+
className: "ttw:relative",
|
|
117
|
+
children: [/* @__PURE__ */ C(s, {
|
|
118
|
+
value: t.glCode,
|
|
119
|
+
disabled: G || j,
|
|
120
|
+
onValueChange: (e) => t.onChange({ glCode: e }),
|
|
121
|
+
children: [/* @__PURE__ */ S(u, {
|
|
122
|
+
id: `${_}-gl-code`,
|
|
123
|
+
className: v("ttw:w-full", t.glCode && "ttw:[&>svg:last-child]:hidden!"),
|
|
124
|
+
"aria-invalid": k("glCode") ? !0 : void 0,
|
|
125
|
+
"aria-describedby": [k("glCode") ? x("glCode") : null, Z].filter(Boolean).join(" ") || void 0,
|
|
126
|
+
children: /* @__PURE__ */ S(d, { placeholder: J.glCodePlaceholder })
|
|
127
|
+
}), /* @__PURE__ */ S(c, { children: A.map((e) => /* @__PURE__ */ S(l, {
|
|
128
|
+
value: e.value,
|
|
129
|
+
children: e.label
|
|
130
|
+
}, e.value)) })]
|
|
131
|
+
}), t.glCode && !(G || j) ? /* @__PURE__ */ S(e, {
|
|
132
|
+
type: "button",
|
|
133
|
+
variant: "ghost",
|
|
134
|
+
size: "icon-sm",
|
|
135
|
+
"aria-label": J.glCodeClear,
|
|
136
|
+
className: "ttw:absolute ttw:top-1/2 ttw:right-1 ttw:-translate-y-1/2",
|
|
137
|
+
onPointerDown: (e) => {
|
|
138
|
+
e.preventDefault(), e.stopPropagation();
|
|
139
|
+
},
|
|
140
|
+
onClick: (e) => {
|
|
141
|
+
e.preventDefault(), e.stopPropagation(), t.onChange({ glCode: "" });
|
|
142
|
+
},
|
|
143
|
+
children: /* @__PURE__ */ S(D, {
|
|
144
|
+
className: "ttw:size-4",
|
|
145
|
+
"aria-hidden": !0
|
|
146
|
+
})
|
|
147
|
+
}) : null]
|
|
148
|
+
}),
|
|
149
|
+
N("glCode")
|
|
150
|
+
]
|
|
151
|
+
}),
|
|
152
|
+
/* @__PURE__ */ C("div", {
|
|
153
|
+
className: "ttw:col-span-1 ttw:@4xl/line-item:col-span-3 ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
154
|
+
children: [
|
|
155
|
+
/* @__PURE__ */ S(o, {
|
|
156
|
+
htmlFor: `${_}-quantity`,
|
|
157
|
+
requirement: O.quantity,
|
|
158
|
+
labels: J.fieldMarkers,
|
|
159
|
+
children: J.quantity
|
|
160
|
+
}),
|
|
161
|
+
/* @__PURE__ */ C(r, {
|
|
162
|
+
className: "ttw:h-9 ttw:rounded-md ttw:border ttw:border-input ttw:shadow-xs ttw:has-[:focus-visible]:border-ring ttw:has-[:focus-visible]:ring-[3px] ttw:has-[:focus-visible]:ring-ring/50 ttw:has-[[aria-invalid=true]]:border-destructive ttw:has-[[aria-invalid=true]]:ring-destructive/20",
|
|
163
|
+
children: [
|
|
164
|
+
/* @__PURE__ */ S(e, {
|
|
165
|
+
type: "button",
|
|
166
|
+
variant: "ghost",
|
|
167
|
+
size: "icon",
|
|
168
|
+
className: "ttw:h-full ttw:shrink-0 ttw:rounded-r-none",
|
|
169
|
+
disabled: G,
|
|
170
|
+
"aria-label": J.decreaseQuantity(f + 1),
|
|
171
|
+
onClick: () => t.onQuantityStep(-1),
|
|
172
|
+
children: /* @__PURE__ */ S(T, { className: "ttw:size-3.5" })
|
|
173
|
+
}),
|
|
174
|
+
/* @__PURE__ */ S(a, {
|
|
175
|
+
id: `${_}-quantity`,
|
|
176
|
+
inputMode: "decimal",
|
|
177
|
+
className: "ttw:min-w-0 ttw:flex-1 ttw:rounded-none ttw:border-0 ttw:text-center ttw:shadow-none ttw:focus-visible:ring-0",
|
|
178
|
+
value: t.quantity,
|
|
179
|
+
disabled: G,
|
|
180
|
+
"aria-required": !0,
|
|
181
|
+
"aria-invalid": k("quantity") ? !0 : void 0,
|
|
182
|
+
"aria-describedby": k("quantity") ? x("quantity") : void 0,
|
|
183
|
+
onChange: (e) => t.onChange({ quantity: e.target.value })
|
|
184
|
+
}),
|
|
185
|
+
/* @__PURE__ */ S(e, {
|
|
186
|
+
type: "button",
|
|
187
|
+
variant: "ghost",
|
|
188
|
+
size: "icon",
|
|
189
|
+
className: "ttw:h-full ttw:shrink-0 ttw:rounded-l-none",
|
|
190
|
+
disabled: G,
|
|
191
|
+
"aria-label": J.increaseQuantity(f + 1),
|
|
192
|
+
onClick: () => t.onQuantityStep(1),
|
|
193
|
+
children: /* @__PURE__ */ S(ee, { className: "ttw:size-3.5" })
|
|
194
|
+
})
|
|
195
|
+
]
|
|
196
|
+
}),
|
|
197
|
+
N("quantity")
|
|
198
|
+
]
|
|
199
|
+
}),
|
|
200
|
+
/* @__PURE__ */ C("div", {
|
|
201
|
+
className: "ttw:col-span-1 ttw:@4xl/line-item:col-span-2 ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
202
|
+
children: [
|
|
203
|
+
/* @__PURE__ */ S(o, {
|
|
204
|
+
htmlFor: `${_}-price`,
|
|
205
|
+
requirement: O.price,
|
|
206
|
+
labels: J.fieldMarkers,
|
|
207
|
+
children: J.price
|
|
208
|
+
}),
|
|
209
|
+
/* @__PURE__ */ C(r, { children: [/* @__PURE__ */ S(i, {
|
|
210
|
+
align: "inline-start",
|
|
211
|
+
"aria-hidden": !0,
|
|
212
|
+
children: J.currencySymbol
|
|
213
|
+
}), /* @__PURE__ */ S(a, {
|
|
214
|
+
id: `${_}-price`,
|
|
215
|
+
"data-has-start-addon": !0,
|
|
216
|
+
inputMode: "decimal",
|
|
217
|
+
className: "ttw:text-right ttw:aria-invalid:border-destructive ttw:aria-invalid:ring-destructive/20",
|
|
218
|
+
value: t.price,
|
|
219
|
+
disabled: G,
|
|
220
|
+
"aria-required": !0,
|
|
221
|
+
"aria-invalid": k("price") ? !0 : void 0,
|
|
222
|
+
"aria-describedby": k("price") ? x("price") : void 0,
|
|
223
|
+
onChange: (e) => t.onChange({ price: e.target.value }),
|
|
224
|
+
onBlur: () => t.onBlur?.("price")
|
|
225
|
+
})] }),
|
|
226
|
+
N("price")
|
|
227
|
+
]
|
|
228
|
+
}),
|
|
229
|
+
/* @__PURE__ */ C("div", {
|
|
230
|
+
className: "ttw:col-span-1 ttw:@4xl/line-item:col-span-2 ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
231
|
+
children: [
|
|
232
|
+
/* @__PURE__ */ S(o, {
|
|
233
|
+
htmlFor: `${_}-amount`,
|
|
234
|
+
requirement: O.amount,
|
|
235
|
+
labels: J.fieldMarkers,
|
|
236
|
+
children: J.amount
|
|
237
|
+
}),
|
|
238
|
+
/* @__PURE__ */ C(r, { children: [/* @__PURE__ */ S(i, {
|
|
239
|
+
align: "inline-start",
|
|
240
|
+
"aria-hidden": !0,
|
|
241
|
+
children: J.currencySymbol
|
|
242
|
+
}), /* @__PURE__ */ S(a, {
|
|
243
|
+
id: `${_}-amount`,
|
|
244
|
+
"data-has-start-addon": !0,
|
|
245
|
+
inputMode: "decimal",
|
|
246
|
+
className: "ttw:text-right ttw:aria-invalid:border-destructive ttw:aria-invalid:ring-destructive/20",
|
|
247
|
+
value: t.amount,
|
|
248
|
+
disabled: G,
|
|
249
|
+
"aria-required": !0,
|
|
250
|
+
"aria-invalid": k("amount") ? !0 : void 0,
|
|
251
|
+
"aria-describedby": k("amount") ? x("amount") : void 0,
|
|
252
|
+
onChange: (e) => t.onChange({ amount: e.target.value }),
|
|
253
|
+
onBlur: () => t.onBlur?.("amount")
|
|
254
|
+
})] }),
|
|
255
|
+
N("amount")
|
|
256
|
+
]
|
|
257
|
+
})
|
|
258
|
+
]
|
|
259
|
+
})
|
|
260
|
+
]
|
|
261
|
+
})
|
|
262
|
+
}, t.id);
|
|
263
|
+
}),
|
|
264
|
+
/* @__PURE__ */ S(e, {
|
|
265
|
+
type: "button",
|
|
266
|
+
variant: "link",
|
|
267
|
+
disabled: G,
|
|
268
|
+
className: "ttw:self-start",
|
|
269
|
+
onClick: H,
|
|
270
|
+
children: J.addLineItem
|
|
271
|
+
}),
|
|
272
|
+
/* @__PURE__ */ S(f, {}),
|
|
273
|
+
/* @__PURE__ */ C("div", {
|
|
274
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
275
|
+
children: [
|
|
276
|
+
/* @__PURE__ */ C("div", {
|
|
277
|
+
className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-4",
|
|
278
|
+
children: [/* @__PURE__ */ S(o, {
|
|
279
|
+
htmlFor: `${Y}-discount`,
|
|
280
|
+
requirement: k.discount,
|
|
281
|
+
labels: J.fieldMarkers,
|
|
282
|
+
children: J.discount
|
|
283
|
+
}), /* @__PURE__ */ C("div", {
|
|
284
|
+
className: "ttw:flex ttw:flex-col ttw:items-end ttw:gap-1.5",
|
|
285
|
+
children: [/* @__PURE__ */ C(r, {
|
|
286
|
+
className: "ttw:w-36",
|
|
287
|
+
children: [/* @__PURE__ */ S(i, {
|
|
288
|
+
align: "inline-start",
|
|
289
|
+
"aria-hidden": !0,
|
|
290
|
+
children: J.currencySymbol
|
|
291
|
+
}), /* @__PURE__ */ S(a, {
|
|
292
|
+
id: `${Y}-discount`,
|
|
293
|
+
"data-has-start-addon": !0,
|
|
294
|
+
inputMode: "decimal",
|
|
295
|
+
className: "ttw:text-right ttw:aria-invalid:border-destructive ttw:aria-invalid:ring-destructive/20",
|
|
296
|
+
value: N,
|
|
297
|
+
disabled: G,
|
|
298
|
+
"aria-invalid": W?.discount ? !0 : void 0,
|
|
299
|
+
"aria-describedby": W?.discount ? Q("discount") : void 0,
|
|
300
|
+
onChange: (e) => P(e.target.value),
|
|
301
|
+
onBlur: F
|
|
302
|
+
})]
|
|
303
|
+
}), $("discount")]
|
|
304
|
+
})]
|
|
305
|
+
}),
|
|
306
|
+
/* @__PURE__ */ C("div", {
|
|
307
|
+
className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-4",
|
|
308
|
+
children: [/* @__PURE__ */ S(o, {
|
|
309
|
+
htmlFor: `${Y}-tax`,
|
|
310
|
+
requirement: k.tax,
|
|
311
|
+
labels: J.fieldMarkers,
|
|
312
|
+
children: J.tax
|
|
313
|
+
}), /* @__PURE__ */ C("div", {
|
|
314
|
+
className: "ttw:flex ttw:flex-col ttw:items-end ttw:gap-1.5",
|
|
315
|
+
children: [/* @__PURE__ */ C(r, {
|
|
316
|
+
className: "ttw:w-36",
|
|
317
|
+
children: [/* @__PURE__ */ S(i, {
|
|
318
|
+
align: "inline-start",
|
|
319
|
+
"aria-hidden": !0,
|
|
320
|
+
children: J.currencySymbol
|
|
321
|
+
}), /* @__PURE__ */ S(a, {
|
|
322
|
+
id: `${Y}-tax`,
|
|
323
|
+
"data-has-start-addon": !0,
|
|
324
|
+
inputMode: "decimal",
|
|
325
|
+
className: "ttw:text-right ttw:aria-invalid:border-destructive ttw:aria-invalid:ring-destructive/20",
|
|
326
|
+
value: I,
|
|
327
|
+
disabled: G,
|
|
328
|
+
"aria-invalid": W?.tax ? !0 : void 0,
|
|
329
|
+
"aria-describedby": W?.tax ? Q("tax") : void 0,
|
|
330
|
+
onChange: (e) => L(e.target.value),
|
|
331
|
+
onBlur: R
|
|
332
|
+
})]
|
|
333
|
+
}), $("tax")]
|
|
334
|
+
})]
|
|
335
|
+
}),
|
|
336
|
+
/* @__PURE__ */ C("div", {
|
|
337
|
+
className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-4",
|
|
338
|
+
children: [/* @__PURE__ */ S(o, {
|
|
339
|
+
htmlFor: `${Y}-total`,
|
|
340
|
+
className: "ttw:font-semibold",
|
|
341
|
+
requirement: k.total,
|
|
342
|
+
labels: J.fieldMarkers,
|
|
343
|
+
children: J.totalAmount
|
|
344
|
+
}), /* @__PURE__ */ C("div", {
|
|
345
|
+
className: "ttw:flex ttw:flex-col ttw:items-end ttw:gap-1.5",
|
|
346
|
+
children: [/* @__PURE__ */ C(r, {
|
|
347
|
+
className: "ttw:w-36",
|
|
348
|
+
children: [/* @__PURE__ */ S(i, {
|
|
349
|
+
align: "inline-start",
|
|
350
|
+
"aria-hidden": !0,
|
|
351
|
+
children: J.currencySymbol
|
|
352
|
+
}), /* @__PURE__ */ S(a, {
|
|
353
|
+
id: `${Y}-total`,
|
|
354
|
+
"data-has-start-addon": !0,
|
|
355
|
+
inputMode: "decimal",
|
|
356
|
+
className: "ttw:text-right ttw:font-semibold ttw:aria-invalid:border-destructive ttw:aria-invalid:ring-destructive/20",
|
|
357
|
+
value: z,
|
|
358
|
+
disabled: G,
|
|
359
|
+
"aria-required": !0,
|
|
360
|
+
"aria-invalid": W?.total ? !0 : void 0,
|
|
361
|
+
"aria-describedby": W?.total ? Q("total") : void 0,
|
|
362
|
+
onChange: (e) => B(e.target.value),
|
|
363
|
+
onBlur: V
|
|
364
|
+
})]
|
|
365
|
+
}), $("total")]
|
|
366
|
+
})]
|
|
367
|
+
})
|
|
368
|
+
]
|
|
369
|
+
})
|
|
370
|
+
]
|
|
371
|
+
});
|
|
33
372
|
}
|
|
34
|
-
export {
|
|
373
|
+
export { A as LineItemsSection, A as default };
|