@burdenoff/microfe-planmagnet 2026.1126.2 → 2026.1127.2

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.
@@ -1,11 +1,12 @@
1
- import { usePlanMagnet as e } from "../providers/PlanMagnetProvider.js";
2
- import { useDeferredValue as t, useEffect as n, useState as r } from "react";
3
- import { gql as i } from "@apollo/client";
4
- import { useQuery as a } from "@apollo/client/react";
5
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
6
- import { Input as c } from "@burdenoff/fe-libs/ui";
1
+ import { PickerCompetitorsDocument as e } from "../../generated/wspace-operations.js";
2
+ import { usePlanMagnet as t } from "../providers/PlanMagnetProvider.js";
3
+ import { useDeferredValue as n, useEffect as r, useState as i } from "react";
4
+ import { gql as a } from "@apollo/client";
5
+ import { useQuery as o } from "@apollo/client/react";
6
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
7
+ import { Input as l } from "@burdenoff/fe-libs/ui";
7
8
  // src/planmagnet/controls/Pickers.tsx
8
- var l = "w-full rounded-md border border-input bg-background px-3 py-2 text-sm disabled:opacity-60", u = i`
9
+ var u = "w-full rounded-md border border-input bg-background px-3 py-2 text-sm disabled:opacity-60", d = a`
9
10
  query PickerProjects($workspaceId: ID!, $pagination: PlanmagnetPaginationInput) {
10
11
  planmagnetProjects(workspaceId: $workspaceId, pagination: $pagination) {
11
12
  items {
@@ -19,17 +20,17 @@ var l = "w-full rounded-md border border-input bg-background px-3 py-2 text-sm d
19
20
  totalCount
20
21
  }
21
22
  }
22
- `, d = 500;
23
- function f({ id: t, value: r, onChange: i, noneLabel: c, exclude: f = [], disabled: p = !1 }) {
24
- let { workspaceId: m } = e(), { data: h, loading: g, error: _, fetchMore: v } = a(u, {
23
+ `, f = 500;
24
+ function p({ id: e, value: n, onChange: i, noneLabel: a, exclude: l = [], disabled: p = !1 }) {
25
+ let { workspaceId: m } = t(), { data: h, loading: g, error: _, fetchMore: v } = o(d, {
25
26
  variables: {
26
27
  workspaceId: m ?? "",
27
28
  pagination: { first: 100 }
28
29
  },
29
30
  skip: !m
30
31
  }), y = h?.planmagnetProjects.items ?? [], b = h?.planmagnetProjects.pageInfo.hasNextPage ?? !1, x = h?.planmagnetProjects.pageInfo.endCursor ?? null;
31
- n(() => {
32
- !b || !x || y.length >= d || v({
32
+ r(() => {
33
+ !b || !x || y.length >= f || v({
33
34
  variables: { pagination: {
34
35
  first: 100,
35
36
  after: x
@@ -45,35 +46,35 @@ function f({ id: t, value: r, onChange: i, noneLabel: c, exclude: f = [], disabl
45
46
  y.length,
46
47
  v
47
48
  ]);
48
- let S = y.filter((e) => !f.includes(e.id));
49
- return /* @__PURE__ */ s("select", {
50
- id: t,
51
- className: l,
52
- value: r,
49
+ let S = y.filter((e) => !l.includes(e.id));
50
+ return /* @__PURE__ */ c("select", {
51
+ id: e,
52
+ className: u,
53
+ value: n,
53
54
  disabled: p,
54
55
  onChange: (e) => i(e.target.value),
55
56
  children: [
56
- c !== void 0 && /* @__PURE__ */ o("option", {
57
+ a !== void 0 && /* @__PURE__ */ s("option", {
57
58
  value: "",
58
- children: c
59
+ children: a
59
60
  }),
60
- S.length === 0 && c === void 0 && /* @__PURE__ */ o("option", {
61
+ S.length === 0 && a === void 0 && /* @__PURE__ */ s("option", {
61
62
  value: "",
62
63
  children: g && !h ? "Loading projects…" : _ ? "Projects could not be loaded" : "No projects yet"
63
64
  }),
64
- S.map((e) => /* @__PURE__ */ o("option", {
65
+ S.map((e) => /* @__PURE__ */ s("option", {
65
66
  value: e.id,
66
67
  children: e.name
67
68
  }, e.id)),
68
- b && y.length >= d && /* @__PURE__ */ o("option", {
69
+ b && y.length >= f && /* @__PURE__ */ s("option", {
69
70
  value: "",
70
71
  disabled: !0,
71
- children: `Only the first ${d} projects are listed`
72
+ children: `Only the first ${f} projects are listed`
72
73
  })
73
74
  ]
74
75
  });
75
76
  }
76
- var p = i`
77
+ var m = a`
77
78
  query PickerTeams($workspaceId: ID!) {
78
79
  planmagnetTeams(workspaceId: $workspaceId, pagination: { first: 100 }) {
79
80
  items {
@@ -84,35 +85,35 @@ var p = i`
84
85
  }
85
86
  }
86
87
  `;
87
- function m({ id: t, value: n, onChange: r, noneLabel: i, exclude: c = [], disabled: u = !1 }) {
88
- let { workspaceId: d } = e(), { data: f, loading: m, error: h } = a(p, {
88
+ function h({ id: e, value: n, onChange: r, noneLabel: i, exclude: a = [], disabled: l = !1 }) {
89
+ let { workspaceId: d } = t(), { data: f, loading: p, error: h } = o(m, {
89
90
  variables: { workspaceId: d ?? "" },
90
91
  skip: !d
91
- }), g = (f?.planmagnetTeams.items ?? []).filter((e) => !c.includes(e.id));
92
- return /* @__PURE__ */ s("select", {
93
- id: t,
94
- "aria-label": t ? void 0 : "Team",
95
- className: l,
92
+ }), g = (f?.planmagnetTeams.items ?? []).filter((e) => !a.includes(e.id));
93
+ return /* @__PURE__ */ c("select", {
94
+ id: e,
95
+ "aria-label": e ? void 0 : "Team",
96
+ className: u,
96
97
  value: n,
97
- disabled: u,
98
+ disabled: l,
98
99
  onChange: (e) => r(e.target.value),
99
100
  children: [
100
- i !== void 0 && /* @__PURE__ */ o("option", {
101
+ i !== void 0 && /* @__PURE__ */ s("option", {
101
102
  value: "",
102
- children: c.length > 0 && f && g.length === 0 ? "No other team to choose" : i
103
+ children: a.length > 0 && f && g.length === 0 ? "No other team to choose" : i
103
104
  }),
104
- g.length === 0 && i === void 0 && /* @__PURE__ */ o("option", {
105
+ g.length === 0 && i === void 0 && /* @__PURE__ */ s("option", {
105
106
  value: "",
106
- children: m && !f ? "Loading teams…" : h ? "Teams could not be loaded" : "No teams yet"
107
+ children: p && !f ? "Loading teams…" : h ? "Teams could not be loaded" : "No teams yet"
107
108
  }),
108
- g.map((e) => /* @__PURE__ */ o("option", {
109
+ g.map((e) => /* @__PURE__ */ s("option", {
109
110
  value: e.id,
110
111
  children: e.name
111
112
  }, e.id))
112
113
  ]
113
114
  });
114
115
  }
115
- var h = i`
116
+ var g = a`
116
117
  query PickerSprints($workspaceId: ID!, $filter: PlanmagnetSprintFilter) {
117
118
  planmagnetSprints(workspaceId: $workspaceId, filter: $filter, pagination: { first: 100 }) {
118
119
  items {
@@ -124,31 +125,31 @@ var h = i`
124
125
  }
125
126
  }
126
127
  `;
127
- function g({ id: t, value: n, onChange: r, projectId: i, noneLabel: c, disabled: u = !1 }) {
128
- let { workspaceId: d } = e(), { data: f, loading: p, error: m } = a(h, {
128
+ function _({ id: e, value: n, onChange: r, projectId: i, noneLabel: a, disabled: l = !1 }) {
129
+ let { workspaceId: d } = t(), { data: f, loading: p, error: m } = o(g, {
129
130
  variables: {
130
131
  workspaceId: d ?? "",
131
132
  filter: i ? { projectId: i } : void 0
132
133
  },
133
134
  skip: !d
134
- }), g = f?.planmagnetSprints.items ?? [];
135
- return /* @__PURE__ */ s("select", {
136
- id: t,
137
- "aria-label": t ? void 0 : "Sprint",
138
- className: l,
135
+ }), h = f?.planmagnetSprints.items ?? [];
136
+ return /* @__PURE__ */ c("select", {
137
+ id: e,
138
+ "aria-label": e ? void 0 : "Sprint",
139
+ className: u,
139
140
  value: n,
140
- disabled: u,
141
+ disabled: l,
141
142
  onChange: (e) => r(e.target.value),
142
143
  children: [
143
- c !== void 0 && /* @__PURE__ */ o("option", {
144
+ a !== void 0 && /* @__PURE__ */ s("option", {
144
145
  value: "",
145
- children: c
146
+ children: a
146
147
  }),
147
- g.length === 0 && c === void 0 && /* @__PURE__ */ o("option", {
148
+ h.length === 0 && a === void 0 && /* @__PURE__ */ s("option", {
148
149
  value: "",
149
150
  children: p && !f ? "Loading sprints…" : m ? "Sprints could not be loaded" : "No sprints yet"
150
151
  }),
151
- g.map((e) => /* @__PURE__ */ s("option", {
152
+ h.map((e) => /* @__PURE__ */ c("option", {
152
153
  value: e.id,
153
154
  children: [
154
155
  e.name,
@@ -160,7 +161,7 @@ function g({ id: t, value: n, onChange: r, projectId: i, noneLabel: c, disabled:
160
161
  ]
161
162
  });
162
163
  }
163
- var _ = i`
164
+ var v = a`
164
165
  query PickerWorkItems($workspaceId: ID!, $filter: PlanmagnetWorkItemFilter) {
165
166
  planmagnetWorkItems(workspaceId: $workspaceId, filter: $filter, pagination: { first: 20 }) {
166
167
  items {
@@ -172,41 +173,41 @@ var _ = i`
172
173
  }
173
174
  }
174
175
  `;
175
- function v({ id: n, projectId: i, value: u, onChange: d, exclude: f = [] }) {
176
- let { workspaceId: p } = e(), [m, h] = r(""), g = t(m.trim()), { data: v, loading: y } = a(_, {
176
+ function y({ id: e, projectId: r, value: a, onChange: d, exclude: f = [] }) {
177
+ let { workspaceId: p } = t(), [m, h] = i(""), g = n(m.trim()), { data: _, loading: y } = o(v, {
177
178
  variables: {
178
179
  workspaceId: p ?? "",
179
180
  filter: {
180
181
  ...g && { search: g },
181
- ...i && { projectId: i }
182
+ ...r && { projectId: r }
182
183
  }
183
184
  },
184
185
  skip: !p
185
- }), b = v?.planmagnetWorkItems.items ?? [], x = b.filter((e) => !f.includes(e.id)), S = v?.planmagnetWorkItems.totalCount ?? 0;
186
- return /* @__PURE__ */ s("div", {
186
+ }), b = _?.planmagnetWorkItems.items ?? [], x = b.filter((e) => !f.includes(e.id)), S = _?.planmagnetWorkItems.totalCount ?? 0;
187
+ return /* @__PURE__ */ c("div", {
187
188
  className: "space-y-1",
188
189
  children: [
189
- /* @__PURE__ */ o(c, {
190
+ /* @__PURE__ */ s(l, {
190
191
  "aria-label": "Search work items",
191
192
  placeholder: "Search by key or title",
192
193
  value: m,
193
194
  onChange: (e) => h(e.target.value)
194
195
  }),
195
- /* @__PURE__ */ s("select", {
196
- id: n,
197
- className: l,
198
- value: u,
196
+ /* @__PURE__ */ c("select", {
197
+ id: e,
198
+ className: u,
199
+ value: a,
199
200
  onChange: (e) => d(e.target.value),
200
201
  children: [
201
- /* @__PURE__ */ o("option", {
202
+ /* @__PURE__ */ s("option", {
202
203
  value: "",
203
- children: y && !v ? "Searching…" : x.length ? "Choose a work item" : "No match"
204
+ children: y && !_ ? "Searching…" : x.length ? "Choose a work item" : "No match"
204
205
  }),
205
- u && !x.some((e) => e.id === u) && /* @__PURE__ */ o("option", {
206
- value: u,
206
+ a && !x.some((e) => e.id === a) && /* @__PURE__ */ s("option", {
207
+ value: a,
207
208
  children: "Currently linked work item"
208
209
  }),
209
- x.map((e) => /* @__PURE__ */ s("option", {
210
+ x.map((e) => /* @__PURE__ */ c("option", {
210
211
  value: e.id,
211
212
  children: [
212
213
  e.key,
@@ -216,7 +217,7 @@ function v({ id: n, projectId: i, value: u, onChange: d, exclude: f = [] }) {
216
217
  }, e.id))
217
218
  ]
218
219
  }),
219
- S > b.length && /* @__PURE__ */ s("p", {
220
+ S > b.length && /* @__PURE__ */ c("p", {
220
221
  className: "text-xs text-muted-foreground",
221
222
  children: [
222
223
  "Showing ",
@@ -229,7 +230,7 @@ function v({ id: n, projectId: i, value: u, onChange: d, exclude: f = [] }) {
229
230
  ]
230
231
  });
231
232
  }
232
- var y = i`
233
+ var b = a`
233
234
  query PickerDocs($workspaceId: String, $filter: PlanmagnetDocFilter) {
234
235
  planmagnetDocs(workspaceId: $workspaceId, filter: $filter, pagination: { first: 20 }) {
235
236
  items {
@@ -240,37 +241,37 @@ var y = i`
240
241
  }
241
242
  }
242
243
  `;
243
- function b({ id: n, value: i, onChange: u, exclude: d = [] }) {
244
- let { workspaceId: f } = e(), [p, m] = r(""), h = t(p.trim()), { data: g, loading: _ } = a(y, {
244
+ function x({ id: e, value: r, onChange: a, exclude: d = [] }) {
245
+ let { workspaceId: f } = t(), [p, m] = i(""), h = n(p.trim()), { data: g, loading: _ } = o(b, {
245
246
  variables: {
246
247
  workspaceId: f ?? "",
247
248
  filter: h ? { search: h } : void 0
248
249
  },
249
250
  skip: !f
250
- }), v = g?.planmagnetDocs.items ?? [], b = v.filter((e) => !d.includes(e.id)), x = g?.planmagnetDocs.totalCount ?? 0;
251
- return /* @__PURE__ */ s("div", {
251
+ }), v = g?.planmagnetDocs.items ?? [], y = v.filter((e) => !d.includes(e.id)), x = g?.planmagnetDocs.totalCount ?? 0;
252
+ return /* @__PURE__ */ c("div", {
252
253
  className: "space-y-1",
253
254
  children: [
254
- /* @__PURE__ */ o(c, {
255
+ /* @__PURE__ */ s(l, {
255
256
  "aria-label": "Search docs",
256
257
  placeholder: "Search docs by title",
257
258
  value: p,
258
259
  onChange: (e) => m(e.target.value)
259
260
  }),
260
- /* @__PURE__ */ s("select", {
261
- id: n,
262
- className: l,
263
- value: i,
264
- onChange: (e) => u(e.target.value),
265
- children: [/* @__PURE__ */ o("option", {
261
+ /* @__PURE__ */ c("select", {
262
+ id: e,
263
+ className: u,
264
+ value: r,
265
+ onChange: (e) => a(e.target.value),
266
+ children: [/* @__PURE__ */ s("option", {
266
267
  value: "",
267
- children: _ && !g ? "Searching…" : b.length ? "Choose a doc" : "No match"
268
- }), b.map((e) => /* @__PURE__ */ o("option", {
268
+ children: _ && !g ? "Searching…" : y.length ? "Choose a doc" : "No match"
269
+ }), y.map((e) => /* @__PURE__ */ s("option", {
269
270
  value: e.id,
270
271
  children: e.title
271
272
  }, e.id))]
272
273
  }),
273
- x > v.length && /* @__PURE__ */ s("p", {
274
+ x > v.length && /* @__PURE__ */ c("p", {
274
275
  className: "text-xs text-muted-foreground",
275
276
  children: [
276
277
  "Showing ",
@@ -283,7 +284,7 @@ function b({ id: n, value: i, onChange: u, exclude: d = [] }) {
283
284
  ]
284
285
  });
285
286
  }
286
- var x = i`
287
+ var S = a`
287
288
  query PickerPrograms($workspaceId: ID!) {
288
289
  planmagnetPrograms(workspaceId: $workspaceId, pagination: { first: 100 }) {
289
290
  items {
@@ -294,33 +295,33 @@ var x = i`
294
295
  }
295
296
  }
296
297
  `;
297
- function S({ id: t, value: n, onChange: r, noneLabel: i }) {
298
- let { workspaceId: c } = e(), { data: u, loading: d, error: f } = a(x, {
299
- variables: { workspaceId: c ?? "" },
300
- skip: !c
301
- }), p = u?.planmagnetPrograms.items ?? [];
302
- return /* @__PURE__ */ s("select", {
303
- id: t,
304
- className: l,
298
+ function C({ id: e, value: n, onChange: r, noneLabel: i }) {
299
+ let { workspaceId: a } = t(), { data: l, loading: d, error: f } = o(S, {
300
+ variables: { workspaceId: a ?? "" },
301
+ skip: !a
302
+ }), p = l?.planmagnetPrograms.items ?? [];
303
+ return /* @__PURE__ */ c("select", {
304
+ id: e,
305
+ className: u,
305
306
  value: n,
306
307
  onChange: (e) => r(e.target.value),
307
308
  children: [
308
- i !== void 0 && /* @__PURE__ */ o("option", {
309
+ i !== void 0 && /* @__PURE__ */ s("option", {
309
310
  value: "",
310
311
  children: i
311
312
  }),
312
- p.length === 0 && i === void 0 && /* @__PURE__ */ o("option", {
313
+ p.length === 0 && i === void 0 && /* @__PURE__ */ s("option", {
313
314
  value: "",
314
- children: d && !u ? "Loading programs…" : f ? "Programs could not be loaded" : "No programs yet"
315
+ children: d && !l ? "Loading programs…" : f ? "Programs could not be loaded" : "No programs yet"
315
316
  }),
316
- p.map((e) => /* @__PURE__ */ o("option", {
317
+ p.map((e) => /* @__PURE__ */ s("option", {
317
318
  value: e.id,
318
319
  children: e.name
319
320
  }, e.id))
320
321
  ]
321
322
  });
322
323
  }
323
- var C = i`
324
+ var w = a`
324
325
  query PickerPortfolios($workspaceId: ID!) {
325
326
  planmagnetPortfolios(workspaceId: $workspaceId, pagination: { first: 100 }) {
326
327
  items {
@@ -331,87 +332,76 @@ var C = i`
331
332
  }
332
333
  }
333
334
  `;
334
- function w({ id: t, value: n, onChange: r, noneLabel: i }) {
335
- let { workspaceId: c } = e(), { data: u, loading: d, error: f } = a(C, {
336
- variables: { workspaceId: c ?? "" },
337
- skip: !c
338
- }), p = u?.planmagnetPortfolios.items ?? [];
339
- return /* @__PURE__ */ s("select", {
340
- id: t,
341
- className: l,
335
+ function T({ id: e, value: n, onChange: r, noneLabel: i }) {
336
+ let { workspaceId: a } = t(), { data: l, loading: d, error: f } = o(w, {
337
+ variables: { workspaceId: a ?? "" },
338
+ skip: !a
339
+ }), p = l?.planmagnetPortfolios.items ?? [];
340
+ return /* @__PURE__ */ c("select", {
341
+ id: e,
342
+ className: u,
342
343
  value: n,
343
344
  onChange: (e) => r(e.target.value),
344
345
  children: [
345
- i !== void 0 && /* @__PURE__ */ o("option", {
346
+ i !== void 0 && /* @__PURE__ */ s("option", {
346
347
  value: "",
347
348
  children: i
348
349
  }),
349
- p.length === 0 && i === void 0 && /* @__PURE__ */ o("option", {
350
+ p.length === 0 && i === void 0 && /* @__PURE__ */ s("option", {
350
351
  value: "",
351
- children: d && !u ? "Loading portfolios…" : f ? "Portfolios could not be loaded" : "No portfolios yet"
352
+ children: d && !l ? "Loading portfolios…" : f ? "Portfolios could not be loaded" : "No portfolios yet"
352
353
  }),
353
- p.map((e) => /* @__PURE__ */ o("option", {
354
+ p.map((e) => /* @__PURE__ */ s("option", {
354
355
  value: e.id,
355
356
  children: e.name
356
357
  }, e.id))
357
358
  ]
358
359
  });
359
360
  }
360
- var T = i`
361
- query PickerCompetitors($workspaceId: ID!, $filter: PlanmagnetCompetitorFilter) {
362
- planmagnetCompetitors(workspaceId: $workspaceId, filter: $filter, pagination: { first: 20 }) {
363
- items {
364
- id
365
- name
366
- }
367
- totalCount
368
- }
369
- }
370
- `;
371
- function E({ id: n, value: i, onChange: u, exclude: d = [] }) {
372
- let { workspaceId: f } = e(), [p, m] = r(""), h = t(p.trim()), { data: g, loading: _ } = a(T, {
361
+ function E({ id: r, value: a, onChange: d, exclude: f = [] }) {
362
+ let { workspaceId: p } = t(), [m, h] = i(""), g = n(m.trim()), { data: _, loading: v } = o(e, {
373
363
  variables: {
374
- workspaceId: f ?? "",
375
- filter: h ? { search: h } : void 0
364
+ workspaceId: p ?? "",
365
+ filter: g ? { search: g } : void 0
376
366
  },
377
- skip: !f
378
- }), v = g?.planmagnetCompetitors.items ?? [], y = v.filter((e) => !d.includes(e.id)), b = g?.planmagnetCompetitors.totalCount ?? 0;
379
- return /* @__PURE__ */ s("div", {
367
+ skip: !p
368
+ }), y = _?.planmagnetCompetitors.items ?? [], b = y.filter((e) => !f.includes(e.id)), x = _?.planmagnetCompetitors.totalCount ?? 0;
369
+ return /* @__PURE__ */ c("div", {
380
370
  className: "space-y-1",
381
371
  children: [
382
- /* @__PURE__ */ o(c, {
372
+ /* @__PURE__ */ s(l, {
383
373
  "aria-label": "Search competitors",
384
374
  placeholder: "Search competitors by name",
385
- value: p,
386
- onChange: (e) => m(e.target.value)
375
+ value: m,
376
+ onChange: (e) => h(e.target.value)
387
377
  }),
388
- /* @__PURE__ */ s("select", {
389
- id: n,
390
- className: l,
391
- value: i,
392
- onChange: (e) => u(e.target.value),
393
- children: [/* @__PURE__ */ o("option", {
378
+ /* @__PURE__ */ c("select", {
379
+ id: r,
380
+ className: u,
381
+ value: a,
382
+ onChange: (e) => d(e.target.value),
383
+ children: [/* @__PURE__ */ s("option", {
394
384
  value: "",
395
- children: _ && !g ? "Searching…" : y.length ? "Choose a competitor" : "No match"
396
- }), y.map((e) => /* @__PURE__ */ o("option", {
385
+ children: v && !_ ? "Searching…" : b.length ? "Choose a competitor" : "No match"
386
+ }), b.map((e) => /* @__PURE__ */ s("option", {
397
387
  value: e.id,
398
388
  children: e.name
399
389
  }, e.id))]
400
390
  }),
401
- b > v.length && /* @__PURE__ */ s("p", {
391
+ x > y.length && /* @__PURE__ */ c("p", {
402
392
  className: "text-xs text-muted-foreground",
403
393
  children: [
404
394
  "Showing ",
405
- v.length,
395
+ y.length,
406
396
  " of ",
407
- b,
397
+ x,
408
398
  " — type to narrow the list."
409
399
  ]
410
400
  })
411
401
  ]
412
402
  });
413
403
  }
414
- var D = i`
404
+ var D = a`
415
405
  query PickerProducts($workspaceId: ID!) {
416
406
  planmagnetProducts(workspaceId: $workspaceId, pagination: { first: 100 }) {
417
407
  items {
@@ -422,33 +412,33 @@ var D = i`
422
412
  }
423
413
  }
424
414
  `;
425
- function O({ id: t, value: n, onChange: r, noneLabel: i }) {
426
- let { workspaceId: c } = e(), { data: u, loading: d, error: f } = a(D, {
427
- variables: { workspaceId: c ?? "" },
428
- skip: !c
429
- }), p = u?.planmagnetProducts.items ?? [];
430
- return /* @__PURE__ */ s("select", {
431
- id: t,
432
- className: l,
415
+ function O({ id: e, value: n, onChange: r, noneLabel: i }) {
416
+ let { workspaceId: a } = t(), { data: l, loading: d, error: f } = o(D, {
417
+ variables: { workspaceId: a ?? "" },
418
+ skip: !a
419
+ }), p = l?.planmagnetProducts.items ?? [];
420
+ return /* @__PURE__ */ c("select", {
421
+ id: e,
422
+ className: u,
433
423
  value: n,
434
424
  onChange: (e) => r(e.target.value),
435
425
  children: [
436
- i !== void 0 && /* @__PURE__ */ o("option", {
426
+ i !== void 0 && /* @__PURE__ */ s("option", {
437
427
  value: "",
438
428
  children: i
439
429
  }),
440
- p.length === 0 && i === void 0 && /* @__PURE__ */ o("option", {
430
+ p.length === 0 && i === void 0 && /* @__PURE__ */ s("option", {
441
431
  value: "",
442
- children: d && !u ? "Loading products…" : f ? "Products could not be loaded" : "No products yet"
432
+ children: d && !l ? "Loading products…" : f ? "Products could not be loaded" : "No products yet"
443
433
  }),
444
- p.map((e) => /* @__PURE__ */ o("option", {
434
+ p.map((e) => /* @__PURE__ */ s("option", {
445
435
  value: e.id,
446
436
  children: e.name
447
437
  }, e.id))
448
438
  ]
449
439
  });
450
440
  }
451
- var k = i`
441
+ var k = a`
452
442
  query PickerRoadmaps($workspaceId: ID!, $filter: PlanmagnetRoadmapFilter) {
453
443
  planmagnetRoadmaps(workspaceId: $workspaceId, filter: $filter, pagination: { first: 100 }) {
454
444
  items {
@@ -459,36 +449,36 @@ var k = i`
459
449
  }
460
450
  }
461
451
  `;
462
- function A({ id: t, value: n, onChange: r, noneLabel: i, productId: c }) {
463
- let { workspaceId: u } = e(), { data: d, loading: f, error: p } = a(k, {
452
+ function A({ id: e, value: n, onChange: r, noneLabel: i, productId: a }) {
453
+ let { workspaceId: l } = t(), { data: d, loading: f, error: p } = o(k, {
464
454
  variables: {
465
- workspaceId: u ?? "",
466
- filter: c ? { productId: c } : void 0
455
+ workspaceId: l ?? "",
456
+ filter: a ? { productId: a } : void 0
467
457
  },
468
- skip: !u
458
+ skip: !l
469
459
  }), m = d?.planmagnetRoadmaps.items ?? [];
470
- return /* @__PURE__ */ s("select", {
471
- id: t,
472
- className: l,
460
+ return /* @__PURE__ */ c("select", {
461
+ id: e,
462
+ className: u,
473
463
  value: n,
474
464
  onChange: (e) => r(e.target.value),
475
465
  children: [
476
- i !== void 0 && /* @__PURE__ */ o("option", {
466
+ i !== void 0 && /* @__PURE__ */ s("option", {
477
467
  value: "",
478
468
  children: i
479
469
  }),
480
- m.length === 0 && i === void 0 && /* @__PURE__ */ o("option", {
470
+ m.length === 0 && i === void 0 && /* @__PURE__ */ s("option", {
481
471
  value: "",
482
472
  children: f && !d ? "Loading roadmaps…" : p ? "Roadmaps could not be loaded" : "No roadmaps yet"
483
473
  }),
484
- m.map((e) => /* @__PURE__ */ o("option", {
474
+ m.map((e) => /* @__PURE__ */ s("option", {
485
475
  value: e.id,
486
476
  children: e.name
487
477
  }, e.id))
488
478
  ]
489
479
  });
490
480
  }
491
- var j = i`
481
+ var j = a`
492
482
  query PickerCrewEmployees($pagination: PaginationInput) {
493
483
  crewEmployees(pagination: $pagination) {
494
484
  id
@@ -498,34 +488,34 @@ var j = i`
498
488
  }
499
489
  }
500
490
  `, M = 200;
501
- function N({ id: e, value: n, onChange: i, noneLabel: u, disabled: d = !1 }) {
502
- let [f, p] = r(""), m = t(f.trim().toLowerCase()), { data: h, loading: g, error: _ } = a(j, { variables: { pagination: { limit: M } } }), v = _ ? [] : h?.crewEmployees ?? [], y = m ? v.filter((e) => `${e.firstName} ${e.lastName}`.toLowerCase().includes(m) || e.email.toLowerCase().includes(m)) : v;
503
- return /* @__PURE__ */ s("div", {
491
+ function N({ id: e, value: t, onChange: r, noneLabel: a, disabled: d = !1 }) {
492
+ let [f, p] = i(""), m = n(f.trim().toLowerCase()), { data: h, loading: g, error: _ } = o(j, { variables: { pagination: { limit: M } } }), v = _ ? [] : h?.crewEmployees ?? [], y = m ? v.filter((e) => `${e.firstName} ${e.lastName}`.toLowerCase().includes(m) || e.email.toLowerCase().includes(m)) : v;
493
+ return /* @__PURE__ */ c("div", {
504
494
  className: "space-y-1",
505
495
  children: [
506
- /* @__PURE__ */ o(c, {
496
+ /* @__PURE__ */ s(l, {
507
497
  "aria-label": "Search CrewFoundry employees",
508
498
  placeholder: "Search by name or e-mail",
509
499
  value: f,
510
500
  disabled: d,
511
501
  onChange: (e) => p(e.target.value)
512
502
  }),
513
- /* @__PURE__ */ s("select", {
503
+ /* @__PURE__ */ c("select", {
514
504
  id: e,
515
- className: l,
516
- value: n,
505
+ className: u,
506
+ value: t,
517
507
  disabled: d,
518
- onChange: (e) => i(e.target.value),
508
+ onChange: (e) => r(e.target.value),
519
509
  children: [
520
- u !== void 0 && /* @__PURE__ */ o("option", {
510
+ a !== void 0 && /* @__PURE__ */ s("option", {
521
511
  value: "",
522
- children: u
512
+ children: a
523
513
  }),
524
- y.length === 0 && u === void 0 && /* @__PURE__ */ o("option", {
514
+ y.length === 0 && a === void 0 && /* @__PURE__ */ s("option", {
525
515
  value: "",
526
516
  children: g && !h ? "Loading…" : _ ? "CrewFoundry roster unavailable" : "No match"
527
517
  }),
528
- y.map((e) => /* @__PURE__ */ s("option", {
518
+ y.map((e) => /* @__PURE__ */ c("option", {
529
519
  value: e.id,
530
520
  children: [
531
521
  e.firstName,
@@ -537,7 +527,7 @@ function N({ id: e, value: n, onChange: i, noneLabel: u, disabled: d = !1 }) {
537
527
  }, e.id))
538
528
  ]
539
529
  }),
540
- !m && v.length >= M && /* @__PURE__ */ s("p", {
530
+ !m && v.length >= M && /* @__PURE__ */ c("p", {
541
531
  className: "text-xs text-muted-foreground",
542
532
  children: [
543
533
  "Showing the first ",
@@ -548,4 +538,4 @@ function N({ id: e, value: n, onChange: i, noneLabel: u, disabled: d = !1 }) {
548
538
  ]
549
539
  });
550
540
  }
551
- export { E as CompetitorSearchSelect, N as CrewEmployeeSelect, b as DocSearchSelect, w as PortfolioSelect, O as ProductSelect, S as ProgramSelect, f as ProjectSelect, A as RoadmapSelect, g as SprintSelect, m as TeamSelect, v as WorkItemSearchSelect };
541
+ export { E as CompetitorSearchSelect, N as CrewEmployeeSelect, x as DocSearchSelect, T as PortfolioSelect, O as ProductSelect, C as ProgramSelect, p as ProjectSelect, A as RoadmapSelect, _ as SprintSelect, h as TeamSelect, y as WorkItemSearchSelect };