@tesouro/embedded-components-react 0.5.260 → 0.5.261

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,9 +491,9 @@ Manages an organization's products and services: a filterable, sortable table wi
491
491
  | Prop | Type | Default | Description |
492
492
  | ------------------------- | ---------------------------------------- | ------------------- | --------------------------------------------------- |
493
493
  | `pageSizeOptions` | `number[]` | `[10, 25, 50, 100]` | Rows-per-page choices. |
494
- | `screenLabels` | `Partial<ProductsScreenLabels>` | English labels | Table/header/filter/empty/error copy. |
494
+ | `screenLabels` | `PartialDeep<ProductsScreenLabels>` | English labels | Table/header/filter/empty/error copy. |
495
495
  | `formLabels` | `Partial<ProductFormSheetLabels>` | English labels | Create/edit form copy. |
496
- | `detailsLabels` | `Partial<ProductDetailsSheetLabels>` | English labels | Details sheet copy. |
496
+ | `detailsLabels` | `PartialDeep<ProductDetailsSheetLabels>` | English labels | Details sheet copy. |
497
497
  | `deleteLabels` | `Partial<ProductDeleteDialogLabels>` | English labels | Product delete confirmation copy. |
498
498
  | `measureUnitsLabels` | `Partial<MeasureUnitsManagerLabels>` | English labels | Measure-units manager copy. |
499
499
  | `measureUnitDeleteLabels` | `Partial<MeasureUnitDeleteDialogLabels>` | English labels | Measure-unit delete confirmation copy. |
package/dist/index.d.ts CHANGED
@@ -5899,11 +5899,6 @@ type MarketingWidgetProps = WidgetProviderProps & InnerProps;
5899
5899
  */
5900
5900
  declare function MarketingWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: MarketingWidgetProps): React.JSX.Element;
5901
5901
 
5902
- /**
5903
- * Co-located user-facing strings for the products widget UI. Each component
5904
- * takes a `labels?: Partial<…Labels>` prop merged over the matching
5905
- * `*_LABELS_EN` default.
5906
- */
5907
5902
  interface ProductTypeBadgeLabels {
5908
5903
  product: string;
5909
5904
  service: string;
@@ -5980,9 +5975,9 @@ interface ProductDeleteDialogLabels {
5980
5975
 
5981
5976
  interface ProductsWidgetOwnProps {
5982
5977
  pageSizeOptions?: number[];
5983
- screenLabels?: Partial<ProductsScreenLabels>;
5978
+ screenLabels?: PartialDeep<ProductsScreenLabels>;
5984
5979
  formLabels?: Partial<ProductFormSheetLabels>;
5985
- detailsLabels?: Partial<ProductDetailsSheetLabels>;
5980
+ detailsLabels?: PartialDeep<ProductDetailsSheetLabels>;
5986
5981
  deleteLabels?: Partial<ProductDeleteDialogLabels>;
5987
5982
  measureUnitsLabels?: Partial<MeasureUnitsManagerLabels>;
5988
5983
  measureUnitDeleteLabels?: Partial<MeasureUnitDeleteDialogLabels>;
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { ComponentType, AnchorHTMLAttributes, ReactNode, ErrorInfo } from 'react';
3
+ import { PartialDeep } from 'type-fest';
3
4
  import { FallbackProps } from 'react-error-boundary';
4
5
 
5
6
  type AuthToken = string | undefined;
@@ -716,11 +717,6 @@ interface ProductMessageLabels {
716
717
  updateMeasureUnitError: string;
717
718
  }
718
719
 
719
- /**
720
- * Co-located user-facing strings for the products widget UI. Each component
721
- * takes a `labels?: Partial<…Labels>` prop merged over the matching
722
- * `*_LABELS_EN` default.
723
- */
724
720
  interface ProductTypeBadgeLabels {
725
721
  product: string;
726
722
  service: string;
@@ -797,9 +793,9 @@ interface ProductDeleteDialogLabels {
797
793
 
798
794
  interface ProductsWidgetOwnProps {
799
795
  pageSizeOptions?: number[];
800
- screenLabels?: Partial<ProductsScreenLabels>;
796
+ screenLabels?: PartialDeep<ProductsScreenLabels>;
801
797
  formLabels?: Partial<ProductFormSheetLabels>;
802
- detailsLabels?: Partial<ProductDetailsSheetLabels>;
798
+ detailsLabels?: PartialDeep<ProductDetailsSheetLabels>;
803
799
  deleteLabels?: Partial<ProductDeleteDialogLabels>;
804
800
  measureUnitsLabels?: Partial<MeasureUnitsManagerLabels>;
805
801
  measureUnitDeleteLabels?: Partial<MeasureUnitDeleteDialogLabels>;
@@ -73,7 +73,11 @@ function w({ labels: e, searchValue: t, onSearchChange: u, typeFilter: d, onType
73
73
  function T({ products: n, isLoading: r, isError: i, sorting: a, onSortingChange: o, pageSize: s, onPageSizeChange: c, pageSizeOptions: l = S, hasNextPage: x, hasPrevPage: C, onNextPage: T, onPrevPage: E, searchValue: D, onSearchChange: O, typeFilter: k, onTypeFilterChange: A, unitFilter: j, onUnitFilterChange: M, unitOptions: N, isFiltering: P, onCreateClick: F, onManageUnitsClick: I, onRowClick: L, onRetry: R, canCreate: z = !0, canManageUnits: B = !0, isAccessRestricted: V, labels: H, testIds: U }) {
74
74
  let W = {
75
75
  ...f,
76
- ...H
76
+ ...H,
77
+ typeBadge: {
78
+ ...f.typeBadge,
79
+ ...H?.typeBadge
80
+ }
77
81
  }, G = [
78
82
  {
79
83
  accessorKey: "name",
@@ -25,7 +25,11 @@ function C({ label: e, value: t, isLast: n, emptyValue: r = "—" }) {
25
25
  function w({ open: S, onOpenChange: w, product: T, isLoading: E, isError: D, onEdit: O, onDelete: k, canEdit: A = !0, canDelete: j = !0, labels: M }) {
26
26
  let N = {
27
27
  ...h,
28
- ...M
28
+ ...M,
29
+ typeBadge: {
30
+ ...h.typeBadge,
31
+ ...M?.typeBadge
32
+ }
29
33
  }, P = T?.type !== "service", F = P ? N.typeBadge.product : N.typeBadge.service, I = T ? N.subtitle.replace("{type}", F).replace("{createdAt}", T.createdAtLabel) : N.hiddenDescription;
30
34
  return /* @__PURE__ */ _(a, {
31
35
  open: S,
@@ -1,5 +1,5 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.5.260", n = "fea5c2970c59d7a4dad7ac75d023dadcad238936", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.5.261", n = "e27d97953e9b2379dec216307bcf467d83f6716b", 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.5.260",
3
+ "version": "0.5.261",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {