@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
@@ -4,10 +4,10 @@
4
4
  <div class="column is-8">
5
5
 
6
6
  <PaymentMethods
7
- :value="paymentMethod.id"
7
+ :modelValue="paymentMethod.id"
8
8
  :methods="paymentMethods"
9
9
  :error="paymentMethodError"
10
- @input="onPaymentMethodsInput"
10
+ @update:modelValue="onPaymentMethodsInput"
11
11
  />
12
12
 
13
13
  <div class="mt-6" v-if="paymentMethod && paymentMethod.type === 'realtime'">
@@ -23,7 +23,7 @@
23
23
  <b-checkbox
24
24
  v-if="showBillingAddressCheckbox"
25
25
  v-model="billingAddressSameAsShipping"
26
- @input="billingAddressSameAsShippingChange($event)"
26
+ @update:model-value="billingAddressSameAsShippingChange($event)"
27
27
  type="is-info"
28
28
  size="is-small"
29
29
  >
@@ -37,6 +37,7 @@
37
37
  context="billing-guest"
38
38
  :countries="countryList"
39
39
  :address-data="billing_address"
40
+ :errors="billingAddressErrors"
40
41
  :with-email="false"
41
42
  :show-footer="false"
42
43
  content-class=""
@@ -61,7 +62,7 @@
61
62
  </div>
62
63
 
63
64
  <div class="cart-accept-tos mt-6 mb-6" v-if="initialState.acceptTOSAtCheckout">
64
- <b-checkbox name="accept_tos" data-test="accept-tos" v-model="acceptTOS" @input="acceptTOSChange">
65
+ <b-checkbox name="accept_tos" data-test="accept-tos" v-model="acceptTOS" @update:model-value="acceptTOSChange">
65
66
  <span v-html="$t('cart.acceptTOS')"></span>
66
67
  </b-checkbox>
67
68
  <p class="help is-danger" v-if="acceptTOSError">
