@parallelworks/tandem-web 0.150.2 → 0.151.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_virtual/_virtual_i18n/en/common.js +32 -3
- package/_virtual/_virtual_i18n/es/common.js +32 -3
- package/_virtual/_virtual_i18n/ja/common.js +32 -3
- package/_virtual/_virtual_i18n/ko/common.js +32 -3
- package/_virtual/_virtual_i18n/zh/common.js +32 -3
- package/api/queries.js +88 -77
- package/components/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +4 -4
- package/components/AgentWork.js +111 -111
- package/components/AreaLink.js +32 -0
- package/components/AreaTiles.js +10 -13
- package/components/AreaWork.js +25 -1
- package/components/BugRotation.js +3 -3
- package/components/CodeHostSettings.js +30 -30
- package/components/CommandPalette.js +53 -53
- package/components/CustomFields.js +116 -116
- package/components/DateChip.js +11 -11
- package/components/DocButton.js +6 -6
- package/components/DocHistory.js +4 -4
- package/components/DocLinkPicker.js +8 -8
- package/components/DocProperties.js +15 -15
- package/components/DocTable.js +15 -15
- package/components/DocsTree.js +80 -80
- package/components/Editor.js +35 -35
- package/components/FavoritesNav.js +53 -53
- package/components/GitHub.js +18 -18
- package/components/Graph.js +15 -15
- package/components/HostActions.js +21 -21
- package/components/HostPanel.js +6 -6
- package/components/HoverCards.js +38 -38
- package/components/IssueBoard.js +4 -4
- package/components/IssueCode.js +14 -14
- package/components/IssueEvent.js +3 -3
- package/components/IssueFilters.js +71 -71
- package/components/IssueListBlock.js +32 -32
- package/components/IssueRow.js +21 -21
- package/components/IssueTemplates.js +118 -118
- package/components/IssueTypes.js +40 -40
- package/components/NewIssueDialog.js +76 -76
- package/components/NewProjectDialog.js +145 -145
- package/components/PersonActivity.js +4 -4
- package/components/SharedViewer.js +5 -5
- package/components/SlashMenu.js +29 -29
- package/components/TeamRepositories.js +51 -51
- package/components/TeamWorkflow.js +6 -6
- package/components/UnlinkedMentions.js +20 -20
- package/components/Updates.js +3 -3
- package/components/Widgets.js +20 -20
- package/components/columns.js +17 -17
- package/components/editorPlugins.js +80 -80
- package/components/mathDiagrams.js +17 -17
- package/lib/boardMove.js +5 -5
- package/lib/issueList.js +58 -58
- package/lib/issueMenu.js +27 -27
- package/lib/knowledge.js +106 -106
- package/lib/views.js +9 -9
- package/package.json +2 -2
- package/pages/area.js +291 -0
- package/pages/areas.js +258 -287
- package/pages/decisions.js +21 -21
- package/pages/issues.js +52 -52
- package/pages/projects.js +125 -125
- package/pages/triage.js +12 -12
- package/routeTree.gen.js +186 -180
- package/routes/_workspace/agents/_slug2.js +11 -11
- package/routes/_workspace/agents/index2.js +10 -10
- package/routes/_workspace/areas/_area.js +7 -8
- package/routes/_workspace/areas/_area2.js +3 -290
- package/routes/_workspace/areas/_area3.js +7 -8
- package/routes/_workspace/docs/_doc2.js +230 -230
- package/routes/_workspace/docs/space2._space.js +27 -27
- package/routes/_workspace/issues/_identifier2.js +222 -224
- package/routes/_workspace/knowledge/_term2.js +43 -43
- package/routes/_workspace/knowledge/index.js +6 -6
- package/routes/_workspace/knowledge/index2.js +15 -15
- package/routes/_workspace/measures3.js +70 -72
- package/routes/_workspace/notifications2.js +150 -150
- package/routes/_workspace/people/_username2.js +10 -10
- package/routes/_workspace/projects/_projectId3.js +276 -276
- package/routes/_workspace/settings/audit-log3.js +136 -138
- package/routes/_workspace/settings/fields2.js +11 -11
- package/routes/_workspace/settings/github2.js +6 -6
- package/routes/_workspace/settings/groups2.js +26 -26
- package/routes/_workspace/settings/import2.js +398 -147
- package/routes/_workspace/settings/import3.js +7 -3
- package/routes/_workspace/settings/index2.js +6 -6
- package/routes/_workspace/settings/labels2.js +21 -21
- package/routes/_workspace/settings/members2.js +27 -27
- package/routes/_workspace/settings/notifications2.js +8 -8
- package/routes/_workspace/settings/parallelworks2.js +32 -32
- package/routes/_workspace/settings/roles2.js +24 -24
- package/routes/_workspace/settings/runners2.js +15 -15
- package/routes/_workspace/settings/sessions2.js +17 -17
- package/routes/_workspace/settings/slack2.js +7 -7
- package/routes/_workspace/settings/sso2.js +31 -31
- package/routes/_workspace/settings/teams2.js +25 -25
- package/routes/_workspace/settings/tokens2.js +12 -12
- package/routes/_workspace/settings/webhooks2.js +13 -13
- package/routes/_workspace/teams/_key/areas/_area.js +8 -0
- package/routes/_workspace/teams/_key/areas/_area2.js +4 -0
- package/routes/_workspace/teams/_key/areas/_area3.js +9 -0
- package/routes/_workspace/teams/_key/areas/index.js +6 -0
- package/routes/_workspace/teams/_key/areas/index2.js +4 -0
- package/routes/_workspace/teams/_key/{areas3.js → areas/index3.js} +2 -2
- package/routes/_workspace/teams/_key/cycles/_number2.js +27 -27
- package/routes/_workspace/teams/_key/cycles/index2.js +24 -24
- package/routes/_workspace/teams/_key/settings2.js +29 -29
- package/routes/_workspace2.js +368 -368
- package/routes/_workspace/teams/_key/areas.js +0 -6
- package/routes/_workspace/teams/_key/areas2.js +0 -4
|
@@ -2,13 +2,13 @@ import { api as e, unwrap as t } from "../api/client.js";
|
|
|
2
2
|
import { useNavigate as n } from "../lib/router.js";
|
|
3
3
|
import { projectsQuery as r, teamsQuery as ee, workspaceQuery as te } from "../api/queries.js";
|
|
4
4
|
import { AddIcon as ne, CalendarIcon as re, ChevronRightIcon as ie, CloseIcon as i, PriorityIcon as a, ProjectIcon as ae, UserIcon as o, UsersIcon as s, usePriorityNames as oe } from "./icons.js";
|
|
5
|
-
import {
|
|
5
|
+
import { usePeople as se } from "../lib/people.js";
|
|
6
6
|
import { useTime as ce } from "../lib/time.js";
|
|
7
7
|
import { ProjectStatusIcon as c } from "./Planning.js";
|
|
8
|
-
import {
|
|
8
|
+
import { projectRef as le } from "../lib/projects.js";
|
|
9
9
|
import { EntityIcon as l } from "./EntityIcon.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
10
|
+
import { Editor as ue } from "./Editor.js";
|
|
11
|
+
import { projectStatuses as de } from "../lib/projectStates.js";
|
|
12
12
|
import { IconUpload as fe } from "./IconUpload.js";
|
|
13
13
|
import { Avatar as u, Button as d, Card as pe, Combobox as f, DatePicker as me, ErrorText as he, IconButton as p, Modal as ge, ModalTitle as _e, Select as m, buttonClasses as h } from "@parallelworks/ui";
|
|
14
14
|
import { useState as g } from "react";
|
|
@@ -19,7 +19,7 @@ import { useQuery as x, useQueryClient as ye } from "@tanstack/react-query";
|
|
|
19
19
|
// src/components/NewProjectDialog.tsx
|
|
20
20
|
var S = h({ size: "sm" });
|
|
21
21
|
function C({ workspace: h, teamId: C, onClose: w }) {
|
|
22
|
-
let T = _("planning"), E = _("common"), be = ve(), xe = ce(), D = oe(), Se = ye(), O = n(), { members: k, person: Ce } =
|
|
22
|
+
let T = _("planning"), E = _("common"), be = ve(), xe = ce(), D = oe(), Se = ye(), O = n(), { members: k, person: Ce } = se(h), { data: A } = x(te(h)), { data: we = [] } = x(ee(h)), { data: Te = [] } = x(r(h)), j = Te.filter((e) => e.template), [M, Ee] = g(""), [N, De] = g(""), [P, Oe] = g(""), [F, ke] = g(""), [I, Ae] = g(""), [L, je] = g("planned"), [R, Me] = g(0), [z, Ne] = g(""), [B, Pe] = g([]), [V, Fe] = g(C ? [C] : []), [H, Ie] = g(""), [U, Le] = g(""), [W, G] = g([]), [K, q] = g(null), [J, Y] = g(!1), [Re, X] = g(null), Z = we.filter((e) => !e.archivedAt), Q = (e, t, n) => /* @__PURE__ */ y(me, {
|
|
23
23
|
value: t,
|
|
24
24
|
onValueChange: n,
|
|
25
25
|
"aria-label": e,
|
|
@@ -66,7 +66,7 @@ function C({ workspace: h, teamId: C, onClose: w }) {
|
|
|
66
66
|
to: "/$workspace/projects/$projectId",
|
|
67
67
|
params: {
|
|
68
68
|
workspace: h,
|
|
69
|
-
projectId:
|
|
69
|
+
projectId: le(n)
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
} catch (e) {
|
|
@@ -138,146 +138,9 @@ function C({ workspace: h, teamId: C, onClose: w }) {
|
|
|
138
138
|
placeholder: T("summaryPlaceholder"),
|
|
139
139
|
className: "mt-1 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"
|
|
140
140
|
}),
|
|
141
|
-
/* @__PURE__ */ b("div", {
|
|
142
|
-
className: "mt-4 flex flex-wrap items-center gap-1.5 border-b border-border pb-4",
|
|
143
|
-
children: [
|
|
144
|
-
j.length > 0 && /* @__PURE__ */ y(m, {
|
|
145
|
-
"aria-label": T("startFrom"),
|
|
146
|
-
value: M,
|
|
147
|
-
onValueChange: (e) => Ee(e ?? ""),
|
|
148
|
-
items: [{
|
|
149
|
-
value: "",
|
|
150
|
-
label: T("blankProject")
|
|
151
|
-
}, ...j.map((e) => ({
|
|
152
|
-
value: e.id,
|
|
153
|
-
label: e.name
|
|
154
|
-
}))],
|
|
155
|
-
trigger: /* @__PURE__ */ b("button", {
|
|
156
|
-
type: "button",
|
|
157
|
-
className: S,
|
|
158
|
-
children: [/* @__PURE__ */ y(ae, { className: "size-3.5 text-muted-foreground" }), M ? T("fromTemplate", { name: j.find((e) => e.id === M)?.name ?? "" }) : T("blankProject")]
|
|
159
|
-
})
|
|
160
|
-
}),
|
|
161
|
-
/* @__PURE__ */ y(m, {
|
|
162
|
-
"aria-label": T("statusLabel"),
|
|
163
|
-
value: L,
|
|
164
|
-
onValueChange: (e) => e && je(e),
|
|
165
|
-
items: se.map((e) => ({
|
|
166
|
-
value: e,
|
|
167
|
-
label: T(`status.${e}`),
|
|
168
|
-
icon: /* @__PURE__ */ y(c, { status: e })
|
|
169
|
-
})),
|
|
170
|
-
trigger: /* @__PURE__ */ b("button", {
|
|
171
|
-
type: "button",
|
|
172
|
-
className: S,
|
|
173
|
-
children: [/* @__PURE__ */ y(c, { status: L }), T(`status.${L}`)]
|
|
174
|
-
})
|
|
175
|
-
}),
|
|
176
|
-
/* @__PURE__ */ y(m, {
|
|
177
|
-
"aria-label": T("priority"),
|
|
178
|
-
value: String(R),
|
|
179
|
-
onValueChange: (e) => e && Me(Number(e)),
|
|
180
|
-
items: D.map((e, t) => ({
|
|
181
|
-
value: String(t),
|
|
182
|
-
label: e,
|
|
183
|
-
icon: /* @__PURE__ */ y(a, { priority: t })
|
|
184
|
-
})),
|
|
185
|
-
trigger: /* @__PURE__ */ b("button", {
|
|
186
|
-
type: "button",
|
|
187
|
-
className: S,
|
|
188
|
-
children: [/* @__PURE__ */ y(a, { priority: R }), R ? D[R] : T("noPriority")]
|
|
189
|
-
})
|
|
190
|
-
}),
|
|
191
|
-
/* @__PURE__ */ y(f, {
|
|
192
|
-
"aria-label": T("lead"),
|
|
193
|
-
value: z,
|
|
194
|
-
onValueChange: (e) => Ne(e ?? ""),
|
|
195
|
-
items: [{
|
|
196
|
-
value: "",
|
|
197
|
-
label: T("noLead")
|
|
198
|
-
}, ...k.map((e) => ({
|
|
199
|
-
value: e.user.username,
|
|
200
|
-
label: e.user.name,
|
|
201
|
-
icon: /* @__PURE__ */ y(u, {
|
|
202
|
-
name: e.user.name,
|
|
203
|
-
src: e.user.avatarUrl,
|
|
204
|
-
size: "xs",
|
|
205
|
-
decorative: !0
|
|
206
|
-
})
|
|
207
|
-
}))],
|
|
208
|
-
trigger: /* @__PURE__ */ y("button", {
|
|
209
|
-
type: "button",
|
|
210
|
-
className: S,
|
|
211
|
-
children: $ ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(u, {
|
|
212
|
-
name: $.name,
|
|
213
|
-
src: $.avatarUrl,
|
|
214
|
-
size: "xs",
|
|
215
|
-
decorative: !0
|
|
216
|
-
}), $.name] }) : /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(o, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ y("span", {
|
|
217
|
-
className: "text-muted-foreground",
|
|
218
|
-
children: T("lead")
|
|
219
|
-
})] })
|
|
220
|
-
})
|
|
221
|
-
}),
|
|
222
|
-
/* @__PURE__ */ y(f, {
|
|
223
|
-
open: K === "members",
|
|
224
|
-
onOpenChange: (e) => q(e ? "members" : null),
|
|
225
|
-
multiple: !0,
|
|
226
|
-
items: k.map((e) => ({
|
|
227
|
-
value: e.user.username,
|
|
228
|
-
label: e.user.name,
|
|
229
|
-
icon: /* @__PURE__ */ y(u, {
|
|
230
|
-
name: e.user.name,
|
|
231
|
-
src: e.user.avatarUrl,
|
|
232
|
-
size: "xs",
|
|
233
|
-
decorative: !0
|
|
234
|
-
})
|
|
235
|
-
})),
|
|
236
|
-
value: B,
|
|
237
|
-
onValueChange: Pe,
|
|
238
|
-
placeholder: T("members"),
|
|
239
|
-
trigger: /* @__PURE__ */ b("button", {
|
|
240
|
-
type: "button",
|
|
241
|
-
className: S,
|
|
242
|
-
children: [/* @__PURE__ */ y(s, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ y("span", {
|
|
243
|
-
className: B.length ? "" : "text-muted-foreground",
|
|
244
|
-
children: B.length ? T("memberCount", { count: B.length }) : T("members")
|
|
245
|
-
})]
|
|
246
|
-
})
|
|
247
|
-
}),
|
|
248
|
-
Q(T("startDate"), H, Ie),
|
|
249
|
-
Q(T("targetDate"), U, Le),
|
|
250
|
-
/* @__PURE__ */ y(f, {
|
|
251
|
-
open: K === "teams",
|
|
252
|
-
onOpenChange: (e) => q(e ? "teams" : null),
|
|
253
|
-
multiple: !0,
|
|
254
|
-
items: Z.map((e) => ({
|
|
255
|
-
value: e.id,
|
|
256
|
-
label: e.name,
|
|
257
|
-
hint: e.key,
|
|
258
|
-
icon: /* @__PURE__ */ y(l, {
|
|
259
|
-
icon: e.icon,
|
|
260
|
-
color: e.color,
|
|
261
|
-
name: e.name
|
|
262
|
-
})
|
|
263
|
-
})),
|
|
264
|
-
value: V,
|
|
265
|
-
onValueChange: Fe,
|
|
266
|
-
placeholder: T("teams"),
|
|
267
|
-
trigger: /* @__PURE__ */ b("button", {
|
|
268
|
-
type: "button",
|
|
269
|
-
className: S,
|
|
270
|
-
children: [/* @__PURE__ */ y(s, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ y("span", {
|
|
271
|
-
className: V.length ? "" : "text-muted-foreground",
|
|
272
|
-
children: V.length ? Z.filter((e) => V.includes(e.id)).map((e) => e.key).join(", ") : T("teams")
|
|
273
|
-
})]
|
|
274
|
-
})
|
|
275
|
-
})
|
|
276
|
-
]
|
|
277
|
-
}),
|
|
278
141
|
/* @__PURE__ */ y("div", {
|
|
279
142
|
className: "mt-4",
|
|
280
|
-
children: /* @__PURE__ */ y(
|
|
143
|
+
children: /* @__PURE__ */ y(ue, {
|
|
281
144
|
value: "",
|
|
282
145
|
onChange: Ae,
|
|
283
146
|
placeholder: T("projectBrief"),
|
|
@@ -337,7 +200,144 @@ function C({ workspace: h, teamId: C, onClose: w }) {
|
|
|
337
200
|
]
|
|
338
201
|
}),
|
|
339
202
|
/* @__PURE__ */ b("div", {
|
|
340
|
-
className: "flex items-center gap-
|
|
203
|
+
className: "flex flex-wrap items-center gap-1.5 border-t border-border px-5 pt-3",
|
|
204
|
+
children: [
|
|
205
|
+
j.length > 0 && /* @__PURE__ */ y(m, {
|
|
206
|
+
"aria-label": T("startFrom"),
|
|
207
|
+
value: M,
|
|
208
|
+
onValueChange: (e) => Ee(e ?? ""),
|
|
209
|
+
items: [{
|
|
210
|
+
value: "",
|
|
211
|
+
label: T("blankProject")
|
|
212
|
+
}, ...j.map((e) => ({
|
|
213
|
+
value: e.id,
|
|
214
|
+
label: e.name
|
|
215
|
+
}))],
|
|
216
|
+
trigger: /* @__PURE__ */ b("button", {
|
|
217
|
+
type: "button",
|
|
218
|
+
className: S,
|
|
219
|
+
children: [/* @__PURE__ */ y(ae, { className: "size-3.5 text-muted-foreground" }), M ? T("fromTemplate", { name: j.find((e) => e.id === M)?.name ?? "" }) : T("blankProject")]
|
|
220
|
+
})
|
|
221
|
+
}),
|
|
222
|
+
/* @__PURE__ */ y(m, {
|
|
223
|
+
"aria-label": T("statusLabel"),
|
|
224
|
+
value: L,
|
|
225
|
+
onValueChange: (e) => e && je(e),
|
|
226
|
+
items: de.map((e) => ({
|
|
227
|
+
value: e,
|
|
228
|
+
label: T(`status.${e}`),
|
|
229
|
+
icon: /* @__PURE__ */ y(c, { status: e })
|
|
230
|
+
})),
|
|
231
|
+
trigger: /* @__PURE__ */ b("button", {
|
|
232
|
+
type: "button",
|
|
233
|
+
className: S,
|
|
234
|
+
children: [/* @__PURE__ */ y(c, { status: L }), T(`status.${L}`)]
|
|
235
|
+
})
|
|
236
|
+
}),
|
|
237
|
+
/* @__PURE__ */ y(m, {
|
|
238
|
+
"aria-label": T("priority"),
|
|
239
|
+
value: String(R),
|
|
240
|
+
onValueChange: (e) => e && Me(Number(e)),
|
|
241
|
+
items: D.map((e, t) => ({
|
|
242
|
+
value: String(t),
|
|
243
|
+
label: e,
|
|
244
|
+
icon: /* @__PURE__ */ y(a, { priority: t })
|
|
245
|
+
})),
|
|
246
|
+
trigger: /* @__PURE__ */ b("button", {
|
|
247
|
+
type: "button",
|
|
248
|
+
className: S,
|
|
249
|
+
children: [/* @__PURE__ */ y(a, { priority: R }), R ? D[R] : T("noPriority")]
|
|
250
|
+
})
|
|
251
|
+
}),
|
|
252
|
+
/* @__PURE__ */ y(f, {
|
|
253
|
+
"aria-label": T("lead"),
|
|
254
|
+
value: z,
|
|
255
|
+
onValueChange: (e) => Ne(e ?? ""),
|
|
256
|
+
items: [{
|
|
257
|
+
value: "",
|
|
258
|
+
label: T("noLead")
|
|
259
|
+
}, ...k.map((e) => ({
|
|
260
|
+
value: e.user.username,
|
|
261
|
+
label: e.user.name,
|
|
262
|
+
icon: /* @__PURE__ */ y(u, {
|
|
263
|
+
name: e.user.name,
|
|
264
|
+
src: e.user.avatarUrl,
|
|
265
|
+
size: "xs",
|
|
266
|
+
decorative: !0
|
|
267
|
+
})
|
|
268
|
+
}))],
|
|
269
|
+
trigger: /* @__PURE__ */ y("button", {
|
|
270
|
+
type: "button",
|
|
271
|
+
className: S,
|
|
272
|
+
children: $ ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(u, {
|
|
273
|
+
name: $.name,
|
|
274
|
+
src: $.avatarUrl,
|
|
275
|
+
size: "xs",
|
|
276
|
+
decorative: !0
|
|
277
|
+
}), $.name] }) : /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(o, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ y("span", {
|
|
278
|
+
className: "text-muted-foreground",
|
|
279
|
+
children: T("lead")
|
|
280
|
+
})] })
|
|
281
|
+
})
|
|
282
|
+
}),
|
|
283
|
+
/* @__PURE__ */ y(f, {
|
|
284
|
+
open: K === "members",
|
|
285
|
+
onOpenChange: (e) => q(e ? "members" : null),
|
|
286
|
+
multiple: !0,
|
|
287
|
+
items: k.map((e) => ({
|
|
288
|
+
value: e.user.username,
|
|
289
|
+
label: e.user.name,
|
|
290
|
+
icon: /* @__PURE__ */ y(u, {
|
|
291
|
+
name: e.user.name,
|
|
292
|
+
src: e.user.avatarUrl,
|
|
293
|
+
size: "xs",
|
|
294
|
+
decorative: !0
|
|
295
|
+
})
|
|
296
|
+
})),
|
|
297
|
+
value: B,
|
|
298
|
+
onValueChange: Pe,
|
|
299
|
+
placeholder: T("members"),
|
|
300
|
+
trigger: /* @__PURE__ */ b("button", {
|
|
301
|
+
type: "button",
|
|
302
|
+
className: S,
|
|
303
|
+
children: [/* @__PURE__ */ y(s, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ y("span", {
|
|
304
|
+
className: B.length ? "" : "text-muted-foreground",
|
|
305
|
+
children: B.length ? T("memberCount", { count: B.length }) : T("members")
|
|
306
|
+
})]
|
|
307
|
+
})
|
|
308
|
+
}),
|
|
309
|
+
Q(T("startDate"), H, Ie),
|
|
310
|
+
Q(T("targetDate"), U, Le),
|
|
311
|
+
/* @__PURE__ */ y(f, {
|
|
312
|
+
open: K === "teams",
|
|
313
|
+
onOpenChange: (e) => q(e ? "teams" : null),
|
|
314
|
+
multiple: !0,
|
|
315
|
+
items: Z.map((e) => ({
|
|
316
|
+
value: e.id,
|
|
317
|
+
label: e.name,
|
|
318
|
+
hint: e.key,
|
|
319
|
+
icon: /* @__PURE__ */ y(l, {
|
|
320
|
+
icon: e.icon,
|
|
321
|
+
color: e.color,
|
|
322
|
+
name: e.name
|
|
323
|
+
})
|
|
324
|
+
})),
|
|
325
|
+
value: V,
|
|
326
|
+
onValueChange: Fe,
|
|
327
|
+
placeholder: T("teams"),
|
|
328
|
+
trigger: /* @__PURE__ */ b("button", {
|
|
329
|
+
type: "button",
|
|
330
|
+
className: S,
|
|
331
|
+
children: [/* @__PURE__ */ y(s, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ y("span", {
|
|
332
|
+
className: V.length ? "" : "text-muted-foreground",
|
|
333
|
+
children: V.length ? Z.filter((e) => V.includes(e.id)).map((e) => e.key).join(", ") : T("teams")
|
|
334
|
+
})]
|
|
335
|
+
})
|
|
336
|
+
})
|
|
337
|
+
]
|
|
338
|
+
}),
|
|
339
|
+
/* @__PURE__ */ b("div", {
|
|
340
|
+
className: "flex items-center gap-2 px-5 py-3",
|
|
341
341
|
children: [
|
|
342
342
|
/* @__PURE__ */ y(he, {
|
|
343
343
|
size: "md",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ErrorMessage as e } from "./status.js";
|
|
2
2
|
import { Link as t } from "../lib/router.js";
|
|
3
3
|
import { personActivityQuery as n } from "../api/queries.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { usePeople as r } from "../lib/people.js";
|
|
5
|
+
import { addDays as i, today as a, useTime as o } from "../lib/time.js";
|
|
6
6
|
import { Timeline as s, TimelineItem as c, activityIcon as l } from "./ActivityTimeline.js";
|
|
7
7
|
import { Button as u, EmptyState as d } from "@parallelworks/ui";
|
|
8
8
|
import { useLocale as f, useTranslations as p } from "use-intl";
|
|
@@ -25,7 +25,7 @@ var _ = /* @__PURE__ */ new Set([
|
|
|
25
25
|
return `${t.getFullYear()}-${n(t.getMonth() + 1)}-${n(t.getDate())}`;
|
|
26
26
|
};
|
|
27
27
|
function y({ workspace: y, username: b }) {
|
|
28
|
-
let x = p("person.activity"), S = f(), C =
|
|
28
|
+
let x = p("person.activity"), S = f(), C = o(), { nameOf: w, actorName: T } = r(y), { data: E, error: D, fetchNextPage: O, hasNextPage: k, isFetchingNextPage: A, isPending: j } = g(n(y, b)), M = (E?.pages.flatMap((e) => e.items) ?? []).filter((e) => e.issue || e.doc || _.has(e.type) || e.data.name);
|
|
29
29
|
if (j) return null;
|
|
30
30
|
if (D && !E) return /* @__PURE__ */ m(e, { error: D });
|
|
31
31
|
if (M.length === 0) return /* @__PURE__ */ m(d, {
|
|
@@ -89,7 +89,7 @@ function y({ workspace: y, username: b }) {
|
|
|
89
89
|
rows: [e]
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
|
-
let z = new Intl.RelativeTimeFormat(S, { numeric: "auto" }), B =
|
|
92
|
+
let z = new Intl.RelativeTimeFormat(S, { numeric: "auto" }), B = a(), V = (e) => e === B ? z.format(0, "day") : e === i(B, -1) ? z.format(-1, "day") : C.day(e);
|
|
93
93
|
return /* @__PURE__ */ h("div", {
|
|
94
94
|
className: "w-full max-w-3xl px-4 py-4 md:px-6",
|
|
95
95
|
children: [R.map(({ day: e, rows: t }) => /* @__PURE__ */ h("section", {
|
|
@@ -3,8 +3,8 @@ import { Link as t, useNavigate as n } from "../lib/router.js";
|
|
|
3
3
|
import { sharedDocQuery as r, sharedQuery as i, siteDocQuery as a, siteQuery as o, siteSearchQuery as s } from "../api/queries.js";
|
|
4
4
|
import { docKey as c } from "../lib/docs.js";
|
|
5
5
|
import { DocIcon as l } from "./DocIcon.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { Editor as u } from "./Editor.js";
|
|
7
|
+
import { Logo as d } from "./Logo.js";
|
|
8
8
|
import { DocOutline as f } from "./DocOutline.js";
|
|
9
9
|
import { Disclosure as p, SearchInput as m, buttonClasses as h, cx as g } from "@parallelworks/ui";
|
|
10
10
|
import { useEffect as _, useMemo as v, useRef as y, useState as b } from "react";
|
|
@@ -39,7 +39,7 @@ function E({ source: s, doc: m }) {
|
|
|
39
39
|
children: /* @__PURE__ */ C("div", {
|
|
40
40
|
className: "w-full max-w-sm",
|
|
41
41
|
children: [
|
|
42
|
-
/* @__PURE__ */ S(
|
|
42
|
+
/* @__PURE__ */ S(d, { className: "mb-10" }),
|
|
43
43
|
/* @__PURE__ */ S("h1", {
|
|
44
44
|
className: "text-2xl font-semibold tracking-tight",
|
|
45
45
|
children: w(n ? "signInTitle" : "site" in s ? "noSiteTitle" : "goneTitle")
|
|
@@ -67,7 +67,7 @@ function E({ source: s, doc: m }) {
|
|
|
67
67
|
/* @__PURE__ */ C("header", {
|
|
68
68
|
className: "flex h-12 shrink-0 items-center gap-3 border-b border-border px-4 md:px-5",
|
|
69
69
|
children: [
|
|
70
|
-
/* @__PURE__ */ S(
|
|
70
|
+
/* @__PURE__ */ S(d, { className: "h-5 max-sm:hidden" }),
|
|
71
71
|
/* @__PURE__ */ S("span", {
|
|
72
72
|
className: "truncate text-sm font-semibold",
|
|
73
73
|
children: D.data?.title
|
|
@@ -133,7 +133,7 @@ function E({ source: s, doc: m }) {
|
|
|
133
133
|
className: "text-2xl font-semibold tracking-tight",
|
|
134
134
|
children: M.data?.title
|
|
135
135
|
}),
|
|
136
|
-
M.data && /* @__PURE__ */ S(
|
|
136
|
+
M.data && /* @__PURE__ */ S(u, {
|
|
137
137
|
value: M.data.body ?? "",
|
|
138
138
|
editable: !1,
|
|
139
139
|
onEditor: F,
|
package/components/SlashMenu.js
CHANGED
|
@@ -2,12 +2,12 @@ import { api as e, unwrap as t } from "../api/client.js";
|
|
|
2
2
|
import { useNavigate as n } from "../lib/router.js";
|
|
3
3
|
import { docQuery as r } from "../api/queries.js";
|
|
4
4
|
import { docRef as i, docURL as a } from "../lib/docs.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
5
|
+
import { openToggleAtCaret as o } from "./toggle.js";
|
|
6
|
+
import { insertColumns as s } from "./columns.js";
|
|
7
|
+
import { isoDate as c } from "../lib/datePhrases.js";
|
|
8
|
+
import { useEditorListbox as l } from "./editorListbox.js";
|
|
9
|
+
import { insertLinkCard as u } from "./LinkCard.js";
|
|
10
|
+
import { useAttachmentsOn as d } from "./Attachments.js";
|
|
11
11
|
import { ListboxOption as f, ListboxPanel as p, useListboxNavigation as m } from "@parallelworks/ui";
|
|
12
12
|
import { useParams as h } from "@tanstack/react-router";
|
|
13
13
|
import { useEffect as g, useMemo as _, useRef as v, useState as y } from "react";
|
|
@@ -95,9 +95,9 @@ var w = {
|
|
|
95
95
|
linkCard: (e) => e,
|
|
96
96
|
toggle: (e) => e.setDetails(),
|
|
97
97
|
divider: (e) => e.setHorizontalRule(),
|
|
98
|
-
columns2: (e) =>
|
|
99
|
-
columns3: (e) =>
|
|
100
|
-
columns4: (e) =>
|
|
98
|
+
columns2: (e) => s(e, 2),
|
|
99
|
+
columns3: (e) => s(e, 3),
|
|
100
|
+
columns4: (e) => s(e, 4),
|
|
101
101
|
file: (e) => e,
|
|
102
102
|
table: (e) => e.insertTable({
|
|
103
103
|
rows: 3,
|
|
@@ -110,7 +110,7 @@ var w = {
|
|
|
110
110
|
issueList: (e) => e.insertContent({ type: "issueList" }),
|
|
111
111
|
date: (e) => e.insertContent([{
|
|
112
112
|
type: "dateChip",
|
|
113
|
-
attrs: { date:
|
|
113
|
+
attrs: { date: c(/* @__PURE__ */ new Date()) }
|
|
114
114
|
}, {
|
|
115
115
|
type: "text",
|
|
116
116
|
text: " "
|
|
@@ -136,22 +136,22 @@ function O(e) {
|
|
|
136
136
|
n.length > 0 && e(n);
|
|
137
137
|
}), t.click();
|
|
138
138
|
}
|
|
139
|
-
function k({ editor:
|
|
140
|
-
let k = b("slashMenu"), [A, j] = y(null), M =
|
|
141
|
-
if (!
|
|
142
|
-
let o = await L.fetchQuery(r(P, F)),
|
|
139
|
+
function k({ editor: s, onFiles: c }) {
|
|
140
|
+
let k = b("slashMenu"), [A, j] = y(null), M = d(), N = !!c?.current && M, { workspace: P, doc: F } = h({ strict: !1 }), I = !!P && !!F, L = S(), R = n(), z = b("docs"), B = async (n) => {
|
|
141
|
+
if (!s || !P || !F) return;
|
|
142
|
+
let o = await L.fetchQuery(r(P, F)), c = t(await e.POST("/api/v1/workspaces/{workspace}/docs", {
|
|
143
143
|
params: { path: { workspace: P } },
|
|
144
144
|
body: {
|
|
145
145
|
title: z("untitled"),
|
|
146
146
|
parent: o.key
|
|
147
147
|
}
|
|
148
148
|
}));
|
|
149
|
-
|
|
149
|
+
s.chain().insertContentAt(n, [{
|
|
150
150
|
type: "text",
|
|
151
|
-
text:
|
|
151
|
+
text: c.title,
|
|
152
152
|
marks: [{
|
|
153
153
|
type: "link",
|
|
154
|
-
attrs: { href: a(P,
|
|
154
|
+
attrs: { href: a(P, c) }
|
|
155
155
|
}]
|
|
156
156
|
}, {
|
|
157
157
|
type: "text",
|
|
@@ -164,7 +164,7 @@ function k({ editor: c, onFiles: l }) {
|
|
|
164
164
|
to: "/$workspace/docs/$doc",
|
|
165
165
|
params: {
|
|
166
166
|
workspace: P,
|
|
167
|
-
doc: i(
|
|
167
|
+
doc: i(c)
|
|
168
168
|
},
|
|
169
169
|
search: { rename: !0 }
|
|
170
170
|
});
|
|
@@ -179,23 +179,23 @@ function k({ editor: c, onFiles: l }) {
|
|
|
179
179
|
I
|
|
180
180
|
]);
|
|
181
181
|
g(() => {
|
|
182
|
-
if (!
|
|
182
|
+
if (!s) return;
|
|
183
183
|
let e = () => {
|
|
184
|
-
j(
|
|
184
|
+
j(s.isEditable && s.isFocused ? C(s) : null), W.current(0);
|
|
185
185
|
};
|
|
186
|
-
return
|
|
187
|
-
|
|
186
|
+
return s.on("selectionUpdate", e), s.on("update", e), s.on("blur", e), () => {
|
|
187
|
+
s.off("selectionUpdate", e), s.off("update", e), s.off("blur", e);
|
|
188
188
|
};
|
|
189
|
-
}, [
|
|
189
|
+
}, [s]);
|
|
190
190
|
let H = (e) => {
|
|
191
|
-
if (!
|
|
192
|
-
let t =
|
|
191
|
+
if (!s || !A || !e) return;
|
|
192
|
+
let t = s.chain().focus().deleteRange({
|
|
193
193
|
from: A.from,
|
|
194
194
|
to: A.to
|
|
195
195
|
});
|
|
196
|
-
if (E.includes(e) ? (t.run(), T[e](
|
|
197
|
-
let e =
|
|
198
|
-
O((t) =>
|
|
196
|
+
if (E.includes(e) ? (t.run(), T[e](s.chain().focus()).run()) : T[e](t).run(), e === "toggle" && o(s), e === "linkCard" && u(s), j(null), e === "page" && B(s.state.selection.from), e === "file") {
|
|
197
|
+
let e = s.state.selection.from;
|
|
198
|
+
O((t) => c?.current?.(t, e));
|
|
199
199
|
}
|
|
200
200
|
}, U = m({
|
|
201
201
|
items: V,
|
|
@@ -203,7 +203,7 @@ function k({ editor: c, onFiles: l }) {
|
|
|
203
203
|
onDismiss: () => j(null),
|
|
204
204
|
open: !!A
|
|
205
205
|
}), W = v(U.setActive);
|
|
206
|
-
return W.current = U.setActive,
|
|
206
|
+
return W.current = U.setActive, l(s, U, !!A && V.length > 0), !A || V.length === 0 ? null : /* @__PURE__ */ x(p, {
|
|
207
207
|
at: {
|
|
208
208
|
clientX: A.x,
|
|
209
209
|
clientY: A.y
|