@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 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, history: c, approvalPolicy: l, labels: u, hasScheduledPayment: d }) {
8
- let f = a.currency, p = r({
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: d
13
- }), m = n(a), h = m?.bank_account?.account_number, g = e(a.issued_at) || u.notProvided, _ = e(a.due_date) || u.notProvided, v = new Map(s.map((e) => [e.value, e.label])), y = [
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: u.subtotalRow,
15
+ label: d.subtotalRow,
16
16
  minorUnits: a.subtotal
17
17
  },
18
18
  {
19
- label: u.discountRow,
19
+ label: d.discountRow,
20
20
  minorUnits: a.discount
21
21
  },
22
22
  {
23
- label: u.taxRow,
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, f)
29
- })).filter((e) => !!e.value), b = i(a.total_amount, f);
30
- return b && y.push({
31
- label: u.totalRow,
32
- value: b,
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), f) ?? "",
36
- invoiceDateLabel: g,
37
- dueDateLabel: _,
38
- dueDateTone: p.isOverdue ? "danger" : "default",
39
- status: p.status,
40
- statusTone: p.tone,
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: m?.name || u.notProvided,
43
- email: m?.email ?? void 0,
44
- paymentInstructionsLabel: h ? u.paymentInstructionsValue(h.slice(-4)) : void 0
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: u.invoiceDateRow,
49
- value: g
48
+ label: d.invoiceDateRow,
49
+ value: _
50
50
  },
51
51
  {
52
- label: u.dueDateRow,
53
- value: _
52
+ label: d.dueDateRow,
53
+ value: v
54
54
  },
