@parallelworks/tandem-web 0.150.3 → 0.152.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 (110) hide show
  1. package/_virtual/_virtual_i18n/en/common.js +36 -4
  2. package/_virtual/_virtual_i18n/es/common.js +36 -4
  3. package/_virtual/_virtual_i18n/ja/common.js +36 -4
  4. package/_virtual/_virtual_i18n/ko/common.js +36 -4
  5. package/_virtual/_virtual_i18n/zh/common.js +36 -4
  6. package/api/queries.js +88 -77
  7. package/components/AccessGrants.js +6 -6
  8. package/components/ActivityTimeline.js +4 -4
  9. package/components/AgentWork.js +111 -111
  10. package/components/AreaLink.js +32 -0
  11. package/components/AreaTiles.js +10 -13
  12. package/components/AreaWork.js +25 -1
  13. package/components/BugRotation.js +3 -3
  14. package/components/CodeHostSettings.js +30 -30
  15. package/components/CommandPalette.js +53 -53
  16. package/components/CustomFields.js +116 -116
  17. package/components/DateChip.js +11 -11
  18. package/components/DocButton.js +6 -6
  19. package/components/DocHistory.js +4 -4
  20. package/components/DocLinkPicker.js +8 -8
  21. package/components/DocProperties.js +15 -15
  22. package/components/DocTable.js +15 -15
  23. package/components/DocsTree.js +80 -80
  24. package/components/Editor.js +35 -35
  25. package/components/FavoritesNav.js +53 -53
  26. package/components/GitHub.js +18 -18
  27. package/components/Graph.js +15 -15
  28. package/components/HostActions.js +21 -21
  29. package/components/HostPanel.js +6 -6
  30. package/components/HoverCards.js +38 -38
  31. package/components/IssueBoard.js +4 -4
  32. package/components/IssueCode.js +14 -14
  33. package/components/IssueEvent.js +3 -3
  34. package/components/IssueFilters.js +71 -71
  35. package/components/IssueListBlock.js +32 -32
  36. package/components/IssueRow.js +21 -21
  37. package/components/IssueTemplates.js +118 -118
  38. package/components/IssueTypes.js +40 -40
  39. package/components/NewIssueDialog.js +76 -76
  40. package/components/NewProjectDialog.js +145 -145
  41. package/components/PersonActivity.js +4 -4
  42. package/components/SharedViewer.js +5 -5
  43. package/components/SlashMenu.js +29 -29
  44. package/components/TeamRepositories.js +51 -51
  45. package/components/TeamWorkflow.js +6 -6
  46. package/components/UnlinkedMentions.js +20 -20
  47. package/components/Updates.js +3 -3
  48. package/components/Widgets.js +20 -20
  49. package/components/columns.js +17 -17
  50. package/components/editorPlugins.js +80 -80
  51. package/components/mathDiagrams.js +17 -17
  52. package/lib/boardMove.js +5 -5
  53. package/lib/issueList.js +58 -58
  54. package/lib/issueMenu.js +27 -27
  55. package/lib/knowledge.js +106 -106
  56. package/lib/views.js +9 -9
  57. package/package.json +1 -1
  58. package/pages/area.js +291 -0
  59. package/pages/areas.js +258 -287
  60. package/pages/decisions.js +21 -21
  61. package/pages/issues.js +52 -52
  62. package/pages/projects.js +125 -125
  63. package/pages/triage.js +12 -12
  64. package/routeTree.gen.js +186 -180
  65. package/routes/_workspace/agents/_slug2.js +11 -11
  66. package/routes/_workspace/agents/index2.js +10 -10
  67. package/routes/_workspace/areas/_area.js +7 -8
  68. package/routes/_workspace/areas/_area2.js +3 -290
  69. package/routes/_workspace/areas/_area3.js +7 -8
  70. package/routes/_workspace/docs/_doc2.js +230 -230
  71. package/routes/_workspace/docs/space2._space.js +27 -27
  72. package/routes/_workspace/issues/_identifier2.js +222 -224
  73. package/routes/_workspace/knowledge/_term2.js +43 -43
  74. package/routes/_workspace/knowledge/index.js +6 -6
  75. package/routes/_workspace/knowledge/index2.js +15 -15
  76. package/routes/_workspace/measures3.js +70 -72
  77. package/routes/_workspace/notifications2.js +150 -150
  78. package/routes/_workspace/people/_username2.js +10 -10
  79. package/routes/_workspace/projects/_projectId3.js +276 -276
  80. package/routes/_workspace/settings/audit-log3.js +136 -138
  81. package/routes/_workspace/settings/fields2.js +11 -11
  82. package/routes/_workspace/settings/github2.js +6 -6
  83. package/routes/_workspace/settings/groups2.js +26 -26
  84. package/routes/_workspace/settings/import2.js +414 -151
  85. package/routes/_workspace/settings/import3.js +7 -3
  86. package/routes/_workspace/settings/index2.js +6 -6
  87. package/routes/_workspace/settings/labels2.js +21 -21
  88. package/routes/_workspace/settings/members2.js +27 -27
  89. package/routes/_workspace/settings/notifications2.js +8 -8
  90. package/routes/_workspace/settings/parallelworks2.js +32 -32
  91. package/routes/_workspace/settings/roles2.js +24 -24
  92. package/routes/_workspace/settings/runners2.js +15 -15
  93. package/routes/_workspace/settings/sessions2.js +17 -17
  94. package/routes/_workspace/settings/slack2.js +7 -7
  95. package/routes/_workspace/settings/sso2.js +31 -31
  96. package/routes/_workspace/settings/teams2.js +25 -25
  97. package/routes/_workspace/settings/tokens2.js +12 -12
  98. package/routes/_workspace/settings/webhooks2.js +13 -13
  99. package/routes/_workspace/teams/_key/areas/_area.js +8 -0
  100. package/routes/_workspace/teams/_key/areas/_area2.js +4 -0
  101. package/routes/_workspace/teams/_key/areas/_area3.js +9 -0
  102. package/routes/_workspace/teams/_key/areas/index.js +6 -0
  103. package/routes/_workspace/teams/_key/areas/index2.js +4 -0
  104. package/routes/_workspace/teams/_key/{areas3.js → areas/index3.js} +2 -2
  105. package/routes/_workspace/teams/_key/cycles/_number2.js +27 -27
  106. package/routes/_workspace/teams/_key/cycles/index2.js +24 -24
  107. package/routes/_workspace/teams/_key/settings2.js +29 -29
  108. package/routes/_workspace2.js +368 -368
  109. package/routes/_workspace/teams/_key/areas.js +0 -6
  110. package/routes/_workspace/teams/_key/areas2.js +0 -4
