@burdenoff/microfe-product 2026.625.1 → 2026.626.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/product/pages/ContentPageViewPage.js +40 -36
- package/dist/product/pages/ContentPageViewPage.js.map +1 -1
- package/dist/product/pages/ProductCatalogPage.js +71 -63
- package/dist/product/pages/ProductCatalogPage.js.map +1 -1
- package/dist/product/pages/ProductViewPage.js +218 -181
- package/dist/product/pages/ProductViewPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js +27 -25
- package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js +99 -72
- package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js +32 -30
- package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js +96 -91
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js +25 -23
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js +136 -111
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js +35 -33
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js +130 -126
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js +27 -25
- package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js +95 -70
- package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js +32 -30
- package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitListPage.js +63 -58
- package/dist/product-management/modules/press-kit/pages/PressKitListPage.js.map +1 -1
- package/dist/product-management/modules/products/components/ProductPlans.js +132 -143
- package/dist/product-management/modules/products/components/ProductPlans.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductCreatePage.js +27 -25
- package/dist/product-management/modules/products/pages/ProductCreatePage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductDetailPage.js +142 -114
- package/dist/product-management/modules/products/pages/ProductDetailPage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductEditPage.js +31 -29
- package/dist/product-management/modules/products/pages/ProductEditPage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductsListPage.js +218 -210
- package/dist/product-management/modules/products/pages/ProductsListPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js +27 -22
- package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js +156 -129
- package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js +30 -25
- package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js +140 -132
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js.map +1 -1
- package/dist/product-management/shared/components/AuditHistoryTab.js +18 -16
- package/dist/product-management/shared/components/AuditHistoryTab.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,288 +1,296 @@
|
|
|
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
|
|
5
|
-
import { ProductStatus as
|
|
6
|
-
import { ProductStatusBadge as
|
|
7
|
-
import { SearchInput as
|
|
8
|
-
import { exportToCsv as
|
|
9
|
-
import { nativeConfirm as
|
|
10
|
-
import { useConfirmDialog as
|
|
11
|
-
import { useEffect as
|
|
12
|
-
import { ChevronLeft as
|
|
13
|
-
import { useI18n as
|
|
14
|
-
import { jsx as
|
|
15
|
-
import { PermissionGate as
|
|
16
|
-
import { AuroraBackground as
|
|
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 { 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 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";
|
|
17
17
|
//#region src/product-management/modules/products/pages/ProductsListPage.tsx
|
|
18
|
-
var
|
|
19
|
-
function
|
|
20
|
-
let { navigate:
|
|
21
|
-
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);
|
|
22
22
|
return n === e ? t : n;
|
|
23
|
-
}, [
|
|
24
|
-
...
|
|
25
|
-
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
|
|
26
26
|
}, {
|
|
27
|
-
limit:
|
|
28
|
-
offset:
|
|
27
|
+
limit: N,
|
|
28
|
+
offset: V * N
|
|
29
29
|
});
|
|
30
|
-
|
|
31
|
-
if (
|
|
32
|
-
|
|
30
|
+
p(() => {
|
|
31
|
+
if (W === 0) {
|
|
32
|
+
H(0);
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
|
-
let e = Math.ceil(
|
|
36
|
-
|
|
37
|
-
}, [
|
|
38
|
-
let { deleteProduct:
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
let t =
|
|
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) => {
|
|
43
|
+
u("medium");
|
|
44
|
+
let t = L("products.confirmDeleteProduct", "Are you sure you want to delete this product?"), n = await l({
|
|
45
45
|
title: "Delete product",
|
|
46
46
|
message: t,
|
|
47
47
|
okButtonTitle: "Delete",
|
|
48
48
|
cancelButtonTitle: "Cancel"
|
|
49
49
|
});
|
|
50
|
-
if (n === null ? await
|
|
50
|
+
if (n === null ? await Z({
|
|
51
51
|
title: "Delete product",
|
|
52
52
|
message: t,
|
|
53
53
|
okButtonTitle: "Delete",
|
|
54
54
|
cancelButtonTitle: "Cancel",
|
|
55
55
|
destructive: !0
|
|
56
56
|
}) : n) try {
|
|
57
|
-
await
|
|
57
|
+
await Y(e), d("success"), J();
|
|
58
58
|
} catch (e) {
|
|
59
|
-
|
|
59
|
+
d("error"), console.error("Failed to delete product:", e);
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
|
-
if (
|
|
62
|
+
if (K && U.length === 0 && !R && !B.status) return /* @__PURE__ */ C("div", {
|
|
63
63
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
64
|
-
children: /* @__PURE__ */
|
|
64
|
+
children: /* @__PURE__ */ C(t, { message: L("products.loadingProducts", "Loading products...") })
|
|
65
65
|
});
|
|
66
|
-
if (
|
|
66
|
+
if (q && U.length === 0) return /* @__PURE__ */ C("div", {
|
|
67
67
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
68
|
-
children: /* @__PURE__ */
|
|
69
|
-
message:
|
|
68
|
+
children: /* @__PURE__ */ C(n, {
|
|
69
|
+
message: q.message,
|
|
70
70
|
action: {
|
|
71
|
-
label:
|
|
72
|
-
onClick: () =>
|
|
71
|
+
label: L("productCommon.retry", "Retry"),
|
|
72
|
+
onClick: () => J()
|
|
73
73
|
}
|
|
74
74
|
})
|
|
75
75
|
});
|
|
76
|
-
let $ = Math.max(1, Math.ceil(
|
|
77
|
-
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", {
|
|
78
78
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6 animate-in fade-in duration-200",
|
|
79
79
|
children: [
|
|
80
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ w("div", {
|
|
81
81
|
className: "mb-6",
|
|
82
|
-
children: [
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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
|
+
})
|
|
102
104
|
})
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
...R,
|
|
118
|
-
status: e.target.value ? e.target.value : void 0
|
|
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"
|
|
119
119
|
}),
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}),
|
|
126
|
-
/* @__PURE__ */ S("option", {
|
|
127
|
-
value: i.ACTIVE,
|
|
128
|
-
children: F("products.statusActive", "Active")
|
|
120
|
+
/* @__PURE__ */ w("select", {
|
|
121
|
+
value: B.status || "",
|
|
122
|
+
onChange: (e) => re({
|
|
123
|
+
...B,
|
|
124
|
+
status: e.target.value ? e.target.value : void 0
|
|
129
125
|
}),
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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" : ""
|
|
141
157
|
})
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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 })
|
|
151
176
|
})
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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 })
|
|
170
|
-
})
|
|
171
|
-
]
|
|
172
|
-
})]
|
|
177
|
+
]
|
|
178
|
+
})
|
|
179
|
+
]
|
|
173
180
|
}),
|
|
174
|
-
|
|
181
|
+
U.length === 0 && !K ? /* @__PURE__ */ C(k, {
|
|
175
182
|
treatment: "insight",
|
|
176
183
|
className: "animate-in fade-in duration-200",
|
|
177
|
-
children: /* @__PURE__ */
|
|
178
|
-
illustration:
|
|
179
|
-
title:
|
|
180
|
-
action: !
|
|
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, {
|
|
181
188
|
type: "button",
|
|
182
|
-
onClick: () =>
|
|
183
|
-
children: [/* @__PURE__ */
|
|
189
|
+
onClick: () => P(`${F}/new`),
|
|
190
|
+
children: [/* @__PURE__ */ C(y, { className: "size-4" }), L("products.createProduct", "Create Product")]
|
|
184
191
|
}) : void 0
|
|
185
192
|
})
|
|
186
|
-
}) : /* @__PURE__ */
|
|
187
|
-
treatment: "
|
|
193
|
+
}) : /* @__PURE__ */ w(k, {
|
|
194
|
+
treatment: "glass",
|
|
195
|
+
glow: !0,
|
|
188
196
|
className: "overflow-hidden p-0",
|
|
189
|
-
children: [/* @__PURE__ */
|
|
197
|
+
children: [/* @__PURE__ */ w("table", {
|
|
190
198
|
className: "w-full",
|
|
191
|
-
children: [/* @__PURE__ */
|
|
199
|
+
children: [/* @__PURE__ */ C("thead", {
|
|
192
200
|
className: "bg-bg-sunken/60 border-b border-border-seam",
|
|
193
|
-
children: /* @__PURE__ */
|
|
194
|
-
/* @__PURE__ */
|
|
201
|
+
children: /* @__PURE__ */ w("tr", { children: [
|
|
202
|
+
/* @__PURE__ */ C("th", {
|
|
195
203
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
196
|
-
children:
|
|
204
|
+
children: L("products.columnProduct", "Product")
|
|
197
205
|
}),
|
|
198
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ C("th", {
|
|
199
207
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
200
|
-
children:
|
|
208
|
+
children: L("products.columnStatus", "Status")
|
|
201
209
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ C("th", {
|
|
203
211
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
204
|
-
children:
|
|
212
|
+
children: L("products.columnCategory", "Category")
|
|
205
213
|
}),
|
|
206
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ C("th", {
|
|
207
215
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
208
|
-
children:
|
|
216
|
+
children: L("products.columnVersion", "Version")
|
|
209
217
|
}),
|
|
210
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ C("th", {
|
|
211
219
|
className: "text-right px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
212
|
-
children:
|
|
220
|
+
children: L("products.columnActions", "Actions")
|
|
213
221
|
})
|
|
214
222
|
] })
|
|
215
|
-
}), /* @__PURE__ */
|
|
223
|
+
}), /* @__PURE__ */ C("tbody", {
|
|
216
224
|
className: "divide-y divide-border-seam",
|
|
217
|
-
children:
|
|
225
|
+
children: U.map((e) => /* @__PURE__ */ w("tr", {
|
|
218
226
|
className: "hover:bg-bg-sunken/70 transition-colors duration-200",
|
|
219
227
|
children: [
|
|
220
|
-
/* @__PURE__ */
|
|
228
|
+
/* @__PURE__ */ C("td", {
|
|
221
229
|
className: "px-6 py-4",
|
|
222
|
-
children: /* @__PURE__ */
|
|
230
|
+
children: /* @__PURE__ */ w("div", {
|
|
223
231
|
className: "flex items-center gap-3",
|
|
224
|
-
children: [e.logoUrl ? /* @__PURE__ */
|
|
232
|
+
children: [e.logoUrl ? /* @__PURE__ */ C("img", {
|
|
225
233
|
src: e.logoUrl,
|
|
226
234
|
alt: e.name,
|
|
227
235
|
className: "size-10 rounded-lg object-cover"
|
|
228
|
-
}) : /* @__PURE__ */
|
|
236
|
+
}) : /* @__PURE__ */ C("div", {
|
|
229
237
|
className: "size-10 rounded-lg bg-[var(--color-status-warning-subtle)] flex items-center justify-center",
|
|
230
|
-
children: /* @__PURE__ */
|
|
238
|
+
children: /* @__PURE__ */ C("span", {
|
|
231
239
|
className: "text-[var(--color-status-warning)] font-semibold",
|
|
232
240
|
children: e.name[0]
|
|
233
241
|
})
|
|
234
|
-
}), /* @__PURE__ */
|
|
242
|
+
}), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
235
243
|
className: "font-medium text-text-primary",
|
|
236
244
|
children: e.name
|
|
237
|
-
}), /* @__PURE__ */
|
|
245
|
+
}), /* @__PURE__ */ w("p", {
|
|
238
246
|
className: "text-sm text-text-tertiary font-mono",
|
|
239
247
|
children: ["/", e.slug]
|
|
240
248
|
})] })]
|
|
241
249
|
})
|
|
242
250
|
}),
|
|
243
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ C("td", {
|
|
244
252
|
className: "px-6 py-4",
|
|
245
|
-
children: /* @__PURE__ */
|
|
253
|
+
children: /* @__PURE__ */ C(o, { status: e.status })
|
|
246
254
|
}),
|
|
247
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ C("td", {
|
|
248
256
|
className: "px-6 py-4",
|
|
249
|
-
children: /* @__PURE__ */
|
|
257
|
+
children: /* @__PURE__ */ C("span", {
|
|
250
258
|
className: "text-sm text-text-primary",
|
|
251
259
|
children: "-"
|
|
252
260
|
})
|
|
253
261
|
}),
|
|
254
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ C("td", {
|
|
255
263
|
className: "px-6 py-4",
|
|
256
|
-
children: /* @__PURE__ */
|
|
264
|
+
children: /* @__PURE__ */ C("span", {
|
|
257
265
|
className: "text-sm text-text-primary font-mono",
|
|
258
266
|
children: "-"
|
|
259
267
|
})
|
|
260
268
|
}),
|
|
261
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ C("td", {
|
|
262
270
|
className: "px-6 py-4",
|
|
263
|
-
children: /* @__PURE__ */
|
|
271
|
+
children: /* @__PURE__ */ w("div", {
|
|
264
272
|
className: "flex items-center justify-end gap-2",
|
|
265
|
-
children: [/* @__PURE__ */
|
|
273
|
+
children: [/* @__PURE__ */ C("button", {
|
|
266
274
|
type: "button",
|
|
267
|
-
onClick: () =>
|
|
275
|
+
onClick: () => P(`${F}/${e.id}`),
|
|
268
276
|
className: "p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200",
|
|
269
|
-
title:
|
|
270
|
-
children: /* @__PURE__ */
|
|
271
|
-
}), /* @__PURE__ */
|
|
277
|
+
title: L("products.viewDetails", "View details"),
|
|
278
|
+
children: /* @__PURE__ */ C(v, { size: 18 })
|
|
279
|
+
}), /* @__PURE__ */ w(T, {
|
|
272
280
|
role: "super_admin",
|
|
273
|
-
children: [/* @__PURE__ */
|
|
281
|
+
children: [/* @__PURE__ */ C("button", {
|
|
274
282
|
type: "button",
|
|
275
|
-
onClick: () =>
|
|
283
|
+
onClick: () => P(`${F}/${e.id}/edit`),
|
|
276
284
|
className: "p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200",
|
|
277
|
-
title:
|
|
278
|
-
children: /* @__PURE__ */
|
|
279
|
-
}), /* @__PURE__ */
|
|
285
|
+
title: L("products.edit", "Edit"),
|
|
286
|
+
children: /* @__PURE__ */ C(x, { size: 18 })
|
|
287
|
+
}), /* @__PURE__ */ C("button", {
|
|
280
288
|
type: "button",
|
|
281
|
-
onClick: () =>
|
|
282
|
-
disabled:
|
|
289
|
+
onClick: () => ie(e.id),
|
|
290
|
+
disabled: X,
|
|
283
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",
|
|
284
|
-
title:
|
|
285
|
-
children: /* @__PURE__ */
|
|
292
|
+
title: L("products.delete", "Delete"),
|
|
293
|
+
children: /* @__PURE__ */ C(ee, { size: 18 })
|
|
286
294
|
})]
|
|
287
295
|
})]
|
|
288
296
|
})
|
|
@@ -290,59 +298,59 @@ function M() {
|
|
|
290
298
|
]
|
|
291
299
|
}, e.id))
|
|
292
300
|
})]
|
|
293
|
-
}),
|
|
301
|
+
}), W > N && /* @__PURE__ */ w("div", {
|
|
294
302
|
className: "flex items-center justify-between px-6 py-3 border-t border-border-seam bg-bg-sunken/40",
|
|
295
|
-
children: [/* @__PURE__ */
|
|
303
|
+
children: [/* @__PURE__ */ w("p", {
|
|
296
304
|
className: "text-sm text-text-secondary",
|
|
297
305
|
children: [
|
|
298
|
-
|
|
306
|
+
L("products.showing", "Showing"),
|
|
299
307
|
" ",
|
|
300
|
-
ie,
|
|
301
|
-
"–",
|
|
302
308
|
ae,
|
|
309
|
+
"–",
|
|
310
|
+
oe,
|
|
303
311
|
" ",
|
|
304
|
-
|
|
312
|
+
L("products.of", "of"),
|
|
305
313
|
" ",
|
|
306
|
-
|
|
314
|
+
W,
|
|
307
315
|
" ",
|
|
308
|
-
|
|
316
|
+
L("products.products", "products")
|
|
309
317
|
]
|
|
310
|
-
}), /* @__PURE__ */
|
|
318
|
+
}), /* @__PURE__ */ w("div", {
|
|
311
319
|
className: "flex items-center gap-2",
|
|
312
320
|
children: [
|
|
313
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ w("button", {
|
|
314
322
|
type: "button",
|
|
315
|
-
onClick: () =>
|
|
316
|
-
disabled:
|
|
317
|
-
"aria-label":
|
|
323
|
+
onClick: () => H((e) => Math.max(0, e - 1)),
|
|
324
|
+
disabled: V === 0 || K,
|
|
325
|
+
"aria-label": L("products.prevPage", "Previous page"),
|
|
318
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 ",
|
|
319
|
-
children: [/* @__PURE__ */
|
|
327
|
+
children: [/* @__PURE__ */ C(h, { size: 16 }), L("products.prev", "Prev")]
|
|
320
328
|
}),
|
|
321
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ w("span", {
|
|
322
330
|
className: "text-sm text-text-secondary px-2 tabular-nums",
|
|
323
331
|
children: [
|
|
324
|
-
|
|
332
|
+
V + 1,
|
|
325
333
|
" / ",
|
|
326
334
|
$
|
|
327
335
|
]
|
|
328
336
|
}),
|
|
329
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ w("button", {
|
|
330
338
|
type: "button",
|
|
331
|
-
onClick: () =>
|
|
332
|
-
disabled: !
|
|
333
|
-
"aria-label":
|
|
339
|
+
onClick: () => H((e) => e + 1),
|
|
340
|
+
disabled: !G && V + 1 >= $ || K,
|
|
341
|
+
"aria-label": L("products.nextPage", "Next page"),
|
|
334
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 ",
|
|
335
|
-
children: [
|
|
343
|
+
children: [L("products.next", "Next"), /* @__PURE__ */ C(g, { size: 16 })]
|
|
336
344
|
})
|
|
337
345
|
]
|
|
338
346
|
})]
|
|
339
347
|
})]
|
|
340
348
|
}),
|
|
341
|
-
|
|
349
|
+
Q
|
|
342
350
|
]
|
|
343
351
|
});
|
|
344
352
|
}
|
|
345
353
|
//#endregion
|
|
346
|
-
export {
|
|
354
|
+
export { P as ProductsListPage };
|
|
347
355
|
|
|
348
356
|
//# sourceMappingURL=ProductsListPage.js.map
|