@burdenoff/microfe-planmagnet 2026.1002.2 → 2026.1008.1

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 (165) hide show
  1. package/dist/generated/wspace-operations.d.ts +574 -0
  2. package/dist/generated/wspace-operations.d.ts.map +1 -1
  3. package/dist/generated/wspace-types.d.ts +486 -16
  4. package/dist/generated/wspace-types.d.ts.map +1 -1
  5. package/dist/index.js +8 -8
  6. package/dist/planmagnet/PlanMagnetRoot.d.ts.map +1 -1
  7. package/dist/planmagnet/PlanMagnetRoot.js +174 -168
  8. package/dist/planmagnet/PlanMagnetRoot.js.map +1 -1
  9. package/dist/planmagnet/PlanMagnetRoutes.d.ts.map +1 -1
  10. package/dist/planmagnet/PlanMagnetRoutes.js +63 -59
  11. package/dist/planmagnet/PlanMagnetRoutes.js.map +1 -1
  12. package/dist/planmagnet/board/BulkActions.d.ts.map +1 -1
  13. package/dist/planmagnet/board/BulkActions.js +106 -55
  14. package/dist/planmagnet/board/BulkActions.js.map +1 -1
  15. package/dist/planmagnet/controls/Pickers.d.ts +3 -3
  16. package/dist/planmagnet/controls/Pickers.js.map +1 -1
  17. package/dist/planmagnet/dashboards/DashboardUI.d.ts +0 -4
  18. package/dist/planmagnet/dashboards/DashboardUI.d.ts.map +1 -1
  19. package/dist/planmagnet/dashboards/DashboardUI.js +6 -13
  20. package/dist/planmagnet/dashboards/DashboardUI.js.map +1 -1
  21. package/dist/planmagnet/dashboards/cards/SprintCapacityCard.d.ts.map +1 -1
  22. package/dist/planmagnet/dashboards/cards/SprintCapacityCard.js +70 -59
  23. package/dist/planmagnet/dashboards/cards/SprintCapacityCard.js.map +1 -1
  24. package/dist/planmagnet/forecast/ResourceForecastCard.js +1 -1
  25. package/dist/planmagnet/forecast/ResourceForecastCard.js.map +1 -1
  26. package/dist/planmagnet/index.d.ts +1 -1
  27. package/dist/planmagnet/index.d.ts.map +1 -1
  28. package/dist/planmagnet/pages/DashboardsProjectManagerPagePage.d.ts +3 -3
  29. package/dist/planmagnet/pages/DashboardsProjectManagerPagePage.d.ts.map +1 -1
  30. package/dist/planmagnet/pages/DashboardsProjectManagerPagePage.js +26 -19
  31. package/dist/planmagnet/pages/DashboardsProjectManagerPagePage.js.map +1 -1
  32. package/dist/planmagnet/pages/DashboardsTeamUtilizationPagePage.d.ts +2 -2
  33. package/dist/planmagnet/pages/DashboardsTeamUtilizationPagePage.d.ts.map +1 -1
  34. package/dist/planmagnet/pages/DashboardsTeamUtilizationPagePage.js +18 -12
  35. package/dist/planmagnet/pages/DashboardsTeamUtilizationPagePage.js.map +1 -1
  36. package/dist/planmagnet/pages/ProductsCustomerSatisfactionPagePage.d.ts +2 -0
  37. package/dist/planmagnet/pages/ProductsCustomerSatisfactionPagePage.d.ts.map +1 -0
  38. package/dist/planmagnet/pages/ProductsCustomerSatisfactionPagePage.js +251 -0
  39. package/dist/planmagnet/pages/ProductsCustomerSatisfactionPagePage.js.map +1 -0
  40. package/dist/planmagnet/pages/ProductsProductDetailPagePage.d.ts.map +1 -1
  41. package/dist/planmagnet/pages/ProductsProductDetailPagePage.js +94 -92
  42. package/dist/planmagnet/pages/ProductsProductDetailPagePage.js.map +1 -1
  43. package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.d.ts.map +1 -1
  44. package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.js +116 -114
  45. package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.js.map +1 -1
  46. package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.d.ts.map +1 -1
  47. package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.js +174 -159
  48. package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.js.map +1 -1
  49. package/dist/planmagnet/pages/TasksCreateTaskPagePage.d.ts.map +1 -1
  50. package/dist/planmagnet/pages/TasksCreateTaskPagePage.js +159 -145
  51. package/dist/planmagnet/pages/TasksCreateTaskPagePage.js.map +1 -1
  52. package/dist/planmagnet/pages/TasksEditTaskPagePage.d.ts.map +1 -1
  53. package/dist/planmagnet/pages/TasksEditTaskPagePage.js +161 -143
  54. package/dist/planmagnet/pages/TasksEditTaskPagePage.js.map +1 -1
  55. package/dist/planmagnet/pages/TasksTaskDetailPagePage.d.ts.map +1 -1
  56. package/dist/planmagnet/pages/TasksTaskDetailPagePage.js +157 -155
  57. package/dist/planmagnet/pages/TasksTaskDetailPagePage.js.map +1 -1
  58. package/dist/planmagnet/pages/TeamInviteMemberPagePage.d.ts.map +1 -1
  59. package/dist/planmagnet/pages/TeamInviteMemberPagePage.js +142 -82
  60. package/dist/planmagnet/pages/TeamInviteMemberPagePage.js.map +1 -1
  61. package/dist/planmagnet/pages/analytics/DeliveryKpisCard.d.ts.map +1 -1
  62. package/dist/planmagnet/pages/analytics/DeliveryKpisCard.js +97 -99
  63. package/dist/planmagnet/pages/analytics/DeliveryKpisCard.js.map +1 -1
  64. package/dist/planmagnet/product/FeatureLinkPanels.js +66 -66
  65. package/dist/planmagnet/product/ProductFeatureControls.js +38 -38
  66. package/dist/planmagnet/product/ProductFeatureLinkCard.js +8 -8
  67. package/dist/planmagnet/product/ProductLineControls.js +83 -83
  68. package/dist/planmagnet/product/ProductTeamsPanel.js +6 -6
  69. package/dist/planmagnet/product/routes.d.ts +6 -0
  70. package/dist/planmagnet/product/routes.d.ts.map +1 -1
  71. package/dist/planmagnet/product/routes.js +2 -2
  72. package/dist/planmagnet/product/routes.js.map +1 -1
  73. package/dist/planmagnet/satisfaction/DeliverySatisfactionSection.d.ts +20 -0
  74. package/dist/planmagnet/satisfaction/DeliverySatisfactionSection.d.ts.map +1 -0
  75. package/dist/planmagnet/satisfaction/DeliverySatisfactionSection.js +55 -0
  76. package/dist/planmagnet/satisfaction/DeliverySatisfactionSection.js.map +1 -0
  77. package/dist/planmagnet/satisfaction/SatisfactionFigures.d.ts +30 -0
  78. package/dist/planmagnet/satisfaction/SatisfactionFigures.d.ts.map +1 -0
  79. package/dist/planmagnet/satisfaction/SatisfactionFigures.js +282 -0
  80. package/dist/planmagnet/satisfaction/SatisfactionFigures.js.map +1 -0
  81. package/dist/planmagnet/satisfaction/SatisfactionImportDialog.d.ts +9 -0
  82. package/dist/planmagnet/satisfaction/SatisfactionImportDialog.d.ts.map +1 -0
  83. package/dist/planmagnet/satisfaction/SatisfactionImportDialog.js +390 -0
  84. package/dist/planmagnet/satisfaction/SatisfactionImportDialog.js.map +1 -0
  85. package/dist/planmagnet/satisfaction/SatisfactionLinkFields.d.ts +17 -0
  86. package/dist/planmagnet/satisfaction/SatisfactionLinkFields.d.ts.map +1 -0
  87. package/dist/planmagnet/satisfaction/SatisfactionLinkFields.js +77 -0
  88. package/dist/planmagnet/satisfaction/SatisfactionLinkFields.js.map +1 -0
  89. package/dist/planmagnet/satisfaction/SatisfactionReleaseSelect.d.ts +18 -0
  90. package/dist/planmagnet/satisfaction/SatisfactionReleaseSelect.d.ts.map +1 -0
  91. package/dist/planmagnet/satisfaction/SatisfactionReleaseSelect.js +87 -0
  92. package/dist/planmagnet/satisfaction/SatisfactionReleaseSelect.js.map +1 -0
  93. package/dist/planmagnet/satisfaction/SatisfactionResponseDialog.d.ts +13 -0
  94. package/dist/planmagnet/satisfaction/SatisfactionResponseDialog.d.ts.map +1 -0
  95. package/dist/planmagnet/satisfaction/SatisfactionResponseDialog.js +326 -0
  96. package/dist/planmagnet/satisfaction/SatisfactionResponseDialog.js.map +1 -0
  97. package/dist/planmagnet/satisfaction/SatisfactionResponsesTable.d.ts +23 -0
  98. package/dist/planmagnet/satisfaction/SatisfactionResponsesTable.d.ts.map +1 -0
  99. package/dist/planmagnet/satisfaction/SatisfactionResponsesTable.js +258 -0
  100. package/dist/planmagnet/satisfaction/SatisfactionResponsesTable.js.map +1 -0
  101. package/dist/planmagnet/satisfaction/SatisfactionSummaryCard.d.ts +6 -0
  102. package/dist/planmagnet/satisfaction/SatisfactionSummaryCard.d.ts.map +1 -0
  103. package/dist/planmagnet/satisfaction/SatisfactionSummaryCard.js +56 -0
  104. package/dist/planmagnet/satisfaction/SatisfactionSummaryCard.js.map +1 -0
  105. package/dist/planmagnet/satisfaction/SatisfactionWindowPicker.d.ts +16 -0
  106. package/dist/planmagnet/satisfaction/SatisfactionWindowPicker.d.ts.map +1 -0
  107. package/dist/planmagnet/satisfaction/SatisfactionWindowPicker.js +102 -0
  108. package/dist/planmagnet/satisfaction/SatisfactionWindowPicker.js.map +1 -0
  109. package/dist/planmagnet/satisfaction/satisfaction.d.ts +154 -0
  110. package/dist/planmagnet/satisfaction/satisfaction.d.ts.map +1 -0
  111. package/dist/planmagnet/satisfaction/satisfaction.js +210 -0
  112. package/dist/planmagnet/satisfaction/satisfaction.js.map +1 -0
  113. package/dist/planmagnet/satisfaction/satisfactionCsv.d.ts +108 -0
  114. package/dist/planmagnet/satisfaction/satisfactionCsv.d.ts.map +1 -0
  115. package/dist/planmagnet/satisfaction/satisfactionCsv.js +211 -0
  116. package/dist/planmagnet/satisfaction/satisfactionCsv.js.map +1 -0
  117. package/dist/planmagnet/satisfaction/satisfactionForm.d.ts +90 -0
  118. package/dist/planmagnet/satisfaction/satisfactionForm.d.ts.map +1 -0
  119. package/dist/planmagnet/satisfaction/satisfactionForm.js +90 -0
  120. package/dist/planmagnet/satisfaction/satisfactionForm.js.map +1 -0
  121. package/dist/planmagnet/satisfaction/satisfactionOperations.d.ts +116 -0
  122. package/dist/planmagnet/satisfaction/satisfactionOperations.d.ts.map +1 -0
  123. package/dist/planmagnet/satisfaction/satisfactionOperations.js +86 -0
  124. package/dist/planmagnet/satisfaction/satisfactionOperations.js.map +1 -0
  125. package/dist/planmagnet/satisfaction/useSatisfactionAccess.d.ts +20 -0
  126. package/dist/planmagnet/satisfaction/useSatisfactionAccess.d.ts.map +1 -0
  127. package/dist/planmagnet/satisfaction/useSatisfactionAccess.js +31 -0
  128. package/dist/planmagnet/satisfaction/useSatisfactionAccess.js.map +1 -0
  129. package/dist/planmagnet/skills/RequiredSkillsEditor.d.ts +35 -0
  130. package/dist/planmagnet/skills/RequiredSkillsEditor.d.ts.map +1 -0
  131. package/dist/planmagnet/skills/RequiredSkillsEditor.js +124 -0
  132. package/dist/planmagnet/skills/RequiredSkillsEditor.js.map +1 -0
  133. package/dist/planmagnet/skills/SkillChips.d.ts +30 -0
  134. package/dist/planmagnet/skills/SkillChips.d.ts.map +1 -0
  135. package/dist/planmagnet/skills/SkillChips.js +57 -0
  136. package/dist/planmagnet/skills/SkillChips.js.map +1 -0
  137. package/dist/planmagnet/skills/SkillCoverageCard.d.ts +24 -0
  138. package/dist/planmagnet/skills/SkillCoverageCard.d.ts.map +1 -0
  139. package/dist/planmagnet/skills/SkillCoverageCard.js +256 -0
  140. package/dist/planmagnet/skills/SkillCoverageCard.js.map +1 -0
  141. package/dist/planmagnet/skills/WorkItemRequiredSkills.d.ts +10 -0
  142. package/dist/planmagnet/skills/WorkItemRequiredSkills.d.ts.map +1 -0
  143. package/dist/planmagnet/skills/WorkItemRequiredSkills.js +65 -0
  144. package/dist/planmagnet/skills/WorkItemRequiredSkills.js.map +1 -0
  145. package/dist/planmagnet/skills/skillOperations.d.ts +52 -0
  146. package/dist/planmagnet/skills/skillOperations.d.ts.map +1 -0
  147. package/dist/planmagnet/skills/skillOperations.js +44 -0
  148. package/dist/planmagnet/skills/skillOperations.js.map +1 -0
  149. package/dist/planmagnet/skills/skillTags.d.ts +103 -0
  150. package/dist/planmagnet/skills/skillTags.d.ts.map +1 -0
  151. package/dist/planmagnet/skills/skillTags.js +115 -0
  152. package/dist/planmagnet/skills/skillTags.js.map +1 -0
  153. package/dist/planmagnet/skills/useRequiredSkillsDraft.d.ts +28 -0
  154. package/dist/planmagnet/skills/useRequiredSkillsDraft.d.ts.map +1 -0
  155. package/dist/planmagnet/skills/useRequiredSkillsDraft.js +30 -0
  156. package/dist/planmagnet/skills/useRequiredSkillsDraft.js.map +1 -0
  157. package/dist/planmagnet/team/PendingInvitations.d.ts +27 -0
  158. package/dist/planmagnet/team/PendingInvitations.d.ts.map +1 -0
  159. package/dist/planmagnet/team/PendingInvitations.js +220 -0
  160. package/dist/planmagnet/team/PendingInvitations.js.map +1 -0
  161. package/dist/planmagnet/team/invitationEmail.d.ts +35 -0
  162. package/dist/planmagnet/team/invitationEmail.d.ts.map +1 -0
  163. package/dist/planmagnet/team/invitationEmail.js +73 -0
  164. package/dist/planmagnet/team/invitationEmail.js.map +1 -0
  165. package/package.json +1 -1