55
55
  {
56
- label: u.invoiceNumberRow,
57
- value: a.document_id || u.notProvided
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, f);
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: (e.ledger_account_id ? v.get(e.ledger_account_id) : void 0) || u.glCodeMissing,
66
- qtyPriceLabel: e.quantity != null && t ? u.qtyPriceValue(String(e.quantity), t) : "",
67
- amount: i(e.subtotal, f) ?? ""
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: y,
71
- approvalPolicy: l,
72
- history: c
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 = ee(), D = w.data, O = ve({
52
- payable: D,
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
- }), k = D?.counterpart_id;
54
+ }), M = A?.counterpart_id;
55
55
  ke(() => {
56
- v || k && (_(k), y(!0));
57
- }, [v, k]);
56
+ v || M && (_(M), y(!0));
57
+ }, [v, M]);
58
58
  let Be = i((e) => {
59
59
  y(!0), _(e);
60
- }, []), A = De({
60
+ }, []), N = De({
61
61
  payableId: p ? void 0 : C,
62
62
  counterpartId: p ? void 0 : g,
63
- payableCounterpartId: k,
63
+ payableCounterpartId: M,
64
64
  onCounterpartChange: Be,
65
- requiredError: O.errors?.vendor,
66
- payableCounterpartBankAccountId: D?.counterpart_bank_account_id ?? void 0,
67
- extractedVendor: D?.counterpart_raw_data ?? void 0
68
- }), j = _e({
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: O,
70
+ form: j,
71
71
  counterpartId: g,
72
72
  clearCounterpart: !!(C && v) && !g,
73
- prepareVendorForSave: A.savePaymentInstructions,
73
+ prepareVendorForSave: N.savePaymentInstructions,
74
74
  onPayableCreated: S,
75
75
  onSaved: S,
76
76
  onDraftSaved: () => d(!1),
77
77
  onFinalized: () => d(!1)
78
- }), M = !!(j.isSavingDraft || j.isFinalizing), N = p ? C : void 0, P = be({
79
- payableId: N,
80
- status: D?.status
81
- }), F = Ae(null), I = Se({
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: D?.scheduled_payment_date,
83
+ scheduledPaymentDate: A?.scheduled_payment_date,
84
84
  enabled: p
85
- }), L = ae(D), R = Oe({
86
- payableId: N,
87
- counterpartId: p ? k : void 0,
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
- }), { initResponse: z } = re(), B = e(z?.scopes, [t.CounterpartWriteOrg]) && e(z?.scopes, [t.PayableWriteOrg]), V = he({
91
- payableId: N,
92
- amountDueMinorUnits: ie(D) ?? 0,
93
- amountToPayMinorUnits: D?.amount_to_pay ?? void 0,
94
- currencyCode: D?.currency ?? void 0,
95
- dueDate: D?.due_date,
96
- hasScheduledPayment: I.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
- }), H = ye({
99
- payableId: N,
100
- approvalPolicyId: D?.approval_policy_id,
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: N,
105
- status: D?.status,
106
- currentApprovalRequestId: P.id,
107
- isPolicyApprover: P.isPolicyApprover,
108
- hasWaitingRequest: P.hasWaitingRequest,
109
- hasScheduledPayment: I.hasScheduledPayment,
110
- scheduledPaymentIntentId: I.scheduledPaymentIntentId,
111
- isScheduledPaymentUnknown: I.isResolving,
112
- pendingApprovers: H.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: V.isPending,
115
- onMarkAsPaidSelect: V.open,
116
- onPayBillSelect: () => je(L) || !B ? F.current?.open() : R.open()
117
- }), U = Ce({
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: D?.status,
119
+ status: A?.status,
120
120
  enabled: !p,
121
121
  labels: h.deleteDraft,
122
122
  onDeleted: () => d(!1)
123
- }), W = a(() => (E.data?.data ?? []).map((e) => ({
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
- })), [E.data]), G = de(N), Ue = e(z?.scopes, [t.UserReadOrg]), K = te({ enabled: p && Ue }), q = a(() => Te(G.data?.data ?? [], K.data?.data ?? [], h.history), [
127
- G.data,
128
- K.data,
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
- ]), We = a(() => p && D ? we({
131
- payable: D,
132
+ ]), Ke = a(() => p && A ? we({
133
+ payable: A,
132
134
  lineItems: T.lineItems,
133
- glCodeOptions: W,
134
- history: q,
135
- approvalPolicy: H.view,
135
+ glCodeOptions: K,
136
+ glCodeRosterAvailable: J,
137
+ history: Ge,
138
+ approvalPolicy: W.view,
136
139
  labels: h.detail,
137
- hasScheduledPayment: I.hasScheduledPayment
140
+ hasScheduledPayment: z.hasScheduledPayment
138
141
  }) : void 0, [
139
- I.hasScheduledPayment,
140
- H.view,
142
+ z.hasScheduledPayment,
143
+ W.view,
141
144
  h.detail,
142
- W,
143
- q,
145
+ K,
146
+ J,
147
+ Ge,
144
148
  T.lineItems,
145
- D,
149
+ A,
146
150
  p
147
- ]), J = D?.source_of_payable_data === "ocr", Y = L?.name, Ge = p ? Y ? h.viewTitle(Y) : h.readOnlyTitle : J && Y ? h.extractedTitle(Y) : h.newTitle, Ke = p && D?.created_at ? h.addedOn(ne(D.created_at.slice(0, 10))) : void 0, X = i(() => {
148
- let e = O.isDirty || A.hasUnsavedVendorChanges || !!j.stagedFile || j.isFileDeletionPending;
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
- j.isFileDeletionPending,
156
- j.stagedFile,
157
- O.isDirty,
159
+ P.isFileDeletionPending,
160
+ P.stagedFile,
161
+ j.isDirty,
158
162
  d,
159
163
  p,
160
- A.hasUnsavedVendorChanges
161
- ]), qe = i(() => {
164
+ N.hasUnsavedVendorChanges
165
+ ]), Xe = i(() => {
162
166
  x(!1), d(!1);
163
- }, [d]), Z = T.isResolving || A.mode === "creating", Je = i(async () => {
164
- if (Z) return;
165
- let e = await j.saveDraft();
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
- j,
169
- Z,
172
+ P,
173
+ $,
170
174
  d
171
- ]), Ye = i((e) => {
172
- if (!M) return e ? d(!0) : X();
175
+ ]), Qe = i((e) => {
176
+ if (!F) return e ? d(!0) : Q();
173
177
  }, [
174
- X,
175
- M,
178
+ Q,
179
+ F,
176
180
  d
177
- ]), Q = !!Pe && !Le, $ = !p && J && !Fe, Xe = Q || $ ? /* @__PURE__ */ l(s, { children: [Q ? /* @__PURE__ */ c(se, {
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, $ ? /* @__PURE__ */ c(ce, { onDismiss: () => Ie(!0) }) : null] }) : void 0;
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: Ye,
186
- title: Ge,
187
- subtitle: Ke,
188
- notice: Xe,
189
+ onOpenChange: Qe,
190
+ title: Je,
191
+ subtitle: Ye,
192
+ notice: tt,
189
193
  vendor: {
190
- ...A,
194
+ ...N,
191
195
  testId: r.vendorSection
192
196
  },
193
- values: O.values,
194
- errors: O.errors,
195
- onChange: O.onChange,
197
+ values: j.values,
198
+ errors: j.errors,
199
+ onChange: j.onChange,
196
200
  lineItems: {
197
- items: O.lineItemRows,
198
- glCodeOptions: W,
199
- discount: O.discount,
200
- onDiscountChange: O.onDiscountChange,
201
- tax: O.tax,
202
- onTaxChange: O.onTaxChange,
203
- total: O.total,
204
- onTotalChange: O.onTotalChange,
205
- onAddLineItem: O.onAddLineItem,
206
- errors: O.lineItemErrors,
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 && !D?.file && (w.isLoading || D?.ocr_status === "processing"),
213
- file: D?.file ? {
214
- id: D.file.id,
215
- name: D.file.name,
216
- url: D.file.url,
217
- mimetype: D.file.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: j.stagedFile,
221
- onFileStaged: j.stageFile,
222
- onClearStagedFile: j.clearStagedFile,
223
- isSaving: M
226
+ stagedFile: P.stagedFile,
227
+ onFileStaged: P.stageFile,
228
+ onClearStagedFile: P.clearStagedFile,
229
+ isSaving: F
224
230
  },
225
231
  deletion: {
226
- isPending: j.isFileDeletionPending,
227
- onRequest: j.requestFileDeletion,
228
- onDetachNow: j.detachFileNow,
229
- isDeleting: j.isDeletingFile,
230
- hasFailed: j.hasFileDeletionFailed
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: U.menuItems,
239
+ menuItems: G.menuItems,
234
240
  readOnly: p,
235
241
  detail: p ? {
236
- view: We,
242
+ view: Ke,
237
243
  actions: Ve,
238
- scheduledSummary: I.hasScheduledPayment && I.scheduledDateLabel ? h.scheduledSummary(I.scheduledDateLabel) : void 0,
239
- paymentInstructionsForm: k && B ? {
240
- isOpen: R.isOpen,
241
- values: R.values,
242
- errors: R.errors,
243
- isSaving: R.isSaving,
244
- onOpen: R.open,
245
- onCancel: R.close,
246
- onChange: R.onChange,
247
- onSave: R.save
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 || E.isResolving,
250
- isError: w.isError || T.isError || E.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: M,
254
- isSavingDraft: j.isSavingDraft,
255
- isFinalizing: j.isFinalizing,
256
- onCancel: X,
259
+ isSaving: F,
260
+ isSavingDraft: P.isSavingDraft,
261
+ isFinalizing: P.isFinalizing,
262
+ onCancel: Q,
257
263
  onCollapse: p ? Me : void 0,
258
- onSaveDraft: j.saveDraft,
259
- onFinalize: j.finalize,
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: Je,
265
- onDiscard: qe,
270
+ onSaveDraft: Ze,
271
+ onDiscard: Xe,
266
272
  onCancel: () => x(!1),
267
- isSaving: j.isSavingDraft,
268
- isSaveDraftDisabled: Z,
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
- ...U.dialog,
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, { ...V.dialogProps }),
288
- p && D ? /* @__PURE__ */ c(me, {
289
- ref: F,
290
- payable: D,
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
@@ -6,6 +6,7 @@ var e = {
6
6
  descriptionPlaceholder: "e.g., Office supplies",
7
7
  glCode: "GL code (optional)",
8
8
  glCodePlaceholder: "Select",
9
+ glCodeClear: "Clear GL code",
9
10
  quantity: "Quantity",
10
11
  price: "Price",
11
12
  amount: "Amount",
@@ -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, Typography as d } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { LINE_ITEMS_SECTION_LABELS_EN as f } from "./index31.js";
3
- import { useId as p } from "react";
4
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
5
- import { Minus as g, Plus as _, Trash2 as v } from "lucide-react";
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 y({ items: y, glCodeOptions: b, discount: x, onDiscountChange: S, tax: C, onTaxChange: w, total: T, onTotalChange: E, onAddLineItem: D, errors: O, disabled: k, testId: A, labels: j }) {
8
- let M = {
9
- ...f,
10
- ...j
11
- }, N = p(), P = y.length > 1;
12
- return /* @__PURE__ */ h("section", {
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": A,
14
+ "data-testid": z,
15
15
  children: [
16
- /* @__PURE__ */ m(d, {
16
+ /* @__PURE__ */ y(h, {
17
17
  component: "h2",
18
18
  variant: "h6",
19
19
  className: "ttw:font-semibold",
20
- children: M.heading
20
+ children: V.heading
21
21
  }),
22
- /* @__PURE__ */ m("p", {
22
+ /* @__PURE__ */ y("p", {
23
23
  className: "ttw:text-sm ttw:text-muted-foreground",
24
- children: M.helpText
24
+ children: V.helpText
25
25
  }),
26
- y.map((d, f) => {
27
- let p = `${N}-${d.id}`, y = O?.[d.id], x = (e) => `${p}-${e}-error`, S = (e) => y?.[e], C = (e) => {
28
- let t = S(e);
29
- return t ? /* @__PURE__ */ m("p", {
30
- id: x(e),
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__ */ m("div", {
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__ */ h("div", {
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__ */ h("div", {
45
+ /* @__PURE__ */ b("div", {
41
46
  className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-2",
42
- children: [/* @__PURE__ */ h("div", {
47
+ children: [/* @__PURE__ */ b("div", {
43
48
  className: "ttw:flex ttw:items-center ttw:gap-2",
44
- children: [P ? /* @__PURE__ */ h("span", {
49
+ children: [U ? /* @__PURE__ */ b("span", {
45
50
  className: "ttw:text-sm ttw:text-muted-foreground",
46
- children: [f + 1, "."]
47
- }) : null, /* @__PURE__ */ m(a, {
48
- htmlFor: `${p}-description`,
49
- children: M.description
51
+ children: [_ + 1, "."]
52
+ }) : null, /* @__PURE__ */ y(a, {
53
+ htmlFor: `${v}-description`,
54
+ children: V.description
50
55
  })]
51
- }), P ? /* @__PURE__ */ m(e, {
56
+ }), U ? /* @__PURE__ */ y(e, {
52
57
  type: "button",
53
58
  variant: "ghost",
54
59
  size: "icon",
55
- disabled: k,
56
- "aria-label": M.removeLineItem(f + 1),
57
- onClick: d.onRemove,
58
- children: /* @__PURE__ */ m(v, { className: "ttw:size-4" })
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__ */ h("div", {
66
+ /* @__PURE__ */ b("div", {
62
67
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
63
- children: [/* @__PURE__ */ m(t, {
64
- id: `${p}-description`,
65
- placeholder: M.descriptionPlaceholder,
66
- value: d.description,
67
- disabled: k,
68
- "aria-invalid": S("description") ? !0 : void 0,
69
- "aria-describedby": S("description") ? x("description") : void 0,
70
- onChange: (e) => d.onChange({ description: e.target.value })
71
- }), C("description")]
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__ */ h("div", {
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__ */ h("div", {
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__ */ m(a, {
80
- htmlFor: `${p}-gl-code`,
81
- children: M.glCode
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__ */ h(o, {
84
- value: d.glCode,
85
- disabled: k,
86
- onValueChange: (e) => d.onChange({ glCode: e }),
87
- children: [/* @__PURE__ */ m(l, {
88
- id: `${p}-gl-code`,
89
- className: "ttw:w-full",
90
- "aria-invalid": S("glCode") ? !0 : void 0,
91
- "aria-describedby": S("glCode") ? x("glCode") : void 0,
92
- children: /* @__PURE__ */ m(u, { placeholder: M.glCodePlaceholder })
93
- }), /* @__PURE__ */ m(s, { children: b.map((e) => /* @__PURE__ */ m(c, {
94
- value: e.value,
95
- children: e.label
96
- }, e.value)) })]
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
- C("glCode")
130
+ M("glCode")
99
131
  ]
100
132
  }),
101
- /* @__PURE__ */ h("div", {
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__ */ m(a, {
105
- htmlFor: `${p}-quantity`,
106
- children: M.quantity
136
+ /* @__PURE__ */ y(a, {
137
+ htmlFor: `${v}-quantity`,
138
+ children: V.quantity
107
139
  }),
108
- /* @__PURE__ */ h(n, {
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__ */ m(e, {
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: k,
117
- "aria-label": M.decreaseQuantity(f + 1),
118
- onClick: () => d.onQuantityStep(-1),
119
- children: /* @__PURE__ */ m(g, { className: "ttw:size-3.5" })
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__ */ m(i, {
122
- id: `${p}-quantity`,
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: d.quantity,
126
- disabled: k,
127
- "aria-invalid": S("quantity") ? !0 : void 0,
128
- "aria-describedby": S("quantity") ? x("quantity") : void 0,
129
- onChange: (e) => d.onChange({ quantity: e.target.value })
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__ */ m(e, {
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: k,
137
- "aria-label": M.increaseQuantity(f + 1),
138
- onClick: () => d.onQuantityStep(1),
139
- children: /* @__PURE__ */ m(_, { className: "ttw:size-3.5" })
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
- C("quantity")
175
+ M("quantity")
144
176
  ]
145
177
  }),
146
- /* @__PURE__ */ h("div", {
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__ */ m(a, {
150
- htmlFor: `${p}-price`,
151
- children: M.price
181
+ /* @__PURE__ */ y(a, {
182
+ htmlFor: `${v}-price`,
183
+ children: V.price
152
184
  }),
153
- /* @__PURE__ */ h(n, { children: [/* @__PURE__ */ m(r, {
185
+ /* @__PURE__ */ b(n, { children: [/* @__PURE__ */ y(r, {
154
186
  align: "inline-start",
155
187
  "aria-hidden": !0,
156
- children: M.currencySymbol
157
- }), /* @__PURE__ */ m(i, {
158
- id: `${p}-price`,
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: d.price,
163
- disabled: k,
164
- "aria-invalid": S("price") ? !0 : void 0,
165
- "aria-describedby": S("price") ? x("price") : void 0,
166
- onChange: (e) => d.onChange({ price: e.target.value })
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
- C("price")
200
+ M("price")
169
201
  ]
170
202
  }),
171
- /* @__PURE__ */ h("div", {
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__ */ m(a, {
175
- htmlFor: `${p}-amount`,
176
- children: M.amount
206
+ /* @__PURE__ */ y(a, {
207
+ htmlFor: `${v}-amount`,
208
+ children: V.amount
177
209
  }),
178
- /* @__PURE__ */ h(n, { children: [/* @__PURE__ */ m(r, {
210
+ /* @__PURE__ */ b(n, { children: [/* @__PURE__ */ y(r, {
179
211
  align: "inline-start",
180
212
  "aria-hidden": !0,
181
- children: M.currencySymbol
182
- }), /* @__PURE__ */ m(i, {
183
- id: `${p}-amount`,
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: d.amount,
188
- disabled: k,
189
- "aria-invalid": S("amount") ? !0 : void 0,
190
- "aria-describedby": S("amount") ? x("amount") : void 0,
191
- onChange: (e) => d.onChange({ amount: e.target.value })
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
- C("amount")
225
+ M("amount")
194
226
  ]
195
227
  })
196
228
  ]
197
229
  })
198
230
  ]
199
231
  })
200
- }, d.id);
232
+ }, h.id);
201
233
  }),
202
- /* @__PURE__ */ m(e, {
234
+ /* @__PURE__ */ y(e, {
203
235
  type: "button",
204
236
  variant: "link",
205
- disabled: k,
237
+ disabled: R,
206
238
  className: "ttw:self-start",
207
- onClick: D,
208
- children: M.addLineItem
239
+ onClick: I,
240
+ children: V.addLineItem
209
241
  }),
210
- /* @__PURE__ */ h("div", {
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__ */ h("div", {
245
+ /* @__PURE__ */ b("div", {
214
246
  className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
215
- children: [/* @__PURE__ */ m(a, {
216
- htmlFor: `${N}-discount`,
217
- children: M.discount
218
- }), /* @__PURE__ */ h(n, {
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__ */ m(r, {
252
+ children: [/* @__PURE__ */ y(r, {
221
253
  align: "inline-start",
222
254
  "aria-hidden": !0,
223
- children: M.currencySymbol
224
- }), /* @__PURE__ */ m(i, {
225
- id: `${N}-discount`,
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: x,
230
- disabled: k,
231
- onChange: (e) => S(e.target.value)
261
+ value: A,
262
+ disabled: R,
263
+ onChange: (e) => j(e.target.value)
232
264
  })]
233
265
  })]
234
266
  }),
235
- /* @__PURE__ */ h("div", {
267
+ /* @__PURE__ */ b("div", {
236
268
  className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
237
- children: [/* @__PURE__ */ m(a, {
238
- htmlFor: `${N}-tax`,
239
- children: M.tax
240
- }), /* @__PURE__ */ h(n, {
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__ */ m(r, {
274
+ children: [/* @__PURE__ */ y(r, {
243
275
  align: "inline-start",
244
276
  "aria-hidden": !0,
245
- children: M.currencySymbol
246
- }), /* @__PURE__ */ m(i, {
247
- id: `${N}-tax`,
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: C,
252
- disabled: k,
253
- onChange: (e) => w(e.target.value)
283
+ value: M,
284
+ disabled: R,
285
+ onChange: (e) => N(e.target.value)
254
286
  })]
255
287
  })]
256
288
  }),
257
- /* @__PURE__ */ h("div", {
289
+ /* @__PURE__ */ b("div", {
258
290
  className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
259
- children: [/* @__PURE__ */ m(a, {
260
- htmlFor: `${N}-total`,
291
+ children: [/* @__PURE__ */ y(a, {
292
+ htmlFor: `${H}-total`,
261
293
  className: "ttw:font-semibold",
262
- children: M.totalAmount
263
- }), /* @__PURE__ */ h(n, {
294
+ children: V.totalAmount
295
+ }), /* @__PURE__ */ b(n, {
264
296
  className: "ttw:w-36",
265
- children: [/* @__PURE__ */ m(r, {
297
+ children: [/* @__PURE__ */ y(r, {
266
298
  align: "inline-start",
267
299
  "aria-hidden": !0,
268
- children: M.currencySymbol
269
- }), /* @__PURE__ */ m(i, {
270
- id: `${N}-total`,
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: T,
275
- disabled: k,
276
- onChange: (e) => E(e.target.value)
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 { y as LineItemsSection, y as default };
318
+ export { E as LineItemsSection, E as default };
@@ -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.41", n = "290caf142b27988639d1dfeee45de14754eab9af", r = Object.freeze({
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.3.41",
3
+ "version": "0.3.42",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {