@parallelworks/tandem-web 0.171.0 → 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 (170) hide show
  1. package/_virtual/_virtual_i18n/en/common.js +1 -0
  2. package/_virtual/_virtual_i18n/es/common.js +1 -0
  3. package/_virtual/_virtual_i18n/ja/common.js +1 -0
  4. package/_virtual/_virtual_i18n/ko/common.js +1 -0
  5. package/_virtual/_virtual_i18n/zh/common.js +1 -0
  6. package/components/AccessGrants.js +6 -6
  7. package/components/ActivityTimeline.js +57 -57
  8. package/components/ActorAvatar.js +4 -4
  9. package/components/AgentWork.js +494 -494
  10. package/components/AppLauncher.js +7 -7
  11. package/components/AreaLink.js +13 -13
  12. package/components/AreaTiles.js +13 -13
  13. package/components/AreaWork.js +22 -22
  14. package/components/Attachments.js +29 -29
  15. package/components/BlockHandle.js +3 -3
  16. package/components/BugRotation.js +8 -8
  17. package/components/CodeHostSettings.js +38 -38
  18. package/components/CollabEditor.js +13 -13
  19. package/components/CommandPalette.js +206 -206
  20. package/components/CustomFields.js +95 -95
  21. package/components/CustomerRequests.js +11 -11
  22. package/components/DashboardPanel.js +23 -23
  23. package/components/DateChip.js +21 -21
  24. package/components/DocHistory.js +14 -14
  25. package/components/DocIcon.js +4 -4
  26. package/components/DocIconPicker.js +4 -4
  27. package/components/DocLinkPicker.js +22 -22
  28. package/components/DocLook.js +16 -16
  29. package/components/DocProperties.js +81 -81
  30. package/components/DocTable.js +53 -53
  31. package/components/DocsTree.js +179 -179
  32. package/components/Editor.js +69 -69
  33. package/components/FavoritesNav.js +78 -78
  34. package/components/GitHub.js +87 -87
  35. package/components/Graph.js +14 -14
  36. package/components/HostActions.js +21 -21
  37. package/components/HostPanel.js +6 -6
  38. package/components/HoverCards.js +74 -74
  39. package/components/IssueBoard.js +13 -10
  40. package/components/IssueBreakdown.js +31 -31
  41. package/components/IssueCode.js +19 -19
  42. package/components/IssueEvent.js +12 -12
  43. package/components/IssueFilters.js +103 -99
  44. package/components/IssueGroup.js +16 -16
  45. package/components/IssueImport.js +13 -13
  46. package/components/IssueInsights.js +20 -20
  47. package/components/IssueListBlock.js +81 -81
  48. package/components/IssueRelations.js +34 -34
  49. package/components/IssueRow.js +31 -31
  50. package/components/IssueSentry.js +4 -4
  51. package/components/IssueTemplates.js +23 -23
  52. package/components/IssueTypes.js +40 -40
  53. package/components/MarkdownTransfer.js +10 -10
  54. package/components/MentionPicker.js +19 -19
  55. package/components/NewIssueDialog.js +53 -53
  56. package/components/NewProjectDialog.js +82 -82
  57. package/components/PersonActivity.js +13 -13
  58. package/components/PersonHoverCard.js +44 -44
  59. package/components/Planning.js +16 -16
  60. package/components/Reports.js +8 -8
  61. package/components/SettingsNav.js +15 -15
  62. package/components/ShareDialog.js +8 -8
  63. package/components/SharedViewer.js +23 -23
  64. package/components/SlashMenu.js +26 -26
  65. package/components/SubPages.js +10 -10
  66. package/components/TeamForm.js +9 -9
  67. package/components/TeamRepositories.js +21 -21
  68. package/components/TeamWorkflow.js +6 -6
  69. package/components/UnlinkedMentions.js +29 -29
  70. package/components/Updates.js +8 -8
  71. package/components/Widgets.js +4 -4
  72. package/components/WorkCounts.js +12 -12
  73. package/components/cycleCrumb.js +8 -8
  74. package/components/editorPlugins.js +101 -101
  75. package/components/settings.js +6 -6
  76. package/components/video.js +7 -7
  77. package/hostedApp.js +24 -24
  78. package/index.js +18 -18
  79. package/lib/assigneeOrder.js +6 -0
  80. package/lib/assignees.js +24 -20
  81. package/lib/attachments.js +12 -12
  82. package/lib/boardMove.js +27 -27
  83. package/lib/collab.js +1 -1
  84. package/lib/docs.js +115 -115
  85. package/lib/githubLink.js +7 -7
  86. package/lib/issueList.js +51 -51
  87. package/lib/issueMenu.js +117 -117
  88. package/lib/knowledge.js +134 -134
  89. package/lib/live.js +38 -38
  90. package/lib/notifications.js +47 -47
  91. package/lib/views.js +31 -31
  92. package/package.json +24 -24
  93. package/pages/area.js +64 -64
  94. package/pages/areas.js +199 -199
  95. package/pages/decisions.js +51 -51
  96. package/pages/issues.js +120 -120
  97. package/pages/projects.js +238 -238
  98. package/pages/triage.js +109 -109
  99. package/routes/_workspace/agents/_slug2.js +127 -127
  100. package/routes/_workspace/agents/index2.js +22 -22
  101. package/routes/_workspace/dashboards/_dashboardId2.js +84 -84
  102. package/routes/_workspace/dashboards/index2.js +34 -34
  103. package/routes/_workspace/docs/_doc2.js +267 -267
  104. package/routes/_workspace/docs/space2._space.js +31 -31
  105. package/routes/_workspace/docs2.js +4 -4
  106. package/routes/_workspace/graph2.js +11 -11
  107. package/routes/_workspace/graph3.js +11 -11
  108. package/routes/_workspace/issues/_identifier2.js +477 -477
  109. package/routes/_workspace/issues/index.js +13 -13
  110. package/routes/_workspace/knowledge/_term2.js +175 -175
  111. package/routes/_workspace/knowledge/_term3.js +4 -4
  112. package/routes/_workspace/knowledge/index.js +12 -12
  113. package/routes/_workspace/knowledge/index2.js +117 -117
  114. package/routes/_workspace/measures2.js +8 -8
  115. package/routes/_workspace/measures3.js +29 -29
  116. package/routes/_workspace/notifications2.js +263 -263
  117. package/routes/_workspace/people/_username.js +10 -10
  118. package/routes/_workspace/people/_username2.js +41 -41
  119. package/routes/_workspace/projects/_projectId3.js +303 -303
  120. package/routes/_workspace/projects/_projectId4.js +4 -4
  121. package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +28 -28
  122. package/routes/_workspace/projects/_projectId_4.milestones._milestoneId.js +4 -4
  123. package/routes/_workspace/projects/index.js +8 -8
  124. package/routes/_workspace/settings/account2.js +8 -8
  125. package/routes/_workspace/settings/audit-log2.js +8 -8
  126. package/routes/_workspace/settings/audit-log3.js +155 -155
  127. package/routes/_workspace/settings/connections2.js +4 -4
  128. package/routes/_workspace/settings/fields2.js +5 -5
  129. package/routes/_workspace/settings/github2.js +11 -11
  130. package/routes/_workspace/settings/gitlab2.js +5 -5
  131. package/routes/_workspace/settings/groups2.js +52 -52
  132. package/routes/_workspace/settings/import2.js +39 -39
  133. package/routes/_workspace/settings/index2.js +5 -5
  134. package/routes/_workspace/settings/intercom2.js +11 -11
  135. package/routes/_workspace/settings/labels2.js +33 -33
  136. package/routes/_workspace/settings/members2.js +81 -81
  137. package/routes/_workspace/settings/notifications2.js +46 -46
  138. package/routes/_workspace/settings/parallelworks2.js +20 -20
  139. package/routes/_workspace/settings/roles2.js +41 -41
  140. package/routes/_workspace/settings/runners2.js +15 -15
  141. package/routes/_workspace/settings/sentry2.js +15 -15
  142. package/routes/_workspace/settings/sessions2.js +9 -9
  143. package/routes/_workspace/settings/sessions3.js +4 -4
  144. package/routes/_workspace/settings/slack2.js +12 -12
  145. package/routes/_workspace/settings/sso2.js +37 -37
  146. package/routes/_workspace/settings/sso3.js +7 -7
  147. package/routes/_workspace/settings/teams2.js +29 -29
  148. package/routes/_workspace/settings/tokens2.js +32 -32
  149. package/routes/_workspace/settings/tokens3.js +4 -4
  150. package/routes/_workspace/settings/webhooks2.js +41 -41
  151. package/routes/_workspace/settings/zendesk2.js +11 -11
  152. package/routes/_workspace/teams/_key/cycles/_number2.js +33 -33
  153. package/routes/_workspace/teams/_key/cycles/_number3.js +7 -7
  154. package/routes/_workspace/teams/_key/cycles/index2.js +37 -37
  155. package/routes/_workspace/teams/_key/issues.js +10 -10
  156. package/routes/_workspace/teams/_key/projects.js +6 -6
  157. package/routes/_workspace/teams/_key/settings2.js +396 -396
  158. package/routes/_workspace2.js +308 -308
  159. package/routes/_workspace3.js +8 -8
  160. package/routes/device2.js +4 -4
  161. package/routes/device3.js +4 -4
  162. package/routes/docs/_tag/_endpoint2.js +3 -3
  163. package/routes/docs/_tag/index2.js +3 -3
  164. package/routes/docs/route2.js +7 -7
  165. package/routes/index2.js +5 -5
  166. package/routes/login2.js +10 -10
  167. package/routes/new2.js +12 -12
  168. package/routes/new3.js +5 -5
  169. package/routes/request2._token.js +6 -6
  170. package/routes/share2._secret.js +4 -4
