@tesouro/embedded-components-react 0.10.14 → 0.11.0

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.
Files changed (34) hide show
  1. package/README.md +70 -6
  2. package/dist/experimental/QuickViewWidget.d.ts +73 -2
  3. package/dist/experimental/index.d.ts +73 -2
  4. package/dist/index.d.ts +21 -2
  5. package/dist/index.js +56 -55
  6. package/dist/lib/WidgetProvider.d.ts +21 -2
  7. package/dist/lib/WidgetProvider.js +15 -13
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +54 -52
  9. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/PdfFileViewer.js +23 -21
  10. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/data-access/dist/index.js +1 -0
  11. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/data-access/dist/index2.js +84 -0
  12. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/index.js +3 -0
  13. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/lib/BillsQuickViewWidget/BillsQuickViewWidgetFeature.js +101 -0
  14. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/lib/BillsQuickViewWidget/labels.js +19 -0
  15. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/lib/BillsQuickViewWidget/summarizeOpenBills.js +13 -0
  16. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/lib/BillsQuickViewWidget/testIds.js +7 -0
  17. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/lib/BillsQuickViewWidget/useOpenBillsSummary.js +30 -0
  18. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/lib/analytics/events.js +4 -0
  19. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/ui/dist/index.js +3 -0
  20. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/ui/dist/index2.js +8 -0
  21. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/ui/dist/index3.js +32 -0
  22. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/feature/dist/lib/QuickViewWidget/QuickViewWidget.js +51 -35
  23. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/feature/dist/lib/QuickViewWidget/labels.js +6 -3
  24. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +133 -130
  25. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  26. package/dist/libs/tesouro-embedded-components-react/shared/quick-view/ui/dist/index3.js +1 -1
  27. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/EmbeddedToaster.js +1 -1
  28. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/HostIsolationScope/HostIsolationScope.js +1 -1
  29. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/index.js +3 -1
  30. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/csp.js +37 -0
  31. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/pdfWorkerSrc.js +9 -0
  32. package/dist/packages/shared-ui-shadcn/dist/index.js +4090 -4101
  33. package/dist/pdf.worker.min.mjs +28 -0
  34. package/package.json +13 -3
