@parallelworks/tandem-web 0.141.2 → 0.143.0

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 (64) hide show
  1. package/_virtual/_virtual_i18n/en/common.js +162 -5
  2. package/_virtual/_virtual_i18n/es/common.js +162 -5
  3. package/_virtual/_virtual_i18n/ja/common.js +162 -5
  4. package/_virtual/_virtual_i18n/ko/common.js +162 -5
  5. package/_virtual/_virtual_i18n/zh/common.js +162 -5
  6. package/components/AccessGrants.js +6 -6
  7. package/components/ActivityTimeline.js +2 -0
  8. package/components/CodeHostSettings.js +25 -25
  9. package/components/CustomFields.js +349 -0
  10. package/components/DocProperties.js +320 -0
  11. package/components/DocTable.js +176 -0
  12. package/components/DocViewBlock.js +104 -0
  13. package/components/DocsTree.js +16 -6
  14. package/components/Editor.js +30 -28
  15. package/components/GitHub.js +22 -22
  16. package/components/IssueBoard.js +48 -43
  17. package/components/IssueEvent.js +2 -0
  18. package/components/IssueFilters.js +210 -122
  19. package/components/IssueImport.js +1 -1
  20. package/components/IssueRow.js +96 -79
  21. package/components/IssueTemplates.js +216 -156
  22. package/components/IssueTypes.js +318 -0
  23. package/components/NewIssueDialog.js +254 -216
  24. package/components/SettingsNav.js +40 -35
  25. package/components/SlashMenu.js +2 -0
  26. package/components/TeamForm.js +49 -35
  27. package/components/TeamRepositories.js +51 -51
  28. package/components/TeamWorkflow.js +8 -8
  29. package/components/Updates.js +8 -8
  30. package/lib/boardMove.js +69 -47
  31. package/lib/customFields.js +113 -0
  32. package/lib/docProperties.js +135 -0
  33. package/lib/issueDisplay.js +27 -12
  34. package/lib/issueList.js +166 -62
  35. package/lib/issueTypes.js +50 -0
  36. package/lib/teamTree.js +24 -0
  37. package/lib/views.js +13 -11
  38. package/package.json +1 -1
  39. package/pages/issues.js +331 -291
  40. package/routeTree.gen.js +174 -162
  41. package/routes/_workspace/agents/index2.js +9 -9
  42. package/routes/_workspace/docs/_doc2.js +147 -140
  43. package/routes/_workspace/docs/space._space.js +6 -0
  44. package/routes/_workspace/docs/space2._space.js +256 -0
  45. package/routes/_workspace/docs2.js +3 -3
  46. package/routes/_workspace/issues/_identifier2.js +433 -370
  47. package/routes/_workspace/projects/_projectId3.js +213 -201
  48. package/routes/_workspace/settings/audit-log3.js +2 -0
  49. package/routes/_workspace/settings/fields.js +6 -0
  50. package/routes/_workspace/settings/fields2.js +30 -0
  51. package/routes/_workspace/settings/fields3.js +5 -0
  52. package/routes/_workspace/settings/groups2.js +74 -74
  53. package/routes/_workspace/settings/labels2.js +33 -33
  54. package/routes/_workspace/settings/members2.js +35 -35
  55. package/routes/_workspace/settings/roles2.js +24 -24
  56. package/routes/_workspace/settings/runners2.js +18 -18
  57. package/routes/_workspace/settings/sessions2.js +9 -9
  58. package/routes/_workspace/settings/slack2.js +8 -8
  59. package/routes/_workspace/settings/sso2.js +50 -50
  60. package/routes/_workspace/settings/tokens2.js +15 -15
  61. package/routes/_workspace/settings/webhooks2.js +42 -42
  62. package/routes/_workspace/teams/_key/settings2.js +138 -76
  63. package/routes/_workspace2.js +321 -319
  64. package/styles.css +39 -0
@@ -1,53 +1,54 @@
1
1
  import { Link as e } from "../lib/router.js";
2
2
  import { PriorityIcon as t, ProjectIcon as n } from "./icons.js";
