@burdenoff/microfe-planmagnet 2026.925.5 → 2026.925.7

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.
@@ -3,25 +3,42 @@ 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
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 ie } from "../../node_modules/recharts/es6/chart/AreaChart.js";
15
- import { BudgetPerformanceCard as l, CycleTimeCard as u } from "./analytics/DeliveryHealthCards.js";
6
+ import { ReferenceLine as a } from "../../node_modules/recharts/es6/cartesian/ReferenceLine.js";
7
+ import { CartesianGrid as o } from "../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
8
+ import { Line as s } from "../../node_modules/recharts/es6/cartesian/Line.js";
9
+ import { Area as c } from "../../node_modules/recharts/es6/cartesian/Area.js";
10
+ import { XAxis as l } from "../../node_modules/recharts/es6/cartesian/XAxis.js";
11
+ import { YAxis as u } from "../../node_modules/recharts/es6/cartesian/YAxis.js";
12
+ import { LineChart as ee } from "../../node_modules/recharts/es6/chart/LineChart.js";
13
+ import { BarChart as te } from "../../node_modules/recharts/es6/chart/BarChart.js";
14
+ import { AreaChart as ne } from "../../node_modules/recharts/es6/chart/AreaChart.js";
15
+ import { BudgetPerformanceCard as re, CycleTimeCard as ie } from "./analytics/DeliveryHealthCards.js";
16
16
  import { useState as d } from "react";
17
- import { BarChart3 as f, FolderKanban as p, Target as m, TrendingUp as h, Zap as ae } from "lucide-react";
18
- import { gql as g } from "@apollo/client";
19
- import { useQuery as _ } from "@apollo/client/react";
20
- import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
21
- import { useI18n as oe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
22
- import { Badge as se, Card as x, CardContent as S, CardHeader as C, CardTitle as w, Select as T, SelectContent as E, SelectItem as D, SelectTrigger as O, SelectValue as k } from "@burdenoff/fe-libs/ui";
17
+ import { BarChart3 as f, FolderKanban as p, Target as ae, TrendingUp as m, Zap as oe } from "lucide-react";
18
+ import { gql as h } from "@apollo/client";
19
+ import { useQuery as g } from "@apollo/client/react";
20
+ import { Fragment as se, jsx as _, jsxs as v } from "react/jsx-runtime";
21
+ import { useI18n as ce } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
22
+ import { Badge as le, Card as y, CardContent as b, CardHeader as x, CardTitle as S, Select as C, SelectContent as w, SelectItem as T, SelectTrigger as E, SelectValue as D } from "@burdenoff/fe-libs/ui";
23
23
  //#region src/planmagnet/pages/AnalyticsAnalyticsPagePage.tsx
24
- var A = g`
24
+ var ue = h`
25
+ query GetAnalyticsWorkItemCounts($workspaceId: ID!) {
26
+ planmagnetWorkItemCounts(workspaceId: $workspaceId) {
27
+ total
28
+ points
29
+ byStatus {
30
+ status
31
+ count
32
+ points
33
+ }
34
+ byProject {
35
+ projectId
36
+ status
37
+ count
38
+ }
39
+ }
40
+ }
41
+ `, de = h`
25
42
  query GetAnalyticsData(
26
43
  $workspaceId: ID!
27
44
  $projectPagination: PlanmagnetPaginationInput
@@ -74,7 +91,7 @@ var A = g`
74
91
  totalCount
75
92
  }
76
93
  }
77
- `, j = g`
94
+ `, fe = h`
78
95
  query GetSprintBurndown($workspaceId: ID!, $sprintId: ID!) {
79
96
  planmagnetSprintBurndown(workspaceId: $workspaceId, sprintId: $sprintId) {
80
97
  sprintId
@@ -91,7 +108,7 @@ var A = g`
91
108
  }
92
109
  }
93
110
  }
94
- `, ce = g`
111
+ `, pe = h`
95
112
  query GetVelocity($workspaceId: ID!, $projectId: ID!, $trailingSprintCount: Int) {
96
113
  planmagnetVelocity(
97
114
  workspaceId: $workspaceId
@@ -111,7 +128,7 @@ var A = g`
111
128
  }
112
129
  }
113
130
  }
114
- `, le = g`
131
+ `, me = h`
115
132
  query GetCumulativeFlow($workspaceId: ID!, $projectId: ID!) {
116
133
  planmagnetCumulativeFlow(workspaceId: $workspaceId, projectId: $projectId) {
117
134
  projectId
@@ -126,7 +143,7 @@ var A = g`
126
143
  }
127
144
  }
128
145
  }