@@ -129,6 +130,7 @@ export default {
129
130
  showBillingAddressCheckbox: false,
130
131
  billingAddressSameAsShipping: true,
131
132
  billing_address: {},
133
+ billingAddressErrors: {},
132
134
  validationErrors: {},
133
135
  paymentMethodError: false,
134
136
  recaptchaToken: '',
@@ -164,12 +166,16 @@ export default {
164
166
  methods: {
165
167
  ...mapMutations(['setActiveStep', 'setCreditCard', 'setCardToken', 'setBillingAddress', 'setRecaptchaToken', 'setIdempotencyKey', 'setPaymentMethod', 'setAffiliate']),
166
168
 
167
- ...mapActions(['getAddresses']),
169
+ ...mapActions(['getAddresses', 'validateAddress']),
168
170
 
169
171
  acceptTOSChange() {
170
172
  this.acceptTOSError = ''
171
173
  },
172
174
 
175
+ onAddressesChanged() {
176
+ this.getAddresses()
177
+ },
178
+
173
179
  onPaymentMethodsInput(pl) {
174
180
  this.paymentMethodError = false
175
181
  this.paymentMethod = _.findWhere(this.paymentMethods, {id: pl})
@@ -185,17 +191,25 @@ export default {
185
191
  selectBillingAddress(address) {
186
192
  //console.log('CreditCard selecting billing address ', address)
187
193
  this.setBillingAddress(address)
188
- this.$bus.$emit('billingAddressChange', address)
194
+ this.$bus.emit('billingAddressChange', address)
189
195
  },
190
196
 
191
- validateBillingAddress() {
197
+ async validateBillingAddress() {
192
198
  if (this.guestMode) {
193
- if (_.isEmpty(this.checkoutRequestData.billing_address)) {
194
- console.log('emitting validate')
195
- this.$bus.$emit('validateAddress', 'billing-guest')
196
- return false
197
- } else {
199
+ this.billingAddressErrors = {}
200
+ try {
201
+ await this.validateAddress(this.billing_address)
202
+ this.setBillingAddress(this.billing_address)
198
203
  return true
204
+ } catch (e) {
205
+ this.billingAddressErrors = e.errors || {}
206
+ this.$buefy.toast.open({
207
+ duration: 3000,
208
+ message: e.message,
209
+ position: 'is-top',
210
+ type: 'is-danger'
211
+ })
212
+ return false
199
213
  }
200
214
  }
201
215
 
@@ -225,7 +239,7 @@ export default {
225
239
 
226
240
  async submitPayment() {
227
241
  this.isLoading = true
228
- const cqLoading = this.$buefy.loading.open()
242
+ const cqLoading = this.$buefy.loading.open({})
229
243
 
230
244
  this.setAffiliateData()
231
245
  await this.paymentGetRecaptchaToken()
@@ -311,7 +325,7 @@ export default {
311
325
  return this.checkoutRequestData.billing_address.postcode || this.checkoutRequestData.shipping_address.postcode
312
326
  },
313
327
 
314
- handleToken(token, errors) {
328
+ async handleToken(token, errors) {
315
329
  if (token) {
316
330
  this.setCardToken(token)
317
331
  if (this.billingAddressSameAsShipping) {
@@ -322,7 +336,7 @@ export default {
322
336
  }
323
337
  }
324
338
 
325
- if (!this.billingAddressSameAsShipping && !this.validateBillingAddress()) {
339
+ if (!this.billingAddressSameAsShipping && !(await this.validateBillingAddress())) {
326
340
  return false
327
341
  } else {
328
342
  this.submitPayment()
@@ -337,7 +351,7 @@ export default {
337
351
  //console.log('handleToken ', token, errors)
338
352
  },
339
353
 
340
- placeOrder() {
354
+ async placeOrder() {
341
355
  if(!this.paymentMethod.id) {
342
356
  this.paymentMethodError = true
343
357
  return
@@ -366,7 +380,7 @@ export default {
366
380
  return false
367
381
  }
368
382
 
369
- if (!this.billingAddressSameAsShipping && !this.validateBillingAddress()) {
383
+ if (!this.billingAddressSameAsShipping && !(await this.validateBillingAddress())) {
370
384
  return false
371
385
  } else {
372
386
  this.submitPayment()
@@ -410,23 +424,13 @@ export default {
410
424
  }
411
425
  }
412
426
 
413
- this.$bus.$on('addressAdded', () => {
414
- this.getAddresses()
415
- })
416
-
417
- this.$bus.$on('EditAddress:saved', () => {
418
- this.getAddresses()
419
- })
427
+ this.$bus.on('addressAdded', this.onAddressesChanged)
428
+ this.$bus.on('EditAddress:saved', this.onAddressesChanged)
429
+ },
420
430
 
421
- this.$bus.$on('addressValid', (address, context) => {
422
- if (context !== 'billing-guest') {
423
- console.log('CreditCard wrong context', context)
424
- return
425
- }
426
- console.log('onAddressValid:billing', context, address)
427
- this.setBillingAddress(address)
428
- this.submitPayment()
429
- })
431
+ beforeUnmount() {
432
+ this.$bus.off('addressAdded', this.onAddressesChanged)
433
+ this.$bus.off('EditAddress:saved', this.onAddressesChanged)
430
434
  }
431
435
  }
432
436
  </script>
@@ -6,8 +6,8 @@
6
6
  <b-radio
7
7
  v-for="(pm, index) in methods"
8
8
  :key="'_pm_' + pm.id"
9
- :value="value"
10
- @input="$emit('input', $event)"
9
+ :model-value="modelValue"
10
+ @update:model-value="$emit('update:modelValue', $event)"
11
11
  name="paymentmethod"
12
12
  :data-test="'payment-method-' + pm.id"
13
13
  :native-value="pm.id"
@@ -33,7 +33,7 @@
33
33
  export default {
34
34
  name: 'PaymentMethods',
35
35
  props: {
36
- value: {
36
+ modelValue: {
37
37
  type: [String, Number]
38
38
  },
39
39
  methods: {
@@ -46,9 +46,11 @@ export default {
46
46
  }
47
47
  },
48
48
 
49
+ emits: ['update:modelValue'],
50
+
49
51
  mounted() {
50
52
  if (this.methods.length === 1) {
51
- this.$emit('input', this.methods[0].id)
53
+ this.$emit('update:modelValue', this.methods[0].id)
52
54
  }
53
55
  }
54
56
  }
@@ -17,10 +17,10 @@
17
17
  <br />
18
18
  {{ $getProp(checkoutRequestData.shipping_address, ['country', 'name']) }}<br />
19
19
  Phone number: {{ checkoutRequestData.shipping_address.phone }}<br />
20
- <button @click="$bus.$emit('setStep', steps.shipping)" class="button"> Change </button>
20
+ <button @click="$bus.emit('setStep', steps.shipping)" class="button"> Change </button>
21
21
  </div>
22
22
  <div v-else>
23
- <button @click="$bus.$emit('setStep', steps.shipping)" class="button"> Select shipping address </button>
23
+ <button @click="$bus.emit('setStep', steps.shipping)" class="button"> Select shipping address </button>
24
24
  </div>
25
25
  </div>
26
26
  </div>
@@ -31,12 +31,12 @@
31
31
  <div>
32
32
  <div v-if="checkoutRequestData.card_number">
33
33
  {{ checkoutRequestData.card_type.toUpperCase() }}
34
- {{ checkoutRequestData.card_number | hidecc }}<br />
34
+ {{ hidecc(checkoutRequestData.card_number) }}<br />
35
35
  Exp: {{ checkoutRequestData.card_expiry_month }}/{{ checkoutRequestData.card_expiry_year }}<br />
36
- <button @click="$bus.$emit('setStep', steps.payment)" class="button"> Change </button>
36
+ <button @click="$bus.emit('setStep', steps.payment)" class="button"> Change </button>
37
37
  </div>
38
38
  <div v-else>
39
- <button @click="$bus.$emit('setStep', steps.payment)" class="button"> Please enter your payment details </button>
39
+ <button @click="$bus.emit('setStep', steps.payment)" class="button"> Please enter your payment details </button>
40
40
  </div>
41
41
  </div>
42
42
  </div>
@@ -63,7 +63,7 @@
63
63
  </div>
64
64
  <div class="column is-2"></div>
65
65
 
66
- <b-loading :is-full-page="false" :active.sync="isLoading" :can-cancel="true"></b-loading>
66
+ <b-loading :is-full-page="false" v-model="isLoading" :can-cancel="true"></b-loading>
67
67
  </div>
68
68
  </div>
69
69
  </template>
@@ -72,6 +72,7 @@
72
72
  import { mapState, mapMutations } from 'vuex'
73
73
 
74
74
  import { Cart } from '../../api'
75
+ import { hidecc } from '../../utils/filters'
75
76
 
76
77
  import CartPreview from './CartPreview'
77
78
  import CartSummary from './CartSummary'
@@ -97,6 +98,7 @@ export default {
97
98
  ...mapState(['steps', 'cart', 'checkoutRequestData', 'guestMode'])
98
99
  },
99
100
  methods: {
101
+ hidecc,
100
102
  ...mapMutations(['setRecaptchaToken']),
101
103
 
102
104
  refreshRecaptchaToken() {
@@ -122,7 +124,7 @@ export default {
122
124
  Cart.checkout(this.checkoutRequestData, this.guestMode)
123
125
  .then((response) => {
124
126
  this.isLoading = false
125
- this.$bus.$emit('showOrderConfirmation', response.data)
127
+ this.$bus.emit('showOrderConfirmation', response.data)
126
128
  })
127
129
  .catch((error) => {
128
130
  this.isLoading = false
@@ -6,7 +6,7 @@
6
6
  <div class="cart-top"></div>
7
7
  <b-tabs v-if="!showOrderConfirmation" v-model="activeStep" @click="tabClick" type="is-toggle" expanded>
8
8
  <b-tab-item>
9
- <template slot="header">
9
+ <template #header>
10
10
  <span class="cart-tab-label"><i class="fad fa-check"></i> {{ $t('cart.cart') }}</span>
11
11
  <i class="fas fa-chevron-right cart-tab-chevron"></i>
12
12
  </template>
@@ -16,7 +16,7 @@
16
16
  </b-tab-item>
17
17
 
18
18
  <b-tab-item :disabled="stepsDisabled[1]">
19
- <template slot="header">
19
+ <template #header>
20
20
  <span class="cart-tab-label"><i class="fad fa-check"></i> {{ $t('cart.pickupDelivery') }} </span>
21
21
  <i class="fas fa-chevron-right cart-tab-chevron"></i>
22
22
  </template>
@@ -30,7 +30,7 @@
30
30
  </b-tab-item>
31
31
 
32
32
  <b-tab-item :disabled="stepsDisabled[2]">
33
- <template slot="header">
33
+ <template #header>
34
34
  <span class="cart-tab-label"><i class="fad fa-check"></i> {{ $t('cart.payment') }}</span>
35
35
  <i class="fas fa-chevron-right cart-tab-chevron"></i>
36
36
  </template>
@@ -58,7 +58,7 @@
58
58
  import { mapState, mapMutations, mapActions, mapGetters } from 'vuex'
59
59
  import _ from 'underscore'
60
60
 
61
- import GoogleAnalyticsEEC from '../../utils/google-analytics-eec.js'
61
+ import GoogleAnalyticsEEC from '../../utils/google/google-analytics-eec.js'
62
62
 
63
63
  import CartPreview from './CartPreview'
64
64
  import Payment from './Payment/Payment'
@@ -160,35 +160,38 @@ export default {
160
160
  return
161
161
  },
162
162
 
163
- processEvents() {
164
- this.$bus.$on('updateCart', (cartData) => {
165
- this.$store.commit('setCart', cartData)
166
- })
163
+ onUpdateCart(cartData) {
164
+ this.$store.commit('setCart', cartData)
165
+ },
166
+
167
+ onNextStep() {
168
+ this.setActiveStep(this.activeStep + 1, this.initialState.site_name)
169
+ if (this.$mq === 'mobile') {
170
+ this.scrollTop()
171
+ }
172
+ },
167
173
 
168
- this.$bus.$on('scrollTop', () => {
174
+ onSetStep(step) {
175
+ this.setActiveStep(step, this.initialState.site_name)
176
+ if (this.$mq === 'mobile') {
169
177
  this.scrollTop()
170
- })
171
-
172
- this.$bus.$on('nextStep', () => {
173
- this.setActiveStep(this.activeStep + 1, this.initialState.site_name)
174
- if (this.$mq === 'mobile') {
175
- this.scrollTop()
176
- }
177
- })
178
-
179
- this.$bus.$on('setStep', (step) => {
180
- this.setActiveStep(step, this.initialState.site_name)
181
- if (this.$mq === 'mobile') {
182
- this.scrollTop()
183
- }
184
- })
185
-
186
- window.addEventListener('popstate', () => {
187
- console.log('popstate ', this.activeStep)
188
- if (this.activeStep > 0) {
189
- this.setActiveStep(this.activeStep - 1, this.initialState.site_name)
190
- }
191
- })
178
+ }
179
+ },
180
+
181
+ onPopState() {
182
+ console.log('popstate ', this.activeStep)
183
+ if (this.activeStep > 0) {
184
+ this.setActiveStep(this.activeStep - 1, this.initialState.site_name)
185
+ }
186
+ },
187
+
188
+ processEvents() {
189
+ this.$bus.on('updateCart', this.onUpdateCart)
190
+ this.$bus.on('scrollTop', this.scrollTop)
191
+ this.$bus.on('nextStep', this.onNextStep)
192
+ this.$bus.on('setStep', this.onSetStep)
193
+
194
+ window.addEventListener('popstate', this.onPopState)
192
195
  }
193
196
  },
194
197
 
@@ -203,6 +206,14 @@ export default {
203
206
  e.returnValue = ''
204
207
  })*/
205
208
  //console.log(this.initialState)
209
+ },
210
+
211
+ beforeUnmount() {
212
+ this.$bus.off('updateCart', this.onUpdateCart)
213
+ this.$bus.off('scrollTop', this.scrollTop)
214
+ this.$bus.off('nextStep', this.onNextStep)
215
+ this.$bus.off('setStep', this.onSetStep)
216
+ window.removeEventListener('popstate', this.onPopState)
206
217
  }
207
218
  }
208
219
  </script>
@@ -2,7 +2,7 @@
2
2
  // noinspection DuplicatedCode
3
3
 
4
4
  import { Address, Cart, Countries, User } from '../../../api'
5
- import gmaps from '../../../utils/gmaps'
5
+ import gmaps from '../../../utils/google/gmaps'
6
6
 
7
7
  export default {
8
8
 
@@ -26,7 +26,8 @@ export default {
26
26
 
27
27
  cartStructureEEC: (state) => {
28
28
  let cartStructureEEC = []
29
- state.cart.items.forEach((item) => {
29
+ let items = state.cart.items || []
30
+ items.forEach((item) => {
30
31
  cartStructureEEC.push({
31
32
  item_id: item.id,
32
33
  item_name: item.name,
@@ -5,7 +5,7 @@ import mutations from './mutations'
5
5
  import actions from './actions'
6
6
 
7
7
  const CartStore = {
8
- state: state(),
8
+ state,
9
9
  getters,
10
10
  mutations,
11
11
  actions
@@ -3,9 +3,10 @@
3
3
 
4
4
  import _ from 'underscore'
5
5
  import shortid from 'shortid'
6
- import GoogleAnalyticsEEC from '../../../utils/google-analytics-eec'
6
+ import GoogleAnalyticsEEC from '../../../utils/google/google-analytics-eec'
7
7
  import { addressSchema } from '../../Address/address.schema'
8
8
  import { Address } from '../../../api'
9
+ import { nextTick } from 'vue'
9
10
 
10
11
  export default {
11
12
  setGuestMode(state, guestMode) {
@@ -27,16 +28,17 @@ export default {
27
28
  state.activeStep = intStep
28
29
  history.pushState(null, siteName + ' Cart', '?step=' + _.invert(state.steps)[intStep])
29
30
 
30
- GoogleAnalyticsEEC.checkoutStep(_.invert(this.steps)[intStep], this.cartStructureEEC)
31
+ // `this` is the store in a mutation
32
+ GoogleAnalyticsEEC.checkoutStep(_.invert(state.steps)[intStep], this.getters.cartStructureEEC)
31
33
 
32
34
  state.stepKey[state.activeStep]++
33
35
  state.stepChangeIncrement++
34
36
 
35
- this._vm.$nextTick(function () {
37
+ nextTick(function () {
36
38
  let tabs = document.querySelectorAll('.tabs li')
37
39
  for (let i = 0; i < tabs.length; i++) {
38
- if (i < step) {
39
- //console.log(i, '<', step)
40
+ if (i < intStep) {
41
+ //console.log(i, '<', intStep)
40
42
  if (!tabs[i].classList.contains('step-completed')) {
41
43
  //console.log('set ', tabs[i], ' to step-completed')
42
44
  tabs[i].classList.add('step-completed')
@@ -9,8 +9,8 @@
9
9
  native-value="inside"
10
10
  @focus="emailFocus"
11
11
  @blur="emailBlur"
12
- @input.native="checkTyping"
13
12
  v-model="userIdentity.email"
13
+ @update:model-value="checkTyping"
14
14
  :loading="checkingEmail"
15
15
  type="email"
16
16
  name="email"