@burdenoff/microfe-planmagnet 2026.930.21 → 2026.930.23

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 (127) hide show
  1. package/dist/node_modules/lodash/_arrayEach.js +14 -0
  2. package/dist/node_modules/lodash/_arrayEach.js.map +1 -0
  3. package/dist/node_modules/lodash/_assignValue.js +17 -0
  4. package/dist/node_modules/lodash/_assignValue.js.map +1 -0
  5. package/dist/node_modules/lodash/_baseAssign.js +16 -0
  6. package/dist/node_modules/lodash/_baseAssign.js.map +1 -0
  7. package/dist/node_modules/lodash/_baseAssignIn.js +16 -0
  8. package/dist/node_modules/lodash/_baseAssignIn.js.map +1 -0
  9. package/dist/node_modules/lodash/_baseClone.js +64 -0
  10. package/dist/node_modules/lodash/_baseClone.js.map +1 -0
  11. package/dist/node_modules/lodash/_baseCreate.js +21 -0
  12. package/dist/node_modules/lodash/_baseCreate.js.map +1 -0
  13. package/dist/node_modules/lodash/_baseIsMap.js +16 -0
  14. package/dist/node_modules/lodash/_baseIsMap.js.map +1 -0
  15. package/dist/node_modules/lodash/_baseIsSet.js +16 -0
  16. package/dist/node_modules/lodash/_baseIsSet.js.map +1 -0
  17. package/dist/node_modules/lodash/_baseKeysIn.js +20 -0
  18. package/dist/node_modules/lodash/_baseKeysIn.js.map +1 -0
  19. package/dist/node_modules/lodash/_baseSum.js +17 -0
  20. package/dist/node_modules/lodash/_baseSum.js.map +1 -0
  21. package/dist/node_modules/lodash/_baseUnset.js +26 -0
  22. package/dist/node_modules/lodash/_baseUnset.js.map +1 -0
  23. package/dist/node_modules/lodash/_cloneArrayBuffer.js +16 -0
  24. package/dist/node_modules/lodash/_cloneArrayBuffer.js.map +1 -0
  25. package/dist/node_modules/lodash/_cloneBuffer.js +17 -0
  26. package/dist/node_modules/lodash/_cloneBuffer.js.map +1 -0
  27. package/dist/node_modules/lodash/_cloneDataView.js +16 -0
  28. package/dist/node_modules/lodash/_cloneDataView.js.map +1 -0
  29. package/dist/node_modules/lodash/_cloneRegExp.js +15 -0
  30. package/dist/node_modules/lodash/_cloneRegExp.js.map +1 -0
  31. package/dist/node_modules/lodash/_cloneSymbol.js +15 -0
  32. package/dist/node_modules/lodash/_cloneSymbol.js.map +1 -0
  33. package/dist/node_modules/lodash/_cloneTypedArray.js +16 -0
  34. package/dist/node_modules/lodash/_cloneTypedArray.js.map +1 -0
  35. package/dist/node_modules/lodash/_copyArray.js +15 -0
  36. package/dist/node_modules/lodash/_copyArray.js.map +1 -0
  37. package/dist/node_modules/lodash/_copyObject.js +22 -0
  38. package/dist/node_modules/lodash/_copyObject.js.map +1 -0
  39. package/dist/node_modules/lodash/_copySymbols.js +16 -0
  40. package/dist/node_modules/lodash/_copySymbols.js.map +1 -0
  41. package/dist/node_modules/lodash/_copySymbolsIn.js +16 -0
  42. package/dist/node_modules/lodash/_copySymbolsIn.js.map +1 -0
  43. package/dist/node_modules/lodash/_customOmitClone.js +15 -0
  44. package/dist/node_modules/lodash/_customOmitClone.js.map +1 -0
  45. package/dist/node_modules/lodash/_flatRest.js +17 -0
  46. package/dist/node_modules/lodash/_flatRest.js.map +1 -0
  47. package/dist/node_modules/lodash/_getAllKeysIn.js +17 -0
  48. package/dist/node_modules/lodash/_getAllKeysIn.js.map +1 -0
  49. package/dist/node_modules/lodash/_getSymbolsIn.js +18 -0
  50. package/dist/node_modules/lodash/_getSymbolsIn.js.map +1 -0
  51. package/dist/node_modules/lodash/_initCloneArray.js +15 -0
  52. package/dist/node_modules/lodash/_initCloneArray.js.map +1 -0
  53. package/dist/node_modules/lodash/_initCloneByTag.js +40 -0
  54. package/dist/node_modules/lodash/_initCloneByTag.js.map +1 -0
  55. package/dist/node_modules/lodash/_initCloneObject.js +17 -0
  56. package/dist/node_modules/lodash/_initCloneObject.js.map +1 -0
  57. package/dist/node_modules/lodash/_nativeKeysIn.js +15 -0
  58. package/dist/node_modules/lodash/_nativeKeysIn.js.map +1 -0
  59. package/dist/node_modules/lodash/_parent.js +16 -0
  60. package/dist/node_modules/lodash/_parent.js.map +1 -0
  61. package/dist/node_modules/lodash/flatten.js +15 -0
  62. package/dist/node_modules/lodash/flatten.js.map +1 -0
  63. package/dist/node_modules/lodash/isMap.js +14 -0
  64. package/dist/node_modules/lodash/isMap.js.map +1 -0
  65. package/dist/node_modules/lodash/isSet.js +14 -0
  66. package/dist/node_modules/lodash/isSet.js.map +1 -0
  67. package/dist/node_modules/lodash/keysIn.js +17 -0
  68. package/dist/node_modules/lodash/keysIn.js.map +1 -0
  69. package/dist/node_modules/lodash/maxBy.js +17 -0
  70. package/dist/node_modules/lodash/maxBy.js.map +1 -0
  71. package/dist/node_modules/lodash/omit.js +28 -0
  72. package/dist/node_modules/lodash/omit.js.map +1 -0
  73. package/dist/node_modules/lodash/sumBy.js +16 -0
  74. package/dist/node_modules/lodash/sumBy.js.map +1 -0
  75. package/dist/node_modules/recharts/es6/chart/Sankey.js +556 -0
  76. package/dist/node_modules/recharts/es6/chart/Sankey.js.map +1 -0
  77. package/dist/node_modules/recharts/es6/chart/Treemap.js +545 -0
  78. package/dist/node_modules/recharts/es6/chart/Treemap.js.map +1 -0
  79. package/dist/node_modules/recharts/es6/shape/Polygon.js +112 -0
  80. package/dist/node_modules/recharts/es6/shape/Polygon.js.map +1 -0
  81. package/dist/node_modules/recharts/es6/util/Constants.js +31 -0
  82. package/dist/node_modules/recharts/es6/util/Constants.js.map +1 -0
  83. package/dist/node_modules/recharts/es6/util/ReactUtils.js +15 -10
  84. package/dist/node_modules/recharts/es6/util/ReactUtils.js.map +1 -1
  85. package/dist/planmagnet/controls/AutomationRuleControls.js +10 -10
  86. package/dist/planmagnet/controls/CompetitorControls.js +7 -7
  87. package/dist/planmagnet/controls/FeatureControls.js +38 -38
  88. package/dist/planmagnet/controls/ProgramControls.js +8 -8
  89. package/dist/planmagnet/dependency/DependencyGraph.d.ts.map +1 -1
  90. package/dist/planmagnet/dependency/DependencyGraph.js +13 -10
  91. package/dist/planmagnet/dependency/DependencyGraph.js.map +1 -1
  92. package/dist/planmagnet/dependency/DependencyPanel.js +13 -13
  93. package/dist/planmagnet/dependency/GanttChart.d.ts.map +1 -1
  94. package/dist/planmagnet/dependency/GanttChart.js +11 -5
  95. package/dist/planmagnet/dependency/GanttChart.js.map +1 -1
  96. package/dist/planmagnet/pages/ActivityActivityPagePage.js +16 -16
  97. package/dist/planmagnet/pages/ActivityActivityPagePage.js.map +1 -1
  98. package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.d.ts.map +1 -1
  99. package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.js +91 -73
  100. package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.js.map +1 -1
  101. package/dist/planmagnet/pages/AutomationAutomationRulesPagePage.js +6 -6
  102. package/dist/planmagnet/pages/AutomationCreateAutomationRulePagePage.js +4 -4
  103. package/dist/planmagnet/pages/DashboardDashboardPagePage.js +11 -11
  104. package/dist/planmagnet/pages/DashboardsProjectManagerPagePage.js +5 -5
  105. package/dist/planmagnet/pages/DashboardsTeamUtilizationPagePage.js +5 -5
  106. package/dist/planmagnet/pages/IntegrationsNewSyncPagePage.js +6 -6
  107. package/dist/planmagnet/pages/IntegrationsNewSyncPagePage.js.map +1 -1
  108. package/dist/planmagnet/pages/IntegrationsSyncsPagePage.js +8 -8
  109. package/dist/planmagnet/pages/ProjectsBudgetsPagePage.js +10 -10
  110. package/dist/planmagnet/pages/ProjectsCriticalPathPagePage.js +6 -6
  111. package/dist/planmagnet/pages/ProjectsEditProjectPagePage.js +5 -5
  112. package/dist/planmagnet/pages/ProjectsPlanningPagePage.js +8 -8
  113. package/dist/planmagnet/pages/SprintsStartSprintPagePage.js +4 -4
  114. package/dist/planmagnet/pages/analytics/StatusFlowCard.d.ts +8 -0
  115. package/dist/planmagnet/pages/analytics/StatusFlowCard.d.ts.map +1 -0
  116. package/dist/planmagnet/pages/analytics/StatusFlowCard.js +234 -0
  117. package/dist/planmagnet/pages/analytics/StatusFlowCard.js.map +1 -0
  118. package/dist/planmagnet/pages/analytics/WorkBreakdownCard.d.ts +6 -0
  119. package/dist/planmagnet/pages/analytics/WorkBreakdownCard.d.ts.map +1 -0
  120. package/dist/planmagnet/pages/analytics/WorkBreakdownCard.js +367 -0
  121. package/dist/planmagnet/pages/analytics/WorkBreakdownCard.js.map +1 -0
  122. package/dist/planmagnet/roadmaps/RoadmapControls.js +17 -17
  123. package/dist/planmagnet/utils/statusColor.d.ts +8 -9
  124. package/dist/planmagnet/utils/statusColor.d.ts.map +1 -1
  125. package/dist/planmagnet/utils/statusColor.js +8 -40
  126. package/dist/planmagnet/utils/statusColor.js.map +1 -1
  127. package/package.json +1 -1
