@parallelworks/tandem-web 0.194.1 → 0.194.3
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/_virtual/_virtual_i18n/en/common.js +12 -2
- package/_virtual/_virtual_i18n/es/common.js +12 -2
- package/_virtual/_virtual_i18n/ja/common.js +12 -2
- package/_virtual/_virtual_i18n/ko/common.js +12 -2
- package/_virtual/_virtual_i18n/zh/common.js +12 -2
- package/api/queries.js +501 -504
- package/components/IssueBreakdown.js +128 -116
- package/components/ShortcutSheet.js +0 -4
- package/lib/breakdownPicks.js +17 -0
- package/lib/panelRequest.js +13 -0
- package/package.json +1 -1
- package/pages/issues.js +366 -361
- package/routeTree.gen.js +1 -1
- package/routes/_workspace/teams/_key/settings.js +12 -6
- package/routes/_workspace/teams/_key/settings2.js +27 -1030
- package/routes/_workspace/teams/_key/settings3.js +1049 -18
- package/routes/_workspace/teams/_key/settings4.js +18 -0
- package/routes/_workspace2.js +293 -296
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { labelsQuery as e, projectsQuery as t } from "../api/queries.js";
|
|
2
|
+
import { actorAvatar as n } from "../lib/avatar.js";
|
|
3
|
+
import { usePeople as r } from "../lib/people.js";
|
|
4
|
+
import { CycleIcon as i, PriorityIcon as a, ProjectIcon as o, StatusIcon as s, UserIcon as c, usePriorityNames as l } from "./icons.js";
|
|
5
|
+
import { Avatar as u, Tabs as d } from "@parallelworks/ui";
|
|
6
|
+
import { useLocale as f, useTranslations as p } from "use-intl";
|
|
7
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
8
|
+
import { useQuery as _ } from "@tanstack/react-query";
|
|
9
|
+
import { ListFilterBar as v, useListFilters as y } from "@parallelworks/ui/list";
|
|
8
10
|
// src/components/IssueBreakdown.tsx
|
|
9
|
-
var
|
|
10
|
-
function
|
|
11
|
+
var b = "";
|
|
12
|
+
function x(e, t) {
|
|
11
13
|
let n;
|
|
12
14
|
switch (t) {
|
|
13
15
|
case "statuses": return [e.status.id];
|
|
@@ -23,15 +25,15 @@ function v(e, t) {
|
|
|
23
25
|
break;
|
|
24
26
|
case "cycles": n = e.cycle ? [e.cycle.id] : [];
|
|
25
27
|
}
|
|
26
|
-
return n.length > 0 ? n : [
|
|
28
|
+
return n.length > 0 ? n : [b];
|
|
27
29
|
}
|
|
28
|
-
var
|
|
30
|
+
var S = [
|
|
29
31
|
1,
|
|
30
32
|
2,
|
|
31
33
|
3,
|
|
32
34
|
4,
|
|
33
35
|
0
|
|
34
|
-
],
|
|
36
|
+
], C = [
|
|
35
37
|
"triage",
|
|
36
38
|
"backlog",
|
|
37
39
|
"unstarted",
|
|
@@ -39,11 +41,11 @@ var y = [
|
|
|
39
41
|
"completed",
|
|
40
42
|
"canceled"
|
|
41
43
|
];
|
|
42
|
-
function
|
|
43
|
-
for (let [r, i] of Object.entries(t)) if (r !== n && i.length !== 0 && !
|
|
44
|
+
function w(e, t, n) {
|
|
45
|
+
for (let [r, i] of Object.entries(t)) if (r !== n && i.length !== 0 && !x(e, r).some((e) => i.includes(e))) return !1;
|
|
44
46
|
return !0;
|
|
45
47
|
}
|
|
46
|
-
var
|
|
48
|
+
var T = [
|
|
47
49
|
"statuses",
|
|
48
50
|
"assignees",
|
|
49
51
|
"labels",
|
|
@@ -51,123 +53,123 @@ var S = [
|
|
|
51
53
|
"projects",
|
|
52
54
|
"cycles"
|
|
53
55
|
];
|
|
54
|
-
function
|
|
56
|
+
function E(e) {
|
|
55
57
|
let t = {};
|
|
56
58
|
if (typeof e != "string") return t;
|
|
57
59
|
for (let n of e.split(",")) {
|
|
58
60
|
let e = n.indexOf(":"), r = n.slice(0, e);
|
|
59
|
-
if (e < 0 || !
|
|
61
|
+
if (e < 0 || !T.includes(r)) continue;
|
|
60
62
|
let i = n.slice(e + 1), a = t[r] ?? [];
|
|
61
63
|
a.includes(i) || (t[r] = [...a, i]);
|
|
62
64
|
}
|
|
63
65
|
return t;
|
|
64
66
|
}
|
|
65
|
-
function
|
|
66
|
-
let t =
|
|
67
|
+
function D(e) {
|
|
68
|
+
let t = T.flatMap((t) => (e[t] ?? []).map((e) => `${t}:${e}`));
|
|
67
69
|
return t.length > 0 ? t.join(",") : void 0;
|
|
68
70
|
}
|
|
69
|
-
var
|
|
70
|
-
function
|
|
71
|
-
let r = e[t] ?? [], i = r.includes(n) ? r.filter((e) => e !== n) :
|
|
71
|
+
var O = (e) => Object.values(e).reduce((e, t) => e + t.length, 0), k = (e) => e !== "cycles";
|
|
72
|
+
function A(e, t, n) {
|
|
73
|
+
let r = e[t] ?? [], i = r.includes(n) ? r.filter((e) => e !== n) : k(t) ? [...r, n] : [n], { [t]: a, ...o } = e;
|
|
72
74
|
return i.length > 0 ? {
|
|
73
75
|
...o,
|
|
74
76
|
[t]: i
|
|
75
77
|
} : o;
|
|
76
78
|
}
|
|
77
|
-
function
|
|
78
|
-
let
|
|
79
|
-
return (
|
|
80
|
-
switch (
|
|
79
|
+
function j(e) {
|
|
80
|
+
let t = p("planning.issueBreakdown"), d = l(), { nameOf: f, avatarOf: m } = r(e);
|
|
81
|
+
return (e, r, l) => {
|
|
82
|
+
switch (e) {
|
|
81
83
|
case "statuses": return {
|
|
82
|
-
name:
|
|
83
|
-
icon: /* @__PURE__ */
|
|
84
|
-
category:
|
|
85
|
-
review:
|
|
86
|
-
step:
|
|
84
|
+
name: r.status.name,
|
|
85
|
+
icon: /* @__PURE__ */ h(s, {
|
|
86
|
+
category: r.status.category,
|
|
87
|
+
review: r.status.review,
|
|
88
|
+
step: r.status.step
|
|
87
89
|
})
|
|
88
90
|
};
|
|
89
91
|
case "assignees": {
|
|
90
|
-
if (l ===
|
|
91
|
-
name:
|
|
92
|
-
icon: /* @__PURE__ */
|
|
92
|
+
if (l === b) return {
|
|
93
|
+
name: t("noAssignee"),
|
|
94
|
+
icon: /* @__PURE__ */ h(c, { className: "size-5 text-muted-foreground" })
|
|
93
95
|
};
|
|
94
|
-
let
|
|
96
|
+
let e = r.assignees.find((e) => `${e.kind}:${e.handle}` === l), i = e ? f(e.kind, e.handle) : l;
|
|
95
97
|
return {
|
|
96
|
-
name:
|
|
97
|
-
icon:
|
|
98
|
+
name: i,
|
|
99
|
+
icon: e && /* @__PURE__ */ h(u, {
|
|
98
100
|
size: "xs",
|
|
99
|
-
...e
|
|
100
|
-
name:
|
|
101
|
-
src:
|
|
101
|
+
...n(e.kind),
|
|
102
|
+
name: i,
|
|
103
|
+
src: m(e.kind, e.handle)
|
|
102
104
|
})
|
|
103
105
|
};
|
|
104
106
|
}
|
|
105
107
|
case "labels": {
|
|
106
|
-
if (l ===
|
|
107
|
-
name:
|
|
108
|
-
icon: /* @__PURE__ */
|
|
108
|
+
if (l === b) return {
|
|
109
|
+
name: t("noLabel"),
|
|
110
|
+
icon: /* @__PURE__ */ h(R, { color: "" })
|
|
109
111
|
};
|
|
110
|
-
let e =
|
|
112
|
+
let e = r.labels.find((e) => e.id === l);
|
|
111
113
|
return {
|
|
112
114
|
name: e?.name ?? l,
|
|
113
|
-
icon: /* @__PURE__ */
|
|
115
|
+
icon: /* @__PURE__ */ h(R, { color: e?.color ?? "" })
|
|
114
116
|
};
|
|
115
117
|
}
|
|
116
118
|
case "priority": return {
|
|
117
|
-
name:
|
|
118
|
-
icon: /* @__PURE__ */
|
|
119
|
+
name: d[Number(l)] ?? l,
|
|
120
|
+
icon: /* @__PURE__ */ h(a, {
|
|
119
121
|
priority: Number(l),
|
|
120
122
|
className: "text-muted-foreground"
|
|
121
123
|
})
|
|
122
124
|
};
|
|
123
|
-
case "projects": return l ===
|
|
124
|
-
name:
|
|
125
|
-
icon: /* @__PURE__ */
|
|
125
|
+
case "projects": return l === b ? {
|
|
126
|
+
name: t("noProject"),
|
|
127
|
+
icon: /* @__PURE__ */ h(o, { className: "text-muted-foreground" })
|
|
126
128
|
} : {
|
|
127
|
-
name:
|
|
128
|
-
icon: /* @__PURE__ */
|
|
129
|
+
name: r.project?.name ?? l,
|
|
130
|
+
icon: /* @__PURE__ */ h(o, { className: "text-muted-foreground" })
|
|
129
131
|
};
|
|
130
132
|
case "cycles": {
|
|
131
|
-
let e = /* @__PURE__ */
|
|
132
|
-
return l ===
|
|
133
|
-
name:
|
|
133
|
+
let e = /* @__PURE__ */ h(i, { className: "text-muted-foreground" }), n = r.cycle;
|
|
134
|
+
return l === b || !n ? {
|
|
135
|
+
name: t("noCycle"),
|
|
134
136
|
icon: e
|
|
135
137
|
} : {
|
|
136
|
-
name:
|
|
137
|
-
number:
|
|
138
|
-
name:
|
|
139
|
-
}) :
|
|
138
|
+
name: n.name ? t("cycleNamed", {
|
|
139
|
+
number: n.number,
|
|
140
|
+
name: n.name
|
|
141
|
+
}) : t("cycle", { number: n.number }),
|
|
140
142
|
icon: e
|
|
141
143
|
};
|
|
142
144
|
}
|
|
143
145
|
}
|
|
144
146
|
};
|
|
145
147
|
}
|
|
146
|
-
function
|
|
147
|
-
let s =
|
|
148
|
+
function M({ workspace: e, issues: t, tabs: n, tab: r, onTabChange: i, focus: a, onFocus: o }) {
|
|
149
|
+
let s = p("planning.issueBreakdown"), c = f(), l = j(e), u = new Intl.NumberFormat(c, {
|
|
148
150
|
style: "percent",
|
|
149
151
|
maximumFractionDigits: 0
|
|
150
|
-
}),
|
|
151
|
-
for (let e of t)
|
|
152
|
+
}), _ = a?.[r] ?? [], v = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map();
|
|
153
|
+
for (let e of t) y.set(e.status.id, C.indexOf(e.status.category) * 1e3 + e.status.position);
|
|
152
154
|
for (let e of t) {
|
|
153
155
|
if (e.status.category === "canceled") continue;
|
|
154
|
-
let t =
|
|
156
|
+
let t = x(e, r), n = !a || w(e, a, r);
|
|
155
157
|
for (let i of t) {
|
|
156
|
-
if (!n && !
|
|
157
|
-
let t =
|
|
158
|
+
if (!n && !_.includes(i)) continue;
|
|
159
|
+
let t = v.get(i);
|
|
158
160
|
t || (t = {
|
|
159
161
|
key: i,
|
|
160
|
-
...
|
|
162
|
+
...l(r, e, i),
|
|
161
163
|
done: 0,
|
|
162
164
|
total: 0
|
|
163
|
-
},
|
|
165
|
+
}, v.set(i, t)), n && (t.done += +(e.status.category === "completed"), t.total++);
|
|
164
166
|
}
|
|
165
167
|
}
|
|
166
|
-
let
|
|
167
|
-
return
|
|
168
|
+
let T = [...v.values()].sort((e, t) => r === "statuses" ? (y.get(e.key) ?? 0) - (y.get(t.key) ?? 0) : r === "priority" ? S.indexOf(Number(e.key)) - S.indexOf(Number(t.key)) : r === "cycles" && e.key !== b && t.key !== b ? e.name.localeCompare(t.name, c, { numeric: !0 }) : e.key === b == (t.key === b) ? t.total - e.total || e.name.localeCompare(t.name, c) : e.key === b ? -1 : 1);
|
|
169
|
+
return T.length === 0 && (!a || O(a) === 0) ? /* @__PURE__ */ h("p", {
|
|
168
170
|
className: "rounded-lg border border-border px-4 py-5 text-sm text-muted-foreground",
|
|
169
171
|
children: s("empty")
|
|
170
|
-
}) : /* @__PURE__ */
|
|
172
|
+
}) : /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(d, {
|
|
171
173
|
label: s("label"),
|
|
172
174
|
variant: "line",
|
|
173
175
|
size: "sm",
|
|
@@ -177,97 +179,107 @@ function k({ workspace: e, issues: t, tabs: n, tab: r, onTabChange: i, focus: a,
|
|
|
177
179
|
})),
|
|
178
180
|
value: r,
|
|
179
181
|
onValueChange: i
|
|
180
|
-
}), /* @__PURE__ */
|
|
182
|
+
}), /* @__PURE__ */ h("ul", {
|
|
181
183
|
className: "mt-3 space-y-0.5",
|
|
182
|
-
children:
|
|
183
|
-
let t = e.total ? e.done / e.total : 0, n =
|
|
184
|
-
/* @__PURE__ */
|
|
184
|
+
children: T.map((e) => {
|
|
185
|
+
let t = e.total ? e.done / e.total : 0, n = _.includes(e.key), i = /* @__PURE__ */ g(m, { children: [
|
|
186
|
+
/* @__PURE__ */ h("span", {
|
|
185
187
|
className: "flex size-5 shrink-0 items-center justify-center",
|
|
186
188
|
children: e.icon
|
|
187
189
|
}),
|
|
188
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ h("span", {
|
|
189
191
|
className: "min-w-0 flex-1 truncate",
|
|
190
192
|
children: e.name
|
|
191
193
|
}),
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ h(z, { share: t }),
|
|
195
|
+
/* @__PURE__ */ h("span", {
|
|
194
196
|
className: "min-w-16 shrink-0 text-right text-xs whitespace-nowrap text-muted-foreground tabular-nums",
|
|
195
197
|
title: s("doneOf", {
|
|
196
198
|
done: e.done,
|
|
197
199
|
total: e.total
|
|
198
200
|
}),
|
|
199
201
|
children: s("share", {
|
|
200
|
-
percent:
|
|
202
|
+
percent: u.format(t),
|
|
201
203
|
count: e.total
|
|
202
204
|
})
|
|
203
205
|
})
|
|
204
206
|
] }), c = "flex h-9 w-full items-center gap-2.5 rounded-md px-2 text-left text-sm";
|
|
205
|
-
return /* @__PURE__ */
|
|
207
|
+
return /* @__PURE__ */ h("li", { children: o ? /* @__PURE__ */ h("button", {
|
|
206
208
|
type: "button",
|
|
207
209
|
"aria-pressed": n,
|
|
208
|
-
onClick: () => o(
|
|
210
|
+
onClick: () => o(A(a ?? {}, r, e.key)),
|
|
209
211
|
className: `${c} transition-colors hover:bg-muted ${n ? "bg-muted" : ""}`,
|
|
210
212
|
children: i
|
|
211
|
-
}) : /* @__PURE__ */
|
|
213
|
+
}) : /* @__PURE__ */ h("div", {
|
|
212
214
|
className: c,
|
|
213
215
|
children: i
|
|
214
216
|
}) }, e.key);
|
|
215
217
|
})
|
|
216
218
|
})] });
|
|
217
219
|
}
|
|
218
|
-
var
|
|
220
|
+
var N = {
|
|
219
221
|
statuses: "status",
|
|
220
222
|
assignees: "assignee",
|
|
221
223
|
labels: "label",
|
|
222
224
|
priority: "priority",
|
|
223
225
|
projects: "project",
|
|
224
226
|
cycles: "cycle"
|
|
225
|
-
},
|
|
226
|
-
function
|
|
227
|
-
let
|
|
228
|
-
let
|
|
229
|
-
for (let
|
|
230
|
-
let { name: i, icon: a } =
|
|
231
|
-
|
|
232
|
-
value:
|
|
227
|
+
}, P = ":none", F = (e) => e === b ? P : e, I = (e) => e === P ? b : e;
|
|
228
|
+
function L({ workspace: n, issues: r, tabs: i, focus: a, onFocus: s, className: c }) {
|
|
229
|
+
let l = p("planning.issueBreakdown"), u = p("issueFilters"), d = j(n), { data: f = [] } = _(e(n)), { data: m = [] } = _(t(n)), g = i.map((e) => {
|
|
230
|
+
let t = /* @__PURE__ */ new Map();
|
|
231
|
+
for (let n of r) for (let r of x(n, e)) if (!t.has(r)) {
|
|
232
|
+
let { name: i, icon: a } = d(e, n, r);
|
|
233
|
+
t.set(r, {
|
|
234
|
+
value: F(r),
|
|
233
235
|
label: i,
|
|
234
236
|
icon: a
|
|
235
237
|
});
|
|
236
238
|
}
|
|
239
|
+
if (e === "labels") for (let e of f) t.has(e.id) || t.set(e.id, {
|
|
240
|
+
value: e.id,
|
|
241
|
+
label: e.name,
|
|
242
|
+
icon: /* @__PURE__ */ h(R, { color: e.color })
|
|
243
|
+
});
|
|
244
|
+
if (e === "projects") for (let e of m) t.has(e.id) || t.set(e.id, {
|
|
245
|
+
value: e.id,
|
|
246
|
+
label: e.name,
|
|
247
|
+
icon: /* @__PURE__ */ h(o, { className: "text-muted-foreground" })
|
|
248
|
+
});
|
|
237
249
|
return {
|
|
238
250
|
key: e,
|
|
239
|
-
label:
|
|
251
|
+
label: u(N[e]),
|
|
240
252
|
kind: "enum",
|
|
241
253
|
operators: ["is"],
|
|
242
|
-
multiple:
|
|
243
|
-
options: [...
|
|
254
|
+
multiple: k(e),
|
|
255
|
+
options: [...t.values()]
|
|
244
256
|
};
|
|
245
|
-
}),
|
|
257
|
+
}), b = y({
|
|
246
258
|
storageKey: "tandem:issueBreakdown",
|
|
247
|
-
fields:
|
|
259
|
+
fields: g,
|
|
248
260
|
remember: !1,
|
|
249
261
|
store: {
|
|
250
|
-
value: Object.entries(
|
|
262
|
+
value: Object.entries(a).map(([e, t]) => ({
|
|
251
263
|
field: e,
|
|
252
264
|
op: "is",
|
|
253
|
-
values: t.map(
|
|
265
|
+
values: t.map(F)
|
|
254
266
|
})),
|
|
255
|
-
onChange: (e) =>
|
|
267
|
+
onChange: (e) => s(Object.fromEntries(e.filter((e) => e.values.length > 0).map((e) => [e.field, e.values.map(I)])))
|
|
256
268
|
}
|
|
257
|
-
}),
|
|
258
|
-
return
|
|
259
|
-
filters:
|
|
260
|
-
label:
|
|
261
|
-
className:
|
|
262
|
-
trailing: /* @__PURE__ */
|
|
269
|
+
}), S = r.filter((e) => w(e, a)).length;
|
|
270
|
+
return O(a) === 0 ? null : /* @__PURE__ */ h(v, {
|
|
271
|
+
filters: b,
|
|
272
|
+
label: l("label"),
|
|
273
|
+
className: c,
|
|
274
|
+
trailing: /* @__PURE__ */ h("span", {
|
|
263
275
|
className: "text-xs whitespace-nowrap text-muted-foreground",
|
|
264
276
|
role: "status",
|
|
265
|
-
children:
|
|
277
|
+
children: l("showing", { count: S })
|
|
266
278
|
})
|
|
267
279
|
});
|
|
268
280
|
}
|
|
269
|
-
function
|
|
270
|
-
return /* @__PURE__ */
|
|
281
|
+
function R({ color: e }) {
|
|
282
|
+
return /* @__PURE__ */ h("span", {
|
|
271
283
|
className: "size-2.5 rounded-full border border-border",
|
|
272
284
|
style: e ? {
|
|
273
285
|
backgroundColor: e,
|
|
@@ -275,18 +287,18 @@ function F({ color: e }) {
|
|
|
275
287
|
} : void 0
|
|
276
288
|
});
|
|
277
289
|
}
|
|
278
|
-
function
|
|
290
|
+
function z({ share: e }) {
|
|
279
291
|
let t = 2 * Math.PI * 6;
|
|
280
|
-
return e >= 1 ? /* @__PURE__ */
|
|
292
|
+
return e >= 1 ? /* @__PURE__ */ g("svg", {
|
|
281
293
|
viewBox: "0 0 16 16",
|
|
282
294
|
className: "size-4 shrink-0 text-status-completed",
|
|
283
295
|
"aria-hidden": "true",
|
|
284
|
-
children: [/* @__PURE__ */
|
|
296
|
+
children: [/* @__PURE__ */ h("circle", {
|
|
285
297
|
cx: "8",
|
|
286
298
|
cy: "8",
|
|
287
299
|
r: "7",
|
|
288
300
|
fill: "currentColor"
|
|
289
|
-
}), /* @__PURE__ */
|
|
301
|
+
}), /* @__PURE__ */ h("path", {
|
|
290
302
|
d: "M5 8.2 7 10l4-4.2",
|
|
291
303
|
fill: "none",
|
|
292
304
|
stroke: "var(--color-card)",
|
|
@@ -294,18 +306,18 @@ function I({ share: e }) {
|
|
|
294
306
|
strokeLinecap: "round",
|
|
295
307
|
strokeLinejoin: "round"
|
|
296
308
|
})]
|
|
297
|
-
}) : /* @__PURE__ */
|
|
309
|
+
}) : /* @__PURE__ */ g("svg", {
|
|
298
310
|
viewBox: "0 0 16 16",
|
|
299
311
|
className: "size-4 shrink-0 -rotate-90",
|
|
300
312
|
"aria-hidden": "true",
|
|
301
|
-
children: [/* @__PURE__ */
|
|
313
|
+
children: [/* @__PURE__ */ h("circle", {
|
|
302
314
|
cx: "8",
|
|
303
315
|
cy: "8",
|
|
304
316
|
r: 6,
|
|
305
317
|
fill: "none",
|
|
306
318
|
strokeWidth: "2",
|
|
307
319
|
className: "stroke-border"
|
|
308
|
-
}), e > 0 && /* @__PURE__ */
|
|
320
|
+
}), e > 0 && /* @__PURE__ */ h("circle", {
|
|
309
321
|
cx: "8",
|
|
310
322
|
cy: "8",
|
|
311
323
|
r: 6,
|
|
@@ -317,4 +329,4 @@ function I({ share: e }) {
|
|
|
317
329
|
})]
|
|
318
330
|
});
|
|
319
331
|
}
|
|
320
|
-
export {
|
|
332
|
+
export { L as BreakdownFilterBar, M as IssueBreakdown, O as breakdownCount, x as breakdownKeys, D as formatBreakdown, w as inBreakdown, E as parseBreakdown };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// src/lib/breakdownPicks.ts
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
let n = e;
|
|
4
|
+
for (let r of ["labels", "projects"]) {
|
|
5
|
+
let i = t[r], a = e[r];
|
|
6
|
+
if (!i || !a) continue;
|
|
7
|
+
let o = a.filter((e) => e === "" || i.has(e));
|
|
8
|
+
if (o.length === a.length) continue;
|
|
9
|
+
let { [r]: s, ...c } = n;
|
|
10
|
+
n = o.length > 0 ? {
|
|
11
|
+
...c,
|
|
12
|
+
[r]: o
|
|
13
|
+
} : c;
|
|
14
|
+
}
|
|
15
|
+
return n;
|
|
16
|
+
}
|
|
17
|
+
export { e as knownPicks };
|