cortex-react-components 2.13.1 → 2.13.3

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 (237) hide show
  1. package/dist/{chunk-RGOKBIQ5.mjs → chunk-255P6K5W.mjs} +1 -1
  2. package/dist/{chunk-HNWWGPHA.mjs → chunk-2HWSTGAP.mjs} +1 -1
  3. package/dist/chunk-2IMVYO7X.mjs +1 -0
  4. package/dist/{chunk-GTZJWMZR.mjs → chunk-2RQDJ5XT.mjs} +1 -1
  5. package/dist/chunk-2UNIT7NC.mjs +4 -0
  6. package/dist/{chunk-CR326IJ6.mjs → chunk-4L77KQ2E.mjs} +1 -1
  7. package/dist/chunk-5N4WW7O2.mjs +1 -0
  8. package/dist/{chunk-AGWQ5S2Z.mjs → chunk-5NIEZE7A.mjs} +1 -1
  9. package/dist/{chunk-75F3LJMX.mjs → chunk-5SHZBJ5R.mjs} +1 -1
  10. package/dist/{chunk-EM3T2XYC.mjs → chunk-5WVFEIMC.mjs} +1 -1
  11. package/dist/{chunk-ZEALRBXW.mjs → chunk-62A35O55.mjs} +1 -1
  12. package/dist/{chunk-RJGYVDOU.mjs → chunk-67QPOSVV.mjs} +1 -1
  13. package/dist/chunk-6BQNN2KT.mjs +1 -0
  14. package/dist/chunk-6NED7ZVK.mjs +1 -0
  15. package/dist/{chunk-CXOVEABI.mjs → chunk-7GMAMIHM.mjs} +1 -1
  16. package/dist/{chunk-CNCT3JZV.mjs → chunk-AQQCH7Z2.mjs} +1 -1
  17. package/dist/chunk-CDVRH3MC.mjs +4 -0
  18. package/dist/chunk-CJ6APTVT.mjs +4 -0
  19. package/dist/{chunk-ITJH72Z2.mjs → chunk-CLGBBNRB.mjs} +1 -1
  20. package/dist/{chunk-2EQ5OMZF.mjs → chunk-DMCFEJ2C.mjs} +1 -1
  21. package/dist/chunk-DTIHVFME.mjs +4 -0
  22. package/dist/{chunk-3AWUWWR4.mjs → chunk-E6UOMRHI.mjs} +1 -1
  23. package/dist/chunk-E6Y5COQK.mjs +1 -0
  24. package/dist/{chunk-WIRQ5IRT.mjs → chunk-ERJXTG6X.mjs} +1 -1
  25. package/dist/{chunk-3NRXQBBS.mjs → chunk-FKU4VQR6.mjs} +1 -1
  26. package/dist/{chunk-GHOL5L32.mjs → chunk-H3CJOE6S.mjs} +1 -1
  27. package/dist/{chunk-NINFDOV5.mjs → chunk-HKGW6JI2.mjs} +1 -1
  28. package/dist/{chunk-KWYJ3XZI.mjs → chunk-I2GNNRFH.mjs} +1 -1
  29. package/dist/{chunk-FE7ZGUPU.mjs → chunk-IF3425JX.mjs} +1 -1
  30. package/dist/{chunk-24XUZCYT.mjs → chunk-IK3AM53W.mjs} +1 -1
  31. package/dist/chunk-KG7HG2VO.mjs +1 -0
  32. package/dist/{chunk-ERHNVIOZ.mjs → chunk-LHO4WFYP.mjs} +1 -1
  33. package/dist/{chunk-AJQHGVZ5.mjs → chunk-LJQPLE4S.mjs} +1 -1
  34. package/dist/{chunk-ZKSZJI4F.mjs → chunk-LVXEY6OU.mjs} +1 -1
  35. package/dist/{chunk-3HNU2NYP.mjs → chunk-M7NV6EFH.mjs} +1 -1
  36. package/dist/{chunk-7R47MHQE.mjs → chunk-MXCW6SOT.mjs} +1 -1
  37. package/dist/{chunk-2BRDNDUB.mjs → chunk-N3B3XNV3.mjs} +1 -1
  38. package/dist/chunk-NGX2VCHS.mjs +1 -0
  39. package/dist/{chunk-3Y7QG6VP.mjs → chunk-NWISIJFD.mjs} +1 -1
  40. package/dist/{chunk-23XORW7A.mjs → chunk-P7S6XFU4.mjs} +1 -1
  41. package/dist/{chunk-5MWZTJYP.mjs → chunk-PK3OBSCB.mjs} +1 -1
  42. package/dist/{chunk-Q67RF7VO.mjs → chunk-QG4QCB5I.mjs} +1 -1
  43. package/dist/{chunk-A7SGFSI5.mjs → chunk-QSXEJ2NO.mjs} +1 -1
  44. package/dist/{chunk-POIHYOIP.mjs → chunk-RMWGIZJX.mjs} +1 -1
  45. package/dist/{chunk-KCEJXXM2.mjs → chunk-RVHCTANZ.mjs} +1 -1
  46. package/dist/{chunk-TXVA6XJT.mjs → chunk-SRUG246N.mjs} +1 -1
  47. package/dist/chunk-TKCFCYEQ.mjs +4 -0
  48. package/dist/{chunk-6MSM3CZ6.mjs → chunk-TL2RQFU5.mjs} +1 -1
  49. package/dist/{chunk-7FWAJQRH.mjs → chunk-TO7SVJIU.mjs} +1 -1
  50. package/dist/chunk-TOI73VEE.mjs +1 -0
  51. package/dist/{chunk-ZGQC6O62.mjs → chunk-UEBQJNVT.mjs} +1 -1
  52. package/dist/chunk-UVHMI3PU.mjs +1 -0
  53. package/dist/chunk-WSQHAE6Q.mjs +1 -0
  54. package/dist/{chunk-L3BLBPSR.mjs → chunk-WUA65ZZB.mjs} +1 -1
  55. package/dist/{chunk-PWFVXG44.mjs → chunk-XKGBG5FX.mjs} +1 -1
  56. package/dist/chunk-XNEPSYCO.mjs +1 -0
  57. package/dist/{chunk-C4RWEPVF.mjs → chunk-YKG4FNS4.mjs} +1 -1
  58. package/dist/{chunk-UXOUJ5YO.mjs → chunk-ZB7RDJRP.mjs} +1 -1
  59. package/dist/{chunk-PXLSH6S2.mjs → chunk-ZFUP5NVF.mjs} +1 -1
  60. package/dist/components/AdvancedComponents/app-header.mjs +1 -1
  61. package/dist/components/AdvancedComponents/index.mjs +1 -1
  62. package/dist/components/Blocks/Banner.mjs +1 -1
  63. package/dist/components/Blocks/CallToAction.mjs +1 -1
  64. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  65. package/dist/components/Blocks/Content.mjs +1 -1
  66. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  67. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  68. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  69. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  70. package/dist/components/Blocks/index.mjs +1 -1
  71. package/dist/components/CRM/index.mjs +1 -1
  72. package/dist/components/Cards/ContentCard.mjs +1 -1
  73. package/dist/components/Cards/FeatureCard.mjs +1 -1
  74. package/dist/components/Cards/index.mjs +1 -1
  75. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  76. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  77. package/dist/components/Chat/demo-tests.mjs +1 -1
  78. package/dist/components/Chat/demo.mjs +1 -1
  79. package/dist/components/Chat/example-usage.mjs +1 -1
  80. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  81. package/dist/components/Chat/index.mjs +1 -1
  82. package/dist/components/DeliveryLead/DeliveryLeadSubmissionWithList.mjs +1 -1
  83. package/dist/components/DeliveryLead/index.mjs +1 -1
  84. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  85. package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
  86. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  87. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  88. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  89. package/dist/components/DigitalColleagues/Views/index.js +1 -1
  90. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  91. package/dist/components/DigitalColleagues/index.js +1 -1
  92. package/dist/components/DigitalColleagues/index.mjs +1 -1
  93. package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
  94. package/dist/components/Foundary/{DigitalColleageusLayout.mjs → FoundaryLayout.mjs} +1 -1
  95. package/dist/components/Foundary/MainPage.mjs +1 -1
  96. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  97. package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
  98. package/dist/components/Foundary/Views/TeamsIndexView.d.ts +3 -3
  99. package/dist/components/Foundary/Views/TeamsIndexView.js +2 -2
  100. package/dist/components/Foundary/Views/TeamsIndexView.mjs +1 -1
  101. package/dist/components/Foundary/Views/index.js +1 -1
  102. package/dist/components/Foundary/Views/index.mjs +1 -1
  103. package/dist/components/Foundary/{digital-colleague-clone.mjs → foundary-clone.mjs} +1 -1
  104. package/dist/components/Foundary/{digital-colleague-options.mjs → foundary-options.mjs} +1 -1
  105. package/dist/components/Foundary/index.d.ts +3 -3
  106. package/dist/components/Foundary/index.js +1 -1
  107. package/dist/components/Foundary/index.mjs +1 -1
  108. package/dist/components/Foundary/team-form.d.ts +1 -1
  109. package/dist/components/Foundary/team-form.js +2 -2
  110. package/dist/components/Foundary/team-form.mjs +1 -1
  111. package/dist/components/Foundary/types.d.ts +9 -0
  112. package/dist/components/HeaderFooter/Header.mjs +1 -1
  113. package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
  114. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  115. package/dist/components/HeaderFooter/index.mjs +1 -1
  116. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  117. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  118. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  119. package/dist/components/Heros/PostHero/index.mjs +1 -1
  120. package/dist/components/Heros/RenderHero.mjs +1 -1
  121. package/dist/components/Heros/index.mjs +1 -1
  122. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  123. package/dist/components/Holidays/index.mjs +1 -1
  124. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  125. package/dist/components/Layouts/Print.mjs +1 -1
  126. package/dist/components/Layouts/SlideShow.mjs +1 -1
  127. package/dist/components/Layouts/index.mjs +1 -1
  128. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  129. package/dist/components/Menus/SidebarRight.mjs +1 -1
  130. package/dist/components/Menus/index.mjs +1 -1
  131. package/dist/components/Payload/RichText/index.mjs +1 -1
  132. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  133. package/dist/components/Payload/index.mjs +1 -1
  134. package/dist/components/Projects/AddEpicModal.d.ts +1 -1
  135. package/dist/components/Projects/AddEpicModal.js +1 -1
  136. package/dist/components/Projects/AddEpicModal.mjs +1 -1
  137. package/dist/components/Projects/AddSprintModal.d.ts +1 -1
  138. package/dist/components/Projects/AddSprintModal.js +1 -1
  139. package/dist/components/Projects/AddSprintModal.mjs +1 -1
  140. package/dist/components/Projects/AddTaskModal.d.ts +2 -2
  141. package/dist/components/Projects/AddTaskModal.js +1 -1
  142. package/dist/components/Projects/AddTaskModal.mjs +1 -1
  143. package/dist/components/Projects/EpicsView.d.ts +1 -1
  144. package/dist/components/Projects/EpicsView.js +1 -1
  145. package/dist/components/Projects/EpicsView.mjs +1 -1
  146. package/dist/components/Projects/KanbanBoardView.d.ts +6 -4
  147. package/dist/components/Projects/KanbanBoardView.js +1 -1
  148. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  149. package/dist/components/Projects/PlanningView.d.ts +1 -1
  150. package/dist/components/Projects/PlanningView.js +1 -1
  151. package/dist/components/Projects/PlanningView.mjs +1 -1
  152. package/dist/components/Projects/ProjectPage.d.ts +1 -1
  153. package/dist/components/Projects/ProjectPage.js +1 -1
  154. package/dist/components/Projects/ProjectPage.mjs +1 -1
  155. package/dist/components/Projects/ProjectView.d.ts +1 -42
  156. package/dist/components/Projects/ProjectView.js +1 -1
  157. package/dist/components/Projects/ProjectView.mjs +1 -1
  158. package/dist/components/Projects/ProjectsIndexView.d.ts +3 -3
  159. package/dist/components/Projects/ProjectsIndexView.js +2 -2
  160. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  161. package/dist/components/Projects/TaskCard.d.ts +2 -2
  162. package/dist/components/Projects/TaskCard.js +1 -1
  163. package/dist/components/Projects/TaskCard.mjs +1 -1
  164. package/dist/components/Projects/TaskDetailsModal.d.ts +1 -1
  165. package/dist/components/Projects/TaskDetailsModal.js +1 -1
  166. package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
  167. package/dist/components/Projects/TaskSidebar.d.ts +1 -1
  168. package/dist/components/Projects/TaskSidebar.js +1 -1
  169. package/dist/components/Projects/TaskSidebar.mjs +1 -1
  170. package/dist/components/Projects/TasksView.d.ts +1 -1
  171. package/dist/components/Projects/TasksView.js +1 -1
  172. package/dist/components/Projects/TasksView.mjs +1 -1
  173. package/dist/components/Projects/index.js +1 -1
  174. package/dist/components/Projects/index.mjs +1 -1
  175. package/dist/components/Projects/project-form.d.ts +3 -3
  176. package/dist/components/Projects/project-form.js +1 -1
  177. package/dist/components/Projects/project-form.mjs +1 -1
  178. package/dist/components/dc-temp/creative.mjs +1 -1
  179. package/dist/components/dc-temp/index.mjs +1 -1
  180. package/dist/components/index.js +13 -13
  181. package/dist/components/index.mjs +1 -1
  182. package/dist/components/ui/index.mjs +1 -1
  183. package/dist/components/ui/sidebar.mjs +1 -1
  184. package/dist/index.js +17 -17
  185. package/dist/index.mjs +1 -1
  186. package/dist/metafile-cjs.json +1 -1
  187. package/dist/metafile-esm.json +1 -1
  188. package/dist/pages/Blog.mjs +1 -1
  189. package/dist/pages/Documentation.mjs +1 -1
  190. package/dist/pages/IndexPage.mjs +1 -1
  191. package/dist/pages/Intranet.mjs +1 -1
  192. package/dist/pages/LandingPage.mjs +1 -1
  193. package/dist/pages/Page.mjs +1 -1
  194. package/dist/pages/Publish.mjs +1 -1
  195. package/dist/pages/Website.mjs +1 -1
  196. package/dist/sections/AboutSection.mjs +1 -1
  197. package/dist/sections/BlogDetail.mjs +1 -1
  198. package/dist/sections/BlogList.mjs +1 -1
  199. package/dist/sections/BlogListSection.mjs +1 -1
  200. package/dist/sections/ContactSection.mjs +1 -1
  201. package/dist/sections/PageSections.mjs +1 -1
  202. package/dist/sections/PricingSection.mjs +1 -1
  203. package/dist/sections/ServiceDetail.mjs +1 -1
  204. package/dist/sections/ServiceDetailSection.mjs +1 -1
  205. package/dist/sections/ServiceSection.mjs +1 -1
  206. package/dist/sections/form/index.mjs +1 -1
  207. package/dist/sections/index.mjs +1 -1
  208. package/dist/utils/extract-id.d.ts +1 -0
  209. package/dist/utils/extract-id.js +1 -0
  210. package/dist/utils/extract-id.mjs +1 -0
  211. package/package.json +1 -1
  212. package/dist/chunk-2C4UDLVF.mjs +0 -1
  213. package/dist/chunk-2XMVNXF6.mjs +0 -4
  214. package/dist/chunk-4A3MGS6I.mjs +0 -1
  215. package/dist/chunk-4HHGVL3E.mjs +0 -1
  216. package/dist/chunk-6DEY5ZDD.mjs +0 -1
  217. package/dist/chunk-6TUNKKV7.mjs +0 -1
  218. package/dist/chunk-CXCDV7VP.mjs +0 -4
  219. package/dist/chunk-GGJZVAC4.mjs +0 -4
  220. package/dist/chunk-KW6L6KBY.mjs +0 -1
  221. package/dist/chunk-LD44TGKT.mjs +0 -4
  222. package/dist/chunk-MBPTBEOX.mjs +0 -1
  223. package/dist/chunk-NKDFAFWH.mjs +0 -1
  224. package/dist/chunk-O57JJTH5.mjs +0 -1
  225. package/dist/chunk-ORNGKQM7.mjs +0 -1
  226. package/dist/chunk-UAEEBFHJ.mjs +0 -4
  227. /package/dist/{chunk-6LEH6XKI.mjs → chunk-M2REXGQW.mjs} +0 -0
  228. /package/dist/{chunk-SGK4ZXKR.mjs → chunk-NDZ26EG6.mjs} +0 -0
  229. /package/dist/components/Foundary/{DigitalColleageusLayout.css → FoundaryLayout.css} +0 -0
  230. /package/dist/components/Foundary/{DigitalColleageusLayout.d.ts → FoundaryLayout.d.ts} +0 -0
  231. /package/dist/components/Foundary/{DigitalColleageusLayout.js → FoundaryLayout.js} +0 -0
  232. /package/dist/components/Foundary/{digital-colleague-clone.css → foundary-clone.css} +0 -0
  233. /package/dist/components/Foundary/{digital-colleague-clone.d.ts → foundary-clone.d.ts} +0 -0
  234. /package/dist/components/Foundary/{digital-colleague-clone.js → foundary-clone.js} +0 -0
  235. /package/dist/components/Foundary/{digital-colleague-options.css → foundary-options.css} +0 -0
  236. /package/dist/components/Foundary/{digital-colleague-options.d.ts → foundary-options.d.ts} +0 -0
  237. /package/dist/components/Foundary/{digital-colleague-options.js → foundary-options.js} +0 -0
