@salla.sa/twilight-components 2.12.0 → 2.12.2

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 (109) hide show
  1. package/dist/cjs/app-globals-9ad08b7a.js +4215 -0
  2. package/dist/cjs/app-globals-9ad08b7a.js.map +1 -0
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/salla-add-product-button_40.cjs.entry.js +42 -37
  5. package/dist/cjs/salla-add-product-button_40.cjs.entry.js.map +1 -1
  6. package/dist/cjs/salla-filters.cjs.entry.js +1 -2
  7. package/dist/cjs/salla-filters.cjs.entry.js.map +1 -1
  8. package/dist/cjs/salla-price-range.cjs.entry.js +3 -3
  9. package/dist/cjs/salla-price-range.cjs.entry.js.map +1 -1
  10. package/dist/cjs/twilight.cjs.js +2 -2
  11. package/dist/collection/components/salla-filters/salla-filters.js +2 -3
  12. package/dist/collection/components/salla-filters/salla-filters.js.map +1 -1
  13. package/dist/collection/components/salla-gifting/salla-gifting.js +7 -10
  14. package/dist/collection/components/salla-gifting/salla-gifting.js.map +1 -1
  15. package/dist/collection/components/salla-loyalty/salla-loyalty.js.map +1 -1
  16. package/dist/collection/components/salla-map/salla-map.js +4 -2
  17. package/dist/collection/components/salla-map/salla-map.js.map +1 -1
  18. package/dist/collection/components/salla-price-range/salla-price-range.js +14 -16
  19. package/dist/collection/components/salla-price-range/salla-price-range.js.map +1 -1
  20. package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +4 -4
  21. package/dist/collection/components/salla-quick-buy/salla-quick-buy.js.map +1 -1
  22. package/dist/collection/components/salla-slider/salla-slider.js +28 -19
  23. package/dist/collection/components/salla-slider/salla-slider.js.map +1 -1
  24. package/dist/components/_commonjsHelpers.js +1 -1
  25. package/dist/components/index.js +3 -3362
  26. package/dist/components/index.js.map +1 -1
  27. package/dist/components/salla-file-upload2.js +1 -1
  28. package/dist/components/salla-filters.js +1 -2
  29. package/dist/components/salla-filters.js.map +1 -1
  30. package/dist/components/salla-gifting.js +7 -10
  31. package/dist/components/salla-gifting.js.map +1 -1
  32. package/dist/components/salla-loyalty.js.map +1 -1
  33. package/dist/components/salla-map2.js +1 -2
  34. package/dist/components/salla-map2.js.map +1 -1
  35. package/dist/components/salla-price-range2.js +4 -4
  36. package/dist/components/salla-price-range2.js.map +1 -1
  37. package/dist/components/salla-quick-buy2.js +4 -4
  38. package/dist/components/salla-quick-buy2.js.map +1 -1
  39. package/dist/components/salla-slider.js +2 -2
  40. package/dist/components/salla-slider2.js +30 -21
  41. package/dist/components/salla-slider2.js.map +1 -1
  42. package/dist/components/salla-tel-input2.js +1 -1
  43. package/dist/esm/{_commonjsHelpers-1415ffd3.js → _commonjsHelpers-9adcfb67.js} +2 -2
  44. package/dist/esm/_commonjsHelpers-9adcfb67.js.map +1 -0
  45. package/dist/esm/app-globals-d0d32791.js +4213 -0
  46. package/dist/esm/app-globals-d0d32791.js.map +1 -0
  47. package/dist/esm/loader.js +3 -3
  48. package/dist/esm/salla-add-product-button_40.entry.js +43 -38
  49. package/dist/esm/salla-add-product-button_40.entry.js.map +1 -1
  50. package/dist/esm/salla-filters.entry.js +1 -2
  51. package/dist/esm/salla-filters.entry.js.map +1 -1
  52. package/dist/esm/salla-price-range.entry.js +3 -3
  53. package/dist/esm/salla-price-range.entry.js.map +1 -1
  54. package/dist/esm/twilight.js +3 -3
  55. package/dist/esm-es5/{_commonjsHelpers-1415ffd3.js → _commonjsHelpers-9adcfb67.js} +2 -2
  56. package/dist/esm-es5/app-globals-d0d32791.js +25 -0
  57. package/dist/esm-es5/app-globals-d0d32791.js.map +1 -0
  58. package/dist/esm-es5/loader.js +1 -1
  59. package/dist/esm-es5/salla-add-product-button_40.entry.js +2 -2
  60. package/dist/esm-es5/salla-add-product-button_40.entry.js.map +1 -1
  61. package/dist/esm-es5/salla-filters.entry.js.map +1 -1
  62. package/dist/esm-es5/salla-price-range.entry.js +1 -1
  63. package/dist/esm-es5/salla-price-range.entry.js.map +1 -1
  64. package/dist/esm-es5/twilight.js +1 -1
  65. package/dist/twilight/p-0bab8332.entry.js.map +1 -1
  66. package/dist/twilight/{p-9cf76fea.entry.js → p-0e716419.entry.js} +3 -3
  67. package/dist/twilight/p-0e716419.entry.js.map +1 -0
  68. package/dist/twilight/{p-23ba159f.system.js → p-671591bd.system.js} +2 -2
  69. package/dist/twilight/p-8e3f85c5.system.entry.js +5 -0
  70. package/dist/twilight/p-8e3f85c5.system.entry.js.map +1 -0
  71. package/dist/twilight/{p-9beb6b7b.system.js → p-a292baff.system.js} +2 -2
  72. package/dist/twilight/p-aa8e58b9.js +25 -0
  73. package/dist/twilight/p-aa8e58b9.js.map +1 -0
  74. package/dist/twilight/p-bd2b7381.system.js +25 -0
  75. package/dist/twilight/p-bd2b7381.system.js.map +1 -0
  76. package/dist/twilight/p-be148f43.system.entry.js.map +1 -1
  77. package/dist/twilight/p-ce042888.entry.js +5 -0
  78. package/dist/twilight/p-ce042888.entry.js.map +1 -0
  79. package/dist/twilight/{p-e19b71be.system.entry.js → p-ee9a8735.system.entry.js} +3 -3
  80. package/dist/twilight/p-ee9a8735.system.entry.js.map +1 -0
  81. package/dist/twilight/{p-f84bae34.js → p-eed6da4c.js} +2 -2
  82. package/dist/twilight/twilight.esm.js +1 -1
  83. package/dist/twilight/twilight.js +1 -1
  84. package/dist/types/components/salla-filters/salla-filters.d.ts +1 -1
  85. package/dist/types/components/salla-price-range/salla-price-range.d.ts +6 -6
  86. package/dist/types/components/salla-slider/salla-slider.d.ts +1 -1
  87. package/dist/types/components.d.ts +13 -13
  88. package/package.json +3 -3
  89. package/dist/cjs/app-globals-6dd47580.js +0 -7574
  90. package/dist/cjs/app-globals-6dd47580.js.map +0 -1
  91. package/dist/esm/_commonjsHelpers-1415ffd3.js.map +0 -1
  92. package/dist/esm/app-globals-21b11ff1.js +0 -7572
  93. package/dist/esm/app-globals-21b11ff1.js.map +0 -1
  94. package/dist/esm-es5/app-globals-21b11ff1.js +0 -25
  95. package/dist/esm-es5/app-globals-21b11ff1.js.map +0 -1
  96. package/dist/twilight/p-3e30b764.system.js +0 -25
  97. package/dist/twilight/p-3e30b764.system.js.map +0 -1
  98. package/dist/twilight/p-9cf76fea.entry.js.map +0 -1
  99. package/dist/twilight/p-ab31fcc3.entry.js +0 -5
  100. package/dist/twilight/p-ab31fcc3.entry.js.map +0 -1
  101. package/dist/twilight/p-bd9159c0.system.entry.js +0 -5
  102. package/dist/twilight/p-bd9159c0.system.entry.js.map +0 -1
  103. package/dist/twilight/p-e19b71be.system.entry.js.map +0 -1
  104. package/dist/twilight/p-fc2dbb78.js +0 -25
  105. package/dist/twilight/p-fc2dbb78.js.map +0 -1
  106. /package/dist/esm-es5/{_commonjsHelpers-1415ffd3.js.map → _commonjsHelpers-9adcfb67.js.map} +0 -0
  107. /package/dist/twilight/{p-23ba159f.system.js.map → p-671591bd.system.js.map} +0 -0
  108. /package/dist/twilight/{p-9beb6b7b.system.js.map → p-a292baff.system.js.map} +0 -0
  109. /package/dist/twilight/{p-f84bae34.js.map → p-eed6da4c.js.map} +0 -0
