@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
package/lib/issueList.js CHANGED
@@ -1,6 +1,6 @@
1
- import { PriorityIcon as e, StatusIcon as t } from "../components/icons.js";
2
- import { fieldRef as n, groupableKinds as r, parseFieldFilters as i, sortableKinds as a } from "./customFields.js";
3
- import { TypeIcon as o } from "../components/IssueTypes.js";
1
+ import { TypeIcon as e } from "../components/IssueTypes.js";
2
+ import { PriorityIcon as t, StatusIcon as n } from "../components/icons.js";
3
+ import { fieldRef as r, groupableKinds as i, parseFieldFilters as a, sortableKinds as o } from "./customFields.js";
4
4
  import { statusRef as s } from "./refs.js";
5
5
  import { Avatar as c } from "@parallelworks/ui";
6
6
  import { jsx as l } from "react/jsx-runtime";
@@ -24,10 +24,10 @@ var u = {
24
24
  "label",
25
25
  "type",
26
26
  "none"
27
- ], p = (e, t) => d.includes(e) || t.some((t) => n(e) === t.id && a.includes(t.kind)), m = (e, t) => f.includes(e) || t.some((t) => n(e) === t.id && r.includes(t.kind)), h = (e) => typeof e == "number" ? String(e) : typeof e == "string" && e !== "" ? e : void 0;
27
+ ], p = (e, t) => d.includes(e) || t.some((t) => r(e) === t.id && o.includes(t.kind)), m = (e, t) => f.includes(e) || t.some((t) => r(e) === t.id && i.includes(t.kind)), h = (e) => typeof e == "number" ? String(e) : typeof e == "string" && e !== "" ? e : void 0;
28
28
  function g(e) {
29
- let t = {}, r = h(e.view);
30
- r && r in u && (t.view = r);
29
+ let t = {}, n = h(e.view);
30
+ n && n in u && (t.view = n);
31
31
  for (let n of [
32
32
  "team",
33
33
  "assignee",
@@ -48,9 +48,9 @@ function g(e) {
48
48
  }
49
49
  t.assignee && e.assigneeKind === "agent" && (t.assigneeKind = "agent"), t.assignee || e.unassigned !== "true" && e.unassigned !== !0 || (t.unassigned = "true"), (e.overdue === "true" || e.overdue === !0) && (t.overdue = "true");
50
50
  let i = h(e.order);
51
- i && i !== "updated" && (d.includes(i) || n(i)) && (t.order = i), e.layout === "board" && (t.layout = "board"), e.scope === "workspace" && (t.scope = "workspace");
51
+ i && i !== "updated" && (d.includes(i) || r(i)) && (t.order = i), e.layout === "board" && (t.layout = "board"), e.scope === "workspace" && (t.scope = "workspace");
52
52
  let a = h(e.group);
53
- return a && a !== "status" && (f.includes(a) || n(a)) && (t.group = a), t;
53
+ return a && a !== "status" && (f.includes(a) || r(a)) && (t.group = a), t;
54
54
  }
55
55
  var _ = [
56
56
  "started",
@@ -60,8 +60,8 @@ var _ = [
60
60
  "completed",
61
61
  "canceled"
62
62
  ], v = (e) => e === 0 ? 5 : e;
63
- function y(e, t, r = []) {
64
- let i = r.find((e) => e.id === n(t));
63
+ function y(e, t, n = []) {
64
+ let i = n.find((e) => e.id === r(t));
65
65
  if (i) return [...e].sort(b(i));
66
66
  let a = {
67
67
  updated: () => 0,
@@ -82,63 +82,63 @@ function b(e) {
82
82
  return r === void 0 || i === void 0 ? Number(r === void 0) - Number(i === void 0) : typeof r == "number" && typeof i == "number" ? r - i : String(r).localeCompare(String(i));
83
83
  };
84
84
  }
85
- function x(r, i, a, s = !1, u = [], d = []) {
86
- let f = u.find((e) => e.id === n(i));
87
- if (f) return S(r, f, a, s);
88
- if (i === "type") {
89
- let e = {
85
+ function x(i, a, o, s = !1, u = [], d = []) {
86
+ let f = u.find((e) => e.id === r(a));
87
+ if (f) return S(i, f, o, s);
88
+ if (a === "type") {
89
+ let t = {
90
90
  key: "none",
91
- label: a.noType ?? a.none.all,
91
+ label: o.noType ?? o.none.all,
92
92
  issues: []
93
- }, t = d.map((e) => ({
94
- key: e.id,
95
- label: e.name,
96
- icon: /* @__PURE__ */ l(o, {
97
- type: e,
93
+ }, n = d.map((t) => ({
94
+ key: t.id,
95
+ label: t.name,
96
+ icon: /* @__PURE__ */ l(e, {
97
+ type: t,
98
98
  className: "size-3.5"
99
99
  }),
100
100
  issues: []
101
101
  }));
102
- for (let n of r) {
103
- if (!n.type) {
104
- e.issues.push(n);
102
+ for (let r of i) {
103
+ if (!r.type) {
104
+ t.issues.push(r);
105
105
  continue;
106
106
  }
107
- let r = t.find((e) => e.key === n.type?.id);
108
- r || (r = {
109
- key: n.type.id,
110
- label: n.type.name,
111
- icon: /* @__PURE__ */ l(o, {
112
- type: n.type,
107
+ let i = n.find((e) => e.key === r.type?.id);
108
+ i || (i = {
109
+ key: r.type.id,
110
+ label: r.type.name,
111
+ icon: /* @__PURE__ */ l(e, {
112
+ type: r.type,
113
113
  className: "size-3.5"
114
114
  }),
115
115
  issues: []
116
- }, t.push(r)), r.issues.push(n);
116
+ }, n.push(i)), i.issues.push(r);
117
117
  }
118
- return t.push(e), t.filter((e) => s || e.issues.length > 0);
118
+ return n.push(t), n.filter((e) => s || e.issues.length > 0);
119
119
  }
120
- if (i === "none") return r.length > 0 ? [{
120
+ if (a === "none") return i.length > 0 ? [{
121
121
  key: "all",
122
- label: a.none.all,
123
- issues: r
122
+ label: o.none.all,
123
+ issues: i
124
124
  }] : [];
125
- if (i === "status") return _.map((e) => ({
125
+ if (a === "status") return _.map((e) => ({
126
126
  key: e,
127
- label: a.status(e),
128
- icon: /* @__PURE__ */ l(t, { category: e }),
129
- issues: r.filter((t) => t.status.category === e)
127
+ label: o.status(e),
128
+ icon: /* @__PURE__ */ l(n, { category: e }),
129
+ issues: i.filter((t) => t.status.category === e)
130
130
  })).filter((e) => s || e.issues.length > 0);
131
- if (i === "priority") return [
131
+ if (a === "priority") return [
132
132
  1,
133
133
  2,
134
134
  3,
135
135
  4,
136
136
  0
137
- ].map((t) => ({
138
- key: String(t),
139
- label: a.priority(t),
140
- icon: /* @__PURE__ */ l(e, { priority: t }),
141
- issues: r.filter((e) => e.priority === t)
137
+ ].map((e) => ({
138
+ key: String(e),
139
+ label: o.priority(e),
140
+ icon: /* @__PURE__ */ l(t, { priority: e }),
141
+ issues: i.filter((t) => t.priority === e)
142
142
  })).filter((e) => s || e.issues.length > 0);
143
143
  let p = /* @__PURE__ */ new Map(), m = {
144
144
  key: "",
@@ -153,18 +153,18 @@ function x(r, i, a, s = !1, u = [], d = []) {
153
153
  };
154
154
  i.issues.push(e), p.set(t, i);
155
155
  };
156
- for (let e of r) if (i === "assignee") {
156
+ for (let e of i) if (a === "assignee") {
157
157
  for (let t of s ? e.assignees : e.assignees.slice(0, 1)) {
158
- let n = a.person(t.kind, t.handle);
158
+ let n = o.person(t.kind, t.handle);
159
159
  h(e, `${t.kind}:${t.handle}`, n, /* @__PURE__ */ l(c, {
160
160
  name: n,
161
- src: a.avatar(t.kind, t.handle),
161
+ src: o.avatar(t.kind, t.handle),
162
162
  size: "xs",
163
163
  decorative: !0
164
164
  }));
165
165
  }
166
166
  e.assignees.length === 0 && m.issues.push(e);
167
- } else if (i === "project") e.project ? h(e, e.project.id, e.project.name) : m.issues.push(e);
167
+ } else if (a === "project") e.project ? h(e, e.project.id, e.project.name) : m.issues.push(e);
168
168
  else {
169
169
  for (let t of s ? e.labels : e.labels.slice(0, 1)) h(e, t.id, t.name, /* @__PURE__ */ l("span", {
170
170
  className: "size-2 rounded-full",
@@ -176,7 +176,7 @@ function x(r, i, a, s = !1, u = [], d = []) {
176
176
  return (s || m.issues.length > 0) && g.push({
177
177
  ...m,
178
178
  key: "none",
179
- label: a.none[i]
179
+ label: o.none[a]
180
180
  }), g;
181
181
  }
182
182
  function S(e, t, n, r) {
@@ -248,7 +248,7 @@ function C(e, t) {
248
248
  ...e.customer && { customer: e.customer },
249
249
  ...e.cycle && { cycle: e.cycle },
250
250
  ...e.type && { type: e.type.split(",") },
251
- ...e.fields && { field: i(e.fields).map((e) => `${e.field}:${e.value}`) },
251
+ ...e.fields && { field: a(e.fields).map((e) => `${e.field}:${e.value}`) },
252
252
  ...e.overdue && { overdue: !0 },
253
253
  ...e.q && { q: e.q },
254
254
  ...u[n].categories.length > 0 && { category: u[n].categories },
package/lib/issueMenu.js CHANGED
@@ -1,16 +1,16 @@
1
- import { appURL as e } from "./base.js";
2
- import { api as t, unwrap as n } from "../api/client.js";
3
- import { branchName as r, issuePath as i } from "./branch.js";
4
- import { useNavigate as a } from "./router.js";
5
- import { cyclesQuery as o, issueQuery as s, labelsQuery as c, projectsQuery as l, statusesQuery as u, teamsQuery as d } from "../api/queries.js";
6
- import { invalidateIssueViews as f } from "../api/mutations.js";
7
- import { useFavorites as p } from "./favorites.js";
8
- import { copyItem as m } from "./menus.js";
9
- import { CalendarIcon as h, CycleIcon as ee, EstimateIcon as te, FolderIcon as ne, PriorityIcon as g, ProjectIcon as re, StatusIcon as _, TagIcon as v, UserIcon as y, usePriorityNames as b } from "../components/icons.js";
10
- import { addDays as x, today as S } from "./time.js";
11
- import { ProjectStatusIcon as C, scalePoints as w, useEstimateLabel as T } from "../components/Planning.js";
12
- import { assigneeKey as E, parseAssigneeKey as ie, useAssigneeOptions as D } from "./assignees.js";
13
- import { eachLimited as O } from "./eachLimited.js";
1
+ import { api as e, unwrap as t } from "../api/client.js";
2
+ import { invalidateIssueViews as n } from "../api/mutations.js";
3
+ import { cyclesQuery as r, issueQuery as i, labelsQuery as a, projectsQuery as o, statusesQuery as s, teamsQuery as c } from "../api/queries.js";
4
+ import { CalendarIcon as ee, CycleIcon as l, EstimateIcon as u, FolderIcon as te, PriorityIcon as d, ProjectIcon as f, StatusIcon as p, TagIcon as m, UserIcon as h, usePriorityNames as g } from "../components/icons.js";
5
+ import { ProjectStatusIcon as _, scalePoints as v, useEstimateLabel as y } from "../components/Planning.js";
6
+ import { assigneeKey as ne, parseAssigneeKey as re, useAssigneeOptions as b } from "./assignees.js";
7
+ import { appURL as x } from "./base.js";
8
+ import { branchName as ie, issuePath as S } from "./branch.js";
9
+ import { eachLimited as C } from "./eachLimited.js";
10
+ import { useFavorites as w } from "./favorites.js";
11
+ import { copyItem as T } from "./menus.js";
12
+ import { useNavigate as E } from "./router.js";
13
+ import { addDays as D, today as O } from "./time.js";
14
14
  import { menuDivider as k, toast as ae } from "@parallelworks/ui";
15
15
  import { useCallback as A } from "react";
16
16
  import { useErrorMessage as j } from "@parallelworks/problem/react";
@@ -18,171 +18,171 @@ import { useTranslations as M } from "use-intl";
18
18
  import { jsx as N } from "react/jsx-runtime";
19
19
  import { useQueries as P, useQuery as F, useQueryClient as I } from "@tanstack/react-query";
20
20
  // src/lib/issueMenu.tsx
21
- function L(t, n) {
22
- return e(i(t, n));
21
+ function L(e, t) {
22
+ return x(S(e, t));
23
23
  }
24
- function R(e) {
25
- let i = I(), R = a(), { data: z = [] } = F(d(e)), { data: B = [] } = F(c(e)), V = D(e), H = p(e), U = b(), W = M("issueMenu"), G = j(), K = M("common"), q = M("favorites"), J = P({ queries: z.map((t) => u(e, t.key)) }), Y = M("planning"), X = T(), { data: Z = [] } = F(l(e)), Q = P({ queries: z.map((t) => ({
26
- ...o(e, t.key),
27
- enabled: t.cyclesEnabled
24
+ function R(x) {
25
+ let S = I(), R = E(), { data: z = [] } = F(c(x)), { data: B = [] } = F(a(x)), V = b(x), H = w(x), U = g(), W = M("issueMenu"), G = j(), K = M("common"), q = M("favorites"), J = P({ queries: z.map((e) => s(x, e.key)) }), Y = M("planning"), X = y(), { data: Z = [] } = F(o(x)), Q = P({ queries: z.map((e) => ({
26
+ ...r(x, e.key),
27
+ enabled: e.cyclesEnabled
28
28
  })) });
29
- return A((a) => {
30
- let o = a[0];
31
- if (!o) return [];
32
- let c = (e) => {
29
+ return A((r) => {
30
+ let a = r[0];
31
+ if (!a) return [];
32
+ let o = (e) => {
33
33
  let t = z.findIndex((t) => t.id === e);
34
34
  return J[t]?.data ?? [];
35
- }, l = (e) => a.every(e), u = (e) => {
35
+ }, s = (e) => r.every(e), c = (e) => {
36
36
  e.length > 0 && ae.error(W("bulkFailed", {
37
37
  count: e.length,
38
38
  reason: G(e[0])
39
39
  }));
40
- }, d = async (r) => {
40
+ }, g = async (a) => {
41
41
  let o = [];
42
42
  try {
43
- u(await O(a, async (a) => {
44
- let c = r(a);
45
- if (!c) return;
46
- let l = n(await t.PATCH("/api/v1/workspaces/{workspace}/issues/{identifier}", {
43
+ c(await C(r, async (n) => {
44
+ let r = a(n);
45
+ if (!r) return;
46
+ let s = t(await e.PATCH("/api/v1/workspaces/{workspace}/issues/{identifier}", {
47
47
  params: { path: {
48
- workspace: e,
49
- identifier: a.identifier
48
+ workspace: x,
49
+ identifier: n.identifier
50
50
  } },
51
- body: c
51
+ body: r
52
52
  }));
53
- i.setQueryData(s(e, a.identifier).queryKey, l), o.push(a.identifier);
53
+ S.setQueryData(i(x, n.identifier).queryKey, s), o.push(n.identifier);
54
54
  }));
55
55
  } finally {
56
- f(i, e, o);
56
+ n(S, x, o);
57
57
  }
58
- }, p = async (r) => {
58
+ }, y = async (a) => {
59
59
  let o = [];
60
60
  try {
61
- u(await O(a.filter((e) => e.identifier.split("-")[0] !== r), async (a) => {
62
- let c = n(await t.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/move", {
61
+ c(await C(r.filter((e) => e.identifier.split("-")[0] !== a), async (n) => {
62
+ let r = t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/move", {
63
63
  params: { path: {
64
- workspace: e,
65
- identifier: a.identifier
64
+ workspace: x,
65
+ identifier: n.identifier
66
66
  } },
67
- body: { team: r }
67
+ body: { team: a }
68
68
  }));
69
- i.setQueryData(s(e, c.identifier).queryKey, c), o.push(a.identifier), window.location.pathname.toLowerCase().includes(a.identifier.toLowerCase()) && R({
69
+ S.setQueryData(i(x, r.identifier).queryKey, r), o.push(n.identifier), window.location.pathname.toLowerCase().includes(n.identifier.toLowerCase()) && R({
70
70
  to: "/$workspace/issues/$identifier",
71
71
  params: {
72
- workspace: e,
73
- identifier: c.identifier
72
+ workspace: x,
73
+ identifier: r.identifier
74
74
  },
75
75
  replace: !0
76
76
  });
77
77
  }));
78
78
  } finally {
79
- f(i, e, o);
79
+ n(S, x, o);
80
80
  }
81
- }, b = async (r) => {
81
+ }, b = async (a) => {
82
82
  let o = [];
83
83
  try {
84
- u(await O(a.filter((e) => !!e.archivedAt !== r), async (a) => {
85
- let c = { params: { path: {
86
- workspace: e,
87
- identifier: a.identifier
88
- } } }, l = n(r ? await t.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/archive", c) : await t.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/restore", c));
89
- i.setQueryData(s(e, a.identifier).queryKey, l), o.push(a.identifier);
84
+ c(await C(r.filter((e) => !!e.archivedAt !== a), async (n) => {
85
+ let r = { params: { path: {
86
+ workspace: x,
87
+ identifier: n.identifier
88
+ } } }, s = t(a ? await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/archive", r) : await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/restore", r));
89
+ S.setQueryData(i(x, n.identifier).queryKey, s), o.push(n.identifier);
90
90
  }));
91
91
  } finally {
92
- f(i, e, o);
92
+ n(S, x, o);
93
93
  }
94
- }, T = (e, t) => {
95
- let n = c(t.teamId);
94
+ }, w = (e, t) => {
95
+ let n = o(t.teamId);
96
96
  return (n.find((t) => t.name === e.name) ?? n.find((t) => t.category === e.category))?.id;
97
- }, D = a.length === 1, A = l((e) => e.teamId === o.teamId) ? z.findIndex((e) => e.id === o.teamId) : -1, j = z[A], M = (j?.cyclesEnabled ? Q[A]?.data ?? [] : []).filter((e) => e.state !== "past"), P = j?.estimateScale ?? "none", F = l((e) => e.project?.id === o.project?.id) ? o.project?.id : void 0, I = Z.find((e) => e.id === F)?.milestones ?? [], oe = (e) => e.name ? Y("cycleNamed", {
97
+ }, E = r.length === 1, A = s((e) => e.teamId === a.teamId) ? z.findIndex((e) => e.id === a.teamId) : -1, j = z[A], M = (j?.cyclesEnabled ? Q[A]?.data ?? [] : []).filter((e) => e.state !== "past"), P = j?.estimateScale ?? "none", F = s((e) => e.project?.id === a.project?.id) ? a.project?.id : void 0, I = Z.find((e) => e.id === F)?.milestones ?? [], oe = (e) => e.name ? Y("cycleNamed", {
98
98
  number: e.number,
99
99
  name: e.name
100
- }) : Y("cycle", { number: e.number }), $ = S(), se = [
100
+ }) : Y("cycle", { number: e.number }), $ = O(), se = [
101
101
  {
102
102
  label: Y("dueToday"),
103
103
  date: $
104
104
  },
105
105
  {
106
106
  label: Y("dueTomorrow"),
107
- date: x($, 1)
107
+ date: D($, 1)
108
108
  },
109
109
  {
110
110
  label: Y("dueInAWeek"),
111
- date: x($, 7)
111
+ date: D($, 7)
112
112
  },
113
113
  {
114
114
  label: Y("dueInTwoWeeks"),
115
- date: x($, 14)
115
+ date: D($, 14)
116
116
  }
117
117
  ], ce = [
118
118
  {
119
119
  label: Y("project"),
120
- icon: /* @__PURE__ */ N(re, { className: "size-4" }),
120
+ icon: /* @__PURE__ */ N(f, { className: "size-4" }),
121
121
  shortcut: "M",
122
122
  disabled: Z.length === 0,
123
123
  items: [{
124
124
  label: Y("noProject"),
125
- checked: l((e) => !e.project),
126
- onClick: () => d((e) => e.project ? { projectId: "" } : null)
125
+ checked: s((e) => !e.project),
126
+ onClick: () => g((e) => e.project ? { projectId: "" } : null)
127
127
  }, ...Z.map((e) => ({
128
128
  label: e.name,
129
- icon: /* @__PURE__ */ N(C, { status: e.status }),
130
- checked: l((t) => t.project?.id === e.id),
131
- onClick: () => d((t) => t.project?.id === e.id ? null : { projectId: e.id })
129
+ icon: /* @__PURE__ */ N(_, { status: e.status }),
130
+ checked: s((t) => t.project?.id === e.id),
131
+ onClick: () => g((t) => t.project?.id === e.id ? null : { projectId: e.id })
132
132
  }))]
133
133
  },
134
134
  ...I.length > 0 ? [{
135
135
  label: Y("milestone"),
136
136
  items: [{
137
137
  label: Y("noMilestone"),
138
- checked: l((e) => !e.milestone),
139
- onClick: () => d((e) => e.milestone ? { milestoneId: "" } : null)
138
+ checked: s((e) => !e.milestone),
139
+ onClick: () => g((e) => e.milestone ? { milestoneId: "" } : null)
140
140
  }, ...I.map((e) => ({
141
141
  label: e.name,
142
- checked: l((t) => t.milestone?.id === e.id),
143
- onClick: () => d((t) => t.milestone?.id === e.id ? null : { milestoneId: e.id })
142
+ checked: s((t) => t.milestone?.id === e.id),
143
+ onClick: () => g((t) => t.milestone?.id === e.id ? null : { milestoneId: e.id })
144
144
  }))]
145
145
  }] : [],
146
146
  ...j?.cyclesEnabled ? [{
147
147
  label: Y("cycleLabel"),
148
- icon: /* @__PURE__ */ N(ee, { className: "size-4" }),
148
+ icon: /* @__PURE__ */ N(l, { className: "size-4" }),
149
149
  items: [{
150
150
  label: Y("noCycle"),
151
- checked: l((e) => !e.cycle),
152
- onClick: () => d((e) => e.cycle ? { cycleId: "" } : null)
151
+ checked: s((e) => !e.cycle),
152
+ onClick: () => g((e) => e.cycle ? { cycleId: "" } : null)
153
153
  }, ...M.map((e) => ({
154
154
  label: Y("cycleWithState", {
155
155
  cycle: oe(e),
156
156
  state: Y(`states.${e.state}`)
157
157
  }),
158
- checked: l((t) => t.cycle?.id === e.id),
159
- onClick: () => d((t) => t.cycle?.id === e.id ? null : { cycleId: e.id })
158
+ checked: s((t) => t.cycle?.id === e.id),
159
+ onClick: () => g((t) => t.cycle?.id === e.id ? null : { cycleId: e.id })
160
160
  }))]
161
161
  }] : [],
162
162
  ...P === "none" ? [] : [{
163
163
  label: Y("estimate"),
164
- icon: /* @__PURE__ */ N(te, { className: "size-4" }),
165
- items: [0, ...w(P)].map((e) => ({
164
+ icon: /* @__PURE__ */ N(u, { className: "size-4" }),
165
+ items: [0, ...v(P)].map((e) => ({
166
166
  label: e ? X(e, P) : Y("noEstimate"),
167
- checked: l((t) => (t.estimate ?? 0) === e),
168
- onClick: () => d((t) => (t.estimate ?? 0) === e ? null : { estimate: e })
167
+ checked: s((t) => (t.estimate ?? 0) === e),
168
+ onClick: () => g((t) => (t.estimate ?? 0) === e ? null : { estimate: e })
169
169
  }))
170
170
  }],
171
171
  {
172
172
  label: Y("dueDate"),
173
173
  shortcut: "D",
174
- icon: /* @__PURE__ */ N(h, { className: "size-4" }),
174
+ icon: /* @__PURE__ */ N(ee, { className: "size-4" }),
175
175
  items: [
176
176
  ...se.map((e) => ({
177
177
  label: e.label,
178
- checked: l((t) => t.dueDate === e.date),
179
- onClick: () => d((t) => t.dueDate === e.date ? null : { dueDate: e.date })
178
+ checked: s((t) => t.dueDate === e.date),
179
+ onClick: () => g((t) => t.dueDate === e.date ? null : { dueDate: e.date })
180
180
  })),
181
181
  k,
182
182
  {
183
183
  label: Y("noDueDate"),
184
- checked: l((e) => !e.dueDate),
185
- onClick: () => d((e) => e.dueDate ? { dueDate: "" } : null)
184
+ checked: s((e) => !e.dueDate),
185
+ onClick: () => g((e) => e.dueDate ? { dueDate: "" } : null)
186
186
  }
187
187
  ]
188
188
  }
@@ -190,27 +190,27 @@ function R(e) {
190
190
  return [
191
191
  {
192
192
  label: K("status"),
193
- icon: /* @__PURE__ */ N(_, {
194
- category: o.status.category,
195
- step: o.status.step
193
+ icon: /* @__PURE__ */ N(p, {
194
+ category: a.status.category,
195
+ step: a.status.step
196
196
  }),
197
197
  shortcut: "S",
198
- items: c(o.teamId).map((e) => ({
198
+ items: o(a.teamId).map((e) => ({
199
199
  label: e.name,
200
- icon: /* @__PURE__ */ N(_, {
200
+ icon: /* @__PURE__ */ N(p, {
201
201
  category: e.category,
202
202
  step: e.step
203
203
  }),
204
- checked: l((t) => t.status.name === e.name),
205
- onClick: () => d((t) => {
206
- let n = T(e, t);
204
+ checked: s((t) => t.status.name === e.name),
205
+ onClick: () => g((t) => {
206
+ let n = w(e, t);
207
207
  return n && n !== t.status.id ? { statusId: n } : null;
208
208
  })
209
209
  }))
210
210
  },
211
211
  {
212
212
  label: K("priority"),
213
- icon: /* @__PURE__ */ N(g, { priority: o.priority }),
213
+ icon: /* @__PURE__ */ N(d, { priority: a.priority }),
214
214
  shortcut: "P",
215
215
  items: [
216
216
  1,
@@ -220,32 +220,32 @@ function R(e) {
220
220
  0
221
221
  ].map((e) => ({
222
222
  label: U[e] ?? "",
223
- icon: /* @__PURE__ */ N(g, { priority: e }),
224
- checked: l((t) => t.priority === e),
225
- onClick: () => d((t) => t.priority === e ? null : { priority: e })
223
+ icon: /* @__PURE__ */ N(d, { priority: e }),
224
+ checked: s((t) => t.priority === e),
225
+ onClick: () => g((t) => t.priority === e ? null : { priority: e })
226
226
  }))
227
227
  },
228
228
  {
229
229
  label: K("assignee"),
230
- icon: /* @__PURE__ */ N(y, {}),
230
+ icon: /* @__PURE__ */ N(h, {}),
231
231
  shortcut: "A",
232
232
  items: V.map((e) => {
233
- let t = ie(e.value), n = (t) => t.assignees.some((t) => E(t) === e.value), r = l(n);
233
+ let t = re(e.value), n = (t) => t.assignees.some((t) => ne(t) === e.value), r = s(n);
234
234
  return {
235
235
  label: e.label,
236
236
  icon: e.icon,
237
237
  checked: r,
238
- onClick: () => d((e) => r ? { removeAssignees: [t] } : n(e) ? null : { addAssignees: [t] })
238
+ onClick: () => g((e) => r ? { removeAssignees: [t] } : n(e) ? null : { addAssignees: [t] })
239
239
  };
240
240
  })
241
241
  },
242
242
  {
243
243
  label: K("labels"),
244
- icon: /* @__PURE__ */ N(v, {}),
244
+ icon: /* @__PURE__ */ N(m, {}),
245
245
  shortcut: "L",
246
246
  disabled: B.length === 0,
247
247
  items: B.map((e) => {
248
- let t = (t) => t.labels.some((t) => t.id === e.id), n = l(t);
248
+ let t = (t) => t.labels.some((t) => t.id === e.id), n = s(t);
249
249
  return {
250
250
  label: e.name,
251
251
  icon: /* @__PURE__ */ N("span", {
@@ -253,49 +253,49 @@ function R(e) {
253
253
  style: { background: e.color }
254
254
  }),
255
255
  checked: n,
256
- onClick: () => d((r) => n ? { removeLabels: [e.id] } : t(r) ? null : { addLabels: [e.id] })
256
+ onClick: () => g((r) => n ? { removeLabels: [e.id] } : t(r) ? null : { addLabels: [e.id] })
257
257
  };
258
258
  })
259
259
  },
260
260
  ...ce,
261
261
  {
262
262
  label: W("moveToTeam"),
263
- icon: /* @__PURE__ */ N(ne, {}),
263
+ icon: /* @__PURE__ */ N(te, {}),
264
264
  disabled: z.length < 2,
265
265
  items: z.filter((e) => !e.archivedAt).map((e) => ({
266
266
  label: e.name,
267
- checked: l((t) => t.teamId === e.id),
268
- onClick: () => p(e.key)
267
+ checked: s((t) => t.teamId === e.id),
268
+ onClick: () => y(e.key)
269
269
  }))
270
270
  },
271
271
  k,
272
- ...D ? [
272
+ ...E ? [
273
273
  {
274
274
  label: K("open"),
275
275
  onClick: () => R({
276
276
  to: "/$workspace/issues/$identifier",
277
277
  params: {
278
- workspace: e,
279
- identifier: o.identifier
278
+ workspace: x,
279
+ identifier: a.identifier
280
280
  }
281
281
  })
282
282
  },
283
283
  {
284
284
  label: K("openInNewTab"),
285
- href: L(e, o.identifier),
285
+ href: L(x, a.identifier),
286
286
  target: "_blank"
287
287
  },
288
288
  k
289
289
  ] : [],
290
- m(W("copyLinks", { count: a.length }), a.map((t) => L(e, t.identifier)).join("\n")),
291
- m(W("copyIds", { count: a.length }), a.map((e) => e.identifier).join(", ")),
292
- ...D ? [m(W("copyTitle"), o.title), m(W("copyBranch"), r(o.identifier, o.title))] : [],
293
- ...D ? [k, {
294
- label: H.find("issue", o.id) ? q("remove") : q("add"),
295
- onClick: () => H.toggle("issue", o.id)
290
+ T(W("copyLinks", { count: r.length }), r.map((e) => L(x, e.identifier)).join("\n")),
291
+ T(W("copyIds", { count: r.length }), r.map((e) => e.identifier).join(", ")),
292
+ ...E ? [T(W("copyTitle"), a.title), T(W("copyBranch"), ie(a.identifier, a.title))] : [],
293
+ ...E ? [k, {
294
+ label: H.find("issue", a.id) ? q("remove") : q("add"),
295
+ onClick: () => H.toggle("issue", a.id)
296
296
  }] : [],
297
297
  k,
298
- l((e) => !!e.archivedAt) ? {
298
+ s((e) => !!e.archivedAt) ? {
299
299
  label: W("restore"),
300
300
  onClick: () => b(!1)
301
301
  } : {
@@ -314,8 +314,8 @@ function R(e) {
314
314
  Z,
315
315
  Y,
316
316
  X,
317
- e,
318
- i,
317
+ x,
318
+ S,
319
319
  R,
320
320
  U,
321
321
  W,