yt-uikit 0.9.13 → 0.9.15-loyalty-patch.0

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 (123) hide show
  1. package/README.md +94 -94
  2. package/dist/esm/atoms/bundleBuilderProductDetailsAtom.d.ts +4 -4
  3. package/dist/esm/atoms/cartDataAtom.d.ts +3 -3
  4. package/dist/esm/atoms/cartLoadingAtom.d.ts +22 -22
  5. package/dist/esm/atoms/cartTimer.d.ts +2 -2
  6. package/dist/esm/atoms/dateAtom.d.ts +1 -1
  7. package/dist/esm/atoms/freebieClaimModalAtom.d.ts +7 -7
  8. package/dist/esm/atoms/giftWrap.d.ts +2 -2
  9. package/dist/esm/atoms/gstCompanyNameAtom.d.ts +1 -1
  10. package/dist/esm/atoms/gstInputAtom.d.ts +1 -1
  11. package/dist/esm/atoms/maxQtyErrorAtom.d.ts +3 -3
  12. package/dist/esm/atoms/multiClaimSelectionAtom.d.ts +25 -25
  13. package/dist/esm/atoms/noteInputAtom.d.ts +3 -3
  14. package/dist/esm/atoms/postalCodeAtom.d.ts +1 -1
  15. package/dist/esm/atoms/shippingAtom.d.ts +8 -8
  16. package/dist/esm/atoms/showGSTInputAtom.d.ts +1 -1
  17. package/dist/esm/atoms/variantSelectionModalAtom.d.ts +25 -25
  18. package/dist/esm/components/BundleBlock/Bundle.d.ts +446 -446
  19. package/dist/esm/components/BundleBlock/BundleBuilder/BundleBuilder.d.ts +50 -50
  20. package/dist/esm/components/BundleBlock/BundleBuilder/ResponsiveBgImage.d.ts +9 -9
  21. package/dist/esm/components/BundleBlock/BundleBuilder/SortAndFilter.d.ts +74 -74
  22. package/dist/esm/components/BundleBlock/BundleBuilder/VariantOptionsModal.d.ts +28 -28
  23. package/dist/esm/components/BundleBlock/BundleBuilder/bundleBuilder.style.d.ts +37 -37
  24. package/dist/esm/components/BundleBlock/BundleBuilderTracker/BundleBuilderTracker.d.ts +55 -55
  25. package/dist/esm/components/BundleBlock/BundleBuilderTracker/bundleBuilderTracker.style.d.ts +77 -77
  26. package/dist/esm/components/BundleBlock/BundleProductDetailsModal/BundleProductDetailsModal.d.ts +37 -37
  27. package/dist/esm/components/BundleBlock/BundleProductDetailsModal/bundleProductDetailsModal.style.d.ts +10 -10
  28. package/dist/esm/components/BundleBlock/CollectionBundle/CategoryFilter.d.ts +10 -10
  29. package/dist/esm/components/BundleBlock/CollectionBundle/ColllectionBundle.d.ts +127 -127
  30. package/dist/esm/components/BundleBlock/CollectionBundle/ProductDetailsModal.d.ts +16 -16
  31. package/dist/esm/components/BundleBlock/ComboBundle.d.ts +17 -17
  32. package/dist/esm/components/BundleBlock/FixedBundle/FixedBundle.d.ts +4 -4
  33. package/dist/esm/components/BundleBlock/FixedBundle/SeparateVariantOptions.d.ts +45 -45
  34. package/dist/esm/components/BundleBlock/FixedBundle/VariantSelectorModal.d.ts +22 -22
  35. package/dist/esm/components/BundleBlock/FixedBundle/fixedBundle.style.d.ts +80 -80
  36. package/dist/esm/components/BundleBlock/Loader.d.ts +5 -5
  37. package/dist/esm/components/BundleBlock/MixAndMatchBundle/MixAndMatchBundle.d.ts +9 -9
  38. package/dist/esm/components/BundleBlock/MixAndMatchBundle/mixAndMatchBundle.style.d.ts +86 -86
  39. package/dist/esm/components/BundleBlock/PersonalizationForm/PersonalizationForm.d.ts +35 -35
  40. package/dist/esm/components/BundleBlock/PersonalizationForm/PersonalizationFormModal.d.ts +24 -24
  41. package/dist/esm/components/BundleBlock/VolumeBundle/VolumeBundle.d.ts +27 -27
  42. package/dist/esm/components/BundleBlock/VolumeBundle/volumeBundle.style.d.ts +80 -80
  43. package/dist/esm/components/BundleBlock/index.d.ts +1 -1
  44. package/dist/esm/components/Cart/ApplyCoupon.d.ts +13 -13
  45. package/dist/esm/components/Cart/Bundle.d.ts +6 -6
  46. package/dist/esm/components/Cart/Cart.d.ts +246 -246
  47. package/dist/esm/components/Cart/CartDrawer.d.ts +26 -26
  48. package/dist/esm/components/Cart/CartOffersCarousel.d.ts +48 -48
  49. package/dist/esm/components/Cart/CartProductsList.d.ts +45 -45
  50. package/dist/esm/components/Cart/CartTimer.d.ts +8 -8
  51. package/dist/esm/components/Cart/CheckoutSection.d.ts +47 -47
  52. package/dist/esm/components/Cart/CouponSelection.d.ts +17 -17
  53. package/dist/esm/components/Cart/DatePicker.d.ts +10 -10
  54. package/dist/esm/components/Cart/EmptyCart.d.ts +33 -33
  55. package/dist/esm/components/Cart/FloatingCart.d.ts +24 -24
  56. package/dist/esm/components/Cart/FooterSections.d.ts +6 -6
  57. package/dist/esm/components/Cart/FreebieClaimManager.d.ts +17 -17
  58. package/dist/esm/components/Cart/FreebieClaimOverlay.d.ts +17 -17
  59. package/dist/esm/components/Cart/FreebieClaimOverlayCard.d.ts +10 -10
  60. package/dist/esm/components/Cart/FreebieClaimSection.d.ts +17 -17
  61. package/dist/esm/components/Cart/FreebieClaimSectionCard.d.ts +16 -16
  62. package/dist/esm/components/Cart/GSTSection.d.ts +15 -15
  63. package/dist/esm/components/Cart/GiftWrap.d.ts +15 -15
  64. package/dist/esm/components/Cart/InlineCartOfferInfoText.d.ts +10 -10
  65. package/dist/esm/components/Cart/LoyaltyAppliedCTA.d.ts +19 -19
  66. package/dist/esm/components/Cart/LoyaltyApplyCTA.d.ts +18 -18
  67. package/dist/esm/components/Cart/LoyaltyBadge.d.ts +10 -10
  68. package/dist/esm/components/Cart/LoyaltyGuestCTA.d.ts +17 -17
  69. package/dist/esm/components/Cart/MultiStepProgressBar/CheckpointConfetti.d.ts +11 -11
  70. package/dist/esm/components/Cart/MultiStepProgressBar/CheckpointIcon.d.ts +3 -3
  71. package/dist/esm/components/Cart/MultiStepProgressBar/CheckpointTooltip.d.ts +3 -3
  72. package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepIcon.d.ts +9 -9
  73. package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepProgressBar.d.ts +5 -5
  74. package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepProgressBar.styled.d.ts +45 -45
  75. package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepUtils.d.ts +6 -6
  76. package/dist/esm/components/Cart/MultiStepProgressBar/MultiTierProgressBar.d.ts +4 -4
  77. package/dist/esm/components/Cart/MultiStepProgressBar/MutiTierNextRewardMessage.d.ts +3 -3
  78. package/dist/esm/components/Cart/MultiStepProgressBar/NextRewardMessage.d.ts +3 -3
  79. package/dist/esm/components/Cart/MultiStepProgressBar/SingleTierProgressBar.d.ts +4 -4
  80. package/dist/esm/components/Cart/MultiStepProgressBar/SingleTierProgressBar.styled.d.ts +22 -22
  81. package/dist/esm/components/Cart/MultiStepProgressBar/SingletTierNextRewardMessage.d.ts +3 -3
  82. package/dist/esm/components/Cart/MultiStepProgressBar/types.d.ts +55 -55
  83. package/dist/esm/components/Cart/NextFreebieRow.d.ts +19 -19
  84. package/dist/esm/components/Cart/NoteSection.d.ts +8 -8
  85. package/dist/esm/components/Cart/ProductCard.d.ts +30 -30
  86. package/dist/esm/components/Cart/ProductRecCard.d.ts +20 -20
  87. package/dist/esm/components/Cart/ProductRecList.d.ts +23 -23
  88. package/dist/esm/components/Cart/ProgressBarCartLoader.d.ts +7 -7
  89. package/dist/esm/components/Cart/QuantitySelector.d.ts +12 -12
  90. package/dist/esm/components/Cart/RegionSpecificDelivery.d.ts +17 -17
  91. package/dist/esm/components/Cart/RewardPointsPreview.d.ts +10 -10
  92. package/dist/esm/components/Cart/StandardDelivery.d.ts +11 -11
  93. package/dist/esm/components/Cart/StealDealSection.d.ts +14 -14
  94. package/dist/esm/components/Cart/StickyCart.d.ts +64 -64
  95. package/dist/esm/components/Cart/SubtotalSection.d.ts +13 -13
  96. package/dist/esm/components/Cart/VariantSelectionPopup/DesktopVariantPopup.d.ts +19 -19
  97. package/dist/esm/components/Cart/VariantSelectionPopup/DesktopVariantPopup.styled.d.ts +60 -60
  98. package/dist/esm/components/Cart/VariantSelectionPopup/MobileVariantPopover.d.ts +19 -19
  99. package/dist/esm/components/Cart/index.d.ts +1 -1
  100. package/dist/esm/components/Loyalty/Loader.d.ts +10 -10
  101. package/dist/esm/components/Loyalty/LoyaltyProductCatalog.d.ts +60 -60
  102. package/dist/esm/components/Loyalty/index.d.ts +2 -2
  103. package/dist/esm/components/LoyaltyPageBlock/LoyaltyPageBlock.d.ts +64 -64
  104. package/dist/esm/components/Nudge/LeadGenerationNudge.d.ts +15 -15
  105. package/dist/esm/components/Nudge/Nudge.d.ts +40 -40
  106. package/dist/esm/components/Nudge/index.d.ts +1 -1
  107. package/dist/esm/components/ProductOffersBlock/ProductOffersCoupon.d.ts +12 -12
  108. package/dist/esm/components/ProductOffersBlock/ProductOffersList.d.ts +12 -12
  109. package/dist/esm/components/ProductOffersBlock/ProductOffersTermsMobilePopover.d.ts +10 -10
  110. package/dist/esm/components/ProductOffersBlock/ProductOffersTermsPopup.d.ts +10 -10
  111. package/dist/esm/components/ProductOffersBlock/ProductsOffers.d.ts +42 -42
  112. package/dist/esm/components/SpinnerWheel/SpinnerWheel.d.ts +23 -23
  113. package/dist/esm/components/SpinnerWheel/WheelSection.d.ts +9 -9
  114. package/dist/esm/components/SpinnerWheel/index.d.ts +1 -1
  115. package/dist/esm/components/index.d.ts +9 -9
  116. package/dist/esm/index.d.ts +1 -1
  117. package/dist/esm/index.js +97 -97
  118. package/dist/esm/utils/converter.d.ts +2 -2
  119. package/dist/esm/utils/customVariantOptions.d.ts +20 -20
  120. package/dist/esm/utils/freebieProductUtils.d.ts +28 -28
  121. package/dist/esm/utils/freebieUtils.d.ts +5 -5
  122. package/dist/esm/utils/index.d.ts +14 -14
  123. package/package.json +96 -96
