cortex-react-components 4.1.0 → 4.1.1

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 (137) hide show
  1. package/dist/{chunk-3DWDGYDG.mjs → chunk-3IXZB3VP.mjs} +1 -1
  2. package/dist/{chunk-RNHGLZYP.mjs → chunk-3NXXPFU2.mjs} +1 -1
  3. package/dist/{chunk-MKRRCFOB.mjs → chunk-3TIQCSIZ.mjs} +11 -11
  4. package/dist/{chunk-LRYXGV4F.mjs → chunk-4HKHDXKK.mjs} +1 -1
  5. package/dist/{chunk-CY7FKRON.mjs → chunk-5DC3DQNW.mjs} +3 -3
  6. package/dist/{chunk-2LTQMWSP.mjs → chunk-5M3NV6AD.mjs} +4 -4
  7. package/dist/{chunk-NSYYRG6A.mjs → chunk-64IBDKCH.mjs} +1 -1
  8. package/dist/{chunk-EEVXIKNB.mjs → chunk-7IMTNL53.mjs} +1 -1
  9. package/dist/{chunk-ENXQSGPR.mjs → chunk-ACB3ZV3C.mjs} +1 -1
  10. package/dist/{chunk-X6SIRDD4.mjs → chunk-AXO76PIN.mjs} +1 -1
  11. package/dist/{chunk-INMPZMQX.mjs → chunk-AZGPP2GE.mjs} +1 -1
  12. package/dist/{chunk-DRLNETNN.mjs → chunk-BAJ7NCAT.mjs} +1 -1
  13. package/dist/{chunk-3K6EVFOW.mjs → chunk-CUUAA2TB.mjs} +1 -1
  14. package/dist/{chunk-7MJIUQKX.mjs → chunk-D2USXRZZ.mjs} +1 -1
  15. package/dist/{chunk-KYY7BMXI.mjs → chunk-DOIUUDF6.mjs} +1 -1
  16. package/dist/{chunk-PAXCURFR.mjs → chunk-EGZL4DVZ.mjs} +1 -1
  17. package/dist/{chunk-MELQG7N7.mjs → chunk-ELQ5OCVA.mjs} +1 -1
  18. package/dist/{chunk-D3AHBPI5.mjs → chunk-FBCL4K4A.mjs} +2 -2
  19. package/dist/{chunk-3R2LCGLI.mjs → chunk-HLEMFDTD.mjs} +1 -1
  20. package/dist/{chunk-MACDPQR7.mjs → chunk-J36K6OVH.mjs} +6 -6
  21. package/dist/{chunk-7LM2P6N3.mjs → chunk-JJDC25TG.mjs} +2 -2
  22. package/dist/{chunk-6GO5N6ZP.mjs → chunk-KIZUBPPQ.mjs} +1 -1
  23. package/dist/{chunk-IQ67MHAY.mjs → chunk-LVLYUHSA.mjs} +1 -1
  24. package/dist/{chunk-2B5V6DGA.mjs → chunk-MKF47JMB.mjs} +4 -4
  25. package/dist/{chunk-QJQ66DYZ.mjs → chunk-MNJ5CMJM.mjs} +1 -1
  26. package/dist/{chunk-F6SQTC6R.mjs → chunk-NM7RODDO.mjs} +4 -4
  27. package/dist/{chunk-QFAIZZ35.mjs → chunk-PC6XUW27.mjs} +1 -1
  28. package/dist/{chunk-5OGDBGXG.mjs → chunk-PJZ5PWKP.mjs} +1 -1
  29. package/dist/{chunk-5TOKOCC7.mjs → chunk-PQW3UWE4.mjs} +1 -1
  30. package/dist/{chunk-IWQEM5KO.mjs → chunk-R4WRE5VN.mjs} +2 -2
  31. package/dist/{chunk-N5HTSJLI.mjs → chunk-S2JSIAMP.mjs} +1 -1
  32. package/dist/{chunk-6S7EQDLL.mjs → chunk-T2VDQBFT.mjs} +1 -1
  33. package/dist/{chunk-SJI6X5DK.mjs → chunk-T36HNGWV.mjs} +2 -2
  34. package/dist/{chunk-XCZCWSOY.mjs → chunk-UM7KTWAX.mjs} +2 -2
  35. package/dist/{chunk-QWW737QR.mjs → chunk-W3Z3KTSU.mjs} +1 -1
  36. package/dist/{chunk-WZBXR7J3.mjs → chunk-WADBAJVM.mjs} +3 -3
  37. package/dist/{chunk-HNVHGBNE.mjs → chunk-WNGLLRYA.mjs} +1 -1
  38. package/dist/{chunk-SJ64VL23.mjs → chunk-Y4KBMUT3.mjs} +1 -1
  39. package/dist/{chunk-3RYHYKVQ.mjs → chunk-Y7B7YO6Q.mjs} +1 -1
  40. package/dist/{chunk-KMGTUNRZ.mjs → chunk-ZD5DKC5T.mjs} +1 -1
  41. package/dist/{chunk-7HHLKQE4.mjs → chunk-ZJ5SRNYD.mjs} +2 -2
  42. package/dist/components/AdvancedComponents/AppSidebar.mjs +2 -2
  43. package/dist/components/AdvancedComponents/index.mjs +2 -2
  44. package/dist/components/Blocks/Banner.mjs +5 -5
  45. package/dist/components/Blocks/CallToAction.mjs +5 -5
  46. package/dist/components/Blocks/CollapsibleArea.mjs +6 -6
  47. package/dist/components/Blocks/Content.mjs +6 -6
  48. package/dist/components/Blocks/FeaturesBlock.mjs +5 -5
  49. package/dist/components/Blocks/ImageBlock.mjs +3 -3
  50. package/dist/components/Blocks/MediaBlock.mjs +3 -3
  51. package/dist/components/Blocks/RelatedPosts.mjs +7 -7
  52. package/dist/components/Blocks/RenderBlocks.mjs +8 -8
  53. package/dist/components/Blocks/ReusableContentBlock.mjs +8 -8
  54. package/dist/components/Blocks/index.mjs +10 -10
  55. package/dist/components/Cards/ContentCard.mjs +5 -5
  56. package/dist/components/Cards/FeatureCard.mjs +5 -5
  57. package/dist/components/Cards/index.mjs +5 -5
  58. package/dist/components/Chat/ChatInterface.mjs +1 -1
  59. package/dist/components/Chat/CopilotInterface.mjs +5 -5
  60. package/dist/components/Chat/PartTypes/MessageHandler.mjs +1 -1
  61. package/dist/components/Chat/PartTypes/index.mjs +3 -3
  62. package/dist/components/Chat/demo-long-messages.mjs +5 -5
  63. package/dist/components/Chat/demo-tests.mjs +5 -5
  64. package/dist/components/Chat/demo.mjs +5 -5
  65. package/dist/components/Chat/example-usage.mjs +5 -5
  66. package/dist/components/Chat/example-with-vercel-ai.mjs +5 -5
  67. package/dist/components/Chat/index.mjs +5 -5
  68. package/dist/components/DigitalColleagues/Views/TeamsIndexView.mjs +3 -3
  69. package/dist/components/Foundry/MainPage.mjs +2 -2
  70. package/dist/components/Foundry/Pages/dashboardpage.mjs +6 -6
  71. package/dist/components/Foundry/Views/ColleaguesView.mjs +3 -3
  72. package/dist/components/Foundry/Views/TeamsIndexView.mjs +3 -3
  73. package/dist/components/Foundry/Views/index.mjs +12 -12
  74. package/dist/components/Foundry/foundary-layout.mjs +3 -3
  75. package/dist/components/Foundry/index.mjs +17 -17
  76. package/dist/components/HeaderFooter/SectionHeading.mjs +6 -6
  77. package/dist/components/Heros/DashboardHero/DashboardHero.mjs +2 -2
  78. package/dist/components/Heros/DashboardHero/index.mjs +2 -2
  79. package/dist/components/Heros/HighImpact/index.mjs +6 -6
  80. package/dist/components/Heros/LowImpact/index.mjs +6 -6
  81. package/dist/components/Heros/MediumImpact/index.mjs +6 -6
  82. package/dist/components/Heros/RenderHero.mjs +9 -9
  83. package/dist/components/Heros/index.mjs +11 -11
  84. package/dist/components/Layouts/OutputHeaderFooter.mjs +8 -8
  85. package/dist/components/Layouts/Print.mjs +12 -12
  86. package/dist/components/Layouts/SlideShow.mjs +13 -13
  87. package/dist/components/Layouts/index.mjs +14 -14
  88. package/dist/components/Payload/CollectionArchive/index.mjs +4 -4
  89. package/dist/components/Payload/Media/index.mjs +2 -2
  90. package/dist/components/Payload/PayloadCard/index.mjs +3 -3
  91. package/dist/components/Payload/RichText/index.mjs +5 -5
  92. package/dist/components/Payload/RichText/serialize.mjs +5 -5
  93. package/dist/components/Payload/index.mjs +7 -7
  94. package/dist/components/Projects/EpicsView.mjs +3 -3
  95. package/dist/components/Projects/FileView.mjs +3 -3
  96. package/dist/components/Projects/GanttView.mjs +3 -3
  97. package/dist/components/Projects/KanbanBoardView.mjs +3 -3
  98. package/dist/components/Projects/PlanningView.mjs +3 -3
  99. package/dist/components/Projects/ProjectPage.mjs +11 -11
  100. package/dist/components/Projects/ProjectView.mjs +9 -9
  101. package/dist/components/Projects/ProjectsIndexView.mjs +3 -3
  102. package/dist/components/Projects/SprintBoardView.mjs +3 -3
  103. package/dist/components/Projects/TasksView.mjs +3 -3
  104. package/dist/components/Projects/index.d.ts +1 -0
  105. package/dist/components/Projects/index.js +380 -12
  106. package/dist/components/Projects/index.mjs +12 -8
  107. package/dist/components/dc-temp/dashboard-integration-example.mjs +3 -3
  108. package/dist/components/dc-temp/index.mjs +4 -4
  109. package/dist/components/index.js +2 -0
  110. package/dist/components/index.mjs +41 -38
  111. package/dist/decorators/Intranet.mjs +38 -38
  112. package/dist/index.js +2 -0
  113. package/dist/index.mjs +52 -49
  114. package/dist/metafile-cjs.json +1 -1
  115. package/dist/metafile-esm.json +1 -1
  116. package/dist/pages/Blog.mjs +9 -9
  117. package/dist/pages/Documentation.mjs +3 -3
  118. package/dist/pages/IndexPage.mjs +10 -10
  119. package/dist/pages/LandingPage.mjs +50 -50
  120. package/dist/pages/Page.mjs +11 -11
  121. package/dist/pages/Publish.mjs +39 -39
  122. package/dist/pages/Website.mjs +15 -15
  123. package/dist/sections/AboutSection.mjs +7 -7
  124. package/dist/sections/BlogDetail.mjs +6 -6
  125. package/dist/sections/BlogList.mjs +7 -7
  126. package/dist/sections/ContactSection.mjs +7 -7
  127. package/dist/sections/PageSections.mjs +48 -48
  128. package/dist/sections/PricingSection.mjs +7 -7
  129. package/dist/sections/ServiceDetail.mjs +6 -6
  130. package/dist/sections/ServiceDetailSection.mjs +6 -6
  131. package/dist/sections/ServiceSection.mjs +39 -39
  132. package/dist/sections/index.mjs +48 -48
  133. package/package.json +1 -1
  134. package/dist/{chunk-NKRBXAPF.mjs → chunk-2YHN7ZCJ.mjs} +3 -3
  135. package/dist/{chunk-N3V2QVDB.mjs → chunk-AGF67AD4.mjs} +3 -3
  136. package/dist/{chunk-JMUZ3EXS.mjs → chunk-I2MVZVXE.mjs} +3 -3
  137. package/dist/{chunk-DGIVNR6Z.mjs → chunk-TDOOQIMQ.mjs} +3 -3
