@tesouro/embedded-components-react 0.5.73 → 0.5.75

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.
@@ -627,6 +627,35 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
627
627
  providerLabels?: Partial<WidgetProviderLabels>;
628
628
  }
629
629
 
630
+ interface FinopsThemeColors {
631
+ primary?: string;
632
+ primaryForeground?: string;
633
+ }
634
+ interface MoniteWrapperProps {
635
+ finopsThemeColors?: FinopsThemeColors;
636
+ }
637
+
638
+ type MoniteRegionProviderProps = WidgetProviderProps & MoniteWrapperProps;
639
+
640
+ type InvoiceSettingsProps = MoniteRegionProviderProps;
641
+ /**
642
+ * Entity invoice settings: document numbering, PDF options and the logo.
643
+ *
644
+ * **This still renders Monite's `TemplateSettings` inside.** The native
645
+ * replacement is being built one subtask at a time — the presentational layer
646
+ * in EMBD-5845 and its data-access hooks in EMBD-5844 — and EMBD-5848 swaps
647
+ * this component's body over to them. Standing the widget up now, around the
648
+ * surface that already works, is what lets the harness route (EMBD-5846), the
649
+ * published export and the Settings cutover (EMBD-5849) be wired and reviewed
650
+ * before that swap, so none of them move again when it happens.
651
+ *
652
+ * The whole prop type is the provider's, so everything spreads onto it. A prop
653
+ * this widget owns rather than forwards has to be destructured out here — a
654
+ * leftover spread would send it to the provider, which ignores what it does not
655
+ * recognise, and the prop would silently do nothing.
656
+ */
657
+ declare function InvoiceSettings(props: InvoiceSettingsProps): React.JSX.Element;
658
+
630
659
  interface CheckAmountAndDetailScreenLabels {
631
660
  title: string;
632
661
  backButton: string;
@@ -737,5 +766,5 @@ interface RemoteCheckCaptureWidgetProps extends WidgetProviderProps {
737
766
  }
738
767
  declare function RemoteCheckCaptureWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, labels, onDepositComplete, }: RemoteCheckCaptureWidgetProps): React.JSX.Element;
739
768
 
740
- export { RemoteCheckCaptureWidget };
741
- export type { RemoteCheckCaptureWidgetProps };
769
+ export { InvoiceSettings, RemoteCheckCaptureWidget };
770
+ export type { InvoiceSettingsProps, RemoteCheckCaptureWidgetProps };
@@ -1,3 +1,5 @@
1
- import { RemoteCheckCaptureWidget as e } from "../libs/tesouro-embedded-components-react/remote-check-capture/feature/dist/lib/RemoteCheckCaptureWidget/RemoteCheckCaptureWidget.js";
1
+ import { InvoiceSettings as e } from "../libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index3.js";
2
+ import "./InvoiceSettings.js";
3
+ import { RemoteCheckCaptureWidget as t } from "../libs/tesouro-embedded-components-react/remote-check-capture/feature/dist/lib/RemoteCheckCaptureWidget/RemoteCheckCaptureWidget.js";
2
4
  import "./RemoteCheckCapture.js";
