@tesouro/embedded-components-react 0.7.22 → 0.7.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/index.css +0 -3
  2. package/dist/index.d.ts +20 -20
  3. package/dist/lib/CounterpartsWidget.d.ts +10 -2
  4. package/dist/lib/CounterpartsWidgetPublic.d.ts +10 -2
  5. package/dist/lib/CustomersWidget.d.ts +19 -19
  6. package/dist/lib/ExpenseManagementWidget.d.ts +1 -1
  7. package/dist/lib/ReceivablesWidget.d.ts +9 -1
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartDetailsContainer.js +1 -1
  10. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartsWidget.js +50 -51
  11. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js +4 -2
  12. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index4.js +72 -128
  15. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index5.js +183 -38
  16. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index6.js +503 -193
  17. package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/lib/CustomersWidget/CustomersWidget.js +33 -18
  18. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +57 -55
  19. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +14 -14
  20. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +114 -102
  21. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js +12 -11
  22. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index10.js +534 -7
  23. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js +7 -179
  24. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index12.js +179 -6
  25. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index13.js +3 -1
  26. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index14.js +4 -28
  27. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index15.js +28 -4
  28. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index16.js +4 -0
  29. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +10 -2
  30. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index7.js +140 -55
  31. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index8.js +53 -47
  32. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index9.js +51 -539
  33. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  34. package/package.json +1 -1
  35. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index7.js +0 -520
  36. package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/lib/CustomersWidgetMonite/CustomersWidgetMonite.js +0 -45
  37. package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/lib/CustomersWidgetNative/CustomersWidgetNative.js +0 -42
  38. package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/index.js +0 -4
  39. package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteRegionProvider.js +0 -21
  40. package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteWrapper.js +0 -134
  41. package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/RefreshingMoniteWidgetProvider.js +0 -7
package/dist/index.css CHANGED
@@ -6629,9 +6629,6 @@
6629
6629
  .ttw\:\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open] > svg {
6630
6630
  rotate: 180deg;
6631
6631
  }