@@ -1,9 +1,8 @@
1
1
  import {
2
2
  TasksView,
3
3
  TasksView_default
4
- } from "../../chunk-5TOKOCC7.mjs";
5
- import "../../chunk-JMUZ3EXS.mjs";
6
- import "../../chunk-6A7T3O6T.mjs";
4
+ } from "../../chunk-PQW3UWE4.mjs";
5
+ import "../../chunk-I2MVZVXE.mjs";
7
6
  import "../../chunk-EMGZSA3M.mjs";
8
7
  import "../../chunk-C3RENDHG.mjs";
9
8
  import "../../chunk-4UJUWE3A.mjs";
@@ -18,6 +17,7 @@ import "../../chunk-JHOP4BOK.mjs";
18
17
  import "../../chunk-ZSBTDL4H.mjs";
19
18
  import "../../chunk-KZPGX6CG.mjs";
20
19
  import "../../chunk-OZ77QF4K.mjs";
20
+ import "../../chunk-6A7T3O6T.mjs";
21
21
  import "../../chunk-6DZX6EAA.mjs";
22
22
  export {
23
23
  TasksView,
@@ -5,3 +5,4 @@ export * from "./SprintBoardView";
5
5
  export * from "./TasksView";
6
6
  export * from "./FileView";
7
7
  export * from "./EpicsView";
8
+ export * from "./GanttView";
@@ -36,6 +36,7 @@ var Projects_exports = {};
36
36
  __export(Projects_exports, {
37
37
  DCProjectCard: () => ProjectCard,
38
38
  EpicsView: () => EpicsView,
39
+ GanttView: () => GanttView,
39
40
  KanbanBoardView: () => KanbanBoardView,
40
41
  PlanningView: () => PlanningView,
41
42
  SprintBoardView: () => SprintBoardView,
@@ -4948,8 +4949,8 @@ function ToolbarPlugin() {
4948
4949
  blockNode = curr;
4949
4950
  }
4950
4951
  if (blockNode) {
4951
- const format2 = blockNode.getFormatType();
4952
- setAlignment(format2 || "left");
4952
+ const format3 = blockNode.getFormatType();
4953
+ setAlignment(format3 || "left");
4953
4954
  }
4954
4955
  const tag = anchorNode.getTopLevelElement()?.__tag;
4955
4956
  setBlockType(tag || "p");
@@ -5949,7 +5950,7 @@ var markdownToLexical = (markdown) => {
5949
5950
  var convertFileTypeToKnowledgeDocument = async (file) => {
5950
5951
  let content = "";
5951
5952
  let richTextContent = void 0;
5952
- let format2 = "text";
5953
+ let format3 = "text";
5953
5954
  if (file.url) {
5954
5955
  try {
5955
5956
  let url = file.url;
@@ -5970,18 +5971,18 @@ var convertFileTypeToKnowledgeDocument = async (file) => {
5970
5971
  console.warn("No URL provided for file:", file.name);
5971
5972
  }
5972
5973
  if (file.mimeType === "text/markdown") {
5973
- format2 = "richText";
5974
+ format3 = "richText";
5974
5975
  richTextContent = markdownToLexical(content);
5975
5976
  } else if (file.mimeType?.startsWith("text/")) {
5976
- format2 = "text";
5977
+ format3 = "text";
5977
5978
  }
5978
5979
  return {
5979
5980
  id: file.id.toString(),
5980
5981
  title: file.name,
5981
5982
  description: void 0,
5982
- content: format2 === "richText" ? void 0 : content,
5983
- richTextContent: format2 === "richText" ? richTextContent : void 0,
5984
- format: format2,
5983
+ content: format3 === "richText" ? void 0 : content,
5984
+ richTextContent: format3 === "richText" ? richTextContent : void 0,
5985
+ format: format3,
5985
5986
  metadata: {},
5986
5987
  createdAt: typeof file.createdAt === "string" ? new Date(file.createdAt) : file.createdAt,
5987
5988
  updatedAt: /* @__PURE__ */ new Date()
@@ -6031,8 +6032,8 @@ function FileEdit({ document: document2, onCancel, onSave, onFileUpdate }) {
6031
6032
  setRichTextContent(document2.richTextContent);
6032
6033
  }
6033
6034
  }, [document2]);
6034
- const formatIcon = (format2) => {
6035
- switch (format2) {
6035
+ const formatIcon = (format3) => {
6036
+ switch (format3) {
6036
6037
  case "markdown":
6037
6038
  case "mdx":
6038
6039
  return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react11.FileText, { className: "h-6 w-6 text-primary" });
@@ -6044,8 +6045,8 @@ function FileEdit({ document: document2, onCancel, onSave, onFileUpdate }) {
6044
6045
  return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react11.File, { className: "h-6 w-6 text-muted-foreground" });
6045
6046
  }
6046
6047
  };
6047
- const formatBadgeColor = (format2) => {
6048
- switch (format2) {
6048
+ const formatBadgeColor = (format3) => {
6049
+ switch (format3) {
6049
6050
  case "markdown":
6050
6051
  return "bg-primary/10 text-primary border-primary/20";
6051
6052
  case "mdx":
@@ -10303,10 +10304,377 @@ var EpicsView = ({
10303
10304
  )
10304
10305
  ] });
10305
10306
  };
10307
+
10308
+ // src/components/Projects/GanttView.tsx
10309
+ var import_react28 = require("react");
10310
+ var import_date_fns2 = require("date-fns");
10311
+ var import_lucide_react21 = require("lucide-react");
10312
+ var import_jsx_runtime50 = require("react/jsx-runtime");
10313
+ var PHASE_LABELS = {
10314
+ 1: "Plan",
10315
+ 2: "Dev",
10316
+ 3: "Test",
10317
+ 4: "Deploy",
10318
+ 5: "Review",
10319
+ 6: "Maint.",
10320
+ 7: "Complete",
10321
+ 8: "Archive",
10322
+ 9: "Legacy"
10323
+ };
10324
+ var ZOOM_LEVELS = [
10325
+ { label: "Quarter", dayWidth: 3 },
10326
+ { label: "Month", dayWidth: 7 },
10327
+ { label: "Week", dayWidth: 14 },
10328
+ { label: "Day", dayWidth: 40 }
10329
+ ];
10330
+ var ROW_HEIGHT = 48;
10331
+ var TIME_HEADER_HEIGHT = 60;
10332
+ var GanttView = ({
10333
+ tasks,
10334
+ epics,
10335
+ sprints,
10336
+ onTaskClick
10337
+ }) => {
10338
+ const [dayWidth, setDayWidth] = (0, import_react28.useState)(7);
10339
+ const [isFullscreen, setIsFullscreen] = (0, import_react28.useState)(false);
10340
+ const scrollRef = (0, import_react28.useRef)(null);
10341
+ const heroRef = (0, import_react28.useRef)(null);
10342
+ const [heroHeight, setHeroHeight] = (0, import_react28.useState)(0);
10343
+ (0, import_react28.useEffect)(() => {
10344
+ const measure = () => {
10345
+ if (heroRef.current) setHeroHeight(heroRef.current.offsetHeight);
10346
+ };
10347
+ const observer = new ResizeObserver(measure);
10348
+ if (heroRef.current) observer.observe(heroRef.current);
10349
+ return () => observer.disconnect();
10350
+ }, []);
10351
+ const { timelineStart, timelineEnd, totalDays } = (0, import_react28.useMemo)(() => {
10352
+ if (epics.length === 0) {
10353
+ const today = /* @__PURE__ */ new Date();
10354
+ const start = (0, import_date_fns2.addDays)(today, -14);
10355
+ const end = (0, import_date_fns2.addDays)(today, 76);
10356
+ return { timelineStart: start, timelineEnd: end, totalDays: 90 };
10357
+ }
10358
+ const allDates = epics.flatMap((e) => [new Date(e.startDate), new Date(e.endDate)]);
10359
+ const minTime = Math.min(...allDates.map((d) => d.getTime()));
10360
+ const maxTime = Math.max(...allDates.map((d) => d.getTime()));
10361
+ const paddedStart = (0, import_date_fns2.addDays)(new Date(minTime), -14);
10362
+ const paddedEnd = (0, import_date_fns2.addDays)(new Date(maxTime), 14);
10363
+ return {
10364
+ timelineStart: paddedStart,
10365
+ timelineEnd: paddedEnd,
10366
+ totalDays: (0, import_date_fns2.differenceInDays)(paddedEnd, paddedStart)
10367
+ };
10368
+ }, [epics]);
10369
+ const { groups, sortedKeys } = (0, import_react28.useMemo)(() => {
10370
+ const groups2 = {};
10371
+ epics.forEach((epic) => {
10372
+ if (!groups2[epic.name]) groups2[epic.name] = [];
10373
+ groups2[epic.name].push(epic);
10374
+ });
10375
+ Object.values(groups2).forEach((list) => list.sort((a, b) => a.phase - b.phase));
10376
+ const sortedKeys2 = Object.keys(groups2).sort((a, b) => {
10377
+ const aMin = Math.min(...groups2[a].map((e) => new Date(e.startDate).getTime()));
10378
+ const bMin = Math.min(...groups2[b].map((e) => new Date(e.startDate).getTime()));
10379
+ return aMin - bMin;
10380
+ });
10381
+ return { groups: groups2, sortedKeys: sortedKeys2 };
10382
+ }, [epics]);
10383
+ const realSprints = (0, import_react28.useMemo)(
10384
+ () => sprints.filter((s) => {
10385
+ const name = s.name.toLowerCase();
10386
+ return name !== "backlog" && name !== "all tasks";
10387
+ }),
10388
+ [sprints]
10389
+ );
10390
+ const monthHeaders = (0, import_react28.useMemo)(
10391
+ () => (0, import_date_fns2.eachMonthOfInterval)({ start: timelineStart, end: timelineEnd }).map((month) => ({
10392
+ month,
10393
+ left: (0, import_date_fns2.differenceInDays)(month, timelineStart) * dayWidth
10394
+ })),
10395
+ [timelineStart, timelineEnd, dayWidth]
10396
+ );
10397
+ const totalWidth = Math.max(totalDays * dayWidth, 600);
10398
+ const scrollToToday = (0, import_react28.useCallback)(() => {
10399
+ if (scrollRef.current) {
10400
+ const todayOffset = (0, import_date_fns2.differenceInDays)(/* @__PURE__ */ new Date(), timelineStart) * dayWidth;
10401
+ scrollRef.current.scrollLeft = Math.max(0, todayOffset - 200);
10402
+ }
10403
+ }, [timelineStart, dayWidth]);
10404
+ const todayLeft = (0, import_date_fns2.differenceInDays)(/* @__PURE__ */ new Date(), timelineStart) * dayWidth;
10405
+ const getEpicStats = (epic) => {
10406
+ const epicTasks = tasks.filter((t) => extractId(t.epic) === epic.id);
10407
+ const done = epicTasks.filter((t) => t.status === "done").length;
10408
+ const pct = epicTasks.length > 0 ? Math.round(done / epicTasks.length * 100) : 0;
10409
+ return { total: epicTasks.length, done, pct };
10410
+ };
10411
+ const getGroupStats = (epicList) => {
10412
+ const allTasks = epicList.flatMap(
10413
+ (e) => tasks.filter((t) => extractId(t.epic) === e.id)
10414
+ );
10415
+ const done = allTasks.filter((t) => t.status === "done").length;
10416
+ const pct = allTasks.length > 0 ? Math.round(done / allTasks.length * 100) : 0;
10417
+ return { total: allTasks.length, done, pct };
10418
+ };
10419
+ const isSprintActive = (sprint) => {
10420
+ const today = /* @__PURE__ */ new Date();
10421
+ try {
10422
+ return (0, import_date_fns2.isWithinInterval)(today, {
10423
+ start: new Date(sprint.startDate),
10424
+ end: new Date(sprint.endDate)
10425
+ });
10426
+ } catch {
10427
+ return false;
10428
+ }
10429
+ };
10430
+ const chartContent = /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-1 min-h-0 overflow-hidden", children: [
10431
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "w-52 flex-shrink-0 border-r bg-background z-10 flex flex-col", children: [
10432
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
10433
+ "div",
10434
+ {
10435
+ className: "border-b flex items-end pb-2 px-3 flex-shrink-0 bg-muted/20",
10436
+ style: { height: TIME_HEADER_HEIGHT },
10437
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "text-xs font-semibold text-muted-foreground tracking-wider uppercase", children: "Epic" })
10438
+ }
10439
+ ),
10440
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "overflow-y-auto flex-1", children: [
10441
+ sortedKeys.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex items-center justify-center h-24 text-sm text-muted-foreground", children: "No epics" }),
10442
+ sortedKeys.map((name) => {
10443
+ const stats = getGroupStats(groups[name]);
10444
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
10445
+ "div",
10446
+ {
10447
+ className: "flex flex-col justify-center px-3 border-b",
10448
+ style: { height: ROW_HEIGHT },
10449
+ children: [
10450
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "text-sm font-medium truncate", title: name, children: name }),
10451
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
10452
+ stats.total,
10453
+ " task",
10454
+ stats.total !== 1 ? "s" : "",
10455
+ " \xB7 ",
10456
+ stats.pct,
10457
+ "%"
10458
+ ] })
10459
+ ]
10460
+ },
10461
+ name
10462
+ );
10463
+ })
10464
+ ] })
10465
+ ] }),
10466
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex-1 overflow-x-auto overflow-y-auto", ref: scrollRef, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { style: { width: totalWidth, position: "relative" }, children: [
10467
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
10468
+ "div",
10469
+ {
10470
+ className: "sticky top-0 border-b bg-muted/20 z-20 flex-shrink-0",
10471
+ style: { height: TIME_HEADER_HEIGHT, width: totalWidth },
10472
+ children: [
10473
+ monthHeaders.map(({ month, left }) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
10474
+ "div",
10475
+ {
10476
+ className: "absolute top-2 text-xs font-semibold text-muted-foreground select-none",
10477
+ style: { left: left + 4 },
10478
+ children: (0, import_date_fns2.format)(month, "MMM yyyy")
10479
+ },
10480
+ month.toISOString()
10481
+ )),
10482
+ realSprints.map((sprint) => {
10483
+ const start = new Date(sprint.startDate);
10484
+ const end = new Date(sprint.endDate);
10485
+ if (start > timelineEnd || end < timelineStart) return null;
10486
+ const left = Math.max(0, (0, import_date_fns2.differenceInDays)(start, timelineStart) * dayWidth);
10487
+ const right = Math.min(
10488
+ totalWidth,
10489
+ (0, import_date_fns2.differenceInDays)(end, timelineStart) * dayWidth
10490
+ );
10491
+ const width = right - left;
10492
+ if (width <= 0) return null;
10493
+ const active = isSprintActive(sprint);
10494
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
10495
+ "div",
10496
+ {
10497
+ className: `absolute bottom-0 border-l border-t text-xs px-1 overflow-hidden whitespace-nowrap select-none flex items-center ${active ? "border-primary/50 bg-primary/10 text-primary font-medium" : "border-border bg-muted/40 text-muted-foreground"}`,
10498
+ style: { left, width, height: 22 },
10499
+ title: sprint.name,
10500
+ children: sprint.name
10501
+ },
10502
+ `header-sprint-${sprint.id}`
10503
+ );
10504
+ })
10505
+ ]
10506
+ }
10507
+ ),
10508
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { style: { position: "relative", width: totalWidth }, children: [
10509
+ realSprints.map((sprint) => {
10510
+ const start = new Date(sprint.startDate);
10511
+ const end = new Date(sprint.endDate);
10512
+ if (start > timelineEnd || end < timelineStart) return null;
10513
+ const left = Math.max(0, (0, import_date_fns2.differenceInDays)(start, timelineStart) * dayWidth);
10514
+ const right = Math.min(
10515
+ totalWidth,
10516
+ (0, import_date_fns2.differenceInDays)(end, timelineStart) * dayWidth
10517
+ );
10518
+ const width = right - left;
10519
+ if (width <= 0 || !isSprintActive(sprint)) return null;
10520
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
10521
+ "div",
10522
+ {
10523
+ className: "absolute inset-y-0 bg-primary/5 pointer-events-none",
10524
+ style: { left, width }
10525
+ },
10526
+ `bg-${sprint.id}`
10527
+ );
10528
+ }),
10529
+ todayLeft >= 0 && todayLeft <= totalWidth && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
10530
+ "div",
10531
+ {
10532
+ className: "absolute inset-y-0 pointer-events-none z-10",
10533
+ style: { left: todayLeft },
10534
+ children: [
10535
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "absolute inset-y-0 w-0.5 bg-destructive/50" }),
10536
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "absolute top-1 -translate-x-1/2 w-2 h-2 rounded-full bg-destructive" })
10537
+ ]
10538
+ }
10539
+ ),
10540
+ monthHeaders.map(({ month, left }) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
10541
+ "div",
10542
+ {
10543
+ className: "absolute inset-y-0 border-l border-border/30 pointer-events-none",
10544
+ style: { left }
10545
+ },
10546
+ `grid-${month.toISOString()}`
10547
+ )),
10548
+ sortedKeys.map((name) => {
10549
+ const epicList = groups[name];
10550
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
10551
+ "div",
10552
+ {
10553
+ className: "border-b relative flex items-center",
10554
+ style: { height: ROW_HEIGHT },
10555
+ children: epicList.map((epic) => {
10556
+ const start = new Date(epic.startDate);
10557
+ const end = new Date(epic.endDate);
10558
+ const left = (0, import_date_fns2.differenceInDays)(start, timelineStart) * dayWidth;
10559
+ const width = Math.max(8, (0, import_date_fns2.differenceInDays)(end, start) * dayWidth);
10560
+ const stats = getEpicStats(epic);
10561
+ const phaseLabel = PHASE_LABELS[epic.phase] ?? `Phase ${epic.phase}`;
10562
+ const showLabel = width >= 50;
10563
+ const tooltip = [
10564
+ `${epic.name} \xB7 ${phaseLabel}`,
10565
+ epic.description ? epic.description : null,
10566
+ `${(0, import_date_fns2.format)(start, "dd MMM yyyy")} \u2192 ${(0, import_date_fns2.format)(end, "dd MMM yyyy")}`,
10567
+ `${stats.total} tasks \xB7 ${stats.pct}% complete`
10568
+ ].filter(Boolean).join("\n");
10569
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
10570
+ "div",
10571
+ {
10572
+ className: "absolute rounded overflow-hidden cursor-pointer ring-1 ring-inset ring-foreground/30 hover:ring-2 hover:ring-white/40 transition-all",
10573
+ style: { left, width, height: 32, top: 8 },
10574
+ title: tooltip,
10575
+ children: [
10576
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
10577
+ "div",
10578
+ {
10579
+ className: `absolute inset-0 ${epic.color}`,
10580
+ style: { opacity: 0.2 }
10581
+ }
10582
+ ),
10583
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
10584
+ "div",
10585
+ {
10586
+ className: `absolute inset-y-0 left-0 ${epic.color} transition-all`,
10587
+ style: { width: `${stats.pct}%`, opacity: 0.85 }
10588
+ }
10589
+ ),
10590
+ showLabel && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "absolute inset-0 flex items-center px-2 gap-1.5 z-10", children: [
10591
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "text-xs font-semibold text-white drop-shadow truncate", children: phaseLabel }),
10592
+ stats.total > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("span", { className: "text-xs text-white/80 drop-shadow shrink-0", children: [
10593
+ stats.pct,
10594
+ "%"
10595
+ ] })
10596
+ ] })
10597
+ ]
10598
+ },
10599
+ epic.id
10600
+ );
10601
+ })
10602
+ },
10603
+ name
10604
+ );
10605
+ }),
10606
+ sortedKeys.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
10607
+ "div",
10608
+ {
10609
+ className: "flex items-center justify-center text-sm text-muted-foreground",
10610
+ style: { height: 200 },
10611
+ children: "No epics to display on the timeline"
10612
+ }
10613
+ )
10614
+ ] })
10615
+ ] }) })
10616
+ ] });
10617
+ const inner = /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: `flex flex-col ${isFullscreen ? "h-screen" : "h-full"} overflow-hidden`, children: [
10618
+ !isFullscreen && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { ref: heroRef, className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
10619
+ DashboardHero,
10620
+ {
10621
+ title: "Gantt Chart",
10622
+ description: "Epic timeline with sprint alignment and phase-based grouping.",
10623
+ gradient: "bg-gradient-to-r from-indigo-600 via-blue-600 to-cyan-600",
10624
+ badge: `${sortedKeys.length} epic${sortedKeys.length !== 1 ? "s" : ""}`
10625
+ }
10626
+ ) }),
10627
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center gap-2 px-4 py-2 border-b bg-background flex-shrink-0", children: [
10628
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react21.BarChart2, { className: "h-4 w-4 text-muted-foreground" }),
10629
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex items-center gap-1", children: ZOOM_LEVELS.map((z) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
10630
+ Button,
10631
+ {
10632
+ variant: dayWidth === z.dayWidth ? "default" : "outline",
10633
+ size: "sm",
10634
+ className: "h-7 px-2 text-xs",
10635
+ onClick: () => setDayWidth(z.dayWidth),
10636
+ children: z.label
10637
+ },
10638
+ z.label
10639
+ )) }),
10640
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex-1" }),
10641
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
10642
+ Button,
10643
+ {
10644
+ variant: "outline",
10645
+ size: "sm",
10646
+ className: "h-7 px-2 text-xs",
10647
+ onClick: scrollToToday,
10648
+ children: [
10649
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react21.Calendar, { className: "h-3 w-3 mr-1" }),
10650
+ "Today"
10651
+ ]
10652
+ }
10653
+ ),
10654
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
10655
+ Button,
10656
+ {
10657
+ variant: "outline",
10658
+ size: "sm",
10659
+ className: "h-7 w-7 p-0",
10660
+ onClick: () => setIsFullscreen((v) => !v),
10661
+ title: isFullscreen ? "Exit fullscreen" : "Fullscreen",
10662
+ children: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react21.Minimize2, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react21.Maximize2, { className: "h-3.5 w-3.5" })
10663
+ }
10664
+ )
10665
+ ] }),
10666
+ chartContent
10667
+ ] });
10668
+ if (isFullscreen) {
10669
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "fixed inset-0 z-50 bg-background overflow-hidden", children: inner });
10670
+ }
10671
+ return inner;
10672
+ };
10306
10673
  // Annotate the CommonJS export names for ESM import in node:
10307
10674
  0 && (module.exports = {
10308
10675
  DCProjectCard,
10309
10676
  EpicsView,
10677
+ GanttView,
10310
10678
  KanbanBoardView,
10311
10679
  PlanningView,
10312
10680
  SprintBoardView,
@@ -1,23 +1,26 @@
1
1
  import {
2
2
  SprintBoardView
3
- } from "../../chunk-2B5V6DGA.mjs";
3
+ } from "../../chunk-MKF47JMB.mjs";
4
4
  import {
5
5
  TasksView
6
- } from "../../chunk-5TOKOCC7.mjs";
6
+ } from "../../chunk-PQW3UWE4.mjs";
7
7
  import {
8
8
  PlanningView
9
- } from "../../chunk-ENXQSGPR.mjs";
9
+ } from "../../chunk-ACB3ZV3C.mjs";
10
10
  import {
11
11
  ProjectCard
12
12
  } from "../../chunk-WHCZTD2K.mjs";
13
13
  import "../../chunk-4W45C7FI.mjs";
14
14
  import {
15
15
  EpicsView
16
- } from "../../chunk-2LTQMWSP.mjs";
17
- import "../../chunk-7MJIUQKX.mjs";
16
+ } from "../../chunk-5M3NV6AD.mjs";
17
+ import "../../chunk-D2USXRZZ.mjs";
18
+ import {
19
+ GanttView
20
+ } from "../../chunk-AXO76PIN.mjs";
18
21
  import {
19
22
  KanbanBoardView
20
- } from "../../chunk-MELQG7N7.mjs";
23
+ } from "../../chunk-ELQ5OCVA.mjs";
21
24
  import "../../chunk-P7YLSTDO.mjs";