@@ -17,17 +17,19 @@ import { BudgetPerformanceCard as le, CycleTimeCard as ue } from "./analytics/De
17
17
  import { QualityMetricsCard as de } from "./analytics/QualityMetricsCard.js";
18
18
  import { DeliveryKpisCard as fe } from "./analytics/DeliveryKpisCard.js";
19
19
  import { ThroughputCard as pe } from "./analytics/ThroughputCard.js";
20
- import { activePreset as me, isValidRange as c, presetRange as l, scopeToProjectId as he, toRangeVariables as ge } from "./analytics/analyticsRange.js";
20
+ import { StatusFlowCard as me } from "./analytics/StatusFlowCard.js";
21
+ import { WorkBreakdownCard as he } from "./analytics/WorkBreakdownCard.js";
22
+ import { activePreset as ge, isValidRange as c, presetRange as l, scopeToProjectId as _e, toRangeVariables as ve } from "./analytics/analyticsRange.js";
21
23
  import { useState as u } from "react";
22
- import { BarChart3 as _e, FolderKanban as ve, Target as ye, TrendingUp as be, Zap as xe } from "lucide-react";
23
- import { useSearchParams as Se } from "react-router";
24
+ import { BarChart3 as ye, FolderKanban as be, Target as xe, TrendingUp as Se, Zap as Ce } from "lucide-react";
25
+ import { useSearchParams as we } from "react-router";
24
26
  import { gql as d } from "@apollo/client";
