@parallelworks/tandem-web 0.179.1 → 0.180.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 +49 -23
- package/_virtual/_virtual_i18n/es/common.js +49 -23
- package/_virtual/_virtual_i18n/ja/common.js +49 -23
- package/_virtual/_virtual_i18n/ko/common.js +49 -23
- package/_virtual/_virtual_i18n/zh/common.js +49 -23
- package/components/AgentWork.js +419 -382
- package/components/DocOutline.js +38 -35
- package/components/DocSeries.js +92 -88
- package/components/DocTable.js +100 -93
- package/components/HoverCards.js +139 -124
- package/components/SharedViewer.js +1 -0
- package/components/SubPages.js +101 -44
- package/components/SubpageViews.js +475 -0
- package/lib/docs.js +76 -65
- package/lib/glossary.js +11 -7
- package/lib/subpageViews.js +85 -0
- package/package.json +1 -1
- package/pages/decisions.js +90 -168
- package/routes/_workspace/docs/_doc2.js +279 -235
- package/routes/_workspace/docs/space2._space.js +113 -172
- package/routes/_workspace/issues/_identifier2.js +1 -1
- package/routes/_workspace/teams/_key/settings2.js +96 -24
- package/routes/_workspace2.js +9 -9
- package/styles.css +12 -0
- package/components/DocCalendar.js +0 -245
|
@@ -1,52 +1,47 @@
|
|
|
1
1
|
import { teamsQuery as e, workspaceQuery as t } from "../../../api/queries.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { useEffect as ne, useState as T } from "react";
|
|
14
|
-
import { useErrorMessage as re } from "@parallelworks/problem/react";
|
|
2
|
+
import { DocTable as n, groupable as r } from "../../../components/DocTable.js";
|
|
3
|
+
import { AddIcon as i, BoardIcon as a, ListViewIcon as o } from "../../../components/icons.js";
|
|
4
|
+
import { docPropertiesQuery as s, docViewsQuery as c, readConfig as l, useDocPropertyActions as u } from "../../../lib/docProperties.js";
|
|
5
|
+
import { useDocActions as d } from "../../../lib/docs.js";
|
|
6
|
+
import { usePageTitle as f } from "../../../lib/pageTitle.js";
|
|
7
|
+
import { usePeople as p } from "../../../lib/people.js";
|
|
8
|
+
import { Route as m } from "./space._space.js";
|
|
9
|
+
import { Breadcrumbs as ee, Button as h, ErrorText as g, Input as _, Popover as v, SegmentedControl as y, Select as b, useClosePopover as x } from "@parallelworks/ui";
|
|
10
|
+
import { useNavigate as S } from "@tanstack/react-router";
|
|
11
|
+
import { useEffect as C, useState as w } from "react";
|
|
12
|
+
import { useErrorMessage as T } from "@parallelworks/problem/react";
|
|
15
13
|
import { useTranslations as E } from "use-intl";
|
|
16
|
-
import {
|
|
14
|
+
import { jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
17
15
|
import { useQuery as k, useSuspenseQuery as A } from "@tanstack/react-query";
|
|
18
16
|
// src/routes/$workspace/docs/space.$space.tsx?tsr-split=component
|
|
19
17
|
function j() {
|
|
20
|
-
let
|
|
18
|
+
let p = E("docViews"), v = T(), { workspace: x, space: j } = m.useParams(), { view: P } = m.useSearch(), F = S(), I = (e) => F({
|
|
21
19
|
to: "/$workspace/docs/space/$space",
|
|
22
20
|
params: {
|
|
23
|
-
workspace:
|
|
21
|
+
workspace: x,
|
|
24
22
|
space: j
|
|
25
23
|
},
|
|
26
24
|
search: e ? { view: e } : {}
|
|
27
|
-
}), { data:
|
|
28
|
-
|
|
29
|
-
let { data:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}, [
|
|
33
|
-
let
|
|
34
|
-
...W,
|
|
35
|
-
dateProperty: X[0].id
|
|
36
|
-
} : W, Q = n(w, j, Z.dateProperty), ce = [
|
|
25
|
+
}), { data: L } = A(e(x)), { data: R } = A(t(x)), z = j === "workspace" ? R.name : L.find((e) => e.key === j)?.name ?? j;
|
|
26
|
+
f(p("title"), z);
|
|
27
|
+
let { data: B = [] } = k(s(x, j)), { data: V = [] } = k(c(x, j)), H = u(x), U = V.find((e) => e.id === P), [W, G] = w("table"), [K, q] = w({}), [J, Y] = w(""), X = E("docs"), Z = d(x);
|
|
28
|
+
C(() => {
|
|
29
|
+
U && (G(U.layout === "board" ? "board" : "table"), q(l(U.config)));
|
|
30
|
+
}, [U]);
|
|
31
|
+
let Q = (e) => q(e), te = [
|
|
37
32
|
{
|
|
38
33
|
value: "title",
|
|
39
|
-
label:
|
|
34
|
+
label: p("docTitle")
|
|
40
35
|
},
|
|
41
36
|
{
|
|
42
37
|
value: "updated",
|
|
43
|
-
label:
|
|
38
|
+
label: p("updated")
|
|
44
39
|
},
|
|
45
|
-
...
|
|
40
|
+
...B.map((e) => ({
|
|
46
41
|
value: e.id,
|
|
47
42
|
label: e.name
|
|
48
43
|
}))
|
|
49
|
-
], $ =
|
|
44
|
+
], $ = H.saveView.error ?? H.updateView.error;
|
|
50
45
|
return /* @__PURE__ */ O("div", {
|
|
51
46
|
className: "flex h-full flex-col",
|
|
52
47
|
children: [
|
|
@@ -55,222 +50,168 @@ function j() {
|
|
|
55
50
|
children: [
|
|
56
51
|
/* @__PURE__ */ D(ee, {
|
|
57
52
|
crumbs: [{
|
|
58
|
-
label:
|
|
59
|
-
href: `/${
|
|
60
|
-
}, { label:
|
|
53
|
+
label: p("docs"),
|
|
54
|
+
href: `/${x}/docs`
|
|
55
|
+
}, { label: z }],
|
|
61
56
|
className: "min-w-0 flex-1"
|
|
62
57
|
}),
|
|
63
|
-
/* @__PURE__ */ D(
|
|
58
|
+
/* @__PURE__ */ D(b, {
|
|
64
59
|
value: P ?? "",
|
|
65
60
|
items: [{
|
|
66
61
|
value: "",
|
|
67
|
-
label:
|
|
68
|
-
}, ...
|
|
62
|
+
label: p("unsaved")
|
|
63
|
+
}, ...V.map((e) => ({
|
|
69
64
|
value: e.id,
|
|
70
65
|
label: e.name
|
|
71
66
|
}))],
|
|
72
|
-
onValueChange: (e) =>
|
|
73
|
-
"aria-label":
|
|
67
|
+
onValueChange: (e) => I(e || void 0),
|
|
68
|
+
"aria-label": p("savedViews"),
|
|
74
69
|
size: "sm",
|
|
75
70
|
width: "content"
|
|
76
71
|
}),
|
|
77
|
-
|
|
72
|
+
U ? /* @__PURE__ */ D(h, {
|
|
78
73
|
size: "sm",
|
|
79
|
-
loading:
|
|
80
|
-
onClick: () =>
|
|
81
|
-
id:
|
|
82
|
-
layout:
|
|
83
|
-
config: { ...
|
|
74
|
+
loading: H.updateView.isPending,
|
|
75
|
+
onClick: () => H.updateView.mutate({
|
|
76
|
+
id: U.id,
|
|
77
|
+
layout: W,
|
|
78
|
+
config: { ...K }
|
|
84
79
|
}),
|
|
85
|
-
children:
|
|
80
|
+
children: p("update")
|
|
86
81
|
}) : /* @__PURE__ */ D(N, {
|
|
87
82
|
onSave: async (e) => {
|
|
88
|
-
let t = await
|
|
83
|
+
let t = await H.saveView.mutateAsync({
|
|
89
84
|
space: j,
|
|
90
85
|
name: e,
|
|
91
|
-
layout:
|
|
92
|
-
config: { ...
|
|
86
|
+
layout: W,
|
|
87
|
+
config: { ...K }
|
|
93
88
|
});
|
|
94
|
-
|
|
89
|
+
I(t.id);
|
|
95
90
|
},
|
|
96
|
-
pending:
|
|
91
|
+
pending: H.saveView.isPending
|
|
97
92
|
}),
|
|
98
|
-
/* @__PURE__ */ D(
|
|
93
|
+
/* @__PURE__ */ D(h, {
|
|
99
94
|
variant: "primary",
|
|
100
95
|
size: "sm",
|
|
101
|
-
icon: /* @__PURE__ */ D(
|
|
102
|
-
loading:
|
|
103
|
-
onClick: () =>
|
|
104
|
-
children:
|
|
96
|
+
icon: /* @__PURE__ */ D(i, {}),
|
|
97
|
+
loading: Z.create.isPending,
|
|
98
|
+
onClick: () => Z.create.mutate(j === "workspace" ? {} : { team: j }),
|
|
99
|
+
children: X("new")
|
|
105
100
|
}),
|
|
106
|
-
/* @__PURE__ */ D(
|
|
107
|
-
label:
|
|
101
|
+
/* @__PURE__ */ D(y, {
|
|
102
|
+
label: p("layout"),
|
|
108
103
|
size: "sm",
|
|
109
|
-
value:
|
|
110
|
-
onValueChange:
|
|
111
|
-
options: [
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
icon: /* @__PURE__ */ D(s, {})
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
value: "calendar",
|
|
124
|
-
label: g("calendar"),
|
|
125
|
-
icon: /* @__PURE__ */ D(c, {})
|
|
126
|
-
}
|
|
127
|
-
]
|
|
104
|
+
value: W,
|
|
105
|
+
onValueChange: G,
|
|
106
|
+
options: [{
|
|
107
|
+
value: "table",
|
|
108
|
+
label: p("table"),
|
|
109
|
+
icon: /* @__PURE__ */ D(o, {})
|
|
110
|
+
}, {
|
|
111
|
+
value: "board",
|
|
112
|
+
label: p("board"),
|
|
113
|
+
icon: /* @__PURE__ */ D(a, {})
|
|
114
|
+
}]
|
|
128
115
|
})
|
|
129
116
|
]
|
|
130
117
|
}),
|
|
131
118
|
/* @__PURE__ */ O("div", {
|
|
132
119
|
className: "flex flex-wrap items-center gap-2 border-b border-border px-4 py-2 text-xs md:px-5",
|
|
133
120
|
children: [
|
|
134
|
-
/* @__PURE__ */ D(
|
|
121
|
+
/* @__PURE__ */ D(_, {
|
|
135
122
|
type: "search",
|
|
136
123
|
size: "sm",
|
|
137
|
-
value:
|
|
138
|
-
onChange: (e) =>
|
|
139
|
-
placeholder:
|
|
140
|
-
"aria-label":
|
|
124
|
+
value: J,
|
|
125
|
+
onChange: (e) => Y(e.target.value),
|
|
126
|
+
placeholder: X("search"),
|
|
127
|
+
"aria-label": X("search"),
|
|
141
128
|
className: "w-48"
|
|
142
129
|
}),
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
value: Z.dateProperty ?? "",
|
|
146
|
-
items: X.map((e) => ({
|
|
147
|
-
value: e.id,
|
|
148
|
-
label: e.name
|
|
149
|
-
})),
|
|
150
|
-
onValueChange: (e) => Y({
|
|
151
|
-
...W,
|
|
152
|
-
dateProperty: e
|
|
153
|
-
}),
|
|
154
|
-
"aria-label": g("dateProperty"),
|
|
155
|
-
size: "sm",
|
|
156
|
-
width: "content"
|
|
157
|
-
}) : /* @__PURE__ */ D(v, {
|
|
158
|
-
size: "xs",
|
|
159
|
-
loading: B.create.isPending,
|
|
160
|
-
onClick: async () => {
|
|
161
|
-
let e = await B.create.mutateAsync({
|
|
162
|
-
space: j,
|
|
163
|
-
name: g("dateName"),
|
|
164
|
-
kind: "date"
|
|
165
|
-
});
|
|
166
|
-
Y({
|
|
167
|
-
...W,
|
|
168
|
-
dateProperty: e.id
|
|
169
|
-
});
|
|
170
|
-
},
|
|
171
|
-
children: g("addDate")
|
|
172
|
-
}),
|
|
173
|
-
/* @__PURE__ */ D(v, {
|
|
174
|
-
size: "xs",
|
|
175
|
-
variant: "primary",
|
|
176
|
-
loading: Q.isPending,
|
|
177
|
-
onClick: () => Q.mutate(/* @__PURE__ */ new Date()),
|
|
178
|
-
children: g("newMeeting")
|
|
179
|
-
}),
|
|
180
|
-
/* @__PURE__ */ D(r, {
|
|
181
|
-
workspace: w,
|
|
182
|
-
space: j,
|
|
183
|
-
dateProperty: Z.dateProperty
|
|
184
|
-
})
|
|
185
|
-
] }) : H === "board" ? /* @__PURE__ */ D(C, {
|
|
186
|
-
value: W.groupBy ?? "",
|
|
130
|
+
W === "board" ? /* @__PURE__ */ D(b, {
|
|
131
|
+
value: K.groupBy ?? "",
|
|
187
132
|
items: [{
|
|
188
133
|
value: "",
|
|
189
|
-
label:
|
|
190
|
-
}, ...
|
|
134
|
+
label: p("groupBy")
|
|
135
|
+
}, ...B.filter(r).map((e) => ({
|
|
191
136
|
value: e.id,
|
|
192
137
|
label: e.name
|
|
193
138
|
}))],
|
|
194
|
-
onValueChange: (e) =>
|
|
195
|
-
...
|
|
139
|
+
onValueChange: (e) => Q({
|
|
140
|
+
...K,
|
|
196
141
|
...e ? { groupBy: e } : { groupBy: void 0 }
|
|
197
142
|
}),
|
|
198
|
-
"aria-label":
|
|
143
|
+
"aria-label": p("groupBy"),
|
|
199
144
|
size: "sm",
|
|
200
145
|
width: "content"
|
|
201
|
-
}) : /* @__PURE__ */ D(
|
|
146
|
+
}) : B.length > 0 && /* @__PURE__ */ D(b, {
|
|
202
147
|
multiple: !0,
|
|
203
|
-
value:
|
|
204
|
-
items:
|
|
148
|
+
value: K.columns ?? B.map((e) => e.id),
|
|
149
|
+
items: B.map((e) => ({
|
|
205
150
|
value: e.id,
|
|
206
151
|
label: e.name
|
|
207
152
|
})),
|
|
208
|
-
onValueChange: (e) =>
|
|
209
|
-
...
|
|
153
|
+
onValueChange: (e) => Q({
|
|
154
|
+
...K,
|
|
210
155
|
columns: e
|
|
211
156
|
}),
|
|
212
|
-
"aria-label":
|
|
213
|
-
placeholder:
|
|
157
|
+
"aria-label": p("columns"),
|
|
158
|
+
placeholder: p("columns"),
|
|
214
159
|
size: "sm",
|
|
215
160
|
width: "content"
|
|
216
161
|
}),
|
|
217
|
-
/* @__PURE__ */ D(
|
|
218
|
-
value:
|
|
219
|
-
items:
|
|
220
|
-
onValueChange: (e) =>
|
|
221
|
-
...
|
|
162
|
+
/* @__PURE__ */ D(b, {
|
|
163
|
+
value: K.sort ?? "title",
|
|
164
|
+
items: te,
|
|
165
|
+
onValueChange: (e) => Q({
|
|
166
|
+
...K,
|
|
222
167
|
sort: e
|
|
223
168
|
}),
|
|
224
|
-
"aria-label":
|
|
169
|
+
"aria-label": p("sortBy"),
|
|
225
170
|
size: "sm",
|
|
226
171
|
width: "content"
|
|
227
172
|
}),
|
|
228
|
-
/* @__PURE__ */ D(
|
|
173
|
+
/* @__PURE__ */ D(h, {
|
|
229
174
|
size: "xs",
|
|
230
175
|
variant: "ghost",
|
|
231
|
-
onClick: () =>
|
|
232
|
-
...
|
|
233
|
-
desc: !
|
|
176
|
+
onClick: () => Q({
|
|
177
|
+
...K,
|
|
178
|
+
desc: !K.desc
|
|
234
179
|
}),
|
|
235
|
-
children:
|
|
180
|
+
children: K.desc ? p("descending") : p("ascending")
|
|
236
181
|
}),
|
|
237
|
-
|
|
238
|
-
workspace:
|
|
182
|
+
B.map((e) => /* @__PURE__ */ D(M, {
|
|
183
|
+
workspace: x,
|
|
239
184
|
property: e,
|
|
240
|
-
value:
|
|
185
|
+
value: K.filters?.[e.id] ?? "",
|
|
241
186
|
onChange: (t) => {
|
|
242
|
-
let n = { ...
|
|
243
|
-
t ? n[e.id] = t : delete n[e.id],
|
|
244
|
-
...
|
|
187
|
+
let n = { ...K.filters };
|
|
188
|
+
t ? n[e.id] = t : delete n[e.id], Q({
|
|
189
|
+
...K,
|
|
245
190
|
filters: n
|
|
246
191
|
});
|
|
247
192
|
}
|
|
248
193
|
}, e.id)),
|
|
249
|
-
|
|
250
|
-
inline: !0,
|
|
251
|
-
children: x(Q.error)
|
|
252
|
-
}),
|
|
253
|
-
$ && /* @__PURE__ */ D(y, {
|
|
194
|
+
$ && /* @__PURE__ */ D(g, {
|
|
254
195
|
inline: !0,
|
|
255
|
-
children:
|
|
196
|
+
children: v($)
|
|
256
197
|
})
|
|
257
198
|
]
|
|
258
199
|
}),
|
|
259
200
|
/* @__PURE__ */ D("div", {
|
|
260
201
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
261
|
-
children: /* @__PURE__ */ D(
|
|
262
|
-
workspace:
|
|
202
|
+
children: /* @__PURE__ */ D(n, {
|
|
203
|
+
workspace: x,
|
|
263
204
|
space: j,
|
|
264
|
-
layout:
|
|
265
|
-
config:
|
|
266
|
-
query:
|
|
205
|
+
layout: W,
|
|
206
|
+
config: K,
|
|
207
|
+
query: J
|
|
267
208
|
})
|
|
268
209
|
})
|
|
269
210
|
]
|
|
270
211
|
});
|
|
271
212
|
}
|
|
272
213
|
function M({ workspace: e, property: t, value: n, onChange: r }) {
|
|
273
|
-
let i = E("docViews"), { members: a } =
|
|
214
|
+
let i = E("docViews"), { members: a } = p(e), o = t.kind === "select" || t.kind === "multi_select" ? t.options.map((e) => ({
|
|
274
215
|
value: e.id ?? "",
|
|
275
216
|
label: e.name
|
|
276
217
|
})) : t.kind === "person" ? a.map((e) => ({
|
|
@@ -280,7 +221,7 @@ function M({ workspace: e, property: t, value: n, onChange: r }) {
|
|
|
280
221
|
value: "true",
|
|
281
222
|
label: i("checked")
|
|
282
223
|
}] : null;
|
|
283
|
-
return o ? /* @__PURE__ */ D(
|
|
224
|
+
return o ? /* @__PURE__ */ D(b, {
|
|
284
225
|
value: n,
|
|
285
226
|
items: [{
|
|
286
227
|
value: "",
|
|
@@ -294,8 +235,8 @@ function M({ workspace: e, property: t, value: n, onChange: r }) {
|
|
|
294
235
|
}
|
|
295
236
|
function N({ onSave: e, pending: t }) {
|
|
296
237
|
let n = E("docViews");
|
|
297
|
-
return /* @__PURE__ */ D(
|
|
298
|
-
trigger: /* @__PURE__ */ D(
|
|
238
|
+
return /* @__PURE__ */ D(v, {
|
|
239
|
+
trigger: /* @__PURE__ */ D(h, {
|
|
299
240
|
size: "sm",
|
|
300
241
|
children: n("save")
|
|
301
242
|
}),
|
|
@@ -310,18 +251,18 @@ function N({ onSave: e, pending: t }) {
|
|
|
310
251
|
});
|
|
311
252
|
}
|
|
312
253
|
function P({ onSave: e, pending: t }) {
|
|
313
|
-
let n = E("docViews"), r =
|
|
254
|
+
let n = E("docViews"), r = x(), [i, a] = w("");
|
|
314
255
|
return /* @__PURE__ */ O("form", {
|
|
315
256
|
className: "space-y-2",
|
|
316
257
|
onSubmit: (t) => {
|
|
317
258
|
t.preventDefault(), i.trim() && (e(i.trim()), r());
|
|
318
259
|
},
|
|
319
|
-
children: [/* @__PURE__ */ D(
|
|
260
|
+
children: [/* @__PURE__ */ D(_, {
|
|
320
261
|
value: i,
|
|
321
262
|
onChange: (e) => a(e.target.value),
|
|
322
263
|
placeholder: n("viewName"),
|
|
323
264
|
"aria-label": n("viewName")
|
|
324
|
-
}), /* @__PURE__ */ D(
|
|
265
|
+
}), /* @__PURE__ */ D(h, {
|
|
325
266
|
type: "submit",
|
|
326
267
|
size: "sm",
|
|
327
268
|
variant: "primary",
|