@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,24 +1,25 @@
1
- import { Link as e } from "../lib/router.js";
2
- import { panelQuery as t } from "../api/queries.js";
1
+ import { panelQuery as e } from "../api/queries.js";
2
+ import { Link as t } from "../lib/router.js";
3
3
  import { DownloadIcon as n, EditIcon as r, TrashIcon as i } from "./icons.js";
4
- import { Card as a, ChartLegendList as o, IconButton as s, OTHER_SERIES_KEY as c, foldSeries as l, seriesColors as u } from "@parallelworks/ui";
5
- import { useFormatter as d, useTranslations as f } from "use-intl";
6
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
7
- import { useQuery as h } from "@tanstack/react-query";
4
+ import { Card as a, ChartLegendList as o, ChartTooltipBeside as s, ChartTooltipContent as c, IconButton as l, OTHER_SERIES_KEY as u, Tooltip as d, foldSeries as f, seriesColors as p } from "@parallelworks/ui";
5
+ import { useState as m } from "react";
6
+ import { useFormatter as h, useTranslations as g } from "use-intl";
7
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
8
+ import { useQuery as y } from "@tanstack/react-query";
8
9
  // src/components/DashboardPanel.tsx
9
- function g(e) {
10
+ function b(e) {
10
11
  let t = e.team || e.assignee || e.creator ? {} : { scope: "workspace" };
11
12
  return Object.fromEntries(Object.entries({
12
13
  ...e,
13
14
  ...t
14
15
  }).filter(([e, t]) => t && e !== "$schema"));
15
16
  }
16
- var _ = /* @__PURE__ */ new Set([
17
+ var x = /* @__PURE__ */ new Set([
17
18
  "created_completed",
18
19
  "open",
19
20
  "throughput"
20
21
  ]);
21
- function v(e) {
22
+ function S(e) {
22
23
  return [
23
24
  {
24
25
  title: e("starter.createdCompleted"),
@@ -58,7 +59,7 @@ function v(e) {
58
59
  }
59
60
  ];
60
61
  }
61
- function y(e, t) {
62
+ function C(e, t) {
62
63
  return [
63
64
  {
64
65
  value: "private",
@@ -74,7 +75,7 @@ function y(e, t) {
74
75
  }))
75
76
  ];
76
77
  }
77
- function b(e) {
78
+ function w(e) {
78
79
  return e === "private" ? {
79
80
  shared: !1,
80
81
  team: ""
@@ -86,174 +87,174 @@ function b(e) {
86
87
  team: e.slice(5)
87
88
  };
88
89
  }
89
- function x({ workspace: e, panel: o, onEdit: c, onDelete: l }) {
90
- let u = f("dashboards"), { data: d, isPending: g, isError: _ } = h({
91
- ...t(e, o.chart, o.spec),
90
+ function T({ workspace: t, panel: o, onEdit: s, onDelete: c }) {
91
+ let u = g("dashboards"), { data: d, isPending: f, isError: p } = y({
92
+ ...e(t, o.chart, o.spec),
92
93
  refetchInterval: 6e4
93
94
  });
94
- return /* @__PURE__ */ m(a, {
95
+ return /* @__PURE__ */ v(a, {
95
96
  padding: "none",
96
97
  interactive: !1,
97
98
  className: "flex min-w-0 flex-col",
98
- children: [/* @__PURE__ */ m("div", {
99
+ children: [/* @__PURE__ */ v("div", {
99
100
  className: "flex items-center gap-1 border-b border-border px-3 py-2",
100
101
  children: [
101
- /* @__PURE__ */ p("h2", {
102
+ /* @__PURE__ */ _("h2", {
102
103
  className: "min-w-0 flex-1 truncate text-sm font-medium",
103
104
  children: o.title || u(`measures.${o.spec.measure}`)
104
105
  }),
105
- d && /* @__PURE__ */ p(s, {
106
+ d && /* @__PURE__ */ _(l, {
106
107
  variant: "ghost",
107
108
  size: "sm",
108
- icon: /* @__PURE__ */ p(n, {}),
109
+ icon: /* @__PURE__ */ _(n, {}),
109
110
  label: u("csv"),
110
- onClick: () => k(o.title || o.spec.measure, d, u)
111
+ onClick: () => N(o.title || o.spec.measure, d, u)
111
112
  }),
112
- c && /* @__PURE__ */ p(s, {
113
+ s && /* @__PURE__ */ _(l, {
113
114
  variant: "ghost",
114
115
  size: "sm",
115
- icon: /* @__PURE__ */ p(r, {}),
116
+ icon: /* @__PURE__ */ _(r, {}),
116
117
  label: u("edit"),
117
- onClick: c
118
+ onClick: s
118
119
  }),
119
- l && /* @__PURE__ */ p(s, {
120
+ c && /* @__PURE__ */ _(l, {
120
121
  variant: "ghost",
121
122
  size: "sm",
122
- icon: /* @__PURE__ */ p(i, {}),
123
+ icon: /* @__PURE__ */ _(i, {}),
123
124
  label: u("remove"),
124
- onClick: l
125
+ onClick: c
125
126
  })
126
127
  ]
127
- }), /* @__PURE__ */ p("div", {
128
+ }), /* @__PURE__ */ _("div", {
128
129
  className: "min-h-48 flex-1 p-3",
129
- children: g ? /* @__PURE__ */ p("p", {
130
+ children: f ? /* @__PURE__ */ _("p", {
130
131
  className: "text-sm text-muted-foreground",
131
132
  children: u("loading")
132
- }) : _ || !d ? /* @__PURE__ */ p("p", {
133
+ }) : p || !d ? /* @__PURE__ */ _("p", {
133
134
  className: "text-sm text-danger",
134
135
  children: u("failed")
135
- }) : /* @__PURE__ */ p(C, {
136
- workspace: e,
136
+ }) : /* @__PURE__ */ _(D, {
137
+ workspace: t,
137
138
  panel: o,
138
139
  data: d
139
140
  })
140
141
  })]
141
142
  });
142
143
  }
143
- function S(e) {
144
- let t = d(), n = f("dashboards");
144
+ function E(e) {
145
+ let t = h(), n = g("dashboards");
145
146
  return (r) => e === "days" ? n("daysValue", { days: t.number(r, { maximumFractionDigits: 1 }) }) : t.number(r, { maximumFractionDigits: +(e === "points") });
146
147
  }
147
- function C({ workspace: t, panel: n, data: r }) {
148
- let i = f("dashboards"), a = S(r.unit), o = r.series.length > 0 && r.weeks.length > 0, s = n.chart;
149
- return s === "number" ? /* @__PURE__ */ m(e, {
148
+ function D({ workspace: e, panel: n, data: r }) {
149
+ let i = g("dashboards"), a = E(r.unit), o = r.series.length > 0 && r.weeks.length > 0, s = n.chart;
150
+ return s === "number" ? /* @__PURE__ */ v(t, {
150
151
  to: "/$workspace/issues",
151
- params: { workspace: t },
152
- search: g(r.filter),
152
+ params: { workspace: e },
153
+ search: b(r.filter),
153
154
  className: "flex h-full flex-col items-start justify-center gap-1 rounded-md hover:bg-muted",
154
- children: [/* @__PURE__ */ p("span", {
155
+ children: [/* @__PURE__ */ _("span", {
155
156
  className: "text-4xl font-semibold tabular-nums",
156
157
  children: a(r.total)
157
- }), /* @__PURE__ */ p("span", {
158
+ }), /* @__PURE__ */ _("span", {
158
159
  className: "text-xs text-muted-foreground",
159
160
  children: i(`units.${r.unit}`)
160
161
  })]
161
- }) : s === "list" ? r.issues.length === 0 ? /* @__PURE__ */ p(w, {}) : /* @__PURE__ */ p("ul", {
162
+ }) : s === "list" ? r.issues.length === 0 ? /* @__PURE__ */ _(O, {}) : /* @__PURE__ */ _("ul", {
162
163
  className: "divide-y divide-border text-sm",
163
- children: r.issues.map((n) => /* @__PURE__ */ p("li", { children: /* @__PURE__ */ m(e, {
164
+ children: r.issues.map((n) => /* @__PURE__ */ _("li", { children: /* @__PURE__ */ v(t, {
164
165
  to: "/$workspace/issues/$identifier",
165
166
  params: {
166
- workspace: t,
167
+ workspace: e,
167
168
  identifier: n.identifier
168
169
  },
169
170
  className: "flex min-w-0 gap-2 py-1.5 hover:bg-muted",
170
171
  children: [
171
- /* @__PURE__ */ p("span", {
172
+ /* @__PURE__ */ _("span", {
172
173
  className: "shrink-0 text-muted-foreground tabular-nums",
173
174
  children: n.identifier
174
175
  }),
175
- /* @__PURE__ */ p("span", {
176
+ /* @__PURE__ */ _("span", {
176
177
  className: "min-w-0 flex-1 truncate",
177
178
  children: n.title
178
179
  }),
179
- /* @__PURE__ */ p("span", {
180
+ /* @__PURE__ */ _("span", {
180
181
  className: "shrink-0 text-xs text-muted-foreground",
181
182
  children: n.status
182
183
  })
183
184
  ]
184
185
  }) }, n.identifier))
185
- }) : s === "table" ? r.rows.length === 0 ? /* @__PURE__ */ p(w, {}) : /* @__PURE__ */ m("table", {
186
+ }) : s === "table" ? r.rows.length === 0 ? /* @__PURE__ */ _(O, {}) : /* @__PURE__ */ v("table", {
186
187
  className: "w-full text-sm",
187
- children: [/* @__PURE__ */ p("thead", { children: /* @__PURE__ */ m("tr", {
188
+ children: [/* @__PURE__ */ _("thead", { children: /* @__PURE__ */ v("tr", {
188
189
  className: "text-left text-xs text-muted-foreground",
189
- children: [/* @__PURE__ */ p("th", {
190
+ children: [/* @__PURE__ */ _("th", {
190
191
  className: "pb-1 font-medium",
191
192
  children: i("group")
192
- }), /* @__PURE__ */ p("th", {
193
+ }), /* @__PURE__ */ _("th", {
193
194
  className: "pb-1 text-right font-medium",
194
195
  children: i(`units.${r.unit}`)
195
196
  })]
196
- }) }), /* @__PURE__ */ p("tbody", {
197
+ }) }), /* @__PURE__ */ _("tbody", {
197
198
  className: "divide-y divide-border",
198
- children: r.rows.map((r) => /* @__PURE__ */ m("tr", { children: [/* @__PURE__ */ p("td", {
199
+ children: r.rows.map((r) => /* @__PURE__ */ v("tr", { children: [/* @__PURE__ */ _("td", {
199
200
  className: "py-1.5",
200
- children: /* @__PURE__ */ p(e, {
201
+ children: /* @__PURE__ */ _(t, {
201
202
  to: "/$workspace/issues",
202
- params: { workspace: t },
203
- search: g(r.filter),
203
+ params: { workspace: e },
204
+ search: b(r.filter),
204
205
  className: "hover:underline",
205
- children: T(r.name, n.spec.groupBy, i)
206
+ children: k(r.name, n.spec.groupBy, i)
206
207
  })
207
- }), /* @__PURE__ */ p("td", {
208
+ }), /* @__PURE__ */ _("td", {
208
209
  className: "py-1.5 text-right tabular-nums",
209
210
  children: a(r.value)
210
211
  })] }, r.key || "-"))
211
212
  })]
212
- }) : o && (s === "line" || s === "stacked" || _.has(n.spec.measure)) ? /* @__PURE__ */ p(O, {
213
- workspace: t,
213
+ }) : o && (s === "line" || s === "stacked" || x.has(n.spec.measure)) ? /* @__PURE__ */ _(M, {
214
+ workspace: e,
214
215
  data: r,
215
216
  stacked: s !== "line",
216
- names: (e) => e.key === "created" || e.key === "completed" ? i(`series.${e.key}`) : T(e.name, n.spec.groupBy, i),
217
+ names: (e) => e.key === "created" || e.key === "completed" ? i(`series.${e.key}`) : k(e.name, n.spec.groupBy, i),
217
218
  value: a
218
- }) : r.rows.length === 0 || r.rows.every((e) => e.value === 0) ? /* @__PURE__ */ p(w, {}) : p(s === "pie" ? D : E, {
219
- workspace: t,
219
+ }) : r.rows.length === 0 || r.rows.every((e) => e.value === 0) ? /* @__PURE__ */ _(O, {}) : _(s === "pie" ? j : A, {
220
+ workspace: e,
220
221
  data: r,
221
222
  groupBy: n.spec.groupBy,
222
223
  value: a
223
224
  });
224
225
  }
225
- function w() {
226
- let e = f("dashboards");
227
- return /* @__PURE__ */ p("p", {
226
+ function O() {
227
+ let e = g("dashboards");
228
+ return /* @__PURE__ */ _("p", {
228
229
  className: "text-sm text-muted-foreground",
229
230
  children: e("empty")
230
231
  });
231
232
  }
232
- function T(e, t, n) {
233
+ function k(e, t, n) {
233
234
  return t === "priority" ? n(`priorities.${e}`) : t === "status" && e ? n(`categories.${e}`) : t ? e || n("none") : n("all");
234
235
  }
235
- function E({ workspace: t, data: n, groupBy: r, value: i }) {
236
- let a = f("dashboards"), o = Math.max(...n.rows.map((e) => e.value), 1);
237
- return /* @__PURE__ */ p("ul", {
236
+ function A({ workspace: e, data: n, groupBy: r, value: i }) {
237
+ let a = g("dashboards"), o = Math.max(...n.rows.map((e) => e.value), 1);
238
+ return /* @__PURE__ */ _("ul", {
238
239
  className: "space-y-1.5",
239
- children: n.rows.slice(0, 12).map((n) => /* @__PURE__ */ p("li", { children: /* @__PURE__ */ m(e, {
240
+ children: n.rows.slice(0, 12).map((n) => /* @__PURE__ */ _("li", { children: /* @__PURE__ */ v(t, {
240
241
  to: "/$workspace/issues",
241
- params: { workspace: t },
242
- search: g(n.filter),
242
+ params: { workspace: e },
243
+ search: b(n.filter),
243
244
  className: "group grid grid-cols-[minmax(0,9rem)_1fr_auto] items-center gap-2 text-sm",
244
245
  children: [
245
- /* @__PURE__ */ p("span", {
246
+ /* @__PURE__ */ _("span", {
246
247
  className: "truncate text-muted-foreground group-hover:text-foreground",
247
- children: T(n.name, r, a)
248
+ children: k(n.name, r, a)
248
249
  }),
249
- /* @__PURE__ */ p("span", {
250
+ /* @__PURE__ */ _("span", {
250
251
  className: "h-4 rounded-sm bg-muted",
251
- children: /* @__PURE__ */ p("span", {
252
+ children: /* @__PURE__ */ _("span", {
252
253
  className: "block h-full rounded-sm bg-primary group-hover:opacity-80",
253
254
  style: { width: `${Math.max(2, n.value / o * 100)}%` }
254
255
  })
255
256
  }),
256
- /* @__PURE__ */ p("span", {
257
+ /* @__PURE__ */ _("span", {
257
258
  className: "tabular-nums",
258
259
  children: i(n.value)
259
260
  })
@@ -261,59 +262,61 @@ function E({ workspace: t, data: n, groupBy: r, value: i }) {
261
262
  }) }, n.key))
262
263
  });
263
264
  }
264
- function D({ workspace: t, data: n, groupBy: r, value: i }) {
265
- let a = f("dashboards"), o = n.rows.filter((e) => e.value > 0), { keys: s, folded: d } = l(o.map((e) => e.key)), h = u(s), _ = s.map((e) => {
266
- if (e === c) return {
265
+ function j({ workspace: e, data: n, groupBy: r, value: i }) {
266
+ let a = g("dashboards"), o = n.rows.filter((e) => e.value > 0), { keys: s, folded: c } = f(o.map((e) => e.key)), l = p(s), m = s.map((e) => {
267
+ if (e === u) return {
267
268
  key: e,
268
269
  name: a("other"),
269
- value: o.filter((e) => d.includes(e.key)).reduce((e, t) => e + t.value, 0),
270
+ value: o.filter((e) => c.includes(e.key)).reduce((e, t) => e + t.value, 0),
270
271
  filter: n.filter
271
272
  };
272
273
  let t = o.find((t) => t.key === e);
273
274
  return {
274
275
  key: e,
275
- name: T(t.name, r, a),
276
+ name: k(t.name, r, a),
276
277
  value: t.value,
277
278
  filter: t.filter
278
279
  };
279
- }), v = _.reduce((e, t) => e + t.value, 0) || 1, y = -Math.PI / 2, b = _.map((e) => {
280
+ }), h = m.reduce((e, t) => e + t.value, 0) || 1, y = -Math.PI / 2, x = m.map((e) => {
280
281
  let t = y;
281
- y += e.value / v * Math.PI * 2;
282
- let n = +(y - t > Math.PI), r = (e, t) => `${50 + t * Math.cos(e)} ${50 + t * Math.sin(e)}`, i = _.length === 1 ? "M 50 8 A 42 42 0 1 1 49.99 8 L 49.99 26 A 24 24 0 1 0 50 26 Z" : `M ${r(t, 42)} A 42 42 0 ${n} 1 ${r(y, 42)} L ${r(y, 24)} A 24 24 0 ${n} 0 ${r(t, 24)} Z`;
282
+ y += e.value / h * Math.PI * 2;
283
+ let n = +(y - t > Math.PI), r = (e, t) => `${50 + t * Math.cos(e)} ${50 + t * Math.sin(e)}`, i = m.length === 1 ? "M 50 8 A 42 42 0 1 1 49.99 8 L 49.99 26 A 24 24 0 1 0 50 26 Z" : `M ${r(t, 42)} A 42 42 0 ${n} 1 ${r(y, 42)} L ${r(y, 24)} A 24 24 0 ${n} 0 ${r(t, 24)} Z`;
283
284
  return {
284
285
  ...e,
285
286
  d: i
286
287
  };
287
288
  });
288
- return /* @__PURE__ */ m("div", {
289
+ return /* @__PURE__ */ v("div", {
289
290
  className: "flex flex-wrap items-center gap-4",
290
- children: [/* @__PURE__ */ p("svg", {
291
+ children: [/* @__PURE__ */ _("svg", {
291
292
  viewBox: "0 0 100 100",
292
293
  className: "size-32 shrink-0",
293
294
  role: "img",
294
295
  "aria-label": a("pie"),
295
- children: b.map((e) => /* @__PURE__ */ p("path", {
296
- d: e.d,
297
- fill: h[e.key],
298
- children: /* @__PURE__ */ p("title", { children: `${e.name}: ${i(e.value)}` })
296
+ children: x.map((e) => /* @__PURE__ */ _(d, {
297
+ content: `${e.name}: ${i(e.value)}`,
298
+ children: /* @__PURE__ */ _("path", {
299
+ d: e.d,
300
+ fill: l[e.key]
301
+ })
299
302
  }, e.key))
300
- }), /* @__PURE__ */ p("ul", {
303
+ }), /* @__PURE__ */ _("ul", {
301
304
  className: "min-w-0 flex-1 space-y-1 text-sm",
302
- children: b.map((n) => /* @__PURE__ */ p("li", { children: /* @__PURE__ */ m(e, {
305
+ children: x.map((n) => /* @__PURE__ */ _("li", { children: /* @__PURE__ */ v(t, {
303
306
  to: "/$workspace/issues",
304
- params: { workspace: t },
305
- search: g(n.filter),
307
+ params: { workspace: e },
308
+ search: b(n.filter),
306
309
  className: "flex items-center gap-2 hover:underline",
307
310
  children: [
308
- /* @__PURE__ */ p("span", {
311
+ /* @__PURE__ */ _("span", {
309
312
  className: "size-2.5 shrink-0 rounded-sm",
310
- style: { background: h[n.key] }
313
+ style: { background: l[n.key] }
311
314
  }),
312
- /* @__PURE__ */ p("span", {
315
+ /* @__PURE__ */ _("span", {
313
316
  className: "min-w-0 flex-1 truncate",
314
317
  children: n.name
315
318
  }),
316
- /* @__PURE__ */ p("span", {
319
+ /* @__PURE__ */ _("span", {
317
320
  className: "tabular-nums text-muted-foreground",
318
321
  children: i(n.value)
319
322
  })
@@ -322,13 +325,13 @@ function D({ workspace: t, data: n, groupBy: r, value: i }) {
322
325
  })]
323
326
  });
324
327
  }
325
- function O({ workspace: t, data: n, stacked: r, names: i, value: a }) {
326
- let s = f("dashboards"), h = d(), { keys: _, folded: v } = l(n.series.map((e) => e.key)), y = u(_), b = _.map((e) => {
327
- if (e === c) {
328
- let t = n.series.filter((e) => v.includes(e.key));
328
+ function M({ workspace: e, data: n, stacked: r, names: i, value: a }) {
329
+ let l = g("dashboards"), d = h(), [y, x] = m(null), { keys: S, folded: C } = f(n.series.map((e) => e.key)), w = p(S), T = S.map((e) => {
330
+ if (e === u) {
331
+ let t = n.series.filter((e) => C.includes(e.key));
329
332
  return {
330
333
  key: e,
331
- name: s("other"),
334
+ name: l("other"),
332
335
  values: n.weeks.map((e, n) => t.reduce((e, t) => e + (t.values[n] ?? 0), 0))
333
336
  };
334
337
  }
@@ -338,76 +341,110 @@ function O({ workspace: t, data: n, stacked: r, names: i, value: a }) {
338
341
  name: i(t),
339
342
  values: t.values
340
343
  };
341
- }), x = n.weeks.length, S = n.weeks.map((e, t) => b.reduce((e, n) => e + (n.values[t] ?? 0), 0)), C = Math.max(1, ...r ? S : b.flatMap((e) => e.values)), w = 300 / x, T = (e) => 120 - e / C * 120, E = (e) => h.dateTime(/* @__PURE__ */ new Date(`${n.weeks[e]}T00:00:00Z`), {
344
+ }), E = n.weeks.length, D = n.weeks.map((e, t) => T.reduce((e, n) => e + (n.values[t] ?? 0), 0)), O = Math.max(1, ...r ? D : T.flatMap((e) => e.values)), k = 300 / E, A = (e) => 120 - e / O * 120, j = (e) => d.dateTime(/* @__PURE__ */ new Date(`${n.weeks[e]}T00:00:00Z`), {
342
345
  month: "short",
343
346
  day: "numeric",
344
347
  timeZone: "UTC"
345
348
  });
346
- return /* @__PURE__ */ m(e, {
349
+ return /* @__PURE__ */ v(t, {
347
350
  to: "/$workspace/issues",
348
- params: { workspace: t },
349
- search: g(n.filter),
351
+ params: { workspace: e },
352
+ search: b(n.filter),
350
353
  className: "block space-y-2",
351
- children: [/* @__PURE__ */ m("svg", {
352
- viewBox: "0 0 300 134",
353
- className: "h-40 w-full overflow-visible",
354
- role: "img",
355
- "aria-label": s("overTime"),
356
- children: [
357
- /* @__PURE__ */ p("line", {
358
- x1: 0,
359
- x2: 300,
360
- y1: 120,
361
- y2: 120,
362
- className: "stroke-border"
363
- }),
364
- /* @__PURE__ */ p("text", {
365
- x: 0,
366
- y: 8,
367
- className: "fill-muted-foreground text-[8px]",
368
- children: a(C)
369
- }),
370
- r ? n.weeks.map((e, t) => {
371
- let n = 120;
372
- return /* @__PURE__ */ p("g", { children: b.map((e) => {
373
- let r = (e.values[t] ?? 0) / C * 120;
374
- return n -= r, /* @__PURE__ */ p("rect", {
375
- x: t * w + w * .15,
376
- width: w * .7,
377
- y: n,
378
- height: r,
379
- fill: y[e.key],
380
- children: /* @__PURE__ */ p("title", { children: `${E(t)} · ${e.name}: ${a(e.values[t] ?? 0)}` })
381
- }, e.key);
382
- }) }, t);
383
- }) : b.map((e) => /* @__PURE__ */ p("polyline", {
384
- fill: "none",
385
- stroke: y[e.key],
386
- strokeWidth: 2,
387
- vectorEffect: "non-scaling-stroke",
388
- points: e.values.map((e, t) => `${t * w + w / 2},${T(e)}`).join(" "),
389
- children: /* @__PURE__ */ p("title", { children: e.name })
390
- }, e.key)),
391
- [
392
- 0,
393
- Math.floor((x - 1) / 2),
394
- x - 1
395
- ].filter((e, t, n) => n.indexOf(e) === t).map((e) => /* @__PURE__ */ p("text", {
396
- x: e * w + w / 2,
397
- y: 132,
398
- textAnchor: "middle",
399
- className: "fill-muted-foreground text-[8px]",
400
- children: E(e)
401
- }, e))
402
- ]
403
- }), b.length > 1 && /* @__PURE__ */ p(o, { items: b.map((e) => ({
354
+ children: [/* @__PURE__ */ v("div", {
355
+ className: "relative",
356
+ children: [/* @__PURE__ */ v("svg", {
357
+ viewBox: "0 0 300 134",
358
+ className: "h-40 w-full overflow-visible",
359
+ role: "img",
360
+ "aria-label": l("overTime"),
361
+ onPointerMove: (e) => {
362
+ let t = e.currentTarget, n = t.getScreenCTM();
363
+ if (!n) return;
364
+ let r = Math.floor((e.clientX - n.e) / n.a / k);
365
+ if (r < 0 || r >= E) return x(null);
366
+ let i = t.getBoundingClientRect().left;
367
+ x({
368
+ i: r,
369
+ x: n.a * (r + .5) * k + n.e - i
370
+ });
371
+ },
372
+ onPointerLeave: () => x(null),
373
+ children: [
374
+ y && /* @__PURE__ */ _("rect", {
375
+ x: y.i * k,
376
+ width: k,
377
+ y: 0,
378
+ height: 120,
379
+ rx: 3,
380
+ className: "fill-muted"
381
+ }),
382
+ /* @__PURE__ */ _("line", {
383
+ x1: 0,
384
+ x2: 300,
385
+ y1: 120,
386
+ y2: 120,
387
+ className: "stroke-border"
388
+ }),
389
+ /* @__PURE__ */ _("text", {
390
+ x: 0,
391
+ y: 8,
392
+ className: "fill-muted-foreground text-[8px]",
393
+ children: a(O)
394
+ }),
395
+ r ? n.weeks.map((e, t) => {
396
+ let n = 120;
397
+ return /* @__PURE__ */ _("g", { children: T.map((e) => {
398
+ let r = (e.values[t] ?? 0) / O * 120;
399
+ return n -= r, /* @__PURE__ */ _("rect", {
400
+ x: t * k + k * .15,
401
+ width: k * .7,
402
+ y: n,
403
+ height: r,
404
+ fill: w[e.key]
405
+ }, e.key);
406
+ }) }, t);
407
+ }) : T.map((e) => /* @__PURE__ */ _("polyline", {
408
+ fill: "none",
409
+ stroke: w[e.key],
410
+ strokeWidth: 2,
411
+ vectorEffect: "non-scaling-stroke",
412
+ points: e.values.map((e, t) => `${t * k + k / 2},${A(e)}`).join(" ")
413
+ }, e.key)),
414
+ [
415
+ 0,
416
+ Math.floor((E - 1) / 2),
417
+ E - 1
418
+ ].filter((e, t, n) => n.indexOf(e) === t).map((e) => /* @__PURE__ */ _("text", {
419
+ x: e * k + k / 2,
420
+ y: 132,
421
+ textAnchor: "middle",
422
+ className: "fill-muted-foreground text-[8px]",
423
+ children: j(e)
424
+ }, e))
425
+ ]
426
+ }), y && /* @__PURE__ */ _(s, {
427
+ x: y.x,
428
+ children: /* @__PURE__ */ _(c, { ...((e) => ({
429
+ label: j(e),
430
+ total: !1,
431
+ formatValue: a,
432
+ items: T.map((t) => ({
433
+ key: t.key,
434
+ name: t.name,
435
+ value: t.values[e] ?? 0,
436
+ color: w[t.key] ?? ""
437
+ }))
438
+ }))(y.i) })
439
+ })]
440
+ }), T.length > 1 && /* @__PURE__ */ _(o, { items: T.map((e) => ({
404
441
  key: e.key,
405
442
  label: e.name,
406
- color: y[e.key] ?? ""
443
+ color: w[e.key] ?? ""
407
444
  })) })]
408
445
  });
409
446
  }
410
- function k(e, t, n) {
447
+ function N(e, t, n) {
411
448
  let r = (e) => {
412
449
  let t = String(e);
413
450
  return /[",\n]/.test(t) ? `"${t.replaceAll("\"", "\"\"")}"` : t;
@@ -430,4 +467,4 @@ function k(e, t, n) {
430
467
  ])], a = new Blob([i.map((e) => e.map(r).join(",")).join("\n")], { type: "text/csv" }), o = document.createElement("a");
431
468
  o.href = URL.createObjectURL(a), o.download = `${e.replace(/[^\w.-]+/g, "-")}.csv`, o.click(), URL.revokeObjectURL(o.href);
432
469
  }
433
- export { x as DashboardPanel, C as PanelChart, g as issuesSearch, y as sharingItems, b as sharingOf, v as starterPanels };
470
+ export { T as DashboardPanel, D as PanelChart, b as issuesSearch, C as sharingItems, w as sharingOf, S as starterPanels };