@assaabloy/amarr-wc-pdp-carousel 1.0.64 → 1.0.68
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.
- package/package.json +2 -2
- package/pdpCarousel.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@assaabloy/amarr-wc-pdp-carousel",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.68",
|
|
4
4
|
"description": "Web component - Pdp Carousel",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "pdpCarousel.js",
|
|
@@ -11,5 +11,5 @@
|
|
|
11
11
|
},
|
|
12
12
|
"author": "Nagarro",
|
|
13
13
|
"license": "MIT",
|
|
14
|
-
"gitHead": "
|
|
14
|
+
"gitHead": "f7426d154472a2e4b166a97b44ca56b5e3a90389"
|
|
15
15
|
}
|
package/pdpCarousel.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){function t(t){for(var r,c
|
|
1
|
+
!function(e){function t(t){for(var r,o,c=t[0],d=t[1],u=t[2],s=0,m=[];s<c.length;s++)o=c[s],Object.prototype.hasOwnProperty.call(a,o)&&a[o]&&m.push(a[o][0]),a[o]=0;for(r in d)Object.prototype.hasOwnProperty.call(d,r)&&(e[r]=d[r]);for(l&&l(t);m.length;)m.shift()();return i.push.apply(i,u||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],r=!0,c=1;c<n.length;c++){var d=n[c];0!==a[d]&&(r=!1)}r&&(i.splice(t--,1),e=o(o.s=n[0]))}return e}var r={},a={61:0},i=[];function o(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/";var c=this["webpackJsonpamarr-frontend-components"]=this["webpackJsonpamarr-frontend-components"]||[],d=c.push.bind(c);c.push=t,c=c.slice();for(var u=0;u<c.length;u++)t(c[u]);var l=d;i.push([502,0]),n()}({0:function(e,t){e.exports=React},1:function(e,t,n){"use strict";n.d(t,"g",(function(){return a})),n.d(t,"J",(function(){return i})),n.d(t,"i",(function(){return o})),n.d(t,"x",(function(){return c})),n.d(t,"z",(function(){return d})),n.d(t,"r",(function(){return u})),n.d(t,"w",(function(){return l})),n.d(t,"n",(function(){return s})),n.d(t,"o",(function(){return m})),n.d(t,"A",(function(){return p})),n.d(t,"G",(function(){return f})),n.d(t,"q",(function(){return x})),n.d(t,"h",(function(){return h})),n.d(t,"p",(function(){return w})),n.d(t,"t",(function(){return g})),n.d(t,"y",(function(){return k})),n.d(t,"H",(function(){return y})),n.d(t,"l",(function(){return T})),n.d(t,"j",(function(){return S})),n.d(t,"m",(function(){return E})),n.d(t,"k",(function(){return O})),n.d(t,"u",(function(){return A})),n.d(t,"C",(function(){return j})),n.d(t,"s",(function(){return I})),n.d(t,"I",(function(){return N})),n.d(t,"b",(function(){return _})),n.d(t,"F",(function(){return z})),n.d(t,"v",(function(){return C})),n.d(t,"a",(function(){return P})),n.d(t,"d",(function(){return $})),n.d(t,"f",(function(){return Z})),n.d(t,"e",(function(){return M})),n.d(t,"c",(function(){return q})),n.d(t,"K",(function(){return D})),n.d(t,"B",(function(){return F})),n.d(t,"D",(function(){return J})),n.d(t,"E",(function(){return R}));var r=n(3),a=function(e){return JSON.parse(decodeURIComponent(escape(atob(e))))},i=function(e){return btoa(unescape(encodeURIComponent(e)))},o=function(e){return e.toUpperCase()},c=function(e){return e.replaceAll(" ","-").toLowerCase()},d=new r.a(!1),u=new r.a(!1),l=new r.a(!1),s=new r.a(!1),m=new r.a(""),p=new r.a(!1),f=new r.a(!1),x=new r.a(!1),h=new r.a(!1),w=new r.a(""),g=new r.a(!0),b=new r.a(!1),v=0,k=new r.a(!1),y=new r.a(""),T=new r.a(""),S=new r.a(""),E=new r.a(""),O=new r.a(""),A=new r.a(""),j=new r.a(""),I=new r.a(!1),N=new r.a(!1),_=function(){setTimeout((function(){v++,b.next(!0)}),0)},z=function(){setTimeout((function(){v>0&&v--,0==v&&b.next(!1)}),0)},C=function(){return b.asObservable()},P=function(e){return!!/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},$=function(e){return e.match(/^[a-zA-Z\xc0-\xff-. ]*$/)},Z=function(e){return/^[0-9a-zA-Z !@#\$%\^\&*\)\(+=._-]+$/.test(e)},M=function(e){return/^\(?([0-9]{3})\)\s[0-9]{3}-[0-9]{4}$/.test(e)},q=function(e){return/^[0-9]*$/.test(e)},D=function(e){return!!/^[-a-zA-Z0-9+&@#/%?=~|!:,.;]*[-a-zA-Z0-9+&@#/%=~|]$/.test(e)},F=function(e){if(e&&""!==e){return"("+e.substring(0,3)+") "+e.substring(3,6)+"-"+e.substring(6,e.length)}return e},J=function(e){return e&&(e=e.toFixed(2).replace(/\d(?=(\d{3})+\.)/g,"$&,")),0!==e&&"0"!==e||(e=e.toFixed(2)),e},R=function(e,t){return e=e?Number(e):0,t=t?Number(t):0,0===e||"0"===e||0===t||"0"===t?0:((e-t)/t*100).toFixed(2)}},122:function(e,t,n){"use strict";var r=n(0),a=n.n(r),i=n(4).default.section.withConfig({displayName:"styles__Content",componentId:"ik2m8i-0"})(['.slick-slider-custom{.slick{&-slider{border-radius:4px;max-width:calc(100% - 120px);@media screen and (min-width:1281px) and (max-width:1680px){max-width:calc(100% - 80px);}@media screen and (min-width:768px) and (max-width:1280px){max-width:calc(100% - 60px);}@media screen and (min-width:992px) and (max-width:1024px){max-width:calc(100% - 40px);}@media screen and (max-width:991px){max-width:calc(100% - 30px);}@media screen and (max-width:767px){max-width:calc(100% - 40px);}&-container{display:flex !important;align-items:center;justify-content:center;gap:20px;border-radius:4px;border:solid 1px #8d8d8d;background-color:#ffffff;margin:0 10px;padding:20px;@media screen and (min-width:1920px){padding:60px;}@media screen and (min-width:991px) and (max-width:1919px){padding:40px;}img{max-height:178px;@media screen and (min-width:991px) and (max-width:1919px){max-height:143px;}}}}&-prev{left:-40px;@media screen and (min-width:1681px){left:-60px}@media screen and (min-width:768px) and (max-width:1280px){left:-30px;}@media screen and (min-width:992px) and (max-width:1024px){left:-22px;}@media screen and (max-width:991px){left:-16px;}@media screen and (max-width:767px){left:-20px;}&:before{background-image:url(/etc.clientlibs/amarr/clientlibs/themes/amarr/resources/images/arrow-left-carousel.svg);}}&-next{right:-40px;@media screen and (min-width:1681px){right:-60px}@media screen and (min-width:768px) and (max-width:1280px){right:-30px;}@media screen and (min-width:992px) and (max-width:1024px){right:-22px;}@media screen and (max-width:991px){right:-16px;}@media screen and (max-width:767px){right:-20px;}&:before{background-image:url(/etc.clientlibs/amarr/clientlibs/themes/amarr/resources/images/arrow-right-carousel.svg);}}&-prev,&-next{background:#fff;border-radius:50%;z-index:99;&:before{background-size:contain;display:inline-block;width:40px;height:40px;content:"";background-repeat:no-repeat;@media (max-width:990px){width:30px;height:30px;}@media (min-width:1920px){width:60px;height:60px;}}}}}a{color:#333;}@media(min-width:992px){.slick-slider-custom{margin-bottom:20px;}}@media(min-width:1681px){.slick-slider-custom{margin-bottom:30px;}}@media (max-width:768px){.slick{&-prev{left:13px;}&-next{right:13px;}}.slick-slider-custom{margin-bottom:18px;}}']),o=n(34),c=n.n(o),d=(n(45),n(46),n(1)),u=function(e){var t=e.pdpCarouselData,n=Object(d.g)(t),o={infinite:!0,speed:500,arrows:!0,slidesToShow:n.carouselItems.length>4?4:n.carouselItems.length,slidesToScroll:1,swipeToSlide:!0,responsive:[{breakpoint:1024,settings:{slidesToShow:3,slidesToScroll:3,infinite:!0}},{breakpoint:600,settings:{slidesToShow:2,slidesToScroll:2,initialSlide:2}},{breakpoint:480,settings:{slidesToShow:1,slidesToScroll:1}}]},u=function(){var e=document.querySelector(".slick-slider-container"),t=document.querySelector(".slick-prev"),n=document.querySelector(".slick-next"),r=.5*e.offsetHeight+"px";t.style.top=r,n.style.top=r,setTimeout((function(e,t,n){e.style.top=n,t.style.top=n}),1e3,t,n,r)};return Object(r.useEffect)((function(){window.onload=u}),[]),window.onload=u,a.a.createElement(i,null,a.a.createElement("section",{className:"slick-slider-custom container"},a.a.createElement(c.a,o,n.carouselItems&&n.carouselItems.length>0&&n.carouselItems.map((function(e,t){var n,r,i,o;return a.a.createElement("div",{key:t,className:"carousel-container"},a.a.createElement("div",{className:"slick-slider-container"},e.cta.isInternal&&a.a.createElement("a",{href:e.cta.url,target:e.cta.linkAction,"aria-label":null===e||void 0===e||null===(n=e.image)||void 0===n?void 0:n.altText},a.a.createElement("div",{className:"pdp-card"},a.a.createElement("img",{src:e.image.url,key:t,alt:(null===e||void 0===e||null===(r=e.image)||void 0===r?void 0:r.altText)?e.image.altText:""}))),!e.cta.isInternal&&"_self"===e.cta.linkAction&&a.a.createElement("a",{href:e.url,target:e.cta.linkAction,"aria-label":null===e||void 0===e||null===(i=e.image)||void 0===i?void 0:i.altText},a.a.createElement("div",{className:"pdp-card"},a.a.createElement("img",{src:e.image.url,key:t,alt:e.image.altText}))),!e.cta.isInternal&&"_blank"===e.cta.linkAction&&a.a.createElement("a",{href:e.url,target:e.cta.linkAction,"aria-label":null===e||void 0===e||null===(o=e.image)||void 0===o?void 0:o.altText},a.a.createElement("div",{className:"pdp-card"},a.a.createElement("img",{src:e.image.url,key:t,alt:e.image.altText})))),a.a.createElement("div",{className:"text-center mt-2"},a.a.createElement("a",{href:e.cta.url,target:e.cta.linkAction,"aria-label":e.title.text,className:"amarr-h5"},e.title.text)))})))))};u.defaultProps={config:"",theme:"",pdpCarouselData:""};t.a=u},19:function(e,t){e.exports=ReactDOM},414:function(e,t,n){"use strict";n.r(t);var r=n(13),a=n(122);t.default=r.a.create({component:a.a,configuration:{tagname:"amarr-pdpcarousel",useShadow:!1},plugins:[]})}});
|