@parallelworks/tandem-web 0.171.1 → 0.171.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/_virtual/_virtual_i18n/en/common.js +5 -2
  2. package/_virtual/_virtual_i18n/es/common.js +5 -2
  3. package/_virtual/_virtual_i18n/ja/common.js +5 -2
  4. package/_virtual/_virtual_i18n/ko/common.js +5 -2
  5. package/_virtual/_virtual_i18n/zh/common.js +5 -2
  6. package/components/AccessGrants.js +6 -6
  7. package/components/ActivityTimeline.js +60 -60
  8. package/components/ActorAvatar.js +4 -4
  9. package/components/ActorLink.js +34 -0
  10. package/components/AgentWork.js +494 -494
  11. package/components/AppLauncher.js +7 -7
  12. package/components/AreaLink.js +13 -13
  13. package/components/AreaTiles.js +13 -13
  14. package/components/AreaWork.js +22 -22
  15. package/components/Attachments.js +73 -69
  16. package/components/BlockHandle.js +3 -3
  17. package/components/BugRotation.js +8 -8
  18. package/components/CodeHostSettings.js +121 -87
  19. package/components/CollabEditor.js +13 -13
  20. package/components/CommandPalette.js +206 -206
  21. package/components/CustomFields.js +95 -95
  22. package/components/CustomerRequests.js +11 -11
  23. package/components/DashboardPanel.js +201 -164
  24. package/components/DateChip.js +21 -21
  25. package/components/DocHistory.js +14 -14
  26. package/components/DocIcon.js +4 -4
  27. package/components/DocIconPicker.js +4 -4
  28. package/components/DocLinkPicker.js +22 -22
  29. package/components/DocLook.js +16 -16
  30. package/components/DocProperties.js +81 -81
  31. package/components/DocTable.js +53 -53
  32. package/components/DocsTree.js +179 -179
  33. package/components/Editor.js +69 -69
  34. package/components/FavoritesNav.js +78 -78
  35. package/components/GitHub.js +87 -87
  36. package/components/Graph.js +14 -14
  37. package/components/HostActions.js +21 -21
  38. package/components/HostPanel.js +6 -6
  39. package/components/HoverCards.js +74 -74
  40. package/components/IssueBoard.js +13 -10
  41. package/components/IssueBreakdown.js +31 -31
  42. package/components/IssueCode.js +19 -19
  43. package/components/IssueEvent.js +97 -92
  44. package/components/IssueFilters.js +39 -39
  45. package/components/IssueGroup.js +16 -16
  46. package/components/IssueImport.js +13 -13
  47. package/components/IssueInsights.js +20 -20
  48. package/components/IssueListBlock.js +81 -81
  49. package/components/IssueRelations.js +34 -34
  50. package/components/IssueRow.js +31 -31
  51. package/components/IssueSentry.js +36 -34
  52. package/components/IssueTemplates.js +23 -23
  53. package/components/IssueTypes.js +40 -40
  54. package/components/MarkdownTransfer.js +10 -10
  55. package/components/MentionPicker.js +19 -19
  56. package/components/NewIssueDialog.js +53 -53
  57. package/components/NewProjectDialog.js +82 -82
  58. package/components/PersonActivity.js +13 -13
  59. package/components/PersonHoverCard.js +44 -44
  60. package/components/Planning.js +16 -16
  61. package/components/Reports.js +8 -8
  62. package/components/SettingsNav.js +15 -15
  63. package/components/ShareDialog.js +8 -8
  64. package/components/SharedViewer.js +23 -23
  65. package/components/SlashMenu.js +26 -26
  66. package/components/SubPages.js +10 -10
  67. package/components/TeamForm.js +9 -9
  68. package/components/TeamRepositories.js +21 -21
  69. package/components/TeamWorkflow.js +6 -6
  70. package/components/UnlinkedMentions.js +29 -29
  71. package/components/Updates.js +8 -8
  72. package/components/Widgets.js +99 -97
  73. package/components/WorkCounts.js +12 -12
  74. package/components/cycleCrumb.js +8 -8
  75. package/components/editorPlugins.js +101 -101
  76. package/components/settings.js +6 -6
  77. package/components/video.js +7 -7
  78. package/hostedApp.js +24 -24
  79. package/index.js +18 -18
  80. package/lib/assignees.js +3 -3
  81. package/lib/attachments.js +12 -12
  82. package/lib/boardMove.js +27 -27
  83. package/lib/collab.js +1 -1
  84. package/lib/docs.js +115 -115
  85. package/lib/githubLink.js +7 -7
  86. package/lib/issueList.js +51 -51
  87. package/lib/issueMenu.js +117 -117
  88. package/lib/knowledge.js +134 -134
  89. package/lib/live.js +38 -38
  90. package/lib/notifications.js +47 -47
  91. package/lib/triageSeen.js +2 -2
  92. package/lib/views.js +31 -31
  93. package/package.json +24 -24
  94. package/pages/area.js +64 -64
  95. package/pages/areas.js +199 -199
  96. package/pages/decisions.js +51 -51
  97. package/pages/issues.js +120 -120
  98. package/pages/projects.js +238 -238
  99. package/pages/triage.js +202 -212
  100. package/routes/_workspace/agents/_slug2.js +127 -127
  101. package/routes/_workspace/agents/index2.js +22 -22
  102. package/routes/_workspace/dashboards/_dashboardId2.js +84 -84
  103. package/routes/_workspace/dashboards/index2.js +34 -34
  104. package/routes/_workspace/docs/_doc2.js +267 -267
  105. package/routes/_workspace/docs/space2._space.js +31 -31
  106. package/routes/_workspace/docs2.js +4 -4
  107. package/routes/_workspace/graph2.js +11 -11
  108. package/routes/_workspace/graph3.js +11 -11
  109. package/routes/_workspace/issues/_identifier2.js +519 -522
  110. package/routes/_workspace/issues/index.js +13 -13
  111. package/routes/_workspace/knowledge/_term2.js +148 -146
  112. package/routes/_workspace/knowledge/_term3.js +4 -4
  113. package/routes/_workspace/knowledge/index.js +12 -12
  114. package/routes/_workspace/knowledge/index2.js +117 -115
  115. package/routes/_workspace/measures2.js +8 -8
  116. package/routes/_workspace/measures3.js +29 -29
  117. package/routes/_workspace/notifications2.js +263 -263
  118. package/routes/_workspace/people/_username.js +10 -10
  119. package/routes/_workspace/people/_username2.js +41 -41
  120. package/routes/_workspace/projects/_projectId3.js +303 -303
  121. package/routes/_workspace/projects/_projectId4.js +4 -4
  122. package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +28 -28
  123. package/routes/_workspace/projects/_projectId_4.milestones._milestoneId.js +4 -4
  124. package/routes/_workspace/projects/index.js +8 -8
  125. package/routes/_workspace/settings/account2.js +8 -8
  126. package/routes/_workspace/settings/audit-log2.js +8 -8
  127. package/routes/_workspace/settings/audit-log3.js +155 -155
  128. package/routes/_workspace/settings/connections2.js +4 -4
  129. package/routes/_workspace/settings/fields2.js +5 -5
  130. package/routes/_workspace/settings/github2.js +11 -11
  131. package/routes/_workspace/settings/gitlab2.js +5 -5
  132. package/routes/_workspace/settings/groups2.js +52 -52
  133. package/routes/_workspace/settings/import2.js +39 -39
  134. package/routes/_workspace/settings/index2.js +5 -5
  135. package/routes/_workspace/settings/intercom2.js +11 -11
  136. package/routes/_workspace/settings/labels2.js +33 -33
  137. package/routes/_workspace/settings/members2.js +81 -81
  138. package/routes/_workspace/settings/notifications2.js +46 -46
  139. package/routes/_workspace/settings/parallelworks2.js +20 -20
  140. package/routes/_workspace/settings/roles2.js +41 -41
  141. package/routes/_workspace/settings/runners2.js +15 -15
  142. package/routes/_workspace/settings/sentry2.js +15 -15
  143. package/routes/_workspace/settings/sessions2.js +9 -9
  144. package/routes/_workspace/settings/sessions3.js +4 -4
  145. package/routes/_workspace/settings/slack2.js +12 -12
  146. package/routes/_workspace/settings/sso2.js +37 -37
  147. package/routes/_workspace/settings/sso3.js +7 -7
  148. package/routes/_workspace/settings/teams2.js +29 -29
  149. package/routes/_workspace/settings/tokens2.js +32 -32
  150. package/routes/_workspace/settings/tokens3.js +4 -4
  151. package/routes/_workspace/settings/webhooks2.js +41 -41
  152. package/routes/_workspace/settings/zendesk2.js +11 -11
  153. package/routes/_workspace/teams/_key/cycles/_number2.js +33 -33
  154. package/routes/_workspace/teams/_key/cycles/_number3.js +7 -7
  155. package/routes/_workspace/teams/_key/cycles/index2.js +37 -37
  156. package/routes/_workspace/teams/_key/issues.js +10 -10
  157. package/routes/_workspace/teams/_key/projects.js +6 -6
  158. package/routes/_workspace/teams/_key/settings2.js +396 -396
  159. package/routes/_workspace2.js +308 -308
  160. package/routes/_workspace3.js +8 -8
  161. package/routes/device2.js +4 -4
  162. package/routes/device3.js +4 -4
  163. package/routes/docs/_tag/_endpoint2.js +3 -3
  164. package/routes/docs/_tag/index2.js +3 -3
  165. package/routes/docs/route2.js +7 -7
  166. package/routes/index2.js +5 -5
  167. package/routes/login2.js +10 -10
  168. package/routes/new2.js +12 -12
  169. package/routes/new3.js +5 -5
  170. package/routes/request2._token.js +6 -6
  171. package/routes/share2._secret.js +4 -4
