@mohasinac/appkit 3.6.5 → 3.7.0
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/_internal/client/features/layout/DashboardLayoutClient.d.ts +17 -3
- package/dist/_internal/client/features/layout/DashboardLayoutClient.js +7 -2
- package/dist/_internal/client/features/tour/TourProvider.d.ts +5 -2
- package/dist/_internal/client/features/tour/TourProvider.js +125 -12
- package/dist/_internal/client/theme/ThemeProvider.js +1 -1
- package/dist/_internal/server/features/faqs/og.js +5 -1
- package/dist/_internal/server/features/reviews/og.js +5 -1
- package/dist/_internal/server/features/seo/manifest.js +2 -1
- package/dist/_internal/server/features/seo/og.js +7 -1
- package/dist/_internal/server/features/tester/visibility.d.ts +13 -0
- package/dist/_internal/server/features/tester/visibility.js +28 -0
- package/dist/_internal/server/functions/scheduled.d.ts +2 -1
- package/dist/_internal/server/functions/scheduled.js +9 -1
- package/dist/_internal/server/jobs/core/jobRunners.js +5 -0
- package/dist/_internal/server/jobs/core/resetOtpVerification.d.ts +17 -0
- package/dist/_internal/server/jobs/core/resetOtpVerification.js +88 -0
- package/dist/_internal/server/jobs/core/testerSandboxCleanup.d.ts +6 -0
- package/dist/_internal/server/jobs/core/testerSandboxCleanup.js +35 -0
- package/dist/_internal/server/jobs/handlers/_helpers.d.ts +6 -0
- package/dist/_internal/server/jobs/handlers/_helpers.js +12 -0
- package/dist/_internal/server/jobs/handlers/index.d.ts +1 -0
- package/dist/_internal/server/jobs/handlers/index.js +2 -0
- package/dist/_internal/server/jobs/handlers/messages.d.ts +2 -0
- package/dist/_internal/server/jobs/handlers/messages.js +2 -0
- package/dist/_internal/server/jobs/handlers/testerSandboxCleanup.d.ts +2 -0
- package/dist/_internal/server/jobs/handlers/testerSandboxCleanup.js +2 -0
- package/dist/_internal/shared/actions/action-registry.d.ts +1 -1
- package/dist/_internal/shared/actions/action-registry.js +48 -0
- package/dist/_internal/shared/tokens/index.d.ts +12 -12
- package/dist/client.d.ts +15 -3
- package/dist/client.js +10 -2
- package/dist/constants/api-endpoints.d.ts +36 -12
- package/dist/constants/api-endpoints.js +16 -8
- package/dist/constants/field-names.d.ts +9 -0
- package/dist/constants/field-names.js +12 -0
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.js +1 -1
- package/dist/features/account/components/LinkedAccountsSection.d.ts +11 -0
- package/dist/features/account/components/LinkedAccountsSection.js +11 -0
- package/dist/features/account/components/UserSidebar.d.ts +3 -1
- package/dist/features/account/components/UserSidebar.js +9 -13
- package/dist/features/account/hooks/useCollapsedSections.d.ts +20 -0
- package/dist/features/account/hooks/useCollapsedSections.js +63 -0
- package/dist/features/account/hooks/useProfile.d.ts +8 -0
- package/dist/features/account/index.d.ts +1 -0
- package/dist/features/account/index.js +1 -0
- package/dist/features/admin/components/AdminAddressEditorView.js +2 -2
- package/dist/features/admin/components/AdminCarouselView.js +2 -2
- package/dist/features/admin/components/AdminCategoryEditorView.js +2 -2
- package/dist/features/admin/components/AdminProductEditorView.js +5 -2
- package/dist/features/admin/components/AdminSectionsView.js +3 -18
- package/dist/features/admin/components/AdminSidebar.js +8 -6
- package/dist/features/admin/components/AdminSiteSettingsView.js +133 -127
- package/dist/features/admin/components/AdminTesterChecklistItemEditorView.d.ts +9 -0
- package/dist/features/admin/components/AdminTesterChecklistItemEditorView.js +129 -0
- package/dist/features/admin/components/AdminTesterChecklistView.d.ts +6 -0
- package/dist/features/admin/components/AdminTesterChecklistView.js +93 -0
- package/dist/features/admin/components/AdminUserEditorView.d.ts +3 -1
- package/dist/features/admin/components/AdminUserEditorView.js +7 -1
- package/dist/features/admin/components/AdminUsersView.js +1 -1
- package/dist/features/admin/components/DataListingView.js +2 -2
- package/dist/features/admin/components/analytics/AdminPageViewsReportView.d.ts +8 -0
- package/dist/features/admin/components/analytics/AdminPageViewsReportView.js +41 -0
- package/dist/features/admin/components/index.d.ts +6 -0
- package/dist/features/admin/components/index.js +3 -0
- package/dist/features/admin/schemas/firestore.d.ts +0 -7
- package/dist/features/admin/schemas/firestore.js +6 -6
- package/dist/features/analytics/components/PageViewTracker.d.ts +12 -0
- package/dist/features/analytics/components/PageViewTracker.js +22 -0
- package/dist/features/analytics/repository/page-views.repository.d.ts +32 -0
- package/dist/features/analytics/repository/page-views.repository.js +43 -0
- package/dist/features/analytics/types.d.ts +6 -0
- package/dist/features/analytics/types.js +13 -0
- package/dist/features/auth/components/SocialAuthButtons.js +1 -1
- package/dist/features/auth/hooks/useAuth.d.ts +12 -0
- package/dist/features/auth/hooks/useAuth.js +109 -0
- package/dist/features/auth/permissions/constants.d.ts +1 -1
- package/dist/features/auth/schemas/firestore.d.ts +17 -1
- package/dist/features/auth/schemas/firestore.js +2 -0
- package/dist/features/blog/components/BlogIndexListing.js +2 -2
- package/dist/features/blog/schemas/firestore.d.ts +4 -0
- package/dist/features/cart/actions/cart-actions.js +20 -2
- package/dist/features/categories/components/CategoriesIndexListing.js +2 -2
- package/dist/features/categories/components/CategoryBundlesListing.js +2 -2
- package/dist/features/categories/components/CategoryDetailPageView.js +3 -1
- package/dist/features/categories/components/CategoryProductsListing.js +2 -2
- package/dist/features/categories/schemas/firestore.d.ts +4 -0
- package/dist/features/classified/components/ClassifiedIndexListing.js +2 -2
- package/dist/features/digital-codes/components/DigitalCodesIndexListing.js +2 -2
- package/dist/features/email/primitives.d.ts +2 -2
- package/dist/features/email/primitives.js +2 -2
- package/dist/features/events/components/EventsIndexListing.js +2 -2
- package/dist/features/events/schemas/firestore.d.ts +4 -0
- package/dist/features/layout/BackToTop.d.ts +6 -1
- package/dist/features/layout/BackToTop.js +31 -6
- package/dist/features/live/components/LiveItemsIndexListing.js +2 -2
- package/dist/features/media/MediaVideo.js +5 -1
- package/dist/features/pre-orders/components/PreOrdersIndexListing.js +2 -2
- package/dist/features/products/components/AuctionsIndexListing.js +2 -2
- package/dist/features/products/components/PrizeDrawsIndexListing.js +2 -2
- package/dist/features/products/components/ProductsIndexListing.js +2 -2
- package/dist/features/products/constants/action-defs.d.ts +2 -0
- package/dist/features/products/constants/action-defs.js +2 -0
- package/dist/features/products/schemas/firestore.d.ts +4 -0
- package/dist/features/promotions/components/CouponsIndexListing.js +2 -2
- package/dist/features/reviews/components/ReviewsIndexListing.js +2 -2
- package/dist/features/seller/actions/seller-actions.js +11 -6
- package/dist/features/seller/components/SellerAddressesView.js +2 -2
- package/dist/features/seller/components/SellerBidsView.js +2 -2
- package/dist/features/seller/components/SellerOrdersView.js +2 -2
- package/dist/features/seller/components/SellerProductsView.js +2 -2
- package/dist/features/seller/components/SellerSidebar.d.ts +3 -1
- package/dist/features/seller/components/SellerSidebar.js +9 -8
- package/dist/features/seller/components/SellerStoreCategoriesView.js +2 -2
- package/dist/features/seller/components/SellerTemplatesView.js +2 -2
- package/dist/features/shell/StepForm.js +4 -4
- package/dist/features/stores/actions/store-query-actions.d.ts +5 -4
- package/dist/features/stores/actions/store-query-actions.js +11 -8
- package/dist/features/stores/components/StoreAuctionsListing.js +2 -2
- package/dist/features/stores/components/StoreClassifiedsListing.js +2 -2
- package/dist/features/stores/components/StoreDigitalCodesListing.js +2 -2
- package/dist/features/stores/components/StoreLiveItemsListing.js +2 -2
- package/dist/features/stores/components/StorePreOrdersListing.js +2 -2
- package/dist/features/stores/components/StoreProductsListing.js +2 -2
- package/dist/features/stores/components/StoreReviewsListing.js +2 -2
- package/dist/features/stores/components/StoresIndexListing.js +2 -2
- package/dist/features/stores/schemas/firestore.d.ts +4 -0
- package/dist/features/tester/actions/checklist-item-actions.d.ts +69 -0
- package/dist/features/tester/actions/checklist-item-actions.js +42 -0
- package/dist/features/tester/actions/index.d.ts +1 -0
- package/dist/features/tester/actions/index.js +1 -0
- package/dist/features/tester/components/AdminTesterFeedbackIssuesView.d.ts +2 -0
- package/dist/features/tester/components/AdminTesterFeedbackIssuesView.js +22 -0
- package/dist/features/tester/components/AdminTesterFeedbackListView.d.ts +3 -0
- package/dist/features/tester/components/AdminTesterFeedbackListView.js +100 -0
- package/dist/features/tester/components/AdminTesterFeedbackReportView.d.ts +2 -0
- package/dist/features/tester/components/AdminTesterFeedbackReportView.js +30 -0
- package/dist/features/tester/components/AdminTesterFeedbackView.d.ts +2 -0
- package/dist/features/tester/components/AdminTesterFeedbackView.js +9 -0
- package/dist/features/tester/components/TesterChecklistStepRow.d.ts +18 -0
- package/dist/features/tester/components/TesterChecklistStepRow.js +29 -0
- package/dist/features/tester/components/TesterFeedbackChart.d.ts +14 -0
- package/dist/features/tester/components/TesterFeedbackChart.js +18 -0
- package/dist/features/tester/components/TesterHubView.d.ts +5 -0
- package/dist/features/tester/components/TesterHubView.js +71 -0
- package/dist/features/tester/components/index.d.ts +11 -0
- package/dist/features/tester/components/index.js +7 -0
- package/dist/features/tester/index.d.ts +2 -0
- package/dist/features/tester/index.js +2 -0
- package/dist/features/tester/repository/index.d.ts +2 -0
- package/dist/features/tester/repository/index.js +2 -0
- package/dist/features/tester/repository/tester-checklist-item.repository.d.ts +13 -0
- package/dist/features/tester/repository/tester-checklist-item.repository.js +55 -0
- package/dist/features/tester/repository/tester-checklist-response.repository.d.ts +42 -0
- package/dist/features/tester/repository/tester-checklist-response.repository.js +98 -0
- package/dist/features/tester/schemas/firestore.d.ts +85 -0
- package/dist/features/tester/schemas/firestore.js +93 -0
- package/dist/features/tester/schemas/index.d.ts +1 -0
- package/dist/features/tester/schemas/index.js +1 -0
- package/dist/features/tester/seed-data/blog-tester-seed-data.d.ts +2 -0
- package/dist/features/tester/seed-data/blog-tester-seed-data.js +40 -0
- package/dist/features/tester/seed-data/categories-tester-seed-data.d.ts +2 -0
- package/dist/features/tester/seed-data/categories-tester-seed-data.js +177 -0
- package/dist/features/tester/seed-data/events-tester-seed-data.d.ts +2 -0
- package/dist/features/tester/seed-data/events-tester-seed-data.js +50 -0
- package/dist/features/tester/seed-data/index.d.ts +6 -0
- package/dist/features/tester/seed-data/index.js +6 -0
- package/dist/features/tester/seed-data/products-tester-seed-data.d.ts +2 -0
- package/dist/features/tester/seed-data/products-tester-seed-data.js +151 -0
- package/dist/features/tester/seed-data/stores-tester-seed-data.d.ts +2 -0
- package/dist/features/tester/seed-data/stores-tester-seed-data.js +40 -0
- package/dist/features/tester/seed-data/tester-checklist-seed-data.d.ts +2 -0
- package/dist/features/tester/seed-data/tester-checklist-seed-data.js +248 -0
- package/dist/features/tester/seed-data/tester-ttl.d.ts +4 -0
- package/dist/features/tester/seed-data/tester-ttl.js +6 -0
- package/dist/features/tester/server.d.ts +9 -0
- package/dist/features/tester/server.js +8 -0
- package/dist/index.d.ts +28 -2
- package/dist/index.js +51 -1
- package/dist/next/api/api-response.js +5 -1
- package/dist/next/api/routeHandler.js +10 -1
- package/dist/next/middleware/chain.js +1 -1
- package/dist/next/routing/route-map.d.ts +6 -7
- package/dist/next/routing/route-map.js +3 -7
- package/dist/providers/payment-manual/index.d.ts +2 -2
- package/dist/providers/payment-manual/index.js +2 -2
- package/dist/react/contexts/SessionContext.d.ts +4 -0
- package/dist/react/contexts/SessionContext.js +4 -0
- package/dist/repositories/index.d.ts +4 -0
- package/dist/repositories/index.js +3 -0
- package/dist/security/pii-encrypt.js +12 -2
- package/dist/seed/addresses-seed-data.js +1 -1
- package/dist/seed/bids-seed-data.js +1 -1
- package/dist/seed/blog-posts-seed-data.js +1 -1
- package/dist/seed/carousel-slides-seed-data.js +22 -16
- package/dist/seed/carousels-seed-data.js +1 -1
- package/dist/seed/cart-seed-data.js +1 -1
- package/dist/seed/categories-seed-data.js +1 -1
- package/dist/seed/claimed-coupons-seed-data.js +1 -1
- package/dist/seed/conversations-seed-data.js +1 -1
- package/dist/seed/coupon-usage-seed-data.js +1 -1
- package/dist/seed/coupons-seed-data.js +1 -1
- package/dist/seed/events-seed-data.js +1 -1
- package/dist/seed/faq-seed-data.js +119 -3
- package/dist/seed/grouped-listings-seed-data.d.ts +2 -0
- package/dist/seed/grouped-listings-seed-data.js +1 -1
- package/dist/seed/history-seed-data.js +1 -1
- package/dist/seed/homepage-sections-seed-data.js +1 -1
- package/dist/seed/index.d.ts +2 -2
- package/dist/seed/index.js +7 -3
- package/dist/seed/lottery-entries-seed-data.js +1 -1
- package/dist/seed/manifest.d.ts +4 -3
- package/dist/seed/manifest.js +13 -6
- package/dist/seed/notifications-seed-data.js +1 -1
- package/dist/seed/offers-seed-data.js +1 -1
- package/dist/seed/orders-seed-data.js +1 -1
- package/dist/seed/payouts-seed-data.js +1 -1
- package/dist/seed/products-art-seed-data.js +1 -1
- package/dist/seed/products-auctions-seed-data.js +1 -1
- package/dist/seed/products-classifieds-seed-data.js +1 -1
- package/dist/seed/products-digital-codes-seed-data.js +1 -1
- package/dist/seed/products-live-items-seed-data.js +1 -1
- package/dist/seed/products-preorders-seed-data.d.ts +2 -0
- package/dist/seed/products-preorders-seed-data.js +1 -1
- package/dist/seed/products-prize-draws-seed-data.js +1 -1
- package/dist/seed/products-standard-seed-data.js +1 -1
- package/dist/seed/products-stickers-seed-data.js +1 -1
- package/dist/seed/reviews-seed-data.js +1 -1
- package/dist/seed/scammers-seed-data.js +1 -1
- package/dist/seed/sessions-seed-data.js +1 -1
- package/dist/seed/site-settings-seed-data.js +22 -16
- package/dist/seed/store-addresses-seed-data.js +1 -1
- package/dist/seed/store-extensions-seed-data.js +1 -1
- package/dist/seed/stores-seed-data.js +1 -1
- package/dist/seed/support-tickets-seed-data.js +1 -1
- package/dist/seed/tester-checklist-seed-data.d.ts +2 -0
- package/dist/seed/tester-checklist-seed-data.js +248 -0
- package/dist/seed/users-seed-data.js +1 -1
- package/dist/seed/wishlists-seed-data.js +1 -1
- package/dist/server.d.ts +7 -2
- package/dist/server.js +19 -12
- package/dist/styles.css +163 -147
- package/dist/tailwind-utilities.css +1 -1
- package/dist/tokens/color-pairs.d.ts +46 -0
- package/dist/tokens/color-pairs.js +93 -0
- package/dist/tokens/index.d.ts +60 -60
- package/dist/tokens/index.js +30 -30
- package/dist/tokens/themes/cobalt-night.d.ts +3 -2
- package/dist/tokens/themes/cobalt-night.js +3 -2
- package/dist/tokens/themes/default-dark.d.ts +4 -1
- package/dist/tokens/themes/default-dark.js +44 -41
- package/dist/tokens/themes/default-light.d.ts +5 -1
- package/dist/tokens/themes/default-light.js +39 -35
- package/dist/tokens/themes/sunset.js +4 -4
- package/dist/tokens/tokens.css +110 -104
- package/dist/ui/components/CollapsibleSection.d.ts +15 -0
- package/dist/ui/components/CollapsibleSection.js +13 -0
- package/dist/ui/components/ListingToolbar.js +2 -1
- package/dist/ui/components/Semantic.style.css +3 -3
- package/dist/ui/components/SideDrawer.style.css +19 -19
- package/dist/ui/components/Slider.js +1 -1
- package/dist/ui/components/StickyToolbar.d.ts +36 -7
- package/dist/ui/components/StickyToolbar.js +63 -5
- package/dist/ui/components/Tabs.js +17 -1
- package/dist/ui/components/Tabs.style.css +10 -0
- package/dist/ui/components/Typography.js +7 -0
- package/dist/ui/components/surface-tokens.d.ts +0 -7
- package/dist/ui/components/surface-tokens.js +7 -0
- package/dist/ui/index.d.ts +6 -0
- package/dist/ui/index.js +3 -0
- package/dist/ui/rich-text/RichText.style.css +20 -20
- package/dist/utils/id-generators.d.ts +13 -0
- package/dist/utils/id-generators.js +17 -0
- package/package.json +1 -1
- package/scripts/seed-cli-loader.mjs +15 -0
- package/scripts/seed-cli.mjs +71 -17
|
@@ -56,6 +56,8 @@ export { onScamReportCreateHandler } from "./onScamReportCreate";
|
|
|
56
56
|
export { onScamReportUpdateHandler } from "./onScamReportUpdate";
|
|
57
57
|
// SB-UNI-Y-1 — 30-day draft prune
|
|
58
58
|
export { draftPruneHandler } from "./draftPrune";
|
|
59
|
+
// Tester program — 7-day auto-expiry sweep for the shared admin-seeded test sandbox
|
|
60
|
+
export { testerSandboxCleanupHandler } from "./testerSandboxCleanup";
|
|
59
61
|
// EMI — installment reminder + overdue-flagging sweep
|
|
60
62
|
export { emiInstallmentReminderHandler } from "./emiInstallmentReminder";
|
|
61
63
|
// Procurement Shipments — 3-function recompute cascade (item→lot, lot/header→shipment allocation, cascade-delete)
|
|
@@ -39,6 +39,8 @@ export declare const JOB_ERROR_MESSAGES: {
|
|
|
39
39
|
export declare const CART_TTL_DAYS = 60;
|
|
40
40
|
/** Default Notification TTL in days (matches functions/config/constants). */
|
|
41
41
|
export declare const NOTIFICATION_TTL_DAYS = 30;
|
|
42
|
+
/** Tester sandbox TTL in days — matches testDataExpiresAt() in features/tester/seed-data/tester-ttl.ts. */
|
|
43
|
+
export declare const TESTER_SANDBOX_TTL_DAYS = 7;
|
|
42
44
|
/** Firestore batch write hard ceiling. */
|
|
43
45
|
export declare const BATCH_LIMIT = 500;
|
|
44
46
|
/** Firestore single-query soft ceiling for reconcile sweeps. */
|
|
@@ -39,6 +39,8 @@ export const JOB_ERROR_MESSAGES = {
|
|
|
39
39
|
export const CART_TTL_DAYS = 60;
|
|
40
40
|
/** Default Notification TTL in days (matches functions/config/constants). */
|
|
41
41
|
export const NOTIFICATION_TTL_DAYS = 30;
|
|
42
|
+
/** Tester sandbox TTL in days — matches testDataExpiresAt() in features/tester/seed-data/tester-ttl.ts. */
|
|
43
|
+
export const TESTER_SANDBOX_TTL_DAYS = 7;
|
|
42
44
|
/** Firestore batch write hard ceiling. */
|
|
43
45
|
export const BATCH_LIMIT = 500;
|
|
44
46
|
/** Firestore single-query soft ceiling for reconcile sweeps. */
|
|
@@ -28,7 +28,7 @@ import type { CategoryType } from "../../../features/categories/types/index";
|
|
|
28
28
|
/** What KIND of action — drives default UI affordance (link vs button vs danger). */
|
|
29
29
|
export type ActionKind = "primary" | "secondary" | "danger" | "ghost" | "link" | "chip";
|
|
30
30
|
/** Resource bucket — keyed top-level in the ACTIONS tree. */
|
|
31
|
-
export type ActionResource = "PRODUCT" | "AUCTION" | "PRE_ORDER" | "PRIZE_DRAW" | "CLASSIFIED" | "DIGITAL_CODE" | "LIVE" | "BUNDLE" | "GROUP" | "CATEGORY" | "BRAND" | "SUBLISTING" | "STORE" | "BLOG" | "EVENT" | "SHIPMENT" | "CATALOGUE" | "USER" | "SELLER" | "ADMIN" | "CART" | "CHECKOUT" | "NAV" | "MEDIA" | "SUPPORT" | "LOTTERY";
|
|
31
|
+
export type ActionResource = "PRODUCT" | "AUCTION" | "PRE_ORDER" | "PRIZE_DRAW" | "CLASSIFIED" | "DIGITAL_CODE" | "LIVE" | "BUNDLE" | "GROUP" | "CATEGORY" | "BRAND" | "SUBLISTING" | "STORE" | "BLOG" | "EVENT" | "SHIPMENT" | "CATALOGUE" | "USER" | "SELLER" | "ADMIN" | "CART" | "CHECKOUT" | "NAV" | "MEDIA" | "SUPPORT" | "LOTTERY" | "TESTER";
|
|
32
32
|
/** Confirmation modal config — when set, <Button action={...}> opens
|
|
33
33
|
* a confirm dialog before firing the actual handler. */
|
|
34
34
|
export interface ActionConfirmation {
|
|
@@ -1264,6 +1264,45 @@ export const ACTIONS = {
|
|
|
1264
1264
|
confirmKind: "danger",
|
|
1265
1265
|
},
|
|
1266
1266
|
},
|
|
1267
|
+
// ── Tester QA management ──────────────────────────────────────────────
|
|
1268
|
+
"mark-feedback-reviewed": {
|
|
1269
|
+
id: "admin.mark-feedback-reviewed",
|
|
1270
|
+
label: "Mark Reviewed",
|
|
1271
|
+
ariaLabel: "Mark this tester feedback as reviewed",
|
|
1272
|
+
description: "Mark a tester feedback submission as reviewed by the dev team.",
|
|
1273
|
+
kind: "secondary",
|
|
1274
|
+
permissions: ["admin"],
|
|
1275
|
+
},
|
|
1276
|
+
"create-checklist-item": {
|
|
1277
|
+
id: "admin.create-checklist-item",
|
|
1278
|
+
label: "Add Test Case",
|
|
1279
|
+
ariaLabel: "Add a new tester checklist item",
|
|
1280
|
+
description: "Create a new test case in the tester QA checklist catalog.",
|
|
1281
|
+
kind: "primary",
|
|
1282
|
+
permissions: ["admin"],
|
|
1283
|
+
},
|
|
1284
|
+
"edit-checklist-item": {
|
|
1285
|
+
id: "admin.edit-checklist-item",
|
|
1286
|
+
label: "Edit",
|
|
1287
|
+
ariaLabel: "Edit this tester checklist item",
|
|
1288
|
+
description: "Edit an existing test case in the tester QA checklist catalog.",
|
|
1289
|
+
kind: "secondary",
|
|
1290
|
+
permissions: ["admin"],
|
|
1291
|
+
},
|
|
1292
|
+
"delete-checklist-item": {
|
|
1293
|
+
id: "admin.delete-checklist-item",
|
|
1294
|
+
label: "Delete",
|
|
1295
|
+
ariaLabel: "Delete this tester checklist item",
|
|
1296
|
+
description: "Permanently delete a test case from the tester QA checklist catalog.",
|
|
1297
|
+
kind: "danger",
|
|
1298
|
+
permissions: ["admin"],
|
|
1299
|
+
confirmation: {
|
|
1300
|
+
title: "Delete this checklist item?",
|
|
1301
|
+
body: "This test case will be permanently removed from the tester QA checklist. Any tester answers already recorded for it are kept, but the item will no longer appear on the Tester Hub.",
|
|
1302
|
+
confirmLabel: "Delete",
|
|
1303
|
+
confirmKind: "danger",
|
|
1304
|
+
},
|
|
1305
|
+
},
|
|
1267
1306
|
"resend-notification": {
|
|
1268
1307
|
id: "admin.resend-notification",
|
|
1269
1308
|
label: "Resend",
|
|
@@ -1991,6 +2030,15 @@ export const ACTIONS = {
|
|
|
1991
2030
|
},
|
|
1992
2031
|
},
|
|
1993
2032
|
},
|
|
2033
|
+
TESTER: {
|
|
2034
|
+
"save-note": {
|
|
2035
|
+
id: "tester.save-note",
|
|
2036
|
+
label: "Save Note",
|
|
2037
|
+
ariaLabel: "Save comment and screenshot for this step",
|
|
2038
|
+
description: "Save your comment and screenshot for this checklist step.",
|
|
2039
|
+
kind: "primary",
|
|
2040
|
+
},
|
|
2041
|
+
},
|
|
1994
2042
|
LOTTERY: {
|
|
1995
2043
|
"pull": {
|
|
1996
2044
|
id: "lottery.pull",
|
|
@@ -9,21 +9,21 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export { COLORS, RADIUS, SHADOWS, Z_INDEX, LAYOUT, FLUID_GRID_MIN_WIDTHS, LOCALE_CONFIG, TOKENS, token, } from "../../../tokens/index";
|
|
11
11
|
export declare const SEMANTIC_COLORS: {
|
|
12
|
-
readonly primary: "#
|
|
13
|
-
readonly primaryMuted: "#
|
|
12
|
+
readonly primary: "#0d9488";
|
|
13
|
+
readonly primaryMuted: "#ccfbf1";
|
|
14
14
|
readonly onPrimary: "#ffffff";
|
|
15
|
-
readonly secondary: "#
|
|
16
|
-
readonly secondaryMuted: "#
|
|
15
|
+
readonly secondary: "#c026d3";
|
|
16
|
+
readonly secondaryMuted: "#fae8ff";
|
|
17
17
|
readonly onSecondary: "#ffffff";
|
|
18
18
|
readonly accent: "#8393b2";
|
|
19
19
|
readonly onAccent: "#ffffff";
|
|
20
|
-
readonly success: "#
|
|
20
|
+
readonly success: "#15803d";
|
|
21
21
|
readonly onSuccess: "#ffffff";
|
|
22
|
-
readonly warning: "#
|
|
22
|
+
readonly warning: "#b45309";
|
|
23
23
|
readonly onWarning: "#ffffff";
|
|
24
|
-
readonly danger: "#
|
|
24
|
+
readonly danger: "#b91c1c";
|
|
25
25
|
readonly onDanger: "#ffffff";
|
|
26
|
-
readonly info: "#
|
|
26
|
+
readonly info: "#0369a1";
|
|
27
27
|
readonly onInfo: "#ffffff";
|
|
28
28
|
readonly surface: "#ffffff";
|
|
29
29
|
readonly surfaceMuted: "#f8fafc";
|
|
@@ -47,11 +47,11 @@ export declare const SEMANTIC_COLORS: {
|
|
|
47
47
|
* Admin theme overrides (siteSettings.theme.*Dark) layer on top.
|
|
48
48
|
*/
|
|
49
49
|
export declare const SEMANTIC_COLORS_DARK: {
|
|
50
|
-
readonly primary: "#
|
|
51
|
-
readonly primaryMuted: "#
|
|
50
|
+
readonly primary: "#0d9488";
|
|
51
|
+
readonly primaryMuted: "#042f2e";
|
|
52
52
|
readonly onPrimary: "#0f172a";
|
|
53
|
-
readonly secondary: "#
|
|
54
|
-
readonly secondaryMuted: "#
|
|
53
|
+
readonly secondary: "#c026d3";
|
|
54
|
+
readonly secondaryMuted: "#4a044e";
|
|
55
55
|
readonly onSecondary: "#0f172a";
|
|
56
56
|
readonly accent: "#adb9cf";
|
|
57
57
|
readonly onAccent: "#0f172a";
|
package/dist/client.d.ts
CHANGED
|
@@ -53,6 +53,10 @@ export { LoginRequiredModal } from "./ui/components/LoginRequiredModal";
|
|
|
53
53
|
export type { LoginRequiredModalProps } from "./ui/components/LoginRequiredModal";
|
|
54
54
|
export { isAuthError } from "./utils/auth-error";
|
|
55
55
|
export { useToast } from "./ui/components/Toast";
|
|
56
|
+
export { StickyToolbar } from "./ui/components/StickyToolbar";
|
|
57
|
+
export type { StickyToolbarProps, StickyToolbarOffset, StickyToolbarTone, StickyToolbarPadding, } from "./ui/components/StickyToolbar";
|
|
58
|
+
export { CollapsibleSection } from "./ui/components/CollapsibleSection";
|
|
59
|
+
export type { CollapsibleSectionProps } from "./ui/components/CollapsibleSection";
|
|
56
60
|
export { useAuth } from "./react/contexts/SessionContext";
|
|
57
61
|
export { useCamera } from "./react/hooks/useCamera";
|
|
58
62
|
export { useClickOutside } from "./react/hooks/useClickOutside";
|
|
@@ -156,8 +160,8 @@ export { ZodSetup } from "./validation/ZodSetup";
|
|
|
156
160
|
export type { ZodSetupProps } from "./validation/ZodSetup";
|
|
157
161
|
export { AdminSidebar } from "./features/admin/components/AdminSidebar";
|
|
158
162
|
export type { AdminSidebarProps, AdminNavItem, AdminNavGroup } from "./features/admin/components/AdminSidebar";
|
|
159
|
-
export { AdminDashboardView, AdminAnalyticsView, AdminPrizeDrawsView, AdminCarouselView, AdminSublistingCategoriesView, AdminFulfillmentView, DataTable, DataListingView, useAdminListingData, toRecordArray, toStringValue, toRelativeDate, toRupees } from "./features/admin/index";
|
|
160
|
-
export type { AdminDashboardViewProps, AdminAnalyticsViewProps, AdminAnalyticsViewLabels, AdminPrizeDrawsViewProps, AdminCarouselViewProps, AdminFulfillmentViewProps, AdminListingScaffoldRow, ListingViewConfig } from "./features/admin/index";
|
|
163
|
+
export { AdminDashboardView, AdminAnalyticsView, AdminPageViewsReportView, AdminPrizeDrawsView, AdminCarouselView, AdminSublistingCategoriesView, AdminFulfillmentView, DataTable, DataListingView, useAdminListingData, toRecordArray, toStringValue, toRelativeDate, toRupees } from "./features/admin/index";
|
|
164
|
+
export type { AdminDashboardViewProps, AdminAnalyticsViewProps, AdminAnalyticsViewLabels, AdminPageViewsReportViewProps, AdminPrizeDrawsViewProps, AdminCarouselViewProps, AdminFulfillmentViewProps, AdminListingScaffoldRow, ListingViewConfig } from "./features/admin/index";
|
|
161
165
|
export type { BulkActionItem } from "./ui/components/BulkActionBar";
|
|
162
166
|
export { ADMIN_ENDPOINTS } from "./constants/index";
|
|
163
167
|
export { SELLER_ENDPOINTS } from "./constants/index";
|
|
@@ -171,11 +175,19 @@ export type { CouponsIndexListingProps } from "./features/promotions/components/
|
|
|
171
175
|
export { NotificationBell } from "./features/account/components/NotificationBell";
|
|
172
176
|
export { NotificationPreferencesPanel } from "./features/account/components/NotificationPreferencesPanel";
|
|
173
177
|
export type { NotificationPreferencesPanelProps } from "./features/account/components/NotificationPreferencesPanel";
|
|
178
|
+
export { LinkedAccountsSection } from "./features/account/components/LinkedAccountsSection";
|
|
179
|
+
export type { LinkedAccountsSectionProps } from "./features/account/components/LinkedAccountsSection";
|
|
180
|
+
export { useCollapsedSections } from "./features/account/hooks/useCollapsedSections";
|
|
181
|
+
export type { UseCollapsedSectionsOptions, UseCollapsedSectionsResult, } from "./features/account/hooks/useCollapsedSections";
|
|
182
|
+
export { PageViewTracker } from "./features/analytics/components/PageViewTracker";
|
|
183
|
+
export type { PageViewTrackerProps } from "./features/analytics/components/PageViewTracker";
|
|
184
|
+
export { PAGE_VIEW_ENTITY_TYPES } from "./features/analytics/types";
|
|
185
|
+
export type { PageViewEntityType } from "./features/analytics/types";
|
|
174
186
|
export { AuctionBidsTable } from "./features/auctions/components/AuctionBidsTable";
|
|
175
187
|
export type { AuctionBidsTableProps, AuctionWithBids } from "./features/auctions/components/AuctionBidsTable";
|
|
176
188
|
export { ProtectedRoute, AuthStatusPanel, ForgotPasswordView, LoginForm, RegisterForm, ResetPasswordView, VerifyEmailView } from "./features/auth/index";
|
|
177
189
|
export type { AuthGuardUser, ForgotPasswordViewProps, LoginFormProps, LoginFormValues, RegisterFormProps, RegisterFormValues, ResetPasswordViewProps, VerifyEmailViewProps, } from "./features/auth/index";
|
|
178
|
-
export { useLogout, useLogin, useGoogleLogin, useRegister, useForgotPassword, useResetPassword, useVerifyEmail, useChangePassword, useChangeEmail } from "./features/auth/index";
|
|
190
|
+
export { useLogout, useLogin, useGoogleLogin, useLinkGoogleAccount, useRegister, useForgotPassword, useResetPassword, useVerifyEmail, useChangePassword, useChangeEmail } from "./features/auth/index";
|
|
179
191
|
export type { LoginCredentials, RegisterData, ForgotPasswordData, ResetPasswordData, VerifyEmailData, ChangePasswordData, ChangeEmailData } from "./features/auth/index";
|
|
180
192
|
export { CartView, CartItemRow, CartSummary, CartDrawer, CheckoutView, CheckoutSuccessView, CheckoutAddressStep, useGuestCart, useCartCount, useAddToCart, useCart, useGuestCartMerge, useCartQuery } from "./features/cart/index";
|
|
181
193
|
export type { CartItem, CartItemMeta, CartData, GuestCartItem } from "./features/cart/index";
|
package/dist/client.js
CHANGED
|
@@ -75,6 +75,10 @@ export { isAuthError } from "./utils/auth-error";
|
|
|
75
75
|
// useToast - React hook for use toast.
|
|
76
76
|
export { useToast } from "./ui/components/Toast";
|
|
77
77
|
// [CLIENT-ONLY]-Cannot run in SSR mode â€" uses browser-only APIs (window, navigator, localStorage, matchMedia, DOM events) that do not exist in Node.js.
|
|
78
|
+
// StickyToolbar - sticky translucent bar under the AppLayoutShell header, with a client-side dismiss/collapse toggle.
|
|
79
|
+
export { StickyToolbar } from "./ui/components/StickyToolbar";
|
|
80
|
+
export { CollapsibleSection } from "./ui/components/CollapsibleSection";
|
|
81
|
+
// [CLIENT-ONLY]-Cannot run in SSR mode â€" uses browser-only APIs (window, navigator, localStorage, matchMedia, DOM events) that do not exist in Node.js.
|
|
78
82
|
// useAuth - React hook for use auth.
|
|
79
83
|
export { useAuth } from "./react/contexts/SessionContext";
|
|
80
84
|
// [CLIENT-ONLY]-Cannot run in SSR mode â€" uses browser-only APIs (window, navigator, localStorage, matchMedia, DOM events) that do not exist in Node.js.
|
|
@@ -200,7 +204,7 @@ export { Search } from "./features/search/components";
|
|
|
200
204
|
export { ToastProvider, SkipToMain, NavigationLoader } from "./ui/index";
|
|
201
205
|
export { ZodSetup } from "./validation/ZodSetup";
|
|
202
206
|
export { AdminSidebar } from "./features/admin/components/AdminSidebar";
|
|
203
|
-
export { AdminDashboardView, AdminAnalyticsView, AdminPrizeDrawsView, AdminCarouselView, AdminSublistingCategoriesView, AdminFulfillmentView, DataTable, DataListingView, useAdminListingData, toRecordArray, toStringValue, toRelativeDate, toRupees } from "./features/admin/index";
|
|
207
|
+
export { AdminDashboardView, AdminAnalyticsView, AdminPageViewsReportView, AdminPrizeDrawsView, AdminCarouselView, AdminSublistingCategoriesView, AdminFulfillmentView, DataTable, DataListingView, useAdminListingData, toRecordArray, toStringValue, toRelativeDate, toRupees } from "./features/admin/index";
|
|
204
208
|
export { ADMIN_ENDPOINTS } from "./constants/index";
|
|
205
209
|
export { SELLER_ENDPOINTS } from "./constants/index";
|
|
206
210
|
// P-16 — Tour system (driver.js-backed onboarding walkthrough).
|
|
@@ -210,9 +214,13 @@ export { UserSidebar } from "./features/account/components/UserSidebar";
|
|
|
210
214
|
export { CouponsIndexListing } from "./features/promotions/components/CouponsIndexListing";
|
|
211
215
|
export { NotificationBell } from "./features/account/components/NotificationBell";
|
|
212
216
|
export { NotificationPreferencesPanel } from "./features/account/components/NotificationPreferencesPanel";
|
|
217
|
+
export { LinkedAccountsSection } from "./features/account/components/LinkedAccountsSection";
|
|
218
|
+
export { useCollapsedSections } from "./features/account/hooks/useCollapsedSections";
|
|
219
|
+
export { PageViewTracker } from "./features/analytics/components/PageViewTracker";
|
|
220
|
+
export { PAGE_VIEW_ENTITY_TYPES } from "./features/analytics/types";
|
|
213
221
|
export { AuctionBidsTable } from "./features/auctions/components/AuctionBidsTable";
|
|
214
222
|
export { ProtectedRoute, AuthStatusPanel, ForgotPasswordView, LoginForm, RegisterForm, ResetPasswordView, VerifyEmailView } from "./features/auth/index";
|
|
215
|
-
export { useLogout, useLogin, useGoogleLogin, useRegister, useForgotPassword, useResetPassword, useVerifyEmail, useChangePassword, useChangeEmail } from "./features/auth/index";
|
|
223
|
+
export { useLogout, useLogin, useGoogleLogin, useLinkGoogleAccount, useRegister, useForgotPassword, useResetPassword, useVerifyEmail, useChangePassword, useChangeEmail } from "./features/auth/index";
|
|
216
224
|
export { CartView, CartItemRow, CartSummary, CartDrawer, CheckoutView, CheckoutSuccessView, CheckoutAddressStep, useGuestCart, useCartCount, useAddToCart, useCart, useGuestCartMerge, useCartQuery } from "./features/cart/index";
|
|
217
225
|
export { useAddresses, useCreateAddress, useUpdateAddress, useDeleteAddress, useSetDefaultAddress, useAddress } from "./features/account/index";
|
|
218
226
|
export { AddressBook, AddressCard, AddressForm } from "./features/account/index";
|
|
@@ -63,6 +63,9 @@ export declare const ACCOUNT_ENDPOINTS: {
|
|
|
63
63
|
readonly CATALOGUE_LIST: (id: string) => string;
|
|
64
64
|
readonly CATALOGUE_SUBMIT: (id: string) => string;
|
|
65
65
|
readonly PUBLIC_CATALOGUE: (ownerSlug: string) => string;
|
|
66
|
+
/** Tester Hub — GET active checklist items joined with the tester's own responses; PUT upserts one item's answer/comment/screenshot. */
|
|
67
|
+
readonly TESTER_CHECKLIST: "/api/user/tester-checklist";
|
|
68
|
+
readonly TESTER_CHECKLIST_ITEM_BY_ID: (checklistItemId: string) => string;
|
|
66
69
|
};
|
|
67
70
|
export declare const CONVERSATION_ENDPOINTS: {
|
|
68
71
|
readonly LIST: "/api/user/conversations";
|
|
@@ -82,6 +85,7 @@ export declare const ADMIN_ENDPOINTS: {
|
|
|
82
85
|
readonly STATS: "/api/admin/stats";
|
|
83
86
|
readonly DASHBOARD: "/api/admin/dashboard";
|
|
84
87
|
readonly ANALYTICS: "/api/admin/analytics";
|
|
88
|
+
readonly ANALYTICS_PAGE_VIEWS: "/api/admin/analytics/pageviews";
|
|
85
89
|
readonly ADS: "/api/admin/ads";
|
|
86
90
|
readonly AD_BY_ID: (id: string) => string;
|
|
87
91
|
readonly REALTIME_TOKEN: "/api/realtime/token";
|
|
@@ -110,6 +114,11 @@ export declare const ADMIN_ENDPOINTS: {
|
|
|
110
114
|
readonly BRAND_BY_ID: (id: string) => string;
|
|
111
115
|
readonly FAQS: "/api/admin/faqs";
|
|
112
116
|
readonly FAQ_BY_ID: (id: string) => string;
|
|
117
|
+
readonly TESTER_CHECKLIST_ITEMS: "/api/admin/tester-checklist-items";
|
|
118
|
+
readonly TESTER_CHECKLIST_ITEM_BY_ID: (id: string) => string;
|
|
119
|
+
readonly TESTER_FEEDBACK: "/api/admin/tester-feedback";
|
|
120
|
+
readonly TESTER_FEEDBACK_BY_ID: (id: string) => string;
|
|
121
|
+
readonly TESTER_FEEDBACK_REPORT: "/api/admin/tester-feedback/report";
|
|
113
122
|
readonly STORES: "/api/admin/stores";
|
|
114
123
|
readonly STORE_BY_ID: (uid: string) => string;
|
|
115
124
|
readonly PAYOUTS: "/api/admin/payouts";
|
|
@@ -280,6 +289,9 @@ export declare const HOMEPAGE_ENDPOINTS: {
|
|
|
280
289
|
export declare const LOYALTY_ENDPOINTS: {
|
|
281
290
|
readonly BALANCE: (uid: string) => string;
|
|
282
291
|
};
|
|
292
|
+
export declare const ANALYTICS_ENDPOINTS: {
|
|
293
|
+
readonly PAGE_VIEW: "/api/analytics/pageview";
|
|
294
|
+
};
|
|
283
295
|
export declare const MEDIA_ENDPOINTS: {
|
|
284
296
|
readonly BASE: "/api/media";
|
|
285
297
|
readonly SIGN: "/api/media/sign";
|
|
@@ -430,10 +442,6 @@ export declare const SCAMMER_ENDPOINTS: {
|
|
|
430
442
|
export declare const BEFORE_AFTER_ENDPOINTS: {
|
|
431
443
|
readonly LIST: "/api/before-after";
|
|
432
444
|
};
|
|
433
|
-
export declare const DEMO_ENDPOINTS: {
|
|
434
|
-
readonly SEED: "/api/demo/seed";
|
|
435
|
-
readonly SEED_EVENT_INIT: "/api/demo/seed/event/init";
|
|
436
|
-
};
|
|
437
445
|
export declare const WHATSAPP_SELLER_ENDPOINTS: {
|
|
438
446
|
readonly SETTINGS: "/api/store/whatsapp-settings";
|
|
439
447
|
readonly CATALOG_SYNC: "/api/store/whatsapp-settings/catalog-sync";
|
|
@@ -497,6 +505,9 @@ export declare const API_ENDPOINTS: {
|
|
|
497
505
|
readonly CATALOGUE_LIST: (id: string) => string;
|
|
498
506
|
readonly CATALOGUE_SUBMIT: (id: string) => string;
|
|
499
507
|
readonly PUBLIC_CATALOGUE: (ownerSlug: string) => string;
|
|
508
|
+
/** Tester Hub — GET active checklist items joined with the tester's own responses; PUT upserts one item's answer/comment/screenshot. */
|
|
509
|
+
readonly TESTER_CHECKLIST: "/api/user/tester-checklist";
|
|
510
|
+
readonly TESTER_CHECKLIST_ITEM_BY_ID: (checklistItemId: string) => string;
|
|
500
511
|
};
|
|
501
512
|
readonly CONVERSATIONS: {
|
|
502
513
|
readonly LIST: "/api/user/conversations";
|
|
@@ -516,6 +527,7 @@ export declare const API_ENDPOINTS: {
|
|
|
516
527
|
readonly STATS: "/api/admin/stats";
|
|
517
528
|
readonly DASHBOARD: "/api/admin/dashboard";
|
|
518
529
|
readonly ANALYTICS: "/api/admin/analytics";
|
|
530
|
+
readonly ANALYTICS_PAGE_VIEWS: "/api/admin/analytics/pageviews";
|
|
519
531
|
readonly ADS: "/api/admin/ads";
|
|
520
532
|
readonly AD_BY_ID: (id: string) => string;
|
|
521
533
|
readonly REALTIME_TOKEN: "/api/realtime/token";
|
|
@@ -544,6 +556,11 @@ export declare const API_ENDPOINTS: {
|
|
|
544
556
|
readonly BRAND_BY_ID: (id: string) => string;
|
|
545
557
|
readonly FAQS: "/api/admin/faqs";
|
|
546
558
|
readonly FAQ_BY_ID: (id: string) => string;
|
|
559
|
+
readonly TESTER_CHECKLIST_ITEMS: "/api/admin/tester-checklist-items";
|
|
560
|
+
readonly TESTER_CHECKLIST_ITEM_BY_ID: (id: string) => string;
|
|
561
|
+
readonly TESTER_FEEDBACK: "/api/admin/tester-feedback";
|
|
562
|
+
readonly TESTER_FEEDBACK_BY_ID: (id: string) => string;
|
|
563
|
+
readonly TESTER_FEEDBACK_REPORT: "/api/admin/tester-feedback/report";
|
|
547
564
|
readonly STORES: "/api/admin/stores";
|
|
548
565
|
readonly STORE_BY_ID: (uid: string) => string;
|
|
549
566
|
readonly PAYOUTS: "/api/admin/payouts";
|
|
@@ -717,6 +734,9 @@ export declare const API_ENDPOINTS: {
|
|
|
717
734
|
readonly LOYALTY: {
|
|
718
735
|
readonly BALANCE: (uid: string) => string;
|
|
719
736
|
};
|
|
737
|
+
readonly ANALYTICS: {
|
|
738
|
+
readonly PAGE_VIEW: "/api/analytics/pageview";
|
|
739
|
+
};
|
|
720
740
|
readonly MEDIA: {
|
|
721
741
|
readonly BASE: "/api/media";
|
|
722
742
|
readonly SIGN: "/api/media/sign";
|
|
@@ -851,10 +871,6 @@ export declare const API_ENDPOINTS: {
|
|
|
851
871
|
readonly PRODUCTS: (sellerId: string) => string;
|
|
852
872
|
readonly REVIEWS: (userId: string) => string;
|
|
853
873
|
};
|
|
854
|
-
readonly DEMO: {
|
|
855
|
-
readonly SEED: "/api/demo/seed";
|
|
856
|
-
readonly SEED_EVENT_INIT: "/api/demo/seed/event/init";
|
|
857
|
-
};
|
|
858
874
|
readonly WHATSAPP_SELLER: {
|
|
859
875
|
readonly SETTINGS: "/api/store/whatsapp-settings";
|
|
860
876
|
readonly CATALOG_SYNC: "/api/store/whatsapp-settings/catalog-sync";
|
|
@@ -933,6 +949,9 @@ export declare const API_ROUTES: {
|
|
|
933
949
|
readonly CATALOGUE_LIST: (id: string) => string;
|
|
934
950
|
readonly CATALOGUE_SUBMIT: (id: string) => string;
|
|
935
951
|
readonly PUBLIC_CATALOGUE: (ownerSlug: string) => string;
|
|
952
|
+
/** Tester Hub — GET active checklist items joined with the tester's own responses; PUT upserts one item's answer/comment/screenshot. */
|
|
953
|
+
readonly TESTER_CHECKLIST: "/api/user/tester-checklist";
|
|
954
|
+
readonly TESTER_CHECKLIST_ITEM_BY_ID: (checklistItemId: string) => string;
|
|
936
955
|
};
|
|
937
956
|
readonly CONVERSATIONS: {
|
|
938
957
|
readonly LIST: "/api/user/conversations";
|
|
@@ -952,6 +971,7 @@ export declare const API_ROUTES: {
|
|
|
952
971
|
readonly STATS: "/api/admin/stats";
|
|
953
972
|
readonly DASHBOARD: "/api/admin/dashboard";
|
|
954
973
|
readonly ANALYTICS: "/api/admin/analytics";
|
|
974
|
+
readonly ANALYTICS_PAGE_VIEWS: "/api/admin/analytics/pageviews";
|
|
955
975
|
readonly ADS: "/api/admin/ads";
|
|
956
976
|
readonly AD_BY_ID: (id: string) => string;
|
|
957
977
|
readonly REALTIME_TOKEN: "/api/realtime/token";
|
|
@@ -980,6 +1000,11 @@ export declare const API_ROUTES: {
|
|
|
980
1000
|
readonly BRAND_BY_ID: (id: string) => string;
|
|
981
1001
|
readonly FAQS: "/api/admin/faqs";
|
|
982
1002
|
readonly FAQ_BY_ID: (id: string) => string;
|
|
1003
|
+
readonly TESTER_CHECKLIST_ITEMS: "/api/admin/tester-checklist-items";
|
|
1004
|
+
readonly TESTER_CHECKLIST_ITEM_BY_ID: (id: string) => string;
|
|
1005
|
+
readonly TESTER_FEEDBACK: "/api/admin/tester-feedback";
|
|
1006
|
+
readonly TESTER_FEEDBACK_BY_ID: (id: string) => string;
|
|
1007
|
+
readonly TESTER_FEEDBACK_REPORT: "/api/admin/tester-feedback/report";
|
|
983
1008
|
readonly STORES: "/api/admin/stores";
|
|
984
1009
|
readonly STORE_BY_ID: (uid: string) => string;
|
|
985
1010
|
readonly PAYOUTS: "/api/admin/payouts";
|
|
@@ -1153,6 +1178,9 @@ export declare const API_ROUTES: {
|
|
|
1153
1178
|
readonly LOYALTY: {
|
|
1154
1179
|
readonly BALANCE: (uid: string) => string;
|
|
1155
1180
|
};
|
|
1181
|
+
readonly ANALYTICS: {
|
|
1182
|
+
readonly PAGE_VIEW: "/api/analytics/pageview";
|
|
1183
|
+
};
|
|
1156
1184
|
readonly MEDIA: {
|
|
1157
1185
|
readonly BASE: "/api/media";
|
|
1158
1186
|
readonly SIGN: "/api/media/sign";
|
|
@@ -1287,10 +1315,6 @@ export declare const API_ROUTES: {
|
|
|
1287
1315
|
readonly PRODUCTS: (sellerId: string) => string;
|
|
1288
1316
|
readonly REVIEWS: (userId: string) => string;
|
|
1289
1317
|
};
|
|
1290
|
-
readonly DEMO: {
|
|
1291
|
-
readonly SEED: "/api/demo/seed";
|
|
1292
|
-
readonly SEED_EVENT_INIT: "/api/demo/seed/event/init";
|
|
1293
|
-
};
|
|
1294
1318
|
readonly WHATSAPP_SELLER: {
|
|
1295
1319
|
readonly SETTINGS: "/api/store/whatsapp-settings";
|
|
1296
1320
|
readonly CATALOG_SYNC: "/api/store/whatsapp-settings/catalog-sync";
|
|
@@ -78,6 +78,9 @@ export const ACCOUNT_ENDPOINTS = {
|
|
|
78
78
|
CATALOGUE_LIST: (id) => `/api/user/catalogue/${id}/list`,
|
|
79
79
|
CATALOGUE_SUBMIT: (id) => `/api/user/catalogue/${id}/submit`,
|
|
80
80
|
PUBLIC_CATALOGUE: (ownerSlug) => `/api/catalogue/${ownerSlug}`,
|
|
81
|
+
/** Tester Hub — GET active checklist items joined with the tester's own responses; PUT upserts one item's answer/comment/screenshot. */
|
|
82
|
+
TESTER_CHECKLIST: "/api/user/tester-checklist",
|
|
83
|
+
TESTER_CHECKLIST_ITEM_BY_ID: (checklistItemId) => `/api/user/tester-checklist/${encodeURIComponent(checklistItemId)}`,
|
|
81
84
|
};
|
|
82
85
|
// ---------------------------------------------------------------------------
|
|
83
86
|
// Conversations (buyer messaging)
|
|
@@ -109,6 +112,7 @@ export const ADMIN_ENDPOINTS = {
|
|
|
109
112
|
STATS: "/api/admin/stats",
|
|
110
113
|
DASHBOARD: "/api/admin/dashboard",
|
|
111
114
|
ANALYTICS: "/api/admin/analytics",
|
|
115
|
+
ANALYTICS_PAGE_VIEWS: "/api/admin/analytics/pageviews",
|
|
112
116
|
ADS: "/api/admin/ads",
|
|
113
117
|
AD_BY_ID: (id) => `/api/admin/ads/${id}`,
|
|
114
118
|
REALTIME_TOKEN: "/api/realtime/token",
|
|
@@ -137,6 +141,11 @@ export const ADMIN_ENDPOINTS = {
|
|
|
137
141
|
BRAND_BY_ID: (id) => `/api/admin/brands/${id}`,
|
|
138
142
|
FAQS: "/api/admin/faqs",
|
|
139
143
|
FAQ_BY_ID: (id) => `/api/admin/faqs/${id}`,
|
|
144
|
+
TESTER_CHECKLIST_ITEMS: "/api/admin/tester-checklist-items",
|
|
145
|
+
TESTER_CHECKLIST_ITEM_BY_ID: (id) => `/api/admin/tester-checklist-items/${id}`,
|
|
146
|
+
TESTER_FEEDBACK: "/api/admin/tester-feedback",
|
|
147
|
+
TESTER_FEEDBACK_BY_ID: (id) => `/api/admin/tester-feedback/${id}`,
|
|
148
|
+
TESTER_FEEDBACK_REPORT: "/api/admin/tester-feedback/report",
|
|
140
149
|
STORES: "/api/admin/stores",
|
|
141
150
|
STORE_BY_ID: (uid) => `/api/admin/stores/${uid}`,
|
|
142
151
|
PAYOUTS: "/api/admin/payouts",
|
|
@@ -365,6 +374,12 @@ export const LOYALTY_ENDPOINTS = {
|
|
|
365
374
|
BALANCE: (uid) => `/api/loyalty/balance?uid=${uid}`,
|
|
366
375
|
};
|
|
367
376
|
// ---------------------------------------------------------------------------
|
|
377
|
+
// Analytics — page-view tracking (public pages only)
|
|
378
|
+
// ---------------------------------------------------------------------------
|
|
379
|
+
export const ANALYTICS_ENDPOINTS = {
|
|
380
|
+
PAGE_VIEW: "/api/analytics/pageview",
|
|
381
|
+
};
|
|
382
|
+
// ---------------------------------------------------------------------------
|
|
368
383
|
// Media
|
|
369
384
|
// ---------------------------------------------------------------------------
|
|
370
385
|
export const MEDIA_ENDPOINTS = {
|
|
@@ -576,13 +591,6 @@ export const BEFORE_AFTER_ENDPOINTS = {
|
|
|
576
591
|
LIST: "/api/before-after",
|
|
577
592
|
};
|
|
578
593
|
// ---------------------------------------------------------------------------
|
|
579
|
-
// Demo / Seed
|
|
580
|
-
// ---------------------------------------------------------------------------
|
|
581
|
-
export const DEMO_ENDPOINTS = {
|
|
582
|
-
SEED: "/api/demo/seed",
|
|
583
|
-
SEED_EVENT_INIT: "/api/demo/seed/event/init",
|
|
584
|
-
};
|
|
585
|
-
// ---------------------------------------------------------------------------
|
|
586
594
|
// WhatsApp Business (store-level settings + catalog sync)
|
|
587
595
|
// ---------------------------------------------------------------------------
|
|
588
596
|
export const WHATSAPP_SELLER_ENDPOINTS = {
|
|
@@ -622,6 +630,7 @@ export const API_ENDPOINTS = {
|
|
|
622
630
|
FAQS: FAQ_ENDPOINTS,
|
|
623
631
|
HOMEPAGE: HOMEPAGE_ENDPOINTS,
|
|
624
632
|
LOYALTY: LOYALTY_ENDPOINTS,
|
|
633
|
+
ANALYTICS: ANALYTICS_ENDPOINTS,
|
|
625
634
|
MEDIA: MEDIA_ENDPOINTS,
|
|
626
635
|
ORDERS: ORDER_ENDPOINTS,
|
|
627
636
|
PREORDERS: PREORDER_ENDPOINTS,
|
|
@@ -637,7 +646,6 @@ export const API_ENDPOINTS = {
|
|
|
637
646
|
SUBLISTING_CATEGORIES: SUBLISTING_CATEGORY_ENDPOINTS,
|
|
638
647
|
WISHLIST: WISHLIST_ENDPOINTS,
|
|
639
648
|
PROFILE_STATS: PROFILE_STATS_ENDPOINTS,
|
|
640
|
-
DEMO: DEMO_ENDPOINTS,
|
|
641
649
|
WHATSAPP_SELLER: WHATSAPP_SELLER_ENDPOINTS,
|
|
642
650
|
SUPPORT: SUPPORT_ENDPOINTS,
|
|
643
651
|
SCAMMERS: SCAMMER_ENDPOINTS,
|
|
@@ -557,6 +557,15 @@ export declare const NOTIFICATION_FIELDS: {
|
|
|
557
557
|
readonly ENTITY_TYPE: "entityType";
|
|
558
558
|
readonly CREATED_AT: "createdAt";
|
|
559
559
|
};
|
|
560
|
+
export declare const PAGE_VIEW_FIELDS: {
|
|
561
|
+
readonly ID: "id";
|
|
562
|
+
readonly DATE: "date";
|
|
563
|
+
readonly ENTITY_TYPE: "entityType";
|
|
564
|
+
readonly ENTITY_ID: "entityId";
|
|
565
|
+
readonly URL: "url";
|
|
566
|
+
readonly COUNT: "count";
|
|
567
|
+
readonly UPDATED_AT: "updatedAt";
|
|
568
|
+
};
|
|
560
569
|
export declare const SESSION_FIELDS: {
|
|
561
570
|
readonly ID: "id";
|
|
562
571
|
readonly USER_ID: "userId";
|
|
@@ -623,6 +623,18 @@ export const NOTIFICATION_FIELDS = {
|
|
|
623
623
|
CREATED_AT: "createdAt",
|
|
624
624
|
};
|
|
625
625
|
// ============================================================================
|
|
626
|
+
// PAGE VIEW FIELDS
|
|
627
|
+
// ============================================================================
|
|
628
|
+
export const PAGE_VIEW_FIELDS = {
|
|
629
|
+
ID: "id",
|
|
630
|
+
DATE: "date",
|
|
631
|
+
ENTITY_TYPE: "entityType",
|
|
632
|
+
ENTITY_ID: "entityId",
|
|
633
|
+
URL: "url",
|
|
634
|
+
COUNT: "count",
|
|
635
|
+
UPDATED_AT: "updatedAt",
|
|
636
|
+
};
|
|
637
|
+
// ============================================================================
|
|
626
638
|
// SESSION FIELDS
|
|
627
639
|
// ============================================================================
|
|
628
640
|
export const SESSION_FIELDS = {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* import { COLLECTION_CACHE_PATHS } from "@mohasinac/appkit/constants";
|
|
10
10
|
* import { resolveEndpoint } from "@mohasinac/appkit/constants";
|
|
11
11
|
*/
|
|
12
|
-
export { API_ENDPOINTS, API_ROUTES, LOGS_ENDPOINTS, AUTH_ENDPOINTS, ACCOUNT_ENDPOINTS, NOTIFICATIONS_ENDPOINTS, SITE_SETTINGS_ENDPOINTS, ADMIN_ENDPOINTS, CHAT_ENDPOINTS, AUCTION_ENDPOINTS, BID_ENDPOINTS, CART_ENDPOINTS, CATEGORY_ENDPOINTS, CHECKOUT_ENDPOINTS, PAYMENT_ENDPOINTS, COLLECTION_ENDPOINTS, CONSULTATION_ENDPOINTS, COPILOT_ENDPOINTS, CORPORATE_ENDPOINTS, EVENT_ENDPOINTS, FAQ_ENDPOINTS, HOMEPAGE_ENDPOINTS, LOYALTY_ENDPOINTS, MEDIA_ENDPOINTS, ORDER_ENDPOINTS, PREORDER_ENDPOINTS, PRODUCT_ENDPOINTS, PROMOTION_ENDPOINTS, REVIEW_ENDPOINTS, SEARCH_ENDPOINTS, SELLER_ENDPOINTS, BLOG_ENDPOINTS, STORE_ENDPOINTS, WISHLIST_ENDPOINTS, PROFILE_STATS_ENDPOINTS,
|
|
12
|
+
export { API_ENDPOINTS, API_ROUTES, LOGS_ENDPOINTS, AUTH_ENDPOINTS, ACCOUNT_ENDPOINTS, NOTIFICATIONS_ENDPOINTS, SITE_SETTINGS_ENDPOINTS, ADMIN_ENDPOINTS, CHAT_ENDPOINTS, AUCTION_ENDPOINTS, BID_ENDPOINTS, CART_ENDPOINTS, CATEGORY_ENDPOINTS, CHECKOUT_ENDPOINTS, PAYMENT_ENDPOINTS, COLLECTION_ENDPOINTS, CONSULTATION_ENDPOINTS, COPILOT_ENDPOINTS, CORPORATE_ENDPOINTS, EVENT_ENDPOINTS, FAQ_ENDPOINTS, HOMEPAGE_ENDPOINTS, LOYALTY_ENDPOINTS, ANALYTICS_ENDPOINTS, MEDIA_ENDPOINTS, ORDER_ENDPOINTS, PREORDER_ENDPOINTS, PRODUCT_ENDPOINTS, PROMOTION_ENDPOINTS, REVIEW_ENDPOINTS, SEARCH_ENDPOINTS, SELLER_ENDPOINTS, BLOG_ENDPOINTS, STORE_ENDPOINTS, WISHLIST_ENDPOINTS, PROFILE_STATS_ENDPOINTS, } from "./api-endpoints";
|
|
13
13
|
export { COLLECTION_CACHE_PATHS } from "./cache-invalidation";
|
|
14
14
|
export { PAGE_SIZES, MAX_PAGE_SIZE, FEATURED_LIMITS, SITEMAP_LIMITS, } from "./pagination-presets";
|
|
15
15
|
export type { PageSizeKey } from "./pagination-presets";
|
package/dist/constants/index.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* import { COLLECTION_CACHE_PATHS } from "@mohasinac/appkit/constants";
|
|
10
10
|
* import { resolveEndpoint } from "@mohasinac/appkit/constants";
|
|
11
11
|
*/
|
|
12
|
-
export { API_ENDPOINTS, API_ROUTES, LOGS_ENDPOINTS, AUTH_ENDPOINTS, ACCOUNT_ENDPOINTS, NOTIFICATIONS_ENDPOINTS, SITE_SETTINGS_ENDPOINTS, ADMIN_ENDPOINTS, CHAT_ENDPOINTS, AUCTION_ENDPOINTS, BID_ENDPOINTS, CART_ENDPOINTS, CATEGORY_ENDPOINTS, CHECKOUT_ENDPOINTS, PAYMENT_ENDPOINTS, COLLECTION_ENDPOINTS, CONSULTATION_ENDPOINTS, COPILOT_ENDPOINTS, CORPORATE_ENDPOINTS, EVENT_ENDPOINTS, FAQ_ENDPOINTS, HOMEPAGE_ENDPOINTS, LOYALTY_ENDPOINTS, MEDIA_ENDPOINTS, ORDER_ENDPOINTS, PREORDER_ENDPOINTS, PRODUCT_ENDPOINTS, PROMOTION_ENDPOINTS, REVIEW_ENDPOINTS, SEARCH_ENDPOINTS, SELLER_ENDPOINTS, BLOG_ENDPOINTS, STORE_ENDPOINTS, WISHLIST_ENDPOINTS, PROFILE_STATS_ENDPOINTS,
|
|
12
|
+
export { API_ENDPOINTS, API_ROUTES, LOGS_ENDPOINTS, AUTH_ENDPOINTS, ACCOUNT_ENDPOINTS, NOTIFICATIONS_ENDPOINTS, SITE_SETTINGS_ENDPOINTS, ADMIN_ENDPOINTS, CHAT_ENDPOINTS, AUCTION_ENDPOINTS, BID_ENDPOINTS, CART_ENDPOINTS, CATEGORY_ENDPOINTS, CHECKOUT_ENDPOINTS, PAYMENT_ENDPOINTS, COLLECTION_ENDPOINTS, CONSULTATION_ENDPOINTS, COPILOT_ENDPOINTS, CORPORATE_ENDPOINTS, EVENT_ENDPOINTS, FAQ_ENDPOINTS, HOMEPAGE_ENDPOINTS, LOYALTY_ENDPOINTS, ANALYTICS_ENDPOINTS, MEDIA_ENDPOINTS, ORDER_ENDPOINTS, PREORDER_ENDPOINTS, PRODUCT_ENDPOINTS, PROMOTION_ENDPOINTS, REVIEW_ENDPOINTS, SEARCH_ENDPOINTS, SELLER_ENDPOINTS, BLOG_ENDPOINTS, STORE_ENDPOINTS, WISHLIST_ENDPOINTS, PROFILE_STATS_ENDPOINTS, } from "./api-endpoints";
|
|
13
13
|
export { COLLECTION_CACHE_PATHS } from "./cache-invalidation";
|
|
14
14
|
export { PAGE_SIZES, MAX_PAGE_SIZE, FEATURED_LIMITS, SITEMAP_LIMITS, } from "./pagination-presets";
|
|
15
15
|
export { NOTIFICATION_TYPES, NOTIFICATION_TYPE_TABS, } from "./notification-types";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface LinkedAccountsSectionProps {
|
|
2
|
+
googleLinked?: boolean;
|
|
3
|
+
googleLinkedEmail?: string | null;
|
|
4
|
+
onLinkGoogle: () => void;
|
|
5
|
+
isLinking?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/** Account-settings slot showing which external providers are connected to
|
|
8
|
+
* this account, with a "Connect Google account" action for password-only
|
|
9
|
+
* users. Mount inside the consumer's own card/section wrapper on the
|
|
10
|
+
* account-settings page. */
|
|
11
|
+
export declare function LinkedAccountsSection({ googleLinked, googleLinkedEmail, onLinkGoogle, isLinking, }: LinkedAccountsSectionProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Accordion, Badge, Button, Row, Stack, Text } from "../../../ui";
|
|
3
|
+
/** Account-settings slot showing which external providers are connected to
|
|
4
|
+
* this account, with a "Connect Google account" action for password-only
|
|
5
|
+
* users. Mount inside the consumer's own card/section wrapper on the
|
|
6
|
+
* account-settings page. */
|
|
7
|
+
export function LinkedAccountsSection({ googleLinked, googleLinkedEmail, onLinkGoogle, isLinking, }) {
|
|
8
|
+
return (_jsx(Accordion, { title: "Linked Accounts", children: _jsx(Stack, { gap: "md", padding: "t-sm", children: _jsxs(Row, { align: "center", justify: "between", gap: "md", children: [_jsxs(Stack, { gap: "none", children: [_jsxs(Row, { align: "center", gap: "sm", children: [_jsx(Text, { size: "sm", weight: "medium", color: "primary", children: "Google" }), googleLinked && _jsx(Badge, { variant: "success", size: "sm", children: "Connected" })] }), _jsx(Text, { size: "xs", color: "muted", children: googleLinked
|
|
9
|
+
? `Signed in as ${googleLinkedEmail ?? "your Google account"}. You can also sign in with Google going forward.`
|
|
10
|
+
: "Connect your Google account so you can sign in with either your password or Google." })] }), !googleLinked && (_jsx(Button, { type: "button", variant: "outline", size: "sm", isLoading: isLinking, onClick: onLinkGoogle, children: "Connect Google" }))] }) }) }));
|
|
11
|
+
}
|
|
@@ -25,5 +25,7 @@ export interface UserSidebarProps {
|
|
|
25
25
|
className?: string;
|
|
26
26
|
/** "sidebar" = left slide-over panel on desktop; "overlay" = right slide-over portal (default) */
|
|
27
27
|
variant?: "sidebar" | "overlay";
|
|
28
|
+
/** Optional slot rendered below the scrollable nav, e.g. cross-dashboard links. */
|
|
29
|
+
renderFooter?: () => React.ReactNode;
|
|
28
30
|
}
|
|
29
|
-
export declare function UserSidebar({ items, groups, mobileOpen, onCloseMobile, desktopOpen, onToggle, variant }: UserSidebarProps): React.JSX.Element;
|
|
31
|
+
export declare function UserSidebar({ items, groups, mobileOpen, onCloseMobile, desktopOpen, onToggle, variant, renderFooter }: UserSidebarProps): React.JSX.Element;
|
|
@@ -34,18 +34,14 @@ function NavLink({ item, isActive, onClick }) {
|
|
|
34
34
|
}, onClose: () => setShowConfirm(false) }))] }));
|
|
35
35
|
}
|
|
36
36
|
function DrawerContent({ groups, items, activeHref, onItemClick, }) {
|
|
37
|
-
|
|
37
|
+
// Accordion — only one group open at a time.
|
|
38
|
+
const [openGroup, setOpenGroup] = useState(() => {
|
|
38
39
|
if (!groups)
|
|
39
|
-
return
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
// Auto-expand only the group that contains the active page; collapse all others
|
|
43
|
-
g.defaultOpen === true
|
|
44
|
-
? true
|
|
45
|
-
: g.items.some((i) => activeHref === i.href || activeHref.startsWith(i.href + "/")),
|
|
46
|
-
]));
|
|
40
|
+
return null;
|
|
41
|
+
const match = groups.find((g) => g.defaultOpen === true || g.items.some((i) => activeHref === i.href || activeHref.startsWith(i.href + "/")));
|
|
42
|
+
return match?.title ?? null;
|
|
47
43
|
});
|
|
48
|
-
const toggle = useCallback((title) =>
|
|
44
|
+
const toggle = useCallback((title) => setOpenGroup((prev) => (prev === title ? null : title)), []);
|
|
49
45
|
if (!groups || groups.length === 0) {
|
|
50
46
|
return (_jsx(Nav, { "aria-label": "User navigation", padding: "y-sm", children: _jsx(Ul, { paddingX: "x-sm", spacing: "2xs", children: items.map((item) => {
|
|
51
47
|
const isActive = activeHref === item.href || activeHref.startsWith(item.href + "/");
|
|
@@ -53,7 +49,7 @@ function DrawerContent({ groups, items, activeHref, onItemClick, }) {
|
|
|
53
49
|
}) }) }));
|
|
54
50
|
}
|
|
55
51
|
return (_jsx(Nav, { "aria-label": "User navigation", padding: "y-xs", children: groups.map((group) => {
|
|
56
|
-
const isOpen =
|
|
52
|
+
const isOpen = openGroup === group.title;
|
|
57
53
|
const hasActive = group.items.some((i) => activeHref === i.href || activeHref.startsWith(i.href + "/"));
|
|
58
54
|
return (_jsxs(Div, { className: "mb-0.5", children: [_jsx(Button, { type: "button", variant: "ghost", onClick: () => toggle(group.title), paddingX: "md", paddingY: "sm", weight: "semibold", rounded: "none", className: `w-full text-[0.6875rem] uppercase tracking-widest transition-colors ${hasActive && !isOpen
|
|
59
55
|
? "text-primary-600 dark:text-primary-400"
|
|
@@ -63,7 +59,7 @@ function DrawerContent({ groups, items, activeHref, onItemClick, }) {
|
|
|
63
59
|
function DrawerPanel({ title, onClose, children, }) {
|
|
64
60
|
return (_jsxs(Div, { className: "hidden lg:block", children: [_jsx(Div, { surface: "overlay-xs", className: "fixed inset-0 z-40 backdrop-blur-sm", onClick: onClose, "aria-hidden": "true" }), _jsxs(Stack, { border: "default", shadow: "2xl", role: "dialog", "aria-modal": "true", "aria-label": title, className: "fixed top-0 right-0 z-50 h-full w-64 border-l", surface: "default", children: [_jsxs(Row, { border: "bottom-subtle", paddingY: "y-sm-tall", className: "shrink-0", padding: "x-md", align: "center", justify: "between", children: [_jsx(Span, { size: "xs", weight: "semibold", transform: "uppercase", color: "muted", children: title }), _jsx(IconButton, { "aria-label": "Close", variant: "ghost", size: "sm", onClick: onClose, icon: _jsx("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) })] }), _jsx(Div, { className: `flex-1 ${__O.yAuto}`, children: children })] })] }));
|
|
65
61
|
}
|
|
66
|
-
export function UserSidebar({ items, groups, mobileOpen = false, onCloseMobile, desktopOpen = false, onToggle, variant = "overlay" }) {
|
|
62
|
+
export function UserSidebar({ items, groups, mobileOpen = false, onCloseMobile, desktopOpen = false, onToggle, variant = "overlay", renderFooter }) {
|
|
67
63
|
const pathname = usePathname();
|
|
68
64
|
const close = onCloseMobile ?? (() => { });
|
|
69
65
|
const [mounted, setMounted] = useState(false);
|
|
@@ -77,7 +73,7 @@ export function UserSidebar({ items, groups, mobileOpen = false, onCloseMobile,
|
|
|
77
73
|
// ── Persistent sidebar variant (desktop left slide-over, mobile bottom-sheet) ──────
|
|
78
74
|
if (variant === "sidebar") {
|
|
79
75
|
const handleToggle = onToggle ?? close;
|
|
80
|
-
return (_jsxs(_Fragment, { children: [desktopOpen && (_jsx(Div, { surface: "overlay-xs", className: "hidden lg:block fixed inset-0 backdrop-blur-[2px] z-30", onClick: handleToggle, "aria-hidden": "true" })), _jsxs(Div, { className: `hidden lg:flex fixed left-0 z-40 transition-transform duration-300 top-[var(--header-height,3.5rem)] h-[calc(100vh-var(--header-height,3.5rem))] w-[13rem] ${desktopOpen ? "translate-x-0" : "-translate-x-[calc(100%-1.25rem)]"}`, children: [_jsxs(Stack, { border: "default", surface: "default", className: `flex-1 border-r dark:border-[var(--appkit-color-border)] ${__O.hidden}`, shadow: "xl", children: [_jsx(Div, { border: "bottom-subtle", paddingY: "y-sm-tall", className: "shrink-0", padding: "x-md", children: _jsx(Span, { size: "xs", weight: "semibold", transform: "uppercase", color: "muted", children: "My Account" }) }), _jsx(Div, { className: `flex-1 ${__O.yAuto}`, children: _jsx(DrawerContent, { groups: groups, items: items, activeHref: pathname }) })] }), _jsx(SidebarCollapseToggle, { expanded: desktopOpen, onToggle: handleToggle })] }), _jsx(Div, { className: "lg:hidden", children: _jsx(BottomSheet, { open: mobileOpen, onClose: close, title: "My Account", children: _jsx(DrawerContent, { groups: groups, items: items, activeHref: pathname, onItemClick: close }) }) })] }));
|
|
76
|
+
return (_jsxs(_Fragment, { children: [desktopOpen && (_jsx(Div, { surface: "overlay-xs", className: "hidden lg:block fixed inset-0 backdrop-blur-[2px] z-30", onClick: handleToggle, "aria-hidden": "true" })), _jsxs(Div, { className: `hidden lg:flex fixed left-0 z-40 transition-transform duration-300 top-[var(--header-height,3.5rem)] h-[calc(100vh-var(--header-height,3.5rem))] w-[13rem] ${desktopOpen ? "translate-x-0" : "-translate-x-[calc(100%-1.25rem)]"}`, children: [_jsxs(Stack, { border: "default", surface: "default", className: `flex-1 border-r dark:border-[var(--appkit-color-border)] ${__O.hidden}`, shadow: "xl", children: [_jsx(Div, { border: "bottom-subtle", paddingY: "y-sm-tall", className: "shrink-0", padding: "x-md", children: _jsx(Span, { size: "xs", weight: "semibold", transform: "uppercase", color: "muted", children: "My Account" }) }), _jsx(Div, { className: `flex-1 ${__O.yAuto}`, children: _jsx(DrawerContent, { groups: groups, items: items, activeHref: pathname }) }), renderFooter && _jsx(Div, { border: "top", padding: "inline", children: renderFooter() })] }), _jsx(SidebarCollapseToggle, { expanded: desktopOpen, onToggle: handleToggle })] }), _jsx(Div, { className: "lg:hidden", children: _jsx(BottomSheet, { open: mobileOpen, onClose: close, title: "My Account", children: _jsx(DrawerContent, { groups: groups, items: items, activeHref: pathname, onItemClick: close }) }) })] }));
|
|
81
77
|
}
|
|
82
78
|
// ── Overlay variant (default) — portal on desktop, bottom-sheet on mobile ─
|
|
83
79
|
const content = (_jsx(DrawerContent, { groups: groups, items: items, activeHref: pathname, onItemClick: close }));
|