cortex-react-components 2.12.3 → 2.12.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/dist/{chunk-N3B3XNV3.mjs → chunk-2BRDNDUB.mjs} +1 -1
  2. package/dist/chunk-33XEFJDE.mjs +4 -0
  3. package/dist/{chunk-IK3GOCAU.mjs → chunk-3AWUWWR4.mjs} +1 -1
  4. package/dist/{chunk-M7NV6EFH.mjs → chunk-3HNU2NYP.mjs} +1 -1
  5. package/dist/{chunk-FKU4VQR6.mjs → chunk-3NRXQBBS.mjs} +1 -1
  6. package/dist/{chunk-DKT6U7AO.mjs → chunk-4RX6WI4T.mjs} +1 -1
  7. package/dist/chunk-54K53IWE.mjs +4 -0
  8. package/dist/{chunk-PK3OBSCB.mjs → chunk-5MWZTJYP.mjs} +1 -1
  9. package/dist/{chunk-GSOFCLPO.mjs → chunk-6MSM3CZ6.mjs} +1 -1
  10. package/dist/{chunk-5SHZBJ5R.mjs → chunk-75F3LJMX.mjs} +1 -1
  11. package/dist/{chunk-LAQ3QAUW.mjs → chunk-75WE6ZXB.mjs} +1 -1
  12. package/dist/{chunk-MXCW6SOT.mjs → chunk-7R47MHQE.mjs} +1 -1
  13. package/dist/{chunk-LJQPLE4S.mjs → chunk-AJQHGVZ5.mjs} +1 -1
  14. package/dist/{chunk-VWLPVN4M.mjs → chunk-AP32JABH.mjs} +1 -1
  15. package/dist/{chunk-YKG4FNS4.mjs → chunk-C4RWEPVF.mjs} +1 -1
  16. package/dist/{chunk-7GMAMIHM.mjs → chunk-CXOVEABI.mjs} +1 -1
  17. package/dist/{chunk-5WVFEIMC.mjs → chunk-EM3T2XYC.mjs} +1 -1
  18. package/dist/{chunk-IF3425JX.mjs → chunk-FE7ZGUPU.mjs} +1 -1
  19. package/dist/{chunk-H3CJOE6S.mjs → chunk-GHOL5L32.mjs} +1 -1
  20. package/dist/{chunk-444KBVNL.mjs → chunk-GNXLNZ6A.mjs} +1 -1
  21. package/dist/{chunk-2RQDJ5XT.mjs → chunk-GTZJWMZR.mjs} +1 -1
  22. package/dist/{chunk-YOETYY5S.mjs → chunk-IPIDKLAW.mjs} +1 -1
  23. package/dist/chunk-JXIKSSGH.mjs +1 -0
  24. package/dist/chunk-KGKGZ4H2.mjs +4 -0
  25. package/dist/{chunk-3QZKRKMP.mjs → chunk-KW6L6KBY.mjs} +1 -1
  26. package/dist/{chunk-I2GNNRFH.mjs → chunk-KWYJ3XZI.mjs} +1 -1
  27. package/dist/{chunk-FTZRG54P.mjs → chunk-M4UVNIK2.mjs} +1 -1
  28. package/dist/{chunk-MW25VRWC.mjs → chunk-MBPTBEOX.mjs} +1 -1
  29. package/dist/{chunk-HKGW6JI2.mjs → chunk-NINFDOV5.mjs} +1 -1
  30. package/dist/{chunk-LSRLBDA7.mjs → chunk-NKDFAFWH.mjs} +1 -1
  31. package/dist/chunk-NO3FZ27F.mjs +1 -0
  32. package/dist/{chunk-FEI5NFYO.mjs → chunk-OSXK6NGG.mjs} +1 -1
  33. package/dist/{chunk-255P6K5W.mjs → chunk-RGOKBIQ5.mjs} +1 -1
  34. package/dist/{chunk-67QPOSVV.mjs → chunk-RJGYVDOU.mjs} +1 -1
  35. package/dist/{chunk-SRUG246N.mjs → chunk-TXVA6XJT.mjs} +1 -1
  36. package/dist/chunk-VFUTR2R2.mjs +4 -0
  37. package/dist/chunk-WDI7JGA6.mjs +1 -0
  38. package/dist/{chunk-ERJXTG6X.mjs → chunk-WIRQ5IRT.mjs} +1 -1
  39. package/dist/{chunk-L3BLBPSR.mjs → chunk-WUA65ZZB.mjs} +1 -1
  40. package/dist/{chunk-LBUC4M6L.mjs → chunk-ZEALRBXW.mjs} +1 -1
  41. package/dist/chunk-ZMSNHKKT.mjs +1 -0
  42. package/dist/components/Blocks/Banner.mjs +1 -1
  43. package/dist/components/Blocks/CallToAction.mjs +1 -1
  44. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  45. package/dist/components/Blocks/Content.mjs +1 -1
  46. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  47. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  48. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  49. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  50. package/dist/components/Blocks/index.mjs +1 -1
  51. package/dist/components/CRM/index.mjs +1 -1
  52. package/dist/components/Cards/ContentCard.mjs +1 -1
  53. package/dist/components/Cards/FeatureCard.mjs +1 -1
  54. package/dist/components/Cards/index.mjs +1 -1
  55. package/dist/components/Chat/CopilotInterface.js +1 -1
  56. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  57. package/dist/components/Chat/demo-long-messages.js +1 -1
  58. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  59. package/dist/components/Chat/demo-tests.js +1 -1
  60. package/dist/components/Chat/demo-tests.mjs +1 -1
  61. package/dist/components/Chat/demo.js +1 -1
  62. package/dist/components/Chat/demo.mjs +1 -1
  63. package/dist/components/Chat/example-usage.js +1 -1
  64. package/dist/components/Chat/example-usage.mjs +1 -1
  65. package/dist/components/Chat/example-with-vercel-ai.js +1 -1
  66. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  67. package/dist/components/Chat/index.js +1 -1
  68. package/dist/components/Chat/index.mjs +1 -1
  69. package/dist/components/DigitalColleagues/DigitalColleageusLayout.js +1 -1
  70. package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
  71. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  72. package/dist/components/DigitalColleagues/ManagementSidebar.d.ts +0 -3
  73. package/dist/components/DigitalColleagues/ManagementSidebar.js +1 -1
  74. package/dist/components/DigitalColleagues/ManagementSidebar.mjs +1 -1
  75. package/dist/components/DigitalColleagues/Pages/dashboardpage.d.ts +1 -1
  76. package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
  77. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  78. package/dist/components/DigitalColleagues/Views/ColleaguesView.d.ts +1 -1
  79. package/dist/components/DigitalColleagues/Views/ColleaguesView.js +1 -1
  80. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  81. package/dist/components/DigitalColleagues/Views/index.js +1 -1
  82. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  83. package/dist/components/DigitalColleagues/colleague-card.d.ts +1 -1
  84. package/dist/components/DigitalColleagues/colleague-card.js +1 -2
  85. package/dist/components/DigitalColleagues/colleague-card.mjs +1 -1
  86. package/dist/components/DigitalColleagues/index.js +1 -1
  87. package/dist/components/DigitalColleagues/index.mjs +1 -1
  88. package/dist/components/HeaderFooter/Header.mjs +1 -1
  89. package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
  90. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  91. package/dist/components/HeaderFooter/index.mjs +1 -1
  92. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  93. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  94. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  95. package/dist/components/Heros/RenderHero.mjs +1 -1
  96. package/dist/components/Heros/index.mjs +1 -1
  97. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  98. package/dist/components/Layouts/Print.mjs +1 -1
  99. package/dist/components/Layouts/SlideShow.mjs +1 -1
  100. package/dist/components/Layouts/index.mjs +1 -1
  101. package/dist/components/Payload/RichText/index.mjs +1 -1
  102. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  103. package/dist/components/Payload/index.mjs +1 -1
  104. package/dist/components/Projects/EpicsView.js +1 -2
  105. package/dist/components/Projects/EpicsView.mjs +1 -1
  106. package/dist/components/Projects/KanbanBoardView.d.ts +1 -1
  107. package/dist/components/Projects/KanbanBoardView.js +1 -1
  108. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  109. package/dist/components/Projects/KanbanColumn.d.ts +1 -0
  110. package/dist/components/Projects/KanbanColumn.js +1 -1
  111. package/dist/components/Projects/KanbanColumn.mjs +1 -1
  112. package/dist/components/Projects/PlanningView.d.ts +2 -0
  113. package/dist/components/Projects/PlanningView.js +1 -1
  114. package/dist/components/Projects/PlanningView.mjs +1 -1
  115. package/dist/components/Projects/PlanningView_broken_backup.css +1 -0
  116. package/dist/components/Projects/PlanningView_broken_backup.d.ts +14 -0
  117. package/dist/components/Projects/PlanningView_broken_backup.js +5 -0
  118. package/dist/components/Projects/PlanningView_broken_backup.mjs +1 -0
  119. package/dist/components/Projects/ProjectPage.js +1 -1
  120. package/dist/components/Projects/ProjectPage.mjs +1 -1
  121. package/dist/components/Projects/ProjectView.js +1 -1
  122. package/dist/components/Projects/ProjectView.mjs +1 -1
  123. package/dist/components/Projects/TaskCard.js +1 -1
  124. package/dist/components/Projects/TaskCard.mjs +1 -1
  125. package/dist/components/Projects/TaskDetailsModal.js +1 -1
  126. package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
  127. package/dist/components/Projects/TaskSidebar.js +1 -1
  128. package/dist/components/Projects/TaskSidebar.mjs +1 -1
  129. package/dist/components/dc-temp/index.mjs +1 -1
  130. package/dist/components/index.js +12 -12
  131. package/dist/components/index.mjs +1 -1
  132. package/dist/globals.css +1 -1
  133. package/dist/index.js +19 -19
  134. package/dist/index.mjs +1 -1
  135. package/dist/metafile-cjs.json +1 -1
  136. package/dist/metafile-esm.json +1 -1
  137. package/dist/pages/Blog.mjs +1 -1
  138. package/dist/pages/Documentation.mjs +1 -1
  139. package/dist/pages/IndexPage.mjs +1 -1
  140. package/dist/pages/Intranet.mjs +1 -1
  141. package/dist/pages/LandingPage.mjs +1 -1
  142. package/dist/pages/Page.mjs +1 -1
  143. package/dist/pages/Publish.mjs +1 -1
  144. package/dist/pages/Website.mjs +1 -1
  145. package/dist/sections/AboutSection.mjs +1 -1
  146. package/dist/sections/BlogDetail.mjs +1 -1
  147. package/dist/sections/BlogList.mjs +1 -1
  148. package/dist/sections/ContactSection.mjs +1 -1
  149. package/dist/sections/PageSections.mjs +1 -1
  150. package/dist/sections/PricingSection.mjs +1 -1
  151. package/dist/sections/ServiceDetail.mjs +1 -1
  152. package/dist/sections/ServiceDetailSection.mjs +1 -1
  153. package/dist/sections/ServiceSection.mjs +1 -1
  154. package/dist/sections/form/index.mjs +1 -1
  155. package/dist/sections/index.mjs +1 -1
  156. package/package.json +1 -1
  157. package/dist/chunk-AMV3MECK.mjs +0 -1
  158. package/dist/chunk-MDPXCQ7P.mjs +0 -4
  159. package/dist/chunk-MEMUW7BY.mjs +0 -1
  160. package/dist/chunk-MTNQADIW.mjs +0 -1
  161. package/dist/chunk-Q2JJZ5FY.mjs +0 -4
  162. package/dist/chunk-Q6VAKKW3.mjs +0 -4
  163. package/dist/chunk-TUI4S4GI.mjs +0 -4
  164. package/dist/chunk-Z422YAPB.mjs +0 -1
