@parallelworks/tandem-web 0.171.1 → 0.171.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.
Files changed (164) hide show
  1. package/components/AccessGrants.js +6 -6
  2. package/components/ActivityTimeline.js +57 -57
  3. package/components/ActorAvatar.js +4 -4
  4. package/components/AgentWork.js +494 -494
  5. package/components/AppLauncher.js +7 -7
  6. package/components/AreaLink.js +13 -13
  7. package/components/AreaTiles.js +13 -13
  8. package/components/AreaWork.js +22 -22
  9. package/components/Attachments.js +29 -29
  10. package/components/BlockHandle.js +3 -3
  11. package/components/BugRotation.js +8 -8
  12. package/components/CodeHostSettings.js +38 -38
  13. package/components/CollabEditor.js +13 -13
  14. package/components/CommandPalette.js +206 -206
  15. package/components/CustomFields.js +95 -95
  16. package/components/CustomerRequests.js +11 -11
  17. package/components/DashboardPanel.js +23 -23
  18. package/components/DateChip.js +21 -21
  19. package/components/DocHistory.js +14 -14
  20. package/components/DocIcon.js +4 -4
  21. package/components/DocIconPicker.js +4 -4
  22. package/components/DocLinkPicker.js +22 -22
  23. package/components/DocLook.js +16 -16
  24. package/components/DocProperties.js +81 -81
  25. package/components/DocTable.js +53 -53
  26. package/components/DocsTree.js +179 -179
  27. package/components/Editor.js +69 -69
  28. package/components/FavoritesNav.js +78 -78
  29. package/components/GitHub.js +87 -87
  30. package/components/Graph.js +14 -14
  31. package/components/HostActions.js +21 -21
  32. package/components/HostPanel.js +6 -6
  33. package/components/HoverCards.js +74 -74
  34. package/components/IssueBoard.js +13 -10
  35. package/components/IssueBreakdown.js +31 -31
  36. package/components/IssueCode.js +19 -19
  37. package/components/IssueEvent.js +12 -12
  38. package/components/IssueFilters.js +39 -39
  39. package/components/IssueGroup.js +16 -16
  40. package/components/IssueImport.js +13 -13
  41. package/components/IssueInsights.js +20 -20
  42. package/components/IssueListBlock.js +81 -81
  43. package/components/IssueRelations.js +34 -34
  44. package/components/IssueRow.js +31 -31
  45. package/components/IssueSentry.js +4 -4
  46. package/components/IssueTemplates.js +23 -23
  47. package/components/IssueTypes.js +40 -40
  48. package/components/MarkdownTransfer.js +10 -10
  49. package/components/MentionPicker.js +19 -19
  50. package/components/NewIssueDialog.js +53 -53
  51. package/components/NewProjectDialog.js +82 -82
  52. package/components/PersonActivity.js +13 -13
  53. package/components/PersonHoverCard.js +44 -44
  54. package/components/Planning.js +16 -16
  55. package/components/Reports.js +8 -8
  56. package/components/SettingsNav.js +15 -15
  57. package/components/ShareDialog.js +8 -8
  58. package/components/SharedViewer.js +23 -23
  59. package/components/SlashMenu.js +26 -26
  60. package/components/SubPages.js +10 -10
  61. package/components/TeamForm.js +9 -9
  62. package/components/TeamRepositories.js +21 -21
  63. package/components/TeamWorkflow.js +6 -6
  64. package/components/UnlinkedMentions.js +29 -29
  65. package/components/Updates.js +8 -8
  66. package/components/Widgets.js +4 -4
  67. package/components/WorkCounts.js +12 -12
  68. package/components/cycleCrumb.js +8 -8
  69. package/components/editorPlugins.js +101 -101
  70. package/components/settings.js +6 -6
  71. package/components/video.js +7 -7
  72. package/hostedApp.js +24 -24
  73. package/index.js +18 -18
  74. package/lib/assignees.js +3 -3
  75. package/lib/attachments.js +12 -12
  76. package/lib/boardMove.js +27 -27
  77. package/lib/collab.js +1 -1
  78. package/lib/docs.js +115 -115
  79. package/lib/githubLink.js +7 -7
  80. package/lib/issueList.js +51 -51
  81. package/lib/issueMenu.js +117 -117
  82. package/lib/knowledge.js +134 -134
  83. package/lib/live.js +38 -38
  84. package/lib/notifications.js +47 -47
  85. package/lib/views.js +31 -31
  86. package/package.json +24 -24
  87. package/pages/area.js +64 -64
  88. package/pages/areas.js +199 -199
  89. package/pages/decisions.js +51 -51
  90. package/pages/issues.js +120 -120
  91. package/pages/projects.js +238 -238
  92. package/pages/triage.js +109 -109
  93. package/routes/_workspace/agents/_slug2.js +127 -127
  94. package/routes/_workspace/agents/index2.js +22 -22
  95. package/routes/_workspace/dashboards/_dashboardId2.js +84 -84
  96. package/routes/_workspace/dashboards/index2.js +34 -34
  97. package/routes/_workspace/docs/_doc2.js +267 -267
  98. package/routes/_workspace/docs/space2._space.js +31 -31
  99. package/routes/_workspace/docs2.js +4 -4
  100. package/routes/_workspace/graph2.js +11 -11
  101. package/routes/_workspace/graph3.js +11 -11
  102. package/routes/_workspace/issues/_identifier2.js +477 -477
  103. package/routes/_workspace/issues/index.js +13 -13
  104. package/routes/_workspace/knowledge/_term2.js +175 -175
  105. package/routes/_workspace/knowledge/_term3.js +4 -4
  106. package/routes/_workspace/knowledge/index.js +12 -12
  107. package/routes/_workspace/knowledge/index2.js +117 -117
  108. package/routes/_workspace/measures2.js +8 -8
  109. package/routes/_workspace/measures3.js +29 -29
  110. package/routes/_workspace/notifications2.js +263 -263
  111. package/routes/_workspace/people/_username.js +10 -10
  112. package/routes/_workspace/people/_username2.js +41 -41
  113. package/routes/_workspace/projects/_projectId3.js +303 -303
  114. package/routes/_workspace/projects/_projectId4.js +4 -4
  115. package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +28 -28
  116. package/routes/_workspace/projects/_projectId_4.milestones._milestoneId.js +4 -4
  117. package/routes/_workspace/projects/index.js +8 -8
  118. package/routes/_workspace/settings/account2.js +8 -8
  119. package/routes/_workspace/settings/audit-log2.js +8 -8
  120. package/routes/_workspace/settings/audit-log3.js +155 -155
  121. package/routes/_workspace/settings/connections2.js +4 -4
  122. package/routes/_workspace/settings/fields2.js +5 -5
  123. package/routes/_workspace/settings/github2.js +11 -11
  124. package/routes/_workspace/settings/gitlab2.js +5 -5
  125. package/routes/_workspace/settings/groups2.js +52 -52
  126. package/routes/_workspace/settings/import2.js +39 -39
  127. package/routes/_workspace/settings/index2.js +5 -5
  128. package/routes/_workspace/settings/intercom2.js +11 -11
  129. package/routes/_workspace/settings/labels2.js +33 -33
  130. package/routes/_workspace/settings/members2.js +81 -81
  131. package/routes/_workspace/settings/notifications2.js +46 -46
  132. package/routes/_workspace/settings/parallelworks2.js +20 -20
  133. package/routes/_workspace/settings/roles2.js +41 -41
  134. package/routes/_workspace/settings/runners2.js +15 -15
  135. package/routes/_workspace/settings/sentry2.js +15 -15
  136. package/routes/_workspace/settings/sessions2.js +9 -9
  137. package/routes/_workspace/settings/sessions3.js +4 -4
  138. package/routes/_workspace/settings/slack2.js +12 -12
  139. package/routes/_workspace/settings/sso2.js +37 -37
  140. package/routes/_workspace/settings/sso3.js +7 -7
  141. package/routes/_workspace/settings/teams2.js +29 -29
  142. package/routes/_workspace/settings/tokens2.js +32 -32
  143. package/routes/_workspace/settings/tokens3.js +4 -4
  144. package/routes/_workspace/settings/webhooks2.js +41 -41
  145. package/routes/_workspace/settings/zendesk2.js +11 -11
  146. package/routes/_workspace/teams/_key/cycles/_number2.js +33 -33
  147. package/routes/_workspace/teams/_key/cycles/_number3.js +7 -7
  148. package/routes/_workspace/teams/_key/cycles/index2.js +37 -37
  149. package/routes/_workspace/teams/_key/issues.js +10 -10
  150. package/routes/_workspace/teams/_key/projects.js +6 -6
  151. package/routes/_workspace/teams/_key/settings2.js +396 -396
  152. package/routes/_workspace2.js +308 -308
  153. package/routes/_workspace3.js +8 -8
  154. package/routes/device2.js +4 -4
  155. package/routes/device3.js +4 -4
  156. package/routes/docs/_tag/_endpoint2.js +3 -3
  157. package/routes/docs/_tag/index2.js +3 -3
  158. package/routes/docs/route2.js +7 -7
  159. package/routes/index2.js +5 -5
  160. package/routes/login2.js +10 -10
  161. package/routes/new2.js +12 -12
  162. package/routes/new3.js +5 -5
  163. package/routes/request2._token.js +6 -6
  164. package/routes/share2._secret.js +4 -4
