cortex-react-components 1.42.3 → 1.42.5

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 (147) hide show
  1. package/dist/chunk-3EVGORF6.mjs +1 -0
  2. package/dist/chunk-3FW5YDNM.mjs +1 -0
  3. package/dist/{chunk-23EQTK7B.mjs → chunk-423OEU3K.mjs} +1 -1
  4. package/dist/chunk-6TQAMZEH.mjs +1 -0
  5. package/dist/{chunk-REHZTVVN.mjs → chunk-7322R3ID.mjs} +1 -1
  6. package/dist/{chunk-4KGFHVYD.mjs → chunk-74TGU5CZ.mjs} +1 -1
  7. package/dist/{chunk-ROEHSKFW.mjs → chunk-AF5ISZTG.mjs} +1 -1
  8. package/dist/{chunk-AEPYNOEK.mjs → chunk-AS3NR4OU.mjs} +1 -1
  9. package/dist/{chunk-ZOLLFX4E.mjs → chunk-D3PXELYK.mjs} +1 -1
  10. package/dist/{chunk-U3RGJJNS.mjs → chunk-DF3LBG6O.mjs} +1 -1
  11. package/dist/{chunk-Y6CZVVJF.mjs → chunk-HUN2X4VH.mjs} +1 -1
  12. package/dist/{chunk-YDQUZWFZ.mjs → chunk-HVA2GFDG.mjs} +1 -1
  13. package/dist/{chunk-NGK3IDFP.mjs → chunk-ICTOXY7D.mjs} +1 -1
  14. package/dist/chunk-LRIIP54N.mjs +1 -0
  15. package/dist/{chunk-EW2X7RMJ.mjs → chunk-M7BWRL34.mjs} +1 -1
  16. package/dist/{chunk-UD7JYMRU.mjs → chunk-MANZDSTF.mjs} +1 -1
  17. package/dist/{chunk-4R7S6EEU.mjs → chunk-NLTSDI7A.mjs} +1 -1
  18. package/dist/{chunk-A2YLYBNZ.mjs → chunk-NOQUNWQW.mjs} +1 -1
  19. package/dist/{chunk-WPTEMDOP.mjs → chunk-PV5S3GA7.mjs} +1 -1
  20. package/dist/{chunk-PBAL3B6N.mjs → chunk-Q5EQOIL7.mjs} +1 -1
  21. package/dist/{chunk-AEDBEVEE.mjs → chunk-Q77U5BXI.mjs} +1 -1
  22. package/dist/chunk-QH3BNFVD.mjs +1 -0
  23. package/dist/{chunk-HZ5QHCGZ.mjs → chunk-QIGWPB3D.mjs} +1 -1
  24. package/dist/{chunk-XBBQGSYP.mjs → chunk-R7P4VVM3.mjs} +1 -1
  25. package/dist/chunk-SG5H4A2U.mjs +4 -0
  26. package/dist/{chunk-PVRWMAHW.mjs → chunk-UK4IPFAO.mjs} +1 -1
  27. package/dist/{chunk-AEBN4SQU.mjs → chunk-VWNFINDU.mjs} +1 -1
  28. package/dist/{chunk-4ZT572BM.mjs → chunk-YDGF5GEU.mjs} +1 -1
  29. package/dist/{chunk-YKDVNCHV.mjs → chunk-YOOGQIDR.mjs} +1 -1
  30. package/dist/{chunk-4L4RAUPG.mjs → chunk-YQZH5MJU.mjs} +1 -1
  31. package/dist/{chunk-MGXZTIQQ.mjs → chunk-ZCPNHUKK.mjs} +1 -1
  32. package/dist/chunk-ZXPDKKGX.mjs +1 -0
  33. package/dist/components/Blocks/Banner.mjs +1 -1
  34. package/dist/components/Blocks/CallToAction.mjs +1 -1
  35. package/dist/components/Blocks/Content.mjs +1 -1
  36. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  37. package/dist/components/Blocks/FeaturesBlock.stories.mjs +1 -1
  38. package/dist/components/Blocks/ImageBlock.mjs +1 -1
  39. package/dist/components/Blocks/MediaBlock.mjs +1 -1
  40. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  41. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  42. package/dist/components/Blocks/index.mjs +1 -1
  43. package/dist/components/CRM/DealCard.d.ts +2 -2
  44. package/dist/components/CRM/DealCard.js +1 -1
  45. package/dist/components/CRM/DealCard.mjs +1 -1
  46. package/dist/components/CRM/DealCard.stories.js +1 -1
  47. package/dist/components/CRM/DealCard.stories.mjs +1 -1
  48. package/dist/components/CRM/DealDetails.d.ts +3 -3
  49. package/dist/components/CRM/DealDetails.js +1 -1
  50. package/dist/components/CRM/DealDetails.mjs +1 -1
  51. package/dist/components/CRM/DealDetails.stories.js +1 -1
  52. package/dist/components/CRM/DealDetails.stories.mjs +1 -1
  53. package/dist/components/CRM/KanbanBoard.d.ts +2 -2
  54. package/dist/components/CRM/KanbanBoard.js +1 -1
  55. package/dist/components/CRM/KanbanBoard.mjs +1 -1
  56. package/dist/components/CRM/KanbanBoard.stories.js +1 -1
  57. package/dist/components/CRM/KanbanBoard.stories.mjs +1 -1
  58. package/dist/components/CRM/KanbanColumn.d.ts +4 -4
  59. package/dist/components/CRM/KanbanColumn.js +1 -1
  60. package/dist/components/CRM/KanbanColumn.mjs +1 -1
  61. package/dist/components/CRM/KanbanColumn.stories.js +1 -1
  62. package/dist/components/CRM/KanbanColumn.stories.mjs +1 -1
  63. package/dist/components/CRM/NewCustomerForm.d.ts +2 -2
  64. package/dist/components/CRM/NewCustomerForm.js +1 -1
  65. package/dist/components/CRM/NewCustomerForm.mjs +1 -1
  66. package/dist/components/CRM/NewCustomerForm.stories.js +1 -1
  67. package/dist/components/CRM/NewCustomerForm.stories.mjs +1 -1
  68. package/dist/components/CRM/NewDealForm.d.ts +6 -5
  69. package/dist/components/CRM/NewDealForm.js +1 -1
  70. package/dist/components/CRM/NewDealForm.mjs +1 -1
  71. package/dist/components/CRM/NewDealForm.stories.js +1 -1
  72. package/dist/components/CRM/NewDealForm.stories.mjs +1 -1
  73. package/dist/components/CRM/index.js +1 -1
  74. package/dist/components/CRM/index.mjs +1 -1
  75. package/dist/components/CRM/mockData.d.ts +2 -2
  76. package/dist/components/CRM/mockData.js +1 -1
  77. package/dist/components/CRM/mockData.mjs +1 -1
  78. package/dist/components/CRM/types.d.ts +8 -14
  79. package/dist/components/CRM/types.js +1 -1
  80. package/dist/components/Cards/index.mjs +1 -1
  81. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  82. package/dist/components/HeaderFooter/index.mjs +1 -1
  83. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  84. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  85. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  86. package/dist/components/Heros/PostHero/index.mjs +1 -1
  87. package/dist/components/Heros/RenderHero.mjs +1 -1
  88. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  89. package/dist/components/Heros/index.mjs +1 -1
  90. package/dist/components/Layouts/BlogList.mjs +1 -1
  91. package/dist/components/Layouts/BlogList.stories.mjs +1 -1
  92. package/dist/components/Layouts/SlideShow.mjs +1 -1
  93. package/dist/components/Layouts/SlideShow.stories.mjs +1 -1
  94. package/dist/components/Layouts/index.mjs +1 -1
  95. package/dist/components/Menus/index.mjs +1 -1
  96. package/dist/components/Payload/Card/index.mjs +1 -1
  97. package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
  98. package/dist/components/Payload/Media/index.mjs +1 -1
  99. package/dist/components/Payload/RichText/index.mjs +1 -1
  100. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  101. package/dist/components/Payload/RichText.stories.mjs +1 -1
  102. package/dist/components/Payload/index.mjs +1 -1
  103. package/dist/components/index.js +4 -4
  104. package/dist/components/index.mjs +1 -1
  105. package/dist/components/ui/index.mjs +1 -1
  106. package/dist/index.js +4 -4
  107. package/dist/index.mjs +1 -1
  108. package/dist/metafile-cjs.json +1 -1
  109. package/dist/metafile-esm.json +1 -1
  110. package/dist/pages/Blog.mjs +1 -1
  111. package/dist/pages/Blog.stories.mjs +1 -1
  112. package/dist/pages/Documentation.mjs +1 -1
  113. package/dist/pages/Documentation.stories.mjs +1 -1
  114. package/dist/pages/IndexPage.mjs +1 -1
  115. package/dist/pages/IndexPage.stories.mjs +1 -1
  116. package/dist/pages/Intranet.mjs +1 -1
  117. package/dist/pages/Intranet.stories.mjs +1 -1
  118. package/dist/pages/LandingPage.mjs +1 -1
  119. package/dist/pages/LandingPage.stories.mjs +1 -1
  120. package/dist/pages/Page.mjs +1 -1
  121. package/dist/pages/Page.stories.mjs +1 -1
  122. package/dist/pages/Publish.mjs +1 -1
  123. package/dist/pages/Publish.stories.mjs +1 -1
  124. package/dist/pages/Website.mjs +1 -1
  125. package/dist/pages/Website.stories.mjs +1 -1
  126. package/dist/sections/AboutSection.mjs +1 -1
  127. package/dist/sections/AboutSection.stories.mjs +1 -1
  128. package/dist/sections/BlogDetail.mjs +1 -1
  129. package/dist/sections/BlogDetail.stories.mjs +1 -1
  130. package/dist/sections/BlogListSection.mjs +1 -1
  131. package/dist/sections/BlogListSection.stories.mjs +1 -1
  132. package/dist/sections/ContactSection.mjs +1 -1
  133. package/dist/sections/ContactSection.stories.mjs +1 -1
  134. package/dist/sections/PricingSection.mjs +1 -1
  135. package/dist/sections/PricingSection.stories.mjs +1 -1
  136. package/dist/sections/index.mjs +1 -1
  137. package/package.json +1 -1
  138. package/dist/chunk-EMWBQUQC.mjs +0 -1
  139. package/dist/chunk-HIT3PDJA.mjs +0 -1
  140. package/dist/chunk-HQFNGDDO.mjs +0 -1
  141. package/dist/chunk-SILLEZTI.mjs +0 -4
  142. package/dist/chunk-TSPWI4RS.mjs +0 -1
  143. package/dist/chunk-YOFO7YSO.mjs +0 -1
  144. package/dist/chunk-ZDNAXLAG.mjs +0 -1
  145. package/dist/components/CRM/actions.d.ts +0 -7
  146. package/dist/components/CRM/actions.js +0 -4
  147. package/dist/components/CRM/actions.mjs +0 -4