25
27
  import { useQuery as f } from "@apollo/client/react";
26
- import { Fragment as Ce, jsx as p, jsxs as m } from "react/jsx-runtime";
27
- import { useI18n as we } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
28
- import { Badge as Te, Card as h, CardContent as g, CardHeader as _, CardTitle as v, Input as y, Select as b, SelectContent as x, SelectItem as S, SelectTrigger as C, SelectValue as w } from "@burdenoff/fe-libs/ui";
28
+ import { Fragment as Te, jsx as p, jsxs as m } from "react/jsx-runtime";
29
+ import { useI18n as Ee } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
30
+ import { Badge as De, Card as h, CardContent as g, CardHeader as _, CardTitle as v, Input as y, Select as b, SelectContent as x, SelectItem as S, SelectTrigger as C, SelectValue as w } from "@burdenoff/fe-libs/ui";
29
31
  //#region src/planmagnet/pages/AnalyticsAnalyticsPagePage.tsx
30
- var Ee = d`
32
+ var Oe = d`
31
33
  query AnalyticsProjectSprints($workspaceId: ID!, $projectId: String) {
32
34
  planmagnetSprints(
33
35
  workspaceId: $workspaceId
@@ -43,7 +45,7 @@ var Ee = d`
43
45
  }
44
46
  }
45
47
  }
46
- `, De = d`
48
+ `, ke = d`
47
49
  query AnalyticsMilestoneRisk($workspaceId: ID!, $yesterday: DateTime) {
48
50
  missed: planmagnetMilestones(
49
51
  workspaceId: $workspaceId
@@ -60,7 +62,7 @@ var Ee = d`
60
62
  totalCount
61
63
  }
62
64
  }
63
- `, Oe = d`
65
+ `, Ae = d`
64
66
  query GetAnalyticsWorkItemCounts($workspaceId: ID!) {
65
67
  planmagnetWorkItemCounts(workspaceId: $workspaceId) {
66
68
  total
@@ -78,7 +80,7 @@ var Ee = d`
78
80
  }
79
81
  }
80
82
  }
81
- `, ke = d`
83
+ `, je = d`
82
84
  query GetAnalyticsData($workspaceId: ID!, $projectPagination: PlanmagnetPaginationInput) {
83
85
  planmagnetProjects(workspaceId: $workspaceId, pagination: $projectPagination) {
84
86
  items {
@@ -93,7 +95,7 @@ var Ee = d`
93
95
  totalCount
94
96
  }
95
97
  }
96
- `, Ae = d`
98
+ `, Me = d`
97
99
  query GetSprintBurndown($workspaceId: ID!, $sprintId: ID!) {
98
100
  planmagnetSprintBurndown(workspaceId: $workspaceId, sprintId: $sprintId) {
99
101
  sprintId
@@ -110,7 +112,7 @@ var Ee = d`
110
112
  }
111
113
  }
112
114
  }
113
- `, je = d`
115
+ `, Ne = d`
114
116
  query GetVelocity($workspaceId: ID!, $projectId: ID!, $trailingSprintCount: Int) {
115
117
  planmagnetVelocity(
116
118
  workspaceId: $workspaceId
@@ -130,7 +132,7 @@ var Ee = d`
130
132
  }
131
133
  }
132
134
  }
