@assaabloy/amarr-wc-carousel 2.0.2 → 2.0.3

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 (2) hide show
  1. package/carousel.js +1 -1
  2. package/package.json +2 -2
package/carousel.js CHANGED
@@ -1 +1 @@
1
- !function(e){function t(t){for(var a,o,d=t[0],c=t[1],l=t[2],p=0,m=[];p<d.length;p++)o=d[p],Object.prototype.hasOwnProperty.call(i,o)&&i[o]&&m.push(i[o][0]),i[o]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(s&&s(t);m.length;)m.shift()();return r.push.apply(r,l||[]),n()}function n(){for(var e,t=0;t<r.length;t++){for(var n=r[t],a=!0,d=1;d<n.length;d++){var c=n[d];0!==i[c]&&(a=!1)}a&&(r.splice(t--,1),e=o(o.s=n[0]))}return e}var a={},i={6:0},r=[];function o(t){if(a[t])return a[t].exports;var n=a[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=a,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 a in e)o.d(n,a,function(t){return e[t]}.bind(null,a));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 d=this["webpackJsonpamarr-frontend-components"]=this["webpackJsonpamarr-frontend-components"]||[],c=d.push.bind(d);d.push=t,d=d.slice();for(var l=0;l<d.length;l++)t(d[l]);var s=c;r.push([454,0]),n()}({0:function(e,t){e.exports=React},1:function(e,t,n){"use strict";n.d(t,"g",(function(){return i})),n.d(t,"N",(function(){return r})),n.d(t,"i",(function(){return o})),n.d(t,"B",(function(){return d})),n.d(t,"D",(function(){return c})),n.d(t,"t",(function(){return l})),n.d(t,"z",(function(){return s})),n.d(t,"n",(function(){return p})),n.d(t,"p",(function(){return m})),n.d(t,"E",(function(){return u})),n.d(t,"K",(function(){return x})),n.d(t,"s",(function(){return h})),n.d(t,"h",(function(){return f})),n.d(t,"r",(function(){return g})),n.d(t,"w",(function(){return w})),n.d(t,"u",(function(){return b})),n.d(t,"A",(function(){return v})),n.d(t,"q",(function(){return y})),n.d(t,"o",(function(){return k})),n.d(t,"C",(function(){return S})),n.d(t,"L",(function(){return O})),n.d(t,"l",(function(){return I})),n.d(t,"j",(function(){return z})),n.d(t,"m",(function(){return j})),n.d(t,"k",(function(){return T})),n.d(t,"x",(function(){return _})),n.d(t,"G",(function(){return A})),n.d(t,"v",(function(){return C})),n.d(t,"M",(function(){return $})),n.d(t,"b",(function(){return M})),n.d(t,"J",(function(){return P})),n.d(t,"y",(function(){return H})),n.d(t,"a",(function(){return L})),n.d(t,"d",(function(){return Z})),n.d(t,"f",(function(){return B})),n.d(t,"e",(function(){return D})),n.d(t,"c",(function(){return F})),n.d(t,"O",(function(){return J})),n.d(t,"F",(function(){return R})),n.d(t,"H",(function(){return U})),n.d(t,"I",(function(){return q}));var a=n(3),i=function(e){return JSON.parse(decodeURIComponent(escape(atob(e))))},r=function(e){return btoa(unescape(encodeURIComponent(e)))},o=function(e){return e.toUpperCase()},d=function(e){return e.replaceAll(" ","-").toLowerCase()},c=new a.a(!1),l=new a.a(!1),s=new a.a(!1),p=new a.a(!1),m=new a.a(""),u=new a.a(!1),x=new a.a(!1),h=new a.a(!1),f=new a.a(!1),g=new a.a(""),w=new a.a(!0),b=new a.a(!0),v=new a.a(!0),y=new a.a(!0),k=new a.a(!0),E=new a.a(!1),N=0,S=new a.a(!1),O=new a.a(""),I=new a.a(""),z=new a.a(""),j=new a.a(""),T=new a.a(""),_=new a.a(""),A=new a.a(""),C=new a.a(!1),$=new a.a(!1),M=function(){setTimeout((function(){N++,E.next(!0)}),0)},P=function(){setTimeout((function(){N>0&&N--,0==N&&E.next(!1)}),0)},H=function(){return E.asObservable()},L=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)},Z=function(e){return e.match(/^[a-zA-Z\xc0-\xff-. ]*$/)},B=function(e){return/^[0-9a-zA-Z !@#\$%\^\&*\)\(+=._-]+$/.test(e)},D=function(e){return/^\(?([0-9]{3})\)\s[0-9]{3}-[0-9]{4}$/.test(e)},F=function(e){return/^[0-9]*$/.test(e)},J=function(e){return!!/^[-a-zA-Z0-9+&@#/%?=~|!:,.;]*[-a-zA-Z0-9+&@#/%=~|]$/.test(e)},R=function(e){if(e&&""!==e&&-1===e.indexOf("(")&&-1===e.indexOf(") ")&&-1===e.indexOf("-")){return"("+e.substring(0,3)+") "+e.substring(3,6)+"-"+e.substring(6,e.length)}return e},U=function(e){return e&&(e=e.toFixed(2).replace(/\d(?=(\d{3})+\.)/g,"$&,")),0!==e&&"0"!==e||(e=e.toFixed(2)),e},q=function(e,t){return e=e?Number(e):0,(0===(t=t?Number(t):0)||"0"===t?0:(e-t)/t*100).toFixed(2)}},18:function(e,t){e.exports=ReactDOM},365:function(e,t,n){"use strict";n.r(t);var a=n(13),i=n(72);t.default=a.a.create({component:i.a,configuration:{tagname:"amarr-carousel",useShadow:!1},plugins:[]})},5:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var a=n(20),i=n(0),r=n.n(i),o=n(4),d=o.default.div.withConfig({displayName:"styles__View",componentId:"sc-1jt3i0i-0"})([""]),c=o.default.button.withConfig({displayName:"styles__Button",componentId:"sc-1jt3i0i-1"})(['font-size:12px;font-family:"Open Sans";font-weight:600;font-stretch:normal;font-style:normal;line-height:1.5;letter-spacing:normal;text-align:center;color:#fff;padding:12px 19px 12px 20px;border-radius:4px;background-color:#006166;box-shadow:none;border:none;transition:all ease 300ms;&:hover{transform:scale(1.1);background-color:#338084;color:#fff;}&:focus{transform:scale(1);box-shadow:none !important;background-color:#004347;}&:active{background-color:#006166 !important;box-shadow:none !important;transform:scale(1);border:none !important;}&.btn-inverse{color:#333333;background:#b2cfd1;&:hover{background:#8EB8BB;}&:focus{background:#8EA5A7;border:none;transform:scale(1);box-shadow:none !important;}&:active{background-color:#8EA5A7 !important;border:none !important;transform:scale(1.1);box-shadow:none !important;}}@media(min-width:1201px){font-size:16px;}.button-icon{vertical-align:top;padding-right:8px;}']),l=function(e){var t=e.label,n=void 0===t?"label":t,i=e.classStyle,o=void 0===i?"default":i,l=e.link,s=void 0!==l&&l,p=e.disabled,m=void 0!==p&&p,u=e.datatoggle,x=void 0===u?"":u,h=e.datatarget,f=void 0===h?"":h,g=e.linkHref,w=e.target,b=void 0===w?"_self":w,v=e.downloadLink,y=void 0!==v&&v,k=e.inverse,E=void 0!==k&&k,N=e.icon,S=void 0===N?"":N,O=e.iconAlt,I=void 0===O?"":O,z=e.dataItemName,j=void 0===z?"":z,T=e.id,_=void 0===T?"":T,A=e.type,C=void 0===A?"button":A,$=Object(a.a)(e,["label","classStyle","link","disabled","datatoggle","datatarget","linkHref","target","downloadLink","inverse","icon","iconAlt","dataItemName","id","type"]);return r.a.createElement(d,null,r.a.createElement("div",{className:""},s?r.a.createElement("a",{href:g,download:y,target:b,"data-item-name":j,id:_},r.a.createElement(c,Object.assign({disabled:m,classStyle:"".concat(o)},$,{type:C,className:E?"btn-inverse btn btn-success":"btn btn-success"}),""!=S?r.a.createElement("div",{"data-toggle":x,"data-target":f},r.a.createElement("img",{className:"button-icon",src:S,alt:I}),r.a.createElement("span",null,n)):r.a.createElement("span",null,n))):r.a.createElement(c,Object.assign({disabled:m,classStyle:o,className:E?"btn-inverse btn btn-success":"btn btn-success",id:_,"data-item-name":j,type:C},$),r.a.createElement("span",null,n))))}},72:function(e,t,n){"use strict";var a=n(0),i=n.n(a),r=n(4),o=(n(47),n(48),r.default.section.withConfig({displayName:"styles__Content",componentId:"sc-1k0270s-0"})(['.right-structure{.carousel-text{position:absolute;left:auto;right:10%;bottom:20%;}}.carousel{background:#f0f0f0;position:relative;}.slider-dots-center{display:flex;width:100%;justify-content:center;.carousel-indicators-center{display:flex;padding-left:0px !important;}}.slider-dots-wrapper{position:absolute;left:0;bottom:60px;z-index:15;.carousel-indicators{margin:0;position:static;list-style:none;padding-left:22px;li{width:10px;height:10px;border:1px solid #8d8d8d;background-color:#fff;border-radius:50%;box-sizing:border-box;&.active{background-color:#006166;}&:first-child{margin-left:0;}@media screen and (min-width:1200px){width:12px;height:12px;}}}.carousel-inner{@media screen and (min-width:576px and max-width:991px){margin-top:70px;}}}.bxslider-parent{position:relative;margin:0 auto;.bx-pager-item{display:none;}#proprev{position:absolute;left:120px;top:42%;width:72px;cursor:pointer;}#pronext{position:absolute;right:120px;top:42%;width:72px;cursor:pointer;}.bx-wrapper{border:none;box-shadow:none;margin:0 auto 20px;}}@media screen and (max-width:767px){.bxslider-parent{width:100%;#proprev,#pronext{display:none;}.bx-wrapper{margin-bottom:0;li{height:270px;}img{object-fit:cover;min-height:100%;}}}h2.carousel-heading.heading-style-1{font-size:24px;line-height:36px;}.slider-dots-wrapper{bottom:20px;}.carousel-text{button{padding:7px 14px;font-size:14px;}}}@media screen and (min-width:768px){.slider-dots-wrapper{bottom:30px;.carousel-indicators{padding-left:30px;}}.carousel-text{button{padding:9px 15px;font-size:12px;}}.bxslider-parent{#proprev,#pronext{width:42px;}#proprev{left:4%;}#pronext{right:4%;}.bx-wrapper{max-width:calc(100% - 124px)!important;li{width:calc((100vw - 60px - 164px) / 3)!important;height:250px;overflow:hidden;}img{object-fit:cover;min-height:100%;}}}}@media screen and (min-width:992px){.slider-dots-wrapper{bottom:40px;.carousel-indicators{padding-left:60px;}}h2.carousel-heading.heading-style-1{font-size:36px;line-height:54px;}.bxslider-parent{.bx-wrapper{li{height:300px;}}}}@media screen and (min-width:992px) and (max-width:1024px){.slider-dots-wrapper{.carousel-indicators{padding-left:40px;}}}@media screen and (min-width:1281px){.slider-dots-wrapper{.carousel-indicators{padding-left:80px;}}h2.carousel-heading.heading-style-1{font-size:48px;line-height:72px;}.carousel-text{button{padding:9px 18px;font-size:14px;}}.bxslider-parent{#proprev,#pronext{width:60px;}#proprev{left:4%;}#pronext{right:4%;}.bx-wrapper{max-width:calc(100% - 180px)!important;li{width:calc((100vw - 160px - 210px) / 3)!important;height:400px;}}}}@media screen and (min-width:1681px){.slider-dots-wrapper{bottom:60px;.carousel-indicators{padding-left:120px;}}.carousel-text{button{padding:10px 24px;font-size:18px;}}h2.carousel-heading.heading-style-1{font-size:60px;line-height:90px;}.bxslider-parent{.bx-wrapper{max-width:calc(100% - 204px)!important;li{width:calc((100vw - 240px - 204px) / 3)!important;height:540px;}}}}@media screen and (min-width:1921px){.bxslider-parent{.bx-wrapper{li{width:calc(1476px / 3)!important;}}}}.custom-slick-carousel{@media screen and (max-width:767px){margin-bottom:0px;}@media screen and (min-width:768px) and (max-width:991px){margin-bottom:18px;}@media screen and (min-width:992px) and (max-width:1024px){margin-bottom:16px;}@media screen and (min-width:1025px) and (max-width:1280px){margin-bottom:14px;}@media screen and (min-width:1281px) and (max-width:1680px){margin-bottom:8px;}@media screen and (min-width:1681px){margin-bottom:4px;}.slick-track{display:flex !important;gap:1px;@media screen and (min-width:768px){gap:16px;}}.slick-slider{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);}}.slick{&-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;}}}}}@media screen and (min-color-index:0) and(-webkit-min-device-pixel-ratio:0){@media{@media screen and (min-width:1281px){.home-carousel{max-height:68vh;.carousel-inner{max-height:68vh;}}}}}@media screen and (min-width:768px) and (max-width:1280px){.carousel-text{width:40%;}}'])),d=n(5),c=r.default.section.withConfig({displayName:"styles__Content",componentId:"sc-18r9b02-0"})(['.top-img{width:100%;@media screen and (min-width:1921px){span{display:block !important;width:100%;}}@media screen and (max-width:768px){span{display:block !important;}}max-height:400px;@media screen and (min-width:1681px){max-height:650px;}}position:relative;.carousel-text{position:absolute;bottom:26%;width:70%;@media screen and (min-width:768px) and (max-width:991px){width:70%;}@media screen and (min-width:992px){width:40%;}@media screen and (max-width:767px){bottom:48px;}}.heading-style-1{font-family:"Open Sans";font-weight:bold;color:#fff;margin-bottom:0px;}.text-style-1{color:#fff;@media screen and (min-width:1200px){}p,span{color:#ffff !important;}}@media screen and (min-width:769px){.img-responsive{height:100%;}}.text-padding{padding-top:18px;margin-bottom:36px;@media screen and (max-width:1680px){padding-top:14px;margin-bottom:32px;}@media screen and (max-width:1280px){padding-top:14px;margin-bottom:26px;}@media screen and (min-width:768px) and (max-width:991px){padding-top:9px;margin-bottom:18px;}}.gradient-overlay{content:"";position:absolute;top:0;background-image:linear-gradient(to right,#000000,rgba(0,0,0,0));width:100%;opacity:0.43;height:100%;z-index:1;}.text-section{z-index:3;}']),l=n(1),s=n(39),p=function(e){var t,n=e.item;return i.a.createElement(c,null,i.a.createElement("div",{className:"row m-0"},i.a.createElement("div",{className:"top-img p-0"},(null===n||void 0===n||null===(t=n.mobileImage)||void 0===t?void 0:t.url)?i.a.createElement(s.a,{className:"img-responsive",src:n.mobileImage.url,fallback:"",alt:n.image.altText,sources:[{source:n.mobileImage.url,media:"(min-width: 320px)"},{source:n.image.url,media:"(min-width: 768px)"}]}):i.a.createElement(s.a,{className:"img-responsive",src:n.image.url,fallback:"",alt:n.image.altText,sources:[{source:n.image.url,media:"(min-width: 320px)"},{source:n.image.url,media:"(min-width: 768px)"}]})),i.a.createElement("div",{className:"gradient-overlay"}),i.a.createElement("div",{className:"text-section"},i.a.createElement("div",{className:"container"},i.a.createElement("div",{className:"d-flex align-items-center p-0"},i.a.createElement("div",{className:"carousel-text"},"h1"===n.headingStyle&&n.header.text&&""!==n.header.text&&i.a.createElement("h1",{className:"heading-style-1"},n.header.text),"h2"===n.headingStyle&&n.header.text&&""!==n.header.text&&i.a.createElement("h2",{className:"heading-style-1 carousel-heading mb-0"},n.header.text),"h3"===n.headingStyle&&n.header.text&&""!==n.header.text&&i.a.createElement("h3",{className:"heading-style-1"},n.header.text),"h4"===n.headingStyle&&n.header.text&&""!==n.header.text&&i.a.createElement("h4",{className:"heading-style-1"},n.header.text),"h5"===n.headingStyle&&n.header.text&&""!==n.header.text&&i.a.createElement("h5",{className:"heading-style-1"},n.header.text),"h6"===n.headingStyle&&n.header.text&&""!==n.header.text&&i.a.createElement("h6",{className:"heading-style-1"},n.header.text),"capitalize"===n.headingStyle&&n.header.text&&""!==n.header.text&&i.a.createElement("div",{className:"heading-style-1 text-style-uppercase"},n.header.text),i.a.createElement("div",{className:"text-padding text-style-1",dangerouslySetInnerHTML:{__html:n.body.text}}),n.cta&&n.cta.label&&n.cta.linkAction&&i.a.createElement(d.a,{label:Object(l.i)(n.cta.label),link:!0,linkHref:n.cta.url,target:n.cta.linkAction})))))))},m=n(36),u=n.n(m),x=function(e){var t=e.carouselData,n=Object(l.g)(t),r={infinite:!0,slidesToShow:3,slidesToScroll:3,initialSlide:0,responsive:[{breakpoint:1024,settings:{slidesToShow:3,slidesToScroll:3}},{breakpoint:767,settings:{slidesToShow:1,slidesToScroll:1,initialSlide:0,infinite:!0}}]};return Object(a.useEffect)((function(){if("image-only"!=n.variation){var e=document.createElement("script");e.innerHTML='$(".home-carousel").carousel({ interval: 6000 })',document.body.appendChild(e)}}),[]),i.a.createElement(o,null,i.a.createElement("div",{className:"large-screen-container ".concat("image-only"===n.variation?"container":"container-fluid p-0")},i.a.createElement("div",{className:"".concat("image-only"!==n.variation&&"row mr-0 ml-0 align-items-center")},"image-only"===n.variation?i.a.createElement("section",{className:"custom-slick-carousel"},i.a.createElement(u.a,r,n.carouselImageItems&&n.carouselImageItems.length>0&&n.carouselImageItems.map((function(e,t){var n,a;return i.a.createElement("div",{key:t,className:"slick-slider-container","aria-label":(null===e||void 0===e||null===(n=e.image)||void 0===n?void 0:n.altText)?e.image.altText:""},i.a.createElement("img",{src:e.image.url,key:t,alt:(null===e||void 0===e||null===(a=e.image)||void 0===a?void 0:a.altText)?e.image.altText:""}))})))):i.a.createElement("div",{id:"home-carousel",className:"home-carousel carousel slide w-100","data-ride":"carousel"},i.a.createElement("div",{className:"".concat("center"===n.alignment&&"slider-dots-center"," slider-dots-wrapper")},i.a.createElement("ol",{className:"".concat("center"===n.alignment&&"carousel-indicators-center"," carousel-indicators"),role:"list","aria-roledescription":"carousel","aria-label":"Slides"},n.carouselItems&&n.carouselItems.length>1&&n.carouselItems.map((function(e,t){return i.a.createElement("li",{key:t,"data-target":"#home-carousel","data-slide-to":t,className:0===t?"active":"","aria-label":"Slide".concat(t),"aria-roledescription":"slide"})})))),i.a.createElement("div",{className:"right"===n.textAlignment?"right-structure carousel-inner":"carousel-inner"},n.carouselItems&&n.carouselItems.length>0&&n.carouselItems.map((function(e,t){return i.a.createElement("div",{key:t,className:0===t?"carousel-item active":"carousel-item"},i.a.createElement(p,{key:t,item:e}))})))))))};x.defaultProps={config:"",theme:"",carouselData:""};t.a=x}});
1
+ !function(e){function t(t){for(var a,o,d=t[0],c=t[1],l=t[2],p=0,m=[];p<d.length;p++)o=d[p],Object.prototype.hasOwnProperty.call(i,o)&&i[o]&&m.push(i[o][0]),i[o]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(s&&s(t);m.length;)m.shift()();return r.push.apply(r,l||[]),n()}function n(){for(var e,t=0;t<r.length;t++){for(var n=r[t],a=!0,d=1;d<n.length;d++){var c=n[d];0!==i[c]&&(a=!1)}a&&(r.splice(t--,1),e=o(o.s=n[0]))}return e}var a={},i={6:0},r=[];function o(t){if(a[t])return a[t].exports;var n=a[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=a,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 a in e)o.d(n,a,function(t){return e[t]}.bind(null,a));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 d=this["webpackJsonpamarr-frontend-components"]=this["webpackJsonpamarr-frontend-components"]||[],c=d.push.bind(d);d.push=t,d=d.slice();for(var l=0;l<d.length;l++)t(d[l]);var s=c;r.push([454,0]),n()}({0:function(e,t){e.exports=React},1:function(e,t,n){"use strict";n.d(t,"g",(function(){return i})),n.d(t,"O",(function(){return r})),n.d(t,"i",(function(){return o})),n.d(t,"B",(function(){return d})),n.d(t,"D",(function(){return c})),n.d(t,"t",(function(){return l})),n.d(t,"z",(function(){return s})),n.d(t,"n",(function(){return p})),n.d(t,"p",(function(){return m})),n.d(t,"E",(function(){return u})),n.d(t,"K",(function(){return x})),n.d(t,"s",(function(){return h})),n.d(t,"h",(function(){return f})),n.d(t,"r",(function(){return g})),n.d(t,"w",(function(){return w})),n.d(t,"u",(function(){return b})),n.d(t,"A",(function(){return v})),n.d(t,"q",(function(){return y})),n.d(t,"o",(function(){return k})),n.d(t,"C",(function(){return S})),n.d(t,"L",(function(){return O})),n.d(t,"l",(function(){return I})),n.d(t,"j",(function(){return z})),n.d(t,"m",(function(){return j})),n.d(t,"k",(function(){return T})),n.d(t,"x",(function(){return _})),n.d(t,"G",(function(){return A})),n.d(t,"v",(function(){return C})),n.d(t,"M",(function(){return P})),n.d(t,"N",(function(){return $})),n.d(t,"b",(function(){return M})),n.d(t,"J",(function(){return H})),n.d(t,"y",(function(){return L})),n.d(t,"a",(function(){return Z})),n.d(t,"d",(function(){return B})),n.d(t,"f",(function(){return D})),n.d(t,"e",(function(){return F})),n.d(t,"c",(function(){return J})),n.d(t,"P",(function(){return R})),n.d(t,"F",(function(){return U})),n.d(t,"H",(function(){return q})),n.d(t,"I",(function(){return G}));var a=n(3),i=function(e){return JSON.parse(decodeURIComponent(escape(atob(e))))},r=function(e){return btoa(unescape(encodeURIComponent(e)))},o=function(e){return e.toUpperCase()},d=function(e){return e.replaceAll(" ","-").toLowerCase()},c=new a.a(!1),l=new a.a(!1),s=new a.a(!1),p=new a.a(!1),m=new a.a(""),u=new a.a(!1),x=new a.a(!1),h=new a.a(!1),f=new a.a(!1),g=new a.a(""),w=new a.a(!0),b=new a.a(!0),v=new a.a(!0),y=new a.a(!0),k=new a.a(!0),E=new a.a(!1),N=0,S=new a.a(!1),O=new a.a(""),I=new a.a(""),z=new a.a(""),j=new a.a(""),T=new a.a(""),_=new a.a(""),A=new a.a(""),C=new a.a(!1),P=new a.a(!1),$=new a.a(!1),M=function(){setTimeout((function(){N++,E.next(!0)}),0)},H=function(){setTimeout((function(){N>0&&N--,0==N&&E.next(!1)}),0)},L=function(){return E.asObservable()},Z=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)},B=function(e){return e.match(/^[a-zA-Z\xc0-\xff-. ]*$/)},D=function(e){return/^[0-9a-zA-Z !@#\$%\^\&*\)\(+=._-]+$/.test(e)},F=function(e){return/^\(?([0-9]{3})\)\s[0-9]{3}-[0-9]{4}$/.test(e)},J=function(e){return/^[0-9]*$/.test(e)},R=function(e){return!!/^[-a-zA-Z0-9+&@#/%?=~|!:,.;]*[-a-zA-Z0-9+&@#/%=~|]$/.test(e)},U=function(e){if(e&&""!==e&&-1===e.indexOf("(")&&-1===e.indexOf(") ")&&-1===e.indexOf("-")){return"("+e.substring(0,3)+") "+e.substring(3,6)+"-"+e.substring(6,e.length)}return e},q=function(e){return e&&(e=e.toFixed(2).replace(/\d(?=(\d{3})+\.)/g,"$&,")),0!==e&&"0"!==e||(e=e.toFixed(2)),e},G=function(e,t){return e=e?Number(e):0,(0===(t=t?Number(t):0)||"0"===t?0:(e-t)/t*100).toFixed(2)}},18:function(e,t){e.exports=ReactDOM},365:function(e,t,n){"use strict";n.r(t);var a=n(13),i=n(72);t.default=a.a.create({component:i.a,configuration:{tagname:"amarr-carousel",useShadow:!1},plugins:[]})},5:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var a=n(20),i=n(0),r=n.n(i),o=n(4),d=o.default.div.withConfig({displayName:"styles__View",componentId:"sc-1jt3i0i-0"})([""]),c=o.default.button.withConfig({displayName:"styles__Button",componentId:"sc-1jt3i0i-1"})(['font-size:12px;font-family:"Open Sans";font-weight:600;font-stretch:normal;font-style:normal;line-height:1.5;letter-spacing:normal;text-align:center;color:#fff;padding:12px 19px 12px 20px;border-radius:4px;background-color:#006166;box-shadow:none;border:none;transition:all ease 300ms;&:hover{transform:scale(1.1);background-color:#338084;color:#fff;}&:focus{transform:scale(1);box-shadow:none !important;background-color:#004347;}&:active{background-color:#006166 !important;box-shadow:none !important;transform:scale(1);border:none !important;}&.btn-inverse{color:#333333;background:#b2cfd1;&:hover{background:#8EB8BB;}&:focus{background:#8EA5A7;border:none;transform:scale(1);box-shadow:none !important;}&:active{background-color:#8EA5A7 !important;border:none !important;transform:scale(1.1);box-shadow:none !important;}}@media(min-width:1201px){font-size:16px;}.button-icon{vertical-align:top;padding-right:8px;}']),l=function(e){var t=e.label,n=void 0===t?"label":t,i=e.classStyle,o=void 0===i?"default":i,l=e.link,s=void 0!==l&&l,p=e.disabled,m=void 0!==p&&p,u=e.datatoggle,x=void 0===u?"":u,h=e.datatarget,f=void 0===h?"":h,g=e.linkHref,w=e.target,b=void 0===w?"_self":w,v=e.downloadLink,y=void 0!==v&&v,k=e.inverse,E=void 0!==k&&k,N=e.icon,S=void 0===N?"":N,O=e.iconAlt,I=void 0===O?"":O,z=e.dataItemName,j=void 0===z?"":z,T=e.id,_=void 0===T?"":T,A=e.type,C=void 0===A?"button":A,P=Object(a.a)(e,["label","classStyle","link","disabled","datatoggle","datatarget","linkHref","target","downloadLink","inverse","icon","iconAlt","dataItemName","id","type"]);return r.a.createElement(d,null,r.a.createElement("div",{className:""},s?r.a.createElement("a",{href:g,download:y,target:b,"data-item-name":j,id:_},r.a.createElement(c,Object.assign({disabled:m,classStyle:"".concat(o)},P,{type:C,className:E?"btn-inverse btn btn-success":"btn btn-success"}),""!=S?r.a.createElement("div",{"data-toggle":x,"data-target":f},r.a.createElement("img",{className:"button-icon",src:S,alt:I}),r.a.createElement("span",null,n)):r.a.createElement("span",null,n))):r.a.createElement(c,Object.assign({disabled:m,classStyle:o,className:E?"btn-inverse btn btn-success":"btn btn-success",id:_,"data-item-name":j,type:C},P),r.a.createElement("span",null,n))))}},72:function(e,t,n){"use strict";var a=n(0),i=n.n(a),r=n(4),o=(n(47),n(48),r.default.section.withConfig({displayName:"styles__Content",componentId:"sc-1k0270s-0"})(['.right-structure{.carousel-text{position:absolute;left:auto;right:10%;bottom:20%;}}.carousel{background:#f0f0f0;position:relative;}.slider-dots-center{display:flex;width:100%;justify-content:center;.carousel-indicators-center{display:flex;padding-left:0px !important;}}.slider-dots-wrapper{position:absolute;left:0;bottom:60px;z-index:15;.carousel-indicators{margin:0;position:static;list-style:none;padding-left:22px;li{width:10px;height:10px;border:1px solid #8d8d8d;background-color:#fff;border-radius:50%;box-sizing:border-box;&.active{background-color:#006166;}&:first-child{margin-left:0;}@media screen and (min-width:1200px){width:12px;height:12px;}}}.carousel-inner{@media screen and (min-width:576px and max-width:991px){margin-top:70px;}}}.bxslider-parent{position:relative;margin:0 auto;.bx-pager-item{display:none;}#proprev{position:absolute;left:120px;top:42%;width:72px;cursor:pointer;}#pronext{position:absolute;right:120px;top:42%;width:72px;cursor:pointer;}.bx-wrapper{border:none;box-shadow:none;margin:0 auto 20px;}}@media screen and (max-width:767px){.bxslider-parent{width:100%;#proprev,#pronext{display:none;}.bx-wrapper{margin-bottom:0;li{height:270px;}img{object-fit:cover;min-height:100%;}}}h2.carousel-heading.heading-style-1{font-size:24px;line-height:36px;}.slider-dots-wrapper{bottom:20px;}.carousel-text{button{padding:7px 14px;font-size:14px;}}}@media screen and (min-width:768px){.slider-dots-wrapper{bottom:30px;.carousel-indicators{padding-left:30px;}}.carousel-text{button{padding:9px 15px;font-size:12px;}}.bxslider-parent{#proprev,#pronext{width:42px;}#proprev{left:4%;}#pronext{right:4%;}.bx-wrapper{max-width:calc(100% - 124px)!important;li{width:calc((100vw - 60px - 164px) / 3)!important;height:250px;overflow:hidden;}img{object-fit:cover;min-height:100%;}}}}@media screen and (min-width:992px){.slider-dots-wrapper{bottom:40px;.carousel-indicators{padding-left:60px;}}h2.carousel-heading.heading-style-1{font-size:36px;line-height:54px;}.bxslider-parent{.bx-wrapper{li{height:300px;}}}}@media screen and (min-width:992px) and (max-width:1024px){.slider-dots-wrapper{.carousel-indicators{padding-left:40px;}}}@media screen and (min-width:1281px){.slider-dots-wrapper{.carousel-indicators{padding-left:80px;}}h2.carousel-heading.heading-style-1{font-size:48px;line-height:72px;}.carousel-text{button{padding:9px 18px;font-size:14px;}}.bxslider-parent{#proprev,#pronext{width:60px;}#proprev{left:4%;}#pronext{right:4%;}.bx-wrapper{max-width:calc(100% - 180px)!important;li{width:calc((100vw - 160px - 210px) / 3)!important;height:400px;}}}}@media screen and (min-width:1681px){.slider-dots-wrapper{bottom:60px;.carousel-indicators{padding-left:120px;}}.carousel-text{button{padding:10px 24px;font-size:18px;}}h2.carousel-heading.heading-style-1{font-size:60px;line-height:90px;}.bxslider-parent{.bx-wrapper{max-width:calc(100% - 204px)!important;li{width:calc((100vw - 240px - 204px) / 3)!important;height:540px;}}}}@media screen and (min-width:1921px){.bxslider-parent{.bx-wrapper{li{width:calc(1476px / 3)!important;}}}}.custom-slick-carousel{@media screen and (max-width:767px){margin-bottom:0px;}@media screen and (min-width:768px) and (max-width:991px){margin-bottom:18px;}@media screen and (min-width:992px) and (max-width:1024px){margin-bottom:16px;}@media screen and (min-width:1025px) and (max-width:1280px){margin-bottom:14px;}@media screen and (min-width:1281px) and (max-width:1680px){margin-bottom:8px;}@media screen and (min-width:1681px){margin-bottom:4px;}.slick-track{display:flex !important;gap:1px;@media screen and (min-width:768px){gap:16px;}}.slick-slider{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);}}.slick{&-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;}}}}}@media screen and (min-color-index:0) and(-webkit-min-device-pixel-ratio:0){@media{@media screen and (min-width:1281px){.home-carousel{max-height:68vh;.carousel-inner{max-height:68vh;}}}}}@media screen and (min-width:768px) and (max-width:1280px){.carousel-text{width:40%;}}'])),d=n(5),c=r.default.section.withConfig({displayName:"styles__Content",componentId:"sc-18r9b02-0"})(['.top-img{width:100%;@media screen and (min-width:1921px){span{display:block !important;width:100%;}}@media screen and (max-width:768px){span{display:block !important;}}max-height:400px;@media screen and (min-width:1681px){max-height:650px;}}position:relative;.carousel-text{position:absolute;bottom:26%;width:70%;@media screen and (min-width:768px) and (max-width:991px){width:70%;}@media screen and (min-width:992px){width:40%;}@media screen and (max-width:767px){bottom:48px;}}.heading-style-1{font-family:"Open Sans";font-weight:bold;color:#fff;margin-bottom:0px;}.text-style-1{color:#fff;@media screen and (min-width:1200px){}p,span{color:#ffff !important;}}@media screen and (min-width:769px){.img-responsive{height:100%;}}.text-padding{padding-top:18px;margin-bottom:36px;@media screen and (max-width:1680px){padding-top:14px;margin-bottom:32px;}@media screen and (max-width:1280px){padding-top:14px;margin-bottom:26px;}@media screen and (min-width:768px) and (max-width:991px){padding-top:9px;margin-bottom:18px;}}.gradient-overlay{content:"";position:absolute;top:0;background-image:linear-gradient(to right,#000000,rgba(0,0,0,0));width:100%;opacity:0.43;height:100%;z-index:1;}.text-section{z-index:3;}']),l=n(1),s=n(39),p=function(e){var t,n=e.item;return i.a.createElement(c,null,i.a.createElement("div",{className:"row m-0"},i.a.createElement("div",{className:"top-img p-0"},(null===n||void 0===n||null===(t=n.mobileImage)||void 0===t?void 0:t.url)?i.a.createElement(s.a,{className:"img-responsive",src:n.mobileImage.url,fallback:"",alt:n.image.altText,sources:[{source:n.mobileImage.url,media:"(min-width: 320px)"},{source:n.image.url,media:"(min-width: 768px)"}]}):i.a.createElement(s.a,{className:"img-responsive",src:n.image.url,fallback:"",alt:n.image.altText,sources:[{source:n.image.url,media:"(min-width: 320px)"},{source:n.image.url,media:"(min-width: 768px)"}]})),i.a.createElement("div",{className:"gradient-overlay"}),i.a.createElement("div",{className:"text-section"},i.a.createElement("div",{className:"container"},i.a.createElement("div",{className:"d-flex align-items-center p-0"},i.a.createElement("div",{className:"carousel-text"},"h1"===n.headingStyle&&n.header.text&&""!==n.header.text&&i.a.createElement("h1",{className:"heading-style-1"},n.header.text),"h2"===n.headingStyle&&n.header.text&&""!==n.header.text&&i.a.createElement("h2",{className:"heading-style-1 carousel-heading mb-0"},n.header.text),"h3"===n.headingStyle&&n.header.text&&""!==n.header.text&&i.a.createElement("h3",{className:"heading-style-1"},n.header.text),"h4"===n.headingStyle&&n.header.text&&""!==n.header.text&&i.a.createElement("h4",{className:"heading-style-1"},n.header.text),"h5"===n.headingStyle&&n.header.text&&""!==n.header.text&&i.a.createElement("h5",{className:"heading-style-1"},n.header.text),"h6"===n.headingStyle&&n.header.text&&""!==n.header.text&&i.a.createElement("h6",{className:"heading-style-1"},n.header.text),"capitalize"===n.headingStyle&&n.header.text&&""!==n.header.text&&i.a.createElement("div",{className:"heading-style-1 text-style-uppercase"},n.header.text),i.a.createElement("div",{className:"text-padding text-style-1",dangerouslySetInnerHTML:{__html:n.body.text}}),n.cta&&n.cta.label&&n.cta.linkAction&&i.a.createElement(d.a,{label:Object(l.i)(n.cta.label),link:!0,linkHref:n.cta.url,target:n.cta.linkAction})))))))},m=n(36),u=n.n(m),x=function(e){var t=e.carouselData,n=Object(l.g)(t),r={infinite:!0,slidesToShow:3,slidesToScroll:3,initialSlide:0,responsive:[{breakpoint:1024,settings:{slidesToShow:3,slidesToScroll:3}},{breakpoint:767,settings:{slidesToShow:1,slidesToScroll:1,initialSlide:0,infinite:!0}}]};return Object(a.useEffect)((function(){if("image-only"!=n.variation){var e=document.createElement("script");e.innerHTML='$(".home-carousel").carousel({ interval: 6000 })',document.body.appendChild(e)}}),[]),i.a.createElement(o,null,i.a.createElement("div",{className:"large-screen-container ".concat("image-only"===n.variation?"container":"container-fluid p-0")},i.a.createElement("div",{className:"".concat("image-only"!==n.variation&&"row mr-0 ml-0 align-items-center")},"image-only"===n.variation?i.a.createElement("section",{className:"custom-slick-carousel"},i.a.createElement(u.a,r,n.carouselImageItems&&n.carouselImageItems.length>0&&n.carouselImageItems.map((function(e,t){var n,a;return i.a.createElement("div",{key:t,className:"slick-slider-container","aria-label":(null===e||void 0===e||null===(n=e.image)||void 0===n?void 0:n.altText)?e.image.altText:""},i.a.createElement("img",{src:e.image.url,key:t,alt:(null===e||void 0===e||null===(a=e.image)||void 0===a?void 0:a.altText)?e.image.altText:""}))})))):i.a.createElement("div",{id:"home-carousel",className:"home-carousel carousel slide w-100","data-ride":"carousel"},i.a.createElement("div",{className:"".concat("center"===n.alignment&&"slider-dots-center"," slider-dots-wrapper")},i.a.createElement("ol",{className:"".concat("center"===n.alignment&&"carousel-indicators-center"," carousel-indicators"),role:"list","aria-roledescription":"carousel","aria-label":"Slides"},n.carouselItems&&n.carouselItems.length>1&&n.carouselItems.map((function(e,t){return i.a.createElement("li",{key:t,"data-target":"#home-carousel","data-slide-to":t,className:0===t?"active":"","aria-label":"Slide".concat(t),"aria-roledescription":"slide"})})))),i.a.createElement("div",{className:"right"===n.textAlignment?"right-structure carousel-inner":"carousel-inner"},n.carouselItems&&n.carouselItems.length>0&&n.carouselItems.map((function(e,t){return i.a.createElement("div",{key:t,className:0===t?"carousel-item active":"carousel-item"},i.a.createElement(p,{key:t,item:e}))})))))))};x.defaultProps={config:"",theme:"",carouselData:""};t.a=x}});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@assaabloy/amarr-wc-carousel",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "Web component - Carousel",
5
5
  "type": "module",
6
6
  "main": "carousel.js",
@@ -11,5 +11,5 @@
11
11
  },
12
12
  "author": "Nagarro",
13
13
  "license": "MIT",
14
- "gitHead": "1c77c090eb727e639d98eda473f368555434c60a"
14
+ "gitHead": "492c0fcdf690f0e94235150f0ab548d9553868a7"
15
15
  }