129
- `, M = {
146
+ `, O = {
130
147
  BACKLOG: "#9ca3af",
131
148
  TODO: "#60a5fa",
132
149
  IN_PROGRESS: "#fbbf24",
@@ -135,403 +152,409 @@ var A = g`
135
152
  DONE: "#4ade80",
136
153
  CANCELLED: "#f87171"
137
154
  };
138
- function N(e) {
155
+ function k(e) {
139
156
  let t = new Date(e);
140
157
  return `${t.getUTCMonth() + 1}/${t.getUTCDate()}`;
141
158
  }
142
- function P() {
143
- let { workspaceId: g } = e(), { t: P } = oe(), [ue, de] = d(""), [fe, F] = d(""), { data: I, loading: L, error: R } = _(A, {
159
+ function A() {
160
+ let { workspaceId: h } = e(), { t: A } = ce(), [he, ge] = d(""), [_e, j] = d(""), { data: M, loading: N, error: P } = g(de, {
144
161
  variables: {
145
- workspaceId: g,
162
+ workspaceId: h,
146
163
  projectPagination: { first: 100 },
147
164
  workItemPagination: { first: 500 },
148
165
  sprintPagination: { first: 100 },
149
166
  milestonePagination: { first: 100 }
150
167
  },
151
- skip: !g
152
- }), z = I?.planmagnetProjects?.items ?? [], B = I?.planmagnetWorkItems?.items ?? [], V = I?.planmagnetSprints?.items ?? [], pe = I?.planmagnetMilestones?.items ?? [], H = ue || z[0]?.id || "", U = V.filter((e) => e.projectId === H), W = fe || U[0]?.id || "", { data: me, loading: he } = _(j, {
168
+ skip: !h
169
+ }), { data: F } = g(ue, {
170
+ variables: { workspaceId: h },
171
+ skip: !h
172
+ }), I = F?.planmagnetWorkItemCounts, L = M?.planmagnetProjects?.items ?? [], R = M?.planmagnetWorkItems?.items ?? [], z = M?.planmagnetSprints?.items ?? [], ve = M?.planmagnetMilestones?.items ?? [], B = he || L[0]?.id || "", V = z.filter((e) => e.projectId === B), H = _e || V[0]?.id || "", { data: ye, loading: be } = g(fe, {
153
173
  variables: {
154
- workspaceId: g,
155
- sprintId: W
174
+ workspaceId: h,
175
+ sprintId: H
156
176
  },
157
- skip: !g || !W
158
- }), { data: ge, loading: _e } = _(ce, {
177
+ skip: !h || !H
178
+ }), { data: xe, loading: Se } = g(pe, {
159
179
  variables: {
160
- workspaceId: g,
161
- projectId: H,
180
+ workspaceId: h,
181
+ projectId: B,
162
182
  trailingSprintCount: 6
163
183
  },
164
- skip: !g || !H
165
- }), { data: ve, loading: ye } = _(le, {
184
+ skip: !h || !B
185
+ }), { data: Ce, loading: we } = g(me, {
166
186
  variables: {
167
- workspaceId: g,
168
- projectId: H
187
+ workspaceId: h,
188
+ projectId: B
169
189
  },
170
- skip: !g || !H
190
+ skip: !h || !B
171
191
  });
172
- if (L) return /* @__PURE__ */ y("div", {
192
+ if (N) return /* @__PURE__ */ _("div", {
173
193
  className: "flex items-center justify-center p-12",
174
- children: /* @__PURE__ */ y("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
194
+ children: /* @__PURE__ */ _("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
175
195
  });
176
- if (R) return /* @__PURE__ */ b("div", {
196
+ if (P) return /* @__PURE__ */ v("div", {
177
197
  className: "p-6 text-red-500",
178
198
  children: [
179
- P("planmagnet.analytics.errorLoading", "Error loading analytics"),
199
+ A("planmagnet.analytics.errorLoading", "Error loading analytics"),
180
200
  ": ",
181
- R.message
201
+ P.message
182
202
  ]
183
203
  });
184
- let G = B.length, be = B.filter((e) => e.status === "DONE").length, K = B.filter((e) => e.status === "BLOCKED").length, xe = B.reduce((e, t) => e + (t.storyPoints ?? 0), 0), Se = B.filter((e) => e.status === "DONE").reduce((e, t) => e + (t.storyPoints ?? 0), 0), Ce = V.filter((e) => e.status === "ACTIVE").length, we = pe.filter((e) => e.status === "AT_RISK" || e.status === "OVERDUE").length, q = z.filter((e) => e.status === "ACTIVE").length, Te = G > 0 ? Math.round(be / G * 100) : 0, J = (me?.planmagnetSprintBurndown)?.points.map((e) => ({
185
- day: N(e.date),
204
+ let U = (e) => I?.byStatus.find((t) => t.status === e), W = I?.total ?? R.length, Te = U("DONE")?.count ?? R.filter((e) => e.status === "DONE").length, G = U("BLOCKED")?.count ?? 0, Ee = I?.points ?? R.reduce((e, t) => e + (t.storyPoints ?? 0), 0), De = U("DONE")?.points ?? R.filter((e) => e.status === "DONE").reduce((e, t) => e + (t.storyPoints ?? 0), 0), Oe = (e) => {
205
+ let t = I?.byProject.filter((t) => t.projectId === e) ?? [], n = t.reduce((e, t) => e + t.count, 0), r = t.filter((e) => e.status === "DONE").reduce((e, t) => e + t.count, 0);
206
+ return n > 0 ? Math.round(r / n * 100) : 0;
207
+ }, ke = z.filter((e) => e.status === "ACTIVE").length, Ae = /* @__PURE__ */ new Date(), je = ve.filter((e) => e.status === "MISSED" || (e.status === "PENDING" || e.status === "IN_PROGRESS") && e.dueDate != null && new Date(e.dueDate) < Ae).length, K = L.filter((e) => e.status === "ACTIVE").length, Me = W > 0 ? Math.round(Te / W * 100) : 0, q = (ye?.planmagnetSprintBurndown)?.points.map((e) => ({
208
+ day: k(e.date),
186
209
  remaining: e.remainingPoints,
187
210
  completed: e.completedPoints
188
- })) ?? [], Y = ge?.planmagnetVelocity, X = Y?.sprints.map((e) => ({
211
+ })) ?? [], J = xe?.planmagnetVelocity, Y = J?.sprints.map((e) => ({
189
212
  name: e.sprintName,
190
213
  completed: e.completedPoints,
191
214
  planned: e.plannedPoints ?? void 0
192
- })) ?? [], Z = Y ? Math.round(Y.averageVelocity) : 0, Ee = Y ? Math.round(Y.forecastNextSprintPoints) : 0, Q = ve?.planmagnetCumulativeFlow, De = Array.from(new Set(Q?.points.flatMap((e) => e.statuses.map((e) => e.status)) ?? [])), $ = Q?.points.map((e) => {
193
- let t = { day: N(e.date) };
215
+ })) ?? [], X = J ? Math.round(J.averageVelocity) : 0, Z = J ? Math.round(J.forecastNextSprintPoints) : 0, Q = Ce?.planmagnetCumulativeFlow, Ne = Array.from(new Set(Q?.points.flatMap((e) => e.statuses.map((e) => e.status)) ?? [])), $ = Q?.points.map((e) => {
216
+ let t = { day: k(e.date) };
194
217
  for (let n of e.statuses) t[n.status] = n.count;
195
218
  return t;
196
- }) ?? [], Oe = [
219
+ }) ?? [], Pe = [
197
220
  {
198
- label: P("planmagnet.analytics.metrics.totalWorkItems.label", "Total Work Items"),
199
- value: String(G),
200
- trend: `${Te}% ${P("planmagnet.analytics.metrics.totalWorkItems.trend", "completed")}`
221
+ label: A("planmagnet.analytics.metrics.totalWorkItems.label", "Total Work Items"),
222
+ value: String(W),
223
+ trend: `${Me}% ${A("planmagnet.analytics.metrics.totalWorkItems.trend", "completed")}`
201
224
  },
202
225
  {
203
- label: P("planmagnet.analytics.metrics.storyPoints.label", "Story Points"),
204
- value: String(xe),
205
- trend: `${Se} ${P("planmagnet.analytics.metrics.storyPoints.trend", "completed")}`
226
+ label: A("planmagnet.analytics.metrics.storyPoints.label", "Story Points"),
227
+ value: String(Ee),
228
+ trend: `${De} ${A("planmagnet.analytics.metrics.storyPoints.trend", "completed")}`
206
229
  },
207
230
  {
208
- label: P("planmagnet.analytics.metrics.activeProjects.label", "Active Projects"),
209
- value: String(q),
210
- trend: `${z.length} ${P("planmagnet.analytics.metrics.activeProjects.trend", "total")}`
231
+ label: A("planmagnet.analytics.metrics.activeProjects.label", "Active Projects"),
232
+ value: String(K),
233
+ trend: `${M?.planmagnetProjects?.totalCount ?? L.length} ${A("planmagnet.analytics.metrics.activeProjects.trend", "total")}`
211
234
  },
212
235
  {
213
- label: P("planmagnet.analytics.metrics.blockedItems.label", "Blocked Items"),
214
- value: String(K),
215
- trend: K > 0 ? P("planmagnet.analytics.metrics.blockedItems.attention", "Needs attention") : P("planmagnet.analytics.metrics.blockedItems.clear", "All clear")
236
+ label: A("planmagnet.analytics.metrics.blockedItems.label", "Blocked Items"),
237
+ value: String(G),
238
+ trend: G > 0 ? A("planmagnet.analytics.metrics.blockedItems.attention", "Needs attention") : A("planmagnet.analytics.metrics.blockedItems.clear", "All clear")
216
239
  }
217
240
  ];
218
- return /* @__PURE__ */ b("div", {
241
+ return /* @__PURE__ */ v("div", {
219
242
  className: "space-y-6 p-6",
220
243
  children: [
221
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h1", {
244
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("h1", {
222
245
  className: "text-2xl font-semibold",
223
- children: P("planmagnet.analytics.title", "Analytics Dashboard")
224
- }), /* @__PURE__ */ y("p", {
246
+ children: A("planmagnet.analytics.title", "Analytics Dashboard")
247
+ }), /* @__PURE__ */ _("p", {
225
248
  className: "text-sm text-muted-foreground",
226
- children: P("planmagnet.analytics.subtitle", "Overview of project health and team performance")
249
+ children: A("planmagnet.analytics.subtitle", "Overview of project health and team performance")
227
250
  })] }),
228
- /* @__PURE__ */ y("div", {
251
+ /* @__PURE__ */ _("div", {
229
252
  className: "grid grid-cols-2 md:grid-cols-4 gap-4",
230
- children: Oe.map((e) => /* @__PURE__ */ y(x, { children: /* @__PURE__ */ b(S, {
253
+ children: Pe.map((e) => /* @__PURE__ */ _(y, { children: /* @__PURE__ */ v(b, {
231
254
  className: "pt-4",
232
255
  children: [
233
- /* @__PURE__ */ y("p", {
256
+ /* @__PURE__ */ _("p", {
234
257
  className: "text-xs text-muted-foreground",
235
258
  children: e.label
236
259
  }),
237
- /* @__PURE__ */ y("p", {
260
+ /* @__PURE__ */ _("p", {
238
261
  className: "text-xl font-bold mt-1",
239
262
  children: e.value
240
263
  }),
241
- /* @__PURE__ */ y("p", {
264
+ /* @__PURE__ */ _("p", {
242
265
  className: "text-xs text-green-600 mt-1",
243
266
  children: e.trend
244
267
  })
245
268
  ]
246
269
  }) }, e.label))
247
270
  }),
248
- /* @__PURE__ */ b("div", {
271
+ /* @__PURE__ */ v("div", {
249
272
  className: "grid grid-cols-2 md:grid-cols-4 gap-4",
250
273
  children: [
251
- /* @__PURE__ */ y(x, { children: /* @__PURE__ */ b(S, {
274
+ /* @__PURE__ */ _(y, { children: /* @__PURE__ */ v(b, {
252
275
  className: "pt-4",
253
- children: [/* @__PURE__ */ b("div", {
276
+ children: [/* @__PURE__ */ v("div", {
254
277
  className: "flex items-center gap-2 text-muted-foreground text-xs",
255
- children: [/* @__PURE__ */ y(p, { className: "h-4 w-4" }), P("planmagnet.analytics.summary.activeProjects", "Active Projects")]
256
- }), /* @__PURE__ */ y("p", {
278
+ children: [/* @__PURE__ */ _(p, { className: "h-4 w-4" }), A("planmagnet.analytics.summary.activeProjects", "Active Projects")]
279
+ }), /* @__PURE__ */ _("p", {
257
280
  className: "text-xl font-bold mt-1",
258
- children: q
281
+ children: K
259
282
  })]
260
283
  }) }),
261
- /* @__PURE__ */ y(x, { children: /* @__PURE__ */ b(S, {
284
+ /* @__PURE__ */ _(y, { children: /* @__PURE__ */ v(b, {
262
285
  className: "pt-4",
263
- children: [/* @__PURE__ */ b("div", {
286
+ children: [/* @__PURE__ */ v("div", {
264
287
  className: "flex items-center gap-2 text-muted-foreground text-xs",
265
- children: [/* @__PURE__ */ y(ae, { className: "h-4 w-4" }), P("planmagnet.analytics.summary.activeSprints", "Active Sprints")]
266
- }), /* @__PURE__ */ y("p", {
288
+ children: [/* @__PURE__ */ _(oe, { className: "h-4 w-4" }), A("planmagnet.analytics.summary.activeSprints", "Active Sprints")]
289
+ }), /* @__PURE__ */ _("p", {
267
290
  className: "text-xl font-bold mt-1",
268
- children: Ce
291
+ children: ke
269
292
  })]
270
293
  }) }),
271
- /* @__PURE__ */ y(x, { children: /* @__PURE__ */ b(S, {
294
+ /* @__PURE__ */ _(y, { children: /* @__PURE__ */ v(b, {
272
295
  className: "pt-4",
273
- children: [/* @__PURE__ */ b("div", {
296
+ children: [/* @__PURE__ */ v("div", {
274
297
  className: "flex items-center gap-2 text-muted-foreground text-xs",
275
- children: [/* @__PURE__ */ y(h, { className: "h-4 w-4" }), P("planmagnet.analytics.summary.avgVelocity", "Avg Velocity")]
276
- }), /* @__PURE__ */ b("p", {
298
+ children: [/* @__PURE__ */ _(m, { className: "h-4 w-4" }), A("planmagnet.analytics.summary.avgVelocity", "Avg Velocity")]
299
+ }), /* @__PURE__ */ v("p", {
277
300
  className: "text-xl font-bold mt-1",
278
301
  children: [
279
- Z,
302
+ X,
280
303
  " ",
281
- P("planmagnet.analytics.summary.pointsShort", "pts")
304
+ A("planmagnet.analytics.summary.pointsShort", "pts")
282
305
  ]
283
306
  })]
284
307
  }) }),
285
- /* @__PURE__ */ y(x, { children: /* @__PURE__ */ b(S, {
308
+ /* @__PURE__ */ _(y, { children: /* @__PURE__ */ v(b, {
286
309
  className: "pt-4",
287
- children: [/* @__PURE__ */ b("div", {
310
+ children: [/* @__PURE__ */ v("div", {
288
311
  className: "flex items-center gap-2 text-muted-foreground text-xs",
289
- children: [/* @__PURE__ */ y(m, { className: "h-4 w-4" }), P("planmagnet.analytics.summary.atRisk", "At Risk")]
290
- }), /* @__PURE__ */ b("p", {
312
+ children: [/* @__PURE__ */ _(ae, { className: "h-4 w-4" }), A("planmagnet.analytics.summary.atRisk", "At Risk")]
313
+ }), /* @__PURE__ */ v("p", {
291
314
  className: "text-xl font-bold mt-1",
292
315
  children: [
293
- we,
316
+ je,
294
317
  " ",
295
- P("planmagnet.analytics.summary.milestones", "milestones")
318
+ A("planmagnet.analytics.summary.milestones", "milestones")
296
319
  ]
297
320
  })]
298
321
  }) })
299
322
  ]
300
323
  }),
301
- /* @__PURE__ */ b("div", {
324
+ /* @__PURE__ */ v("div", {
302
325
  className: "flex flex-col sm:flex-row gap-3 items-start sm:items-center",
303
- children: [/* @__PURE__ */ y("h2", {
326
+ children: [/* @__PURE__ */ _("h2", {
304
327
  className: "text-lg font-semibold",
305
- children: P("planmagnet.analytics.delivery.title", "Sprint Delivery Analytics")
306
- }), /* @__PURE__ */ b("div", {
328
+ children: A("planmagnet.analytics.delivery.title", "Sprint Delivery Analytics")
329
+ }), /* @__PURE__ */ v("div", {
307
330
  className: "flex gap-2 sm:ml-auto",
308
- children: [/* @__PURE__ */ b(T, {
309
- value: H,
331
+ children: [/* @__PURE__ */ v(C, {
332
+ value: B,
310
333
  onValueChange: (e) => {
311
- de(e), F("");
334
+ ge(e), j("");
312
335
  },
313
- children: [/* @__PURE__ */ y(O, {
336
+ children: [/* @__PURE__ */ _(E, {
314
337
  className: "h-8 w-48",
315
- children: /* @__PURE__ */ y(k, { placeholder: P("planmagnet.analytics.delivery.projectPlaceholder", "Select project") })
316
- }), /* @__PURE__ */ y(E, { children: z.map((e) => /* @__PURE__ */ y(D, {
338
+ children: /* @__PURE__ */ _(D, { placeholder: A("planmagnet.analytics.delivery.projectPlaceholder", "Select project") })
339
+ }), /* @__PURE__ */ _(w, { children: L.map((e) => /* @__PURE__ */ _(T, {
317
340
  value: e.id,
318
341
  children: e.name
319
342
  }, e.id)) })]
320
- }), /* @__PURE__ */ b(T, {
321
- value: W,
322
- onValueChange: F,
323
- children: [/* @__PURE__ */ y(O, {
343
+ }), /* @__PURE__ */ v(C, {
344
+ value: H,
345
+ onValueChange: j,
346
+ children: [/* @__PURE__ */ _(E, {
324
347
  className: "h-8 w-48",
325
- children: /* @__PURE__ */ y(k, { placeholder: P("planmagnet.analytics.delivery.sprintPlaceholder", "Select sprint") })
326
- }), /* @__PURE__ */ y(E, { children: U.map((e) => /* @__PURE__ */ y(D, {
348
+ children: /* @__PURE__ */ _(D, { placeholder: A("planmagnet.analytics.delivery.sprintPlaceholder", "Select sprint") })
349
+ }), /* @__PURE__ */ _(w, { children: V.map((e) => /* @__PURE__ */ _(T, {
327
350
  value: e.id,
328
351
  children: e.name
329
352
  }, e.id)) })]
330
353
  })]
331
354
  })]
332
355
  }),
333
- /* @__PURE__ */ b("div", {
356
+ /* @__PURE__ */ v("div", {
334
357
  className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
335
- children: [/* @__PURE__ */ b(x, { children: [/* @__PURE__ */ y(C, { children: /* @__PURE__ */ b(w, {
358
+ children: [/* @__PURE__ */ v(y, { children: [/* @__PURE__ */ _(x, { children: /* @__PURE__ */ v(S, {
336
359
  className: "flex items-center gap-2",
337
- children: [/* @__PURE__ */ y(f, { className: "h-4 w-4" }), P("planmagnet.analytics.burndown.title", "Sprint Burndown")]
338
- }) }), /* @__PURE__ */ y(S, { children: he ? /* @__PURE__ */ y("div", {
360
+ children: [/* @__PURE__ */ _(f, { className: "h-4 w-4" }), A("planmagnet.analytics.burndown.title", "Sprint Burndown")]
361
+ }) }), /* @__PURE__ */ _(b, { children: be ? /* @__PURE__ */ _("div", {
339
362
  className: "flex justify-center py-12",
340
- children: /* @__PURE__ */ y("div", { className: "animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full" })
341
- }) : J.length > 0 ? /* @__PURE__ */ y(r, {
363
+ children: /* @__PURE__ */ _("div", { className: "animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full" })
364
+ }) : q.length > 0 ? /* @__PURE__ */ _(r, {
342
365
  width: "100%",
343
366
  height: 220,
344
- children: /* @__PURE__ */ b(ne, {
345
- data: J,
367
+ children: /* @__PURE__ */ v(ee, {
368
+ data: q,
346
369
  children: [
347
- /* @__PURE__ */ y(a, {
370
+ /* @__PURE__ */ _(o, {
348
371
  strokeDasharray: "3 3",
349
372
  opacity: .2
350
373
  }),
351
- /* @__PURE__ */ y(s, {
374
+ /* @__PURE__ */ _(l, {
352
375
  dataKey: "day",
353
376
  tick: { fontSize: 11 }
354
377
  }),
355
- /* @__PURE__ */ y(c, {
378
+ /* @__PURE__ */ _(u, {
356
379
  tick: { fontSize: 11 },
357
380
  allowDecimals: !1
358
381
  }),
359
- /* @__PURE__ */ y(n, {}),
360
- /* @__PURE__ */ y(t, { wrapperStyle: { fontSize: 12 } }),
361
- /* @__PURE__ */ y(o, {
382
+ /* @__PURE__ */ _(n, {}),
383
+ /* @__PURE__ */ _(t, { wrapperStyle: { fontSize: 12 } }),
384
+ /* @__PURE__ */ _(s, {
362
385
  type: "monotone",
363
386
  dataKey: "remaining",
364
- name: P("planmagnet.analytics.burndown.remaining", "Remaining points"),
387
+ name: A("planmagnet.analytics.burndown.remaining", "Remaining points"),
365
388
  stroke: "#f59e0b",
366
389
  strokeWidth: 2,
367
390
  dot: { r: 2 }
368
391
  }),
369
- /* @__PURE__ */ y(o, {
392
+ /* @__PURE__ */ _(s, {
370
393
  type: "monotone",
371
394
  dataKey: "completed",
372
- name: P("planmagnet.analytics.burndown.completed", "Completed points"),
395
+ name: A("planmagnet.analytics.burndown.completed", "Completed points"),
373
396
  stroke: "#22c55e",
374
397
  strokeWidth: 2,
375
398
  dot: { r: 2 }
376
399
  })
377
400
  ]
378
401
  })
379
- }) : /* @__PURE__ */ y("p", {
402
+ }) : /* @__PURE__ */ _("p", {
380
403
  className: "text-sm text-muted-foreground py-8 text-center",
381
- children: P("planmagnet.analytics.burndown.empty", "No sprint selected, or the sprint has no work items yet")
382
- }) })] }), /* @__PURE__ */ b(x, { children: [/* @__PURE__ */ y(C, { children: /* @__PURE__ */ b(w, {
404
+ children: A("planmagnet.analytics.burndown.empty", "No sprint selected, or the sprint has no work items yet")
405
+ }) })] }), /* @__PURE__ */ v(y, { children: [/* @__PURE__ */ _(x, { children: /* @__PURE__ */ v(S, {
383
406
  className: "flex items-center gap-2",
384
407
  children: [
385
- /* @__PURE__ */ y(h, { className: "h-4 w-4" }),
386
- P("planmagnet.analytics.velocity.title", "Sprint Velocity"),
408
+ /* @__PURE__ */ _(m, { className: "h-4 w-4" }),
409
+ A("planmagnet.analytics.velocity.title", "Sprint Velocity"),
387
410
  " (",
388
- X.length,
411
+ Y.length,
389
412
  " ",
390
- P("planmagnet.analytics.velocity.sprints", "Sprints"),
413
+ A("planmagnet.analytics.velocity.sprints", "Sprints"),
391
414
  ")"
392
415
  ]
393
- }) }), /* @__PURE__ */ y(S, { children: _e ? /* @__PURE__ */ y("div", {
416
+ }) }), /* @__PURE__ */ _(b, { children: Se ? /* @__PURE__ */ _("div", {
394
417
  className: "flex justify-center py-12",
395
- children: /* @__PURE__ */ y("div", { className: "animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full" })
396
- }) : X.length > 0 ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(r, {
418
+ children: /* @__PURE__ */ _("div", { className: "animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full" })
419
+ }) : Y.length > 0 ? /* @__PURE__ */ v(se, { children: [/* @__PURE__ */ _(r, {
397
420
  width: "100%",
398
421
  height: 190,
399
- children: /* @__PURE__ */ b(re, {
400
- data: X,
422
+ children: /* @__PURE__ */ v(te, {
423
+ data: Y,
401
424
  children: [
402
- /* @__PURE__ */ y(a, {
425
+ /* @__PURE__ */ _(o, {
403
426
  strokeDasharray: "3 3",
404
427
  opacity: .2
405
428
  }),
406
- /* @__PURE__ */ y(s, {
429
+ /* @__PURE__ */ _(l, {
407
430
  dataKey: "name",
408
431
  tick: { fontSize: 11 }
409
432
  }),
410
- /* @__PURE__ */ y(c, {
433
+ /* @__PURE__ */ _(u, {
411
434
  tick: { fontSize: 11 },
412
435
  allowDecimals: !1
413
436
  }),
414
- /* @__PURE__ */ y(n, {}),
415
- /* @__PURE__ */ y(t, { wrapperStyle: { fontSize: 12 } }),
416
- /* @__PURE__ */ y(i, {
437
+ /* @__PURE__ */ _(n, {}),
438
+ /* @__PURE__ */ _(t, { wrapperStyle: { fontSize: 12 } }),
439
+ /* @__PURE__ */ _(i, {
417
440
  dataKey: "planned",
418
- name: P("planmagnet.analytics.velocity.planned", "Planned"),
441
+ name: A("planmagnet.analytics.velocity.planned", "Planned"),
419
442
  fill: "#cbd5e1"
420
443
  }),
421
- /* @__PURE__ */ y(i, {
444
+ /* @__PURE__ */ _(i, {
422
445
  dataKey: "completed",
423
- name: P("planmagnet.analytics.velocity.completed", "Completed"),
446
+ name: A("planmagnet.analytics.velocity.completed", "Completed"),
424
447
  fill: "#6366f1"
425
448
  }),
426
- /* @__PURE__ */ y(ee, {
427
- y: Z,
449
+ /* @__PURE__ */ _(a, {
450
+ y: X,
428
451
  stroke: "#22c55e",
429
452
  strokeDasharray: "4 4",
430
453
  label: {
431
- value: P("planmagnet.analytics.velocity.avgLabel", "avg"),
454
+ value: A("planmagnet.analytics.velocity.avgLabel", "avg"),
432
455
  fontSize: 10,
433
456
  position: "right"
434
457
  }
435
458
  })
436
459
  ]
437
460
  })
438
- }), /* @__PURE__ */ y("p", {
461
+ }), /* @__PURE__ */ _("p", {
439
462
  className: "text-xs text-muted-foreground text-center mt-2",
440
- children: P("planmagnet.analytics.velocity.forecast", "Forecast for next sprint: {{points}} pts (trailing average)", { points: Ee })
441
- })] }) : /* @__PURE__ */ y("p", {
463
+ children: A("planmagnet.analytics.velocity.forecast", "Forecast for next sprint: {{points}} pts (trailing average)", { points: Z })
464
+ })] }) : /* @__PURE__ */ _("p", {
442
465
  className: "text-sm text-muted-foreground py-8 text-center",
443
- children: P("planmagnet.analytics.velocity.empty", "No completed sprints yet for this project")
466
+ children: A("planmagnet.analytics.velocity.empty", "No completed sprints yet for this project")
444
467
  }) })] })]
445
468
  }),
446
- /* @__PURE__ */ b(x, { children: [/* @__PURE__ */ y(C, { children: /* @__PURE__ */ b(w, {
469
+ /* @__PURE__ */ v(y, { children: [/* @__PURE__ */ _(x, { children: /* @__PURE__ */ v(S, {
447
470
  className: "flex items-center gap-2",
448
- children: [/* @__PURE__ */ y(f, { className: "h-4 w-4" }), P("planmagnet.analytics.cfd.title", "Cumulative Flow Diagram")]
449
- }) }), /* @__PURE__ */ y(S, { children: ye ? /* @__PURE__ */ y("div", {
471
+ children: [/* @__PURE__ */ _(f, { className: "h-4 w-4" }), A("planmagnet.analytics.cfd.title", "Cumulative Flow Diagram")]
472
+ }) }), /* @__PURE__ */ _(b, { children: we ? /* @__PURE__ */ _("div", {
450
473
  className: "flex justify-center py-12",
451
- children: /* @__PURE__ */ y("div", { className: "animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full" })
452
- }) : $.length > 0 ? /* @__PURE__ */ y(r, {
474
+ children: /* @__PURE__ */ _("div", { className: "animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full" })
475
+ }) : $.length > 0 ? /* @__PURE__ */ _(r, {
453
476
  width: "100%",
454
477
  height: 260,
455
- children: /* @__PURE__ */ b(ie, {
478
+ children: /* @__PURE__ */ v(ne, {
456
479
  data: $,
457
480
  children: [
458
- /* @__PURE__ */ y(a, {
481
+ /* @__PURE__ */ _(o, {
459
482
  strokeDasharray: "3 3",
460
483
  opacity: .2
461
484
  }),
462
- /* @__PURE__ */ y(s, {
485
+ /* @__PURE__ */ _(l, {
463
486
  dataKey: "day",
464
487
  tick: { fontSize: 11 }
465
488
  }),
466
- /* @__PURE__ */ y(c, {
489
+ /* @__PURE__ */ _(u, {
467
490
  tick: { fontSize: 11 },
468
491
  allowDecimals: !1
469
492
  }),
470
- /* @__PURE__ */ y(n, {}),
471
- /* @__PURE__ */ y(t, { wrapperStyle: { fontSize: 12 } }),
472
- De.map((e) => /* @__PURE__ */ y(te, {
493
+ /* @__PURE__ */ _(n, {}),
494
+ /* @__PURE__ */ _(t, { wrapperStyle: { fontSize: 12 } }),
495
+ Ne.map((e) => /* @__PURE__ */ _(c, {
473
496
  type: "monotone",
474
497
  dataKey: e,
475
498
  name: e.toLowerCase().replace("_", " "),
476
499
  stackId: "cfd",
477
- stroke: M[e] ?? "#a3a3a3",
478
- fill: M[e] ?? "#a3a3a3",
500
+ stroke: O[e] ?? "#a3a3a3",
501
+ fill: O[e] ?? "#a3a3a3",
479
502
  fillOpacity: .7
480
503
  }, e))
481
504
  ]
482
505
  })
483
- }) : /* @__PURE__ */ y("p", {
506
+ }) : /* @__PURE__ */ _("p", {
484
507
  className: "text-sm text-muted-foreground py-8 text-center",
485
- children: P("planmagnet.analytics.cfd.empty", "No work items found for this project")
508
+ children: A("planmagnet.analytics.cfd.empty", "No work items found for this project")
486
509
  }) })] }),
487
- /* @__PURE__ */ b("div", {
510
+ /* @__PURE__ */ v("div", {
488
511
  className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
489
- children: [/* @__PURE__ */ y(u, {
490
- workspaceId: g,
491
- projectId: H
492
- }), /* @__PURE__ */ y(l, { workspaceId: g })]
512
+ children: [/* @__PURE__ */ _(ie, {
513
+ workspaceId: h,
514
+ projectId: B
515
+ }), /* @__PURE__ */ _(re, { workspaceId: h })]
493
516
  }),
494
- /* @__PURE__ */ b(x, { children: [/* @__PURE__ */ y(C, { children: /* @__PURE__ */ y(w, { children: P("planmagnet.analytics.projectHealth.title", "Project Health") }) }), /* @__PURE__ */ y(S, { children: /* @__PURE__ */ b("div", {
517
+ /* @__PURE__ */ v(y, { children: [/* @__PURE__ */ _(x, { children: /* @__PURE__ */ _(S, { children: A("planmagnet.analytics.projectHealth.title", "Project Health") }) }), /* @__PURE__ */ _(b, { children: /* @__PURE__ */ v("div", {
495
518
  className: "space-y-3",
496
- children: [z.filter((e) => e.status === "ACTIVE").map((e) => {
497
- let t = B.filter((e) => e.assigneeId != null), n = t.filter((e) => e.status === "DONE").length, r = t.length > 0 ? Math.round(n / t.length * 100) : 0, i = e.endDate && new Date(e.endDate) < /* @__PURE__ */ new Date() && r < 100 ? "at_risk" : r >= 75 ? "on_track" : "in_progress";
498
- return /* @__PURE__ */ b("div", {
519
+ children: [L.filter((e) => e.status === "ACTIVE").map((e) => {
520
+ let t = Oe(e.id), n = e.endDate && new Date(e.endDate) < /* @__PURE__ */ new Date() && t < 100 ? "at_risk" : t >= 75 ? "on_track" : "in_progress";
521
+ return /* @__PURE__ */ v("div", {
499
522
  className: "flex items-center gap-4",
500
523
  children: [
501
- /* @__PURE__ */ y("span", {
524
+ /* @__PURE__ */ _("span", {
502
525
  className: "text-sm font-medium w-40 truncate",
503
526
  children: e.name
504
527
  }),
505
- /* @__PURE__ */ y("div", {
528
+ /* @__PURE__ */ _("div", {
506
529
  className: "flex-1",
507
- children: /* @__PURE__ */ y("div", {
530
+ children: /* @__PURE__ */ _("div", {
508
531
  className: "w-full h-2 rounded-full bg-muted overflow-hidden",
509
- children: /* @__PURE__ */ y("div", {
510
- className: `h-full rounded-full ${i === "at_risk" ? "bg-orange-400" : i === "on_track" ? "bg-green-400" : "bg-blue-400"}`,
511
- style: { width: `${r}%` }
532
+ children: /* @__PURE__ */ _("div", {
533
+ className: `h-full rounded-full ${n === "at_risk" ? "bg-orange-400" : n === "on_track" ? "bg-green-400" : "bg-blue-400"}`,
534
+ style: { width: `${t}%` }
512
535
  })
513
536
  })
514
537
  }),
515
- /* @__PURE__ */ b("span", {
538
+ /* @__PURE__ */ v("span", {
516
539
  className: "text-sm w-12 text-right",
517
- children: [r, "%"]
540
+ children: [t, "%"]
518
541
  }),
519
- /* @__PURE__ */ y(se, {
542
+ /* @__PURE__ */ _(le, {
520
543
  variant: "outline",
521
544
  className: "capitalize text-xs w-20 justify-center",
522
- children: i.replace("_", " ")
545
+ children: n.replace("_", " ")
523
546
  })
524
547
  ]
525
548
  }, e.id);
526
- }), z.filter((e) => e.status === "ACTIVE").length === 0 && /* @__PURE__ */ y("p", {
549
+ }), L.filter((e) => e.status === "ACTIVE").length === 0 && /* @__PURE__ */ _("p", {
527
550
  className: "text-sm text-muted-foreground text-center py-4",
528
- children: P("planmagnet.analytics.projectHealth.empty", "No active projects found")
551
+ children: A("planmagnet.analytics.projectHealth.empty", "No active projects found")
529
552
  })]
530
553
  }) })] })
531
554
  ]
532
555
  });
533
556
  }
534
557
  //#endregion
535
- export { P as AnalyticsAnalyticsPagePage };
558
+ export { A as AnalyticsAnalyticsPagePage };
536
559
 
537
560
  //# sourceMappingURL=AnalyticsAnalyticsPagePage.js.map