@wikala/spmkt 2.31.1 → 3.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/MIGRATION_GUIDE.md +261 -0
  2. package/api/product.js +1 -0
  3. package/api/request.js +9 -4
  4. package/api/user.js +1 -1
  5. package/components/Account/AccountDashboard.vue +101 -101
  6. package/components/Account/AccountStore.js +57 -31
  7. package/components/Account/AffiliateReport.vue +56 -60
  8. package/components/Account/{OrderDetail.vue → Orders/OrderDetail.vue} +44 -30
  9. package/components/Account/Orders/Orders.vue +124 -0
  10. package/components/Account/{AccountSettings.vue → Settings/AccountSettings.vue} +4 -4
  11. package/components/Account/Settings/ChangeEmail.vue +136 -0
  12. package/components/Account/Settings/ChangeName.vue +82 -0
  13. package/components/Account/Settings/ChangePassword.vue +91 -0
  14. package/components/Address/Address.vue +38 -57
  15. package/components/Address/AddressBook.vue +77 -57
  16. package/components/Address/AddressSelect.vue +94 -87
  17. package/components/Address/Edit.vue +253 -265
  18. package/components/Address/PostalCode.vue +22 -21
  19. package/components/AgeGate.vue +11 -5
  20. package/components/Auth/Login.vue +62 -44
  21. package/components/Auth/Register.vue +82 -60
  22. package/components/Auth/ResetPassword.vue +45 -30
  23. package/components/Cart/AgeVerification/AgeChecker.vue +3 -3
  24. package/components/Cart/CartBadge.vue +15 -4
  25. package/components/Cart/CartBox.vue +19 -11
  26. package/components/Cart/CartItem.vue +3 -3
  27. package/components/Cart/CartMode.vue +6 -5
  28. package/components/Cart/CartPreview.vue +24 -18
  29. package/components/Cart/CreditCard/Everyware.vue +10 -10
  30. package/components/Cart/CreditCard/ExtendedCreditCard.vue +5 -5
  31. package/components/Cart/CreditCard/SquarePay.vue +18 -16
  32. package/components/Cart/CreditCard/StandardCreditCard.vue +9 -9
  33. package/components/Cart/Delivery/Delivery.vue +16 -12
  34. package/components/Cart/Delivery/DeliveryAddress.vue +1 -1
  35. package/components/Cart/Delivery/DeliveryMethods.vue +1 -1
  36. package/components/Cart/Delivery/DeliveryOptions.vue +15 -9
  37. package/components/Cart/Delivery/DeliveryTypes.vue +8 -5
  38. package/components/Cart/Delivery/ReservationSlots.vue +14 -8
  39. package/components/Cart/Disclaimer.vue +1 -1
  40. package/components/Cart/OrderConfirmation.vue +1 -1
  41. package/components/Cart/Payment/Payment.vue +37 -33
  42. package/components/Cart/Payment/PaymentMethods.vue +6 -4
  43. package/components/Cart/ReviewAndSubmit.vue +9 -7
  44. package/components/Cart/ShoppingCart.vue +42 -31
  45. package/components/Cart/Store/actions.js +1 -1
  46. package/components/Cart/Store/getters.js +2 -1
  47. package/components/Cart/Store/index.js +1 -1
  48. package/components/Cart/Store/mutations.js +7 -5
  49. package/components/Cart/UserIdentity.vue +1 -1
  50. package/components/Category/CategoryFilter.vue +128 -114
  51. package/components/Category/CategorySort.vue +44 -32
  52. package/components/Category/LoadMore.vue +39 -23
  53. package/components/DeliverTo.vue +10 -15
  54. package/components/DeliveryNotice.vue +72 -68
  55. package/components/DobInput.vue +23 -23
  56. package/components/Gmaps/GmapsAutocomplete.vue +139 -78
  57. package/components/Gmaps/GmapsLocations.vue +1 -1
  58. package/components/Gmaps/GmapsSingleLocation.vue +121 -87
  59. package/components/ModalContainer/ModalContainer.vue +12 -9
  60. package/components/ModalContainer/index.js +61 -18
  61. package/components/Product/AddToCart.vue +237 -221
  62. package/components/Product/BoxAddToCart.vue +114 -86
  63. package/components/Product/Compare.vue +68 -48
  64. package/components/Product/CompareBox.vue +128 -123
  65. package/components/Product/Lookup.vue +92 -65
  66. package/components/Product/Photo.vue +105 -66
  67. package/components/Product/Price.vue +64 -43
  68. package/components/Product/ProductAutocomplete.vue +52 -57
  69. package/components/Product/ProductBox.vue +61 -38
  70. package/components/Product/ProductImages.vue +83 -86
  71. package/components/Product/Quantity.vue +115 -53
  72. package/components/Product/QuickView.vue +52 -45
  73. package/components/Product/RelatedProducts.vue +88 -23
  74. package/components/Product/SKU.vue +27 -8
  75. package/components/Product/Variants.vue +335 -341
  76. package/components/Product/reviews-questions/ProductQuestions.vue +226 -198
  77. package/components/Product/reviews-questions/ProductReviews.vue +122 -107
  78. package/components/Product/reviews-questions/Review.vue +54 -59
  79. package/components/Product/reviews-questions/ReviewForm.vue +222 -170
  80. package/components/Product/reviews-questions/ReviewImages.vue +197 -216
  81. package/components/Product/reviews-questions/Vote.vue +83 -57
  82. package/components/QuantityInput.vue +18 -8
  83. package/components/RangeInput.vue +15 -8
  84. package/components/Recaptcha.vue +8 -1
  85. package/components/SelectShippingCountry.vue +81 -62
  86. package/components/TimedOffer.vue +59 -74
  87. package/composables/globals.js +53 -0
  88. package/config.js +5 -2
  89. package/index.js +41 -10
  90. package/install.js +75 -0
  91. package/locales/en.json +2 -1
  92. package/locales/sr.json +2 -1
  93. package/package.json +43 -30
  94. package/utils/directives.js +28 -45
  95. package/utils/event-bus.js +56 -0
  96. package/utils/filters.js +24 -7
  97. package/utils/{gmaps.js → google/gmaps.js} +43 -10
  98. package/utils/{google-analytics-eec.js → google/google-analytics-eec.js} +7 -7
  99. package/babel.config.js +0 -5
  100. package/components/Account/ChangeEmail.vue +0 -133
  101. package/components/Account/ChangeName.vue +0 -92
  102. package/components/Account/ChangePassword.vue +0 -94
  103. package/components/Account/CreditCards.vue +0 -18
  104. package/components/Account/Orders.vue +0 -110
  105. package/components/Account/Settings.vue +0 -18
  106. package/components/Cart/Delivery/DeliveryAddressGuest.spec.js +0 -128
  107. package/components/Cart/Delivery/DeliveryTypes.spec.js +0 -83
  108. package/components/Cart/PCIBadge/SecurityMetrics.vue +0 -11
  109. package/components/Instagram.vue +0 -49
  110. package/components/ProductImageModal.vue +0 -41
  111. package/jest.config.js +0 -16
  112. package/test/e2e/.babelrc.js +0 -8
  113. package/test/e2e/.eslintrc.js +0 -11
  114. package/test/e2e/accAuth.spec.js +0 -64
  115. package/test/e2e/ageGate.spec.js +0 -26
  116. package/test/e2e/checkout.spec.js +0 -106
  117. package/test/e2e/compare.spec.js +0 -52
  118. package/test/e2e/config/data.js +0 -21
  119. package/test/e2e/config/routes.js +0 -11
  120. package/test/e2e/region.spec.js +0 -46
  121. package/test/e2e/search.spec.js +0 -32
  122. package/tests/vueBuefy.js +0 -4
  123. package/tsconfig.json +0 -8
