@burdenoff/microfe-planmagnet 2026.927.4 → 2026.927.6

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 (141) 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/board/ProjectBoard.d.ts +2 -0
  12. package/dist/planmagnet/board/ProjectBoard.d.ts.map +1 -1
  13. package/dist/planmagnet/board/ProjectBoard.js +492 -225
  14. package/dist/planmagnet/board/ProjectBoard.js.map +1 -1
  15. package/dist/planmagnet/controls/FeatureControls.d.ts.map +1 -1
  16. package/dist/planmagnet/controls/FeatureControls.js +142 -139
  17. package/dist/planmagnet/controls/FeatureControls.js.map +1 -1
  18. package/dist/planmagnet/controls/FeatureTriage.d.ts +21 -0
  19. package/dist/planmagnet/controls/FeatureTriage.d.ts.map +1 -0
  20. package/dist/planmagnet/controls/FeatureTriage.js +398 -0
  21. package/dist/planmagnet/controls/FeatureTriage.js.map +1 -0
  22. package/dist/planmagnet/controls/MilestoneControls.d.ts.map +1 -1
  23. package/dist/planmagnet/controls/MilestoneControls.js +76 -73
  24. package/dist/planmagnet/controls/MilestoneControls.js.map +1 -1
  25. package/dist/planmagnet/controls/ProjectControls.d.ts.map +1 -1
  26. package/dist/planmagnet/controls/ProjectControls.js +47 -44
  27. package/dist/planmagnet/controls/ProjectControls.js.map +1 -1
  28. package/dist/planmagnet/controls/ReleaseControls.d.ts.map +1 -1
  29. package/dist/planmagnet/controls/ReleaseControls.js +47 -44
  30. package/dist/planmagnet/controls/ReleaseControls.js.map +1 -1
  31. package/dist/planmagnet/controls/WorkItemControls.d.ts.map +1 -1
  32. package/dist/planmagnet/controls/WorkItemControls.js +68 -65
  33. package/dist/planmagnet/controls/WorkItemControls.js.map +1 -1
  34. package/dist/planmagnet/hooks/useCounts.d.ts +39 -0
  35. package/dist/planmagnet/hooks/useCounts.d.ts.map +1 -0
  36. package/dist/planmagnet/hooks/useCounts.js +209 -0
  37. package/dist/planmagnet/hooks/useCounts.js.map +1 -0
  38. package/dist/planmagnet/import/exportColumns.d.ts +52 -0
  39. package/dist/planmagnet/import/exportColumns.d.ts.map +1 -0
  40. package/dist/planmagnet/import/exportColumns.js +81 -0
  41. package/dist/planmagnet/import/exportColumns.js.map +1 -0
  42. package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.d.ts.map +1 -1
  43. package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.js +255 -242
  44. package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.js.map +1 -1
  45. package/dist/planmagnet/pages/DashboardDashboardPagePage.d.ts.map +1 -1
  46. package/dist/planmagnet/pages/DashboardDashboardPagePage.js +199 -160
  47. package/dist/planmagnet/pages/DashboardDashboardPagePage.js.map +1 -1
  48. package/dist/planmagnet/pages/DocsDocDetailPagePage.d.ts.map +1 -1
  49. package/dist/planmagnet/pages/DocsDocDetailPagePage.js +147 -144
  50. package/dist/planmagnet/pages/DocsDocDetailPagePage.js.map +1 -1
  51. package/dist/planmagnet/pages/GoalsGoalsPagePage.d.ts.map +1 -1
  52. package/dist/planmagnet/pages/GoalsGoalsPagePage.js +2 -7
  53. package/dist/planmagnet/pages/GoalsGoalsPagePage.js.map +1 -1
  54. package/dist/planmagnet/pages/GoalsObjectiveDetailPagePage.d.ts.map +1 -1
  55. package/dist/planmagnet/pages/GoalsObjectiveDetailPagePage.js +173 -173
  56. package/dist/planmagnet/pages/GoalsObjectiveDetailPagePage.js.map +1 -1
  57. package/dist/planmagnet/pages/ProductsEditProductPagePage.d.ts.map +1 -1
  58. package/dist/planmagnet/pages/ProductsEditProductPagePage.js +120 -117
  59. package/dist/planmagnet/pages/ProductsEditProductPagePage.js.map +1 -1
  60. package/dist/planmagnet/pages/ProductsFeatureAnalyticsPagePage.d.ts.map +1 -1
  61. package/dist/planmagnet/pages/ProductsFeatureAnalyticsPagePage.js +97 -117
  62. package/dist/planmagnet/pages/ProductsFeatureAnalyticsPagePage.js.map +1 -1
  63. package/dist/planmagnet/pages/ProductsFeatureDetailPagePage.d.ts.map +1 -1
  64. package/dist/planmagnet/pages/ProductsFeatureDetailPagePage.js +168 -103
  65. package/dist/planmagnet/pages/ProductsFeatureDetailPagePage.js.map +1 -1
  66. package/dist/planmagnet/pages/ProductsFeaturesPagePage.d.ts.map +1 -1
  67. package/dist/planmagnet/pages/ProductsFeaturesPagePage.js +117 -103
  68. package/dist/planmagnet/pages/ProductsFeaturesPagePage.js.map +1 -1
  69. package/dist/planmagnet/pages/ProductsProductDetailPagePage.d.ts.map +1 -1
  70. package/dist/planmagnet/pages/ProductsProductDetailPagePage.js +4 -8
  71. package/dist/planmagnet/pages/ProductsProductDetailPagePage.js.map +1 -1
  72. package/dist/planmagnet/pages/ProductsProductsPagePage.d.ts.map +1 -1
  73. package/dist/planmagnet/pages/ProductsProductsPagePage.js +85 -90
  74. package/dist/planmagnet/pages/ProductsProductsPagePage.js.map +1 -1
  75. package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.d.ts.map +1 -1
  76. package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.js +12 -2
  77. package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.js.map +1 -1
  78. package/dist/planmagnet/pages/ProductsReleasesPagePage.d.ts.map +1 -1
  79. package/dist/planmagnet/pages/ProductsReleasesPagePage.js +2 -2
  80. package/dist/planmagnet/pages/ProductsReleasesPagePage.js.map +1 -1
  81. package/dist/planmagnet/pages/ProductsRoadmapAnalyticsPagePage.d.ts.map +1 -1
  82. package/dist/planmagnet/pages/ProductsRoadmapAnalyticsPagePage.js +48 -71
  83. package/dist/planmagnet/pages/ProductsRoadmapAnalyticsPagePage.js.map +1 -1
  84. package/dist/planmagnet/pages/ProductsRoadmapsPagePage.d.ts.map +1 -1
  85. package/dist/planmagnet/pages/ProductsRoadmapsPagePage.js +17 -13
  86. package/dist/planmagnet/pages/ProductsRoadmapsPagePage.js.map +1 -1
  87. package/dist/planmagnet/pages/ProjectsActiveProjectsPagePage.d.ts.map +1 -1
  88. package/dist/planmagnet/pages/ProjectsActiveProjectsPagePage.js +1 -1
  89. package/dist/planmagnet/pages/ProjectsActiveProjectsPagePage.js.map +1 -1
  90. package/dist/planmagnet/pages/ProjectsEditProjectPagePage.js +6 -6
  91. package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.d.ts.map +1 -1
  92. package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.js +11 -8
  93. package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.js.map +1 -1
  94. package/dist/planmagnet/pages/ProjectsPlanningEditPagePage.js +4 -4
  95. package/dist/planmagnet/pages/ProjectsPlanningPagePage.d.ts.map +1 -1
  96. package/dist/planmagnet/pages/ProjectsPlanningPagePage.js +1 -1
  97. package/dist/planmagnet/pages/ProjectsPlanningPagePage.js.map +1 -1
  98. package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.d.ts.map +1 -1
  99. package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.js +152 -139
  100. package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.js.map +1 -1
  101. package/dist/planmagnet/pages/ProjectsProjectsPagePage.d.ts.map +1 -1
  102. package/dist/planmagnet/pages/ProjectsProjectsPagePage.js +75 -74
  103. package/dist/planmagnet/pages/ProjectsProjectsPagePage.js.map +1 -1
  104. package/dist/planmagnet/pages/ReportsReportsPagePage.d.ts +7 -0
  105. package/dist/planmagnet/pages/ReportsReportsPagePage.d.ts.map +1 -1
  106. package/dist/planmagnet/pages/ReportsReportsPagePage.js +39 -201
  107. package/dist/planmagnet/pages/ReportsReportsPagePage.js.map +1 -1
  108. package/dist/planmagnet/pages/SprintsStartSprintPagePage.d.ts.map +1 -1
  109. package/dist/planmagnet/pages/SprintsStartSprintPagePage.js +118 -99
  110. package/dist/planmagnet/pages/SprintsStartSprintPagePage.js.map +1 -1
  111. package/dist/planmagnet/pages/TasksImportPagePage.d.ts +2 -0
  112. package/dist/planmagnet/pages/TasksImportPagePage.d.ts.map +1 -0
  113. package/dist/planmagnet/pages/TasksImportPagePage.js +309 -0
  114. package/dist/planmagnet/pages/TasksImportPagePage.js.map +1 -0
  115. package/dist/planmagnet/pages/TasksTasksPagePage.d.ts.map +1 -1
  116. package/dist/planmagnet/pages/TasksTasksPagePage.js +110 -104
  117. package/dist/planmagnet/pages/TasksTasksPagePage.js.map +1 -1
  118. package/dist/planmagnet/pages/TeamTeamPagePage.d.ts.map +1 -1
  119. package/dist/planmagnet/pages/TeamTeamPagePage.js +99 -177
  120. package/dist/planmagnet/pages/TeamTeamPagePage.js.map +1 -1
  121. package/dist/planmagnet/pages/analytics/DeliveryHealthCards.d.ts.map +1 -1
  122. package/dist/planmagnet/pages/analytics/DeliveryHealthCards.js +8 -4
  123. package/dist/planmagnet/pages/analytics/DeliveryHealthCards.js.map +1 -1
  124. package/dist/planmagnet/releases/ReleaseWorkItemsCard.d.ts.map +1 -1
  125. package/dist/planmagnet/releases/ReleaseWorkItemsCard.js +10 -4
  126. package/dist/planmagnet/releases/ReleaseWorkItemsCard.js.map +1 -1
  127. package/dist/planmagnet/roadmaps/RoadmapControls.d.ts.map +1 -1
  128. package/dist/planmagnet/roadmaps/RoadmapControls.js +151 -138
  129. package/dist/planmagnet/roadmaps/RoadmapControls.js.map +1 -1
  130. package/dist/planmagnet/sprints/SprintControls.d.ts.map +1 -1
  131. package/dist/planmagnet/sprints/SprintControls.js +32 -30
  132. package/dist/planmagnet/sprints/SprintControls.js.map +1 -1
  133. package/dist/planmagnet/utils/mutationResult.d.ts +10 -0
  134. package/dist/planmagnet/utils/mutationResult.d.ts.map +1 -1
  135. package/dist/planmagnet/utils/mutationResult.js +2 -1
  136. package/dist/planmagnet/utils/mutationResult.js.map +1 -1
  137. package/dist/planmagnet/utils/rowNavigation.d.ts +2 -0
  138. package/dist/planmagnet/utils/rowNavigation.d.ts.map +1 -1
  139. package/dist/planmagnet/utils/rowNavigation.js +9 -8
  140. package/dist/planmagnet/utils/rowNavigation.js.map +1 -1
  141. package/package.json +1 -1
