@parallelworks/tandem-web 0.171.1 → 0.171.2

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 (164) hide show
  1. package/components/AccessGrants.js +6 -6
  2. package/components/ActivityTimeline.js +57 -57
  3. package/components/ActorAvatar.js +4 -4
  4. package/components/AgentWork.js +494 -494
  5. package/components/AppLauncher.js +7 -7
  6. package/components/AreaLink.js +13 -13
  7. package/components/AreaTiles.js +13 -13
  8. package/components/AreaWork.js +22 -22
  9. package/components/Attachments.js +29 -29
  10. package/components/BlockHandle.js +3 -3
  11. package/components/BugRotation.js +8 -8
  12. package/components/CodeHostSettings.js +38 -38
  13. package/components/CollabEditor.js +13 -13
  14. package/components/CommandPalette.js +206 -206
  15. package/components/CustomFields.js +95 -95
  16. package/components/CustomerRequests.js +11 -11
  17. package/components/DashboardPanel.js +23 -23
  18. package/components/DateChip.js +21 -21
  19. package/components/DocHistory.js +14 -14
  20. package/components/DocIcon.js +4 -4
  21. package/components/DocIconPicker.js +4 -4
  22. package/components/DocLinkPicker.js +22 -22
  23. package/components/DocLook.js +16 -16
  24. package/components/DocProperties.js +81 -81
  25. package/components/DocTable.js +53 -53
  26. package/components/DocsTree.js +179 -179
  27. package/components/Editor.js +69 -69
  28. package/components/FavoritesNav.js +78 -78
  29. package/components/GitHub.js +87 -87
  30. package/components/Graph.js +14 -14
  31. package/components/HostActions.js +21 -21
  32. package/components/HostPanel.js +6 -6
  33. package/components/HoverCards.js +74 -74
  34. package/components/IssueBoard.js +13 -10
  35. package/components/IssueBreakdown.js +31 -31
  36. package/components/IssueCode.js +19 -19
  37. package/components/IssueEvent.js +12 -12
  38. package/components/IssueFilters.js +39 -39
  39. package/components/IssueGroup.js +16 -16
  40. package/components/IssueImport.js +13 -13
  41. package/components/IssueInsights.js +20 -20
  42. package/components/IssueListBlock.js +81 -81
  43. package/components/IssueRelations.js +34 -34
  44. package/components/IssueRow.js +31 -31
  45. package/components/IssueSentry.js +4 -4
  46. package/components/IssueTemplates.js +23 -23
  47. package/components/IssueTypes.js +40 -40
  48. package/components/MarkdownTransfer.js +10 -10
  49. package/components/MentionPicker.js +19 -19
  50. package/components/NewIssueDialog.js +53 -53
  51. package/components/NewProjectDialog.js +82 -82
  52. package/components/PersonActivity.js +13 -13
  53. package/components/PersonHoverCard.js +44 -44
  54. package/components/Planning.js +16 -16
  55. package/components/Reports.js +8 -8
  56. package/components/SettingsNav.js +15 -15
  57. package/components/ShareDialog.js +8 -8
  58. package/components/SharedViewer.js +23 -23
  59. package/components/SlashMenu.js +26 -26
  60. package/components/SubPages.js +10 -10
  61. package/components/TeamForm.js +9 -9
  62. package/components/TeamRepositories.js +21 -21
  63. package/components/TeamWorkflow.js +6 -6
  64. package/components/UnlinkedMentions.js +29 -29
  65. package/components/Updates.js +8 -8
  66. package/components/Widgets.js +4 -4
  67. package/components/WorkCounts.js +12 -12
  68. package/components/cycleCrumb.js +8 -8
  69. package/components/editorPlugins.js +101 -101
  70. package/components/settings.js +6 -6
  71. package/components/video.js +7 -7
  72. package/hostedApp.js +24 -24
  73. package/index.js +18 -18
  74. package/lib/assignees.js +3 -3
  75. package/lib/attachments.js +12 -12
  76. package/lib/boardMove.js +27 -27
  77. package/lib/collab.js +1 -1
  78. package/lib/docs.js +115 -115
  79. package/lib/githubLink.js +7 -7
  80. package/lib/issueList.js +51 -51
  81. package/lib/issueMenu.js +117 -117
  82. package/lib/knowledge.js +134 -134
  83. package/lib/live.js +38 -38
  84. package/lib/notifications.js +47 -47
  85. package/lib/views.js +31 -31
  86. package/package.json +24 -24
  87. package/pages/area.js +64 -64
  88. package/pages/areas.js +199 -199
  89. package/pages/decisions.js +51 -51
  90. package/pages/issues.js +120 -120
  91. package/pages/projects.js +238 -238
  92. package/pages/triage.js +109 -109
  93. package/routes/_workspace/agents/_slug2.js +127 -127
  94. package/routes/_workspace/agents/index2.js +22 -22
  95. package/routes/_workspace/dashboards/_dashboardId2.js +84 -84
  96. package/routes/_workspace/dashboards/index2.js +34 -34
  97. package/routes/_workspace/docs/_doc2.js +267 -267
  98. package/routes/_workspace/docs/space2._space.js +31 -31
  99. package/routes/_workspace/docs2.js +4 -4
  100. package/routes/_workspace/graph2.js +11 -11
  101. package/routes/_workspace/graph3.js +11 -11
  102. package/routes/_workspace/issues/_identifier2.js +477 -477
  103. package/routes/_workspace/issues/index.js +13 -13
  104. package/routes/_workspace/knowledge/_term2.js +175 -175
  105. package/routes/_workspace/knowledge/_term3.js +4 -4
  106. package/routes/_workspace/knowledge/index.js +12 -12
  107. package/routes/_workspace/knowledge/index2.js +117 -117
  108. package/routes/_workspace/measures2.js +8 -8
  109. package/routes/_workspace/measures3.js +29 -29
  110. package/routes/_workspace/notifications2.js +263 -263
  111. package/routes/_workspace/people/_username.js +10 -10
  112. package/routes/_workspace/people/_username2.js +41 -41
  113. package/routes/_workspace/projects/_projectId3.js +303 -303
  114. package/routes/_workspace/projects/_projectId4.js +4 -4
  115. package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +28 -28
  116. package/routes/_workspace/projects/_projectId_4.milestones._milestoneId.js +4 -4
  117. package/routes/_workspace/projects/index.js +8 -8
  118. package/routes/_workspace/settings/account2.js +8 -8
  119. package/routes/_workspace/settings/audit-log2.js +8 -8
  120. package/routes/_workspace/settings/audit-log3.js +155 -155
  121. package/routes/_workspace/settings/connections2.js +4 -4
  122. package/routes/_workspace/settings/fields2.js +5 -5
  123. package/routes/_workspace/settings/github2.js +11 -11
  124. package/routes/_workspace/settings/gitlab2.js +5 -5
  125. package/routes/_workspace/settings/groups2.js +52 -52
  126. package/routes/_workspace/settings/import2.js +39 -39
  127. package/routes/_workspace/settings/index2.js +5 -5
  128. package/routes/_workspace/settings/intercom2.js +11 -11
  129. package/routes/_workspace/settings/labels2.js +33 -33
  130. package/routes/_workspace/settings/members2.js +81 -81
  131. package/routes/_workspace/settings/notifications2.js +46 -46
  132. package/routes/_workspace/settings/parallelworks2.js +20 -20
  133. package/routes/_workspace/settings/roles2.js +41 -41
  134. package/routes/_workspace/settings/runners2.js +15 -15
  135. package/routes/_workspace/settings/sentry2.js +15 -15
  136. package/routes/_workspace/settings/sessions2.js +9 -9
  137. package/routes/_workspace/settings/sessions3.js +4 -4
  138. package/routes/_workspace/settings/slack2.js +12 -12
  139. package/routes/_workspace/settings/sso2.js +37 -37
  140. package/routes/_workspace/settings/sso3.js +7 -7
  141. package/routes/_workspace/settings/teams2.js +29 -29
  142. package/routes/_workspace/settings/tokens2.js +32 -32
  143. package/routes/_workspace/settings/tokens3.js +4 -4
  144. package/routes/_workspace/settings/webhooks2.js +41 -41
  145. package/routes/_workspace/settings/zendesk2.js +11 -11
  146. package/routes/_workspace/teams/_key/cycles/_number2.js +33 -33
  147. package/routes/_workspace/teams/_key/cycles/_number3.js +7 -7
  148. package/routes/_workspace/teams/_key/cycles/index2.js +37 -37
  149. package/routes/_workspace/teams/_key/issues.js +10 -10
  150. package/routes/_workspace/teams/_key/projects.js +6 -6
  151. package/routes/_workspace/teams/_key/settings2.js +396 -396
  152. package/routes/_workspace2.js +308 -308
  153. package/routes/_workspace3.js +8 -8
  154. package/routes/device2.js +4 -4
  155. package/routes/device3.js +4 -4
  156. package/routes/docs/_tag/_endpoint2.js +3 -3
  157. package/routes/docs/_tag/index2.js +3 -3
  158. package/routes/docs/route2.js +7 -7
  159. package/routes/index2.js +5 -5
  160. package/routes/login2.js +10 -10
  161. package/routes/new2.js +12 -12
  162. package/routes/new3.js +5 -5
  163. package/routes/request2._token.js +6 -6
  164. package/routes/share2._secret.js +4 -4