@@ -0,0 +1 @@
1
+ export { useOpenBillsAnalytics } from "./index2.js";
@@ -0,0 +1,84 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { getAnalyticsPayablesOptions as e } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
6
+ import { withAuthEpoch as t } from "../../../../shared/data-access/dist/lib/withAuthEpoch.js";
7
+ import { useEmbedApi as n } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
8
+ import { organizationHeaders as r } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
9
+ import "../../../../shared/data-access/dist/index.js";
10
+ import { useQueries as i } from "@tanstack/react-query";
11
+ import { addDays as a, format as o, parseISO as s } from "date-fns";
12
+ // ../../libs/tesouro-embedded-components-react/quick-view-widget/bills/data-access/dist/index2.js
13
+ var c = [
14
+ "new",
15
+ "approve_in_progress",
16
+ "waiting_to_be_paid",
17
+ "partially_paid"
18
+ ], l = (e, t) => o(a(s(e), t), "yyyy-MM-dd");
19
+ function u(e) {
20
+ let t = {
21
+ status__in: [...c],
22
+ due_date__lte: e && l(e, 30)
23
+ }, n = {
24
+ ...t,
25
+ currency: "USD"
26
+ }, r = {
27
+ metric: "id",
28
+ aggregation_function: "count"
29
+ };
30
+ return {
31
+ allBillsCount: r,
32
+ openAmountDue: {
33
+ ...n,
34
+ metric: "amount_due",
35
+ aggregation_function: "summary"
36
+ },
37
+ openCountByStatus: {
38
+ ...n,
39
+ ...r,
40
+ dimension: "status"
41
+ },
42
+ overdueCount: {
43
+ ...n,
44
+ ...r,
45
+ due_date__lt: e
46
+ },
47
+ dueCountAnyCurrency: {
48
+ ...t,
49
+ ...r
50
+ }
51
+ };
52
+ }
53
+ var d = {
54
+ staleTime: 6e4,
55
+ refetchOnWindowFocus: !0
56
+ }, f = Object.keys(u(""));
57
+ function p(e) {
58
+ return {
59
+ data: e.every((e) => e.data !== void 0) ? Object.fromEntries(f.map((t, n) => [t, e[n].data])) : void 0,
60
+ isLoading: e.some((e) => e.isLoading),
61
+ isFetching: e.some((e) => e.isFetching),
62
+ isError: e.some((e) => e.isError),
63
+ refetch: () => Promise.all(e.map((e) => e.refetch()))
64
+ };
65
+ }
66
+ function m({ today: a, enabled: o = !0 }) {
67
+ let { client: s, organizationId: c, widgetToken: l, authEpoch: m, organizationStatus: h } = n(), g = u(a ?? "");
68
+ return i({
69
+ queries: f.map((n) => ({
70
+ ...t(e({
71
+ client: s,
72
+ headers: r(c),
73
+ query: g[n]
74
+ }), {
75
+ authEpoch: m,
76
+ organizationStatus: h
77
+ }),
78
+ ...d,
79
+ enabled: !!(c && l && a) && o
80
+ })),
81
+ combine: p
82
+ });
83
+ }
84
+ export { c as OPEN_BILL_STATUSES, u as openBillsAnalyticsQueries, m as useOpenBillsAnalytics };
@@ -0,0 +1,3 @@
1
+ import { BILLS_QUICK_VIEW_WIDGET_LABELS_EN as e } from "./lib/BillsQuickViewWidget/labels.js";
2
+ import { BillsQuickViewWidget as t } from "./lib/BillsQuickViewWidget/BillsQuickViewWidgetFeature.js";
3
+ export { e as BILLS_QUICK_VIEW_WIDGET_LABELS_EN, t as BillsQuickViewWidget };
@@ -0,0 +1,101 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { amountOutputToMajorUnits as e } from "../../../../../../shared/util/dist/lib/amountOutputToMajorUnits.js";
6
+ import { formatMoneyExact as t } from "../../../../../../shared/util/dist/lib/formatMoneyExact.js";
7
+ import "../../../../../../shared/util/dist/index.js";
8
+ import { OrganizationStatus as n, isOrganizationOnItsWay as r } from "../../../../../../shared/data-access/dist/lib/organizationStatus.js";
9
+ import { useEmbedApi as i } from "../../../../../../shared/data-access/dist/lib/EmbedApiContext.js";
10
+ import { Scope as a } from "../../../../../../shared/data-access/dist/lib/scopes.js";
11
+ import "../../../../../../shared/data-access/dist/index.js";
12
+ import { useAnalyticsTrack as o } from "../../../../../../shared/feature/dist/lib/analytics/hooks.js";
13
+ import { WidgetProvider as s } from "../../../../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
14
+ import { useRefetchWidget as c, useWidgetConfig as l, useWidgetError as u, useWidgetLoading as d } from "../../../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
15
+ import "../../../../../../shared/feature/dist/index.js";
16
+ import { BillsQuickViewTile as f } from "../../../../ui/dist/index3.js";
17
+ import "../../../../ui/dist/index.js";
18
+ import { BILLS_QUICK_VIEW_WIDGET_LABELS_EN as p } from "./labels.js";
19
+ import { BillsQuickViewWidgetAnalyticsEvent as m, WIDGET_NAME as h } from "../analytics/events.js";
20
+ import { billsQuickViewWidgetTestIds as g } from "./testIds.js";
21
+ import { useOpenBillsSummary as _ } from "./useOpenBillsSummary.js";
22
+ import { useCallback as v, useEffect as y } from "react";
23
+ import { jsx as b } from "react/jsx-runtime";
24
+ // ../../libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/lib/BillsQuickViewWidget/BillsQuickViewWidgetFeature.js
25
+ var x = (n) => t(e({
26
+ value: n,
27
+ currencyCode: "USD"
28
+ }), {
29
+ currencyCode: "USD",
30
+ includeSpaceAfterCurrencySymbol: !1
31
+ });
32
+ function S(e, t, n) {
33
+ let r = (e, t = "viewBills") => ({
34
+ subtext: e,
35
+ description: e,
36
+ subtextTone: "muted",
37
+ callToAction: t
38
+ });
39
+ if (!e.hasBills) return r(t.noBillsYet, n ? "addBill" : "viewBills");
40
+ if (e.openCount === 0) return r(e.hasDueBills ? t.noBillsDueInCurrency("USD") : t.nothingToPay);
41
+ let i = e.awaitingApprovalCount > 0 ? [t.awaitingApprovalCount(e.awaitingApprovalCount)] : [], a = e.overdueCount > 0 ? [t.overdueCount(e.overdueCount), ...i] : [t.billCount(e.openCount), ...i];
42
+ return {
43
+ subtext: t.joinSubtext(a),
44
+ description: t.joinDescription(a),
45
+ subtextTone: e.overdueCount > 0 ? "warning" : "muted",
46
+ callToAction: "viewBills"
47
+ };
48
+ }
49
+ function C({ labels: e, onViewBillsClick: t, onAddBillClick: s, className: h, style: C }) {
50
+ let w = {
51
+ ...p,
52
+ ...e
53
+ }, T = o();
54
+ y(() => {
55
+ T(m.Mounted);
56
+ }, [T]);
57
+ let { initResponse: E } = l(), D = d(), O = u(), k = c(), { organizationId: A, organizationStatus: j } = i(), M = r(j), N = E?.scopes?.includes(a.PayableReadOrg) ?? !1, P = E?.scopes?.includes(a.PayableWriteOrg) ?? !1, { data: F, isLoading: I, isError: L, refetch: R } = _({ enabled: N }), z = D && !E || M && F === void 0 || I, B = (!!O || L) && F === void 0, V = v(() => {
58
+ k(), N && A && R();
59
+ }, [
60
+ k,
61
+ R,
62
+ N,
63
+ A
64
+ ]);
65
+ if (E && (!N || j === n.None)) return null;
66
+ let H = F ? x(F.openAmountDue) : "", U = F ? S(F, w, P) : void 0, W = U?.callToAction === "addBill" ? s : t;
67
+ return /* @__PURE__ */ b(f, {
68
+ value: H,
69
+ subtext: U?.subtext,
70
+ subtextTone: U?.subtextTone,
71
+ linkText: w[U?.callToAction ?? "viewBills"],
72
+ onClick: W,
73
+ ariaLabel: U ? w.accessibleName({
74
+ title: w.accessibleTitle,
75
+ value: H,
76
+ detail: U.description,
77
+ action: w[U.callToAction]
78
+ }) : void 0,
79
+ isLoading: z,
80
+ isError: B,
81
+ onRetry: B ? V : void 0,
82
+ labels: w,
83
+ testIds: g,
84
+ className: h,
85
+ style: C
86
+ });
87
+ }
88
+ function w({ labels: e, onViewBillsClick: t, onAddBillClick: n, className: r, style: i, ...a }) {
89
+ return /* @__PURE__ */ b(s, {
90
+ ...a,
91
+ widgetName: h,
92
+ children: /* @__PURE__ */ b(C, {
93
+ labels: e,
94
+ onViewBillsClick: t,
95
+ onAddBillClick: n,
96
+ className: r,
97
+ style: i
98
+ })
99
+ });
100
+ }
101
+ export { w as BillsQuickViewWidget, C as BillsQuickViewWidgetWithContext };
@@ -0,0 +1,19 @@
1
+ import { BILLS_QUICK_VIEW_TILE_LABELS_EN as e } from "../../../../ui/dist/index2.js";
2
+ import "../../../../ui/dist/index.js";
3
+ // ../../libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/lib/BillsQuickViewWidget/labels.js
4
+ var t = (e) => e.toLocaleString("en-US"), n = {
5
+ ...e,
6
+ accessibleTitle: "Bills due in the next 30 days",
7
+ viewBills: "View bills",
8
+ addBill: "Add a bill",
9
+ noBillsYet: "No bills yet",
10
+ nothingToPay: "Nothing to pay",
11
+ noBillsDueInCurrency: (e) => `No ${e} bills due`,
12
+ billCount: (e) => `${t(e)} ${e === 1 ? "bill" : "bills"}`,
13
+ overdueCount: (e) => `${t(e)} overdue`,
14
+ awaitingApprovalCount: (e) => `${t(e)} awaiting approval`,
15
+ joinSubtext: (e) => e.join(" · "),
16
+ joinDescription: (e) => e.join(", "),
17
+ accessibleName: ({ title: e, value: t, detail: n, action: r }) => `${e}, ${t}, ${n}. ${r}.`
18
+ };
19
+ export { n as BILLS_QUICK_VIEW_WIDGET_LABELS_EN };
@@ -0,0 +1,13 @@
1
+ // ../../libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/lib/BillsQuickViewWidget/summarizeOpenBills.js
2
+ var e = (e, t = () => !0) => e.data.filter((e) => t(e.dimension_value ?? "")).reduce((e, t) => e + t.metric_value, 0);
3
+ function t(t) {
4
+ return {
5
+ hasBills: e(t.allBillsCount) > 0,
6
+ hasDueBills: e(t.dueCountAnyCurrency) > 0,
7
+ openCount: e(t.openCountByStatus),
8
+ openAmountDue: e(t.openAmountDue),
9
+ overdueCount: e(t.overdueCount),
10
+ awaitingApprovalCount: e(t.openCountByStatus, (e) => e === "approve_in_progress")
11
+ };
12
+ }
13
+ export { t as summarizeOpenBills };
@@ -0,0 +1,7 @@
1
+ // ../../libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/lib/BillsQuickViewWidget/testIds.js
2
+ var e = {
3
+ tile: "bills-quick-view-widget-tile",
4
+ skeleton: "bills-quick-view-widget-skeleton",
5
+ error: "bills-quick-view-widget-error"
6
+ };
7
+ export { e as billsQuickViewWidgetTestIds };
@@ -0,0 +1,30 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { useEmbedApi as e } from "../../../../../../shared/data-access/dist/lib/EmbedApiContext.js";
6
+ import "../../../../../../shared/data-access/dist/index.js";
7
+ import { useLocalCalendarDay as t } from "../../../../../../shared/feature/dist/lib/calendar/useLocalCalendarDay.js";
8
+ import "../../../../../../shared/feature/dist/index.js";
9
+ import { summarizeOpenBills as n } from "./summarizeOpenBills.js";
10
+ import { useOpenBillsAnalytics as r } from "../../../../data-access/dist/index2.js";
11
+ import "../../../../data-access/dist/index.js";
12
+ import { useMemo as i, useState as a } from "react";
13
+ // ../../libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/lib/BillsQuickViewWidget/useOpenBillsSummary.js
14
+ var o = (e, t) => Object.keys(e).every((n) => e[n] === t[n]);
15
+ function s({ enabled: s } = {}) {
16
+ let c = t(), l = r({
17
+ today: c,
18
+ enabled: s
19
+ }), { organizationId: u, authEpoch: d } = e(), f = i(() => l.data && n(l.data), [l.data]), [p, m] = a(), h = p !== void 0 && p.organizationId === u && p.authEpoch === d, g = f !== void 0 && (!l.isFetching && !l.isError || !h), _ = h ? p.summary : f;
20
+ return g && !(h && o(p.summary, f)) && (m({
21
+ organizationId: u,
22
+ authEpoch: d,
23
+ summary: f
24
+ }), _ = f), {
25
+ ...l,
26
+ data: _,
27
+ isLoading: (l.isLoading || c === void 0) && !_
28
+ };
29
+ }
30
+ export { s as useOpenBillsSummary };
@@ -0,0 +1,4 @@
1
+ import { QUICK_VIEW_WIDGET_NAME as e } from "../../../../../shared/util/dist/lib/widgetName.js";
2
+ // ../../libs/tesouro-embedded-components-react/quick-view-widget/bills/feature/dist/lib/analytics/events.js
3
+ var t = `${e}.bills_quick_view_widget`, n = { Mounted: `${t}.mounted` };
4
+ export { n as BillsQuickViewWidgetAnalyticsEvent, t as WIDGET_NAME };
@@ -0,0 +1,3 @@
1
+ import { BILLS_QUICK_VIEW_TILE_LABELS_EN as e } from "./index2.js";
2
+ import { BillsQuickViewTile as t } from "./index3.js";
3
+ export { e as BILLS_QUICK_VIEW_TILE_LABELS_EN, t as BillsQuickViewTile };
@@ -0,0 +1,8 @@
1
+ // ../../libs/tesouro-embedded-components-react/quick-view-widget/bills/ui/dist/index2.js
2
+ var e = {
3
+ title: "Bills due · next 30 days",
4
+ loadingLabel: "Loading bills",
5
+ loadErrorTitle: "Couldn't load bills",
6
+ loadErrorRetry: "Retry"
7
+ };
8
+ export { e as BILLS_QUICK_VIEW_TILE_LABELS_EN };
@@ -0,0 +1,32 @@
1
+ import { QuickViewTile as e } from "../../../../shared/quick-view/ui/dist/index3.js";
2
+ import "../../../../shared/quick-view/ui/dist/index.js";
3
+ import { BILLS_QUICK_VIEW_TILE_LABELS_EN as t } from "./index2.js";
4
+ import { jsx as n } from "react/jsx-runtime";
5
+ // ../../libs/tesouro-embedded-components-react/quick-view-widget/bills/ui/dist/index3.js
6
+ function r({ value: r, subtext: i, subtextTone: a, linkText: o, onClick: s, ariaLabel: c, isLoading: l, isError: u, onRetry: d, labels: f, testIds: p, className: m, style: h }) {
7
+ let g = {
8
+ ...t,
9
+ ...f
10
+ };
11
+ return /* @__PURE__ */ n(e, {
12
+ title: g.title,
13
+ value: r,
14
+ subtext: i,
15
+ subtextTone: a,
16
+ linkText: o,
17
+ onClick: s,
18
+ ariaLabel: c,
19
+ isLoading: l,
20
+ isError: u,
21
+ onRetry: d,
22
+ labels: {
23
+ loadingLabel: g.loadingLabel,
24
+ loadErrorTitle: g.loadErrorTitle,
25
+ loadErrorRetry: g.loadErrorRetry
26
+ },
27
+ testIds: p,
28
+ className: m,
29
+ style: h
30
+ });
31
+ }
32
+ export { r as BillsQuickViewTile };
@@ -6,51 +6,67 @@ import { AccountsQuickViewWidget as e } from "../../../../accounts/feature/dist/
6
6
  import "../../../../accounts/feature/dist/index.js";
