PageSourceSearch

https://daedarch.ai/assets/IdeationPipelinePage-BDkp9bPz.js

js daedarch.ai collected 2026-10-05 15:00:12 UTC 9,079 bytes, 1 lines download raw bytes

1import{w as D,k as A,F as T,x as E,y as R,j as e,B as d,V as g,z as b,h as m,D as f,H as w,I as y,T as o,E as P,r as x,e as C,C as B,i as S,L as z,G as O,J as Q,K as q,M as G,n as H,S as N,N as v,O as M,P as V,Q as K,R as $,v as F}from"./index-DVKVOqko.js";import{P as U}from"./progress-2yv7c3nu.js";import"./progress.utils-DXvvqn2-.js";const Y={submitted:{label:"Submitted",color:"gray",icon:R},analyzing:{label:"Analyzing",color:"blue",icon:E},evaluated:{label:"Evaluated",color:"green",icon:T},building:{label:"Building",color:"purple",icon:A},archived:{label:"Archived",color:"gray",icon:D}},J={technology:"cyan",finance:"green",healthcare:"red",education:"orange",energy:"yellow",governance:"blue","real-estate":"purple",other:"gray"},I=({idea:r,onClick:n})=>{const l=Y[r.status],h=J[r.domain.toLowerCase()]||"gray",i=c=>{const t=new Date(c),a=Math.floor((new Date().getTime()-t.getTime())/(1e3*60*60*24));return a===0?"Today":a===1?"Yesterday":a<7?`${a} days ago`:t.toLocaleDateString()};return e.jsx(d,{bg:"white",_dark:{bg:"gray.800",borderColor:"gray.700"},borderRadius:"lg",borderWidth:"1px",borderColor:"gray.200",p:5,cursor:n?"pointer":"default",onClick:n,transition:"all 0.2s",_hover:n?{borderColor:"blue.400",transform:"translateY(-2px)",boxShadow:"md"}:void 0,children:e.jsxs(g,{align:"stretch",spacing:4,children:[e.jsxs(b,{justify:"space-between",align:"start",children:[e.jsxs(g,{align:"start",spacing:1,flex:1,children:[e.jsxs(m,{spacing:2,children:[e.jsx(f,{colorScheme:h,fontSize:"xs",children:r.domain}),r.is_own&&e.jsx(f,{colorScheme:"blue",variant:"outline",fontSize:"xs",children:"Your Idea"})]}),e.jsx(w,{size:"sm",color:"gray.800",_dark:{color:"white"},noOfLines:2,children:r.title})]}),e.jsxs(f,{colorScheme:l.color,display:"flex",alignItems:"center",gap:1,py:1,px:2,children:[e.jsx(y,{as:l.icon,boxSize:3}),l.label]})]}),r.summary&&e.jsx(o,{fontSize:"sm",color:"gray.600",_dark:{color:"gray.400"},noOfLines:2,children:r.summary}),r.status==="evaluated"&&r.evaluation_score!==void 0&&e.jsxs(d,{children:[e.jsxs(b,{justify:"space-between",mb:1,children:[e.jsx(o,{fontSize:"xs",color:"gray.500",children:"Overall Score"}),e.jsxs(o,{fontSize:"xs",fontWeight:"medium",color:"gray.700",_dark:{color:"gray.300"},children:[r.evaluation_score,"/100"]})]}),e.jsx(U,{value:r.evaluation_score,size:"sm",colorScheme:r.evaluation_score>=70?"green":r.evaluation_score>=40?"yellow":"red",borderRadius:"full"}),(r.feasibility_score!==void 0||r.impact_score!==void 0)&&e.jsxs(m,{mt:2,spacing:4,children:[r.feasibility_score!==void 0&&e.jsxs(g,{spacing:0,align:"start",children:[e.jsx(o,{fontSize:"xs",color:"gray.500",children:"Feasibility"}),e.jsxs(o,{fontSize:"sm",fontWeight:"medium",children:[r.feasibility_score,"%"]})]}),r.impact_score!==void 0&&e.jsxs(g,{spacing:0,align:"start",children:[e.jsx(o,{fontSize:"xs",color:"gray.500",children:"Impact"}),e.jsxs(o,{fontSize:"sm",fontWeight:"medium",children:[r.impact_score,"%"]})]})]})]}),e.jsxs(b,{justify:"space-between",align:"center",pt:2,borderTopWidth:"1px",borderColor:"gray.100",_dark:{borderColor:"gray.700"},children:[e.jsxs(o,{fontSize:"xs",color:"gray.500",children:["Submitted ",i(r.submitted_at)]}),e.jsxs(o,{fontSize:"xs",color:"gray.400",children:["#",r.id.slice(0,8)]})]})]})})},L=[{status:"submitted",label:"Submitted",icon:R,color:"gray.400",description:"Awaiting initial review"},{status:"analyzing",label:"Analyzing",icon:E,color:"blue.400",description:"Under evaluation by our team"},{status:"evaluated",label:"Evaluated",icon:T,color:"green.400",description:"Assessment complete"},{status:"building",label:"Building",icon:A,color:"purple.400",description:"In active development"}],Z=({ideas:r,onIdeaClick:n,viewMode:l="kanban"})=>{const h=L.reduce((i,c)=>(i[c.status]=r.filter(t=>t.status===c.status),i),{});return l==="list"?e.jsxs(g,{spacing:4,align:"stretch",children:[r.map(i=>e.jsx(I,{idea:i,onClick:()=>n?.(i)},i.id)),r.length===0&&e.jsx(d,{textAlign:"center",py:12,color:"gray.500",children:e.jsx(o,{children:"No ideas in the pipeline yet."})})]}):e.jsx(P,{columns:{base:1,md:2,lg:4},spacing:6,children:L.map(i=>{const c=h[i.status]||[];return e.jsxs(d,{children:[e.jsxs(m,{spacing:2,mb:4,pb:2,borderBottomWidth:"2px",borderColor:i.color,children:[e.jsx(y,{as:i.icon,color:i.color}),e.jsx(w,{size:"sm",color:"gray.700",_dark:{color:"gray.200"},children:i.label}),e.jsx(d,{bg:"gray.100",_dark:{bg:"gray.700"},borderRadius:"full",px:2,py:.5,children:e.jsx(o,{fontSize:"xs",fontWeight:"medium",color:"gray.600",_dark:{color:"gray.300"},children:c.length})})]}),e.jsx(o,{fontSize:"xs",color:"gray.500",mb:4,children:i.description}),e.jsxs(g,{spacing:3,align:"stretch",children:[c.map(t=>e.jsx(I,{idea:t,onClick:()=>n?.(t)},t.id)),c.length===0&&e.jsx(d,{bg:"gray.50",_dark:{bg:"gray.800",borderColor:"gray.600"},borderRadius:"lg",borderWidth:"1px",borderStyle:"dashed",borderColor:"gray.300",p:6,textAlign:"center",children:e.jsx(o,{fontSize:"sm",color:"gray.400",children:"No ideas yet"})})]})]},i.status)})})};function X(r,n){const[l,h]=x.useState(r);return x.useEffect(()=>{const i=setTimeout(()=>{h(r)}
1,n);return()=>{clearTimeout(i)}},[r,n]),l}const ae=()=>{const[r,n]=x.useState("kanban"),[l,h]=x.useState(""),[i,c]=x.useState(""),t=X(l,250),u=C({queryKey:["ideation","domains"],queryFn:async()=>{const s=await F("/api/ideation/domains",{credentials:"include"});if(!s.ok)throw new Error(`Failed to load domains (HTTP ${s.status})`);const p=await s.json();return Array.isArray(p?.domains)?p.domains:[]},staleTime:5*6e4,retry:1}),a=C({queryKey:["ideation","pipeline",{q:t,domain:i}],queryFn:async()=>{const s=new URLSearchParams;t&&s.set("q",t),i&&s.set("domain",i);const p=`/api/ideation/pipeline?${s.toString()}`,j=await F(p,{credentials:"include"});if(!j.ok)throw new Error(`Failed to load pipeline (HTTP ${j.status})`);const _=await j.json();return Array.isArray(_?.ideas)?_.ideas:[]},staleTime:3e4,retry:1}),W=x.useCallback(s=>{console.log("Idea clicked:",s.id)},[]),k=a.data||[];return e.jsx(d,{minH:"100vh",bg:"gray.50",_dark:{bg:"gray.900"},py:10,children:e.jsxs(B,{maxW:"7xl",children:[e.jsxs(g,{spacing:4,align:"stretch",mb:8,children:[e.jsxs(b,{justify:"space-between",align:"center",wrap:"wrap",gap:4,children:[e.jsxs(g,{align:"start",spacing:1,children:[e.jsx(w,{size:"lg",color:"gray.800",_dark:{color:"white"},children:"Ideation Pipeline"}),e.jsx(o,{color:"gray.600",_dark:{color:"gray.400"},children:"Transparent evaluation of submitted ideas"})]}),e.jsx(S,{as:z,to:"/ideation",colorScheme:"orange",leftIcon:e.jsx(y,{as:O}),children:"Submit an Idea"})]}),e.jsxs(b,{direction:{base:"column",md:"row"},gap:4,align:{base:"stretch",md:"center"},bg:"white",_dark:{bg:"gray.800"},p:4,borderRadius:"lg",boxShadow:"sm",children:[e.jsxs(Q,{maxW:{base:"100%",md:"320px"},children:[e.jsx(q,{children:e.jsx(y,{as:G,color:"gray.400"})}),e.jsx(H,{placeholder:"Search ideas...",value:l,onChange:s=>h(s.target.value)})]}),e.jsxs(N,{placeholder:"All Domains",value:i,onChange:s=>c(s.target.value),maxW:{base:"100%",md:"200px"},isDisabled:u.isLoading||u.isError,children:[u.isLoading&&e.jsx("option",{value:"",children:"Loading domains..."}),u.isError&&e.jsx("option",{value:"",children:"Domains unavailable"}),!u.isLoading&&!u.isError&&u.data?.map(s=>e.jsx("option",{value:s,children:s},s))]}),e.jsxs(m,{ml:"auto",spacing:2,children:[e.jsx(v,{"aria-label":"Refresh",icon:e.jsx(M,{}),onClick:()=>a.refetch(),variant:"ghost",isLoading:a.isFetching}),e.jsxs(m,{bg:"gray.100",_dark:{bg:"gray.700"},borderRadius:"md",p:1,children:[e.jsx(v,{"aria-label":"Kanban view",icon:e.jsx(V,{}),size:"sm",variant:r==="kanban"?"solid":"ghost",colorScheme:r==="kanban"?"blue":"gray",onClick:()=>n("kanban")}),e.jsx(v,{"aria-label":"List view",icon:e.jsx(K,{}),size:"sm",variant:r==="list"?"solid":"ghost",colorScheme:r==="list"?"blue":"gray",onClick:()=>n("list")})]})]})]})]}),e.jsx(d,{bg:"blue.50",_dark:{bg:"blue.900"},borderRadius:"lg",p:4,mb:8,borderLeftWidth:"4px",borderColor:"blue.400",children:e.jsxs(o,{fontSize:"sm",color:"blue.800",_dark:{color:"blue.100"},children:[e.jsx(o,{as:"span",fontWeight:"bold",children:"Our Commitment:"})," ","Every idea receives objective evaluation. Scores reflect feasibility, market potential, and alignment with our capabilities. We don't pick favorites—we follow the evidence."]})}),a.isLoading&&e.jsx(g,{spacing:4,children:[1,2,3].map(s=>e.jsx($,{height:"120px",borderRadius:"lg"},s))}),a.isError&&!a.isLoading&&e.jsxs(d,{textAlign:"center",py:10,color:"gray.500",children:[e.jsx(o,{mb:4,children:a.error instanceof Error?a.error.message:"Failed to load pipeline"}),e.jsx(S,{onClick:()=>a.refetch(),colorScheme:"blue",variant:"outline",children:"Try Again"})]}),!a.isLoading&&!a.isError&&e.jsx(Z,{ideas:k,onIdeaClick:W,viewMode:r}),!a.isLoading&&!a.isError&&k.length===0&&e.jsxs(d,{textAlign:"center",py:16,bg:"white",_dark:{bg:"gray.800"},borderRadius:"xl",children:[e.jsx(o,{color:"gray.500",mb:4,children:"No ideas match your search."}),e.jsx(S,{as:z,to:"/ideation",colorScheme:"orange",children:"Be the First to Submit"})]})]})})};export{ae as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.