@@ -1,16 +1,16 @@
1
1
  import { usePlanMagnet as e, usePlanMagnetNavigate as t } from "../providers/PlanMagnetProvider.js";
2
2
  import { PersonName as n } from "../people/People.js";
3
- import { throwOnError as r } from "../utils/mutationResult.js";
4
- import { ConfirmButton as i } from "../controls/ConfirmButton.js";
5
- import { KeyResultWorkItems as a, ObjectiveHeaderControls as o } from "../controls/ObjectiveControls.js";
6
- import { useState as s } from "react";
7
- import { ArrowLeft as c, Calendar as l, Flag as u, Plus as d, Trash2 as f, User as p } from "lucide-react";
8
- import { gql as m } from "@apollo/client";
9
- import { useMutation as h, useQuery as g } from "@apollo/client/react";
10
- import { jsx as _, jsxs as v } from "react/jsx-runtime";
11
- import { Badge as y, Button as b, Card as x, CardContent as S, CardHeader as C, CardTitle as w, Input as T } from "@burdenoff/fe-libs/ui";
3
+ import { LEAVES_PAGE_CONTEXT as r, throwOnError as i } from "../utils/mutationResult.js";
4
+ import { ConfirmButton as a } from "../controls/ConfirmButton.js";
5
+ import { KeyResultWorkItems as o, ObjectiveHeaderControls as s } from "../controls/ObjectiveControls.js";
6
+ import { useState as c } from "react";
7
+ import { ArrowLeft as l, Calendar as u, Flag as d, Plus as f, Trash2 as p, User as m } from "lucide-react";
8
+ import { gql as h } from "@apollo/client";
9
+ import { useMutation as g, useQuery as _ } from "@apollo/client/react";
10
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
11
+ import { Badge as b, Button as x, Card as S, CardContent as C, CardHeader as w, CardTitle as T, Input as E } from "@burdenoff/fe-libs/ui";
12
12
  //#region src/planmagnet/pages/GoalsObjectiveDetailPagePage.tsx
