@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.
- package/dist/generated/wspace-operations.d.ts +19 -5
- package/dist/generated/wspace-operations.js +412 -1
- package/dist/generated/wspace-types.d.ts +172 -0
- package/dist/planmagnet/controls/Pickers.js +170 -180
- package/dist/planmagnet/forecast/DeliveryForecastCard.js +99 -90
- package/dist/planmagnet/pages/CompetitorsCompetitorsPagePage.js +13 -37
- package/dist/planmagnet/providers/PlanMagnetProvider.d.ts +1 -0
- package/dist/planmagnet/providers/PlanMagnetProvider.js +8 -4
- package/package.json +1 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
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
|
|
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
|
-
`,
|
|
23
|
-
function
|
|
24
|
-
let { workspaceId: m } =
|
|
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
|
-
|
|
32
|
-
!b || !x || y.length >=
|
|
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) => !
|
|
49
|
-
return /* @__PURE__ */
|
|
50
|
-
id:
|
|
51
|
-
className:
|
|
52
|
-
value:
|
|
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
|
-
|
|
57
|
+
a !== void 0 && /* @__PURE__ */ s("option", {
|
|
57
58
|
value: "",
|
|
58
|
-
children:
|
|
59
|
+
children: a
|
|
59
60
|
}),
|
|
60
|
-
S.length === 0 &&
|
|
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__ */
|
|
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 >=
|
|
69
|
+
b && y.length >= f && /* @__PURE__ */ s("option", {
|
|
69
70
|
value: "",
|
|
70
71
|
disabled: !0,
|
|
71
|
-
children: `Only the first ${
|
|
72
|
+
children: `Only the first ${f} projects are listed`
|
|
72
73
|
})
|
|
73
74
|
]
|
|
74
75
|
});
|
|
75
76
|
}
|
|
76
|
-
var
|
|
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
|
|
88
|
-
let { workspaceId: d } =
|
|
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) => !
|
|
92
|
-
return /* @__PURE__ */
|
|
93
|
-
id:
|
|
94
|
-
"aria-label":
|
|
95
|
-
className:
|
|
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:
|
|
98
|
+
disabled: l,
|
|
98
99
|
onChange: (e) => r(e.target.value),
|
|
99
100
|
children: [
|
|
100
|
-
i !== void 0 && /* @__PURE__ */
|
|
101
|
+
i !== void 0 && /* @__PURE__ */ s("option", {
|
|
101
102
|
value: "",
|
|
102
|
-
children:
|
|
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__ */
|
|
105
|
+
g.length === 0 && i === void 0 && /* @__PURE__ */ s("option", {
|
|
105
106
|
value: "",
|
|
106
|
-
children:
|
|
107
|
+
children: p && !f ? "Loading teams…" : h ? "Teams could not be loaded" : "No teams yet"
|
|
107
108
|
}),
|
|
108
|
-
g.map((e) => /* @__PURE__ */
|
|
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
|
|
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
|
|
128
|
-
let { workspaceId: d } =
|
|
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
|
-
}),
|
|
135
|
-
return /* @__PURE__ */
|
|
136
|
-
id:
|
|
137
|
-
"aria-label":
|
|
138
|
-
className:
|
|
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:
|
|
141
|
+
disabled: l,
|
|
141
142
|
onChange: (e) => r(e.target.value),
|
|
142
143
|
children: [
|
|
143
|
-
|
|
144
|
+
a !== void 0 && /* @__PURE__ */ s("option", {
|
|
144
145
|
value: "",
|
|
145
|
-
children:
|
|
146
|
+
children: a
|
|
146
147
|
}),
|
|
147
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
176
|
-
let { workspaceId: p } =
|
|
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
|
-
...
|
|
182
|
+
...r && { projectId: r }
|
|
182
183
|
}
|
|
183
184
|
},
|
|
184
185
|
skip: !p
|
|
185
|
-
}), b =
|
|
186
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
196
|
-
id:
|
|
197
|
-
className:
|
|
198
|
-
value:
|
|
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__ */
|
|
202
|
+
/* @__PURE__ */ s("option", {
|
|
202
203
|
value: "",
|
|
203
|
-
children: y && !
|
|
204
|
+
children: y && !_ ? "Searching…" : x.length ? "Choose a work item" : "No match"
|
|
204
205
|
}),
|
|
205
|
-
|
|
206
|
-
value:
|
|
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__ */
|
|
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__ */
|
|
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
|
|
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
|
|
244
|
-
let { workspaceId: f } =
|
|
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 ?? [],
|
|
251
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
261
|
-
id:
|
|
262
|
-
className:
|
|
263
|
-
value:
|
|
264
|
-
onChange: (e) =>
|
|
265
|
-
children: [/* @__PURE__ */
|
|
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…" :
|
|
268
|
-
}),
|
|
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__ */
|
|
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
|
|
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
|
|
298
|
-
let { workspaceId:
|
|
299
|
-
variables: { workspaceId:
|
|
300
|
-
skip: !
|
|
301
|
-
}), p =
|
|
302
|
-
return /* @__PURE__ */
|
|
303
|
-
id:
|
|
304
|
-
className:
|
|
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__ */
|
|
309
|
+
i !== void 0 && /* @__PURE__ */ s("option", {
|
|
309
310
|
value: "",
|
|
310
311
|
children: i
|
|
311
312
|
}),
|
|
312
|
-
p.length === 0 && i === void 0 && /* @__PURE__ */
|
|
313
|
+
p.length === 0 && i === void 0 && /* @__PURE__ */ s("option", {
|
|
313
314
|
value: "",
|
|
314
|
-
children: d && !
|
|
315
|
+
children: d && !l ? "Loading programs…" : f ? "Programs could not be loaded" : "No programs yet"
|
|
315
316
|
}),
|
|
316
|
-
p.map((e) => /* @__PURE__ */
|
|
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
|
|
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
|
|
335
|
-
let { workspaceId:
|
|
336
|
-
variables: { workspaceId:
|
|
337
|
-
skip: !
|
|
338
|
-
}), p =
|
|
339
|
-
return /* @__PURE__ */
|
|
340
|
-
id:
|
|
341
|
-
className:
|
|
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__ */
|
|
346
|
+
i !== void 0 && /* @__PURE__ */ s("option", {
|
|
346
347
|
value: "",
|
|
347
348
|
children: i
|
|
348
349
|
}),
|
|
349
|
-
p.length === 0 && i === void 0 && /* @__PURE__ */
|
|
350
|
+
p.length === 0 && i === void 0 && /* @__PURE__ */ s("option", {
|
|
350
351
|
value: "",
|
|
351
|
-
children: d && !
|
|
352
|
+
children: d && !l ? "Loading portfolios…" : f ? "Portfolios could not be loaded" : "No portfolios yet"
|
|
352
353
|
}),
|
|
353
|
-
p.map((e) => /* @__PURE__ */
|
|
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
|
-
|
|
361
|
-
|
|
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:
|
|
375
|
-
filter:
|
|
364
|
+
workspaceId: p ?? "",
|
|
365
|
+
filter: g ? { search: g } : void 0
|
|
376
366
|
},
|
|
377
|
-
skip: !
|
|
378
|
-
}),
|
|
379
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
372
|
+
/* @__PURE__ */ s(l, {
|
|
383
373
|
"aria-label": "Search competitors",
|
|
384
374
|
placeholder: "Search competitors by name",
|
|
385
|
-
value:
|
|
386
|
-
onChange: (e) =>
|
|
375
|
+
value: m,
|
|
376
|
+
onChange: (e) => h(e.target.value)
|
|
387
377
|
}),
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
-
id:
|
|
390
|
-
className:
|
|
391
|
-
value:
|
|
392
|
-
onChange: (e) =>
|
|
393
|
-
children: [/* @__PURE__ */
|
|
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:
|
|
396
|
-
}),
|
|
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
|
-
|
|
391
|
+
x > y.length && /* @__PURE__ */ c("p", {
|
|
402
392
|
className: "text-xs text-muted-foreground",
|
|
403
393
|
children: [
|
|
404
394
|
"Showing ",
|
|
405
|
-
|
|
395
|
+
y.length,
|
|
406
396
|
" of ",
|
|
407
|
-
|
|
397
|
+
x,
|
|
408
398
|
" — type to narrow the list."
|
|
409
399
|
]
|
|
410
400
|
})
|
|
411
401
|
]
|
|
412
402
|
});
|
|
413
403
|
}
|
|
414
|
-
var D =
|
|
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:
|
|
426
|
-
let { workspaceId:
|
|
427
|
-
variables: { workspaceId:
|
|
428
|
-
skip: !
|
|
429
|
-
}), p =
|
|
430
|
-
return /* @__PURE__ */
|
|
431
|
-
id:
|
|
432
|
-
className:
|
|
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__ */
|
|
426
|
+
i !== void 0 && /* @__PURE__ */ s("option", {
|
|
437
427
|
value: "",
|
|
438
428
|
children: i
|
|
439
429
|
}),
|
|
440
|
-
p.length === 0 && i === void 0 && /* @__PURE__ */
|
|
430
|
+
p.length === 0 && i === void 0 && /* @__PURE__ */ s("option", {
|
|
441
431
|
value: "",
|
|
442
|
-
children: d && !
|
|
432
|
+
children: d && !l ? "Loading products…" : f ? "Products could not be loaded" : "No products yet"
|
|
443
433
|
}),
|
|
444
|
-
p.map((e) => /* @__PURE__ */
|
|
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 =
|
|
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:
|
|
463
|
-
let { workspaceId:
|
|
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:
|
|
466
|
-
filter:
|
|
455
|
+
workspaceId: l ?? "",
|
|
456
|
+
filter: a ? { productId: a } : void 0
|
|
467
457
|
},
|
|
468
|
-
skip: !
|
|
458
|
+
skip: !l
|
|
469
459
|
}), m = d?.planmagnetRoadmaps.items ?? [];
|
|
470
|
-
return /* @__PURE__ */
|
|
471
|
-
id:
|
|
472
|
-
className:
|
|
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__ */
|
|
466
|
+
i !== void 0 && /* @__PURE__ */ s("option", {
|
|
477
467
|
value: "",
|
|
478
468
|
children: i
|
|
479
469
|
}),
|
|
480
|
-
m.length === 0 && i === void 0 && /* @__PURE__ */
|
|
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__ */
|
|
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 =
|
|
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:
|
|
502
|
-
let [f, p] =
|
|
503
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
503
|
+
/* @__PURE__ */ c("select", {
|
|
514
504
|
id: e,
|
|
515
|
-
className:
|
|
516
|
-
value:
|
|
505
|
+
className: u,
|
|
506
|
+
value: t,
|
|
517
507
|
disabled: d,
|
|
518
|
-
onChange: (e) =>
|
|
508
|
+
onChange: (e) => r(e.target.value),
|
|
519
509
|
children: [
|
|
520
|
-
|
|
510
|
+
a !== void 0 && /* @__PURE__ */ s("option", {
|
|
521
511
|
value: "",
|
|
522
|
-
children:
|
|
512
|
+
children: a
|
|
523
513
|
}),
|
|
524
|
-
y.length === 0 &&
|
|
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__ */
|
|
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__ */
|
|
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,
|
|
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 };
|