@burdenoff/microfe-planmagnet 2026.927.4 → 2026.927.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/dist/generated/global-types.d.ts +9 -1
  2. package/dist/generated/global-types.d.ts.map +1 -1
  3. package/dist/generated/wspace-operations.d.ts +0 -12
  4. package/dist/generated/wspace-operations.d.ts.map +1 -1
  5. package/dist/planmagnet/PlanMagnetRoutes.d.ts.map +1 -1
  6. package/dist/planmagnet/PlanMagnetRoutes.js +14 -10
  7. package/dist/planmagnet/PlanMagnetRoutes.js.map +1 -1
  8. package/dist/planmagnet/admin/PlanMagnetAdminRoot.d.ts.map +1 -1
  9. package/dist/planmagnet/admin/PlanMagnetAdminRoot.js +149 -127
  10. package/dist/planmagnet/admin/PlanMagnetAdminRoot.js.map +1 -1
  11. package/dist/planmagnet/controls/FeatureControls.d.ts.map +1 -1
  12. package/dist/planmagnet/controls/FeatureControls.js +142 -139
  13. package/dist/planmagnet/controls/FeatureControls.js.map +1 -1
  14. package/dist/planmagnet/controls/FeatureTriage.d.ts +21 -0
  15. package/dist/planmagnet/controls/FeatureTriage.d.ts.map +1 -0
  16. package/dist/planmagnet/controls/FeatureTriage.js +398 -0
  17. package/dist/planmagnet/controls/FeatureTriage.js.map +1 -0
  18. package/dist/planmagnet/controls/MilestoneControls.d.ts.map +1 -1
  19. package/dist/planmagnet/controls/MilestoneControls.js +76 -73
  20. package/dist/planmagnet/controls/MilestoneControls.js.map +1 -1
  21. package/dist/planmagnet/controls/ProjectControls.d.ts.map +1 -1
  22. package/dist/planmagnet/controls/ProjectControls.js +47 -44
  23. package/dist/planmagnet/controls/ProjectControls.js.map +1 -1
  24. package/dist/planmagnet/controls/ReleaseControls.d.ts.map +1 -1
  25. package/dist/planmagnet/controls/ReleaseControls.js +47 -44
  26. package/dist/planmagnet/controls/ReleaseControls.js.map +1 -1
  27. package/dist/planmagnet/controls/WorkItemControls.d.ts.map +1 -1
  28. package/dist/planmagnet/controls/WorkItemControls.js +68 -65
  29. package/dist/planmagnet/controls/WorkItemControls.js.map +1 -1
  30. package/dist/planmagnet/hooks/useCounts.d.ts +39 -0
  31. package/dist/planmagnet/hooks/useCounts.d.ts.map +1 -0
  32. package/dist/planmagnet/hooks/useCounts.js +209 -0
  33. package/dist/planmagnet/hooks/useCounts.js.map +1 -0
  34. package/dist/planmagnet/import/exportColumns.d.ts +52 -0
  35. package/dist/planmagnet/import/exportColumns.d.ts.map +1 -0
  36. package/dist/planmagnet/import/exportColumns.js +81 -0
  37. package/dist/planmagnet/import/exportColumns.js.map +1 -0
  38. package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.d.ts.map +1 -1
  39. package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.js +255 -242
  40. package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.js.map +1 -1
  41. package/dist/planmagnet/pages/DashboardDashboardPagePage.d.ts.map +1 -1
  42. package/dist/planmagnet/pages/DashboardDashboardPagePage.js +199 -160
  43. package/dist/planmagnet/pages/DashboardDashboardPagePage.js.map +1 -1
  44. package/dist/planmagnet/pages/DocsDocDetailPagePage.d.ts.map +1 -1
  45. package/dist/planmagnet/pages/DocsDocDetailPagePage.js +147 -144
  46. package/dist/planmagnet/pages/DocsDocDetailPagePage.js.map +1 -1
  47. package/dist/planmagnet/pages/GoalsGoalsPagePage.d.ts.map +1 -1
  48. package/dist/planmagnet/pages/GoalsGoalsPagePage.js +2 -7
  49. package/dist/planmagnet/pages/GoalsGoalsPagePage.js.map +1 -1
  50. package/dist/planmagnet/pages/GoalsObjectiveDetailPagePage.d.ts.map +1 -1
  51. package/dist/planmagnet/pages/GoalsObjectiveDetailPagePage.js +173 -173
  52. package/dist/planmagnet/pages/GoalsObjectiveDetailPagePage.js.map +1 -1
  53. package/dist/planmagnet/pages/ProductsEditProductPagePage.d.ts.map +1 -1
  54. package/dist/planmagnet/pages/ProductsEditProductPagePage.js +120 -117
  55. package/dist/planmagnet/pages/ProductsEditProductPagePage.js.map +1 -1
  56. package/dist/planmagnet/pages/ProductsFeatureAnalyticsPagePage.d.ts.map +1 -1
  57. package/dist/planmagnet/pages/ProductsFeatureAnalyticsPagePage.js +97 -117
  58. package/dist/planmagnet/pages/ProductsFeatureAnalyticsPagePage.js.map +1 -1
  59. package/dist/planmagnet/pages/ProductsFeatureDetailPagePage.d.ts.map +1 -1
  60. package/dist/planmagnet/pages/ProductsFeatureDetailPagePage.js +168 -103
  61. package/dist/planmagnet/pages/ProductsFeatureDetailPagePage.js.map +1 -1
  62. package/dist/planmagnet/pages/ProductsFeaturesPagePage.d.ts.map +1 -1
  63. package/dist/planmagnet/pages/ProductsFeaturesPagePage.js +117 -103
  64. package/dist/planmagnet/pages/ProductsFeaturesPagePage.js.map +1 -1
  65. package/dist/planmagnet/pages/ProductsProductDetailPagePage.d.ts.map +1 -1
  66. package/dist/planmagnet/pages/ProductsProductDetailPagePage.js +4 -8
  67. package/dist/planmagnet/pages/ProductsProductDetailPagePage.js.map +1 -1
  68. package/dist/planmagnet/pages/ProductsProductsPagePage.d.ts.map +1 -1
  69. package/dist/planmagnet/pages/ProductsProductsPagePage.js +85 -90
  70. package/dist/planmagnet/pages/ProductsProductsPagePage.js.map +1 -1
  71. package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.d.ts.map +1 -1
  72. package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.js +12 -2
  73. package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.js.map +1 -1
  74. package/dist/planmagnet/pages/ProductsReleasesPagePage.d.ts.map +1 -1
  75. package/dist/planmagnet/pages/ProductsReleasesPagePage.js +2 -2
  76. package/dist/planmagnet/pages/ProductsReleasesPagePage.js.map +1 -1
  77. package/dist/planmagnet/pages/ProductsRoadmapAnalyticsPagePage.d.ts.map +1 -1
  78. package/dist/planmagnet/pages/ProductsRoadmapAnalyticsPagePage.js +48 -71
  79. package/dist/planmagnet/pages/ProductsRoadmapAnalyticsPagePage.js.map +1 -1
  80. package/dist/planmagnet/pages/ProductsRoadmapsPagePage.d.ts.map +1 -1
  81. package/dist/planmagnet/pages/ProductsRoadmapsPagePage.js +17 -13
  82. package/dist/planmagnet/pages/ProductsRoadmapsPagePage.js.map +1 -1
  83. package/dist/planmagnet/pages/ProjectsActiveProjectsPagePage.d.ts.map +1 -1
  84. package/dist/planmagnet/pages/ProjectsActiveProjectsPagePage.js +1 -1
  85. package/dist/planmagnet/pages/ProjectsActiveProjectsPagePage.js.map +1 -1
  86. package/dist/planmagnet/pages/ProjectsEditProjectPagePage.js +6 -6
  87. package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.d.ts.map +1 -1
  88. package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.js +11 -8
  89. package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.js.map +1 -1
  90. package/dist/planmagnet/pages/ProjectsPlanningEditPagePage.js +4 -4
  91. package/dist/planmagnet/pages/ProjectsPlanningPagePage.d.ts.map +1 -1
  92. package/dist/planmagnet/pages/ProjectsPlanningPagePage.js +1 -1
  93. package/dist/planmagnet/pages/ProjectsPlanningPagePage.js.map +1 -1
  94. package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.d.ts.map +1 -1
  95. package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.js +152 -139
  96. package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.js.map +1 -1
  97. package/dist/planmagnet/pages/ProjectsProjectsPagePage.d.ts.map +1 -1
  98. package/dist/planmagnet/pages/ProjectsProjectsPagePage.js +75 -74
  99. package/dist/planmagnet/pages/ProjectsProjectsPagePage.js.map +1 -1
  100. package/dist/planmagnet/pages/ReportsReportsPagePage.d.ts +7 -0
  101. package/dist/planmagnet/pages/ReportsReportsPagePage.d.ts.map +1 -1
  102. package/dist/planmagnet/pages/ReportsReportsPagePage.js +39 -201
  103. package/dist/planmagnet/pages/ReportsReportsPagePage.js.map +1 -1
  104. package/dist/planmagnet/pages/SprintsStartSprintPagePage.d.ts.map +1 -1
  105. package/dist/planmagnet/pages/SprintsStartSprintPagePage.js +118 -99
  106. package/dist/planmagnet/pages/SprintsStartSprintPagePage.js.map +1 -1
  107. package/dist/planmagnet/pages/TasksImportPagePage.d.ts +2 -0
  108. package/dist/planmagnet/pages/TasksImportPagePage.d.ts.map +1 -0
  109. package/dist/planmagnet/pages/TasksImportPagePage.js +309 -0
  110. package/dist/planmagnet/pages/TasksImportPagePage.js.map +1 -0
  111. package/dist/planmagnet/pages/TasksTasksPagePage.d.ts.map +1 -1
  112. package/dist/planmagnet/pages/TasksTasksPagePage.js +110 -104
  113. package/dist/planmagnet/pages/TasksTasksPagePage.js.map +1 -1
  114. package/dist/planmagnet/pages/TeamTeamPagePage.d.ts.map +1 -1
  115. package/dist/planmagnet/pages/TeamTeamPagePage.js +99 -177
  116. package/dist/planmagnet/pages/TeamTeamPagePage.js.map +1 -1
  117. package/dist/planmagnet/pages/analytics/DeliveryHealthCards.d.ts.map +1 -1
  118. package/dist/planmagnet/pages/analytics/DeliveryHealthCards.js +8 -4
  119. package/dist/planmagnet/pages/analytics/DeliveryHealthCards.js.map +1 -1
  120. package/dist/planmagnet/releases/ReleaseWorkItemsCard.d.ts.map +1 -1
  121. package/dist/planmagnet/releases/ReleaseWorkItemsCard.js +10 -4
  122. package/dist/planmagnet/releases/ReleaseWorkItemsCard.js.map +1 -1
  123. package/dist/planmagnet/roadmaps/RoadmapControls.d.ts.map +1 -1
  124. package/dist/planmagnet/roadmaps/RoadmapControls.js +151 -138
  125. package/dist/planmagnet/roadmaps/RoadmapControls.js.map +1 -1
  126. package/dist/planmagnet/sprints/SprintControls.d.ts.map +1 -1
  127. package/dist/planmagnet/sprints/SprintControls.js +32 -30
  128. package/dist/planmagnet/sprints/SprintControls.js.map +1 -1
  129. package/dist/planmagnet/utils/mutationResult.d.ts +10 -0
  130. package/dist/planmagnet/utils/mutationResult.d.ts.map +1 -1
  131. package/dist/planmagnet/utils/mutationResult.js +2 -1
  132. package/dist/planmagnet/utils/mutationResult.js.map +1 -1
  133. package/dist/planmagnet/utils/rowNavigation.d.ts +2 -0
  134. package/dist/planmagnet/utils/rowNavigation.d.ts.map +1 -1
  135. package/dist/planmagnet/utils/rowNavigation.js +9 -8
  136. package/dist/planmagnet/utils/rowNavigation.js.map +1 -1
  137. package/package.json +1 -1