@@ -1,10 +1,10 @@
1
- import { issueQuery as e } from "../api/queries.js";
2
- import { invalidateIssueViews as t } from "../api/mutations.js";
3
- import { AddIcon as n } from "./icons.js";
4
- import { PropertyField as r, usePropertyText as i } from "./DocProperties.js";
5
- import { customFieldsQuery as a, fieldKinds as o, fieldsFor as s, hasValue as c, setIssueFields as l, setProjectFields as u, useCustomFieldActions as d } from "../lib/customFields.js";
6
- import { useConfirm as f } from "../lib/confirm.js";
7
- import { issueTypesQuery as p, typeShows as m } from "../lib/issueTypes.js";
1
+ import { invalidateIssueViews as e } from "../api/mutations.js";
2
+ import { issueQuery as t } from "../api/queries.js";
3
+ import { useConfirm as n } from "../lib/confirm.js";
4
+ import { customFieldsQuery as r, fieldKinds as i, fieldsFor as a, hasValue as o, setIssueFields as s, setProjectFields as c, useCustomFieldActions as l } from "../lib/customFields.js";
5
+ import { issueTypesQuery as u, typeShows as d } from "../lib/issueTypes.js";
6
+ import { PropertyField as f, usePropertyText as p } from "./DocProperties.js";
7
+ import { AddIcon as m } from "./icons.js";
8
8
  import { Button as h, Checkbox as g, ErrorText as _, IconButton as v, Input as y, Select as b, SettingsCard as x, Textarea as S, menuDivider as C, useOpenMenu as w } from "@parallelworks/ui";
9
9
  import { useId as T, useState as E } from "react";
10
10
  import { useErrorMessage as D } from "@parallelworks/problem/react";
@@ -13,16 +13,16 @@ import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
13
13
  import { useMutation as M, useQuery as N, useQueryClient as P } from "@tanstack/react-query";
