@trafilea/afrodita-components 7.26.3 → 7.26.4

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.
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as n,__assign as o}from"tslib";import{jsxs as t,jsx as r}from"@emotion/react/jsx-runtime";import{css as i}from"@emotion/react";import e from"@emotion/styled";import{dispatchCustomEvent as a}from"@ribeirolabs/events";import{useEvent as d}from"@ribeirolabs/events/react";import{useMemo as l,useCallback as c,useState as p}from"react";import{Portal as u}from"../shared/portal/Portal.js";import{mediaQueries as s}from"../../utils/media.js";var m,f,v,h,x,y,g,b=function(o){var t=o.opened;return i(t?m||(m=n(["\n opacity: 1;\n pointer-events: all;\n "],["\n opacity: 1;\n pointer-events: all;\n "])):f||(f=n(["\n opacity: 0;\n pointer-events: none;\n "],["\n opacity: 0;\n pointer-events: none;\n "])))},w=e.div(y||(y=n(["\n border: 1px solid var(--colors-pallete-primary-color);\n border-radius: ",";\n padding: ",";\n position: fixed;\n left: ",";\n top: ",";\n z-index: var(--zIndex-modal);\n background-color: var(--colors-background-color);\n transition: transform 0.3s, opacity 0.3s;\n overflow-y: auto;\n max-width: ",";\n max-height: ",";\n width: ",";\n height: ",";\n ","\n ","\n ","\n"],["\n border: 1px solid var(--colors-pallete-primary-color);\n border-radius: ",";\n padding: ",";\n position: fixed;\n left: ",";\n top: ",";\n z-index: var(--zIndex-modal);\n background-color: var(--colors-background-color);\n transition: transform 0.3s, opacity 0.3s;\n overflow-y: auto;\n max-width: ",";\n max-height: ",";\n width: ",";\n height: ",";\n ","\n ","\n ","\n"])),(function(n){return"".concat(n.maxFullScreen||n.countryRedirModalWithCoupon?"0":"var(--radius-regular)")}),(function(n){return"".concat(n.padding?n.padding:"20px 10px")}),(function(n){return"".concat(n.maxFullScreen?"0":"50%")}),(function(n){return n.maxFullScreen?"0":n.initialTop?n.initialTop:"50%"}),(function(n){return"".concat(n.maxFullScreen?"100%":"90vw")}),(function(n){return"".concat(n.maxFullScreen?"100%":"90vh")}),(function(n){return"".concat(n.maxFullScreen?"100%":"auto")}),(function(n){return"".concat(n.maxFullScreen?"100%":"inherit")}),(function(o){var t=o.width;return t?i(x||(x=n(["\n width: ",";\n "],["\n width: ",";\n "])),t):s({minWidth:["90%","var(--component-modal-minWidth)"]})}),b,(function(o){var t=o.opened,r=o.maxFullScreen,e=o.initialTop;return t?i(v||(v=n(["\n transform: ",";\n top: ",";\n "],["\n transform: ",";\n top: ",";\n "])),r?"translateY(0)":"translate(-50%, -50%)",r?"0":e||"50%"):i(h||(h=n(["\n transform: ",";\n top: ",";\n "],["\n transform: ",";\n top: ",";\n "])),r?"translateY(10%)":"translate(-50%, -40%)",r?"0":e||"50%")})),F=e.div(g||(g=n(["\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.75);\n z-index: var(--zIndex-overlay);\n transition: opacity 0.3s;\n ","\n"],["\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.75);\n z-index: var(--zIndex-overlay);\n transition: opacity 0.3s;\n ","\n"])),b),S=function(n){var i=n.id,e=n.children,a=n.dismissable,d=void 0===a||a,l=n.maxFullScreen,c=void 0!==l&&l,p=n.padding,s=n.onClickOverlayHandler,m=n.width,f=n.initialTop,v=void 0===f?"50%":f,h=n.countryRedirModalWithCoupon,x=void 0!==h&&h,y=n.className,g=C(i),b=g.opened,S=g.close;return t(u,o({id:i,className:y},{children:[r(w,o({opened:b,maxFullScreen:c,padding:p,width:m,initialTop:v,countryRedirModalWithCoupon:x},{children:e}),void 0),r(F,{"data-testid":"modal-overlay",opened:b,onClick:function(){null==s||s(),d&&S()}},void 0)]}),void 0)},k=function(n,t){a("modal",o({id:n},t))},z=function(n,o){d("modal",c((function(t){t.detail.id===n&&o(t)}),[n,o]))},C=function(n){var o=p(!1),t=o[0],r=o[1];z(n,c((function(n){return r("open"===n.detail.type)}),[]));var i=c((function(){k(n,{type:"open"})}),[n]),e=c((function(){k(n,{type:"close"})}),[n]);return l((function(){return{opened:t,open:i,close:e}}),[e,i,t])};export{S as Modal,F as Overlay,k as modalEvent,C as useModal,z as useModalEvent};
1
+ import{__makeTemplateObject as n,__assign as o}from"tslib";import{jsxs as t,jsx as r}from"@emotion/react/jsx-runtime";import{css as i}from"@emotion/react";import e from"@emotion/styled";import{dispatchCustomEvent as a}from"@ribeirolabs/events";import{useEvent as d}from"@ribeirolabs/events/react";import{useMemo as l,useCallback as c,useState as u}from"react";import{Portal as p}from"../shared/portal/Portal.js";import{mediaQueries as m}from"../../utils/media.js";var s,f,v,h,x,g,y,b=function(o){var t=o.opened;return i(t?s||(s=n(["\n opacity: 1;\n pointer-events: all;\n "],["\n opacity: 1;\n pointer-events: all;\n "])):f||(f=n(["\n opacity: 0;\n pointer-events: none;\n "],["\n opacity: 0;\n pointer-events: none;\n "])))},w=e.div(g||(g=n(["\n border: 1px solid var(--colors-pallete-primary-color);\n border-radius: ",";\n padding: ",";\n position: fixed;\n left: ",";\n top: ",";\n z-index: var(--zIndex-modal);\n background-color: var(--colors-background-color);\n transition: transform 0.3s, opacity 0.3s;\n overflow-y: auto;\n max-width: ",";\n max-height: ",";\n max-height: ",";\n width: ",";\n height: ",";\n ","\n ","\n ","\n"],["\n border: 1px solid var(--colors-pallete-primary-color);\n border-radius: ",";\n padding: ",";\n position: fixed;\n left: ",";\n top: ",";\n z-index: var(--zIndex-modal);\n background-color: var(--colors-background-color);\n transition: transform 0.3s, opacity 0.3s;\n overflow-y: auto;\n max-width: ",";\n max-height: ",";\n max-height: ",";\n width: ",";\n height: ",";\n ","\n ","\n ","\n"])),(function(n){return"".concat(n.maxFullScreen||n.countryRedirModalWithCoupon?"0":"var(--radius-regular)")}),(function(n){return"".concat(n.padding?n.padding:"20px 10px")}),(function(n){return"".concat(n.maxFullScreen?"0":"50%")}),(function(n){return n.maxFullScreen?"0":n.initialTop?n.initialTop:"50%"}),(function(n){return"".concat(n.maxFullScreen?"100%":"90vw")}),(function(n){return"".concat(n.maxFullScreen?"100%":"90vh")}),(function(n){return"".concat(n.maxFullScreen?"100%":"90dvh")}),(function(n){return"".concat(n.maxFullScreen?"100%":"auto")}),(function(n){return"".concat(n.maxFullScreen?"100%":"inherit")}),(function(o){var t=o.width;return t?i(x||(x=n(["\n width: ",";\n "],["\n width: ",";\n "])),t):m({minWidth:["90%","var(--component-modal-minWidth)"]})}),b,(function(o){var t=o.opened,r=o.maxFullScreen,e=o.initialTop;return t?i(v||(v=n(["\n transform: ",";\n top: ",";\n "],["\n transform: ",";\n top: ",";\n "])),r?"translateY(0)":"translate(-50%, -50%)",r?"0":e||"50%"):i(h||(h=n(["\n transform: ",";\n top: ",";\n "],["\n transform: ",";\n top: ",";\n "])),r?"translateY(10%)":"translate(-50%, -40%)",r?"0":e||"50%")})),F=e.div(y||(y=n(["\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.75);\n z-index: var(--zIndex-overlay);\n transition: opacity 0.3s;\n ","\n"],["\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.75);\n z-index: var(--zIndex-overlay);\n transition: opacity 0.3s;\n ","\n"])),b),S=function(n){var i=n.id,e=n.children,a=n.dismissable,d=void 0===a||a,l=n.maxFullScreen,c=void 0!==l&&l,u=n.padding,m=n.onClickOverlayHandler,s=n.width,f=n.initialTop,v=void 0===f?"50%":f,h=n.countryRedirModalWithCoupon,x=void 0!==h&&h,g=n.className,y=C(i),b=y.opened,S=y.close;return t(p,o({id:i,className:g},{children:[r(w,o({opened:b,maxFullScreen:c,padding:u,width:s,initialTop:v,countryRedirModalWithCoupon:x},{children:e}),void 0),r(F,{"data-testid":"modal-overlay",opened:b,onClick:function(){null==m||m(),d&&S()}},void 0)]}),void 0)},k=function(n,t){a("modal",o({id:n},t))},z=function(n,o){d("modal",c((function(t){t.detail.id===n&&o(t)}),[n,o]))},C=function(n){var o=u(!1),t=o[0],r=o[1];z(n,c((function(n){return r("open"===n.detail.type)}),[]));var i=c((function(){k(n,{type:"open"})}),[n]),e=c((function(){k(n,{type:"close"})}),[n]);return l((function(){return{opened:t,open:i,close:e}}),[e,i,t])};export{S as Modal,F as Overlay,k as modalEvent,C as useModal,z as useModalEvent};
2
2
  //# sourceMappingURL=Modal.js.map
