@ecomplus/storefront-components 1.0.0-beta.18 → 1.0.0-beta.180

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 (125) hide show
  1. package/CHANGELOG.md +1271 -133
  2. package/README.md +9 -4
  3. package/all.js +3 -1
  4. package/dist/1.storefront-components.min.js +2 -0
  5. package/dist/1.storefront-components.min.js.map +1 -0
  6. package/dist/2.storefront-components.min.js +5 -0
  7. package/dist/2.storefront-components.min.js.map +1 -0
  8. package/dist/3.storefront-components.min.js +5 -0
  9. package/dist/3.storefront-components.min.js.map +1 -0
  10. package/dist/storefront-components.min.js +33 -12
  11. package/dist/storefront-components.min.js.map +1 -1
  12. package/package.json +17 -12
  13. package/src/APagination.vue +2 -0
  14. package/src/AShare.vue +2 -0
  15. package/src/AccountAddresses.vue +3 -0
  16. package/src/AccountForm.vue +3 -0
  17. package/src/AccountPoints.vue +3 -0
  18. package/src/BuyTogether.vue +3 -0
  19. package/src/EarnPointsProgress.vue +3 -0
  20. package/src/ItemCustomizations.vue +2 -0
  21. package/src/KitProductVariations.vue +3 -0
  22. package/src/PointsApplier.vue +2 -0
  23. package/src/ProductQuickview.vue +3 -0
  24. package/src/QuantitySelector.vue +3 -0
  25. package/src/RecommendedItems.vue +3 -0
  26. package/src/ShippingLine.vue +1 -0
  27. package/src/TheCart.vue +3 -0
  28. package/src/html/APagination.html +90 -0
  29. package/src/html/APrices.html +24 -4
  30. package/src/html/AShare.html +31 -0
  31. package/src/html/AccountAddresses.html +90 -0
  32. package/src/html/AccountForm.html +269 -0
  33. package/src/html/AccountPoints.html +39 -0
  34. package/src/html/AddressForm.html +9 -7
  35. package/src/html/BuyTogether.html +60 -0
  36. package/src/html/CartItem.html +86 -38
  37. package/src/html/CartQuickview.html +28 -5
  38. package/src/html/DiscountApplier.html +2 -2
  39. package/src/html/EarnPointsProgress.html +28 -0
  40. package/src/html/InputDate.html +1 -1
  41. package/src/html/InputDocNumber.html +1 -0
  42. package/src/html/InputPhone.html +1 -1
  43. package/src/html/InstantSearch.html +3 -3
  44. package/src/html/ItemCustomizations.html +14 -0
  45. package/src/html/KitProductVariations.html +92 -0
  46. package/src/html/LoginBlock.html +34 -32
  47. package/src/html/LoginModal.html +9 -4
  48. package/src/html/PaymentOption.html +7 -5
  49. package/src/html/PointsApplier.html +26 -0
  50. package/src/html/ProductCard.html +56 -8
  51. package/src/html/ProductGallery.html +21 -3
  52. package/src/html/ProductQuickview.html +64 -0
  53. package/src/html/ProductVariations.html +30 -3
  54. package/src/html/QuantitySelector.html +85 -0
  55. package/src/html/RecommendedItems.html +48 -0
  56. package/src/html/SearchEngine.html +100 -24
  57. package/src/html/ShippingCalculator.html +83 -3
  58. package/src/html/ShippingLine.html +5 -2
  59. package/src/html/TheAccount.html +43 -9
  60. package/src/html/TheCart.html +156 -0
  61. package/src/html/TheProduct.html +416 -138
  62. package/src/js/APagination.js +74 -0
  63. package/src/js/APicture.js +27 -7
  64. package/src/js/APrices.js +80 -41
  65. package/src/js/AShare.js +83 -0
  66. package/src/js/AccountAddresses.js +192 -0
  67. package/src/js/AccountForm.js +312 -0
  68. package/src/js/AccountPoints.js +63 -0
  69. package/src/js/AddressForm.js +80 -35
  70. package/src/js/BuyTogether.js +246 -0
  71. package/src/js/CartItem.js +67 -14
  72. package/src/js/CartQuickview.js +21 -2
  73. package/src/js/DiscountApplier.js +132 -42
  74. package/src/js/EarnPointsProgress.js +77 -0
  75. package/src/js/InputDate.js +8 -8
  76. package/src/js/InputDocNumber.js +20 -0
  77. package/src/js/ItemCustomizations.js +10 -0
  78. package/src/js/KitProductVariations.js +218 -0
  79. package/src/js/LoginBlock.js +46 -5
  80. package/src/js/LoginModal.js +17 -4
  81. package/src/js/PaymentOption.js +28 -1
  82. package/src/js/PointsApplier.js +110 -0
  83. package/src/js/ProductCard.js +97 -11
  84. package/src/js/ProductGallery.js +32 -12
  85. package/src/js/ProductQuickview.js +72 -0
  86. package/src/js/ProductVariations.js +76 -19
  87. package/src/js/QuantitySelector.js +175 -0
  88. package/src/js/RecommendedItems.js +178 -0
  89. package/src/js/SearchEngine.js +185 -55
  90. package/src/js/ShippingCalculator.js +174 -35
  91. package/src/js/ShippingLine.js +35 -5
  92. package/src/js/TheAccount.js +97 -6
  93. package/src/js/TheCart.js +146 -0
  94. package/src/js/TheProduct.js +387 -43
  95. package/src/js/helpers/add-idle-callback.js +7 -0
  96. package/src/js/helpers/check-form-validity.js +3 -0
  97. package/src/js/helpers/favorite-products.js +24 -0
  98. package/src/js/helpers/scroll-to-element.js +10 -0
  99. package/src/js/helpers/sort-apps.js +14 -0
  100. package/src/js/helpers/wait-storefront-info.js +21 -0
  101. package/src/scss/APicture.scss +2 -0
  102. package/src/scss/APrices.scss +13 -1
  103. package/src/scss/AccountAddresses.scss +27 -0
  104. package/src/scss/AccountForm.scss +5 -0
  105. package/src/scss/AccountPoints.scss +17 -0
  106. package/src/scss/BuyTogether.scss +38 -0
  107. package/src/scss/CartItem.scss +17 -1
  108. package/src/scss/EarnPointsProgress.scss +6 -0
  109. package/src/scss/InstantSearch.scss +1 -0
  110. package/src/scss/KitProductVariations.scss +72 -0
  111. package/src/scss/LoginBlock.scss +5 -0
  112. package/src/scss/PaymentOption.scss +10 -1
  113. package/src/scss/ProductCard.scss +66 -28
  114. package/src/scss/ProductGallery.scss +4 -2
  115. package/src/scss/ProductQuickview.scss +36 -0
  116. package/src/scss/ProductVariations.scss +20 -4
  117. package/src/scss/QuantitySelector.scss +39 -0
  118. package/src/scss/RecommendedItems.scss +28 -0
  119. package/src/scss/SearchEngine.scss +9 -5
  120. package/src/scss/ShippingCalculator.scss +42 -1
  121. package/src/scss/ShippingLine.scss +24 -0
  122. package/src/scss/TheAccount.scss +4 -0
  123. package/src/scss/TheCart.scss +54 -0
  124. package/src/scss/TheProduct.scss +146 -1
  125. package/webpack.config.js +20 -6
