yt-uikit 0.9.25 → 0.9.26-debugging-recs.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 (124) 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 +129 -129
  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 +258 -258
  47. package/dist/esm/components/Cart/CartDrawer.d.ts +34 -34
  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 +18 -18
  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 +18 -18
  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 +418 -418
  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 +36 -36
  121. package/dist/esm/utils/freebieUtils.d.ts +5 -5
  122. package/dist/esm/utils/index.d.ts +14 -14
  123. package/dist/esm/utils/productRecsDebug.d.ts +10 -0
  124. package/package.json +96 -96
@@ -1,258 +1,258 @@
1
- import React from "react";
2
- import { type DrawerLayout } from "./CartDrawer";
3
- import { stickyCartCustomizationDataProps } from "./StickyCart";
4
- import { CartOffersCarousalProps } from "./CartOffersCarousel";
5
- import { freebieMilestoneProps } from "./NextFreebieRow";
6
- import { GSTSectionCustomizationProps } from "./GSTSection";
7
- import { BundlePayload } from "../BundleBlock/Bundle";
8
- import { type FloatingCartDataProps } from "./FloatingCart";
9
- import { trustedBadgeInterface } from "./CheckoutSection";
10
- export interface Checkpoint {
11
- couponTemplateId: number;
12
- couponType: string;
13
- minimumOrderValue: number;
14
- name: string;
15
- quantityThreshold: number;
16
- isDummyCouponTemplate?: boolean;
17
- customerGetsProductIds?: {
18
- ids: string[];
19
- };
20
- discountValue?: number;
21
- _allVariantIds: string[];
22
- maxFreebiesInTier?: number;
23
- freebieType?: 'free' | 'deal_amount' | 'no_discount' | 'percentage_off' | null;
24
- }
25
- export interface freebieClaimInterface {
26
- freebieSectionTitle: string;
27
- productClaimCtaButtonText: string;
28
- type: "section" | "overlay";
29
- allowOverlayClose: boolean;
30
- freeLabelText?: string;
31
- }
32
- export type CartLevelDiscountApplication = {
33
- type: string;
34
- key: string;
35
- title: string;
36
- description: string | null;
37
- value: string;
38
- created_at: string;
39
- value_type: string;
40
- allocation_method: string;
41
- target_selection: string;
42
- target_type: string;
43
- total_allocated_amount: number;
44
- };
45
- export type LoyaltyDiscount = {
46
- type: string;
47
- key: string;
48
- title: string;
49
- description: string | null;
50
- value: string;
51
- created_at: string;
52
- value_type: string;
53
- allocation_method: string;
54
- target_selection: string;
55
- target_type: string;
56
- total_allocated_amount: number;
57
- };
58
- export interface RewardCoupon {
59
- couponTemplateId: number;
60
- name: string;
61
- couponType: string;
62
- discountPercentage: number | null;
63
- discountValue: number | null;
64
- minimumOrderValue: number | null;
65
- pointsRequired: number | null;
66
- allowedCollections?: {
67
- ids: string[];
68
- };
69
- resolvedCollectionNames?: string[];
70
- isEligible?: boolean;
71
- applicableSubtotal?: number;
72
- estimatedSavings?: number;
73
- quantityThreshold?: number | null;
74
- customCartProgressBarCriteria?: string;
75
- }
76
- export interface CouponSelectionData {
77
- preCollectionBannerPrefixText: string;
78
- preCollectionBannerSuffixText: string;
79
- postCollectionBannerPrefixText: string;
80
- postCollectionBannerSuffixText: string;
81
- couponTextPrefix?: string;
82
- couponTextSuffix?: string;
83
- applyButtonText?: string;
84
- }
85
- export interface CartProps {
86
- isOpen: boolean;
87
- setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
88
- backdrop?: boolean;
89
- backgroundColor: string;
90
- backgroundSubdued?: string;
91
- tertiaryColor?: string;
92
- tertiaryTextColor?: string;
93
- exploreCTAColor: string;
94
- emptyCartTitle: string;
95
- emptyCartDescription?: string;
96
- emptyCartButtons?: Array<{
97
- title: string;
98
- link: string;
99
- }>;
100
- checkoutFontSize: number | string;
101
- cartTitle: string;
102
- cartData?: any;
103
- switchWidthVariant?: boolean;
104
- addCartItem?: (product: any, quantity?: number, triggeredFrom?: string, freebieReplace?: boolean, productHandle?: string) => Promise<any>;
105
- removeCartItem: (lineItemKey: string, triggeredFrom?: string, ytRequest?: boolean) => Promise<any>;
106
- handleIncrement: (lineItemKey: string | number, newQuantity: number, properties?: {
107
- [key: string]: string;
108
- }) => Promise<any>;
109
- handleDecrement: (lineItemKey: string | number, newQuantity?: number) => Promise<any>;
110
- bundleProducts?: any;
111
- showBundle?: boolean;
112
- isUserSignedIn?: boolean;
113
- loyaltyIcon?: string;
114
- discountAmountOff?: number;
115
- pointsToBeUsed?: number;
116
- rewardMultiplier?: number;
117
- redemptionMultiplier?: number;
118
- removeDiscount?: () => Promise<any>;
119
- applyDiscount?: () => Promise<any>;
120
- discountApplied?: boolean;
121
- joinNowFunction?: () => void;
122
- checkoutFunction: (templateId?: number) => Promise<any>;
123
- guestLoyaltyPercentage?: number;
124
- showToggleButton?: boolean;
125
- isDev?: boolean;
126
- recProductsList?: any[];
127
- showMultiStepProgressBar?: boolean;
128
- cartCheckpoints?: Checkpoint[];
129
- showCartLevelAltPay?: boolean;
130
- redemptionRate: number;
131
- pointsRewardRate: number;
132
- exploreCtaRedirectLink?: string;
133
- discountAmountApplied?: number;
134
- minimumCartValue?: number;
135
- discountInCheckoutButton?: boolean | string;
136
- isStickyCheckout?: boolean;
137
- handleCheckpointCrossed?: (checkpoint: Checkpoint, cartAmount: number) => Promise<any>;
138
- customCartProgressBarCriteria?: string;
139
- primaryTextColor?: string;
140
- secondaryTextColor?: string;
141
- themeColor?: string;
142
- themeTextColor?: string;
143
- checkoutButtonColor?: string;
144
- ctaButtonBackgroundColor?: string;
145
- ctaButtonTextColor?: string;
146
- showProductRecsOnMobile?: boolean;
147
- showProductRecsOnDesktop?: boolean;
148
- productRecsTitleText?: string;
149
- productRecsCtaButtonText?: string;
150
- showGSTOption?: boolean;
151
- gstNumber?: string;
152
- companyName?: string;
153
- applyGSTToCart?: (gstNumber: string, companyName: string) => Promise<any>;
154
- showMOVForProgressTiers?: boolean;
155
- freeProduct?: any;
156
- showLoyaltyCta?: boolean;
157
- freeProductAdjustedCartTotal?: number;
158
- minimumOrderValueToAvailDiscount?: number;
159
- signinCTAButtonVisible?: boolean;
160
- cartSigninCTAMainText?: string;
161
- showNoteOption?: boolean;
162
- note?: string;
163
- applyNoteToCart?: (note: string) => Promise<any>;
164
- inlineCartOfferInfoText?: string;
165
- inlineCartOfferInfoRedirectLink?: string;
166
- cartOfferTermsAndConditionsText?: string;
167
- showEditOptionOnProducts?: boolean;
168
- getProductDetailsByVariantId?: (handle: string, variantId?: string) => Promise<any>;
169
- onSetLoading?: (setLoadingFn: (isLoading: boolean, showLoader: boolean, showSkeletonLoader?: boolean, showLoyaltyCtaLoading?: boolean) => void) => void;
170
- showVariantSelectionDropdownInProductRecs?: boolean;
171
- originalCartSubtotal?: number;
172
- freebieProductsInCart?: any;
173
- currentTier?: number;
174
- showFreebieClaim?: boolean;
175
- addFreebieToCart?: (variantId: string) => Promise<void>;
176
- freebiesInCart?: string[];
177
- effectiveQuantityForProgressBar?: number;
178
- productPercentageOffMapping: {
179
- [variantId: string]: number;
180
- };
181
- removeFreebieFromCart?: (lineItemKey: string) => Promise<void>;
182
- postalCodeList?: number[];
183
- enableGeoLocationDeliveryRestriction?: boolean;
184
- applyPostalCodeAndDeliverySlotToCart?: (deliveryType: string, postalCode?: string, deliverySlot?: string) => Promise<any>;
185
- showDeleteOnFreebies?: boolean;
186
- freebieCouponTemplates?: Checkpoint[];
187
- freebieFlowCheckpoints?: Checkpoint[];
188
- freebieClaimData?: freebieClaimInterface;
189
- showStickyAddToCart?: boolean;
190
- stickyCartLineItem?: any;
191
- stickyCartCustomizationData?: stickyCartCustomizationDataProps;
192
- stickyCartLineItemQuantity?: number;
193
- postalCodeBasedItemTrackingParameter?: "specific-tags" | "all-products";
194
- enableSlotPicker?: boolean;
195
- deliveryHeaderTitle?: string;
196
- deliveryAvailableText?: string;
197
- deliveryNotAvailableText?: string;
198
- giftWrapSetupData?: any;
199
- giftWrapProductDetail?: any;
200
- progressBarFreeProductIconType?: "tshirt" | "gift" | "box" | "cup";
201
- addToStickyCart?: (variantId: string, quantity: number) => Promise<void>;
202
- enableCustomCartOnCartPage?: boolean;
203
- isCartPage?: boolean;
204
- productRecsCardLayout: "horizontal" | "vertical";
205
- productRecsCardListVariant: "scroll" | "carousel" | "vertical";
206
- showCartTimer?: boolean;
207
- showFreebieMilestone?: boolean;
208
- showFloatingCart?: boolean;
209
- floatingCartData?: FloatingCartDataProps;
210
- cartTimerInMinutes?: number;
211
- cartTimerCustomText?: string;
212
- imageAspectSelector?: "square" | "portrait";
213
- cartComponentsCornerType?: "rounded" | "sharp";
214
- cartComponentsCornerRadius?: number;
215
- cartOffersCarousalData?: CartOffersCarousalProps;
216
- freebieMilestoneData?: freebieMilestoneProps;
217
- cartOffersCarouselHeight?: number;
218
- stickyBarBuyNowFunction?: (variantId: string, quantity: number) => Promise<void>;
219
- gstSectionCustomizationData?: GSTSectionCustomizationProps;
220
- noteSectionTitle?: string;
221
- checkoutSectionMessage?: string;
222
- checkoutSectionMessageRedirectLink?: string;
223
- checkoutSectionMessageDisplay?: "ribbon" | "tag" | "bookmark";
224
- showVariantSelectionDropdownInProductClaim?: boolean;
225
- productClaimCtaButtonText?: string;
226
- loyaltyDiscount?: LoyaltyDiscount | undefined;
227
- brandTokenName?: string;
228
- showDiscountOnMRP?: boolean;
229
- prefixMessageText?: string;
230
- suffixMessageText?: string;
231
- successMessageText?: string;
232
- toggleDecimal?: boolean;
233
- disableCheckoutButton: boolean;
234
- showEmptyCartRecommendations?: boolean;
235
- emptyProductRecsTitleText?: string;
236
- checkoutButtonBottomSpacing?: number;
237
- applyCouponCode?: (code: string) => Promise<void>;
238
- showApplyCoupon?: boolean;
239
- enableConfetti?: boolean;
240
- showCheckoutButtonPaymentIcons?: boolean;
241
- showCouponOptions?: boolean;
242
- rewardCoupons?: RewardCoupon[];
243
- couponSelectionData?: CouponSelectionData;
244
- comboBundleData?: BundlePayload;
245
- comboBundleAddToCartFunction?: (selectedItemsSubtotal: number, variantIds?: string[], finalBundlePrice?: number, variantIdPriceMap?: {
246
- variantId: string;
247
- price: number;
248
- }[]) => Promise<void>;
249
- stealDealCheckpoints?: Checkpoint[];
250
- stealDealProducts?: any[];
251
- stealDealAddToCart?: (variantId: string, originalAllowedVariantIds?: string[]) => Promise<void>;
252
- useCartShell?: boolean;
253
- showTrustedBadge?: boolean;
254
- trustedBadgeData?: trustedBadgeInterface;
255
- drawerLayoutData?: DrawerLayout;
256
- }
257
- declare const Cart: React.FC<CartProps>;
258
- export default Cart;
1
+ import React from "react";
2
+ import { type DrawerLayout } from "./CartDrawer";
3
+ import { stickyCartCustomizationDataProps } from "./StickyCart";
4
+ import { CartOffersCarousalProps } from "./CartOffersCarousel";
5
+ import { freebieMilestoneProps } from "./NextFreebieRow";
6
+ import { GSTSectionCustomizationProps } from "./GSTSection";
7
+ import { BundlePayload } from "../BundleBlock/Bundle";
8
+ import { type FloatingCartDataProps } from "./FloatingCart";
9
+ import { trustedBadgeInterface } from "./CheckoutSection";
10
+ export interface Checkpoint {
11
+ couponTemplateId: number;
12
+ couponType: string;
13
+ minimumOrderValue: number;
14
+ name: string;
15
+ quantityThreshold: number;
16
+ isDummyCouponTemplate?: boolean;
17
+ customerGetsProductIds?: {
18
+ ids: string[];
19
+ };
20
+ discountValue?: number;
21
+ _allVariantIds: string[];
22
+ maxFreebiesInTier?: number;
23
+ freebieType?: 'free' | 'deal_amount' | 'no_discount' | 'percentage_off' | null;
24
+ }
25
+ export interface freebieClaimInterface {
26
+ freebieSectionTitle: string;
27
+ productClaimCtaButtonText: string;
28
+ type: "section" | "overlay";
29
+ allowOverlayClose: boolean;
30
+ freeLabelText?: string;
31
+ }
32
+ export type CartLevelDiscountApplication = {
33
+ type: string;
34
+ key: string;
35
+ title: string;
36
+ description: string | null;
37
+ value: string;
38
+ created_at: string;
39
+ value_type: string;
40
+ allocation_method: string;
41
+ target_selection: string;
42
+ target_type: string;
43
+ total_allocated_amount: number;
44
+ };
45
+ export type LoyaltyDiscount = {
46
+ type: string;
47
+ key: string;
48
+ title: string;
49
+ description: string | null;
50
+ value: string;
51
+ created_at: string;
52
+ value_type: string;
53
+ allocation_method: string;
54
+ target_selection: string;
55
+ target_type: string;
56
+ total_allocated_amount: number;
57
+ };
58
+ export interface RewardCoupon {
59
+ couponTemplateId: number;
60
+ name: string;
61
+ couponType: string;
62
+ discountPercentage: number | null;
63
+ discountValue: number | null;
64
+ minimumOrderValue: number | null;
65
+ pointsRequired: number | null;
66
+ allowedCollections?: {
67
+ ids: string[];
68
+ };
69
+ resolvedCollectionNames?: string[];
70
+ isEligible?: boolean;
71
+ applicableSubtotal?: number;
72
+ estimatedSavings?: number;
73
+ quantityThreshold?: number | null;
74
+ customCartProgressBarCriteria?: string;
75
+ }
76
+ export interface CouponSelectionData {
77
+ preCollectionBannerPrefixText: string;
78
+ preCollectionBannerSuffixText: string;
79
+ postCollectionBannerPrefixText: string;
80
+ postCollectionBannerSuffixText: string;
81
+ couponTextPrefix?: string;
82
+ couponTextSuffix?: string;
83
+ applyButtonText?: string;
84
+ }
85
+ export interface CartProps {
86
+ isOpen: boolean;
87
+ setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
88
+ backdrop?: boolean;
89
+ backgroundColor: string;
90
+ backgroundSubdued?: string;
91
+ tertiaryColor?: string;
92
+ tertiaryTextColor?: string;
93
+ exploreCTAColor: string;
94
+ emptyCartTitle: string;
95
+ emptyCartDescription?: string;
96
+ emptyCartButtons?: Array<{
97
+ title: string;
98
+ link: string;
99
+ }>;
100
+ checkoutFontSize: number | string;
101
+ cartTitle: string;
102
+ cartData?: any;
103
+ switchWidthVariant?: boolean;
104
+ addCartItem?: (product: any, quantity?: number, triggeredFrom?: string, freebieReplace?: boolean, productHandle?: string) => Promise<any>;
105
+ removeCartItem: (lineItemKey: string, triggeredFrom?: string, ytRequest?: boolean) => Promise<any>;
106
+ handleIncrement: (lineItemKey: string | number, newQuantity: number, properties?: {
107
+ [key: string]: string;
108
+ }) => Promise<any>;
109
+ handleDecrement: (lineItemKey: string | number, newQuantity?: number) => Promise<any>;
110
+ bundleProducts?: any;
111
+ showBundle?: boolean;
112
+ isUserSignedIn?: boolean;
113
+ loyaltyIcon?: string;
114
+ discountAmountOff?: number;
115
+ pointsToBeUsed?: number;
116
+ rewardMultiplier?: number;
117
+ redemptionMultiplier?: number;
118
+ removeDiscount?: () => Promise<any>;
119
+ applyDiscount?: () => Promise<any>;
120
+ discountApplied?: boolean;
121
+ joinNowFunction?: () => void;
122
+ checkoutFunction: (templateId?: number) => Promise<any>;
123
+ guestLoyaltyPercentage?: number;
124
+ showToggleButton?: boolean;
125
+ isDev?: boolean;
126
+ recProductsList?: any[];
127
+ showMultiStepProgressBar?: boolean;
128
+ cartCheckpoints?: Checkpoint[];
129
+ showCartLevelAltPay?: boolean;
130
+ redemptionRate: number;
131
+ pointsRewardRate: number;
132
+ exploreCtaRedirectLink?: string;
133
+ discountAmountApplied?: number;
134
+ minimumCartValue?: number;
135
+ discountInCheckoutButton?: boolean | string;
136
+ isStickyCheckout?: boolean;
137
+ handleCheckpointCrossed?: (checkpoint: Checkpoint, cartAmount: number) => Promise<any>;
138
+ customCartProgressBarCriteria?: string;
139
+ primaryTextColor?: string;
140
+ secondaryTextColor?: string;
141
+ themeColor?: string;
142
+ themeTextColor?: string;
143
+ checkoutButtonColor?: string;
144
+ ctaButtonBackgroundColor?: string;
145
+ ctaButtonTextColor?: string;
146
+ showProductRecsOnMobile?: boolean;
147
+ showProductRecsOnDesktop?: boolean;
148
+ productRecsTitleText?: string;
149
+ productRecsCtaButtonText?: string;
150
+ showGSTOption?: boolean;
151
+ gstNumber?: string;
152
+ companyName?: string;
153
+ applyGSTToCart?: (gstNumber: string, companyName: string) => Promise<any>;
154
+ showMOVForProgressTiers?: boolean;
155
+ freeProduct?: any;
156
+ showLoyaltyCta?: boolean;
157
+ freeProductAdjustedCartTotal?: number;
158
+ minimumOrderValueToAvailDiscount?: number;
159
+ signinCTAButtonVisible?: boolean;
160
+ cartSigninCTAMainText?: string;
161
+ showNoteOption?: boolean;
162
+ note?: string;
163
+ applyNoteToCart?: (note: string) => Promise<any>;
164
+ inlineCartOfferInfoText?: string;
165
+ inlineCartOfferInfoRedirectLink?: string;
166
+ cartOfferTermsAndConditionsText?: string;
167
+ showEditOptionOnProducts?: boolean;
168
+ getProductDetailsByVariantId?: (handle: string, variantId?: string) => Promise<any>;
169
+ onSetLoading?: (setLoadingFn: (isLoading: boolean, showLoader: boolean, showSkeletonLoader?: boolean, showLoyaltyCtaLoading?: boolean) => void) => void;
170
+ showVariantSelectionDropdownInProductRecs?: boolean;
171
+ originalCartSubtotal?: number;
172
+ freebieProductsInCart?: any;
173
+ currentTier?: number;
174
+ showFreebieClaim?: boolean;
175
+ addFreebieToCart?: (variantId: string) => Promise<void>;
176
+ freebiesInCart?: string[];
177
+ effectiveQuantityForProgressBar?: number;
178
+ productPercentageOffMapping: {
179
+ [variantId: string]: number;
180
+ };
181
+ removeFreebieFromCart?: (lineItemKey: string) => Promise<void>;
182
+ postalCodeList?: number[];
183
+ enableGeoLocationDeliveryRestriction?: boolean;
184
+ applyPostalCodeAndDeliverySlotToCart?: (deliveryType: string, postalCode?: string, deliverySlot?: string) => Promise<any>;
185
+ showDeleteOnFreebies?: boolean;
186
+ freebieCouponTemplates?: Checkpoint[];
187
+ freebieFlowCheckpoints?: Checkpoint[];
188
+ freebieClaimData?: freebieClaimInterface;
189
+ showStickyAddToCart?: boolean;
190
+ stickyCartLineItem?: any;
191
+ stickyCartCustomizationData?: stickyCartCustomizationDataProps;
192
+ stickyCartLineItemQuantity?: number;
193
+ postalCodeBasedItemTrackingParameter?: "specific-tags" | "all-products";
194
+ enableSlotPicker?: boolean;
195
+ deliveryHeaderTitle?: string;
196
+ deliveryAvailableText?: string;
197
+ deliveryNotAvailableText?: string;
198
+ giftWrapSetupData?: any;
199
+ giftWrapProductDetail?: any;
200
+ progressBarFreeProductIconType?: "tshirt" | "gift" | "box" | "cup";
201
+ addToStickyCart?: (variantId: string, quantity: number) => Promise<void>;
202
+ enableCustomCartOnCartPage?: boolean;
203
+ isCartPage?: boolean;
204
+ productRecsCardLayout: "horizontal" | "vertical";
205
+ productRecsCardListVariant: "scroll" | "carousel" | "vertical";
206
+ showCartTimer?: boolean;
207
+ showFreebieMilestone?: boolean;
208
+ showFloatingCart?: boolean;
209
+ floatingCartData?: FloatingCartDataProps;
210
+ cartTimerInMinutes?: number;
211
+ cartTimerCustomText?: string;
212
+ imageAspectSelector?: "square" | "portrait";
213
+ cartComponentsCornerType?: "rounded" | "sharp";
214
+ cartComponentsCornerRadius?: number;
215
+ cartOffersCarousalData?: CartOffersCarousalProps;
216
+ freebieMilestoneData?: freebieMilestoneProps;
217
+ cartOffersCarouselHeight?: number;
218
+ stickyBarBuyNowFunction?: (variantId: string, quantity: number) => Promise<void>;
219
+ gstSectionCustomizationData?: GSTSectionCustomizationProps;
220
+ noteSectionTitle?: string;
221
+ checkoutSectionMessage?: string;
222
+ checkoutSectionMessageRedirectLink?: string;
223
+ checkoutSectionMessageDisplay?: "ribbon" | "tag" | "bookmark";
224
+ showVariantSelectionDropdownInProductClaim?: boolean;
225
+ productClaimCtaButtonText?: string;
226
+ loyaltyDiscount?: LoyaltyDiscount | undefined;
227
+ brandTokenName?: string;
228
+ showDiscountOnMRP?: boolean;
229
+ prefixMessageText?: string;
230
+ suffixMessageText?: string;
231
+ successMessageText?: string;
232
+ toggleDecimal?: boolean;
233
+ disableCheckoutButton: boolean;
234
+ showEmptyCartRecommendations?: boolean;
235
+ emptyProductRecsTitleText?: string;
236
+ checkoutButtonBottomSpacing?: number;
237
+ applyCouponCode?: (code: string) => Promise<void>;
238
+ showApplyCoupon?: boolean;
239
+ enableConfetti?: boolean;
240
+ showCheckoutButtonPaymentIcons?: boolean;
241
+ showCouponOptions?: boolean;
242
+ rewardCoupons?: RewardCoupon[];
243
+ couponSelectionData?: CouponSelectionData;
244
+ comboBundleData?: BundlePayload;
245
+ comboBundleAddToCartFunction?: (selectedItemsSubtotal: number, variantIds?: string[], finalBundlePrice?: number, variantIdPriceMap?: {
246
+ variantId: string;
247
+ price: number;
248
+ }[]) => Promise<void>;
249
+ stealDealCheckpoints?: Checkpoint[];
250
+ stealDealProducts?: any[];
251
+ stealDealAddToCart?: (variantId: string, originalAllowedVariantIds?: string[]) => Promise<void>;
252
+ useCartShell?: boolean;
253
+ showTrustedBadge?: boolean;
254
+ trustedBadgeData?: trustedBadgeInterface;
255
+ drawerLayoutData?: DrawerLayout;
256
+ }
257
+ declare const Cart: React.FC<CartProps>;
258
+ export default Cart;
@@ -1,34 +1,34 @@
1
- import React from "react";
2
- import { CartProps, RewardCoupon } from "./Cart";
3
- import "./shared.scss";
4
- export interface DrawerLayout {
5
- headerIds?: string[];
6
- scroll?: {
7
- topIds?: string[];
8
- bottomIds?: string[];
9
- };
10
- footerIds?: string[];
11
- }
12
- interface CartDrawerProps extends CartProps {
13
- prefixMessageText?: string;
14
- suffixMessageText?: string;
15
- successMessageText?: string;
16
- switchWidthVariant?: boolean;
17
- toggleDecimal?: boolean;
18
- cartOffersCarouselHeight?: number;
19
- showEmptyCartRecommendations?: boolean;
20
- checkoutButtonBottomSpacing?: number;
21
- applyCouponCode?: (code: string) => Promise<void>;
22
- showApplyCoupon?: boolean;
23
- enableConfetti?: boolean;
24
- checkoutSectionMessageRedirectLink?: string;
25
- showCheckoutButtonPaymentIcons?: boolean;
26
- showCouponOptions?: boolean;
27
- rewardCoupons?: RewardCoupon[];
28
- useCartShell?: boolean;
29
- showTrustedBadge?: boolean;
30
- trustedBadgeData?: CartProps["trustedBadgeData"];
31
- drawerLayoutData?: DrawerLayout;
32
- }
33
- declare const CartDrawer: React.FC<CartDrawerProps>;
34
- export default CartDrawer;
1
+ import React from "react";
2
+ import { CartProps, RewardCoupon } from "./Cart";
3
+ import "./shared.scss";
4
+ export interface DrawerLayout {
5
+ headerIds?: string[];
6
+ scroll?: {
7
+ topIds?: string[];
8
+ bottomIds?: string[];
9
+ };
10
+ footerIds?: string[];
11
+ }
12
+ interface CartDrawerProps extends CartProps {
13
+ prefixMessageText?: string;
14
+ suffixMessageText?: string;
15
+ successMessageText?: string;
16
+ switchWidthVariant?: boolean;
17
+ toggleDecimal?: boolean;
18
+ cartOffersCarouselHeight?: number;
19
+ showEmptyCartRecommendations?: boolean;
20
+ checkoutButtonBottomSpacing?: number;
21
+ applyCouponCode?: (code: string) => Promise<void>;
22
+ showApplyCoupon?: boolean;
23
+ enableConfetti?: boolean;
24
+ checkoutSectionMessageRedirectLink?: string;
25
+ showCheckoutButtonPaymentIcons?: boolean;
26
+ showCouponOptions?: boolean;
27
+ rewardCoupons?: RewardCoupon[];
28
+ useCartShell?: boolean;
29
+ showTrustedBadge?: boolean;
30
+ trustedBadgeData?: CartProps["trustedBadgeData"];
31
+ drawerLayoutData?: DrawerLayout;
32
+ }
33
+ declare const CartDrawer: React.FC<CartDrawerProps>;
34
+ export default CartDrawer;