yt-uikit 0.10.13-progress-bar-new-fields.2 → 0.10.13

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 (155) hide show
  1. package/README.md +94 -94
  2. package/dist/esm/assets/confetti.d.ts +2 -2
  3. package/dist/esm/atoms/bundleBuilderProductDetailsAtom.d.ts +4 -4
  4. package/dist/esm/atoms/cartDataAtom.d.ts +3 -3
  5. package/dist/esm/atoms/cartLoadingAtom.d.ts +22 -22
  6. package/dist/esm/atoms/cartTimer.d.ts +2 -2
  7. package/dist/esm/atoms/dateAtom.d.ts +1 -1
  8. package/dist/esm/atoms/freebieClaimModalAtom.d.ts +7 -7
  9. package/dist/esm/atoms/giftWrap.d.ts +2 -2
  10. package/dist/esm/atoms/gstCompanyNameAtom.d.ts +1 -1
  11. package/dist/esm/atoms/gstInputAtom.d.ts +1 -1
  12. package/dist/esm/atoms/maxQtyErrorAtom.d.ts +3 -3
  13. package/dist/esm/atoms/multiClaimSelectionAtom.d.ts +25 -25
  14. package/dist/esm/atoms/noteInputAtom.d.ts +3 -3
  15. package/dist/esm/atoms/postalCodeAtom.d.ts +1 -1
  16. package/dist/esm/atoms/shippingAtom.d.ts +8 -8
  17. package/dist/esm/atoms/showGSTInputAtom.d.ts +1 -1
  18. package/dist/esm/atoms/variantSelectionModalAtom.d.ts +33 -33
  19. package/dist/esm/components/BundleBlock/Bundle.d.ts +458 -458
  20. package/dist/esm/components/BundleBlock/BundleBuilder/BundleBuilder.d.ts +50 -50
  21. package/dist/esm/components/BundleBlock/BundleBuilder/ResponsiveBgImage.d.ts +9 -9
  22. package/dist/esm/components/BundleBlock/BundleBuilder/SortAndFilter.d.ts +74 -74
  23. package/dist/esm/components/BundleBlock/BundleBuilder/VariantOptionsModal.d.ts +28 -28
  24. package/dist/esm/components/BundleBlock/BundleBuilder/bundleBuilder.style.d.ts +37 -37
  25. package/dist/esm/components/BundleBlock/BundleBuilderTracker/BundleBuilderTracker.d.ts +56 -56
  26. package/dist/esm/components/BundleBlock/BundleBuilderTracker/bundleBuilderTracker.style.d.ts +77 -77
  27. package/dist/esm/components/BundleBlock/BundleProductDetailsModal/BundleProductDetailsModal.d.ts +37 -37
  28. package/dist/esm/components/BundleBlock/BundleProductDetailsModal/bundleProductDetailsModal.style.d.ts +10 -10
  29. package/dist/esm/components/BundleBlock/CollectionBundle/CategoryFilter.d.ts +10 -10
  30. package/dist/esm/components/BundleBlock/CollectionBundle/ColllectionBundle.d.ts +133 -133
  31. package/dist/esm/components/BundleBlock/CollectionBundle/ProductDetailsModal.d.ts +16 -16
  32. package/dist/esm/components/BundleBlock/ComboBundle.d.ts +17 -17
  33. package/dist/esm/components/BundleBlock/FixedBundle/FixedBundle.d.ts +4 -4
  34. package/dist/esm/components/BundleBlock/FixedBundle/SeparateVariantOptions.d.ts +46 -46
  35. package/dist/esm/components/BundleBlock/FixedBundle/VariantSelectorModal.d.ts +22 -22
  36. package/dist/esm/components/BundleBlock/FixedBundle/fixedBundle.style.d.ts +81 -81
  37. package/dist/esm/components/BundleBlock/Loader.d.ts +5 -5
  38. package/dist/esm/components/BundleBlock/MixAndMatchBundle/MixAndMatchBundle.d.ts +9 -9
  39. package/dist/esm/components/BundleBlock/MixAndMatchBundle/mixAndMatchBundle.style.d.ts +86 -86
  40. package/dist/esm/components/BundleBlock/PersonalizationForm/PersonalizationForm.d.ts +35 -35
  41. package/dist/esm/components/BundleBlock/PersonalizationForm/PersonalizationFormModal.d.ts +24 -24
  42. package/dist/esm/components/BundleBlock/VolumeBundle/VolumeBundle.d.ts +27 -27
  43. package/dist/esm/components/BundleBlock/VolumeBundle/volumeBundle.style.d.ts +80 -80
  44. package/dist/esm/components/BundleBlock/index.d.ts +1 -1
  45. package/dist/esm/components/Cart/ApplyCoupon.d.ts +13 -13
  46. package/dist/esm/components/Cart/Bundle.d.ts +6 -6
  47. package/dist/esm/components/Cart/Cart.d.ts +259 -267
  48. package/dist/esm/components/Cart/CartDrawer.d.ts +34 -35
  49. package/dist/esm/components/Cart/CartOffersCarousel.d.ts +48 -48
  50. package/dist/esm/components/Cart/CartProductsList.d.ts +47 -47
  51. package/dist/esm/components/Cart/CartTimer.d.ts +8 -8
  52. package/dist/esm/components/Cart/CheckoutSection.d.ts +48 -48
  53. package/dist/esm/components/Cart/CouponSelection.d.ts +18 -18
  54. package/dist/esm/components/Cart/DatePicker.d.ts +10 -10
  55. package/dist/esm/components/Cart/EmptyCart.d.ts +34 -34
  56. package/dist/esm/components/Cart/FloatingCart.d.ts +24 -24
  57. package/dist/esm/components/Cart/FooterSections.d.ts +6 -6
  58. package/dist/esm/components/Cart/FreebieClaimManager.d.ts +18 -18
  59. package/dist/esm/components/Cart/FreebieClaimOverlay.d.ts +17 -17
  60. package/dist/esm/components/Cart/FreebieClaimOverlayCard.d.ts +10 -10
  61. package/dist/esm/components/Cart/FreebieClaimSection.d.ts +18 -18
  62. package/dist/esm/components/Cart/FreebieClaimSectionCard.d.ts +19 -19
  63. package/dist/esm/components/Cart/GSTSection.d.ts +15 -15
  64. package/dist/esm/components/Cart/GiftWrap.d.ts +15 -15
  65. package/dist/esm/components/Cart/InlineCartOfferInfoText.d.ts +10 -10
  66. package/dist/esm/components/Cart/LoyaltyAppliedCTA.d.ts +19 -19
  67. package/dist/esm/components/Cart/LoyaltyApplyCTA.d.ts +18 -18
  68. package/dist/esm/components/Cart/LoyaltyBadge.d.ts +10 -10
  69. package/dist/esm/components/Cart/LoyaltyGuestCTA.d.ts +17 -17
  70. package/dist/esm/components/Cart/MultiStepProgressBar/CheckpointConfetti.d.ts +11 -11
  71. package/dist/esm/components/Cart/MultiStepProgressBar/CheckpointIcon.d.ts +3 -3
  72. package/dist/esm/components/Cart/MultiStepProgressBar/CheckpointTooltip.d.ts +3 -3
  73. package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepIcon.d.ts +9 -9
  74. package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepProgressBar.d.ts +5 -5
  75. package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepProgressBar.styled.d.ts +45 -49
  76. package/dist/esm/components/Cart/MultiStepProgressBar/MultiStepUtils.d.ts +6 -6
  77. package/dist/esm/components/Cart/MultiStepProgressBar/MultiTierProgressBar.d.ts +4 -4
  78. package/dist/esm/components/Cart/MultiStepProgressBar/MutiTierNextRewardMessage.d.ts +3 -3
  79. package/dist/esm/components/Cart/MultiStepProgressBar/NextRewardMessage.d.ts +3 -3
  80. package/dist/esm/components/Cart/MultiStepProgressBar/SingleTierProgressBar.d.ts +4 -4
  81. package/dist/esm/components/Cart/MultiStepProgressBar/SingleTierProgressBar.styled.d.ts +22 -22
  82. package/dist/esm/components/Cart/MultiStepProgressBar/SingletTierNextRewardMessage.d.ts +3 -3
  83. package/dist/esm/components/Cart/MultiStepProgressBar/types.d.ts +55 -59
  84. package/dist/esm/components/Cart/NextFreebieRow.d.ts +21 -21
  85. package/dist/esm/components/Cart/NoteSection.d.ts +8 -8
  86. package/dist/esm/components/Cart/ProductCard.d.ts +30 -30
  87. package/dist/esm/components/Cart/ProductRecCard.d.ts +20 -20
  88. package/dist/esm/components/Cart/ProductRecList.d.ts +23 -23
  89. package/dist/esm/components/Cart/ProgressBarCartLoader.d.ts +7 -7
  90. package/dist/esm/components/Cart/QuantitySelector.d.ts +12 -12
  91. package/dist/esm/components/Cart/RegionSpecificDelivery.d.ts +17 -17
  92. package/dist/esm/components/Cart/RewardPointsPreview.d.ts +10 -10
  93. package/dist/esm/components/Cart/StandardDelivery.d.ts +11 -11
  94. package/dist/esm/components/Cart/StealDealSection.d.ts +15 -15
  95. package/dist/esm/components/Cart/StickyCart.d.ts +64 -64
  96. package/dist/esm/components/Cart/SubtotalSection.d.ts +13 -13
  97. package/dist/esm/components/Cart/VariantSelectionPopup/DesktopVariantPopup.d.ts +20 -20
  98. package/dist/esm/components/Cart/VariantSelectionPopup/DesktopVariantPopup.styled.d.ts +60 -60
  99. package/dist/esm/components/Cart/VariantSelectionPopup/MobileVariantPopover.d.ts +20 -20
  100. package/dist/esm/components/Cart/index.d.ts +1 -1
  101. package/dist/esm/components/Loyalty/ActiveSessionOverlay.d.ts +8 -8
  102. package/dist/esm/components/Loyalty/BubbleLauncher.d.ts +13 -13
  103. package/dist/esm/components/Loyalty/GuestDesktop.d.ts +5 -5
  104. package/dist/esm/components/Loyalty/GuestDesktopWithoutImage.d.ts +7 -7
  105. package/dist/esm/components/Loyalty/GuestMobile.d.ts +6 -6
  106. package/dist/esm/components/Loyalty/Loader.d.ts +10 -10
  107. package/dist/esm/components/Loyalty/LoyaltyProductCatalog.d.ts +68 -68
  108. package/dist/esm/components/Loyalty/LoyaltyProfile.d.ts +7 -7
  109. package/dist/esm/components/Loyalty/LoyaltyWidget.d.ts +6 -6
  110. package/dist/esm/components/Loyalty/OTPComponent.d.ts +20 -20
  111. package/dist/esm/components/Loyalty/PointEarnBadge.d.ts +15 -15
  112. package/dist/esm/components/Loyalty/RecentTransactions.d.ts +32 -32
  113. package/dist/esm/components/Loyalty/RewardsModal.d.ts +13 -13
  114. package/dist/esm/components/Loyalty/RibbonLauncher.d.ts +11 -11
  115. package/dist/esm/components/Loyalty/StickyLauncher.d.ts +13 -13
  116. package/dist/esm/components/Loyalty/StickyTextLauncher.d.ts +2 -2
  117. package/dist/esm/components/Loyalty/Toast.d.ts +7 -7
  118. package/dist/esm/components/Loyalty/VIPTiersScreen.d.ts +11 -11
  119. package/dist/esm/components/Loyalty/WTRCoupon.d.ts +13 -13
  120. package/dist/esm/components/Loyalty/WaysToEarn.d.ts +32 -32
  121. package/dist/esm/components/Loyalty/WaysToRedeem.d.ts +78 -78
  122. package/dist/esm/components/Loyalty/index.d.ts +7 -7
  123. package/dist/esm/components/Loyalty/loyaltyLauncher.d.ts +16 -16
  124. package/dist/esm/components/Loyalty/styles/ActiveSession.styles.d.ts +3 -3
  125. package/dist/esm/components/Loyalty/styles/DobPopup.styles.d.ts +3 -3
  126. package/dist/esm/components/Loyalty/styles/PointEarnBadge.styles.d.ts +3 -3
  127. package/dist/esm/components/Loyalty/styles/RecentTransactions.styles.d.ts +4 -4
  128. package/dist/esm/components/Loyalty/styles/VIPTiers.styles.d.ts +4 -4
  129. package/dist/esm/components/Loyalty/styles/WaysToRedeem.styles.d.ts +5 -5
  130. package/dist/esm/components/Loyalty/styles/shared.styles.d.ts +3 -3
  131. package/dist/esm/components/Loyalty/types.d.ts +369 -369
  132. package/dist/esm/components/LoyaltyPageBlock/LoyaltyPageBlock.d.ts +153 -153
  133. package/dist/esm/components/Nudge/LeadGenerationNudge.d.ts +15 -15
  134. package/dist/esm/components/Nudge/Nudge.d.ts +40 -40
  135. package/dist/esm/components/Nudge/index.d.ts +1 -1
  136. package/dist/esm/components/ProductOffersBlock/ProductOffersCoupon.d.ts +12 -12
  137. package/dist/esm/components/ProductOffersBlock/ProductOffersList.d.ts +12 -12
  138. package/dist/esm/components/ProductOffersBlock/ProductOffersTermsMobilePopover.d.ts +10 -10
  139. package/dist/esm/components/ProductOffersBlock/ProductOffersTermsPopup.d.ts +10 -10
  140. package/dist/esm/components/ProductOffersBlock/ProductsOffers.d.ts +42 -42
  141. package/dist/esm/components/SpinnerWheel/SpinnerWheel.d.ts +23 -23
  142. package/dist/esm/components/SpinnerWheel/WheelSection.d.ts +9 -9
  143. package/dist/esm/components/SpinnerWheel/index.d.ts +1 -1
  144. package/dist/esm/components/index.d.ts +14 -14
  145. package/dist/esm/index.d.ts +1 -1
  146. package/dist/esm/index.js +112 -113
  147. package/dist/esm/utils/converter.d.ts +2 -2
  148. package/dist/esm/utils/customVariantOptions.d.ts +20 -20
  149. package/dist/esm/utils/freebieProductUtils.d.ts +39 -39
  150. package/dist/esm/utils/freebieUtils.d.ts +11 -11
  151. package/dist/esm/utils/index.d.ts +14 -14
  152. package/package.json +98 -98
  153. package/dist/esm/atoms/variantChangeErrorAtom.d.ts +0 -3
  154. package/dist/esm/components/Cart/CustomSelect.d.ts +0 -19
  155. /package/dist/esm/{confetti-89678a6f.js → confetti-f3502561.js} +0 -0
