@parallelworks/tandem-web 0.141.2 → 0.143.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.
Files changed (64) hide show
  1. package/_virtual/_virtual_i18n/en/common.js +162 -5
  2. package/_virtual/_virtual_i18n/es/common.js +162 -5
  3. package/_virtual/_virtual_i18n/ja/common.js +162 -5
  4. package/_virtual/_virtual_i18n/ko/common.js +162 -5
  5. package/_virtual/_virtual_i18n/zh/common.js +162 -5
  6. package/components/AccessGrants.js +6 -6
  7. package/components/ActivityTimeline.js +2 -0
  8. package/components/CodeHostSettings.js +25 -25
  9. package/components/CustomFields.js +349 -0
  10. package/components/DocProperties.js +320 -0
  11. package/components/DocTable.js +176 -0
  12. package/components/DocViewBlock.js +104 -0
  13. package/components/DocsTree.js +16 -6
  14. package/components/Editor.js +30 -28
  15. package/components/GitHub.js +22 -22
  16. package/components/IssueBoard.js +48 -43
  17. package/components/IssueEvent.js +2 -0
  18. package/components/IssueFilters.js +210 -122
  19. package/components/IssueImport.js +1 -1
  20. package/components/IssueRow.js +96 -79
  21. package/components/IssueTemplates.js +216 -156
  22. package/components/IssueTypes.js +318 -0
  23. package/components/NewIssueDialog.js +254 -216
  24. package/components/SettingsNav.js +40 -35
  25. package/components/SlashMenu.js +2 -0
  26. package/components/TeamForm.js +49 -35
  27. package/components/TeamRepositories.js +51 -51
  28. package/components/TeamWorkflow.js +8 -8
  29. package/components/Updates.js +8 -8
  30. package/lib/boardMove.js +69 -47
  31. package/lib/customFields.js +113 -0
  32. package/lib/docProperties.js +135 -0
  33. package/lib/issueDisplay.js +27 -12
  34. package/lib/issueList.js +166 -62
  35. package/lib/issueTypes.js +50 -0
  36. package/lib/teamTree.js +24 -0
  37. package/lib/views.js +13 -11
  38. package/package.json +1 -1
  39. package/pages/issues.js +331 -291
  40. package/routeTree.gen.js +174 -162
  41. package/routes/_workspace/agents/index2.js +9 -9
  42. package/routes/_workspace/docs/_doc2.js +147 -140
  43. package/routes/_workspace/docs/space._space.js +6 -0
  44. package/routes/_workspace/docs/space2._space.js +256 -0
  45. package/routes/_workspace/docs2.js +3 -3
  46. package/routes/_workspace/issues/_identifier2.js +433 -370
  47. package/routes/_workspace/projects/_projectId3.js +213 -201
  48. package/routes/_workspace/settings/audit-log3.js +2 -0
  49. package/routes/_workspace/settings/fields.js +6 -0
  50. package/routes/_workspace/settings/fields2.js +30 -0
  51. package/routes/_workspace/settings/fields3.js +5 -0
  52. package/routes/_workspace/settings/groups2.js +74 -74
  53. package/routes/_workspace/settings/labels2.js +33 -33
  54. package/routes/_workspace/settings/members2.js +35 -35
  55. package/routes/_workspace/settings/roles2.js +24 -24
  56. package/routes/_workspace/settings/runners2.js +18 -18
  57. package/routes/_workspace/settings/sessions2.js +9 -9
  58. package/routes/_workspace/settings/slack2.js +8 -8
  59. package/routes/_workspace/settings/sso2.js +50 -50
  60. package/routes/_workspace/settings/tokens2.js +15 -15
  61. package/routes/_workspace/settings/webhooks2.js +42 -42
  62. package/routes/_workspace/teams/_key/settings2.js +138 -76
  63. package/routes/_workspace2.js +321 -319
  64. package/styles.css +39 -0
