@burdenoff/microfe-planmagnet 2026.930.6 → 2026.930.8

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 (74) hide show
  1. package/dist/planmagnet/PlanMagnetRoot.d.ts.map +1 -1
  2. package/dist/planmagnet/PlanMagnetRoot.js +132 -108
  3. package/dist/planmagnet/PlanMagnetRoot.js.map +1 -1
  4. package/dist/planmagnet/PlanMagnetRoutes.d.ts.map +1 -1
  5. package/dist/planmagnet/PlanMagnetRoutes.js +24 -12
  6. package/dist/planmagnet/PlanMagnetRoutes.js.map +1 -1
  7. package/dist/planmagnet/board/BoardViewBar.d.ts +27 -0
  8. package/dist/planmagnet/board/BoardViewBar.d.ts.map +1 -0
  9. package/dist/planmagnet/board/BoardViewBar.js +684 -0
  10. package/dist/planmagnet/board/BoardViewBar.js.map +1 -0
  11. package/dist/planmagnet/board/ProjectBoard.d.ts.map +1 -1
  12. package/dist/planmagnet/board/ProjectBoard.js +440 -345
  13. package/dist/planmagnet/board/ProjectBoard.js.map +1 -1
  14. package/dist/planmagnet/board/boardViewConfig.d.ts +144 -0
  15. package/dist/planmagnet/board/boardViewConfig.d.ts.map +1 -0
  16. package/dist/planmagnet/board/boardViewConfig.js +265 -0
  17. package/dist/planmagnet/board/boardViewConfig.js.map +1 -0
  18. package/dist/planmagnet/controls/ConfirmButton.d.ts +3 -1
  19. package/dist/planmagnet/controls/ConfirmButton.d.ts.map +1 -1
  20. package/dist/planmagnet/controls/ConfirmButton.js +2 -1
  21. package/dist/planmagnet/controls/ConfirmButton.js.map +1 -1
  22. package/dist/planmagnet/controls/FeatureControls.js +25 -25
  23. package/dist/planmagnet/controls/Pickers.d.ts +2 -1
  24. package/dist/planmagnet/controls/Pickers.d.ts.map +1 -1
  25. package/dist/planmagnet/controls/Pickers.js +133 -102
  26. package/dist/planmagnet/controls/Pickers.js.map +1 -1
  27. package/dist/planmagnet/controls/QualityGateControls.d.ts +64 -0
  28. package/dist/planmagnet/controls/QualityGateControls.d.ts.map +1 -0
  29. package/dist/planmagnet/controls/QualityGateControls.js +390 -0
  30. package/dist/planmagnet/controls/QualityGateControls.js.map +1 -0
  31. package/dist/planmagnet/create/CreateDialogs.d.ts +8 -0
  32. package/dist/planmagnet/create/CreateDialogs.d.ts.map +1 -1
  33. package/dist/planmagnet/create/CreateDialogs.js +344 -206
  34. package/dist/planmagnet/create/CreateDialogs.js.map +1 -1
  35. package/dist/planmagnet/milestones/MilestoneControls.js +1 -1
  36. package/dist/planmagnet/pages/AiActivityPagePage.d.ts +2 -0
  37. package/dist/planmagnet/pages/AiActivityPagePage.d.ts.map +1 -0
  38. package/dist/planmagnet/pages/AiActivityPagePage.js +249 -0
  39. package/dist/planmagnet/pages/AiActivityPagePage.js.map +1 -0
  40. package/dist/planmagnet/pages/AiPlanPagePage.d.ts +2 -0
  41. package/dist/planmagnet/pages/AiPlanPagePage.d.ts.map +1 -0
  42. package/dist/planmagnet/pages/AiPlanPagePage.js +381 -0
  43. package/dist/planmagnet/pages/AiPlanPagePage.js.map +1 -0
  44. package/dist/planmagnet/pages/AutomationAutomationRuleDetailPagePage.js +4 -4
  45. package/dist/planmagnet/pages/ProductsEditProductPagePage.js +5 -5
  46. package/dist/planmagnet/pages/ProductsEditRoadmapPagePage.js +4 -4
  47. package/dist/planmagnet/pages/ProductsProductDetailPagePage.js +4 -4
  48. package/dist/planmagnet/pages/ProgramsEditProgramPagePage.js +4 -4
  49. package/dist/planmagnet/pages/ProjectsBudgetDetailPagePage.js +4 -4
  50. package/dist/planmagnet/pages/ProjectsCriticalPathPagePage.js +4 -4
  51. package/dist/planmagnet/pages/ProjectsEditProjectPagePage.js +11 -11
  52. package/dist/planmagnet/pages/ProjectsPlanningEditPagePage.js +6 -6
  53. package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.d.ts.map +1 -1
  54. package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.js +209 -199
  55. package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.js.map +1 -1
  56. package/dist/planmagnet/pages/ProjectsQualityGatesPagePage.d.ts +2 -0
  57. package/dist/planmagnet/pages/ProjectsQualityGatesPagePage.d.ts.map +1 -0
  58. package/dist/planmagnet/pages/ProjectsQualityGatesPagePage.js +236 -0
  59. package/dist/planmagnet/pages/ProjectsQualityGatesPagePage.js.map +1 -0
  60. package/dist/planmagnet/pages/RisksRiskDetailPagePage.js +5 -5
  61. package/dist/planmagnet/pages/TasksTimesheetDetailPagePage.js +6 -6
  62. package/dist/planmagnet/pages/TeamCreateTeamPagePage.js +4 -4
  63. package/dist/planmagnet/pages/TeamTeamEditPagePage.js +8 -8
  64. package/dist/planmagnet/pages/TemplatesEditTemplatePagePage.js +7 -7
  65. package/dist/planmagnet/releases/useReleaseOptions.d.ts +21 -0
  66. package/dist/planmagnet/releases/useReleaseOptions.d.ts.map +1 -0
  67. package/dist/planmagnet/releases/useReleaseOptions.js +75 -0
  68. package/dist/planmagnet/releases/useReleaseOptions.js.map +1 -0
  69. package/dist/planmagnet/roadmaps/RoadmapControls.js +13 -13
  70. package/dist/planmagnet/utils/qualityGateCriteria.d.ts +33 -0
  71. package/dist/planmagnet/utils/qualityGateCriteria.d.ts.map +1 -0
  72. package/dist/planmagnet/utils/qualityGateCriteria.js +58 -0
  73. package/dist/planmagnet/utils/qualityGateCriteria.js.map +1 -0
  74. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  import { usePlanMagnetNavigate as e } from "../providers/PlanMagnetProvider.js";
