@tesouro/embedded-components-react 0.11.169 → 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 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 | Default | Description |
497
- | ------------------- | ---------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
498
- | `initialTab` | `'bills' \| 'vendors'` | `'bills'` | Tab to open on initial mount. |
499
- | `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 `initialTab` is `'vendors'`. |
500
- | `poweredByBankName` | `string` | `undefined` | Bank shown as "Powered by {bank}" next to the source account when paying a bill. Omit it to hide the badge. |
501
- | `onSettingsClick` | `() => void` | `undefined` | Opens your bill pay settings surface from a cog beside the bill list's "Add bill" button. The cog renders only when this is supplied and the user's scopes reach that surface. |
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 beside the Bills
6378
- * tab's "Add bill" button. Only rendered for a user whose scopes reach it.
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 beside the Bills
620
- * tab's "Add bill" button. Only rendered for a user whose scopes reach it.
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, onSettingsClick: pe, ref: me }) {
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
- onSettingsClick: pe,
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,
@@ -18,7 +18,6 @@ var o = ".pdf,.png,.jpg,.jpeg,.doc,.docx", s = {
18
18
  }
19
19
  }, c = {
20
20
  createButton: "Add bill",
21
- settingsButton: "Bill pay settings",
22
21
  columnVendor: "Vendor",
23
22
  columnInvoiceNumber: "Invoice number",
24
23
  columnAttachment: "Attachment",
@@ -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 l, TooltipProvider as u, TooltipTrigger as d } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { EmptyState as f } from "../../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
3
- import { ErrorState as re } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
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 ie } from "../../../../shared/document-status/ui/dist/index4.js";
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 ae } from "../../../ui/dist/index6.js";
8
- import { BillDuplicateWarning as oe } from "../../../ui/dist/index8.js";
9
- import { BillOverflowMenu as se } from "../../../ui/dist/index11.js";
10
- import { getAcceptedBillUploadFiles as ce } from "../../../ui/dist/index17.js";
11
- import { DateDisclosure as le } from "../../../ui/dist/index20.js";
12
- import { DueDateValue as ue } from "../../../ui/dist/index22.js";
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 p } from "./index3.js";
14
+ import { AddBillPanel as d } from "./index3.js";
15
15
  import "./index4.js";
16
- import { BillsFilterBar as de } from "./index10.js";
16
+ import { BillsFilterBar as pe } from "./index10.js";
17
17
  import "./index11.js";
18
- import { MissingValue as m } from "./index13.js";
18
+ import { MissingValue as f } from "./index13.js";
19
19
  import "./index14.js";
20
- import { NoValue as h } from "./index16.js";
20
+ import { NoValue as p } from "./index16.js";
21
21
  import "./index17.js";
22
- import { BILLS_SCREEN_LABELS_EN as g, BILLS_SCREEN_UPLOAD_ACCEPT as _ } from "./index18.js";
23
- import { BillColumn as v } from "./index19.js";
24
- import { Fragment as fe, useMemo as y, useState as pe } from "react";
25
- import { Fragment as me, jsx as b, jsxs as x } from "react/jsx-runtime";
26
- import { PaperclipIcon as he, PlusIcon as ge, SearchIcon as _e, SettingsIcon as ve, UploadIcon as ye } from "lucide-react";
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 be = [
29
+ var xe = [
29
30
  10,
30
31
  25,
31
32
  50,
32
33
  100
33
- ], xe = 240;
34
- function Se(e, t) {
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 Ce = 40, we = 56, Te = [
38
- v.Vendor,
39
- v.InvoiceNumber,
40
- v.Attachment,
41
- v.IssueDate,
42
- v.DueDate,
43
- v.ScheduledDate,
44
- v.PaidDate,
45
- v.Status,
46
- v.AmountDue,
47
- v.AmountScheduled,
48
- v.AmountPaid,
49
- v.TotalAmount,
50
- v.AddedOn
51
- ], S = [
52
- v.Vendor,
53
- v.Attachment,
54
- v.DueDate,
55
- v.Status,
56
- v.AmountDue,
57
- v.AddedOn
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 C({ rows: C, isLoading: w, isError: T, sorting: Ee, onSortingChange: De, pageSize: Oe, onPageSizeChange: ke, pageSizeOptions: E = be, pageInfo: Ae, hasNextPage: D, hasPrevPage: O, onNextPage: je, onPrevPage: Me, filterTabs: k, selectedFilterTabId: A, onFilterTabChange: Ne, searchValue: Pe, onSearchChange: Fe, filters: j, visibleColumns: M = S, keepsColumnOrder: N = !1, isSortable: P = !0, cellTestIds: F, isSearchActive: I, showAddPanelWhenEmpty: Ie, emptyState: L, onCreateClick: R, onSettingsClick: z, onRetry: B, onFilesSelected: V, maxFiles: H, onEnterManually: U, uploadStatus: W, uploadErrorMessage: G, emailAddress: K, onCopyEmail: q, labels: J, duplicateWarning: Le, duplicateReviewControl: Y }) {
60
- let X = y(() => ({
61
- ...g,
62
- ...J,
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
- ...g.statusBadge,
65
- ...J?.statusBadge
65
+ ...m.statusBadge,
66
+ ...G?.statusBadge
66
67
  },
67
68
  addBill: {
68
- ...g.addBill,
69
- ...J?.addBill,
69
+ ...m.addBill,
70
+ ...G?.addBill,
70
71
  dropzone: {
71
- ...g.addBill.dropzone,
72
- ...J?.addBill?.dropzone
72
+ ...m.addBill.dropzone,
73
+ ...G?.addBill?.dropzone
73
74
  }
74
75
  },
75
76
  sortableHeader: {
76
- ...g.sortableHeader,
77
- ...J?.sortableHeader
77
+ ...m.sortableHeader,
78
+ ...G?.sortableHeader
78
79
  },
79
80
  missingValue: {
80
- ...g.missingValue,
81
- ...J?.missingValue
81
+ ...m.missingValue,
82
+ ...G?.missingValue
82
83
  },
83
84
  noValue: {
84
- ...g.noValue,
85
- ...J?.noValue
85
+ ...m.noValue,
86
+ ...G?.noValue
86
87
  },
87
88
  dueDate: {
88
- ...g.dueDate,
89
- ...J?.dueDate
89
+ ...m.dueDate,
90
+ ...G?.dueDate
90
91
  }
91
- }), [J]), Re = C.some((e) => e.menu?.items.length), [ze, Z] = pe(!1), Q = !!V, Be = (e) => Array.from(e.dataTransfer.types).includes("Files"), Ve = (e) => {
92
- Q && Be(e) && (e.preventDefault(), Z(!0));
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
- Q && Be(e) && (e.preventDefault(), e.dataTransfer.dropEffect = "copy", Z(!0));
95
+ Z && Be(e) && (e.preventDefault(), e.dataTransfer.dropEffect = "copy", X(!0));
95
96
  }, Ue = (e) => {
96
- !e.currentTarget.contains(e.relatedTarget) && Q && Z(!1);
97
+ !e.currentTarget.contains(e.relatedTarget) && Z && X(!1);
97
98
  }, We = (e) => {
98
- if (!Q) return;
99
- e.preventDefault(), Z(!1);
100
- let t = e.dataTransfer.files ? Array.from(e.dataTransfer.files) : [], n = ce(t, _, H !== 1);
101
- n.length && V?.(n);
102
- }, Ge = y(() => {
103
- let e = (e) => P ? function({ column: t }) {
104
- return /* @__PURE__ */ b(r, {
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: X.sortableHeader
108
+ labels: J.sortableHeader
108
109
  });
109
- } : e, t = (e, t, n = /* @__PURE__ */ b(m, { labels: X.missingValue }), r) => function({ row: i }) {
110
- let a = r && i.original[r] ? /* @__PURE__ */ b(m, { labels: X.missingValue }) : n;
111
- return /* @__PURE__ */ b("span", {
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": F?.[t],
114
+ "data-testid": M?.[t],
114
115
  children: i.original[e] || a
115
116
  });
116
- }, n = t("invoiceNumberLabel", v.InvoiceNumber), i = function({ row: e }) {
117
- return /* @__PURE__ */ b("span", {
117
+ }, n = t("invoiceNumberLabel", g.InvoiceNumber), i = function({ row: e }) {
118
+ return /* @__PURE__ */ v("span", {
118
119
  className: "ttw:whitespace-nowrap",
119
- "data-testid": F?.[v.DueDate],
120
- children: /* @__PURE__ */ b(ue, {
121
- value: e.original.dueDateLabel || /* @__PURE__ */ b(m, { labels: X.missingValue }),
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: X.dueDate
124
+ labels: J.dueDate
124
125
  })
125
126
  });
126
- }, a = (e, t, n = /* @__PURE__ */ b(m, { labels: X.missingValue }), r) => function({ row: i }) {
127
- let a = r && i.original[r] ? /* @__PURE__ */ b(m, { labels: X.missingValue }) : n;
128
- return /* @__PURE__ */ b("div", {
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": F?.[t],
131
+ "data-testid": M?.[t],
131
132
  children: i.original[e] || a
132
133
  });
133
- }, o = /* @__PURE__ */ b(h, { labels: X.noValue });
134
+ }, o = /* @__PURE__ */ v(p, { labels: J.noValue });
134
135
  function s({ row: e }) {
135
- let t = e.original.scheduledDateIsGap ? /* @__PURE__ */ b(m, { labels: X.missingValue }) : o, n = e.original.scheduledDateLabel, r = e.original.scheduledDateExact;
136
- return /* @__PURE__ */ b("span", {
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": F?.[v.ScheduledDate],
139
- children: n && r ? /* @__PURE__ */ b(le, {
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__ */ b("div", {
147
+ return /* @__PURE__ */ v("div", {
147
148
  className: "ttw:text-right",
148
149
  children: e
149
150
  });
150
151
  };
151
152
  return {
152
- [v.Vendor]: {
153
+ [g.Vendor]: {
153
154
  accessorKey: "vendorLabel",
154
- enableSorting: P,
155
- minSize: xe,
156
- header: e(X.columnVendor),
155
+ enableSorting: j,
156
+ minSize: Se,
157
+ header: e(J.columnVendor),
157
158
  cell: ({ row: e }) => {
158
- let t = e.original.rowNote ? /* @__PURE__ */ b("span", {
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__ */ x("div", {
163
- "data-testid": F?.[v.Vendor],
164
- children: [/* @__PURE__ */ b(ee, {
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__ */ x("span", {
169
+ }) : /* @__PURE__ */ y("span", {
169
170
  className: "ttw:inline-flex ttw:items-center ttw:gap-2",
170
- "data-testid": F?.[v.Vendor],
171
- children: [e.original.vendorLabel || (e.original.vendorLookup === "unavailable" ? /* @__PURE__ */ b(h, { labels: { none: X.vendorUnavailable } }) : /* @__PURE__ */ b(m, { labels: X.missingValue })), t]
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
- [v.InvoiceNumber]: {
176
+ [g.InvoiceNumber]: {
176
177
  accessorKey: "invoiceNumberLabel",
177
178
  enableSorting: !1,
178
- header: () => X.columnInvoiceNumber,
179
- cell: (e) => e.row.original.marker === "duplicate" ? /* @__PURE__ */ x("span", {
179
+ header: () => J.columnInvoiceNumber,
180
+ cell: (e) => e.row.original.marker === "duplicate" ? /* @__PURE__ */ y("span", {
180
181
  className: "ttw:relative",
181
- children: [/* @__PURE__ */ b(ae, { className: "ttw:absolute ttw:top-1/2 ttw:right-full ttw:mr-1 ttw:-translate-y-1/2 ttw:text-warning" }), n(e)]
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
- [v.Attachment]: {
185
+ [g.Attachment]: {
185
186
  accessorKey: "attachment",
186
187
  enableSorting: !1,
187
- size: Ce,
188
- minSize: Ce,
189
- header: () => /* @__PURE__ */ b("span", {
188
+ size: b,
189
+ minSize: b,
190
+ header: () => /* @__PURE__ */ v("span", {
190
191
  className: "ttw:sr-only",
191
- children: X.columnAttachment
192
+ children: J.columnAttachment
192
193
  }),
193
- cell: ({ row: e }) => e.original.attachment ? /* @__PURE__ */ b("div", {
194
+ cell: ({ row: e }) => e.original.attachment ? /* @__PURE__ */ v("div", {
194
195
  className: "ttw:flex ttw:justify-center",
195
- "data-testid": F?.[v.Attachment],
196
- children: /* @__PURE__ */ b(u, { children: /* @__PURE__ */ x(ne, { children: [/* @__PURE__ */ b(d, {
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__ */ b(he, { className: "ttw:size-3.5 ttw:shrink-0 ttw:text-muted-foreground" })
202
- }), /* @__PURE__ */ b(l, { children: e.original.attachment.label })] }) })
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
- [v.IssueDate]: {
206
+ [g.IssueDate]: {
206
207
  accessorKey: "issueDateLabel",
207
- enableSorting: P,
208
- header: e(X.columnIssueDate),
209
- cell: t("issueDateLabel", v.IssueDate)
208
+ enableSorting: j,
209
+ header: e(J.columnIssueDate),
210
+ cell: t("issueDateLabel", g.IssueDate)
210
211
  },
211
- [v.DueDate]: {
212
+ [g.DueDate]: {
212
213
  accessorKey: "dueDateLabel",
213
- enableSorting: P,
214
- header: e(X.columnDueDate),
214
+ enableSorting: j,
215
+ header: e(J.columnDueDate),
215
216
  cell: i
216
217
  },
217
- [v.ScheduledDate]: {
218
+ [g.ScheduledDate]: {
218
219
  accessorKey: "scheduledDateLabel",
219
- enableSorting: P,
220
- header: e(X.columnScheduledDate),
220
+ enableSorting: j,
221
+ header: e(J.columnScheduledDate),
221
222
  cell: s
222
223
  },
223
- [v.PaidDate]: {
224
+ [g.PaidDate]: {
224
225
  accessorKey: "paidDateLabel",
225
226
  enableSorting: !1,
226
- header: X.columnPaidDate,
227
- cell: t("paidDateLabel", v.PaidDate)
227
+ header: J.columnPaidDate,
228
+ cell: t("paidDateLabel", g.PaidDate)
228
229
  },
229
- [v.Status]: {
230
+ [g.Status]: {
230
231
  accessorKey: "status",
231
232
  enableSorting: !1,
232
- header: X.columnStatus,
233
- cell: ({ row: e }) => /* @__PURE__ */ b("div", {
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": F?.[v.Status],
236
- children: /* @__PURE__ */ b(ie, {
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: X.statusBadge
240
+ labels: J.statusBadge
240
241
  })
241
242
  })
242
243
  },
243
- [v.AmountDue]: {
244
+ [g.AmountDue]: {
244
245
  accessorKey: "amountDueLabel",
245
246
  enableSorting: !1,
246
- header: c(X.columnAmountDue),
247
- cell: a("amountDueLabel", v.AmountDue)
247
+ header: c(J.columnAmountDue),
248
+ cell: a("amountDueLabel", g.AmountDue)
248
249
  },
249
- [v.AmountScheduled]: {
250
+ [g.AmountScheduled]: {
250
251
  accessorKey: "amountScheduledLabel",
251
252
  enableSorting: !1,
252
- header: c(X.columnAmountScheduled),
253
- cell: a("amountScheduledLabel", v.AmountScheduled)
253
+ header: c(J.columnAmountScheduled),
254
+ cell: a("amountScheduledLabel", g.AmountScheduled)
254
255
  },
255
- [v.AmountPaid]: {
256
+ [g.AmountPaid]: {
256
257
  accessorKey: "amountPaidLabel",
257
258
  enableSorting: !1,
258
- header: c(X.columnAmountPaid),
259
- cell: a("amountPaidLabel", v.AmountPaid, o, "amountPaidIsGap")
259
+ header: c(J.columnAmountPaid),
260
+ cell: a("amountPaidLabel", g.AmountPaid, o, "amountPaidIsGap")
260
261
  },
261
- [v.TotalAmount]: {
262
+ [g.TotalAmount]: {
262
263
  accessorKey: "totalAmountLabel",
263
264
  enableSorting: !1,
264
- header: c(X.columnTotalAmount),
265
- cell: a("totalAmountLabel", v.TotalAmount)
265
+ header: c(J.columnTotalAmount),
266
+ cell: a("totalAmountLabel", g.TotalAmount)
266
267
  },
267
- [v.AddedOn]: {
268
+ [g.AddedOn]: {
268
269
  accessorKey: "addedOnLabel",
269
- enableSorting: P,
270
- header: e(X.columnAddedOn),
271
- cell: t("addedOnLabel", v.AddedOn)
270
+ enableSorting: j,
271
+ header: e(J.columnAddedOn),
272
+ cell: t("addedOnLabel", g.AddedOn)
272
273
  }
273
274
  };
274
275
  }, [
275
- X,
276
- F,
277
- P
278
- ]), Ke = y(() => [...(N ? M : Te.filter((e) => M.includes(e))).map((e) => Ge[e]), ...Re ? [{
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__ */ b("span", {
283
+ header: () => /* @__PURE__ */ v("span", {
283
284
  className: "ttw:sr-only",
284
- children: X.columnActions
285
+ children: J.columnActions
285
286
  }),
286
- cell: ({ row: e }) => e.original.menu?.items.length ? /* @__PURE__ */ b("div", {
287
+ cell: ({ row: e }) => e.original.menu?.items.length ? /* @__PURE__ */ v("div", {
287
288
  className: "ttw:flex ttw:justify-end",
288
- children: /* @__PURE__ */ b(se, {
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
- Re,
300
- N,
301
- X,
302
- M
303
- ]), qe = !!(R && V) && !w && !T && !I && C.length === 0 && Ie === !0, $ = /* @__PURE__ */ x("div", {
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__ */ b(_e, { 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__ */ b(i, {
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": X.searchLabel,
309
- placeholder: X.searchPlaceholder,
310
- value: Pe,
311
- onChange: (e) => Fe(e.target.value)
312
+ "aria-label": J.searchLabel,
313
+ placeholder: J.searchPlaceholder,
314
+ value: Ie,
315
+ onChange: (e) => Le(e.target.value)
312
316
  })]
313
- }), Je = j ? /* @__PURE__ */ b(de, {
314
- ...j,
317
+ }), Je = O ? /* @__PURE__ */ v(pe, {
318
+ ...O,
315
319
  className: "ttw:px-4",
316
320
  searchSlot: $
317
- }) : /* @__PURE__ */ b("div", {
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__ */ x("div", {
325
+ return /* @__PURE__ */ y("div", {
322
326
  className: "ttw:flex ttw:flex-col ttw:gap-3",
323
- children: [Le ? /* @__PURE__ */ b(oe, {
324
- message: Le,
325
- children: Y ? /* @__PURE__ */ b(e, {
326
- type: "button",
327
- variant: "outline",
328
- size: "sm",
329
- className: "ttw:bg-background ttw:text-foreground ttw:hover:bg-muted",
330
- onClick: Y.onReview,
331
- children: Y.reviewLabel
332
- }) : null
333
- }) : null, /* @__PURE__ */ x(o, {
334
- value: A,
335
- onValueChange: Ne,
336
- className: "ttw:flex ttw:flex-col ttw:gap-4",
337
- children: [/* @__PURE__ */ x("div", {
338
- className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-3",
339
- children: [/* @__PURE__ */ b(c, {
340
- variant: "pills",
341
- "aria-label": X.filterTabsLabel,
342
- children: k.map((e) => /* @__PURE__ */ x(fe, { children: [e.startsGroup ? /* @__PURE__ */ b(a, {
343
- orientation: "vertical",
344
- className: "ttw:mx-1 ttw:data-[orientation=vertical]:h-4"
345
- }) : null, /* @__PURE__ */ b(te, {
346
- value: e.id,
347
- count: e.badge,
348
- countTone: e.tone,
349
- className: "ttw:min-w-28",
350
- children: /* @__PURE__ */ b("span", {
351
- className: e.tone === "warning" ? "ttw:text-warning-foreground" : void 0,
352
- children: e.label
353
- })
354
- })] }, e.id))
355
- }), /* @__PURE__ */ x("div", {
356
- className: "ttw:flex ttw:items-center ttw:gap-2",
357
- children: [z ? /* @__PURE__ */ b(u, { children: /* @__PURE__ */ x(ne, { children: [/* @__PURE__ */ b(d, {
358
- asChild: !0,
359
- children: /* @__PURE__ */ b(e, {
360
- variant: "outline",
361
- size: "icon",
362
- "aria-label": X.settingsButton,
363
- onClick: z,
364
- children: /* @__PURE__ */ b(ve, { className: "ttw:size-4" })
365
- })
366
- }), /* @__PURE__ */ b(l, { children: X.settingsButton })] }) }) : null, R ? /* @__PURE__ */ x(e, {
367
- onClick: R,
368
- children: [/* @__PURE__ */ b(ge, { className: "ttw:size-4" }), X.createButton]
369
- }) : null]
370
- })]
371
- }), (() => {
372
- let e = T ? /* @__PURE__ */ b(re, {
373
- title: X.errorTitle,
374
- description: X.errorDescription,
375
- retryLabel: B ? X.errorRetry : void 0,
376
- onRetry: B
377
- }) : qe && R && V ? /* @__PURE__ */ b("div", {
378
- className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card",
379
- children: K && q ? /* @__PURE__ */ b(p, {
380
- emailAddress: K,
381
- onCopyEmail: q,
382
- onFilesSelected: V,
383
- accept: _,
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
- }) : null]
461
- });
462
- return k.map((t) => /* @__PURE__ */ b(s, {
463
- value: t.id,
464
- children: t.id === A ? e : null
465
- }, t.id));
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 { C as BillsScreen, C as default, S as DEFAULT_BILL_COLUMNS };
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({ labels: a, initialTab: l = C.Bills, initialView: T, poweredByBankName: E, onSettingsClick: D }) {
33
- let O = i();
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
- O(c.Mounted);
36
- }, [O]);
37
- let k = _(() => e(p, a), [a]), { initResponse: A } = o(), j = t(A?.scopes, [n.PayableReadOrg]), M = t(A?.scopes, [n.PayableWriteOrg]), N = t(A?.scopes, [n.ApprovalPolicyWriteOrg]) && t(A?.scopes, [n.PayableWriteOrg]) && t(A?.scopes, [n.RoleReadOrg]) && t(A?.scopes, [n.UserReadOrg]), [P, F] = y(l), [I, L] = y(), R = h((e) => {
38
- F(C.Bills), L(e);
39
- }, []), z = v(null), B = h((e) => z.current?.enqueue(e), []), [V, H] = y(), U = h((e) => {
40
- F(C.Bills), H(e);
41
- }, []), W = s(), [G, K] = y(T === "create"), [q, J] = y(!1);
42
- G && A && !W && (K(!1), M && P === C.Bills && J(!0));
43
- let Y = [{
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: k.tabs.bills,
50
+ label: M.tabs.bills,
46
51
  content: /* @__PURE__ */ x(f, {
47
- labels: k,
48
- onEnqueueFiles: B,
49
- openPayableId: I,
50
- onOpenPayableHandled: () => L(void 0),
51
- vendorIntent: V,
52
- onVendorIntentHandled: () => H(void 0),
53
- openAddBill: q,
54
- onOpenAddBillHandled: () => J(!1),
55
- poweredByBankName: E,
56
- onSettingsClick: D && N ? D : void 0
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: k.tabs.vendors,
65
+ label: M.tabs.vendors,
61
66
  content: /* @__PURE__ */ x(m, {
62
- ...k.vendors,
67
+ ...M.vendors,
63
68
  counterpartType: "vendor",
64
69
  passThrough: !0,
65
- onViewAllDocuments: j ? (e) => U({
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: M ? (e) => U({
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
- }], X = Y.some((e) => e.id === P) ? P : w.find((e) => Y.some((t) => t.id === e)) ?? Y[0]?.id ?? "";
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: k.widget,
81
- tabs: Y,
82
- selectedTabId: X,
83
- onTabChange: F
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: z,
87
- onOpenBill: R,
88
- labels: k.billUpload
94
+ ref: W,
95
+ onOpenBill: U,
96
+ labels: M.billUpload
89
97
  })
90
98
  ] });
91
99
  }
92
- function E({ 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 }) {
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(T, { ...m })
115
+ children: /* @__PURE__ */ x(E, { ...m })
108
116
  });
109
117
  }
110
- var D = E;
111
- export { D as BillPayWidget, D as default, E as BillPayWidgetWithLabels };
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, onSettingsClick: w }) {
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
- onSettingsClick: w
91
+ headerActionContainer: w
92
92
  }),
93
93
  A ? /* @__PURE__ */ p(a, {
94
94
  open: A,
@@ -1,3 +1,3 @@
1
1
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js
2
- var e = {};
2
+ var e = { settingsButton: "Bill pay settings" };
3
3
  export { e as DEFAULT_LABELS };
@@ -2,34 +2,57 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { Tabs as e, TabsContent as t, TabsList as n, TabsTrigger as r } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
- import { DEFAULT_LABELS as i } from "./index13.js";
7
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
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 s({ labels: s, tabs: c, selectedTabId: l, onTabChange: u }) {
10
- let d = {
11
- ...i,
12
- ...s
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__ */ o("section", {
15
+ return /* @__PURE__ */ d("section", {
15
16
  className: "ttw:w-full ttw:space-y-5",
16
- children: [d.description ? /* @__PURE__ */ a("div", {
17
+ children: [y.description ? /* @__PURE__ */ u("div", {
17
18
  className: "ttw:min-w-0",
18
- children: /* @__PURE__ */ a("p", {
19
+ children: /* @__PURE__ */ u("p", {
19
20
  className: "ttw:text-sm ttw:text-muted-foreground",
20
- children: d.description
21
+ children: y.description
21
22
  })
22
- }) : null, /* @__PURE__ */ o(e, {
23
- value: l,
24
- onValueChange: u,
23
+ }) : null, /* @__PURE__ */ d(t, {
24
+ value: h,
25
+ onValueChange: g,
25
26
  className: "ttw:w-full",
26
- children: [/* @__PURE__ */ a(n, {
27
- variant: "underline",
28
- children: c.map((e) => /* @__PURE__ */ a(r, {
29
- value: e.id,
30
- children: e.label
31
- }, e.id))
32
- }), c.map((e) => /* @__PURE__ */ a(t, {
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 { s as BillPayWidgetUi };
63
+ export { p as BillPayWidgetUi };
@@ -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.169", n = "19ef31da0ca040e8075dd7e84fb79819d6734304", r = Object.freeze({
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.11.169",
3
+ "version": "0.11.170",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": [