yt-uikit 0.10.64 → 0.10.65
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.
|
@@ -4,7 +4,7 @@ type LoyaltyVisibility = "show" | "hide";
|
|
|
4
4
|
type LoyaltyAlignment = "left" | "center" | "right";
|
|
5
5
|
type LoyaltyImagePosition = "left" | "right";
|
|
6
6
|
type LoyaltyActionHandler<TArgs extends unknown[] = []> = (...args: TArgs) => Promise<void> | void;
|
|
7
|
-
declare const loyaltyDefaultSectionOrder: readonly ["banner", "referrals", "gettingStarted", "waysToEarn", "customImage", "customHtml", "vipTiers", "rewards"];
|
|
7
|
+
declare const loyaltyDefaultSectionOrder: readonly ["banner", "referrals", "gettingStarted", "waysToEarn", "customImage", "customHtml", "vipTiers", "rewards", "waysToRedeem"];
|
|
8
8
|
type LoyaltySectionId = (typeof loyaltyDefaultSectionOrder)[number];
|
|
9
9
|
export interface LoyaltySectionBadgeConfig {
|
|
10
10
|
enabled?: boolean;
|
|
@@ -84,6 +84,50 @@ export interface LoyaltyWaysToEarnConfig extends LoyaltySectionConfig {
|
|
|
84
84
|
ctaFontColor?: string;
|
|
85
85
|
items?: LoyaltyWaysToEarnItemConfig[];
|
|
86
86
|
}
|
|
87
|
+
export type LoyaltyWaysToRedeemIconType = "percent" | "coupon";
|
|
88
|
+
export type LoyaltyWaysToRedeemIcon = LoyaltyWaysToRedeemIconType | React.ReactNode;
|
|
89
|
+
export interface LoyaltyWaysToRedeemItemConfig {
|
|
90
|
+
icon?: LoyaltyWaysToRedeemIcon;
|
|
91
|
+
title?: string;
|
|
92
|
+
subtitle?: string;
|
|
93
|
+
pointsLabel?: string;
|
|
94
|
+
pointsRequired?: number;
|
|
95
|
+
/** > 0 => percentage coupon (percent icon). */
|
|
96
|
+
discountPercentage?: number;
|
|
97
|
+
/** > 0 => flat/fixed-amount coupon (coupon icon). */
|
|
98
|
+
discountValue?: number;
|
|
99
|
+
minimumOrderValue?: number;
|
|
100
|
+
ctaTitle?: string;
|
|
101
|
+
ctaDisabled?: boolean;
|
|
102
|
+
onClick?: LoyaltyActionHandler;
|
|
103
|
+
}
|
|
104
|
+
export type LoyaltyWaysToRedeemFreebieState = "locked" | "eligible" | "claimed";
|
|
105
|
+
export type LoyaltyWaysToRedeemFreebieGating = "points" | "tier";
|
|
106
|
+
export interface LoyaltyWaysToRedeemFreebieConfig {
|
|
107
|
+
title?: string;
|
|
108
|
+
subtitle?: string;
|
|
109
|
+
state?: LoyaltyWaysToRedeemFreebieState;
|
|
110
|
+
gating?: LoyaltyWaysToRedeemFreebieGating;
|
|
111
|
+
current?: number;
|
|
112
|
+
target?: number;
|
|
113
|
+
unit?: string;
|
|
114
|
+
tierName?: string;
|
|
115
|
+
code?: string;
|
|
116
|
+
ctaTitle?: string;
|
|
117
|
+
onClaim?: LoyaltyActionHandler;
|
|
118
|
+
onCopy?: LoyaltyActionHandler<[code: string]>;
|
|
119
|
+
}
|
|
120
|
+
export interface LoyaltyWaysToRedeemConfig extends LoyaltySectionConfig {
|
|
121
|
+
title?: string;
|
|
122
|
+
subtitle?: string;
|
|
123
|
+
balanceLabel?: string;
|
|
124
|
+
balanceValue?: string | number;
|
|
125
|
+
balanceCtaText?: string;
|
|
126
|
+
ctaText?: string;
|
|
127
|
+
currencyCode?: string;
|
|
128
|
+
freebies?: LoyaltyWaysToRedeemFreebieConfig[];
|
|
129
|
+
items?: LoyaltyWaysToRedeemItemConfig[];
|
|
130
|
+
}
|
|
87
131
|
export interface LoyaltyRewardsConfig extends LoyaltyImageSectionConfig {
|
|
88
132
|
title?: string;
|
|
89
133
|
description?: string;
|
|
@@ -137,6 +181,7 @@ export interface LoyaltyPageConfigType {
|
|
|
137
181
|
waysToEarn?: LoyaltyWaysToEarnConfig;
|
|
138
182
|
vipTiers?: LoyaltyVipTiersConfig;
|
|
139
183
|
rewards?: LoyaltyRewardsConfig;
|
|
184
|
+
waysToRedeem?: LoyaltyWaysToRedeemConfig;
|
|
140
185
|
customImage?: LoyaltyCustomImageConfig;
|
|
141
186
|
customHtml?: LoyaltyCustomHtmlConfig;
|
|
142
187
|
primaryColor?: string;
|
|
@@ -155,6 +200,8 @@ export interface LoyaltyPageProps {
|
|
|
155
200
|
onReferralButtonClick?: LoyaltyActionHandler;
|
|
156
201
|
onReferralCopyClick?: LoyaltyActionHandler<[referralLink: string]>;
|
|
157
202
|
onRewardsButtonClick?: LoyaltyActionHandler;
|
|
203
|
+
onRedeemClick?: LoyaltyActionHandler<[item: LoyaltyWaysToRedeemItemConfig]>;
|
|
204
|
+
onEarnMoreClick?: LoyaltyActionHandler;
|
|
158
205
|
}
|
|
159
|
-
export declare const LoyaltyPageBlock: ({ config, signedIn, referralLocked, userData, onBannerButtonClick, onReferralButtonClick, onReferralCopyClick, onRewardsButtonClick, }: LoyaltyPageProps) => React.JSX.Element;
|
|
206
|
+
export declare const LoyaltyPageBlock: ({ config, signedIn, referralLocked, userData, onBannerButtonClick, onReferralButtonClick, onReferralCopyClick, onRewardsButtonClick, onRedeemClick, onEarnMoreClick, }: LoyaltyPageProps) => React.JSX.Element;
|
|
160
207
|
export default LoyaltyPageBlock;
|