@@ -1,20 +1,20 @@
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 { 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";
1
+ import { customersQuery as e, cyclesQuery as t, labelsQuery as n, projectsQuery as r, statusesQuery as i, teamsQuery as ee } from "../api/queries.js";
2
+ import { CalendarIcon as te, CycleIcon as a, FolderIcon as ne, PriorityIcon as o, ProjectIcon as s, StatusIcon as c, TagIcon as l, UserIcon as u, UsersIcon as d, usePriorityNames as f } from "./icons.js";
3
+ import { usePeople as p } from "../lib/people.js";
4
+ import { ProjectStatusIcon as m } from "./Planning.js";
5
+ import { projectRef as h } from "../lib/projects.js";
6
+ import { customFieldsQuery as g, fieldsFor as _, filterableKinds as re, formatFieldFilters as v, parseFieldFilters as y } from "../lib/customFields.js";
7
+ import { issueTypesQuery as b } from "../lib/issueTypes.js";
8
+ import { TypeIcon as x } from "./IssueTypes.js";
9
+ import { statusRef as S } from "../lib/refs.js";
10
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";
11
+ import { useMemo as w } from "react";
12
+ import { useTranslations as T } from "use-intl";
13
+ import { jsx as E } from "react/jsx-runtime";
14
+ import { useQuery as D } from "@tanstack/react-query";
15
+ import { useListFilters as O } from "@parallelworks/ui/list";
16
16
  // src/components/IssueFilters.tsx
17
- var O = (e) => `field:${e}`, k = [
17
+ var k = (e) => `field:${e}`, A = [
18
18
  "team",
19
19
  "assignee",
20
20
  "assigneeKind",
@@ -28,8 +28,8 @@ var O = (e) => `field:${e}`, k = [
28
28
  "type",
29
29
  "fields",
30
30
  "overdue"
31
- ], A = (e) => `agent:${e}`;
32
- function j(e) {
31
+ ], j = (e) => `agent:${e}`;
32
+ function M(e) {
33
33
  let t = [], n = (e, n) => {
34
34
  n && t.push({
35
35
  field: e,
@@ -37,7 +37,7 @@ function j(e) {
37
37
  values: [n]
38
38
  });
39
39
  };
40
- n("team", e.team), n("assignee", e.assignee && (e.assigneeKind === "agent" ? A(e.assignee) : e.assignee)), n("creator", e.creator);
40
+ n("team", e.team), n("assignee", e.assignee && (e.assigneeKind === "agent" ? j(e.assignee) : e.assignee)), n("creator", e.creator);
41
41
  for (let n of ["status", "priority"]) {
42
42
  let r = e[n]?.split(",").filter(Boolean) ?? [];
43
43
  r.length > 0 && t.push({
@@ -54,15 +54,15 @@ function j(e) {
54
54
  values: r
55
55
  });
56
56
  let i = /* @__PURE__ */ new Map();
57
- for (let t of u(e.fields)) i.set(t.field, [...i.get(t.field) ?? [], t.value]);
57
+ for (let t of y(e.fields)) i.set(t.field, [...i.get(t.field) ?? [], t.value]);
58
58
  for (let [e, n] of i) t.push({
59
- field: O(e),
59
+ field: k(e),
60
60
  op: "is",
61
61
  values: n
62
62
  });
63
63
  return n("overdue", e.overdue), t;
64
64
  }
65
- function M(e) {
65
+ function ie(e) {
66
66
  let t = {}, n = [];
67
67
  for (let r of e) {
68
68
  let e = r.values[0];
@@ -92,24 +92,24 @@ function M(e) {
92
92
  }
93
93
  }
94
94
  }
95
- return n.length > 0 && (t.fields = l(n)), t;
95
+ return n.length > 0 && (t.fields = v(n)), t;
96
96
  }
97
97
  function N(e, t) {
98
98
  let n = { ...e };
99
- for (let e of k) delete n[e];
99
+ for (let e of A) delete n[e];
100
100
  return {
101
101
  ...n,
102
102
  ...t
103
103
  };
104
104
  }
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 ?? ""),
105
+ function P(v, A, N, P = !1) {
106
+ let F = T("issueFilters"), I = T("planning"), { data: L = [] } = D(ee(v)), { data: R = [] } = D(n(v)), { data: z = [] } = D(r(v)), { data: B = [] } = D(e(v)), V = L.find((e) => e.key === A.team), { data: H = [] } = D({
107
+ ...t(v, V?.key ?? ""),
108
108
  enabled: !!V?.cyclesEnabled
109
- }), { data: U = [] } = E({
110
- ...i(l, V?.key ?? ""),
109
+ }), { data: U = [] } = D({
110
+ ...i(v, V?.key ?? ""),
111
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(() => {
112
+ }), W = f(), { members: G, agents: K, person: q, agentName: J } = p(v), { data: Y } = D(g(v)), { data: X } = D(b(v)), Z = T("issueTypes"), Q = T("customFields"), ae = w(() => {
113
113
  let e = {
114
114
  multiple: !1,
115
115
  operators: ["is"]
@@ -120,7 +120,7 @@ function P(l, k, N, P = !1) {
120
120
  {
121
121
  key: "team",
122
122
  label: F("team"),
123
- icon: /* @__PURE__ */ T(p, {}),
123
+ icon: /* @__PURE__ */ E(ne, {}),
124
124
  kind: "enum",
125
125
  ...e,
126
126
  required: P,
@@ -133,24 +133,24 @@ function P(l, k, N, P = !1) {
133
133
  {
134
134
  key: "assignee",
135
135
  label: F("assignee"),
136
- icon: /* @__PURE__ */ T(v, {}),
136
+ icon: /* @__PURE__ */ E(u, {}),
137
137
  kind: "people",
138
138
  ...e,
139
139
  options: [...G.map((e) => ({
140
140
  value: e.user.username,
141
141
  label: e.user.name,
142
142
  group: F("people"),
143
- icon: /* @__PURE__ */ T(C, {
143
+ icon: /* @__PURE__ */ E(C, {
144
144
  name: e.user.name,
145
145
  src: e.user.avatarUrl,
146
146
  size: "xs",
147
147
  decorative: !0
148
148
  })
149
149
  })), ...K.map((e) => ({
150
- value: A(e.slug),
150
+ value: j(e.slug),
151
151
  label: e.name,
152
152
  group: F("agents"),
153
- icon: /* @__PURE__ */ T(C, {
153
+ icon: /* @__PURE__ */ E(C, {
154
154
  name: e.name,
155
155
  kind: "agent",
156
156
  size: "xs",
@@ -162,13 +162,13 @@ function P(l, k, N, P = !1) {
162
162
  {
163
163
  key: "creator",
164
164
  label: F("creator"),
165
- icon: /* @__PURE__ */ T(v, {}),
165
+ icon: /* @__PURE__ */ E(u, {}),
166
166
  kind: "people",
167
167
  ...e,
168
168
  options: G.map((e) => ({
169
169
  value: e.user.username,
170
170
  label: e.user.name,
171
- icon: /* @__PURE__ */ T(C, {
171
+ icon: /* @__PURE__ */ E(C, {
172
172
  name: e.user.name,
173
173
  src: e.user.avatarUrl,
174
174
  size: "xs",
@@ -180,7 +180,7 @@ function P(l, k, N, P = !1) {
180
180
  {
181
181
  key: "priority",
182
182
  label: F("priority"),
183
- icon: /* @__PURE__ */ T(m, { priority: 2 }),
183
+ icon: /* @__PURE__ */ E(o, { priority: 2 }),
184
184
  kind: "enum",
185
185
  operators: ["is"],
186
186
  options: [
@@ -192,19 +192,19 @@ function P(l, k, N, P = !1) {
192
192
  ].map((e) => ({
193
193
  value: String(e),
194
194
  label: W[e] ?? "",
195
- icon: /* @__PURE__ */ T(m, { priority: e })
195
+ icon: /* @__PURE__ */ E(o, { priority: e })
196
196
  }))
197
197
  },
198
198
  {
199
199
  key: "label",
200
200
  label: F("label"),
201
- icon: /* @__PURE__ */ T(_, {}),
201
+ icon: /* @__PURE__ */ E(l, {}),
202
202
  kind: "enum",
203
203
  ...e,
204
204
  options: R.map((e) => ({
205
205
  value: e.name,
206
206
  label: e.name,
207
- icon: /* @__PURE__ */ T("span", {
207
+ icon: /* @__PURE__ */ E("span", {
208
208
  className: "size-2 rounded-full",
209
209
  style: { background: e.color }
210
210
  })
@@ -214,41 +214,41 @@ function P(l, k, N, P = !1) {
214
214
  {
215
215
  key: "project",
216
216
  label: F("project"),
217
- icon: /* @__PURE__ */ T(h, {}),
217
+ icon: /* @__PURE__ */ E(s, {}),
218
218
  kind: "enum",
219
219
  ...e,
220
220
  options: z.map((e) => ({
221
- value: S(e),
221
+ value: h(e),
222
222
  label: e.name,
223
- icon: /* @__PURE__ */ T(b, { status: e.status })
223
+ icon: /* @__PURE__ */ E(m, { status: e.status })
224
224
  }))
225
225
  }
226
226
  ];
227
- (B.length > 0 || k.customer) && n.push({
227
+ (B.length > 0 || A.customer) && n.push({
228
228
  key: "customer",
229
229
  label: F("customer"),
230
- icon: /* @__PURE__ */ T(y, {}),
230
+ icon: /* @__PURE__ */ E(d, {}),
231
231
  kind: "enum",
232
232
  ...e,
233
233
  options: B.map((e) => ({
234
234
  value: e.id,
235
235
  label: e.name
236
236
  }))
237
- }), (V || k.status) && n.splice(3, 0, {
237
+ }), (V || A.status) && n.splice(3, 0, {
238
238
  key: "status",
239
239
  label: F("status"),
240
- icon: /* @__PURE__ */ T(g, { category: "started" }),
240
+ icon: /* @__PURE__ */ E(c, { category: "started" }),
241
241
  kind: "enum",
242
242
  operators: ["is"],
243
243
  options: U.map((e) => ({
244
- value: re(e),
244
+ value: S(e),
245
245
  label: e.name,
246
- icon: /* @__PURE__ */ T(g, { category: e.category })
246
+ icon: /* @__PURE__ */ E(c, { category: e.category })
247
247
  }))
248
- }), (V?.cyclesEnabled || k.cycle) && n.push({
248
+ }), (V?.cyclesEnabled || A.cycle) && n.push({
249
249
  key: "cycle",
250
250
  label: F("cycle"),
251
- icon: /* @__PURE__ */ T(ee, {}),
251
+ icon: /* @__PURE__ */ E(a, {}),
252
252
  kind: "enum",
253
253
  ...e,
254
254
  options: H.map((e) => ({
@@ -258,17 +258,17 @@ function P(l, k, N, P = !1) {
258
258
  }))
259
259
  });
260
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({
261
+ (r.length > 0 || A.type) && n.push({
262
262
  key: "type",
263
263
  label: Z("type"),
264
- icon: /* @__PURE__ */ T(_, {}),
264
+ icon: /* @__PURE__ */ E(l, {}),
265
265
  kind: "enum",
266
266
  multiple: !0,
267
267
  operators: ["is"],
268
268
  options: [...r.map((e) => ({
269
269
  value: e.id,
270
270
  label: e.name,
271
- icon: /* @__PURE__ */ T(ne, {
271
+ icon: /* @__PURE__ */ E(x, {
272
272
  type: e,
273
273
  className: "size-3.5"
274
274
  })
@@ -277,23 +277,23 @@ function P(l, k, N, P = !1) {
277
277
  label: Z("noType")
278
278
  }]
279
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)))) {
280
+ let i = new Set(y(A.fields).map((e) => e.field));
281
+ for (let e of (Y ?? []).filter((e) => e.target === "issue" && re.includes(e.kind) && (_([e], "issue", V?.id).length > 0 || i.has(e.id)))) {
282
282
  let t = {
283
283
  value: "none",
284
284
  label: Q("noValue")
285
285
  };
286
286
  n.push({
287
- key: O(e.id),
287
+ key: k(e.id),
288
288
  label: e.name,
289
- icon: /* @__PURE__ */ T(_, {}),
289
+ icon: /* @__PURE__ */ E(l, {}),
290
290
  kind: "enum",
291
291
  multiple: !0,
292
292
  operators: ["is"],
293
293
  options: e.kind === "person" ? [...G.map((e) => ({
294
294
  value: e.user.username,
295
295
  label: e.user.name,
296
- icon: /* @__PURE__ */ T(C, {
296
+ icon: /* @__PURE__ */ E(C, {
297
297
  name: e.user.name,
298
298
  src: e.user.avatarUrl,
299
299
  size: "xs",
@@ -305,7 +305,7 @@ function P(l, k, N, P = !1) {
305
305
  }, t] : [...e.options.map((e) => ({
306
306
  value: e.id ?? "",
307
307
  label: e.name,
308
- ...e.color && { icon: /* @__PURE__ */ T("span", {
308
+ ...e.color && { icon: /* @__PURE__ */ E("span", {
309
309
  className: "size-2 rounded-full",
310
310
  style: { background: e.color }
311
311
  }) }
@@ -315,16 +315,16 @@ function P(l, k, N, P = !1) {
315
315
  return n.push({
316
316
  key: "overdue",
317
317
  label: F("overdue"),
318
- icon: /* @__PURE__ */ T(f, {}),
318
+ icon: /* @__PURE__ */ E(te, {}),
319
319
  kind: "boolean"
320
320
  }), n;
321
321
  }, [
322
322
  X,
323
323
  Z,
324
- k.type,
324
+ A.type,
325
325
  Y,
326
326
  Q,
327
- k.fields,
327
+ A.fields,
328
328
  F,
329
329
  I,
330
330
  L,
@@ -333,25 +333,25 @@ function P(l, k, N, P = !1) {
333
333
  R,
334
334
  z,
335
335
  B,
336
- k.customer,
336
+ A.customer,
337
337
  H,
338
338
  U,
339
339
  W,
340
340
  V,
341
- k.cycle,
342
- k.status,
341
+ A.cycle,
342
+ A.status,
343
343
  q,
344
344
  J,
345
345
  P
346
- ]), $ = j(k), oe = {
346
+ ]), $ = M(A), oe = {
347
347
  value: $.length > 0 ? $ : null,
348
348
  onChange: (e) => {
349
- let t = M(e);
350
- t.team !== k.team && delete t.status, N(t);
349
+ let t = ie(e);
350
+ t.team !== A.team && delete t.status, N(t);
351
351
  }
352
352
  };
353
- return D({
354
- storageKey: `issues:${l}`,
353
+ return O({
354
+ storageKey: `issues:${v}`,
355
355
  fields: ae,
356
356
  store: oe,
357
357
  remember: !1
@@ -2,15 +2,15 @@ import { basePath as e } from "../lib/base.js";
2
2
  import { Link as t } from "../lib/router.js";
3
3
  import { cyclesQuery as n, issuesQuery as r, labelsQuery as i, projectsQuery as a, statusesQuery as o, teamsQuery as s, viewsQuery as c } from "../api/queries.js";
4
4
  import { AddIcon as l, BoardIcon as u, EditIcon as d, ListViewIcon as f, usePriorityNames as p } from "./icons.js";
5
- import { isViewAt as m, statusRef as h } from "../lib/refs.js";
6
- import { groupIssues as g, issueFilterOf as _, issueSearch as v, sortIssues as y } from "../lib/issueList.js";
7
- import { issuesHref as b } from "../lib/teamPaths.js";
8
- import { usePeople as x } from "../lib/people.js";
9
- import { useIssueMenu as ee } from "../lib/issueMenu.js";
10
- import { useNewIssue as S } from "../lib/newIssue.js";
11
- import { viewSearch as C } from "../lib/views.js";
12
- import { projectRef as w } from "../lib/projects.js";
13
- import { useBoardMove as T } from "../lib/boardMove.js";
5
+ import { useNewIssue as m } from "../lib/newIssue.js";
6
+ import { usePeople as ee } from "../lib/people.js";
7
+ import { useIssueMenu as h } from "../lib/issueMenu.js";
8
+ import { projectRef as g } from "../lib/projects.js";
9
+ import { useBoardMove as _ } from "../lib/boardMove.js";
10
+ import { isViewAt as v, statusRef as y } from "../lib/refs.js";
11
+ import { groupIssues as b, issueFilterOf as x, issueSearch as S, sortIssues as C } from "../lib/issueList.js";
12
+ import { issuesHref as w } from "../lib/teamPaths.js";
13
+ import { viewSearch as T } from "../lib/views.js";
14
14
  import { IssueBoard as E } from "./IssueBoard.js";
15
15
  import { useIssueFilters as D, withIssueFilters as O } from "./IssueFilters.js";
16
16
  import { IssueRow as k } from "./IssueRow.js";
@@ -23,7 +23,7 @@ import { keepPreviousData as H, useQuery as U } from "@tanstack/react-query";
23
23
  import { ListFilterBar as W, ListFilterMenu as G } from "@parallelworks/ui/list";
24
24
  import { Node as K, NodeViewWrapper as q, ReactNodeViewRenderer as J, mergeAttributes as Y } from "@tiptap/react";
25
25
  // src/components/IssueListBlock.tsx
26
- var X = /^:::issues[ \t]*\n([\s\S]*?)(?:^|\n):::[ \t]*(?:\n|$)/, Z = 50, Q = /* @__PURE__ */ new Map(), $ = (e) => v(Object.fromEntries(new URLSearchParams(e))), te = (e) => new URLSearchParams(Object.entries(e).filter((e) => !!e[1])).toString(), ne = () => window.location.pathname.slice(e.length).split("/").filter(Boolean)[0] ?? "", re = K.create({
26
+ var X = /^:::issues[ \t]*\n([\s\S]*?)(?:^|\n):::[ \t]*(?:\n|$)/, Z = 50, Q = /* @__PURE__ */ new Map(), $ = (e) => S(Object.fromEntries(new URLSearchParams(e))), te = (e) => new URLSearchParams(Object.entries(e).filter((e) => !!e[1])).toString(), ne = () => window.location.pathname.slice(e.length).split("/").filter(Boolean)[0] ?? "", re = K.create({
27
27
  name: "issueList",
28
28
  group: "block",
29
29
  atom: !0,
@@ -64,7 +64,7 @@ var X = /^:::issues[ \t]*\n([\s\S]*?)(?:^|\n):::[ \t]*(?:\n|$)/, Z = 50, Q = /*
64
64
  renderMarkdown: (t) => {
65
65
  let n = t.attrs?.search ?? "", r = t.attrs?.title || "Issues";
66
66
  if (!n) return ":::issues\n:::";
67
- let i = `${window.location.origin}${e}${b(ne(), $(n))}`, a = (Q.get(n) ?? []).map((e) => `- ${e.identifier} ${e.title} (${e.status.name})`);
67
+ let i = `${window.location.origin}${e}${w(ne(), $(n))}`, a = (Q.get(n) ?? []).map((e) => `- ${e.identifier} ${e.title} (${e.status.name})`);
68
68
  return [
69
69
  ":::issues",
70
70
  `[${r}](${i})`,
@@ -98,7 +98,7 @@ function ie({ node: e, updateAttributes: t, editor: n }) {
98
98
  });
99
99
  }
100
100
  function ae({ workspace: e, query: t, onDone: n, onCancel: r }) {
101
- let i = z("issueListBlock"), a = z("issues"), { data: o = [] } = U(c(e)), [s, l] = R(() => $(t)), d = o.find((e) => m(e, s.saved)), p = D(e, s, (e) => {
101
+ let i = z("issueListBlock"), a = z("issues"), { data: o = [] } = U(c(e)), [s, l] = R(() => $(t)), d = o.find((e) => v(e, s.saved)), p = D(e, s, (e) => {
102
102
  let { saved: t, ...n } = O(s, e);
103
103
  l(n);
104
104
  });
@@ -115,12 +115,12 @@ function ae({ workspace: e, query: t, onDone: n, onCancel: r }) {
115
115
  value: "",
116
116
  label: i("noView")
117
117
  }, ...o.map((e) => ({
118
- value: C(e).saved,
118
+ value: T(e).saved,
119
119
  label: e.name
120
120
  }))],
121
121
  onValueChange: (e) => {
122
- let t = o.find((t) => C(t).saved === e);
123
- l(t ? $(new URLSearchParams(C(t)).toString()) : {});
122
+ let t = o.find((t) => T(t).saved === e);
123
+ l(t ? $(new URLSearchParams(T(t)).toString()) : {});
124
124
  },
125
125
  "aria-label": i("savedView"),
126
126
  width: "content"
@@ -185,16 +185,16 @@ function ae({ workspace: e, query: t, onDone: n, onCancel: r }) {
185
185
  });
186
186
  }
187
187
  function oe({ workspace: e, query: n, title: i, onEdit: a }) {
188
- let c = z("issueListBlock"), u = z("issues"), f = L(() => $(n), [n]), { data: m = [] } = U(s(e)), { data: h } = U({
188
+ let c = z("issueListBlock"), u = z("issues"), f = L(() => $(n), [n]), { data: m = [] } = U(s(e)), { data: g } = U({
189
189
  ...o(e, f.team ?? ""),
190
190
  enabled: !!f.team
191
- }), { data: v, isPending: S } = U({
192
- ...r(e, _(f, h)),
191
+ }), { data: v, isPending: y } = U({
192
+ ...r(e, x(f, g)),
193
193
  placeholderData: H,
194
- enabled: !f.status || !f.team || !!h
195
- }), C = L(() => y(v?.issues ?? [], f.order ?? "updated"), [v, f.order]);
196
- Q.set(n, C);
197
- let w = ee(e), D = F(), O = T(e, m), A = p(), { nameOf: M, avatarOf: N } = x(e), I = se(e, f, h), R = f.layout === "board", W = b(e, f), G = R ? g(C, "status", {
194
+ enabled: !f.status || !f.team || !!g
195
+ }), S = L(() => C(v?.issues ?? [], f.order ?? "updated"), [v, f.order]);
196
+ Q.set(n, S);
197
+ let T = h(e), D = F(), O = _(e, m), A = p(), { nameOf: M, avatarOf: N } = ee(e), I = se(e, f, g), R = f.layout === "board", W = w(e, f), G = R ? b(S, "status", {
198
198
  status: (e) => u(`groups.${e}`),
199
199
  priority: (e) => A[e] ?? "",
200
200
  person: M,
@@ -217,7 +217,7 @@ function oe({ workspace: e, query: n, title: i, onEdit: a }) {
217
217
  }),
218
218
  /* @__PURE__ */ B("span", {
219
219
  className: "text-xs text-muted-foreground tabular-nums",
220
- children: v ? C.length : ""
220
+ children: v ? S.length : ""
221
221
  }),
222
222
  /* @__PURE__ */ B("span", { className: "flex-1" }),
223
223
  /* @__PURE__ */ B(t, {
@@ -243,10 +243,10 @@ function oe({ workspace: e, query: n, title: i, onEdit: a }) {
243
243
  onClick: a
244
244
  })
245
245
  ]
246
- }), S ? /* @__PURE__ */ B("p", {
246
+ }), y ? /* @__PURE__ */ B("p", {
247
247
  className: "px-3 py-2 text-xs text-muted-foreground",
248
248
  children: c("loading")
249
- }) : C.length === 0 ? /* @__PURE__ */ B("p", {
249
+ }) : S.length === 0 ? /* @__PURE__ */ B("p", {
250
250
  className: "px-3 py-2 text-xs text-muted-foreground",
251
251
  children: c("none")
252
252
  }) : R ? /* @__PURE__ */ B("div", {
@@ -255,25 +255,25 @@ function oe({ workspace: e, query: n, title: i, onEdit: a }) {
255
255
  workspace: e,
256
256
  columns: G,
257
257
  onMove: (e, t, n) => O(e, "status", t, n),
258
- onContextMenu: (e, t) => D(e, w([t]))
258
+ onContextMenu: (e, t) => D(e, T([t]))
259
259
  })
260
- }) : /* @__PURE__ */ V("ul", { children: [C.slice(0, Z).map((t) => /* @__PURE__ */ B(k, {
260
+ }) : /* @__PURE__ */ V("ul", { children: [S.slice(0, Z).map((t) => /* @__PURE__ */ B(k, {
261
261
  issue: t,
262
262
  team: m.find((e) => e.id === t.teamId),
263
263
  workspace: e,
264
- onContextMenu: (e) => D(e, w([t]))
265
- }, t.id)), C.length > Z && /* @__PURE__ */ B("li", {
264
+ onContextMenu: (e) => D(e, T([t]))
265
+ }, t.id)), S.length > Z && /* @__PURE__ */ B("li", {
266
266
  className: "px-3 py-2 text-xs",
267
267
  children: /* @__PURE__ */ B(t, {
268
268
  to: W,
269
269
  className: "text-primary hover:underline",
270
- children: c("more", { count: C.length - Z })
270
+ children: c("more", { count: S.length - Z })
271
271
  })
272
272
  })] })]
273
273
  });
274
274
  }
275
275
  function se(e, t, r) {
276
- let o = S(), { data: s = [] } = U(i(e)), { data: c = [] } = U({
276
+ let o = m(), { data: s = [] } = U(i(e)), { data: c = [] } = U({
277
277
  ...a(e),
278
278
  enabled: !!t.project
279
279
  }), { data: l = [] } = U({
@@ -281,7 +281,7 @@ function se(e, t, r) {
281
281
  enabled: !!t.team && !!t.cycle
282
282
  });
283
283
  return () => {
284
- let e = (e) => e?.split(",")[0], n = r?.find((n) => h(n) === e(t.status)), i = s.find((e) => e.name.toLowerCase() === t.label?.toLowerCase()), a = c.find((e) => w(e) === t.project), u = l.find((e) => String(e.number) === t.cycle || e.id === t.cycle), d = e(t.priority);
284
+ let e = (e) => e?.split(",")[0], n = r?.find((n) => y(n) === e(t.status)), i = s.find((e) => e.name.toLowerCase() === t.label?.toLowerCase()), a = c.find((e) => g(e) === t.project), u = l.find((e) => String(e.number) === t.cycle || e.id === t.cycle), d = e(t.priority);
285
285
  o({
286
286
  ...t.team && { team: t.team },
287
287
  fields: {
@@ -1,19 +1,19 @@
1
1
  import { Link as e } from "../lib/router.js";
2
- import { hasValue as t } from "../lib/customFields.js";
3
- import { PriorityIcon as n, ProjectIcon as r, StatusIcon as i, UsersIcon as a } from "./icons.js";
4
- import { TypeIcon as o } from "./IssueTypes.js";
5
- import { useTime as s } from "../lib/time.js";
6
- import { DueDate as c, SlaBadge as l, estimateShort as u } from "./Planning.js";
7
- import { usePeople as d } from "../lib/people.js";
8
- import { PersonHoverCard as f } from "./PersonHoverCard.js";
2
+ import { PriorityIcon as t, ProjectIcon as n, StatusIcon as r, UsersIcon as i } from "./icons.js";
3
+ import { usePeople as a } from "../lib/people.js";
4
+ import { useTime as o } from "../lib/time.js";
5
+ import { DueDate as s, SlaBadge as c, estimateShort as l } from "./Planning.js";
6
+ import { hasValue as u } from "../lib/customFields.js";
7
+ import { TypeIcon as d } from "./IssueTypes.js";
8
+ import { actorAvatar as f } from "../lib/avatar.js";
9
9
  import { useFieldText as p } from "./CustomFields.js";
10
- import { actorAvatar as m } from "../lib/avatar.js";
10
+ import { PersonHoverCard as m } from "./PersonHoverCard.js";
11
11
  import { Avatar as h, AvatarGroup as g, Checkbox as _, Tooltip as v, useRelativeTime as y } from "@parallelworks/ui";
12
12
  import { useFormatter as b, useTranslations as x } from "use-intl";
13
13
  import { jsx as S, jsxs as C } from "react/jsx-runtime";
14
14
  // src/components/IssueRow.tsx
15
15
  function w({ issue: w, team: T, workspace: E, selected: D = !1, picked: O = !1, viewers: k = [], onPick: A, onHover: j, onClick: M, onContextMenu: N, fields: P = [] }) {
16
- let F = x("issues"), I = b(), L = s(), R = y(w.updatedAt, "compact"), { person: z, nameOf: B, avatarOf: V } = d(E), H = p(E);
16
+ let F = x("issues"), I = b(), L = o(), R = y(w.updatedAt, "compact"), { person: z, nameOf: B, avatarOf: V } = a(E), H = p(E);
17
17
  return /* @__PURE__ */ C("li", {
18
18
  id: `row-${w.id}`,
19
19
  onMouseEnter: j,
@@ -47,19 +47,19 @@ function w({ issue: w, team: T, workspace: E, selected: D = !1, picked: O = !1,
47
47
  onContextMenu: N,
48
48
  className: `flex h-10 min-w-0 flex-1 items-center gap-3 pr-5 text-sm ${A ? "pl-3" : "pl-5"}`,
49
49
  children: [
50
- /* @__PURE__ */ S(n, { priority: w.priority }),
50
+ /* @__PURE__ */ S(t, { priority: w.priority }),
51
51
  /* @__PURE__ */ C("span", {
52
52
  className: `flex shrink-0 items-center gap-1 text-xs text-muted-foreground ${w.type ? "w-20" : "w-16"}`,
53
53
  children: [w.type && /* @__PURE__ */ S(v, {
54
54
  content: w.type.name,
55
55
  describesAnchor: !0,
56
- children: /* @__PURE__ */ S(o, {
56
+ children: /* @__PURE__ */ S(d, {
57
57
  type: w.type,
58
58
  className: "size-3.5"
59
59
  })
60
60
  }), w.identifier]
61
61
  }),
62
- /* @__PURE__ */ S(i, { category: w.status.category }),
62
+ /* @__PURE__ */ S(r, { category: w.status.category }),
63
63
  /* @__PURE__ */ S("span", {
64
64
  className: "min-w-0 flex-1 truncate",
65
65
  children: w.title
@@ -68,21 +68,21 @@ function w({ issue: w, team: T, workspace: E, selected: D = !1, picked: O = !1,
68
68
  content: F("requestCount", { count: w.requests }),
69
69
  children: /* @__PURE__ */ C("span", {
70
70
  className: "inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground tabular-nums",
71
- children: [/* @__PURE__ */ S(a, { className: "size-3" }), w.requests]
71
+ children: [/* @__PURE__ */ S(i, { className: "size-3" }), w.requests]
72
72
  })
73
73
  }),
74
74
  w.project && /* @__PURE__ */ C("span", {
75
75
  className: "hidden max-w-40 shrink-0 items-center gap-1 truncate text-xs text-muted-foreground lg:inline-flex",
76
- children: [/* @__PURE__ */ S(r, { className: "size-3 shrink-0" }), /* @__PURE__ */ S("span", {
76
+ children: [/* @__PURE__ */ S(n, { className: "size-3 shrink-0" }), /* @__PURE__ */ S("span", {
77
77
  className: "truncate",
78
78
  children: w.project.name
79
79
  })]
80
80
  }),
81
- w.dueDate && /* @__PURE__ */ S(c, {
81
+ w.dueDate && /* @__PURE__ */ S(s, {
82
82
  date: w.dueDate,
83
83
  closed: w.status.category === "completed" || w.status.category === "canceled"
84
84
  }),
85
- /* @__PURE__ */ S(l, {
85
+ /* @__PURE__ */ S(c, {
86
86
  issue: w,
87
87
  team: T
88
88
  }),
@@ -91,12 +91,12 @@ function w({ issue: w, team: T, workspace: E, selected: D = !1, picked: O = !1,
91
91
  describesAnchor: !0,
92
92
  children: /* @__PURE__ */ S("span", {
93
93
  className: "hidden h-5 min-w-5 shrink-0 items-center justify-center rounded border border-border px-1 text-[11px] text-muted-foreground tabular-nums sm:inline-flex",
94
- children: u(w.estimate, T?.estimateScale)
94
+ children: l(w.estimate, T?.estimateScale)
95
95
  })
96
96
  }),
97
97
  /* @__PURE__ */ C("span", {
98
98
  className: "hidden shrink-0 gap-1 md:flex",
99
- children: [P.filter((e) => t(w.fields[e.id])).map((e) => /* @__PURE__ */ S(v, {
99
+ children: [P.filter((e) => u(w.fields[e.id])).map((e) => /* @__PURE__ */ S(v, {
100
100
  content: e.name,
101
101
  describesAnchor: !0,
102
102
  children: /* @__PURE__ */ S("span", {
@@ -117,7 +117,7 @@ function w({ issue: w, team: T, workspace: E, selected: D = !1, picked: O = !1,
117
117
  size: "xs",
118
118
  ringColor: "var(--avatar-person-text)",
119
119
  className: "shrink-0",
120
- children: k.map((e) => /* @__PURE__ */ S(f, {
120
+ children: k.map((e) => /* @__PURE__ */ S(m, {
121
121
  workspace: E,
122
122
  handle: e,
123
123
  children: /* @__PURE__ */ S(h, {
@@ -129,12 +129,12 @@ function w({ issue: w, team: T, workspace: E, selected: D = !1, picked: O = !1,
129
129
  }),
130
130
  /* @__PURE__ */ S(g, {
131
131
  size: "sm",
132
- children: w.assignees.map((e) => /* @__PURE__ */ S(f, {
132
+ children: w.assignees.map((e) => /* @__PURE__ */ S(m, {
133
133
  workspace: E,
134
134
  kind: e.kind,
135
135
  handle: e.handle,
136
136
  children: /* @__PURE__ */ S(h, {
137
- ...m(e.kind),
137
+ ...f(e.kind),
138
138
  name: B(e.kind, e.handle),
139
139
  src: V(e.kind, e.handle),
140
140
  tooltip: e.kind !== "user"