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