@ppg_pl/pallete 2.0.22 → 2.0.25

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 (89) hide show
  1. package/README.md +12 -5
  2. package/dist/cjs/{index-53e78fc8.js → index-d74cbc0d.js} +33 -2
  3. package/dist/cjs/index-d74cbc0d.js.map +1 -0
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/loader.cjs.js.map +1 -1
  6. package/dist/cjs/my-backdrop_8.cjs.entry.js +1649 -1287
  7. package/dist/cjs/my-backdrop_8.cjs.entry.js.map +1 -1
  8. package/dist/cjs/pallete.cjs.js +2 -2
  9. package/dist/cjs/pallete.cjs.js.map +1 -1
  10. package/dist/collection/components/my-backdrop/my-backdrop.css +7 -0
  11. package/dist/collection/components/my-colorbox/my-colorbox.css +7 -0
  12. package/dist/collection/components/my-colorinfo/assets/Shape.svg +4 -0
  13. package/dist/collection/components/my-colorinfo/assets/close.png +0 -0
  14. package/dist/collection/components/my-colorinfo/assets/shape.png +0 -0
  15. package/dist/collection/components/my-colorinfo/my-colorinfo.js +124 -1
  16. package/dist/collection/components/my-colorinfo/my-colorinfo.js.map +1 -1
  17. package/dist/collection/components/my-component/my-component.js +68 -1
  18. package/dist/collection/components/my-component/my-component.js.map +1 -1
  19. package/dist/collection/components/my-modal/my-modal.css +140 -31
  20. package/dist/collection/components/my-modal/my-modal.js +42 -3
  21. package/dist/collection/components/my-modal/my-modal.js.map +1 -1
  22. package/dist/collection/components/my-search/my-search.css +7 -0
  23. package/dist/collection/components/my-slider/index.js +9 -6
  24. package/dist/collection/components/my-slider/index.js.map +1 -1
  25. package/dist/collection/components/my-slider/my-slider.css +12 -3
  26. package/dist/collection/types.js.map +1 -1
  27. package/dist/components/index3.js +10 -7
  28. package/dist/components/index3.js.map +1 -1
  29. package/dist/components/my-backdrop2.js +1 -1
  30. package/dist/components/my-backdrop2.js.map +1 -1
  31. package/dist/components/my-colorbox2.js +1 -1
  32. package/dist/components/my-colorbox2.js.map +1 -1
  33. package/dist/components/my-colorinfo2.js +42 -2
  34. package/dist/components/my-colorinfo2.js.map +1 -1
  35. package/dist/components/my-component.js +15 -3
  36. package/dist/components/my-component.js.map +1 -1
  37. package/dist/components/my-modal2.js +1589 -1274
  38. package/dist/components/my-modal2.js.map +1 -1
  39. package/dist/components/my-search2.js +1 -1
  40. package/dist/components/my-search2.js.map +1 -1
  41. package/dist/esm/{index-b0145abf.js → index-45a30349.js} +33 -2
  42. package/dist/esm/index-45a30349.js.map +1 -0
  43. package/dist/esm/loader.js +3 -3
  44. package/dist/esm/loader.js.map +1 -1
  45. package/dist/esm/my-backdrop_8.entry.js +1649 -1287
  46. package/dist/esm/my-backdrop_8.entry.js.map +1 -1
  47. package/dist/esm/pallete.js +3 -3
  48. package/dist/esm/pallete.js.map +1 -1
  49. package/dist/pallete/assets/Shape.svg +4 -0
  50. package/dist/pallete/assets/shape.png +0 -0
  51. package/dist/pallete/p-a3449132.js +3 -0
  52. package/dist/pallete/p-a3449132.js.map +1 -0
  53. package/dist/pallete/p-d142c667.entry.js +2 -0
  54. package/dist/pallete/p-d142c667.entry.js.map +1 -0
  55. package/dist/pallete/pallete.css +1 -1
  56. package/dist/pallete/pallete.esm.js +1 -1
  57. package/dist/pallete/pallete.esm.js.map +1 -1
  58. package/dist/types/components/my-colorinfo/my-colorinfo.d.ts +11 -1
  59. package/dist/types/components/my-component/my-component.d.ts +9 -0
  60. package/dist/types/components/my-modal/my-modal.d.ts +3 -1
  61. package/dist/types/components.d.ts +24 -2
  62. package/dist/types/types.d.ts +4 -0
  63. package/package.json +5 -4
  64. package/www/build/assets/Shape.svg +4 -0
  65. package/www/build/assets/shape.png +0 -0
  66. package/www/build/p-8c41f668.js +2 -0
  67. package/www/build/p-a3449132.js +3 -0
  68. package/www/build/p-a3449132.js.map +1 -0
  69. package/www/build/p-d142c667.entry.js +2 -0
  70. package/www/build/p-d142c667.entry.js.map +1 -0
  71. package/www/build/p-f8a0208d.css +1 -0
  72. package/www/build/pallete.css +1 -1
  73. package/www/build/pallete.esm.js +1 -1
  74. package/www/build/pallete.esm.js.map +1 -1
  75. package/www/index.html +62 -10
  76. package/dist/cjs/index-53e78fc8.js.map +0 -1
  77. package/dist/esm/index-b0145abf.js.map +0 -1
  78. package/dist/pallete/p-c49a7a8e.entry.js +0 -2
  79. package/dist/pallete/p-c49a7a8e.entry.js.map +0 -1
  80. package/dist/pallete/p-c6a049a2.js +0 -3
  81. package/dist/pallete/p-c6a049a2.js.map +0 -1
  82. package/www/build/p-c49a7a8e.entry.js +0 -2
  83. package/www/build/p-c49a7a8e.entry.js.map +0 -1
  84. package/www/build/p-c6a049a2.js +0 -3
  85. package/www/build/p-c6a049a2.js.map +0 -1
  86. /package/www/{build/assets → assets}/fonts/Galatea-Regular.eot +0 -0
  87. /package/www/{build/assets → assets}/fonts/Galatea-Regular.ttf +0 -0
  88. /package/www/{build/assets → assets}/fonts/Galatea-Regular.woff +0 -0
  89. /package/www/{build/assets → assets}/fonts/Galatea-Regular.woff2 +0 -0
@@ -1,3 +1,10 @@
1
+ @font-face {
2
+ font-family: "Galatea";
3
+ src: url("/assets/fonts/Galatea-Regular.woff2") format("woff2"), url("/assets/fonts/Galatea-Regular.woff") format("woff"), url("/assets/fonts/Galatea-Regular.ttf") format("truetype");
4
+ font-weight: normal;
5
+ font-style: normal;
6
+ font-display: swap;
7
+ }
1
8
  .pallete-wrapper * {
2
9
  font-family: "Galatea", sans-serif;
3
10
  }
@@ -179,6 +186,9 @@
179
186
  width: 40%;
180
187
  padding: 50px 40px;
181
188
  position: relative;
189
+ display: flex;
190
+ flex-direction: column;
191
+ justify-content: space-between;
182
192
  }
183
193
  @media (max-width: 1024px) {
184
194
  .my-modal__wrapper .boxes__box-content__info {
@@ -192,6 +202,11 @@
192
202
  min-height: auto;
193
203
  }
194
204
  }
205
+ .my-modal__wrapper .boxes__box-content__info__header {
206
+ display: flex;
207
+ flex-direction: column;
208
+ align-items: flex-start;
209
+ }
195
210
  .my-modal__wrapper .boxes__box-content__info h2 {
196
211
  font-size: 35px;
197
212
  font-weight: normal;
@@ -212,25 +227,16 @@
212
227
  font-size: 16px;
213
228
  color: #4c4c4c;
214
229
  }
215
- .my-modal__wrapper .boxes__box-content__info .divider {
216
- border: 1px solid #4c4c4c;
217
- opacity: 0.2;
218
- margin-bottom: 20px;
219
- }
220
- @media (max-width: 768px) {
221
- .my-modal__wrapper .boxes__box-content__info .divider {
222
- margin: 10px 0px;
223
- display: none;
224
- }
225
- }
226
230
  .my-modal__wrapper .boxes__box-content__info__value {
227
231
  display: flex;
228
- flex-direction: row;
229
- justify-content: flex-start;
232
+ flex-direction: column;
233
+ align-items: flex-start;
234
+ gap: 20px;
230
235
  }
231
236
  @media (max-width: 1024px) {
232
237
  .my-modal__wrapper .boxes__box-content__info__value {
233
238
  justify-content: flex-start;
239
+ margin-top: 30px;
234
240
  }
235
241
  }
236
242
  @media (max-width: 768px) {
@@ -299,6 +305,44 @@
299
305
  flex-direction: column;
300
306
  }
301
307
  }