@@ -1,13 +1,13 @@
1
1
  import { customersQuery as e, cyclesQuery as t, labelsQuery as n, meQuery as r, myTeamsQuery as i, projectsQuery as ee, statusesQuery as te, teamsQuery as ne } from "../api/queries.js";
2
- import { CalendarIcon as a, CycleIcon as re, FolderIcon as ie, PriorityIcon as o, ProjectIcon as ae, StatusIcon as s, TagIcon as c, UserIcon as l, UsersIcon as u, usePriorityNames as d } from "./icons.js";
3
- import { usePeople as f } from "../lib/people.js";
4
- import { ProjectStatusIcon as p } from "./Planning.js";
5
- import { youFirst as m } from "../lib/assigneeOrder.js";
6
- import { projectRef as oe } from "../lib/projects.js";
7
- import { customFieldsQuery as se, fieldsFor as ce, filterableKinds as le, formatFieldFilters as h, parseFieldFilters as g } from "../lib/customFields.js";
8
- import { issueTypesQuery as _ } from "../lib/issueTypes.js";
9
- import { TypeIcon as v } from "./IssueTypes.js";
10
- import { statusRef as y } from "../lib/refs.js";
2
+ import { youFirst as re } from "../lib/assigneeOrder.js";
3
+ import { customFieldsQuery as ie, fieldsFor as a, filterableKinds as o, formatFieldFilters as s, parseFieldFilters as c } from "../lib/customFields.js";
4
+ import { issueTypesQuery as ae } from "../lib/issueTypes.js";
5
+ import { usePeople as oe } from "../lib/people.js";
6
+ import { projectRef as l } from "../lib/projects.js";
7
+ import { statusRef as u } from "../lib/refs.js";
8
+ import { TypeIcon as d } from "./IssueTypes.js";
9
+ import { CalendarIcon as f, CycleIcon as p, FolderIcon as se, PriorityIcon as m, ProjectIcon as ce, StatusIcon as h, TagIcon as g, UserIcon as _, UsersIcon as v, usePriorityNames as y } from "./icons.js";
10
+ import { ProjectStatusIcon as le } from "./Planning.js";
11
11
  import { Avatar as b } from "@parallelworks/ui";