@@ -7,14 +7,14 @@
7
7
  {{ i19enterYourEmailMsg }}
8
8
  </label>
9
9
 
10
- <div class="input-group input-group-lg">
10
+ <div class="login__email input-group input-group-lg">
11
11
  <input
12
12
  ref="inputEmail"
13
13
  type="email"
14
14
  class="form-control"
15
15
  id="login-email"
16
16
  placeholder="email@mail.com"
17
- v-model="email"
17
+ v-model.trim="email"
18
18
  :readonly="isWaitingLogin"
19
19
  required
20
20
  >
@@ -22,14 +22,14 @@
22
22
  <div class="input-group-append">
23
23
  <button
24
24
  type="submit"
25
- class="btn btn-primary"
25
+ class="login__email-btn btn btn-primary"
26
26
  :disabled="isWaitingLogin"
27
27
  >
28
28
  <span
29
29
  v-if="!isWaitingLogin"
30
30
  key="login"
31
31
  >
32
- <i class="fas fa-arrow-right"></i>
32
+ <i class="i-arrow-right"></i>
33
33
  <span class="d-none d-md-inline ml-1">
34
34
  {{ i19continue }}
35
35
  </span>
@@ -83,7 +83,7 @@
83
83
  :disabled="isWaitingLogin"
84
84
  :aria-label="i19continue"
