@parallelworks/tandem-web 0.141.2 → 0.143.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 +162 -5
- package/_virtual/_virtual_i18n/es/common.js +162 -5
- package/_virtual/_virtual_i18n/ja/common.js +162 -5
- package/_virtual/_virtual_i18n/ko/common.js +162 -5
- package/_virtual/_virtual_i18n/zh/common.js +162 -5
- package/components/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +2 -0
- package/components/CodeHostSettings.js +25 -25
- package/components/CustomFields.js +349 -0
- package/components/DocProperties.js +320 -0
- package/components/DocTable.js +176 -0
- package/components/DocViewBlock.js +104 -0
- package/components/DocsTree.js +16 -6
- package/components/Editor.js +30 -28
- package/components/GitHub.js +22 -22
- package/components/IssueBoard.js +48 -43
- package/components/IssueEvent.js +2 -0
- package/components/IssueFilters.js +210 -122
- package/components/IssueImport.js +1 -1
- package/components/IssueRow.js +96 -79
- package/components/IssueTemplates.js +216 -156
- package/components/IssueTypes.js +318 -0
- package/components/NewIssueDialog.js +254 -216
- package/components/SettingsNav.js +40 -35
- package/components/SlashMenu.js +2 -0
- package/components/TeamForm.js +49 -35
- package/components/TeamRepositories.js +51 -51
- package/components/TeamWorkflow.js +8 -8
- package/components/Updates.js +8 -8
- package/lib/boardMove.js +69 -47
- package/lib/customFields.js +113 -0
- package/lib/docProperties.js +135 -0
- package/lib/issueDisplay.js +27 -12
- package/lib/issueList.js +166 -62
- package/lib/issueTypes.js +50 -0
- package/lib/teamTree.js +24 -0
- package/lib/views.js +13 -11
- package/package.json +1 -1
- package/pages/issues.js +331 -291
- package/routeTree.gen.js +174 -162
- package/routes/_workspace/agents/index2.js +9 -9
- package/routes/_workspace/docs/_doc2.js +147 -140
- package/routes/_workspace/docs/space._space.js +6 -0
- package/routes/_workspace/docs/space2._space.js +256 -0
- package/routes/_workspace/docs2.js +3 -3
- package/routes/_workspace/issues/_identifier2.js +433 -370
- package/routes/_workspace/projects/_projectId3.js +213 -201
- package/routes/_workspace/settings/audit-log3.js +2 -0
- package/routes/_workspace/settings/fields.js +6 -0
- package/routes/_workspace/settings/fields2.js +30 -0
- package/routes/_workspace/settings/fields3.js +5 -0
- package/routes/_workspace/settings/groups2.js +74 -74
- package/routes/_workspace/settings/labels2.js +33 -33
- package/routes/_workspace/settings/members2.js +35 -35
- package/routes/_workspace/settings/roles2.js +24 -24
- package/routes/_workspace/settings/runners2.js +18 -18
- package/routes/_workspace/settings/sessions2.js +9 -9
- package/routes/_workspace/settings/slack2.js +8 -8
- package/routes/_workspace/settings/sso2.js +50 -50
- package/routes/_workspace/settings/tokens2.js +15 -15
- package/routes/_workspace/settings/webhooks2.js +42 -42
- package/routes/_workspace/teams/_key/settings2.js +138 -76
- package/routes/_workspace2.js +321 -319
- package/styles.css +39 -0
|
@@ -1,239 +1,299 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
|
-
import { issueTemplatesQuery as n, labelsQuery as r } from "../api/queries.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
2
|
+
import { issueTemplatesQuery as n, labelsQuery as r, teamsQuery as i } from "../api/queries.js";
|
|
3
|
+
import { useConfirm as a } from "../lib/confirm.js";
|
|
4
|
+
import { customFieldsQuery as o, fieldsFor as s } from "../lib/customFields.js";
|
|
5
|
+
import { issueTypesQuery as c, typesFor as l } from "../lib/issueTypes.js";
|
|
6
|
+
import { AddIcon as u, PriorityIcon as d, usePriorityNames as f } from "./icons.js";
|
|
7
|
+
import { TypeIcon as p } from "./IssueTypes.js";
|
|
8
|
+
import { PropertyField as m } from "./DocProperties.js";
|
|
9
|
+
import { Editor as h } from "./Editor.js";
|
|
10
|
+
import { Button as g, Combobox as _, DatePicker as v, Input as y, Modal as ee, Select as b, SettingsCard as x, menuDivider as S } from "@parallelworks/ui";
|
|
11
|
+
import { useId as C, useState as w } from "react";
|
|
12
|
+
import { useErrorMessage as T } from "@parallelworks/problem/react";
|
|
13
|
+
import { useFormatter as E, useTranslations as D } from "use-intl";
|
|
14
|
+
import { Fragment as te, jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
15
|
+
import { useMutation as A, useQuery as j, useQueryClient as M } from "@tanstack/react-query";
|
|
16
|
+
import { MoreButton as N } from "@parallelworks/ui/list";
|
|
13
17
|
// src/components/IssueTemplates.tsx
|
|
14
|
-
function
|
|
15
|
-
let
|
|
18
|
+
function P({ workspace: r, teamKey: i, isAdmin: o }) {
|
|
19
|
+
let s = D("issueTemplates"), c = E(), l = D("common"), d = M(), { data: f = [] } = j(n(r, i)), [p, m] = w(null), { confirm: h, dialog: _ } = a(), v = A({
|
|
16
20
|
mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/teams/{key}/issue-templates/{templateId}", { params: { path: {
|
|
17
21
|
workspace: r,
|
|
18
|
-
key:
|
|
22
|
+
key: i,
|
|
19
23
|
templateId: n
|
|
20
24
|
} } })),
|
|
21
|
-
onSettled: () =>
|
|
25
|
+
onSettled: () => d.invalidateQueries({ queryKey: n(r, i).queryKey })
|
|
22
26
|
});
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
title:
|
|
25
|
-
description:
|
|
26
|
-
action: o && /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ k(x, {
|
|
28
|
+
title: s("title"),
|
|
29
|
+
description: s("description"),
|
|
30
|
+
action: o && /* @__PURE__ */ O(g, {
|
|
27
31
|
variant: "outline",
|
|
28
32
|
size: "sm",
|
|
29
|
-
icon: /* @__PURE__ */
|
|
30
|
-
onClick: () =>
|
|
31
|
-
children:
|
|
33
|
+
icon: /* @__PURE__ */ O(u, { className: "size-3.5" }),
|
|
34
|
+
onClick: () => m("new"),
|
|
35
|
+
children: s("new")
|
|
32
36
|
}),
|
|
33
37
|
children: [
|
|
34
|
-
|
|
38
|
+
f.length === 0 ? /* @__PURE__ */ O("p", {
|
|
35
39
|
className: "px-4 py-3 text-sm text-muted-foreground",
|
|
36
|
-
children:
|
|
37
|
-
}) : /* @__PURE__ */
|
|
40
|
+
children: s("none")
|
|
41
|
+
}) : /* @__PURE__ */ O("ul", { children: f.map((e) => /* @__PURE__ */ k("li", {
|
|
38
42
|
className: "flex items-center gap-3 border-b border-border/60 px-4 py-2.5 last:border-b-0",
|
|
39
|
-
children: [/* @__PURE__ */
|
|
43
|
+
children: [/* @__PURE__ */ k("span", {
|
|
40
44
|
className: "min-w-0 flex-1",
|
|
41
45
|
children: [
|
|
42
|
-
/* @__PURE__ */
|
|
46
|
+
/* @__PURE__ */ O("span", {
|
|
43
47
|
className: "block truncate text-sm font-medium",
|
|
44
48
|
children: e.name
|
|
45
49
|
}),
|
|
46
|
-
e.title && /* @__PURE__ */
|
|
50
|
+
e.title && /* @__PURE__ */ O("span", {
|
|
47
51
|
className: "block truncate text-xs text-muted-foreground",
|
|
48
52
|
children: e.title
|
|
49
53
|
}),
|
|
50
|
-
e.repeat && e.nextAt && /* @__PURE__ */
|
|
54
|
+
e.repeat && e.nextAt && /* @__PURE__ */ O("span", {
|
|
51
55
|
className: "block truncate text-xs text-muted-foreground",
|
|
52
|
-
children:
|
|
53
|
-
repeat:
|
|
54
|
-
next:
|
|
56
|
+
children: s("schedule", {
|
|
57
|
+
repeat: s(`repeats.${e.repeat}`),
|
|
58
|
+
next: c.dateTime(new Date(e.nextAt), { dateStyle: "medium" })
|
|
55
59
|
})
|
|
56
60
|
})
|
|
57
61
|
]
|
|
58
|
-
}), o && /* @__PURE__ */
|
|
59
|
-
label:
|
|
62
|
+
}), o && /* @__PURE__ */ O(N, {
|
|
63
|
+
label: l("moreActionsFor", { name: e.name }),
|
|
60
64
|
items: () => [
|
|
61
65
|
{
|
|
62
|
-
label:
|
|
63
|
-
onClick: () =>
|
|
66
|
+
label: s("edit"),
|
|
67
|
+
onClick: () => m(e)
|
|
64
68
|
},
|
|
65
|
-
|
|
69
|
+
S,
|
|
66
70
|
{
|
|
67
|
-
label:
|
|
71
|
+
label: l("delete"),
|
|
68
72
|
destructive: !0,
|
|
69
|
-
onClick: () =>
|
|
70
|
-
title:
|
|
71
|
-
description:
|
|
72
|
-
confirmLabel:
|
|
73
|
-
onConfirm: () =>
|
|
73
|
+
onClick: () => h({
|
|
74
|
+
title: s("deleteTitle", { name: e.name }),
|
|
75
|
+
description: s("deleteDescription"),
|
|
76
|
+
confirmLabel: l("delete"),
|
|
77
|
+
onConfirm: () => v.mutateAsync(e.id)
|
|
74
78
|
})
|
|
75
79
|
}
|
|
76
80
|
]
|
|
77
81
|
})]
|
|
78
82
|
}, e.id)) }),
|
|
79
|
-
|
|
83
|
+
p && /* @__PURE__ */ O(F, {
|
|
80
84
|
workspace: r,
|
|
81
|
-
teamKey:
|
|
82
|
-
template:
|
|
83
|
-
onClose: () =>
|
|
85
|
+
teamKey: i,
|
|
86
|
+
template: p === "new" ? void 0 : p,
|
|
87
|
+
onClose: () => m(null)
|
|
84
88
|
}),
|
|
85
|
-
|
|
89
|
+
_
|
|
86
90
|
]
|
|
87
91
|
});
|
|
88
92
|
}
|
|
89
|
-
function
|
|
90
|
-
let
|
|
91
|
-
name:
|
|
92
|
-
title:
|
|
93
|
-
body:
|
|
94
|
-
priority:
|
|
95
|
-
labelIds:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
93
|
+
function F({ workspace: a, teamKey: u, template: x, onClose: S }) {
|
|
94
|
+
let N = D("issueTemplates"), P = E(), F = D("common"), z = T(), B = f(), V = M(), { data: H = [] } = j(r(a)), [U, W] = w({
|
|
95
|
+
name: x?.name ?? "",
|
|
96
|
+
title: x?.title ?? "",
|
|
97
|
+
body: x?.body ?? "",
|
|
98
|
+
priority: x?.priority ?? 0,
|
|
99
|
+
labelIds: x?.labelIds ?? [],
|
|
100
|
+
fields: x?.fields ?? {},
|
|
101
|
+
...x?.typeId && { typeId: x.typeId },
|
|
102
|
+
...x?.repeat && {
|
|
103
|
+
repeat: x.repeat,
|
|
104
|
+
nextAt: x.nextAt,
|
|
105
|
+
timeZone: x.timeZone
|
|
100
106
|
}
|
|
101
|
-
}), [
|
|
107
|
+
}), [ne, re] = w(!1), G = C(), K = C(), q = (e) => W((t) => ({
|
|
102
108
|
...t,
|
|
103
109
|
...e
|
|
104
|
-
})),
|
|
105
|
-
mutationFn: async () => t(
|
|
110
|
+
})), J = A({
|
|
111
|
+
mutationFn: async () => t(x ? await e.PUT("/api/v1/workspaces/{workspace}/teams/{key}/issue-templates/{templateId}", {
|
|
106
112
|
params: { path: {
|
|
107
|
-
workspace:
|
|
108
|
-
key:
|
|
109
|
-
templateId:
|
|
113
|
+
workspace: a,
|
|
114
|
+
key: u,
|
|
115
|
+
templateId: x.id
|
|
110
116
|
} },
|
|
111
|
-
body:
|
|
117
|
+
body: U
|
|
112
118
|
}) : await e.POST("/api/v1/workspaces/{workspace}/teams/{key}/issue-templates", {
|
|
113
119
|
params: { path: {
|
|
114
|
-
workspace:
|
|
115
|
-
key:
|
|
120
|
+
workspace: a,
|
|
121
|
+
key: u
|
|
116
122
|
} },
|
|
117
|
-
body:
|
|
123
|
+
body: U
|
|
118
124
|
})),
|
|
119
125
|
onSuccess: () => {
|
|
120
|
-
|
|
126
|
+
V.invalidateQueries({ queryKey: n(a, u).queryKey }), S();
|
|
121
127
|
}
|
|
122
|
-
}),
|
|
123
|
-
return /* @__PURE__ */
|
|
128
|
+
}), Y = H.filter((e) => U.labelIds?.includes(e.id)), { data: X = [] } = j(i(a)), { data: ie } = j(o(a)), Z = s(ie, "issue", X.find((e) => e.key === u)?.id), ae = D("customFields"), Q = D("issueTypes"), { data: oe } = j(c(a)), $ = l(oe, X.find((e) => e.key === u)?.id);
|
|
129
|
+
return /* @__PURE__ */ O(ee, {
|
|
124
130
|
open: !0,
|
|
125
|
-
onClose:
|
|
131
|
+
onClose: S,
|
|
126
132
|
size: "lg",
|
|
127
|
-
title:
|
|
128
|
-
footer: /* @__PURE__ */
|
|
133
|
+
title: N(x ? "editTitle" : "newTitle"),
|
|
134
|
+
footer: /* @__PURE__ */ k(te, { children: [/* @__PURE__ */ O(g, {
|
|
129
135
|
variant: "secondary",
|
|
130
|
-
onClick:
|
|
131
|
-
children:
|
|
132
|
-
}), /* @__PURE__ */
|
|
136
|
+
onClick: S,
|
|
137
|
+
children: F("cancel")
|
|
138
|
+
}), /* @__PURE__ */ O(g, {
|
|
133
139
|
variant: "primary",
|
|
134
|
-
loading:
|
|
135
|
-
disabled: !
|
|
136
|
-
onClick: () =>
|
|
137
|
-
children:
|
|
140
|
+
loading: J.isPending,
|
|
141
|
+
disabled: !U.name.trim(),
|
|
142
|
+
onClick: () => J.mutate(),
|
|
143
|
+
children: x ? F("save") : N("create")
|
|
138
144
|
})] }),
|
|
139
|
-
children: /* @__PURE__ */
|
|
145
|
+
children: /* @__PURE__ */ k("form", {
|
|
140
146
|
className: "space-y-3",
|
|
141
147
|
onSubmit: (e) => {
|
|
142
|
-
e.preventDefault(),
|
|
148
|
+
e.preventDefault(), J.mutate();
|
|
143
149
|
},
|
|
144
150
|
children: [
|
|
145
|
-
/* @__PURE__ */
|
|
146
|
-
htmlFor:
|
|
151
|
+
/* @__PURE__ */ O("label", {
|
|
152
|
+
htmlFor: G,
|
|
147
153
|
className: "block text-xs font-medium text-muted-foreground",
|
|
148
|
-
children:
|
|
154
|
+
children: N("name")
|
|
149
155
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
id:
|
|
152
|
-
value:
|
|
153
|
-
onChange: (e) =>
|
|
154
|
-
placeholder:
|
|
156
|
+
/* @__PURE__ */ O(y, {
|
|
157
|
+
id: G,
|
|
158
|
+
value: U.name,
|
|
159
|
+
onChange: (e) => q({ name: e.target.value }),
|
|
160
|
+
placeholder: N("namePlaceholder"),
|
|
155
161
|
maxLength: 80,
|
|
156
162
|
className: "-mt-2",
|
|
157
163
|
autoFocus: !0
|
|
158
164
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
htmlFor:
|
|
165
|
+
/* @__PURE__ */ O("label", {
|
|
166
|
+
htmlFor: K,
|
|
161
167
|
className: "block text-xs font-medium text-muted-foreground",
|
|
162
|
-
children:
|
|
168
|
+
children: N("issueTitle")
|
|
163
169
|
}),
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
id:
|
|
166
|
-
value:
|
|
167
|
-
onChange: (e) =>
|
|
168
|
-
placeholder:
|
|
170
|
+
/* @__PURE__ */ O(y, {
|
|
171
|
+
id: K,
|
|
172
|
+
value: U.title ?? "",
|
|
173
|
+
onChange: (e) => q({ title: e.target.value }),
|
|
174
|
+
placeholder: N("issueTitlePlaceholder"),
|
|
169
175
|
maxLength: 200,
|
|
170
176
|
className: "-mt-2"
|
|
171
177
|
}),
|
|
172
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ k("div", {
|
|
173
179
|
className: "text-xs font-medium text-muted-foreground",
|
|
174
|
-
children: [
|
|
180
|
+
children: [N("body"), /* @__PURE__ */ O("div", {
|
|
175
181
|
className: "mt-1 min-h-32 rounded-md border border-border px-3 py-2 text-sm font-normal text-foreground",
|
|
176
|
-
children: /* @__PURE__ */
|
|
177
|
-
value:
|
|
178
|
-
onChange: (e) =>
|
|
179
|
-
label:
|
|
182
|
+
children: /* @__PURE__ */ O(h, {
|
|
183
|
+
value: U.body ?? "",
|
|
184
|
+
onChange: (e) => q({ body: e }),
|
|
185
|
+
label: N("body"),
|
|
180
186
|
className: "min-h-28"
|
|
181
187
|
})
|
|
182
188
|
})]
|
|
183
189
|
}),
|
|
184
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ k("div", {
|
|
185
191
|
className: "flex flex-wrap items-end gap-3",
|
|
186
|
-
children: [/* @__PURE__ */
|
|
192
|
+
children: [/* @__PURE__ */ k("div", {
|
|
187
193
|
className: "text-xs font-medium text-muted-foreground",
|
|
188
|
-
children: [
|
|
194
|
+
children: [N("priority"), /* @__PURE__ */ O("div", {
|
|
189
195
|
className: "mt-1",
|
|
190
|
-
children: /* @__PURE__ */
|
|
191
|
-
value: String(
|
|
192
|
-
items:
|
|
196
|
+
children: /* @__PURE__ */ O(b, {
|
|
197
|
+
value: String(U.priority ?? 0),
|
|
198
|
+
items: B.map((e, t) => ({
|
|
193
199
|
value: String(t),
|
|
194
200
|
label: e,
|
|
195
|
-
icon: /* @__PURE__ */
|
|
201
|
+
icon: /* @__PURE__ */ O(d, { priority: t })
|
|
196
202
|
})),
|
|
197
|
-
onValueChange: (e) => e !== null &&
|
|
198
|
-
"aria-label":
|
|
203
|
+
onValueChange: (e) => e !== null && q({ priority: Number(e) }),
|
|
204
|
+
"aria-label": N("priority")
|
|
199
205
|
})
|
|
200
206
|
})]
|
|
201
|
-
}), /* @__PURE__ */
|
|
207
|
+
}), /* @__PURE__ */ k("div", {
|
|
202
208
|
className: "text-xs font-medium text-muted-foreground",
|
|
203
|
-
children: [
|
|
209
|
+
children: [N("labels"), /* @__PURE__ */ O("div", {
|
|
204
210
|
className: "mt-1",
|
|
205
|
-
children: /* @__PURE__ */
|
|
206
|
-
open:
|
|
207
|
-
onOpenChange:
|
|
211
|
+
children: /* @__PURE__ */ O(_, {
|
|
212
|
+
open: ne,
|
|
213
|
+
onOpenChange: re,
|
|
208
214
|
multiple: !0,
|
|
209
|
-
items:
|
|
215
|
+
items: H.map((e) => ({
|
|
210
216
|
value: e.id,
|
|
211
217
|
label: e.name,
|
|
212
|
-
icon: /* @__PURE__ */
|
|
218
|
+
icon: /* @__PURE__ */ O("span", {
|
|
213
219
|
className: "size-2.5 rounded-full",
|
|
214
220
|
style: { background: e.color }
|
|
215
221
|
})
|
|
216
222
|
})),
|
|
217
|
-
value:
|
|
218
|
-
onValueChange: (e) =>
|
|
219
|
-
placeholder:
|
|
220
|
-
trigger: /* @__PURE__ */
|
|
223
|
+
value: U.labelIds ?? [],
|
|
224
|
+
onValueChange: (e) => q({ labelIds: e }),
|
|
225
|
+
placeholder: N("labels"),
|
|
226
|
+
trigger: /* @__PURE__ */ O(g, {
|
|
221
227
|
type: "button",
|
|
222
228
|
className: "font-normal",
|
|
223
|
-
children:
|
|
229
|
+
children: Y.length ? Y.map((e) => e.name).join(", ") : N("noLabels")
|
|
224
230
|
})
|
|
225
231
|
})
|
|
226
232
|
})]
|
|
227
233
|
})]
|
|
228
234
|
}),
|
|
229
|
-
/* @__PURE__ */
|
|
235
|
+
$.length > 0 && /* @__PURE__ */ k("div", {
|
|
236
|
+
className: "text-xs font-medium text-muted-foreground",
|
|
237
|
+
children: [Q("type"), /* @__PURE__ */ O("div", {
|
|
238
|
+
className: "mt-1 w-56",
|
|
239
|
+
children: /* @__PURE__ */ O(b, {
|
|
240
|
+
value: U.typeId ?? "",
|
|
241
|
+
items: [{
|
|
242
|
+
value: "",
|
|
243
|
+
label: Q("noType")
|
|
244
|
+
}, ...$.map((e) => ({
|
|
245
|
+
value: e.id,
|
|
246
|
+
label: e.name,
|
|
247
|
+
icon: /* @__PURE__ */ O(p, {
|
|
248
|
+
type: e,
|
|
249
|
+
className: "size-3.5"
|
|
250
|
+
})
|
|
251
|
+
}))],
|
|
252
|
+
onValueChange: (e) => {
|
|
253
|
+
let { typeId: t, ...n } = U;
|
|
254
|
+
W(e ? {
|
|
255
|
+
...n,
|
|
256
|
+
typeId: e
|
|
257
|
+
} : n);
|
|
258
|
+
},
|
|
259
|
+
"aria-label": Q("type"),
|
|
260
|
+
width: "fill"
|
|
261
|
+
})
|
|
262
|
+
})]
|
|
263
|
+
}),
|
|
264
|
+
Z.length > 0 && /* @__PURE__ */ k("fieldset", {
|
|
265
|
+
className: "space-y-0.5 text-sm",
|
|
266
|
+
children: [/* @__PURE__ */ O("legend", {
|
|
267
|
+
className: "mb-1 text-xs font-medium text-muted-foreground",
|
|
268
|
+
children: ae("title")
|
|
269
|
+
}), Z.map((e) => /* @__PURE__ */ k("div", {
|
|
270
|
+
className: "flex min-h-8 items-center gap-2",
|
|
271
|
+
children: [/* @__PURE__ */ O("span", {
|
|
272
|
+
className: "w-36 shrink-0 truncate text-muted-foreground",
|
|
273
|
+
children: e.name
|
|
274
|
+
}), /* @__PURE__ */ O("div", {
|
|
275
|
+
className: "min-w-0 flex-1",
|
|
276
|
+
children: /* @__PURE__ */ O(m, {
|
|
277
|
+
workspace: a,
|
|
278
|
+
property: e,
|
|
279
|
+
value: U.fields?.[e.id],
|
|
280
|
+
editable: !0,
|
|
281
|
+
onChange: (t) => q({ fields: {
|
|
282
|
+
...U.fields,
|
|
283
|
+
[e.id]: t
|
|
284
|
+
} })
|
|
285
|
+
})
|
|
286
|
+
})]
|
|
287
|
+
}, e.id))]
|
|
288
|
+
}),
|
|
289
|
+
/* @__PURE__ */ k("div", {
|
|
230
290
|
className: "flex flex-wrap items-end gap-3",
|
|
231
|
-
children: [/* @__PURE__ */
|
|
291
|
+
children: [/* @__PURE__ */ k("div", {
|
|
232
292
|
className: "text-xs font-medium text-muted-foreground",
|
|
233
|
-
children: [
|
|
293
|
+
children: [N("repeat"), /* @__PURE__ */ O("div", {
|
|
234
294
|
className: "mt-1",
|
|
235
|
-
children: /* @__PURE__ */
|
|
236
|
-
value:
|
|
295
|
+
children: /* @__PURE__ */ O(b, {
|
|
296
|
+
value: U.repeat ?? "",
|
|
237
297
|
items: [
|
|
238
298
|
"",
|
|
239
299
|
"daily",
|
|
@@ -241,60 +301,60 @@ function A({ workspace: i, teamKey: s, template: h, onClose: g }) {
|
|
|
241
301
|
"monthly"
|
|
242
302
|
].map((e) => ({
|
|
243
303
|
value: e,
|
|
244
|
-
label:
|
|
304
|
+
label: N(`repeats.${e || "never"}`)
|
|
245
305
|
})),
|
|
246
306
|
onValueChange: (e) => {
|
|
247
|
-
if (!e) return
|
|
248
|
-
|
|
307
|
+
if (!e) return W(({ repeat: e, nextAt: t, timeZone: n, ...r }) => r);
|
|
308
|
+
q({
|
|
249
309
|
repeat: e,
|
|
250
|
-
nextAt:
|
|
251
|
-
timeZone:
|
|
310
|
+
nextAt: U.nextAt ?? R(new Date(Date.now() + 864e5)),
|
|
311
|
+
timeZone: U.timeZone ?? I()
|
|
252
312
|
});
|
|
253
313
|
},
|
|
254
|
-
"aria-label":
|
|
314
|
+
"aria-label": N("repeat")
|
|
255
315
|
})
|
|
256
316
|
})]
|
|
257
|
-
}),
|
|
317
|
+
}), U.repeat && /* @__PURE__ */ k("div", {
|
|
258
318
|
className: "text-xs font-medium text-muted-foreground",
|
|
259
|
-
children: [
|
|
319
|
+
children: [N("firstOn"), /* @__PURE__ */ O("div", {
|
|
260
320
|
className: "mt-1",
|
|
261
|
-
children: /* @__PURE__ */
|
|
262
|
-
value:
|
|
263
|
-
onValueChange: (e) => e &&
|
|
264
|
-
nextAt:
|
|
265
|
-
timeZone:
|
|
321
|
+
children: /* @__PURE__ */ O(v, {
|
|
322
|
+
value: U.nextAt ? L(U.nextAt) : "",
|
|
323
|
+
onValueChange: (e) => e && q({
|
|
324
|
+
nextAt: R(/* @__PURE__ */ new Date(`${e}T00:00`)),
|
|
325
|
+
timeZone: I()
|
|
266
326
|
}),
|
|
267
|
-
"aria-label":
|
|
268
|
-
trigger: /* @__PURE__ */
|
|
327
|
+
"aria-label": N("firstOn"),
|
|
328
|
+
trigger: /* @__PURE__ */ O(g, {
|
|
269
329
|
type: "button",
|
|
270
330
|
className: "font-normal",
|
|
271
|
-
children:
|
|
331
|
+
children: U.nextAt ? P.dateTime(new Date(U.nextAt), { dateStyle: "medium" }) : ""
|
|
272
332
|
})
|
|
273
333
|
})
|
|
274
334
|
})]
|
|
275
335
|
})]
|
|
276
336
|
}),
|
|
277
|
-
|
|
337
|
+
U.repeat && /* @__PURE__ */ O("p", {
|
|
278
338
|
className: "text-xs text-muted-foreground",
|
|
279
|
-
children:
|
|
339
|
+
children: N("repeatHelp")
|
|
280
340
|
}),
|
|
281
|
-
|
|
341
|
+
J.error && /* @__PURE__ */ O("p", {
|
|
282
342
|
className: "text-sm text-danger",
|
|
283
|
-
children:
|
|
343
|
+
children: z(J.error)
|
|
284
344
|
})
|
|
285
345
|
]
|
|
286
346
|
})
|
|
287
347
|
});
|
|
288
348
|
}
|
|
289
|
-
function
|
|
349
|
+
function I() {
|
|
290
350
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
291
351
|
}
|
|
292
|
-
function
|
|
352
|
+
function L(e) {
|
|
293
353
|
let t = new Date(e), n = (e) => String(e).padStart(2, "0");
|
|
294
354
|
return `${t.getFullYear()}-${n(t.getMonth() + 1)}-${n(t.getDate())}`;
|
|
295
355
|
}
|
|
296
|
-
function
|
|
356
|
+
function R(e) {
|
|
297
357
|
let t = new Date(e);
|
|
298
358
|
return t.setHours(9, 0, 0, 0), t.toISOString();
|
|
299
359
|
}
|
|
300
|
-
export {
|
|
360
|
+
export { P as IssueTemplates };
|