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