@parallelworks/tandem-web 0.182.1 → 0.184.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 +23 -0
- package/_virtual/_virtual_i18n/es/common.js +23 -0
- package/_virtual/_virtual_i18n/ja/common.js +23 -0
- package/_virtual/_virtual_i18n/ko/common.js +23 -0
- package/_virtual/_virtual_i18n/zh/common.js +23 -0
- package/components/DocProperties.js +137 -114
- package/components/DocStart.js +116 -92
- package/components/DocTable.js +102 -100
- package/components/ProjectAccess.js +23 -20
- package/components/SubpageViews.js +477 -161
- package/components/icons.js +8 -8
- package/lib/cancelledLoads.js +7 -0
- package/lib/docProperties.js +6 -6
- package/lib/queryClient.js +7 -6
- package/lib/subpageViews.js +1 -0
- package/package.json +1 -1
- package/routes/_workspace/docs/space2._space.js +128 -128
- package/routes/_workspace/knowledge/_term2.js +83 -77
- package/routes/_workspace/teams/_key/settings2.js +94 -22
- package/routes/_workspace2.js +9 -9
- package/styles.css +1 -0
package/components/icons.js
CHANGED
|
@@ -230,12 +230,12 @@ function f(e) {
|
|
|
230
230
|
});
|
|
231
231
|
};
|
|
232
232
|
}
|
|
233
|
-
var p = f(i.AddIcon), m = f(i.ColumnsIcon), h = f(i.AttachmentIcon), g = f(i.BranchIcon), _ = f(i.CalendarIcon), v = f(i.ClockIcon), y = f(i.CheckIcon), b = f(i.ChevronDownIcon), x = f(i.ChevronRightIcon), S = f(i.CloseIcon), C = f(i.CommentIcon), w = f(i.DownloadIcon), T = f(i.UploadIcon), E = f(i.ExpandIcon), D = f(i.FileTextIcon), O = f(i.FolderIcon), k = f(i.ChartIcon), A = f(i.BucketIcon), j = f(i.CloudIcon), M = f(i.GridIcon), N = f(i.
|
|
233
|
+
var p = f(i.AddIcon), m = f(i.ColumnsIcon), h = f(i.AttachmentIcon), g = f(i.BranchIcon), _ = f(i.CalendarIcon), v = f(i.ClockIcon), y = f(i.CheckIcon), b = f(i.ChevronDownIcon), x = f(i.ChevronRightIcon), S = f(i.CloseIcon), C = f(i.CommentIcon), w = f(i.DownloadIcon), T = f(i.UploadIcon), E = f(i.ExpandIcon), D = f(i.FileTextIcon), O = f(i.FolderIcon), k = f(i.ChartIcon), A = f(i.BucketIcon), j = f(i.CloudIcon), M = f(i.GridIcon), N = f(i.SpreadsheetIcon), P = f(i.ArticleIcon), F = f(i.HistoryIcon), I = f(i.InboxIcon), L = f(i.KeyIcon), R = f(i.MinimizeIcon), z = f(i.LibraryIcon), B = f(i.ListViewIcon), V = f(i.MailIcon), H = f(i.MigrationIcon);
|
|
234
234
|
i.NavigationIcon;
|
|
235
|
-
var
|
|
235
|
+
var U = f(i.NotificationIcon), W = f(i.QueueIcon), G = f(i.ProjectIcon), K = f(i.PullRequestIcon), q = f(i.RepositoryIcon), J = f(i.SearchIcon), te = f(i.SettingsIcon), Y = f(i.ShieldIcon), X = f(i.WarningIcon), Z = f(i.ShrinkIcon);
|
|
236
236
|
i.SignOutIcon;
|
|
237
|
-
var
|
|
238
|
-
function
|
|
237
|
+
var Q = f(i.TagIcon), ne = f(i.UserIcon), re = f(i.UsersIcon), ie = f(i.WebhookIcon), ae = f(i.WorkerIcon), oe = d("M1.75 9a6.25 4.25 0 1 0 12.5 0 6.25 4.25 0 1 0-12.5 0ZM6.75 3 9 4.75 6.75 6.5"), se = d("M2.5 3.5h11v9h-11ZM10 3.5v9"), ce = d("M2.5 2.5v11M4.5 4.5h5M6.5 8h7M5.5 11.5h4.5"), le = d("M3 13 13 3M3 9.5 9.5 3M6.5 13 13 6.5"), ue = d("M3.5 2.5h9a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1h-9a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1ZM5.5 5h2a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1-.5-.5v-2a.5.5 0 0 1 .5-.5Z");
|
|
238
|
+
function de({ className: e = "size-4", provider: n = "github" }) {
|
|
239
239
|
return n === "gitlab" ? /* @__PURE__ */ t(r, {
|
|
240
240
|
className: `shrink-0 ${e}`,
|
|
241
241
|
"aria-hidden": "true"
|
|
@@ -247,9 +247,9 @@ function le({ className: e = "size-4", provider: n = "github" }) {
|
|
|
247
247
|
children: /* @__PURE__ */ t("path", { d: "M8 0a8 8 0 0 0-2.53 15.59c.4.07.55-.17.55-.38v-1.33c-2.23.48-2.7-1.07-2.7-1.07-.36-.92-.89-1.17-.89-1.17-.73-.5.06-.49.06-.49.8.06 1.23.83 1.23.83.72 1.22 1.87.87 2.33.66.07-.52.28-.87.5-1.07-1.78-.2-3.65-.89-3.65-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82a7.6 7.6 0 0 1 4 0c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.28.82 2.15 0 3.07-1.87 3.75-3.66 3.95.29.25.54.73.54 1.48v2.2c0 .21.15.46.55.38A8 8 0 0 0 8 0Z" })
|
|
248
248
|
});
|
|
249
249
|
}
|
|
250
|
-
var
|
|
250
|
+
var fe = f(i.AddUserIcon), pe = f(i.RemoveUserIcon), me = f(i.ArchiveIcon), he = f(i.RestoreIcon), ge = f(i.EditIcon), _e = f(i.RenameIcon), ve = f(i.LinkIcon), ye = f(i.UnlinkIcon);
|
|
251
251
|
i.CommitIcon;
|
|
252
|
-
var
|
|
252
|
+
var be = f(i.ReleaseIcon), $ = f(i.MegaphoneIcon), xe = f(i.SwapIcon), Se = f(i.TrashIcon);
|
|
253
253
|
i.EyeIcon;
|
|
254
|
-
var
|
|
255
|
-
export { p as AddIcon,
|
|
254
|
+
var Ce = f(i.SuccessIcon), we = f(i.CancelIcon), Te = f(i.AgentIcon), Ee = f(i.ArrowRightIcon);
|
|
255
|
+
export { p as AddIcon, fe as AddUserIcon, Te as AgentIcon, X as AlertIcon, me as ArchiveIcon, ue as AreaIcon, Ee as ArrowRightIcon, P as ArticleIcon, h as AttachmentIcon, m as BoardIcon, g as BranchIcon, A as BucketIcon, _ as CalendarIcon, we as CancelIcon, k as ChartIcon, y as CheckIcon, b as ChevronDownIcon, x as ChevronRightIcon, v as ClockIcon, S as CloseIcon, j as CloudIcon, de as CodeHostIcon, C as CommentIcon, oe as CycleIcon, w as DownloadIcon, ge as EditIcon, le as EstimateIcon, E as ExpandIcon, D as FileTextIcon, O as FolderIcon, M as GridIcon, F as HistoryIcon, I as InboxIcon, L as KeyIcon, z as LibraryIcon, ve as LinkIcon, B as ListViewIcon, V as MailIcon, $ as MegaphoneIcon, H as MigrationIcon, R as MinimizeIcon, U as NotificationIcon, u as PriorityIcon, G as ProjectIcon, K as PullRequestIcon, be as ReleaseIcon, pe as RemoveUserIcon, _e as RenameIcon, q as RepositoryIcon, he as RestoreIcon, J as SearchIcon, te as SettingsIcon, Y as ShieldIcon, Z as ShrinkIcon, se as SidePanelIcon, N as SpreadsheetIcon, s as StatusIcon, Ce as SuccessIcon, xe as SwapIcon, Q as TagIcon, ce as TimelineIcon, Se as TrashIcon, W as TriageIcon, ye as UnlinkIcon, T as UploadIcon, ne as UserIcon, re as UsersIcon, ie as WebhookIcon, ae as WorkerIcon, l as usePriorityNames };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { isCancelledError as e } from "@tanstack/react-query";
|
|
2
|
+
// src/lib/cancelledLoads.ts
|
|
3
|
+
function t(t) {
|
|
4
|
+
let n = t.ensureQueryData.bind(t);
|
|
5
|
+
t.ensureQueryData = ((t) => n(t).catch((r) => e(r) ? n(t) : Promise.reject(r)));
|
|
6
|
+
}
|
|
7
|
+
export { t as refetchCancelledLoads };
|
package/lib/docProperties.js
CHANGED
|
@@ -10,7 +10,7 @@ var a = (e) => e === "workspace" ? void 0 : { team: e }, o = [
|
|
|
10
10
|
"date",
|
|
11
11
|
"checkbox",
|
|
12
12
|
"issue"
|
|
13
|
-
], s = (r, i) => n({
|
|
13
|
+
], s = (e) => e != null && e !== "" && e !== !1 && !(Array.isArray(e) && e.length === 0), c = (e, t) => e.filter((e) => t.some((t) => s(t.properties?.[e.id]))), l = (r, i) => n({
|
|
14
14
|
queryKey: [
|
|
15
15
|
"workspace",
|
|
16
16
|
r,
|
|
@@ -25,7 +25,7 @@ var a = (e) => e === "workspace" ? void 0 : { team: e }, o = [
|
|
|
25
25
|
},
|
|
26
26
|
signal: n
|
|
27
27
|
})).properties
|
|
28
|
-
}),
|
|
28
|
+
}), u = (r, i) => n({
|
|
29
29
|
queryKey: [
|
|
30
30
|
"workspace",
|
|
31
31
|
r,
|
|
@@ -40,7 +40,7 @@ var a = (e) => e === "workspace" ? void 0 : { team: e }, o = [
|
|
|
40
40
|
},
|
|
41
41
|
signal: n
|
|
42
42
|
})).views
|
|
43
|
-
}),
|
|
43
|
+
}), d = (r, i) => n({
|
|
44
44
|
queryKey: [
|
|
45
45
|
"workspace",
|
|
46
46
|
r,
|
|
@@ -56,7 +56,7 @@ var a = (e) => e === "workspace" ? void 0 : { team: e }, o = [
|
|
|
56
56
|
signal: n
|
|
57
57
|
}))
|
|
58
58
|
});
|
|
59
|
-
function
|
|
59
|
+
function f(e) {
|
|
60
60
|
let t = e ?? {}, n = {};
|
|
61
61
|
if (Array.isArray(t.columns) && (n.columns = t.columns.filter((e) => typeof e == "string")), typeof t.sort == "string" && (n.sort = t.sort), t.desc === !0 && (n.desc = !0), typeof t.groupBy == "string" && (n.groupBy = t.groupBy), typeof t.dateProperty == "string" && (n.dateProperty = t.dateProperty), t.filters && typeof t.filters == "object") {
|
|
62
62
|
let e = {};
|
|
@@ -65,7 +65,7 @@ function u(e) {
|
|
|
65
65
|
}
|
|
66
66
|
return n;
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function p(n) {
|
|
69
69
|
let a = i(), o = () => a.invalidateQueries({ queryKey: [
|
|
70
70
|
"workspace",
|
|
71
71
|
n,
|
|
@@ -132,4 +132,4 @@ function d(n) {
|
|
|
132
132
|
})
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
export {
|
|
135
|
+
export { l as docPropertiesQuery, d as docViewQuery, u as docViewsQuery, s as hasValue, o as propertyKinds, f as readConfig, a as spaceScope, p as useDocPropertyActions, c as usedProperties };
|
package/lib/queryClient.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { rememberIssues as e } from "./branch.js";
|
|
2
|
-
import {
|
|
2
|
+
import { refetchCancelledLoads as t } from "./cancelledLoads.js";
|
|
3
|
+
import { QueryClient as n } from "@tanstack/react-query";
|
|
3
4
|
// src/lib/queryClient.ts
|
|
4
|
-
function
|
|
5
|
-
let
|
|
6
|
-
return
|
|
5
|
+
function r() {
|
|
6
|
+
let r = new n({ defaultOptions: { queries: { staleTime: 3e4 } } });
|
|
7
|
+
return t(r), r.getQueryCache().subscribe((t) => {
|
|
7
8
|
t.type === "updated" && t.action.type === "success" && e(t.query.state.data);
|
|
8
|
-
}),
|
|
9
|
+
}), r;
|
|
9
10
|
}
|
|
10
|
-
export {
|
|
11
|
+
export { r as createQueryClient };
|
package/lib/subpageViews.js
CHANGED
package/package.json
CHANGED
|
@@ -1,217 +1,217 @@
|
|
|
1
1
|
import { teamsQuery as e, workspaceQuery as t } from "../../../api/queries.js";
|
|
2
|
-
import { DocTable as n, groupable as r } from "../../../components/DocTable.js";
|
|
3
|
-
import { AddIcon as
|
|
4
|
-
import { docPropertiesQuery as
|
|
5
|
-
import { useDocActions as
|
|
6
|
-
import { usePageTitle as
|
|
7
|
-
import { usePeople as
|
|
8
|
-
import { Route as
|
|
9
|
-
import { Breadcrumbs as
|
|
10
|
-
import { useNavigate as
|
|
11
|
-
import { useEffect as
|
|
12
|
-
import { useErrorMessage as
|
|
13
|
-
import { useTranslations as
|
|
14
|
-
import { jsx as
|
|
15
|
-
import { useQuery as
|
|
2
|
+
import { DocTable as n, groupable as r, listsTop as i, useSpaceDocs as a } from "../../../components/DocTable.js";
|
|
3
|
+
import { AddIcon as o, BoardIcon as s, ListViewIcon as ee } from "../../../components/icons.js";
|
|
4
|
+
import { docPropertiesQuery as c, docViewsQuery as l, readConfig as u, useDocPropertyActions as d } from "../../../lib/docProperties.js";
|
|
5
|
+
import { useDocActions as f } from "../../../lib/docs.js";
|
|
6
|
+
import { usePageTitle as p } from "../../../lib/pageTitle.js";
|
|
7
|
+
import { usePeople as m } from "../../../lib/people.js";
|
|
8
|
+
import { Route as h } from "./space._space.js";
|
|
9
|
+
import { Breadcrumbs as g, Button as _, ErrorText as v, Input as y, Popover as b, SegmentedControl as x, Select as S, useClosePopover as C } from "@parallelworks/ui";
|
|
10
|
+
import { useNavigate as te } from "@tanstack/react-router";
|
|
11
|
+
import { useEffect as w, useState as T } from "react";
|
|
12
|
+
import { useErrorMessage as E } from "@parallelworks/problem/react";
|
|
13
|
+
import { useTranslations as D } from "use-intl";
|
|
14
|
+
import { jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
15
|
+
import { useQuery as A, useSuspenseQuery as j } from "@tanstack/react-query";
|
|
16
16
|
// src/routes/$workspace/docs/space.$space.tsx?tsr-split=component
|
|
17
|
-
function
|
|
18
|
-
let
|
|
17
|
+
function M() {
|
|
18
|
+
let m = D("docViews"), b = E(), { workspace: C, space: M } = h.useParams(), { view: N } = h.useSearch(), ie = te(), P = (e) => ie({
|
|
19
19
|
to: "/$workspace/docs/space/$space",
|
|
20
20
|
params: {
|
|
21
|
-
workspace:
|
|
22
|
-
space:
|
|
21
|
+
workspace: C,
|
|
22
|
+
space: M
|
|
23
23
|
},
|
|
24
24
|
search: e ? { view: e } : {}
|
|
25
|
-
}), { data:
|
|
26
|
-
|
|
27
|
-
let { data:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}, [
|
|
31
|
-
let Q = (e) =>
|
|
25
|
+
}), { data: F } = j(e(C)), { data: I } = j(t(C)), L = M === "workspace" ? I.name : F.find((e) => e.key === M)?.name ?? M;
|
|
26
|
+
p(m("title"), L);
|
|
27
|
+
let { data: R = [] } = A(c(C, M)), { data: z = [] } = A(l(C, M)), B = d(C), V = z.find((e) => e.id === N), [H, U] = T("table"), [W, G] = T({}), [K, q] = T(""), J = D("docs"), Y = f(C);
|
|
28
|
+
w(() => {
|
|
29
|
+
V && (U(V.layout === "board" ? "board" : "table"), G(u(V.config)));
|
|
30
|
+
}, [V]);
|
|
31
|
+
let X = (e) => G(e), { used: Z } = a(C, M, W, i(H, K, W)), Q = R.filter((e) => Z.includes(e) || e.id === W.sort || W.columns?.includes(e.id)), ae = [
|
|
32
32
|
{
|
|
33
33
|
value: "title",
|
|
34
|
-
label:
|
|
34
|
+
label: m("docTitle")
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
value: "updated",
|
|
38
|
-
label:
|
|
38
|
+
label: m("updated")
|
|
39
39
|
},
|
|
40
|
-
...
|
|
40
|
+
...Q.map((e) => ({
|
|
41
41
|
value: e.id,
|
|
42
42
|
label: e.name
|
|
43
43
|
}))
|
|
44
|
-
], $ =
|
|
45
|
-
return /* @__PURE__ */
|
|
44
|
+
], $ = B.saveView.error ?? B.updateView.error;
|
|
45
|
+
return /* @__PURE__ */ k("div", {
|
|
46
46
|
className: "flex h-full flex-col",
|
|
47
47
|
children: [
|
|
48
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ k("header", {
|
|
49
49
|
className: "flex min-h-12 shrink-0 flex-wrap items-center gap-2 border-b border-border px-4 py-2 md:px-5",
|
|
50
50
|
children: [
|
|
51
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ O(g, {
|
|
52
52
|
crumbs: [{
|
|
53
|
-
label:
|
|
54
|
-
href: `/${
|
|
55
|
-
}, { label:
|
|
53
|
+
label: m("docs"),
|
|
54
|
+
href: `/${C}/docs`
|
|
55
|
+
}, { label: L }],
|
|
56
56
|
className: "min-w-0 flex-1"
|
|
57
57
|
}),
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
value:
|
|
58
|
+
/* @__PURE__ */ O(S, {
|
|
59
|
+
value: N ?? "",
|
|
60
60
|
items: [{
|
|
61
61
|
value: "",
|
|
62
|
-
label:
|
|
63
|
-
}, ...
|
|
62
|
+
label: m("unsaved")
|
|
63
|
+
}, ...z.map((e) => ({
|
|
64
64
|
value: e.id,
|
|
65
65
|
label: e.name
|
|
66
66
|
}))],
|
|
67
|
-
onValueChange: (e) =>
|
|
68
|
-
"aria-label":
|
|
67
|
+
onValueChange: (e) => P(e || void 0),
|
|
68
|
+
"aria-label": m("savedViews"),
|
|
69
69
|
size: "sm",
|
|
70
70
|
width: "content"
|
|
71
71
|
}),
|
|
72
|
-
|
|
72
|
+
V ? /* @__PURE__ */ O(_, {
|
|
73
73
|
size: "sm",
|
|
74
|
-
loading:
|
|
75
|
-
onClick: () =>
|
|
76
|
-
id:
|
|
77
|
-
layout:
|
|
78
|
-
config: { ...
|
|
74
|
+
loading: B.updateView.isPending,
|
|
75
|
+
onClick: () => B.updateView.mutate({
|
|
76
|
+
id: V.id,
|
|
77
|
+
layout: H,
|
|
78
|
+
config: { ...W }
|
|
79
79
|
}),
|
|
80
|
-
children:
|
|
81
|
-
}) : /* @__PURE__ */
|
|
80
|
+
children: m("update")
|
|
81
|
+
}) : /* @__PURE__ */ O(re, {
|
|
82
82
|
onSave: async (e) => {
|
|
83
|
-
let t = await
|
|
84
|
-
space:
|
|
83
|
+
let t = await B.saveView.mutateAsync({
|
|
84
|
+
space: M,
|
|
85
85
|
name: e,
|
|
86
|
-
layout:
|
|
87
|
-
config: { ...
|
|
86
|
+
layout: H,
|
|
87
|
+
config: { ...W }
|
|
88
88
|
});
|
|
89
|
-
|
|
89
|
+
P(t.id);
|
|
90
90
|
},
|
|
91
|
-
pending:
|
|
91
|
+
pending: B.saveView.isPending
|
|
92
92
|
}),
|
|
93
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ O(_, {
|
|
94
94
|
variant: "primary",
|
|
95
95
|
size: "sm",
|
|
96
|
-
icon: /* @__PURE__ */
|
|
97
|
-
loading:
|
|
98
|
-
onClick: () =>
|
|
99
|
-
children:
|
|
96
|
+
icon: /* @__PURE__ */ O(o, {}),
|
|
97
|
+
loading: Y.create.isPending,
|
|
98
|
+
onClick: () => Y.create.mutate(M === "workspace" ? {} : { team: M }),
|
|
99
|
+
children: J("new")
|
|
100
100
|
}),
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
label:
|
|
101
|
+
/* @__PURE__ */ O(x, {
|
|
102
|
+
label: m("layout"),
|
|
103
103
|
size: "sm",
|
|
104
|
-
value:
|
|
105
|
-
onValueChange:
|
|
104
|
+
value: H,
|
|
105
|
+
onValueChange: U,
|
|
106
106
|
options: [{
|
|
107
107
|
value: "table",
|
|
108
|
-
label:
|
|
109
|
-
icon: /* @__PURE__ */
|
|
108
|
+
label: m("table"),
|
|
109
|
+
icon: /* @__PURE__ */ O(ee, {})
|
|
110
110
|
}, {
|
|
111
111
|
value: "board",
|
|
112
|
-
label:
|
|
113
|
-
icon: /* @__PURE__ */
|
|
112
|
+
label: m("board"),
|
|
113
|
+
icon: /* @__PURE__ */ O(s, {})
|
|
114
114
|
}]
|
|
115
115
|
})
|
|
116
116
|
]
|
|
117
117
|
}),
|
|
118
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ k("div", {
|
|
119
119
|
className: "flex flex-wrap items-center gap-2 border-b border-border px-4 py-2 text-xs md:px-5",
|
|
120
120
|
children: [
|
|
121
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ O(y, {
|
|
122
122
|
type: "search",
|
|
123
123
|
size: "sm",
|
|
124
|
-
value:
|
|
125
|
-
onChange: (e) =>
|
|
126
|
-
placeholder:
|
|
127
|
-
"aria-label":
|
|
124
|
+
value: K,
|
|
125
|
+
onChange: (e) => q(e.target.value),
|
|
126
|
+
placeholder: J("search"),
|
|
127
|
+
"aria-label": J("search"),
|
|
128
128
|
className: "w-48"
|
|
129
129
|
}),
|
|
130
|
-
|
|
131
|
-
value:
|
|
130
|
+
H === "board" ? /* @__PURE__ */ O(S, {
|
|
131
|
+
value: W.groupBy ?? "",
|
|
132
132
|
items: [{
|
|
133
133
|
value: "",
|
|
134
|
-
label:
|
|
135
|
-
}, ...
|
|
134
|
+
label: m("groupBy")
|
|
135
|
+
}, ...R.filter(r).map((e) => ({
|
|
136
136
|
value: e.id,
|
|
137
137
|
label: e.name
|
|
138
138
|
}))],
|
|
139
|
-
onValueChange: (e) =>
|
|
140
|
-
...
|
|
139
|
+
onValueChange: (e) => X({
|
|
140
|
+
...W,
|
|
141
141
|
...e ? { groupBy: e } : { groupBy: void 0 }
|
|
142
142
|
}),
|
|
143
|
-
"aria-label":
|
|
143
|
+
"aria-label": m("groupBy"),
|
|
144
144
|
size: "sm",
|
|
145
145
|
width: "content"
|
|
146
|
-
}) :
|
|
146
|
+
}) : Q.length > 0 && /* @__PURE__ */ O(S, {
|
|
147
147
|
multiple: !0,
|
|
148
|
-
value:
|
|
149
|
-
items:
|
|
148
|
+
value: W.columns ?? Z.map((e) => e.id),
|
|
149
|
+
items: Q.map((e) => ({
|
|
150
150
|
value: e.id,
|
|
151
151
|
label: e.name
|
|
152
152
|
})),
|
|
153
|
-
onValueChange: (e) =>
|
|
154
|
-
...
|
|
153
|
+
onValueChange: (e) => X({
|
|
154
|
+
...W,
|
|
155
155
|
columns: e
|
|
156
156
|
}),
|
|
157
|
-
"aria-label":
|
|
158
|
-
placeholder:
|
|
157
|
+
"aria-label": m("columns"),
|
|
158
|
+
placeholder: m("columns"),
|
|
159
159
|
size: "sm",
|
|
160
160
|
width: "content"
|
|
161
161
|
}),
|
|
162
|
-
/* @__PURE__ */
|
|
163
|
-
value:
|
|
164
|
-
items:
|
|
165
|
-
onValueChange: (e) =>
|
|
166
|
-
...
|
|
162
|
+
/* @__PURE__ */ O(S, {
|
|
163
|
+
value: W.sort ?? "title",
|
|
164
|
+
items: ae,
|
|
165
|
+
onValueChange: (e) => X({
|
|
166
|
+
...W,
|
|
167
167
|
sort: e
|
|
168
168
|
}),
|
|
169
|
-
"aria-label":
|
|
169
|
+
"aria-label": m("sortBy"),
|
|
170
170
|
size: "sm",
|
|
171
171
|
width: "content"
|
|
172
172
|
}),
|
|
173
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ O(_, {
|
|
174
174
|
size: "xs",
|
|
175
175
|
variant: "ghost",
|
|
176
|
-
onClick: () =>
|
|
177
|
-
...
|
|
178
|
-
desc: !
|
|
176
|
+
onClick: () => X({
|
|
177
|
+
...W,
|
|
178
|
+
desc: !W.desc
|
|
179
179
|
}),
|
|
180
|
-
children:
|
|
180
|
+
children: W.desc ? m("descending") : m("ascending")
|
|
181
181
|
}),
|
|
182
|
-
|
|
183
|
-
workspace:
|
|
182
|
+
R.map((e) => /* @__PURE__ */ O(ne, {
|
|
183
|
+
workspace: C,
|
|
184
184
|
property: e,
|
|
185
|
-
value:
|
|
185
|
+
value: W.filters?.[e.id] ?? "",
|
|
186
186
|
onChange: (t) => {
|
|
187
|
-
let n = { ...
|
|
188
|
-
t ? n[e.id] = t : delete n[e.id],
|
|
189
|
-
...
|
|
187
|
+
let n = { ...W.filters };
|
|
188
|
+
t ? n[e.id] = t : delete n[e.id], X({
|
|
189
|
+
...W,
|
|
190
190
|
filters: n
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
193
|
}, e.id)),
|
|
194
|
-
$ && /* @__PURE__ */
|
|
194
|
+
$ && /* @__PURE__ */ O(v, {
|
|
195
195
|
inline: !0,
|
|
196
|
-
children:
|
|
196
|
+
children: b($)
|
|
197
197
|
})
|
|
198
198
|
]
|
|
199
199
|
}),
|
|
200
|
-
/* @__PURE__ */
|
|
200
|
+
/* @__PURE__ */ O("div", {
|
|
201
201
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
202
|
-
children: /* @__PURE__ */
|
|
203
|
-
workspace:
|
|
204
|
-
space:
|
|
205
|
-
layout:
|
|
206
|
-
config:
|
|
207
|
-
query:
|
|
202
|
+
children: /* @__PURE__ */ O(n, {
|
|
203
|
+
workspace: C,
|
|
204
|
+
space: M,
|
|
205
|
+
layout: H,
|
|
206
|
+
config: W,
|
|
207
|
+
query: K
|
|
208
208
|
})
|
|
209
209
|
})
|
|
210
210
|
]
|
|
211
211
|
});
|
|
212
212
|
}
|
|
213
|
-
function
|
|
214
|
-
let i =
|
|
213
|
+
function ne({ workspace: e, property: t, value: n, onChange: r }) {
|
|
214
|
+
let i = D("docViews"), { members: a } = m(e), o = t.kind === "select" || t.kind === "multi_select" ? t.options.map((e) => ({
|
|
215
215
|
value: e.id ?? "",
|
|
216
216
|
label: e.name
|
|
217
217
|
})) : t.kind === "person" ? a.map((e) => ({
|
|
@@ -221,7 +221,7 @@ function M({ workspace: e, property: t, value: n, onChange: r }) {
|
|
|
221
221
|
value: "true",
|
|
222
222
|
label: i("checked")
|
|
223
223
|
}] : null;
|
|
224
|
-
return o ? /* @__PURE__ */
|
|
224
|
+
return o ? /* @__PURE__ */ O(S, {
|
|
225
225
|
value: n,
|
|
226
226
|
items: [{
|
|
227
227
|
value: "",
|
|
@@ -233,10 +233,10 @@ function M({ workspace: e, property: t, value: n, onChange: r }) {
|
|
|
233
233
|
width: "content"
|
|
234
234
|
}) : null;
|
|
235
235
|
}
|
|
236
|
-
function
|
|
237
|
-
let n =
|
|
238
|
-
return /* @__PURE__ */
|
|
239
|
-
trigger: /* @__PURE__ */
|
|
236
|
+
function re({ onSave: e, pending: t }) {
|
|
237
|
+
let n = D("docViews");
|
|
238
|
+
return /* @__PURE__ */ O(b, {
|
|
239
|
+
trigger: /* @__PURE__ */ O(_, {
|
|
240
240
|
size: "sm",
|
|
241
241
|
children: n("save")
|
|
242
242
|
}),
|
|
@@ -244,25 +244,25 @@ function N({ onSave: e, pending: t }) {
|
|
|
244
244
|
className: "w-64",
|
|
245
245
|
initialFocus: "first-control",
|
|
246
246
|
"aria-label": n("save"),
|
|
247
|
-
children: /* @__PURE__ */
|
|
247
|
+
children: /* @__PURE__ */ O(N, {
|
|
248
248
|
onSave: e,
|
|
249
249
|
pending: t
|
|
250
250
|
})
|
|
251
251
|
});
|
|
252
252
|
}
|
|
253
|
-
function
|
|
254
|
-
let n =
|
|
255
|
-
return /* @__PURE__ */
|
|
253
|
+
function N({ onSave: e, pending: t }) {
|
|
254
|
+
let n = D("docViews"), r = C(), [i, a] = T("");
|
|
255
|
+
return /* @__PURE__ */ k("form", {
|
|
256
256
|
className: "space-y-2",
|
|
257
257
|
onSubmit: (t) => {
|
|
258
258
|
t.preventDefault(), i.trim() && (e(i.trim()), r());
|
|
259
259
|
},
|
|
260
|
-
children: [/* @__PURE__ */
|
|
260
|
+
children: [/* @__PURE__ */ O(y, {
|
|
261
261
|
value: i,
|
|
262
262
|
onChange: (e) => a(e.target.value),
|
|
263
263
|
placeholder: n("viewName"),
|
|
264
264
|
"aria-label": n("viewName")
|
|
265
|
-
}), /* @__PURE__ */
|
|
265
|
+
}), /* @__PURE__ */ O(_, {
|
|
266
266
|
type: "submit",
|
|
267
267
|
size: "sm",
|
|
268
268
|
variant: "primary",
|
|
@@ -272,4 +272,4 @@ function P({ onSave: e, pending: t }) {
|
|
|
272
272
|
})]
|
|
273
273
|
});
|
|
274
274
|
}
|
|
275
|
-
export {
|
|
275
|
+
export { M as component };
|