yt-uikit 0.10.2 → 0.10.3

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.
Files changed (34) hide show
  1. package/dist/esm/assets/confetti.d.ts +2 -0
  2. package/dist/esm/components/Loyalty/ActiveSessionOverlay.d.ts +8 -0
  3. package/dist/esm/components/Loyalty/BubbleLauncher.d.ts +13 -0
  4. package/dist/esm/components/Loyalty/GuestDesktop.d.ts +5 -0
  5. package/dist/esm/components/Loyalty/GuestDesktopWithoutImage.d.ts +7 -0
  6. package/dist/esm/components/Loyalty/GuestMobile.d.ts +6 -0
  7. package/dist/esm/components/Loyalty/LoyaltyProfile.d.ts +7 -0
  8. package/dist/esm/components/Loyalty/LoyaltyWidget.d.ts +6 -0
  9. package/dist/esm/components/Loyalty/OTPComponent.d.ts +20 -0
  10. package/dist/esm/components/Loyalty/PointEarnBadge.d.ts +15 -0
  11. package/dist/esm/components/Loyalty/RecentTransactions.d.ts +32 -0
  12. package/dist/esm/components/Loyalty/RewardsModal.d.ts +13 -0
  13. package/dist/esm/components/Loyalty/RibbonLauncher.d.ts +11 -0
  14. package/dist/esm/components/Loyalty/StickyLauncher.d.ts +13 -0
  15. package/dist/esm/components/Loyalty/StickyTextLauncher.d.ts +2 -0
  16. package/dist/esm/components/Loyalty/Toast.d.ts +7 -0
  17. package/dist/esm/components/Loyalty/VIPTiersScreen.d.ts +11 -0
  18. package/dist/esm/components/Loyalty/WTRCoupon.d.ts +13 -0
  19. package/dist/esm/components/Loyalty/WaysToEarn.d.ts +32 -0
  20. package/dist/esm/components/Loyalty/WaysToRedeem.d.ts +78 -0
  21. package/dist/esm/components/Loyalty/index.d.ts +5 -0
  22. package/dist/esm/components/Loyalty/loyaltyLauncher.d.ts +16 -0
  23. package/dist/esm/components/Loyalty/styles/ActiveSession.styles.d.ts +3 -0
  24. package/dist/esm/components/Loyalty/styles/DobPopup.styles.d.ts +3 -0
  25. package/dist/esm/components/Loyalty/styles/PointEarnBadge.styles.d.ts +3 -0
  26. package/dist/esm/components/Loyalty/styles/RecentTransactions.styles.d.ts +4 -0
  27. package/dist/esm/components/Loyalty/styles/VIPTiers.styles.d.ts +4 -0
  28. package/dist/esm/components/Loyalty/styles/WaysToRedeem.styles.d.ts +5 -0
  29. package/dist/esm/components/Loyalty/styles/shared.styles.d.ts +3 -0
  30. package/dist/esm/components/Loyalty/types.d.ts +369 -0
  31. package/dist/esm/components/index.d.ts +5 -0
  32. package/dist/esm/confetti-f3502561.js +1 -0
  33. package/dist/esm/index.js +480 -480
  34. package/package.json +4 -2
