cortex-react-components 2.13.7 → 2.13.9
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-6FHRZHAJ.mjs → chunk-2HWSTGAP.mjs} +1 -1
- package/dist/{chunk-XX4GSGRP.mjs → chunk-5NIEZE7A.mjs} +1 -1
- package/dist/chunk-7O5XSUX2.mjs +1 -0
- package/dist/{chunk-M527EJIX.mjs → chunk-AMVJPDM3.mjs} +1 -1
- package/dist/{chunk-KBEXWUKI.mjs → chunk-AQQCH7Z2.mjs} +1 -1
- package/dist/chunk-CJDUN6R4.mjs +4 -0
- package/dist/{chunk-LAQ3QAUW.mjs → chunk-CLGBBNRB.mjs} +1 -1
- package/dist/{chunk-MAZGVZJN.mjs → chunk-DMCFEJ2C.mjs} +1 -1
- package/dist/{chunk-3E3GY7S2.mjs → chunk-FDRX3CL2.mjs} +1 -1
- package/dist/chunk-G34OMFQI.mjs +4 -0
- package/dist/{chunk-4VCL66F7.mjs → chunk-GLBQHEMQ.mjs} +1 -1
- package/dist/chunk-GS3P2V76.mjs +4 -0
- package/dist/{chunk-LITM3HU3.mjs → chunk-JGX2G2OC.mjs} +1 -1
- package/dist/{chunk-O24GFE6Q.mjs → chunk-KZAYLEFB.mjs} +1 -1
- package/dist/{chunk-5FWH5YVM.mjs → chunk-LHO4WFYP.mjs} +1 -1
- package/dist/{chunk-BDDEMCAH.mjs → chunk-MFCVMJBO.mjs} +1 -1
- package/dist/{chunk-LGBD6KGN.mjs → chunk-MIOYUP5Z.mjs} +1 -1
- package/dist/{chunk-KVLUT4U2.mjs → chunk-OQCMTGML.mjs} +1 -1
- package/dist/{chunk-MX3JKY3V.mjs → chunk-P7S6XFU4.mjs} +1 -1
- package/dist/chunk-R5SXUWYU.mjs +4 -0
- package/dist/{chunk-EUGA4BNN.mjs → chunk-TO7SVJIU.mjs} +1 -1
- package/dist/{chunk-ZGQC6O62.mjs → chunk-UEBQJNVT.mjs} +1 -1
- package/dist/{chunk-ZQG4SJ2M.mjs → chunk-ULO56RLR.mjs} +1 -1
- package/dist/{chunk-L3BLBPSR.mjs → chunk-WUA65ZZB.mjs} +1 -1
- package/dist/chunk-Y7H3EUBR.mjs +4 -0
- package/dist/{chunk-O5P35LEY.mjs → chunk-ZFUP5NVF.mjs} +1 -1
- package/dist/components/AdvancedComponents/user-selection.d.ts +1 -1
- package/dist/components/AdvancedComponents/user-selection.js +1 -1
- package/dist/components/AdvancedComponents/user-selection.mjs +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/CRM/CogeBoard.mjs +1 -1
- package/dist/components/CRM/KanbanBoard.mjs +1 -1
- package/dist/components/CRM/index.mjs +1 -1
- package/dist/components/Chat/ChatInterface.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/DeliveryLead/DeliveryLeadSubmissionWithList.mjs +1 -1
- package/dist/components/DeliveryLead/index.mjs +1 -1
- package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/ColleaguesView.d.ts +1 -1
- package/dist/components/DigitalColleagues/Views/ColleaguesView.js +1 -1
- package/dist/components/DigitalColleagues/Views/ColleaguesView.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/colleague-form.d.ts +1 -1
- package/dist/components/DigitalColleagues/colleague-form.js +1 -1
- package/dist/components/DigitalColleagues/digital-colleague-clone.d.ts +1 -1
- package/dist/components/DigitalColleagues/digital-colleague-clone.js +1 -2
- package/dist/components/DigitalColleagues/digital-colleague-clone.mjs +1 -1
- package/dist/components/DigitalColleagues/index.js +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
- package/dist/components/Foundary/MainPage.mjs +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.d.ts +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.js +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
- package/dist/components/Foundary/Views/ColleaguesView.d.ts +1 -1
- package/dist/components/Foundary/Views/ColleaguesView.js +1 -1
- package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
- package/dist/components/Foundary/Views/index.js +1 -1
- package/dist/components/Foundary/Views/index.mjs +1 -1
- package/dist/components/Foundary/index.js +1 -1
- package/dist/components/Foundary/index.mjs +1 -1
- package/dist/components/HeaderFooter/Header.mjs +1 -1
- package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/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/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Menus/SidebarLeft.mjs +1 -1
- package/dist/components/Menus/SidebarRight.mjs +1 -1
- package/dist/components/Menus/index.mjs +1 -1
- package/dist/components/Other/index.mjs +1 -1
- package/dist/components/Projects/KanbanBoardView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.js +1 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.js +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
- package/dist/components/Projects/TasksView.js +1 -1
- package/dist/components/Projects/TasksView.mjs +1 -1
- package/dist/components/Projects/index.js +1 -1
- package/dist/components/Projects/index.mjs +1 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/index.js +15 -15
- package/dist/components/index.mjs +1 -1
- package/dist/components/ui/index.mjs +1 -1
- package/dist/components/ui/sidebar.mjs +1 -1
- package/dist/index.js +19 -19
- 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/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.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-5N4WW7O2.mjs +0 -1
- package/dist/chunk-DODFVGFK.mjs +0 -4
- package/dist/chunk-RVGPGXLB.mjs +0 -4
- package/dist/chunk-USOGZB6R.mjs +0 -4
- package/dist/chunk-XADBBCGL.mjs +0 -4
- package/dist/chunk-ZB7RDJRP.mjs +0 -4
package/dist/chunk-RVGPGXLB.mjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
import{a as O}from"./chunk-K5MJYNCD.mjs";import{a as X}from"./chunk-FSCDCSVK.mjs";import{a as Y}from"./chunk-NDZ26EG6.mjs";import{a as Z}from"./chunk-M2REXGQW.mjs";import{a as w}from"./chunk-ATBKMJU6.mjs";import{a as Q}from"./chunk-Z22NSJMF.mjs";import{a as R}from"./chunk-FGEFYI5E.mjs";import{a as U,c as $,d as k,g as F,i as u}from"./chunk-YFAZQYK4.mjs";import{a as J}from"./chunk-L5JPAKPM.mjs";import{b as H}from"./chunk-ZUA4KNIR.mjs";import{a as g,b as h,c as x,e as c}from"./chunk-YO3GQYRJ.mjs";import{useEffect as me,useState as o}from"react";import{Plus as ge,Search as ce,Users as _,Bot as ue,User as pe,Filter as Ce}from"lucide-react";import{motion as fe,AnimatePresence as ve}from"motion/react";import{jsx as l,jsxs as t}from"react/jsx-runtime";function ye({initialColleagues:N,onColleagueAdd:S,onColleagueEdit:I,onColleagueDelete:ee,compactView:n=!1,departments:le=["Design","Engineering","Marketing","Product","Sales","Operations"],className:te,availableUsers:L=[],existingDigitalColleagues:P=[]}){let[p,s]=o(N||[]),[r,j]=o(""),[D,B]=o("all"),[b,K]=o("all"),[v,ae]=o("all"),[M,C]=o(null),[A,y]=o(null);me(()=>{s(N||[])},[N]);let he=Array.isArray(L)?L:[],ie=Array.isArray(P)?P:[],[d,a]=o("main"),f=p.filter(e=>!e||!e.name?!1:e.name.toLowerCase().includes(r.toLowerCase())||e.type==="human"&&e.email?.toLowerCase().includes(r.toLowerCase())||e.type==="digital"&&e.jobDescription?.toLowerCase().includes(r.toLowerCase())),G=f.filter(e=>e.type==="human"),W=f.filter(e=>e.type==="digital"),q=()=>{a("typeSelection")},T=e=>{e.type==="digital"&&(C(e),a("form")),console.log("Editing colleague:",e),I?.(e)},E=e=>{e.type==="digital"&&(y(e),a("view"))},xe=e=>{let i={id:`human-${Date.now()}`,type:"human",name:e.name,email:e.email,updatedAt:e.updatedAt,createdAt:e.createdAt,accounts:e.accounts};s(m=>[...m,i]),S?.(i),a("main")},oe=e=>{if(!e||!e.id){console.error("Invalid cloned colleague provided to handleDigitalColleagueClone:",e);return}s(i=>[...i,{...e,type:"digital"}]),S?.({...e,type:"digital"}),a("main")},ne=()=>{C(null),a("form")},z=e=>{if(!e||!e.id){console.error("Invalid colleague provided to handleSaveColleague:",e);return}M?(s(i=>i.map(m=>m.id===e.id?{...e,type:"digital"}:m)),I?.({...e,type:"digital"})):(s(i=>[...i,{...e,type:"digital"}]),S?.({...e,type:"digital"})),a("main"),C(null)},se=()=>{a("main"),C(null),y(null)},re=()=>{a("main"),y(null)},we=()=>{A&&(C(A),y(null),a("form"))},V=e=>{ee?.(e,p.find(i=>i.id===e).type),s(i=>i.filter(m=>m.id!==e))},de=()=>{j(""),B("all"),K("all")};return d==="typeSelection"?l(X,{onSelectHuman:()=>a("userSelection"),onSelectDigital:()=>a("digitalOptions"),onCancel:()=>a("main")}):d==="userSelection"?l("h1",{children:"User selection"}):d==="digitalOptions"?l(Z,{onCloneExisting:()=>a("digitalClone"),onCreateNew:ne,onCancel:()=>a("typeSelection")}):d==="digitalClone"?l(Y,{digitalColleagues:ie,onColleagueClone:oe,onCancel:()=>a("digitalOptions")}):d==="form"?l(O,{colleague:M||void 0,onSave:z,onCancel:se}):d==="view"?l(O,{colleague:A||void 0,onSave:z,onCancel:re,readOnly:!0}):l("div",{className:"px-2 md:px-4 py-4 space-y-8",children:l(ve,{mode:"wait",children:l(fe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:t("div",{className:`space-y-6 ${te||""}`,children:[l(Q,{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:q}}),t("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t(g,{children:[t(h,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l(x,{className:"text-sm font-medium",children:"Total Colleagues"}),l(_,{className:"h-4 w-4 text-muted-foreground"})]}),t(c,{children:[l("div",{className:"text-2xl font-bold",children:p.length}),l("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]}),t(g,{children:[t(h,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l(x,{className:"text-sm font-medium",children:"Human Members"}),l(pe,{className:"h-4 w-4 text-muted-foreground"})]}),t(c,{children:[l("div",{className:"text-2xl font-bold",children:p.filter(e=>e.type==="human").length}),l("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]}),t(g,{children:[t(h,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l(x,{className:"text-sm font-medium",children:"Digital Colleagues"}),l(ue,{className:"h-4 w-4 text-muted-foreground"})]}),t(c,{children:[l("div",{className:"text-2xl font-bold",children:p.filter(e=>e.type==="digital").length}),l("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]})]}),l(g,{children:l(c,{className:"pt-6",children:t("div",{className:"flex flex-col md:flex-row gap-4",children:[l("div",{className:"flex-1",children:t("div",{className:"relative",children:[l(ce,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),l(J,{placeholder:"Search colleagues...",value:r,onChange:e=>j(e.target.value),className:"pl-9"})]})}),t(U,{value:D,onValueChange:B,children:[l(k,{className:"w-full md:w-[180px]",children:l($,{placeholder:"Department"})}),t(F,{children:[l(u,{value:"all",children:"All Departments"}),le.map(e=>l(u,{value:e,children:e},e))]})]}),t(U,{value:b,onValueChange:K,children:[l(k,{className:"w-full md:w-[140px]",children:l($,{placeholder:"Status"})}),t(F,{children:[l(u,{value:"all",children:"All Status"}),l(u,{value:"active",children:"Active"}),l(u,{value:"inactive",children:"Inactive"})]})]}),(r||D!=="all"||b!=="all")&&t(H,{variant:"outline",onClick:de,className:"gap-2",children:[l(Ce,{className:"h-4 w-4"}),"Clear"]})]})})}),t("div",{className:"space-y-4",children:[l(R,{activeTab:v,onTabChange:ae,tabOptions:[{value:"all",label:`All (${f.length})`},{value:"human",label:`Human (${G.length})`},{value:"digital",label:`Digital (${W.length})`}],maxWidth:"400px",gridCols:3}),v==="all"&&l("div",{className:`grid gap-4 ${n?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:f.map(e=>l(w,{colleague:e,onEdit:T,onDelete:V,onViewDetails:E,compact:n},`${e}-${e.id}`))}),v==="human"&&l("div",{className:`grid gap-4 ${n?"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=>l(w,{colleague:e,onEdit:T,onDelete:V,onViewDetails:E,compact:n},e.id))}),v==="digital"&&l("div",{className:`grid gap-4 ${n?"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=>l(w,{colleague:e,onEdit:T,onDelete:V,onViewDetails:E,compact:n},e.id))})]}),f.length===0&&l(g,{children:l(c,{className:"pt-6",children:t("div",{className:"text-center py-8",children:[l(_,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),l("h3",{className:"text-lg font-semibold mb-2",children:"No colleagues found"}),l("p",{className:"text-muted-foreground mb-4",children:r||D!=="all"||b!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),t(H,{onClick:q,className:"gap-2",children:[l(ge,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}export{ye as a};
|
package/dist/chunk-USOGZB6R.mjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
import{a as c}from"./chunk-L5JPAKPM.mjs";import{b as p}from"./chunk-ZUA4KNIR.mjs";import{a as f,b as g,c as x}from"./chunk-SOLZ4VQH.mjs";import{b as r}from"./chunk-CSBGSBEU.mjs";import{a as o,b as v,c as N,e as i}from"./chunk-YO3GQYRJ.mjs";import{useState as U,useMemo as b}from"react";import{Search as L,User as u,Check as T,ChevronLeft as A}from"lucide-react";import{motion as h,AnimatePresence as B}from"motion/react";import{jsx as e,jsxs as t}from"react/jsx-runtime";function $({users:m,onUserSelect:C,onCancel:y,selectedUserId:d}){let[s,w]=U(""),n=b(()=>m.filter(a=>a.name.toLowerCase().includes(s.toLowerCase())||a.email.toLowerCase().includes(s.toLowerCase())||a.role.toLowerCase().includes(s.toLowerCase())||(a.skills||[]).some(S=>S.toLowerCase().includes(s.toLowerCase()))),[m,s]),k=a=>{C(a)};return e("div",{className:"px-2 md:px-4 py-4 space-y-6",children:e(B,{mode:"wait",children:t(h.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[t("div",{className:"flex items-center gap-4 mb-6",children:[t(p,{variant:"ghost",onClick:y,className:"gap-2",children:[e(A,{className:"h-4 w-4"}),"Back"]}),t("div",{children:[e("h1",{className:"text-3xl font-bold",children:"Select User"}),e("p",{className:"text-muted-foreground",children:"Choose a user to add as a colleague"})]})]}),e(o,{className:"container",children:e(i,{className:"pt-6",children:e("div",{className:"flex flex-col md:flex-row gap-4",children:e("div",{className:"flex-1",children:t("div",{className:"relative",children:[e(L,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e(c,{placeholder:"Search users by name, email, role, or skills...",value:s,onChange:a=>w(a.target.value),className:"pl-9"})]})})})})}),e("div",{className:"container grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:n.map(a=>e(h.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:t(o,{className:`cursor-pointer transition-all hover:shadow-lg ${d===a.id?"ring-2 ring-primary":""}`,onClick:()=>k(a),children:[e(v,{className:"pb-3",children:t("div",{className:"flex items-start justify-between",children:[t("div",{className:"flex items-center gap-3",children:[t(f,{children:[e(g,{src:a.avatar,alt:a.name}),e(x,{children:e(u,{className:"h-4 w-4"})})]}),t("div",{children:[e(N,{className:"text-lg",children:a.name}),e("p",{className:"text-sm text-muted-foreground",children:a.role})]})]}),d===a.id&&e(T,{className:"h-5 w-5 text-primary"})]})}),e(i,{className:"pt-0",children:t("div",{className:"space-y-3",children:[t("div",{children:[e("p",{className:"text-sm text-muted-foreground",children:"Email"}),e("p",{className:"text-sm font-medium",children:a.email})]}),t("div",{children:[e("p",{className:"text-sm text-muted-foreground",children:"Department"}),e(r,{variant:"secondary",children:a.department})]}),a.location&&t("div",{children:[e("p",{className:"text-sm text-muted-foreground",children:"Location"}),e("p",{className:"text-sm",children:a.location})]}),a.skills&&a.skills.length>0&&t("div",{children:[e("p",{className:"text-sm text-muted-foreground mb-2",children:"Skills"}),t("div",{className:"flex flex-wrap gap-1",children:[a.skills.slice(0,3).map(l=>e(r,{variant:"outline",className:"text-xs",children:l},l)),a.skills.length>3&&t(r,{variant:"outline",className:"text-xs",children:["+",a.skills.length-3]})]})]})]})})]})},a.id))}),n.length===0&&e(o,{className:"container mt-4",children:e(i,{className:"pt-6",children:t("div",{className:"text-center py-8",children:[e(u,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),e("h3",{className:"text-lg font-semibold mb-2",children:"No users found"}),e("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"user-selection")})})}export{$ as a};
|
package/dist/chunk-XADBBCGL.mjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
import{a as v}from"./chunk-L5JPAKPM.mjs";import{b as d}from"./chunk-ZUA4KNIR.mjs";import{a as C,c as x}from"./chunk-SOLZ4VQH.mjs";import{b as l}from"./chunk-CSBGSBEU.mjs";import{a as n,b as u,c as g,e as r}from"./chunk-YO3GQYRJ.mjs";import{useState as f,useMemo as I}from"react";import{Search as L,Bot as N,ChevronLeft as j,Copy as T,Calendar as F,Users as P}from"lucide-react";import{motion as h,AnimatePresence as U}from"motion/react";import{jsx as t,jsxs as a}from"react/jsx-runtime";function Q({digitalColleagues:m,onColleagueClone:b,onCancel:w,selectedColleagueId:y}){let[i,D]=f(""),[o,k]=f("all"),c=I(()=>m.filter(e=>{let s=e.name.toLowerCase().includes(i.toLowerCase())||e.jobDescription.toLowerCase().includes(i.toLowerCase())||e.capabilities.some(B=>B.toLowerCase().includes(i.toLowerCase()))||e.workInstructions.toLowerCase().includes(i.toLowerCase()),S=o==="all"||e.status===o;return s&&S}),[m,i,o]),p=e=>{let s={...e,id:`${e.id}-clone-${Date.now()}`,name:`${e.name} (Copy)`,joinedDate:new Date,lastActive:new Date,lastUpdated:new Date,version:"1.0.0"};b(s)},A=e=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(e);return t("div",{className:"px-2 md:px-4 py-4 space-y-6",children:t(U,{mode:"wait",children:a(h.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[a("div",{className:"flex items-center gap-4 mb-6",children:[a(d,{variant:"ghost",onClick:w,className:"gap-2",children:[t(j,{className:"h-4 w-4"}),"Back"]}),a("div",{children:[t("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),t("p",{className:"text-muted-foreground",children:"Select a digital colleague to clone"})]})]}),t(n,{children:t(r,{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(L,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),t(v,{placeholder:"Search by name, job description, or capabilities...",value:i,onChange:e=>D(e.target.value),className:"pl-9"})]})}),a("select",{value:o,onChange:e=>k(e.target.value),className:"h-10 px-3 rounded-md border border-input bg-background text-sm ring-offset-background",children:[t("option",{value:"all",children:"All Status"}),t("option",{value:"active",children:"Active"}),t("option",{value:"inactive",children:"Inactive"})]})]})})}),t("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:c.map(e=>t(h.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:a(n,{className:`cursor-pointer transition-all hover:shadow-lg ${y===e.id?"ring-2 ring-primary":""}`,onClick:()=>p(e),children:[t(u,{className:"pb-3",children:a("div",{className:"flex items-start justify-between",children:[a("div",{className:"flex items-center gap-3",children:[t(C,{children:t(x,{className:"bg-blue-100",children:t(N,{className:"h-4 w-4 text-blue-600"})})}),a("div",{children:[a(g,{className:"text-lg flex items-center gap-2",children:[e.name,t(l,{variant:e.status==="active"?"default":"secondary",className:"text-xs",children:e.status})]}),a("p",{className:"text-sm text-muted-foreground",children:["v",e.version]})]})]}),a(d,{size:"sm",variant:"outline",className:"gap-2 h-8",onClick:s=>{s.stopPropagation(),p(e)},children:[t(T,{className:"h-3 w-3"}),"Clone"]})]})}),t(r,{className:"pt-0",children:a("div",{className:"space-y-3",children:[a("div",{children:[t("p",{className:"text-sm text-muted-foreground",children:"Job Description"}),t("p",{className:"text-sm line-clamp-2",children:e.jobDescription})]}),e.capabilities&&e.capabilities.length>0&&a("div",{children:[t("p",{className:"text-sm text-muted-foreground mb-2",children:"Capabilities"}),a("div",{className:"flex flex-wrap gap-1",children:[e.capabilities.slice(0,3).map(s=>t(l,{variant:"outline",className:"text-xs",children:s},s)),e.capabilities.length>3&&a(l,{variant:"outline",className:"text-xs",children:["+",e.capabilities.length-3]})]})]}),a("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[a("div",{className:"flex items-center gap-1",children:[t(F,{className:"h-3 w-3"}),a("span",{children:["Updated ",A(e.lastUpdated)]})]}),e.knowledge&&a("div",{className:"flex items-center gap-1",children:[t(P,{className:"h-3 w-3"}),a("span",{children:[e.knowledge.length," docs"]})]})]}),e.workInstructions&&a("div",{children:[t("p",{className:"text-sm text-muted-foreground",children:"Instructions"}),t("p",{className:"text-xs line-clamp-2",children:e.workInstructions})]})]})})]})},e.id))}),c.length===0&&t(n,{children:t(r,{className:"pt-6",children:a("div",{className:"text-center py-8",children:[t(N,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),t("h3",{className:"text-lg font-semibold mb-2",children:"No digital colleagues found"}),t("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}export{Q as a};
|
package/dist/chunk-ZB7RDJRP.mjs
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
import{a as le}from"./chunk-CO6AQNZ5.mjs";import{a as N}from"./chunk-AOQPH32M.mjs";import{a as I}from"./chunk-47OE4ZPY.mjs";import{a as ee}from"./chunk-6XUIHSKG.mjs";import{a as te}from"./chunk-XADBBCGL.mjs";import{a as _}from"./chunk-USOGZB6R.mjs";import{a as Y}from"./chunk-Z22NSJMF.mjs";import{a as Z}from"./chunk-FGEFYI5E.mjs";import{a as H,c as U,d as $,g as F,i as p}from"./chunk-YFAZQYK4.mjs";import{a as X}from"./chunk-L5JPAKPM.mjs";import{b as V}from"./chunk-ZUA4KNIR.mjs";import{a as g,b as x,c as D,e as u}from"./chunk-YO3GQYRJ.mjs";import{useEffect as ve,useState as s}from"react";import{Plus as ye,Search as he,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"),[h,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"),y=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=y.filter(e=>e.type==="human"),W=y.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=>{ie?.(e,n.find(o=>o.id===e).type),m(o=>o.filter(l=>l.id!==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(ee,{onSelectHuman:()=>i("userSelection"),onSelectDigital:()=>i("digitalOptions"),onCancel:()=>i("main")}):c==="userSelection"?t(_,{users:re,onUserSelect:de,onCancel:()=>i("typeSelection")}):c==="digitalOptions"?t(le,{onCloneExisting:()=>i("digitalClone"),onCreateNew:ce,onCancel:()=>i("typeSelection")}):c==="digitalClone"?t(te,{digitalColleagues:z,onColleagueClone:me,onCancel:()=>i("digitalOptions")}):c==="form"?t(I,{colleague:q||void 0,onSave:Q,onCancel:ge,availableKnowledgeDocuments:R()}):c==="view"?t(I,{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(g,{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(u,{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(g,{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(u,{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(g,{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(u,{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(g,{children:t(u,{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(he,{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($,{className:"w-full md:w-[180px]",children:t(U,{placeholder:"Department"})}),a(F,{children:[t(p,{value:"all",children:"All Departments"}),oe.map(e=>t(p,{value:e,children:e},e))]})]}),a(H,{value:f,onValueChange:M,children:[t($,{className:"w-full md:w-[140px]",children:t(U,{placeholder:"Status"})}),a(F,{children:[t(p,{value:"all",children:"All Status"}),t(p,{value:"active",children:"Active"}),t(p,{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:h,onTabChange:se,tabOptions:[{value:"all",label:`All (${y.length})`},{value:"human",label:`Human (${G.length})`},{value:"digital",label:`Digital (${W.length})`}],maxWidth:"400px",gridCols:3}),h==="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:y.map(e=>t(N,{colleague:e,onEdit:T,onDelete:E,onViewDetails:k,compact:d},`${e}-${e.id}`))}),h==="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))}),h==="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))})]}),y.length===0&&t(g,{children:t(u,{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(ye,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}export{be as a};
|