2
2
  import { throwOnError as t } from "../utils/mutationResult.js";
3
- import { useEntityId as n } from "../hooks/useEntityId.js";
4
- import { AssigneeSelect as r } from "../controls/WorkItemControls.js";
5
- import { detailPath as i } from "../utils/rowNavigation.js";
6
- import { parseIntField as a } from "../utils/formValidation.js";
3
+ import { AssigneeSelect as n } from "../controls/WorkItemControls.js";
4
+ import { parseIntField as r } from "../utils/formValidation.js";
5
+ import { useEntityId as i } from "../hooks/useEntityId.js";
6
+ import { detailPath as a } from "../utils/rowNavigation.js";
7
7
  import { PlanMagnetNotFoundPage as o } from "./NotFoundPage.js";
8
8
  import { useMemo as s, useState as c } from "react";
9
9
  import { ArrowLeft as l, Save as u } from "lucide-react";
@@ -34,7 +34,7 @@ var S = d`
34
34
  }
35
35
  `;
36
36
  function w() {
37
- let d = n("teamId"), w = e(), { data: T, loading: E, error: D } = p(S, {
37
+ let d = i("teamId"), w = e(), { data: T, loading: E, error: D } = p(S, {
38
38
  variables: { id: d },
39
39
  skip: !d
40
40
  }), O = T?.planmagnetTeam, k = s(() => ({
@@ -49,7 +49,7 @@ function w() {
49
49
  let n = { ...t };
50
50
  for (let [t, r] of Object.entries(e)) r !== M[t] && (n[t] = r);
51
51
  return n;
52
- }), [P, F] = c(null), [I, L] = c(null), R = a(M.capacity, { min: 0 }), z = M.name.trim() === "", [B, { loading: V }] = f(C, { refetchQueries: [
52
+ }), [P, F] = c(null), [I, L] = c(null), R = r(M.capacity, { min: 0 }), z = M.name.trim() === "", [B, { loading: V }] = f(C, { refetchQueries: [
53
53
  "GetTeams",
54
54
  "GetTeamDetail",
55
55
  "GetTeamForEdit"
@@ -71,7 +71,7 @@ function w() {
71
71
  variant: "ghost",
72
72
  size: "sm",
73
73
  "aria-label": "Back to the team",
74
- onClick: () => w(i("/team/team-detail-page", d)),
74
+ onClick: () => w(a("/team/team-detail-page", d)),
75
75
  children: /* @__PURE__ */ m(l, { className: "h-4 w-4" })
76
76
  }), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h1", {
77
77
  className: "text-2xl font-semibold",
@@ -161,7 +161,7 @@ function w() {
161
161
  children: "Team Lead"
162
162
  }), /* @__PURE__ */ m("div", {
163
163
  className: "mt-1",
164
- children: /* @__PURE__ */ m(r, {
164
+ children: /* @__PURE__ */ m(n, {
165
165
  id: "team-lead",
166
166
  value: M.leadId,
167
167
  onChange: (e) => N({
@@ -1,6 +1,6 @@
1
1
  import { throwOnError as e } from "../utils/mutationResult.js";
2
- import { useEntityId as t } from "../hooks/useEntityId.js";
3
- import { ErrorLine as n } from "../controls/ConfirmButton.js";
2
+ import { ErrorLine as t } from "../controls/ConfirmButton.js";
3
+ import { useEntityId as n } from "../hooks/useEntityId.js";
4
4
  import { TEMPLATE_QUERIES as r, TemplateDeleteButton as i } from "../controls/TemplateControls.js";
5
5
  import { useState as a } from "react";
6
6
  import { LayoutTemplate as o, Save as s } from "lucide-react";
@@ -59,12 +59,12 @@ function w(e) {
59
59
  };
60
60
  }
61
61
  }
62
- function T({ id: e, label: t, hint: r, value: i, onChange: a, error: o }) {
62
+ function T({ id: e, label: n, hint: r, value: i, onChange: a, error: o }) {
63
63
  return /* @__PURE__ */ f("div", { children: [
64
64
  /* @__PURE__ */ d("label", {
65
65
  htmlFor: e,
66
66
  className: "text-sm font-medium",
67
- children: t
67
+ children: n
68
68
  }),
69
69
  /* @__PURE__ */ d("p", {
70
70
  className: "text-xs text-muted-foreground",
@@ -78,11 +78,11 @@ function T({ id: e, label: t, hint: r, value: i, onChange: a, error: o }) {
78
78
  onChange: (e) => a(e.target.value),
79
79
  "aria-invalid": !!o
80
80
  }),
81
- o && /* @__PURE__ */ d(n, { message: o })
81
+ o && /* @__PURE__ */ d(t, { message: o })
82
82
  ] });
83
83
  }
84
84
  function E() {
85
- let c = t(), { data: E, loading: D, error: O } = u(x, {
85
+ let c = n(), { data: E, loading: D, error: O } = u(x, {
86
86
  variables: { id: c ?? "" },
87
87
  skip: !c,
88
88
  fetchPolicy: "cache-and-network"
@@ -164,7 +164,7 @@ function E() {
164
164
  isBuiltIn: j.isBuiltIn
165
165
  })]
166
166
  }),
167
- P && /* @__PURE__ */ d(n, { message: P }),
167
+ P && /* @__PURE__ */ d(t, { message: P }),
168
168
  I && !P && /* @__PURE__ */ d("p", {
169
169
  className: "text-sm text-muted-foreground",
170
170
  children: "Saved."
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Releases for a picker or a name lookup, read page by page up to MAX_RELEASE_OPTIONS — so a workspace past 100
3
+ * releases never silently loses the later ones (same pattern as useProjectMilestones).
4
+ *
5
+ * With a project, the releases a gate of that project may hold: the ones linked to the project (the server's
6
+ * project filter, which matches any of a release's projects) AND the ones with no project at all — the server's own
7
+ * rule (quality.service.ts assertReleaseAcceptsGate). A project filter alone would drop the projectless ones.
8
+ */
9
+ export interface ReleaseOption {
10
+ id: string;
11
+ name: string;
12
+ version: string;
13
+ /** The release's first project, '' when it has none (see release.resolvers.ts). */
14
+ projectId: string;
15
+ }
16
+ export declare function useReleaseOptions(enabled: boolean, projectId?: string | null): {
17
+ releases: ReleaseOption[];
18
+ loading: boolean;
19
+ error: import('@apollo/client').ErrorLike | undefined;
20
+ };
21
+ //# sourceMappingURL=useReleaseOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useReleaseOptions.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/releases/useReleaseOptions.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,mFAAmF;IACnF,SAAS,EAAE,MAAM,CAAC;CACnB;AA6DD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;;;;EAc5E"}
@@ -0,0 +1,75 @@
1
+ import { usePlanMagnet as e } from "../providers/PlanMagnetProvider.js";
2
+ import { useEffect as t } from "react";
3
+ import { gql as n } from "@apollo/client";
4
+ import { useQuery as r } from "@apollo/client/react";
5
+ //#region src/planmagnet/releases/useReleaseOptions.ts
6
+ var i = n`
7
+ query ReleaseOptions(
8
+ $workspaceId: ID!
9
+ $filter: PlanmagnetReleaseFilter
10
+ $pagination: PlanmagnetPaginationInput
11
+ ) {
12
+ planmagnetReleases(workspaceId: $workspaceId, filter: $filter, pagination: $pagination) {
13
+ items {
14
+ id
15
+ name
16
+ version
17
+ projectId
18
+ }
19
+ pageInfo {
20
+ hasNextPage
21
+ endCursor
22
+ }
23
+ }
24
+ }
25
+ `, a = 500;
26
+ function o(n, o) {
27
+ let { workspaceId: s } = e(), { data: c, loading: l, error: u, fetchMore: d } = r(i, {
28
+ variables: {
29
+ workspaceId: s ?? "",
30
+ filter: o ? { projectId: o } : {},
31
+ pagination: { first: 100 }
32
+ },
33
+ skip: !n || !s
34
+ }), f = c?.planmagnetReleases.items ?? [], p = c?.planmagnetReleases.pageInfo.hasNextPage ?? !1, m = c?.planmagnetReleases.pageInfo.endCursor ?? null;
35
+ return t(() => {
36
+ !n || !p || !m || f.length >= a || d({
37
+ variables: { pagination: {
38
+ first: 100,
39
+ after: m
40
+ } },
41
+ updateQuery: (e, { fetchMoreResult: t }) => ({ planmagnetReleases: {
42
+ ...t.planmagnetReleases,
43
+ items: [...e.planmagnetReleases.items, ...t.planmagnetReleases.items]
44
+ } })
45
+ }).catch(() => {});
46
+ }, [
47
+ n,
48
+ p,
49
+ m,
50
+ f.length,
51
+ d
52
+ ]), {
53
+ items: f,
54
+ loading: l && !c,
55
+ error: u
56
+ };
57
+ }
58
+ function s(e, t) {
59
+ let n = o(e, null), r = o(e && !!t, t ?? null);
60
+ if (!t) return {
61
+ releases: n.items,
62
+ loading: n.loading,
63
+ error: n.error
64
+ };
65
+ let i = new Set(r.items.map((e) => e.id));
66
+ return {
67
+ releases: [...r.items, ...n.items.filter((e) => e.projectId === "" && !i.has(e.id))],
68
+ loading: n.loading || r.loading,
69
+ error: n.error ?? r.error
70
+ };
71
+ }
72
+ //#endregion
73
+ export { s as useReleaseOptions };
74
+
75
+ //# sourceMappingURL=useReleaseOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useReleaseOptions.js","names":[],"sources":["../../../src/planmagnet/releases/useReleaseOptions.ts"],"sourcesContent":["import { useEffect } from 'react';\nimport { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport { usePlanMagnet } from '../providers/PlanMagnetProvider';\n\n/**\n * Releases for a picker or a name lookup, read page by page up to MAX_RELEASE_OPTIONS — so a workspace past 100\n * releases never silently loses the later ones (same pattern as useProjectMilestones).\n *\n * With a project, the releases a gate of that project may hold: the ones linked to the project (the server's\n * project filter, which matches any of a release's projects) AND the ones with no project at all — the server's own\n * rule (quality.service.ts assertReleaseAcceptsGate). A project filter alone would drop the projectless ones.\n */\nexport interface ReleaseOption {\n id: string;\n name: string;\n version: string;\n /** The release's first project, '' when it has none (see release.resolvers.ts). */\n projectId: string;\n}\n\nconst RELEASE_OPTIONS = gql`\n query ReleaseOptions(\n $workspaceId: ID!\n $filter: PlanmagnetReleaseFilter\n $pagination: PlanmagnetPaginationInput\n ) {\n planmagnetReleases(workspaceId: $workspaceId, filter: $filter, pagination: $pagination) {\n items {\n id\n name\n version\n projectId\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n`;\n\nconst MAX_RELEASE_OPTIONS = 500;\n\n/** Every page of one release query, up to the cap. */\nfunction useAllReleasePages(enabled: boolean, projectId: string | null) {\n const { workspaceId } = usePlanMagnet();\n const { data, loading, error, fetchMore } = useQuery<{\n planmagnetReleases: {\n items: ReleaseOption[];\n pageInfo: { hasNextPage: boolean; endCursor: string | null };\n };\n }>(RELEASE_OPTIONS, {\n variables: {\n workspaceId: workspaceId ?? '',\n filter: projectId ? { projectId } : {},\n pagination: { first: 100 },\n },\n skip: !enabled || !workspaceId,\n });\n const loaded = data?.planmagnetReleases.items ?? [];\n const hasNextPage = data?.planmagnetReleases.pageInfo.hasNextPage ?? false;\n const endCursor = data?.planmagnetReleases.pageInfo.endCursor ?? null;\n useEffect(() => {\n if (!enabled || !hasNextPage || !endCursor || loaded.length >= MAX_RELEASE_OPTIONS) return;\n fetchMore({\n variables: { pagination: { first: 100, after: endCursor } },\n updateQuery: (prev, { fetchMoreResult }) => ({\n planmagnetReleases: {\n ...fetchMoreResult.planmagnetReleases,\n items: [...prev.planmagnetReleases.items, ...fetchMoreResult.planmagnetReleases.items],\n },\n }),\n }).catch(() => {\n // A failed extra page leaves the releases already loaded usable.\n });\n }, [enabled, hasNextPage, endCursor, loaded.length, fetchMore]);\n return { items: loaded, loading: loading && !data, error };\n}\n\nexport function useReleaseOptions(enabled: boolean, projectId?: string | null) {\n const all = useAllReleasePages(enabled, null);\n const ofProject = useAllReleasePages(enabled && !!projectId, projectId ?? null);\n if (!projectId) return { releases: all.items, loading: all.loading, error: all.error };\n const seen = new Set(ofProject.items.map((r) => r.id));\n const releases = [\n ...ofProject.items,\n ...all.items.filter((r) => r.projectId === '' && !seen.has(r.id)),\n ];\n return {\n releases,\n loading: all.loading || ofProject.loading,\n error: all.error ?? ofProject.error,\n };\n}\n"],"mappings":";;;;;AAqBA,IAAM,IAAkB,CAAG;;;;;;;;;;;;;;;;;;;GAqBrB,IAAsB;AAG5B,SAAS,EAAmB,GAAkB,GAA0B;CACtE,IAAM,EAAE,mBAAgB,GAAe,EACjC,EAAE,SAAM,YAAS,UAAO,iBAAc,EAKzC,GAAiB;EAClB,WAAW;GACT,aAAa,KAAe;GAC5B,QAAQ,IAAY,EAAE,cAAW,GAAG,EAAE;GACtC,YAAY,EAAE,OAAO,KAAK;GAC3B;EACD,MAAM,CAAC,KAAW,CAAC;EACpB,CAAC,EACI,IAAS,GAAM,mBAAmB,SAAS,EAAE,EAC7C,IAAc,GAAM,mBAAmB,SAAS,eAAe,IAC/D,IAAY,GAAM,mBAAmB,SAAS,aAAa;AAejE,QAdA,QAAgB;AACV,GAAC,KAAW,CAAC,KAAe,CAAC,KAAa,EAAO,UAAU,KAC/D,EAAU;GACR,WAAW,EAAE,YAAY;IAAE,OAAO;IAAK,OAAO;IAAW,EAAE;GAC3D,cAAc,GAAM,EAAE,0BAAuB,EAC3C,oBAAoB;IAClB,GAAG,EAAgB;IACnB,OAAO,CAAC,GAAG,EAAK,mBAAmB,OAAO,GAAG,EAAgB,mBAAmB,MAAM;IACvF,EACF;GACF,CAAC,CAAC,YAAY,GAEb;IACD;EAAC;EAAS;EAAa;EAAW,EAAO;EAAQ;EAAU,CAAC,EACxD;EAAE,OAAO;EAAQ,SAAS,KAAW,CAAC;EAAM;EAAO;;AAG5D,SAAgB,EAAkB,GAAkB,GAA2B;CAC7E,IAAM,IAAM,EAAmB,GAAS,KAAK,EACvC,IAAY,EAAmB,KAAW,CAAC,CAAC,GAAW,KAAa,KAAK;AAC/E,KAAI,CAAC,EAAW,QAAO;EAAE,UAAU,EAAI;EAAO,SAAS,EAAI;EAAS,OAAO,EAAI;EAAO;CACtF,IAAM,IAAO,IAAI,IAAI,EAAU,MAAM,KAAK,MAAM,EAAE,GAAG,CAAC;AAKtD,QAAO;EACL,UALe,CACf,GAAG,EAAU,OACb,GAAG,EAAI,MAAM,QAAQ,MAAM,EAAE,cAAc,MAAM,CAAC,EAAK,IAAI,EAAE,GAAG,CAAC,CAClE;EAGC,SAAS,EAAI,WAAW,EAAU;EAClC,OAAO,EAAI,SAAS,EAAU;EAC/B"}
@@ -2,8 +2,8 @@ import { usePlanMagnetNavigate as e } from "../providers/PlanMagnetProvider.js";
2
2
  import { LEAVES_PAGE_CONTEXT as t, throwOnError as n } from "../utils/mutationResult.js";
3
3
  import { ConfirmButton as r, ErrorLine as i } from "../controls/ConfirmButton.js";
4
4
  import { enumLabel as a } from "../controls/WorkItemControls.js";
5
- import { detailPath as o } from "../utils/rowNavigation.js";
6
- import { endBeforeStart as s } from "../utils/formValidation.js";
5
+ import { endBeforeStart as o } from "../utils/formValidation.js";
6
+ import { detailPath as s } from "../utils/rowNavigation.js";
7
7
  import { useState as c } from "react";
8
8
  import { BarChart3 as l, Pencil as u, Plus as d, Trash2 as f } from "lucide-react";
9
9
  import { gql as p } from "@apollo/client";
@@ -52,17 +52,17 @@ var E = [
52
52
  }
53
53
  `, M = (e) => e ? e.slice(0, 10) : "";
54
54
  function N({ roadmapId: e, item: t, lanes: r }) {
55
- let o = {
55
+ let s = {
56
56
  title: t?.title ?? "",
57
57
  description: t?.description ?? "",
58
58
  status: t?.status ?? "PLANNED",
59
59
  swimlane: t?.swimlane ?? "",
60
60
  startDate: M(t?.startDate),
61
61
  endDate: M(t?.endDate)
62
- }, [l, f] = c(!1), [p, A] = c(o), [j, N] = c(null), P = {
62
+ }, [l, f] = c(!1), [p, A] = c(s), [j, N] = c(null), P = {
63
63
  refetchQueries: D,
64
64
  awaitRefetchQueries: !0
65
- }, [F, I] = m(O, P), [L, R] = m(k, P), z = I.loading || R.loading, B = s(p.startDate, p.endDate), V = p.title.trim() !== "" && !B && !z, H = E.includes(p.status) ? E : [p.status, ...E], U = t ? `roadmap-item-${t.id}` : "roadmap-item-new", W = async () => {
65
+ }, [F, I] = m(O, P), [L, R] = m(k, P), z = I.loading || R.loading, B = o(p.startDate, p.endDate), V = p.title.trim() !== "" && !B && !z, H = E.includes(p.status) ? E : [p.status, ...E], U = t ? `roadmap-item-${t.id}` : "roadmap-item-new", W = async () => {
66
66
  N(null);
67
67
  let r = {
68
68
  title: p.title.trim(),
@@ -73,8 +73,8 @@ function N({ roadmapId: e, item: t, lanes: r }) {
73
73
  try {
74
74
  if (t) {
75
75
  let e = {
76
- ...p.startDate !== o.startDate && { startDate: p.startDate || null },
77
- ...p.endDate !== o.endDate && { endDate: p.endDate || null }
76
+ ...p.startDate !== s.startDate && { startDate: p.startDate || null },
77
+ ...p.endDate !== s.endDate && { endDate: p.endDate || null }
78
78
  };
79
79
  await n(L({ variables: {
80
80
  id: t.id,
@@ -88,7 +88,7 @@ function N({ roadmapId: e, item: t, lanes: r }) {
88
88
  ...r,
89
89
  startDate: p.startDate || void 0,
90
90
  endDate: p.endDate || void 0
91
- } } })), A(o);
91
+ } } })), A(s);
92
92
  f(!1);
93
93
  } catch (e) {
94
94
  N(e instanceof Error ? e.message : "The item could not be saved.");
@@ -97,7 +97,7 @@ function N({ roadmapId: e, item: t, lanes: r }) {
97
97
  return /* @__PURE__ */ g(y, {
98
98
  open: l,
99
99
  onOpenChange: (e) => {
100
- f(e), e ? A(o) : N(null);
100
+ f(e), e ? A(s) : N(null);
101
101
  },
102
102
  children: [/* @__PURE__ */ h(T, {
103
103
  asChild: !0,
@@ -262,7 +262,7 @@ function P({ id: e, title: t }) {
262
262
  }), s && /* @__PURE__ */ h(i, { message: s })]
263
263
  });
264
264
  }
265
- function F({ roadmapId: a, name: s }) {
265
+ function F({ roadmapId: a, name: o }) {
266
266
  let d = e(), [p, v] = m(j, {
267
267
  refetchQueries: ["ListRoadmapsPage", "ListRoadmaps"],
268
268
  context: t
@@ -283,21 +283,21 @@ function F({ roadmapId: a, name: s }) {
283
283
  size: "sm",
284
284
  variant: "outline",
285
285
  "data-testid": "roadmap-edit",
286
- onClick: () => d(o("/products/edit-roadmap-page", a)),
286
+ onClick: () => d(s("/products/edit-roadmap-page", a)),
287
287
  children: [/* @__PURE__ */ h(u, { className: "mr-1 h-4 w-4" }), "Edit"]
288
288
  }),
289
289
  /* @__PURE__ */ g(_, {
290
290
  size: "sm",
291
291
  variant: "outline",
292
292
  "data-testid": "roadmap-analytics",
293
- onClick: () => d(o("/products/roadmap-analytics-page", a)),
293
+ onClick: () => d(s("/products/roadmap-analytics-page", a)),
294
294
  children: [/* @__PURE__ */ h(l, { className: "mr-1 h-4 w-4" }), "Analytics"]
295
295
  }),
296
296
  /* @__PURE__ */ h(r, {
297
297
  label: "Delete",
298
298
  variant: "outline",
299
299
  icon: /* @__PURE__ */ h(f, { className: "mr-1 h-4 w-4" }),
300
- title: `Delete ${s}?`,
300
+ title: `Delete ${o}?`,
301
301
  description: "The roadmap and its items are deleted. This cannot be undone here.",
302
302
  confirmLabel: "Delete roadmap",
303
303
  destructive: !0,
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Quality gate `criteria` (GAP-02). The field is stored as free-form JSON — `criteria: JSON!` in the schema,
3
+ * a plain `Json` column in Prisma — and the service enforces no shape at all (its own tests create gates with
4
+ * `criteria: {}` and `criteria: { minCoverage: 80 }` alike). This UI's own convention, used by the create and
5
+ * edit dialogs, is an array of `{ id, description, done }` rows edited as plain text lines with add/remove
6
+ * controls. These helpers convert between that array and the editable rows, and summarize whatever is actually
7
+ * stored for a list row — so a gate whose criteria was written another way (or seeded before this UI existed)
8
+ * is still shown, never a crash.
9
+ */
10
+ export interface CriteriaItem {
11
+ /** Stable only for the life of one form — never sent on its own, only inside the `criteria` JSON. */
12
+ id: string;
13
+ description: string;
14
+ done?: boolean;
15
+ }
16
+ /** A key for a freshly added row. Not persisted as a real record id — criteria has none. */
17
+ export declare function newCriteriaId(): string;
18
+ /** Whatever `criteria` JSON holds, turned into editable rows. Never throws. */
19
+ export declare function parseCriteriaItems(criteria: unknown): CriteriaItem[];
20
+ /** Editable rows -> the JSON the create/update mutation input carries. Blank rows are dropped. */
21
+ export declare function criteriaItemsToJson(items: CriteriaItem[]): Array<{
22
+ id: string;
23
+ description: string;
24
+ done: boolean;
25
+ }>;
26
+ export interface CriteriaSummary {
27
+ total: number;
28
+ /** How many are marked `done`, or null when the stored criteria don't all carry a boolean `done` flag. */
29
+ done: number | null;
30
+ }
31
+ /** For a list row: "X of Y met" when every stored item carries a boolean `done`, otherwise just a count. */
32
+ export declare function summarizeCriteria(criteria: unknown): CriteriaSummary;
33
+ //# sourceMappingURL=qualityGateCriteria.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qualityGateCriteria.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/utils/qualityGateCriteria.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,WAAW,YAAY;IAC3B,qGAAqG;IACrG,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAGD,4FAA4F;AAC5F,wBAAgB,aAAa,IAAI,MAAM,CAGtC;AAMD,+EAA+E;AAC/E,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,OAAO,GAAG,YAAY,EAAE,CA+BpE;AAED,kGAAkG;AAClG,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,YAAY,EAAE,GACpB,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC,CAQ3D;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,0GAA0G;IAC1G,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,4GAA4G;AAC5G,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,OAAO,GAAG,eAAe,CAgBpE"}
@@ -0,0 +1,58 @@
1
+ //#region src/planmagnet/utils/qualityGateCriteria.ts
2
+ var e = 0;
3
+ function t() {
4
+ return e += 1, `criterion-${Date.now()}-${e}`;
5
+ }
6
+ function n(e) {
7
+ return typeof e == "string" ? e : JSON.stringify(e);
8
+ }
9
+ function r(e) {
10
+ return Array.isArray(e) ? e.map((e) => {
11
+ if (typeof e == "string") return {
12
+ id: t(),
13
+ description: e
14
+ };
15
+ if (e && typeof e == "object") {
16
+ let r = e, i = typeof r.description == "string" ? r.description : typeof r.text == "string" ? r.text : typeof r.label == "string" ? r.label : n(e), a = typeof r.done == "boolean" ? r.done : void 0;
17
+ return {
18
+ id: typeof r.id == "string" && r.id.trim() !== "" ? r.id : t(),
19
+ description: i,
20
+ done: a
21
+ };
22
+ }
23
+ return {
24
+ id: t(),
25
+ description: n(e)
26
+ };
27
+ }) : e && typeof e == "object" ? Object.entries(e).map(([e, r]) => ({
28
+ id: t(),
29
+ description: `${e}: ${n(r)}`
30
+ })) : [];
31
+ }
32
+ function i(e) {
33
+ return e.map((e) => ({
34
+ id: e.id,
35
+ description: e.description.trim(),
36
+ done: e.done ?? !1
37
+ })).filter((e) => e.description !== "");
38
+ }
39
+ function a(e) {
40
+ let t = Array.isArray(e) ? e : e && typeof e == "object" ? Object.values(e) : [];
41
+ if (t.length === 0) return {
42
+ total: 0,
43
+ done: null
44
+ };
45
+ if (!t.every((e) => !!e && typeof e == "object" && typeof e.done == "boolean")) return {
46
+ total: t.length,
47
+ done: null
48
+ };
49
+ let n = t.filter((e) => e.done === !0).length;
50
+ return {
51
+ total: t.length,
52
+ done: n
53
+ };
54
+ }
55
+ //#endregion
56
+ export { i as criteriaItemsToJson, t as newCriteriaId, r as parseCriteriaItems, a as summarizeCriteria };
57
+
58
+ //# sourceMappingURL=qualityGateCriteria.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qualityGateCriteria.js","names":[],"sources":["../../../src/planmagnet/utils/qualityGateCriteria.ts"],"sourcesContent":["/**\n * Quality gate `criteria` (GAP-02). The field is stored as free-form JSON — `criteria: JSON!` in the schema,\n * a plain `Json` column in Prisma — and the service enforces no shape at all (its own tests create gates with\n * `criteria: {}` and `criteria: { minCoverage: 80 }` alike). This UI's own convention, used by the create and\n * edit dialogs, is an array of `{ id, description, done }` rows edited as plain text lines with add/remove\n * controls. These helpers convert between that array and the editable rows, and summarize whatever is actually\n * stored for a list row — so a gate whose criteria was written another way (or seeded before this UI existed)\n * is still shown, never a crash.\n */\n\nexport interface CriteriaItem {\n /** Stable only for the life of one form — never sent on its own, only inside the `criteria` JSON. */\n id: string;\n description: string;\n done?: boolean;\n}\n\nlet sequence = 0;\n/** A key for a freshly added row. Not persisted as a real record id — criteria has none. */\nexport function newCriteriaId(): string {\n sequence += 1;\n return `criterion-${Date.now()}-${sequence}`;\n}\n\nfunction describeUnknown(value: unknown): string {\n return typeof value === 'string' ? value : JSON.stringify(value);\n}\n\n/** Whatever `criteria` JSON holds, turned into editable rows. Never throws. */\nexport function parseCriteriaItems(criteria: unknown): CriteriaItem[] {\n if (Array.isArray(criteria)) {\n return criteria.map((entry) => {\n if (typeof entry === 'string') return { id: newCriteriaId(), description: entry };\n if (entry && typeof entry === 'object') {\n const record = entry as Record<string, unknown>;\n const description =\n typeof record.description === 'string'\n ? record.description\n : typeof record.text === 'string'\n ? record.text\n : typeof record.label === 'string'\n ? record.label\n : describeUnknown(entry);\n const done = typeof record.done === 'boolean' ? record.done : undefined;\n const id =\n typeof record.id === 'string' && record.id.trim() !== '' ? record.id : newCriteriaId();\n return { id, description, done };\n }\n return { id: newCriteriaId(), description: describeUnknown(entry) };\n });\n }\n if (criteria && typeof criteria === 'object') {\n // A non-array object (legacy `{}` or `{ minCoverage: 80 }`): one row per key. Saving the form from here on\n // produces this UI's canonical array shape.\n return Object.entries(criteria as Record<string, unknown>).map(([key, value]) => ({\n id: newCriteriaId(),\n description: `${key}: ${describeUnknown(value)}`,\n }));\n }\n return [];\n}\n\n/** Editable rows -> the JSON the create/update mutation input carries. Blank rows are dropped. */\nexport function criteriaItemsToJson(\n items: CriteriaItem[]\n): Array<{ id: string; description: string; done: boolean }> {\n return items\n .map((item) => ({\n id: item.id,\n description: item.description.trim(),\n done: item.done ?? false,\n }))\n .filter((item) => item.description !== '');\n}\n\nexport interface CriteriaSummary {\n total: number;\n /** How many are marked `done`, or null when the stored criteria don't all carry a boolean `done` flag. */\n done: number | null;\n}\n\n/** For a list row: \"X of Y met\" when every stored item carries a boolean `done`, otherwise just a count. */\nexport function summarizeCriteria(criteria: unknown): CriteriaSummary {\n const items = Array.isArray(criteria)\n ? criteria\n : criteria && typeof criteria === 'object'\n ? Object.values(criteria as Record<string, unknown>)\n : [];\n if (items.length === 0) return { total: 0, done: null };\n const everyItemCarriesDone = items.every(\n (item): item is Record<string, unknown> =>\n !!item &&\n typeof item === 'object' &&\n typeof (item as Record<string, unknown>).done === 'boolean'\n );\n if (!everyItemCarriesDone) return { total: items.length, done: null };\n const done = items.filter((item) => (item as Record<string, unknown>).done === true).length;\n return { total: items.length, done };\n}\n"],"mappings":";AAiBA,IAAI,IAAW;AAEf,SAAgB,IAAwB;AAEtC,QADA,KAAY,GACL,aAAa,KAAK,KAAK,CAAC,GAAG;;AAGpC,SAAS,EAAgB,GAAwB;AAC/C,QAAO,OAAO,KAAU,WAAW,IAAQ,KAAK,UAAU,EAAM;;AAIlE,SAAgB,EAAmB,GAAmC;AA8BpE,QA7BI,MAAM,QAAQ,EAAS,GAClB,EAAS,KAAK,MAAU;AAC7B,MAAI,OAAO,KAAU,SAAU,QAAO;GAAE,IAAI,GAAe;GAAE,aAAa;GAAO;AACjF,MAAI,KAAS,OAAO,KAAU,UAAU;GACtC,IAAM,IAAS,GACT,IACJ,OAAO,EAAO,eAAgB,WAC1B,EAAO,cACP,OAAO,EAAO,QAAS,WACrB,EAAO,OACP,OAAO,EAAO,SAAU,WACtB,EAAO,QACP,EAAgB,EAAM,EAC1B,IAAO,OAAO,EAAO,QAAS,YAAY,EAAO,OAAO,KAAA;AAG9D,UAAO;IAAE,IADP,OAAO,EAAO,MAAO,YAAY,EAAO,GAAG,MAAM,KAAK,KAAK,EAAO,KAAK,GAAe;IAC3E;IAAa;IAAM;;AAElC,SAAO;GAAE,IAAI,GAAe;GAAE,aAAa,EAAgB,EAAM;GAAE;GACnE,GAEA,KAAY,OAAO,KAAa,WAG3B,OAAO,QAAQ,EAAoC,CAAC,KAAK,CAAC,GAAK,QAAY;EAChF,IAAI,GAAe;EACnB,aAAa,GAAG,EAAI,IAAI,EAAgB,EAAM;EAC/C,EAAE,GAEE,EAAE;;AAIX,SAAgB,EACd,GAC2D;AAC3D,QAAO,EACJ,KAAK,OAAU;EACd,IAAI,EAAK;EACT,aAAa,EAAK,YAAY,MAAM;EACpC,MAAM,EAAK,QAAQ;EACpB,EAAE,CACF,QAAQ,MAAS,EAAK,gBAAgB,GAAG;;AAU9C,SAAgB,EAAkB,GAAoC;CACpE,IAAM,IAAQ,MAAM,QAAQ,EAAS,GACjC,IACA,KAAY,OAAO,KAAa,WAC9B,OAAO,OAAO,EAAoC,GAClD,EAAE;AACR,KAAI,EAAM,WAAW,EAAG,QAAO;EAAE,OAAO;EAAG,MAAM;EAAM;AAOvD,KAAI,CANyB,EAAM,OAChC,MACC,CAAC,CAAC,KACF,OAAO,KAAS,YAChB,OAAQ,EAAiC,QAAS,UACrD,CAC0B,QAAO;EAAE,OAAO,EAAM;EAAQ,MAAM;EAAM;CACrE,IAAM,IAAO,EAAM,QAAQ,MAAU,EAAiC,SAAS,GAAK,CAAC;AACrF,QAAO;EAAE,OAAO,EAAM;EAAQ;EAAM"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-planmagnet",
3
- "version": "2026.930.6",
3
+ "version": "2026.930.8",
4
4
  "description": "Burdenoff PlanMagnet Microfrontend",
5
5
  "type": "module",
6
6
  "files": [