85
85
  >
86
- <i class="fas fa-check"></i>
86
+ <i class="i-check"></i>
87
87
  </button>
88
88
  </div>
89
89
  </div>
@@ -97,37 +97,39 @@
97
97
  {{ failAlertText }}
98
98
  </a-alert>
99
99
 
100
- <transition enter-active-class="animated fadeInUp">
101
- <div
102
- v-if="oauthProviders.length"
103
- class="login__oauth"
104
- >
105
- <p class="lead">
106
- {{ i19orProceedWith }}:
107
- </p>
108
-
109
- <button
110
- v-for="({ link, faIcon, providerName, provider }) in oauthProviders"
111
- type="button"
112
- class="btn login__btn"
113
- :key="provider"
114
- :class="`login__btn--${provider}`"
115
- @click="() => oauthPopup(link)"
100
+ <slot name="login-methods" v-bind="{ isWaitingLogin, email, confirmAccount }">
101
+ <transition enter-active-class="animated fadeInUp">
102
+ <div
103
+ v-if="oauthProviders.length"
104
+ class="login__oauth"
116
105
  >
117
- <small>{{ i19signInWith }}</small>
118
- <i
119
- class="fab mr-2"
120
- :class="faIcon"
121
- ></i>
122
- {{ providerName }}
123
- </button>
124
- </div>
125
- </transition>
106
+ <p class="lead">
107
+ {{ i19orProceedWith }}:
108
+ </p>
109
+
110
+ <button
111
+ v-for="({ link, faIcon, providerName, provider }) in oauthProviders"
112
+ type="button"
113
+ class="btn login__btn"
114
+ :key="provider"
115
+ :class="`login__btn--${provider}`"
116
+ @click="() => oauthPopup(link)"
117
+ >
118
+ <small>{{ i19signInWith }}</small>
119
+ <i
120
+ class="fab mr-2"
121
+ :class="faIcon"
122
+ ></i>
123
+ {{ providerName }}
124
+ </button>
125
+ </div>
126
+ </transition>
127
+ </slot>
126
128
  </form>
127
129
 
128
130
  <div class="login__info">
129
131
  <div class="login__info-title">
130
- <i class="fas fa-lock"></i>
132
+ <i class="i-lock"></i>
131
133
  {{ i19weUseYourDataToMsg }}:
132
134
  </div>
133
135
 
@@ -135,7 +137,7 @@
135
137
  class="login__info-row"
136
138
  v-for="label in [i19identifyYourAccount, i19notifyAboutOrders, i19manageYourPurchaseHistory]"
137
139
  >
138
- <i class="fas fa-check"></i>
140
+ <i class="i-check"></i>
139
141
  {{ label }}
140
142
  </div>
141
143
  </div>
@@ -68,6 +68,12 @@
68
68
  >
69
69
  {{ i19myAccount }}
70
70
  </a-link>
71
+ <a-link
72
+ :href="favoritesUrl"
73
+ class="list-group-item list-group-item-action"
74
+ >
75
+ {{ i19myFavorites }}
76
+ </a-link>
71
77
  </div>
72
78
 
73
79
  <button
@@ -75,7 +81,7 @@
75
81
  type="button"
76
82
  @click="logout"
77
83
  >
78
- <i class="fas fa-sign-out-alt"></i>
84
+ <i class="i-sign-out"></i>
79
85
  {{ i19logout }}
80
86
  </button>
81
87
  </div>
@@ -131,7 +137,7 @@
131
137
  @click="isLoginForm = true"
132
138
  >
133
139
  <span class="login-modal__btn-icon">
134
- <i class="fas fa-envelope"></i>
140
+ <i class="i-envelope"></i>
135
141
  </span>
136
142
  {{ `${i19signInWith} ${i19email}` }}
137
143
  </button>
@@ -154,9 +160,8 @@
154
160
  type="button"
155
161
  @click="isLoginForm = false"
156
162
  >
157
- <i class="fas fa-arrow-left"></i>
163
+ <i class="i-arrow-left"></i>
158
164
  </button>
159
-
160
165
  <label for="login-modal-email">
161
166
  {{ `${i19signInWith} ${i19email}` }}
162
167
  </label>
@@ -49,17 +49,19 @@
49
49
  v-if="installmentOptions"
