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