@@ -1,20 +1,20 @@
1
- import { Link as e } from "../lib/router.js";
2
- import { PriorityIcon as t, ProjectIcon as n, StatusIcon as r, UsersIcon as i } from "./icons.js";
3
- import { usePeople as a } from "../lib/people.js";
4
- import { useTime as o } from "../lib/time.js";
5
- import { DueDate as s, SlaBadge as c, estimateShort as l } from "./Planning.js";
6
- import { hasValue as u } from "../lib/customFields.js";
7
- import { TypeIcon as d } from "./IssueTypes.js";
8
- import { actorAvatar as f } from "../lib/avatar.js";
9
- import { useFieldText as p } from "./CustomFields.js";
10
- import { PersonHoverCard as m } from "./PersonHoverCard.js";
1
+ import { actorAvatar as e } from "../lib/avatar.js";
2
+ import { hasValue as t } from "../lib/customFields.js";
3
+ import { usePeople as n } from "../lib/people.js";
4
+ import { Link as r } from "../lib/router.js";
5
+ import { useTime as i } from "../lib/time.js";
6
+ import { useFieldText as a } from "./CustomFields.js";
7
+ import { TypeIcon as o } from "./IssueTypes.js";
8
+ import { PriorityIcon as s, ProjectIcon as c, StatusIcon as l, UsersIcon as u } from "./icons.js";
9
+ import { PersonHoverCard as d } from "./PersonHoverCard.js";
10
+ import { DueDate as f, SlaBadge as p, estimateShort as m } from "./Planning.js";
11
11
  import { Avatar as h, AvatarGroup as g, Checkbox as _, Tooltip as v, useRelativeTime as y } from "@parallelworks/ui";
