yt-uikit 0.8.73 → 0.8.74
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/atoms/bundleBuilderProductDetailsAtom.d.ts +4 -0
- package/dist/esm/atoms/cartDataAtom.d.ts +3 -0
- package/dist/esm/atoms/cartLoadingAtom.d.ts +22 -0
- package/dist/esm/atoms/cartTimer.d.ts +2 -0
- package/dist/esm/atoms/dateAtom.d.ts +1 -0
- package/dist/esm/atoms/freebieClaimModalAtom.d.ts +7 -0
- package/dist/esm/atoms/giftWrap.d.ts +2 -0
- package/dist/esm/atoms/gstCompanyNameAtom.d.ts +1 -0
- package/dist/esm/atoms/gstInputAtom.d.ts +1 -0
- package/dist/esm/atoms/maxQtyErrorAtom.d.ts +3 -0
- package/dist/esm/atoms/multiClaimSelectionAtom.d.ts +25 -0
- package/dist/esm/atoms/noteInputAtom.d.ts +3 -0
- package/dist/esm/atoms/postalCodeAtom.d.ts +1 -0
- package/dist/esm/atoms/shippingAtom.d.ts +8 -0
- package/dist/esm/atoms/showGSTInputAtom.d.ts +1 -0
- package/dist/esm/atoms/variantSelectionModalAtom.d.ts +25 -0
- package/dist/esm/components/BundleBlock/Bundle.d.ts +420 -0
- package/dist/esm/components/BundleBlock/BundleBuilder/BundleBuilder.d.ts +45 -0
- package/dist/esm/components/BundleBlock/BundleBuilder/ResponsiveBgImage.d.ts +9 -0
- package/dist/esm/components/BundleBlock/BundleBuilder/SortAndFilter.d.ts +69 -0
- package/dist/esm/components/BundleBlock/BundleBuilder/VariantOptionsModal.d.ts +28 -0
- package/dist/esm/components/BundleBlock/BundleBuilder/bundleBuilder.style.d.ts +37 -0
- package/dist/esm/components/BundleBlock/BundleBuilderTracker/BundleBuilderTracker.d.ts +53 -0
- package/dist/esm/components/BundleBlock/BundleBuilderTracker/bundleBuilderTracker.style.d.ts +77 -0
- package/dist/esm/components/BundleBlock/BundleProductDetailsModal/BundleProductDetailsModal.d.ts +37 -0
- package/dist/esm/components/BundleBlock/BundleProductDetailsModal/bundleProductDetailsModal.style.d.ts +10 -0
- package/dist/esm/components/BundleBlock/CollectionBundle/CategoryFilter.d.ts +10 -0
- package/dist/esm/components/BundleBlock/CollectionBundle/ColllectionBundle.d.ts +126 -0
- package/dist/esm/components/BundleBlock/CollectionBundle/FileUpload.d.ts +15 -0
- package/dist/esm/components/BundleBlock/CollectionBundle/LoadingSpinner.d.ts +2 -0
- package/dist/esm/components/BundleBlock/CollectionBundle/ProductDetailsModal.d.ts +15 -0
- package/dist/esm/components/BundleBlock/ComboBundle.d.ts +17 -0
- package/dist/esm/components/BundleBlock/FixedBundle/FixedBundle.d.ts +4 -0
- package/dist/esm/components/BundleBlock/FixedBundle/SeparateVariantOptions.d.ts +45 -0
- package/dist/esm/components/BundleBlock/FixedBundle/VariantSelectorModal.d.ts +22 -0
- package/dist/esm/components/BundleBlock/FixedBundle/fixedBundle.style.d.ts +90 -0
- package/dist/esm/components/BundleBlock/Loader.d.ts +5 -0
- package/dist/esm/components/BundleBlock/MixAndMatchBundle/MixAndMatchBundle.d.ts +9 -0
- package/dist/esm/components/BundleBlock/MixAndMatchBundle/mixAndMatchBundle.style.d.ts +86 -0
- package/dist/esm/components/BundleBlock/VolumeBundle/VolumeBundle.d.ts +27 -0
- package/dist/esm/components/BundleBlock/VolumeBundle/volumeBundle.style.d.ts +80 -0
- package/dist/esm/components/BundleBlock/index.d.ts +1 -0
- package/dist/esm/components/Cart/ApplyCoupon.d.ts +13 -0
- package/dist/esm/components/Cart/Bundle.d.ts +6 -0
- package/dist/esm/components/Cart/Cart.d.ts +241 -0
- package/dist/esm/components/Cart/CartDrawer.d.ts +25 -0
- package/dist/esm/components/Cart/CartOffersCarousel.d.ts +48 -0
- package/dist/esm/components/Cart/CartProductsList.d.ts +45 -0
- package/dist/esm/components/Cart/CartTimer.d.ts +8 -0
- package/dist/esm/components/Cart/CheckoutSection.d.ts +39 -0
- package/dist/esm/components/Cart/CouponSelection.d.ts +15 -0
- package/dist/esm/components/Cart/DatePicker.d.ts +10 -0
- package/dist/esm/components/Cart/EmptyCart.d.ts +33 -0
- package/dist/esm/components/Cart/FloatingCart.d.ts +24 -0
- package/dist/esm/components/Cart/FooterSections.d.ts +6 -0
- package/dist/esm/components/Cart/FreebieClaimManager.d.ts +17 -0
- package/dist/esm/components/Cart/FreebieClaimOverlay.d.ts +17 -0
- package/dist/esm/components/Cart/FreebieClaimOverlayCard.d.ts +10 -0
- package/dist/esm/components/Cart/FreebieClaimSection.d.ts +17 -0
- package/dist/esm/components/Cart/FreebieClaimSectionCard.d.ts +16 -0
- package/dist/esm/components/Cart/GSTSection.d.ts +15 -0
- package/dist/esm/components/Cart/GiftWrap.d.ts +15 -0
- package/dist/esm/components/Cart/InlineCartOfferInfoText.d.ts +10 -0
- package/dist/esm/components/Cart/LoyaltyAppliedCTA.d.ts +19 -0
- package/dist/esm/components/Cart/LoyaltyApplyCTA.d.ts +18 -0
- package/dist/esm/components/Cart/LoyaltyBadge.d.ts +10 -0
- package/dist/esm/components/Cart/LoyaltyGuestCTA.d.ts +17 -0
- package/dist/esm/components/Cart/MultiStepProgressBar/CheckpointConfetti.d.ts +11 -0
- package/dist/esm/components/Cart/MultiStepProgressBar/CheckpointIcon.d.ts +3 -0
- package/dist/esm/components/Cart/MultiStepProgressBar/CheckpointTooltip.d.ts +3 -0
- package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepIcon.d.ts +9 -0
- package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepProgressBar.d.ts +5 -0
- package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepProgressBar.styled.d.ts +45 -0
- package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepUtils.d.ts +6 -0
- package/dist/esm/components/Cart/MultiStepProgressBar/MultiTierProgressBar.d.ts +4 -0
- package/dist/esm/components/Cart/MultiStepProgressBar/MutiTierNextRewardMessage.d.ts +3 -0
- package/dist/esm/components/Cart/MultiStepProgressBar/NextRewardMessage.d.ts +3 -0
- package/dist/esm/components/Cart/MultiStepProgressBar/SingleTierProgressBar.d.ts +4 -0
- package/dist/esm/components/Cart/MultiStepProgressBar/SingleTierProgressBar.styled.d.ts +22 -0
- package/dist/esm/components/Cart/MultiStepProgressBar/SingletTierNextRewardMessage.d.ts +3 -0
- package/dist/esm/components/Cart/MultiStepProgressBar/types.d.ts +55 -0
- package/dist/esm/components/Cart/NextFreebieRow.d.ts +19 -0
- package/dist/esm/components/Cart/NoteSection.d.ts +8 -0
- package/dist/esm/components/Cart/ProductCard.d.ts +30 -0
- package/dist/esm/components/Cart/ProductRecCard.d.ts +20 -0
- package/dist/esm/components/Cart/ProductRecList.d.ts +23 -0
- package/dist/esm/components/Cart/ProgressBarCartLoader.d.ts +7 -0
- package/dist/esm/components/Cart/QuantitySelector.d.ts +12 -0
- package/dist/esm/components/Cart/RegionSpecificDelivery.d.ts +17 -0
- package/dist/esm/components/Cart/RewardPointsPreview.d.ts +10 -0
- package/dist/esm/components/Cart/StandardDelivery.d.ts +11 -0
- package/dist/esm/components/Cart/StealDealSection.d.ts +14 -0
- package/dist/esm/components/Cart/StickyCart.d.ts +64 -0
- package/dist/esm/components/Cart/SubtotalSection.d.ts +13 -0
- package/dist/esm/components/Cart/VariantSelectionPopup/DesktopVariantPopup.d.ts +19 -0
- package/dist/esm/components/Cart/VariantSelectionPopup/DesktopVariantPopup.styled.d.ts +60 -0
- package/dist/esm/components/Cart/VariantSelectionPopup/MobileVariantPopover.d.ts +19 -0
- package/dist/esm/components/Cart/index.d.ts +1 -0
- package/dist/esm/components/LoyaltyPageBlock/LoyaltyPageBlock.d.ts +64 -0
- package/dist/esm/components/Nudge/LeadGenerationNudge.d.ts +15 -0
- package/dist/esm/components/Nudge/Nudge.d.ts +40 -0
- package/dist/esm/components/Nudge/index.d.ts +1 -0
- package/dist/esm/components/ProductOffersBlock/ProductOffersCoupon.d.ts +12 -0
- package/dist/esm/components/ProductOffersBlock/ProductOffersList.d.ts +12 -0
- package/dist/esm/components/ProductOffersBlock/ProductOffersTermsMobilePopover.d.ts +10 -0
- package/dist/esm/components/ProductOffersBlock/ProductOffersTermsPopup.d.ts +10 -0
- package/dist/esm/components/ProductOffersBlock/ProductsOffers.d.ts +40 -0
- package/dist/esm/components/SpinnerWheel/SpinnerWheel.d.ts +23 -0
- package/dist/esm/components/SpinnerWheel/WheelSection.d.ts +9 -0
- package/dist/esm/components/SpinnerWheel/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts +7 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +5323 -0
- package/dist/esm/utils/converter.d.ts +2 -0
- package/dist/esm/utils/customVariantOptions.d.ts +20 -0
- package/dist/esm/utils/freebieProductUtils.d.ts +28 -0
- package/dist/esm/utils/freebieUtils.d.ts +5 -0
- package/dist/esm/utils/index.d.ts +14 -0
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const cartLoadingState: import("jotai").PrimitiveAtom<{
|
|
2
|
+
cartLoading: boolean;
|
|
3
|
+
showLoader: boolean;
|
|
4
|
+
showSkeletonLoader?: boolean | undefined;
|
|
5
|
+
showLoyaltyCtaLoading?: boolean | undefined;
|
|
6
|
+
}> & {
|
|
7
|
+
init: {
|
|
8
|
+
cartLoading: boolean;
|
|
9
|
+
showLoader: boolean;
|
|
10
|
+
showSkeletonLoader?: boolean | undefined;
|
|
11
|
+
showLoyaltyCtaLoading?: boolean | undefined;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export declare function useCartLoading(): {
|
|
15
|
+
cartLoading: {
|
|
16
|
+
cartLoading: boolean;
|
|
17
|
+
showLoader: boolean;
|
|
18
|
+
showSkeletonLoader?: boolean | undefined;
|
|
19
|
+
showLoyaltyCtaLoading?: boolean | undefined;
|
|
20
|
+
};
|
|
21
|
+
setLoading: (isLoading: boolean, showLoader: boolean, showSkeletonLoader?: boolean, showLoyaltyCtaLoading?: boolean) => void;
|
|
22
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const timeLeftAtom: import("jotai").WritableAtom<number, [number | typeof import("jotai/utils").RESET | ((prev: number) => number | typeof import("jotai/utils").RESET)], void>;
|
|
2
|
+
export declare const lastUpdateAtom: import("jotai").WritableAtom<number, [number | typeof import("jotai/utils").RESET | ((prev: number) => number | typeof import("jotai/utils").RESET)], void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const deliverySlotDateState: import("jotai").WritableAtom<string | null, [string | typeof import("jotai/utils").RESET | ((prev: string | null) => string | typeof import("jotai/utils").RESET | null) | null], void>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const giftWrapAtom: import("jotai").WritableAtom<boolean, [boolean | typeof import("jotai/utils").RESET | ((prev: boolean) => boolean | typeof import("jotai/utils").RESET)], void>;
|
|
2
|
+
export declare const giftWrapIdAtom: import("jotai").WritableAtom<string, [string | typeof import("jotai/utils").RESET | ((prev: string) => string | typeof import("jotai/utils").RESET)], void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const gstCompanyNameState: import("jotai").WritableAtom<string, [string | typeof import("jotai/utils").RESET | ((prev: string) => string | typeof import("jotai/utils").RESET)], void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const gstNumberState: import("jotai").WritableAtom<string, [string | typeof import("jotai/utils").RESET | ((prev: string) => string | typeof import("jotai/utils").RESET)], void>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface MultiClaimSelection {
|
|
2
|
+
selectedProducts: string[];
|
|
3
|
+
maxAllowed: number;
|
|
4
|
+
tierName: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const multiClaimSelectionState: import("jotai").PrimitiveAtom<MultiClaimSelection> & {
|
|
7
|
+
init: MultiClaimSelection;
|
|
8
|
+
};
|
|
9
|
+
export declare const isSelectionLimitReachedAtom: import("jotai").Atom<boolean>;
|
|
10
|
+
export declare const selectionCountAtom: import("jotai").Atom<number>;
|
|
11
|
+
export declare const toggleProductSelectionAtom: import("jotai").WritableAtom<null, [payload: string | {
|
|
12
|
+
productId: string;
|
|
13
|
+
tierId?: number | undefined;
|
|
14
|
+
tierMax?: number | undefined;
|
|
15
|
+
selectedProducts?: string[] | undefined;
|
|
16
|
+
getProductTierId?: ((id: string) => number | undefined) | undefined;
|
|
17
|
+
}], void> & {
|
|
18
|
+
init: null;
|
|
19
|
+
};
|
|
20
|
+
export declare const resetSelectionAtom: import("jotai").WritableAtom<null, [], void> & {
|
|
21
|
+
init: null;
|
|
22
|
+
};
|
|
23
|
+
export declare const initializeSelectionAtom: import("jotai").WritableAtom<null, [maxAllowed: number, tierName: string], void> & {
|
|
24
|
+
init: null;
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const postalCodeState: import("jotai").WritableAtom<number | undefined, [number | typeof import("jotai/utils").RESET | ((prev: number | undefined) => number | typeof import("jotai/utils").RESET | undefined) | undefined], void>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface DeliveryOptionState {
|
|
2
|
+
isPostalCodeValid: boolean;
|
|
3
|
+
isDateValid: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare const deliveryOptionChosenState: import("jotai").WritableAtom<DeliveryOptionState, [DeliveryOptionState | typeof import("jotai/utils").RESET | ((prev: DeliveryOptionState) => DeliveryOptionState | typeof import("jotai/utils").RESET)], void>;
|
|
6
|
+
export declare const isDeliveryOptionValidState: import("jotai").Atom<boolean>;
|
|
7
|
+
export declare const deliveryTypeState: import("jotai").WritableAtom<string, [string | typeof import("jotai/utils").RESET | ((prev: string) => string | typeof import("jotai/utils").RESET)], void>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const showGSTInputState: import("jotai").WritableAtom<boolean, [boolean | typeof import("jotai/utils").RESET | ((prev: boolean) => boolean | typeof import("jotai/utils").RESET)], void>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const variantSelectionModalState: import("jotai").PrimitiveAtom<{
|
|
2
|
+
open: boolean;
|
|
3
|
+
variantId: string | undefined;
|
|
4
|
+
quantity?: number | undefined;
|
|
5
|
+
handle: string | undefined;
|
|
6
|
+
freebieSelection?: boolean | undefined;
|
|
7
|
+
stealDealSelection?: boolean | undefined;
|
|
8
|
+
lineItemKey?: string | undefined;
|
|
9
|
+
productId?: string | undefined;
|
|
10
|
+
allowedVariantIds?: string[] | undefined;
|
|
11
|
+
productRec?: boolean | undefined;
|
|
12
|
+
}> & {
|
|
13
|
+
init: {
|
|
14
|
+
open: boolean;
|
|
15
|
+
variantId: string | undefined;
|
|
16
|
+
quantity?: number | undefined;
|
|
17
|
+
handle: string | undefined;
|
|
18
|
+
freebieSelection?: boolean | undefined;
|
|
19
|
+
stealDealSelection?: boolean | undefined;
|
|
20
|
+
lineItemKey?: string | undefined;
|
|
21
|
+
productId?: string | undefined;
|
|
22
|
+
allowedVariantIds?: string[] | undefined;
|
|
23
|
+
productRec?: boolean | undefined;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./bundle.scss";
|
|
3
|
+
interface ShopifyCurrency {
|
|
4
|
+
rate: number;
|
|
5
|
+
active: string;
|
|
6
|
+
}
|
|
7
|
+
declare global {
|
|
8
|
+
interface Window {
|
|
9
|
+
Shopify?: {
|
|
10
|
+
currency?: ShopifyCurrency;
|
|
11
|
+
shop?: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
type ProductImage = {
|
|
16
|
+
url: string;
|
|
17
|
+
height: number;
|
|
18
|
+
width: number;
|
|
19
|
+
altText?: string;
|
|
20
|
+
};
|
|
21
|
+
type ProductFeaturedMedia = {
|
|
22
|
+
alt: string;
|
|
23
|
+
preview: {
|
|
24
|
+
image: {
|
|
25
|
+
url: string;
|
|
26
|
+
height?: number;
|
|
27
|
+
width?: number;
|
|
28
|
+
altText: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
type ProductOption = {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
values: string[];
|
|
36
|
+
};
|
|
37
|
+
type CollectionNode = {
|
|
38
|
+
node: {
|
|
39
|
+
id: string;
|
|
40
|
+
title: string;
|
|
41
|
+
handle: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export type VariantNode = {
|
|
45
|
+
node: {
|
|
46
|
+
id: string;
|
|
47
|
+
price: string;
|
|
48
|
+
compareAtPrice: string;
|
|
49
|
+
title: string;
|
|
50
|
+
displayName: string;
|
|
51
|
+
image: ProductImage;
|
|
52
|
+
availableForSale: boolean;
|
|
53
|
+
inventoryQuantity: number;
|
|
54
|
+
inventoryItem?: {
|
|
55
|
+
tracked?: boolean;
|
|
56
|
+
};
|
|
57
|
+
inventoryPolicy?: "deny" | "continue";
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
type SelectedVariantDetails = {
|
|
61
|
+
id: string;
|
|
62
|
+
price: string;
|
|
63
|
+
compareAtPrice: string;
|
|
64
|
+
title: string;
|
|
65
|
+
displayName: string;
|
|
66
|
+
image: ProductImage;
|
|
67
|
+
availableForSale: boolean;
|
|
68
|
+
inventoryQuantity: number;
|
|
69
|
+
};
|
|
70
|
+
export type VariantOptions = {
|
|
71
|
+
shop: string;
|
|
72
|
+
options: {
|
|
73
|
+
name: string;
|
|
74
|
+
type: "text" | "image" | "color";
|
|
75
|
+
values: {
|
|
76
|
+
name: string;
|
|
77
|
+
value: string;
|
|
78
|
+
}[];
|
|
79
|
+
}[];
|
|
80
|
+
createdAt: string;
|
|
81
|
+
updatedAt: string;
|
|
82
|
+
};
|
|
83
|
+
export type ProductDetails = {
|
|
84
|
+
id: string;
|
|
85
|
+
title: string;
|
|
86
|
+
handle: string;
|
|
87
|
+
featuredMedia: ProductFeaturedMedia;
|
|
88
|
+
status: "active" | "archived" | "draft" | "unlisted" | "";
|
|
89
|
+
options: ProductOption[];
|
|
90
|
+
onlineStoreUrl: string;
|
|
91
|
+
tracksInventory?: boolean;
|
|
92
|
+
collections: {
|
|
93
|
+
edges: CollectionNode[];
|
|
94
|
+
};
|
|
95
|
+
variants: {
|
|
96
|
+
edges: VariantNode[];
|
|
97
|
+
};
|
|
98
|
+
shop: string;
|
|
99
|
+
metafield?: {
|
|
100
|
+
key: string;
|
|
101
|
+
namespace: string;
|
|
102
|
+
ownerType: string;
|
|
103
|
+
value: string;
|
|
104
|
+
id: string;
|
|
105
|
+
jsonValue: string[];
|
|
106
|
+
type: string;
|
|
107
|
+
};
|
|
108
|
+
descriptionHtml: string;
|
|
109
|
+
media: {
|
|
110
|
+
edges: {
|
|
111
|
+
node: {
|
|
112
|
+
alt: string;
|
|
113
|
+
preview: {
|
|
114
|
+
image: {
|
|
115
|
+
altText: string;
|
|
116
|
+
width?: number;
|
|
117
|
+
height?: number;
|
|
118
|
+
url: string;
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
image: {
|
|
122
|
+
altText: string;
|
|
123
|
+
height: number;
|
|
124
|
+
width: number;
|
|
125
|
+
url: string;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
}[];
|
|
129
|
+
};
|
|
130
|
+
selectedVariant?: SelectedVariantDetails;
|
|
131
|
+
rating?: {
|
|
132
|
+
averageRating: number;
|
|
133
|
+
ratingCount: number;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
export type ProductData = {
|
|
137
|
+
productId: string;
|
|
138
|
+
variantIds: string[];
|
|
139
|
+
productDetails: ProductDetails;
|
|
140
|
+
};
|
|
141
|
+
type GeneralStyle = {
|
|
142
|
+
primaryColor: string;
|
|
143
|
+
primaryContrastColor: string;
|
|
144
|
+
secondaryColor: string;
|
|
145
|
+
secondaryContrastColor: string;
|
|
146
|
+
imageAspectRatio: string;
|
|
147
|
+
ctaBackgroundColor: string;
|
|
148
|
+
ctaTextColor: string;
|
|
149
|
+
ctaBorderColor: string;
|
|
150
|
+
ctaShadowType: string;
|
|
151
|
+
ctaPadding: string;
|
|
152
|
+
ctaWidth: string;
|
|
153
|
+
ctaBorderRadius: string;
|
|
154
|
+
ctaHoverBackgroundColor: string;
|
|
155
|
+
ctaHoverTextColor: string;
|
|
156
|
+
customizeHoverState: boolean;
|
|
157
|
+
checkoutPartner: string;
|
|
158
|
+
redirectToPDP: boolean;
|
|
159
|
+
restrictCOD: boolean;
|
|
160
|
+
trackInventory: boolean;
|
|
161
|
+
showOutOfStockProducts: boolean;
|
|
162
|
+
outOfStockLabel: string;
|
|
163
|
+
disabledButtonColor: string;
|
|
164
|
+
storeCurrency: string;
|
|
165
|
+
currencySymbol: string;
|
|
166
|
+
discountPrefix: string;
|
|
167
|
+
discountSuffix: string;
|
|
168
|
+
addOrderTags: boolean;
|
|
169
|
+
addOrderNotes: boolean;
|
|
170
|
+
variantTitleSuffix: boolean;
|
|
171
|
+
titleLength: string;
|
|
172
|
+
showDecimalsInBundlePricing?: boolean;
|
|
173
|
+
showPaymentIcons?: boolean;
|
|
174
|
+
};
|
|
175
|
+
type VolumeStyle = {
|
|
176
|
+
addtoCartMethod: string;
|
|
177
|
+
titleFontSize: string;
|
|
178
|
+
subtitleFontSize: string;
|
|
179
|
+
titleBackgroundColor: string;
|
|
180
|
+
titleTextColor: string;
|
|
181
|
+
verticalMargin: string;
|
|
182
|
+
sectionBackgroundColor: string;
|
|
183
|
+
cardStyle: string;
|
|
184
|
+
discountBadgeVisibility: string;
|
|
185
|
+
tierPriceType: "none" | "unit-price" | "tier-price";
|
|
186
|
+
allowVariantSelection: string;
|
|
187
|
+
variantSelectorType: string;
|
|
188
|
+
ctaTitle: string;
|
|
189
|
+
bundleRedirection: string;
|
|
190
|
+
discountBadgeDisplay: string;
|
|
191
|
+
discountDisplayType: string;
|
|
192
|
+
};
|
|
193
|
+
type ComboStyle = {
|
|
194
|
+
productTitleFontSize: string;
|
|
195
|
+
productDescriptionFontSize: string;
|
|
196
|
+
descriptionTextColor: string;
|
|
197
|
+
titleTextColor: string;
|
|
198
|
+
verticalMargin: string;
|
|
199
|
+
infoAlignment: string;
|
|
200
|
+
ctaTitle: string;
|
|
201
|
+
bundleRedirection: string;
|
|
202
|
+
embedContentVisibility: boolean;
|
|
203
|
+
mixAndMatchCardStyle: string;
|
|
204
|
+
mixAndMatchVariantTypeSelector: string;
|
|
205
|
+
comboCardStyle: string;
|
|
206
|
+
comboVariantTypeSelector: string;
|
|
207
|
+
selectedEmbedContentVisibilityOptions: string[];
|
|
208
|
+
subProductsSectionVisibility: boolean;
|
|
209
|
+
subProductsImageVisibility: boolean;
|
|
210
|
+
subProductsProductTitleVisibility: boolean;
|
|
211
|
+
subProductsProductPriceVisibility: boolean;
|
|
212
|
+
};
|
|
213
|
+
type ByobStyle = {
|
|
214
|
+
titleFontSize: string;
|
|
215
|
+
subtitleFontSize: string;
|
|
216
|
+
titleBackgroundColor: string;
|
|
217
|
+
titleTextColor: string;
|
|
218
|
+
productTitleFontSize: string;
|
|
219
|
+
showVariantTitleInCard: boolean;
|
|
220
|
+
productVariantTitleType: "product-title" | "variant-title" | "variant-display-name";
|
|
221
|
+
productTitleWrapLines: string;
|
|
222
|
+
productCardDetailsAlignment: "left" | "center" | "right";
|
|
223
|
+
sectionBackgroundColor: string;
|
|
224
|
+
lazyLoadWidget: string;
|
|
225
|
+
listingsGap: string;
|
|
226
|
+
footerMargin: string;
|
|
227
|
+
borderRadius: string;
|
|
228
|
+
borderColor: string;
|
|
229
|
+
cardBackgroundColor: string;
|
|
230
|
+
shadowType: string;
|
|
231
|
+
addToBundleCTAText: string;
|
|
232
|
+
checkoutCTAText: string;
|
|
233
|
+
variantSelectorType: string;
|
|
234
|
+
primaryVariant: string;
|
|
235
|
+
productsPriceVisibility: boolean;
|
|
236
|
+
compareAtPriceVisibility: boolean;
|
|
237
|
+
selectedProductsVisibility: boolean;
|
|
238
|
+
bundleRedirection: string;
|
|
239
|
+
enableConfetti: boolean;
|
|
240
|
+
selectedItemVisibility: boolean;
|
|
241
|
+
productTiersVisibility: boolean;
|
|
242
|
+
tierNavigation: boolean;
|
|
243
|
+
enableProductCategories: boolean;
|
|
244
|
+
productCardCategoryVisibility: string;
|
|
245
|
+
categoryFilterOnPage: string;
|
|
246
|
+
productFiltersDisplay: "none" | "drawer" | "sidebar";
|
|
247
|
+
filtersProvider: "based-on-products-data" | "search-and-discovery-app-sync";
|
|
248
|
+
selectedFilterOptions: string[];
|
|
249
|
+
};
|
|
250
|
+
type FixedStyle = {
|
|
251
|
+
titleFontSize: string;
|
|
252
|
+
subtitleFontSize: string;
|
|
253
|
+
titleBackgroundColor: string;
|
|
254
|
+
titleTextColor: string;
|
|
255
|
+
verticalMargin: string;
|
|
256
|
+
sectionBackgroundColor: string;
|
|
257
|
+
borderRadius: string;
|
|
258
|
+
borderColor: string;
|
|
259
|
+
cardBackgroundColor: string;
|
|
260
|
+
shadowType: string;
|
|
261
|
+
infoAlignment: string;
|
|
262
|
+
ctaTitle: string;
|
|
263
|
+
bundleRedirection: string;
|
|
264
|
+
cardLayoutStyle: string;
|
|
265
|
+
variantSelectorType: string;
|
|
266
|
+
productsPriceVisibility: boolean;
|
|
267
|
+
compareAtPriceVisibility: boolean;
|
|
268
|
+
};
|
|
269
|
+
export type Customizations = {
|
|
270
|
+
shop?: string;
|
|
271
|
+
general: GeneralStyle;
|
|
272
|
+
byob: ByobStyle;
|
|
273
|
+
fixedBundle: FixedStyle;
|
|
274
|
+
volumeBundle: VolumeStyle;
|
|
275
|
+
comboBundle: ComboStyle;
|
|
276
|
+
createdAt?: string;
|
|
277
|
+
updatedAt?: string;
|
|
278
|
+
};
|
|
279
|
+
export type ProductTier = {
|
|
280
|
+
tier: number;
|
|
281
|
+
title: string;
|
|
282
|
+
minimumQuantity: number;
|
|
283
|
+
isFixed?: boolean;
|
|
284
|
+
isFreebieTier?: boolean;
|
|
285
|
+
products: {
|
|
286
|
+
productId: string;
|
|
287
|
+
variantIds: string[];
|
|
288
|
+
}[];
|
|
289
|
+
};
|
|
290
|
+
export type BundlePayload = {
|
|
291
|
+
_id: string;
|
|
292
|
+
showIndividualProductSelector: boolean;
|
|
293
|
+
title?: string;
|
|
294
|
+
subtitle?: string;
|
|
295
|
+
products: ProductData[];
|
|
296
|
+
percentageOff?: number;
|
|
297
|
+
dealAmount?: number;
|
|
298
|
+
amountOff?: number;
|
|
299
|
+
type: "fixed" | "builder" | "volume" | "mixAndMatch" | "" | "combo" | "collection";
|
|
300
|
+
minimumQuantity: number;
|
|
301
|
+
showProductDetailsInTracker: boolean;
|
|
302
|
+
coverImageUrl?: string;
|
|
303
|
+
mobileCoverImageUrl?: string;
|
|
304
|
+
titleSectionTextColor?: string;
|
|
305
|
+
titleSectionBackgroundColor?: string;
|
|
306
|
+
dealTextColor?: string;
|
|
307
|
+
showBorder?: boolean;
|
|
308
|
+
hideProductDetails?: boolean;
|
|
309
|
+
cornerRadiusType?: "medium" | "high" | "";
|
|
310
|
+
primaryBackgroundColorCta?: string;
|
|
311
|
+
enableProgressBar?: boolean;
|
|
312
|
+
enableSortAndFilter?: boolean;
|
|
313
|
+
disableQuantitySelector?: boolean;
|
|
314
|
+
disableInventoryTracking?: boolean;
|
|
315
|
+
alignFixedBundleContent?: "left" | "right" | "center" | "";
|
|
316
|
+
imageAspectType?: "portrait" | "square" | "";
|
|
317
|
+
backgroundColorFixedBundleDiv?: string;
|
|
318
|
+
canCustomizeFixedBundle?: boolean;
|
|
319
|
+
primaryTextColorCta?: string;
|
|
320
|
+
showVariants?: boolean;
|
|
321
|
+
discountType?: string;
|
|
322
|
+
showCta?: boolean;
|
|
323
|
+
productCardBadgeText?: string;
|
|
324
|
+
coverImageVerticalMargin?: string;
|
|
325
|
+
builderTiers?: {
|
|
326
|
+
type: string;
|
|
327
|
+
offerTier?: {
|
|
328
|
+
tier: number;
|
|
329
|
+
minimumQuantity: number;
|
|
330
|
+
discountValue: number;
|
|
331
|
+
}[];
|
|
332
|
+
productTier?: ProductTier[];
|
|
333
|
+
};
|
|
334
|
+
volumeTiers?: {
|
|
335
|
+
isDefault: unknown;
|
|
336
|
+
tier: number;
|
|
337
|
+
minimumQuantity: number;
|
|
338
|
+
title: string;
|
|
339
|
+
subtitle: string;
|
|
340
|
+
badgeTitle: string;
|
|
341
|
+
discountValue: number;
|
|
342
|
+
imageUrl?: string;
|
|
343
|
+
}[];
|
|
344
|
+
mixAndMatchTiers?: {
|
|
345
|
+
tier: number;
|
|
346
|
+
title: string;
|
|
347
|
+
products: {
|
|
348
|
+
productId: string;
|
|
349
|
+
variantIds: string[];
|
|
350
|
+
}[];
|
|
351
|
+
}[];
|
|
352
|
+
customizations: Customizations;
|
|
353
|
+
variantOptions?: VariantOptions;
|
|
354
|
+
storeCurrencyCode?: string;
|
|
355
|
+
customStoreDetails?: {
|
|
356
|
+
[key: string]: any;
|
|
357
|
+
};
|
|
358
|
+
customProductsQuantity?: number | null;
|
|
359
|
+
reviewRatingType?: "none" | "ratingOnly" | "ratingAndReviewCount";
|
|
360
|
+
appName?: string;
|
|
361
|
+
pageHeader?: {
|
|
362
|
+
title?: string;
|
|
363
|
+
description?: string;
|
|
364
|
+
customizePadding?: string;
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
export type EventNameCustom = "byob_checkout_cta" | "byob_add_to_bundle" | "block_visibility" | "bundle_add_to_cart";
|
|
368
|
+
export type EventTypeCustom = "clicks" | "views";
|
|
369
|
+
export type AnalyticsEventParams = {
|
|
370
|
+
eventNameCustom: EventNameCustom;
|
|
371
|
+
eventTypeCustom: EventTypeCustom;
|
|
372
|
+
data: any;
|
|
373
|
+
};
|
|
374
|
+
export type BundleProps = {
|
|
375
|
+
bundle: BundlePayload;
|
|
376
|
+
addToCartFunction?: (selectedItemsSubtotal: number, variantIds?: string[], finalBundlePrice?: number, variantIdPriceMap?: {
|
|
377
|
+
variantId: string;
|
|
378
|
+
price: number;
|
|
379
|
+
}[]) => Promise<void>;
|
|
380
|
+
addCustomBundleToCart?: (e: any) => Promise<void>;
|
|
381
|
+
selectedItems?: {
|
|
382
|
+
variantId: string;
|
|
383
|
+
product: ProductDetails;
|
|
384
|
+
quantity: number;
|
|
385
|
+
}[];
|
|
386
|
+
setSelectedItems?: React.Dispatch<React.SetStateAction<{
|
|
387
|
+
variantId: string;
|
|
388
|
+
product: ProductDetails;
|
|
389
|
+
quantity: number;
|
|
390
|
+
}[]>>;
|
|
391
|
+
bundleAddToCartLoading?: boolean;
|
|
392
|
+
handleRemoveItem?: (variantId: string) => void;
|
|
393
|
+
selectedItemsQuantity?: number;
|
|
394
|
+
renderingOnPage?: boolean;
|
|
395
|
+
bundleSubtotal?: {
|
|
396
|
+
price: number;
|
|
397
|
+
compareAtPrice: number;
|
|
398
|
+
};
|
|
399
|
+
bundleHeaderBackgroundColor?: string;
|
|
400
|
+
currentProductId?: string;
|
|
401
|
+
dispatchAnalyticsEvent?: (params: AnalyticsEventParams) => void;
|
|
402
|
+
fetchStoreDetails?: () => Promise<any>;
|
|
403
|
+
};
|
|
404
|
+
export declare const currencyPrice: (price: number | string | undefined) => string | undefined;
|
|
405
|
+
export declare const getCurrencySymbol: (genSymbol: string, storeCurrencyCode?: string) => string;
|
|
406
|
+
export declare const optimiseImage: (url: string, width?: number) => string;
|
|
407
|
+
export declare const handleAddToBundle: (variantId: string, product: ProductDetails, quantity: number, selectedItems: {
|
|
408
|
+
variantId: string;
|
|
409
|
+
product: ProductDetails;
|
|
410
|
+
quantity: number;
|
|
411
|
+
tierIndex?: number | undefined;
|
|
412
|
+
}[], setSelectedItems: React.Dispatch<React.SetStateAction<{
|
|
413
|
+
variantId: string;
|
|
414
|
+
product: ProductDetails;
|
|
415
|
+
quantity: number;
|
|
416
|
+
isFree?: boolean | undefined;
|
|
417
|
+
tierIndex?: number | undefined;
|
|
418
|
+
}[]>>, isFreebie?: boolean, tierIndex?: number) => void;
|
|
419
|
+
declare const Bundle: React.FC<BundleProps>;
|
|
420
|
+
export default Bundle;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import "../bundle.scss";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { AnalyticsEventParams, BundlePayload, ProductDetails } from "../Bundle";
|
|
4
|
+
export declare function QuantitySelectorForBundle({ quantity, setQuantity, remainingQuantity, handleAddToBundle, variantId, product, handleRemoveItem, hideAddToBundle, selectedVariantInventoryQty, }: {
|
|
5
|
+
quantity: number;
|
|
6
|
+
setQuantity: React.Dispatch<React.SetStateAction<number>>;
|
|
7
|
+
remainingQuantity: number;
|
|
8
|
+
handleAddToBundle?: (variantId: string, product: ProductDetails, quantity: number) => void;
|
|
9
|
+
variantId?: string;
|
|
10
|
+
product?: ProductDetails;
|
|
11
|
+
handleRemoveItem?: (variantId: string, quantity: number) => void;
|
|
12
|
+
hideAddToBundle?: boolean;
|
|
13
|
+
selectedVariantInventoryQty: number | typeof Infinity;
|
|
14
|
+
}): React.JSX.Element;
|
|
15
|
+
export declare const productMatchesAllFilters: (product: any, applied: Record<string, string[]>, allFilters: any[], getMaxAvailableQty: (product: any, variantId: string) => number) => boolean;
|
|
16
|
+
type BundleBuilderProps = {
|
|
17
|
+
bundle: BundlePayload;
|
|
18
|
+
selectedItems: {
|
|
19
|
+
variantId: string;
|
|
20
|
+
product: ProductDetails;
|
|
21
|
+
quantity: number;
|
|
22
|
+
isFree?: boolean;
|
|
23
|
+
tierIndex?: number;
|
|
24
|
+
}[];
|
|
25
|
+
setSelectedItems: React.Dispatch<React.SetStateAction<{
|
|
26
|
+
variantId: string;
|
|
27
|
+
product: ProductDetails;
|
|
28
|
+
quantity: number;
|
|
29
|
+
isFree?: boolean;
|
|
30
|
+
tierIndex?: number;
|
|
31
|
+
}[]>>;
|
|
32
|
+
handleAddToCart: (e: any) => Promise<void>;
|
|
33
|
+
bundleAddToCartLoading: boolean;
|
|
34
|
+
renderingOnPage: boolean;
|
|
35
|
+
selectedItemsQuantity: number;
|
|
36
|
+
handleRemoveItem: (variantId: string, tierIndex?: number) => void;
|
|
37
|
+
bundleSubtotal: {
|
|
38
|
+
price: number;
|
|
39
|
+
compareAtPrice: number;
|
|
40
|
+
};
|
|
41
|
+
dispatchAnalyticsEvent?: (params: AnalyticsEventParams) => void;
|
|
42
|
+
fetchStoreDetails?: () => Promise<any>;
|
|
43
|
+
};
|
|
44
|
+
declare const BundleBuilder: React.FC<BundleBuilderProps>;
|
|
45
|
+
export default BundleBuilder;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface ResponsiveBackgroundImageProps {
|
|
3
|
+
coverImageUrl?: string;
|
|
4
|
+
mobileCoverImageUrl?: string;
|
|
5
|
+
alt?: string;
|
|
6
|
+
styles?: React.CSSProperties;
|
|
7
|
+
}
|
|
8
|
+
export declare const ResponsiveBackgroundImage: React.FC<ResponsiveBackgroundImageProps>;
|
|
9
|
+
export default ResponsiveBackgroundImage;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Customizations, ProductData } from "../Bundle";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export interface FilterValue {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
count: number;
|
|
7
|
+
input: string;
|
|
8
|
+
}
|
|
9
|
+
export interface FilterGroup {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
type: "LIST" | "PRICE_RANGE";
|
|
13
|
+
values: FilterValue[];
|
|
14
|
+
}
|
|
15
|
+
interface SortAndFilterProps {
|
|
16
|
+
enableSortAndFilter: boolean;
|
|
17
|
+
isMobile: boolean;
|
|
18
|
+
setSearchTerm: (term: string) => void;
|
|
19
|
+
searchTerm: string;
|
|
20
|
+
styles?: Customizations;
|
|
21
|
+
setSortBy: (sort: string) => void;
|
|
22
|
+
appliedFilters: Record<string, string[]>;
|
|
23
|
+
setAppliedFilters: React.Dispatch<React.SetStateAction<Record<string, string[]>>>;
|
|
24
|
+
availableFilters: FilterGroup[];
|
|
25
|
+
products: ProductData[];
|
|
26
|
+
availableProductCount?: number;
|
|
27
|
+
unavailableProductCount?: number;
|
|
28
|
+
maxPossiblePrice: number;
|
|
29
|
+
storeCurrencyCode?: string;
|
|
30
|
+
openSections: Record<string, boolean>;
|
|
31
|
+
toggleSection: (id: string) => void;
|
|
32
|
+
sortBy?: string;
|
|
33
|
+
}
|
|
34
|
+
interface FiltersDrawerProps {
|
|
35
|
+
showFiltersDrawer: boolean;
|
|
36
|
+
handleClose: () => void;
|
|
37
|
+
isAnimating: boolean;
|
|
38
|
+
isMobile: boolean;
|
|
39
|
+
availableFilters: FilterGroup[];
|
|
40
|
+
appliedFilters: Record<string, string[]>;
|
|
41
|
+
toggleFilter: (filterId: string, valueId: string) => void;
|
|
42
|
+
clearAllFilters: () => void;
|
|
43
|
+
applyPriceFilter: () => void;
|
|
44
|
+
priceMin: number;
|
|
45
|
+
setPriceMin: (val: number) => void;
|
|
46
|
+
priceMax: number;
|
|
47
|
+
setPriceMax: (val: number) => void;
|
|
48
|
+
maxPossiblePrice: number;
|
|
49
|
+
styles: any;
|
|
50
|
+
unavailableProductCount?: number;
|
|
51
|
+
availableProductCount?: number;
|
|
52
|
+
products: ProductData[];
|
|
53
|
+
storeCurrencyCode?: string;
|
|
54
|
+
openSections?: Record<string, boolean>;
|
|
55
|
+
toggleSection?: (id: string) => void;
|
|
56
|
+
}
|
|
57
|
+
export declare const FiltersSidebar: (props: FiltersDrawerProps) => React.JSX.Element | null;
|
|
58
|
+
interface FiltersSharedState {
|
|
59
|
+
showFilters: boolean;
|
|
60
|
+
setShowFilters: (show: boolean) => void;
|
|
61
|
+
priceMax: number;
|
|
62
|
+
setPriceMax: (val: number) => void;
|
|
63
|
+
priceMin: number;
|
|
64
|
+
setPriceMin: (val: number) => void;
|
|
65
|
+
}
|
|
66
|
+
export declare const SortAndFilter: ({ enableSortAndFilter, isMobile, setSearchTerm, searchTerm, styles, setSortBy, appliedFilters, setAppliedFilters, availableFilters, products, availableProductCount, unavailableProductCount, maxPossiblePrice, storeCurrencyCode, sharedFiltersState, openSections, toggleSection, sortBy, }: SortAndFilterProps & {
|
|
67
|
+
sharedFiltersState: FiltersSharedState;
|
|
68
|
+
}) => React.JSX.Element;
|
|
69
|
+
export {};
|