50
50
  class="payment-option__installment list-unstyled"
51
51
  >
52
- <option
52
+ <li
53
53
  v-for="({ number, value, tax }) in installmentOptions"
54
54
  v-if="number > 1"
55
55
  >
56
- {{ `${number}x` }}
57
- <small>{{ i19of }}</small>
58
- {{ formatMoney(value) }}
56
+ <span>
57
+ {{ `${number}x` }}
58
+ <small>{{ i19of }}</small>
59
+ {{ formatMoney(value) }}
60
+ </span>
59
61
  <small v-if="!tax">
60
62
  {{ i19interestFree }}
61
63
  </small>
62
- </option>
64
+ </li>
63
65
  </ul>
64
66
  </div>
65
67
  </div>
@@ -0,0 +1,26 @@
1
+ <div class="points-applier">
2
+ <div
3
+ v-for="({ name }, programId) in localPointsPrograms"
4
+ v-if="availablePoints[programId] >= 0.1"
5
+ class="custom-control custom-switch"
6
+ >
7
+ <input
8
+ type="checkbox"
9
+ class="custom-control-input"
10
+ :id="`points-applier-${programId}`"
11
+ :checked="pointsApplied[programId]"
12
+ @change="ev => togglePoints(programId, ev.target.checked)"
13
+ >
14
+
15
+ <label
16
+ class="custom-control-label"
17
+ :for="`points-applier-${programId}`"
18
+ >
19
+ <span class="badge badge-info">
20
+ -{{ formatMoney(getPointsAmount(programId)) }}
21
+ </span>
22
+ {{ i19use$1LoyaltyPoints.replace('$1', availablePoints[programId].toFixed(1)) }}
23
+ <em>{{ name }}</em>
24
+ </label>
25
+ </div>
26
+ </div>
@@ -5,8 +5,10 @@
5
5
  'product-card--small': isSmall
6
6
  }"
7
7
  @mouseover="isHovered = true"
8
+ :data-product-id="body._id"
9
+ :data-sku="body.sku"
8
10
  >
9
- <transition enter-active-class="animated fadeIn">
11
+ <transition :enter-active-class="transitionClass">
10
12
  <section v-if="!isLoading">
11
13
  <slot
12
14
  name="discount-tag"
@@ -16,9 +18,10 @@
16
18
  v-if="isActive && discount > 0"
17
19
  class="product-card__offer-stamp"
18
20
  >
19
- <i class="fas fa-arrow-down"></i> <b>{{ discount }}</b>%
21
+ <i class="i-arrow-down"></i> <b>{{ discount }}</b>%
20
22
  </span>
21
23
  </slot>
24
+ <slot name="stamps" />
22
25
 
23
26
  <slot name="body">
24
27
  <a-link
@@ -61,6 +64,7 @@
61
64
  v-once
62
65
  class="product-card__rating"
63
66
  :data-sku="body.sku"
67
+ v-html="ratingHtml"
64
68
  ></div>
65
69
  </slot>
66
70
 
@@ -68,7 +72,7 @@
68
72
  name="unavailable"
69
73
  v-if="!body.available || !body.visible"
70
74
  >
71
- <p class="badge badge-warning">
75
+ <p class="badge badge-warning mt-auto">
72
76
  {{ i19unavailable }}
73
77
  </p>
74
78
  </slot>
@@ -77,16 +81,27 @@
77
81
  name="out-of-stock"
78
82
  v-else-if="!isInStock"
79
83
  >
80
- <p class="badge badge-dark">
84
+ <p class="badge badge-dark mt-auto">
81
85
  {{ i19outOfStock }}
82
86
  </p>
83
87
  </slot>
84
88
 
89
+ <slot
90
+ name="without-price"
91
+ v-else-if="isWithoutPrice"
92
+ >
93
+ <p class="badge badge-info mt-auto">
94
+ {{ i19uponRequest }}
95
+ </p>
96
+ </slot>
97
+
85
98
  <template v-else>
86
99
  <slot name="prices">
87
100
  <a-prices
88
101
  class="product-card__prices"
89
102
  :product="body"
103
+ :installments-option="installmentsOption"
104
+ :discount-option="discountOption"
90
105
  />
91
106
  </slot>
92
107
 
@@ -95,23 +110,54 @@
95
110
  class="product-card__buy fade"