@@ -1,246 +1,246 @@
1
- import React from "react";
2
- import { stickyCartCustomizationDataProps } from "./StickyCart";
3
- import { CartOffersCarousalProps } from "./CartOffersCarousel";
4
- import { freebieMilestoneProps } from "./NextFreebieRow";
5
- import { GSTSectionCustomizationProps } from "./GSTSection";
6
- import { BundlePayload } from "../BundleBlock/Bundle";
7
- import { type FloatingCartDataProps } from "./FloatingCart";
8
- import { trustedBadgeInterface } from "./CheckoutSection";
9
- export interface Checkpoint {
10
- couponTemplateId: number;
11
- couponType: string;
12
- minimumOrderValue: number;
13
- name: string;
14
- quantityThreshold: number;
15
- isDummyCouponTemplate?: boolean;
16
- customerGetsProductIds?: {
17
- ids: string[];
18
- };
19
- discountValue?: number;
20
- _allVariantIds: string[];
21
- maxFreebiesInTier?: number;
22
- freebieType?: 'free' | 'deal_amount' | 'no_discount' | 'percentage_off' | null;
23
- }
24
- export interface freebieClaimInterface {
25
- freebieSectionTitle: string;
26
- productClaimCtaButtonText: string;
27
- type: "section" | "overlay";
28
- allowOverlayClose: boolean;
29
- freeLabelText?: string;
30
- }
31
- export type CartLevelDiscountApplication = {
32
- type: string;
33
- key: string;
34
- title: string;
35
- description: string | null;
36
- value: string;
37
- created_at: string;
38
- value_type: string;
39
- allocation_method: string;
40
- target_selection: string;
41
- target_type: string;
42
- total_allocated_amount: number;
43
- };
44
- export type LoyaltyDiscount = {
45
- type: string;
46
- key: string;
47
- title: string;
48
- description: string | null;
49
- value: string;
50
- created_at: string;
51
- value_type: string;
52
- allocation_method: string;
53
- target_selection: string;
54
- target_type: string;
55
- total_allocated_amount: number;
56
- };
57
- export interface RewardCoupon {
58
- couponTemplateId: number;
59
- name: string;
60
- couponType: string;
61
- discountPercentage: number | null;
62
- discountValue: number | null;
63
- minimumOrderValue: number | null;
64
- pointsRequired: number | null;
65
- allowedCollections?: {
66
- ids: string[];
67
- };
68
- resolvedCollectionNames?: string[];
69
- isEligible?: boolean;
70
- applicableSubtotal?: number;
71
- estimatedSavings?: number;
72
- quantityThreshold?: number | null;
73
- customCartProgressBarCriteria?: string;
74
- }
75
- export interface CartProps {
76
- isOpen: boolean;
77
- setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
78
- backdrop?: boolean;
79
- backgroundColor: string;
80
- backgroundSubdued?: string;
81
- tertiaryColor?: string;
82
- tertiaryTextColor?: string;
83
- exploreCTAColor: string;
84
- emptyCartTitle: string;
85
- emptyCartDescription?: string;
86
- emptyCartButtons?: Array<{
87
- title: string;
88
- link: string;
89
- }>;
90
- checkoutFontSize: number | string;
91
- cartTitle: string;
92
- cartData?: any;
93
- switchWidthVariant?: boolean;
94
- addCartItem?: (product: any, quantity?: number, triggeredFrom?: string, freebieReplace?: boolean, productHandle?: string) => Promise<any>;
95
- removeCartItem: (lineItemKey: string, triggeredFrom?: string, ytRequest?: boolean) => Promise<any>;
96
- handleIncrement: (lineItemKey: string | number, newQuantity: number, properties?: {
97
- [key: string]: string;
98
- }) => Promise<any>;
99
- handleDecrement: (lineItemKey: string | number, newQuantity?: number) => Promise<any>;
100
- bundleProducts?: any;
101
- showBundle?: boolean;
102
- isUserSignedIn?: boolean;
103
- loyaltyIcon?: string;
104
- discountAmountOff?: number;
105
- pointsToBeUsed?: number;
106
- rewardMultiplier?: number;
107
- redemptionMultiplier?: number;
108
- removeDiscount?: () => Promise<any>;
109
- applyDiscount?: () => Promise<any>;
110
- discountApplied?: boolean;
111
- joinNowFunction?: () => void;
112
- checkoutFunction: (templateId?: number) => Promise<any>;
113
- guestLoyaltyPercentage?: number;
114
- showToggleButton?: boolean;
115
- isDev?: boolean;
116
- recProductsList?: any[];
117
- showMultiStepProgressBar?: boolean;
118
- cartCheckpoints?: Checkpoint[];
119
- showCartLevelAltPay?: boolean;
120
- redemptionRate: number;
121
- pointsRewardRate: number;
122
- exploreCtaRedirectLink?: string;
123
- discountAmountApplied?: number;
124
- minimumCartValue?: number;
125
- discountInCheckoutButton?: boolean | string;
126
- isStickyCheckout?: boolean;
127
- handleCheckpointCrossed?: (checkpoint: Checkpoint, cartAmount: number) => Promise<any>;
128
- customCartProgressBarCriteria?: string;
129
- primaryTextColor?: string;
130
- secondaryTextColor?: string;
131
- themeColor?: string;
132
- themeTextColor?: string;
133
- checkoutButtonColor?: string;
134
- ctaButtonBackgroundColor?: string;
135
- ctaButtonTextColor?: string;
136
- showProductRecsOnMobile?: boolean;
137
- showProductRecsOnDesktop?: boolean;
138
- productRecsTitleText?: string;
139
- productRecsCtaButtonText?: string;
140
- showGSTOption?: boolean;
141
- gstNumber?: string;
142
- companyName?: string;
143
- applyGSTToCart?: (gstNumber: string, companyName: string) => Promise<any>;
144
- showMOVForProgressTiers?: boolean;
145
- freeProduct?: any;
146
- showLoyaltyCta?: boolean;
147
- freeProductAdjustedCartTotal?: number;
148
- minimumOrderValueToAvailDiscount?: number;
149
- signinCTAButtonVisible?: boolean;
150
- cartSigninCTAMainText?: string;
151
- showNoteOption?: boolean;
152
- note?: string;
153
- applyNoteToCart?: (note: string) => Promise<any>;
154
- inlineCartOfferInfoText?: string;
155
- inlineCartOfferInfoRedirectLink?: string;
156
- cartOfferTermsAndConditionsText?: string;
157
- showEditOptionOnProducts?: boolean;
158
- getProductDetailsByVariantId?: (handle: string, variantId?: string) => Promise<any>;
159
- onSetLoading?: (setLoadingFn: (isLoading: boolean, showLoader: boolean, showSkeletonLoader?: boolean, showLoyaltyCtaLoading?: boolean) => void) => void;
160
- showVariantSelectionDropdownInProductRecs?: boolean;
161
- originalCartSubtotal?: number;
162
- freebieProductsInCart?: any;
163
- currentTier?: number;
164
- showFreebieClaim?: boolean;
165
- addFreebieToCart?: (variantId: string) => Promise<void>;
166
- freebiesInCart?: string[];
167
- effectiveQuantityForProgressBar?: number;
168
- productPercentageOffMapping: {
169
- [variantId: string]: number;
170
- };
171
- removeFreebieFromCart?: (lineItemKey: string) => Promise<void>;
172
- postalCodeList?: number[];
173
- enableGeoLocationDeliveryRestriction?: boolean;
174
- applyPostalCodeAndDeliverySlotToCart?: (deliveryType: string, postalCode?: string, deliverySlot?: string) => Promise<any>;
175
- showDeleteOnFreebies?: boolean;
176
- freebieCouponTemplates?: Checkpoint[];
177
- freebieFlowCheckpoints?: Checkpoint[];
178
- freebieClaimData?: freebieClaimInterface;
179
- showStickyAddToCart?: boolean;
180
- stickyCartLineItem?: any;
181
- stickyCartCustomizationData?: stickyCartCustomizationDataProps;
182
- stickyCartLineItemQuantity?: number;
183
- postalCodeBasedItemTrackingParameter?: "specific-tags" | "all-products";
184
- enableSlotPicker?: boolean;
185
- deliveryHeaderTitle?: string;
186
- deliveryAvailableText?: string;
187
- deliveryNotAvailableText?: string;
188
- giftWrapSetupData?: any;
189
- giftWrapProductDetail?: any;
190
- progressBarFreeProductIconType?: "tshirt" | "gift" | "box" | "cup";
191
- addToStickyCart?: (variantId: string, quantity: number) => Promise<void>;
192
- enableCustomCartOnCartPage?: boolean;
193
- isCartPage?: boolean;
194
- productRecsCardLayout: "horizontal" | "vertical";
195
- productRecsCardListVariant: "scroll" | "carousel" | "vertical";
196
- showCartTimer?: boolean;
197
- showFreebieMilestone?: boolean;
198
- showFloatingCart?: boolean;
199
- floatingCartData?: FloatingCartDataProps;
200
- cartTimerInMinutes?: number;
201
- cartTimerCustomText?: string;
202
- imageAspectSelector?: "square" | "portrait";
203
- cartComponentsCornerType?: "rounded" | "sharp";
204
- cartComponentsCornerRadius?: number;
205
- cartOffersCarousalData?: CartOffersCarousalProps;
206
- freebieMilestoneData?: freebieMilestoneProps;
207
- cartOffersCarouselHeight?: number;
208
- stickyBarBuyNowFunction?: (variantId: string, quantity: number) => Promise<void>;
209
- gstSectionCustomizationData?: GSTSectionCustomizationProps;
210
- noteSectionTitle?: string;
211
- checkoutSectionMessage?: string;
212
- checkoutSectionMessageRedirectLink?: string;
213
- checkoutSectionMessageDisplay?: "ribbon" | "tag" | "bookmark";
214
- showVariantSelectionDropdownInProductClaim?: boolean;
215
- productClaimCtaButtonText?: string;
216
- loyaltyDiscount?: LoyaltyDiscount | undefined;
217
- brandTokenName?: string;
218
- showDiscountOnMRP?: boolean;
219
- prefixMessageText?: string;
220
- suffixMessageText?: string;
221
- successMessageText?: string;
222
- toggleDecimal?: boolean;
223
- disableCheckoutButton: boolean;
224
- showEmptyCartRecommendations?: boolean;
225
- emptyProductRecsTitleText?: string;
226
- checkoutButtonBottomSpacing?: number;
227
- applyCouponCode?: (code: string) => Promise<void>;
228
- showApplyCoupon?: boolean;
229
- enableConfetti?: boolean;
230
- showCheckoutButtonPaymentIcons?: boolean;
231
- showCouponOptions?: boolean;
232
- rewardCoupons?: RewardCoupon[];
233
- comboBundleData?: BundlePayload;
234
- comboBundleAddToCartFunction?: (selectedItemsSubtotal: number, variantIds?: string[], finalBundlePrice?: number, variantIdPriceMap?: {
235
- variantId: string;
236
- price: number;
237
- }[]) => Promise<void>;
238
- stealDealCheckpoints?: Checkpoint[];
239
- stealDealProducts?: any[];
240
- stealDealAddToCart?: (variantId: string, originalAllowedVariantIds?: string[]) => Promise<void>;
241
- useCartShell?: boolean;
242
- showTrustedBadge?: boolean;
243
- trustedBadgeData?: trustedBadgeInterface;
244
- }
245
- declare const Cart: React.FC<CartProps>;
246
- export default Cart;
1
+ import React from "react";
2
+ import { stickyCartCustomizationDataProps } from "./StickyCart";
3
+ import { CartOffersCarousalProps } from "./CartOffersCarousel";
4
+ import { freebieMilestoneProps } from "./NextFreebieRow";
5
+ import { GSTSectionCustomizationProps } from "./GSTSection";
6
+ import { BundlePayload } from "../BundleBlock/Bundle";
7
+ import { type FloatingCartDataProps } from "./FloatingCart";
8
+ import { trustedBadgeInterface } from "./CheckoutSection";
9
+ export interface Checkpoint {
10
+ couponTemplateId: number;
11
+ couponType: string;
12
+ minimumOrderValue: number;
13
+ name: string;
14
+ quantityThreshold: number;
15
+ isDummyCouponTemplate?: boolean;
16
+ customerGetsProductIds?: {
17
+ ids: string[];
18
+ };
19
+ discountValue?: number;
20
+ _allVariantIds: string[];
21
+ maxFreebiesInTier?: number;
22
+ freebieType?: 'free' | 'deal_amount' | 'no_discount' | 'percentage_off' | null;
23
+ }
24
+ export interface freebieClaimInterface {
25
+ freebieSectionTitle: string;
26
+ productClaimCtaButtonText: string;
27
+ type: "section" | "overlay";
28
+ allowOverlayClose: boolean;
29
+ freeLabelText?: string;
30
+ }
31
+ export type CartLevelDiscountApplication = {
32
+ type: string;
33
+ key: string;
34
+ title: string;
35
+ description: string | null;
36
+ value: string;
37
+ created_at: string;
38
+ value_type: string;
39
+ allocation_method: string;
40
+ target_selection: string;
41
+ target_type: string;
42
+ total_allocated_amount: number;
43
+ };
44
+ export type LoyaltyDiscount = {
45
+ type: string;
46
+ key: string;
47
+ title: string;
48
+ description: string | null;
49
+ value: string;
50
+ created_at: string;
51
+ value_type: string;
52
+ allocation_method: string;
53
+ target_selection: string;
54
+ target_type: string;
55
+ total_allocated_amount: number;
56
+ };
57
+ export interface RewardCoupon {
58
+ couponTemplateId: number;
59
+ name: string;
60
+ couponType: string;
61
+ discountPercentage: number | null;
62
+ discountValue: number | null;
63
+ minimumOrderValue: number | null;
64
+ pointsRequired: number | null;
65
+ allowedCollections?: {
66
+ ids: string[];
67
+ };
68
+ resolvedCollectionNames?: string[];
69
+ isEligible?: boolean;
70
+ applicableSubtotal?: number;
71
+ estimatedSavings?: number;
72
+ quantityThreshold?: number | null;
73
+ customCartProgressBarCriteria?: string;
74
+ }
75
+ export interface CartProps {
76
+ isOpen: boolean;
77
+ setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
78
+ backdrop?: boolean;
79
+ backgroundColor: string;
80
+ backgroundSubdued?: string;
81
+ tertiaryColor?: string;
82
+ tertiaryTextColor?: string;
83
+ exploreCTAColor: string;
84
+ emptyCartTitle: string;
85
+ emptyCartDescription?: string;
86
+ emptyCartButtons?: Array<{
87
+ title: string;
88
+ link: string;
89
+ }>;
90
+ checkoutFontSize: number | string;
91
+ cartTitle: string;
92
+ cartData?: any;
93
+ switchWidthVariant?: boolean;
94
+ addCartItem?: (product: any, quantity?: number, triggeredFrom?: string, freebieReplace?: boolean, productHandle?: string) => Promise<any>;
95
+ removeCartItem: (lineItemKey: string, triggeredFrom?: string, ytRequest?: boolean) => Promise<any>;
96
+ handleIncrement: (lineItemKey: string | number, newQuantity: number, properties?: {
97
+ [key: string]: string;
98
+ }) => Promise<any>;
99
+ handleDecrement: (lineItemKey: string | number, newQuantity?: number) => Promise<any>;
100
+ bundleProducts?: any;
101
+ showBundle?: boolean;
102
+ isUserSignedIn?: boolean;
103
+ loyaltyIcon?: string;
104
+ discountAmountOff?: number;
105
+ pointsToBeUsed?: number;
106
+ rewardMultiplier?: number;
107
+ redemptionMultiplier?: number;
108
+ removeDiscount?: () => Promise<any>;
109
+ applyDiscount?: () => Promise<any>;
110
+ discountApplied?: boolean;
111
+ joinNowFunction?: () => void;
112
+ checkoutFunction: (templateId?: number) => Promise<any>;
113
+ guestLoyaltyPercentage?: number;
114
+ showToggleButton?: boolean;
115
+ isDev?: boolean;
116
+ recProductsList?: any[];
117
+ showMultiStepProgressBar?: boolean;
118
+ cartCheckpoints?: Checkpoint[];
119
+ showCartLevelAltPay?: boolean;
120
+ redemptionRate: number;
121
+ pointsRewardRate: number;
122
+ exploreCtaRedirectLink?: string;
123
+ discountAmountApplied?: number;
124
+ minimumCartValue?: number;
125
+ discountInCheckoutButton?: boolean | string;
126
+ isStickyCheckout?: boolean;
127
+ handleCheckpointCrossed?: (checkpoint: Checkpoint, cartAmount: number) => Promise<any>;
128
+ customCartProgressBarCriteria?: string;
129
+ primaryTextColor?: string;
130
+ secondaryTextColor?: string;
131
+ themeColor?: string;
132
+ themeTextColor?: string;
133
+ checkoutButtonColor?: string;
134
+ ctaButtonBackgroundColor?: string;
135
+ ctaButtonTextColor?: string;
136
+ showProductRecsOnMobile?: boolean;
137
+ showProductRecsOnDesktop?: boolean;
138
+ productRecsTitleText?: string;
139
+ productRecsCtaButtonText?: string;
140
+ showGSTOption?: boolean;
141
+ gstNumber?: string;
142
+ companyName?: string;
143
+ applyGSTToCart?: (gstNumber: string, companyName: string) => Promise<any>;
144
+ showMOVForProgressTiers?: boolean;
145
+ freeProduct?: any;
146
+ showLoyaltyCta?: boolean;
147
+ freeProductAdjustedCartTotal?: number;
148
+ minimumOrderValueToAvailDiscount?: number;
149
+ signinCTAButtonVisible?: boolean;
150
+ cartSigninCTAMainText?: string;
151
+ showNoteOption?: boolean;
152
+ note?: string;
153
+ applyNoteToCart?: (note: string) => Promise<any>;
154
+ inlineCartOfferInfoText?: string;
155
+ inlineCartOfferInfoRedirectLink?: string;
156
+ cartOfferTermsAndConditionsText?: string;
157
+ showEditOptionOnProducts?: boolean;
158
+ getProductDetailsByVariantId?: (handle: string, variantId?: string) => Promise<any>;
159
+ onSetLoading?: (setLoadingFn: (isLoading: boolean, showLoader: boolean, showSkeletonLoader?: boolean, showLoyaltyCtaLoading?: boolean) => void) => void;
160
+ showVariantSelectionDropdownInProductRecs?: boolean;
161
+ originalCartSubtotal?: number;
162
+ freebieProductsInCart?: any;
163
+ currentTier?: number;
164
+ showFreebieClaim?: boolean;
165
+ addFreebieToCart?: (variantId: string) => Promise<void>;
166
+ freebiesInCart?: string[];
167
+ effectiveQuantityForProgressBar?: number;
168
+ productPercentageOffMapping: {
169
+ [variantId: string]: number;
170
+ };
171
+ removeFreebieFromCart?: (lineItemKey: string) => Promise<void>;
172
+ postalCodeList?: number[];
173
+ enableGeoLocationDeliveryRestriction?: boolean;
174
+ applyPostalCodeAndDeliverySlotToCart?: (deliveryType: string, postalCode?: string, deliverySlot?: string) => Promise<any>;
175
+ showDeleteOnFreebies?: boolean;
176
+ freebieCouponTemplates?: Checkpoint[];
177
+ freebieFlowCheckpoints?: Checkpoint[];
178
+ freebieClaimData?: freebieClaimInterface;
179
+ showStickyAddToCart?: boolean;
180
+ stickyCartLineItem?: any;
181
+ stickyCartCustomizationData?: stickyCartCustomizationDataProps;
182
+ stickyCartLineItemQuantity?: number;
183
+ postalCodeBasedItemTrackingParameter?: "specific-tags" | "all-products";
184
+ enableSlotPicker?: boolean;
185
+ deliveryHeaderTitle?: string;
186
+ deliveryAvailableText?: string;
187
+ deliveryNotAvailableText?: string;
188
+ giftWrapSetupData?: any;
189
+ giftWrapProductDetail?: any;
190
+ progressBarFreeProductIconType?: "tshirt" | "gift" | "box" | "cup";
191
+ addToStickyCart?: (variantId: string, quantity: number) => Promise<void>;
192
+ enableCustomCartOnCartPage?: boolean;
193
+ isCartPage?: boolean;
194
+ productRecsCardLayout: "horizontal" | "vertical";
195
+ productRecsCardListVariant: "scroll" | "carousel" | "vertical";
196
+ showCartTimer?: boolean;
197
+ showFreebieMilestone?: boolean;
198
+ showFloatingCart?: boolean;
199
+ floatingCartData?: FloatingCartDataProps;
200
+ cartTimerInMinutes?: number;
201
+ cartTimerCustomText?: string;
202
+ imageAspectSelector?: "square" | "portrait";
203
+ cartComponentsCornerType?: "rounded" | "sharp";
204
+ cartComponentsCornerRadius?: number;
205
+ cartOffersCarousalData?: CartOffersCarousalProps;
206
+ freebieMilestoneData?: freebieMilestoneProps;
207
+ cartOffersCarouselHeight?: number;
208
+ stickyBarBuyNowFunction?: (variantId: string, quantity: number) => Promise<void>;
209
+ gstSectionCustomizationData?: GSTSectionCustomizationProps;
210
+ noteSectionTitle?: string;
211
+ checkoutSectionMessage?: string;
212
+ checkoutSectionMessageRedirectLink?: string;
213
+ checkoutSectionMessageDisplay?: "ribbon" | "tag" | "bookmark";
214
+ showVariantSelectionDropdownInProductClaim?: boolean;
215
+ productClaimCtaButtonText?: string;
216
+ loyaltyDiscount?: LoyaltyDiscount | undefined;
217
+ brandTokenName?: string;
218
+ showDiscountOnMRP?: boolean;
219
+ prefixMessageText?: string;
220
+ suffixMessageText?: string;
221
+ successMessageText?: string;
222
+ toggleDecimal?: boolean;
223
+ disableCheckoutButton: boolean;
224
+ showEmptyCartRecommendations?: boolean;
225
+ emptyProductRecsTitleText?: string;
226
+ checkoutButtonBottomSpacing?: number;
227
+ applyCouponCode?: (code: string) => Promise<void>;
228
+ showApplyCoupon?: boolean;
229
+ enableConfetti?: boolean;
230
+ showCheckoutButtonPaymentIcons?: boolean;
231
+ showCouponOptions?: boolean;
232
+ rewardCoupons?: RewardCoupon[];
233
+ comboBundleData?: BundlePayload;
234
+ comboBundleAddToCartFunction?: (selectedItemsSubtotal: number, variantIds?: string[], finalBundlePrice?: number, variantIdPriceMap?: {
235
+ variantId: string;
236
+ price: number;
237
+ }[]) => Promise<void>;
238
+ stealDealCheckpoints?: Checkpoint[];
239
+ stealDealProducts?: any[];
240
+ stealDealAddToCart?: (variantId: string, originalAllowedVariantIds?: string[]) => Promise<void>;
241
+ useCartShell?: boolean;
242
+ showTrustedBadge?: boolean;
243
+ trustedBadgeData?: trustedBadgeInterface;
244
+ }
245
+ declare const Cart: React.FC<CartProps>;
246
+ export default Cart;
@@ -1,26 +1,26 @@
1
- import React from "react";
2
- import { CartProps, RewardCoupon } from "./Cart";
3
- import "./shared.scss";
4
- interface CartDrawerProps extends CartProps {
5
- prefixMessageText?: string;
6
- suffixMessageText?: string;
7
- successMessageText?: string;
8
- switchWidthVariant?: boolean;
9
- toggleDecimal?: boolean;
10
- cartOffersCarouselHeight?: number;
11
- showEmptyCartRecommendations?: boolean;
12
- checkoutButtonBottomSpacing?: number;
13
- applyCouponCode?: (code: string) => Promise<void>;
14
- showApplyCoupon?: boolean;
15
- enableConfetti?: boolean;
16
- checkoutSectionMessageRedirectLink?: string;
17
- showCheckoutButtonPaymentIcons?: boolean;
18
- showCouponOptions?: boolean;
19
- rewardCoupons?: RewardCoupon[];
20
- applyTemplateDiscount?: (templateId?: number) => Promise<any>;
21
- useCartShell?: boolean;
22
- showTrustedBadge?: boolean;
23
- trustedBadgeData?: CartProps["trustedBadgeData"];
24
- }
25
- declare const CartDrawer: React.FC<CartDrawerProps>;
26
- export default CartDrawer;
1
+ import React from "react";
2
+ import { CartProps, RewardCoupon } from "./Cart";
3
+ import "./shared.scss";
4
+ interface CartDrawerProps extends CartProps {
5
+ prefixMessageText?: string;
6
+ suffixMessageText?: string;
7
+ successMessageText?: string;
8
+ switchWidthVariant?: boolean;
9
+ toggleDecimal?: boolean;
10
+ cartOffersCarouselHeight?: number;
11
+ showEmptyCartRecommendations?: boolean;
12
+ checkoutButtonBottomSpacing?: number;
13
+ applyCouponCode?: (code: string) => Promise<void>;
14
+ showApplyCoupon?: boolean;
15
+ enableConfetti?: boolean;
16
+ checkoutSectionMessageRedirectLink?: string;
17
+ showCheckoutButtonPaymentIcons?: boolean;
18
+ showCouponOptions?: boolean;
19
+ rewardCoupons?: RewardCoupon[];
20
+ applyTemplateDiscount?: (templateId?: number) => Promise<any>;
21
+ useCartShell?: boolean;
22
+ showTrustedBadge?: boolean;
23
+ trustedBadgeData?: CartProps["trustedBadgeData"];
24
+ }
25
+ declare const CartDrawer: React.FC<CartDrawerProps>;
26
+ export default CartDrawer;
@@ -1,48 +1,48 @@
1
- import React from "react";
2
- export type Criteria = {
3
- id: string;
4
- type: "mov" | "moq";
5
- value: number;
6
- message: string;
7
- redirectionUrl?: string;
8
- };
9
- export type Slide = {
10
- slideNumber: number;
11
- slideType: "TextImage" | "TextCode" | "TextFieldOnly" | "ImageOnly";
12
- textAlignment: "left" | "center" | "right";
13
- titleTextField?: string;
14
- descriptionTextField?: string;
15
- campaignCode?: string;
16
- imageUrl?: string;
17
- carouselRedirectionLink?: string;
18
- redirectionUrl?: string;
19
- enableMarquee?: boolean;
20
- enableCustomCriteria?: boolean;
21
- criteriaCount?: number;
22
- criteria?: Criteria[];
23
- };
24
- export type CartOffersCarousalProps = {
25
- enableCartOffersCarousel: boolean;
26
- slidesCount: number;
27
- pauseTimer: number;
28
- backgroundColor: string;
29
- slides: Slide[];
30
- };
31
- export default function CartOffersCarousel({ cartOffersCarousalData, themeColor, cartOffersCarouselHeight, cartData, }: {
32
- themeColor?: string;
33
- cartOffersCarousalData: CartOffersCarousalProps;
34
- cartOffersCarouselHeight?: number;
35
- cartData?: {
36
- items_subtotal_price?: number;
37
- original_total_price?: number;
38
- currency?: string;
39
- item_count?: number;
40
- items: Array<{
41
- properties?: {
42
- _isYtFreebie?: boolean;
43
- };
44
- quantity?: number;
45
- product_id?: number;
46
- }>;
47
- };
48
- }): React.JSX.Element | null;
1
+ import React from "react";
2
+ export type Criteria = {
3
+ id: string;
4
+ type: "mov" | "moq";
5
+ value: number;
6
+ message: string;
7
+ redirectionUrl?: string;
8
+ };
9
+ export type Slide = {
10
+ slideNumber: number;
11
+ slideType: "TextImage" | "TextCode" | "TextFieldOnly" | "ImageOnly";
12
+ textAlignment: "left" | "center" | "right";
13
+ titleTextField?: string;
14
+ descriptionTextField?: string;
15
+ campaignCode?: string;
16
+ imageUrl?: string;
17
+ carouselRedirectionLink?: string;
18
+ redirectionUrl?: string;
19
+ enableMarquee?: boolean;
20
+ enableCustomCriteria?: boolean;
21
+ criteriaCount?: number;
22
+ criteria?: Criteria[];
23
+ };
24
+ export type CartOffersCarousalProps = {
25
+ enableCartOffersCarousel: boolean;
26
+ slidesCount: number;
27
+ pauseTimer: number;
28
+ backgroundColor: string;
29
+ slides: Slide[];
30
+ };
31
+ export default function CartOffersCarousel({ cartOffersCarousalData, themeColor, cartOffersCarouselHeight, cartData, }: {
32
+ themeColor?: string;
33
+ cartOffersCarousalData: CartOffersCarousalProps;
34
+ cartOffersCarouselHeight?: number;
35
+ cartData?: {
36
+ items_subtotal_price?: number;
37
+ original_total_price?: number;
38
+ currency?: string;
39
+ item_count?: number;
40
+ items: Array<{
41
+ properties?: {
42
+ _isYtFreebie?: boolean;
43
+ };
44
+ quantity?: number;
45
+ product_id?: number;
46
+ }>;
47
+ };
48
+ }): React.JSX.Element | null;