@tesouro/embedded-components-react 0.7.62 → 0.7.64

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
@@ -11,6 +11,11 @@ dependencies.
11
11
  These steps put one widget on screen: a token route on your server, a provider
12
12
  in the browser, and the widget itself. The examples use the Next.js App Router.
13
13
 
14
+ Using a coding assistant? Point it at
15
+ [`llms-full.txt`](https://components.tesouro.com/llms-full.txt), which has every
16
+ page of the docs site as Markdown in one file.
17
+ [`llms.txt`](https://components.tesouro.com/llms.txt) is the index.
18
+
14
19
  ### Before you start
15
20
 
16
21
  You need three credentials from Tesouro: a client ID, a client secret and a
@@ -561,16 +566,16 @@ Manages an organization's products and services: a filterable, sortable table wi
561
566
 
562
567
  #### Props
563
568
 
564
- | Prop | Type | Default | Description |
565
- | ------------------------- | ---------------------------------------- | ------------------- | --------------------------------------------------- |
566
- | `pageSizeOptions` | `number[]` | `[10, 25, 50, 100]` | Rows-per-page choices. |
567
- | `screenLabels` | `PartialDeep<ProductsScreenLabels>` | English labels | Table/header/filter/empty/error copy. |
568
- | `formLabels` | `Partial<ProductFormSheetLabels>` | English labels | Create/edit form copy. |
569
- | `detailsLabels` | `PartialDeep<ProductDetailsSheetLabels>` | English labels | Details sheet copy. |
570
- | `deleteLabels` | `Partial<ProductDeleteDialogLabels>` | English labels | Product delete confirmation copy. |
571
- | `measureUnitsLabels` | `Partial<MeasureUnitsManagerLabels>` | English labels | Measure-units manager copy. |
572
- | `measureUnitDeleteLabels` | `Partial<MeasureUnitDeleteDialogLabels>` | English labels | Measure-unit delete confirmation copy. |
573
- | `messageLabels` | `Partial<ProductMessageLabels>` | English labels | Validation / error messages produced by the widget. |
569
+ | Prop | Type | Default | Description |
570
+ | ------------------------- | ---------------------------------------- | ------------------- | ------------------------------------------------------------ |
571
+ | `pageSizeOptions` | `number[]` | `[10, 25, 50, 100]` | Rows-per-page choices. |
572
+ | `screenLabels` | `PartialDeep<ProductsScreenLabels>` | English labels | Table/header/filter/empty/error copy. |
573
+ | `formLabels` | `Partial<ProductFormSheetLabels>` | English labels | Create/edit form copy. |
574
+ | `detailsLabels` | `PartialDeep<ProductDetailsSheetLabels>` | English labels | Details sheet copy. |
575
+ | `deleteLabels` | `Partial<ProductDeleteDialogLabels>` | English labels | Product delete confirmation copy. |
576
+ | `measureUnitsLabels` | `Partial<MeasureUnitsManagerLabels>` | English labels | Measure-units manager copy. |
577
+ | `measureUnitDeleteLabels` | `Partial<MeasureUnitDeleteDialogLabels>` | English labels | Measure-unit delete confirmation copy. |
578
+ | `messageLabels` | `Partial<ProductMessageLabels>` | English labels | Validation, error and toast messages produced by the widget. |
574
579
 
575
580
  ### ReceivablesWidget
576
581
 
@@ -603,7 +608,7 @@ Lists, creates, edits and acts on an organization's invoices, including sending
603
608
  | `measureUnitsLabels` | `Partial<MeasureUnitsManagerLabels>` | English labels | Measure-unit manager copy. |
604
609
  | `measureUnitDeleteLabels` | `Partial<MeasureUnitDeleteDialogLabels>` | English labels | Measure-unit delete confirmation copy. |
605
610
  | `messageLabels` | `Partial<ReceivableMessageLabels>` | English labels | Validation, fallback, details panel, reminder and confirmation messages, including the form's save and issue buttons and a new reminder's subject and body. |
606
- | `productMessageLabels` | `Partial<ProductMessageLabels>` | English labels | Product validation and error messages. |
611
+ | `productMessageLabels` | `Partial<ProductMessageLabels>` | English labels | Product validation and error messages, and the measure-unit toasts. |
607
612
  | `counterpartMessageLabels` | `Partial<CounterpartMessageLabels>` | English labels | Customer validation and error messages. |
608
613
 
609
614
  ### SettingsWidget
package/dist/index.css CHANGED
@@ -1621,6 +1621,9 @@
1621
1621
  .ttw\:shrink-0 {
1622
1622
  flex-shrink: 0;
1623
1623
  }
1624
+ .ttw\:shrink-9999 {
1625
+ flex-shrink: 9999;
1626
+ }
1624
1627
  .ttw\:shrink-\[9999\] {
1625
1628
  flex-shrink: 9999;
1626
1629
  }
package/dist/index.d.ts CHANGED
@@ -5035,10 +5035,11 @@ interface MeasureUnitDeleteDialogLabels {
5035
5035
  }
5036
5036
 
5037
5037
  /**
5038
- * Overridable validation / error messages produced by the products feature
5039
- * layer and surfaced through the form's `errors` prop and the measure-units
5040
- * manager. Consumers override via the widget's `messageLabels` prop, merged
5041
- * over {@link PRODUCT_MESSAGE_LABELS_EN}.
5038
+ * Overridable validation, error and toast messages produced by the products
5039
+ * feature layer and surfaced through the form's `errors` prop, the
5040
+ * measure-units manager and toasts. Consumers override them through
5041
+ * `ProductsWidget`'s `messageLabels` or `ReceivablesWidget`'s
5042
+ * `productMessageLabels`, merged over {@link PRODUCT_MESSAGE_LABELS_EN}.
5042
5043
  */
5043
5044
  interface ProductMessageLabels {
5044
5045
  nameRequired: string;
@@ -5056,6 +5057,23 @@ interface ProductMessageLabels {
5056
5057
  createMeasureUnitError: string;
5057
5058
  /** Fallback when updating a measure unit fails without a server message. */
5058
5059
  updateMeasureUnitError: string;
5060
+ /** Success toast after creating a product; `{name}` is replaced with its name. */
5061
+ productCreated: string;
5062
+ /** Success toast after editing a product; `{name}` is replaced with its name. */
5063
+ productUpdated: string;
5064
+ /** Success toast after editing a service; `{name}` is replaced with its name. */
5065
+ serviceUpdated: string;
5066
+ productDeleted: string;
5067
+ /** Error toast when a product delete fails without a server message. */
5068
+ deleteProductError: string;
5069
+ /** Success toast after creating a measure unit; `{name}` is replaced with its name. */
5070
+ measureUnitCreated: string;
5071
+ /** Success toast after editing a measure unit; `{name}` is replaced with its name. */
5072
+ measureUnitUpdated: string;
5073
+ /** Success toast after deleting a measure unit; `{name}` is replaced with its name. */
5074
+ measureUnitDeleted: string;
5075
+ /** Error toast when a measure unit delete fails without a server message. */
5076
+ deleteMeasureUnitError: string;
5059
5077
  }
5060
5078
 
5061
5079
  interface ProductTypeBadgeLabels {
@@ -663,10 +663,11 @@ interface MeasureUnitDeleteDialogLabels {
663
663
  }
664
664
 
665
665
  /**
666
- * Overridable validation / error messages produced by the products feature
667
- * layer and surfaced through the form's `errors` prop and the measure-units
668
- * manager. Consumers override via the widget's `messageLabels` prop, merged
669
- * over {@link PRODUCT_MESSAGE_LABELS_EN}.
666
+ * Overridable validation, error and toast messages produced by the products
667
+ * feature layer and surfaced through the form's `errors` prop, the
668
+ * measure-units manager and toasts. Consumers override them through
669
+ * `ProductsWidget`'s `messageLabels` or `ReceivablesWidget`'s
670
+ * `productMessageLabels`, merged over {@link PRODUCT_MESSAGE_LABELS_EN}.
670
671
  */
671
672
  interface ProductMessageLabels {
672
673
  nameRequired: string;
@@ -684,6 +685,23 @@ interface ProductMessageLabels {
684
685
  createMeasureUnitError: string;
685
686
  /** Fallback when updating a measure unit fails without a server message. */
686
687
  updateMeasureUnitError: string;
688
+ /** Success toast after creating a product; `{name}` is replaced with its name. */
689
+ productCreated: string;
690
+ /** Success toast after editing a product; `{name}` is replaced with its name. */
691
+ productUpdated: string;
692
+ /** Success toast after editing a service; `{name}` is replaced with its name. */
693
+ serviceUpdated: string;
694
+ productDeleted: string;
695
+ /** Error toast when a product delete fails without a server message. */
696
+ deleteProductError: string;
697
+ /** Success toast after creating a measure unit; `{name}` is replaced with its name. */
698
+ measureUnitCreated: string;
699
+ /** Success toast after editing a measure unit; `{name}` is replaced with its name. */
700
+ measureUnitUpdated: string;
701
+ /** Success toast after deleting a measure unit; `{name}` is replaced with its name. */
702
+ measureUnitDeleted: string;
703
+ /** Error toast when a measure unit delete fails without a server message. */
704
+ deleteMeasureUnitError: string;
687
705
  }
688
706
 
689
707
  interface ProductTypeBadgeLabels {
@@ -915,10 +915,11 @@ interface MeasureUnitDeleteDialogLabels {
915
915
  }
916
916
 
917
917
  /**
918
- * Overridable validation / error messages produced by the products feature
919
- * layer and surfaced through the form's `errors` prop and the measure-units
920
- * manager. Consumers override via the widget's `messageLabels` prop, merged
921
- * over {@link PRODUCT_MESSAGE_LABELS_EN}.
918
+ * Overridable validation, error and toast messages produced by the products
919
+ * feature layer and surfaced through the form's `errors` prop, the
920
+ * measure-units manager and toasts. Consumers override them through
921
+ * `ProductsWidget`'s `messageLabels` or `ReceivablesWidget`'s
922
+ * `productMessageLabels`, merged over {@link PRODUCT_MESSAGE_LABELS_EN}.
922
923
  */
923
924
  interface ProductMessageLabels {
924
925
  nameRequired: string;
@@ -936,6 +937,23 @@ interface ProductMessageLabels {
936
937
  createMeasureUnitError: string;
937
938
  /** Fallback when updating a measure unit fails without a server message. */
938
939
  updateMeasureUnitError: string;
940
+ /** Success toast after creating a product; `{name}` is replaced with its name. */
941
+ productCreated: string;
942
+ /** Success toast after editing a product; `{name}` is replaced with its name. */
943
+ productUpdated: string;
944
+ /** Success toast after editing a service; `{name}` is replaced with its name. */
945
+ serviceUpdated: string;
946
+ productDeleted: string;
947
+ /** Error toast when a product delete fails without a server message. */
948
+ deleteProductError: string;
949
+ /** Success toast after creating a measure unit; `{name}` is replaced with its name. */
950
+ measureUnitCreated: string;
951
+ /** Success toast after editing a measure unit; `{name}` is replaced with its name. */
952
+ measureUnitUpdated: string;
953
+ /** Success toast after deleting a measure unit; `{name}` is replaced with its name. */
954
+ measureUnitDeleted: string;
955
+ /** Error toast when a measure unit delete fails without a server message. */
956
+ deleteMeasureUnitError: string;
939
957
  }
940
958
 
941
959
  declare const InvoicesFilterField: {
@@ -2,125 +2,128 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { useAnalyticsTrack as e } from "../../../../../shared/feature/dist/lib/analytics/hooks.js";
6
- import { WidgetProvider as t } from "../../../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
5
+ import { EmbeddedToaster as e } from "../../../../../shared/ui/dist/lib/EmbeddedToaster.js";
6
+ import "../../../../../shared/ui/dist/index.js";
7
+ import { useAnalyticsTrack as t } from "../../../../../shared/feature/dist/lib/analytics/hooks.js";
8
+ import { WidgetProvider as n } from "../../../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
7
9
  import "../../../../../shared/feature/dist/index.js";
8
- import { ProductFormSheet as n } from "../../../../../shared/product-catalog/ui/dist/index3.js";
9
- import { MeasureUnitsManagerContainer as r } from "../../../../../shared/product-catalog/feature/dist/lib/MeasureUnitsManagerContainer.js";
10
+ import { ProductFormSheet as r } from "../../../../../shared/product-catalog/ui/dist/index3.js";
11
+ import { MeasureUnitsManagerContainer as i } from "../../../../../shared/product-catalog/feature/dist/lib/MeasureUnitsManagerContainer.js";
10
12
  import "../../../../../shared/product-catalog/feature/dist/index.js";
11
- import { ProductsWidgetAnalyticsEvent as i, WIDGET_NAME as a } from "../analytics/events.js";
12
- import { PAGE_SIZE_OPTIONS as o } from "./constants.js";
13
- import { productsWidgetTestIds as s } from "./testIds.js";
14
- import { useProductsWidget as c } from "./useProductsWidget.js";
15
- import { ProductsScreen as l } from "../../../../ui/dist/index4.js";
16
- import { ProductDetailsSheet as u } from "../../../../ui/dist/index5.js";
17
- import { ProductDeleteDialog as d } from "../../../../ui/dist/index6.js";
13
+ import { ProductsWidgetAnalyticsEvent as a, WIDGET_NAME as o } from "../analytics/events.js";
14
+ import { PAGE_SIZE_OPTIONS as s } from "./constants.js";
15
+ import { productsWidgetTestIds as c } from "./testIds.js";
16
+ import { useProductsWidget as l } from "./useProductsWidget.js";
17
+ import { ProductsScreen as u } from "../../../../ui/dist/index4.js";
18
+ import { ProductDetailsSheet as d } from "../../../../ui/dist/index5.js";
19
+ import { ProductDeleteDialog as f } from "../../../../ui/dist/index6.js";
18
20
  import "../../../../ui/dist/index.js";
19
- import { useEffect as f } from "react";
20
- import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
21
+ import { useEffect as p } from "react";
22
+ import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
21
23
  //#region ../../libs/tesouro-embedded-components-react/products-widget/feature/dist/lib/ProductsWidget/ProductsWidget.js
22
- function g({ pageSizeOptions: t = o, screenLabels: a, formLabels: g, detailsLabels: _, deleteLabels: v, measureUnitsLabels: y, measureUnitDeleteLabels: b, messageLabels: x }) {
23
- let S = e();
24
- f(() => {
25
- S(i.Mounted);
26
- }, [S]);
27
- let { view: C, units: w, table: T, details: E, form: D, del: O, permissions: k, isPermissionLoading: A, isTableLoading: j, hasInitError: M, refetchWidgetInit: N, measureUnitsOpen: P, actionsSuspended: F, handleRowClick: I, openMeasureUnits: L, closeMeasureUnits: R, submitForm: z, confirmDelete: B } = c({ messageLabels: x });
28
- return /* @__PURE__ */ h(p, { children: [
29
- /* @__PURE__ */ m(l, {
30
- products: T.rows,
31
- isLoading: j,
32
- isError: M || T.isError,
33
- sorting: T.sorting,
34
- onSortingChange: T.onSortingChange,
35
- pageSize: T.pageSize,
36
- onPageSizeChange: T.onPageSizeChange,
37
- pageSizeOptions: t,
38
- hasNextPage: T.hasNextPage,
39
- hasPrevPage: T.hasPrevPage,
40
- onNextPage: T.onNextPage,
41
- onPrevPage: T.onPrevPage,
42
- searchValue: T.searchValue,
43
- onSearchChange: T.onSearchChange,
44
- typeFilter: T.typeFilter,
45
- onTypeFilterChange: T.onTypeFilterChange,
46
- unitFilter: T.unitFilter,
47
- onUnitFilterChange: T.onUnitFilterChange,
48
- unitOptions: w.unitOptions,
49
- isFiltering: T.isFiltering,
50
- canCreate: k.canCreate,
51
- canManageUnits: k.canCreate,
52
- isAccessRestricted: !A && !M && !k.canRead,
53
- onCreateClick: D.openCreate,
54
- onManageUnitsClick: L,
55
- onRowClick: I,
56
- onRetry: M ? N : T.onRetry,
57
- labels: a,
24
+ function _({ pageSizeOptions: n = s, screenLabels: o, formLabels: _, detailsLabels: v, deleteLabels: y, measureUnitsLabels: b, measureUnitDeleteLabels: x, messageLabels: S }) {
25
+ let C = t();
26
+ p(() => {
27
+ C(a.Mounted);
28
+ }, [C]);
29
+ let { view: w, units: T, table: E, details: D, form: O, del: k, permissions: A, isPermissionLoading: j, isTableLoading: M, hasInitError: N, refetchWidgetInit: P, measureUnitsOpen: F, actionsSuspended: I, handleRowClick: L, openMeasureUnits: R, closeMeasureUnits: z, submitForm: B, confirmDelete: V } = l({ messageLabels: S });
30
+ return /* @__PURE__ */ g(m, { children: [
31
+ /* @__PURE__ */ h(e, {}),
32
+ /* @__PURE__ */ h(u, {
33
+ products: E.rows,
34
+ isLoading: M,
35
+ isError: N || E.isError,
36
+ sorting: E.sorting,
37
+ onSortingChange: E.onSortingChange,
38
+ pageSize: E.pageSize,
39
+ onPageSizeChange: E.onPageSizeChange,
40
+ pageSizeOptions: n,
41
+ hasNextPage: E.hasNextPage,
42
+ hasPrevPage: E.hasPrevPage,
43
+ onNextPage: E.onNextPage,
44
+ onPrevPage: E.onPrevPage,
45
+ searchValue: E.searchValue,
46
+ onSearchChange: E.onSearchChange,
47
+ typeFilter: E.typeFilter,
48
+ onTypeFilterChange: E.onTypeFilterChange,
49
+ unitFilter: E.unitFilter,
50
+ onUnitFilterChange: E.onUnitFilterChange,
51
+ unitOptions: T.unitOptions,
52
+ isFiltering: E.isFiltering,
53
+ canCreate: A.canCreate,
54
+ canManageUnits: A.canCreate,
55
+ isAccessRestricted: !j && !N && !A.canRead,
56
+ onCreateClick: O.openCreate,
57
+ onManageUnitsClick: R,
58
+ onRowClick: L,
59
+ onRetry: N ? P : E.onRetry,
60
+ labels: o,
58
61
  testIds: {
59
- empty: s.empty,
60
- accessRestricted: s.accessRestricted
62
+ empty: c.empty,
63
+ accessRestricted: c.accessRestricted
61
64
  }
62
65
  }),
63
- /* @__PURE__ */ m(n, {
64
- open: C === "create" || C === "edit",
66
+ /* @__PURE__ */ h(r, {
67
+ open: w === "create" || w === "edit",
65
68
  onOpenChange: (e) => {
66
- e || D.close();
69
+ e || O.close();
67
70
  },
68
- mode: C === "edit" ? "edit" : "create",
69
- values: D.values,
70
- errors: D.errors,
71
- unitOptions: w.unitOptions,
72
- currencyOptions: D.currencyOptions,
73
- inProgress: D.isSubmitting || F,
74
- onChange: (e) => D.setValues((t) => ({
71
+ mode: w === "edit" ? "edit" : "create",
72
+ values: O.values,
73
+ errors: O.errors,
74
+ unitOptions: T.unitOptions,
75
+ currencyOptions: O.currencyOptions,
76
+ inProgress: O.isSubmitting || I,
77
+ onChange: (e) => O.setValues((t) => ({
75
78
  ...t,
76
79
  ...e
77
80
  })),
78
- onManageUnits: L,
79
- onSubmit: z,
80
- onCancel: D.close,
81
- labels: g
81
+ onManageUnits: R,
82
+ onSubmit: B,
83
+ onCancel: O.close,
84
+ labels: _
82
85
  }),
83
- /* @__PURE__ */ m(u, {
84
- open: C === "details",
86
+ /* @__PURE__ */ h(d, {
87
+ open: w === "details",
85
88
  onOpenChange: (e) => {
86
- e || D.close();
89
+ e || O.close();
87
90
  },
88
- product: E.detailsView,
89
- isLoading: E.isLoading,
90
- isError: E.isError,
91
- onEdit: D.openEdit,
92
- onDelete: O.requestDelete,
93
- canEdit: k.canUpdate,
94
- canDelete: k.canDelete,
95
- labels: _
96
- }),
97
- /* @__PURE__ */ m(d, {
98
- open: O.open,
99
- onOpenChange: O.onOpenChange,
100
- productName: E.productName,
101
- isDeleting: O.isDeleting || F,
102
- onConfirm: B,
103
- onCancel: O.cancel,
91
+ product: D.detailsView,
92
+ isLoading: D.isLoading,
93
+ isError: D.isError,
94
+ onEdit: O.openEdit,
95
+ onDelete: k.requestDelete,
96
+ canEdit: A.canUpdate,
97
+ canDelete: A.canDelete,
104
98
  labels: v
105
99
  }),
106
- /* @__PURE__ */ m(r, {
107
- open: P,
108
- onClose: R,
109
- suspended: F,
110
- managerLabels: y,
111
- deleteLabels: b,
112
- messageLabels: x
100
+ /* @__PURE__ */ h(f, {
101
+ open: k.open,
102
+ onOpenChange: k.onOpenChange,
103
+ productName: D.productName,
104
+ isDeleting: k.isDeleting || I,
105
+ onConfirm: V,
106
+ onCancel: k.cancel,
107
+ labels: y
108
+ }),
109
+ /* @__PURE__ */ h(i, {
110
+ open: F,
111
+ onClose: z,
112
+ suspended: I,
113
+ managerLabels: b,
114
+ deleteLabels: x,
115
+ messageLabels: S
113
116
  })
114
117
  ] });
115
118
  }
116
- function _({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gatewayRouting: o, linkComponent: s, uiFramework: c, errorFallback: l, onError: u, analytics: d, disclosuresAcceptance: f, providerLabels: p, ...h }) {
117
- return /* @__PURE__ */ m(t, {
118
- widgetName: a,
119
+ function v({ baseUrl: e, widgetToken: t, organizationId: r, configClient: i, gatewayRouting: a, linkComponent: s, uiFramework: c, errorFallback: l, onError: u, analytics: d, disclosuresAcceptance: f, providerLabels: p, ...m }) {
120
+ return /* @__PURE__ */ h(n, {
121
+ widgetName: o,
119
122
  baseUrl: e,
120
- widgetToken: n,
123
+ widgetToken: t,
121
124
  organizationId: r,
122
125
  configClient: i,
123
- gatewayRouting: o,
126
+ gatewayRouting: a,
124
127
  linkComponent: s,
125
128
  uiFramework: c,
126
129
  errorFallback: l,
@@ -128,8 +131,8 @@ function _({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gat
128
131
  analytics: d,
129
132
  disclosuresAcceptance: f,
130
133
  providerLabels: p,
131
- children: /* @__PURE__ */ m(g, { ...h })
134
+ children: /* @__PURE__ */ h(_, { ...m })
132
135
  });
133
136
  }
134
137
  //#endregion
135
- export { _ as ProductsWidget, _ as default };
138
+ export { v as ProductsWidget, v as default };
@@ -2,31 +2,37 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { useDeleteProductMutation as e } from "../../../../../shared/product-catalog/data-access/dist/index8.js";
5
+ import { toast as e } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { extractApiErrorMessage as t } from "../../../../../shared/util/dist/lib/apiErrors.js";
7
+ import "../../../../../shared/ui/dist/index.js";
8
+ import { useDeleteProductMutation as n } from "../../../../../shared/product-catalog/data-access/dist/index8.js";
6
9
  import "../../../../../shared/product-catalog/feature/dist/index.js";
7
- import { useCallback as t, useState as n } from "react";
10
+ import { useCallback as r, useState as i } from "react";
8
11
  //#region ../../libs/tesouro-embedded-components-react/products-widget/feature/dist/lib/ProductsWidget/useProductDelete.js
9
- function r({ selectedProductId: r, setSelectedProductId: i, setView: a }) {
10
- let o = e(), [s, c] = n(!1), l = t(() => c(!0), []), u = t((e) => {
11
- e || c(!1);
12
- }, []), d = t(() => c(!1), []);
12
+ function a({ selectedProductId: a, setSelectedProductId: o, setView: s, messages: c }) {
13
+ let l = n(), [u, d] = i(!1), f = r(() => d(!0), []), p = r((e) => {
14
+ e || d(!1);
15
+ }, []), m = r(() => d(!1), []);
13
16
  return {
14
- open: s,
15
- requestDelete: l,
16
- onOpenChange: u,
17
- confirm: t(async () => {
18
- if (r) try {
19
- await o.mutateAsync({ path: { product_id: r } }), c(!1), a("none"), i(void 0);
20
- } catch {}
17
+ open: u,
18
+ requestDelete: f,
19
+ onOpenChange: p,
20
+ confirm: r(async () => {
21
+ if (a) try {
22
+ await l.mutateAsync({ path: { product_id: a } }), e.success(c.productDeleted), d(!1), s("none"), o(void 0);
23
+ } catch (n) {
24
+ e.error(t(n) ?? c.deleteProductError);
25
+ }
21
26
  }, [
22
- r,
23
- o,
24
27
  a,
25
- i
28
+ l,
29
+ c,
30
+ s,
31
+ o
26
32
  ]),
27
- cancel: d,
28
- isDeleting: o.isPending
33
+ cancel: m,
34
+ isDeleting: l.isPending
29
35
  };
30
36
  }
31
37
  //#endregion
32
- export { r as useProductDelete };
38
+ export { a as useProductDelete };
@@ -36,7 +36,8 @@ function g({ messageLabels: g }) {
36
36
  }), L = u({
37
37
  selectedProductId: k,
38
38
  setSelectedProductId: A,
39
- setView: O
39
+ setView: O,
40
+ messages: _
40
41
  });
41
42
  if (!S) {
42
43
  let { canRead: e, canCreate: t, canUpdate: n, canDelete: r } = w;
@@ -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.7.62", n = "a5ee0333565f2d3bb83a2039d04c7321226dd688", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.7.64", n = "b6680041b9b1e4dbf13ade3be6c9cf064a1c40b5", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -1,25 +1,25 @@
1
- import "../../../util/dist/lib/apiErrors.js";
2
- import { PRODUCT_MESSAGE_LABELS_EN as e } from "./lib/labels.js";
3
- import { buildProductDetailsView as t, buildProductRows as n, formatPrice as r, hasSelectedText as i } from "./lib/helpers.js";
4
- import { ProductFormSheet as a } from "../../ui/dist/index3.js";
1
+ import { extractApiErrorMessage as e } from "../../../util/dist/lib/apiErrors.js";
2
+ import { PRODUCT_MESSAGE_LABELS_EN as t } from "./lib/labels.js";
3
+ import { buildProductDetailsView as n, buildProductRows as r, formatPrice as i, hasSelectedText as a } from "./lib/helpers.js";
4
+ import { ProductFormSheet as o } from "../../ui/dist/index3.js";
5
5
  import "../../ui/dist/index4.js";
6
6
  import "../../ui/dist/index5.js";
7
7
  import "../../ui/dist/index.js";
8
- import { useProductsQuery as o } from "../../data-access/dist/index2.js";
8
+ import { useProductsQuery as s } from "../../data-access/dist/index2.js";
9
9
  import "../../data-access/dist/index3.js";
10
- import { useProductQuery as s } from "../../data-access/dist/index4.js";
11
- import { useCreateProductMutation as c } from "../../data-access/dist/index6.js";
10
+ import { useProductQuery as c } from "../../data-access/dist/index4.js";
11
+ import { useCreateProductMutation as l } from "../../data-access/dist/index6.js";
12
12
  import "../../data-access/dist/index7.js";
13
- import { useDeleteProductMutation as l } from "../../data-access/dist/index8.js";
14
- import { useMeasureUnitsQuery as u } from "../../data-access/dist/index9.js";
13
+ import { useDeleteProductMutation as u } from "../../data-access/dist/index8.js";
14
+ import { useMeasureUnitsQuery as d } from "../../data-access/dist/index9.js";
15
15
  import "../../data-access/dist/index10.js";
16
16
  import "../../data-access/dist/index11.js";
17
17
  import "../../data-access/dist/index12.js";
18
18
  import "../../data-access/dist/index13.js";
19
19
  import "../../data-access/dist/index.js";
20
- import { MeasureUnitsManagerContainer as d } from "./lib/MeasureUnitsManagerContainer.js";
21
- import { useMeasureUnits as f } from "./lib/useMeasureUnits.js";
22
- import { useProductForm as p } from "./lib/useProductForm.js";
20
+ import { MeasureUnitsManagerContainer as f } from "./lib/MeasureUnitsManagerContainer.js";
21
+ import { useMeasureUnits as p } from "./lib/useMeasureUnits.js";
22
+ import { useProductForm as m } from "./lib/useProductForm.js";
23
23
  import "./lib/useProductSelector.js";
24
- import { ProductSelector as m } from "./lib/ProductSelector.js";
25
- export { d as MeasureUnitsManagerContainer, e as PRODUCT_MESSAGE_LABELS_EN, a as ProductFormSheet, m as ProductSelector, t as buildProductDetailsView, n as buildProductRows, r as formatPrice, i as hasSelectedText, c as useCreateProductMutation, l as useDeleteProductMutation, f as useMeasureUnits, u as useMeasureUnitsQuery, p as useProductForm, s as useProductQuery, o as useProductsQuery };
24
+ import { ProductSelector as h } from "./lib/ProductSelector.js";
25
+ export { f as MeasureUnitsManagerContainer, t as PRODUCT_MESSAGE_LABELS_EN, o as ProductFormSheet, h as ProductSelector, n as buildProductDetailsView, r as buildProductRows, e as extractApiErrorMessage, i as formatPrice, a as hasSelectedText, l as useCreateProductMutation, u as useDeleteProductMutation, p as useMeasureUnits, d as useMeasureUnitsQuery, m as useProductForm, c as useProductQuery, s as useProductsQuery };
@@ -2,146 +2,154 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { extractApiErrorMessage as e } from "../../../../util/dist/lib/apiErrors.js";
6
- import { PRODUCT_MESSAGE_LABELS_EN as t } from "./labels.js";
7
- import { formatPrice as n, validateMeasureUnit as r } from "./helpers.js";
8
- import { MeasureUnitsManager as i } from "../../../ui/dist/index4.js";
9
- import { MeasureUnitDeleteDialog as a } from "../../../ui/dist/index5.js";
5
+ import { toast as e } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { extractApiErrorMessage as t } from "../../../../util/dist/lib/apiErrors.js";
7
+ import "../../../../ui/dist/index.js";
8
+ import { PRODUCT_MESSAGE_LABELS_EN as n } from "./labels.js";
9
+ import { formatPrice as r, validateMeasureUnit as i } from "./helpers.js";
10
+ import { toastSuccessWithName as a } from "./toasts.js";
11
+ import { MeasureUnitsManager as o } from "../../../ui/dist/index4.js";
12
+ import { MeasureUnitDeleteDialog as s } from "../../../ui/dist/index5.js";
10
13
  import "../../../ui/dist/index.js";
11
- import { useMeasureUnitsQuery as o } from "../../../data-access/dist/index9.js";
12
- import { useProductsByMeasureUnitQuery as s } from "../../../data-access/dist/index10.js";
13
- import { useCreateMeasureUnitMutation as c } from "../../../data-access/dist/index11.js";
14
- import { useUpdateMeasureUnitMutation as l } from "../../../data-access/dist/index12.js";
15
- import { useDeleteMeasureUnitMutation as u } from "../../../data-access/dist/index13.js";
14
+ import { useMeasureUnitsQuery as c } from "../../../data-access/dist/index9.js";
15
+ import { useProductsByMeasureUnitQuery as l } from "../../../data-access/dist/index10.js";
16
+ import { useCreateMeasureUnitMutation as u } from "../../../data-access/dist/index11.js";
17
+ import { useUpdateMeasureUnitMutation as d } from "../../../data-access/dist/index12.js";
18
+ import { useDeleteMeasureUnitMutation as f } from "../../../data-access/dist/index13.js";
16
19
  import "../../../data-access/dist/index.js";
17
- import { useCallback as d, useMemo as f, useState as p } from "react";
18
- import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
20
+ import { useCallback as p, useMemo as m, useState as h } from "react";
21
+ import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
19
22
  //#region ../../libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/MeasureUnitsManagerContainer.js
20
- var _ = {
23
+ var y = {
21
24
  name: "",
22
25
  description: ""
23
26
  };
24
- function v({ open: v, onClose: y, suspended: b = !1, managerLabels: x, deleteLabels: S, messageLabels: C }) {
25
- let w = f(() => ({
26
- ...t,
27
- ...C
28
- }), [C]), T = o({ enabled: v && !b }), E = c(), D = l(), O = u(), [k, A] = p(""), [j, M] = p(_), [N, P] = p(), [F, I] = p(), [L, R] = p(_), [z, B] = p(), [V, H] = p(), [U, W] = p(v);
29
- v !== U && (W(v), v || H(void 0));
30
- let G = f(() => (T.data?.data ?? []).map((e) => ({
27
+ function b({ open: b, onClose: x, suspended: S = !1, managerLabels: C, deleteLabels: w, messageLabels: T }) {
28
+ let E = m(() => ({
29
+ ...n,
30
+ ...T
31
+ }), [T]), D = c({ enabled: b && !S }), O = u(), k = d(), A = f(), [j, M] = h(""), [N, P] = h(y), [F, I] = h(), [L, R] = h(), [z, B] = h(y), [V, H] = h(), [U, W] = h(), [G, K] = h(b);
32
+ b !== G && (K(b), b || W(void 0));
33
+ let q = m(() => (D.data?.data ?? []).map((e) => ({
31
34
  id: e.id,
32
35
  name: e.name,
33
36
  description: e.description ?? ""
34
- })), [T.data]), K = f(() => {
35
- let e = k.trim().toLowerCase();
36
- return e ? G.filter((t) => t.name.toLowerCase().includes(e) || t.description.toLowerCase().includes(e)) : G;
37
- }, [G, k]), q = s(V?.id, { enabled: v && !b }), J = f(() => (q.data?.data ?? []).map((e) => ({
37
+ })), [D.data]), J = m(() => {
38
+ let e = j.trim().toLowerCase();
39
+ return e ? q.filter((t) => t.name.toLowerCase().includes(e) || t.description.toLowerCase().includes(e)) : q;
40
+ }, [q, j]), Y = l(U?.id, { enabled: b && !S }), X = m(() => (Y.data?.data ?? []).map((e) => ({
38
41
  id: e.id,
39
42
  name: e.name,
40
- priceLabel: n(e.price)
41
- })), [q.data]), Y = d(async () => {
42
- if (b) return;
43
- let t = r(j, w);
44
- if (t) {
45
- P(t);
43
+ priceLabel: r(e.price)
44
+ })), [Y.data]), Z = p(async () => {
45
+ if (S) return;
46
+ let e = i(N, E);
47
+ if (e) {
48
+ I(e);
46
49
  return;
47
50
  }
48
- P(void 0);
51
+ I(void 0);
49
52
  try {
50
- await E.mutateAsync({ body: {
51
- name: j.name.trim(),
52
- description: j.description.trim() || void 0
53
- } }), M(_);
54
- } catch (t) {
55
- P(e(t) ?? w.createMeasureUnitError);
53
+ let e = await O.mutateAsync({ body: {
54
+ name: N.name.trim(),
55
+ description: N.description.trim() || void 0
56
+ } });
57
+ a(E.measureUnitCreated, e.name), P(y);
58
+ } catch (e) {
59
+ I(t(e) ?? E.createMeasureUnitError);
56
60
  }
57
61
  }, [
58
- b,
59
- j,
60
- E,
61
- w
62
- ]), X = d((e) => {
63
- I(e.id), R({
62
+ S,
63
+ N,
64
+ O,
65
+ E
66
+ ]), Q = p((e) => {
67
+ R(e.id), B({
64
68
  name: e.name,
65
69
  description: e.description
66
- }), B(void 0);
67
- }, []), Z = d(async () => {
68
- if (b || !F) return;
69
- let t = r(L, w);
70
- if (t) {
71
- B(t);
70
+ }), H(void 0);
71
+ }, []), $ = p(async () => {
72
+ if (S || !L) return;
73
+ let e = i(z, E);
74
+ if (e) {
75
+ H(e);
72
76
  return;
73
77
  }
74
- B(void 0);
78
+ H(void 0);
75
79
  try {
76
- await D.mutateAsync({
77
- path: { unit_id: F },
80
+ let e = await k.mutateAsync({
81
+ path: { unit_id: L },
78
82
  body: {
79
- name: L.name.trim(),
80
- description: L.description.trim() || void 0
83
+ name: z.name.trim(),
84
+ description: z.description.trim() || void 0
81
85
  }
82
- }), I(void 0);
83
- } catch (t) {
84
- B(e(t) ?? w.updateMeasureUnitError);
86
+ });
87
+ a(E.measureUnitUpdated, e.name), R(void 0);
88
+ } catch (e) {
89
+ H(t(e) ?? E.updateMeasureUnitError);
85
90
  }
86
91
  }, [
87
- b,
88
- F,
92
+ S,
89
93
  L,
90
- D,
91
- w
92
- ]), Q = d(async () => {
93
- if (!b && V) try {
94
- await O.mutateAsync({ path: { unit_id: V.id } }), H(void 0);
95
- } catch {}
94
+ z,
95
+ k,
96
+ E
97
+ ]), ee = p(async () => {
98
+ if (!S && U) try {
99
+ await A.mutateAsync({ path: { unit_id: U.id } }), a(E.measureUnitDeleted, U.name), W(void 0);
100
+ } catch (n) {
101
+ e.error(t(n) ?? E.deleteMeasureUnitError);
102
+ }
96
103
  }, [
97
- b,
98
- V,
99
- O
104
+ S,
105
+ U,
106
+ A,
107
+ E
100
108
  ]);
101
- return /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(i, {
102
- open: v,
109
+ return /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(o, {
110
+ open: b,
103
111
  onOpenChange: (e) => {
104
- e || y();
112
+ e || x();
105
113
  },
106
- units: K,
107
- isLoading: T.isLoading,
108
- searchValue: k,
109
- onSearchChange: A,
110
- createValues: j,
111
- createError: N,
112
- onCreateChange: (e) => M((t) => ({
114
+ units: J,
115
+ isLoading: D.isLoading,
116
+ searchValue: j,
117
+ onSearchChange: M,
118
+ createValues: N,
119
+ createError: F,
120
+ onCreateChange: (e) => P((t) => ({
113
121
  ...t,
114
122
  ...e
115
123
  })),
116
- onCreateSubmit: Y,
117
- isCreating: E.isPending || b,
118
- editingUnitId: F,
119
- editValues: L,
120
- editError: z,
121
- onEditStart: X,
122
- onEditChange: (e) => R((t) => ({
124
+ onCreateSubmit: Z,
125
+ isCreating: O.isPending || S,
126
+ editingUnitId: L,
127
+ editValues: z,
128
+ editError: V,
129
+ onEditStart: Q,
130
+ onEditChange: (e) => B((t) => ({
123
131
  ...t,
124
132
  ...e
125
133
  })),
126
- onEditSubmit: Z,
127
- onEditCancel: () => I(void 0),
128
- isUpdating: D.isPending || b,
129
- onDeleteClick: H,
130
- onDone: y,
131
- labels: x
132
- }), /* @__PURE__ */ h(a, {
133
- open: !!V,
134
+ onEditSubmit: $,
135
+ onEditCancel: () => R(void 0),
136
+ isUpdating: k.isPending || S,
137
+ onDeleteClick: W,
138
+ onDone: x,
139
+ labels: C
140
+ }), /* @__PURE__ */ _(s, {
141
+ open: !!U,
134
142
  onOpenChange: (e) => {
135
- e || H(void 0);
143
+ e || W(void 0);
136
144
  },
137
- unitName: V?.name ?? "",
138
- affectedProducts: J,
139
- isLoadingProducts: q.isLoading,
140
- isDeleting: O.isPending || b,
141
- onConfirm: Q,
142
- onCancel: () => H(void 0),
143
- labels: S
145
+ unitName: U?.name ?? "",
146
+ affectedProducts: X,
147
+ isLoadingProducts: Y.isLoading,
148
+ isDeleting: A.isPending || S,
149
+ onConfirm: ee,
150
+ onCancel: () => W(void 0),
151
+ labels: w
144
152
  })] });
145
153
  }
146
154
  //#endregion
147
- export { v as MeasureUnitsManagerContainer, v as default };
155
+ export { b as MeasureUnitsManagerContainer, b as default };
@@ -9,7 +9,16 @@ var e = {
9
9
  unitNameRequired: "Unit label is required",
10
10
  genericError: "Something went wrong. Please try again.",
11
11
  createMeasureUnitError: "Failed to create measure unit.",
12
- updateMeasureUnitError: "Failed to update measure unit."
12
+ updateMeasureUnitError: "Failed to update measure unit.",
13
+ productCreated: "{name} has been added to the list.",
14
+ productUpdated: "Product {name} was updated.",
15
+ serviceUpdated: "Service {name} was updated.",
16
+ productDeleted: "Product was deleted.",
17
+ deleteProductError: "Failed to delete product.",
18
+ measureUnitCreated: "Unit {name} was added to the list",
19
+ measureUnitUpdated: "Unit {name} was updated",
20
+ measureUnitDeleted: "Unit {name} was deleted from the list.",
21
+ deleteMeasureUnitError: "Failed to delete Unit."
13
22
  };
14
23
  //#endregion
15
24
  export { e as PRODUCT_MESSAGE_LABELS_EN };
@@ -0,0 +1,14 @@
1
+ import { toast as e } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { ToastNameMessage as t } from "../../../../ui/dist/lib/ToastNameMessage/ToastNameMessage.js";
3
+ import "../../../../ui/dist/index.js";
4
+ import { jsx as n } from "react/jsx-runtime";
5
+ //#region ../../libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/toasts.js
6
+ var r = "{name}";
7
+ function i(i, a) {
8
+ e.success(/* @__PURE__ */ n(t, {
9
+ segments: i.split(r),
10
+ name: a
11
+ }));
12
+ }
13
+ //#endregion
14
+ export { i as toastSuccessWithName };
@@ -4,54 +4,62 @@
4
4
  "use client";
5
5
  import { extractApiErrorMessage as e } from "../../../../util/dist/lib/apiErrors.js";
6
6
  import { EMPTY_PRODUCT_FORM_VALUES as t, getCurrencyOptions as n, hasProductFormErrors as r, productFormValuesToRequest as i, productFormValuesToUpdateRequest as a, productToFormValues as o, validateProductForm as s } from "./helpers.js";
7
- import { useCreateProductMutation as c } from "../../../data-access/dist/index6.js";
8
- import { useUpdateProductMutation as l } from "../../../data-access/dist/index7.js";
7
+ import { toastSuccessWithName as c } from "./toasts.js";
8
+ import { useCreateProductMutation as l } from "../../../data-access/dist/index6.js";
9
+ import { useUpdateProductMutation as u } from "../../../data-access/dist/index7.js";
9
10
  import "../../../data-access/dist/index.js";
10
- import { useCallback as u, useMemo as d, useState as f } from "react";
11
+ import { useCallback as d, useMemo as f, useState as p } from "react";
11
12
  //#region ../../libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/useProductForm.js
12
- function p({ view: p, setView: m, selectedProductId: h, setSelectedProductId: g, product: _, messages: v }) {
13
- let y = c(), b = l(), x = y.isPending || b.isPending, [S, C] = f(t), [w, T] = f({});
13
+ function m({ view: m, setView: h, selectedProductId: g, setSelectedProductId: _, product: v, messages: y }) {
14
+ let b = l(), x = u(), S = b.isPending || x.isPending, [C, w] = p(t), [T, E] = p({});
14
15
  return {
15
- values: S,
16
- errors: w,
17
- setValues: C,
18
- currencyOptions: d(() => n(S.currency), [S.currency]),
19
- isSubmitting: x,
20
- openCreate: u(() => {
21
- g(void 0), C(t), T({}), m("create");
22
- }, [g, m]),
23
- openEdit: u(() => {
24
- _ && (C(o(_)), T({}), m("edit"));
25
- }, [_, m]),
26
- close: u(() => {
27
- m("none"), g(void 0);
28
- }, [g, m]),
29
- submit: u(async () => {
30
- let t = s(S, v);
16
+ values: C,
17
+ errors: T,
18
+ setValues: w,
19
+ currencyOptions: f(() => n(C.currency), [C.currency]),
20
+ isSubmitting: S,
21
+ openCreate: d(() => {
22
+ _(void 0), w(t), E({}), h("create");
23
+ }, [_, h]),
24
+ openEdit: d(() => {
25
+ v && (w(o(v)), E({}), h("edit"));
26
+ }, [v, h]),
27
+ close: d(() => {
28
+ h("none"), _(void 0);
29
+ }, [_, h]),
30
+ submit: d(async () => {
31
+ let t = s(C, y);
31
32
  if (r(t)) {
32
- T(t);
33
+ E(t);
33
34
  return;
34
35
  }
35
- T({});
36
+ E({});
36
37
  try {
37
- p === "edit" && h ? await b.mutateAsync({
38
- path: { product_id: h },
39
- body: a(S)
40
- }) : await y.mutateAsync({ body: i(S) }), m("none"), g(void 0);
38
+ if (m === "edit" && g) {
39
+ let e = await x.mutateAsync({
40
+ path: { product_id: g },
41
+ body: a(C)
42
+ });
43
+ c(e.type === "service" ? y.serviceUpdated : y.productUpdated, e.name);
44
+ } else {
45
+ let e = await b.mutateAsync({ body: i(C) });
46
+ c(y.productCreated, e.name);
47
+ }
48
+ h("none"), _(void 0);
41
49
  } catch (t) {
42
- T({ form: e(t) ?? v.genericError });
50
+ E({ form: e(t) ?? y.genericError });
43
51
  }
44
52
  }, [
45
- S,
46
- p,
47
- h,
48
- y,
49
- b,
50
- v,
53
+ C,
51
54
  m,
52
- g
55
+ g,
56
+ b,
57
+ x,
58
+ y,
59
+ h,
60
+ _
53
61
  ])
54
62
  };
55
63
  }
56
64
  //#endregion
57
- export { p as useProductForm };
65
+ export { m as useProductForm };
@@ -2,24 +2,25 @@ import "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
2
  import { avatarSwatchFor as e } from "./lib/avatarSwatch.js";
3
3
  import "./lib/ProductIntroModal/ProductIntroModal.js";
4
4
  import { EmbeddedToaster as t } from "./lib/EmbeddedToaster.js";
5
- import { UIFramework as n, resolveUIFramework as r } from "./lib/UIContext/UIContext.js";
6
- import { UIProvider as i } from "./lib/UIContext/UIProvider.js";
5
+ import { ToastNameMessage as n } from "./lib/ToastNameMessage/ToastNameMessage.js";
6
+ import { UIFramework as r, resolveUIFramework as i } from "./lib/UIContext/UIContext.js";
7
+ import { UIProvider as a } from "./lib/UIContext/UIProvider.js";
7
8
  import "./lib/UIContext/useLinkComponent.js";
8
9
  import "./lib/UIContext/useUIFramework.js";
9
- import { registerDesignSystemEnsurer as a, registerUIRenderers as o, useDesignSystemEnsurer as s, useFrameworkRenderer as c } from "./lib/UIContext/uiRendererRegistry.js";
10
+ import { registerDesignSystemEnsurer as o, registerUIRenderers as s, useDesignSystemEnsurer as c, useFrameworkRenderer as l } from "./lib/UIContext/uiRendererRegistry.js";
10
11
  import "./lib/UIContext/index.js";
11
- import { HostIsolationScope as l } from "./lib/HostIsolationScope/HostIsolationScope.js";
12
- import { Link as u } from "./lib/Link/Link.js";
13
- import { WidgetContainer as d } from "./lib/WidgetContainer/WidgetContainer.js";
14
- import { EmptyState as f } from "./lib/EmptyState/EmptyState.js";
15
- import { ERROR_STATE_ID as p, ErrorState as m } from "./lib/ErrorState/ErrorState.js";
16
- import { InlineErrorAlert as h } from "./lib/InlineErrorAlert/InlineErrorAlert.js";
17
- import { PAGINATION_FOOTER_LABELS_EN as g } from "./lib/PaginationFooter/labels.js";
18
- import { PaginationFooter as _ } from "./lib/PaginationFooter/PaginationFooter.js";
19
- import { WidgetTitleWithIconAndChildren as v } from "./lib/WidgetTitleWithIconAndChildren/WidgetTitleWithIconAndChildren.js";
12
+ import { HostIsolationScope as u } from "./lib/HostIsolationScope/HostIsolationScope.js";
13
+ import { Link as d } from "./lib/Link/Link.js";
14
+ import { WidgetContainer as f } from "./lib/WidgetContainer/WidgetContainer.js";
15
+ import { EmptyState as p } from "./lib/EmptyState/EmptyState.js";
16
+ import { ERROR_STATE_ID as m, ErrorState as h } from "./lib/ErrorState/ErrorState.js";
17
+ import { InlineErrorAlert as g } from "./lib/InlineErrorAlert/InlineErrorAlert.js";
18
+ import { PAGINATION_FOOTER_LABELS_EN as _ } from "./lib/PaginationFooter/labels.js";
19
+ import { PaginationFooter as v } from "./lib/PaginationFooter/PaginationFooter.js";
20
+ import { WidgetTitleWithIconAndChildren as y } from "./lib/WidgetTitleWithIconAndChildren/WidgetTitleWithIconAndChildren.js";
20
21
  import "./lib/OnboardingShell/labels.js";
21
22
  import "./lib/OnboardingShell/OnboardingShellStepper.js";
22
- import { OnboardingShellOverlayPortal as y } from "./lib/OnboardingShell/OnboardingShellOverlayPortal.js";
23
- import { OnboardingShell as b } from "./lib/OnboardingShell/OnboardingShell.js";
24
- import { SectionHeading as x } from "./lib/SectionHeading/SectionHeading.js";
25
- export { p as ERROR_STATE_ID, t as EmbeddedToaster, f as EmptyState, m as ErrorState, l as HostIsolationScope, h as InlineErrorAlert, u as Link, b as OnboardingShell, y as OnboardingShellOverlayPortal, g as PAGINATION_FOOTER_LABELS_EN, _ as PaginationFooter, x as SectionHeading, n as UIFramework, i as UIProvider, d as WidgetContainer, v as WidgetTitleWithIconAndChildren, e as avatarSwatchFor, a as registerDesignSystemEnsurer, o as registerUIRenderers, r as resolveUIFramework, s as useDesignSystemEnsurer, c as useFrameworkRenderer };
23
+ import { OnboardingShellOverlayPortal as b } from "./lib/OnboardingShell/OnboardingShellOverlayPortal.js";
24
+ import { OnboardingShell as x } from "./lib/OnboardingShell/OnboardingShell.js";
25
+ import { SectionHeading as S } from "./lib/SectionHeading/SectionHeading.js";
26
+ export { m as ERROR_STATE_ID, t as EmbeddedToaster, p as EmptyState, h as ErrorState, u as HostIsolationScope, g as InlineErrorAlert, d as Link, x as OnboardingShell, b as OnboardingShellOverlayPortal, _ as PAGINATION_FOOTER_LABELS_EN, v as PaginationFooter, S as SectionHeading, n as ToastNameMessage, r as UIFramework, a as UIProvider, f as WidgetContainer, y as WidgetTitleWithIconAndChildren, e as avatarSwatchFor, o as registerDesignSystemEnsurer, s as registerUIRenderers, i as resolveUIFramework, c as useDesignSystemEnsurer, l as useFrameworkRenderer };
@@ -0,0 +1,18 @@
1
+ import { Fragment as e } from "react";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ //#region ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/ToastNameMessage/ToastNameMessage.js
4
+ function r({ segments: r, name: i }) {
5
+ return /* @__PURE__ */ t("span", {
6
+ className: "ttw:flex ttw:min-w-0",
7
+ children: r.map((a, o) => /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
8
+ className: "ttw:whitespace-pre-wrap",
9
+ children: a
10
+ }), o < r.length - 1 && /* @__PURE__ */ t("span", {
11
+ className: "ttw:min-w-[4ch] ttw:shrink-9999 ttw:truncate",
12
+ title: i,
13
+ children: i
14
+ })] }, o))
15
+ });
16
+ }
17
+ //#endregion
18
+ export { r as ToastNameMessage };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.7.62",
3
+ "version": "0.7.64",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": [