6632
- .dark .ttw\:\[\.dark_\&\]\:bg-background {
6633
- background-color: var(--ttw-background);
6634
- }
6635
6632
  @media (resolution>192dpi) {
6636
6633
  .ttw\:\[\@media\(resolution\>192dpi\)\]\:min-h-\[1828px\] {
6637
6634
  min-height: 1828px;
package/dist/index.d.ts CHANGED
@@ -3332,7 +3332,7 @@ type ExpenseManagementWidgetProps = WidgetProviderProps & ExpenseManagementWidge
3332
3332
  * the unmatched-receipts Action Item), and an Upload Receipts entry
3333
3333
  * point — composed from `ExpensesScreen` rather than a monolithic UI
3334
3334
  * component, following the `WidgetProvider` "Feature Component Pattern" the
3335
- * same way `CustomersWidgetNative` does. Uses no Monite provider.
3335
+ * same way `CustomersWidget` does. Uses no Monite provider.
3336
3336
  *
3337
3337
  * Team tab visibility matches legacy: `ExpenseReadOrg`, or a direct-reports
3338
3338
  * probe for people-managers without org-wide read. The Team list, its count
@@ -4361,7 +4361,12 @@ interface CounterpartFormSheetLabels {
4361
4361
  titleLabel: string;
4362
4362
  emailLabel: string;
4363
4363
  phoneLabel: string;
4364
+ /** Used by the inline fields; the sheet prefers the SSN/EIN keys and falls back to this. */
4364
4365
  taxIdLabel: string;
4366
+ taxIdSsnLabel: string;
4367
+ taxIdEinLabel: string;
4368
+ taxIdSsnPlaceholder: string;
4369
+ taxIdEinPlaceholder: string;
4365
4370
  customerTaxIdHelp: string;
4366
4371
  vendorTaxIdHelp: string;
4367
4372
  paymentRemindersLabel: string;
@@ -4382,7 +4387,10 @@ interface CounterpartFormSheetLabels {
4382
4387
  accountNumberLabel?: string;
4383
4388
  addAddress: string;
4384
4389
  cancelButton: string;
4385
- createButton: string;
4390
+ /** @deprecated Superseded by `createButtonCustomer` / `createButtonVendor`. */
4391
+ createButton?: string;
4392
+ createButtonCustomer: string;
4393
+ createButtonVendor: string;
4386
4394
  saveButton: string;
4387
4395
  address: AddressFieldGroupLabels;
4388
4396
  ach: AchFieldGroupLabels;
@@ -4749,7 +4757,7 @@ declare const BillPayWidget: (props: BillPayWidgetProps) => ReactElement;
4749
4757
  *
4750
4758
  * The workspace-internal component additionally accepts a `passThrough` prop
4751
4759
  * that tells it to give up its own analytics identity when a composing widget
4752
- * (`CustomersWidgetNative`, `BillPayWidget`'s Vendors tab) mounts it to
4760
+ * (`CustomersWidget`, `BillPayWidget`'s Vendors tab) mounts it to
4753
4761
  * inherit the host's identity instead (EMBD-5384). That choice is set **only**
4754
4762
  * by those composing widgets, never by integrators: an integrator's own
4755
4763
  * standalone mount must always claim its own identity.
@@ -4764,9 +4772,8 @@ declare const BillPayWidget: (props: BillPayWidgetProps) => ReactElement;
4764
4772
  declare function CounterpartsWidget(props: CounterpartsWidgetProps): ReactNode;
4765
4773
 
4766
4774
  /**
4767
- * Own props shared by both implementations. Named after
4768
- * {@link CounterpartsWidgetOwnProps} (this widget's native implementation is a
4769
- * thin `counterpartType="customer"` wrapper around `CounterpartsWidget`) minus
4775
+ * Named after {@link CounterpartsWidgetOwnProps} (this widget is a thin
4776
+ * `counterpartType="customer"` wrapper around `CounterpartsWidget`) minus
4770
4777
  * `counterpartType` itself, which this widget hardcodes.
4771
4778
  */
4772
4779
  interface CustomersWidgetOwnProps {
@@ -4789,24 +4796,17 @@ interface CustomersWidgetOwnProps {
4789
4796
  /** Overrides for validation / error / delete-prompt messages. */
4790
4797
  messageLabels?: Partial<CounterpartMessageLabels>;
4791
4798
  }
4799
+
4792
4800
  /** Public props for {@link CustomersWidget}. */
4793
4801
  type CustomersWidgetProps = WidgetProviderProps & CustomersWidgetOwnProps;
4794
-
4795
4802
  /**
4796
- * Customers widget entry point — selects the rendering implementation.
4797
- *
4798
- * The native implementation (a thin `counterpartType="customer"` wrapper around the
4799
- * published `CounterpartsWidget`) is already at parity, so this simply
4800
- * inherits the package-wide `native` default. An explicit selection is still
4801
- * honored, whether from this widget's `implementation` prop or from the
4802
- * provider/global cascade (`RootWidgetProvider implementation="monite"`,
4803
- * `setGlobalWidgetConfig`) — for a host that has not yet moved off Monite.
4804
- *
4805
- * `onViewAllDocuments` / `onCreateDocument` receive a `CounterpartActionTarget`
4806
- * (`{ id, name }`) under native. Under `monite`, `name` is always empty — the
4807
- * Monite SDK's own callbacks only carry the id.
4803
+ * A customer is a counterpart, so the published `CounterpartsWidget` already
4804
+ * is this surface end to end (list, details, create/edit, delete) via
4805
+ * `counterpartType`. Reused rather than rebuilt, the same way `BillPayWidget`
4806
+ * reuses it for its Vendors tab. There is no Monite build any more, so
4807
+ * `implementation` only cascades to descendants and changes nothing here.
4808
4808
  */
4809
- declare function CustomersWidget({ implementation, onViewAllDocuments, onCreateDocument, ...rest }: CustomersWidgetProps): React.JSX.Element;
4809
+ declare function CustomersWidget({ pageSizeOptions, onViewAllDocuments, onCreateDocument, screenLabels, formLabels, detailsLabels, addressLabels, deleteLabels, messageLabels, ...widgetProviderProps }: CustomersWidgetProps): React.JSX.Element;
4810
4810
 
4811
4811
  interface MarketingWidgetLabels {
4812
4812
  applyNow: string;
@@ -704,7 +704,12 @@ interface CounterpartFormSheetLabels {
704
704
  titleLabel: string;
705
705
  emailLabel: string;
706
706
  phoneLabel: string;
707
+ /** Used by the inline fields; the sheet prefers the SSN/EIN keys and falls back to this. */
707
708
  taxIdLabel: string;
709
+ taxIdSsnLabel: string;
710
+ taxIdEinLabel: string;
711
+ taxIdSsnPlaceholder: string;
712
+ taxIdEinPlaceholder: string;
708
713
  customerTaxIdHelp: string;
709
714
  vendorTaxIdHelp: string;
710
715
  paymentRemindersLabel: string;
@@ -725,7 +730,10 @@ interface CounterpartFormSheetLabels {
725
730
  accountNumberLabel?: string;
726
731
  addAddress: string;
727
732
  cancelButton: string;
728
- createButton: string;
733
+ /** @deprecated Superseded by `createButtonCustomer` / `createButtonVendor`. */
734
+ createButton?: string;
735
+ createButtonCustomer: string;
736
+ createButtonVendor: string;
729
737
  saveButton: string;
730
738
  address: AddressFieldGroupLabels;
731
739
  ach: AchFieldGroupLabels;
@@ -1004,7 +1012,7 @@ type CounterpartsWidgetProps = WidgetProviderProps & CounterpartsWidgetOwnProps;
1004
1012
  *
1005
1013
  * The workspace-internal component additionally accepts a `passThrough` prop
1006
1014
  * that tells it to give up its own analytics identity when a composing widget
1007
- * (`CustomersWidgetNative`, `BillPayWidget`'s Vendors tab) mounts it to
1015
+ * (`CustomersWidget`, `BillPayWidget`'s Vendors tab) mounts it to
1008
1016
  * inherit the host's identity instead (EMBD-5384). That choice is set **only**
1009
1017
  * by those composing widgets, never by integrators: an integrator's own
1010
1018
  * standalone mount must always claim its own identity.
@@ -704,7 +704,12 @@ interface CounterpartFormSheetLabels {
704
704
  titleLabel: string;
705
705
  emailLabel: string;
706
706
  phoneLabel: string;
707
+ /** Used by the inline fields; the sheet prefers the SSN/EIN keys and falls back to this. */
707
708
  taxIdLabel: string;
709
+ taxIdSsnLabel: string;
710
+ taxIdEinLabel: string;
711
+ taxIdSsnPlaceholder: string;
712
+ taxIdEinPlaceholder: string;
708
713
  customerTaxIdHelp: string;
709
714
  vendorTaxIdHelp: string;
710
715
  paymentRemindersLabel: string;
@@ -725,7 +730,10 @@ interface CounterpartFormSheetLabels {
725
730
  accountNumberLabel?: string;
726
731
  addAddress: string;
727
732
  cancelButton: string;
728
- createButton: string;
733
+ /** @deprecated Superseded by `createButtonCustomer` / `createButtonVendor`. */
734
+ createButton?: string;
735
+ createButtonCustomer: string;
736
+ createButtonVendor: string;
729
737
  saveButton: string;
730
738
  address: AddressFieldGroupLabels;
731
739
  ach: AchFieldGroupLabels;
@@ -1004,7 +1012,7 @@ type CounterpartsWidgetProps = WidgetProviderProps & CounterpartsWidgetOwnProps;
1004
1012
  *
1005
1013
  * The workspace-internal component additionally accepts a `passThrough` prop
1006
1014
  * that tells it to give up its own analytics identity when a composing widget
1007
- * (`CustomersWidgetNative`, `BillPayWidget`'s Vendors tab) mounts it to
1015
+ * (`CustomersWidget`, `BillPayWidget`'s Vendors tab) mounts it to
1008
1016
  * inherit the host's identity instead (EMBD-5384). That choice is set **only**
1009
1017
  * by those composing widgets, never by integrators: an integrator's own
1010
1018
  * standalone mount must always claim its own identity.
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { ComponentType, AnchorHTMLAttributes, ReactNode, ErrorInfo } from 'react';
3
- import { PartialDeep } from 'type-fest';
4
3
  import { FallbackProps } from 'react-error-boundary';
4
+ import { PartialDeep } from 'type-fest';
5
5
 
6
6
  type AuthToken = string | undefined;
7
7
  interface Auth {
@@ -705,7 +705,12 @@ interface CounterpartFormSheetLabels {
705
705
  titleLabel: string;
706
706
  emailLabel: string;
707
707
  phoneLabel: string;
708
+ /** Used by the inline fields; the sheet prefers the SSN/EIN keys and falls back to this. */
708
709
  taxIdLabel: string;
710
+ taxIdSsnLabel: string;
711
+ taxIdEinLabel: string;
712
+ taxIdSsnPlaceholder: string;
713
+ taxIdEinPlaceholder: string;
709
714
  customerTaxIdHelp: string;
710
715
  vendorTaxIdHelp: string;
711
716
  paymentRemindersLabel: string;
@@ -726,7 +731,10 @@ interface CounterpartFormSheetLabels {
726
731
  accountNumberLabel?: string;
727
732
  addAddress: string;
728
733
  cancelButton: string;
729
- createButton: string;
734
+ /** @deprecated Superseded by `createButtonCustomer` / `createButtonVendor`. */
735
+ createButton?: string;
736
+ createButtonCustomer: string;
737
+ createButtonVendor: string;
730
738
  saveButton: string;
731
739
  address: AddressFieldGroupLabels;
732
740
  ach: AchFieldGroupLabels;
@@ -951,9 +959,8 @@ interface CounterpartActionTarget {
951
959
  }
952
960
 
953
961
  /**
954
- * Own props shared by both implementations. Named after
955
- * {@link CounterpartsWidgetOwnProps} (this widget's native implementation is a
956
- * thin `counterpartType="customer"` wrapper around `CounterpartsWidget`) minus
962
+ * Named after {@link CounterpartsWidgetOwnProps} (this widget is a thin
963
+ * `counterpartType="customer"` wrapper around `CounterpartsWidget`) minus
957
964
  * `counterpartType` itself, which this widget hardcodes.
958
965
  */
959
966
  interface CustomersWidgetOwnProps {
@@ -976,24 +983,17 @@ interface CustomersWidgetOwnProps {
976
983
  /** Overrides for validation / error / delete-prompt messages. */
977
984
  messageLabels?: Partial<CounterpartMessageLabels>;
978
985
  }
986
+
979
987
  /** Public props for {@link CustomersWidget}. */
980
988
  type CustomersWidgetProps = WidgetProviderProps & CustomersWidgetOwnProps;
981
-
982
989
  /**
983
- * Customers widget entry point — selects the rendering implementation.
984
- *
985
- * The native implementation (a thin `counterpartType="customer"` wrapper around the
986
- * published `CounterpartsWidget`) is already at parity, so this simply
987
- * inherits the package-wide `native` default. An explicit selection is still
988
- * honored, whether from this widget's `implementation` prop or from the
989
- * provider/global cascade (`RootWidgetProvider implementation="monite"`,
990
- * `setGlobalWidgetConfig`) — for a host that has not yet moved off Monite.
991
- *
992
- * `onViewAllDocuments` / `onCreateDocument` receive a `CounterpartActionTarget`
993
- * (`{ id, name }`) under native. Under `monite`, `name` is always empty — the
994
- * Monite SDK's own callbacks only carry the id.
990
+ * A customer is a counterpart, so the published `CounterpartsWidget` already
991
+ * is this surface end to end (list, details, create/edit, delete) via
992
+ * `counterpartType`. Reused rather than rebuilt, the same way `BillPayWidget`
993
+ * reuses it for its Vendors tab. There is no Monite build any more, so
994
+ * `implementation` only cascades to descendants and changes nothing here.
995
995
  */
996
- declare function CustomersWidget({ implementation, onViewAllDocuments, onCreateDocument, ...rest }: CustomersWidgetProps): React.JSX.Element;
996
+ declare function CustomersWidget({ pageSizeOptions, onViewAllDocuments, onCreateDocument, screenLabels, formLabels, detailsLabels, addressLabels, deleteLabels, messageLabels, ...widgetProviderProps }: CustomersWidgetProps): React.JSX.Element;
997
997
 
998
998
  export { CustomersWidget };
999
999
  export type { CounterpartActionTarget, CustomersWidgetOwnProps, CustomersWidgetProps };
@@ -840,7 +840,7 @@ type ExpenseManagementWidgetProps = WidgetProviderProps & ExpenseManagementWidge
840
840
  * the unmatched-receipts Action Item), and an Upload Receipts entry
841
841
  * point — composed from `ExpensesScreen` rather than a monolithic UI
842
842
  * component, following the `WidgetProvider` "Feature Component Pattern" the
843
- * same way `CustomersWidgetNative` does. Uses no Monite provider.
843
+ * same way `CustomersWidget` does. Uses no Monite provider.
844
844
  *
845
845
  * Team tab visibility matches legacy: `ExpenseReadOrg`, or a direct-reports
846
846
  * probe for people-managers without org-wide read. The Team list, its count
@@ -793,7 +793,12 @@ interface CounterpartFormSheetLabels {
793
793
  titleLabel: string;
794
794
  emailLabel: string;
795
795
  phoneLabel: string;
796
+ /** Used by the inline fields; the sheet prefers the SSN/EIN keys and falls back to this. */
796
797
  taxIdLabel: string;
798
+ taxIdSsnLabel: string;
799
+ taxIdEinLabel: string;
800
+ taxIdSsnPlaceholder: string;
801
+ taxIdEinPlaceholder: string;
797
802
  customerTaxIdHelp: string;
798
803
  vendorTaxIdHelp: string;
799
804
  paymentRemindersLabel: string;
@@ -814,7 +819,10 @@ interface CounterpartFormSheetLabels {
814
819
  accountNumberLabel?: string;
815
820
  addAddress: string;
816
821
  cancelButton: string;
817
- createButton: string;
822
+ /** @deprecated Superseded by `createButtonCustomer` / `createButtonVendor`. */
823
+ createButton?: string;
824
+ createButtonCustomer: string;
825
+ createButtonVendor: string;
818
826
  saveButton: string;
819
827
  address: AddressFieldGroupLabels;
820
828
  ach: AchFieldGroupLabels;
@@ -5,7 +5,7 @@
5
5
  import { Button as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
6
  import { getStateOptions as t } from "../../../../shared/util/dist/lib/usStates.js";
7
7
  import { AchFieldGroup as n } from "../../../../shared/counterpart-management/ui/dist/index5.js";
8
- import { CounterpartFormFields as r, countErrors as i, useFocusFirstInvalidField as a } from "../../../../shared/counterpart-management/ui/dist/index9.js";
8
+ import { CounterpartFormFields as r, countErrors as i, useFocusFirstInvalidField as a } from "../../../../shared/counterpart-management/ui/dist/index10.js";
9
9
  import "../../../../shared/counterpart-management/ui/dist/index.js";
10
10
  import { VendorSearchCombobox as o } from "../../ui/dist/index24.js";
11
11
  import "../../ui/dist/index.js";
@@ -7,7 +7,7 @@ import "../../../../../shared/feature/dist/index.js";
7
7
  import { getCounterpartPermissions as t } from "./permissions.js";
8
8
  import { useCounterpartDetailsSheetView as n } from "./useCounterpartDetailsSheetView.js";
9
9
  import { COUNTERPART_DETAILS_SHEET_LABELS_EN as r } from "../../../../ui/dist/index2.js";
10
- import { CounterpartDetailsSheet as i } from "../../../../ui/dist/index7.js";
10
+ import { CounterpartDetailsSheet as i } from "../../../../ui/dist/index6.js";
11
11
  import "../../../../ui/dist/index.js";
12
12
  import { useMemo as a } from "react";
13
13
  import { jsx as o } from "react/jsx-runtime";
@@ -7,32 +7,33 @@ import "../../../../../shared/ui/dist/index.js";
7
7
  import { useAnalyticsTrack as t } from "../../../../../shared/feature/dist/lib/analytics/hooks.js";
8
8
  import { WidgetProvider as n } from "../../../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
9
9
  import "../../../../../shared/feature/dist/index.js";
10
- import { CounterpartFormSheet as r } from "../../../../../shared/counterpart-management/ui/dist/index9.js";
11
- import { BankAccountFormSheet as i } from "../../../../../shared/counterpart-management/ui/dist/index11.js";
12
- import { ConfirmDeleteDialog as a } from "../../../../../shared/counterpart-management/ui/dist/index14.js";
10
+ import { CounterpartFormSheet as r } from "../../../../../shared/counterpart-management/ui/dist/index10.js";
11
+ import { BankAccountFormSheet as i } from "../../../../../shared/counterpart-management/ui/dist/index12.js";
12
+ import { ConfirmDeleteDialog as a } from "../../../../../shared/counterpart-management/ui/dist/index15.js";
13
+ import { buildCounterpartFormTaxIdField as o } from "../../../../../shared/counterpart-management/feature/dist/lib/helpers.js";
13
14
  import "../../../../../shared/counterpart-management/feature/dist/index.js";
14
- import { CounterpartsWidgetAnalyticsEvent as o, WIDGET_NAME as s } from "../analytics/events.js";
15
- import { PAGE_SIZE_OPTIONS as c } from "./constants.js";
16
- import { EDIT_FORM_FIELD_KEYS as l, addressFormLabelOverrides as u, buildCounterpartEditFormView as d, editFormLabelOverrides as f, withAddressLabelOverrides as p } from "./viewModels.js";
17
- import { COUNTERPART_DETAILS_SHEET_LABELS_EN as m } from "../../../../ui/dist/index2.js";
18
- import { CounterpartsScreen as h } from "../../../../ui/dist/index3.js";
19
- import { CounterpartDetailsSheet as g } from "../../../../ui/dist/index7.js";
15
+ import { CounterpartsWidgetAnalyticsEvent as s, WIDGET_NAME as c } from "../analytics/events.js";
16
+ import { PAGE_SIZE_OPTIONS as l } from "./constants.js";
17
+ import { EDIT_FORM_FIELD_KEYS as u, addressFormLabelOverrides as d, buildCounterpartEditFormView as f, editFormLabelOverrides as p, withAddressLabelOverrides as m } from "./viewModels.js";
18
+ import { COUNTERPART_DETAILS_SHEET_LABELS_EN as h } from "../../../../ui/dist/index2.js";
19
+ import { CounterpartsScreen as g } from "../../../../ui/dist/index3.js";
20
+ import { CounterpartDetailsSheet as _ } from "../../../../ui/dist/index6.js";
20
21
  import "../../../../ui/dist/index.js";
21
- import { useCounterpartsWidget as _ } from "./useCounterpartsWidget.js";
22
- import { useEffect as v, useMemo as y } from "react";
23
- import { Fragment as ee, jsx as b, jsxs as x } from "react/jsx-runtime";
22
+ import { useCounterpartsWidget as v } from "./useCounterpartsWidget.js";
23
+ import { useEffect as ee, useMemo as y } from "react";
24
+ import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
24
25
  //#region ../../libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartsWidget.js
25
- function S({ counterpartType: n, pageSizeOptions: s = c, onViewAllDocuments: S, onCreateDocument: C, screenLabels: w, formLabels: T, detailsLabels: E, bankAccountLabels: D, addressLabels: O, deleteLabels: k, messageLabels: A }) {
26
- let j = t();
27
- v(() => {
28
- j(o.Mounted);
29
- }, [j]);
30
- let { stateOptions: M, isEditDirty: N, isAddressDirty: P, selectedId: F, view: I, table: L, details: R, detailsSheetView: z, permissions: B, isPermissionLoading: V, form: H, bank: U, address: W, del: G, handleRowClick: K, closeDetails: q, handleEditProfile: J } = _({
26
+ function C({ counterpartType: n, pageSizeOptions: c = l, onViewAllDocuments: C, onCreateDocument: w, screenLabels: T, formLabels: E, detailsLabels: D, bankAccountLabels: O, addressLabels: k, deleteLabels: A, messageLabels: j }) {
27
+ let M = t();
28
+ ee(() => {
29
+ M(s.Mounted);
30
+ }, [M]);
31
+ let { stateOptions: N, isEditDirty: P, isAddressDirty: te, selectedId: F, view: I, table: L, details: R, detailsSheetView: z, permissions: B, isPermissionLoading: V, form: H, bank: U, address: W, del: G, handleRowClick: K, closeDetails: q, handleEditProfile: J } = v({
31
32
  counterpartType: n,
32
- detailsLabels: E,
33
- messageLabels: A
34
- }), Y = y(() => p(E, O), [O, E]), X = y(() => u(O), [O]), Z = y(() => f(T), [T]), Q = y(() => I === "edit" ? d(n, H.values, H.errors, {
35
- ...m,
33
+ detailsLabels: D,
34
+ messageLabels: j
35
+ }), Y = y(() => m(D, k), [k, D]), X = y(() => d(k), [k]), Z = y(() => p(E), [E]), Q = y(() => I === "edit" ? f(n, H.values, H.errors, {
36
+ ...h,
36
37
  ...Y,
37
38
  ...Z.labels
38
39
  }) : void 0, [
@@ -46,9 +47,9 @@ function S({ counterpartType: n, pageSizeOptions: s = c, onViewAllDocuments: S,
46
47
  id: F,
47
48
  name: z.name
48
49
  } : void 0, [z, F]);
49
- return /* @__PURE__ */ x(ee, { children: [
50
- /* @__PURE__ */ b(e, {}),
51
- /* @__PURE__ */ b(h, {
50
+ return /* @__PURE__ */ S(b, { children: [
51
+ /* @__PURE__ */ x(e, {}),
52
+ /* @__PURE__ */ x(g, {
52
53
  mode: n,
53
54
  counterparts: L.rows,
54
55
  isLoading: V || L.isLoading,
@@ -57,7 +58,7 @@ function S({ counterpartType: n, pageSizeOptions: s = c, onViewAllDocuments: S,
57
58
  onSortingChange: L.onSortingChange,
58
59
  pageSize: L.pageSize,
59
60
  onPageSizeChange: L.onPageSizeChange,
60
- pageSizeOptions: s,
61
+ pageSizeOptions: c,
61
62
  hasNextPage: L.hasNextPage,
62
63
  hasPrevPage: L.hasPrevPage,
63
64
  onNextPage: L.onNextPage,
@@ -72,11 +73,11 @@ function S({ counterpartType: n, pageSizeOptions: s = c, onViewAllDocuments: S,
72
73
  onCreateClick: B.canCreate ? H.openCreate : () => void 0,
73
74
  onRowClick: K,
74
75
  onRetry: L.onRetry,
75
- labels: w,
76
+ labels: T,
76
77
  emptyStateTestId: "counterparts-widget-empty-state",
77
78
  accessRestrictedTestId: "counterparts-widget-access-restricted"
78
79
  }),
79
- /* @__PURE__ */ b(r, {
80
+ /* @__PURE__ */ x(r, {
80
81
  open: I === "create",
81
82
  onOpenChange: (e) => {
82
83
  e || H.close();
@@ -85,7 +86,8 @@ function S({ counterpartType: n, pageSizeOptions: s = c, onViewAllDocuments: S,
85
86
  counterpartMode: n,
86
87
  values: H.values,
87
88
  errors: H.errors,
88
- stateOptions: M,
89
+ stateOptions: N,
90
+ taxIdField: o(H.values.entityType, n, E),
89
91
  inProgress: H.isSubmitting,
90
92
  submitDisabled: H.isSubmitting,
91
93
  onChange: (e) => H.setValues((t) => ({
@@ -108,12 +110,9 @@ function S({ counterpartType: n, pageSizeOptions: s = c, onViewAllDocuments: S,
108
110
  })),
109
111
  onSubmit: H.submit,
110
112
  onCancel: H.close,
111
- sections: { address: "collapsible" },
112
- sectionsToExpand: H.sectionsToExpand,
113
- onAddressExpand: H.expandAddress,
114
- labels: T
113
+ labels: E
115
114
  }),
116
- /* @__PURE__ */ b(g, {
115
+ /* @__PURE__ */ x(_, {
117
116
  open: F !== void 0 && (I === "none" || I === "edit"),
118
117
  onOpenChange: (e) => {
119
118
  e || q();
@@ -132,8 +131,8 @@ function S({ counterpartType: n, pageSizeOptions: s = c, onViewAllDocuments: S,
132
131
  onEditAddress: W.openEdit,
133
132
  onAddBankAccount: U.form.openCreate,
134
133
  onEditBankAccount: U.form.openEdit,
135
- onViewAllDocuments: S && $ ? () => S($) : void 0,
136
- onCreateDocument: C && $ ? () => C($) : void 0,
134
+ onViewAllDocuments: C && $ ? () => C($) : void 0,
135
+ onCreateDocument: w && $ ? () => w($) : void 0,
137
136
  onDeleteBankAccount: (e) => G.requestDelete({
138
137
  kind: "bankAccount",
139
138
  id: e,
@@ -142,12 +141,12 @@ function S({ counterpartType: n, pageSizeOptions: s = c, onViewAllDocuments: S,
142
141
  editForm: Q && {
143
142
  ...Q,
144
143
  ...Z,
145
- stateOptions: M,
144
+ stateOptions: N,
146
145
  inProgress: H.isSubmitting,
147
- submitDisabled: !N,
146
+ submitDisabled: !P,
148
147
  onFieldChange: (e, t) => H.setValues((n) => ({
149
148
  ...n,
150
- [l[e]]: t
149
+ [u[e]]: t
151
150
  })),
152
151
  onRemindersChange: (e) => H.setValues((t) => ({
153
152
  ...t,
@@ -167,9 +166,9 @@ function S({ counterpartType: n, pageSizeOptions: s = c, onViewAllDocuments: S,
167
166
  hasExistingAddress: !!R.primaryAddress,
168
167
  values: W.values,
169
168
  errors: W.errors,
170
- stateOptions: M,
169
+ stateOptions: N,
171
170
  inProgress: W.isPending,
172
- submitDisabled: !P,
171
+ submitDisabled: !te,
173
172
  formError: W.formError,
174
173
  ...X,
175
174
  onChange: (e) => W.setValues((t) => ({
@@ -181,7 +180,7 @@ function S({ counterpartType: n, pageSizeOptions: s = c, onViewAllDocuments: S,
181
180
  } : void 0,
182
181
  labels: Y
183
182
  }),
184
- /* @__PURE__ */ b(i, {
183
+ /* @__PURE__ */ x(i, {
185
184
  open: U.form.sheet.open,
186
185
  onOpenChange: (e) => {
187
186
  e || U.form.close();
@@ -197,9 +196,9 @@ function S({ counterpartType: n, pageSizeOptions: s = c, onViewAllDocuments: S,
197
196
  })),
198
197
  onSubmit: U.form.submit,
199
198
  onCancel: U.form.close,
200
- labels: D
199
+ labels: O
201
200
  }),
202
- /* @__PURE__ */ b(a, {
201
+ /* @__PURE__ */ x(a, {
203
202
  open: G.target !== null,
204
203
  onOpenChange: (e) => {
205
204
  e || G.close();
@@ -209,28 +208,28 @@ function S({ counterpartType: n, pageSizeOptions: s = c, onViewAllDocuments: S,
209
208
  isDeleting: G.isDeleting,
210
209
  onConfirm: G.confirm,
211
210
  onCancel: G.close,
212
- labels: k
211
+ labels: A
213
212
  })
214
213
  ] });
215
214
  }
216
- function C({ baseUrl: e, widgetToken: t, organizationId: r, configClient: i, gatewayRouting: a, linkComponent: o, implementation: c, uiFramework: l, errorFallback: u, onError: d, analytics: f, disclosuresAcceptance: p, providerLabels: m, passThrough: h, ...g }) {
217
- return /* @__PURE__ */ b(n, {
218
- widgetName: h === !0 && e === void 0 && t === void 0 ? void 0 : s,
215
+ function w({ baseUrl: e, widgetToken: t, organizationId: r, configClient: i, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: l, errorFallback: u, onError: d, analytics: f, disclosuresAcceptance: p, providerLabels: m, passThrough: h, ...g }) {
216
+ return /* @__PURE__ */ x(n, {
217
+ widgetName: h === !0 && e === void 0 && t === void 0 ? void 0 : c,
219
218
  baseUrl: e,
220
219
  widgetToken: t,
221
220
  organizationId: r,
222
221
  configClient: i,
223
222
  gatewayRouting: a,
224
223
  linkComponent: o,
225
- implementation: c,
224
+ implementation: s,
226
225
  uiFramework: l,
227
226
  errorFallback: u,
228
227
  onError: d,
229
228
  analytics: f,
230
229
  disclosuresAcceptance: p,
231
230
  providerLabels: m,
232
- children: /* @__PURE__ */ b(S, { ...g }, g.counterpartType)
231
+ children: /* @__PURE__ */ x(C, { ...g }, g.counterpartType)
233
232
  });
234
233
  }
235
234
  //#endregion
236
- export { C as CounterpartsWidget, C as default };
235
+ export { w as CounterpartsWidget, w as default };
@@ -131,8 +131,10 @@ function h(e) {
131
131
  businessNameLabel: e.businessNameLabel,
132
132
  rowEmail: e.emailLabel,
133
133
  rowPhone: e.phoneLabel,
134
- rowTaxIdSsn: e.taxIdLabel,
135
- rowTaxIdEin: e.taxIdLabel,
134
+ rowTaxIdSsn: e.taxIdSsnLabel ?? e.taxIdLabel,
135
+ rowTaxIdEin: e.taxIdEinLabel ?? e.taxIdLabel,
136
+ taxIdSsnPlaceholder: e.taxIdSsnPlaceholder,
137
+ taxIdEinPlaceholder: e.taxIdEinPlaceholder,
136
138
  customerTaxIdHelp: e.customerTaxIdHelp,
137
139
  vendorTaxIdHelp: e.vendorTaxIdHelp,
138
140
  remindersCheckboxLabel: e.paymentRemindersLabel,
@@ -1,4 +1,4 @@
1
1
  import { COUNTERPART_DETAILS_SHEET_LABELS_EN as e } from "./index2.js";
2
2
  import { CounterpartsScreen as t } from "./index3.js";
3
- import { CounterpartDetailsSheet as n } from "./index7.js";
3
+ import { CounterpartDetailsSheet as n } from "./index6.js";
4
4
  export { e as COUNTERPART_DETAILS_SHEET_LABELS_EN, n as CounterpartDetailsSheet, t as CounterpartsScreen };
@@ -124,7 +124,7 @@ var e = {
124
124
  businessNameLabel: "Business name",
125
125
  remindersCheckboxLabel: "Payment reminders",
126
126
  remindersCheckboxDescription: "Send automatic reminders for unpaid customer invoices.",
127
- taxIdSsnPlaceholder: "e.g., 034-56-78890",
127
+ taxIdSsnPlaceholder: "e.g., 034-56-7890",
128
128
  taxIdEinPlaceholder: "e.g., 12-3456789",
129
129
  editingAddressHeading: "Editing address",
130
130
  addingAddressHeading: "Adding address",