whatmore-react-assets 1.0.1663 → 1.0.1664

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whatmore-react-assets",
3
- "version": "1.0.1663",
3
+ "version": "1.0.1664",
4
4
  "description": "public repo for all whatmore js and css assets",
5
5
  "main": "whatmore.js",
6
6
  "scripts": {
@@ -0,0 +1,15 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[933,939],{2209:function(t,e,n){var i=n(4994);e.A=void 0;var o=i(n(9526)),r=n(4414);e.A=(0,o.default)((0,r.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel")},3852:function(t,e,n){n.d(e,{A:function(){return y}});var i=n(3247),o=n(1422),r=n(3731),a=n(211),l=n(9950),s=n(932),d=n(5242),c=n(8781),h=n(8283);const p=h.i7`
2
+ 0% {
3
+ transform: scale(1);
4
+ }
5
+ 100% {
6
+ transform: scale(1.05);
7
+ }
8
+ `,u=h.i7`
9
+ 0% {
10
+ transform: scale(1.05);
11
+ }
12
+ 100% {
13
+ transform: scale(1);
14
+ }
15
+ `,m=`\n ${p}; \n infinite;\n animation-duration:0.2s; \n animation-direction: linear ;\n animation-timing-function: ease-in;\n animation-fill-mode: forwards;\n`,x=`\n ${u}; \n infinite;\n animation-duration:0.2s; \n animation-direction: linear ;\n animation-timing-function: ease-in;\n animation-fill-mode: forwards;\n`;var f=n(5830),g=n(7509),v=n(4414);var y=function(t){var e,n,[h,p]=(0,s.A)();const[u]=(0,f.QN)("whatmorePrimaryFont");var y=(0,l.useContext)(g.h);const w=t.event,j=t.onClick,b=null===(e=t.isOnFocus)||void 0===e||e,C=(t.playOnUnfocus,null!==(n=t.animateOnFocus)&&void 0!==n&&n);return(0,v.jsxs)(i.az,{animation:C?b?m:x:"none",marginTop:y.tileTopMargin,marginBottom:y.tileBottomMMargin,marginLeft:y.tileLeftMargin,marginRight:y.tileRightMargin,width:p,height:h,borderRadius:"lg",sx:{boxShadow:"0px 0px 10px 3px #B0B0B0"},overflow:"hidden",onClick:()=>{j(w)},cursor:"pointer",children:[(0,v.jsx)(a._,{width:"full",height:"full",src:w.thumbnail_image,objectFit:"cover",fallback:(0,v.jsx)(c.A,{width:p,height:h}),borderRadius:"lg"}),(0,v.jsx)(i.az,{style:{position:"relative",zIndex:1,bottom:"100%",overflow:"hidden"},width:"full",height:"full",borderRadius:"lg",overflow:"hidden",className:"whatmore-ios-css-relative-fix",children:(0,v.jsxs)(o.B,{direction:"column",height:"full",width:"full",justifyContent:"space-between",children:[(0,v.jsx)(i.az,{w:"100%",borderRadius:"lg",bgGradient:"linear(to-t, transparent, blackAlpha.200, blackAlpha.400, blackAlpha.600)",children:(0,v.jsx)(o.B,{direction:"column",justifyContent:"flex-start",children:(0,v.jsx)(i.az,{width:"100%",marginLeft:"5px",marginRight:"5px",marginTop:"10px",children:(0,v.jsx)(o.B,{direction:"row",justifyContent:"space-between",children:(0,v.jsx)(d.A,{event:w,fontSize:.05*h+"px",maxWidth:.8*p})})})})}),(0,v.jsx)(i.az,{w:"100%",borderRadius:"lg",bgGradient:"linear(to-b, transparent, blackAlpha.300, blackAlpha.400, blackAlpha.500, blackAlpha.600)",children:(0,v.jsx)(o.B,{direction:"column",width:"full",height:"full",justifyContent:"flex-end",alignContent:"center",children:(0,v.jsx)(i.az,{width:"full",borderRadius:"lg",children:(0,v.jsxs)(o.B,{direction:"column",justifyContent:"space-between",alignContent:"flex-start",marginLeft:"5px",marginRight:"5px",marginBottom:"2px",children:[(0,v.jsx)(r.E,{color:"white",fontSize:.08*p+"px",fontWeight:"normal",align:"left",children:" "}),(0,v.jsx)(r.E,{fontSize:.08*p+"px",fontWeight:"normal",align:"left",sx:{fontFamily:u+" !important",color:"white !important"},children:w.title.substring(0,40)}),(0,v.jsx)(r.E,{fontSize:.08*p+"px",fontWeight:"bold",align:"left",sx:{fontFamily:u+" !important",color:"white !important"},children:w.presenter_name.substring(0,15)})]})})})})]})})]})}},4826:function(){},5727:function(t,e,n){var i=n(4994);e.A=void 0;var o=i(n(9526)),r=n(4414);e.A=(0,o.default)((0,r.jsx)("path",{d:"M8 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69L9.54 5.98C8.87 5.55 8 6.03 8 6.82"}),"PlayArrowRounded")},6989:function(t,e,n){n.r(e),n.d(e,{default:function(){return U}});var i=n(9950),o=n(3852),r=n(340),a=n(5089),l=(n(3997),n(9733),n(4365),n(572)),s=n(8603),d=n(6086),c=n(3731),h=n(1941),p=n(5830),u=n(7509),m=n(1348),x=n(5551),f=n(1422),g=n(932),v=n(6649),y=n(4414);function w(t){var e;const[n,i,o]=(0,v.A)({triggerOnce:!1}),r=null!==(e=t.defaultHeight)&&void 0!==e?e:"fit-content";return(0,y.jsx)(f.B,{ref:n,direction:"row",minHeight:r,height:r,width:"100%",justifyContent:"center",alignItems:"center",children:i?t.data.map(((e,n)=>(0,y.jsx)("div",{children:t.renderElement({eventData:e})},"key"+n))):(0,y.jsx)("div",{style:{minHeight:{rowHeight:r},minWidth:"100%"}})})}function j(t){var e;const[n,i,o]=(0,g.A)(),r=null!==(e=t.elementsPerRow)&&void 0!==e?e:Math.floor(Math.min(o,t.dataList.length)),a=function(t,e){var n=[];const i=e;for(let o=0;o<t.length;o+=i){const e=t.slice(o,o+i);n.push(e)}return n}(t.dataList,r);return(0,y.jsx)(f.B,{direction:"column",height:"100%",width:"100%",justifyContent:"flex-start",alignItems:"center",spacing:.2*n,children:a.map(((e,o)=>(0,y.jsx)(w,{renderElement:t.renderElement,data:e,defaultHeight:n,defaultWidth:i},"key-"+o)))})}var b=n(2039),C=(n(4826),n(9879)),k=n(3590),A=n(8538),F=n(6594),P=n(7973),S=n(8149),R=n(7740),M=n(22);var I=function(t){var e,n,o,r,[a,l,s,d,c]=(0,g.A)();const h="portrait"===c[M.dl],[u,x]=(0,i.useState)(0),[f,v]=(0,i.useState)(t.event),[w]=(0,p.QN)("whatmoreShopId"),j=(0,p.QN)("whatmoreUITheme"),[b]=(0,p.QN)("whatmorePrimaryFont"),[C]=(0,p.QN)("whatmoreSecondaryColorShade900"),k=f.products.length,[I,z]=(0,i.useState)(),[N,O]=(0,i.useState)(!1);if(0==k)return(0,y.jsx)(y.Fragment,{});(0,i.useEffect)((()=>{const t=setInterval((()=>{x((t=>(t+1)%k))}),3e3);return()=>{clearInterval(t)}}),[]),(0,i.useEffect)((()=>{(0,m.w4b)(w)?(0,F.fu)(f,(0,m.NCy)(w),w).then((t=>{v(t),O(!0)})):(async()=>{var t;const e=await(0,S.M)(null===f||void 0===f||null===(t=f.products)||void 0===t?void 0:t[0],(0,m.NCy)(w),w);z(e),O(!0)})()}),[]);const T=(h?1.23*l*(0,m.HWj)(w):1.4*l*(0,m.N_4)(w))+"px",B=(h?1.15*l*(0,m.HWj)(w):1.31*l*(0,m.N_4)(w))+"px",L=(+f.products[u].price).toFixed(),_=(+f.products[u].compare_price).toFixed(),E=.25*l,W=(0,m.zAb)(w);return(0,y.jsxs)("div",{style:{background:"9238315068"===w?"transparent":(0,m.ivR)(w),display:"flex",flexDirection:W?"row":"column",padding:"10px 12px",gap:W?"8px":"6px",borderRadius:"round"==j?"0 0 12px 12px":"0",alignItems:W?"center":"stretch"},children:[(0,y.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"6px",flex:W?"1":"none"},children:[(0,y.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",T),t.style.setProperty("line-height","120%","important"),t.style.setProperty("font-family",b,"important"),t.style.setProperty("-webkit-line-clamp",1),t.style.setProperty("line-clamp",1,"important"),t.style.setProperty("-webkit-box-orient","vertical","important"),t.style.setProperty("display","-webkit-box","important"),t.style.setProperty("overflow","hidden","important"),t.style.setProperty("text-overflow","ellipsis","important"))},style:{textAlign:"left",fontWeight:"bolder"},children:(0,A.v)(f.products[u].title)}),(0,y.jsxs)("div",{style:{display:"flex",gap:"4px"},children:[N&&(0,y.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","black","important"),t.style.setProperty("font-size",B,"important"),t.style.setProperty("font-family",b,"important"),t.style.setProperty("overflow","hidden","important"))},style:{textAlign:"left",fontWeight:"bold"},children:(0,F.Sb)(parseFloat((0,R.U)()?(null===I||void 0===I?void 0:I.price)/100:null===f||void 0===f||null===(e=f.products)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.price)," ",w,f.products[u].currency)}),!isNaN(_)&&_>L&&N&&(0,y.jsx)("p",{ref:t=>{t&&(t.style.setProperty("color","#808191","important"),t.style.setProperty("font-size",B,"important"),t.style.setProperty("font-family",b,"important"),t.style.setProperty("overflow","hidden","important"))},style:{fontWeight:"bold",textDecoration:"line-through"},children:(0,F.Sb)(parseFloat((0,R.U)()?(null===I||void 0===I?void 0:I.compare_at_price)/100:null===f||void 0===f||null===(o=f.products)||void 0===o||null===(r=o[0])||void 0===r?void 0:r.compare_price)," ",w,f.products[u].currency)})]})]}),W&&(0,y.jsx)("img",{ref:t=>{t&&t.style.setProperty("object-fit",(0,m.KZe)(w),"important")},src:(0,P.b)(f.products[u].thumbnail_image,"&width=400&height=400"),style:{width:E,height:E,borderRadius:"round"==j?"5px":"0px",backgroundColor:C,flexShrink:0},alt:"product img"})]})},z=n(6613),N=n(6305),O=n(4833),T=n(1351),B=n(6157),L=n(4533),_=n(9664);function E(t){const[e,n]=(0,g.A)(),[i]=(0,p.QN)("whatmoreShowViews"),o=t.event;return(0,y.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"100%",overflow:"hidden",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,y.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",width:"100%",height:"100%",justifyContent:"space-between",alignItems:"center"},children:(0,y.jsx)("div",{style:{width:"100%",backgroundImage:"linear-gradient(to top, rgba(0,0,0,0), rgba(0,0,0,0.1), rgba(0,0,0,0.3))"},children:(0,y.jsx)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"flex-start",alignItems:"center"},children:"show"===i?(0,y.jsx)("div",{style:{width:"100%",marginLeft:"5px",marginRight:"5px",marginTop:"10px"},children:(0,y.jsx)("div",{style:{display:"flex",flexFlow:"row nowrap",paddingLeft:"5px",width:"fit-content",height:"fit-content",justifyContent:"space-between",alignItems:"center"},children:(0,y.jsx)(k.A,{event:o,fontSize:.07*n+"px"})})}):(0,y.jsx)(y.Fragment,{})})})})})}var W=function(t){var e,n,o,r,a,l,s=(0,i.useContext)(u.h);const d=(0,p.Xd)("whatmoreUITheme"),c=(0,p.Xd)("whatmoreSecondaryColor"),h=(0,p.Xd)("whatmoreShopId"),[f]=(0,p.QN)("whatmorePrimaryFont");var[w,j,b,k,A]=(0,g.A)();const F="portrait"===A[M.dl],P=t.event,S=t.onClick,R=null===(e=t.isOnFocus)||void 0===e||e,W=null!==(n=t.playOnUnfocus)&&void 0!==n&&n,D=null!==(o=t.animateOnFocus&&(0,m.n5O)(h))&&void 0!==o&&o,[U,Q,H]=(0,v.A)({triggerOnce:!0}),[X,K]=(0,i.useState)(!1),{whatmoreWidgetSourceDetails:V,whatmoreUserInfo:G}=(0,i.useContext)(x.B),Y=null!==(r=null===(a=P.products)||void 0===a?void 0:a.find((t=>"active"==t.product_status)))&&void 0!==r?r:null===(l=P.products)||void 0===l?void 0:l[0],$=Y&&Object.keys(Y).length>0,[Z,q,J,tt,et,nt]=(0,N.A)(0,Y,P),it=.07*j+"px",ot=$&&(0,m.Kr7)(h),rt=t=>{if(t.stopPropagation(),!$)return;const e=V.landingLocationType,n=V.templateType,i=(0,O.Wd)(e)+(0,O.gf)(n)+(null!==P&&void 0!==P&&P.isRelatedEvent?"R":"E")+"_"+(null===P||void 0===P?void 0:P.event_id);(0,L.Ch)(P.event_id,P.products,"homepage","carousel",i,null===P||void 0===P?void 0:P.location,null===G||void 0===G?void 0:G.userType),"init"==Z.state?(et(i,!0),(0,T.kz)({userInteractionType:B.O.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:V,event:P,productList:[Y],ctaList:P.cta})):"awaitingVariantSelection"==Z.state&&nt(null,i)};return(0,y.jsxs)("div",{style:{display:"flex",flexDirection:"column",margin:"0 auto"},children:[(0,y.jsxs)("div",{ref:t=>{t&&(t.style.setProperty("margin-top",s.tileTopMargin+"px","important"),t.style.setProperty("margin-bottom","9238315068"===h?"0px":s.tileBottomMMargin+"px","important"))},style:{width:j,height:w,borderRadius:"round"==d?"12px":"0px",borderWidth:"9238315068"===h?0:(0,m.MRv)(h),borderColor:"9238315068"===h?"transparent":"white"==(0,m.Fwt)(h)?c:(0,m.Fwt)(h),overflow:"hidden",cursor:"pointer",position:"relative"},className:D?R?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",onClick:()=>{S(P)},onMouseEnter:()=>K(!0),onMouseLeave:()=>K(!1),children:[(0,y.jsx)(C.A,{height:"100%",width:"100%",url:P.thumbnail_image,isPlaying:R||W||(0,z.At)(),event:P}),"9238315068"===h&&$&&(X||F)&&(0,y.jsx)("div",{style:{position:"absolute",bottom:0,left:0,right:0,background:X||F?"rgba(0, 0, 0, 0.75)":"rgba(0, 0, 0, 0.6)",padding:"12px",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.3s ease",cursor:"pointer",transform:X||F?"translateY(0)":"translateY(100%)",opacity:X||F?1:0,zIndex:10},onClick:rt,onMouseEnter:t=>{t.target.style.background="rgba(0, 0, 0, 0.85)"},onMouseLeave:t=>{t.target.style.background="rgba(0, 0, 0, 0.75)"},children:(0,y.jsx)("span",{style:{color:"white",fontSize:it,fontFamily:f,fontWeight:"500",textAlign:"center",letterSpacing:"0.5px"},children:"ADD TO CART"})}),(0,y.jsxs)("div",{style:{width:j,height:w},ref:U,children:[(0,y.jsx)(E,{event:P,isOnFocus:R}),"9238315068"!==h&&(0,y.jsx)("div",{style:{position:"relative",zIndex:1,bottom:"200%",overflow:"hidden",width:"100%",height:"100%",overflow:"hidden",backgroundColor:"transparent"},className:"whatmore-ios-css-relative-fix",children:(0,y.jsxs)("div",{style:{display:"flex",flexFlow:"column nowrap",justifyContent:"space-between",alignItems:"center",height:"100%",width:"100%"},children:[(0,y.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",children:(0,y.jsx)("p",{children:" "})}),(0,y.jsx)("div",{style:{width:"100%"},children:Q&&(0,m.imx)(h)?(0,y.jsx)("div",{className:"whatmore-event-tile-component-fade-in-animation",style:"40273707171"===h?{backgroundColor:"white",borderRadius:"2px",margin:"5px"}:{},children:"40273707171"===h?(0,y.jsx)(_.Ay,{event:P}):(0,y.jsx)(I,{event:P})}):(0,y.jsx)("div",{height:"20px"})})]})})]})]}),"9238315068"===h&&Q&&(0,m.imx)(h)&&(0,y.jsx)("div",{style:{width:j,marginBottom:s.tileBottomMMargin+"px"},className:"whatmore-event-tile-component-fade-in-animation",children:(0,y.jsx)(I,{event:P})}),ot&&(0,y.jsx)("div",{style:{width:j,padding:"15px 0"},children:(0,y.jsx)("button",{style:{backgroundColor:c,color:"white",border:"none",borderRadius:"12px",padding:"8px 8px",fontSize:it,fontFamily:f,fontWeight:"500",cursor:"pointer",textAlign:"center",letterSpacing:"0.5px",transition:"opacity 0.2s ease",width:"100%"},onClick:rt,onMouseEnter:t=>{t.target.style.opacity="0.8"},onMouseLeave:t=>{t.target.style.opacity="1"},children:"ADD TO CART"})})]})};const D=(0,s.A)({key:"whatmore-css-hv"});var U=function(t){var e;const[n,s,f]=(0,h.A)(),[v,w,C]=(0,g.A)(),[k]=(0,p.QN)("whatmoreShopId"),[A]=(0,p.QN)("whatmorePrimaryColor"),[F]=(0,p.QN)("whatmoreTitleFont"),P="portrait"==n?(0,p.Xd)("whatmoreTitleFontSizePortrait"):(0,p.Xd)("whatmoreTitleFontSize"),{whatmoreRootId:S}=(0,i.useContext)(x.B),R=t.events,M=t.onClick,I=null!==(e=(0,m.sa6)(k))&&void 0!==e?e:F;function z(t){M(t)}const N=parseInt(Math.floor(C));return delete a.Ay.styles.global,(0,y.jsx)(l.C,{value:D,children:(0,y.jsx)("div",{className:"whatmore-carousel-events-feed",children:(0,y.jsx)(r.s,{theme:a.Ay,cssVarsRoot:S,resetCSS:!1,children:(0,y.jsxs)(u.h.Provider,{value:{tileTopMargin:3,tileBottomMMargin:3,tileLeftMargin:3,tileRightMargin:3,showPlayButton:!1},children:[t.heading.trim().length>0?(0,y.jsx)(d.o,{paddingBottom:"28px",children:(0,y.jsx)(c.E,{bgColor:A,bgClip:"text",fontSize:P,sx:{fontFamily:I+" !important"},align:"center",children:t.heading})}):(0,y.jsx)(y.Fragment,{}),"landscape"===n?(0,y.jsx)(j,{renderElement:t=>{const e=t.eventData;return(0,y.jsx)("div",{style:{margin:"10px"},children:(0,b.ij)(e)||(0,b.Il)(e)?(0,y.jsx)(W,{isOnFocus:!0,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{z(e)}}):(0,y.jsx)(o.A,{isOnFocus:!0,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{z(e)}})})},dataList:R,elementsPerRow:N}):(0,y.jsx)(j,{renderElement:t=>{const e=t.eventData;return(0,y.jsx)("div",{style:{margin:"10px"},children:(0,y.jsx)(W,{isOnFocus:!0,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{z(e)}})})},dataList:R,elementsPerRow:N})]})})})})}}}]);