package/lib/docs.js CHANGED
@@ -1,9 +1,9 @@
1
- import { appURL as e, basePath as t } from "./base.js";
2
- import { api as n, unwrap as r } from "../api/client.js";
3
- import { useNavigate as i } from "./router.js";
4
- import { docTemplatesQuery as a, docsQuery as o, meQuery as s, teamsQuery as c } from "../api/queries.js";
5
- import { useFavorites as l } from "./favorites.js";
6
- import { copyItem as u, useLinkItems as d } from "./menus.js";
1
+ import { api as e, unwrap as t } from "../api/client.js";
2
+ import { docTemplatesQuery as n, docsQuery as r, meQuery as i, teamsQuery as a } from "../api/queries.js";
3
+ import { appURL as o, basePath as s } from "./base.js";
4
+ import { useFavorites as c } from "./favorites.js";
5
+ import { copyItem as l, useLinkItems as u } from "./menus.js";
6
+ import { useNavigate as d } from "./router.js";
7
7
  import { openShare as f } from "./share.js";
8
8
  import { menuDivider as p } from "@parallelworks/ui";
9
9
  import { useCallback as m } from "react";
@@ -18,7 +18,7 @@ function x(e) {
18
18
  return /^[a-z2-7]{10}$/.test(t) ? t : e.toLowerCase();
19
19
  }