@@ -4,9 +4,9 @@ import { LEAVES_PAGE_CONTEXT as r, throwOnError as i } from "../utils/mutationRe
4
4
  import { ConfirmButton as a, ErrorLine as o } from "../controls/ConfirmButton.js";
5
5
  import { AssigneeSelect as s, enumLabel as c } from "../controls/WorkItemControls.js";
6
6
  import { detailPath as l } from "../utils/rowNavigation.js";
7
- import { ARCHIVE_PRODUCT_FEATURE as u, CREATE_PRODUCT_FEATURE as d, DELETE_PRODUCT_FEATURE as f, PRODUCT_FEATURES_LIST as p, PRODUCT_FEATURE_QUERIES as m, UNARCHIVE_PRODUCT_FEATURE as h, UPDATE_PRODUCT_FEATURE as g } from "./hierarchyOperations.js";
8
- import { PRODUCT_FEATURE_STATUSES as _, changedFields as v, normalizeText as y, productFeatureStatusVariant as b } from "./hierarchy.js";
9
- import { refusalMessage as x } from "./refusal.js";
7
+ import { refusalMessage as u } from "./refusal.js";
8
+ import { ARCHIVE_PRODUCT_FEATURE as d, CREATE_PRODUCT_FEATURE as f, DELETE_PRODUCT_FEATURE as p, PRODUCT_FEATURES_LIST as m, PRODUCT_FEATURE_QUERIES as h, UNARCHIVE_PRODUCT_FEATURE as g, UPDATE_PRODUCT_FEATURE as _ } from "./hierarchyOperations.js";
9
+ import { PRODUCT_FEATURE_STATUSES as v, changedFields as y, normalizeText as b, productFeatureStatusVariant as x } from "./hierarchy.js";
10
10
  import { useState as S } from "react";