22
25
  import "../../chunk-WSU6ULOG.mjs";
23
26
  import "../../chunk-LGTDZ4MV.mjs";
@@ -27,7 +30,7 @@ import "../../chunk-KQPJT5JI.mjs";
27
30
  import "../../chunk-XNPFUKDL.mjs";
28
31
  import "../../chunk-TVIXARUN.mjs";
29
32
  import "../../chunk-PVYGACRN.mjs";
30
- import "../../chunk-JMUZ3EXS.mjs";
33
+ import "../../chunk-I2MVZVXE.mjs";
31
34
  import "../../chunk-CUPIRVMN.mjs";
32
35
  import "../../chunk-RFMER577.mjs";
33
36
  import "../../chunk-UQI2O3WS.mjs";
@@ -47,7 +50,6 @@ import "../../chunk-ZFUPXIGR.mjs";
47
50
  import "../../chunk-CR4DEGH3.mjs";
48
51
  import "../../chunk-XTI4RMGG.mjs";
49
52
  import "../../chunk-Y6HQV3VB.mjs";
50
- import "../../chunk-6A7T3O6T.mjs";
51
53
  import "../../chunk-JCFLPLDK.mjs";
52
54
  import "../../chunk-H72ENAAN.mjs";
53
55
  import "../../chunk-3VKPPG4Z.mjs";
