@burdenoff/microfe-organization 2026.518.3 → 2026.520.1

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