cortex-react-components 1.42.5 → 1.42.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/chunk-4NETKTTT.mjs +1 -0
  2. package/dist/chunk-AHLX3GTH.mjs +1 -0
  3. package/dist/{chunk-NOQUNWQW.mjs → chunk-CDYA6NPD.mjs} +1 -1
  4. package/dist/{chunk-TQCGX4Y6.mjs → chunk-ETU7V76A.mjs} +1 -1
  5. package/dist/{chunk-YOOGQIDR.mjs → chunk-FK53HAB6.mjs} +1 -1
  6. package/dist/{chunk-EI7PFWFS.mjs → chunk-FO3SKORU.mjs} +1 -1
  7. package/dist/{chunk-NLTSDI7A.mjs → chunk-M7Q7FB5A.mjs} +1 -1
  8. package/dist/{chunk-DF3LBG6O.mjs → chunk-OSNRRT4M.mjs} +1 -1
  9. package/dist/{chunk-SBHCQ2HK.mjs → chunk-QN26GI2T.mjs} +1 -1
  10. package/dist/{chunk-ZCPNHUKK.mjs → chunk-UBPXT2KW.mjs} +1 -1
  11. package/dist/{chunk-SG5H4A2U.mjs → chunk-V4SV2OKK.mjs} +1 -1
  12. package/dist/{chunk-AF5ISZTG.mjs → chunk-VRIZ42XB.mjs} +1 -1
  13. package/dist/{chunk-VWNFINDU.mjs → chunk-WDREYBFE.mjs} +1 -1
  14. package/dist/{chunk-23L5ZJ2U.mjs → chunk-Z4CK655R.mjs} +1 -1
  15. package/dist/components/Blocks/index.mjs +1 -1
  16. package/dist/components/CRM/DealCard.stories.js +1 -1
  17. package/dist/components/CRM/DealCard.stories.mjs +1 -1
  18. package/dist/components/CRM/DealDetails.js +1 -1
  19. package/dist/components/CRM/DealDetails.mjs +1 -1
  20. package/dist/components/CRM/DealDetails.stories.js +1 -1
  21. package/dist/components/CRM/DealDetails.stories.mjs +1 -1
  22. package/dist/components/CRM/KanbanBoard.js +1 -1
  23. package/dist/components/CRM/KanbanBoard.mjs +1 -1
  24. package/dist/components/CRM/KanbanBoard.stories.js +1 -1
  25. package/dist/components/CRM/KanbanBoard.stories.mjs +1 -1
  26. package/dist/components/CRM/KanbanColumn.stories.js +1 -1
  27. package/dist/components/CRM/KanbanColumn.stories.mjs +1 -1
  28. package/dist/components/CRM/NewDealForm.stories.js +1 -1
  29. package/dist/components/CRM/NewDealForm.stories.mjs +1 -1
  30. package/dist/components/CRM/index.js +1 -1
  31. package/dist/components/CRM/index.mjs +1 -1
  32. package/dist/components/CRM/mockData.js +1 -1
  33. package/dist/components/CRM/mockData.mjs +1 -1
  34. package/dist/components/CRM/types.d.ts +1 -1
  35. package/dist/components/CRM/types.js +1 -1
  36. package/dist/components/Cards/ServiceCard.mjs +1 -1
  37. package/dist/components/Cards/ServiceCard.stories.mjs +1 -1
  38. package/dist/components/Cards/index.mjs +1 -1
  39. package/dist/components/HeaderFooter/Footer.mjs +1 -1
  40. package/dist/components/HeaderFooter/Footer.stories.mjs +1 -1
  41. package/dist/components/HeaderFooter/Header.mjs +1 -1
  42. package/dist/components/HeaderFooter/Header.stories.mjs +1 -1
  43. package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
  44. package/dist/components/HeaderFooter/HeaderDesktop.stories.mjs +1 -1
  45. package/dist/components/HeaderFooter/HeaderMobile.stories.mjs +1 -1
  46. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  47. package/dist/components/HeaderFooter/index.mjs +1 -1
  48. package/dist/components/Heros/PostHero/index.mjs +1 -1
  49. package/dist/components/Heros/RenderHero.mjs +1 -1
  50. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  51. package/dist/components/Heros/index.mjs +1 -1
  52. package/dist/components/Layouts/BlogList.mjs +1 -1
  53. package/dist/components/Layouts/BlogList.stories.mjs +1 -1
  54. package/dist/components/Layouts/SlideShow.mjs +1 -1
  55. package/dist/components/Layouts/SlideShow.stories.mjs +1 -1
  56. package/dist/components/Layouts/index.mjs +1 -1
  57. package/dist/components/index.js +3 -3
  58. package/dist/components/index.mjs +1 -1
  59. package/dist/components/ui/index.mjs +1 -1
  60. package/dist/hooks/index.mjs +1 -1
  61. package/dist/index.js +3 -3
  62. package/dist/index.mjs +1 -1
  63. package/dist/metafile-cjs.json +1 -1
  64. package/dist/metafile-esm.json +1 -1
  65. package/dist/pages/Blog.mjs +1 -1
  66. package/dist/pages/Blog.stories.mjs +1 -1
  67. package/dist/pages/Documentation.mjs +1 -1
  68. package/dist/pages/Documentation.stories.mjs +1 -1
  69. package/dist/pages/IndexPage.mjs +1 -1
  70. package/dist/pages/IndexPage.stories.mjs +1 -1
  71. package/dist/pages/Intranet.mjs +1 -1
  72. package/dist/pages/Intranet.stories.mjs +1 -1
  73. package/dist/pages/LandingPage.mjs +1 -1
  74. package/dist/pages/LandingPage.stories.mjs +1 -1
  75. package/dist/pages/Page.mjs +1 -1
  76. package/dist/pages/Page.stories.mjs +1 -1
  77. package/dist/pages/Publish.mjs +1 -1
  78. package/dist/pages/Publish.stories.mjs +1 -1
  79. package/dist/pages/Website.mjs +1 -1
  80. package/dist/pages/Website.stories.mjs +1 -1
  81. package/dist/sections/BlogDetail.mjs +1 -1
  82. package/dist/sections/BlogDetail.stories.mjs +1 -1
  83. package/dist/sections/ContactSection.mjs +1 -1
  84. package/dist/sections/ContactSection.stories.mjs +1 -1
  85. package/dist/sections/ServiceSection.mjs +1 -1
  86. package/dist/sections/ServiceSection.stories.mjs +1 -1
  87. package/dist/sections/form/index.mjs +1 -1
  88. package/dist/sections/index.mjs +1 -1
  89. package/package.json +1 -1
  90. package/dist/chunk-3EVGORF6.mjs +0 -1
  91. package/dist/chunk-6TQAMZEH.mjs +0 -1
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "cortex-react-components",
3
3
  "author": "Cortex Reply",