@@ -83,12 +85,14 @@ import "../../chunk-JHOP4BOK.mjs";
83
85
  import "../../chunk-ZSBTDL4H.mjs";
84
86
  import "../../chunk-KZPGX6CG.mjs";
85
87
  import "../../chunk-OZ77QF4K.mjs";
88
+ import "../../chunk-6A7T3O6T.mjs";
86
89
  import "../../chunk-G3DHYJLD.mjs";
87
90
  import "../../chunk-HGJGZHAE.mjs";
88
91
  import "../../chunk-6DZX6EAA.mjs";
89
92
  export {
90
93
  ProjectCard as DCProjectCard,
91
94
  EpicsView,
95
+ GanttView,
92
96
  KanbanBoardView,
93
97
  PlanningView,
94
98
  SprintBoardView,
@@ -1,14 +1,13 @@
1
1
  import {
2
2
  TeamsIndexView
3
- } from "../../chunk-QWW737QR.mjs";
3
+ } from "../../chunk-W3Z3KTSU.mjs";
4
4
  import "../../chunk-R5LKUQ37.mjs";
5
- import "../../chunk-JMUZ3EXS.mjs";
5
+ import "../../chunk-I2MVZVXE.mjs";
6
6
  import "../../chunk-WEIPDZOJ.mjs";