@@ -3,29 +3,64 @@ 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 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";
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";
16
17
  import { useState as d } from "react";
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";
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";
23
24
  //#region src/planmagnet/pages/AnalyticsAnalyticsPagePage.tsx
24
- var ue = h`
25
+ var me = m`
26
+ query AnalyticsProjectSprints($workspaceId: ID!, $projectId: String) {
27
+ planmagnetSprints(
28
+ workspaceId: $workspaceId
29
+ filter: { projectId: $projectId }
30
+ pagination: { first: 100 }
31
+ ) {
32
+ items {
33
+ id
34
+ name
35
+ status
36
+ completedAt
37
+ endDate
38
+ }
39
+ }
40
+ }
41
+ `, he = m`
42
+ query AnalyticsMilestoneRisk($workspaceId: ID!, $yesterday: DateTime) {
43
+ missed: planmagnetMilestones(
44
+ workspaceId: $workspaceId
45
+ filter: { status: MISSED }
46
+ pagination: { first: 1 }
47
+ ) {
48
+ totalCount
49
+ }
50
+ overdue: planmagnetMilestones(
51
+ workspaceId: $workspaceId
52
+ filter: { open: true, dueTo: $yesterday }
53
+ pagination: { first: 1 }
54
+ ) {
55
+ totalCount
56
+ }
57
+ }
58
+ `, ge = m`
25
59
  query GetAnalyticsWorkItemCounts($workspaceId: ID!) {
26
60
  planmagnetWorkItemCounts(workspaceId: $workspaceId) {
27
61
  total
28
62
  points
63
+ blocked
29
64
  byStatus {
30
65
  status
31
66
  count
@@ -38,14 +73,8 @@ var ue = h`
38
73
  }
39
74
  }
40
75
  }
41
- `, de = h`
42
- query GetAnalyticsData(
43
- $workspaceId: ID!
44
- $projectPagination: PlanmagnetPaginationInput
45
- $workItemPagination: PlanmagnetPaginationInput
46
- $sprintPagination: PlanmagnetPaginationInput
47
- $milestonePagination: PlanmagnetPaginationInput
48
- ) {
76
+ `, _e = m`
77
+ query GetAnalyticsData($workspaceId: ID!, $projectPagination: PlanmagnetPaginationInput) {
49
78
  planmagnetProjects(workspaceId: $workspaceId, pagination: $projectPagination) {
50
79
  items {
51
80
  id
@@ -58,40 +87,8 @@ var ue = h`
58
87
  }
59
88
  totalCount
60
89
  }
61
- planmagnetWorkItems(workspaceId: $workspaceId, pagination: $workItemPagination) {
62
- items {
63
- id
64
- status
65
- priority
66
- storyPoints
67
- assigneeId
68
- }
69
- totalCount
70
- }
71
- planmagnetSprints(workspaceId: $workspaceId, pagination: $sprintPagination) {
72
- items {
73
- id
74
- name
75
- status
76
- velocity
77
- capacity
78
- projectId
79
- startDate
80
- endDate
81
- }
82
- totalCount
83
- }
84
- planmagnetMilestones(workspaceId: $workspaceId, pagination: $milestonePagination) {
85
- items {
86
- id
87
- name
88
- status
89
- dueDate
90
- }
91
- totalCount
92
- }
93
90
  }