12
12
  import { memo as b } from "react";
13
13
  import { useFormatter as x, useTranslations as S } from "use-intl";
14
14
  import { jsx as C, jsxs as w } from "react/jsx-runtime";
15
15
  // src/components/IssueRow.tsx
16
16
  var T = b(function({ issue: b, team: T, workspace: E, selected: D = !1, picked: O = !1, viewers: k = [], onPick: A, onHover: j, onClick: M, onContextMenu: N, fields: P = [], ref: F, style: I, index: L }) {
17
- let R = S("issues"), z = x(), B = o(), V = y(b.updatedAt, "compact"), { person: H, nameOf: U, avatarOf: W } = a(E), G = p(E);
17
+ let R = S("issues"), z = x(), B = i(), V = y(b.updatedAt, "compact"), { person: H, nameOf: U, avatarOf: W } = n(E), G = a(E);
18
18
  return /* @__PURE__ */ w("li", {
19
19
  ref: F,
20
20
  style: I,
@@ -41,7 +41,7 @@ var T = b(function({ issue: b, team: T, workspace: E, selected: D = !1, picked:
41
41
  })
42
42
  })
43
43
  }),
44
- /* @__PURE__ */ w(e, {
44
+ /* @__PURE__ */ w(r, {
45
45
  to: "/$workspace/issues/$identifier",
46
46
  params: {
47
47
  workspace: E,
@@ -51,19 +51,19 @@ var T = b(function({ issue: b, team: T, workspace: E, selected: D = !1, picked:
51
51
  onContextMenu: N,
52
52
  className: `flex h-10 min-w-0 flex-1 items-center gap-3 pr-5 text-sm ${A ? "pl-3" : "pl-5"}`,
53
53
  children: [
54
- /* @__PURE__ */ C(t, { priority: b.priority }),
54
+ /* @__PURE__ */ C(s, { priority: b.priority }),
55
55
  /* @__PURE__ */ w("span", {
56
- className: `flex shrink-0 items-center gap-1 text-xs text-muted-foreground ${b.type ? "w-20" : "w-16"}`,
56
+ className: `flex shrink-0 items-center gap-1 text-xs whitespace-nowrap text-muted-foreground ${b.type ? "min-w-28" : "min-w-24"}`,
57
57
  children: [b.type && /* @__PURE__ */ C(v, {
58
58
  content: b.type.name,
59
59
  describesAnchor: !0,
60
- children: /* @__PURE__ */ C(d, {
60
+ children: /* @__PURE__ */ C(o, {
61
61
  type: b.type,
62
62
  className: "size-3.5"
63
63
  })
64
64
  }), b.identifier]
65
65
  }),
66
- /* @__PURE__ */ C(r, {
66
+ /* @__PURE__ */ C(l, {
67
67
  category: b.status.category,
68
68
  step: b.status.step
69
69
  }),
@@ -75,21 +75,21 @@ var T = b(function({ issue: b, team: T, workspace: E, selected: D = !1, picked:
75
75
  content: R("requestCount", { count: b.requests }),
76
76
  children: /* @__PURE__ */ w("span", {
77
77
  className: "inline-flex shrink-0 items-center gap-1 text-xs text-muted-foreground tabular-nums",
78
- children: [/* @__PURE__ */ C(i, { className: "size-3" }), b.requests]
78
+ children: [/* @__PURE__ */ C(u, { className: "size-3" }), b.requests]
79
79
  })
80
80
  }),
81
81
  b.project && /* @__PURE__ */ w("span", {
82
82
  className: "hidden max-w-40 shrink-0 items-center gap-1 truncate text-xs text-muted-foreground lg:inline-flex",
83
- children: [/* @__PURE__ */ C(n, { className: "size-3 shrink-0" }), /* @__PURE__ */ C("span", {
83
+ children: [/* @__PURE__ */ C(c, { className: "size-3 shrink-0" }), /* @__PURE__ */ C("span", {
84
84
  className: "truncate",
85
85
  children: b.project.name
86
86
  })]
87
87
  }),
88
- b.dueDate && /* @__PURE__ */ C(s, {
88
+ b.dueDate && /* @__PURE__ */ C(f, {
89
89
  date: b.dueDate,
90
90
  closed: b.status.category === "completed" || b.status.category === "canceled"
91
91
  }),
92
- /* @__PURE__ */ C(c, {
92
+ /* @__PURE__ */ C(p, {
93
93
  issue: b,
94
94
  team: T
95
95
  }),
@@ -98,12 +98,12 @@ var T = b(function({ issue: b, team: T, workspace: E, selected: D = !1, picked:
98
98
  describesAnchor: !0,
99
99
  children: /* @__PURE__ */ C("span", {
100
100
  className: "hidden h-5 min-w-5 shrink-0 items-center justify-center rounded border border-border px-1 text-[11px] text-muted-foreground tabular-nums sm:inline-flex",
101
- children: l(b.estimate, T?.estimateScale)
101
+ children: m(b.estimate, T?.estimateScale)
102
102
  })
103
103
  }),
104
104
  /* @__PURE__ */ w("span", {
105
105
  className: "hidden shrink-0 gap-1 md:flex",
106
- children: [P.filter((e) => u(b.fields[e.id])).map((e) => /* @__PURE__ */ C(v, {
106
+ children: [P.filter((e) => t(b.fields[e.id])).map((e) => /* @__PURE__ */ C(v, {
107
107
  content: e.name,
108
108
  describesAnchor: !0,
109
109
  children: /* @__PURE__ */ C("span", {
@@ -124,7 +124,7 @@ var T = b(function({ issue: b, team: T, workspace: E, selected: D = !1, picked:
124
124
  size: "xs",
125
125
  ringColor: "var(--avatar-person-text)",
126
126
  className: "shrink-0",
127
- children: k.map((e) => /* @__PURE__ */ C(m, {
127
+ children: k.map((e) => /* @__PURE__ */ C(d, {
128
128
  workspace: E,
129
129
  handle: e,
130
130
  children: /* @__PURE__ */ C(h, {
@@ -136,17 +136,17 @@ var T = b(function({ issue: b, team: T, workspace: E, selected: D = !1, picked:
136
136
  }),
137
137
  /* @__PURE__ */ C(g, {
138
138
  size: "sm",
139
- children: b.assignees.map((e) => /* @__PURE__ */ C(m, {
139
+ children: b.assignees.map((t) => /* @__PURE__ */ C(d, {
140
140
  workspace: E,
141
- kind: e.kind,
142
- handle: e.handle,
141
+ kind: t.kind,
142
+ handle: t.handle,
143
143
  children: /* @__PURE__ */ C(h, {
144
- ...f(e.kind),
145
- name: U(e.kind, e.handle),
146
- src: W(e.kind, e.handle),
147
- tooltip: e.kind !== "user"
144
+ ...e(t.kind),
145
+ name: U(t.kind, t.handle),
146
+ src: W(t.kind, t.handle),
147
+ tooltip: t.kind !== "user"
148
148
  })
149
- }, `${e.kind}:${e.handle}`))
149
+ }, `${t.kind}:${t.handle}`))
150
150
  }),
151
151
  /* @__PURE__ */ C(v, {
152
152
  content: R("updated", { time: B.full(b.updatedAt) }),
@@ -1,70 +1,72 @@
1
1
  import { issueSentryQuery as e } from "../api/queries.js";
2
2
  import { externalUrl as t } from "../lib/externalUrl.js";
3
- import { AlertIcon as n } from "./icons.js";
4
- import { useTime as r } from "../lib/time.js";
5
- import { Card as i, TagList as a } from "@parallelworks/ui";
6
- import { useTranslations as o } from "use-intl";
7
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
8
- import { useQuery as l } from "@tanstack/react-query";
3
+ import { useTime as n } from "../lib/time.js";
4
+ import { AlertIcon as r } from "./icons.js";
5
+ import { Card as i, TagList as a, Tooltip as o } from "@parallelworks/ui";
6
+ import { useTranslations as s } from "use-intl";
7
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
8
+ import { useQuery as u } from "@tanstack/react-query";
9
9
  // src/components/IssueSentry.tsx
10
- var u = {
10
+ var d = {
11
11
  fatal: "text-danger",
12
12
  error: "text-danger",
13
13
  warning: "text-warning"
14
14
  };
15
- function d({ workspace: d, identifier: f }) {
16
- let p = o("sentry"), m = r(), { data: h } = l(e(d, f));
17
- return !h?.enabled || h.links.length === 0 ? null : /* @__PURE__ */ c("section", {
15
+ function f({ workspace: f, identifier: p }) {
16
+ let m = s("sentry"), h = n(), { data: g } = u(e(f, p));
17
+ return !g?.enabled || g.links.length === 0 ? null : /* @__PURE__ */ l("section", {
18
18
  className: "mt-6",
19
- "aria-label": p("issueSection"),
20
- children: [/* @__PURE__ */ s("h2", {
19
+ "aria-label": m("issueSection"),
20
+ children: [/* @__PURE__ */ c("h2", {
21
21
  className: "text-xs font-medium text-muted-foreground",
22
- children: p("issueSection")
23
- }), /* @__PURE__ */ s(i, {
22
+ children: m("issueSection")
23
+ }), /* @__PURE__ */ c(i, {
24
24
  size: "fill",
25
25
  padding: "none",
26
26
  divided: !0,
27
27
  interactive: !1,
28
- render: /* @__PURE__ */ s("ul", {}),
28
+ render: /* @__PURE__ */ c("ul", {}),
29
29
  className: "mt-1",
30
- children: h.links.map((e) => /* @__PURE__ */ s("li", {
30
+ children: g.links.map((e) => /* @__PURE__ */ c("li", {
31
31
  className: "hover:bg-muted",
32
- children: /* @__PURE__ */ c("a", {
32
+ children: /* @__PURE__ */ l("a", {
33
33
  href: t(e.url),
34
34
  target: "_blank",
35
35
  rel: "noopener noreferrer",
36
36
  className: "flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1 px-3 py-2 text-sm",
37
37
  children: [
38
- /* @__PURE__ */ s(n, { className: `size-4 shrink-0 ${u[e.level] ?? "text-muted-foreground"}` }),
39
- /* @__PURE__ */ s("span", {
38
+ /* @__PURE__ */ c(r, { className: `size-4 shrink-0 ${d[e.level] ?? "text-muted-foreground"}` }),
39
+ /* @__PURE__ */ c("span", {
40
40
  className: "shrink-0 text-muted-foreground",
41
41
  children: e.shortId || e.project
42
42
  }),
43
- /* @__PURE__ */ s("span", {
43
+ /* @__PURE__ */ c("span", {
44
44
  className: "min-w-0 flex-1 truncate",
45
45
  children: e.title
46
46
  }),
47
- /* @__PURE__ */ c("span", {
47
+ /* @__PURE__ */ l("span", {
48
48
  className: "flex flex-wrap items-center gap-x-3 text-xs text-muted-foreground",
49
49
  children: [
50
- /* @__PURE__ */ s("span", { children: p("events", { count: e.events }) }),
51
- /* @__PURE__ */ s("span", { children: p("users", { count: e.users }) }),
52
- e.lastSeen && /* @__PURE__ */ s("span", {
53
- title: m.full(e.lastSeen),
54
- children: p("lastSeen", { when: m.relative(e.lastSeen) })
50
+ /* @__PURE__ */ c("span", { children: m("events", { count: e.events }) }),
51
+ /* @__PURE__ */ c("span", { children: m("users", { count: e.users }) }),
52
+ e.lastSeen && /* @__PURE__ */ c(o, {
53
+ content: h.full(e.lastSeen),
54
+ children: /* @__PURE__ */ c("span", { children: m("lastSeen", { when: h.relative(e.lastSeen) }) })
55
55
  }),
56
- e.firstSeen && /* @__PURE__ */ s("span", {
57
- title: m.full(e.firstSeen),
58
- className: "hidden sm:inline",
59
- children: p("firstSeen", { when: m.relative(e.firstSeen) })
56
+ e.firstSeen && /* @__PURE__ */ c(o, {
57
+ content: h.full(e.firstSeen),
58
+ children: /* @__PURE__ */ c("span", {
59
+ className: "hidden sm:inline",
60
+ children: m("firstSeen", { when: h.relative(e.firstSeen) })
61
+ })
60
62
  }),
61
- /* @__PURE__ */ s("span", {
63
+ /* @__PURE__ */ c("span", {
62
64
  className: e.status === "resolved" ? "text-success" : "",
63
- children: p(`status.${e.status === "resolved" || e.status === "ignored" ? e.status : "unresolved"}`)
65
+ children: m(`status.${e.status === "resolved" || e.status === "ignored" ? e.status : "unresolved"}`)
64
66
  })
65
67
  ]
66
68
  }),
67
- e.repositories.length > 0 && /* @__PURE__ */ s(a, {
69
+ e.repositories.length > 0 && /* @__PURE__ */ c(a, {
68
70
  className: "basis-full",
69
71
  mono: !0,
70
72
  tags: e.repositories.map((e) => ({
@@ -78,4 +80,4 @@ function d({ workspace: d, identifier: f }) {
78
80
  })]
79
81
  });
80
82
  }
81
- export { d as IssueSentry };
83
+ export { f as IssueSentry };
@@ -1,12 +1,12 @@
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 { 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
- import { Editor as h } from "./Editor.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 { PropertyField as u } from "./DocProperties.js";
7
+ import { Editor as d } from "./Editor.js";
8
+ import { TypeIcon as f } from "./IssueTypes.js";
9
+ import { AddIcon as p, PriorityIcon as m, usePriorityNames as h } from "./icons.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
12
  import { useErrorMessage as te } from "@parallelworks/problem/react";
@@ -16,7 +16,7 @@ import { useMutation as k, useQuery as A, useQueryClient as j } from "@tanstack/
16
16
  import { MoreButton as M } from "@parallelworks/ui/list";
17
17
  // src/components/IssueTemplates.tsx
18
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({
19
+ let s = E("issueTemplates"), c = T(), l = E("common"), u = j(), { data: d = [] } = A(n(r, i)), [f, m] = w(null), { confirm: h, dialog: _ } = a(), 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,
@@ -30,15 +30,15 @@ function N({ workspace: r, teamKey: i, isAdmin: o }) {
30
30
  action: o && /* @__PURE__ */ D(g, {
31
31
  variant: "outline",
32
32
  size: "sm",
33
- icon: /* @__PURE__ */ D(a, { className: "size-3.5" }),
33
+ icon: /* @__PURE__ */ D(p, { className: "size-3.5" }),
34
34
  onClick: () => m("new"),
35
35
  children: s("new")
36
36
  }),
37
37
  children: [
38
- f.length === 0 ? /* @__PURE__ */ D("p", {
38
+ d.length === 0 ? /* @__PURE__ */ D("p", {
39
39
  className: "px-4 py-3 text-sm text-muted-foreground",
40
40
  children: s("none")
41
- }) : /* @__PURE__ */ D("ul", { children: f.map((e) => /* @__PURE__ */ O("li", {
41
+ }) : /* @__PURE__ */ D("ul", { children: d.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
43
  children: [/* @__PURE__ */ O("span", {
44
44
  className: "min-w-0 flex-1",
@@ -80,18 +80,18 @@ function N({ workspace: r, teamKey: i, isAdmin: o }) {
80
80
  ]
81
81
  })]
82
82
  }, e.id)) }),
83
- p && /* @__PURE__ */ D(P, {
83
+ f && /* @__PURE__ */ D(P, {
84
84
  workspace: r,
85
85
  teamKey: i,
86
- template: p === "new" ? void 0 : p,
86
+ template: f === "new" ? void 0 : f,
87
87
  onClose: () => m(null)
88
88
  }),
89
89
  _
90
90
  ]
91
91
  });
92
92
  }
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({
93
+ function P({ workspace: a, teamKey: p, template: x, onClose: S }) {
94
+ let M = E("issueTemplates"), N = T(), P = E("common"), R = te(), z = h(), 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 ?? "",
@@ -111,21 +111,21 @@ function P({ workspace: a, teamKey: d, template: x, onClose: S }) {
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: d,
114
+ key: p,
115
115
  templateId: x.id
116
116
  } },
117
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: d
121
+ key: p
122
122
  } },
123
123
  body: H
124
124
  })),
125
125
  onSuccess: () => {
126
- B.invalidateQueries({ queryKey: n(a, d).queryKey }), S();
126
+ B.invalidateQueries({ queryKey: n(a, p).queryKey }), S();
127
127
  }
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);
128
+ }), Y = V.filter((e) => H.labelIds?.includes(e.id)), { data: X = [] } = A(i(a)), { data: ie } = A(o(a)), Z = s(ie, "issue", X.find((e) => e.key === p)?.id), ae = E("customFields"), Q = E("issueTypes"), { data: oe } = A(c(a)), $ = l(oe, X.find((e) => e.key === p)?.id);
129
129
  return /* @__PURE__ */ D(ee, {
130
130
  open: !0,
131
131
  onClose: S,
@@ -179,7 +179,7 @@ function P({ workspace: a, teamKey: d, template: x, onClose: S }) {
179
179
  className: "text-xs font-medium text-muted-foreground",
180
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__ */ D(h, {
182
+ children: /* @__PURE__ */ D(d, {
183
183
  value: H.body ?? "",
184
184
  onChange: (e) => q({ body: e }),
185
185
  label: M("body"),
@@ -198,7 +198,7 @@ function P({ workspace: a, teamKey: d, template: x, onClose: S }) {
198
198
  items: z.map((e, t) => ({
199
199
  value: String(t),
200
200
  label: e,
201
- icon: /* @__PURE__ */ D(o, { priority: t })
201
+ icon: /* @__PURE__ */ D(m, { priority: t })
202
202
  })),
203
203
  onValueChange: (e) => e !== null && q({ priority: Number(e) }),
204
204
  "aria-label": M("priority")
@@ -244,7 +244,7 @@ function P({ workspace: a, teamKey: d, template: x, onClose: S }) {
244
244
  }, ...$.map((e) => ({
245
245
  value: e.id,
246
246
  label: e.name,
247
- icon: /* @__PURE__ */ D(m, {
247
+ icon: /* @__PURE__ */ D(f, {
248
248
  type: e,
249
249
  className: "size-3.5"
250
250
  })
@@ -273,7 +273,7 @@ function P({ workspace: a, teamKey: d, template: x, onClose: S }) {
273
273
  children: e.name
274
274
  }), /* @__PURE__ */ D("div", {
275
275
  className: "min-w-0 flex-1",
276
- children: /* @__PURE__ */ D(c, {
276
+ children: /* @__PURE__ */ D(u, {
277
277
  workspace: a,
278
278
  property: e,
279
279
  value: H.fields?.[e.id],
@@ -1,8 +1,8 @@
1
1
  import { teamsQuery as e } from "../api/queries.js";
2
- import { AddIcon as t } from "./icons.js";
2
+ import { useConfirm as t } from "../lib/confirm.js";
3
3
  import { customFieldsQuery as n } from "../lib/customFields.js";
4
- import { useConfirm as r } from "../lib/confirm.js";
5
- import { issueTypesQuery as i, useIssueTypeActions as a } from "../lib/issueTypes.js";
4
+ import { issueTypesQuery as r, useIssueTypeActions as i } from "../lib/issueTypes.js";
5
+ import { AddIcon as a } from "./icons.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 n = v("issueTypes"), { data: r = [] } = x(i(e)), [a, s] = g(!1);
26
+ let t = v("issueTypes"), { data: n = [] } = x(r(e)), [i, s] = g(!1);
27
27
  return /* @__PURE__ */ b(f, {
28
- title: n("title"),
29
- description: n("description"),
28
+ title: t("title"),
29
+ description: t("description"),
30
30
  action: /* @__PURE__ */ y(o, {
31
31
  size: "sm",
32
- icon: /* @__PURE__ */ y(t, {}),
32
+ icon: /* @__PURE__ */ y(a, {}),
33
33
  onClick: () => s(!0),
34
- children: n("add")
34
+ children: t("add")
35
35
  }),
36
- children: [a && /* @__PURE__ */ y("div", {
36
+ children: [i && /* @__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
- }), r.length === 0 && !a ? /* @__PURE__ */ y("p", {
42
+ }), n.length === 0 && !i ? /* @__PURE__ */ y("p", {
43
43
  className: "px-3 py-3 text-sm text-muted-foreground",
44
- children: n("none")
44
+ children: t("none")
45
45
  }) : /* @__PURE__ */ y("ul", {
46
46
  className: "divide-y divide-border",
47
- children: r.map((t, n) => /* @__PURE__ */ y(w, {
47
+ children: n.map((t, r) => /* @__PURE__ */ y(w, {
48
48
  workspace: e,
49
49
  type: t,
50
- before: r[n - 1],
51
- after: r[n + 1]
50
+ before: n[r - 1],
51
+ after: n[r + 1]
52
52
  }, t.id))
53
53
  })]
54
54
  });
55
55
  }
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) => {
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) => {
58
58
  let t = {
59
- ...n,
59
+ ...r,
60
60
  ...e
61
61
  };
62
62
  return {
63
- id: n.id,
63
+ id: r.id,
64
64
  name: t.name,
65
65
  description: t.description ?? "",
66
66
  icon: t.icon ?? "",
@@ -75,11 +75,11 @@ function w({ workspace: t, type: n, before: i, after: o }) {
75
75
  label: s("edit"),
76
76
  onClick: () => _(!0)
77
77
  },
78
- ...i ? [{
78
+ ...a ? [{
79
79
  label: s("moveUp"),
80
80
  onClick: () => c.update.mutate({
81
81
  ...w({}),
82
- position: i.position - .5
82
+ position: a.position - .5
83
83
  })
84
84
  }] : [],
85
85
  ...o ? [{
@@ -90,10 +90,10 @@ function w({ workspace: t, type: n, before: i, after: o }) {
90
90
  })
91
91
  }] : [],
92
92
  {
93
- label: n.archivedAt ? s("restore") : s("archive"),
93
+ label: r.archivedAt ? s("restore") : s("archive"),
94
94
  onClick: () => c.update.mutate({
95
95
  ...w({}),
96
- archived: !n.archivedAt
96
+ archived: !r.archivedAt
97
97
  })
98
98
  },
99
99
  m,
@@ -101,38 +101,38 @@ function w({ workspace: t, type: n, before: i, after: o }) {
101
101
  label: s("delete"),
102
102
  destructive: !0,
103
103
  onClick: () => d({
104
- title: s("deleteTitle", { name: n.name }),
105
- description: s("deleteDescription", { count: n.issues }),
104
+ title: s("deleteTitle", { name: r.name }),
105
+ description: s("deleteDescription", { count: r.issues }),
106
106
  confirmLabel: s("delete"),
107
- onConfirm: () => c.remove.mutateAsync(n.id)
107
+ onConfirm: () => c.remove.mutateAsync(r.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: t,
115
- type: n,
114
+ workspace: n,
115
+ type: r,
116
116
  onDone: () => _(!1)
117
117
  })
118
118
  });
119
- let D = n.teamIds.map((e) => C.find((t) => t.id === e)?.name).filter(Boolean).join(", ");
119
+ let D = r.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: n }),
124
+ /* @__PURE__ */ y(S, { type: r }),
125
125
  /* @__PURE__ */ b("div", {
126
126
  className: "min-w-0 flex-1",
127
127
  children: [/* @__PURE__ */ y("p", {
128
- className: `truncate text-sm ${n.archivedAt ? "text-muted-foreground" : ""}`,
129
- children: n.name
130
- }), n.description && /* @__PURE__ */ y("p", {
128
+ className: `truncate text-sm ${r.archivedAt ? "text-muted-foreground" : ""}`,
129
+ children: r.name
130
+ }), r.description && /* @__PURE__ */ y("p", {
131
131
  className: "truncate text-xs text-muted-foreground",
132
- children: n.description
132
+ children: r.description
133
133
  })]
134
134
  }),
135
- n.archivedAt && /* @__PURE__ */ y("span", {
135
+ r.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: t, type: n, before: i, 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: n.issues })
145
+ children: s("issues", { count: r.issues })
146
146
  }),
147
147
  /* @__PURE__ */ y(l, {
148
148
  variant: "ghost",
149
149
  size: "sm",
150
- label: s("actions", { name: n.name }),
150
+ label: s("actions", { name: r.name }),
151
151
  icon: /* @__PURE__ */ y("span", {
152
152
  "aria-hidden": !0,
153
153
  children: "⋯"
@@ -158,8 +158,8 @@ function w({ workspace: t, type: n, before: i, after: o }) {
158
158
  ]
159
159
  });
160
160
  }
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) => {
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) => {
163
163
  e.preventDefault();
164
164
  let t = {
165
165
  name: T,
@@ -174,7 +174,7 @@ function T({ workspace: t, type: r, onDone: i }) {
174
174
  r ? h.update.mutate({
175
175
  id: r.id,
176
176
  ...t
177
- }, { onSuccess: i }) : h.create.mutate(t, { onSuccess: i });
177
+ }, { onSuccess: a }) : h.create.mutate(t, { onSuccess: a });
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: i }) {
301
301
  children: [/* @__PURE__ */ y(o, {
302
302
  size: "sm",
303
303
  variant: "ghost",
304
- onClick: i,
304
+ onClick: a,
305
305
  children: f("cancel")
306
306
  }), /* @__PURE__ */ y(o, {
307
307
  type: "submit",
@@ -1,7 +1,7 @@
1
- import { appURL as e } from "../lib/base.js";
2
- import { api as t, unwrap as n } from "../api/client.js";
3
- import { useNavigate as r } from "../lib/router.js";
4
- import { docRef as i, downloadMarkdown as a } from "../lib/docs.js";
1
+ import { api as e, unwrap as t } from "../api/client.js";
2
+ import { appURL as n } from "../lib/base.js";
3
+ import { docRef as r, downloadMarkdown as i } from "../lib/docs.js";
4
+ import { useNavigate as a } from "../lib/router.js";
5
5
  import { Button as o, ErrorText as s, Modal as c, ModalTitle as l } from "@parallelworks/ui";
6
6
  import { useErrorMessage as u } from "@parallelworks/problem/react";
7
7
  import { useTranslations as d } from "use-intl";
@@ -10,10 +10,10 @@ import { useMutation as h, useQueryClient as g } from "@tanstack/react-query";
10
10
  // src/components/MarkdownTransfer.tsx
11
11
  var _ = (e) => /\.(md|markdown)$/i.test(e);
12
12
  function v(v) {
13
- let y = d("docs"), b = u(), x = g(), S = r(), C = h({
13
+ let y = d("docs"), b = u(), x = g(), S = a(), C = h({
14
14
  mutationFn: async ({ target: r, files: i }) => {
15
- let a = e(`/${v}/docs/`), [o] = i;
16
- if (i.length === 1 && o && /\.zip$/i.test(o.name)) return n(await t.POST("/api/v1/workspaces/{workspace}/docs/import/zip", {
15
+ let a = n(`/${v}/docs/`), [o] = i;
16
+ if (i.length === 1 && o && /\.zip$/i.test(o.name)) return t(await e.POST("/api/v1/workspaces/{workspace}/docs/import/zip", {
17
17
  params: {
18
18
  path: { workspace: v },
19
19
  query: {
@@ -29,7 +29,7 @@ function v(v) {
29
29
  path: e.webkitRelativePath || e.name,
30
30
  content: _(e.name) ? await e.text() : ""
31
31
  })));
32
- return n(await t.POST("/api/v1/workspaces/{workspace}/docs/import", {
32
+ return t(await e.POST("/api/v1/workspaces/{workspace}/docs/import", {
33
33
  params: { path: { workspace: v } },
34
34
  body: {
35
35
  ...r,
@@ -58,7 +58,7 @@ function v(v) {
58
58
  files: t
59
59
  });
60
60
  }, n.click();
61
- }, T = (e) => a(v, e), E = C.data, D = C.isPending || C.isError || !!E, O = () => C.reset();
61
+ }, T = (e) => i(v, e), E = C.data, D = C.isPending || C.isError || !!E, O = () => C.reset();
62
62
  return {
63
63
  pick: w,
64
64
  download: T,
@@ -112,7 +112,7 @@ function v(v) {
112
112
  to: "/$workspace/docs/$doc",
113
113
  params: {
114
114
  workspace: v,
115
- doc: i(e)
115
+ doc: r(e)
116
116
  }
117
117
  });
118
118
  },