14
14
  // src/components/CustomFields.tsx
15
15
  function F(e) {
16
- let t = i(e);
16
+ let t = p(e);
17
17
  return (e, n) => t(e, n);
18
18
  }
19
19
  function I({ workspace: n, issue: i, label: o }) {
20
- let c = D(), u = P(), { data: d } = N(a(n)), { data: f } = N(p(n)), h = f?.find((e) => e.id === i.type?.id), g = s(d, "issue", i.teamId).filter((e) => m(h, e.id)), v = e(n, i.identifier).queryKey, y = M({
21
- mutationFn: (e) => l(n, i.identifier, e),
20
+ let c = D(), l = P(), { data: p } = N(r(n)), { data: m } = N(u(n)), h = m?.find((e) => e.id === i.type?.id), g = a(p, "issue", i.teamId).filter((e) => d(h, e.id)), v = t(n, i.identifier).queryKey, y = M({
21
+ mutationFn: (e) => s(n, i.identifier, e),
22
22
  onMutate: async (e) => {
23
- await u.cancelQueries({ queryKey: v });
24
- let t = u.getQueryData(v);
25
- return t && u.setQueryData(v, {
23
+ await l.cancelQueries({ queryKey: v });
24
+ let t = l.getQueryData(v);
25
+ return t && l.setQueryData(v, {
26
26
  ...t,
27
27
  fields: {
28
28
  ...t.fields,
@@ -31,14 +31,14 @@ function I({ workspace: n, issue: i, label: o }) {
31
31
  }), { previous: t };
32
32
  },
33
33
  onError: (e, t, n) => {
34
- n?.previous && u.setQueryData(v, n.previous);
34
+ n?.previous && l.setQueryData(v, n.previous);
35
35
  },
36
- onSuccess: (e) => u.setQueryData(v, e),
37
- onSettled: () => t(u, n, i.identifier)
36
+ onSuccess: (e) => l.setQueryData(v, e),
37
+ onSettled: () => e(l, n, i.identifier)
38
38
  });
39
39
  return g.length === 0 ? null : /* @__PURE__ */ j(k, { children: [g.map((e) => o(e.name, /* @__PURE__ */ A("div", {
40
40
  className: "px-2",
41
- children: /* @__PURE__ */ A(r, {
41
+ children: /* @__PURE__ */ A(f, {
42
42
  workspace: n,
43
43
  property: e,
44
44
  value: i.fields[e.id],
@@ -51,41 +51,41 @@ function I({ workspace: n, issue: i, label: o }) {
51
51
  })] });
52
52
  }
53
53
  function L({ workspace: e, project: t, editable: n, onChange: i }) {
54
- let o = O("customFields"), c = D(), { data: l } = N(a(e)), d = s(l, "project"), f = M({
55
- mutationFn: (n) => u(e, t.id, n),
54
+ let o = O("customFields"), s = D(), { data: l } = N(r(e)), u = a(l, "project"), d = M({
55
+ mutationFn: (n) => c(e, t.id, n),
56
56
  onSuccess: i
57
57
  });
58
- return d.length === 0 ? null : /* @__PURE__ */ j("section", {
58
+ return u.length === 0 ? null : /* @__PURE__ */ j("section", {
59
59
  "aria-label": o("title"),
60
60
  className: "max-w-xl space-y-0.5 text-sm",
61
- children: [d.map((i) => /* @__PURE__ */ j("div", {
61
+ children: [u.map((r) => /* @__PURE__ */ j("div", {
62
62
  className: "flex min-h-8 items-center gap-2",
63
63
  children: [/* @__PURE__ */ A("span", {
64
64
  className: "w-36 shrink-0 truncate text-muted-foreground",
65
- children: i.name
65
+ children: r.name
66
66
  }), /* @__PURE__ */ A("div", {
67
67
  className: "min-w-0 flex-1",
68
- children: /* @__PURE__ */ A(r, {
68
+ children: /* @__PURE__ */ A(f, {
69
69
  workspace: e,
70
- property: i,
71
- value: t.fields[i.id],
70
+ property: r,
71
+ value: t.fields[r.id],
72
72
  editable: n,
73
- onChange: (e) => f.mutate({ [i.id]: e })
73
+ onChange: (e) => d.mutate({ [r.id]: e })
74
74
  })
75
75
  })]
76
- }, i.id)), f.error && /* @__PURE__ */ A(_, { children: c(f.error) })]
76
+ }, r.id)), d.error && /* @__PURE__ */ A(_, { children: s(d.error) })]
77
77
  });
78
78
  }
79
- function R({ workspace: e, teamId: t, typeId: n, values: i, onChange: o }) {
80
- let l = O("customFields"), { data: u } = N(a(e)), { data: d } = N(p(e)), f = d?.find((e) => e.id === n), h = s(u, "issue", t).filter((e) => m(f, e.id)).map((e) => f?.requiredFieldIds.includes(e.id) ? {
79
+ function R({ workspace: e, teamId: t, typeId: n, values: i, onChange: s }) {
80
+ let c = O("customFields"), { data: l } = N(r(e)), { data: p } = N(u(e)), m = p?.find((e) => e.id === n), h = a(l, "issue", t).filter((e) => d(m, e.id)).map((e) => m?.requiredFieldIds.includes(e.id) ? {
81
81
  ...e,
82
82
  required: !0
83
- } : e).filter((e) => e.required || c(i[e.id]));
83
+ } : e).filter((e) => e.required || o(i[e.id]));
84
84
  return h.length === 0 ? null : /* @__PURE__ */ j("fieldset", {
85
85
  className: "space-y-0.5 text-sm",
86
86
  children: [/* @__PURE__ */ A("legend", {
87
87
  className: "sr-only",
88
- children: l("title")
88
+ children: c("title")
89
89
  }), h.map((t) => /* @__PURE__ */ j("div", {
90
90
  className: "flex min-h-8 items-center gap-2",
91
91
  children: [/* @__PURE__ */ j("span", {
@@ -96,16 +96,16 @@ function R({ workspace: e, teamId: t, typeId: n, values: i, onChange: o }) {
96
96
  children: [" ", "*"]
97
97
  }), /* @__PURE__ */ A("span", {
98
98
  className: "sr-only",
99
- children: l("required")
99
+ children: c("required")
100
100
  })] })]
101
101
  }), /* @__PURE__ */ A("div", {
102
102
  className: "min-w-0 flex-1",
103
- children: /* @__PURE__ */ A(r, {
103
+ children: /* @__PURE__ */ A(f, {
104
104
  workspace: e,
105
105
  property: t,
106
106
  value: i[t.id],
107
107
  editable: !0,
108
- onChange: (e) => o({
108
+ onChange: (e) => s({
109
109
  ...i,
110
110
  [t.id]: e
111
111
  })
@@ -114,84 +114,84 @@ function R({ workspace: e, teamId: t, typeId: n, values: i, onChange: o }) {
114
114
  }, t.id))]
115
115
  });
116
116
  }
117
- function z({ workspace: e, target: t, team: r }) {
118
- let i = O("customFields"), { data: o } = N(a(e)), s = (o ?? []).filter((e) => e.target === t && (r ? e.teamId === r.id : !e.teamId)).sort((e, t) => e.position - t.position), [c, l] = E(!1);
117
+ function z({ workspace: e, target: t, team: n }) {
118
+ let i = O("customFields"), { data: a } = N(r(e)), o = (a ?? []).filter((e) => e.target === t && (n ? e.teamId === n.id : !e.teamId)).sort((e, t) => e.position - t.position), [s, c] = E(!1);
119
119
  return /* @__PURE__ */ j(x, {
120
120
  title: i(t === "issue" ? "issueFields" : "projectFields"),
121
- description: i(r ? "teamFieldsHelp" : t === "issue" ? "issueFieldsHelp" : "projectFieldsHelp"),
121
+ description: i(n ? "teamFieldsHelp" : t === "issue" ? "issueFieldsHelp" : "projectFieldsHelp"),
122
122
  action: /* @__PURE__ */ A(h, {
123
123
  size: "sm",
124
- icon: /* @__PURE__ */ A(n, {}),
125
- onClick: () => l(!0),
124
+ icon: /* @__PURE__ */ A(m, {}),
125
+ onClick: () => c(!0),
126
126
  children: i("add")
127
127
  }),
128
- children: [c && /* @__PURE__ */ A(V, {
128
+ children: [s && /* @__PURE__ */ A(V, {
129
129
  workspace: e,
130
130
  target: t,
131
- team: r?.key,
132
- onDone: () => l(!1)
133
- }), s.length === 0 && !c ? /* @__PURE__ */ A("p", {
131
+ team: n?.key,
132
+ onDone: () => c(!1)
133
+ }), o.length === 0 && !s ? /* @__PURE__ */ A("p", {
134
134
  className: "px-3 py-3 text-sm text-muted-foreground",
135
135
  children: i("none")
136
136
  }) : /* @__PURE__ */ A("ul", {
137
137
  className: "divide-y divide-border",
138
- children: s.map((t, n) => /* @__PURE__ */ A(B, {
138
+ children: o.map((t, n) => /* @__PURE__ */ A(B, {
139
139
  workspace: e,
140
140
  field: t,
141
- before: s[n - 1],
142
- after: s[n + 1]
141
+ before: o[n - 1],
142
+ after: o[n + 1]
143
143
  }, t.id))
144
144
  })]
145
145
  });
146
146
  }
147
- function B({ workspace: e, field: t, before: n, after: r }) {
148
- let i = O("customFields"), a = d(e), o = w(), { confirm: s, dialog: c } = f(), [l, u] = E(!1), p = (e, n) => e && a.update.mutate({
147
+ function B({ workspace: e, field: t, before: r, after: i }) {
148
+ let a = O("customFields"), o = l(e), s = w(), { confirm: c, dialog: u } = n(), [d, f] = E(!1), p = (e, n) => e && o.update.mutate({
149
149
  id: t.id,
150
- position: n ? (e.position + n.position) / 2 : e.position + (e === r ? 1 : -1)
151
- }), m = () => s({
152
- title: i("deleteTitle", { name: t.name }),
153
- description: i("deleteDescription", { count: t.values }),
154
- confirmLabel: i("delete"),
150
+ position: n ? (e.position + n.position) / 2 : e.position + (e === i ? 1 : -1)
151
+ }), m = () => c({
152
+ title: a("deleteTitle", { name: t.name }),
153
+ description: a("deleteDescription", { count: t.values }),
154
+ confirmLabel: a("delete"),
155
155
  destructive: !0,
156
- onConfirm: () => a.remove.mutateAsync(t.id)
156
+ onConfirm: () => o.remove.mutateAsync(t.id)
157
157
  }), h = () => [
158
158
  {
159
- label: i("edit"),
160
- onClick: () => u(!0)
159
+ label: a("edit"),
160
+ onClick: () => f(!0)
161
161
  },
162
- ...n ? [{
163
- label: i("moveUp"),
164
- onClick: () => p(n, void 0)
165
- }] : [],
166
162
  ...r ? [{
167
- label: i("moveDown"),
163
+ label: a("moveUp"),
168
164
  onClick: () => p(r, void 0)
169
165
  }] : [],
166
+ ...i ? [{
167
+ label: a("moveDown"),
168
+ onClick: () => p(i, void 0)
169
+ }] : [],
170
170
  {
171
- label: t.archivedAt ? i("restore") : i("archive"),
172
- onClick: () => a.update.mutate({
171
+ label: t.archivedAt ? a("restore") : a("archive"),
172
+ onClick: () => o.update.mutate({
173
173
  id: t.id,
174
174
  archived: !t.archivedAt
175
175
  })
176
176
  },
177
177
  C,
178
178
  {
179
- label: i("delete"),
179
+ label: a("delete"),
180
180
  destructive: !0,
181
181
  onClick: m
182
182
  }
183
183
  ];
184
- return l ? /* @__PURE__ */ A("li", {
184
+ return d ? /* @__PURE__ */ A("li", {
185
185
  className: "p-2",
186
186
  children: /* @__PURE__ */ A(V, {
187
187
  workspace: e,
188
188
  target: t.target,
189
189
  field: t,
190
- onDone: () => u(!1)
190
+ onDone: () => f(!1)
191
191
  })
192
192
  }) : /* @__PURE__ */ j("li", {
193
193
  className: "flex min-h-10 items-center gap-3 px-3 py-1.5",
194
- onContextMenu: (e) => o(e, h()),
194
+ onContextMenu: (e) => s(e, h()),
195
195
  children: [
196
196
  /* @__PURE__ */ j("div", {
197
197
  className: "min-w-0 flex-1",
@@ -199,7 +199,7 @@ function B({ workspace: e, field: t, before: n, after: r }) {
199
199
  className: `truncate text-sm ${t.archivedAt ? "text-muted-foreground" : ""}`,
200
200
  children: [t.name, t.required && /* @__PURE__ */ A("span", {
201
201
  className: "ml-2 text-xs text-muted-foreground",
202
- children: i("required")
202
+ children: a("required")
203
203
  })]
204
204
  }), t.description && /* @__PURE__ */ A("p", {
205
205
  className: "truncate text-xs text-muted-foreground",
@@ -208,32 +208,32 @@ function B({ workspace: e, field: t, before: n, after: r }) {
208
208
  }),
209
209
  t.archivedAt && /* @__PURE__ */ A("span", {
210
210
  className: "shrink-0 text-xs text-muted-foreground",
211
- children: i("archived")
211
+ children: a("archived")
212
212
  }),
213
213
  /* @__PURE__ */ A("span", {
214
214
  className: "shrink-0 text-xs text-muted-foreground",
215
- children: i(`kinds.${t.kind}`)
215
+ children: a(`kinds.${t.kind}`)
216
216
  }),
217
217
  /* @__PURE__ */ A("span", {
218
218
  className: "w-20 shrink-0 text-right text-xs tabular-nums text-muted-foreground",
219
- children: i("values", { count: t.values })
219
+ children: a("values", { count: t.values })
220
220
  }),
221
221
  /* @__PURE__ */ A(v, {
222
222
  variant: "ghost",
223
223
  size: "sm",
224
- label: i("actions", { name: t.name }),
224
+ label: a("actions", { name: t.name }),
225
225
  icon: /* @__PURE__ */ A("span", {
226
226
  "aria-hidden": !0,
227
227
  children: "⋯"
228
228
  }),
229
- onClick: (e) => o(e, h())
229
+ onClick: (e) => s(e, h())
230
230
  }),
231
- c
231
+ u
232
232
  ]
233
233
  });
234
234
  }
235
- function V({ workspace: e, target: t, team: n, field: r, onDone: i }) {
236
- let a = O("customFields"), s = D(), c = d(e), [l, u] = E(r?.name ?? ""), [f, p] = E(r?.description ?? ""), [m, v] = E(r?.kind ?? "text"), [x, C] = E(r?.required ?? !1), w = T(), [k, M] = E((r?.options ?? []).map((e) => e.name).join("\n")), N = m === "select" || m === "multi_select", P = () => k.split("\n").map((e) => e.trim()).filter(Boolean).map((e) => {
235
+ function V({ workspace: e, target: t, team: n, field: r, onDone: a }) {
236
+ let o = O("customFields"), s = D(), c = l(e), [u, d] = E(r?.name ?? ""), [f, p] = E(r?.description ?? ""), [m, v] = E(r?.kind ?? "text"), [x, C] = E(r?.required ?? !1), w = T(), [k, M] = E((r?.options ?? []).map((e) => e.name).join("\n")), N = m === "select" || m === "multi_select", P = () => k.split("\n").map((e) => e.trim()).filter(Boolean).map((e) => {
237
237
  let t = r?.options.find((t) => t.name === e)?.id;
238
238
  return {
239
239
  name: e,
@@ -244,19 +244,19 @@ function V({ workspace: e, target: t, team: n, field: r, onDone: i }) {
244
244
  onSubmit: (e) => {
245
245
  e.preventDefault(), r ? c.update.mutate({
246
246
  id: r.id,
247
- name: l,
247
+ name: u,
248
248
  description: f,
249
249
  ...t === "issue" && { required: x },
250
250
  ...N && { options: P() }
251
- }, { onSuccess: i }) : c.create.mutate({
251
+ }, { onSuccess: a }) : c.create.mutate({
252
252
  target: t,
253
253
  ...n && { team: n },
254
- name: l,
254
+ name: u,
255
255
  description: f,
256
256
  kind: m,
257
257
  ...t === "issue" && { required: x },
258
258
  ...N && { options: P() }
259
- }, { onSuccess: i });
259
+ }, { onSuccess: a });
260
260
  },
261
261
  className: "space-y-3 rounded-md border border-border p-3 text-sm",
262
262
  children: [
@@ -264,9 +264,9 @@ function V({ workspace: e, target: t, team: n, field: r, onDone: i }) {
264
264
  className: "grid gap-3 sm:grid-cols-2",
265
265
  children: [/* @__PURE__ */ j("label", {
266
266
  className: "block text-xs font-medium text-muted-foreground",
267
- children: [a("name"), /* @__PURE__ */ A(y, {
268
- value: l,
269
- onChange: (e) => u(e.target.value),
267
+ children: [o("name"), /* @__PURE__ */ A(y, {
268
+ value: u,
269
+ onChange: (e) => d(e.target.value),
270
270
  required: !0,
271
271
  maxLength: 60,
272
272
  className: "mt-1",
@@ -274,16 +274,16 @@ function V({ workspace: e, target: t, team: n, field: r, onDone: i }) {
274
274
  })]
275
275
  }), /* @__PURE__ */ j("div", {
276
276
  className: "text-xs font-medium text-muted-foreground",
277
- children: [a("kind"), /* @__PURE__ */ A("div", {
277
+ children: [o("kind"), /* @__PURE__ */ A("div", {
278
278
  className: "mt-1",
279
279
  children: /* @__PURE__ */ A(b, {
280
280
  value: m,
281
- items: o.map((e) => ({
281
+ items: i.map((e) => ({
282
282
  value: e,
283
- label: a(`kinds.${e}`)
283
+ label: o(`kinds.${e}`)
284
284
  })),
285
285
  onValueChange: v,
286
- "aria-label": a("kind"),
286
+ "aria-label": o("kind"),
287
287
  width: "fill",
288
288
  disabled: !!r
289
289
  })
@@ -292,7 +292,7 @@ function V({ workspace: e, target: t, team: n, field: r, onDone: i }) {
292
292
  }),
293
293
  /* @__PURE__ */ j("label", {
294
294
  className: "block text-xs font-medium text-muted-foreground",
295
- children: [a("description"), /* @__PURE__ */ A(y, {
295
+ children: [o("description"), /* @__PURE__ */ A(y, {
296
296
  value: f,
297
297
  onChange: (e) => p(e.target.value),
298
298
  maxLength: 500,
@@ -302,7 +302,7 @@ function V({ workspace: e, target: t, team: n, field: r, onDone: i }) {
302
302
  N && /* @__PURE__ */ j("label", {
303
303
  className: "block text-xs font-medium text-muted-foreground",
304
304
  children: [
305
- a("options"),
305
+ o("options"),
306
306
  /* @__PURE__ */ A(S, {
307
307
  value: k,
308
308
  onChange: (e) => M(e.target.value),
@@ -311,7 +311,7 @@ function V({ workspace: e, target: t, team: n, field: r, onDone: i }) {
311
311
  }),
312
312
  /* @__PURE__ */ A("span", {
313
313
  className: "mt-1 block font-normal",
314
- children: a("optionsHint")
314
+ children: o("optionsHint")
315
315
  })
316
316
  ]
317
317
  }),
@@ -323,7 +323,7 @@ function V({ workspace: e, target: t, team: n, field: r, onDone: i }) {
323
323
  onCheckedChange: (e) => C(e === !0)
324
324
  }), /* @__PURE__ */ A("label", {
325
325
  htmlFor: w,
326
- children: a("requiredLabel")
326
+ children: o("requiredLabel")
327
327
  })]
328
328
  }),
329
329
  F.error && /* @__PURE__ */ A(_, { children: s(F.error) }),
@@ -332,15 +332,15 @@ function V({ workspace: e, target: t, team: n, field: r, onDone: i }) {
332
332
  children: [/* @__PURE__ */ A(h, {
333
333
  size: "sm",
334
334
  variant: "ghost",
335
- onClick: i,
336
- children: a("cancel")
335
+ onClick: a,
336
+ children: o("cancel")
337
337
  }), /* @__PURE__ */ A(h, {
338
338
  type: "submit",
339
339
  size: "sm",
340
340
  variant: "primary",
341
341
  loading: F.isPending,
342
- disabled: !l.trim(),
343
- children: a(r ? "save" : "add")
342
+ disabled: !u.trim(),
343
+ children: o(r ? "save" : "add")
344
344
  })]
345
345
  })
346
346
  ]
@@ -1,8 +1,8 @@
1
1
  import { api as e, unwrap as t } from "../api/client.js";
2
- import { customerRequestsQuery as n, customersQuery as r } from "../api/queries.js";
3
- import { invalidateIssueLists as i } from "../api/mutations.js";
4
- import { AddIcon as a, CloseIcon as o, LinkIcon as s, UsersIcon as c } from "./icons.js";
5
- import { useCan as l } from "../lib/roles.js";
2
+ import { invalidateIssueLists as n } from "../api/mutations.js";
3
+ import { customerRequestsQuery as r, customersQuery as i } from "../api/queries.js";
4
+ import { useCan as a } from "../lib/roles.js";
5
+ import { AddIcon as o, CloseIcon as s, LinkIcon as c, UsersIcon as l } from "./icons.js";
6
6
  import { Button as u, Card as d, ErrorText as f, IconButton as p, Input as m, Textarea as h } from "@parallelworks/ui";
7
7
  import { useId as g, useState as _ } from "react";
8
8
  import { useErrorMessage as v } from "@parallelworks/problem/react";
@@ -11,11 +11,11 @@ import { jsx as b, jsxs as x } from "react/jsx-runtime";
11
11
  import { useMutation as S, useQuery as C, useQueryClient as w } from "@tanstack/react-query";
12
12
  // src/components/CustomerRequests.tsx
13
13
  function T({ workspace: T, identifier: E, enabled: D }) {
14
- let O = y("customerRequests"), k = v(), A = w(), j = l(T, "manage_customers"), M = j && D, { data: N = [] } = C(n(T, E)), { data: P = [] } = C({
15
- ...r(T),
14
+ let O = y("customerRequests"), k = v(), A = w(), j = a(T, "manage_customers"), M = j && D, { data: N = [] } = C(r(T, E)), { data: P = [] } = C({
15
+ ...i(T),
16
16
  enabled: M
17
17
  }), [F, I] = _(!1), [L, R] = _(""), [z, B] = _(""), [V, H] = _(""), U = g(), W = () => {
18
- A.invalidateQueries({ queryKey: n(T, E).queryKey }), A.invalidateQueries({ queryKey: r(T).queryKey }), i(A, T);
18
+ A.invalidateQueries({ queryKey: r(T, E).queryKey }), A.invalidateQueries({ queryKey: i(T).queryKey }), n(A, T);
19
19
  }, G = S({
20
20
  mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/requests", {
21
21
  params: { path: {
@@ -61,7 +61,7 @@ function T({ workspace: T, identifier: E, enabled: D }) {
61
61
  children: N.map((e) => /* @__PURE__ */ x("li", {
62
62
  className: "flex items-start gap-2 px-3 py-2 text-sm",
63
63
  children: [
64
- /* @__PURE__ */ b(c, { className: "mt-0.5 size-3.5 shrink-0 text-muted-foreground" }),
64
+ /* @__PURE__ */ b(l, { className: "mt-0.5 size-3.5 shrink-0 text-muted-foreground" }),
65
65
  /* @__PURE__ */ x("div", {
66
66
  className: "min-w-0 flex-1",
67
67
  children: [/* @__PURE__ */ b("span", {
@@ -77,12 +77,12 @@ function T({ workspace: T, identifier: E, enabled: D }) {
77
77
  target: "_blank",
78
78
  rel: "noreferrer",
79
79
  className: "inline-flex shrink-0 items-center gap-1 text-xs text-primary hover:underline",
80
- children: [/* @__PURE__ */ b(s, { className: "size-3" }), O("source")]
80
+ children: [/* @__PURE__ */ b(c, { className: "size-3" }), O("source")]
81
81
  }),
82
82
  j && /* @__PURE__ */ b(p, {
83
83
  variant: "ghost",
84
84
  size: "sm",
85
- icon: /* @__PURE__ */ b(o, {}),
85
+ icon: /* @__PURE__ */ b(s, {}),
86
86
  label: O("remove", { name: e.customer.name }),
87
87
  onClick: () => K.mutate(e.id),
88
88
  className: "-my-1"
@@ -151,7 +151,7 @@ function T({ workspace: T, identifier: E, enabled: D }) {
151
151
  type: "button",
152
152
  onClick: () => I(!0),
153
153
  className: "mt-1.5 flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground",
154
- children: [/* @__PURE__ */ b(a, { className: "size-3.5" }), O("addRequest")]
154
+ children: [/* @__PURE__ */ b(o, { className: "size-3.5" }), O("addRequest")]
155
155
  }))
156
156
  ]
157
157
  });
@@ -1,5 +1,5 @@
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
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
5
  import { useFormatter as d, useTranslations as f } from "use-intl";
@@ -86,9 +86,9 @@ function b(e) {
86
86
  team: e.slice(5)
87
87
  };
88
88
  }
89
- function x({ workspace: e, panel: o, onEdit: c, onDelete: l }) {
89
+ function x({ workspace: t, panel: o, onEdit: c, onDelete: l }) {
90
90
  let u = f("dashboards"), { data: d, isPending: g, isError: _ } = h({
91
- ...t(e, o.chart, o.spec),
91
+ ...e(t, o.chart, o.spec),
92
92
  refetchInterval: 6e4
93
93
  });
94
94
  return /* @__PURE__ */ m(a, {
@@ -133,7 +133,7 @@ function x({ workspace: e, panel: o, onEdit: c, onDelete: l }) {
133
133
  className: "text-sm text-danger",
134
134
  children: u("failed")
135
135
  }) : /* @__PURE__ */ p(C, {
136
- workspace: e,
136
+ workspace: t,
137
137
  panel: o,
138
138
  data: d
139
139
  })
@@ -144,11 +144,11 @@ function S(e) {
144
144
  let t = d(), n = f("dashboards");
145
145
  return (r) => e === "days" ? n("daysValue", { days: t.number(r, { maximumFractionDigits: 1 }) }) : t.number(r, { maximumFractionDigits: +(e === "points") });
146
146
  }
147
- function C({ workspace: t, panel: n, data: r }) {
147
+ function C({ workspace: e, panel: n, data: r }) {
148
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, {
149
+ return s === "number" ? /* @__PURE__ */ m(t, {
150
150
  to: "/$workspace/issues",
151
- params: { workspace: t },
151
+ params: { workspace: e },
152
152
  search: g(r.filter),
153
153
  className: "flex h-full flex-col items-start justify-center gap-1 rounded-md hover:bg-muted",
154
154
  children: [/* @__PURE__ */ p("span", {
@@ -160,10 +160,10 @@ function C({ workspace: t, panel: n, data: r }) {
160
160
  })]
161
161
  }) : s === "list" ? r.issues.length === 0 ? /* @__PURE__ */ p(w, {}) : /* @__PURE__ */ p("ul", {
162
162
  className: "divide-y divide-border text-sm",
163
- children: r.issues.map((n) => /* @__PURE__ */ p("li", { children: /* @__PURE__ */ m(e, {
163
+ children: r.issues.map((n) => /* @__PURE__ */ p("li", { children: /* @__PURE__ */ m(t, {
164
164
  to: "/$workspace/issues/$identifier",
165
165
  params: {
166
- workspace: t,
166
+ workspace: e,
167
167
  identifier: n.identifier
168
168
  },
169
169
  className: "flex min-w-0 gap-2 py-1.5 hover:bg-muted",
@@ -197,9 +197,9 @@ function C({ workspace: t, panel: n, data: r }) {
197
197
  className: "divide-y divide-border",
198
198
  children: r.rows.map((r) => /* @__PURE__ */ m("tr", { children: [/* @__PURE__ */ p("td", {
199
199
  className: "py-1.5",
200
- children: /* @__PURE__ */ p(e, {
200
+ children: /* @__PURE__ */ p(t, {
201
201
  to: "/$workspace/issues",
202
- params: { workspace: t },
202
+ params: { workspace: e },
203
203
  search: g(r.filter),
204
204
  className: "hover:underline",
205
205
  children: T(r.name, n.spec.groupBy, i)
@@ -210,13 +210,13 @@ function C({ workspace: t, panel: n, data: r }) {
210
210
  })] }, r.key || "-"))
211
211
  })]
212
212
  }) : o && (s === "line" || s === "stacked" || _.has(n.spec.measure)) ? /* @__PURE__ */ p(O, {
213
- workspace: t,
213
+ workspace: e,
214
214
  data: r,
215
215
  stacked: s !== "line",
216
216
  names: (e) => e.key === "created" || e.key === "completed" ? i(`series.${e.key}`) : T(e.name, n.spec.groupBy, i),
217
217
  value: a
218
218
  }) : r.rows.length === 0 || r.rows.every((e) => e.value === 0) ? /* @__PURE__ */ p(w, {}) : p(s === "pie" ? D : E, {
219
- workspace: t,
219
+ workspace: e,
220
220
  data: r,
221
221
  groupBy: n.spec.groupBy,
222
222
  value: a
@@ -232,13 +232,13 @@ function w() {
232
232
  function T(e, t, n) {
233
233
  return t === "priority" ? n(`priorities.${e}`) : t === "status" && e ? n(`categories.${e}`) : t ? e || n("none") : n("all");
234
234
  }
235
- function E({ workspace: t, data: n, groupBy: r, value: i }) {
235
+ function E({ workspace: e, data: n, groupBy: r, value: i }) {
236
236
  let a = f("dashboards"), o = Math.max(...n.rows.map((e) => e.value), 1);
237
237
  return /* @__PURE__ */ p("ul", {
238
238
  className: "space-y-1.5",
239
- children: n.rows.slice(0, 12).map((n) => /* @__PURE__ */ p("li", { children: /* @__PURE__ */ m(e, {
239
+ children: n.rows.slice(0, 12).map((n) => /* @__PURE__ */ p("li", { children: /* @__PURE__ */ m(t, {
240
240
  to: "/$workspace/issues",
241
- params: { workspace: t },
241
+ params: { workspace: e },
242
242
  search: g(n.filter),
243
243
  className: "group grid grid-cols-[minmax(0,9rem)_1fr_auto] items-center gap-2 text-sm",
244
244
  children: [
@@ -261,7 +261,7 @@ function E({ workspace: t, data: n, groupBy: r, value: i }) {
261
261
  }) }, n.key))
262
262
  });
263
263
  }
264
- function D({ workspace: t, data: n, groupBy: r, value: i }) {
264
+ function D({ workspace: e, data: n, groupBy: r, value: i }) {
265
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
266
  if (e === c) return {
267
267
  key: e,
@@ -299,9 +299,9 @@ function D({ workspace: t, data: n, groupBy: r, value: i }) {
299
299
  }, e.key))
300
300
  }), /* @__PURE__ */ p("ul", {
301
301
  className: "min-w-0 flex-1 space-y-1 text-sm",
302
- children: b.map((n) => /* @__PURE__ */ p("li", { children: /* @__PURE__ */ m(e, {
302
+ children: b.map((n) => /* @__PURE__ */ p("li", { children: /* @__PURE__ */ m(t, {
303
303
  to: "/$workspace/issues",
304
- params: { workspace: t },
304
+ params: { workspace: e },
305
305
  search: g(n.filter),
306
306
  className: "flex items-center gap-2 hover:underline",
307
307
  children: [
@@ -322,7 +322,7 @@ function D({ workspace: t, data: n, groupBy: r, value: i }) {
322
322
  })]
323
323
  });
324
324
  }
325
- function O({ workspace: t, data: n, stacked: r, names: i, value: a }) {
325
+ function O({ workspace: e, data: n, stacked: r, names: i, value: a }) {
326
326
  let s = f("dashboards"), h = d(), { keys: _, folded: v } = l(n.series.map((e) => e.key)), y = u(_), b = _.map((e) => {
327
327
  if (e === c) {
328
328
  let t = n.series.filter((e) => v.includes(e.key));
@@ -343,9 +343,9 @@ function O({ workspace: t, data: n, stacked: r, names: i, value: a }) {
343
343
  day: "numeric",
344
344
  timeZone: "UTC"
345
345
  });
346
- return /* @__PURE__ */ m(e, {
346
+ return /* @__PURE__ */ m(t, {
347
347
  to: "/$workspace/issues",
348
- params: { workspace: t },
348
+ params: { workspace: e },
349
349
  search: g(n.filter),
350
350
  className: "block space-y-2",
351
351
  children: [/* @__PURE__ */ m("svg", {