4
4
  "private": false,
5
- "version": "1.42.5",
5
+ "version": "1.42.6",
6
6
  "description": "A library of React components with styles. Designed to seamlessly integrate with React and Next.js.",
7
7
  "license": "MPL-2.0",
8
8
  "main": "./dist/index.js",
@@ -1 +0,0 @@
1
- var e=[{id:1,name:"Acme Corp",intro:"A leading technology company",active:!0},{id:2,name:"GlobalTech",intro:"Innovative solutions provider",active:!0},{id:3,name:"InnoSystems",intro:"Cutting-edge software development",active:!1}],t=[{id:"1",name:"Software",type:"proposition"},{id:"2",name:"Hardware",type:"proposition"},{id:"3",name:"Referral",type:"source"},{id:"4",name:"Outbound",type:"source"},{id:"5",name:"Tech",type:"sector"},{id:"6",name:"Finance",type:"sector"}],o=[{id:1,customer:{id:1,name:"Acme Corp",active:!0},value:5e4,assignee:{id:1,name:"John Doe"},status:"Qualified",categories:["1","3","5"],dateLogged:"2023-01-15",closureDate:"2023-06-30",updatedAt:"2023-05-01T10:00:00Z",comments:[{id:"1",text:"Initial contact made",author:"John Doe",timestamp:"2023-01-15T09:00:00Z"}],description:"Potential software solution for Acme Corp"},{id:2,customer:{id:2,name:"GlobalTech",active:!0},value:75e3,assignee:{id:2,name:"Jane Smith"},status:"Proposal",categories:["2","4","6"],dateLogged:"2023-02-01",closureDate:"2023-07-31",updatedAt:"2023-05-10T14:30:00Z",comments:[{id:"2",text:"Proposal sent",author:"Jane Smith",timestamp:"2023-05-10T14:30:00Z"}],description:"Custom hardware solution for GlobalTech"}],a=[{id:1,name:"John Doe",email:"john.doe@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:2,name:"Jane Smith",email:"jane.smith@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:3,name:"Bob Johnson",email:"bob.johnson@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:4,name:"Alice Brown",email:"alice.brown@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"},{id:5,name:"Charlie Davis",email:"charlie.davis@example.com",role:"user",createdAt:"2023-01-01",updatedAt:"2023-01-01"}],r={deals:o,users:a,customers:e,categories:t},i=["Cold","Qualified","Proposal","Won","Lost"];export{e as a,t as b,o as c,a as d,r as e,i as f};
@@ -1 +0,0 @@
1
- import{a as x}from"./chunk-4NKKWJ2X.mjs";import{a as N,c as C,d as f,g as h,i as y}from"./chunk-4JC2TJML.mjs";import{a as I,f as T,g as E,i as P}from"./chunk-JWDVKGZL.mjs";import{a as H}from"./chunk-A5EYIB3V.mjs";import{a as i}from"./chunk-DWRQHV42.mjs";import{a as M}from"./chunk-Y5ZFXDW5.mjs";import{a as c}from"./chunk-QOIH63J3.mjs";import{b as R}from"./chunk-Q6SEVCRG.mjs";import{b as m}from"./chunk-GLEWUUGS.mjs";import{useState as u,useEffect as j}from"react";import{UserIcon as q,CalendarIcon as K,SaveIcon as X,Edit2Icon as Y,PlusIcon as Z}from"lucide-react";import{jsx as a,jsxs as t}from"react/jsx-runtime";function ge({deal:g,users:b,customer:p,categories:S,onClose:O,onSave:U,onAddComment:V}){var L,B,A;let[s,J]=u({...g,value:g.value||0}),[v,D]=u(""),[z,w]=u(!1),[r,l]=u(null);j(()=>{w(JSON.stringify(g)!==JSON.stringify(s))},[g,s]);let G=()=>{U(s),w(!1),l(null)},n=(e,o)=>{J(d=>({...d,[e]:o}))},Q=e=>{let o=s.categories.includes(e)?s.categories.filter(d=>d!==e):[...s.categories,e];n("categories",o)},W=()=>{v.trim()&&(V({id:Date.now().toString(),text:v,timestamp:new Date().toISOString()}),D(""))},k=e=>{switch(e){case"proposition":return"bg-blue-100 text-blue-800";case"source":return"bg-green-100 text-green-800";case"sector":return"bg-purple-100 text-purple-800";default:return"bg-gray-100 text-gray-800"}},_=(e,o,d)=>{let F=r===e;return t("div",{className:"grid gap-2",children:[a(i,{className:"text-sm font-medium text-gray-500",children:o}),t("div",{className:"flex items-center space-x-2",children:[d,F?a(c,{value:s[e],onChange:$=>n(e,$.target.value),onBlur:()=>l(null),autoFocus:!0}):a("div",{className:"flex-grow cursor-pointer hover:bg-gray-100 p-2 rounded",onClick:()=>l(e),children:s[e]}),!F&&a(m,{variant:"ghost",size:"sm",onClick:()=>l(e),children:a(Y,{className:"w-4 h-4"})})]})]})};return a(I,{open:!0,children:t(T,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[t(E,{className:"flex flex-row items-center justify-between",children:[a(P,{className:"text-2xl font-bold",children:p==null?void 0:p.name}),t("div",{className:"flex space-x-2",children:[a(m,{variant:"outline",onClick:O,children:"Close"}),t(m,{onClick:G,disabled:!z,children:[a(X,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),t(x,{className:"flex-grow pr-4",children:[t("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[a("div",{className:"grid gap-2",children:r==="value"?a(c,{type:"number",value:s.value,onChange:e=>n("value",Number(e.target.value)),onBlur:()=>l(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):t("div",{className:"text-3xl font-bold text-green-600 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>l("value"),children:["\xA3",(L=s.value)==null?void 0:L.toLocaleString()]})}),t("div",{className:"grid gap-2",children:[a(i,{className:"text-sm font-medium text-gray-500",children:"Assignee"}),r==="assignee"?t(N,{value:((A=(B=s==null?void 0:s.assignee)==null?void 0:B.id)==null?void 0:A.toString())||"",onValueChange:e=>n("assignee",e),children:[a(f,{children:a(C,{placeholder:"Select assignee"})}),a(h,{children:b&&b.map(e=>{var o;return a(y,{value:((o=e==null?void 0:e.id)==null?void 0:o.toString())||"",children:e.name},e.id)})})]}):t("div",{className:"flex items-center space-x-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>l("assignee"),children:[a(q,{className:"w-4 h-4 text-gray-400"}),a("span",{children:s.assignee.name})]})]}),t("div",{className:"grid gap-2",children:[a(i,{className:"text-sm font-medium text-gray-500",children:"Closure Date"}),r==="closureDate"?a(c,{type:"date",value:s.closureDate.split("T")[0],onChange:e=>n("closureDate",e.target.value),onBlur:()=>l(null),autoFocus:!0}):t("div",{className:"flex items-center space-x-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>l("closureDate"),children:[a(K,{className:"w-4 h-4 text-gray-400"}),a("span",{children:new Date(s.closureDate).toLocaleDateString("en-GB")})]})]})]}),a("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:t("div",{className:"grid gap-2",children:[a(i,{className:"text-sm font-medium text-gray-500",children:"Description"}),r==="description"?a(H,{value:s.description,onChange:e=>n("description",e.target.value),onBlur:()=>l(null),className:"min-h-[100px]",autoFocus:!0}):a("div",{className:"cursor-pointer hover:bg-gray-100 pb-5 rounded",onClick:()=>l("description"),children:s.description})]})}),t("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[t("div",{className:"grid gap-2",children:[a(i,{className:"text-sm font-medium text-gray-500",children:"Status"}),r==="status"?t(N,{value:s.status,onValueChange:e=>{n("status",e),l(null)},children:[a(f,{children:a(C,{placeholder:"Select status"})}),a(h,{children:["Cold","Qualified","Proposal Made","Won","Lost"].map(e=>a(y,{value:e,children:e},e))})]}):a("div",{className:"cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>l("status"),children:s.status})]}),t("div",{className:"grid col-span-2 gap-2",children:[a(i,{className:"text-sm font-medium text-gray-500",children:"Categories"}),r==="categories"?a("div",{className:"grid grid-cols-2 gap-2",children:S.map(e=>t("div",{className:"flex items-center space-x-2",children:[a(M,{id:e.id,checked:s.categories.includes(e.id),onCheckedChange:()=>Q(e.id)}),a("label",{htmlFor:e.id,className:`text-sm font-medium ${k(e.type)} px-2 py-1 rounded`,children:e.name})]},e.id))}):a("div",{className:"flex flex-wrap gap-2 cursor-pointer hover:bg-gray-100 p-0 rounded",onClick:()=>l("categories"),children:s.categories.map(e=>{let o=S.find(d=>d.id===e);return o?a(R,{variant:"secondary",className:k(o.type),children:o.name},o.id):null})})]})]}),t("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[t("div",{className:"grid gap-2",children:[a(i,{className:"text-sm font-medium text-gray-500",children:"Comments"}),a(x,{className:"h-[200px] overflow-y-auto",children:a("div",{className:"space-y-2",children:s.comments.map(e=>t("div",{className:"bg-gray-50 p-3 rounded-lg",children:[a("p",{className:"text-sm text-gray-700",children:e.text}),t("p",{className:"text-xs text-gray-500 mt-1",children:[e.author," - ",new Date(e.timestamp).toLocaleString()]})]},e.id))})}),t("div",{className:"flex mt-2",children:[a(c,{value:v,onChange:e=>D(e.target.value),placeholder:"Add a comment...",className:"flex-grow"}),t(m,{onClick:W,className:"ml-2",children:[a(Z,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),t("div",{className:"text-xs text-gray-500 mt-4",children:["Last modified: ",new Date(s.updatedAt).toLocaleString()]})]})]})]})})}export{ge as a};