yt-uikit 0.9.32 → 0.9.33

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.
@@ -8,10 +8,6 @@ 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
- }
15
11
  export interface LoyaltyCatalogProduct {
16
12
  id: string | number;
17
13
  imageUrl: string;
@@ -19,8 +15,7 @@ export interface LoyaltyCatalogProduct {
19
15
  productUrl?: string;
20
16
  description?: string;
21
17
  disabled?: boolean;
22
- couponType?: "fixed_points_product" | "fixed_price_product" | "fixed_percentage_points_product";
23
- coinsRequired?: number | null;
18
+ coinsRequired: number;
24
19
  price?: string | number;
25
20
  mrp?: string | number;
26
21
  rating?: number;
@@ -56,9 +51,6 @@ export interface LoyaltyProductCatalogConfig {
56
51
  tiers: LoyaltyCatalogTier[];
57
52
  selectedTierId?: string | number;
58
53
  onTierChange?: (tier: LoyaltyCatalogTier) => void;
59
- filters?: LoyaltyCatalogFilter[];
60
- selectedFilterId?: string | number;
61
- onFilterChange?: (filter: LoyaltyCatalogFilter) => void;
62
54
  products: LoyaltyCatalogProduct[];
63
55
  ctaText?: string;
64
56
  }
@@ -1,2 +1,2 @@
1
1
  export { default as LoyaltyProductCatalog } from "./LoyaltyProductCatalog";
2
- export type { LoyaltyProductCatalogConfig, LoyaltyCatalogProduct, LoyaltyCatalogTier, LoyaltyCatalogFilter, CatalogDisplayMode, CatalogTextAlignment, } from "./LoyaltyProductCatalog";
2
+ export type { LoyaltyProductCatalogConfig, LoyaltyCatalogProduct, LoyaltyCatalogTier, CatalogDisplayMode, CatalogTextAlignment, } from "./LoyaltyProductCatalog";
@@ -1,153 +1,64 @@
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
- }
128
2
  export interface LoyaltyPageConfigType {
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;
3
+ heroDesktopImage?: string;
4
+ heroMobileImage?: string;
5
+ heroTitle?: string;
6
+ heroSubtitle?: string;
7
+ heroTextAlignment?: "left" | "center" | "right";
8
+ heroSubtitleFontSize?: string;
9
+ heroSubtitleColor?: string;
10
+ heroSubtitleFontWeight?: string;
11
+ heroTitleFontSize?: string;
12
+ heroTitleColor?: string;
13
+ heroRegistrationCTAVisibility?: boolean;
138
14
  primaryColor?: string;
139
15
  primaryContrastColor?: string;
140
16
  secondaryColor?: string;
141
17
  secondaryContrastColor?: string;
142
- }
143
- export interface LoyaltyPageProps {
18
+ accentColor?: string;
19
+ borderColor?: string;
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, }: {
144
61
  config: LoyaltyPageConfigType;
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;
62
+ brandConfig?: BrandConfigType | undefined;
63
+ }) => React.JSX.Element;
153
64
  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, LoyaltyCatalogFilter, CatalogDisplayMode, CatalogTextAlignment, } from "./Loyalty";
8
- export { default as LoyaltyPageBlock, LoyaltyPageConfigType, LoyaltyPageProps, } from "./LoyaltyPageBlock/LoyaltyPageBlock";
7
+ export type { LoyaltyProductCatalogConfig, LoyaltyCatalogProduct, LoyaltyCatalogTier, CatalogDisplayMode, CatalogTextAlignment, } from "./Loyalty";
8
+ export { default as LoyaltyPageBlock, LoyaltyPageConfigType, BrandConfigType, } from "./LoyaltyPageBlock/LoyaltyPageBlock";
9
9
  export { default as ProductOffers, ProductsOffersConfigType, CartCheckpoint, } from "./ProductOffersBlock/ProductsOffers";