@burdenoff/microfe-planmagnet 2026.930.12 → 2026.930.14

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 (104) hide show
  1. package/dist/planmagnet/PlanMagnetRoot.d.ts.map +1 -1
  2. package/dist/planmagnet/PlanMagnetRoot.js +144 -128
  3. package/dist/planmagnet/PlanMagnetRoot.js.map +1 -1
  4. package/dist/planmagnet/PlanMagnetRoutes.d.ts.map +1 -1
  5. package/dist/planmagnet/PlanMagnetRoutes.js +231 -223
  6. package/dist/planmagnet/PlanMagnetRoutes.js.map +1 -1
  7. package/dist/planmagnet/activity/activityDescribe.d.ts +38 -0
  8. package/dist/planmagnet/activity/activityDescribe.d.ts.map +1 -0
  9. package/dist/planmagnet/activity/activityDescribe.js +123 -0
  10. package/dist/planmagnet/activity/activityDescribe.js.map +1 -0
  11. package/dist/planmagnet/activity/relativeTime.d.ts +8 -0
  12. package/dist/planmagnet/activity/relativeTime.d.ts.map +1 -0
  13. package/dist/planmagnet/activity/relativeTime.js +38 -0
  14. package/dist/planmagnet/activity/relativeTime.js.map +1 -0
  15. package/dist/planmagnet/admin/PlanMagnetAdminRoot.js +37 -37
  16. package/dist/planmagnet/automation/AutomationRuleFields.js +41 -41
  17. package/dist/planmagnet/board/BulkActions.js +6 -6
  18. package/dist/planmagnet/board/ProjectBoard.js +24 -24
  19. package/dist/planmagnet/budgets/BudgetControls.js +18 -18
  20. package/dist/planmagnet/comments/WorkItemActivity.d.ts.map +1 -1
  21. package/dist/planmagnet/comments/WorkItemActivity.js +35 -38
  22. package/dist/planmagnet/comments/WorkItemActivity.js.map +1 -1
  23. package/dist/planmagnet/controls/FeatureControls.js +46 -46
  24. package/dist/planmagnet/controls/ObjectiveControls.js +11 -11
  25. package/dist/planmagnet/controls/ProgramControls.js +9 -9
  26. package/dist/planmagnet/controls/ProjectControls.d.ts.map +1 -1
  27. package/dist/planmagnet/controls/ProjectControls.js +53 -46
  28. package/dist/planmagnet/controls/ProjectControls.js.map +1 -1
  29. package/dist/planmagnet/controls/WorkItemControls.js +27 -27
  30. package/dist/planmagnet/dependency/DependencyPanel.js +7 -7
  31. package/dist/planmagnet/pages/ActivityActivityPagePage.d.ts +2 -0
  32. package/dist/planmagnet/pages/ActivityActivityPagePage.d.ts.map +1 -0
  33. package/dist/planmagnet/pages/ActivityActivityPagePage.js +291 -0
  34. package/dist/planmagnet/pages/ActivityActivityPagePage.js.map +1 -0
  35. package/dist/planmagnet/pages/AiPlanPagePage.js +6 -6
  36. package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.d.ts.map +1 -1
  37. package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.js +370 -221
  38. package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.js.map +1 -1
  39. package/dist/planmagnet/pages/AutomationAutomationRulesPagePage.js +15 -15
  40. package/dist/planmagnet/pages/AutomationCreateAutomationRulePagePage.js +9 -9
  41. package/dist/planmagnet/pages/DashboardDashboardPagePage.d.ts.map +1 -1
  42. package/dist/planmagnet/pages/DashboardDashboardPagePage.js +140 -135
  43. package/dist/planmagnet/pages/DashboardDashboardPagePage.js.map +1 -1
  44. package/dist/planmagnet/pages/ProductsEditProductPagePage.js +4 -4
  45. package/dist/planmagnet/pages/ProductsEditRoadmapPagePage.js +4 -4
  46. package/dist/planmagnet/pages/ProductsProductDetailPagePage.js +4 -4
  47. package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.d.ts.map +1 -1
  48. package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.js +118 -109
  49. package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.js.map +1 -1
  50. package/dist/planmagnet/pages/ProgramsEditProgramPagePage.js +4 -4
  51. package/dist/planmagnet/pages/ProjectsBudgetDetailPagePage.d.ts.map +1 -1
  52. package/dist/planmagnet/pages/ProjectsBudgetDetailPagePage.js +160 -108
  53. package/dist/planmagnet/pages/ProjectsBudgetDetailPagePage.js.map +1 -1
  54. package/dist/planmagnet/pages/ProjectsBudgetsPagePage.js +10 -10
  55. package/dist/planmagnet/pages/ProjectsEditProjectPagePage.js +11 -11
  56. package/dist/planmagnet/pages/ProjectsMilestoneDetailPagePage.js +4 -4
  57. package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.js +4 -4
  58. package/dist/planmagnet/pages/ProjectsPlanningEditPagePage.js +6 -6
  59. package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.js +13 -13
  60. package/dist/planmagnet/pages/ProjectsQualityGatesPagePage.js +4 -4
  61. package/dist/planmagnet/pages/ProjectsWorkflowPagePage.js +30 -30
  62. package/dist/planmagnet/pages/RisksRiskDetailPagePage.js +4 -4
  63. package/dist/planmagnet/pages/TasksMyDashboardPagePage.d.ts +2 -0
  64. package/dist/planmagnet/pages/TasksMyDashboardPagePage.d.ts.map +1 -0
  65. package/dist/planmagnet/pages/TasksMyDashboardPagePage.js +329 -0
  66. package/dist/planmagnet/pages/TasksMyDashboardPagePage.js.map +1 -0
  67. package/dist/planmagnet/pages/TasksTaskDetailPagePage.js +26 -26
  68. package/dist/planmagnet/pages/TeamCreateTeamPagePage.js +4 -4
  69. package/dist/planmagnet/pages/TeamTeamDetailPagePage.js +6 -6
  70. package/dist/planmagnet/pages/TeamTeamEditPagePage.js +6 -6
  71. package/dist/planmagnet/pages/analytics/DeliveryHealthCards.d.ts +14 -2
  72. package/dist/planmagnet/pages/analytics/DeliveryHealthCards.d.ts.map +1 -1
  73. package/dist/planmagnet/pages/analytics/DeliveryHealthCards.js +173 -113
  74. package/dist/planmagnet/pages/analytics/DeliveryHealthCards.js.map +1 -1
  75. package/dist/planmagnet/pages/analytics/DeliveryKpisCard.d.ts +8 -0
  76. package/dist/planmagnet/pages/analytics/DeliveryKpisCard.d.ts.map +1 -0
  77. package/dist/planmagnet/pages/analytics/DeliveryKpisCard.js +211 -0
  78. package/dist/planmagnet/pages/analytics/DeliveryKpisCard.js.map +1 -0
  79. package/dist/planmagnet/pages/analytics/QualityMetricsCard.d.ts +8 -0
  80. package/dist/planmagnet/pages/analytics/QualityMetricsCard.d.ts.map +1 -0
  81. package/dist/planmagnet/pages/analytics/QualityMetricsCard.js +177 -0
  82. package/dist/planmagnet/pages/analytics/QualityMetricsCard.js.map +1 -0
  83. package/dist/planmagnet/pages/analytics/ThroughputCard.d.ts +7 -0
  84. package/dist/planmagnet/pages/analytics/ThroughputCard.d.ts.map +1 -0
  85. package/dist/planmagnet/pages/analytics/ThroughputCard.js +137 -0
  86. package/dist/planmagnet/pages/analytics/ThroughputCard.js.map +1 -0
  87. package/dist/planmagnet/pages/analytics/analyticsRange.d.ts +42 -0
  88. package/dist/planmagnet/pages/analytics/analyticsRange.d.ts.map +1 -0
  89. package/dist/planmagnet/pages/analytics/analyticsRange.js +47 -0
  90. package/dist/planmagnet/pages/analytics/analyticsRange.js.map +1 -0
  91. package/dist/planmagnet/roadmaps/RoadmapControls.js +21 -21
  92. package/dist/planmagnet/roadmaps/RoadmapNowNextLater.d.ts +29 -0
  93. package/dist/planmagnet/roadmaps/RoadmapNowNextLater.d.ts.map +1 -1
  94. package/dist/planmagnet/roadmaps/RoadmapNowNextLater.js +1 -1
  95. package/dist/planmagnet/roadmaps/RoadmapNowNextLater.js.map +1 -1
  96. package/dist/planmagnet/roadmaps/RoadmapPresentation.d.ts +37 -0
  97. package/dist/planmagnet/roadmaps/RoadmapPresentation.d.ts.map +1 -0
  98. package/dist/planmagnet/roadmaps/RoadmapPresentation.js +210 -0
  99. package/dist/planmagnet/roadmaps/RoadmapPresentation.js.map +1 -0
  100. package/dist/planmagnet/team/TeamControls.d.ts.map +1 -1
  101. package/dist/planmagnet/team/TeamControls.js +134 -124
  102. package/dist/planmagnet/team/TeamControls.js.map +1 -1
  103. package/dist/planmagnet/time/TimeEntryControls.js +12 -12
  104. package/package.json +1 -1