96
111
  >
97
112
  <slot name="buy">
98
- <div v-if="buyHtml" v-html="buyHtml"></div>
113
+ <div
114
+ v-if="buyHtml"
115
+ v-html="buyHtml"
116
+ ></div>
117
+
99
118
  <button
100
119
  type="button"
101
120
  class="btn btn-primary"
102
121
  :class="isSmall ? 'btn-sm': 'btn-block'"
122
+ :disabled="isWaitingBuy"
103
123
  >
124
+ <span
125
+ v-if="isWaitingBuy"
126
+ class="product-card__buy-loading spinner-grow spinner-grow-sm"
127
+ role="status"
128
+ >
129
+ <span class="sr-only">Loading...</span>
130
+ </span>
131
+
104
132
  <slot name="buy-button-content">
105
- <i class="fas fa-shopping-bag mr-1"></i>
133
+ <i class="i-shopping-bag mr-1"></i>
106
134
  {{ strBuy }}
107
135
  </slot>
108
136
  </button>
109
137
  </slot>
110
138
  </div>
111
- </template>
139
+ </template>
140
+
141
+ <slot name="favorite">
142
+ <a
143
+ class="btn product-card__favorite fade"
144
+ @click="toggleFavorite"
145
+ :href="isLogged ? null : accountUrl"
146
+ :aria-label="i19addToFavorites"
147
+ >
148
+ <i
149
+ class="i-heart mr-1"
150
+ :class="isFavorite ? 'active' : null"
151
+ >
152
+ </i>
153
+ </a>
154
+ </slot>
112
155
 
113
156
  <slot name="footer">
114
- <div v-if="footerHtml" v-html="footerHtml"></div>
157
+ <div
158
+ v-if="footerHtml"
159
+ v-html="footerHtml"
160
+ ></div>
115
161
  </slot>
116
162
  </section>
117
163
  </transition>
@@ -126,4 +172,6 @@
126
172
  {{ error }}
127
173
  </div>
128
174
  </template>
175
+
176
+ <div ref="quickview"></div>
129
177
  </div>
@@ -6,7 +6,7 @@
6
6
  :class="{ 'gallery__item--selected': localPictures.length === activeIndex }"
7
7
  @click="activeIndex = localPictures.length"
8
8
  >
9
- <i class="fas fa-play"></i>
9
+ <i class="i-play"></i>
10
10
  <span>{{ i19video }}</span>
11
11
  </div>
12
12
 
@@ -28,6 +28,7 @@
28
28
  v-if="localPictures.length > 4"
29
29
  type="button"
30
30
  class="gallery__open btn btn-dark"
31
+ :style="zoomLinkStyle"
31
32
  :title="i19openGallery"
32
33
  @click.prevent="openZoom(4)"
33
34
  >
@@ -53,10 +54,19 @@
53
54
  <div @click="openZoom(i)">
54
55
  <slot v-if="i === 0 && !isSliderMoved">
55
56
  <a-picture
57
+ v-if="!elFirstPicture"
56
58
  class="gallery__big-image"
59
+ :style="zoomLinkStyle"
57
60
  :src="getImg(picture, null, 'big')"
58
61
  />
62
+ <div
63
+ v-else
64
+ ref="firstPicture"
65
+ class="gallery__big-image"
66
+ :style="zoomLinkStyle"
67
+ ></div>
59
68
  </slot>
69
+
60
70
  <a-picture
61
71
  v-else
62
72
  class="gallery__big-image"
@@ -73,9 +83,17 @@
73
83
  <div
74
84
  class="embed-responsive"
75
85
  :class="`embed-responsive-${videoAspectRatio}`"
76
- >
86
+ >
87
+ <div
88
+ v-if="activeIndex === localPictures.length"
89
+ class="spinner-border text-primary"
90
+ role="status"
91
+ >
92
+ <span class="sr-only">Loading...</span>
93
+ </div>
77
94
  <iframe
78
95
  class="embed-responsive-item"
96
+ v-if="activeIndex === localPictures.length"
79
97
  :src="videoSrc"
80
98
  allowfullscreen
81
99
  ></iframe>
@@ -151,7 +169,7 @@
151
169
  class="btn btn-success"
152
170
  @click="buy"
153
171
  >
