@burdenoff/microfe-organization 2026.601.1 → 2026.601.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.
@@ -5,233 +5,245 @@ import { useTr as r } from "../../../shared/hooks/useTr.js";
5
5
  import { SearchInput as ee } from "../../../shared/components/input/SearchInput.js";
6
6
  import { SelectionCheckbox as i } from "../../../shared/components/input/SelectionCheckbox.js";
7
7
  import { LoadingState as a } from "../../../shared/components/feedback/LoadingState.js";
8
- import { ErrorState as o } from "../../../shared/components/feedback/ErrorState.js";
9
- import { EmptyState as s } from "../../../shared/components/feedback/EmptyState.js";
10
- import { useDebouncedValue as te } from "../../../shared/hooks/useDebouncedValue.js";
11
- import { useConfirmDialog as ne } from "../../../shared/components/dialog/ConfirmDialog.js";
12
- import { PERMISSIONS as c } from "../../../constants/permissions.js";
13
- import { isNative as l, nativeConfirm as u, nativeImpact as d, nativeNotify as f, nativeToast as p } from "../../../../utils/nativeBridge.js";
14
- import { useDeleteWorkspace as m, useWorkspaces as h } from "../hooks/useWorkspaces.js";
15
- import { WorkspaceStatusBadge as g } from "../components/WorkspaceStatusBadge.js";
16
- import { useEffect as _, useMemo as re, useState as v } from "react";
17
- import { Briefcase as y, Eye as b, Plus as ie, RefreshCw as ae, SquarePen as x, Trash2 as S } from "lucide-react";
18
- import { usePermissions as C } from "@burdenoff/fe-libs/shared/providers/shell";
19
- import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
8
+ import { ErrorState as te } from "../../../shared/components/feedback/ErrorState.js";
9
+ import { EmptyState as o } from "../../../shared/components/feedback/EmptyState.js";
10
+ import { useDebouncedValue as s } from "../../../shared/hooks/useDebouncedValue.js";
11
+ import { useConfirmDialog as c } from "../../../shared/components/dialog/ConfirmDialog.js";
12
+ import { PERMISSIONS as l } from "../../../constants/permissions.js";
13
+ import { isNative as u, nativeConfirm as d, nativeImpact as f, nativeNotify as p, nativeToast as m } from "../../../../utils/nativeBridge.js";
14
+ import { useDeleteWorkspace as ne, useWorkspaces as re } from "../hooks/useWorkspaces.js";
15
+ import { WorkspaceStatusBadge as h } from "../components/WorkspaceStatusBadge.js";
16
+ import { useEffect as ie, useMemo as g, useState as _ } from "react";
17
+ import { Briefcase as ae, Eye as v, Plus as y, RefreshCw as oe, SquarePen as b, Trash2 as x } from "lucide-react";
18
+ import { usePermissions as S } from "@burdenoff/fe-libs/shared/providers/shell";
19
+ import { Fragment as se, jsx as C, jsxs as w } from "react/jsx-runtime";
20
20
  //#region src/organization-management/modules/workspaces/pages/WorkspacesListPage.tsx