@@ -1,2 +1,2 @@
1
- import{__makeTemplateObject as n,__assign as i}from"tslib";import{jsx as t,jsxs as e}from"react/jsx-runtime";import o from"@emotion/styled";import{useRef as d,useEffect as r}from"react";import{DateFormat as a,formatDate as l}from"../../utils/dateFormatter/dateFormatter.js";import{Image as p}from"../atoms/Image/Image.js";import{Icon as h}from"../icons/index.js";import{useModal as c,Modal as x}from"../modal/Modal.js";import{StarList as m}from"../rating/starList/StarList.js";var g,s,f,u,w,v,b,y,k,z,j,C,I,F,L,M,S,T,D,H,A,N,Y,_=o.div(g||(g=n(["\n display: flex;\n flex-direction: column;\n\n @media (min-width: 768px) {\n flex-direction: row;\n }\n"],["\n display: flex;\n flex-direction: column;\n\n @media (min-width: 768px) {\n flex-direction: row;\n }\n"]))),B=o.div(s||(s=n(["\n display: flex;\n flex-direction: column;\n padding: 20px;\n padding-top: 0;\n"],["\n display: flex;\n flex-direction: column;\n padding: 20px;\n padding-top: 0;\n"]))),U=o.div(f||(f=n(["\n display: flex;\n justify-content: space-between;\n"],["\n display: flex;\n justify-content: space-between;\n"]))),V=o.div(u||(u=n(["\n display: flex;\n flex-direction: column;\n margin-top: 15px;\n margin-bottom: 5px;\n\n @media (min-width: 768px) {\n margin-top: 10px;\n }\n"],["\n display: flex;\n flex-direction: column;\n margin-top: 15px;\n margin-bottom: 5px;\n\n @media (min-width: 768px) {\n margin-top: 10px;\n }\n"]))),X=o.span(w||(w=n(["\n font-weight: 400;\n font-size: 14px;\n line-height: 22px;\n"],["\n font-weight: 400;\n font-size: 14px;\n line-height: 22px;\n"]))),q=o.h1(v||(v=n(["\n font-weight: 600;\n margin: 0;\n font-size: 18px;\n padding: 20px;\n display: flex;\n"],["\n font-weight: 600;\n margin: 0;\n font-size: 18px;\n padding: 20px;\n display: flex;\n"]))),E=o.h1(b||(b=n(["\n font-weight: 600;\n margin: 0;\n font-size: 18px;\n color: #1cc286;\n margin-left: 6px;\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n"],["\n font-weight: 600;\n margin: 0;\n font-size: 18px;\n color: #1cc286;\n margin-left: 6px;\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n"]))),G=o.h2(y||(y=n(["\n font-size: 18px;\n line-height: 20px;\n font-weight: 600;\n margin: 0;\n"],["\n font-size: 18px;\n line-height: 20px;\n font-weight: 600;\n margin: 0;\n"]))),J=o.div(k||(k=n(["\n font-weight: normal;\n font-size: 16px;\n margin: 0;\n line-height: 25px;\n word-break: break-word;\n margin-top: 5px;\n white-space: pre-wrap;\n"],["\n font-weight: normal;\n font-size: 16px;\n margin: 0;\n line-height: 25px;\n word-break: break-word;\n margin-top: 5px;\n white-space: pre-wrap;\n"]))),K=o.div(z||(z=n(["\n width: 100% !important;\n min-width: 100%;\n height: initial !important;\n min-height: 250px;\n background-size: contain !important;\n margin: 0 !important;\n line-height: 0;\n\n @media (min-width: 768px) {\n width: unset;\n min-width: 50%;\n max-width: 100%;\n background-color: #fff;\n display: inline-block;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n padding: 20px;\n }\n"],["\n width: 100% !important;\n min-width: 100%;\n height: initial !important;\n min-height: 250px;\n background-size: contain !important;\n margin: 0 !important;\n line-height: 0;\n\n @media (min-width: 768px) {\n width: unset;\n min-width: 50%;\n max-width: 100%;\n background-color: #fff;\n display: inline-block;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n padding: 20px;\n }\n"]))),O=o(p)(j||(j=n(["\n width: 100%;\n min-width: 50%;\n max-width: 100%;\n background-color: #fff;\n display: inline-block;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n"],["\n width: 100%;\n min-width: 50%;\n max-width: 100%;\n background-color: #fff;\n display: inline-block;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n"]))),P=o.video(C||(C=n(["\n width: 100%;\n min-width: 50%;\n max-width: 100%;\n background-color: #fff;\n display: inline-block;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n"],["\n width: 100%;\n min-width: 50%;\n max-width: 100%;\n background-color: #fff;\n display: inline-block;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n"]))),Q=o.div(I||(I=n(["\n padding: 20px;\n border-top: 1px solid #eee;\n cursor: pointer;\n"],["\n padding: 20px;\n border-top: 1px solid #eee;\n cursor: pointer;\n"]))),R=o.div(F||(F=n(["\n align-items: center;\n margin-top: 10px;\n margin-bottom: 15px;\n font-size: 12px;\n line-height: 16px;\n text-align: center;\n max-width: 192px;\n"],["\n align-items: center;\n margin-top: 10px;\n margin-bottom: 15px;\n font-size: 12px;\n line-height: 16px;\n text-align: center;\n max-width: 192px;\n"]))),W=o(p)(L||(L=n(["\n max-height: 100px;\n height: auto;\n width: auto;\n"],["\n max-height: 100px;\n height: auto;\n width: auto;\n"]))),Z=o.div(M||(M=n(["\n display: inline-block;\n padding: 10px;\n border: 1px solid #ececec;\n line-height: 0;\n text-align: center;\n width: 100%;\n box-sizing: border-box !important;\n max-width: 192px;\n"],["\n display: inline-block;\n padding: 10px;\n border: 1px solid #ececec;\n line-height: 0;\n text-align: center;\n width: 100%;\n box-sizing: border-box !important;\n max-width: 192px;\n"]))),$=o.div(S||(S=n(["\n @media (min-width: 768px) {\n min-width: 40%;\n }\n"],["\n @media (min-width: 768px) {\n min-width: 40%;\n }\n"]))),nn=o.div(T||(T=n(["\n display: flex;\n justify-content: end;\n margin-top: 20px;\n"],["\n display: flex;\n justify-content: end;\n margin-top: 20px;\n"]))),tn=o.div(D||(D=n(["\n display: flex;\n cursor: pointer;\n"],["\n display: flex;\n cursor: pointer;\n"]))),en=o.div(H||(H=n(["\n display: flex;\n cursor: pointer;\n"],["\n display: flex;\n cursor: pointer;\n"]))),on=o.span(A||(A=n(["\n font-size: 15px;\n text-align: right;\n margin-right: 15px;\n margin-left: 4px;\n"],["\n font-size: 15px;\n text-align: right;\n margin-right: 15px;\n margin-left: 4px;\n"]))),dn=o.span(N||(N=n(["\n font-size: 15px;\n text-align: right;\n margin-left: 4px;\n"],["\n font-size: 15px;\n text-align: right;\n margin-left: 4px;\n"]))),rn=o.span(Y||(Y=n(["\n cursor: pointer;\n display: inline-block;\n position: absolute;\n background: #fff;\n color: #000;\n box-shadow: none;\n opacity: 0.8;\n top: 0;\n right: 0;\n z-index: 3;\n font-size: 0;\n line-height: 30px;\n text-align: center;\n width: 45px;\n height: 50px;\n font-weight: 400;\n float: right;\n\n &::before {\n content: '';\n position: absolute;\n height: 1px;\n width: 100%;\n top: 50%;\n left: 0;\n margin-top: -1px;\n background: #000;\n transform: rotate(-45deg);\n }\n\n &::after {\n content: '';\n position: absolute;\n height: 1px;\n width: 100%;\n top: 50%;\n left: 0;\n margin-top: -1px;\n background: #000;\n transform: rotate(45deg);\n }\n"],["\n cursor: pointer;\n display: inline-block;\n position: absolute;\n background: #fff;\n color: #000;\n box-shadow: none;\n opacity: 0.8;\n top: 0;\n right: 0;\n z-index: 3;\n font-size: 0;\n line-height: 30px;\n text-align: center;\n width: 45px;\n height: 50px;\n font-weight: 400;\n float: right;\n\n &::before {\n content: '';\n position: absolute;\n height: 1px;\n width: 100%;\n top: 50%;\n left: 0;\n margin-top: -1px;\n background: #000;\n transform: rotate(-45deg);\n }\n\n &::after {\n content: '';\n position: absolute;\n height: 1px;\n width: 100%;\n top: 50%;\n left: 0;\n margin-top: -1px;\n background: #000;\n transform: rotate(45deg);\n }\n"]))),an=function(n){var o=n.reviewId,p=n.reviewerName,g=n.date,s=n.rating,f=n.stars,u=n.title,w=n.description,v=n.image,b=n.modalId,y=n.maxFullScreen,k=void 0!==y&&y,z=n.verified,j=n.productImage,C=n.productTitle,I=n.productLink,F=n.helpfulCount,L=void 0===F?0:F,M=n.helpfulAction,S=n.notHelpfulCount,T=void 0===S?0:S,D=n.notHelpfulAction,H=n.dateFormat,A=void 0===H?a.DDMMYY:H,N=null==v?void 0:v.src.includes("/video"),Y=d(null),an=c(b),ln=an.opened,pn=an.close;return r((function(){Y.current&&(ln?Y.current.play():Y.current.pause())}),[ln]),t(x,i({id:b,maxFullScreen:k,padding:"0"},{children:e(_,{children:[t(rn,i({onClick:pn},{children:"X"}),void 0),t(K,{children:v&&(N?t(P,{ref:Y,src:v.src,width:"100%",controls:!0},void 0):t(O,{src:v.src,alt:v.alt},void 0))},void 0),e($,{children:[ln&&e(q,{children:[p,z&&t(E,{children:"Verified Buyer"},void 0)]},void 0),e(B,i({"data-testid":"review-detail-content"},{children:[e(U,{children:[t(m,{starsNumber:5,rating:s,fill:f.color,size:f.size},void 0),t(X,{children:l(g,A)},void 0)]},void 0),e(V,{children:[t(G,{children:u},void 0),t(J,{dangerouslySetInnerHTML:{__html:w}},void 0)]},void 0),e(nn,{children:[e(tn,i({"data-testid":"helpful-action",onClick:function(){return M?M(o):void 0}},{children:[t(h.Custom.ThumbsUp,{width:1,height:1,fill:"#000"},void 0),t(on,{children:L},void 0)]}),void 0),e(en,i({"data-testid":"not-helpful-action",onClick:function(){return D?D(o):void 0}},{children:[t(h.Custom.ThumbsDown,{width:1,height:1,fill:"#000"},void 0),t(dn,{children:T},void 0)]}),void 0)]},void 0)]}),void 0),j&&I&&e(Q,i({onClick:function(){return window.location.href=I}},{children:[t(Z,{children:t(W,{src:j,alt:"productImage"},void 0)},void 0),t(R,{children:C},void 0)]}),void 0)]},void 0)]},void 0)}),void 0)};export{an as default};
1
+ import{__makeTemplateObject as n,__assign as i}from"tslib";import{jsx as t,jsxs as e}from"react/jsx-runtime";import o from"@emotion/styled";import{useRef as d,useEffect as r}from"react";import{DateFormat as a,formatDate as l}from"../../utils/dateFormatter/dateFormatter.js";import{Image as p}from"../atoms/Image/Image.js";import{Icon as h}from"../icons/index.js";import{useModal as c,Modal as x}from"../modal/Modal.js";import{StarList as m}from"../rating/starList/StarList.js";var g,s,f,u,w,v,b,y,k,z,j,C,I,F,L,M,S,T,D,H,A,N,Y,_=o.div(g||(g=n(["\n display: flex;\n flex-direction: column;\n\n @media (min-width: 768px) {\n flex-direction: row;\n }\n"],["\n display: flex;\n flex-direction: column;\n\n @media (min-width: 768px) {\n flex-direction: row;\n }\n"]))),B=o.div(s||(s=n(["\n display: flex;\n flex-direction: column;\n padding: 20px;\n padding-top: 0;\n"],["\n display: flex;\n flex-direction: column;\n padding: 20px;\n padding-top: 0;\n"]))),U=o.div(f||(f=n(["\n display: flex;\n justify-content: space-between;\n"],["\n display: flex;\n justify-content: space-between;\n"]))),V=o.div(u||(u=n(["\n display: flex;\n flex-direction: column;\n margin-top: 15px;\n margin-bottom: 5px;\n\n @media (min-width: 768px) {\n margin-top: 10px;\n }\n"],["\n display: flex;\n flex-direction: column;\n margin-top: 15px;\n margin-bottom: 5px;\n\n @media (min-width: 768px) {\n margin-top: 10px;\n }\n"]))),X=o.span(w||(w=n(["\n font-weight: 400;\n font-size: 14px;\n line-height: 22px;\n"],["\n font-weight: 400;\n font-size: 14px;\n line-height: 22px;\n"]))),q=o.h1(v||(v=n(["\n font-weight: 600;\n margin: 0;\n font-size: 18px;\n padding: 20px;\n display: flex;\n"],["\n font-weight: 600;\n margin: 0;\n font-size: 18px;\n padding: 20px;\n display: flex;\n"]))),E=o.h1(b||(b=n(["\n font-weight: 600;\n margin: 0;\n font-size: 18px;\n color: #1cc286;\n margin-left: 6px;\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n"],["\n font-weight: 600;\n margin: 0;\n font-size: 18px;\n color: #1cc286;\n margin-left: 6px;\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n"]))),G=o.h2(y||(y=n(["\n font-size: 18px;\n line-height: 20px;\n font-weight: 600;\n margin: 0;\n"],["\n font-size: 18px;\n line-height: 20px;\n font-weight: 600;\n margin: 0;\n"]))),J=o.div(k||(k=n(["\n font-weight: normal;\n font-size: 16px;\n margin: 0;\n line-height: 25px;\n word-break: break-word;\n margin-top: 5px;\n white-space: pre-wrap;\n"],["\n font-weight: normal;\n font-size: 16px;\n margin: 0;\n line-height: 25px;\n word-break: break-word;\n margin-top: 5px;\n white-space: pre-wrap;\n"]))),K=o.div(z||(z=n(["\n width: 100% !important;\n min-width: 100%;\n height: initial !important;\n min-height: 250px;\n background-size: contain !important;\n margin: 0 !important;\n line-height: 0;\n\n @media (min-width: 768px) {\n width: unset;\n min-width: 50%;\n max-width: 100%;\n background-color: #fff;\n display: inline-block;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n max-height: calc(100dvh - 100px);\n padding: 20px;\n }\n"],["\n width: 100% !important;\n min-width: 100%;\n height: initial !important;\n min-height: 250px;\n background-size: contain !important;\n margin: 0 !important;\n line-height: 0;\n\n @media (min-width: 768px) {\n width: unset;\n min-width: 50%;\n max-width: 100%;\n background-color: #fff;\n display: inline-block;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n max-height: calc(100dvh - 100px);\n padding: 20px;\n }\n"]))),O=o(p)(j||(j=n(["\n width: 100%;\n min-width: 50%;\n max-width: 100%;\n background-color: #fff;\n display: inline-block;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n max-height: calc(100dvh - 100px);\n"],["\n width: 100%;\n min-width: 50%;\n max-width: 100%;\n background-color: #fff;\n display: inline-block;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n max-height: calc(100dvh - 100px);\n"]))),P=o.video(C||(C=n(["\n width: 100%;\n min-width: 50%;\n max-width: 100%;\n background-color: #fff;\n display: inline-block;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n max-height: calc(100dvh - 100px);\n"],["\n width: 100%;\n min-width: 50%;\n max-width: 100%;\n background-color: #fff;\n display: inline-block;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n max-height: calc(100dvh - 100px);\n"]))),Q=o.div(I||(I=n(["\n padding: 20px;\n border-top: 1px solid #eee;\n cursor: pointer;\n"],["\n padding: 20px;\n border-top: 1px solid #eee;\n cursor: pointer;\n"]))),R=o.div(F||(F=n(["\n align-items: center;\n margin-top: 10px;\n margin-bottom: 15px;\n font-size: 12px;\n line-height: 16px;\n text-align: center;\n max-width: 192px;\n"],["\n align-items: center;\n margin-top: 10px;\n margin-bottom: 15px;\n font-size: 12px;\n line-height: 16px;\n text-align: center;\n max-width: 192px;\n"]))),W=o(p)(L||(L=n(["\n max-height: 100px;\n height: auto;\n width: auto;\n"],["\n max-height: 100px;\n height: auto;\n width: auto;\n"]))),Z=o.div(M||(M=n(["\n display: inline-block;\n padding: 10px;\n border: 1px solid #ececec;\n line-height: 0;\n text-align: center;\n width: 100%;\n box-sizing: border-box !important;\n max-width: 192px;\n"],["\n display: inline-block;\n padding: 10px;\n border: 1px solid #ececec;\n line-height: 0;\n text-align: center;\n width: 100%;\n box-sizing: border-box !important;\n max-width: 192px;\n"]))),$=o.div(S||(S=n(["\n @media (min-width: 768px) {\n min-width: 40%;\n }\n"],["\n @media (min-width: 768px) {\n min-width: 40%;\n }\n"]))),nn=o.div(T||(T=n(["\n display: flex;\n justify-content: end;\n margin-top: 20px;\n"],["\n display: flex;\n justify-content: end;\n margin-top: 20px;\n"]))),tn=o.div(D||(D=n(["\n display: flex;\n cursor: pointer;\n"],["\n display: flex;\n cursor: pointer;\n"]))),en=o.div(H||(H=n(["\n display: flex;\n cursor: pointer;\n"],["\n display: flex;\n cursor: pointer;\n"]))),on=o.span(A||(A=n(["\n font-size: 15px;\n text-align: right;\n margin-right: 15px;\n margin-left: 4px;\n"],["\n font-size: 15px;\n text-align: right;\n margin-right: 15px;\n margin-left: 4px;\n"]))),dn=o.span(N||(N=n(["\n font-size: 15px;\n text-align: right;\n margin-left: 4px;\n"],["\n font-size: 15px;\n text-align: right;\n margin-left: 4px;\n"]))),rn=o.span(Y||(Y=n(["\n cursor: pointer;\n display: inline-block;\n position: absolute;\n background: #fff;\n color: #000;\n box-shadow: none;\n opacity: 0.8;\n top: 0;\n right: 0;\n z-index: 3;\n font-size: 0;\n line-height: 30px;\n text-align: center;\n width: 45px;\n height: 50px;\n font-weight: 400;\n float: right;\n\n &::before {\n content: '';\n position: absolute;\n height: 1px;\n width: 100%;\n top: 50%;\n left: 0;\n margin-top: -1px;\n background: #000;\n transform: rotate(-45deg);\n }\n\n &::after {\n content: '';\n position: absolute;\n height: 1px;\n width: 100%;\n top: 50%;\n left: 0;\n margin-top: -1px;\n background: #000;\n transform: rotate(45deg);\n }\n"],["\n cursor: pointer;\n display: inline-block;\n position: absolute;\n background: #fff;\n color: #000;\n box-shadow: none;\n opacity: 0.8;\n top: 0;\n right: 0;\n z-index: 3;\n font-size: 0;\n line-height: 30px;\n text-align: center;\n width: 45px;\n height: 50px;\n font-weight: 400;\n float: right;\n\n &::before {\n content: '';\n position: absolute;\n height: 1px;\n width: 100%;\n top: 50%;\n left: 0;\n margin-top: -1px;\n background: #000;\n transform: rotate(-45deg);\n }\n\n &::after {\n content: '';\n position: absolute;\n height: 1px;\n width: 100%;\n top: 50%;\n left: 0;\n margin-top: -1px;\n background: #000;\n transform: rotate(45deg);\n }\n"]))),an=function(n){var o=n.reviewId,p=n.reviewerName,g=n.date,s=n.rating,f=n.stars,u=n.title,w=n.description,v=n.image,b=n.modalId,y=n.maxFullScreen,k=void 0!==y&&y,z=n.verified,j=n.productImage,C=n.productTitle,I=n.productLink,F=n.helpfulCount,L=void 0===F?0:F,M=n.helpfulAction,S=n.notHelpfulCount,T=void 0===S?0:S,D=n.notHelpfulAction,H=n.dateFormat,A=void 0===H?a.DDMMYY:H,N=null==v?void 0:v.src.includes("/video"),Y=d(null),an=c(b),ln=an.opened,pn=an.close;return r((function(){Y.current&&(ln?Y.current.play():Y.current.pause())}),[ln]),t(x,i({id:b,maxFullScreen:k,padding:"0"},{children:e(_,{children:[t(rn,i({onClick:pn},{children:"X"}),void 0),t(K,{children:v&&(N?t(P,{ref:Y,src:v.src,width:"100%",controls:!0},void 0):t(O,{src:v.src,alt:v.alt},void 0))},void 0),e($,{children:[ln&&e(q,{children:[p,z&&t(E,{children:"Verified Buyer"},void 0)]},void 0),e(B,i({"data-testid":"review-detail-content"},{children:[e(U,{children:[t(m,{starsNumber:5,rating:s,fill:f.color,size:f.size},void 0),t(X,{children:l(g,A)},void 0)]},void 0),e(V,{children:[t(G,{children:u},void 0),t(J,{dangerouslySetInnerHTML:{__html:w}},void 0)]},void 0),e(nn,{children:[e(tn,i({"data-testid":"helpful-action",onClick:function(){return M?M(o):void 0}},{children:[t(h.Custom.ThumbsUp,{width:1,height:1,fill:"#000"},void 0),t(on,{children:L},void 0)]}),void 0),e(en,i({"data-testid":"not-helpful-action",onClick:function(){return D?D(o):void 0}},{children:[t(h.Custom.ThumbsDown,{width:1,height:1,fill:"#000"},void 0),t(dn,{children:T},void 0)]}),void 0)]},void 0)]}),void 0),j&&I&&e(Q,i({onClick:function(){return window.location.href=I}},{children:[t(Z,{children:t(W,{src:j,alt:"productImage"},void 0)},void 0),t(R,{children:C},void 0)]}),void 0)]},void 0)]},void 0)}),void 0)};export{an as default};
2
2
  //# sourceMappingURL=ReviewDetail.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),e=require("@emotion/react/jsx-runtime"),t=require("@emotion/react"),o=require("@emotion/styled"),r=require("@ribeirolabs/events"),a=require("@ribeirolabs/events/react"),i=require("react"),l=require("../shared/portal/Portal.js"),c=require("../../utils/media.js");function d(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var s,u,p,m,v,f,x,h=d(o),b=function(e){return e.opened?t.css(s||(s=n.__makeTemplateObject(["\n opacity: 1;\n pointer-events: all;\n "],["\n opacity: 1;\n pointer-events: all;\n "]))):t.css(u||(u=n.__makeTemplateObject(["\n opacity: 0;\n pointer-events: none;\n "],["\n opacity: 0;\n pointer-events: none;\n "])))},y=h.default.div(f||(f=n.__makeTemplateObject(["\n border: 1px solid var(--colors-pallete-primary-color);\n border-radius: ",";\n padding: ",";\n position: fixed;\n left: ",";\n top: ",";\n z-index: var(--zIndex-modal);\n background-color: var(--colors-background-color);\n transition: transform 0.3s, opacity 0.3s;\n overflow-y: auto;\n max-width: ",";\n max-height: ",";\n width: ",";\n height: ",";\n ","\n ","\n ","\n"],["\n border: 1px solid var(--colors-pallete-primary-color);\n border-radius: ",";\n padding: ",";\n position: fixed;\n left: ",";\n top: ",";\n z-index: var(--zIndex-modal);\n background-color: var(--colors-background-color);\n transition: transform 0.3s, opacity 0.3s;\n overflow-y: auto;\n max-width: ",";\n max-height: ",";\n width: ",";\n height: ",";\n ","\n ","\n ","\n"])),(function(n){return"".concat(n.maxFullScreen||n.countryRedirModalWithCoupon?"0":"var(--radius-regular)")}),(function(n){return"".concat(n.padding?n.padding:"20px 10px")}),(function(n){return"".concat(n.maxFullScreen?"0":"50%")}),(function(n){return n.maxFullScreen?"0":n.initialTop?n.initialTop:"50%"}),(function(n){return"".concat(n.maxFullScreen?"100%":"90vw")}),(function(n){return"".concat(n.maxFullScreen?"100%":"90vh")}),(function(n){return"".concat(n.maxFullScreen?"100%":"auto")}),(function(n){return"".concat(n.maxFullScreen?"100%":"inherit")}),(function(e){var o=e.width;return o?t.css(v||(v=n.__makeTemplateObject(["\n width: ",";\n "],["\n width: ",";\n "])),o):c.mediaQueries({minWidth:["90%","var(--component-modal-minWidth)"]})}),b,(function(e){var o=e.opened,r=e.maxFullScreen,a=e.initialTop;return o?t.css(p||(p=n.__makeTemplateObject(["\n transform: ",";\n top: ",";\n "],["\n transform: ",";\n top: ",";\n "])),r?"translateY(0)":"translate(-50%, -50%)",r?"0":a||"50%"):t.css(m||(m=n.__makeTemplateObject(["\n transform: ",";\n top: ",";\n "],["\n transform: ",";\n top: ",";\n "])),r?"translateY(10%)":"translate(-50%, -40%)",r?"0":a||"50%")})),g=h.default.div(x||(x=n.__makeTemplateObject(["\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.75);\n z-index: var(--zIndex-overlay);\n transition: opacity 0.3s;\n ","\n"],["\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.75);\n z-index: var(--zIndex-overlay);\n transition: opacity 0.3s;\n ","\n"])),b),_=function(e,t){r.dispatchCustomEvent("modal",n.__assign({id:e},t))},k=function(n,e){a.useEvent("modal",i.useCallback((function(t){t.detail.id===n&&e(t)}),[n,e]))},j=function(n){var e=i.useState(!1),t=e[0],o=e[1];k(n,i.useCallback((function(n){return o("open"===n.detail.type)}),[]));var r=i.useCallback((function(){_(n,{type:"open"})}),[n]),a=i.useCallback((function(){_(n,{type:"close"})}),[n]);return i.useMemo((function(){return{opened:t,open:r,close:a}}),[a,r,t])};exports.Modal=function(t){var o=t.id,r=t.children,a=t.dismissable,i=void 0===a||a,c=t.maxFullScreen,d=void 0!==c&&c,s=t.padding,u=t.onClickOverlayHandler,p=t.width,m=t.initialTop,v=void 0===m?"50%":m,f=t.countryRedirModalWithCoupon,x=void 0!==f&&f,h=t.className,b=j(o),_=b.opened,k=b.close;return e.jsxs(l.Portal,n.__assign({id:o,className:h},{children:[e.jsx(y,n.__assign({opened:_,maxFullScreen:d,padding:s,width:p,initialTop:v,countryRedirModalWithCoupon:x},{children:r}),void 0),e.jsx(g,{"data-testid":"modal-overlay",opened:_,onClick:function(){null==u||u(),i&&k()}},void 0)]}),void 0)},exports.Overlay=g,exports.modalEvent=_,exports.useModal=j,exports.useModalEvent=k;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),e=require("@emotion/react/jsx-runtime"),t=require("@emotion/react"),o=require("@emotion/styled"),r=require("@ribeirolabs/events"),a=require("@ribeirolabs/events/react"),i=require("react"),l=require("../shared/portal/Portal.js"),c=require("../../utils/media.js");function d(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var s,u,p,m,v,f,x,h=d(o),b=function(e){return e.opened?t.css(s||(s=n.__makeTemplateObject(["\n opacity: 1;\n pointer-events: all;\n "],["\n opacity: 1;\n pointer-events: all;\n "]))):t.css(u||(u=n.__makeTemplateObject(["\n opacity: 0;\n pointer-events: none;\n "],["\n opacity: 0;\n pointer-events: none;\n "])))},g=h.default.div(f||(f=n.__makeTemplateObject(["\n border: 1px solid var(--colors-pallete-primary-color);\n border-radius: ",";\n padding: ",";\n position: fixed;\n left: ",";\n top: ",";\n z-index: var(--zIndex-modal);\n background-color: var(--colors-background-color);\n transition: transform 0.3s, opacity 0.3s;\n overflow-y: auto;\n max-width: ",";\n max-height: ",";\n max-height: ",";\n width: ",";\n height: ",";\n ","\n ","\n ","\n"],["\n border: 1px solid var(--colors-pallete-primary-color);\n border-radius: ",";\n padding: ",";\n position: fixed;\n left: ",";\n top: ",";\n z-index: var(--zIndex-modal);\n background-color: var(--colors-background-color);\n transition: transform 0.3s, opacity 0.3s;\n overflow-y: auto;\n max-width: ",";\n max-height: ",";\n max-height: ",";\n width: ",";\n height: ",";\n ","\n ","\n ","\n"])),(function(n){return"".concat(n.maxFullScreen||n.countryRedirModalWithCoupon?"0":"var(--radius-regular)")}),(function(n){return"".concat(n.padding?n.padding:"20px 10px")}),(function(n){return"".concat(n.maxFullScreen?"0":"50%")}),(function(n){return n.maxFullScreen?"0":n.initialTop?n.initialTop:"50%"}),(function(n){return"".concat(n.maxFullScreen?"100%":"90vw")}),(function(n){return"".concat(n.maxFullScreen?"100%":"90vh")}),(function(n){return"".concat(n.maxFullScreen?"100%":"90dvh")}),(function(n){return"".concat(n.maxFullScreen?"100%":"auto")}),(function(n){return"".concat(n.maxFullScreen?"100%":"inherit")}),(function(e){var o=e.width;return o?t.css(v||(v=n.__makeTemplateObject(["\n width: ",";\n "],["\n width: ",";\n "])),o):c.mediaQueries({minWidth:["90%","var(--component-modal-minWidth)"]})}),b,(function(e){var o=e.opened,r=e.maxFullScreen,a=e.initialTop;return o?t.css(p||(p=n.__makeTemplateObject(["\n transform: ",";\n top: ",";\n "],["\n transform: ",";\n top: ",";\n "])),r?"translateY(0)":"translate(-50%, -50%)",r?"0":a||"50%"):t.css(m||(m=n.__makeTemplateObject(["\n transform: ",";\n top: ",";\n "],["\n transform: ",";\n top: ",";\n "])),r?"translateY(10%)":"translate(-50%, -40%)",r?"0":a||"50%")})),y=h.default.div(x||(x=n.__makeTemplateObject(["\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.75);\n z-index: var(--zIndex-overlay);\n transition: opacity 0.3s;\n ","\n"],["\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.75);\n z-index: var(--zIndex-overlay);\n transition: opacity 0.3s;\n ","\n"])),b),_=function(e,t){r.dispatchCustomEvent("modal",n.__assign({id:e},t))},k=function(n,e){a.useEvent("modal",i.useCallback((function(t){t.detail.id===n&&e(t)}),[n,e]))},j=function(n){var e=i.useState(!1),t=e[0],o=e[1];k(n,i.useCallback((function(n){return o("open"===n.detail.type)}),[]));var r=i.useCallback((function(){_(n,{type:"open"})}),[n]),a=i.useCallback((function(){_(n,{type:"close"})}),[n]);return i.useMemo((function(){return{opened:t,open:r,close:a}}),[a,r,t])};exports.Modal=function(t){var o=t.id,r=t.children,a=t.dismissable,i=void 0===a||a,c=t.maxFullScreen,d=void 0!==c&&c,s=t.padding,u=t.onClickOverlayHandler,p=t.width,m=t.initialTop,v=void 0===m?"50%":m,f=t.countryRedirModalWithCoupon,x=void 0!==f&&f,h=t.className,b=j(o),_=b.opened,k=b.close;return e.jsxs(l.Portal,n.__assign({id:o,className:h},{children:[e.jsx(g,n.__assign({opened:_,maxFullScreen:d,padding:s,width:p,initialTop:v,countryRedirModalWithCoupon:x},{children:r}),void 0),e.jsx(y,{"data-testid":"modal-overlay",opened:_,onClick:function(){null==u||u(),i&&k()}},void 0)]}),void 0)},exports.Overlay=y,exports.modalEvent=_,exports.useModal=j,exports.useModalEvent=k;