7
7
  import "../../chunk-RQVP4AS3.mjs";
8
8
  import {
9
9
  mockTeamSummary
10
10
  } from "../../chunk-NNH7EC5Z.mjs";
11
- import "../../chunk-6A7T3O6T.mjs";
12
11
  import "../../chunk-C3RENDHG.mjs";
13
12
  import "../../chunk-4UJUWE3A.mjs";
14
13
  import "../../chunk-7CVOGGH6.mjs";
@@ -22,6 +21,7 @@ import "../../chunk-JHOP4BOK.mjs";
22
21
  import "../../chunk-ZSBTDL4H.mjs";
23
22
  import "../../chunk-KZPGX6CG.mjs";
24
23
  import "../../chunk-OZ77QF4K.mjs";
24
+ import "../../chunk-6A7T3O6T.mjs";
25
25
  import "../../chunk-6DZX6EAA.mjs";
26
26
 
27
27
  // src/components/dc-temp/dashboard-integration-example.tsx
@@ -5,18 +5,18 @@ import "../../chunk-EH7IHRQI.mjs";
5
5
  import "../../chunk-AXKAHFPN.mjs";
6
6
  import {
7
7
  TeamsIndexView
8
- } from "../../chunk-QWW737QR.mjs";
8
+ } from "../../chunk-W3Z3KTSU.mjs";
9
9
  import {
10
10
  TeamCard
11
11
  } from "../../chunk-R5LKUQ37.mjs";