@@ -14,255 +14,271 @@
14
14
  </div>
15
15
  </template>
16
16
 
17
- <script>
18
- import config from '../../config'
17
+ <script setup>
18
+ import { ref, computed, onMounted, onBeforeUnmount, nextTick, getCurrentInstance } from 'vue'
19
+ import { useBuefy, useBus, useMq, useT } from '../../composables/globals'
19
20
  import _ from 'underscore'
20
21
  import animateCSS from '../../utils/animate'
21
- import GoogleAnalyticsEEC from '../../utils/google-analytics-eec.js'
22
+ import GoogleAnalyticsEEC from '../../utils/google/google-analytics-eec.js'
23
+ import { Cart } from '../../api'
24
+ import Quantity from './Quantity.vue'
22
25
 
23
- import { request, Cart } from '../../api'
26
+ defineOptions({ name: 'AddToCart' })
24
27
 
25
- import Quantity from './Quantity'
26
-
27
- export default {
28
- name: 'AddToCart',
29
- components: { Quantity },
30
-
31
- props: {
32
- inStock: {
33
- type: Boolean,
34
- default: true
35
- },
36
- quantityEnabled: {
37
- type: Boolean,
38
- default: false
39
- },
40
- buyNowEnabled: {
41
- type: Boolean,
42
- default: false
43
- },
44
- product: {
45
- type: Object,
46
- default: function () {
47
- return {}
48
- }
49
- }
28
+ const props = defineProps({
29
+ inStock: {
30
+ type: Boolean,
31
+ default: true
50
32
  },
51
-
52
- data() {
53
- return {
54
- loadingAddToCart: false,
55
- loadingBuyNow: false,
56
- variantIds: [],
57
- selectedVariant: null,
58
- mode: 'add',
59
- product_id: '',
60
- qty: 1,
61
- submitEnabled: true,
62
- variantModalActive: false
63
- }
33
+ quantityEnabled: {
34
+ type: Boolean,
35
+ default: false
36
+ },
37
+ buyNowEnabled: {
38
+ type: Boolean,
39
+ default: false
64
40
  },
41
+ product: {
42
+ type: Object,
43
+ default: () => ({})
44
+ }
45
+ })
65
46
 
66
- methods: {
67
- eecProduct() {
68
- let eecProduct = {
69
- item_id: this.product.id,
70
- item_name: this.product.name,
71
- price: this.product.price,
72
- item_brand: this.product.brand ? this.product.brand.name : '',
73
- item_category: this.product?.category?.path.startsWith('/') ? this.product?.category?.path.substr(1) : this.product?.category?.path,
74
- quantity: parseInt(this.qty)
75
- }
76
- if (this.selectedVariant) {
77
- eecProduct = {
78
- item_id: this.product.id, //this.selectedVariant.id
79
- item_name: this.product.name, //this.product.name + ' - ' + _.pluck(this.selectedVariant.options, 'value').join(', '),
80
- price: this.selectedVariant.price,
81
- item_brand: this.product.brand ? this.product.brand.name : '',
82
- item_category: this.product?.category?.path.startsWith('/') ? this.product?.category?.path.substr(1) : this.product?.category?.path,
83
- item_variant: _.pluck(this.selectedVariant.options, 'value').join(', '),
84
- quantity: parseInt(this.qty)
85
- }
86
- }
87
- //console.log('eecProduct ', eecProduct)
88
- return eecProduct
89
- },
47
+ const emit = defineEmits(['success', 'update'])
90
48
 
91
- productDetails() {
92
- let product = this.eecProduct()
93
- product.image_url = this.product.images && this.product.images[0] ? this.product.images[0].url : ''
94
- if (this.selectedVariant) {
95
- let variantImage = _.findWhere(this.product.images, { id: this.selectedVariant.default_image_id })
96
- product.item_id = this.selectedVariant.id
97
- product.item_name += ' - ' + _.pluck(this.selectedVariant.options, 'value').join(', ')
98
- product.image_url = variantImage?.url
99
- }
100
- return product
101
- },
49
+ // Get global properties and injections
50
+ const instance = getCurrentInstance()
51
+ const $bus = useBus()
52
+ const mq = useMq()
53
+ const $buefy = useBuefy()
54
+ const { t: $t } = useT()
102
55
 
103
- async updateCart() {
104
- try {
105
- let response = await Cart.update({
106
- mode: this.mode,
107
- id: this.product_id,
108
- qty: this.qty
109
- })
110
- //console.log(response.data)
111
- if (response.data) {
112
- this.$bus.$emit('updateCart', response.data)
113
- } else {
114
- throw new Error(this.$t('cart.updateCartErrorUnknown'))
115
- }
116
- return response.data
117
- } catch (error) {
118
- if (!error.message) {
119
- error.message = this.$t('cart.updateCartError', error.status)
120
- }
121
- this.$buefy.dialog.alert({
122
- title: this.$t('global.error'),
123
- message: error.message,
124
- confirmText: 'OK'
125
- })
126
- } finally {
127
- this.loadingAddToCart = false
128
- this.loadingBuyNow = false
129
- }
130
- },
56
+ // Reactive state
57
+ const loadingAddToCart = ref(false)
58
+ const loadingBuyNow = ref(false)
59
+ const variantIds = ref([])
60
+ const selectedVariant = ref(null)
61
+ const mode = ref('add')
62
+ const product_id = ref('')
63
+ const qty = ref(1)
64
+ const submitEnabled = ref(true)
65
+ const variantModalActive = ref(false)
131
66
 
132
- variantSelected() {
133
- this.variantModalActive = false
134
- //console.log('variant ids ', this.variantIds, 'product ', this.product_id)
135
- if (!_.isEmpty(this.variantIds) && !_.contains(this.variantIds, this.product_id)) {
136
- this.$bus.$emit('noVariantSelected')
137
- if (this.$mq === 'mobile' && this.variantModalActive) {
138
- animateCSS('.wkl-modal-container .variant-options', 'pulse')
139
- } else {
140
- animateCSS('.wkl-pp-variants', 'pulse')
141
- }
67
+ // Methods
68
+ const eecProduct = () => {
69
+ let eecProduct = {
70
+ item_id: props.product.id,
71
+ item_name: props.product.name,
72
+ price: props.product.price,
73
+ item_brand: props.product.brand ? props.product.brand.name : '',
74
+ item_category: props.product?.category?.path.startsWith('/') ? props.product?.category?.path.substr(1) : props.product?.category?.path,
75
+ quantity: parseInt(qty.value)
76
+ }
77
+ if (selectedVariant.value) {
78
+ eecProduct = {
79
+ item_id: props.product.id, //selectedVariant.value.id
80
+ item_name: props.product.name, //props.product.name + ' - ' + _.pluck(selectedVariant.value.options, 'value').join(', '),
81
+ price: selectedVariant.value.price,
82
+ item_brand: props.product.brand ? props.product.brand.name : '',
83
+ item_category: props.product?.category?.path.startsWith('/') ? props.product?.category?.path.substr(1) : props.product?.category?.path,
84
+ item_variant: _.pluck(selectedVariant.value.options, 'value').join(', '),
85
+ quantity: parseInt(qty.value)
86
+ }
87
+ }
88
+ //console.log('eecProduct ', eecProduct)
89
+ return eecProduct
90
+ }
142
91
 
143
- if (this.$mq === 'mobile') {
144
- this.submitEnabled = false
145
- this.$bus.$emit('scrollToVariants')
146
- this.variantModalActive = true
147
- }
92
+ const productDetails = () => {
93
+ let product = eecProduct()
94
+ product.image_url = props.product.images && props.product.images[0] ? props.product.images[0].url : ''
95
+ if (selectedVariant.value) {
96
+ let variantImage = _.findWhere(props.product.images, { id: selectedVariant.value.default_image_id })
97
+ product.image_url = variantImage?.url
98
+ }
99
+ return product
100
+ }
148
101
 
149
- this.loadingAddToCart = false
150
- this.loadingBuyNow = false
102
+ const updateCart = async () => {
103
+ try {
104
+ let response = await Cart.update({
105
+ mode: mode.value,
106
+ id: product_id.value,
107
+ qty: qty.value
108
+ })
109
+ //console.log(response.data)
110
+ if (response.data) {
111
+ $bus.emit('updateCart', response.data)
112
+ } else {
113
+ throw new Error($t('cart.updateCartErrorUnknown'))
114
+ }
115
+ return response.data
116
+ } catch (error) {
117
+ if (!error.message) {
118
+ error.message = $t('cart.updateCartError', error.status)
119
+ }
120
+ $buefy.dialog.alert({
121
+ title: $t('global.error'),
122
+ message: error.message,
123
+ confirmText: 'OK'
124
+ })
125
+ } finally {
126
+ loadingAddToCart.value = false
127
+ loadingBuyNow.value = false
128
+ }
129
+ }
151
130
 
152
- return false
153
- }
154
- return true
155
- },
131
+ const variantSelected = () => {
132
+ variantModalActive.value = false
133
+ //console.log('variant ids ', variantIds.value, 'product ', product_id.value)
134
+ if (!_.isEmpty(variantIds.value) && !_.contains(variantIds.value, product_id.value)) {
135
+ $bus.emit('noVariantSelected')
136
+ if (mq.value === 'mobile' && variantModalActive.value) {
137
+ animateCSS('.wkl-modal-container .variant-options', 'pulse')
138
+ } else {
139
+ animateCSS('.wkl-pp-variants', 'pulse')
140
+ }
156
141
 
157
- async buyNow(event) {
158
- this.loadingBuyNow = true
142
+ if (mq.value === 'mobile') {
143
+ submitEnabled.value = false
144
+ $bus.emit('scrollToVariants')
145
+ variantModalActive.value = true
146
+ }
159
147
 
160
- if (!this.variantSelected()) {
161
- return false
162
- }
148
+ loadingAddToCart.value = false
149
+ loadingBuyNow.value = false
163
150
 
164
- let cartResponse = await this.updateCart()
151
+ return false
152
+ }
153
+ return true
154
+ }
165
155
 
166
- if (!cartResponse) {
167
- return false
168
- }
156
+ const buyNow = async (event) => {
157
+ loadingBuyNow.value = true
169
158
 
170
- if (!!window.google_tag_manager) {
171
- GoogleAnalyticsEEC.addToCart(this.eecProduct(), () => {
172
- this.loadingBuyNow = false
173
- window.location.href = '/shopping-cart'
174
- })
175
- } else {
176
- this.logMessage('GTM is not loaded')
177
- setTimeout(() => {
178
- window.location.href = '/shopping-cart'
179
- }, 300)
180
- }
181
- },
159
+ if (!variantSelected()) {
160
+ return false
161
+ }
182
162
 
183
- async addToCart(event) {
184
- this.loadingAddToCart = true
185
- if (!this.variantSelected()) {
186
- return false
187
- }
188
- let cartResponse = await this.updateCart()
189
- if (cartResponse) {
190
- this.$emit('success')
191
- this.$bus.$emit('addToCart', this.productDetails(), this.el$)
192
- if (!!window.google_tag_manager) {
193
- GoogleAnalyticsEEC.addToCart(this.eecProduct(), () => {
194
- this.loadingAddToCart = false
195
- })
196
- }
197
- }
198
- },
163
+ let cartResponse = await updateCart()
199
164
 
200
- onSelectVariant(variant_id) {
201
- //console.log('receiving selectVariant ', variant_id)
202
- if (!variant_id) {
203
- this.selectedVariant = null
204
- this.submitEnabled = false
205
- this.product_id = null
206
- } else {
207
- this.selectedVariant = _.findWhere(this.product.variants, {
208
- id: parseInt(variant_id)
209
- })
210
- this.submitEnabled = true
211
- this.product_id = parseInt(variant_id)
212
- GoogleAnalyticsEEC.productView(this.eecProduct())
213
- //console.log('addtocart ', this.selectedVariant, this.product_id)
214
- }
215
- },
165
+ if (!cartResponse) {
166
+ return false
167
+ }
216
168
 
217
- handleScroll() {
218
- if (this.$mq !== 'mobile') {
219
- return
220
- }
221
- const element = this.$el
222
- const pagetop = document.querySelector('#pagetop')
223
- const elementPosition = element.getBoundingClientRect().top
224
-
225
- function checkPosition() {
226
- const scrollPosition = window.scrollY
227
-
228
- if (scrollPosition > elementPosition) {
229
- element.classList.add('add-to-cart-fixed-footer')
230
- pagetop.classList.add('pos2')
231
- } else {
232
- element.classList.remove('add-to-cart-fixed-footer')
233
- pagetop.classList.remove('pos2')
234
- }
235
- }
236
-
237
- window.addEventListener('scroll', checkPosition);
238
- checkPosition();
239
- },
169
+ if (!!window.google_tag_manager) {
170
+ GoogleAnalyticsEEC.addToCart(eecProduct(), () => {
171
+ loadingBuyNow.value = false
172
+ window.location.href = '/shopping-cart'
173
+ })
174
+ } else {
175
+ console.log('GTM is not loaded')
176
+ setTimeout(() => {
177
+ window.location.href = '/shopping-cart'
178
+ }, 300)
179
+ }
180
+ }
240
181
 
241
- handleBusEvents() {
242
- this.$bus.$on('selectVariant', this.onSelectVariant)
243
- this.$bus.$on('updateQty', (qty) => {
244
- console.log('received updateQty', qty)
245
- this.qty = qty
182
+ const addToCart = async (event) => {
183
+ loadingAddToCart.value = true
184
+ if (!variantSelected()) {
185
+ return false
186
+ }
187
+ let cartResponse = await updateCart()
188
+ if (cartResponse) {
189
+ emit('success')
190
+ $bus.emit('addToCart', productDetails(), instance.proxy.$el)
191
+ if (!!window.google_tag_manager) {
192
+ GoogleAnalyticsEEC.addToCart(eecProduct(), () => {
193
+ loadingAddToCart.value = false
246
194
  })
247
195
  }
248
- },
196
+ }
197
+ }
198
+
199
+ const onSelectVariant = (variant_id) => {
200
+ //console.log('receiving selectVariant ', variant_id)
201
+ if (!variant_id) {
202
+ selectedVariant.value = null
203
+ submitEnabled.value = false
204
+ product_id.value = null
205
+ } else {
206
+ selectedVariant.value = _.findWhere(props.product.variants, {
207
+ id: parseInt(variant_id)
208
+ })
209
+ submitEnabled.value = true
210
+ product_id.value = parseInt(variant_id)
211
+ GoogleAnalyticsEEC.productView(eecProduct())
212
+ //console.log('addtocart ', selectedVariant.value, product_id.value)
213
+ }
214
+ }
249
215
 
250
- mounted() {
251
- if (window.wkl_product) {
252
- this.$emit('update', window.wkl_product)
216
+ const handleScroll = () => {
217
+ if (mq.value !== 'mobile') {
218
+ return
219
+ }
220
+ const element = instance.proxy.$el
221
+ const pagetop = document.querySelector('#pagetop')
222
+ const elementPosition = element.getBoundingClientRect().top
223
+
224
+ const checkPosition = () => {
225
+ const scrollPosition = window.scrollY
226
+
227
+ if (scrollPosition > elementPosition) {
228
+ element.classList.add('add-to-cart-fixed-footer')
229
+ pagetop?.classList.add('pos2')
230
+ } else {
231
+ element.classList.remove('add-to-cart-fixed-footer')
232
+ pagetop?.classList.remove('pos2')
253
233
  }
234
+ }
235
+
236
+ window.addEventListener('scroll', checkPosition)
237
+ checkPosition()
238
+
239
+ // Store cleanup function
240
+ return () => window.removeEventListener('scroll', checkPosition)
241
+ }
254
242
 
255
- this.$nextTick(() => {
256
- if (!this.product_id && this.product.id) {
257
- this.product_id = this.product.id
258
- if (this.product.variants.length > 0) {
259
- this.variantIds = _.pluck(this.product.variants, 'id')
260
- }
261
- }
262
- this.handleScroll()
263
- })
243
+ const onUpdateQty = (qty_value) => {
244
+ qty.value = qty_value
245
+ }
246
+
247
+ const handleBusEvents = () => {
248
+ $bus.on('selectVariant', onSelectVariant)
249
+ $bus.on('updateQty', onUpdateQty)
264
250
 
265
- this.handleBusEvents()
251
+ // Return cleanup function
252
+ return () => {
253
+ $bus.off('selectVariant', onSelectVariant)
254
+ $bus.off('updateQty', onUpdateQty)
266
255
  }
267
256
  }
257
+
258
+ let cleanupScroll = null
259
+ let cleanupBus = null
260
+
261
+ onMounted(() => {
262
+ if (window.wkl_product) {
263
+ emit('update', window.wkl_product)
264
+ }
265
+
266
+ nextTick(() => {
267
+ if (!product_id.value && props.product.id) {
268
+ product_id.value = props.product.id
269
+ if (props.product.variants && props.product.variants.length > 0) {
270
+ variantIds.value = _.pluck(props.product.variants, 'id')
271
+ }
272
+ }
273
+ cleanupScroll = handleScroll()
274
+ })
275
+
276
+ cleanupBus = handleBusEvents()
277
+ })
278
+
279
+ onBeforeUnmount(() => {
280
+ // Cleanup event listeners
281
+ if (cleanupScroll) cleanupScroll()
282
+ if (cleanupBus) cleanupBus()
283
+ })
268
284
  </script>