@bikdotai/bik-component-library 0.0.721-beta.8 → 0.0.721-beta.9

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.
@@ -36,7 +36,7 @@ export declare class MetaCustomProcessor {
36
36
  value: {
37
37
  operator: string;
38
38
  dataType: import("../types").QueryBuilderConnectorType;
39
- value?: string | number | string[] | number[] | Date | Date[] | undefined;
39
+ value?: string | number | string[] | Date | number[] | Date[] | undefined;
40
40
  };
41
41
  key: string;
42
42
  refresh?: boolean | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const Menus: ({
3
2
  displayName: string;
4
3
  key: number;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/react/jsx-runtime.js"),t=require("react");const n=e=>{if(!e)return"";const t=document.createElement("textarea");return t.innerHTML=e,t.value};exports.default=r=>{let{feature:o,currentIndex:s,totalFeatures:i,onSkip:l,onExplore:a,onPrevious:c,onNext:u,setIsClosing:p}=r;const[x,d]=t.useState(!1),[g,f]=t.useState(!1),[h,y]=t.useState(""),j=t.useRef(null);t.useEffect((()=>{if(x){const e=setTimeout((()=>{f(!0)}),150);return()=>clearTimeout(e)}}),[x]);const b=e=>{if(j.current){const e=j.current.closest('[class*="react-joyride__tooltip"]');if(e){const t=e.querySelector('[class*="react-joyride__arrow"]');t&&(t.style.display="none",t.style.visibility="hidden",t.style.opacity="0")}}let t=null;if(t=document.querySelector('[data-testid="whats-new-button"]'),t||(t=document.querySelector(".main-icon-class")),!t){const e=document.querySelector('svg[viewBox="0 0 32 32"]');if(e){e.querySelector('clipPath[id*="clip"]')&&(t=e.closest('[data-testid="whats-new-button"]')||e.parentElement)}}if(console.log("What's New button found:",!!t,t),t&&j.current){const e=j.current.getBoundingClientRect(),n=t.getBoundingClientRect();console.log("Popup rect:",e),console.log("Target rect:",n);const r=n.left+n.width/2-(e.left+e.width/2),o=n.top+n.height/2-(e.top+e.height/2);console.log("Translation:",{translateX:r,translateY:o}),y(`translate(${r}px, ${o}px) scale(0)`)}else y("scale(0)");null==p||p(!0),d(!0),setTimeout((()=>{e()}),1150)};return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs("div",Object.assign({ref:j,style:{width:"959px",height:"274px",display:"flex",backgroundColor:"#212121",borderRadius:"4px",overflow:"hidden",position:"relative",transform:g?h:"scale(1)",opacity:g?0:1,transition:"transform 1s cubic-bezier(0.4, 0, 0.2, 1), opacity 1s cubic-bezier(0.4, 0, 0.2, 1)"}},{children:[e.jsxRuntimeExports.jsx("button",Object.assign({onClick:e=>{e.preventDefault(),e.stopPropagation(),b(l)},style:{position:"absolute",top:"10px",right:"10px",background:"transparent",border:"none",color:"#BDBDBD",fontSize:"14px",fontWeight:"500",cursor:"pointer",zIndex:10,transition:"all 0.2s"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#f3f4f6",e.currentTarget.style.color="#374151"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent",e.currentTarget.style.color="#6b7280"}},{children:"Skip"})),e.jsxRuntimeExports.jsx("div",Object.assign({style:{backgroundColor:"#212121",width:"480px",height:"274px",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",padding:"8px"}},{children:o.displayImage?e.jsxRuntimeExports.jsx("img",{src:o.displayImage,alt:o.title,style:{width:"464px",height:"258px",objectFit:"cover"},onError:e=>{o.image&&(e.target.src=o.image)}}):e.jsxRuntimeExports.jsx("div",Object.assign({style:{color:"#9ca3af",fontSize:"14px",textAlign:"center",width:"290px",height:"258px",display:"flex",alignItems:"center",justifyContent:"center"}},{children:"Feature Preview"}))})),e.jsxRuntimeExports.jsxs("div",Object.assign({style:{flex:1,display:"flex",margin:"0 8px 0 0",flexDirection:"column",justifyContent:"space-between",background:"transparent"}},{children:[e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx("h3",Object.assign({style:{fontSize:"16px",fontWeight:"600",padding:"36px 0 0 0",color:"#fff",lineHeight:"1.25",textAlign:"left"}},{children:o.title})),e.jsxRuntimeExports.jsx("div",{style:{fontSize:"14px",lineHeight:"1.5",color:"rgba(255, 255, 255, 0.8)",textAlign:"left"},dangerouslySetInnerHTML:{__html:n(o.content||o.body||"")}}),e.jsxRuntimeExports.jsx("div",{children:e.jsxRuntimeExports.jsx("button",Object.assign({onClick:()=>{b(a)},style:{backgroundColor:"transparent",border:"1px solid #FEC02D",color:"#FEC02D",borderRadius:"4px",fontSize:"14px",fontWeight:"500",cursor:"pointer",width:"154px",height:"32px",transition:"all 0.2s",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",marginTop:"16px"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="rgba(254, 192, 45, 0.1)"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent"}},{children:o.buttonText||"Explore the feature"}))})]}),i>1&&e.jsxRuntimeExports.jsxs("div",Object.assign({style:{position:"absolute",bottom:"16px",right:"16px",display:"flex",gap:"8px",alignItems:"center"}},{children:[e.jsxRuntimeExports.jsx("button",Object.assign({onClick:e=>{e.preventDefault(),e.stopPropagation(),b(c)},disabled:0===s,style:{width:"24px",height:"24px",backgroundColor:"transparent",border:"none",color:0===s?"#666":"#fff",fontSize:"20px",cursor:0===s?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s"},onMouseEnter:e=>{0!==s&&(e.currentTarget.style.color="#FEC02D")},onMouseLeave:e=>{0!==s&&(e.currentTarget.style.color="#fff")}},{children:"‹"})),e.jsxRuntimeExports.jsx("button",Object.assign({onClick:e=>{e.preventDefault(),e.stopPropagation(),b(u)},disabled:s===i-1,style:{width:"24px",height:"24px",backgroundColor:"transparent",border:"none",color:s===i-1?"#666":"#fff",fontSize:"20px",cursor:s===i-1?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s"},onMouseEnter:e=>{s!==i-1&&(e.currentTarget.style.color="#FEC02D")},onMouseLeave:e=>{s!==i-1&&(e.currentTarget.style.color="#fff")}},{children:"›"}))]}))]}))]}))})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/react/jsx-runtime.js"),t=require("react");const n=e=>{if(!e)return"";const t=document.createElement("textarea");return t.innerHTML=e,t.value};exports.default=r=>{let{feature:o,currentIndex:s,totalFeatures:i,onSkip:l,onExplore:a,onPrevious:c,onNext:u,setIsClosing:p}=r;const[x,d]=t.useState(!1),[g,f]=t.useState(!1),[h,y]=t.useState(""),j=t.useRef(null);t.useEffect((()=>{x&&f(!0)}),[x]);const b=e=>{if(j.current){const e=j.current.closest('[class*="react-joyride__tooltip"]');if(e){const t=e.querySelector('[class*="react-joyride__arrow"]');t&&(t.style.display="none",t.style.visibility="hidden",t.style.opacity="0")}}let t=null;if(t=document.querySelector('[data-testid="whats-new-button"]'),t||(t=document.querySelector(".main-icon-class")),!t){const e=document.querySelector('svg[viewBox="0 0 32 32"]');if(e){e.querySelector('clipPath[id*="clip"]')&&(t=e.closest('[data-testid="whats-new-button"]')||e.parentElement)}}if(console.log("What's New button found:",!!t,t),t&&j.current){const e=j.current.getBoundingClientRect(),n=t.getBoundingClientRect();console.log("Popup rect:",e),console.log("Target rect:",n);const r=n.left+n.width/2-(e.left+e.width/2),o=n.top+n.height/2-(e.top+e.height/2);console.log("Translation:",{translateX:r,translateY:o}),y(`translate(${r}px, ${o}px) scale(0)`)}else y("scale(0)");null==p||p(!0),d(!0),setTimeout((()=>{e()}),1150)};return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs("div",Object.assign({ref:j,style:{width:"959px",height:"274px",display:"flex",backgroundColor:"#212121",borderRadius:"4px",overflow:"hidden",position:"relative",transform:g?h:"scale(1)",opacity:g?0:1,transition:"transform 1s cubic-bezier(0.4, 0, 0.2, 1), opacity 1s cubic-bezier(0.4, 0, 0.2, 1)"}},{children:[e.jsxRuntimeExports.jsx("button",Object.assign({onClick:e=>{e.preventDefault(),e.stopPropagation(),b(l)},style:{position:"absolute",top:"10px",right:"10px",background:"transparent",border:"none",color:"#BDBDBD",fontSize:"14px",fontWeight:"500",cursor:"pointer",zIndex:10,transition:"all 0.2s"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#f3f4f6",e.currentTarget.style.color="#374151"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent",e.currentTarget.style.color="#6b7280"}},{children:"Skip"})),e.jsxRuntimeExports.jsx("div",Object.assign({style:{backgroundColor:"#212121",width:"480px",height:"274px",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",padding:"8px"}},{children:o.displayImage?e.jsxRuntimeExports.jsx("img",{src:o.displayImage,alt:o.title,style:{width:"464px",height:"258px",objectFit:"cover"},onError:e=>{o.image&&(e.target.src=o.image)}}):e.jsxRuntimeExports.jsx("div",Object.assign({style:{color:"#9ca3af",fontSize:"14px",textAlign:"center",width:"290px",height:"258px",display:"flex",alignItems:"center",justifyContent:"center"}},{children:"Feature Preview"}))})),e.jsxRuntimeExports.jsxs("div",Object.assign({style:{flex:1,display:"flex",margin:"0 8px 0 0",flexDirection:"column",justifyContent:"space-between",background:"transparent"}},{children:[e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx("h3",Object.assign({style:{fontSize:"16px",fontWeight:"600",padding:"36px 0 0 0",color:"#fff",lineHeight:"1.25",textAlign:"left"}},{children:o.title})),e.jsxRuntimeExports.jsx("div",{style:{fontSize:"14px",lineHeight:"1.5",color:"rgba(255, 255, 255, 0.8)",textAlign:"left"},dangerouslySetInnerHTML:{__html:n(o.content||o.body||"")}}),e.jsxRuntimeExports.jsx("div",{children:e.jsxRuntimeExports.jsx("button",Object.assign({onClick:()=>{b(a)},style:{backgroundColor:"transparent",border:"1px solid #FEC02D",color:"#FEC02D",borderRadius:"4px",fontSize:"14px",fontWeight:"600",cursor:"pointer",width:"154px",height:"32px",transition:"all 0.2s",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",marginTop:"16px"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="rgba(254, 192, 45, 0.1)"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent"}},{children:o.buttonText||"Explore the feature"}))})]}),i>1&&e.jsxRuntimeExports.jsxs("div",Object.assign({style:{position:"absolute",bottom:"16px",right:"16px",display:"flex",gap:"8px",alignItems:"center"}},{children:[e.jsxRuntimeExports.jsx("button",Object.assign({onClick:e=>{e.preventDefault(),e.stopPropagation(),b(c)},disabled:0===s,style:{width:"24px",height:"24px",backgroundColor:"transparent",border:"none",color:0===s?"#666":"#fff",fontSize:"20px",cursor:0===s?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s"},onMouseEnter:e=>{0!==s&&(e.currentTarget.style.color="#FEC02D")},onMouseLeave:e=>{0!==s&&(e.currentTarget.style.color="#fff")}},{children:"‹"})),e.jsxRuntimeExports.jsx("button",Object.assign({onClick:e=>{e.preventDefault(),e.stopPropagation(),b(u)},disabled:s===i-1,style:{width:"24px",height:"24px",backgroundColor:"transparent",border:"none",color:s===i-1?"#666":"#fff",fontSize:"20px",cursor:s===i-1?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s"},onMouseEnter:e=>{s!==i-1&&(e.currentTarget.style.color="#FEC02D")},onMouseLeave:e=>{s!==i-1&&(e.currentTarget.style.color="#fff")}},{children:"›"}))]}))]}))]}))})};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/react/jsx-runtime.js"),t=require("react");const i=e=>{if(!e)return"";const t=document.createElement("textarea");return t.innerHTML=e,t.value};exports.default=s=>{let{feature:r,currentIndex:n,totalFeatures:o,onSkip:l,onExplore:a,onPrevious:x,onNext:c,setIsClosing:p}=s;const[d,u]=t.useState(!1),[f,g]=t.useState(!1),[h,j]=t.useState(""),b=t.useRef(null);t.useEffect((()=>{if(d){const e=setTimeout((()=>{g(!0)}),150);return()=>clearTimeout(e)}}),[d]);const m=e=>{if(b.current){const e=b.current.closest('[class*="react-joyride__tooltip"]');if(e){const t=e.querySelector('[class*="react-joyride__arrow"]');t&&(t.style.display="none",t.style.visibility="hidden",t.style.opacity="0")}}if(b.current&&r.featureTag){const e=r.featureTag.startsWith("#")||r.featureTag.startsWith(".")||r.featureTag.startsWith("[")?r.featureTag:`#${r.featureTag}`,t=document.querySelector(e);if(t){const e=b.current.getBoundingClientRect(),i=t.getBoundingClientRect(),s=i.left+i.width/2-(e.left+e.width/2),r=i.top+i.height/2-(e.top+e.height/2);j(`translate(${s}px, ${r}px) scale(0)`)}else j("scale(0)")}else j("scale(0)");null==p||p(!0),u(!0),setTimeout((()=>{e()}),1150)};return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs("div",Object.assign({ref:b,style:{width:"519px",height:"160px",display:"flex",backgroundColor:"#ffffff",borderRadius:"4px",overflow:"hidden",position:"relative",boxShadow:"0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04)",transform:f?h:"scale(1)",opacity:f?0:1,transition:"transform 1s cubic-bezier(0.4, 0, 0.2, 1), opacity 1s cubic-bezier(0.4, 0, 0.2, 1)"}},{children:[e.jsxRuntimeExports.jsx("div",Object.assign({style:{backgroundColor:"#f9fafb",borderRadius:"4px",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",margin:"13px 10px 13px 10px",width:"235px",minWidth:"235px",maxWidth:"235px",height:"134px"}},{children:r.displayImage?e.jsxRuntimeExports.jsxs("div",Object.assign({style:{position:"relative",width:"235px",height:"134px"}},{children:[e.jsxRuntimeExports.jsx("img",{src:r.displayImage,alt:r.title,style:{width:"235px",height:"134px",objectFit:"cover",borderRadius:"4px",display:"block"},onError:e=>{r.image&&(e.target.src=r.image)}}),e.jsxRuntimeExports.jsx("div",Object.assign({style:{position:"absolute",top:"0px",left:"0px",right:"0px",height:"27px",backgroundColor:"rgba(0, 0, 0, 0.26)",borderRadius:"4px 4px 4px 4px",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10}},{children:e.jsxRuntimeExports.jsx("span",Object.assign({style:{color:"#ffffff",fontWeight:"400",fontSize:"14px"}},{children:"New feature"}))}))]})):e.jsxRuntimeExports.jsx("div",Object.assign({style:{color:"#9ca3af",fontSize:"14px",textAlign:"center",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#f3f4f6",borderRadius:"4px"}},{children:"Feature Preview"}))})),e.jsxRuntimeExports.jsxs("div",Object.assign({style:{flex:1,display:"flex",margin:"13px 13px 13px 3px",flexDirection:"column",justifyContent:"space-between",background:"transparent"}},{children:[e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx("h3",Object.assign({style:{fontSize:"16px",fontWeight:"600",padding:"0 0 0 0",color:"#212121",lineHeight:"1.25",textAlign:"left"}},{children:r.title})),e.jsxRuntimeExports.jsx("div",{style:{fontSize:"12px",fontWeight:"400",lineHeight:"1.2",color:"#616161",textAlign:"left",maxHeight:"48px",overflow:"hidden",display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical"},dangerouslySetInnerHTML:{__html:i(r.content||r.body||"")}})]}),e.jsxRuntimeExports.jsxs("div",Object.assign({style:{position:"absolute",bottom:"13px",right:"10px",display:"flex",gap:"16px",alignItems:"center"}},{children:[e.jsxRuntimeExports.jsx("span",Object.assign({onClick:()=>m(l),style:{color:"#4B1583",fontSize:"14px",fontWeight:"500",cursor:"pointer",transition:"all 0.2s"}},{children:"Understood"})),r.productVideo&&e.jsxRuntimeExports.jsx("button",Object.assign({onClick:()=>{m(a)},style:{backgroundColor:"#4B1583",border:"none",color:"#ffffff",borderRadius:"4px",fontSize:"14px",fontWeight:"500",cursor:"pointer",width:"154px",height:"32px",transition:"all 0.2s",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},{children:r.buttonText||"Explore the feature"}))]}))]}))]}))})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/react/jsx-runtime.js"),t=require("react");const i=e=>{if(!e)return"";const t=document.createElement("textarea");return t.innerHTML=e,t.value};exports.default=s=>{let{feature:r,currentIndex:n,totalFeatures:o,onSkip:l,onExplore:a,onPrevious:x,onNext:p,setIsClosing:c}=s;const[d,u]=t.useState(!1),[f,g]=t.useState(!1),[h,j]=t.useState(""),b=t.useRef(null);t.useEffect((()=>{d&&g(!0)}),[d]);const m=e=>{if(b.current){const e=b.current.closest('[class*="react-joyride__tooltip"]');if(e){const t=e.querySelector('[class*="react-joyride__arrow"]');t&&(t.style.display="none",t.style.visibility="hidden",t.style.opacity="0")}}if(b.current&&r.featureTag){const e=r.featureTag.startsWith("#")||r.featureTag.startsWith(".")||r.featureTag.startsWith("[")?r.featureTag:`#${r.featureTag}`,t=document.querySelector(e);if(t){const e=b.current.getBoundingClientRect(),i=t.getBoundingClientRect(),s=i.left+i.width/2-(e.left+e.width/2),r=i.top+i.height/2-(e.top+e.height/2);j(`translate(${s}px, ${r}px) scale(0)`)}else j("scale(0)")}else j("scale(0)");null==c||c(!0),u(!0),setTimeout((()=>{e()}),1150)};return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsxs("div",Object.assign({ref:b,style:{width:"519px",height:"160px",display:"flex",backgroundColor:"#ffffff",borderRadius:"4px",overflow:"hidden",position:"relative",boxShadow:"0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04)",transform:f?h:"scale(1)",opacity:f?0:1,transition:"transform 1s cubic-bezier(0.4, 0, 0.2, 1), opacity 1s cubic-bezier(0.4, 0, 0.2, 1)"}},{children:[e.jsxRuntimeExports.jsx("div",Object.assign({style:{backgroundColor:"#f9fafb",borderRadius:"4px",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",margin:"13px 10px 13px 10px",width:"235px",minWidth:"235px",maxWidth:"235px",height:"134px"}},{children:r.displayImage?e.jsxRuntimeExports.jsxs("div",Object.assign({style:{position:"relative",width:"235px",height:"134px"}},{children:[e.jsxRuntimeExports.jsx("img",{src:r.displayImage,alt:r.title,style:{width:"235px",height:"134px",objectFit:"cover",borderRadius:"4px",display:"block"},onError:e=>{r.image&&(e.target.src=r.image)}}),e.jsxRuntimeExports.jsx("div",Object.assign({style:{position:"absolute",top:"0px",left:"0px",right:"0px",height:"27px",backgroundColor:"rgba(0, 0, 0, 0.26)",borderRadius:"4px 4px 4px 4px",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10}},{children:e.jsxRuntimeExports.jsx("span",Object.assign({style:{color:"#ffffff",fontWeight:"600",fontSize:"14px"}},{children:"New feature"}))}))]})):e.jsxRuntimeExports.jsx("div",Object.assign({style:{color:"#9ca3af",fontSize:"14px",textAlign:"center",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#f3f4f6",borderRadius:"4px"}},{children:"Feature Preview"}))})),e.jsxRuntimeExports.jsxs("div",Object.assign({style:{flex:1,display:"flex",margin:"13px 13px 13px 3px",flexDirection:"column",justifyContent:"space-between",background:"transparent"}},{children:[e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx("h3",Object.assign({style:{fontSize:"16px",fontWeight:"600",padding:"0 0 0 0",color:"#212121",lineHeight:"1.25",textAlign:"left"}},{children:r.title})),e.jsxRuntimeExports.jsx("div",{style:{fontSize:"12px",fontWeight:"400",lineHeight:"1.2",color:"#616161",textAlign:"left",maxHeight:"48px",overflow:"hidden",display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical"},dangerouslySetInnerHTML:{__html:i(r.content||r.body||"")}})]}),e.jsxRuntimeExports.jsxs("div",Object.assign({style:{position:"absolute",bottom:"13px",right:"10px",display:"flex",gap:"16px",alignItems:"center"}},{children:[e.jsxRuntimeExports.jsx("span",Object.assign({onClick:()=>m(l),style:{color:"#4B1583",fontSize:"14px",fontWeight:"500",cursor:"pointer",transition:"all 0.2s"}},{children:"Understood"})),r.productVideo&&e.jsxRuntimeExports.jsx("button",Object.assign({onClick:()=>{m(a)},style:{backgroundColor:"#4B1583",border:"none",color:"#ffffff",borderRadius:"4px",fontSize:"14px",fontWeight:"600",cursor:"pointer",width:"154px",height:"32px",transition:"all 0.2s",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},{children:r.buttonText||"Explore the feature"}))]}))]}))]}))})};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("date-fns"),a=require("react");exports.useWhatsNew=o=>{let{fetchWhatsNewContent:r,markContentAsViewed:n,module:i,newContentThresholdDays:s=7}=o;const[d,c]=a.useState([]),[l,u]=a.useState(!0),w=a.useCallback((()=>e.__awaiter(void 0,void 0,void 0,(function*(){u(!0);try{const[e,t]=yield r();if(e)console.error("Failed to fetch what's new content:",e),c([]);else if(t){let e=t;i&&(e=t.filter((e=>Array.isArray(e.module)?e.module.includes(i):e.module===i))),e.sort(((e,t)=>{var a,o;const r=(null===(a=e.createdAt)||void 0===a?void 0:a.toDate)?e.createdAt.toDate():new Date(e.createdAt);return((null===(o=t.createdAt)||void 0===o?void 0:o.toDate)?t.createdAt.toDate():new Date(t.createdAt)).getTime()-r.getTime()})),c(e)}else c([])}catch(e){console.error("Failed to fetch what's new content:",e),c([])}finally{u(!1)}}))),[r,i]);a.useEffect((()=>{w()}),[w]);const f=a.useCallback((e=>{if(!e.createdAt)return!1;const a=e.createdAt.toDate?e.createdAt.toDate():new Date(e.createdAt);return t.differenceInBusinessDays(new Date,a)<s}),[s]),v=d.reduce(((e,t)=>f(t)?e+1:e),0);return{whatsNewContent:d,isLoading:l,newContentCount:v,markAsViewed:a.useCallback((t=>e.__awaiter(void 0,void 0,void 0,(function*(){if(n)try{yield n(t)}catch(e){console.warn("Failed to mark content as viewed:",e)}}))),[n]),refreshContent:a.useCallback((()=>e.__awaiter(void 0,void 0,void 0,(function*(){yield w()}))),[w])}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("date-fns"),r=require("react");exports.useWhatsNew=a=>{let{fetchWhatsNewContent:n,markContentAsViewed:o,module:c,newContentThresholdDays:s=7}=a;const[i,d]=r.useState([]),[u,l]=r.useState(!0),f=r.useRef(n),w=r.useRef(o);r.useEffect((()=>{f.current=n}),[n]),r.useEffect((()=>{w.current=o}),[o]);const v=r.useCallback((()=>e.__awaiter(void 0,void 0,void 0,(function*(){l(!0);try{const[e,t]=yield f.current();if(e)console.error("Failed to fetch what's new content:",e),d([]);else if(t){let e=t;c&&(e=t.filter((e=>Array.isArray(e.module)?e.module.includes(c):e.module===c))),e.sort(((e,t)=>{var r,a;const n=(null===(r=e.createdAt)||void 0===r?void 0:r.toDate)?e.createdAt.toDate():new Date(e.createdAt);return((null===(a=t.createdAt)||void 0===a?void 0:a.toDate)?t.createdAt.toDate():new Date(t.createdAt)).getTime()-n.getTime()})),d(e)}else d([])}catch(e){console.error("Failed to fetch what's new content:",e),d([])}finally{l(!1)}}))),[c]);r.useEffect((()=>{v()}),[v]);const A=r.useCallback((e=>{if(!e.createdAt)return!1;const r=e.createdAt.toDate?e.createdAt.toDate():new Date(e.createdAt);return t.differenceInBusinessDays(new Date,r)<s}),[s]),h=i.reduce(((e,t)=>A(t)?e+1:e),0);return{whatsNewContent:i,isLoading:u,newContentCount:h,markAsViewed:r.useCallback((t=>e.__awaiter(void 0,void 0,void 0,(function*(){if(w.current)try{yield w.current(t)}catch(e){console.warn("Failed to mark content as viewed:",e)}}))),[]),refreshContent:r.useCallback((()=>e.__awaiter(void 0,void 0,void 0,(function*(){yield v()}))),[v])}};
@@ -36,7 +36,7 @@ export declare class MetaCustomProcessor {
36
36
  value: {
37
37
  operator: string;
38
38
  dataType: import("../types").QueryBuilderConnectorType;
39
- value?: string | number | string[] | number[] | Date | Date[] | undefined;
39
+ value?: string | number | string[] | Date | number[] | Date[] | undefined;
40
40
  };
41
41
  key: string;
42
42
  refresh?: boolean | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const Menus: ({
3
2
  displayName: string;
4
3
  key: number;
@@ -1 +1 @@
1
- import{j as e}from"../../node_modules/react/jsx-runtime.js";import{useState as t,useRef as n,useEffect as o}from"react";const r=e=>{if(!e)return"";const t=document.createElement("textarea");return t.innerHTML=e,t.value},i=i=>{let{feature:s,currentIndex:l,totalFeatures:a,onSkip:c,onExplore:d,onPrevious:u,onNext:p,setIsClosing:g}=i;const[x,f]=t(!1),[h,y]=t(!1),[b,j]=t(""),m=n(null);o((()=>{if(x){const e=setTimeout((()=>{y(!0)}),150);return()=>clearTimeout(e)}}),[x]);const C=e=>{if(m.current){const e=m.current.closest('[class*="react-joyride__tooltip"]');if(e){const t=e.querySelector('[class*="react-joyride__arrow"]');t&&(t.style.display="none",t.style.visibility="hidden",t.style.opacity="0")}}let t=null;if(t=document.querySelector('[data-testid="whats-new-button"]'),t||(t=document.querySelector(".main-icon-class")),!t){const e=document.querySelector('svg[viewBox="0 0 32 32"]');if(e){e.querySelector('clipPath[id*="clip"]')&&(t=e.closest('[data-testid="whats-new-button"]')||e.parentElement)}}if(console.log("What's New button found:",!!t,t),t&&m.current){const e=m.current.getBoundingClientRect(),n=t.getBoundingClientRect();console.log("Popup rect:",e),console.log("Target rect:",n);const o=n.left+n.width/2-(e.left+e.width/2),r=n.top+n.height/2-(e.top+e.height/2);console.log("Translation:",{translateX:o,translateY:r}),j(`translate(${o}px, ${r}px) scale(0)`)}else j("scale(0)");null==g||g(!0),f(!0),setTimeout((()=>{e()}),1150)};return e.jsx(e.Fragment,{children:e.jsxs("div",Object.assign({ref:m,style:{width:"959px",height:"274px",display:"flex",backgroundColor:"#212121",borderRadius:"4px",overflow:"hidden",position:"relative",transform:h?b:"scale(1)",opacity:h?0:1,transition:"transform 1s cubic-bezier(0.4, 0, 0.2, 1), opacity 1s cubic-bezier(0.4, 0, 0.2, 1)"}},{children:[e.jsx("button",Object.assign({onClick:e=>{e.preventDefault(),e.stopPropagation(),C(c)},style:{position:"absolute",top:"10px",right:"10px",background:"transparent",border:"none",color:"#BDBDBD",fontSize:"14px",fontWeight:"500",cursor:"pointer",zIndex:10,transition:"all 0.2s"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#f3f4f6",e.currentTarget.style.color="#374151"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent",e.currentTarget.style.color="#6b7280"}},{children:"Skip"})),e.jsx("div",Object.assign({style:{backgroundColor:"#212121",width:"480px",height:"274px",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",padding:"8px"}},{children:s.displayImage?e.jsx("img",{src:s.displayImage,alt:s.title,style:{width:"464px",height:"258px",objectFit:"cover"},onError:e=>{s.image&&(e.target.src=s.image)}}):e.jsx("div",Object.assign({style:{color:"#9ca3af",fontSize:"14px",textAlign:"center",width:"290px",height:"258px",display:"flex",alignItems:"center",justifyContent:"center"}},{children:"Feature Preview"}))})),e.jsxs("div",Object.assign({style:{flex:1,display:"flex",margin:"0 8px 0 0",flexDirection:"column",justifyContent:"space-between",background:"transparent"}},{children:[e.jsxs("div",{children:[e.jsx("h3",Object.assign({style:{fontSize:"16px",fontWeight:"600",padding:"36px 0 0 0",color:"#fff",lineHeight:"1.25",textAlign:"left"}},{children:s.title})),e.jsx("div",{style:{fontSize:"14px",lineHeight:"1.5",color:"rgba(255, 255, 255, 0.8)",textAlign:"left"},dangerouslySetInnerHTML:{__html:r(s.content||s.body||"")}}),e.jsx("div",{children:e.jsx("button",Object.assign({onClick:()=>{C(d)},style:{backgroundColor:"transparent",border:"1px solid #FEC02D",color:"#FEC02D",borderRadius:"4px",fontSize:"14px",fontWeight:"500",cursor:"pointer",width:"154px",height:"32px",transition:"all 0.2s",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",marginTop:"16px"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="rgba(254, 192, 45, 0.1)"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent"}},{children:s.buttonText||"Explore the feature"}))})]}),a>1&&e.jsxs("div",Object.assign({style:{position:"absolute",bottom:"16px",right:"16px",display:"flex",gap:"8px",alignItems:"center"}},{children:[e.jsx("button",Object.assign({onClick:e=>{e.preventDefault(),e.stopPropagation(),C(u)},disabled:0===l,style:{width:"24px",height:"24px",backgroundColor:"transparent",border:"none",color:0===l?"#666":"#fff",fontSize:"20px",cursor:0===l?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s"},onMouseEnter:e=>{0!==l&&(e.currentTarget.style.color="#FEC02D")},onMouseLeave:e=>{0!==l&&(e.currentTarget.style.color="#fff")}},{children:"‹"})),e.jsx("button",Object.assign({onClick:e=>{e.preventDefault(),e.stopPropagation(),C(p)},disabled:l===a-1,style:{width:"24px",height:"24px",backgroundColor:"transparent",border:"none",color:l===a-1?"#666":"#fff",fontSize:"20px",cursor:l===a-1?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s"},onMouseEnter:e=>{l!==a-1&&(e.currentTarget.style.color="#FEC02D")},onMouseLeave:e=>{l!==a-1&&(e.currentTarget.style.color="#fff")}},{children:"›"}))]}))]}))]}))})};export{i as default};
1
+ import{j as e}from"../../node_modules/react/jsx-runtime.js";import{useState as t,useRef as n,useEffect as o}from"react";const r=e=>{if(!e)return"";const t=document.createElement("textarea");return t.innerHTML=e,t.value},s=s=>{let{feature:i,currentIndex:l,totalFeatures:a,onSkip:c,onExplore:d,onPrevious:p,onNext:u,setIsClosing:g}=s;const[x,f]=t(!1),[h,y]=t(!1),[b,j]=t(""),m=n(null);o((()=>{x&&y(!0)}),[x]);const C=e=>{if(m.current){const e=m.current.closest('[class*="react-joyride__tooltip"]');if(e){const t=e.querySelector('[class*="react-joyride__arrow"]');t&&(t.style.display="none",t.style.visibility="hidden",t.style.opacity="0")}}let t=null;if(t=document.querySelector('[data-testid="whats-new-button"]'),t||(t=document.querySelector(".main-icon-class")),!t){const e=document.querySelector('svg[viewBox="0 0 32 32"]');if(e){e.querySelector('clipPath[id*="clip"]')&&(t=e.closest('[data-testid="whats-new-button"]')||e.parentElement)}}if(console.log("What's New button found:",!!t,t),t&&m.current){const e=m.current.getBoundingClientRect(),n=t.getBoundingClientRect();console.log("Popup rect:",e),console.log("Target rect:",n);const o=n.left+n.width/2-(e.left+e.width/2),r=n.top+n.height/2-(e.top+e.height/2);console.log("Translation:",{translateX:o,translateY:r}),j(`translate(${o}px, ${r}px) scale(0)`)}else j("scale(0)");null==g||g(!0),f(!0),setTimeout((()=>{e()}),1150)};return e.jsx(e.Fragment,{children:e.jsxs("div",Object.assign({ref:m,style:{width:"959px",height:"274px",display:"flex",backgroundColor:"#212121",borderRadius:"4px",overflow:"hidden",position:"relative",transform:h?b:"scale(1)",opacity:h?0:1,transition:"transform 1s cubic-bezier(0.4, 0, 0.2, 1), opacity 1s cubic-bezier(0.4, 0, 0.2, 1)"}},{children:[e.jsx("button",Object.assign({onClick:e=>{e.preventDefault(),e.stopPropagation(),C(c)},style:{position:"absolute",top:"10px",right:"10px",background:"transparent",border:"none",color:"#BDBDBD",fontSize:"14px",fontWeight:"500",cursor:"pointer",zIndex:10,transition:"all 0.2s"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="#f3f4f6",e.currentTarget.style.color="#374151"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent",e.currentTarget.style.color="#6b7280"}},{children:"Skip"})),e.jsx("div",Object.assign({style:{backgroundColor:"#212121",width:"480px",height:"274px",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",padding:"8px"}},{children:i.displayImage?e.jsx("img",{src:i.displayImage,alt:i.title,style:{width:"464px",height:"258px",objectFit:"cover"},onError:e=>{i.image&&(e.target.src=i.image)}}):e.jsx("div",Object.assign({style:{color:"#9ca3af",fontSize:"14px",textAlign:"center",width:"290px",height:"258px",display:"flex",alignItems:"center",justifyContent:"center"}},{children:"Feature Preview"}))})),e.jsxs("div",Object.assign({style:{flex:1,display:"flex",margin:"0 8px 0 0",flexDirection:"column",justifyContent:"space-between",background:"transparent"}},{children:[e.jsxs("div",{children:[e.jsx("h3",Object.assign({style:{fontSize:"16px",fontWeight:"600",padding:"36px 0 0 0",color:"#fff",lineHeight:"1.25",textAlign:"left"}},{children:i.title})),e.jsx("div",{style:{fontSize:"14px",lineHeight:"1.5",color:"rgba(255, 255, 255, 0.8)",textAlign:"left"},dangerouslySetInnerHTML:{__html:r(i.content||i.body||"")}}),e.jsx("div",{children:e.jsx("button",Object.assign({onClick:()=>{C(d)},style:{backgroundColor:"transparent",border:"1px solid #FEC02D",color:"#FEC02D",borderRadius:"4px",fontSize:"14px",fontWeight:"600",cursor:"pointer",width:"154px",height:"32px",transition:"all 0.2s",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",marginTop:"16px"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="rgba(254, 192, 45, 0.1)"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="transparent"}},{children:i.buttonText||"Explore the feature"}))})]}),a>1&&e.jsxs("div",Object.assign({style:{position:"absolute",bottom:"16px",right:"16px",display:"flex",gap:"8px",alignItems:"center"}},{children:[e.jsx("button",Object.assign({onClick:e=>{e.preventDefault(),e.stopPropagation(),C(p)},disabled:0===l,style:{width:"24px",height:"24px",backgroundColor:"transparent",border:"none",color:0===l?"#666":"#fff",fontSize:"20px",cursor:0===l?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s"},onMouseEnter:e=>{0!==l&&(e.currentTarget.style.color="#FEC02D")},onMouseLeave:e=>{0!==l&&(e.currentTarget.style.color="#fff")}},{children:"‹"})),e.jsx("button",Object.assign({onClick:e=>{e.preventDefault(),e.stopPropagation(),C(u)},disabled:l===a-1,style:{width:"24px",height:"24px",backgroundColor:"transparent",border:"none",color:l===a-1?"#666":"#fff",fontSize:"20px",cursor:l===a-1?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s"},onMouseEnter:e=>{l!==a-1&&(e.currentTarget.style.color="#FEC02D")},onMouseLeave:e=>{l!==a-1&&(e.currentTarget.style.color="#fff")}},{children:"›"}))]}))]}))]}))})};export{s as default};
@@ -1 +1 @@
1
- import{j as e}from"../../node_modules/react/jsx-runtime.js";import{useState as t,useRef as i,useEffect as n}from"react";const r=e=>{if(!e)return"";const t=document.createElement("textarea");return t.innerHTML=e,t.value},s=s=>{let{feature:o,currentIndex:l,totalFeatures:a,onSkip:c,onExplore:x,onPrevious:d,onNext:p,setIsClosing:f}=s;const[g,u]=t(!1),[h,b]=t(!1),[y,j]=t(""),m=i(null);n((()=>{if(g){const e=setTimeout((()=>{b(!0)}),150);return()=>clearTimeout(e)}}),[g]);const v=e=>{if(m.current){const e=m.current.closest('[class*="react-joyride__tooltip"]');if(e){const t=e.querySelector('[class*="react-joyride__arrow"]');t&&(t.style.display="none",t.style.visibility="hidden",t.style.opacity="0")}}if(m.current&&o.featureTag){const e=o.featureTag.startsWith("#")||o.featureTag.startsWith(".")||o.featureTag.startsWith("[")?o.featureTag:`#${o.featureTag}`,t=document.querySelector(e);if(t){const e=m.current.getBoundingClientRect(),i=t.getBoundingClientRect(),n=i.left+i.width/2-(e.left+e.width/2),r=i.top+i.height/2-(e.top+e.height/2);j(`translate(${n}px, ${r}px) scale(0)`)}else j("scale(0)")}else j("scale(0)");null==f||f(!0),u(!0),setTimeout((()=>{e()}),1150)};return e.jsx(e.Fragment,{children:e.jsxs("div",Object.assign({ref:m,style:{width:"519px",height:"160px",display:"flex",backgroundColor:"#ffffff",borderRadius:"4px",overflow:"hidden",position:"relative",boxShadow:"0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04)",transform:h?y:"scale(1)",opacity:h?0:1,transition:"transform 1s cubic-bezier(0.4, 0, 0.2, 1), opacity 1s cubic-bezier(0.4, 0, 0.2, 1)"}},{children:[e.jsx("div",Object.assign({style:{backgroundColor:"#f9fafb",borderRadius:"4px",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",margin:"13px 10px 13px 10px",width:"235px",minWidth:"235px",maxWidth:"235px",height:"134px"}},{children:o.displayImage?e.jsxs("div",Object.assign({style:{position:"relative",width:"235px",height:"134px"}},{children:[e.jsx("img",{src:o.displayImage,alt:o.title,style:{width:"235px",height:"134px",objectFit:"cover",borderRadius:"4px",display:"block"},onError:e=>{o.image&&(e.target.src=o.image)}}),e.jsx("div",Object.assign({style:{position:"absolute",top:"0px",left:"0px",right:"0px",height:"27px",backgroundColor:"rgba(0, 0, 0, 0.26)",borderRadius:"4px 4px 4px 4px",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10}},{children:e.jsx("span",Object.assign({style:{color:"#ffffff",fontWeight:"400",fontSize:"14px"}},{children:"New feature"}))}))]})):e.jsx("div",Object.assign({style:{color:"#9ca3af",fontSize:"14px",textAlign:"center",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#f3f4f6",borderRadius:"4px"}},{children:"Feature Preview"}))})),e.jsxs("div",Object.assign({style:{flex:1,display:"flex",margin:"13px 13px 13px 3px",flexDirection:"column",justifyContent:"space-between",background:"transparent"}},{children:[e.jsxs("div",{children:[e.jsx("h3",Object.assign({style:{fontSize:"16px",fontWeight:"600",padding:"0 0 0 0",color:"#212121",lineHeight:"1.25",textAlign:"left"}},{children:o.title})),e.jsx("div",{style:{fontSize:"12px",fontWeight:"400",lineHeight:"1.2",color:"#616161",textAlign:"left",maxHeight:"48px",overflow:"hidden",display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical"},dangerouslySetInnerHTML:{__html:r(o.content||o.body||"")}})]}),e.jsxs("div",Object.assign({style:{position:"absolute",bottom:"13px",right:"10px",display:"flex",gap:"16px",alignItems:"center"}},{children:[e.jsx("span",Object.assign({onClick:()=>v(c),style:{color:"#4B1583",fontSize:"14px",fontWeight:"500",cursor:"pointer",transition:"all 0.2s"}},{children:"Understood"})),o.productVideo&&e.jsx("button",Object.assign({onClick:()=>{v(x)},style:{backgroundColor:"#4B1583",border:"none",color:"#ffffff",borderRadius:"4px",fontSize:"14px",fontWeight:"500",cursor:"pointer",width:"154px",height:"32px",transition:"all 0.2s",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},{children:o.buttonText||"Explore the feature"}))]}))]}))]}))})};export{s as default};
1
+ import{j as e}from"../../node_modules/react/jsx-runtime.js";import{useState as t,useRef as i,useEffect as n}from"react";const r=e=>{if(!e)return"";const t=document.createElement("textarea");return t.innerHTML=e,t.value},s=s=>{let{feature:o,currentIndex:l,totalFeatures:a,onSkip:c,onExplore:x,onPrevious:d,onNext:p,setIsClosing:f}=s;const[g,h]=t(!1),[u,b]=t(!1),[y,j]=t(""),m=i(null);n((()=>{g&&b(!0)}),[g]);const v=e=>{if(m.current){const e=m.current.closest('[class*="react-joyride__tooltip"]');if(e){const t=e.querySelector('[class*="react-joyride__arrow"]');t&&(t.style.display="none",t.style.visibility="hidden",t.style.opacity="0")}}if(m.current&&o.featureTag){const e=o.featureTag.startsWith("#")||o.featureTag.startsWith(".")||o.featureTag.startsWith("[")?o.featureTag:`#${o.featureTag}`,t=document.querySelector(e);if(t){const e=m.current.getBoundingClientRect(),i=t.getBoundingClientRect(),n=i.left+i.width/2-(e.left+e.width/2),r=i.top+i.height/2-(e.top+e.height/2);j(`translate(${n}px, ${r}px) scale(0)`)}else j("scale(0)")}else j("scale(0)");null==f||f(!0),h(!0),setTimeout((()=>{e()}),1150)};return e.jsx(e.Fragment,{children:e.jsxs("div",Object.assign({ref:m,style:{width:"519px",height:"160px",display:"flex",backgroundColor:"#ffffff",borderRadius:"4px",overflow:"hidden",position:"relative",boxShadow:"0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04)",transform:u?y:"scale(1)",opacity:u?0:1,transition:"transform 1s cubic-bezier(0.4, 0, 0.2, 1), opacity 1s cubic-bezier(0.4, 0, 0.2, 1)"}},{children:[e.jsx("div",Object.assign({style:{backgroundColor:"#f9fafb",borderRadius:"4px",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",margin:"13px 10px 13px 10px",width:"235px",minWidth:"235px",maxWidth:"235px",height:"134px"}},{children:o.displayImage?e.jsxs("div",Object.assign({style:{position:"relative",width:"235px",height:"134px"}},{children:[e.jsx("img",{src:o.displayImage,alt:o.title,style:{width:"235px",height:"134px",objectFit:"cover",borderRadius:"4px",display:"block"},onError:e=>{o.image&&(e.target.src=o.image)}}),e.jsx("div",Object.assign({style:{position:"absolute",top:"0px",left:"0px",right:"0px",height:"27px",backgroundColor:"rgba(0, 0, 0, 0.26)",borderRadius:"4px 4px 4px 4px",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10}},{children:e.jsx("span",Object.assign({style:{color:"#ffffff",fontWeight:"600",fontSize:"14px"}},{children:"New feature"}))}))]})):e.jsx("div",Object.assign({style:{color:"#9ca3af",fontSize:"14px",textAlign:"center",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#f3f4f6",borderRadius:"4px"}},{children:"Feature Preview"}))})),e.jsxs("div",Object.assign({style:{flex:1,display:"flex",margin:"13px 13px 13px 3px",flexDirection:"column",justifyContent:"space-between",background:"transparent"}},{children:[e.jsxs("div",{children:[e.jsx("h3",Object.assign({style:{fontSize:"16px",fontWeight:"600",padding:"0 0 0 0",color:"#212121",lineHeight:"1.25",textAlign:"left"}},{children:o.title})),e.jsx("div",{style:{fontSize:"12px",fontWeight:"400",lineHeight:"1.2",color:"#616161",textAlign:"left",maxHeight:"48px",overflow:"hidden",display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical"},dangerouslySetInnerHTML:{__html:r(o.content||o.body||"")}})]}),e.jsxs("div",Object.assign({style:{position:"absolute",bottom:"13px",right:"10px",display:"flex",gap:"16px",alignItems:"center"}},{children:[e.jsx("span",Object.assign({onClick:()=>v(c),style:{color:"#4B1583",fontSize:"14px",fontWeight:"500",cursor:"pointer",transition:"all 0.2s"}},{children:"Understood"})),o.productVideo&&e.jsx("button",Object.assign({onClick:()=>{v(x)},style:{backgroundColor:"#4B1583",border:"none",color:"#ffffff",borderRadius:"4px",fontSize:"14px",fontWeight:"600",cursor:"pointer",width:"154px",height:"32px",transition:"all 0.2s",textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center"}},{children:o.buttonText||"Explore the feature"}))]}))]}))]}))})};export{s as default};
@@ -1 +1 @@
1
- import{__awaiter as e}from"../../_virtual/_tslib.js";import{differenceInBusinessDays as t}from"date-fns";import{useState as o,useCallback as n,useEffect as r}from"react";const a=a=>{let{fetchWhatsNewContent:i,markContentAsViewed:d,module:c,newContentThresholdDays:l=7}=a;const[s,f]=o([]),[u,w]=o(!0),v=n((()=>e(void 0,void 0,void 0,(function*(){w(!0);try{const[e,t]=yield i();if(e)console.error("Failed to fetch what's new content:",e),f([]);else if(t){let e=t;c&&(e=t.filter((e=>Array.isArray(e.module)?e.module.includes(c):e.module===c))),e.sort(((e,t)=>{var o,n;const r=(null===(o=e.createdAt)||void 0===o?void 0:o.toDate)?e.createdAt.toDate():new Date(e.createdAt);return((null===(n=t.createdAt)||void 0===n?void 0:n.toDate)?t.createdAt.toDate():new Date(t.createdAt)).getTime()-r.getTime()})),f(e)}else f([])}catch(e){console.error("Failed to fetch what's new content:",e),f([])}finally{w(!1)}}))),[i,c]);r((()=>{v()}),[v]);const m=n((e=>{if(!e.createdAt)return!1;const o=e.createdAt.toDate?e.createdAt.toDate():new Date(e.createdAt);return t(new Date,o)<l}),[l]),A=s.reduce(((e,t)=>m(t)?e+1:e),0);return{whatsNewContent:s,isLoading:u,newContentCount:A,markAsViewed:n((t=>e(void 0,void 0,void 0,(function*(){if(d)try{yield d(t)}catch(e){console.warn("Failed to mark content as viewed:",e)}}))),[d]),refreshContent:n((()=>e(void 0,void 0,void 0,(function*(){yield v()}))),[v])}};export{a as useWhatsNew};
1
+ import{__awaiter as e}from"../../_virtual/_tslib.js";import{differenceInBusinessDays as t}from"date-fns";import{useState as o,useRef as r,useEffect as n,useCallback as a}from"react";const i=i=>{let{fetchWhatsNewContent:c,markContentAsViewed:d,module:s,newContentThresholdDays:l=7}=i;const[u,f]=o([]),[w,v]=o(!0),m=r(c),A=r(d);n((()=>{m.current=c}),[c]),n((()=>{A.current=d}),[d]);const h=a((()=>e(void 0,void 0,void 0,(function*(){v(!0);try{const[e,t]=yield m.current();if(e)console.error("Failed to fetch what's new content:",e),f([]);else if(t){let e=t;s&&(e=t.filter((e=>Array.isArray(e.module)?e.module.includes(s):e.module===s))),e.sort(((e,t)=>{var o,r;const n=(null===(o=e.createdAt)||void 0===o?void 0:o.toDate)?e.createdAt.toDate():new Date(e.createdAt);return((null===(r=t.createdAt)||void 0===r?void 0:r.toDate)?t.createdAt.toDate():new Date(t.createdAt)).getTime()-n.getTime()})),f(e)}else f([])}catch(e){console.error("Failed to fetch what's new content:",e),f([])}finally{v(!1)}}))),[s]);n((()=>{h()}),[h]);const D=a((e=>{if(!e.createdAt)return!1;const o=e.createdAt.toDate?e.createdAt.toDate():new Date(e.createdAt);return t(new Date,o)<l}),[l]),y=u.reduce(((e,t)=>D(t)?e+1:e),0);return{whatsNewContent:u,isLoading:w,newContentCount:y,markAsViewed:a((t=>e(void 0,void 0,void 0,(function*(){if(A.current)try{yield A.current(t)}catch(e){console.warn("Failed to mark content as viewed:",e)}}))),[]),refreshContent:a((()=>e(void 0,void 0,void 0,(function*(){yield h()}))),[h])}};export{i as useWhatsNew};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.721-beta.8",
3
+ "version": "0.0.721-beta.9",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",