13
- var E = m`
13
+ var D = h`
14
14
  query GetObjectiveDetail($id: ID!) {
15
15
  planmagnetObjective(id: $id) {
16
16
  id
@@ -50,13 +50,13 @@ var E = m`
50
50
  }
51
51
  }
52
52
  }
53
- `, D = m`
53
+ `, O = h`
54
54
  mutation CreateKeyResult($input: PlanmagnetCreateKeyResultInput!) {
55
55
  planmagnetCreateKeyResult(input: $input) {
56
56
  id
57
57
  }
58
58
  }
59
- `, O = m`
59
+ `, k = h`
60
60
  mutation UpdateKeyResult($id: ID!, $input: PlanmagnetUpdateKeyResultInput!) {
61
61
  planmagnetUpdateKeyResult(id: $id, input: $input) {
62
62
  id
@@ -64,95 +64,95 @@ var E = m`
64
64
  status
65
65
  }
66
66
  }
67
- `, k = m`
67
+ `, A = h`
68
68
  mutation DeleteKeyResult($id: ID!) {
69
69
  planmagnetDeleteKeyResult(id: $id)
70
70
  }
71
- `, A = m`
71
+ `, j = h`
72
72
  mutation DeleteObjective($id: ID!) {
73
73
  planmagnetDeleteObjective(id: $id)
74
74
  }
75
- `, j = {
75
+ `, M = {
76
76
  NOT_STARTED: "bg-gray-100 text-gray-800",
77
77
  IN_PROGRESS: "bg-blue-100 text-blue-800",
78
78
  AT_RISK: "bg-orange-100 text-orange-800",
79
79
  COMPLETED: "bg-green-100 text-green-800"
80
80
  };
