@burdenoff/microfe-product 2026.624.2 → 2026.625.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 (65) hide show
  1. package/dist/product/pages/ContentPageViewPage.js +25 -24
  2. package/dist/product/pages/ContentPageViewPage.js.map +1 -1
  3. package/dist/product/pages/ProductCatalogPage.js +69 -64
  4. package/dist/product/pages/ProductCatalogPage.js.map +1 -1
  5. package/dist/product/pages/ProductViewPage.js +91 -86
  6. package/dist/product/pages/ProductViewPage.js.map +1 -1
  7. package/dist/product-management/modules/content-pages/components/ContentPageForm.js +7 -7
  8. package/dist/product-management/modules/content-pages/components/ContentPageForm.js.map +1 -1
  9. package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js +2 -2
  10. package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js.map +1 -1
  11. package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js +243 -230
  12. package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js.map +1 -1
  13. package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js +2 -2
  14. package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js.map +1 -1
  15. package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js +293 -277
  16. package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js.map +1 -1
  17. package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js +1 -1
  18. package/dist/product-management/modules/feature-flags/components/FeatureFlagForm.js.map +1 -1
  19. package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js +2 -2
  20. package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js.map +1 -1
  21. package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js +158 -148
  22. package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js.map +1 -1
  23. package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js +2 -2
  24. package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js.map +1 -1
  25. package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js +98 -81
  26. package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js.map +1 -1
  27. package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js +4 -4
  28. package/dist/product-management/modules/press-kit/components/PressKitAssetForm.js.map +1 -1
  29. package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js +2 -2
  30. package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js.map +1 -1
  31. package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js +109 -99
  32. package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js.map +1 -1
  33. package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js +2 -2
  34. package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js.map +1 -1
  35. package/dist/product-management/modules/press-kit/pages/PressKitListPage.js +252 -236
  36. package/dist/product-management/modules/press-kit/pages/PressKitListPage.js.map +1 -1
  37. package/dist/product-management/modules/products/components/ProductForm.js +8 -8
  38. package/dist/product-management/modules/products/components/ProductForm.js.map +1 -1
  39. package/dist/product-management/modules/products/components/ProductPlans.js +4 -4
  40. package/dist/product-management/modules/products/components/ProductPlans.js.map +1 -1
  41. package/dist/product-management/modules/products/pages/ProductCreatePage.js +2 -2
  42. package/dist/product-management/modules/products/pages/ProductCreatePage.js.map +1 -1
  43. package/dist/product-management/modules/products/pages/ProductDetailPage.js +408 -395
  44. package/dist/product-management/modules/products/pages/ProductDetailPage.js.map +1 -1
  45. package/dist/product-management/modules/products/pages/ProductEditPage.js +2 -2
  46. package/dist/product-management/modules/products/pages/ProductEditPage.js.map +1 -1
  47. package/dist/product-management/modules/products/pages/ProductsListPage.js +301 -281
  48. package/dist/product-management/modules/products/pages/ProductsListPage.js.map +1 -1
  49. package/dist/product-management/modules/shortcuts/components/ShortcutForm.js +3 -3
  50. package/dist/product-management/modules/shortcuts/components/ShortcutForm.js.map +1 -1
  51. package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js +2 -2
  52. package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js.map +1 -1
  53. package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js +221 -218
  54. package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js.map +1 -1
  55. package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js +2 -2
  56. package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js.map +1 -1
  57. package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js +260 -241
  58. package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js.map +1 -1
  59. package/dist/product-management/shared/components/AuditHistoryTab.js +1 -1
  60. package/dist/product-management/shared/components/AuditHistoryTab.js.map +1 -1
  61. package/dist/product-management/shared/components/feedback/EmptyState.js +2 -20
  62. package/dist/product-management/shared/hooks/useConfirmDialog.js +44 -0
  63. package/dist/product-management/shared/hooks/useConfirmDialog.js.map +1 -0
  64. package/package.json +2 -2
  65. package/dist/product-management/shared/components/feedback/EmptyState.js.map +0 -1
@@ -1,328 +1,348 @@
1
1
  import { useProductConsole as e } from "../../../providers/ProductConsoleProvider.js";
2
2
  import { LoadingState as t } from "../../../shared/components/feedback/LoadingState.js";
3
3
  import { ErrorState as n } from "../../../shared/components/feedback/ErrorState.js";
