yt-uikit 0.9.1 → 0.9.3
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/esm/components/BundleBlock/Bundle.d.ts +12 -2
- package/dist/esm/components/BundleBlock/BundleBuilder/BundleBuilder.d.ts +1 -1
- package/dist/esm/components/BundleBlock/BundleBuilderTracker/BundleBuilderTracker.d.ts +2 -0
- package/dist/esm/components/BundleBlock/PersonalizationForm/PersonalizationForm.d.ts +35 -0
- package/dist/esm/components/BundleBlock/PersonalizationForm/PersonalizationFormModal.d.ts +24 -0
- package/dist/esm/components/Cart/Cart.d.ts +2 -0
- package/dist/esm/components/Cart/CartProductsList.d.ts +1 -2
- package/dist/esm/components/Cart/CouponSelection.d.ts +4 -2
- package/dist/esm/components/Cart/ProductCard.d.ts +2 -3
- package/dist/esm/components/Cart/QuantitySelector.d.ts +1 -2
- package/dist/esm/index.js +399 -401
- package/package.json +1 -1
- package/dist/esm/components/BundleBlock/CollectionBundle/FileUpload.d.ts +0 -15
- package/dist/esm/components/BundleBlock/CollectionBundle/LoadingSpinner.d.ts +0 -2
|
@@ -369,6 +369,16 @@ export type BundlePayload = {
|
|
|
369
369
|
description?: string;
|
|
370
370
|
customizePadding?: string;
|
|
371
371
|
};
|
|
372
|
+
personalizedForm?: {
|
|
373
|
+
title?: string;
|
|
374
|
+
sections?: {
|
|
375
|
+
title: string;
|
|
376
|
+
type: "text" | "image";
|
|
377
|
+
fields: {
|
|
378
|
+
title: string;
|
|
379
|
+
}[];
|
|
380
|
+
}[];
|
|
381
|
+
};
|
|
372
382
|
};
|
|
373
383
|
export type EventNameCustom = "byob_checkout_cta" | "byob_add_to_bundle" | "block_visibility" | "bundle_add_to_cart";
|
|
374
384
|
export type EventTypeCustom = "clicks" | "views";
|
|
@@ -386,8 +396,8 @@ export type BundleProps = {
|
|
|
386
396
|
addToCartFunction?: (selectedItemsSubtotal: number, variantIds?: string[], finalBundlePrice?: number, variantIdPriceMap?: {
|
|
387
397
|
variantId: string;
|
|
388
398
|
price: number;
|
|
389
|
-
}[]) => Promise<void>;
|
|
390
|
-
addCustomBundleToCart?: (e: any) => Promise<void>;
|
|
399
|
+
}[], properties?: Record<string, string>) => Promise<void>;
|
|
400
|
+
addCustomBundleToCart?: (e: any, formProperties?: Record<string, any>) => Promise<void>;
|
|
391
401
|
selectedItems?: {
|
|
392
402
|
variantId: string;
|
|
393
403
|
product: ProductDetails;
|
|
@@ -28,7 +28,7 @@ type BundleBuilderProps = {
|
|
|
28
28
|
isFree?: boolean;
|
|
29
29
|
tierIndex?: number;
|
|
30
30
|
}[]>>;
|
|
31
|
-
handleAddToCart: (e: any) => Promise<void>;
|
|
31
|
+
handleAddToCart: (e: any, formProperties?: Record<string, any>) => Promise<void>;
|
|
32
32
|
bundleAddToCartLoading: boolean;
|
|
33
33
|
renderingOnPage: boolean;
|
|
34
34
|
selectedItemsQuantity: number;
|
|
@@ -48,6 +48,8 @@ type BundleBuilderTrackerProps = {
|
|
|
48
48
|
renderingOnPage: boolean;
|
|
49
49
|
handleRemoveItemProductTier: (variantId: string, currentTier: number) => void;
|
|
50
50
|
storeCurrencyCode?: string;
|
|
51
|
+
isUploading?: boolean;
|
|
52
|
+
showNextStep?: boolean;
|
|
51
53
|
};
|
|
52
54
|
export declare const BundleBuilderTrackerBar: React.FC<BundleBuilderTrackerProps>;
|
|
53
55
|
export default BundleBuilderTrackerBar;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const LoaderSpinner: () => React.JSX.Element;
|
|
3
|
+
interface UploadState {
|
|
4
|
+
url?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
error?: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface UploadFieldProps {
|
|
10
|
+
title: string;
|
|
11
|
+
uploadState?: UploadState | string;
|
|
12
|
+
onUpload: () => void;
|
|
13
|
+
onRemove: () => void;
|
|
14
|
+
onRetry: () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const UploadField: ({ title, uploadState, onUpload, onRemove, onRetry, }: UploadFieldProps) => React.JSX.Element;
|
|
17
|
+
export interface PersonalizationFormProps {
|
|
18
|
+
form: {
|
|
19
|
+
title?: string;
|
|
20
|
+
sections?: {
|
|
21
|
+
title: string;
|
|
22
|
+
type: "text" | "image";
|
|
23
|
+
fields: {
|
|
24
|
+
title: string;
|
|
25
|
+
}[];
|
|
26
|
+
}[];
|
|
27
|
+
};
|
|
28
|
+
formData: Record<string, any>;
|
|
29
|
+
setFormData: React.Dispatch<React.SetStateAction<Record<string, any>>>;
|
|
30
|
+
barHeight?: number;
|
|
31
|
+
isUploading?: boolean;
|
|
32
|
+
setIsUploading?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
33
|
+
}
|
|
34
|
+
declare const PersonalizationForm: React.FC<PersonalizationFormProps>;
|
|
35
|
+
export default PersonalizationForm;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface PersonalizationFormModalProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onSkip?: () => void;
|
|
6
|
+
formConfig: {
|
|
7
|
+
title?: string;
|
|
8
|
+
sections?: {
|
|
9
|
+
title: string;
|
|
10
|
+
type: "text" | "image";
|
|
11
|
+
fields: {
|
|
12
|
+
title: string;
|
|
13
|
+
}[];
|
|
14
|
+
}[];
|
|
15
|
+
};
|
|
16
|
+
onCheckout: (properties: Record<string, string>) => void;
|
|
17
|
+
cta: {
|
|
18
|
+
textColor: string;
|
|
19
|
+
backgroundColor: string;
|
|
20
|
+
};
|
|
21
|
+
isMobile: boolean;
|
|
22
|
+
}
|
|
23
|
+
declare const PersonalizationFormModal: React.FC<PersonalizationFormModalProps>;
|
|
24
|
+
export default PersonalizationFormModal;
|
|
@@ -3,7 +3,7 @@ import { Checkpoint } from "./Cart";
|
|
|
3
3
|
import { freebieMilestoneProps } from "./NextFreebieRow";
|
|
4
4
|
type CartProductsListProps = {
|
|
5
5
|
addCartItem?: (product: any, quantity?: number, triggeredFrom?: string) => Promise<any>;
|
|
6
|
-
removeCartItem: (
|
|
6
|
+
removeCartItem: (product: any) => Promise<any>;
|
|
7
7
|
handleIncrement: (lineItemKey: string | number, newQuantity: number, properties?: {
|
|
8
8
|
[key: string]: string;
|
|
9
9
|
}) => Promise<any>;
|
|
@@ -40,7 +40,6 @@ type CartProductsListProps = {
|
|
|
40
40
|
showFreebieMilestone?: boolean;
|
|
41
41
|
freebieMilestoneData?: freebieMilestoneProps;
|
|
42
42
|
freeLabelText?: string;
|
|
43
|
-
isLargeScreen?: boolean;
|
|
44
43
|
};
|
|
45
44
|
declare const CartProductsList: React.FC<CartProductsListProps>;
|
|
46
45
|
export default CartProductsList;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { RewardCoupon } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { RewardCoupon } from "./Cart";
|
|
3
3
|
interface CouponSelectionProps {
|
|
4
4
|
rewardCoupons: RewardCoupon[];
|
|
5
5
|
applyCouponCode?: (code: string) => Promise<void>;
|
|
@@ -9,6 +9,8 @@ interface CouponSelectionProps {
|
|
|
9
9
|
themeColor?: string;
|
|
10
10
|
themeTextColor?: string;
|
|
11
11
|
primaryTextColor?: string;
|
|
12
|
+
ctaButtonBackgroundColor?: string;
|
|
13
|
+
ctaButtonTextColor?: string;
|
|
12
14
|
cartComponentsCornerRadius?: number;
|
|
13
15
|
}
|
|
14
16
|
declare const CouponSelection: React.FC<CouponSelectionProps>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
declare const ProductCard: ({ product: variant, handleDecrement, handleIncrement, removeCartItem, addCartItem, isDev,
|
|
2
|
+
declare const ProductCard: ({ product: variant, handleDecrement, handleIncrement, removeCartItem, addCartItem, isDev, themeColor, primaryTextColor, secondaryTextColor, tertiaryColor, tertiaryTextColor, showQtySelector, themeTextColor, showEditOptionOnProducts, percentageOff, removeFreebieFromCart, showDeleteOnFreebies, imageAspectSelector, cartComponentsCornerType, cartComponentsCornerRadius, backgroundSubdued, backgroundColor, showDiscountOnMRP, freeLabelText, }: {
|
|
3
3
|
product: any;
|
|
4
4
|
addCartItem?: ((product: any) => Promise<any>) | undefined;
|
|
5
|
-
removeCartItem?: ((
|
|
5
|
+
removeCartItem?: ((product: any) => Promise<any>) | undefined;
|
|
6
6
|
handleIncrement?: ((lineItemKey: string | number, newQuantity: number, properties?: {
|
|
7
7
|
[key: string]: string;
|
|
8
8
|
} | undefined) => Promise<any>) | undefined;
|
|
@@ -26,6 +26,5 @@ declare const ProductCard: ({ product: variant, handleDecrement, handleIncrement
|
|
|
26
26
|
backgroundColor?: string | undefined;
|
|
27
27
|
showDiscountOnMRP?: boolean | undefined;
|
|
28
28
|
freeLabelText?: string | undefined;
|
|
29
|
-
isLargeScreen?: boolean | undefined;
|
|
30
29
|
}) => React.JSX.Element;
|
|
31
30
|
export default ProductCard;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "./shared.scss";
|
|
3
|
-
export declare const QuantitySelector: ({ value, handleItemQuantityDecrement, handleItemQuantityIncrement,
|
|
3
|
+
export declare const QuantitySelector: ({ value, handleItemQuantityDecrement, handleItemQuantityIncrement, isDev, themeColor, cartComponentsCornerType, cartComponentsCornerRadius, backgroundSubdued, }: {
|
|
4
4
|
value: number;
|
|
5
5
|
handleItemQuantityIncrement: () => Promise<void>;
|
|
6
6
|
handleItemQuantityDecrement: () => Promise<void>;
|
|
7
|
-
disabled?: boolean | undefined;
|
|
8
7
|
isDev?: boolean | undefined;
|
|
9
8
|
themeColor?: string | undefined;
|
|
10
9
|
cartComponentsCornerType?: "rounded" | "sharp" | undefined;
|