@@ -1 +0,0 @@
1
- import{a as q}from"./chunk-Z22NSJMF.mjs";import{a as w,c as R,d as I,g as T,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 H}from"./chunk-CSBGSBEU.mjs";import{a as S,e as U}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(w,{value:l.colleagueId,onValueChange:d=>{a({...l,colleagueId:d})},required:!0,children:[e(I,{className:`${s?"text-destructive border-red-500":""}`,children:e(R,{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(T,{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(w,{value:l.recurrencePattern,onValueChange:d=>a({...l,recurrencePattern:d}),children:[e(I,{children:e(R,{})}),t(T,{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(w,{value:a.priority,onValueChange:n=>s({...a,priority:n}),children:[e(I,{children:e(R,{})}),t(T,{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(w,{value:a.colleagueId,onValueChange:n=>s({...a,colleagueId:n}),required:!0,children:[e(I,{children:e(R,{placeholder:"Select a digital colleague"})}),e(T,{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(w,{value:a.recurrencePattern,onValueChange:n=>s({...a,recurrencePattern:n}),children:[e(I,{children:e(R,{})}),t(T,{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(w,{value:a.reminderMinutes.toString(),onValueChange:n=>s({...a,reminderMinutes:parseInt(n)}),children:[e(I,{children:e(R,{})}),t(T,{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(S,{className:`transition-all duration-200 ${i.isCompleted?"opacity-60":""} ${s&&!i.isCompleted?"border-destructive/50 bg-destructive/5":""}`,children:e(U,{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(H,{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(S,{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(S,{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(S,{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(S,{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(S,{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(w,{value:h,onValueChange:r=>n(r),children:[e(I,{className:"w-40",children:e(R,{})}),t(T,{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(S,{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 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a as N}from"./chunk-INCYANPB.mjs";import{a as p}from"./chunk-B4H6T2GP.mjs";import{a as n}from"./chunk-TVZOULLL.mjs";import{a as f}from"./chunk-L5JPAKPM.mjs";import{b as d}from"./chunk-ZUA4KNIR.mjs";import{a as v,b as j,c as h,d as x,e as g,f as w}from"./chunk-YO3GQYRJ.mjs";import{useState as k}from"react";import{Loader2 as L,Plus as P,X as R}from"lucide-react";import{Fragment as C,jsx as t,jsxs as a}from"react/jsx-runtime";var S=({onSubmit:y,onCancel:u,isLoading:o=!1,initialData:c,className:F=""})=>{let[r,I]=k({name:c?.name||"",objectives:c?.objectives||"",workInstructions:c?.workInstructions||"",plan:c?.plan||!1}),[s,b]=k({}),D=()=>{let e={};return r.name.trim()?r.name.trim().length<3&&(e.name="Project name must be at least 3 characters"):e.name="Project name is required",r.objectives.trim()?r.objectives.trim().length<10&&(e.objectives="Please provide more detailed objectives (at least 10 characters)"):e.objectives="Project objectives are required",r.workInstructions.trim()?r.workInstructions.trim().length<20&&(e.workInstructions="Please provide more detailed work instructions (at least 20 characters)"):e.workInstructions="Work instructions are required",b(e),Object.keys(e).length===0},E=async e=>{if(e.preventDefault(),!!D())try{await y(r)}catch(m){console.error("Error submitting project form:",m)}},i=(e,m)=>{I(l=>({...l,[e]:m})),s[e]&&b(l=>({...l,[e]:void 0}))};return a(v,{className:`w-full max-w-2xl ${F}`,children:[a(j,{children:[a(h,{className:"flex items-center gap-2",children:[t(P,{className:"h-5 w-5"}),"Create New Project"]}),t(x,{children:"Set up a new project with clear objectives and work instructions to help your team collaborate effectively."})]}),a("form",{onSubmit:E,children:[a(g,{className:"space-y-6",children:[a("div",{className:"space-y-2",children:[t(n,{htmlFor:"name",className:"text-sm font-medium",children:"Project Name *"}),t(f,{id:"name",type:"text",placeholder:"Enter project name",value:r.name,onChange:e=>i("name",e.target.value),className:s.name?"border-red-500 focus:border-red-500":"",disabled:o,maxLength:100}),s.name&&t("p",{className:"text-sm text-red-600",children:s.name})]}),a("div",{className:"space-y-2",children:[t(n,{htmlFor:"objectives",className:"text-sm font-medium",children:"Project Objectives *"}),t(p,{id:"objectives",placeholder:"Describe the main goals and objectives of this project...",value:r.objectives,onChange:e=>i("objectives",e.target.value),className:`min-h-[100px] resize-y ${s.objectives?"border-red-500 focus:border-red-500":""}`,disabled:o,maxLength:1e3}),a("div",{className:"flex justify-between text-xs text-gray-500",children:[t("span",{children:s.objectives&&t("span",{className:"text-red-600",children:s.objectives})}),a("span",{children:[r.objectives.length,"/1000"]})]})]}),a("div",{className:"space-y-2",children:[t(n,{htmlFor:"workInstructions",className:"text-sm font-medium",children:"Work Instructions *"}),t(p,{id:"workInstructions",placeholder:"Provide detailed instructions on how the work should be carried out, including processes, standards, and expectations...",value:r.workInstructions,onChange:e=>i("workInstructions",e.target.value),className:`min-h-[120px] resize-y ${s.workInstructions?"border-red-500 focus:border-red-500":""}`,disabled:o,maxLength:2e3}),a("div",{className:"flex justify-between text-xs text-gray-500",children:[t("span",{children:s.workInstructions&&t("span",{className:"text-red-600",children:s.workInstructions})}),a("span",{children:[r.workInstructions.length,"/2000"]})]})]}),a("div",{className:"space-y-3",children:[t(n,{className:"text-sm font-medium",children:"Project Management"}),a("div",{className:"flex items-center space-x-2",children:[t(N,{id:"plan",checked:r.plan,onCheckedChange:e=>i("plan",e===!0),disabled:o}),t(n,{htmlFor:"plan",className:"text-sm text-gray-700 cursor-pointer",children:"Enable project planning and management features"})]}),t("p",{className:"text-xs text-gray-500 ml-6",children:"This will allow project managers to create sprints, assign tasks, and track progress."})]})]}),a(w,{className:"flex justify-end gap-3",children:[u&&a(d,{type:"button",variant:"outline",onClick:u,disabled:o,className:"flex items-center gap-2",children:[t(R,{className:"h-4 w-4"}),"Cancel"]}),t(d,{type:"submit",disabled:o,className:"flex items-center gap-2",children:o?a(C,{children:[t(L,{className:"h-4 w-4 animate-spin"}),"Creating..."]}):a(C,{children:[t(P,{className:"h-4 w-4"}),"Create Project"]})})]})]})]})},X=S;export{S as a,X as b};
@@ -1 +0,0 @@
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 n}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{a as y}from"./chunk-L5JPAKPM.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:l,onClose:u,onAddTask:D,epics:A,sprints:F,assignees:L,defaultEpicId:r})=>{let[i,c]=G({name:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""});x(()=>{l&&r&&c(e=>({...e,epicId:r}))},[l,r]),x(()=>{l&&c({name:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:r||"",sprintId:"none",assignee:""})},[l]);let w=e=>{e.preventDefault(),i.name.trim()&&(D({name:i.name.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({name:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:r||"",sprintId:"none",assignee:""}),u())},s=(e,v)=>{c(B=>({...B,[e]:v}))};return t(h,{open:l,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:"name",children:"Task Title"}),t(y,{id:"name",value:i.name,onChange:e=>s("name",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})]}),!r&&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(n,{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(n,{value:"none",children:"No Sprint"}),F.map(e=>t(n,{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(n,{value:"none",children:"No Assignee"}),L.map(e=>t(n,{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 +0,0 @@
1
- import{a as E}from"./chunk-KW6L6KBY.mjs";import{a as k}from"./chunk-Z22NSJMF.mjs";import{a as w}from"./chunk-B4H6T2GP.mjs";import{a as h}from"./chunk-L5JPAKPM.mjs";import{b as d}from"./chunk-ZUA4KNIR.mjs";import{b as c}from"./chunk-CSBGSBEU.mjs";import{a as N}from"./chunk-YO3GQYRJ.mjs";import{useState as p,useRef as y,useEffect as T}from"react";import{Plus as q,Move as G,Edit2 as J,Trash2 as K,Check as Q,X as W}from"lucide-react";import{Fragment as Y,jsx as t,jsxs as s}from"react/jsx-runtime";var ce=({tasks:C,epics:D,sprints:Z,onUpdateTask:P,onTaskClick:H,onAddTaskToEpic:B,onAddEpic:S,onUpdateEpic:z,onDeleteEpic:R})=>{let[m,b]=p(null),[l,f]=p(null),[r,o]=p({}),[u,x]=p(0),n=y(null),I=y(null);T(()=>{let e=()=>{if(n.current){let v=n.current.offsetHeight;x(v)}};e();let i=new ResizeObserver(e);n.current&&i.observe(n.current);let g=()=>{setTimeout(e,100)};return window.addEventListener("storage",g),()=>{i.disconnect(),window.removeEventListener("storage",g)}},[]),T(()=>{let e=setTimeout(()=>{n.current&&x(n.current.offsetHeight)},300);return()=>clearTimeout(e)},[l]);let $=e=>{b(e)},A=e=>{e.preventDefault()},L=(e,i)=>{e.preventDefault(),m&&m.epicId!==i&&(P(m.id,{epicId:i}),b(null))},M=e=>C.filter(i=>i.epicId===e),O=e=>{f(e.id),o({name:e.name,description:e.description,confidence:e.confidence,phase:e.phase,progress:e.progress})},j=()=>{l&&r.name&&(z(l,r),f(null),o({}))},F=()=>{f(null),o({})},V=e=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&R(e)},_=e=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[e]||`Phase ${e}`,U=e=>{switch(e){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return s("div",{ref:I,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[t("div",{ref:n,className:"flex-shrink-0",children:t(k,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-to-r from-rose-600 via-pink-600 to-fuchsia-600",primaryAction:{label:"Add epic",onClick:S}})}),t("div",{className:"flex-1 min-h-0 mt-8",children:t("div",{className:"h-full overflow-y-auto",style:{height:u>0?`calc(100vh - ${u+120}px)`:"calc(100vh - 12rem)"},children:t("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 auto-rows-max",children:D.map(e=>{let i=M(e.id),g=i.reduce((a,X)=>a+X.points,0),v=u>0?`calc(100vh - ${u+200}px)`:"calc(100vh - 14rem)";return s(N,{className:`flex flex-col ${l===e.id?"h-auto":""} bg-card shadow-sm`,style:{height:l===e.id?"auto":v,minHeight:"400px"},onDragOver:A,onDrop:a=>L(a,e.id),children:[t("div",{className:"p-4 border-b border-border",children:l===e.id?s("div",{className:"space-y-4",children:[s("div",{className:"flex items-center justify-between",children:[t(h,{value:r.name||"",onChange:a=>o({...r,name:a.target.value}),placeholder:"Epic name",className:"font-semibold"}),s("div",{className:"flex gap-2 ml-2",children:[t(d,{size:"sm",variant:"ghost",onClick:j,className:"p-1 h-8 w-8",children:t(Q,{className:"h-4 w-4"})}),t(d,{size:"sm",variant:"ghost",onClick:F,className:"p-1 h-8 w-8",children:t(W,{className:"h-4 w-4"})})]})]}),t(w,{value:r.description||"",onChange:a=>o({...r,description:a.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),s("div",{className:"grid grid-cols-2 gap-2",children:[s("div",{children:[t("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),s("select",{value:r.confidence||e.confidence,onChange:a=>o({...r,confidence:a.target.value}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[t("option",{value:"low",children:"Low"}),t("option",{value:"medium",children:"Medium"}),t("option",{value:"high",children:"High"})]})]}),s("div",{children:[t("label",{className:"text-xs text-muted-foreground",children:"Phase"}),t("select",{value:r.phase?.toString()||e.phase.toString(),onChange:a=>o({...r,phase:parseInt(a.target.value)}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[1,2,3,4,5,6,7,8,9].map(a=>s("option",{value:a.toString(),children:["Phase ",a]},a))})]})]}),s("div",{children:[t("label",{className:"text-xs text-muted-foreground",children:"Progress (%)"}),t(h,{type:"number",min:"0",max:"100",value:r.progress||e.progress,onChange:a=>o({...r,progress:parseInt(a.target.value)||0}),className:"text-xs"})]})]}):s(Y,{children:[s("div",{className:"flex items-center gap-2 mb-2",children:[t("div",{className:`w-4 h-4 rounded-full ${e.color}`}),t("h3",{className:"font-semibold text-foreground select-none flex-1",children:e.name}),s("div",{className:"flex gap-1",children:[t(d,{size:"sm",variant:"ghost",onClick:()=>O(e),className:"p-1 h-8 w-8",children:t(J,{className:"h-3 w-3"})}),t(d,{size:"sm",variant:"ghost",onClick:()=>V(e.id),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:t(K,{className:"h-3 w-3"})})]})]}),s("div",{className:"flex flex-wrap gap-2 mb-3",children:[s(c,{className:`text-xs ${U(e.confidence)}`,children:[e.confidence," confidence"]}),s(c,{variant:"outline",className:"text-xs",children:["Phase ",e.phase]}),s(c,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[i.length," tasks"]}),s(c,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[g," pts"]})]}),e.description&&t("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:e.description}),s("div",{className:"mb-3",children:[s("div",{className:"flex justify-between text-xs text-muted-foreground mb-1",children:[t("span",{className:"select-none",children:"Progress"}),s("span",{className:"select-none",children:[e.progress,"%"]})]}),t("div",{className:"w-full bg-muted rounded-full h-2",children:t("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${e.progress}%`}})})]}),s(d,{onClick:()=>B(e.id),variant:"outline",size:"sm",className:"w-full gap-2",children:[t(q,{className:"h-4 w-4"}),"Add Task"]})]})}),t("div",{className:"flex-1 p-4 overflow-y-auto",children:t("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${m?"border-primary bg-primary/10":"border-border"}`,children:i.length===0?s("div",{className:"flex flex-col items-center justify-center h-32 text-muted-foreground border-2 border-dashed border-border rounded-lg",children:[t(G,{className:"h-8 w-8 mb-2"}),t("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):i.map(a=>t(E,{task:a,epic:e,onDragStart:$,onTaskClick:H,isCompact:!0},a.id))})})]},e.id)})})})})]})};export{ce as a};
@@ -1 +0,0 @@
1
- import{a as l,b as m,d as c}from"./chunk-JHNVX4UB.mjs";import{a as p}from"./chunk-7BXIU4ZM.mjs";import{a as N}from"./chunk-B4H6T2GP.mjs";import{a as r}from"./chunk-TVZOULLL.mjs";import{a as D,f as g,g as P,i as h}from"./chunk-3UMMMQEH.mjs";import{a as v}from"./chunk-L5JPAKPM.mjs";import{b as s}from"./chunk-ZUA4KNIR.mjs";import{a as d}from"./chunk-MDJREBVI.mjs";import{useState as x}from"react";import{CalendarIcon as S}from"lucide-react";import{format as C}from"date-fns";import{jsx as t,jsxs as i}from"react/jsx-runtime";var I=({isOpen:b,onClose:f,onAddSprint:A})=>{let[e,o]=x({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),y=a=>{a.preventDefault(),!(!e.name||!e.startDate||!e.endDate)&&(A({name:e.name,description:e.description,startDate:e.startDate,endDate:e.endDate,isActive:e.isActive,isSelected:!1}),o({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),f())},u=()=>{o({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),f()};return t(D,{open:b,onOpenChange:u,children:i(g,{className:"sm:max-w-md",children:[t(P,{children:t(h,{children:"Add New Sprint"})}),i("form",{onSubmit:y,className:"space-y-4",children:[i("div",{className:"space-y-2",children:[t(r,{htmlFor:"name",children:"Sprint Name *"}),t(v,{id:"name",value:e.name,onChange:a=>o(n=>({...n,name:a.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),i("div",{className:"space-y-2",children:[t(r,{htmlFor:"description",children:"Description"}),t(N,{id:"description",value:e.description,onChange:a=>o(n=>({...n,description:a.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),i("div",{className:"grid grid-cols-2 gap-4",children:[i("div",{className:"space-y-2",children:[t(r,{children:"Start Date *"}),i(l,{children:[t(m,{asChild:!0,children:i(s,{variant:"outline",className:d("w-full justify-start text-left font-normal",!e.startDate&&"text-muted-foreground"),children:[t(S,{className:"mr-2 h-4 w-4"}),e.startDate?C(e.startDate,"PPP"):"Pick a date"]})}),t(c,{className:"w-auto p-0",align:"start",children:t(p,{mode:"single",selected:e.startDate,onSelect:a=>o(n=>({...n,startDate:a})),initialFocus:!0})})]})]}),i("div",{className:"space-y-2",children:[t(r,{children:"End Date *"}),i(l,{children:[t(m,{asChild:!0,children:i(s,{variant:"outline",className:d("w-full justify-start text-left font-normal",!e.endDate&&"text-muted-foreground"),children:[t(S,{className:"mr-2 h-4 w-4"}),e.endDate?C(e.endDate,"PPP"):"Pick a date"]})}),t(c,{className:"w-auto p-0",align:"start",children:t(p,{mode:"single",selected:e.endDate,onSelect:a=>o(n=>({...n,endDate:a})),initialFocus:!0,disabled:a=>e.startDate?a<e.startDate:!1})})]})]})]}),i("div",{className:"flex items-center space-x-2",children:[t("input",{type:"checkbox",id:"isActive",checked:e.isActive,onChange:a=>o(n=>({...n,isActive:a.target.checked})),className:"rounded border-gray-300"}),t(r,{htmlFor:"isActive",children:"Set as active sprint"})]}),i("div",{className:"flex justify-end gap-3 pt-4",children:[t(s,{type:"button",variant:"outline",onClick:u,children:"Cancel"}),t(s,{type:"submit",disabled:!e.name||!e.startDate||!e.endDate,children:"Add Sprint"})]})]})]})})};export{I as a};
@@ -1 +0,0 @@
1
- import{a as ae}from"./chunk-6DEY5ZDD.mjs";import{a as te}from"./chunk-Z22NSJMF.mjs";import{a as ee}from"./chunk-B4H6T2GP.mjs";import{a as _}from"./chunk-L5JPAKPM.mjs";import{b as d}from"./chunk-ZUA4KNIR.mjs";import{b as p}from"./chunk-CSBGSBEU.mjs";import{a as f}from"./chunk-YO3GQYRJ.mjs";import{useState as c,useEffect as De,useRef as se}from"react";import{Calendar as D,User as Ee,Plus as Te,CalendarDays as Be,Edit2 as ne,Trash2 as re,Check as Ae,X as $,ChevronDown as E,ChevronUp as T}from"lucide-react";import{Fragment as ie,jsx as t,jsxs as a}from"react/jsx-runtime";var Ue=({tasks:B,epics:le,sprints:x,onUpdateTask:oe,onTaskClick:de,onAddSprint:ce,onUpdateSprint:me,onDeleteSprint:H})=>{let[m,ue]=c([]),[b,pe]=c(new Set),[y,F]=c(null),[ge,k]=c(!1),[ve,A]=c(null),[I,O]=c(null),[u,w]=c({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[z,L]=c("upcoming"),[S,R]=c(!1),[g,fe]=c(0),h=se(null),xe=se(null);De(()=>{let e=()=>{h.current&&fe(h.current.offsetHeight)};e();let s=new ResizeObserver(e);return h.current&&s.observe(h.current),()=>s.disconnect()},[]);let j=e=>le.find(s=>s.id===e),he=e=>x.find(s=>s.id===e),Ne=e=>{let s={high:"bg-red-100 text-red-800 border-red-200",medium:"bg-orange-100 text-orange-800 border-orange-200",low:"bg-green-100 text-green-800 border-green-200"};return s[e]||s.medium},be=e=>{let s=e.trim().split(" ");if(s.length===1)return s[0];let n=s[0],r=s[s.length-1][0].toUpperCase();return`${n} ${r}`},U=e=>{let s={},n=[];return e.forEach(r=>{r.epicId?(s[r.epicId]||(s[r.epicId]=[]),s[r.epicId].push(r)):n.push(r)}),{tasksByEpic:s,unassignedTasks:n}},M=x.filter(e=>e.id!=="backlog"&&e.id!=="all-tasks"),V=M.filter(e=>{switch(z){case"active":return e.isActive;case"upcoming":return!e.isActive;default:return!0}}),X=M.filter(e=>m.includes(e.id)),v=B.filter(e=>!e.sprintId||e.sprintId==="backlog"||e.sprintId==="Backlog"),ye=v.reduce((e,s)=>e+(s.points||0),0),q=e=>{ue(s=>s.includes(e)?s.filter(n=>n!==e):s.length<3?[...s,e]:s)},C=e=>{pe(s=>{let n=new Set(s);return n.has(e)?n.delete(e):n.add(e),n})},ke=e=>{ce(e),k(!1)},G=e=>{O(e.id),w({name:e.name,description:e.description||"",startDate:e.startDate instanceof Date?e.startDate.toISOString().split("T")[0]:e.startDate,endDate:e.endDate instanceof Date?e.endDate.toISOString().split("T")[0]:e.endDate,isActive:e.isActive})},we=()=>{I&&(me(I,{name:u.name,description:u.description,startDate:new Date(u.startDate),endDate:new Date(u.endDate),isActive:u.isActive}),O(null))},Se=()=>{O(null),w({name:"",description:"",startDate:"",endDate:"",isActive:!1})},Ce=(e,s)=>{F(s),e.dataTransfer.effectAllowed="move"},J=e=>{e.preventDefault(),e.dataTransfer.dropEffect="move"},K=e=>{A(e)},Q=()=>{A(null)},W=(e,s)=>{if(e.preventDefault(),A(null),!y)return;let n=y.sprintId||void 0,r=s==="backlog"?void 0:s;n!==r&&oe(y.id,{sprintId:r}),F(null)},N=({task:e,showSprint:s=!1})=>{let n=e.epicId?j(e.epicId):null,r=e.sprintId?he(e.sprintId):null;return t(f,{className:"p-3 cursor-grab active:cursor-grabbing hover:shadow-md transition-all duration-200 border border-border bg-card hover:bg-accent/50",draggable:!0,onDragStart:o=>{o.dataTransfer.effectAllowed="move",o.dataTransfer.setData("text/plain",e.id),Ce(o,e)},onClick:o=>{y===null&&de(e)},style:{userSelect:"none"},children:a("div",{className:"space-y-2 pointer-events-none",children:[a("div",{className:"flex items-start justify-between gap-2",children:[t("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:e.name}),t(p,{className:`text-xs ${Ne(e.priority)}`,children:e.priority[0].toUpperCase()})]}),a("div",{className:"flex items-center justify-between text-xs",children:[a("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",children:n?.name})]}),t("span",{className:"text-muted-foreground",children:be(e.assignee?.value?.name)})]}),s&&r&&a("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[t(D,{className:"h-3 w-3"}),t("span",{children:r.name})]})]})})};return a("div",{ref:xe,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[t("div",{ref:h,className:"flex-shrink-0",children:t(te,{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:a("div",{className:"h-full",style:{height:g>0?`calc(100vh - ${g+120}px)`:"calc(100vh - 12rem)"},children:[a("div",{className:"mb-4",children:[t(f,{className:"p-3 bg-card shadow-sm",children:a("div",{className:"flex items-center justify-between",children:[a("div",{className:"flex items-center gap-3",children:[t("div",{children:t("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"})}),m.length>0&&t("div",{className:"flex items-center gap-2",children:t("div",{className:"flex flex-wrap gap-1",children:X.map(e=>a("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:()=>q(e.id),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:t($,{className:"h-4 w-4"})})]},e.id))})})]}),a("div",{className:"flex items-center gap-2",children:[a(d,{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"]}),a(d,{onClick:()=>R(!S),variant:"outline",size:"sm",className:"gap-1",children:[t(D,{className:"h-3 w-3"}),S?"Close":"Select"]})]})]})}),S&&t("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>R(!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 ${S?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:a(f,{className:"h-full rounded-none border-0 flex flex-col",children:[a("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[a("div",{className:"flex items-center justify-between",children:[t("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),t(d,{variant:"ghost",size:"sm",onClick:()=>R(!1),className:"h-8 w-8 p-0",children:t($,{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"})]}),a("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=>a(d,{variant:z===e.key?"default":"outline",size:"sm",onClick:()=>L(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:V.length>0?V.map(e=>{let s=m.includes(e.id),n=B.filter(i=>i.sprintId===e.id).length,r=!s&&m.length<3;return t("div",{className:`p-3 rounded-lg border transition-all ${s?"bg-primary/10 border-primary/30":r?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:I===e.id?a("div",{className:"space-y-3",children:[t(_,{value:u.name,onChange:i=>w(l=>({...l,name:i.target.value})),className:"text-sm",placeholder:"Sprint name"}),t(ee,{value:u.description,onChange:i=>w(l=>({...l,description:i.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),a("div",{className:"flex gap-2",children:[a(d,{size:"sm",onClick:()=>we(),className:"flex-1",children:[t(Ae,{className:"h-3 w-3 mr-1"}),"Save"]}),a(d,{size:"sm",variant:"outline",onClick:Se,className:"flex-1",children:[t($,{className:"h-3 w-3 mr-1"}),"Cancel"]})]})]}):a("div",{children:[a("div",{className:"flex items-start justify-between",children:[a("div",{className:"flex-1 min-w-0",children:[a("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(p,{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}),a("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[a("span",{className:"flex items-center gap-1",children:[t(Be,{className:"h-3 w-3"}),new Date(e.startDate).toLocaleDateString()]}),a("span",{className:"flex items-center gap-1",children:[t(Ee,{className:"h-3 w-3"}),n," tasks"]})]})]}),a("div",{className:"flex items-center gap-1 ml-2",children:[t(d,{size:"sm",variant:"ghost",onClick:()=>G(e),className:"h-6 w-6 p-0",children:t(ne,{className:"h-3 w-3"})}),e.id!=="backlog"&&e.id!=="all-tasks"&&t(d,{size:"sm",variant:"ghost",onClick:()=>H(e.id),className:"h-6 w-6 p-0 text-destructive hover:text-destructive",children:t(re,{className:"h-3 w-3"})})]})]}),t("div",{className:"flex items-center justify-between mt-2",children:t(d,{variant:s?"default":"outline",size:"sm",className:"text-xs w-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>q(e.id),disabled:!s&&m.length>=3,children:t("span",{className:"pointer-events-none select-none",children:s?"Deselect":m.length>=3?"Limit Reached":"Select"})})})]})},e.id)}):a("div",{className:"text-center py-8 text-muted-foreground",children:[t(D,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),a("p",{className:"text-sm",children:['No sprints found for "',z,'" filter']}),t(d,{variant:"link",size:"sm",onClick:()=>L("all"),className:"text-xs",children:"Show all sprints"})]})}),m.length===0&&t("div",{className:"mt-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:a("div",{className:"text-center",children:[t(D,{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"})]})})]})]})})]}),a("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:a(f,{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:J,onDragEnter:()=>K("backlog"),onDragLeave:Q,onDrop:e=>W(e,"backlog"),style:{height:g>0?`calc(100vh - ${g+200}px)`:"calc(100vh - 16rem)"},children:[a("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"}),a("div",{className:"flex items-center gap-2",children:[a(p,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[v.length," tasks"]}),a(p,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[ye," pts"]})]})]}),t("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${ve==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:e,unassignedTasks:s}=U(v);return a(ie,{children:[Object.entries(e).map(([n,r])=>{let i=j(n);if(!i)return null;let l=b.has(n);return a("div",{className:"space-y-2",children:[a("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:()=>C(n),children:[t("div",{className:`w-3 h-3 rounded-full ${i.color}`}),t("span",{className:"font-medium text-muted-foreground",children:i.name}),a("span",{className:"text-muted-foreground",children:["(",r.length,")"]}),t("div",{className:"ml-auto",children:l?t(E,{className:"h-3 w-3 text-muted-foreground"}):t(T,{className:"h-3 w-3 text-muted-foreground"})})]}),!l&&t("div",{className:"space-y-2 pl-2",children:r.map(o=>t(N,{task:o},o.id))})]},n)}),s.length>0&&(()=>{let n=b.has("no-epic");return a("div",{className:"space-y-2",children:[a("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:()=>C("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"}),a("span",{className:"text-muted-foreground",children:["(",s.length,")"]}),t("div",{className:"ml-auto",children:n?t(E,{className:"h-3 w-3 text-muted-foreground"}):t(T,{className:"h-3 w-3 text-muted-foreground"})})]}),!n&&t("div",{className:"space-y-2 pl-2",children:s.map(r=>t(N,{task:r},r.id))})]})})(),v.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"}),v.length>0&&Object.keys(e).length===0&&s.length===0&&a("div",{className:"space-y-2",children:[t("div",{className:"text-xs text-muted-foreground mb-2",children:"Direct backlog tasks:"}),v.map(n=>t(N,{task:n},n.id))]})]})})()})]})}),X.map(e=>{let s=B.filter(r=>r.sprintId===e.id),n=s.reduce((r,i)=>r+(i.points||0),0);return a(f,{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:J,onDragEnter:()=>K(e.id),onDragLeave:Q,onDrop:r=>W(r,e.id),style:{height:g>0?`calc(100vh - ${g+200}px)`:"calc(100vh - 16rem)"},children:[a("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[a("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"})]}),a("div",{className:"flex items-center gap-2",children:[a(p,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[s.length," tasks"]}),a(p,{variant:"outline",className:"bg-blue-50 text-blue-700 border-blue-200",children:[n," pts"]}),t(d,{size:"sm",variant:"ghost",onClick:()=>G(e),className:"h-6 px-2",children:t(ne,{className:"h-3 w-3"})}),e.id!=="backlog"&&e.id!=="all-tasks"&&t(d,{size:"sm",variant:"ghost",onClick:()=>H(e.id),className:"h-6 px-2 text-destructive hover:text-destructive",children:t(re,{className:"h-3 w-3"})})]})]}),t("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:r,unassignedTasks:i}=U(s);return a(ie,{children:[Object.entries(r).map(([l,o])=>{let P=j(l);if(!P)return null;let Y=b.has(l);return a("div",{className:"space-y-2",children:[a("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:()=>C(l),children:[t("div",{className:`w-3 h-3 rounded-full ${P.color}`}),t("span",{className:"font-medium text-muted-foreground",children:P.name}),a("span",{className:"text-muted-foreground",children:["(",o.length,")"]}),t("div",{className:"ml-auto",children:Y?t(E,{className:"h-3 w-3 text-muted-foreground"}):t(T,{className:"h-3 w-3 text-muted-foreground"})})]}),!Y&&t("div",{className:"space-y-2 pl-2",children:o.map(Z=>t(N,{task:Z},Z.id))})]},l)}),i.length>0&&(()=>{let l=b.has("no-epic");return a("div",{className:"space-y-2",children:[a("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:()=>C("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"}),a("span",{className:"text-muted-foreground",children:["(",i.length,")"]}),t("div",{className:"ml-auto",children:l?t(E,{className:"h-3 w-3 text-muted-foreground"}):t(T,{className:"h-3 w-3 text-muted-foreground"})})]}),!l&&t("div",{className:"space-y-2 pl-2",children:i.map(o=>t(N,{task:o},o.id))})]})})(),s.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(ae,{isOpen:ge,onClose:()=>k(!1),onAddSprint:ke})]})})]})};export{Ue as a};
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a as c}from"./chunk-UAEEBFHJ.mjs";import{a as p}from"./chunk-VGWDYD6Z.mjs";import{a as d}from"./chunk-Z22NSJMF.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,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a as X}from"./chunk-2C4UDLVF.mjs";import{a as Q}from"./chunk-6TUNKKV7.mjs";import{a as L}from"./chunk-4HHGVL3E.mjs";import{a as W}from"./chunk-QBUU2AQL.mjs";import{a as J}from"./chunk-O57JJTH5.mjs";import{a as z}from"./chunk-ORNGKQM7.mjs";import{a as q}from"./chunk-4A3MGS6I.mjs";import{a as $}from"./chunk-EOR2BAI2.mjs";import{useEffect as o,useState as s}from"react";import{useRouter as Je}from"next/navigation";import{jsx as a,jsxs as Qe}from"react/jsx-runtime";function Le({title:Xe="",initialTasks:h=[],initialEpics:D=[],initialSprints:S=[],initialProjects:v=[],initialReminders:E=[],initialColleagues:A=[],initialUsers:w=[],initialFiles:C=[],initialView:P="kanban",onAddTask:Y,onUpdateTask:Z,onDeleteTask:_,onTaskClick:Ye,onAddEpic:ee,onUpdateEpic:te,onDeleteEpic:ie,onAddTaskToEpic:Ze,onAddSprint:ne,onUpdateSprint:se,onDeleteSprint:ae,onAddProject:oe,onUpdateProject:de,onDeleteProject:re,onFileAdd:le,onFileEdit:ce,onFileDelete:pe,onFileClick:me,onAddReminder:ge,onUpdateReminder:ke,onDeleteReminder:Te,onViewChange:ue,onToggleMobileMenu:fe,onTeamClick:_e,onTeamChange:et,onCopilotClick:tt,handleAddComment:he}){let[p,d]=s(h),[l,m]=s(D),[c,g]=s(S),[De,k]=s(v),[Se,T]=s(E),[U,ve]=s(A),[F,Ee]=s(w),[Ae,R]=s(C),[we,M]=s(!1),[Ce,O]=s(!1),[Pe,V]=s(null),[Ue,j]=s(null),[I,B]=s(null),[r,N]=s(P||"kanban"),[it,be]=s(!1),x=Je();o(()=>{d(h)},[h]),o(()=>{g(S)},[S]),o(()=>{m(D)},[D]),o(()=>{k(v)},[v]),o(()=>{R(C)},[C]),o(()=>{Ee(w)},[w]),o(()=>{ve(A)},[A]),o(()=>{T(E)},[E]),o(()=>{N(P)},[P]);let ye=l.filter(e=>e.isSelected).map(e=>e.id),u=c.find(e=>e.isSelected),Fe=p.filter(e=>{let t=ye.includes(e.epicId);return!u||u.id==="all-tasks"?t:u.id==="backlog"?t&&!e.sprintId:t&&e.sprintId===u.id}),nt=e=>Fe.filter(t=>t.status===e),st=e=>{let t={};return l.forEach(i=>{t[i.id]=e.filter(n=>n.epicId===i.id)}),t},at=e=>{B(e)},ot=e=>{I&&(d(t=>t.map(i=>i.id===I.id?{...i,status:e}:i)),B(null))},G=e=>{let t={...e,id:Date.now().toString(),createdAt:new Date};d(i=>[...i,t]),Y?.(t)},f=async(e,t)=>(d(i=>i.map(n=>n.id===e?{...n,...t}:n)),await Z?.(e,t)),dt=async(e,t)=>{f(e,t)},H=e=>{d(t=>t.filter(i=>i.id!==e)),Pe?.id===e&&V(null),_?.(e)},rt=async e=>{H(e)},lt=e=>{let t={...e,id:Date.now().toString(),isSelected:!1};k(i=>[...i,t]),oe?.(e)},ct=(e,t)=>{k(i=>i.map(n=>n.id===e?t.isSelected?(x.push(`/project/${e}`),{...n,...t}):{...n,...t}:t.isSelected&&e!==n.id?{...n,isSelected:!1}:n)),de?.(e,t)},pt=e=>{k(t=>t.filter(i=>i.id!==e)),re?.(e)},K=e=>{let t={...e,id:Date.now().toString(),isSelected:!0};m(i=>[...i,t]),ee?.({...t})},Re=()=>{O(!0)},Me=(e,t)=>{m(i=>i.map(n=>n.id===e?{...n,...t}:n)),te?.(e,t)},Oe=e=>{m(t=>t.filter(i=>i.id!==e)),d(t=>t.filter(i=>i.epicId!==e)),ie?.(e)},Ve=e=>{let t={...e,id:Date.now().toString(),isSelected:!1};g(i=>[...i,t]),ne?.(e)},je=(e,t)=>{g(i=>i.map(n=>n.id===e?t.isSelected?{...n,...t}:{...n,...t}:t.isSelected&&e!==n.id?{...n,isSelected:!1}:n)),se?.(e,t)},Ie=e=>{e==="backlog"||e==="all-tasks"||(g(t=>t.filter(i=>i.id!==e)),d(t=>t.map(i=>i.sprintId===e?{...i,sprintId:void 0}:i)),ae?.(e))},b=e=>{V(e)},Be=e=>{e==="planning"&&window.innerWidth<768||(N(e),ue?.(e))},mt=()=>{be(e=>!e),fe?.()},gt=()=>{x.push("/")},kt=e=>{console.log("Switching to team:",e)},Tt=e=>{console.log("Switching to team:",e)},Ne=e=>{j(e),M(!0)},xe=()=>{M(!1),j(null)},Ge=e=>{let t={...e,id:Date.now().toString(),createdAt:new Date};T(i=>[...i,t]),ge?.(e)},He=(e,t)=>{T(i=>i.map(n=>n.id===e?{...n,...t}:n)),ke?.(e,t)},Ke=e=>{T(t=>t.filter(i=>i.id!==e)),Te?.(e)},We=()=>{le?.()},$e=e=>{ce?.(e)},qe=e=>{R(t=>t.filter(i=>i.name!==e)),pe?.(e)},ze=e=>{me?.(e)},ut=[{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"}],ft=()=>{switch(r){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")}],ht=y.sort((e,t)=>t.lastUsed.getTime()-e.lastUsed.getTime()).slice(0,3),Dt=y.length>3,St=y.slice(3);return Qe($,{currentView:r,onViewChange:Be,children:[r==="kanban"&&a("div",{className:"h-full overflow-hidden",children:a(J,{initialProjects:De,initialEpics:l,initialSprints:c,initialTasks:p,initialColleagues:U,initialUsers:F,onAddTask:G,onUpdateTask:f,onDeleteTask:H,onTaskClick:b,onAddEpic:K,onAddComment:he})}),r==="planning"&&a("div",{className:"hidden md:block h-full",children:a(Q,{tasks:p,epics:l,sprints:c,onUpdateTask:f,onTaskClick:b,onAddSprint:Ve,onUpdateSprint:je,onDeleteSprint:Ie})}),r==="tasks"&&a("div",{className:"h-full",children:a(X,{initialReminders:Se,initialColleagues:U,onAddReminder:Ge,onUpdateReminder:He,onDeleteReminder:Ke})}),r==="files"&&a("div",{className:"h-full",children:a(W,{initialFiles:Ae,onFileAdd:We,onFileEdit:$e,onFileDelete:qe,onFileClick:ze,compactView:!1})}),r==="epics"&&a("div",{className:"h-full",children:a(L,{tasks:p,epics:l,sprints:c,onUpdateTask:f,onTaskClick:b,onAddTaskToEpic:Ne,onAddEpic:Re,onUpdateEpic:Me,onDeleteEpic:Oe})}),a(q,{isOpen:we,onClose:xe,onAddTask:G,epics:l,sprints:c,assignees:[...U,...F],defaultEpicId:Ue||void 0}),a(z,{isOpen:Ce,onClose:()=>O(!1),onAddEpic:K})]})}export{Le as a};
@@ -1 +0,0 @@
1
- import{a}from"./chunk-YO3GQYRJ.mjs";import{User as u,AlertCircle as p,Bug as g,Zap as f,BookOpen as b}from"lucide-react";import{jsx as e,jsxs as t}from"react/jsx-runtime";var y=({task:r,epic:x,onDragStart:i,onTaskClick:d,isCompact:m=!1})=>{let s=v=>{i(r)},o=()=>{d(r)},l=()=>{switch(r.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},n=()=>{switch(r.type){case"story":return e(b,{className:"h-3 w-3"});case"bug":return e(g,{className:"h-3 w-3"});case"spike":return e(f,{className:"h-3 w-3"});case"task":default:return e(p,{className:"h-3 w-3"})}},c=()=>{switch(r.type){case"story":return"bg-primary/20 text-primary";case"bug":return"bg-destructive/20 text-destructive";case"spike":return"bg-accent/20 text-accent";case"task":default:return"bg-muted text-muted-foreground"}};return m?e(a,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:s,onClick:o,children:t("div",{className:"flex items-center gap-2",children:[e("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${c()}`,children:n()}),e("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:r.name})]})}):t(a,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:s,onClick:o,children:[t("div",{className:"flex items-center justify-between mb-3",children:[t("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${c()}`,children:[n(),e("span",{className:"capitalize",children:r.type})]}),t("div",{className:"flex gap-1",children:[e("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${l()}`,children:r.priority}),e("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-xs font-medium",children:r.points})]})]}),e("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:r.name}),e("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:r.description}),e("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:t("div",{className:"flex items-center gap-1",children:[e(u,{className:"h-4 w-4"}),e("span",{children:r.assignee?.value?.name})]})})]})};export{y as a};
@@ -1,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a as p}from"./chunk-2XMVNXF6.mjs";import{a as d}from"./chunk-KPTGYVDM.mjs";import{a as m}from"./chunk-Z22NSJMF.mjs";import{a as i,f as l,g as n,i as s,j as c}from"./chunk-3UMMMQEH.mjs";import{useState as g}from"react";import{motion as D,AnimatePresence as N}from"motion/react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function C({projects:u=[],onAddProject:f,handleProjectOpen:j,handleProjectShare:y}){let[P,t]=g(!1),[b,r]=g(!1),v=async a=>{r(!0);try{await f(a),t(!1)}catch(w){console.error("Error creating project:",w)}finally{r(!1)}},h=()=>{t(!0)};return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(N,{mode:"wait",children:o(D.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[e(m,{title:"Project Management",description:"Organise your work into projects to collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:h}}),o("section",{className:"space-y-4 mt-8",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:u.map(a=>e(d,{project:a,onOpen:j,onShare:y},a.name))})]})]},"projects-index-view")}),e(i,{open:P,onOpenChange:t,children:o(l,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[o(n,{className:"sr-only",children:[e(s,{children:"Create New Project"}),e(c,{children:"Fill out the form below to create a new project."})]}),e(p,{onSubmit:v,onCancel:()=>t(!1),isLoading:b,className:"border-0 shadow-none"})]})})]})}export{C as a};
@@ -1 +0,0 @@
1
- import{a as n}from"./chunk-AB43AQKL.mjs";import{a as g}from"./chunk-EOXVYLPB.mjs";import{a as u,b as m}from"./chunk-E4TE4NV6.mjs";import{a as o}from"./chunk-TVZOULLL.mjs";import{b as i}from"./chunk-ZUA4KNIR.mjs";import{Calendar as w,Clock as C,User as D,Trash2 as S,BookOpen as T,Bug as L,Zap as B,AlertCircle as k,Loader2 as I,Check as A,X as G}from"lucide-react";import{jsx as a,jsxs as t}from"react/jsx-runtime";var P=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:T},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:k},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:L},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:B}],V=[{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"}];var R=({task:s,epics:b,sprints:x,lastUpdated:v,onUpdateTask:r,onClose:f,onDelete:N,isUpdating:l=!1,isDeleting:p=!1,deleteState:d="idle",teamMembers:y})=>{let J=e=>e.split(" ").map(c=>c[0]).join("").toUpperCase(),h=()=>d==="loading"?t(i,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[a(I,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):d==="success"?t(i,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[a(A,{className:"h-3 w-3"}),"Deleted"]}):d==="error"?t(i,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[a(G,{className:"h-3 w-3"}),"Delete failed"]}):t(i,{onClick:N,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:l||p,children:[a(S,{className:"h-3 w-3"}),"Delete Task"]});return t("div",{className:"flex flex-col h-full",children:[t("div",{className:"space-y-4",style:{opacity:l?.6:1},children:[t("div",{className:"space-y-2",children:[a(o,{className:"text-xs text-muted-foreground",children:"Status"}),a(n,{label:"",value:s.status,onValueChange:e=>r("status",e),options:[{value:"todo",label:"To Do"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:l})]}),t("div",{className:"space-y-2",children:[a(o,{className:"text-xs text-muted-foreground",children:"Type"}),a(u,{type:"single",value:s.type,onValueChange:e=>e&&r("type",e),className:"grid grid-cols-2 gap-1",disabled:l,children:P.map(e=>{let c=e.icon;return t(m,{value:e.value,className:"flex items-center gap-1 text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:l,children:[a(c,{className:"h-3 w-3"}),e.label]},e.value)})})]}),t("div",{className:"space-y-2",children:[a(o,{className:"text-xs text-muted-foreground",children:"Priority"}),a(u,{type:"single",value:s.priority,onValueChange:e=>e&&r("priority",e),className:"grid grid-cols-3 gap-1",disabled:l,children:V.map(e=>a(m,{value:e.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:l,children:e.label},e.value))})]}),t("div",{className:"space-y-2",children:[a(o,{className:"text-xs text-muted-foreground",children:"Story Points"}),a("input",{type:"number",min:"1",max:"100",value:s.points||1,onChange:e=>r("points",e.target.value),className:"w-full h-8 px-2 text-xs border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:l})]}),t("div",{className:"space-y-2",children:[a(o,{className:"text-xs text-muted-foreground",children:"Epic"}),a(n,{label:"",value:s.epicId,onValueChange:e=>r("epicId",e),options:(b||[]).map(e=>({value:e.id,label:e?.name,color:e.color})),showColor:!0,disabled:l})]}),t("div",{className:"space-y-2",children:[a(o,{className:"text-xs text-muted-foreground",children:"Sprint"}),a(n,{label:"",value:s.sprintId||"none",onValueChange:e=>r("sprintId",e==="none"?"":e),options:[{value:"none",label:"No Sprint"},...(x||[]).map(e=>({value:e.id,label:`${e?.name}${e.isActive?" (Active)":""}`}))],disabled:l})]}),t("div",{className:"space-y-2",children:[a(o,{className:"text-xs text-muted-foreground",children:"Assignee"}),a(g,{label:"",value:s.assignee?.value?.name,onValueChange:e=>r("assignee",e),options:y.map(e=>({value:`${typeof e.email=="string"?"users":"digital-colleagues"}:${e.id}`,label:e?.name})),placeholder:"Search team members...",allowCustomValue:!0,disabled:l})]})]}),t("div",{className:"mt-auto pt-4 space-y-4",children:[t("div",{className:"space-y-2",children:[a(i,{onClick:f,variant:"outline",className:"w-full h-8 text-xs",disabled:l||p,children:"Close"}),h()]}),t("div",{className:"pt-4 border-t border-border space-y-2",children:[a("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),t("div",{className:"flex items-center justify-between",children:[a("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),t("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[a(D,{className:"h-3 w-3"}),a("span",{children:"System"})]})]}),t("div",{className:"flex items-center justify-between",children:[a("span",{className:"text-xs text-muted-foreground",children:"Created"}),t("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[a(w,{className:"h-3 w-3"}),a("span",{children:new Date(s.createdAt)?.toLocaleDateString()})]})]}),t("div",{className:"flex items-center justify-between",children:[a("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),t("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[a(C,{className:"h-3 w-3"}),t("span",{children:[new Date(v).toLocaleDateString()," at"," ",new Date(v).toLocaleTimeString()]})]})]})]})]})]})};export{R as a};
@@ -1 +0,0 @@
1
- import{a as U}from"./chunk-MBPTBEOX.mjs";import{a as C}from"./chunk-6SWKEZN6.mjs";import{a as u}from"./chunk-DFIXTV2M.mjs";import{a as x,f as y,g as S,i as w}from"./chunk-3UMMMQEH.mjs";import{useEffect as O,useState as l}from"react";import{Loader2 as R,Check as X,X as j}from"lucide-react";import{jsx as t,jsxs as o}from"react/jsx-runtime";var Z=({isOpen:b,onClose:f,initialTask:m,epics:N,sprints:P,onUpdateTask:k,onDeleteTask:I,onAddComment:T,colleagues:A})=>{let[s,c]=l(m),[E,p]=l(new Date),[n,e]=l("idle"),[g,d]=l("idle"),[q,z]=l([]);O(()=>{c(m)},[m]);let D=async(a,i)=>{if(i!==s[a]){e("loading");try{let r=await k(s.id,{[a]:i});c(r),p(new Date),e("success"),setTimeout(()=>e("idle"),1500)}catch{e("error"),setTimeout(()=>e("idle"),3e3)}}},M=async(a,i)=>{if(i!==s[a]){e("loading");try{let r=await k(s.id,{[a]:i});c(r),p(new Date),e("success"),setTimeout(()=>e("idle"),1500)}catch{e("error"),setTimeout(()=>e("idle"),3e3)}}},F=async a=>{if(T){e("loading");try{let i=await T?.({content:a,taskId:s.id});c(i),p(new Date),e("success"),setTimeout(()=>e("idle"),1500)}catch{e("error"),setTimeout(()=>e("idle"),3e3)}}},H=async()=>{d("loading");try{await I(s.id),d("success"),setTimeout(()=>{f(),d("idle")},1e3)}catch{d("error"),setTimeout(()=>d("idle"),3e3)}},v=n!=="loading"&&g!=="loading",h=()=>{v&&f()},L=()=>n==="loading"?o("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t(R,{className:"h-4 w-4 animate-spin"}),t("span",{children:"Updating..."})]}):n==="success"?o("div",{className:"flex items-center gap-2 text-sm text-success",children:[t(X,{className:"h-4 w-4"}),t("span",{children:"Updated successfully"})]}):n==="error"?o("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[t(j,{className:"h-4 w-4"}),t("span",{children:"Update failed"})]}):null;return t(x,{open:b,onOpenChange:h,children:o(y,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[o(S,{children:[t(w,{className:"sr-only",children:s.name}),o("div",{className:"flex items-center justify-between",children:[t("div",{className:"flex-1",children:L()}),!v&&t("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),o("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[o("div",{className:"lg:col-span-2 space-y-4",children:[t(u,{fieldName:"name",value:s.name,label:"",onSave:D,className:"border-b border-border pb-3",disabled:n==="loading"}),t(u,{fieldName:"description",value:s.description,label:"Description",multiline:!0,onSave:D,disabled:n==="loading"}),t(C,{comments:(s?.comments||[]).map(a=>({author:a.author.value.name,createdAt:new Date(a.timestamp),text:a.content,id:a.id})),onAddComment:F})]}),t(U,{task:s,epics:N,sprints:P,lastUpdated:E,onUpdateTask:M,onClose:h,onDelete:H,isUpdating:n==="loading",isDeleting:g==="loading",deleteState:g,teamMembers:A})]})]})})};export{Z as a};
@@ -1 +0,0 @@
1
- import{a as j}from"./chunk-KZCIHFTM.mjs";import{a as $}from"./chunk-NKDFAFWH.mjs";import{a as z}from"./chunk-ORNGKQM7.mjs";import{a as L}from"./chunk-4A3MGS6I.mjs";import{a as K}from"./chunk-KW6L6KBY.mjs";import{a as U}from"./chunk-Z22NSJMF.mjs";import{b as R}from"./chunk-CSBGSBEU.mjs";import{useEffect as l,useState as n,useRef as F}from"react";import{jsx as i,jsxs as w}from"react/jsx-runtime";var Ae=({initialTasks:f=[],initialEpics:k=[],initialSprints:T=[],initialUsers:V=[],initialColleagues:q=[],initialProjects:le=[],onAddTask:G,onUpdateTask:v,onDeleteTask:y,onTaskClick:J,onAddEpic:Q,onAddComment:W})=>{let[b,d]=n(f),[c,S]=n(k),[h,X]=n(T),[x,O]=n(!1),[P,N]=n(!1),[p,E]=n(null),[C,H]=n(null),[B,pe]=n(V),[M,ue]=n(q),[u,I]=n(0),o=F(null),Y=F(null),A=c.filter(e=>!0).map(e=>e.id),m=h.find(e=>e.isSelected);A.push("no-epic"),l(()=>{d(f)},[f]),l(()=>{S(k)},[k]),l(()=>{X(T)},[T]),l(()=>{let e=()=>{if(o.current){let a=o.current.offsetHeight;I(a)}};e();let t=new ResizeObserver(e);o.current&&t.observe(o.current);let s=()=>{setTimeout(e,100)};return window.addEventListener("storage",s),()=>{t.disconnect(),window.removeEventListener("storage",s)}},[]),l(()=>{let e=setTimeout(()=>{o.current&&I(o.current.offsetHeight)},300);return()=>clearTimeout(e)},[x,P]);let Z=b.filter(e=>{let t=A.includes(e.epicId)||!e.epicId;return!m||m.id==="all-tasks"?t:m.id==="backlog"?t&&!e.sprintId:t&&e.sprintId===m.id}),_=e=>Z.filter(t=>t.status===e),ee=e=>{let t={};return c.forEach(s=>{t[s.id]=e.filter(a=>a.epicId===s.id)}),t["no-epic"]=e.filter(s=>!s.epicId),t},te=e=>{H(e)},se=e=>{C&&(d(t=>t.map(s=>s.id===C.id?{...s,status:e}:s)),v?.(C.id,{status:e}),H(null))},ie=e=>{let t={...e,id:Date.now().toString(),createdAt:new Date};d(s=>[...s,t]),G?.(e)},ae=async(e,t)=>{d(a=>a.map(r=>r.id===e?{...r,...t}:r)),v&&await v(e,t);let s=b.find(a=>a.id===e);if(!s)throw new Error("Task not found");return{...s,...t}},ne=async e=>{d(t=>t.filter(s=>s.id!==e)),p?.id===e&&E(null),y&&await y(e)},oe=e=>{let t={...e,id:Date.now().toString(),isSelected:!0};S(s=>[...s,t]),Q?.(e)},re=e=>{E(e),J?.(e)},de=[{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"}],ce=u>0?`calc(100vh - ${u+120}px)`:"calc(100vh - 12rem)";return w("div",{ref:Y,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[i("div",{ref:o,className:"flex-shrink-0",children:i(U,{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:()=>O(!0)},secondaryAction:{label:"Add epic",onClick:()=>N(!0)}})}),i("div",{className:"flex-1 min-h-0 mt-8",children:i("div",{className:"h-full",style:{height:u>0?`calc(100vh - ${u+120}px)`:"calc(100vh - 12rem)"},children:i("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:de.map(e=>{let t=_(e.status),s=ee(t);return i(j,{title:e.title,status:e.status,taskCount:t.length,onDrop:se,isCompact:e.status==="done",height:ce,children:A.map(a=>{let r=c.find(g=>g.id===a),D=s[a]||[];return D.length===0?null:w("div",{className:"mb-6",children:[w("div",{className:"flex items-center gap-2 mb-3",children:[i("div",{className:`w-3 h-3 rounded-full ${r?.color}`}),i("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:r?.name||"No Epic"}),i(R,{variant:"secondary",className:"text-xs",children:D.length})]})," ",i("div",{className:"space-y-3",children:D.map(g=>i(K,{task:g,epic:r,onDragStart:te,onTaskClick:re,isCompact:e.status==="done"},g.id))})]},a)})},e.id)})})})}),i(L,{isOpen:x,onClose:()=>O(!1),onAddTask:ie,assignees:[...M,...B],epics:c,sprints:h}),i(z,{isOpen:P,onClose:()=>N(!1),onAddEpic:oe}),p&&i($,{isOpen:!!p,onClose:()=>E(null),initialTask:p,epics:c,sprints:h,onUpdateTask:ae,onDeleteTask:ne,colleagues:[...M,...B],onAddComment:W})]})};export{Ae as a};
@@ -1 +0,0 @@
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{a as o}from"./chunk-L5JPAKPM.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,4 +0,0 @@
1
- "use client";
2
- "use strict";
3
-
4
- import{a as d}from"./chunk-YRMNCHFO.mjs";import{a as c}from"./chunk-B4H6T2GP.mjs";import{a as r}from"./chunk-TVZOULLL.mjs";import{a as u}from"./chunk-L5JPAKPM.mjs";import{b as m}from"./chunk-ZUA4KNIR.mjs";import{a as p,b as f,c as h,e as g}from"./chunk-YO3GQYRJ.mjs";import{useState as b,useEffect as M}from"react";import{Users as S,Edit as j}from"lucide-react";import{jsx as a,jsxs as t}from"react/jsx-runtime";function L({team:n,onSave:C,onCancel:v,isLoading:l=!1,title:y,submitLabel:w,cancelLabel:T="Cancel",readOnly:F=!1}){let[e,i]=b({name:"",description:"",systemMsg:"",useProjects:!1,useKnowledge:!1,useFiles:!1,useChat:!1,...n}),[o,N]=b(!F);M(()=>{n&&i(n)},[n]);let x=s=>{s.preventDefault();let D={id:e.id||Date.now(),name:e.name,description:e.description||null,systemMsg:e.systemMsg||null,useProjects:e.useProjects||!1,useKnowledge:e.useKnowledge||!1,useFiles:e.useFiles||!1,useChat:e.useChat||!1,updatedAt:new Date().toISOString(),createdAt:e.createdAt||new Date().toISOString()};C(D)},E=s=>{s.preventDefault(),N(!o)},k=y||(o?n?"Edit Team":"Create New Team":"View Team"),P=w||(n?"Update Team":"Create Team");return t(p,{className:"m-8 w-full max-w-4xl mx-auto",children:[a(f,{children:t(h,{className:"flex items-center gap-2",children:[a(S,{className:"h-5 w-5"}),k]})}),a(g,{children:t("form",{onSubmit:x,className:"space-y-6",children:[t("div",{className:"space-y-4",children:[t("div",{className:"space-y-2",children:[a(r,{htmlFor:"name",children:"Team Name *"}),a(u,{id:"name",value:e.name||"",onChange:s=>i({...e,name:s.target.value}),required:!0,disabled:l||!o,placeholder:"Enter team name..."})]}),t("div",{className:"space-y-2",children:[a(r,{htmlFor:"description",children:"Description"}),a(c,{id:"description",value:e.description||"",onChange:s=>i({...e,description:s.target.value}),rows:3,placeholder:"Brief description of this team...",disabled:l||!o})]}),t("div",{className:"space-y-2",children:[a(r,{htmlFor:"systemMsg",children:"Ways of working"}),a(c,{id:"systemMsg",value:e.systemMsg||"",onChange:s=>i({...e,systemMsg:s.target.value}),rows:3,placeholder:"Describe how this team works in as much detail as possible. Include processes, tools, systems, styles...",disabled:l||!o})]})]}),t("div",{className:"space-y-4",children:[a("h3",{className:"text-lg font-semibold",children:"Team Configuration"}),t("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t("div",{className:"flex items-center space-x-2",children:[a(d,{id:"useProjects",checked:e.useProjects||!1,onCheckedChange:s=>i({...e,useProjects:s}),disabled:l||!o}),a(r,{htmlFor:"useProjects",children:"Enable Projects"})]}),t("div",{className:"flex items-center space-x-2",children:[a(d,{id:"useKnowledge",checked:e.useKnowledge||!1,onCheckedChange:s=>i({...e,useKnowledge:s}),disabled:l||!o}),a(r,{htmlFor:"useKnowledge",children:"Enable Knowledge Base"})]}),t("div",{className:"flex items-center space-x-2",children:[a(d,{id:"useFiles",checked:e.useFiles||!1,onCheckedChange:s=>i({...e,useFiles:s}),disabled:l||!o}),a(r,{htmlFor:"useFiles",children:"Enable File Management"})]}),t("div",{className:"flex items-center space-x-2",children:[a(d,{id:"useChat",checked:e.useChat||!1,onCheckedChange:s=>i({...e,useChat:s}),disabled:l||!o}),a(r,{htmlFor:"useChat",children:"Enable Team Chat"})]})]})]}),t("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[a(m,{type:"button",variant:"outline",onClick:v,disabled:l,children:o?T:"Close"}),o?a(m,{type:"submit",disabled:l||!e.name?.trim(),children:l?"Saving...":P}):t(m,{type:"button",onClick:E,disabled:l,className:"gap-2",children:[a(j,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}export{L as a};
File without changes
File without changes