@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,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
  });