formica-ui-lib 1.0.231 → 1.0.232
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/molecules/cart/productcontactactions/ProductContactActionsProps.d.ts +17 -0
- package/dist/componentProps/organisms/cart/purchasepanel/PurchasePanelLeftPanelProps.d.ts +7 -2
- package/dist/componentProps/organisms/cart/purchasepanel/PurchasePanelProps.d.ts +17 -2
- package/dist/componentProps/organisms/navigation/TopNavActionsProps.d.ts +1 -0
- package/dist/componentProps/organisms/navigation/TopNavBarProps.d.ts +1 -0
- package/dist/componentProps/templates/productdetailpagetemplate/ProductDetailPageTemplateProps.d.ts +14 -0
- package/dist/index.cjs +7 -7
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1612 -1556
- package/dist/stories/molecules/cart/productcontactactions/ProductContactActions.d.ts +4 -0
- package/dist/stories/molecules/cart/productcontactactions/ProductContactActions.test.d.ts +1 -0
- package/dist/tailwind.css +1 -1
- package/package.json +1 -1
package/dist/componentProps/molecules/cart/productcontactactions/ProductContactActionsProps.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { FaTypeClass } from "../../../atoms/icon/IconProps";
|
|
2
|
+
export type ProductContactAction = {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
iconName?: string;
|
|
6
|
+
iconType?: FaTypeClass;
|
|
7
|
+
iconAlt?: string;
|
|
8
|
+
ariaLabel?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type ProductContactActionClickPayload = {
|
|
12
|
+
action: ProductContactAction;
|
|
13
|
+
};
|
|
14
|
+
export type ProductContactActionsProps = {
|
|
15
|
+
actions: [ProductContactAction, ProductContactAction];
|
|
16
|
+
onActionClick?: (payload: ProductContactActionClickPayload) => void;
|
|
17
|
+
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { ButtonGridItem } from "../../../molecules/buttons/buttongrid/ButtonGridProps";
|
|
2
2
|
import type { ReactNode } from "react";
|
|
3
3
|
import type { ColourMatchingChartData } from "../../../molecules/productinformation/colourmatchingchart/ColourMatchingChartProps";
|
|
4
|
+
import type { ProductContactAction, ProductContactActionClickPayload } from "../../../molecules/cart/productcontactactions/ProductContactActionsProps";
|
|
4
5
|
export type SwatchPurchasePanelTab = "Sample" | "Buy Now" | string;
|
|
6
|
+
export type PurchasePanelActionMode = "cart" | "contact";
|
|
5
7
|
export type SwatchOption = ButtonGridItem & {
|
|
6
8
|
id: string;
|
|
7
9
|
label: string;
|
|
@@ -44,8 +46,11 @@ export type PurchasePanelLeftPanelProps = {
|
|
|
44
46
|
minQuantity?: number;
|
|
45
47
|
maxQuantity?: number;
|
|
46
48
|
showCartActions?: boolean;
|
|
49
|
+
actionMode?: PurchasePanelActionMode;
|
|
50
|
+
contactActions?: [ProductContactAction, ProductContactAction];
|
|
47
51
|
onQuantityChange?: (quantity: number) => void;
|
|
48
|
-
onAddToWishlist
|
|
49
|
-
onAddToCart
|
|
52
|
+
onAddToWishlist?: () => void;
|
|
53
|
+
onAddToCart?: (quantity: number) => void;
|
|
54
|
+
onContactActionClick?: (payload: ProductContactActionClickPayload) => void;
|
|
50
55
|
mobileMediaSlot?: ReactNode;
|
|
51
56
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { SwatchPurchasePanelCarousel } from "./PurchasePanelRightPanelProps";
|
|
2
2
|
import type { ColourMatchingChartData } from "../../../molecules/productinformation/colourmatchingchart/ColourMatchingChartProps";
|
|
3
|
+
import type { ProductContactAction, ProductContactActionClickPayload } from "../../../molecules/cart/productcontactactions/ProductContactActionsProps";
|
|
3
4
|
export type PurchasePanelTab = "Sample" | "Buy Now" | string;
|
|
5
|
+
export type PurchasePanelActionMode = "cart" | "contact";
|
|
4
6
|
export type SwatchPurchasePanelNavigateMeta = {
|
|
5
7
|
kind: "availability" | "returnPolicy";
|
|
6
8
|
};
|
|
@@ -31,6 +33,16 @@ export type CartOrderProps = {
|
|
|
31
33
|
currency?: string;
|
|
32
34
|
bigCommerceProductId?: string | number;
|
|
33
35
|
};
|
|
36
|
+
export type PurchasePanelContactActionClickPayload = ProductContactActionClickPayload & {
|
|
37
|
+
sku?: string;
|
|
38
|
+
decor?: string;
|
|
39
|
+
title: string;
|
|
40
|
+
activeTab: PurchasePanelTab;
|
|
41
|
+
product: string | null;
|
|
42
|
+
grade: string | null;
|
|
43
|
+
texture: string | null;
|
|
44
|
+
size: string | null;
|
|
45
|
+
};
|
|
34
46
|
export type PurchasePanelTabOptionGroups = {
|
|
35
47
|
productOptions?: PurchasePanelOptionProps[];
|
|
36
48
|
gradeOptions?: PurchasePanelOptionProps[];
|
|
@@ -81,8 +93,11 @@ export type PurchasePanelProps = {
|
|
|
81
93
|
initialQuantity?: number;
|
|
82
94
|
minQuantity?: number;
|
|
83
95
|
maxQuantity?: number;
|
|
84
|
-
|
|
85
|
-
|
|
96
|
+
actionMode?: PurchasePanelActionMode;
|
|
97
|
+
contactActions?: [ProductContactAction, ProductContactAction];
|
|
98
|
+
onAddToWishlist?: (payload: AddToFavoritesPayloadProps) => void;
|
|
99
|
+
onAddToCart?: (order: CartOrderProps) => void;
|
|
100
|
+
onContactActionClick?: (payload: PurchasePanelContactActionClickPayload) => void;
|
|
86
101
|
availabilityHref?: string;
|
|
87
102
|
availabilityLabel?: string;
|
|
88
103
|
returnPolicyHref?: string;
|
package/dist/componentProps/templates/productdetailpagetemplate/ProductDetailPageTemplateProps.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { BreadcrumbsProps } from "../../molecules/selectors/breadcrumb/Breadcrum
|
|
|
2
2
|
import { ProductInformationTabKey, SizeAndGradeDefinition } from "../../organisms/sections/productinformationsection/ProductInformationSectionProps";
|
|
3
3
|
import { CartFlyoutProps } from "../../organisms/cart/cartflyout/CartFlyoutProps";
|
|
4
4
|
import type { ColourMatchingChartData } from "../../molecules/productinformation/colourmatchingchart/ColourMatchingChartProps";
|
|
5
|
+
import type { ProductContactAction, ProductContactActionClickPayload } from "../../molecules/cart/productcontactactions/ProductContactActionsProps";
|
|
5
6
|
export type ProductDetailSimpleOption = {
|
|
6
7
|
id: string;
|
|
7
8
|
label: string;
|
|
@@ -106,6 +107,8 @@ export type ProductDetailPurchaseTabOptionIds = {
|
|
|
106
107
|
maxQuantity?: number;
|
|
107
108
|
};
|
|
108
109
|
export type ProductDetailPurchase = {
|
|
110
|
+
actionMode?: "cart" | "contact";
|
|
111
|
+
contactActions?: [ProductContactAction, ProductContactAction];
|
|
109
112
|
defaults?: {
|
|
110
113
|
product?: string | null;
|
|
111
114
|
texture?: string | null;
|
|
@@ -225,6 +228,16 @@ export type ProductDetailOrder = {
|
|
|
225
228
|
currency?: string;
|
|
226
229
|
bigCommerceProductId?: string | number;
|
|
227
230
|
};
|
|
231
|
+
export type ProductDetailContactActionPayload = ProductContactActionClickPayload & {
|
|
232
|
+
sku?: string;
|
|
233
|
+
decor?: string;
|
|
234
|
+
title: string;
|
|
235
|
+
activeTab: string;
|
|
236
|
+
product: string | null;
|
|
237
|
+
grade: string | null;
|
|
238
|
+
texture: string | null;
|
|
239
|
+
size: string | null;
|
|
240
|
+
};
|
|
228
241
|
export type ProductDetailCartFlyoutProps = CartFlyoutProps;
|
|
229
242
|
export type ProductDetailPageTemplateProps = {
|
|
230
243
|
breadcrumbsProps?: BreadcrumbsProps;
|
|
@@ -233,6 +246,7 @@ export type ProductDetailPageTemplateProps = {
|
|
|
233
246
|
onDownloadFullSheet?: (productData: ProductDetailData) => void;
|
|
234
247
|
onAddToWishlist?: (payload: ProductDetailWishlistPayload, productData: ProductDetailData) => void;
|
|
235
248
|
onAddToCart?: (order: ProductDetailOrder, productData: ProductDetailData) => void;
|
|
249
|
+
onContactActionClick?: (payload: ProductDetailContactActionPayload, productData: ProductDetailData) => void;
|
|
236
250
|
onProductNavigate?: (href: string, meta?: unknown) => void;
|
|
237
251
|
cartFlyoutProps?: ProductDetailCartFlyoutProps;
|
|
238
252
|
};
|