11
11
  import { Archive as C, ArchiveRestore as w, Pencil as T, Plus as E, Puzzle as D, Trash2 as O } from "lucide-react";
12
12
  import { useMutation as k, useQuery as A } from "@apollo/client/react";
@@ -14,7 +14,7 @@ import { jsx as j, jsxs as M } from "react/jsx-runtime";
14
14
  import { Badge as N, Button as P, Input as F, ResponsiveDialog as I, ResponsiveDialogContent as L, ResponsiveDialogDescription as R, ResponsiveDialogFooter as z, ResponsiveDialogHeader as B, ResponsiveDialogTitle as V, ResponsiveDialogTrigger as H } from "@burdenoff/fe-libs/ui";
15
15
  //#region src/planmagnet/product/ProductFeatureControls.tsx
16
16
  var U = "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm min-h-[72px]", W = "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm disabled:opacity-60", G = {
17
- refetchQueries: m,
17
+ refetchQueries: h,
18
18
  awaitRefetchQueries: !0
19
19
  };
20
20
  function K() {
@@ -22,31 +22,31 @@ function K() {
22
22
  }
23
23
  function q({ status: e }) {
24
24
  return /* @__PURE__ */ j(N, {
25
- variant: b(e),
25
+ variant: x(e),
26
26
  className: "text-xs",
27
27
  "data-testid": "product-feature-status",
28
28
  children: c(e)
29
29
  });
30
30
  }
31
31
  function J({ productId: t, feature: r, disabled: a = !1 }) {
32
- let l = n(), u = K(), { currentUser: f } = e(), p = {
32
+ let l = n(), d = K(), { currentUser: p } = e(), m = {
33
33
  name: r?.name ?? "",
34
34
  description: r?.description ?? "",
35
35
  status: r?.status ?? "BACKLOG",
36
- ownerId: r ? r.ownerId ?? "" : f?.id ?? ""
37
- }, [m, h] = S(!1), [b, C] = S(p), [w, D] = S(null), [O, A] = k(d, G), [N, q] = k(g, G), J = A.loading || q.loading, Y = b.name.trim() !== "" && !J, X = r ? `product-feature-edit-${r.id}` : `product-feature-new-${t}`, Z = _.includes(b.status) ? _ : [b.status, ..._], Q = async () => {
36
+ ownerId: r ? r.ownerId ?? "" : p?.id ?? ""
37
+ }, [h, g] = S(!1), [x, C] = S(m), [w, D] = S(null), [O, A] = k(f, G), [N, q] = k(_, G), J = A.loading || q.loading, Y = x.name.trim() !== "" && !J, X = r ? `product-feature-edit-${r.id}` : `product-feature-new-${t}`, Z = v.includes(x.status) ? v : [x.status, ...v], Q = async () => {
38
38
  D(null);
39
39
  let e = {
40
- name: b.name.trim(),
41
- description: y(b.description),
42
- status: b.status,
43
- ownerId: b.ownerId || null
40
+ name: x.name.trim(),
41
+ description: b(x.description),
42
+ status: x.status,
43
+ ownerId: x.ownerId || null
44
44
  };
45
45
  try {
46
46
  if (r) {
47
- let t = v({
47
+ let t = y({
48
48
  name: r.name.trim(),
49
- description: y(r.description ?? ""),
49
+ description: b(r.description ?? ""),
50
50
  status: r.status,
51
51
  ownerId: r.ownerId
52
52
  }, e);
@@ -61,15 +61,15 @@ function J({ productId: t, feature: r, disabled: a = !1 }) {
61
61
  ...e.description ? { description: e.description } : {},
62
62
  ...e.ownerId ? { ownerId: e.ownerId } : {}
63
63
  } } }));
64
- h(!1);
64
+ g(!1);
65
65
  } catch (e) {
66
- D(x(e, r ? l("planmagnet.productFeatures.errors.save", "The feature could not be saved.") : l("planmagnet.productFeatures.errors.create", "The feature could not be created."), u));
66
+ D(u(e, r ? l("planmagnet.productFeatures.errors.save", "The feature could not be saved.") : l("planmagnet.productFeatures.errors.create", "The feature could not be created."), d));
67
67
  }
68
68
  };
69
69
  return /* @__PURE__ */ M(I, {
70
- open: m,
70
+ open: h,
71
71
  onOpenChange: (e) => {
72
- h(e), e ? C(p) : D(null);
72
+ g(e), e ? C(m) : D(null);
73
73
  },
74
74
  children: [/* @__PURE__ */ j(H, {
75
75
  asChild: !0,
@@ -98,10 +98,10 @@ function J({ productId: t, feature: r, disabled: a = !1 }) {
98
98
  }), /* @__PURE__ */ j(F, {
99
99
  id: `${X}-name`,
100
100
  className: "mt-1",
101
- value: b.name,
101
+ value: x.name,
102
102
  placeholder: l("planmagnet.productFeatures.fields.namePlaceholder", "e.g. Single sign-on"),
103
103
  onChange: (e) => C({
104
- ...b,
104
+ ...x,
105
105
  name: e.target.value
106
106
  }),
107
107
  "data-testid": "product-feature-name"
@@ -113,9 +113,9 @@ function J({ productId: t, feature: r, disabled: a = !1 }) {
113
113
  }), /* @__PURE__ */ j("textarea", {
114
114
  id: `${X}-description`,
115
115
  className: U,
116
- value: b.description,
116
+ value: x.description,
117
117
  onChange: (e) => C({
118
- ...b,
118
+ ...x,
119
119
  description: e.target.value
120
120
  }),
121
121
  "data-testid": "product-feature-description"
@@ -129,9 +129,9 @@ function J({ productId: t, feature: r, disabled: a = !1 }) {
129
129
  }), /* @__PURE__ */ j("select", {
130
130
  id: `${X}-status`,
131
131
  className: W,
132
- value: b.status,
132
+ value: x.status,
133
133
  onChange: (e) => C({
134
- ...b,
134
+ ...x,
135
135
  status: e.target.value
136
136
  }),
137
137
  "data-testid": "product-feature-status-select",
@@ -147,10 +147,10 @@ function J({ productId: t, feature: r, disabled: a = !1 }) {
147
147
  className: "mt-1",
148
148
  children: /* @__PURE__ */ j(s, {
149
149
  id: `${X}-owner`,
150
- value: b.ownerId,
150
+ value: x.ownerId,
151
151
  noneLabel: l("planmagnet.productFeatures.fields.noOwner", "No owner"),
152
152
  onChange: (e) => C({
153
- ...b,
153
+ ...x,
154
154
  ownerId: e
155
155
  })
156
156
  })
@@ -170,19 +170,19 @@ function J({ productId: t, feature: r, disabled: a = !1 }) {
170
170
  });
171
171
  }
172
172
  function Y({ feature: e, epicCount: s, requestCount: c }) {
173
- let d = n(), p = K(), m = t(), [g, _] = k(u, G), [v, y] = k(h, G), [b, T] = k(f, { context: r }), [E, D] = S(null), A = _.loading || y.loading || T.loading, N = async () => {
173
+ let f = n(), m = K(), h = t(), [_, v] = k(d, G), [y, b] = k(g, G), [x, T] = k(p, { context: r }), [E, D] = S(null), A = v.loading || b.loading || T.loading, N = async () => {
174
174
  D(null);
175
175
  try {
176
- e.archivedAt ? await i(v({ variables: { id: e.id } })) : await i(g({ variables: { id: e.id } }));
176
+ e.archivedAt ? await i(y({ variables: { id: e.id } })) : await i(_({ variables: { id: e.id } }));
177
177
  } catch (e) {
178
- D(x(e, d("planmagnet.productFeatures.errors.update", "The feature could not be updated."), p));
178
+ D(u(e, f("planmagnet.productFeatures.errors.update", "The feature could not be updated."), m));
179
179
  }
180
180
  }, F = async () => {
181
181
  D(null);
182
182
  try {
183
- await i(b({ variables: { id: e.id } })), m(l("/products/product-detail-page", e.productId));
183
+ await i(x({ variables: { id: e.id } })), h(l("/products/product-detail-page", e.productId));
184
184
  } catch (e) {
185
- D(x(e, d("planmagnet.productFeatures.errors.delete", "The feature could not be deleted."), p));
185
+ D(u(e, f("planmagnet.productFeatures.errors.delete", "The feature could not be deleted."), m));
186
186
  }
187
187
  };
188
188
  return /* @__PURE__ */ M("div", {
@@ -200,19 +200,19 @@ function Y({ feature: e, epicCount: s, requestCount: c }) {
200
200
  disabled: A,
201
201
  onClick: () => void N(),
202
202
  "data-testid": "product-feature-toggle-archive",
203
- children: [e.archivedAt ? /* @__PURE__ */ j(w, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ j(C, { className: "mr-1 h-4 w-4" }), e.archivedAt ? d("planmagnet.productFeatures.actions.unarchive", "Unarchive") : d("planmagnet.productFeatures.actions.archive", "Archive")]
203
+ children: [e.archivedAt ? /* @__PURE__ */ j(w, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ j(C, { className: "mr-1 h-4 w-4" }), e.archivedAt ? f("planmagnet.productFeatures.actions.unarchive", "Unarchive") : f("planmagnet.productFeatures.actions.archive", "Archive")]
204
204
  }),
205
205
  /* @__PURE__ */ j(a, {
206
- label: d("planmagnet.productFeatures.actions.delete", "Delete"),
206
+ label: f("planmagnet.productFeatures.actions.delete", "Delete"),
207
207
  variant: "outline",
208
208
  icon: /* @__PURE__ */ j(O, { className: "mr-1 h-4 w-4" }),
209
209
  testId: "product-feature-delete",
210
- title: d("planmagnet.productFeatures.confirmDelete.title", "Delete {{name}}?", { name: e.name }),
211
- description: d("planmagnet.productFeatures.confirmDelete.description", "Its {{requests}} feature request(s) and {{epics}} epic(s) are kept — only their links to this feature are removed, and stories stay under their epics. No request or work item is deleted or changed. This cannot be undone here.", {
210
+ title: f("planmagnet.productFeatures.confirmDelete.title", "Delete {{name}}?", { name: e.name }),
211
+ description: f("planmagnet.productFeatures.confirmDelete.description", "Its {{requests}} feature request(s) and {{epics}} epic(s) are kept — only their links to this feature are removed, and stories stay under their epics. No request or work item is deleted or changed. This cannot be undone here.", {
212
212
  requests: c,
213
213
  epics: s
214
214
  }),
215
- confirmLabel: d("planmagnet.productFeatures.confirmDelete.confirm", "Delete feature"),
215
+ confirmLabel: f("planmagnet.productFeatures.confirmDelete.confirm", "Delete feature"),
216
216
  destructive: !0,
217
217
  disabled: A,
218
218
  onConfirm: () => void F()
@@ -222,14 +222,14 @@ function Y({ feature: e, epicCount: s, requestCount: c }) {
222
222
  });
223
223
  }
224
224
  function X({ productId: r, productArchived: i }) {
225
- let a = n(), { workspaceId: s } = e(), c = t(), [u, d] = S(!1), { data: f, previousData: m, loading: h, error: g } = A(p, {
225
+ let a = n(), { workspaceId: s } = e(), c = t(), [u, d] = S(!1), { data: f, previousData: p, loading: h, error: g } = A(m, {
226
226
  variables: {
227
227
  workspaceId: s ?? "",
228
228
  productId: r,
229
229
  filter: u ? void 0 : { isActive: !0 }
230
230
  },
231
231
  skip: !s || !r
232
- }), _ = (f ?? m)?.planmagnetProductFeatures, v = _?.items ?? [];
232
+ }), _ = (f ?? p)?.planmagnetProductFeatures, v = _?.items ?? [];
233
233
  return /* @__PURE__ */ M("div", {
234
234
  className: "space-y-3",
235
235
  "data-testid": "product-features",
@@ -4,8 +4,8 @@ import { throwOnError as r } from "../utils/mutationResult.js";
4
4
  import { ErrorLine as i } from "../controls/ConfirmButton.js";
5
5
  import { detailPath as a } from "../utils/rowNavigation.js";
6
6
  import { ProductSelect as o } from "../controls/Pickers.js";
7
- import { FEATURE_REQUEST_FEATURE_OPTIONS as s, FEATURE_REQUEST_PRODUCT_FEATURE as c, LINK_FEATURE_REQUEST_TO_PRODUCT_FEATURE as l, PRODUCT_FEATURE_QUERIES as u, UNLINK_FEATURE_REQUEST_FROM_PRODUCT_FEATURE as d } from "./hierarchyOperations.js";
8
- import { refusalMessage as f } from "./refusal.js";
7
+ import { refusalMessage as s } from "./refusal.js";
8
+ import { FEATURE_REQUEST_FEATURE_OPTIONS as c, FEATURE_REQUEST_PRODUCT_FEATURE as l, LINK_FEATURE_REQUEST_TO_PRODUCT_FEATURE as u, PRODUCT_FEATURE_QUERIES as d, UNLINK_FEATURE_REQUEST_FROM_PRODUCT_FEATURE as f } from "./hierarchyOperations.js";
9
9
  import { ProductFeatureStatusBadge as p } from "./ProductFeatureControls.js";
10
10
  import { useState as m } from "react";
11
11
  import { Link2 as h, Puzzle as g, X as _ } from "lucide-react";
@@ -15,19 +15,19 @@ import { Badge as S, Button as C, Card as w, CardContent as T, CardHeader as E,
15
15
  //#region src/planmagnet/product/ProductFeatureLinkCard.tsx
16
16
  var O = "w-full rounded-md border border-input bg-background px-3 py-2 text-sm disabled:opacity-60";
17
17
  function k({ featureRequestId: k }) {
18
- let A = n(), { workspaceId: j } = e(), M = t(), [N, P] = m(!1), [F, I] = m(""), [L, R] = m(""), [z, B] = m(null), V = y(c, {
18
+ let A = n(), { workspaceId: j } = e(), M = t(), [N, P] = m(!1), [F, I] = m(""), [L, R] = m(""), [z, B] = m(null), V = y(l, {
19
19
  variables: { id: k },
20
20
  skip: !k
21
- }), H = V.data?.planmagnetFeatureRequest ?? null, U = H?.productFeature ?? null, W = H?.productId ?? F, G = y(s, {
21
+ }), H = V.data?.planmagnetFeatureRequest ?? null, U = H?.productFeature ?? null, W = H?.productId ?? F, G = y(c, {
22
22
  variables: {
23
23
  workspaceId: j ?? "",
24
24
  productId: W
25
25
  },
26
26
  skip: !N || !j || !W
27
27
  }), K = {
28
- refetchQueries: u,
28
+ refetchQueries: d,
29
29
  awaitRefetchQueries: !0
30
- }, [q, J] = v(l, K), [Y, X] = v(d, K), Z = A("planmagnet.productFeatures.errors.forbiddenLinks", "Your role cannot change what this feature is linked to."), Q = (G.data?.planmagnetProductFeatures.items ?? []).filter((e) => e.id !== U?.id), $ = () => {
30
+ }, [q, J] = v(u, K), [Y, X] = v(f, K), Z = A("planmagnet.productFeatures.errors.forbiddenLinks", "Your role cannot change what this feature is linked to."), Q = (G.data?.planmagnetProductFeatures.items ?? []).filter((e) => e.id !== U?.id), $ = () => {
31
31
  P(!1), I(""), R("");
32
32
  }, ee = async () => {
33
33
  if (L) {
@@ -38,7 +38,7 @@ function k({ featureRequestId: k }) {
38
38
  productFeatureId: L
39
39
  } })), $();
40
40
  } catch (e) {
41
- B(f(e, A("planmagnet.productFeatures.requestCard.errors.link", "The request could not be linked to the feature."), Z));
41
+ B(s(e, A("planmagnet.productFeatures.requestCard.errors.link", "The request could not be linked to the feature."), Z));
42
42
  }
43
43
  }
44
44
  }, te = async () => {
@@ -50,7 +50,7 @@ function k({ featureRequestId: k }) {
50
50
  productFeatureId: U.id
51
51
  } }));
52
52
  } catch (e) {
53
- B(f(e, A("planmagnet.productFeatures.requestCard.errors.unlink", "The request could not be unlinked from the feature."), Z));
53
+ B(s(e, A("planmagnet.productFeatures.requestCard.errors.unlink", "The request could not be unlinked from the feature."), Z));
54
54
  }
55
55
  }
56
56
  };
@@ -4,9 +4,9 @@ import { throwOnError as r } from "../utils/mutationResult.js";
4
4
  import { ConfirmButton as i, ErrorLine as a } from "../controls/ConfirmButton.js";
5
5
  import { AssigneeSelect as o } from "../controls/WorkItemControls.js";
6
6
  import { detailPath as s } from "../utils/rowNavigation.js";
7
- import { ARCHIVE_PRODUCT_LINE as c, ASSIGN_PRODUCT_LINE as l, CREATE_PRODUCT_LINE as u, DELETE_PRODUCT_LINE as d, PRODUCT_LINE_ASSIGNMENT as f, PRODUCT_LINE_CANDIDATE_PRODUCTS as p, PRODUCT_LINE_OPTIONS as m, PRODUCT_LINE_QUERIES as h, UNARCHIVE_PRODUCT_LINE as g, UPDATE_PRODUCT_LINE as _ } from "./hierarchyOperations.js";
8
- import { changedFields as v, normalizeText as y } from "./hierarchy.js";
9
- import { refusalMessage as b } from "./refusal.js";
7
+ import { refusalMessage as c } from "./refusal.js";
8
+ import { ARCHIVE_PRODUCT_LINE as l, ASSIGN_PRODUCT_LINE as u, CREATE_PRODUCT_LINE as d, DELETE_PRODUCT_LINE as f, PRODUCT_LINE_ASSIGNMENT as p, PRODUCT_LINE_CANDIDATE_PRODUCTS as m, PRODUCT_LINE_OPTIONS as h, PRODUCT_LINE_QUERIES as g, UNARCHIVE_PRODUCT_LINE as _, UPDATE_PRODUCT_LINE as v } from "./hierarchyOperations.js";
9
+ import { changedFields as y, normalizeText as b } from "./hierarchy.js";
10
10
  import { useState as x } from "react";
11
11
  import { Archive as S, ArchiveRestore as C, Pencil as w, Plus as T, Trash2 as E, X as D } from "lucide-react";
12
12
  import { useMutation as O, useQuery as k } from "@apollo/client/react";
@@ -14,29 +14,29 @@ import { jsx as A, jsxs as j } from "react/jsx-runtime";
14
14
  import { Badge as M, Button as N, Checkbox as P, Input as F, ResponsiveDialog as I, ResponsiveDialogContent as L, ResponsiveDialogDescription as R, ResponsiveDialogFooter as z, ResponsiveDialogHeader as B, ResponsiveDialogTitle as V, ResponsiveDialogTrigger as H } from "@burdenoff/fe-libs/ui";
15
15
  //#region src/planmagnet/product/ProductLineControls.tsx
16
16
  var U = "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm min-h-[72px]", W = "w-full rounded-md border border-input bg-background px-3 py-2 text-sm disabled:opacity-60", G = {
17
- refetchQueries: h,
17
+ refetchQueries: g,
18
18
  awaitRefetchQueries: !0
19
19
  };
20
20
  function K() {
21
21
  return n()("planmagnet.productLines.errors.forbidden", "Your role cannot change product lines in this workspace.");
22
22
  }
23
23
  function q({ line: t }) {
24
- let i = n(), s = K(), { currentUser: c } = e(), l = {
24
+ let i = n(), s = K(), { currentUser: l } = e(), u = {
25
25
  name: t?.name ?? "",
26
26
  description: t?.description ?? "",
27
- ownerId: t ? t.ownerId ?? "" : c?.id ?? ""
28
- }, [d, f] = x(!1), [p, m] = x(l), [h, g] = x(null), [S, C] = O(u, G), [E, D] = O(_, G), k = C.loading || D.loading, M = p.name.trim() !== "" && !k, P = t ? `product-line-edit-${t.id}` : "product-line-new", W = async () => {
29
- g(null);
27
+ ownerId: t ? t.ownerId ?? "" : l?.id ?? ""
28
+ }, [f, p] = x(!1), [m, h] = x(u), [g, _] = x(null), [S, C] = O(d, G), [E, D] = O(v, G), k = C.loading || D.loading, M = m.name.trim() !== "" && !k, P = t ? `product-line-edit-${t.id}` : "product-line-new", W = async () => {
29
+ _(null);
30
30
  let e = {
31
- name: p.name.trim(),
32
- description: y(p.description),
33
- ownerId: p.ownerId || null
31
+ name: m.name.trim(),
32
+ description: b(m.description),
33
+ ownerId: m.ownerId || null
34
34
  };
35
35
  try {
36
36
  if (t) {
37
- let n = v({
37
+ let n = y({
38
38
  name: t.name.trim(),
39
- description: y(t.description ?? ""),
39
+ description: b(t.description ?? ""),
40
40
  ownerId: t.ownerId
41
41
  }, e);
42
42
  Object.keys(n).length > 0 && await r(E({ variables: {
@@ -48,15 +48,15 @@ function q({ line: t }) {
48
48
  ...e.description ? { description: e.description } : {},
49
49
  ...e.ownerId ? { ownerId: e.ownerId } : {}
50
50
  } } }));
51
- f(!1);
51
+ p(!1);
52
52
  } catch (e) {
53
- g(b(e, t ? i("planmagnet.productLines.errors.save", "The product line could not be saved.") : i("planmagnet.productLines.errors.create", "The product line could not be created."), s));
53
+ _(c(e, t ? i("planmagnet.productLines.errors.save", "The product line could not be saved.") : i("planmagnet.productLines.errors.create", "The product line could not be created."), s));
54
54
  }
55
55
  };
56
56
  return /* @__PURE__ */ j(I, {
57
- open: d,
57
+ open: f,
58
58
  onOpenChange: (e) => {
59
- f(e), e ? m(l) : g(null);
59
+ p(e), e ? h(u) : _(null);
60
60
  },
61
61
  children: [/* @__PURE__ */ A(H, {
62
62
  asChild: !0,
@@ -85,10 +85,10 @@ function q({ line: t }) {
85
85
  }), /* @__PURE__ */ A(F, {
86
86
  id: `${P}-name`,
87
87
  className: "mt-1",
88
- value: p.name,
88
+ value: m.name,
89
89
  placeholder: i("planmagnet.productLines.fields.namePlaceholder", "e.g. Mobile apps"),
90
- onChange: (e) => m({
91
- ...p,
90
+ onChange: (e) => h({
91
+ ...m,
92
92
  name: e.target.value
93
93
  }),
94
94
  "data-testid": "product-line-name"
@@ -100,9 +100,9 @@ function q({ line: t }) {
100
100
  }), /* @__PURE__ */ A("textarea", {
101
101
  id: `${P}-description`,
102
102
  className: U,
103
- value: p.description,
104
- onChange: (e) => m({
105
- ...p,
103
+ value: m.description,
104
+ onChange: (e) => h({
105
+ ...m,
106
106
  description: e.target.value
107
107
  }),
108
108
  "data-testid": "product-line-description"
@@ -115,17 +115,17 @@ function q({ line: t }) {
115
115
  className: "mt-1",
116
116
  children: /* @__PURE__ */ A(o, {
117
117
  id: `${P}-owner`,
118
- value: p.ownerId,
118
+ value: m.ownerId,
119
119
  noneLabel: i("planmagnet.productLines.fields.noOwner", "No owner"),
120
- onChange: (e) => m({
121
- ...p,
120
+ onChange: (e) => h({
121
+ ...m,
122
122
  ownerId: e
123
123
  })
124
124
  })
125
125
  })] })
126
126
  ]
127
127
  }),
128
- h && /* @__PURE__ */ A(a, { message: h }),
128
+ g && /* @__PURE__ */ A(a, { message: g }),
129
129
  /* @__PURE__ */ A(z, { children: /* @__PURE__ */ A(N, {
130
130
  onClick: () => void W(),
131
131
  disabled: !M,
@@ -137,19 +137,19 @@ function q({ line: t }) {
137
137
  });
138
138
  }
139
139
  function J({ line: e, productCount: t, onArchived: o, onDeleted: s }) {
140
- let l = n(), u = K(), [f, p] = O(c, G), [m, h] = O(g, G), [_, v] = O(d, G), [y, w] = x(null), T = p.loading || h.loading || v.loading, D = async () => {
140
+ let u = n(), d = K(), [p, m] = O(l, G), [h, g] = O(_, G), [v, y] = O(f, G), [b, w] = x(null), T = m.loading || g.loading || y.loading, D = async () => {
141
141
  w(null);
142
142
  try {
143
- e.archivedAt ? await r(m({ variables: { id: e.id } })) : (await r(f({ variables: { id: e.id } })), o?.(e.name));
143
+ e.archivedAt ? await r(h({ variables: { id: e.id } })) : (await r(p({ variables: { id: e.id } })), o?.(e.name));
144
144
  } catch (e) {
145
- w(b(e, l("planmagnet.productLines.errors.update", "The product line could not be updated."), u));
145
+ w(c(e, u("planmagnet.productLines.errors.update", "The product line could not be updated."), d));
146
146
  }
147
147
  }, k = async () => {
148
148
  w(null);
149
149
  try {
150
- await r(_({ variables: { id: e.id } })), s?.(e.name);
150
+ await r(v({ variables: { id: e.id } })), s?.(e.name);
151
151
  } catch (e) {
152
- w(b(e, l("planmagnet.productLines.errors.delete", "The product line could not be deleted."), u));
152
+ w(c(e, u("planmagnet.productLines.errors.delete", "The product line could not be deleted."), d));
153
153
  }
154
154
  };
155
155
  return /* @__PURE__ */ j("div", {
@@ -164,36 +164,36 @@ function J({ line: e, productCount: t, onArchived: o, onDeleted: s }) {
164
164
  disabled: T,
165
165
  onClick: () => void D(),
166
166
  "data-testid": "product-line-toggle-archive",
167
- children: [e.archivedAt ? /* @__PURE__ */ A(C, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ A(S, { className: "mr-1 h-4 w-4" }), e.archivedAt ? l("planmagnet.productLines.actions.unarchive", "Unarchive") : l("planmagnet.productLines.actions.archive", "Archive")]
167
+ children: [e.archivedAt ? /* @__PURE__ */ A(C, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ A(S, { className: "mr-1 h-4 w-4" }), e.archivedAt ? u("planmagnet.productLines.actions.unarchive", "Unarchive") : u("planmagnet.productLines.actions.archive", "Archive")]
168
168
  }),
169
169
  /* @__PURE__ */ A(i, {
170
- label: l("planmagnet.productLines.actions.delete", "Delete"),
170
+ label: u("planmagnet.productLines.actions.delete", "Delete"),
171
171
  variant: "outline",
172
172
  icon: /* @__PURE__ */ A(E, { className: "mr-1 h-4 w-4" }),
173
173
  testId: "product-line-delete",
174
- title: l("planmagnet.productLines.confirmDelete.title", "Delete {{name}}?", { name: e.name }),
175
- description: t === 0 ? l("planmagnet.productLines.confirmDelete.empty", "The line has no products. Nothing else changes. This cannot be undone here.") : l("planmagnet.productLines.confirmDelete.withProducts", "Its {{count}} product(s) are kept — they are only taken out of this line and show under \"No product line\". Nothing else about them changes. This cannot be undone here.", { count: t }),
176
- confirmLabel: l("planmagnet.productLines.confirmDelete.confirm", "Delete product line"),
174
+ title: u("planmagnet.productLines.confirmDelete.title", "Delete {{name}}?", { name: e.name }),
175
+ description: t === 0 ? u("planmagnet.productLines.confirmDelete.empty", "The line has no products. Nothing else changes. This cannot be undone here.") : u("planmagnet.productLines.confirmDelete.withProducts", "Its {{count}} product(s) are kept — they are only taken out of this line and show under \"No product line\". Nothing else about them changes. This cannot be undone here.", { count: t }),
176
+ confirmLabel: u("planmagnet.productLines.confirmDelete.confirm", "Delete product line"),
177
177
  destructive: !0,
178
178
  disabled: T,
179
179
  onConfirm: () => void k()
180
180
  })
181
181
  ]
182
- }), y && /* @__PURE__ */ A(a, { message: y })]
182
+ }), b && /* @__PURE__ */ A(a, { message: b })]
183
183
  });
184
184
  }
185
185
  function Y({ line: e, products: i }) {
186
- let o = n(), c = K(), u = t(), [d, f] = O(l, G), [p, m] = x(null), [h, g] = x(null), _ = async (e) => {
187
- g(null), m(e);
186
+ let o = n(), l = K(), d = t(), [f, p] = O(u, G), [m, h] = x(null), [g, _] = x(null), v = async (e) => {
187
+ _(null), h(e);
188
188
  try {
189
- await r(d({ variables: {
189
+ await r(f({ variables: {
190
190
  productId: e,
191
191
  productLineId: null
192
192
  } }));
193
193
  } catch (e) {
194
- g(b(e, o("planmagnet.productLines.errors.unassign", "The product could not be taken out of the line."), c));
194
+ _(c(e, o("planmagnet.productLines.errors.unassign", "The product could not be taken out of the line."), l));
195
195
  } finally {
196
- m(null);
196
+ h(null);
197
197
  }
198
198
  };
199
199
  return /* @__PURE__ */ j("div", {
@@ -220,7 +220,7 @@ function Y({ line: e, products: i }) {
220
220
  children: [/* @__PURE__ */ A("button", {
221
221
  type: "button",
222
222
  className: "min-w-0 truncate text-left hover:underline",
223
- onClick: () => u(s("/products/product-detail-page", e.id)),
223
+ onClick: () => d(s("/products/product-detail-page", e.id)),
224
224
  children: e.name
225
225
  }), /* @__PURE__ */ j("div", {
226
226
  className: "flex shrink-0 items-center gap-2",
@@ -232,43 +232,43 @@ function Y({ line: e, products: i }) {
232
232
  size: "sm",
233
233
  variant: "ghost",
234
234
  "aria-label": o("planmagnet.productLines.products.removeNamed", "Take {{name}} out of this line", { name: e.name }),
235
- disabled: f.loading,
236
- onClick: () => void _(e.id),
235
+ disabled: p.loading,
236
+ onClick: () => void v(e.id),
237
237
  "data-testid": "product-line-product-remove",
238
- children: p === e.id ? "…" : /* @__PURE__ */ A(D, { className: "h-4 w-4" })
238
+ children: m === e.id ? "…" : /* @__PURE__ */ A(D, { className: "h-4 w-4" })
239
239
  })]
240
240
  })]
241
241
  }, e.id))
242
242
  }),
243
- h && /* @__PURE__ */ A(a, { message: h })
243
+ g && /* @__PURE__ */ A(a, { message: g })
244
244
  ]
245
245
  });
246
246
  }
247
247
  function X({ line: t, existingIds: i }) {
248
- let o = n(), s = K(), { workspaceId: c } = e(), [u, d] = x(!1), [f, m] = x(/* @__PURE__ */ new Set()), [h, g] = x(null), { data: _, loading: v, error: y } = k(p, {
249
- variables: { workspaceId: c ?? "" },
250
- skip: !u || !c
251
- }), [S, C] = O(l, G), w = _?.planmagnetProducts.items ?? [], E = w.filter((e) => !i.includes(e.id)), D = _?.planmagnetProducts.totalCount ?? 0, F = (e, t) => m((n) => {
248
+ let o = n(), s = K(), { workspaceId: l } = e(), [d, f] = x(!1), [p, h] = x(/* @__PURE__ */ new Set()), [g, _] = x(null), { data: v, loading: y, error: b } = k(m, {
249
+ variables: { workspaceId: l ?? "" },
250
+ skip: !d || !l
251
+ }), [S, C] = O(u, G), w = v?.planmagnetProducts.items ?? [], E = w.filter((e) => !i.includes(e.id)), D = v?.planmagnetProducts.totalCount ?? 0, F = (e, t) => h((n) => {
252
252
  let r = new Set(n);
253
253
  return t ? r.add(e) : r.delete(e), r;
254
254
  }), U = async () => {
255
- g(null);
255
+ _(null);
256
256
  try {
257
- await Promise.all([...f].map((e) => r(S({ variables: {
257
+ await Promise.all([...p].map((e) => r(S({ variables: {
258
258
  productId: e,
259
259
  productLineId: t.id
260
- } })))), m(/* @__PURE__ */ new Set()), d(!1);
260
+ } })))), h(/* @__PURE__ */ new Set()), f(!1);
261
261
  } catch (e) {
262
- g(b(e, o("planmagnet.productLines.errors.assign", "The products could not be added."), s));
262
+ _(c(e, o("planmagnet.productLines.errors.assign", "The products could not be added."), s));
263
263
  }
264
264
  };
265
265
  return t.archivedAt ? /* @__PURE__ */ A("span", {
266
266
  className: "text-xs text-muted-foreground",
267
267
  children: o("planmagnet.productLines.products.archivedNoAdd", "Unarchive to add products")
268
268
  }) : /* @__PURE__ */ j(I, {
269
- open: u,
269
+ open: d,
270
270
  onOpenChange: (e) => {
271
- d(e), e || (m(/* @__PURE__ */ new Set()), g(null));
271
+ f(e), e || (h(/* @__PURE__ */ new Set()), _(null));
272
272
  },
273
273
  children: [/* @__PURE__ */ A(H, {
274
274
  asChild: !0,
@@ -286,12 +286,12 @@ function X({ line: t, existingIds: i }) {
286
286
  className: "max-h-80 space-y-1 overflow-y-auto",
287
287
  "data-testid": "product-line-add-candidates",
288
288
  children: [
289
- v && !_ && /* @__PURE__ */ A("p", {
289
+ y && !v && /* @__PURE__ */ A("p", {
290
290
  className: "py-4 text-center text-sm text-muted-foreground",
291
291
  children: o("planmagnet.productLines.loading", "Loading…")
292
292
  }),
293
- y && /* @__PURE__ */ A(a, { message: y.message }),
294
- _ && E.length === 0 && /* @__PURE__ */ A("p", {
293
+ b && /* @__PURE__ */ A(a, { message: b.message }),
294
+ v && E.length === 0 && /* @__PURE__ */ A("p", {
295
295
  className: "py-4 text-center text-sm text-muted-foreground",
296
296
  children: w.length === 0 ? o("planmagnet.productLines.products.noProducts", "No products yet.") : o("planmagnet.productLines.products.noCandidates", "Every product is already in this line.")
297
297
  }),
@@ -303,7 +303,7 @@ function X({ line: t, existingIds: i }) {
303
303
  children: [
304
304
  /* @__PURE__ */ A(P, {
305
305
  id: n,
306
- checked: f.has(e.id),
306
+ checked: p.has(e.id),
307
307
  onCheckedChange: (t) => F(e.id, t === !0)
308
308
  }),
309
309
  /* @__PURE__ */ A("span", {
@@ -331,38 +331,38 @@ function X({ line: t, existingIds: i }) {
331
331
  })
332
332
  ]
333
333
  }),
334
- h && /* @__PURE__ */ A(a, { message: h }),
334
+ g && /* @__PURE__ */ A(a, { message: g }),
335
335
  /* @__PURE__ */ A(z, { children: /* @__PURE__ */ A(N, {
336
336
  onClick: () => void U(),
337
- disabled: f.size === 0 || C.loading,
337
+ disabled: p.size === 0 || C.loading,
338
338
  "data-testid": "product-line-add-confirm",
339
- children: C.loading ? o("planmagnet.productLines.actions.adding", "Adding…") : o("planmagnet.productLines.products.addCount", "Add {{count}} product(s)", { count: f.size })
339
+ children: C.loading ? o("planmagnet.productLines.actions.adding", "Adding…") : o("planmagnet.productLines.products.addCount", "Add {{count}} product(s)", { count: p.size })
340
340
  }) })
341
341
  ]
342
342
  })]
343
343
  });
344
344
  }
345
345
  function Z({ productId: i }) {
346
- let o = n(), s = K(), { workspaceId: c } = e(), u = t(), d = k(f, {
346
+ let o = n(), s = K(), { workspaceId: l } = e(), d = t(), f = k(p, {
347
347
  variables: { productId: i },
348
348
  skip: !i
349
- }), p = k(m, {
350
- variables: { workspaceId: c ?? "" },
351
- skip: !c
352
- }), [h, g] = O(l, G), [_, v] = x(null), y = d.data?.planmagnetProduct?.productLine ?? null, S = p.data?.planmagnetProductLines.items ?? [], C = !!y && S.some((e) => e.id === y.id), w = async (e) => {
353
- if (e !== (y?.id ?? "")) {
354
- v(null);
349
+ }), m = k(h, {
350
+ variables: { workspaceId: l ?? "" },
351
+ skip: !l
352
+ }), [g, _] = O(u, G), [v, y] = x(null), b = f.data?.planmagnetProduct?.productLine ?? null, S = m.data?.planmagnetProductLines.items ?? [], C = !!b && S.some((e) => e.id === b.id), w = async (e) => {
353
+ if (e !== (b?.id ?? "")) {
354
+ y(null);
355
355
  try {
356
- await r(h({ variables: {
356
+ await r(g({ variables: {
357
357
  productId: i,
358
358
  productLineId: e || null
359
359
  } }));
360
360
  } catch (e) {
361
- v(b(e, o("planmagnet.productLines.errors.assignOne", "The product line could not be changed."), s));
361
+ y(c(e, o("planmagnet.productLines.errors.assignOne", "The product line could not be changed."), s));
362
362
  }
363
363
  }
364
364
  };
365
- return d.error ? /* @__PURE__ */ A(a, { message: o("planmagnet.productLines.errors.loadAssignment", "The product line could not be loaded: {{message}}", { message: d.error.message }) }) : /* @__PURE__ */ j("div", {
365
+ return f.error ? /* @__PURE__ */ A(a, { message: o("planmagnet.productLines.errors.loadAssignment", "The product line could not be loaded: {{message}}", { message: f.error.message }) }) : /* @__PURE__ */ j("div", {
366
366
  className: "space-y-2",
367
367
  "data-testid": "product-line-picker",
368
368
  children: [
@@ -374,18 +374,18 @@ function Z({ productId: i }) {
374
374
  /* @__PURE__ */ j("select", {
375
375
  id: "product-line-select",
376
376
  className: W,
377
- value: y?.id ?? "",
378
- disabled: g.loading || d.loading && !d.data,
377
+ value: b?.id ?? "",
378
+ disabled: _.loading || f.loading && !f.data,
379
379
  onChange: (e) => void w(e.target.value),
380
380
  children: [
381
381
  /* @__PURE__ */ A("option", {
382
382
  value: "",
383
383
  children: o("planmagnet.productLines.picker.none", "No product line")
384
384
  }),
385
- y && !C && /* @__PURE__ */ A("option", {
386
- value: y.id,
385
+ b && !C && /* @__PURE__ */ A("option", {
386
+ value: b.id,
387
387
  disabled: !0,
388
- children: y.archivedAt ? o("planmagnet.productLines.picker.archivedOption", "{{name}} (archived)", { name: y.name }) : y.name
388
+ children: b.archivedAt ? o("planmagnet.productLines.picker.archivedOption", "{{name}} (archived)", { name: b.name }) : b.name
389
389
  }),
390
390
  S.map((e) => /* @__PURE__ */ A("option", {
391
391
  value: e.id,
@@ -393,8 +393,8 @@ function Z({ productId: i }) {
393
393
  }, e.id))
394
394
  ]
395
395
  }),
396
- p.error && /* @__PURE__ */ A(a, { message: p.error.message }),
397
- _ && /* @__PURE__ */ A(a, { message: _ }),
396
+ m.error && /* @__PURE__ */ A(a, { message: m.error.message }),
397
+ v && /* @__PURE__ */ A(a, { message: v }),
398
398
  /* @__PURE__ */ j("p", {
399
399
  className: "text-xs text-muted-foreground",
400
400
  children: [
@@ -403,7 +403,7 @@ function Z({ productId: i }) {
403
403
  /* @__PURE__ */ A("button", {
404
404
  type: "button",
405
405
  className: "text-primary hover:underline",
406
- onClick: () => u("/products/product-lines-page"),
406
+ onClick: () => d("/products/product-lines-page"),
407
407
  children: o("planmagnet.productLines.picker.manage", "Manage product lines")
408
408
  })
409
409
  ]