@@ -0,0 +1 @@
1
+ import{a as oe}from"../../chunk-6DEY5ZDD.mjs";import{a as le}from"../../chunk-Z22NSJMF.mjs";import"../../chunk-JHNVX4UB.mjs";import"../../chunk-7BXIU4ZM.mjs";import{a as re}from"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-3UMMMQEH.mjs";import{a as ie}from"../../chunk-L5JPAKPM.mjs";import{b as o}from"../../chunk-ZUA4KNIR.mjs";import{b}from"../../chunk-CSBGSBEU.mjs";import{a as h}from"../../chunk-YO3GQYRJ.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-YEKQJ4YC.mjs";import{useState as d,useEffect as O,useRef as de}from"react";import{Calendar as z,User as Ee,Plus as Te,CalendarDays as Be,Edit2 as ce,Trash2 as me,Check as Ae,X as M,ChevronDown as I,ChevronUp as j}from"lucide-react";import{Fragment as ue,jsx as t,jsxs as s}from"react/jsx-runtime";var Ue=({tasks:P,epics:pe,sprints:x,onUpdateTask:ge,onTaskClick:ve,onAddSprint:fe,onUpdateSprint:U,onDeleteSprint:V})=>{let[c,y]=d([]),[w,he]=d(new Set),[R,K]=d(null),[X,k]=d(!1),[xe,$]=d(null),[S,L]=d(null),[m,C]=d({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[D,q]=d("upcoming"),[v,N]=d(!1),[f,G]=d(0),p=de(null),Ne=de(null);O(()=>{let e=()=>{if(p.current){let i=p.current.offsetHeight;G(i)}};e();let a=new ResizeObserver(e);p.current&&a.observe(p.current);let n=()=>{setTimeout(e,100)};return window.addEventListener("storage",n),()=>{a.disconnect(),window.removeEventListener("storage",n)}},[]),O(()=>{let e=setTimeout(()=>{p.current&&G(p.current.offsetHeight)},300);return()=>clearTimeout(e)},[X,S]),O(()=>{let e=a=>{a.key==="Escape"&&v&&N(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[v]);let H=P.filter(e=>!e.sprintId),g=x.filter(e=>e.id!=="backlog"&&e.id!=="all-tasks").sort((e,a)=>e.startDate.getTime()-a.startDate.getTime());O(()=>{if(c.length===0&&g.length>0){let e=g.filter(a=>a.isActive).slice(0,3).map(a=>a.id);if(e.length>0)y(e);else{let a=new Date,n=g.filter(i=>i.startDate>=a).slice(0,3).map(i=>i.id);if(n.length>0)y(n);else{let i=g.slice(-3).map(r=>r.id);y(i)}}}},[g.length]);let J=g.filter(e=>{switch(D){case"active":return e.isActive;case"upcoming":let a=new Date;return e.startDate>=a;case"all":default:return!0}}),Q=D==="upcoming"?J.slice(0,3):J,W=c.map(e=>g.find(a=>a.id===e)).filter(Boolean).slice(0,3),F=e=>pe.find(a=>a.id===e),be=e=>x.find(a=>a.id===e),Y=e=>{let a={},n=[];return e.forEach(i=>{i.epicId?(a[i.epicId]||(a[i.epicId]=[]),a[i.epicId].push(i)):n.push(i)}),{tasksByEpic:a,unassignedTasks:n}},ye=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"}},we=e=>e.split(" ").map(a=>a[0]).join("").toUpperCase(),ke=e=>{K(e)},Z=e=>{e.preventDefault()},_=e=>{$(e)},ee=()=>{$(null)},te=(e,a)=>{e.preventDefault(),$(null),R&&(ge(R.id,{sprintId:a==="backlog"?void 0:a}),K(null))},se=e=>{e==="backlog"||e==="all-tasks"||y(a=>{if(a.includes(e))return a.filter(n=>n!==e);if(a.length<3){let n=[...a,e];return n.length===3&&setTimeout(()=>N(!1),500),n}else return[a[1],a[2],e]})},E=e=>{he(a=>{let n=new Set(a);return n.has(e)?n.delete(e):n.add(e),n})},Se=e=>{fe(e),k(!1)},ae=e=>{L(e.id),C({name:e.name,description:e.description||"",startDate:e.startDate.toISOString().split("T")[0],endDate:e.endDate.toISOString().split("T")[0],isActive:e.isActive})},Ce=()=>{S&&m.name.trim()&&(U(S,{name:m.name.trim(),description:m.description.trim(),startDate:new Date(m.startDate),endDate:new Date(m.endDate),isActive:m.isActive}),L(null))},De=()=>{L(null),C({name:"",description:"",startDate:"",endDate:"",isActive:!1})},Oe=e=>{U(e,{isSelected:!0})},T=({task:e,showSprint:a=!1})=>{let n=F(e.epicId),i=e.sprintId?be(e.sprintId):null,[r,l]=d(!1),u=ne=>{ne.defaultPrevented||r||ve(e)},B=ne=>{l(!0),ke(e)},A=()=>{l(!1)};return t(h,{className:`p-3 cursor-grab transition-all duration-200 hover:shadow-md bg-card border-border hover:border-border/80 active:cursor-grabbing ${r?"opacity-50 shadow-lg scale-105":""} ${R?.id===e.id?"ring-2 ring-primary":""}`,draggable:!0,onDragStart:B,onDragEnd:A,onClick:u,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.name}),t(b,{className:`text-xs select-none pointer-events-none ${ye(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:[n&&t("div",{className:`w-2 h-2 rounded-full ${n.color}`}),t("span",{className:"text-muted-foreground truncate select-none",children:n?.name})]}),t("span",{className:"text-muted-foreground select-none",children:we(e.assignee)})]}),a&&i&&s("div",{className:"flex items-center gap-1 text-xs text-muted-foreground pointer-events-none",children:[t(z,{className:"h-3 w-3"}),t("span",{className:"select-none",children:i.name})]})]})})};return s("div",{ref:Ne,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[t("div",{ref:p,className:"flex-shrink-0",children:t(le,{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:()=>k(!0)}})}),t("div",{className:"flex-1 min-h-0 mt-8",children:s("div",{className:"h-full",style:{height:f>0?`calc(100vh - ${f+120}px)`:"calc(100vh - 12rem)"},children:[s("div",{className:"mb-4",children:[t(h,{className:"p-3 bg-card shadow-sm",children:s("div",{className:"flex items-center justify-between",children:[s("div",{className:"flex items-center gap-3",children:[s("div",{children:[t("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"}),s("p",{className:"text-xs text-muted-foreground",children:[c.length,"/3 selected"]})]}),c.length>0&&s("div",{className:"flex items-center gap-2",children:[t("span",{className:"text-xs text-muted-foreground",children:"Viewing:"}),t("div",{className:"flex flex-wrap gap-1",children:W.map(e=>s("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-xs",children:[t("span",{className:"max-w-[80px] truncate",children:e.name}),e.isActive&&t("span",{className:"text-success text-[10px]",children:"\u25CF"}),t("button",{onClick:()=>se(e.id),className:"ml-0.5 hover:bg-primary/20 rounded p-0.5",children:t(M,{className:"h-2 w-2"})})]},e.id))})]})]}),s("div",{className:"flex items-center gap-2",children:[s(o,{onClick:()=>k(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[t(Te,{className:"h-3 w-3"}),"Add"]}),s(o,{onClick:()=>N(!v),variant:"outline",size:"sm",className:"gap-1",children:[t(z,{className:"h-3 w-3"}),v?"Close":"Select"]})]})]})}),v&&t("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>N(!1)}),t("div",{className:`fixed top-0 right-0 h-full w-80 bg-background border-l shadow-xl z-10 transition-all duration-300 ease-in-out ${v?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:s(h,{className:"h-full rounded-none border-0 flex flex-col",children:[s("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[s("div",{className:"flex items-center justify-between",children:[t("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),t(o,{variant:"ghost",size:"sm",onClick:()=>N(!1),className:"h-8 w-8 p-0",children:t(M,{className:"h-4 w-4"})})]}),t("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose up to 3 sprints to view in your planning board"})]}),s("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[t("div",{className:"flex gap-1 mb-4 bg-muted p-1 rounded-lg",children:[{key:"all",label:"All",count:x.length},{key:"active",label:"Active",count:x.filter(e=>e.isActive).length},{key:"upcoming",label:"Upcoming",count:x.filter(e=>!e.isActive).length}].map(e=>s(o,{variant:D===e.key?"default":"outline",size:"sm",onClick:()=>q(e.key),className:"text-xs h-8 px-3 flex-1",children:[e.label," (",e.count,")"]},e.key))}),t("div",{className:"space-y-2 flex-1 overflow-y-auto",children:Q.length>0?Q.map(e=>{let a=c.includes(e.id),n=P.filter(r=>r.sprintId===e.id).length,i=!a&&c.length<3;return t("div",{className:`p-3 rounded-lg border transition-all ${a?"bg-primary/10 border-primary/30":i?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:S===e.id?s("div",{className:"space-y-3",children:[t(ie,{value:m.name,onChange:r=>C(l=>({...l,name:r.target.value})),className:"text-sm",placeholder:"Sprint name"}),t(re,{value:m.description,onChange:r=>C(l=>({...l,description:r.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),s("div",{className:"flex gap-2",children:[s(o,{size:"sm",onClick:()=>Ce(),className:"flex-1",children:[t(Ae,{className:"h-3 w-3 mr-1"}),"Save"]}),s(o,{size:"sm",variant:"outline",onClick:De,className:"flex-1",children:[t(M,{className:"h-3 w-3 mr-1"}),"Cancel"]})]})]}):s("div",{children:[s("div",{className:"flex items-start justify-between",children:[s("div",{className:"flex-1 min-w-0",children:[s("div",{className:"flex items-center gap-2 mb-1",children:[t("h4",{className:"font-medium text-sm text-foreground truncate",children:e.name}),e.isActive&&t(b,{variant:"default",className:"text-xs bg-green-100 text-green-800 border-green-200",children:"Active"})]}),t("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:e.description}),s("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[s("span",{className:"flex items-center gap-1",children:[t(Be,{className:"h-3 w-3"}),new Date(e.startDate).toLocaleDateString()]}),s("span",{className:"flex items-center gap-1",children:[t(Ee,{className:"h-3 w-3"}),n," tasks"]})]})]}),s("div",{className:"flex items-center gap-1 ml-2",children:[t(o,{size:"sm",variant:"ghost",onClick:()=>ae(e),className:"h-6 w-6 p-0",children:t(ce,{className:"h-3 w-3"})}),e.id!=="backlog"&&e.id!=="all-tasks"&&t(o,{size:"sm",variant:"ghost",onClick:()=>V(e.id),className:"h-6 w-6 p-0 text-destructive hover:text-destructive",children:t(me,{className:"h-3 w-3"})})]})]}),t("div",{className:"flex items-center justify-between mt-2",children:t(o,{variant:a?"default":"outline",size:"sm",className:"text-xs w-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>se(e.id),disabled:!a&&c.length>=3,children:t("span",{className:"pointer-events-none select-none",children:a?"Deselect":c.length>=3?"Limit Reached":"Select"})})})]})},e.id)}):s("div",{className:"text-center py-8 text-muted-foreground",children:[t(z,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),s("p",{className:"text-sm",children:['No sprints found for "',D,'" filter']}),t(o,{variant:"link",size:"sm",onClick:()=>q("all"),className:"text-xs",children:"Show all sprints"})]})}),c.length===0&&t("div",{className:"mt-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:s("div",{className:"text-center",children:[t(z,{className:"h-6 w-6 mx-auto mb-2 text-muted-foreground"}),t("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints to start planning"}),t("p",{className:"text-xs text-muted-foreground mt-1",children:"Choose up to 3 sprints to view alongside your backlog"})]})})]})]})})]}),s("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[t("div",{className:"lg:col-span-1",children:s(h,{className:"p-4 h-full bg-card border-l-4 border-l-gray-400 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:Z,onDragEnter:()=>_("backlog"),onDragLeave:ee,onDrop:e=>te(e,"backlog"),style:{height:f>0?`calc(100vh - ${f+200}px)`:"calc(100vh - 16rem)"},children:[s("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[t("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),t(b,{variant:"secondary",className:"bg-muted text-muted-foreground",children:H.length})]}),t("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${xe==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:e,unassignedTasks:a}=Y(H);return s(ue,{children:[Object.entries(e).map(([n,i])=>{let r=F(n);if(!r)return null;let l=w.has(n);return s("div",{className:"space-y-2",children:[s("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>E(n),children:[t("div",{className:`w-3 h-3 rounded-full ${r.color}`}),t("span",{className:"font-medium text-muted-foreground",children:r.name}),s("span",{className:"text-muted-foreground",children:["(",i.length,")"]}),t("div",{className:"ml-auto",children:l?t(I,{className:"h-3 w-3 text-muted-foreground"}):t(j,{className:"h-3 w-3 text-muted-foreground"})})]}),!l&&t("div",{className:"space-y-2 pl-2",children:i.map(u=>t(T,{task:u},u.id))})]},n)}),a.length>0&&(()=>{let n=w.has("no-epic");return s("div",{className:"space-y-2",children:[s("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>E("no-epic"),children:[t("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),t("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),s("span",{className:"text-muted-foreground",children:["(",a.length,")"]}),t("div",{className:"ml-auto",children:n?t(I,{className:"h-3 w-3 text-muted-foreground"}):t(j,{className:"h-3 w-3 text-muted-foreground"})})]}),!n&&t("div",{className:"space-y-2 pl-2",children:a.map(i=>t(T,{task:i},i.id))})]})})(),H.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"})]})})()})]})}),W.map(e=>{let a=P.filter(n=>n.sprintId===e.id);return s(h,{className:"p-4 h-full bg-card border-l-4 border-l-blue-500 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:Z,onDragEnter:()=>_(e.id),onDragLeave:ee,onDrop:n=>te(n,e.id),style:{height:f>0?`calc(100vh - ${f+200}px)`:"calc(100vh - 16rem)"},children:[s("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[s("div",{children:[t("h3",{className:"font-semibold text-foreground select-none text-lg",children:e.name}),e.isActive&&t("span",{className:"text-xs text-success font-medium select-none",children:"Active Sprint"})]}),s("div",{className:"flex items-center gap-2",children:[t(b,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a.length}),t(o,{size:"sm",variant:"ghost",onClick:()=>ae(e),className:"h-6 px-2",children:t(ce,{className:"h-3 w-3"})}),e.id!=="backlog"&&e.id!=="all-tasks"&&t(o,{size:"sm",variant:"ghost",onClick:()=>V(e.id),className:"h-6 px-2 text-destructive hover:text-destructive",children:t(me,{className:"h-3 w-3"})})]})]}),t("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:n,unassignedTasks:i}=Y(a);return s(ue,{children:[Object.entries(n).map(([r,l])=>{let u=F(r);if(!u)return null;let B=w.has(r);return s("div",{className:"space-y-2",children:[s("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>E(r),children:[t("div",{className:`w-3 h-3 rounded-full ${u.color}`}),t("span",{className:"font-medium text-muted-foreground",children:u.name}),s("span",{className:"text-muted-foreground",children:["(",l.length,")"]}),t("div",{className:"ml-auto",children:B?t(I,{className:"h-3 w-3 text-muted-foreground"}):t(j,{className:"h-3 w-3 text-muted-foreground"})})]}),!B&&t("div",{className:"space-y-2 pl-2",children:l.map(A=>t(T,{task:A},A.id))})]},r)}),i.length>0&&(()=>{let r=w.has("no-epic");return s("div",{className:"space-y-2",children:[s("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>E("no-epic"),children:[t("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),t("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),s("span",{className:"text-muted-foreground",children:["(",i.length,")"]}),t("div",{className:"ml-auto",children:r?t(I,{className:"h-3 w-3 text-muted-foreground"}):t(j,{className:"h-3 w-3 text-muted-foreground"})})]}),!r&&t("div",{className:"space-y-2 pl-2",children:i.map(l=>t(T,{task:l},l.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(oe,{isOpen:X,onClose:()=>k(!1),onAddSprint:Se})]})})]})};export{Ue as PlanningView};