154
- <i class="fas fa-cart-arrow-down"></i>
172
+ <i class="i-shopping-cart"></i>
155
173
  <span class="d-none d-md-inline ml-1">
156
174
  {{ i19addToCart }}
157
175
  </span>
@@ -0,0 +1,64 @@
1
+ <portal :selector="`#${portalId}`">
2
+ <div class="product-quickview">
3
+ <a-backdrop
4
+ :is-visible="isVisible"
5
+ @hide="hide"
6
+ />
7
+
8
+ <transition
9
+ enter-active-class="animated zoomIn"
10
+ leave-active-class="animated fadeOutUp slow"
11
+ >
12
+ <div
13
+ class="product-quickview__box card"
14
+ v-if="isVisible"
15
+ >
16
+ <slot name="header">
17
+ <div class="product-quickview__header card-header">
18
+ {{ productName }}
19
+ <button
20
+ type="button"
21
+ class="close"
22
+ :aria-label="i19close"
23
+ @click="hide"
24
+ >
25
+ <span aria-hidden="true">&times;</span>
26
+ </button>
27
+ </div>
28
+ </slot>
29
+
30
+ <div class="product-quickview__body card-body">
31
+ <div
32
+ v-if="!productName"
33
+ class="product-quickview__loading"
34
+ >
35
+ <div
36
+ class="spinner-border"
37
+ role="status"
38
+ >
39
+ <span class="sr-only">Loading...</span>
40
+ </div>
41
+ </div>
42
+
43
+ <div class="container">
44
+ <the-product
45
+ is-quickview
46
+ :product-id="productId"
47
+ :product="product"
48
+ @update:product="setProduct"
49
+ @buy="hide"
50
+ />
51
+ </div>
52
+
53
+ <a
54
+ v-if="productName"
55
+ class="product-quickview__btn-redirect btn btn-secondary"
56
+ :href="productLink"
57
+ >
58
+ {{ i19seeMoreInfo }}
59
+ </a>
60
+ </div>
61
+ </div>
62
+ </transition>
63
+ </div>
64
+ </portal>
@@ -4,18 +4,42 @@
4
4
  >
5
5
  <div
6
6
  v-for="(options, grid, index) in variationsGrids"
7
+ v-if="filteredGrids[grid]"
7
8
  :class="`variations__grid variations__grid--${grid}`"
8
9
  >
9
- <h5>{{ getGridTitle(grid) }}</h5>
10
+ <div class="mb-2">
11
+ <span class="variations__grid-title h5">
12
+ {{ getGridTitle(grid) }}
13
+ </span>
14
+
15
+ <span
16
+ v-if="selectedOptions[grid]"
17
+ key="success"
18
+ class="variations__value variations__value"
19
+ >
20
+ <i class="i-check mr-1"></i>
21
+ {{ selectedOptions[grid] }}
22
+ </span>
23
+ <span
24
+ v-else
25
+ class="variations__value variations__value--empty"
26
+ >
27
+ <i class="i-arrow-down mr-1"></i>
28
+ {{ i19selectVariation }}
29
+ </span>
30
+ </div>
10
31
 
11
32
  <template v-if="options.length <= maxOptionsBtns">
12
33
  <button
13
34
  v-for="optionText in options"
14
35
  class="variations__option btn btn-light"
15
- :class="selectedOptions[grid] === optionText ? 'variations__option--selected' : null"
36
+ :class="[
37
+ selectedOptions[grid] === optionText ? 'variations__option--selected' : null,
38
+ `variations__option--${optionText}`,
39
+ filteredGrids[grid].includes(optionText) ? null : 'disabled'
40
+ ]"
16
41
  :style="grid === 'colors' ? getColorOptionBg(optionText) : null"
17
42
  @click="selectOption(optionText, grid, index)"
18
- :disabled="!filteredGrids[grid].includes(optionText)"
19
43
  >
20
44
  {{ optionText }}
21
45
  </button>
@@ -26,6 +50,9 @@
26
50
  class="variations__select custom-select"
27
51
  @change="$event => selectOption($event.target.value, grid, index)"
28
52
  >
53
+ <option :selected="!selectedOptions[grid]">
54
+ {{ i19select }}...
55
+ </option>
29
56
  <option
30
57
  v-for="optionText in options"
31
58
  :value="optionText"