@@ -1 +1 @@
1
- import{a}from"../chunk-YKDVNCHV.mjs";import"../chunk-EI7PFWFS.mjs";import"../chunk-CTKUF2I6.mjs";import"../chunk-NOEITQK2.mjs";import"../chunk-EG6XIOOJ.mjs";import"../chunk-MMBUMBDU.mjs";import"../chunk-KML6U7IE.mjs";import"../chunk-XBBQGSYP.mjs";import"../chunk-HZ5QHCGZ.mjs";import"../chunk-O5BAW5XQ.mjs";import"../chunk-NWW7KWJK.mjs";import"../chunk-PVRWMAHW.mjs";import"../chunk-Y6CZVVJF.mjs";import"../chunk-NGK3IDFP.mjs";import"../chunk-TFWGOEV7.mjs";import"../chunk-YNDKGRL6.mjs";import"../chunk-763KMQIQ.mjs";import"../chunk-J2VQUYES.mjs";import"../chunk-SJWGFZJ6.mjs";import"../chunk-44TDI42O.mjs";import"../chunk-BOPZHZ27.mjs";import"../chunk-GLEWUUGS.mjs";import"../chunk-UESKYRNK.mjs";import"../chunk-NIQ4466A.mjs";import"../chunk-6K2R3OAD.mjs";import"../chunk-S7OK7D5I.mjs";export{a as ContactSection};
1
+ import{a}from"../chunk-YOOGQIDR.mjs";import"../chunk-EI7PFWFS.mjs";import"../chunk-CTKUF2I6.mjs";import"../chunk-NOEITQK2.mjs";import"../chunk-EG6XIOOJ.mjs";import"../chunk-MMBUMBDU.mjs";import"../chunk-KML6U7IE.mjs";import"../chunk-R7P4VVM3.mjs";import"../chunk-QIGWPB3D.mjs";import"../chunk-O5BAW5XQ.mjs";import"../chunk-NWW7KWJK.mjs";import"../chunk-UK4IPFAO.mjs";import"../chunk-HUN2X4VH.mjs";import"../chunk-ICTOXY7D.mjs";import"../chunk-YNDKGRL6.mjs";import"../chunk-TFWGOEV7.mjs";import"../chunk-763KMQIQ.mjs";import"../chunk-J2VQUYES.mjs";import"../chunk-SJWGFZJ6.mjs";import"../chunk-44TDI42O.mjs";import"../chunk-BOPZHZ27.mjs";import"../chunk-GLEWUUGS.mjs";import"../chunk-UESKYRNK.mjs";import"../chunk-NIQ4466A.mjs";import"../chunk-6K2R3OAD.mjs";import"../chunk-S7OK7D5I.mjs";export{a as ContactSection};
@@ -1 +1 @@
1
- import{a as o}from"../chunk-YKDVNCHV.mjs";import"../chunk-EI7PFWFS.mjs";import"../chunk-CTKUF2I6.mjs";import"../chunk-NOEITQK2.mjs";import"../chunk-EG6XIOOJ.mjs";import"../chunk-MMBUMBDU.mjs";import"../chunk-KML6U7IE.mjs";import"../chunk-XBBQGSYP.mjs";import"../chunk-HZ5QHCGZ.mjs";import"../chunk-O5BAW5XQ.mjs";import"../chunk-NWW7KWJK.mjs";import"../chunk-PVRWMAHW.mjs";import"../chunk-Y6CZVVJF.mjs";import"../chunk-NGK3IDFP.mjs";import"../chunk-TFWGOEV7.mjs";import"../chunk-YNDKGRL6.mjs";import"../chunk-763KMQIQ.mjs";import"../chunk-J2VQUYES.mjs";import"../chunk-SJWGFZJ6.mjs";import"../chunk-44TDI42O.mjs";import"../chunk-BOPZHZ27.mjs";import"../chunk-GLEWUUGS.mjs";import"../chunk-UESKYRNK.mjs";import"../chunk-NIQ4466A.mjs";import"../chunk-6K2R3OAD.mjs";import"../chunk-S7OK7D5I.mjs";import{Toaster as a}from"sonner";import{Fragment as c,jsx as e,jsxs as s}from"react/jsx-runtime";var l={title:"Sections/ContactSection",component:o,tags:["autodocs"],parameters:{docs:{description:{component:"A card component that displays a service with an icon, title, description, and a link."}}},argTypes:{},decorators:[t=>s(c,{children:[e(t,{}),e(a,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9})]})]},n=t=>e(o,{...t}),i=n.bind({});i.args={sectionHeading:{title:"Get in Touch",subtitle:"We would love to hear from you"},image:{src:"/assets/images/contact.png",alt:"Contact Us",blurDataURL:"data:image/jpeg;base64,..."},contactInfo:{sectionHeading:{title:"Contact Information",subtitle:"Reach out to us through any of the following methods"},location:"123 Main Street, Anytown, AT 12345",mail:"info@example.com",phone:"+1 (555) 123-4567"},locations:[{title:"Head Office",location:"123 Main Street, Anytown, AT 12345",mails:["headoffice@example.com"],phoneNumbers:["+1 (555) 123-4567"],embedUrl:"https://www.google.com/maps/embed?..."},{title:"Branch Office",location:"456 Elm Street, Othertown, OT 67890",mails:["branchoffice@example.com"],phoneNumbers:["+1 (555) 987-6543"],embedUrl:"https://www.google.com/maps/embed?..."}]};export{i as Default,l as default};
1
+ import{a as o}from"../chunk-YOOGQIDR.mjs";import"../chunk-EI7PFWFS.mjs";import"../chunk-CTKUF2I6.mjs";import"../chunk-NOEITQK2.mjs";import"../chunk-EG6XIOOJ.mjs";import"../chunk-MMBUMBDU.mjs";import"../chunk-KML6U7IE.mjs";import"../chunk-R7P4VVM3.mjs";import"../chunk-QIGWPB3D.mjs";import"../chunk-O5BAW5XQ.mjs";import"../chunk-NWW7KWJK.mjs";import"../chunk-UK4IPFAO.mjs";import"../chunk-HUN2X4VH.mjs";import"../chunk-ICTOXY7D.mjs";import"../chunk-YNDKGRL6.mjs";import"../chunk-TFWGOEV7.mjs";import"../chunk-763KMQIQ.mjs";import"../chunk-J2VQUYES.mjs";import"../chunk-SJWGFZJ6.mjs";import"../chunk-44TDI42O.mjs";import"../chunk-BOPZHZ27.mjs";import"../chunk-GLEWUUGS.mjs";import"../chunk-UESKYRNK.mjs";import"../chunk-NIQ4466A.mjs";import"../chunk-6K2R3OAD.mjs";import"../chunk-S7OK7D5I.mjs";import{Toaster as a}from"sonner";import{Fragment as c,jsx as e,jsxs as s}from"react/jsx-runtime";var l={title:"Sections/ContactSection",component:o,tags:["autodocs"],parameters:{docs:{description:{component:"A card component that displays a service with an icon, title, description, and a link."}}},argTypes:{},decorators:[t=>s(c,{children:[e(t,{}),e(a,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9})]})]},n=t=>e(o,{...t}),i=n.bind({});i.args={sectionHeading:{title:"Get in Touch",subtitle:"We would love to hear from you"},image:{src:"/assets/images/contact.png",alt:"Contact Us",blurDataURL:"data:image/jpeg;base64,..."},contactInfo:{sectionHeading:{title:"Contact Information",subtitle:"Reach out to us through any of the following methods"},location:"123 Main Street, Anytown, AT 12345",mail:"info@example.com",phone:"+1 (555) 123-4567"},locations:[{title:"Head Office",location:"123 Main Street, Anytown, AT 12345",mails:["headoffice@example.com"],phoneNumbers:["+1 (555) 123-4567"],embedUrl:"https://www.google.com/maps/embed?..."},{title:"Branch Office",location:"456 Elm Street, Othertown, OT 67890",mails:["branchoffice@example.com"],phoneNumbers:["+1 (555) 987-6543"],embedUrl:"https://www.google.com/maps/embed?..."}]};export{i as Default,l as default};
@@ -1 +1 @@
1
- import{a}from"../chunk-ZOLLFX4E.mjs";import"../chunk-66ZAIUUI.mjs";import"../chunk-SV7NMNDI.mjs";import"../chunk-XBBQGSYP.mjs";import"../chunk-HZ5QHCGZ.mjs";import"../chunk-O5BAW5XQ.mjs";import"../chunk-NWW7KWJK.mjs";import"../chunk-PVRWMAHW.mjs";import"../chunk-Y6CZVVJF.mjs";import"../chunk-NGK3IDFP.mjs";import"../chunk-TFWGOEV7.mjs";import"../chunk-YNDKGRL6.mjs";import"../chunk-763KMQIQ.mjs";import"../chunk-J2VQUYES.mjs";import"../chunk-SJWGFZJ6.mjs";import"../chunk-44TDI42O.mjs";import"../chunk-BOPZHZ27.mjs";import"../chunk-GLEWUUGS.mjs";import"../chunk-WISCWNL2.mjs";import"../chunk-UESKYRNK.mjs";import"../chunk-NIQ4466A.mjs";import"../chunk-6K2R3OAD.mjs";import"../chunk-S7OK7D5I.mjs";export{a as PricingSection};
1
+ import{a}from"../chunk-D3PXELYK.mjs";import"../chunk-66ZAIUUI.mjs";import"../chunk-SV7NMNDI.mjs";import"../chunk-R7P4VVM3.mjs";import"../chunk-QIGWPB3D.mjs";import"../chunk-O5BAW5XQ.mjs";import"../chunk-NWW7KWJK.mjs";import"../chunk-UK4IPFAO.mjs";import"../chunk-HUN2X4VH.mjs";import"../chunk-ICTOXY7D.mjs";import"../chunk-YNDKGRL6.mjs";import"../chunk-TFWGOEV7.mjs";import"../chunk-763KMQIQ.mjs";import"../chunk-J2VQUYES.mjs";import"../chunk-SJWGFZJ6.mjs";import"../chunk-44TDI42O.mjs";import"../chunk-BOPZHZ27.mjs";import"../chunk-GLEWUUGS.mjs";import"../chunk-WISCWNL2.mjs";import"../chunk-UESKYRNK.mjs";import"../chunk-NIQ4466A.mjs";import"../chunk-6K2R3OAD.mjs";import"../chunk-S7OK7D5I.mjs";export{a as PricingSection};
@@ -1 +1 @@
1
- import{a as i}from"../chunk-ZOLLFX4E.mjs";import"../chunk-66ZAIUUI.mjs";import"../chunk-SV7NMNDI.mjs";import"../chunk-XBBQGSYP.mjs";import"../chunk-HZ5QHCGZ.mjs";import"../chunk-O5BAW5XQ.mjs";import"../chunk-NWW7KWJK.mjs";import"../chunk-PVRWMAHW.mjs";import"../chunk-Y6CZVVJF.mjs";import"../chunk-NGK3IDFP.mjs";import"../chunk-TFWGOEV7.mjs";import"../chunk-YNDKGRL6.mjs";import"../chunk-763KMQIQ.mjs";import"../chunk-J2VQUYES.mjs";import"../chunk-SJWGFZJ6.mjs";import"../chunk-44TDI42O.mjs";import"../chunk-BOPZHZ27.mjs";import"../chunk-GLEWUUGS.mjs";import"../chunk-WISCWNL2.mjs";import"../chunk-UESKYRNK.mjs";import"../chunk-NIQ4466A.mjs";import"../chunk-6K2R3OAD.mjs";import"../chunk-S7OK7D5I.mjs";import{jsx as o}from"react/jsx-runtime";var m={title:"Sections/PricingSection",component:i,tags:["autodocs"],parameters:{docs:{description:{component:"A card component that displays a service with an icon, title, description, and a link."}}},argTypes:{icon:{control:"text"},title:{control:"text"},description:{control:"text"},slug:{control:"text"}},decorators:[t=>o(t,{})]},e=t=>o(i,{...t}),r=e.bind({});r.args={sectionHeading:{subtitle:"Pricing Action",title:"Innovating for a better tomorrow",description:"Lorem Ipsum is simply dummy text of the printing Ipsum is simply dummy text of the Lorem Ipsum is simply"},cards:[{title:"Basic Plan",description:"Lorem Ipsum is simply dummy text of the printing Ipsum is simply dummy text of the Lorem Ipsum is simply",features:["Mistakes To Avoid","Your Startup","Knew About Fonts","Winning Metric for Your Startup"],price:"$49",duration:"/month",isPopular:!1,button:{href:"/",label:"Select Plan"}},{title:"Standard Plan",description:"Lorem Ipsum is simply dummy text of the printing Ipsum is simply dummy text of the Lorem Ipsum is simply",features:["Mistakes To Avoid","Your Startup","Knew About Fonts","Winning Metric for Your Startup"],price:"$79",duration:"/month",isPopular:!0,button:{href:"/",label:"Select Plan"}},{title:"Premium Plan",description:"Lorem Ipsum is simply dummy text of the printing Ipsum is simply dummy text of the Lorem Ipsum is simply",features:["Mistakes To Avoid","Your Startup","Knew About Fonts","Winning Metric for Your Startup"],price:"$99",duration:"/month",isPopular:!1,button:{href:"/",label:"Select Plan"}}]};export{r as Default,m as default};
1
+ import{a as i}from"../chunk-D3PXELYK.mjs";import"../chunk-66ZAIUUI.mjs";import"../chunk-SV7NMNDI.mjs";import"../chunk-R7P4VVM3.mjs";import"../chunk-QIGWPB3D.mjs";import"../chunk-O5BAW5XQ.mjs";import"../chunk-NWW7KWJK.mjs";import"../chunk-UK4IPFAO.mjs";import"../chunk-HUN2X4VH.mjs";import"../chunk-ICTOXY7D.mjs";import"../chunk-YNDKGRL6.mjs";import"../chunk-TFWGOEV7.mjs";import"../chunk-763KMQIQ.mjs";import"../chunk-J2VQUYES.mjs";import"../chunk-SJWGFZJ6.mjs";import"../chunk-44TDI42O.mjs";import"../chunk-BOPZHZ27.mjs";import"../chunk-GLEWUUGS.mjs";import"../chunk-WISCWNL2.mjs";import"../chunk-UESKYRNK.mjs";import"../chunk-NIQ4466A.mjs";import"../chunk-6K2R3OAD.mjs";import"../chunk-S7OK7D5I.mjs";import{jsx as o}from"react/jsx-runtime";var m={title:"Sections/PricingSection",component:i,tags:["autodocs"],parameters:{docs:{description:{component:"A card component that displays a service with an icon, title, description, and a link."}}},argTypes:{icon:{control:"text"},title:{control:"text"},description:{control:"text"},slug:{control:"text"}},decorators:[t=>o(t,{})]},e=t=>o(i,{...t}),r=e.bind({});r.args={sectionHeading:{subtitle:"Pricing Action",title:"Innovating for a better tomorrow",description:"Lorem Ipsum is simply dummy text of the printing Ipsum is simply dummy text of the Lorem Ipsum is simply"},cards:[{title:"Basic Plan",description:"Lorem Ipsum is simply dummy text of the printing Ipsum is simply dummy text of the Lorem Ipsum is simply",features:["Mistakes To Avoid","Your Startup","Knew About Fonts","Winning Metric for Your Startup"],price:"$49",duration:"/month",isPopular:!1,button:{href:"/",label:"Select Plan"}},{title:"Standard Plan",description:"Lorem Ipsum is simply dummy text of the printing Ipsum is simply dummy text of the Lorem Ipsum is simply",features:["Mistakes To Avoid","Your Startup","Knew About Fonts","Winning Metric for Your Startup"],price:"$79",duration:"/month",isPopular:!0,button:{href:"/",label:"Select Plan"}},{title:"Premium Plan",description:"Lorem Ipsum is simply dummy text of the printing Ipsum is simply dummy text of the Lorem Ipsum is simply",features:["Mistakes To Avoid","Your Startup","Knew About Fonts","Winning Metric for Your Startup"],price:"$99",duration:"/month",isPopular:!1,button:{href:"/",label:"Select Plan"}}]};export{r as Default,m as default};
@@ -1 +1 @@
1
- import{a as b}from"../chunk-ZOLLFX4E.mjs";import{a}from"../chunk-SBHCQ2HK.mjs";import{a as d}from"../chunk-SHN4XZWD.mjs";import"../chunk-AD7PG4E2.mjs";import{a as e}from"../chunk-YKDVNCHV.mjs";import"../chunk-EI7PFWFS.mjs";import"../chunk-CTKUF2I6.mjs";import"../chunk-NOEITQK2.mjs";import"../chunk-EG6XIOOJ.mjs";import"../chunk-MMBUMBDU.mjs";import{a as g}from"../chunk-T6LPMF7A.mjs";import{a as c}from"../chunk-AEPYNOEK.mjs";import{a as f}from"../chunk-4R7S6EEU.mjs";import"../chunk-KML6U7IE.mjs";import"../chunk-66ZAIUUI.mjs";import"../chunk-TQCGX4Y6.mjs";import"../chunk-SV7NMNDI.mjs";import"../chunk-JODGODRI.mjs";import"../chunk-6ZNVXWZR.mjs";import"../chunk-WZLEEZ5C.mjs";import"../chunk-MGZMAVEP.mjs";import"../chunk-XBBQGSYP.mjs";import"../chunk-EMZQNDA7.mjs";import"../chunk-IE2A7UT3.mjs";import"../chunk-TXXFXCXB.mjs";import"../chunk-HZ5QHCGZ.mjs";import"../chunk-O5BAW5XQ.mjs";import"../chunk-NWW7KWJK.mjs";import"../chunk-PVRWMAHW.mjs";import"../chunk-Y6CZVVJF.mjs";import"../chunk-NGK3IDFP.mjs";import"../chunk-TFWGOEV7.mjs";import"../chunk-YNDKGRL6.mjs";import"../chunk-763KMQIQ.mjs";import"../chunk-J2VQUYES.mjs";import"../chunk-SJWGFZJ6.mjs";import"../chunk-44TDI42O.mjs";import"../chunk-BOPZHZ27.mjs";import"../chunk-D43ENVPX.mjs";import"../chunk-BSQVKZCW.mjs";import"../chunk-Y5VTKEKS.mjs";import"../chunk-CGBVZQYY.mjs";import"../chunk-YNCJATT7.mjs";import"../chunk-QOIH63J3.mjs";import"../chunk-OAOCXXC2.mjs";import"../chunk-GLEWUUGS.mjs";import"../chunk-D76EO57Z.mjs";import"../chunk-WISCWNL2.mjs";import"../chunk-YNNW2C2U.mjs";import"../chunk-SFLOMJ2U.mjs";import"../chunk-UESKYRNK.mjs";import"../chunk-NIQ4466A.mjs";import"../chunk-6K2R3OAD.mjs";import"../chunk-FRWX5YES.mjs";import"../chunk-S7OK7D5I.mjs";export{c as AboutSection,f as BlogDetail,d as BlogListSection,e as ContactSection,g as MainPageSection,b as PricingSection,a as ServiceSection};
1
+ import{a as b}from"../chunk-D3PXELYK.mjs";import{a}from"../chunk-SBHCQ2HK.mjs";import{a as c}from"../chunk-AS3NR4OU.mjs";import{a as d}from"../chunk-SHN4XZWD.mjs";import"../chunk-AD7PG4E2.mjs";import{a as e}from"../chunk-YOOGQIDR.mjs";import"../chunk-EI7PFWFS.mjs";import"../chunk-CTKUF2I6.mjs";import"../chunk-NOEITQK2.mjs";import"../chunk-EG6XIOOJ.mjs";import"../chunk-MMBUMBDU.mjs";import{a as g}from"../chunk-T6LPMF7A.mjs";import{a as f}from"../chunk-NLTSDI7A.mjs";import"../chunk-KML6U7IE.mjs";import"../chunk-66ZAIUUI.mjs";import"../chunk-TQCGX4Y6.mjs";import"../chunk-SV7NMNDI.mjs";import"../chunk-6ZNVXWZR.mjs";import"../chunk-WZLEEZ5C.mjs";import"../chunk-JODGODRI.mjs";import"../chunk-R7P4VVM3.mjs";import"../chunk-MGZMAVEP.mjs";import"../chunk-EMZQNDA7.mjs";import"../chunk-IE2A7UT3.mjs";import"../chunk-TXXFXCXB.mjs";import"../chunk-QIGWPB3D.mjs";import"../chunk-O5BAW5XQ.mjs";import"../chunk-NWW7KWJK.mjs";import"../chunk-UK4IPFAO.mjs";import"../chunk-HUN2X4VH.mjs";import"../chunk-ICTOXY7D.mjs";import"../chunk-YNDKGRL6.mjs";import"../chunk-TFWGOEV7.mjs";import"../chunk-763KMQIQ.mjs";import"../chunk-J2VQUYES.mjs";import"../chunk-SJWGFZJ6.mjs";import"../chunk-44TDI42O.mjs";import"../chunk-BOPZHZ27.mjs";import"../chunk-D43ENVPX.mjs";import"../chunk-BSQVKZCW.mjs";import"../chunk-Y5VTKEKS.mjs";import"../chunk-CGBVZQYY.mjs";import"../chunk-YNCJATT7.mjs";import"../chunk-QOIH63J3.mjs";import"../chunk-OAOCXXC2.mjs";import"../chunk-GLEWUUGS.mjs";import"../chunk-D76EO57Z.mjs";import"../chunk-WISCWNL2.mjs";import"../chunk-YNNW2C2U.mjs";import"../chunk-SFLOMJ2U.mjs";import"../chunk-UESKYRNK.mjs";import"../chunk-NIQ4466A.mjs";import"../chunk-6K2R3OAD.mjs";import"../chunk-FRWX5YES.mjs";import"../chunk-S7OK7D5I.mjs";export{c as AboutSection,f as BlogDetail,d as BlogListSection,e as ContactSection,g as MainPageSection,b as PricingSection,a as ServiceSection};
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.3",
5
+ "version": "1.42.5",
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
- import{a as k}from"./chunk-HQFNGDDO.mjs";import{a as b}from"./chunk-4NKKWJ2X.mjs";import{a as p,c as g,d as v,g as C,i as f}from"./chunk-4JC2TJML.mjs";import{a as M}from"./chunk-A5EYIB3V.mjs";import{a as i}from"./chunk-DWRQHV42.mjs";import{a as F}from"./chunk-Y5ZFXDW5.mjs";import{a as x,f as y,g as I,i as w}from"./chunk-JWDVKGZL.mjs";import{a as m}from"./chunk-QOIH63J3.mjs";import{b as u}from"./chunk-GLEWUUGS.mjs";import{useState as h,useEffect as B}from"react";import{PlusIcon as H}from"lucide-react";import{Fragment as z,jsx as t,jsxs as s}from"react/jsx-runtime";function te({customers:D,users:S,categories:R,onSubmit:A,initialDeal:c,onAddCustomer:L}){let[a,o]=h(c||{customerId:"",value:0,assignee:"",status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",lastModified:new Date().toISOString(),comments:[],description:""}),[O,d]=h(!1),[l,N]=h({});B(()=>{c&&o(c)},[c]);let T=()=>{let e={};return a.customerId||(e.customerId="Customer is required"),a.value||(e.value="Value is required"),a.assignee||(e.assignee="Assignee is required"),a.closureDate||(e.closureDate="Closure Date is required"),N(e),Object.keys(e).length===0},E=e=>{e.preventDefault(),T()&&(A({...a,id:a.id||Date.now().toString(),lastModified:new Date().toISOString()}),o({customerId:"",value:0,assignee:"",description:"",status:"Cold",closureDate:""}),N({}))},V=e=>{o(r=>{var n;return{...r,categories:(n=r.categories)!=null&&n.includes(e)?r.categories.filter(U=>U!==e):[...r.categories||[],e]}})},q=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"}},P=e=>{D.push(e),o({...a,customerId:e.id}),d(!1),L(e)};return s(z,{children:[s("form",{onSubmit:E,className:"space-y-6",children:[t(b,{className:"h-[60vh] pr-4",children:s("div",{className:"space-y-6",children:[s("div",{className:"space-y-2 space-x-2",children:[t(i,{htmlFor:"customer",children:"Customer"}),s("div",{className:"flex items-center space-x-2",children:[s(p,{value:a.customerId,onValueChange:e=>o({...a,customerId:e}),children:[t(v,{children:t(g,{placeholder:"Select customer"})}),t(C,{children:D.map(e=>t(f,{value:e.id,children:e.name},e.id))})]}),t(u,{variant:"outline",size:"icon",onClick:()=>d(!0),children:t(H,{className:"w-5 h-5"})})]}),l.customerId&&t("p",{className:"text-red-500 text-sm",children:l.customerId})]}),s("div",{className:"space-y-2 space-x-2",children:[t(i,{htmlFor:"value",children:"Value"}),t(m,{id:"value",type:"number",value:a.value||"",onChange:e=>o({...a,value:Number.parseFloat(e.target.value)}),placeholder:"Enter deal value"}),l.value&&t("p",{className:"text-red-500 text-sm",children:l.value})]}),s("div",{className:"space-y-2 space-x-2",children:[t(i,{htmlFor:"assignee",children:"Assignee"}),s(p,{value:a.assignee,onValueChange:e=>o({...a,assignee:e}),children:[t(v,{children:t(g,{placeholder:"Select assignee"})}),t(C,{children:S&&S.map(e=>t(f,{value:e.id.toString(),children:e.name},e.id))})]}),l.assignee&&t("p",{className:"text-red-500 text-sm",children:l.assignee})]}),s("div",{className:"space-y-2 space-x-2",children:[t(i,{htmlFor:"description",children:"Description"}),t(M,{id:"description",value:a.description||"",onChange:e=>o({...a,description:e.target.value}),placeholder:"Enter deal description"})]}),s("div",{className:"space-y-2 space-x-2",children:[t(i,{children:"Categories"}),t("div",{className:"space-y-4",children:["proposition","source","sector"].map(e=>s("div",{className:"space-y-2",children:[t("h4",{className:"text-sm font-medium",children:e.charAt(0).toUpperCase()+e.slice(1)}),t("div",{className:"grid grid-cols-2 gap-2",children:R.filter(r=>r.type===e).map(r=>{var n;return s("div",{className:"flex items-center space-x-2",children:[t(F,{id:r.id,checked:(n=a.categories)==null?void 0:n.includes(r.id),onCheckedChange:()=>V(r.id)}),t("label",{htmlFor:r.id,className:`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 ${q(r.type)}`,children:r.name})]},r.id)})})]},e))})]}),s("div",{className:"space-y-2 space-x-2",children:[t(i,{htmlFor:"closureDate",children:"Closure Date"}),t(m,{id:"closureDate",type:"date",value:a.closureDate,onChange:e=>o({...a,closureDate:e.target.value})}),l.closureDate&&t("p",{className:"text-red-500 text-sm",children:l.closureDate})]})]})}),t(u,{type:"submit",className:"w-full",children:c?"Update Deal":"Add Deal"})]}),t(x,{open:O,onOpenChange:d,children:s(y,{children:[t(I,{children:t(w,{children:"Add New Customer"})}),t(k,{onSubmit:P})]})})]})}export{te as a};
@@ -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",customerId:"1",value:5e4,assignee:"John Doe",status:"Qualified",categories:["1","3","5"],dateLogged:"2023-01-15",closureDate:"2023-06-30",lastModified:"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",customerId:"2",value:75e3,assignee:"Jane Smith",status:"Proposal",categories:["2","4","6"],dateLogged:"2023-02-01",closureDate:"2023-07-31",lastModified:"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},s=["Cold","Qualified","Proposal","Won","Lost"];export{e as a,t as b,o as c,a as d,r as e,s as f};
@@ -1 +0,0 @@
1
- import{a as u}from"./chunk-A5EYIB3V.mjs";import{a as m}from"./chunk-DWRQHV42.mjs";import{a as n}from"./chunk-Y5ZFXDW5.mjs";import{a as s}from"./chunk-QOIH63J3.mjs";import{b as i}from"./chunk-GLEWUUGS.mjs";import{useState as l}from"react";import{jsx as o,jsxs as a}from"react/jsx-runtime";function N({onSubmit:c}){let[e,r]=l({name:"",intro:"",active:!0});return a("form",{onSubmit:t=>{t.preventDefault(),e.name&&(c({id:Date.now().toString(),...e}),r({name:"",intro:"",active:!0}))},className:"space-y-4",children:[a("div",{className:"space-y-2",children:[o(m,{htmlFor:"customerName",children:"Customer Name"}),o(s,{id:"customerName",value:e.name,onChange:t=>r({...e,name:t.target.value}),placeholder:"Enter customer name",required:!0})]}),a("div",{className:"space-y-2",children:[o(m,{htmlFor:"customerIntro",children:"Intro"}),o(u,{id:"customerIntro",value:e.intro,onChange:t=>r({...e,intro:t.target.value}),placeholder:"Enter customer intro"})]}),a("div",{className:"flex items-center space-x-2",children:[o(n,{id:"activeCustomer",checked:e.active,onCheckedChange:t=>r({...e,active:t})}),o(m,{htmlFor:"activeCustomer",children:"Active Customer"})]}),o(i,{type:"submit",className:"w-full",children:"Add Customer"})]})}export{N as a};
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a as p}from"./chunk-ZDNAXLAG.mjs";import{a as C}from"./chunk-TSPWI4RS.mjs";import{useState as D,useCallback as w}from"react";import{DragDropContext as x}from"react-beautiful-dnd";import{jsx as n,jsxs as N}from"react/jsx-runtime";var B=["Cold","Qualified","Proposal","SoW","Won","Lost"];function V({initialData:r,addNewDeal:g,updateDeal:d,addComment:f,addNewCustomer:v}){let[s,c]=D(null),[a,R]=D(r),S=e=>a.deals.filter(o=>o.status===e),M=e=>e.reduce((o,t)=>o+(t.value||0),0),b=(e,o)=>{let t={Cold:.2,Qualified:.4,Proposal:.6,SoW:.7,Won:1,Lost:0};return e.reduce((u,l)=>u+(l.value||0)*t[o],0)},y=w(e=>{let{source:o,destination:t}=e;if(!t||o.droppableId===t.droppableId&&o.index===t.index)return;let u=o.droppableId,l=t.droppableId;console.log("Moving from ",u,"to",l);let i=[...a.deals],[m]=i.splice(o.index,1);m.status=l,i.splice(t.index,0,m),R({...a,deals:i}),d(m)},[a,d]);return n(x,{onDragEnd:y,children:N("div",{className:"p-4",children:[n("div",{className:"flex space-x-4 overflow-x-auto pb-4",children:B.filter(e=>e!=="Won"&&e!=="Lost").map(e=>{let o=S(e);return n(C,{status:e,deals:o,customers:r.customers,users:r.users,categories:r.categories,onDealClick:c,calculateColumnValue:M,calculateWeightedValue:b,addNewDeal:e==="Cold"?g:void 0,onAddCustomer:v},e)})}),s&&n(p,{deal:s,users:r.users,customer:a.customers.find(e=>e.id===s.customerId),categories:a.categories,onClose:()=>c(null),onSave:d,onAddComment:e=>f(s.id,e)})]})})}export{V as a};
@@ -1 +0,0 @@
1
- import{a as b}from"./chunk-EMWBQUQC.mjs";import{a as D}from"./chunk-YOFO7YSO.mjs";import{a as d,b as p,f as u,g as c,i as C}from"./chunk-JWDVKGZL.mjs";import{b as g}from"./chunk-GLEWUUGS.mjs";import{PlusCircle as M}from"lucide-react";import{Droppable as y,Draggable as P}from"react-beautiful-dnd";import{jsx as e,jsxs as a}from"react/jsx-runtime";function K({status:l,deals:r,users:f,customers:i,categories:m,onDealClick:h,calculateColumnValue:N,calculateWeightedValue:w,addNewDeal:n,onAddCustomer:x}){return a("div",{className:"flex flex-col w-80",children:[e("h2",{className:"text-xl font-semibold mb-4",children:l}),n&&a(d,{children:[e(p,{asChild:!0,children:a(g,{className:"mb-4 w-full bg-green-500 hover:bg-green-600 text-white",children:[e(M,{className:"mr-2 h-4 w-4"}),"Add New Deal"]})}),a(u,{children:[e(c,{children:e(C,{children:"Add New Deal"})}),e(b,{customers:i,users:f,categories:m,onSubmit:n,onAddCustomer:x})]})]}),e(y,{droppableId:l,children:t=>a("div",{ref:t.innerRef,...t.droppableProps,className:"bg-gray-100 p-4 rounded-lg flex-grow min-h-[200px] shadow-inner",children:[r.map((o,R)=>e(P,{draggableId:o.id,index:R,children:s=>e("div",{ref:s.innerRef,...s.draggableProps,...s.dragHandleProps,children:e(D,{deal:o,customer:i.find(v=>v.id===o.customerId),categories:m,onClick:()=>h(o)})})},o.id)),t.placeholder]})}),a("div",{className:"mt-4 text-sm bg-white p-3 rounded-lg shadow",children:[a("p",{className:"font-semibold",children:["Total: ",a("span",{className:"text-green-600",children:["$",N(r).toLocaleString()]})]}),a("p",{className:"font-semibold",children:["Weighted: ",a("span",{className:"text-blue-600",children:["$",w(r,l).toLocaleString()]})]})]})]})}export{K as a};
@@ -1 +0,0 @@
1
- import{b as o}from"./chunk-Q6SEVCRG.mjs";import{a as n,b as d,c as l,e as m}from"./chunk-D76EO57Z.mjs";import{CalendarIcon as C,UserIcon as f}from"lucide-react";import{jsx as e,jsxs as t}from"react/jsx-runtime";function b({deal:a,customer:s,categories:c,onClick:p}){let r=c.find(i=>i.type==="proposition"&&a.categories.includes(i.id));return t(n,{className:"mb-4 cursor-pointer hover:shadow-md transition-shadow border-l-4 border-l-accent",onClick:p,children:[t(d,{className:"pb-2",children:[e("div",{className:"flex justify-between items-center",children:e(l,{className:"text-lg font-semibold text-gray-800",children:s==null?void 0:s.name})}),e("p",{className:"text-sm text-gray-500 mt-1",children:a.description})]}),t(m,{children:[t("div",{className:"flex justify-between items-center mb-3",children:[t("div",{className:"flex items-center text-sm text-gray-600",children:[e(f,{className:"w-4 h-4 mr-1 text-xs"}),e("span",{children:a.assignee})]}),e("div",{className:"flex items-center text-sm font-bold text-green-600",children:t("span",{children:["\xA3",a.value.toLocaleString()]})})]}),e("div",{className:"flex justify-between items-left mb-3",children:t("div",{className:"flex items-center text-xs text-gray-500",children:[e(C,{className:"w-3 h-3 mr-1"}),e("span",{children:new Date(a.lastModified).toLocaleDateString()})]})}),e("div",{className:"flex justify-between items-left",children:r&&e(o,{variant:"secondary",className:"bg-blue-100 text-blue-800 text-xs",children:r.name})})]})]})}export{b as a};
@@ -1 +0,0 @@
1
- import{a as x}from"./chunk-4NKKWJ2X.mjs";import{a as C,c as N,d as f,g as h,i as y}from"./chunk-4JC2TJML.mjs";import{a as E}from"./chunk-A5EYIB3V.mjs";import{a as i}from"./chunk-DWRQHV42.mjs";import{a as T}from"./chunk-Y5ZFXDW5.mjs";import{a as A,f as F,g as I,i as R}from"./chunk-JWDVKGZL.mjs";import{a as c}from"./chunk-QOIH63J3.mjs";import{b as M}from"./chunk-Q6SEVCRG.mjs";import{b as m}from"./chunk-GLEWUUGS.mjs";import{useState as u,useEffect as W}from"react";import{UserIcon as $,CalendarIcon as j,SaveIcon as q,Edit2Icon as K,PlusIcon as X}from"lucide-react";import{jsx as a,jsxs as t}from"react/jsx-runtime";function ce({deal:g,users:b,customer:p,categories:D,onClose:P,onSave:H,onAddComment:O}){var L;let[s,U]=u({...g,value:g.value||0}),[v,S]=u(""),[V,w]=u(!1),[r,l]=u(null);W(()=>{w(JSON.stringify(g)!==JSON.stringify(s))},[g,s]);let J=()=>{H(s),w(!1),l(null)},n=(e,o)=>{U(d=>({...d,[e]:o}))},z=e=>{let o=s.categories.includes(e)?s.categories.filter(d=>d!==e):[...s.categories,e];n("categories",o)},G=()=>{v.trim()&&(O({id:Date.now().toString(),text:v,timestamp:new Date().toISOString()}),S(""))},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"}},Y=(e,o,d)=>{let B=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,B?a(c,{value:s[e],onChange:Q=>n(e,Q.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]}),!B&&a(m,{variant:"ghost",size:"sm",onClick:()=>l(e),children:a(K,{className:"w-4 h-4"})})]})]})};return a(A,{open:!0,children:t(F,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[t(I,{className:"flex flex-row items-center justify-between",children:[a(R,{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:P,children:"Close"}),t(m,{onClick:J,disabled:!V,children:[a(q,{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(C,{value:s.assignee,onValueChange:e=>n("assignee",e),children:[a(f,{children:a(N,{placeholder:"Select assignee"})}),a(h,{children:b&&b.map(e=>a(y,{value:e.id.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($,{className:"w-4 h-4 text-gray-400"}),a("span",{children:s.assignee})]})]}),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(j,{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(E,{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(C,{value:s.status,onValueChange:e=>{n("status",e),l(null)},children:[a(f,{children:a(N,{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:D.map(e=>t("div",{className:"flex items-center space-x-2",children:[a(T,{id:e.id,checked:s.categories.includes(e.id),onCheckedChange:()=>z(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=D.find(d=>d.id===e);return o?a(M,{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=>S(e.target.value),placeholder:"Add a comment...",className:"flex-grow"}),t(m,{onClick:G,className:"ml-2",children:[a(X,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),t("div",{className:"text-xs text-gray-500 mt-4",children:["Last modified: ",new Date(s.lastModified).toLocaleString()]})]})]})]})})}export{ce as a};
@@ -1,7 +0,0 @@
1
- import type { BoardData, Deal, CRMCustomer, Comment } from "./types";
2
- export declare function getInitialData(): Promise<BoardData>;
3
- export declare function addDeal(newDeal: Omit<Deal, "id">): Promise<Deal>;
4
- export declare function updateDeal(updatedDeal: Deal): Promise<Deal>;
5
- export declare function addCustomer(newCustomer: Omit<CRMCustomer, "id">): Promise<CRMCustomer>;
6
- export declare function addComment(dealId: string, comment: Omit<Comment, "id">): Promise<Comment>;
7
- export declare function updateDealDescription(dealId: string, description: string): Promise<Deal>;
@@ -1,4 +0,0 @@
1
- "use server";
2
- "use strict";
3
-
4
- "use strict";"use server";var a=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var c=(t,e)=>{for(var o in e)a(t,o,{get:e[o],enumerable:!0})},u=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of d(e))!m.call(t,i)&&i!==o&&a(t,i,{get:()=>e[i],enumerable:!(n=s(e,i))||n.enumerable});return t};var l=t=>u(a({},"__esModule",{value:!0}),t);var g={};c(g,{addComment:()=>C,addCustomer:()=>w,addDeal:()=>D,getInitialData:()=>p,updateDeal:()=>f,updateDealDescription:()=>y});module.exports=l(g);var r={deals:[],customers:[],users:[],categories:[{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"}]};async function p(){return r}async function D(t){let e={id:Date.now().toString(),...t,lastModified:new Date().toISOString(),comments:[]};return r.deals.push(e),e}async function f(t){let e=r.deals.findIndex(o=>o.id===t.id);if(e!==-1)return r.deals[e]={...t,lastModified:new Date().toISOString()},r.deals[e];throw new Error("Deal not found")}async function w(t){let e={id:Date.now().toString(),...t};return r.customers.push(e),e}async function C(t,e){let o=r.deals.find(n=>n.id===t);if(o){let n={id:Date.now().toString(),...e};return o.comments.push(n),o.lastModified=new Date().toISOString(),n}throw new Error("Deal not found")}async function y(t,e){let o=r.deals.find(n=>n.id===t);if(o)return o.description=e,o.lastModified=new Date().toISOString(),o;throw new Error("Deal not found")}0&&(module.exports={addComment,addCustomer,addDeal,getInitialData,updateDeal,updateDealDescription});
@@ -1,4 +0,0 @@
1
- "use server";
2
- "use strict";
3
-
4
- "use server";import"../../chunk-S7OK7D5I.mjs";var n={deals:[],customers:[],users:[],categories:[{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"}]};async function i(){return n}async function a(t){let e={id:Date.now().toString(),...t,lastModified:new Date().toISOString(),comments:[]};return n.deals.push(e),e}async function s(t){let e=n.deals.findIndex(o=>o.id===t.id);if(e!==-1)return n.deals[e]={...t,lastModified:new Date().toISOString()},n.deals[e];throw new Error("Deal not found")}async function d(t){let e={id:Date.now().toString(),...t};return n.customers.push(e),e}async function m(t,e){let o=n.deals.find(r=>r.id===t);if(o){let r={id:Date.now().toString(),...e};return o.comments.push(r),o.lastModified=new Date().toISOString(),r}throw new Error("Deal not found")}async function c(t,e){let o=n.deals.find(r=>r.id===t);if(o)return o.description=e,o.lastModified=new Date().toISOString(),o;throw new Error("Deal not found")}export{m as addComment,d as addCustomer,a as addDeal,i as getInitialData,s as updateDeal,c as updateDealDescription};