@tesouro/embedded-components-react 0.3.41 → 0.3.42
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 +3 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +34 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +146 -140
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +191 -159
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -6200,6 +6200,9 @@
|
|
|
6200
6200
|
.ttw\:group-data-\[size\=sm\]\/avatar\:\[\&\>svg\]\:hidden:is(:where(.ttw\:group\/avatar)[data-size="sm"] *) > svg {
|
|
6201
6201
|
display: none;
|
|
6202
6202
|
}
|
|
6203
|
+
.ttw\:\[\&\>svg\:last-child\]\:hidden\! > svg:last-child {
|
|
6204
|
+
display: none !important;
|
|
6205
|
+
}
|
|
6203
6206
|
.ttw\:\[\&\>svg\:not\(\[class\*\=size-\]\)\]\:size-3\.5 > svg:not([class*=size-]) {
|
|
6204
6207
|
width: calc(var(--ttw-spacing) * 3.5);
|
|
6205
6208
|
height: calc(var(--ttw-spacing) * 3.5);
|
|
@@ -4,72 +4,72 @@ import { resolveVendor as n } from "./index7.js";
|
|
|
4
4
|
import { derivePayableStatus as r } from "./index25.js";
|
|
5
5
|
import { formatBillMoney as i } from "./index26.js";
|
|
6
6
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js
|
|
7
|
-
function a({ payable: a, lineItems: o, glCodeOptions: s,
|
|
8
|
-
let
|
|
7
|
+
function a({ payable: a, lineItems: o, glCodeOptions: s, glCodeRosterAvailable: c = !0, history: l, approvalPolicy: u, labels: d, hasScheduledPayment: f }) {
|
|
8
|
+
let p = a.currency, m = r({
|
|
9
9
|
apiStatus: a.status,
|
|
10
10
|
dueDate: a.due_date,
|
|
11
11
|
scheduledPaymentDate: a.scheduled_payment_date,
|
|
12
|
-
hasScheduledPayment:
|
|
13
|
-
}),
|
|
12
|
+
hasScheduledPayment: f
|
|
13
|
+
}), h = n(a), g = h?.bank_account?.account_number, _ = e(a.issued_at) || d.notProvided, v = e(a.due_date) || d.notProvided, y = new Map(s.map((e) => [e.value, e.label])), b = [
|
|
14
14
|
{
|
|
15
|
-
label:
|
|
15
|
+
label: d.subtotalRow,
|
|
16
16
|
minorUnits: a.subtotal
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
|
-
label:
|
|
19
|
+
label: d.discountRow,
|
|
20
20
|
minorUnits: a.discount
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
label:
|
|
23
|
+
label: d.taxRow,
|
|
24
24
|
minorUnits: a.tax_amount
|
|
25
25
|
}
|
|
26
26
|
].map((e) => ({
|
|
27
27
|
label: e.label,
|
|
28
|
-
value: i(e.minorUnits,
|
|
29
|
-
})).filter((e) => !!e.value),
|
|
30
|
-
return
|
|
31
|
-
label:
|
|
32
|
-
value:
|
|
28
|
+
value: i(e.minorUnits, p)
|
|
29
|
+
})).filter((e) => !!e.value), x = i(a.total_amount, p);
|
|
30
|
+
return x && b.push({
|
|
31
|
+
label: d.totalRow,
|
|
32
|
+
value: x,
|
|
33
33
|
emphasis: !0
|
|
34
34
|
}), {
|
|
35
|
-
amountDue: i(t(a),
|
|
36
|
-
invoiceDateLabel:
|
|
37
|
-
dueDateLabel:
|
|
38
|
-
dueDateTone:
|
|
39
|
-
status:
|
|
40
|
-
statusTone:
|
|
35
|
+
amountDue: i(t(a), p) ?? "",
|
|
36
|
+
invoiceDateLabel: _,
|
|
37
|
+
dueDateLabel: v,
|
|
38
|
+
dueDateTone: m.isOverdue ? "danger" : "default",
|
|
39
|
+
status: m.status,
|
|
40
|
+
statusTone: m.tone,
|
|
41
41
|
payTo: {
|
|
42
|
-
name:
|
|
43
|
-
email:
|
|
44
|
-
paymentInstructionsLabel:
|
|
42
|
+
name: h?.name || d.notProvided,
|
|
43
|
+
email: h?.email ?? void 0,
|
|
44
|
+
paymentInstructionsLabel: g ? d.paymentInstructionsValue(g.slice(-4)) : void 0
|
|
45
45
|
},
|
|
46
46
|
invoiceFields: [
|
|
47
47
|
{
|
|
48
|
-
label:
|
|
49
|
-
value:
|
|
48
|
+
label: d.invoiceDateRow,
|
|
49
|
+
value: _
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
|
-
label:
|
|
53
|
-
value:
|
|
52
|
+
label: d.dueDateRow,
|
|
53
|
+
value: v
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
|
-
label:
|
|
57
|
-
value: a.document_id ||
|
|
56
|
+
label: d.invoiceNumberRow,
|
|
57
|
+
value: a.document_id || d.notProvided
|
|
58
58
|
}
|
|
59
59
|
],
|
|
60
60
|
lineItems: o.map((e) => {
|
|
61
|
-
let t = i(e.unit_price,
|
|
61
|
+
let t = i(e.unit_price, p);
|
|
62
62
|
return {
|
|
63
63
|
id: e.id,
|
|
64
64
|
description: e.name ?? e.description ?? "",
|
|
65
|
-
glCodeLabel:
|
|
66
|
-
qtyPriceLabel: e.quantity != null && t ?
|
|
67
|
-
amount: i(e.subtotal,
|
|
65
|
+
glCodeLabel: e.ledger_account_id ? y.get(e.ledger_account_id) ?? (c ? d.glCodeMissing : d.glCodeUnavailable) : d.glCodeMissing,
|
|
66
|
+
qtyPriceLabel: e.quantity != null && t ? d.qtyPriceValue(String(e.quantity), t) : "",
|
|
67
|
+
amount: i(e.subtotal, p) ?? ""
|
|
68
68
|
};
|
|
69
69
|
}),
|
|
70
|
-
amountRows:
|
|
71
|
-
approvalPolicy:
|
|
72
|
-
history:
|
|
70
|
+
amountRows: b,
|
|
71
|
+
approvalPolicy: u,
|
|
72
|
+
history: l
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
//#endregion
|
|
@@ -42,6 +42,7 @@ var u = {
|
|
|
42
42
|
dueDateRow: "Due date",
|
|
43
43
|
invoiceNumberRow: "Invoice number",
|
|
44
44
|
glCodeMissing: "GL code not specified",
|
|
45
|
+
glCodeUnavailable: "GL code unavailable",
|
|
45
46
|
qtyPriceValue: (e, t) => `${e} x ${t}`,
|
|
46
47
|
subtotalRow: "Subtotal",
|
|
47
48
|
taxRow: "Tax",
|
|
@@ -95,6 +96,11 @@ var u = {
|
|
|
95
96
|
confirmButton: "Delete draft"
|
|
96
97
|
},
|
|
97
98
|
error: "Couldn't delete this draft. Try again."
|
|
99
|
+
},
|
|
100
|
+
lineItemsGlCodeUnavailable: {
|
|
101
|
+
loadError: "Couldn't load GL codes",
|
|
102
|
+
noAccess: "You don't have access to GL codes",
|
|
103
|
+
empty: "No GL codes set up yet"
|
|
98
104
|
}
|
|
99
105
|
};
|
|
100
106
|
function g(e) {
|
|
@@ -112,6 +118,10 @@ function g(e) {
|
|
|
112
118
|
},
|
|
113
119
|
payBill: n(e?.payBill),
|
|
114
120
|
markAsPaid: i(e?.markAsPaid),
|
|
121
|
+
lineItemsGlCodeUnavailable: {
|
|
122
|
+
...h.lineItemsGlCodeUnavailable,
|
|
123
|
+
...e?.lineItemsGlCodeUnavailable
|
|
124
|
+
},
|
|
115
125
|
unsavedChanges: {
|
|
116
126
|
...h.unsavedChanges,
|
|
117
127
|
...e?.unsavedChanges
|
|
@@ -48,224 +48,230 @@ function je(e) {
|
|
|
48
48
|
return !!(e?.bank_account?.account_holder_name && e.bank_account.routing_number && e.bank_account.account_number);
|
|
49
49
|
}
|
|
50
50
|
function u({ open: u, onOpenChange: d, payableId: f, readOnly: p = !1, copy: m, onCollapse: Me, poweredByBankName: Ne, isPossibleDuplicate: Pe }) {
|
|
51
|
-
let h = a(() => ge(m), [m]), [g, _] = o(), [v, y] = o(!1), [Fe, Ie] = o(!1), [Le, b] = o(!1), [Re, x] = o(!1), [ze, S] = o(), C = f ?? ze, w = pe(C, { pollWhileOcrProcessing: !0 }), T = fe(C), E =
|
|
52
|
-
payable:
|
|
51
|
+
let h = a(() => ge(m), [m]), [g, _] = o(), [v, y] = o(!1), [Fe, Ie] = o(!1), [Le, b] = o(!1), [Re, x] = o(!1), [ze, S] = o(), C = f ?? ze, w = pe(C, { pollWhileOcrProcessing: !0 }), T = fe(C), { initResponse: E } = re(), D = !!E, O = e(E?.scopes, [t.AccountingConfigReadOrg]), k = ee({ enabled: O }), A = w.data, j = ve({
|
|
52
|
+
payable: A,
|
|
53
53
|
lineItems: T.lineItems
|
|
54
|
-
}),
|
|
54
|
+
}), M = A?.counterpart_id;
|
|
55
55
|
ke(() => {
|
|
56
|
-
v ||
|
|
57
|
-
}, [v,
|
|
56
|
+
v || M && (_(M), y(!0));
|
|
57
|
+
}, [v, M]);
|
|
58
58
|
let Be = i((e) => {
|
|
59
59
|
y(!0), _(e);
|
|
60
|
-
}, []),
|
|
60
|
+
}, []), N = De({
|
|
61
61
|
payableId: p ? void 0 : C,
|
|
62
62
|
counterpartId: p ? void 0 : g,
|
|
63
|
-
payableCounterpartId:
|
|
63
|
+
payableCounterpartId: M,
|
|
64
64
|
onCounterpartChange: Be,
|
|
65
|
-
requiredError:
|
|
66
|
-
payableCounterpartBankAccountId:
|
|
67
|
-
extractedVendor:
|
|
68
|
-
}),
|
|
65
|
+
requiredError: j.errors?.vendor,
|
|
66
|
+
payableCounterpartBankAccountId: A?.counterpart_bank_account_id ?? void 0,
|
|
67
|
+
extractedVendor: A?.counterpart_raw_data ?? void 0
|
|
68
|
+
}), P = _e({
|
|
69
69
|
payableId: f,
|
|
70
|
-
form:
|
|
70
|
+
form: j,
|
|
71
71
|
counterpartId: g,
|
|
72
72
|
clearCounterpart: !!(C && v) && !g,
|
|
73
|
-
prepareVendorForSave:
|
|
73
|
+
prepareVendorForSave: N.savePaymentInstructions,
|
|
74
74
|
onPayableCreated: S,
|
|
75
75
|
onSaved: S,
|
|
76
76
|
onDraftSaved: () => d(!1),
|
|
77
77
|
onFinalized: () => d(!1)
|
|
78
|
-
}),
|
|
79
|
-
payableId:
|
|
80
|
-
status:
|
|
81
|
-
}),
|
|
78
|
+
}), F = !!(P.isSavingDraft || P.isFinalizing), I = p ? C : void 0, L = be({
|
|
79
|
+
payableId: I,
|
|
80
|
+
status: A?.status
|
|
81
|
+
}), R = Ae(null), z = Se({
|
|
82
82
|
payableId: C,
|
|
83
|
-
scheduledPaymentDate:
|
|
83
|
+
scheduledPaymentDate: A?.scheduled_payment_date,
|
|
84
84
|
enabled: p
|
|
85
|
-
}),
|
|
86
|
-
payableId:
|
|
87
|
-
counterpartId: p ?
|
|
85
|
+
}), B = ae(A), V = Oe({
|
|
86
|
+
payableId: I,
|
|
87
|
+
counterpartId: p ? M : void 0,
|
|
88
88
|
saveErrorMessage: h.detail.paymentInstructionsSaveError,
|
|
89
89
|
linkErrorMessage: h.detail.paymentInstructionsLinkError
|
|
90
|
-
}),
|
|
91
|
-
payableId:
|
|
92
|
-
amountDueMinorUnits: ie(
|
|
93
|
-
amountToPayMinorUnits:
|
|
94
|
-
currencyCode:
|
|
95
|
-
dueDate:
|
|
96
|
-
hasScheduledPayment:
|
|
90
|
+
}), H = e(E?.scopes, [t.CounterpartWriteOrg]) && e(E?.scopes, [t.PayableWriteOrg]), U = he({
|
|
91
|
+
payableId: I,
|
|
92
|
+
amountDueMinorUnits: ie(A) ?? 0,
|
|
93
|
+
amountToPayMinorUnits: A?.amount_to_pay ?? void 0,
|
|
94
|
+
currencyCode: A?.currency ?? void 0,
|
|
95
|
+
dueDate: A?.due_date,
|
|
96
|
+
hasScheduledPayment: z.hasScheduledPayment,
|
|
97
97
|
labels: h.markAsPaid
|
|
98
|
-
}),
|
|
99
|
-
payableId:
|
|
100
|
-
approvalPolicyId:
|
|
98
|
+
}), W = ye({
|
|
99
|
+
payableId: I,
|
|
100
|
+
approvalPolicyId: A?.approval_policy_id,
|
|
101
101
|
enabled: p,
|
|
102
102
|
copy: h.approvalPolicyCopy
|
|
103
103
|
}), { actions: Ve, decisionDialog: He } = xe({
|
|
104
|
-
payableId:
|
|
105
|
-
status:
|
|
106
|
-
currentApprovalRequestId:
|
|
107
|
-
isPolicyApprover:
|
|
108
|
-
hasWaitingRequest:
|
|
109
|
-
hasScheduledPayment:
|
|
110
|
-
scheduledPaymentIntentId:
|
|
111
|
-
isScheduledPaymentUnknown:
|
|
112
|
-
pendingApprovers:
|
|
104
|
+
payableId: I,
|
|
105
|
+
status: A?.status,
|
|
106
|
+
currentApprovalRequestId: L.id,
|
|
107
|
+
isPolicyApprover: L.isPolicyApprover,
|
|
108
|
+
hasWaitingRequest: L.hasWaitingRequest,
|
|
109
|
+
hasScheduledPayment: z.hasScheduledPayment,
|
|
110
|
+
scheduledPaymentIntentId: z.scheduledPaymentIntentId,
|
|
111
|
+
isScheduledPaymentUnknown: z.isResolving,
|
|
112
|
+
pendingApprovers: W.pendingApprovers,
|
|
113
113
|
labels: h.actions,
|
|
114
|
-
isMarkAsPaidPending:
|
|
115
|
-
onMarkAsPaidSelect:
|
|
116
|
-
onPayBillSelect: () => je(
|
|
117
|
-
}),
|
|
114
|
+
isMarkAsPaidPending: U.isPending,
|
|
115
|
+
onMarkAsPaidSelect: U.open,
|
|
116
|
+
onPayBillSelect: () => je(B) || !H ? R.current?.open() : V.open()
|
|
117
|
+
}), G = Ce({
|
|
118
118
|
payableId: C,
|
|
119
|
-
status:
|
|
119
|
+
status: A?.status,
|
|
120
120
|
enabled: !p,
|
|
121
121
|
labels: h.deleteDraft,
|
|
122
122
|
onDeleted: () => d(!1)
|
|
123
|
-
}),
|
|
123
|
+
}), K = a(() => (k.data?.data ?? []).map((e) => ({
|
|
124
124
|
value: e.id,
|
|
125
125
|
label: [e.nominal_code, e.name].filter(Boolean).join(" — ")
|
|
126
|
-
})), [
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
})), [k.data]), q;
|
|
127
|
+
D && (O ? k.isError ? q = h.lineItemsGlCodeUnavailable.loadError : !k.isResolving && K.length === 0 && (q = h.lineItemsGlCodeUnavailable.empty) : q = h.lineItemsGlCodeUnavailable.noAccess);
|
|
128
|
+
let Ue = !D || !!q || k.isResolving, J = O && !k.isResolving && !k.isError, Y = de(I), We = e(E?.scopes, [t.UserReadOrg]), X = te({ enabled: p && We }), Ge = a(() => Te(Y.data?.data ?? [], X.data?.data ?? [], h.history), [
|
|
129
|
+
Y.data,
|
|
130
|
+
X.data,
|
|
129
131
|
h.history
|
|
130
|
-
]),
|
|
131
|
-
payable:
|
|
132
|
+
]), Ke = a(() => p && A ? we({
|
|
133
|
+
payable: A,
|
|
132
134
|
lineItems: T.lineItems,
|
|
133
|
-
glCodeOptions:
|
|
134
|
-
|
|
135
|
-
|
|
135
|
+
glCodeOptions: K,
|
|
136
|
+
glCodeRosterAvailable: J,
|
|
137
|
+
history: Ge,
|
|
138
|
+
approvalPolicy: W.view,
|
|
136
139
|
labels: h.detail,
|
|
137
|
-
hasScheduledPayment:
|
|
140
|
+
hasScheduledPayment: z.hasScheduledPayment
|
|
138
141
|
}) : void 0, [
|
|
139
|
-
|
|
140
|
-
|
|
142
|
+
z.hasScheduledPayment,
|
|
143
|
+
W.view,
|
|
141
144
|
h.detail,
|
|
142
|
-
|
|
143
|
-
|
|
145
|
+
K,
|
|
146
|
+
J,
|
|
147
|
+
Ge,
|
|
144
148
|
T.lineItems,
|
|
145
|
-
|
|
149
|
+
A,
|
|
146
150
|
p
|
|
147
|
-
]),
|
|
148
|
-
let e =
|
|
151
|
+
]), qe = A?.source_of_payable_data === "ocr", Z = B?.name, Je = p ? Z ? h.viewTitle(Z) : h.readOnlyTitle : qe && Z ? h.extractedTitle(Z) : h.newTitle, Ye = p && A?.created_at ? h.addedOn(ne(A.created_at.slice(0, 10))) : void 0, Q = i(() => {
|
|
152
|
+
let e = j.isDirty || N.hasUnsavedVendorChanges || !!P.stagedFile || P.isFileDeletionPending;
|
|
149
153
|
if (!p && e) {
|
|
150
154
|
x(!0);
|
|
151
155
|
return;
|
|
152
156
|
}
|
|
153
157
|
d(!1);
|
|
154
158
|
}, [
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
159
|
+
P.isFileDeletionPending,
|
|
160
|
+
P.stagedFile,
|
|
161
|
+
j.isDirty,
|
|
158
162
|
d,
|
|
159
163
|
p,
|
|
160
|
-
|
|
161
|
-
]),
|
|
164
|
+
N.hasUnsavedVendorChanges
|
|
165
|
+
]), Xe = i(() => {
|
|
162
166
|
x(!1), d(!1);
|
|
163
|
-
}, [d]),
|
|
164
|
-
if (
|
|
165
|
-
let e = await
|
|
167
|
+
}, [d]), $ = T.isResolving || N.mode === "creating", Ze = i(async () => {
|
|
168
|
+
if ($) return;
|
|
169
|
+
let e = await P.saveDraft();
|
|
166
170
|
x(!1), e && d(!1);
|
|
167
171
|
}, [
|
|
168
|
-
|
|
169
|
-
|
|
172
|
+
P,
|
|
173
|
+
$,
|
|
170
174
|
d
|
|
171
|
-
]),
|
|
172
|
-
if (!
|
|
175
|
+
]), Qe = i((e) => {
|
|
176
|
+
if (!F) return e ? d(!0) : Q();
|
|
173
177
|
}, [
|
|
174
|
-
|
|
175
|
-
|
|
178
|
+
Q,
|
|
179
|
+
F,
|
|
176
180
|
d
|
|
177
|
-
]),
|
|
181
|
+
]), $e = !!Pe && !Le, et = !p && qe && !Fe, tt = $e || et ? /* @__PURE__ */ l(s, { children: [$e ? /* @__PURE__ */ c(se, {
|
|
178
182
|
onNotADuplicate: p ? void 0 : () => b(!0),
|
|
179
183
|
onRemoveBill: p ? void 0 : () => b(!0),
|
|
180
184
|
testId: r.duplicateNotice
|
|
181
|
-
}) : null,
|
|
185
|
+
}) : null, et ? /* @__PURE__ */ c(ce, { onDismiss: () => Ie(!0) }) : null] }) : void 0;
|
|
182
186
|
return /* @__PURE__ */ l(s, { children: [
|
|
183
187
|
/* @__PURE__ */ c(oe, {
|
|
184
188
|
open: u,
|
|
185
|
-
onOpenChange:
|
|
186
|
-
title:
|
|
187
|
-
subtitle:
|
|
188
|
-
notice:
|
|
189
|
+
onOpenChange: Qe,
|
|
190
|
+
title: Je,
|
|
191
|
+
subtitle: Ye,
|
|
192
|
+
notice: tt,
|
|
189
193
|
vendor: {
|
|
190
|
-
...
|
|
194
|
+
...N,
|
|
191
195
|
testId: r.vendorSection
|
|
192
196
|
},
|
|
193
|
-
values:
|
|
194
|
-
errors:
|
|
195
|
-
onChange:
|
|
197
|
+
values: j.values,
|
|
198
|
+
errors: j.errors,
|
|
199
|
+
onChange: j.onChange,
|
|
196
200
|
lineItems: {
|
|
197
|
-
items:
|
|
198
|
-
glCodeOptions:
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
201
|
+
items: j.lineItemRows,
|
|
202
|
+
glCodeOptions: K,
|
|
203
|
+
glCodeDisabled: Ue,
|
|
204
|
+
glCodeUnavailableMessage: q,
|
|
205
|
+
discount: j.discount,
|
|
206
|
+
onDiscountChange: j.onDiscountChange,
|
|
207
|
+
tax: j.tax,
|
|
208
|
+
onTaxChange: j.onTaxChange,
|
|
209
|
+
total: j.total,
|
|
210
|
+
onTotalChange: j.onTotalChange,
|
|
211
|
+
onAddLineItem: j.onAddLineItem,
|
|
212
|
+
errors: j.lineItemErrors,
|
|
207
213
|
testId: r.lineItems
|
|
208
214
|
},
|
|
209
215
|
documentPanel: /* @__PURE__ */ c(Ee, {
|
|
210
216
|
payableId: C,
|
|
211
217
|
readOnly: p,
|
|
212
|
-
isDocumentPending: !!C && !
|
|
213
|
-
file:
|
|
214
|
-
id:
|
|
215
|
-
name:
|
|
216
|
-
url:
|
|
217
|
-
mimetype:
|
|
218
|
+
isDocumentPending: !!C && !A?.file && (w.isLoading || A?.ocr_status === "processing"),
|
|
219
|
+
file: A?.file ? {
|
|
220
|
+
id: A.file.id,
|
|
221
|
+
name: A.file.name,
|
|
222
|
+
url: A.file.url,
|
|
223
|
+
mimetype: A.file.mimetype
|
|
218
224
|
} : void 0,
|
|
219
225
|
staging: {
|
|
220
|
-
stagedFile:
|
|
221
|
-
onFileStaged:
|
|
222
|
-
onClearStagedFile:
|
|
223
|
-
isSaving:
|
|
226
|
+
stagedFile: P.stagedFile,
|
|
227
|
+
onFileStaged: P.stageFile,
|
|
228
|
+
onClearStagedFile: P.clearStagedFile,
|
|
229
|
+
isSaving: F
|
|
224
230
|
},
|
|
225
231
|
deletion: {
|
|
226
|
-
isPending:
|
|
227
|
-
onRequest:
|
|
228
|
-
onDetachNow:
|
|
229
|
-
isDeleting:
|
|
230
|
-
hasFailed:
|
|
232
|
+
isPending: P.isFileDeletionPending,
|
|
233
|
+
onRequest: P.requestFileDeletion,
|
|
234
|
+
onDetachNow: P.detachFileNow,
|
|
235
|
+
isDeleting: P.isDeletingFile,
|
|
236
|
+
hasFailed: P.hasFileDeletionFailed
|
|
231
237
|
}
|
|
232
238
|
}),
|
|
233
|
-
menuItems:
|
|
239
|
+
menuItems: G.menuItems,
|
|
234
240
|
readOnly: p,
|
|
235
241
|
detail: p ? {
|
|
236
|
-
view:
|
|
242
|
+
view: Ke,
|
|
237
243
|
actions: Ve,
|
|
238
|
-
scheduledSummary:
|
|
239
|
-
paymentInstructionsForm:
|
|
240
|
-
isOpen:
|
|
241
|
-
values:
|
|
242
|
-
errors:
|
|
243
|
-
isSaving:
|
|
244
|
-
onOpen:
|
|
245
|
-
onCancel:
|
|
246
|
-
onChange:
|
|
247
|
-
onSave:
|
|
244
|
+
scheduledSummary: z.hasScheduledPayment && z.scheduledDateLabel ? h.scheduledSummary(z.scheduledDateLabel) : void 0,
|
|
245
|
+
paymentInstructionsForm: M && H ? {
|
|
246
|
+
isOpen: V.isOpen,
|
|
247
|
+
values: V.values,
|
|
248
|
+
errors: V.errors,
|
|
249
|
+
isSaving: V.isSaving,
|
|
250
|
+
onOpen: V.open,
|
|
251
|
+
onCancel: V.close,
|
|
252
|
+
onChange: V.onChange,
|
|
253
|
+
onSave: V.save
|
|
248
254
|
} : void 0,
|
|
249
|
-
isLoading: w.isLoading || T.isResolving ||
|
|
250
|
-
isError: w.isError || T.isError ||
|
|
255
|
+
isLoading: w.isLoading || T.isResolving || k.isResolving,
|
|
256
|
+
isError: w.isError || T.isError || k.isError
|
|
251
257
|
} : void 0,
|
|
252
258
|
isLineItemsLoading: T.isResolving,
|
|
253
|
-
isSaving:
|
|
254
|
-
isSavingDraft:
|
|
255
|
-
isFinalizing:
|
|
256
|
-
onCancel:
|
|
259
|
+
isSaving: F,
|
|
260
|
+
isSavingDraft: P.isSavingDraft,
|
|
261
|
+
isFinalizing: P.isFinalizing,
|
|
262
|
+
onCancel: Q,
|
|
257
263
|
onCollapse: p ? Me : void 0,
|
|
258
|
-
onSaveDraft:
|
|
259
|
-
onFinalize:
|
|
264
|
+
onSaveDraft: P.saveDraft,
|
|
265
|
+
onFinalize: P.finalize,
|
|
260
266
|
testId: r.dialog
|
|
261
267
|
}),
|
|
262
268
|
/* @__PURE__ */ c(ue, {
|
|
263
269
|
open: Re,
|
|
264
|
-
onSaveDraft:
|
|
265
|
-
onDiscard:
|
|
270
|
+
onSaveDraft: Ze,
|
|
271
|
+
onDiscard: Xe,
|
|
266
272
|
onCancel: () => x(!1),
|
|
267
|
-
isSaving:
|
|
268
|
-
isSaveDraftDisabled:
|
|
273
|
+
isSaving: P.isSavingDraft,
|
|
274
|
+
isSaveDraftDisabled: $,
|
|
269
275
|
labels: h.unsavedChanges,
|
|
270
276
|
testId: r.unsavedDialog,
|
|
271
277
|
saveDraftTestId: r.unsavedSaveDraft,
|
|
@@ -279,15 +285,15 @@ function u({ open: u, onOpenChange: d, payableId: f, readOnly: p = !1, copy: m,
|
|
|
279
285
|
reasonTestId: r.decisionReason
|
|
280
286
|
}),
|
|
281
287
|
/* @__PURE__ */ c(n, {
|
|
282
|
-
...
|
|
288
|
+
...G.dialog,
|
|
283
289
|
labels: { cancelButton: h.actions.decisionDialog.cancelButton },
|
|
284
290
|
testId: r.deleteDraftDialog,
|
|
285
291
|
confirmTestId: r.deleteDraftConfirm
|
|
286
292
|
}),
|
|
287
|
-
/* @__PURE__ */ c(le, { ...
|
|
288
|
-
p &&
|
|
289
|
-
ref:
|
|
290
|
-
payable:
|
|
293
|
+
/* @__PURE__ */ c(le, { ...U.dialogProps }),
|
|
294
|
+
p && A ? /* @__PURE__ */ c(me, {
|
|
295
|
+
ref: R,
|
|
296
|
+
payable: A,
|
|
291
297
|
poweredByBankName: Ne,
|
|
292
298
|
labels: h.payBill
|
|
293
299
|
}) : null
|
|
@@ -1,279 +1,311 @@
|
|
|
1
|
-
import { Button as e, Input as t, InputGroup as n, InputGroupAddon as r, InputGroupInput as i, Label as a, Select as o, SelectContent as s, SelectItem as c, SelectTrigger as l, SelectValue as u,
|
|
2
|
-
import { LINE_ITEMS_SECTION_LABELS_EN as
|
|
3
|
-
import { useId as
|
|
4
|
-
import { jsx as
|
|
5
|
-
import { Minus as
|
|
1
|
+
import { Button as e, Input as t, InputGroup as n, InputGroupAddon as r, InputGroupInput as i, Label as a, Select as o, SelectContent as s, SelectItem as c, SelectTrigger as l, SelectValue as u, Tooltip as d, TooltipContent as f, TooltipProvider as p, TooltipTrigger as m, Typography as h, cn as g } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { LINE_ITEMS_SECTION_LABELS_EN as _ } from "./index31.js";
|
|
3
|
+
import { useId as v } from "react";
|
|
4
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
5
|
+
import { CircleAlert as x, Minus as S, Plus as C, Trash2 as w, X as T } from "lucide-react";
|
|
6
6
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js
|
|
7
|
-
function
|
|
8
|
-
let
|
|
9
|
-
...
|
|
10
|
-
...
|
|
11
|
-
},
|
|
12
|
-
return /* @__PURE__ */
|
|
7
|
+
function E({ items: E, glCodeOptions: D, glCodeDisabled: O, glCodeUnavailableMessage: k, discount: A, onDiscountChange: j, tax: M, onTaxChange: N, total: P, onTotalChange: F, onAddLineItem: I, errors: L, disabled: R, testId: z, labels: B }) {
|
|
8
|
+
let V = {
|
|
9
|
+
..._,
|
|
10
|
+
...B
|
|
11
|
+
}, H = v(), U = E.length > 1, W = k ? `${H}-gl-code-unavailable` : void 0;
|
|
12
|
+
return /* @__PURE__ */ b("section", {
|
|
13
13
|
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
14
|
-
"data-testid":
|
|
14
|
+
"data-testid": z,
|
|
15
15
|
children: [
|
|
16
|
-
/* @__PURE__ */
|
|
16
|
+
/* @__PURE__ */ y(h, {
|
|
17
17
|
component: "h2",
|
|
18
18
|
variant: "h6",
|
|
19
19
|
className: "ttw:font-semibold",
|
|
20
|
-
children:
|
|
20
|
+
children: V.heading
|
|
21
21
|
}),
|
|
22
|
-
/* @__PURE__ */
|
|
22
|
+
/* @__PURE__ */ y("p", {
|
|
23
23
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
24
|
-
children:
|
|
24
|
+
children: V.helpText
|
|
25
25
|
}),
|
|
26
|
-
y
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
k ? /* @__PURE__ */ y("span", {
|
|
27
|
+
id: W,
|
|
28
|
+
className: "ttw:sr-only",
|
|
29
|
+
children: k
|
|
30
|
+
}) : null,
|
|
31
|
+
E.map((h, _) => {
|
|
32
|
+
let v = `${H}-${h.id}`, E = L?.[h.id], A = (e) => `${v}-${e}-error`, j = (e) => E?.[e], M = (e) => {
|
|
33
|
+
let t = j(e);
|
|
34
|
+
return t ? /* @__PURE__ */ y("p", {
|
|
35
|
+
id: A(e),
|
|
31
36
|
className: "ttw:text-sm ttw:text-destructive",
|
|
32
37
|
children: t
|
|
33
38
|
}) : null;
|
|
34
39
|
};
|
|
35
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ y("div", {
|
|
36
41
|
className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-muted/30 ttw:p-4",
|
|
37
|
-
children: /* @__PURE__ */
|
|
42
|
+
children: /* @__PURE__ */ b("div", {
|
|
38
43
|
className: "ttw:@container/line-item ttw:flex ttw:flex-col ttw:gap-3",
|
|
39
44
|
children: [
|
|
40
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ b("div", {
|
|
41
46
|
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-2",
|
|
42
|
-
children: [/* @__PURE__ */
|
|
47
|
+
children: [/* @__PURE__ */ b("div", {
|
|
43
48
|
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
44
|
-
children: [
|
|
49
|
+
children: [U ? /* @__PURE__ */ b("span", {
|
|
45
50
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
46
|
-
children: [
|
|
47
|
-
}) : null, /* @__PURE__ */
|
|
48
|
-
htmlFor: `${
|
|
49
|
-
children:
|
|
51
|
+
children: [_ + 1, "."]
|
|
52
|
+
}) : null, /* @__PURE__ */ y(a, {
|
|
53
|
+
htmlFor: `${v}-description`,
|
|
54
|
+
children: V.description
|
|
50
55
|
})]
|
|
51
|
-
}),
|
|
56
|
+
}), U ? /* @__PURE__ */ y(e, {
|
|
52
57
|
type: "button",
|
|
53
58
|
variant: "ghost",
|
|
54
59
|
size: "icon",
|
|
55
|
-
disabled:
|
|
56
|
-
"aria-label":
|
|
57
|
-
onClick:
|
|
58
|
-
children: /* @__PURE__ */
|
|
60
|
+
disabled: R,
|
|
61
|
+
"aria-label": V.removeLineItem(_ + 1),
|
|
62
|
+
onClick: h.onRemove,
|
|
63
|
+
children: /* @__PURE__ */ y(w, { className: "ttw:size-4" })
|
|
59
64
|
}) : null]
|
|
60
65
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ b("div", {
|
|
62
67
|
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
63
|
-
children: [/* @__PURE__ */
|
|
64
|
-
id: `${
|
|
65
|
-
placeholder:
|
|
66
|
-
value:
|
|
67
|
-
disabled:
|
|
68
|
-
"aria-invalid":
|
|
69
|
-
"aria-describedby":
|
|
70
|
-
onChange: (e) =>
|
|
71
|
-
}),
|
|
68
|
+
children: [/* @__PURE__ */ y(t, {
|
|
69
|
+
id: `${v}-description`,
|
|
70
|
+
placeholder: V.descriptionPlaceholder,
|
|
71
|
+
value: h.description,
|
|
72
|
+
disabled: R,
|
|
73
|
+
"aria-invalid": j("description") ? !0 : void 0,
|
|
74
|
+
"aria-describedby": j("description") ? A("description") : void 0,
|
|
75
|
+
onChange: (e) => h.onChange({ description: e.target.value })
|
|
76
|
+
}), M("description")]
|
|
72
77
|
}),
|
|
73
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ b("div", {
|
|
74
79
|
className: "ttw:grid ttw:grid-cols-3 ttw:@lg/line-item:grid-cols-6 ttw:gap-3",
|
|
75
80
|
children: [
|
|
76
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ b("div", {
|
|
77
82
|
className: "ttw:col-span-3 ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
78
83
|
children: [
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
|
|
81
|
-
children:
|
|
84
|
+
/* @__PURE__ */ b("div", {
|
|
85
|
+
className: "ttw:flex ttw:items-center ttw:gap-1",
|
|
86
|
+
children: [/* @__PURE__ */ y(a, {
|
|
87
|
+
htmlFor: `${v}-gl-code`,
|
|
88
|
+
children: V.glCode
|
|
89
|
+
}), k ? /* @__PURE__ */ y(p, { children: /* @__PURE__ */ b(d, { children: [/* @__PURE__ */ y(m, {
|
|
90
|
+
type: "button",
|
|
91
|
+
className: "ttw:inline-flex ttw:shrink-0 ttw:cursor-help ttw:text-muted-foreground",
|
|
92
|
+
"aria-label": k,
|
|
93
|
+
children: /* @__PURE__ */ y(x, { className: "ttw:size-3.5" })
|
|
94
|
+
}), /* @__PURE__ */ y(f, { children: k })] }) }) : null]
|
|
82
95
|
}),
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
children: e
|
|
96
|
-
|
|
96
|
+
/* @__PURE__ */ b("div", {
|
|
97
|
+
className: "ttw:relative",
|
|
98
|
+
children: [/* @__PURE__ */ b(o, {
|
|
99
|
+
value: h.glCode,
|
|
100
|
+
disabled: R || O,
|
|
101
|
+
onValueChange: (e) => h.onChange({ glCode: e }),
|
|
102
|
+
children: [/* @__PURE__ */ y(l, {
|
|
103
|
+
id: `${v}-gl-code`,
|
|
104
|
+
className: g("ttw:w-full", h.glCode && "ttw:[&>svg:last-child]:hidden!"),
|
|
105
|
+
"aria-invalid": j("glCode") ? !0 : void 0,
|
|
106
|
+
"aria-describedby": [j("glCode") ? A("glCode") : null, W].filter(Boolean).join(" ") || void 0,
|
|
107
|
+
children: /* @__PURE__ */ y(u, { placeholder: V.glCodePlaceholder })
|
|
108
|
+
}), /* @__PURE__ */ y(s, { children: D.map((e) => /* @__PURE__ */ y(c, {
|
|
109
|
+
value: e.value,
|
|
110
|
+
children: e.label
|
|
111
|
+
}, e.value)) })]
|
|
112
|
+
}), h.glCode && !(R || O) ? /* @__PURE__ */ y(e, {
|
|
113
|
+
type: "button",
|
|
114
|
+
variant: "ghost",
|
|
115
|
+
size: "icon-sm",
|
|
116
|
+
"aria-label": V.glCodeClear,
|
|
117
|
+
className: "ttw:absolute ttw:top-1/2 ttw:right-1 ttw:-translate-y-1/2",
|
|
118
|
+
onPointerDown: (e) => {
|
|
119
|
+
e.preventDefault(), e.stopPropagation();
|
|
120
|
+
},
|
|
121
|
+
onClick: (e) => {
|
|
122
|
+
e.preventDefault(), e.stopPropagation(), h.onChange({ glCode: "" });
|
|
123
|
+
},
|
|
124
|
+
children: /* @__PURE__ */ y(T, {
|
|
125
|
+
className: "ttw:size-4",
|
|
126
|
+
"aria-hidden": !0
|
|
127
|
+
})
|
|
128
|
+
}) : null]
|
|
97
129
|
}),
|
|
98
|
-
|
|
130
|
+
M("glCode")
|
|
99
131
|
]
|
|
100
132
|
}),
|
|
101
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ b("div", {
|
|
102
134
|
className: "ttw:col-span-1 ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
103
135
|
children: [
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
htmlFor: `${
|
|
106
|
-
children:
|
|
136
|
+
/* @__PURE__ */ y(a, {
|
|
137
|
+
htmlFor: `${v}-quantity`,
|
|
138
|
+
children: V.quantity
|
|
107
139
|
}),
|
|
108
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ b(n, {
|
|
109
141
|
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",
|
|
110
142
|
children: [
|
|
111
|
-
/* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ y(e, {
|
|
112
144
|
type: "button",
|
|
113
145
|
variant: "ghost",
|
|
114
146
|
size: "icon",
|
|
115
147
|
className: "ttw:h-full ttw:shrink-0 ttw:rounded-r-none",
|
|
116
|
-
disabled:
|
|
117
|
-
"aria-label":
|
|
118
|
-
onClick: () =>
|
|
119
|
-
children: /* @__PURE__ */
|
|
148
|
+
disabled: R,
|
|
149
|
+
"aria-label": V.decreaseQuantity(_ + 1),
|
|
150
|
+
onClick: () => h.onQuantityStep(-1),
|
|
151
|
+
children: /* @__PURE__ */ y(S, { className: "ttw:size-3.5" })
|
|
120
152
|
}),
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
id: `${
|
|
153
|
+
/* @__PURE__ */ y(i, {
|
|
154
|
+
id: `${v}-quantity`,
|
|
123
155
|
inputMode: "decimal",
|
|
124
156
|
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",
|
|
125
|
-
value:
|
|
126
|
-
disabled:
|
|
127
|
-
"aria-invalid":
|
|
128
|
-
"aria-describedby":
|
|
129
|
-
onChange: (e) =>
|
|
157
|
+
value: h.quantity,
|
|
158
|
+
disabled: R,
|
|
159
|
+
"aria-invalid": j("quantity") ? !0 : void 0,
|
|
160
|
+
"aria-describedby": j("quantity") ? A("quantity") : void 0,
|
|
161
|
+
onChange: (e) => h.onChange({ quantity: e.target.value })
|
|
130
162
|
}),
|
|
131
|
-
/* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ y(e, {
|
|
132
164
|
type: "button",
|
|
133
165
|
variant: "ghost",
|
|
134
166
|
size: "icon",
|
|
135
167
|
className: "ttw:h-full ttw:shrink-0 ttw:rounded-l-none",
|
|
136
|
-
disabled:
|
|
137
|
-
"aria-label":
|
|
138
|
-
onClick: () =>
|
|
139
|
-
children: /* @__PURE__ */
|
|
168
|
+
disabled: R,
|
|
169
|
+
"aria-label": V.increaseQuantity(_ + 1),
|
|
170
|
+
onClick: () => h.onQuantityStep(1),
|
|
171
|
+
children: /* @__PURE__ */ y(C, { className: "ttw:size-3.5" })
|
|
140
172
|
})
|
|
141
173
|
]
|
|
142
174
|
}),
|
|
143
|
-
|
|
175
|
+
M("quantity")
|
|
144
176
|
]
|
|
145
177
|
}),
|
|
146
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ b("div", {
|
|
147
179
|
className: "ttw:col-span-1 ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
148
180
|
children: [
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
-
htmlFor: `${
|
|
151
|
-
children:
|
|
181
|
+
/* @__PURE__ */ y(a, {
|
|
182
|
+
htmlFor: `${v}-price`,
|
|
183
|
+
children: V.price
|
|
152
184
|
}),
|
|
153
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ b(n, { children: [/* @__PURE__ */ y(r, {
|
|
154
186
|
align: "inline-start",
|
|
155
187
|
"aria-hidden": !0,
|
|
156
|
-
children:
|
|
157
|
-
}), /* @__PURE__ */
|
|
158
|
-
id: `${
|
|
188
|
+
children: V.currencySymbol
|
|
189
|
+
}), /* @__PURE__ */ y(i, {
|
|
190
|
+
id: `${v}-price`,
|
|
159
191
|
"data-has-start-addon": !0,
|
|
160
192
|
inputMode: "decimal",
|
|
161
193
|
className: "ttw:text-right ttw:aria-invalid:border-destructive ttw:aria-invalid:ring-destructive/20",
|
|
162
|
-
value:
|
|
163
|
-
disabled:
|
|
164
|
-
"aria-invalid":
|
|
165
|
-
"aria-describedby":
|
|
166
|
-
onChange: (e) =>
|
|
194
|
+
value: h.price,
|
|
195
|
+
disabled: R,
|
|
196
|
+
"aria-invalid": j("price") ? !0 : void 0,
|
|
197
|
+
"aria-describedby": j("price") ? A("price") : void 0,
|
|
198
|
+
onChange: (e) => h.onChange({ price: e.target.value })
|
|
167
199
|
})] }),
|
|
168
|
-
|
|
200
|
+
M("price")
|
|
169
201
|
]
|
|
170
202
|
}),
|
|
171
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ b("div", {
|
|
172
204
|
className: "ttw:col-span-1 ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
173
205
|
children: [
|
|
174
|
-
/* @__PURE__ */
|
|
175
|
-
htmlFor: `${
|
|
176
|
-
children:
|
|
206
|
+
/* @__PURE__ */ y(a, {
|
|
207
|
+
htmlFor: `${v}-amount`,
|
|
208
|
+
children: V.amount
|
|
177
209
|
}),
|
|
178
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ b(n, { children: [/* @__PURE__ */ y(r, {
|
|
179
211
|
align: "inline-start",
|
|
180
212
|
"aria-hidden": !0,
|
|
181
|
-
children:
|
|
182
|
-
}), /* @__PURE__ */
|
|
183
|
-
id: `${
|
|
213
|
+
children: V.currencySymbol
|
|
214
|
+
}), /* @__PURE__ */ y(i, {
|
|
215
|
+
id: `${v}-amount`,
|
|
184
216
|
"data-has-start-addon": !0,
|
|
185
217
|
inputMode: "decimal",
|
|
186
218
|
className: "ttw:text-right ttw:aria-invalid:border-destructive ttw:aria-invalid:ring-destructive/20",
|
|
187
|
-
value:
|
|
188
|
-
disabled:
|
|
189
|
-
"aria-invalid":
|
|
190
|
-
"aria-describedby":
|
|
191
|
-
onChange: (e) =>
|
|
219
|
+
value: h.amount,
|
|
220
|
+
disabled: R,
|
|
221
|
+
"aria-invalid": j("amount") ? !0 : void 0,
|
|
222
|
+
"aria-describedby": j("amount") ? A("amount") : void 0,
|
|
223
|
+
onChange: (e) => h.onChange({ amount: e.target.value })
|
|
192
224
|
})] }),
|
|
193
|
-
|
|
225
|
+
M("amount")
|
|
194
226
|
]
|
|
195
227
|
})
|
|
196
228
|
]
|
|
197
229
|
})
|
|
198
230
|
]
|
|
199
231
|
})
|
|
200
|
-
},
|
|
232
|
+
}, h.id);
|
|
201
233
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ y(e, {
|
|
203
235
|
type: "button",
|
|
204
236
|
variant: "link",
|
|
205
|
-
disabled:
|
|
237
|
+
disabled: R,
|
|
206
238
|
className: "ttw:self-start",
|
|
207
|
-
onClick:
|
|
208
|
-
children:
|
|
239
|
+
onClick: I,
|
|
240
|
+
children: V.addLineItem
|
|
209
241
|
}),
|
|
210
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ b("div", {
|
|
211
243
|
className: "ttw:flex ttw:flex-col ttw:gap-2 ttw:border-t ttw:border-border ttw:pt-3",
|
|
212
244
|
children: [
|
|
213
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ b("div", {
|
|
214
246
|
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
|
|
215
|
-
children: [/* @__PURE__ */
|
|
216
|
-
htmlFor: `${
|
|
217
|
-
children:
|
|
218
|
-
}), /* @__PURE__ */
|
|
247
|
+
children: [/* @__PURE__ */ y(a, {
|
|
248
|
+
htmlFor: `${H}-discount`,
|
|
249
|
+
children: V.discount
|
|
250
|
+
}), /* @__PURE__ */ b(n, {
|
|
219
251
|
className: "ttw:w-36",
|
|
220
|
-
children: [/* @__PURE__ */
|
|
252
|
+
children: [/* @__PURE__ */ y(r, {
|
|
221
253
|
align: "inline-start",
|
|
222
254
|
"aria-hidden": !0,
|
|
223
|
-
children:
|
|
224
|
-
}), /* @__PURE__ */
|
|
225
|
-
id: `${
|
|
255
|
+
children: V.currencySymbol
|
|
256
|
+
}), /* @__PURE__ */ y(i, {
|
|
257
|
+
id: `${H}-discount`,
|
|
226
258
|
"data-has-start-addon": !0,
|
|
227
259
|
inputMode: "decimal",
|
|
228
260
|
className: "ttw:text-right",
|
|
229
|
-
value:
|
|
230
|
-
disabled:
|
|
231
|
-
onChange: (e) =>
|
|
261
|
+
value: A,
|
|
262
|
+
disabled: R,
|
|
263
|
+
onChange: (e) => j(e.target.value)
|
|
232
264
|
})]
|
|
233
265
|
})]
|
|
234
266
|
}),
|
|
235
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ b("div", {
|
|
236
268
|
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
|
|
237
|
-
children: [/* @__PURE__ */
|
|
238
|
-
htmlFor: `${
|
|
239
|
-
children:
|
|
240
|
-
}), /* @__PURE__ */
|
|
269
|
+
children: [/* @__PURE__ */ y(a, {
|
|
270
|
+
htmlFor: `${H}-tax`,
|
|
271
|
+
children: V.tax
|
|
272
|
+
}), /* @__PURE__ */ b(n, {
|
|
241
273
|
className: "ttw:w-36",
|
|
242
|
-
children: [/* @__PURE__ */
|
|
274
|
+
children: [/* @__PURE__ */ y(r, {
|
|
243
275
|
align: "inline-start",
|
|
244
276
|
"aria-hidden": !0,
|
|
245
|
-
children:
|
|
246
|
-
}), /* @__PURE__ */
|
|
247
|
-
id: `${
|
|
277
|
+
children: V.currencySymbol
|
|
278
|
+
}), /* @__PURE__ */ y(i, {
|
|
279
|
+
id: `${H}-tax`,
|
|
248
280
|
"data-has-start-addon": !0,
|
|
249
281
|
inputMode: "decimal",
|
|
250
282
|
className: "ttw:text-right",
|
|
251
|
-
value:
|
|
252
|
-
disabled:
|
|
253
|
-
onChange: (e) =>
|
|
283
|
+
value: M,
|
|
284
|
+
disabled: R,
|
|
285
|
+
onChange: (e) => N(e.target.value)
|
|
254
286
|
})]
|
|
255
287
|
})]
|
|
256
288
|
}),
|
|
257
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ b("div", {
|
|
258
290
|
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
|
|
259
|
-
children: [/* @__PURE__ */
|
|
260
|
-
htmlFor: `${
|
|
291
|
+
children: [/* @__PURE__ */ y(a, {
|
|
292
|
+
htmlFor: `${H}-total`,
|
|
261
293
|
className: "ttw:font-semibold",
|
|
262
|
-
children:
|
|
263
|
-
}), /* @__PURE__ */
|
|
294
|
+
children: V.totalAmount
|
|
295
|
+
}), /* @__PURE__ */ b(n, {
|
|
264
296
|
className: "ttw:w-36",
|
|
265
|
-
children: [/* @__PURE__ */
|
|
297
|
+
children: [/* @__PURE__ */ y(r, {
|
|
266
298
|
align: "inline-start",
|
|
267
299
|
"aria-hidden": !0,
|
|
268
|
-
children:
|
|
269
|
-
}), /* @__PURE__ */
|
|
270
|
-
id: `${
|
|
300
|
+
children: V.currencySymbol
|
|
301
|
+
}), /* @__PURE__ */ y(i, {
|
|
302
|
+
id: `${H}-total`,
|
|
271
303
|
"data-has-start-addon": !0,
|
|
272
304
|
inputMode: "decimal",
|
|
273
305
|
className: "ttw:text-right ttw:font-semibold",
|
|
274
|
-
value:
|
|
275
|
-
disabled:
|
|
276
|
-
onChange: (e) =>
|
|
306
|
+
value: P,
|
|
307
|
+
disabled: R,
|
|
308
|
+
onChange: (e) => F(e.target.value)
|
|
277
309
|
})]
|
|
278
310
|
})]
|
|
279
311
|
})
|
|
@@ -283,4 +315,4 @@ function y({ items: y, glCodeOptions: b, discount: x, onDiscountChange: S, tax:
|
|
|
283
315
|
});
|
|
284
316
|
}
|
|
285
317
|
//#endregion
|
|
286
|
-
export {
|
|
318
|
+
export { E as LineItemsSection, E as default };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.3.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.3.42", n = "d903cfb9fb15d2ae6daeb0d0ff31dc787e635c74", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|