21
- function D(e) {
21
+ function T(e) {
22
22
  return new Date(e).toLocaleDateString();
23
23
  }
24
- function O() {
25
- let O = r(), { navigate: k, basePath: A = "/organizations" } = e(), { hasPermission: j, isLoading: oe } = C(), [M, N] = v(""), P = te(M, 300), [F, I] = v({}), [L, R] = v(/* @__PURE__ */ new Set()), { openConfirmDialog: z, ConfirmDialog: B } = ne(), { workspaces: V, loading: H, error: U, refetch: W } = h({
26
- ...F,
27
- search: P || void 0
28
- }, 20, 0), { deleteWorkspace: G, loading: K } = m();
29
- _(() => {
30
- R((e) => {
31
- let t = new Set(V.map((e) => e.id)), n = new Set([...e].filter((e) => t.has(e)));
24
+ function E({ mode: E = "my" } = {}) {
25
+ let D = r(), { navigate: O, basePath: k = "/organizations" } = e(), { hasPermission: A, isLoading: ce } = S(), [j, le] = _(""), M = s(j, 300), [N, P] = _({}), [F, I] = _(/* @__PURE__ */ new Set()), { openConfirmDialog: L, ConfirmDialog: R } = c(), z = E === "admin" ? "all" : "my", { workspaces: B, loading: V, error: H, refetch: U } = re({
26
+ ...N,
27
+ search: M || void 0
28
+ }, z === "my" ? 100 : 20, 0, z), W = g(() => {
29
+ if (z !== "my") return B;
30
+ let e = M.trim().toLowerCase();
31
+ return B.filter((t) => {
32
+ let n = !e || t.name.toLowerCase().includes(e) || (t.slug?.toLowerCase().includes(e) ?? !1), r = !N.status || t.status === N.status;
33
+ return n && r;
34
+ });
35
+ }, [
36
+ B,
37
+ z,
38
+ M,
39
+ N.status
40
+ ]), { deleteWorkspace: G, loading: K } = ne();
41
+ ie(() => {
42
+ I((e) => {
43
+ let t = new Set(W.map((e) => e.id)), n = new Set([...e].filter((e) => t.has(e)));
32
44
  return n.size === e.size ? e : n;
33
45
  });
34
- }, [V]);
35
- let q = re(() => V.filter((e) => L.has(e.id)), [L, V]), J = V.length > 0 && V.every((e) => L.has(e.id)), Y = V.some((e) => L.has(e.id)) && !J, X = async (e) => {
46
+ }, [W]);
47
+ let q = g(() => W.filter((e) => F.has(e.id)), [F, W]), J = W.length > 0 && W.every((e) => F.has(e.id)), Y = W.some((e) => F.has(e.id)) && !J, X = async (e) => {
36
48
  try {
37
49
  let n = (await Promise.allSettled(e.map(async (e) => {
38
50
  let t = await G(e);
39
- if (t.errors?.length) throw Error(t.errors[0]?.message ?? O("workspaces.suspend.failed", "Failed to suspend workspace"));
51
+ if (t.errors?.length) throw Error(t.errors[0]?.message ?? D("workspaces.suspend.failed", "Failed to suspend workspace"));
40
52
  }))).find((e) => e.status === "rejected");
41
53
  if (n?.status === "rejected") throw n.reason;
42
- R(/* @__PURE__ */ new Set()), await W();
43
- let r = e.length === 1 ? O("workspaces.suspend.successSingle", "Workspace suspended successfully") : `${e.length} ${O("workspaces.suspend.successMany", "workspaces suspended successfully")}`;
44
- t.success(r), f("success"), l() && p(r);
54
+ I(/* @__PURE__ */ new Set()), await U();
55
+ let r = e.length === 1 ? D("workspaces.suspend.successSingle", "Workspace suspended successfully") : `${e.length} ${D("workspaces.suspend.successMany", "workspaces suspended successfully")}`;
56
+ t.success(r), p("success"), u() && m(r);
45
57
  } catch (e) {
46
- let n = e instanceof Error ? e.message : O("workspaces.suspend.failed", "Failed to suspend workspace");
47
- t.error(n), f("error"), l() && p(n);
58
+ let n = e instanceof Error ? e.message : D("workspaces.suspend.failed", "Failed to suspend workspace");
59
+ t.error(n), p("error"), u() && m(n);
48
60
  }
49
61
  }, Z = (e, t) => {
50
- d("medium");
51
- let n = O("workspaces.suspend.title", "Suspend workspace"), r = `${O("workspaces.suspend.prefix", "Suspend")} ${t}? ${O("workspaces.suspend.suffix", "Workspace members will lose access until it is reactivated.")}`;
52
- u({
62
+ f("medium");
63
+ let n = D("workspaces.suspend.title", "Suspend workspace"), r = `${D("workspaces.suspend.prefix", "Suspend")} ${t}? ${D("workspaces.suspend.suffix", "Workspace members will lose access until it is reactivated.")}`;
64
+ d({
53
65
  title: n,
54
66
  message: r,
55
- okButtonTitle: O("workspaces.suspend.confirm", "Suspend")
67
+ okButtonTitle: D("workspaces.suspend.confirm", "Suspend")
56
68
  }).then((t) => {
57
- t === null ? z({
69
+ t === null ? L({
58
70
  title: n,
59
71
  description: r,
60
- confirmText: O("workspaces.suspend.confirm", "Suspend"),
72
+ confirmText: D("workspaces.suspend.confirm", "Suspend"),
61
73
  variant: "warning",
62
74
  onConfirm: () => {
63
75
  X([e]);
64
76
  }
65
77
  }) : t && X([e]);
66
78
  });
67
- }, se = () => {
68
- q.length !== 0 && z({
69
- title: O("workspaces.suspend.bulkTitle", "Suspend selected workspaces"),
70
- description: `${O("workspaces.suspend.prefix", "Suspend")} ${q.length} ${O(q.length === 1 ? "workspaces.suspend.bulkSuffixSingle" : "workspaces.suspend.bulkSuffixMany", q.length === 1 ? "selected workspace?" : "selected workspaces?")}`,
71
- confirmText: `${O("workspaces.suspend.confirm", "Suspend")} ${q.length}`,
79
+ }, ue = () => {
80
+ q.length !== 0 && L({
81
+ title: D("workspaces.suspend.bulkTitle", "Suspend selected workspaces"),
82
+ description: `${D("workspaces.suspend.prefix", "Suspend")} ${q.length} ${D(q.length === 1 ? "workspaces.suspend.bulkSuffixSingle" : "workspaces.suspend.bulkSuffixMany", q.length === 1 ? "selected workspace?" : "selected workspaces?")}`,
83
+ confirmText: `${D("workspaces.suspend.confirm", "Suspend")} ${q.length}`,
72
84
  variant: "warning",
73
85
  onConfirm: () => {
74
86
  X(q.map((e) => e.id));
75
87
  }
76
88
  });
77
89
  }, Q = (e, t) => {
78
- R((n) => {
90
+ I((n) => {
79
91
  let r = new Set(n);
80
92
  return t ? r.add(e) : r.delete(e), r;
81
93
  });
82
94
  }, $ = (e) => {
83
- R((t) => {
95
+ I((t) => {
84
96
  let n = new Set(t);
85
- return V.forEach((t) => {
97
+ return W.forEach((t) => {
86
98
  e ? n.add(t.id) : n.delete(t.id);
87
99
  }), n;
88
100
  });
89
101
  };
90
- return oe ? /* @__PURE__ */ T("div", {
102
+ return ce ? /* @__PURE__ */ C("div", {
91
103
  className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
92
- children: /* @__PURE__ */ T(a, { message: O("common.loadingPermissions", "Loading permissions...") })
93
- }) : j(c.WORKSPACE_LIST) ? H ? /* @__PURE__ */ T("div", {
104
+ children: /* @__PURE__ */ C(a, { message: D("common.loadingPermissions", "Loading permissions...") })
105
+ }) : A(l.WORKSPACE_LIST) ? V ? /* @__PURE__ */ C("div", {
94
106
  className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6",
95
- children: /* @__PURE__ */ T(a, { message: O("workspaces.list.loading", "Loading workspaces...") })
96
- }) : U ? /* @__PURE__ */ T("div", {
107
+ children: /* @__PURE__ */ C(a, { message: D("workspaces.list.loading", "Loading workspaces...") })
108
+ }) : H ? /* @__PURE__ */ C("div", {
97
109
  className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6",
98
- children: /* @__PURE__ */ T(o, {
99
- message: U.message,
110
+ children: /* @__PURE__ */ C(te, {
111
+ message: H.message,
100
112
  action: {
101
- label: O("common.retry", "Retry"),
113
+ label: D("common.retry", "Retry"),
102
114
  onClick: () => {
103
- W();
115
+ U();
104
116
  }
105
117
  }
106
118
  })
107
- }) : /* @__PURE__ */ E("div", {
119
+ }) : /* @__PURE__ */ w("div", {
108
120
  className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6 animate-in fade-in duration-300",
109
- children: [/* @__PURE__ */ E("div", {
121
+ children: [/* @__PURE__ */ w("div", {
110
122
  className: "mx-auto flex w-full max-w-7xl flex-col gap-6",
111
123
  children: [
112
- /* @__PURE__ */ E("div", {
124
+ /* @__PURE__ */ w("div", {
113
125
  className: "flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",
114
- children: [/* @__PURE__ */ E("div", {
126
+ children: [/* @__PURE__ */ w("div", {
115
127
  className: "space-y-2",
116
- children: [/* @__PURE__ */ T("h1", {
128
+ children: [/* @__PURE__ */ C("h1", {
117
129
  className: "text-3xl font-bold text-[var(--color-text-primary)]",
118
- children: O("workspaces.list.title", "Workspaces")
119
- }), /* @__PURE__ */ T("p", {
130
+ children: D("workspaces.list.title", "Workspaces")
131
+ }), /* @__PURE__ */ C("p", {
120
132
  className: "max-w-2xl text-[var(--color-text-secondary)]",
121
- children: O("workspaces.list.subtitle", "Manage organization workspaces, review their status, and open the workspace detail flow.")
133
+ children: D("workspaces.list.subtitle", "Manage organization workspaces, review their status, and open the workspace detail flow.")
122
134
  })]
123
- }), j(c.WORKSPACE_CREATE) && /* @__PURE__ */ E("button", {
135
+ }), A(l.WORKSPACE_CREATE) && /* @__PURE__ */ w("button", {
124
136
  type: "button",
125
- onClick: () => k(`${A}/workspaces/new`),
137
+ onClick: () => O(`${k}/workspaces/new`),
126
138
  className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-lg bg-[var(--color-action-primary-bg)] px-4 py-2.5 text-[var(--color-action-primary-text)] transition-all duration-200 hover:opacity-90 active:scale-[0.98]",
127
- children: [/* @__PURE__ */ T(ie, {
139
+ children: [/* @__PURE__ */ C(y, {
128
140
  size: 18,
129
141
  "aria-hidden": "true"
130
- }), /* @__PURE__ */ T("span", {
142
+ }), /* @__PURE__ */ C("span", {
131
143
  className: "font-medium",
132
- children: O("workspaces.create.button", "Create Workspace")
144
+ children: D("workspaces.create.button", "Create Workspace")
133
145
  })]
134
146
  })]
135
147
  }),
136
- /* @__PURE__ */ E("div", {
148
+ /* @__PURE__ */ w("div", {
137
149
  className: "rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] p-4 shadow-[var(--shadow-elevation-1)]",
138
- children: [/* @__PURE__ */ E("div", {
150
+ children: [/* @__PURE__ */ w("div", {
139
151
  className: "flex flex-col gap-3 lg:flex-row lg:items-center",
140
152
  children: [
141
- /* @__PURE__ */ T(ee, {
142
- value: M,
143
- onChange: N,
144
- placeholder: O("workspaces.list.searchPlaceholder", "Search workspaces..."),
145
- label: O("workspaces.list.searchLabel", "Search workspaces"),
153
+ /* @__PURE__ */ C(ee, {
154
+ value: j,
155
+ onChange: le,
156
+ placeholder: D("workspaces.list.searchPlaceholder", "Search workspaces..."),
157
+ label: D("workspaces.list.searchLabel", "Search workspaces"),
146
158
  inputId: "workspaces-search",
147
159
  className: "flex-1"
148
160
  }),
149
- /* @__PURE__ */ E("label", {
161
+ /* @__PURE__ */ w("label", {
150
162
  className: "flex min-h-11 min-w-[180px] flex-col justify-center rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] px-3 py-2 text-sm text-[var(--color-text-secondary)]",
151
- children: [/* @__PURE__ */ T("span", {
163
+ children: [/* @__PURE__ */ C("span", {
152
164
  className: "sr-only",
153
- children: O("workspaces.list.filterByStatus", "Filter by workspace status")
154
- }), /* @__PURE__ */ E("select", {
155
- value: F.status || "",
156
- onChange: (e) => I({
157
- ...F,
165
+ children: D("workspaces.list.filterByStatus", "Filter by workspace status")
166
+ }), /* @__PURE__ */ w("select", {
167
+ value: N.status || "",
168
+ onChange: (e) => P({
169
+ ...N,
158
170
  status: e.target.value ? e.target.value : void 0
159
171
  }),
160
172
  className: "bg-transparent text-[var(--color-text-primary)] focus:outline-none",
161
- "aria-label": O("workspaces.list.filterByStatus", "Filter by workspace status"),
173
+ "aria-label": D("workspaces.list.filterByStatus", "Filter by workspace status"),
162
174
  children: [
163
- /* @__PURE__ */ T("option", {
175
+ /* @__PURE__ */ C("option", {
164
176
  value: "",
165
- children: O("workspaces.list.allStatuses", "All statuses")
177
+ children: D("workspaces.list.allStatuses", "All statuses")
166
178
  }),
167
- /* @__PURE__ */ T("option", {
179
+ /* @__PURE__ */ C("option", {
168
180
  value: n.ACTIVE,
169
- children: O("workspaces.status.active", "Active")
181
+ children: D("workspaces.status.active", "Active")
170
182
  }),
171
- /* @__PURE__ */ T("option", {
183
+ /* @__PURE__ */ C("option", {
172
184
  value: n.INACTIVE,
173
- children: O("workspaces.status.inactive", "Inactive")
185
+ children: D("workspaces.status.inactive", "Inactive")
174
186
  }),
175
- /* @__PURE__ */ T("option", {
187
+ /* @__PURE__ */ C("option", {
176
188
  value: n.ARCHIVED,
177
- children: O("workspaces.status.archived", "Archived")
189
+ children: D("workspaces.status.archived", "Archived")
178
190
  })
179
191
  ]
180
192
  })]
181
193
  }),
182
- /* @__PURE__ */ T("button", {
194
+ /* @__PURE__ */ C("button", {
183
195
  type: "button",
184
196
  onClick: () => {
185
- W();
197
+ U();
186
198
  },
187
199
  className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] px-4 py-2 text-[var(--color-text-primary)] transition-all duration-200 hover:bg-[var(--color-bg-subtle)] active:scale-95",
188
- "aria-label": O("workspaces.list.refresh", "Refresh workspaces"),
189
- title: O("workspaces.list.refresh", "Refresh workspaces"),
190
- children: /* @__PURE__ */ T(ae, {
200
+ "aria-label": D("workspaces.list.refresh", "Refresh workspaces"),
201
+ title: D("workspaces.list.refresh", "Refresh workspaces"),
202
+ children: /* @__PURE__ */ C(oe, {
191
203
  size: 18,
192
204
  "aria-hidden": "true"
193
205
  })
194
206
  })
195
207
  ]
196
- }), V.length > 0 ? /* @__PURE__ */ E("div", {
208
+ }), W.length > 0 ? /* @__PURE__ */ w("div", {
197
209
  className: "mt-4 flex flex-col gap-3 rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-canvas)] p-4 sm:flex-row sm:items-center sm:justify-between",
198
- children: [/* @__PURE__ */ E("div", {
210
+ children: [/* @__PURE__ */ w("div", {
199
211
  className: "flex flex-wrap items-center gap-3",
200
- children: [/* @__PURE__ */ E("label", {
212
+ children: [/* @__PURE__ */ w("label", {
201
213
  className: "flex items-center gap-2 text-sm text-[var(--color-text-primary)]",
202
- children: [/* @__PURE__ */ T(i, {
214
+ children: [/* @__PURE__ */ C(i, {
203
215
  checked: J,
204
216
  indeterminate: Y,
205
217
  onChange: $,
206
- ariaLabel: O("workspaces.list.selectAll", "Select all workspaces")
207
- }), /* @__PURE__ */ T("span", { children: O("common.selectAllVisible", "Select all visible") })]
208
- }), L.size > 0 ? /* @__PURE__ */ T("button", {
218
+ ariaLabel: D("workspaces.list.selectAll", "Select all workspaces")
219
+ }), /* @__PURE__ */ C("span", { children: D("common.selectAllVisible", "Select all visible") })]
220
+ }), F.size > 0 ? /* @__PURE__ */ C("button", {
209
221
  type: "button",
210
- onClick: () => R(/* @__PURE__ */ new Set()),
222
+ onClick: () => I(/* @__PURE__ */ new Set()),
211
223
  className: "text-sm text-[var(--color-text-secondary)] transition-colors hover:text-[var(--color-text-primary)]",
212
- children: O("common.clearSelection", "Clear selection")
224
+ children: D("common.clearSelection", "Clear selection")
213
225
  }) : null]
214
- }), /* @__PURE__ */ E("div", {
226
+ }), /* @__PURE__ */ w("div", {
215
227
  className: "flex flex-col gap-2 sm:flex-row sm:items-center",
216
- children: [/* @__PURE__ */ E("span", {
228
+ children: [/* @__PURE__ */ w("span", {
217
229
  className: "text-sm text-[var(--color-text-secondary)]",
218
230
  children: [
219
- L.size,
231
+ F.size,
220
232
  " ",
221
- O("common.selected", "selected")
233
+ D("common.selected", "selected")
222
234
  ]
223
- }), j(c.WORKSPACE_DELETE) && /* @__PURE__ */ E("button", {
235
+ }), A(l.WORKSPACE_DELETE) && /* @__PURE__ */ w("button", {
224
236
  type: "button",
225
- onClick: se,
237
+ onClick: ue,
226
238
  disabled: q.length === 0 || K,
227
239
  className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-lg border border-[var(--color-status-warning-border)] px-3 py-2 text-[var(--color-status-warning-text)] transition-all duration-200 hover:bg-[var(--color-status-warning-bgSubtle)] disabled:cursor-not-allowed disabled:opacity-50",
228
240
  children: [
229
- /* @__PURE__ */ T(S, {
241
+ /* @__PURE__ */ C(x, {
230
242
  size: 16,
231
243
  "aria-hidden": "true"
232
244
  }),
233
- /* @__PURE__ */ T("span", { children: O("workspaces.list.suspendSelected", "Suspend Selected") }),
234
- q.length > 0 ? /* @__PURE__ */ E("span", { children: [
245
+ /* @__PURE__ */ C("span", { children: D("workspaces.list.suspendSelected", "Suspend Selected") }),
246
+ q.length > 0 ? /* @__PURE__ */ w("span", { children: [
235
247
  "(",
236
248
  q.length,
237
249
  ")"
@@ -241,211 +253,211 @@ function O() {
241
253
  })]
242
254
  }) : null]
243
255
  }),
244
- V.length === 0 ? /* @__PURE__ */ T("div", {
256
+ W.length === 0 ? /* @__PURE__ */ C("div", {
245
257
  className: "rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] p-6 shadow-[var(--shadow-elevation-1)]",
246
- children: /* @__PURE__ */ T(s, {
247
- icon: /* @__PURE__ */ T(y, {
258
+ children: /* @__PURE__ */ C(o, {
259
+ icon: /* @__PURE__ */ C(ae, {
248
260
  size: 40,
249
261
  "aria-hidden": "true"
250
262
  }),
251
- title: O("workspaces.list.emptyNoneTitle", "No workspaces found"),
252
- description: j(c.WORKSPACE_CREATE) ? O("workspaces.list.emptyNoneDescription", "Create a workspace to start mapping members, organization ownership, and collaboration settings.") : O("workspaces.list.emptyNoneDescriptionViewer", "No workspaces have been created yet."),
253
- action: j(c.WORKSPACE_CREATE) ? {
254
- label: O("workspaces.create.button", "Create Workspace"),
255
- onClick: () => k(`${A}/workspaces/new`)
263
+ title: D("workspaces.list.emptyNoneTitle", "No workspaces found"),
264
+ description: A(l.WORKSPACE_CREATE) ? D("workspaces.list.emptyNoneDescription", "Create a workspace to start mapping members, organization ownership, and collaboration settings.") : D("workspaces.list.emptyNoneDescriptionViewer", "No workspaces have been created yet."),
265
+ action: A(l.WORKSPACE_CREATE) ? {
266
+ label: D("workspaces.create.button", "Create Workspace"),
267
+ onClick: () => O(`${k}/workspaces/new`)
256
268
  } : void 0
257
269
  })
258
- }) : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("div", {
270
+ }) : /* @__PURE__ */ w(se, { children: [/* @__PURE__ */ C("div", {
259
271
  className: "grid gap-4 md:hidden",
260
- children: V.map((e) => /* @__PURE__ */ E("article", {
272
+ children: W.map((e) => /* @__PURE__ */ w("article", {
261
273
  className: "rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] p-4 shadow-[var(--shadow-elevation-1)]",
262
- children: [/* @__PURE__ */ E("div", {
274
+ children: [/* @__PURE__ */ w("div", {
263
275
  className: "flex items-start gap-3",
264
- children: [/* @__PURE__ */ T(i, {
265
- checked: L.has(e.id),
276
+ children: [/* @__PURE__ */ C(i, {
277
+ checked: F.has(e.id),
266
278
  onChange: (t) => Q(e.id, t),
267
- ariaLabel: `${O("workspaces.list.selectOne", "Select workspace")} ${e.name}`
268
- }), /* @__PURE__ */ E("div", {
279
+ ariaLabel: `${D("workspaces.list.selectOne", "Select workspace")} ${e.name}`
280
+ }), /* @__PURE__ */ w("div", {
269
281
  className: "min-w-0 flex-1 space-y-3",
270
- children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("div", {
282
+ children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ w("div", {
271
283
  className: "flex flex-wrap items-start gap-2",
272
284
  children: [
273
- /* @__PURE__ */ T("h2", {
285
+ /* @__PURE__ */ C("h2", {
274
286
  className: "text-base font-semibold text-[var(--color-text-primary)]",
275
287
  children: e.name
276
288
  }),
277
- /* @__PURE__ */ T(g, { status: e.status }),
278
- /* @__PURE__ */ T("span", {
289
+ /* @__PURE__ */ C(h, { status: e.status }),
290
+ /* @__PURE__ */ C("span", {
279
291
  className: "inline-flex items-center rounded-md bg-[var(--color-bg-subtle)] px-2 py-1 text-xs font-medium text-[var(--color-text-secondary)]",
280
292
  children: e.type
281
293
  })
282
294
  ]
283
- }), /* @__PURE__ */ E("p", {
295
+ }), /* @__PURE__ */ w("p", {
284
296
  className: "mt-1 break-all font-mono text-sm text-[var(--color-text-muted)]",
285
297
  children: ["/", e.slug]
286
- })] }), /* @__PURE__ */ E("dl", {
298
+ })] }), /* @__PURE__ */ w("dl", {
287
299
  className: "grid grid-cols-2 gap-3 text-sm",
288
- children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("dt", {
300
+ children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("dt", {
289
301
  className: "text-[var(--color-text-secondary)]",
290
- children: O("workspaces.list.members", "Members")
291
- }), /* @__PURE__ */ T("dd", {
302
+ children: D("workspaces.list.members", "Members")
303
+ }), /* @__PURE__ */ C("dd", {
292
304
  className: "font-medium text-[var(--color-text-primary)]",
293
305
  children: e.memberCount ?? 0
294
- })] }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("dt", {
306
+ })] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("dt", {
295
307
  className: "text-[var(--color-text-secondary)]",
296
- children: O("common.created", "Created")
297
- }), /* @__PURE__ */ T("dd", {
308
+ children: D("common.created", "Created")
309
+ }), /* @__PURE__ */ C("dd", {
298
310
  className: "font-medium text-[var(--color-text-primary)]",
299
- children: D(e.createdAt)
311
+ children: T(e.createdAt)
300
312
  })] })]
301
313
  })]
302
314
  })]
303
- }), /* @__PURE__ */ E("div", {
315
+ }), /* @__PURE__ */ w("div", {
304
316
  className: "mt-4 flex flex-wrap gap-2 border-t border-[var(--color-border-default)] pt-4",
305
317
  children: [
306
- /* @__PURE__ */ E("button", {
318
+ /* @__PURE__ */ w("button", {
307
319
  type: "button",
308
- onClick: () => k(`${A}/workspaces/${e.id}`),
320
+ onClick: () => O(`${k}/workspaces/${e.id}`),
309
321
  className: "inline-flex min-h-10 items-center gap-2 rounded-lg border border-[var(--color-border-default)] px-3 py-2 text-sm text-[var(--color-text-primary)] transition-all duration-200 hover:bg-[var(--color-bg-subtle)]",
310
- children: [/* @__PURE__ */ T(b, {
322
+ children: [/* @__PURE__ */ C(v, {
311
323
  size: 16,
312
324
  "aria-hidden": "true"
313
- }), O("common.view", "View")]
325
+ }), D("common.view", "View")]
314
326
  }),
315
- j(c.WORKSPACE_UPDATE) && /* @__PURE__ */ E("button", {
327
+ A(l.WORKSPACE_UPDATE) && /* @__PURE__ */ w("button", {
316
328
  type: "button",
317
- onClick: () => k(`${A}/workspaces/${e.id}/edit`),
329
+ onClick: () => O(`${k}/workspaces/${e.id}/edit`),
318
330
  className: "inline-flex min-h-10 items-center gap-2 rounded-lg border border-[var(--color-border-default)] px-3 py-2 text-sm text-[var(--color-text-primary)] transition-all duration-200 hover:bg-[var(--color-bg-subtle)]",
319
- children: [/* @__PURE__ */ T(x, {
331
+ children: [/* @__PURE__ */ C(b, {
320
332
  size: 16,
321
333
  "aria-hidden": "true"
322
- }), O("common.edit", "Edit")]
334
+ }), D("common.edit", "Edit")]
323
335
  }),
324
- j(c.WORKSPACE_DELETE) && /* @__PURE__ */ E("button", {
336
+ A(l.WORKSPACE_DELETE) && /* @__PURE__ */ w("button", {
325
337
  type: "button",
326
338
  onClick: () => Z(e.id, e.name),
327
339
  disabled: K,
328
340
  className: "inline-flex min-h-10 items-center gap-2 rounded-lg border border-[var(--color-status-warning-border)] px-3 py-2 text-sm text-[var(--color-status-warning-text)] transition-all duration-200 hover:bg-[var(--color-status-warning-bgSubtle)] disabled:cursor-not-allowed disabled:opacity-50",
329
- children: [/* @__PURE__ */ T(S, {
341
+ children: [/* @__PURE__ */ C(x, {
330
342
  size: 16,
331
343
  "aria-hidden": "true"
332
- }), O("workspaces.suspend.confirm", "Suspend")]
344
+ }), D("workspaces.suspend.confirm", "Suspend")]
333
345
  })
334
346
  ]
335
347
  })]
336
348
  }, e.id))
337
- }), /* @__PURE__ */ T("div", {
349
+ }), /* @__PURE__ */ C("div", {
338
350
  className: "hidden overflow-hidden rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] shadow-[var(--shadow-elevation-1)] md:block",
339
- children: /* @__PURE__ */ T("div", {
351
+ children: /* @__PURE__ */ C("div", {
340
352
  className: "overflow-x-auto",
341
- children: /* @__PURE__ */ E("table", {
353
+ children: /* @__PURE__ */ w("table", {
342
354
  className: "min-w-full",
343
- children: [/* @__PURE__ */ T("thead", {
355
+ children: [/* @__PURE__ */ C("thead", {
344
356
  className: "bg-[var(--color-bg-subtle)]",
345
- children: /* @__PURE__ */ E("tr", { children: [
346
- /* @__PURE__ */ T("th", {
357
+ children: /* @__PURE__ */ w("tr", { children: [
358
+ /* @__PURE__ */ C("th", {
347
359
  className: "w-12 px-6 py-3 text-left text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
348
- children: /* @__PURE__ */ T(i, {
360
+ children: /* @__PURE__ */ C(i, {
349
361
  checked: J,
350
362
  indeterminate: Y,
351
363
  onChange: $,
352
- ariaLabel: O("workspaces.list.selectAll", "Select all workspaces")
364
+ ariaLabel: D("workspaces.list.selectAll", "Select all workspaces")
353
365
  })
354
366
  }),
355
- /* @__PURE__ */ T("th", {
367
+ /* @__PURE__ */ C("th", {
356
368
  className: "px-6 py-3 text-left text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
357
- children: O("workspaces.list.column.workspace", "Workspace")
369
+ children: D("workspaces.list.column.workspace", "Workspace")
358
370
  }),
359
- /* @__PURE__ */ T("th", {
371
+ /* @__PURE__ */ C("th", {
360
372
  className: "px-6 py-3 text-left text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
361
- children: O("common.status", "Status")
373
+ children: D("common.status", "Status")
362
374
  }),
363
- /* @__PURE__ */ T("th", {
375
+ /* @__PURE__ */ C("th", {
364
376
  className: "px-6 py-3 text-left text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
365
- children: O("workspaces.list.column.type", "Type")
377
+ children: D("workspaces.list.column.type", "Type")
366
378
  }),
367
- /* @__PURE__ */ T("th", {
379
+ /* @__PURE__ */ C("th", {
368
380
  className: "px-6 py-3 text-left text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
369
- children: O("common.created", "Created")
381
+ children: D("common.created", "Created")
370
382
  }),
371
- /* @__PURE__ */ T("th", {
383
+ /* @__PURE__ */ C("th", {
372
384
  className: "px-6 py-3 text-right text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
373
- children: O("common.actions", "Actions")
385
+ children: D("common.actions", "Actions")
374
386
  })
375
387
  ] })
376
- }), /* @__PURE__ */ T("tbody", {
388
+ }), /* @__PURE__ */ C("tbody", {
377
389
  className: "divide-y divide-[var(--color-border-default)]",
378
- children: V.map((e) => /* @__PURE__ */ E("tr", {
390
+ children: W.map((e) => /* @__PURE__ */ w("tr", {
379
391
  className: "transition-colors hover:bg-[var(--color-bg-subtle)]",
380
392
  children: [
381
- /* @__PURE__ */ T("td", {
393
+ /* @__PURE__ */ C("td", {
382
394
  className: "px-6 py-4 align-top",
383
- children: /* @__PURE__ */ T(i, {
384
- checked: L.has(e.id),
395
+ children: /* @__PURE__ */ C(i, {
396
+ checked: F.has(e.id),
385
397
  onChange: (t) => Q(e.id, t),
386
- ariaLabel: `${O("workspaces.list.selectOne", "Select workspace")} ${e.name}`
398
+ ariaLabel: `${D("workspaces.list.selectOne", "Select workspace")} ${e.name}`
387
399
  })
388
400
  }),
389
- /* @__PURE__ */ T("td", {
401
+ /* @__PURE__ */ C("td", {
390
402
  className: "px-6 py-4",
391
- children: /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
403
+ children: /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
392
404
  className: "font-medium text-[var(--color-text-primary)]",
393
405
  children: e.name
394
- }), /* @__PURE__ */ E("p", {
406
+ }), /* @__PURE__ */ w("p", {
395
407
  className: "break-all font-mono text-sm text-[var(--color-text-muted)]",
396
408
  children: ["/", e.slug]
397
409
  })] })
398
410
  }),
399
- /* @__PURE__ */ T("td", {
411
+ /* @__PURE__ */ C("td", {
400
412
  className: "px-6 py-4 align-top",
401
- children: /* @__PURE__ */ T(g, { status: e.status })
413
+ children: /* @__PURE__ */ C(h, { status: e.status })
402
414
  }),
403
- /* @__PURE__ */ T("td", {
415
+ /* @__PURE__ */ C("td", {
404
416
  className: "px-6 py-4 align-top",
405
- children: /* @__PURE__ */ T("span", {
417
+ children: /* @__PURE__ */ C("span", {
406
418
  className: "inline-flex items-center rounded-md bg-[var(--color-bg-subtle)] px-2 py-1 text-xs font-medium text-[var(--color-text-secondary)]",
407
419
  children: e.type
408
420
  })
409
421
  }),
410
- /* @__PURE__ */ T("td", {
422
+ /* @__PURE__ */ C("td", {
411
423
  className: "px-6 py-4 align-top text-sm text-[var(--color-text-secondary)]",
412
- children: D(e.createdAt)
424
+ children: T(e.createdAt)
413
425
  }),
414
- /* @__PURE__ */ T("td", {
426
+ /* @__PURE__ */ C("td", {
415
427
  className: "px-6 py-4 align-top",
416
- children: /* @__PURE__ */ E("div", {
428
+ children: /* @__PURE__ */ w("div", {
417
429
  className: "flex items-center justify-end gap-2",
418
430
  children: [
419
- /* @__PURE__ */ T("button", {
431
+ /* @__PURE__ */ C("button", {
420
432
  type: "button",
421
- onClick: () => k(`${A}/workspaces/${e.id}`),
433
+ onClick: () => O(`${k}/workspaces/${e.id}`),
422
434
  className: "rounded-lg p-2 text-[var(--color-text-secondary)] transition-all duration-200 hover:bg-[var(--color-bg-muted)] hover:text-[var(--color-text-primary)]",
423
- title: `${O("common.view", "View")} ${e.name}`,
424
- "aria-label": `${O("common.view", "View")} ${e.name}`,
425
- children: /* @__PURE__ */ T(b, {
435
+ title: `${D("common.view", "View")} ${e.name}`,
436
+ "aria-label": `${D("common.view", "View")} ${e.name}`,
437
+ children: /* @__PURE__ */ C(v, {
426
438
  size: 18,
427
439
  "aria-hidden": "true"
428
440
  })
429
441
  }),
430
- j(c.WORKSPACE_UPDATE) && /* @__PURE__ */ T("button", {
442
+ A(l.WORKSPACE_UPDATE) && /* @__PURE__ */ C("button", {
431
443
  type: "button",
432
- onClick: () => k(`${A}/workspaces/${e.id}/edit`),
444
+ onClick: () => O(`${k}/workspaces/${e.id}/edit`),
433
445
  className: "rounded-lg p-2 text-[var(--color-text-secondary)] transition-all duration-200 hover:bg-[var(--color-bg-muted)] hover:text-[var(--color-text-primary)]",
434
- title: `${O("common.edit", "Edit")} ${e.name}`,
435
- "aria-label": `${O("common.edit", "Edit")} ${e.name}`,
436
- children: /* @__PURE__ */ T(x, {
446
+ title: `${D("common.edit", "Edit")} ${e.name}`,
447
+ "aria-label": `${D("common.edit", "Edit")} ${e.name}`,
448
+ children: /* @__PURE__ */ C(b, {
437
449
  size: 18,
438
450
  "aria-hidden": "true"
439
451
  })
440
452
  }),
441
- j(c.WORKSPACE_DELETE) && /* @__PURE__ */ T("button", {
453
+ A(l.WORKSPACE_DELETE) && /* @__PURE__ */ C("button", {
442
454
  type: "button",
443
455
  onClick: () => Z(e.id, e.name),
444
456
  disabled: K,
445
457
  className: "rounded-lg p-2 text-[var(--color-status-warning-text)] transition-all duration-200 hover:bg-[var(--color-status-warning-bgSubtle)] disabled:cursor-not-allowed disabled:opacity-50",
446
- title: `${O("workspaces.suspend.confirm", "Suspend")} ${e.name}`,
447
- "aria-label": `${O("workspaces.suspend.confirm", "Suspend")} ${e.name}`,
448
- children: /* @__PURE__ */ T(S, {
458
+ title: `${D("workspaces.suspend.confirm", "Suspend")} ${e.name}`,
459
+ "aria-label": `${D("workspaces.suspend.confirm", "Suspend")} ${e.name}`,
460
+ children: /* @__PURE__ */ C(x, {
449
461
  size: 18,
450
462
  "aria-hidden": "true"
451
463
  })
@@ -460,16 +472,16 @@ function O() {
460
472
  })
461
473
  })] })
462
474
  ]
463
- }), B]
464
- }) : /* @__PURE__ */ T("div", {
475
+ }), R]
476
+ }) : /* @__PURE__ */ C("div", {
465
477
  className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
466
- children: /* @__PURE__ */ T("div", {
478
+ children: /* @__PURE__ */ C("div", {
467
479
  className: "p-8 text-center text-[var(--color-text-secondary)]",
468
- children: O("workspaces.list.noPermission", "You don't have permission to view workspaces.")
480
+ children: D("workspaces.list.noPermission", "You don't have permission to view workspaces.")
469
481
  })
470
482
  });
471
483
  }
472
484
  //#endregion
473
- export { O as WorkspacesListPage };
485
+ export { E as WorkspacesListPage };
474
486
 
475
487
  //# sourceMappingURL=WorkspacesListPage.js.map