cortex-react-components 2.28.3 → 2.29.0-beta.1
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.
- package/dist/{chunk-IISYRLNU.mjs → chunk-2AZMG5X5.mjs} +1 -1
- package/dist/{chunk-LAQ3QAUW.mjs → chunk-2LQLKZYT.mjs} +1 -1
- package/dist/{chunk-6FHRZHAJ.mjs → chunk-2OGUZJVD.mjs} +1 -1
- package/dist/{chunk-CC57QZMB.mjs → chunk-2UVHBGOC.mjs} +1 -1
- package/dist/{chunk-UENQZNU3.mjs → chunk-2ZBHHV3P.mjs} +1 -1
- package/dist/{chunk-GUEJKEJJ.mjs → chunk-3MK7GU65.mjs} +1 -1
- package/dist/{chunk-JBGWDOOS.mjs → chunk-3PAS4AKZ.mjs} +1 -1
- package/dist/{chunk-R4SE63GR.mjs → chunk-3W5SE2HO.mjs} +1 -1
- package/dist/{chunk-2TUBS2HM.mjs → chunk-4DESBE4R.mjs} +1 -1
- package/dist/{chunk-HD6E7KI2.mjs → chunk-4KVVVRGU.mjs} +1 -1
- package/dist/{chunk-COBOHCBL.mjs → chunk-5G7LCLOY.mjs} +1 -1
- package/dist/{chunk-ITNR7N47.mjs → chunk-5ISPA3SI.mjs} +1 -1
- package/dist/{chunk-KBEXWUKI.mjs → chunk-5NIEZE7A.mjs} +1 -1
- package/dist/{chunk-QOZ2O3FG.mjs → chunk-5WTGNFUL.mjs} +1 -1
- package/dist/{chunk-CK2TD4BY.mjs → chunk-6A2O63AU.mjs} +1 -1
- package/dist/{chunk-VGWDYD6Z.mjs → chunk-6LJCQVKZ.mjs} +1 -1
- package/dist/{chunk-TKY52BNP.mjs → chunk-7HIL4GBK.mjs} +1 -1
- package/dist/{chunk-CTAIR3TE.mjs → chunk-7HLSAUWP.mjs} +1 -1
- package/dist/{chunk-MS7YIAWP.mjs → chunk-ABWLO5GA.mjs} +1 -1
- package/dist/{chunk-XX4GSGRP.mjs → chunk-AQQCH7Z2.mjs} +1 -1
- package/dist/{chunk-YH72WKGC.mjs → chunk-BEUDMDIW.mjs} +1 -1
- package/dist/{chunk-XJKNH5LL.mjs → chunk-BLOKJ7Y2.mjs} +1 -1
- package/dist/{chunk-LLED3RQS.mjs → chunk-BQJDTDBP.mjs} +1 -1
- package/dist/{chunk-NXAXOI33.mjs → chunk-C6RV2I5S.mjs} +1 -1
- package/dist/{chunk-MX3JKY3V.mjs → chunk-CGL3R3BQ.mjs} +1 -1
- package/dist/{chunk-SNTLCFXF.mjs → chunk-DDQVEARQ.mjs} +1 -1
- package/dist/{chunk-TQKXHMD7.mjs → chunk-DDYANYQB.mjs} +1 -1
- package/dist/{chunk-FJ2HHNPX.mjs → chunk-DLX4NQ3T.mjs} +1 -1
- package/dist/{chunk-SNFBF6KT.mjs → chunk-DZDMH6IZ.mjs} +1 -1
- package/dist/{chunk-7BYNW77I.mjs → chunk-EDRIV2VR.mjs} +1 -1
- package/dist/{chunk-NDBSSX6Q.mjs → chunk-EVQAIFAP.mjs} +1 -1
- package/dist/{chunk-SX2LOHXX.mjs → chunk-FNOAYUJ3.mjs} +1 -1
- package/dist/{chunk-46N4YPMB.mjs → chunk-FOO5RONL.mjs} +1 -1
- package/dist/{chunk-CO6AQNZ5.mjs → chunk-G53ROINJ.mjs} +1 -1
- package/dist/{chunk-5EKGFFJD.mjs → chunk-G5UB3YKZ.mjs} +1 -1
- package/dist/{chunk-QKDYTCZC.mjs → chunk-GFYO6B7H.mjs} +1 -1
- package/dist/{chunk-NSMXJCXE.mjs → chunk-GLKM2IVW.mjs} +1 -1
- package/dist/{chunk-4USR4WTH.mjs → chunk-GMLLRSAH.mjs} +1 -1
- package/dist/chunk-HCHZUZUK.mjs +4 -0
- package/dist/{chunk-Z22NSJMF.mjs → chunk-HF33ZXKX.mjs} +1 -1
- package/dist/{chunk-EOXVYLPB.mjs → chunk-HFND7WDK.mjs} +1 -1
- package/dist/{chunk-VKLEU4ZW.mjs → chunk-I3G2R2J2.mjs} +1 -1
- package/dist/{chunk-MXMW65GM.mjs → chunk-IKVDX3WJ.mjs} +1 -1
- package/dist/{chunk-MCOHKE2T.mjs → chunk-JGKLAY6J.mjs} +1 -1
- package/dist/chunk-JION2IPC.mjs +4 -0
- package/dist/{chunk-6XUIHSKG.mjs → chunk-JKVQOOCZ.mjs} +1 -1
- package/dist/{chunk-NCJAMNMQ.mjs → chunk-K7NFBXL3.mjs} +1 -1
- package/dist/{chunk-3M5KHST3.mjs → chunk-KHJKOKJN.mjs} +1 -1
- package/dist/{chunk-6YHCNPFB.mjs → chunk-KOLP657S.mjs} +1 -1
- package/dist/{chunk-TIIYFAV6.mjs → chunk-KRDGYYCK.mjs} +1 -1
- package/dist/{chunk-JDMIQLAZ.mjs → chunk-KSYES4GX.mjs} +1 -1
- package/dist/{chunk-AOQPH32M.mjs → chunk-LCHPGIER.mjs} +1 -1
- package/dist/{chunk-KX2NCNCS.mjs → chunk-LF55USCD.mjs} +1 -1
- package/dist/{chunk-5FWH5YVM.mjs → chunk-LHO4WFYP.mjs} +1 -1
- package/dist/{chunk-6ZMZX5TB.mjs → chunk-LL7CRB4U.mjs} +1 -1
- package/dist/{chunk-VRHJOUL3.mjs → chunk-LMDGHBG2.mjs} +1 -1
- package/dist/{chunk-MH4YPGH4.mjs → chunk-LPCO4T25.mjs} +1 -1
- package/dist/{chunk-5MMNC65L.mjs → chunk-LRNWBTXT.mjs} +1 -1
- package/dist/{chunk-AABB4TFO.mjs → chunk-M3DLWHPQ.mjs} +1 -1
- package/dist/{chunk-VNKGAW4K.mjs → chunk-MQ7ZFZRG.mjs} +1 -1
- package/dist/{chunk-KPTGYVDM.mjs → chunk-MQG7MKTK.mjs} +1 -1
- package/dist/{chunk-TZKQXT7Y.mjs → chunk-N25B5TQ5.mjs} +1 -1
- package/dist/{chunk-U3PUWUVM.mjs → chunk-NCHC4HCU.mjs} +1 -1
- package/dist/{chunk-SME3D72Q.mjs → chunk-OAK45GQL.mjs} +1 -1
- package/dist/{chunk-J3VJUPR7.mjs → chunk-ORCATWOS.mjs} +1 -1
- package/dist/{chunk-KPQ56JSD.mjs → chunk-PAERB6R2.mjs} +1 -1
- package/dist/{chunk-7MPZOMXK.mjs → chunk-PG4VW7VP.mjs} +1 -1
- package/dist/{chunk-M2REXGQW.mjs → chunk-PKI57UXP.mjs} +1 -1
- package/dist/{chunk-LCSO56PM.mjs → chunk-PQYMYQXD.mjs} +1 -1
- package/dist/{chunk-56X4PU43.mjs → chunk-Q35D7SUU.mjs} +1 -1
- package/dist/{chunk-JU4TJYSZ.mjs → chunk-QDK5I675.mjs} +1 -1
- package/dist/{chunk-2R3MJSQ7.mjs → chunk-QHIZOLWH.mjs} +1 -1
- package/dist/{chunk-TKCFCYEQ.mjs → chunk-QPGVTPZ4.mjs} +1 -1
- package/dist/{chunk-P2B3OITE.mjs → chunk-R422HRMQ.mjs} +1 -1
- package/dist/{chunk-P55W6AFU.mjs → chunk-RIRZRO6U.mjs} +1 -1
- package/dist/{chunk-F6DMXMR4.mjs → chunk-S3OBSLA5.mjs} +1 -1
- package/dist/{chunk-6SWKEZN6.mjs → chunk-S7SHOCHM.mjs} +1 -1
- package/dist/{chunk-53ERRCTV.mjs → chunk-SKTNOZL2.mjs} +1 -1
- package/dist/{chunk-EZC3YWSQ.mjs → chunk-SRCJSWQF.mjs} +1 -1
- package/dist/{chunk-TXVA6XJT.mjs → chunk-SRUG246N.mjs} +1 -1
- package/dist/{chunk-LCEEFZH7.mjs → chunk-SRXU4X35.mjs} +1 -1
- package/dist/{chunk-V7SNI22Q.mjs → chunk-T23BJQBB.mjs} +1 -1
- package/dist/{chunk-6PS55VJZ.mjs → chunk-T46EPXCV.mjs} +1 -1
- package/dist/{chunk-RSDUFAIB.mjs → chunk-T5HJS6OF.mjs} +1 -1
- package/dist/{chunk-LJFBHY4P.mjs → chunk-TBKC2B4Z.mjs} +1 -1
- package/dist/{chunk-PVPDARFR.mjs → chunk-TCZNV2C2.mjs} +1 -1
- package/dist/{chunk-FB5PBKLV.mjs → chunk-TGJ74O6U.mjs} +1 -1
- package/dist/{chunk-TR6RBROH.mjs → chunk-U3OEUDKT.mjs} +1 -1
- package/dist/{chunk-47OE4ZPY.mjs → chunk-UE66RIJN.mjs} +1 -1
- package/dist/{chunk-QDP657UR.mjs → chunk-UG7FEEFM.mjs} +1 -1
- package/dist/{chunk-ZHBYZ4HE.mjs → chunk-UW65QW5M.mjs} +1 -1
- package/dist/{chunk-X3JZSN3W.mjs → chunk-UZSBX5GO.mjs} +1 -1
- package/dist/{chunk-XGGWZIPM.mjs → chunk-V4OXGW5U.mjs} +1 -1
- package/dist/{chunk-XGIYNUGC.mjs → chunk-VNYUNZ3M.mjs} +1 -1
- package/dist/{chunk-4LUF5GZ6.mjs → chunk-VR75QVWG.mjs} +1 -1
- package/dist/{chunk-2BR55L74.mjs → chunk-VRE6VCHX.mjs} +1 -1
- package/dist/{chunk-MAZGVZJN.mjs → chunk-VWHOSOCB.mjs} +1 -1
- package/dist/{chunk-MU47F4UR.mjs → chunk-WAM7RYAU.mjs} +1 -1
- package/dist/{chunk-2LINLX4S.mjs → chunk-WHOWQZV6.mjs} +1 -1
- package/dist/{chunk-MU5WPW4N.mjs → chunk-WPH2ALD6.mjs} +1 -1
- package/dist/{chunk-2UNIT7NC.mjs → chunk-XSPGO55P.mjs} +1 -1
- package/dist/{chunk-RS4WAAGI.mjs → chunk-XTUH2DJE.mjs} +1 -1
- package/dist/{chunk-FSCDCSVK.mjs → chunk-YCD46AKJ.mjs} +1 -1
- package/dist/{chunk-GS3P2V76.mjs → chunk-YONYS5B2.mjs} +1 -1
- package/dist/{chunk-E6NVWHRS.mjs → chunk-ZERDRART.mjs} +1 -1
- package/dist/{chunk-O5P35LEY.mjs → chunk-ZFUP5NVF.mjs} +1 -1
- package/dist/{chunk-X3YJJBFJ.mjs → chunk-ZKTIH47I.mjs} +1 -1
- package/dist/components/AdvancedComponents/AppSidebar.mjs +1 -1
- package/dist/components/AdvancedComponents/CommentSection.mjs +1 -1
- package/dist/components/AdvancedComponents/app-header.mjs +1 -1
- package/dist/components/AdvancedComponents/index.mjs +1 -1
- package/dist/components/AdvancedComponents/notifications-panel.mjs +1 -1
- package/dist/components/AdvancedComponents/user-selection.mjs +1 -1
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/ImageBlock.mjs +1 -1
- package/dist/components/Blocks/MediaBlock.mjs +1 -1
- package/dist/components/Blocks/RelatedPosts.mjs +1 -1
- package/dist/components/Blocks/RenderBlocks.mjs +1 -1
- package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/CRM/CogeBoard.mjs +1 -1
- package/dist/components/CRM/DealDetails.mjs +1 -1
- package/dist/components/CRM/KanbanBoard.mjs +1 -1
- package/dist/components/CRM/index.mjs +1 -1
- package/dist/components/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/PricingCard.mjs +1 -1
- package/dist/components/Cards/ServiceCard.mjs +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/Chat/ChatInterface.mjs +1 -1
- package/dist/components/Chat/CopilotInterface.mjs +1 -1
- package/dist/components/Chat/PartTypes/MessageHandler.mjs +1 -1
- package/dist/components/Chat/PartTypes/Tool.mjs +1 -1
- package/dist/components/Chat/PartTypes/index.mjs +1 -1
- package/dist/components/Chat/capability-menu.mjs +1 -1
- package/dist/components/Chat/chat-session-sidebar.mjs +1 -1
- package/dist/components/Chat/demo-long-messages.mjs +1 -1
- package/dist/components/Chat/demo-tests.mjs +1 -1
- package/dist/components/Chat/demo.mjs +1 -1
- package/dist/components/Chat/example-usage.mjs +1 -1
- package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
- package/dist/components/Chat/index.mjs +1 -1
- package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
- package/dist/components/DigitalColleagues/DashboardHeader.mjs +1 -1
- package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.js +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
- package/dist/components/DigitalColleagues/SearchableSelect.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/TeamsIndexView.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
- package/dist/components/DigitalColleagues/colleague-card.mjs +1 -1
- package/dist/components/DigitalColleagues/colleague-form.mjs +1 -1
- package/dist/components/DigitalColleagues/colleague-type-selection.mjs +1 -1
- package/dist/components/DigitalColleagues/digital-colleague-clone.mjs +1 -1
- package/dist/components/DigitalColleagues/digital-colleague-options.mjs +1 -1
- package/dist/components/DigitalColleagues/index.js +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/DigitalColleagues/knowledge-search.mjs +1 -1
- package/dist/components/DigitalColleagues/team-form.mjs +1 -1
- package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
- package/dist/components/Foundary/DashboardHeader.mjs +1 -1
- package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +1 -1
- package/dist/components/Foundary/Knowledge/add-team-context.mjs +1 -1
- package/dist/components/Foundary/LandingMenu.mjs +1 -1
- package/dist/components/Foundary/Login.mjs +1 -1
- package/dist/components/Foundary/MainPage.js +1 -1
- package/dist/components/Foundary/MainPage.mjs +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.js +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
- package/dist/components/Foundary/RichText/index.mjs +1 -1
- package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +1 -1
- package/dist/components/Foundary/SearchableSelect.mjs +1 -1
- package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
- package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
- package/dist/components/Foundary/Views/TeamsIndexView.mjs +1 -1
- package/dist/components/Foundary/Views/index.mjs +1 -1
- package/dist/components/Foundary/colleague-card.mjs +1 -1
- package/dist/components/Foundary/colleague-form.mjs +1 -1
- package/dist/components/Foundary/colleague-type-selection.mjs +1 -1
- package/dist/components/Foundary/document-edit.mjs +1 -1
- package/dist/components/Foundary/document-preview-examples.mjs +1 -1
- package/dist/components/Foundary/document-preview.mjs +1 -1
- package/dist/components/Foundary/file-edit.mjs +1 -1
- package/dist/components/Foundary/foundary-clone.mjs +1 -1
- package/dist/components/Foundary/foundary-layout.mjs +1 -1
- package/dist/components/Foundary/foundary-options.mjs +1 -1
- package/dist/components/Foundary/index.js +4 -4
- package/dist/components/Foundary/index.mjs +1 -1
- package/dist/components/Foundary/knowledge-browser.mjs +1 -1
- package/dist/components/Foundary/knowledge-search.mjs +1 -1
- package/dist/components/Foundary/types.d.ts +1 -1
- package/dist/components/HeaderFooter/Header.js +1 -1
- package/dist/components/HeaderFooter/Header.mjs +1 -1
- package/dist/components/HeaderFooter/HeaderDesktop.js +1 -1
- package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/enhanced-header.mjs +1 -1
- package/dist/components/HeaderFooter/index.js +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/DashboardHero/DashboardHero.mjs +1 -1
- package/dist/components/Heros/DashboardHero/index.mjs +1 -1
- package/dist/components/Heros/HighImpact/index.mjs +1 -1
- package/dist/components/Heros/LowImpact/index.mjs +1 -1
- package/dist/components/Heros/MediumImpact/index.mjs +1 -1
- package/dist/components/Heros/PostHero/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/SectionHero/index.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Holidays/ApproveLeave.mjs +1 -1
- package/dist/components/Holidays/HolidayGrid.mjs +1 -1
- package/dist/components/Holidays/HolidayTracker.mjs +1 -1
- package/dist/components/Holidays/index.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Menus/SidebarLeft.mjs +1 -1
- package/dist/components/Menus/SidebarRight.mjs +1 -1
- package/dist/components/Menus/index.mjs +1 -1
- package/dist/components/Other/index.mjs +1 -1
- package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
- package/dist/components/Payload/Media/index.mjs +1 -1
- package/dist/components/Payload/PayloadCard/index.mjs +1 -1
- package/dist/components/Payload/RichText/index.mjs +1 -1
- package/dist/components/Payload/RichText/serialize.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/Projects/EpicsView.mjs +1 -1
- package/dist/components/Projects/FileView.mjs +1 -1
- package/dist/components/Projects/KanbanBoardView.mjs +1 -1
- package/dist/components/Projects/PlanningView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
- package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
- package/dist/components/Projects/TaskSidebar.mjs +1 -1
- package/dist/components/Projects/TasksView.mjs +1 -1
- package/dist/components/Projects/TeamSwitcher.mjs +1 -1
- package/dist/components/Projects/file-list.mjs +1 -1
- package/dist/components/Projects/index.mjs +1 -1
- package/dist/components/Projects/project-card.mjs +1 -1
- package/dist/components/Projects/team-card.mjs +1 -1
- package/dist/components/dc-temp/creative.mjs +1 -1
- package/dist/components/dc-temp/dashboard-integration-example.mjs +1 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/index.js +29 -29
- package/dist/components/index.mjs +1 -1
- package/dist/components/ui/carousel.css +1 -0
- package/dist/components/ui/carousel.d.ts +19 -0
- package/dist/components/ui/carousel.js +4 -0
- package/dist/components/ui/carousel.mjs +2 -0
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.js +1 -1
- package/dist/components/ui/index.mjs +1 -1
- package/dist/components/ui/sidebar.mjs +1 -1
- package/dist/decorators/Intranet.css +1 -0
- package/dist/decorators/Intranet.d.ts +7 -0
- package/dist/decorators/Intranet.js +4 -0
- package/dist/decorators/Intranet.mjs +1 -0
- package/dist/globals.css +1 -1
- package/dist/index.js +36 -36
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.js +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.js +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.js +2 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.js +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Website.js +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/sections/AboutSection.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/BlogListSection.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/MainPageSection.mjs +1 -1
- package/dist/sections/PageSections.js +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/ServiceDetail.mjs +1 -1
- package/dist/sections/ServiceDetailSection.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/form/index.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +3 -1
- package/dist/chunk-L3BLBPSR.mjs +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
1
|
+
import{a as r}from"./chunk-T5HJS6OF.mjs";import{f as s}from"./chunk-OAK45GQL.mjs";import d from"clsx";import{jsx as t,jsxs as l}from"react/jsx-runtime";var g=a=>{let{className:i,docs:n,introContent:o}=a;return l("div",{className:d("container",i),children:[o&&t(s,{content:o,enableGutter:!1}),t("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 md:gap-8 items-stretch",children:n?.map((e,p)=>typeof e=="string"?null:t(r,{doc:e,relationTo:"posts",showCategories:!0},p))})]})};export{g as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m}from"./chunk-PDY7JYY3.mjs";import{a as i}from"./chunk-
|
|
1
|
+
import{a as m}from"./chunk-PDY7JYY3.mjs";import{a as i}from"./chunk-HCHZUZUK.mjs";import{a as r}from"./chunk-MDJREBVI.mjs";import{jsx as n,jsxs as d}from"react/jsx-runtime";function u({isMenuOpen:e,logoLight:o,logoDark:t,menuItems:a,className:p,wide:l,themeControl:s=!1}){return d("div",{className:r("fixed top-0 left-0 right-0 z-50",p),children:[n(i,{isMenuOpen:e,logoLight:o,logoDark:t,menuItems:a,themeControl:s,wide:l}),n(m,{isMenuOpen:e,logoLight:o,logoDark:t,menuItems:a})]})}export{u as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as S}from"./chunk-
|
|
4
|
+
import{a as S}from"./chunk-5NIEZE7A.mjs";import{a as p}from"./chunk-2LQLKZYT.mjs";import{a as d,b as o,c as a,d as m,e as t,f as l}from"./chunk-76M7JE4D.mjs";import{a as u}from"./chunk-OYZDAMCS.mjs";import{b as n,d as b,f as c}from"./chunk-ZFUP5NVF.mjs";import{a as s}from"./chunk-4UIARERB.mjs";import{a as g}from"./chunk-WU3JMLSC.mjs";import{a as f}from"./chunk-BZAYEKYC.mjs";import{jsx as e,jsxs as r}from"react/jsx-runtime";function h({...i}){return r("div",{className:"bg-sidebar",children:[e(p,{isMenuOpen:!0,logoLight:f,logoDark:g,...i.header,className:"bg-sidebar",wide:!0}),r(n,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[e(S,{...i.sidebarLeft,className:"flex-none top-24"}),r(c,{className:"grow overflow-hidden",children:[e("header",{className:"flex h-16 shrink-0 items-center gap-2",children:r("div",{className:"flex items-center gap-2 px-4",children:[e(b,{className:"-ml-1"}),e(s,{orientation:"vertical",className:"mr-2 h-4"}),e(d,{children:r(o,{children:[e(a,{className:"hidden md:block",children:e(m,{href:"#",children:"Building Your Application"})}),e(l,{className:"hidden md:block"}),e(a,{children:e(t,{children:"Data Fetching"})})]})})]})}),r("div",{className:"flex flex-1 flex-col gap-4 p-4 pt-0",children:[r("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"})]}),e("div",{className:"flex-1 rounded-xl bg-muted/50 md:min-h-min"})]})]})]}),e(u,{})]})}export{h as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{f as l}from"./chunk-
|
|
4
|
+
import{f as l}from"./chunk-OAK45GQL.mjs";import{a as r}from"./chunk-2QZUKVBA.mjs";import{a as s}from"./chunk-VRE6VCHX.mjs";import h from"next/image";import{jsx as e,jsxs as t}from"react/jsx-runtime";var x=({links:o,media:i,children:m,richText:a})=>e("div",{children:t("div",{className:"sticky top-0 h-[70vh] min-h-[600px]",children:[t("div",{className:"fixed inset-0 container mt-24 mb-8 z-10 flex items-start justify-center",children:[m||a&&e(l,{className:"max-w-none p-0 mb-6 ml-0 prose prose-headings:text-foreground prose-p:text-foreground",content:a,enableGutter:!0}),Array.isArray(o)&&o.length>0&&e("ul",{className:"flex justify-center gap-4",children:o.map(({link:n},d)=>e("li",{children:e(r,{...n})},d))})]}),t("div",{className:"fixed inset-0 h-[70vh] min-h-[600px] select-none",children:[i&&typeof i=="object"&&e(s,{fill:!0,imgClassName:"z-5 object-cover",priority:!1,loading:"lazy",resource:i}),i&&typeof i=="string"&&e("div",{children:e(h,{className:"-z-10 object-cover",alt:"",fill:!0,priority:!0,src:i})}),e("span",{className:"absolute inset-0 bg-gradient-to-b from-white dark:from-black"})]}),e(p,{})]})}),p=()=>e("div",{className:"w-full h-[1240px] z-10",children:t("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1920 337",style:{fontSize:0,float:"left",zIndex:20},className:"absolute -bottom-[2px] flex",children:[e("defs",{children:t("mask",{id:"mask",children:[e("rect",{width:"1920",height:"332",fill:"white"}),e("polygon",{points:"0 0 0 135 1255 330 1920 0 1920 0 1920 0 0 0"})]})}),e("rect",{width:"1920",height:"332",fill:"white",mask:"url(#mask)"}),e("rect",{y:"330",width:"1920",height:"7",fill:"white"})," "]})});export{x as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as l}from"./chunk-ZNSW443Y.mjs";import{a as r}from"./chunk-
|
|
1
|
+
import{a as l}from"./chunk-ZNSW443Y.mjs";import{a as r}from"./chunk-HF33ZXKX.mjs";import{useState as u}from"react";import{jsx as e,jsxs as t}from"react/jsx-runtime";function p({documents:a=[],contexts:d=[],onDocumentClick:i=o=>console.log("Document clicked:",o),onDocumentShare:m=o=>console.log("Share document:",o),onLoadDocumentContent:g,selectedDocumentId:c}){let[o,s]=u(d[0]);return!d||d.length===0?t("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[e("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:e(r,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}})}),e("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:e("p",{className:"text-muted-foreground",children:"No contexts available"})})]}):t("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[t("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[e(r,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}}),t("div",{className:"mt-6",children:[e("div",{className:"border-b border-border",children:e("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:d.map(n=>t("button",{onClick:()=>s(n),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${o.id===n.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[n.icon,n.label]},n.id))})}),o.description&&e("div",{className:"mt-3 px-1",children:e("p",{className:"text-sm text-muted-foreground",children:o.description})})]})]}),e("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:e("div",{className:"h-full rounded-3xl border overflow-hidden",children:e(l,{documents:a,menuConfig:o.menuConfig,onDocumentClick:i,onDocumentShare:m,selectedDocumentId:c})})})]})}export{p as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-MZP7RIQZ.mjs";import{a as
|
|
1
|
+
import{a as n}from"./chunk-MZP7RIQZ.mjs";import{a as i}from"./chunk-2UVHBGOC.mjs";import{a as l}from"./chunk-5ISPA3SI.mjs";import{a as m}from"./chunk-PG4VW7VP.mjs";import{ChevronRightIcon as c,HomeIcon as f}from"@heroicons/react/20/solid";import{Fragment as h,jsx as e,jsxs as a}from"react/jsx-runtime";var d={highImpact:i,lowImpact:l,mediumImpact:m,sectionHero:n},H=t=>{let{type:o}=t||{};if(!o||o==="none")return null;let r=d[o];return r?e(r,{...t}):null};function N({breadcrumbItems:t}){if(t&&t.length>0){let o=t.filter(r=>r.label.toLowerCase()!=="home");return e("nav",{"aria-label":"Breadcrumb",className:"flex",children:a("ol",{role:"list",className:"flex items-center space-x-4",children:[e("li",{children:e("div",{children:a("a",{href:"/",className:"text-foreground hover:text-accent",children:[e(f,{"aria-hidden":"true",className:"size-5 shrink-0"}),e("span",{className:"sr-only",children:"Home"})]})})}),o.map((r,s)=>e("li",{children:a("div",{className:"flex items-center",children:[e(c,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),r.href?e("a",{href:r.href,className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:r.label}):e("div",{className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:r.label})]})},s))]})})}return e(h,{})}export{H as a,N as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u}from"./chunk-KML6U7IE.mjs";import{a as C}from"./chunk-KGEIN56Y.mjs";import{f as v}from"./chunk-
|
|
1
|
+
import{a as u}from"./chunk-KML6U7IE.mjs";import{a as C}from"./chunk-KGEIN56Y.mjs";import{f as v}from"./chunk-OAK45GQL.mjs";import{a as b}from"./chunk-FMJBJ3HN.mjs";import{a as h}from"./chunk-WISCWNL2.mjs";import{a as c,b as g,c as x,e as p}from"./chunk-YO3GQYRJ.mjs";import{b as f}from"./chunk-ZUA4KNIR.mjs";import U from"next/image";import{notFound as M}from"next/navigation";import w from"next/link";import{FaLinkedin as I}from"react-icons/fa6";import{jsx as e,jsxs as s}from"react/jsx-runtime";function L({image:t,name:i,about:l,socialLinks:o}){return!t||!t.src||t.src.length<3||!i?null:e("div",{className:"mt-1 z-10 px-0 pt-0 lg:px-10",children:e(c,{children:s(p,{className:"flex flex-col items-center",children:[t&&t.src&&e(U,{src:t.src,alt:t.alt||"",width:127,height:127,placeholder:"blur",blurDataURL:u,className:"mx-auto mt-6 rounded-full object-cover"}),s("h3",{className:"flex items-center ali font-secondary text-center py-2 text-lg leading-[1.25] text-accent md:text-xl",children:[i,o&&o.length>0&&e("nav",{"aria-label":"social links",children:e("ul",{className:"inline-flex items-center divide-x divide-accent/50 text-accent dark:divide-accent/50 dark:text-white",children:o.map((a,m)=>a.href&&e("li",{children:e(h,{href:a.href,openNewTab:!0,className:"block px-4 text-base/[1.75] transition-transform duration-350 hover:-translate-y-1 hover:text-accents",children:e("span",{children:a.icon})})},m))})})]}),e("p",{children:l})]})})})}function j({page:t,categoryList:i,edit:l=!1,path:o="/admin/collections/posts/"}){if(!t)return M();let{meta:a,populatedAuthors:m,authors:P,categories:N,content:k,title:y}=t,A={image:{src:a&&a.image&&a.image.url||void 0,alt:a&&a.image&&a.image.alt||void 0},authorName:m?.[0]?.name||"",category:N,commentCount:0,title:y,description:a?.description||""},d=P?.map(r=>{let n=r.profilePicture&&r.profilePicture.sizes?.square?.url||r.profilePicture&&r.profilePicture.sizes?.thumbnail?.url||"";return console.log("val:",n),{name:r.name||"",about:r.about||"",image:{src:n,alt:r.name||"blog author"},socialLinks:[{icon:e(I,{}),href:r.linkedIn??""}]}});return console.log(d),e(b,{children:s("div",{className:"grid gap-30px lg:grid-cols-[1fr_410px]",children:[e("div",{children:s("div",{className:"[&_p+P]:mt-4",children:[e("div",{className:"my-4 h-px bg-body/30 lg:my-5"}),e(v,{content:k,enableGutter:!1,className:"prose-invert"})]})}),s("div",{className:"grid gap-30px self-baseline max-md:mx-auto max-md:max-w-[410px] lg:gap-10",children:[l&&e("div",{className:"mt-4 lg:-mt-10 z-10 px-0 pt-0 lg:px-10",children:s(c,{children:[e(g,{children:e(x,{className:"text-accent",children:"Content Actions"})}),s(p,{children:[e("p",{className:"mb-4 text-sm text-muted-foreground",children:"Edit this page in the CMS"}),e(w,{href:`${o}${t.id}`,children:e(f,{variant:"outline",className:"w-full text-accent hover:text-foreground",children:"Edit"})})]})]})}),d&&d.map((r,n)=>e(L,{...r},n)),i&&i.links&&e("div",{className:"mt-4 px-0 pt-0 lg:px-10",children:e(C,{links:i.links,title:i.title})})]})]})})}export{j as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as c}from"./chunk-5RTGHMF3.mjs";import{b as
|
|
4
|
+
import{a as c}from"./chunk-5RTGHMF3.mjs";import{b as m}from"./chunk-CSBGSBEU.mjs";import{a as s,b as t,c as i,d as n,e as d,f as l}from"./chunk-YO3GQYRJ.mjs";import{b as o}from"./chunk-ZUA4KNIR.mjs";import{motion as f}from"motion/react";import{Star as N}from"lucide-react";import{jsx as e,jsxs as a}from"react/jsx-runtime";function A({app:r,onOpen:p,onFavorite:C,showProgress:u=!1,className:v}){return e(f.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:v,children:a(s,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[e(t,{className:"pb-2",children:a("div",{className:"flex items-center justify-between",children:[e("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-muted",children:r.icon}),r.new?e(m,{className:"rounded-xl bg-amber-500",children:"New"}):e(o,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-2xl",onClick:()=>C?.(r),children:e(N,{className:"h-4 w-4"})})]})}),a(d,{className:"pb-2",children:[e(i,{className:"text-lg",children:r.name}),e(n,{children:r.description}),u&&r.progress<100&&a("div",{className:"mt-2",children:[a("div",{className:"flex items-center justify-between text-sm",children:[e("span",{children:"Installation"}),a("span",{children:[r.progress,"%"]})]}),e(c,{value:r.progress,className:"h-2 mt-1 rounded-xl"})]})]}),e(l,{children:e(o,{variant:"secondary",className:"w-full rounded-2xl",onClick:()=>p?.(r),children:r.progress<100?"Continue Install":"Open"})})]})})}export{A as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{b as n}from"./chunk-JQL4XGAF.mjs";import{
|
|
4
|
+
import{b as n}from"./chunk-JQL4XGAF.mjs";import{b as m}from"./chunk-CSBGSBEU.mjs";import{a as i,b as d,c}from"./chunk-YNCJATT7.mjs";import{a as s}from"./chunk-MDJREBVI.mjs";import{CheckCircleIcon as u,ChevronDownIcon as v,CircleIcon as x,ClockIcon as g,WrenchIcon as N,XCircleIcon as f}from"lucide-react";import{isValidElement as P}from"react";import{jsx as e,jsxs as r}from"react/jsx-runtime";var U=({className:t,...o})=>e(i,{className:s("not-prose mb-4 w-full rounded-md border",t),...o}),C=t=>{let o={"input-streaming":"Pending","input-available":"Running","approval-requested":"Awaiting Approval","approval-responded":"Responded","output-available":"Completed","output-error":"Error","output-denied":"Denied"};return r(m,{className:"gap-1.5 rounded-full text-xs",variant:"secondary",children:[{"input-streaming":e(x,{className:"size-4"}),"input-available":e(g,{className:"size-4 animate-pulse"}),"approval-requested":e(g,{className:"size-4 text-yellow-600"}),"approval-responded":e(u,{className:"size-4 text-blue-600"}),"output-available":e(u,{className:"size-4 text-green-600"}),"output-error":e(f,{className:"size-4 text-red-600"}),"output-denied":e(f,{className:"size-4 text-orange-600"})}[t],o[t]]})},h=({className:t,title:o,type:a,state:p,...l})=>r(d,{className:s("flex w-full items-center justify-between gap-4 p-3",t),...l,children:[r("div",{className:"flex items-center gap-2",children:[e(N,{className:"size-4 text-muted-foreground"}),e("span",{className:"font-medium text-sm",children:o??a.split("-").slice(1).join("-")}),C(p)]}),e(v,{className:"size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),R=({className:t,...o})=>e(c,{className:s("data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",t),...o}),O=({className:t,input:o,...a})=>r("div",{className:s("space-y-2 overflow-hidden p-4",t),...a,children:[e("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Parameters"}),e("div",{className:"rounded-md bg-muted/50",children:e(n,{code:JSON.stringify(o,null,2),language:"json"})})]}),j=({className:t,output:o,errorText:a,...p})=>{if(!(o||a))return null;let l=e("div",{children:o});return typeof o=="object"&&!P(o)?l=e(n,{code:JSON.stringify(o,null,2),language:"json"}):typeof o=="string"&&(l=e(n,{code:o,language:"json"})),r("div",{className:s("space-y-2 p-4",t),...p,children:[e("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:a?"Error":"Result"}),r("div",{className:s("overflow-x-auto rounded-md text-xs [&_table]:w-full",a?"bg-destructive/10 text-destructive":"bg-muted/50 text-foreground"),children:[a&&e("div",{children:a}),l]})]})};export{U as a,h as b,R as c,O as d,j as e};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a}from"./chunk-
|
|
4
|
+
import{a}from"./chunk-KOLP657S.mjs";import{a as b}from"./chunk-S3OBSLA5.mjs";import{a as g}from"./chunk-MDJREBVI.mjs";import{useState as l}from"react";import{User as P}from"lucide-react";import{jsx as i,jsxs as h}from"react/jsx-runtime";var v=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:i(P,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function E({sidebarItems:r,children:U,title:C="Digital Colleagues",notifications:N=[],currentBusinessUnit:B=v[0],onBusinessUnitChange:y,onSearch:c,businessUnits:F=v,activeTab:x,onTabChange:T,showTabs:k=!1,onActionClick:A,actionIcon:R,actionText:S="Action",onNotificationRemove:w,onRemoveAll:M,logo:n="/headerlogo.png",logoLink:d="/teams",appName:o="Nuvia",tagline:s="Collaboration Platform",sidebarInitiallyClosed:O=!1}){let[e,I]=l(!O),[m,t]=l(!1),[u,L]=l(B),p=f=>{L(f),y?.(f)};return h("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[m&&i("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>t(!1)}),i("div",{className:"md:hidden",children:i(a,{items:r,isOpen:m,isMobile:!0,onClose:()=>t(!1),currentBusinessUnit:u,onBusinessUnitChange:p,onSearch:c,logo:n,logoLink:d,appName:o,tagline:s})}),i("div",{className:"hidden md:block",children:i(a,{items:r,isOpen:e,isMobile:!1,currentBusinessUnit:u,onBusinessUnitChange:p,onSearch:c,logo:n,logoLink:d,appName:o,tagline:s})}),h("div",{className:g("min-h-screen fixed w-full transition-all duration-300 ease-in-out",e?"md:pl-64":"md:pl-0"),children:[i(b,{title:C,notifications:N,onToggleSidebar:()=>I(!e),onToggleMobileMenu:()=>t(!0),sidebarOpen:e,activeTab:x,onTabChange:T,showTabs:k,onActionClick:A,actionIcon:R,actionText:S,onNotificationRemove:w,onRemoveAll:M,logo:n,appName:o,tagline:s}),i("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-y-scroll",children:U})]})]})}export{E as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as b}from"./chunk-
|
|
4
|
+
import{a as b}from"./chunk-XTUH2DJE.mjs";import{a as I}from"./chunk-Q35D7SUU.mjs";import{a as S}from"./chunk-JGKLAY6J.mjs";import{useChat as me}from"@ai-sdk/react";import{useState as l}from"react";import{motion as fe,AnimatePresence as he}from"motion/react";import{Users as ye}from"lucide-react";import{jsx as n,jsxs as Ce}from"react/jsx-runtime";function Le({aiConfig:w,useCustomChat:F,enableAI:T=!0,messages:D=[],businessUnits:R=[],capabilities:B=[],sidebarItems:x=[],notifications:N=[],sessions:M=[],onNewChat:A,onSessionSelect:L,onSessionDelete:P,onSessionEdit:k=()=>{},onBusinessUnitChange:E=()=>{},onNotificationRemove:K=()=>{},onRemoveAll:O=()=>{},onActionClick:$=()=>{},onSearch:q=p=>console.log("Search query:",p),initialTeam:z="design",currentSession:m=null,showCapabilities:ve=!0,title:W="Digital Colleagues",enableFileUpload:f=!0,maxFileSize:h=10,allowedFileTypes:y=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:H="/headerlogo.png",appName:X="Nuvia",tagline:G="AI-Powered Workspace",actionIcon:J=n(ye,{className:"mr-2 h-4 w-4"}),actionText:Q="Collaborate",sidebarInitiallyClosed:V=!1}){let p={...w,onError:e=>{i?.setMessages(t=>[...t,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:e.message}]}]),console.error("Error in CopilotInterface:",e)}},Y=me(p||{}),i=T?F||Y:null,[Z,u]=l(""),[_,C]=l(!1),j=i?.messages||D,r=Z,ee=i?.status==="submitted"||_,se=i?.addToolResult?(e,t,s)=>{i.addToolResult({tool:t,toolCallId:e,output:s}),console.log("Tool result added:",{toolCallId:e,tool:t,output:s}),i.sendMessage()}:()=>{console.log("addToolResult not available")},o=R||[],te={id:"default",name:"Default Team",description:"Default team when no business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[ie,ne]=l(()=>o.length===0?te:o.find(e=>e.id===z)||o[0]),[a,c]=l([]),[oe,ae]=l(!1),le=e=>{if(!e||!f)return;let t=[];Array.from(e).forEach(s=>{if(s.size>h*1024*1024){alert(`File ${s.name} is too large. Maximum size is ${h}MB.`);return}if(y.length>0&&!y.some(d=>s.type.match(d))){alert(`File type ${s.type} is not allowed.`);return}let U={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:s,status:"pending",progress:0};if(s.type.startsWith("image/")){let d=new FileReader;d.onload=ue=>{c(ge=>ge.map(g=>g.id===U.id?{...g,preview:ue.target?.result}:g))},d.readAsDataURL(s)}t.push(U)}),c(s=>[...s,...t])},re=e=>{c(t=>t.filter(s=>s.id!==e))},v=()=>{if(!(!r.trim()&&a.length===0)){if(i){let e=a.length>0?ce(a.map(t=>t.file)):void 0;i.sendMessage({text:r,files:e},{body:{timestamp:Date.now()}}),u("")}else console.log("Message to send:",r),console.log("Files to upload:",a),u(""),C(!0),setTimeout(()=>{C(!1)},1500);c([])}},ce=e=>{let t=new DataTransfer;return e.forEach(s=>t.items.add(s)),t.files},de=e=>{e.key==="Enter"&&!e.shiftKey&&(e.preventDefault(),v())},pe=e=>{u(e)};return n(b,{sidebarItems:x||[],title:W,notifications:N||[],businessUnits:o,currentBusinessUnit:ie,onBusinessUnitChange:e=>{e&&(ne(e),E?.(e))},onSearch:q,showTabs:!1,onActionClick:$,actionIcon:J,actionText:Q,onNotificationRemove:K,onRemoveAll:O,logo:H,appName:X,tagline:G,sidebarInitiallyClosed:V,children:n(he,{mode:"wait",children:n(fe.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:Ce("div",{className:"h-full flex",children:[n("div",{className:"w-80 flex-shrink-0 h-full p-2",children:n(I,{sessions:M||[],currentSession:m,teams:o,onNewChat:A,onSessionSelect:L,onSessionEdit:k,onSessionDelete:P})}),n("div",{className:"flex-1 h-full p-2",children:n(S,{messages:j||[],input:r,isTyping:ee,currentSessionTitle:m?.title,capabilities:B||[],onInputChange:pe,addToolResult:se,onSendMessage:v,onKeyPress:de,fileUploads:a,isDragOver:oe,enableFileUpload:f,onFileUpload:le,onRemoveFile:re,onDragOver:ae})})]})},"chat-interface")})})}export{Le as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as r}from"./chunk-
|
|
1
|
+
import{f as r}from"./chunk-OAK45GQL.mjs";import{jsx as e}from"react/jsx-runtime";var c=({children:o,richText:t})=>e("div",{className:"min-w-full py-10 bg-muted mt-24",children:e("div",{className:"container",children:o||t&&e(r,{content:t,enableGutter:!1})})});export{c as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{c as k,h as v,i as R,k as f,l as y,o as x,p as c,q as d,r as h,s as w,v as L,w as P,x as B}from"./chunk-
|
|
4
|
+
import{c as k,h as v,i as R,k as f,l as y,o as x,p as c,q as d,r as h,s as w,v as L,w as P,x as B}from"./chunk-ZFUP5NVF.mjs";import{a as n}from"./chunk-7GSXNSLD.mjs";import{a as S,b as C,c as M}from"./chunk-YNCJATT7.mjs";import{ChevronRight as G}from"lucide-react";import T from"clsx";import{Fragment as H,jsx as e,jsxs as r}from"react/jsx-runtime";function J({mainNav:u,secondaryNav:s,ongoingWork:l,title:t,subTitle:o,pathName:i,menuHeading:O,onNavClick:m,loading:b=!1,LinkComponent:N,...A}){let g=N?a=>e(N,{...a}):m?({href:a,children:p,...I})=>e("button",{onClick:()=>m&&m(a),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...I,children:p}):a=>e("a",{...a});return r(k,{...A,variant:"inset",children:[e(v,{children:e(c,{children:e(d,{children:b?r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e(n,{className:"bg-gray-200 my-2 w-full h-7"}),e(n,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e("span",{className:"truncate font-semibold",children:t}),o&&e("span",{className:"truncate text-sm",children:o})]})})})}),b&&r(f,{children:[e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"})]}),r(f,{children:[e("div",{className:"px-4 text-sm",children:"Recent Work"}),l&&!b&&l.map((a,p)=>e(F,{subNav:a,pathName:i,Link:g},p)),e("div",{className:"border-t border-gray-200 my-4"}),u&&!b&&u.map((a,p)=>e(F,{subNav:a,pathName:i,Link:g},p)),e(y,{className:"mt-auto",children:e(x,{children:e(c,{children:s&&!b&&s.map(a=>e(d,{children:e(h,{asChild:!0,size:"sm",children:r(g,{href:a.url||"",children:[a.icon&&e(a.icon,{}),e("span",{children:a.label})]})})},a.label))})})})]}),e(R,{})]})}function F({subNav:u,pathName:s,Link:l}){let t=u,o=!1;return t.links&&t.links.map(i=>{i.url===s&&(o=!0)}),e(S,{defaultOpen:!0,className:"group/collapsible",children:e(y,{className:"py-0",children:e(c,{children:e(S,{asChild:!0,defaultOpen:t.isActive,children:r(d,{children:[e(h,{asChild:!0,tooltip:t.label,className:T(o&&"font-bold text-accent"),children:r(l,{href:t.url,children:[t.icon&&e(t.icon,{}),e("span",{children:t.label})]})}),t.links?.length?r(H,{children:[e(C,{asChild:!0,children:r(w,{className:"data-[state=open]:rotate-90",children:[e(G,{}),e("span",{className:"sr-only",children:"Toggle"})]})}),e(M,{children:e(L,{children:t.links?.map(i=>e(P,{children:e(B,{asChild:!0,className:T(i.url===s&&"font-bold text-accent"),children:e(l,{href:i.url,children:e("span",{children:i.label})})})},i.label))})})]}):null]})},t.label)})})})}export{J as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as $}from"./chunk-Z22NSJMF.mjs";import{a as R,c as S,d as T,g as I,i as p}from"./chunk-YFAZQYK4.mjs";import{a as P}from"./chunk-B4H6T2GP.mjs";import{a as u}from"./chunk-TVZOULLL.mjs";import{a as A,f as B,g as E,i as O}from"./chunk-3UMMMQEH.mjs";import{a as h}from"./chunk-L5JPAKPM.mjs";import{b as x}from"./chunk-ZUA4KNIR.mjs";import{a as C,e as q}from"./chunk-YO3GQYRJ.mjs";import{useEffect as M,useState as D}from"react";import{Plus as W,Clock as Y,Calendar as G,User as J,Edit2 as Q,Trash2 as X}from"lucide-react";import{Fragment as de,jsx as e,jsxs as t}from"react/jsx-runtime";var Z=a=>a.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),_=a=>{let[o,m]=a.split(":"),c=new Date;return c.setHours(parseInt(o),parseInt(m)),c.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},U=(a,o)=>{let m=new Date,c=new Date(a);if(o){let[r,d]=o.split(":");c.setHours(parseInt(r),parseInt(d))}return c<m},H=a=>{let o=new Date;return a.toDateString()===o.toDateString()},ee=a=>{let o=new Date;return o.setDate(o.getDate()+1),a.toDateString()===o.toDateString()},te=({colleagues:a,onAddReminder:o,open:m,setOpen:c})=>{let[r,d]=D({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[s,v]=D(!1),N=n=>{if(n.preventDefault(),!a.find(F=>F?.id.toString()===r.colleagueId.toString())){console.error("No valid colleague selected"),v(!0);return}v(!1);let k={title:r.title,description:r.description,dueDate:new Date(r.dueDate).toISOString(),dueTime:r.dueTime||void 0,isRecurring:r.isRecurring,assignedColleague:Number(r.colleagueId),project:1,updatedAt:new Date().toISOString()};o(k),c(!1),d({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};M(()=>{r.colleagueId&&v(!1)},[r.colleagueId]);let l=a.filter(Boolean);return e(A,{open:m,onOpenChange:c,children:t(B,{className:"max-w-2xl",children:[e(E,{children:e(O,{children:"Add New Reminder"})}),t("form",{onSubmit:N,className:"space-y-4",children:[e("div",{className:"grid grid-cols-2 gap-4",children:t("div",{children:[e(u,{htmlFor:"title",children:"Title"}),e(h,{id:"title",value:r.title,onChange:n=>d({...r,title:n.target.value}),placeholder:"Enter reminder title",required:!0})]})}),t("div",{children:[e(u,{htmlFor:"description",children:"Description"}),e(P,{id:"description",value:r.description,onChange:n=>d({...r,description:n.target.value}),placeholder:"Enter reminder description",rows:3})]}),t("div",{className:"grid grid-cols-2 gap-4",children:[t("div",{children:[e(u,{htmlFor:"dueDate",children:"Due Date"}),e(h,{id:"dueDate",type:"date",value:r.dueDate,onChange:n=>d({...r,dueDate:n.target.value}),required:!0})]}),t("div",{children:[e(u,{htmlFor:"dueTime",children:"Due Time (optional)"}),e(h,{id:"dueTime",type:"time",value:r.dueTime,onChange:n=>d({...r,dueTime:n.target.value})})]})]}),t("div",{children:[e(u,{className:`${s?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),t(R,{value:r.colleagueId,onValueChange:n=>{d({...r,colleagueId:n})},required:!0,children:[e(T,{className:`${s?"text-destructive border-red-500":""}`,children:e(S,{className:`${s?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:a.find(n=>n?.id.toString()===r.colleagueId.toString())?.name||"Select a digital colleague"})}),e(I,{children:l.map(n=>e(p,{value:n.id.toString(),children:n.name},n.id))})]}),s&&e("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),t("div",{className:"space-y-2",children:[t("div",{className:"flex items-center space-x-2",children:[e("input",{type:"checkbox",id:"isRecurring",checked:r.isRecurring,onChange:n=>d({...r,isRecurring:n.target.checked}),className:"rounded border-border"}),e(u,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),r.isRecurring&&t("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[t("div",{children:[e(u,{htmlFor:"recurrencePattern",children:"Frequency"}),t(R,{value:r.recurrencePattern,onValueChange:n=>d({...r,recurrencePattern:n}),children:[e(T,{children:e(S,{})}),t(I,{children:[e(p,{value:"daily",children:"Daily"}),e(p,{value:"weekly",children:"Weekly"}),e(p,{value:"monthly",children:"Monthly"}),e(p,{value:"yearly",children:"Yearly"})]})]})]}),t("div",{children:[e(u,{htmlFor:"recurrenceInterval",children:"Every"}),e(h,{id:"recurrenceInterval",type:"number",min:"1",value:r.recurrenceInterval,onChange:n=>d({...r,recurrenceInterval:parseInt(n.target.value)})})]})]})]}),t("div",{className:"flex justify-end space-x-2",children:[e(x,{type:"button",variant:"outline",onClick:()=>c(!1),children:"Cancel"}),e(x,{type:"submit",children:"Add Reminder"})]})]})]})})},ae=({reminder:a,colleagues:o,onUpdateReminder:m,open:c,onClose:r})=>{let[d,s]=D({title:a.title,description:a.description,dueDate:a.dueDate?.toString().split("T")[0],dueTime:a.dueTime||"",isRecurring:a.isRecurring}),v=l=>{l.preventDefault(),m(a.id.toString(),{title:d.title,description:d.description,dueDate:new Date(d.dueDate||"").toISOString(),dueTime:d.dueTime||void 0,isRecurring:d.isRecurring}),r()},N=o.filter(Boolean);return e(A,{open:c,onOpenChange:r,children:t(B,{className:"max-w-2xl",children:[e(E,{children:e(O,{children:"Edit Reminder"})}),t("form",{onSubmit:v,className:"space-y-4",children:[e("div",{className:"grid grid-cols-2 gap-4",children:t("div",{children:[e(u,{htmlFor:"edit-title",children:"Title"}),e(h,{id:"edit-title",value:d.title,onChange:l=>s({...d,title:l.target.value}),placeholder:"Enter reminder title",required:!0})]})}),t("div",{children:[e(u,{htmlFor:"edit-description",children:"Description"}),e(P,{id:"edit-description",value:d.description||"",onChange:l=>s({...d,description:l.target.value}),placeholder:"Enter reminder description",rows:3})]}),t("div",{className:"grid grid-cols-2 gap-4",children:[t("div",{children:[e(u,{htmlFor:"edit-dueDate",children:"Due Date"}),e(h,{id:"edit-dueDate",type:"date",value:d.dueDate,onChange:l=>s({...d,dueDate:l.target.value}),required:!0})]}),t("div",{children:[e(u,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),e(h,{id:"edit-dueTime",type:"time",value:d.dueTime,onChange:l=>s({...d,dueTime:l.target.value})})]})]}),e("div",{className:"space-y-2",children:t("div",{className:"flex items-center space-x-2",children:[e("input",{type:"checkbox",id:"edit-isRecurring",checked:d.isRecurring||!1,onChange:l=>s({...d,isRecurring:l.target.checked}),className:"rounded border-border"}),e(u,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]})}),t("div",{className:"flex justify-end space-x-2",children:[e(x,{type:"button",variant:"outline",onClick:r,children:"Cancel"}),e(x,{type:"submit",children:"Save Changes"})]})]})]})})},re=({reminder:a,colleagues:o,onUpdateReminder:m,onDeleteReminder:c})=>{let[r,d]=D(!1);if(!a||!a.id)return null;let s=U(new Date(a.dueDate||""),a.dueTime||""),v=H(new Date(a.dueDate||"")),N=ee(new Date(a.dueDate||"")),l=()=>{m(a.id.toString(),{})},n=()=>v?"Today":N?"Tomorrow":Z(new Date(a.dueDate||""));return t(de,{children:[e(ae,{reminder:a,colleagues:o,onUpdateReminder:m,open:r,onClose:()=>d(!1)}),e(C,{children:e(q,{className:"p-4",children:t("div",{className:"flex items-start justify-between",children:[t("div",{className:"flex items-start space-x-3 flex-1",children:[e("button",{onClick:l,className:"mt-1 text-primary hover:text-primary/80"}),t("div",{className:"flex-1",children:[e("div",{className:"flex items-center space-x-2 mb-1",children:e("h3",{children:a.title})}),e("p",{className:"text-sm text-muted-foreground mb-2",children:a.description}),t("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[t("div",{className:"flex items-center space-x-1",children:[e(G,{className:"h-4 w-4"}),e("span",{className:s?"text-destructive font-medium":"",children:n()})]}),a.dueTime&&t("div",{className:"flex items-center space-x-1",children:[e(Y,{className:"h-4 w-4"}),e("span",{children:_(a.dueTime)})]}),t("div",{className:"flex items-center space-x-1",children:[e(J,{className:"h-4 w-4"}),e("span",{children:typeof a.assignedColleague!="number"?a.assignedColleague.name:"Unknown Colleague"})]})]})]})]}),t("div",{className:"flex items-center space-x-1",children:[e(x,{variant:"ghost",size:"sm",onClick:()=>d(!0),className:"h-8 w-8 p-0",children:e(Q,{className:"h-4 w-4"})}),e(x,{variant:"ghost",size:"sm",onClick:()=>c(a.id.toString()),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:e(X,{className:"h-4 w-4"})})]})]})})})]})},ie=({initialReminders:a=[],initialColleagues:o=[],onAddReminder:m,onUpdateReminder:c,onDeleteReminder:r})=>{let[d,s]=D(a.filter(Boolean)),[v,N]=D(o.filter(Boolean)),[l,n]=D("all"),[b,k]=D(""),[F,L]=D(!1);M(()=>{s(a.filter(Boolean))},[a]),M(()=>{N(o.filter(Boolean))},[o]);let j=i=>{if(!i.title){console.error("Invalid reminder data:",i);return}let g={...i,id:Date.now(),createdAt:new Date().toISOString()};s(y=>[...y,g]),m?.(i)},z=(i,g)=>{if(!i){console.error("No reminder ID provided for update");return}s(y=>y.map(w=>w?.id.toString()===i?{...w,...g}:w)),c?.(i,g)},K=i=>{if(!i){console.error("No reminder ID provided for deletion");return}s(g=>g.filter(y=>y?.id.toString()!==i)),r?.(i)},V=d.filter(i=>{if(!i)return!1;if(b){let g=b.toLowerCase();if(!(i.title.toLowerCase().includes(g)||i.description?.toLowerCase().includes(g)))return!1}switch(l){case"pending":case"completed":case"overdue":return U(new Date(i.dueDate||""),i.dueTime||"");case"today":return H(new Date(i.dueDate||""));default:return!0}}).sort((i,g)=>{if(!i||!g)return 0;let y={high:3,medium:2,low:1},w=0;return w!==0?w:new Date(i.dueDate||"").getTime()-new Date(g.dueDate||"").getTime()}),f={total:d.filter(Boolean).length,overdue:d.filter(i=>i&&U(new Date(i.dueDate||""),i.dueTime||"")).length,today:d.filter(i=>i&&H(new Date(i.dueDate||""))).length},oe=v.find(Boolean)||{id:"1",name:"Default Colleague",description:"Default digital colleague for task management",jobDescription:"Default team member for task management",workInstructions:"Handle basic task assignments and reminders",capabilities:["task-management","reminder-creation"],knowledge:[],coreKnowledge:[]};return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e($,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-to-r from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{L(!0)}}}),t("div",{className:"h-full bg-background",children:[e(te,{colleagues:v,onAddReminder:j,open:F,setOpen:L}),t("div",{className:"p-6",children:[t("div",{className:"flex items-center justify-between mb-6",children:[t("div",{children:[e("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),e("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),t(x,{className:"flex items-center space-x-2",onClick:()=>L(!0),children:[e(W,{className:"h-4 w-4"}),e("span",{children:"Add Reminder"})]})]}),t("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[t(C,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-foreground",children:f.total}),e("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),t(C,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-primary",children:f.overdue}),e("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),t(C,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-success",children:f.today}),e("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),t(C,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-destructive",children:f.overdue}),e("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),t(C,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-warning",children:f.today}),e("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),t("div",{className:"flex items-center space-x-4 mb-6",children:[e("div",{className:"flex-1",children:e(h,{placeholder:"Search reminders...",value:b,onChange:i=>k(i.target.value),className:"max-w-md"})}),t(R,{value:l,onValueChange:i=>n(i),children:[e(T,{className:"w-40",children:e(S,{})}),t(I,{children:[t(p,{value:"all",children:["All (",f.total,")"]}),t(p,{value:"overdue",children:["Overdue (",f.overdue,")"]}),t(p,{value:"overdue",children:["Overdue (",f.overdue,")"]}),t(p,{value:"today",children:["Today (",f.today,")"]})]})]})]}),e("div",{className:"space-y-4",children:V.length===0?t(C,{className:"p-8 text-center",children:[e("div",{className:"text-muted-foreground",children:b||l!=="all"?"No reminders match your filters":"No reminders yet"}),!b&&l==="all"&&e("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder to get started"})]}):V.map(i=>i&&e(re,{reminder:i,colleagues:v,onUpdateReminder:z,onDeleteReminder:K},i.id))})]})]})]})},Te=ie;export{ie as a,Te as b};
|
|
1
|
+
import{a as $}from"./chunk-HF33ZXKX.mjs";import{a as R,c as S,d as T,g as I,i as p}from"./chunk-YFAZQYK4.mjs";import{a as P}from"./chunk-B4H6T2GP.mjs";import{a as u}from"./chunk-TVZOULLL.mjs";import{a as A,f as B,g as E,i as O}from"./chunk-3UMMMQEH.mjs";import{a as C,e as q}from"./chunk-YO3GQYRJ.mjs";import{a as h}from"./chunk-L5JPAKPM.mjs";import{b as x}from"./chunk-ZUA4KNIR.mjs";import{useEffect as M,useState as D}from"react";import{Plus as W,Clock as Y,Calendar as G,User as J,Edit2 as Q,Trash2 as X}from"lucide-react";import{Fragment as de,jsx as e,jsxs as t}from"react/jsx-runtime";var Z=a=>a.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),_=a=>{let[o,m]=a.split(":"),c=new Date;return c.setHours(parseInt(o),parseInt(m)),c.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},U=(a,o)=>{let m=new Date,c=new Date(a);if(o){let[r,d]=o.split(":");c.setHours(parseInt(r),parseInt(d))}return c<m},H=a=>{let o=new Date;return a.toDateString()===o.toDateString()},ee=a=>{let o=new Date;return o.setDate(o.getDate()+1),a.toDateString()===o.toDateString()},te=({colleagues:a,onAddReminder:o,open:m,setOpen:c})=>{let[r,d]=D({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[s,v]=D(!1),N=n=>{if(n.preventDefault(),!a.find(F=>F?.id.toString()===r.colleagueId.toString())){console.error("No valid colleague selected"),v(!0);return}v(!1);let k={title:r.title,description:r.description,dueDate:new Date(r.dueDate).toISOString(),dueTime:r.dueTime||void 0,isRecurring:r.isRecurring,assignedColleague:Number(r.colleagueId),project:1,updatedAt:new Date().toISOString()};o(k),c(!1),d({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};M(()=>{r.colleagueId&&v(!1)},[r.colleagueId]);let l=a.filter(Boolean);return e(A,{open:m,onOpenChange:c,children:t(B,{className:"max-w-2xl",children:[e(E,{children:e(O,{children:"Add New Reminder"})}),t("form",{onSubmit:N,className:"space-y-4",children:[e("div",{className:"grid grid-cols-2 gap-4",children:t("div",{children:[e(u,{htmlFor:"title",children:"Title"}),e(h,{id:"title",value:r.title,onChange:n=>d({...r,title:n.target.value}),placeholder:"Enter reminder title",required:!0})]})}),t("div",{children:[e(u,{htmlFor:"description",children:"Description"}),e(P,{id:"description",value:r.description,onChange:n=>d({...r,description:n.target.value}),placeholder:"Enter reminder description",rows:3})]}),t("div",{className:"grid grid-cols-2 gap-4",children:[t("div",{children:[e(u,{htmlFor:"dueDate",children:"Due Date"}),e(h,{id:"dueDate",type:"date",value:r.dueDate,onChange:n=>d({...r,dueDate:n.target.value}),required:!0})]}),t("div",{children:[e(u,{htmlFor:"dueTime",children:"Due Time (optional)"}),e(h,{id:"dueTime",type:"time",value:r.dueTime,onChange:n=>d({...r,dueTime:n.target.value})})]})]}),t("div",{children:[e(u,{className:`${s?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),t(R,{value:r.colleagueId,onValueChange:n=>{d({...r,colleagueId:n})},required:!0,children:[e(T,{className:`${s?"text-destructive border-red-500":""}`,children:e(S,{className:`${s?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:a.find(n=>n?.id.toString()===r.colleagueId.toString())?.name||"Select a digital colleague"})}),e(I,{children:l.map(n=>e(p,{value:n.id.toString(),children:n.name},n.id))})]}),s&&e("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),t("div",{className:"space-y-2",children:[t("div",{className:"flex items-center space-x-2",children:[e("input",{type:"checkbox",id:"isRecurring",checked:r.isRecurring,onChange:n=>d({...r,isRecurring:n.target.checked}),className:"rounded border-border"}),e(u,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),r.isRecurring&&t("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[t("div",{children:[e(u,{htmlFor:"recurrencePattern",children:"Frequency"}),t(R,{value:r.recurrencePattern,onValueChange:n=>d({...r,recurrencePattern:n}),children:[e(T,{children:e(S,{})}),t(I,{children:[e(p,{value:"daily",children:"Daily"}),e(p,{value:"weekly",children:"Weekly"}),e(p,{value:"monthly",children:"Monthly"}),e(p,{value:"yearly",children:"Yearly"})]})]})]}),t("div",{children:[e(u,{htmlFor:"recurrenceInterval",children:"Every"}),e(h,{id:"recurrenceInterval",type:"number",min:"1",value:r.recurrenceInterval,onChange:n=>d({...r,recurrenceInterval:parseInt(n.target.value)})})]})]})]}),t("div",{className:"flex justify-end space-x-2",children:[e(x,{type:"button",variant:"outline",onClick:()=>c(!1),children:"Cancel"}),e(x,{type:"submit",children:"Add Reminder"})]})]})]})})},ae=({reminder:a,colleagues:o,onUpdateReminder:m,open:c,onClose:r})=>{let[d,s]=D({title:a.title,description:a.description,dueDate:a.dueDate?.toString().split("T")[0],dueTime:a.dueTime||"",isRecurring:a.isRecurring}),v=l=>{l.preventDefault(),m(a.id.toString(),{title:d.title,description:d.description,dueDate:new Date(d.dueDate||"").toISOString(),dueTime:d.dueTime||void 0,isRecurring:d.isRecurring}),r()},N=o.filter(Boolean);return e(A,{open:c,onOpenChange:r,children:t(B,{className:"max-w-2xl",children:[e(E,{children:e(O,{children:"Edit Reminder"})}),t("form",{onSubmit:v,className:"space-y-4",children:[e("div",{className:"grid grid-cols-2 gap-4",children:t("div",{children:[e(u,{htmlFor:"edit-title",children:"Title"}),e(h,{id:"edit-title",value:d.title,onChange:l=>s({...d,title:l.target.value}),placeholder:"Enter reminder title",required:!0})]})}),t("div",{children:[e(u,{htmlFor:"edit-description",children:"Description"}),e(P,{id:"edit-description",value:d.description||"",onChange:l=>s({...d,description:l.target.value}),placeholder:"Enter reminder description",rows:3})]}),t("div",{className:"grid grid-cols-2 gap-4",children:[t("div",{children:[e(u,{htmlFor:"edit-dueDate",children:"Due Date"}),e(h,{id:"edit-dueDate",type:"date",value:d.dueDate,onChange:l=>s({...d,dueDate:l.target.value}),required:!0})]}),t("div",{children:[e(u,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),e(h,{id:"edit-dueTime",type:"time",value:d.dueTime,onChange:l=>s({...d,dueTime:l.target.value})})]})]}),e("div",{className:"space-y-2",children:t("div",{className:"flex items-center space-x-2",children:[e("input",{type:"checkbox",id:"edit-isRecurring",checked:d.isRecurring||!1,onChange:l=>s({...d,isRecurring:l.target.checked}),className:"rounded border-border"}),e(u,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]})}),t("div",{className:"flex justify-end space-x-2",children:[e(x,{type:"button",variant:"outline",onClick:r,children:"Cancel"}),e(x,{type:"submit",children:"Save Changes"})]})]})]})})},re=({reminder:a,colleagues:o,onUpdateReminder:m,onDeleteReminder:c})=>{let[r,d]=D(!1);if(!a||!a.id)return null;let s=U(new Date(a.dueDate||""),a.dueTime||""),v=H(new Date(a.dueDate||"")),N=ee(new Date(a.dueDate||"")),l=()=>{m(a.id.toString(),{})},n=()=>v?"Today":N?"Tomorrow":Z(new Date(a.dueDate||""));return t(de,{children:[e(ae,{reminder:a,colleagues:o,onUpdateReminder:m,open:r,onClose:()=>d(!1)}),e(C,{children:e(q,{className:"p-4",children:t("div",{className:"flex items-start justify-between",children:[t("div",{className:"flex items-start space-x-3 flex-1",children:[e("button",{onClick:l,className:"mt-1 text-primary hover:text-primary/80"}),t("div",{className:"flex-1",children:[e("div",{className:"flex items-center space-x-2 mb-1",children:e("h3",{children:a.title})}),e("p",{className:"text-sm text-muted-foreground mb-2",children:a.description}),t("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[t("div",{className:"flex items-center space-x-1",children:[e(G,{className:"h-4 w-4"}),e("span",{className:s?"text-destructive font-medium":"",children:n()})]}),a.dueTime&&t("div",{className:"flex items-center space-x-1",children:[e(Y,{className:"h-4 w-4"}),e("span",{children:_(a.dueTime)})]}),t("div",{className:"flex items-center space-x-1",children:[e(J,{className:"h-4 w-4"}),e("span",{children:typeof a.assignedColleague!="number"?a.assignedColleague.name:"Unknown Colleague"})]})]})]})]}),t("div",{className:"flex items-center space-x-1",children:[e(x,{variant:"ghost",size:"sm",onClick:()=>d(!0),className:"h-8 w-8 p-0",children:e(Q,{className:"h-4 w-4"})}),e(x,{variant:"ghost",size:"sm",onClick:()=>c(a.id.toString()),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:e(X,{className:"h-4 w-4"})})]})]})})})]})},ie=({initialReminders:a=[],initialColleagues:o=[],onAddReminder:m,onUpdateReminder:c,onDeleteReminder:r})=>{let[d,s]=D(a.filter(Boolean)),[v,N]=D(o.filter(Boolean)),[l,n]=D("all"),[b,k]=D(""),[F,L]=D(!1);M(()=>{s(a.filter(Boolean))},[a]),M(()=>{N(o.filter(Boolean))},[o]);let j=i=>{if(!i.title){console.error("Invalid reminder data:",i);return}let g={...i,id:Date.now(),createdAt:new Date().toISOString()};s(y=>[...y,g]),m?.(i)},z=(i,g)=>{if(!i){console.error("No reminder ID provided for update");return}s(y=>y.map(w=>w?.id.toString()===i?{...w,...g}:w)),c?.(i,g)},K=i=>{if(!i){console.error("No reminder ID provided for deletion");return}s(g=>g.filter(y=>y?.id.toString()!==i)),r?.(i)},V=d.filter(i=>{if(!i)return!1;if(b){let g=b.toLowerCase();if(!(i.title.toLowerCase().includes(g)||i.description?.toLowerCase().includes(g)))return!1}switch(l){case"pending":case"completed":case"overdue":return U(new Date(i.dueDate||""),i.dueTime||"");case"today":return H(new Date(i.dueDate||""));default:return!0}}).sort((i,g)=>{if(!i||!g)return 0;let y={high:3,medium:2,low:1},w=0;return w!==0?w:new Date(i.dueDate||"").getTime()-new Date(g.dueDate||"").getTime()}),f={total:d.filter(Boolean).length,overdue:d.filter(i=>i&&U(new Date(i.dueDate||""),i.dueTime||"")).length,today:d.filter(i=>i&&H(new Date(i.dueDate||""))).length},oe=v.find(Boolean)||{id:"1",name:"Default Colleague",description:"Default digital colleague for task management",jobDescription:"Default team member for task management",workInstructions:"Handle basic task assignments and reminders",capabilities:["task-management","reminder-creation"],knowledge:[],coreKnowledge:[]};return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e($,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-to-r from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{L(!0)}}}),t("div",{className:"h-full bg-background",children:[e(te,{colleagues:v,onAddReminder:j,open:F,setOpen:L}),t("div",{className:"p-6",children:[t("div",{className:"flex items-center justify-between mb-6",children:[t("div",{children:[e("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),e("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),t(x,{className:"flex items-center space-x-2",onClick:()=>L(!0),children:[e(W,{className:"h-4 w-4"}),e("span",{children:"Add Reminder"})]})]}),t("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[t(C,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-foreground",children:f.total}),e("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),t(C,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-primary",children:f.overdue}),e("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),t(C,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-success",children:f.today}),e("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),t(C,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-destructive",children:f.overdue}),e("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),t(C,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-warning",children:f.today}),e("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),t("div",{className:"flex items-center space-x-4 mb-6",children:[e("div",{className:"flex-1",children:e(h,{placeholder:"Search reminders...",value:b,onChange:i=>k(i.target.value),className:"max-w-md"})}),t(R,{value:l,onValueChange:i=>n(i),children:[e(T,{className:"w-40",children:e(S,{})}),t(I,{children:[t(p,{value:"all",children:["All (",f.total,")"]}),t(p,{value:"overdue",children:["Overdue (",f.overdue,")"]}),t(p,{value:"overdue",children:["Overdue (",f.overdue,")"]}),t(p,{value:"today",children:["Today (",f.today,")"]})]})]})]}),e("div",{className:"space-y-4",children:V.length===0?t(C,{className:"p-8 text-center",children:[e("div",{className:"text-muted-foreground",children:b||l!=="all"?"No reminders match your filters":"No reminders yet"}),!b&&l==="all"&&e("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder to get started"})]}):V.map(i=>i&&e(re,{reminder:i,colleagues:v,onUpdateReminder:z,onDeleteReminder:K},i.id))})]})]})]})},Te=ie;export{ie as a,Te as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as $}from"./chunk-
|
|
4
|
+
import{a as $}from"./chunk-LPCO4T25.mjs";import{a as O}from"./chunk-FT3AE7L2.mjs";import{a as H}from"./chunk-L5JPAKPM.mjs";import{motion as v}from"motion/react";import{ChevronRight as A,File as M,FileText as K,Search as Q}from"lucide-react";import{useState as N,useMemo as P,useEffect as T}from"react";import{Fragment as E,jsx as e,jsxs as r}from"react/jsx-runtime";function j({label:x,documents:a,children:l,level:p,onDocumentClick:w,selectedDocumentId:f,showDocumentCount:y=!0}){let[c,i]=N(p===0),D=l&&Object.keys(l).length>0,u=a.length+(l?Object.values(l).reduce((t,n)=>t+n.documents.length,0):0),b=t=>{switch(t){case"markdown":case"mdx":return e(K,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richText":return e(M,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return e(M,{className:"h-3.5 w-3.5 text-muted-foreground"})}},g=t=>{let n=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return n[t%n.length]};return r("div",{className:"space-y-1",children:[(D||a.length>0)&&r(v.div,{className:`group flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200 ${c?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${p*20}px`},onClick:()=>i(!c),whileHover:{scale:1.01},whileTap:{scale:.99},children:[e("div",{className:`w-1 h-6 rounded-full ${g(p)}`}),e(v.div,{animate:{rotate:c?90:0},transition:{duration:.2},className:"flex-shrink-0",children:e(A,{className:"h-4 w-4 text-muted-foreground"})}),r("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[e("div",{className:"flex items-center gap-2 min-w-0",children:e("span",{className:"font-medium text-foreground truncate",children:x})}),y&&u>0&&e("div",{className:"flex-shrink-0 ml-2",children:e("span",{className:"inline-flex items-center justify-center w-6 h-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:u})})]})]}),e(v.div,{initial:!1,animate:{height:c?"auto":0,opacity:c?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:r("div",{className:"pt-2 space-y-1",children:[a.map((t,n)=>r(v.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:n*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${f===t.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${p*20+20}px`},onClick:()=>w?.(t),whileHover:{scale:1.01},whileTap:{scale:.99},children:[e("div",{className:"flex-shrink-0",children:b(t.format)}),r("div",{className:"flex-1 min-w-0",children:[e("p",{className:`text-sm truncate transition-colors ${f===t.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:t.title}),t.description&&e("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:t.description})]}),t.tags&&t.tags.length>0&&e("div",{className:"flex-shrink-0",children:e("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:t.tags[0]})})]},t.id)),l&&Object.entries(l).map(([t,n])=>e(j,{label:t,documents:n.documents,children:n.children,level:p+1,onDocumentClick:w,selectedDocumentId:f,showDocumentCount:y},t))]})})]})}function Z({documents:x,menuConfig:a,onDocumentClick:l,onDocumentShare:p,onDocumentUpdate:w,selectedDocumentId:f,className:y,editable:c=!0}){let[i,D]=N(""),[u,b]=N(null),[g,t]=N(x);T(()=>{t(x)},[x]),T(()=>{if(u?.id){let o=g.find(s=>s.id===u.id);o&&b(o)}},[g]);let n=P(()=>i?g.filter(o=>o.title.toLowerCase().includes(i.toLowerCase())||o.description?.toLowerCase().includes(i.toLowerCase())||o.tags?.some(s=>s.toLowerCase().includes(i.toLowerCase()))||Object.values(o.metadata||{}).some(s=>String(s).toLowerCase().includes(i.toLowerCase()))):g,[g,i]),S=P(()=>{let o=(s,L)=>{if(L.length===0)return{};let[F,...B]=L;return s.reduce((d,C)=>{let U=C.metadata?.[F]||"Uncategorized",m=String(U);if(d[m]||(d[m]={documents:[],children:{}}),B.length===0)d[m].documents.push(C);else{let k=o([C],B),h=Object.keys(k)[0];h&&(d[m].children||(d[m].children={}),d[m].children[h]?d[m].children[h].documents.push(...k[h].documents):d[m].children[h]=k[h])}return d},{})};return o(n,a.groupBy)},[n,a.groupBy]),I=o=>{b(o),l?.(o)};return r("div",{className:`flex h-full ${y||""}`,children:[r("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[e("div",{className:"p-6 border-b border-border",children:r("div",{className:"relative",children:[e("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e(Q,{className:"h-4 w-4 text-muted-foreground"})}),e(H,{placeholder:"Search knowledge base...",value:i,onChange:o=>D(o.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"})]})}),e(O,{className:"h-[calc(100%-100px)]",children:e("div",{className:"p-4 space-y-3",children:a.groupBy.length===0?e(E,{children:e(j,{label:"Document",documents:n,level:0,onDocumentClick:I,selectedDocumentId:f,showDocumentCount:a.showDocumentCount},"Document")}):r(E,{children:[Object.entries(S).map(([o,s])=>e(j,{label:o,documents:s.documents,children:s.children,level:0,onDocumentClick:I,selectedDocumentId:f,showDocumentCount:a.showDocumentCount},o)),Object.keys(S).length===0&&r(v.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[e("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:e(K,{className:"h-8 w-8 text-muted-foreground"})}),e("p",{className:"text-sm font-medium",children:"No documents found"}),e("p",{className:"text-xs mt-1",children:"Try adjusting your search terms"})]})]})})})]}),e("div",{className:"flex-1 bg-background overflow-scroll",children:u?e($,{document:u,onDocumentUpdate:w,editable:c}):e("div",{className:"h-full flex items-center justify-center text-center",children:r(v.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-sm",children:[e("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:e(K,{className:"h-10 w-10 text-primary"})}),e("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),e("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}export{Z as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{
|
|
4
|
+
import{a as r,b as i,c as m,d as l,e as n,f as o}from"./chunk-YO3GQYRJ.mjs";import{b as t}from"./chunk-ZUA4KNIR.mjs";import{motion as p}from"motion/react";import{Users as u,Bot as f,FolderOpen as v}from"lucide-react";import{jsx as e,jsxs as a}from"react/jsx-runtime";function y({team:s,onOpen:d,className:c}){return e(p.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:c,children:a(r,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[a(i,{children:[e(m,{className:"text-lg",children:s.name}),e(l,{className:"mt-1 text-sm",children:s.description})]}),a(n,{className:"space-y-4",children:[a("div",{className:"grid grid-cols-2 gap-4",children:[a("div",{className:"flex items-center justify-between text-sm",children:[a("div",{className:"flex items-center gap-2",children:[e(u,{className:"h-4 w-4 text-blue-500"}),e("span",{children:"Human"})]}),e("span",{className:"font-medium",children:s.humanColleagues})]}),a("div",{className:"flex items-center justify-between text-sm",children:[a("div",{className:"flex items-center gap-2",children:[e(f,{className:"h-4 w-4 text-purple-500"}),e("span",{children:"Digital"})]}),e("span",{className:"font-medium",children:s.digitalColleagues})]})]}),a("div",{className:"flex items-center justify-between text-sm border-t pt-4",children:[a("div",{className:"flex items-center gap-2",children:[e(v,{className:"h-4 w-4 text-green-500"}),e("span",{children:"Projects"})]}),e("span",{className:"font-medium",children:s.projects})]})]}),e(o,{className:"flex gap-2",children:e(t,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>d?.(s),children:"View Team"})})]})})}export{y as a};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as D}from"./chunk-
|
|
4
|
+
import{a as D}from"./chunk-ZKTIH47I.mjs";import{a as $}from"./chunk-DFIXTV2M.mjs";import{a as F}from"./chunk-B4H6T2GP.mjs";import{b as k}from"./chunk-ZUA4KNIR.mjs";import{motion as A}from"motion/react";import{File as S,FileText as I,Type as L,Loader2 as E,X as K,Save as M}from"lucide-react";import{useEffect as _,useRef as B,useState as b}from"react";import{Fragment as W,jsx as u,jsxs as T}from"react/jsx-runtime";var w=n=>"mimeType"in n&&"url"in n&&!("format"in n),P=n=>{if(!n?.root?.children)return"";let l=[],i=e=>{if(!e)return"";switch(e.type){case"heading":{let t=e.tag?parseInt(e.tag.replace("h","")):1,s=a(e.children||[]);return"#".repeat(t)+" "+s}case"paragraph":return e.children&&e.children.some(o=>o.type==="text"?o.text&&o.text.trim().length>0:(o.type==="linebreak",!0))?a(e.children||[]):"";case"list":{let t=[],s=e.listType==="number"?"1.":"-";return e.children?.forEach((o,m)=>{if(o.type==="listitem"){let p=a(o.children||[]),x=e.listType==="number"?`${m+1}.`:s;t.push(`${x} ${p}`)}}),t.join(`
|
|
5
5
|
`)}case"listitem":return a(e.children||[]);case"text":{let t=e.text||"";if(e.format){let s=(e.format&1)!==0,o=(e.format&2)!==0,m=(e.format&4)!==0,p=(e.format&8)!==0;(e.format&16)!==0?t=`\`${t}\``:(s&&(t=`**${t}**`),o&&(t=`*${t}*`),m&&(t=`~~${t}~~`),p&&(t=`<u>${t}</u>`))}return t}default:return e.children?a(e.children):""}},a=e=>e.map(t=>{if(t.type==="text"){let s=t.text||"";if(t.format){let o=(t.format&1)!==0,m=(t.format&2)!==0,p=(t.format&4)!==0,x=(t.format&8)!==0;(t.format&16)!==0?s=`\`${s}\``:(o&&(s=`**${s}**`),m&&(s=`*${s}*`),p&&(s=`~~${s}~~`),x&&(s=`<u>${s}</u>`))}return s}else{if(t.type==="paragraph")return a(t.children||[]);if(t.type==="listitem")return a(t.children||[]);if(t.type==="linebreak")return`
|
|
6
6
|
`}return i(t)}).filter(Boolean).join("");n.root.children.forEach(e=>{let t=i(e);e.type==="paragraph"?l.push(t||""):t&&l.push(t)});let r=[];for(let e=0;e<l.length;e++)r.push(l[e]),e<l.length-1&&(l[e]===""||l[e+1]===""||r.push(""));return r.join(`
|
|
7
7
|
`)},y=n=>{let l=[],i=0;for(;i<n.length;){let r=n.slice(i).match(/^<u\s*[^>]*>([\s\S]*?)<\/u>/i);if(r&&r[0]){let c=r[1]||"",d=c?y(c):[];d.length>0?(d.forEach(f=>{f.type==="text"&&(f.format=(f.format||0)|8)}),l.push(...d)):c===""&&l.push({type:"text",text:"",format:8}),i+=r[0].length;continue}if(n.slice(i).startsWith("</u>")){i+=4;continue}let e=n.slice(i).match(/^(`+)([^`]+)\1/);if(e){let c=e[2];c&&l.push({type:"text",text:c,format:16}),i+=e[0].length;continue}let t=n.slice(i).match(/^(~~)(.+?)\1/);if(t){let c=t[2],d=y(c);d.forEach(f=>{f.type==="text"&&(f.format=(f.format||0)|4)}),l.push(...d),i+=t[0].length;continue}let s=n.slice(i).match(/^(\*\*|__)(.+?)\1/);if(s){let c=s[2],d=y(c);d.forEach(f=>{f.type==="text"&&(f.format=(f.format||0)|1)}),l.push(...d),i+=s[0].length;continue}let o=n.slice(i).match(/^(\*|_)([^*_\n]+?)\1(?!\*|_)/);if(o&&o[0].length>2){let c=o[2],d=y(c);d.forEach(f=>{f.type==="text"&&(f.format=(f.format||0)|2)}),l.push(...d),i+=o[0].length;continue}if(n[i]===`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as d}from"./chunk-YRMNCHFO.mjs";import{a as c}from"./chunk-B4H6T2GP.mjs";import{a as r}from"./chunk-TVZOULLL.mjs";import{a as
|
|
4
|
+
import{a as d}from"./chunk-YRMNCHFO.mjs";import{a as c}from"./chunk-B4H6T2GP.mjs";import{a as r}from"./chunk-TVZOULLL.mjs";import{a as p,b as f,c as h,e as g}from"./chunk-YO3GQYRJ.mjs";import{a as u}from"./chunk-L5JPAKPM.mjs";import{b as m}from"./chunk-ZUA4KNIR.mjs";import{useState as b,useEffect as M}from"react";import{Users as S,Edit as j}from"lucide-react";import{jsx as a,jsxs as t}from"react/jsx-runtime";function L({team:n,onSave:C,onCancel:v,isLoading:l=!1,title:y,submitLabel:w,cancelLabel:T="Cancel",readOnly:F=!1}){let[e,i]=b({name:"",description:"",systemMsg:"",useProjects:!1,useKnowledge:!1,useFiles:!1,useChat:!1,...n}),[o,N]=b(!F);M(()=>{n&&i(n)},[n]);let x=s=>{s.preventDefault();let D={id:e.id||Date.now(),name:e.name,description:e.description||null,systemMsg:e.systemMsg||null,useProjects:e.useProjects||!1,useKnowledge:e.useKnowledge||!1,useFiles:e.useFiles||!1,useChat:e.useChat||!1,updatedAt:new Date().toISOString(),createdAt:e.createdAt||new Date().toISOString()};C(D)},E=s=>{s.preventDefault(),N(!o)},k=y||(o?n?"Edit Team":"Create New Team":"View Team"),P=w||(n?"Update Team":"Create Team");return t(p,{className:"m-8 w-full max-w-4xl mx-auto",children:[a(f,{children:t(h,{className:"flex items-center gap-2",children:[a(S,{className:"h-5 w-5"}),k]})}),a(g,{children:t("form",{onSubmit:x,className:"space-y-6",children:[t("div",{className:"space-y-4",children:[t("div",{className:"space-y-2",children:[a(r,{htmlFor:"name",children:"Team Name *"}),a(u,{id:"name",value:e.name||"",onChange:s=>i({...e,name:s.target.value}),required:!0,disabled:l||!o,placeholder:"Enter team name..."})]}),t("div",{className:"space-y-2",children:[a(r,{htmlFor:"description",children:"Description"}),a(c,{id:"description",value:e.description||"",onChange:s=>i({...e,description:s.target.value}),rows:3,placeholder:"Brief description of this team...",disabled:l||!o})]}),t("div",{className:"space-y-2",children:[a(r,{htmlFor:"systemMsg",children:"Ways of working"}),a(c,{id:"systemMsg",value:e.systemMsg||"",onChange:s=>i({...e,systemMsg:s.target.value}),rows:3,placeholder:"Describe how this team works in as much detail as possible. Include processes, tools, systems, styles...",disabled:l||!o})]})]}),t("div",{className:"space-y-4",children:[a("h3",{className:"text-lg font-semibold",children:"Team Configuration"}),t("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t("div",{className:"flex items-center space-x-2",children:[a(d,{id:"useProjects",checked:e.useProjects||!1,onCheckedChange:s=>i({...e,useProjects:s}),disabled:l||!o}),a(r,{htmlFor:"useProjects",children:"Enable Projects"})]}),t("div",{className:"flex items-center space-x-2",children:[a(d,{id:"useKnowledge",checked:e.useKnowledge||!1,onCheckedChange:s=>i({...e,useKnowledge:s}),disabled:l||!o}),a(r,{htmlFor:"useKnowledge",children:"Enable Knowledge Base"})]}),t("div",{className:"flex items-center space-x-2",children:[a(d,{id:"useFiles",checked:e.useFiles||!1,onCheckedChange:s=>i({...e,useFiles:s}),disabled:l||!o}),a(r,{htmlFor:"useFiles",children:"Enable File Management"})]}),t("div",{className:"flex items-center space-x-2",children:[a(d,{id:"useChat",checked:e.useChat||!1,onCheckedChange:s=>i({...e,useChat:s}),disabled:l||!o}),a(r,{htmlFor:"useChat",children:"Enable Team Chat"})]})]})]}),t("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[a(m,{type:"button",variant:"outline",onClick:v,disabled:l,children:o?T:"Close"}),o?a(m,{type:"submit",disabled:l||!e.name?.trim(),children:l?"Saving...":P}):t(m,{type:"button",onClick:E,disabled:l,className:"gap-2",children:[a(j,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}export{L as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as M}from"./chunk-
|
|
4
|
+
import{a as M}from"./chunk-YCD46AKJ.mjs";import{a as q}from"./chunk-G53ROINJ.mjs";import{a as P}from"./chunk-HF33ZXKX.mjs";import{a as B}from"./chunk-R422HRMQ.mjs";import{a as j}from"./chunk-GLZEHRPY.mjs";import{a as A,c as T,d as k,g as I,i as g}from"./chunk-YFAZQYK4.mjs";import{a as m,b as v,c as y,e as c}from"./chunk-YO3GQYRJ.mjs";import{a as L}from"./chunk-L5JPAKPM.mjs";import{b}from"./chunk-ZUA4KNIR.mjs";import{useEffect as re,useState as r}from"react";import{Plus as ne,Search as se,Users as G,Bot as de,User as me,Filter as ce}from"lucide-react";import{motion as ge,AnimatePresence as ue}from"motion/react";import{jsx as t,jsxs as a}from"react/jsx-runtime";function pe({initialColleagues:h,onColleagueAdd:w,onColleagueEdit:V,onColleagueDelete:W,compactView:x=!1,departments:z=["Design","Engineering","Marketing","Product","Sales","Operations"],className:J,availableUsers:E=[],existingDigitalColleagues:H=[]}){let[n,s]=r(h||[]),[d,K]=r(""),[S,U]=r("all"),[N,F]=r("all"),[p,Q]=r("all"),[R,u]=r(null),[O,C]=r(null);re(()=>{s(h||[])},[h]);let X=Array.isArray(E)?E:[],Y=Array.isArray(H)?H:[],[D,i]=r("main"),f=n.filter(e=>!e||!e.name?!1:e.name.toLowerCase().includes(d.toLowerCase())||e.type==="human"&&e.email?.toLowerCase().includes(d.toLowerCase())||e.type==="digital"&&e.jobDescription?.toLowerCase().includes(d.toLowerCase())),Z=f.filter(e=>e.type==="human"),_=f.filter(e=>e.type==="digital"),$=()=>{i("typeSelection")},Ce=e=>{e.type==="digital"&&(u(e),i("form")),console.log("Editing colleague:",e),V?.(e)},fe=e=>{e.type==="digital"&&(C(e),i("view"))},ee=e=>{let o={id:`human-${Date.now()}`,type:"human",name:e.name||"",email:e.email,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};s(l=>[...l,o]),w?.(o),i("main")},ve=e=>{if(!e||!e.id){console.error("Invalid cloned colleague provided to handleDigitalColleagueClone:",e);return}s(o=>[...o,e]),w?.(e),i("main")},te=()=>{u(null),i("form")},ye=e=>{if(!e||!e.id){console.error("Invalid colleague provided to handleSaveColleague:",e);return}R?(s(o=>o.map(l=>l.id===e.id?e:l)),V?.(e)):(s(o=>[...o,e]),w?.(e)),i("main"),u(null)},he=()=>{i("main"),u(null),C(null)},we=()=>{i("main"),C(null)},xe=()=>{O&&(u(O),C(null),i("form"))},Se=e=>{W?.(e,n.find(o=>o.id===e).type),s(o=>o.filter(l=>l.id!==e))},le=()=>{K(""),U("all"),F("all")},Ne=()=>{let e=[];return Y.forEach(l=>{l.knowledge&&Array.isArray(l.knowledge)&&e.push(...l.knowledge),l.coreKnowledge&&Array.isArray(l.coreKnowledge)&&e.push(...l.coreKnowledge)}),n.forEach(l=>{l.type==="digital"&&(l.knowledge&&Array.isArray(l.knowledge)&&e.push(...l.knowledge),l.coreKnowledge&&Array.isArray(l.coreKnowledge)&&e.push(...l.coreKnowledge))}),e.filter((l,ae,ie)=>ae===ie.findIndex(oe=>oe.id===l.id))};return D==="typeSelection"?t(M,{onSelectHuman:()=>i("userSelection"),onSelectDigital:()=>i("digitalOptions"),onCancel:()=>i("main")}):D==="userSelection"?t(B,{users:X,onUserSelect:ee,onCancel:()=>i("typeSelection")}):D==="digitalOptions"?t(q,{onCloneExisting:()=>i("digitalClone"),onCreateNew:te,onCancel:()=>i("typeSelection")}):t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:t(ue,{mode:"wait",children:t(ge.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:a("div",{className:`space-y-6 ${J||""}`,children:[t(P,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Add colleague",onClick:$}}),a("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[a(m,{children:[a(v,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[t(y,{className:"text-sm font-medium",children:"Total Colleagues"}),t(G,{className:"h-4 w-4 text-muted-foreground"})]}),a(c,{children:[t("div",{className:"text-2xl font-bold",children:n.length}),t("p",{className:"text-xs text-muted-foreground"})]})]}),a(m,{children:[a(v,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[t(y,{className:"text-sm font-medium",children:"Human Members"}),t(me,{className:"h-4 w-4 text-muted-foreground"})]}),a(c,{children:[t("div",{className:"text-2xl font-bold",children:n.filter(e=>e.type==="human").length}),t("p",{className:"text-xs text-muted-foreground",children:"active"})]})]}),a(m,{children:[a(v,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[t(y,{className:"text-sm font-medium",children:"Digital Colleagues"}),t(de,{className:"h-4 w-4 text-muted-foreground"})]}),a(c,{children:[t("div",{className:"text-2xl font-bold",children:n.filter(e=>e.type==="digital").length}),t("p",{className:"text-xs text-muted-foreground",children:"active"})]})]})]}),t(m,{children:t(c,{className:"pt-6",children:a("div",{className:"flex flex-col md:flex-row gap-4",children:[t("div",{className:"flex-1",children:a("div",{className:"relative",children:[t(se,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),t(L,{placeholder:"Search colleagues...",value:d,onChange:e=>K(e.target.value),className:"pl-9"})]})}),a(A,{value:S,onValueChange:U,children:[t(k,{className:"w-full md:w-[180px]",children:t(T,{placeholder:"Department"})}),a(I,{children:[t(g,{value:"all",children:"All Departments"}),z.map(e=>t(g,{value:e,children:e},e))]})]}),a(A,{value:N,onValueChange:F,children:[t(k,{className:"w-full md:w-[140px]",children:t(T,{placeholder:"Status"})}),a(I,{children:[t(g,{value:"all",children:"All Status"}),t(g,{value:"active",children:"Active"}),t(g,{value:"inactive",children:"Inactive"})]})]}),(d||S!=="all"||N!=="all")&&a(b,{variant:"outline",onClick:le,className:"gap-2",children:[t(ce,{className:"h-4 w-4"}),"Clear"]})]})})}),a("div",{className:"space-y-4",children:[t(j,{activeTab:p,onTabChange:Q,tabOptions:[{value:"all",label:`All (${f.length})`},{value:"human",label:`Human (${Z.length})`},{value:"digital",label:`Digital (${_.length})`}],maxWidth:"400px",gridCols:3}),p==="all"&&t("div",{className:`grid gap-4 ${x?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`}),p==="human"&&t("div",{className:`grid gap-4 ${x?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`}),p==="digital"&&t("div",{className:`grid gap-4 ${x?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`})]}),f.length===0&&t(m,{children:t(c,{className:"pt-6",children:a("div",{className:"text-center py-8",children:[t(G,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),t("h3",{className:"text-lg font-semibold mb-2",children:"No colleagues found"}),t("p",{className:"text-muted-foreground mb-4",children:d||S!=="all"||N!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),a(b,{onClick:$,className:"gap-2",children:[t(ne,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}export{pe as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{c as k,h as v,i as R,k as f,l as y,o as x,p as c,q as d,r as h,s as w,v as L,w as P,x as B}from"./chunk-
|
|
4
|
+
import{c as k,h as v,i as R,k as f,l as y,o as x,p as c,q as d,r as h,s as w,v as L,w as P,x as B}from"./chunk-ZFUP5NVF.mjs";import{a as n}from"./chunk-7GSXNSLD.mjs";import{a as S,b as C,c as M}from"./chunk-YNCJATT7.mjs";import{ChevronRight as G}from"lucide-react";import T from"clsx";import{Fragment as H,jsx as e,jsxs as r}from"react/jsx-runtime";function J({mainNav:u,secondaryNav:s,ongoingWork:l,title:t,subTitle:o,pathName:i,menuHeading:O,onNavClick:m,loading:b=!1,LinkComponent:N,...A}){let g=N?a=>e(N,{...a}):m?({href:a,children:p,...I})=>e("button",{onClick:()=>m&&m(a),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...I,children:p}):a=>e("a",{...a});return r(k,{...A,variant:"inset",children:[e(v,{children:e(c,{children:e(d,{children:b?r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e(n,{className:"bg-gray-200 my-2 w-full h-7"}),e(n,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e("span",{className:"truncate font-semibold",children:t}),o&&e("span",{className:"truncate text-sm",children:o})]})})})}),b&&r(f,{children:[e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"})]}),r(f,{children:[e("div",{className:"px-4 text-sm",children:"Recent Work"}),l&&!b&&l.map((a,p)=>e(F,{subNav:a,pathName:i,Link:g},p)),e("div",{className:"border-t border-gray-200 my-4"}),u&&!b&&u.map((a,p)=>e(F,{subNav:a,pathName:i,Link:g},p)),e(y,{className:"mt-auto",children:e(x,{children:e(c,{children:s&&!b&&s.map(a=>e(d,{children:e(h,{asChild:!0,size:"sm",children:r(g,{href:a.url||"",children:[a.icon&&e(a.icon,{}),e("span",{children:a.label})]})})},a.label))})})})]}),e(R,{})]})}function F({subNav:u,pathName:s,Link:l}){let t=u,o=!1;return t.links&&t.links.map(i=>{i.url===s&&(o=!0)}),e(S,{defaultOpen:!0,className:"group/collapsible",children:e(y,{className:"py-0",children:e(c,{children:e(S,{asChild:!0,defaultOpen:t.isActive,children:r(d,{children:[e(h,{asChild:!0,tooltip:t.label,className:T(o&&"font-bold text-accent"),children:r(l,{href:t.url,children:[t.icon&&e(t.icon,{}),e("span",{children:t.label})]})}),t.links?.length?r(H,{children:[e(C,{asChild:!0,children:r(w,{className:"data-[state=open]:rotate-90",children:[e(G,{}),e("span",{className:"sr-only",children:"Toggle"})]})}),e(M,{children:e(L,{children:t.links?.map(i=>e(P,{children:e(B,{asChild:!0,className:T(i.url===s&&"font-bold text-accent"),children:e(l,{href:i.url,children:e("span",{children:i.label})})})},i.label))})})]}):null]})},t.label)})})})}export{J as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{f as t}from"./chunk-
|
|
4
|
+
import{f as t}from"./chunk-OAK45GQL.mjs";import{a}from"./chunk-MDJREBVI.mjs";import n from"react";import*as l from"@radix-ui/react-collapsible";import{ChevronDownIcon as c,ChevronUpIcon as m}from"@radix-ui/react-icons";import{jsx as e,jsxs as s}from"react/jsx-runtime";var h=({title:p,richText:r})=>{let[o,i]=n.useState(!1);return e("div",{className:"border rounded-lg overflow-hidden",children:s(l.Root,{className:a("w-full"),open:o,onOpenChange:i,children:[s(l.Trigger,{className:"flex w-full items-center justify-between bg-white px-4 py-3 text-left hover:bg-gray-50",children:[e("h2",{className:"text-lg font-medium",children:p}),o?e(m,{className:"h-6 w-6"}):e(c,{className:"h-6 w-6"})]}),e(l.Content,{className:"overflow-hidden data-[state=closed]:animate-collapse data-[state=open]:animate-expand border-t",children:e("div",{className:"px-4 py-3 bg-white",children:e(t,{content:r||{},enableGutter:!1})})})]})})};export{h as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as J}from"./chunk-DLX4NQ3T.mjs";import{a as S}from"./chunk-KG7HG2VO.mjs";import{a as q}from"./chunk-KZCIHFTM.mjs";import{a as Q}from"./chunk-L3V5YDPH.mjs";import{a as G}from"./chunk-QC2UWZWL.mjs";import{a as V}from"./chunk-HF33ZXKX.mjs";import{a as w}from"./chunk-UVHMI3PU.mjs";import{b as z}from"./chunk-CSBGSBEU.mjs";import Te,{useEffect as c,useState as n,useRef as l}from"react";import{jsx as a,jsxs as v}from"react/jsx-runtime";var Ne=({initialTasks:p=[],initialEpics:T=[],initialSprints:h=[],initialUsers:he=[],initialColleagues:A=[],initialProjects:Ae=[],onAddTask:W,onUpdateTask:D,onDeleteTask:x,onTaskClick:X,onAddEpic:Y,onAddComment:Z,onUploadFile:_,onDeleteFile:ee,onFileUpdate:te})=>{let[se,u]=n([]),[d,y]=n([]),[O,ie]=n([]),[H,N]=n(!1),[P,U]=n(!1),[r,m]=n(null),[C,I]=n(null),[ae,De]=n([]),[M,ne]=n([]),[g,B]=n(0),o=l(null),re=l(null),oe=Te.useMemo(()=>[...d.map(e=>e.id),0],[d]),j=l(""),F=l(""),R=l(""),$=l(""),f=(e,t)=>e.map(s=>`${s.id}-${new Date(s.createdAt).getTime()}-${new Date(s.updatedAt).getTime()}`).join("-")+(t?`-${t}`:"");c(()=>{let e=p.map(s=>s.files?.filter(i=>typeof i=="object").map(i=>new Date(i.updatedAt).getTime())).flat(),t=f(p,e.join("-"));t!==j.current&&(u(p),r&&m(p.find(s=>s.id===r.id)||null),j.current=t)},[p]),c(()=>{let e=f(T);e!==F.current&&(y(T),F.current=e)},[T]),c(()=>{let e=f(h);e!==R.current&&(ie(h),R.current=e)},[h]),c(()=>{let e=f(A.map(t=>({id:t.id,updatedAt:t.updatedAt,createdAt:t.createdAt})));e!==$.current&&(ne(A),$.current=e)},[A]),c(()=>{let e=()=>{if(o.current){let i=o.current.offsetHeight;B(i)}};e();let t=new ResizeObserver(e);o.current&&t.observe(o.current);let s=()=>{setTimeout(e,100)};return window.addEventListener("storage",s),()=>{t.disconnect(),window.removeEventListener("storage",s)}},[]),c(()=>{let e=setTimeout(()=>{o.current&&B(o.current.offsetHeight)},300);return()=>clearTimeout(e)},[H,P]);let de=se.filter(e=>!0),ce=e=>de.filter(t=>t.status===e),le=e=>{let t={};return d.forEach(s=>{t[s.id]=e.filter(i=>w(i.epic)===s.id)}),t["no-epic"]=e.filter(s=>!w(s.epic)),t},K=e=>{I(e)},pe=e=>{C&&(u(t=>t.map(s=>s.id===C.id?{...s,status:e}:s)),D?.(C.id.toString(),{status:e}),I(null))},ue=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};u(s=>[...s,t]),W?.(e)},me=async(e,t)=>{u(s=>s.map(i=>i.id===Number(e)?{...i,...t}:i)),D&&await D(e,t),r?.id===Number(e)&&m(s=>({...s,...t}))},ge=async e=>{u(t=>t.filter(s=>s.id!==Number(e))),r?.id===Number(e)&&m(null),x&&await x(e)},fe=e=>{let t={...e,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};y(s=>[...s,t]),Y?.(e)},L=e=>{m(e),X?.(e)},ke=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],ve=g>0?`calc(100vh - ${g+120}px)`:"calc(100vh - 12rem)";return v("div",{ref:re,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[a("div",{ref:o,className:"flex-shrink-0",children:a(V,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>N(!0)},secondaryAction:{label:"Add epic",onClick:()=>U(!0)}})}),a("div",{className:"flex-1 min-h-0 mt-8",children:a("div",{className:"h-full",style:{height:g>0?`calc(100vh - ${g+120}px)`:"calc(100vh - 12rem)"},children:a("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:ke.map(e=>{let t=ce(e.status),s=le(t);return v(q,{title:e.title,status:e.status,taskCount:t.length,onDrop:pe,isCompact:e.status==="done",height:ve,children:[s["no-epic"].map(i=>a(S,{epic:null,task:i,onDragStart:K,onTaskClick:L,isCompact:e.status==="done"},i.id)),oe.map(i=>{let E=d.find(k=>k.id===i),b=s[i]||[];return b.length===0?null:v("div",{className:"mb-6",children:[v("div",{className:"flex items-center gap-2 mb-3",children:[a("div",{className:`w-3 h-3 rounded-full ${E?.color}`}),a("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:E?.name||"No Epic"}),a(z,{variant:"secondary",className:"text-xs",children:b.length})]})," ",a("div",{className:"space-y-3",children:b.map(k=>a(S,{task:k,epic:E,onDragStart:K,onTaskClick:L,isCompact:e.status==="done"},k.id))})]},i)})]},e.id)})})})}),a(G,{isOpen:H,onClose:()=>N(!1),onAddTask:ue,assignees:[...M,...ae],epics:d,sprints:O}),a(Q,{isOpen:P,onClose:()=>U(!1),onAddEpic:fe}),r&&a(J,{isOpen:!!r,onClose:()=>m(null),initialTask:r,epics:d,sprints:O,onUpdateTask:me,onDeleteTask:ge,colleagues:M,onUploadFile:_,onDeleteFile:ee,onFileUpdate:te,onAddComment:Z})]})};export{Ne as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as u,c as g,d as p,g as v,i as b}from"./chunk-YFAZQYK4.mjs";import{a as B}from"./chunk-INCYANPB.mjs";import{a as F}from"./chunk-B4H6T2GP.mjs";import{a as l}from"./chunk-TVZOULLL.mjs";import{a as S}from"./chunk-FT3AE7L2.mjs";import{a as w,f as P,g as L,i as A}from"./chunk-3UMMMQEH.mjs";import{
|
|
1
|
+
import{a as u,c as g,d as p,g as v,i as b}from"./chunk-YFAZQYK4.mjs";import{a as B}from"./chunk-INCYANPB.mjs";import{a as F}from"./chunk-B4H6T2GP.mjs";import{a as l}from"./chunk-TVZOULLL.mjs";import{a as S}from"./chunk-FT3AE7L2.mjs";import{a as w,f as P,g as L,i as A}from"./chunk-3UMMMQEH.mjs";import{b as I}from"./chunk-CSBGSBEU.mjs";import{a as d}from"./chunk-L5JPAKPM.mjs";import{b as m}from"./chunk-ZUA4KNIR.mjs";import{useState as x,useEffect as M}from"react";import{UserIcon as Q,CalendarIcon as $,SaveIcon as j,PlusIcon as q}from"lucide-react";import{jsx as a,jsxs as r}from"react/jsx-runtime";function ie({deal:c,users:f,customer:T,categories:U,onClose:E,onSave:O,onAddComment:V}){let[t,h]=x({...c,value:c.value||0,comments:c.comments||[],customer:c.customer||{}}),[C,D]=x(""),[H,y]=x(!1),[i,s]=x(null);M(()=>{y(JSON.stringify(c)!==JSON.stringify(t))},[c,t]);let R=async()=>{try{let e=await O(t);e.success?(y(!1),s(null)):console.error("Failed to save deal:",e.errors)}catch(e){console.error("Failed to save deal:",e)}},n=(e,o)=>{h(N=>({...N,[e]:o}))},G=e=>{let o=(t.categories||[]).includes(e)?(t.categories||[]).filter(N=>N!==e):[...t.categories||[],e];n("categories",o)},J=async()=>{if(C.trim()){let e={text:C,timestamp:new Date().toISOString()};try{let o=await V(e);if(!o.success){console.error("Failed to add comment:",o.errors);return}}catch(o){console.error("Failed to add comment:",o)}h(o=>({...o,comments:[...o.comments||[],e]})),D("")}},k=e=>{switch(e){case"proposition":return"border-blue-800 text-blue-800";case"source":return"border-green-800 text-green-800";case"sector":return"border-purple-800 text-purple-800";default:return"border-gray-800 text-gray-800"}},W=e=>f?.find(o=>o.id===Number(e));return a(w,{open:!0,children:r(P,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[r(L,{className:"flex flex-row items-center justify-between",children:[a(A,{className:"text-2xl font-bold",children:T?.name||"no customer"}),r("div",{className:"flex space-x-2",children:[a(m,{variant:"outline",onClick:E,children:"Close"}),r(m,{onClick:R,disabled:!H,children:[a(j,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),r(S,{className:"flex-grow pr-4",children:[r("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[a("div",{className:"grid gap-2 m-1",children:i==="value"?a(d,{type:"number",value:t.value,onChange:e=>n("value",Number(e.target.value)),onBlur:()=>s(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):r("div",{className:"text-3xl font-bold text-green-600 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("value"),children:["\xA3",t.value?.toLocaleString()]})}),r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"Assignee"}),i==="assignee"?r(u,{value:t?.assignee?.id?.toString()||"",onValueChange:e=>n("assignee",W(e)),children:[a(p,{children:a(g,{placeholder:"Select assignee"})}),a(v,{children:f&&f.map(e=>a(b,{value:e?.id?.toString()||"",children:e.name},e.id))})]}):r("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("assignee"),children:[a(Q,{className:"w-4 h-4 text-gray-400"}),a("span",{children:t?.assignee?.name})]})]}),r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"Closure Date"}),i==="closureDate"?a(d,{type:"date",value:t.closureDate?.split("T")[0]??"",onChange:e=>n("closureDate",e.target.value),onBlur:()=>s(null),className:"mr-2",autoFocus:!0}):r("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("closureDate"),children:[a($,{className:"w-4 h-4 text-gray-400"}),a("span",{children:t.closureDate?new Date(t.closureDate).toLocaleDateString("en-GB"):"N/A"})]})]})]}),a("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"Description"}),i==="description"?a(F,{value:t.description||"",onChange:e=>n("description",e.target.value),onBlur:()=>s(null),className:"min-h-[100px]",autoFocus:!0}):a("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>s("description"),children:t.description})]})}),r("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"Status"}),i==="status"?r(u,{value:t.status,onValueChange:e=>{n("status",e),s(null)},children:[a(p,{children:a(g,{placeholder:"Select status"})}),a(v,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(e=>a(b,{value:e,children:e},e))})]}):a("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("status"),children:t.status})]}),r("div",{className:"grid col-span-2 gap-2",children:[a(l,{className:"text-sm font-medium text-accent",children:"Categories"}),i==="categories"?a("div",{className:"grid grid-cols-2 gap-2 m-1",children:U.map(e=>r("div",{className:"flex items-center space-x-2",children:[a(B,{id:e.id?.toString()||"",checked:(t.categories||[]).some(o=>o.id===e.id),onCheckedChange:()=>e.id!==void 0&&G(e)}),a("label",{htmlFor:(e.id??"").toString(),className:`text-sm font-medium ${k(e.type||"sector")} px-2 py-1 rounded`,children:e.name})]},e.id))}):a("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("categories"),children:t.categories&&t.categories.map(e=>{let o=e;return o?a(I,{variant:"outline",className:k(o.type||"sector"),children:o.name},o.id):null})})]}),r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"COGE Status"}),i==="gecoStatus"?r(u,{value:t.gecoStatus??void 0,onValueChange:e=>{n("gecoStatus",e),s(null)},children:[a(p,{children:a(g,{placeholder:"Select status"})}),a(v,{children:["firm","forecast","other"].map(e=>a(b,{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))})]}):a("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("gecoStatus"),children:t.gecoStatus?t.gecoStatus.charAt(0).toUpperCase()+t.gecoStatus.slice(1):"N/A"})]})]}),r("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[r("div",{className:"grid gap-2",children:[a(l,{className:"text-sm font-medium text-accent",children:"Comments"}),a(S,{className:"h-[200px] overflow-y-auto",children:a("div",{className:"space-y-2",children:t.comments&&t.comments.slice().sort((e,o)=>new Date(o.timestamp||"").getTime()-new Date(e.timestamp||"").getTime()).map(e=>r("div",{className:"p-3 rounded-lg",children:[a("p",{className:"text-sm text-foreground",children:e.text}),r("p",{className:"text-xs text-foreground mt-1",children:[e?.author?.name," - ",new Date(e.timestamp||"").toLocaleString()]})]},e.id))})}),r("div",{className:"flex mt-2",children:[a(d,{value:C,onChange:e=>D(e.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),r(m,{onClick:J,className:"ml-2",children:[a(q,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),r("div",{className:"text-xs text-gray-500 mt-4",children:["Last modified: ",new Date(t.updatedAt||"").toLocaleString()]})]})]})]})})}export{ie as a};
|