whatmore-react-assets 1.0.1844 → 1.0.1846

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 (29) hide show
  1. package/package.json +1 -1
  2. package/static/js/12.9075e6d3.chunk.js +41 -0
  3. package/static/js/{580.f21f06a5.chunk.js → 580.20c8a413.chunk.js} +2 -2
  4. package/static/js/atc-with-form.2df46b08.chunk.js +1 -0
  5. package/static/js/event-click-component.5c063589.chunk.js +76 -0
  6. package/static/js/hls-light.ddbd74e5.chunk.js +1 -0
  7. package/static/js/homepage-carousel-view.a9ea2fe8.chunk.js +15 -0
  8. package/static/js/location-details.a6583705.chunk.js +1 -0
  9. package/static/js/react-main-app.c707031f.chunk.js +1 -0
  10. package/static/js/wht-neo-atc.8053a198.chunk.js +1 -0
  11. package/static/js/wht-neo-banner.2568a0d4.chunk.js +1 -0
  12. package/static/js/wht-neo-floating.5137c28e.chunk.js +1 -0
  13. package/static/js/wht-neo-shopper.28d42b46.chunk.js +2 -0
  14. package/static/js/wht-neo-stories.31537093.chunk.js +1 -0
  15. package/static/js/wht-neo.36e3bebd.chunk.js +1 -0
  16. package/whatmore.js +2 -2
  17. package/static/js/12.e23e4099.chunk.js +0 -41
  18. package/static/js/atc-with-form.8c383fe1.chunk.js +0 -1
  19. package/static/js/event-click-component.9141709d.chunk.js +0 -76
  20. package/static/js/hls-light.a58e7660.chunk.js +0 -1
  21. package/static/js/homepage-carousel-view.d75fe339.chunk.js +0 -15
  22. package/static/js/location-details.6d7d3e42.chunk.js +0 -1
  23. package/static/js/react-main-app.0c1b64cb.chunk.js +0 -1
  24. package/static/js/wht-neo-atc.c2de104b.chunk.js +0 -1
  25. package/static/js/wht-neo-banner.b779a272.chunk.js +0 -1
  26. package/static/js/wht-neo-floating.568873a6.chunk.js +0 -1
  27. package/static/js/wht-neo-shopper.da8de2d8.chunk.js +0 -2
  28. package/static/js/wht-neo-stories.50cda412.chunk.js +0 -1
  29. package/static/js/wht-neo.9070aa69.chunk.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkwhatmorelive_react=self.webpackChunkwhatmorelive_react||[]).push([[939],{243:function(e,t,n){n.r(t),n.d(t,{default:function(){return C}});var i=n(8670),a=n(5398),r=n(9197),o=n(6123),c=n(9887),l=n(1477),s=n(1214),d=n(9383);var u=n(4015),h=n(9193),p=n(3477),m=n(5547),f=n(5830),g=n(4234),v=n(9888),x=n(7156),b=n(481);function _(e){var t;const[n]=(0,s.QN)("whatmoreSecondaryColor"),[l]=(0,s.QN)("whatmorePrimaryFont"),d=null!==(t=e.baseFontSize)&&void 0!==t?t:10,u=e.width,h=e.height;return(0,b.jsx)(i.az,{width:u,height:h,padding:"0px",boxShadow:"lg",borderRadius:"md",backgroundColor:"white",borderColor:n,borderWidth:"1px",children:(0,b.jsxs)(a.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",paddingX:"4px",paddingY:"2px",justifyContent:"center",children:[(0,b.jsxs)(r.E,{color:n,fontSize:1.3*d,fontWeight:"semibold",sx:{fontFamily:l+" !important"},children:["\xa0"," In Cart ","\xa0"]}),(0,b.jsx)(o.o,{paddingX:"5px",children:(0,b.jsx)(c.A,{sx:{color:n,fontSize:1.5*d}})})]})})}var C=function(e){var t,n,c,C;const[j]=(0,s.QN)("whatmorePrimaryFont"),[w]=(0,s.QN)("isInDesignMode"),[y]=(0,s.QN)("isDemoBrand"),[S,N]=(0,s.QN)("appCartData"),[I]=(0,s.QN)("whatmoreShopId"),[k]=[(0,m.Wc_)(I)],E=(0,m.Wc_)(I),[B,A]=(0,l.useState)(!1),[D,T]=(0,l.useState)({state:"initial"}),[z,F]=(0,l.useState)({loaded:!1,client_product_id:"",variant_id:"",variant_price:""}),{closeClickComponent:M}=(0,l.useContext)(p.p),{whatmoreWidgetSourceDetails:Q}=(0,l.useContext)(g.BR),R=e.event,W=e.product,L=null!==(t=e.baseFontSize)&&void 0!==t?t:10;function P(e,t,n){w||y||(async()=>{(0,d.increaseEventProductAddToCartCount)(e,t,n)})()}(0,l.useEffect)(()=>{!async function(){var e,t,n,i;const a=await(0,f.M)(W,(0,m.NCy)(I),I);F({loaded:!0,client_product_id:W.client_product_id,variant_id:null===a||void 0===a||null===(e=a.variants)||void 0===e||null===(t=e[0])||void 0===t?void 0:t.id,variant_price:null===a||void 0===a||null===(n=a.variants)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.price})}()},[]);const H=null!==(n=e.width)&&void 0!==n?n:"fit-content",O=null!==(c=e.height)&&void 0!==c?c:"fit-content",$=(null!==(C=(0,m.FyB)(I))&&void 0!==C?C:2)+"px";return z.loaded?(0,b.jsx)("div",{style:{width:H,height:O},children:(0,b.jsx)("a",{href:"javascript:void(0)","data-variant-id":z.variant_id,"data-action-atc":"",rel:"nofollow","aria-describedby":"a11y-external-message",children:(0,b.jsx)(h.$,{type:"submit",className:(0,m.AJI)(I),sx:{width:H,height:O,minHeight:O},onClick:e=>{A(!0),P(R,W,1),(0,v.registerClickEvent)({userInteractionType:x.O.PRODUCT_TILE_ATC_CLICKED,widgetSourceDetails:Q,event:R,productList:[W],ctaList:R.cta}),null!==M&&setTimeout(()=>{M()},2e3)},children:"initial"===D.state?(0,b.jsx)(i.az,{width:"100%",height:"100%",padding:$,boxShadow:"lg",borderRadius:"md",backgroundColor:E,borderColor:E,borderWidth:"1px",animation:B?u.jd:null,onAnimationEnd:()=>{A(!1)},children:(0,b.jsx)(a.B,{direction:"row",width:"100%",height:"100%",alignItems:"center",justifyContent:"center",paddingY:"2px",children:(0,b.jsx)(o.o,{children:(0,b.jsxs)(r.E,{lineHeight:"100%",fontSize:1.3*L,fontWeight:"semibold",sx:{fontFamily:j+" !important",color:(0,m.Hfu)(I)+" !important"},children:["\xa0"," ADD TO CART ","\xa0"]})})})}):(0,b.jsx)(_,{event:R,product:W,baseFontSize:L,cartState:D,width:H,height:O})})})}):(0,b.jsx)(b.Fragment,{})}},9193:function(e,t,n){n.d(t,{$:function(){return x}});var i=n(1477);var a=n(9640),[r,o]=(0,a.q)({strict:!1,name:"ButtonGroupContext"}),c=n(2),l=n(3194),s=n(481);function d(e){const{children:t,className:n,...a}=e,r=(0,i.isValidElement)(t)?(0,i.cloneElement)(t,{"aria-hidden":!0,focusable:!1}):t,o=(0,l.cx)("chakra-button__icon",n);return(0,s.jsx)(c.B.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...a,className:o,children:r})}d.displayName="ButtonIcon";var u=n(9740);function h(e){const{label:t,placement:n,spacing:a="0.5rem",children:r=(0,s.jsx)(u.y,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:d,...h}=e,p=(0,l.cx)("chakra-button__spinner",o),m="start"===n?"marginEnd":"marginStart",f=(0,i.useMemo)(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[m]:t?a:0,fontSize:"1em",lineHeight:"normal",...d}),[d,t,m,a]);return(0,s.jsx)(c.B.div,{className:p,...h,__css:f,children:r})}function p(...e){return t=>{e.forEach(e=>{!function(e,t){if(null!=e)if("function"!==typeof e)try{e.current=t}catch(n){throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}else e(t)}(e,t)})}}function m(...e){return(0,i.useMemo)(()=>p(...e),e)}h.displayName="ButtonSpinner";var f=n(8238),g=n(7914),v=n(9069),x=(0,f.R)((e,t)=>{const n=o(),a=(0,g.Vl)("Button",{...n,...e}),{isDisabled:r=(null==n?void 0:n.isDisabled),isLoading:d,isActive:u,children:p,leftIcon:f,rightIcon:x,loadingText:_,iconSpacing:C="0.5rem",type:j,spinner:w,spinnerPlacement:y="start",className:S,as:N,...I}=(0,v.MN)(e),k=(0,i.useMemo)(()=>{const e={...null==a?void 0:a._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...a,...!!n&&{_focus:e}}},[a,n]),{ref:E,type:B}=function(e){const[t,n]=(0,i.useState)(!e);return{ref:(0,i.useCallback)(e=>{e&&n("BUTTON"===e.tagName)},[]),type:t?"button":void 0}}(N),A={rightIcon:x,leftIcon:f,iconSpacing:C,children:p};return(0,s.jsxs)(c.B.button,{ref:m(t,E),as:N,type:null!=j?j:B,"data-active":(0,l.sE)(u),"data-loading":(0,l.sE)(d),__css:k,className:(0,l.cx)("chakra-button",S),...I,disabled:r||d,children:[d&&"start"===y&&(0,s.jsx)(h,{className:"chakra-button__spinner--start",label:_,placement:"start",spacing:C,children:w}),d?_||(0,s.jsx)(c.B.span,{opacity:0,children:(0,s.jsx)(b,{...A})}):(0,s.jsx)(b,{...A}),d&&"end"===y&&(0,s.jsx)(h,{className:"chakra-button__spinner--end",label:_,placement:"end",spacing:C,children:w})]})});function b(e){const{leftIcon:t,rightIcon:n,children:i,iconSpacing:a}=e;return(0,s.jsxs)(s.Fragment,{children:[t&&(0,s.jsx)(d,{marginEnd:a,children:t}),i,n&&(0,s.jsx)(d,{marginStart:a,children:n})]})}x.displayName="Button"},9887:function(e,t,n){var i=n(4994);t.A=void 0;var a=i(n(4141)),r=n(481);t.A=(0,a.default)((0,r.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M9.29 16.29 5.7 12.7a.9959.9959 0 0 1 0-1.41c.39-.39 1.02-.39 1.41 0L10 14.17l6.88-6.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-7.59 7.59c-.38.39-1.02.39-1.41 0"}),"CheckCircleRounded")}}]);