@parallelworks/tandem-web 0.150.3 → 0.152.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 +36 -4
- package/_virtual/_virtual_i18n/es/common.js +36 -4
- package/_virtual/_virtual_i18n/ja/common.js +36 -4
- package/_virtual/_virtual_i18n/ko/common.js +36 -4
- package/_virtual/_virtual_i18n/zh/common.js +36 -4
- 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 +1 -1
- 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 +414 -151
- 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
package/pages/areas.js
CHANGED
|
@@ -1,233 +1,210 @@
|
|
|
1
1
|
import { usePageTitle as e } from "../lib/pageTitle.js";
|
|
2
2
|
import { Link as t } from "../lib/router.js";
|
|
3
3
|
import { areasQuery as n, countsQuery as r, docsQuery as i, inboxQuery as a, teamsQuery as o, unfiledQuery as s, workspaceQuery as c } from "../api/queries.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { docRef as l } from "../lib/docs.js";
|
|
5
|
+
import { AddIcon as u, AreaIcon as d, ChevronRightIcon as f, FileTextIcon as p, GridIcon as m, ListViewIcon as h } from "../components/icons.js";
|
|
6
6
|
import { usePeople as g } from "../lib/people.js";
|
|
7
7
|
import { EntityIcon as _ } from "../components/EntityIcon.js";
|
|
8
8
|
import { DocIcon as v } from "../components/DocIcon.js";
|
|
9
9
|
import { actorAvatar as y } from "../lib/avatar.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
10
|
+
import { AreaLink as b } from "../components/AreaLink.js";
|
|
11
|
+
import { useAreaActions as x } from "../lib/areas.js";
|
|
12
|
+
import { AreaTile as S, AreaTiles as C, PlaceTile as w } from "../components/AreaTiles.js";
|
|
13
|
+
import { AreaGroup as T, FoldedAnswer as E, KnowledgeRow as D } from "../components/AreaWork.js";
|
|
14
|
+
import { WorkCounts as O } from "../components/WorkCounts.js";
|
|
15
|
+
import { Avatar as k, Breadcrumbs as A, Button as j, Combobox as ee, EmptyState as M, ErrorText as N, IconButton as P, Input as F, Modal as I, ModalTitle as L, SegmentedControl as R, Select as z, Tooltip as B, buttonClasses as V, menuDivider as H, useOpenMenu as U } from "@parallelworks/ui";
|
|
16
|
+
import { useParams as W, useSearch as te } from "@tanstack/react-router";
|
|
17
|
+
import { Fragment as G, useMemo as K, useState as q } from "react";
|
|
18
|
+
import { useErrorMessage as ne } from "@parallelworks/problem/react";
|
|
19
|
+
import { useTranslations as J } from "use-intl";
|
|
20
|
+
import { Fragment as Y, jsx as X, jsxs as Z } from "react/jsx-runtime";
|
|
21
|
+
import { useQuery as Q, useSuspenseQuery as $ } from "@tanstack/react-query";
|
|
22
|
+
import { MoreButton as re } from "@parallelworks/ui/list";
|
|
22
23
|
// src/pages/areas.tsx
|
|
23
|
-
var
|
|
24
|
-
function
|
|
25
|
-
let t =
|
|
24
|
+
var ie = (...e) => e.filter(Boolean).join(" ");
|
|
25
|
+
function ae() {
|
|
26
|
+
let t = J("areas"), { workspace: i, key: a } = W({ strict: !1 }), { team: l = a } = te({ strict: !1 }), { data: f } = $(n(i)), { data: p } = $(o(i)), g = p.find((e) => e.key === l);
|
|
26
27
|
e(t("title"), g?.name);
|
|
27
|
-
let v = g ? f.filter((e) => e.teamId === g.id) : f, { data: y } =
|
|
28
|
+
let v = g ? f.filter((e) => e.teamId === g.id) : f, { data: y } = $(c(i)), { data: b } = $(r(i)), [x, S] = q(null), { data: C } = Q(s(i, g?.key)), w = (C?.proposed.length ?? 0) + (C?.notInDocs.length ?? 0), k = v.filter((e) => e.status === "proposed"), A = [...!g && f.some((e) => !e.teamId) ? [{
|
|
28
29
|
id: "",
|
|
29
30
|
key: "workspace",
|
|
30
31
|
name: y.name,
|
|
31
32
|
icon: y.icon,
|
|
32
33
|
color: y.color
|
|
33
|
-
}] : [], ...
|
|
34
|
+
}] : [], ...p.filter((e) => !e.archivedAt && (!g || e.id === g.id)).map((e) => ({
|
|
34
35
|
id: e.id,
|
|
35
36
|
key: e.key,
|
|
36
37
|
name: e.name,
|
|
37
38
|
icon: e.icon,
|
|
38
39
|
color: e.color,
|
|
39
40
|
team: e
|
|
40
|
-
}))],
|
|
41
|
+
}))], ee = (e) => A.find((t) => t.id === (e.teamId ?? "")), N = () => S({
|
|
41
42
|
kind: "create",
|
|
42
43
|
...g && { space: g.key }
|
|
43
|
-
}), F =
|
|
44
|
+
}), F = fe(i, (e) => S({
|
|
44
45
|
kind: "edit",
|
|
45
46
|
area: e
|
|
46
|
-
}), (e) =>
|
|
47
|
+
}), (e) => S({
|
|
47
48
|
kind: "create",
|
|
48
49
|
parent: e
|
|
49
|
-
})), [I, L] =
|
|
50
|
+
})), [I, L] = q(ce), z = C && /* @__PURE__ */ Z(Y, { children: [C.proposed.map((e) => /* @__PURE__ */ X(D, {
|
|
50
51
|
workspace: i,
|
|
51
52
|
entry: e,
|
|
52
53
|
isNew: !1
|
|
53
|
-
}, e.id)),
|
|
54
|
+
}, e.id)), C.notInDocs.map((e) => /* @__PURE__ */ X(E, {
|
|
54
55
|
workspace: i,
|
|
55
56
|
decision: e,
|
|
56
57
|
isNew: !1,
|
|
57
58
|
notInDocs: !0
|
|
58
59
|
}, e.id))] });
|
|
59
|
-
return /* @__PURE__ */
|
|
60
|
+
return /* @__PURE__ */ Z("div", {
|
|
60
61
|
className: "flex h-full flex-col",
|
|
61
62
|
children: [
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ Z("header", {
|
|
63
64
|
className: "flex h-12 shrink-0 items-center gap-3 border-b border-border px-4 md:px-5",
|
|
64
65
|
children: [
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ X("h1", {
|
|
66
67
|
className: "text-sm font-semibold",
|
|
67
68
|
children: g ? t("teamTitle", { team: g.name }) : t("title")
|
|
68
69
|
}),
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ X("span", {
|
|
70
71
|
className: "text-xs text-muted-foreground tabular-nums",
|
|
71
72
|
children: t("count", { count: v.length })
|
|
72
73
|
}),
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
counts: g ?
|
|
74
|
+
/* @__PURE__ */ X(O, {
|
|
75
|
+
counts: g ? b.teams[g.id] : b.workspace,
|
|
75
76
|
teamId: g?.id,
|
|
76
77
|
className: "max-sm:hidden"
|
|
77
78
|
}),
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ X("div", {
|
|
79
80
|
className: "ml-auto",
|
|
80
|
-
children: /* @__PURE__ */
|
|
81
|
+
children: /* @__PURE__ */ X(R, {
|
|
81
82
|
label: t("view"),
|
|
82
83
|
size: "sm",
|
|
83
84
|
value: I,
|
|
84
85
|
onValueChange: (e) => {
|
|
85
|
-
L(e),
|
|
86
|
+
L(e), le(e);
|
|
86
87
|
},
|
|
87
88
|
options: [{
|
|
88
89
|
value: "icons",
|
|
89
90
|
label: t("icons"),
|
|
90
|
-
icon: /* @__PURE__ */
|
|
91
|
+
icon: /* @__PURE__ */ X(m, {})
|
|
91
92
|
}, {
|
|
92
93
|
value: "list",
|
|
93
94
|
label: t("list"),
|
|
94
|
-
icon: /* @__PURE__ */
|
|
95
|
+
icon: /* @__PURE__ */ X(h, {})
|
|
95
96
|
}]
|
|
96
97
|
})
|
|
97
98
|
}),
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ X(j, {
|
|
99
100
|
variant: "primary",
|
|
100
101
|
size: "sm",
|
|
101
|
-
icon: /* @__PURE__ */
|
|
102
|
-
onClick:
|
|
102
|
+
icon: /* @__PURE__ */ X(u, { className: "size-3.5" }),
|
|
103
|
+
onClick: N,
|
|
103
104
|
children: t("new")
|
|
104
105
|
})
|
|
105
106
|
]
|
|
106
107
|
}),
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ Z("div", {
|
|
108
109
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
109
110
|
children: [
|
|
110
|
-
v.length === 0 ? /* @__PURE__ */
|
|
111
|
+
v.length === 0 ? /* @__PURE__ */ X("div", {
|
|
111
112
|
className: "p-6",
|
|
112
|
-
children: /* @__PURE__ */
|
|
113
|
-
icon: /* @__PURE__ */
|
|
113
|
+
children: /* @__PURE__ */ X(M, {
|
|
114
|
+
icon: /* @__PURE__ */ X(d, {}),
|
|
114
115
|
title: t("none"),
|
|
115
116
|
description: t("description"),
|
|
116
|
-
action: /* @__PURE__ */
|
|
117
|
+
action: /* @__PURE__ */ X(j, {
|
|
117
118
|
variant: "primary",
|
|
118
119
|
size: "sm",
|
|
119
|
-
onClick:
|
|
120
|
+
onClick: N,
|
|
120
121
|
children: t("new")
|
|
121
122
|
})
|
|
122
123
|
})
|
|
123
|
-
}) : /* @__PURE__ */
|
|
124
|
+
}) : /* @__PURE__ */ Z(Y, { children: [k.length > 0 && /* @__PURE__ */ X(T, {
|
|
124
125
|
title: t("toReview"),
|
|
125
|
-
count:
|
|
126
|
-
icon: /* @__PURE__ */
|
|
127
|
-
children:
|
|
126
|
+
count: k.length,
|
|
127
|
+
icon: /* @__PURE__ */ X(d, { className: "size-4 text-warning" }),
|
|
128
|
+
children: k.map((e) => /* @__PURE__ */ X(me, {
|
|
128
129
|
workspace: i,
|
|
129
130
|
area: e,
|
|
130
|
-
counts:
|
|
131
|
+
counts: b.areas[e.id],
|
|
131
132
|
siblings: v.filter((t) => (t.teamId ?? "") === (e.teamId ?? "")),
|
|
132
133
|
depth: 0,
|
|
133
|
-
review:
|
|
134
|
+
review: ee(e)?.name,
|
|
134
135
|
areaMenu: F
|
|
135
136
|
}, e.id))
|
|
136
|
-
}), I === "icons" ? /* @__PURE__ */
|
|
137
|
+
}), I === "icons" ? /* @__PURE__ */ X(de, {
|
|
137
138
|
workspace: i,
|
|
138
139
|
spaces: A,
|
|
139
140
|
areas: v,
|
|
140
|
-
unfiledCount:
|
|
141
|
-
unfiledRows:
|
|
141
|
+
unfiledCount: w,
|
|
142
|
+
unfiledRows: z,
|
|
142
143
|
areaMenu: F,
|
|
143
|
-
onCreate:
|
|
144
|
+
onCreate: S
|
|
144
145
|
}, g?.id ?? "") : A.map((e) => {
|
|
145
146
|
let n = v.filter((t) => (t.teamId ?? "") === e.id);
|
|
146
|
-
return /* @__PURE__ */
|
|
147
|
+
return /* @__PURE__ */ X(T, {
|
|
147
148
|
title: e.name,
|
|
148
149
|
count: n.length,
|
|
149
|
-
icon: /* @__PURE__ */
|
|
150
|
+
icon: /* @__PURE__ */ X(_, {
|
|
150
151
|
icon: e.icon,
|
|
151
152
|
color: e.color,
|
|
152
153
|
name: e.name
|
|
153
154
|
}),
|
|
154
|
-
extra: e.team && /* @__PURE__ */
|
|
155
|
-
counts:
|
|
155
|
+
extra: e.team && /* @__PURE__ */ X(O, {
|
|
156
|
+
counts: b.teams[e.team.id],
|
|
156
157
|
teamId: e.team.id,
|
|
157
158
|
className: "max-sm:hidden"
|
|
158
159
|
}),
|
|
159
|
-
action: e.team && /* @__PURE__ */
|
|
160
|
+
action: e.team && /* @__PURE__ */ X(P, {
|
|
160
161
|
variant: "ghost",
|
|
161
162
|
size: "xs",
|
|
162
|
-
icon: /* @__PURE__ */
|
|
163
|
+
icon: /* @__PURE__ */ X(u, { className: "size-3.5" }),
|
|
163
164
|
label: t("newIn", { space: e.name }),
|
|
164
|
-
onClick: () =>
|
|
165
|
+
onClick: () => S({
|
|
165
166
|
kind: "create",
|
|
166
167
|
space: e.key
|
|
167
168
|
})
|
|
168
169
|
}),
|
|
169
|
-
children: /* @__PURE__ */
|
|
170
|
+
children: /* @__PURE__ */ X(oe, {
|
|
170
171
|
workspace: i,
|
|
171
172
|
areas: n,
|
|
172
|
-
counts:
|
|
173
|
+
counts: b.areas,
|
|
173
174
|
parent: void 0,
|
|
174
175
|
depth: 0,
|
|
175
176
|
areaMenu: F
|
|
176
177
|
})
|
|
177
178
|
}, e.key);
|
|
178
179
|
})] }),
|
|
179
|
-
I === "list" &&
|
|
180
|
+
I === "list" && w > 0 && /* @__PURE__ */ X(T, {
|
|
180
181
|
title: t("unfiled"),
|
|
181
|
-
count:
|
|
182
|
-
icon: /* @__PURE__ */
|
|
183
|
-
children:
|
|
182
|
+
count: w,
|
|
183
|
+
icon: /* @__PURE__ */ X(d, { className: "size-4 text-muted-foreground" }),
|
|
184
|
+
children: z
|
|
184
185
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ X(he, { workspace: i })
|
|
186
187
|
]
|
|
187
188
|
}),
|
|
188
|
-
|
|
189
|
+
x && /* @__PURE__ */ X(_e, {
|
|
189
190
|
workspace: i,
|
|
190
|
-
editing:
|
|
191
|
+
editing: x,
|
|
191
192
|
spaces: A.filter((e) => e.team),
|
|
192
193
|
areas: f,
|
|
193
|
-
onClose: () =>
|
|
194
|
+
onClose: () => S(null)
|
|
194
195
|
})
|
|
195
196
|
]
|
|
196
197
|
});
|
|
197
198
|
}
|
|
198
|
-
function
|
|
199
|
-
return /* @__PURE__ */ X(
|
|
200
|
-
"aria-label": e,
|
|
201
|
-
children: [/* @__PURE__ */ X("h2", {
|
|
202
|
-
className: "sticky top-0 z-10 flex h-9 items-center gap-2 border-b border-border bg-background px-4 text-xs font-medium md:px-5",
|
|
203
|
-
children: [
|
|
204
|
-
n,
|
|
205
|
-
/* @__PURE__ */ Y("span", {
|
|
206
|
-
className: "truncate",
|
|
207
|
-
children: e
|
|
208
|
-
}),
|
|
209
|
-
/* @__PURE__ */ Y("span", {
|
|
210
|
-
className: "text-muted-foreground tabular-nums",
|
|
211
|
-
children: t
|
|
212
|
-
}),
|
|
213
|
-
r,
|
|
214
|
-
i && /* @__PURE__ */ Y("span", {
|
|
215
|
-
className: "ml-auto flex",
|
|
216
|
-
children: i
|
|
217
|
-
})
|
|
218
|
-
]
|
|
219
|
-
}), t > 0 && (a ? o : /* @__PURE__ */ Y("ul", { children: o }))]
|
|
220
|
-
});
|
|
221
|
-
}
|
|
222
|
-
function ae({ workspace: e, areas: t, counts: n, parent: r, depth: i, areaMenu: a }) {
|
|
223
|
-
return t.filter((e) => e.parentId === r).map((r) => /* @__PURE__ */ X(U, { children: [/* @__PURE__ */ Y(pe, {
|
|
199
|
+
function oe({ workspace: e, areas: t, counts: n, parent: r, depth: i, areaMenu: a }) {
|
|
200
|
+
return t.filter((e) => e.parentId === r).map((r) => /* @__PURE__ */ Z(G, { children: [/* @__PURE__ */ X(me, {
|
|
224
201
|
workspace: e,
|
|
225
202
|
area: r,
|
|
226
203
|
counts: n[r.id],
|
|
227
204
|
siblings: t,
|
|
228
205
|
depth: i,
|
|
229
206
|
areaMenu: a
|
|
230
|
-
}), /* @__PURE__ */
|
|
207
|
+
}), /* @__PURE__ */ X(oe, {
|
|
231
208
|
workspace: e,
|
|
232
209
|
areas: t,
|
|
233
210
|
counts: n,
|
|
@@ -236,112 +213,109 @@ function ae({ workspace: e, areas: t, counts: n, parent: r, depth: i, areaMenu:
|
|
|
236
213
|
areaMenu: a
|
|
237
214
|
})] }, r.id));
|
|
238
215
|
}
|
|
239
|
-
var
|
|
240
|
-
function
|
|
216
|
+
var se = "tandem.areas.view";
|
|
217
|
+
function ce() {
|
|
241
218
|
try {
|
|
242
|
-
return globalThis.localStorage?.getItem(
|
|
219
|
+
return globalThis.localStorage?.getItem(se) === "list" ? "list" : "icons";
|
|
243
220
|
} catch {
|
|
244
221
|
return "icons";
|
|
245
222
|
}
|
|
246
223
|
}
|
|
247
|
-
function
|
|
224
|
+
function le(e) {
|
|
248
225
|
try {
|
|
249
|
-
globalThis.localStorage?.setItem(
|
|
226
|
+
globalThis.localStorage?.setItem(se, e);
|
|
250
227
|
} catch {}
|
|
251
228
|
}
|
|
252
|
-
var
|
|
253
|
-
function
|
|
254
|
-
let
|
|
255
|
-
|
|
256
|
-
},
|
|
229
|
+
var ue = /* @__PURE__ */ new Map();
|
|
230
|
+
function de({ workspace: e, spaces: t, areas: n, unfiledCount: r, unfiledRows: i, areaMenu: o, onCreate: s }) {
|
|
231
|
+
let c = J("areas"), { data: l = [] } = Q(a(e)), f = `${e}/${t.map((e) => e.id).join(",")}`, [p, m] = q(() => ue.get(f) ?? null), h = (e) => {
|
|
232
|
+
ue.set(f, e), m(e);
|
|
233
|
+
}, g = K(() => {
|
|
257
234
|
let e = /* @__PURE__ */ new Map();
|
|
258
|
-
for (let t of
|
|
259
|
-
let t = (
|
|
235
|
+
for (let t of l) t.area && e.set(t.area.id, (e.get(t.area.id) ?? 0) + 1);
|
|
236
|
+
let t = (r) => (e.get(r) ?? 0) + n.filter((e) => e.parentId === r).reduce((e, n) => e + t(n.id), 0);
|
|
260
237
|
return t;
|
|
261
|
-
}, [
|
|
238
|
+
}, [l, n]), v = (e) => n.filter((t) => t.parentId === e), y = (t, n) => t.map((t) => /* @__PURE__ */ X(S, {
|
|
262
239
|
workspace: e,
|
|
263
240
|
area: t,
|
|
264
|
-
inside:
|
|
265
|
-
decisions:
|
|
266
|
-
menu: () =>
|
|
267
|
-
onOpen: (e) =>
|
|
241
|
+
inside: v(t.id).length,
|
|
242
|
+
decisions: g(t.id),
|
|
243
|
+
menu: () => o(t, n),
|
|
244
|
+
onOpen: (e) => h({
|
|
268
245
|
kind: "area",
|
|
269
|
-
trail: [...
|
|
246
|
+
trail: [...p?.kind === "area" ? p.trail : [], e]
|
|
270
247
|
})
|
|
271
|
-
}, t.id)), x =
|
|
272
|
-
name:
|
|
273
|
-
icon: /* @__PURE__ */
|
|
274
|
-
hint:
|
|
275
|
-
onOpen: () =>
|
|
248
|
+
}, t.id)), x = r > 0 && /* @__PURE__ */ X(w, {
|
|
249
|
+
name: c("unfiled"),
|
|
250
|
+
icon: /* @__PURE__ */ X(d, { className: "size-7 opacity-60" }),
|
|
251
|
+
hint: r,
|
|
252
|
+
onOpen: () => h({ kind: "unfiled" })
|
|
276
253
|
});
|
|
277
|
-
if (!
|
|
278
|
-
let i =
|
|
279
|
-
return /* @__PURE__ */
|
|
254
|
+
if (!p) return t.map((e, r) => {
|
|
255
|
+
let i = n.filter((t) => (t.teamId ?? "") === e.id);
|
|
256
|
+
return /* @__PURE__ */ X(T, {
|
|
280
257
|
title: e.name,
|
|
281
|
-
count: i.length + (
|
|
282
|
-
icon: /* @__PURE__ */
|
|
258
|
+
count: i.length + (r === t.length - 1 && x ? 1 : 0),
|
|
259
|
+
icon: /* @__PURE__ */ X(_, {
|
|
283
260
|
icon: e.icon,
|
|
284
261
|
color: e.color,
|
|
285
262
|
name: e.name
|
|
286
263
|
}),
|
|
287
264
|
bare: !0,
|
|
288
|
-
children: /* @__PURE__ */
|
|
265
|
+
children: /* @__PURE__ */ Z(C, {
|
|
289
266
|
label: e.name,
|
|
290
|
-
children: [
|
|
267
|
+
children: [y(i.filter((e) => !e.parentId), i), r === t.length - 1 && x]
|
|
291
268
|
})
|
|
292
269
|
}, e.key);
|
|
293
270
|
});
|
|
294
|
-
let
|
|
295
|
-
label:
|
|
296
|
-
icon: /* @__PURE__ */
|
|
297
|
-
}, ...
|
|
298
|
-
return /* @__PURE__ */
|
|
271
|
+
let E = p.kind === "area" ? p.trail.at(-1) : void 0, D = E && n.find((e) => e.id === E.id), O = D ? v(D.id) : [], k = [{
|
|
272
|
+
label: c("title"),
|
|
273
|
+
icon: /* @__PURE__ */ X(d, { className: "size-4" })
|
|
274
|
+
}, ...p.kind === "area" ? p.trail.map((e) => ({ label: n.find((t) => t.id === e.id)?.title ?? e.title })) : [{ label: c("unfiled") }]];
|
|
275
|
+
return /* @__PURE__ */ Z("section", {
|
|
299
276
|
"aria-label": k.at(-1)?.label,
|
|
300
|
-
children: [/* @__PURE__ */
|
|
277
|
+
children: [/* @__PURE__ */ Z("div", {
|
|
301
278
|
className: "sticky top-0 z-10 flex h-10 items-center gap-2 border-b border-border bg-background px-4 md:px-5",
|
|
302
|
-
children: [/* @__PURE__ */
|
|
279
|
+
children: [/* @__PURE__ */ X(A, {
|
|
303
280
|
crumbs: k,
|
|
304
281
|
current: "location",
|
|
305
|
-
onSelect: (e, t) =>
|
|
306
|
-
...
|
|
307
|
-
trail:
|
|
282
|
+
onSelect: (e, t) => h(t === 0 || p.kind !== "area" ? null : {
|
|
283
|
+
...p,
|
|
284
|
+
trail: p.trail.slice(0, t)
|
|
308
285
|
}),
|
|
309
286
|
className: "min-w-0 flex-1"
|
|
310
|
-
}),
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
area: C.key
|
|
315
|
-
},
|
|
316
|
-
className: te({
|
|
287
|
+
}), D && /* @__PURE__ */ Z(Y, { children: [/* @__PURE__ */ X(b, {
|
|
288
|
+
workspace: e,
|
|
289
|
+
area: D,
|
|
290
|
+
className: V({
|
|
317
291
|
variant: "ghost",
|
|
318
292
|
size: "xs"
|
|
319
293
|
}),
|
|
320
|
-
children:
|
|
321
|
-
}), /* @__PURE__ */
|
|
294
|
+
children: c("openArea")
|
|
295
|
+
}), /* @__PURE__ */ X(P, {
|
|
322
296
|
variant: "ghost",
|
|
323
297
|
size: "xs",
|
|
324
|
-
icon: /* @__PURE__ */
|
|
325
|
-
label:
|
|
326
|
-
onClick: () =>
|
|
298
|
+
icon: /* @__PURE__ */ X(u, { className: "size-3.5" }),
|
|
299
|
+
label: c("addInside"),
|
|
300
|
+
onClick: () => s({
|
|
327
301
|
kind: "create",
|
|
328
|
-
parent:
|
|
302
|
+
parent: D
|
|
329
303
|
})
|
|
330
304
|
})] })]
|
|
331
|
-
}),
|
|
305
|
+
}), p.kind === "unfiled" ? /* @__PURE__ */ X("ul", { children: i }) : O.length === 0 ? /* @__PURE__ */ X("div", {
|
|
332
306
|
className: "p-6",
|
|
333
|
-
children: /* @__PURE__ */
|
|
334
|
-
icon: /* @__PURE__ */
|
|
335
|
-
title:
|
|
307
|
+
children: /* @__PURE__ */ X(M, {
|
|
308
|
+
icon: /* @__PURE__ */ X(d, {}),
|
|
309
|
+
title: c("emptyArea")
|
|
336
310
|
})
|
|
337
|
-
}) : /* @__PURE__ */
|
|
311
|
+
}) : /* @__PURE__ */ X(C, {
|
|
338
312
|
label: k.at(-1)?.label ?? "",
|
|
339
|
-
children:
|
|
313
|
+
children: y(O, O)
|
|
340
314
|
})]
|
|
341
315
|
});
|
|
342
316
|
}
|
|
343
|
-
function
|
|
344
|
-
let r =
|
|
317
|
+
function fe(e, t, n) {
|
|
318
|
+
let r = J("areas"), i = x(e);
|
|
345
319
|
return (e, a) => {
|
|
346
320
|
let o = a.filter((t) => t.id !== e.id);
|
|
347
321
|
return [
|
|
@@ -367,7 +341,7 @@ function de(e, t, n) {
|
|
|
367
341
|
})
|
|
368
342
|
}))
|
|
369
343
|
}] : [],
|
|
370
|
-
|
|
344
|
+
H,
|
|
371
345
|
{
|
|
372
346
|
label: r("archive"),
|
|
373
347
|
destructive: !0,
|
|
@@ -376,133 +350,130 @@ function de(e, t, n) {
|
|
|
376
350
|
];
|
|
377
351
|
};
|
|
378
352
|
}
|
|
379
|
-
var
|
|
380
|
-
function
|
|
381
|
-
let
|
|
382
|
-
return /* @__PURE__ */
|
|
353
|
+
var pe = 20;
|
|
354
|
+
function me({ workspace: e, area: t, counts: n, siblings: r, depth: i, review: a, areaMenu: o }) {
|
|
355
|
+
let s = J("areas"), c = J("common"), l = U(), u = x(e), f = ne(), { nameOf: m, avatarOf: h } = g(e), _ = t.status === "proposed", S = () => o(t, r), C = u.accept.error ?? u.merge.error ?? u.archive.error, w = t.creator;
|
|
356
|
+
return /* @__PURE__ */ Z("li", {
|
|
383
357
|
className: "group flex min-h-10 items-center gap-2 border-b border-border/60 pr-2 hover:bg-muted/60",
|
|
384
358
|
children: [
|
|
385
|
-
/* @__PURE__ */
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
},
|
|
391
|
-
onContextMenu: (e) => d(e, x()),
|
|
392
|
-
style: { paddingLeft: `calc(var(--row-start) + ${a * fe}px)` },
|
|
359
|
+
/* @__PURE__ */ Z(b, {
|
|
360
|
+
workspace: e,
|
|
361
|
+
area: t,
|
|
362
|
+
onContextMenu: (e) => l(e, S()),
|
|
363
|
+
style: { paddingLeft: `calc(var(--row-start) + ${i * pe}px)` },
|
|
393
364
|
className: "flex min-w-0 flex-1 items-center gap-2 self-stretch py-2 [--row-start:1rem] md:[--row-start:1.25rem]",
|
|
394
365
|
children: [
|
|
395
|
-
|
|
396
|
-
/* @__PURE__ */
|
|
366
|
+
t.icon ? /* @__PURE__ */ X(v, { icon: t.icon }) : /* @__PURE__ */ X(d, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
367
|
+
/* @__PURE__ */ X("span", {
|
|
397
368
|
className: "min-w-0 truncate text-sm font-medium",
|
|
398
|
-
children:
|
|
369
|
+
children: t.title
|
|
399
370
|
}),
|
|
400
|
-
|
|
371
|
+
t.homeDocId && /* @__PURE__ */ X(p, {
|
|
401
372
|
className: "size-3.5 shrink-0 text-muted-foreground",
|
|
402
|
-
"aria-label":
|
|
373
|
+
"aria-label": s("hasHomeDoc")
|
|
403
374
|
}),
|
|
404
|
-
|
|
375
|
+
t.aliases.length > 0 && /* @__PURE__ */ X("span", {
|
|
405
376
|
className: "min-w-0 truncate text-xs text-muted-foreground max-sm:hidden",
|
|
406
|
-
children:
|
|
377
|
+
children: s("alsoCalled", { names: t.aliases.join(", ") })
|
|
407
378
|
}),
|
|
408
|
-
|
|
379
|
+
a && /* @__PURE__ */ X("span", {
|
|
409
380
|
className: "min-w-0 truncate text-xs text-muted-foreground max-sm:hidden",
|
|
410
|
-
children:
|
|
381
|
+
children: s("inSpace", { space: a })
|
|
411
382
|
})
|
|
412
383
|
]
|
|
413
384
|
}),
|
|
414
|
-
|
|
385
|
+
C && /* @__PURE__ */ X(N, {
|
|
415
386
|
inline: !0,
|
|
416
387
|
className: "shrink-0 text-xs",
|
|
417
|
-
children:
|
|
388
|
+
children: f(C)
|
|
418
389
|
}),
|
|
419
|
-
/* @__PURE__ */
|
|
420
|
-
counts:
|
|
421
|
-
teamId:
|
|
390
|
+
/* @__PURE__ */ X(O, {
|
|
391
|
+
counts: n,
|
|
392
|
+
teamId: t.teamId,
|
|
422
393
|
className: "max-sm:hidden"
|
|
423
394
|
}),
|
|
424
|
-
|
|
395
|
+
_ && !a && /* @__PURE__ */ X("span", {
|
|
425
396
|
className: "shrink-0 rounded border border-warning/60 px-1.5 py-0.5 text-[11px] leading-none text-warning",
|
|
426
|
-
children:
|
|
397
|
+
children: s("proposed")
|
|
427
398
|
}),
|
|
428
|
-
|
|
429
|
-
content:
|
|
399
|
+
a && w && /* @__PURE__ */ X(B, {
|
|
400
|
+
content: s("proposedBy", { name: m(w.kind, w.handle) }),
|
|
430
401
|
describesAnchor: !0,
|
|
431
|
-
children: /* @__PURE__ */
|
|
402
|
+
children: /* @__PURE__ */ Z("span", {
|
|
432
403
|
className: "flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground max-sm:hidden",
|
|
433
|
-
children: [/* @__PURE__ */
|
|
434
|
-
...y(
|
|
435
|
-
name:
|
|
436
|
-
src:
|
|
404
|
+
children: [/* @__PURE__ */ X(k, {
|
|
405
|
+
...y(w.kind),
|
|
406
|
+
name: m(w.kind, w.handle),
|
|
407
|
+
src: h(w.kind, w.handle),
|
|
437
408
|
size: "xs",
|
|
438
409
|
decorative: !0
|
|
439
|
-
}),
|
|
410
|
+
}), m(w.kind, w.handle)]
|
|
440
411
|
})
|
|
441
412
|
}),
|
|
442
|
-
/* @__PURE__ */
|
|
413
|
+
/* @__PURE__ */ X("span", {
|
|
443
414
|
className: "w-28 shrink-0 truncate text-right font-mono text-xs text-muted-foreground max-md:hidden",
|
|
444
|
-
children:
|
|
415
|
+
children: t.key
|
|
445
416
|
}),
|
|
446
|
-
|
|
417
|
+
a && /* @__PURE__ */ X(j, {
|
|
447
418
|
variant: "outline",
|
|
448
419
|
size: "xs",
|
|
449
|
-
loading:
|
|
450
|
-
onClick: () =>
|
|
451
|
-
children:
|
|
420
|
+
loading: u.accept.isPending,
|
|
421
|
+
onClick: () => u.accept.mutate(t.key),
|
|
422
|
+
children: s("accept")
|
|
452
423
|
}),
|
|
453
|
-
/* @__PURE__ */
|
|
454
|
-
items:
|
|
455
|
-
label:
|
|
424
|
+
/* @__PURE__ */ X(re, {
|
|
425
|
+
items: S,
|
|
426
|
+
label: c("moreActionsFor", { name: t.title })
|
|
456
427
|
})
|
|
457
428
|
]
|
|
458
429
|
});
|
|
459
430
|
}
|
|
460
|
-
function
|
|
461
|
-
let t =
|
|
431
|
+
function he({ workspace: e }) {
|
|
432
|
+
let t = J("areas"), r = x(e), [i, a] = q(!1), { data: o = [], isPending: s } = Q({
|
|
462
433
|
...n(e, !0),
|
|
463
434
|
enabled: i
|
|
464
435
|
});
|
|
465
|
-
return /* @__PURE__ */
|
|
436
|
+
return /* @__PURE__ */ Z("section", {
|
|
466
437
|
"aria-label": t("archived"),
|
|
467
|
-
children: [/* @__PURE__ */
|
|
438
|
+
children: [/* @__PURE__ */ X("h2", {
|
|
468
439
|
className: "border-b border-border",
|
|
469
|
-
children: /* @__PURE__ */
|
|
440
|
+
children: /* @__PURE__ */ Z("button", {
|
|
470
441
|
type: "button",
|
|
471
442
|
onClick: () => a((e) => !e),
|
|
472
443
|
"aria-expanded": i,
|
|
473
444
|
className: "flex h-9 w-full items-center gap-2 px-4 text-xs font-medium text-muted-foreground hover:bg-muted/60 hover:text-foreground md:px-5",
|
|
474
445
|
children: [
|
|
475
|
-
/* @__PURE__ */
|
|
446
|
+
/* @__PURE__ */ X(f, { className: ie("size-3.5 transition-transform", i && "rotate-90") }),
|
|
476
447
|
t("archived"),
|
|
477
|
-
i && !s && /* @__PURE__ */
|
|
448
|
+
i && !s && /* @__PURE__ */ X("span", {
|
|
478
449
|
className: "tabular-nums",
|
|
479
450
|
children: o.length
|
|
480
451
|
})
|
|
481
452
|
]
|
|
482
453
|
})
|
|
483
|
-
}), i && !s && (o.length === 0 ? /* @__PURE__ */
|
|
454
|
+
}), i && !s && (o.length === 0 ? /* @__PURE__ */ X("p", {
|
|
484
455
|
className: "border-b border-border/60 px-4 py-2.5 pl-10 text-xs text-muted-foreground md:pl-11",
|
|
485
456
|
children: t("noArchived")
|
|
486
|
-
}) : /* @__PURE__ */
|
|
457
|
+
}) : /* @__PURE__ */ X("ul", { children: o.map((e) => /* @__PURE__ */ Z("li", {
|
|
487
458
|
className: "flex min-h-10 items-center gap-2 border-b border-border/60 py-1.5 pr-2 pl-4 text-muted-foreground md:pl-5",
|
|
488
459
|
children: [
|
|
489
|
-
/* @__PURE__ */
|
|
490
|
-
/* @__PURE__ */
|
|
460
|
+
/* @__PURE__ */ X(d, { className: "size-4 shrink-0" }),
|
|
461
|
+
/* @__PURE__ */ X("span", {
|
|
491
462
|
className: "min-w-0 truncate text-sm",
|
|
492
463
|
children: e.title
|
|
493
464
|
}),
|
|
494
|
-
/* @__PURE__ */
|
|
465
|
+
/* @__PURE__ */ X("span", {
|
|
495
466
|
className: "ml-auto w-28 shrink-0 truncate text-right font-mono text-xs max-md:hidden",
|
|
496
467
|
children: e.key
|
|
497
468
|
}),
|
|
498
|
-
/* @__PURE__ */
|
|
469
|
+
/* @__PURE__ */ X(j, {
|
|
499
470
|
variant: "outline",
|
|
500
471
|
size: "xs",
|
|
501
472
|
loading: r.restore.isPending && r.restore.variables === e.key,
|
|
502
473
|
onClick: () => r.restore.mutate(e.key),
|
|
503
474
|
children: t("restore")
|
|
504
475
|
}),
|
|
505
|
-
/* @__PURE__ */
|
|
476
|
+
/* @__PURE__ */ X("span", {
|
|
506
477
|
"aria-hidden": !0,
|
|
507
478
|
className: "size-7 shrink-0"
|
|
508
479
|
})
|
|
@@ -510,51 +481,51 @@ function me({ workspace: e }) {
|
|
|
510
481
|
}, e.id)) }))]
|
|
511
482
|
});
|
|
512
483
|
}
|
|
513
|
-
var
|
|
514
|
-
function
|
|
515
|
-
let s =
|
|
484
|
+
var ge = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 63);
|
|
485
|
+
function _e({ workspace: e, editing: n, spaces: r, areas: a, onClose: o }) {
|
|
486
|
+
let s = J("areas"), c = J("common"), u = ne(), d = x(e), f = n.kind === "edit" ? n.area : void 0, m = n.kind === "create" ? n.parent : void 0, [h, g] = q(f?.title ?? ""), [_, v] = q(f?.key ?? ""), [y, b] = q(!!f), [S, C] = q((f?.aliases ?? []).join(", ")), w = n.kind === "create" && n.space || r.find((e) => e.id === (f?.teamId ?? m?.teamId ?? ""))?.key || r[0]?.key || "", [T, E] = q(w), D = r.find((e) => e.key === T)?.id ?? "", [O, k] = q(m?.key ?? a.find((e) => e.id === f?.parentId)?.key ?? ""), [A, M] = q(""), [P, R] = q(!1), { data: B = [] } = Q({
|
|
516
487
|
...i(e),
|
|
517
|
-
enabled:
|
|
518
|
-
}),
|
|
488
|
+
enabled: P || !!f?.homeDocId
|
|
489
|
+
}), V = A ? B.find((e) => e.key === A) : B.find((e) => e.id === f?.homeDocId), H = !f || f.status === "proposed", U = d.create.isPending || d.update.isPending, W = d.create.error ?? d.update.error, te = K(() => a.filter((e) => (e.teamId ?? "") === D && e.id !== f?.id), [
|
|
519
490
|
a,
|
|
520
491
|
D,
|
|
521
|
-
|
|
522
|
-
]),
|
|
523
|
-
return /* @__PURE__ */
|
|
492
|
+
f?.id
|
|
493
|
+
]), G = S.split(",").map((e) => e.trim()).filter(Boolean);
|
|
494
|
+
return /* @__PURE__ */ X(I, {
|
|
524
495
|
open: !0,
|
|
525
496
|
onClose: o,
|
|
526
497
|
className: "max-h-[85vh] w-full max-w-md overflow-y-auto p-5",
|
|
527
|
-
children: /* @__PURE__ */
|
|
498
|
+
children: /* @__PURE__ */ Z("form", {
|
|
528
499
|
onSubmit: (e) => {
|
|
529
|
-
e.preventDefault(),
|
|
530
|
-
area:
|
|
500
|
+
e.preventDefault(), f ? d.update.mutate({
|
|
501
|
+
area: f.key,
|
|
531
502
|
body: {
|
|
532
|
-
title:
|
|
533
|
-
aliases:
|
|
534
|
-
...
|
|
535
|
-
...O !== (a.find((e) => e.id ===
|
|
536
|
-
...
|
|
503
|
+
title: h,
|
|
504
|
+
aliases: G,
|
|
505
|
+
...H && _ !== f.key && { key: _ },
|
|
506
|
+
...O !== (a.find((e) => e.id === f.parentId)?.key ?? "") && { parent: O },
|
|
507
|
+
...A && { homeDoc: A }
|
|
537
508
|
}
|
|
538
|
-
}, { onSuccess: o }) :
|
|
509
|
+
}, { onSuccess: o }) : d.create.mutate({
|
|
539
510
|
key: _,
|
|
540
|
-
title:
|
|
541
|
-
aliases:
|
|
511
|
+
title: h,
|
|
512
|
+
aliases: G,
|
|
542
513
|
space: T,
|
|
543
514
|
...O && { parent: O },
|
|
544
|
-
...
|
|
515
|
+
...A && { homeDoc: A }
|
|
545
516
|
}, { onSuccess: o });
|
|
546
517
|
},
|
|
547
518
|
children: [
|
|
548
|
-
/* @__PURE__ */
|
|
519
|
+
/* @__PURE__ */ X(L, {
|
|
549
520
|
className: "text-sm font-semibold",
|
|
550
|
-
children: s(
|
|
521
|
+
children: s(f ? "editTitle" : "newTitle")
|
|
551
522
|
}),
|
|
552
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ Z("label", {
|
|
553
524
|
className: "mt-4 block text-xs font-medium text-muted-foreground",
|
|
554
|
-
children: [s("fieldTitle"), /* @__PURE__ */
|
|
555
|
-
value:
|
|
525
|
+
children: [s("fieldTitle"), /* @__PURE__ */ X(F, {
|
|
526
|
+
value: h,
|
|
556
527
|
onChange: (e) => {
|
|
557
|
-
g(e.target.value), y || v(
|
|
528
|
+
g(e.target.value), y || v(ge(e.target.value));
|
|
558
529
|
},
|
|
559
530
|
required: !0,
|
|
560
531
|
maxLength: 100,
|
|
@@ -562,131 +533,131 @@ function ge({ workspace: e, editing: n, spaces: r, areas: a, onClose: o }) {
|
|
|
562
533
|
className: "mt-1"
|
|
563
534
|
})]
|
|
564
535
|
}),
|
|
565
|
-
/* @__PURE__ */
|
|
536
|
+
/* @__PURE__ */ Z("label", {
|
|
566
537
|
className: "mt-3 block text-xs font-medium text-muted-foreground",
|
|
567
538
|
children: [
|
|
568
539
|
s("fieldKey"),
|
|
569
|
-
/* @__PURE__ */
|
|
540
|
+
/* @__PURE__ */ X(F, {
|
|
570
541
|
value: _,
|
|
571
542
|
onChange: (e) => {
|
|
572
543
|
b(!0), v(e.target.value.toLowerCase());
|
|
573
544
|
},
|
|
574
|
-
disabled: !
|
|
545
|
+
disabled: !H,
|
|
575
546
|
required: !0,
|
|
576
547
|
pattern: "[a-z0-9][a-z0-9-]{0,62}",
|
|
577
548
|
mono: !0,
|
|
578
549
|
className: "mt-1"
|
|
579
550
|
}),
|
|
580
|
-
/* @__PURE__ */
|
|
551
|
+
/* @__PURE__ */ X("span", {
|
|
581
552
|
className: "mt-1 block font-normal",
|
|
582
|
-
children: s(
|
|
553
|
+
children: s(H ? "keyHint" : "keyFixed")
|
|
583
554
|
})
|
|
584
555
|
]
|
|
585
556
|
}),
|
|
586
|
-
/* @__PURE__ */
|
|
557
|
+
/* @__PURE__ */ Z("label", {
|
|
587
558
|
className: "mt-3 block text-xs font-medium text-muted-foreground",
|
|
588
|
-
children: [s("fieldAliases"), /* @__PURE__ */
|
|
589
|
-
value:
|
|
590
|
-
onChange: (e) =>
|
|
559
|
+
children: [s("fieldAliases"), /* @__PURE__ */ X(F, {
|
|
560
|
+
value: S,
|
|
561
|
+
onChange: (e) => C(e.target.value),
|
|
591
562
|
placeholder: s("aliasesPlaceholder"),
|
|
592
563
|
className: "mt-1"
|
|
593
564
|
})]
|
|
594
565
|
}),
|
|
595
|
-
/* @__PURE__ */
|
|
566
|
+
/* @__PURE__ */ Z("div", {
|
|
596
567
|
className: "mt-3 flex flex-wrap gap-3",
|
|
597
|
-
children: [!
|
|
568
|
+
children: [!f && !m && /* @__PURE__ */ Z("div", {
|
|
598
569
|
className: "text-xs font-medium text-muted-foreground",
|
|
599
|
-
children: [s("fieldSpace"), /* @__PURE__ */
|
|
570
|
+
children: [s("fieldSpace"), /* @__PURE__ */ X("div", {
|
|
600
571
|
className: "mt-1",
|
|
601
|
-
children: /* @__PURE__ */
|
|
572
|
+
children: /* @__PURE__ */ X(z, {
|
|
602
573
|
value: T,
|
|
603
574
|
items: r.map((e) => ({
|
|
604
575
|
value: e.key,
|
|
605
576
|
label: e.name
|
|
606
577
|
})),
|
|
607
578
|
onValueChange: (e) => {
|
|
608
|
-
E(e),
|
|
579
|
+
E(e), k("");
|
|
609
580
|
},
|
|
610
581
|
"aria-label": s("fieldSpace"),
|
|
611
582
|
width: "content"
|
|
612
583
|
})
|
|
613
584
|
})]
|
|
614
|
-
}), /* @__PURE__ */
|
|
585
|
+
}), /* @__PURE__ */ Z("div", {
|
|
615
586
|
className: "text-xs font-medium text-muted-foreground",
|
|
616
|
-
children: [s("fieldParent"), /* @__PURE__ */
|
|
587
|
+
children: [s("fieldParent"), /* @__PURE__ */ X("div", {
|
|
617
588
|
className: "mt-1",
|
|
618
|
-
children: /* @__PURE__ */
|
|
589
|
+
children: /* @__PURE__ */ X(z, {
|
|
619
590
|
value: O,
|
|
620
591
|
items: [{
|
|
621
592
|
value: "",
|
|
622
593
|
label: s("top")
|
|
623
|
-
}, ...
|
|
594
|
+
}, ...te.map((e) => ({
|
|
624
595
|
value: e.key,
|
|
625
596
|
label: e.title
|
|
626
597
|
}))],
|
|
627
|
-
onValueChange: (e) =>
|
|
598
|
+
onValueChange: (e) => k(e),
|
|
628
599
|
"aria-label": s("fieldParent"),
|
|
629
600
|
width: "content"
|
|
630
601
|
})
|
|
631
602
|
})]
|
|
632
603
|
})]
|
|
633
604
|
}),
|
|
634
|
-
/* @__PURE__ */
|
|
605
|
+
/* @__PURE__ */ Z("div", {
|
|
635
606
|
className: "mt-3 text-xs font-medium text-muted-foreground",
|
|
636
|
-
children: [s("fieldHomeDoc"), /* @__PURE__ */
|
|
607
|
+
children: [s("fieldHomeDoc"), /* @__PURE__ */ Z("div", {
|
|
637
608
|
className: "mt-1",
|
|
638
|
-
children: [/* @__PURE__ */
|
|
639
|
-
open:
|
|
640
|
-
onOpenChange:
|
|
641
|
-
items:
|
|
609
|
+
children: [/* @__PURE__ */ X(ee, {
|
|
610
|
+
open: P,
|
|
611
|
+
onOpenChange: R,
|
|
612
|
+
items: B.map((e) => ({
|
|
642
613
|
value: e.key,
|
|
643
614
|
label: e.title,
|
|
644
|
-
icon: /* @__PURE__ */
|
|
615
|
+
icon: /* @__PURE__ */ X(p, { className: "size-3.5" })
|
|
645
616
|
})),
|
|
646
|
-
value:
|
|
647
|
-
onValueChange: (e) => e !== null &&
|
|
617
|
+
value: V?.key ?? null,
|
|
618
|
+
onValueChange: (e) => e !== null && M(e),
|
|
648
619
|
placeholder: s("chooseDoc"),
|
|
649
620
|
"aria-label": s("fieldHomeDoc"),
|
|
650
|
-
trigger: /* @__PURE__ */
|
|
621
|
+
trigger: /* @__PURE__ */ Z(j, {
|
|
651
622
|
type: "button",
|
|
652
623
|
className: "max-w-full font-normal",
|
|
653
|
-
children: [/* @__PURE__ */
|
|
624
|
+
children: [/* @__PURE__ */ X(p, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ X("span", {
|
|
654
625
|
className: "truncate",
|
|
655
|
-
children:
|
|
626
|
+
children: V?.title ?? s("noDoc")
|
|
656
627
|
})]
|
|
657
628
|
})
|
|
658
|
-
}),
|
|
629
|
+
}), V && /* @__PURE__ */ X(t, {
|
|
659
630
|
to: "/$workspace/docs/$doc",
|
|
660
631
|
params: {
|
|
661
632
|
workspace: e,
|
|
662
|
-
doc:
|
|
633
|
+
doc: l(V)
|
|
663
634
|
},
|
|
664
635
|
className: "ml-2 text-xs font-normal text-primary hover:underline",
|
|
665
636
|
children: s("openDoc")
|
|
666
637
|
})]
|
|
667
638
|
})]
|
|
668
639
|
}),
|
|
669
|
-
|
|
640
|
+
W && /* @__PURE__ */ X(N, {
|
|
670
641
|
size: "md",
|
|
671
642
|
className: "mt-3",
|
|
672
|
-
children:
|
|
643
|
+
children: u(W)
|
|
673
644
|
}),
|
|
674
|
-
/* @__PURE__ */
|
|
645
|
+
/* @__PURE__ */ Z("div", {
|
|
675
646
|
className: "mt-5 flex justify-end gap-2",
|
|
676
|
-
children: [/* @__PURE__ */
|
|
647
|
+
children: [/* @__PURE__ */ X(j, {
|
|
677
648
|
type: "button",
|
|
678
649
|
onClick: o,
|
|
679
650
|
children: c("cancel")
|
|
680
|
-
}), /* @__PURE__ */
|
|
651
|
+
}), /* @__PURE__ */ X(j, {
|
|
681
652
|
type: "submit",
|
|
682
653
|
variant: "primary",
|
|
683
|
-
disabled: !
|
|
684
|
-
loading:
|
|
685
|
-
children:
|
|
654
|
+
disabled: !h.trim() || !_,
|
|
655
|
+
loading: U,
|
|
656
|
+
children: f ? c("save") : s("create")
|
|
686
657
|
})]
|
|
687
658
|
})
|
|
688
659
|
]
|
|
689
660
|
})
|
|
690
661
|
});
|
|
691
662
|
}
|
|
692
|
-
export {
|
|
663
|
+
export { ae as AreasPage };
|