@parallelworks/tandem-web 0.153.0 → 0.154.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 +29 -0
- package/_virtual/_virtual_i18n/es/common.js +29 -0
- package/_virtual/_virtual_i18n/ja/common.js +29 -0
- package/_virtual/_virtual_i18n/ko/common.js +29 -0
- package/_virtual/_virtual_i18n/zh/common.js +29 -0
- package/api/queries.js +97 -75
- package/components/ConnectionCard.js +10 -11
- package/components/IssueZendesk.js +68 -0
- package/components/SettingsNav.js +41 -36
- package/package.json +1 -1
- package/routeTree.gen.js +189 -183
- package/routes/_workspace/issues/_identifier2.js +264 -259
- package/routes/_workspace/settings/zendesk.js +6 -0
- package/routes/_workspace/settings/zendesk2.js +97 -0
- package/routes/_workspace/settings/zendesk3.js +4 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { issueZendeskQuery as e } from "../api/queries.js";
|
|
2
|
+
import { externalUrl as t } from "../lib/externalUrl.js";
|
|
3
|
+
import { InboxIcon as n } from "./icons.js";
|
|
4
|
+
import { Card as r } from "@parallelworks/ui";
|
|
5
|
+
import { useTranslations as i } from "use-intl";
|
|
6
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
+
import { useQuery as s } from "@tanstack/react-query";
|
|
8
|
+
// src/components/IssueZendesk.tsx
|
|
9
|
+
var c = [
|
|
10
|
+
"new",
|
|
11
|
+
"open",
|
|
12
|
+
"pending",
|
|
13
|
+
"hold",
|
|
14
|
+
"solved",
|
|
15
|
+
"closed"
|
|
16
|
+
], l = (e) => c.includes(e);
|
|
17
|
+
function u({ workspace: c, identifier: u }) {
|
|
18
|
+
let d = i("zendesk"), { data: f } = s(e(c, u));
|
|
19
|
+
return !f?.enabled || f.links.length === 0 ? null : /* @__PURE__ */ o("section", {
|
|
20
|
+
className: "mt-6",
|
|
21
|
+
"aria-label": d("issueSection"),
|
|
22
|
+
children: [/* @__PURE__ */ o("h2", {
|
|
23
|
+
className: "text-xs font-medium text-muted-foreground",
|
|
24
|
+
children: [d("issueSection"), /* @__PURE__ */ a("span", {
|
|
25
|
+
className: "ml-1.5",
|
|
26
|
+
children: f.links.length
|
|
27
|
+
})]
|
|
28
|
+
}), /* @__PURE__ */ a(r, {
|
|
29
|
+
size: "fill",
|
|
30
|
+
padding: "none",
|
|
31
|
+
divided: !0,
|
|
32
|
+
interactive: !1,
|
|
33
|
+
render: /* @__PURE__ */ a("ul", {}),
|
|
34
|
+
className: "mt-1",
|
|
35
|
+
children: f.links.map((e) => /* @__PURE__ */ a("li", {
|
|
36
|
+
className: "hover:bg-muted",
|
|
37
|
+
children: /* @__PURE__ */ o("a", {
|
|
38
|
+
href: t(e.url),
|
|
39
|
+
target: "_blank",
|
|
40
|
+
rel: "noopener noreferrer",
|
|
41
|
+
className: "flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1 px-3 py-2 text-sm",
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ a(n, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
44
|
+
/* @__PURE__ */ o("span", {
|
|
45
|
+
className: "shrink-0 text-muted-foreground",
|
|
46
|
+
children: ["#", e.id]
|
|
47
|
+
}),
|
|
48
|
+
/* @__PURE__ */ a("span", {
|
|
49
|
+
className: "min-w-0 flex-1 truncate",
|
|
50
|
+
children: e.subject
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ o("span", {
|
|
53
|
+
className: "flex w-full flex-wrap items-center gap-x-3 pl-7 text-xs text-muted-foreground sm:w-auto sm:pl-0",
|
|
54
|
+
children: [(e.organization || e.requester) && /* @__PURE__ */ a("span", { children: e.organization && e.requester ? d("requesterAt", {
|
|
55
|
+
requester: e.requester,
|
|
56
|
+
organization: e.organization
|
|
57
|
+
}) : e.organization || e.requester }), /* @__PURE__ */ a("span", {
|
|
58
|
+
className: e.status === "solved" || e.status === "closed" ? "text-success" : "",
|
|
59
|
+
children: d(`status.${l(e.status) ? e.status : "open"}`)
|
|
60
|
+
})]
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
})
|
|
64
|
+
}, e.id))
|
|
65
|
+
})]
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
export { u as IssueZendesk };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { usePathname as e } from "../lib/router.js";
|
|
2
2
|
import { githubAccountQuery as t, meQuery as n } from "../api/queries.js";
|
|
3
|
-
import { ChevronDownIcon as r, CloudIcon as i, CommentIcon as a, FolderIcon as o, HistoryIcon as s,
|
|
4
|
-
import { useTranslations as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { useQuery as
|
|
7
|
-
import { AppFrameNavGroup as
|
|
3
|
+
import { ChevronDownIcon as r, CloudIcon as i, CommentIcon as a, FolderIcon as o, HistoryIcon as s, InboxIcon as c, KeyIcon as l, LinkIcon as u, ListViewIcon as d, MigrationIcon as f, NotificationIcon as p, RepositoryIcon as m, SettingsIcon as h, ShieldIcon as g, TagIcon as _, UserIcon as v, UsersIcon as y, WebhookIcon as b, WorkerIcon as x } from "./icons.js";
|
|
4
|
+
import { useTranslations as S } from "use-intl";
|
|
5
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
6
|
+
import { useQuery as E, useSuspenseQuery as D } from "@tanstack/react-query";
|
|
7
|
+
import { AppFrameNavGroup as O, AppFrameNavItem as k } from "@parallelworks/ui/app-frame";
|
|
8
8
|
// src/components/SettingsNav.tsx
|
|
9
|
-
function
|
|
10
|
-
let { data: e } =
|
|
9
|
+
function A() {
|
|
10
|
+
let { data: e } = D(n), r = S("settingsNav"), C = e?.mode === "platform", { data: w } = E(t);
|
|
11
11
|
return [
|
|
12
12
|
{
|
|
13
13
|
label: r("account"),
|
|
@@ -15,31 +15,31 @@ function k() {
|
|
|
15
15
|
{
|
|
16
16
|
to: "/$workspace/settings/account",
|
|
17
17
|
label: r("profile"),
|
|
18
|
-
Icon:
|
|
18
|
+
Icon: v
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
to: "/$workspace/settings/notifications",
|
|
22
22
|
label: r("notifications"),
|
|
23
|
-
Icon:
|
|
23
|
+
Icon: p
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
to: "/$workspace/settings/runners",
|
|
27
27
|
label: r("runners"),
|
|
28
|
-
Icon:
|
|
28
|
+
Icon: x
|
|
29
29
|
},
|
|
30
|
-
...
|
|
30
|
+
...w?.enabled ? [{
|
|
31
31
|
to: "/$workspace/settings/connections",
|
|
32
32
|
label: r("connections"),
|
|
33
|
-
Icon:
|
|
33
|
+
Icon: u
|
|
34
34
|
}] : [],
|
|
35
|
-
...
|
|
35
|
+
...C ? [] : [{
|
|
36
36
|
to: "/$workspace/settings/tokens",
|
|
37
37
|
label: r("tokens"),
|
|
38
|
-
Icon:
|
|
38
|
+
Icon: l
|
|
39
39
|
}, {
|
|
40
40
|
to: "/$workspace/settings/sessions",
|
|
41
41
|
label: r("sessions"),
|
|
42
|
-
Icon:
|
|
42
|
+
Icon: g
|
|
43
43
|
}]
|
|
44
44
|
]
|
|
45
45
|
},
|
|
@@ -49,22 +49,22 @@ function k() {
|
|
|
49
49
|
{
|
|
50
50
|
to: "/$workspace/settings",
|
|
51
51
|
label: r("general"),
|
|
52
|
-
Icon:
|
|
52
|
+
Icon: h
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
to: "/$workspace/settings/members",
|
|
56
|
-
label: r(
|
|
57
|
-
Icon:
|
|
56
|
+
label: r(C ? "access" : "members"),
|
|
57
|
+
Icon: y
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
to: "/$workspace/settings/roles",
|
|
61
61
|
label: r("roles"),
|
|
62
|
-
Icon:
|
|
62
|
+
Icon: g
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
to: "/$workspace/settings/groups",
|
|
66
66
|
label: r("groups"),
|
|
67
|
-
Icon:
|
|
67
|
+
Icon: g
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
to: "/$workspace/settings/teams",
|
|
@@ -74,22 +74,22 @@ function k() {
|
|
|
74
74
|
{
|
|
75
75
|
to: "/$workspace/settings/labels",
|
|
76
76
|
label: r("labels"),
|
|
77
|
-
Icon:
|
|
77
|
+
Icon: _
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
to: "/$workspace/settings/fields",
|
|
81
81
|
label: r("fields"),
|
|
82
|
-
Icon:
|
|
82
|
+
Icon: d
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
85
|
to: "/$workspace/settings/audit-log",
|
|
86
86
|
label: r("auditLog"),
|
|
87
87
|
Icon: s
|
|
88
88
|
},
|
|
89
|
-
...
|
|
89
|
+
...C ? [] : [{
|
|
90
90
|
to: "/$workspace/settings/sso",
|
|
91
91
|
label: r("sso"),
|
|
92
|
-
Icon:
|
|
92
|
+
Icon: l
|
|
93
93
|
}]
|
|
94
94
|
]
|
|
95
95
|
},
|
|
@@ -99,17 +99,22 @@ function k() {
|
|
|
99
99
|
{
|
|
100
100
|
to: "/$workspace/settings/github",
|
|
101
101
|
label: r("github"),
|
|
102
|
-
Icon:
|
|
102
|
+
Icon: m
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
to: "/$workspace/settings/slack",
|
|
106
106
|
label: r("slack"),
|
|
107
107
|
Icon: a
|
|
108
108
|
},
|
|
109
|
+
{
|
|
110
|
+
to: "/$workspace/settings/zendesk",
|
|
111
|
+
label: r("zendesk"),
|
|
112
|
+
Icon: c
|
|
113
|
+
},
|
|
109
114
|
{
|
|
110
115
|
to: "/$workspace/settings/webhooks",
|
|
111
116
|
label: r("webhooks"),
|
|
112
|
-
Icon:
|
|
117
|
+
Icon: b
|
|
113
118
|
},
|
|
114
119
|
{
|
|
115
120
|
to: "/$workspace/settings/parallelworks",
|
|
@@ -119,30 +124,30 @@ function k() {
|
|
|
119
124
|
{
|
|
120
125
|
to: "/$workspace/settings/import",
|
|
121
126
|
label: r("import"),
|
|
122
|
-
Icon:
|
|
127
|
+
Icon: f
|
|
123
128
|
}
|
|
124
129
|
]
|
|
125
130
|
}
|
|
126
131
|
];
|
|
127
132
|
}
|
|
128
|
-
function
|
|
129
|
-
let n =
|
|
130
|
-
return /* @__PURE__ */
|
|
133
|
+
function j({ workspace: t }) {
|
|
134
|
+
let n = S("settingsNav"), i = A(), a = e();
|
|
135
|
+
return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(k, {
|
|
131
136
|
label: n("label"),
|
|
132
|
-
icon: /* @__PURE__ */
|
|
137
|
+
icon: /* @__PURE__ */ w(r, { className: "size-4 rotate-90" }),
|
|
133
138
|
href: `/${t}/issues`,
|
|
134
139
|
className: "font-semibold"
|
|
135
|
-
}), /* @__PURE__ */
|
|
140
|
+
}), /* @__PURE__ */ w("nav", {
|
|
136
141
|
"aria-label": n("label"),
|
|
137
142
|
className: "-mx-3 mt-2 min-h-0 flex-1 overflow-y-auto px-3",
|
|
138
|
-
children: i.map((e) => /* @__PURE__ */
|
|
143
|
+
children: i.map((e) => /* @__PURE__ */ w(O, {
|
|
139
144
|
label: e.label,
|
|
140
145
|
collapsible: !1,
|
|
141
146
|
children: e.items.map(({ to: e, label: n, Icon: r }) => {
|
|
142
147
|
let i = e.replace("$workspace", t);
|
|
143
|
-
return /* @__PURE__ */
|
|
148
|
+
return /* @__PURE__ */ w(k, {
|
|
144
149
|
label: n,
|
|
145
|
-
icon: /* @__PURE__ */
|
|
150
|
+
icon: /* @__PURE__ */ w(r, { className: "size-4" }),
|
|
146
151
|
href: i,
|
|
147
152
|
selected: a === i
|
|
148
153
|
}, e);
|
|
@@ -150,4 +155,4 @@ function A({ workspace: t }) {
|
|
|
150
155
|
}, e.label))
|
|
151
156
|
})] });
|
|
152
157
|
}
|
|
153
|
-
export {
|
|
158
|
+
export { j as SettingsNav, A as useSettingsPages };
|