3
- export { e as RemoteCheckCaptureWidget };
5
+ export { e as InvoiceSettings, t as RemoteCheckCaptureWidget };
@@ -31,7 +31,6 @@ var v = {
31
31
  unreadableTotal: "Enter a valid total amount.",
32
32
  totalNotGreaterThanZero: "Total amount must be greater than $0.",
33
33
  poNumberTooLong: "PO number must be 255 characters or fewer.",
34
- implausibleDate: "Enter a date within the last 10 years and next year.",
35
34
  dueBeforeInvoiceDate: "Due date must be on or after the invoice date."
36
35
  }, y = {
37
36
  paymentInstructionsValue: (e) => `Account ending in ${e}`,
@@ -1,24 +1,16 @@
1
1
  import { BILL_CREATE_MESSAGE_LABELS_EN as e } from "./index49.js";
2
2
  import { isPersistableLineItem as t, parseMoneyToMinorUnits as n, parseQuantity as r } from "./index55.js";
3
3
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js
4
- var i = /^(?:\d{1,3}(?:,\d{3})+(?:\.\d+)?|\d+(?:\.\d+)?|\.\d+)$/, a = 255, o = 10, s = 1;
5
- function c(e) {
6
- let t = new Date(e);
7
- if (Number.isNaN(t.getTime())) return !1;
8
- let n = /* @__PURE__ */ new Date(), r = Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), n.getUTCDate()), i = new Date(r);
9
- i.setUTCFullYear(i.getUTCFullYear() - o);
10
- let a = new Date(r);
11
- return a.setUTCFullYear(a.getUTCFullYear() + s), t < i || t > a;
12
- }
13
- function l(t, n = e) {
4
+ var i = /^(?:\d{1,3}(?:,\d{3})+(?:\.\d+)?|\d+(?:\.\d+)?|\.\d+)$/, a = 255;
5
+ function o(t, n = e) {
14
6
  let r = {};
15
7
  return t.poNumber.length > a && (r.poNumber = n.poNumberTooLong), Object.keys(r).length ? r : void 0;
16
8
  }
17
- function u(e) {
9
+ function s(e) {
18
10
  let t = e.trim();
19
11
  return !t || n(t) !== null ? !0 : i.test(t) ? Number(t.replaceAll(",", "")) === 0 : !1;
20
12
  }
21
- function d(t, i = e) {
13
+ function c(t, i = e) {
22
14
  let a = {};
23
15
  for (let e of t) {
24
16
  let t = n(e.price), o = n(e.amount), s = {};
@@ -26,46 +18,46 @@ function d(t, i = e) {
26
18
  }
27
19
  return Object.keys(a).length ? a : void 0;
28
20
  }
29
- function f(i, a, o, s = e) {
30
- let l = {};
31
- a || (l.vendor = s.requiredField), i.invoiceNumber.trim() || (l.invoiceNumber = s.requiredField);
32
- let u = i.invoiceDate.trim(), d = i.dueDate.trim();
33
- u ? c(u) && (l.invoiceDate = s.implausibleDate) : l.invoiceDate = s.requiredField, d ? c(d) ? l.dueDate = s.implausibleDate : u && d < u && (l.dueDate = s.dueBeforeInvoiceDate) : l.dueDate = s.requiredField;
34
- let f = {};
21
+ function l(i, a, o, s = e) {
22
+ let c = {};
23
+ a || (c.vendor = s.requiredField), i.invoiceNumber.trim() || (c.invoiceNumber = s.requiredField);
24
+ let l = i.invoiceDate.trim(), u = i.dueDate.trim();
25
+ l || (c.invoiceDate = s.requiredField), u ? l && u < l && (c.dueDate = s.dueBeforeInvoiceDate) : c.dueDate = s.requiredField;
26
+ let d = {};
35
27
  return o.forEach((e, i) => {
36
28
  if (i > 0 && !t(e)) return;
37
29
  let a = {};
38
- e.description.trim() || (a.description = s.requiredField), r(e.quantity) === null && (a.quantity = s.requiredField), n(e.price) === null && n(e.amount) === null && (a.price = s.requiredField, a.amount = s.requiredField), Object.keys(a).length && (f[e.id] = a);
30
+ e.description.trim() || (a.description = s.requiredField), r(e.quantity) === null && (a.quantity = s.requiredField), n(e.price) === null && n(e.amount) === null && (a.price = s.requiredField, a.amount = s.requiredField), Object.keys(a).length && (d[e.id] = a);
39
31
  }), {
40
- formErrors: Object.keys(l).length ? l : void 0,
41
- lineItemErrors: Object.keys(f).length ? f : void 0
32
+ formErrors: Object.keys(c).length ? c : void 0,
33
+ lineItemErrors: Object.keys(d).length ? d : void 0
42
34
  };
43
35
  }
44
- function p(e) {
36
+ function u(e) {
45
37
  let t = e.trim();
46
38
  if (!t) return !0;
47
39
  let n = t.startsWith("-") ? t.slice(1) : t;
48
40
  return i.test(n) ? Number(t.replaceAll(",", "")) <= 0 : !1;
49
41
  }
50
- function m(e, t) {
51
- if (n(e) === null) return p(e) ? t.totalNotGreaterThanZero : t.unreadableTotal;
42
+ function d(e, t) {
43
+ if (n(e) === null) return u(e) ? t.totalNotGreaterThanZero : t.unreadableTotal;
52
44
  }
53
- function h(t, n = e) {
54
- let r = m(t, n);
45
+ function f(t, n = e) {
46
+ let r = d(t, n);
55
47
  return r ? { total: r } : void 0;
56
48
  }
57
- function g(t, r = e) {
49
+ function p(t, r = e) {
58
50
  if (t === void 0) return;
59
51
  let i = n(t);
60
52
  if (i !== null) return i > 0 ? void 0 : { total: r.totalNotGreaterThanZero };
61
53
  }
62
- function _(t, n, r, i = e) {
54
+ function m(t, n, r, i = e) {
63
55
  let a = {};
64
- if (u(t) || (a.discount = i.unreadableDiscount), u(n) || (a.tax = i.unreadableTax), r !== void 0) {
65
- let e = m(r, i);
56
+ if (s(t) || (a.discount = i.unreadableDiscount), s(n) || (a.tax = i.unreadableTax), r !== void 0) {
57
+ let e = d(r, i);
66
58
  e && (a.total = e);
67
59
  }
68
60
  return Object.keys(a).length ? a : void 0;
69
61
  }
70
62
  //#endregion
71
- export { u as isReadableMoneyOrZero, f as validateBillCompleteness, h as validateBillTotalIsPayable, _ as validateBillTotals, l as validateBillValues, d as validateLineItems, g as validateStoredAmountDue };
63
+ export { s as isReadableMoneyOrZero, l as validateBillCompleteness, f as validateBillTotalIsPayable, m as validateBillTotals, o as validateBillValues, c as validateLineItems, p as validateStoredAmountDue };
@@ -485,7 +485,7 @@ function c({ open: c, onOpenChange: l, payableId: et, readOnly: u = !1, copy: tt
485
485
  actions: U,
486
486
  scheduledSummary: D.hasScheduledPayment && D.scheduledDateLabel ? f.scheduledSummary(D.scheduledDateLabel) : void 0,
487
487
  scheduledStatusLabel: D.hasScheduledPayment && D.scheduledDateLabel ? f.scheduledStatusBadge(D.scheduledDateLabel) : void 0,
488
- showApprovalOverrideNotice: !Pt && !Nt && Mt && !!x?.approval_policy_id,
488
+ showApprovalOverrideNotice: !Pt && Mt,
489
489
  awaitingApprovalNotice: !Pt && !Nt && !Mt && x?.status === "approve_in_progress" && x?.approval_policy_id ? Ft ? f.awaitingApprovalNotice(Ft) : f.awaitingApprovalUnknownNotice : void 0,
490
490
  payTo: {
491
491
  onEdit: F.mode === "resolved" ? F.onEdit : void 0,
@@ -9,198 +9,198 @@ import "../../../shared/data-access/dist/index.js";
9
9
  import { useWidgetConfig as te } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
10
10
  import { useOrganizationUserNames as ne } from "../../../shared/feature/dist/lib/user/useOrganizationUserNames.js";
11
11
  import "../../../shared/feature/dist/index.js";
12
- import { usePayableApprovalRequestsQuery as re } from "../../data-access/dist/index8.js";
13
- import { usePayableHistoryQuery as n } from "../../data-access/dist/index9.js";
14
- import { useAllPayableLineItemsQuery as r } from "../../data-access/dist/index10.js";
15
- import { usePayableQuery as i } from "../../data-access/dist/index17.js";
12
+ import { usePayableApprovalRequestsQuery as n } from "../../data-access/dist/index8.js";
13
+ import { usePayableHistoryQuery as r } from "../../data-access/dist/index9.js";
14
+ import { useAllPayableLineItemsQuery as i } from "../../data-access/dist/index10.js";
15
+ import { usePayableQuery as a } from "../../data-access/dist/index17.js";
16
16
  import "../../data-access/dist/index.js";
17
- import { BillDecisionDialog as a } from "../../ui/dist/index56.js";
18
- import { BillDetailsSheet as o } from "../../ui/dist/index65.js";
19
- import { BillDuplicateNotice as s } from "../../ui/dist/index72.js";
20
- import { MarkAsPaidDialog as c } from "../../ui/dist/index102.js";
17
+ import { BillDecisionDialog as o } from "../../ui/dist/index56.js";
18
+ import { BillDetailsSheet as s } from "../../ui/dist/index65.js";
19
+ import { BillDuplicateNotice as c } from "../../ui/dist/index72.js";
20
+ import { MarkAsPaidDialog as l } from "../../ui/dist/index102.js";
21
21
  import "../../ui/dist/index.js";
22
- import { usePayableDuplicateReview as l } from "./index13.js";
22
+ import { usePayableDuplicateReview as u } from "./index13.js";
23
23
  import "./index14.js";
24
- import { canOverrideApprovalPolicy as u, canReadCounterpartBankAccounts as d } from "./index20.js";
25
- import { resolveAmountDueMinorUnits as f } from "./index21.js";
26
- import { usePayableAchInstructions as p } from "../../../shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js";
24
+ import { canOverrideApprovalPolicy as d, canReadCounterpartBankAccounts as f } from "./index20.js";
25
+ import { resolveAmountDueMinorUnits as p } from "./index21.js";
26
+ import { usePayableAchInstructions as m } from "../../../shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js";
27
27
  import "../../../shared/counterpart-management/feature/dist/index.js";
28
- import { PayBillFlow as m } from "./index27.js";
28
+ import { PayBillFlow as h } from "./index27.js";
29
29
  import "./index28.js";
30
- import { mapPayableToBillDetails as ie } from "./index42.js";
31
- import { mergeMarkAsPaidFlowLabels as ae } from "./index15.js";
32
- import { useMarkAsPaidFlow as oe } from "./index17.js";
30
+ import { mapPayableToBillDetails as re } from "./index42.js";
31
+ import { mergeMarkAsPaidFlowLabels as ie } from "./index15.js";
32
+ import { useMarkAsPaidFlow as ae } from "./index17.js";
33
33
  import "./index18.js";
34
- import { mergeDecisionDialogCopy as se, mergePaymentHistoryMethodLabels as ce } from "./index46.js";
35
- import { buildPaymentHistory as le } from "./index3.js";
36
- import { currentApprovalRound as ue } from "./index4.js";
37
- import { usePayableApprovalRoundStart as de } from "./index32.js";
38
- import { useApprovalPolicyCardView as fe } from "./index33.js";
39
- import { resolveBillRejectionNotice as pe } from "./index34.js";
40
- import { useCurrentApprovalRequestId as me } from "./index35.js";
41
- import { usePayableDetailActions as he } from "./index36.js";
42
- import { useScheduledPayment as ge } from "./index37.js";
43
- import { BILL_DETAILS_LABELS_EN as h } from "./index63.js";
44
- import { useMemo as g, useRef as _e } from "react";
45
- import { Fragment as ve, jsx as _, jsxs as ye } from "react/jsx-runtime";
34
+ import { mergeDecisionDialogCopy as oe, mergePaymentHistoryMethodLabels as se } from "./index46.js";
35
+ import { buildPaymentHistory as ce } from "./index3.js";
36
+ import { currentApprovalRound as le } from "./index4.js";
37
+ import { usePayableApprovalRoundStart as ue } from "./index32.js";
38
+ import { useApprovalPolicyCardView as de } from "./index33.js";
39
+ import { resolveBillRejectionNotice as fe } from "./index34.js";
40
+ import { useCurrentApprovalRequestId as pe } from "./index35.js";
41
+ import { usePayableDetailActions as me } from "./index36.js";
42
+ import { useScheduledPayment as he } from "./index37.js";
43
+ import { BILL_DETAILS_LABELS_EN as g } from "./index63.js";
44
+ import { useMemo as _, useRef as ge } from "react";
45
+ import { Fragment as _e, jsx as v, jsxs as ve } from "react/jsx-runtime";
46
46
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js
47
- function v({ open: v, onOpenChange: y, payableId: b, onClose: x, onExpand: S, onEdit: C, testId: w, labels: T, poweredByBankName: E }) {
48
- let D = g(() => ({
49
- ...h,
50
- ...T,
47
+ function y({ open: y, onOpenChange: b, payableId: x, onClose: S, onExpand: C, onEdit: w, testId: T, labels: E, poweredByBankName: D }) {
48
+ let O = _(() => ({
49
+ ...g,
50
+ ...E,
51
51
  sheet: {
52
- ...h.sheet,
53
- ...T?.sheet,
52
+ ...g.sheet,
53
+ ...E?.sheet,
54
54
  statusBadge: {
55
- ...h.sheet.statusBadge,
56
- ...T?.sheet?.statusBadge
55
+ ...g.sheet.statusBadge,
56
+ ...E?.sheet?.statusBadge
57
57
  },
58
58
  approvalPolicy: {
59
- ...h.sheet.approvalPolicy,
60
- ...T?.sheet?.approvalPolicy
59
+ ...g.sheet.approvalPolicy,
60
+ ...E?.sheet?.approvalPolicy
61
61
  },
62
62
  dueDate: {
63
- ...h.sheet.dueDate,
64
- ...T?.sheet?.dueDate
63
+ ...g.sheet.dueDate,
64
+ ...E?.sheet?.dueDate
65
65
  }
66
66
  },
67
- decisionDialog: se(h.decisionDialog, T?.decisionDialog),
67
+ decisionDialog: oe(g.decisionDialog, E?.decisionDialog),
68
68
  approvalPolicyCopy: {
69
- ...h.approvalPolicyCopy,
70
- ...T?.approvalPolicyCopy
69
+ ...g.approvalPolicyCopy,
70
+ ...E?.approvalPolicyCopy
71
71
  },
72
- markAsPaid: ae(T?.markAsPaid),
72
+ markAsPaid: ie(E?.markAsPaid),
73
73
  actionSuccess: {
74
- ...h.actionSuccess,
75
- ...T?.actionSuccess
74
+ ...g.actionSuccess,
75
+ ...E?.actionSuccess
76
76
  },
77
- paymentHistoryMethodLabels: ce(T?.paymentHistoryMethodLabels)
78
- }), [T]), O = i(b), k = r(b), A = ee(), { initResponse: j } = te(), M = O.data, N = _e(null), P = me({
79
- payableId: b,
80
- status: M?.status
81
- }), F = M?.status === "rejected", be = e(j?.scopes, [t.ApprovalRequestReadOrg]), I = F && be, L = de({
82
- payableId: b,
83
- enabled: I
84
- }), R = re(b, { enabled: I }), xe = e(j?.scopes, [t.UserReadOrg]), { userNames: z } = ne({ enabled: F && xe }), B = g(() => ue(R.data?.data, L.roundStartedAt), [R.data, L.roundStartedAt]), V = g(() => pe({
85
- payableStatus: M?.status,
86
- approvalRequests: B,
87
- userNames: z,
88
- payableUpdatedAt: M?.updated_at,
89
- labels: D
77
+ paymentHistoryMethodLabels: se(E?.paymentHistoryMethodLabels)
78
+ }), [E]), k = a(x), A = i(x), j = ee(), { initResponse: M } = te(), N = k.data, P = ge(null), F = pe({
79
+ payableId: x,
80
+ status: N?.status
81
+ }), I = N?.status === "rejected", ye = e(M?.scopes, [t.ApprovalRequestReadOrg]), L = I && ye, R = ue({
82
+ payableId: x,
83
+ enabled: L
84
+ }), z = n(x, { enabled: L }), be = e(M?.scopes, [t.UserReadOrg]), { userNames: B } = ne({ enabled: I && be }), V = _(() => le(z.data?.data, R.roundStartedAt), [z.data, R.roundStartedAt]), H = _(() => fe({
85
+ payableStatus: N?.status,
86
+ approvalRequests: V,
87
+ userNames: B,
88
+ payableUpdatedAt: N?.updated_at,
89
+ labels: O
90
90
  }), [
91
- M?.status,
92
- M?.updated_at,
91
+ N?.status,
92
+ N?.updated_at,
93
+ V,
93
94
  B,
94
- z,
95
- D
96
- ]), H = fe({
97
- payableId: b,
98
- approvalPolicyId: M?.approval_policy_id,
99
- copy: D.approvalPolicyCopy
100
- }), U = u({
101
- status: M?.status,
102
- scopes: j?.scopes,
103
- arePendingApproversUnknown: H.isLoading,
104
- hasApprovalPolicy: !!M?.approval_policy_id,
105
- hasWaitingRequest: P.hasWaitingRequest
106
- }), W = !!P.id, G = P.isLoading || H.isLoading, K = g(() => H.pendingApprovers.length ? H.pendingApprovers.flatMap((e) => e.names) : void 0, [H.pendingApprovers]), q = ge({
107
- payableId: b,
108
- scheduledPaymentDate: M?.scheduled_payment_date
109
- }), J = d(j?.scopes), Y = p({
110
- counterpartId: M?.counterpart_id,
111
- currency: M?.currency,
112
- currentBankAccountId: M?.counterpart_bank_account_id,
95
+ O
96
+ ]), U = de({
97
+ payableId: x,
98
+ approvalPolicyId: N?.approval_policy_id,
99
+ copy: O.approvalPolicyCopy
100
+ }), W = d({
101
+ status: N?.status,
102
+ scopes: M?.scopes,
103
+ arePendingApproversUnknown: U.isLoading,
104
+ hasApprovalPolicy: !!N?.approval_policy_id,
105
+ hasWaitingRequest: F.hasWaitingRequest
106
+ }), xe = !!F.id, G = F.isLoading || U.isLoading, K = _(() => U.pendingApprovers.length ? U.pendingApprovers.flatMap((e) => e.names) : void 0, [U.pendingApprovers]), q = he({
107
+ payableId: x,
108
+ scheduledPaymentDate: N?.scheduled_payment_date
109
+ }), J = f(M?.scopes), Y = m({
110
+ counterpartId: N?.counterpart_id,
111
+ currency: N?.currency,
112
+ currentBankAccountId: N?.counterpart_bank_account_id,
113
113
  enabled: J
114
- }), X = oe({
115
- payableId: b,
116
- amountDueMinorUnits: f(M) ?? 0,
117
- amountToPayMinorUnits: M?.amount_to_pay ?? void 0,
118
- currencyCode: M?.currency ?? void 0,
119
- dueDate: M?.due_date,
114
+ }), X = ae({
115
+ payableId: x,
116
+ amountDueMinorUnits: p(N) ?? 0,
117
+ amountToPayMinorUnits: N?.amount_to_pay ?? void 0,
118
+ currencyCode: N?.currency ?? void 0,
119
+ dueDate: N?.due_date,
120
120
  hasScheduledPayment: q.hasScheduledPayment,
121
- testId: w,
122
- labels: D.markAsPaid
123
- }), { actions: Se, decisionDialog: Ce } = he({
124
- payableId: M ? b : void 0,
125
- status: M?.status,
126
- currentApprovalRequestId: P.id,
121
+ testId: T,
122
+ labels: O.markAsPaid
123
+ }), { actions: Se, decisionDialog: Ce } = me({
124
+ payableId: N ? x : void 0,
125
+ status: N?.status,
126
+ currentApprovalRequestId: F.id,
127
127
  hasScheduledPayment: q.hasScheduledPayment,
128
128
  scheduledPaymentIntentId: q.scheduledPaymentIntentId,
129
129
  isScheduledPaymentUnknown: q.isResolving,
130
130
  isPayabilityUnknown: Y.isLoading,
131
- hasApprovalPolicy: !!M?.approval_policy_id,
132
- hasWaitingRequest: P.hasWaitingRequest,
133
- pendingApprovers: H.pendingApprovers,
134
- arePendingApproversUnknown: H.isLoading,
131
+ hasApprovalPolicy: !!N?.approval_policy_id,
132
+ hasWaitingRequest: F.hasWaitingRequest,
133
+ pendingApprovers: U.pendingApprovers,
134
+ arePendingApproversUnknown: U.isLoading,
135
135
  labels: {
136
- edit: D.sheet.editButton,
137
- payBill: D.sheet.payButton,
138
- markAsPaid: D.sheet.markAsPaidButton,
139
- reject: D.sheet.rejectButton,
140
- approve: D.sheet.approveButton,
141
- cancel: D.sheet.cancelButton,
142
- cancelScheduledPayment: D.sheet.cancelScheduledPaymentButton,
143
- reopen: D.sheet.reopenButton,
144
- forceApprove: D.sheet.forceApproveButton,
145
- forceReject: D.sheet.forceRejectButton,
146
- policyOverridesHeading: D.sheet.policyOverridesGroup,
147
- decisionDialog: D.decisionDialog,
148
- actionError: D.actionError,
149
- actionSuccess: D.actionSuccess
136
+ edit: O.sheet.editButton,
137
+ payBill: O.sheet.payButton,
138
+ markAsPaid: O.sheet.markAsPaidButton,
139
+ reject: O.sheet.rejectButton,
140
+ approve: O.sheet.approveButton,
141
+ cancel: O.sheet.cancelButton,
142
+ cancelScheduledPayment: O.sheet.cancelScheduledPaymentButton,
143
+ reopen: O.sheet.reopenButton,
144
+ forceApprove: O.sheet.forceApproveButton,
145
+ forceReject: O.sheet.forceRejectButton,
146
+ policyOverridesHeading: O.sheet.policyOverridesGroup,
147
+ decisionDialog: O.decisionDialog,
148
+ actionError: O.actionError,
149
+ actionSuccess: O.actionSuccess
150
150
  },
151
151
  isMarkAsPaidPending: X.isPending,
152
152
  onMarkAsPaidSelect: X.open,
153
- onPayBillSelect: () => N.current?.open(),
154
- onEditSelect: C,
153
+ onPayBillSelect: () => P.current?.open(),
154
+ onEditSelect: w,
155
155
  onActionSucceeded: (e) => {
156
- e === "reopen" && C?.();
156
+ e === "reopen" && w?.();
157
157
  }
158
- }), we = q.hasScheduledPayment && q.scheduledDateLabel ? D.scheduledSummary(q.scheduledDateLabel) : void 0, Z = l({
159
- payable: M,
160
- canManage: e(j?.scopes, [t.PayableWriteOrg])
161
- }), Q = Z.isPossibleDuplicate ? /* @__PURE__ */ _(s, {
158
+ }), we = q.hasScheduledPayment && q.scheduledDateLabel ? O.scheduledSummary(q.scheduledDateLabel) : void 0, Z = u({
159
+ payable: N,
160
+ canManage: e(M?.scopes, [t.PayableWriteOrg])
161
+ }), Q = Z.isPossibleDuplicate ? /* @__PURE__ */ v(c, {
162
162
  onNotADuplicate: Z.onNotADuplicate,
163
163
  isActionDisabled: Z.isBusy
164
- }) : void 0, $ = n(b), Te = g(() => le({
164
+ }) : void 0, $ = r(x), Te = _(() => ce({
165
165
  records: q.paymentRecords,
166
166
  events: $.data?.data ?? [],
167
- currencyCode: M?.currency,
168
- labels: D
167
+ currencyCode: N?.currency,
168
+ labels: O
169
169
  }), [
170
170
  q.paymentRecords,
171
171
  $.data,
172
- M?.currency,
173
- D
174
- ]), Ee = g(() => M ? ie({
175
- payable: M,
176
- lineItems: k.lineItems,
177
- ledgerAccounts: A.data?.data ?? [],
178
- labels: D,
172
+ N?.currency,
173
+ O
174
+ ]), Ee = _(() => N ? re({
175
+ payable: N,
176
+ lineItems: A.lineItems,
177
+ ledgerAccounts: j.data?.data ?? [],
178
+ labels: O,
179
179
  hasScheduledPayment: q.hasScheduledPayment,
180
- rejection: V,
180
+ rejection: H,
181
181
  achInstructions: Y.achInstructions,
182
182
  achInstructionsReadable: J && !Y.isLoading && !Y.isError
183
183
  }) : void 0, [
184
- M,
185
- k.lineItems,
186
- A.data,
187
- D,
184
+ N,
185
+ A.lineItems,
186
+ j.data,
187
+ O,
188
188
  q.hasScheduledPayment,
189
- V,
189
+ H,
190
190
  Y.achInstructions,
191
191
  Y.isError,
192
192
  Y.isLoading,
193
193
  J
194
- ]), De = O.isLoading || k.isResolving || A.isResolving || Y.isLoading, Oe = O.isError || k.isError || A.isError;
195
- return /* @__PURE__ */ ye(ve, { children: [
196
- /* @__PURE__ */ _(o, {
197
- open: v,
198
- onOpenChange: y,
194
+ ]), De = k.isLoading || A.isResolving || j.isResolving || Y.isLoading, Oe = k.isError || A.isError || j.isError;
195
+ return /* @__PURE__ */ ve(_e, { children: [
196
+ /* @__PURE__ */ v(s, {
197
+ open: y,
198
+ onOpenChange: b,
199
199
  details: Ee,
200
200
  actions: Se,
201
- approvalPolicy: H.view,
202
- showApprovalOverrideNotice: !G && !W && U && !!M?.approval_policy_id,
203
- awaitingApprovalNotice: !G && !W && !U && M?.status === "approve_in_progress" && M?.approval_policy_id ? K ? D.awaitingApprovalNotice(K) : D.awaitingApprovalUnknownNotice : void 0,
201
+ approvalPolicy: U.view,
202
+ showApprovalOverrideNotice: !G && W,
203
+ awaitingApprovalNotice: !G && !xe && !W && N?.status === "approve_in_progress" && N?.approval_policy_id ? K ? O.awaitingApprovalNotice(K) : O.awaitingApprovalUnknownNotice : void 0,
204
204
  scheduledSummary: we,
205
205
  paymentHistory: Te,
206
206
  paymentHistoryError: q.isError || $.isError,
@@ -208,27 +208,27 @@ function v({ open: v, onOpenChange: y, payableId: b, onClose: x, onExpand: S, on
208
208
  isLoading: De,
209
209
  isError: Oe,
210
210
  notice: Q,
211
- onClose: x,
212
- onExpand: S,
213
- testId: w,
214
- labels: D.sheet
211
+ onClose: S,
212
+ onExpand: C,
213
+ testId: T,
214
+ labels: O.sheet
215
215
  }),
216
- /* @__PURE__ */ _(a, {
216
+ /* @__PURE__ */ v(o, {
217
217
  ...Ce,
218
- labels: { cancelButton: D.decisionDialog.cancelButton },
219
- testId: w ? `${w}-decision-dialog` : void 0,
220
- confirmTestId: w ? `${w}-decision-confirm` : void 0,
221
- reasonTestId: w ? `${w}-decision-reason` : void 0,
222
- reasonFieldId: w ? `${w}-decision-reason-field` : void 0
218
+ labels: { cancelButton: O.decisionDialog.cancelButton },
219
+ testId: T ? `${T}-decision-dialog` : void 0,
220
+ confirmTestId: T ? `${T}-decision-confirm` : void 0,
221
+ reasonTestId: T ? `${T}-decision-reason` : void 0,
222
+ reasonFieldId: T ? `${T}-decision-reason-field` : void 0
223
223
  }),
224
- /* @__PURE__ */ _(c, { ...X.dialogProps }),
225
- M ? /* @__PURE__ */ _(m, {
226
- ref: N,
227
- payable: M,
228
- onMissingAchInstructions: S,
229
- poweredByBankName: E
224
+ /* @__PURE__ */ v(l, { ...X.dialogProps }),
225
+ N ? /* @__PURE__ */ v(h, {
226
+ ref: P,
227
+ payable: N,
228
+ onMissingAchInstructions: C,
229
+ poweredByBankName: D
230
230
  }) : null
231
231
  ] });
232
232
  }
233
233
  //#endregion
234
- export { v as BillDetailsContainer, v as default };
234
+ export { y as BillDetailsContainer, y as default };
@@ -15,7 +15,7 @@ var o = {
15
15
  amountPaidHeading: "Amount paid",
16
16
  invoiceDateLabel: "Invoice date",
17
17
  dueDateLabel: "Due date",
18
- approvalOverrideNotice: "If approvers are unavailable, you can override the approval policy from the overflow menu.",
18
+ approvalOverrideNotice: "You can approve or reject this bill from the menu in the top right, bypassing any remaining approvers.",
19
19
  payToHeading: "Pay to",
20
20
  payToHeadingPaid: "Paid to",
21
21
  vendorRow: "Vendor",
@@ -21,7 +21,7 @@ var s = {
21
21
  amountPaidHeading: "Amount paid",
22
22
  invoiceDateLabel: "Invoice date",
23
23
  dueDateLabel: "Due date",
24
- approvalOverrideNotice: "If approvers are unavailable, you can override the approval policy from the overflow menu.",
24
+ approvalOverrideNotice: "You can approve or reject this bill from the menu in the top right, bypassing any remaining approvers.",
25
25
  payToHeading: "Pay to",
26
26
  payToHeadingPaid: "Paid to",
27
27
  paymentHistoryHeading: "Payment history",
@@ -3,4 +3,6 @@ import { SettingsSection as e } from "./index4.js";
3
3
  import { HELP_FAQ_EN as t } from "../../help/ui/contract/dist/index3.js";
4
4
  import { SettingsWidget as n } from "./index6.js";
5
5
  import "./index7.js";
6
- export { t as HELP_FAQ_EN, e as SettingsSection, n as SettingsWidget };
6
+ import { InvoiceSettings as r } from "../../invoice-settings/feature/dist/index3.js";
7
+ import "../../invoice-settings/feature/dist/index.js";
8
+ export { t as HELP_FAQ_EN, r as InvoiceSettings, e as SettingsSection, n as SettingsWidget };
@@ -0,0 +1,4 @@
1
+ import "./index2.js";
2
+ import { InvoiceSettings as e } from "./index3.js";
3
+ import "./index4.js";
4
+ export { e as InvoiceSettings };
@@ -0,0 +1,5 @@
1
+ import { SETTINGS_WIDGET_NAME as e } from "../../../shared/util/dist/lib/widgetName.js";
2
+ //#region ../../libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index2.js
3
+ var t = `${e}.invoice_settings`, n = { Mounted: `${t}.mounted` };
4
+ //#endregion
5
+ export { n as InvoiceSettingsAnalyticsEvent, t as WIDGET_NAME };
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { useAnalyticsTrack as e } from "../../../../shared/feature/dist/lib/analytics/hooks.js";
6
+ import "../../../../shared/feature/dist/index.js";
7
+ import { TemplateSettings as t } from "../../../../monite-sdk/dist/index618.js";
8
+ import "../../../../monite-sdk/dist/index.js";
9
+ import { MoniteRegionProvider as n } from "../../../../shared/monite-wrapper/feature/dist/lib/MoniteRegionProvider.js";
10
+ import "../../../../shared/monite-wrapper/feature/dist/index.js";
11
+ import { InvoiceSettingsAnalyticsEvent as r, WIDGET_NAME as i } from "./index2.js";
12
+ import { useEffect as a } from "react";
13
+ import { jsx as o } from "react/jsx-runtime";
14
+ //#region ../../libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index3.js
15
+ function s() {
16
+ let n = e();
17
+ return a(() => {
18
+ n(r.Mounted);
19
+ }, [n]), /* @__PURE__ */ o(t, { showHeader: !1 });
20
+ }
21
+ function c(e) {
22
+ return /* @__PURE__ */ o(n, {
23
+ widgetName: i,
24
+ ...e,
25
+ children: /* @__PURE__ */ o(s, {})
26
+ });
27
+ }
28
+ //#endregion
29
+ export { c as InvoiceSettings };
@@ -0,0 +1,2 @@
1
+ import "./index2.js";
2
+ import "./index3.js";