@burdenoff/microfe-product 2026.624.3 → 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.
- package/dist/product/pages/ContentPageViewPage.js +25 -24
- package/dist/product/pages/ContentPageViewPage.js.map +1 -1
- package/dist/product/pages/ProductCatalogPage.js +69 -64
- package/dist/product/pages/ProductCatalogPage.js.map +1 -1
- package/dist/product/pages/ProductViewPage.js +91 -86
- 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 +2 -2
- package/dist/product-management/modules/content-pages/pages/ContentPageCreatePage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js +91 -89
- package/dist/product-management/modules/content-pages/pages/ContentPageDetailPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js +2 -2
- package/dist/product-management/modules/content-pages/pages/ContentPageEditPage.js.map +1 -1
- package/dist/product-management/modules/content-pages/pages/ContentPagesListPage.js +164 -159
- 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 +2 -2
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagCreatePage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js +82 -80
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagDetailPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js +2 -2
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagEditPage.js.map +1 -1
- package/dist/product-management/modules/feature-flags/pages/FeatureFlagsListPage.js +83 -79
- 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 +2 -2
- package/dist/product-management/modules/press-kit/pages/PressKitCreatePage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js +71 -69
- package/dist/product-management/modules/press-kit/pages/PressKitDetailPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js +2 -2
- package/dist/product-management/modules/press-kit/pages/PressKitEditPage.js.map +1 -1
- package/dist/product-management/modules/press-kit/pages/PressKitListPage.js +80 -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 +4 -4
- package/dist/product-management/modules/products/components/ProductPlans.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductCreatePage.js +2 -2
- package/dist/product-management/modules/products/pages/ProductCreatePage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductDetailPage.js +142 -140
- package/dist/product-management/modules/products/pages/ProductDetailPage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductEditPage.js +2 -2
- package/dist/product-management/modules/products/pages/ProductEditPage.js.map +1 -1
- package/dist/product-management/modules/products/pages/ProductsListPage.js +188 -179
- 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 +2 -2
- package/dist/product-management/modules/shortcuts/pages/ShortcutCreatePage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js +167 -175
- package/dist/product-management/modules/shortcuts/pages/ShortcutDetailPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js +2 -2
- package/dist/product-management/modules/shortcuts/pages/ShortcutEditPage.js.map +1 -1
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js +171 -168
- package/dist/product-management/modules/shortcuts/pages/ShortcutsListPage.js.map +1 -1
- package/dist/product-management/shared/components/AuditHistoryTab.js +1 -1
- 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
|
@@ -1,151 +1,158 @@
|
|
|
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
|
|
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";
|
|
16
17
|
//#region src/product-management/modules/products/pages/ProductsListPage.tsx
|
|
17
|
-
var
|
|
18
|
-
function
|
|
19
|
-
let { navigate:
|
|
20
|
-
let n =
|
|
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);
|
|
21
22
|
return n === e ? t : n;
|
|
22
|
-
}, [
|
|
23
|
-
...
|
|
24
|
-
search:
|
|
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
|
|
25
26
|
}, {
|
|
26
|
-
limit:
|
|
27
|
-
offset:
|
|
27
|
+
limit: j,
|
|
28
|
+
offset: B * j
|
|
28
29
|
});
|
|
29
|
-
|
|
30
|
-
if (
|
|
31
|
-
|
|
30
|
+
d(() => {
|
|
31
|
+
if (U === 0) {
|
|
32
|
+
V(0);
|
|
32
33
|
return;
|
|
33
34
|
}
|
|
34
|
-
let e = Math.ceil(
|
|
35
|
-
|
|
36
|
-
}, [
|
|
37
|
-
let { deleteProduct:
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
let t =
|
|
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({
|
|
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 X({
|
|
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 J(e), u("success"), q();
|
|
57
58
|
} catch (e) {
|
|
58
|
-
|
|
59
|
+
u("error"), console.error("Failed to delete product:", e);
|
|
59
60
|
}
|
|
60
61
|
};
|
|
61
|
-
if (
|
|
62
|
+
if (G && H.length === 0 && !I && !R.status) return /* @__PURE__ */ S("div", {
|
|
62
63
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
63
|
-
children: /* @__PURE__ */
|
|
64
|
+
children: /* @__PURE__ */ S(t, { message: F("products.loadingProducts", "Loading products...") })
|
|
64
65
|
});
|
|
65
|
-
if (
|
|
66
|
+
if (K && H.length === 0) return /* @__PURE__ */ S("div", {
|
|
66
67
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
67
|
-
children: /* @__PURE__ */
|
|
68
|
-
message:
|
|
68
|
+
children: /* @__PURE__ */ S(n, {
|
|
69
|
+
message: K.message,
|
|
69
70
|
action: {
|
|
70
|
-
label:
|
|
71
|
-
onClick: () =>
|
|
71
|
+
label: F("productCommon.retry", "Retry"),
|
|
72
|
+
onClick: () => q()
|
|
72
73
|
}
|
|
73
74
|
})
|
|
74
75
|
});
|
|
75
|
-
let
|
|
76
|
-
return /* @__PURE__ */
|
|
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", {
|
|
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__ */ C("div", {
|
|
80
81
|
className: "mb-6",
|
|
81
|
-
children: [/* @__PURE__ */
|
|
82
|
-
className: "flex items-center justify-between
|
|
83
|
-
children: [
|
|
84
|
-
|
|
85
|
-
children:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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: []
|
|
102
|
+
})
|
|
96
103
|
})
|
|
97
|
-
|
|
98
|
-
}), /* @__PURE__ */
|
|
104
|
+
]
|
|
105
|
+
}), /* @__PURE__ */ C("div", {
|
|
99
106
|
className: "flex gap-4",
|
|
100
107
|
children: [
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
value:
|
|
103
|
-
onChange:
|
|
104
|
-
placeholder:
|
|
108
|
+
/* @__PURE__ */ S(o, {
|
|
109
|
+
value: I,
|
|
110
|
+
onChange: Q,
|
|
111
|
+
placeholder: F("products.searchPlaceholder", "Search products..."),
|
|
105
112
|
className: "flex-1"
|
|
106
113
|
}),
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
value:
|
|
109
|
-
onChange: (e) =>
|
|
110
|
-
...
|
|
114
|
+
/* @__PURE__ */ C("select", {
|
|
115
|
+
value: R.status || "",
|
|
116
|
+
onChange: (e) => ne({
|
|
117
|
+
...R,
|
|
111
118
|
status: e.target.value ? e.target.value : void 0
|
|
112
119
|
}),
|
|
113
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 ",
|
|
114
121
|
children: [
|
|
115
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ S("option", {
|
|
116
123
|
value: "",
|
|
117
|
-
children:
|
|
124
|
+
children: F("products.allStatuses", "All Statuses")
|
|
118
125
|
}),
|
|
119
|
-
/* @__PURE__ */
|
|
120
|
-
value:
|
|
121
|
-
children:
|
|
126
|
+
/* @__PURE__ */ S("option", {
|
|
127
|
+
value: i.ACTIVE,
|
|
128
|
+
children: F("products.statusActive", "Active")
|
|
122
129
|
}),
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
value:
|
|
125
|
-
children:
|
|
130
|
+
/* @__PURE__ */ S("option", {
|
|
131
|
+
value: i.DRAFT,
|
|
132
|
+
children: F("products.statusDraft", "Draft")
|
|
126
133
|
}),
|
|
127
|
-
/* @__PURE__ */
|
|
128
|
-
value:
|
|
129
|
-
children:
|
|
134
|
+
/* @__PURE__ */ S("option", {
|
|
135
|
+
value: i.WAITLIST,
|
|
136
|
+
children: F("products.statusWaitlist", "Waitlist")
|
|
130
137
|
}),
|
|
131
|
-
/* @__PURE__ */
|
|
132
|
-
value:
|
|
133
|
-
children:
|
|
138
|
+
/* @__PURE__ */ S("option", {
|
|
139
|
+
value: i.COMING_SOON,
|
|
140
|
+
children: F("products.statusComingSoon", "Coming Soon")
|
|
134
141
|
})
|
|
135
142
|
]
|
|
136
143
|
}),
|
|
137
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ S("button", {
|
|
138
145
|
type: "button",
|
|
139
|
-
onClick: () =>
|
|
146
|
+
onClick: () => q(),
|
|
140
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 ",
|
|
141
|
-
children: /* @__PURE__ */
|
|
148
|
+
children: /* @__PURE__ */ S(v, {
|
|
142
149
|
size: 18,
|
|
143
|
-
className:
|
|
150
|
+
className: G ? "animate-spin" : ""
|
|
144
151
|
})
|
|
145
152
|
}),
|
|
146
|
-
|
|
153
|
+
H.length > 0 && /* @__PURE__ */ S("button", {
|
|
147
154
|
type: "button",
|
|
148
|
-
onClick: () =>
|
|
155
|
+
onClick: () => s("products", H.map((e) => ({
|
|
149
156
|
id: e.id,
|
|
150
157
|
name: e.name,
|
|
151
158
|
slug: e.slug,
|
|
@@ -158,122 +165,124 @@ function O() {
|
|
|
158
165
|
updatedAt: e.updatedAt
|
|
159
166
|
}))),
|
|
160
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 ",
|
|
161
|
-
title:
|
|
162
|
-
children: /* @__PURE__ */
|
|
168
|
+
title: F("products.exportCsv", "Export as CSV"),
|
|
169
|
+
children: /* @__PURE__ */ S(h, { size: 18 })
|
|
163
170
|
})
|
|
164
171
|
]
|
|
165
172
|
})]
|
|
166
173
|
}),
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
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", {
|
|
181
190
|
className: "w-full",
|
|
182
|
-
children: [/* @__PURE__ */
|
|
183
|
-
className: "bg-bg-sunken border-b border-
|
|
184
|
-
children: /* @__PURE__ */
|
|
185
|
-
/* @__PURE__ */
|
|
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", {
|
|
186
195
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
187
|
-
children:
|
|
196
|
+
children: F("products.columnProduct", "Product")
|
|
188
197
|
}),
|
|
189
|
-
/* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ S("th", {
|
|
190
199
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
191
|
-
children:
|
|
200
|
+
children: F("products.columnStatus", "Status")
|
|
192
201
|
}),
|
|
193
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ S("th", {
|
|
194
203
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
195
|
-
children:
|
|
204
|
+
children: F("products.columnCategory", "Category")
|
|
196
205
|
}),
|
|
197
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ S("th", {
|
|
198
207
|
className: "text-left px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
199
|
-
children:
|
|
208
|
+
children: F("products.columnVersion", "Version")
|
|
200
209
|
}),
|
|
201
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ S("th", {
|
|
202
211
|
className: "text-right px-6 py-3 text-xs font-semibold text-text-secondary uppercase",
|
|
203
|
-
children:
|
|
212
|
+
children: F("products.columnActions", "Actions")
|
|
204
213
|
})
|
|
205
214
|
] })
|
|
206
|
-
}), /* @__PURE__ */
|
|
207
|
-
className: "divide-y divide-
|
|
208
|
-
children:
|
|
209
|
-
className: "hover:bg-bg-sunken transition-
|
|
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",
|
|
210
219
|
children: [
|
|
211
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ S("td", {
|
|
212
221
|
className: "px-6 py-4",
|
|
213
|
-
children: /* @__PURE__ */
|
|
222
|
+
children: /* @__PURE__ */ C("div", {
|
|
214
223
|
className: "flex items-center gap-3",
|
|
215
|
-
children: [e.logoUrl ? /* @__PURE__ */
|
|
224
|
+
children: [e.logoUrl ? /* @__PURE__ */ S("img", {
|
|
216
225
|
src: e.logoUrl,
|
|
217
226
|
alt: e.name,
|
|
218
227
|
className: "size-10 rounded-lg object-cover"
|
|
219
|
-
}) : /* @__PURE__ */
|
|
228
|
+
}) : /* @__PURE__ */ S("div", {
|
|
220
229
|
className: "size-10 rounded-lg bg-[var(--color-status-warning-subtle)] flex items-center justify-center",
|
|
221
|
-
children: /* @__PURE__ */
|
|
230
|
+
children: /* @__PURE__ */ S("span", {
|
|
222
231
|
className: "text-[var(--color-status-warning)] font-semibold",
|
|
223
232
|
children: e.name[0]
|
|
224
233
|
})
|
|
225
|
-
}), /* @__PURE__ */
|
|
234
|
+
}), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
226
235
|
className: "font-medium text-text-primary",
|
|
227
236
|
children: e.name
|
|
228
|
-
}), /* @__PURE__ */
|
|
237
|
+
}), /* @__PURE__ */ C("p", {
|
|
229
238
|
className: "text-sm text-text-tertiary font-mono",
|
|
230
239
|
children: ["/", e.slug]
|
|
231
240
|
})] })]
|
|
232
241
|
})
|
|
233
242
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ S("td", {
|
|
235
244
|
className: "px-6 py-4",
|
|
236
|
-
children: /* @__PURE__ */
|
|
245
|
+
children: /* @__PURE__ */ S(a, { status: e.status })
|
|
237
246
|
}),
|
|
238
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ S("td", {
|
|
239
248
|
className: "px-6 py-4",
|
|
240
|
-
children: /* @__PURE__ */
|
|
249
|
+
children: /* @__PURE__ */ S("span", {
|
|
241
250
|
className: "text-sm text-text-primary",
|
|
242
251
|
children: "-"
|
|
243
252
|
})
|
|
244
253
|
}),
|
|
245
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ S("td", {
|
|
246
255
|
className: "px-6 py-4",
|
|
247
|
-
children: /* @__PURE__ */
|
|
256
|
+
children: /* @__PURE__ */ S("span", {
|
|
248
257
|
className: "text-sm text-text-primary font-mono",
|
|
249
258
|
children: "-"
|
|
250
259
|
})
|
|
251
260
|
}),
|
|
252
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ S("td", {
|
|
253
262
|
className: "px-6 py-4",
|
|
254
|
-
children: /* @__PURE__ */
|
|
263
|
+
children: /* @__PURE__ */ C("div", {
|
|
255
264
|
className: "flex items-center justify-end gap-2",
|
|
256
|
-
children: [/* @__PURE__ */
|
|
265
|
+
children: [/* @__PURE__ */ S("button", {
|
|
257
266
|
type: "button",
|
|
258
|
-
onClick: () =>
|
|
267
|
+
onClick: () => M(`${N}/${e.id}`),
|
|
259
268
|
className: "p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200",
|
|
260
|
-
title:
|
|
261
|
-
children: /* @__PURE__ */
|
|
262
|
-
}), /* @__PURE__ */
|
|
269
|
+
title: F("products.viewDetails", "View details"),
|
|
270
|
+
children: /* @__PURE__ */ S(g, { size: 18 })
|
|
271
|
+
}), /* @__PURE__ */ C(w, {
|
|
263
272
|
role: "super_admin",
|
|
264
|
-
children: [/* @__PURE__ */
|
|
273
|
+
children: [/* @__PURE__ */ S("button", {
|
|
265
274
|
type: "button",
|
|
266
|
-
onClick: () =>
|
|
275
|
+
onClick: () => M(`${N}/${e.id}/edit`),
|
|
267
276
|
className: "p-2 rounded-lg text-text-secondary hover:bg-bg-sunken transition-all duration-200",
|
|
268
|
-
title:
|
|
269
|
-
children: /* @__PURE__ */
|
|
270
|
-
}), /* @__PURE__ */
|
|
277
|
+
title: F("products.edit", "Edit"),
|
|
278
|
+
children: /* @__PURE__ */ S(y, { size: 18 })
|
|
279
|
+
}), /* @__PURE__ */ S("button", {
|
|
271
280
|
type: "button",
|
|
272
|
-
onClick: () =>
|
|
273
|
-
disabled:
|
|
281
|
+
onClick: () => re(e.id),
|
|
282
|
+
disabled: Y,
|
|
274
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",
|
|
275
|
-
title:
|
|
276
|
-
children: /* @__PURE__ */
|
|
284
|
+
title: F("products.delete", "Delete"),
|
|
285
|
+
children: /* @__PURE__ */ S(b, { size: 18 })
|
|
277
286
|
})]
|
|
278
287
|
})]
|
|
279
288
|
})
|
|
@@ -281,59 +290,59 @@ function O() {
|
|
|
281
290
|
]
|
|
282
291
|
}, e.id))
|
|
283
292
|
})]
|
|
284
|
-
}),
|
|
285
|
-
className: "flex items-center justify-between px-6 py-3 border-t border-
|
|
286
|
-
children: [/* @__PURE__ */
|
|
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", {
|
|
287
296
|
className: "text-sm text-text-secondary",
|
|
288
297
|
children: [
|
|
289
|
-
|
|
298
|
+
F("products.showing", "Showing"),
|
|
290
299
|
" ",
|
|
291
|
-
|
|
300
|
+
ie,
|
|
292
301
|
"–",
|
|
293
|
-
|
|
302
|
+
ae,
|
|
294
303
|
" ",
|
|
295
|
-
|
|
304
|
+
F("products.of", "of"),
|
|
296
305
|
" ",
|
|
297
|
-
|
|
306
|
+
U,
|
|
298
307
|
" ",
|
|
299
|
-
|
|
308
|
+
F("products.products", "products")
|
|
300
309
|
]
|
|
301
|
-
}), /* @__PURE__ */
|
|
310
|
+
}), /* @__PURE__ */ C("div", {
|
|
302
311
|
className: "flex items-center gap-2",
|
|
303
312
|
children: [
|
|
304
|
-
/* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ C("button", {
|
|
305
314
|
type: "button",
|
|
306
|
-
onClick: () =>
|
|
307
|
-
disabled:
|
|
308
|
-
"aria-label":
|
|
315
|
+
onClick: () => V((e) => Math.max(0, e - 1)),
|
|
316
|
+
disabled: B === 0 || G,
|
|
317
|
+
"aria-label": F("products.prevPage", "Previous page"),
|
|
309
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 ",
|
|
310
|
-
children: [/* @__PURE__ */
|
|
319
|
+
children: [/* @__PURE__ */ S(p, { size: 16 }), F("products.prev", "Prev")]
|
|
311
320
|
}),
|
|
312
|
-
/* @__PURE__ */
|
|
321
|
+
/* @__PURE__ */ C("span", {
|
|
313
322
|
className: "text-sm text-text-secondary px-2 tabular-nums",
|
|
314
323
|
children: [
|
|
315
|
-
|
|
324
|
+
B + 1,
|
|
316
325
|
" / ",
|
|
317
|
-
|
|
326
|
+
$
|
|
318
327
|
]
|
|
319
328
|
}),
|
|
320
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ C("button", {
|
|
321
330
|
type: "button",
|
|
322
|
-
onClick: () =>
|
|
323
|
-
disabled: !
|
|
324
|
-
"aria-label":
|
|
331
|
+
onClick: () => V((e) => e + 1),
|
|
332
|
+
disabled: !W && B + 1 >= $ || G,
|
|
333
|
+
"aria-label": F("products.nextPage", "Next page"),
|
|
325
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 ",
|
|
326
|
-
children: [
|
|
335
|
+
children: [F("products.next", "Next"), /* @__PURE__ */ S(m, { size: 16 })]
|
|
327
336
|
})
|
|
328
337
|
]
|
|
329
338
|
})]
|
|
330
339
|
})]
|
|
331
340
|
}),
|
|
332
|
-
|
|
341
|
+
Z
|
|
333
342
|
]
|
|
334
343
|
});
|
|
335
344
|
}
|
|
336
345
|
//#endregion
|
|
337
|
-
export {
|
|
346
|
+
export { M as ProductsListPage };
|
|
338
347
|
|
|
339
348
|
//# sourceMappingURL=ProductsListPage.js.map
|