@@ -2,27 +2,32 @@ import { usePlanMagnet as e } from "../providers/PlanMagnetProvider.js";
2
2
  import { Legend as t } from "../../node_modules/recharts/es6/component/Legend.js";
3
3
  import { Tooltip as n } from "../../node_modules/recharts/es6/component/Tooltip.js";
4
4
  import { ResponsiveContainer as r } from "../../node_modules/recharts/es6/component/ResponsiveContainer.js";
5
- import { Bar as i } from "../../node_modules/recharts/es6/cartesian/Bar.js";
6
- import { ReferenceLine as ee } from "../../node_modules/recharts/es6/cartesian/ReferenceLine.js";
7
- import { CartesianGrid as a } from "../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
8
- import { Line as o } from "../../node_modules/recharts/es6/cartesian/Line.js";
9
- import { Area as te } from "../../node_modules/recharts/es6/cartesian/Area.js";
10
- import { XAxis as s } from "../../node_modules/recharts/es6/cartesian/XAxis.js";
11
- import { YAxis as c } from "../../node_modules/recharts/es6/cartesian/YAxis.js";
12
- import { LineChart as ne } from "../../node_modules/recharts/es6/chart/LineChart.js";
13
- import { BarChart as re } from "../../node_modules/recharts/es6/chart/BarChart.js";
14
- import { AreaChart as l } from "../../node_modules/recharts/es6/chart/AreaChart.js";
15
- import { countLabel as u, useProjectCounts as ie, useSprintCounts as ae } from "../hooks/useCounts.js";
16
- import { BudgetPerformanceCard as oe, CycleTimeCard as se } from "./analytics/DeliveryHealthCards.js";
17
- import { useState as d } from "react";
18
- import { BarChart3 as f, FolderKanban as ce, Target as le, TrendingUp as p, Zap as ue } from "lucide-react";
19
- import { gql as m } from "@apollo/client";
20
- import { useQuery as h } from "@apollo/client/react";
21
- import { Fragment as de, jsx as g, jsxs as _ } from "react/jsx-runtime";
22
- import { useI18n as fe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
23
- import { Badge as pe, Card as v, CardContent as y, CardHeader as b, CardTitle as x, Select as S, SelectContent as C, SelectItem as w, SelectTrigger as T, SelectValue as E } from "@burdenoff/fe-libs/ui";
5
+ import { Bar as ee } from "../../node_modules/recharts/es6/cartesian/Bar.js";
6
+ import { ReferenceLine as te } from "../../node_modules/recharts/es6/cartesian/ReferenceLine.js";
7
+ import { CartesianGrid as i } from "../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
8
+ import { Line as ne } from "../../node_modules/recharts/es6/cartesian/Line.js";
9
+ import { Area as re } from "../../node_modules/recharts/es6/cartesian/Area.js";
10
+ import { XAxis as a } from "../../node_modules/recharts/es6/cartesian/XAxis.js";
11
+ import { YAxis as o } from "../../node_modules/recharts/es6/cartesian/YAxis.js";
12
+ import { LineChart as ie } from "../../node_modules/recharts/es6/chart/LineChart.js";
13
+ import { BarChart as ae } from "../../node_modules/recharts/es6/chart/BarChart.js";
14
+ import { AreaChart as oe } from "../../node_modules/recharts/es6/chart/AreaChart.js";
15
+ import { countLabel as s, useProjectCounts as se, useSprintCounts as ce } from "../hooks/useCounts.js";
16
+ import { BudgetPerformanceCard as le, CycleTimeCard as ue } from "./analytics/DeliveryHealthCards.js";
17
+ import { QualityMetricsCard as de } from "./analytics/QualityMetricsCard.js";
18
+ import { DeliveryKpisCard as fe } from "./analytics/DeliveryKpisCard.js";
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";
21
+ 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 { gql as d } from "@apollo/client";
25
+ 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";
24
29
  //#region src/planmagnet/pages/AnalyticsAnalyticsPagePage.tsx
25
- var me = m`
30
+ var Ee = d`
26
31
  query AnalyticsProjectSprints($workspaceId: ID!, $projectId: String) {
27
32
  planmagnetSprints(
28
33
  workspaceId: $workspaceId
@@ -38,7 +43,7 @@ var me = m`
38
43
  }
39
44
  }
40
45
  }
41
- `, he = m`
46
+ `, De = d`
42
47
  query AnalyticsMilestoneRisk($workspaceId: ID!, $yesterday: DateTime) {
43
48
  missed: planmagnetMilestones(
44
49
  workspaceId: $workspaceId
@@ -55,7 +60,7 @@ var me = m`
55
60
  totalCount
56
61
  }
57
62
  }
58
- `, ge = m`
63
+ `, Oe = d`
59
64
  query GetAnalyticsWorkItemCounts($workspaceId: ID!) {
60
65
  planmagnetWorkItemCounts(workspaceId: $workspaceId) {
61
66
  total
@@ -73,7 +78,7 @@ var me = m`
73
78
  }
74
79
  }
75
80
  }
76
- `, _e = m`
81
+ `, ke = d`
77
82
  query GetAnalyticsData($workspaceId: ID!, $projectPagination: PlanmagnetPaginationInput) {
78
83
  planmagnetProjects(workspaceId: $workspaceId, pagination: $projectPagination) {
79
84
  items {
@@ -88,7 +93,7 @@ var me = m`
88
93
  totalCount
89
94
  }
90
95
  }
91
- `, ve = m`
96
+ `, Ae = d`
92
97
  query GetSprintBurndown($workspaceId: ID!, $sprintId: ID!) {
93
98
  planmagnetSprintBurndown(workspaceId: $workspaceId, sprintId: $sprintId) {
94
99
  sprintId
@@ -105,7 +110,7 @@ var me = m`
105
110
  }
106
111
  }
107
112
  }
108
- `, ye = m`
113
+ `, je = d`
109
114
  query GetVelocity($workspaceId: ID!, $projectId: ID!, $trailingSprintCount: Int) {
110
115
  planmagnetVelocity(
111
116
  workspaceId: $workspaceId
@@ -125,9 +130,19 @@ var me = m`
125
130
  }
126
131
  }
127
132
  }