94
- `, fe = h`
91
+ `, ve = m`
95
92
  query GetSprintBurndown($workspaceId: ID!, $sprintId: ID!) {
96
93
  planmagnetSprintBurndown(workspaceId: $workspaceId, sprintId: $sprintId) {
97
94
  sprintId
@@ -108,7 +105,7 @@ var ue = h`
108
105
  }
109
106
  }
110
107
  }
111
- `, pe = h`
108
+ `, ye = m`
112
109
  query GetVelocity($workspaceId: ID!, $projectId: ID!, $trailingSprintCount: Int) {
113
110
  planmagnetVelocity(
114
111
  workspaceId: $workspaceId
@@ -128,7 +125,7 @@ var ue = h`
128
125
  }
129
126
  }
130
127
  }
131
- `, me = h`
128
+ `, be = m`
132
129
  query GetCumulativeFlow($workspaceId: ID!, $projectId: ID!) {
133
130
  planmagnetCumulativeFlow(workspaceId: $workspaceId, projectId: $projectId) {
134
131
  projectId
@@ -143,7 +140,7 @@ var ue = h`
143
140
  }
144
141
  }
145
142
  }
146
- `, O = {
143
+ `, D = {
147
144
  BACKLOG: "#9ca3af",
148
145
  TODO: "#60a5fa",
149
146
  IN_PROGRESS: "#fbbf24",
@@ -152,409 +149,425 @@ var ue = h`
152
149
  DONE: "#4ade80",
153
150
  CANCELLED: "#f87171"
154
151
  };
155
- function k(e) {
152
+ function O(e) {
156
153
  let t = new Date(e);
157
154
  return `${t.getUTCMonth() + 1}/${t.getUTCDate()}`;
158
155
  }
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, {
156
+ function k() {
157
+ let { workspaceId: m } = e(), { t: k } = fe(), [xe, Se] = d(""), [A, j] = d(""), { data: M, loading: Ce, error: N } = h(_e, {
158
+ variables: {
159
+ workspaceId: m,
160
+ projectPagination: { first: 100 }
161
+ },
162
+ skip: !m
163
+ }), { data: we } = h(ge, {
164
+ variables: { workspaceId: m },
165
+ skip: !m
166
+ }), P = we?.planmagnetWorkItemCounts, F = ie(), Te = ae(), [Ee] = d(() => (/* @__PURE__ */ new Date(Date.now() - 864e5)).toISOString().slice(0, 10)), { data: I } = h(he, {
161
167
  variables: {
162
- workspaceId: h,
163
- projectPagination: { first: 100 },
164
- workItemPagination: { first: 500 },
165
- sprintPagination: { first: 100 },
166
- milestonePagination: { first: 100 }
168
+ workspaceId: m,
169
+ yesterday: Ee
167
170
  },
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, {
171
+ skip: !m
172
+ }), L = M?.planmagnetProjects?.items ?? [], R = xe || L[0]?.id || "", { data: z } = h(me, {
173
173
  variables: {
174
- workspaceId: h,
175
- sprintId: H
174
+ workspaceId: m,
175
+ projectId: R
176
176
  },
177
- skip: !h || !H
178
- }), { data: xe, loading: Se } = g(pe, {
177
+ skip: !m || !R
178
+ }), B = z?.planmagnetSprints.items ?? [], De = B.filter((e) => e.status === "COMPLETED").sort((e, t) => (t.completedAt ?? t.endDate ?? "").localeCompare(e.completedAt ?? e.endDate ?? ""))[0], Oe = B.find((e) => e.status === "ACTIVE" || e.status === "REVIEW") ?? De ?? B[0], V = A || Oe?.id || "", ke = L.find((e) => e.id === R)?.name ?? "", { data: Ae, loading: je } = h(ve, {
179
179
  variables: {
180
- workspaceId: h,
181
- projectId: B,
180
+ workspaceId: m,
181
+ sprintId: V
182
+ },
183
+ skip: !m || !V
184
+ }), { data: Me, loading: Ne } = h(ye, {
185
+ variables: {
186
+ workspaceId: m,
187
+ projectId: R,
182
188
  trailingSprintCount: 6
183
189
  },
184
- skip: !h || !B
185
- }), { data: Ce, loading: we } = g(me, {
190
+ skip: !m || !R
191
+ }), { data: Pe, loading: Fe } = h(be, {
186
192
  variables: {
187
- workspaceId: h,
188
- projectId: B
193
+ workspaceId: m,
194
+ projectId: R
189
195
  },
190
- skip: !h || !B
196
+ skip: !m || !R
191
197
  });
192
- if (N && !M) return /* @__PURE__ */ _("div", {
198
+ if (Ce && !M) return /* @__PURE__ */ g("div", {
193
199
  className: "flex items-center justify-center p-12",
194
- children: /* @__PURE__ */ _("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
200
+ children: /* @__PURE__ */ g("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
195
201
  });
196
- if (P) return /* @__PURE__ */ v("div", {
202
+ if (N) return /* @__PURE__ */ _("div", {
197
203
  className: "p-6 text-red-500",
198
204
  children: [
199
- A("planmagnet.analytics.errorLoading", "Error loading analytics"),
205
+ k("planmagnet.analytics.errorLoading", "Error loading analytics"),
200
206
  ": ",
201
- P.message
207
+ N.message
202
208
  ]
203
209
  });
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);
210
+ let H = (e) => P?.byStatus.find((t) => t.status === e), U = H("CANCELLED")?.count ?? 0, W = P ? H("DONE")?.count ?? 0 : null, G = P ? P.total : null, K = P ? P.blocked : null, Ie = P ? P.points : null, Le = P ? H("DONE")?.points ?? 0 : null, Re = (e) => {
211
+ let t = P?.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);
206
212
  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),
213
+ }, ze = Te?.running ?? null, Be = I ? I.missed.totalCount + I.overdue.totalCount : null, q = F?.active ?? null, Ve = G != null && W != null && G - U > 0 ? Math.round(W / (G - U) * 100) : null, J = (Ae?.planmagnetSprintBurndown)?.points.map((e) => ({
214
+ day: O(e.date),
209
215
  remaining: e.remainingPoints,
210
216
  completed: e.completedPoints
211
- })) ?? [], J = xe?.planmagnetVelocity, Y = J?.sprints.map((e) => ({
217
+ })) ?? [], Y = Me?.planmagnetVelocity, X = Y?.sprints.map((e) => ({
212
218
  name: e.sprintName,
213
219
  completed: e.completedPoints,
214
220
  planned: e.plannedPoints ?? void 0
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) };
221
+ })) ?? [], Z = Y ? Math.round(Y.averageVelocity) : 0, He = Y ? Math.round(Y.forecastNextSprintPoints) : 0, Q = Pe?.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) };
217
223
  for (let n of e.statuses) t[n.status] = n.count;
218
224
  return t;
219
- }) ?? [], Pe = [
225
+ }) ?? [], We = [
220
226
  {
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")}`
227
+ label: k("planmagnet.analytics.metrics.totalWorkItems.label", "Total Work Items"),
228
+ value: u(G),
229
+ trend: `${u(Ve)}% ${k("planmagnet.analytics.metrics.totalWorkItems.trend", "completed")}`
224
230
  },
225
231
  {
226
- label: A("planmagnet.analytics.metrics.storyPoints.label", "Story Points"),
227
- value: String(Ee),
228
- trend: `${De} ${A("planmagnet.analytics.metrics.storyPoints.trend", "completed")}`
232
+ label: k("planmagnet.analytics.metrics.storyPoints.label", "Story Points"),
233
+ value: u(Ie),
234
+ trend: `${u(Le)} ${k("planmagnet.analytics.metrics.storyPoints.trend", "completed")}`
229
235
  },
230
236
  {
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")}`
237
+ label: k("planmagnet.analytics.metrics.activeProjects.label", "Active Projects"),
238
+ value: u(q),
239
+ trend: `${u(F?.all)} ${k("planmagnet.analytics.metrics.activeProjects.trend", "total")}`
234
240
  },
235
241
  {
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")
242
+ label: k("planmagnet.analytics.metrics.blockedItems.label", "Blocked Items"),
243
+ value: u(K),
244
+ trend: K == null ? "" : K > 0 ? k("planmagnet.analytics.metrics.blockedItems.attention", "Needs attention") : k("planmagnet.analytics.metrics.blockedItems.clear", "All clear")
239
245
  }
240
246
  ];
241
- return /* @__PURE__ */ v("div", {
247
+ return /* @__PURE__ */ _("div", {
242
248
  className: "space-y-6 p-6",
243
249
  children: [
244
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("h1", {
250
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h1", {
245
251
  className: "text-2xl font-semibold",
246
- children: A("planmagnet.analytics.title", "Analytics Dashboard")
247
- }), /* @__PURE__ */ _("p", {
252
+ children: k("planmagnet.analytics.title", "Analytics Dashboard")
253
+ }), /* @__PURE__ */ g("p", {
248
254
  className: "text-sm text-muted-foreground",
249
- children: A("planmagnet.analytics.subtitle", "Overview of project health and team performance")
255
+ children: k("planmagnet.analytics.subtitle", "Overview of project health and team performance")
250
256
  })] }),
251
- /* @__PURE__ */ _("div", {
257
+ /* @__PURE__ */ g("div", {
252
258
  className: "grid grid-cols-2 md:grid-cols-4 gap-4",
253
- children: Pe.map((e) => /* @__PURE__ */ _(y, { children: /* @__PURE__ */ v(b, {
259
+ children: We.map((e) => /* @__PURE__ */ g(v, { children: /* @__PURE__ */ _(y, {
254
260
  className: "pt-4",
255
261
  children: [
256
- /* @__PURE__ */ _("p", {
262
+ /* @__PURE__ */ g("p", {
257
263
  className: "text-xs text-muted-foreground",
258
264
  children: e.label
259
265
  }),
260
- /* @__PURE__ */ _("p", {
266
+ /* @__PURE__ */ g("p", {
261
267
  className: "text-xl font-bold mt-1",
262
268
  children: e.value
263
269
  }),
264
- /* @__PURE__ */ _("p", {
270
+ /* @__PURE__ */ g("p", {
265
271
  className: "text-xs text-green-600 mt-1",
266
272
  children: e.trend
267
273
  })
268
274
  ]
269
275
  }) }, e.label))
270
276
  }),
271
- /* @__PURE__ */ v("div", {
277
+ /* @__PURE__ */ _("div", {
272
278
  className: "grid grid-cols-2 md:grid-cols-4 gap-4",
273
279
  children: [
274
- /* @__PURE__ */ _(y, { children: /* @__PURE__ */ v(b, {
280
+ /* @__PURE__ */ g(v, { children: /* @__PURE__ */ _(y, {
275
281
  className: "pt-4",
276
- children: [/* @__PURE__ */ v("div", {
282
+ children: [/* @__PURE__ */ _("div", {
277
283
  className: "flex items-center gap-2 text-muted-foreground text-xs",
278
- children: [/* @__PURE__ */ _(p, { className: "h-4 w-4" }), A("planmagnet.analytics.summary.activeProjects", "Active Projects")]
279
- }), /* @__PURE__ */ _("p", {
284
+ children: [/* @__PURE__ */ g(ce, { className: "h-4 w-4" }), k("planmagnet.analytics.summary.activeProjects", "Active Projects")]
285
+ }), /* @__PURE__ */ g("p", {
280
286
  className: "text-xl font-bold mt-1",
281
- children: K
287
+ children: u(q)
282
288
  })]
283
289
  }) }),
284
- /* @__PURE__ */ _(y, { children: /* @__PURE__ */ v(b, {
290
+ /* @__PURE__ */ g(v, { children: /* @__PURE__ */ _(y, {
285
291
  className: "pt-4",
286
- children: [/* @__PURE__ */ v("div", {
292
+ children: [/* @__PURE__ */ _("div", {
287
293
  className: "flex items-center gap-2 text-muted-foreground text-xs",
288
- children: [/* @__PURE__ */ _(oe, { className: "h-4 w-4" }), A("planmagnet.analytics.summary.activeSprints", "Active Sprints")]
289
- }), /* @__PURE__ */ _("p", {
294
+ children: [/* @__PURE__ */ g(ue, { className: "h-4 w-4" }), k("planmagnet.analytics.summary.activeSprints", "Active Sprints")]
295
+ }), /* @__PURE__ */ g("p", {
290
296
  className: "text-xl font-bold mt-1",
291
- children: ke
297
+ children: u(ze)
292
298
  })]
293
299
  }) }),
294
- /* @__PURE__ */ _(y, { children: /* @__PURE__ */ v(b, {
300
+ /* @__PURE__ */ g(v, { children: /* @__PURE__ */ _(y, {
295
301
  className: "pt-4",
296
- children: [/* @__PURE__ */ v("div", {
297
- className: "flex items-center gap-2 text-muted-foreground text-xs",
298
- children: [/* @__PURE__ */ _(m, { className: "h-4 w-4" }), A("planmagnet.analytics.summary.avgVelocity", "Avg Velocity")]
299
- }), /* @__PURE__ */ v("p", {
300
- className: "text-xl font-bold mt-1",
301
- children: [
302
- X,
303
- " ",
304
- A("planmagnet.analytics.summary.pointsShort", "pts")
305
- ]
306
- })]
302
+ children: [
303
+ /* @__PURE__ */ _("div", {
304
+ 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")]
306
+ }),
307
+ /* @__PURE__ */ g("p", {
308
+ className: "text-xs text-muted-foreground truncate",
309
+ children: ke || "—"
310
+ }),
311
+ /* @__PURE__ */ _("p", {
312
+ className: "text-xl font-bold mt-1",
313
+ children: [
314
+ Z,
315
+ " ",
316
+ k("planmagnet.analytics.summary.pointsShort", "pts")
317
+ ]
318
+ })
319
+ ]
307
320
  }) }),
308
- /* @__PURE__ */ _(y, { children: /* @__PURE__ */ v(b, {
321
+ /* @__PURE__ */ g(v, { children: /* @__PURE__ */ _(y, {
309
322
  className: "pt-4",
310
- children: [/* @__PURE__ */ v("div", {
323
+ children: [/* @__PURE__ */ _("div", {
311
324
  className: "flex items-center gap-2 text-muted-foreground text-xs",
312
- children: [/* @__PURE__ */ _(ae, { className: "h-4 w-4" }), A("planmagnet.analytics.summary.atRisk", "At Risk")]
313
- }), /* @__PURE__ */ v("p", {
325
+ children: [/* @__PURE__ */ g(le, { className: "h-4 w-4" }), k("planmagnet.analytics.summary.atRisk", "At Risk")]
326
+ }), /* @__PURE__ */ _("p", {
314
327
  className: "text-xl font-bold mt-1",
315
328
  children: [
316
- je,
329
+ u(Be),
317
330
  " ",
318
- A("planmagnet.analytics.summary.milestones", "milestones")
331
+ k("planmagnet.analytics.summary.milestones", "milestones")
319
332
  ]
320
333
  })]
321
334
  }) })
322
335
  ]
323
336
  }),
324
- /* @__PURE__ */ v("div", {
337
+ /* @__PURE__ */ _("div", {
325
338
  className: "flex flex-col sm:flex-row gap-3 items-start sm:items-center",
326
- children: [/* @__PURE__ */ _("h2", {
339
+ children: [/* @__PURE__ */ g("h2", {
327
340
  className: "text-lg font-semibold",
328
- children: A("planmagnet.analytics.delivery.title", "Sprint Delivery Analytics")
329
- }), /* @__PURE__ */ v("div", {
341
+ children: k("planmagnet.analytics.delivery.title", "Sprint Delivery Analytics")
342
+ }), /* @__PURE__ */ _("div", {
330
343
  className: "flex gap-2 sm:ml-auto",
331
- children: [/* @__PURE__ */ v(C, {
332
- value: B,
344
+ children: [/* @__PURE__ */ _(S, {
345
+ value: R,
333
346
  onValueChange: (e) => {
334
- ge(e), j("");
347
+ Se(e), j("");
335
348
  },
336
- children: [/* @__PURE__ */ _(E, {
349
+ children: [/* @__PURE__ */ g(T, {
337
350
  className: "h-8 w-48",
338
- children: /* @__PURE__ */ _(D, { placeholder: A("planmagnet.analytics.delivery.projectPlaceholder", "Select project") })
339
- }), /* @__PURE__ */ _(w, { children: L.map((e) => /* @__PURE__ */ _(T, {
351
+ children: /* @__PURE__ */ g(E, { placeholder: k("planmagnet.analytics.delivery.projectPlaceholder", "Select project") })
352
+ }), /* @__PURE__ */ g(C, { children: L.map((e) => /* @__PURE__ */ g(w, {
340
353
  value: e.id,
341
354
  children: e.name
342
355
  }, e.id)) })]
343
- }), /* @__PURE__ */ v(C, {
344
- value: H,
356
+ }), /* @__PURE__ */ _(S, {
357
+ value: V,
345
358
  onValueChange: j,
346
- children: [/* @__PURE__ */ _(E, {
359
+ children: [/* @__PURE__ */ g(T, {
347
360
  className: "h-8 w-48",
348
- children: /* @__PURE__ */ _(D, { placeholder: A("planmagnet.analytics.delivery.sprintPlaceholder", "Select sprint") })
349
- }), /* @__PURE__ */ _(w, { children: V.map((e) => /* @__PURE__ */ _(T, {
361
+ children: /* @__PURE__ */ g(E, { placeholder: k("planmagnet.analytics.delivery.sprintPlaceholder", "Select sprint") })
362
+ }), /* @__PURE__ */ g(C, { children: B.map((e) => /* @__PURE__ */ g(w, {
350
363
  value: e.id,
351
364
  children: e.name
352
365
  }, e.id)) })]
353
366
  })]
354
367
  })]
355
368
  }),
356
- /* @__PURE__ */ v("div", {
369
+ /* @__PURE__ */ _("div", {
357
370
  className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
358
- children: [/* @__PURE__ */ v(y, { children: [/* @__PURE__ */ _(x, { children: /* @__PURE__ */ v(S, {
371
+ children: [/* @__PURE__ */ _(v, { children: [/* @__PURE__ */ g(b, { children: /* @__PURE__ */ _(x, {
359
372
  className: "flex items-center gap-2",
360
- children: [/* @__PURE__ */ _(f, { className: "h-4 w-4" }), A("planmagnet.analytics.burndown.title", "Sprint Burndown")]
361
- }) }), /* @__PURE__ */ _(b, { children: be ? /* @__PURE__ */ _("div", {
373
+ children: [/* @__PURE__ */ g(f, { className: "h-4 w-4" }), k("planmagnet.analytics.burndown.title", "Sprint Burndown")]
374
+ }) }), /* @__PURE__ */ g(y, { children: je ? /* @__PURE__ */ g("div", {
362
375
  className: "flex justify-center py-12",
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, {
376
+ children: /* @__PURE__ */ g("div", { className: "animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full" })
377
+ }) : J.length > 0 ? /* @__PURE__ */ g(r, {
365
378
  width: "100%",
366
379
  height: 220,
367
- children: /* @__PURE__ */ v(ee, {
368
- data: q,
380
+ children: /* @__PURE__ */ _(ne, {
381
+ data: J,
369
382
  children: [
370
- /* @__PURE__ */ _(o, {
383
+ /* @__PURE__ */ g(a, {
371
384
  strokeDasharray: "3 3",
372
385
  opacity: .2
373
386
  }),
374
- /* @__PURE__ */ _(l, {
387
+ /* @__PURE__ */ g(s, {
375
388
  dataKey: "day",
376
389
  tick: { fontSize: 11 }
377
390
  }),
378
- /* @__PURE__ */ _(u, {
391
+ /* @__PURE__ */ g(c, {
379
392
  tick: { fontSize: 11 },
380
393
  allowDecimals: !1
381
394
  }),
382
- /* @__PURE__ */ _(n, {}),
383
- /* @__PURE__ */ _(t, { wrapperStyle: { fontSize: 12 } }),
384
- /* @__PURE__ */ _(s, {
395
+ /* @__PURE__ */ g(n, {}),
396
+ /* @__PURE__ */ g(t, { wrapperStyle: { fontSize: 12 } }),
397
+ /* @__PURE__ */ g(o, {
385
398
  type: "monotone",
386
399
  dataKey: "remaining",
387
- name: A("planmagnet.analytics.burndown.remaining", "Remaining points"),
400
+ name: k("planmagnet.analytics.burndown.remaining", "Remaining points"),
388
401
  stroke: "#f59e0b",
389
402
  strokeWidth: 2,
390
403
  dot: { r: 2 }
391
404
  }),
392
- /* @__PURE__ */ _(s, {
405
+ /* @__PURE__ */ g(o, {
393
406
  type: "monotone",
394
407
  dataKey: "completed",
395
- name: A("planmagnet.analytics.burndown.completed", "Completed points"),
408
+ name: k("planmagnet.analytics.burndown.completed", "Completed points"),
396
409
  stroke: "#22c55e",
397
410
  strokeWidth: 2,
398
411
  dot: { r: 2 }
399
412
  })
400
413
  ]
401
414
  })
402
- }) : /* @__PURE__ */ _("p", {
415
+ }) : /* @__PURE__ */ g("p", {
403
416
  className: "text-sm text-muted-foreground py-8 text-center",
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, {
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, {
406
419
  className: "flex items-center gap-2",
407
420
  children: [
408
- /* @__PURE__ */ _(m, { className: "h-4 w-4" }),
409
- A("planmagnet.analytics.velocity.title", "Sprint Velocity"),
421
+ /* @__PURE__ */ g(p, { className: "h-4 w-4" }),
422
+ k("planmagnet.analytics.velocity.title", "Sprint Velocity"),
410
423
  " (",
411
- Y.length,
424
+ X.length,
412
425
  " ",
413
- A("planmagnet.analytics.velocity.sprints", "Sprints"),
426
+ k("planmagnet.analytics.velocity.sprints", "Sprints"),
414
427
  ")"
415
428
  ]
416
- }) }), /* @__PURE__ */ _(b, { children: Se ? /* @__PURE__ */ _("div", {
429
+ }) }), /* @__PURE__ */ g(y, { children: Ne ? /* @__PURE__ */ g("div", {
417
430
  className: "flex justify-center py-12",
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, {
431
+ children: /* @__PURE__ */ g("div", { className: "animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full" })
432
+ }) : X.length > 0 ? /* @__PURE__ */ _(de, { children: [/* @__PURE__ */ g(r, {
420
433
  width: "100%",
421
434
  height: 190,
422
- children: /* @__PURE__ */ v(te, {
423
- data: Y,
435
+ children: /* @__PURE__ */ _(re, {
436
+ data: X,
424
437
  children: [
425
- /* @__PURE__ */ _(o, {
438
+ /* @__PURE__ */ g(a, {
426
439
  strokeDasharray: "3 3",
427
440
  opacity: .2
428
441
  }),
429
- /* @__PURE__ */ _(l, {
442
+ /* @__PURE__ */ g(s, {
430
443
  dataKey: "name",
431
444
  tick: { fontSize: 11 }
432
445
  }),
433
- /* @__PURE__ */ _(u, {
446
+ /* @__PURE__ */ g(c, {
434
447
  tick: { fontSize: 11 },
435
448
  allowDecimals: !1
436
449
  }),
437
- /* @__PURE__ */ _(n, {}),
438
- /* @__PURE__ */ _(t, { wrapperStyle: { fontSize: 12 } }),
439
- /* @__PURE__ */ _(i, {
450
+ /* @__PURE__ */ g(n, {}),
451
+ /* @__PURE__ */ g(t, { wrapperStyle: { fontSize: 12 } }),
452
+ /* @__PURE__ */ g(i, {
440
453
  dataKey: "planned",
441
- name: A("planmagnet.analytics.velocity.planned", "Planned"),
454
+ name: k("planmagnet.analytics.velocity.planned", "Planned"),
442
455
  fill: "#cbd5e1"
443
456
  }),
444
- /* @__PURE__ */ _(i, {
457
+ /* @__PURE__ */ g(i, {
445
458
  dataKey: "completed",
446
- name: A("planmagnet.analytics.velocity.completed", "Completed"),
459
+ name: k("planmagnet.analytics.velocity.completed", "Completed"),
447
460
  fill: "#6366f1"
448
461
  }),
449
- /* @__PURE__ */ _(a, {
450
- y: X,
462
+ /* @__PURE__ */ g(ee, {
463
+ y: Z,
451
464
  stroke: "#22c55e",
452
465
  strokeDasharray: "4 4",
453
466
  label: {
454
- value: A("planmagnet.analytics.velocity.avgLabel", "avg"),
467
+ value: k("planmagnet.analytics.velocity.avgLabel", "avg"),
455
468
  fontSize: 10,
456
469
  position: "right"
457
470
  }
458
471
  })
459
472
  ]
460
473
  })
461
- }), /* @__PURE__ */ _("p", {
474
+ }), /* @__PURE__ */ g("p", {
462
475
  className: "text-xs text-muted-foreground text-center mt-2",
463
- children: A("planmagnet.analytics.velocity.forecast", "Forecast for next sprint: {{points}} pts (trailing average)", { points: Z })
464
- })] }) : /* @__PURE__ */ _("p", {
476
+ children: k("planmagnet.analytics.velocity.forecast", "Forecast for next sprint: {{points}} pts (trailing average)", { points: He })
477
+ })] }) : /* @__PURE__ */ g("p", {
465
478
  className: "text-sm text-muted-foreground py-8 text-center",
466
- children: A("planmagnet.analytics.velocity.empty", "No completed sprints yet for this project")
479
+ children: k("planmagnet.analytics.velocity.empty", "No completed sprints yet for this project")
467
480
  }) })] })]
468
481
  }),
469
- /* @__PURE__ */ v(y, { children: [/* @__PURE__ */ _(x, { children: /* @__PURE__ */ v(S, {
482
+ /* @__PURE__ */ _(v, { children: [/* @__PURE__ */ g(b, { children: /* @__PURE__ */ _(x, {
470
483
  className: "flex items-center gap-2",
471
- children: [/* @__PURE__ */ _(f, { className: "h-4 w-4" }), A("planmagnet.analytics.cfd.title", "Cumulative Flow Diagram")]
472
- }) }), /* @__PURE__ */ _(b, { children: we ? /* @__PURE__ */ _("div", {
484
+ children: [/* @__PURE__ */ g(f, { className: "h-4 w-4" }), k("planmagnet.analytics.cfd.title", "Cumulative Flow Diagram")]
485
+ }) }), /* @__PURE__ */ g(y, { children: Fe ? /* @__PURE__ */ g("div", {
473
486
  className: "flex justify-center py-12",
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, {
487
+ children: /* @__PURE__ */ g("div", { className: "animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full" })
488
+ }) : $.length > 0 ? /* @__PURE__ */ g(r, {
476
489
  width: "100%",
477
490
  height: 260,
478
- children: /* @__PURE__ */ v(ne, {
491
+ children: /* @__PURE__ */ _(l, {
479
492
  data: $,
480
493
  children: [
481
- /* @__PURE__ */ _(o, {
494
+ /* @__PURE__ */ g(a, {
482
495
  strokeDasharray: "3 3",
483
496
  opacity: .2
484
497
  }),
485
- /* @__PURE__ */ _(l, {
498
+ /* @__PURE__ */ g(s, {
486
499
  dataKey: "day",
487
500
  tick: { fontSize: 11 }
488
501
  }),
489
- /* @__PURE__ */ _(u, {
502
+ /* @__PURE__ */ g(c, {
490
503
  tick: { fontSize: 11 },
491
504
  allowDecimals: !1
492
505
  }),
493
- /* @__PURE__ */ _(n, {}),
494
- /* @__PURE__ */ _(t, { wrapperStyle: { fontSize: 12 } }),
495
- Ne.map((e) => /* @__PURE__ */ _(c, {
506
+ /* @__PURE__ */ g(n, {}),
507
+ /* @__PURE__ */ g(t, { wrapperStyle: { fontSize: 12 } }),
508
+ Ue.map((e) => /* @__PURE__ */ g(te, {
496
509
  type: "monotone",
497
510
  dataKey: e,
498
511
  name: e.toLowerCase().replace("_", " "),
499
512
  stackId: "cfd",
500
- stroke: O[e] ?? "#a3a3a3",
501
- fill: O[e] ?? "#a3a3a3",
513
+ stroke: D[e] ?? "#a3a3a3",
514
+ fill: D[e] ?? "#a3a3a3",
502
515
  fillOpacity: .7
503
516
  }, e))
504
517
  ]
505
518
  })
506
- }) : /* @__PURE__ */ _("p", {
519
+ }) : /* @__PURE__ */ g("p", {
507
520
  className: "text-sm text-muted-foreground py-8 text-center",
508
- children: A("planmagnet.analytics.cfd.empty", "No work items found for this project")
521
+ children: k("planmagnet.analytics.cfd.empty", "No work items found for this project")
509
522
  }) })] }),
510
- /* @__PURE__ */ v("div", {
523
+ /* @__PURE__ */ _("div", {
511
524
  className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
512
- children: [/* @__PURE__ */ _(ie, {
513
- workspaceId: h,
514
- projectId: B
515
- }), /* @__PURE__ */ _(re, { workspaceId: h })]
525
+ children: [/* @__PURE__ */ g(se, {
526
+ workspaceId: m,
527
+ projectId: R
528
+ }), /* @__PURE__ */ g(oe, { workspaceId: m })]
516
529
  }),
517
- /* @__PURE__ */ v(y, { children: [/* @__PURE__ */ _(x, { children: /* @__PURE__ */ _(S, { children: A("planmagnet.analytics.projectHealth.title", "Project Health") }) }), /* @__PURE__ */ _(b, { children: /* @__PURE__ */ v("div", {
530
+ /* @__PURE__ */ _(v, { children: [/* @__PURE__ */ g(b, { children: /* @__PURE__ */ g(x, { children: k("planmagnet.analytics.projectHealth.title", "Project Health") }) }), /* @__PURE__ */ g(y, { children: /* @__PURE__ */ _("div", {
518
531
  className: "space-y-3",
519
532
  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", {
533
+ let t = Re(e.id), n = e.endDate && new Date(e.endDate) < /* @__PURE__ */ new Date() && t < 100 ? "at_risk" : t >= 75 ? "on_track" : "in_progress";
534
+ return /* @__PURE__ */ _("div", {
522
535
  className: "flex items-center gap-4",
523
536
  children: [
524
- /* @__PURE__ */ _("span", {
537
+ /* @__PURE__ */ g("span", {
525
538
  className: "text-sm font-medium w-40 truncate",
526
539
  children: e.name
527
540
  }),
528
- /* @__PURE__ */ _("div", {
541
+ /* @__PURE__ */ g("div", {
529
542
  className: "flex-1",
530
- children: /* @__PURE__ */ _("div", {
543
+ children: /* @__PURE__ */ g("div", {
531
544
  className: "w-full h-2 rounded-full bg-muted overflow-hidden",
532
- children: /* @__PURE__ */ _("div", {
545
+ children: /* @__PURE__ */ g("div", {
533
546
  className: `h-full rounded-full ${n === "at_risk" ? "bg-orange-400" : n === "on_track" ? "bg-green-400" : "bg-blue-400"}`,
534
547
  style: { width: `${t}%` }
535
548
  })
536
549
  })
537
550
  }),
538
- /* @__PURE__ */ v("span", {
551
+ /* @__PURE__ */ _("span", {
539
552
  className: "text-sm w-12 text-right",
540
553
  children: [t, "%"]
541
554
  }),
542
- /* @__PURE__ */ _(le, {
555
+ /* @__PURE__ */ g(pe, {
543
556
  variant: "outline",
544
557
  className: "capitalize text-xs w-20 justify-center",
545
558
  children: n.replace("_", " ")
546
559
  })
547
560
  ]
548
561
  }, e.id);
549
- }), L.filter((e) => e.status === "ACTIVE").length === 0 && /* @__PURE__ */ _("p", {
562
+ }), L.filter((e) => e.status === "ACTIVE").length === 0 && /* @__PURE__ */ g("p", {
550
563
  className: "text-sm text-muted-foreground text-center py-4",
551
- children: A("planmagnet.analytics.projectHealth.empty", "No active projects found")
564
+ children: k("planmagnet.analytics.projectHealth.empty", "No active projects found")
552
565
  })]
553
566
  }) })] })
554
567
  ]
555
568
  });
556
569
  }
557
570
  //#endregion
558
- export { A as AnalyticsAnalyticsPagePage };
571
+ export { k as AnalyticsAnalyticsPagePage };
559
572
 
560
573
  //# sourceMappingURL=AnalyticsAnalyticsPagePage.js.map