81
- function M({ progress: e }) {
82
- return /* @__PURE__ */ _("div", {
81
+ function N({ progress: e }) {
82
+ return /* @__PURE__ */ v("div", {
83
83
  className: "h-2 w-full rounded-full bg-muted overflow-hidden",
84
- children: /* @__PURE__ */ _("div", {
84
+ children: /* @__PURE__ */ v("div", {
85
85
  className: "h-full rounded-full bg-primary transition-all",
86
86
  style: { width: `${Math.max(0, Math.min(100, Math.round(e)))}%` }
87
87
  })
88
88
  });
89
89
  }
90
- function N({ kr: e, onUpdated: t, onDeleted: n }) {
91
- let [o, c] = s(String(e.currentValue)), [l, { loading: u }] = h(O), [d, { loading: p }] = h(k), [m, g] = s(null), y = async () => {
92
- let n = e.metricType === "BOOLEAN" ? +(o === "1") : Number(o);
90
+ function P({ kr: e, onUpdated: t, onDeleted: n }) {
91
+ let [r, s] = c(String(e.currentValue)), [l, { loading: u }] = g(k), [d, { loading: f }] = g(A), [m, h] = c(null), _ = async () => {
92
+ let n = e.metricType === "BOOLEAN" ? +(r === "1") : Number(r);
93
93
  if (!Number.isNaN(n)) {
94
- g(null);
94
+ h(null);
95
95
  try {
96
- await r(l({ variables: {
96
+ await i(l({ variables: {
97
97
  id: e.id,
98
98
  input: { currentValue: n }
99
99
  } })), t();
100
100
  } catch (e) {
101
- g(e instanceof Error ? e.message : "The progress could not be saved.");
101
+ h(e instanceof Error ? e.message : "The progress could not be saved.");
102
102
  }
103
103
  }
104
- }, x = async () => {
105
- g(null);
104
+ }, b = async () => {
105
+ h(null);
106
106
  try {
107
- await r(d({ variables: { id: e.id } })), n();
107
+ await i(d({ variables: { id: e.id } })), n();
108
108
  } catch (e) {
109
- g(e instanceof Error ? e.message : "The key result could not be deleted.");
109
+ h(e instanceof Error ? e.message : "The key result could not be deleted.");
110
110
  }
111
111
  };
112
- return /* @__PURE__ */ v("div", {
112
+ return /* @__PURE__ */ y("div", {
113
113
  className: "rounded-md border border-input p-4 space-y-3",
114
114
  children: [
115
- m && /* @__PURE__ */ _("p", {
115
+ m && /* @__PURE__ */ v("p", {
116
116
  role: "alert",
117
117
  className: "text-sm text-destructive",
118
118
  children: m
119
119
  }),
120
- /* @__PURE__ */ v("div", {
120
+ /* @__PURE__ */ y("div", {
121
121
  className: "flex items-start justify-between gap-3",
122
- children: [/* @__PURE__ */ v("div", {
122
+ children: [/* @__PURE__ */ y("div", {
123
123
  className: "min-w-0",
124
- children: [/* @__PURE__ */ _("p", {
124
+ children: [/* @__PURE__ */ v("p", {
125
125
  className: "text-sm font-medium",
126
126
  children: e.title
127
- }), e.description && /* @__PURE__ */ _("p", {
127
+ }), e.description && /* @__PURE__ */ v("p", {
128
128
  className: "text-xs text-muted-foreground mt-0.5",
129
129
  children: e.description
130
130
  })]
131
- }), /* @__PURE__ */ v("div", {
131
+ }), /* @__PURE__ */ y("div", {
132
132
  className: "flex items-center gap-2 shrink-0",
133
- children: [/* @__PURE__ */ _("span", {
134
- className: `text-xs px-2 py-0.5 rounded-full capitalize ${j[e.status] ?? ""}`,
133
+ children: [/* @__PURE__ */ v("span", {
134
+ className: `text-xs px-2 py-0.5 rounded-full capitalize ${M[e.status] ?? ""}`,
135
135
  children: e.status.toLowerCase().replace("_", " ")
136
- }), /* @__PURE__ */ _(i, {
136
+ }), /* @__PURE__ */ v(a, {
137
137
  label: "",
138
138
  ariaLabel: `Delete ${e.title}`,
139
139
  variant: "outline",
140
- icon: /* @__PURE__ */ _(f, { className: "h-4 w-4" }),
140
+ icon: /* @__PURE__ */ v(p, { className: "h-4 w-4" }),
141
141
  title: `Delete "${e.title}"?`,
142
142
  description: "The key result and its progress are deleted. This cannot be undone here.",
143
143
  confirmLabel: "Delete key result",
144
144
  destructive: !0,
145
- disabled: p,
146
- onConfirm: () => void x()
145
+ disabled: f,
146
+ onConfirm: () => void b()
147
147
  })]
148
148
  })]
149
149
  }),
150
- /* @__PURE__ */ _(M, { progress: e.progress }),
151
- /* @__PURE__ */ v("div", {
150
+ /* @__PURE__ */ v(N, { progress: e.progress }),
151
+ /* @__PURE__ */ y("div", {
152
152
  className: "flex items-center justify-between text-xs text-muted-foreground",
153
- children: [/* @__PURE__ */ _("span", { children: e.metricType === "BOOLEAN" ? e.currentValue > 0 ? "Done" : "Not done" : `${e.currentValue}${e.unit ? ` ${e.unit}` : ""} of ${e.targetValue}${e.unit ? ` ${e.unit}` : ""}` }), /* @__PURE__ */ v("span", { children: [Math.round(e.progress), "%"] })]
153
+ children: [/* @__PURE__ */ v("span", { children: e.metricType === "BOOLEAN" ? e.currentValue > 0 ? "Done" : "Not done" : `${e.currentValue}${e.unit ? ` ${e.unit}` : ""} of ${e.targetValue}${e.unit ? ` ${e.unit}` : ""}` }), /* @__PURE__ */ y("span", { children: [Math.round(e.progress), "%"] })]
154
154
  }),
155
- e.linkedWorkItemRollup.totalLinked > 0 && /* @__PURE__ */ v("p", {
155
+ e.linkedWorkItemRollup.totalLinked > 0 && /* @__PURE__ */ y("p", {
156
156
  className: "text-xs text-muted-foreground",
157
157
  children: [
158
158
  e.linkedWorkItemRollup.doneCount,
@@ -163,229 +163,229 @@ function N({ kr: e, onUpdated: t, onDeleted: n }) {
163
163
  "%) — informational, update progress above manually"
164
164
  ]
165
165
  }),
166
- /* @__PURE__ */ _(a, {
166
+ /* @__PURE__ */ v(o, {
167
167
  keyResultId: e.id,
168
168
  keyResultTitle: e.title,
169
169
  linked: e.linkedWorkItems ?? []
170
170
  }),
171
- /* @__PURE__ */ v("div", {
171
+ /* @__PURE__ */ y("div", {
172
172
  className: "flex items-center gap-2",
173
- children: [e.metricType === "BOOLEAN" ? /* @__PURE__ */ v("select", {
173
+ children: [e.metricType === "BOOLEAN" ? /* @__PURE__ */ y("select", {
174
174
  className: "rounded-md border border-input bg-background px-3 py-1.5 text-sm",
175
- value: o,
176
- onChange: (e) => c(e.target.value),
177
- children: [/* @__PURE__ */ _("option", {
175
+ value: r,
176
+ onChange: (e) => s(e.target.value),
177
+ children: [/* @__PURE__ */ v("option", {
178
178
  value: "0",
179
179
  children: "Not done"
180
- }), /* @__PURE__ */ _("option", {
180
+ }), /* @__PURE__ */ v("option", {
181
181
  value: "1",
182
182
  children: "Done"
183
183
  })]
184
- }) : /* @__PURE__ */ _(T, {
184
+ }) : /* @__PURE__ */ v(E, {
185
185
  type: "number",
186
- value: o,
187
- onChange: (e) => c(e.target.value),
186
+ value: r,
187
+ onChange: (e) => s(e.target.value),
188
188
  className: "w-32"
189
- }), /* @__PURE__ */ _(b, {
189
+ }), /* @__PURE__ */ v(x, {
190
190
  size: "sm",
191
191
  variant: "outline",
192
192
  disabled: u,
193
- onClick: y,
193
+ onClick: _,
194
194
  children: u ? "Saving..." : "Update progress"
195
195
  })]
196
196
  })
197
197
  ]
198
198
  });
199
199
  }
200
- function P() {
201
- let { workspaceId: a } = e(), m = t(), O = new URLSearchParams(window.location.search).get("objectiveId") ?? "", [k, j] = s(!1), [P, F] = s({
200
+ function F() {
201
+ let { workspaceId: o } = e(), h = t(), k = new URLSearchParams(window.location.search).get("objectiveId") ?? "", [A, M] = c(!1), [F, I] = c({
202
202
  title: "",
203
203
  metricType: "NUMERIC",
204
204
  targetValue: "100",
205
205
  unit: ""
206
- }), { data: I, loading: L, error: R, refetch: z } = g(E, {
207
- variables: { id: O },
208
- skip: !a || !O
209
- }), [B, { loading: V }] = h(D), [H, { loading: U }] = h(A), [W, G] = s(null);
210
- if (L && !I) return /* @__PURE__ */ _("div", {
206
+ }), { data: L, loading: R, error: z, refetch: B } = _(D, {
207
+ variables: { id: k },
208
+ skip: !o || !k
209
+ }), [V, { loading: H }] = g(O), [U, { loading: W }] = g(j, { context: r }), [G, K] = c(null);
210
+ if (R && !L) return /* @__PURE__ */ v("div", {
211
211
  className: "flex items-center justify-center p-12",
212
- children: /* @__PURE__ */ _("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
212
+ children: /* @__PURE__ */ v("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
213
213
  });
214
- if (R) return /* @__PURE__ */ v("div", {
214
+ if (z) return /* @__PURE__ */ y("div", {
215
215
  className: "p-6 text-red-500",
216
- children: ["Error: ", R.message]
216
+ children: ["Error: ", z.message]
217
217
  });
218
- let K = I?.planmagnetObjective;
219
- if (!K) return /* @__PURE__ */ _("div", {
218
+ let q = L?.planmagnetObjective;
219
+ if (!q) return /* @__PURE__ */ v("div", {
220
220
  className: "p-6 text-muted-foreground",
221
221
  children: "Objective not found."
222
222
  });
223
- let q = async () => {
224
- if (!P.title.trim() || !O) return;
225
- let e = Number(P.metricType === "BOOLEAN" ? 1 : P.targetValue);
223
+ let J = async () => {
224
+ if (!F.title.trim() || !k) return;
225
+ let e = Number(F.metricType === "BOOLEAN" ? 1 : F.targetValue);
226
226
  if (!Number.isNaN(e)) {
227
- G(null);
227
+ K(null);
228
228
  try {
229
- await r(B({ variables: { input: {
230
- objectiveId: O,
231
- title: P.title.trim(),
232
- metricType: P.metricType,
229
+ await i(V({ variables: { input: {
230
+ objectiveId: k,
231
+ title: F.title.trim(),
232
+ metricType: F.metricType,
233
233
  targetValue: e,
234
- unit: P.unit.trim() || void 0
234
+ unit: F.unit.trim() || void 0
235
235
  } } }));
236
236
  } catch (e) {
237
- G(e instanceof Error ? e.message : "The key result could not be added.");
237
+ K(e instanceof Error ? e.message : "The key result could not be added.");
238
238
  return;
239
239
  }
240
- F({
240
+ I({
241
241
  title: "",
242
242
  metricType: "NUMERIC",
243
243
  targetValue: "100",
244
244
  unit: ""
245
- }), j(!1), z();
245
+ }), M(!1), B();
246
246
  }
247
- }, J = async () => {
248
- G(null);
247
+ }, Y = async () => {
248
+ K(null);
249
249
  try {
250
- await r(H({ variables: { id: O } }));
250
+ await i(U({ variables: { id: k } }));
251
251
  } catch (e) {
252
- G(e instanceof Error ? e.message : "The objective could not be deleted.");
252
+ K(e instanceof Error ? e.message : "The objective could not be deleted.");
253
253
  return;
254
254
  }
255
- m("/goals/goals-page");
255
+ h("/goals/goals-page");
256
256
  };
257
- return /* @__PURE__ */ v("div", {
257
+ return /* @__PURE__ */ y("div", {
258
258
  className: "space-y-6 p-6",
259
259
  children: [
260
- W && /* @__PURE__ */ _("p", {
260
+ G && /* @__PURE__ */ v("p", {
261
261
  role: "alert",
262
262
  className: "text-sm text-destructive",
263
- children: W
263
+ children: G
264
264
  }),
265
- /* @__PURE__ */ v("div", {
265
+ /* @__PURE__ */ y("div", {
266
266
  className: "flex items-center justify-between",
267
- children: [/* @__PURE__ */ v("div", {
267
+ children: [/* @__PURE__ */ y("div", {
268
268
  className: "flex items-center gap-3",
269
269
  children: [
270
- /* @__PURE__ */ _(b, {
270
+ /* @__PURE__ */ v(x, {
271
271
  variant: "ghost",
272
272
  size: "icon",
273
- onClick: () => m("/goals/goals-page"),
274
- children: /* @__PURE__ */ _(c, { className: "h-4 w-4" })
273
+ onClick: () => h("/goals/goals-page"),
274
+ children: /* @__PURE__ */ v(l, { className: "h-4 w-4" })
275
275
  }),
276
- /* @__PURE__ */ _(u, { className: "h-6 w-6 text-primary" }),
277
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("h1", {
276
+ /* @__PURE__ */ v(d, { className: "h-6 w-6 text-primary" }),
277
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h1", {
278
278
  className: "text-2xl font-semibold",
279
- children: K.title
280
- }), /* @__PURE__ */ _("p", {
279
+ children: q.title
280
+ }), /* @__PURE__ */ v("p", {
281
281
  className: "text-sm text-muted-foreground",
282
- children: K.periodLabel
282
+ children: q.periodLabel
283
283
  })] })
284
284
  ]
285
- }), /* @__PURE__ */ v("div", {
285
+ }), /* @__PURE__ */ y("div", {
286
286
  className: "flex items-start gap-2",
287
- children: [/* @__PURE__ */ _(o, { objective: K }), /* @__PURE__ */ _(i, {
287
+ children: [/* @__PURE__ */ v(s, { objective: q }), /* @__PURE__ */ v(a, {
288
288
  label: "Delete",
289
289
  variant: "outline",
290
- icon: /* @__PURE__ */ _(f, { className: "mr-1 h-4 w-4" }),
291
- title: `Delete "${K.title}"?`,
290
+ icon: /* @__PURE__ */ v(p, { className: "mr-1 h-4 w-4" }),
291
+ title: `Delete "${q.title}"?`,
292
292
  description: "The objective and its key results are deleted. This cannot be undone here.",
293
293
  confirmLabel: "Delete objective",
294
294
  destructive: !0,
295
- disabled: U,
296
- onConfirm: () => void J()
295
+ disabled: W,
296
+ onConfirm: () => void Y()
297
297
  })]
298
298
  })]
299
299
  }),
300
- /* @__PURE__ */ v("div", {
300
+ /* @__PURE__ */ y("div", {
301
301
  className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
302
- children: [/* @__PURE__ */ v("div", {
302
+ children: [/* @__PURE__ */ y("div", {
303
303
  className: "lg:col-span-2 space-y-6",
304
- children: [/* @__PURE__ */ v(x, { children: [/* @__PURE__ */ v(C, {
304
+ children: [/* @__PURE__ */ y(S, { children: [/* @__PURE__ */ y(w, {
305
305
  className: "flex flex-row items-center justify-between space-y-0",
306
- children: [/* @__PURE__ */ _(w, { children: "Overview" }), /* @__PURE__ */ v(y, {
306
+ children: [/* @__PURE__ */ v(T, { children: "Overview" }), /* @__PURE__ */ y(b, {
307
307
  variant: "outline",
308
- children: [Math.round(K.progress), "% complete"]
308
+ children: [Math.round(q.progress), "% complete"]
309
309
  })]
310
- }), /* @__PURE__ */ v(S, {
310
+ }), /* @__PURE__ */ y(C, {
311
311
  className: "space-y-4",
312
- children: [/* @__PURE__ */ _("p", {
312
+ children: [/* @__PURE__ */ v("p", {
313
313
  className: "text-sm",
314
- children: K.description ?? "No description provided."
315
- }), /* @__PURE__ */ _(M, { progress: K.progress })]
316
- })] }), /* @__PURE__ */ v(x, { children: [/* @__PURE__ */ v(C, {
314
+ children: q.description ?? "No description provided."
315
+ }), /* @__PURE__ */ v(N, { progress: q.progress })]
316
+ })] }), /* @__PURE__ */ y(S, { children: [/* @__PURE__ */ y(w, {
317
317
  className: "flex flex-row items-center justify-between space-y-0",
318
- children: [/* @__PURE__ */ _(w, { children: "Key Results" }), !k && /* @__PURE__ */ v(b, {
318
+ children: [/* @__PURE__ */ v(T, { children: "Key Results" }), !A && /* @__PURE__ */ y(x, {
319
319
  size: "sm",
320
320
  variant: "outline",
321
- onClick: () => j(!0),
322
- children: [/* @__PURE__ */ _(d, { className: "mr-1 h-4 w-4" }), "Add Key Result"]
321
+ onClick: () => M(!0),
322
+ children: [/* @__PURE__ */ v(f, { className: "mr-1 h-4 w-4" }), "Add Key Result"]
323
323
  })]
324
- }), /* @__PURE__ */ v(S, {
324
+ }), /* @__PURE__ */ y(C, {
325
325
  className: "space-y-4",
326
326
  children: [
327
- k && /* @__PURE__ */ v("div", {
327
+ A && /* @__PURE__ */ y("div", {
328
328
  className: "space-y-3 rounded-md border border-input p-3",
329
329
  children: [
330
- /* @__PURE__ */ _(T, {
330
+ /* @__PURE__ */ v(E, {
331
331
  placeholder: "Key result title, e.g. Sign 10 new enterprise customers",
332
- value: P.title,
333
- onChange: (e) => F({
334
- ...P,
332
+ value: F.title,
333
+ onChange: (e) => I({
334
+ ...F,
335
335
  title: e.target.value
336
336
  })
337
337
  }),
338
- /* @__PURE__ */ v("div", {
338
+ /* @__PURE__ */ y("div", {
339
339
  className: "grid grid-cols-3 gap-3",
340
340
  children: [
341
- /* @__PURE__ */ v("select", {
341
+ /* @__PURE__ */ y("select", {
342
342
  className: "rounded-md border border-input bg-background px-3 py-2 text-sm",
343
- value: P.metricType,
344
- onChange: (e) => F({
345
- ...P,
343
+ value: F.metricType,
344
+ onChange: (e) => I({
345
+ ...F,
346
346
  metricType: e.target.value
347
347
  }),
348
348
  children: [
349
- /* @__PURE__ */ _("option", {
349
+ /* @__PURE__ */ v("option", {
350
350
  value: "NUMERIC",
351
351
  children: "Numeric"
352
352
  }),
353
- /* @__PURE__ */ _("option", {
353
+ /* @__PURE__ */ v("option", {
354
354
  value: "PERCENTAGE",
355
355
  children: "Percentage"
356
356
  }),
357
- /* @__PURE__ */ _("option", {
357
+ /* @__PURE__ */ v("option", {
358
358
  value: "BOOLEAN",
359
359
  children: "Yes / No"
360
360
  })
361
361
  ]
362
362
  }),
363
- P.metricType !== "BOOLEAN" && /* @__PURE__ */ _(T, {
363
+ F.metricType !== "BOOLEAN" && /* @__PURE__ */ v(E, {
364
364
  type: "number",
365
365
  placeholder: "Target value",
366
- value: P.targetValue,
367
- onChange: (e) => F({
368
- ...P,
366
+ value: F.targetValue,
367
+ onChange: (e) => I({
368
+ ...F,
369
369
  targetValue: e.target.value
370
370
  })
371
371
  }),
372
- P.metricType === "NUMERIC" && /* @__PURE__ */ _(T, {
372
+ F.metricType === "NUMERIC" && /* @__PURE__ */ v(E, {
373
373
  placeholder: "Unit (optional)",
374
- value: P.unit,
375
- onChange: (e) => F({
376
- ...P,
374
+ value: F.unit,
375
+ onChange: (e) => I({
376
+ ...F,
377
377
  unit: e.target.value
378
378
  })
379
379
  })
380
380
  ]
381
381
  }),
382
- /* @__PURE__ */ v("div", {
382
+ /* @__PURE__ */ y("div", {
383
383
  className: "flex gap-2 justify-end",
384
- children: [/* @__PURE__ */ _(b, {
384
+ children: [/* @__PURE__ */ v(x, {
385
385
  size: "sm",
386
386
  variant: "ghost",
387
387
  onClick: () => {
388
- j(!1), F({
388
+ M(!1), I({
389
389
  title: "",
390
390
  metricType: "NUMERIC",
391
391
  targetValue: "100",
@@ -393,82 +393,82 @@ function P() {
393
393
  });
394
394
  },
395
395
  children: "Cancel"
396
- }), /* @__PURE__ */ _(b, {
396
+ }), /* @__PURE__ */ v(x, {
397
397
  size: "sm",
398
- disabled: V || !P.title.trim(),
399
- onClick: q,
400
- children: V ? "Adding..." : "Add Key Result"
398
+ disabled: H || !F.title.trim(),
399
+ onClick: J,
400
+ children: H ? "Adding..." : "Add Key Result"
401
401
  })]
402
402
  })
403
403
  ]
404
404
  }),
405
- K.keyResults.length === 0 && !k && /* @__PURE__ */ _("p", {
405
+ q.keyResults.length === 0 && !A && /* @__PURE__ */ v("p", {
406
406
  className: "text-sm text-muted-foreground",
407
407
  children: "No key results yet. Add one to make this objective measurable."
408
408
  }),
409
- K.keyResults.map((e) => /* @__PURE__ */ _(N, {
409
+ q.keyResults.map((e) => /* @__PURE__ */ v(P, {
410
410
  kr: e,
411
- onUpdated: () => void z(),
412
- onDeleted: () => void z()
411
+ onUpdated: () => void B(),
412
+ onDeleted: () => void B()
413
413
  }, e.id))
414
414
  ]
415
415
  })] })]
416
- }), /* @__PURE__ */ v(x, { children: [/* @__PURE__ */ _(C, { children: /* @__PURE__ */ _(w, { children: "Details" }) }), /* @__PURE__ */ v(S, {
416
+ }), /* @__PURE__ */ y(S, { children: [/* @__PURE__ */ v(w, { children: /* @__PURE__ */ v(T, { children: "Details" }) }), /* @__PURE__ */ y(C, {
417
417
  className: "space-y-3 text-sm",
418
418
  children: [
419
- /* @__PURE__ */ v("div", {
419
+ /* @__PURE__ */ y("div", {
420
420
  className: "flex items-center gap-2",
421
421
  children: [
422
- /* @__PURE__ */ _(p, { className: "h-4 w-4 text-muted-foreground" }),
423
- /* @__PURE__ */ _("span", {
422
+ /* @__PURE__ */ v(m, { className: "h-4 w-4 text-muted-foreground" }),
423
+ /* @__PURE__ */ v("span", {
424
424
  className: "text-muted-foreground",
425
425
  children: "Owner:"
426
426
  }),
427
- /* @__PURE__ */ _("span", {
427
+ /* @__PURE__ */ v("span", {
428
428
  className: "font-medium",
429
- children: /* @__PURE__ */ _(n, { id: K.ownerId })
429
+ children: /* @__PURE__ */ v(n, { id: q.ownerId })
430
430
  })
431
431
  ]
432
432
  }),
433
- /* @__PURE__ */ v("div", {
433
+ /* @__PURE__ */ y("div", {
434
434
  className: "flex items-center gap-2",
435
435
  children: [
436
- /* @__PURE__ */ _(l, { className: "h-4 w-4 text-muted-foreground" }),
437
- /* @__PURE__ */ _("span", {
436
+ /* @__PURE__ */ v(u, { className: "h-4 w-4 text-muted-foreground" }),
437
+ /* @__PURE__ */ v("span", {
438
438
  className: "text-muted-foreground",
439
439
  children: "Period:"
440
440
  }),
441
- /* @__PURE__ */ _("span", {
441
+ /* @__PURE__ */ v("span", {
442
442
  className: "font-medium",
443
- children: K.periodLabel
443
+ children: q.periodLabel
444
444
  })
445
445
  ]
446
446
  }),
447
- K.endDate && /* @__PURE__ */ v("div", {
447
+ q.endDate && /* @__PURE__ */ y("div", {
448
448
  className: "flex items-center gap-2",
449
449
  children: [
450
- /* @__PURE__ */ _(l, { className: "h-4 w-4 text-muted-foreground" }),
451
- /* @__PURE__ */ _("span", {
450
+ /* @__PURE__ */ v(u, { className: "h-4 w-4 text-muted-foreground" }),
451
+ /* @__PURE__ */ v("span", {
452
452
  className: "text-muted-foreground",
453
453
  children: "Target end:"
454
454
  }),
455
- /* @__PURE__ */ _("span", {
455
+ /* @__PURE__ */ v("span", {
456
456
  className: "font-medium",
457
- children: new Date(K.endDate).toLocaleDateString()
457
+ children: new Date(q.endDate).toLocaleDateString()
458
458
  })
459
459
  ]
460
460
  }),
461
- /* @__PURE__ */ v("div", {
461
+ /* @__PURE__ */ y("div", {
462
462
  className: "flex items-center gap-2",
463
463
  children: [
464
- /* @__PURE__ */ _(l, { className: "h-4 w-4 text-muted-foreground" }),
465
- /* @__PURE__ */ _("span", {
464
+ /* @__PURE__ */ v(u, { className: "h-4 w-4 text-muted-foreground" }),
465
+ /* @__PURE__ */ v("span", {
466
466
  className: "text-muted-foreground",
467
467
  children: "Created:"
468
468
  }),
469
- /* @__PURE__ */ _("span", {
469
+ /* @__PURE__ */ v("span", {
470
470
  className: "font-medium",
471
- children: K.createdAt ? new Date(K.createdAt).toLocaleDateString() : "—"
471
+ children: q.createdAt ? new Date(q.createdAt).toLocaleDateString() : "—"
472
472
  })
473
473
  ]
474
474
  })
@@ -479,6 +479,6 @@ function P() {
479
479
  });
480
480
  }
481
481
  //#endregion
482
- export { P as GoalsObjectiveDetailPagePage };
482
+ export { F as GoalsObjectiveDetailPagePage };
483
483
 
484
484
  //# sourceMappingURL=GoalsObjectiveDetailPagePage.js.map