@@ -1,458 +1,458 @@
1
- import React from "react";
2
- import "./bundle.scss";
3
- interface ShopifyCurrency {
4
- rate: number;
5
- active: string;
6
- }
7
- declare global {
8
- interface Window {
9
- Shopify?: {
10
- currency?: ShopifyCurrency;
11
- shop?: string;
12
- };
13
- }
14
- }
15
- type ProductImage = {
16
- url: string;
17
- height: number;
18
- width: number;
19
- altText?: string;
20
- };
21
- type ProductFeaturedMedia = {
22
- alt: string;
23
- preview: {
24
- image: {
25
- url: string;
26
- height?: number;
27
- width?: number;
28
- altText: string;
29
- };
30
- };
31
- };
32
- type ProductOption = {
33
- id: string;
34
- name: string;
35
- values: string[];
36
- };
37
- type CollectionNode = {
38
- node: {
39
- id: string;
40
- title: string;
41
- handle: string;
42
- };
43
- };
44
- export type VariantNode = {
45
- node: {
46
- id: string;
47
- price: string;
48
- compareAtPrice: string;
49
- title: string;
50
- displayName: string;
51
- image: ProductImage;
52
- availableForSale: boolean;
53
- inventoryQuantity: number;
54
- inventoryItem?: {
55
- tracked?: boolean;
56
- };
57
- inventoryPolicy?: "deny" | "continue";
58
- };
59
- };
60
- type SelectedVariantDetails = {
61
- id: string;
62
- price: string;
63
- compareAtPrice: string;
64
- title: string;
65
- displayName: string;
66
- image: ProductImage;
67
- availableForSale: boolean;
68
- inventoryQuantity: number;
69
- };
70
- export type VariantOptions = {
71
- shop: string;
72
- options: {
73
- name: string;
74
- type: "text" | "image" | "color";
75
- values: {
76
- name: string;
77
- value: string;
78
- }[];
79
- }[];
80
- createdAt: string;
81
- updatedAt: string;
82
- };
83
- export type ProductDetails = {
84
- id: string;
85
- title: string;
86
- handle: string;
87
- featuredMedia: ProductFeaturedMedia;
88
- status: "active" | "archived" | "draft" | "unlisted" | "";
89
- options: ProductOption[];
90
- onlineStoreUrl: string;
91
- tracksInventory?: boolean;
92
- publishedAt?: string | null;
93
- collections: {
94
- edges: CollectionNode[];
95
- };
96
- variants: {
97
- edges: VariantNode[];
98
- };
99
- shop: string;
100
- metafield?: {
101
- key: string;
102
- namespace: string;
103
- ownerType: string;
104
- value: string;
105
- id: string;
106
- jsonValue: string[];
107
- type: string;
108
- };
109
- descriptionHtml: string;
110
- media: {
111
- edges: {
112
- node: {
113
- alt: string;
114
- preview: {
115
- image: {
116
- altText: string;
117
- width?: number;
118
- height?: number;
119
- url: string;
120
- };
121
- };
122
- image: {
123
- altText: string;
124
- height: number;
125
- width: number;
126
- url: string;
127
- };
128
- };
129
- }[];
130
- };
131
- selectedVariant?: SelectedVariantDetails;
132
- rating?: {
133
- averageRating: number;
134
- ratingCount: number;
135
- };
136
- };
137
- export type ProductData = {
138
- productId: string;
139
- variantIds: string[];
140
- productDetails: ProductDetails;
141
- };
142
- type GeneralStyle = {
143
- primaryColor: string;
144
- primaryContrastColor: string;
145
- secondaryColor: string;
146
- secondaryContrastColor: string;
147
- imageAspectRatio: string;
148
- ctaBackgroundColor: string;
149
- ctaTextColor: string;
150
- ctaBorderColor: string;
151
- ctaShadowType: string;
152
- ctaPadding: string;
153
- ctaWidth: string;
154
- ctaBorderRadius: string;
155
- ctaHoverBackgroundColor: string;
156
- ctaHoverTextColor: string;
157
- customizeHoverState: boolean;
158
- checkoutPartner: string;
159
- redirectToPDP: boolean;
160
- restrictCOD: boolean;
161
- trackInventory: boolean;
162
- showOutOfStockProducts: boolean;
163
- outOfStockLabel: string;
164
- disabledButtonColor: string;
165
- storeCurrency: string;
166
- currencySymbol: string;
167
- discountPrefix: string;
168
- discountSuffix: string;
169
- addOrderTags: boolean;
170
- addOrderNotes: boolean;
171
- variantTitleSuffix: boolean;
172
- titleLength: string;
173
- showDecimalsInBundlePricing?: boolean;
174
- showPaymentIcons?: boolean;
175
- };
176
- type VolumeStyle = {
177
- addtoCartMethod: string;
178
- titleFontSize: string;
179
- subtitleFontSize: string;
180
- titleBackgroundColor: string;
181
- titleTextColor: string;
182
- verticalMargin: string;
183
- sectionBackgroundColor: string;
184
- cardStyle: string;
185
- discountBadgeVisibility: string;
186
- tierPriceType: "none" | "unit-price" | "tier-price";
187
- allowVariantSelection: string;
188
- variantSelectorType: string;
189
- ctaTitle: string;
190
- bundleRedirection: string;
191
- discountBadgeDisplay: string;
192
- discountDisplayType: string;
193
- freebieDisplayType?: "compact" | "detailed";
194
- showVariantOptionsLabel: boolean;
195
- };
196
- type ComboStyle = {
197
- productTitleFontSize: string;
198
- productDescriptionFontSize: string;
199
- descriptionTextColor: string;
200
- titleTextColor: string;
201
- verticalMargin: string;
202
- infoAlignment: string;
203
- ctaTitle: string;
204
- bundleRedirection: string;
205
- embedContentVisibility: boolean;
206
- mixAndMatchCardStyle: string;
207
- mixAndMatchVariantTypeSelector: string;
208
- comboCardStyle: string;
209
- comboVariantTypeSelector: string;
210
- selectedEmbedContentVisibilityOptions: string[];
211
- subProductsSectionVisibility: boolean;
212
- subProductsImageVisibility: boolean;
213
- subProductsProductTitleVisibility: boolean;
214
- subProductsProductPriceVisibility: boolean;
215
- discountBadgeVisibility?: boolean;
216
- discountBadgeDisplay?: "discount-on-compare" | "discount-on-price";
217
- discountDisplayType?: "percentage" | "amount";
218
- comboProductRatingsDisplay?: string;
219
- mixAndMatchProductRatingsDisplay?: string;
220
- };
221
- type ByobStyle = {
222
- titleFontSize: string;
223
- subtitleFontSize: string;
224
- titleBackgroundColor: string;
225
- titleTextColor: string;
226
- productTitleFontSize: string;
227
- showVariantTitleInCard: boolean;
228
- productVariantTitleType: "product-title" | "variant-title" | "variant-display-name";
229
- productTitleWrapLines: string;
230
- productCardDetailsAlignment: "left" | "center" | "right";
231
- sectionBackgroundColor: string;
232
- lazyLoadWidget: string;
233
- listingsGap: string;
234
- footerMargin: string;
235
- borderRadius: string;
236
- borderColor: string;
237
- cardBackgroundColor: string;
238
- shadowType: string;
239
- addToBundleCTAText: string;
240
- checkoutCTAText: string;
241
- variantSelectorType: string;
242
- primaryVariant: string;
243
- productsPriceVisibility: boolean;
244
- compareAtPriceVisibility: boolean;
245
- selectedProductsVisibility: boolean;
246
- bundleRedirection: string;
247
- enableConfetti: boolean;
248
- selectedItemVisibility: boolean;
249
- productTiersVisibility: boolean;
250
- tierNavigation: boolean;
251
- enableProductCategories: boolean;
252
- productCardCategoryVisibility: string;
253
- categoryFilterOnPage: string;
254
- productFiltersDisplay: "none" | "drawer" | "sidebar";
255
- filtersProvider: "based-on-products-data" | "search-and-discovery-app-sync";
256
- selectedFilterOptions: string[];
257
- productRatingsDisplay?: string;
258
- discountBadgeVisibility?: boolean;
259
- discountBadgeDisplay?: "discount-on-compare" | "discount-on-price";
260
- discountDisplayType?: string;
261
- };
262
- type FixedStyle = {
263
- titleFontSize: string;
264
- subtitleFontSize: string;
265
- titleBackgroundColor: string;
266
- titleTextColor: string;
267
- verticalMargin: string;
268
- sectionBackgroundColor: string;
269
- borderRadius: string;
270
- borderColor: string;
271
- cardBackgroundColor: string;
272
- shadowType: string;
273
- infoAlignment: string;
274
- ctaTitle: string;
275
- bundleRedirection: string;
276
- cardLayoutStyle: string;
277
- variantSelectorType: string;
278
- productsPriceVisibility: boolean;
279
- compareAtPriceVisibility: boolean;
280
- discountBadgeVisibility?: boolean;
281
- discountDisplayType?: string;
282
- discountBadgeDisplay?: "discount-on-compare" | "discount-on-price";
283
- productRatingsDisplay?: string;
284
- };
285
- export type Customizations = {
286
- shop?: string;
287
- general: GeneralStyle;
288
- byob: ByobStyle;
289
- fixedBundle: FixedStyle;
290
- volumeBundle: VolumeStyle;
291
- comboBundle: ComboStyle;
292
- createdAt?: string;
293
- updatedAt?: string;
294
- };
295
- export type ProductTier = {
296
- tier: number;
297
- title: string;
298
- minimumQuantity: number;
299
- isFixed?: boolean;
300
- isFreebieTier?: boolean;
301
- products: {
302
- productId: string;
303
- variantIds: string[];
304
- }[];
305
- };
306
- export type BundlePayload = {
307
- _id: string;
308
- showIndividualProductSelector: boolean;
309
- title?: string;
310
- subtitle?: string;
311
- products: ProductData[];
312
- freebieProducts?: ProductData[];
313
- percentageOff?: number;
314
- dealAmount?: number;
315
- amountOff?: number;
316
- type: "fixed" | "builder" | "volume" | "mixAndMatch" | "" | "combo" | "collection";
317
- minimumQuantity: number;
318
- showProductDetailsInTracker: boolean;
319
- coverImageUrl?: string;
320
- mobileCoverImageUrl?: string;
321
- titleSectionTextColor?: string;
322
- titleSectionBackgroundColor?: string;
323
- dealTextColor?: string;
324
- showBorder?: boolean;
325
- hideProductDetails?: boolean;
326
- cornerRadiusType?: "medium" | "high" | "";
327
- primaryBackgroundColorCta?: string;
328
- enableProgressBar?: boolean;
329
- enableSortAndFilter?: boolean;
330
- disableQuantitySelector?: boolean;
331
- disableInventoryTracking?: boolean;
332
- alignFixedBundleContent?: "left" | "right" | "center" | "";
333
- imageAspectType?: "portrait" | "square" | "";
334
- backgroundColorFixedBundleDiv?: string;
335
- canCustomizeFixedBundle?: boolean;
336
- primaryTextColorCta?: string;
337
- showVariants?: boolean;
338
- discountType?: string;
339
- showCta?: boolean;
340
- productCardBadgeText?: string;
341
- coverImageVerticalMargin?: string;
342
- builderTiers?: {
343
- type: string;
344
- offerTier?: {
345
- tier: number;
346
- minimumQuantity: number;
347
- discountValue: number;
348
- }[];
349
- productTier?: ProductTier[];
350
- };
351
- volumeTiers?: {
352
- isDefault: unknown;
353
- tier: number;
354
- minimumQuantity: number;
355
- title: string;
356
- subtitle: string;
357
- badgeTitle: string;
358
- discountValue: number;
359
- imageUrl?: string;
360
- freebieProductIds?: string[];
361
- }[];
362
- mixAndMatchTiers?: {
363
- tier: number;
364
- title: string;
365
- products: {
366
- productId: string;
367
- variantIds: string[];
368
- }[];
369
- }[];
370
- customizations: Customizations;
371
- variantOptions?: VariantOptions;
372
- storeCurrencyCode?: string;
373
- customStoreDetails?: {
374
- [key: string]: any;
375
- };
376
- customProductsQuantity?: number | null;
377
- reviewRatingType?: "none" | "ratingOnly" | "ratingAndReviewCount";
378
- appName?: string;
379
- pageHeader?: {
380
- title?: string;
381
- description?: string;
382
- customizePadding?: string;
383
- };
384
- personalizedForm?: {
385
- title?: string;
386
- sections?: {
387
- title: string;
388
- type: "text" | "image";
389
- fields: {
390
- title: string;
391
- }[];
392
- }[];
393
- };
394
- };
395
- export type EventNameCustom = "byob_checkout_cta" | "byob_add_to_bundle" | "block_visibility" | "bundle_add_to_cart";
396
- export type EventTypeCustom = "clicks" | "views";
397
- export type AnalyticsEventParams = {
398
- eventNameCustom: EventNameCustom;
399
- eventTypeCustom: EventTypeCustom;
400
- data: any;
401
- };
402
- export type CursorData = Record<number, {
403
- cursor: string;
404
- hasNext: boolean;
405
- }>;
406
- export type BundleProps = {
407
- bundle: BundlePayload;
408
- addToCartFunction?: (selectedItemsSubtotal: number, variantIds?: string[], finalBundlePrice?: number, variantIdPriceMap?: {
409
- variantId: string;
410
- price: number;
411
- }[], properties?: Record<string, string>, freebieProduct?: string[]) => Promise<void>;
412
- addCustomBundleToCart?: (e: any, formProperties?: Record<string, any>) => Promise<void>;
413
- selectedItems?: {
414
- variantId: string;
415
- product: ProductDetails;
416
- quantity: number;
417
- }[];
418
- setSelectedItems?: React.Dispatch<React.SetStateAction<{
419
- variantId: string;
420
- product: ProductDetails;
421
- quantity: number;
422
- }[]>>;
423
- bundleAddToCartLoading?: boolean;
424
- handleRemoveItem?: (variantId: string) => void;
425
- selectedItemsQuantity?: number;
426
- renderingOnPage?: boolean;
427
- bundleSubtotal?: {
428
- price: number;
429
- compareAtPrice: number;
430
- };
431
- bundleHeaderBackgroundColor?: string;
432
- currentProductId?: string;
433
- dispatchAnalyticsEvent?: (params: AnalyticsEventParams) => void;
434
- fetchStoreDetails?: () => Promise<any>;
435
- productsPagination?: {
436
- initialCursorData: CursorData;
437
- cursorData: CursorData;
438
- fetchFn: (filters?: any, bundleTier?: number, cursor?: string | null) => Promise<ProductData[]>;
439
- setCursorData: (cursorData: CursorData) => void;
440
- };
441
- };
442
- export declare const currencyPrice: (price: number | string | undefined) => string | undefined;
443
- export declare const getCurrencySymbol: (genSymbol: string, storeCurrencyCode?: string) => string;
444
- export declare const optimiseImage: (url: string, width?: number) => string;
445
- export declare const handleAddToBundle: (variantId: string, product: ProductDetails, quantity: number, selectedItems: {
446
- variantId: string;
447
- product: ProductDetails;
448
- quantity: number;
449
- tierIndex?: number | undefined;
450
- }[], setSelectedItems: React.Dispatch<React.SetStateAction<{
451
- variantId: string;
452
- product: ProductDetails;
453
- quantity: number;
454
- isFree?: boolean | undefined;
455
- tierIndex?: number | undefined;
456
- }[]>>, isFreebie?: boolean, tierIndex?: number) => void;
457
- declare const Bundle: React.FC<BundleProps>;
458
- export default Bundle;
1
+ import React from "react";
2
+ import "./bundle.scss";
3
+ interface ShopifyCurrency {
4
+ rate: number;
5
+ active: string;
6
+ }
7
+ declare global {
8
+ interface Window {
9
+ Shopify?: {
10
+ currency?: ShopifyCurrency;
11
+ shop?: string;
12
+ };
13
+ }
14
+ }
15
+ type ProductImage = {
16
+ url: string;
17
+ height: number;
18
+ width: number;
19
+ altText?: string;
20
+ };
21
+ type ProductFeaturedMedia = {
22
+ alt: string;
23
+ preview: {
24
+ image: {
25
+ url: string;
26
+ height?: number;
27
+ width?: number;
28
+ altText: string;
29
+ };
30
+ };
31
+ };
32
+ type ProductOption = {
33
+ id: string;
34
+ name: string;
35
+ values: string[];
36
+ };
37
+ type CollectionNode = {
38
+ node: {
39
+ id: string;
40
+ title: string;
41
+ handle: string;
42
+ };
43
+ };
44
+ export type VariantNode = {
45
+ node: {
46
+ id: string;
47
+ price: string;
48
+ compareAtPrice: string;
49
+ title: string;
50
+ displayName: string;
51
+ image: ProductImage;
52
+ availableForSale: boolean;
53
+ inventoryQuantity: number;
54
+ inventoryItem?: {
55
+ tracked?: boolean;
56
+ };
57
+ inventoryPolicy?: "deny" | "continue";
58
+ };
59
+ };
60
+ type SelectedVariantDetails = {
61
+ id: string;
62
+ price: string;
63
+ compareAtPrice: string;
64
+ title: string;
65
+ displayName: string;
66
+ image: ProductImage;
67
+ availableForSale: boolean;
68
+ inventoryQuantity: number;
69
+ };
70
+ export type VariantOptions = {
71
+ shop: string;
72
+ options: {
73
+ name: string;
74
+ type: "text" | "image" | "color";
75
+ values: {
76
+ name: string;
77
+ value: string;
78
+ }[];
79
+ }[];
80
+ createdAt: string;
81
+ updatedAt: string;
82
+ };
83
+ export type ProductDetails = {
84
+ id: string;
85
+ title: string;
86
+ handle: string;
87
+ featuredMedia: ProductFeaturedMedia;
88
+ status: "active" | "archived" | "draft" | "unlisted" | "";
89
+ options: ProductOption[];
90
+ onlineStoreUrl: string;
91
+ tracksInventory?: boolean;
92
+ publishedAt?: string | null;
93
+ collections: {
94
+ edges: CollectionNode[];
95
+ };
96
+ variants: {
97
+ edges: VariantNode[];
98
+ };
99
+ shop: string;
100
+ metafield?: {
101
+ key: string;
102
+ namespace: string;
103
+ ownerType: string;
104
+ value: string;
105
+ id: string;
106
+ jsonValue: string[];
107
+ type: string;
108
+ };
109
+ descriptionHtml: string;
110
+ media: {
111
+ edges: {
112
+ node: {
113
+ alt: string;
114
+ preview: {
115
+ image: {
116
+ altText: string;
117
+ width?: number;
118
+ height?: number;
119
+ url: string;
120
+ };
121
+ };
122
+ image: {
123
+ altText: string;
124
+ height: number;
125
+ width: number;
126
+ url: string;
127
+ };
128
+ };
129
+ }[];
130
+ };
131
+ selectedVariant?: SelectedVariantDetails;
132
+ rating?: {
133
+ averageRating: number;
134
+ ratingCount: number;
135
+ };
136
+ };
137
+ export type ProductData = {
138
+ productId: string;
139
+ variantIds: string[];
140
+ productDetails: ProductDetails;
141
+ };
142
+ type GeneralStyle = {
143
+ primaryColor: string;
144
+ primaryContrastColor: string;
145
+ secondaryColor: string;
146
+ secondaryContrastColor: string;
147
+ imageAspectRatio: string;
148
+ ctaBackgroundColor: string;
149
+ ctaTextColor: string;
150
+ ctaBorderColor: string;
151
+ ctaShadowType: string;
152
+ ctaPadding: string;
153
+ ctaWidth: string;
154
+ ctaBorderRadius: string;
155
+ ctaHoverBackgroundColor: string;
156
+ ctaHoverTextColor: string;
157
+ customizeHoverState: boolean;
158
+ checkoutPartner: string;
159
+ redirectToPDP: boolean;
160
+ restrictCOD: boolean;
161
+ trackInventory: boolean;
162
+ showOutOfStockProducts: boolean;
163
+ outOfStockLabel: string;
164
+ disabledButtonColor: string;
165
+ storeCurrency: string;
166
+ currencySymbol: string;
167
+ discountPrefix: string;
168
+ discountSuffix: string;
169
+ addOrderTags: boolean;
170
+ addOrderNotes: boolean;
171
+ variantTitleSuffix: boolean;
172
+ titleLength: string;
173
+ showDecimalsInBundlePricing?: boolean;
174
+ showPaymentIcons?: boolean;
175
+ };
176
+ type VolumeStyle = {
177
+ addtoCartMethod: string;
178
+ titleFontSize: string;
179
+ subtitleFontSize: string;
180
+ titleBackgroundColor: string;
181
+ titleTextColor: string;
182
+ verticalMargin: string;
183
+ sectionBackgroundColor: string;
184
+ cardStyle: string;
185
+ discountBadgeVisibility: string;
186
+ tierPriceType: "none" | "unit-price" | "tier-price";
187
+ allowVariantSelection: string;
188
+ variantSelectorType: string;
189
+ ctaTitle: string;
190
+ bundleRedirection: string;
191
+ discountBadgeDisplay: string;
192
+ discountDisplayType: string;
193
+ freebieDisplayType?: "compact" | "detailed";
194
+ showVariantOptionsLabel: boolean;
195
+ };
196
+ type ComboStyle = {
197
+ productTitleFontSize: string;
198
+ productDescriptionFontSize: string;
199
+ descriptionTextColor: string;
200
+ titleTextColor: string;
201
+ verticalMargin: string;
202
+ infoAlignment: string;
203
+ ctaTitle: string;
204
+ bundleRedirection: string;
205
+ embedContentVisibility: boolean;
206
+ mixAndMatchCardStyle: string;
207
+ mixAndMatchVariantTypeSelector: string;
208
+ comboCardStyle: string;
209
+ comboVariantTypeSelector: string;
210
+ selectedEmbedContentVisibilityOptions: string[];
211
+ subProductsSectionVisibility: boolean;
212
+ subProductsImageVisibility: boolean;
213
+ subProductsProductTitleVisibility: boolean;
214
+ subProductsProductPriceVisibility: boolean;
215
+ discountBadgeVisibility?: boolean;
216
+ discountBadgeDisplay?: "discount-on-compare" | "discount-on-price";
217
+ discountDisplayType?: "percentage" | "amount";
218
+ comboProductRatingsDisplay?: string;
219
+ mixAndMatchProductRatingsDisplay?: string;
220
+ };
221
+ type ByobStyle = {
222
+ titleFontSize: string;
223
+ subtitleFontSize: string;
224
+ titleBackgroundColor: string;
225
+ titleTextColor: string;
226
+ productTitleFontSize: string;
227
+ showVariantTitleInCard: boolean;
228
+ productVariantTitleType: "product-title" | "variant-title" | "variant-display-name";
229
+ productTitleWrapLines: string;
230
+ productCardDetailsAlignment: "left" | "center" | "right";
231
+ sectionBackgroundColor: string;
232
+ lazyLoadWidget: string;
233
+ listingsGap: string;
234
+ footerMargin: string;
235
+ borderRadius: string;
236
+ borderColor: string;
237
+ cardBackgroundColor: string;
238
+ shadowType: string;
239
+ addToBundleCTAText: string;
240
+ checkoutCTAText: string;
241
+ variantSelectorType: string;
242
+ primaryVariant: string;
243
+ productsPriceVisibility: boolean;
244
+ compareAtPriceVisibility: boolean;
245
+ selectedProductsVisibility: boolean;
246
+ bundleRedirection: string;
247
+ enableConfetti: boolean;
248
+ selectedItemVisibility: boolean;
249
+ productTiersVisibility: boolean;
250
+ tierNavigation: boolean;
251
+ enableProductCategories: boolean;
252
+ productCardCategoryVisibility: string;
253
+ categoryFilterOnPage: string;
254
+ productFiltersDisplay: "none" | "drawer" | "sidebar";
255
+ filtersProvider: "based-on-products-data" | "search-and-discovery-app-sync";
256
+ selectedFilterOptions: string[];
257
+ productRatingsDisplay?: string;
258
+ discountBadgeVisibility?: boolean;
259
+ discountBadgeDisplay?: "discount-on-compare" | "discount-on-price";
260
+ discountDisplayType?: string;
261
+ };
262
+ type FixedStyle = {
263
+ titleFontSize: string;
264
+ subtitleFontSize: string;
265
+ titleBackgroundColor: string;
266
+ titleTextColor: string;
267
+ verticalMargin: string;
268
+ sectionBackgroundColor: string;
269
+ borderRadius: string;
270
+ borderColor: string;
271
+ cardBackgroundColor: string;
272
+ shadowType: string;
273
+ infoAlignment: string;
274
+ ctaTitle: string;
275
+ bundleRedirection: string;
276
+ cardLayoutStyle: string;
277
+ variantSelectorType: string;
278
+ productsPriceVisibility: boolean;
279
+ compareAtPriceVisibility: boolean;
280
+ discountBadgeVisibility?: boolean;
281
+ discountDisplayType?: string;
282
+ discountBadgeDisplay?: "discount-on-compare" | "discount-on-price";
283
+ productRatingsDisplay?: string;
284
+ };
285
+ export type Customizations = {
286
+ shop?: string;
287
+ general: GeneralStyle;
288
+ byob: ByobStyle;
289
+ fixedBundle: FixedStyle;
290
+ volumeBundle: VolumeStyle;
291
+ comboBundle: ComboStyle;
292
+ createdAt?: string;
293
+ updatedAt?: string;
294
+ };
295
+ export type ProductTier = {
296
+ tier: number;
297
+ title: string;
298
+ minimumQuantity: number;
299
+ isFixed?: boolean;
300
+ isFreebieTier?: boolean;
301
+ products: {
302
+ productId: string;
303
+ variantIds: string[];
304
+ }[];
305
+ };
306
+ export type BundlePayload = {
307
+ _id: string;
308
+ showIndividualProductSelector: boolean;
309
+ title?: string;
310
+ subtitle?: string;
311
+ products: ProductData[];
312
+ freebieProducts?: ProductData[];
313
+ percentageOff?: number;
314
+ dealAmount?: number;
315
+ amountOff?: number;
316
+ type: "fixed" | "builder" | "volume" | "mixAndMatch" | "" | "combo" | "collection";
317
+ minimumQuantity: number;
318
+ showProductDetailsInTracker: boolean;
319
+ coverImageUrl?: string;
320
+ mobileCoverImageUrl?: string;
321
+ titleSectionTextColor?: string;
322
+ titleSectionBackgroundColor?: string;
323
+ dealTextColor?: string;
324
+ showBorder?: boolean;
325
+ hideProductDetails?: boolean;
326
+ cornerRadiusType?: "medium" | "high" | "";
327
+ primaryBackgroundColorCta?: string;
328
+ enableProgressBar?: boolean;
329
+ enableSortAndFilter?: boolean;
330
+ disableQuantitySelector?: boolean;
331
+ disableInventoryTracking?: boolean;
332
+ alignFixedBundleContent?: "left" | "right" | "center" | "";
333
+ imageAspectType?: "portrait" | "square" | "";
334
+ backgroundColorFixedBundleDiv?: string;
335
+ canCustomizeFixedBundle?: boolean;
336
+ primaryTextColorCta?: string;
337
+ showVariants?: boolean;
338
+ discountType?: string;
339
+ showCta?: boolean;
340
+ productCardBadgeText?: string;
341
+ coverImageVerticalMargin?: string;
342
+ builderTiers?: {
343
+ type: string;
344
+ offerTier?: {
345
+ tier: number;
346
+ minimumQuantity: number;
347
+ discountValue: number;
348
+ }[];
349
+ productTier?: ProductTier[];
350
+ };
351
+ volumeTiers?: {
352
+ isDefault: unknown;
353
+ tier: number;
354
+ minimumQuantity: number;
355
+ title: string;
356
+ subtitle: string;
357
+ badgeTitle: string;
358
+ discountValue: number;
359
+ imageUrl?: string;
360
+ freebieProductIds?: string[];
361
+ }[];
362
+ mixAndMatchTiers?: {
363
+ tier: number;
364
+ title: string;
365
+ products: {
366
+ productId: string;
367
+ variantIds: string[];
368
+ }[];
369
+ }[];
370
+ customizations: Customizations;
371
+ variantOptions?: VariantOptions;
372
+ storeCurrencyCode?: string;
373
+ customStoreDetails?: {
374
+ [key: string]: any;
375
+ };
376
+ customProductsQuantity?: number | null;
377
+ reviewRatingType?: "none" | "ratingOnly" | "ratingAndReviewCount";
378
+ appName?: string;
379
+ pageHeader?: {
380
+ title?: string;
381
+ description?: string;
382
+ customizePadding?: string;
383
+ };
384
+ personalizedForm?: {
385
+ title?: string;
386
+ sections?: {
387
+ title: string;
388
+ type: "text" | "image";
389
+ fields: {
390
+ title: string;
391
+ }[];
392
+ }[];
393
+ };
394
+ };
395
+ export type EventNameCustom = "byob_checkout_cta" | "byob_add_to_bundle" | "block_visibility" | "bundle_add_to_cart";
396
+ export type EventTypeCustom = "clicks" | "views";
397
+ export type AnalyticsEventParams = {
398
+ eventNameCustom: EventNameCustom;
399
+ eventTypeCustom: EventTypeCustom;
400
+ data: any;
401
+ };
402
+ export type CursorData = Record<number, {
403
+ cursor: string;
404
+ hasNext: boolean;
405
+ }>;
406
+ export type BundleProps = {
407
+ bundle: BundlePayload;
408
+ addToCartFunction?: (selectedItemsSubtotal: number, variantIds?: string[], finalBundlePrice?: number, variantIdPriceMap?: {
409
+ variantId: string;
410
+ price: number;
411
+ }[], properties?: Record<string, string>, freebieProduct?: string[]) => Promise<void>;
412
+ addCustomBundleToCart?: (e: any, formProperties?: Record<string, any>) => Promise<void>;
413
+ selectedItems?: {
414
+ variantId: string;
415
+ product: ProductDetails;
416
+ quantity: number;
417
+ }[];
418
+ setSelectedItems?: React.Dispatch<React.SetStateAction<{
419
+ variantId: string;
420
+ product: ProductDetails;
421
+ quantity: number;
422
+ }[]>>;
423
+ bundleAddToCartLoading?: boolean;
424
+ handleRemoveItem?: (variantId: string) => void;
425
+ selectedItemsQuantity?: number;
426
+ renderingOnPage?: boolean;
427
+ bundleSubtotal?: {
428
+ price: number;
429
+ compareAtPrice: number;
430
+ };
431
+ bundleHeaderBackgroundColor?: string;
432
+ currentProductId?: string;
433
+ dispatchAnalyticsEvent?: (params: AnalyticsEventParams) => void;
434
+ fetchStoreDetails?: () => Promise<any>;
435
+ productsPagination?: {
436
+ initialCursorData: CursorData;
437
+ cursorData: CursorData;
438
+ fetchFn: (filters?: any, bundleTier?: number, cursor?: string | null) => Promise<ProductData[]>;
439
+ setCursorData: (cursorData: CursorData) => void;
440
+ };
441
+ };
442
+ export declare const currencyPrice: (price: number | string | undefined) => string | undefined;
443
+ export declare const getCurrencySymbol: (genSymbol: string, storeCurrencyCode?: string) => string;
444
+ export declare const optimiseImage: (url: string, width?: number) => string;
445
+ export declare const handleAddToBundle: (variantId: string, product: ProductDetails, quantity: number, selectedItems: {
446
+ variantId: string;
447
+ product: ProductDetails;
448
+ quantity: number;
449
+ tierIndex?: number | undefined;
450
+ }[], setSelectedItems: React.Dispatch<React.SetStateAction<{
451
+ variantId: string;
452
+ product: ProductDetails;
453
+ quantity: number;
454
+ isFree?: boolean | undefined;
455
+ tierIndex?: number | undefined;
456
+ }[]>>, isFreebie?: boolean, tierIndex?: number) => void;
457
+ declare const Bundle: React.FC<BundleProps>;
458
+ export default Bundle;