yt-uikit 0.9.33 → 0.9.34
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/Loyalty/LoyaltyProductCatalog.d.ts +9 -1
- package/dist/esm/components/Loyalty/index.d.ts +1 -1
- package/dist/esm/components/LoyaltyPageBlock/LoyaltyPageBlock.d.ts +145 -56
- package/dist/esm/components/index.d.ts +2 -2
- package/dist/esm/index.js +411 -411
- package/package.json +1 -1
|
@@ -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
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as LoyaltyProductCatalog } from "./LoyaltyProductCatalog";
|
|
2
|
-
export type { LoyaltyProductCatalogConfig, LoyaltyCatalogProduct, LoyaltyCatalogTier, CatalogDisplayMode, CatalogTextAlignment, } from "./LoyaltyProductCatalog";
|
|
2
|
+
export type { LoyaltyProductCatalogConfig, LoyaltyCatalogProduct, LoyaltyCatalogTier, LoyaltyCatalogFilter, CatalogDisplayMode, CatalogTextAlignment, } from "./LoyaltyProductCatalog";
|
|
@@ -1,64 +1,153 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import "../Loyalty/fonts.css";
|
|
3
|
+
type LoyaltyVisibility = "show" | "hide";
|
|
4
|
+
type LoyaltyAlignment = "left" | "center" | "right";
|
|
5
|
+
type LoyaltyImagePosition = "left" | "right";
|
|
6
|
+
type LoyaltyActionHandler<TArgs extends unknown[] = []> = (...args: TArgs) => Promise<void> | void;
|
|
7
|
+
declare const loyaltyDefaultSectionOrder: readonly ["banner", "referrals", "gettingStarted", "waysToEarn", "customImage", "customHtml", "vipTiers", "rewards"];
|
|
8
|
+
type LoyaltySectionId = (typeof loyaltyDefaultSectionOrder)[number];
|
|
9
|
+
export interface LoyaltySectionBadgeConfig {
|
|
10
|
+
enabled?: boolean;
|
|
11
|
+
title?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface LoyaltySectionConfig {
|
|
14
|
+
visibility?: LoyaltyVisibility;
|
|
15
|
+
backgroundColor?: string;
|
|
16
|
+
fontColor?: string;
|
|
17
|
+
badge?: LoyaltySectionBadgeConfig;
|
|
18
|
+
}
|
|
19
|
+
export interface LoyaltyTextContentConfig {
|
|
20
|
+
title?: string;
|
|
21
|
+
subtitle?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface LoyaltyButtonContentConfig extends LoyaltyTextContentConfig {
|
|
24
|
+
buttonText?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface LoyaltyBalanceContentConfig extends LoyaltyTextContentConfig {
|
|
27
|
+
balanceCoins?: string | number;
|
|
28
|
+
currentTier?: string | null;
|
|
29
|
+
nextTier?: string | null;
|
|
30
|
+
currentLtv?: number | string | null;
|
|
31
|
+
nextTierLtv?: number | string | null;
|
|
32
|
+
tierIcon?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface LoyaltyBannerConfig extends LoyaltySectionConfig {
|
|
35
|
+
alignment?: LoyaltyAlignment;
|
|
36
|
+
imageUrl?: string;
|
|
37
|
+
showTierProgress?: boolean;
|
|
38
|
+
guestView?: LoyaltyButtonContentConfig;
|
|
39
|
+
signedInView?: LoyaltyBalanceContentConfig;
|
|
40
|
+
}
|
|
41
|
+
export interface LoyaltyReferralContentConfig extends LoyaltyTextContentConfig {
|
|
42
|
+
referralLinkValue?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface LoyaltyImageSectionConfig extends LoyaltySectionConfig {
|
|
45
|
+
imageUrl?: string;
|
|
46
|
+
imagePosition?: LoyaltyImagePosition;
|
|
47
|
+
}
|
|
48
|
+
export interface LoyaltyReferralsConfig extends LoyaltyImageSectionConfig {
|
|
49
|
+
guestVisibility?: boolean;
|
|
50
|
+
guestView?: LoyaltyButtonContentConfig;
|
|
51
|
+
signedInView?: LoyaltyReferralContentConfig;
|
|
52
|
+
}
|
|
53
|
+
export interface LoyaltyGettingStartedStepConfig {
|
|
54
|
+
title?: string;
|
|
55
|
+
description?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface LoyaltyGettingStartedConfig extends LoyaltySectionConfig {
|
|
58
|
+
title?: string;
|
|
59
|
+
subtitle?: string;
|
|
60
|
+
steps?: LoyaltyGettingStartedStepConfig[];
|
|
61
|
+
}
|
|
62
|
+
export type LoyaltyWaysToEarnIconType = "signup" | "birthday" | "feedback" | "wallet" | "referral" | "instagram" | "facebook" | "twitter" | "youtube";
|
|
63
|
+
export type LoyaltyWaysToEarnIcon = LoyaltyWaysToEarnIconType | React.ReactNode;
|
|
64
|
+
export interface LoyaltyWaysToEarnItemConfig {
|
|
65
|
+
icon?: LoyaltyWaysToEarnIcon;
|
|
66
|
+
title?: string;
|
|
67
|
+
description?: string;
|
|
68
|
+
ctaTitle?: string;
|
|
69
|
+
ctaVisible?: boolean;
|
|
70
|
+
ctaDisabled?: boolean;
|
|
71
|
+
signedInActionLabel?: string;
|
|
72
|
+
onClick?: LoyaltyActionHandler;
|
|
73
|
+
}
|
|
74
|
+
export interface LoyaltyWaysToEarnConfig extends LoyaltySectionConfig {
|
|
75
|
+
title?: string;
|
|
76
|
+
subtitle?: string;
|
|
77
|
+
guestVisibility?: boolean;
|
|
78
|
+
showIcons?: boolean;
|
|
79
|
+
ctaBg?: string;
|
|
80
|
+
ctaFontColor?: string;
|
|
81
|
+
items?: LoyaltyWaysToEarnItemConfig[];
|
|
82
|
+
}
|
|
83
|
+
export interface LoyaltyRewardsConfig extends LoyaltyImageSectionConfig {
|
|
84
|
+
title?: string;
|
|
85
|
+
description?: string;
|
|
86
|
+
disclaimerText?: string;
|
|
87
|
+
bottomCtaTitle?: string;
|
|
88
|
+
bottomCtaSubtitle?: string;
|
|
89
|
+
buttonText?: string;
|
|
90
|
+
}
|
|
91
|
+
export interface LoyaltyCustomImageConfig {
|
|
92
|
+
visibility?: LoyaltyVisibility;
|
|
93
|
+
imageUrl?: string;
|
|
94
|
+
}
|
|
95
|
+
export interface LoyaltyCustomHtmlConfig {
|
|
96
|
+
visibility?: LoyaltyVisibility;
|
|
97
|
+
htmlText?: string;
|
|
98
|
+
}
|
|
99
|
+
export interface LoyaltyVipTierColumnConfig {
|
|
100
|
+
id: string;
|
|
101
|
+
title: string;
|
|
102
|
+
pointsLabel?: string;
|
|
103
|
+
headerBackgroundColor?: string;
|
|
104
|
+
indicatorColor?: string;
|
|
105
|
+
}
|
|
106
|
+
export interface LoyaltyVipTierBenefitRowConfig {
|
|
107
|
+
title: string;
|
|
108
|
+
description?: string;
|
|
109
|
+
tierIds: string[];
|
|
110
|
+
}
|
|
111
|
+
export interface LoyaltyVipTierSignedInStatusConfig {
|
|
112
|
+
tierId: string;
|
|
113
|
+
text: string;
|
|
114
|
+
}
|
|
115
|
+
export interface LoyaltyVipTiersSignedInViewConfig {
|
|
116
|
+
benefitHeaderLabel?: string;
|
|
117
|
+
statusLabel?: string;
|
|
118
|
+
statuses?: LoyaltyVipTierSignedInStatusConfig[];
|
|
119
|
+
}
|
|
120
|
+
export interface LoyaltyVipTiersConfig extends LoyaltySectionConfig {
|
|
121
|
+
title?: string;
|
|
122
|
+
subtitle?: string;
|
|
123
|
+
benefitHeaderLabel?: string;
|
|
124
|
+
tiers?: LoyaltyVipTierColumnConfig[];
|
|
125
|
+
rows?: LoyaltyVipTierBenefitRowConfig[];
|
|
126
|
+
signedInView?: LoyaltyVipTiersSignedInViewConfig;
|
|
127
|
+
}
|
|
2
128
|
export interface LoyaltyPageConfigType {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
heroTitleColor?: string;
|
|
13
|
-
heroRegistrationCTAVisibility?: boolean;
|
|
129
|
+
sectionOrder?: LoyaltySectionId[];
|
|
130
|
+
banner?: LoyaltyBannerConfig;
|
|
131
|
+
referrals?: LoyaltyReferralsConfig;
|
|
132
|
+
gettingStarted?: LoyaltyGettingStartedConfig;
|
|
133
|
+
waysToEarn?: LoyaltyWaysToEarnConfig;
|
|
134
|
+
vipTiers?: LoyaltyVipTiersConfig;
|
|
135
|
+
rewards?: LoyaltyRewardsConfig;
|
|
136
|
+
customImage?: LoyaltyCustomImageConfig;
|
|
137
|
+
customHtml?: LoyaltyCustomHtmlConfig;
|
|
14
138
|
primaryColor?: string;
|
|
15
139
|
primaryContrastColor?: string;
|
|
16
140
|
secondaryColor?: string;
|
|
17
141
|
secondaryContrastColor?: string;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
themeRoundness?: string;
|
|
21
|
-
heroBannerVisibility?: "show" | "hide";
|
|
22
|
-
stepsVisibility?: "show" | "hide";
|
|
23
|
-
waysToEarnVisibility?: "show" | "hide";
|
|
24
|
-
waysToEarnCustomText?: string;
|
|
25
|
-
customSectionVisibility?: "show" | "hide";
|
|
26
|
-
footerSignupVisibility?: "show" | "hide";
|
|
27
|
-
customSectionImagePosition?: "left" | "right";
|
|
28
|
-
customSectionTitle?: string;
|
|
29
|
-
customSectionSubtitle?: string;
|
|
30
|
-
customSectionTitleFontSize?: string;
|
|
31
|
-
customSectionSubtitleFontSize?: string;
|
|
32
|
-
customSectionImage?: string;
|
|
33
|
-
customSectionTextAlignment?: "left" | "center" | "right";
|
|
34
|
-
customSectionTitleColor?: string;
|
|
35
|
-
customSectionSubtitleColor?: string;
|
|
36
|
-
stepsTitle?: string;
|
|
37
|
-
stepsSubtitle?: string;
|
|
38
|
-
step1Title?: string;
|
|
39
|
-
step1Description?: string;
|
|
40
|
-
step2Title?: string;
|
|
41
|
-
step2Description?: string;
|
|
42
|
-
step3Title?: string;
|
|
43
|
-
step3Description?: string;
|
|
44
|
-
footerCustomText?: string;
|
|
45
|
-
footerSignupSubtext?: string;
|
|
46
|
-
}
|
|
47
|
-
export interface BrandConfigType {
|
|
48
|
-
newSignupTokens?: number;
|
|
49
|
-
firstOrderTokens?: number;
|
|
50
|
-
instagramFollowPoints?: number;
|
|
51
|
-
twitterFollowPoints?: number;
|
|
52
|
-
facebookFollowPoints?: number;
|
|
53
|
-
youtubeSubscriptionPoints?: number;
|
|
54
|
-
rewardToLeaveReview?: number;
|
|
55
|
-
birthdayPoints?: number;
|
|
56
|
-
referralPointsForReferrer?: number;
|
|
57
|
-
tokenCreditPercentage?: number;
|
|
58
|
-
brandTokenName?: string;
|
|
59
|
-
}
|
|
60
|
-
declare const LoyaltyPageBlock: ({ config, brandConfig, }: {
|
|
142
|
+
}
|
|
143
|
+
export interface LoyaltyPageProps {
|
|
61
144
|
config: LoyaltyPageConfigType;
|
|
62
|
-
|
|
63
|
-
|
|
145
|
+
signedIn?: boolean;
|
|
146
|
+
userData?: any;
|
|
147
|
+
onBannerButtonClick?: LoyaltyActionHandler;
|
|
148
|
+
onReferralButtonClick?: LoyaltyActionHandler;
|
|
149
|
+
onReferralCopyClick?: LoyaltyActionHandler<[referralLink: string]>;
|
|
150
|
+
onRewardsButtonClick?: LoyaltyActionHandler;
|
|
151
|
+
}
|
|
152
|
+
export declare const LoyaltyPageBlock: ({ config, signedIn, userData, onBannerButtonClick, onReferralButtonClick, onReferralCopyClick, onRewardsButtonClick, }: LoyaltyPageProps) => React.JSX.Element;
|
|
64
153
|
export default LoyaltyPageBlock;
|
|
@@ -4,6 +4,6 @@ export { default as Cart } from "./Cart";
|
|
|
4
4
|
export { default as Bundle } from "./BundleBlock";
|
|
5
5
|
export { default as BundleLoader } from "./BundleBlock/Loader";
|
|
6
6
|
export { LoyaltyProductCatalog as LoyaltyProductCatalog } from "./Loyalty";
|
|
7
|
-
export type { LoyaltyProductCatalogConfig, LoyaltyCatalogProduct, LoyaltyCatalogTier, CatalogDisplayMode, CatalogTextAlignment, } from "./Loyalty";
|
|
8
|
-
export { default as LoyaltyPageBlock, LoyaltyPageConfigType,
|
|
7
|
+
export type { LoyaltyProductCatalogConfig, LoyaltyCatalogProduct, LoyaltyCatalogTier, LoyaltyCatalogFilter, CatalogDisplayMode, CatalogTextAlignment, } from "./Loyalty";
|
|
8
|
+
export { default as LoyaltyPageBlock, LoyaltyPageConfigType, LoyaltyPageProps, } from "./LoyaltyPageBlock/LoyaltyPageBlock";
|
|
9
9
|
export { default as ProductOffers, ProductsOffersConfigType, CartCheckpoint, } from "./ProductOffersBlock/ProductsOffers";
|