12
12
  import {
13
13
  FileView
14
- } from "../../chunk-7MJIUQKX.mjs";
14
+ } from "../../chunk-D2USXRZZ.mjs";
15
15
  import {
16
16
  FileList
17
17
  } from "../../chunk-XNPFUKDL.mjs";
18
18
  import "../../chunk-TVIXARUN.mjs";
19
- import "../../chunk-JMUZ3EXS.mjs";
19
+ import "../../chunk-I2MVZVXE.mjs";
20
20
  import "../../chunk-WEIPDZOJ.mjs";
21
21
  import "../../chunk-RQVP4AS3.mjs";
22
22
  import "../../chunk-CUPIRVMN.mjs";
@@ -39,7 +39,6 @@ import "../../chunk-AVNBD2X5.mjs";
39
39
  import "../../chunk-SNUES6JA.mjs";
40
40
  import "../../chunk-ZFUPXIGR.mjs";
41
41
  import "../../chunk-CR4DEGH3.mjs";
42
- import "../../chunk-6A7T3O6T.mjs";
43
42
  import "../../chunk-JCFLPLDK.mjs";
44
43
  import "../../chunk-H72ENAAN.mjs";
45
44
  import "../../chunk-3VKPPG4Z.mjs";
@@ -75,6 +74,7 @@ import "../../chunk-JHOP4BOK.mjs";
75
74
  import "../../chunk-ZSBTDL4H.mjs";
76
75
  import "../../chunk-KZPGX6CG.mjs";
77
76
  import "../../chunk-OZ77QF4K.mjs";
77
+ import "../../chunk-6A7T3O6T.mjs";
78
78
  import "../../chunk-G3DHYJLD.mjs";
79
79
  import "../../chunk-HGJGZHAE.mjs";
80
80
  import "../../chunk-6DZX6EAA.mjs";
@@ -165,6 +165,7 @@ __export(components_exports, {
165
165
  FlowPrintable: () => FlowPrintable,
166
166
  Footer: () => Footer2,
167
167
  FoundryLayout: () => FoundryLayout,
168
+ GanttView: () => GanttView,
168
169
  Header: () => Header,
169
170
  HeaderDesktop: () => HeaderDesktop,
170
171
  HeaderMobile: () => HeaderMobile,
@@ -30833,6 +30834,7 @@ var SprintBoardView = ({
30833
30834
  FlowPrintable,
30834
30835
  Footer,
30835
30836
  FoundryLayout,
30837
+ GanttView,
30836
30838
  Header,
30837
30839
  HeaderDesktop,
30838
30840
  HeaderMobile,