4
- import { useDeleteProduct as r, useProducts as i } from "../hooks/useProducts.js";
5
- import { ProductStatus as a } from "../types/index.js";
6
- import { ProductStatusBadge as o } from "../components/ProductStatusBadge.js";
7
- import { SearchInput as s } from "../../../shared/components/input/SearchInput.js";
8
- import { exportToCsv as c } from "../../../shared/utils/exportUtils.js";
9
- import { nativeConfirm as l, nativeImpact as u, nativeNotify as d } from "../../../../utils/nativeBridge.js";
10
- import { useEffect as f, useState as p } from "react";
11
- import { ChevronLeft as m, ChevronRight as h, Download as g, Eye as _, Plus as v, RefreshCw as y, SquarePen as b, Trash2 as x } from "lucide-react";
12
- import { useI18n as S } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
13
- import { jsx as C, jsxs as w } from "react/jsx-runtime";
14
- import { PermissionGate as T } from "@burdenoff/fe-libs/shared/components";
4
+ import { useDeleteProduct as ee, useProducts as r } from "../hooks/useProducts.js";
5
+ import { ProductStatus as i } from "../types/index.js";
6
+ import { ProductStatusBadge as a } from "../components/ProductStatusBadge.js";
7
+ import { SearchInput as o } from "../../../shared/components/input/SearchInput.js";
8
+ import { exportToCsv as s } from "../../../shared/utils/exportUtils.js";
9
+ import { nativeConfirm as c, nativeImpact as l, nativeNotify as u } from "../../../../utils/nativeBridge.js";
10
+ import { useConfirmDialog as te } from "../../../shared/hooks/useConfirmDialog.js";
11
+ import { useEffect as d, useState as f } from "react";
12
+ import { ChevronLeft as p, ChevronRight as m, Download as h, Eye as g, Plus as _, RefreshCw as v, SquarePen as y, Trash2 as b } from "lucide-react";
13
+ import { useI18n as x } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
14
+ import { jsx as S, jsxs as C } from "react/jsx-runtime";
15
+ import { PermissionGate as w } from "@burdenoff/fe-libs/shared/components";
16
+ import { AuroraBackground as T, Button as E, CTAOverflowMenu as D, GlassCard as O, GradientText as k, IllustratedEmptyState as A } from "@burdenoff/fe-libs/ui";
15
17
  //#region src/product-management/modules/products/pages/ProductsListPage.tsx
