@parallelworks/tandem-web 0.141.2 → 0.143.0

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 (64) hide show
  1. package/_virtual/_virtual_i18n/en/common.js +162 -5
  2. package/_virtual/_virtual_i18n/es/common.js +162 -5
  3. package/_virtual/_virtual_i18n/ja/common.js +162 -5
  4. package/_virtual/_virtual_i18n/ko/common.js +162 -5
  5. package/_virtual/_virtual_i18n/zh/common.js +162 -5
  6. package/components/AccessGrants.js +6 -6
  7. package/components/ActivityTimeline.js +2 -0
  8. package/components/CodeHostSettings.js +25 -25
  9. package/components/CustomFields.js +349 -0
  10. package/components/DocProperties.js +320 -0
  11. package/components/DocTable.js +176 -0
  12. package/components/DocViewBlock.js +104 -0
  13. package/components/DocsTree.js +16 -6
  14. package/components/Editor.js +30 -28
  15. package/components/GitHub.js +22 -22
  16. package/components/IssueBoard.js +48 -43
  17. package/components/IssueEvent.js +2 -0
  18. package/components/IssueFilters.js +210 -122
  19. package/components/IssueImport.js +1 -1
  20. package/components/IssueRow.js +96 -79
  21. package/components/IssueTemplates.js +216 -156
  22. package/components/IssueTypes.js +318 -0
  23. package/components/NewIssueDialog.js +254 -216
  24. package/components/SettingsNav.js +40 -35
  25. package/components/SlashMenu.js +2 -0
  26. package/components/TeamForm.js +49 -35
  27. package/components/TeamRepositories.js +51 -51
  28. package/components/TeamWorkflow.js +8 -8
  29. package/components/Updates.js +8 -8
  30. package/lib/boardMove.js +69 -47
  31. package/lib/customFields.js +113 -0
  32. package/lib/docProperties.js +135 -0
  33. package/lib/issueDisplay.js +27 -12
  34. package/lib/issueList.js +166 -62
  35. package/lib/issueTypes.js +50 -0
  36. package/lib/teamTree.js +24 -0
  37. package/lib/views.js +13 -11
  38. package/package.json +1 -1
  39. package/pages/issues.js +331 -291
  40. package/routeTree.gen.js +174 -162
  41. package/routes/_workspace/agents/index2.js +9 -9
  42. package/routes/_workspace/docs/_doc2.js +147 -140
  43. package/routes/_workspace/docs/space._space.js +6 -0
  44. package/routes/_workspace/docs/space2._space.js +256 -0
  45. package/routes/_workspace/docs2.js +3 -3
  46. package/routes/_workspace/issues/_identifier2.js +433 -370
  47. package/routes/_workspace/projects/_projectId3.js +213 -201
  48. package/routes/_workspace/settings/audit-log3.js +2 -0
  49. package/routes/_workspace/settings/fields.js +6 -0
  50. package/routes/_workspace/settings/fields2.js +30 -0
  51. package/routes/_workspace/settings/fields3.js +5 -0
  52. package/routes/_workspace/settings/groups2.js +74 -74
  53. package/routes/_workspace/settings/labels2.js +33 -33
  54. package/routes/_workspace/settings/members2.js +35 -35
  55. package/routes/_workspace/settings/roles2.js +24 -24
  56. package/routes/_workspace/settings/runners2.js +18 -18
  57. package/routes/_workspace/settings/sessions2.js +9 -9
  58. package/routes/_workspace/settings/slack2.js +8 -8
  59. package/routes/_workspace/settings/sso2.js +50 -50
  60. package/routes/_workspace/settings/tokens2.js +15 -15
  61. package/routes/_workspace/settings/webhooks2.js +42 -42
  62. package/routes/_workspace/teams/_key/settings2.js +138 -76
  63. package/routes/_workspace2.js +321 -319
  64. package/styles.css +39 -0
@@ -3,30 +3,32 @@ import { api as t, unwrap as n } from "../../../../api/client.js";
3
3
  import { usePageTitle as r } from "../../../../lib/pageTitle.js";