@@ -0,0 +1,85 @@
1
+ <div class="quantity-selector">
2
+ <div
3
+ class="quantity-selector__item"
4
+ v-for="item in items"
5
+ >
6
+ <div class="row quantity-selector__btn-container">
7
+ <button
8
+ class="btn btn-sm btn-link col-sm-3"
9
+ type="button"
10
+ @click="changeQnt(item, -1)"
11
+ :disabled="item.min_quantity >= selectedQnts[item._id]"
12
+ >
13
+ <i class="i-chevron-down"></i>
14
+ </button>
15
+ <input
16
+ type="tel"
17
+ class="form-control quantity-selector__input col-sm-6"
18
+ @change="ev => changeQnt(item, null, ev)"
19
+ @keyup.up="changeQnt(item, 1)"
20
+ @keyup.down="changeQnt(item, -1)"
21
+ :value="selectedQnts[item._id]"
22
+ :disabled="!checkInStock(item)"
23
+ :readonly="item.min_quantity && item.min_quantity === item.max_quantity"
24
+ >
25
+ <button
26
+ class="btn btn-sm btn-link col-sm-3"
27
+ type="button"
28
+ @click="changeQnt(item, 1)"
29
+ :disabled="item.max_quantity <= selectedQnts[item._id]"
30
+ >
31
+ <i class="i-chevron-up"></i>
32
+ </button>
33
+ </div>
34
+
35
+ <span class="quantity-selector__label">
36
+ <slot v-bind="{ item }">
37
+ <a-link
38
+ v-if="item.slug"
39
+ target="_blank"
40
+ :href="`/${item.slug}`"
41
+ :title="item.name"
42
+ >
43
+ {{ item.name }}
44
+ </a-link>
45
+ <template v-else>
46
+ {{ item.name }}
47
+ </template>
48
+ </slot>
49
+ </span>
50
+ </div>
51
+
52
+ <a-alert :can-show="hasMinAlert">
53
+ {{ i19minQuantity }}:
54
+ <strong>{{ min }}</strong>
55
+ </a-alert>
56
+
57
+ <a-alert
58
+ :can-show="hasMaxAlert"
59
+ :variant="alertVariant"
60
+ >
61
+ {{ i19maxQuantity }}:
62
+ <strong>{{ max }}</strong>
63
+ </a-alert>
64
+
65
+ <div
66
+ v-if="hasBuyButton"
67
+ class="quantity-selector__buy"
68
+ >
69
+ <slot
70
+ name="buy"
71
+ v-bind="{ selectedQnts, buy }"
72
+ >
73
+ <button
74
+ type="button"
75
+ class="btn btn-lg btn-primary my-3"
76
+ @click="buy"
77
+ >
78
+ <slot name="buy-button-content">
79
+ <i class="i-shopping-bag mr-1"></i>
80
+ {{ strBuy }}
81
+ </slot>
82
+ </button>
83
+ </slot>
84
+ </div>
85
+ </div>
@@ -0,0 +1,48 @@
1
+ <section class="recommended-items">
2
+ <transition enter-active-class="animated fadeIn">
3
+ <div v-if="items.length">
4
+ <div
5
+ v-if="!productIds.length"
6
+ class="recommended-items__title"
7
+ >
8
+ <slot name="title">
9
+ <p class="lead">
10
+ {{ i19weRecommendToYou }}
11
+ </p>
12
+ </slot>
13
+ </div>
14
+
15
+ <div :class="rowClassName">
16
+ <div
17
+ v-for="item in items"
18
+ :key="item._id"
19
+ :class="colClassName"
20
+ >
21
+ <slot
22
+ name="item"
23
+ v-bind="{ item }"
24
+ >
25
+ <product-card
26
+ :product="item"
27
+ :is-loaded="true"
28
+ v-bind="productCardProps"
29
+ />
30
+ </slot>
31
+ </div>
32
+ </div>
33
+
34
+ <div
35
+ v-if="canLoadMore"
36
+ class="recommended-items__load-more"
37
+ >
38
+ <button
39
+ v-if="totalCount >= pageSize * (pageNumber + 1)"
40
+ class="btn btn-sm btn-outline-secondary"
41
+ @click="pageNumber++"
42
+ >
43
+ <i class="i-plus mr-1"></i> {{ i19seeMore }}
44
+ </button>
45
+ </div>
46
+ </div>
47
+ </transition>
48
+ </section>