whatmore-react-assets 1.0.987 → 1.0.989
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 +1 -1
- package/static/js/436.dc86ddb8.chunk.js +1 -0
- package/static/js/816.51f75c28.chunk.js +1 -0
- package/static/js/{862.d52a361f.chunk.js → 862.02f00ae1.chunk.js} +1 -1
- package/whatmore.js +2 -2
- package/static/js/436.cbea0302.chunk.js +0 -1
- package/static/js/816.76f60a1b.chunk.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[436],{1492:function(e,t,o){o.r(t),o.d(t,{default:function(){return _}});var i=o(7313),n=o(6090),r=o(7616),l=o(8811),s=(o(6143),o(7850),o(4444),o(7244),o(123),o(5892),o(1811),o(9302)),a=o(2575),d=o(2210),p=o(8486),c=o(9821),u=o(8866),h=o(2279),m=o.n(h),y=o(7753),v=o(7129),x=o(1855),f=o(9854),g=o(4920),w=o(4522),P=o(778),j=o(7381),C=(o(3439),o(4892)),S=o(6805),I=o(9219),O=o(5945),M=o(7053),b=o(6417);var k=function(e){var t,o,n,r,s,a,d,p,u,h,m,x,g,w,P,j,k,F,E;const[Z,_,W,D,N]=(0,c.Z)();var R=(0,i.useContext)(v.V);const{whatmoreUITheme:T}=(0,i.useContext)(l.I),U=(0,y.MO)("whatmoreShopId"),z=(0,y.MO)("whatmorePrimaryFont"),V=(0,y.MO)("whatmoreSecondaryColor"),H=e.onClick,A=null===(t=e.isOnFocus)||void 0===t||t,$=null!==(o=e.playOnUnfocus)&&void 0!==o&&o,G=null!==(n=e.animateOnFocus&&(0,f.iWI)(U))&&void 0!==n&&n,q="portrait"===N[S.YP],B=(q?1.076*_*(0,f.pEd)(U):_*(0,f.H4g)(U))+"px",L=(q?1.076*_*(0,f.pEd)(U):_*(0,f.H4g)(U))+"px",X=(q?.965*_*(0,f.pEd)(U):.859*_*(0,f.H4g)(U))+"px",Y=(0,f.nzC)(U),{whatmoreIsPreviewMode:K}=(0,i.useContext)(l.I),J=.25*_,Q=J+"px",ee=1.1*J+"px",[te,oe]=(0,i.useState)(e.event),[ie,ne]=(0,i.useState)(),re=Math.round(+(null===(r=te.products)||void 0===r||null===(s=r[0])||void 0===s?void 0:s.price)),le=Math.round(+(null===te||void 0===te||null===(a=te.products[0])||void 0===a?void 0:a.compare_price)),se=le&&0!=le&&le>re?Math.round((le-re)/le*100):NaN,[ae,de]=(0,i.useState)(se);return(0,i.useEffect)((()=>{(0,f.N8M)(U)&&(0,I.p_)(te,(0,f.Ipo)(U),U).then((e=>{var t,o,i,n;oe(e),(null===e||void 0===e||null===(t=e.products)||void 0===t||null===(o=t[0])||void 0===o?void 0:o.discount)&&de(null===e||void 0===e||null===(i=e.products)||void 0===i||null===(n=i[0])||void 0===n?void 0:n.discount)}));(async()=>{var e;const t=await(0,M.p)(null===te||void 0===te||null===(e=te.products)||void 0===e?void 0:e[0],(0,f.Ipo)(U),U);ne(t)})()}),[]),(0,b.jsxs)("div",{ref:e=>{e&&(e.style.setProperty("margin-top",R.tileTopMargin+"px","important"),e.style.setProperty("margin-bottom",R.tileBottomMMargin+"px","important"))},children:[(0,b.jsx)("div",{style:{margin:"0 auto",width:_,height:q&&A?"STR2FOC6KG9"==U||"STRDOIDF6O7"==U?Z:1.1*Z:Z,borderRadius:"round"==T?"5px":"0px",boxShadow:"round"==T?Y:null,borderWidth:(0,f.alU)(U),borderColor:(0,f.qPe)(U),overflow:"hidden",cursor:"pointer"},className:G?A?"whatmore-event-tile-scale-out-animation":"whatmore-event-tile-scale-in-animation":"none",onClick:()=>{H(te)},children:(0,b.jsx)(C.Z,{height:(0,f.dXm)(U)+" !important",width:"100%",url:te.thumbnail_image,isPlaying:A||$,event:te})}),(0,b.jsxs)("div",{onClick:()=>{H(te)},style:{cursor:"pointer",display:"flex",gap:"6px",padding:"14px 8px"},children:[(K?(0,f.uU$)(U):(0,f.EIj)(U))&&(0,b.jsx)("div",{ref:e=>{e&&e.style.setProperty("height",ee,"important")},style:{maxWidth:Q,minWidth:null!==(d=te.products)&&void 0!==d&&null!==(p=d[0])&&void 0!==p&&p.thumbnail_image?Q:"0",borderRadius:"round"==T?"5px":"0px",overflow:"hidden",backgroundColor:"rgb(220, 220, 220, 1)"},children:(0,b.jsx)("img",{ref:e=>{e&&e.style.setProperty("object-fit",(0,f.yOX)(U),"important")},src:null===(u=te.products)||void 0===u||null===(h=u[0])||void 0===h?void 0:h.thumbnail_image})}),(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"5px"},children:[(0,b.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-size",B,"important"),e.style.setProperty("line-height","120%","important"),e.style.setProperty("font-family",z,"important"),e.style.setProperty("-webkit-line-clamp",1,"important"),e.style.setProperty("line-clamp",1,"important"),e.style.setProperty("-webkit-box-orient","vertical","important"),e.style.setProperty("display","-webkit-box","important"),e.style.setProperty("overflow","hidden","important"),e.style.setProperty("text-overflow","ellipsis","important"))},children:(0,O.s)(null===(m=te.products[0])||void 0===m?void 0:m.title)}),(0,f.QaY)(U)&&(0,b.jsxs)("div",{style:{display:"flex",gap:"12px",flexDirection:(0,f.$zZ)(U)?"row":"row-reverse",justifyContent:(0,f.$zZ)(U)?"flex-start":"flex-end"},children:[(0,b.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,f.Uyp)(U),"important"),e.style.setProperty("font-size",L,"important"),e.style.setProperty("font-family",z,"important"),e.style.setProperty("overflow","hidden","important"))},style:{textAlign:"left",fontWeight:"normal"==(0,f.rPP)(U)?"normal":"bold"},children:(0,I.jx)(parseFloat(null!==(x=null===ie||void 0===ie?void 0:ie.price)&&void 0!==x?x:null===te||void 0===te||null===(g=te.products)||void 0===g||null===(w=g[0])||void 0===w?void 0:w.price)," ",U,null===(P=te.products[0])||void 0===P?void 0:P.currency)}),!isNaN(le)&&le>re&&(0,b.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,f.kPs)(U),"important"),e.style.setProperty("font-size",L,"important"),e.style.setProperty("font-family",z,"important"),e.style.setProperty("overflow","hidden","important"))},style:{textDecoration:"line-through"},children:(0,I.jx)(parseFloat(null!==(j=null===ie||void 0===ie?void 0:ie.compare_at_price)&&void 0!==j?j:null===te||void 0===te||null===(k=te.products)||void 0===k||null===(F=k[0])||void 0===F?void 0:F.compare_price)," ",U,null===(E=te.products[0])||void 0===E?void 0:E.currency)})]}),(0,f.QaY)(U)&&!isNaN(ae)&&0!=ae&&(0,b.jsx)("div",{style:{display:"flex",backgroundColor:"green"==(0,f.ZJm)(U)?"#343434"==V?(0,f.ZJm)(U):V:(0,f.ZJm)(U),alignItems:"center",borderRadius:(0,f.CF_)(U)+"px",width:"fit-content",padding:(0,f.Spx)(U)?"3px 6px":"0px"},children:(0,f.Spx)(U)?(0,b.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,f.mso)(U),"important"),e.style.setProperty("font-size",X,"important"),e.style.setProperty("font-family",z,"important"))},children:"".concat(ae,"% Off")}):(0,b.jsx)("p",{ref:e=>{e&&(e.style.setProperty("color",(0,f.aUT)(U),"important"),e.style.setProperty("font-size",X,"important"),e.style.setProperty("font-family",(0,f.V3Y)(U),"important"))},children:(0,f.sG7)(U)})})]})]})]})};const F=(0,a.Z)({key:"whatmore-css-hv"});function E(e){const[t,o,n]=(0,c.Z)(),r=(0,y.MO)("whatmoreShopId"),s=e.events,a=e.onClick,u=n*(0,f.u6l)(r),h="32365904011"==r,[m,v]=(0,i.useState)(h?s.length:u),{whatmoreWidgetSourceDetails:j}=(0,i.useContext)(l.I);return(0,i.useEffect)((()=>{m<=u&&v((e=>e+u))}),[u]),(0,b.jsx)("div",{className:"whatmore-events-carousel-portrait",style:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,b.jsx)("div",{style:{width:window.innerWidth,height:"fit-content"},children:(0,b.jsx)(d.tq,{slidesPerView:s.length>1?u:1,initialSlide:s.length>1?1:0,centeredSlides:!0,centeredSlidesBounds:!1,watchSlidesProgress:!0,touchRatio:.5,onSlideChange:e=>{(0,w.y4)({userInteractionType:P.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:j}),e.realIndex>e.previousIndex&&v((e=>e+u))},loop:h,navigation:h,modules:[p.W_],children:s.map(((e,t)=>t<=m&&(0,b.jsx)(d.o5,{children:t=>{let{isActive:o,isPrev:i,isNext:n,isVisible:l}=t;return i||n||o?(0,f.$X$)(r)?(0,b.jsx)(k,{isOnFocus:o&&l,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{a(e)}}):(0,b.jsx)(g.Z,{isOnFocus:o&&l,playOnUnfocus:!1,animateOnFocus:!0,event:e,onClick:()=>{a(e)}}):(0,b.jsx)(x.Z,{})}},"whatmore-event-tile-portrait-"+e.index)))})})})}function Z(e){const[t,o,n,r]=(0,c.Z)(),[s,a]=(0,i.useState)(-1),u=(0,y.MO)("whatmoreShopId"),h=e.onClick,v=e.events,j="32365904011"==u,[C,S]=(0,i.useState)(j?v.length:n),I=Math.min(n,v.length),{whatmoreWidgetSourceDetails:O}=(0,i.useContext)(l.I);return(0,i.useEffect)((()=>{C<=n&&S((e=>e+n))}),[n]),(0,b.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:r+"px",paddingRight:r+"px"},className:"whatmore-events-carousel-landscape",children:(0,b.jsx)("div",{style:{width:o*I*(0,f.Su5)(u)+"px"},children:(0,b.jsx)(d.tq,{slidesPerView:I,watchSlidesProgress:!0,modules:[p.W_],navigation:!0,slidesPerGroup:parseInt(I),onSlideChange:e=>{(0,w.y4)({userInteractionType:P.K.HOMEPAGE_CAROUSEL_SWIPED,widgetSourceDetails:O}),e.realIndex>e.previousIndex&&S((e=>e+n))},spaceBetween:(0,f.WGf)(u),loop:j,children:v.map(((e,t)=>{const o=m()((()=>a(t)),300);return t<=C&&(0,b.jsx)(d.o5,{onMouseEnter:()=>{o()},onMouseLeave:()=>{o.cancel(),a(-1)},children:o=>{let{isActive:i,isPrev:n,isNext:r,isVisible:l}=o;return l?(0,f.$X$)(u)?(0,b.jsx)(k,{isOnFocus:t==s,playOnUnfocus:!(0,f.dHy)(u)||t==parseInt(I/2)&&-1==s,animateOnFocus:!0,event:e,onClick:()=>{h(e)}}):(0,b.jsx)(g.Z,{isOnFocus:t==s,playOnUnfocus:!(0,f.dHy)(u)||t==parseInt(I/2)&&-1==s,animateOnFocus:!0,event:e,onClick:()=>{h(e)}}):(0,b.jsx)(x.Z,{})}},"whatmore-event-tile-landscape-"+e.index)}))})})})}var _=function(e){const[t,o,a]=(0,u.Z)(),[d]=(0,y.j1)("whatmoreShopId"),[p]=(0,y.j1)("whatmorePrimaryColor"),[c]=(0,y.j1)("whatmoreTitleFont"),h="portrait"==t?(0,y.MO)("whatmoreTitleFontSizePortrait"):(0,y.MO)("whatmoreTitleFontSize"),{whatmoreRootId:m}=(0,i.useContext)(l.I),x=((0,y.MO)("isInDesignMode"),(0,y.MO)("whatmoreCollectionHeading")),{whatmoreIsCollectionsTemplate:g}=(0,i.useContext)(l.I),w=e.events,P=e.onClick,C=c;function S(e){P(e)}return(0,i.useEffect)((()=>{(0,j.Oo)("Video shopping powered by Whatmore!")}),[]),(0,i.useEffect)((()=>{l.$.forEach((e=>{var t;const o=null!==(t=e.querySelector('.whatmore-template-type[data-wh="template-a"]'))&&void 0!==t?t:e.querySelector('.whatmore-template-type[data="template-a"]');if(!o)return;o&&e&&(e.style.minHeight="0px")}))}),[]),delete r.ZP.styles.global,(0,b.jsx)(s.C,{value:F,children:(0,b.jsx)("div",{className:"whatmore-carousel-events",children:(0,b.jsx)(n.x,{theme:r.ZP,cssVarsRoot:m,resetCSS:!1,children:(0,b.jsxs)(v.V.Provider,{value:{tileTopMargin:25,tileBottomMMargin:25,tileLeftMargin:4,tileRightMargin:4,showPlayButton:!0},children:[e.heading.trim().length>0||g?(0,b.jsx)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:(0,b.jsx)("p",{ref:e=>{e&&(e.style.setProperty("font-family",C,"important"),e.style.setProperty("font-size",h+"px","important"))},style:{color:p,backgroundClip:"text",textAlign:"center",fontWeight:(0,f.wOV)(d),lineHeight:(0,f.vY4)(d),letterSpacing:(0,f.X2K)(d)},children:g?"W"!==x?x:"":e.heading})}):(0,b.jsx)(b.Fragment,{}),"landscape"===t?(0,b.jsx)(Z,{events:w,onClick:S}):(0,b.jsx)(E,{events:w,onClick:S})]})})})})}},1855:function(e,t,o){var i=o(7313),n=o(9821),r=o(7129),l=o(6417);t.Z=function(e){var[t,o]=(0,n.Z)();return(0,i.useContext)(r.V),e.event,(0,l.jsx)("div",{style:{margin:"0 auto",width:o,height:t,overflow:"hidden"}})}},5892:function(){},4444:function(){},1811:function(){},7850:function(){}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[816],{4816:function(n,e,t){t.r(e),t.d(e,{default:function(){return a}});var i=t(7313),o=t(2210),r=t(8486),s=t(6159),l=t(6417);r.ZP.use([r.o3]);var a=n=>{var e;const{imageUrls:t,onBack:r}=n,[a,c]=(0,i.useState)(null),h=window.location.hostname,[d,p]=(0,i.useState)("https://".concat(h).concat(null===(e=t[0])||void 0===e?void 0:e.url)),[u,g]=(0,i.useState)(!0);(0,i.useEffect)((()=>{a&&a.initialized&&a.update()}),[a]);const x=n.onBack;return u?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("style",{children:"\n .thumbnail-container {\n padding: 5px 2px 10px 2px;\n box-sizing: border-box; \n display: flex; \n flex-direction: column; \n align-items: center;\n }\n .close-button-container {\n position: absolute;\n top: -2px;\n right: -2px;\n z-index: 2; \n }\n\n .thumbnail-container img {\n cursor: pointer;\n border-radius: 5px;\n width: 100%; \n height: 100%;\n object-fit: cover;\n transition: transform 0.2s ease;\n }\n\n .thumbnail-container img:hover {\n transform: scale(1.05);\n }\n\n .swiper-slide-thumb-active .thumbnail-container img {\n border: 1.5px solid white;\n box-shadow:rgba(255, 255, 255, 0.9);\n transform: scale(1.05); \n }\n\n .swiper-slide img {\n display: block;\n width: 100%;\n height: 100%;\n }\n\n .shop-now-button {\n background-color: rgba(120, 120, 120, 0.8); \n color: white; \n padding: 0 24px; \n font-size: 16px; \n border-radius: 15px;\n cursor: pointer;\n text-align: center;\n text-decoration: none;\n transition: background-color 0.3s ease;\n width: 220px; \n height: 40px;\n margin-top: 25px;\n display: flex; \n justify-content: center; \n align-items: center; \n }\n\n .shop-now-button:hover {\n background-color: rgba(128, 128, 128, 0.9); \n }\n "}),(0,l.jsxs)("div",{style:{width:"100%",height:"100vh",backgroundColor:"rgba(52, 52, 52, 0.8)",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",overflow:"hidden",marginTop:"-10vh"},children:[(0,l.jsx)(o.tq,{spaceBetween:10,slidesPerView:1,loop:!0,thumbs:{swiper:a},watchSlidesVisibility:!0,watchSlidesProgress:!0,style:{width:"100%",height:"60vh",marginBottom:"10px"},children:t.map(((n,e)=>{var t;return(0,l.jsx)(o.o5,{children:(0,l.jsxs)("div",{style:{width:"100%",height:"100%",position:"relative",overflow:"hidden"},children:[(0,l.jsx)("div",{style:{position:"absolute",top:0,left:0,right:0,height:"100%",backgroundImage:"url(".concat(n.imageUrl,")"),backgroundSize:"cover",filter:"blur(20px)",zIndex:0}}),(0,l.jsx)("img",{src:(null===n||void 0===n||null===(t=n.imageUrl)||void 0===t?void 0:t.split("?")[0])+"?width=400&height=400",alt:n.title,style:{position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)",height:"100%",objectFit:"contain",zIndex:1}})]})},e)}))}),(0,l.jsx)(o.tq,{onSwiper:c,spaceBetween:2,slidesPerView:Math.min(t.length,8),freeMode:!0,watchSlidesProgress:!0,watchSlidesVisibility:!0,style:{width:"100%",height:"15vh",marginTop:"10px"},children:t.map(((n,e)=>{var t;return(0,l.jsx)(o.o5,{children:(0,l.jsx)("div",{className:"thumbnail-container",children:(0,l.jsx)("img",{src:(null===n||void 0===n||null===(t=n.imageUrl)||void 0===t?void 0:t.split("?")[0])+"?width=400&height=400",alt:n.title,style:{width:"100%",height:"100%",objectFit:"cover",cursor:"pointer"},onClick:()=>{return e=n.url,p("https://".concat(h).concat(e));var e}})})},e)}))}),(0,l.jsx)("div",{className:"shop-now-button-container",children:(0,l.jsx)("a",{href:d,target:"_blank",className:"shop-now-button",children:"Shop Now"})}),(0,l.jsx)("div",{className:"close-button-container",style:{position:"absolute",top:"10px",right:"10px"},children:(0,l.jsx)(s.Z,{onCloseCallback:x})})]})]}):null}}}]);
|