4
4
  import { useNavigate as i } from "../../../../lib/router.js";
5
5
  import { agentsQuery as a, meQuery as o, teamAccessQuery as s, teamMembersQuery as c, teamsQuery as l } from "../../../../api/queries.js";
6
- import { AddIcon as u, ShieldIcon as d, UsersIcon as f } from "../../../../components/icons.js";
7
- import { Route as p } from "./settings.js";
8
- import { copyItem as m } from "../../../../lib/menus.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";
6
+ import { useConfirm as u } from "../../../../lib/confirm.js";
7
+ import { AddIcon as d, ShieldIcon as f, UsersIcon as p } from "../../../../components/icons.js";
8
+ import { Route as m } from "./settings.js";
9
+ import { copyItem as h } from "../../../../lib/menus.js";
10
+ import { usePeople as g } from "../../../../lib/people.js";
11
+ import { usePermissions as _ } from "../../../../lib/roles.js";
12
12
  import { PersonHoverCard as v } from "../../../../components/PersonHoverCard.js";
13
- import { FavoriteStar as y } from "../../../../components/FavoriteStar.js";
14
- import { IconUpload as b } from "../../../../components/IconUpload.js";
15
- import { AccessGrants as x } from "../../../../components/AccessGrants.js";
16
- import { BugRotation as S } from "../../../../components/BugRotation.js";
17
- import { IssueTemplates as C } from "../../../../components/IssueTemplates.js";
18
- import { StatusRules as w } from "../../../../components/StatusRules.js";
19
- import { TeamRepositories as T } from "../../../../components/TeamRepositories.js";
20
- import { TeamWorkflow as E } from "../../../../components/TeamWorkflow.js";
21
- import { Avatar as D, Button as O, Card as k, Combobox as A, ConfirmModal as j, CopyButton as M, ErrorText as N, Input as P, PageHeader as F, Section as I, Select as L, SettingRow as R, SettingsCard as z, Switch as B, menuDivider as V, useOpenMenu as H } from "@parallelworks/ui";
13
+ import { FieldSettings as y } from "../../../../components/CustomFields.js";
14
+ import { withSubTeams as b } from "../../../../lib/teamTree.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 { Avatar as k, Button as A, Card as ee, Combobox as te, ConfirmModal as j, CopyButton as M, ErrorText as N, Input as P, PageHeader as F, Section as I, Select as L, SettingRow as R, SettingsCard as z, Switch as B, menuDivider as V, useOpenMenu as H } from "@parallelworks/ui";
22
24
  import { useState as U } from "react";
23
25
  import { useErrorMessage as W } from "@parallelworks/problem/react";
24
26
  import { useTranslations as G } from "use-intl";
25
27
  import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
26
28
  import { useMutation as Y, useQuery as X, useQueryClient as Z, useSuspenseQuery as Q } from "@tanstack/react-query";
27
29
  // src/routes/$workspace/teams/$key/settings.tsx?tsr-split=component