133
- `, Me = d`
135
+ `, Pe = d`
134
136
  query GetCumulativeFlow(
135
137
  $workspaceId: ID!
136
138
  $projectId: ID!
@@ -169,19 +171,19 @@ function E(e) {
169
171
  return `${t.getUTCMonth() + 1}/${t.getUTCDate()}`;
170
172
  }
171
173
  function D() {
172
- let { workspaceId: d } = e(), { t: D } = we(), [Ne, O] = u(""), [k, Pe] = Se(), A = k.get("from"), j = k.get("to"), [M, N] = u(() => A && j && c(A, j) ? {
174
+ let { workspaceId: d } = e(), { t: D } = Ee(), [Fe, O] = u(""), [k, Ie] = we(), A = k.get("from"), j = k.get("to"), [M, N] = u(() => A && j && c(A, j) ? {
173
175
  from: A,
174
176
  to: j
175
- } : l("30")), [Fe, Ie] = u(M), [P, Le] = u(k.get("project") || "all"), F = he(P), I = me(M), Re = c(M.from, M.to), ze = Re ? null : D("planmagnet.analytics.range.invalid", "\"From\" must be on or before \"To\".");
177
+ } : l("30")), [Le, Re] = u(M), [P, ze] = u(k.get("project") || "all"), F = _e(P), I = ge(M), Be = c(M.from, M.to), Ve = Be ? null : D("planmagnet.analytics.range.invalid", "\"From\" must be on or before \"To\".");
176
178
  function L(e, t) {
177
- N(e), c(e.from, e.to) && Ie(e);
179
+ N(e), c(e.from, e.to) && Re(e);
178
180
  let n = new URLSearchParams(k);
179
- n.set("from", e.from), n.set("to", e.to), t === "all" ? n.delete("project") : n.set("project", t), Pe(n, { replace: !0 });
181
+ n.set("from", e.from), n.set("to", e.to), t === "all" ? n.delete("project") : n.set("project", t), Ie(n, { replace: !0 });
180
182
  }
181
- function Be(e) {
183
+ function He(e) {
182
184
  L(l(e), P);
183
185
  }
184
- function Ve(e) {
186
+ function Ue(e) {
185
187
  e && M.to && c(e, M.to) ? L({
186
188
  from: e,
187
189
  to: M.to
@@ -190,7 +192,7 @@ function D() {
190
192
  from: e
191
193
  }));
192
194
  }
193
- function He(e) {
195
+ function We(e) {
194
196
  e && M.from && c(M.from, e) ? L({
195
197
  from: M.from,
196
198
  to: e
@@ -199,44 +201,44 @@ function D() {
199
201
  to: e
200
202
  }));
201
203
  }
202
- function Ue(e) {
203
- Le(e), O(""), L(M, e);
204
+ function Ge(e) {
205
+ ze(e), O(""), L(M, e);
204
206
  }
205
- let { startDate: R, endDate: z } = ge(Re ? M : Fe), { data: We, loading: Ge, error: Ke } = f(ke, {
207
+ let { startDate: R, endDate: z } = ve(Be ? M : Le), { data: Ke, loading: qe, error: Je } = f(je, {
206
208
  variables: {
207
209
  workspaceId: d,
208
210
  projectPagination: { first: 100 }
209
211
  },
210
212
  skip: !d
211
- }), { data: qe } = f(Oe, {
213
+ }), { data: Ye } = f(Ae, {
212
214
  variables: { workspaceId: d },
213
215
  skip: !d
214
- }), B = qe?.planmagnetWorkItemCounts, Je = se(), Ye = ce(), [Xe] = u(() => (/* @__PURE__ */ new Date(Date.now() - 864e5)).toISOString().slice(0, 10)), { data: V } = f(De, {
216
+ }), B = Ye?.planmagnetWorkItemCounts, Xe = se(), Ze = ce(), [Qe] = u(() => (/* @__PURE__ */ new Date(Date.now() - 864e5)).toISOString().slice(0, 10)), { data: V } = f(ke, {
215
217
  variables: {
216
218
  workspaceId: d,
217
- yesterday: Xe
219
+ yesterday: Qe
218
220
  },
219
221
  skip: !d
220
- }), H = We?.planmagnetProjects?.items ?? [], U = F || H[0]?.id || "", { data: Ze } = f(Ee, {
222
+ }), H = Ke?.planmagnetProjects?.items ?? [], U = F || H[0]?.id || "", { data: $e } = f(Oe, {
221
223
  variables: {
222
224
  workspaceId: d,
223
225
  projectId: U
224
226
  },
225
227
  skip: !d || !U
226
- }), W = Ze?.planmagnetSprints.items ?? [], Qe = W.filter((e) => e.status === "COMPLETED").sort((e, t) => (t.completedAt ?? t.endDate ?? "").localeCompare(e.completedAt ?? e.endDate ?? ""))[0], $e = W.find((e) => e.status === "ACTIVE" || e.status === "REVIEW") ?? Qe ?? W[0], G = Ne || $e?.id || "", K = H.find((e) => e.id === U)?.name ?? "", { data: et, loading: tt } = f(Ae, {
228
+ }), W = $e?.planmagnetSprints.items ?? [], et = W.filter((e) => e.status === "COMPLETED").sort((e, t) => (t.completedAt ?? t.endDate ?? "").localeCompare(e.completedAt ?? e.endDate ?? ""))[0], tt = W.find((e) => e.status === "ACTIVE" || e.status === "REVIEW") ?? et ?? W[0], G = Fe || tt?.id || "", K = H.find((e) => e.id === U)?.name ?? "", { data: nt, loading: rt } = f(Me, {
227
229
  variables: {
228
230
  workspaceId: d,
229
231
  sprintId: G
230
232
  },
231
233
  skip: !d || !G
232
- }), { data: nt, loading: rt } = f(je, {
234
+ }), { data: it, loading: at } = f(Ne, {
233
235
  variables: {
234
236
  workspaceId: d,
235
237
  projectId: U,
236
238
  trailingSprintCount: 6
237
239
  },
238
240
  skip: !d || !U
239
- }), { data: it, loading: at } = f(Me, {
241
+ }), { data: ot, loading: st } = f(Pe, {
240
242
  variables: {
241
243
  workspaceId: d,
242
244
  projectId: U,
@@ -245,48 +247,48 @@ function D() {
245
247
  },
246
248
  skip: !d || !U
247
249
  });
248
- if (Ge && !We) return /* @__PURE__ */ p("div", {
250
+ if (qe && !Ke) return /* @__PURE__ */ p("div", {
249
251
  className: "flex items-center justify-center p-12",
250
252
  children: /* @__PURE__ */ p("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
251
253
  });
252
- if (Ke) return /* @__PURE__ */ m("div", {
254
+ if (Je) return /* @__PURE__ */ m("div", {
253
255
  className: "p-6 text-red-500",
254
256
  children: [
255
257
  D("planmagnet.analytics.errorLoading", "Error loading analytics"),
256
258
  ": ",
257
- Ke.message
259
+ Je.message
258
260
  ]
259
261
  });
260
- let q = (e) => B?.byStatus.find((t) => t.status === e), ot = q("CANCELLED")?.count ?? 0, st = B ? q("DONE")?.count ?? 0 : null, J = B ? B.total : null, Y = B ? B.blocked : null, ct = B ? B.points : null, lt = B ? q("DONE")?.points ?? 0 : null, ut = (e) => {
262
+ let q = (e) => B?.byStatus.find((t) => t.status === e), ct = q("CANCELLED")?.count ?? 0, lt = B ? q("DONE")?.count ?? 0 : null, J = B ? B.total : null, Y = B ? B.blocked : null, ut = B ? B.points : null, dt = B ? q("DONE")?.points ?? 0 : null, ft = (e) => {
261
263
  let t = B?.byProject.filter((t) => t.projectId === e) ?? [], n = t.filter((e) => e.status !== "CANCELLED").reduce((e, t) => e + t.count, 0), r = t.filter((e) => e.status === "DONE").reduce((e, t) => e + t.count, 0);
262
264
  return n > 0 ? Math.round(r / n * 100) : 0;
263
- }, dt = Ye?.running ?? null, ft = V ? V.missed.totalCount + V.overdue.totalCount : null, pt = Je?.active ?? null, mt = J != null && st != null && J - ot > 0 ? Math.round(st / (J - ot) * 100) : null, ht = (et?.planmagnetSprintBurndown)?.points.map((e) => ({
265
+ }, pt = Ze?.running ?? null, mt = V ? V.missed.totalCount + V.overdue.totalCount : null, ht = Xe?.active ?? null, gt = J != null && lt != null && J - ct > 0 ? Math.round(lt / (J - ct) * 100) : null, _t = (nt?.planmagnetSprintBurndown)?.points.map((e) => ({
264
266
  day: E(e.date),
265
267
  remaining: e.remainingPoints,
266
268
  completed: e.completedPoints
267
- })) ?? [], X = nt?.planmagnetVelocity, Z = X?.sprints.map((e) => ({
269
+ })) ?? [], X = it?.planmagnetVelocity, Z = X?.sprints.map((e) => ({
268
270
  name: e.sprintName,
269
271
  completed: e.completedPoints,
270
272
  planned: e.plannedPoints ?? void 0
271
- })) ?? [], gt = X ? Math.round(X.averageVelocity) : 0, _t = X ? Math.round(X.forecastNextSprintPoints) : 0, Q = it?.planmagnetCumulativeFlow, vt = Array.from(new Set(Q?.points.flatMap((e) => e.statuses.map((e) => e.status)) ?? [])), $ = Q?.points.map((e) => {
273
+ })) ?? [], vt = X ? Math.round(X.averageVelocity) : 0, yt = X ? Math.round(X.forecastNextSprintPoints) : 0, Q = ot?.planmagnetCumulativeFlow, bt = Array.from(new Set(Q?.points.flatMap((e) => e.statuses.map((e) => e.status)) ?? [])), $ = Q?.points.map((e) => {
272
274
  let t = { day: E(e.date) };
273
275
  for (let n of e.statuses) t[n.status] = n.count;
274
276
  return t;
275
- }) ?? [], yt = [
277
+ }) ?? [], xt = [
276
278
  {
277
279
  label: D("planmagnet.analytics.metrics.totalWorkItems.label", "Total Work Items"),
278
280
  value: s(J),
279
- trend: `${s(mt)}% ${D("planmagnet.analytics.metrics.totalWorkItems.trend", "completed")}`
281
+ trend: `${s(gt)}% ${D("planmagnet.analytics.metrics.totalWorkItems.trend", "completed")}`
280
282
  },
281
283
  {
282
284
  label: D("planmagnet.analytics.metrics.storyPoints.label", "Story Points"),
283
- value: s(ct),
284
- trend: `${s(lt)} ${D("planmagnet.analytics.metrics.storyPoints.trend", "completed")}`
285
+ value: s(ut),
286
+ trend: `${s(dt)} ${D("planmagnet.analytics.metrics.storyPoints.trend", "completed")}`
285
287
  },
286
288
  {
287
289
  label: D("planmagnet.analytics.metrics.activeProjects.label", "Active Projects"),
288
- value: s(pt),
289
- trend: `${s(Je?.all)} ${D("planmagnet.analytics.metrics.activeProjects.trend", "total")}`
290
+ value: s(ht),
291
+ trend: `${s(Xe?.all)} ${D("planmagnet.analytics.metrics.activeProjects.trend", "total")}`
290
292
  },
291
293
  {
292
294
  label: D("planmagnet.analytics.metrics.blockedItems.label", "Blocked Items"),
@@ -322,7 +324,7 @@ function D() {
322
324
  ].map((e) => /* @__PURE__ */ p("button", {
323
325
  type: "button",
324
326
  "aria-pressed": I === e,
325
- onClick: () => Be(e),
327
+ onClick: () => He(e),
326
328
  className: `px-2.5 py-1 text-xs rounded ${I === e ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-muted"}`,
327
329
  children: D("planmagnet.analytics.range.last", "Last {{days}} days", { days: e })
328
330
  }, e))
@@ -341,7 +343,7 @@ function D() {
341
343
  className: "h-8 w-36",
342
344
  value: M.from,
343
345
  max: M.to,
344
- onChange: (e) => Ve(e.target.value)
346
+ onChange: (e) => Ue(e.target.value)
345
347
  }),
346
348
  /* @__PURE__ */ p("span", {
347
349
  className: "text-muted-foreground text-sm",
@@ -358,19 +360,19 @@ function D() {
358
360
  className: "h-8 w-36",
359
361
  value: M.to,
360
362
  min: M.from,
361
- onChange: (e) => He(e.target.value)
363
+ onChange: (e) => We(e.target.value)
362
364
  })
363
365
  ]
364
366
  }),
365
- ze && /* @__PURE__ */ p("p", {
367
+ Ve && /* @__PURE__ */ p("p", {
366
368
  role: "alert",
367
369
  className: "text-xs text-status-error-text",
368
- children: ze
370
+ children: Ve
369
371
  })
370
372
  ]
371
373
  }), /* @__PURE__ */ m(b, {
372
374
  value: P,
373
- onValueChange: Ue,
375
+ onValueChange: Ge,
374
376
  children: [/* @__PURE__ */ p(C, {
375
377
  className: "h-8 w-56",
376
378
  "data-testid": "analytics-project",
@@ -386,7 +388,7 @@ function D() {
386
388
  }),
387
389
  /* @__PURE__ */ p("div", {
388
390
  className: "grid grid-cols-2 md:grid-cols-4 gap-4",
389
- children: yt.map((e) => /* @__PURE__ */ p(h, { children: /* @__PURE__ */ m(g, {
391
+ children: xt.map((e) => /* @__PURE__ */ p(h, { children: /* @__PURE__ */ m(g, {
390
392
  className: "pt-4",
391
393
  children: [
392
394
  /* @__PURE__ */ p("p", {
@@ -411,20 +413,20 @@ function D() {
411
413
  className: "pt-4",
412
414
  children: [/* @__PURE__ */ m("div", {
413
415
  className: "flex items-center gap-2 text-muted-foreground text-xs",
414
- children: [/* @__PURE__ */ p(ve, { className: "h-4 w-4" }), D("planmagnet.analytics.summary.activeProjects", "Active Projects")]
416
+ children: [/* @__PURE__ */ p(be, { className: "h-4 w-4" }), D("planmagnet.analytics.summary.activeProjects", "Active Projects")]
415
417
  }), /* @__PURE__ */ p("p", {
416
418
  className: "text-xl font-bold mt-1",
417
- children: s(pt)
419
+ children: s(ht)
418
420
  })]
419
421
  }) }),
420
422
  /* @__PURE__ */ p(h, { children: /* @__PURE__ */ m(g, {
421
423
  className: "pt-4",
422
424
  children: [/* @__PURE__ */ m("div", {
423
425
  className: "flex items-center gap-2 text-muted-foreground text-xs",
424
- children: [/* @__PURE__ */ p(xe, { className: "h-4 w-4" }), D("planmagnet.analytics.summary.activeSprints", "Active Sprints")]
426
+ children: [/* @__PURE__ */ p(Ce, { className: "h-4 w-4" }), D("planmagnet.analytics.summary.activeSprints", "Active Sprints")]
425
427
  }), /* @__PURE__ */ p("p", {
426
428
  className: "text-xl font-bold mt-1",
427
- children: s(dt)
429
+ children: s(pt)
428
430
  })]
429
431
  }) }),
430
432
  /* @__PURE__ */ p(h, { children: /* @__PURE__ */ m(g, {
@@ -432,7 +434,7 @@ function D() {
432
434
  children: [
433
435
  /* @__PURE__ */ m("div", {
434
436
  className: "flex items-center gap-2 text-muted-foreground text-xs",
435
- children: [/* @__PURE__ */ p(be, { className: "h-4 w-4" }), D("planmagnet.analytics.summary.avgVelocity", "Avg Velocity")]
437
+ children: [/* @__PURE__ */ p(Se, { className: "h-4 w-4" }), D("planmagnet.analytics.summary.avgVelocity", "Avg Velocity")]
436
438
  }),
437
439
  /* @__PURE__ */ p("p", {
438
440
  className: "text-xs text-muted-foreground truncate",
@@ -441,7 +443,7 @@ function D() {
441
443
  /* @__PURE__ */ m("p", {
442
444
  className: "text-xl font-bold mt-1",
443
445
  children: [
444
- gt,
446
+ vt,
445
447
  " ",
446
448
  D("planmagnet.analytics.summary.pointsShort", "pts")
447
449
  ]
@@ -452,11 +454,11 @@ function D() {
452
454
  className: "pt-4",
453
455
  children: [/* @__PURE__ */ m("div", {
454
456
  className: "flex items-center gap-2 text-muted-foreground text-xs",
455
- children: [/* @__PURE__ */ p(ye, { className: "h-4 w-4" }), D("planmagnet.analytics.summary.atRisk", "At Risk")]
457
+ children: [/* @__PURE__ */ p(xe, { className: "h-4 w-4" }), D("planmagnet.analytics.summary.atRisk", "At Risk")]
456
458
  }), /* @__PURE__ */ m("p", {
457
459
  className: "text-xl font-bold mt-1",
458
460
  children: [
459
- s(ft),
461
+ s(mt),
460
462
  " ",
461
463
  D("planmagnet.analytics.summary.milestones", "milestones")
462
464
  ]
@@ -491,15 +493,15 @@ function D() {
491
493
  className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
492
494
  children: [/* @__PURE__ */ m(h, { children: [/* @__PURE__ */ p(_, { children: /* @__PURE__ */ m(v, {
493
495
  className: "flex items-center gap-2",
494
- children: [/* @__PURE__ */ p(_e, { className: "h-4 w-4" }), D("planmagnet.analytics.burndown.title", "Sprint Burndown")]
495
- }) }), /* @__PURE__ */ p(g, { children: tt ? /* @__PURE__ */ p("div", {
496
+ children: [/* @__PURE__ */ p(ye, { className: "h-4 w-4" }), D("planmagnet.analytics.burndown.title", "Sprint Burndown")]
497
+ }) }), /* @__PURE__ */ p(g, { children: rt ? /* @__PURE__ */ p("div", {
496
498
  className: "flex justify-center py-12",
497
499
  children: /* @__PURE__ */ p("div", { className: "animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full" })
498
- }) : ht.length > 0 ? /* @__PURE__ */ p(r, {
500
+ }) : _t.length > 0 ? /* @__PURE__ */ p(r, {
499
501
  width: "100%",
500
502
  height: 220,
501
503
  children: /* @__PURE__ */ m(ie, {
502
- data: ht,
504
+ data: _t,
503
505
  children: [
504
506
  /* @__PURE__ */ p(i, {
505
507
  strokeDasharray: "3 3",
@@ -539,7 +541,7 @@ function D() {
539
541
  }) })] }), /* @__PURE__ */ m(h, { children: [/* @__PURE__ */ p(_, { children: /* @__PURE__ */ m(v, {
540
542
  className: "flex items-center gap-2",
541
543
  children: [
542
- /* @__PURE__ */ p(be, { className: "h-4 w-4" }),
544
+ /* @__PURE__ */ p(Se, { className: "h-4 w-4" }),
543
545
  D("planmagnet.analytics.velocity.title", "Sprint Velocity"),
544
546
  " (",
545
547
  Z.length,
@@ -547,10 +549,10 @@ function D() {
547
549
  D("planmagnet.analytics.velocity.sprints", "Sprints"),
548
550
  ")"
549
551
  ]
550
- }) }), /* @__PURE__ */ p(g, { children: rt ? /* @__PURE__ */ p("div", {
552
+ }) }), /* @__PURE__ */ p(g, { children: at ? /* @__PURE__ */ p("div", {
551
553
  className: "flex justify-center py-12",
552
554
  children: /* @__PURE__ */ p("div", { className: "animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full" })
553
- }) : Z.length > 0 ? /* @__PURE__ */ m(Ce, { children: [/* @__PURE__ */ p(r, {
555
+ }) : Z.length > 0 ? /* @__PURE__ */ m(Te, { children: [/* @__PURE__ */ p(r, {
554
556
  width: "100%",
555
557
  height: 190,
556
558
  children: /* @__PURE__ */ m(ae, {
@@ -581,7 +583,7 @@ function D() {
581
583
  fill: "#6366f1"
582
584
  }),
583
585
  /* @__PURE__ */ p(te, {
584
- y: gt,
586
+ y: vt,
585
587
  stroke: "#22c55e",
586
588
  strokeDasharray: "4 4",
587
589
  label: {
@@ -594,8 +596,8 @@ function D() {
594
596
  })
595
597
  }), /* @__PURE__ */ p("p", {
596
598
  className: "text-xs text-muted-foreground text-center mt-2",
597
- children: Z.length === 1 ? D("planmagnet.analytics.velocity.trailingAverageOne", "Average of the last completed sprint: {{points}} pts per sprint", { points: _t }) : D("planmagnet.analytics.velocity.trailingAverage", "Average of the last {{count}} completed sprints: {{points}} pts per sprint", {
598
- points: _t,
599
+ children: Z.length === 1 ? D("planmagnet.analytics.velocity.trailingAverageOne", "Average of the last completed sprint: {{points}} pts per sprint", { points: yt }) : D("planmagnet.analytics.velocity.trailingAverage", "Average of the last {{count}} completed sprints: {{points}} pts per sprint", {
600
+ points: yt,
599
601
  count: Z.length
600
602
  })
601
603
  })] }) : /* @__PURE__ */ p("p", {
@@ -605,11 +607,11 @@ function D() {
605
607
  }),
606
608
  /* @__PURE__ */ m(h, { children: [/* @__PURE__ */ m(_, { children: [/* @__PURE__ */ m(v, {
607
609
  className: "flex items-center gap-2",
608
- children: [/* @__PURE__ */ p(_e, { className: "h-4 w-4" }), D("planmagnet.analytics.cfd.title", "Cumulative Flow Diagram")]
610
+ children: [/* @__PURE__ */ p(ye, { className: "h-4 w-4" }), D("planmagnet.analytics.cfd.title", "Cumulative Flow Diagram")]
609
611
  }), /* @__PURE__ */ p("p", {
610
612
  className: "text-xs text-muted-foreground",
611
613
  children: D("planmagnet.analytics.cfd.subtitle", "Selected date range, for {{project}}.", { project: K || D("planmagnet.analytics.delivery.noProject", "no project") })
612
- })] }), /* @__PURE__ */ p(g, { children: at ? /* @__PURE__ */ p("div", {
614
+ })] }), /* @__PURE__ */ p(g, { children: st ? /* @__PURE__ */ p("div", {
613
615
  className: "flex justify-center py-12",
614
616
  children: /* @__PURE__ */ p("div", { className: "animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full" })
615
617
  }) : $.length > 0 ? /* @__PURE__ */ p(r, {
@@ -632,7 +634,7 @@ function D() {
632
634
  }),
633
635
  /* @__PURE__ */ p(n, {}),
634
636
  /* @__PURE__ */ p(t, { wrapperStyle: { fontSize: 12 } }),
635
- vt.map((e) => /* @__PURE__ */ p(re, {
637
+ bt.map((e) => /* @__PURE__ */ p(re, {
636
638
  type: "monotone",
637
639
  dataKey: e,
638
640
  name: e.toLowerCase().replace("_", " "),
@@ -679,10 +681,26 @@ function D() {
679
681
  projectId: F
680
682
  })]
681
683
  }),
684
+ /* @__PURE__ */ p("div", { children: /* @__PURE__ */ p("h2", {
685
+ className: "text-lg font-semibold",
686
+ children: D("planmagnet.analytics.advanced.title", "Advanced visualizations")
687
+ }) }),
688
+ /* @__PURE__ */ m("div", {
689
+ className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
690
+ children: [/* @__PURE__ */ p(me, {
691
+ workspaceId: d,
692
+ projectId: U,
693
+ startDate: R,
694
+ endDate: z
695
+ }), /* @__PURE__ */ p(he, {
696
+ workspaceId: d,
697
+ projectId: F
698
+ })]
699
+ }),
682
700
  /* @__PURE__ */ m(h, { children: [/* @__PURE__ */ p(_, { children: /* @__PURE__ */ p(v, { children: D("planmagnet.analytics.projectHealth.title", "Project Health") }) }), /* @__PURE__ */ p(g, { children: /* @__PURE__ */ m("div", {
683
701
  className: "space-y-3",
684
702
  children: [H.filter((e) => e.status === "ACTIVE").map((e) => {
685
- let t = ut(e.id), n = e.endDate && new Date(e.endDate) < /* @__PURE__ */ new Date() && t < 100 ? "at_risk" : t >= 75 ? "on_track" : "in_progress";
703
+ let t = ft(e.id), n = e.endDate && new Date(e.endDate) < /* @__PURE__ */ new Date() && t < 100 ? "at_risk" : t >= 75 ? "on_track" : "in_progress";
686
704
  return /* @__PURE__ */ m("div", {
687
705
  className: "flex items-center gap-4",
688
706
  children: [
@@ -704,7 +722,7 @@ function D() {
704
722
  className: "text-sm w-12 text-right",
705
723
  children: [t, "%"]
706
724
  }),
707
- /* @__PURE__ */ p(Te, {
725
+ /* @__PURE__ */ p(De, {
708
726
  variant: "outline",
709
727
  className: "capitalize text-xs w-20 justify-center",
710
728
  children: n.replace("_", " ")