2
2
  //# sourceMappingURL=Modal.js.map
@@ -1,2 +1,2 @@
1
- "use strict";var n=require("tslib"),i=require("react/jsx-runtime"),e=require("@emotion/styled"),t=require("react"),a=require("../../utils/dateFormatter/dateFormatter.js"),o=require("../atoms/Image/Image.js"),d=require("../icons/index.js"),l=require("../modal/Modal.js"),r=require("../rating/starList/StarList.js");function p(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var c,m,x,s,h,g,f,u,w,b,v,j,_,k,y,z,T,O,I,q,C,F,M,D=p(e),L=D.default.div(c||(c=n.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n\n @media (min-width: 768px) {\n flex-direction: row;\n }\n"],["\n display: flex;\n flex-direction: column;\n\n @media (min-width: 768px) {\n flex-direction: row;\n }\n"]))),S=D.default.div(m||(m=n.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n padding: 20px;\n padding-top: 0;\n"],["\n display: flex;\n flex-direction: column;\n padding: 20px;\n padding-top: 0;\n"]))),H=D.default.div(x||(x=n.__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n"],["\n display: flex;\n justify-content: space-between;\n"]))),A=D.default.div(s||(s=n.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n margin-top: 15px;\n margin-bottom: 5px;\n\n @media (min-width: 768px) {\n margin-top: 10px;\n }\n"],["\n display: flex;\n flex-direction: column;\n margin-top: 15px;\n margin-bottom: 5px;\n\n @media (min-width: 768px) {\n margin-top: 10px;\n }\n"]))),N=D.default.span(h||(h=n.__makeTemplateObject(["\n font-weight: 400;\n font-size: 14px;\n line-height: 22px;\n"],["\n font-weight: 400;\n font-size: 14px;\n line-height: 22px;\n"]))),Y=D.default.h1(g||(g=n.__makeTemplateObject(["\n font-weight: 600;\n margin: 0;\n font-size: 18px;\n padding: 20px;\n display: flex;\n"],["\n font-weight: 600;\n margin: 0;\n font-size: 18px;\n padding: 20px;\n display: flex;\n"]))),B=D.default.h1(f||(f=n.__makeTemplateObject(["\n font-weight: 600;\n margin: 0;\n font-size: 18px;\n color: #1cc286;\n margin-left: 6px;\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n"],["\n font-weight: 600;\n margin: 0;\n font-size: 18px;\n color: #1cc286;\n margin-left: 6px;\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n"]))),E=D.default.h2(u||(u=n.__makeTemplateObject(["\n font-size: 18px;\n line-height: 20px;\n font-weight: 600;\n margin: 0;\n"],["\n font-size: 18px;\n line-height: 20px;\n font-weight: 600;\n margin: 0;\n"]))),R=D.default.div(w||(w=n.__makeTemplateObject(["\n font-weight: normal;\n font-size: 16px;\n margin: 0;\n line-height: 25px;\n word-break: break-word;\n margin-top: 5px;\n white-space: pre-wrap;\n"],["\n font-weight: normal;\n font-size: 16px;\n margin: 0;\n line-height: 25px;\n word-break: break-word;\n margin-top: 5px;\n white-space: pre-wrap;\n"]))),U=D.default.div(b||(b=n.__makeTemplateObject(["\n width: 100% !important;\n min-width: 100%;\n height: initial !important;\n min-height: 250px;\n background-size: contain !important;\n margin: 0 !important;\n line-height: 0;\n\n @media (min-width: 768px) {\n width: unset;\n min-width: 50%;\n max-width: 100%;\n background-color: #fff;\n display: inline-block;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n padding: 20px;\n }\n"],["\n width: 100% !important;\n min-width: 100%;\n height: initial !important;\n min-height: 250px;\n background-size: contain !important;\n margin: 0 !important;\n line-height: 0;\n\n @media (min-width: 768px) {\n width: unset;\n min-width: 50%;\n max-width: 100%;\n background-color: #fff;\n display: inline-block;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n padding: 20px;\n }\n"]))),V=D.default(o.Image)(v||(v=n.__makeTemplateObject(["\n width: 100%;\n min-width: 50%;\n max-width: 100%;\n background-color: #fff;\n display: inline-block;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n"],["\n width: 100%;\n min-width: 50%;\n max-width: 100%;\n background-color: #fff;\n display: inline-block;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n"]))),X=D.default.video(j||(j=n.__makeTemplateObject(["\n width: 100%;\n min-width: 50%;\n max-width: 100%;\n background-color: #fff;\n display: inline-block;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n"],["\n width: 100%;\n min-width: 50%;\n max-width: 100%;\n background-color: #fff;\n display: inline-block;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n"]))),G=D.default.div(_||(_=n.__makeTemplateObject(["\n padding: 20px;\n border-top: 1px solid #eee;\n cursor: pointer;\n"],["\n padding: 20px;\n border-top: 1px solid #eee;\n cursor: pointer;\n"]))),J=D.default.div(k||(k=n.__makeTemplateObject(["\n align-items: center;\n margin-top: 10px;\n margin-bottom: 15px;\n font-size: 12px;\n line-height: 16px;\n text-align: center;\n max-width: 192px;\n"],["\n align-items: center;\n margin-top: 10px;\n margin-bottom: 15px;\n font-size: 12px;\n line-height: 16px;\n text-align: center;\n max-width: 192px;\n"]))),K=D.default(o.Image)(y||(y=n.__makeTemplateObject(["\n max-height: 100px;\n height: auto;\n width: auto;\n"],["\n max-height: 100px;\n height: auto;\n width: auto;\n"]))),P=D.default.div(z||(z=n.__makeTemplateObject(["\n display: inline-block;\n padding: 10px;\n border: 1px solid #ececec;\n line-height: 0;\n text-align: center;\n width: 100%;\n box-sizing: border-box !important;\n max-width: 192px;\n"],["\n display: inline-block;\n padding: 10px;\n border: 1px solid #ececec;\n line-height: 0;\n text-align: center;\n width: 100%;\n box-sizing: border-box !important;\n max-width: 192px;\n"]))),Q=D.default.div(T||(T=n.__makeTemplateObject(["\n @media (min-width: 768px) {\n min-width: 40%;\n }\n"],["\n @media (min-width: 768px) {\n min-width: 40%;\n }\n"]))),W=D.default.div(O||(O=n.__makeTemplateObject(["\n display: flex;\n justify-content: end;\n margin-top: 20px;\n"],["\n display: flex;\n justify-content: end;\n margin-top: 20px;\n"]))),Z=D.default.div(I||(I=n.__makeTemplateObject(["\n display: flex;\n cursor: pointer;\n"],["\n display: flex;\n cursor: pointer;\n"]))),$=D.default.div(q||(q=n.__makeTemplateObject(["\n display: flex;\n cursor: pointer;\n"],["\n display: flex;\n cursor: pointer;\n"]))),nn=D.default.span(C||(C=n.__makeTemplateObject(["\n font-size: 15px;\n text-align: right;\n margin-right: 15px;\n margin-left: 4px;\n"],["\n font-size: 15px;\n text-align: right;\n margin-right: 15px;\n margin-left: 4px;\n"]))),en=D.default.span(F||(F=n.__makeTemplateObject(["\n font-size: 15px;\n text-align: right;\n margin-left: 4px;\n"],["\n font-size: 15px;\n text-align: right;\n margin-left: 4px;\n"]))),tn=D.default.span(M||(M=n.__makeTemplateObject(["\n cursor: pointer;\n display: inline-block;\n position: absolute;\n background: #fff;\n color: #000;\n box-shadow: none;\n opacity: 0.8;\n top: 0;\n right: 0;\n z-index: 3;\n font-size: 0;\n line-height: 30px;\n text-align: center;\n width: 45px;\n height: 50px;\n font-weight: 400;\n float: right;\n\n &::before {\n content: '';\n position: absolute;\n height: 1px;\n width: 100%;\n top: 50%;\n left: 0;\n margin-top: -1px;\n background: #000;\n transform: rotate(-45deg);\n }\n\n &::after {\n content: '';\n position: absolute;\n height: 1px;\n width: 100%;\n top: 50%;\n left: 0;\n margin-top: -1px;\n background: #000;\n transform: rotate(45deg);\n }\n"],["\n cursor: pointer;\n display: inline-block;\n position: absolute;\n background: #fff;\n color: #000;\n box-shadow: none;\n opacity: 0.8;\n top: 0;\n right: 0;\n z-index: 3;\n font-size: 0;\n line-height: 30px;\n text-align: center;\n width: 45px;\n height: 50px;\n font-weight: 400;\n float: right;\n\n &::before {\n content: '';\n position: absolute;\n height: 1px;\n width: 100%;\n top: 50%;\n left: 0;\n margin-top: -1px;\n background: #000;\n transform: rotate(-45deg);\n }\n\n &::after {\n content: '';\n position: absolute;\n height: 1px;\n width: 100%;\n top: 50%;\n left: 0;\n margin-top: -1px;\n background: #000;\n transform: rotate(45deg);\n }\n"])));module.exports=function(e){var o=e.reviewId,p=e.reviewerName,c=e.date,m=e.rating,x=e.stars,s=e.title,h=e.description,g=e.image,f=e.modalId,u=e.maxFullScreen,w=void 0!==u&&u,b=e.verified,v=e.productImage,j=e.productTitle,_=e.productLink,k=e.helpfulCount,y=void 0===k?0:k,z=e.helpfulAction,T=e.notHelpfulCount,O=void 0===T?0:T,I=e.notHelpfulAction,q=e.dateFormat,C=void 0===q?a.DateFormat.DDMMYY:q,F=null==g?void 0:g.src.includes("/video"),M=t.useRef(null),D=l.useModal(f),an=D.opened,on=D.close;return t.useEffect((function(){M.current&&(an?M.current.play():M.current.pause())}),[an]),i.jsx(l.Modal,n.__assign({id:f,maxFullScreen:w,padding:"0"},{children:i.jsxs(L,{children:[i.jsx(tn,n.__assign({onClick:on},{children:"X"}),void 0),i.jsx(U,{children:g&&(F?i.jsx(X,{ref:M,src:g.src,width:"100%",controls:!0},void 0):i.jsx(V,{src:g.src,alt:g.alt},void 0))},void 0),i.jsxs(Q,{children:[an&&i.jsxs(Y,{children:[p,b&&i.jsx(B,{children:"Verified Buyer"},void 0)]},void 0),i.jsxs(S,n.__assign({"data-testid":"review-detail-content"},{children:[i.jsxs(H,{children:[i.jsx(r.StarList,{starsNumber:5,rating:m,fill:x.color,size:x.size},void 0),i.jsx(N,{children:a.formatDate(c,C)},void 0)]},void 0),i.jsxs(A,{children:[i.jsx(E,{children:s},void 0),i.jsx(R,{dangerouslySetInnerHTML:{__html:h}},void 0)]},void 0),i.jsxs(W,{children:[i.jsxs(Z,n.__assign({"data-testid":"helpful-action",onClick:function(){return z?z(o):void 0}},{children:[i.jsx(d.Icon.Custom.ThumbsUp,{width:1,height:1,fill:"#000"},void 0),i.jsx(nn,{children:y},void 0)]}),void 0),i.jsxs($,n.__assign({"data-testid":"not-helpful-action",onClick:function(){return I?I(o):void 0}},{children:[i.jsx(d.Icon.Custom.ThumbsDown,{width:1,height:1,fill:"#000"},void 0),i.jsx(en,{children:O},void 0)]}),void 0)]},void 0)]}),void 0),v&&_&&i.jsxs(G,n.__assign({onClick:function(){return window.location.href=_}},{children:[i.jsx(P,{children:i.jsx(K,{src:v,alt:"productImage"},void 0)},void 0),i.jsx(J,{children:j},void 0)]}),void 0)]},void 0)]},void 0)}),void 0)};
1
+ "use strict";var n=require("tslib"),i=require("react/jsx-runtime"),e=require("@emotion/styled"),t=require("react"),a=require("../../utils/dateFormatter/dateFormatter.js"),o=require("../atoms/Image/Image.js"),d=require("../icons/index.js"),l=require("../modal/Modal.js"),r=require("../rating/starList/StarList.js");function p(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var c,h,x,m,s,g,f,u,w,b,v,j,_,k,y,z,T,O,I,q,C,F,M,D=p(e),L=D.default.div(c||(c=n.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n\n @media (min-width: 768px) {\n flex-direction: row;\n }\n"],["\n display: flex;\n flex-direction: column;\n\n @media (min-width: 768px) {\n flex-direction: row;\n }\n"]))),S=D.default.div(h||(h=n.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n padding: 20px;\n padding-top: 0;\n"],["\n display: flex;\n flex-direction: column;\n padding: 20px;\n padding-top: 0;\n"]))),H=D.default.div(x||(x=n.__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n"],["\n display: flex;\n justify-content: space-between;\n"]))),A=D.default.div(m||(m=n.__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n margin-top: 15px;\n margin-bottom: 5px;\n\n @media (min-width: 768px) {\n margin-top: 10px;\n }\n"],["\n display: flex;\n flex-direction: column;\n margin-top: 15px;\n margin-bottom: 5px;\n\n @media (min-width: 768px) {\n margin-top: 10px;\n }\n"]))),N=D.default.span(s||(s=n.__makeTemplateObject(["\n font-weight: 400;\n font-size: 14px;\n line-height: 22px;\n"],["\n font-weight: 400;\n font-size: 14px;\n line-height: 22px;\n"]))),Y=D.default.h1(g||(g=n.__makeTemplateObject(["\n font-weight: 600;\n margin: 0;\n font-size: 18px;\n padding: 20px;\n display: flex;\n"],["\n font-weight: 600;\n margin: 0;\n font-size: 18px;\n padding: 20px;\n display: flex;\n"]))),B=D.default.h1(f||(f=n.__makeTemplateObject(["\n font-weight: 600;\n margin: 0;\n font-size: 18px;\n color: #1cc286;\n margin-left: 6px;\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n"],["\n font-weight: 600;\n margin: 0;\n font-size: 18px;\n color: #1cc286;\n margin-left: 6px;\n\n @media (min-width: 768px) {\n font-size: 18px;\n }\n"]))),E=D.default.h2(u||(u=n.__makeTemplateObject(["\n font-size: 18px;\n line-height: 20px;\n font-weight: 600;\n margin: 0;\n"],["\n font-size: 18px;\n line-height: 20px;\n font-weight: 600;\n margin: 0;\n"]))),R=D.default.div(w||(w=n.__makeTemplateObject(["\n font-weight: normal;\n font-size: 16px;\n margin: 0;\n line-height: 25px;\n word-break: break-word;\n margin-top: 5px;\n white-space: pre-wrap;\n"],["\n font-weight: normal;\n font-size: 16px;\n margin: 0;\n line-height: 25px;\n word-break: break-word;\n margin-top: 5px;\n white-space: pre-wrap;\n"]))),U=D.default.div(b||(b=n.__makeTemplateObject(["\n width: 100% !important;\n min-width: 100%;\n height: initial !important;\n min-height: 250px;\n background-size: contain !important;\n margin: 0 !important;\n line-height: 0;\n\n @media (min-width: 768px) {\n width: unset;\n min-width: 50%;\n max-width: 100%;\n background-color: #fff;\n display: inline-block;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n max-height: calc(100dvh - 100px);\n padding: 20px;\n }\n"],["\n width: 100% !important;\n min-width: 100%;\n height: initial !important;\n min-height: 250px;\n background-size: contain !important;\n margin: 0 !important;\n line-height: 0;\n\n @media (min-width: 768px) {\n width: unset;\n min-width: 50%;\n max-width: 100%;\n background-color: #fff;\n display: inline-block;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n max-height: calc(100dvh - 100px);\n padding: 20px;\n }\n"]))),V=D.default(o.Image)(v||(v=n.__makeTemplateObject(["\n width: 100%;\n min-width: 50%;\n max-width: 100%;\n background-color: #fff;\n display: inline-block;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n max-height: calc(100dvh - 100px);\n"],["\n width: 100%;\n min-width: 50%;\n max-width: 100%;\n background-color: #fff;\n display: inline-block;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n max-height: calc(100dvh - 100px);\n"]))),X=D.default.video(j||(j=n.__makeTemplateObject(["\n width: 100%;\n min-width: 50%;\n max-width: 100%;\n background-color: #fff;\n display: inline-block;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n max-height: calc(100dvh - 100px);\n"],["\n width: 100%;\n min-width: 50%;\n max-width: 100%;\n background-color: #fff;\n display: inline-block;\n vertical-align: middle;\n max-height: calc(100vh - 100px);\n max-height: calc(100dvh - 100px);\n"]))),G=D.default.div(_||(_=n.__makeTemplateObject(["\n padding: 20px;\n border-top: 1px solid #eee;\n cursor: pointer;\n"],["\n padding: 20px;\n border-top: 1px solid #eee;\n cursor: pointer;\n"]))),J=D.default.div(k||(k=n.__makeTemplateObject(["\n align-items: center;\n margin-top: 10px;\n margin-bottom: 15px;\n font-size: 12px;\n line-height: 16px;\n text-align: center;\n max-width: 192px;\n"],["\n align-items: center;\n margin-top: 10px;\n margin-bottom: 15px;\n font-size: 12px;\n line-height: 16px;\n text-align: center;\n max-width: 192px;\n"]))),K=D.default(o.Image)(y||(y=n.__makeTemplateObject(["\n max-height: 100px;\n height: auto;\n width: auto;\n"],["\n max-height: 100px;\n height: auto;\n width: auto;\n"]))),P=D.default.div(z||(z=n.__makeTemplateObject(["\n display: inline-block;\n padding: 10px;\n border: 1px solid #ececec;\n line-height: 0;\n text-align: center;\n width: 100%;\n box-sizing: border-box !important;\n max-width: 192px;\n"],["\n display: inline-block;\n padding: 10px;\n border: 1px solid #ececec;\n line-height: 0;\n text-align: center;\n width: 100%;\n box-sizing: border-box !important;\n max-width: 192px;\n"]))),Q=D.default.div(T||(T=n.__makeTemplateObject(["\n @media (min-width: 768px) {\n min-width: 40%;\n }\n"],["\n @media (min-width: 768px) {\n min-width: 40%;\n }\n"]))),W=D.default.div(O||(O=n.__makeTemplateObject(["\n display: flex;\n justify-content: end;\n margin-top: 20px;\n"],["\n display: flex;\n justify-content: end;\n margin-top: 20px;\n"]))),Z=D.default.div(I||(I=n.__makeTemplateObject(["\n display: flex;\n cursor: pointer;\n"],["\n display: flex;\n cursor: pointer;\n"]))),$=D.default.div(q||(q=n.__makeTemplateObject(["\n display: flex;\n cursor: pointer;\n"],["\n display: flex;\n cursor: pointer;\n"]))),nn=D.default.span(C||(C=n.__makeTemplateObject(["\n font-size: 15px;\n text-align: right;\n margin-right: 15px;\n margin-left: 4px;\n"],["\n font-size: 15px;\n text-align: right;\n margin-right: 15px;\n margin-left: 4px;\n"]))),en=D.default.span(F||(F=n.__makeTemplateObject(["\n font-size: 15px;\n text-align: right;\n margin-left: 4px;\n"],["\n font-size: 15px;\n text-align: right;\n margin-left: 4px;\n"]))),tn=D.default.span(M||(M=n.__makeTemplateObject(["\n cursor: pointer;\n display: inline-block;\n position: absolute;\n background: #fff;\n color: #000;\n box-shadow: none;\n opacity: 0.8;\n top: 0;\n right: 0;\n z-index: 3;\n font-size: 0;\n line-height: 30px;\n text-align: center;\n width: 45px;\n height: 50px;\n font-weight: 400;\n float: right;\n\n &::before {\n content: '';\n position: absolute;\n height: 1px;\n width: 100%;\n top: 50%;\n left: 0;\n margin-top: -1px;\n background: #000;\n transform: rotate(-45deg);\n }\n\n &::after {\n content: '';\n position: absolute;\n height: 1px;\n width: 100%;\n top: 50%;\n left: 0;\n margin-top: -1px;\n background: #000;\n transform: rotate(45deg);\n }\n"],["\n cursor: pointer;\n display: inline-block;\n position: absolute;\n background: #fff;\n color: #000;\n box-shadow: none;\n opacity: 0.8;\n top: 0;\n right: 0;\n z-index: 3;\n font-size: 0;\n line-height: 30px;\n text-align: center;\n width: 45px;\n height: 50px;\n font-weight: 400;\n float: right;\n\n &::before {\n content: '';\n position: absolute;\n height: 1px;\n width: 100%;\n top: 50%;\n left: 0;\n margin-top: -1px;\n background: #000;\n transform: rotate(-45deg);\n }\n\n &::after {\n content: '';\n position: absolute;\n height: 1px;\n width: 100%;\n top: 50%;\n left: 0;\n margin-top: -1px;\n background: #000;\n transform: rotate(45deg);\n }\n"])));module.exports=function(e){var o=e.reviewId,p=e.reviewerName,c=e.date,h=e.rating,x=e.stars,m=e.title,s=e.description,g=e.image,f=e.modalId,u=e.maxFullScreen,w=void 0!==u&&u,b=e.verified,v=e.productImage,j=e.productTitle,_=e.productLink,k=e.helpfulCount,y=void 0===k?0:k,z=e.helpfulAction,T=e.notHelpfulCount,O=void 0===T?0:T,I=e.notHelpfulAction,q=e.dateFormat,C=void 0===q?a.DateFormat.DDMMYY:q,F=null==g?void 0:g.src.includes("/video"),M=t.useRef(null),D=l.useModal(f),an=D.opened,on=D.close;return t.useEffect((function(){M.current&&(an?M.current.play():M.current.pause())}),[an]),i.jsx(l.Modal,n.__assign({id:f,maxFullScreen:w,padding:"0"},{children:i.jsxs(L,{children:[i.jsx(tn,n.__assign({onClick:on},{children:"X"}),void 0),i.jsx(U,{children:g&&(F?i.jsx(X,{ref:M,src:g.src,width:"100%",controls:!0},void 0):i.jsx(V,{src:g.src,alt:g.alt},void 0))},void 0),i.jsxs(Q,{children:[an&&i.jsxs(Y,{children:[p,b&&i.jsx(B,{children:"Verified Buyer"},void 0)]},void 0),i.jsxs(S,n.__assign({"data-testid":"review-detail-content"},{children:[i.jsxs(H,{children:[i.jsx(r.StarList,{starsNumber:5,rating:h,fill:x.color,size:x.size},void 0),i.jsx(N,{children:a.formatDate(c,C)},void 0)]},void 0),i.jsxs(A,{children:[i.jsx(E,{children:m},void 0),i.jsx(R,{dangerouslySetInnerHTML:{__html:s}},void 0)]},void 0),i.jsxs(W,{children:[i.jsxs(Z,n.__assign({"data-testid":"helpful-action",onClick:function(){return z?z(o):void 0}},{children:[i.jsx(d.Icon.Custom.ThumbsUp,{width:1,height:1,fill:"#000"},void 0),i.jsx(nn,{children:y},void 0)]}),void 0),i.jsxs($,n.__assign({"data-testid":"not-helpful-action",onClick:function(){return I?I(o):void 0}},{children:[i.jsx(d.Icon.Custom.ThumbsDown,{width:1,height:1,fill:"#000"},void 0),i.jsx(en,{children:O},void 0)]}),void 0)]},void 0)]}),void 0),v&&_&&i.jsxs(G,n.__assign({onClick:function(){return window.location.href=_}},{children:[i.jsx(P,{children:i.jsx(K,{src:v,alt:"productImage"},void 0)},void 0),i.jsx(J,{children:j},void 0)]}),void 0)]},void 0)]},void 0)}),void 0)};
2
2
  //# sourceMappingURL=ReviewDetail.js.map
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Trafilea's Design System",
4
4
  "author": "Trafilea",
5
5
  "repository": "https://github.com/trafilea/afrodita-components",
6
- "version": "7.26.3",
6
+ "version": "7.26.4",
7
7
  "private": false,
8
8
  "main": "build/lib/index.js",
9
9
  "style": "build/es/index.css",