28
- function ee() {
29
- let { workspace: e, key: i } = p.useParams(), { data: a } = Q(l(e)), o = g(e, { team: i }), s = o.has("manage_teams"), c = G("settingsNav"), u = Z(), d = Y({
30
+ function ne() {
31
+ let { workspace: e, key: i } = m.useParams(), { data: a } = Q(l(e)), o = _(e, { team: i }), s = o.has("manage_teams"), c = G("settingsNav"), u = Z(), d = Y({
30
32
  mutationFn: async (r) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
31
33
  params: { path: {
32
34
  workspace: e,
@@ -59,7 +61,7 @@ function ee() {
59
61
  /* @__PURE__ */ J("div", {
60
62
  className: "flex items-center gap-3",
61
63
  children: [
62
- /* @__PURE__ */ q(b, {
64
+ /* @__PURE__ */ q(S, {
63
65
  workspace: e,
64
66
  icon: f.icon,
65
67
  name: f.name,
@@ -81,73 +83,87 @@ function ee() {
81
83
  })
82
84
  ]
83
85
  }),
84
- /* @__PURE__ */ q(y, {
86
+ /* @__PURE__ */ q(x, {
85
87
  workspace: e,
86
88
  kind: "team",
87
89
  target: f.id
88
90
  })
89
91
  ]
90
92
  }),
91
- /* @__PURE__ */ q(se, {
93
+ /* @__PURE__ */ q(re, {
94
+ workspace: e,
95
+ team: f,
96
+ teams: a,
97
+ isAdmin: s
98
+ }),
99
+ /* @__PURE__ */ q(ue, {
92
100
  workspace: e,
93
101
  teamKey: i,
94
102
  isAdmin: o.has("manage_members")
95
103
  }),
96
- /* @__PURE__ */ q(E, {
104
+ /* @__PURE__ */ q(O, {
97
105
  workspace: e,
98
106
  teamKey: i,
99
107
  isAdmin: o.has("manage_labels")
100
108
  }),
101
- /* @__PURE__ */ q(w, {
109
+ o.has("manage_labels") && /* @__PURE__ */ q(y, {
110
+ workspace: e,
111
+ target: "issue",
112
+ team: {
113
+ key: i,
114
+ id: f.id
115
+ }
116
+ }),
117
+ /* @__PURE__ */ q(E, {
102
118
  workspace: e,
103
119
  team: f,
104
120
  isAdmin: s
105
121
  }),
106
- /* @__PURE__ */ q(te, {
122
+ /* @__PURE__ */ q(ie, {
107
123
  workspace: e,
108
124
  team: f,
109
125
  isAdmin: s
110
126
  }),
111
- /* @__PURE__ */ q(re, {
127
+ /* @__PURE__ */ q(oe, {
112
128
  workspace: e,
113
129
  team: f,
114
130
  isAdmin: s
115
131
  }),
116
- /* @__PURE__ */ q(ne, {
132
+ /* @__PURE__ */ q(ae, {
117
133
  workspace: e,
118
134
  team: f,
119
135
  isAdmin: s
120
136
  }),
121
- /* @__PURE__ */ q(S, {
137
+ /* @__PURE__ */ q(w, {
122
138
  workspace: e,
123
139
  teamKey: i,
124
140
  isAdmin: s
125
141
  }),
126
- /* @__PURE__ */ q(C, {
142
+ /* @__PURE__ */ q(T, {
127
143
  workspace: e,
128
144
  teamKey: i,
129
145
  isAdmin: o.has("manage_templates")
130
146
  }),
131
- /* @__PURE__ */ q(ie, {
147
+ /* @__PURE__ */ q(se, {
132
148
  workspace: e,
133
149
  team: f,
134
150
  isAdmin: s
135
151
  }),
136
- /* @__PURE__ */ q(oe, {
152
+ /* @__PURE__ */ q(le, {
137
153
  workspace: e,
138
154
  team: f,
139
155
  isAdmin: s
140
156
  }),
141
- /* @__PURE__ */ q(T, {
157
+ /* @__PURE__ */ q(D, {
142
158
  workspace: e,
143
159
  team: f,
144
160
  isAdmin: s
145
161
  }),
146
- /* @__PURE__ */ q(ce, {
162
+ /* @__PURE__ */ q(de, {
147
163
  workspace: e,
148
164
  teamKey: i
149
165
  }),
150
- s && /* @__PURE__ */ q(le, {
166
+ s && /* @__PURE__ */ q(fe, {
151
167
  workspace: e,
152
168
  team: f
153
169
  })
@@ -156,7 +172,53 @@ function ee() {
156
172
  })]
157
173
  }) : null;
158
174
  }
159
- function te({ workspace: r, team: i, isAdmin: a }) {
175
+ function re({ workspace: e, team: r, teams: i, isAdmin: a }) {
176
+ let o = G("teamParent"), s = W(), c = Z(), u = Y({
177
+ mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
178
+ params: { path: {
179
+ workspace: e,
180
+ key: r.key
181
+ } },
182
+ body: { parent: i }
183
+ })),
184
+ onSettled: () => c.invalidateQueries({ queryKey: l(e).queryKey })
185
+ }), d = b(i, r.id), f = i.find((e) => e.id === r.parentId), p = i.filter((e) => e.parentId === r.id && !e.archivedAt);
186
+ return /* @__PURE__ */ J(z, {
187
+ title: o("title"),
188
+ description: o("description"),
189
+ children: [
190
+ /* @__PURE__ */ q(R, {
191
+ label: o("parent"),
192
+ children: /* @__PURE__ */ q("div", {
193
+ className: "w-56",
194
+ children: /* @__PURE__ */ q(L, {
195
+ width: "fill",
196
+ "aria-label": o("parent"),
197
+ value: f?.key ?? "",
198
+ disabled: !a || u.isPending,
199
+ onValueChange: (e) => u.mutate(e),
200
+ items: [{
201
+ value: "",
202
+ label: o("none")
203
+ }, ...i.filter((e) => !e.archivedAt && !d.has(e.id)).map((e) => ({
204
+ value: e.key,
205
+ label: e.name
206
+ }))]
207
+ })
208
+ })
209
+ }),
210
+ p.length > 0 && /* @__PURE__ */ q(R, {
211
+ label: o("subTeams"),
212
+ children: /* @__PURE__ */ q("span", {
213
+ className: "text-sm",
214
+ children: p.map((e) => e.name).join(", ")
215
+ })
216
+ }),
217
+ u.error && /* @__PURE__ */ q(N, { children: s(u.error) })
218
+ ]
219
+ });
220
+ }
221
+ function ie({ workspace: r, team: i, isAdmin: a }) {
160
222
  let s = G("teamIntake"), c = W(), u = Z(), { data: d } = X(o), f = () => u.invalidateQueries({ queryKey: l(r).queryKey }), p = { params: { path: {
161
223
  workspace: r,
162
224
  key: i.key
@@ -233,7 +295,7 @@ function te({ workspace: r, team: i, isAdmin: a }) {
233
295
  g && a && /* @__PURE__ */ q(R, {
234
296
  label: s("rotate"),
235
297
  helpText: s("rotateHelp"),
236
- children: /* @__PURE__ */ q(O, {
298
+ children: /* @__PURE__ */ q(A, {
237
299
  size: "sm",
238
300
  loading: h.isPending,
239
301
  onClick: () => h.mutate(),
@@ -244,7 +306,7 @@ function te({ workspace: r, team: i, isAdmin: a }) {
244
306
  ]
245
307
  });
246
308
  }
247
- function ne({ workspace: e, team: r, isAdmin: i }) {
309
+ function ae({ workspace: e, team: r, isAdmin: i }) {
248
310
  let a = G("planning.sla"), o = G("priority"), s = W(), c = Z(), u = Y({
249
311
  mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
250
312
  params: { path: {
@@ -294,7 +356,7 @@ function ne({ workspace: e, team: r, isAdmin: i }) {
294
356
  }, e)), u.isError && /* @__PURE__ */ q(N, { children: s(u.error) })]
295
357
  });
296
358
  }
297
- function re({ workspace: e, team: r, isAdmin: i }) {
359
+ function oe({ workspace: e, team: r, isAdmin: i }) {
298
360
  let a = G("planning.settings"), o = W(), s = Z(), c = Y({
299
361
  mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
300
362
  params: { path: {
@@ -499,7 +561,7 @@ var $ = [
499
561
  "merge",
500
562
  "release"
501
563
  ];
502
- function ie({ workspace: e, team: r, isAdmin: i }) {
564
+ function se({ workspace: e, team: r, isAdmin: i }) {
503
565
  let o = G("flow"), s = W(), c = Z(), { data: u = [] } = X(a(e)), d = Y({
504
566
  mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
505
567
  params: { path: {
@@ -579,7 +641,7 @@ function ie({ workspace: e, team: r, isAdmin: i }) {
579
641
  m("release") && /* @__PURE__ */ q(R, {
580
642
  label: o("releaseTargets"),
581
643
  helpText: o("releaseTargetsHelp"),
582
- children: /* @__PURE__ */ q(ae, {
644
+ children: /* @__PURE__ */ q(ce, {
583
645
  workspace: e,
584
646
  team: r,
585
647
  disabled: !i
@@ -610,7 +672,7 @@ function ie({ workspace: e, team: r, isAdmin: i }) {
610
672
  ]
611
673
  });
612
674
  }
613
- function ae({ workspace: e, team: r, disabled: i }) {
675
+ function ce({ workspace: e, team: r, disabled: i }) {
614
676
  let a = G("flow"), o = W(), s = Z(), [c, u] = U(r.releaseTargets.join(", ")), d = Y({
615
677
  mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
616
678
  params: { path: {
@@ -638,7 +700,7 @@ function ae({ workspace: e, team: r, disabled: i }) {
638
700
  })
639
701
  });
640
702
  }
641
- function oe({ workspace: e, team: r, isAdmin: i }) {
703
+ function le({ workspace: e, team: r, isAdmin: i }) {
642
704
  let a = G("team"), o = W(), s = Z(), c = Y({
643
705
  mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
644
706
  params: { path: {
@@ -665,8 +727,8 @@ function oe({ workspace: e, team: r, isAdmin: i }) {
665
727
  })
666
728
  });
667
729
  }
668
- function se({ workspace: e, teamKey: r, isAdmin: a }) {
669
- let { data: s } = Q(c(e, r)), { data: l } = Q(o), { members: d, person: f } = h(e), p = Z(), g = H(), _ = i(), [y, b] = U(null), x = G("team"), S = W(), C = G("common"), w = Y({
730
+ function ue({ workspace: e, teamKey: r, isAdmin: a }) {
731
+ let { data: s } = Q(c(e, r)), { data: l } = Q(o), { members: u, person: f } = g(e), p = Z(), m = H(), _ = i(), [y, b] = U(null), x = G("team"), S = W(), C = G("common"), w = Y({
670
732
  mutationFn: async (i) => {
671
733
  for (let { username: a, add: o } of i) {
672
734
  let i = { params: { path: {
@@ -686,14 +748,14 @@ function se({ workspace: e, teamKey: r, isAdmin: a }) {
686
748
  })), ...s.filter((t) => !e.includes(t)).map((e) => ({
687
749
  username: e,
688
750
  add: !1
689
- }))]), E = l?.user.username ?? "", j = s.includes(E);
751
+ }))]), E = l?.user.username ?? "", D = s.includes(E);
690
752
  return /* @__PURE__ */ J(I, {
691
753
  variant: "bare",
692
754
  headingLevel: 2,
693
755
  collapsible: !1,
694
756
  title: x("members"),
695
757
  description: x("membersDescription"),
696
- actions: /* @__PURE__ */ J(K, { children: [!j && /* @__PURE__ */ q(O, {
758
+ actions: /* @__PURE__ */ J(K, { children: [!D && /* @__PURE__ */ q(A, {
697
759
  type: "button",
698
760
  size: "sm",
699
761
  variant: "primary",
@@ -702,13 +764,13 @@ function se({ workspace: e, teamKey: r, isAdmin: a }) {
702
764
  add: !0
703
765
  }]),
704
766
  children: x("join")
705
- }), a && /* @__PURE__ */ q(A, {
767
+ }), a && /* @__PURE__ */ q(te, {
706
768
  multiple: !0,
707
- items: d.map((e) => ({
769
+ items: u.map((e) => ({
708
770
  value: e.user.username,
709
771
  label: e.user.name,
710
772
  hint: e.user.email,
711
- icon: /* @__PURE__ */ q(D, {
773
+ icon: /* @__PURE__ */ q(k, {
712
774
  name: e.user.name,
713
775
  src: e.user.avatarUrl,
714
776
  size: "xs",
@@ -720,25 +782,25 @@ function se({ workspace: e, teamKey: r, isAdmin: a }) {
720
782
  align: "end",
721
783
  placeholder: x("addPlaceholder"),
722
784
  "aria-label": x("addMember"),
723
- trigger: /* @__PURE__ */ J(O, {
785
+ trigger: /* @__PURE__ */ J(A, {
724
786
  type: "button",
725
787
  size: "sm",
726
788
  loading: w.isPending,
727
789
  children: [
728
- /* @__PURE__ */ q(u, { className: "size-3.5" }),
790
+ /* @__PURE__ */ q(d, { className: "size-3.5" }),
729
791
  " ",
730
792
  x("addMember")
731
793
  ]
732
794
  })
733
795
  })] }),
734
- children: [/* @__PURE__ */ J(k, {
796
+ children: [/* @__PURE__ */ J(ee, {
735
797
  size: "fill",
736
798
  padding: "none",
737
799
  divided: !0,
738
800
  interactive: !1,
739
801
  render: /* @__PURE__ */ q("ul", {}),
740
802
  children: [s.map((t) => /* @__PURE__ */ J("li", {
741
- onContextMenu: (n) => g(n, [
803
+ onContextMenu: (n) => m(n, [
742
804
  {
743
805
  label: x("viewIssues"),
744
806
  onClick: () => _({
@@ -750,7 +812,7 @@ function se({ workspace: e, teamKey: r, isAdmin: a }) {
750
812
  search: { assignee: t }
751
813
  })
752
814
  },
753
- m(C("copyEmail"), f(t).email ?? ""),
815
+ h(C("copyEmail"), f(t).email ?? ""),
754
816
  ...a || t === E ? [V, {
755
817
  label: x(t === E ? "leaveTeam" : "removeFromTeam"),
756
818
  destructive: !0,
@@ -765,7 +827,7 @@ function se({ workspace: e, teamKey: r, isAdmin: a }) {
765
827
  /* @__PURE__ */ q(v, {
766
828
  workspace: e,
767
829
  handle: t,
768
- children: /* @__PURE__ */ q(D, {
830
+ children: /* @__PURE__ */ q(k, {
769
831
  name: f(t).name,
770
832
  src: f(t).avatarUrl,
771
833
  size: "md"
@@ -799,7 +861,7 @@ function se({ workspace: e, teamKey: r, isAdmin: a }) {
799
861
  })]
800
862
  });
801
863
  }
802
- function ce({ workspace: e, teamKey: r }) {
864
+ function de({ workspace: e, teamKey: r }) {
803
865
  let { data: i } = Q(s(e, r)), { data: a } = Q(l(e)), o = Z(), c = G("team"), u = Y({
804
866
  mutationFn: async (i) => n(await t.PUT("/api/v1/workspaces/{workspace}/teams/{key}/access", {
805
867
  params: { path: {
@@ -833,7 +895,7 @@ function ce({ workspace: e, teamKey: r }) {
833
895
  collapsible: !1,
834
896
  title: c("access"),
835
897
  description: c("accessDescription"),
836
- children: /* @__PURE__ */ q(x, {
898
+ children: /* @__PURE__ */ q(C, {
837
899
  workspace: e,
838
900
  resourceName: a.find((e) => e.key === r)?.name ?? r,
839
901
  access: i,
@@ -841,21 +903,21 @@ function ce({ workspace: e, teamKey: r }) {
841
903
  openLabel: c("everyone"),
842
904
  rules: [{
843
905
  id: "admins",
844
- icon: /* @__PURE__ */ q(d, { className: "size-4" }),
906
+ icon: /* @__PURE__ */ q(f, { className: "size-4" }),
845
907
  title: c("admins"),
846
908
  detail: c("adminsDetail"),
847
909
  roleId: "admin"
848
910
  }, ...i.restricted ? [] : [{
849
911
  id: "everyone",
850
- icon: /* @__PURE__ */ q(f, { className: "size-4" }),
912
+ icon: /* @__PURE__ */ q(p, { className: "size-4" }),
851
913
  title: c("everyone"),
852
914
  detail: c("everyoneDetail")
853
915
  }]]
854
916
  })
855
917
  });
856
918
  }
857
- function le({ workspace: e, team: r }) {
858
- let i = G("team"), a = Z(), o = W(), { confirm: s, dialog: c } = _(), u = !!r.archivedAt, d = Y({
919
+ function fe({ workspace: e, team: r }) {
920
+ let i = G("team"), a = Z(), o = W(), { confirm: s, dialog: c } = u(), d = !!r.archivedAt, f = Y({
859
921
  mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
860
922
  params: { path: {
861
923
  workspace: e,
@@ -864,44 +926,44 @@ function le({ workspace: e, team: r }) {
864
926
  body: { archived: i }
865
927
  })),
866
928
  onSettled: () => a.invalidateQueries({ queryKey: l(e).queryKey })
867
- }), f = () => s({
929
+ }), p = () => s({
868
930
  title: i("archiveConfirm", { name: r.name }),
869
931
  description: i("archiveDetail"),
870
932
  confirmLabel: i("archive"),
871
- onConfirm: () => d.mutateAsync(!0)
933
+ onConfirm: () => f.mutateAsync(!0)
872
934
  });
873
935
  return /* @__PURE__ */ J(I, {
874
936
  variant: "card",
875
- ...!u && { tone: "error" },
937
+ ...!d && { tone: "error" },
876
938
  collapsible: !1,
877
939
  headingLevel: 2,
878
- title: i(u ? "archived" : "dangerZone"),
879
- description: i(u ? "archivedDetail" : "archiveDetail"),
940
+ title: i(d ? "archived" : "dangerZone"),
941
+ description: i(d ? "archivedDetail" : "archiveDetail"),
880
942
  children: [
881
- u ? /* @__PURE__ */ q(O, {
882
- onClick: () => d.mutate(!1),
883
- loading: d.isPending,
943
+ d ? /* @__PURE__ */ q(A, {
944
+ onClick: () => f.mutate(!1),
945
+ loading: f.isPending,
884
946
  children: i("restore")
885
- }) : /* @__PURE__ */ q(O, {
947
+ }) : /* @__PURE__ */ q(A, {
886
948
  variant: "danger",
887
- onClick: f,
888
- loading: d.isPending,
949
+ onClick: p,
950
+ loading: f.isPending,
889
951
  children: i("archive")
890
952
  }),
891
- d.error && !d.variables && /* @__PURE__ */ q(N, {
953
+ f.error && !f.variables && /* @__PURE__ */ q(N, {
892
954
  size: "md",
893
955
  className: "mt-3",
894
- children: o(d.error)
956
+ children: o(f.error)
895
957
  }),
896
958
  c,
897
- /* @__PURE__ */ q(ue, {
959
+ /* @__PURE__ */ q(pe, {
898
960
  workspace: e,
899
961
  team: r
900
962
  })
901
963
  ]
902
964
  });
903
965
  }
904
- function ue({ workspace: e, team: r }) {
966
+ function pe({ workspace: e, team: r }) {
905
967
  let a = G("team"), o = Z(), s = i(), c = W(), [u, d] = U(!1), [f, p] = U(""), [m, h] = U(null), g = Y({
906
968
  mutationFn: async () => n(await t.DELETE("/api/v1/workspaces/{workspace}/teams/{key}", { params: { path: {
907
969
  workspace: e,
@@ -926,7 +988,7 @@ function ue({ workspace: e, team: r }) {
926
988
  className: "mt-1 text-sm text-muted-foreground",
927
989
  children: a("deleteDetail")
928
990
  }),
929
- /* @__PURE__ */ q(O, {
991
+ /* @__PURE__ */ q(A, {
930
992
  variant: "danger",
931
993
  className: "mt-3",
932
994
  onClick: () => d(!0),
@@ -965,4 +1027,4 @@ function ue({ workspace: e, team: r }) {
965
1027
  ]
966
1028
  });
967
1029
  }
968
- export { ee as component };
1030
+ export { ne as component };