@@ -0,0 +1,256 @@
1
+ import { usePageTitle as e } from "../../../lib/pageTitle.js";
2
+ import { teamsQuery as t, workspaceQuery as n } from "../../../api/queries.js";
3
+ import { BoardIcon as r, ListViewIcon as i } from "../../../components/icons.js";
4
+ import { Route as a } from "./space._space.js";
5
+ import { usePeople as o } from "../../../lib/people.js";
6
+ import { docPropertiesQuery as s, docViewsQuery as c, readConfig as l, useDocPropertyActions as u } from "../../../lib/docProperties.js";
7
+ import { DocTable as d, groupable as f } from "../../../components/DocTable.js";
8
+ import { Breadcrumbs as p, Button as m, ErrorText as h, Input as g, Popover as _, SegmentedControl as v, Select as y, useClosePopover as b } from "@parallelworks/ui";
9
+ import { useNavigate as x } from "@tanstack/react-router";
10
+ import { useEffect as S, useState as C } from "react";
11
+ import { useErrorMessage as w } from "@parallelworks/problem/react";
12
+ import { useTranslations as T } from "use-intl";
13
+ import { jsx as E, jsxs as D } from "react/jsx-runtime";
14
+ import { useQuery as O, useSuspenseQuery as k } from "@tanstack/react-query";
15
+ // src/routes/$workspace/docs/space.$space.tsx?tsr-split=component
16
+ function A() {
17
+ let o = T("docViews"), g = w(), { workspace: _, space: b } = a.useParams(), { view: A } = a.useSearch(), N = x(), P = (e) => N({
18
+ to: "/$workspace/docs/space/$space",
19
+ params: {
20
+ workspace: _,
21
+ space: b
22
+ },
23
+ search: e ? { view: e } : {}
24
+ }), { data: F } = k(t(_)), { data: I } = k(n(_)), L = b === "workspace" ? I.name : F.find((e) => e.key === b)?.name ?? b;
25
+ e(o("title"), L);
26
+ let { data: R = [] } = O(s(_, b)), { data: z = [] } = O(c(_, b)), B = u(_), V = z.find((e) => e.id === A), [H, U] = C("table"), [W, G] = C({});
27
+ S(() => {
28
+ V && (U(V.layout), G(l(V.config)));
29
+ }, [V]);
30
+ let K = (e) => G(e), q = [
31
+ {
32
+ value: "title",
33
+ label: o("docTitle")
34
+ },
35
+ {
36
+ value: "updated",
37
+ label: o("updated")
38
+ },
39
+ ...R.map((e) => ({
40
+ value: e.id,
41
+ label: e.name
42
+ }))
43
+ ], J = B.saveView.error ?? B.updateView.error;
44
+ return /* @__PURE__ */ D("div", {
45
+ className: "flex h-full flex-col",
46
+ children: [
47
+ /* @__PURE__ */ D("header", {
48
+ className: "flex min-h-12 shrink-0 flex-wrap items-center gap-2 border-b border-border px-4 py-2 md:px-5",
49
+ children: [
50
+ /* @__PURE__ */ E(p, {
51
+ crumbs: [{
52
+ label: o("docs"),
53
+ href: `/${_}/docs`
54
+ }, { label: L }],
55
+ className: "min-w-0 flex-1"
56
+ }),
57
+ /* @__PURE__ */ E(y, {
58
+ value: A ?? "",
59
+ items: [{
60
+ value: "",
61
+ label: o("unsaved")
62
+ }, ...z.map((e) => ({
63
+ value: e.id,
64
+ label: e.name
65
+ }))],
66
+ onValueChange: (e) => P(e || void 0),
67
+ "aria-label": o("savedViews"),
68
+ size: "sm",
69
+ width: "content"
70
+ }),
71
+ V ? /* @__PURE__ */ E(m, {
72
+ size: "sm",
73
+ loading: B.updateView.isPending,
74
+ onClick: () => B.updateView.mutate({
75
+ id: V.id,
76
+ layout: H,
77
+ config: { ...W }
78
+ }),
79
+ children: o("update")
80
+ }) : /* @__PURE__ */ E(M, {
81
+ onSave: async (e) => {
82
+ let t = await B.saveView.mutateAsync({
83
+ space: b,
84
+ name: e,
85
+ layout: H,
86
+ config: { ...W }
87
+ });
88
+ P(t.id);
89
+ },
90
+ pending: B.saveView.isPending
91
+ }),
92
+ /* @__PURE__ */ E(v, {
93
+ label: o("layout"),
94
+ size: "sm",
95
+ value: H,
96
+ onValueChange: U,
97
+ options: [{
98
+ value: "table",
99
+ label: o("table"),
100
+ icon: /* @__PURE__ */ E(i, {})
101
+ }, {
102
+ value: "board",
103
+ label: o("board"),
104
+ icon: /* @__PURE__ */ E(r, {})
105
+ }]
106
+ })
107
+ ]
108
+ }),
109
+ /* @__PURE__ */ D("div", {
110
+ className: "flex flex-wrap items-center gap-2 border-b border-border px-4 py-2 text-xs md:px-5",
111
+ children: [
112
+ H === "board" ? /* @__PURE__ */ E(y, {
113
+ value: W.groupBy ?? "",
114
+ items: [{
115
+ value: "",
116
+ label: o("groupBy")
117
+ }, ...R.filter(f).map((e) => ({
118
+ value: e.id,
119
+ label: e.name
120
+ }))],
121
+ onValueChange: (e) => K({
122
+ ...W,
123
+ ...e ? { groupBy: e } : { groupBy: void 0 }
124
+ }),
125
+ "aria-label": o("groupBy"),
126
+ size: "sm",
127
+ width: "content"
128
+ }) : /* @__PURE__ */ E(y, {
129
+ multiple: !0,
130
+ value: W.columns ?? R.map((e) => e.id),
131
+ items: R.map((e) => ({
132
+ value: e.id,
133
+ label: e.name
134
+ })),
135
+ onValueChange: (e) => K({
136
+ ...W,
137
+ columns: e
138
+ }),
139
+ "aria-label": o("columns"),
140
+ placeholder: o("columns"),
141
+ size: "sm",
142
+ width: "content"
143
+ }),
144
+ /* @__PURE__ */ E(y, {
145
+ value: W.sort ?? "title",
146
+ items: q,
147
+ onValueChange: (e) => K({
148
+ ...W,
149
+ sort: e
150
+ }),
151
+ "aria-label": o("sortBy"),
152
+ size: "sm",
153
+ width: "content"
154
+ }),
155
+ /* @__PURE__ */ E(m, {
156
+ size: "xs",
157
+ variant: "ghost",
158
+ onClick: () => K({
159
+ ...W,
160
+ desc: !W.desc
161
+ }),
162
+ children: W.desc ? o("descending") : o("ascending")
163
+ }),
164
+ R.map((e) => /* @__PURE__ */ E(j, {
165
+ workspace: _,
166
+ property: e,
167
+ value: W.filters?.[e.id] ?? "",
168
+ onChange: (t) => {
169
+ let n = { ...W.filters };
170
+ t ? n[e.id] = t : delete n[e.id], K({
171
+ ...W,
172
+ filters: n
173
+ });
174
+ }
175
+ }, e.id)),
176
+ J && /* @__PURE__ */ E(h, {
177
+ inline: !0,
178
+ children: g(J)
179
+ })
180
+ ]
181
+ }),
182
+ /* @__PURE__ */ E("div", {
183
+ className: "min-h-0 flex-1 overflow-y-auto",
184
+ children: /* @__PURE__ */ E(d, {
185
+ workspace: _,
186
+ space: b,
187
+ layout: H,
188
+ config: W
189
+ })
190
+ })
191
+ ]
192
+ });
193
+ }
194
+ function j({ workspace: e, property: t, value: n, onChange: r }) {
195
+ let i = T("docViews"), { members: a } = o(e), s = t.kind === "select" || t.kind === "multi_select" ? t.options.map((e) => ({
196
+ value: e.id ?? "",
197
+ label: e.name
198
+ })) : t.kind === "person" ? a.map((e) => ({
199
+ value: e.user.username,
200
+ label: e.user.name
201
+ })) : t.kind === "checkbox" ? [{
202
+ value: "true",
203
+ label: i("checked")
204
+ }] : null;
205
+ return s ? /* @__PURE__ */ E(y, {
206
+ value: n,
207
+ items: [{
208
+ value: "",
209
+ label: i("anyValue", { property: t.name })
210
+ }, ...s],
211
+ onValueChange: r,
212
+ "aria-label": i("filterBy", { property: t.name }),
213
+ size: "sm",
214
+ width: "content"
215
+ }) : null;
216
+ }
217
+ function M({ onSave: e, pending: t }) {
218
+ let n = T("docViews");
219
+ return /* @__PURE__ */ E(_, {
220
+ trigger: /* @__PURE__ */ E(m, {
221
+ size: "sm",
222
+ children: n("save")
223
+ }),
224
+ align: "end",
225
+ className: "w-64",
226
+ initialFocus: "first-control",
227
+ "aria-label": n("save"),
228
+ children: /* @__PURE__ */ E(N, {
229
+ onSave: e,
230
+ pending: t
231
+ })
232
+ });
233
+ }
234
+ function N({ onSave: e, pending: t }) {
235
+ let n = T("docViews"), r = b(), [i, a] = C("");
236
+ return /* @__PURE__ */ D("form", {
237
+ className: "space-y-2",
238
+ onSubmit: (t) => {
239
+ t.preventDefault(), i.trim() && (e(i.trim()), r());
240
+ },
241
+ children: [/* @__PURE__ */ E(g, {
242
+ value: i,
243
+ onChange: (e) => a(e.target.value),
244
+ placeholder: n("viewName"),
245
+ "aria-label": n("viewName")
246
+ }), /* @__PURE__ */ E(m, {
247
+ type: "submit",
248
+ size: "sm",
249
+ variant: "primary",
250
+ loading: t,
251
+ disabled: !i.trim(),
252
+ children: n("save")
253
+ })]
254
+ });
255
+ }
256
+ export { A as component };
@@ -5,17 +5,17 @@ import { Outlet as r, useParams as i } from "@tanstack/react-router";
5
5
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
6
  // src/routes/$workspace/docs.tsx?tsr-split=component
7
7
  function s() {
8
- let { workspace: s } = e.useParams(), { doc: c } = i({ strict: !1 }), l = c ? t(c) : void 0;
8
+ let { workspace: s } = e.useParams(), { doc: c, space: l } = i({ strict: !1 }), u = c ? t(c) : l;
9
9
  return /* @__PURE__ */ o("div", {
10
10
  className: "flex h-full",
11
- children: [!l && /* @__PURE__ */ a("div", {
11
+ children: [!u && /* @__PURE__ */ a("div", {
12
12
  className: "mx-auto flex w-full max-w-2xl flex-col px-3 py-3 md:py-6",
13
13
  children: /* @__PURE__ */ a(n, {
14
14
  workspace: s,
15
15
  page: !0
16
16
  }, s)
17
17
  }), /* @__PURE__ */ a("div", {
18
- className: `min-w-0 flex-1 ${l ? "block" : "hidden"}`,
18
+ className: `min-w-0 flex-1 ${u ? "block" : "hidden"}`,
19
19
  children: /* @__PURE__ */ a(r, {})
20
20
  })]
21
21
  });