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