308
+ .my-modal__wrapper .boxes__box-content__info__tester {
309
+ display: flex;
310
+ flex-direction: column;
311
+ gap: 15px;
312
+ width: 100%;
313
+ }
314
+ @media (max-width: 1024px) {
315
+ .my-modal__wrapper .boxes__box-content__info__tester {
316
+ text-align: center;
317
+ }
318
+ }
319
+ .my-modal__wrapper .boxes__box-content__info__tester .tester-text h2 {
320
+ margin: 0 0 10px;
321
+ font-size: 18px;
322
+ font-weight: 700;
323
+ }
324
+ .my-modal__wrapper .boxes__box-content__info__tester .tester-text p {
325
+ margin: 0;
326
+ font-size: 14px;
327
+ }
328
+ .my-modal__wrapper .boxes__box-content__info__tester .tester-buy {
329
+ display: flex;
330
+ align-items: center;
331
+ gap: 15px;
332
+ }
333
+ @media (max-width: 1024px) {
334
+ .my-modal__wrapper .boxes__box-content__info__tester .tester-buy {
335
+ flex-direction: column;
336
+ }
337
+ .my-modal__wrapper .boxes__box-content__info__tester .tester-buy button {
338
+ margin: 0;
339
+ max-width: 100%;
340
+ }
341
+ }
342
+ .my-modal__wrapper .boxes__box-content__info__tester .price {
343
+ font-size: 20px;
344
+ font-weight: 600;
345
+ }
302
346
  .my-modal__wrapper .boxes__box-content__slider {
303
347
  width: 60%;
304
348
  min-width: 60%;
@@ -323,7 +367,8 @@
323
367
  height: 300px;
324
368
  }
325
369
  }