16
- var E = 20;
17
- function D() {
18
- let { navigate: D, basePath: O = "/products" } = e(), { t: k } = S(), A = (e, t) => {
19
- let n = k(e);
18
+ var j = 20;
19
+ function M() {
20
+ let { navigate: M, basePath: N = "/products" } = e(), { t: P } = x(), F = (e, t) => {
21
+ let n = P(e);
20
22
  return n === e ? t : n;
21
- }, [j, M] = p(""), [N, P] = p({}), [F, I] = p(0), { products: L, total: R, hasMore: z, loading: B, error: V, refetch: H } = i({
22
- ...N,
23
- search: j || void 0
23
+ }, [I, L] = f(""), [R, z] = f({}), [B, V] = f(0), { products: H, total: U, hasMore: W, loading: G, error: K, refetch: q } = r({
24
+ ...R,
25
+ search: I || void 0
24
26
  }, {
25
- limit: E,
26
- offset: F * E
27
+ limit: j,
28
+ offset: B * j
27
29
  });
28
- f(() => {
29
- if (R === 0) {
30
- I(0);
30
+ d(() => {
31
+ if (U === 0) {
32
+ V(0);
31
33
  return;
32
34
  }
33
- let e = Math.ceil(R / E) - 1;
34
- I((t) => t > e ? e : t);
35
- }, [R]);
36
- let { deleteProduct: U, loading: W } = r(), G = (e) => {
37
- M(e), I(0);
38
- }, K = (e) => {
39
- P(e), I(0);
40
- }, q = async (e) => {
41
- u("medium");
42
- let t = A("products.confirmDeleteProduct", "Are you sure you want to delete this product?"), n = await l({
35
+ let e = Math.ceil(U / j) - 1;
36
+ V((t) => t > e ? e : t);
37
+ }, [U]);
38
+ let { deleteProduct: J, loading: Y } = ee(), { confirm: X, ConfirmDialog: Z } = te(), Q = (e) => {
39
+ L(e), V(0);
40
+ }, ne = (e) => {
41
+ z(e), V(0);
42
+ }, re = async (e) => {
43
+ l("medium");
44
+ let t = F("products.confirmDeleteProduct", "Are you sure you want to delete this product?"), n = await c({
43
45
  title: "Delete product",
44
46
  message: t,
45
47
  okButtonTitle: "Delete",
46
48
  cancelButtonTitle: "Cancel"
47
49
  });
48
- if (n === null ? window.confirm(t) : n) try {
49
- await U(e), d("success"), H();
50
+ if (n === null ? await X({
51
+ title: "Delete product",
52
+ message: t,
53
+ okButtonTitle: "Delete",
54
+ cancelButtonTitle: "Cancel",
55
+ destructive: !0
56
+ }) : n) try {
57
+ await J(e), u("success"), q();
50
58
  } catch (e) {
51
- d("error"), console.error("Failed to delete product:", e);
59
+ u("error"), console.error("Failed to delete product:", e);
52
60
  }
53
61
  };
54
- if (B && L.length === 0 && !j && !N.status) return /* @__PURE__ */ C("div", {
62
+ if (G && H.length === 0 && !I && !R.status) return /* @__PURE__ */ S("div", {
55
63
  className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
56
- children: /* @__PURE__ */ C(t, { message: A("products.loadingProducts", "Loading products...") })
64
+ children: /* @__PURE__ */ S(t, { message: F("products.loadingProducts", "Loading products...") })
57
65
  });
58
- if (V && L.length === 0) return /* @__PURE__ */ C("div", {
66
+ if (K && H.length === 0) return /* @__PURE__ */ S("div", {
59
67
  className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
60
- children: /* @__PURE__ */ C(n, {
61
- message: V.message,
68
+ children: /* @__PURE__ */ S(n, {
69
+ message: K.message,
62
70
  action: {
63
- label: A("productCommon.retry", "Retry"),
64
- onClick: () => H()
71
+ label: F("productCommon.retry", "Retry"),
72
+ onClick: () => q()
65
73
  }
66
74
  })
67
75
  });
68
- let J = Math.max(1, Math.ceil(R / E)), Y = F * E + 1, X = Math.min((F + 1) * E, R);
69
- return /* @__PURE__ */ w("div", {
76
+ let $ = Math.max(1, Math.ceil(U / j)), ie = B * j + 1, ae = Math.min((B + 1) * j, U);
77
+ return /* @__PURE__ */ C("div", {
70
78
  className: "min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-200",
71
- children: [/* @__PURE__ */ w("div", {
72
- className: "mb-6",
73
- children: [/* @__PURE__ */ w("div", {
74
- className: "flex items-center justify-between mb-4",
75
- children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("h1", {
76
- className: "text-3xl font-bold text-text-primary mb-2",
77
- children: A("products.title", "Products")
78
- }), /* @__PURE__ */ C("p", {
79
- className: "text-text-secondary",
80
- children: A("products.subtitle", "Manage platform products and features")
81
- })] }), /* @__PURE__ */ C(T, {
82
- role: "super_admin",
83
- children: /* @__PURE__ */ w("button", {
84
- type: "button",
85
- onClick: () => D(`${O}/new`),
86
- className: "\n inline-flex items-center gap-2 px-4 py-2\n bg-[var(--color-action-primary-bg)]\n text-[var(--color-action-primary-text)]\n rounded-lg\n hover:opacity-90\n transition-all duration-200\n font-medium\n ",
87
- children: [/* @__PURE__ */ C(v, { size: 20 }), A("products.createProduct", "Create Product")]
88
- })
89
- })]
90
- }), /* @__PURE__ */ w("div", {
91
- className: "flex gap-4",
92
- children: [
93
- /* @__PURE__ */ C(s, {
94
- value: j,
95
- onChange: G,
96
- placeholder: A("products.searchPlaceholder", "Search products..."),
97
- className: "flex-1"
98
- }),
99
- /* @__PURE__ */ w("select", {
100
- value: N.status || "",
101
- onChange: (e) => K({
102
- ...N,
103
- status: e.target.value ? e.target.value : void 0
104
- }),
105
- className: "\n px-4 py-2\n bg-surface\n border border-default\n rounded-lg\n text-text-primary\n focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)]\n transition-all duration-200\n ",
106
- children: [
107
- /* @__PURE__ */ C("option", {
108
- value: "",
109
- children: A("products.allStatuses", "All Statuses")
110
- }),
111
- /* @__PURE__ */ C("option", {
112
- value: a.ACTIVE,
113
- children: A("products.statusActive", "Active")
114
- }),
115
- /* @__PURE__ */ C("option", {
116
- value: a.DRAFT,
117
- children: A("products.statusDraft", "Draft")
118
- }),
119
- /* @__PURE__ */ C("option", {
120
- value: a.WAITLIST,
121
- children: A("products.statusWaitlist", "Waitlist")
122
- }),
123
- /* @__PURE__ */ C("option", {
124
- value: a.COMING_SOON,
125
- children: A("products.statusComingSoon", "Coming Soon")
79
+ children: [
80
+ /* @__PURE__ */ C("div", {
81
+ className: "mb-6",
82
+ children: [/* @__PURE__ */ C("div", {
83
+ className: "relative overflow-hidden rounded-card mb-4 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",
84
+ children: [
85
+ /* @__PURE__ */ S(T, { intensity: "subtle" }),
86
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h1", {
87
+ className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary mb-2",
88
+ children: /* @__PURE__ */ S(k, { children: F("products.title", "Products") })
89
+ }), /* @__PURE__ */ S("p", {
90
+ className: "text-text-secondary",
91
+ children: F("products.subtitle", "Manage platform products and features")
92
+ })] }),
93
+ /* @__PURE__ */ S(w, {
94
+ role: "super_admin",
95
+ children: /* @__PURE__ */ S(D, {
96
+ primary: {
97
+ label: F("products.createProduct", "Create Product"),
98
+ onSelect: () => M(`${N}/new`),
99
+ icon: /* @__PURE__ */ S(_, { className: "size-4" })
100
+ },
101
+ actions: []
126
102
  })
127
- ]
128
- }),
129
- /* @__PURE__ */ C("button", {
130
- type: "button",
131
- onClick: () => H(),
132
- className: "\n inline-flex items-center gap-2 px-4 py-2\n bg-surface\n text-text-primary\n border border-default\n rounded-lg\n hover:bg-bg-sunken\n transition-all duration-200\n ",
133
- children: /* @__PURE__ */ C(y, {
134
- size: 18,
135
- className: B ? "animate-spin" : ""
136
103
  })
137
- }),
138
- L.length > 0 && /* @__PURE__ */ C("button", {
139
- type: "button",
140
- onClick: () => c("products", L.map((e) => ({
141
- id: e.id,
142
- name: e.name,
143
- slug: e.slug,
144
- status: e.status,
145
- description: e.description ?? "",
146
- tags: (e.tags ?? []).join(", "),
147
- website: e.website ?? "",
148
- appUrl: e.appUrl ?? "",
149
- createdAt: e.createdAt,
150
- updatedAt: e.updatedAt
151
- }))),
152
- className: "\n inline-flex items-center gap-2 px-4 py-2\n bg-surface\n text-text-primary\n border border-default\n rounded-lg\n hover:bg-bg-sunken\n transition-all duration-200\n ",
153
- title: A("products.exportCsv", "Export as CSV"),
154
- children: /* @__PURE__ */ C(g, { size: 18 })
155
- })
156
- ]
157
- })]
158
- }), L.length === 0 && !B ? /* @__PURE__ */ w("div", {
159
- className: "bg-surface border border-default rounded-lg p-12 text-center animate-in fade-in duration-200",
160
- children: [/* @__PURE__ */ C("p", {
161
- className: "text-text-secondary mb-4",
162
- children: j || N.status ? A("products.noMatchingProducts", "No products match your search") : A("products.noProductsFound", "No products found")
163
- }), !j && !N.status && /* @__PURE__ */ w("button", {
164
- type: "button",
165
- onClick: () => D(`${O}/new`),
166
- className: "\n inline-flex items-center gap-2 px-4 py-2\n bg-[var(--color-action-primary-bg)]\n text-[var(--color-action-primary-text)]\n rounded-lg\n hover:opacity-90\n transition-all duration-200\n font-medium\n ",
167
- children: [/* @__PURE__ */ C(v, { size: 20 }), A("products.createProduct", "Create Product")]
168
- })]
169
- }) : /* @__PURE__ */ w("div", {
170
- className: "bg-surface border border-default rounded-lg shadow-[var(--shadow-elevation-1)] overflow-hidden",
171
- children: [/* @__PURE__ */ w("table", {
172
- className: "w-full",
173
- children: [/* @__PURE__ */ C("thead", {
174
- className: "bg-bg-sunken border-b border-default",
175
- children: /* @__PURE__ */ w("tr", { children: [
176
- /* @__PURE__ */ C("th", {
177
- className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
178
- children: A("products.columnProduct", "Product")
179
- }),
180
- /* @__PURE__ */ C("th", {
181
- className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
182
- children: A("products.columnStatus", "Status")
104
+ ]
105
+ }), /* @__PURE__ */ C("div", {
106
+ className: "flex gap-4",
107
+ children: [
108
+ /* @__PURE__ */ S(o, {
109
+ value: I,
110
+ onChange: Q,
111
+ placeholder: F("products.searchPlaceholder", "Search products..."),
112
+ className: "flex-1"
183
113
  }),
184
- /* @__PURE__ */ C("th", {
185
- className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
186
- children: A("products.columnCategory", "Category")
114
+ /* @__PURE__ */ C("select", {
115
+ value: R.status || "",
116
+ onChange: (e) => ne({
117
+ ...R,
118
+ status: e.target.value ? e.target.value : void 0
119
+ }),
120
+ className: "\n px-4 py-2\n bg-surface\n border border-default\n rounded-lg\n text-text-primary\n focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)]\n transition-all duration-200\n ",
121
+ children: [
122
+ /* @__PURE__ */ S("option", {
123
+ value: "",
124
+ children: F("products.allStatuses", "All Statuses")
125
+ }),
126
+ /* @__PURE__ */ S("option", {
127
+ value: i.ACTIVE,
128
+ children: F("products.statusActive", "Active")
129
+ }),
130
+ /* @__PURE__ */ S("option", {
131
+ value: i.DRAFT,
132
+ children: F("products.statusDraft", "Draft")
133
+ }),
134
+ /* @__PURE__ */ S("option", {
135
+ value: i.WAITLIST,
136
+ children: F("products.statusWaitlist", "Waitlist")
137
+ }),
138
+ /* @__PURE__ */ S("option", {
139
+ value: i.COMING_SOON,
140
+ children: F("products.statusComingSoon", "Coming Soon")
141
+ })
142
+ ]
187
143
  }),
188
- /* @__PURE__ */ C("th", {
189
- className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
190
- children: A("products.columnVersion", "Version")
144
+ /* @__PURE__ */ S("button", {
145
+ type: "button",
146
+ onClick: () => q(),
147
+ className: "\n inline-flex items-center gap-2 px-4 py-2\n bg-surface\n text-text-primary\n border border-default\n rounded-lg\n hover:bg-bg-sunken\n transition-all duration-200\n ",
148
+ children: /* @__PURE__ */ S(v, {
149
+ size: 18,
150
+ className: G ? "animate-spin" : ""
151
+ })
191
152
  }),
192
- /* @__PURE__ */ C("th", {
193
- className: "text-right px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
194
- children: A("products.columnActions", "Actions")
153
+ H.length > 0 && /* @__PURE__ */ S("button", {
154
+ type: "button",
155
+ onClick: () => s("products", H.map((e) => ({
156
+ id: e.id,
157
+ name: e.name,
158
+ slug: e.slug,
159
+ status: e.status,
160
+ description: e.description ?? "",
161
+ tags: (e.tags ?? []).join(", "),
162
+ website: e.website ?? "",
163
+ appUrl: e.appUrl ?? "",
164
+ createdAt: e.createdAt,
165
+ updatedAt: e.updatedAt
166
+ }))),
167
+ className: "\n inline-flex items-center gap-2 px-4 py-2\n bg-surface\n text-text-primary\n border border-default\n rounded-lg\n hover:bg-bg-sunken\n transition-all duration-200\n ",
168
+ title: F("products.exportCsv", "Export as CSV"),
169
+ children: /* @__PURE__ */ S(h, { size: 18 })
195
170
  })
196
- ] })
197
- }), /* @__PURE__ */ C("tbody", {
198
- className: "divide-y divide-[var(--color-border-default)]",
199
- children: L.map((e) => /* @__PURE__ */ w("tr", {
200
- className: "hover:bg-bg-sunken transition-all duration-200",
201
- children: [
202
- /* @__PURE__ */ C("td", {
203
- className: "px-6 py-4",
204
- children: /* @__PURE__ */ w("div", {
205
- className: "flex items-center gap-3",
206
- children: [e.logoUrl ? /* @__PURE__ */ C("img", {
207
- src: e.logoUrl,
208
- alt: e.name,
209
- className: "size-10 rounded-lg object-cover"
210
- }) : /* @__PURE__ */ C("div", {
211
- className: "size-10 rounded-lg bg-[var(--color-status-warning-subtle)] flex items-center justify-center",
212
- children: /* @__PURE__ */ C("span", {
213
- className: "text-[var(--color-status-warning)] font-semibold",
214
- children: e.name[0]
215
- })
216
- }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
217
- className: "font-medium text-text-primary",
218
- children: e.name
219
- }), /* @__PURE__ */ w("p", {
220
- className: "text-sm text-text-tertiary font-mono",
221
- children: ["/", e.slug]
222
- })] })]
223
- })
171
+ ]
172
+ })]
173
+ }),
174
+ H.length === 0 && !G ? /* @__PURE__ */ S(O, {
175
+ treatment: "insight",
176
+ className: "animate-in fade-in duration-200",
177
+ children: /* @__PURE__ */ S(A, {
178
+ illustration: I || R.status ? "empty-search" : "empty-data",
179
+ title: I || R.status ? F("products.noMatchingProducts", "No products match your search") : F("products.noProductsFound", "No products found"),
180
+ action: !I && !R.status ? /* @__PURE__ */ C(E, {
181
+ type: "button",
182
+ onClick: () => M(`${N}/new`),
183
+ children: [/* @__PURE__ */ S(_, { className: "size-4" }), F("products.createProduct", "Create Product")]
184
+ }) : void 0
185
+ })
186
+ }) : /* @__PURE__ */ C(O, {
187
+ treatment: "insight",
188
+ className: "overflow-hidden p-0",
189
+ children: [/* @__PURE__ */ C("table", {
190
+ className: "w-full",
191
+ children: [/* @__PURE__ */ S("thead", {
192
+ className: "bg-bg-sunken/60 border-b border-border-seam",
193
+ children: /* @__PURE__ */ C("tr", { children: [
194
+ /* @__PURE__ */ S("th", {
195
+ className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
196
+ children: F("products.columnProduct", "Product")
224
197
  }),
225
- /* @__PURE__ */ C("td", {
226
- className: "px-6 py-4",
227
- children: /* @__PURE__ */ C(o, { status: e.status })
198
+ /* @__PURE__ */ S("th", {
199
+ className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
200
+ children: F("products.columnStatus", "Status")
228
201
  }),
229
- /* @__PURE__ */ C("td", {
230
- className: "px-6 py-4",
231
- children: /* @__PURE__ */ C("span", {
232
- className: "text-sm text-text-primary",
233
- children: "-"
234
- })
202
+ /* @__PURE__ */ S("th", {
203
+ className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
204
+ children: F("products.columnCategory", "Category")
235
205
  }),
236
- /* @__PURE__ */ C("td", {
237
- className: "px-6 py-4",
238
- children: /* @__PURE__ */ C("span", {
239
- className: "text-sm text-text-primary font-mono",
240
- children: "-"
241
- })
206
+ /* @__PURE__ */ S("th", {
207
+ className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
208
+ children: F("products.columnVersion", "Version")
242
209
  }),
243
- /* @__PURE__ */ C("td", {
244
- className: "px-6 py-4",
245
- children: /* @__PURE__ */ w("div", {
246
- className: "flex items-center justify-end gap-2",
247
- children: [/* @__PURE__ */ C("button", {
248
- type: "button",
249
- onClick: () => D(`${O}/${e.id}`),
250
- className: "p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200",
251
- title: A("products.viewDetails", "View details"),
252
- children: /* @__PURE__ */ C(_, { size: 18 })
253
- }), /* @__PURE__ */ w(T, {
254
- role: "super_admin",
255
- children: [/* @__PURE__ */ C("button", {
210
+ /* @__PURE__ */ S("th", {
211
+ className: "text-right px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
212
+ children: F("products.columnActions", "Actions")
213
+ })
214
+ ] })
215
+ }), /* @__PURE__ */ S("tbody", {
216
+ className: "divide-y divide-border-seam",
217
+ children: H.map((e) => /* @__PURE__ */ C("tr", {
218
+ className: "hover:bg-bg-sunken/70 transition-colors duration-200",
219
+ children: [
220
+ /* @__PURE__ */ S("td", {
221
+ className: "px-6 py-4",
222
+ children: /* @__PURE__ */ C("div", {
223
+ className: "flex items-center gap-3",
224
+ children: [e.logoUrl ? /* @__PURE__ */ S("img", {
225
+ src: e.logoUrl,
226
+ alt: e.name,
227
+ className: "size-10 rounded-lg object-cover"
228
+ }) : /* @__PURE__ */ S("div", {
229
+ className: "size-10 rounded-lg bg-[var(--color-status-warning-subtle)] flex items-center justify-center",
230
+ children: /* @__PURE__ */ S("span", {
231
+ className: "text-[var(--color-status-warning)] font-semibold",
232
+ children: e.name[0]
233
+ })
234
+ }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
235
+ className: "font-medium text-text-primary",
236
+ children: e.name
237
+ }), /* @__PURE__ */ C("p", {
238
+ className: "text-sm text-text-tertiary font-mono",
239
+ children: ["/", e.slug]
240
+ })] })]
241
+ })
242
+ }),
243
+ /* @__PURE__ */ S("td", {
244
+ className: "px-6 py-4",
245
+ children: /* @__PURE__ */ S(a, { status: e.status })
246
+ }),
247
+ /* @__PURE__ */ S("td", {
248
+ className: "px-6 py-4",
249
+ children: /* @__PURE__ */ S("span", {
250
+ className: "text-sm text-text-primary",
251
+ children: "-"
252
+ })
253
+ }),
254
+ /* @__PURE__ */ S("td", {
255
+ className: "px-6 py-4",
256
+ children: /* @__PURE__ */ S("span", {
257
+ className: "text-sm text-text-primary font-mono",
258
+ children: "-"
259
+ })
260
+ }),
261
+ /* @__PURE__ */ S("td", {
262
+ className: "px-6 py-4",
263
+ children: /* @__PURE__ */ C("div", {
264
+ className: "flex items-center justify-end gap-2",
265
+ children: [/* @__PURE__ */ S("button", {
256
266
  type: "button",
257
- onClick: () => D(`${O}/${e.id}/edit`),
267
+ onClick: () => M(`${N}/${e.id}`),
258
268
  className: "p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200",
259
- title: A("products.edit", "Edit"),
260
- children: /* @__PURE__ */ C(b, { size: 18 })
261
- }), /* @__PURE__ */ C("button", {
262
- type: "button",
263
- onClick: () => q(e.id),
264
- disabled: W,
265
- className: "p-2 rounded-lg text-[var(--color-status-error)] hover:bg-[var(--color-status-error-subtle)] transition-all duration-200 disabled:opacity-50",
266
- title: A("products.delete", "Delete"),
267
- children: /* @__PURE__ */ C(x, { size: 18 })
269
+ title: F("products.viewDetails", "View details"),
270
+ children: /* @__PURE__ */ S(g, { size: 18 })
271
+ }), /* @__PURE__ */ C(w, {
272
+ role: "super_admin",
273
+ children: [/* @__PURE__ */ S("button", {
274
+ type: "button",
275
+ onClick: () => M(`${N}/${e.id}/edit`),
276
+ className: "p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200",
277
+ title: F("products.edit", "Edit"),
278
+ children: /* @__PURE__ */ S(y, { size: 18 })
279
+ }), /* @__PURE__ */ S("button", {
280
+ type: "button",
281
+ onClick: () => re(e.id),
282
+ disabled: Y,
283
+ className: "p-2 rounded-lg text-[var(--color-status-error)] hover:bg-[var(--color-status-error-subtle)] transition-all duration-200 disabled:opacity-50",
284
+ title: F("products.delete", "Delete"),
285
+ children: /* @__PURE__ */ S(b, { size: 18 })
286
+ })]
268
287
  })]
269
- })]
288
+ })
270
289
  })
290
+ ]
291
+ }, e.id))
292
+ })]
293
+ }), U > j && /* @__PURE__ */ C("div", {
294
+ className: "flex items-center justify-between px-6 py-3 border-t border-border-seam bg-bg-sunken/40",
295
+ children: [/* @__PURE__ */ C("p", {
296
+ className: "text-sm text-text-secondary",
297
+ children: [
298
+ F("products.showing", "Showing"),
299
+ " ",
300
+ ie,
301
+ "–",
302
+ ae,
303
+ " ",
304
+ F("products.of", "of"),
305
+ " ",
306
+ U,
307
+ " ",
308
+ F("products.products", "products")
309
+ ]
310
+ }), /* @__PURE__ */ C("div", {
311
+ className: "flex items-center gap-2",
312
+ children: [
313
+ /* @__PURE__ */ C("button", {
314
+ type: "button",
315
+ onClick: () => V((e) => Math.max(0, e - 1)),
316
+ disabled: B === 0 || G,
317
+ "aria-label": F("products.prevPage", "Previous page"),
318
+ className: "\n inline-flex items-center gap-1 px-3 py-1.5 text-sm\n bg-surface border border-default rounded-lg\n text-text-primary\n hover:bg-bg-sunken transition-all duration-200\n disabled:opacity-40 disabled:cursor-not-allowed\n ",
319
+ children: [/* @__PURE__ */ S(p, { size: 16 }), F("products.prev", "Prev")]
320
+ }),
321
+ /* @__PURE__ */ C("span", {
322
+ className: "text-sm text-text-secondary px-2 tabular-nums",
323
+ children: [
324
+ B + 1,
325
+ " / ",
326
+ $
327
+ ]
328
+ }),
329
+ /* @__PURE__ */ C("button", {
330
+ type: "button",
331
+ onClick: () => V((e) => e + 1),
332
+ disabled: !W && B + 1 >= $ || G,
333
+ "aria-label": F("products.nextPage", "Next page"),
334
+ className: "\n inline-flex items-center gap-1 px-3 py-1.5 text-sm\n bg-surface border border-default rounded-lg\n text-text-primary\n hover:bg-bg-sunken transition-all duration-200\n disabled:opacity-40 disabled:cursor-not-allowed\n ",
335
+ children: [F("products.next", "Next"), /* @__PURE__ */ S(m, { size: 16 })]
271
336
  })
272
337
  ]
273
- }, e.id))
274
- })]
275
- }), R > E && /* @__PURE__ */ w("div", {
276
- className: "flex items-center justify-between px-6 py-3 border-t border-default bg-bg-sunken/50",
277
- children: [/* @__PURE__ */ w("p", {
278
- className: "text-sm text-text-secondary",
279
- children: [
280
- A("products.showing", "Showing"),
281
- " ",
282
- Y,
283
- "–",
284
- X,
285
- " ",
286
- A("products.of", "of"),
287
- " ",
288
- R,
289
- " ",
290
- A("products.products", "products")
291
- ]
292
- }), /* @__PURE__ */ w("div", {
293
- className: "flex items-center gap-2",
294
- children: [
295
- /* @__PURE__ */ w("button", {
296
- type: "button",
297
- onClick: () => I((e) => Math.max(0, e - 1)),
298
- disabled: F === 0 || B,
299
- "aria-label": A("products.prevPage", "Previous page"),
300
- className: "\n inline-flex items-center gap-1 px-3 py-1.5 text-sm\n bg-surface border border-default rounded-lg\n text-text-primary\n hover:bg-bg-sunken transition-all duration-200\n disabled:opacity-40 disabled:cursor-not-allowed\n ",
301
- children: [/* @__PURE__ */ C(m, { size: 16 }), A("products.prev", "Prev")]
302
- }),
303
- /* @__PURE__ */ w("span", {
304
- className: "text-sm text-text-secondary px-2",
305
- children: [
306
- F + 1,
307
- " / ",
308
- J
309
- ]
310
- }),
311
- /* @__PURE__ */ w("button", {
312
- type: "button",
313
- onClick: () => I((e) => e + 1),
314
- disabled: !z && F + 1 >= J || B,
315
- "aria-label": A("products.nextPage", "Next page"),
316
- className: "\n inline-flex items-center gap-1 px-3 py-1.5 text-sm\n bg-surface border border-default rounded-lg\n text-text-primary\n hover:bg-bg-sunken transition-all duration-200\n disabled:opacity-40 disabled:cursor-not-allowed\n ",
317
- children: [A("products.next", "Next"), /* @__PURE__ */ C(h, { size: 16 })]
318
- })
319
- ]
338
+ })]
320
339
  })]
321
- })]
322
- })]
340
+ }),
341
+ Z
342
+ ]
323
343
  });
324
344
  }
325
345
  //#endregion
326
- export { D as ProductsListPage };
346
+ export { M as ProductsListPage };
327
347
 
328
348
  //# sourceMappingURL=ProductsListPage.js.map