3
- import { usePeople as r } from "../lib/people.js";
4
- import { Avatar as i } from "@parallelworks/ui";
5
- import { useState as a } from "react";
6
- import { useTranslations as o } from "use-intl";
7
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
3
+ import { TypeIcon as r } from "./IssueTypes.js";
4
+ import { usePeople as i } from "../lib/people.js";
5
+ import { Avatar as a } from "@parallelworks/ui";
6
+ import { useState as o } from "react";
7
+ import { useTranslations as s } from "use-intl";
8
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
8
9
  // src/components/IssueBoard.tsx
9
- function l({ workspace: e, columns: t, onMove: n, onContextMenu: r }) {
10
- let i = o("issues"), [l, d] = a(null), [f, p] = a(null);
11
- return /* @__PURE__ */ s("ul", {
10
+ function u({ workspace: e, columns: t, onMove: n, onContextMenu: r }) {
11
+ let i = s("issues"), [a, u] = o(null), [f, p] = o(null);
12
+ return /* @__PURE__ */ c("ul", {
12
13
  className: "flex h-full min-h-0 snap-x gap-3 overflow-x-auto p-3 md:p-4",
13
14
  "aria-label": i("board"),
14
15
  children: t.map((t) => {
15
- let i = !!l && !!n && !t.issues.some((e) => e.id === l.issue.id);
16
- return /* @__PURE__ */ c("li", {
16
+ let i = !!a && !!n && !t.issues.some((e) => e.id === a.issue.id);
17
+ return /* @__PURE__ */ l("li", {
17
18
  "aria-label": t.label,
18
19
  onDragOver: (e) => {
19
20
  i && (e.preventDefault(), e.dataTransfer.dropEffect = "move", p(t.key));
20
21
  },
21
22
  onDragLeave: () => p((e) => e === t.key ? null : e),
22
23
  onDrop: (e) => {
23
- e.preventDefault(), i && l && n?.(l.issue, l.from, t.key), d(null), p(null);
24
+ e.preventDefault(), i && a && n?.(a.issue, a.from, t.key), u(null), p(null);
24
25
  },
25
26
  className: `flex max-h-full min-w-60 flex-1 basis-0 snap-start flex-col rounded-lg border bg-muted/30 ${f === t.key ? "border-primary" : "border-border"}`,
26
- children: [/* @__PURE__ */ c("h2", {
27
+ children: [/* @__PURE__ */ l("h2", {
27
28
  className: "flex h-9 shrink-0 items-center gap-2 px-3 text-xs font-medium",
28
29
  children: [
29
30
  t.icon,
30
- /* @__PURE__ */ s("span", {
31
+ /* @__PURE__ */ c("span", {
31
32
  className: "truncate",
32
33
  children: t.label
33
34
  }),
34
- /* @__PURE__ */ s("span", {
35
+ /* @__PURE__ */ c("span", {
35
36
  className: "text-muted-foreground tabular-nums",
36
37
  children: t.issues.length
37
38
  })
38
39
  ]
39
- }), /* @__PURE__ */ s("ul", {
40
+ }), /* @__PURE__ */ c("ul", {
40
41
  className: "min-h-12 flex-1 space-y-2 overflow-y-auto px-2 pb-2",
41
- children: t.issues.map((i) => /* @__PURE__ */ s(u, {
42
+ children: t.issues.map((i) => /* @__PURE__ */ c(d, {
42
43
  workspace: e,
43
44
  issue: i,
44
45
  draggable: !!n,
45
- onDragStart: () => d({
46
+ onDragStart: () => u({
46
47
  issue: i,
47
48
  from: t.key
48
49
  }),
49
50
  onDragEnd: () => {
50
- d(null), p(null);
51
+ u(null), p(null);
51
52
  },
52
53
  onContextMenu: (e) => r(e, i)
53
54
  }, i.id))
@@ -56,54 +57,58 @@ function l({ workspace: e, columns: t, onMove: n, onContextMenu: r }) {
56
57
  })
57
58
  });
58
59
  }
59
- function u({ workspace: a, issue: o, draggable: l, onDragStart: u, onDragEnd: d, onContextMenu: f }) {
60
- let { nameOf: p, avatarOf: m } = r(a), h = o.assignees[0];
61
- return /* @__PURE__ */ s("li", { children: /* @__PURE__ */ c(e, {
60
+ function d({ workspace: o, issue: s, draggable: u, onDragStart: d, onDragEnd: f, onContextMenu: p }) {
61
+ let { nameOf: m, avatarOf: h } = i(o), g = s.assignees[0];
62
+ return /* @__PURE__ */ c("li", { children: /* @__PURE__ */ l(e, {
62
63
  to: "/$workspace/issues/$identifier",
63
64
  params: {
64
- workspace: a,
65
- identifier: o.identifier
65
+ workspace: o,
66
+ identifier: s.identifier
66
67
  },
67
- draggable: l,
68
+ draggable: u,
68
69
  onDragStart: (e) => {
69
- e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/plain", o.identifier), u();
70
+ e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/plain", s.identifier), d();
70
71
  },
71
- onDragEnd: d,
72
- onContextMenu: f,
72
+ onDragEnd: f,
73
+ onContextMenu: p,
73
74
  className: "block space-y-2 rounded-md border border-border bg-background p-2.5 text-sm shadow-xs hover:border-foreground/30",
74
75
  children: [
75
- /* @__PURE__ */ c("span", {
76
+ /* @__PURE__ */ l("span", {
76
77
  className: "flex items-center gap-2 text-xs text-muted-foreground",
77
78
  children: [
78
- /* @__PURE__ */ s(t, { priority: o.priority }),
79
- /* @__PURE__ */ s("span", { children: o.identifier }),
80
- h && /* @__PURE__ */ s(i, {
81
- name: p(h.kind, h.handle),
82
- src: m(h.kind, h.handle),
79
+ /* @__PURE__ */ c(t, { priority: s.priority }),
80
+ s.type && /* @__PURE__ */ c(r, {
81
+ type: s.type,
82
+ className: "size-3.5"
83
+ }),
84
+ /* @__PURE__ */ c("span", { children: s.identifier }),
85
+ g && /* @__PURE__ */ c(a, {
86
+ name: m(g.kind, g.handle),
87
+ src: h(g.kind, g.handle),
83
88
  size: "xs",
84
89
  className: "ml-auto"
85
90
  })
86
91
  ]
87
92
  }),
88
- /* @__PURE__ */ s("span", {
93
+ /* @__PURE__ */ c("span", {
89
94
  className: "line-clamp-3 block",
90
- children: o.title
95
+ children: s.title
91
96
  }),
92
- (o.project || o.labels.length > 0) && /* @__PURE__ */ c("span", {
97
+ (s.project || s.labels.length > 0) && /* @__PURE__ */ l("span", {
93
98
  className: "flex flex-wrap items-center gap-1.5 text-[11px] text-muted-foreground",
94
- children: [o.project && /* @__PURE__ */ c("span", {
99
+ children: [s.project && /* @__PURE__ */ l("span", {
95
100
  className: "inline-flex max-w-full items-center gap-1 truncate",
96
- children: [/* @__PURE__ */ s(n, { className: "size-3 shrink-0" }), /* @__PURE__ */ s("span", {
101
+ children: [/* @__PURE__ */ c(n, { className: "size-3 shrink-0" }), /* @__PURE__ */ c("span", {
97
102
  className: "truncate",
98
- children: o.project.name
103
+ children: s.project.name
99
104
  })]
100
- }), o.labels.map((e) => /* @__PURE__ */ c("span", {
105
+ }), s.labels.map((e) => /* @__PURE__ */ l("span", {
101
106
  title: e.name,
102
107
  className: "inline-flex max-w-full min-w-0 items-center gap-1 rounded-full border border-border px-1.5",
103
- children: [/* @__PURE__ */ s("span", {
108
+ children: [/* @__PURE__ */ c("span", {
104
109
  className: "size-1.5 shrink-0 rounded-full",
105
110
  style: { background: e.color }
106
- }), /* @__PURE__ */ s("span", {
111
+ }), /* @__PURE__ */ c("span", {
107
112
  className: "truncate",
108
113
  children: e.name
109
114
  })]
@@ -112,4 +117,4 @@ function u({ workspace: a, issue: o, draggable: l, onDragStart: u, onDragEnd: d,
112
117
  ]
113
118
  }) });
114
119
  }
115
- export { l as IssueBoard };
120
+ export { u as IssueBoard };
@@ -97,6 +97,8 @@ function f({ workspace: f, event: p }) {
97
97
  case "issue.cycle_changed": return C.number ? T("cycleSet", { number: String(C.number) }) : T("cycleCleared");
98
98
  case "issue.estimate_changed": return Number(C.to) ? T("estimateSet", { points: _.number(Number(C.to)) }) : T("estimateCleared");
99
99
  case "issue.due_date_changed": return C.to ? T("dueDateSet", { date: b.day(String(C.to)) }) : T("dueDateCleared");
100
+ case "issue.type_changed": return C.to ? T("typeChanged", { type: String(C.to) }) : T("typeCleared");
101
+ case "issue.fields_changed": return T("fieldsChanged", { fields: _.list(C.fields ?? []) });
100
102
  case "issue.label_added": return T("labelAdded", { label: String(C.name) });
101
103
  case "issue.label_removed": return T("labelRemoved", { label: String(C.name) });
102
104
  case "run.created": return T("runCreated");
@@ -1,17 +1,20 @@
1
1
  import { customersQuery as e, cyclesQuery as t, labelsQuery as n, projectsQuery as r, statusesQuery as i, teamsQuery as a } from "../api/queries.js";
2
- import { CalendarIcon as o, CycleIcon as s, FolderIcon as c, PriorityIcon as l, ProjectIcon as u, StatusIcon as d, TagIcon as f, UserIcon as p, UsersIcon as m, usePriorityNames as h } from "./icons.js";
3
- import { statusRef as g } from "../lib/refs.js";
4
- import { ProjectStatusIcon as _ } from "./Planning.js";
5
- import { usePeople as v } from "../lib/people.js";
6
- import { projectRef as y } from "../lib/projects.js";
7
- import { Avatar as b } from "@parallelworks/ui";
8
- import { useMemo as x } from "react";
9
- import { useTranslations as S } from "use-intl";
10
- import { jsx as C } from "react/jsx-runtime";
11
- import { useQuery as w } from "@tanstack/react-query";
12
- import { useListFilters as T } from "@parallelworks/ui/list";
2
+ import { customFieldsQuery as o, fieldsFor as s, filterableKinds as c, formatFieldFilters as l, parseFieldFilters as u } from "../lib/customFields.js";
3
+ import { issueTypesQuery as d } from "../lib/issueTypes.js";
4
+ import { CalendarIcon as f, CycleIcon as ee, FolderIcon as p, PriorityIcon as m, ProjectIcon as h, StatusIcon as g, TagIcon as _, UserIcon as v, UsersIcon as y, usePriorityNames as te } from "./icons.js";
5
+ import { TypeIcon as ne } from "./IssueTypes.js";
6
+ import { statusRef as re } from "../lib/refs.js";
7
+ import { ProjectStatusIcon as b } from "./Planning.js";
8
+ import { usePeople as x } from "../lib/people.js";
9
+ import { projectRef as S } from "../lib/projects.js";
10
+ import { Avatar as C } from "@parallelworks/ui";
11
+ import { useMemo as ie } from "react";
12
+ import { useTranslations as w } from "use-intl";
13
+ import { jsx as T } from "react/jsx-runtime";
14
+ import { useQuery as E } from "@tanstack/react-query";
15
+ import { useListFilters as D } from "@parallelworks/ui/list";
13
16
  // src/components/IssueFilters.tsx
14
- var E = [
17
+ var O = (e) => `field:${e}`, k = [
15
18
  "team",
16
19
  "assignee",
17
20
  "assigneeKind",
@@ -22,9 +25,11 @@ var E = [
22
25
  "project",
23
26
  "customer",
24
27
  "cycle",
28
+ "type",
29
+ "fields",
25
30
  "overdue"
26
- ], D = (e) => `agent:${e}`;
27
- function O(e) {
31
+ ], A = (e) => `agent:${e}`;
32
+ function j(e) {
28
33
  let t = [], n = (e, n) => {
29
34
  n && t.push({
30
35
  field: e,
@@ -32,7 +37,7 @@ function O(e) {
32
37
  values: [n]
33
38
  });
34
39
  };
35
- n("team", e.team), n("assignee", e.assignee && (e.assigneeKind === "agent" ? D(e.assignee) : e.assignee)), n("creator", e.creator);
40
+ n("team", e.team), n("assignee", e.assignee && (e.assigneeKind === "agent" ? A(e.assignee) : e.assignee)), n("creator", e.creator);
36
41
  for (let n of ["status", "priority"]) {
37
42
  let r = e[n]?.split(",").filter(Boolean) ?? [];
38
43
  r.length > 0 && t.push({
@@ -41,64 +46,85 @@ function O(e) {
41
46
  values: r
42
47
  });
43
48
  }
44
- return n("label", e.label), n("project", e.project), n("customer", e.customer), n("cycle", e.cycle), n("overdue", e.overdue), t;
49
+ n("label", e.label), n("project", e.project), n("customer", e.customer), n("cycle", e.cycle);
50
+ let r = e.type?.split(",").filter(Boolean) ?? [];
51
+ r.length > 0 && t.push({
52
+ field: "type",
53
+ op: "is",
54
+ values: r
55
+ });
56
+ let i = /* @__PURE__ */ new Map();
57
+ for (let t of u(e.fields)) i.set(t.field, [...i.get(t.field) ?? [], t.value]);
58
+ for (let [e, n] of i) t.push({
59
+ field: O(e),
60
+ op: "is",
61
+ values: n
62
+ });
63
+ return n("overdue", e.overdue), t;
45
64
  }
46
- function k(e) {
47
- let t = {};
48
- for (let n of e) {
49
- let e = n.values[0];
50
- if (e) switch (n.field) {
51
- case "assignee":
52
- e.startsWith("agent:") ? (t.assignee = e.slice(6), t.assigneeKind = "agent") : t.assignee = e;
53
- break;
54
- case "overdue":
55
- e === "true" && (t.overdue = "true");
56
- break;
57
- case "status":
58
- case "priority":
59
- t[n.field] = n.values.join(",");
60
- break;
61
- case "team":
62
- case "creator":
63
- case "label":
64
- case "project":
65
- case "customer":
66
- case "cycle": t[n.field] = e;
65
+ function M(e) {
66
+ let t = {}, n = [];
67
+ for (let r of e) {
68
+ let e = r.values[0];
69
+ if (e) {
70
+ if (r.field.startsWith("field:")) for (let e of r.values) n.push({
71
+ field: r.field.slice(6),
72
+ value: e
73
+ });
74
+ else switch (r.field) {
75
+ case "assignee":
76
+ e.startsWith("agent:") ? (t.assignee = e.slice(6), t.assigneeKind = "agent") : t.assignee = e;
77
+ break;
78
+ case "overdue":
79
+ e === "true" && (t.overdue = "true");
80
+ break;
81
+ case "status":
82
+ case "priority":
83
+ case "type":
84
+ t[r.field] = r.values.join(",");
85
+ break;
86
+ case "team":
87
+ case "creator":
88
+ case "label":
89
+ case "project":
90
+ case "customer":
91
+ case "cycle": t[r.field] = e;
92
+ }
67
93
  }
68
94
  }
69
- return t;
95
+ return n.length > 0 && (t.fields = l(n)), t;
70
96
  }
71
- function A(e, t) {
97
+ function N(e, t) {
72
98
  let n = { ...e };
73
- for (let e of E) delete n[e];
99
+ for (let e of k) delete n[e];
74
100
  return {
75
101
  ...n,
76
102
  ...t
77
103
  };
78
104
  }
79
- function j(E, A, j, M = !1) {
80
- let N = S("issueFilters"), P = S("planning"), { data: F = [] } = w(a(E)), { data: I = [] } = w(n(E)), { data: L = [] } = w(r(E)), { data: R = [] } = w(e(E)), z = F.find((e) => e.key === A.team), { data: B = [] } = w({
81
- ...t(E, z?.key ?? ""),
82
- enabled: !!z?.cyclesEnabled
83
- }), { data: V = [] } = w({
84
- ...i(E, z?.key ?? ""),
85
- enabled: !!z
86
- }), H = h(), { members: U, agents: W, person: G, agentName: K } = v(E), q = x(() => {
105
+ function P(l, k, N, P = !1) {
106
+ let F = w("issueFilters"), I = w("planning"), { data: L = [] } = E(a(l)), { data: R = [] } = E(n(l)), { data: z = [] } = E(r(l)), { data: B = [] } = E(e(l)), V = L.find((e) => e.key === k.team), { data: H = [] } = E({
107
+ ...t(l, V?.key ?? ""),
108
+ enabled: !!V?.cyclesEnabled
109
+ }), { data: U = [] } = E({
110
+ ...i(l, V?.key ?? ""),
111
+ enabled: !!V
112
+ }), W = te(), { members: G, agents: K, person: q, agentName: J } = x(l), { data: Y } = E(o(l)), { data: X } = E(d(l)), Z = w("issueTypes"), Q = w("customFields"), ae = ie(() => {
87
113
  let e = {
88
114
  multiple: !1,
89
115
  operators: ["is"]
90
- }, t = (e) => e.name ? P("cycleNamed", {
116
+ }, t = (e) => e.name ? I("cycleNamed", {
91
117
  number: e.number,
92
118
  name: e.name
93
- }) : P("cycle", { number: e.number }), n = [
119
+ }) : I("cycle", { number: e.number }), n = [
94
120
  {
95
121
  key: "team",
96
- label: N("team"),
97
- icon: /* @__PURE__ */ C(c, {}),
122
+ label: F("team"),
123
+ icon: /* @__PURE__ */ T(p, {}),
98
124
  kind: "enum",
99
125
  ...e,
100
- required: M,
101
- options: F.filter((e) => !e.archivedAt).map((e) => ({
126
+ required: P,
127
+ options: L.filter((e) => !e.archivedAt).map((e) => ({
102
128
  value: e.key,
103
129
  label: e.name,
104
130
  description: e.key
@@ -106,55 +132,55 @@ function j(E, A, j, M = !1) {
106
132
  },
107
133
  {
108
134
  key: "assignee",
109
- label: N("assignee"),
110
- icon: /* @__PURE__ */ C(p, {}),
135
+ label: F("assignee"),
136
+ icon: /* @__PURE__ */ T(v, {}),
111
137
  kind: "people",
112
138
  ...e,
113
- options: [...U.map((e) => ({
139
+ options: [...G.map((e) => ({
114
140
  value: e.user.username,
115
141
  label: e.user.name,
116
- group: N("people"),
117
- icon: /* @__PURE__ */ C(b, {
142
+ group: F("people"),
143
+ icon: /* @__PURE__ */ T(C, {
118
144
  name: e.user.name,
119
145
  src: e.user.avatarUrl,
120
146
  size: "xs",
121
147
  decorative: !0
122
148
  })
123
- })), ...W.map((e) => ({
124
- value: D(e.slug),
149
+ })), ...K.map((e) => ({
150
+ value: A(e.slug),
125
151
  label: e.name,
126
- group: N("agents"),
127
- icon: /* @__PURE__ */ C(b, {
152
+ group: F("agents"),
153
+ icon: /* @__PURE__ */ T(C, {
128
154
  name: e.name,
129
155
  kind: "agent",
130
156
  size: "xs",
131
157
  decorative: !0
132
158
  })
133
159
  }))],
134
- valueLabel: (e) => e.startsWith("agent:") ? K(e.slice(6)) : G(e).name
160
+ valueLabel: (e) => e.startsWith("agent:") ? J(e.slice(6)) : q(e).name
135
161
  },
136
162
  {
137
163
  key: "creator",
138
- label: N("creator"),
139
- icon: /* @__PURE__ */ C(p, {}),
164
+ label: F("creator"),
165
+ icon: /* @__PURE__ */ T(v, {}),
140
166
  kind: "people",
141
167
  ...e,
142
- options: U.map((e) => ({
168
+ options: G.map((e) => ({
143
169
  value: e.user.username,
144
170
  label: e.user.name,
145
- icon: /* @__PURE__ */ C(b, {
171
+ icon: /* @__PURE__ */ T(C, {
146
172
  name: e.user.name,
147
173
  src: e.user.avatarUrl,
148
174
  size: "xs",
149
175
  decorative: !0
150
176
  })
151
177
  })),
152
- valueLabel: (e) => G(e).name
178
+ valueLabel: (e) => q(e).name
153
179
  },
154
180
  {
155
181
  key: "priority",
156
- label: N("priority"),
157
- icon: /* @__PURE__ */ C(l, { priority: 2 }),
182
+ label: F("priority"),
183
+ icon: /* @__PURE__ */ T(m, { priority: 2 }),
158
184
  kind: "enum",
159
185
  operators: ["is"],
160
186
  options: [
@@ -165,108 +191,170 @@ function j(E, A, j, M = !1) {
165
191
  0
166
192
  ].map((e) => ({
167
193
  value: String(e),
168
- label: H[e] ?? "",
169
- icon: /* @__PURE__ */ C(l, { priority: e })
194
+ label: W[e] ?? "",
195
+ icon: /* @__PURE__ */ T(m, { priority: e })
170
196
  }))
171
197
  },
172
198
  {
173
199
  key: "label",
174
- label: N("label"),
175
- icon: /* @__PURE__ */ C(f, {}),
200
+ label: F("label"),
201
+ icon: /* @__PURE__ */ T(_, {}),
176
202
  kind: "enum",
177
203
  ...e,
178
- options: I.map((e) => ({
204
+ options: R.map((e) => ({
179
205
  value: e.name,
180
206
  label: e.name,
181
- icon: /* @__PURE__ */ C("span", {
207
+ icon: /* @__PURE__ */ T("span", {
182
208
  className: "size-2 rounded-full",
183
209
  style: { background: e.color }
184
210
  })
185
211
  })),
186
- valueLabel: () => N("deletedLabel")
212
+ valueLabel: () => F("deletedLabel")
187
213
  },
188
214
  {
189
215
  key: "project",
190
- label: N("project"),
191
- icon: /* @__PURE__ */ C(u, {}),
216
+ label: F("project"),
217
+ icon: /* @__PURE__ */ T(h, {}),
192
218
  kind: "enum",
193
219
  ...e,
194
- options: L.map((e) => ({
195
- value: y(e),
220
+ options: z.map((e) => ({
221
+ value: S(e),
196
222
  label: e.name,
197
- icon: /* @__PURE__ */ C(_, { status: e.status })
223
+ icon: /* @__PURE__ */ T(b, { status: e.status })
198
224
  }))
199
225
  }
200
226
  ];
201
- return (R.length > 0 || A.customer) && n.push({
227
+ (B.length > 0 || k.customer) && n.push({
202
228
  key: "customer",
203
- label: N("customer"),
204
- icon: /* @__PURE__ */ C(m, {}),
229
+ label: F("customer"),
230
+ icon: /* @__PURE__ */ T(y, {}),
205
231
  kind: "enum",
206
232
  ...e,
207
- options: R.map((e) => ({
233
+ options: B.map((e) => ({
208
234
  value: e.id,
209
235
  label: e.name
210
236
  }))
211
- }), (z || A.status) && n.splice(3, 0, {
237
+ }), (V || k.status) && n.splice(3, 0, {
212
238
  key: "status",
213
- label: N("status"),
214
- icon: /* @__PURE__ */ C(d, { category: "started" }),
239
+ label: F("status"),
240
+ icon: /* @__PURE__ */ T(g, { category: "started" }),
215
241
  kind: "enum",
216
242
  operators: ["is"],
217
- options: V.map((e) => ({
218
- value: g(e),
243
+ options: U.map((e) => ({
244
+ value: re(e),
219
245
  label: e.name,
220
- icon: /* @__PURE__ */ C(d, { category: e.category })
246
+ icon: /* @__PURE__ */ T(g, { category: e.category })
221
247
  }))
222
- }), (z?.cyclesEnabled || A.cycle) && n.push({
248
+ }), (V?.cyclesEnabled || k.cycle) && n.push({
223
249
  key: "cycle",
224
- label: N("cycle"),
225
- icon: /* @__PURE__ */ C(s, {}),
250
+ label: F("cycle"),
251
+ icon: /* @__PURE__ */ T(ee, {}),
226
252
  kind: "enum",
227
253
  ...e,
228
- options: B.map((e) => ({
254
+ options: H.map((e) => ({
229
255
  value: String(e.number),
230
256
  label: t(e),
231
- description: P(`states.${e.state}`)
257
+ description: I(`states.${e.state}`)
232
258
  }))
233
- }), n.push({
259
+ });
260
+ let r = (X ?? []).filter((e) => !e.archivedAt && (!V || e.teamIds.length === 0 || e.teamIds.includes(V.id)));
261
+ (r.length > 0 || k.type) && n.push({
262
+ key: "type",
263
+ label: Z("type"),
264
+ icon: /* @__PURE__ */ T(_, {}),
265
+ kind: "enum",
266
+ multiple: !0,
267
+ operators: ["is"],
268
+ options: [...r.map((e) => ({
269
+ value: e.id,
270
+ label: e.name,
271
+ icon: /* @__PURE__ */ T(ne, {
272
+ type: e,
273
+ className: "size-3.5"
274
+ })
275
+ })), {
276
+ value: "none",
277
+ label: Z("noType")
278
+ }]
279
+ });
280
+ let i = new Set(u(k.fields).map((e) => e.field));
281
+ for (let e of (Y ?? []).filter((e) => e.target === "issue" && c.includes(e.kind) && (s([e], "issue", V?.id).length > 0 || i.has(e.id)))) {
282
+ let t = {
283
+ value: "none",
284
+ label: Q("noValue")
285
+ };
286
+ n.push({
287
+ key: O(e.id),
288
+ label: e.name,
289
+ icon: /* @__PURE__ */ T(_, {}),
290
+ kind: "enum",
291
+ multiple: !0,
292
+ operators: ["is"],
293
+ options: e.kind === "person" ? [...G.map((e) => ({
294
+ value: e.user.username,
295
+ label: e.user.name,
296
+ icon: /* @__PURE__ */ T(C, {
297
+ name: e.user.name,
298
+ src: e.user.avatarUrl,
299
+ size: "xs",
300
+ decorative: !0
301
+ })
302
+ })), t] : e.kind === "checkbox" ? [{
303
+ value: "true",
304
+ label: Q("yes")
305
+ }, t] : [...e.options.map((e) => ({
306
+ value: e.id ?? "",
307
+ label: e.name,
308
+ ...e.color && { icon: /* @__PURE__ */ T("span", {
309
+ className: "size-2 rounded-full",
310
+ style: { background: e.color }
311
+ }) }
312
+ })), t]
313
+ });
314
+ }
315
+ return n.push({
234
316
  key: "overdue",
235
- label: N("overdue"),
236
- icon: /* @__PURE__ */ C(o, {}),
317
+ label: F("overdue"),
318
+ icon: /* @__PURE__ */ T(f, {}),
237
319
  kind: "boolean"
238
320
  }), n;
239
321
  }, [
240
- N,
241
- P,
322
+ X,
323
+ Z,
324
+ k.type,
325
+ Y,
326
+ Q,
327
+ k.fields,
242
328
  F,
243
- U,
244
- W,
245
329
  I,
246
330
  L,
331
+ G,
332
+ K,
247
333
  R,
248
- A.customer,
334
+ z,
249
335
  B,
250
- V,
336
+ k.customer,
251
337
  H,
252
- z,
253
- A.cycle,
254
- A.status,
255
- G,
256
- K,
257
- M
258
- ]), J = O(A), Y = {
259
- value: J.length > 0 ? J : null,
338
+ U,
339
+ W,
340
+ V,
341
+ k.cycle,
342
+ k.status,
343
+ q,
344
+ J,
345
+ P
346
+ ]), $ = j(k), oe = {
347
+ value: $.length > 0 ? $ : null,
260
348
  onChange: (e) => {
261
- let t = k(e);
262
- t.team !== A.team && delete t.status, j(t);
349
+ let t = M(e);
350
+ t.team !== k.team && delete t.status, N(t);
263
351
  }
264
352
  };
265
- return T({
266
- storageKey: `issues:${E}`,
267
- fields: q,
268
- store: Y,
353
+ return D({
354
+ storageKey: `issues:${l}`,
355
+ fields: ae,
356
+ store: oe,
269
357
  remember: !1
270
358
  });
271
359
  }
272
- export { j as useIssueFilters, A as withIssueFilters };
360
+ export { P as useIssueFilters, N as withIssueFilters };
@@ -105,7 +105,7 @@ function b({ workspace: e, row: t }) {
105
105
  }),
106
106
  t.warnings.length > 0 && /* @__PURE__ */ m("span", {
107
107
  className: "mt-0.5 block text-muted-foreground",
108
- children: r("leftOut", { values: t.warnings.map((e) => `${r(`field.${e.field}`)} “${e.value}”`).join(", ") })
108
+ children: r("leftOut", { values: t.warnings.map((e) => `${e.field === "field" && e.name ? e.name : r(`field.${e.field}`)} “${e.value}”`).join(", ") })
109
109
  })
110
110
  ]
111
111
  }),