cortex-react-components 2.11.0 → 2.12.0
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-RLKXKF2X.mjs → chunk-52GADV2R.mjs} +1 -1
- package/dist/{chunk-KG3MNGT6.mjs → chunk-5BV4MHV6.mjs} +1 -1
- package/dist/{chunk-ORNGKQM7.mjs → chunk-74JNWOJQ.mjs} +1 -1
- package/dist/{chunk-CLGBBNRB.mjs → chunk-75WE6ZXB.mjs} +1 -1
- package/dist/{chunk-BE5B22X7.mjs → chunk-7YQNB57R.mjs} +1 -1
- package/dist/{chunk-LUM6KEWN.mjs → chunk-AQ6RGBGI.mjs} +1 -1
- package/dist/{chunk-PFDPO3UX.mjs → chunk-BA3I4XZE.mjs} +1 -1
- package/dist/{chunk-CQNQBSED.mjs → chunk-D275F3RT.mjs} +1 -1
- package/dist/{chunk-NAF6ERBI.mjs → chunk-FA7PGHVM.mjs} +1 -1
- package/dist/{chunk-S4A4VHOI.mjs → chunk-FOEPKY7T.mjs} +1 -1
- package/dist/{chunk-IQQ7ZWCP.mjs → chunk-JVG4XS2E.mjs} +1 -1
- package/dist/{chunk-MFCVMJBO.mjs → chunk-JVN7KTZV.mjs} +1 -1
- package/dist/{chunk-NLFT5RPF.mjs → chunk-LJLV5GUS.mjs} +1 -1
- package/dist/{chunk-I2GNNRFH.mjs → chunk-LJOWXPWW.mjs} +1 -1
- package/dist/{chunk-ZEPEWKBV.mjs → chunk-M7ZG6HLI.mjs} +1 -1
- package/dist/chunk-OPLUKFRN.mjs +4 -0
- package/dist/{chunk-ZMB6R6JX.mjs → chunk-Q3EVV5MV.mjs} +1 -1
- package/dist/{chunk-XB3AHDV3.mjs → chunk-Q6VAKKW3.mjs} +1 -1
- package/dist/{chunk-PWYA45TZ.mjs → chunk-QG5P52CK.mjs} +1 -1
- package/dist/{chunk-6DEY5ZDD.mjs → chunk-R7ILTSZR.mjs} +1 -1
- package/dist/{chunk-YOETYY5S.mjs → chunk-RNMPX2AU.mjs} +1 -1
- package/dist/{chunk-AMVJPDM3.mjs → chunk-TKSXXSHY.mjs} +1 -1
- package/dist/{chunk-YQP4GEMN.mjs → chunk-WUOWA2IX.mjs} +1 -1
- package/dist/{chunk-LLED3RQS.mjs → chunk-XFPTR527.mjs} +1 -1
- package/dist/components/AdvancedComponents/AppSidebar.mjs +1 -1
- package/dist/components/AdvancedComponents/index.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/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/NewDealForm.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/index.mjs +1 -1
- package/dist/components/Chat/CopilotInterface.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/DigitalColleageusLayout.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.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.d.ts +2 -1
- package/dist/components/DigitalColleagues/Views/TeamsIndexView.js +1 -1
- package/dist/components/DigitalColleagues/Views/TeamsIndexView.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/index.js +1 -1
- package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
- package/dist/components/DigitalColleagues/index.js +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/HeaderFooter/Header.mjs +1 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/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/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/Other/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/AddEpicModal.mjs +1 -1
- package/dist/components/Projects/AddSprintModal.mjs +1 -1
- package/dist/components/Projects/AddTaskModal.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/TasksView.mjs +1 -1
- package/dist/components/dc-temp/dashboard-integration-example.js +1 -1
- package/dist/components/dc-temp/dashboard-integration-example.mjs +1 -1
- package/dist/components/dc-temp/index.js +1 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/index.js +10 -10
- package/dist/components/index.mjs +1 -1
- package/dist/components/ui/index.mjs +1 -1
- package/dist/index.js +18 -18
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +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/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/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-3R75NUYA.mjs +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a}from"./chunk-
|
|
4
|
+
import{a}from"./chunk-7YQNB57R.mjs";import{a as f}from"./chunk-Q67RF7VO.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 e,jsxs as v}from"react/jsx-runtime";var b=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:e(P,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function E({sidebarItems:r,children:h,title:U="Digital Colleagues",notifications:C=[],currentBusinessUnit:N=b[0],onBusinessUnitChange:B,onSearch:c,businessUnits:D=b,activeTab:x,onTabChange:T,showTabs:y=!1,onActionClick:A,actionIcon:R,actionText:S="Action",onNotificationRemove:k,onRemoveAll:w,logo:n="/headerlogo.png",appName:o="Nuvia",tagline:s="Collaboration Platform",sidebarInitiallyClosed:M=!1}){let[i,O]=l(!M),[d,t]=l(!1),[u,I]=l(N),m=p=>{I(p),B?.(p)};return v("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[d&&e("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>t(!1)}),e("div",{className:"md:hidden",children:e(a,{items:r,isOpen:d,isMobile:!0,onClose:()=>t(!1),currentBusinessUnit:u,onBusinessUnitChange:m,onSearch:c,logo:n,appName:o,tagline:s})}),e("div",{className:"hidden md:block",children:e(a,{items:r,isOpen:i,isMobile:!1,currentBusinessUnit:u,onBusinessUnitChange:m,onSearch:c,logo:n,appName:o,tagline:s})}),v("div",{className:g("min-h-screen fixed w-full transition-all duration-300 ease-in-out",i?"md:pl-64":"md:pl-0"),children:[e(f,{title:U,notifications:C,onToggleSidebar:()=>O(!i),onToggleMobileMenu:()=>t(!0),sidebarOpen:i,activeTab:x,onTabChange:T,showTabs:y,onActionClick:A,actionIcon:R,actionText:S,onNotificationRemove:k,onRemoveAll:w,logo:n,appName:o,tagline:s}),e("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-auto",children:h})]})]})}export{E as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as r}from"./chunk-Z22NSJMF.mjs";import{a as l}from"./chunk-ZXPDSSCF.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 c,c as d,d as p,g as m,i as g}from"./chunk-YFAZQYK4.mjs";import{a as f}from"./chunk-B4H6T2GP.mjs";import{a as i}from"./chunk-TVZOULLL.mjs";import{a as v,f as b,g as D,h,i as S}from"./chunk-3UMMMQEH.mjs";import{
|
|
1
|
+
import{a as c,c as d,d as p,g as m,i as g}from"./chunk-YFAZQYK4.mjs";import{a as f}from"./chunk-B4H6T2GP.mjs";import{a as i}from"./chunk-TVZOULLL.mjs";import{a as o}from"./chunk-L5JPAKPM.mjs";import{a as v,f as b,g as D,h,i as S}from"./chunk-3UMMMQEH.mjs";import{b as s}from"./chunk-ZUA4KNIR.mjs";import{useState as O}from"react";import{jsx as a,jsxs as l}from"react/jsx-runtime";var R=({isOpen:y,onClose:r,onAddEpic:C})=>{let[t,u]=O({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),N=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],w=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],E=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],T=e=>{e.preventDefault(),t.name.trim()&&(C({name:t.name.trim(),description:t.description.trim(),color:t.color,confidence:t.confidence,phase:t.phase,startDate:new Date(t.startDate),endDate:new Date(t.endDate),progress:t.progress,isSelected:!0}),u({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),r())},n=(e,I)=>{u(L=>({...L,[e]:I}))};return a(v,{open:y,onOpenChange:r,children:l(b,{className:"sm:max-w-md",children:[a(D,{children:a(S,{children:"Add New Epic"})}),l("form",{onSubmit:T,className:"space-y-4",children:[l("div",{className:"space-y-2",children:[a(i,{htmlFor:"name",children:"Epic Name"}),a(o,{id:"name",value:t.name,onChange:e=>n("name",e.target.value),placeholder:"Enter epic name",required:!0})]}),l("div",{className:"space-y-2",children:[a(i,{htmlFor:"description",children:"Description"}),a(f,{id:"description",value:t.description,onChange:e=>n("description",e.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),l("div",{className:"space-y-2",children:[a(i,{children:"Color"}),a("div",{className:"flex gap-2 flex-wrap",children:N.map(e=>a("button",{type:"button",onClick:()=>n("color",e),className:`w-8 h-8 rounded-full ${e} ${t.color===e?"ring-2 ring-gray-400":""}`},e))})]}),l("div",{className:"grid grid-cols-2 gap-4",children:[l("div",{className:"space-y-2",children:[a(i,{children:"Confidence"}),l(c,{value:t.confidence,onValueChange:e=>n("confidence",e),children:[a(p,{children:a(d,{})}),a(m,{children:w.map(e=>a(g,{value:e.value,children:e.label},e.value))})]})]}),l("div",{className:"space-y-2",children:[a(i,{children:"Phase"}),l(c,{value:t.phase.toString(),onValueChange:e=>n("phase",parseInt(e)),children:[a(p,{children:a(d,{})}),a(m,{children:E.map(e=>a(g,{value:e.value.toString(),children:e.label},e.value))})]})]})]}),l("div",{className:"grid grid-cols-2 gap-4",children:[l("div",{className:"space-y-2",children:[a(i,{children:"Start Date"}),a(o,{type:"date",value:t.startDate,onChange:e=>n("startDate",e.target.value)})]}),l("div",{className:"space-y-2",children:[a(i,{children:"End Date"}),a(o,{type:"date",value:t.endDate,onChange:e=>n("endDate",e.target.value)})]})]}),l("div",{className:"space-y-2",children:[a(i,{children:"Progress (%)"}),a(o,{type:"number",min:"0",max:"100",value:t.progress,onChange:e=>n("progress",parseInt(e.target.value)||0)})]}),l(h,{children:[a(s,{type:"button",variant:"outline",onClick:r,children:"Cancel"}),a(s,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};export{R as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as m}from"./chunk-PDY7JYY3.mjs";import{a as i}from"./chunk-WUA65ZZB.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{c as L}from"./chunk-PA4ZBJDO.mjs";import{a as I}from"./chunk-INCYANPB.mjs";import{a as f}from"./chunk-FT3AE7L2.mjs";import{a as D,f as B,g as F,i as U}from"./chunk-3UMMMQEH.mjs";import{
|
|
4
|
+
import{c as L}from"./chunk-PA4ZBJDO.mjs";import{a as I}from"./chunk-INCYANPB.mjs";import{a as f}from"./chunk-FT3AE7L2.mjs";import{a as C}from"./chunk-L5JPAKPM.mjs";import{a as D,f as B,g as F,i as U}from"./chunk-3UMMMQEH.mjs";import{b as k}from"./chunk-ZUA4KNIR.mjs";import{b as m}from"./chunk-CSBGSBEU.mjs";import{a as o}from"./chunk-MDJREBVI.mjs";import{a as A}from"./chunk-FLHDNCNY.mjs";import*as u from"react";import R from"next/link";import{ChevronDown as J,Search as Y,Settings as Z,X as _}from"lucide-react";import{Fragment as $,jsx as t,jsxs as n}from"react/jsx-runtime";function he({items:v,isOpen:x,isMobile:l=!1,onClose:g,currentBusinessUnit:ee=L[0],onBusinessUnitChange:E,onSearch:H,className:h,logo:P="/headerlogo.png",appName:j="Nuvia",tagline:T="Collaboration Platform"}){let[b,z]=u.useState({}),[d,K]=A("sidebar-favorites",{}),[N,y]=u.useState(null),[p,Q]=u.useState(""),q=e=>{z(a=>({...a,[e]:!a[e]}))},te=e=>{E?.(e)},M=()=>{p.trim()&&H?.(p.trim())},O=e=>{e.key==="Enter"&&(e.preventDefault(),M())},V=(e,a)=>{let s=d[e]||[],r=s.includes(a)?s.filter(i=>i!==a):s.concat(a);K({...d,[e]:r})},c=e=>{if(!e.items||!e.maxItems||e.items.length<=e.maxItems)return e.items||[];let a=d[e.id]||[],s=e.items.filter(i=>a.includes(i.id)),r=e.items.filter(i=>!a.includes(i.id));return[...s,...r].slice(0,e.maxItems)},S=e=>e.maxItems&&e.items&&e.items.length>e.maxItems,W=v,X=e=>{let a=S(e),s=c(e),r=n($,{children:[n("div",{className:"flex items-center gap-3",children:[e.icon,t("span",{children:e.title})]}),e.badge&&t(m,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:e.badge}),e.items&&t(J,{className:o("ml-2 h-4 w-4 transition-transform",b[e.title]?"rotate-180":"")})]}),i=o("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",e.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return e.url?t(R,{href:e.url,className:i,onClick:l?g:void 0,children:r}):t("button",{className:i,onClick:()=>e.items&&q(e.title),children:r})},G=()=>{let e=v.find(s=>s.id===N);if(!e||!e.items||!e.maxItems)return null;let a=d[e.id]||[];return t(D,{open:!!N,onOpenChange:s=>!s&&y(null),children:n(B,{className:"sm:max-w-md",children:[n(F,{children:[n(U,{children:["Manage ",e.title," Favorites"]}),n("p",{className:"text-sm text-muted-foreground",children:["Select up to ",e.maxItems," items to show in ",e.title.toLowerCase(),"."]})]}),t(f,{className:"max-h-96 pr-4",children:t("div",{className:"space-y-4",children:e.items.map(s=>n("div",{className:"flex items-center space-x-2",children:[t(I,{id:s.id,checked:a.includes(s.id),onCheckedChange:()=>V(e.id,s.id),disabled:!a.includes(s.id)&&a.length>=(e.maxItems||0)}),n("label",{htmlFor:s.id,className:"flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[s.title,s.badge&&t(m,{variant:"outline",className:"text-xs",children:s.badge})]})]},s.id))})})]})})},w=n("div",{className:"flex h-full flex-col bg-background",children:[n("div",{className:"flex items-center justify-between p-4",children:[n("div",{className:"flex items-center gap-3",children:[t("div",{className:"flex h-14 w-14 items-center justify-center",children:t("img",{src:P,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),n("div",{children:[t("h2",{className:"font-semibold",children:j}),t("p",{className:"text-xs text-muted-foreground",children:T})]})]}),l&&t(k,{variant:"ghost",size:"icon",onClick:g,children:t(_,{className:"h-5 w-5"})})]}),t("div",{className:"px-3 py-2",children:n("div",{className:"relative",children:[t(Y,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),t(C,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:p,onChange:e=>Q(e.target.value),onKeyPress:O})]})}),t(f,{className:"flex-1 px-3 py-2",children:t("div",{className:"space-y-1",children:W.map(e=>n("div",{className:"mb-1",children:[X(e),e.items&&b[e.title]&&n("div",{className:"mt-1 ml-6 space-y-1 border-l pl-3",children:[c(e).map(a=>n(R,{href:a.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:l?g:void 0,children:[a.title,a.badge&&t(m,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:a.badge})]},a.id)),S(e)&&e.items&&e.items.length>c(e).length&&n("button",{onClick:()=>y(e.id),className:"w-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",e.items.length-c(e).length," more available"]})]})]},e.id))})}),t("div",{className:"p-3",children:t("div",{className:"space-y-1",children:n("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[t(Z,{className:"h-5 w-5"}),t("span",{children:"Settings"})]})})}),t(G,{})]});return l?t("div",{className:o("fixed inset-y-0 left-0 z-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",x?"translate-x-0":"-translate-x-full",h),children:w}):t("div",{className:o("fixed inset-y-0 left-0 z-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",x?"translate-x-0":"-translate-x-full",h),children:w})}export{he as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as E}from"./chunk-
|
|
1
|
+
import{a as E}from"./chunk-R7ILTSZR.mjs";import{a as I}from"./chunk-Z22NSJMF.mjs";import{b as v}from"./chunk-ZUA4KNIR.mjs";import{b as m}from"./chunk-CSBGSBEU.mjs";import{a as o}from"./chunk-YO3GQYRJ.mjs";import{useEffect as X,useState as n}from"react";import{Calendar as Y,Plus as Z}from"lucide-react";import{jsx as t,jsxs as s}from"react/jsx-runtime";var ce=({tasks:i,epics:A,sprints:l,onUpdateTask:B,onTaskClick:P,onAddSprint:O})=>{let[d,j]=n(["2"]),[g,f]=n(null),[R,c]=n(!1),[b,p]=n(null),[u,$]=n(i.filter(e=>!e.sprintId)),[V,M]=n(i.filter(e=>e.sprintId&&d.includes(e.sprintId))),[h,U]=n(l.filter(e=>e.id!=="backlog"&&e.id!=="all-tasks").sort((e,a)=>e.startDate.getTime()-a.startDate.getTime()));X(()=>{$(i.filter(e=>!e.sprintId)),M(i.filter(e=>e.sprintId&&d.includes(e.sprintId))),U(l.filter(e=>e.id!=="backlog"&&e.id!=="all-tasks").sort((e,a)=>e.startDate.getTime()-a.startDate.getTime()))},[i,l,d]);let z=e=>A.find(a=>a.id===e),F=e=>l.find(a=>a.id===e),L=e=>{switch(e){case"high":return"bg-destructive/20 text-destructive";case"medium":return"bg-warning/20 text-warning";case"low":return"bg-success/20 text-success";default:return"bg-muted text-muted-foreground"}},H=e=>e.split(" ").map(a=>a[0]).join("").toUpperCase(),q=e=>{f(e)},x=e=>{e.preventDefault()},N=e=>{p(e)},y=()=>{p(null)},k=(e,a)=>{e.preventDefault(),p(null),g&&(B(g.id,{sprintId:a==="backlog"?void 0:a}),f(null))},G=e=>{e==="backlog"||e==="all-tasks"||j(a=>a.includes(e)?a.filter(r=>r!==e):[...a,e])},J=e=>{O(e),c(!1)},D=({task:e,showSprint:a=!1})=>{let r=z(e.epicId),S=e.sprintId?F(e.sprintId):null,[T,w]=n(!1),K=C=>{C.defaultPrevented||T||P(e)},Q=C=>{w(!0),q(e)},W=()=>{w(!1)};return t(o,{className:`p-3 cursor-grab transition-all duration-200 hover:shadow-md bg-card border-border hover:border-border/80 active:cursor-grabbing ${T?"opacity-50 shadow-lg scale-105":""} ${g?.id===e.id?"ring-2 ring-primary":""}`,draggable:!0,onDragStart:Q,onDragEnd:W,onClick:K,children:s("div",{className:"space-y-2",children:[s("div",{className:"flex items-start justify-between",children:[t("h4",{className:"font-medium text-sm text-foreground line-clamp-1 select-none pointer-events-none",children:e.title}),t(m,{className:`text-xs select-none pointer-events-none ${L(e.priority)}`,children:e.priority[0].toUpperCase()})]}),s("div",{className:"flex items-center justify-between text-xs pointer-events-none",children:[s("div",{className:"flex items-center gap-1",children:[r&&t("div",{className:`w-2 h-2 rounded-full ${r.color}`}),t("span",{className:"text-muted-foreground truncate select-none",children:r?.name})]}),t("span",{className:"text-muted-foreground select-none",children:H(e.assignee)})]}),a&&S&&s("div",{className:"flex items-center gap-1 text-xs text-muted-foreground pointer-events-none",children:[t(Y,{className:"h-3 w-3"}),t("span",{className:"select-none",children:S.name})]})]})})};return s("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[t(I,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-to-r from-orange-600 via-amber-600 to-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>c(!0)}}),t("div",{className:"flex-1",children:s("div",{className:"w-full",children:[s("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:[t("div",{className:"lg:col-span-1",children:s(o,{className:"p-4 h-full bg-card shadow-sm",onDragOver:x,onDragEnter:()=>N("backlog"),onDragLeave:y,onDrop:e=>k(e,"backlog"),children:[s("div",{className:"flex items-center justify-between mb-4",children:[t("h3",{className:"font-semibold text-foreground select-none",children:"Backlog"}),t(m,{variant:"secondary",className:"bg-muted text-muted-foreground",children:u.length})]}),s("div",{className:`space-y-3 overflow-y-auto max-h-[600px] min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${b==="backlog"?"border-primary bg-primary/10":"border-border"}`,children:[u.map(e=>t(D,{task:e},e.id)),u.length===0&&t("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here to move to backlog"})]})]})}),t("div",{className:"lg:col-span-3",children:s("div",{className:"space-y-4",children:[s(o,{className:"p-4 bg-card shadow-sm",children:[s("div",{className:"flex items-center justify-between mb-3",children:[t("h3",{className:"font-semibold text-foreground select-none",children:"Select Sprints to View"}),s(v,{onClick:()=>c(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-2",size:"sm",children:[t(Z,{className:"h-4 w-4"}),"Add Sprint"]})]}),t("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-2",children:h.map(e=>s(v,{variant:d.includes(e.id)?"default":"outline",size:"sm",onClick:()=>G(e.id),className:"text-xs h-8",children:[e.name,e.isActive&&t("span",{className:"ml-1 text-success",children:"\u25CF"})]},e.id))})]}),t("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:d.map(e=>h.find(a=>a.id===e)).filter(Boolean).sort((e,a)=>e.startDate.getTime()-a.startDate.getTime()).map(e=>{let a=V.filter(r=>r.sprintId===e.id);return s(o,{className:"p-4 bg-card shadow-sm",onDragOver:x,onDragEnter:()=>N(e.id),onDragLeave:y,onDrop:r=>k(r,e.id),children:[s("div",{className:"flex items-center justify-between mb-4",children:[s("div",{children:[t("h3",{className:"font-semibold text-foreground select-none",children:e.name}),e.isActive&&t("span",{className:"text-xs text-success font-medium select-none",children:"Active Sprint"})]}),t(m,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a.length})]}),s("div",{className:`space-y-3 overflow-y-auto max-h-[500px] min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${b===e.id?"border-primary bg-primary/10":"border-border"}`,children:[a.map(r=>t(D,{task:r},r.id)),a.length===0&&t("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})]},e.id)})})," "]})})]}),t(E,{isOpen:R,onClose:()=>c(!1),onAddSprint:J})]})})]})};export{ce as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as S,b as T}from"./chunk-E4TE4NV6.mjs";import{a as p,c as d,d as m,g,i as r}from"./chunk-YFAZQYK4.mjs";import{a as N}from"./chunk-B4H6T2GP.mjs";import{a as o}from"./chunk-TVZOULLL.mjs";import{a as h,f as k,g as f,h as I,i as C}from"./chunk-3UMMMQEH.mjs";import{
|
|
1
|
+
import{a as S,b as T}from"./chunk-E4TE4NV6.mjs";import{a as p,c as d,d as m,g,i as r}from"./chunk-YFAZQYK4.mjs";import{a as N}from"./chunk-B4H6T2GP.mjs";import{a as o}from"./chunk-TVZOULLL.mjs";import{a as y}from"./chunk-L5JPAKPM.mjs";import{a as h,f as k,g as f,h as I,i as C}from"./chunk-3UMMMQEH.mjs";import{b}from"./chunk-ZUA4KNIR.mjs";import{useState as G,useEffect as x}from"react";import{BookOpen as V,Bug as E,Zap as M,AlertCircle as P}from"lucide-react";import{jsx as t,jsxs as a}from"react/jsx-runtime";var H=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:V},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:P},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:E},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:M}],R=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],X=({isOpen:n,onClose:u,onAddTask:D,epics:A,sprints:F,assignees:L,defaultEpicId:l})=>{let[i,c]=G({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""});x(()=>{n&&l&&c(e=>({...e,epicId:l}))},[n,l]),x(()=>{n&&c({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:l||"",sprintId:"none",assignee:""})},[n]);let w=e=>{e.preventDefault(),i.title.trim()&&(D({title:i.title.trim(),description:i.description.trim(),status:"todo",priority:i.priority,type:i.type,points:i.points,epicId:i.epicId,sprintId:i.sprintId==="none"?void 0:i.sprintId,assignee:i.assignee.trim()||"Unassigned"}),c({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:l||"",sprintId:"none",assignee:""}),u())},s=(e,v)=>{c(B=>({...B,[e]:v}))};return t(h,{open:n,onOpenChange:u,children:a(k,{className:"sm:max-w-md",children:[t(f,{children:t(C,{children:"Add New Task"})}),a("form",{onSubmit:w,className:"space-y-4",children:[a("div",{className:"space-y-2",children:[t(o,{htmlFor:"title",children:"Task Title"}),t(y,{id:"title",value:i.title,onChange:e=>s("title",e.target.value),placeholder:"Enter task title",required:!0})]}),a("div",{className:"space-y-2",children:[t(o,{htmlFor:"description",children:"Description"}),t(N,{id:"description",value:i.description,onChange:e=>s("description",e.target.value),placeholder:"Enter task description",rows:3})]}),a("div",{className:"space-y-2",children:[t(o,{children:"Type"}),t(S,{type:"single",value:i.type,onValueChange:e=>e&&s("type",e),children:H.map(e=>{let v=e.icon;return a(T,{value:e.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[t(v,{className:"h-4 w-4"}),e.label]},e.value)})})]}),a("div",{className:"space-y-2",children:[t(o,{children:"Priority"}),t(S,{type:"single",value:i.priority,onValueChange:e=>e&&s("priority",e),children:R.map(e=>t(T,{value:e.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:e.label},e.value))})]}),a("div",{className:"space-y-2",children:[t(o,{htmlFor:"points",children:"Story Points"}),t(y,{id:"points",type:"number",min:"1",max:"100",value:i.points,onChange:e=>s("points",parseInt(e.target.value)||1),placeholder:"Enter story points",required:!0})]}),!l&&a("div",{className:"space-y-2",children:[t(o,{htmlFor:"epic",children:"Epic"}),a(p,{value:i.epicId,onValueChange:e=>s("epicId",e),children:[t(m,{children:t(d,{placeholder:"Select an epic"})}),t(g,{children:A.map(e=>t(r,{value:e.id,children:a("div",{className:"flex items-center gap-2",children:[t("div",{className:`w-3 h-3 rounded-full ${e.color}`}),e.name]})},e.id))})]})]}),a("div",{className:"space-y-2",children:[t(o,{htmlFor:"sprint",children:"Sprint (Optional)"}),a(p,{value:i.sprintId,onValueChange:e=>s("sprintId",e),children:[t(m,{children:t(d,{placeholder:"Select a sprint"})}),a(g,{children:[t(r,{value:"none",children:"No Sprint"}),F.map(e=>t(r,{value:e.id,children:a("div",{className:"flex items-center gap-2",children:[e.name,e.isActive&&t("span",{className:"text-xs bg-green-100 text-green-800 px-1 rounded",children:"Active"})]})},e.id))]})]})]}),a("div",{className:"space-y-2",children:[t(o,{htmlFor:"sprint",children:"Assignee"}),a(p,{value:i.assignee,onValueChange:e=>s("assignee",e),children:[t(m,{children:t(d,{placeholder:"Select an Assignee"})}),a(g,{children:[t(r,{value:"none",children:"No Assignee"}),L.map(e=>t(r,{value:e.id,children:t("div",{className:"flex items-center gap-2",children:e.name})},e.id))]})]})]}),a(I,{children:[t(b,{type:"button",variant:"outline",onClick:u,children:"Cancel"}),t(b,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};export{X 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-52GADV2R.mjs";import{a as I}from"./chunk-56X4PU43.mjs";import{a as S}from"./chunk-O46BOA4T.mjs";import{useChat as me}from"@ai-sdk/react";import{useState as r}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:D=!0,messages:T=[],businessUnits:B=[],capabilities:R=[],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=D?F||Y:null,[Z,u]=r(""),[_,C]=r(!1),j=i?.messages||T,l=Z,ee=i?.status==="submitted"||_,se=i?.addToolResult?(e,t,s)=>{i.addToolResult({tool:t,toolCallId:e,output:s}),i.sendMessage()}:()=>{},o=B||[],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]=r(()=>o.length===0?te:o.find(e=>e.id===z)||o[0]),[a,c]=r([]),[oe,ae]=r(!1),re=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])},le=e=>{c(t=>t.filter(s=>s.id!==e))},v=()=>{if(!(!l.trim()&&a.length===0)){if(i){let e=a.length>0?ce(a.map(t=>t.file)):void 0;i.sendMessage({text:l,files:e},{body:{timestamp:Date.now()}}),u("")}else console.log("Message to send:",l),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:l,isTyping:ee,currentSessionTitle:m?.title,capabilities:R||[],onInputChange:pe,addToolResult:se,onSendMessage:v,onKeyPress:de,fileUploads:a,isDragOver:oe,enableFileUpload:f,onFileUpload:re,onRemoveFile:le,onDragOver:ae})})]})},"chat-interface")})})}export{Le as a};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
"use client"
|
|
4
4
|
|
|
5
|
-
import{a as O}from"./chunk-
|
|
5
|
+
import{a as O}from"./chunk-Q6VAKKW3.mjs";import{a as D}from"./chunk-5BV4MHV6.mjs";import{a as v,b as U,d as B}from"./chunk-JB7IQQ3N.mjs";import{a as S}from"./chunk-2RGAV55J.mjs";import{a as T}from"./chunk-5RTGHMF3.mjs";import{a as I}from"./chunk-GHZ6CUY3.mjs";import{a as i}from"./chunk-Z22NSJMF.mjs";import{a as F}from"./chunk-52GADV2R.mjs";import{a as P,b as j}from"./chunk-PA4ZBJDO.mjs";import{b as u}from"./chunk-ZUA4KNIR.mjs";import{b as N}from"./chunk-CSBGSBEU.mjs";import{a as C,b as x,c as y,d as w,e as A,f as k}from"./chunk-YO3GQYRJ.mjs";import{useState as H}from"react";import{motion as oe,AnimatePresence as te}from"motion/react";import{Bot as ae}from"lucide-react";import{motion as Z}from"motion/react";import{Star as ee}from"lucide-react";import{jsx as s,jsxs as l}from"react/jsx-runtime";function f({app:a,onOpen:r,onFavorite:n,showProgress:c=!1,className:d}){return s(Z.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:d,children:l(C,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[s(x,{className:"pb-2",children:l("div",{className:"flex items-center justify-between",children:[s("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-muted",children:a.icon}),a.new?s(N,{className:"rounded-xl bg-amber-500",children:"New"}):s(u,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-2xl",onClick:()=>n?.(a),children:s(ee,{className:"h-4 w-4"})})]})}),l(A,{className:"pb-2",children:[s(y,{className:"text-lg",children:a.name}),s(w,{children:a.description}),c&&a.progress<100&&l("div",{className:"mt-2",children:[l("div",{className:"flex items-center justify-between text-sm",children:[s("span",{children:"Installation"}),l("span",{children:[a.progress,"%"]})]}),s(T,{value:a.progress,className:"h-2 mt-1 rounded-xl"})]})]}),s(k,{children:s(u,{variant:"secondary",className:"w-full rounded-2xl",onClick:()=>r?.(a),children:a.progress<100?"Continue Install":"Open"})})]})})}import{jsx as e,jsxs as t}from"react/jsx-runtime";function se({title:a="Digital Colleagues",businessUnits:r,projects:n,fileCount:c,teamMemberCount:d,onCreateProject:R,onOpenProject:L,sidebarItems:ie,initialColleagues:E,users:M,onColleagueAdd:V,onColleagueEdit:z,onColleagueDelete:G}){let[m,p]=H("home"),[g,Y]=H(r[0]),b=o=>{console.log("Opening app:",o.name)},h=o=>{console.log("Favoriting app:",o.name)},K=o=>{console.log("Opening file:",o.name)},le=o=>{console.log("Sharing file:",o.name)},W=o=>{console.log("Opening project:",o.name),L(o)},_=o=>{console.log("Sharing project:",o.name)},$=o=>{Y(o),console.log("Business unit changed to:",o.name)},q=()=>{console.log("Copilot clicked - navigating to chat"),p("chat")},J=o=>{console.log("Notification removed:",o)},Q=()=>{console.log("All notifications removed")},X=()=>{switch(m){case"home":return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[t("section",{className:"text-center py-12",children:[t("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",g.name," team"]}),e("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),t("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[t("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),e("p",{className:"text-3xl font-bold text-primary",children:n.length}),e("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),t("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),e("p",{className:"text-3xl font-bold text-primary",children:d}),e("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),t("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),e("p",{className:"text-3xl font-bold text-primary",children:c}),e("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),e(i,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Go",onClick:()=>p("chat")}})]});case"colleagues":return e(O,{initialColleagues:E,availableUsers:M,onColleagueAdd:V,onColleagueEdit:z,onColleagueDelete:G});case"chat":return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[t("section",{className:"text-center py-12",children:[e("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),t("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",g.name," team members and collaborate in real-time."]})]}),e(i,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return t("div",{className:"space-y-8",children:[e(i,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),t("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"New Releases"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:v.filter(o=>o.new).map(o=>e(f,{app:o,showProgress:!0,onOpen:b,onFavorite:h},o.name))})]}),t("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"All Apps"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:v.map(o=>e(f,{app:o,onOpen:b,onFavorite:h},o.name))})]})]});case"knowledge":return e(D,{});case"files":return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(i,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),t("section",{className:"space-y-4",children:[e("div",{className:"flex items-center justify-between",children:e("h2",{className:"text-2xl font-semibold",children:"All Files"})}),e(I,{files:U,onFileClick:K})]})]});case"projects":return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(i,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:R}}),t("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:n.map(o=>e(S,{project:o,onOpen:W,onShare:_},o.name))})]})]});case"learn":return t("div",{className:"space-y-8",children:[e(i,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Upgrade to Pro",onClick:()=>console.log("Upgrade to pro clicked")}}),t("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),e("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:B.slice(0,3).map(o=>t("div",{className:"rounded-3xl border p-6",children:[e("h3",{className:"font-semibold mb-2",children:o.title}),e("p",{className:"text-sm text-muted-foreground mb-4",children:o.description}),t("div",{className:"flex items-center justify-between text-sm",children:[e("span",{children:o.duration}),e("span",{children:o.level})]})]},o.title))})]})]});default:return null}};return e(F,{sidebarItems:P,title:a,notifications:j,businessUnits:r,currentBusinessUnit:g,onBusinessUnitChange:$,activeTab:m,onTabChange:p,showTabs:!0,onActionClick:q,actionIcon:e(ae,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:J,onRemoveAll:Q,children:e(te,{mode:"wait",children:e(oe.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:X()},m)})})}export{se as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as S}from"./chunk-RAGDUV7M.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 p}from"./chunk-
|
|
4
|
+
import{a as S}from"./chunk-RAGDUV7M.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 p}from"./chunk-75WE6ZXB.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 +1 @@
|
|
|
1
|
-
import{a as A}from"./chunk-RR4QSUV2.mjs";import{a as g,c as v,d as f,g as C,i as h}from"./chunk-YFAZQYK4.mjs";import{a as F}from"./chunk-INCYANPB.mjs";import{a as k}from"./chunk-B4H6T2GP.mjs";import{a as l}from"./chunk-TVZOULLL.mjs";import{a as N}from"./chunk-FT3AE7L2.mjs";import{a as S,f as y,g as x,i as w}from"./chunk-3UMMMQEH.mjs";import{
|
|
1
|
+
import{a as A}from"./chunk-RR4QSUV2.mjs";import{a as g,c as v,d as f,g as C,i as h}from"./chunk-YFAZQYK4.mjs";import{a as F}from"./chunk-INCYANPB.mjs";import{a as k}from"./chunk-B4H6T2GP.mjs";import{a as l}from"./chunk-TVZOULLL.mjs";import{a as N}from"./chunk-FT3AE7L2.mjs";import{a as u}from"./chunk-L5JPAKPM.mjs";import{a as S,f as y,g as x,i as w}from"./chunk-3UMMMQEH.mjs";import{b as p}from"./chunk-ZUA4KNIR.mjs";import{useState as D,useEffect as M}from"react";import{PlusIcon as z}from"lucide-react";import{Fragment as j,jsx as t,jsxs as r}from"react/jsx-runtime";function se({customers:b,users:d,categories:I,onSubmit:E,initialDeal:n,onAddCustomer:P,onClose:L}){let[a,o]=D(n||{customer:void 0,value:0,assignee:void 0,status:"Cold",categories:[],dateLogged:new Date().toISOString().split("T")[0],closureDate:"",comments:[],description:""}),[T,m]=D(!1),[i,c]=D({});M(()=>{n&&o(n)},[n]);let U=()=>{let e={};return a.customer||(e.customer="Customer is required"),a.value||(e.value="Value is required"),a.assignee||(e.assignee="Assignee is required"),a.closureDate||(e.closureDate="Closure Date is required"),c(e),Object.keys(e).length===0},B=async e=>{e.preventDefault(),c({});try{if(U()){let s=await E({...a});s.success?(o({customer:void 0,value:0,assignee:void 0,description:"",status:"Cold",closureDate:""}),L?.()):c(s.errors||{})}}catch{c({submit:"An error occurred while submitting the form."})}},O=e=>{o(s=>({...s,categories:(s.categories||[]).includes(e.id)?(s.categories||[]).filter(H=>H!==e.id):[...s.categories||[],e.id]}))},V=async e=>{o({...a,customer:e});try{let s=await P(e);s.success?m(!1):c(s.errors||{})}catch{c({submit:"An error occurred while submitting the form."})}},q=e=>d?.find(s=>s.id===Number(e)),R=e=>b?.find(s=>s.id===Number(e));return r(j,{children:[r("form",{onSubmit:B,className:"space-y-6",children:[t(N,{className:"h-[60vh] pr-4",children:r("div",{className:"space-y-6 px-4",children:[r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"customer",children:"Customer"}),r("div",{className:"flex items-center space-x-2",children:[r(g,{value:a.customer?.id?.toString(),onValueChange:e=>o({...a,customer:R(e)}),children:[t(f,{children:t(v,{placeholder:"Select customer"})}),t(C,{children:b.map(e=>t(h,{value:e.id?.toString()||"",children:e.name},e.id))})]}),t(p,{variant:"outline",size:"icon",onClick:()=>m(!0),children:t(z,{className:"w-5 h-5"})})]}),i.customerId&&t("p",{className:"text-red-500 text-sm",children:i.customerId})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"value",children:"Value"}),t(u,{id:"value",type:"number",value:a.value||"",onChange:e=>o({...a,value:Number.parseFloat(e.target.value)}),placeholder:"Enter deal value"}),i.value&&t("p",{className:"text-red-500 text-sm",children:i.value})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"assignee",children:"Assignee"}),r(g,{value:a.assignee?.id?.toString(),onValueChange:e=>o({...a,assignee:q(e)}),children:[t(f,{children:t(v,{placeholder:"Select assignee"})}),t(C,{children:d&&d.map(e=>t(h,{value:e.id?.toString()||"",children:e.name},e.id))})]}),i.assignee&&t("p",{className:"text-red-500 text-sm",children:i.assignee})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"description",children:"Description"}),t(k,{id:"description",value:a.description||"",onChange:e=>o({...a,description:e.target.value}),placeholder:"Enter deal description"})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{children:"Categories"}),t("div",{className:"space-y-4",children:["proposition","source","sector"].map(e=>r("div",{className:"space-y-2",children:[t("h4",{className:"text-sm font-medium",children:e.charAt(0).toUpperCase()+e.slice(1)}),t("div",{className:"grid grid-cols-2 gap-2",children:I.filter(s=>s.type===e).map(s=>r("div",{className:"flex items-center space-x-2",children:[t(F,{id:s.id.toString(),checked:a.categories?.includes(s.id),onCheckedChange:()=>O(s)}),t("label",{htmlFor:s.id.toString(),className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:s.name})]},s.id))})]},e))})]}),r("div",{className:"space-y-2 space-x-2",children:[t(l,{htmlFor:"closureDate",children:"Closure Date"}),t(u,{id:"closureDate",type:"date",value:a.closureDate||"",onChange:e=>o({...a,closureDate:e.target.value})}),i.closureDate&&t("p",{className:"text-red-500 text-sm",children:i.closureDate})]})]})}),t(p,{type:"submit",className:"w-full",children:n?"Update Deal":"Add Deal"})]}),t(S,{open:T,onOpenChange:m,children:r(y,{children:[t(x,{children:t(w,{children:"Add New Customer"})}),t(A,{onSubmit:V})]})})]})}export{se as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as i}from"./chunk-V6GC3UGV.mjs";import{a as m}from"./chunk-
|
|
4
|
+
import{a as i}from"./chunk-V6GC3UGV.mjs";import{a as m}from"./chunk-XFPTR527.mjs";import{useState as f,useCallback as R}from"react";import{DragDropContext as P}from"@atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration";import{jsx as r,jsxs as M}from"react/jsx-runtime";var w=["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost","Dormant"];function h({initialData:s,addNewDeal:v,updateDeal:l,addComment:p,addNewCustomer:N}){let[a,u]=f(null),C=e=>(s.deals??[]).filter(t=>t.status===e),D=e=>e.reduce((t,o)=>t+(o.value||0),0),g=(e,t)=>{let o={Cold:0,Qualified:.1,"Proposal Made":.25,"SoW Submitted":.8,Won:1,Lost:0,Dormant:0};return e.reduce((c,d)=>c+(d.value||0)*o[t],0)},b=R(e=>{let{source:t,destination:o}=e;if(!o||t.droppableId===o.droppableId&&t.index===o.index)return;let c=t.droppableId,d=o.droppableId,n=s.deals?.filter(S=>S.id===t.index)[0],x=[...s.deals??[]];n&&(n.status=d,l(n))},[l]);return r(P,{onDragEnd:b,children:M("div",{className:"p-4 h-full overflow-auto",children:[r("div",{className:"flex space-x-4 pb-4",children:w.filter(e=>e!=="Lost").map(e=>{let t=C(e);return r(i,{status:e,deals:t,customers:s.customers??[],users:s.users,categories:s.categories??[],onDealClick:u,calculateColumnValue:D,calculateWeightedValue:g},e)})}),a&&r(m,{deal:a,users:s.users,customer:a.customer,categories:s.categories??[],onClose:()=>u(null),onSave:l,onAddComment:e=>p(a.id.toString(),e)})]})})}export{h as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as M}from"./chunk-HHYHENVF.mjs";import{a as B}from"./chunk-AM2SRWFU.mjs";import{a as O}from"./chunk-AMV3MECK.mjs";import{a as I}from"./chunk-
|
|
1
|
+
import{a as M}from"./chunk-HHYHENVF.mjs";import{a as B}from"./chunk-AM2SRWFU.mjs";import{a as O}from"./chunk-AMV3MECK.mjs";import{a as I}from"./chunk-74JNWOJQ.mjs";import{a as x}from"./chunk-BA3I4XZE.mjs";import{a as N}from"./chunk-Z22NSJMF.mjs";import{b as w}from"./chunk-CSBGSBEU.mjs";import{useEffect as D,useState as o}from"react";import{Fragment as ts,jsx as i,jsxs as r}from"react/jsx-runtime";var fs=({initialTasks:m=[],initialEpics:u=[],initialSprints:k=[],initialUsers:U=[],initialColleagues:j=[],initialProjects:is=[],onAddTask:K,onUpdateTask:g,onDeleteTask:y,onTaskClick:R,onAddEpic:F})=>{let[H,n]=o(m),[d,h]=o(u),[f,V]=o(k),[$,S]=o(!1),[q,b]=o(!1),[c,T]=o(null),[v,P]=o(null),[z,as]=o(U),[G,os]=o(j),C=d.filter(s=>!0).map(s=>s.id),l=f.find(s=>s.isSelected);C.push("no-epic"),D(()=>{n(m)},[m]),D(()=>{h(u)},[u]),D(()=>{V(k)},[k]);let J=H.filter(s=>{let e=C.includes(s.epicId)||!s.epicId;return!l||l.id==="all-tasks"?e:l.id==="backlog"?e&&!s.sprintId:e&&s.sprintId===l.id}),L=s=>J.filter(e=>e.status===s),Q=s=>{let e={};return d.forEach(t=>{e[t.id]=s.filter(a=>a.epicId===t.id)}),e["no-epic"]=s.filter(t=>!t.epicId),e},W=s=>{P(s)},X=s=>{v&&(n(e=>e.map(t=>t.id===v.id?{...t,status:s}:t)),g?.(v.id,{status:s}),P(null))},Y=s=>{let e={...s,id:Date.now().toString(),createdAt:new Date};n(t=>[...t,e]),K?.(s)},Z=async(s,e)=>{n(t=>t.map(a=>a.id===s?{...a,...e}:a)),g&&await g(s,e)},_=async s=>{n(e=>e.filter(t=>t.id!==s)),c?.id===s&&T(null),y&&await y(s)},ss=s=>{let e={...s,id:Date.now().toString(),isSelected:!0};h(t=>[...t,e]),F?.(s)},es=s=>{T(s),R?.(s)};return r("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[i(N,{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:()=>S(!0)},secondaryAction:{label:"Add epic",onClick:()=>b(!0)}}),i("div",{className:"flex-1",children:r("div",{className:"w-full",children:[i("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[{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"}].map(s=>{let e=L(s.status),t=Q(e);return i(O,{title:s.title,status:s.status,taskCount:e.length,onDrop:X,isCompact:s.status==="done",children:C.map(a=>{let E=d.find(p=>p.id===a),A=t[a]||[];return A.length===0?null:r("div",{className:"mb-6",children:[r("div",{className:"flex items-center gap-2 mb-3",children:[i("div",{className:`w-3 h-3 rounded-full ${E?.color}`}),i("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:E?.name||"No Epic"}),i(w,{variant:"secondary",className:"text-xs",children:A.length})]})," ",i("div",{className:"space-y-3",children:A.map(p=>i(B,{task:p,epic:E,onDragStart:W,onTaskClick:es,isCompact:s.status==="done"},p.id))})]},a)})},s.id)})}),r(ts,{children:[i(x,{isOpen:$,onClose:()=>S(!1),onAddTask:Y,assignees:[...G,...z],epics:d,sprints:f}),i(I,{isOpen:q,onClose:()=>b(!1),onAddEpic:ss}),c&&i(M,{isOpen:!!c,onClose:()=>T(null),task:c,epics:d,sprints:f,onUpdateTask:Z,onDeleteTask:_})]})]})})]})};export{fs as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as c}from"./chunk-SV7NMNDI.mjs";import{a as d}from"./chunk-M7NV6EFH.mjs";import{c as g}from"./chunk-YNNW2C2U.mjs";import{a as
|
|
1
|
+
import{a as c}from"./chunk-SV7NMNDI.mjs";import{a as d}from"./chunk-M7NV6EFH.mjs";import{c as g}from"./chunk-YNNW2C2U.mjs";import{a as p}from"./chunk-FMJBJ3HN.mjs";import{a as l}from"./chunk-WISCWNL2.mjs";import{a as i}from"./chunk-MDJREBVI.mjs";import f from"next/image";import{FaArrowRight as x}from"react-icons/fa6";import{jsx as e,jsxs as r}from"react/jsx-runtime";function z({blogs:a,sectionHeading:t,base:n="insights"}){return r(p,{children:[e("div",{className:"",children:t&&e("div",{"data-aos":"fade-up","data-aos-delay":"100",children:e(d,{...t,alignment:"start",hasBottomSpacing:!0})})}),a&&a.length>0&&e("div",{className:"-mx-4 flex flex-wrap justify-start gap-y-4",children:a.map((s,o)=>e("div",{"data-aos":"fade-up","data-aos-delay":c([200,400,600],o),className:"w-full h-full md:w-1/2 md:px-4 lg:w-1/3",children:e(v,{...s,base:n})},o))})]})}var u=i("inline-flex items-center gap-2 text-white"),L=i("text-sm text-white");function v({slug:a,meta:t,authors:n,title:s,publishedAt:o,categories:h,base:m}){return r("article",{className:"group/blog relative z-1 flex h-full min-h-[452px] flex-col overflow-hidden rounded-5 p-0",children:[e("span",{className:"absolute inset-0 z-[2] "}),e(f,{src:t?.image?.url||"/assets/images/brand/cortex-reply-gradient.png",alt:t?.image?.alt||"Blog image",fill:!0,sizes:`
|
|
2
2
|
(min-width:768px) 50vw,
|
|
3
3
|
(min-width:1024px) 33vw,
|
|
4
4
|
100vw
|
|
@@ -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 m}from"./chunk-YKG4FNS4.mjs";import{a as i}from"./chunk-255P6K5W.mjs";import{a as l}from"./chunk-HKGW6JI2.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};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
import{a as p}from"./chunk-VGWDYD6Z.mjs";import{a as d}from"./chunk-Z22NSJMF.mjs";import{a as c}from"./chunk-CTAIR3TE.mjs";import{a as m,f as n,g as r,i as s,j as l}from"./chunk-3UMMMQEH.mjs";import{useState as w}from"react";import{motion as C,AnimatePresence as D}from"motion/react";import{jsx as e,jsxs as t}from"react/jsx-runtime";function h({teams:i=[],onCreateTeam:g,onTeamOpen:T}){let[y,o]=w(!1),u=()=>{o(!0)},f=a=>{g?.(a),o(!1)},v=()=>{o(!1)},x=a=>{T?.(a)};return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(D,{mode:"wait",children:t(C.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[e(d,{title:"My Teams",description:"Collaborate with your human and digital colleagues across different teams and projects.",gradient:"bg-gradient-to-r from-blue-600 via-cyan-600 to-teal-600",primaryAction:{label:"Create Team",onClick:u}}),t("section",{className:"space-y-4 mt-8",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Teams"}),i.length===0?t("div",{className:"text-center py-12",children:[e("p",{className:"text-muted-foreground text-lg",children:"You're not part of any teams yet."}),e("p",{className:"text-muted-foreground text-sm mt-2",children:"Create a new team or ask to be added to an existing one."})]}):e("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:i.map(a=>e(p,{team:a,onOpen:x},a.id))})]})]},"teams-index-view")}),e(m,{open:y,onOpenChange:o,children:t(n,{className:"max-w-4xl max-h-[90vh] overflow-y-auto p-0",children:[e("div",{className:"sr-only",children:t(r,{children:[e(s,{children:"Create New Team"}),e(l,{children:"Set up a new team to collaborate with colleagues on projects."})]})}),e(c,{title:"Create New Team",submitLabel:"Create Team",onSave:f,onCancel:v})]})})]})}export{h as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as q}from"./chunk-Z22NSJMF.mjs";import{a as S,c as w,d as R,g as I,i as o}from"./chunk-YFAZQYK4.mjs";import{a as M}from"./chunk-B4H6T2GP.mjs";import{a as c}from"./chunk-TVZOULLL.mjs";import{a as F,f as L,g as P,i as A}from"./chunk-3UMMMQEH.mjs";import{a as f}from"./chunk-L5JPAKPM.mjs";import{b as N}from"./chunk-ZUA4KNIR.mjs";import{b as U}from"./chunk-CSBGSBEU.mjs";import{a as T,e as H}from"./chunk-YO3GQYRJ.mjs";import{useEffect as W,useState as D}from"react";import{Plus as Y,Clock as K,Calendar as G,User as J,Repeat as Q,Edit2 as X,Trash2 as Z,CheckCircle as _,Circle as ee,Bell as te}from"lucide-react";import{Fragment as ce,jsx as e,jsxs as t}from"react/jsx-runtime";var ae=i=>{switch(i){case"high":return"\u{1F534}";case"medium":return"\u{1F7E1}";case"low":return"\u{1F7E2}";default:return"\u26AA"}},ie=i=>i.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),re=i=>{let[u,v]=i.split(":"),g=new Date;return g.setHours(parseInt(u),parseInt(v)),g.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},B=(i,u)=>{let v=new Date,g=new Date(i);if(u){let[l,a]=u.split(":");g.setHours(parseInt(l),parseInt(a))}return g<v},O=i=>{let u=new Date;return i.toDateString()===u.toDateString()},le=i=>{let u=new Date;return u.setDate(u.getDate()+1),i.toDateString()===u.toDateString()},ne=({colleagues:i,onAddReminder:u,open:v,setOpen:g})=>{let[l,a]=D({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[s,p]=D(!1),h=d=>{d.preventDefault();let y=i.find(k=>k?.id.toString()===l.colleagueId.toString());if(!y){console.error("No valid colleague selected"),p(!0);return}p(!1);let E={title:l.title,description:l.description,dueDate:new Date(l.dueDate),dueTime:l.dueTime||void 0,colleague:y,isCompleted:!1,isRecurring:l.isRecurring,recurrencePattern:l.isRecurring?l.recurrencePattern:void 0,recurrenceInterval:l.isRecurring?l.recurrenceInterval:void 0,priority:l.priority,reminderEnabled:l.reminderEnabled,reminderMinutes:l.reminderEnabled?l.reminderMinutes:void 0,tags:l.tags?l.tags.split(",").map(k=>k.trim()):void 0};u(E),g(!1),a({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};W(()=>{l.colleagueId&&p(!1)},[l.colleagueId]);let n=i.filter(Boolean);return e(F,{open:v,onOpenChange:g,children:t(L,{className:"max-w-2xl",children:[e(P,{children:e(A,{children:"Add New Reminder"})}),t("form",{onSubmit:h,className:"space-y-4",children:[e("div",{className:"grid grid-cols-2 gap-4",children:t("div",{children:[e(c,{htmlFor:"title",children:"Title"}),e(f,{id:"title",value:l.title,onChange:d=>a({...l,title:d.target.value}),placeholder:"Enter reminder title",required:!0})]})}),t("div",{children:[e(c,{htmlFor:"description",children:"Description"}),e(M,{id:"description",value:l.description,onChange:d=>a({...l,description:d.target.value}),placeholder:"Enter reminder description",rows:3})]}),t("div",{className:"grid grid-cols-2 gap-4",children:[t("div",{children:[e(c,{htmlFor:"dueDate",children:"Due Date"}),e(f,{id:"dueDate",type:"date",value:l.dueDate,onChange:d=>a({...l,dueDate:d.target.value}),required:!0})]}),t("div",{children:[e(c,{htmlFor:"dueTime",children:"Due Time (optional)"}),e(f,{id:"dueTime",type:"time",value:l.dueTime,onChange:d=>a({...l,dueTime:d.target.value})})]})]}),t("div",{children:[e(c,{className:`${s?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),t(S,{value:l.colleagueId,onValueChange:d=>{a({...l,colleagueId:d})},required:!0,children:[e(R,{className:`${s?"text-destructive border-red-500":""}`,children:e(w,{className:`${s?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:i.find(d=>d?.id.toString()===l.colleagueId.toString())?.name||"Select a digital colleague"})}),e(I,{children:n.map(d=>e(o,{value:d.id,children:d.name},d.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:l.isRecurring,onChange:d=>a({...l,isRecurring:d.target.checked}),className:"rounded border-border"}),e(c,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),l.isRecurring&&t("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[t("div",{children:[e(c,{htmlFor:"recurrencePattern",children:"Frequency"}),t(S,{value:l.recurrencePattern,onValueChange:d=>a({...l,recurrencePattern:d}),children:[e(R,{children:e(w,{})}),t(I,{children:[e(o,{value:"daily",children:"Daily"}),e(o,{value:"weekly",children:"Weekly"}),e(o,{value:"monthly",children:"Monthly"}),e(o,{value:"yearly",children:"Yearly"})]})]})]}),t("div",{children:[e(c,{htmlFor:"recurrenceInterval",children:"Every"}),e(f,{id:"recurrenceInterval",type:"number",min:"1",value:l.recurrenceInterval,onChange:d=>a({...l,recurrenceInterval:parseInt(d.target.value)})})]})]})]}),t("div",{className:"flex justify-end space-x-2",children:[e(N,{type:"button",variant:"outline",onClick:()=>g(!1),children:"Cancel"}),e(N,{type:"submit",children:"Add Reminder"})]})]})]})})},de=({reminder:i,colleagues:u,onUpdateReminder:v,open:g,onClose:l})=>{let[a,s]=D({title:i.title,description:i.description,dueDate:i.dueDate.toISOString().split("T")[0],dueTime:i.dueTime||"",colleagueId:i.colleague?.id||"",priority:i.priority,isRecurring:i.isRecurring,recurrencePattern:i.recurrencePattern||"weekly",recurrenceInterval:i.recurrenceInterval||1,reminderEnabled:i.reminderEnabled,reminderMinutes:i.reminderMinutes||15,tags:i.tags?.join(", ")||""}),p=n=>{n.preventDefault();let d=u.find(y=>y?.id===a.colleagueId);if(!d){console.error("No valid colleague selected");return}v(i.id,{title:a.title,description:a.description,dueDate:new Date(a.dueDate),dueTime:a.dueTime||void 0,colleague:d,priority:a.priority,isRecurring:a.isRecurring,recurrencePattern:a.isRecurring?a.recurrencePattern:void 0,recurrenceInterval:a.isRecurring?a.recurrenceInterval:void 0,reminderEnabled:a.reminderEnabled,reminderMinutes:a.reminderEnabled?a.reminderMinutes:void 0,tags:a.tags?a.tags.split(",").map(y=>y.trim()):void 0}),l()},h=u.filter(Boolean);return e(F,{open:g,onOpenChange:l,children:t(L,{className:"max-w-2xl",children:[e(P,{children:e(A,{children:"Edit Reminder"})}),t("form",{onSubmit:p,className:"space-y-4",children:[t("div",{className:"grid grid-cols-2 gap-4",children:[t("div",{children:[e(c,{htmlFor:"edit-title",children:"Title"}),e(f,{id:"edit-title",value:a.title,onChange:n=>s({...a,title:n.target.value}),placeholder:"Enter reminder title",required:!0})]}),t("div",{children:[e(c,{htmlFor:"edit-priority",children:"Priority"}),t(S,{value:a.priority,onValueChange:n=>s({...a,priority:n}),children:[e(R,{children:e(w,{})}),t(I,{children:[e(o,{value:"low",children:"\u{1F7E2} Low"}),e(o,{value:"medium",children:"\u{1F7E1} Medium"}),e(o,{value:"high",children:"\u{1F534} High"})]})]})]})]}),t("div",{children:[e(c,{htmlFor:"edit-description",children:"Description"}),e(M,{id:"edit-description",value:a.description,onChange:n=>s({...a,description:n.target.value}),placeholder:"Enter reminder description",rows:3})]}),t("div",{className:"grid grid-cols-2 gap-4",children:[t("div",{children:[e(c,{htmlFor:"edit-dueDate",children:"Due Date"}),e(f,{id:"edit-dueDate",type:"date",value:a.dueDate,onChange:n=>s({...a,dueDate:n.target.value}),required:!0})]}),t("div",{children:[e(c,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),e(f,{id:"edit-dueTime",type:"time",value:a.dueTime,onChange:n=>s({...a,dueTime:n.target.value})})]})]}),t("div",{children:[e(c,{htmlFor:"edit-colleague",children:"Assigned Colleague"}),t(S,{value:a.colleagueId,onValueChange:n=>s({...a,colleagueId:n}),required:!0,children:[e(R,{children:e(w,{placeholder:"Select a digital colleague"})}),e(I,{children:h.map(n=>e(o,{value:n.id,children:n.name},n.id))})]})]}),t("div",{className:"space-y-2",children:[t("div",{className:"flex items-center space-x-2",children:[e("input",{type:"checkbox",id:"edit-isRecurring",checked:a.isRecurring,onChange:n=>s({...a,isRecurring:n.target.checked}),className:"rounded border-border"}),e(c,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]}),a.isRecurring&&t("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[t("div",{children:[e(c,{htmlFor:"edit-recurrencePattern",children:"Frequency"}),t(S,{value:a.recurrencePattern,onValueChange:n=>s({...a,recurrencePattern:n}),children:[e(R,{children:e(w,{})}),t(I,{children:[e(o,{value:"daily",children:"Daily"}),e(o,{value:"weekly",children:"Weekly"}),e(o,{value:"monthly",children:"Monthly"}),e(o,{value:"yearly",children:"Yearly"})]})]})]}),t("div",{children:[e(c,{htmlFor:"edit-recurrenceInterval",children:"Every"}),e(f,{id:"edit-recurrenceInterval",type:"number",min:"1",value:a.recurrenceInterval,onChange:n=>s({...a,recurrenceInterval:parseInt(n.target.value)})})]})]})]}),t("div",{className:"space-y-2",children:[t("div",{className:"flex items-center space-x-2",children:[e("input",{type:"checkbox",id:"edit-reminderEnabled",checked:a.reminderEnabled,onChange:n=>s({...a,reminderEnabled:n.target.checked}),className:"rounded border-border"}),e(c,{htmlFor:"edit-reminderEnabled",children:"Enable reminder notifications"})]}),a.reminderEnabled&&t("div",{className:"pl-6",children:[e(c,{htmlFor:"edit-reminderMinutes",children:"Remind me"}),t(S,{value:a.reminderMinutes.toString(),onValueChange:n=>s({...a,reminderMinutes:parseInt(n)}),children:[e(R,{children:e(w,{})}),t(I,{children:[e(o,{value:"5",children:"5 minutes before"}),e(o,{value:"15",children:"15 minutes before"}),e(o,{value:"30",children:"30 minutes before"}),e(o,{value:"60",children:"1 hour before"}),e(o,{value:"1440",children:"1 day before"})]})]})]})]}),t("div",{children:[e(c,{htmlFor:"edit-tags",children:"Tags (comma-separated)"}),e(f,{id:"edit-tags",value:a.tags,onChange:n=>s({...a,tags:n.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),t("div",{className:"flex justify-end space-x-2",children:[e(N,{type:"button",variant:"outline",onClick:l,children:"Cancel"}),e(N,{type:"submit",children:"Save Changes"})]})]})]})})},se=({reminder:i,colleagues:u,onUpdateReminder:v,onDeleteReminder:g})=>{let[l,a]=D(!1);if(!i||!i.id)return null;let s=B(i.dueDate,i.dueTime),p=O(i.dueDate),h=le(i.dueDate),n=()=>{v(i.id,{isCompleted:!i.isCompleted,completedAt:i.isCompleted?void 0:new Date})},d=()=>p?"Today":h?"Tomorrow":s&&!i.isCompleted?"Overdue":ie(i.dueDate);return t(ce,{children:[e(de,{reminder:i,colleagues:u,onUpdateReminder:v,open:l,onClose:()=>a(!1)}),e(T,{className:`transition-all duration-200 ${i.isCompleted?"opacity-60":""} ${s&&!i.isCompleted?"border-destructive/50 bg-destructive/5":""}`,children:e(H,{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:n,className:"mt-1 text-primary hover:text-primary/80",children:i.isCompleted?e(_,{className:"h-5 w-5"}):e(ee,{className:"h-5 w-5"})}),t("div",{className:"flex-1",children:[t("div",{className:"flex items-center space-x-2 mb-1",children:[e("h3",{className:`font-semibold ${i.isCompleted?"line-through text-muted-foreground":""}`,children:i.title}),e("span",{className:"text-sm",children:ae(i.priority)}),i.isRecurring&&e(Q,{className:"h-4 w-4 text-primary"}),i.reminderEnabled&&e(te,{className:"h-4 w-4 text-success"})]}),e("p",{className:"text-sm text-muted-foreground mb-2",children:i.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&&!i.isCompleted?"text-destructive font-medium":"",children:d()})]}),i.dueTime&&t("div",{className:"flex items-center space-x-1",children:[e(K,{className:"h-4 w-4"}),e("span",{children:re(i.dueTime)})]}),t("div",{className:"flex items-center space-x-1",children:[e(J,{className:"h-4 w-4"}),e("span",{children:i.colleague?.name||"Unknown Colleague"})]})]}),i.tags&&i.tags.length>0&&e("div",{className:"flex flex-wrap gap-1 mt-2",children:i.tags.map((y,E)=>e(U,{variant:"secondary",className:"text-xs",children:y},E))})]})]}),t("div",{className:"flex items-center space-x-1",children:[e(N,{variant:"ghost",size:"sm",onClick:()=>a(!0),className:"h-8 w-8 p-0",children:e(X,{className:"h-4 w-4"})}),e(N,{variant:"ghost",size:"sm",onClick:()=>g(i.id),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:e(Z,{className:"h-4 w-4"})})]})]})})})]})},oe=({initialReminders:i=[],initialColleagues:u=[],onAddReminder:v,onUpdateReminder:g,onDeleteReminder:l})=>{let[a,s]=D(i.filter(Boolean)),[p]=D(u.filter(Boolean)),[h,n]=D("all"),[d,y]=D(""),[E,k]=D(!1),j=r=>{if(!r.title||!r.colleague?.id){console.error("Invalid reminder data:",r);return}let m={...r,id:Date.now().toString(),createdAt:new Date};s(x=>[...x,m]),v?.(r)},$=(r,m)=>{if(!r){console.error("No reminder ID provided for update");return}s(x=>x.map(b=>b?.id===r?{...b,...m}:b)),g?.(r,m)},z=r=>{if(!r){console.error("No reminder ID provided for deletion");return}s(m=>m.filter(x=>x?.id!==r)),l?.(r)},V=a.filter(r=>{if(!r)return!1;if(d){let m=d.toLowerCase();if(!(r.title.toLowerCase().includes(m)||r.description.toLowerCase().includes(m)||r.colleague?.name?.toLowerCase().includes(m)||r.tags?.some(b=>b.toLowerCase().includes(m))))return!1}switch(h){case"pending":return!r.isCompleted;case"completed":return r.isCompleted;case"overdue":return!r.isCompleted&&B(r.dueDate,r.dueTime);case"today":return O(new Date(r.dueDate));default:return!0}}).sort((r,m)=>{if(!r||!m)return 0;if(r.isCompleted&&!m.isCompleted)return 1;if(!r.isCompleted&&m.isCompleted)return-1;let x={high:3,medium:2,low:1},b=x[m.priority]-x[r.priority];return b!==0?b:r.dueDate.getTime()-m.dueDate.getTime()}),C={total:a.filter(Boolean).length,pending:a.filter(r=>r&&!r.isCompleted).length,completed:a.filter(r=>r&&r.isCompleted).length,overdue:a.filter(r=>r&&!r.isCompleted&&B(r.dueDate,r.dueTime)).length,today:a.filter(r=>r&&O(new Date(r.dueDate))).length},me=p.find(Boolean)||{id:"1",name:"Default Colleague",status:"active",joinedDate:new Date,lastActive:new Date,type:"digital",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:[],version:"1.0.0",lastUpdated:new Date,isActive:!0};return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(q,{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:()=>{k(!0)}}}),t("div",{className:"h-full bg-background",children:[e(ne,{colleagues:p,onAddReminder:j,open:E,setOpen:k}),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(N,{className:"flex items-center space-x-2",onClick:()=>k(!0),children:[e(Y,{className:"h-4 w-4"}),e("span",{children:"Add Reminder"})]})]}),t("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[t(T,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-foreground",children:C.total}),e("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),t(T,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-primary",children:C.pending}),e("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),t(T,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-success",children:C.completed}),e("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),t(T,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-destructive",children:C.overdue}),e("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),t(T,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-warning",children:C.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(f,{placeholder:"Search reminders...",value:d,onChange:r=>y(r.target.value),className:"max-w-md"})}),t(S,{value:h,onValueChange:r=>n(r),children:[e(R,{className:"w-40",children:e(w,{})}),t(I,{children:[t(o,{value:"all",children:["All (",C.total,")"]}),t(o,{value:"pending",children:["Pending (",C.pending,")"]}),t(o,{value:"completed",children:["Completed (",C.completed,")"]}),t(o,{value:"overdue",children:["Overdue (",C.overdue,")"]}),t(o,{value:"today",children:["Today (",C.today,")"]})]})]})]}),e("div",{className:"space-y-4",children:V.length===0?t(T,{className:"p-8 text-center",children:[e("div",{className:"text-muted-foreground",children:d||h!=="all"?"No reminders match your filters":"No reminders yet"}),!d&&h==="all"&&e("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder to get started"})]}):V.map(r=>r&&e(se,{reminder:r,colleagues:p,onUpdateReminder:$,onDeleteReminder:z},r.id))})]})]})]})},ke=oe;export{oe as a,ke as b};
|
|
1
|
+
import{a as q}from"./chunk-Z22NSJMF.mjs";import{a as S,c as w,d as R,g as I,i as o}from"./chunk-YFAZQYK4.mjs";import{a as M}from"./chunk-B4H6T2GP.mjs";import{a as c}from"./chunk-TVZOULLL.mjs";import{a as f}from"./chunk-L5JPAKPM.mjs";import{a as F,f as L,g as P,i as A}from"./chunk-3UMMMQEH.mjs";import{b as N}from"./chunk-ZUA4KNIR.mjs";import{b as U}from"./chunk-CSBGSBEU.mjs";import{a as T,e as H}from"./chunk-YO3GQYRJ.mjs";import{useEffect as W,useState as D}from"react";import{Plus as Y,Clock as K,Calendar as G,User as J,Repeat as Q,Edit2 as X,Trash2 as Z,CheckCircle as _,Circle as ee,Bell as te}from"lucide-react";import{Fragment as ce,jsx as e,jsxs as t}from"react/jsx-runtime";var ae=i=>{switch(i){case"high":return"\u{1F534}";case"medium":return"\u{1F7E1}";case"low":return"\u{1F7E2}";default:return"\u26AA"}},ie=i=>i.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),re=i=>{let[u,v]=i.split(":"),g=new Date;return g.setHours(parseInt(u),parseInt(v)),g.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},B=(i,u)=>{let v=new Date,g=new Date(i);if(u){let[l,a]=u.split(":");g.setHours(parseInt(l),parseInt(a))}return g<v},O=i=>{let u=new Date;return i.toDateString()===u.toDateString()},le=i=>{let u=new Date;return u.setDate(u.getDate()+1),i.toDateString()===u.toDateString()},ne=({colleagues:i,onAddReminder:u,open:v,setOpen:g})=>{let[l,a]=D({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[s,p]=D(!1),h=d=>{d.preventDefault();let y=i.find(k=>k?.id.toString()===l.colleagueId.toString());if(!y){console.error("No valid colleague selected"),p(!0);return}p(!1);let E={title:l.title,description:l.description,dueDate:new Date(l.dueDate),dueTime:l.dueTime||void 0,colleague:y,isCompleted:!1,isRecurring:l.isRecurring,recurrencePattern:l.isRecurring?l.recurrencePattern:void 0,recurrenceInterval:l.isRecurring?l.recurrenceInterval:void 0,priority:l.priority,reminderEnabled:l.reminderEnabled,reminderMinutes:l.reminderEnabled?l.reminderMinutes:void 0,tags:l.tags?l.tags.split(",").map(k=>k.trim()):void 0};u(E),g(!1),a({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};W(()=>{l.colleagueId&&p(!1)},[l.colleagueId]);let n=i.filter(Boolean);return e(F,{open:v,onOpenChange:g,children:t(L,{className:"max-w-2xl",children:[e(P,{children:e(A,{children:"Add New Reminder"})}),t("form",{onSubmit:h,className:"space-y-4",children:[e("div",{className:"grid grid-cols-2 gap-4",children:t("div",{children:[e(c,{htmlFor:"title",children:"Title"}),e(f,{id:"title",value:l.title,onChange:d=>a({...l,title:d.target.value}),placeholder:"Enter reminder title",required:!0})]})}),t("div",{children:[e(c,{htmlFor:"description",children:"Description"}),e(M,{id:"description",value:l.description,onChange:d=>a({...l,description:d.target.value}),placeholder:"Enter reminder description",rows:3})]}),t("div",{className:"grid grid-cols-2 gap-4",children:[t("div",{children:[e(c,{htmlFor:"dueDate",children:"Due Date"}),e(f,{id:"dueDate",type:"date",value:l.dueDate,onChange:d=>a({...l,dueDate:d.target.value}),required:!0})]}),t("div",{children:[e(c,{htmlFor:"dueTime",children:"Due Time (optional)"}),e(f,{id:"dueTime",type:"time",value:l.dueTime,onChange:d=>a({...l,dueTime:d.target.value})})]})]}),t("div",{children:[e(c,{className:`${s?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),t(S,{value:l.colleagueId,onValueChange:d=>{a({...l,colleagueId:d})},required:!0,children:[e(R,{className:`${s?"text-destructive border-red-500":""}`,children:e(w,{className:`${s?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:i.find(d=>d?.id.toString()===l.colleagueId.toString())?.name||"Select a digital colleague"})}),e(I,{children:n.map(d=>e(o,{value:d.id,children:d.name},d.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:l.isRecurring,onChange:d=>a({...l,isRecurring:d.target.checked}),className:"rounded border-border"}),e(c,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),l.isRecurring&&t("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[t("div",{children:[e(c,{htmlFor:"recurrencePattern",children:"Frequency"}),t(S,{value:l.recurrencePattern,onValueChange:d=>a({...l,recurrencePattern:d}),children:[e(R,{children:e(w,{})}),t(I,{children:[e(o,{value:"daily",children:"Daily"}),e(o,{value:"weekly",children:"Weekly"}),e(o,{value:"monthly",children:"Monthly"}),e(o,{value:"yearly",children:"Yearly"})]})]})]}),t("div",{children:[e(c,{htmlFor:"recurrenceInterval",children:"Every"}),e(f,{id:"recurrenceInterval",type:"number",min:"1",value:l.recurrenceInterval,onChange:d=>a({...l,recurrenceInterval:parseInt(d.target.value)})})]})]})]}),t("div",{className:"flex justify-end space-x-2",children:[e(N,{type:"button",variant:"outline",onClick:()=>g(!1),children:"Cancel"}),e(N,{type:"submit",children:"Add Reminder"})]})]})]})})},de=({reminder:i,colleagues:u,onUpdateReminder:v,open:g,onClose:l})=>{let[a,s]=D({title:i.title,description:i.description,dueDate:i.dueDate.toISOString().split("T")[0],dueTime:i.dueTime||"",colleagueId:i.colleague?.id||"",priority:i.priority,isRecurring:i.isRecurring,recurrencePattern:i.recurrencePattern||"weekly",recurrenceInterval:i.recurrenceInterval||1,reminderEnabled:i.reminderEnabled,reminderMinutes:i.reminderMinutes||15,tags:i.tags?.join(", ")||""}),p=n=>{n.preventDefault();let d=u.find(y=>y?.id===a.colleagueId);if(!d){console.error("No valid colleague selected");return}v(i.id,{title:a.title,description:a.description,dueDate:new Date(a.dueDate),dueTime:a.dueTime||void 0,colleague:d,priority:a.priority,isRecurring:a.isRecurring,recurrencePattern:a.isRecurring?a.recurrencePattern:void 0,recurrenceInterval:a.isRecurring?a.recurrenceInterval:void 0,reminderEnabled:a.reminderEnabled,reminderMinutes:a.reminderEnabled?a.reminderMinutes:void 0,tags:a.tags?a.tags.split(",").map(y=>y.trim()):void 0}),l()},h=u.filter(Boolean);return e(F,{open:g,onOpenChange:l,children:t(L,{className:"max-w-2xl",children:[e(P,{children:e(A,{children:"Edit Reminder"})}),t("form",{onSubmit:p,className:"space-y-4",children:[t("div",{className:"grid grid-cols-2 gap-4",children:[t("div",{children:[e(c,{htmlFor:"edit-title",children:"Title"}),e(f,{id:"edit-title",value:a.title,onChange:n=>s({...a,title:n.target.value}),placeholder:"Enter reminder title",required:!0})]}),t("div",{children:[e(c,{htmlFor:"edit-priority",children:"Priority"}),t(S,{value:a.priority,onValueChange:n=>s({...a,priority:n}),children:[e(R,{children:e(w,{})}),t(I,{children:[e(o,{value:"low",children:"\u{1F7E2} Low"}),e(o,{value:"medium",children:"\u{1F7E1} Medium"}),e(o,{value:"high",children:"\u{1F534} High"})]})]})]})]}),t("div",{children:[e(c,{htmlFor:"edit-description",children:"Description"}),e(M,{id:"edit-description",value:a.description,onChange:n=>s({...a,description:n.target.value}),placeholder:"Enter reminder description",rows:3})]}),t("div",{className:"grid grid-cols-2 gap-4",children:[t("div",{children:[e(c,{htmlFor:"edit-dueDate",children:"Due Date"}),e(f,{id:"edit-dueDate",type:"date",value:a.dueDate,onChange:n=>s({...a,dueDate:n.target.value}),required:!0})]}),t("div",{children:[e(c,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),e(f,{id:"edit-dueTime",type:"time",value:a.dueTime,onChange:n=>s({...a,dueTime:n.target.value})})]})]}),t("div",{children:[e(c,{htmlFor:"edit-colleague",children:"Assigned Colleague"}),t(S,{value:a.colleagueId,onValueChange:n=>s({...a,colleagueId:n}),required:!0,children:[e(R,{children:e(w,{placeholder:"Select a digital colleague"})}),e(I,{children:h.map(n=>e(o,{value:n.id,children:n.name},n.id))})]})]}),t("div",{className:"space-y-2",children:[t("div",{className:"flex items-center space-x-2",children:[e("input",{type:"checkbox",id:"edit-isRecurring",checked:a.isRecurring,onChange:n=>s({...a,isRecurring:n.target.checked}),className:"rounded border-border"}),e(c,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]}),a.isRecurring&&t("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[t("div",{children:[e(c,{htmlFor:"edit-recurrencePattern",children:"Frequency"}),t(S,{value:a.recurrencePattern,onValueChange:n=>s({...a,recurrencePattern:n}),children:[e(R,{children:e(w,{})}),t(I,{children:[e(o,{value:"daily",children:"Daily"}),e(o,{value:"weekly",children:"Weekly"}),e(o,{value:"monthly",children:"Monthly"}),e(o,{value:"yearly",children:"Yearly"})]})]})]}),t("div",{children:[e(c,{htmlFor:"edit-recurrenceInterval",children:"Every"}),e(f,{id:"edit-recurrenceInterval",type:"number",min:"1",value:a.recurrenceInterval,onChange:n=>s({...a,recurrenceInterval:parseInt(n.target.value)})})]})]})]}),t("div",{className:"space-y-2",children:[t("div",{className:"flex items-center space-x-2",children:[e("input",{type:"checkbox",id:"edit-reminderEnabled",checked:a.reminderEnabled,onChange:n=>s({...a,reminderEnabled:n.target.checked}),className:"rounded border-border"}),e(c,{htmlFor:"edit-reminderEnabled",children:"Enable reminder notifications"})]}),a.reminderEnabled&&t("div",{className:"pl-6",children:[e(c,{htmlFor:"edit-reminderMinutes",children:"Remind me"}),t(S,{value:a.reminderMinutes.toString(),onValueChange:n=>s({...a,reminderMinutes:parseInt(n)}),children:[e(R,{children:e(w,{})}),t(I,{children:[e(o,{value:"5",children:"5 minutes before"}),e(o,{value:"15",children:"15 minutes before"}),e(o,{value:"30",children:"30 minutes before"}),e(o,{value:"60",children:"1 hour before"}),e(o,{value:"1440",children:"1 day before"})]})]})]})]}),t("div",{children:[e(c,{htmlFor:"edit-tags",children:"Tags (comma-separated)"}),e(f,{id:"edit-tags",value:a.tags,onChange:n=>s({...a,tags:n.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),t("div",{className:"flex justify-end space-x-2",children:[e(N,{type:"button",variant:"outline",onClick:l,children:"Cancel"}),e(N,{type:"submit",children:"Save Changes"})]})]})]})})},se=({reminder:i,colleagues:u,onUpdateReminder:v,onDeleteReminder:g})=>{let[l,a]=D(!1);if(!i||!i.id)return null;let s=B(i.dueDate,i.dueTime),p=O(i.dueDate),h=le(i.dueDate),n=()=>{v(i.id,{isCompleted:!i.isCompleted,completedAt:i.isCompleted?void 0:new Date})},d=()=>p?"Today":h?"Tomorrow":s&&!i.isCompleted?"Overdue":ie(i.dueDate);return t(ce,{children:[e(de,{reminder:i,colleagues:u,onUpdateReminder:v,open:l,onClose:()=>a(!1)}),e(T,{className:`transition-all duration-200 ${i.isCompleted?"opacity-60":""} ${s&&!i.isCompleted?"border-destructive/50 bg-destructive/5":""}`,children:e(H,{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:n,className:"mt-1 text-primary hover:text-primary/80",children:i.isCompleted?e(_,{className:"h-5 w-5"}):e(ee,{className:"h-5 w-5"})}),t("div",{className:"flex-1",children:[t("div",{className:"flex items-center space-x-2 mb-1",children:[e("h3",{className:`font-semibold ${i.isCompleted?"line-through text-muted-foreground":""}`,children:i.title}),e("span",{className:"text-sm",children:ae(i.priority)}),i.isRecurring&&e(Q,{className:"h-4 w-4 text-primary"}),i.reminderEnabled&&e(te,{className:"h-4 w-4 text-success"})]}),e("p",{className:"text-sm text-muted-foreground mb-2",children:i.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&&!i.isCompleted?"text-destructive font-medium":"",children:d()})]}),i.dueTime&&t("div",{className:"flex items-center space-x-1",children:[e(K,{className:"h-4 w-4"}),e("span",{children:re(i.dueTime)})]}),t("div",{className:"flex items-center space-x-1",children:[e(J,{className:"h-4 w-4"}),e("span",{children:i.colleague?.name||"Unknown Colleague"})]})]}),i.tags&&i.tags.length>0&&e("div",{className:"flex flex-wrap gap-1 mt-2",children:i.tags.map((y,E)=>e(U,{variant:"secondary",className:"text-xs",children:y},E))})]})]}),t("div",{className:"flex items-center space-x-1",children:[e(N,{variant:"ghost",size:"sm",onClick:()=>a(!0),className:"h-8 w-8 p-0",children:e(X,{className:"h-4 w-4"})}),e(N,{variant:"ghost",size:"sm",onClick:()=>g(i.id),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:e(Z,{className:"h-4 w-4"})})]})]})})})]})},oe=({initialReminders:i=[],initialColleagues:u=[],onAddReminder:v,onUpdateReminder:g,onDeleteReminder:l})=>{let[a,s]=D(i.filter(Boolean)),[p]=D(u.filter(Boolean)),[h,n]=D("all"),[d,y]=D(""),[E,k]=D(!1),j=r=>{if(!r.title||!r.colleague?.id){console.error("Invalid reminder data:",r);return}let m={...r,id:Date.now().toString(),createdAt:new Date};s(x=>[...x,m]),v?.(r)},$=(r,m)=>{if(!r){console.error("No reminder ID provided for update");return}s(x=>x.map(b=>b?.id===r?{...b,...m}:b)),g?.(r,m)},z=r=>{if(!r){console.error("No reminder ID provided for deletion");return}s(m=>m.filter(x=>x?.id!==r)),l?.(r)},V=a.filter(r=>{if(!r)return!1;if(d){let m=d.toLowerCase();if(!(r.title.toLowerCase().includes(m)||r.description.toLowerCase().includes(m)||r.colleague?.name?.toLowerCase().includes(m)||r.tags?.some(b=>b.toLowerCase().includes(m))))return!1}switch(h){case"pending":return!r.isCompleted;case"completed":return r.isCompleted;case"overdue":return!r.isCompleted&&B(r.dueDate,r.dueTime);case"today":return O(new Date(r.dueDate));default:return!0}}).sort((r,m)=>{if(!r||!m)return 0;if(r.isCompleted&&!m.isCompleted)return 1;if(!r.isCompleted&&m.isCompleted)return-1;let x={high:3,medium:2,low:1},b=x[m.priority]-x[r.priority];return b!==0?b:r.dueDate.getTime()-m.dueDate.getTime()}),C={total:a.filter(Boolean).length,pending:a.filter(r=>r&&!r.isCompleted).length,completed:a.filter(r=>r&&r.isCompleted).length,overdue:a.filter(r=>r&&!r.isCompleted&&B(r.dueDate,r.dueTime)).length,today:a.filter(r=>r&&O(new Date(r.dueDate))).length},me=p.find(Boolean)||{id:"1",name:"Default Colleague",status:"active",joinedDate:new Date,lastActive:new Date,type:"digital",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:[],version:"1.0.0",lastUpdated:new Date,isActive:!0};return t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(q,{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:()=>{k(!0)}}}),t("div",{className:"h-full bg-background",children:[e(ne,{colleagues:p,onAddReminder:j,open:E,setOpen:k}),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(N,{className:"flex items-center space-x-2",onClick:()=>k(!0),children:[e(Y,{className:"h-4 w-4"}),e("span",{children:"Add Reminder"})]})]}),t("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[t(T,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-foreground",children:C.total}),e("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),t(T,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-primary",children:C.pending}),e("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),t(T,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-success",children:C.completed}),e("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),t(T,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-destructive",children:C.overdue}),e("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),t(T,{className:"p-4",children:[e("div",{className:"text-2xl font-bold text-warning",children:C.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(f,{placeholder:"Search reminders...",value:d,onChange:r=>y(r.target.value),className:"max-w-md"})}),t(S,{value:h,onValueChange:r=>n(r),children:[e(R,{className:"w-40",children:e(w,{})}),t(I,{children:[t(o,{value:"all",children:["All (",C.total,")"]}),t(o,{value:"pending",children:["Pending (",C.pending,")"]}),t(o,{value:"completed",children:["Completed (",C.completed,")"]}),t(o,{value:"overdue",children:["Overdue (",C.overdue,")"]}),t(o,{value:"today",children:["Today (",C.today,")"]})]})]})]}),e("div",{className:"space-y-4",children:V.length===0?t(T,{className:"p-8 text-center",children:[e("div",{className:"text-muted-foreground",children:d||h!=="all"?"No reminders match your filters":"No reminders yet"}),!d&&h==="all"&&e("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder to get started"})]}):V.map(r=>r&&e(se,{reminder:r,colleagues:p,onUpdateReminder:$,onDeleteReminder:z},r.id))})]})]})]})},ke=oe;export{oe as a,ke as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as
|
|
4
|
+
import{a as Y}from"./chunk-Z22NSJMF.mjs";import{a as N}from"./chunk-TUI4S4GI.mjs";import{a as F}from"./chunk-EAFH3DTH.mjs";import{a as _}from"./chunk-6XUIHSKG.mjs";import{a as ee}from"./chunk-6WQXZ6IE.mjs";import{a as te}from"./chunk-CO6AQNZ5.mjs";import{a as le}from"./chunk-PWXCBW2H.mjs";import{a as Z}from"./chunk-FGEFYI5E.mjs";import{a as H,c as I,d as U,g as $,i as g}from"./chunk-YFAZQYK4.mjs";import{a as X}from"./chunk-L5JPAKPM.mjs";import{b as V}from"./chunk-ZUA4KNIR.mjs";import{a as u,b as x,c as D,e as p}from"./chunk-YO3GQYRJ.mjs";import{useEffect as ve,useState as s}from"react";import{Plus as he,Search as ye,Users as ae,Bot as we,User as xe,Filter as De}from"lucide-react";import{motion as Ne,AnimatePresence as Se}from"motion/react";import{jsx as t,jsxs as a}from"react/jsx-runtime";function be({initialColleagues:S,onColleagueAdd:b,onColleagueEdit:O,onColleagueDelete:ie,compactView:d=!1,departments:oe=["Design","Engineering","Marketing","Product","Sales","Operations"],className:ne,availableUsers:L=[],existingDigitalColleagues:j=[]}){let[n,m]=s(S||[]),[r,P]=s(""),[C,B]=s("all"),[f,M]=s("all"),[y,se]=s("all"),[q,v]=s(null),[A,w]=s(null);ve(()=>{m(S||[])},[S]);let re=Array.isArray(L)?L:[],z=Array.isArray(j)?j:[],[c,i]=s("main"),h=n.filter(e=>{if(!e||!e.name)return!1;let o=e.name.toLowerCase().includes(r.toLowerCase())||e.type==="human"&&(e.email?.toLowerCase().includes(r.toLowerCase())||e.role?.toLowerCase().includes(r.toLowerCase()))||e.type==="digital"&&e.jobDescription?.toLowerCase().includes(r.toLowerCase()),l=C==="all"||e.type==="human"&&e.department===C,K=f==="all"||e.status===f;return o&&l&&K}),G=h.filter(e=>e.type==="human"),W=h.filter(e=>e.type==="digital"),J=()=>{i("typeSelection")},T=e=>{e.type==="digital"&&(v(e),i("form")),console.log("Editing colleague:",e),O?.(e)},k=e=>{e.type==="digital"&&(w(e),i("view"))},de=e=>{let o={id:`human-${Date.now()}`,type:"human",name:e.name,email:e.email,role:e.role,department:e.department,phone:e.phone,location:e.location,timezone:e.timezone,skills:e.skills||[],bio:e.bio,status:"active",joinedDate:new Date,lastActive:new Date};m(l=>[...l,o]),b?.(o),i("main")},me=e=>{if(!e||!e.id){console.error("Invalid cloned colleague provided to handleDigitalColleagueClone:",e);return}m(o=>[...o,e]),b?.(e),i("main")},ce=()=>{v(null),i("form")},Q=e=>{if(!e||!e.id){console.error("Invalid colleague provided to handleSaveColleague:",e);return}q?(m(o=>o.map(l=>l.id===e.id?e:l)),O?.(e)):(m(o=>[...o,e]),b?.(e)),i("main"),v(null)},ge=()=>{i("main"),v(null),w(null)},ue=()=>{i("main"),w(null)},Ae=()=>{A&&(v(A),w(null),i("form"))},E=e=>{console.log("handling delete colleague",e),m(o=>o.filter(l=>l.id!==e)),ie?.(e)},pe=()=>{P(""),B("all"),M("all")},R=()=>{let e=[];return z.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,K,Ce)=>K===Ce.findIndex(fe=>fe.id===l.id))};return c==="typeSelection"?t(_,{onSelectHuman:()=>i("userSelection"),onSelectDigital:()=>i("digitalOptions"),onCancel:()=>i("main")}):c==="userSelection"?t(le,{users:re,onUserSelect:de,onCancel:()=>i("typeSelection")}):c==="digitalOptions"?t(te,{onCloneExisting:()=>i("digitalClone"),onCreateNew:ce,onCancel:()=>i("typeSelection")}):c==="digitalClone"?t(ee,{digitalColleagues:z,onColleagueClone:me,onCancel:()=>i("digitalOptions")}):c==="form"?t(F,{colleague:q||void 0,onSave:Q,onCancel:ge,availableKnowledgeDocuments:R()}):c==="view"?t(F,{colleague:A||void 0,onSave:Q,onCancel:ue,readOnly:!0,availableKnowledgeDocuments:R()}):t("div",{className:"px-2 md:px-4 py-4 space-y-8",children:t(Se,{mode:"wait",children:t(Ne.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 ${ne||""}`,children:[t(Y,{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:J}}),a("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[a(u,{children:[a(x,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[t(D,{className:"text-sm font-medium",children:"Total Colleagues"}),t(ae,{className:"h-4 w-4 text-muted-foreground"})]}),a(p,{children:[t("div",{className:"text-2xl font-bold",children:n.length}),a("p",{className:"text-xs text-muted-foreground",children:[n.filter(e=>e.status==="active").length," active"]})]})]}),a(u,{children:[a(x,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[t(D,{className:"text-sm font-medium",children:"Human Members"}),t(xe,{className:"h-4 w-4 text-muted-foreground"})]}),a(p,{children:[t("div",{className:"text-2xl font-bold",children:n.filter(e=>e.type==="human").length}),a("p",{className:"text-xs text-muted-foreground",children:[n.filter(e=>e.type==="human"&&e.status==="active").length," ","active"]})]})]}),a(u,{children:[a(x,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[t(D,{className:"text-sm font-medium",children:"Digital Colleagues"}),t(we,{className:"h-4 w-4 text-muted-foreground"})]}),a(p,{children:[t("div",{className:"text-2xl font-bold",children:n.filter(e=>e.type==="digital").length}),a("p",{className:"text-xs text-muted-foreground",children:[n.filter(e=>e.type==="digital"&&e.status==="active").length," ","active"]})]})]})]}),t(u,{children:t(p,{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(ye,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),t(X,{placeholder:"Search colleagues...",value:r,onChange:e=>P(e.target.value),className:"pl-9"})]})}),a(H,{value:C,onValueChange:B,children:[t(U,{className:"w-full md:w-[180px]",children:t(I,{placeholder:"Department"})}),a($,{children:[t(g,{value:"all",children:"All Departments"}),oe.map(e=>t(g,{value:e,children:e},e))]})]}),a(H,{value:f,onValueChange:M,children:[t(U,{className:"w-full md:w-[140px]",children:t(I,{placeholder:"Status"})}),a($,{children:[t(g,{value:"all",children:"All Status"}),t(g,{value:"active",children:"Active"}),t(g,{value:"inactive",children:"Inactive"})]})]}),(r||C!=="all"||f!=="all")&&a(V,{variant:"outline",onClick:pe,className:"gap-2",children:[t(De,{className:"h-4 w-4"}),"Clear"]})]})})}),a("div",{className:"space-y-4",children:[t(Z,{activeTab:y,onTabChange:se,tabOptions:[{value:"all",label:`All (${h.length})`},{value:"human",label:`Human (${G.length})`},{value:"digital",label:`Digital (${W.length})`}],maxWidth:"400px",gridCols:3}),y==="all"&&t("div",{className:`grid gap-4 ${d?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:h.map(e=>t(N,{colleague:e,onEdit:T,onDelete:E,onViewDetails:k,compact:d},`${e}-${e.id}`))}),y==="human"&&t("div",{className:`grid gap-4 ${d?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:G.map(e=>t(N,{colleague:e,onEdit:T,onDelete:E,onViewDetails:k,compact:d},e.id))}),y==="digital"&&t("div",{className:`grid gap-4 ${d?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:W.map(e=>t(N,{colleague:e,onEdit:T,onDelete:E,onViewDetails:k,compact:d},e.id))})]}),h.length===0&&t(u,{children:t(p,{className:"pt-6",children:a("div",{className:"text-center py-8",children:[t(ae,{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:r||C!=="all"||f!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),a(V,{onClick:J,className:"gap-2",children:[t(he,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}export{be as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{a as te}from"./chunk-
|
|
4
|
+
import{a as te}from"./chunk-Q3EVV5MV.mjs";import{a as _}from"./chunk-I2ZLKSWR.mjs";import{a as Q}from"./chunk-WI2RL3XQ.mjs";import{a as Z}from"./chunk-LJLV5GUS.mjs";import{a as ee}from"./chunk-AQ6RGBGI.mjs";import{a as Y}from"./chunk-74JNWOJQ.mjs";import{a as X}from"./chunk-BA3I4XZE.mjs";import{a as L}from"./chunk-CTAQQFEO.mjs";import{useEffect as o,useState as s}from"react";import{useRouter as Ye}from"next/navigation";import{jsx as a,jsxs as _e}from"react/jsx-runtime";function Ze({title:et="",initialTasks:h=[],initialEpics:D=[],initialSprints:S=[],initialProjects:E=[],initialReminders:v=[],initialColleagues:A=[],initialUsers:w=[],initialFiles:P=[],initialView:C="kanban",onAddTask:ie,onUpdateTask:ne,onDeleteTask:se,onTaskClick:tt,onAddEpic:ae,onUpdateEpic:oe,onDeleteEpic:de,onAddTaskToEpic:it,onAddSprint:re,onUpdateSprint:le,onDeleteSprint:ce,onAddProject:pe,onUpdateProject:ge,onDeleteProject:me,onFileAdd:ke,onFileEdit:Te,onFileDelete:ue,onFileClick:fe,onAddReminder:he,onUpdateReminder:De,onDeleteReminder:Se,onViewChange:Ee,onToggleMobileMenu:ve,onTeamClick:nt,onTeamChange:st,onCopilotClick:at}){let[p,d]=s(h),[r,g]=s(D),[c,m]=s(S),[F,k]=s(E),[Ae,T]=s(v),[U,we]=s(A),[M,Pe]=s(w),[Ce,O]=s(P),[Ue,R]=s(!1),[be,V]=s(!1),[ye,j]=s(null),[Fe,I]=s(null),[B,N]=s(null),[l,x]=s(C||"kanban"),[Me,Oe]=s(!1),G=Ye();o(()=>{d(h)},[h]),o(()=>{m(S)},[S]),o(()=>{g(D)},[D]),o(()=>{k(E)},[E]),o(()=>{O(P)},[P]),o(()=>{Pe(w)},[w]),o(()=>{we(A)},[A]),o(()=>{T(v)},[v]),o(()=>{x(C)},[C]);let Re=r.filter(e=>e.isSelected).map(e=>e.id),u=c.find(e=>e.isSelected),Ve=p.filter(e=>{let t=Re.includes(e.epicId);return!u||u.id==="all-tasks"?t:u.id==="backlog"?t&&!e.sprintId:t&&e.sprintId===u.id}),ot=e=>Ve.filter(t=>t.status===e),dt=e=>{let t={};return r.forEach(i=>{t[i.id]=e.filter(n=>n.epicId===i.id)}),t},rt=e=>{N(e)},lt=e=>{B&&(d(t=>t.map(i=>i.id===B.id?{...i,status:e}:i)),N(null))},H=e=>{let t={...e,id:Date.now().toString(),createdAt:new Date};d(i=>[...i,t]),ie?.(t)},f=(e,t)=>{d(i=>i.map(n=>n.id===e?{...n,...t}:n)),ne?.(e,t)},ct=async(e,t)=>{f(e,t)},K=e=>{d(t=>t.filter(i=>i.id!==e)),ye?.id===e&&j(null),se?.(e)},pt=async e=>{K(e)},je=e=>{let t={...e,id:Date.now().toString(),isSelected:!1};k(i=>[...i,t]),pe?.(e)},Ie=(e,t)=>{k(i=>i.map(n=>n.id===e?t.isSelected?(G.push(`/project/${e}`),{...n,...t}):{...n,...t}:t.isSelected&&e!==n.id?{...n,isSelected:!1}:n)),ge?.(e,t)},Be=e=>{k(t=>t.filter(i=>i.id!==e)),me?.(e)},W=e=>{let t={...e,id:Date.now().toString(),isSelected:!0};g(i=>[...i,t]),ae?.({...t})},$=()=>{V(!0)},q=(e,t)=>{g(i=>i.map(n=>n.id===e?{...n,...t}:n)),oe?.(e,t)},z=e=>{g(t=>t.filter(i=>i.id!==e)),d(t=>t.filter(i=>i.epicId!==e)),de?.(e)},J=e=>{let t={...e,id:Date.now().toString(),isSelected:!1};m(i=>[...i,t]),re?.(e)},Ne=(e,t)=>{m(i=>i.map(n=>n.id===e?t.isSelected?{...n,...t}:{...n,...t}:t.isSelected&&e!==n.id?{...n,isSelected:!1}:n)),le?.(e,t)},xe=e=>{e==="backlog"||e==="all-tasks"||(m(t=>t.filter(i=>i.id!==e)),d(t=>t.map(i=>i.sprintId===e?{...i,sprintId:void 0}:i)),ce?.(e))},b=e=>{j(e)},Ge=e=>{e==="planning"&&window.innerWidth<768||(x(e),Ee?.(e))},He=()=>{Oe(e=>!e),ve?.()},gt=()=>{G.push("/")},mt=e=>{console.log("Switching to team:",e)},kt=e=>{console.log("Switching to team:",e)},Ke=e=>{I(e),R(!0)},We=()=>{R(!1),I(null)},$e=e=>{let t={...e,id:Date.now().toString(),createdAt:new Date};T(i=>[...i,t]),he?.(e)},qe=(e,t)=>{T(i=>i.map(n=>n.id===e?{...n,...t}:n)),De?.(e,t)},ze=e=>{T(t=>t.filter(i=>i.id!==e)),Se?.(e)},Je=()=>{ke?.()},Le=e=>{Te?.(e)},Qe=e=>{O(t=>t.filter(i=>i.name!==e)),ue?.(e)},Xe=e=>{fe?.(e)},Tt=[{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"}],ut=()=>{switch(l){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},y=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],ft=y.sort((e,t)=>t.lastUsed.getTime()-e.lastUsed.getTime()).slice(0,3),ht=y.length>3,Dt=y.slice(3);return _e(L,{projects:F,epics:r,sprints:c,currentView:l,onUpdateProject:Ie,onDeleteProject:Be,onAddProject:je,onUpdateEpic:q,onDeleteEpic:z,onAddEpic:$,onAddSprint:J,onUpdateSprint:Ne,onDeleteSprint:xe,onViewChange:Ge,mobileMenuOpen:Me,onToggleMobileMenu:He,children:[l==="kanban"&&a("div",{className:"h-full",children:a(Z,{initialProjects:F,initialEpics:r,initialSprints:c,initialTasks:p,initialColleagues:U,initialUsers:M,onAddTask:H,onUpdateTask:f,onDeleteTask:K,onTaskClick:b,onAddEpic:W})}),l==="planning"&&a("div",{className:"hidden md:block h-full",children:a(ee,{tasks:p,epics:r,sprints:c,onUpdateTask:f,onTaskClick:b,onAddSprint:J})}),l==="tasks"&&a("div",{className:"h-full",children:a(te,{initialReminders:Ae,initialColleagues:U,onAddReminder:$e,onUpdateReminder:qe,onDeleteReminder:ze})}),l==="files"&&a("div",{className:"h-full",children:a(Q,{initialFiles:Ce,onFileAdd:Je,onFileEdit:Le,onFileDelete:Qe,onFileClick:Xe,compactView:!1})}),l==="epics"&&a("div",{className:"h-full",children:a(_,{tasks:p,epics:r,sprints:c,onUpdateTask:f,onTaskClick:b,onAddTaskToEpic:Ke,onAddEpic:$,onUpdateEpic:q,onDeleteEpic:z})}),a(X,{isOpen:Ue,onClose:We,onAddTask:H,epics:r,sprints:c,assignees:[...U,...M],defaultEpicId:Fe||void 0}),a(Y,{isOpen:be,onClose:()=>V(!1),onAddEpic:W})]})}export{Ze as a};
|