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