yt-uikit 0.10.68 → 0.10.69
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.
|
@@ -80,6 +80,7 @@ export interface FreebieCouponTemplate {
|
|
|
80
80
|
export interface FreebieItem {
|
|
81
81
|
isActive: boolean;
|
|
82
82
|
discountCode?: string;
|
|
83
|
+
isInCart?: boolean;
|
|
83
84
|
couponTemplate: FreebieCouponTemplate;
|
|
84
85
|
product: FreebieProduct;
|
|
85
86
|
}
|
|
@@ -91,6 +92,8 @@ export interface WaysToRedeemProps {
|
|
|
91
92
|
currencyCode?: string;
|
|
92
93
|
onCouponAvail: (couponTemplateId: number) => Promise<CouponAvailResponse>;
|
|
93
94
|
copyFunction?: (code: string) => void;
|
|
95
|
+
/** Adds the claimed freebie's product to the cart. */
|
|
96
|
+
onAddToCart?: (freebie: FreebieItem) => Promise<void> | void;
|
|
94
97
|
themeSecondaryContrastColor?: string;
|
|
95
98
|
themeSecondaryColor?: string;
|
|
96
99
|
themeBackgroundColor?: string;
|
|
@@ -103,4 +106,4 @@ export interface WaysToRedeemProps {
|
|
|
103
106
|
userRewardTier?: UserRewardTier;
|
|
104
107
|
brandRewardTiers?: RewardTier[];
|
|
105
108
|
}
|
|
106
|
-
export default function WaysToRedeem({ couponList, freebies, couponHeading, couponCode, currencyCode, onCouponAvail, copyFunction, themeSecondaryContrastColor, themeSecondaryColor, themeBackgroundColor, setScreenType, showCTA, balanceCoins, ctaBorderRadius, brandRewardProgram, redemptionMovRequired, userRewardTier, brandRewardTiers, }: WaysToRedeemProps): JSX.Element;
|
|
109
|
+
export default function WaysToRedeem({ couponList, freebies, couponHeading, couponCode, currencyCode, onCouponAvail, copyFunction, onAddToCart, themeSecondaryContrastColor, themeSecondaryColor, themeBackgroundColor, setScreenType, showCTA, balanceCoins, ctaBorderRadius, brandRewardProgram, redemptionMovRequired, userRewardTier, brandRewardTiers, }: WaysToRedeemProps): JSX.Element;
|
|
@@ -122,8 +122,14 @@ export interface LoyaltyWaysToRedeemFreebieConfig {
|
|
|
122
122
|
tierName?: string;
|
|
123
123
|
code?: string;
|
|
124
124
|
ctaTitle?: string;
|
|
125
|
+
/**
|
|
126
|
+
* true = the freebie's product is already in the cart -> the add-to-cart
|
|
127
|
+
* button shows a check and is disabled. The host owns this flag.
|
|
128
|
+
*/
|
|
129
|
+
inCart?: boolean;
|
|
125
130
|
onClaim?: LoyaltyActionHandler;
|
|
126
131
|
onCopy?: LoyaltyActionHandler<[code: string]>;
|
|
132
|
+
onAddToCart?: LoyaltyActionHandler;
|
|
127
133
|
}
|
|
128
134
|
export interface LoyaltyWaysToRedeemConfig extends LoyaltySectionConfig {
|
|
129
135
|
title?: string;
|
|
@@ -214,6 +220,9 @@ export interface LoyaltyPageProps {
|
|
|
214
220
|
onRedeemClick?: LoyaltyActionHandler<[item: LoyaltyWaysToRedeemItemConfig]>;
|
|
215
221
|
onEarnMoreClick?: LoyaltyActionHandler;
|
|
216
222
|
onActiveCouponCopy?: LoyaltyActionHandler<[code: string]>;
|
|
223
|
+
onFreebieAddToCart?: LoyaltyActionHandler<[
|
|
224
|
+
freebie: LoyaltyWaysToRedeemFreebieConfig
|
|
225
|
+
]>;
|
|
217
226
|
}
|
|
218
|
-
export declare const LoyaltyPageBlock: ({ config, signedIn, referralLocked, userData, onBannerButtonClick, onReferralButtonClick, onReferralCopyClick, onRewardsButtonClick, onRedeemClick, onEarnMoreClick, onActiveCouponCopy, }: LoyaltyPageProps) => React.JSX.Element;
|
|
227
|
+
export declare const LoyaltyPageBlock: ({ config, signedIn, referralLocked, userData, onBannerButtonClick, onReferralButtonClick, onReferralCopyClick, onRewardsButtonClick, onRedeemClick, onEarnMoreClick, onActiveCouponCopy, onFreebieAddToCart, }: LoyaltyPageProps) => React.JSX.Element;
|
|
219
228
|
export default LoyaltyPageBlock;
|