formica-ui-lib 1.0.128 → 1.0.129
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/componentProps/templates/productdetailpagetemplate/ProductDetailPageTemplateProps.d.ts
CHANGED
|
@@ -200,15 +200,31 @@ export type ProductDetailData = {
|
|
|
200
200
|
standardCopyHero?: ProductDetailStandardCopyHero;
|
|
201
201
|
featuredProducts?: ProductDetailFeaturedProduct[];
|
|
202
202
|
};
|
|
203
|
+
export type ProductDetailWishlistPayload = {
|
|
204
|
+
sku?: string;
|
|
205
|
+
decor?: string;
|
|
206
|
+
};
|
|
207
|
+
export type ProductDetailOrder = {
|
|
208
|
+
type: string;
|
|
209
|
+
sku?: string;
|
|
210
|
+
decor?: string;
|
|
211
|
+
product: string | null;
|
|
212
|
+
grade: string | null;
|
|
213
|
+
texture: string | null;
|
|
214
|
+
size: string | null;
|
|
215
|
+
quantity: number;
|
|
216
|
+
priceValue?: number;
|
|
217
|
+
priceLabel?: string;
|
|
218
|
+
currency?: string;
|
|
219
|
+
};
|
|
220
|
+
export type ProductDetailCartFlyoutProps = Omit<CartFlyoutProps, "isOpen" | "onClose">;
|
|
203
221
|
export type ProductDetailPageTemplateProps = {
|
|
204
222
|
breadcrumbsProps?: BreadcrumbsProps;
|
|
205
223
|
productData: ProductDetailData;
|
|
206
224
|
onDownloadSwatch?: (productData: ProductDetailData) => void;
|
|
207
225
|
onDownloadFullSheet?: (productData: ProductDetailData) => void;
|
|
208
|
-
onAddToWishlist?: (payload:
|
|
209
|
-
productData: ProductDetailData) => void;
|
|
210
|
-
onAddToCart?: (order: {}, // ProductDetailOrder,
|
|
211
|
-
productData: ProductDetailData) => void;
|
|
226
|
+
onAddToWishlist?: (payload: ProductDetailWishlistPayload, productData: ProductDetailData) => void;
|
|
227
|
+
onAddToCart?: (order: ProductDetailOrder, productData: ProductDetailData) => void;
|
|
212
228
|
onNavigate?: (href: string, meta?: unknown) => void;
|
|
213
|
-
cartFlyoutProps?:
|
|
229
|
+
cartFlyoutProps?: ProductDetailCartFlyoutProps;
|
|
214
230
|
};
|
package/dist/index.js
CHANGED
|
@@ -6472,9 +6472,7 @@ const ye = (e, t = [], a = null) => t.map((r) => e[r]).filter((r) => !!r).map((r
|
|
|
6472
6472
|
onNavigate: l,
|
|
6473
6473
|
cartFlyoutProps: o
|
|
6474
6474
|
}) => {
|
|
6475
|
-
const c = t ?? {}, d = c.images ?? [], h = c.product, f = c.content, p = c.optionSets, m = c.purchase, b = c.ranges ?? [], g = c.standardCopyHero, w = c.featuredProducts ?? [], [C, N] = E.useState(!1), [T, S] = E.useState(
|
|
6476
|
-
o?.items ?? []
|
|
6477
|
-
);
|
|
6475
|
+
const c = t ?? {}, d = c.images ?? [], h = c.product, f = c.content, p = c.optionSets, m = c.purchase, b = c.ranges ?? [], g = c.standardCopyHero, w = c.featuredProducts ?? [], [C, N] = E.useState(!1), [T, S] = E.useState(o?.items ?? []);
|
|
6478
6476
|
E.useEffect(() => {
|
|
6479
6477
|
S(o?.items ?? []);
|
|
6480
6478
|
}, [o?.items]);
|
|
@@ -6626,7 +6624,9 @@ const ye = (e, t = [], a = null) => t.map((r) => e[r]).filter((r) => !!r).map((r
|
|
|
6626
6624
|
},
|
|
6627
6625
|
onRemoveItem: (I) => {
|
|
6628
6626
|
S(
|
|
6629
|
-
(V) => V.filter(
|
|
6627
|
+
(V) => V.filter(
|
|
6628
|
+
(Q) => Q.id !== I
|
|
6629
|
+
)
|
|
6630
6630
|
), o.onRemoveItem?.(I);
|
|
6631
6631
|
},
|
|
6632
6632
|
onClearCart: () => {
|
|
@@ -6647,7 +6647,9 @@ const ye = (e, t = [], a = null) => t.map((r) => e[r]).filter((r) => !!r).map((r
|
|
|
6647
6647
|
},
|
|
6648
6648
|
onRemoveItem: (I) => {
|
|
6649
6649
|
S(
|
|
6650
|
-
(V) => V.filter(
|
|
6650
|
+
(V) => V.filter(
|
|
6651
|
+
(Q) => Q.id !== I
|
|
6652
|
+
)
|
|
6651
6653
|
);
|
|
6652
6654
|
},
|
|
6653
6655
|
onClearCart: () => {
|