128
- `, be = m`
129
- query GetCumulativeFlow($workspaceId: ID!, $projectId: ID!) {
130
- planmagnetCumulativeFlow(workspaceId: $workspaceId, projectId: $projectId) {
133
+ `, Me = d`
134
+ query GetCumulativeFlow(
135
+ $workspaceId: ID!
136
+ $projectId: ID!
137
+ $startDate: DateTime
138
+ $endDate: DateTime
139
+ ) {
140
+ planmagnetCumulativeFlow(
141
+ workspaceId: $workspaceId
142
+ projectId: $projectId
143
+ startDate: $startDate
144
+ endDate: $endDate
145
+ ) {
131
146
  projectId
132
147
  startDate
133
148
  endDate
@@ -140,7 +155,7 @@ var me = m`
140
155
  }
141
156
  }
142
157
  }
143
- `, D = {
158
+ `, T = {
144
159
  BACKLOG: "#9ca3af",
145
160
  TODO: "#60a5fa",
146
161
  IN_PROGRESS: "#fbbf24",
@@ -149,428 +164,562 @@ var me = m`
149
164
  DONE: "#4ade80",
150
165
  CANCELLED: "#f87171"
151
166
  };
152
- function O(e) {
167
+ function E(e) {
153
168
  let t = new Date(e);
154
169
  return `${t.getUTCMonth() + 1}/${t.getUTCDate()}`;
155
170
  }
156
- function k() {
157
- let { workspaceId: m } = e(), { t: k } = fe(), [xe, Se] = d(""), [Ce, A] = d(""), { data: j, loading: we, error: M } = h(_e, {
171
+ 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) ? {
173
+ from: A,
174
+ 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\".");
176
+ function L(e, t) {
177
+ N(e), c(e.from, e.to) && Ie(e);
178
+ 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 });
180
+ }
181
+ function Be(e) {
182
+ L(l(e), P);
183
+ }
184
+ function Ve(e) {
185
+ e && M.to && c(e, M.to) ? L({
186
+ from: e,
187
+ to: M.to
188
+ }, P) : N((t) => ({
189
+ ...t,
190
+ from: e
191
+ }));
192
+ }
193
+ function He(e) {
194
+ e && M.from && c(M.from, e) ? L({
195
+ from: M.from,
196
+ to: e
197
+ }, P) : N((t) => ({
198
+ ...t,
199
+ to: e
200
+ }));
201
+ }
202
+ function Ue(e) {
203
+ Le(e), O(""), L(M, e);
204
+ }
205
+ let { startDate: R, endDate: z } = ge(Re ? M : Fe), { data: We, loading: Ge, error: Ke } = f(ke, {
158
206
  variables: {
159
- workspaceId: m,
207
+ workspaceId: d,
160
208
  projectPagination: { first: 100 }
161
209
  },
162
- skip: !m
163
- }), { data: Te } = h(ge, {
164
- variables: { workspaceId: m },
165
- skip: !m
166
- }), N = Te?.planmagnetWorkItemCounts, P = ie(), Ee = ae(), [De] = d(() => (/* @__PURE__ */ new Date(Date.now() - 864e5)).toISOString().slice(0, 10)), { data: F } = h(he, {
210
+ skip: !d
211
+ }), { data: qe } = f(Oe, {
212
+ variables: { workspaceId: d },
213
+ 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, {
167
215
  variables: {
168
- workspaceId: m,
169
- yesterday: De
216
+ workspaceId: d,
217
+ yesterday: Xe
170
218
  },
171
- skip: !m
172
- }), I = j?.planmagnetProjects?.items ?? [], L = xe || I[0]?.id || "", { data: R } = h(me, {
219
+ skip: !d
220
+ }), H = We?.planmagnetProjects?.items ?? [], U = F || H[0]?.id || "", { data: Ze } = f(Ee, {
173
221
  variables: {
174
- workspaceId: m,
175
- projectId: L
222
+ workspaceId: d,
223
+ projectId: U
176
224
  },
177
- skip: !m || !L
178
- }), z = R?.planmagnetSprints.items ?? [], Oe = z.filter((e) => e.status === "COMPLETED").sort((e, t) => (t.completedAt ?? t.endDate ?? "").localeCompare(e.completedAt ?? e.endDate ?? ""))[0], ke = z.find((e) => e.status === "ACTIVE" || e.status === "REVIEW") ?? Oe ?? z[0], B = Ce || ke?.id || "", Ae = I.find((e) => e.id === L)?.name ?? "", { data: je, loading: Me } = h(ve, {
225
+ 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, {
179
227
  variables: {
180
- workspaceId: m,
181
- sprintId: B
228
+ workspaceId: d,
229
+ sprintId: G
182
230
  },
183
- skip: !m || !B
184
- }), { data: Ne, loading: Pe } = h(ye, {
231
+ skip: !d || !G
232
+ }), { data: nt, loading: rt } = f(je, {
185
233
  variables: {
186
- workspaceId: m,
187
- projectId: L,
234
+ workspaceId: d,
235
+ projectId: U,
188
236
  trailingSprintCount: 6
189
237
  },
190
- skip: !m || !L
191
- }), { data: Fe, loading: Ie } = h(be, {
238
+ skip: !d || !U
239
+ }), { data: it, loading: at } = f(Me, {
192
240
  variables: {
193
- workspaceId: m,
194
- projectId: L
241
+ workspaceId: d,
242
+ projectId: U,
243
+ startDate: R,
244
+ endDate: z
195
245
  },
196
- skip: !m || !L
246
+ skip: !d || !U
197
247
  });
198
- if (we && !j) return /* @__PURE__ */ g("div", {
248
+ if (Ge && !We) return /* @__PURE__ */ p("div", {
199
249
  className: "flex items-center justify-center p-12",
200
- children: /* @__PURE__ */ g("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
250
+ children: /* @__PURE__ */ p("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
201
251
  });
202
- if (M) return /* @__PURE__ */ _("div", {
252
+ if (Ke) return /* @__PURE__ */ m("div", {
203
253
  className: "p-6 text-red-500",
204
254
  children: [
205
- k("planmagnet.analytics.errorLoading", "Error loading analytics"),
255
+ D("planmagnet.analytics.errorLoading", "Error loading analytics"),
206
256
  ": ",
207
- M.message
257
+ Ke.message
208
258
  ]
209
259
  });
210
- let V = (e) => N?.byStatus.find((t) => t.status === e), H = V("CANCELLED")?.count ?? 0, U = N ? V("DONE")?.count ?? 0 : null, W = N ? N.total : null, G = N ? N.blocked : null, Le = N ? N.points : null, Re = N ? V("DONE")?.points ?? 0 : null, ze = (e) => {
211
- let t = N?.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);
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) => {
261
+ 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);
212
262
  return n > 0 ? Math.round(r / n * 100) : 0;
213
- }, Be = Ee?.running ?? null, Ve = F ? F.missed.totalCount + F.overdue.totalCount : null, K = P?.active ?? null, He = W != null && U != null && W - H > 0 ? Math.round(U / (W - H) * 100) : null, q = (je?.planmagnetSprintBurndown)?.points.map((e) => ({
214
- day: O(e.date),
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) => ({
264
+ day: E(e.date),
215
265
  remaining: e.remainingPoints,
216
266
  completed: e.completedPoints
217
- })) ?? [], J = Ne?.planmagnetVelocity, Y = J?.sprints.map((e) => ({
267
+ })) ?? [], X = nt?.planmagnetVelocity, Z = X?.sprints.map((e) => ({
218
268
  name: e.sprintName,
219
269
  completed: e.completedPoints,
220
270
  planned: e.plannedPoints ?? void 0
221
- })) ?? [], X = J ? Math.round(J.averageVelocity) : 0, Z = J ? Math.round(J.forecastNextSprintPoints) : 0, Q = Fe?.planmagnetCumulativeFlow, Ue = Array.from(new Set(Q?.points.flatMap((e) => e.statuses.map((e) => e.status)) ?? [])), $ = Q?.points.map((e) => {
222
- let t = { day: O(e.date) };
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) => {
272
+ let t = { day: E(e.date) };
223
273
  for (let n of e.statuses) t[n.status] = n.count;
224
274
  return t;
225
- }) ?? [], We = [
275
+ }) ?? [], yt = [
226
276
  {
227
- label: k("planmagnet.analytics.metrics.totalWorkItems.label", "Total Work Items"),
228
- value: u(W),
229
- trend: `${u(He)}% ${k("planmagnet.analytics.metrics.totalWorkItems.trend", "completed")}`
277
+ label: D("planmagnet.analytics.metrics.totalWorkItems.label", "Total Work Items"),
278
+ value: s(J),
279
+ trend: `${s(mt)}% ${D("planmagnet.analytics.metrics.totalWorkItems.trend", "completed")}`
230
280
  },
231
281
  {
232
- label: k("planmagnet.analytics.metrics.storyPoints.label", "Story Points"),
233
- value: u(Le),
234
- trend: `${u(Re)} ${k("planmagnet.analytics.metrics.storyPoints.trend", "completed")}`
282
+ label: D("planmagnet.analytics.metrics.storyPoints.label", "Story Points"),
283
+ value: s(ct),
284
+ trend: `${s(lt)} ${D("planmagnet.analytics.metrics.storyPoints.trend", "completed")}`
235
285
  },
236
286
  {
237
- label: k("planmagnet.analytics.metrics.activeProjects.label", "Active Projects"),
238
- value: u(K),
239
- trend: `${u(P?.all)} ${k("planmagnet.analytics.metrics.activeProjects.trend", "total")}`
287
+ 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")}`
240
290
  },
241
291
  {
242
- label: k("planmagnet.analytics.metrics.blockedItems.label", "Blocked Items"),
243
- value: u(G),
244
- trend: G == null ? "" : G > 0 ? k("planmagnet.analytics.metrics.blockedItems.attention", "Needs attention") : k("planmagnet.analytics.metrics.blockedItems.clear", "All clear")
292
+ label: D("planmagnet.analytics.metrics.blockedItems.label", "Blocked Items"),
293
+ value: s(Y),
294
+ trend: Y == null ? "" : Y > 0 ? D("planmagnet.analytics.metrics.blockedItems.attention", "Needs attention") : D("planmagnet.analytics.metrics.blockedItems.clear", "All clear")
245
295
  }
246
296
  ];
247
- return /* @__PURE__ */ _("div", {
297
+ return /* @__PURE__ */ m("div", {
248
298
  className: "space-y-6 p-6",
249
299
  children: [
250
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h1", {
300
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h1", {
251
301
  className: "text-2xl font-semibold",
252
- children: k("planmagnet.analytics.title", "Analytics Dashboard")
253
- }), /* @__PURE__ */ g("p", {
302
+ children: D("planmagnet.analytics.title", "Analytics Dashboard")
303
+ }), /* @__PURE__ */ p("p", {
254
304
  className: "text-sm text-muted-foreground",
255
- children: k("planmagnet.analytics.subtitle", "Overview of project health and team performance")
305
+ children: D("planmagnet.analytics.subtitle", "Overview of project health and team performance")
256
306
  })] }),
257
- /* @__PURE__ */ g("div", {
307
+ /* @__PURE__ */ m("div", {
308
+ className: "flex flex-col gap-3 rounded-lg border p-3 sm:flex-row sm:flex-wrap sm:items-center sm:justify-between",
309
+ "data-testid": "analytics-range",
310
+ children: [/* @__PURE__ */ m("div", {
311
+ className: "flex flex-wrap items-center gap-2",
312
+ children: [
313
+ /* @__PURE__ */ p("div", {
314
+ className: "flex items-center gap-1 rounded-md border p-0.5",
315
+ role: "group",
316
+ "aria-label": D("planmagnet.analytics.range.presetLabel", "Date range preset"),
317
+ "data-testid": "analytics-range-preset",
318
+ children: [
319
+ "7",
320
+ "30",
321
+ "90"
322
+ ].map((e) => /* @__PURE__ */ p("button", {
323
+ type: "button",
324
+ "aria-pressed": I === e,
325
+ onClick: () => Be(e),
326
+ className: `px-2.5 py-1 text-xs rounded ${I === e ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-muted"}`,
327
+ children: D("planmagnet.analytics.range.last", "Last {{days}} days", { days: e })
328
+ }, e))
329
+ }),
330
+ /* @__PURE__ */ m("div", {
331
+ className: "flex items-center gap-1.5",
332
+ children: [
333
+ /* @__PURE__ */ p("label", {
334
+ htmlFor: "analytics-range-from",
335
+ className: "sr-only",
336
+ children: D("planmagnet.analytics.range.from", "From")
337
+ }),
338
+ /* @__PURE__ */ p(y, {
339
+ id: "analytics-range-from",
340
+ type: "date",
341
+ className: "h-8 w-36",
342
+ value: M.from,
343
+ max: M.to,
344
+ onChange: (e) => Ve(e.target.value)
345
+ }),
346
+ /* @__PURE__ */ p("span", {
347
+ className: "text-muted-foreground text-sm",
348
+ children: "–"
349
+ }),
350
+ /* @__PURE__ */ p("label", {
351
+ htmlFor: "analytics-range-to",
352
+ className: "sr-only",
353
+ children: D("planmagnet.analytics.range.to", "To")
354
+ }),
355
+ /* @__PURE__ */ p(y, {
356
+ id: "analytics-range-to",
357
+ type: "date",
358
+ className: "h-8 w-36",
359
+ value: M.to,
360
+ min: M.from,
361
+ onChange: (e) => He(e.target.value)
362
+ })
363
+ ]
364
+ }),
365
+ ze && /* @__PURE__ */ p("p", {
366
+ role: "alert",
367
+ className: "text-xs text-status-error-text",
368
+ children: ze
369
+ })
370
+ ]
371
+ }), /* @__PURE__ */ m(b, {
372
+ value: P,
373
+ onValueChange: Ue,
374
+ children: [/* @__PURE__ */ p(C, {
375
+ className: "h-8 w-56",
376
+ "data-testid": "analytics-project",
377
+ children: /* @__PURE__ */ p(w, { placeholder: D("planmagnet.analytics.range.allProjects", "All projects") })
378
+ }), /* @__PURE__ */ m(x, { children: [/* @__PURE__ */ p(S, {
379
+ value: "all",
380
+ children: D("planmagnet.analytics.range.allProjects", "All projects")
381
+ }), H.map((e) => /* @__PURE__ */ p(S, {
382
+ value: e.id,
383
+ children: e.name
384
+ }, e.id))] })]
385
+ })]
386
+ }),
387
+ /* @__PURE__ */ p("div", {
258
388
  className: "grid grid-cols-2 md:grid-cols-4 gap-4",
259
- children: We.map((e) => /* @__PURE__ */ g(v, { children: /* @__PURE__ */ _(y, {
389
+ children: yt.map((e) => /* @__PURE__ */ p(h, { children: /* @__PURE__ */ m(g, {
260
390
  className: "pt-4",
261
391
  children: [
262
- /* @__PURE__ */ g("p", {
392
+ /* @__PURE__ */ p("p", {
263
393
  className: "text-xs text-muted-foreground",
264
394
  children: e.label
265
395
  }),
266
- /* @__PURE__ */ g("p", {
396
+ /* @__PURE__ */ p("p", {
267
397
  className: "text-xl font-bold mt-1",
268
398
  children: e.value
269
399
  }),
270
- /* @__PURE__ */ g("p", {
400
+ /* @__PURE__ */ p("p", {
271
401
  className: "text-xs text-green-600 mt-1",
272
402
  children: e.trend
273
403
  })
274
404
  ]
275
405
  }) }, e.label))
276
406
  }),
277
- /* @__PURE__ */ _("div", {
407
+ /* @__PURE__ */ m("div", {
278
408
  className: "grid grid-cols-2 md:grid-cols-4 gap-4",
279
409
  children: [
280
- /* @__PURE__ */ g(v, { children: /* @__PURE__ */ _(y, {
410
+ /* @__PURE__ */ p(h, { children: /* @__PURE__ */ m(g, {
281
411
  className: "pt-4",
282
- children: [/* @__PURE__ */ _("div", {
412
+ children: [/* @__PURE__ */ m("div", {
283
413
  className: "flex items-center gap-2 text-muted-foreground text-xs",
284
- children: [/* @__PURE__ */ g(ce, { className: "h-4 w-4" }), k("planmagnet.analytics.summary.activeProjects", "Active Projects")]
285
- }), /* @__PURE__ */ g("p", {
414
+ children: [/* @__PURE__ */ p(ve, { className: "h-4 w-4" }), D("planmagnet.analytics.summary.activeProjects", "Active Projects")]
415
+ }), /* @__PURE__ */ p("p", {
286
416
  className: "text-xl font-bold mt-1",
287
- children: u(K)
417
+ children: s(pt)
288
418
  })]
289
419
  }) }),
290
- /* @__PURE__ */ g(v, { children: /* @__PURE__ */ _(y, {
420
+ /* @__PURE__ */ p(h, { children: /* @__PURE__ */ m(g, {
291
421
  className: "pt-4",
292
- children: [/* @__PURE__ */ _("div", {
422
+ children: [/* @__PURE__ */ m("div", {
293
423
  className: "flex items-center gap-2 text-muted-foreground text-xs",
294
- children: [/* @__PURE__ */ g(ue, { className: "h-4 w-4" }), k("planmagnet.analytics.summary.activeSprints", "Active Sprints")]
295
- }), /* @__PURE__ */ g("p", {
424
+ children: [/* @__PURE__ */ p(xe, { className: "h-4 w-4" }), D("planmagnet.analytics.summary.activeSprints", "Active Sprints")]
425
+ }), /* @__PURE__ */ p("p", {
296
426
  className: "text-xl font-bold mt-1",
297
- children: u(Be)
427
+ children: s(dt)
298
428
  })]
299
429
  }) }),
300
- /* @__PURE__ */ g(v, { children: /* @__PURE__ */ _(y, {
430
+ /* @__PURE__ */ p(h, { children: /* @__PURE__ */ m(g, {
301
431
  className: "pt-4",
302
432
  children: [
303
- /* @__PURE__ */ _("div", {
433
+ /* @__PURE__ */ m("div", {
304
434
  className: "flex items-center gap-2 text-muted-foreground text-xs",
305
- children: [/* @__PURE__ */ g(p, { className: "h-4 w-4" }), k("planmagnet.analytics.summary.avgVelocity", "Avg Velocity")]
435
+ children: [/* @__PURE__ */ p(be, { className: "h-4 w-4" }), D("planmagnet.analytics.summary.avgVelocity", "Avg Velocity")]
306
436
  }),
307
- /* @__PURE__ */ g("p", {
437
+ /* @__PURE__ */ p("p", {
308
438
  className: "text-xs text-muted-foreground truncate",
309
- children: Ae || "—"
439
+ children: K || "—"
310
440
  }),
311
- /* @__PURE__ */ _("p", {
441
+ /* @__PURE__ */ m("p", {
312
442
  className: "text-xl font-bold mt-1",
313
443
  children: [
314
- X,
444
+ gt,
315
445
  " ",
316
- k("planmagnet.analytics.summary.pointsShort", "pts")
446
+ D("planmagnet.analytics.summary.pointsShort", "pts")
317
447
  ]
318
448
  })
319
449
  ]
320
450
  }) }),
321
- /* @__PURE__ */ g(v, { children: /* @__PURE__ */ _(y, {
451
+ /* @__PURE__ */ p(h, { children: /* @__PURE__ */ m(g, {
322
452
  className: "pt-4",
323
- children: [/* @__PURE__ */ _("div", {
453
+ children: [/* @__PURE__ */ m("div", {
324
454
  className: "flex items-center gap-2 text-muted-foreground text-xs",
325
- children: [/* @__PURE__ */ g(le, { className: "h-4 w-4" }), k("planmagnet.analytics.summary.atRisk", "At Risk")]
326
- }), /* @__PURE__ */ _("p", {
455
+ children: [/* @__PURE__ */ p(ye, { className: "h-4 w-4" }), D("planmagnet.analytics.summary.atRisk", "At Risk")]
456
+ }), /* @__PURE__ */ m("p", {
327
457
  className: "text-xl font-bold mt-1",
328
458
  children: [
329
- u(Ve),
459
+ s(ft),
330
460
  " ",
331
- k("planmagnet.analytics.summary.milestones", "milestones")
461
+ D("planmagnet.analytics.summary.milestones", "milestones")
332
462
  ]
333
463
  })]
334
464
  }) })
335
465
  ]
336
466
  }),
337
- /* @__PURE__ */ _("div", {
467
+ /* @__PURE__ */ m("div", {
338
468
  className: "flex flex-col sm:flex-row gap-3 items-start sm:items-center",
339
- children: [/* @__PURE__ */ g("h2", {
469
+ children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h2", {
340
470
  className: "text-lg font-semibold",
341
- children: k("planmagnet.analytics.delivery.title", "Sprint Delivery Analytics")
342
- }), /* @__PURE__ */ _("div", {
471
+ children: D("planmagnet.analytics.delivery.title", "Sprint Delivery Analytics")
472
+ }), /* @__PURE__ */ p("p", {
473
+ className: "text-xs text-muted-foreground",
474
+ children: D("planmagnet.analytics.delivery.forProject", "For {{project}}", { project: K || D("planmagnet.analytics.delivery.noProject", "no project") })
475
+ })] }), /* @__PURE__ */ p("div", {
343
476
  className: "flex gap-2 sm:ml-auto",
344
- children: [/* @__PURE__ */ _(S, {
345
- value: L,
346
- onValueChange: (e) => {
347
- Se(e), A("");
348
- },
349
- children: [/* @__PURE__ */ g(T, {
350
- className: "h-8 w-48",
351
- children: /* @__PURE__ */ g(E, { placeholder: k("planmagnet.analytics.delivery.projectPlaceholder", "Select project") })
352
- }), /* @__PURE__ */ g(C, { children: I.map((e) => /* @__PURE__ */ g(w, {
353
- value: e.id,
354
- children: e.name
355
- }, e.id)) })]
356
- }), /* @__PURE__ */ _(S, {
357
- value: B,
358
- onValueChange: A,
359
- children: [/* @__PURE__ */ g(T, {
477
+ children: /* @__PURE__ */ m(b, {
478
+ value: G,
479
+ onValueChange: O,
480
+ children: [/* @__PURE__ */ p(C, {
360
481
  className: "h-8 w-48",
361
- children: /* @__PURE__ */ g(E, { placeholder: k("planmagnet.analytics.delivery.sprintPlaceholder", "Select sprint") })
362
- }), /* @__PURE__ */ g(C, { children: z.map((e) => /* @__PURE__ */ g(w, {
482
+ children: /* @__PURE__ */ p(w, { placeholder: D("planmagnet.analytics.delivery.sprintPlaceholder", "Select sprint") })
483
+ }), /* @__PURE__ */ p(x, { children: W.map((e) => /* @__PURE__ */ p(S, {
363
484
  value: e.id,
364
485
  children: e.name
365
486
  }, e.id)) })]
366
- })]
487
+ })
367
488
  })]
368
489
  }),
369
- /* @__PURE__ */ _("div", {
490
+ /* @__PURE__ */ m("div", {
370
491
  className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
371
- children: [/* @__PURE__ */ _(v, { children: [/* @__PURE__ */ g(b, { children: /* @__PURE__ */ _(x, {
492
+ children: [/* @__PURE__ */ m(h, { children: [/* @__PURE__ */ p(_, { children: /* @__PURE__ */ m(v, {
372
493
  className: "flex items-center gap-2",
373
- children: [/* @__PURE__ */ g(f, { className: "h-4 w-4" }), k("planmagnet.analytics.burndown.title", "Sprint Burndown")]
374
- }) }), /* @__PURE__ */ g(y, { children: Me ? /* @__PURE__ */ g("div", {
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", {
375
496
  className: "flex justify-center py-12",
376
- children: /* @__PURE__ */ g("div", { className: "animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full" })
377
- }) : q.length > 0 ? /* @__PURE__ */ g(r, {
497
+ 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, {
378
499
  width: "100%",
379
500
  height: 220,
380
- children: /* @__PURE__ */ _(ne, {
381
- data: q,
501
+ children: /* @__PURE__ */ m(ie, {
502
+ data: ht,
382
503
  children: [
383
- /* @__PURE__ */ g(a, {
504
+ /* @__PURE__ */ p(i, {
384
505
  strokeDasharray: "3 3",
385
506
  opacity: .2
386
507
  }),
387
- /* @__PURE__ */ g(s, {
508
+ /* @__PURE__ */ p(a, {
388
509
  dataKey: "day",
389
510
  tick: { fontSize: 11 }
390
511
  }),
391
- /* @__PURE__ */ g(c, {
512
+ /* @__PURE__ */ p(o, {
392
513
  tick: { fontSize: 11 },
393
514
  allowDecimals: !1
394
515
  }),
395
- /* @__PURE__ */ g(n, {}),
396
- /* @__PURE__ */ g(t, { wrapperStyle: { fontSize: 12 } }),
397
- /* @__PURE__ */ g(o, {
516
+ /* @__PURE__ */ p(n, {}),
517
+ /* @__PURE__ */ p(t, { wrapperStyle: { fontSize: 12 } }),
518
+ /* @__PURE__ */ p(ne, {
398
519
  type: "monotone",
399
520
  dataKey: "remaining",
400
- name: k("planmagnet.analytics.burndown.remaining", "Remaining points"),
521
+ name: D("planmagnet.analytics.burndown.remaining", "Remaining points"),
401
522
  stroke: "#f59e0b",
402
523
  strokeWidth: 2,
403
524
  dot: { r: 2 }
404
525
  }),
405
- /* @__PURE__ */ g(o, {
526
+ /* @__PURE__ */ p(ne, {
406
527
  type: "monotone",
407
528
  dataKey: "completed",
408
- name: k("planmagnet.analytics.burndown.completed", "Completed points"),
529
+ name: D("planmagnet.analytics.burndown.completed", "Completed points"),
409
530
  stroke: "#22c55e",
410
531
  strokeWidth: 2,
411
532
  dot: { r: 2 }
412
533
  })
413
534
  ]
414
535
  })
415
- }) : /* @__PURE__ */ g("p", {
536
+ }) : /* @__PURE__ */ p("p", {
416
537
  className: "text-sm text-muted-foreground py-8 text-center",
417
- children: k("planmagnet.analytics.burndown.empty", "No sprint selected, or the sprint has no work items yet")
418
- }) })] }), /* @__PURE__ */ _(v, { children: [/* @__PURE__ */ g(b, { children: /* @__PURE__ */ _(x, {
538
+ children: D("planmagnet.analytics.burndown.empty", "No sprint selected, or the sprint has no work items yet")
539
+ }) })] }), /* @__PURE__ */ m(h, { children: [/* @__PURE__ */ p(_, { children: /* @__PURE__ */ m(v, {
419
540
  className: "flex items-center gap-2",
420
541
  children: [
421
- /* @__PURE__ */ g(p, { className: "h-4 w-4" }),
422
- k("planmagnet.analytics.velocity.title", "Sprint Velocity"),
542
+ /* @__PURE__ */ p(be, { className: "h-4 w-4" }),
543
+ D("planmagnet.analytics.velocity.title", "Sprint Velocity"),
423
544
  " (",
424
- Y.length,
545
+ Z.length,
425
546
  " ",
426
- k("planmagnet.analytics.velocity.sprints", "Sprints"),
547
+ D("planmagnet.analytics.velocity.sprints", "Sprints"),
427
548
  ")"
428
549
  ]
429
- }) }), /* @__PURE__ */ g(y, { children: Pe ? /* @__PURE__ */ g("div", {
550
+ }) }), /* @__PURE__ */ p(g, { children: rt ? /* @__PURE__ */ p("div", {
430
551
  className: "flex justify-center py-12",
431
- children: /* @__PURE__ */ g("div", { className: "animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full" })
432
- }) : Y.length > 0 ? /* @__PURE__ */ _(de, { children: [/* @__PURE__ */ g(r, {
552
+ 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, {
433
554
  width: "100%",
434
555
  height: 190,
435
- children: /* @__PURE__ */ _(re, {
436
- data: Y,
556
+ children: /* @__PURE__ */ m(ae, {
557
+ data: Z,
437
558
  children: [
438
- /* @__PURE__ */ g(a, {
559
+ /* @__PURE__ */ p(i, {
439
560
  strokeDasharray: "3 3",
440
561
  opacity: .2
441
562
  }),
442
- /* @__PURE__ */ g(s, {
563
+ /* @__PURE__ */ p(a, {
443
564
  dataKey: "name",
444
565
  tick: { fontSize: 11 }
445
566
  }),
446
- /* @__PURE__ */ g(c, {
567
+ /* @__PURE__ */ p(o, {
447
568
  tick: { fontSize: 11 },
448
569
  allowDecimals: !1
449
570
  }),
450
- /* @__PURE__ */ g(n, {}),
451
- /* @__PURE__ */ g(t, { wrapperStyle: { fontSize: 12 } }),
452
- /* @__PURE__ */ g(i, {
571
+ /* @__PURE__ */ p(n, {}),
572
+ /* @__PURE__ */ p(t, { wrapperStyle: { fontSize: 12 } }),
573
+ /* @__PURE__ */ p(ee, {
453
574
  dataKey: "planned",
454
- name: k("planmagnet.analytics.velocity.planned", "Planned"),
575
+ name: D("planmagnet.analytics.velocity.planned", "Planned"),
455
576
  fill: "#cbd5e1"
456
577
  }),
457
- /* @__PURE__ */ g(i, {
578
+ /* @__PURE__ */ p(ee, {
458
579
  dataKey: "completed",
459
- name: k("planmagnet.analytics.velocity.completed", "Completed"),
580
+ name: D("planmagnet.analytics.velocity.completed", "Completed"),
460
581
  fill: "#6366f1"
461
582
  }),
462
- /* @__PURE__ */ g(ee, {
463
- y: X,
583
+ /* @__PURE__ */ p(te, {
584
+ y: gt,
464
585
  stroke: "#22c55e",
465
586
  strokeDasharray: "4 4",
466
587
  label: {
467
- value: k("planmagnet.analytics.velocity.avgLabel", "avg"),
588
+ value: D("planmagnet.analytics.velocity.avgLabel", "avg"),
468
589
  fontSize: 10,
469
590
  position: "right"
470
591
  }
471
592
  })
472
593
  ]
473
594
  })
474
- }), /* @__PURE__ */ g("p", {
595
+ }), /* @__PURE__ */ p("p", {
475
596
  className: "text-xs text-muted-foreground text-center mt-2",
476
- children: Y.length === 1 ? k("planmagnet.analytics.velocity.trailingAverageOne", "Average of the last completed sprint: {{points}} pts per sprint", { points: Z }) : k("planmagnet.analytics.velocity.trailingAverage", "Average of the last {{count}} completed sprints: {{points}} pts per sprint", {
477
- points: Z,
478
- count: Y.length
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
+ count: Z.length
479
600
  })
480
- })] }) : /* @__PURE__ */ g("p", {
601
+ })] }) : /* @__PURE__ */ p("p", {
481
602
  className: "text-sm text-muted-foreground py-8 text-center",
482
- children: k("planmagnet.analytics.velocity.empty", "No completed sprints yet for this project")
603
+ children: D("planmagnet.analytics.velocity.empty", "No completed sprints yet for this project")
483
604
  }) })] })]
484
605
  }),
485
- /* @__PURE__ */ _(v, { children: [/* @__PURE__ */ g(b, { children: /* @__PURE__ */ _(x, {
606
+ /* @__PURE__ */ m(h, { children: [/* @__PURE__ */ m(_, { children: [/* @__PURE__ */ m(v, {
486
607
  className: "flex items-center gap-2",
487
- children: [/* @__PURE__ */ g(f, { className: "h-4 w-4" }), k("planmagnet.analytics.cfd.title", "Cumulative Flow Diagram")]
488
- }) }), /* @__PURE__ */ g(y, { children: Ie ? /* @__PURE__ */ g("div", {
608
+ children: [/* @__PURE__ */ p(_e, { className: "h-4 w-4" }), D("planmagnet.analytics.cfd.title", "Cumulative Flow Diagram")]
609
+ }), /* @__PURE__ */ p("p", {
610
+ className: "text-xs text-muted-foreground",
611
+ 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", {
489
613
  className: "flex justify-center py-12",
490
- children: /* @__PURE__ */ g("div", { className: "animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full" })
491
- }) : $.length > 0 ? /* @__PURE__ */ g(r, {
614
+ children: /* @__PURE__ */ p("div", { className: "animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full" })
615
+ }) : $.length > 0 ? /* @__PURE__ */ p(r, {
492
616
  width: "100%",
493
617
  height: 260,
494
- children: /* @__PURE__ */ _(l, {
618
+ children: /* @__PURE__ */ m(oe, {
495
619
  data: $,
496
620
  children: [
497
- /* @__PURE__ */ g(a, {
621
+ /* @__PURE__ */ p(i, {
498
622
  strokeDasharray: "3 3",
499
623
  opacity: .2
500
624
  }),
501
- /* @__PURE__ */ g(s, {
625
+ /* @__PURE__ */ p(a, {
502
626
  dataKey: "day",
503
627
  tick: { fontSize: 11 }
504
628
  }),
505
- /* @__PURE__ */ g(c, {
629
+ /* @__PURE__ */ p(o, {
506
630
  tick: { fontSize: 11 },
507
631
  allowDecimals: !1
508
632
  }),
509
- /* @__PURE__ */ g(n, {}),
510
- /* @__PURE__ */ g(t, { wrapperStyle: { fontSize: 12 } }),
511
- Ue.map((e) => /* @__PURE__ */ g(te, {
633
+ /* @__PURE__ */ p(n, {}),
634
+ /* @__PURE__ */ p(t, { wrapperStyle: { fontSize: 12 } }),
635
+ vt.map((e) => /* @__PURE__ */ p(re, {
512
636
  type: "monotone",
513
637
  dataKey: e,
514
638
  name: e.toLowerCase().replace("_", " "),
515
639
  stackId: "cfd",
516
- stroke: D[e] ?? "#a3a3a3",
517
- fill: D[e] ?? "#a3a3a3",
640
+ stroke: T[e] ?? "#a3a3a3",
641
+ fill: T[e] ?? "#a3a3a3",
518
642
  fillOpacity: .7
519
643
  }, e))
520
644
  ]
521
645
  })
522
- }) : /* @__PURE__ */ g("p", {
646
+ }) : /* @__PURE__ */ p("p", {
523
647
  className: "text-sm text-muted-foreground py-8 text-center",
524
- children: k("planmagnet.analytics.cfd.empty", "No work items found for this project")
648
+ children: D("planmagnet.analytics.cfd.empty", "No work items found for this project")
525
649
  }) })] }),
526
- /* @__PURE__ */ _("div", {
650
+ /* @__PURE__ */ p(pe, {
651
+ workspaceId: d,
652
+ projectId: U,
653
+ startDate: R,
654
+ endDate: z
655
+ }),
656
+ /* @__PURE__ */ m("div", {
657
+ className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
658
+ children: [/* @__PURE__ */ p(de, {
659
+ workspaceId: d,
660
+ projectId: F,
661
+ startDate: R,
662
+ endDate: z
663
+ }), /* @__PURE__ */ p(fe, {
664
+ workspaceId: d,
665
+ projectId: F,
666
+ startDate: R,
667
+ endDate: z
668
+ })]
669
+ }),
670
+ /* @__PURE__ */ m("div", {
527
671
  className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
528
- children: [/* @__PURE__ */ g(se, {
529
- workspaceId: m,
530
- projectId: L
531
- }), /* @__PURE__ */ g(oe, { workspaceId: m })]
672
+ children: [/* @__PURE__ */ p(ue, {
673
+ workspaceId: d,
674
+ projectId: U,
675
+ startDate: R,
676
+ endDate: z
677
+ }), /* @__PURE__ */ p(le, {
678
+ workspaceId: d,
679
+ projectId: F
680
+ })]
532
681
  }),
533
- /* @__PURE__ */ _(v, { children: [/* @__PURE__ */ g(b, { children: /* @__PURE__ */ g(x, { children: k("planmagnet.analytics.projectHealth.title", "Project Health") }) }), /* @__PURE__ */ g(y, { children: /* @__PURE__ */ _("div", {
682
+ /* @__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", {
534
683
  className: "space-y-3",
535
- children: [I.filter((e) => e.status === "ACTIVE").map((e) => {
536
- let t = ze(e.id), n = e.endDate && new Date(e.endDate) < /* @__PURE__ */ new Date() && t < 100 ? "at_risk" : t >= 75 ? "on_track" : "in_progress";
537
- return /* @__PURE__ */ _("div", {
684
+ 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";
686
+ return /* @__PURE__ */ m("div", {
538
687
  className: "flex items-center gap-4",
539
688
  children: [
540
- /* @__PURE__ */ g("span", {
689
+ /* @__PURE__ */ p("span", {
541
690
  className: "text-sm font-medium w-40 truncate",
542
691
  children: e.name
543
692
  }),
544
- /* @__PURE__ */ g("div", {
693
+ /* @__PURE__ */ p("div", {
545
694
  className: "flex-1",
546
- children: /* @__PURE__ */ g("div", {
695
+ children: /* @__PURE__ */ p("div", {
547
696
  className: "w-full h-2 rounded-full bg-muted overflow-hidden",
548
- children: /* @__PURE__ */ g("div", {
697
+ children: /* @__PURE__ */ p("div", {
549
698
  className: `h-full rounded-full ${n === "at_risk" ? "bg-orange-400" : n === "on_track" ? "bg-green-400" : "bg-blue-400"}`,
550
699
  style: { width: `${t}%` }
551
700
  })
552
701
  })
553
702
  }),
554
- /* @__PURE__ */ _("span", {
703
+ /* @__PURE__ */ m("span", {
555
704
  className: "text-sm w-12 text-right",
556
705
  children: [t, "%"]
557
706
  }),
558
- /* @__PURE__ */ g(pe, {
707
+ /* @__PURE__ */ p(Te, {
559
708
  variant: "outline",
560
709
  className: "capitalize text-xs w-20 justify-center",
561
710
  children: n.replace("_", " ")
562
711
  })
563
712
  ]
564
713
  }, e.id);
565
- }), I.filter((e) => e.status === "ACTIVE").length === 0 && /* @__PURE__ */ g("p", {
714
+ }), H.filter((e) => e.status === "ACTIVE").length === 0 && /* @__PURE__ */ p("p", {
566
715
  className: "text-sm text-muted-foreground text-center py-4",
567
- children: k("planmagnet.analytics.projectHealth.empty", "No active projects found")
716
+ children: D("planmagnet.analytics.projectHealth.empty", "No active projects found")
568
717
  })]
569
718
  }) })] })
570
719
  ]
571
720
  });
572
721
  }
573
722
  //#endregion
574
- export { k as AnalyticsAnalyticsPagePage };
723
+ export { D as AnalyticsAnalyticsPagePage };
575
724
 
576
725
  //# sourceMappingURL=AnalyticsAnalyticsPagePage.js.map