@wikala/spmkt 2.29.3 → 2.29.5

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.
@@ -0,0 +1,10 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(grep:*)",
5
+ "Bash(head:*)",
6
+ "Bash(git -C /Users/svp/projects/fe-supermarket log --all --name-only --oneline api/index.js)",
7
+ "Bash(git -C /Users/svp/projects/fe-supermarket status --short)"
8
+ ]
9
+ }
10
+ }
@@ -265,10 +265,11 @@ export default {
265
265
 
266
266
  updateDiscountInfo() {
267
267
  let discountInfoContainer = document.querySelector(this.discountInfoSelector)
268
- let discountMessageContainer = discountInfoContainer.querySelector('.discount-message')
269
268
  if(!discountInfoContainer) {
270
269
  return
271
270
  }
271
+ let discountMessageContainer = discountInfoContainer.querySelector('.discount-message')
272
+
272
273
  discountInfoContainer.classList.add('is-hidden')
273
274
  discountMessageContainer.textContent = ''
274
275
 
@@ -147,6 +147,9 @@ export default {
147
147
  setArrowsVisibility(collectionIndex) {
148
148
  let leftArrow = document.querySelector('.userimg-gallery div.carousel-arrow > span.icon.has-icons-left')
149
149
  let rightArrow = document.querySelector('.userimg-gallery div.carousel-arrow > span.icon.has-icons-right')
150
+ if(!leftArrow || !rightArrow) {
151
+ return
152
+ }
150
153
  if (collectionIndex === 0) {
151
154
  leftArrow.style.visibility = 'hidden'
152
155
  } else {
@@ -159,6 +162,19 @@ export default {
159
162
  }
160
163
  },
161
164
 
165
+ attachModalToBody() { //fixes z-index issues
166
+ const modal = document.getElementsByClassName('modal');
167
+ let fModal = null;
168
+ if(modal.length) {
169
+ fModal = modal[0];
170
+ }
171
+ const carouselColumns = fModal.querySelector('.carousel-items .columns');
172
+ if(carouselColumns) {
173
+ carouselColumns.style.backgroundColor = '#fff';
174
+ }
175
+ document.body.insertAdjacentElement('afterbegin', fModal)
176
+ },
177
+
162
178
  async carouselChange(e) {
163
179
  this.collectionIndex = e
164
180
  this.reviewImageIndex = 0
@@ -181,6 +197,7 @@ export default {
181
197
  this.carouselModal = true
182
198
  this.$nextTick(() => {
183
199
  this.setArrowsVisibility(collection_idx)
200
+ this.attachModalToBody()
184
201
  })
185
202
  },
186
203
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikala/spmkt",
3
- "version": "2.29.3",
3
+ "version": "2.29.5",
4
4
  "private": false,
5
5
  "description": "supermarket",
6
6
  "scripts": {