@tesouro/embedded-components-react 0.11.104 → 0.11.105
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/dist/index.d.ts +5 -1
- package/dist/lib/ProductsWidget.d.ts +5 -1
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/lib/ProductsWidget/ProductsWidget.js +60 -59
- package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index4.js +79 -78
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -5731,6 +5731,10 @@ interface ProductsWidgetOwnProps {
|
|
|
5731
5731
|
/** Public props for {@link ProductsWidget}. */
|
|
5732
5732
|
type ProductsWidgetProps = WidgetProviderProps & ProductsWidgetOwnProps;
|
|
5733
5733
|
|
|
5734
|
+
/** Kept off the exported {@link ProductsWidgetProps}: only Invoicing's tab row passes the slot. */
|
|
5735
|
+
interface ProductsWidgetInternalProps extends ProductsWidgetProps {
|
|
5736
|
+
headerActionContainer?: HTMLElement | null;
|
|
5737
|
+
}
|
|
5734
5738
|
/**
|
|
5735
5739
|
* Self-contained products/services widget: lists, filters, creates, edits,
|
|
5736
5740
|
* views, and deletes products, and manages measure units. The provider/inner
|
|
@@ -5741,7 +5745,7 @@ type ProductsWidgetProps = WidgetProviderProps & ProductsWidgetOwnProps;
|
|
|
5741
5745
|
* <ProductsWidget baseUrl="https://api.tesouro.com" widgetToken="wt_..." organizationId="org_..." />
|
|
5742
5746
|
* ```
|
|
5743
5747
|
*/
|
|
5744
|
-
declare function ProductsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }:
|
|
5748
|
+
declare function ProductsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: ProductsWidgetInternalProps): React.JSX.Element;
|
|
5745
5749
|
|
|
5746
5750
|
declare const InvoicesFilterField: {
|
|
5747
5751
|
readonly DueDate: "dueDate";
|
|
@@ -873,6 +873,10 @@ interface ProductsWidgetOwnProps {
|
|
|
873
873
|
/** Public props for {@link ProductsWidget}. */
|
|
874
874
|
type ProductsWidgetProps = WidgetProviderProps & ProductsWidgetOwnProps;
|
|
875
875
|
|
|
876
|
+
/** Kept off the exported {@link ProductsWidgetProps}: only Invoicing's tab row passes the slot. */
|
|
877
|
+
interface ProductsWidgetInternalProps extends ProductsWidgetProps {
|
|
878
|
+
headerActionContainer?: HTMLElement | null;
|
|
879
|
+
}
|
|
876
880
|
/**
|
|
877
881
|
* Self-contained products/services widget: lists, filters, creates, edits,
|
|
878
882
|
* views, and deletes products, and manages measure units. The provider/inner
|
|
@@ -883,7 +887,7 @@ type ProductsWidgetProps = WidgetProviderProps & ProductsWidgetOwnProps;
|
|
|
883
887
|
* <ProductsWidget baseUrl="https://api.tesouro.com" widgetToken="wt_..." organizationId="org_..." />
|
|
884
888
|
* ```
|
|
885
889
|
*/
|
|
886
|
-
declare function ProductsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }:
|
|
890
|
+
declare function ProductsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, uiFramework, errorFallback, onError, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: ProductsWidgetInternalProps): React.JSX.Element;
|
|
887
891
|
|
|
888
892
|
export { ProductsWidget };
|
|
889
893
|
export type { MeasureUnitDeleteDialogLabels, MeasureUnitsManagerLabels, ProductDeleteDialogLabels, ProductDetailsSheetLabels, ProductFormSheetLabels, ProductMessageLabels, ProductsScreenLabels, ProductsWidgetProps };
|
|
@@ -22,12 +22,12 @@ import { useProductsWidget as p } from "./useProductsWidget.js";
|
|
|
22
22
|
import { useEffect as m } from "react";
|
|
23
23
|
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
24
24
|
// ../../libs/tesouro-embedded-components-react/products-widget/feature/dist/lib/ProductsWidget/ProductsWidget.js
|
|
25
|
-
function v({ pageSizeOptions: n = c, screenLabels: s, formLabels: v, detailsLabels: y, deleteLabels: b, measureUnitsLabels: x, measureUnitDeleteLabels: S, messageLabels: C }) {
|
|
26
|
-
let
|
|
25
|
+
function v({ pageSizeOptions: n = c, screenLabels: s, formLabels: v, detailsLabels: y, deleteLabels: b, measureUnitsLabels: x, measureUnitDeleteLabels: S, messageLabels: C, headerActionContainer: w }) {
|
|
26
|
+
let T = t();
|
|
27
27
|
m(() => {
|
|
28
|
-
|
|
29
|
-
}, [
|
|
30
|
-
let { view:
|
|
28
|
+
T(o.Mounted);
|
|
29
|
+
}, [T]);
|
|
30
|
+
let { view: E, units: D, table: O, details: k, form: A, del: j, permissions: M, isPermissionLoading: N, isTableLoading: P, hasInitError: F, refetchWidgetInit: I, measureUnitsOpen: L, actionsSuspended: R, editForm: z, handleRowClick: B, openMeasureUnits: V, closeMeasureUnits: H, addUnitOpen: U, openAddUnit: W, closeAddUnit: G, selectAddedUnit: K, submitForm: q, confirmDelete: J } = p({
|
|
31
31
|
messageLabels: C,
|
|
32
32
|
screenLabels: s,
|
|
33
33
|
formLabels: v
|
|
@@ -35,27 +35,28 @@ function v({ pageSizeOptions: n = c, screenLabels: s, formLabels: v, detailsLabe
|
|
|
35
35
|
return /* @__PURE__ */ _(h, { children: [
|
|
36
36
|
/* @__PURE__ */ g(e, {}),
|
|
37
37
|
/* @__PURE__ */ g(u, {
|
|
38
|
-
products:
|
|
39
|
-
isLoading:
|
|
40
|
-
isError:
|
|
41
|
-
sorting:
|
|
42
|
-
onSortingChange:
|
|
43
|
-
pageSize:
|
|
44
|
-
onPageSizeChange:
|
|
38
|
+
products: O.rows,
|
|
39
|
+
isLoading: P,
|
|
40
|
+
isError: F || O.isError,
|
|
41
|
+
sorting: O.sorting,
|
|
42
|
+
onSortingChange: O.onSortingChange,
|
|
43
|
+
pageSize: O.pageSize,
|
|
44
|
+
onPageSizeChange: O.onPageSizeChange,
|
|
45
45
|
pageSizeOptions: n,
|
|
46
|
-
hasNextPage:
|
|
47
|
-
hasPrevPage:
|
|
48
|
-
onNextPage:
|
|
49
|
-
onPrevPage:
|
|
50
|
-
filters:
|
|
51
|
-
isFiltering:
|
|
52
|
-
canCreate:
|
|
53
|
-
canManageUnits:
|
|
54
|
-
isAccessRestricted: !
|
|
55
|
-
onCreateClick:
|
|
56
|
-
onManageUnitsClick:
|
|
57
|
-
onRowClick:
|
|
58
|
-
onRetry:
|
|
46
|
+
hasNextPage: O.hasNextPage,
|
|
47
|
+
hasPrevPage: O.hasPrevPage,
|
|
48
|
+
onNextPage: O.onNextPage,
|
|
49
|
+
onPrevPage: O.onPrevPage,
|
|
50
|
+
filters: O.filters,
|
|
51
|
+
isFiltering: O.isFiltering,
|
|
52
|
+
canCreate: M.canCreate,
|
|
53
|
+
canManageUnits: M.canCreate,
|
|
54
|
+
isAccessRestricted: !N && !F && !M.canRead,
|
|
55
|
+
onCreateClick: A.openCreate,
|
|
56
|
+
onManageUnitsClick: V,
|
|
57
|
+
onRowClick: B,
|
|
58
|
+
onRetry: F ? I : O.onRetry,
|
|
59
|
+
headerActionContainer: w,
|
|
59
60
|
labels: s,
|
|
60
61
|
testIds: {
|
|
61
62
|
empty: l.empty,
|
|
@@ -63,57 +64,57 @@ function v({ pageSizeOptions: n = c, screenLabels: s, formLabels: v, detailsLabe
|
|
|
63
64
|
}
|
|
64
65
|
}),
|
|
65
66
|
/* @__PURE__ */ g(r, {
|
|
66
|
-
open:
|
|
67
|
+
open: E === "create",
|
|
67
68
|
onOpenChange: (e) => {
|
|
68
|
-
e ||
|
|
69
|
+
e || A.close();
|
|
69
70
|
},
|
|
70
|
-
values:
|
|
71
|
-
errors:
|
|
72
|
-
unitOptions:
|
|
73
|
-
pricePrefix:
|
|
74
|
-
inProgress:
|
|
75
|
-
onChange:
|
|
76
|
-
onSubmit:
|
|
77
|
-
onCancel:
|
|
78
|
-
onAddUnit:
|
|
71
|
+
values: A.values,
|
|
72
|
+
errors: A.errors,
|
|
73
|
+
unitOptions: D.unitOptions,
|
|
74
|
+
pricePrefix: A.pricePrefix,
|
|
75
|
+
inProgress: A.isSubmitting || R,
|
|
76
|
+
onChange: A.change,
|
|
77
|
+
onSubmit: q,
|
|
78
|
+
onCancel: A.close,
|
|
79
|
+
onAddUnit: M.canCreate ? W : void 0,
|
|
79
80
|
labels: v
|
|
80
81
|
}),
|
|
81
82
|
/* @__PURE__ */ g(d, {
|
|
82
|
-
open:
|
|
83
|
+
open: E === "details" || E === "edit",
|
|
83
84
|
onOpenChange: (e) => {
|
|
84
|
-
e ||
|
|
85
|
+
e || A.close();
|
|
85
86
|
},
|
|
86
|
-
product:
|
|
87
|
-
isLoading:
|
|
88
|
-
isError:
|
|
89
|
-
onEdit:
|
|
90
|
-
onDelete:
|
|
91
|
-
canEdit:
|
|
92
|
-
canDelete:
|
|
93
|
-
editForm:
|
|
87
|
+
product: k.detailsView,
|
|
88
|
+
isLoading: k.isLoading,
|
|
89
|
+
isError: k.isError,
|
|
90
|
+
onEdit: A.openEdit,
|
|
91
|
+
onDelete: j.requestDelete,
|
|
92
|
+
canEdit: M.canUpdate,
|
|
93
|
+
canDelete: M.canDelete,
|
|
94
|
+
editForm: z,
|
|
94
95
|
labels: y
|
|
95
96
|
}),
|
|
96
97
|
/* @__PURE__ */ g(f, {
|
|
97
|
-
open:
|
|
98
|
-
onOpenChange:
|
|
99
|
-
productName:
|
|
100
|
-
isDeleting:
|
|
101
|
-
onConfirm:
|
|
102
|
-
onCancel:
|
|
98
|
+
open: j.open,
|
|
99
|
+
onOpenChange: j.onOpenChange,
|
|
100
|
+
productName: k.productName,
|
|
101
|
+
isDeleting: j.isDeleting || R,
|
|
102
|
+
onConfirm: J,
|
|
103
|
+
onCancel: j.cancel,
|
|
103
104
|
labels: b
|
|
104
105
|
}),
|
|
105
106
|
/* @__PURE__ */ g(a, {
|
|
106
|
-
open:
|
|
107
|
-
onClose:
|
|
108
|
-
onCreated:
|
|
109
|
-
suspended:
|
|
107
|
+
open: U,
|
|
108
|
+
onClose: G,
|
|
109
|
+
onCreated: K,
|
|
110
|
+
suspended: R,
|
|
110
111
|
labels: x,
|
|
111
112
|
messageLabels: C
|
|
112
113
|
}),
|
|
113
114
|
/* @__PURE__ */ g(i, {
|
|
114
|
-
open:
|
|
115
|
-
onClose:
|
|
116
|
-
suspended:
|
|
115
|
+
open: L,
|
|
116
|
+
onClose: H,
|
|
117
|
+
suspended: R,
|
|
117
118
|
managerLabels: x,
|
|
118
119
|
deleteLabels: S,
|
|
119
120
|
messageLabels: C
|
|
@@ -5,78 +5,79 @@ import { NoAccessState as h } from "../../../shared/ui/dist/lib/StatePanel/NoAcc
|
|
|
5
5
|
import "../../../shared/ui/dist/index.js";
|
|
6
6
|
import { PRODUCTS_SCREEN_LABELS_EN as g } from "./index2.js";
|
|
7
7
|
import { ProductTypeBadge as _ } from "./index3.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { createPortal as v } from "react-dom";
|
|
9
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
10
|
+
import { ListFilter as S } from "lucide-react";
|
|
10
11
|
// ../../libs/tesouro-embedded-components-react/products-widget/ui/dist/index4.js
|
|
11
|
-
var
|
|
12
|
+
var C = [
|
|
12
13
|
10,
|
|
13
14
|
25,
|
|
14
15
|
50,
|
|
15
16
|
100
|
|
16
|
-
],
|
|
17
|
-
function
|
|
18
|
-
return /* @__PURE__ */
|
|
17
|
+
], w = "ttw:flex ttw:w-full ttw:cursor-pointer ttw:items-center ttw:gap-2 ttw:rounded-md ttw:px-2 ttw:py-1.5 ttw:text-xs ttw:font-medium ttw:transition-colors ttw:hover:bg-accent";
|
|
18
|
+
function T({ labels: e, filters: t, action: n }) {
|
|
19
|
+
return /* @__PURE__ */ b(f, {
|
|
19
20
|
className: "ttw:px-4",
|
|
20
|
-
search: /* @__PURE__ */
|
|
21
|
+
search: /* @__PURE__ */ b(d, {
|
|
21
22
|
value: t.searchValue,
|
|
22
23
|
onChange: (e) => t.onSearchChange(e.target.value),
|
|
23
24
|
placeholder: e.searchPlaceholder,
|
|
24
25
|
"aria-label": e.searchLabel,
|
|
25
26
|
className: "ttw:min-w-64"
|
|
26
27
|
}),
|
|
27
|
-
filterButton: /* @__PURE__ */
|
|
28
|
+
filterButton: /* @__PURE__ */ x(o, {
|
|
28
29
|
open: t.isPopoverOpen,
|
|
29
30
|
onOpenChange: (e) => {
|
|
30
31
|
e || t.onPopoverClose();
|
|
31
32
|
},
|
|
32
|
-
children: [/* @__PURE__ */
|
|
33
|
+
children: [/* @__PURE__ */ b(c, {
|
|
33
34
|
asChild: !0,
|
|
34
|
-
children: /* @__PURE__ */
|
|
35
|
+
children: /* @__PURE__ */ b(r, {
|
|
35
36
|
activeCount: t.activeFilterCount,
|
|
36
37
|
onClick: (e) => {
|
|
37
38
|
t.isPanelOpen && e.preventDefault(), t.onMenuToggle();
|
|
38
39
|
},
|
|
39
40
|
labels: { filters: e.filtersButton }
|
|
40
41
|
})
|
|
41
|
-
}), /* @__PURE__ */
|
|
42
|
+
}), /* @__PURE__ */ x(s, {
|
|
42
43
|
align: "start",
|
|
43
44
|
className: "ttw:w-56 ttw:p-0",
|
|
44
45
|
children: [
|
|
45
|
-
t.isMenuOpen && /* @__PURE__ */
|
|
46
|
+
t.isMenuOpen && /* @__PURE__ */ x("div", {
|
|
46
47
|
className: "ttw:p-1",
|
|
47
|
-
children: [/* @__PURE__ */
|
|
48
|
+
children: [/* @__PURE__ */ x("button", {
|
|
48
49
|
type: "button",
|
|
49
|
-
className:
|
|
50
|
+
className: w,
|
|
50
51
|
onClick: t.onTypeFieldSelect,
|
|
51
|
-
children: [/* @__PURE__ */
|
|
52
|
+
children: [/* @__PURE__ */ b(S, {
|
|
52
53
|
className: "ttw:size-4 ttw:shrink-0 ttw:text-muted-foreground",
|
|
53
54
|
"aria-hidden": !0
|
|
54
55
|
}), e.filterFieldType]
|
|
55
|
-
}), /* @__PURE__ */
|
|
56
|
+
}), /* @__PURE__ */ x("button", {
|
|
56
57
|
type: "button",
|
|
57
|
-
className:
|
|
58
|
+
className: w,
|
|
58
59
|
onClick: t.onUnitFieldSelect,
|
|
59
|
-
children: [/* @__PURE__ */
|
|
60
|
+
children: [/* @__PURE__ */ b(S, {
|
|
60
61
|
className: "ttw:size-4 ttw:shrink-0 ttw:text-muted-foreground",
|
|
61
62
|
"aria-hidden": !0
|
|
62
63
|
}), e.filterFieldUnit]
|
|
63
64
|
})]
|
|
64
65
|
}),
|
|
65
|
-
t.isTypePanelOpen && /* @__PURE__ */
|
|
66
|
+
t.isTypePanelOpen && /* @__PURE__ */ b(a, {
|
|
66
67
|
options: [...t.typeOptions],
|
|
67
68
|
selectedValues: [...t.selectedTypes],
|
|
68
69
|
onSelectionChange: t.onTypeChange
|
|
69
70
|
}),
|
|
70
|
-
t.isUnitPanelOpen && /* @__PURE__ */
|
|
71
|
+
t.isUnitPanelOpen && /* @__PURE__ */ b("div", {
|
|
71
72
|
className: "ttw:max-h-64 ttw:overflow-auto ttw:p-3",
|
|
72
|
-
children: /* @__PURE__ */
|
|
73
|
+
children: /* @__PURE__ */ b(l, {
|
|
73
74
|
value: t.selectedUnit,
|
|
74
75
|
onValueChange: t.onUnitChange,
|
|
75
76
|
"aria-label": e.filterFieldUnit,
|
|
76
77
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
77
|
-
children: t.unitOptions.map((e) => /* @__PURE__ */
|
|
78
|
+
children: t.unitOptions.map((e) => /* @__PURE__ */ x("label", {
|
|
78
79
|
className: "ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2",
|
|
79
|
-
children: [/* @__PURE__ */
|
|
80
|
+
children: [/* @__PURE__ */ b(u, { value: e.value }), /* @__PURE__ */ b("span", {
|
|
80
81
|
className: "ttw:text-xs ttw:font-medium",
|
|
81
82
|
children: e.label
|
|
82
83
|
})]
|
|
@@ -87,12 +88,12 @@ function w({ labels: e, filters: t, action: n }) {
|
|
|
87
88
|
})]
|
|
88
89
|
}),
|
|
89
90
|
action: n,
|
|
90
|
-
tags: /* @__PURE__ */
|
|
91
|
+
tags: /* @__PURE__ */ x(y, { children: [t.chips.map((n) => /* @__PURE__ */ b(i, {
|
|
91
92
|
label: n.label,
|
|
92
93
|
variant: "default",
|
|
93
94
|
labels: { remove: e.filterChipRemove },
|
|
94
95
|
onDismiss: () => t.onRemoveChip(n.key)
|
|
95
|
-
}, n.key)), t.chips.length > 0 && /* @__PURE__ */
|
|
96
|
+
}, n.key)), t.chips.length > 0 && /* @__PURE__ */ b("button", {
|
|
96
97
|
type: "button",
|
|
97
98
|
className: "ttw:cursor-pointer ttw:whitespace-nowrap ttw:text-xs ttw:text-muted-foreground ttw:transition-colors ttw:hover:text-foreground",
|
|
98
99
|
onClick: t.onClearAll,
|
|
@@ -100,24 +101,28 @@ function w({ labels: e, filters: t, action: n }) {
|
|
|
100
101
|
})] })
|
|
101
102
|
});
|
|
102
103
|
}
|
|
103
|
-
function
|
|
104
|
-
let
|
|
104
|
+
function E({ products: r, isLoading: i, isError: a, sorting: o, onSortingChange: s, pageSize: c, onPageSizeChange: l, pageSizeOptions: u = C, hasNextPage: d, hasPrevPage: f, onNextPage: S, onPrevPage: w, filters: E, isFiltering: D, onCreateClick: O, onManageUnitsClick: k, onRowClick: A, onRetry: j, headerActionContainer: M, canCreate: N = !0, canManageUnits: P = !0, isAccessRestricted: F, labels: I, testIds: L }) {
|
|
105
|
+
let R = {
|
|
105
106
|
...g,
|
|
106
|
-
...
|
|
107
|
+
...I,
|
|
107
108
|
typeBadge: {
|
|
108
109
|
...g.typeBadge,
|
|
109
|
-
...
|
|
110
|
+
...I?.typeBadge
|
|
110
111
|
}
|
|
111
|
-
},
|
|
112
|
+
}, z = !D && N, B = !i && r.length === 0 && z ? void 0 : /* @__PURE__ */ b(e, {
|
|
113
|
+
onClick: O,
|
|
114
|
+
disabled: !N,
|
|
115
|
+
children: R.createButton
|
|
116
|
+
}), V = [
|
|
112
117
|
{
|
|
113
118
|
accessorKey: "name",
|
|
114
119
|
enableSorting: !0,
|
|
115
|
-
header: ({ column: e }) => /* @__PURE__ */
|
|
120
|
+
header: ({ column: e }) => /* @__PURE__ */ b(n, {
|
|
116
121
|
column: e,
|
|
117
|
-
title:
|
|
122
|
+
title: R.columnName
|
|
118
123
|
}),
|
|
119
124
|
size: 320,
|
|
120
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
125
|
+
cell: ({ row: e }) => /* @__PURE__ */ b("span", {
|
|
121
126
|
className: "ttw:block ttw:w-74 ttw:truncate",
|
|
122
127
|
children: e.original.name
|
|
123
128
|
})
|
|
@@ -125,19 +130,19 @@ function T({ products: r, isLoading: i, isError: a, sorting: o, onSortingChange:
|
|
|
125
130
|
{
|
|
126
131
|
accessorKey: "type",
|
|
127
132
|
size: 112,
|
|
128
|
-
header:
|
|
129
|
-
cell: ({ row: e }) => e.original.type ? /* @__PURE__ */
|
|
133
|
+
header: R.columnType,
|
|
134
|
+
cell: ({ row: e }) => e.original.type ? /* @__PURE__ */ b(_, {
|
|
130
135
|
type: e.original.type,
|
|
131
|
-
labels:
|
|
136
|
+
labels: R.typeBadge
|
|
132
137
|
}) : null
|
|
133
138
|
},
|
|
134
139
|
{
|
|
135
140
|
accessorKey: "description",
|
|
136
|
-
header:
|
|
141
|
+
header: R.columnDescription,
|
|
137
142
|
size: 1e4,
|
|
138
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
143
|
+
cell: ({ row: e }) => /* @__PURE__ */ b("div", {
|
|
139
144
|
className: "ttw:relative ttw:h-5 ttw:min-w-40",
|
|
140
|
-
children: /* @__PURE__ */
|
|
145
|
+
children: /* @__PURE__ */ b("span", {
|
|
141
146
|
className: "ttw:absolute ttw:inset-0 ttw:truncate",
|
|
142
147
|
children: e.original.description
|
|
143
148
|
})
|
|
@@ -146,30 +151,30 @@ function T({ products: r, isLoading: i, isError: a, sorting: o, onSortingChange:
|
|
|
146
151
|
{
|
|
147
152
|
accessorKey: "priceLabel",
|
|
148
153
|
size: 180,
|
|
149
|
-
header: () => /* @__PURE__ */
|
|
154
|
+
header: () => /* @__PURE__ */ b("div", {
|
|
150
155
|
className: "ttw:text-right",
|
|
151
|
-
children:
|
|
156
|
+
children: R.columnPrice
|
|
152
157
|
}),
|
|
153
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
158
|
+
cell: ({ row: e }) => /* @__PURE__ */ x("div", {
|
|
154
159
|
className: "ttw:flex ttw:w-39 ttw:items-center ttw:justify-end ttw:gap-1 ttw:tabular-nums",
|
|
155
|
-
children: [/* @__PURE__ */
|
|
160
|
+
children: [/* @__PURE__ */ b("span", { children: e.original.priceLabel }), e.original.unitLabel && /* @__PURE__ */ b("span", {
|
|
156
161
|
className: "ttw:text-muted-foreground",
|
|
157
162
|
children: e.original.unitLabel
|
|
158
163
|
})]
|
|
159
164
|
})
|
|
160
165
|
}
|
|
161
166
|
];
|
|
162
|
-
return
|
|
163
|
-
testId:
|
|
164
|
-
title:
|
|
165
|
-
description:
|
|
166
|
-
}) : a ? /* @__PURE__ */
|
|
167
|
-
title:
|
|
168
|
-
description:
|
|
169
|
-
retryLabel:
|
|
170
|
-
onRetry:
|
|
171
|
-
}) : /* @__PURE__ */ y(t, {
|
|
172
|
-
columns:
|
|
167
|
+
return F ? /* @__PURE__ */ b(h, {
|
|
168
|
+
testId: L?.accessRestricted,
|
|
169
|
+
title: R.accessRestrictedTitle,
|
|
170
|
+
description: R.accessRestrictedDescription
|
|
171
|
+
}) : a ? /* @__PURE__ */ b(m, {
|
|
172
|
+
title: R.errorTitle,
|
|
173
|
+
description: R.errorDescription,
|
|
174
|
+
retryLabel: j ? R.errorRetry : void 0,
|
|
175
|
+
onRetry: j
|
|
176
|
+
}) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(t, {
|
|
177
|
+
columns: V,
|
|
173
178
|
data: r,
|
|
174
179
|
isLoading: i,
|
|
175
180
|
sorting: o,
|
|
@@ -179,31 +184,27 @@ function T({ products: r, isLoading: i, isError: a, sorting: o, onSortingChange:
|
|
|
179
184
|
pageSizeOptions: u,
|
|
180
185
|
hasNextPage: d,
|
|
181
186
|
hasPrevPage: f,
|
|
182
|
-
onNextPage:
|
|
183
|
-
onPrevPage:
|
|
184
|
-
onRowClick:
|
|
185
|
-
rowAriaLabel: (e) =>
|
|
186
|
-
filterComponent: /* @__PURE__ */
|
|
187
|
-
labels:
|
|
188
|
-
filters:
|
|
189
|
-
action: /* @__PURE__ */
|
|
187
|
+
onNextPage: S,
|
|
188
|
+
onPrevPage: w,
|
|
189
|
+
onRowClick: A,
|
|
190
|
+
rowAriaLabel: (e) => R.openRow(e.name),
|
|
191
|
+
filterComponent: /* @__PURE__ */ b(T, {
|
|
192
|
+
labels: R,
|
|
193
|
+
filters: E,
|
|
194
|
+
action: /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(e, {
|
|
190
195
|
variant: "outline",
|
|
191
|
-
onClick:
|
|
192
|
-
disabled: !
|
|
193
|
-
children:
|
|
194
|
-
}),
|
|
195
|
-
onClick: D,
|
|
196
|
-
disabled: !j,
|
|
197
|
-
children: I.createButton
|
|
198
|
-
})] })
|
|
196
|
+
onClick: k,
|
|
197
|
+
disabled: !P,
|
|
198
|
+
children: R.manageUnitsButton
|
|
199
|
+
}), M === void 0 && B] })
|
|
199
200
|
}),
|
|
200
|
-
children: /* @__PURE__ */
|
|
201
|
-
testId:
|
|
202
|
-
title:
|
|
203
|
-
description:
|
|
204
|
-
actionLabel:
|
|
205
|
-
onAction:
|
|
201
|
+
children: /* @__PURE__ */ b(p, {
|
|
202
|
+
testId: L?.empty,
|
|
203
|
+
title: D ? R.filterEmptyTitle : R.emptyTitle,
|
|
204
|
+
description: D ? R.filterEmptyDescription : R.emptyDescription,
|
|
205
|
+
actionLabel: z ? R.emptyAction : void 0,
|
|
206
|
+
onAction: z ? O : void 0
|
|
206
207
|
})
|
|
207
|
-
});
|
|
208
|
+
}), M && B && v(B, M)] });
|
|
208
209
|
}
|
|
209
|
-
export {
|
|
210
|
+
export { E as ProductsScreen, E as default };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.11.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.11.105", n = "20076f918051af1eaa31384fecd8fdbbc3a68b9d", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|