@@ -1,9 +1,9 @@
1
1
  /*!
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
- import { S as SallaSwiper, d as defineCustomElement$1 } from './salla-slider2.js';
4
+ import { S as SallaSlider$1, d as defineCustomElement$1 } from './salla-slider2.js';
5
5
 
6
- const SallaSlider = SallaSwiper;
6
+ const SallaSlider = SallaSlider$1;
7
7
  const defineCustomElement = defineCustomElement$1;
8
8
 
9
9
  export { SallaSlider, defineCustomElement };
@@ -13,7 +13,7 @@ const ArrowLeftIcon = `<!-- Generated by IcoMoon.io -->
13
13
 
14
14
  const sallaSliderCss = "@font-face{font-family:\"swiper-icons\";src:url(\"data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAA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HlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA\") format(\"woff\");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{-ms-flex-direction:column;flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:-ms-flexbox;display:flex;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform;-webkit-box-sizing:content-box;box-sizing:content-box}.swiper-android .swiper-slide,.swiper-wrapper{-webkit-transform:translate3d(0px, 0, 0);transform:translate3d(0px, 0, 0)}.swiper-pointer-events{-ms-touch-action:pan-y;touch-action:pan-y}.swiper-pointer-events.swiper-vertical{-ms-touch-action:pan-x;touch-action:pan-x}.swiper-slide{-ms-flex-negative:0;flex-shrink:0;width:100%;height:100%;position:relative;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{-ms-flex-align:start;align-items:flex-start;-webkit-transition-property:height, -webkit-transform;transition-property:height, -webkit-transform;transition-property:transform, height;transition-property:transform, height, -webkit-transform}.swiper-backface-hidden .swiper-slide{-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d,.swiper-3d.swiper-css-mode .swiper-wrapper{-webkit-perspective:1200px;perspective:1200px}.swiper-3d .swiper-wrapper,.swiper-3d .swiper-slide,.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-cube-shadow{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom{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, 0.15)}.swiper-3d .swiper-slide-shadow-left{background-image:-webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));background-image:linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-3d .swiper-slide-shadow-right{background-image:-webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));background-image:linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-3d .swiper-slide-shadow-top{background-image:-webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));background-image:linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-3d .swiper-slide-shadow-bottom{background-image:-webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));background-image:linear-gradient(to bottom, rgba(0, 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{-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory}.swiper-vertical.swiper-css-mode>.swiper-wrapper{-webkit-scroll-snap-type:y mandatory;-ms-scroll-snap-type:y mandatory;scroll-snap-type:y mandatory}.swiper-centered>.swiper-wrapper::before{content:\"\";-ms-flex-negative:0;flex-shrink:0;-ms-flex-order:9999;order:9999}.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{-webkit-margin-start:var(--swiper-centered-offset-before);margin-inline-start:var(--swiper-centered-offset-before)}.swiper-centered.swiper-horizontal>.swiper-wrapper::before{height:100%;width:var(--swiper-centered-offset-after)}.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{-webkit-margin-before:var(--swiper-centered-offset-before);margin-block-start:var(--swiper-centered-offset-before)}.swiper-centered.swiper-vertical>.swiper-wrapper::before{width:100%;height:var(--swiper-centered-offset-after)}.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center}:root{}.swiper-pagination{position:absolute;text-align:center;-webkit-transition:300ms opacity;transition:300ms opacity;-webkit-transform:translate3d(0, 0, 0);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-pagination-fraction,.swiper-pagination-custom,.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal{bottom:10px;left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transform:scale(0.33);transform:scale(0.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{-webkit-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{-webkit-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{-webkit-transform:scale(0.66);transform:scale(0.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{-webkit-transform:scale(0.33);transform:scale(0.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{-webkit-transform:scale(0.66);transform:scale(0.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{-webkit-transform:scale(0.33);transform:scale(0.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, 0.2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none;-moz-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-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets{right:10px;top:50%;-webkit-transform:translate3d(0px, -50%, 0);transform:translate3d(0px, -50%, 0)}.swiper-vertical>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap, 6px) 0;display:block}.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:8px}.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;-webkit-transition:200ms top, 200ms -webkit-transform;transition:200ms top, 200ms -webkit-transform;transition:200ms transform, 200ms top;transition:200ms transform, 200ms top, 200ms -webkit-transform}.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%;-webkit-transform:translateX(-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{-webkit-transition:200ms left, 200ms -webkit-transform;transition:200ms left, 200ms -webkit-transform;transition:200ms transform, 200ms left;transition:200ms transform, 200ms left, 200ms -webkit-transform}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:200ms right, 200ms -webkit-transform;transition:200ms right, 200ms -webkit-transform;transition:200ms transform, 200ms right;transition:200ms transform, 200ms right, 200ms -webkit-transform}.swiper-pagination-progressbar{background:rgba(0, 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%;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:left top;transform-origin:left top}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{-webkit-transform-origin:right top;transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite{width:100%;height:4px;left:0;top:0}.swiper-vertical>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite{width:4px;height:100%;left:0;top:0}.swiper-pagination-lock{display:none}:root{--swiper-navigation-size:44px;}.swiper-button-prev,.swiper-button-next{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:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;color:var(--swiper-navigation-color, var(--swiper-theme-color))}.swiper-button-prev.swiper-button-disabled,.swiper-button-next.swiper-button-disabled{opacity:0.35;cursor:auto;pointer-events:none}.swiper-button-prev.swiper-button-hidden,.swiper-button-next.swiper-button-hidden{opacity:0;cursor:auto;pointer-events:none}.swiper-navigation-disabled .swiper-button-prev,.swiper-navigation-disabled .swiper-button-next{display:none !important}.swiper-button-prev:after,.swiper-button-next: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}";
15
15
 
16
- const SallaSwiper = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
16
+ const SallaSlider = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
17
17
  constructor() {
18
18
  super();
19
19
  this.__registerHost();
@@ -300,6 +300,24 @@ const SallaSwiper = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
300
300
  },
301
301
  },
302
302
  };
303
+ let pre_defined_thumbs_config = {
304
+ freeMode: false,
305
+ watchSlidesProgress: true,
306
+ slidesPerView: 4,
307
+ spaceBetween: 10,
308
+ watchOverflow: true,
309
+ watchSlidesVisibility: true,
310
+ breakpoints: {
311
+ 768: {
312
+ direction: this.verticalThumbs ? "vertical" : "horizontal",
313
+ spaceBetween: 16,
314
+ },
315
+ },
316
+ navigation: this.showThumbsControls ? {
317
+ nextEl: this.host.id ? `#${this.host.id} .s-slider-thumbs-next` : '',
318
+ prevEl: this.host.id ? `#${this.host.id} .s-slider-thumbs-prev` : ''
319
+ } : false,
320
+ };
303
321
  this.pre_defined_config.fullscreen.mousewheel = {
304
322
  releaseOnEdges: this.host.querySelectorAll('.swiper-slide').length > 1 ? false : true
305
323
  },
@@ -309,25 +327,16 @@ const SallaSwiper = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
309
327
  //todo:: use `s-slider-slide`
310
328
  slide.classList.add('swiper-slide');
311
329
  }
330
+ if (this.hasThumbSlot && this.thumbsConfig) {
331
+ try {
332
+ pre_defined_thumbs_config = Object.assign(Object.assign({}, pre_defined_thumbs_config), JSON.parse(this.thumbsConfig));
333
+ }
334
+ catch (error) {
335
+ salla.logger.warn('failed to parse thumbs slider config', error);
336
+ }
337
+ }
312
338
  // @ts-ignore
313
- this.thumbsSlider = new Swiper(this.thumbsSliderContainer, {
314
- freeMode: false,
315
- watchSlidesProgress: true,
316
- slidesPerView: 4,
317
- spaceBetween: 10,
318
- watchOverflow: true,
319
- watchSlidesVisibility: true,
320
- breakpoints: {
321
- 768: {
322
- direction: this.verticalThumbs ? "vertical" : "horizontal",
323
- spaceBetween: 16,
324
- },
325
- },
326
- navigation: this.showThumbsControls ? {
327
- nextEl: this.host.id ? `#${this.host.id} .s-slider-thumbs-next` : '',
328
- prevEl: this.host.id ? `#${this.host.id} .s-slider-thumbs-prev` : ''
329
- } : false,
330
- });
339
+ this.thumbsSlider = new Swiper(this.thumbsSliderContainer, pre_defined_thumbs_config);
331
340
  // @ts-ignore
332
341
  pre_defined_config.thumbs = {
333
342
  swiper: this.thumbsSlider,
@@ -466,12 +475,12 @@ function defineCustomElement() {
466
475
  components.forEach(tagName => { switch (tagName) {
467
476
  case "salla-slider":
468
477
  if (!customElements.get(tagName)) {
469
- customElements.define(tagName, SallaSwiper);
478
+ customElements.define(tagName, SallaSlider);
470
479
  }
471
480
  break;
472
481
  } });
473
482
  }
474
483
 
475
- export { SallaSwiper as S, defineCustomElement as d };
484
+ export { SallaSlider as S, defineCustomElement as d };
476
485
 
477
486
  //# sourceMappingURL=salla-slider2.js.map
@@ -1 +1 @@
1
- {"file":"salla-slider2.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,cAAc,GAA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,IAAI,UAAU,GAAG,IAAI,CAAC,mBAAmB,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAC;MAC9E,CAAC,CAAC,UAAU,GAAG,UAAU,CAAC,WAAW,CAAC,GAAG,UAAU,CAAC,QAAe,CAAC,GAAG,IAAI,CAAC;KAC7E;;;IAID,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;MACjC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,EAAE,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC,CAAA;KAC5D;SAAM;MACL,IAAI,CAAC,UAAU,EAAE,CAAC;KACnB;GACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["ArrowRightIcon"],"sources":["./src/components/salla-slider/salla-slider.scss?tag=salla-slider","./src/components/salla-slider/salla-slider.tsx"],"sourcesContent":["//🚨🚨todo:: find a better way, it loads it to the dom\n@import \"~swiper/swiper\";\n@import \"~swiper/modules/pagination/pagination\";\n@import \"~swiper/modules/navigation/navigation\";\n\n.s-slider-wrapper {\n &-container{\n\n }\n &-thumbs{\n &-container{\n\n }\n }\n &-button-next{\n svg{\n\n }\n }\n &-button-prev{\n svg{\n\n }\n }\n}\n","import { Component, State, Prop, h, Event, Host, EventEmitter, Method, Element } from '@stencil/core';\nimport { Swiper as SwiperType } from 'swiper/types';\n\nimport ArrowRightIcon from \"../../assets/svg/keyboard_arrow_right.svg\";\nimport ArrowLeftIcon from \"../../assets/svg/keyboard_arrow_left.svg\";\n\n/**\n * @slot items - Slider items.\n * @slot thumbs - Thumbs slider items.\n */\n@Component({\n tag: 'salla-slider',\n styleUrl: 'salla-slider.scss',\n})\nexport class SallaSwiper {\n @Element() host: HTMLElement;\n constructor() {\n this.direction = this.direction || document.documentElement.dir\n }\n\n /**\n * Show/hide slider block title\n */\n @Prop({ reflect: true }) blockTitle: string = '';\n\n /**\n * Enable call a specific slide by index from thumbnails option in `salla-slider-options` component, works only if `data-img-id` and `data-slid-index` attributes are set on each slide\n */\n @Prop({ reflect: true }) listenToThumbnailsOption: boolean = false;\n\n /**\n * Show/hide slider block sub title\n */\n @Prop({ reflect: true }) blockSubtitle: string = '';\n\n /**\n * Show/hide display all button beside arrows\n */\n @Prop({ reflect: true }) displayAllUrl: string = '';\n\n /**\n * Show/hide display all button beside arrows\n */\n @Prop({ reflect: true }) arrowsCentered: boolean = false;\n\n /**\n * Vertical or Horizontal thumbs slider\n */\n @Prop({ reflect: true }) verticalThumbs: boolean = false;\n\n /**\n * Disable thumbs slider and show it as a grid\n */\n @Prop({ reflect: true }) gridThumbs: boolean = false;\n\n /**\n * Vertical or Horizontal main slider\n */\n @Prop({ reflect: true }) vertical: boolean = false;\n\n /**\n * Auto Height slider\n */\n @Prop({ reflect: true }) autoHeight: boolean = false;\n\n /**\n * Show/hide arrows\n */\n @Prop({ reflect: true }) showControls: boolean = true;\n\n /**\n * Show/hide arrows\n */\n @Prop({ reflect: true }) controlsOuter: boolean = false;\n\n /**\n * Show/hide thumbs slider arrows\n */\n @Prop() showThumbsControls: boolean = true;\n\n /**\n * Enable autoplay - working with `type=\"carousel\" only`\n */\n @Prop() autoPlay: boolean = false;\n\n /**\n * slidesPerView\n */\n @Prop() slidesPerView: string = \"auto\";\n\n /**\n * Enable pagination\n */\n @Prop() pagination: boolean = false;\n\n /**\n * Enable center mode - working with `type=\"carousel\" only`\n */\n @Prop() centered: boolean = false;\n\n /**\n * Run slider in loop, Don't use it for slides with custom components inside it, because it may cause re-render issue\n */\n @Prop() loop: boolean = false;\n\n /**\n * Slider direction. Default: document.documentElement.dir\n */\n @Prop({ mutable: true, reflect: true }) direction: string;\n\n /**\n * Set the type of the slider\n * Default: ''\n */\n @Prop() type: 'carousel' | 'fullscreen' | 'thumbs' | 'default' | 'hero' | 'testimonials' | 'blog' | 'fullwidth' | '' = '';\n /**\n * Slider Configs refer to https://swiperjs.com/swiper-api#parameters and pass the entire config object\n * @example\n * let slider = document.querySelector('salla-slider');\n * slider.sliderConfig = {\n * slidesPerView: 1,\n * spaceBetween : 30,\n * lazy: true,\n * }\n *\n */\n @Prop({ reflect: true }) sliderConfig: any;\n /**\n * Thumbs Slider Configs refer to https://swiperjs.com/swiper-api#parameters and pass the entire config object\n * @example\n * let slider = document.querySelector('salla-slider');\n * slider.thumbsConfig = {\n * slidesPerView: 1,\n * spaceBetween : 30,\n * lazy: true,\n * }\n *\n */\n @Prop({ reflect: true }) thumbsConfig: any = {};\n\n // Events\n /**\n * Event will fired right after initialization.\n */\n @Event() afterInit: EventEmitter<any>;\n /**\n * Event will be fired when currently active slide is changed\n */\n @Event() slideChange: EventEmitter<any>;\n\n /**\n * Event will be fired when Swiper reach its beginning (initial position)\n */\n @Event() reachBeginning: EventEmitter<any>;\n\n /**\n * Event will be fired when Swiper reach last slide\n */\n @Event() reachEnd: EventEmitter<any>;\n\n /**\n * Event will be fired after animation to other slide (next or previous).\n */\n @Event() slideChangeTransitionEnd: EventEmitter<any>;\n\n /**\n * Event will be fired in the beginning of animation to other slide (next or previous).\n */\n @Event() slideChangeTransitionStart: EventEmitter<any>;\n\n /**\n * Same as \"slideChangeTransitionEnd\" but for \"forward\" direction only\n */\n @Event() slideNextTransitionEnd: EventEmitter<any>;\n\n /**\n * Same as \"slideChangeTransitionStart\" but for \"forward\" direction only\n */\n @Event() slideNextTransitionStart: EventEmitter<any>;\n\n /**\n * Same as \"slideChangeTransitionEnd\" but for \"backward\" direction only\n */\n @Event() slidePrevTransitionEnd: EventEmitter<any>;\n\n /**\n * Same as \"slideChangeTransitionStart\" but for \"backward\" direction only\n */\n @Event() slidePrevTransitionStart: EventEmitter<any>;\n\n /**\n * Event will be fired when user touch and move finger over Swiper and move it.\n * Receives touchmove event as an arguments.\n */\n @Event() sliderMove: EventEmitter<any>;\n\n /**\n * Event will be fired when user release Swiper. Receives touchend event as an arguments.\n */\n @Event() touchSliderEnd: EventEmitter<any>;\n\n /**\n * Event will be fired when user touch and move finger over Swiper.\n * Receives touchmove event as an arguments.\n */\n @Event() touchSliderMove: EventEmitter<any>;\n\n /**\n * Event will be fired when user touch Swiper. Receives touchstart event as an arguments.\n */\n @Event() touchSliderStart: EventEmitter<any>;\n\n /**\n * Event will be fired after transition.\n */\n @Event() sliderTransitionEnd: EventEmitter<any>;\n\n /**\n * Event will be fired in the beginning of transition.\n */\n @Event() sliderTransitionStart: EventEmitter<any>;\n\n\n // Methods\n\n /**\n * Run transition to the slide with index number equal to 'index' parameter for the duration equal to 'speed' parameter.\n *\n * @param {number} index - Index number of slide.\n * @param {number} speed - Transition duration (in ms).\n * @param {boolean} runCallbacks - Set it to false (by default it is true) and transition will not produce transition events.\n * **/\n @Method()\n async slideTo(index: number, speed?: number, runCallbacks?: boolean) {\n\n return this.slider.slideTo(index, speed, runCallbacks);\n }\n\n /**\n * Run transition to the next slide.\n *\n * @param {number} speed - Transition duration (in ms).\n * @param {boolean} runCallbacks - Set it to false (by default it is true) and transition will not produce transition events.\n * **/\n @Method()\n async slideNext(speed?: number, runCallbacks?: boolean) {\n this.slider?.slideNext(speed, runCallbacks);\n }\n\n /**\n * Run transition to the previous slide.\n *\n * @param {number} speed - Transition duration (in ms).\n * @param {boolean} runCallbacks - Set it to false (by default it is true) and transition will not produce transition events.\n * **/\n @Method()\n async slidePrev(speed?: number, runCallbacks?: boolean) {\n this.slider?.slidePrev(speed, runCallbacks);\n }\n\n /**\n * Does the same as .slideTo but for the case when used with enabled loop. So this method will slide to slides with realIndex matching to passed index\n *\n * @param {number} speed - Transition duration (in ms).\n * @param {boolean} runCallbacks - Set it to false (by default it is true) and transition will not produce transition events.\n * **/\n @Method()\n async slideToLoop(index: number, speed?: number, runCallbacks?: boolean) {\n this.slider.slideToLoop(index, speed, runCallbacks);\n }\n\n /**\n * Does the same as .slideNext but for the case when used with enabled loop. So this method will slide to next slide with realIndex matching to next index\n *\n * @param {number} speed - Transition duration (in ms).\n * @param {boolean} runCallbacks - Set it to false (by default it is true) and transition will not produce transition events.\n * **/\n @Method()\n async slideNextLoop(speed?: number, runCallbacks?: boolean) {\n this.slider.slideNextLoop(speed, runCallbacks);\n }\n\n /**\n * Does the same as .slidePrev but for the case when used with enabled loop. So this method will slide to previous slide with realIndex matching to previous index\n *\n * @param {number} speed - Transition duration (in ms).\n * @param {boolean} runCallbacks - Set it to false (by default it is true) and transition will not produce transition events.\n * **/\n @Method()\n async slidePrevLoop(speed?: number, runCallbacks?: boolean) {\n this.slider.slidePrevLoop(speed, runCallbacks);\n }\n\n /**\n * Reset slider position to currently active slide for the duration equal to 'speed' parameter.\n *\n * @param {number} speed - Transition duration (in ms).\n * @param {boolean} runCallbacks - Set it to false (by default it is true) and transition will not produce transition events.\n * **/\n @Method()\n async slideReset(speed?: number, runCallbacks?: boolean) {\n this.slider.slideReset(speed, runCallbacks);\n }\n\n /**\n * Reset slider position to closest slide/snap point for the duration equal to 'speed' parameter.\n * @param {number} speed - Transition duration (in ms).\n * @param {boolean} runCallbacks - Set it to false (by default it is true) and transition will not produce transition events.\n * **/\n @Method()\n async slideToClosest(speed?: number, runCallbacks?: boolean) {\n this.slider.slideToClosest(speed, runCallbacks);\n }\n\n /**\n * You should call it after you add/remove slides manually, or after you hide/show it, or do any custom DOM modifications with Swiper This method also includes subcall of the following methods which you can use separately:\n * **/\n @Method()\n async update() {\n this.slider.update();\n }\n\n /**\n * Force slider to update its height (when autoHeight enabled) for the duration equal to 'speed' parameter\n * @param {number} speed - Transition duration (in ms).\n * **/\n @Method()\n async updateAutoHeight(speed?: number) {\n this.slider.updateAutoHeight(speed);\n }\n\n /**\n * recalculate number of slides and their offsets. Useful after you add/remove slides with JavaScript\n * **/\n @Method()\n async updateSlides() {\n this.slider.updateSlides();\n }\n\n /**\n * recalculate slider progress\n * **/\n @Method()\n async updateProgress() {\n this.slider.updateProgress();\n }\n\n /**\n * update active/prev/next classes on slides and bullets\n * **/\n @Method()\n async updateSlidesClasses() {\n this.slider.updateSlidesClasses();\n }\n\n\n /**\n * Get slider slides\n * **/\n @Method()\n async getSlides() {\n return await this.slider?.slides;\n }\n\n\n // States\n @State() currentIndex: number | undefined = undefined;\n @State() isEnd: boolean = false;\n @State() isBeginning: boolean = true;\n @State() swiperScript: any;\n @State() displayAllTitle: string;\n\n private sliderContainer?: HTMLDivElement;\n private sliderWrapper?: HTMLDivElement;\n private thumbsSliderContainer?: HTMLDivElement;\n private thumbsSliderWrapper?: HTMLDivElement;\n private slider: any;\n private thumbsSlider: any;\n private hasThumbSlot: boolean = false;\n\n private pre_defined_config = {\n carousel: {\n speed: 300,\n slidesPerView: 'auto',\n spaceBetween: 0,\n },\n fullwidth: {\n speed: 750,\n parallax: true,\n },\n fullscreen: {\n speed: 1000,\n parallax: true,\n direction: \"vertical\",\n followFinger: false,\n touchReleaseOnEdges: true,\n lazy: true,\n mousewheel: {}\n },\n testimonials: {\n draggable: true,\n slidesPerView: 1,\n breakpoints: { 1024: { slidesPerView: 2 } }\n },\n blog: {\n parallax: true,\n speed: 800,\n loop: true,\n slidesPerView: 1,\n centeredSlides: true,\n spaceBetween: 30,\n breakpoints: {\n 320: { spaceBetween: 10 },\n 768: { spaceBetween: 15 },\n 980: { paceBetween: 30 },\n }\n },\n thumbs: {\n slidesPerView: 1,\n spaceBetween: 30\n }\n }\n\n componentWillLoad() {\n salla.lang.onLoaded(() => {\n this.displayAllTitle = salla.lang.get('blocks.home.display_all');\n })\n this.hasThumbSlot = !!this.host.querySelector('[slot=\"thumbs\"]');\n if (this.listenToThumbnailsOption) {\n salla.event.on('product-options::change', data => {\n if (data.option.type == 'thumbnail') {\n const slideIndex = this.sliderWrapper.querySelector(`[data-img-id=\"${data.detail.option_value}\"]`)?.getAttribute('data-slid-index');\n slideIndex ? this.slideTo(parseInt(slideIndex), 300, false) : '';\n }\n });\n }\n return new Promise((resolve, reject) => {\n // @ts-ignore\n if (typeof Swiper !== 'undefined') {\n return resolve(true);\n }\n\n if (document.getElementById('swiper-script')) {\n let interval = setInterval(() => {\n // @ts-ignore\n if (typeof Swiper !== 'undefined') {\n clearInterval(interval);\n resolve(true);\n }\n }, 5);\n } else {\n // ? There is an issue with stencil bundling it breaks the swiper import, so we need to import it manually by swiperjs rerendered file\n // ! IT'S NOT A GOOD SOLUTION, BUT IT WORKS, WE NEED TO FIND A BETTER SOLUTION\n this.swiperScript = document.createElement('script');\n this.swiperScript.onload = () => {\n resolve(true)\n salla.event.emit('swiper::loaded');\n }\n this.swiperScript.onerror = (error) => {\n salla.logger.warn('failed load swiper bundle', error);\n reject(true)\n }\n this.swiperScript.src = 'https://cdn.jsdelivr.net/npm/swiper@8/swiper-bundle.min.js';\n this.swiperScript.setAttribute('id', 'swiper-script');\n document.body.appendChild(this.swiperScript);\n }\n });\n }\n\n getSwiperConfig() {\n let pre_defined_config = {\n loop: this.loop,\n autoplay: this.type == 'fullwidth' && !!this.autoPlay ? { delay: 5000 } : this.autoPlay,\n centeredSlides: this.centered,\n slidesPerView: this.slidesPerView,\n autoHeight: this.autoHeight,\n lazy: true,\n on: {\n // todo:: find better way for this workaround to show lazyLoad for duplicated slides, because it clones the slide after it's already rendered,\n // then it re appended it as is,in this case the image is loaded but class not added.\n afterInit: (slider: SwiperType) => {\n this.afterInit.emit(slider);\n document.lazyLoadInstance?.update();\n this.loop && slider.slides.map(slide => {\n if (!slide.classList.contains('swiper-slide-duplicate')) {\n return;\n }\n slide.querySelectorAll('img.lazy:not(.loaded)').forEach(img => img.classList.add('loaded'));\n })\n },\n },\n pagination: this.pagination ? {\n el: this.host.id ? `#${this.host.id} .swiper-pagination` : '',\n clickable: true,\n } : false,\n navigation: this.showControls ? {\n nextEl: this.host.id ? `#${this.host.id} .s-slider-next` : '',\n prevEl: this.host.id ? `#${this.host.id} .s-slider-prev` : ''\n } : false,\n breakpoints: {\n 768: {\n direction: this.vertical ? \"vertical\" : \"horizontal\",\n },\n },\n };\n this.pre_defined_config.fullscreen.mousewheel = {\n releaseOnEdges: this.host.querySelectorAll('.swiper-slide').length > 1 ? false : true\n },\n pre_defined_config = {\n ...pre_defined_config,\n ...(this.pre_defined_config[this.type] || {})\n };\n\n if (this.type == 'thumbs' && this.thumbsSliderWrapper) {\n for (const slide of this.thumbsSliderWrapper.children as any) {\n //todo:: use `s-slider-slide`\n slide.classList.add('swiper-slide')\n }\n\n // @ts-ignore\n this.thumbsSlider = new Swiper(this.thumbsSliderContainer, {\n freeMode: false,\n watchSlidesProgress: true,\n slidesPerView: 4,\n spaceBetween: 10,\n watchOverflow: true,\n watchSlidesVisibility: true,\n breakpoints: {\n 768: {\n direction: this.verticalThumbs ? \"vertical\" : \"horizontal\",\n spaceBetween: 16,\n },\n },\n navigation: this.showThumbsControls ? {\n nextEl: this.host.id ? `#${this.host.id} .s-slider-thumbs-next` : '',\n prevEl: this.host.id ? `#${this.host.id} .s-slider-thumbs-prev` : ''\n } : false,\n });\n\n // @ts-ignore\n pre_defined_config.thumbs = {\n swiper: this.thumbsSlider,\n };\n }\n\n pre_defined_config = {\n ...pre_defined_config,\n };\n if (this.sliderConfig) {\n try {\n pre_defined_config = {\n ...pre_defined_config,\n ...JSON.parse(this.sliderConfig)\n };\n } catch (error) {\n salla.logger.warn('failed to parse slider config', error);\n }\n }\n return pre_defined_config\n }\n\n initSlider() {\n for (const slide of this.sliderWrapper.children as any) {\n slide.classList.add('swiper-slide')\n }\n\n // @ts-ignore\n this.slider = new Swiper(this.sliderContainer, this.getSwiperConfig())\n\n // Expose slider events\n this.slider.on('slideChange', (slider: SwiperType) => {\n //todo:: it doesn't change when loop is active, always will be false\n this.isBeginning = slider.isBeginning;\n this.isEnd = slider.isEnd;\n this.slideChange.emit(slider);\n });\n this.slider.on('reachBeginning', (slider: SwiperType) => this.reachBeginning.emit(slider));\n this.slider.on('reachEnd', (slider: SwiperType) => this.reachEnd.emit(slider));\n this.slider.on('slideChangeTransitionEnd', (slider: SwiperType) => {\n if (this.type == \"fullscreen\") {\n const activeIndex = slider.activeIndex;\n (slider.params.mousewheel as any).releaseOnEdges = activeIndex === 0 || (activeIndex === slider.slides.length - 1);\n }\n this.slideChangeTransitionEnd.emit(slider)\n });\n this.slider.on('slideChangeTransitionStart', (slider: SwiperType) => this.slideChangeTransitionStart.emit(slider));\n this.slider.on('slideNextTransitionEnd', (slider: SwiperType) => this.slideNextTransitionEnd.emit(slider));\n this.slider.on('slideNextTransitionStart', (slider: SwiperType) => this.slideNextTransitionStart.emit(slider));\n this.slider.on('slidePrevTransitionEnd', (slider: SwiperType) => this.slidePrevTransitionEnd.emit(slider));\n this.slider.on('slidePrevTransitionStart', (slider: SwiperType) => this.slidePrevTransitionStart.emit(slider));\n this.slider.on('sliderMove', (slider: SwiperType) => this.sliderMove.emit(slider));\n this.slider.on('touchEnd', (slider: SwiperType) => this.touchSliderEnd.emit(slider));\n this.slider.on('touchMove', (slider: SwiperType) => this.touchSliderMove.emit(slider));\n this.slider.on('touchStart', (slider: SwiperType) => this.touchSliderStart.emit(slider));\n this.slider.on('transitionEnd', (slider: SwiperType) => this.sliderTransitionEnd.emit(slider));\n this.slider.on('transitionStart', (slider: SwiperType) => this.sliderTransitionStart.emit(slider));\n }\n\n render() {\n let classes = this.type ? this.type + '-slider ' : '';\n classes += this.controlsOuter ? ' s-slider-controls-outer ' : '';\n classes += this.blockTitle == '' ? ' s-slider-has-notitle s-slider-v-centered ' : '';\n classes += this.verticalThumbs ? ' s-slider-vertical ' : ' s-slider-horizontal ';\n classes += this.arrowsCentered ? ' s-slider-v-centered ' : '';\n classes += this.gridThumbs ? ' s-slider-with-grid-thumbs ' : '';\n return (\n <Host class={'s-slider-wrapper ' + classes}>\n\n {/* Slider block Title */}\n {this.blockTitle || this.showControls ?\n <div class=\"s-slider-block__title\">\n {this.blockTitle ?\n <div class=\"s-slider-block__title-right\">\n <h2>{this.blockTitle}</h2>\n {this.blockSubtitle ? <p innerHTML={this.blockSubtitle} /> : ''}\n </div>\n : ''}\n\n <div class=\"s-slider-block__title-left\">\n {this.displayAllUrl ?\n <a href={this.displayAllUrl} class=\"s-slider-block__display-all\">{this.displayAllTitle}</a>\n : ''}\n {this.showControls ?\n <div class=\"s-slider-block__title-nav\" dir=\"rtl\">\n <button aria-label=\"Previous Slide\" class=\"s-slider-prev s-slider-nav-arrow\">\n <span class=\"s-slider-button-icon\" innerHTML={this.direction == 'rtl' ? ArrowRightIcon : ArrowLeftIcon} />\n </button>\n <button aria-label=\"Next Slide\" class=\"s-slider-next s-slider-nav-arrow\">\n <span class=\"s-slider-button-icon\" innerHTML={this.direction == 'rtl' ? ArrowLeftIcon : ArrowRightIcon} />\n </button>\n </div>\n : ''}\n </div>\n </div>\n : ''}\n\n <div class=\"swiper s-slider-container\" ref={el => this.sliderContainer = el as HTMLDivElement} dir={this.vertical ? \"ltr\" : this.direction}>\n <slot />\n <div class=\"swiper-wrapper s-slider-swiper-wrapper\" ref={el => this.sliderWrapper = el as HTMLDivElement}>\n <slot name='items' />\n </div>\n {this.pagination ? <div class=\"swiper-pagination\"></div> : ''}\n </div>\n\n {this.type == 'thumbs' && this.hasThumbSlot ? <div class=\"s-slider-thumbs\">\n <div class=\"swiper s-slider-thumbs-container\" dir={this.verticalThumbs ? \"ltr\" : this.direction} ref={el => this.thumbsSliderContainer = el as HTMLDivElement}>\n <div class={{ \"s-slider-swiper-wrapper swiper-wrapper\": true, \"s-slider-grid-thumbs\": this.gridThumbs }} ref={el => this.thumbsSliderWrapper = el as HTMLDivElement}>\n <slot name=\"thumbs\" />\n </div>\n {this.showThumbsControls ?\n <div class=\"s-slider-thumbs-nav\" dir=\"rtl\">\n <button aria-label=\"Previous Slide\" class=\"s-slider-thumbs-prev s-slider-nav-arrow\">\n <span class=\"s-slider-button-icon\" innerHTML={this.direction == 'rtl' ? ArrowRightIcon : ArrowLeftIcon} />\n </button>\n <button aria-label=\"Next Slide\" class=\"s-slider-thumbs-next s-slider-nav-arrow\">\n <span class=\"s-slider-button-icon\" innerHTML={this.direction == 'rtl' ? ArrowLeftIcon : ArrowRightIcon} />\n </button>\n </div>\n : null}\n </div>\n </div>\n : null}\n </Host>\n );\n }\n\n componentDidLoad() {\n let itemsSlot = this.sliderWrapper.querySelector('div[slot=\"items\"]');\n !!itemsSlot ? itemsSlot.replaceWith(...itemsSlot.children as any) : null;\n if (this.type == 'thumbs' && this.hasThumbSlot) {\n let thumbsSlot = this.thumbsSliderWrapper.querySelector('div[slot=\"thumbs\"]');\n !!thumbsSlot ? thumbsSlot.replaceWith(...thumbsSlot.children as any) : null;\n }\n\n // if swiper is not loaded, lets relay on event\n // @ts-ignore\n if (typeof Swiper === 'undefined') {\n salla.event.once('swiper::loaded', () => this.initSlider())\n } else { // if swiper is loaded lets init our slider\n this.initSlider();\n }\n }\n}\n\n"],"version":3}
1
+ {"file":"salla-slider2.js","mappings":";;;;;;;;;;;;;AAAA,MAAM,cAAc,GAAG,60bAA60b;;MCcv1b,WAAW;EAEtB;;;;;;;;;;;;;;;;;;;IA0WQ,iBAAY,GAAY,KAAK,CAAC;IAE9B,uBAAkB,GAAG;MAC3B,QAAQ,EAAE;QACR,KAAK,EAAE,GAAG;QACV,aAAa,EAAE,MAAM;QACrB,YAAY,EAAE,CAAC;OAChB;MACD,SAAS,EAAE;QACT,KAAK,EAAE,GAAG;QACV,QAAQ,EAAE,IAAI;OACf;MACD,UAAU,EAAE;QACV,KAAK,EAAE,IAAI;QACX,QAAQ,EAAE,IAAI;QACd,SAAS,EAAE,UAAU;QACrB,YAAY,EAAE,KAAK;QACnB,mBAAmB,EAAE,IAAI;QACzB,IAAI,EAAE,IAAI;QACV,UAAU,EAAE,EAAE;OACf;MACD,YAAY,EAAE;QACZ,SAAS,EAAE,IAAI;QACf,aAAa,EAAE,CAAC;QAChB,WAAW,EAAE,EAAE,IAAI,EAAE,EAAE,aAAa,EAAE,CAAC,EAAE,EAAE;OAC5C;MACD,IAAI,EAAE;QACJ,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,IAAI;QACV,aAAa,EAAE,CAAC;QAChB,cAAc,EAAE,IAAI;QACpB,YAAY,EAAE,EAAE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;;;;;;;;;;;;;;;;;","names":["ArrowRightIcon"],"sources":["./src/components/salla-slider/salla-slider.scss?tag=salla-slider","./src/components/salla-slider/salla-slider.tsx"],"sourcesContent":["//🚨🚨todo:: find a better way, it loads it to the dom\n@import \"~swiper/swiper\";\n@import \"~swiper/modules/pagination/pagination\";\n@import \"~swiper/modules/navigation/navigation\";\n\n.s-slider-wrapper {\n &-container{\n\n }\n &-thumbs{\n &-container{\n\n }\n }\n &-button-next{\n svg{\n\n }\n }\n &-button-prev{\n svg{\n\n }\n }\n}\n","import { Component, State, Prop, h, Event, Host, EventEmitter, Method, Element } from '@stencil/core';\nimport { Swiper as SwiperType } from 'swiper/types';\n\nimport ArrowRightIcon from \"../../assets/svg/keyboard_arrow_right.svg\";\nimport ArrowLeftIcon from \"../../assets/svg/keyboard_arrow_left.svg\";\n\n/**\n * @slot items - Slider items.\n * @slot thumbs - Thumbs slider items.\n */\n@Component({\n tag: 'salla-slider',\n styleUrl: 'salla-slider.scss',\n})\nexport class SallaSlider {\n @Element() host: HTMLElement;\n constructor() {\n this.direction = this.direction || document.documentElement.dir\n }\n\n /**\n * Show/hide slider block title\n */\n @Prop({ reflect: true }) blockTitle: string = '';\n\n /**\n * Enable call a specific slide by index from thumbnails option in `salla-slider-options` component, works only if `data-img-id` and `data-slid-index` attributes are set on each slide\n */\n @Prop({ reflect: true }) listenToThumbnailsOption: boolean = false;\n\n /**\n * Show/hide slider block sub title\n */\n @Prop({ reflect: true }) blockSubtitle: string = '';\n\n /**\n * Show/hide display all button beside arrows\n */\n @Prop({ reflect: true }) displayAllUrl: string = '';\n\n /**\n * Show/hide display all button beside arrows\n */\n @Prop({ reflect: true }) arrowsCentered: boolean = false;\n\n /**\n * Vertical or Horizontal thumbs slider\n */\n @Prop({ reflect: true }) verticalThumbs: boolean = false;\n\n /**\n * Disable thumbs slider and show it as a grid\n */\n @Prop({ reflect: true }) gridThumbs: boolean = false;\n\n /**\n * Vertical or Horizontal main slider\n */\n @Prop({ reflect: true }) vertical: boolean = false;\n\n /**\n * Auto Height slider\n */\n @Prop({ reflect: true }) autoHeight: boolean = false;\n\n /**\n * Show/hide arrows\n */\n @Prop({ reflect: true }) showControls: boolean = true;\n\n /**\n * Show/hide arrows\n */\n @Prop({ reflect: true }) controlsOuter: boolean = false;\n\n /**\n * Show/hide thumbs slider arrows\n */\n @Prop() showThumbsControls: boolean = true;\n\n /**\n * Enable autoplay - working with `type=\"carousel\" only`\n */\n @Prop() autoPlay: boolean = false;\n\n /**\n * slidesPerView\n */\n @Prop() slidesPerView: string = \"auto\";\n\n /**\n * Enable pagination\n */\n @Prop() pagination: boolean = false;\n\n /**\n * Enable center mode - working with `type=\"carousel\" only`\n */\n @Prop() centered: boolean = false;\n\n /**\n * Run slider in loop, Don't use it for slides with custom components inside it, because it may cause re-render issue\n */\n @Prop() loop: boolean = false;\n\n /**\n * Slider direction. Default: document.documentElement.dir\n */\n @Prop({ mutable: true, reflect: true }) direction: string;\n\n /**\n * Set the type of the slider\n * Default: ''\n */\n @Prop() type: 'carousel' | 'fullscreen' | 'thumbs' | 'default' | 'hero' | 'testimonials' | 'blog' | 'fullwidth' | '' = '';\n /**\n * Slider Configs refer to https://swiperjs.com/swiper-api#parameters and pass the entire config object\n * @example\n * let slider = document.querySelector('salla-slider');\n * slider.sliderConfig = {\n * slidesPerView: 1,\n * spaceBetween : 30,\n * lazy: true,\n * }\n *\n */\n @Prop({ reflect: true }) sliderConfig: any;\n /**\n * Thumbs Slider Configs refer to https://swiperjs.com/swiper-api#parameters and pass the entire config object\n * @example\n * let slider = document.querySelector('salla-slider');\n * slider.thumbsConfig = {\n * slidesPerView: 1,\n * spaceBetween : 30,\n * lazy: true,\n * }\n *\n */\n @Prop({ reflect: true }) thumbsConfig: any = {};\n\n // Events\n /**\n * Event will fired right after initialization.\n */\n @Event() afterInit: EventEmitter<any>;\n /**\n * Event will be fired when currently active slide is changed\n */\n @Event() slideChange: EventEmitter<any>;\n\n /**\n * Event will be fired when Swiper reach its beginning (initial position)\n */\n @Event() reachBeginning: EventEmitter<any>;\n\n /**\n * Event will be fired when Swiper reach last slide\n */\n @Event() reachEnd: EventEmitter<any>;\n\n /**\n * Event will be fired after animation to other slide (next or previous).\n */\n @Event() slideChangeTransitionEnd: EventEmitter<any>;\n\n /**\n * Event will be fired in the beginning of animation to other slide (next or previous).\n */\n @Event() slideChangeTransitionStart: EventEmitter<any>;\n\n /**\n * Same as \"slideChangeTransitionEnd\" but for \"forward\" direction only\n */\n @Event() slideNextTransitionEnd: EventEmitter<any>;\n\n /**\n * Same as \"slideChangeTransitionStart\" but for \"forward\" direction only\n */\n @Event() slideNextTransitionStart: EventEmitter<any>;\n\n /**\n * Same as \"slideChangeTransitionEnd\" but for \"backward\" direction only\n */\n @Event() slidePrevTransitionEnd: EventEmitter<any>;\n\n /**\n * Same as \"slideChangeTransitionStart\" but for \"backward\" direction only\n */\n @Event() slidePrevTransitionStart: EventEmitter<any>;\n\n /**\n * Event will be fired when user touch and move finger over Swiper and move it.\n * Receives touchmove event as an arguments.\n */\n @Event() sliderMove: EventEmitter<any>;\n\n /**\n * Event will be fired when user release Swiper. Receives touchend event as an arguments.\n */\n @Event() touchSliderEnd: EventEmitter<any>;\n\n /**\n * Event will be fired when user touch and move finger over Swiper.\n * Receives touchmove event as an arguments.\n */\n @Event() touchSliderMove: EventEmitter<any>;\n\n /**\n * Event will be fired when user touch Swiper. Receives touchstart event as an arguments.\n */\n @Event() touchSliderStart: EventEmitter<any>;\n\n /**\n * Event will be fired after transition.\n */\n @Event() sliderTransitionEnd: EventEmitter<any>;\n\n /**\n * Event will be fired in the beginning of transition.\n */\n @Event() sliderTransitionStart: EventEmitter<any>;\n\n\n // Methods\n\n /**\n * Run transition to the slide with index number equal to 'index' parameter for the duration equal to 'speed' parameter.\n *\n * @param {number} index - Index number of slide.\n * @param {number} speed - Transition duration (in ms).\n * @param {boolean} runCallbacks - Set it to false (by default it is true) and transition will not produce transition events.\n * **/\n @Method()\n async slideTo(index: number, speed?: number, runCallbacks?: boolean) {\n\n return this.slider.slideTo(index, speed, runCallbacks);\n }\n\n /**\n * Run transition to the next slide.\n *\n * @param {number} speed - Transition duration (in ms).\n * @param {boolean} runCallbacks - Set it to false (by default it is true) and transition will not produce transition events.\n * **/\n @Method()\n async slideNext(speed?: number, runCallbacks?: boolean) {\n this.slider?.slideNext(speed, runCallbacks);\n }\n\n /**\n * Run transition to the previous slide.\n *\n * @param {number} speed - Transition duration (in ms).\n * @param {boolean} runCallbacks - Set it to false (by default it is true) and transition will not produce transition events.\n * **/\n @Method()\n async slidePrev(speed?: number, runCallbacks?: boolean) {\n this.slider?.slidePrev(speed, runCallbacks);\n }\n\n /**\n * Does the same as .slideTo but for the case when used with enabled loop. So this method will slide to slides with realIndex matching to passed index\n *\n * @param {number} speed - Transition duration (in ms).\n * @param {boolean} runCallbacks - Set it to false (by default it is true) and transition will not produce transition events.\n * **/\n @Method()\n async slideToLoop(index: number, speed?: number, runCallbacks?: boolean) {\n this.slider.slideToLoop(index, speed, runCallbacks);\n }\n\n /**\n * Does the same as .slideNext but for the case when used with enabled loop. So this method will slide to next slide with realIndex matching to next index\n *\n * @param {number} speed - Transition duration (in ms).\n * @param {boolean} runCallbacks - Set it to false (by default it is true) and transition will not produce transition events.\n * **/\n @Method()\n async slideNextLoop(speed?: number, runCallbacks?: boolean) {\n this.slider.slideNextLoop(speed, runCallbacks);\n }\n\n /**\n * Does the same as .slidePrev but for the case when used with enabled loop. So this method will slide to previous slide with realIndex matching to previous index\n *\n * @param {number} speed - Transition duration (in ms).\n * @param {boolean} runCallbacks - Set it to false (by default it is true) and transition will not produce transition events.\n * **/\n @Method()\n async slidePrevLoop(speed?: number, runCallbacks?: boolean) {\n this.slider.slidePrevLoop(speed, runCallbacks);\n }\n\n /**\n * Reset slider position to currently active slide for the duration equal to 'speed' parameter.\n *\n * @param {number} speed - Transition duration (in ms).\n * @param {boolean} runCallbacks - Set it to false (by default it is true) and transition will not produce transition events.\n * **/\n @Method()\n async slideReset(speed?: number, runCallbacks?: boolean) {\n this.slider.slideReset(speed, runCallbacks);\n }\n\n /**\n * Reset slider position to closest slide/snap point for the duration equal to 'speed' parameter.\n * @param {number} speed - Transition duration (in ms).\n * @param {boolean} runCallbacks - Set it to false (by default it is true) and transition will not produce transition events.\n * **/\n @Method()\n async slideToClosest(speed?: number, runCallbacks?: boolean) {\n this.slider.slideToClosest(speed, runCallbacks);\n }\n\n /**\n * You should call it after you add/remove slides manually, or after you hide/show it, or do any custom DOM modifications with Swiper This method also includes subcall of the following methods which you can use separately:\n * **/\n @Method()\n async update() {\n this.slider.update();\n }\n\n /**\n * Force slider to update its height (when autoHeight enabled) for the duration equal to 'speed' parameter\n * @param {number} speed - Transition duration (in ms).\n * **/\n @Method()\n async updateAutoHeight(speed?: number) {\n this.slider.updateAutoHeight(speed);\n }\n\n /**\n * recalculate number of slides and their offsets. Useful after you add/remove slides with JavaScript\n * **/\n @Method()\n async updateSlides() {\n this.slider.updateSlides();\n }\n\n /**\n * recalculate slider progress\n * **/\n @Method()\n async updateProgress() {\n this.slider.updateProgress();\n }\n\n /**\n * update active/prev/next classes on slides and bullets\n * **/\n @Method()\n async updateSlidesClasses() {\n this.slider.updateSlidesClasses();\n }\n\n\n /**\n * Get slider slides\n * **/\n @Method()\n async getSlides() {\n return await this.slider?.slides;\n }\n\n\n // States\n @State() currentIndex: number | undefined = undefined;\n @State() isEnd: boolean = false;\n @State() isBeginning: boolean = true;\n @State() swiperScript: any;\n @State() displayAllTitle: string;\n\n private sliderContainer?: HTMLDivElement;\n private sliderWrapper?: HTMLDivElement;\n private thumbsSliderContainer?: HTMLDivElement;\n private thumbsSliderWrapper?: HTMLDivElement;\n private slider: any;\n private thumbsSlider: any;\n private hasThumbSlot: boolean = false;\n\n private pre_defined_config = {\n carousel: {\n speed: 300,\n slidesPerView: 'auto',\n spaceBetween: 0,\n },\n fullwidth: {\n speed: 750,\n parallax: true,\n },\n fullscreen: {\n speed: 1000,\n parallax: true,\n direction: \"vertical\",\n followFinger: false,\n touchReleaseOnEdges: true,\n lazy: true,\n mousewheel: {}\n },\n testimonials: {\n draggable: true,\n slidesPerView: 1,\n breakpoints: { 1024: { slidesPerView: 2 } }\n },\n blog: {\n parallax: true,\n speed: 800,\n loop: true,\n slidesPerView: 1,\n centeredSlides: true,\n spaceBetween: 30,\n breakpoints: {\n 320: { spaceBetween: 10 },\n 768: { spaceBetween: 15 },\n 980: { paceBetween: 30 },\n }\n },\n thumbs: {\n slidesPerView: 1,\n spaceBetween: 30\n }\n }\n\n componentWillLoad() {\n salla.lang.onLoaded(() => {\n this.displayAllTitle = salla.lang.get('blocks.home.display_all');\n })\n this.hasThumbSlot = !!this.host.querySelector('[slot=\"thumbs\"]');\n if (this.listenToThumbnailsOption) {\n salla.event.on('product-options::change', data => {\n if (data.option.type == 'thumbnail') {\n const slideIndex = this.sliderWrapper.querySelector(`[data-img-id=\"${data.detail.option_value}\"]`)?.getAttribute('data-slid-index');\n slideIndex ? this.slideTo(parseInt(slideIndex), 300, false) : '';\n }\n });\n }\n return new Promise((resolve, reject) => {\n // @ts-ignore\n if (typeof Swiper !== 'undefined') {\n return resolve(true);\n }\n\n if (document.getElementById('swiper-script')) {\n let interval = setInterval(() => {\n // @ts-ignore\n if (typeof Swiper !== 'undefined') {\n clearInterval(interval);\n resolve(true);\n }\n }, 5);\n } else {\n // ? There is an issue with stencil bundling it breaks the swiper import, so we need to import it manually by swiperjs rerendered file\n // ! IT'S NOT A GOOD SOLUTION, BUT IT WORKS, WE NEED TO FIND A BETTER SOLUTION\n this.swiperScript = document.createElement('script');\n this.swiperScript.onload = () => {\n resolve(true)\n salla.event.emit('swiper::loaded');\n }\n this.swiperScript.onerror = (error) => {\n salla.logger.warn('failed load swiper bundle', error);\n reject(true)\n }\n this.swiperScript.src = 'https://cdn.jsdelivr.net/npm/swiper@8/swiper-bundle.min.js';\n this.swiperScript.setAttribute('id', 'swiper-script');\n document.body.appendChild(this.swiperScript);\n }\n });\n }\n\n getSwiperConfig() {\n let pre_defined_config = {\n loop: this.loop,\n autoplay: this.type == 'fullwidth' && !!this.autoPlay ? { delay: 5000 } : this.autoPlay,\n centeredSlides: this.centered,\n slidesPerView: this.slidesPerView,\n autoHeight: this.autoHeight,\n lazy: true,\n on: {\n // todo:: find better way for this workaround to show lazyLoad for duplicated slides, because it clones the slide after it's already rendered,\n // then it re appended it as is,in this case the image is loaded but class not added.\n afterInit: (slider: SwiperType) => {\n this.afterInit.emit(slider);\n document.lazyLoadInstance?.update();\n this.loop && slider.slides.map(slide => {\n if (!slide.classList.contains('swiper-slide-duplicate')) {\n return;\n }\n slide.querySelectorAll('img.lazy:not(.loaded)').forEach(img => img.classList.add('loaded'));\n })\n },\n },\n pagination: this.pagination ? {\n el: this.host.id ? `#${this.host.id} .swiper-pagination` : '',\n clickable: true,\n } : false,\n navigation: this.showControls ? {\n nextEl: this.host.id ? `#${this.host.id} .s-slider-next` : '',\n prevEl: this.host.id ? `#${this.host.id} .s-slider-prev` : ''\n } : false,\n breakpoints: {\n 768: {\n direction: this.vertical ? \"vertical\" : \"horizontal\",\n },\n },\n };\n let pre_defined_thumbs_config = {\n freeMode: false,\n watchSlidesProgress: true,\n slidesPerView: 4,\n spaceBetween: 10,\n watchOverflow: true,\n watchSlidesVisibility: true,\n breakpoints: {\n 768: {\n direction: this.verticalThumbs ? \"vertical\" : \"horizontal\",\n spaceBetween: 16,\n },\n },\n navigation: this.showThumbsControls ? {\n nextEl: this.host.id ? `#${this.host.id} .s-slider-thumbs-next` : '',\n prevEl: this.host.id ? `#${this.host.id} .s-slider-thumbs-prev` : ''\n } : false,\n }\n this.pre_defined_config.fullscreen.mousewheel = {\n releaseOnEdges: this.host.querySelectorAll('.swiper-slide').length > 1 ? false : true\n },\n pre_defined_config = {\n ...pre_defined_config,\n ...(this.pre_defined_config[this.type] || {})\n };\n\n if (this.type == 'thumbs' && this.thumbsSliderWrapper) {\n for (const slide of this.thumbsSliderWrapper.children as any) {\n //todo:: use `s-slider-slide`\n slide.classList.add('swiper-slide')\n }\n\n if (this.hasThumbSlot && this.thumbsConfig) {\n try {\n pre_defined_thumbs_config = {\n ...pre_defined_thumbs_config,\n ...JSON.parse(this.thumbsConfig)\n }\n } catch (error) {\n salla.logger.warn('failed to parse thumbs slider config', error);\n }\n }\n // @ts-ignore\n this.thumbsSlider = new Swiper(this.thumbsSliderContainer, pre_defined_thumbs_config);\n \n // @ts-ignore\n pre_defined_config.thumbs = {\n swiper: this.thumbsSlider,\n };\n }\n\n pre_defined_config = {\n ...pre_defined_config,\n };\n if (this.sliderConfig) {\n try {\n pre_defined_config = {\n ...pre_defined_config,\n ...JSON.parse(this.sliderConfig)\n };\n } catch (error) {\n salla.logger.warn('failed to parse slider config', error);\n }\n }\n return pre_defined_config\n }\n\n initSlider() {\n for (const slide of this.sliderWrapper.children as any) {\n slide.classList.add('swiper-slide')\n }\n\n // @ts-ignore\n this.slider = new Swiper(this.sliderContainer, this.getSwiperConfig())\n\n // Expose slider events\n this.slider.on('slideChange', (slider: SwiperType) => {\n //todo:: it doesn't change when loop is active, always will be false\n this.isBeginning = slider.isBeginning;\n this.isEnd = slider.isEnd;\n this.slideChange.emit(slider);\n });\n this.slider.on('reachBeginning', (slider: SwiperType) => this.reachBeginning.emit(slider));\n this.slider.on('reachEnd', (slider: SwiperType) => this.reachEnd.emit(slider));\n this.slider.on('slideChangeTransitionEnd', (slider: SwiperType) => {\n if (this.type == \"fullscreen\") {\n const activeIndex = slider.activeIndex;\n (slider.params.mousewheel as any).releaseOnEdges = activeIndex === 0 || (activeIndex === slider.slides.length - 1);\n }\n this.slideChangeTransitionEnd.emit(slider)\n });\n this.slider.on('slideChangeTransitionStart', (slider: SwiperType) => this.slideChangeTransitionStart.emit(slider));\n this.slider.on('slideNextTransitionEnd', (slider: SwiperType) => this.slideNextTransitionEnd.emit(slider));\n this.slider.on('slideNextTransitionStart', (slider: SwiperType) => this.slideNextTransitionStart.emit(slider));\n this.slider.on('slidePrevTransitionEnd', (slider: SwiperType) => this.slidePrevTransitionEnd.emit(slider));\n this.slider.on('slidePrevTransitionStart', (slider: SwiperType) => this.slidePrevTransitionStart.emit(slider));\n this.slider.on('sliderMove', (slider: SwiperType) => this.sliderMove.emit(slider));\n this.slider.on('touchEnd', (slider: SwiperType) => this.touchSliderEnd.emit(slider));\n this.slider.on('touchMove', (slider: SwiperType) => this.touchSliderMove.emit(slider));\n this.slider.on('touchStart', (slider: SwiperType) => this.touchSliderStart.emit(slider));\n this.slider.on('transitionEnd', (slider: SwiperType) => this.sliderTransitionEnd.emit(slider));\n this.slider.on('transitionStart', (slider: SwiperType) => this.sliderTransitionStart.emit(slider));\n }\n\n render() {\n let classes = this.type ? this.type + '-slider ' : '';\n classes += this.controlsOuter ? ' s-slider-controls-outer ' : '';\n classes += this.blockTitle == '' ? ' s-slider-has-notitle s-slider-v-centered ' : '';\n classes += this.verticalThumbs ? ' s-slider-vertical ' : ' s-slider-horizontal ';\n classes += this.arrowsCentered ? ' s-slider-v-centered ' : '';\n classes += this.gridThumbs ? ' s-slider-with-grid-thumbs ' : '';\n return (\n <Host class={'s-slider-wrapper ' + classes}>\n\n {/* Slider block Title */}\n {this.blockTitle || this.showControls ?\n <div class=\"s-slider-block__title\">\n {this.blockTitle ?\n <div class=\"s-slider-block__title-right\">\n <h2>{this.blockTitle}</h2>\n {this.blockSubtitle ? <p innerHTML={this.blockSubtitle} /> : ''}\n </div>\n : ''}\n\n <div class=\"s-slider-block__title-left\">\n {this.displayAllUrl ?\n <a href={this.displayAllUrl} class=\"s-slider-block__display-all\">{this.displayAllTitle}</a>\n : ''}\n {this.showControls ?\n <div class=\"s-slider-block__title-nav\" dir=\"rtl\">\n <button aria-label=\"Previous Slide\" class=\"s-slider-prev s-slider-nav-arrow\">\n <span class=\"s-slider-button-icon\" innerHTML={this.direction == 'rtl' ? ArrowRightIcon : ArrowLeftIcon} />\n </button>\n <button aria-label=\"Next Slide\" class=\"s-slider-next s-slider-nav-arrow\">\n <span class=\"s-slider-button-icon\" innerHTML={this.direction == 'rtl' ? ArrowLeftIcon : ArrowRightIcon} />\n </button>\n </div>\n : ''}\n </div>\n </div>\n : ''}\n\n <div class=\"swiper s-slider-container\" ref={el => this.sliderContainer = el as HTMLDivElement} dir={this.vertical ? \"ltr\" : this.direction}>\n <slot />\n <div class=\"swiper-wrapper s-slider-swiper-wrapper\" ref={el => this.sliderWrapper = el as HTMLDivElement}>\n <slot name='items' />\n </div>\n {this.pagination ? <div class=\"swiper-pagination\"></div> : ''}\n </div>\n\n {this.type == 'thumbs' && this.hasThumbSlot ? <div class=\"s-slider-thumbs\">\n <div class=\"swiper s-slider-thumbs-container\" dir={this.verticalThumbs ? \"ltr\" : this.direction} ref={el => this.thumbsSliderContainer = el as HTMLDivElement}>\n <div class={{ \"s-slider-swiper-wrapper swiper-wrapper\": true, \"s-slider-grid-thumbs\": this.gridThumbs }} ref={el => this.thumbsSliderWrapper = el as HTMLDivElement}>\n <slot name=\"thumbs\" />\n </div>\n {this.showThumbsControls ?\n <div class=\"s-slider-thumbs-nav\" dir=\"rtl\">\n <button aria-label=\"Previous Slide\" class=\"s-slider-thumbs-prev s-slider-nav-arrow\">\n <span class=\"s-slider-button-icon\" innerHTML={this.direction == 'rtl' ? ArrowRightIcon : ArrowLeftIcon} />\n </button>\n <button aria-label=\"Next Slide\" class=\"s-slider-thumbs-next s-slider-nav-arrow\">\n <span class=\"s-slider-button-icon\" innerHTML={this.direction == 'rtl' ? ArrowLeftIcon : ArrowRightIcon} />\n </button>\n </div>\n : null}\n </div>\n </div>\n : null}\n </Host>\n );\n }\n\n componentDidLoad() {\n let itemsSlot = this.sliderWrapper.querySelector('div[slot=\"items\"]');\n !!itemsSlot ? itemsSlot.replaceWith(...itemsSlot.children as any) : null;\n if (this.type == 'thumbs' && this.hasThumbSlot) {\n let thumbsSlot = this.thumbsSliderWrapper.querySelector('div[slot=\"thumbs\"]');\n !!thumbsSlot ? thumbsSlot.replaceWith(...thumbsSlot.children as any) : null;\n }\n\n // if swiper is not loaded, lets relay on event\n // @ts-ignore\n if (typeof Swiper === 'undefined') {\n salla.event.once('swiper::loaded', () => this.initSlider())\n } else { // if swiper is loaded lets init our slider\n this.initSlider();\n }\n }\n}\n\n"],"version":3}
@@ -2,7 +2,7 @@
2
2
  * Crafted with ❤ by Salla
3
3
  */
4
4
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
5
- import { a as createCommonjsModule } from './_commonjsHelpers.js';
5
+ import { c as createCommonjsModule } from './_commonjsHelpers.js';
6
6
 
7
7
  var intlTelInput$1 = createCommonjsModule(function (module) {
8
8
  /*
@@ -21,6 +21,6 @@ function commonjsRequire () {
21
21
  throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
22
22
  }
23
23
 
24
- export { createCommonjsModule as a, commonjsGlobal as c, getDefaultExportFromCjs as g };
24
+ export { commonjsGlobal as a, createCommonjsModule as c, getDefaultExportFromCjs as g };
25
25
 
26
- //# sourceMappingURL=_commonjsHelpers-1415ffd3.js.map
26
+ //# sourceMappingURL=_commonjsHelpers-9adcfb67.js.map
@@ -0,0 +1 @@
1
+ {"file":"_commonjsHelpers-9adcfb67.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}