7
7
  import { InvoicesQuickViewWidget as t } from "../../../../invoices/feature/dist/lib/InvoicesQuickViewWidget/InvoicesQuickViewWidgetFeature.js";
8
8
  import "../../../../invoices/feature/dist/index.js";
9
- import { useEffect as n } from "react";
10
- import { jsx as r } from "react/jsx-runtime";
9
+ import { BillsQuickViewWidget as n } from "../../../../bills/feature/dist/lib/BillsQuickViewWidget/BillsQuickViewWidgetFeature.js";
10
+ import "../../../../bills/feature/dist/index.js";
11
+ import { useEffect as r } from "react";
12
+ import { jsx as i } from "react/jsx-runtime";
11
13
  // ../../libs/tesouro-embedded-components-react/quick-view-widget/feature/dist/lib/QuickViewWidget/QuickViewWidget.js
12
- var i = {
14
+ var a = {
13
15
  Accounts: "accounts",
14
- Invoices: "invoices"
15
- }, a = {
16
+ Invoices: "invoices",
17
+ Bills: "bills"
18
+ }, o = {
16
19
  accounts: ["onViewAccountsClick"],
17
- invoices: ["onViewInvoicesClick", "onCreateInvoiceClick"]
18
- }, o = [
20
+ invoices: ["onViewInvoicesClick", "onCreateInvoiceClick"],
21
+ bills: ["onViewBillsClick", "onAddBillClick"]
22
+ }, s = [
19
23
  "onViewAccountsClick",
20
24
  "onViewInvoicesClick",
21
- "onCreateInvoiceClick"
25
+ "onCreateInvoiceClick",
26
+ "onViewBillsClick",
27
+ "onAddBillClick"
22
28
  ];
23
- function s(e) {
24
- return Object.values(i).includes(e);
29
+ function c(e) {
30
+ return Object.values(a).includes(e);
25
31
  }
26
- function c(e, t) {
27
- let r = s(e) ? a[e] : [], c = o.filter((e) => t[e] !== void 0 && !r.includes(e)).join(", ");
28
- n(() => {
29
- s(e) ? c && console.warn(`[tesouro-embedded] QuickViewWidget: ${c} ${c.includes(",") ? "do" : "does"} not apply to type="${e}" and will never be called. type="${e}" uses: ${a[e].join(", ")}.`) : console.warn(`[tesouro-embedded] QuickViewWidget: unknown type "${String(e)}". Expected one of: ${Object.values(i).join(", ")}. Rendering nothing.`);
30
- }, [e, c]);
32
+ function l(e, t) {
33
+ let n = c(e) ? o[e] : [], i = s.filter((e) => t[e] !== void 0 && !n.includes(e)).join(", ");
34
+ r(() => {
35
+ c(e) ? i && console.warn(`[tesouro-embedded] QuickViewWidget: ${i} ${i.includes(",") ? "do" : "does"} not apply to type="${e}" and will never be called. type="${e}" uses: ${o[e].join(", ")}.`) : console.warn(`[tesouro-embedded] QuickViewWidget: unknown type "${String(e)}". Expected one of: ${Object.values(a).join(", ")}. Rendering nothing.`);
36
+ }, [e, i]);
31
37
  }
32
- function l({ type: n, labels: a, onViewAccountsClick: o, onViewInvoicesClick: s, onCreateInvoiceClick: l, className: u, style: d, ...f }) {
33
- switch (c(n, {
34
- onViewAccountsClick: o,
35
- onViewInvoicesClick: s,
36
- onCreateInvoiceClick: l
37
- }), n) {
38
- case i.Accounts: return /* @__PURE__ */ r(e, {
39
- ...f,
40
- labels: a?.accounts,
41
- onViewAccountsClick: o,
42
- className: u,
43
- style: d
38
+ function u({ type: r, labels: o, onViewAccountsClick: s, onViewInvoicesClick: c, onCreateInvoiceClick: u, onViewBillsClick: d, onAddBillClick: f, className: p, style: m, ...h }) {
39
+ switch (l(r, {
40
+ onViewAccountsClick: s,
41
+ onViewInvoicesClick: c,
42
+ onCreateInvoiceClick: u,
43
+ onViewBillsClick: d,
44
+ onAddBillClick: f
45
+ }), r) {
46
+ case a.Accounts: return /* @__PURE__ */ i(e, {
47
+ ...h,
48
+ labels: o?.accounts,
49
+ onViewAccountsClick: s,
50
+ className: p,
51
+ style: m
44
52
  });
45
- case i.Invoices: return /* @__PURE__ */ r(t, {
46
- ...f,
47
- labels: a?.invoices,
48
- onViewInvoicesClick: s,
49
- onCreateInvoiceClick: l,
50
- className: u,
51
- style: d
53
+ case a.Invoices: return /* @__PURE__ */ i(t, {
54
+ ...h,
55
+ labels: o?.invoices,
56
+ onViewInvoicesClick: c,
57
+ onCreateInvoiceClick: u,
58
+ className: p,
59
+ style: m
60
+ });
61
+ case a.Bills: return /* @__PURE__ */ i(n, {
62
+ ...h,
63
+ labels: o?.bills,
64
+ onViewBillsClick: d,
65
+ onAddBillClick: f,
66
+ className: p,
67
+ style: m
52
68
  });
53
69
  default: return null;
54
70
  }
55
71
  }
56
- export { a as QUICK_VIEW_CLICK_HANDLERS, i as QuickViewType, l as QuickViewWidget };
72
+ export { o as QUICK_VIEW_CLICK_HANDLERS, a as QuickViewType, u as QuickViewWidget };
@@ -2,9 +2,12 @@ import { ACCOUNTS_QUICK_VIEW_WIDGET_LABELS_EN as e } from "../../../../accounts/
2
2
  import "../../../../accounts/feature/dist/index.js";
3
3
  import { INVOICES_QUICK_VIEW_WIDGET_LABELS_EN as t } from "../../../../invoices/feature/dist/lib/InvoicesQuickViewWidget/labels.js";
4
4
  import "../../../../invoices/feature/dist/index.js";
5
+ import { BILLS_QUICK_VIEW_WIDGET_LABELS_EN as n } from "../../../../bills/feature/dist/lib/BillsQuickViewWidget/labels.js";
6
+ import "../../../../bills/feature/dist/index.js";
5
7
  // ../../libs/tesouro-embedded-components-react/quick-view-widget/feature/dist/lib/QuickViewWidget/labels.js
6
- var n = {
8
+ var r = {
7
9
  accounts: e,
8
- invoices: t
10
+ invoices: t,
11
+ bills: n
9
12
  };
10
- export { n as QUICK_VIEW_WIDGET_LABELS_EN };
13
+ export { r as QUICK_VIEW_WIDGET_LABELS_EN };