@tesouro/embedded-components-react 0.5.7 → 0.5.9
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 +14 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +26 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +102 -98
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +2 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +38 -33
- 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 +110 -110
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -2147,6 +2147,14 @@
|
|
|
2147
2147
|
border-left-style: var(--tw-border-style);
|
|
2148
2148
|
border-left-width: 2px;
|
|
2149
2149
|
}
|
|
2150
|
+
.ttw\:border-l-4 {
|
|
2151
|
+
border-left-style: var(--tw-border-style);
|
|
2152
|
+
border-left-width: 4px;
|
|
2153
|
+
}
|
|
2154
|
+
.ttw\:border-l-4\! {
|
|
2155
|
+
border-left-style: var(--tw-border-style) !important;
|
|
2156
|
+
border-left-width: 4px !important;
|
|
2157
|
+
}
|
|
2150
2158
|
.ttw\:\!border-none {
|
|
2151
2159
|
--tw-border-style: none !important;
|
|
2152
2160
|
border-style: none !important;
|
|
@@ -2332,6 +2340,12 @@
|
|
|
2332
2340
|
.ttw\:border-b-transparent {
|
|
2333
2341
|
border-bottom-color: transparent;
|
|
2334
2342
|
}
|
|
2343
|
+
.ttw\:border-l-amber-600 {
|
|
2344
|
+
border-left-color: var(--ttw-color-amber-600);
|
|
2345
|
+
}
|
|
2346
|
+
.ttw\:border-l-amber-600\! {
|
|
2347
|
+
border-left-color: var(--ttw-color-amber-600) !important;
|
|
2348
|
+
}
|
|
2335
2349
|
.ttw\:\!bg-gray-800 {
|
|
2336
2350
|
background-color: var(--ttw-color-gray-800) !important;
|
|
2337
2351
|
}
|
|
@@ -25,7 +25,8 @@ var p = {
|
|
|
25
25
|
lineItemsNeedAttention: "Check the highlighted line items before saving.",
|
|
26
26
|
unreadableDiscount: "Enter a valid discount amount.",
|
|
27
27
|
unreadableTax: "Enter a valid tax amount.",
|
|
28
|
-
unreadableTotal: "Enter a valid total amount."
|
|
28
|
+
unreadableTotal: "Enter a valid total amount.",
|
|
29
|
+
totalNotGreaterThanZero: "Total amount must be greater than $0."
|
|
29
30
|
}, m = {
|
|
30
31
|
achMethod: "via ACH bank transfer",
|
|
31
32
|
noMethod: "No payment method on file",
|
|
@@ -27,9 +27,31 @@ function s(i, a, o, s = e) {
|
|
|
27
27
|
lineItemErrors: Object.keys(l).length ? l : void 0
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
function c(
|
|
31
|
-
let
|
|
32
|
-
|
|
30
|
+
function c(e) {
|
|
31
|
+
let t = e.trim();
|
|
32
|
+
if (!t) return !0;
|
|
33
|
+
let n = t.startsWith("-") ? t.slice(1) : t;
|
|
34
|
+
return i.test(n) ? Number(t.replaceAll(",", "")) <= 0 : !1;
|
|
35
|
+
}
|
|
36
|
+
function l(e, t) {
|
|
37
|
+
if (n(e) === null) return c(e) ? t.totalNotGreaterThanZero : t.unreadableTotal;
|
|
38
|
+
}
|
|
39
|
+
function u(t, n = e) {
|
|
40
|
+
let r = l(t, n);
|
|
41
|
+
return r ? { total: r } : void 0;
|
|
42
|
+
}
|
|
43
|
+
function d(t, r, i = e) {
|
|
44
|
+
if (t === void 0) return;
|
|
45
|
+
let a = n(t);
|
|
46
|
+
if (a !== null) return a - (n(r) ?? 0) > 0 ? void 0 : { total: i.totalNotGreaterThanZero };
|
|
47
|
+
}
|
|
48
|
+
function f(t, n, r, i = e) {
|
|
49
|
+
let o = {};
|
|
50
|
+
if (a(t) || (o.discount = i.unreadableDiscount), a(n) || (o.tax = i.unreadableTax), r !== void 0) {
|
|
51
|
+
let e = l(r, i);
|
|
52
|
+
e && (o.total = e);
|
|
53
|
+
}
|
|
54
|
+
return Object.keys(o).length ? o : void 0;
|
|
33
55
|
}
|
|
34
56
|
//#endregion
|
|
35
|
-
export { a as isReadableMoneyOrZero, s as validateBillCompleteness,
|
|
57
|
+
export { a as isReadableMoneyOrZero, s as validateBillCompleteness, u as validateBillTotalIsPayable, f as validateBillTotals, o as validateLineItems, d as validateStoredAmountDue };
|
|
@@ -9,27 +9,27 @@ import { useReplacePayableLineItemsMutation as n } from "../../data-access/dist/
|
|
|
9
9
|
import { useCreatePayableMutation as r, useDeletePayableFileMutation as i, useSubmitPayableForApprovalMutation as a, useUpdatePayableMutation as o, useValidatePayableMutation as s } from "../../data-access/dist/index13.js";
|
|
10
10
|
import "../../data-access/dist/index.js";
|
|
11
11
|
import { BILL_CREATE_MESSAGE_LABELS_EN as c } from "./index47.js";
|
|
12
|
-
import { encodeFileToBase64 as
|
|
13
|
-
import { mapBillFormToPayload as
|
|
14
|
-
import { validateBillCompleteness as
|
|
15
|
-
import { useCallback as
|
|
12
|
+
import { encodeFileToBase64 as l } from "./index53.js";
|
|
13
|
+
import { mapBillFormToPayload as u, mapLineItemsToPayload as d } from "./index54.js";
|
|
14
|
+
import { validateBillCompleteness as f, validateBillTotalIsPayable as p, validateBillTotals as m, validateLineItems as h, validateStoredAmountDue as ee } from "./index55.js";
|
|
15
|
+
import { useCallback as g, useRef as _, useState as v } from "react";
|
|
16
16
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js
|
|
17
|
-
var
|
|
17
|
+
var y = {
|
|
18
18
|
document_id: "invoiceNumber",
|
|
19
19
|
issued_at: "invoiceDate",
|
|
20
20
|
due_date: "dueDate",
|
|
21
21
|
counterpart_id: "vendor"
|
|
22
|
-
},
|
|
23
|
-
function
|
|
22
|
+
}, b = { tax_amount: "tax" };
|
|
23
|
+
function x(e) {
|
|
24
24
|
return e.type === "type_error.none.not_allowed" || e.msg === "none is not an allowed value";
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function S(e) {
|
|
27
27
|
return !!t(e)?.includes("line_items_enabled");
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function C(e, t = c) {
|
|
30
30
|
let n = {}, r = {}, i = [];
|
|
31
31
|
for (let a of e) {
|
|
32
|
-
let e = a.loc[0] ?? t.unknownValidationField, o =
|
|
32
|
+
let e = a.loc[0] ?? t.unknownValidationField, o = y[e], s = b[e], c = x(a) ? t.requiredField : a.msg;
|
|
33
33
|
o ? n[o] = c : s ? r[s] = c : i.push(t.unmappedValidationError(e, c));
|
|
34
34
|
}
|
|
35
35
|
return i.length && (n.form = i.join(" ")), {
|
|
@@ -37,7 +37,7 @@ function x(e, t = c) {
|
|
|
37
37
|
totalsErrors: Object.keys(r).length ? r : void 0
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function te(e, t) {
|
|
41
41
|
if (!e && !t) return;
|
|
42
42
|
let n = {}, r = /* @__PURE__ */ new Set([...Object.keys(e ?? {}), ...Object.keys(t ?? {})]);
|
|
43
43
|
for (let i of r) n[i] = {
|
|
@@ -46,161 +46,165 @@ function S(e, t) {
|
|
|
46
46
|
};
|
|
47
47
|
return n;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
let
|
|
49
|
+
function w({ payableId: t, form: y, counterpartId: b, clearCounterpart: x, prepareVendorForSave: w, onSaved: T, onPayableCreated: E, readSavedStatus: D, onDraftSaved: O, onFinalized: k, labels: A }) {
|
|
50
|
+
let j = {
|
|
51
51
|
...c,
|
|
52
|
-
...
|
|
53
|
-
}, [
|
|
54
|
-
let t =
|
|
55
|
-
return
|
|
52
|
+
...A
|
|
53
|
+
}, [M, N] = v(), P = t ?? M, [F, I] = v(), L = g(() => I(void 0), []), [R, z] = v(!1), B = g(() => z(!0), []), [V, H] = v(), U = _(!1), [ne, re] = v(0), W = g(() => re((e) => e + 1), []), G = r(), K = i(), q = o(), J = n(), Y = s(), X = a(), Z = g(() => y.isTotalsDirty ? m(y.discount, y.tax, y.totalOverride, j) : void 0, [y, j]), Q = g(() => {
|
|
54
|
+
let t = h(y.lineItems, j), n = Z();
|
|
55
|
+
return y.setLineItemErrors(t), y.setTotalsErrors(n), !t && !n || (y.setErrors(void 0), t && e.error(j.lineItemsNeedAttention), W(), !1);
|
|
56
56
|
}, [
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
y,
|
|
58
|
+
j,
|
|
59
59
|
W,
|
|
60
60
|
Z
|
|
61
|
-
]), $ =
|
|
62
|
-
let t = !
|
|
63
|
-
base64EncodedFile: await
|
|
64
|
-
fileName:
|
|
65
|
-
} : void 0, n =
|
|
66
|
-
values:
|
|
67
|
-
counterpartId:
|
|
68
|
-
clearCounterpart:
|
|
61
|
+
]), $ = g(async (e) => {
|
|
62
|
+
let t = !P && F ? {
|
|
63
|
+
base64EncodedFile: await l(F),
|
|
64
|
+
fileName: F.name
|
|
65
|
+
} : void 0, n = u({
|
|
66
|
+
values: y.values,
|
|
67
|
+
counterpartId: b,
|
|
68
|
+
clearCounterpart: x,
|
|
69
69
|
counterpartBankAccountId: e,
|
|
70
|
-
editedTotals:
|
|
71
|
-
discount:
|
|
72
|
-
tax:
|
|
73
|
-
total:
|
|
70
|
+
editedTotals: y.isTotalsDirty ? {
|
|
71
|
+
discount: y.discount,
|
|
72
|
+
tax: y.tax,
|
|
73
|
+
total: y.totalOverride
|
|
74
74
|
} : void 0,
|
|
75
75
|
document: t
|
|
76
|
-
}), r =
|
|
76
|
+
}), r = P;
|
|
77
77
|
if (r ? await q.mutateAsync({
|
|
78
78
|
path: { payable_id: r },
|
|
79
79
|
body: n
|
|
80
|
-
}) : (r = (await G.mutateAsync({ body: n }))?.id, r && (
|
|
81
|
-
if (
|
|
80
|
+
}) : (r = (await G.mutateAsync({ body: n }))?.id, r && (N(r), E?.(r), t && I(void 0))), !r) throw Error("Payable was created without an id");
|
|
81
|
+
if (R) {
|
|
82
82
|
try {
|
|
83
83
|
await K.mutateAsync({ path: { payable_id: r } });
|
|
84
84
|
} catch {}
|
|
85
|
-
|
|
85
|
+
z(!1);
|
|
86
86
|
}
|
|
87
87
|
return await J.mutateAsync({
|
|
88
88
|
path: { payable_id: r },
|
|
89
|
-
body: { data:
|
|
89
|
+
body: { data: d(y.lineItems) }
|
|
90
90
|
}), r;
|
|
91
91
|
}, [
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
b,
|
|
93
|
+
x,
|
|
94
94
|
G,
|
|
95
95
|
K,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
N,
|
|
105
|
-
J,
|
|
96
|
+
R,
|
|
97
|
+
y.discount,
|
|
98
|
+
y.isTotalsDirty,
|
|
99
|
+
y.lineItems,
|
|
100
|
+
y.tax,
|
|
101
|
+
y.totalOverride,
|
|
102
|
+
y.values,
|
|
103
|
+
E,
|
|
106
104
|
P,
|
|
105
|
+
J,
|
|
106
|
+
F,
|
|
107
107
|
q
|
|
108
|
-
]),
|
|
109
|
-
|
|
110
|
-
}, [K,
|
|
108
|
+
]), ie = g(async () => {
|
|
109
|
+
P && (await K.mutateAsync({ path: { payable_id: P } }), z(!1));
|
|
110
|
+
}, [K, P]);
|
|
111
111
|
return {
|
|
112
|
-
saveDraft:
|
|
113
|
-
if (!
|
|
114
|
-
|
|
112
|
+
saveDraft: g(async () => {
|
|
113
|
+
if (!U.current && Q()) {
|
|
114
|
+
U.current = !0, H("draft");
|
|
115
115
|
try {
|
|
116
|
-
let t = await
|
|
116
|
+
let t = await w?.();
|
|
117
117
|
if (t && !t.ok) return;
|
|
118
118
|
let n = await $(t?.counterpartBankAccountId);
|
|
119
|
-
|
|
120
|
-
let r = await
|
|
121
|
-
return e.success(r === "draft" ?
|
|
119
|
+
y.setErrors(void 0), T?.(n), O?.(n);
|
|
120
|
+
let r = await D?.();
|
|
121
|
+
return e.success(r === "draft" ? j.submittedDemoted : j.draftSaved), n;
|
|
122
122
|
} catch (e) {
|
|
123
|
-
|
|
123
|
+
y.setSaveFailureMessage(S(e) ? j.discountTaxBlockedByLineItems : j.saveFailed), W();
|
|
124
124
|
return;
|
|
125
125
|
} finally {
|
|
126
|
-
|
|
126
|
+
H(void 0), U.current = !1;
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
}, [
|
|
130
|
-
|
|
130
|
+
y,
|
|
131
131
|
Q,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
j.discountTaxBlockedByLineItems,
|
|
133
|
+
j.draftSaved,
|
|
134
|
+
j.saveFailed,
|
|
135
|
+
j.submittedDemoted,
|
|
136
|
+
O,
|
|
137
|
+
T,
|
|
136
138
|
D,
|
|
137
139
|
w,
|
|
138
|
-
E,
|
|
139
|
-
C,
|
|
140
140
|
$,
|
|
141
141
|
W
|
|
142
142
|
]),
|
|
143
|
-
finalize:
|
|
144
|
-
if (
|
|
145
|
-
let t =
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
143
|
+
finalize: g(async () => {
|
|
144
|
+
if (U.current) return;
|
|
145
|
+
let t = h(y.lineItems, j), n = Z(), r = p(y.total, j), i = y.isTotalsDirty ? ee(y.totalOverride, y.discount, j) : void 0, a = n || r || i ? {
|
|
146
|
+
...i,
|
|
147
|
+
...r,
|
|
148
|
+
...n
|
|
149
|
+
} : void 0, { formErrors: o, lineItemErrors: s } = f(y.values, b, y.lineItems, j), c = te(s, t);
|
|
150
|
+
y.setLineItemErrors(c), y.setTotalsErrors(a);
|
|
151
|
+
let l = o ?? {};
|
|
152
|
+
if (y.setErrors(Object.keys(l).length ? l : void 0), t && e.error(j.lineItemsNeedAttention), c || a || Object.keys(l).length) {
|
|
149
153
|
W();
|
|
150
154
|
return;
|
|
151
155
|
}
|
|
152
|
-
|
|
156
|
+
U.current = !0, H("finalize");
|
|
153
157
|
try {
|
|
154
158
|
let t;
|
|
155
159
|
try {
|
|
156
|
-
let e = await
|
|
160
|
+
let e = await w?.();
|
|
157
161
|
if (e && !e.ok) return;
|
|
158
162
|
t = await $(e?.counterpartBankAccountId);
|
|
159
163
|
} catch (e) {
|
|
160
|
-
|
|
164
|
+
y.setSaveFailureMessage(S(e) ? j.discountTaxBlockedByLineItems : j.saveFailed), W();
|
|
161
165
|
return;
|
|
162
166
|
}
|
|
163
|
-
|
|
167
|
+
T?.(t);
|
|
164
168
|
try {
|
|
165
169
|
let n = await Y.mutateAsync({ path: { payable_id: t } });
|
|
166
170
|
if (n.validation_errors.length) {
|
|
167
|
-
let e =
|
|
168
|
-
|
|
171
|
+
let e = C(n.validation_errors, j);
|
|
172
|
+
y.setErrors(e.formErrors), y.setTotalsErrors(e.totalsErrors), W();
|
|
169
173
|
return;
|
|
170
174
|
}
|
|
171
|
-
await X.mutateAsync({ path: { payable_id: t } }),
|
|
175
|
+
await X.mutateAsync({ path: { payable_id: t } }), y.setErrors(void 0), k?.(t), e.success(j.billFinalized);
|
|
172
176
|
} catch {
|
|
173
|
-
|
|
177
|
+
y.setSaveFailureMessage(j.finalizeFailed), W();
|
|
174
178
|
}
|
|
175
179
|
} finally {
|
|
176
|
-
|
|
180
|
+
H(void 0), U.current = !1;
|
|
177
181
|
}
|
|
178
182
|
}, [
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
+
b,
|
|
184
|
+
y,
|
|
185
|
+
j,
|
|
186
|
+
k,
|
|
187
|
+
T,
|
|
183
188
|
w,
|
|
184
|
-
C,
|
|
185
189
|
$,
|
|
186
190
|
W,
|
|
187
191
|
X,
|
|
188
192
|
Z,
|
|
189
193
|
Y
|
|
190
194
|
]),
|
|
191
|
-
payableId:
|
|
192
|
-
isSavingDraft:
|
|
193
|
-
isFinalizing:
|
|
194
|
-
stagedFile:
|
|
195
|
-
stageFile:
|
|
196
|
-
clearStagedFile:
|
|
197
|
-
scrollToErrorToken:
|
|
198
|
-
isFileDeletionPending:
|
|
199
|
-
requestFileDeletion:
|
|
200
|
-
detachFileNow:
|
|
195
|
+
payableId: P,
|
|
196
|
+
isSavingDraft: V === "draft",
|
|
197
|
+
isFinalizing: V === "finalize",
|
|
198
|
+
stagedFile: F,
|
|
199
|
+
stageFile: I,
|
|
200
|
+
clearStagedFile: L,
|
|
201
|
+
scrollToErrorToken: ne,
|
|
202
|
+
isFileDeletionPending: R,
|
|
203
|
+
requestFileDeletion: B,
|
|
204
|
+
detachFileNow: ie,
|
|
201
205
|
isDeletingFile: K.isPending,
|
|
202
206
|
hasFileDeletionFailed: K.isError
|
|
203
207
|
};
|
|
204
208
|
}
|
|
205
209
|
//#endregion
|
|
206
|
-
export {
|
|
210
|
+
export { C as mapValidationErrorsToForm, w as useBillCreateController };
|
|
@@ -32,7 +32,7 @@ var t = {
|
|
|
32
32
|
duplicateWarningMany: (e) => `${e} possible duplicate bills found`,
|
|
33
33
|
duplicateWarningManyCapped: (e) => `${e}+ possible duplicate bills found`,
|
|
34
34
|
duplicateWarningUnavailable: "Couldn't check for possible duplicates. Try again shortly.",
|
|
35
|
-
|
|
35
|
+
duplicateRowNote: "Possible duplicate",
|
|
36
36
|
attachmentIndicator: "Has an attachment",
|
|
37
37
|
emptyHeading: "Add your first bill",
|
|
38
38
|
nonEmptyHeading: "Add a bill",
|
|
@@ -18,7 +18,7 @@ var x = 10, S = [{
|
|
|
18
18
|
id: "addedOnLabel",
|
|
19
19
|
desc: !0
|
|
20
20
|
}];
|
|
21
|
-
function C({ enabled: C = !0, canReadVendors: w = !0, isVendorFilterPaused: T = !1, filterLabels: E, onOpenBill: D,
|
|
21
|
+
function C({ enabled: C = !0, canReadVendors: w = !0, isVendorFilterPaused: T = !1, filterLabels: E, onOpenBill: D, duplicateRowNote: O, attachmentLabel: k }) {
|
|
22
22
|
let [A, j] = b(l), [M, N] = b(S), [P, F] = b(x), [I, L] = b(), [R, z] = b(""), [B, V] = b(""), H = _(() => L(void 0), []);
|
|
23
23
|
v(() => {
|
|
24
24
|
let e = setTimeout(() => {
|
|
@@ -63,10 +63,10 @@ function C({ enabled: C = !0, canReadVendors: w = !0, isVendorFilterPaused: T =
|
|
|
63
63
|
status: i.status,
|
|
64
64
|
statusTone: i.tone,
|
|
65
65
|
addedOnLabel: e(r.created_at?.slice(0, 10)),
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
} :
|
|
66
|
+
...n(r) ? {
|
|
67
|
+
rowTone: "warning",
|
|
68
|
+
rowNote: O
|
|
69
|
+
} : {},
|
|
70
70
|
onOpen: () => D(r.id, s(r.status))
|
|
71
71
|
};
|
|
72
72
|
}), [
|
|
@@ -100,7 +100,7 @@ function D({ labels: u, onEnqueueFiles: b, openPayableId: x, onOpenPayableHandle
|
|
|
100
100
|
isVendorFilterPaused: V,
|
|
101
101
|
filterLabels: w.filters,
|
|
102
102
|
onOpenBill: K,
|
|
103
|
-
|
|
103
|
+
duplicateRowNote: w.duplicateRowNote,
|
|
104
104
|
attachmentLabel: w.attachmentIndicator
|
|
105
105
|
}), Y = i({ enabled: W }), oe = m(Y, w), se = g(() => l.map((e) => ({
|
|
106
106
|
id: e,
|
|
@@ -255,7 +255,7 @@ function E({ items: E, glCodeOptions: D, glCodeDisabled: O, glCodeUnavailableMes
|
|
|
255
255
|
htmlFor: `${U}-discount`,
|
|
256
256
|
children: H.discount
|
|
257
257
|
}), /* @__PURE__ */ b("div", {
|
|
258
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
258
|
+
className: "ttw:flex ttw:flex-col ttw:items-end ttw:gap-1.5",
|
|
259
259
|
children: [/* @__PURE__ */ b(n, {
|
|
260
260
|
className: "ttw:w-36",
|
|
261
261
|
children: [/* @__PURE__ */ y(r, {
|
|
@@ -282,7 +282,7 @@ function E({ items: E, glCodeOptions: D, glCodeDisabled: O, glCodeUnavailableMes
|
|
|
282
282
|
htmlFor: `${U}-tax`,
|
|
283
283
|
children: H.tax
|
|
284
284
|
}), /* @__PURE__ */ b("div", {
|
|
285
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
285
|
+
className: "ttw:flex ttw:flex-col ttw:items-end ttw:gap-1.5",
|
|
286
286
|
children: [/* @__PURE__ */ b(n, {
|
|
287
287
|
className: "ttw:w-36",
|
|
288
288
|
children: [/* @__PURE__ */ y(r, {
|
|
@@ -310,7 +310,7 @@ function E({ items: E, glCodeOptions: D, glCodeDisabled: O, glCodeUnavailableMes
|
|
|
310
310
|
className: "ttw:font-semibold",
|
|
311
311
|
children: H.totalAmount
|
|
312
312
|
}), /* @__PURE__ */ b("div", {
|
|
313
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
313
|
+
className: "ttw:flex ttw:flex-col ttw:items-end ttw:gap-1.5",
|
|
314
314
|
children: [/* @__PURE__ */ b(n, {
|
|
315
315
|
className: "ttw:w-36",
|
|
316
316
|
children: [/* @__PURE__ */ y(r, {
|
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
-
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js
|
|
5
|
-
function r({ label: r, tone: i = "warning" }) {
|
|
6
|
-
return /* @__PURE__ */ n(e, {
|
|
7
|
-
variant: "outline",
|
|
8
|
-
className: t[i],
|
|
9
|
-
children: r
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
//#endregion
|
|
13
|
-
export { r as BillDuplicateBadge, r as default };
|
|
1
|
+
import "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import "react/jsx-runtime";
|
|
@@ -11,21 +11,25 @@ import "./index23.js";
|
|
|
11
11
|
import { MissingValue as u } from "./index59.js";
|
|
12
12
|
import "./index60.js";
|
|
13
13
|
import { BILLS_SCREEN_LABELS_EN as d, BILLS_SCREEN_UPLOAD_ACCEPT as f } from "./index61.js";
|
|
14
|
-
import {
|
|
15
|
-
import "./index64.js";
|
|
16
|
-
import { BillsFilterBar as ue } from "./index73.js";
|
|
14
|
+
import { BillsFilterBar as le } from "./index73.js";
|
|
17
15
|
import "./index74.js";
|
|
18
16
|
import { BillColumn as p } from "./index75.js";
|
|
19
17
|
import { useMemo as m } from "react";
|
|
20
18
|
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
21
|
-
import { ChevronRightIcon as
|
|
19
|
+
import { ChevronRightIcon as ue, PaperclipIcon as de, PlusIcon as fe, SearchIcon as pe } from "lucide-react";
|
|
22
20
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js
|
|
23
|
-
var
|
|
21
|
+
var me = [
|
|
24
22
|
10,
|
|
25
23
|
25,
|
|
26
24
|
50,
|
|
27
25
|
100
|
|
28
|
-
],
|
|
26
|
+
], he = 240, ge = {
|
|
27
|
+
default: "",
|
|
28
|
+
warning: "ttw:bg-amber-50 ttw:hover:bg-amber-100 ttw:border-l-4! ttw:border-l-amber-600!"
|
|
29
|
+
}, _e = {
|
|
30
|
+
default: "",
|
|
31
|
+
warning: "ttw:-ml-1 ttw:font-semibold ttw:text-amber-800"
|
|
32
|
+
}, _ = 40, ve = [
|
|
29
33
|
p.Vendor,
|
|
30
34
|
p.Attachment,
|
|
31
35
|
p.IssueDate,
|
|
@@ -46,7 +50,7 @@ var ge = [
|
|
|
46
50
|
p.AmountDue,
|
|
47
51
|
p.AddedOn
|
|
48
52
|
];
|
|
49
|
-
function y({ rows: y, isLoading: b, isError: x, sorting: ye, onSortingChange: be, pageSize: S, onPageSizeChange: C, pageSizeOptions: w =
|
|
53
|
+
function y({ rows: y, isLoading: b, isError: x, sorting: ye, onSortingChange: be, pageSize: S, onPageSizeChange: C, pageSizeOptions: w = me, pageInfo: T, hasNextPage: E, hasPrevPage: D, onNextPage: O, onPrevPage: k, filterTabs: A, selectedFilterTabId: j, onFilterTabChange: M, searchValue: N, onSearchChange: xe, filters: P, visibleColumns: F = v, cellTestIds: I, isSearchActive: L, showAddPanelWhenEmpty: Se, emptyState: R, onCreateClick: z, onRetry: B, onFilesSelected: V, maxFiles: H, onEnterManually: U, uploadStatus: W, uploadErrorMessage: G, emailAddress: K, onCopyEmail: q, labels: J, duplicateWarning: Y, onReviewDuplicates: X }) {
|
|
50
54
|
let Z = m(() => ({
|
|
51
55
|
...d,
|
|
52
56
|
...J,
|
|
@@ -113,11 +117,15 @@ function y({ rows: y, isLoading: b, isError: x, sorting: ye, onSortingChange: be
|
|
|
113
117
|
[p.Vendor]: {
|
|
114
118
|
accessorKey: "vendorLabel",
|
|
115
119
|
enableSorting: !0,
|
|
116
|
-
minSize:
|
|
120
|
+
minSize: he,
|
|
117
121
|
header: e(Z.columnVendor),
|
|
118
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
122
|
+
cell: ({ row: e }) => /* @__PURE__ */ g("span", {
|
|
123
|
+
className: _e[e.original.rowTone ?? "default"],
|
|
119
124
|
"data-testid": I?.[p.Vendor],
|
|
120
|
-
children: e.original.vendorLabel || /* @__PURE__ */ h(u, { labels: Z.missingValue })
|
|
125
|
+
children: [e.original.vendorLabel || /* @__PURE__ */ h(u, { labels: Z.missingValue }), e.original.rowNote ? /* @__PURE__ */ h("span", {
|
|
126
|
+
className: "ttw:sr-only",
|
|
127
|
+
children: ` ${e.original.rowNote}`
|
|
128
|
+
}) : null]
|
|
121
129
|
})
|
|
122
130
|
},
|
|
123
131
|
[p.Attachment]: {
|
|
@@ -137,7 +145,7 @@ function y({ rows: y, isLoading: b, isError: x, sorting: ye, onSortingChange: be
|
|
|
137
145
|
className: "ttw:inline-flex ttw:cursor-default",
|
|
138
146
|
"aria-label": e.original.attachment.label,
|
|
139
147
|
onClick: (e) => e.stopPropagation(),
|
|
140
|
-
children: /* @__PURE__ */ h(
|
|
148
|
+
children: /* @__PURE__ */ h(de, { className: "ttw:size-3.5 ttw:shrink-0 ttw:text-muted-foreground" })
|
|
141
149
|
}), /* @__PURE__ */ h(re, { children: e.original.attachment.label })] }) })
|
|
142
150
|
}) : null
|
|
143
151
|
},
|
|
@@ -169,14 +177,14 @@ function y({ rows: y, isLoading: b, isError: x, sorting: ye, onSortingChange: be
|
|
|
169
177
|
accessorKey: "status",
|
|
170
178
|
enableSorting: !1,
|
|
171
179
|
header: Z.columnStatus,
|
|
172
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
180
|
+
cell: ({ row: e }) => /* @__PURE__ */ h("div", {
|
|
173
181
|
className: "ttw:flex ttw:items-center ttw:gap-1",
|
|
174
182
|
"data-testid": I?.[p.Status],
|
|
175
|
-
children:
|
|
183
|
+
children: /* @__PURE__ */ h(se, {
|
|
176
184
|
status: e.original.status,
|
|
177
185
|
tone: e.original.statusTone,
|
|
178
186
|
labels: Z.statusBadge
|
|
179
|
-
})
|
|
187
|
+
})
|
|
180
188
|
})
|
|
181
189
|
},
|
|
182
190
|
[p.AmountDue]: {
|
|
@@ -226,7 +234,7 @@ function y({ rows: y, isLoading: b, isError: x, sorting: ye, onSortingChange: be
|
|
|
226
234
|
onClick: (t) => {
|
|
227
235
|
t.stopPropagation(), e.original.onOpen();
|
|
228
236
|
},
|
|
229
|
-
children: /* @__PURE__ */ h(
|
|
237
|
+
children: /* @__PURE__ */ h(ue, { className: "ttw:size-4" })
|
|
230
238
|
})
|
|
231
239
|
})
|
|
232
240
|
}], [
|
|
@@ -235,7 +243,7 @@ function y({ rows: y, isLoading: b, isError: x, sorting: ye, onSortingChange: be
|
|
|
235
243
|
F
|
|
236
244
|
]), we = !!(z && V) && !b && !x && !L && y.length === 0 && Se === !0, $ = /* @__PURE__ */ g("div", {
|
|
237
245
|
className: "ttw:relative ttw:w-80",
|
|
238
|
-
children: [/* @__PURE__ */ h(
|
|
246
|
+
children: [/* @__PURE__ */ h(pe, { className: "ttw:pointer-events-none ttw:absolute ttw:left-3 ttw:top-1/2 ttw:size-4 ttw:-translate-y-1/2 ttw:text-muted-foreground" }), /* @__PURE__ */ h(i, {
|
|
239
247
|
className: "ttw:pl-9",
|
|
240
248
|
type: "search",
|
|
241
249
|
"aria-label": Z.searchLabel,
|
|
@@ -243,7 +251,7 @@ function y({ rows: y, isLoading: b, isError: x, sorting: ye, onSortingChange: be
|
|
|
243
251
|
value: N,
|
|
244
252
|
onChange: (e) => xe(e.target.value)
|
|
245
253
|
})]
|
|
246
|
-
}), Te = P ? /* @__PURE__ */ h(
|
|
254
|
+
}), Te = P ? /* @__PURE__ */ h(le, {
|
|
247
255
|
...P,
|
|
248
256
|
className: "ttw:px-4",
|
|
249
257
|
searchSlot: $
|
|
@@ -254,21 +262,17 @@ function y({ rows: y, isLoading: b, isError: x, sorting: ye, onSortingChange: be
|
|
|
254
262
|
return /* @__PURE__ */ g("div", {
|
|
255
263
|
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
256
264
|
children: [Y ? /* @__PURE__ */ g(e, {
|
|
257
|
-
className: "ttw:
|
|
258
|
-
children: [
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
onClick: X,
|
|
269
|
-
children: Z.duplicateBillsReviewButton
|
|
270
|
-
}) : null
|
|
271
|
-
]
|
|
265
|
+
className: "ttw:flex ttw:items-center ttw:gap-3 ttw:rounded-none ttw:border-0 ttw:border-l-4 ttw:border-l-amber-600 ttw:bg-amber-50 ttw:py-2 ttw:text-amber-700",
|
|
266
|
+
children: [/* @__PURE__ */ h(t, {
|
|
267
|
+
className: "ttw:flex-1 ttw:font-semibold",
|
|
268
|
+
children: Y
|
|
269
|
+
}), X ? /* @__PURE__ */ h(n, {
|
|
270
|
+
type: "button",
|
|
271
|
+
variant: "outline",
|
|
272
|
+
className: "ttw:text-foreground",
|
|
273
|
+
onClick: X,
|
|
274
|
+
children: Z.duplicateBillsReviewButton
|
|
275
|
+
}) : null]
|
|
272
276
|
}) : null, /* @__PURE__ */ g(te, {
|
|
273
277
|
value: j,
|
|
274
278
|
onValueChange: M,
|
|
@@ -284,7 +288,7 @@ function y({ rows: y, isLoading: b, isError: x, sorting: ye, onSortingChange: be
|
|
|
284
288
|
}, e.id))
|
|
285
289
|
}), z ? /* @__PURE__ */ g(n, {
|
|
286
290
|
onClick: z,
|
|
287
|
-
children: [/* @__PURE__ */ h(
|
|
291
|
+
children: [/* @__PURE__ */ h(fe, { className: "ttw:size-4" }), Z.createButton]
|
|
288
292
|
}) : null]
|
|
289
293
|
}), (() => {
|
|
290
294
|
let e = x ? /* @__PURE__ */ h(oe, {
|
|
@@ -328,6 +332,7 @@ function y({ rows: y, isLoading: b, isError: x, sorting: ye, onSortingChange: be
|
|
|
328
332
|
onNextPage: O,
|
|
329
333
|
onPrevPage: k,
|
|
330
334
|
onRowClick: (e) => e.onOpen(),
|
|
335
|
+
rowClassName: (e) => ge[e.rowTone ?? "default"],
|
|
331
336
|
filterComponent: Te,
|
|
332
337
|
children: L ? /* @__PURE__ */ h(c, {
|
|
333
338
|
title: Z.filteredEmptyTitle,
|
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.5.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.5.9", n = "fa29013241e781286ad74752703fc9b45fd401b2", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|