@@ -0,0 +1,369 @@
1
+ import { CouponTemplate } from "./WaysToRedeem";
2
+ export interface LoyaltyProfileProps {
3
+ isMobile?: boolean;
4
+ previewMode?: boolean;
5
+ bannerBackground?: string;
6
+ bannerBackgroundType?: 'shape' | 'static';
7
+ bannerImage?: string;
8
+ bannerTextColor?: string;
9
+ bannerTextAlignment?: 'start' | 'center' | 'end';
10
+ showWatermark?: boolean;
11
+ watermarkColor?: string;
12
+ themePrimaryColor?: string;
13
+ themeContrastColor?: string;
14
+ themeSecondaryColor?: string;
15
+ themeSecondaryContrastColor?: string;
16
+ themeBackgroundColor?: string;
17
+ themeTextColor?: string;
18
+ themeAccentColor?: string;
19
+ widgetOpen?: boolean;
20
+ widgetPosition?: 'start' | 'center' | 'end';
21
+ widgetRoundedCorners?: boolean;
22
+ ctaPrimaryColor?: string;
23
+ ctaPrimaryContrastColor?: string;
24
+ ctaBorderColor?: string;
25
+ ctaSecondaryColor?: string;
26
+ ctaSecondaryContrastColor?: string;
27
+ ctaShowIcon?: boolean;
28
+ ctaBorderRadius?: string;
29
+ showWaysToEarn?: boolean;
30
+ showWCoinValue?: boolean;
31
+ showReferral?: boolean;
32
+ showTransactions?: boolean;
33
+ showVipSection?: boolean;
34
+ showLogo?: boolean;
35
+ brandName?: string;
36
+ headingEyebrow?: string;
37
+ userGreeting?: string;
38
+ balanceCoins?: number | string;
39
+ maxRedeemableCoins?: number | string;
40
+ coinValInr?: number | string;
41
+ currencyCode?: string;
42
+ tokenName?: string;
43
+ brandLogoUrl?: string;
44
+ rateTitle?: string;
45
+ rateSub?: string;
46
+ couponHeading?: string;
47
+ couponCode?: string;
48
+ couponImage?: string;
49
+ onCouponAvail: (couponTemplateId: number) => Promise<CouponAvailResponse>;
50
+ couponList?: CouponTemplate[];
51
+ referralLink?: string;
52
+ userRewardTier?: UserRewardTier;
53
+ brandRewardTiers?: RewardTier[];
54
+ userData?: UserData;
55
+ activityRewards?: BrandActivityRewardSettings;
56
+ brandRewardProgram: BrandRewardProgram;
57
+ onBirthdayUpdate: (date: string) => Promise<boolean>;
58
+ onSocialClick: (url: string, type: string) => Promise<boolean>;
59
+ isLoading: boolean;
60
+ onWaysToRedeem?: () => void;
61
+ onClose?: () => void;
62
+ onLogout?: () => void;
63
+ }
64
+ export interface RewardsModalProps {
65
+ isLoading?: boolean;
66
+ themeBackgroundColor?: string;
67
+ themeTextColor?: string;
68
+ themeAccentColor?: string;
69
+ bannerBackground?: string;
70
+ bannerBackgroundType?: 'shape' | 'static';
71
+ bannerImage?: string;
72
+ bannerTextColor?: string;
73
+ watermarkColor?: string;
74
+ widgetRoundedCorners?: boolean;
75
+ guestWidgetImage?: string;
76
+ bannerTextAlignment?: 'start' | 'center' | 'end';
77
+ showWatermark?: boolean;
78
+ showLogo?: boolean;
79
+ logourl?: string;
80
+ guestGreeting?: string;
81
+ existingUserGreeting?: string;
82
+ phone?: string;
83
+ email?: string;
84
+ emailRequired?: boolean;
85
+ validatePhone?: (newVal: boolean) => void;
86
+ setEmailRequired?: (newVal: boolean) => void;
87
+ onPhoneChange?: (newVal: string) => void;
88
+ onEmailChange?: (newVal: string) => void;
89
+ onClose?: () => void;
90
+ onRegister?: (val?: string) => Promise<boolean>;
91
+ handleChangeNumber?: () => void;
92
+ handleResendOtp?: () => void;
93
+ handleSessionDetected?: () => void;
94
+ onSendOTP?: () => Promise<boolean>;
95
+ isSessionDetected?: boolean;
96
+ authType?: 'default' | 'phone' | 'ytAuth' | 'email';
97
+ formFilled?: boolean;
98
+ redirectUrl?: string;
99
+ ctaTitle?: string;
100
+ ctaMainColor?: string;
101
+ ctaMainContrastColor?: string;
102
+ ctaPrimaryColor?: string;
103
+ ctaPrimaryContrastColor?: string;
104
+ registerLink?: string;
105
+ brandTitle?: string;
106
+ brandLogoUrl?: string;
107
+ widgetOpen?: boolean;
108
+ heading?: string;
109
+ subcopy?: string;
110
+ termsHref?: string;
111
+ privacyHref?: string;
112
+ styleVars?: Record<string, string>;
113
+ countryCode?: string;
114
+ isMobilePreview?: boolean;
115
+ viewportMode?: "auto" | "mobile" | "desktop";
116
+ }
117
+ export interface AvailableDiscount {
118
+ discountCode: string;
119
+ discountValueInInr: string;
120
+ __entity?: 'Discount' | string;
121
+ }
122
+ export interface CatalogDealsProductsPayload {
123
+ productGid: string;
124
+ variantGid: string;
125
+ }
126
+ export interface CustomBenefitPayload {
127
+ title: string;
128
+ value?: string;
129
+ description?: string;
130
+ icon?: string;
131
+ }
132
+ export interface RewardTier {
133
+ id: number;
134
+ name: string;
135
+ brandId: number;
136
+ rewardMultiplier: number;
137
+ redemptionMultiplier: number;
138
+ rewardTierCriteria: "ltv" | "loyalty_points" | "payment" | null;
139
+ minimumLtvRequired: number | null;
140
+ minimumLoyaltyPointsRequired: number | null;
141
+ loyaltyRewardMultiplier: number | null;
142
+ birthdayRewardMultiplier: number | null;
143
+ socialTwitterRewardMultiplier: number | null;
144
+ socialInstagramRewardMultiplier: number | null;
145
+ socialFacebookRewardMultiplier: number | null;
146
+ socialYoutubeRewardMultiplier: number | null;
147
+ referrerOrderRewardMultiplier: number | null;
148
+ icon: string | null;
149
+ benefits: Record<string, unknown>;
150
+ createdAt: string;
151
+ updatedAt: string;
152
+ expiresInDays: number | null;
153
+ membershipEligibilityProductId: string | null;
154
+ shopifyCustomerTags: {
155
+ tags: string[];
156
+ };
157
+ isActive: boolean;
158
+ couponTemplateId: number | null;
159
+ purchaseValueMethod?: "order_count" | "purchase_value" | null;
160
+ paidMethod?: "purchase_in_cash" | "purchase_in_points" | null;
161
+ period?: "lifetime" | "annual" | "custom" | null;
162
+ periodDurationInMonths?: number | null;
163
+ continuationCriteria?: number | null;
164
+ minimumOrderCountRequired?: number | null;
165
+ minimumOrderValueRequired?: number | null;
166
+ minimumCashRequired?: number | null;
167
+ minimumPointsRequired?: number | null;
168
+ tierThemeColor?: string | null;
169
+ widgetVisibility?: boolean | null;
170
+ membershipTierProductTitle?: string | null;
171
+ membershipTierProductDescription?: string | null;
172
+ membershipTierProductMedia?: string | null;
173
+ customBenefits?: CustomBenefitPayload[] | null;
174
+ catalogDealsProducts?: CatalogDealsProductsPayload[];
175
+ }
176
+ export type UserRewardTier = {
177
+ currentPoints?: number;
178
+ totalOrders?: number;
179
+ currentLtv?: number;
180
+ currentTier: RewardTier | null;
181
+ nextTier: RewardTier | null;
182
+ };
183
+ export interface UserData {
184
+ id: number;
185
+ points: number;
186
+ aggregatedPoints: number;
187
+ previouslyOrdered: boolean;
188
+ __entity?: 'UserBrandLink' | string;
189
+ availableDiscount?: AvailableDiscount | null;
190
+ hasSetBirthday: boolean;
191
+ hasFollowedOnInstagram: boolean;
192
+ hasLikedOnFacebook: boolean;
193
+ hasSharedOnFacebook: boolean;
194
+ hasFollowedOnTwitter: boolean;
195
+ hasSubscribedOnYoutube: boolean;
196
+ hasClickedOnCustomLink: boolean;
197
+ hasAvailedFirstOrderReward: boolean;
198
+ hasAvailedSecondOrderReward: boolean;
199
+ }
200
+ export interface BrandRewardProgram {
201
+ id: number;
202
+ brandId: number;
203
+ programStatus: boolean;
204
+ programIcon: string;
205
+ programAuthType: string;
206
+ programTitle: string;
207
+ programVisibility: boolean;
208
+ pointsValueInInr: number;
209
+ coinName: string;
210
+ organizationIdSync: boolean;
211
+ orderCreditCriteria: string;
212
+ orderCreditStatus: boolean;
213
+ orderCreditType: string;
214
+ orderCreditValue: number;
215
+ orderCreditMethodRestriction: string;
216
+ orderCreditProductRestriction: any[];
217
+ coinExpirationPeriod: number;
218
+ redemptionMethod: string;
219
+ redemptionValue: number;
220
+ redemptionStatus: boolean;
221
+ redemptionIcon: string;
222
+ redemptionMaxPoints: number;
223
+ redemptionMovRequired: number;
224
+ redemptionCodeCombination: boolean;
225
+ orderRewardCreditReversal: boolean;
226
+ orderRewardRedemtionReversal: boolean;
227
+ createdAt: string;
228
+ updatedAt: string;
229
+ deletedAt: string | null;
230
+ __entity: string;
231
+ }
232
+ export interface CreditOnActivitiesProperties {
233
+ customLink: ActivityProperty;
234
+ twitterLike: ActivityProperty;
235
+ youtubeLike: ActivityProperty;
236
+ facebookLike: ActivityProperty;
237
+ referralRewardConfig?: ReferralRewardConfig;
238
+ signUpReward: SignUpRewardProperty;
239
+ twitterShare: ActivityProperty;
240
+ youtubeShare: ActivityProperty;
241
+ facebookShare: ActivityProperty;
242
+ instagramLike: ActivityProperty;
243
+ twitterFollow: ActivityProperty;
244
+ birthdayReward: BirthdayRewardProperty;
245
+ facebookFollow: ActivityProperty;
246
+ feedbackReward: FeedbackRewardProperty;
247
+ instagramFollow: ActivityProperty;
248
+ firstOrderReward: FirstOrderRewardProperty;
249
+ secondOrderReward: SecondOrderRewardProperty;
250
+ youtubeSubscription: ActivityProperty;
251
+ }
252
+ export interface SignUpRewardProperty extends WidgetActivityProperty {
253
+ restrictOnReferralReward?: boolean;
254
+ }
255
+ export interface FeedbackRewardProperty extends WidgetActivityProperty {
256
+ creditCriteria?: string;
257
+ url?: string;
258
+ limitToOneTimePerOrder?: boolean;
259
+ }
260
+ export interface FirstOrderRewardProperty extends WidgetActivityProperty {
261
+ type?: string;
262
+ restrictFirstOrderReward?: boolean;
263
+ restrictOnReferralReward?: boolean;
264
+ }
265
+ export interface SecondOrderRewardProperty extends WidgetActivityProperty {
266
+ type?: string;
267
+ restrictPurchaseReward?: boolean;
268
+ }
269
+ export interface BrandActivityRewardSettings {
270
+ id: number;
271
+ brandId: number;
272
+ programId: number;
273
+ creditOnActivitiesProperties: CreditOnActivitiesProperties;
274
+ creditOnSignupValue: number | null;
275
+ creditOnFirstOrderValue: number | null;
276
+ creditOnSecondOrderValue: number | null;
277
+ creditOnFeedbackValue: number | null;
278
+ creditOnBirthdayValue: number | null;
279
+ creditOnInstagramFollowValue: number | null;
280
+ creditOnInstagramShareValue: number | null;
281
+ creditOnInstagramLikeValue: number | null;
282
+ creditOnFacebookFollowValue: number | null;
283
+ creditOnFacebookShareValue: number | null;
284
+ creditOnFacebookLikeValue: number | null;
285
+ creditOnTwitterFollowValue: number | null;
286
+ creditOnTwitterShareValue: number | null;
287
+ creditOnTwitterLikeValue: number | null;
288
+ creditOnYouTubeSubscriptionValue: number | null;
289
+ creditOnYouTubeLikeValue: number | null;
290
+ creditOnYouTubeShareValue: number | null;
291
+ creditOnCustomLinkValue: number | null;
292
+ createdAt: string;
293
+ updatedAt: string;
294
+ deletedAt: string | null;
295
+ __entity: string;
296
+ }
297
+ export interface ActivityProperty {
298
+ url?: string;
299
+ icon?: string;
300
+ status?: boolean;
301
+ enabled?: boolean;
302
+ offerTitle?: string;
303
+ }
304
+ export interface WidgetActivityProperty {
305
+ icon?: string;
306
+ status?: boolean;
307
+ enabled?: boolean;
308
+ offerTitle?: string;
309
+ widgetVisibility?: boolean;
310
+ }
311
+ export interface BirthdayRewardProperty extends WidgetActivityProperty {
312
+ type?: string;
313
+ }
314
+ export interface ReferralRewardConfig {
315
+ enabled?: boolean;
316
+ shareMethod?: "referral_code" | "referral_url";
317
+ codePrefix?: string;
318
+ campaignVisibility?: "ways_to_earn" | "details" | "both";
319
+ offerTitle?: string;
320
+ offerIcon?: string;
321
+ customizeReferralSectionContent?: boolean;
322
+ referrerReward?: ReferralRewardDetails;
323
+ refereeReward?: ReferralRewardDetails;
324
+ }
325
+ export interface ReferralRewardDetails {
326
+ enabled?: boolean;
327
+ method?: "points" | "discount_code" | "freebie";
328
+ completionCriteria?: "signup" | "purchase" | "first_order";
329
+ pointsConfig?: {
330
+ points: number;
331
+ } | null;
332
+ discountConfig?: {
333
+ type: "percentage_off" | "fixed_amount" | "referee_order_value";
334
+ value: number;
335
+ expiresInDays?: number | null;
336
+ appliesTo: {
337
+ type: "all_products" | "collections";
338
+ collectionIds?: string[];
339
+ };
340
+ } | null;
341
+ freebieConfig?: {
342
+ freebieType?: string;
343
+ } | null;
344
+ }
345
+ export interface CouponAvailResponse {
346
+ discountCode: string;
347
+ discountValueInInr: number;
348
+ expiresAt: string;
349
+ shopifyStoreId: string;
350
+ brandId: number;
351
+ userId: number;
352
+ couponTemplateId: number;
353
+ discountType: string;
354
+ shopifyDiscountCodeId: string;
355
+ creationMethod: string;
356
+ discountPercentage: number | null;
357
+ expiredAt: string | null;
358
+ discountUsageCount: number | null;
359
+ isUsed: boolean;
360
+ minPurchaseAmount: number | null;
361
+ freeProductId: number | null;
362
+ metafieldId: number | null;
363
+ metafieldJsonValue: any | null;
364
+ discountId: number;
365
+ isActive: boolean;
366
+ deletedAt: string | null;
367
+ createdAt: string;
368
+ updatedAt: string;
369
+ }
@@ -3,7 +3,12 @@ export { default as SpinnerWheel } from "./SpinnerWheel";
3
3
  export { default as Cart } from "./Cart";
4
4
  export { default as Bundle } from "./BundleBlock";
5
5
  export { default as BundleLoader } from "./BundleBlock/Loader";
6
+ export { LoyaltyProfile as LoyaltyScreen } from "./Loyalty";
7
+ export { LoyaltyLauncher as LoyaltyLauncher } from "./Loyalty";
8
+ export { RewardsModal as RewardsModal } from "./Loyalty";
9
+ export { LoyaltyWidget as LoyaltyWidget } from "./Loyalty";
6
10
  export { LoyaltyProductCatalog as LoyaltyProductCatalog } from "./Loyalty";
11
+ export { PointEarnBadge as PointEarnBadge } from "./Loyalty";
7
12
  export type { LoyaltyProductCatalogConfig, LoyaltyCatalogProduct, LoyaltyCatalogTier, LoyaltyCatalogFilter, CatalogDisplayMode, CatalogTextAlignment, } from "./Loyalty";
8
13
  export { default as LoyaltyPageBlock, LoyaltyPageConfigType, LoyaltyPageProps, } from "./LoyaltyPageBlock/LoyaltyPageBlock";
9
14
  export { default as ProductOffers, ProductsOffersConfigType, CartCheckpoint, } from "./ProductOffersBlock/ProductsOffers";