@tesouro/embedded-components-react 0.11.168 → 0.11.170
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 +10 -6
- package/dist/index.d.ts +9 -4
- package/dist/lib/BillPayWidget.d.ts +9 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index8.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index18.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js +313 -320
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillPayWidget.js +46 -38
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillsTab.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +45 -22
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -491,14 +491,18 @@ Shows "Business Banking provided by" the business customer's bank, plus the FDIC
|
|
|
491
491
|
|
|
492
492
|
A bill pay widget with Tesouro widget auth and theming: a Bills tab for uploading, reviewing and paying bills, and a Vendors tab for the vendors they are paid to.
|
|
493
493
|
|
|
494
|
+
The right end of the tab row holds the active tab's main action: Add bill on Bills and Add vendor on Vendors. While the vendor list is empty, Add vendor shows only in its empty state.
|
|
495
|
+
|
|
494
496
|
#### Props
|
|
495
497
|
|
|
496
|
-
| Prop | Type
|
|
497
|
-
| ------------------- |
|
|
498
|
-
| `initialTab` | `'bills' \| 'vendors'`
|
|
499
|
-
| `
|
|
500
|
-
| `
|
|
501
|
-
| `
|
|
498
|
+
| Prop | Type | Default | Description |
|
|
499
|
+
| ------------------- | ----------------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
500
|
+
| `initialTab` | `'bills' \| 'vendors'` | `'bills'` | Tab to open on initial mount when `selectedTab` is omitted. |
|
|
501
|
+
| `selectedTab` | `BillPayWidgetTabId` | `undefined` | The active tab: `'bills'` or `'vendors'`. Omit to let the widget track it, starting on `initialTab`. |
|
|
502
|
+
| `onTabChange` | `(tab: BillPayWidgetTabId) => void` | `undefined` | Called when the active tab changes, from a tab click or a vendor's "View all" or "Add a bill" opening the Bills tab, so you can keep it in the URL. |
|
|
503
|
+
| `initialView` | `'create'` | `undefined` | Opens the Bills tab's "Add a bill" dialog once on arrival, when the user can create bills. Closing it does not reopen it. Ignored when the widget opens on Vendors. |
|
|
504
|
+
| `poweredByBankName` | `string` | `undefined` | Bank shown as "Powered by {bank}" next to the source account when paying a bill. Omit it to hide the badge. |
|
|
505
|
+
| `onSettingsClick` | `() => void` | `undefined` | Opens your bill pay settings surface from a cog on the tab row, beside the active tab's add button. The cog renders only when this is supplied and the user's scopes reach that surface. |
|
|
502
506
|
|
|
503
507
|
### CreditCardsWidget
|
|
504
508
|
|
package/dist/index.d.ts
CHANGED
|
@@ -6359,8 +6359,12 @@ declare const TabId: {
|
|
|
6359
6359
|
};
|
|
6360
6360
|
type BillPayWidgetTabId = (typeof TabId)[keyof typeof TabId];
|
|
6361
6361
|
interface BillPayWidgetProps extends WidgetProviderProps {
|
|
6362
|
-
/** Tab to open on initial mount. */
|
|
6362
|
+
/** Tab to open on initial mount when `selectedTab` is omitted. */
|
|
6363
6363
|
initialTab?: BillPayWidgetTabId;
|
|
6364
|
+
/** The active tab, for a host that keeps it in its URL. Omit to let the widget track it. */
|
|
6365
|
+
selectedTab?: BillPayWidgetTabId;
|
|
6366
|
+
/** Called when the widget switches tab, from a tab click or a handoff into Bills. */
|
|
6367
|
+
onTabChange?: (tab: BillPayWidgetTabId) => void;
|
|
6364
6368
|
/**
|
|
6365
6369
|
* Opens the Bills tab's Add a bill dialog on arrival, for a host deep link
|
|
6366
6370
|
* such as `?create=1` (EMBD-7011). Named like `ReceivablesWidget`'s
|
|
@@ -6374,8 +6378,9 @@ interface BillPayWidgetProps extends WidgetProviderProps {
|
|
|
6374
6378
|
/** Bank shown as "Powered by {bank}" next to the source account when paying; omitted hides the badge. */
|
|
6375
6379
|
poweredByBankName?: string;
|
|
6376
6380
|
/**
|
|
6377
|
-
* Opens the host's bill-pay settings surface, from a cog
|
|
6378
|
-
* tab's
|
|
6381
|
+
* Opens the host's bill-pay settings surface, from a cog on the tab row
|
|
6382
|
+
* beside the active tab's add button. Only rendered for a user whose scopes
|
|
6383
|
+
* reach it.
|
|
6379
6384
|
*/
|
|
6380
6385
|
onSettingsClick?: () => void;
|
|
6381
6386
|
}
|
|
@@ -6643,4 +6648,4 @@ interface CheckAmountAndDetailScreenProps {
|
|
|
6643
6648
|
type PendingFeatureStyleSources = CheckAmountAndDetailScreenProps | GapCoverageAlertProps | NoPolicyBannerProps;
|
|
6644
6649
|
|
|
6645
6650
|
export { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, ADDITIONAL_OWNERS_LABELS_EN, APPLICATION_STATUS_LABELS_EN, AcceptDisclosuresWidget, BALANCES_WIDGET_LABELS_EN, BANKING_COMPLIANCE_BANNER_LABELS_EN, BUSINESS_DETAILS_LABELS_EN, BalancesWidget, BankAccountOnboardingWidget, BankAccountsWidget, BankingComplianceBannerWidget, BillPayWidget, CardDetailsWidget, CounterpartsWidget, CreditCardsWidget, DebitCardsWidget, ERROR_STATE_ID, ExpenseManagementWidget, HELP_FAQ_EN, INSIGHTS_FEATURE_LABELS_EN, INSIGHTS_WIDGET_LABELS_EN, InsightsWidget, InvoicingTab, LinkedAccountsWidget, OFFER_WIDGET_LABELS_EN, OFFER_WIDGET_STATUS_LABELS_EN, OfferBenefitIcon, OfferWidget, OnboardingSuppressionReason, PERSONAL_DETAILS_LABELS_EN, RESULT_LABELS_EN, ReceivableStatusCard, ReceivablesWidget, RefreshingRootWidgetProvider, RootWidgetProvider, SINGLE_INSIGHT_LABELS_EN, Scope, SettingsSection, SettingsWidget, THEME_TOKEN_NAMES, DEFAULT_FEATURE_LABELS as TRANSFERS_FEATURE_LABELS_EN, TRANSFERS_WIDGET_LABELS_EN, TransfersWidget, UIFramework, WIDGET_SUITE_DEFAULT_SECTIONS, WIDGET_SUITE_LABELS_EN, WidgetProvider, WidgetSuite, WidgetSuiteSectionId, WidgetTokenRefreshProvider, cloneEmbeddedClient, configureCsp, createTheme, getGlobalWidgetConfig, getGlobalWidgetInitState, isScope, registerDesignSystemEnsurer, registerUIRenderers, setGlobalWidgetConfig, subscribeToGlobalWidgetInitState, themeIssues, themeToCss, updateGlobalWidgetConfig, useDisclosuresAcceptanceSurface, useOwnWidgetConfig, useRefetchWidget, useWidgetConfig, useWidgetError, useWidgetInitStaleForToken, useWidgetLoading, useWidgetToken };
|
|
6646
|
-
export type { AcceptDisclosuresWidgetLabels, AcceptDisclosuresWidgetProps, AccordionItemCardLabels, Labels$3 as AccountDetailsWidgetLabels, ActivateCardPanelLabels, AdditionalOwner, AdditionalOwnersLabels, AddressFormSheetLabels, ApplicationStatusLabelValues, ApplicationStatusLabels, ApplicationStatusNoticeLabels, BalancesWidgetLabels, BalancesWidgetProps, BankAccountFormSheetLabels, BankAccountOnboardingWidgetLabels, BankAccountOnboardingWidgetProps, FeatureLabels$3 as BankAccountsWidgetFeatureLabels, Labels$4 as BankAccountsWidgetLabels, BankAccountsWidgetProps, BankingComplianceBannerLabels, BankingComplianceBannerWidgetProps, BillPayWidgetProps, BusinessDetailsLabels, BusinessDetailsValues, CardDetailsFeatureLabels, CardDetailsPanelLabels as CardDetailsWidgetLabels, CardDetailsWidgetProps, CardsFeatureLabels, CardsListLabels as CardsLabels, CardsPagination, CompanyStructureValue, ConfirmDeleteDialogLabels, CounterpartActionTarget, CounterpartDetailsSheetLabels, CounterpartFormSheetLabels, CounterpartMessageLabels, CounterpartMode, CounterpartsScreenLabels, CounterpartsWidgetProps, CreditCardsWidgetProps, CspConfig, DebitCardsWidgetProps, DisclosureLinks, EmbeddedClient, Labels$2 as ExpenseManagementWidgetLabels, ExpenseManagementWidgetProps, ExpenseStatusBadgeLabels, FileViewerLabels, HelpFaqAnswer, HelpFaqBullet, HelpFaqBulletType, HelpFaqItem, HelpFaqSection, InsightsFeatureLabels, InsightsWidgetLabels, InsightsWidgetProps, InvoicesFilterBarLabelOverrides, InvoicesFilterBarLabels, InvoicesFilterLabelOverrides, InvoicesFilterLabels, InvoicingTabId, InvoicingTabLabels, LinkComponent, LinkComponentProps, FeatureLabels$2 as LinkedAccountsWidgetFeatureLabels, Labels$1 as LinkedAccountsWidgetLabels, LinkedAccountsWidgetProps, MeasureUnitDeleteDialogLabels, MeasureUnitsManagerLabels, OfferStatusLabelValues, OfferStatusNoticeLabels, OfferWidgetBenefit, OfferWidgetContent, OfferWidgetHowItWorksStep, OfferWidgetImage, OfferWidgetLabels, OfferWidgetProps, OfferWidgetStatusLabels, PendingFeatureStyleSources, PersonalDetailsLabels, PersonalDetailsValues, ProductFormSheetLabels, ProductMessageLabels, ReceivableActionDialogLabels, ReceivableActionsModalLabels, ReceivableAuditHistoryLabels, ReceivableDetailsPanelLabelOverrides, ReceivableDetailsPanelLabels, ReceivableDocumentType, ReceivableFormDialogLabels, ReceivableFormSheetLabels, ReceivableMessageLabels, ReceivablePaymentDialogLabels, ReceivablePreviewLabels, ReceivableStatusBadgeLabels, ReceivablesScreenLabelOverrides, ReceivablesScreenLabels, ReceivablesWidgetProps, RecurringSeriesScreenLabelOverrides, RecurringSeriesScreenLabels, RefreshingRootWidgetProviderProps, ResultLabels, RootWidgetProviderProps, SettingsWidgetAdditionalSection, FeatureLabels$1 as SettingsWidgetFeatureLabels, Labels as SettingsWidgetLabels, SettingsWidgetProps, SettingsWidgetSection, SettingsWidgetSectionId, SingleInsightLabels, ThemeInput, ThemeIssue, ThemeTokenKey, ThemeTokenName, ThemeTokens, TransactionDetailsActionsLabels, TransactionDetailsLabels, FeatureLabels as TransfersWidgetFeatureLabels, TransfersWidgetLabels, TransfersWidgetProps, WidgetConfig, WidgetConfigInput, WidgetInitResponse, WidgetInitState, WidgetProviderLabels, WidgetProviderProps, WidgetSuiteCardsLabels, WidgetSuiteDashboardLabels, WidgetSuiteDisclosureLabels, WidgetSuiteExpensesLabels, WidgetSuiteInvoicingLabels, WidgetSuiteLabelOverrides, WidgetSuiteLabels, WidgetSuiteMenuLabels, WidgetSuiteOnboardingGateLabels, WidgetSuiteOnboardingLabels, WidgetSuiteProps, WidgetSuiteQuickActionsLabels, WidgetSuiteSectionContentLabels, WidgetSuiteSectionTitleLabels, WidgetTokenFetcher, WidgetTokenManager, WidgetTokenRefreshProviderProps, WidgetTokenState };
|
|
6651
|
+
export type { AcceptDisclosuresWidgetLabels, AcceptDisclosuresWidgetProps, AccordionItemCardLabels, Labels$3 as AccountDetailsWidgetLabels, ActivateCardPanelLabels, AdditionalOwner, AdditionalOwnersLabels, AddressFormSheetLabels, ApplicationStatusLabelValues, ApplicationStatusLabels, ApplicationStatusNoticeLabels, BalancesWidgetLabels, BalancesWidgetProps, BankAccountFormSheetLabels, BankAccountOnboardingWidgetLabels, BankAccountOnboardingWidgetProps, FeatureLabels$3 as BankAccountsWidgetFeatureLabels, Labels$4 as BankAccountsWidgetLabels, BankAccountsWidgetProps, BankingComplianceBannerLabels, BankingComplianceBannerWidgetProps, BillPayWidgetProps, BillPayWidgetTabId, BusinessDetailsLabels, BusinessDetailsValues, CardDetailsFeatureLabels, CardDetailsPanelLabels as CardDetailsWidgetLabels, CardDetailsWidgetProps, CardsFeatureLabels, CardsListLabels as CardsLabels, CardsPagination, CompanyStructureValue, ConfirmDeleteDialogLabels, CounterpartActionTarget, CounterpartDetailsSheetLabels, CounterpartFormSheetLabels, CounterpartMessageLabels, CounterpartMode, CounterpartsScreenLabels, CounterpartsWidgetProps, CreditCardsWidgetProps, CspConfig, DebitCardsWidgetProps, DisclosureLinks, EmbeddedClient, Labels$2 as ExpenseManagementWidgetLabels, ExpenseManagementWidgetProps, ExpenseStatusBadgeLabels, FileViewerLabels, HelpFaqAnswer, HelpFaqBullet, HelpFaqBulletType, HelpFaqItem, HelpFaqSection, InsightsFeatureLabels, InsightsWidgetLabels, InsightsWidgetProps, InvoicesFilterBarLabelOverrides, InvoicesFilterBarLabels, InvoicesFilterLabelOverrides, InvoicesFilterLabels, InvoicingTabId, InvoicingTabLabels, LinkComponent, LinkComponentProps, FeatureLabels$2 as LinkedAccountsWidgetFeatureLabels, Labels$1 as LinkedAccountsWidgetLabels, LinkedAccountsWidgetProps, MeasureUnitDeleteDialogLabels, MeasureUnitsManagerLabels, OfferStatusLabelValues, OfferStatusNoticeLabels, OfferWidgetBenefit, OfferWidgetContent, OfferWidgetHowItWorksStep, OfferWidgetImage, OfferWidgetLabels, OfferWidgetProps, OfferWidgetStatusLabels, PendingFeatureStyleSources, PersonalDetailsLabels, PersonalDetailsValues, ProductFormSheetLabels, ProductMessageLabels, ReceivableActionDialogLabels, ReceivableActionsModalLabels, ReceivableAuditHistoryLabels, ReceivableDetailsPanelLabelOverrides, ReceivableDetailsPanelLabels, ReceivableDocumentType, ReceivableFormDialogLabels, ReceivableFormSheetLabels, ReceivableMessageLabels, ReceivablePaymentDialogLabels, ReceivablePreviewLabels, ReceivableStatusBadgeLabels, ReceivablesScreenLabelOverrides, ReceivablesScreenLabels, ReceivablesWidgetProps, RecurringSeriesScreenLabelOverrides, RecurringSeriesScreenLabels, RefreshingRootWidgetProviderProps, ResultLabels, RootWidgetProviderProps, SettingsWidgetAdditionalSection, FeatureLabels$1 as SettingsWidgetFeatureLabels, Labels as SettingsWidgetLabels, SettingsWidgetProps, SettingsWidgetSection, SettingsWidgetSectionId, SingleInsightLabels, ThemeInput, ThemeIssue, ThemeTokenKey, ThemeTokenName, ThemeTokens, TransactionDetailsActionsLabels, TransactionDetailsLabels, FeatureLabels as TransfersWidgetFeatureLabels, TransfersWidgetLabels, TransfersWidgetProps, WidgetConfig, WidgetConfigInput, WidgetInitResponse, WidgetInitState, WidgetProviderLabels, WidgetProviderProps, WidgetSuiteCardsLabels, WidgetSuiteDashboardLabels, WidgetSuiteDisclosureLabels, WidgetSuiteExpensesLabels, WidgetSuiteInvoicingLabels, WidgetSuiteLabelOverrides, WidgetSuiteLabels, WidgetSuiteMenuLabels, WidgetSuiteOnboardingGateLabels, WidgetSuiteOnboardingLabels, WidgetSuiteProps, WidgetSuiteQuickActionsLabels, WidgetSuiteSectionContentLabels, WidgetSuiteSectionTitleLabels, WidgetTokenFetcher, WidgetTokenManager, WidgetTokenRefreshProviderProps, WidgetTokenState };
|
|
@@ -601,8 +601,12 @@ declare const TabId: {
|
|
|
601
601
|
};
|
|
602
602
|
type BillPayWidgetTabId = (typeof TabId)[keyof typeof TabId];
|
|
603
603
|
interface BillPayWidgetProps extends WidgetProviderProps {
|
|
604
|
-
/** Tab to open on initial mount. */
|
|
604
|
+
/** Tab to open on initial mount when `selectedTab` is omitted. */
|
|
605
605
|
initialTab?: BillPayWidgetTabId;
|
|
606
|
+
/** The active tab, for a host that keeps it in its URL. Omit to let the widget track it. */
|
|
607
|
+
selectedTab?: BillPayWidgetTabId;
|
|
608
|
+
/** Called when the widget switches tab, from a tab click or a handoff into Bills. */
|
|
609
|
+
onTabChange?: (tab: BillPayWidgetTabId) => void;
|
|
606
610
|
/**
|
|
607
611
|
* Opens the Bills tab's Add a bill dialog on arrival, for a host deep link
|
|
608
612
|
* such as `?create=1` (EMBD-7011). Named like `ReceivablesWidget`'s
|
|
@@ -616,12 +620,13 @@ interface BillPayWidgetProps extends WidgetProviderProps {
|
|
|
616
620
|
/** Bank shown as "Powered by {bank}" next to the source account when paying; omitted hides the badge. */
|
|
617
621
|
poweredByBankName?: string;
|
|
618
622
|
/**
|
|
619
|
-
* Opens the host's bill-pay settings surface, from a cog
|
|
620
|
-
* tab's
|
|
623
|
+
* Opens the host's bill-pay settings surface, from a cog on the tab row
|
|
624
|
+
* beside the active tab's add button. Only rendered for a user whose scopes
|
|
625
|
+
* reach it.
|
|
621
626
|
*/
|
|
622
627
|
onSettingsClick?: () => void;
|
|
623
628
|
}
|
|
624
629
|
declare const BillPayWidget: (props: BillPayWidgetProps) => ReactElement;
|
|
625
630
|
|
|
626
631
|
export { BillPayWidget };
|
|
627
|
-
export type { BillPayWidgetProps };
|
|
632
|
+
export type { BillPayWidgetProps, BillPayWidgetTabId };
|
|
@@ -30,7 +30,7 @@ import { useCallback as d, useImperativeHandle as ue, useMemo as f, useState as
|
|
|
30
30
|
import { Fragment as m, jsx as h, jsxs as de } from "react/jsx-runtime";
|
|
31
31
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js
|
|
32
32
|
var fe = () => void 0;
|
|
33
|
-
function g({ labels: g, onOpenBill: _, onEnterManually: v, onFilesSelected: y, maxFiles: b,
|
|
33
|
+
function g({ labels: g, onOpenBill: _, onEnterManually: v, onFilesSelected: y, maxFiles: b, headerActionContainer: pe, ref: me }) {
|
|
34
34
|
let x = f(() => ({
|
|
35
35
|
...o,
|
|
36
36
|
...g,
|
|
@@ -183,7 +183,6 @@ function g({ labels: g, onOpenBill: _, onEnterManually: v, onFilesSelected: y, m
|
|
|
183
183
|
}, [W, G]), q = g?.screen, ye = f(() => ({
|
|
184
184
|
...q,
|
|
185
185
|
createButton: x.createButton,
|
|
186
|
-
settingsButton: x.settingsButton,
|
|
187
186
|
addBill: {
|
|
188
187
|
...q?.addBill,
|
|
189
188
|
heading: x.nonEmptyHeading
|
|
@@ -198,7 +197,6 @@ function g({ labels: g, onOpenBill: _, onEnterManually: v, onFilesSelected: y, m
|
|
|
198
197
|
x.duplicateColumnAmount,
|
|
199
198
|
q,
|
|
200
199
|
x.createButton,
|
|
201
|
-
x.settingsButton,
|
|
202
200
|
x.nonEmptyHeading
|
|
203
201
|
]), be = f(() => ({
|
|
204
202
|
...R.filterBarProps,
|
|
@@ -251,7 +249,7 @@ function g({ labels: g, onOpenBill: _, onEnterManually: v, onFilesSelected: y, m
|
|
|
251
249
|
showAddPanelWhenEmpty: R.showAddPanelWhenEmpty,
|
|
252
250
|
emptyState: B ? x.duplicatesEmptyState : x.queueEmptyStates[R.selectedFilterTabId],
|
|
253
251
|
onCreateClick: k ? () => S(!0) : void 0,
|
|
254
|
-
|
|
252
|
+
headerActionContainer: pe,
|
|
255
253
|
onEnterManually: k ? J : void 0,
|
|
256
254
|
onFilesSelected: k ? Y : void 0,
|
|
257
255
|
maxFiles: b,
|
|
@@ -78,7 +78,6 @@ var t = {
|
|
|
78
78
|
emptyHeading: "Add your first bill",
|
|
79
79
|
nonEmptyHeading: "Add a bill",
|
|
80
80
|
createButton: "Add bill",
|
|
81
|
-
settingsButton: "Bill pay settings",
|
|
82
81
|
emailCopiedToast: "Email address copied to clipboard",
|
|
83
82
|
emailCopyFailedToast: "Could not copy the email address",
|
|
84
83
|
queues: t,
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js
CHANGED
|
@@ -1,291 +1,292 @@
|
|
|
1
|
-
import { Button as e, ContextMenuItem as t, DataTable as n, DataTableSortableHeader as r, Input as i, Separator as a, Skeleton as ee, Tabs as o, TabsContent as s, TabsList as c, TabsTrigger as te, Tooltip as ne, TooltipContent as
|
|
2
|
-
import { EmptyState as
|
|
3
|
-
import { ErrorState as
|
|
1
|
+
import { Button as e, ContextMenuItem as t, DataTable as n, DataTableSortableHeader as r, Input as i, Separator as a, Skeleton as ee, Tabs as o, TabsContent as s, TabsList as c, TabsTrigger as te, Tooltip as ne, TooltipContent as re, TooltipProvider as ie, TooltipTrigger as ae } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { EmptyState as l } from "../../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
|
|
3
|
+
import { ErrorState as oe } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
4
4
|
import "../../../../shared/ui/dist/index.js";
|
|
5
|
-
import { BillStatusBadge as
|
|
5
|
+
import { BillStatusBadge as se } from "../../../../shared/document-status/ui/dist/index4.js";
|
|
6
6
|
import "../../../../shared/document-status/ui/dist/index.js";
|
|
7
|
-
import { BillDuplicateIcon as
|
|
8
|
-
import { BillDuplicateWarning as
|
|
9
|
-
import { BillOverflowMenu as
|
|
10
|
-
import { getAcceptedBillUploadFiles as
|
|
11
|
-
import { DateDisclosure as
|
|
12
|
-
import { DueDateValue as
|
|
7
|
+
import { BillDuplicateIcon as u } from "../../../ui/dist/index6.js";
|
|
8
|
+
import { BillDuplicateWarning as ce } from "../../../ui/dist/index8.js";
|
|
9
|
+
import { BillOverflowMenu as le } from "../../../ui/dist/index11.js";
|
|
10
|
+
import { getAcceptedBillUploadFiles as ue } from "../../../ui/dist/index17.js";
|
|
11
|
+
import { DateDisclosure as de } from "../../../ui/dist/index20.js";
|
|
12
|
+
import { DueDateValue as fe } from "../../../ui/dist/index22.js";
|
|
13
13
|
import "../../../ui/dist/index.js";
|
|
14
|
-
import { AddBillPanel as
|
|
14
|
+
import { AddBillPanel as d } from "./index3.js";
|
|
15
15
|
import "./index4.js";
|
|
16
|
-
import { BillsFilterBar as
|
|
16
|
+
import { BillsFilterBar as pe } from "./index10.js";
|
|
17
17
|
import "./index11.js";
|
|
18
|
-
import { MissingValue as
|
|
18
|
+
import { MissingValue as f } from "./index13.js";
|
|
19
19
|
import "./index14.js";
|
|
20
|
-
import { NoValue as
|
|
20
|
+
import { NoValue as p } from "./index16.js";
|
|
21
21
|
import "./index17.js";
|
|
22
|
-
import { BILLS_SCREEN_LABELS_EN as
|
|
23
|
-
import { BillColumn as
|
|
24
|
-
import { Fragment as
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
22
|
+
import { BILLS_SCREEN_LABELS_EN as m, BILLS_SCREEN_UPLOAD_ACCEPT as h } from "./index18.js";
|
|
23
|
+
import { BillColumn as g } from "./index19.js";
|
|
24
|
+
import { Fragment as me, useMemo as _, useState as he } from "react";
|
|
25
|
+
import { createPortal as ge } from "react-dom";
|
|
26
|
+
import { Fragment as _e, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
27
|
+
import { PaperclipIcon as ve, SearchIcon as ye, UploadIcon as be } from "lucide-react";
|
|
27
28
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js
|
|
28
|
-
var
|
|
29
|
+
var xe = [
|
|
29
30
|
10,
|
|
30
31
|
25,
|
|
31
32
|
50,
|
|
32
33
|
100
|
|
33
|
-
],
|
|
34
|
-
function
|
|
34
|
+
], Se = 240;
|
|
35
|
+
function Ce(e, t) {
|
|
35
36
|
return e === "resolving" ? t.vendorResolving : e === "unavailable" ? t.vendorUnavailable : t.missingValue.missing;
|
|
36
37
|
}
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
],
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
38
|
+
var b = 40, we = 56, Te = [
|
|
39
|
+
g.Vendor,
|
|
40
|
+
g.InvoiceNumber,
|
|
41
|
+
g.Attachment,
|
|
42
|
+
g.IssueDate,
|
|
43
|
+
g.DueDate,
|
|
44
|
+
g.ScheduledDate,
|
|
45
|
+
g.PaidDate,
|
|
46
|
+
g.Status,
|
|
47
|
+
g.AmountDue,
|
|
48
|
+
g.AmountScheduled,
|
|
49
|
+
g.AmountPaid,
|
|
50
|
+
g.TotalAmount,
|
|
51
|
+
g.AddedOn
|
|
52
|
+
], x = [
|
|
53
|
+
g.Vendor,
|
|
54
|
+
g.Attachment,
|
|
55
|
+
g.DueDate,
|
|
56
|
+
g.Status,
|
|
57
|
+
g.AmountDue,
|
|
58
|
+
g.AddedOn
|
|
58
59
|
];
|
|
59
|
-
function
|
|
60
|
-
let
|
|
61
|
-
...
|
|
62
|
-
...
|
|
60
|
+
function S({ rows: S, isLoading: Ee, isError: De, sorting: Oe, onSortingChange: ke, pageSize: Ae, onPageSizeChange: je, pageSizeOptions: C = xe, pageInfo: Me, hasNextPage: w, hasPrevPage: T, onNextPage: Ne, onPrevPage: Pe, filterTabs: E, selectedFilterTabId: D, onFilterTabChange: Fe, searchValue: Ie, onSearchChange: Le, filters: O, visibleColumns: k = x, keepsColumnOrder: A = !1, isSortable: j = !0, cellTestIds: M, isSearchActive: N, showAddPanelWhenEmpty: Re, emptyState: P, onCreateClick: F, headerActionContainer: I, onRetry: L, onFilesSelected: R, maxFiles: z, onEnterManually: B, uploadStatus: V, uploadErrorMessage: H, emailAddress: U, onCopyEmail: W, labels: G, duplicateWarning: K, duplicateReviewControl: q }) {
|
|
61
|
+
let J = _(() => ({
|
|
62
|
+
...m,
|
|
63
|
+
...G,
|
|
63
64
|
statusBadge: {
|
|
64
|
-
...
|
|
65
|
-
...
|
|
65
|
+
...m.statusBadge,
|
|
66
|
+
...G?.statusBadge
|
|
66
67
|
},
|
|
67
68
|
addBill: {
|
|
68
|
-
...
|
|
69
|
-
...
|
|
69
|
+
...m.addBill,
|
|
70
|
+
...G?.addBill,
|
|
70
71
|
dropzone: {
|
|
71
|
-
...
|
|
72
|
-
...
|
|
72
|
+
...m.addBill.dropzone,
|
|
73
|
+
...G?.addBill?.dropzone
|
|
73
74
|
}
|
|
74
75
|
},
|
|
75
76
|
sortableHeader: {
|
|
76
|
-
...
|
|
77
|
-
...
|
|
77
|
+
...m.sortableHeader,
|
|
78
|
+
...G?.sortableHeader
|
|
78
79
|
},
|
|
79
80
|
missingValue: {
|
|
80
|
-
...
|
|
81
|
-
...
|
|
81
|
+
...m.missingValue,
|
|
82
|
+
...G?.missingValue
|
|
82
83
|
},
|
|
83
84
|
noValue: {
|
|
84
|
-
...
|
|
85
|
-
...
|
|
85
|
+
...m.noValue,
|
|
86
|
+
...G?.noValue
|
|
86
87
|
},
|
|
87
88
|
dueDate: {
|
|
88
|
-
...
|
|
89
|
-
...
|
|
89
|
+
...m.dueDate,
|
|
90
|
+
...G?.dueDate
|
|
90
91
|
}
|
|
91
|
-
}), [
|
|
92
|
-
|
|
92
|
+
}), [G]), Y = S.some((e) => e.menu?.items.length), [ze, X] = he(!1), Z = !!R, Be = (e) => Array.from(e.dataTransfer.types).includes("Files"), Ve = (e) => {
|
|
93
|
+
Z && Be(e) && (e.preventDefault(), X(!0));
|
|
93
94
|
}, He = (e) => {
|
|
94
|
-
|
|
95
|
+
Z && Be(e) && (e.preventDefault(), e.dataTransfer.dropEffect = "copy", X(!0));
|
|
95
96
|
}, Ue = (e) => {
|
|
96
|
-
!e.currentTarget.contains(e.relatedTarget) &&
|
|
97
|
+
!e.currentTarget.contains(e.relatedTarget) && Z && X(!1);
|
|
97
98
|
}, We = (e) => {
|
|
98
|
-
if (!
|
|
99
|
-
e.preventDefault(),
|
|
100
|
-
let t = e.dataTransfer.files ? Array.from(e.dataTransfer.files) : [], n =
|
|
101
|
-
n.length &&
|
|
102
|
-
}, Ge =
|
|
103
|
-
let e = (e) =>
|
|
104
|
-
return /* @__PURE__ */
|
|
99
|
+
if (!Z) return;
|
|
100
|
+
e.preventDefault(), X(!1);
|
|
101
|
+
let t = e.dataTransfer.files ? Array.from(e.dataTransfer.files) : [], n = ue(t, h, z !== 1);
|
|
102
|
+
n.length && R?.(n);
|
|
103
|
+
}, Ge = _(() => {
|
|
104
|
+
let e = (e) => j ? function({ column: t }) {
|
|
105
|
+
return /* @__PURE__ */ v(r, {
|
|
105
106
|
column: t,
|
|
106
107
|
title: e,
|
|
107
|
-
labels:
|
|
108
|
+
labels: J.sortableHeader
|
|
108
109
|
});
|
|
109
|
-
} : e, t = (e, t, n = /* @__PURE__ */
|
|
110
|
-
let a = r && i.original[r] ? /* @__PURE__ */
|
|
111
|
-
return /* @__PURE__ */
|
|
110
|
+
} : e, t = (e, t, n = /* @__PURE__ */ v(f, { labels: J.missingValue }), r) => function({ row: i }) {
|
|
111
|
+
let a = r && i.original[r] ? /* @__PURE__ */ v(f, { labels: J.missingValue }) : n;
|
|
112
|
+
return /* @__PURE__ */ v("span", {
|
|
112
113
|
className: "ttw:whitespace-nowrap",
|
|
113
|
-
"data-testid":
|
|
114
|
+
"data-testid": M?.[t],
|
|
114
115
|
children: i.original[e] || a
|
|
115
116
|
});
|
|
116
|
-
}, n = t("invoiceNumberLabel",
|
|
117
|
-
return /* @__PURE__ */
|
|
117
|
+
}, n = t("invoiceNumberLabel", g.InvoiceNumber), i = function({ row: e }) {
|
|
118
|
+
return /* @__PURE__ */ v("span", {
|
|
118
119
|
className: "ttw:whitespace-nowrap",
|
|
119
|
-
"data-testid":
|
|
120
|
-
children: /* @__PURE__ */
|
|
121
|
-
value: e.original.dueDateLabel || /* @__PURE__ */
|
|
120
|
+
"data-testid": M?.[g.DueDate],
|
|
121
|
+
children: /* @__PURE__ */ v(fe, {
|
|
122
|
+
value: e.original.dueDateLabel || /* @__PURE__ */ v(f, { labels: J.missingValue }),
|
|
122
123
|
tone: e.original.dueDateTone,
|
|
123
|
-
labels:
|
|
124
|
+
labels: J.dueDate
|
|
124
125
|
})
|
|
125
126
|
});
|
|
126
|
-
}, a = (e, t, n = /* @__PURE__ */
|
|
127
|
-
let a = r && i.original[r] ? /* @__PURE__ */
|
|
128
|
-
return /* @__PURE__ */
|
|
127
|
+
}, a = (e, t, n = /* @__PURE__ */ v(f, { labels: J.missingValue }), r) => function({ row: i }) {
|
|
128
|
+
let a = r && i.original[r] ? /* @__PURE__ */ v(f, { labels: J.missingValue }) : n;
|
|
129
|
+
return /* @__PURE__ */ v("div", {
|
|
129
130
|
className: "ttw:text-right ttw:whitespace-nowrap",
|
|
130
|
-
"data-testid":
|
|
131
|
+
"data-testid": M?.[t],
|
|
131
132
|
children: i.original[e] || a
|
|
132
133
|
});
|
|
133
|
-
}, o = /* @__PURE__ */
|
|
134
|
+
}, o = /* @__PURE__ */ v(p, { labels: J.noValue });
|
|
134
135
|
function s({ row: e }) {
|
|
135
|
-
let t = e.original.scheduledDateIsGap ? /* @__PURE__ */
|
|
136
|
-
return /* @__PURE__ */
|
|
136
|
+
let t = e.original.scheduledDateIsGap ? /* @__PURE__ */ v(f, { labels: J.missingValue }) : o, n = e.original.scheduledDateLabel, r = e.original.scheduledDateExact;
|
|
137
|
+
return /* @__PURE__ */ v("span", {
|
|
137
138
|
className: "ttw:whitespace-nowrap",
|
|
138
|
-
"data-testid":
|
|
139
|
-
children: n && r ? /* @__PURE__ */
|
|
139
|
+
"data-testid": M?.[g.ScheduledDate],
|
|
140
|
+
children: n && r ? /* @__PURE__ */ v(de, {
|
|
140
141
|
date: r,
|
|
141
142
|
children: n
|
|
142
143
|
}) : n || t
|
|
143
144
|
});
|
|
144
145
|
}
|
|
145
146
|
let c = (e) => function() {
|
|
146
|
-
return /* @__PURE__ */
|
|
147
|
+
return /* @__PURE__ */ v("div", {
|
|
147
148
|
className: "ttw:text-right",
|
|
148
149
|
children: e
|
|
149
150
|
});
|
|
150
151
|
};
|
|
151
152
|
return {
|
|
152
|
-
[
|
|
153
|
+
[g.Vendor]: {
|
|
153
154
|
accessorKey: "vendorLabel",
|
|
154
|
-
enableSorting:
|
|
155
|
-
minSize:
|
|
156
|
-
header: e(
|
|
155
|
+
enableSorting: j,
|
|
156
|
+
minSize: Se,
|
|
157
|
+
header: e(J.columnVendor),
|
|
157
158
|
cell: ({ row: e }) => {
|
|
158
|
-
let t = e.original.rowNote ? /* @__PURE__ */
|
|
159
|
+
let t = e.original.rowNote ? /* @__PURE__ */ v("span", {
|
|
159
160
|
className: "ttw:sr-only",
|
|
160
161
|
children: ` ${e.original.rowNote}`
|
|
161
162
|
}) : null;
|
|
162
|
-
return !e.original.vendorLabel && e.original.vendorLookup === "resolving" ? /* @__PURE__ */
|
|
163
|
-
"data-testid":
|
|
164
|
-
children: [/* @__PURE__ */
|
|
163
|
+
return !e.original.vendorLabel && e.original.vendorLookup === "resolving" ? /* @__PURE__ */ y("div", {
|
|
164
|
+
"data-testid": M?.[g.Vendor],
|
|
165
|
+
children: [/* @__PURE__ */ v(ee, {
|
|
165
166
|
className: "ttw:h-4 ttw:w-32",
|
|
166
167
|
"aria-hidden": !0
|
|
167
168
|
}), t]
|
|
168
|
-
}) : /* @__PURE__ */
|
|
169
|
+
}) : /* @__PURE__ */ y("span", {
|
|
169
170
|
className: "ttw:inline-flex ttw:items-center ttw:gap-2",
|
|
170
|
-
"data-testid":
|
|
171
|
-
children: [e.original.vendorLabel || (e.original.vendorLookup === "unavailable" ? /* @__PURE__ */
|
|
171
|
+
"data-testid": M?.[g.Vendor],
|
|
172
|
+
children: [e.original.vendorLabel || (e.original.vendorLookup === "unavailable" ? /* @__PURE__ */ v(p, { labels: { none: J.vendorUnavailable } }) : /* @__PURE__ */ v(f, { labels: J.missingValue })), t]
|
|
172
173
|
});
|
|
173
174
|
}
|
|
174
175
|
},
|
|
175
|
-
[
|
|
176
|
+
[g.InvoiceNumber]: {
|
|
176
177
|
accessorKey: "invoiceNumberLabel",
|
|
177
178
|
enableSorting: !1,
|
|
178
|
-
header: () =>
|
|
179
|
-
cell: (e) => e.row.original.marker === "duplicate" ? /* @__PURE__ */
|
|
179
|
+
header: () => J.columnInvoiceNumber,
|
|
180
|
+
cell: (e) => e.row.original.marker === "duplicate" ? /* @__PURE__ */ y("span", {
|
|
180
181
|
className: "ttw:relative",
|
|
181
|
-
children: [/* @__PURE__ */
|
|
182
|
+
children: [/* @__PURE__ */ v(u, { className: "ttw:absolute ttw:top-1/2 ttw:right-full ttw:mr-1 ttw:-translate-y-1/2 ttw:text-warning" }), n(e)]
|
|
182
183
|
}) : n(e)
|
|
183
184
|
},
|
|
184
|
-
[
|
|
185
|
+
[g.Attachment]: {
|
|
185
186
|
accessorKey: "attachment",
|
|
186
187
|
enableSorting: !1,
|
|
187
|
-
size:
|
|
188
|
-
minSize:
|
|
189
|
-
header: () => /* @__PURE__ */
|
|
188
|
+
size: b,
|
|
189
|
+
minSize: b,
|
|
190
|
+
header: () => /* @__PURE__ */ v("span", {
|
|
190
191
|
className: "ttw:sr-only",
|
|
191
|
-
children:
|
|
192
|
+
children: J.columnAttachment
|
|
192
193
|
}),
|
|
193
|
-
cell: ({ row: e }) => e.original.attachment ? /* @__PURE__ */
|
|
194
|
+
cell: ({ row: e }) => e.original.attachment ? /* @__PURE__ */ v("div", {
|
|
194
195
|
className: "ttw:flex ttw:justify-center",
|
|
195
|
-
"data-testid":
|
|
196
|
-
children: /* @__PURE__ */
|
|
196
|
+
"data-testid": M?.[g.Attachment],
|
|
197
|
+
children: /* @__PURE__ */ v(ie, { children: /* @__PURE__ */ y(ne, { children: [/* @__PURE__ */ v(ae, {
|
|
197
198
|
type: "button",
|
|
198
199
|
className: "ttw:inline-flex ttw:cursor-default",
|
|
199
200
|
"aria-label": e.original.attachment.label,
|
|
200
201
|
onClick: (e) => e.stopPropagation(),
|
|
201
|
-
children: /* @__PURE__ */
|
|
202
|
-
}), /* @__PURE__ */
|
|
202
|
+
children: /* @__PURE__ */ v(ve, { className: "ttw:size-3.5 ttw:shrink-0 ttw:text-muted-foreground" })
|
|
203
|
+
}), /* @__PURE__ */ v(re, { children: e.original.attachment.label })] }) })
|
|
203
204
|
}) : null
|
|
204
205
|
},
|
|
205
|
-
[
|
|
206
|
+
[g.IssueDate]: {
|
|
206
207
|
accessorKey: "issueDateLabel",
|
|
207
|
-
enableSorting:
|
|
208
|
-
header: e(
|
|
209
|
-
cell: t("issueDateLabel",
|
|
208
|
+
enableSorting: j,
|
|
209
|
+
header: e(J.columnIssueDate),
|
|
210
|
+
cell: t("issueDateLabel", g.IssueDate)
|
|
210
211
|
},
|
|
211
|
-
[
|
|
212
|
+
[g.DueDate]: {
|
|
212
213
|
accessorKey: "dueDateLabel",
|
|
213
|
-
enableSorting:
|
|
214
|
-
header: e(
|
|
214
|
+
enableSorting: j,
|
|
215
|
+
header: e(J.columnDueDate),
|
|
215
216
|
cell: i
|
|
216
217
|
},
|
|
217
|
-
[
|
|
218
|
+
[g.ScheduledDate]: {
|
|
218
219
|
accessorKey: "scheduledDateLabel",
|
|
219
|
-
enableSorting:
|
|
220
|
-
header: e(
|
|
220
|
+
enableSorting: j,
|
|
221
|
+
header: e(J.columnScheduledDate),
|
|
221
222
|
cell: s
|
|
222
223
|
},
|
|
223
|
-
[
|
|
224
|
+
[g.PaidDate]: {
|
|
224
225
|
accessorKey: "paidDateLabel",
|
|
225
226
|
enableSorting: !1,
|
|
226
|
-
header:
|
|
227
|
-
cell: t("paidDateLabel",
|
|
227
|
+
header: J.columnPaidDate,
|
|
228
|
+
cell: t("paidDateLabel", g.PaidDate)
|
|
228
229
|
},
|
|
229
|
-
[
|
|
230
|
+
[g.Status]: {
|
|
230
231
|
accessorKey: "status",
|
|
231
232
|
enableSorting: !1,
|
|
232
|
-
header:
|
|
233
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
233
|
+
header: J.columnStatus,
|
|
234
|
+
cell: ({ row: e }) => /* @__PURE__ */ v("div", {
|
|
234
235
|
className: "ttw:flex ttw:items-center ttw:gap-1",
|
|
235
|
-
"data-testid":
|
|
236
|
-
children: /* @__PURE__ */
|
|
236
|
+
"data-testid": M?.[g.Status],
|
|
237
|
+
children: /* @__PURE__ */ v(se, {
|
|
237
238
|
status: e.original.status,
|
|
238
239
|
tone: e.original.statusTone,
|
|
239
|
-
labels:
|
|
240
|
+
labels: J.statusBadge
|
|
240
241
|
})
|
|
241
242
|
})
|
|
242
243
|
},
|
|
243
|
-
[
|
|
244
|
+
[g.AmountDue]: {
|
|
244
245
|
accessorKey: "amountDueLabel",
|
|
245
246
|
enableSorting: !1,
|
|
246
|
-
header: c(
|
|
247
|
-
cell: a("amountDueLabel",
|
|
247
|
+
header: c(J.columnAmountDue),
|
|
248
|
+
cell: a("amountDueLabel", g.AmountDue)
|
|
248
249
|
},
|
|
249
|
-
[
|
|
250
|
+
[g.AmountScheduled]: {
|
|
250
251
|
accessorKey: "amountScheduledLabel",
|
|
251
252
|
enableSorting: !1,
|
|
252
|
-
header: c(
|
|
253
|
-
cell: a("amountScheduledLabel",
|
|
253
|
+
header: c(J.columnAmountScheduled),
|
|
254
|
+
cell: a("amountScheduledLabel", g.AmountScheduled)
|
|
254
255
|
},
|
|
255
|
-
[
|
|
256
|
+
[g.AmountPaid]: {
|
|
256
257
|
accessorKey: "amountPaidLabel",
|
|
257
258
|
enableSorting: !1,
|
|
258
|
-
header: c(
|
|
259
|
-
cell: a("amountPaidLabel",
|
|
259
|
+
header: c(J.columnAmountPaid),
|
|
260
|
+
cell: a("amountPaidLabel", g.AmountPaid, o, "amountPaidIsGap")
|
|
260
261
|
},
|
|
261
|
-
[
|
|
262
|
+
[g.TotalAmount]: {
|
|
262
263
|
accessorKey: "totalAmountLabel",
|
|
263
264
|
enableSorting: !1,
|
|
264
|
-
header: c(
|
|
265
|
-
cell: a("totalAmountLabel",
|
|
265
|
+
header: c(J.columnTotalAmount),
|
|
266
|
+
cell: a("totalAmountLabel", g.TotalAmount)
|
|
266
267
|
},
|
|
267
|
-
[
|
|
268
|
+
[g.AddedOn]: {
|
|
268
269
|
accessorKey: "addedOnLabel",
|
|
269
|
-
enableSorting:
|
|
270
|
-
header: e(
|
|
271
|
-
cell: t("addedOnLabel",
|
|
270
|
+
enableSorting: j,
|
|
271
|
+
header: e(J.columnAddedOn),
|
|
272
|
+
cell: t("addedOnLabel", g.AddedOn)
|
|
272
273
|
}
|
|
273
274
|
};
|
|
274
275
|
}, [
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
]), Ke =
|
|
276
|
+
J,
|
|
277
|
+
M,
|
|
278
|
+
j
|
|
279
|
+
]), Ke = _(() => [...(A ? k : Te.filter((e) => k.includes(e))).map((e) => Ge[e]), ...Y ? [{
|
|
279
280
|
id: "actions",
|
|
280
281
|
enableSorting: !1,
|
|
281
282
|
size: we,
|
|
282
|
-
header: () => /* @__PURE__ */
|
|
283
|
+
header: () => /* @__PURE__ */ v("span", {
|
|
283
284
|
className: "ttw:sr-only",
|
|
284
|
-
children:
|
|
285
|
+
children: J.columnActions
|
|
285
286
|
}),
|
|
286
|
-
cell: ({ row: e }) => e.original.menu?.items.length ? /* @__PURE__ */
|
|
287
|
+
cell: ({ row: e }) => e.original.menu?.items.length ? /* @__PURE__ */ v("div", {
|
|
287
288
|
className: "ttw:flex ttw:justify-end",
|
|
288
|
-
children: /* @__PURE__ */
|
|
289
|
+
children: /* @__PURE__ */ v(le, {
|
|
289
290
|
actions: e.original.menu.items.map((e) => ({
|
|
290
291
|
...e,
|
|
291
292
|
variant: "ghost"
|
|
@@ -296,175 +297,167 @@ function C({ rows: C, isLoading: w, isError: T, sorting: Ee, onSortingChange: De
|
|
|
296
297
|
}) : null
|
|
297
298
|
}] : []], [
|
|
298
299
|
Ge,
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
]), qe = !!(
|
|
300
|
+
Y,
|
|
301
|
+
A,
|
|
302
|
+
J,
|
|
303
|
+
k
|
|
304
|
+
]), qe = !!(F && R) && !Ee && !De && !N && S.length === 0 && Re === !0, Q = F ? /* @__PURE__ */ v(e, {
|
|
305
|
+
onClick: F,
|
|
306
|
+
children: J.createButton
|
|
307
|
+
}) : null, $ = /* @__PURE__ */ y("div", {
|
|
304
308
|
className: "ttw:relative ttw:w-80",
|
|
305
|
-
children: [/* @__PURE__ */
|
|
309
|
+
children: [/* @__PURE__ */ v(ye, { className: "ttw:pointer-events-none ttw:absolute ttw:left-3 ttw:top-1/2 ttw:size-4 ttw:-translate-y-1/2 ttw:text-muted-foreground" }), /* @__PURE__ */ v(i, {
|
|
306
310
|
className: "ttw:pl-9",
|
|
307
311
|
type: "search",
|
|
308
|
-
"aria-label":
|
|
309
|
-
placeholder:
|
|
310
|
-
value:
|
|
311
|
-
onChange: (e) =>
|
|
312
|
+
"aria-label": J.searchLabel,
|
|
313
|
+
placeholder: J.searchPlaceholder,
|
|
314
|
+
value: Ie,
|
|
315
|
+
onChange: (e) => Le(e.target.value)
|
|
312
316
|
})]
|
|
313
|
-
}), Je =
|
|
314
|
-
...
|
|
317
|
+
}), Je = O ? /* @__PURE__ */ v(pe, {
|
|
318
|
+
...O,
|
|
315
319
|
className: "ttw:px-4",
|
|
316
320
|
searchSlot: $
|
|
317
|
-
}) : /* @__PURE__ */
|
|
321
|
+
}) : /* @__PURE__ */ v("div", {
|
|
318
322
|
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2 ttw:px-4",
|
|
319
323
|
children: $
|
|
320
324
|
});
|
|
321
|
-
return /* @__PURE__ */
|
|
325
|
+
return /* @__PURE__ */ y("div", {
|
|
322
326
|
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
323
|
-
children: [
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
className: "ttw:flex ttw:flex-
|
|
339
|
-
children: [/* @__PURE__ */
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
className:
|
|
352
|
-
children:
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
maxFiles: H,
|
|
385
|
-
uploadStatus: W,
|
|
386
|
-
uploadErrorMessage: G,
|
|
387
|
-
onEnterManually: U ?? R,
|
|
388
|
-
labels: X.addBill
|
|
389
|
-
}) : /* @__PURE__ */ b(p, {
|
|
390
|
-
onFilesSelected: V,
|
|
391
|
-
accept: _,
|
|
392
|
-
maxFiles: H,
|
|
393
|
-
uploadStatus: W,
|
|
394
|
-
uploadErrorMessage: G,
|
|
395
|
-
onEnterManually: U ?? R,
|
|
396
|
-
labels: X.addBill
|
|
397
|
-
})
|
|
398
|
-
}) : /* @__PURE__ */ x("div", {
|
|
399
|
-
className: "ttw:relative",
|
|
400
|
-
onDragEnter: Ve,
|
|
401
|
-
onDragOver: He,
|
|
402
|
-
onDragLeave: Ue,
|
|
403
|
-
onDrop: We,
|
|
404
|
-
children: [/* @__PURE__ */ b(n, {
|
|
405
|
-
columns: Ke,
|
|
406
|
-
data: C,
|
|
407
|
-
getRowId: (e) => e.rowKey,
|
|
408
|
-
animatesNewRows: !0,
|
|
409
|
-
isLoading: w,
|
|
410
|
-
sorting: Ee,
|
|
411
|
-
onSortingChange: De,
|
|
412
|
-
pageSize: Oe,
|
|
413
|
-
onPageSizeChange: ke,
|
|
414
|
-
pageSizeOptions: E,
|
|
415
|
-
showPagination: E.length > 1 || D || O,
|
|
416
|
-
pageInfo: Ae,
|
|
417
|
-
hasNextPage: D,
|
|
418
|
-
hasPrevPage: O,
|
|
419
|
-
onNextPage: je,
|
|
420
|
-
onPrevPage: Me,
|
|
421
|
-
onRowClick: (e) => e.onOpen(),
|
|
422
|
-
rowAriaLabel: (e) => X.openRow(e.vendorLabel || Se(e.vendorLookup, X)),
|
|
423
|
-
rowGroup: (e) => e.group ? {
|
|
424
|
-
key: e.group.key,
|
|
425
|
-
label: e.group.label,
|
|
426
|
-
tone: "warning",
|
|
427
|
-
icon: /* @__PURE__ */ b(ae, {}),
|
|
428
|
-
title: e.group.title,
|
|
429
|
-
meta: e.group.meta,
|
|
430
|
-
collapse: e.group.collapse
|
|
431
|
-
} : void 0,
|
|
432
|
-
rowContextMenu: (e) => e.menu?.items.length ? /* @__PURE__ */ b(me, { children: e.menu.items.map((e) => {
|
|
433
|
-
let n = e.icon;
|
|
434
|
-
return /* @__PURE__ */ x(t, {
|
|
435
|
-
disabled: e.disabled,
|
|
436
|
-
onClick: e.onSelect,
|
|
437
|
-
children: [n ? /* @__PURE__ */ b(n, { className: "ttw:size-4" }) : null, e.label]
|
|
438
|
-
}, e.id);
|
|
439
|
-
}) }) : void 0,
|
|
440
|
-
filterComponent: Je,
|
|
441
|
-
children: I ? /* @__PURE__ */ b(f, {
|
|
442
|
-
title: X.filteredEmptyTitle,
|
|
443
|
-
description: X.filteredEmptyDescription
|
|
444
|
-
}) : L ? /* @__PURE__ */ b(f, {
|
|
445
|
-
title: L.title,
|
|
446
|
-
description: L.description
|
|
447
|
-
}) : void 0
|
|
448
|
-
}), ze ? /* @__PURE__ */ b("div", {
|
|
449
|
-
className: "ttw:pointer-events-none ttw:absolute ttw:inset-0 ttw:z-20 ttw:flex ttw:items-center ttw:justify-center ttw:rounded-xl ttw:border-2 ttw:border-dashed ttw:border-primary ttw:bg-background/85 ttw:backdrop-blur-[1px]",
|
|
450
|
-
children: /* @__PURE__ */ x("div", {
|
|
451
|
-
className: "ttw:flex ttw:items-center ttw:gap-3 ttw:rounded-lg ttw:border ttw:bg-card ttw:px-4 ttw:py-3 ttw:shadow-sm",
|
|
452
|
-
children: [/* @__PURE__ */ b(ye, { className: "ttw:size-5 ttw:text-muted-foreground" }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
453
|
-
className: "ttw:text-sm ttw:font-medium",
|
|
454
|
-
children: X.tableDropzoneTitle
|
|
455
|
-
}), /* @__PURE__ */ b("p", {
|
|
456
|
-
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
457
|
-
children: H === void 0 ? X.addBill.dropzone.fileTypesHint : `${X.addBill.dropzone.fileTypesHint} · ${X.addBill.dropzone.fileCountHint(H)}`
|
|
458
|
-
})] })]
|
|
327
|
+
children: [
|
|
328
|
+
K ? /* @__PURE__ */ v(ce, {
|
|
329
|
+
message: K,
|
|
330
|
+
children: q ? /* @__PURE__ */ v(e, {
|
|
331
|
+
type: "button",
|
|
332
|
+
variant: "outline",
|
|
333
|
+
size: "sm",
|
|
334
|
+
className: "ttw:bg-background ttw:text-foreground ttw:hover:bg-muted",
|
|
335
|
+
onClick: q.onReview,
|
|
336
|
+
children: q.reviewLabel
|
|
337
|
+
}) : null
|
|
338
|
+
}) : null,
|
|
339
|
+
/* @__PURE__ */ y(o, {
|
|
340
|
+
value: D,
|
|
341
|
+
onValueChange: Fe,
|
|
342
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
343
|
+
children: [/* @__PURE__ */ y("div", {
|
|
344
|
+
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-3",
|
|
345
|
+
children: [/* @__PURE__ */ v(c, {
|
|
346
|
+
variant: "pills",
|
|
347
|
+
"aria-label": J.filterTabsLabel,
|
|
348
|
+
children: E.map((e) => /* @__PURE__ */ y(me, { children: [e.startsGroup ? /* @__PURE__ */ v(a, {
|
|
349
|
+
orientation: "vertical",
|
|
350
|
+
className: "ttw:mx-1 ttw:data-[orientation=vertical]:h-4"
|
|
351
|
+
}) : null, /* @__PURE__ */ v(te, {
|
|
352
|
+
value: e.id,
|
|
353
|
+
count: e.badge,
|
|
354
|
+
countTone: e.tone,
|
|
355
|
+
className: "ttw:min-w-28",
|
|
356
|
+
children: /* @__PURE__ */ v("span", {
|
|
357
|
+
className: e.tone === "warning" ? "ttw:text-warning-foreground" : void 0,
|
|
358
|
+
children: e.label
|
|
359
|
+
})
|
|
360
|
+
})] }, e.id))
|
|
361
|
+
}), I === void 0 ? Q : null]
|
|
362
|
+
}), (() => {
|
|
363
|
+
let e = De ? /* @__PURE__ */ v(oe, {
|
|
364
|
+
title: J.errorTitle,
|
|
365
|
+
description: J.errorDescription,
|
|
366
|
+
retryLabel: L ? J.errorRetry : void 0,
|
|
367
|
+
onRetry: L
|
|
368
|
+
}) : qe && F && R ? /* @__PURE__ */ v("div", {
|
|
369
|
+
className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card",
|
|
370
|
+
children: U && W ? /* @__PURE__ */ v(d, {
|
|
371
|
+
emailAddress: U,
|
|
372
|
+
onCopyEmail: W,
|
|
373
|
+
onFilesSelected: R,
|
|
374
|
+
accept: h,
|
|
375
|
+
maxFiles: z,
|
|
376
|
+
uploadStatus: V,
|
|
377
|
+
uploadErrorMessage: H,
|
|
378
|
+
onEnterManually: B ?? F,
|
|
379
|
+
labels: J.addBill
|
|
380
|
+
}) : /* @__PURE__ */ v(d, {
|
|
381
|
+
onFilesSelected: R,
|
|
382
|
+
accept: h,
|
|
383
|
+
maxFiles: z,
|
|
384
|
+
uploadStatus: V,
|
|
385
|
+
uploadErrorMessage: H,
|
|
386
|
+
onEnterManually: B ?? F,
|
|
387
|
+
labels: J.addBill
|
|
459
388
|
})
|
|
460
|
-
}) :
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
389
|
+
}) : /* @__PURE__ */ y("div", {
|
|
390
|
+
className: "ttw:relative",
|
|
391
|
+
onDragEnter: Ve,
|
|
392
|
+
onDragOver: He,
|
|
393
|
+
onDragLeave: Ue,
|
|
394
|
+
onDrop: We,
|
|
395
|
+
children: [/* @__PURE__ */ v(n, {
|
|
396
|
+
columns: Ke,
|
|
397
|
+
data: S,
|
|
398
|
+
getRowId: (e) => e.rowKey,
|
|
399
|
+
animatesNewRows: !0,
|
|
400
|
+
isLoading: Ee,
|
|
401
|
+
sorting: Oe,
|
|
402
|
+
onSortingChange: ke,
|
|
403
|
+
pageSize: Ae,
|
|
404
|
+
onPageSizeChange: je,
|
|
405
|
+
pageSizeOptions: C,
|
|
406
|
+
showPagination: C.length > 1 || w || T,
|
|
407
|
+
pageInfo: Me,
|
|
408
|
+
hasNextPage: w,
|
|
409
|
+
hasPrevPage: T,
|
|
410
|
+
onNextPage: Ne,
|
|
411
|
+
onPrevPage: Pe,
|
|
412
|
+
onRowClick: (e) => e.onOpen(),
|
|
413
|
+
rowAriaLabel: (e) => J.openRow(e.vendorLabel || Ce(e.vendorLookup, J)),
|
|
414
|
+
rowGroup: (e) => e.group ? {
|
|
415
|
+
key: e.group.key,
|
|
416
|
+
label: e.group.label,
|
|
417
|
+
tone: "warning",
|
|
418
|
+
icon: /* @__PURE__ */ v(u, {}),
|
|
419
|
+
title: e.group.title,
|
|
420
|
+
meta: e.group.meta,
|
|
421
|
+
collapse: e.group.collapse
|
|
422
|
+
} : void 0,
|
|
423
|
+
rowContextMenu: (e) => e.menu?.items.length ? /* @__PURE__ */ v(_e, { children: e.menu.items.map((e) => {
|
|
424
|
+
let n = e.icon;
|
|
425
|
+
return /* @__PURE__ */ y(t, {
|
|
426
|
+
disabled: e.disabled,
|
|
427
|
+
onClick: e.onSelect,
|
|
428
|
+
children: [n ? /* @__PURE__ */ v(n, { className: "ttw:size-4" }) : null, e.label]
|
|
429
|
+
}, e.id);
|
|
430
|
+
}) }) : void 0,
|
|
431
|
+
filterComponent: Je,
|
|
432
|
+
children: N ? /* @__PURE__ */ v(l, {
|
|
433
|
+
title: J.filteredEmptyTitle,
|
|
434
|
+
description: J.filteredEmptyDescription
|
|
435
|
+
}) : P ? /* @__PURE__ */ v(l, {
|
|
436
|
+
title: P.title,
|
|
437
|
+
description: P.description
|
|
438
|
+
}) : void 0
|
|
439
|
+
}), ze ? /* @__PURE__ */ v("div", {
|
|
440
|
+
className: "ttw:pointer-events-none ttw:absolute ttw:inset-0 ttw:z-20 ttw:flex ttw:items-center ttw:justify-center ttw:rounded-xl ttw:border-2 ttw:border-dashed ttw:border-primary ttw:bg-background/85 ttw:backdrop-blur-[1px]",
|
|
441
|
+
children: /* @__PURE__ */ y("div", {
|
|
442
|
+
className: "ttw:flex ttw:items-center ttw:gap-3 ttw:rounded-lg ttw:border ttw:bg-card ttw:px-4 ttw:py-3 ttw:shadow-sm",
|
|
443
|
+
children: [/* @__PURE__ */ v(be, { className: "ttw:size-5 ttw:text-muted-foreground" }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
444
|
+
className: "ttw:text-sm ttw:font-medium",
|
|
445
|
+
children: J.tableDropzoneTitle
|
|
446
|
+
}), /* @__PURE__ */ v("p", {
|
|
447
|
+
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
448
|
+
children: z === void 0 ? J.addBill.dropzone.fileTypesHint : `${J.addBill.dropzone.fileTypesHint} · ${J.addBill.dropzone.fileCountHint(z)}`
|
|
449
|
+
})] })]
|
|
450
|
+
})
|
|
451
|
+
}) : null]
|
|
452
|
+
});
|
|
453
|
+
return E.map((t) => /* @__PURE__ */ v(s, {
|
|
454
|
+
value: t.id,
|
|
455
|
+
children: t.id === D ? e : null
|
|
456
|
+
}, t.id));
|
|
457
|
+
})()]
|
|
458
|
+
}),
|
|
459
|
+
I && Q ? ge(Q, I) : null
|
|
460
|
+
]
|
|
468
461
|
});
|
|
469
462
|
}
|
|
470
|
-
export {
|
|
463
|
+
export { S as BillsScreen, S as default, x as DEFAULT_BILL_COLUMNS };
|
|
@@ -29,67 +29,75 @@ var C = {
|
|
|
29
29
|
Bills: "bills",
|
|
30
30
|
Vendors: "vendors"
|
|
31
31
|
}, w = [C.Bills, C.Vendors];
|
|
32
|
-
function T(
|
|
33
|
-
|
|
32
|
+
function T(e) {
|
|
33
|
+
return w.includes(e);
|
|
34
|
+
}
|
|
35
|
+
function E({ labels: a, initialTab: l = C.Bills, selectedTab: E, onTabChange: D, initialView: O, poweredByBankName: k, onSettingsClick: A }) {
|
|
36
|
+
let j = i();
|
|
34
37
|
g(() => {
|
|
35
|
-
|
|
36
|
-
}, [
|
|
37
|
-
let
|
|
38
|
-
|
|
39
|
-
}, []), z
|
|
40
|
-
|
|
41
|
-
}, []), W =
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
j(c.Mounted);
|
|
39
|
+
}, [j]);
|
|
40
|
+
let M = _(() => e(p, a), [a]), { initResponse: N } = o(), P = t(N?.scopes, [n.PayableReadOrg]), F = t(N?.scopes, [n.PayableWriteOrg]), I = t(N?.scopes, [n.ApprovalPolicyWriteOrg]) && t(N?.scopes, [n.PayableWriteOrg]) && t(N?.scopes, [n.RoleReadOrg]) && t(N?.scopes, [n.UserReadOrg]), [ee, te] = y(l), L = E ?? ee, R = h((e) => {
|
|
41
|
+
T(e) && (te(e), D?.(e));
|
|
42
|
+
}, [D]), [z, B] = y(null), [V, H] = y(), U = h((e) => {
|
|
43
|
+
R(C.Bills), H(e);
|
|
44
|
+
}, [R]), W = v(null), G = h((e) => W.current?.enqueue(e), []), [K, q] = y(), J = h((e) => {
|
|
45
|
+
R(C.Bills), q(e);
|
|
46
|
+
}, [R]), Y = s(), [X, Z] = y(O === "create"), [ne, Q] = y(!1);
|
|
47
|
+
X && N && !Y && (Z(!1), F && L === C.Bills && Q(!0));
|
|
48
|
+
let $ = [{
|
|
44
49
|
id: C.Bills,
|
|
45
|
-
label:
|
|
50
|
+
label: M.tabs.bills,
|
|
46
51
|
content: /* @__PURE__ */ x(f, {
|
|
47
|
-
labels:
|
|
48
|
-
onEnqueueFiles:
|
|
49
|
-
openPayableId:
|
|
50
|
-
onOpenPayableHandled: () =>
|
|
51
|
-
vendorIntent:
|
|
52
|
-
onVendorIntentHandled: () =>
|
|
53
|
-
openAddBill:
|
|
54
|
-
onOpenAddBillHandled: () =>
|
|
55
|
-
poweredByBankName:
|
|
56
|
-
|
|
52
|
+
labels: M,
|
|
53
|
+
onEnqueueFiles: G,
|
|
54
|
+
openPayableId: V,
|
|
55
|
+
onOpenPayableHandled: () => H(void 0),
|
|
56
|
+
vendorIntent: K,
|
|
57
|
+
onVendorIntentHandled: () => q(void 0),
|
|
58
|
+
openAddBill: ne,
|
|
59
|
+
onOpenAddBillHandled: () => Q(!1),
|
|
60
|
+
poweredByBankName: k,
|
|
61
|
+
headerActionContainer: z
|
|
57
62
|
})
|
|
58
63
|
}, {
|
|
59
64
|
id: C.Vendors,
|
|
60
|
-
label:
|
|
65
|
+
label: M.tabs.vendors,
|
|
61
66
|
content: /* @__PURE__ */ x(m, {
|
|
62
|
-
...
|
|
67
|
+
...M.vendors,
|
|
63
68
|
counterpartType: "vendor",
|
|
64
69
|
passThrough: !0,
|
|
65
|
-
|
|
70
|
+
headerActionContainer: z,
|
|
71
|
+
onViewAllDocuments: P ? (e) => J({
|
|
66
72
|
vendorId: e.id,
|
|
67
73
|
vendorName: e.name,
|
|
68
74
|
action: "viewBills"
|
|
69
75
|
}) : void 0,
|
|
70
|
-
onCreateDocument:
|
|
76
|
+
onCreateDocument: F ? (e) => J({
|
|
71
77
|
vendorId: e.id,
|
|
72
78
|
vendorName: e.name,
|
|
73
79
|
action: "createBill"
|
|
74
80
|
}) : void 0
|
|
75
81
|
})
|
|
76
|
-
}],
|
|
82
|
+
}], re = $.some((e) => e.id === L) ? L : w.find((e) => $.some((t) => t.id === e)) ?? $[0]?.id ?? "";
|
|
77
83
|
return /* @__PURE__ */ S(b, { children: [
|
|
78
84
|
/* @__PURE__ */ x(r, {}),
|
|
79
85
|
/* @__PURE__ */ x(u, {
|
|
80
|
-
labels:
|
|
81
|
-
tabs:
|
|
82
|
-
selectedTabId:
|
|
83
|
-
onTabChange:
|
|
86
|
+
labels: M.widget,
|
|
87
|
+
tabs: $,
|
|
88
|
+
selectedTabId: re,
|
|
89
|
+
onTabChange: R,
|
|
90
|
+
onSettingsClick: A && I ? A : void 0,
|
|
91
|
+
actionContainerRef: B
|
|
84
92
|
}),
|
|
85
93
|
/* @__PURE__ */ x(d, {
|
|
86
|
-
ref:
|
|
87
|
-
onOpenBill:
|
|
88
|
-
labels:
|
|
94
|
+
ref: W,
|
|
95
|
+
onOpenBill: U,
|
|
96
|
+
labels: M.billUpload
|
|
89
97
|
})
|
|
90
98
|
] });
|
|
91
99
|
}
|
|
92
|
-
function
|
|
100
|
+
function D({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: o, uiFramework: s, errorFallback: c, onError: u, analytics: d, disclosuresAcceptance: f, providerLabels: p, ...m }) {
|
|
93
101
|
return /* @__PURE__ */ x(a, {
|
|
94
102
|
widgetName: l,
|
|
95
103
|
baseUrl: e,
|
|
@@ -104,8 +112,8 @@ function E({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gat
|
|
|
104
112
|
analytics: d,
|
|
105
113
|
disclosuresAcceptance: f,
|
|
106
114
|
providerLabels: p,
|
|
107
|
-
children: /* @__PURE__ */ x(
|
|
115
|
+
children: /* @__PURE__ */ x(E, { ...m })
|
|
108
116
|
});
|
|
109
117
|
}
|
|
110
|
-
var
|
|
111
|
-
export {
|
|
118
|
+
var O = D;
|
|
119
|
+
export { O as BillPayWidget, O as default, D as BillPayWidgetWithLabels };
|
|
@@ -18,7 +18,7 @@ import "../../../../pay-bill/feature/dist/index.js";
|
|
|
18
18
|
import { useCallback as c, useEffect as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
19
19
|
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
20
20
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillsTab.js
|
|
21
|
-
function h({ labels: h, onEnqueueFiles: g, openPayableId: _, onOpenPayableHandled: v, vendorIntent: y, onVendorIntentHandled: b, openAddBill: x, onOpenAddBillHandled: S, poweredByBankName: C,
|
|
21
|
+
function h({ labels: h, onEnqueueFiles: g, openPayableId: _, onOpenPayableHandled: v, vendorIntent: y, onVendorIntentHandled: b, openAddBill: x, onOpenAddBillHandled: S, poweredByBankName: C, headerActionContainer: w }) {
|
|
22
22
|
let T = d(null), [E, D] = f(), [O, k] = f(), [A, j] = f(!1), [M, N] = f(), [P, F] = f(!1), [I, L] = f(!1), [R, z] = f(null), B = !R || {
|
|
23
23
|
create: A,
|
|
24
24
|
details: P,
|
|
@@ -88,7 +88,7 @@ function h({ labels: h, onEnqueueFiles: g, openPayableId: _, onOpenPayableHandle
|
|
|
88
88
|
onEnterManually: () => X(),
|
|
89
89
|
onFilesSelected: g,
|
|
90
90
|
maxFiles: 10,
|
|
91
|
-
|
|
91
|
+
headerActionContainer: w
|
|
92
92
|
}),
|
|
93
93
|
A ? /* @__PURE__ */ p(a, {
|
|
94
94
|
open: A,
|
|
@@ -2,34 +2,57 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import { DEFAULT_LABELS as
|
|
7
|
-
import { jsx as
|
|
5
|
+
import { Button as e, Tabs as t, TabsContent as n, TabsList as r, TabsTrigger as i, Tooltip as a, TooltipContent as o, TooltipProvider as s, TooltipTrigger as c } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { DEFAULT_LABELS as l } from "./index13.js";
|
|
7
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
8
|
+
import { SettingsIcon as f } from "lucide-react";
|
|
8
9
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js
|
|
9
|
-
function
|
|
10
|
-
let
|
|
11
|
-
...
|
|
12
|
-
...
|
|
10
|
+
function p({ labels: p, tabs: m, selectedTabId: h, onTabChange: g, onSettingsClick: _, actionContainerRef: v }) {
|
|
11
|
+
let y = {
|
|
12
|
+
...l,
|
|
13
|
+
...p
|
|
13
14
|
};
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ d("section", {
|
|
15
16
|
className: "ttw:w-full ttw:space-y-5",
|
|
16
|
-
children: [
|
|
17
|
+
children: [y.description ? /* @__PURE__ */ u("div", {
|
|
17
18
|
className: "ttw:min-w-0",
|
|
18
|
-
children: /* @__PURE__ */
|
|
19
|
+
children: /* @__PURE__ */ u("p", {
|
|
19
20
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
20
|
-
children:
|
|
21
|
+
children: y.description
|
|
21
22
|
})
|
|
22
|
-
}) : null, /* @__PURE__ */
|
|
23
|
-
value:
|
|
24
|
-
onValueChange:
|
|
23
|
+
}) : null, /* @__PURE__ */ d(t, {
|
|
24
|
+
value: h,
|
|
25
|
+
onValueChange: g,
|
|
25
26
|
className: "ttw:w-full",
|
|
26
|
-
children: [/* @__PURE__ */
|
|
27
|
-
|
|
28
|
-
children:
|
|
29
|
-
|
|
30
|
-
children: e
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
children: [/* @__PURE__ */ d("div", {
|
|
28
|
+
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
|
|
29
|
+
children: [/* @__PURE__ */ u(r, {
|
|
30
|
+
variant: "underline",
|
|
31
|
+
children: m.map((e) => /* @__PURE__ */ u(i, {
|
|
32
|
+
value: e.id,
|
|
33
|
+
children: e.label
|
|
34
|
+
}, e.id))
|
|
35
|
+
}), /* @__PURE__ */ d("div", {
|
|
36
|
+
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
37
|
+
children: [_ ? /* @__PURE__ */ u(s, { children: /* @__PURE__ */ d(a, { children: [/* @__PURE__ */ u(c, {
|
|
38
|
+
asChild: !0,
|
|
39
|
+
children: /* @__PURE__ */ u(e, {
|
|
40
|
+
type: "button",
|
|
41
|
+
variant: "ghost",
|
|
42
|
+
size: "icon",
|
|
43
|
+
"aria-label": y.settingsButton,
|
|
44
|
+
onClick: _,
|
|
45
|
+
children: /* @__PURE__ */ u(f, {
|
|
46
|
+
className: "ttw:size-4",
|
|
47
|
+
"aria-hidden": !0
|
|
48
|
+
})
|
|
49
|
+
})
|
|
50
|
+
}), /* @__PURE__ */ u(o, { children: y.settingsButton })] }) }) : null, /* @__PURE__ */ u("div", {
|
|
51
|
+
ref: v,
|
|
52
|
+
className: "ttw:contents"
|
|
53
|
+
})]
|
|
54
|
+
})]
|
|
55
|
+
}), m.map((e) => /* @__PURE__ */ u(n, {
|
|
33
56
|
value: e.id,
|
|
34
57
|
className: "ttw:mt-6",
|
|
35
58
|
children: e.content
|
|
@@ -37,4 +60,4 @@ function s({ labels: s, tabs: c, selectedTabId: l, onTabChange: u }) {
|
|
|
37
60
|
})]
|
|
38
61
|
});
|
|
39
62
|
}
|
|
40
|
-
export {
|
|
63
|
+
export { p as BillPayWidgetUi };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.11.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.11.170", n = "075a74c980bed26321ce609b4d91631931fb7898", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|