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