12
12
  import { useMemo as ue } from "react";
13
13
  import { useTranslations as x } from "use-intl";
@@ -56,7 +56,7 @@ function de(e) {
56
56
  values: r
57
57
  });
58
58
  let i = /* @__PURE__ */ new Map();
59
- for (let t of g(e.fields)) i.set(t.field, [...i.get(t.field) ?? [], t.value]);
59
+ for (let t of c(e.fields)) i.set(t.field, [...i.get(t.field) ?? [], t.value]);
60
60
  for (let [e, n] of i) t.push({
61
61
  field: T(e),
62
62
  op: "is",
@@ -94,7 +94,7 @@ function fe(e) {
94
94
  }
95
95
  }
96
96
  }
97
- return n.length > 0 && (t.fields = h(n)), t;
97
+ return n.length > 0 && (t.fields = s(n)), t;
98
98
  }
99
99
  function k(e, t) {
100
100
  let n = { ...e };
@@ -104,14 +104,14 @@ function k(e, t) {
104
104
  ...t
105
105
  };
106
106
  }
107
- function A(h, E, k, A = !1) {
108
- let j = x("issueFilters"), M = x("common"), N = x("planning"), P = C(r).data?.user.username, { data: F = [] } = C(ne(h)), { data: I = [] } = C(i(h)), L = I.some((e) => e.key === E.team) ? I : [...I, ...F.filter((e) => e.key === E.team)], { data: R = [] } = C(n(h)), { data: z = [] } = C(ee(h)), { data: B = [] } = C(e(h)), V = L.find((e) => e.key === E.team), { data: H = [] } = C({
109
- ...t(h, V?.key ?? ""),
107
+ function A(s, E, k, A = !1) {
108
+ let j = x("issueFilters"), M = x("common"), N = x("planning"), P = C(r).data?.user.username, { data: F = [] } = C(ne(s)), { data: I = [] } = C(i(s)), L = I.some((e) => e.key === E.team) ? I : [...I, ...F.filter((e) => e.key === E.team)], { data: R = [] } = C(n(s)), { data: z = [] } = C(ee(s)), { data: B = [] } = C(e(s)), V = L.find((e) => e.key === E.team), { data: H = [] } = C({
109
+ ...t(s, V?.key ?? ""),
110
110
  enabled: !!V?.cyclesEnabled
111
111
  }), { data: U = [] } = C({
112
- ...te(h, V?.key ?? ""),
112
+ ...te(s, V?.key ?? ""),
113
113
  enabled: !!V
114
- }), W = d(), { members: G, agents: K, person: q, agentName: J } = f(h), { data: Y } = C(se(h)), { data: X } = C(_(h)), Z = x("issueTypes"), Q = x("customFields"), pe = ue(() => {
114
+ }), W = y(), { members: G, agents: K, person: q, agentName: J } = oe(s), { data: Y } = C(ie(s)), { data: X } = C(ae(s)), Z = x("issueTypes"), Q = x("customFields"), pe = ue(() => {
115
115
  let e = {
116
116
  multiple: !1,
117
117
  operators: ["is"]
@@ -122,7 +122,7 @@ function A(h, E, k, A = !1) {
122
122
  {
123
123
  key: "team",
124
124
  label: j("team"),
125
- icon: /* @__PURE__ */ S(ie, {}),
125
+ icon: /* @__PURE__ */ S(se, {}),
126
126
  kind: "enum",
127
127
  ...e,
128
128
  required: A,
@@ -135,16 +135,16 @@ function A(h, E, k, A = !1) {
135
135
  {
136
136
  key: "assignee",
137
137
  label: j("assignee"),
138
- icon: /* @__PURE__ */ S(l, {}),
138
+ icon: /* @__PURE__ */ S(_, {}),
139
139
  kind: "people",
140
140
  ...e,
141
141
  options: [
142
142
  {
143
143
  value: D,
144
144
  label: j("noAssignee"),
145
- icon: /* @__PURE__ */ S(l, {})
145
+ icon: /* @__PURE__ */ S(_, {})
146
146
  },
147
- ...m(G, P).map((e) => ({
147
+ ...re(G, P).map((e) => ({
148
148
  value: e.user.username,
149
149
  label: e.user.name,
150
150
  ...e.user.username === P && { description: M("you") },
@@ -173,7 +173,7 @@ function A(h, E, k, A = !1) {
173
173
  {
174
174
  key: "creator",
175
175
  label: j("creator"),
176
- icon: /* @__PURE__ */ S(l, {}),
176
+ icon: /* @__PURE__ */ S(_, {}),
177
177
  kind: "people",
178
178
  ...e,
179
179
  options: G.map((e) => ({
@@ -191,7 +191,7 @@ function A(h, E, k, A = !1) {
191
191
  {
192
192
  key: "priority",
193
193
  label: j("priority"),
194
- icon: /* @__PURE__ */ S(o, { priority: 2 }),
194
+ icon: /* @__PURE__ */ S(m, { priority: 2 }),
195
195
  kind: "enum",
196
196
  operators: ["is"],
197
197
  options: [
@@ -203,13 +203,13 @@ function A(h, E, k, A = !1) {
203
203
  ].map((e) => ({
204
204
  value: String(e),
205
205
  label: W[e] ?? "",
206
- icon: /* @__PURE__ */ S(o, { priority: e })
206
+ icon: /* @__PURE__ */ S(m, { priority: e })
207
207
  }))
208
208
  },
209
209
  {
210
210
  key: "label",
211
211
  label: j("label"),
212
- icon: /* @__PURE__ */ S(c, {}),
212
+ icon: /* @__PURE__ */ S(g, {}),
213
213
  kind: "enum",
214
214
  ...e,
215
215
  options: R.map((e) => ({
@@ -225,20 +225,20 @@ function A(h, E, k, A = !1) {
225
225
  {
226
226
  key: "project",
227
227
  label: j("project"),
228
- icon: /* @__PURE__ */ S(ae, {}),
228
+ icon: /* @__PURE__ */ S(ce, {}),
229
229
  kind: "enum",
230
230
  ...e,
231
231
  options: z.map((e) => ({
232
- value: oe(e),
232
+ value: l(e),
233
233
  label: e.name,
234
- icon: /* @__PURE__ */ S(p, { status: e.status })
234
+ icon: /* @__PURE__ */ S(le, { status: e.status })
235
235
  }))
236
236
  }
237
237
  ];
238
238
  (B.length > 0 || E.customer) && n.push({
239
239
  key: "customer",
240
240
  label: j("customer"),
241
- icon: /* @__PURE__ */ S(u, {}),
241
+ icon: /* @__PURE__ */ S(v, {}),
242
242
  kind: "enum",
243
243
  ...e,
244
244
  options: B.map((e) => ({
@@ -248,13 +248,13 @@ function A(h, E, k, A = !1) {
248
248
  }), (V || E.status) && n.splice(3, 0, {
249
249
  key: "status",
250
250
  label: j("status"),
251
- icon: /* @__PURE__ */ S(s, { category: "started" }),
251
+ icon: /* @__PURE__ */ S(h, { category: "started" }),
252
252
  kind: "enum",
253
253
  operators: ["is"],
254
254
  options: U.map((e) => ({
255
- value: y(e),
255
+ value: u(e),
256
256
  label: e.name,
257
- icon: /* @__PURE__ */ S(s, {
257
+ icon: /* @__PURE__ */ S(h, {
258
258
  category: e.category,
259
259
  step: e.step
260
260
  })
@@ -262,7 +262,7 @@ function A(h, E, k, A = !1) {
262
262
  }), (V?.cyclesEnabled || E.cycle) && n.push({
263
263
  key: "cycle",
264
264
  label: j("cycle"),
265
- icon: /* @__PURE__ */ S(re, {}),
265
+ icon: /* @__PURE__ */ S(p, {}),
266
266
  kind: "enum",
267
267
  ...e,
268
268
  options: H.map((e) => ({
@@ -275,14 +275,14 @@ function A(h, E, k, A = !1) {
275
275
  (r.length > 0 || E.type) && n.push({
276
276
  key: "type",
277
277
  label: Z("type"),
278
- icon: /* @__PURE__ */ S(c, {}),
278
+ icon: /* @__PURE__ */ S(g, {}),
279
279
  kind: "enum",
280
280
  multiple: !0,
281
281
  operators: ["is"],
282
282
  options: [...r.map((e) => ({
283
283
  value: e.id,
284
284
  label: e.name,
285
- icon: /* @__PURE__ */ S(v, {
285
+ icon: /* @__PURE__ */ S(d, {
286
286
  type: e,
287
287
  className: "size-3.5"
288
288
  })
@@ -291,8 +291,8 @@ function A(h, E, k, A = !1) {
291
291
  label: Z("noType")
292
292
  }]
293
293
  });
294
- let i = new Set(g(E.fields).map((e) => e.field));
295
- for (let e of (Y ?? []).filter((e) => e.target === "issue" && le.includes(e.kind) && (ce([e], "issue", V?.id).length > 0 || i.has(e.id)))) {
294
+ let i = new Set(c(E.fields).map((e) => e.field));
295
+ for (let e of (Y ?? []).filter((e) => e.target === "issue" && o.includes(e.kind) && (a([e], "issue", V?.id).length > 0 || i.has(e.id)))) {
296
296
  let t = {
297
297
  value: "none",
298
298
  label: Q("noValue")
@@ -300,7 +300,7 @@ function A(h, E, k, A = !1) {
300
300
  n.push({
301
301
  key: T(e.id),
302
302
  label: e.name,
303
- icon: /* @__PURE__ */ S(c, {}),
303
+ icon: /* @__PURE__ */ S(g, {}),
304
304
  kind: "enum",
305
305
  multiple: !0,
306
306
  operators: ["is"],
@@ -329,7 +329,7 @@ function A(h, E, k, A = !1) {
329
329
  return n.push({
330
330
  key: "overdue",
331
331
  label: j("overdue"),
332
- icon: /* @__PURE__ */ S(a, {}),
332
+ icon: /* @__PURE__ */ S(f, {}),
333
333
  kind: "boolean"
334
334
  }), n;
335
335
  }, [
@@ -367,7 +367,7 @@ function A(h, E, k, A = !1) {
367
367
  }
368
368
  };
369
369
  return w({
370
- storageKey: `issues:${h}`,
370
+ storageKey: `issues:${s}`,
371
371
  fields: pe,
372
372
  store: me,
373
373
  remember: !1
@@ -1,23 +1,23 @@
1
1
  import { teamsQuery as e } from "../api/queries.js";
2
- import { StatusIcon as t } from "./icons.js";
3
- import { useIssueMenu as n } from "../lib/issueMenu.js";
4
- import { IssueRow as r } from "./IssueRow.js";
5
- import { IssueSection as i } from "./IssueSection.js";
2
+ import { useIssueMenu as t } from "../lib/issueMenu.js";
3
+ import { IssueRow as n } from "./IssueRow.js";
4
+ import { IssueSection as r } from "./IssueSection.js";
5
+ import { StatusIcon as i } from "./icons.js";
6
6
  import { useOpenMenu as a } from "@parallelworks/ui";
7
7
  import { useTranslations as o } from "use-intl";
8
8
  import { jsx as s } from "react/jsx-runtime";
9
9
  import { useQuery as c } from "@tanstack/react-query";
10
10
  // src/components/IssueGroup.tsx
11
- function l({ workspace: t, title: o, icon: l, issues: u }) {
12
- let { data: d = [] } = c(e(t)), f = a(), p = n(t);
13
- return /* @__PURE__ */ s(i, {
11
+ function l({ workspace: i, title: o, icon: l, issues: u }) {
12
+ let { data: d = [] } = c(e(i)), f = a(), p = t(i);
13
+ return /* @__PURE__ */ s(r, {
14
14
  label: o,
15
15
  icon: l,
16
16
  count: u.length,
17
- children: u.map((e) => /* @__PURE__ */ s(r, {
17
+ children: u.map((e) => /* @__PURE__ */ s(n, {
18
18
  issue: e,
19
19
  team: d.find((t) => t.id === e.teamId),
20
- workspace: t,
20
+ workspace: i,
21
21
  onContextMenu: (t) => f(t, p([e]))
22
22
  }, e.id))
23
23
  });
@@ -30,16 +30,16 @@ var u = [
30
30
  "completed",
31
31
  "canceled"
32
32
  ];
33
- function d({ workspace: e, issues: n }) {
34
- let r = o("issues.groups");
35
- return u.map((i) => {
36
- let a = n.filter((e) => e.status.category === i);
33
+ function d({ workspace: e, issues: t }) {
34
+ let n = o("issues.groups");
35
+ return u.map((r) => {
36
+ let a = t.filter((e) => e.status.category === r);
37
37
  return a.length > 0 ? /* @__PURE__ */ s(l, {
38
38
  workspace: e,
39
- title: r(i),
40
- icon: /* @__PURE__ */ s(t, { category: i }),
39
+ title: n(r),
40
+ icon: /* @__PURE__ */ s(i, { category: r }),
41
41
  issues: a
42
- }, i) : null;
42
+ }, r) : null;
43
43
  });
44
44
  }
45
45
  export { l as IssueGroup, d as StatusGroups };
@@ -1,6 +1,6 @@
1
1
  import { api as e, unwrap as t } from "../api/client.js";
2
- import { Link as n } from "../lib/router.js";
3
- import { invalidateIssueViews as r } from "../api/mutations.js";
2
+ import { invalidateIssueViews as n } from "../api/mutations.js";
3
+ import { Link as r } from "../lib/router.js";
4
4
  import { Button as i, ErrorText as a, Modal as o, ModalTitle as s } from "@parallelworks/ui";
5
5
  import { useEffect as c, useRef as l, useState as u } from "react";
6
6
  import { useErrorMessage as d } from "@parallelworks/problem/react";
@@ -15,20 +15,20 @@ function v(e) {
15
15
  n && e(n.name, await n.text());
16
16
  }, t.click();
17
17
  }
18
- function y({ workspace: n, team: v, file: y, onClose: x }) {
18
+ function y({ workspace: r, team: v, file: y, onClose: x }) {
19
19
  let S = f("issueImport"), C = d(), w = _(), [T, E] = u(!1), D = g({
20
- mutationFn: async (r) => t(await e.POST("/api/v1/workspaces/{workspace}/teams/{key}/issues/import", {
20
+ mutationFn: async (n) => t(await e.POST("/api/v1/workspaces/{workspace}/teams/{key}/issues/import", {
21
21
  params: { path: {
22
- workspace: n,
22
+ workspace: r,
23
23
  key: v
24
24
  } },
25
25
  body: {
26
26
  csv: y.text,
27
- dryRun: r
27
+ dryRun: n
28
28
  }
29
29
  })),
30
30
  onSuccess: (e, t) => {
31
- t || (E(!0), r(w, n));
31
+ t || (E(!0), n(w, r));
32
32
  }
33
33
  }), O = l(!1), k = l(D.mutate);
34
34
  c(() => {
@@ -62,7 +62,7 @@ function y({ workspace: n, team: v, file: y, onClose: x }) {
62
62
  }) }), /* @__PURE__ */ m("ol", {
63
63
  className: "mt-3 max-h-80 divide-y divide-border overflow-y-auto rounded-md border border-border",
64
64
  children: A.rows.map((e) => /* @__PURE__ */ m(b, {
65
- workspace: n,
65
+ workspace: r,
66
66
  row: e
67
67
  }, e.row))
68
68
  })] })
@@ -84,7 +84,7 @@ function y({ workspace: n, team: v, file: y, onClose: x }) {
84
84
  });
85
85
  }
86
86
  function b({ workspace: e, row: t }) {
87
- let r = f("issueImport");
87
+ let n = f("issueImport");
88
88
  return /* @__PURE__ */ h("li", {
89
89
  className: "flex gap-3 px-3 py-2 text-xs",
90
90
  children: [
@@ -97,19 +97,19 @@ function b({ workspace: e, row: t }) {
97
97
  children: [
98
98
  /* @__PURE__ */ m("span", {
99
99
  className: t.skipped ? "text-muted-foreground line-through" : "",
100
- children: t.title || r("untitled")
100
+ children: t.title || n("untitled")
101
101
  }),
102
102
  t.skipped && /* @__PURE__ */ m("span", {
103
103
  className: "ml-2 text-danger",
104
- children: r(`skipped.${t.skipped}`)
104
+ children: n(`skipped.${t.skipped}`)
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) => `${e.field === "field" && e.name ? e.name : r(`field.${e.field}`)} “${e.value}”`).join(", ") })
108
+ children: n("leftOut", { values: t.warnings.map((e) => `${e.field === "field" && e.name ? e.name : n(`field.${e.field}`)} “${e.value}”`).join(", ") })
109
109
  })
110
110
  ]
111
111
  }),
112
- t.identifier && /* @__PURE__ */ m(n, {
112
+ t.identifier && /* @__PURE__ */ m(r, {
113
113
  to: "/$workspace/issues/$identifier",
114
114
  params: {
115
115
  workspace: e,
@@ -1,5 +1,5 @@
1
- import { PriorityIcon as e, StatusIcon as t, usePriorityNames as n } from "./icons.js";
2
- import { usePeople as r } from "../lib/people.js";
1
+ import { usePeople as e } from "../lib/people.js";
2
+ import { PriorityIcon as t, StatusIcon as n, usePriorityNames as r } from "./icons.js";
3
3
  import { ChartTooltipFrame as i, Select as a, SeriesSwatch as o } from "@parallelworks/ui";
4
4
  import { useState as s } from "react";
5
5
  import { useFormatter as c, useTranslations as l } from "use-intl";
@@ -51,7 +51,7 @@ function C(e) {
51
51
  }
52
52
  var w = "#1099e3", T = (e) => `color-mix(in oklch, ${w} ${e}%, var(--theme-panel-bg))`;
53
53
  function E({ workspace: h, issues: y }) {
54
- let b = l("insights"), w = l("issues.groups"), E = c(), D = n(), { nameOf: O } = r(h), [k, A] = s("count"), [j, M] = s("status"), [N, P] = s(null), F = k === "cycle" || k === "lead", I = (e) => e === void 0 ? "–" : F ? b("days", { days: E.number(e, { maximumFractionDigits: 1 }) }) : E.number(e, { maximumFractionDigits: 1 }), L = [b(`measures.${k}`)], R;
54
+ let b = l("insights"), w = l("issues.groups"), E = c(), D = r(), { nameOf: O } = e(h), [k, A] = s("count"), [j, M] = s("status"), [N, P] = s(null), F = k === "cycle" || k === "lead", I = (e) => e === void 0 ? "–" : F ? b("days", { days: E.number(e, { maximumFractionDigits: 1 }) }) : E.number(e, { maximumFractionDigits: 1 }), L = [b(`measures.${k}`)], R;
55
55
  if (j === "week") {
56
56
  let e = S(Date.now()), t = Math.min(e, ...y.map((e) => S(Date.parse(e.createdAt)))), n = Math.min(_, Math.max(v, Math.round((e - t) / g) + 1)), r = Array.from({ length: n }, (t, r) => e - (n - 1 - r) * g), i = (e, t) => !!t && S(Date.parse(t)) === e, a = (e) => E.dateTime(new Date(e), {
57
57
  month: "short",
@@ -67,33 +67,33 @@ function E({ workspace: h, issues: y }) {
67
67
  values: [x(y.filter((t) => i(e, t.createdAt)), k), x(y.filter((t) => t.status.category === "completed" && i(e, t.completedAt)), k)]
68
68
  })));
69
69
  } else {
70
- let n = /* @__PURE__ */ new Map(), r = (e, t, r, i, a) => {
71
- let o = n.get(e) ?? {
72
- key: e,
73
- label: t,
70
+ let e = /* @__PURE__ */ new Map(), r = (t, n, r, i, a) => {
71
+ let o = e.get(t) ?? {
72
+ key: t,
73
+ label: n,
74
74
  icon: i,
75
75
  issues: [],
76
76
  order: r,
77
77
  values: []
78
78
  };
79
- o.issues.push(a), n.set(e, o);
79
+ o.issues.push(a), e.set(t, o);
80
80
  };
81
- for (let n of y) if (j === "status") r(n.status.category, w(n.status.category), m.indexOf(n.status.category), /* @__PURE__ */ u(t, {
82
- category: n.status.category,
83
- step: n.status.step
84
- }), n);
85
- else if (j === "priority") r(String(n.priority), D[n.priority] ?? "", n.priority === 0 ? 5 : n.priority, /* @__PURE__ */ u(e, { priority: n.priority }), n);
81
+ for (let e of y) if (j === "status") r(e.status.category, w(e.status.category), m.indexOf(e.status.category), /* @__PURE__ */ u(n, {
82
+ category: e.status.category,
83
+ step: e.status.step
84
+ }), e);
85
+ else if (j === "priority") r(String(e.priority), D[e.priority] ?? "", e.priority === 0 ? 5 : e.priority, /* @__PURE__ */ u(t, { priority: e.priority }), e);
86
86
  else if (j === "label") {
87
- n.labels.length === 0 && r("", b("none"), Infinity, null, n);
88
- for (let e of n.labels) r(e.id, e.name, 0, /* @__PURE__ */ u("span", {
87
+ e.labels.length === 0 && r("", b("none"), Infinity, null, e);
88
+ for (let t of e.labels) r(t.id, t.name, 0, /* @__PURE__ */ u("span", {
89
89
  className: "size-2 rounded-full",
90
- style: { background: e.color }
91
- }), n);
90
+ style: { background: t.color }
91
+ }), e);
92
92
  } else {
93
- n.assignees.length === 0 && r("", b("unassigned"), Infinity, null, n);
94
- for (let e of n.assignees) r(`${e.kind}:${e.handle}`, O(e.kind, e.handle), 0, null, n);
93
+ e.assignees.length === 0 && r("", b("unassigned"), Infinity, null, e);
94
+ for (let t of e.assignees) r(`${t.kind}:${t.handle}`, O(t.kind, t.handle), 0, null, e);
95
95
  }
96
- R = [...n.values()].map((e) => ({
96
+ R = [...e.values()].map((e) => ({
97
97
  ...e,
98
98
  values: [x(e.issues, k)]
99
99
  })).sort((e, t) => j === "status" || j === "priority" ? e.order - t.order : e.order - t.order || (t.values[0] ?? 0) - (e.values[0] ?? 0));