@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,58 +1,58 @@
1
- import { appURL as e } from "../../../../lib/base.js";
2
- import { api as t, unwrap as n } from "../../../../api/client.js";
3
- import { usePageTitle as r } from "../../../../lib/pageTitle.js";
4
- import { useNavigate as i } from "../../../../lib/router.js";
5
- import { agentsQuery as a, meQuery as o, teamAccessQuery as s, teamMembersQuery as c, teamsQuery as l } from "../../../../api/queries.js";
6
- import { invalidateIssueLists as u } from "../../../../api/mutations.js";
7
- import { copyItem as d } from "../../../../lib/menus.js";
8
- import { AddIcon as f, ShieldIcon as p, UsersIcon as m } from "../../../../components/icons.js";
9
- import { usePeople as h } from "../../../../lib/people.js";
10
- import { usePermissions as g } from "../../../../lib/roles.js";
11
- import { useConfirm as _ } from "../../../../lib/confirm.js";
12
- import { FieldSettings as v } from "../../../../components/CustomFields.js";
13
- import { PersonHoverCard as y } from "../../../../components/PersonHoverCard.js";
14
- import { Route as b } from "./settings.js";
15
- import { FavoriteStar as x } from "../../../../components/FavoriteStar.js";
16
- import { IconUpload as S } from "../../../../components/IconUpload.js";
17
- import { AccessGrants as C } from "../../../../components/AccessGrants.js";
18
- import { BugRotation as w } from "../../../../components/BugRotation.js";
19
- import { IssueTemplates as T } from "../../../../components/IssueTemplates.js";
20
- import { StatusRules as E } from "../../../../components/StatusRules.js";
21
- import { TeamRepositories as D } from "../../../../components/TeamRepositories.js";
22
- import { TeamWorkflow as O } from "../../../../components/TeamWorkflow.js";
23
- import { withSubTeams as k } from "../../../../lib/teamTree.js";
24
- import { Avatar as A, Button as j, Card as M, Combobox as N, ConfirmModal as ee, CopyButton as P, ErrorText as F, Input as I, PageHeader as te, Section as L, Select as R, SettingRow as z, SettingsCard as B, Switch as V, menuDivider as H, useOpenMenu as U } from "@parallelworks/ui";
25
- import { useState as W } from "react";
26
- import { useErrorMessage as G } from "@parallelworks/problem/react";
27
- import { useTranslations as K } from "use-intl";
28
- import { Fragment as ne, jsx as q, jsxs as J } from "react/jsx-runtime";
1
+ import { api as e, unwrap as t } from "../../../../api/client.js";
2
+ import { invalidateIssueLists as n } from "../../../../api/mutations.js";
3
+ import { agentsQuery as r, meQuery as i, teamAccessQuery as a, teamMembersQuery as o, teamsQuery as s } from "../../../../api/queries.js";
4
+ import { AccessGrants as c } from "../../../../components/AccessGrants.js";
5
+ import { BugRotation as l } from "../../../../components/BugRotation.js";
6
+ import { FieldSettings as u } from "../../../../components/CustomFields.js";
7
+ import { FavoriteStar as d } from "../../../../components/FavoriteStar.js";
8
+ import { IconUpload as f } from "../../../../components/IconUpload.js";
9
+ import { IssueTemplates as p } from "../../../../components/IssueTemplates.js";
10
+ import { AddIcon as m, ShieldIcon as h, UsersIcon as g } from "../../../../components/icons.js";
11
+ import { PersonHoverCard as _ } from "../../../../components/PersonHoverCard.js";
12
+ import { StatusRules as v } from "../../../../components/StatusRules.js";
13
+ import { TeamRepositories as y } from "../../../../components/TeamRepositories.js";
14
+ import { TeamWorkflow as b } from "../../../../components/TeamWorkflow.js";
15
+ import { appURL as x } from "../../../../lib/base.js";
16
+ import { useConfirm as S } from "../../../../lib/confirm.js";
17
+ import { copyItem as C } from "../../../../lib/menus.js";
18
+ import { usePageTitle as w } from "../../../../lib/pageTitle.js";
19
+ import { usePeople as ee } from "../../../../lib/people.js";
20
+ import { usePermissions as T } from "../../../../lib/roles.js";
21
+ import { useNavigate as E } from "../../../../lib/router.js";
22
+ import { withSubTeams as D } from "../../../../lib/teamTree.js";
23
+ import { Route as O } from "./settings.js";
24
+ import { Avatar as k, Button as A, Card as j, Combobox as M, ConfirmModal as te, CopyButton as N, ErrorText as P, Input as F, PageHeader as ne, Section as I, Select as L, SettingRow as R, SettingsCard as z, Switch as B, menuDivider as V, useOpenMenu as H } from "@parallelworks/ui";
25
+ import { useState as U } from "react";
26
+ import { useErrorMessage as W } from "@parallelworks/problem/react";
27
+ import { useTranslations as G } from "use-intl";
28
+ import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
29
29
  import { useMutation as Y, useQuery as X, useQueryClient as Z, useSuspenseQuery as Q } from "@tanstack/react-query";
30
30
  // src/routes/$workspace/teams/$key/settings.tsx?tsr-split=component
