@parallelworks/tandem-web 0.171.0 → 0.171.2
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 +1 -0
- package/_virtual/_virtual_i18n/es/common.js +1 -0
- package/_virtual/_virtual_i18n/ja/common.js +1 -0
- package/_virtual/_virtual_i18n/ko/common.js +1 -0
- package/_virtual/_virtual_i18n/zh/common.js +1 -0
- package/components/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +57 -57
- package/components/ActorAvatar.js +4 -4
- 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 +29 -29
- package/components/BlockHandle.js +3 -3
- package/components/BugRotation.js +8 -8
- package/components/CodeHostSettings.js +38 -38
- 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 +23 -23
- 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 +12 -12
- package/components/IssueFilters.js +103 -99
- 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 +4 -4
- 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 +4 -4
- 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/assigneeOrder.js +6 -0
- package/lib/assignees.js +24 -20
- 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/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 +109 -109
- 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 +477 -477
- package/routes/_workspace/issues/index.js +13 -13
- package/routes/_workspace/knowledge/_term2.js +175 -175
- package/routes/_workspace/knowledge/_term3.js +4 -4
- package/routes/_workspace/knowledge/index.js +12 -12
- package/routes/_workspace/knowledge/index2.js +117 -117
- 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,7 +1,7 @@
|
|
|
1
1
|
import { gitlabQuery as e } from "../../../api/queries.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { SettingsPage as t } from "../../../components/settings.js";
|
|
3
|
+
import { externalUrl as n } from "../../../lib/externalUrl.js";
|
|
4
|
+
import { useCan as r } from "../../../lib/roles.js";
|
|
5
5
|
import { Route as i } from "./gitlab.js";
|
|
6
6
|
import { SettingsCard as a, StatusLabel as o, buttonClasses as s } from "@parallelworks/ui";
|
|
7
7
|
import { useFormatter as c, useTranslations as l } from "use-intl";
|
|
@@ -10,8 +10,8 @@ import { useSuspenseQuery as f } from "@tanstack/react-query";
|
|
|
10
10
|
import { GitLabIcon as p } from "@parallelworks/ui/brand-icons";
|
|
11
11
|
// src/routes/$workspace/settings/gitlab.tsx?tsr-split=component
|
|
12
12
|
function m() {
|
|
13
|
-
let { workspace: m } = i.useParams(), { data: h } = f(e(m)), g =
|
|
14
|
-
return /* @__PURE__ */ u(
|
|
13
|
+
let { workspace: m } = i.useParams(), { data: h } = f(e(m)), g = r(m, "manage_workspace"), _ = l("settingsNav"), v = l("gitlab"), y = c(), b = h.settingsUrl ? n(h.settingsUrl) : void 0;
|
|
14
|
+
return /* @__PURE__ */ u(t, {
|
|
15
15
|
title: _("gitlab"),
|
|
16
16
|
description: v("pageDescription"),
|
|
17
17
|
children: h.enabled ? /* @__PURE__ */ u(a, {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../api/client.js";
|
|
2
2
|
import { groupsQuery as n, meQuery as r } from "../../../api/queries.js";
|
|
3
3
|
import { AddIcon as i, UsersIcon as a } from "../../../components/icons.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { AdminOnly as o, SettingsPage as s, useFormError as c } from "../../../components/settings.js";
|
|
5
|
+
import { useConfirm as l } from "../../../lib/confirm.js";
|
|
6
|
+
import { usePeople as u } from "../../../lib/people.js";
|
|
7
|
+
import { useCan as d } from "../../../lib/roles.js";
|
|
8
8
|
import { Route as f } from "./groups.js";
|
|
9
9
|
import { Avatar as p, AvatarGroup as m, Button as h, Combobox as g, ErrorText as _, Input as v, Modal as y, ModalTitle as b, PageHeaderAddButton as x, Table as S, useOpenMenu as C } from "@parallelworks/ui";
|
|
10
10
|
import { useMemo as w, useState as T } from "react";
|
|
11
11
|
import { useTranslations as E } from "use-intl";
|
|
12
12
|
import { jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
13
13
|
import { useMutation as k, useQueryClient as A, useSuspenseQuery as j } from "@tanstack/react-query";
|
|
14
|
-
import { ListCellText as M, ListColumns as
|
|
14
|
+
import { ListCellText as M, ListColumns as ee, ListPage as te, ListRow as ne, ListToolbar as N, NameCell as P, listTableProps as F, useCopySubmenu as I, useListNavigate as L, useListSearch as R, useListView as z } from "@parallelworks/ui/list";
|
|
15
15
|
// src/routes/$workspace/settings/groups.tsx?tsr-split=component
|
|
16
16
|
function B() {
|
|
17
|
-
let { workspace: e } = f.useParams(), { data: t } = j(r), n =
|
|
17
|
+
let { workspace: e } = f.useParams(), { data: t } = j(r), n = d(e, "manage_members"), i = t?.mode === "platform";
|
|
18
18
|
return /* @__PURE__ */ D(H, {
|
|
19
19
|
workspace: e,
|
|
20
20
|
isAdmin: n && !i,
|
|
@@ -22,7 +22,7 @@ function B() {
|
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
function V(r) {
|
|
25
|
-
let i = A(), a =
|
|
25
|
+
let i = A(), a = c(), o = () => i.invalidateQueries({ queryKey: n(r).queryKey });
|
|
26
26
|
return {
|
|
27
27
|
create: k({
|
|
28
28
|
mutationFn: async (n) => t(await e.POST("/api/v1/workspaces/{workspace}/groups", {
|
|
@@ -72,33 +72,33 @@ function V(r) {
|
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
74
|
function H({ workspace: e, isAdmin: t, managed: r }) {
|
|
75
|
-
let { data: i } = j(n(e)),
|
|
75
|
+
let { data: i } = j(n(e)), c = E("settings"), d = E("common"), { person: f } = u(e), h = V(e), g = R(), v = C(), y = L(), b = I(), { confirm: k, dialog: A } = l(), [B, H] = T(null), [G, K] = T(!1), q = h.setMembers.isError ? h.setMembers.variables?.group : h.rename.isError ? h.rename.variables?.group.slug : void 0, J = w(() => [
|
|
76
76
|
{
|
|
77
77
|
key: "name",
|
|
78
|
-
label:
|
|
78
|
+
label: c("groupColName"),
|
|
79
79
|
headerClassName: "py-2 @[36rem]:w-[45%]",
|
|
80
80
|
alwaysVisible: !0
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
key: "members",
|
|
84
|
-
label:
|
|
84
|
+
label: c("members"),
|
|
85
85
|
headerClassName: "py-2"
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
key: "slug",
|
|
89
|
-
label:
|
|
89
|
+
label: c("groupColSlug"),
|
|
90
90
|
headerClassName: "py-2",
|
|
91
91
|
defaultHidden: !0
|
|
92
92
|
}
|
|
93
|
-
], [
|
|
93
|
+
], [c]), re = w(() => [{
|
|
94
94
|
value: "name",
|
|
95
|
-
label:
|
|
95
|
+
label: c("groupColName"),
|
|
96
96
|
compare: (e, t) => e.name.localeCompare(t.name)
|
|
97
97
|
}, {
|
|
98
98
|
value: "members",
|
|
99
|
-
label:
|
|
99
|
+
label: c("members"),
|
|
100
100
|
compare: (e, t) => e.usernames.length - t.usernames.length
|
|
101
|
-
}], [
|
|
101
|
+
}], [c]), Y = z({
|
|
102
102
|
storageKey: `tandem-groups-${e}`,
|
|
103
103
|
defaultShowColumnHeaders: !1,
|
|
104
104
|
columns: J,
|
|
@@ -110,70 +110,70 @@ function H({ workspace: e, isAdmin: t, managed: r }) {
|
|
|
110
110
|
e.slug,
|
|
111
111
|
...e.usernames.map((e) => f(e).name)
|
|
112
112
|
].some((e) => e.toLowerCase().includes(X))), ie = Y.applyOrder(Z), Q = (e) => k({
|
|
113
|
-
title:
|
|
114
|
-
description:
|
|
113
|
+
title: c("deleteGroupTitle"),
|
|
114
|
+
description: c("deleteGroupDescription", { name: e.name }),
|
|
115
115
|
confirmLabel: d("delete"),
|
|
116
116
|
onConfirm: () => h.remove.mutateAsync(e.slug)
|
|
117
117
|
}), ae = (e) => [
|
|
118
118
|
{
|
|
119
|
-
label:
|
|
119
|
+
label: c(t ? "editGroup" : "viewGroup"),
|
|
120
120
|
onClick: () => H(e.slug)
|
|
121
121
|
},
|
|
122
122
|
b({
|
|
123
123
|
name: e.name,
|
|
124
124
|
extra: [{
|
|
125
|
-
label:
|
|
125
|
+
label: c("groupColSlug"),
|
|
126
126
|
value: e.slug
|
|
127
127
|
}]
|
|
128
128
|
}),
|
|
129
129
|
...t && !r ? [{ divider: !0 }, {
|
|
130
|
-
label:
|
|
130
|
+
label: c("deleteGroup"),
|
|
131
131
|
destructive: !0,
|
|
132
132
|
onClick: () => Q(e)
|
|
133
133
|
}] : []
|
|
134
134
|
], $ = i.find((e) => e.slug === B);
|
|
135
|
-
return /* @__PURE__ */ O(
|
|
135
|
+
return /* @__PURE__ */ O(s, {
|
|
136
136
|
wide: !0,
|
|
137
|
-
title:
|
|
138
|
-
description:
|
|
137
|
+
title: c("groups"),
|
|
138
|
+
description: c(r ? "groupsManaged" : "groupsDescription"),
|
|
139
139
|
actions: t && !r && /* @__PURE__ */ D(x, {
|
|
140
|
-
label:
|
|
140
|
+
label: c("newGroup"),
|
|
141
141
|
word: "create",
|
|
142
142
|
onClick: () => K(!0)
|
|
143
143
|
}),
|
|
144
|
-
toolbar: i.length > 0 && /* @__PURE__ */ D(
|
|
144
|
+
toolbar: i.length > 0 && /* @__PURE__ */ D(N, {
|
|
145
145
|
view: Y,
|
|
146
146
|
search: g,
|
|
147
|
-
searchLabel:
|
|
148
|
-
searchPlaceholder:
|
|
147
|
+
searchLabel: c("groupSearch"),
|
|
148
|
+
searchPlaceholder: c("groupSearch")
|
|
149
149
|
}),
|
|
150
150
|
children: [
|
|
151
151
|
/* @__PURE__ */ D("div", {
|
|
152
152
|
className: "px-4",
|
|
153
|
-
children: /* @__PURE__ */ D(
|
|
153
|
+
children: /* @__PURE__ */ D(o, {
|
|
154
154
|
workspace: e,
|
|
155
155
|
permission: "manage_members"
|
|
156
156
|
})
|
|
157
157
|
}),
|
|
158
158
|
/* @__PURE__ */ D("div", {
|
|
159
159
|
className: "border-t border-border",
|
|
160
|
-
children: /* @__PURE__ */ D(
|
|
160
|
+
children: /* @__PURE__ */ D(te, {
|
|
161
161
|
view: Y,
|
|
162
162
|
total: i.length,
|
|
163
163
|
matches: Z.length,
|
|
164
164
|
count: {
|
|
165
165
|
filterActive: X !== "",
|
|
166
|
-
noun:
|
|
167
|
-
nounPlural:
|
|
166
|
+
noun: c("groupNoun"),
|
|
167
|
+
nounPlural: c("groupNounPlural")
|
|
168
168
|
},
|
|
169
169
|
empty: {
|
|
170
170
|
icon: /* @__PURE__ */ D(a, {}),
|
|
171
|
-
title:
|
|
171
|
+
title: c("noGroups")
|
|
172
172
|
},
|
|
173
|
-
noMatches:
|
|
173
|
+
noMatches: c("groupNoMatches"),
|
|
174
174
|
children: /* @__PURE__ */ O(S, {
|
|
175
175
|
...F,
|
|
176
|
-
children: [/* @__PURE__ */ D(
|
|
176
|
+
children: [/* @__PURE__ */ D(ee, { view: Y }), ie.map((e) => /* @__PURE__ */ O(ne, {
|
|
177
177
|
href: null,
|
|
178
178
|
onActivate: () => H(e.slug),
|
|
179
179
|
items: ae(e),
|
|
@@ -193,7 +193,7 @@ function H({ workspace: e, isAdmin: t, managed: r }) {
|
|
|
193
193
|
}),
|
|
194
194
|
Y.isVisible("members") && /* @__PURE__ */ D(S.Item, {
|
|
195
195
|
className: "py-2.5",
|
|
196
|
-
children: e.usernames.length === 0 ? /* @__PURE__ */ D(M, { children:
|
|
196
|
+
children: e.usernames.length === 0 ? /* @__PURE__ */ D(M, { children: c("noMembers") }) : /* @__PURE__ */ O("span", {
|
|
197
197
|
className: "flex items-center gap-2",
|
|
198
198
|
children: [/* @__PURE__ */ D(m, {
|
|
199
199
|
size: "sm",
|
|
@@ -209,7 +209,7 @@ function H({ workspace: e, isAdmin: t, managed: r }) {
|
|
|
209
209
|
})
|
|
210
210
|
}), /* @__PURE__ */ D(M, {
|
|
211
211
|
className: "tabular-nums",
|
|
212
|
-
children:
|
|
212
|
+
children: c("groupMemberCount", { count: e.usernames.length })
|
|
213
213
|
})]
|
|
214
214
|
})
|
|
215
215
|
}),
|
|
@@ -296,14 +296,14 @@ function U({ actions: e, onCreated: t, onClose: n }) {
|
|
|
296
296
|
})
|
|
297
297
|
});
|
|
298
298
|
}
|
|
299
|
-
function W({ workspace: e, group: t, isAdmin: n, managed: r, actions:
|
|
300
|
-
let
|
|
299
|
+
function W({ workspace: e, group: t, isAdmin: n, managed: r, actions: o, onDelete: s, onClose: c }) {
|
|
300
|
+
let l = E("settings"), d = E("common"), { members: f, person: m } = u(e), [x, S] = T(t.name), [C, w] = T(t.slug), k = n && !r, A = x.trim() !== t.name || C !== t.slug, j = (e) => o.setMembers.mutate({
|
|
301
301
|
group: t.slug,
|
|
302
302
|
usernames: e
|
|
303
303
|
});
|
|
304
304
|
return /* @__PURE__ */ O(y, {
|
|
305
305
|
open: !0,
|
|
306
|
-
onClose:
|
|
306
|
+
onClose: c,
|
|
307
307
|
className: "w-full max-w-lg p-5",
|
|
308
308
|
children: [
|
|
309
309
|
/* @__PURE__ */ O(b, {
|
|
@@ -313,7 +313,7 @@ function W({ workspace: e, group: t, isAdmin: n, managed: r, actions: s, onDelet
|
|
|
313
313
|
k && /* @__PURE__ */ O("form", {
|
|
314
314
|
className: "mt-4 flex flex-wrap items-end gap-2",
|
|
315
315
|
onSubmit: (e) => {
|
|
316
|
-
e.preventDefault(),
|
|
316
|
+
e.preventDefault(), o.rename.mutate({
|
|
317
317
|
group: t,
|
|
318
318
|
name: x.trim(),
|
|
319
319
|
slug: C
|
|
@@ -322,7 +322,7 @@ function W({ workspace: e, group: t, isAdmin: n, managed: r, actions: s, onDelet
|
|
|
322
322
|
children: [
|
|
323
323
|
/* @__PURE__ */ O("label", {
|
|
324
324
|
className: "min-w-0 flex-1 text-xs text-muted-foreground",
|
|
325
|
-
children: [
|
|
325
|
+
children: [l("groupName"), /* @__PURE__ */ D(v, {
|
|
326
326
|
required: !0,
|
|
327
327
|
value: x,
|
|
328
328
|
onChange: (e) => S(e.target.value),
|
|
@@ -331,7 +331,7 @@ function W({ workspace: e, group: t, isAdmin: n, managed: r, actions: s, onDelet
|
|
|
331
331
|
}),
|
|
332
332
|
/* @__PURE__ */ O("label", {
|
|
333
333
|
className: "w-40 text-xs text-muted-foreground",
|
|
334
|
-
children: [
|
|
334
|
+
children: [l("groupSlug"), /* @__PURE__ */ D(v, {
|
|
335
335
|
required: !0,
|
|
336
336
|
value: C,
|
|
337
337
|
onChange: (e) => w(e.target.value.toLowerCase()),
|
|
@@ -345,7 +345,7 @@ function W({ workspace: e, group: t, isAdmin: n, managed: r, actions: s, onDelet
|
|
|
345
345
|
type: "submit",
|
|
346
346
|
variant: "primary",
|
|
347
347
|
disabled: !A,
|
|
348
|
-
loading:
|
|
348
|
+
loading: o.rename.isPending,
|
|
349
349
|
children: d("save")
|
|
350
350
|
})
|
|
351
351
|
]
|
|
@@ -354,7 +354,7 @@ function W({ workspace: e, group: t, isAdmin: n, managed: r, actions: s, onDelet
|
|
|
354
354
|
className: "mt-5 flex items-center",
|
|
355
355
|
children: [/* @__PURE__ */ D("h3", {
|
|
356
356
|
className: "text-sm font-medium",
|
|
357
|
-
children:
|
|
357
|
+
children: l("members")
|
|
358
358
|
}), n && /* @__PURE__ */ D("div", {
|
|
359
359
|
className: "ml-auto",
|
|
360
360
|
children: /* @__PURE__ */ D(g, {
|
|
@@ -372,11 +372,11 @@ function W({ workspace: e, group: t, isAdmin: n, managed: r, actions: s, onDelet
|
|
|
372
372
|
value: t.usernames,
|
|
373
373
|
onValueChange: j,
|
|
374
374
|
align: "end",
|
|
375
|
-
placeholder:
|
|
375
|
+
placeholder: l("addOrRemovePeople"),
|
|
376
376
|
trigger: /* @__PURE__ */ O(h, {
|
|
377
377
|
type: "button",
|
|
378
378
|
size: "sm",
|
|
379
|
-
children: [/* @__PURE__ */ D(i, { className: "size-3.5" }),
|
|
379
|
+
children: [/* @__PURE__ */ D(i, { className: "size-3.5" }), l("addPeople")]
|
|
380
380
|
})
|
|
381
381
|
})
|
|
382
382
|
})]
|
|
@@ -385,7 +385,7 @@ function W({ workspace: e, group: t, isAdmin: n, managed: r, actions: s, onDelet
|
|
|
385
385
|
className: "mt-2 max-h-72 divide-y divide-border overflow-y-auto rounded-md border border-border",
|
|
386
386
|
children: [t.usernames.length === 0 && /* @__PURE__ */ D("li", {
|
|
387
387
|
className: "px-3 py-2 text-sm text-muted-foreground",
|
|
388
|
-
children:
|
|
388
|
+
children: l("noMembers")
|
|
389
389
|
}), t.usernames.map((e) => {
|
|
390
390
|
let r = m(e);
|
|
391
391
|
return /* @__PURE__ */ O("li", {
|
|
@@ -412,7 +412,7 @@ function W({ workspace: e, group: t, isAdmin: n, managed: r, actions: s, onDelet
|
|
|
412
412
|
type: "button",
|
|
413
413
|
onClick: () => j(t.usernames.filter((t) => t !== e)),
|
|
414
414
|
className: "text-xs text-muted-foreground hover:text-danger",
|
|
415
|
-
children:
|
|
415
|
+
children: l("removeFromGroup")
|
|
416
416
|
})
|
|
417
417
|
]
|
|
418
418
|
}, e);
|
|
@@ -421,18 +421,18 @@ function W({ workspace: e, group: t, isAdmin: n, managed: r, actions: s, onDelet
|
|
|
421
421
|
/* @__PURE__ */ D(_, {
|
|
422
422
|
size: "md",
|
|
423
423
|
className: "mt-3",
|
|
424
|
-
children:
|
|
424
|
+
children: o.err.error
|
|
425
425
|
}),
|
|
426
426
|
/* @__PURE__ */ O("div", {
|
|
427
427
|
className: "mt-5 flex items-center gap-2",
|
|
428
428
|
children: [k && /* @__PURE__ */ D("button", {
|
|
429
429
|
type: "button",
|
|
430
|
-
onClick:
|
|
430
|
+
onClick: s,
|
|
431
431
|
className: "text-sm text-danger hover:underline",
|
|
432
|
-
children:
|
|
432
|
+
children: l("deleteGroup")
|
|
433
433
|
}), /* @__PURE__ */ D(h, {
|
|
434
434
|
type: "button",
|
|
435
|
-
onClick:
|
|
435
|
+
onClick: c,
|
|
436
436
|
className: "ml-auto",
|
|
437
437
|
children: d("close")
|
|
438
438
|
})]
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../api/client.js";
|
|
2
2
|
import { jiraImportQuery as n, linearImportQuery as r, teamsQuery as i } from "../../../api/queries.js";
|
|
3
3
|
import { MigrationIcon as a } from "../../../components/icons.js";
|
|
4
|
-
import {
|
|
5
|
-
import { useConfirm as
|
|
6
|
-
import {
|
|
4
|
+
import { AdminOnly as o, SettingsPage as s, useFormError as c } from "../../../components/settings.js";
|
|
5
|
+
import { useConfirm as l } from "../../../lib/confirm.js";
|
|
6
|
+
import { useCan as u } from "../../../lib/roles.js";
|
|
7
7
|
import { Route as d } from "./import.js";
|
|
8
8
|
import { Button as f, Checkbox as p, Disclosure as m, ErrorText as h, Field as g, Input as _, ProgressBar as v, SegmentedControl as y, Select as b, SettingsCard as x, StatusLabel as S, Tabs as C } from "@parallelworks/ui";
|
|
9
9
|
import { useState as w } from "react";
|
|
@@ -12,12 +12,12 @@ import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
|
12
12
|
import { useMutation as A, useQueryClient as j, useSuspenseQuery as M } from "@tanstack/react-query";
|
|
13
13
|
// src/routes/$workspace/settings/import.tsx?tsr-split=component
|
|
14
14
|
function N() {
|
|
15
|
-
let { workspace: e } = d.useParams(), { data: t } = M(r(e)), { data: i } = M(n(e)), a =
|
|
16
|
-
return /* @__PURE__ */ k(
|
|
17
|
-
title:
|
|
18
|
-
description: p === "jira" ? f("pageDescription") :
|
|
15
|
+
let { workspace: e } = d.useParams(), { data: t } = M(r(e)), { data: i } = M(n(e)), a = u(e, "manage_workspace"), c = E("settingsNav"), l = E("linearImport"), f = E("jiraImport"), [p, m] = w(() => i.import && !t.import ? "jira" : "linear"), h = p === "jira" ? i : t, g = h.import?.status === "running";
|
|
16
|
+
return /* @__PURE__ */ k(s, {
|
|
17
|
+
title: c("import"),
|
|
18
|
+
description: p === "jira" ? f("pageDescription") : l("pageDescription"),
|
|
19
19
|
children: [
|
|
20
|
-
/* @__PURE__ */ O(
|
|
20
|
+
/* @__PURE__ */ O(o, { workspace: e }),
|
|
21
21
|
/* @__PURE__ */ O(C, {
|
|
22
22
|
label: f("from"),
|
|
23
23
|
variant: "line",
|
|
@@ -48,7 +48,7 @@ function N() {
|
|
|
48
48
|
className: "space-y-2 text-sm",
|
|
49
49
|
children: [/* @__PURE__ */ O("h2", {
|
|
50
50
|
className: "font-medium",
|
|
51
|
-
children:
|
|
51
|
+
children: l("howTitle")
|
|
52
52
|
}), p === "jira" ? /* @__PURE__ */ k("ul", {
|
|
53
53
|
className: "list-disc space-y-1.5 pl-5 text-muted-foreground",
|
|
54
54
|
children: [
|
|
@@ -61,17 +61,17 @@ function N() {
|
|
|
61
61
|
}) : /* @__PURE__ */ k("ul", {
|
|
62
62
|
className: "list-disc space-y-1.5 pl-5 text-muted-foreground",
|
|
63
63
|
children: [
|
|
64
|
-
/* @__PURE__ */ O("li", { children:
|
|
65
|
-
/* @__PURE__ */ O("li", { children:
|
|
66
|
-
/* @__PURE__ */ O("li", { children:
|
|
67
|
-
/* @__PURE__ */ O("li", { children:
|
|
64
|
+
/* @__PURE__ */ O("li", { children: l("howIssues") }),
|
|
65
|
+
/* @__PURE__ */ O("li", { children: l("howWorkflow") }),
|
|
66
|
+
/* @__PURE__ */ O("li", { children: l("howProjects") }),
|
|
67
|
+
/* @__PURE__ */ O("li", { children: l("howPeople") })
|
|
68
68
|
]
|
|
69
69
|
})]
|
|
70
70
|
})
|
|
71
71
|
]
|
|
72
72
|
}) : /* @__PURE__ */ O(x, { children: /* @__PURE__ */ O("p", {
|
|
73
73
|
className: "px-3 py-2 text-sm text-muted-foreground",
|
|
74
|
-
children:
|
|
74
|
+
children: l("notConfigured")
|
|
75
75
|
}) })
|
|
76
76
|
]
|
|
77
77
|
});
|
|
@@ -82,13 +82,13 @@ var P = {
|
|
|
82
82
|
failed: "error",
|
|
83
83
|
canceled: "muted"
|
|
84
84
|
};
|
|
85
|
-
function F({ workspace: i, source:
|
|
86
|
-
let d = E("linearImport"), p = T(), g =
|
|
87
|
-
mutationFn: async () => t(
|
|
85
|
+
function F({ workspace: i, source: o, im: s }) {
|
|
86
|
+
let d = E("linearImport"), p = T(), g = u(i, "manage_workspace"), _ = j(), y = c(), { confirm: b, dialog: C } = l(), w = A({
|
|
87
|
+
mutationFn: async () => t(o === "jira" ? await e.POST("/api/v1/workspaces/{workspace}/jira/import/cancel", { params: { path: { workspace: i } } }) : await e.POST("/api/v1/workspaces/{workspace}/linear/import/cancel", { params: { path: { workspace: i } } })),
|
|
88
88
|
onMutate: y.clear,
|
|
89
|
-
onSuccess: () => _.invalidateQueries({ queryKey: (
|
|
89
|
+
onSuccess: () => _.invalidateQueries({ queryKey: (o === "jira" ? n : r)(i).queryKey }),
|
|
90
90
|
onError: y.set
|
|
91
|
-
}), D =
|
|
91
|
+
}), D = s.status === "running";
|
|
92
92
|
return /* @__PURE__ */ k(x, { children: [C, /* @__PURE__ */ k("div", {
|
|
93
93
|
className: "space-y-3 px-3 py-3",
|
|
94
94
|
children: [
|
|
@@ -100,19 +100,19 @@ function F({ workspace: i, source: c, im: l }) {
|
|
|
100
100
|
className: "min-w-0 flex-1",
|
|
101
101
|
children: [/* @__PURE__ */ O("p", {
|
|
102
102
|
className: "text-sm font-medium",
|
|
103
|
-
children: d("lastImport", { organization:
|
|
103
|
+
children: d("lastImport", { organization: s.organization })
|
|
104
104
|
}), /* @__PURE__ */ O("p", {
|
|
105
105
|
className: "text-xs text-muted-foreground",
|
|
106
|
-
children: d("startedAt", { date: p.dateTime(new Date(
|
|
106
|
+
children: d("startedAt", { date: p.dateTime(new Date(s.startedAt), {
|
|
107
107
|
dateStyle: "medium",
|
|
108
108
|
timeStyle: "short"
|
|
109
109
|
}) })
|
|
110
110
|
})]
|
|
111
111
|
}),
|
|
112
112
|
/* @__PURE__ */ O(S, {
|
|
113
|
-
variant: P[
|
|
113
|
+
variant: P[s.status],
|
|
114
114
|
pulse: D,
|
|
115
|
-
children: d(`status.${
|
|
115
|
+
children: d(`status.${s.status}`)
|
|
116
116
|
}),
|
|
117
117
|
g && D && /* @__PURE__ */ O(f, {
|
|
118
118
|
type: "button",
|
|
@@ -130,17 +130,17 @@ function F({ workspace: i, source: c, im: l }) {
|
|
|
130
130
|
]
|
|
131
131
|
}),
|
|
132
132
|
/* @__PURE__ */ O(v, {
|
|
133
|
-
value:
|
|
134
|
-
max:
|
|
133
|
+
value: s.total > 0 ? Math.min(s.processed, s.total) : D ? null : 1,
|
|
134
|
+
max: s.total > 0 ? s.total : 1,
|
|
135
135
|
label: d("issuesLabel"),
|
|
136
136
|
valueText: () => d("progress", {
|
|
137
|
-
processed:
|
|
138
|
-
total:
|
|
137
|
+
processed: s.processed,
|
|
138
|
+
total: s.total
|
|
139
139
|
})
|
|
140
140
|
}),
|
|
141
141
|
/* @__PURE__ */ O("ul", {
|
|
142
142
|
className: "space-y-1 text-sm",
|
|
143
|
-
children:
|
|
143
|
+
children: s.teams.map((e) => /* @__PURE__ */ O("li", {
|
|
144
144
|
className: "text-muted-foreground",
|
|
145
145
|
children: d("teamRow", {
|
|
146
146
|
source: `${e.sourceName} (${e.sourceKey})`,
|
|
@@ -148,15 +148,15 @@ function F({ workspace: i, source: c, im: l }) {
|
|
|
148
148
|
})
|
|
149
149
|
}, e.sourceKey))
|
|
150
150
|
}),
|
|
151
|
-
|
|
151
|
+
s.error && /* @__PURE__ */ O("p", {
|
|
152
152
|
className: `text-sm ${D ? "text-muted-foreground" : "text-danger"}`,
|
|
153
|
-
children: d(D ? "retrying" : "stopped", { error:
|
|
153
|
+
children: d(D ? "retrying" : "stopped", { error: s.error })
|
|
154
154
|
}),
|
|
155
|
-
|
|
156
|
-
summary: d("skipped", { count:
|
|
155
|
+
s.skipped > 0 && /* @__PURE__ */ O(m, {
|
|
156
|
+
summary: d("skipped", { count: s.skipped }),
|
|
157
157
|
children: /* @__PURE__ */ O("ul", {
|
|
158
158
|
className: "space-y-1 pt-2 text-sm",
|
|
159
|
-
children:
|
|
159
|
+
children: s.skips.map((e, t) => /* @__PURE__ */ k("li", { children: [
|
|
160
160
|
/* @__PURE__ */ O("span", {
|
|
161
161
|
className: "font-medium",
|
|
162
162
|
children: e.item
|
|
@@ -178,10 +178,10 @@ function F({ workspace: i, source: c, im: l }) {
|
|
|
178
178
|
}
|
|
179
179
|
var I = "__new__";
|
|
180
180
|
function L({ workspace: n, again: a }) {
|
|
181
|
-
let o = E("linearImport"), s = j(), { data:
|
|
181
|
+
let o = E("linearImport"), s = j(), { data: l } = M(i(n)), [u, d] = w(""), [m, v] = w(null), [y, S] = w({}), C = c(), T = l.filter((e) => !e.archivedAt), N = A({
|
|
182
182
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/linear/teams", {
|
|
183
183
|
params: { path: { workspace: n } },
|
|
184
|
-
body: { apiKey:
|
|
184
|
+
body: { apiKey: u }
|
|
185
185
|
})),
|
|
186
186
|
onMutate: C.clear,
|
|
187
187
|
onSuccess: (e) => {
|
|
@@ -201,7 +201,7 @@ function L({ workspace: n, again: a }) {
|
|
|
201
201
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/linear/import", {
|
|
202
202
|
params: { path: { workspace: n } },
|
|
203
203
|
body: {
|
|
204
|
-
apiKey:
|
|
204
|
+
apiKey: u,
|
|
205
205
|
updateExistingOnly: !0,
|
|
206
206
|
teams: Object.entries(y).filter(([, e]) => e.on).map(([e, t]) => ({
|
|
207
207
|
...t.target === I ? {
|
|
@@ -248,7 +248,7 @@ function L({ workspace: n, again: a }) {
|
|
|
248
248
|
type: "password",
|
|
249
249
|
autoComplete: "off",
|
|
250
250
|
required: !0,
|
|
251
|
-
value:
|
|
251
|
+
value: u,
|
|
252
252
|
onChange: (e) => {
|
|
253
253
|
d(e.target.value), v(null);
|
|
254
254
|
},
|
|
@@ -374,7 +374,7 @@ function L({ workspace: n, again: a }) {
|
|
|
374
374
|
}) });
|
|
375
375
|
}
|
|
376
376
|
function R({ workspace: r, again: a }) {
|
|
377
|
-
let o = E("linearImport"), s = E("jiraImport"),
|
|
377
|
+
let o = E("linearImport"), s = E("jiraImport"), l = j(), { data: u } = M(i(r)), [d, m] = w(!0), [v, S] = w(""), [C, T] = w(""), [N, P] = w(""), [F, L] = w(null), [R, z] = w({}), B = c(), V = u.filter((e) => !e.archivedAt), H = d ? {
|
|
378
378
|
url: v,
|
|
379
379
|
cloud: d,
|
|
380
380
|
email: C,
|
|
@@ -418,7 +418,7 @@ function R({ workspace: r, again: a }) {
|
|
|
418
418
|
})),
|
|
419
419
|
onMutate: B.clear,
|
|
420
420
|
onSuccess: () => {
|
|
421
|
-
P(""), L(null),
|
|
421
|
+
P(""), L(null), l.invalidateQueries({ queryKey: n(r).queryKey }), l.invalidateQueries({ queryKey: i(r).queryKey });
|
|
422
422
|
},
|
|
423
423
|
onError: B.set
|
|
424
424
|
}), K = Object.values(R).filter((e) => e.on).length, q = (e, t) => z((n) => ({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../api/client.js";
|
|
2
2
|
import { meQuery as n, workspaceQuery as r } from "../../../api/queries.js";
|
|
3
|
-
import {
|
|
3
|
+
import { IconUpload as i } from "../../../components/IconUpload.js";
|
|
4
4
|
import { AdminOnly as a, SettingsPage as o, useFormError as s } from "../../../components/settings.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { useCan as c } from "../../../lib/roles.js";
|
|
6
|
+
import { Route as l } from "./index.js";
|
|
7
7
|
import { Button as u, Input as d, SettingRow as f, SettingsCard as p } from "@parallelworks/ui";
|
|
8
8
|
import { useState as m } from "react";
|
|
9
9
|
import { useTranslations as h } from "use-intl";
|
|
@@ -11,7 +11,7 @@ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
|
11
11
|
import { useMutation as v, useQueryClient as y, useSuspenseQuery as b } from "@tanstack/react-query";
|
|
12
12
|
// src/routes/$workspace/settings/index.tsx?tsr-split=component
|
|
13
13
|
function x() {
|
|
14
|
-
let { workspace: x } =
|
|
14
|
+
let { workspace: x } = l.useParams(), { data: S } = b(r(x)), C = c(x, "manage_workspace"), w = y(), [T, E] = m(S.name), D = h("settings"), O = h("settingsNav"), k = h("common"), A = s(), j = v({
|
|
15
15
|
mutationFn: async (n) => t(await e.PATCH("/api/v1/workspaces/{workspace}", {
|
|
16
16
|
params: { path: { workspace: x } },
|
|
17
17
|
body: n
|
|
@@ -29,7 +29,7 @@ function x() {
|
|
|
29
29
|
label: D("workspaceIcon"),
|
|
30
30
|
helpText: D("workspaceIconDescription"),
|
|
31
31
|
error: M,
|
|
32
|
-
children: /* @__PURE__ */ g(
|
|
32
|
+
children: /* @__PURE__ */ g(i, {
|
|
33
33
|
workspace: x,
|
|
34
34
|
icon: S.icon,
|
|
35
35
|
name: S.name,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../api/client.js";
|
|
2
2
|
import { intercomQuery as n, teamsQuery as r } from "../../../api/queries.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { ConnectionCard as i } from "../../../components/ConnectionCard.js";
|
|
4
|
+
import { CommentIcon as a } from "../../../components/icons.js";
|
|
5
|
+
import { AdminOnly as o, SettingsPage as s, useFormError as c } from "../../../components/settings.js";
|
|
6
|
+
import { usePeople as l } from "../../../lib/people.js";
|
|
7
|
+
import { useCan as u } from "../../../lib/roles.js";
|
|
8
|
+
import { Route as d } from "./intercom.js";
|
|
9
9
|
import { SettingRow as f, SettingsCard as p, StatusLabel as m, Switch as h, buttonClasses as g } from "@parallelworks/ui";
|
|
10
10
|
import { useFormatter as _, useTranslations as v } from "use-intl";
|
|
11
11
|
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
12
12
|
import { useMutation as S, useQueryClient as C, useSuspenseQuery as w } from "@tanstack/react-query";
|
|
13
13
|
// src/routes/$workspace/settings/intercom.tsx?tsr-split=component
|
|
14
14
|
function T() {
|
|
15
|
-
let { workspace: T } =
|
|
15
|
+
let { workspace: T } = d.useParams(), { data: E } = w(n(T)), { data: D } = w(r(T)), O = u(T, "manage_workspace"), k = v("settingsNav"), A = v("intercom"), j = _(), { person: M } = l(T), N = C(), P = c(), F = S({
|
|
16
16
|
mutationFn: async ({ teamId: n, on: r }) => t(await e.PUT("/api/v1/workspaces/{workspace}/intercom/teams/{teamId}", {
|
|
17
17
|
params: { path: {
|
|
18
18
|
workspace: T,
|
|
@@ -24,18 +24,18 @@ function T() {
|
|
|
24
24
|
onSuccess: () => N.invalidateQueries({ queryKey: n(T).queryKey }),
|
|
25
25
|
onError: P.set
|
|
26
26
|
}), I = new Set(E.teams.filter((e) => e.reopen).map((e) => e.teamId));
|
|
27
|
-
return /* @__PURE__ */ x(
|
|
27
|
+
return /* @__PURE__ */ x(s, {
|
|
28
28
|
title: k("intercom"),
|
|
29
29
|
description: A("pageDescription"),
|
|
30
|
-
children: [/* @__PURE__ */ b(
|
|
30
|
+
children: [/* @__PURE__ */ b(o, { workspace: T }), E.enabled ? /* @__PURE__ */ x("div", {
|
|
31
31
|
className: "space-y-6",
|
|
32
32
|
children: [
|
|
33
33
|
/* @__PURE__ */ b("p", {
|
|
34
34
|
className: "text-sm text-muted-foreground",
|
|
35
35
|
children: A("managedByHost")
|
|
36
36
|
}),
|
|
37
|
-
/* @__PURE__ */ b(
|
|
38
|
-
icon: /* @__PURE__ */ b(
|
|
37
|
+
/* @__PURE__ */ b(i, {
|
|
38
|
+
icon: /* @__PURE__ */ b(a, { className: "size-6" }),
|
|
39
39
|
name: k("intercom"),
|
|
40
40
|
status: E.connected ? A("connectedTo", {
|
|
41
41
|
account: E.name || E.appId || "",
|