@parallelworks/tandem-web 0.171.1 → 0.171.3
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 +5 -2
- package/_virtual/_virtual_i18n/es/common.js +5 -2
- package/_virtual/_virtual_i18n/ja/common.js +5 -2
- package/_virtual/_virtual_i18n/ko/common.js +5 -2
- package/_virtual/_virtual_i18n/zh/common.js +5 -2
- package/components/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +60 -60
- package/components/ActorAvatar.js +4 -4
- package/components/ActorLink.js +34 -0
- package/components/AgentWork.js +494 -494
- package/components/AppLauncher.js +7 -7
- package/components/AreaLink.js +13 -13
- package/components/AreaTiles.js +13 -13
- package/components/AreaWork.js +22 -22
- package/components/Attachments.js +73 -69
- package/components/BlockHandle.js +3 -3
- package/components/BugRotation.js +8 -8
- package/components/CodeHostSettings.js +121 -87
- package/components/CollabEditor.js +13 -13
- package/components/CommandPalette.js +206 -206
- package/components/CustomFields.js +95 -95
- package/components/CustomerRequests.js +11 -11
- package/components/DashboardPanel.js +201 -164
- package/components/DateChip.js +21 -21
- package/components/DocHistory.js +14 -14
- package/components/DocIcon.js +4 -4
- package/components/DocIconPicker.js +4 -4
- package/components/DocLinkPicker.js +22 -22
- package/components/DocLook.js +16 -16
- package/components/DocProperties.js +81 -81
- package/components/DocTable.js +53 -53
- package/components/DocsTree.js +179 -179
- package/components/Editor.js +69 -69
- package/components/FavoritesNav.js +78 -78
- package/components/GitHub.js +87 -87
- package/components/Graph.js +14 -14
- package/components/HostActions.js +21 -21
- package/components/HostPanel.js +6 -6
- package/components/HoverCards.js +74 -74
- package/components/IssueBoard.js +13 -10
- package/components/IssueBreakdown.js +31 -31
- package/components/IssueCode.js +19 -19
- package/components/IssueEvent.js +97 -92
- package/components/IssueFilters.js +39 -39
- package/components/IssueGroup.js +16 -16
- package/components/IssueImport.js +13 -13
- package/components/IssueInsights.js +20 -20
- package/components/IssueListBlock.js +81 -81
- package/components/IssueRelations.js +34 -34
- package/components/IssueRow.js +31 -31
- package/components/IssueSentry.js +36 -34
- package/components/IssueTemplates.js +23 -23
- package/components/IssueTypes.js +40 -40
- package/components/MarkdownTransfer.js +10 -10
- package/components/MentionPicker.js +19 -19
- package/components/NewIssueDialog.js +53 -53
- package/components/NewProjectDialog.js +82 -82
- package/components/PersonActivity.js +13 -13
- package/components/PersonHoverCard.js +44 -44
- package/components/Planning.js +16 -16
- package/components/Reports.js +8 -8
- package/components/SettingsNav.js +15 -15
- package/components/ShareDialog.js +8 -8
- package/components/SharedViewer.js +23 -23
- package/components/SlashMenu.js +26 -26
- package/components/SubPages.js +10 -10
- package/components/TeamForm.js +9 -9
- package/components/TeamRepositories.js +21 -21
- package/components/TeamWorkflow.js +6 -6
- package/components/UnlinkedMentions.js +29 -29
- package/components/Updates.js +8 -8
- package/components/Widgets.js +99 -97
- package/components/WorkCounts.js +12 -12
- package/components/cycleCrumb.js +8 -8
- package/components/editorPlugins.js +101 -101
- package/components/settings.js +6 -6
- package/components/video.js +7 -7
- package/hostedApp.js +24 -24
- package/index.js +18 -18
- package/lib/assignees.js +3 -3
- package/lib/attachments.js +12 -12
- package/lib/boardMove.js +27 -27
- package/lib/collab.js +1 -1
- package/lib/docs.js +115 -115
- package/lib/githubLink.js +7 -7
- package/lib/issueList.js +51 -51
- package/lib/issueMenu.js +117 -117
- package/lib/knowledge.js +134 -134
- package/lib/live.js +38 -38
- package/lib/notifications.js +47 -47
- package/lib/triageSeen.js +2 -2
- package/lib/views.js +31 -31
- package/package.json +24 -24
- package/pages/area.js +64 -64
- package/pages/areas.js +199 -199
- package/pages/decisions.js +51 -51
- package/pages/issues.js +120 -120
- package/pages/projects.js +238 -238
- package/pages/triage.js +202 -212
- package/routes/_workspace/agents/_slug2.js +127 -127
- package/routes/_workspace/agents/index2.js +22 -22
- package/routes/_workspace/dashboards/_dashboardId2.js +84 -84
- package/routes/_workspace/dashboards/index2.js +34 -34
- package/routes/_workspace/docs/_doc2.js +267 -267
- package/routes/_workspace/docs/space2._space.js +31 -31
- package/routes/_workspace/docs2.js +4 -4
- package/routes/_workspace/graph2.js +11 -11
- package/routes/_workspace/graph3.js +11 -11
- package/routes/_workspace/issues/_identifier2.js +519 -522
- package/routes/_workspace/issues/index.js +13 -13
- package/routes/_workspace/knowledge/_term2.js +148 -146
- package/routes/_workspace/knowledge/_term3.js +4 -4
- package/routes/_workspace/knowledge/index.js +12 -12
- package/routes/_workspace/knowledge/index2.js +117 -115
- package/routes/_workspace/measures2.js +8 -8
- package/routes/_workspace/measures3.js +29 -29
- package/routes/_workspace/notifications2.js +263 -263
- package/routes/_workspace/people/_username.js +10 -10
- package/routes/_workspace/people/_username2.js +41 -41
- package/routes/_workspace/projects/_projectId3.js +303 -303
- package/routes/_workspace/projects/_projectId4.js +4 -4
- package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +28 -28
- package/routes/_workspace/projects/_projectId_4.milestones._milestoneId.js +4 -4
- package/routes/_workspace/projects/index.js +8 -8
- package/routes/_workspace/settings/account2.js +8 -8
- package/routes/_workspace/settings/audit-log2.js +8 -8
- package/routes/_workspace/settings/audit-log3.js +155 -155
- package/routes/_workspace/settings/connections2.js +4 -4
- package/routes/_workspace/settings/fields2.js +5 -5
- package/routes/_workspace/settings/github2.js +11 -11
- package/routes/_workspace/settings/gitlab2.js +5 -5
- package/routes/_workspace/settings/groups2.js +52 -52
- package/routes/_workspace/settings/import2.js +39 -39
- package/routes/_workspace/settings/index2.js +5 -5
- package/routes/_workspace/settings/intercom2.js +11 -11
- package/routes/_workspace/settings/labels2.js +33 -33
- package/routes/_workspace/settings/members2.js +81 -81
- package/routes/_workspace/settings/notifications2.js +46 -46
- package/routes/_workspace/settings/parallelworks2.js +20 -20
- package/routes/_workspace/settings/roles2.js +41 -41
- package/routes/_workspace/settings/runners2.js +15 -15
- package/routes/_workspace/settings/sentry2.js +15 -15
- package/routes/_workspace/settings/sessions2.js +9 -9
- package/routes/_workspace/settings/sessions3.js +4 -4
- package/routes/_workspace/settings/slack2.js +12 -12
- package/routes/_workspace/settings/sso2.js +37 -37
- package/routes/_workspace/settings/sso3.js +7 -7
- package/routes/_workspace/settings/teams2.js +29 -29
- package/routes/_workspace/settings/tokens2.js +32 -32
- package/routes/_workspace/settings/tokens3.js +4 -4
- package/routes/_workspace/settings/webhooks2.js +41 -41
- package/routes/_workspace/settings/zendesk2.js +11 -11
- package/routes/_workspace/teams/_key/cycles/_number2.js +33 -33
- package/routes/_workspace/teams/_key/cycles/_number3.js +7 -7
- package/routes/_workspace/teams/_key/cycles/index2.js +37 -37
- package/routes/_workspace/teams/_key/issues.js +10 -10
- package/routes/_workspace/teams/_key/projects.js +6 -6
- package/routes/_workspace/teams/_key/settings2.js +396 -396
- package/routes/_workspace2.js +308 -308
- package/routes/_workspace3.js +8 -8
- package/routes/device2.js +4 -4
- package/routes/device3.js +4 -4
- package/routes/docs/_tag/_endpoint2.js +3 -3
- package/routes/docs/_tag/index2.js +3 -3
- package/routes/docs/route2.js +7 -7
- package/routes/index2.js +5 -5
- package/routes/login2.js +10 -10
- package/routes/new2.js +12 -12
- package/routes/new3.js +5 -5
- package/routes/request2._token.js +6 -6
- package/routes/share2._secret.js +4 -4
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../api/client.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { useConfirm as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import { dashboardQuery as n, dashboardsQuery as r, labelsQuery as i, panelQuery as a, teamsQuery as o, viewsQuery as s } from "../../../api/queries.js";
|
|
3
|
+
import { DashboardPanel as c, PanelChart as l, sharingItems as u, sharingOf as d } from "../../../components/DashboardPanel.js";
|
|
4
|
+
import { useFormError as f } from "../../../components/settings.js";
|
|
5
|
+
import { useConfirm as p } from "../../../lib/confirm.js";
|
|
6
|
+
import { usePageTitle as m } from "../../../lib/pageTitle.js";
|
|
7
|
+
import { Link as h } from "../../../lib/router.js";
|
|
8
|
+
import { Route as g } from "./_dashboardId.js";
|
|
9
9
|
import { Button as _, Field as v, Input as y, Modal as b, Select as x } from "@parallelworks/ui";
|
|
10
10
|
import { useNavigate as S } from "@tanstack/react-router";
|
|
11
11
|
import { useState as C } from "react";
|
|
@@ -14,34 +14,34 @@ import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
|
14
14
|
import { useMutation as O, useQuery as k, useQueryClient as A, useSuspenseQuery as j } from "@tanstack/react-query";
|
|
15
15
|
// src/routes/$workspace/dashboards/$dashboardId.tsx?tsr-split=component
|
|
16
16
|
function M() {
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
let y = A(), b = S(), { confirm: k, dialog: M } =
|
|
17
|
+
let i = w("dashboards"), { workspace: a, dashboardId: s } = g.useParams(), { data: l } = j(n(a, s)), { data: v } = j(o(a));
|
|
18
|
+
m(l.name);
|
|
19
|
+
let y = A(), b = S(), { confirm: k, dialog: M } = p(), N = f(), [P, F] = C(null), I = O({
|
|
20
20
|
mutationFn: async (n) => t(await e.PATCH("/api/v1/workspaces/{workspace}/dashboards/{dashboardId}", {
|
|
21
21
|
params: { path: {
|
|
22
|
-
workspace:
|
|
23
|
-
dashboardId:
|
|
22
|
+
workspace: a,
|
|
23
|
+
dashboardId: s
|
|
24
24
|
} },
|
|
25
25
|
body: n
|
|
26
26
|
})),
|
|
27
27
|
onMutate: N.clear,
|
|
28
28
|
onSuccess: (e) => {
|
|
29
|
-
y.setQueryData(
|
|
29
|
+
y.setQueryData(n(a, s).queryKey, e), y.invalidateQueries({ queryKey: r(a).queryKey });
|
|
30
30
|
},
|
|
31
31
|
onError: N.set
|
|
32
32
|
}), L = O({
|
|
33
33
|
mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/dashboards/{dashboardId}", { params: { path: {
|
|
34
|
-
workspace:
|
|
35
|
-
dashboardId:
|
|
34
|
+
workspace: a,
|
|
35
|
+
dashboardId: s
|
|
36
36
|
} } })),
|
|
37
37
|
onSuccess: () => {
|
|
38
|
-
y.invalidateQueries({ queryKey: a
|
|
38
|
+
y.invalidateQueries({ queryKey: r(a).queryKey }), b({
|
|
39
39
|
to: "/$workspace/dashboards",
|
|
40
|
-
params: { workspace:
|
|
40
|
+
params: { workspace: a }
|
|
41
41
|
});
|
|
42
42
|
},
|
|
43
43
|
onError: N.set
|
|
44
|
-
}), z =
|
|
44
|
+
}), z = l.shared ? l.team ? `team:${l.team}` : "workspace" : "private", B = (e) => I.mutate({ panels: e });
|
|
45
45
|
return /* @__PURE__ */ D("div", {
|
|
46
46
|
className: "w-full space-y-6 px-4 py-6 md:px-8 md:py-8",
|
|
47
47
|
children: [
|
|
@@ -50,32 +50,32 @@ function M() {
|
|
|
50
50
|
className: "flex flex-wrap items-end justify-between gap-4",
|
|
51
51
|
children: [/* @__PURE__ */ D("div", {
|
|
52
52
|
className: "min-w-0",
|
|
53
|
-
children: [/* @__PURE__ */ E(
|
|
53
|
+
children: [/* @__PURE__ */ E(h, {
|
|
54
54
|
to: "/$workspace/dashboards",
|
|
55
|
-
params: { workspace:
|
|
55
|
+
params: { workspace: a },
|
|
56
56
|
className: "text-xs text-muted-foreground hover:underline",
|
|
57
|
-
children:
|
|
57
|
+
children: i("title")
|
|
58
58
|
}), /* @__PURE__ */ E("h1", {
|
|
59
59
|
className: "truncate text-xl font-semibold tracking-tight",
|
|
60
|
-
children:
|
|
60
|
+
children: l.name
|
|
61
61
|
})]
|
|
62
62
|
}), /* @__PURE__ */ D("div", {
|
|
63
63
|
className: "flex flex-wrap items-center gap-2",
|
|
64
|
-
children: [
|
|
65
|
-
"aria-label":
|
|
64
|
+
children: [l.canEdit ? /* @__PURE__ */ E(x, {
|
|
65
|
+
"aria-label": i("sharing"),
|
|
66
66
|
value: z,
|
|
67
|
-
onValueChange: (e) => e && I.mutate(
|
|
68
|
-
items:
|
|
67
|
+
onValueChange: (e) => e && I.mutate(d(e)),
|
|
68
|
+
items: u(i, v),
|
|
69
69
|
size: "sm",
|
|
70
70
|
width: "content"
|
|
71
71
|
}) : /* @__PURE__ */ E("span", {
|
|
72
72
|
className: "text-xs text-muted-foreground",
|
|
73
|
-
children:
|
|
74
|
-
}),
|
|
73
|
+
children: i("ownedBy", { owner: l.owner })
|
|
74
|
+
}), l.canEdit && /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(_, {
|
|
75
75
|
size: "sm",
|
|
76
76
|
variant: "primary",
|
|
77
77
|
onClick: () => F({
|
|
78
|
-
at:
|
|
78
|
+
at: l.panels.length,
|
|
79
79
|
panel: {
|
|
80
80
|
title: "",
|
|
81
81
|
chart: "bar",
|
|
@@ -86,17 +86,17 @@ function M() {
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
}),
|
|
89
|
-
children:
|
|
89
|
+
children: i("addPanel")
|
|
90
90
|
}), /* @__PURE__ */ E(_, {
|
|
91
91
|
size: "sm",
|
|
92
92
|
variant: "outline",
|
|
93
93
|
onClick: () => k({
|
|
94
|
-
title:
|
|
95
|
-
description:
|
|
96
|
-
confirmLabel:
|
|
94
|
+
title: i("deleteTitle"),
|
|
95
|
+
description: i("deleteDescription", { name: l.name }),
|
|
96
|
+
confirmLabel: i("delete"),
|
|
97
97
|
onConfirm: () => L.mutateAsync()
|
|
98
98
|
}),
|
|
99
|
-
children:
|
|
99
|
+
children: i("delete")
|
|
100
100
|
})] })]
|
|
101
101
|
})]
|
|
102
102
|
}),
|
|
@@ -104,28 +104,28 @@ function M() {
|
|
|
104
104
|
className: "text-sm text-danger",
|
|
105
105
|
children: N.error
|
|
106
106
|
}),
|
|
107
|
-
|
|
107
|
+
l.panels.length === 0 ? /* @__PURE__ */ E("p", {
|
|
108
108
|
className: "text-sm text-muted-foreground",
|
|
109
|
-
children:
|
|
109
|
+
children: i("noPanels")
|
|
110
110
|
}) : /* @__PURE__ */ E("div", {
|
|
111
111
|
className: "grid gap-4 md:grid-cols-2 xl:grid-cols-3",
|
|
112
|
-
children:
|
|
113
|
-
workspace:
|
|
112
|
+
children: l.panels.map((e, t) => /* @__PURE__ */ E(c, {
|
|
113
|
+
workspace: a,
|
|
114
114
|
panel: e,
|
|
115
|
-
onEdit:
|
|
115
|
+
onEdit: l.canEdit ? () => F({
|
|
116
116
|
at: t,
|
|
117
117
|
panel: e
|
|
118
118
|
}) : void 0,
|
|
119
|
-
onDelete:
|
|
119
|
+
onDelete: l.canEdit ? () => B(l.panels.filter((e, n) => n !== t)) : void 0
|
|
120
120
|
}, e.id ?? t))
|
|
121
121
|
}),
|
|
122
122
|
P && /* @__PURE__ */ E(R, {
|
|
123
|
-
workspace:
|
|
123
|
+
workspace: a,
|
|
124
124
|
initial: P.panel,
|
|
125
125
|
onClose: () => F(null),
|
|
126
126
|
onSave: (e) => {
|
|
127
|
-
let t = [...
|
|
128
|
-
t.splice(P.at, +(P.at <
|
|
127
|
+
let t = [...l.panels];
|
|
128
|
+
t.splice(P.at, +(P.at < l.panels.length), e), B(t), F(null);
|
|
129
129
|
}
|
|
130
130
|
})
|
|
131
131
|
]
|
|
@@ -170,7 +170,7 @@ var N = [
|
|
|
170
170
|
"all"
|
|
171
171
|
];
|
|
172
172
|
function R({ workspace: e, initial: t, onClose: n, onSave: r }) {
|
|
173
|
-
let
|
|
173
|
+
let c = w("dashboards"), [u, d] = C(t), { data: f = [] } = k(o(e)), { data: p = [] } = k(s(e)), { data: m = [] } = k(i(e)), { data: h } = k(a(e, u.chart, u.spec)), g = u.spec, S = g.filters, O = (e) => d((t) => ({
|
|
174
174
|
...t,
|
|
175
175
|
spec: Object.fromEntries(Object.entries({
|
|
176
176
|
...t.spec,
|
|
@@ -183,19 +183,19 @@ function R({ workspace: e, initial: t, onClose: n, onSave: r }) {
|
|
|
183
183
|
return /* @__PURE__ */ E(b, {
|
|
184
184
|
open: !0,
|
|
185
185
|
onClose: n,
|
|
186
|
-
title: t.id ?
|
|
186
|
+
title: t.id ? c("editPanel") : c("addPanel"),
|
|
187
187
|
size: "xl",
|
|
188
188
|
onSubmit: (e) => {
|
|
189
|
-
e.preventDefault(), r(
|
|
189
|
+
e.preventDefault(), r(u);
|
|
190
190
|
},
|
|
191
191
|
footer: /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(_, {
|
|
192
192
|
variant: "ghost",
|
|
193
193
|
onClick: n,
|
|
194
|
-
children:
|
|
194
|
+
children: c("cancel")
|
|
195
195
|
}), /* @__PURE__ */ E(_, {
|
|
196
196
|
type: "submit",
|
|
197
197
|
variant: "primary",
|
|
198
|
-
children:
|
|
198
|
+
children: c("save")
|
|
199
199
|
})] }),
|
|
200
200
|
children: /* @__PURE__ */ D("div", {
|
|
201
201
|
className: "grid gap-4 md:grid-cols-2",
|
|
@@ -203,55 +203,55 @@ function R({ workspace: e, initial: t, onClose: n, onSave: r }) {
|
|
|
203
203
|
className: "space-y-3",
|
|
204
204
|
children: [
|
|
205
205
|
/* @__PURE__ */ E(v, {
|
|
206
|
-
label:
|
|
206
|
+
label: c("panelTitle"),
|
|
207
207
|
children: /* @__PURE__ */ E(y, {
|
|
208
|
-
value:
|
|
209
|
-
placeholder:
|
|
210
|
-
onChange: (e) =>
|
|
211
|
-
...
|
|
208
|
+
value: u.title,
|
|
209
|
+
placeholder: c(`measures.${g.measure}`),
|
|
210
|
+
onChange: (e) => d({
|
|
211
|
+
...u,
|
|
212
212
|
title: e.target.value
|
|
213
213
|
}),
|
|
214
214
|
maxLength: 200
|
|
215
215
|
})
|
|
216
216
|
}),
|
|
217
217
|
/* @__PURE__ */ E(v, {
|
|
218
|
-
label:
|
|
218
|
+
label: c("measure"),
|
|
219
219
|
children: /* @__PURE__ */ E(x, {
|
|
220
220
|
value: g.measure,
|
|
221
221
|
onValueChange: (e) => e && O({ measure: e }),
|
|
222
222
|
items: N.map((e) => ({
|
|
223
223
|
value: e,
|
|
224
|
-
label:
|
|
224
|
+
label: c(`measures.${e}`)
|
|
225
225
|
}))
|
|
226
226
|
})
|
|
227
227
|
}),
|
|
228
228
|
g.measure !== "created_completed" && /* @__PURE__ */ E(v, {
|
|
229
|
-
label:
|
|
229
|
+
label: c("groupBy"),
|
|
230
230
|
children: /* @__PURE__ */ E(x, {
|
|
231
231
|
value: g.groupBy ?? "",
|
|
232
232
|
onValueChange: (e) => O(e ? { groupBy: e } : { groupBy: void 0 }),
|
|
233
233
|
items: F.map((e) => ({
|
|
234
234
|
value: e,
|
|
235
|
-
label:
|
|
235
|
+
label: c(`groupings.${e || "none"}`)
|
|
236
236
|
}))
|
|
237
237
|
})
|
|
238
238
|
}),
|
|
239
239
|
/* @__PURE__ */ E(v, {
|
|
240
|
-
label:
|
|
240
|
+
label: c("chart"),
|
|
241
241
|
children: /* @__PURE__ */ E(x, {
|
|
242
|
-
value:
|
|
243
|
-
onValueChange: (e) => e &&
|
|
244
|
-
...
|
|
242
|
+
value: u.chart,
|
|
243
|
+
onValueChange: (e) => e && d({
|
|
244
|
+
...u,
|
|
245
245
|
chart: e
|
|
246
246
|
}),
|
|
247
247
|
items: P.map((e) => ({
|
|
248
248
|
value: e,
|
|
249
|
-
label:
|
|
249
|
+
label: c(`charts.${e}`)
|
|
250
250
|
}))
|
|
251
251
|
})
|
|
252
252
|
}),
|
|
253
253
|
I.has(g.measure) && /* @__PURE__ */ E(v, {
|
|
254
|
-
label:
|
|
254
|
+
label: c("weeks"),
|
|
255
255
|
children: /* @__PURE__ */ E(x, {
|
|
256
256
|
value: String(g.weeks ?? 12),
|
|
257
257
|
onValueChange: (e) => e && O({ weeks: Number(e) }),
|
|
@@ -263,16 +263,16 @@ function R({ workspace: e, initial: t, onClose: n, onSave: r }) {
|
|
|
263
263
|
52
|
|
264
264
|
].map((e) => ({
|
|
265
265
|
value: String(e),
|
|
266
|
-
label:
|
|
266
|
+
label: c("weeksValue", { count: e })
|
|
267
267
|
}))
|
|
268
268
|
})
|
|
269
269
|
}),
|
|
270
270
|
/* @__PURE__ */ E(v, {
|
|
271
|
-
label:
|
|
271
|
+
label: c("issuesFrom"),
|
|
272
272
|
children: /* @__PURE__ */ E(x, {
|
|
273
273
|
value: g.viewId ?? "",
|
|
274
|
-
onValueChange: (e) =>
|
|
275
|
-
...
|
|
274
|
+
onValueChange: (e) => d({
|
|
275
|
+
...u,
|
|
276
276
|
spec: e ? {
|
|
277
277
|
...g,
|
|
278
278
|
viewId: e
|
|
@@ -280,8 +280,8 @@ function R({ workspace: e, initial: t, onClose: n, onSave: r }) {
|
|
|
280
280
|
}),
|
|
281
281
|
items: [{
|
|
282
282
|
value: "",
|
|
283
|
-
label:
|
|
284
|
-
}, ...
|
|
283
|
+
label: c("filtersBelow")
|
|
284
|
+
}, ...p.map((e) => ({
|
|
285
285
|
value: e.id,
|
|
286
286
|
label: e.name
|
|
287
287
|
}))]
|
|
@@ -291,35 +291,35 @@ function R({ workspace: e, initial: t, onClose: n, onSave: r }) {
|
|
|
291
291
|
className: "grid grid-cols-2 gap-2",
|
|
292
292
|
children: [
|
|
293
293
|
/* @__PURE__ */ E(x, {
|
|
294
|
-
"aria-label":
|
|
294
|
+
"aria-label": c("team"),
|
|
295
295
|
value: S.team ?? "",
|
|
296
296
|
onValueChange: (e) => A({ team: e ?? "" }),
|
|
297
297
|
items: [{
|
|
298
298
|
value: "",
|
|
299
|
-
label:
|
|
300
|
-
}, ...
|
|
299
|
+
label: c("allTeams")
|
|
300
|
+
}, ...f.filter((e) => !e.archivedAt).map((e) => ({
|
|
301
301
|
value: e.key,
|
|
302
302
|
label: e.name
|
|
303
303
|
}))],
|
|
304
304
|
size: "sm"
|
|
305
305
|
}),
|
|
306
306
|
/* @__PURE__ */ E(x, {
|
|
307
|
-
"aria-label":
|
|
307
|
+
"aria-label": c("tab"),
|
|
308
308
|
value: S.view ?? "active",
|
|
309
309
|
onValueChange: (e) => A({ view: e ?? "active" }),
|
|
310
310
|
items: L.map((e) => ({
|
|
311
311
|
value: e,
|
|
312
|
-
label:
|
|
312
|
+
label: c(`tabs.${e}`)
|
|
313
313
|
})),
|
|
314
314
|
size: "sm"
|
|
315
315
|
}),
|
|
316
316
|
/* @__PURE__ */ E(x, {
|
|
317
|
-
"aria-label":
|
|
317
|
+
"aria-label": c("priority"),
|
|
318
318
|
value: S.priority ?? "",
|
|
319
319
|
onValueChange: (e) => A({ priority: e ?? "" }),
|
|
320
320
|
items: [{
|
|
321
321
|
value: "",
|
|
322
|
-
label:
|
|
322
|
+
label: c("anyPriority")
|
|
323
323
|
}, ...[
|
|
324
324
|
"1",
|
|
325
325
|
"2",
|
|
@@ -328,18 +328,18 @@ function R({ workspace: e, initial: t, onClose: n, onSave: r }) {
|
|
|
328
328
|
"0"
|
|
329
329
|
].map((e) => ({
|
|
330
330
|
value: e,
|
|
331
|
-
label:
|
|
331
|
+
label: c(`priorities.${e}`)
|
|
332
332
|
}))],
|
|
333
333
|
size: "sm"
|
|
334
334
|
}),
|
|
335
335
|
/* @__PURE__ */ E(x, {
|
|
336
|
-
"aria-label":
|
|
336
|
+
"aria-label": c("label"),
|
|
337
337
|
value: S.label ?? "",
|
|
338
338
|
onValueChange: (e) => A({ label: e ?? "" }),
|
|
339
339
|
items: [{
|
|
340
340
|
value: "",
|
|
341
|
-
label:
|
|
342
|
-
}, ...
|
|
341
|
+
label: c("anyLabel")
|
|
342
|
+
}, ...m.map((e) => ({
|
|
343
343
|
value: e.id,
|
|
344
344
|
label: e.name
|
|
345
345
|
}))],
|
|
@@ -352,14 +352,14 @@ function R({ workspace: e, initial: t, onClose: n, onSave: r }) {
|
|
|
352
352
|
className: "min-w-0 rounded-md border border-border p-3",
|
|
353
353
|
children: [/* @__PURE__ */ E("p", {
|
|
354
354
|
className: "mb-2 text-xs font-medium text-muted-foreground",
|
|
355
|
-
children:
|
|
356
|
-
}), h ? /* @__PURE__ */ E(
|
|
355
|
+
children: c("preview")
|
|
356
|
+
}), h ? /* @__PURE__ */ E(l, {
|
|
357
357
|
workspace: e,
|
|
358
|
-
panel:
|
|
358
|
+
panel: u,
|
|
359
359
|
data: h
|
|
360
360
|
}) : /* @__PURE__ */ E("p", {
|
|
361
361
|
className: "text-sm text-muted-foreground",
|
|
362
|
-
children:
|
|
362
|
+
children: c("loading")
|
|
363
363
|
})]
|
|
364
364
|
})]
|
|
365
365
|
})
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../api/client.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import { dashboardsQuery as n, teamsQuery as r } from "../../../api/queries.js";
|
|
3
|
+
import { sharingItems as i, sharingOf as a, starterPanels as o } from "../../../components/DashboardPanel.js";
|
|
4
|
+
import { ChartIcon as s } from "../../../components/icons.js";
|
|
5
|
+
import { useFormError as c } from "../../../components/settings.js";
|
|
6
|
+
import { usePageTitle as l } from "../../../lib/pageTitle.js";
|
|
7
|
+
import { Link as u } from "../../../lib/router.js";
|
|
8
|
+
import { Route as d } from "./index.js";
|
|
9
9
|
import { Button as f, Card as p, EmptyState as m, Field as h, Input as g, Modal as _, Select as v } from "@parallelworks/ui";
|
|
10
10
|
import { useNavigate as y } from "@tanstack/react-router";
|
|
11
11
|
import { useState as b } from "react";
|
|
@@ -15,8 +15,8 @@ import { useMutation as T, useQueryClient as E, useSuspenseQuery as D } from "@t
|
|
|
15
15
|
// src/routes/$workspace/dashboards/index.tsx?tsr-split=component
|
|
16
16
|
function O() {
|
|
17
17
|
let e = x("dashboards");
|
|
18
|
-
|
|
19
|
-
let { workspace: t } =
|
|
18
|
+
l(e("title"));
|
|
19
|
+
let { workspace: t } = d.useParams(), { data: i } = D(n(t)), { data: a } = D(r(t)), [o, c] = b(!1), h = (e) => a.find((t) => t.key === e)?.name;
|
|
20
20
|
return /* @__PURE__ */ w("div", {
|
|
21
21
|
className: "w-full space-y-6 px-4 py-6 md:px-8 md:py-8",
|
|
22
22
|
children: [
|
|
@@ -30,24 +30,24 @@ function O() {
|
|
|
30
30
|
children: e("description")
|
|
31
31
|
})] }), /* @__PURE__ */ C(f, {
|
|
32
32
|
variant: "primary",
|
|
33
|
-
onClick: () =>
|
|
33
|
+
onClick: () => c(!0),
|
|
34
34
|
children: e("new")
|
|
35
35
|
})]
|
|
36
36
|
}),
|
|
37
|
-
|
|
38
|
-
icon: /* @__PURE__ */ C(
|
|
37
|
+
i.length === 0 ? /* @__PURE__ */ C(m, {
|
|
38
|
+
icon: /* @__PURE__ */ C(s, {}),
|
|
39
39
|
title: e("noneTitle"),
|
|
40
40
|
description: e("noneDescription"),
|
|
41
41
|
action: /* @__PURE__ */ C(f, {
|
|
42
42
|
variant: "primary",
|
|
43
|
-
onClick: () =>
|
|
43
|
+
onClick: () => c(!0),
|
|
44
44
|
children: e("new")
|
|
45
45
|
})
|
|
46
46
|
}) : /* @__PURE__ */ C("ul", {
|
|
47
47
|
className: "grid gap-3 sm:grid-cols-2 xl:grid-cols-3",
|
|
48
|
-
children:
|
|
48
|
+
children: i.map((n) => /* @__PURE__ */ C("li", { children: /* @__PURE__ */ C(p, {
|
|
49
49
|
padding: "none",
|
|
50
|
-
children: /* @__PURE__ */ w(
|
|
50
|
+
children: /* @__PURE__ */ w(u, {
|
|
51
51
|
to: "/$workspace/dashboards/$dashboardId",
|
|
52
52
|
params: {
|
|
53
53
|
workspace: t,
|
|
@@ -56,7 +56,7 @@ function O() {
|
|
|
56
56
|
className: "block space-y-1 p-4",
|
|
57
57
|
children: [/* @__PURE__ */ w("span", {
|
|
58
58
|
className: "flex items-center gap-2 font-medium",
|
|
59
|
-
children: [/* @__PURE__ */ C(
|
|
59
|
+
children: [/* @__PURE__ */ C(s, { className: "size-4 text-muted-foreground" }), /* @__PURE__ */ C("span", {
|
|
60
60
|
className: "truncate",
|
|
61
61
|
children: n.name
|
|
62
62
|
})]
|
|
@@ -71,29 +71,29 @@ function O() {
|
|
|
71
71
|
})
|
|
72
72
|
}) }, n.id))
|
|
73
73
|
}),
|
|
74
|
-
|
|
74
|
+
o && /* @__PURE__ */ C(k, {
|
|
75
75
|
workspace: t,
|
|
76
|
-
onClose: () =>
|
|
76
|
+
onClose: () => c(!1)
|
|
77
77
|
})
|
|
78
78
|
]
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
|
-
function k({ workspace:
|
|
82
|
-
let
|
|
81
|
+
function k({ workspace: s, onClose: l }) {
|
|
82
|
+
let u = x("dashboards"), d = E(), p = y(), { data: m } = D(r(s)), [O, k] = b(""), [A, j] = b("private"), M = c(), N = T({
|
|
83
83
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/dashboards", {
|
|
84
|
-
params: { path: { workspace:
|
|
84
|
+
params: { path: { workspace: s } },
|
|
85
85
|
body: {
|
|
86
86
|
name: O,
|
|
87
|
-
...
|
|
88
|
-
panels:
|
|
87
|
+
...a(A),
|
|
88
|
+
panels: o(u)
|
|
89
89
|
}
|
|
90
90
|
})),
|
|
91
91
|
onMutate: M.clear,
|
|
92
92
|
onSuccess: (e) => {
|
|
93
|
-
|
|
93
|
+
d.invalidateQueries({ queryKey: n(s).queryKey }), p({
|
|
94
94
|
to: "/$workspace/dashboards/$dashboardId",
|
|
95
95
|
params: {
|
|
96
|
-
workspace:
|
|
96
|
+
workspace: s,
|
|
97
97
|
dashboardId: e.id
|
|
98
98
|
}
|
|
99
99
|
});
|
|
@@ -102,27 +102,27 @@ function k({ workspace: n, onClose: r }) {
|
|
|
102
102
|
});
|
|
103
103
|
return /* @__PURE__ */ C(_, {
|
|
104
104
|
open: !0,
|
|
105
|
-
onClose:
|
|
106
|
-
title:
|
|
105
|
+
onClose: l,
|
|
106
|
+
title: u("new"),
|
|
107
107
|
size: "md",
|
|
108
108
|
onSubmit: (e) => {
|
|
109
109
|
e.preventDefault(), N.mutate();
|
|
110
110
|
},
|
|
111
111
|
footer: /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(f, {
|
|
112
112
|
variant: "ghost",
|
|
113
|
-
onClick:
|
|
114
|
-
children:
|
|
113
|
+
onClick: l,
|
|
114
|
+
children: u("cancel")
|
|
115
115
|
}), /* @__PURE__ */ C(f, {
|
|
116
116
|
type: "submit",
|
|
117
117
|
variant: "primary",
|
|
118
118
|
loading: N.isPending,
|
|
119
|
-
children:
|
|
119
|
+
children: u("create")
|
|
120
120
|
})] }),
|
|
121
121
|
children: /* @__PURE__ */ w("div", {
|
|
122
122
|
className: "space-y-4",
|
|
123
123
|
children: [
|
|
124
124
|
/* @__PURE__ */ C(h, {
|
|
125
|
-
label:
|
|
125
|
+
label: u("name"),
|
|
126
126
|
children: /* @__PURE__ */ C(g, {
|
|
127
127
|
value: O,
|
|
128
128
|
onChange: (e) => k(e.target.value),
|
|
@@ -132,12 +132,12 @@ function k({ workspace: n, onClose: r }) {
|
|
|
132
132
|
})
|
|
133
133
|
}),
|
|
134
134
|
/* @__PURE__ */ C(h, {
|
|
135
|
-
label:
|
|
136
|
-
description:
|
|
135
|
+
label: u("sharing"),
|
|
136
|
+
description: u("startsWith"),
|
|
137
137
|
children: /* @__PURE__ */ C(v, {
|
|
138
138
|
value: A,
|
|
139
139
|
onValueChange: (e) => e && j(e),
|
|
140
|
-
items:
|
|
140
|
+
items: i(u, m)
|
|
141
141
|
})
|
|
142
142
|
}),
|
|
143
143
|
M.error && /* @__PURE__ */ C("p", {
|