yt-uikit 0.9.26-progress-bar-ui.9 → 0.9.26-progress-bar-ui.11
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/assets/confetti.d.ts +2 -0
- package/dist/esm/atoms/variantChangeErrorAtom.d.ts +3 -0
- package/dist/esm/atoms/variantSelectionModalAtom.d.ts +8 -0
- package/dist/esm/components/BundleBlock/Bundle.d.ts +13 -1
- package/dist/esm/components/BundleBlock/BundleBuilderTracker/BundleBuilderTracker.d.ts +1 -0
- package/dist/esm/components/BundleBlock/BundleProductDetailsModal/BundleProductDetailsModal.d.ts +1 -1
- package/dist/esm/components/BundleBlock/CollectionBundle/ColllectionBundle.d.ts +5 -1
- package/dist/esm/components/BundleBlock/FixedBundle/SeparateVariantOptions.d.ts +1 -0
- package/dist/esm/components/BundleBlock/FixedBundle/fixedBundle.style.d.ts +1 -0
- package/dist/esm/components/Cart/Cart.d.ts +12 -2
- package/dist/esm/components/Cart/CartDrawer.d.ts +2 -1
- package/dist/esm/components/Cart/CartProductsList.d.ts +2 -0
- package/dist/esm/components/Cart/CheckoutSection.d.ts +2 -1
- package/dist/esm/components/Cart/CustomSelect.d.ts +19 -0
- package/dist/esm/components/Cart/EmptyCart.d.ts +2 -1
- package/dist/esm/components/Cart/FreebieClaimManager.d.ts +2 -1
- package/dist/esm/components/Cart/FreebieClaimSection.d.ts +2 -1
- package/dist/esm/components/Cart/FreebieClaimSectionCard.d.ts +2 -1
- package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepIcon.d.ts +1 -1
- package/dist/esm/components/Cart/MultiStepProgressBar/types.d.ts +2 -2
- package/dist/esm/components/Cart/NextFreebieRow.d.ts +2 -0
- package/dist/esm/components/Cart/StealDealSection.d.ts +2 -1
- package/dist/esm/components/Cart/VariantSelectionPopup/DesktopVariantPopup.d.ts +3 -2
- package/dist/esm/components/Cart/VariantSelectionPopup/MobileVariantPopover.d.ts +3 -2
- package/dist/esm/components/Loyalty/ActiveSessionOverlay.d.ts +8 -0
- package/dist/esm/components/Loyalty/BubbleLauncher.d.ts +13 -0
- package/dist/esm/components/Loyalty/GuestDesktop.d.ts +5 -0
- package/dist/esm/components/Loyalty/GuestDesktopWithoutImage.d.ts +7 -0
- package/dist/esm/components/Loyalty/GuestMobile.d.ts +6 -0
- package/dist/esm/components/Loyalty/LoyaltyProductCatalog.d.ts +9 -1
- package/dist/esm/components/Loyalty/LoyaltyProfile.d.ts +7 -0
- package/dist/esm/components/Loyalty/LoyaltyWidget.d.ts +6 -0
- package/dist/esm/components/Loyalty/OTPComponent.d.ts +20 -0
- package/dist/esm/components/Loyalty/PointEarnBadge.d.ts +15 -0
- package/dist/esm/components/Loyalty/RecentTransactions.d.ts +8 -0
- package/dist/esm/components/Loyalty/RewardsModal.d.ts +13 -0
- package/dist/esm/components/Loyalty/RibbonLauncher.d.ts +11 -0
- package/dist/esm/components/Loyalty/StickyLauncher.d.ts +13 -0
- package/dist/esm/components/Loyalty/StickyTextLauncher.d.ts +2 -0
- package/dist/esm/components/Loyalty/Toast.d.ts +7 -0
- package/dist/esm/components/Loyalty/VIPTiersScreen.d.ts +11 -0
- package/dist/esm/components/Loyalty/WTRCoupon.d.ts +13 -0
- package/dist/esm/components/Loyalty/WaysToEarn.d.ts +32 -0
- package/dist/esm/components/Loyalty/WaysToRedeem.d.ts +78 -0
- package/dist/esm/components/Loyalty/index.d.ts +6 -1
- package/dist/esm/components/Loyalty/loyaltyLauncher.d.ts +16 -0
- package/dist/esm/components/Loyalty/styles/ActiveSession.styles.d.ts +3 -0
- package/dist/esm/components/Loyalty/styles/DobPopup.styles.d.ts +3 -0
- package/dist/esm/components/Loyalty/styles/PointEarnBadge.styles.d.ts +3 -0
- package/dist/esm/components/Loyalty/styles/RecentTransactions.styles.d.ts +6 -0
- package/dist/esm/components/Loyalty/styles/VIPTiers.styles.d.ts +4 -0
- package/dist/esm/components/Loyalty/styles/WaysToRedeem.styles.d.ts +5 -0
- package/dist/esm/components/Loyalty/styles/shared.styles.d.ts +3 -0
- package/dist/esm/components/Loyalty/types.d.ts +401 -0
- package/dist/esm/components/LoyaltyPageBlock/LoyaltyPageBlock.d.ts +145 -56
- package/dist/esm/components/index.d.ts +7 -2
- package/dist/esm/confetti-89678a6f.js +1 -0
- package/dist/esm/index.js +515 -516
- package/dist/esm/utils/customVariantOptions.d.ts +1 -0
- package/dist/esm/utils/freebieProductUtils.d.ts +5 -2
- package/dist/esm/utils/freebieUtils.d.ts +7 -1
- package/package.json +3 -1
|
@@ -8,6 +8,10 @@ export declare const variantSelectionModalState: import("jotai").PrimitiveAtom<{
|
|
|
8
8
|
lineItemKey?: string | undefined;
|
|
9
9
|
productId?: string | undefined;
|
|
10
10
|
allowedVariantIds?: string[] | undefined;
|
|
11
|
+
rewardContext?: {
|
|
12
|
+
couponTemplateId?: string | undefined;
|
|
13
|
+
rewardKey?: string | undefined;
|
|
14
|
+
} | undefined;
|
|
11
15
|
productRec?: boolean | undefined;
|
|
12
16
|
}> & {
|
|
13
17
|
init: {
|
|
@@ -20,6 +24,10 @@ export declare const variantSelectionModalState: import("jotai").PrimitiveAtom<{
|
|
|
20
24
|
lineItemKey?: string | undefined;
|
|
21
25
|
productId?: string | undefined;
|
|
22
26
|
allowedVariantIds?: string[] | undefined;
|
|
27
|
+
rewardContext?: {
|
|
28
|
+
couponTemplateId?: string | undefined;
|
|
29
|
+
rewardKey?: string | undefined;
|
|
30
|
+
} | undefined;
|
|
23
31
|
productRec?: boolean | undefined;
|
|
24
32
|
};
|
|
25
33
|
};
|
|
@@ -190,6 +190,7 @@ type VolumeStyle = {
|
|
|
190
190
|
bundleRedirection: string;
|
|
191
191
|
discountBadgeDisplay: string;
|
|
192
192
|
discountDisplayType: string;
|
|
193
|
+
freebieDisplayType?: "compact" | "detailed";
|
|
193
194
|
showVariantOptionsLabel: boolean;
|
|
194
195
|
};
|
|
195
196
|
type ComboStyle = {
|
|
@@ -213,6 +214,9 @@ type ComboStyle = {
|
|
|
213
214
|
subProductsProductPriceVisibility: boolean;
|
|
214
215
|
discountBadgeVisibility?: boolean;
|
|
215
216
|
discountBadgeDisplay?: "discount-on-compare" | "discount-on-price";
|
|
217
|
+
discountDisplayType?: "percentage" | "amount";
|
|
218
|
+
comboProductRatingsDisplay?: string;
|
|
219
|
+
mixAndMatchProductRatingsDisplay?: string;
|
|
216
220
|
};
|
|
217
221
|
type ByobStyle = {
|
|
218
222
|
titleFontSize: string;
|
|
@@ -250,6 +254,10 @@ type ByobStyle = {
|
|
|
250
254
|
productFiltersDisplay: "none" | "drawer" | "sidebar";
|
|
251
255
|
filtersProvider: "based-on-products-data" | "search-and-discovery-app-sync";
|
|
252
256
|
selectedFilterOptions: string[];
|
|
257
|
+
productRatingsDisplay?: string;
|
|
258
|
+
discountBadgeVisibility?: boolean;
|
|
259
|
+
discountBadgeDisplay?: "discount-on-compare" | "discount-on-price";
|
|
260
|
+
discountDisplayType?: string;
|
|
253
261
|
};
|
|
254
262
|
type FixedStyle = {
|
|
255
263
|
titleFontSize: string;
|
|
@@ -270,7 +278,9 @@ type FixedStyle = {
|
|
|
270
278
|
productsPriceVisibility: boolean;
|
|
271
279
|
compareAtPriceVisibility: boolean;
|
|
272
280
|
discountBadgeVisibility?: boolean;
|
|
281
|
+
discountDisplayType?: string;
|
|
273
282
|
discountBadgeDisplay?: "discount-on-compare" | "discount-on-price";
|
|
283
|
+
productRatingsDisplay?: string;
|
|
274
284
|
};
|
|
275
285
|
export type Customizations = {
|
|
276
286
|
shop?: string;
|
|
@@ -299,6 +309,7 @@ export type BundlePayload = {
|
|
|
299
309
|
title?: string;
|
|
300
310
|
subtitle?: string;
|
|
301
311
|
products: ProductData[];
|
|
312
|
+
freebieProducts?: ProductData[];
|
|
302
313
|
percentageOff?: number;
|
|
303
314
|
dealAmount?: number;
|
|
304
315
|
amountOff?: number;
|
|
@@ -346,6 +357,7 @@ export type BundlePayload = {
|
|
|
346
357
|
badgeTitle: string;
|
|
347
358
|
discountValue: number;
|
|
348
359
|
imageUrl?: string;
|
|
360
|
+
freebieProductIds?: string[];
|
|
349
361
|
}[];
|
|
350
362
|
mixAndMatchTiers?: {
|
|
351
363
|
tier: number;
|
|
@@ -396,7 +408,7 @@ export type BundleProps = {
|
|
|
396
408
|
addToCartFunction?: (selectedItemsSubtotal: number, variantIds?: string[], finalBundlePrice?: number, variantIdPriceMap?: {
|
|
397
409
|
variantId: string;
|
|
398
410
|
price: number;
|
|
399
|
-
}[], properties?: Record<string, string
|
|
411
|
+
}[], properties?: Record<string, string>, freebieProduct?: string[]) => Promise<void>;
|
|
400
412
|
addCustomBundleToCart?: (e: any, formProperties?: Record<string, any>) => Promise<void>;
|
|
401
413
|
selectedItems?: {
|
|
402
414
|
variantId: string;
|
package/dist/esm/components/BundleBlock/BundleProductDetailsModal/BundleProductDetailsModal.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ type BundleProductDetailsModalProps = {
|
|
|
19
19
|
primaryTextColorCta: string;
|
|
20
20
|
primaryBackgroundColorCta: string;
|
|
21
21
|
styles: Customizations;
|
|
22
|
-
reviewRatingType?:
|
|
22
|
+
reviewRatingType?: string;
|
|
23
23
|
rating?: {
|
|
24
24
|
averageRating: number;
|
|
25
25
|
ratingCount: number;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { AnalyticsEventParams } from "../Bundle";
|
|
2
3
|
export type Product = {
|
|
3
4
|
id: number;
|
|
4
5
|
title: string;
|
|
@@ -64,6 +65,8 @@ type DiscountData = {
|
|
|
64
65
|
};
|
|
65
66
|
} | null;
|
|
66
67
|
export type BundleConfig = {
|
|
68
|
+
id: string;
|
|
69
|
+
type: string;
|
|
67
70
|
config: {
|
|
68
71
|
shop: string;
|
|
69
72
|
collectionIds: string[];
|
|
@@ -124,6 +127,7 @@ interface CollectionBundleProps {
|
|
|
124
127
|
config: BundleConfig;
|
|
125
128
|
addCustomBundleToCart: (items: any) => void;
|
|
126
129
|
bundleAddToCartLoading: boolean;
|
|
130
|
+
dispatchAnalyticsEvent?: (params: AnalyticsEventParams) => void;
|
|
127
131
|
}
|
|
128
|
-
declare const CollectionBundle: ({ config, bundleAddToCartLoading, addCustomBundleToCart, }: CollectionBundleProps) => React.JSX.Element;
|
|
132
|
+
declare const CollectionBundle: ({ config, bundleAddToCartLoading, addCustomBundleToCart, dispatchAnalyticsEvent, }: CollectionBundleProps) => React.JSX.Element;
|
|
129
133
|
export default CollectionBundle;
|
|
@@ -77,4 +77,5 @@ export declare const VerticalCheckboxWrapper: import("styled-components/dist/typ
|
|
|
77
77
|
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
78
78
|
}, {
|
|
79
79
|
isImage?: boolean | undefined;
|
|
80
|
+
showQtySelector?: boolean | undefined;
|
|
80
81
|
}>> & string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { type DrawerLayout } from "./CartDrawer";
|
|
3
|
+
import { FreebieRewardContext } from "../../utils/freebieUtils";
|
|
3
4
|
import { stickyCartCustomizationDataProps } from "./StickyCart";
|
|
4
5
|
import { CartOffersCarousalProps } from "./CartOffersCarousel";
|
|
5
6
|
import { freebieMilestoneProps } from "./NextFreebieRow";
|
|
@@ -82,6 +83,14 @@ export interface CouponSelectionData {
|
|
|
82
83
|
couponTextSuffix?: string;
|
|
83
84
|
applyButtonText?: string;
|
|
84
85
|
}
|
|
86
|
+
export type TierIconSizeType = "small" | "medium" | "large";
|
|
87
|
+
export type TierStyleType = "poppins" | "sans-serif" | "monospace";
|
|
88
|
+
export interface ProgressBarCartConfigData {
|
|
89
|
+
showProgressTiersTitle?: boolean;
|
|
90
|
+
tierIconSize?: TierIconSizeType;
|
|
91
|
+
tierStyle?: TierStyleType;
|
|
92
|
+
isTierLineIconVisible?: boolean;
|
|
93
|
+
}
|
|
85
94
|
export interface CartProps {
|
|
86
95
|
isOpen: boolean;
|
|
87
96
|
setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
@@ -172,7 +181,7 @@ export interface CartProps {
|
|
|
172
181
|
freebieProductsInCart?: any;
|
|
173
182
|
currentTier?: number;
|
|
174
183
|
showFreebieClaim?: boolean;
|
|
175
|
-
addFreebieToCart?: (variantId: string) => Promise<void>;
|
|
184
|
+
addFreebieToCart?: (variantId: string, originalAllowedVariantIds?: string[], rewardContext?: FreebieRewardContext) => Promise<void>;
|
|
176
185
|
freebiesInCart?: string[];
|
|
177
186
|
effectiveQuantityForProgressBar?: number;
|
|
178
187
|
productPercentageOffMapping: {
|
|
@@ -248,11 +257,12 @@ export interface CartProps {
|
|
|
248
257
|
}[]) => Promise<void>;
|
|
249
258
|
stealDealCheckpoints?: Checkpoint[];
|
|
250
259
|
stealDealProducts?: any[];
|
|
251
|
-
stealDealAddToCart?: (variantId: string, originalAllowedVariantIds?: string[]) => Promise<void>;
|
|
260
|
+
stealDealAddToCart?: (variantId: string, originalAllowedVariantIds?: string[], rewardContext?: FreebieRewardContext) => Promise<void>;
|
|
252
261
|
useCartShell?: boolean;
|
|
253
262
|
showTrustedBadge?: boolean;
|
|
254
263
|
trustedBadgeData?: trustedBadgeInterface;
|
|
255
264
|
drawerLayoutData?: DrawerLayout;
|
|
265
|
+
progressBarCartConfigData?: ProgressBarCartConfigData;
|
|
256
266
|
}
|
|
257
267
|
declare const Cart: React.FC<CartProps>;
|
|
258
268
|
export default Cart;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { CartProps, RewardCoupon } from "./Cart";
|
|
2
|
+
import { CartProps, ProgressBarCartConfigData, RewardCoupon } from "./Cart";
|
|
3
3
|
import "./shared.scss";
|
|
4
4
|
export interface DrawerLayout {
|
|
5
5
|
headerIds?: string[];
|
|
@@ -29,6 +29,7 @@ interface CartDrawerProps extends CartProps {
|
|
|
29
29
|
showTrustedBadge?: boolean;
|
|
30
30
|
trustedBadgeData?: CartProps["trustedBadgeData"];
|
|
31
31
|
drawerLayoutData?: DrawerLayout;
|
|
32
|
+
progressBarCartConfigData?: ProgressBarCartConfigData;
|
|
32
33
|
}
|
|
33
34
|
declare const CartDrawer: React.FC<CartDrawerProps>;
|
|
34
35
|
export default CartDrawer;
|
|
@@ -40,6 +40,8 @@ type CartProductsListProps = {
|
|
|
40
40
|
showFreebieMilestone?: boolean;
|
|
41
41
|
freebieMilestoneData?: freebieMilestoneProps;
|
|
42
42
|
freeLabelText?: string;
|
|
43
|
+
customCartProgressBarCriteria?: string;
|
|
44
|
+
effectiveQuantityForProgressBar?: number;
|
|
43
45
|
};
|
|
44
46
|
declare const CartProductsList: React.FC<CartProductsListProps>;
|
|
45
47
|
export default CartProductsList;
|
|
@@ -42,6 +42,7 @@ interface CheckoutSectionProps {
|
|
|
42
42
|
hideSubtotalAndBadge?: boolean;
|
|
43
43
|
showTrustedBadge?: boolean;
|
|
44
44
|
trustedBadgeData?: trustedBadgeInterface;
|
|
45
|
+
isLargeScreen?: boolean;
|
|
45
46
|
}
|
|
46
|
-
declare function CheckoutSection({ checkoutButtonColor, checkoutFontSize, checkoutFunction, discountApplied, discountInCheckoutButton, discountAmountApplied, minimumCartValue, themeTextColor, applyGSTToCart, showGSTOption, applyNoteToCart, showNoteOption, enableGeoLocationDeliveryRestriction, applyPostalCodeAndDeliverySlotToCart, enableSlotPicker, isStickyCheckout, cartComponentsCornerType, cartComponentsCornerRadius, checkoutSectionMessage, checkoutSectionMessageDisplay, checkoutSectionMessageRedirectLink, showDiscountOnMRP, tertiaryColor, tertiaryTextColor, cartCheckpoints, toggleDecimal, disableCheckoutButton, checkoutButtonBottomSpacing, showCheckoutButtonPaymentIcons, primaryTextColor, hideSubtotalAndBadge, showTrustedBadge, trustedBadgeData, }: CheckoutSectionProps): React.JSX.Element;
|
|
47
|
+
declare function CheckoutSection({ checkoutButtonColor, checkoutFontSize, checkoutFunction, discountApplied, discountInCheckoutButton, discountAmountApplied, minimumCartValue, themeTextColor, applyGSTToCart, showGSTOption, applyNoteToCart, showNoteOption, enableGeoLocationDeliveryRestriction, applyPostalCodeAndDeliverySlotToCart, enableSlotPicker, isStickyCheckout, cartComponentsCornerType, cartComponentsCornerRadius, checkoutSectionMessage, checkoutSectionMessageDisplay, checkoutSectionMessageRedirectLink, showDiscountOnMRP, tertiaryColor, tertiaryTextColor, cartCheckpoints, toggleDecimal, disableCheckoutButton, checkoutButtonBottomSpacing, showCheckoutButtonPaymentIcons, primaryTextColor, hideSubtotalAndBadge, showTrustedBadge, trustedBadgeData, isLargeScreen }: CheckoutSectionProps): React.JSX.Element;
|
|
47
48
|
export default CheckoutSection;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type SelectOption = {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string | number;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export type CustomSelectProps = {
|
|
8
|
+
options: SelectOption[];
|
|
9
|
+
value: string | number;
|
|
10
|
+
onChange: (value: string | number) => void;
|
|
11
|
+
prefix?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
themeColor?: string;
|
|
14
|
+
cartComponentsCornerType?: "rounded" | "sharp";
|
|
15
|
+
cartComponentsCornerRadius?: number;
|
|
16
|
+
backgroundSubdued?: string;
|
|
17
|
+
};
|
|
18
|
+
declare const CustomSelect: React.FC<CustomSelectProps>;
|
|
19
|
+
export default CustomSelect;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { CartProps } from "./Cart";
|
|
3
|
-
export default function EmptyCart({ showLoyaltyCta, exploreCTAColor, emptyCartTitle, emptyCartDescription, isUserSignedIn, joinNowFunction, exploreCtaRedirectLink, themeColor, emptyCartButtons, cartComponentsCornerRadius, cartComponentsCornerType, themeTextColor, recProductsList, addCartItem, productRecsCtaButtonText, ctaButtonBackgroundColor, ctaButtonTextColor, primaryTextColor, secondaryTextColor, showVariantSelectionDropdownInProductRecs, productRecsTitleText, emptyProductRecsTitleText, backgroundSubdued, showEmptyCartRecommendations, tertiaryColor, tertiaryTextColor, }: {
|
|
3
|
+
export default function EmptyCart({ showLoyaltyCta, exploreCTAColor, emptyCartTitle, emptyCartDescription, isUserSignedIn, joinNowFunction, exploreCtaRedirectLink, themeColor, emptyCartButtons, cartComponentsCornerRadius, cartComponentsCornerType, themeTextColor, isRecProductsListValid, recProductsList, addCartItem, productRecsCtaButtonText, ctaButtonBackgroundColor, ctaButtonTextColor, primaryTextColor, secondaryTextColor, showVariantSelectionDropdownInProductRecs, productRecsTitleText, emptyProductRecsTitleText, backgroundSubdued, showEmptyCartRecommendations, tertiaryColor, tertiaryTextColor, }: {
|
|
4
4
|
showLoyaltyCta: boolean;
|
|
5
5
|
exploreCTAColor: any;
|
|
6
6
|
emptyCartTitle: string;
|
|
@@ -16,6 +16,7 @@ export default function EmptyCart({ showLoyaltyCta, exploreCTAColor, emptyCartTi
|
|
|
16
16
|
cartComponentsCornerRadius?: number;
|
|
17
17
|
cartComponentsCornerType?: "rounded" | "sharp";
|
|
18
18
|
themeTextColor?: string;
|
|
19
|
+
isRecProductsListValid?: boolean;
|
|
19
20
|
recProductsList?: any[];
|
|
20
21
|
addCartItem?: CartProps["addCartItem"];
|
|
21
22
|
productRecsCtaButtonText?: CartProps["productRecsCtaButtonText"];
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { freebieClaimInterface, Checkpoint } from "./Cart";
|
|
3
|
+
import { FreebieRewardContext } from "../../utils/freebieUtils";
|
|
3
4
|
interface FreebieClaimManagerProps {
|
|
4
5
|
freebieProductsInCart: any[];
|
|
5
6
|
themeColor?: string;
|
|
6
7
|
themeTextColor?: string;
|
|
7
8
|
primaryTextColor?: string;
|
|
8
|
-
addFreebieToCart?: (variantId: string, originalAllowedVariantIds?: string[]) => Promise<void>;
|
|
9
|
+
addFreebieToCart?: (variantId: string, originalAllowedVariantIds?: string[], rewardContext?: FreebieRewardContext) => Promise<void>;
|
|
9
10
|
freebiesInCart: string[];
|
|
10
11
|
freebieClaimData?: freebieClaimInterface;
|
|
11
12
|
cartCheckpoints?: Checkpoint[];
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { FreebieRewardContext } from "../../utils/freebieUtils";
|
|
2
3
|
import { Checkpoint } from "./Cart";
|
|
3
4
|
interface FreebieClaimSectionProps {
|
|
4
5
|
freebieProductsInCart: any[];
|
|
5
6
|
themeColor?: string;
|
|
6
7
|
themeTextColor?: string;
|
|
7
8
|
primaryTextColor?: string;
|
|
8
|
-
addFreebieToCart?: (variantId: string, originalAllowedVariantIds?: string[]) => Promise<void>;
|
|
9
|
+
addFreebieToCart?: (variantId: string, originalAllowedVariantIds?: string[], rewardContext?: FreebieRewardContext) => Promise<void>;
|
|
9
10
|
freebiesInCart: string[];
|
|
10
11
|
imageAspectSelector?: "square" | "portrait";
|
|
11
12
|
freebieCouponTemplates?: Checkpoint[];
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { FreebieRewardContext } from "../../utils/freebieUtils";
|
|
2
3
|
interface FreebieClaimSectionCardProps {
|
|
3
4
|
product: any;
|
|
4
5
|
themeColor?: string;
|
|
5
6
|
themeTextColor?: string;
|
|
6
|
-
addFreebieToCart?: (variantId: string, originalAllowedVariantIds?: string[]) => Promise<void>;
|
|
7
|
+
addFreebieToCart?: (variantId: string, originalAllowedVariantIds?: string[], rewardContext?: FreebieRewardContext) => Promise<void>;
|
|
7
8
|
productClaimCtaButtonText?: string;
|
|
8
9
|
imageAspectSelector?: "square" | "portrait";
|
|
9
10
|
freebieCouponTemplates?: any;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { IconType } from "react-icons";
|
|
3
|
-
export declare const MultiStepIcon: (couponType: string, color: string, numberOfCheckpoints: number, freeProductIconType: string, themeTextColor?: string,
|
|
3
|
+
export declare const MultiStepIcon: (couponType: string, color: string, numberOfCheckpoints: number, freeProductIconType: string, themeTextColor?: string, isTierLineIconVisible?: boolean) => React.ReactElement;
|
|
4
4
|
export declare const progressBarCheckpointFreeProductIconMap: {
|
|
5
5
|
[key: string]: IconType;
|
|
6
6
|
};
|
|
@@ -3,7 +3,7 @@ export interface CheckpointWithProgress extends Checkpoint {
|
|
|
3
3
|
progressPercentage: number;
|
|
4
4
|
}
|
|
5
5
|
export interface MultiStepProgressBarProps {
|
|
6
|
-
|
|
6
|
+
isTierLineIconVisible?: boolean;
|
|
7
7
|
currentCartAmount: number;
|
|
8
8
|
checkpoints: Checkpoint[];
|
|
9
9
|
themeColor?: string;
|
|
@@ -38,7 +38,7 @@ export interface CheckpointIconProps {
|
|
|
38
38
|
progressBarFreeProductIconType?: string;
|
|
39
39
|
themeTextColor?: string;
|
|
40
40
|
ctaButtonTextColor?: string;
|
|
41
|
-
|
|
41
|
+
isTierLineIconVisible?: boolean;
|
|
42
42
|
}
|
|
43
43
|
export interface NextRewardMessageProps {
|
|
44
44
|
currentCartAmount: number;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { FreebieRewardContext } from "../../utils/freebieUtils";
|
|
2
3
|
interface StealDealSectionProps {
|
|
3
4
|
stealDealCheckpoints: any[];
|
|
4
5
|
stealDealProducts: any[];
|
|
5
6
|
freeProductAdjustedCartTotal?: number;
|
|
6
7
|
effectiveQuantityForProgressBar?: number;
|
|
7
|
-
addFreebieToCart?: (variantId: string, originalAllowedVariantIds?: string[]) => Promise<void>;
|
|
8
|
+
addFreebieToCart?: (variantId: string, originalAllowedVariantIds?: string[], rewardContext?: FreebieRewardContext) => Promise<void>;
|
|
8
9
|
freebiesInCart: string[];
|
|
9
10
|
themeColor?: string;
|
|
10
11
|
primaryTextColor?: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { FreebieRewardContext } from "../../../utils/freebieUtils";
|
|
2
3
|
type DesktopVariantPopupProps = {
|
|
3
4
|
isDev?: boolean;
|
|
4
5
|
removeCartItem: (variantId: string, triggeredFrom?: string, ytRequest?: boolean) => Promise<any>;
|
|
@@ -9,8 +10,8 @@ type DesktopVariantPopupProps = {
|
|
|
9
10
|
cartComponentsCornerRadius?: number;
|
|
10
11
|
backgroundColor?: string;
|
|
11
12
|
removeFreebieFromCart?: (lineItemKey: string) => Promise<void>;
|
|
12
|
-
freebieClaimAddToCart?: (variantId: string, originalAllowedVariantIds?: string[]) => Promise<void>;
|
|
13
|
-
stealDealAddToCart?: (variantId: string, originalAllowedVariantIds?: string[]) => Promise<void>;
|
|
13
|
+
freebieClaimAddToCart?: (variantId: string, originalAllowedVariantIds?: string[], rewardContext?: FreebieRewardContext) => Promise<void>;
|
|
14
|
+
stealDealAddToCart?: (variantId: string, originalAllowedVariantIds?: string[], rewardContext?: FreebieRewardContext) => Promise<void>;
|
|
14
15
|
productClaimCtaButtonText?: string;
|
|
15
16
|
backgroundSubdued?: string;
|
|
16
17
|
primaryTextColor?: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { FreebieRewardContext } from "../../../utils/freebieUtils";
|
|
2
3
|
type MobileVariantPopupProps = {
|
|
3
4
|
isDev?: boolean;
|
|
4
5
|
removeCartItem: (variantId: string, triggeredFrom?: string, ytRequest?: boolean) => Promise<any>;
|
|
@@ -9,8 +10,8 @@ type MobileVariantPopupProps = {
|
|
|
9
10
|
cartComponentsCornerRadius?: number;
|
|
10
11
|
backgroundColor: string;
|
|
11
12
|
removeFreebieFromCart?: (lineItemKey: string) => Promise<void>;
|
|
12
|
-
freebieClaimAddToCart?: (variantId: string, originalAllowedVariantIds?: string[]) => Promise<void>;
|
|
13
|
-
stealDealAddToCart?: (variantId: string, originalAllowedVariantIds?: string[]) => Promise<void>;
|
|
13
|
+
freebieClaimAddToCart?: (variantId: string, originalAllowedVariantIds?: string[], rewardContext?: FreebieRewardContext) => Promise<void>;
|
|
14
|
+
stealDealAddToCart?: (variantId: string, originalAllowedVariantIds?: string[], rewardContext?: FreebieRewardContext) => Promise<void>;
|
|
14
15
|
productClaimCtaButtonText?: string;
|
|
15
16
|
backgroundSubdued?: string;
|
|
16
17
|
primaryTextColor?: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export default function BubbleLauncher({ textColor, backgroundColor, position, yOffsetValue, launcherTitle, borderColor, iconType, addVisibilityDelay, addAttentionWaves, onClick }: {
|
|
3
|
+
textColor?: string | undefined;
|
|
4
|
+
backgroundColor?: string | undefined;
|
|
5
|
+
position?: string | undefined;
|
|
6
|
+
yOffsetValue?: string | undefined;
|
|
7
|
+
launcherTitle?: string | undefined;
|
|
8
|
+
borderColor?: string | undefined;
|
|
9
|
+
iconType?: string | undefined;
|
|
10
|
+
addVisibilityDelay?: boolean | undefined;
|
|
11
|
+
addAttentionWaves?: boolean | undefined;
|
|
12
|
+
onClick?: (() => void) | undefined;
|
|
13
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./modal.css";
|
|
3
|
+
import { RewardsModalProps } from "./types";
|
|
4
|
+
import "react-international-phone/style.css";
|
|
5
|
+
export default function GuestDesktopWithoutImage({ config, }: {
|
|
6
|
+
config: RewardsModalProps;
|
|
7
|
+
}): React.JSX.Element | null;
|
|
@@ -8,6 +8,10 @@ export interface LoyaltyCatalogTier {
|
|
|
8
8
|
value: number;
|
|
9
9
|
label?: string;
|
|
10
10
|
}
|
|
11
|
+
export interface LoyaltyCatalogFilter {
|
|
12
|
+
id: string | number;
|
|
13
|
+
label: string;
|
|
14
|
+
}
|
|
11
15
|
export interface LoyaltyCatalogProduct {
|
|
12
16
|
id: string | number;
|
|
13
17
|
imageUrl: string;
|
|
@@ -15,7 +19,8 @@ export interface LoyaltyCatalogProduct {
|
|
|
15
19
|
productUrl?: string;
|
|
16
20
|
description?: string;
|
|
17
21
|
disabled?: boolean;
|
|
18
|
-
|
|
22
|
+
couponType?: "fixed_points_product" | "fixed_price_product" | "fixed_percentage_points_product";
|
|
23
|
+
coinsRequired?: number | null;
|
|
19
24
|
price?: string | number;
|
|
20
25
|
mrp?: string | number;
|
|
21
26
|
rating?: number;
|
|
@@ -51,6 +56,9 @@ export interface LoyaltyProductCatalogConfig {
|
|
|
51
56
|
tiers: LoyaltyCatalogTier[];
|
|
52
57
|
selectedTierId?: string | number;
|
|
53
58
|
onTierChange?: (tier: LoyaltyCatalogTier) => void;
|
|
59
|
+
filters?: LoyaltyCatalogFilter[];
|
|
60
|
+
selectedFilterId?: string | number;
|
|
61
|
+
onFilterChange?: (filter: LoyaltyCatalogFilter) => void;
|
|
54
62
|
products: LoyaltyCatalogProduct[];
|
|
55
63
|
ctaText?: string;
|
|
56
64
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./profile.css";
|
|
3
|
+
import { LoyaltyProfileProps, RewardsModalProps } from "./types";
|
|
4
|
+
export default function LoyaltyWidget({ signedIn, previewMode, bannerBackground, bannerBackgroundType, bannerImage, bannerTextColor, themePrimaryColor, themeContrastColor, themeSecondaryColor, themeSecondaryContrastColor, themeBackgroundColor, themeTextColor, themeAccentColor, widgetOpen, widgetPosition, guestWidgetImage, widgetRoundedCorners, ctaMainColor, ctaMainContrastColor, ctaPrimaryColor, ctaPrimaryContrastColor, ctaBorderColor, ctaSecondaryColor, ctaSecondaryContrastColor, ctaShowIcon, ctaBorderRadius, showWaysToEarn, showWCoinValue, showReferral, showTransactions, showVipSection, brandName, brandLogoUrl, headingEyebrow, balanceCoins, maxRedeemableCoins, coinValInr, currencyCode, tokenName, rateTitle, rateSub, couponHeading, couponCode, couponList, onCouponAvail, couponImage, referralLink, userRewardTier, brandRewardTiers, watermarkColor, bannerTextAlignment, showWatermark, showLogo, logourl, guestGreeting, userGreeting, existingUserGreeting, phone, email, emailRequired, onPhoneChange, onEmailChange, validatePhone, setEmailRequired, onClose, onRegister, onLogout, handleChangeNumber, handleResendOtp, handleSessionDetected, onSendOTP, isSessionDetected, authType, formFilled, redirectUrl, ctaTitle, registerLink, brandTitle, heading, subcopy, termsHref, privacyHref, isLoading, userData, activityRewards, brandRewardProgram, recentTransactionsData, onBirthdayUpdate, onSocialClick, countryCode, isMobilePreview, viewportMode }: LoyaltyProfileProps & RewardsModalProps & {
|
|
5
|
+
signedIn?: boolean;
|
|
6
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./modal.css";
|
|
3
|
+
export default function OtpStep({ phoneLabel, authType, email, length, onConfirm, onResend, onChangeNumber, setToast, loading, tone, themeBackgroundColor, themeAccentColor, themeTextColor, ctaPrimaryColor, ctaPrimaryContrastColor, countryCode, }: {
|
|
4
|
+
phoneLabel?: string | undefined;
|
|
5
|
+
authType: any;
|
|
6
|
+
email: any;
|
|
7
|
+
length?: number | undefined;
|
|
8
|
+
onConfirm: any;
|
|
9
|
+
onResend: any;
|
|
10
|
+
onChangeNumber: any;
|
|
11
|
+
setToast: any;
|
|
12
|
+
loading?: boolean | undefined;
|
|
13
|
+
tone?: string | undefined;
|
|
14
|
+
themeBackgroundColor: any;
|
|
15
|
+
themeAccentColor: any;
|
|
16
|
+
themeTextColor: any;
|
|
17
|
+
ctaPrimaryColor: any;
|
|
18
|
+
ctaPrimaryContrastColor: any;
|
|
19
|
+
countryCode: any;
|
|
20
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type PointEarnBadgeAlignment = "left" | "center" | "right";
|
|
3
|
+
export interface PointEarnBadgeProps {
|
|
4
|
+
prefix?: string;
|
|
5
|
+
iconUrl?: string;
|
|
6
|
+
suffix?: string;
|
|
7
|
+
coinsEarned?: number | string;
|
|
8
|
+
widgetBackground?: string;
|
|
9
|
+
alignment?: PointEarnBadgeAlignment;
|
|
10
|
+
textColor?: string;
|
|
11
|
+
borderColor?: string;
|
|
12
|
+
badgeRoundness?: string | number;
|
|
13
|
+
fontSize?: string | number;
|
|
14
|
+
}
|
|
15
|
+
export default function PointEarnBadge({ prefix, iconUrl, suffix, coinsEarned, widgetBackground, alignment, textColor, borderColor, badgeRoundness, fontSize, }: PointEarnBadgeProps): React.JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./RecentTransactions.css";
|
|
3
|
+
import type { RecentTransactionsData } from "./types";
|
|
4
|
+
export default function TransactionHistory({ data, tokenName, currencySymbol, }: {
|
|
5
|
+
data?: RecentTransactionsData;
|
|
6
|
+
tokenName?: string;
|
|
7
|
+
currencySymbol?: string;
|
|
8
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./modal.css";
|
|
3
|
+
import { RewardsModalProps } from "./types";
|
|
4
|
+
export declare const isEmailValid: (email: string) => boolean;
|
|
5
|
+
export declare const COUNTRY_PHONE_CODE_MAP: Record<string, string>;
|
|
6
|
+
export declare const COUNTRY_OPTIONS: {
|
|
7
|
+
cc: string;
|
|
8
|
+
value: string;
|
|
9
|
+
label: string;
|
|
10
|
+
}[];
|
|
11
|
+
export default function RewardsModal({ config }: {
|
|
12
|
+
config: RewardsModalProps;
|
|
13
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export default function RibbonLauncher({ textColor, backgroundColor, launcherTitle, offerTitle, borderColor, iconType, addVisibilityDelay, onClick, }: {
|
|
3
|
+
textColor?: string | undefined;
|
|
4
|
+
backgroundColor?: string | undefined;
|
|
5
|
+
launcherTitle?: string | undefined;
|
|
6
|
+
offerTitle?: string | undefined;
|
|
7
|
+
borderColor?: string | undefined;
|
|
8
|
+
iconType?: string | undefined;
|
|
9
|
+
addVisibilityDelay?: boolean | undefined;
|
|
10
|
+
onClick?: (() => void) | undefined;
|
|
11
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export default function StickyLauncher({ textColor, backgroundColor, position, yOffsetValue, launcherTitle, borderColor, iconType, addVisibilityDelay, addAttentionWaves, onClick, }: {
|
|
3
|
+
textColor?: string | undefined;
|
|
4
|
+
backgroundColor?: string | undefined;
|
|
5
|
+
position?: string | undefined;
|
|
6
|
+
yOffsetValue?: string | undefined;
|
|
7
|
+
launcherTitle?: string | undefined;
|
|
8
|
+
borderColor?: string | undefined;
|
|
9
|
+
iconType?: string | undefined;
|
|
10
|
+
addVisibilityDelay?: boolean | undefined;
|
|
11
|
+
addAttentionWaves?: boolean | undefined;
|
|
12
|
+
onClick?: (() => void) | undefined;
|
|
13
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { RewardTier, UserRewardTier } from "./types";
|
|
3
|
+
type VIPTiersScreenProps = {
|
|
4
|
+
onBack: () => void;
|
|
5
|
+
brandRewardTiers?: RewardTier[];
|
|
6
|
+
balanceCoins?: number | string;
|
|
7
|
+
userRewardTier?: UserRewardTier;
|
|
8
|
+
currencyCode?: string;
|
|
9
|
+
};
|
|
10
|
+
export default function VIPTiersScreen({ brandRewardTiers, balanceCoins, userRewardTier, currencyCode, }: VIPTiersScreenProps): React.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export default function WTRCoupon({ couponHeading, couponCode, copyFunction, themePrimaryColor, themeContrastColor, themeSecondaryContrastColor, themeSecondaryColor, setScreenType, showCTA, borderRadius, }: {
|
|
3
|
+
couponHeading?: string | undefined;
|
|
4
|
+
couponCode?: string | undefined;
|
|
5
|
+
copyFunction?: ((code: string) => void) | undefined;
|
|
6
|
+
themePrimaryColor?: string | undefined;
|
|
7
|
+
themeContrastColor?: string | undefined;
|
|
8
|
+
themeSecondaryContrastColor?: string | undefined;
|
|
9
|
+
themeSecondaryColor?: string | undefined;
|
|
10
|
+
setScreenType?: ((type: string) => void) | undefined;
|
|
11
|
+
showCTA?: boolean | undefined;
|
|
12
|
+
borderRadius?: string | undefined;
|
|
13
|
+
}): React.JSX.Element;
|