31
31
  function re() {
32
- let { workspace: e, key: i } = b.useParams(), { data: a } = Q(l(e)), o = g(e, { team: i }), s = o.has("manage_teams"), c = K("settingsNav"), u = Z(), d = Y({
33
- mutationFn: async (r) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
32
+ let { workspace: n, key: r } = O.useParams(), { data: i } = Q(s(n)), a = T(n, { team: r }), o = a.has("manage_teams"), c = G("settingsNav"), m = Z(), h = Y({
33
+ mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
34
34
  params: { path: {
35
- workspace: e,
36
- key: i
35
+ workspace: n,
36
+ key: r
37
37
  } },
38
- body: r
38
+ body: i
39
39
  })),
40
- onSettled: () => u.invalidateQueries({ queryKey: l(e).queryKey })
41
- }), f = a.find((e) => e.key === i);
42
- return r(f?.name), f ? /* @__PURE__ */ J("div", {
40
+ onSettled: () => m.invalidateQueries({ queryKey: s(n).queryKey })
41
+ }), g = i.find((e) => e.key === r);
42
+ return w(g?.name), g ? /* @__PURE__ */ J("div", {
43
43
  className: "flex h-full min-h-0 flex-col",
44
- children: [/* @__PURE__ */ q(te, {
44
+ children: [/* @__PURE__ */ q(ne, {
45
45
  heading: !1,
46
46
  breadcrumbs: [
47
47
  {
48
48
  label: c("label"),
49
- href: `/${e}/settings`
49
+ href: `/${n}/settings`
50
50
  },
51
51
  {
52
52
  label: c("teams"),
53
- href: `/${e}/settings/teams`
53
+ href: `/${n}/settings/teams`
54
54
  },
55
- { label: f.name }
55
+ { label: g.name }
56
56
  ]
57
57
  }), /* @__PURE__ */ q("div", {
58
58
  className: "min-h-0 flex-1 overflow-y-auto",
@@ -62,137 +62,137 @@ function re() {
62
62
  /* @__PURE__ */ J("div", {
63
63
  className: "flex items-center gap-3",
64
64
  children: [
65
- /* @__PURE__ */ q(S, {
66
- workspace: e,
67
- icon: f.icon,
68
- name: f.name,
69
- onChange: (e) => d.mutateAsync({
65
+ /* @__PURE__ */ q(f, {
66
+ workspace: n,
67
+ icon: g.icon,
68
+ name: g.name,
69
+ onChange: (e) => h.mutateAsync({
70
70
  icon: e,
71
71
  color: ""
72
72
  }),
73
- disabled: !s,
73
+ disabled: !o,
74
74
  size: 40
75
75
  }),
76
76
  /* @__PURE__ */ J("h1", {
77
77
  className: "text-xl font-semibold tracking-tight",
78
78
  children: [
79
- f.name,
79
+ g.name,
80
80
  " ",
81
81
  /* @__PURE__ */ q("span", {
82
82
  className: "font-normal text-muted-foreground",
83
- children: f.key
83
+ children: g.key
84
84
  })
85
85
  ]
86
86
  }),
87
- /* @__PURE__ */ q(x, {
88
- workspace: e,
87
+ /* @__PURE__ */ q(d, {
88
+ workspace: n,
89
89
  kind: "team",
90
- target: f.id
90
+ target: g.id
91
91
  })
92
92
  ]
93
93
  }),
94
94
  /* @__PURE__ */ q(ie, {
95
- workspace: e,
96
- team: f,
97
- teams: a,
98
- isAdmin: s
95
+ workspace: n,
96
+ team: g,
97
+ teams: i,
98
+ isAdmin: o
99
99
  }),
100
100
  /* @__PURE__ */ q(de, {
101
- workspace: e,
102
- teamKey: i,
103
- isAdmin: o.has("manage_members")
101
+ workspace: n,
102
+ teamKey: r,
103
+ isAdmin: a.has("manage_members")
104
104
  }),
105
- /* @__PURE__ */ q(O, {
106
- workspace: e,
107
- teamKey: i,
108
- isAdmin: o.has("manage_labels")
105
+ /* @__PURE__ */ q(b, {
106
+ workspace: n,
107
+ teamKey: r,
108
+ isAdmin: a.has("manage_labels")
109
109
  }),
110
- o.has("manage_labels") && /* @__PURE__ */ q(v, {
111
- workspace: e,
110
+ a.has("manage_labels") && /* @__PURE__ */ q(u, {
111
+ workspace: n,
112
112
  target: "issue",
113
113
  team: {
114
- key: i,
115
- id: f.id
114
+ key: r,
115
+ id: g.id
116
116
  }
117
117
  }),
118
- /* @__PURE__ */ q(E, {
119
- workspace: e,
120
- team: f,
121
- isAdmin: s
118
+ /* @__PURE__ */ q(v, {
119
+ workspace: n,
120
+ team: g,
121
+ isAdmin: o
122
122
  }),
123
123
  /* @__PURE__ */ q(ae, {
124
- workspace: e,
125
- team: f,
126
- isAdmin: s
124
+ workspace: n,
125
+ team: g,
126
+ isAdmin: o
127
127
  }),
128
128
  /* @__PURE__ */ q(se, {
129
- workspace: e,
130
- team: f,
131
- isAdmin: s
129
+ workspace: n,
130
+ team: g,
131
+ isAdmin: o
132
132
  }),
133
133
  /* @__PURE__ */ q(oe, {
134
- workspace: e,
135
- team: f,
136
- isAdmin: s
134
+ workspace: n,
135
+ team: g,
136
+ isAdmin: o
137
137
  }),
138
- /* @__PURE__ */ q(w, {
139
- workspace: e,
140
- teamKey: i,
141
- isAdmin: s
138
+ /* @__PURE__ */ q(l, {
139
+ workspace: n,
140
+ teamKey: r,
141
+ isAdmin: o
142
142
  }),
143
- /* @__PURE__ */ q(T, {
144
- workspace: e,
145
- teamKey: i,
146
- isAdmin: o.has("manage_templates")
143
+ /* @__PURE__ */ q(p, {
144
+ workspace: n,
145
+ teamKey: r,
146
+ isAdmin: a.has("manage_templates")
147
147
  }),
148
148
  /* @__PURE__ */ q(ce, {
149
- workspace: e,
150
- team: f,
151
- isAdmin: s
149
+ workspace: n,
150
+ team: g,
151
+ isAdmin: o
152
152
  }),
153
153
  /* @__PURE__ */ q(ue, {
154
- workspace: e,
155
- team: f,
156
- isAdmin: s
154
+ workspace: n,
155
+ team: g,
156
+ isAdmin: o
157
157
  }),
158
- /* @__PURE__ */ q(D, {
159
- workspace: e,
160
- team: f,
161
- isAdmin: s
158
+ /* @__PURE__ */ q(y, {
159
+ workspace: n,
160
+ team: g,
161
+ isAdmin: o
162
162
  }),
163
163
  /* @__PURE__ */ q(fe, {
164
- workspace: e,
165
- teamKey: i
164
+ workspace: n,
165
+ teamKey: r
166
166
  }),
167
- s && /* @__PURE__ */ q(pe, {
168
- workspace: e,
169
- team: f
167
+ o && /* @__PURE__ */ q(pe, {
168
+ workspace: n,
169
+ team: g
170
170
  })
171
171
  ]
172
172
  })
173
173
  })]
174
174
  }) : null;
175
175
  }
176
- function ie({ workspace: e, team: r, teams: i, isAdmin: a }) {
177
- let o = K("teamParent"), s = G(), c = Z(), u = Y({
178
- mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
176
+ function ie({ workspace: n, team: r, teams: i, isAdmin: a }) {
177
+ let o = G("teamParent"), c = W(), l = Z(), u = Y({
178
+ mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
179
179
  params: { path: {
180
- workspace: e,
180
+ workspace: n,
181
181
  key: r.key
182
182
  } },
183
183
  body: { parent: i }
184
184
  })),
185
- onSettled: () => c.invalidateQueries({ queryKey: l(e).queryKey })
186
- }), d = k(i, r.id), f = i.find((e) => e.id === r.parentId), p = i.filter((e) => e.parentId === r.id && !e.archivedAt);
187
- return /* @__PURE__ */ J(B, {
185
+ onSettled: () => l.invalidateQueries({ queryKey: s(n).queryKey })
186
+ }), d = D(i, r.id), f = i.find((e) => e.id === r.parentId), p = i.filter((e) => e.parentId === r.id && !e.archivedAt);
187
+ return /* @__PURE__ */ J(z, {
188
188
  title: o("title"),
189
189
  description: o("description"),
190
190
  children: [
191
- /* @__PURE__ */ q(z, {
191
+ /* @__PURE__ */ q(R, {
192
192
  label: o("parent"),
193
193
  children: /* @__PURE__ */ q("div", {
194
194
  className: "w-56",
195
- children: /* @__PURE__ */ q(R, {
195
+ children: /* @__PURE__ */ q(L, {
196
196
  width: "fill",
197
197
  "aria-label": o("parent"),
198
198
  value: f?.key ?? "",
@@ -208,115 +208,115 @@ function ie({ workspace: e, team: r, teams: i, isAdmin: a }) {
208
208
  })
209
209
  })
210
210
  }),
211
- p.length > 0 && /* @__PURE__ */ q(z, {
211
+ p.length > 0 && /* @__PURE__ */ q(R, {
212
212
  label: o("subTeams"),
213
213
  children: /* @__PURE__ */ q("span", {
214
214
  className: "text-sm",
215
215
  children: p.map((e) => e.name).join(", ")
216
216
  })
217
217
  }),
218
- u.error && /* @__PURE__ */ q(F, { children: s(u.error) })
218
+ u.error && /* @__PURE__ */ q(P, { children: c(u.error) })
219
219
  ]
220
220
  });
221
221
  }
222
- function ae({ workspace: r, team: i, isAdmin: a }) {
223
- let s = K("teamIntake"), c = G(), u = Z(), { data: d } = X(o), f = () => u.invalidateQueries({ queryKey: l(r).queryKey }), p = { params: { path: {
224
- workspace: r,
225
- key: i.key
226
- } } }, m = Y({
227
- mutationFn: async (e) => n(await t.PUT("/api/v1/workspaces/{workspace}/teams/{key}/intake", {
228
- ...p,
229
- body: e
222
+ function ae({ workspace: n, team: r, isAdmin: a }) {
223
+ let o = G("teamIntake"), c = W(), l = Z(), { data: u } = X(i), d = () => l.invalidateQueries({ queryKey: s(n).queryKey }), f = { params: { path: {
224
+ workspace: n,
225
+ key: r.key
226
+ } } }, p = Y({
227
+ mutationFn: async (n) => t(await e.PUT("/api/v1/workspaces/{workspace}/teams/{key}/intake", {
228
+ ...f,
229
+ body: n
230
230
  })),
231
- onSettled: f
232
- }), h = Y({
233
- mutationFn: async () => n(await t.POST("/api/v1/workspaces/{workspace}/teams/{key}/intake/rotate", p)),
234
- onSettled: f
235
- }), { token: g, form: _, email: v } = i.intake, y = g ? e(`/request/${g}`) : "", b = g && d?.intakeDomain ? `${g}@${d.intakeDomain}` : "", x = !a || m.isPending, S = m.error ?? h.error;
236
- return /* @__PURE__ */ J(B, {
237
- title: s("title"),
238
- description: s("description"),
231
+ onSettled: d
232
+ }), m = Y({
233
+ mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/teams/{key}/intake/rotate", f)),
234
+ onSettled: d
235
+ }), { token: h, form: g, email: _ } = r.intake, v = h ? x(`/request/${h}`) : "", y = h && u?.intakeDomain ? `${h}@${u.intakeDomain}` : "", b = !a || p.isPending, S = p.error ?? m.error;
236
+ return /* @__PURE__ */ J(z, {
237
+ title: o("title"),
238
+ description: o("description"),
239
239
  children: [
240
- /* @__PURE__ */ q(z, {
241
- label: s("form"),
242
- helpText: i.triageEnabled ? s("formHelp") : s("needsTriage"),
243
- children: /* @__PURE__ */ q(V, {
244
- "aria-label": s("form"),
245
- checked: _,
246
- disabled: x || !i.triageEnabled && !_,
247
- onCheckedChange: (e) => m.mutate({
240
+ /* @__PURE__ */ q(R, {
241
+ label: o("form"),
242
+ helpText: r.triageEnabled ? o("formHelp") : o("needsTriage"),
243
+ children: /* @__PURE__ */ q(B, {
244
+ "aria-label": o("form"),
245
+ checked: g,
246
+ disabled: b || !r.triageEnabled && !g,
247
+ onCheckedChange: (e) => p.mutate({
248
248
  form: e,
249
- email: v
249
+ email: _
250
250
  })
251
251
  })
252
252
  }),
253
- _ && y && /* @__PURE__ */ q(z, {
254
- label: s("link"),
253
+ g && v && /* @__PURE__ */ q(R, {
254
+ label: o("link"),
255
255
  children: /* @__PURE__ */ J("div", {
256
256
  className: "flex min-w-0 items-center gap-2",
257
257
  children: [/* @__PURE__ */ q("code", {
258
258
  className: "min-w-0 truncate text-xs",
259
- children: y
260
- }), /* @__PURE__ */ q(P, {
261
- text: y,
262
- label: s("copyLink"),
259
+ children: v
260
+ }), /* @__PURE__ */ q(N, {
261
+ text: v,
262
+ label: o("copyLink"),
263
263
  size: "sm",
264
264
  variant: "ghost"
265
265
  })]
266
266
  })
267
267
  }),
268
- /* @__PURE__ */ q(z, {
269
- label: s("email"),
270
- helpText: d?.intakeDomain ? s("emailHelp") : s("noDomain"),
271
- children: /* @__PURE__ */ q(V, {
272
- "aria-label": s("email"),
273
- checked: v,
274
- disabled: x || !d?.intakeDomain || !i.triageEnabled && !v,
275
- onCheckedChange: (e) => m.mutate({
276
- form: _,
268
+ /* @__PURE__ */ q(R, {
269
+ label: o("email"),
270
+ helpText: u?.intakeDomain ? o("emailHelp") : o("noDomain"),
271
+ children: /* @__PURE__ */ q(B, {
272
+ "aria-label": o("email"),
273
+ checked: _,
274
+ disabled: b || !u?.intakeDomain || !r.triageEnabled && !_,
275
+ onCheckedChange: (e) => p.mutate({
276
+ form: g,
277
277
  email: e
278
278
  })
279
279
  })
280
280
  }),
281
- v && b && /* @__PURE__ */ q(z, {
282
- label: s("address"),
281
+ _ && y && /* @__PURE__ */ q(R, {
282
+ label: o("address"),
283
283
  children: /* @__PURE__ */ J("div", {
284
284
  className: "flex min-w-0 items-center gap-2",
285
285
  children: [/* @__PURE__ */ q("code", {
286
286
  className: "min-w-0 truncate text-xs",
287
- children: b
288
- }), /* @__PURE__ */ q(P, {
289
- text: b,
290
- label: s("copyAddress"),
287
+ children: y
288
+ }), /* @__PURE__ */ q(N, {
289
+ text: y,
290
+ label: o("copyAddress"),
291
291
  size: "sm",
292
292
  variant: "ghost"
293
293
  })]
294
294
  })
295
295
  }),
296
- g && a && /* @__PURE__ */ q(z, {
297
- label: s("rotate"),
298
- helpText: s("rotateHelp"),
299
- children: /* @__PURE__ */ q(j, {
296
+ h && a && /* @__PURE__ */ q(R, {
297
+ label: o("rotate"),
298
+ helpText: o("rotateHelp"),
299
+ children: /* @__PURE__ */ q(A, {
300
300
  size: "sm",
301
- loading: h.isPending,
302
- onClick: () => h.mutate(),
303
- children: s("rotateButton")
301
+ loading: m.isPending,
302
+ onClick: () => m.mutate(),
303
+ children: o("rotateButton")
304
304
  })
305
305
  }),
306
- S && /* @__PURE__ */ q(F, { children: c(S) })
306
+ S && /* @__PURE__ */ q(P, { children: c(S) })
307
307
  ]
308
308
  });
309
309
  }
310
- function oe({ workspace: e, team: r, isAdmin: i }) {
311
- let a = K("planning.sla"), o = K("priority"), s = G(), c = Z(), u = Y({
312
- mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
310
+ function oe({ workspace: n, team: r, isAdmin: i }) {
311
+ let a = G("planning.sla"), o = G("priority"), c = W(), l = Z(), u = Y({
312
+ mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
313
313
  params: { path: {
314
- workspace: e,
314
+ workspace: n,
315
315
  key: r.key
316
316
  } },
317
317
  body: { slaHours: i }
318
318
  })),
319
- onSettled: () => c.invalidateQueries({ queryKey: l(e).queryKey })
319
+ onSettled: () => l.invalidateQueries({ queryKey: s(n).queryKey })
320
320
  }), d = [
321
321
  0,
322
322
  4,
@@ -327,7 +327,7 @@ function oe({ workspace: e, team: r, isAdmin: i }) {
327
327
  168,
328
328
  336
329
329
  ], f = (e) => e === 0 ? a("none") : e < 24 ? a("hours", { count: e }) : e % 168 == 0 ? a("weeks", { count: e / 168 }) : a("days", { count: e / 24 });
330
- return /* @__PURE__ */ J(B, {
330
+ return /* @__PURE__ */ J(z, {
331
331
  title: a("title"),
332
332
  description: a("description"),
333
333
  children: [[
@@ -335,11 +335,11 @@ function oe({ workspace: e, team: r, isAdmin: i }) {
335
335
  "high",
336
336
  "medium",
337
337
  "low"
338
- ].map((e) => /* @__PURE__ */ q(z, {
338
+ ].map((e) => /* @__PURE__ */ q(R, {
339
339
  label: o(e),
340
340
  children: /* @__PURE__ */ q("div", {
341
341
  className: "w-40",
342
- children: /* @__PURE__ */ q(R, {
342
+ children: /* @__PURE__ */ q(L, {
343
343
  width: "fill",
344
344
  "aria-label": a("target", { priority: o(e) }),
345
345
  value: String(r.slaHours[e]),
@@ -354,65 +354,65 @@ function oe({ workspace: e, team: r, isAdmin: i }) {
354
354
  }))
355
355
  })
356
356
  })
357
- }, e)), u.isError && /* @__PURE__ */ q(F, { children: s(u.error) })]
357
+ }, e)), u.isError && /* @__PURE__ */ q(P, { children: c(u.error) })]
358
358
  });
359
359
  }
360
- function se({ workspace: e, team: r, isAdmin: i }) {
361
- let a = K("planning.settings"), o = G(), s = Z(), c = Y({
362
- mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
360
+ function se({ workspace: n, team: r, isAdmin: i }) {
361
+ let a = G("planning.settings"), o = W(), c = Z(), l = Y({
362
+ mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
363
363
  params: { path: {
364
- workspace: e,
364
+ workspace: n,
365
365
  key: r.key
366
366
  } },
367
367
  body: i
368
368
  })),
369
369
  onSettled: () => {
370
- s.invalidateQueries({ queryKey: l(e).queryKey }), s.invalidateQueries({ queryKey: [
370
+ c.invalidateQueries({ queryKey: s(n).queryKey }), c.invalidateQueries({ queryKey: [
371
371
  "workspace",
372
- e,
372
+ n,
373
373
  "cycles",
374
374
  r.key
375
375
  ] });
376
376
  }
377
- }), u = !i || c.isPending, d = (e) => c.isError && c.variables && e in c.variables ? o(c.error) : null;
378
- return /* @__PURE__ */ J(B, {
377
+ }), u = !i || l.isPending, d = (e) => l.isError && l.variables && e in l.variables ? o(l.error) : null;
378
+ return /* @__PURE__ */ J(z, {
379
379
  title: a("title"),
380
380
  description: a("description"),
381
381
  children: [
382
- /* @__PURE__ */ q(z, {
382
+ /* @__PURE__ */ q(R, {
383
383
  label: a("triage"),
384
384
  helpText: a("triageHelp"),
385
385
  error: d("triageEnabled"),
386
- children: /* @__PURE__ */ q(V, {
386
+ children: /* @__PURE__ */ q(B, {
387
387
  "aria-label": a("triage"),
388
388
  checked: r.triageEnabled,
389
389
  disabled: u,
390
- onCheckedChange: (e) => c.mutate({ triageEnabled: e })
390
+ onCheckedChange: (e) => l.mutate({ triageEnabled: e })
391
391
  })
392
392
  }),
393
- /* @__PURE__ */ q(z, {
393
+ /* @__PURE__ */ q(R, {
394
394
  label: a("customerRequests"),
395
395
  helpText: a("customerRequestsHelp"),
396
396
  error: d("customerRequestsEnabled"),
397
- children: /* @__PURE__ */ q(V, {
397
+ children: /* @__PURE__ */ q(B, {
398
398
  "aria-label": a("customerRequests"),
399
399
  checked: r.customerRequestsEnabled,
400
400
  disabled: u,
401
- onCheckedChange: (e) => c.mutate({ customerRequestsEnabled: e })
401
+ onCheckedChange: (e) => l.mutate({ customerRequestsEnabled: e })
402
402
  })
403
403
  }),
404
- /* @__PURE__ */ q(z, {
404
+ /* @__PURE__ */ q(R, {
405
405
  label: a("autoClose"),
406
406
  helpText: a("autoCloseHelp"),
407
407
  error: d("autoCloseDays"),
408
408
  children: /* @__PURE__ */ q("div", {
409
409
  className: "w-40",
410
- children: /* @__PURE__ */ q(R, {
410
+ children: /* @__PURE__ */ q(L, {
411
411
  width: "fill",
412
412
  "aria-label": a("autoClose"),
413
413
  value: String(r.autoCloseDays),
414
414
  disabled: u,
415
- onValueChange: (e) => e && c.mutate({ autoCloseDays: Number(e) }),
415
+ onValueChange: (e) => e && l.mutate({ autoCloseDays: Number(e) }),
416
416
  items: [
417
417
  0,
418
418
  30,
@@ -427,18 +427,18 @@ function se({ workspace: e, team: r, isAdmin: i }) {
427
427
  })
428
428
  })
429
429
  }),
430
- /* @__PURE__ */ q(z, {
430
+ /* @__PURE__ */ q(R, {
431
431
  label: a("autoArchive"),
432
432
  helpText: a("autoArchiveHelp"),
433
433
  error: d("autoArchiveDays"),
434
434
  children: /* @__PURE__ */ q("div", {
435
435
  className: "w-40",
436
- children: /* @__PURE__ */ q(R, {
436
+ children: /* @__PURE__ */ q(L, {
437
437
  width: "fill",
438
438
  "aria-label": a("autoArchive"),
439
439
  value: String(r.autoArchiveDays),
440
440
  disabled: u,
441
- onValueChange: (e) => e && c.mutate({ autoArchiveDays: Number(e) }),
441
+ onValueChange: (e) => e && l.mutate({ autoArchiveDays: Number(e) }),
442
442
  items: [
443
443
  0,
444
444
  1,
@@ -453,29 +453,29 @@ function se({ workspace: e, team: r, isAdmin: i }) {
453
453
  })
454
454
  })
455
455
  }),
456
- /* @__PURE__ */ q(z, {
456
+ /* @__PURE__ */ q(R, {
457
457
  label: a("cycles"),
458
458
  helpText: a("cyclesHelp"),
459
459
  error: d("cyclesEnabled"),
460
- children: /* @__PURE__ */ q(V, {
460
+ children: /* @__PURE__ */ q(B, {
461
461
  "aria-label": a("cycles"),
462
462
  checked: r.cyclesEnabled,
463
463
  disabled: u,
464
- onCheckedChange: (e) => c.mutate({ cyclesEnabled: e })
464
+ onCheckedChange: (e) => l.mutate({ cyclesEnabled: e })
465
465
  })
466
466
  }),
467
- /* @__PURE__ */ q(z, {
467
+ /* @__PURE__ */ q(R, {
468
468
  label: a("cycleLength"),
469
469
  helpText: a("cycleLengthHelp"),
470
470
  error: d("cycleWeeks"),
471
471
  children: /* @__PURE__ */ q("div", {
472
472
  className: "w-36",
473
- children: /* @__PURE__ */ q(R, {
473
+ children: /* @__PURE__ */ q(L, {
474
474
  width: "fill",
475
475
  "aria-label": a("cycleLength"),
476
476
  value: r.cycleWeeks,
477
477
  disabled: u,
478
- onValueChange: (e) => e && c.mutate({ cycleWeeks: e }),
478
+ onValueChange: (e) => e && l.mutate({ cycleWeeks: e }),
479
479
  items: [
480
480
  1,
481
481
  2,
@@ -487,18 +487,18 @@ function se({ workspace: e, team: r, isAdmin: i }) {
487
487
  })
488
488
  })
489
489
  }),
490
- /* @__PURE__ */ q(z, {
490
+ /* @__PURE__ */ q(R, {
491
491
  label: a("upcomingCycles"),
492
492
  helpText: a("upcomingCyclesHelp"),
493
493
  error: d("cycleUpcoming"),
494
494
  children: /* @__PURE__ */ q("div", {
495
495
  className: "w-36",
496
- children: /* @__PURE__ */ q(R, {
496
+ children: /* @__PURE__ */ q(L, {
497
497
  width: "fill",
498
498
  "aria-label": a("upcomingCycles"),
499
499
  value: r.cycleUpcoming,
500
500
  disabled: u,
501
- onValueChange: (e) => e !== null && c.mutate({ cycleUpcoming: e }),
501
+ onValueChange: (e) => e !== null && l.mutate({ cycleUpcoming: e }),
502
502
  items: [
503
503
  0,
504
504
  1,
@@ -515,29 +515,29 @@ function se({ workspace: e, team: r, isAdmin: i }) {
515
515
  })
516
516
  })
517
517
  }),
518
- /* @__PURE__ */ q(z, {
518
+ /* @__PURE__ */ q(R, {
519
519
  label: a("autoAdd"),
520
520
  helpText: a("autoAddHelp"),
521
521
  error: d("cycleAutoAdd"),
522
- children: /* @__PURE__ */ q(V, {
522
+ children: /* @__PURE__ */ q(B, {
523
523
  "aria-label": a("autoAdd"),
524
524
  checked: r.cycleAutoAdd,
525
525
  disabled: u,
526
- onCheckedChange: (e) => c.mutate({ cycleAutoAdd: e })
526
+ onCheckedChange: (e) => l.mutate({ cycleAutoAdd: e })
527
527
  })
528
528
  }),
529
- /* @__PURE__ */ q(z, {
529
+ /* @__PURE__ */ q(R, {
530
530
  label: a("estimates"),
531
531
  helpText: a("estimatesHelp"),
532
532
  error: d("estimateScale"),
533
533
  children: /* @__PURE__ */ q("div", {
534
534
  className: "w-44",
535
- children: /* @__PURE__ */ q(R, {
535
+ children: /* @__PURE__ */ q(L, {
536
536
  width: "fill",
537
537
  "aria-label": a("estimates"),
538
538
  value: r.estimateScale,
539
539
  disabled: u,
540
- onValueChange: (e) => e && c.mutate({ estimateScale: e }),
540
+ onValueChange: (e) => e && l.mutate({ estimateScale: e }),
541
541
  items: [
542
542
  "none",
543
543
  "fibonacci",
@@ -562,44 +562,44 @@ var $ = [
562
562
  "merge",
563
563
  "release"
564
564
  ];
565
- function ce({ workspace: e, team: r, isAdmin: i }) {
566
- let o = K("flow"), s = G(), c = Z(), { data: u = [] } = X(a(e)), d = Y({
567
- mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
565
+ function ce({ workspace: n, team: i, isAdmin: a }) {
566
+ let o = G("flow"), c = W(), l = Z(), { data: u = [] } = X(r(n)), d = Y({
567
+ mutationFn: async (r) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
568
568
  params: { path: {
569
- workspace: e,
570
- key: r.key
569
+ workspace: n,
570
+ key: i.key
571
571
  } },
572
- body: { flow: i }
572
+ body: { flow: r }
573
573
  })),
574
- onSettled: () => c.invalidateQueries({ queryKey: l(e).queryKey })
574
+ onSettled: () => l.invalidateQueries({ queryKey: s(n).queryKey })
575
575
  }), f = Y({
576
- mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
576
+ mutationFn: async (r) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
577
577
  params: { path: {
578
- workspace: e,
579
- key: r.key
578
+ workspace: n,
579
+ key: i.key
580
580
  } },
581
- body: { autoMerge: i }
581
+ body: { autoMerge: r }
582
582
  })),
583
- onSettled: () => c.invalidateQueries({ queryKey: l(e).queryKey })
583
+ onSettled: () => l.invalidateQueries({ queryKey: s(n).queryKey })
584
584
  }), p = Y({
585
- mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
585
+ mutationFn: async (r) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
586
586
  params: { path: {
587
- workspace: e,
588
- key: r.key
587
+ workspace: n,
588
+ key: i.key
589
589
  } },
590
- body: { draftPullRequests: i }
590
+ body: { draftPullRequests: r }
591
591
  })),
592
- onSettled: () => c.invalidateQueries({ queryKey: l(e).queryKey })
592
+ onSettled: () => l.invalidateQueries({ queryKey: s(n).queryKey })
593
593
  }), m = Y({
594
- mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
594
+ mutationFn: async (r) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
595
595
  params: { path: {
596
- workspace: e,
597
- key: r.key
596
+ workspace: n,
597
+ key: i.key
598
598
  } },
599
- body: { pullRequestsAsAssigner: i }
599
+ body: { pullRequestsAsAssigner: r }
600
600
  })),
601
- onSettled: () => c.invalidateQueries({ queryKey: l(e).queryKey })
602
- }), h = (e) => r.flow.find((t) => t.stage === e), [g, _] = W(null), v = (e, t) => {
601
+ onSettled: () => l.invalidateQueries({ queryKey: s(n).queryKey })
602
+ }), h = (e) => i.flow.find((t) => t.stage === e), [g, _] = U(null), v = (e, t) => {
603
603
  _(e), d.mutate($.flatMap((n) => {
604
604
  let r = h(n);
605
605
  return n === e ? t.on ? [{
@@ -607,22 +607,22 @@ function ce({ workspace: e, team: r, isAdmin: i }) {
607
607
  ...t.agentId && { agentId: t.agentId }
608
608
  }] : [] : r ? [r] : [];
609
609
  }));
610
- }, y = !i || d.isPending;
611
- return /* @__PURE__ */ J(B, {
610
+ }, y = !a || d.isPending;
611
+ return /* @__PURE__ */ J(z, {
612
612
  title: o("title"),
613
613
  description: o("description"),
614
614
  children: [
615
615
  $.map((e) => {
616
616
  let t = h(e), n = u.filter((t) => !t.archivedAt && (e !== "review" || t.maxRole === "viewer"));
617
- return /* @__PURE__ */ q(z, {
617
+ return /* @__PURE__ */ q(R, {
618
618
  label: o(`stages.${e}`),
619
619
  helpText: o(`help.${e}`),
620
- error: d.isError && g === e ? s(d.error) : null,
620
+ error: d.isError && g === e ? c(d.error) : null,
621
621
  children: /* @__PURE__ */ J("div", {
622
622
  className: "flex items-center gap-3",
623
623
  children: [t && /* @__PURE__ */ q("div", {
624
624
  className: "w-44",
625
- children: /* @__PURE__ */ q(R, {
625
+ children: /* @__PURE__ */ q(L, {
626
626
  width: "fill",
627
627
  "aria-label": o("agentFor", { stage: o(`stages.${e}`) }),
628
628
  value: t.agentId ?? "",
@@ -639,7 +639,7 @@ function ce({ workspace: e, team: r, isAdmin: i }) {
639
639
  label: e.name
640
640
  }))]
641
641
  })
642
- }), /* @__PURE__ */ q(V, {
642
+ }), /* @__PURE__ */ q(B, {
643
643
  "aria-label": o(`stages.${e}`),
644
644
  checked: !!t,
645
645
  disabled: y,
@@ -648,70 +648,70 @@ function ce({ workspace: e, team: r, isAdmin: i }) {
648
648
  })
649
649
  }, e);
650
650
  }),
651
- h("release") && /* @__PURE__ */ q(z, {
651
+ h("release") && /* @__PURE__ */ q(R, {
652
652
  label: o("releaseTargets"),
653
653
  helpText: o("releaseTargetsHelp"),
654
654
  children: /* @__PURE__ */ q(le, {
655
- workspace: e,
656
- team: r,
657
- disabled: !i
655
+ workspace: n,
656
+ team: i,
657
+ disabled: !a
658
658
  })
659
659
  }),
660
- /* @__PURE__ */ q(z, {
660
+ /* @__PURE__ */ q(R, {
661
661
  label: o("autoMerge"),
662
662
  helpText: o("autoMergeHelp"),
663
- error: f.isError ? s(f.error) : null,
664
- children: /* @__PURE__ */ q(V, {
663
+ error: f.isError ? c(f.error) : null,
664
+ children: /* @__PURE__ */ q(B, {
665
665
  "aria-label": o("autoMerge"),
666
- checked: r.autoMerge,
667
- disabled: !i || f.isPending,
666
+ checked: i.autoMerge,
667
+ disabled: !a || f.isPending,
668
668
  onCheckedChange: (e) => f.mutate(e)
669
669
  })
670
670
  }),
671
- /* @__PURE__ */ q(z, {
671
+ /* @__PURE__ */ q(R, {
672
672
  label: o("draftPullRequests"),
673
673
  helpText: o("draftPullRequestsHelp"),
674
- error: p.isError ? s(p.error) : null,
675
- children: /* @__PURE__ */ q(V, {
674
+ error: p.isError ? c(p.error) : null,
675
+ children: /* @__PURE__ */ q(B, {
676
676
  "aria-label": o("draftPullRequests"),
677
- checked: r.draftPullRequests,
678
- disabled: !i || p.isPending,
677
+ checked: i.draftPullRequests,
678
+ disabled: !a || p.isPending,
679
679
  onCheckedChange: (e) => p.mutate(e)
680
680
  })
681
681
  }),
682
- /* @__PURE__ */ q(z, {
682
+ /* @__PURE__ */ q(R, {
683
683
  label: o("pullRequestsAsAssigner"),
684
684
  helpText: o("pullRequestsAsAssignerHelp"),
685
- error: m.isError ? s(m.error) : null,
686
- children: /* @__PURE__ */ q(V, {
685
+ error: m.isError ? c(m.error) : null,
686
+ children: /* @__PURE__ */ q(B, {
687
687
  "aria-label": o("pullRequestsAsAssigner"),
688
- checked: r.pullRequestsAsAssigner,
689
- disabled: !i || m.isPending,
688
+ checked: i.pullRequestsAsAssigner,
689
+ disabled: !a || m.isPending,
690
690
  onCheckedChange: (e) => m.mutate(e)
691
691
  })
692
692
  })
693
693
  ]
694
694
  });
695
695
  }
696
- function le({ workspace: e, team: r, disabled: i }) {
697
- let a = K("flow"), o = G(), s = Z(), [c, u] = W(r.releaseTargets.join(", ")), d = Y({
698
- mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
696
+ function le({ workspace: n, team: r, disabled: i }) {
697
+ let a = G("flow"), o = W(), c = Z(), [l, u] = U(r.releaseTargets.join(", ")), d = Y({
698
+ mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
699
699
  params: { path: {
700
- workspace: e,
700
+ workspace: n,
701
701
  key: r.key
702
702
  } },
703
703
  body: { releaseTargets: i }
704
704
  })),
705
- onSettled: () => s.invalidateQueries({ queryKey: l(e).queryKey })
705
+ onSettled: () => c.invalidateQueries({ queryKey: s(n).queryKey })
706
706
  }), f = () => {
707
- let e = c.split(",").map((e) => e.trim()).filter(Boolean);
707
+ let e = l.split(",").map((e) => e.trim()).filter(Boolean);
708
708
  e.join(",") !== r.releaseTargets.join(",") && d.mutate(e);
709
709
  };
710
710
  return /* @__PURE__ */ q("div", {
711
711
  className: "w-64",
712
- children: /* @__PURE__ */ q(I, {
712
+ children: /* @__PURE__ */ q(F, {
713
713
  "aria-label": a("releaseTargets"),
714
- value: c,
714
+ value: l,
715
715
  disabled: i,
716
716
  onChange: (e) => u(e.target.value),
717
717
  onBlur: f,
@@ -721,77 +721,77 @@ function le({ workspace: e, team: r, disabled: i }) {
721
721
  })
722
722
  });
723
723
  }
724
- function ue({ workspace: e, team: r, isAdmin: i }) {
725
- let a = K("team"), o = G(), s = Z(), c = Y({
726
- mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
724
+ function ue({ workspace: n, team: r, isAdmin: i }) {
725
+ let a = G("team"), o = W(), c = Z(), l = Y({
726
+ mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
727
727
  params: { path: {
728
- workspace: e,
728
+ workspace: n,
729
729
  key: r.key
730
730
  } },
731
731
  body: { requireKnownTerms: i }
732
732
  })),
733
- onSettled: () => s.invalidateQueries({ queryKey: l(e).queryKey })
733
+ onSettled: () => c.invalidateQueries({ queryKey: s(n).queryKey })
734
734
  });
735
- return /* @__PURE__ */ q(B, {
735
+ return /* @__PURE__ */ q(z, {
736
736
  title: a("agentQuestions"),
737
737
  description: a("agentQuestionsDescription"),
738
- children: /* @__PURE__ */ q(z, {
738
+ children: /* @__PURE__ */ q(R, {
739
739
  label: a("requireKnownTerms"),
740
740
  helpText: a("requireKnownTermsHelp"),
741
- error: c.isError ? o(c.error) : null,
742
- children: /* @__PURE__ */ q(V, {
741
+ error: l.isError ? o(l.error) : null,
742
+ children: /* @__PURE__ */ q(B, {
743
743
  "aria-label": a("requireKnownTerms"),
744
744
  checked: r.requireKnownTerms,
745
- disabled: !i || c.isPending,
746
- onCheckedChange: (e) => c.mutate(e)
745
+ disabled: !i || l.isPending,
746
+ onCheckedChange: (e) => l.mutate(e)
747
747
  })
748
748
  })
749
749
  });
750
750
  }
751
- function de({ workspace: e, teamKey: r, isAdmin: a }) {
752
- let { data: s } = Q(c(e, r)), { data: l } = Q(o), { members: u, person: p } = h(e), m = Z(), g = U(), _ = i(), [v, b] = W(null), x = K("team"), S = G(), C = K("common"), w = Y({
751
+ function de({ workspace: n, teamKey: r, isAdmin: a }) {
752
+ let { data: s } = Q(o(n, r)), { data: c } = Q(i), { members: l, person: u } = ee(n), d = Z(), f = H(), p = E(), [h, g] = U(null), v = G("team"), y = W(), b = G("common"), x = Y({
753
753
  mutationFn: async (i) => {
754
754
  for (let { username: a, add: o } of i) {
755
755
  let i = { params: { path: {
756
- workspace: e,
756
+ workspace: n,
757
757
  key: r,
758
758
  username: a
759
759
  } } };
760
- n(o ? await t.PUT("/api/v1/workspaces/{workspace}/teams/{key}/members/{username}", i) : await t.DELETE("/api/v1/workspaces/{workspace}/teams/{key}/members/{username}", i));
760
+ t(o ? await e.PUT("/api/v1/workspaces/{workspace}/teams/{key}/members/{username}", i) : await e.DELETE("/api/v1/workspaces/{workspace}/teams/{key}/members/{username}", i));
761
761
  }
762
762
  },
763
- onMutate: () => b(null),
764
- onError: (e) => b(S(e)),
765
- onSettled: () => m.invalidateQueries({ queryKey: c(e, r).queryKey })
766
- }), T = (e) => w.mutate([...e.filter((e) => !s.includes(e)).map((e) => ({
763
+ onMutate: () => g(null),
764
+ onError: (e) => g(y(e)),
765
+ onSettled: () => d.invalidateQueries({ queryKey: o(n, r).queryKey })
766
+ }), S = (e) => x.mutate([...e.filter((e) => !s.includes(e)).map((e) => ({
767
767
  username: e,
768
768
  add: !0
769
769
  })), ...s.filter((t) => !e.includes(t)).map((e) => ({
770
770
  username: e,
771
771
  add: !1
772
- }))]), E = l?.user.username ?? "", D = s.includes(E);
773
- return /* @__PURE__ */ J(L, {
772
+ }))]), w = c?.user.username ?? "", T = s.includes(w);
773
+ return /* @__PURE__ */ J(I, {
774
774
  variant: "bare",
775
775
  headingLevel: 2,
776
776
  collapsible: !1,
777
- title: x("members"),
778
- description: x("membersDescription"),
779
- actions: /* @__PURE__ */ J(ne, { children: [!D && /* @__PURE__ */ q(j, {
777
+ title: v("members"),
778
+ description: v("membersDescription"),
779
+ actions: /* @__PURE__ */ J(K, { children: [!T && /* @__PURE__ */ q(A, {
780
780
  type: "button",
781
781
  size: "sm",
782
782
  variant: "primary",
783
- onClick: () => w.mutate([{
784
- username: E,
783
+ onClick: () => x.mutate([{
784
+ username: w,
785
785
  add: !0
786
786
  }]),
787
- children: x("join")
788
- }), a && /* @__PURE__ */ q(N, {
787
+ children: v("join")
788
+ }), a && /* @__PURE__ */ q(M, {
789
789
  multiple: !0,
790
- items: u.map((e) => ({
790
+ items: l.map((e) => ({
791
791
  value: e.user.username,
792
792
  label: e.user.name,
793
793
  hint: e.user.email,
794
- icon: /* @__PURE__ */ q(A, {
794
+ icon: /* @__PURE__ */ q(k, {
795
795
  name: e.user.name,
796
796
  src: e.user.avatarUrl,
797
797
  size: "xs",
@@ -799,99 +799,99 @@ function de({ workspace: e, teamKey: r, isAdmin: a }) {
799
799
  })
800
800
  })),
801
801
  value: s,
802
- onValueChange: T,
802
+ onValueChange: S,
803
803
  align: "end",
804
- placeholder: x("addPlaceholder"),
805
- "aria-label": x("addMember"),
806
- trigger: /* @__PURE__ */ J(j, {
804
+ placeholder: v("addPlaceholder"),
805
+ "aria-label": v("addMember"),
806
+ trigger: /* @__PURE__ */ J(A, {
807
807
  type: "button",
808
808
  size: "sm",
809
- loading: w.isPending,
809
+ loading: x.isPending,
810
810
  children: [
811
- /* @__PURE__ */ q(f, { className: "size-3.5" }),
811
+ /* @__PURE__ */ q(m, { className: "size-3.5" }),
812
812
  " ",
813
- x("addMember")
813
+ v("addMember")
814
814
  ]
815
815
  })
816
816
  })] }),
817
- children: [/* @__PURE__ */ J(M, {
817
+ children: [/* @__PURE__ */ J(j, {
818
818
  size: "fill",
819
819
  padding: "none",
820
820
  divided: !0,
821
821
  interactive: !1,
822
822
  render: /* @__PURE__ */ q("ul", {}),
823
- children: [s.map((t) => /* @__PURE__ */ J("li", {
824
- onContextMenu: (n) => g(n, [
823
+ children: [s.map((e) => /* @__PURE__ */ J("li", {
824
+ onContextMenu: (t) => f(t, [
825
825
  {
826
- label: x("viewIssues"),
827
- onClick: () => _({
826
+ label: v("viewIssues"),
827
+ onClick: () => p({
828
828
  to: "/$workspace/teams/$key/issues",
829
829
  params: {
830
- workspace: e,
830
+ workspace: n,
831
831
  key: r
832
832
  },
833
- search: { assignee: t }
833
+ search: { assignee: e }
834
834
  })
835
835
  },
836
- d(C("copyEmail"), p(t).email ?? ""),
837
- ...a || t === E ? [H, {
838
- label: x(t === E ? "leaveTeam" : "removeFromTeam"),
836
+ C(b("copyEmail"), u(e).email ?? ""),
837
+ ...a || e === w ? [V, {
838
+ label: v(e === w ? "leaveTeam" : "removeFromTeam"),
839
839
  destructive: !0,
840
- onClick: () => w.mutate([{
841
- username: t,
840
+ onClick: () => x.mutate([{
841
+ username: e,
842
842
  add: !1
843
843
  }])
844
844
  }] : []
845
845
  ]),
846
846
  className: "flex items-center gap-3 px-3 py-2 text-sm",
847
847
  children: [
848
- /* @__PURE__ */ q(y, {
849
- workspace: e,
850
- handle: t,
851
- children: /* @__PURE__ */ q(A, {
852
- name: p(t).name,
853
- src: p(t).avatarUrl,
848
+ /* @__PURE__ */ q(_, {
849
+ workspace: n,
850
+ handle: e,
851
+ children: /* @__PURE__ */ q(k, {
852
+ name: u(e).name,
853
+ src: u(e).avatarUrl,
854
854
  size: "md"
855
855
  })
856
856
  }),
857
857
  /* @__PURE__ */ J("span", {
858
858
  className: "flex-1",
859
- children: [p(t).name, t === E && /* @__PURE__ */ J("span", {
859
+ children: [u(e).name, e === w && /* @__PURE__ */ J("span", {
860
860
  className: "text-muted-foreground",
861
- children: [" ", x("you")]
861
+ children: [" ", v("you")]
862
862
  })]
863
863
  }),
864
- (a || t === E) && /* @__PURE__ */ q("button", {
864
+ (a || e === w) && /* @__PURE__ */ q("button", {
865
865
  type: "button",
866
- onClick: () => w.mutate([{
867
- username: t,
866
+ onClick: () => x.mutate([{
867
+ username: e,
868
868
  add: !1
869
869
  }]),
870
870
  className: "text-xs text-muted-foreground hover:text-danger",
871
- children: t === E ? x("leave") : C("remove")
871
+ children: e === w ? v("leave") : b("remove")
872
872
  })
873
873
  ]
874
- }, t)), s.length === 0 && /* @__PURE__ */ q("li", {
874
+ }, e)), s.length === 0 && /* @__PURE__ */ q("li", {
875
875
  className: "px-3 py-2 text-sm text-muted-foreground",
876
- children: x("noMembers")
876
+ children: v("noMembers")
877
877
  })]
878
- }), /* @__PURE__ */ q(F, {
878
+ }), /* @__PURE__ */ q(P, {
879
879
  size: "md",
880
880
  className: "mt-2",
881
- children: v
881
+ children: h
882
882
  })]
883
883
  });
884
884
  }
885
- function fe({ workspace: e, teamKey: r }) {
886
- let { data: i } = Q(s(e, r)), { data: a } = Q(l(e)), o = Z(), c = K("team"), d = Y({
887
- mutationFn: async (i) => n(await t.PUT("/api/v1/workspaces/{workspace}/teams/{key}/access", {
885
+ function fe({ workspace: r, teamKey: i }) {
886
+ let { data: o } = Q(a(r, i)), { data: l } = Q(s(r)), u = Z(), d = G("team"), f = Y({
887
+ mutationFn: async (n) => t(await e.PUT("/api/v1/workspaces/{workspace}/teams/{key}/access", {
888
888
  params: { path: {
889
- workspace: e,
890
- key: r
889
+ workspace: r,
890
+ key: i
891
891
  } },
892
892
  body: {
893
- restricted: !!i.restricted,
894
- grants: i.grants.map((e) => ({
893
+ restricted: !!n.restricted,
894
+ grants: n.grants.map((e) => ({
895
895
  principal: {
896
896
  kind: e.principal.kind,
897
897
  handle: e.principal.handle
@@ -900,55 +900,55 @@ function fe({ workspace: e, teamKey: r }) {
900
900
  }))
901
901
  }
902
902
  })),
903
- onSuccess: (t) => o.setQueryData(s(e, r).queryKey, t),
903
+ onSuccess: (e) => u.setQueryData(a(r, i).queryKey, e),
904
904
  onSettled: () => {
905
- o.invalidateQueries({ queryKey: s(e, r).queryKey }), o.invalidateQueries({ queryKey: l(e).queryKey }), u(o, e);
905
+ u.invalidateQueries({ queryKey: a(r, i).queryKey }), u.invalidateQueries({ queryKey: s(r).queryKey }), n(u, r);
906
906
  }
907
907
  });
908
- return /* @__PURE__ */ q(L, {
908
+ return /* @__PURE__ */ q(I, {
909
909
  variant: "bare",
910
910
  headingLevel: 2,
911
911
  collapsible: !1,
912
- title: c("access"),
913
- description: c("accessDescription"),
914
- children: /* @__PURE__ */ q(C, {
915
- workspace: e,
916
- resourceName: a.find((e) => e.key === r)?.name ?? r,
917
- access: i,
918
- save: (e) => d.mutateAsync(e),
919
- openLabel: c("everyone"),
912
+ title: d("access"),
913
+ description: d("accessDescription"),
914
+ children: /* @__PURE__ */ q(c, {
915
+ workspace: r,
916
+ resourceName: l.find((e) => e.key === i)?.name ?? i,
917
+ access: o,
918
+ save: (e) => f.mutateAsync(e),
919
+ openLabel: d("everyone"),
920
920
  rules: [{
921
921
  id: "admins",
922
- icon: /* @__PURE__ */ q(p, { className: "size-4" }),
923
- title: c("admins"),
924
- detail: c("adminsDetail"),
922
+ icon: /* @__PURE__ */ q(h, { className: "size-4" }),
923
+ title: d("admins"),
924
+ detail: d("adminsDetail"),
925
925
  roleId: "admin"
926
- }, ...i.restricted ? [] : [{
926
+ }, ...o.restricted ? [] : [{
927
927
  id: "everyone",
928
- icon: /* @__PURE__ */ q(m, { className: "size-4" }),
929
- title: c("everyone"),
930
- detail: c("everyoneDetail")
928
+ icon: /* @__PURE__ */ q(g, { className: "size-4" }),
929
+ title: d("everyone"),
930
+ detail: d("everyoneDetail")
931
931
  }]]
932
932
  })
933
933
  });
934
934
  }
935
- function pe({ workspace: e, team: r }) {
936
- let i = K("team"), a = Z(), o = G(), { confirm: s, dialog: c } = _(), u = !!r.archivedAt, d = Y({
937
- mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
935
+ function pe({ workspace: n, team: r }) {
936
+ let i = G("team"), a = Z(), o = W(), { confirm: c, dialog: l } = S(), u = !!r.archivedAt, d = Y({
937
+ mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
938
938
  params: { path: {
939
- workspace: e,
939
+ workspace: n,
940
940
  key: r.key
941
941
  } },
942
942
  body: { archived: i }
943
943
  })),
944
- onSettled: () => a.invalidateQueries({ queryKey: l(e).queryKey })
945
- }), f = () => s({
944
+ onSettled: () => a.invalidateQueries({ queryKey: s(n).queryKey })
945
+ }), f = () => c({
946
946
  title: i("archiveConfirm", { name: r.name }),
947
947
  description: i("archiveDetail"),
948
948
  confirmLabel: i("archive"),
949
949
  onConfirm: () => d.mutateAsync(!0)
950
950
  });
951
- return /* @__PURE__ */ J(L, {
951
+ return /* @__PURE__ */ J(I, {
952
952
  variant: "card",
953
953
  ...!u && { tone: "error" },
954
954
  collapsible: !1,
@@ -956,41 +956,41 @@ function pe({ workspace: e, team: r }) {
956
956
  title: i(u ? "archived" : "dangerZone"),
957
957
  description: i(u ? "archivedDetail" : "archiveDetail"),
958
958
  children: [
959
- u ? /* @__PURE__ */ q(j, {
959
+ u ? /* @__PURE__ */ q(A, {
960
960
  onClick: () => d.mutate(!1),
961
961
  loading: d.isPending,
962
962
  children: i("restore")
963
- }) : /* @__PURE__ */ q(j, {
963
+ }) : /* @__PURE__ */ q(A, {
964
964
  variant: "danger",
965
965
  onClick: f,
966
966
  loading: d.isPending,
967
967
  children: i("archive")
968
968
  }),
969
- d.error && !d.variables && /* @__PURE__ */ q(F, {
969
+ d.error && !d.variables && /* @__PURE__ */ q(P, {
970
970
  size: "md",
971
971
  className: "mt-3",
972
972
  children: o(d.error)
973
973
  }),
974
- c,
974
+ l,
975
975
  /* @__PURE__ */ q(me, {
976
- workspace: e,
976
+ workspace: n,
977
977
  team: r
978
978
  })
979
979
  ]
980
980
  });
981
981
  }
982
- function me({ workspace: e, team: r }) {
983
- let a = K("team"), o = Z(), s = i(), c = G(), [u, d] = W(!1), [f, p] = W(""), [m, h] = W(null), g = Y({
984
- mutationFn: async () => n(await t.DELETE("/api/v1/workspaces/{workspace}/teams/{key}", { params: { path: {
985
- workspace: e,
982
+ function me({ workspace: n, team: r }) {
983
+ let i = G("team"), a = Z(), o = E(), c = W(), [l, u] = U(!1), [d, f] = U(""), [p, m] = U(null), h = Y({
984
+ mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/teams/{key}", { params: { path: {
985
+ workspace: n,
986
986
  key: r.key
987
987
  } } })),
988
988
  onSuccess: async () => {
989
- o.setQueryData(l(e).queryKey, (e) => e?.filter((e) => e.id !== r.id)), await s({
989
+ a.setQueryData(s(n).queryKey, (e) => e?.filter((e) => e.id !== r.id)), await o({
990
990
  to: "/$workspace",
991
- params: { workspace: e },
991
+ params: { workspace: n },
992
992
  replace: !0
993
- }), await o.invalidateQueries({ queryKey: l(e).queryKey });
993
+ }), await a.invalidateQueries({ queryKey: s(n).queryKey });
994
994
  }
995
995
  });
996
996
  return /* @__PURE__ */ J("div", {
@@ -998,42 +998,42 @@ function me({ workspace: e, team: r }) {
998
998
  children: [
999
999
  /* @__PURE__ */ q("h3", {
1000
1000
  className: "text-sm font-medium",
1001
- children: a("delete")
1001
+ children: i("delete")
1002
1002
  }),
1003
1003
  /* @__PURE__ */ q("p", {
1004
1004
  className: "mt-1 text-sm text-muted-foreground",
1005
- children: a("deleteDetail")
1005
+ children: i("deleteDetail")
1006
1006
  }),
1007
- /* @__PURE__ */ q(j, {
1007
+ /* @__PURE__ */ q(A, {
1008
1008
  variant: "danger",
1009
1009
  className: "mt-3",
1010
- onClick: () => d(!0),
1011
- children: a("delete")
1010
+ onClick: () => u(!0),
1011
+ children: i("delete")
1012
1012
  }),
1013
- /* @__PURE__ */ q(ee, {
1014
- open: u,
1013
+ /* @__PURE__ */ q(te, {
1014
+ open: l,
1015
1015
  onClose: () => {
1016
- d(!1), p(""), h(null);
1016
+ u(!1), f(""), m(null);
1017
1017
  },
1018
- title: a("deleteConfirm", { name: r.name }),
1019
- description: a("deleteConfirmDetail"),
1020
- confirmLabel: a("delete"),
1018
+ title: i("deleteConfirm", { name: r.name }),
1019
+ description: i("deleteConfirmDetail"),
1020
+ confirmLabel: i("delete"),
1021
1021
  destructive: !0,
1022
1022
  initialFocus: "first-control",
1023
- confirmDisabled: f.trim() !== r.key,
1024
- pending: g.isPending,
1025
- error: m ? c(m) : void 0,
1026
- onConfirm: () => g.mutateAsync().catch((e) => {
1027
- throw h(e), e;
1023
+ confirmDisabled: d.trim() !== r.key,
1024
+ pending: h.isPending,
1025
+ error: p ? c(p) : void 0,
1026
+ onConfirm: () => h.mutateAsync().catch((e) => {
1027
+ throw m(e), e;
1028
1028
  }),
1029
1029
  children: /* @__PURE__ */ J("label", {
1030
1030
  className: "mt-3 block text-sm",
1031
- children: [a.rich("deleteTypeKey", { key: () => /* @__PURE__ */ q("code", {
1031
+ children: [i.rich("deleteTypeKey", { key: () => /* @__PURE__ */ q("code", {
1032
1032
  className: "font-mono",
1033
1033
  children: r.key
1034
- }) }), /* @__PURE__ */ q(I, {
1035
- value: f,
1036
- onChange: (e) => p(e.target.value),
1034
+ }) }), /* @__PURE__ */ q(F, {
1035
+ value: d,
1036
+ onChange: (e) => f(e.target.value),
1037
1037
  autoComplete: "off",
1038
1038
  spellCheck: !1,
1039
1039
  className: "mt-1.5 w-full"