@assaabloy/amarr-wc-video-list 2.0.4 → 2.0.7
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/videoList.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@assaabloy/amarr-wc-video-list",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.7",
|
|
4
4
|
"description": "Web component - Video List",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "videoList.js",
|
|
@@ -11,5 +11,5 @@
|
|
|
11
11
|
},
|
|
12
12
|
"author": "Nagarro",
|
|
13
13
|
"license": "MIT",
|
|
14
|
-
"gitHead": "
|
|
14
|
+
"gitHead": "73b8cd71b8c7218c0f0516ab1b82759ddf7d67e6"
|
|
15
15
|
}
|
package/videoList.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e){function t(t){for(var a,o,c=t[0],d=t[1],l=t[2],p=0,s=[];p<c.length;p++)o=c[p],Object.prototype.hasOwnProperty.call(i,o)&&i[o]&&s.push(i[o][0]),i[o]=0;for(a in d)Object.prototype.hasOwnProperty.call(d,a)&&(e[a]=d[a]);for(u&&u(t);s.length;)s.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,c=1;c<n.length;c++){var d=n[c];0!==i[d]&&(a=!1)}a&&(r.splice(t--,1),e=o(o.s=n[0]))}return e}var a={},i={74: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 c=this["webpackJsonpamarr-frontend-components"]=this["webpackJsonpamarr-frontend-components"]||[],d=c.push.bind(c);c.push=t,c=c.slice();for(var l=0;l<c.length;l++)t(c[l]);var u=d;r.push([526,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,"P",(function(){return r})),n.d(t,"i",(function(){return o})),n.d(t,"B",(function(){return c})),n.d(t,"D",(function(){return d})),n.d(t,"t",(function(){return l})),n.d(t,"z",(function(){return u})),n.d(t,"n",(function(){return p})),n.d(t,"p",(function(){return s})),n.d(t,"E",(function(){return m})),n.d(t,"K",(function(){return f})),n.d(t,"s",(function(){return x})),n.d(t,"h",(function(){return h})),n.d(t,"r",(function(){return v})),n.d(t,"w",(function(){return g})),n.d(t,"u",(function(){return w})),n.d(t,"A",(function(){return b})),n.d(t,"q",(function(){return y})),n.d(t,"L",(function(){return E})),n.d(t,"o",(function(){return N})),n.d(t,"C",(function(){return z})),n.d(t,"M",(function(){return j})),n.d(t,"l",(function(){return _})),n.d(t,"j",(function(){return k})),n.d(t,"m",(function(){return P})),n.d(t,"k",(function(){return I})),n.d(t,"x",(function(){return C})),n.d(t,"G",(function(){return L})),n.d(t,"v",(function(){return A})),n.d(t,"N",(function(){return $})),n.d(t,"O",(function(){return M})),n.d(t,"b",(function(){return T})),n.d(t,"J",(function(){return Z})),n.d(t,"y",(function(){return R})),n.d(t,"a",(function(){return D})),n.d(t,"d",(function(){return F})),n.d(t,"f",(function(){return J})),n.d(t,"e",(function(){return U})),n.d(t,"c",(function(){return H})),n.d(t,"Q",(function(){return q})),n.d(t,"F",(function(){return B})),n.d(t,"H",(function(){return G})),n.d(t,"I",(function(){return K}));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()},c=function(e){return e.replaceAll(" ","-").toLowerCase()},d=new a.a(!1),l=new a.a(!1),u=new a.a(!1),p=new a.a(!1),s=new a.a(""),m=new a.a(!1),f=new a.a(!1),x=new a.a(!1),h=new a.a(!1),v=new a.a(""),g=new a.a(!0),w=new a.a(!0),b=new a.a(!0),y=new a.a(!0),E=new a.a(!0),N=new a.a(!0),O=new a.a(!1),S=0,z=new a.a(!1),j=new a.a(""),_=new a.a(""),k=new a.a(""),P=new a.a(""),I=new a.a(""),C=new a.a(""),L=new a.a(""),A=new a.a(!1),$=new a.a(!1),M=new a.a(!1),T=function(){setTimeout((function(){S++,O.next(!0)}),0)},Z=function(){setTimeout((function(){S>0&&S--,0==S&&O.next(!1)}),0)},R=function(){return O.asObservable()},D=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)},F=function(e){return e.match(/^[a-zA-Z\xc0-\xff-. ]*$/)},J=function(e){return/^[0-9a-zA-Z !@#\$%\^\&*\)\(+=._-]+$/.test(e)},U=function(e){return/^\(?([0-9]{3})\)\s[0-9]{3}-[0-9]{4}$/.test(e)},H=function(e){return/^[0-9]*$/.test(e)},q=function(e){return!!/^[-a-zA-Z0-9+&@#/%?=~|!:,.;]*[-a-zA-Z0-9+&@#/%=~|]$/.test(e)},B=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},G=function(e){return e&&(e=e.toFixed(2).replace(/\d(?=(\d{3})+\.)/g,"$&,")),0!==e&&"0"!==e||(e=e.toFixed(2)),e},K=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},437:function(e,t,n){"use strict";n.r(t);var a=n(13),i=n(99);t.default=a.a.create({component:i.a,configuration:{tagname:"amarr-videolist",useShadow:!1},plugins:[]})},52:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n(2),i=n(0),r=n.n(i),o=n(4).default.section.withConfig({displayName:"styles__Content",componentId:"sc-13lfbb6-0"})([".hide-icon{.circle{opacity:0 !important;}img{display:none;}}.play-pause-image:hover{.circle{background-color:#de0000;border-radius:50px;opacity:1;z-index:1;display:inline;}img{display:inline;}}.play-pause-image.pause:hover{.circle{background-color:#000000;opacity:0.800000012 !important;}img{display:inline;}}.play-pause-image{.circle{background-color:#000000;opacity:0.5;border-radius:50px;margin:auto;width:96px;height:96px;display:flex;align-items:center;justify-content:center;position:absolute;top:calc(50% - 47px);left:calc(50% - 47px);}.play-pause-icon{position:absolute;top:calc(50% - 47px);left:calc(50% - 47px);z-index:999;}@media screen and (min-width:1281px) and (max-width:1680px){.circle,.play-pause-icon{width:80px;height:80px;top:calc(50% - 22px);left:calc(50% - 40px);}}@media screen and (max-width:1280px){.circle,.play-pause-icon{width:70px;height:70px;top:calc(50% - 10px);left:calc(50% - 35px);}}@media screen and (min-width:992px) and (max-width:1024px){.circle,.play-pause-icon{width:50px;height:50px;top:50%;left:calc(50% - 25px);}}@media screen and (min-width:768px) and (max-width:991px){.circle,.play-pause-icon{width:40px;height:40px;top:calc(50% + 5px);left:calc(50% - 20px);}}}"]),c=function(e){var t=e.item,n=e.showControls,c=Object(i.useRef)(null),d=Object(i.useState)(!1),l=Object(a.a)(d,2),u=l[0],p=l[1],s=Object(i.useState)(!1),m=Object(a.a)(s,2),f=m[0],x=m[1],h=function(){setTimeout((function(){x(!0)}),1e3)};return r.a.createElement(o,null,!n&&r.a.createElement("video",{ref:c},r.a.createElement("source",{src:t.video.url})),n&&r.a.createElement("video",{ref:c,onPlay:function(){p(!0),h(),c.current.controls=!0},onPause:function(){x(!1),p(!1),c.current.controls=!1}},r.a.createElement("source",{src:t.video.url})),r.a.createElement("span",null,r.a.createElement("button",{onClick:function(){var e,t;u?null===(e=c.current)||void 0===e||e.pause():(null===(t=c.current)||void 0===t||t.play(),h());p(!u),x(!1)},className:"".concat(u&&"pause"," ").concat(f&&"hide-icon"," play-pause-image")},r.a.createElement("div",{className:"circle"}),r.a.createElement("img",{src:u?"/etc.clientlibs/amarr/clientlibs/themes/amarr/resources/images/ic_pause.svg":"/etc.clientlibs/amarr/clientlibs/themes/amarr/resources/images/ic_play.svg",alt:u?"Pause Icon":"Play Icon",className:"play-pause-icon"}))))}},99:function(e,t,n){"use strict";var a=n(0),i=n.n(a),r=n(1),o=n(4).default.section.withConfig({displayName:"styles__Content",componentId:"sc-1c4dt49-0"})(['.video-container{background:#f0f0f0;}h3{margin:20px 0 20px 0;@media (min-width:991px){margin:20px 0 40px 0;}}h2{padding:20px 0px 0px 0px;margin-bottom:0px;}.video-item{display:flex;align-items:center;border-bottom:solid 1px #b6b9bb;padding:24px 0px 18px 0px;@media (max-width:767px){border-bottom:none;padding-bottom:0;}@media screen and (min-width:768px) and (max-width:1023){padding:5px 0px 0px 0px;}&:last-child{border-bottom:none;}video{width:100%;}.left-space{@media (min-width:768px){padding-left:20px !important;}}.video-title{color:#fff;background:#006166;display:inline-block;padding:5px 10px;margin-bottom:10px;border-radius:3px;@media (max-width:990px){margin-top:20px;}}p{font-size:18px;line-height:28px;@media screen and (min-width:1281px) and (max-width:1680px){font-size:14px;line-height:22px;}@media screen and (min-width:768px) and (max-width:1280px){font-size:13px;line-height:20px;}@media screen and (max-width:767px){font-size:14px;line-height:20px;}}.video-div{position:relative;span{content:"";position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;}@media screen and (min-width:1281px){.circle,.play-pause-icon{width:60px;height:60px;top:calc(50% - 30px);left:calc(50% - 30px);}}@media screen and (min-width:992px) and (max-width:1280px){.circle,.play-pause-icon{width:50px;height:50px;top:calc(50% - 25px);left:calc(50% - 25px);}}@media screen and (min-width:768px) and (max-width:991px){.circle,.play-pause-icon{width:40px;height:40px;top:calc(50% - 20px);left:calc(50% - 20px);}}}button{cursor:pointer;border:none;width:100%;height:100%;position:absolute;top:0;background:transparent;}}.video-list.video-grid-parent{display:inline-grid;grid-template-columns:1fr 1fr;column-gap:30px;}.video-list-grid .video-card > div,.video-card > iframe,.video-list.video-grid-parent{width:100%;}.video-caption{margin-top:10px;margin-bottom:20px;}@media screen and (max-width:767px){.video-list.video-grid-parent{display:flex;flex-flow:column nowrap;.video-card > iframe{height:250px;}.video-card .video-caption{font-size:20px;margin-top:10px;margin-bottom:30px;}}}']),c=n(52),d=function(e){var t=e.videoListData,n=Object(r.g)(t);return i.a.createElement(o,null,i.a.createElement("div",{className:"".concat("list"===n.variation&&"video-container")},i.a.createElement("div",{className:"container dealer-col"},i.a.createElement("div",{className:"row m-0"},i.a.createElement("div",{className:"col-12 p-0"},n.header&&"h1"===n.headingStyle&&i.a.createElement("h1",{className:"".concat("grid"===n.variation&&"text-center")},n.header.text),n.header&&"h2"===n.headingStyle&&i.a.createElement("h2",{className:"".concat("grid"===n.variation&&"text-center")},n.header.text),n.header&&"h3"===n.headingStyle&&i.a.createElement("h3",{className:"".concat("grid"===n.variation&&"text-center")},n.header.text),n.header&&"h4"===n.headingStyle&&i.a.createElement("h4",{className:"".concat("grid"===n.variation&&"text-center")},n.header.text),n.header&&"h5"===n.headingStyle&&i.a.createElement("h5",{className:"".concat("grid"===n.variation&&"text-center")},n.header.text),n.header&&"h6"===n.headingStyle&&i.a.createElement("h6",{className:"".concat("grid"===n.variation&&"text-center")},n.header.text),n.header&&"capitalize"===n.headingStyle&&i.a.createElement("div",{className:"text-style-uppercase"},n.header.text),i.a.createElement("div",{className:"video-list ".concat("grid"===n.variation&&"video-grid-parent"," ").concat("list"===n.variation&&"video-list-parent")},n.videoListItems&&"list"===n.variation&&n.videoListItems.map((function(e,t){return i.a.createElement("div",{className:"video-item row m-0",key:t},i.a.createElement("div",{className:"col-sm-12 col-md-3 p-0 video-div"},e.video&&e.video.url&&i.a.createElement(c.a,{item:e})),i.a.createElement("div",{className:"col-sm-12 col-md-9 p-0 left-space"},e.header&&i.a.createElement("div",{className:"amarr-h6 video-title"},e.header.text),e.body&&i.a.createElement("p",{dangerouslySetInnerHTML:{__html:e.body.text}})))})),n.videoListItems&&"grid"===n.variation&&n.videoListItems.map((function(e,t){var n;return i.a.createElement("div",{key:t,className:"video-list-grid"},i.a.createElement("span",{className:"video-card"},e.video&&e.video.id&&i.a.createElement("iframe",{title:null===e||void 0===e||null===(n=e.header)||void 0===n?void 0:n.text,height:"397",src:"https://www.youtube.com/embed/".concat(e.video.id,"?autoplay=0&mute=1&loop=0")}),e.header&&"capitalize"!==e.headingStyle&&i.a.createElement(e.headingStyle,{className:"text-section video-caption"},e.header.text),e.header&&"capitalize"===e.headingStyle&&i.a.createElement("div",{className:"text-style-capitalize text-section video-caption"},e.header.text)))}))))))))};d.defaultProps={theme:"",videoListData:""};t.a=d}});
|
|
1
|
+
!function(e){function t(t){for(var a,o,c=t[0],d=t[1],l=t[2],p=0,s=[];p<c.length;p++)o=c[p],Object.prototype.hasOwnProperty.call(i,o)&&i[o]&&s.push(i[o][0]),i[o]=0;for(a in d)Object.prototype.hasOwnProperty.call(d,a)&&(e[a]=d[a]);for(u&&u(t);s.length;)s.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,c=1;c<n.length;c++){var d=n[c];0!==i[d]&&(a=!1)}a&&(r.splice(t--,1),e=o(o.s=n[0]))}return e}var a={},i={74: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 c=this["webpackJsonpamarr-frontend-components"]=this["webpackJsonpamarr-frontend-components"]||[],d=c.push.bind(c);c.push=t,c=c.slice();for(var l=0;l<c.length;l++)t(c[l]);var u=d;r.push([527,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,"P",(function(){return r})),n.d(t,"i",(function(){return o})),n.d(t,"B",(function(){return c})),n.d(t,"D",(function(){return d})),n.d(t,"t",(function(){return l})),n.d(t,"z",(function(){return u})),n.d(t,"n",(function(){return p})),n.d(t,"p",(function(){return s})),n.d(t,"E",(function(){return m})),n.d(t,"K",(function(){return f})),n.d(t,"s",(function(){return x})),n.d(t,"h",(function(){return h})),n.d(t,"r",(function(){return v})),n.d(t,"w",(function(){return g})),n.d(t,"u",(function(){return w})),n.d(t,"A",(function(){return b})),n.d(t,"q",(function(){return y})),n.d(t,"L",(function(){return E})),n.d(t,"o",(function(){return N})),n.d(t,"C",(function(){return z})),n.d(t,"M",(function(){return j})),n.d(t,"l",(function(){return _})),n.d(t,"j",(function(){return k})),n.d(t,"m",(function(){return P})),n.d(t,"k",(function(){return I})),n.d(t,"x",(function(){return C})),n.d(t,"G",(function(){return L})),n.d(t,"v",(function(){return A})),n.d(t,"N",(function(){return $})),n.d(t,"O",(function(){return M})),n.d(t,"b",(function(){return T})),n.d(t,"J",(function(){return Z})),n.d(t,"y",(function(){return R})),n.d(t,"a",(function(){return D})),n.d(t,"d",(function(){return F})),n.d(t,"f",(function(){return J})),n.d(t,"e",(function(){return U})),n.d(t,"c",(function(){return H})),n.d(t,"Q",(function(){return q})),n.d(t,"F",(function(){return B})),n.d(t,"H",(function(){return G})),n.d(t,"I",(function(){return K}));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()},c=function(e){return e.replaceAll(" ","-").toLowerCase()},d=new a.a(!1),l=new a.a(!1),u=new a.a(!1),p=new a.a(!1),s=new a.a(""),m=new a.a(!1),f=new a.a(!1),x=new a.a(!1),h=new a.a(!1),v=new a.a(""),g=new a.a(!0),w=new a.a(!0),b=new a.a(!0),y=new a.a(!0),E=new a.a(!0),N=new a.a(!0),O=new a.a(!1),S=0,z=new a.a(!1),j=new a.a(""),_=new a.a(""),k=new a.a(""),P=new a.a(""),I=new a.a(""),C=new a.a(""),L=new a.a(""),A=new a.a(!1),$=new a.a(!1),M=new a.a(!1),T=function(){setTimeout((function(){S++,O.next(!0)}),0)},Z=function(){setTimeout((function(){S>0&&S--,0==S&&O.next(!1)}),0)},R=function(){return O.asObservable()},D=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)},F=function(e){return e.match(/^[a-zA-Z\xc0-\xff-. ]*$/)},J=function(e){return/^[0-9a-zA-Z !@#\$%\^\&*\)\(+=._-]+$/.test(e)},U=function(e){return/^\(?([0-9]{3})\)\s[0-9]{3}-[0-9]{4}$/.test(e)},H=function(e){return/^[0-9]*$/.test(e)},q=function(e){return!!/^[-a-zA-Z0-9+&@#/%?=~|!:,.;]*[-a-zA-Z0-9+&@#/%=~|]$/.test(e)},B=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},G=function(e){return e&&(e=e.toFixed(2).replace(/\d(?=(\d{3})+\.)/g,"$&,")),0!==e&&"0"!==e||(e=e.toFixed(2)),e},K=function(e,t){return e=e?Number(e):0,(0===(t=t?Number(t):0)||"0"===t?0:(e-t)/t*100).toFixed(2)}},20:function(e,t){e.exports=ReactDOM},438:function(e,t,n){"use strict";n.r(t);var a=n(13),i=n(99);t.default=a.a.create({component:i.a,configuration:{tagname:"amarr-videolist",useShadow:!1},plugins:[]})},52:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var a=n(2),i=n(0),r=n.n(i),o=n(4).default.section.withConfig({displayName:"styles__Content",componentId:"sc-13lfbb6-0"})([".hide-icon{.circle{opacity:0 !important;}img{display:none;}}.play-pause-image:hover{.circle{background-color:#de0000;border-radius:50px;opacity:1;z-index:1;display:inline;}img{display:inline;}}.play-pause-image.pause:hover{.circle{background-color:#000000;opacity:0.800000012 !important;}img{display:inline;}}.play-pause-image{.circle{background-color:#000000;opacity:0.5;border-radius:50px;margin:auto;width:96px;height:96px;display:flex;align-items:center;justify-content:center;position:absolute;top:calc(50% - 47px);left:calc(50% - 47px);}.play-pause-icon{position:absolute;top:calc(50% - 47px);left:calc(50% - 47px);z-index:999;}@media screen and (min-width:1281px) and (max-width:1680px){.circle,.play-pause-icon{width:80px;height:80px;top:calc(50% - 22px);left:calc(50% - 40px);}}@media screen and (max-width:1280px){.circle,.play-pause-icon{width:70px;height:70px;top:calc(50% - 10px);left:calc(50% - 35px);}}@media screen and (min-width:992px) and (max-width:1024px){.circle,.play-pause-icon{width:50px;height:50px;top:50%;left:calc(50% - 25px);}}@media screen and (min-width:768px) and (max-width:991px){.circle,.play-pause-icon{width:40px;height:40px;top:calc(50% + 5px);left:calc(50% - 20px);}}}"]),c=function(e){var t=e.item,n=e.showControls,c=Object(i.useRef)(null),d=Object(i.useState)(!1),l=Object(a.a)(d,2),u=l[0],p=l[1],s=Object(i.useState)(!1),m=Object(a.a)(s,2),f=m[0],x=m[1],h=function(){setTimeout((function(){x(!0)}),1e3)};return r.a.createElement(o,null,!n&&r.a.createElement("video",{ref:c},r.a.createElement("source",{src:t.video.url})),n&&r.a.createElement("video",{ref:c,onPlay:function(){p(!0),h(),c.current.controls=!0},onPause:function(){x(!1),p(!1),c.current.controls=!1}},r.a.createElement("source",{src:t.video.url})),r.a.createElement("span",null,r.a.createElement("button",{onClick:function(){var e,t;u?null===(e=c.current)||void 0===e||e.pause():(null===(t=c.current)||void 0===t||t.play(),h());p(!u),x(!1)},className:"".concat(u&&"pause"," ").concat(f&&"hide-icon"," play-pause-image")},r.a.createElement("div",{className:"circle"}),r.a.createElement("img",{src:u?"/etc.clientlibs/amarr/clientlibs/themes/amarr/resources/images/ic_pause.svg":"/etc.clientlibs/amarr/clientlibs/themes/amarr/resources/images/ic_play.svg",alt:u?"Pause Icon":"Play Icon",className:"play-pause-icon"}))))}},99:function(e,t,n){"use strict";var a=n(0),i=n.n(a),r=n(1),o=n(4).default.section.withConfig({displayName:"styles__Content",componentId:"sc-1c4dt49-0"})(['.video-container{background:#f0f0f0;}h3{margin:20px 0 20px 0;@media (min-width:991px){margin:20px 0 40px 0;}}h2{padding:20px 0px 0px 0px;margin-bottom:0px;}.video-item{display:flex;align-items:center;border-bottom:solid 1px #b6b9bb;padding:24px 0px 18px 0px;@media (max-width:767px){border-bottom:none;padding-bottom:0;}@media screen and (min-width:768px) and (max-width:1023){padding:5px 0px 0px 0px;}&:last-child{border-bottom:none;}video{width:100%;}.left-space{@media (min-width:768px){padding-left:20px !important;}}.video-title{color:#fff;background:#006166;display:inline-block;padding:5px 10px;margin-bottom:10px;border-radius:3px;@media (max-width:990px){margin-top:20px;}}p{font-size:18px;line-height:28px;@media screen and (min-width:1281px) and (max-width:1680px){font-size:14px;line-height:22px;}@media screen and (min-width:768px) and (max-width:1280px){font-size:13px;line-height:20px;}@media screen and (max-width:767px){font-size:14px;line-height:20px;}}.video-div{position:relative;span{content:"";position:absolute;top:0;left:0;width:100%;height:100%;z-index:1;}@media screen and (min-width:1281px){.circle,.play-pause-icon{width:60px;height:60px;top:calc(50% - 30px);left:calc(50% - 30px);}}@media screen and (min-width:992px) and (max-width:1280px){.circle,.play-pause-icon{width:50px;height:50px;top:calc(50% - 25px);left:calc(50% - 25px);}}@media screen and (min-width:768px) and (max-width:991px){.circle,.play-pause-icon{width:40px;height:40px;top:calc(50% - 20px);left:calc(50% - 20px);}}}button{cursor:pointer;border:none;width:100%;height:100%;position:absolute;top:0;background:transparent;}}.video-list.video-grid-parent{display:inline-grid;grid-template-columns:1fr 1fr;column-gap:30px;}.video-list-grid .video-card > div,.video-card > iframe,.video-list.video-grid-parent{width:100%;}.video-caption{margin-top:10px;margin-bottom:20px;}@media screen and (max-width:767px){.video-list.video-grid-parent{display:flex;flex-flow:column nowrap;.video-card > iframe{height:250px;}.video-card .video-caption{font-size:20px;margin-top:10px;margin-bottom:30px;}}}']),c=n(52),d=function(e){var t=e.videoListData,n=Object(r.g)(t);return i.a.createElement(o,null,i.a.createElement("div",{className:"".concat("list"===n.variation&&"video-container")},i.a.createElement("div",{className:"container dealer-col"},i.a.createElement("div",{className:"row m-0"},i.a.createElement("div",{className:"col-12 p-0"},n.header&&"h1"===n.headingStyle&&i.a.createElement("h1",{className:"".concat("grid"===n.variation&&"text-center")},n.header.text),n.header&&"h2"===n.headingStyle&&i.a.createElement("h2",{className:"".concat("grid"===n.variation&&"text-center")},n.header.text),n.header&&"h3"===n.headingStyle&&i.a.createElement("h3",{className:"".concat("grid"===n.variation&&"text-center")},n.header.text),n.header&&"h4"===n.headingStyle&&i.a.createElement("h4",{className:"".concat("grid"===n.variation&&"text-center")},n.header.text),n.header&&"h5"===n.headingStyle&&i.a.createElement("h5",{className:"".concat("grid"===n.variation&&"text-center")},n.header.text),n.header&&"h6"===n.headingStyle&&i.a.createElement("h6",{className:"".concat("grid"===n.variation&&"text-center")},n.header.text),n.header&&"capitalize"===n.headingStyle&&i.a.createElement("div",{className:"text-style-uppercase"},n.header.text),i.a.createElement("div",{className:"video-list ".concat("grid"===n.variation&&"video-grid-parent"," ").concat("list"===n.variation&&"video-list-parent")},n.videoListItems&&"list"===n.variation&&n.videoListItems.map((function(e,t){return i.a.createElement("div",{className:"video-item row m-0",key:t},i.a.createElement("div",{className:"col-sm-12 col-md-3 p-0 video-div"},e.video&&e.video.url&&i.a.createElement(c.a,{item:e})),i.a.createElement("div",{className:"col-sm-12 col-md-9 p-0 left-space"},e.header&&i.a.createElement("div",{className:"amarr-h6 video-title"},e.header.text),e.body&&i.a.createElement("p",{dangerouslySetInnerHTML:{__html:e.body.text}})))})),n.videoListItems&&"grid"===n.variation&&n.videoListItems.map((function(e,t){var n;return i.a.createElement("div",{key:t,className:"video-list-grid"},i.a.createElement("span",{className:"video-card"},e.video&&e.video.id&&i.a.createElement("iframe",{title:null===e||void 0===e||null===(n=e.header)||void 0===n?void 0:n.text,height:"397",src:"https://www.youtube.com/embed/".concat(e.video.id,"?autoplay=0&mute=1&loop=0")}),e.header&&"capitalize"!==e.headingStyle&&i.a.createElement(e.headingStyle,{className:"text-section video-caption"},e.header.text),e.header&&"capitalize"===e.headingStyle&&i.a.createElement("div",{className:"text-style-capitalize text-section video-caption"},e.header.text)))}))))))))};d.defaultProps={theme:"",videoListData:""};t.a=d}});
|