@tesouro/embedded-components-react 0.11.219 → 0.11.221
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/README.md +11 -7
- package/dist/experimental/QuickViewWidget.d.ts +25 -13
- package/dist/experimental/index.d.ts +25 -13
- package/dist/index.css +394 -30
- package/dist/index.d.ts +24 -7
- package/dist/lib/AcceptDisclosuresWidget.d.ts +6 -2
- package/dist/lib/BankAccountsWidget.d.ts +4 -0
- package/dist/lib/BillPayWidget.d.ts +4 -3
- package/dist/lib/ExpenseManagementWidget.d.ts +7 -0
- package/dist/lib/ReceivablesWidget.d.ts +3 -2
- package/dist/lib/WidgetSuite.d.ts +13 -1
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +1 -2
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/lib/AcceptDisclosuresWidget/resolveAcceptDisclosuresContent.js +1 -2
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index9.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +5 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index12.js +27 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index29.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index31.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillPayWidget.js +61 -51
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +48 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +28 -30
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index2.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/ui/dist/index5.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/AccordionItemCard/AccordionItemCard.js +8 -3
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsFilterBar/ExpensesTransactionsFilterBar.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/FileViewer.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/labels.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/SingleInsight/SingleInsight.js +47 -44
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +105 -97
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +21 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +66 -63
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +73 -74
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +42 -35
- package/dist/libs/tesouro-embedded-components-react/offer-widget/ui/dist/index7.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/lib/BillsQuickViewWidget/BillsQuickViewWidgetFeature.js +0 -8
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/ui/dist/index3.js +13 -14
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/CardsQuickViewWidgetFeature.js +1 -6
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/ui/dist/index3.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/invoices/feature/dist/lib/InvoicesQuickViewWidget/InvoicesQuickViewWidgetFeature.js +0 -8
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/invoices/ui/dist/index3.js +13 -14
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/ui/dist/index6.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index12.js +5 -6
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +119 -119
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index9.js +86 -77
- package/dist/libs/tesouro-embedded-components-react/shared/quick-view/ui/dist/index3.js +18 -19
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/ConsentBlock/ConsentBlock.js +11 -12
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/FdicLogo.js +76 -72
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +7 -5
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/UploadTray/UploadTray.js +49 -43
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/theme/createTheme.js +20 -4
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/theme/themeTokens.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/upload-receipt-widget/feature/dist/lib/UploadReceiptWidget.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/upload-receipt-widget/ui/dist/index2.js +1 -0
- package/dist/packages/shared-ui-shadcn/dist/index.js +141 -124
- package/package.json +1 -1
|
@@ -210,6 +210,9 @@ function E() {
|
|
|
210
210
|
}
|
|
211
211
|
function D({ url: e, fileName: t, zoom: n }) {
|
|
212
212
|
return h(e, t) ? /* @__PURE__ */ _("div", {
|
|
213
|
+
tabIndex: 0,
|
|
214
|
+
role: "region",
|
|
215
|
+
"aria-label": g.ReceiptPdfPreviewRegion,
|
|
213
216
|
className: "ttw:absolute ttw:inset-0 ttw:overflow-auto",
|
|
214
217
|
children: /* @__PURE__ */ _(m, {
|
|
215
218
|
url: e,
|
|
@@ -284,6 +284,7 @@ function H({ title: e, cardLabel: t, cardName: n, cardholder: r, showCardholder:
|
|
|
284
284
|
className: "ttw:flex ttw:w-full ttw:flex-col ttw:gap-3 ttw:px-3 ttw:py-1",
|
|
285
285
|
children: [/* @__PURE__ */ T(y, {
|
|
286
286
|
"aria-label": Z.memo,
|
|
287
|
+
"aria-required": x || void 0,
|
|
287
288
|
className: "ttw:max-h-24 ttw:min-h-24 ttw:resize-none",
|
|
288
289
|
value: G,
|
|
289
290
|
onChange: q,
|
|
@@ -442,6 +443,7 @@ function W({ title: i, rows: a, isLoading: o, isError: c, historyLabels: l }) {
|
|
|
442
443
|
});
|
|
443
444
|
}
|
|
444
445
|
function G({ label: e, highlighted: t, value: n, options: r, onChange: i, disabled: a }) {
|
|
446
|
+
let o = C(), s = `${o}-label`, c = `${o}-value`;
|
|
445
447
|
return /* @__PURE__ */ E("div", {
|
|
446
448
|
className: "ttw:flex ttw:items-center",
|
|
447
449
|
children: [/* @__PURE__ */ T("div", {
|
|
@@ -456,7 +458,10 @@ function G({ label: e, highlighted: t, value: n, options: r, onChange: i, disabl
|
|
|
456
458
|
"aria-hidden": !0
|
|
457
459
|
}),
|
|
458
460
|
" ",
|
|
459
|
-
|
|
461
|
+
/* @__PURE__ */ T("span", {
|
|
462
|
+
id: s,
|
|
463
|
+
children: e
|
|
464
|
+
})
|
|
460
465
|
]
|
|
461
466
|
})
|
|
462
467
|
}), /* @__PURE__ */ T("div", {
|
|
@@ -467,8 +472,8 @@ function G({ label: e, highlighted: t, value: n, options: r, onChange: i, disabl
|
|
|
467
472
|
disabled: a,
|
|
468
473
|
children: [/* @__PURE__ */ T(_, {
|
|
469
474
|
className: "ttw:w-full",
|
|
470
|
-
"aria-
|
|
471
|
-
children: /* @__PURE__ */ T(v, {})
|
|
475
|
+
"aria-labelledby": `${s} ${c}`,
|
|
476
|
+
children: /* @__PURE__ */ T(v, { id: c })
|
|
472
477
|
}), /* @__PURE__ */ T(h, { children: r.map((e) => /* @__PURE__ */ T(g, {
|
|
473
478
|
value: e.value,
|
|
474
479
|
children: e.label
|
|
@@ -74,7 +74,7 @@ function _(_) {
|
|
|
74
74
|
children: /* @__PURE__ */ p(n, {
|
|
75
75
|
activeCount: _.activeFilterCount,
|
|
76
76
|
onClick: x.toggleMenu,
|
|
77
|
-
|
|
77
|
+
labels: { filters: v.filtersButtonAriaLabel }
|
|
78
78
|
})
|
|
79
79
|
}), /* @__PURE__ */ m(o, {
|
|
80
80
|
align: "start",
|
|
@@ -28,6 +28,9 @@ function w({ url: w, className: T, isPreview: E, showDeleteOption: D, onDeleteCl
|
|
|
28
28
|
return E ? I : /* @__PURE__ */ h("div", {
|
|
29
29
|
className: l("ttw:relative ttw:flex-1 ttw:overflow-hidden ttw:rounded-md ttw:bg-background", T),
|
|
30
30
|
children: [/* @__PURE__ */ m("div", {
|
|
31
|
+
tabIndex: 0,
|
|
32
|
+
role: "region",
|
|
33
|
+
"aria-label": M.previewRegion,
|
|
31
34
|
className: "ttw:absolute ttw:inset-0 ttw:overflow-auto",
|
|
32
35
|
children: /* @__PURE__ */ m("div", {
|
|
33
36
|
className: "ttw:box-border ttw:p-6",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// ../../libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/labels.js
|
|
2
2
|
var e = {
|
|
3
3
|
filePreview: "File preview",
|
|
4
|
+
previewRegion: "Zoomable file preview",
|
|
4
5
|
zoomIn: "Zoom in",
|
|
5
6
|
zoomOut: "Zoom out",
|
|
6
7
|
moreActions: "Attachment actions",
|
|
@@ -1,89 +1,92 @@
|
|
|
1
1
|
import { Badge as e, Button as t, Switch as n, Tooltip as r, TooltipContent as i, TooltipProvider as a, TooltipTrigger as o, Typography as s } from "../../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
2
|
import { SINGLE_INSIGHT_LABELS_EN as c } from "./labels.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useId as l } from "react";
|
|
4
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
5
|
+
import { ArrowRight as f, X as p } from "lucide-react";
|
|
5
6
|
// ../../libs/tesouro-embedded-components-react/insights-widget/ui/dist/lib/InsightsWidget/SingleInsight/SingleInsight.js
|
|
6
|
-
var
|
|
7
|
-
let
|
|
7
|
+
var m = ({ row: m, onDismissClick: h, labels: g, testIds: _ }) => {
|
|
8
|
+
let v = {
|
|
8
9
|
...c,
|
|
9
|
-
...
|
|
10
|
-
},
|
|
11
|
-
return /* @__PURE__ */
|
|
10
|
+
...g
|
|
11
|
+
}, y = l(), b = m.showToggle || !!(m.navigationLinkText && m.onNavigationClick) || !!(m.actionText && m.onActionClick);
|
|
12
|
+
return /* @__PURE__ */ d("div", {
|
|
12
13
|
className: "ttw:rounded-lg ttw:bg-muted ttw:p-3",
|
|
13
|
-
"data-testid":
|
|
14
|
+
"data-testid": _?.root,
|
|
14
15
|
children: [
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
+
/* @__PURE__ */ d("div", {
|
|
16
17
|
className: "ttw:mb-1 ttw:flex ttw:flex-row ttw:items-center ttw:justify-between ttw:gap-2",
|
|
17
|
-
children: [/* @__PURE__ */
|
|
18
|
+
children: [/* @__PURE__ */ d("div", {
|
|
18
19
|
className: "ttw:flex ttw:min-w-0 ttw:flex-row ttw:items-center ttw:gap-2",
|
|
19
|
-
children: [/* @__PURE__ */
|
|
20
|
+
children: [/* @__PURE__ */ u(e, {
|
|
20
21
|
tone: "neutral",
|
|
21
|
-
children:
|
|
22
|
-
}), /* @__PURE__ */
|
|
22
|
+
children: m.badgeLabel
|
|
23
|
+
}), /* @__PURE__ */ u(s, {
|
|
23
24
|
variant: "body2",
|
|
24
25
|
color: "muted",
|
|
25
26
|
component: "span",
|
|
26
|
-
children:
|
|
27
|
+
children: m.createdDate
|
|
27
28
|
})]
|
|
28
|
-
}),
|
|
29
|
+
}), m.showDismissButton && h ? /* @__PURE__ */ u(a, { children: /* @__PURE__ */ d(r, { children: [/* @__PURE__ */ u(o, {
|
|
29
30
|
asChild: !0,
|
|
30
|
-
children: /* @__PURE__ */
|
|
31
|
+
children: /* @__PURE__ */ u(t, {
|
|
31
32
|
type: "button",
|
|
32
33
|
variant: "ghost",
|
|
33
34
|
size: "icon-sm",
|
|
34
35
|
className: "ttw:shrink-0",
|
|
35
|
-
"aria-label":
|
|
36
|
-
onClick:
|
|
37
|
-
"data-testid":
|
|
38
|
-
children: /* @__PURE__ */
|
|
36
|
+
"aria-label": v.dismissInsightAriaLabel,
|
|
37
|
+
onClick: h,
|
|
38
|
+
"data-testid": _?.dismiss,
|
|
39
|
+
children: /* @__PURE__ */ u(p, { "aria-hidden": !0 })
|
|
39
40
|
})
|
|
40
|
-
}), /* @__PURE__ */
|
|
41
|
+
}), /* @__PURE__ */ u(i, {
|
|
41
42
|
sideOffset: 4,
|
|
42
|
-
children:
|
|
43
|
+
children: v.dismissInsightAriaLabel
|
|
43
44
|
})] }) }) : null]
|
|
44
45
|
}),
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ u(s, {
|
|
46
47
|
variant: "body1",
|
|
47
48
|
component: "p",
|
|
48
|
-
className:
|
|
49
|
-
children:
|
|
49
|
+
className: b ? "ttw:mb-1" : "",
|
|
50
|
+
children: m.displayText
|
|
50
51
|
}),
|
|
51
|
-
|
|
52
|
+
m.showToggle ? /* @__PURE__ */ d("div", {
|
|
52
53
|
className: "ttw:mt-1 ttw:flex ttw:flex-row ttw:items-center ttw:gap-2",
|
|
53
|
-
children: [
|
|
54
|
-
checked:
|
|
55
|
-
onCheckedChange:
|
|
56
|
-
"
|
|
57
|
-
|
|
54
|
+
children: [m.onToggle ? /* @__PURE__ */ u(n, {
|
|
55
|
+
checked: m.toggleChecked ?? !1,
|
|
56
|
+
onCheckedChange: m.onToggle,
|
|
57
|
+
"aria-labelledby": m.toggleLabel ? y : void 0,
|
|
58
|
+
"data-testid": _?.toggle
|
|
59
|
+
}) : null, m.toggleLabel ? /* @__PURE__ */ u(s, {
|
|
60
|
+
id: y,
|
|
58
61
|
variant: "body2",
|
|
59
62
|
component: "span",
|
|
60
|
-
color:
|
|
61
|
-
children:
|
|
63
|
+
color: m.onToggle ? void 0 : "muted",
|
|
64
|
+
children: m.toggleLabel
|
|
62
65
|
}) : null]
|
|
63
66
|
}) : null,
|
|
64
|
-
|
|
67
|
+
m.navigationLinkText && m.onNavigationClick ? /* @__PURE__ */ u("div", {
|
|
65
68
|
className: "ttw:mt-1",
|
|
66
|
-
children: /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ d(t, {
|
|
67
70
|
type: "button",
|
|
68
71
|
variant: "link",
|
|
69
72
|
className: "ttw:h-auto ttw:gap-1 ttw:p-0 ttw:font-medium",
|
|
70
|
-
onClick:
|
|
71
|
-
"data-testid":
|
|
72
|
-
children: [
|
|
73
|
+
onClick: m.onNavigationClick,
|
|
74
|
+
"data-testid": _?.navigation,
|
|
75
|
+
children: [m.navigationLinkText, /* @__PURE__ */ u(f, { "aria-hidden": !0 })]
|
|
73
76
|
})
|
|
74
77
|
}) : null,
|
|
75
|
-
|
|
78
|
+
m.actionText && m.onActionClick ? /* @__PURE__ */ u("div", {
|
|
76
79
|
className: "ttw:mt-1",
|
|
77
|
-
children: /* @__PURE__ */
|
|
80
|
+
children: /* @__PURE__ */ d(t, {
|
|
78
81
|
type: "button",
|
|
79
82
|
variant: "link",
|
|
80
83
|
className: "ttw:h-auto ttw:gap-1 ttw:p-0 ttw:font-medium",
|
|
81
|
-
onClick:
|
|
82
|
-
"data-testid":
|
|
83
|
-
children: [
|
|
84
|
+
onClick: m.onActionClick,
|
|
85
|
+
"data-testid": _?.action,
|
|
86
|
+
children: [m.actionText, /* @__PURE__ */ u(f, { "aria-hidden": !0 })]
|
|
84
87
|
})
|
|
85
88
|
}) : null
|
|
86
89
|
]
|
|
87
90
|
});
|
|
88
91
|
};
|
|
89
|
-
export { c as SINGLE_INSIGHT_LABELS_EN,
|
|
92
|
+
export { c as SINGLE_INSIGHT_LABELS_EN, m as SingleInsight };
|
|
@@ -15,84 +15,84 @@ import { CounterpartsWidget as s } from "../../../../../counterparts-widget/feat
|
|
|
15
15
|
import { CounterpartDetailsContainer as c } from "../../../../../counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartDetailsContainer.js";
|
|
16
16
|
import "../../../../../counterparts-widget/feature/dist/index.js";
|
|
17
17
|
import { InvoicesFilterBar as l } from "../../../../ui/dist/index4.js";
|
|
18
|
-
import {
|
|
19
|
-
import { ReceivableActionsModal as
|
|
20
|
-
import { ReceivableActionDialog as
|
|
21
|
-
import { ReceivableBankAccountSection as
|
|
22
|
-
import { ReceivableBillingSection as
|
|
23
|
-
import { ReceivableDetailsPanel as
|
|
24
|
-
import { ReceivableFormDialog as
|
|
25
|
-
import { ReceivablePaymentDialog as
|
|
26
|
-
import { ReceivablePreview as
|
|
27
|
-
import { ReceivableRecurrenceEmailDialog as
|
|
18
|
+
import { InvoicingHeader as u, InvoicingTabs as d } from "../../../../ui/dist/index7.js";
|
|
19
|
+
import { ReceivableActionsModal as f } from "../../../../ui/dist/index14.js";
|
|
20
|
+
import { ReceivableActionDialog as p } from "../../../../ui/dist/index20.js";
|
|
21
|
+
import { ReceivableBankAccountSection as m } from "../../../../ui/dist/index21.js";
|
|
22
|
+
import { ReceivableBillingSection as h } from "../../../../ui/dist/index26.js";
|
|
23
|
+
import { ReceivableDetailsPanel as g } from "../../../../ui/dist/index42.js";
|
|
24
|
+
import { ReceivableFormDialog as _ } from "../../../../ui/dist/index46.js";
|
|
25
|
+
import { ReceivablePaymentDialog as ee } from "../../../../ui/dist/index47.js";
|
|
26
|
+
import { ReceivablePreview as te } from "../../../../ui/dist/index51.js";
|
|
27
|
+
import { ReceivableRecurrenceEmailDialog as ne } from "../../../../ui/dist/index53.js";
|
|
28
28
|
import { ReceivableRecurrenceSection as v } from "../../../../ui/dist/index55.js";
|
|
29
29
|
import { ReceivableRemindersSection as y } from "../../../../ui/dist/index57.js";
|
|
30
30
|
import { ReceivablesScreen as b } from "../../../../ui/dist/index59.js";
|
|
31
|
-
import { RECURRING_SERIES_SCREEN_LABELS_EN as
|
|
32
|
-
import { RecurringSeriesScreen as
|
|
33
|
-
import { UnsavedInvoiceDialog as
|
|
31
|
+
import { RECURRING_SERIES_SCREEN_LABELS_EN as x } from "../../../../ui/dist/index60.js";
|
|
32
|
+
import { RecurringSeriesScreen as S } from "../../../../ui/dist/index61.js";
|
|
33
|
+
import { UnsavedInvoiceDialog as C } from "../../../../ui/dist/index63.js";
|
|
34
34
|
import "../../../../ui/dist/index.js";
|
|
35
|
-
import { INVOICING_TAB_LABELS_EN as
|
|
35
|
+
import { INVOICING_TAB_LABELS_EN as re, InvoicingTab as w, isInvoicingTabId as ie } from "./tabs.js";
|
|
36
36
|
import "./lineItems.js";
|
|
37
|
-
import { PAGE_SIZE_OPTIONS as
|
|
37
|
+
import { PAGE_SIZE_OPTIONS as ae } from "./constants.js";
|
|
38
38
|
import "./statusCards.js";
|
|
39
|
-
import { ReceivablesWidgetAnalyticsEvent as
|
|
40
|
-
import { ReceivableAttachmentsSection as
|
|
41
|
-
import { ReceivableCustomerSection as
|
|
42
|
-
import { MeasureUnitsManagerContainer as
|
|
43
|
-
import { ProductSelector as
|
|
39
|
+
import { ReceivablesWidgetAnalyticsEvent as oe, WIDGET_NAME as T } from "./analytics/events.js";
|
|
40
|
+
import { ReceivableAttachmentsSection as se } from "./ReceivableAttachmentsSection.js";
|
|
41
|
+
import { ReceivableCustomerSection as ce } from "./ReceivableCustomerSection.js";
|
|
42
|
+
import { MeasureUnitsManagerContainer as le } from "../../../../../shared/product-catalog/feature/dist/lib/MeasureUnitsManagerContainer.js";
|
|
43
|
+
import { ProductSelector as ue } from "../../../../../shared/product-catalog/feature/dist/lib/ProductSelector.js";
|
|
44
44
|
import "../../../../../shared/product-catalog/feature/dist/index.js";
|
|
45
|
-
import { useReceivablesWidget as
|
|
46
|
-
import { ProductsWidget as
|
|
45
|
+
import { useReceivablesWidget as de } from "./useReceivablesWidget.js";
|
|
46
|
+
import { ProductsWidget as fe } from "../../../../../products-widget/feature/dist/lib/ProductsWidget/ProductsWidget.js";
|
|
47
47
|
import "../../../../../products-widget/feature/dist/index.js";
|
|
48
|
-
import { useEffect as
|
|
49
|
-
import { Fragment as
|
|
48
|
+
import { useEffect as pe, useId as E, useState as D } from "react";
|
|
49
|
+
import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
50
50
|
// ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js
|
|
51
|
-
function
|
|
51
|
+
function j({ auditHistoryLabels: i, counterpartFormLabels: u, counterpartMessageLabels: T, detailsLabels: j, embeddedBankName: M, filterBarLabels: N, filterLabels: P, formLabels: F, initialCounterpartId: I, initialView: L, measureUnitDeleteLabels: R, measureUnitsLabels: z, messageLabels: B, onReceivableCreated: me, onReceivableOpened: he, onStatusCardChange: ge, onTabChange: _e, onTemplateSettingsClick: ve, pageSizeOptions: V = ae, paymentLabels: ye, previewLabels: be, productMessageLabels: xe, screenLabels: H, selectedStatusCard: Se, selectedTab: Ce, seriesScreenLabels: U, tabLabels: we, actionLabels: Te, actionsModalLabels: Ee, settingsContainer: De }) {
|
|
52
52
|
let W = r();
|
|
53
|
-
|
|
54
|
-
W(
|
|
53
|
+
pe(() => {
|
|
54
|
+
W(oe.Mounted);
|
|
55
55
|
}, [W]);
|
|
56
|
-
let [Oe, ke] =
|
|
56
|
+
let [Oe, ke] = D(w.Invoices), G = Ce ?? Oe, K = de({
|
|
57
57
|
auditHistoryLabels: i,
|
|
58
|
-
counterpartMessageLabels:
|
|
58
|
+
counterpartMessageLabels: T,
|
|
59
59
|
embeddedBankName: M,
|
|
60
60
|
filterLabels: P,
|
|
61
|
-
initialCounterpartId:
|
|
62
|
-
initialView:
|
|
63
|
-
messageLabels:
|
|
64
|
-
onReceivableCreated:
|
|
65
|
-
onReceivableOpened:
|
|
66
|
-
onStatusCardChange:
|
|
61
|
+
initialCounterpartId: I,
|
|
62
|
+
initialView: L,
|
|
63
|
+
messageLabels: B,
|
|
64
|
+
onReceivableCreated: me,
|
|
65
|
+
onReceivableOpened: he,
|
|
66
|
+
onStatusCardChange: ge,
|
|
67
67
|
pageSizeOptions: V,
|
|
68
68
|
screenLabels: H,
|
|
69
|
-
selectedStatusCard:
|
|
70
|
-
isRecurringTabActive: G ===
|
|
71
|
-
}), Ae =
|
|
72
|
-
|
|
73
|
-
}, [X, Pe] =
|
|
74
|
-
t || (Y(
|
|
69
|
+
selectedStatusCard: Se,
|
|
70
|
+
isRecurringTabActive: G === w.Recurring
|
|
71
|
+
}), Ae = E(), je = E(), q = E(), Me = E(), J = E(), Ne = E(), Y = (e) => {
|
|
72
|
+
ie(e) && (ke(e), _e?.(e));
|
|
73
|
+
}, [X, Pe] = D(null), Z = (e, t = !1) => e && ((n) => {
|
|
74
|
+
t || (Y(w.Invoices), e(n));
|
|
75
75
|
}), Q = {
|
|
76
|
-
...
|
|
77
|
-
...
|
|
76
|
+
...re,
|
|
77
|
+
...we
|
|
78
78
|
}, $ = {
|
|
79
|
-
...
|
|
79
|
+
...x,
|
|
80
80
|
...U
|
|
81
81
|
};
|
|
82
|
-
return /* @__PURE__ */
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
headerStart: I,
|
|
82
|
+
return /* @__PURE__ */ A(O, { children: [
|
|
83
|
+
/* @__PURE__ */ k(n, {}),
|
|
84
|
+
/* @__PURE__ */ k(d, {
|
|
86
85
|
selectedTabId: G,
|
|
87
86
|
onTabChange: Y,
|
|
88
|
-
onSettingsClick: K.canEditSettings ?
|
|
87
|
+
onSettingsClick: K.canEditSettings ? ve : void 0,
|
|
88
|
+
settingsContainer: De,
|
|
89
89
|
actionContainerRef: Pe,
|
|
90
90
|
labels: { settingsButton: Q.settingsButton },
|
|
91
91
|
tabs: [
|
|
92
92
|
{
|
|
93
|
-
id:
|
|
93
|
+
id: w.Invoices,
|
|
94
94
|
label: Q.invoicesTab,
|
|
95
|
-
content: /* @__PURE__ */
|
|
95
|
+
content: /* @__PURE__ */ k(b, {
|
|
96
96
|
rows: K.table.rows,
|
|
97
97
|
isLoading: K.isTableLoading,
|
|
98
98
|
isError: K.isError,
|
|
@@ -108,7 +108,7 @@ function A({ auditHistoryLabels: i, counterpartFormLabels: S, counterpartMessage
|
|
|
108
108
|
onPrevPage: K.table.onPrevPage,
|
|
109
109
|
statusCards: K.table.statusCards,
|
|
110
110
|
onStatusCardSelect: K.table.onStatusCardSelect,
|
|
111
|
-
filterBar: /* @__PURE__ */
|
|
111
|
+
filterBar: /* @__PURE__ */ k(l, {
|
|
112
112
|
...K.table.filterBar,
|
|
113
113
|
labels: N
|
|
114
114
|
}),
|
|
@@ -121,9 +121,9 @@ function A({ auditHistoryLabels: i, counterpartFormLabels: S, counterpartMessage
|
|
|
121
121
|
})
|
|
122
122
|
},
|
|
123
123
|
{
|
|
124
|
-
id:
|
|
124
|
+
id: w.Recurring,
|
|
125
125
|
label: Q.recurringTab,
|
|
126
|
-
content: /* @__PURE__ */
|
|
126
|
+
content: /* @__PURE__ */ k(S, {
|
|
127
127
|
rows: K.series.rows,
|
|
128
128
|
isLoading: K.isSeriesLoading,
|
|
129
129
|
isError: K.isSeriesError,
|
|
@@ -137,7 +137,7 @@ function A({ auditHistoryLabels: i, counterpartFormLabels: S, counterpartMessage
|
|
|
137
137
|
hasPrevPage: K.series.hasPrevPage,
|
|
138
138
|
onNextPage: K.series.onNextPage,
|
|
139
139
|
onPrevPage: K.series.onPrevPage,
|
|
140
|
-
filterBar: /* @__PURE__ */
|
|
140
|
+
filterBar: /* @__PURE__ */ k(l, {
|
|
141
141
|
...K.series.filterBar,
|
|
142
142
|
labels: {
|
|
143
143
|
...N,
|
|
@@ -155,9 +155,9 @@ function A({ auditHistoryLabels: i, counterpartFormLabels: S, counterpartMessage
|
|
|
155
155
|
})
|
|
156
156
|
},
|
|
157
157
|
{
|
|
158
|
-
id:
|
|
158
|
+
id: w.Customers,
|
|
159
159
|
label: Q.customersTab,
|
|
160
|
-
content: /* @__PURE__ */
|
|
160
|
+
content: /* @__PURE__ */ k(s, {
|
|
161
161
|
counterpartType: "customer",
|
|
162
162
|
passThrough: !0,
|
|
163
163
|
headerActionContainer: X,
|
|
@@ -166,13 +166,13 @@ function A({ auditHistoryLabels: i, counterpartFormLabels: S, counterpartMessage
|
|
|
166
166
|
})
|
|
167
167
|
},
|
|
168
168
|
{
|
|
169
|
-
id:
|
|
169
|
+
id: w.Products,
|
|
170
170
|
label: Q.productsTab,
|
|
171
|
-
content: /* @__PURE__ */
|
|
171
|
+
content: /* @__PURE__ */ k(fe, { headerActionContainer: X })
|
|
172
172
|
}
|
|
173
173
|
]
|
|
174
174
|
}),
|
|
175
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ k(_, {
|
|
176
176
|
open: K.form.open,
|
|
177
177
|
onRequestClose: K.form.requestClose,
|
|
178
178
|
mode: K.form.dialogMode,
|
|
@@ -184,7 +184,7 @@ function A({ auditHistoryLabels: i, counterpartFormLabels: S, counterpartMessage
|
|
|
184
184
|
autoFocusLineItemId: K.form.autoFocusLineItemId,
|
|
185
185
|
lineItemsLoading: K.form.lineItemsLoading,
|
|
186
186
|
inProgress: K.form.fieldsDisabled || K.actionsSuspended,
|
|
187
|
-
customerSection: /* @__PURE__ */
|
|
187
|
+
customerSection: /* @__PURE__ */ k(ce, {
|
|
188
188
|
idPrefix: je,
|
|
189
189
|
customerId: K.form.values.customerId,
|
|
190
190
|
customer: K.form.customer,
|
|
@@ -208,7 +208,7 @@ function A({ auditHistoryLabels: i, counterpartFormLabels: S, counterpartMessage
|
|
|
208
208
|
}),
|
|
209
209
|
labels: F
|
|
210
210
|
}),
|
|
211
|
-
renderProductSelector: (e, t) => /* @__PURE__ */
|
|
211
|
+
renderProductSelector: (e, t) => /* @__PURE__ */ k(ue, {
|
|
212
212
|
...t,
|
|
213
213
|
inputValue: e.name,
|
|
214
214
|
selectedProductId: K.form.values.lineItems.find((t) => t.id === e.id)?.productId || void 0,
|
|
@@ -229,7 +229,7 @@ function A({ auditHistoryLabels: i, counterpartFormLabels: S, counterpartMessage
|
|
|
229
229
|
onAddLineItem: K.form.addLineItem,
|
|
230
230
|
onRemoveLineItem: K.form.removeLineItem,
|
|
231
231
|
showDueDateField: K.form.showDueDateField,
|
|
232
|
-
billingSection: K.form.showBillingSection && /* @__PURE__ */
|
|
232
|
+
billingSection: K.form.showBillingSection && /* @__PURE__ */ k(h, {
|
|
233
233
|
idPrefix: Ae,
|
|
234
234
|
paymentTerms: K.form.paymentTerms.view,
|
|
235
235
|
paymentTermsError: K.form.errors.paymentTermsId,
|
|
@@ -238,13 +238,13 @@ function A({ auditHistoryLabels: i, counterpartFormLabels: S, counterpartMessage
|
|
|
238
238
|
onCustomDatePickerOpenChange: K.form.paymentTerms.changeCustomDatePickerOpen,
|
|
239
239
|
purchaseOrder: K.form.purchaseOrder,
|
|
240
240
|
onPurchaseOrderChange: (e) => K.form.updateValues({ purchaseOrder: e }),
|
|
241
|
-
customDateCalendar: /* @__PURE__ */
|
|
241
|
+
customDateCalendar: /* @__PURE__ */ k(e, {
|
|
242
242
|
mode: "single",
|
|
243
243
|
captionLayout: "dropdown",
|
|
244
244
|
...K.form.paymentTerms.calendar,
|
|
245
245
|
onSelect: K.form.paymentTerms.selectCustomDate
|
|
246
246
|
}),
|
|
247
|
-
recurrenceSection: K.form.showRecurrenceSection && (K.form.recurrenceLoading ? /* @__PURE__ */
|
|
247
|
+
recurrenceSection: K.form.showRecurrenceSection && (K.form.recurrenceLoading ? /* @__PURE__ */ k(t, { className: "ttw:h-9 ttw:w-full" }) : /* @__PURE__ */ k(v, {
|
|
248
248
|
idPrefix: q,
|
|
249
249
|
view: K.form.recurrence.view,
|
|
250
250
|
disabled: K.form.fieldsDisabled,
|
|
@@ -257,7 +257,7 @@ function A({ auditHistoryLabels: i, counterpartFormLabels: S, counterpartMessage
|
|
|
257
257
|
onMaxOccurrencesChange: K.form.recurrence.changeMaxOccurrences,
|
|
258
258
|
onCreationModeChange: K.form.recurrence.changeCreationMode,
|
|
259
259
|
onSetUpEmailClick: K.form.recurrence.setUpEmail,
|
|
260
|
-
emailDialog: /* @__PURE__ */
|
|
260
|
+
emailDialog: /* @__PURE__ */ k(ne, {
|
|
261
261
|
idPrefix: q,
|
|
262
262
|
view: K.form.recurrence.emailView,
|
|
263
263
|
onOpenChange: K.form.recurrence.changeEmailOpen,
|
|
@@ -267,7 +267,7 @@ function A({ auditHistoryLabels: i, counterpartFormLabels: S, counterpartMessage
|
|
|
267
267
|
}),
|
|
268
268
|
labels: F
|
|
269
269
|
})),
|
|
270
|
-
remindersSection: K.form.reminders.view && /* @__PURE__ */
|
|
270
|
+
remindersSection: K.form.reminders.view && /* @__PURE__ */ k(y, {
|
|
271
271
|
idPrefix: J,
|
|
272
272
|
view: K.form.reminders.view,
|
|
273
273
|
onToggle: K.form.reminders.toggle,
|
|
@@ -283,7 +283,7 @@ function A({ auditHistoryLabels: i, counterpartFormLabels: S, counterpartMessage
|
|
|
283
283
|
}),
|
|
284
284
|
labels: F
|
|
285
285
|
}),
|
|
286
|
-
bankAccountSection: /* @__PURE__ */
|
|
286
|
+
bankAccountSection: /* @__PURE__ */ k(m, {
|
|
287
287
|
idPrefix: Me,
|
|
288
288
|
view: K.form.bankAccount.view,
|
|
289
289
|
error: K.form.errors.bankAccountId,
|
|
@@ -295,7 +295,7 @@ function A({ auditHistoryLabels: i, counterpartFormLabels: S, counterpartMessage
|
|
|
295
295
|
onFormCancel: K.form.bankAccount.cancelAddAccount,
|
|
296
296
|
labels: F
|
|
297
297
|
}),
|
|
298
|
-
attachmentsSection: K.form.attachmentsView && /* @__PURE__ */
|
|
298
|
+
attachmentsSection: K.form.attachmentsView && /* @__PURE__ */ k(se, {
|
|
299
299
|
view: K.form.attachmentsView,
|
|
300
300
|
disabled: K.form.fieldsDisabled,
|
|
301
301
|
onFilesSelect: K.form.selectAttachmentFiles,
|
|
@@ -303,9 +303,9 @@ function A({ auditHistoryLabels: i, counterpartFormLabels: S, counterpartMessage
|
|
|
303
303
|
onRemove: K.form.removeAttachment,
|
|
304
304
|
labels: F
|
|
305
305
|
}),
|
|
306
|
-
preview: /* @__PURE__ */
|
|
306
|
+
preview: /* @__PURE__ */ k(te, {
|
|
307
307
|
view: K.form.preview,
|
|
308
|
-
labels:
|
|
308
|
+
labels: be
|
|
309
309
|
}),
|
|
310
310
|
closeDisabled: K.form.isSubmitting,
|
|
311
311
|
cancelDisabled: K.form.isSubmitting || K.form.attachmentsUploading,
|
|
@@ -321,11 +321,11 @@ function A({ auditHistoryLabels: i, counterpartFormLabels: S, counterpartMessage
|
|
|
321
321
|
onPrimaryClick: K.form.selectPrimaryMode,
|
|
322
322
|
labels: F
|
|
323
323
|
}),
|
|
324
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ k(C, {
|
|
325
325
|
...K.form.unsavedPrompt,
|
|
326
326
|
labels: F
|
|
327
327
|
}),
|
|
328
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ k(g, {
|
|
329
329
|
open: K.detailsOpen,
|
|
330
330
|
onOpenChange: (e) => {
|
|
331
331
|
e || K.closeDetails();
|
|
@@ -339,15 +339,15 @@ function A({ auditHistoryLabels: i, counterpartFormLabels: S, counterpartMessage
|
|
|
339
339
|
disabledActions: K.actions.pendingActions,
|
|
340
340
|
labels: j
|
|
341
341
|
}, K.detailsPanelKey),
|
|
342
|
-
/* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ k(c, {
|
|
343
343
|
counterpartId: K.customerDetailsId,
|
|
344
344
|
counterpartType: "customer",
|
|
345
345
|
onClose: K.closeCustomerDetails,
|
|
346
|
-
formLabels:
|
|
347
|
-
messageLabels:
|
|
346
|
+
formLabels: u,
|
|
347
|
+
messageLabels: T,
|
|
348
348
|
...K.customerDetailsActions
|
|
349
349
|
}),
|
|
350
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ k(ee, {
|
|
351
351
|
open: K.actions.payment.isOpen,
|
|
352
352
|
onOpenChange: (e) => {
|
|
353
353
|
e || K.actions.payment.close();
|
|
@@ -365,9 +365,9 @@ function A({ auditHistoryLabels: i, counterpartFormLabels: S, counterpartMessage
|
|
|
365
365
|
onEdit: K.actions.payment.edit,
|
|
366
366
|
onConfirm: K.actions.payment.confirm,
|
|
367
367
|
onCancel: K.actions.payment.close,
|
|
368
|
-
labels:
|
|
368
|
+
labels: ye
|
|
369
369
|
}),
|
|
370
|
-
K.actions.actionDialog && /* @__PURE__ */
|
|
370
|
+
K.actions.actionDialog && /* @__PURE__ */ k(p, {
|
|
371
371
|
open: !!K.actions.actionTarget,
|
|
372
372
|
onOpenChange: (e) => {
|
|
373
373
|
e || K.actions.closeAction();
|
|
@@ -382,9 +382,9 @@ function A({ auditHistoryLabels: i, counterpartFormLabels: S, counterpartMessage
|
|
|
382
382
|
onCommentChange: K.actions.setActionComment,
|
|
383
383
|
onConfirm: K.actions.confirmAction,
|
|
384
384
|
onCancel: K.actions.closeAction,
|
|
385
|
-
labels:
|
|
385
|
+
labels: Te
|
|
386
386
|
}),
|
|
387
|
-
/* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ k(f, {
|
|
388
388
|
idPrefix: Ne,
|
|
389
389
|
open: K.actionsModal.isOpen,
|
|
390
390
|
view: K.actionsModal.view,
|
|
@@ -396,9 +396,9 @@ function A({ auditHistoryLabels: i, counterpartFormLabels: S, counterpartMessage
|
|
|
396
396
|
onToggleAll: K.actionsModal.toggleAll,
|
|
397
397
|
onAllSelectedChange: K.actionsModal.setAllSelected,
|
|
398
398
|
onSaveItems: K.actionsModal.saveItems,
|
|
399
|
-
labels:
|
|
399
|
+
labels: Ee
|
|
400
400
|
}),
|
|
401
|
-
/* @__PURE__ */
|
|
401
|
+
/* @__PURE__ */ k(a, {
|
|
402
402
|
open: K.form.counterpartView === "create",
|
|
403
403
|
onOpenChange: (e) => {
|
|
404
404
|
e || K.form.counterpartForm.close();
|
|
@@ -407,7 +407,7 @@ function A({ auditHistoryLabels: i, counterpartFormLabels: S, counterpartMessage
|
|
|
407
407
|
values: K.form.counterpartForm.values,
|
|
408
408
|
errors: K.form.counterpartForm.errors,
|
|
409
409
|
stateOptions: K.form.stateOptions,
|
|
410
|
-
taxIdField: o(K.form.counterpartForm.values.entityType, "customer",
|
|
410
|
+
taxIdField: o(K.form.counterpartForm.values.entityType, "customer", u),
|
|
411
411
|
inProgress: K.form.counterpartForm.isSubmitting || K.actionsSuspended,
|
|
412
412
|
onChange: (e) => K.form.counterpartForm.setValues((t) => ({
|
|
413
413
|
...t,
|
|
@@ -422,21 +422,26 @@ function A({ auditHistoryLabels: i, counterpartFormLabels: S, counterpartMessage
|
|
|
422
422
|
})),
|
|
423
423
|
onSubmit: K.form.counterpartForm.submit,
|
|
424
424
|
onCancel: K.form.counterpartForm.close,
|
|
425
|
-
labels:
|
|
425
|
+
labels: u
|
|
426
426
|
}),
|
|
427
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ k(le, {
|
|
428
428
|
open: K.measureUnitsOpen,
|
|
429
429
|
onClose: K.closeMeasureUnits,
|
|
430
430
|
suspended: K.actionsSuspended,
|
|
431
|
-
managerLabels:
|
|
432
|
-
deleteLabels:
|
|
433
|
-
messageLabels:
|
|
431
|
+
managerLabels: z,
|
|
432
|
+
deleteLabels: R,
|
|
433
|
+
messageLabels: xe
|
|
434
434
|
})
|
|
435
435
|
] });
|
|
436
436
|
}
|
|
437
|
-
function
|
|
438
|
-
|
|
439
|
-
|
|
437
|
+
function M({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: a, linkComponent: o, uiFramework: s, errorFallback: c, onError: l, analytics: d, disclosuresAcceptance: f, providerLabels: p, headerStart: m, ...h }) {
|
|
438
|
+
let [g, _] = D(null);
|
|
439
|
+
return /* @__PURE__ */ k(i, {
|
|
440
|
+
header: m || h.onTemplateSettingsClick ? /* @__PURE__ */ k(u, {
|
|
441
|
+
headerStart: m,
|
|
442
|
+
settingsContainerRef: _
|
|
443
|
+
}) : null,
|
|
444
|
+
widgetName: T,
|
|
440
445
|
baseUrl: e,
|
|
441
446
|
widgetToken: t,
|
|
442
447
|
organizationId: n,
|
|
@@ -446,10 +451,13 @@ function j({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gat
|
|
|
446
451
|
uiFramework: s,
|
|
447
452
|
errorFallback: c,
|
|
448
453
|
onError: l,
|
|
449
|
-
analytics:
|
|
450
|
-
disclosuresAcceptance:
|
|
451
|
-
providerLabels:
|
|
452
|
-
children: /* @__PURE__ */
|
|
454
|
+
analytics: d,
|
|
455
|
+
disclosuresAcceptance: f,
|
|
456
|
+
providerLabels: p,
|
|
457
|
+
children: /* @__PURE__ */ k(j, {
|
|
458
|
+
...h,
|
|
459
|
+
settingsContainer: g
|
|
460
|
+
})
|
|
453
461
|
});
|
|
454
462
|
}
|
|
455
|
-
export {
|
|
463
|
+
export { w as InvoicingTab, M as ReceivablesWidget, M as default };
|