20
20
  function S() {
21
- let e = h(), { data: t } = v(s);
21
+ let e = h(), { data: t } = v(i);
22
22
  return m(() => {
23
23
  let n = /* @__PURE__ */ new Date();
24
24
  return {
@@ -31,77 +31,77 @@ function S() {
31
31
  function C(e, t) {
32
32
  return `/${e}/docs/${b(t)}`;
33
33
  }
34
- function w(e) {
35
- let t = y(), o = i(), s = g("docs"), l = () => t.invalidateQueries({ queryKey: [
34
+ function w(r) {
35
+ let i = y(), o = d(), s = g("docs"), c = () => i.invalidateQueries({ queryKey: [
36
36
  "workspace",
37
- e,
37
+ r,
38
38
  "docs"
39
- ] }), u = (t) => ({ path: {
40
- workspace: e,
41
- doc: t
42
- } }), d = S(), f = _({
43
- mutationFn: async ({ team: t, parent: i, template: a }) => {
44
- let o = a ?? await C(t, i);
45
- return r(await n.POST("/api/v1/workspaces/{workspace}/docs", {
46
- params: { path: { workspace: e } },
39
+ ] }), l = (e) => ({ path: {
40
+ workspace: r,
41
+ doc: e
42
+ } }), u = S(), f = _({
43
+ mutationFn: async ({ team: n, parent: i, template: a }) => {
44
+ let o = a ?? await C(n, i);
45
+ return t(await e.POST("/api/v1/workspaces/{workspace}/docs", {
46
+ params: { path: { workspace: r } },
47
47
  body: {
48
48
  ...o ? {
49
49
  template: o,
50
- variables: d()
50
+ variables: u()
51
51
  } : { title: s("untitled") },
52
- ...t && { team: t },
52
+ ...n && { team: n },
53
53
  ...i && { parent: i.key }
54
54
  }
55
55
  }));
56
56
  },
57
- onSuccess: (t) => {
58
- l(), o({
57
+ onSuccess: (e) => {
58
+ c(), o({
59
59
  to: "/$workspace/docs/$doc",
60
60
  params: {
61
- workspace: e,
62
- doc: b(t)
61
+ workspace: r,
62
+ doc: b(e)
63
63
  },
64
64
  search: { rename: !0 }
65
65
  });
66
66
  }
67
67
  }), p = _({
68
- mutationFn: async ({ doc: e, title: t }) => r(await n.PATCH("/api/v1/workspaces/{workspace}/docs/{doc}", {
69
- params: u(e.key),
70
- body: { title: t }
68
+ mutationFn: async ({ doc: n, title: r }) => t(await e.PATCH("/api/v1/workspaces/{workspace}/docs/{doc}", {
69
+ params: l(n.key),
70
+ body: { title: r }
71
71
  })),
72
- onSettled: l
72
+ onSettled: c
73
73
  }), m = _({
74
- mutationFn: async ({ doc: e, area: t }) => r(await n.PATCH("/api/v1/workspaces/{workspace}/docs/{doc}", {
75
- params: u(e.key),
76
- body: { area: t }
74
+ mutationFn: async ({ doc: n, area: r }) => t(await e.PATCH("/api/v1/workspaces/{workspace}/docs/{doc}", {
75
+ params: l(n.key),
76
+ body: { area: r }
77
77
  })),
78
- onSettled: l
78
+ onSettled: c
79
79
  }), h = _({
80
- mutationFn: async ({ doc: e, space: t, parent: i, after: a, before: o }) => r(await n.POST("/api/v1/workspaces/{workspace}/docs/{doc}/move", {
81
- params: u(e.key),
80
+ mutationFn: async ({ doc: n, space: r, parent: i, after: a, before: o }) => t(await e.POST("/api/v1/workspaces/{workspace}/docs/{doc}/move", {
81
+ params: l(n.key),
82
82
  body: {
83
- ...t && { space: t },
83
+ ...r && { space: r },
84
84
  ...i && { parent: i.key },
85
85
  ...a && { after: a.key },
86
86
  ...o && { before: o.key }
87
87
  }
88
88
  })),
89
- onSettled: l
89
+ onSettled: c
90
90
  }), v = _({
91
- mutationFn: async (e) => r(await n.POST("/api/v1/workspaces/{workspace}/docs/{doc}/archive", { params: u(e.key) })),
92
- onSettled: l
91
+ mutationFn: async (n) => t(await e.POST("/api/v1/workspaces/{workspace}/docs/{doc}/archive", { params: l(n.key) })),
92
+ onSettled: c
93
93
  }), x = _({
94
- mutationFn: async (e) => r(await n.POST("/api/v1/workspaces/{workspace}/docs/{doc}/restore", { params: u(e.key) })),
95
- onSettled: l
96
- }), C = async (n, r) => {
97
- let [i, o] = await Promise.all([t.fetchQuery(a(e)), t.fetchQuery(c(e))]), s = r ? r.teamId ?? "" : o.find((e) => e.key === n)?.id ?? "";
98
- return i.find((e) => e.spaceDefault && (e.teamId ?? "") === s)?.id;
94
+ mutationFn: async (n) => t(await e.POST("/api/v1/workspaces/{workspace}/docs/{doc}/restore", { params: l(n.key) })),
95
+ onSettled: c
96
+ }), C = async (e, t) => {
97
+ let [o, s] = await Promise.all([i.fetchQuery(n(r)), i.fetchQuery(a(r))]), c = t ? t.teamId ?? "" : s.find((t) => t.key === e)?.id ?? "";
98
+ return o.find((e) => e.spaceDefault && (e.teamId ?? "") === c)?.id;
99
99
  }, w = _({
100
- mutationFn: async ({ doc: e, spaceDefault: t }) => r(await n.PATCH("/api/v1/workspaces/{workspace}/docs/{doc}", {
101
- params: u(e.key),
102
- body: { spaceDefault: t }
100
+ mutationFn: async ({ doc: n, spaceDefault: r }) => t(await e.PATCH("/api/v1/workspaces/{workspace}/docs/{doc}", {
101
+ params: l(n.key),
102
+ body: { spaceDefault: r }
103
103
  })),
104
- onSettled: l
104
+ onSettled: c
105
105
  });
106
106
  return {
107
107
  create: f,
@@ -111,34 +111,34 @@ function w(e) {
111
111
  archive: v,
112
112
  restore: x,
113
113
  setTemplate: _({
114
- mutationFn: async ({ doc: e, template: t }) => r(await n.PATCH("/api/v1/workspaces/{workspace}/docs/{doc}", {
115
- params: u(e.key),
116
- body: { template: t }
114
+ mutationFn: async ({ doc: n, template: r }) => t(await e.PATCH("/api/v1/workspaces/{workspace}/docs/{doc}", {
115
+ params: l(n.key),
116
+ body: { template: r }
117
117
  })),
118
- onSettled: l
118
+ onSettled: c
119
119
  }),
120
120
  setSpaceDefault: w,
121
121
  setLook: _({
122
- mutationFn: async ({ doc: e, ...t }) => r(await n.PATCH("/api/v1/workspaces/{workspace}/docs/{doc}", {
123
- params: u(e.key),
124
- body: t
122
+ mutationFn: async ({ doc: n, ...r }) => t(await e.PATCH("/api/v1/workspaces/{workspace}/docs/{doc}", {
123
+ params: l(n.key),
124
+ body: r
125
125
  })),
126
- onMutate: ({ doc: n, ...r }) => {
127
- t.setQueriesData({ queryKey: [
126
+ onMutate: ({ doc: e, ...t }) => {
127
+ i.setQueriesData({ queryKey: [
128
128
  "workspace",
129
- e,
129
+ r,
130
130
  "docs"
131
- ] }, (e) => e && typeof e == "object" && "id" in e && e.id === n.id ? {
132
- ...e,
133
- ...r
134
- } : e);
131
+ ] }, (n) => n && typeof n == "object" && "id" in n && n.id === e.id ? {
132
+ ...n,
133
+ ...t
134
+ } : n);
135
135
  },
136
- onSettled: l
136
+ onSettled: c
137
137
  }),
138
138
  duplicate: _({
139
- mutationFn: async ({ doc: t, team: i }) => {
140
- let a = r(await n.GET("/api/v1/workspaces/{workspace}/docs/{doc}", { params: u(t.key) })), o = a.ancestors?.at(-1)?.key, c = r(await n.POST("/api/v1/workspaces/{workspace}/docs", {
141
- params: { path: { workspace: e } },
139
+ mutationFn: async ({ doc: n, team: i }) => {
140
+ let a = t(await e.GET("/api/v1/workspaces/{workspace}/docs/{doc}", { params: l(n.key) })), o = a.ancestors?.at(-1)?.key, c = t(await e.POST("/api/v1/workspaces/{workspace}/docs", {
141
+ params: { path: { workspace: r } },
142
142
  body: {
143
143
  title: s("copyOf", { title: a.title }),
144
144
  body: a.body ?? "",
@@ -146,17 +146,17 @@ function w(e) {
146
146
  ...o && { parent: o }
147
147
  }
148
148
  }));
149
- return a.icon ? r(await n.PATCH("/api/v1/workspaces/{workspace}/docs/{doc}", {
150
- params: u(c.key),
149
+ return a.icon ? t(await e.PATCH("/api/v1/workspaces/{workspace}/docs/{doc}", {
150
+ params: l(c.key),
151
151
  body: { icon: a.icon }
152
152
  })) : c;
153
153
  },
154
- onSuccess: (t) => {
155
- l(), o({
154
+ onSuccess: (e) => {
155
+ c(), o({
156
156
  to: "/$workspace/docs/$doc",
157
157
  params: {
158
- workspace: e,
159
- doc: b(t)
158
+ workspace: r,
159
+ doc: b(e)
160
160
  },
161
161
  search: { rename: !0 }
162
162
  });
@@ -165,28 +165,28 @@ function w(e) {
165
165
  };
166
166
  }
167
167
  function T(e) {
168
- let t = i(), n = g("docs"), r = g("common"), a = g("favorites"), s = d(), h = l(e), _ = w(e), { data: y = [] } = v(c(e)), { data: x = [] } = v(o(e, { top: !0 }));
169
- return m((i, { onRename: o } = {}) => {
170
- let c = y.find((e) => e.id === i.teamId), l = c?.key ?? "workspace", d = {
171
- label: r("open"),
168
+ let t = d(), n = g("docs"), i = g("common"), o = g("favorites"), s = u(), h = c(e), _ = w(e), { data: y = [] } = v(a(e)), { data: x = [] } = v(r(e, { top: !0 }));
169
+ return m((r, { onRename: a } = {}) => {
170
+ let c = y.find((e) => e.id === r.teamId), u = c?.key ?? "workspace", d = {
171
+ label: i("open"),
172
172
  onClick: () => t({
173
173
  to: "/$workspace/docs/$doc",
174
174
  params: {
175
175
  workspace: e,
176
- doc: b(i)
176
+ doc: b(r)
177
177
  }
178
178
  })
179
- }, m = [...s(C(e, i)), u(n("copyKey"), i.key)];
180
- if (i.archivedAt) return [
179
+ }, m = [...s(C(e, r)), l(n("copyKey"), r.key)];
180
+ if (r.archivedAt) return [
181
181
  d,
182
182
  {
183
183
  label: n("restore"),
184
- onClick: () => _.restore.mutate(i)
184
+ onClick: () => _.restore.mutate(r)
185
185
  },
186
186
  p,
187
187
  ...m
188
188
  ];
189
- let g = x.filter((e) => e.id !== i.id), v = [{
189
+ let g = x.filter((e) => e.id !== r.id), v = [{
190
190
  key: "workspace",
191
191
  name: n("workspaceSpace")
192
192
  }, ...y.filter((e) => !e.archivedAt).map((e) => ({
@@ -197,30 +197,30 @@ function T(e) {
197
197
  d,
198
198
  {
199
199
  label: n("newInside"),
200
- onClick: () => _.create.mutate({ parent: i })
200
+ onClick: () => _.create.mutate({ parent: r })
201
201
  },
202
202
  {
203
203
  label: n("duplicate"),
204
204
  onClick: () => _.duplicate.mutate({
205
- doc: i,
205
+ doc: r,
206
206
  team: c?.key
207
207
  })
208
208
  },
209
- ...o ? [{
209
+ ...a ? [{
210
210
  label: n("rename"),
211
- onClick: o
211
+ onClick: a
212
212
  }] : [],
213
213
  {
214
214
  label: n("moveTo"),
215
215
  items: [
216
216
  ...v.map((e) => {
217
- let t = !i.parentId && e.key === l;
217
+ let t = !r.parentId && e.key === u;
218
218
  return {
219
219
  label: n("topOf", { space: e.name }),
220
220
  checked: t,
221
221
  disabled: t,
222
222
  onClick: () => _.move.mutate({
223
- doc: i,
223
+ doc: r,
224
224
  space: e.key
225
225
  })
226
226
  };
@@ -228,10 +228,10 @@ function T(e) {
228
228
  ...g.length > 0 ? [p] : [],
229
229
  ...g.map((e) => ({
230
230
  label: e.title,
231
- checked: e.id === i.parentId,
232
- disabled: e.id === i.parentId,
231
+ checked: e.id === r.parentId,
232
+ disabled: e.id === r.parentId,
233
233
  onClick: () => _.move.mutate({
234
- doc: i,
234
+ doc: r,
235
235
  parent: e
236
236
  })
237
237
  }))
@@ -240,40 +240,40 @@ function T(e) {
240
240
  {
241
241
  label: n("share"),
242
242
  onClick: () => f({
243
- doc: i.key,
244
- title: i.title
243
+ doc: r.key,
244
+ title: r.title
245
245
  })
246
246
  },
247
247
  {
248
- label: h.find("doc", i.id) ? a("remove") : a("add"),
249
- onClick: () => h.toggle("doc", i.id)
248
+ label: h.find("doc", r.id) ? o("remove") : o("add"),
249
+ onClick: () => h.toggle("doc", r.id)
250
250
  },
251
251
  {
252
252
  label: n("look.fullWidth"),
253
- checked: !!i.fullWidth,
253
+ checked: !!r.fullWidth,
254
254
  onClick: () => _.setLook.mutate({
255
- doc: i,
256
- fullWidth: !i.fullWidth
255
+ doc: r,
256
+ fullWidth: !r.fullWidth
257
257
  })
258
258
  },
259
259
  {
260
- label: i.template ? n("stopTemplate") : n("useAsTemplate"),
260
+ label: r.template ? n("stopTemplate") : n("useAsTemplate"),
261
261
  onClick: () => _.setTemplate.mutate({
262
- doc: i,
263
- template: !i.template
262
+ doc: r,
263
+ template: !r.template
264
264
  })
265
265
  },
266
- ...i.template ? [{
266
+ ...r.template ? [{
267
267
  label: n("spaceDefault"),
268
- checked: !!i.spaceDefault,
268
+ checked: !!r.spaceDefault,
269
269
  onClick: () => _.setSpaceDefault.mutate({
270
- doc: i,
271
- spaceDefault: !i.spaceDefault
270
+ doc: r,
271
+ spaceDefault: !r.spaceDefault
272
272
  })
273
273
  }] : [],
274
274
  {
275
275
  label: n("exportMarkdown"),
276
- onClick: () => D(e, { doc: i.key })
276
+ onClick: () => D(e, { doc: r.key })
277
277
  },
278
278
  p,
279
279
  ...m,
@@ -281,7 +281,7 @@ function T(e) {
281
281
  {
282
282
  label: n("archive"),
283
283
  destructive: !0,
284
- onClick: () => _.archive.mutate(i)
284
+ onClick: () => _.archive.mutate(r)
285
285
  }
286
286
  ];
287
287
  }, [
@@ -293,18 +293,18 @@ function T(e) {
293
293
  h,
294
294
  _,
295
295
  n,
296
- r,
297
- a
296
+ i,
297
+ o
298
298
  ]);
299
299
  }
300
- function E(t, n) {
301
- return e(C(t, n));
300
+ function E(e, t) {
301
+ return o(C(e, t));
302
302
  }
303
- function D(e, n) {
304
- let r = new URLSearchParams({
305
- ...n,
306
- ...n.space && { knowledge: "true" }
307
- }), i = document.createElement("a");
308
- i.href = `${t}/api/v1/workspaces/${encodeURIComponent(e)}/docs/export?${r}`, i.download = "", i.click();
303
+ function D(e, t) {
304
+ let n = new URLSearchParams({
305
+ ...t,
306
+ ...t.space && { knowledge: "true" }
307
+ }), r = document.createElement("a");
308
+ r.href = `${s}/api/v1/workspaces/${encodeURIComponent(e)}/docs/export?${n}`, r.download = "", r.click();
309
309
  }
310
310
  export { x as docKey, C as docPath, b as docRef, E as docURL, D as downloadMarkdown, w as useDocActions, T as useDocMenu, S as useTemplateValues };
package/lib/githubLink.js CHANGED
@@ -1,13 +1,13 @@
1
- import { basePath as e } from "./base.js";
2
- import { api as t } from "../api/client.js";
1
+ import { api as e } from "../api/client.js";
2
+ import { basePath as t } from "./base.js";
3
3
  // src/lib/githubLink.ts
4
4
  var n;
5
5
  function r() {
6
- return n ??= t.GET("/api/v1/me/github").then(({ data: t }) => {
7
- if (!t?.enabled || !t.keepsTokens || t.actsAsYou) return null;
8
- if (t.linkedByHost) return t.linkURL ?? null;
9
- let n = window.location.pathname.slice(e.length).split("/")[1];
10
- return n ? `${e}/${n}/settings/connections` : null;
6
+ return n ??= e.GET("/api/v1/me/github").then(({ data: e }) => {
7
+ if (!e?.enabled || !e.keepsTokens || e.actsAsYou) return null;
8
+ if (e.linkedByHost) return e.linkURL ?? null;
9
+ let n = window.location.pathname.slice(t.length).split("/")[1];
10
+ return n ? `${t}/${n}/settings/connections` : null;
11
11
  }).catch(() => null), n;
12
12
  }
13
13
  export { r as githubLinkPage };
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 },