326
- .my-modal__wrapper .boxes__box-content__white * {
370
+ .my-modal__wrapper .boxes__box-content__white .tester-text,
371
+ .my-modal__wrapper .boxes__box-content__white .tester-buy {
327
372
  color: #fff;
328
373
  }
329
374
  .my-modal__wrapper .boxes__box-content__white h2 {
@@ -384,8 +429,9 @@
384
429
  .my-modal .categories__slide-information span:last-of-type {
385
430
  margin-right: 7px;
386
431
  }
387
- .my-modal .button,
388
- .my-modal a {
432
+
433
+ .button,
434
+ a {
389
435
  background-color: #fff;
390
436
  font-size: 16px;
391
437
  box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.1);
@@ -398,46 +444,109 @@
398
444
  transition: all 0.7s ease-in-out;
399
445
  border: none;
400
446
  cursor: pointer;
447
+ display: flex;
448
+ align-items: center;
449
+ gap: 5px;
401
450
  }
402
- .my-modal .button:hover,
403
- .my-modal a:hover {
451
+ .button .shape-icon,
452
+ a .shape-icon {
453
+ display: inline-flex;
454
+ }
455
+ .button .shape-icon svg,
456
+ a .shape-icon svg {
457
+ display: block;
458
+ }
459
+ .button .shape-icon path,
460
+ .button .shape-icon .shape-icon__path,
461
+ a .shape-icon path,
462
+ a .shape-icon .shape-icon__path {
463
+ fill: currentColor;
464
+ transition: fill 0.7s ease-in-out;
465
+ }
466
+ .button.fit,
467
+ a.fit {
468
+ padding: 10px 15px;
469
+ }
470
+ .button:hover,
471
+ a:hover {
404
472
  color: #fff;
405
473
  background-color: #232323;
406
474
  }
407
- .my-modal .button.brown,
408
- .my-modal a.brown {
475
+ .button.brown,
476
+ a.brown {
409
477
  background-color: #3c2114;
410
478
  color: #fff;
411
479
  }
412
- .my-modal .button.brown:hover,
413
- .my-modal a.brown:hover {
480
+ .button.brown:hover,
481
+ a.brown:hover {
414
482
  color: #fff;
415
483
  background-color: #232323;
416
484
  }
417
- .my-modal .button.inverse,
418
- .my-modal a.inverse {
485
+ .button.inverse,
486
+ a.inverse {
419
487
  background-color: #232323;
420
488
  color: #fff;
421
489
  }
422
- .my-modal .button.inverse:hover,
423
- .my-modal a.inverse:hover {
490
+ .button.inverse:hover,
491
+ a.inverse:hover {
424
492
  color: #232323;
425
493
  background-color: #fff;
426
494
  }
495
+ .button.inverse svg path,
496
+ a.inverse svg path {
497
+ fill: #fff;
498
+ }
499
+ .button:disabled,
500
+ a:disabled {
501
+ cursor: not-allowed;
502
+ background-color: white;
503
+ opacity: 0.5;
504
+ }
505
+ .button:disabled.brown,
506
+ a:disabled.brown {
507
+ background-color: black;
508
+ color: white;
509
+ opacity: 0.5;
510
+ }
511
+ .button:disabled.inverse,
512
+ a:disabled.inverse {
513
+ background-color: black;
514
+ color: white;
515
+ opacity: 0.5;
516
+ }
517
+ .button:disabled:hover,
518
+ a:disabled:hover {
519
+ background-color: inherit;
520
+ color: inherit;
521
+ opacity: 0.5;
522
+ }
427
523
  @media (max-width: 1024px) {
428
- .my-modal .button,
429
- .my-modal a {
524
+ .button,
525
+ a {
430
526
  max-width: 150px;
431
527
  font-size: 13px;
432
528
  padding: 12px 25px;
433
529
  }
434
530
  }
435
531
  @media (max-width: 768px) {
436
- .my-modal .button,
437
- .my-modal a {
532
+ .button,
533
+ a {
438
534
  margin: 0 auto;
439
535
  }
440
536
  }
441
- .my-modal > .button {
537
+
538
+ > .button {
442
539
  margin: 10px auto;
540
+ }
541
+
542
+ .divider {
543
+ border: 1px solid #4c4c4c;
544
+ opacity: 0.2;
545
+ margin-bottom: 20px;
546
+ }
547
+ @media (max-width: 768px) {
548
+ .divider {
549
+ margin: 10px 0px;
550
+ display: none;
551
+ }
443
552
  }
@@ -178,6 +178,8 @@ export class MyModal {
178
178
  this.shop = undefined;
179
179
  this.product = undefined;
180
180
  this.baselink = undefined;
181
+ this.available_testers = undefined;
182
+ this.price = undefined;
181
183
  this.selectedcolor = undefined;
182
184
  this.closeImage = 'close.png';
183
185
  this.arrowDown = 'arrow_down.png';
@@ -269,7 +271,7 @@ export class MyModal {
269
271
  if (!this.colorIsSelected) {
270
272
  const result = this.chunks(this.colors.list)
271
273
  .map((innerArray, arrayIndex) => {
272
- const foundColor = innerArray.find(color => { var _a, _b; return color.name.trim() === ((_b = (_a = this.selectedcolor) === null || _a === void 0 ? void 0 : _a.trim()) === null || _b === void 0 ? void 0 : _b.toUpperCase()); });
274
+ const foundColor = innerArray.find(color => { var _a, _b, _c; return ((_a = color.name.trim()) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === ((_c = (_b = this.selectedcolor) === null || _b === void 0 ? void 0 : _b.trim()) === null || _c === void 0 ? void 0 : _c.toUpperCase()); });
273
275
  return foundColor ? { color: foundColor, index: arrayIndex } : null;
274
276
  })
275
277
  .filter(item => item !== null);
@@ -295,7 +297,7 @@ export class MyModal {
295
297
  render() {
296
298
  var _a, _b;
297
299
  return (h("div", { class: `my-modal`, onMouseEnter: () => this.handleReadyToClose(false), onMouseLeave: () => this.handleReadyToClose(true) }, this.preloader && (h("div", { class: 'loader' }, h("my-loader", null))), !this.preloader && this.data && (h("div", { class: `my-modal__header` }, h("div", { class: "image-wrapper" }, h("img", { src: `${APIURL}/assets/${(_a = this.data) === null || _a === void 0 ? void 0 : _a.modalLogo}?access_token=${accessToken}`, alt: "modal-logo" }), !this.preloader && this.data && (h("p", { class: "my-modal__see-more" }, (_b = this.data) === null || _b === void 0 ? void 0 : _b.modalDescription))), h("div", { class: "search-wrapper" }, !this.preloader && h("my-search", { shopname: this.shop, productname: this.data.name, isMobile: this.isMobile }), !this.preloader && (h("button", { class: "my-modal__close", onClick: () => this.closeModalHandler() }, h("img", { src: getAssetPath(`./assets/${this.closeImage}`), alt: "closebtn" })))))), h("div", { class: 'my-modal__wrapper' }, this.loading && h("my-loader", null), !this.loading && this.colors && (h("div", { class: 'container_boxes' }, this.colors.list.length > 0 ? (this.chunks(this.colors.list).map((color, index) => {
298
- var _a;
300
+ var _a, _b;
299
301
  return (h("div", { key: index, class: "boxes" }, h("div", { class: "boxes__list" }, color.map((c) => {
300
302
  var _a;
301
303
  return (h("my-colorbox", { key: c.id, onClick: () => {
@@ -315,7 +317,7 @@ export class MyModal {
315
317
  isImageInsteadHex: c.imageInsteadHex,
316
318
  bigImage: c.bigImage,
317
319
  } }));
318
- })), ((_a = this.currentColor) === null || _a === void 0 ? void 0 : _a.id) && index === this.currentIndex && (h("my-colorinfo", { currentColor: this.currentColor, shop: this.shop, product: this.product, data: this.data, isMobile: this.isMobile, infoBoxWidth: this.infoBoxWidth, baselink: this.baselink }))));
320
+ })), ((_a = this.currentColor) === null || _a === void 0 ? void 0 : _a.id) && index === this.currentIndex && (h("my-colorinfo", { currentColor: this.currentColor, shop: this.shop, product: this.product, data: this.data, isMobile: this.isMobile, infoBoxWidth: this.infoBoxWidth, baselink: this.baselink, availableTesters: (_b = this.available_testers) === null || _b === void 0 ? void 0 : _b.find((t) => { var _a, _b, _c; return ((_a = t.color_name) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase()) === ((_c = (_b = this.currentColor) === null || _b === void 0 ? void 0 : _b.name) === null || _c === void 0 ? void 0 : _c.trim().toLowerCase()); }), price: this.price }))));
319
321
  })) : (h("p", null, "Brak wynik\u00F3w")), this.colors.pagination.filter_count > limit && (h("div", { class: 'pagination' }, Array.from({ length: Math.ceil(this.colors.pagination.filter_count / limit) }).map((_, i) => (h("span", { class: i + 1 === this.page ? 'current' : '', onClick: e => {
320
322
  e.preventDefault();
321
323
  this.onPage(i + 1);
@@ -386,6 +388,43 @@ export class MyModal {
386
388
  "attribute": "baselink",
387
389
  "reflect": false
388
390
  },
391
+ "available_testers": {
392
+ "type": "unknown",
393
+ "mutable": false,
394
+ "complexType": {
395
+ "original": "AvailableTester[] | null",
396
+ "resolved": "AvailableTester[] | null",
397
+ "references": {
398
+ "AvailableTester": {
399
+ "location": "import",
400
+ "path": "../../types"
401
+ }
402
+ }
403
+ },
404
+ "required": false,
405
+ "optional": false,
406
+ "docs": {
407
+ "tags": [],
408
+ "text": ""
409
+ }
410
+ },
411
+ "price": {
412
+ "type": "number",
413
+ "mutable": false,
414
+ "complexType": {
415
+ "original": "number | null",
416
+ "resolved": "null | number",
417
+ "references": {}
418
+ },
419
+ "required": false,
420
+ "optional": false,
421
+ "docs": {
422
+ "tags": [],
423
+ "text": ""
424
+ },
425
+ "attribute": "price",
426
+ "reflect": false
427
+ },
389
428
  "selectedcolor": {
390
429
  "type": "string",
391
430
  "mutable": false,
@@ -1 +1 @@
1
- {"version":3,"file":"my-modal.js","sourceRoot":"","sources":["../../../src/components/my-modal/my-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC7H,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7G,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAavC,MAAM,OAAO,OAAO;EAoClB;IAnCQ,oBAAe,GAAG,GAAG,CAAC;IACtB,mBAAc,GAAG,EAAE,CAAC;IACpB,mBAAc,GAAG,EAAE,CAAC;IACpB,kBAAa,GAAG,EAAE,CAAC;IACnB,qBAAgB,GAAG,IAAI,CAAC;IAkDxB,kBAAa,GAAG,GAAG,EAAE;MAC3B,IAAI,CAAC,kBAAkB,IAAI,aAAa,CAAC,I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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Method, Element, Prop, Event, EventEmitter, h, State, getAssetPath, Listen, Watch } from '@stencil/core';\nimport { APIURL, ApiService, accessToken } from '../api';\nimport { setDataLayer } from '../../gtmUtils';\nimport { Color, PaginationData, Product, ProductShopRelation } from '../../types';\nimport { fetchCategoryColorsQuery, fetchColorByName, fetchProductColorsQuery, limit } from '../api/services';\nimport { debounce } from '../../utils';\n\ndeclare global {\n interface Window {\n dataLayer: Record<string, any>[];\n }\n}\n\n@Component({\n tag: 'my-modal',\n styleUrl: 'my-modal.scss',\n assetsDirs: ['assets'],\n})\nexport class MyModal {\n private boxDesktopWidth = 130;\n private boxMobileWidth = 70;\n private desktopPadding = 75;\n private mobilePadding = 35;\n private mediumBreakpoint = 1024;\n private colorTimerInterval: ReturnType<typeof setInterval> | undefined;\n\n @Event({ bubbles: true, composed: true }) clearSearchText: EventEmitter;\n @Element() modalEl: HTMLElement;\n\n @Prop() shop: string;\n @Prop() product: string;\n @Prop() baselink: string;\n @Prop() selectedcolor: string | null;\n @Prop() closeImage = 'close.png';\n @Prop() arrowDown = 'arrow_down.png';\n\n @State() chunksNum = 12;\n @State() data: Product | null = null;\n @State() preloader = false;\n @State() loading = false;\n @State() colors: PaginationData<Color> | null = null;\n @State() currentColor: Color | null = null;\n @State() currentIndex: number | null = null;\n @State() infoBoxWidth: number | null = null;\n @State() boxWidth: number = this.boxDesktopWidth; // box width with gap\n @State() padding: number = this.desktopPadding;\n @State() isMobile: boolean = false;\n @State() showRange: boolean = false;\n @State() colorCategories: string[] | null = null;\n @State() selectedCategory: any = null;\n @State() page = 1;\n @State() colorIsSelected = false;\n debouncedSearchColorsHandler: (event: CustomEvent) => void;\n\n constructor() {\n this.debouncedSearchColorsHandler = debounce(this.searchColor.bind(this), 300);\n }\n\n @Watch('chunksNum')\n setInfoBoxWidth(newValue: number) {\n this.infoBoxWidth = newValue * this.boxWidth;\n }\n\n @Watch('data')\n watchPropHandler(newValue: Product) {\n if (newValue.Category.length > 0) {\n this.showRange = true;\n this.handleCategoryClick(newValue.Category[0].Category_id.id);\n } else {\n this.fetchProductColors(String(newValue.id));\n }\n }\n\n private clearInterval = () => {\n this.colorTimerInterval && clearInterval(this.colorTimerInterval);\n this.colorTimerInterval = undefined;\n };\n\n private colorTimer = () => {\n if (this.currentColor && this.currentColor.id) {\n this.colorTimerInterval = setInterval(() => {\n this.currentColor?.name &&\n setDataLayer({\n event: 'ColorTimer',\n shop: this.shop,\n product: this.product,\n color: this.currentColor?.name,\n timer: '10',\n });\n }, 10000);\n } else {\n this.clearInterval();\n }\n };\n\n @Method()\n async open() {\n this.modalEl.style.display = 'block';\n }\n @Event() close: EventEmitter;\n closeModalHandler() {\n this.close.emit();\n }\n\n @Event() readyToCLose: EventEmitter;\n handleReadyToClose(value: boolean) {\n this.readyToCLose.emit({ observable: value });\n }\n\n @Listen('closeInfoBox')\n closeInfoBoxHandler() {\n this.currentColor = null;\n this.currentIndex = null;\n }\n\n private chunks = (xs: Color[], y: Color[][] = []): Color[][] => {\n return xs.length === 0 ? y : this.chunks(xs.slice(this.chunksNum), y.concat([xs.slice(0, this.chunksNum)]));\n };\n\n private calculateBoxCount = () => {\n const modalWidth = this.modalEl.children && this.modalEl.children[0] && this.modalEl.children[0]?.clientWidth - this.padding;\n const boxWidth = this.boxWidth;\n\n const calc = Math.floor(modalWidth / boxWidth);\n\n const boxesCount = calc;\n\n if (!this.preloader) this.chunksNum = boxesCount;\n };\n\n private displayForMobile = () => {\n if (window.innerWidth < this.mediumBreakpoint) {\n this.boxWidth = this.boxMobileWidth;\n this.padding = this.mobilePadding;\n this.isMobile = true;\n } else {\n this.isMobile = false;\n this.boxWidth = this.boxDesktopWidth;\n this.padding = this.desktopPadding;\n }\n };\n\n @Listen('resize', { target: 'window' })\n handleResize() {\n this.calculateBoxCount();\n this.displayForMobile();\n }\n\n private fetchProductData = async () => {\n try {\n const shopResponse = await ApiService.getData(`items/Shop?filter[name][_eq]=${this.shop}`);\n const shop = shopResponse?.data[0];\n if (shop.id) {\n const response = await ApiService.getData(`items/Product?filter[name][_eq]=${this.product}&fields=*,images.*,Shop.*,Category.*.*.*.*`);\n const product = response?.data[0];\n\n if (product) {\n if (product.Shop.find((s: ProductShopRelation) => s.Shop_id === shop.id)) {\n this.data = {\n ...response.data[0],\n id: response.data[0].id,\n };\n } else {\n return null;\n }\n }\n }\n } catch (error) {\n console.error(error);\n } finally {\n this.preloader = false;\n }\n };\n\n private fetchProductColors = async (id: string, page?: number) => {\n this.loading = true;\n\n try {\n const response = await ApiService.getData(`items/Color?${fetchProductColorsQuery(id, page)}`);\n\n if (response) {\n this.colors = {\n list:\n response &&\n response.data &&\n response.data.map((item: Color) => ({\n ...item,\n })),\n pagination: response.meta,\n };\n }\n } catch (error) {\n console.error(error);\n } finally {\n this.loading = false;\n }\n };\n\n private fetchCategoryColors = async (id: number, page?: number) => {\n this.loading = true;\n\n try {\n const response = await ApiService.getData(`items/Color?${fetchCategoryColorsQuery(id, page)}`);\n\n if (response) {\n this.colors = {\n list:\n response &&\n response.data &&\n response.data.map((item: Color) => ({\n ...item,\n })),\n pagination: response.meta,\n };\n }\n } catch (error) {\n console.error(error);\n } finally {\n this.loading = false;\n }\n };\n\n async searchColor(event: CustomEvent) {\n if (event.detail === '') {\n this.fetchProductData();\n this.loading = true;\n } else {\n if (!this.data?.id) {\n return;\n }\n try {\n const response = await ApiService.getData(`items/Color?${fetchColorByName(this.data?.id, event.detail)}`);\n\n if (response) {\n this.colors = {\n list:\n response &&\n response.data &&\n response.data.map((item: Color) => ({\n ...item,\n })),\n pagination: response.meta,\n };\n }\n } catch (error) {\n console.error(error);\n } finally {\n this.loading = false;\n }\n }\n }\n\n @Listen('searchColors')\n searchColorsHandler(event: CustomEvent) {\n this.loading = true;\n this.currentColor = null;\n this.debouncedSearchColorsHandler(event);\n }\n\n private handleCategoryClick = (color?: number) => {\n if (this.selectedCategory && color && this.selectedCategory === color && !this.showRange) {\n this.data && this.fetchProductColors(String(this.data.id));\n this.selectedCategory = null;\n } else {\n color && this.fetchCategoryColors(color);\n this.selectedCategory = color;\n }\n this.currentColor = null;\n this.clearSearchText.emit();\n };\n\n // async searchColorsHandler(event: CustomEvent) {\n // this.loading = true;\n // this.currentColor = null;\n\n // // if search is empty set to first category to not showing whole product colors\n // if (event.detail === '') {\n // this.handleCategoryClick(this.selectedCategory);\n // this.loading = true;\n // }\n\n // try {\n // if (this.data && this.data.id && event.detail !== '') {\n // const response = await ApiService.getData(`items/Color?${fetchColorByNumber(Number(this.selectedCategory), event.detail)}`);\n // if (response) {\n // this.colors = {\n // list:\n // (response &&\n // response.data &&\n // response.data.map((item: Color) => ({\n // ...item,\n // }))) ||\n // [],\n // pagination: response.meta,\n // };\n // }\n // }\n // } catch (error) {\n // console.error(error);\n // } finally {\n // this.loading = false;\n // }\n // }\n private onPage = (page: number) => {\n if (this.data) {\n if (this.selectedCategory) {\n this.fetchCategoryColors(this.selectedCategory, page);\n } else {\n this.fetchProductColors(String(this.data.id), page);\n }\n }\n\n this.page = page;\n this.currentColor = null;\n this.currentIndex = null;\n };\n\n private openSeletedColor() {\n if (!this.colors?.list || !this.selectedcolor) return;\n\n if (!this.colorIsSelected) {\n const result = this.chunks(this.colors.list)\n .map((innerArray, arrayIndex) => {\n const foundColor = innerArray.find(color => color.name.trim() === this.selectedcolor?.trim()?.toUpperCase());\n\n return foundColor ? { color: foundColor, index: arrayIndex } : null;\n })\n .filter(item => item !== null);\n\n this.currentColor = result[0]?.color as any;\n this.currentIndex = result[0]?.index as any;\n this.colorIsSelected = true;\n }\n }\n\n componentWillLoad() {\n this.preloader = true;\n this.fetchProductData();\n setDataLayer({\n shop: this.shop,\n product: this.product,\n });\n }\n\n componentWillRender() {\n this.displayForMobile();\n this.calculateBoxCount();\n this.colorTimer();\n this.openSeletedColor();\n }\n\n render() {\n return (\n <div class={`my-modal`} onMouseEnter={() => this.handleReadyToClose(false)} onMouseLeave={() => this.handleReadyToClose(true)}>\n {this.preloader && (\n <div class={'loader'}>\n <my-loader></my-loader>\n </div>\n )}\n {!this.preloader && this.data && (\n <div class={`my-modal__header`}>\n <div class=\"image-wrapper\">\n <img src={`${APIURL}/assets/${this.data?.modalLogo}?access_token=${accessToken}`} alt=\"modal-logo\" />\n {!this.preloader && this.data && (\n <p class=\"my-modal__see-more\">\n {this.data?.modalDescription}\n {/* <img src={getAssetPath(`./assets/${this.arrowDown}`)} alt=\"arrow_down\" /> */}\n </p>\n )}\n </div>\n <div class=\"search-wrapper\">\n {!this.preloader && <my-search shopname={this.shop} productname={this.data.name} isMobile={this.isMobile}></my-search>}\n {!this.preloader && (\n <button class=\"my-modal__close\" onClick={() => this.closeModalHandler()}>\n <img src={getAssetPath(`./assets/${this.closeImage}`)} alt=\"closebtn\" />\n </button>\n )}\n </div>\n </div>\n )}\n\n {/* {this.showRange && (\n <div class={'categories'}>\n {this.data && <my-search productId={Number(this.data?.id)} isMobile={this.isMobile}></my-search>}\n\n <div class={'categories__container'} style={{ maxWidth: `${this.infoBoxWidth}px` }}>\n {this.data?.Category.map((c: ProductCategoryRelation) => (\n <my-colorbox\n key={c.id}\n onClick={() => this.handleCategoryClick(c.Category_id.id)}\n color={c.Category_id.hex}\n name={c.Category_id.category_name}\n shop={this.shop}\n product={this.product}\n isCategoryActive={this.selectedCategory === c.Category_id.id}\n isImageInsteadHex={{\n isImageInsteadHex: c?.imageInsteadHex || false,\n bigImage: c?.bigImage || '',\n }}\n ></my-colorbox>\n ))}\n </div>\n {this.isMobile && (\n <div class={'categories__slide-information'} style={{ width: `${this.infoBoxWidth}px` }}>\n <span>Przewiń w lewo</span>\n <span>Przewiń w prawo</span>\n </div>\n )}\n </div>\n )} */}\n <div class={'my-modal__wrapper'}>\n {this.loading && <my-loader></my-loader>}\n {!this.loading && this.colors && (\n <div class={'container_boxes'}>\n {this.colors.list.length > 0 ? (\n this.chunks(this.colors.list).map((color: Color[], index: number) => {\n return (\n <div key={index} class=\"boxes\">\n <div class=\"boxes__list\">\n {color.map((c: Color) => (\n <my-colorbox\n key={c.id}\n onClick={() => [\n this.currentColor?.id ? (this.currentColor?.id === c.id ? (this.currentColor = null) : (this.currentColor = c)) : (this.currentColor = c),\n (this.currentIndex = index),\n setDataLayer({\n event: 'ColorClick',\n shop: this.shop,\n product: this.product,\n color: c.name,\n }),\n this.currentColor?.id && this.clearInterval(),\n ]}\n color={c.hex}\n name={c.name}\n isActive={this.currentColor?.id === c.id}\n shop={this.shop}\n product={this.product}\n isImageInsteadHex={{\n isImageInsteadHex: c.imageInsteadHex,\n bigImage: c.bigImage,\n }}\n ></my-colorbox>\n ))}\n </div>\n\n {this.currentColor?.id && index === this.currentIndex && (\n <my-colorinfo\n currentColor={this.currentColor}\n shop={this.shop}\n product={this.product}\n data={this.data}\n isMobile={this.isMobile}\n infoBoxWidth={this.infoBoxWidth}\n baselink={this.baselink}\n ></my-colorinfo>\n )}\n </div>\n );\n })\n ) : (\n <p>Brak wyników</p>\n )}\n {this.colors.pagination.filter_count > limit && (\n <div class={'pagination'}>\n {Array.from({ length: Math.ceil(this.colors.pagination.filter_count / limit) }).map((_, i) => (\n <span\n class={i + 1 === this.page ? 'current' : ''}\n onClick={e => {\n e.preventDefault();\n this.onPage(i + 1);\n }}\n key={`#${i + 1}`}\n >\n {i + 1}\n </span>\n ))}\n </div>\n )}\n </div>\n )}\n </div>\n {!this.preloader && this.isMobile && (\n <button class=\"button\" onClick={() => this.closeModalHandler()}>\n Zamknij\n </button>\n )}\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"my-modal.js","sourceRoot":"","sources":["../../../src/components/my-modal/my-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,M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;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Method, Element, Prop, Event, EventEmitter, h, State, getAssetPath, Listen, Watch } from '@stencil/core';\nimport { APIURL, ApiService, accessToken } from '../api';\nimport { setDataLayer } from '../../gtmUtils';\nimport { AvailableTester, Color, PaginationData, Product, ProductShopRelation } from '../../types';\nimport { fetchCategoryColorsQuery, fetchColorByName, fetchProductColorsQuery, limit } from '../api/services';\nimport { debounce } from '../../utils';\n\ndeclare global {\n interface Window {\n dataLayer: Record<string, any>[];\n }\n}\n\n@Component({\n tag: 'my-modal',\n styleUrl: 'my-modal.scss',\n assetsDirs: ['assets'],\n})\nexport class MyModal {\n private boxDesktopWidth = 130;\n private boxMobileWidth = 70;\n private desktopPadding = 75;\n private mobilePadding = 35;\n private mediumBreakpoint = 1024;\n private colorTimerInterval: ReturnType<typeof setInterval> | undefined;\n\n @Event({ bubbles: true, composed: true }) clearSearchText: EventEmitter;\n @Element() modalEl: HTMLElement;\n\n @Prop() shop: string;\n @Prop() product: string;\n @Prop() baselink: string;\n @Prop() available_testers: AvailableTester[] | null;\n @Prop() price: number | null;\n @Prop() selectedcolor: string | null;\n @Prop() closeImage = 'close.png';\n @Prop() arrowDown = 'arrow_down.png';\n\n @State() chunksNum = 12;\n @State() data: Product | null = null;\n @State() preloader = false;\n @State() loading = false;\n @State() colors: PaginationData<Color> | null = null;\n @State() currentColor: Color | null = null;\n @State() currentIndex: number | null = null;\n @State() infoBoxWidth: number | null = null;\n @State() boxWidth: number = this.boxDesktopWidth; // box width with gap\n @State() padding: number = this.desktopPadding;\n @State() isMobile: boolean = false;\n @State() showRange: boolean = false;\n @State() colorCategories: string[] | null = null;\n @State() selectedCategory: any = null;\n @State() page = 1;\n @State() colorIsSelected = false;\n debouncedSearchColorsHandler: (event: CustomEvent) => void;\n\n constructor() {\n this.debouncedSearchColorsHandler = debounce(this.searchColor.bind(this), 300);\n }\n\n @Watch('chunksNum')\n setInfoBoxWidth(newValue: number) {\n this.infoBoxWidth = newValue * this.boxWidth;\n }\n\n @Watch('data')\n watchPropHandler(newValue: Product) {\n if (newValue.Category.length > 0) {\n this.showRange = true;\n this.handleCategoryClick(newValue.Category[0].Category_id.id);\n } else {\n this.fetchProductColors(String(newValue.id));\n }\n }\n\n private clearInterval = () => {\n this.colorTimerInterval && clearInterval(this.colorTimerInterval);\n this.colorTimerInterval = undefined;\n };\n\n private colorTimer = () => {\n if (this.currentColor && this.currentColor.id) {\n this.colorTimerInterval = setInterval(() => {\n this.currentColor?.name &&\n setDataLayer({\n event: 'ColorTimer',\n shop: this.shop,\n product: this.product,\n color: this.currentColor?.name,\n timer: '10',\n });\n }, 10000);\n } else {\n this.clearInterval();\n }\n };\n\n @Method()\n async open() {\n this.modalEl.style.display = 'block';\n }\n @Event() close: EventEmitter;\n closeModalHandler() {\n this.close.emit();\n }\n\n @Event() readyToCLose: EventEmitter;\n handleReadyToClose(value: boolean) {\n this.readyToCLose.emit({ observable: value });\n }\n\n @Listen('closeInfoBox')\n closeInfoBoxHandler() {\n this.currentColor = null;\n this.currentIndex = null;\n }\n\n private chunks = (xs: Color[], y: Color[][] = []): Color[][] => {\n return xs.length === 0 ? y : this.chunks(xs.slice(this.chunksNum), y.concat([xs.slice(0, this.chunksNum)]));\n };\n\n private calculateBoxCount = () => {\n const modalWidth = this.modalEl.children && this.modalEl.children[0] && this.modalEl.children[0]?.clientWidth - this.padding;\n const boxWidth = this.boxWidth;\n\n const calc = Math.floor(modalWidth / boxWidth);\n\n const boxesCount = calc;\n\n if (!this.preloader) this.chunksNum = boxesCount;\n };\n\n private displayForMobile = () => {\n if (window.innerWidth < this.mediumBreakpoint) {\n this.boxWidth = this.boxMobileWidth;\n this.padding = this.mobilePadding;\n this.isMobile = true;\n } else {\n this.isMobile = false;\n this.boxWidth = this.boxDesktopWidth;\n this.padding = this.desktopPadding;\n }\n };\n\n @Listen('resize', { target: 'window' })\n handleResize() {\n this.calculateBoxCount();\n this.displayForMobile();\n }\n\n private fetchProductData = async () => {\n try {\n const shopResponse = await ApiService.getData(`items/Shop?filter[name][_eq]=${this.shop}`);\n const shop = shopResponse?.data[0];\n if (shop.id) {\n const response = await ApiService.getData(`items/Product?filter[name][_eq]=${this.product}&fields=*,images.*,Shop.*,Category.*.*.*.*`);\n const product = response?.data[0];\n\n if (product) {\n if (product.Shop.find((s: ProductShopRelation) => s.Shop_id === shop.id)) {\n this.data = {\n ...response.data[0],\n id: response.data[0].id,\n };\n } else {\n return null;\n }\n }\n }\n } catch (error) {\n console.error(error);\n } finally {\n this.preloader = false;\n }\n };\n\n private fetchProductColors = async (id: string, page?: number) => {\n this.loading = true;\n\n try {\n const response = await ApiService.getData(`items/Color?${fetchProductColorsQuery(id, page)}`);\n\n if (response) {\n this.colors = {\n list:\n response &&\n response.data &&\n response.data.map((item: Color) => ({\n ...item,\n })),\n pagination: response.meta,\n };\n }\n } catch (error) {\n console.error(error);\n } finally {\n this.loading = false;\n }\n };\n\n private fetchCategoryColors = async (id: number, page?: number) => {\n this.loading = true;\n\n try {\n const response = await ApiService.getData(`items/Color?${fetchCategoryColorsQuery(id, page)}`);\n\n if (response) {\n this.colors = {\n list:\n response &&\n response.data &&\n response.data.map((item: Color) => ({\n ...item,\n })),\n pagination: response.meta,\n };\n }\n } catch (error) {\n console.error(error);\n } finally {\n this.loading = false;\n }\n };\n\n async searchColor(event: CustomEvent) {\n if (event.detail === '') {\n this.fetchProductData();\n this.loading = true;\n } else {\n if (!this.data?.id) {\n return;\n }\n try {\n const response = await ApiService.getData(`items/Color?${fetchColorByName(this.data?.id, event.detail)}`);\n\n if (response) {\n this.colors = {\n list:\n response &&\n response.data &&\n response.data.map((item: Color) => ({\n ...item,\n })),\n pagination: response.meta,\n };\n }\n } catch (error) {\n console.error(error);\n } finally {\n this.loading = false;\n }\n }\n }\n\n @Listen('searchColors')\n searchColorsHandler(event: CustomEvent) {\n this.loading = true;\n this.currentColor = null;\n this.debouncedSearchColorsHandler(event);\n }\n\n private handleCategoryClick = (color?: number) => {\n if (this.selectedCategory && color && this.selectedCategory === color && !this.showRange) {\n this.data && this.fetchProductColors(String(this.data.id));\n this.selectedCategory = null;\n } else {\n color && this.fetchCategoryColors(color);\n this.selectedCategory = color;\n }\n this.currentColor = null;\n this.clearSearchText.emit();\n };\n\n // async searchColorsHandler(event: CustomEvent) {\n // this.loading = true;\n // this.currentColor = null;\n\n // // if search is empty set to first category to not showing whole product colors\n // if (event.detail === '') {\n // this.handleCategoryClick(this.selectedCategory);\n // this.loading = true;\n // }\n\n // try {\n // if (this.data && this.data.id && event.detail !== '') {\n // const response = await ApiService.getData(`items/Color?${fetchColorByNumber(Number(this.selectedCategory), event.detail)}`);\n // if (response) {\n // this.colors = {\n // list:\n // (response &&\n // response.data &&\n // response.data.map((item: Color) => ({\n // ...item,\n // }))) ||\n // [],\n // pagination: response.meta,\n // };\n // }\n // }\n // } catch (error) {\n // console.error(error);\n // } finally {\n // this.loading = false;\n // }\n // }\n private onPage = (page: number) => {\n if (this.data) {\n if (this.selectedCategory) {\n this.fetchCategoryColors(this.selectedCategory, page);\n } else {\n this.fetchProductColors(String(this.data.id), page);\n }\n }\n\n this.page = page;\n this.currentColor = null;\n this.currentIndex = null;\n };\n\n private openSeletedColor() {\n if (!this.colors?.list || !this.selectedcolor) return;\n\n if (!this.colorIsSelected) {\n const result = this.chunks(this.colors.list)\n .map((innerArray, arrayIndex) => {\n const foundColor = innerArray.find(color => color.name.trim()?.toUpperCase() === this.selectedcolor?.trim()?.toUpperCase());\n\n return foundColor ? { color: foundColor, index: arrayIndex } : null;\n })\n .filter(item => item !== null);\n\n this.currentColor = result[0]?.color as any;\n this.currentIndex = result[0]?.index as any;\n this.colorIsSelected = true;\n }\n }\n\n componentWillLoad() {\n this.preloader = true;\n this.fetchProductData();\n setDataLayer({\n shop: this.shop,\n product: this.product,\n });\n }\n\n componentWillRender() {\n this.displayForMobile();\n this.calculateBoxCount();\n this.colorTimer();\n this.openSeletedColor();\n }\n\n render() {\n return (\n <div class={`my-modal`} onMouseEnter={() => this.handleReadyToClose(false)} onMouseLeave={() => this.handleReadyToClose(true)}>\n {this.preloader && (\n <div class={'loader'}>\n <my-loader></my-loader>\n </div>\n )}\n {!this.preloader && this.data && (\n <div class={`my-modal__header`}>\n <div class=\"image-wrapper\">\n <img src={`${APIURL}/assets/${this.data?.modalLogo}?access_token=${accessToken}`} alt=\"modal-logo\" />\n {!this.preloader && this.data && (\n <p class=\"my-modal__see-more\">\n {this.data?.modalDescription}\n {/* <img src={getAssetPath(`./assets/${this.arrowDown}`)} alt=\"arrow_down\" /> */}\n </p>\n )}\n </div>\n <div class=\"search-wrapper\">\n {!this.preloader && <my-search shopname={this.shop} productname={this.data.name} isMobile={this.isMobile}></my-search>}\n {!this.preloader && (\n <button class=\"my-modal__close\" onClick={() => this.closeModalHandler()}>\n <img src={getAssetPath(`./assets/${this.closeImage}`)} alt=\"closebtn\" />\n </button>\n )}\n </div>\n </div>\n )}\n\n {/* {this.showRange && (\n <div class={'categories'}>\n {this.data && <my-search productId={Number(this.data?.id)} isMobile={this.isMobile}></my-search>}\n\n <div class={'categories__container'} style={{ maxWidth: `${this.infoBoxWidth}px` }}>\n {this.data?.Category.map((c: ProductCategoryRelation) => (\n <my-colorbox\n key={c.id}\n onClick={() => this.handleCategoryClick(c.Category_id.id)}\n color={c.Category_id.hex}\n name={c.Category_id.category_name}\n shop={this.shop}\n product={this.product}\n isCategoryActive={this.selectedCategory === c.Category_id.id}\n isImageInsteadHex={{\n isImageInsteadHex: c?.imageInsteadHex || false,\n bigImage: c?.bigImage || '',\n }}\n ></my-colorbox>\n ))}\n </div>\n {this.isMobile && (\n <div class={'categories__slide-information'} style={{ width: `${this.infoBoxWidth}px` }}>\n <span>Przewiń w lewo</span>\n <span>Przewiń w prawo</span>\n </div>\n )}\n </div>\n )} */}\n <div class={'my-modal__wrapper'}>\n {this.loading && <my-loader></my-loader>}\n {!this.loading && this.colors && (\n <div class={'container_boxes'}>\n {this.colors.list.length > 0 ? (\n this.chunks(this.colors.list).map((color: Color[], index: number) => {\n return (\n <div key={index} class=\"boxes\">\n <div class=\"boxes__list\">\n {color.map((c: Color) => (\n <my-colorbox\n key={c.id}\n onClick={() => [\n this.currentColor?.id ? (this.currentColor?.id === c.id ? (this.currentColor = null) : (this.currentColor = c)) : (this.currentColor = c),\n (this.currentIndex = index),\n setDataLayer({\n event: 'ColorClick',\n shop: this.shop,\n product: this.product,\n color: c.name,\n }),\n this.currentColor?.id && this.clearInterval(),\n ]}\n color={c.hex}\n name={c.name}\n isActive={this.currentColor?.id === c.id}\n shop={this.shop}\n product={this.product}\n isImageInsteadHex={{\n isImageInsteadHex: c.imageInsteadHex,\n bigImage: c.bigImage,\n }}\n ></my-colorbox>\n ))}\n </div>\n\n {this.currentColor?.id && index === this.currentIndex && (\n <my-colorinfo\n currentColor={this.currentColor}\n shop={this.shop}\n product={this.product}\n data={this.data}\n isMobile={this.isMobile}\n infoBoxWidth={this.infoBoxWidth}\n baselink={this.baselink}\n availableTesters={this.available_testers?.find((t: any) => t.color_name?.trim().toLowerCase() === this.currentColor?.name?.trim().toLowerCase())}\n price={this.price}\n ></my-colorinfo>\n )}\n </div>\n );\n })\n ) : (\n <p>Brak wyników</p>\n )}\n {this.colors.pagination.filter_count > limit && (\n <div class={'pagination'}>\n {Array.from({ length: Math.ceil(this.colors.pagination.filter_count / limit) }).map((_, i) => (\n <span\n class={i + 1 === this.page ? 'current' : ''}\n onClick={e => {\n e.preventDefault();\n this.onPage(i + 1);\n }}\n key={`#${i + 1}`}\n >\n {i + 1}\n </span>\n ))}\n </div>\n )}\n </div>\n )}\n </div>\n {!this.preloader && this.isMobile && (\n <button class=\"button\" onClick={() => this.closeModalHandler()}>\n Zamknij\n </button>\n )}\n </div>\n );\n }\n}\n"]}
@@ -1,3 +1,10 @@
1
+ @font-face {
2
+ font-family: "Galatea";
3
+ src: url("/assets/fonts/Galatea-Regular.woff2") format("woff2"), url("/assets/fonts/Galatea-Regular.woff") format("woff"), url("/assets/fonts/Galatea-Regular.ttf") format("truetype");
4
+ font-weight: normal;
5
+ font-style: normal;
6
+ font-display: swap;
7
+ }
1
8
  .pallete-wrapper * {
2
9
  font-family: "Galatea", sans-serif;
3
10
  }
@@ -34,11 +34,16 @@ export class JcSwiper {
34
34
  nextEl: '.swiper-button-next',
35
35
  prevEl: '.swiper-button-prev',
36
36
  },
37
+ // loop: true,
38
+ // loopedSlides: 3,
39
+ slideToClickedSlide: true,
37
40
  loop: true,
38
- loopedSlides: 3,
41
+ freeMode: true,
42
+ slidesPerView: 1,
39
43
  });
40
- this.swiper2.controller.control = this.thumbs;
41
- this.thumbs.controller.control = this.swiper2;
44
+ // this.swiper2.controller.control = this.thumbs;
45
+ this.swiper2.controller.control = this.swiper2;
46
+ // this.thumbs.controller.control = this.swiper2;
42
47
  }
43
48
  componentDidLoad() {
44
49
  this.initSwiper();
@@ -50,9 +55,7 @@ export class JcSwiper {
50
55
  render() {
51
56
  return (h("div", { class: "slider-wrapper" }, h("div", { class: "swiper mySwiper2" }, h("div", { class: "swiper-wrapper" }, this.slides &&
52
57
  this.slides.length > 0 &&
53
- this.slides.map((slide) => (h("div", { key: slide.id, class: "swiper-slide" }, h("img", { src: `${APIURL}/assets/${slide.directus_files_id}?access_token=${accessToken}`, alt: "room_image" }))))), this.slides && this.slides.length >= 2 && (h("div", null, h("div", { onClick: this.colorInteraction, class: "swiper-button-next" }), h("div", { onClick: this.colorInteraction, class: "swiper-button-prev" })))), h("div", { class: "swiper mySwiper" }, h("div", { class: "swiper-wrapper" }, this.slides &&
54
- this.slides.length > 0 &&
55
- this.slides.map((slide) => (h("div", { key: slide.id, class: "swiper-slide" }, h("img", { src: `${APIURL}/assets/${slide.directus_files_id}?access_token=${accessToken}`, alt: "room_image" }))))))));
58
+ this.slides.map((slide) => (h("div", { key: slide.id, class: "swiper-slide" }, h("img", { src: `${APIURL}/assets/${slide.directus_files_id}?access_token=${accessToken}`, alt: "room_image" }))))), this.slides && this.slides.length >= 2 && (h("div", null, h("div", { onClick: this.colorInteraction, class: "swiper-button-next" }), h("div", { onClick: this.colorInteraction, class: "swiper-button-prev" }))))));
56
59
  }
57
60
  static get is() { return "my-slider"; }
58
61
  static get originalStyleUrls() {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/my-slider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,MAAM,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAM7C,MAAM,OAAO,QAAQ;;IA6CnB,qBAAgB,GAAG,GAAG,EAAE;MACtB,YAAY,CAAC;QACX,KAAK,EAAE,kBAAkB;QACzB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,KAAK,EAAE,IAAI,CAAC,KAAK;OAClB,CAAC,CAAC;IACL,CAAC,CAAC;;;;;;EA1CF,UAAU;IACR,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,WAAW,EAAE;MACpC,OAAO,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;MACjC,mBAAmB,EAAE,IAAI;MACzB,IAAI,EAAE,IAAI;MACV,QAAQ,EAAE,IAAI;MACd,YAAY,EAAE,CAAC;MACf,aAAa,EAAE,CAAC;MAChB,SAAS,EAAE,UAAU;MACrB,UAAU,EAAE,GAAG;KAChB,CAAC,CAAC;IAEH,IAAI,CAAC,OAAO,GAAG,IAAI,MAAM,CAAC,YAAY,EAAE;MACtC,OAAO,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;MACjC,UAAU,EAAE;QACV,MAAM,EAAE,qBAAqB;QAC7B,MAAM,EAAE,qBAAqB;OAC9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CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;UACtB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAY,EAAE,EAAE,CAAC,CAChC,WAAK,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,KAAK,EAAC,cAAc;YACtC,WAAK,GAAG,EAAE,GAAG,MAAM,WAAW,KAAK,CAAC,iBAAiB,iBAAiB,WAAW,EAAE,EAAE,GAAG,EAAC,YAAY,GAAG,CACpG,CACP,CAAC,CACA,CACF,CACF,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, Element, h } from '@stencil/core';\nimport Swiper, { Navigation, Controller } from 'swiper';\nimport { setDataLayer } from '../../gtmUtils';\nimport { Image } from '../../types';\nimport { APIURL, accessToken } from '../api';\n\n@Component({\n tag: 'my-slider',\n styleUrl: 'my-slider.scss',\n})\nexport class JcSwiper {\n @Element() modalEl: HTMLElement;\n @Prop() slides: Image[];\n @Prop() shop: string;\n @Prop() product: string;\n @Prop() color: string;\n\n private thumbs: any;\n private swiper2: any;\n\n initSwiper() {\n this.thumbs = new Swiper('.mySwiper', {\n modules: [Navigation, Controller],\n slideToClickedSlide: true,\n loop: true,\n freeMode: true,\n spaceBetween: 5,\n slidesPerView: 3,\n direction: 'vertical',\n touchRatio: 0.2,\n });\n\n this.swiper2 = new Swiper('.mySwiper2', {\n modules: [Navigation, Controller],\n navigation: {\n nextEl: '.swiper-button-next',\n prevEl: '.swiper-button-prev',\n },\n loop: true,\n loopedSlides: 3,\n });\n\n this.swiper2.controller.control = this.thumbs;\n this.thumbs.controller.control = this.swiper2;\n }\n\n componentDidLoad() {\n this.initSwiper();\n }\n\n update() {\n this.thumbs.update();\n this.swiper2.update();\n }\n\n colorInteraction = () => {\n setDataLayer({\n event: 'ColorInteraction',\n shop: this.shop,\n product: this.product,\n color: this.color,\n });\n };\n\n render() {\n return (\n <div class=\"slider-wrapper\">\n <div class=\"swiper mySwiper2\">\n <div class=\"swiper-wrapper\">\n {this.slides &&\n this.slides.length > 0 &&\n this.slides.map((slide: Image) => (\n <div key={slide.id} class=\"swiper-slide\">\n <img src={`${APIURL}/assets/${slide.directus_files_id}?access_token=${accessToken}`} alt=\"room_image\" />\n </div>\n ))}\n </div>\n {this.slides && this.slides.length >= 2 && (\n <div>\n <div onClick={this.colorInteraction} class=\"swiper-button-next\"></div>\n <div onClick={this.colorInteraction} class=\"swiper-button-prev\"></div>\n </div>\n )}\n </div>\n <div class=\"swiper mySwiper\">\n <div class=\"swiper-wrapper\">\n {this.slides &&\n this.slides.length > 0 &&\n this.slides.map((slide: Image) => (\n <div key={slide.id} class=\"swiper-slide\">\n <img src={`${APIURL}/assets/${slide.directus_files_id}?access_token=${accessToken}`} alt=\"room_image\" />\n </div>\n ))}\n </div>\n </div>\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/my-slider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,MAAM,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAM7C,MAAM,OAAO,QAAQ;;IAmDnB,qBAAgB,GAAG,GAAG,EAAE;MACtB,YAAY,CAAC;QACX,KAAK,EAAE,kBAAkB;QACzB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,KAAK,EAAE,IAAI,CAAC,KAAK;OAClB,CAAC,CAAC;IACL,CAAC,CAAC;;;;;;EAhDF,UAAU;IACR,IAAI,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C,cAAc;YACtC,WAAK,GAAG,EAAE,GAAG,MAAM,WAAW,KAAK,CAAC,iBAAiB,iBAAiB,WAAW,EAAE,EAAE,GAAG,EAAC,YAAY,GAAG,CACpG,CACP,CAAC,CACA;QACL,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,CACzC;UACE,WAAK,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,KAAK,EAAC,oBAAoB,GAAO;UACtE,WAAK,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,KAAK,EAAC,oBAAoB,GAAO,CAClE,CACP,CACG,CAYF,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, Element, h } from '@stencil/core';\nimport Swiper, { Navigation, Controller } from 'swiper';\nimport { setDataLayer } from '../../gtmUtils';\nimport { Image } from '../../types';\nimport { APIURL, accessToken } from '../api';\n\n@Component({\n tag: 'my-slider',\n styleUrl: 'my-slider.scss',\n})\nexport class JcSwiper {\n @Element() modalEl: HTMLElement;\n @Prop() slides: Image[];\n @Prop() shop: string;\n @Prop() product: string;\n @Prop() color: string;\n\n private thumbs: any;\n private swiper2: any;\n\n initSwiper() {\n this.thumbs = new Swiper('.mySwiper', {\n modules: [Navigation, Controller],\n slideToClickedSlide: true,\n loop: true,\n freeMode: true,\n spaceBetween: 5,\n slidesPerView: 3,\n direction: 'vertical',\n touchRatio: 0.2,\n });\n\n this.swiper2 = new Swiper('.mySwiper2', {\n modules: [Navigation, Controller],\n navigation: {\n nextEl: '.swiper-button-next',\n prevEl: '.swiper-button-prev',\n },\n // loop: true,\n // loopedSlides: 3,\n slideToClickedSlide: true,\n loop: true,\n freeMode: true,\n\n slidesPerView: 1,\n });\n\n // this.swiper2.controller.control = this.thumbs;\n this.swiper2.controller.control = this.swiper2;\n // this.thumbs.controller.control = this.swiper2;\n }\n\n componentDidLoad() {\n this.initSwiper();\n }\n\n update() {\n this.thumbs.update();\n this.swiper2.update();\n }\n\n colorInteraction = () => {\n setDataLayer({\n event: 'ColorInteraction',\n shop: this.shop,\n product: this.product,\n color: this.color,\n });\n };\n\n render() {\n return (\n <div class=\"slider-wrapper\">\n <div class=\"swiper mySwiper2\">\n <div class=\"swiper-wrapper\">\n {this.slides &&\n this.slides.length > 0 &&\n this.slides.map((slide: Image) => (\n <div key={slide.id} class=\"swiper-slide\">\n <img src={`${APIURL}/assets/${slide.directus_files_id}?access_token=${accessToken}`} alt=\"room_image\" />\n </div>\n ))}\n </div>\n {this.slides && this.slides.length >= 2 && (\n <div>\n <div onClick={this.colorInteraction} class=\"swiper-button-next\"></div>\n <div onClick={this.colorInteraction} class=\"swiper-button-prev\"></div>\n </div>\n )}\n </div>\n {/* <div class=\"swiper mySwiper\">\n <div class=\"swiper-wrapper\">\n {this.slides &&\n this.slides.length > 0 &&\n this.slides.map((slide: Image) => (\n <div key={slide.id} class=\"swiper-slide\">\n <img src={`${APIURL}/assets/${slide.directus_files_id}?access_token=${accessToken}`} alt=\"room_image\" />\n </div>\n ))}\n </div>\n </div> */}\n </div>\n );\n }\n}\n"]}
@@ -11,6 +11,13 @@
11
11
  */
12
12
 
13
13
  @font-face{font-family:swiper-icons;src:url('data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWho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Y09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA');font-weight:400;font-style:normal}:root{--swiper-theme-color:#007aff}.swiper{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;box-sizing:content-box}.swiper-android .swiper-slide,.swiper-wrapper{transform:translate3d(0px,0,0)}.swiper-pointer-events{touch-action:pan-y}.swiper-pointer-events.swiper-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden .swiper-slide{transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d,.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-cube-shadow,.swiper-3d .swiper-slide,.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:rgba(0,0,0,.15)}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-horizontal.swiper-css-mode>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-vertical.swiper-css-mode>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-centered>.swiper-wrapper::before{content:'';flex-shrink:0;order:9999}.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-centered.swiper-horizontal>.swiper-wrapper::before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-centered.swiper-vertical>.swiper-wrapper::before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-virtual .swiper-slide{-webkit-backface-visibility:hidden;transform:translateZ(0)}.swiper-virtual.swiper-css-mode .swiper-wrapper::after{content:'';position:absolute;left:0;top:0;pointer-events:none}.swiper-virtual.swiper-css-mode.swiper-horizontal .swiper-wrapper::after{height:1px;width:var(--swiper-virtual-size)}.swiper-virtual.swiper-css-mode.swiper-vertical .swiper-wrapper::after{width:1px;height:var(--swiper-virtual-size)}:root{--swiper-navigation-size:44px}.swiper-button-next,.swiper-button-prev{position:absolute;top:50%;width:calc(var(--swiper-navigation-size)/ 44 * 27);height:var(--swiper-navigation-size);margin-top:calc(0px - (var(--swiper-navigation-size)/ 2));z-index:10;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--swiper-navigation-color,var(--swiper-theme-color))}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{opacity:.35;cursor:auto;pointer-events:none}.swiper-button-next.swiper-button-hidden,.swiper-button-prev.swiper-button-hidden{opacity:0;cursor:auto;pointer-events:none}.swiper-navigation-disabled .swiper-button-next,.swiper-navigation-disabled .swiper-button-prev{display:none!important}.swiper-button-next:after,.swiper-button-prev:after{font-family:swiper-icons;font-size:var(--swiper-navigation-size);text-transform:none!important;letter-spacing:0;font-variant:initial;line-height:1}.swiper-button-prev,.swiper-rtl .swiper-button-next{left:10px;right:auto}.swiper-button-prev:after,.swiper-rtl .swiper-button-next:after{content:'prev'}.swiper-button-next,.swiper-rtl .swiper-button-prev{right:10px;left:auto}.swiper-button-next:after,.swiper-rtl .swiper-button-prev:after{content:'next'}.swiper-button-lock{display:none}.swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;transform:translate3d(0,0,0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none!important}.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:10px;left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width,var(--swiper-pagination-bullet-size,8px));height:var(--swiper-pagination-bullet-height,var(--swiper-pagination-bullet-size,8px));display:inline-block;border-radius:50%;background:var(--swiper-pagination-bullet-inactive-color,#000);opacity:var(--swiper-pagination-bullet-inactive-opacity, .2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;-webkit-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity, 1);background:var(--swiper-pagination-color,var(--swiper-theme-color))}.swiper-pagination-vertical.swiper-pagination-bullets,.swiper-vertical>.swiper-pagination-bullets{right:10px;top:50%;transform:translate3d(0px,-50%,0)}.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap,6px) 0;display:block}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap,4px)}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;transform:translateX(-50%);white-space:nowrap}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-progressbar{background:rgba(0,0,0,.25);position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color,var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{width:100%;height:4px;left:0;top:0}.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-vertical>.swiper-pagination-progressbar{width:4px;height:100%;left:0;top:0}.swiper-pagination-lock{display:none}.swiper-scrollbar{border-radius:10px;position:relative;-ms-touch-action:none;background:rgba(0,0,0,.1)}.swiper-scrollbar-disabled>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-disabled{display:none!important}.swiper-horizontal>.swiper-scrollbar,.swiper-scrollbar.swiper-scrollbar-horizontal{position:absolute;left:1%;bottom:3px;z-index:50;height:5px;width:98%}.swiper-scrollbar.swiper-scrollbar-vertical,.swiper-vertical>.swiper-scrollbar{position:absolute;right:3px;top:1%;z-index:50;width:5px;height:98%}.swiper-scrollbar-drag{height:100%;width:100%;position:relative;background:rgba(0,0,0,.5);border-radius:10px;left:0;top:0}.swiper-scrollbar-cursor-drag{cursor:move}.swiper-scrollbar-lock{display:none}.swiper-zoom-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center;text-align:center}.swiper-zoom-container>canvas,.swiper-zoom-container>img,.swiper-zoom-container>svg{max-width:100%;max-height:100%;object-fit:contain}.swiper-slide-zoomed{cursor:move}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color,var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader,.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear}.swiper-lazy-preloader-white{--swiper-preloader-color:#fff}.swiper-lazy-preloader-black{--swiper-preloader-color:#000}@keyframes swiper-preloader-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.swiper .swiper-notification{position:absolute;left:0;top:0;pointer-events:none;opacity:0;z-index:-1000}.swiper-free-mode>.swiper-wrapper{transition-timing-function:ease-out;margin:0 auto}.swiper-grid>.swiper-wrapper{flex-wrap:wrap}.swiper-grid-column>.swiper-wrapper{flex-wrap:wrap;flex-direction:column}.swiper-fade.swiper-free-mode .swiper-slide{transition-timing-function:ease-out}.swiper-fade .swiper-slide{pointer-events:none;transition-property:opacity}.swiper-fade .swiper-slide .swiper-slide{pointer-events:none}.swiper-fade .swiper-slide-active,.swiper-fade .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-cube{overflow:visible}.swiper-cube .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1;visibility:hidden;transform-origin:0 0;width:100%;height:100%}.swiper-cube .swiper-slide .swiper-slide{pointer-events:none}.swiper-cube.swiper-rtl .swiper-slide{transform-origin:100% 0}.swiper-cube .swiper-slide-active,.swiper-cube .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-cube .swiper-slide-active,.swiper-cube .swiper-slide-next,.swiper-cube .swiper-slide-next+.swiper-slide,.swiper-cube .swiper-slide-prev{pointer-events:auto;visibility:visible}.swiper-cube .swiper-slide-shadow-bottom,.swiper-cube .swiper-slide-shadow-left,.swiper-cube .swiper-slide-shadow-right,.swiper-cube .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-cube .swiper-cube-shadow{position:absolute;left:0;bottom:0px;width:100%;height:100%;opacity:.6;z-index:0}.swiper-cube .swiper-cube-shadow:before{content:'';background:#000;position:absolute;left:0;top:0;bottom:0;right:0;filter:blur(50px)}.swiper-flip{overflow:visible}.swiper-flip .swiper-slide{pointer-events:none;-webkit-backface-visibility:hidden;backface-visibility:hidden;z-index:1}.swiper-flip .swiper-slide .swiper-slide{pointer-events:none}.swiper-flip .swiper-slide-active,.swiper-flip .swiper-slide-active .swiper-slide-active{pointer-events:auto}.swiper-flip .swiper-slide-shadow-bottom,.swiper-flip .swiper-slide-shadow-left,.swiper-flip .swiper-slide-shadow-right,.swiper-flip .swiper-slide-shadow-top{z-index:0;-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-creative .swiper-slide{-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden;transition-property:transform,opacity,height}.swiper-cards{overflow:visible}.swiper-cards .swiper-slide{transform-origin:center bottom;-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden}
14
+ @font-face {
15
+ font-family: "Galatea";
16
+ src: url("/assets/fonts/Galatea-Regular.woff2") format("woff2"), url("/assets/fonts/Galatea-Regular.woff") format("woff"), url("/assets/fonts/Galatea-Regular.ttf") format("truetype");
17
+ font-weight: normal;
18
+ font-style: normal;
19
+ font-display: swap;
20
+ }
14
21
  .pallete-wrapper * {
15
22
  font-family: "Galatea", sans-serif;
16
23
  }
@@ -41,7 +48,7 @@
41
48
  }
42
49
  .slider-wrapper .mySwiper2 {
43
50
  height: 100%;
44
- width: 80%;
51
+ width: 100%;
45
52
  position: relative;
46
53
  }
47
54
  @media (max-width: 1024px) {
@@ -65,9 +72,11 @@
65
72
  color: #232323;
66
73
  font-weight: bold;
67
74
  }
75
+ .slider-wrapper .mySwiper2 .swiper-button-next {
76
+ right: 45%;
77
+ }
68
78
  .slider-wrapper .mySwiper2 .swiper-button-prev {
69
- right: 40px;
70
- left: initial;
79
+ left: 45%;
71
80
  }
72
81
  .slider-wrapper .mySwiper {
73
82
  width: 20%;
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["export type Shop = {\n name: string;\n date_created: string;\n date_updated: string;\n id: number;\n products: number[];\n sort: null;\n status: string;\n};\n\nexport type ProductShopRelation = {\n Product_id: number;\n Shop_id: number;\n id: number;\n};\n\nexport type ProductCategoryRelation = {\n Category_id: Category;\n Product_id: Product;\n id: number;\n imageInsteadHex?: boolean;\n bigImage?: string;\n};\n\nexport type Color = {\n hex: string;\n image: Record<string, Image>;\n links: Link[];\n name: string;\n position: number;\n buttonInverse: boolean;\n textWhite: boolean;\n id?: number;\n category?: Partial<Color>;\n number?: string;\n Category_id: Color;\n imageInsteadHex: boolean;\n bigImage: string;\n};\n\nexport type Category = {\n category_name: string;\n hex: string;\n id: number;\n name: string;\n};\n\nexport type Product = {\n colors?: Color[];\n modalDescription: string;\n modalLogo: string;\n modalName: string;\n name: string;\n Shop: ProductShopRelation[];\n useColorImage: boolean;\n images: any;\n id?: string;\n Category: ProductCategoryRelation[];\n};\n\nexport type Image = {\n id: number;\n directus_files_id: string;\n};\n\nexport type Link = {\n id: number;\n path: string;\n shop: string;\n};\n\nexport type PaginationData<Model> = {\n list: Model[];\n pagination: Pagination;\n};\n\nexport type Pagination = {\n total_count: number;\n filter_count: number;\n};\n\nexport type ColorBoxyIsImageInsteadHex = {\n isImageInsteadHex: boolean;\n bigImage: string;\n};\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["export type Shop = {\n name: string;\n date_created: string;\n date_updated: string;\n id: number;\n products: number[];\n sort: null;\n status: string;\n};\n\nexport type ProductShopRelation = {\n Product_id: number;\n Shop_id: number;\n id: number;\n};\n\nexport type ProductCategoryRelation = {\n Category_id: Category;\n Product_id: Product;\n id: number;\n imageInsteadHex?: boolean;\n bigImage?: string;\n};\n\nexport type Color = {\n hex: string;\n image: Record<string, Image>;\n links: Link[];\n name: string;\n position: number;\n buttonInverse: boolean;\n textWhite: boolean;\n id?: number;\n category?: Partial<Color>;\n number?: string;\n Category_id: Color;\n imageInsteadHex: boolean;\n bigImage: string;\n};\n\nexport type Category = {\n category_name: string;\n hex: string;\n id: number;\n name: string;\n};\n\nexport type Product = {\n colors?: Color[];\n modalDescription: string;\n modalLogo: string;\n modalName: string;\n name: string;\n Shop: ProductShopRelation[];\n useColorImage: boolean;\n images: any;\n id?: string;\n Category: ProductCategoryRelation[];\n};\n\nexport type Image = {\n id: number;\n directus_files_id: string;\n};\n\nexport type Link = {\n id: number;\n path: string;\n shop: string;\n};\n\nexport type PaginationData<Model> = {\n list: Model[];\n pagination: Pagination;\n};\n\nexport type Pagination = {\n total_count: number;\n filter_count: number;\n};\n\nexport type ColorBoxyIsImageInsteadHex = {\n isImageInsteadHex: boolean;\n bigImage: string;\n};\n\nexport type AvailableTester = {\n id_product_attribute: number;\n color_name: string;\n};\n"]}