@bikdotai/bik-component-library 0.0.703-beta.9 → 0.0.704

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.
@@ -174,7 +174,7 @@
174
174
  &:hover {
175
175
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
176
176
  }
177
- `,c=n.default.div`
177
+ `,p=n.default.div`
178
178
  background-image: url(${e=>e.imageUrl});
179
179
  background-size: cover;
180
180
  background-position: center;
@@ -182,15 +182,4 @@
182
182
  height: ${e=>e.height||"200px"};
183
183
  width: ${e=>e.width||"100%"};
184
184
  border-radius: 4px;
185
- display: flex;
186
- align-items: center;
187
- justify-content: center;
188
-
189
- &:empty::after {
190
- content: '';
191
- background: ${t.COLORS.background.base};
192
- width: 100%;
193
- height: 100%;
194
- border-radius: 4px;
195
- }
196
- `;exports.BackgroundImageContainer=c,exports.MainCardContainer=d,exports.MainContainer=o,exports.WhatsNewIconContainer=r,exports.WhatsNewWrapper=a;
185
+ `;exports.BackgroundImageContainer=p,exports.MainCardContainer=d,exports.MainContainer=o,exports.WhatsNewIconContainer=r,exports.WhatsNewWrapper=a;
@@ -7,6 +7,7 @@ export interface WhatsNewContent {
7
7
  image: string;
8
8
  buttonText: string;
9
9
  redirectUrl: string;
10
+ productVideo?: string;
10
11
  docId?: string;
11
12
  createdAt: any;
12
13
  module: string[];
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/react/jsx-runtime.js"),t=require("date-fns"),s=require("react"),n=require("../../constants/Theme.js"),r=require("../button/Button.js"),i=require("../input/Input.js"),o=require("../TypographyStyle.js"),a=require("./WhatsNew.styles.js");const x=t=>{let{width:s=32,height:n=32}=t;return e.jsxRuntimeExports.jsx("svg",Object.assign({width:s,height:n,viewBox:"0 0 24 24",fill:"none"},{children:e.jsxRuntimeExports.jsx("path",{d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}))},d=t=>{let{width:s=32,height:n=32}=t;return e.jsxRuntimeExports.jsxs("svg",Object.assign({width:s,height:n,viewBox:"0 0 32 32",fill:"none"},{children:[e.jsxRuntimeExports.jsx("path",{d:"M16 2C8.268 2 2 8.268 2 16s6.268 14 14 14 14-6.268 14-14S23.732 2 16 2zm0 25c-6.065 0-11-4.935-11-11S9.935 5 16 5s11 4.935 11 11-4.935 11-11 11z",fill:"currentColor"}),e.jsxRuntimeExports.jsx("path",{d:"M16 10.5c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zM15 15h2v8h-2v-8z",fill:"currentColor"})]}))};exports.WhatsNewPanel=l=>{let{isOpen:c,onClose:u,content:j,isLoading:h=!1,title:m="What's new",searchPlaceholder:p="Search posts",emptyStateTitle:g="Nothing new!",emptyStateDescription:R="There are no new updates or features at the moment. Check back soon!",noResultsText:b="Sorry, no results found.",width:w="480px",onContentClick:O,renderCustomContent:E}=l;const[y,C]=s.useState(""),f=e=>{if(!e.createdAt)return!1;const s=e.createdAt.toDate?e.createdAt.toDate():new Date(e.createdAt);return t.differenceInBusinessDays(new Date,s)<7},v=s.useMemo((()=>{if(!y.trim())return j;const e=y.toLowerCase();return j.filter((t=>t.title.toLowerCase().includes(e)||t.body.toLowerCase().includes(e)||t.content.toLowerCase().includes(e)))}),[j,y]),S=(s,i)=>E?E(s):e.jsxRuntimeExports.jsxs(a.MainCardContainer,Object.assign({className:"padding--16 mb-mt-8"},{children:[s.image&&e.jsxRuntimeExports.jsx(a.BackgroundImageContainer,{imageUrl:s.image,height:"209px",width:"100%",style:{borderRadius:"4px"}}),e.jsxRuntimeExports.jsx("div",Object.assign({className:"mt-20 full--width"},{children:e.jsxRuntimeExports.jsxs("div",Object.assign({className:"created--at flex flex--row"},{children:[f(s)&&e.jsxRuntimeExports.jsx("div",Object.assign({className:"new--content--tag"},{children:e.jsxRuntimeExports.jsx(o.Caption,{children:"New"})})),e.jsxRuntimeExports.jsx(o.Caption,Object.assign({style:{color:n.COLORS.content.placeholder}},{children:s.createdAt?t.format(s.createdAt.toDate?s.createdAt.toDate():new Date(s.createdAt),"dd MMMM yyyy"):""}))]}))})),e.jsxRuntimeExports.jsx("div",Object.assign({className:"mt--8"},{children:e.jsxRuntimeExports.jsx(o.TitleSmall,{children:s.title})})),e.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:s.body},className:"card--desc mt--12"}),e.jsxRuntimeExports.jsx("div",Object.assign({className:"flex flex--row mt-20 full--width"},{children:e.jsxRuntimeExports.jsx(r.Button,{buttonText:s.buttonText||"Explore the feature",onClick:()=>(e=>{O?O(e):e.redirectUrl&&window.open(e.redirectUrl,"_blank")})(s),matchParentWidth:!0,size:"medium"})}))]}),`whats-new-${i}`),k=0===j.length,N=0===v.length;return e.jsxRuntimeExports.jsxs("div",Object.assign({style:{position:"fixed",top:0,right:0,width:w,height:"100vh",backgroundColor:n.COLORS.surface.standard,boxShadow:"0 0 20px rgba(0,0,0,0.1)",zIndex:1e3,display:c?"flex":"none",flexDirection:"column"}},{children:[e.jsxRuntimeExports.jsxs("div",Object.assign({style:{padding:"16px 24px",background:n.COLORS.background.brandLight,borderBottom:`1px solid ${n.COLORS.stroke.primary}`,display:"flex",justifyContent:"space-between",alignItems:"center"}},{children:[e.jsxRuntimeExports.jsx(o.TitleMedium,Object.assign({color:n.COLORS.background.inverse},{children:m})),e.jsxRuntimeExports.jsx("button",Object.assign({onClick:u,style:{background:"none",border:"none",fontSize:"20px",cursor:"pointer",color:n.COLORS.background.inverse}},{children:"×"}))]})),e.jsxRuntimeExports.jsxs(a.MainContainer,{children:[e.jsxRuntimeExports.jsx("div",Object.assign({className:"mt-8",style:{padding:"0 16px"}},{children:e.jsxRuntimeExports.jsx(i.Input,{value:y,onChangeText:C,placeholder:p,state:k?"disabled":"none",variant:"default",width:"100%"})})),e.jsxRuntimeExports.jsx(a.WhatsNewWrapper,{children:k||N?e.jsxRuntimeExports.jsxs("div",Object.assign({className:"no--data--found"},{children:[e.jsxRuntimeExports.jsx("div",Object.assign({className:"icon--wrapper"},{children:k?e.jsxRuntimeExports.jsx(d,{width:32,height:32}):e.jsxRuntimeExports.jsx(x,{width:32,height:32})})),k?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(o.TitleRegular,{children:g}),e.jsxRuntimeExports.jsx(o.BodyPrimary,Object.assign({color:n.COLORS.content.secondary,className:"text--align",style:{maxWidth:300}},{children:R}))]}):e.jsxRuntimeExports.jsx(o.BodyPrimary,Object.assign({color:n.COLORS.content.secondary,className:"text--align",style:{maxWidth:300}},{children:b}))]})):e.jsxRuntimeExports.jsx("div",Object.assign({className:"scroller"},{children:v.map(((e,t)=>S(e,t)))}))})]})]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/react/jsx-runtime.js"),t=require("date-fns"),s=require("react"),n=require("../../constants/Theme.js"),r=require("../button/Button.js"),o=require("../feature-announcements/VideoModal.js"),i=require("../searchBar/searchBar.js"),a=require("../side-modal/SideModal.js"),l=require("../TypographyStyle.js"),d=require("./WhatsNew.styles.js");const c=t=>{let{width:s=32,height:n=32}=t;return e.jsxRuntimeExports.jsx("svg",Object.assign({width:s,height:n,viewBox:"0 0 24 24",fill:"none"},{children:e.jsxRuntimeExports.jsx("path",{d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}))},x=t=>{let{width:s=32,height:n=32}=t;return e.jsxRuntimeExports.jsxs("svg",Object.assign({width:s,height:n,viewBox:"0 0 32 32",fill:"none"},{children:[e.jsxRuntimeExports.jsx("path",{d:"M16 2C8.268 2 2 8.268 2 16s6.268 14 14 14 14-6.268 14-14S23.732 2 16 2zm0 25c-6.065 0-11-4.935-11-11S9.935 5 16 5s11 4.935 11 11-4.935 11-11 11z",fill:"currentColor"}),e.jsxRuntimeExports.jsx("path",{d:"M16 10.5c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zM15 15h2v8h-2v-8z",fill:"currentColor"})]}))};exports.WhatsNewPanel=u=>{let{isOpen:j,onClose:m,content:h,isLoading:p=!1,title:g="What's new on BIK",searchPlaceholder:R="Search posts",emptyStateTitle:C="Nothing new!",emptyStateDescription:E="There are no new updates or features at the moment. Check back soon!",noResultsText:w="Sorry, no results found.",width:b="480px",onContentClick:O,renderCustomContent:y}=u;const[f,v]=s.useState(""),[S,M]=s.useState(!1),[N,k]=s.useState("");console.log("WhatsNewPanel render - isVideoModalOpen:",S,"videoUrl:",N);const L=e=>{if(!e.createdAt)return!1;const s=e.createdAt.toDate?e.createdAt.toDate():new Date(e.createdAt);return t.differenceInBusinessDays(new Date,s)<7},B=s.useMemo((()=>{if(!f.trim())return h;const e=f.toLowerCase();return h.filter((t=>t.title.toLowerCase().includes(e)||t.body.toLowerCase().includes(e)||t.content&&t.content.toLowerCase().includes(e)))}),[h,f]),T=0===h.length,q=0===B.length;return j?e.jsxRuntimeExports.jsxs(a.SideModal,Object.assign({width:b,onClose:m,header:"",headerCustomComponent:e.jsxRuntimeExports.jsx(l.TitleMedium,Object.assign({color:n.COLORS.background.inverse},{children:g})),headerStyle:{background:n.COLORS.background.brandLight},hideFooter:!0},{children:[e.jsxRuntimeExports.jsxs(d.MainContainer,{children:[e.jsxRuntimeExports.jsx("div",Object.assign({className:"mt-8"},{children:e.jsxRuntimeExports.jsx(i.SearchBar,{width:"100%",isEnabled:!T,onChange:e=>{v(e)},onEnter:e=>{v(e)},placeholder:R,variant:"default",searchValue:f,onClickCross:()=>{v("")}})})),e.jsxRuntimeExports.jsx(d.WhatsNewWrapper,{children:T||q?e.jsxRuntimeExports.jsxs("div",Object.assign({className:"no--data--found"},{children:[e.jsxRuntimeExports.jsx("div",Object.assign({className:"icon--wrapper"},{children:T?e.jsxRuntimeExports.jsx(x,{width:32,height:32}):e.jsxRuntimeExports.jsx(c,{width:32,height:32})})),T?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(l.TitleRegular,{children:C}),e.jsxRuntimeExports.jsx(l.BodyPrimary,Object.assign({color:n.COLORS.content.secondary,className:"text--align",style:{maxWidth:300}},{children:E}))]}):q?e.jsxRuntimeExports.jsx(l.BodyPrimary,Object.assign({color:n.COLORS.content.secondary,className:"text--align",style:{maxWidth:300}},{children:w})):null]})):e.jsxRuntimeExports.jsx("div",Object.assign({className:"scroller"},{children:B.map(((s,o)=>y?y(s):e.jsxRuntimeExports.jsxs(d.MainCardContainer,Object.assign({className:"padding--16 mb-mt-8"},{children:[e.jsxRuntimeExports.jsx(d.BackgroundImageContainer,{imageUrl:s.image,height:"209px",width:"100%",style:{borderRadius:"4px"}}),e.jsxRuntimeExports.jsx("div",Object.assign({className:"mt-20 full--width"},{children:e.jsxRuntimeExports.jsxs("div",Object.assign({className:"created--at flex flex--row"},{children:[L(s)?e.jsxRuntimeExports.jsx("div",Object.assign({className:"new--content--tag"},{children:e.jsxRuntimeExports.jsx(l.Caption,{children:"New"})})):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{}),e.jsxRuntimeExports.jsx(l.Caption,Object.assign({style:{color:n.COLORS.content.placeholder}},{children:s.createdAt?t.format(s.createdAt.toDate?s.createdAt.toDate():new Date(s.createdAt),"dd MMMM yyyy"):""}))]}))})),e.jsxRuntimeExports.jsx("div",Object.assign({className:"mt--8"},{children:e.jsxRuntimeExports.jsx(l.TitleSmall,{children:s.title})})),e.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:s.body},className:"card--desc mt--12"}),e.jsxRuntimeExports.jsx("div",Object.assign({className:"flex flex--row mt-20 full--width"},{children:e.jsxRuntimeExports.jsx(r.Button,{buttonText:s.buttonText||"Explore the feature",onClick:()=>(e=>{console.log("handleContentClick called with:",e),console.log("productVideo:",e.productVideo),console.log("redirectUrl:",e.redirectUrl),console.log("onContentClick:",O),e.productVideo?(console.log("Setting video URL:",e.productVideo),k(e.productVideo),M(!0),console.log("Video modal state set to true")):e.redirectUrl&&(console.log("Opening redirectUrl:",e.redirectUrl),window.open(e.redirectUrl,"_blank")),O&&(console.log("Calling onContentClick for analytics"),O(e))})(s),matchParentWidth:!0,size:"medium"})}))]}),`whats-new-${o}`)))}))})]}),e.jsxRuntimeExports.jsx(o.VideoModal,{isOpen:S,videoUrl:N,onClose:()=>{console.log("Closing video modal"),M(!1)}})]})):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{})};
@@ -182,15 +182,4 @@ import e from"styled-components";import{COLORS as t}from"../../constants/Theme.j
182
182
  height: ${e=>e.height||"200px"};
183
183
  width: ${e=>e.width||"100%"};
184
184
  border-radius: 4px;
185
- display: flex;
186
- align-items: center;
187
- justify-content: center;
188
-
189
- &:empty::after {
190
- content: '';
191
- background: ${t.background.base};
192
- width: 100%;
193
- height: 100%;
194
- border-radius: 4px;
195
- }
196
185
  `;export{a as BackgroundImageContainer,o as MainCardContainer,r as MainContainer,i as WhatsNewIconContainer,n as WhatsNewWrapper};
@@ -7,6 +7,7 @@ export interface WhatsNewContent {
7
7
  image: string;
8
8
  buttonText: string;
9
9
  redirectUrl: string;
10
+ productVideo?: string;
10
11
  docId?: string;
11
12
  createdAt: any;
12
13
  module: string[];
@@ -1 +1 @@
1
- import{j as e}from"../../node_modules/react/jsx-runtime.js";import{format as t,differenceInBusinessDays as s}from"date-fns";import{useState as n,useMemo as r}from"react";import{COLORS as i}from"../../constants/Theme.js";import{Button as o}from"../button/Button.js";import{Input as a}from"../input/Input.js";import{TitleMedium as c,TitleRegular as d,BodyPrimary as l,Caption as h,TitleSmall as x}from"../TypographyStyle.js";import{MainContainer as j,WhatsNewWrapper as m,MainCardContainer as g,BackgroundImageContainer as p}from"./WhatsNew.styles.js";const u=t=>{let{width:s=32,height:n=32}=t;return e.jsx("svg",Object.assign({width:s,height:n,viewBox:"0 0 24 24",fill:"none"},{children:e.jsx("path",{d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}))},b=t=>{let{width:s=32,height:n=32}=t;return e.jsxs("svg",Object.assign({width:s,height:n,viewBox:"0 0 32 32",fill:"none"},{children:[e.jsx("path",{d:"M16 2C8.268 2 2 8.268 2 16s6.268 14 14 14 14-6.268 14-14S23.732 2 16 2zm0 25c-6.065 0-11-4.935-11-11S9.935 5 16 5s11 4.935 11 11-4.935 11-11 11z",fill:"currentColor"}),e.jsx("path",{d:"M16 10.5c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zM15 15h2v8h-2v-8z",fill:"currentColor"})]}))},w=w=>{let{isOpen:f,onClose:y,content:v,isLoading:O=!1,title:C="What's new",searchPlaceholder:k="Search posts",emptyStateTitle:N="Nothing new!",emptyStateDescription:S="There are no new updates or features at the moment. Check back soon!",noResultsText:D="Sorry, no results found.",width:L="480px",onContentClick:M,renderCustomContent:T}=w;const[z,A]=n(""),W=e=>{if(!e.createdAt)return!1;const t=e.createdAt.toDate?e.createdAt.toDate():new Date(e.createdAt);return s(new Date,t)<7},B=r((()=>{if(!z.trim())return v;const e=z.toLowerCase();return v.filter((t=>t.title.toLowerCase().includes(e)||t.body.toLowerCase().includes(e)||t.content.toLowerCase().includes(e)))}),[v,z]),I=(s,n)=>T?T(s):e.jsxs(g,Object.assign({className:"padding--16 mb-mt-8"},{children:[s.image&&e.jsx(p,{imageUrl:s.image,height:"209px",width:"100%",style:{borderRadius:"4px"}}),e.jsx("div",Object.assign({className:"mt-20 full--width"},{children:e.jsxs("div",Object.assign({className:"created--at flex flex--row"},{children:[W(s)&&e.jsx("div",Object.assign({className:"new--content--tag"},{children:e.jsx(h,{children:"New"})})),e.jsx(h,Object.assign({style:{color:i.content.placeholder}},{children:s.createdAt?t(s.createdAt.toDate?s.createdAt.toDate():new Date(s.createdAt),"dd MMMM yyyy"):""}))]}))})),e.jsx("div",Object.assign({className:"mt--8"},{children:e.jsx(x,{children:s.title})})),e.jsx("div",{dangerouslySetInnerHTML:{__html:s.body},className:"card--desc mt--12"}),e.jsx("div",Object.assign({className:"flex flex--row mt-20 full--width"},{children:e.jsx(o,{buttonText:s.buttonText||"Explore the feature",onClick:()=>(e=>{M?M(e):e.redirectUrl&&window.open(e.redirectUrl,"_blank")})(s),matchParentWidth:!0,size:"medium"})}))]}),`whats-new-${n}`),_=0===v.length,U=0===B.length;return e.jsxs("div",Object.assign({style:{position:"fixed",top:0,right:0,width:L,height:"100vh",backgroundColor:i.surface.standard,boxShadow:"0 0 20px rgba(0,0,0,0.1)",zIndex:1e3,display:f?"flex":"none",flexDirection:"column"}},{children:[e.jsxs("div",Object.assign({style:{padding:"16px 24px",background:i.background.brandLight,borderBottom:`1px solid ${i.stroke.primary}`,display:"flex",justifyContent:"space-between",alignItems:"center"}},{children:[e.jsx(c,Object.assign({color:i.background.inverse},{children:C})),e.jsx("button",Object.assign({onClick:y,style:{background:"none",border:"none",fontSize:"20px",cursor:"pointer",color:i.background.inverse}},{children:"×"}))]})),e.jsxs(j,{children:[e.jsx("div",Object.assign({className:"mt-8",style:{padding:"0 16px"}},{children:e.jsx(a,{value:z,onChangeText:A,placeholder:k,state:_?"disabled":"none",variant:"default",width:"100%"})})),e.jsx(m,{children:_||U?e.jsxs("div",Object.assign({className:"no--data--found"},{children:[e.jsx("div",Object.assign({className:"icon--wrapper"},{children:_?e.jsx(b,{width:32,height:32}):e.jsx(u,{width:32,height:32})})),_?e.jsxs(e.Fragment,{children:[e.jsx(d,{children:N}),e.jsx(l,Object.assign({color:i.content.secondary,className:"text--align",style:{maxWidth:300}},{children:S}))]}):e.jsx(l,Object.assign({color:i.content.secondary,className:"text--align",style:{maxWidth:300}},{children:D}))]})):e.jsx("div",Object.assign({className:"scroller"},{children:B.map(((e,t)=>I(e,t)))}))})]})]}))};export{w as WhatsNewPanel};
1
+ import{j as e}from"../../node_modules/react/jsx-runtime.js";import{format as t,differenceInBusinessDays as s}from"date-fns";import{useState as o,useMemo as n}from"react";import{COLORS as r}from"../../constants/Theme.js";import{Button as i}from"../button/Button.js";import{VideoModal as l}from"../feature-announcements/VideoModal.js";import{SearchBar as a}from"../searchBar/searchBar.js";import{SideModal as c}from"../side-modal/SideModal.js";import{TitleMedium as d,TitleRegular as h,BodyPrimary as m,Caption as j,TitleSmall as g}from"../TypographyStyle.js";import{MainContainer as x,WhatsNewWrapper as u,MainCardContainer as p,BackgroundImageContainer as w}from"./WhatsNew.styles.js";const b=t=>{let{width:s=32,height:o=32}=t;return e.jsx("svg",Object.assign({width:s,height:o,viewBox:"0 0 24 24",fill:"none"},{children:e.jsx("path",{d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}))},f=t=>{let{width:s=32,height:o=32}=t;return e.jsxs("svg",Object.assign({width:s,height:o,viewBox:"0 0 32 32",fill:"none"},{children:[e.jsx("path",{d:"M16 2C8.268 2 2 8.268 2 16s6.268 14 14 14 14-6.268 14-14S23.732 2 16 2zm0 25c-6.065 0-11-4.935-11-11S9.935 5 16 5s11 4.935 11 11-4.935 11-11 11z",fill:"currentColor"}),e.jsx("path",{d:"M16 10.5c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zM15 15h2v8h-2v-8z",fill:"currentColor"})]}))},C=C=>{let{isOpen:v,onClose:y,content:O,isLoading:N=!1,title:k="What's new on BIK",searchPlaceholder:M="Search posts",emptyStateTitle:S="Nothing new!",emptyStateDescription:L="There are no new updates or features at the moment. Check back soon!",noResultsText:U="Sorry, no results found.",width:V="480px",onContentClick:A,renderCustomContent:D}=C;const[T,W]=o(""),[z,B]=o(!1),[F,_]=o("");console.log("WhatsNewPanel render - isVideoModalOpen:",z,"videoUrl:",F);const E=e=>{if(!e.createdAt)return!1;const t=e.createdAt.toDate?e.createdAt.toDate():new Date(e.createdAt);return s(new Date,t)<7},P=n((()=>{if(!T.trim())return O;const e=T.toLowerCase();return O.filter((t=>t.title.toLowerCase().includes(e)||t.body.toLowerCase().includes(e)||t.content&&t.content.toLowerCase().includes(e)))}),[O,T]),R=0===O.length,I=0===P.length;return v?e.jsxs(c,Object.assign({width:V,onClose:y,header:"",headerCustomComponent:e.jsx(d,Object.assign({color:r.background.inverse},{children:k})),headerStyle:{background:r.background.brandLight},hideFooter:!0},{children:[e.jsxs(x,{children:[e.jsx("div",Object.assign({className:"mt-8"},{children:e.jsx(a,{width:"100%",isEnabled:!R,onChange:e=>{W(e)},onEnter:e=>{W(e)},placeholder:M,variant:"default",searchValue:T,onClickCross:()=>{W("")}})})),e.jsx(u,{children:R||I?e.jsxs("div",Object.assign({className:"no--data--found"},{children:[e.jsx("div",Object.assign({className:"icon--wrapper"},{children:R?e.jsx(f,{width:32,height:32}):e.jsx(b,{width:32,height:32})})),R?e.jsxs(e.Fragment,{children:[e.jsx(h,{children:S}),e.jsx(m,Object.assign({color:r.content.secondary,className:"text--align",style:{maxWidth:300}},{children:L}))]}):I?e.jsx(m,Object.assign({color:r.content.secondary,className:"text--align",style:{maxWidth:300}},{children:U})):null]})):e.jsx("div",Object.assign({className:"scroller"},{children:P.map(((s,o)=>D?D(s):e.jsxs(p,Object.assign({className:"padding--16 mb-mt-8"},{children:[e.jsx(w,{imageUrl:s.image,height:"209px",width:"100%",style:{borderRadius:"4px"}}),e.jsx("div",Object.assign({className:"mt-20 full--width"},{children:e.jsxs("div",Object.assign({className:"created--at flex flex--row"},{children:[E(s)?e.jsx("div",Object.assign({className:"new--content--tag"},{children:e.jsx(j,{children:"New"})})):e.jsx(e.Fragment,{}),e.jsx(j,Object.assign({style:{color:r.content.placeholder}},{children:s.createdAt?t(s.createdAt.toDate?s.createdAt.toDate():new Date(s.createdAt),"dd MMMM yyyy"):""}))]}))})),e.jsx("div",Object.assign({className:"mt--8"},{children:e.jsx(g,{children:s.title})})),e.jsx("div",{dangerouslySetInnerHTML:{__html:s.body},className:"card--desc mt--12"}),e.jsx("div",Object.assign({className:"flex flex--row mt-20 full--width"},{children:e.jsx(i,{buttonText:s.buttonText||"Explore the feature",onClick:()=>(e=>{console.log("handleContentClick called with:",e),console.log("productVideo:",e.productVideo),console.log("redirectUrl:",e.redirectUrl),console.log("onContentClick:",A),e.productVideo?(console.log("Setting video URL:",e.productVideo),_(e.productVideo),B(!0),console.log("Video modal state set to true")):e.redirectUrl&&(console.log("Opening redirectUrl:",e.redirectUrl),window.open(e.redirectUrl,"_blank")),A&&(console.log("Calling onContentClick for analytics"),A(e))})(s),matchParentWidth:!0,size:"medium"})}))]}),`whats-new-${o}`)))}))})]}),e.jsx(l,{isOpen:z,videoUrl:F,onClose:()=>{console.log("Closing video modal"),B(!1)}})]})):e.jsx(e.Fragment,{})};export{C as WhatsNewPanel};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.703-beta.9",
3
+ "version": "0.0.704",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",
@@ -48,6 +48,7 @@
48
48
  "dependencies": {
49
49
  "@amplitude/analytics-browser": "^2.9.3",
50
50
  "@babel/runtime": "^7.20.7",
51
+ "@bikdotai/bik-component-library": "^0.0.703-beta.13",
51
52
  "@bikdotai/bik-models": "^2.12.0",
52
53
  "@lottiefiles/react-lottie-player": "^3.5.3",
53
54
  "@popperjs/core": "^2.11.7",