@mohasinac/appkit 2.7.59 → 2.8.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/_internal/client/features/filters/filter-load-options.d.ts +4 -5
- package/dist/_internal/server/features/auctions/og.js +8 -32
- package/dist/_internal/server/features/blog/og.js +10 -49
- package/dist/_internal/server/features/checkout/actions.js +6 -0
- package/dist/_internal/server/features/classified/og.js +9 -51
- package/dist/_internal/server/features/digital-code/actions.d.ts +11 -0
- package/dist/_internal/server/features/digital-code/actions.js +30 -0
- package/dist/_internal/server/features/digital-code/index.d.ts +1 -0
- package/dist/_internal/server/features/digital-code/index.js +1 -0
- package/dist/_internal/server/features/digital-code/og.js +9 -51
- package/dist/_internal/server/features/events/og.js +10 -49
- package/dist/_internal/server/features/item-requests/data.d.ts +17 -0
- package/dist/_internal/server/features/item-requests/data.js +20 -0
- package/dist/_internal/server/features/item-requests/index.d.ts +2 -0
- package/dist/_internal/server/features/item-requests/index.js +2 -0
- package/dist/_internal/server/features/item-requests/og.d.ts +40 -0
- package/dist/_internal/server/features/item-requests/og.js +136 -0
- package/dist/_internal/server/features/live/actions.d.ts +5 -0
- package/dist/_internal/server/features/live/actions.js +24 -0
- package/dist/_internal/server/features/live/index.d.ts +1 -0
- package/dist/_internal/server/features/live/index.js +1 -0
- package/dist/_internal/server/features/live/og.js +9 -51
- package/dist/_internal/server/features/media/contextGuards.js +19 -8
- package/dist/_internal/server/features/pre-orders/og.js +8 -32
- package/dist/_internal/server/features/prize-draws/data.d.ts +17 -0
- package/dist/_internal/server/features/prize-draws/data.js +20 -0
- package/dist/_internal/server/features/prize-draws/index.d.ts +2 -0
- package/dist/_internal/server/features/prize-draws/index.js +2 -0
- package/dist/_internal/server/features/prize-draws/og.d.ts +30 -0
- package/dist/_internal/server/features/prize-draws/og.js +50 -0
- package/dist/_internal/server/features/products/og.js +8 -33
- package/dist/_internal/server/features/seo/og-layout.d.ts +42 -0
- package/dist/_internal/server/features/seo/og-layout.js +69 -0
- package/dist/_internal/server/features/stores/og.js +8 -41
- package/dist/_internal/server/features/sublisting-categories/og.js +11 -42
- package/dist/client.d.ts +10 -6
- package/dist/client.js +7 -3
- package/dist/constants/index.d.ts +4 -0
- package/dist/constants/index.js +2 -0
- package/dist/constants/notification-types.d.ts +20 -0
- package/dist/constants/notification-types.js +37 -0
- package/dist/constants/pagination-presets.d.ts +39 -0
- package/dist/constants/pagination-presets.js +38 -0
- package/dist/errors/messages.d.ts +0 -4
- package/dist/errors/messages.js +0 -4
- package/dist/features/about/components/PublicProfileView.js +8 -8
- package/dist/features/account/components/UserOffersPanel.js +1 -1
- package/dist/features/account/components/UserSupportView.d.ts +1 -2
- package/dist/features/account/components/UserSupportView.js +9 -1
- package/dist/features/admin/actions/admin-actions.js +16 -1
- package/dist/features/admin/components/AdminAllEventEntriesView.d.ts +2 -3
- package/dist/features/admin/components/AdminAllEventEntriesView.js +50 -83
- package/dist/features/admin/components/AdminBidsView.d.ts +2 -3
- package/dist/features/admin/components/AdminBidsView.js +64 -98
- package/dist/features/admin/components/AdminBlogView.d.ts +3 -7
- package/dist/features/admin/components/AdminBlogView.js +53 -83
- package/dist/features/admin/components/AdminBrandsView.d.ts +2 -3
- package/dist/features/admin/components/AdminBrandsView.js +84 -83
- package/dist/features/admin/components/AdminBundlesView.js +82 -125
- package/dist/features/admin/components/AdminCarouselView.d.ts +2 -2
- package/dist/features/admin/components/AdminCarouselView.js +17 -52
- package/dist/features/admin/components/AdminCartsView.d.ts +2 -3
- package/dist/features/admin/components/AdminCartsView.js +39 -88
- package/dist/features/admin/components/AdminCategoriesView.d.ts +3 -3
- package/dist/features/admin/components/AdminCategoriesView.js +98 -92
- package/dist/features/admin/components/AdminCategoryEditorView.js +2 -2
- package/dist/features/admin/components/AdminClassifiedView.d.ts +3 -0
- package/dist/features/admin/components/AdminClassifiedView.js +44 -0
- package/dist/features/admin/components/AdminContactView.d.ts +2 -2
- package/dist/features/admin/components/AdminContactView.js +104 -111
- package/dist/features/admin/components/AdminCouponsView.d.ts +3 -6
- package/dist/features/admin/components/AdminCouponsView.js +66 -86
- package/dist/features/admin/components/AdminDigitalCodesView.d.ts +3 -0
- package/dist/features/admin/components/AdminDigitalCodesView.js +51 -0
- package/dist/features/admin/components/AdminFaqsView.d.ts +4 -4
- package/dist/features/admin/components/AdminFaqsView.js +77 -33
- package/dist/features/admin/components/AdminFeaturesView.d.ts +2 -3
- package/dist/features/admin/components/AdminFeaturesView.js +57 -70
- package/dist/features/admin/components/AdminGroupedListingsView.d.ts +3 -0
- package/dist/features/admin/components/AdminGroupedListingsView.js +43 -0
- package/dist/features/admin/components/AdminHistoryView.d.ts +2 -3
- package/dist/features/admin/components/AdminHistoryView.js +35 -52
- package/dist/features/admin/components/AdminListingScaffold.d.ts +2 -2
- package/dist/features/admin/components/AdminListingScaffold.js +3 -3
- package/dist/features/admin/components/AdminLiveView.d.ts +3 -0
- package/dist/features/admin/components/AdminLiveView.js +50 -0
- package/dist/features/admin/components/AdminNewsletterView.d.ts +2 -2
- package/dist/features/admin/components/AdminNewsletterView.js +67 -97
- package/dist/features/admin/components/AdminNotificationsView.d.ts +2 -3
- package/dist/features/admin/components/AdminNotificationsView.js +67 -93
- package/dist/features/admin/components/AdminOrderEditorView.js +10 -10
- package/dist/features/admin/components/AdminOrdersView.d.ts +2 -3
- package/dist/features/admin/components/AdminOrdersView.js +93 -107
- package/dist/features/admin/components/AdminPayoutsView.d.ts +2 -3
- package/dist/features/admin/components/AdminPayoutsView.js +51 -91
- package/dist/features/admin/components/AdminPrizeDrawsView.d.ts +2 -3
- package/dist/features/admin/components/AdminPrizeDrawsView.js +39 -76
- package/dist/features/admin/components/AdminProductEditorView.js +3 -3
- package/dist/features/admin/components/AdminProductsView.d.ts +4 -4
- package/dist/features/admin/components/AdminProductsView.js +167 -163
- package/dist/features/admin/components/AdminReturnRequestsView.d.ts +1 -1
- package/dist/features/admin/components/AdminReturnRequestsView.js +64 -66
- package/dist/features/admin/components/AdminReviewsView.d.ts +3 -7
- package/dist/features/admin/components/AdminReviewsView.js +94 -110
- package/dist/features/admin/components/AdminScammersView.d.ts +2 -3
- package/dist/features/admin/components/AdminScammersView.js +53 -97
- package/dist/features/admin/components/AdminSectionsView.js +1 -1
- package/dist/features/admin/components/AdminSessionsView.d.ts +2 -3
- package/dist/features/admin/components/AdminSessionsView.js +62 -89
- package/dist/features/admin/components/AdminSiteSettingsView.js +4 -5
- package/dist/features/admin/components/AdminStoreAddressesView.d.ts +1 -1
- package/dist/features/admin/components/AdminStoreAddressesView.js +39 -53
- package/dist/features/admin/components/AdminStoreEditorView.js +21 -8
- package/dist/features/admin/components/AdminStoresView.d.ts +2 -3
- package/dist/features/admin/components/AdminStoresView.js +67 -99
- package/dist/features/admin/components/AdminSublistingCategoriesView.d.ts +1 -1
- package/dist/features/admin/components/AdminSublistingCategoriesView.js +28 -44
- package/dist/features/admin/components/AdminSupportTicketDetailView.d.ts +10 -1
- package/dist/features/admin/components/AdminSupportTicketDetailView.js +191 -5
- package/dist/features/admin/components/AdminSupportTicketsView.d.ts +2 -3
- package/dist/features/admin/components/AdminSupportTicketsView.js +65 -96
- package/dist/features/admin/components/AdminTeamView.d.ts +2 -2
- package/dist/features/admin/components/AdminTeamView.js +40 -74
- package/dist/features/admin/components/AdminUserEditorView.d.ts +11 -1
- package/dist/features/admin/components/AdminUserEditorView.js +77 -7
- package/dist/features/admin/components/AdminUsersView.d.ts +2 -3
- package/dist/features/admin/components/AdminUsersView.js +108 -100
- package/dist/features/admin/components/AdminViewCards.d.ts +1 -1
- package/dist/features/admin/components/AdminViewCards.js +15 -15
- package/dist/features/admin/components/AdminWishlistsView.d.ts +2 -3
- package/dist/features/admin/components/AdminWishlistsView.js +36 -62
- package/dist/features/admin/components/DataListingView.d.ts +122 -0
- package/dist/features/admin/components/DataListingView.js +66 -0
- package/dist/features/admin/components/index.d.ts +10 -4
- package/dist/features/admin/components/index.js +6 -2
- package/dist/features/admin/constants/filter-tabs.d.ts +23 -17
- package/dist/features/admin/constants/filter-tabs.js +21 -17
- package/dist/features/admin/hooks/useAdminListing.d.ts +1 -0
- package/dist/features/admin/hooks/useAdminListing.js +1 -1
- package/dist/features/admin/schemas/firestore.js +6 -7
- package/dist/features/auctions/server.d.ts +0 -1
- package/dist/features/auctions/server.js +0 -1
- package/dist/features/auth/actions/realtime-token-actions.js +1 -1
- package/dist/features/auth/repository/user.repository.js +1 -1
- package/dist/features/blog/components/BlogFeaturedCard.js +1 -0
- package/dist/features/cart/repository/cart.repository.d.ts +4 -1
- package/dist/features/cart/repository/cart.repository.js +12 -0
- package/dist/features/checkout/hooks/useCheckoutApi.d.ts +0 -2
- package/dist/features/checkout/index.d.ts +1 -1
- package/dist/features/events/components/AdminEventEditorView.js +10 -13
- package/dist/features/events/components/AdminEventsView.d.ts +3 -3
- package/dist/features/events/components/AdminEventsView.js +50 -86
- package/dist/features/events/components/EventCard.js +1 -0
- package/dist/features/events/components/EventOfferCard.d.ts +19 -0
- package/dist/features/events/components/EventOfferCard.js +29 -0
- package/dist/features/events/components/EventRaffleEntryForm.d.ts +25 -0
- package/dist/features/events/components/EventRaffleEntryForm.js +37 -0
- package/dist/features/events/components/EventRafflesSection.d.ts +1 -4
- package/dist/features/events/components/EventRafflesSection.js +17 -6
- package/dist/features/events/components/EventSaleBanner.d.ts +21 -0
- package/dist/features/events/components/EventSaleBanner.js +18 -0
- package/dist/features/events/components/index.d.ts +6 -0
- package/dist/features/events/components/index.js +4 -0
- package/dist/features/events/repository/event-entry.repository.d.ts +5 -0
- package/dist/features/events/repository/event-entry.repository.js +7 -0
- package/dist/features/faq/components/FAQPageContent.js +1 -0
- package/dist/features/filters/AsyncFacetSection.d.ts +1 -1
- package/dist/features/homepage/components/AdvertisementBanner.js +6 -6
- package/dist/features/homepage/components/FAQSection.d.ts +0 -5
- package/dist/features/homepage/components/HomepageSkeleton.js +2 -2
- package/dist/features/homepage/components/WelcomeSection.js +3 -3
- package/dist/features/homepage/lib/live-stats.js +1 -1
- package/dist/features/homepage/schemas/firestore.d.ts +0 -2
- package/dist/features/layout/TitleBar.js +1 -0
- package/dist/features/layout/index.d.ts +0 -2
- package/dist/features/layout/index.js +0 -1
- package/dist/features/pre-orders/server.d.ts +0 -1
- package/dist/features/pre-orders/server.js +0 -1
- package/dist/features/products/components/GroupSettingsPanel.js +2 -2
- package/dist/features/products/components/PrizeDrawItemsEditor.js +2 -2
- package/dist/features/products/components/PrizeDrawsSection.d.ts +1 -4
- package/dist/features/products/components/PrizeDrawsSection.js +17 -6
- package/dist/features/products/components/PrizeRevealModal.js +1 -1
- package/dist/features/products/components/ProductCardMetadataSection.d.ts +11 -0
- package/dist/features/products/components/ProductCardMetadataSection.js +25 -0
- package/dist/features/products/components/ProductDetailPageView.js +3 -1
- package/dist/features/products/components/ProductFeaturesSelector.js +1 -1
- package/dist/features/products/components/ProductGradingTab.d.ts +13 -0
- package/dist/features/products/components/ProductGradingTab.js +25 -0
- package/dist/features/products/components/ProductGrid.js +15 -2
- package/dist/features/products/components/ProductTabsShell.d.ts +5 -1
- package/dist/features/products/components/ProductTabsShell.js +6 -1
- package/dist/features/products/components/index.d.ts +4 -0
- package/dist/features/products/components/index.js +3 -0
- package/dist/features/products/constants/action-defs.d.ts +5 -0
- package/dist/features/products/constants/action-defs.js +52 -32
- package/dist/features/products/constants/sieve.d.ts +24 -4
- package/dist/features/products/constants/sieve.js +20 -11
- package/dist/features/products/schemas/firestore.d.ts +17 -0
- package/dist/features/products/schemas/product-features.validators.d.ts +2 -2
- package/dist/features/products/schemas/product-templates.d.ts +2 -4
- package/dist/features/products/types/index.d.ts +4 -0
- package/dist/features/promotions/components/CouponsIndexListing.js +4 -4
- package/dist/features/promotions/server.d.ts +0 -1
- package/dist/features/promotions/server.js +0 -1
- package/dist/features/reviews/components/ReviewDetailShell.js +3 -3
- package/dist/features/search/api/route.js +44 -1
- package/dist/features/search/components/Search.js +2 -0
- package/dist/features/search/hooks/useNavSuggestions.d.ts +5 -1
- package/dist/features/search/hooks/useNavSuggestions.js +31 -4
- package/dist/features/seller/components/BrandInlineSelect.js +2 -2
- package/dist/features/seller/components/CategoryInlineSelect.js +2 -2
- package/dist/features/seller/components/SellerAddressesView.js +4 -5
- package/dist/features/seller/components/SellerAuctionsView.d.ts +3 -3
- package/dist/features/seller/components/SellerAuctionsView.js +60 -90
- package/dist/features/seller/components/SellerBidsView.js +1 -1
- package/dist/features/seller/components/SellerBundlesView.js +64 -89
- package/dist/features/seller/components/SellerClassifiedView.js +67 -90
- package/dist/features/seller/components/SellerCouponEditorView.js +1 -1
- package/dist/features/seller/components/SellerCouponsView.d.ts +2 -2
- package/dist/features/seller/components/SellerCouponsView.js +45 -84
- package/dist/features/seller/components/SellerDigitalCodesView.js +63 -88
- package/dist/features/seller/components/SellerGroupedListingsView.js +33 -49
- package/dist/features/seller/components/SellerLiveView.js +63 -84
- package/dist/features/seller/components/SellerOffersPanel.js +1 -1
- package/dist/features/seller/components/SellerOffersView.d.ts +2 -2
- package/dist/features/seller/components/SellerOffersView.js +37 -69
- package/dist/features/seller/components/SellerOrdersView.d.ts +2 -2
- package/dist/features/seller/components/SellerOrdersView.js +4 -4
- package/dist/features/seller/components/SellerPayoutMethodsView.js +1 -1
- package/dist/features/seller/components/SellerPayoutsView.d.ts +2 -2
- package/dist/features/seller/components/SellerPayoutsView.js +34 -68
- package/dist/features/seller/components/SellerPreOrdersView.d.ts +2 -2
- package/dist/features/seller/components/SellerPreOrdersView.js +49 -82
- package/dist/features/seller/components/SellerPrizeDrawsView.d.ts +2 -2
- package/dist/features/seller/components/SellerPrizeDrawsView.js +49 -82
- package/dist/features/seller/components/SellerProductShell.d.ts +1 -1
- package/dist/features/seller/components/SellerProductsView.d.ts +2 -2
- package/dist/features/seller/components/SellerProductsView.js +15 -10
- package/dist/features/seller/components/SellerShippingConfigsView.js +1 -1
- package/dist/features/seller/components/SellerSidebar.d.ts +0 -4
- package/dist/features/seller/components/SellerSidebar.js +0 -2
- package/dist/features/seller/components/SellerStoreCategoriesView.js +1 -1
- package/dist/features/seller/components/SellerTemplatesView.js +2 -2
- package/dist/features/seller/components/SellersListView.d.ts +1 -2
- package/dist/features/seller/components/analytics/SellerAnalyticsStats.d.ts +5 -0
- package/dist/features/seller/components/analytics/SellerAnalyticsStats.js +2 -8
- package/dist/features/seller/components/index.d.ts +0 -3
- package/dist/features/seller/components/index.js +0 -2
- package/dist/features/seller/server.d.ts +0 -1
- package/dist/features/seller/server.js +0 -1
- package/dist/features/shell/FormShell.d.ts +1 -1
- package/dist/features/shell/FormShell.js +7 -4
- package/dist/features/shell/field-groups/ImageFieldGroup.d.ts +18 -0
- package/dist/features/shell/field-groups/ImageFieldGroup.js +15 -0
- package/dist/features/shell/field-groups/SeoFieldGroup.d.ts +22 -0
- package/dist/features/shell/field-groups/SeoFieldGroup.js +16 -0
- package/dist/features/shell/field-groups/StatusFieldGroup.d.ts +35 -0
- package/dist/features/shell/field-groups/StatusFieldGroup.js +16 -0
- package/dist/features/shell/field-groups/TitleDescriptionGroup.d.ts +40 -0
- package/dist/features/shell/field-groups/TitleDescriptionGroup.js +16 -0
- package/dist/features/shell/field-groups/index.d.ts +13 -0
- package/dist/features/shell/field-groups/index.js +9 -0
- package/dist/features/shell/index.d.ts +2 -0
- package/dist/features/shell/index.js +1 -0
- package/dist/features/stores/components/StoreCapabilitiesGuideView.d.ts +1 -2
- package/dist/features/stores/components/StoreFinanceGuideView.d.ts +1 -2
- package/dist/features/stores/components/StoreHeader.js +2 -1
- package/dist/features/stores/components/StoreListingsGuideView.d.ts +1 -2
- package/dist/features/stores/components/StoreOrdersGuideView.d.ts +1 -2
- package/dist/features/stores/components/StoreScopedSearch.d.ts +16 -0
- package/dist/features/stores/components/StoreScopedSearch.js +27 -0
- package/dist/features/stores/components/StoreSettingsGuideView.d.ts +1 -2
- package/dist/features/stores/server.d.ts +0 -1
- package/dist/features/stores/server.js +0 -1
- package/dist/features/support/schemas/firestore.d.ts +22 -1
- package/dist/features/support/schemas/firestore.js +10 -0
- package/dist/features/wishlist/server.d.ts +0 -1
- package/dist/features/wishlist/server.js +0 -1
- package/dist/index.d.ts +9 -27
- package/dist/index.js +14 -50
- package/dist/next/routing/route-map.d.ts +8 -0
- package/dist/next/routing/route-map.js +4 -0
- package/dist/react/hooks/useListingTypeFlags.d.ts +32 -0
- package/dist/react/hooks/useListingTypeFlags.js +19 -0
- package/dist/security/index.d.ts +1 -1
- package/dist/security/index.js +1 -1
- package/dist/security/pii-redact.d.ts +8 -0
- package/dist/security/pii-redact.js +10 -1
- package/dist/seed/grouped-listings-seed-data.d.ts +4 -0
- package/dist/seed/products-preorders-seed-data.d.ts +4 -0
- package/dist/seed/products-prize-draws-seed-data.js +3 -0
- package/dist/seed/site-settings-seed-data.js +5 -5
- package/dist/seed/sub-listings-seed-data.d.ts +4 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.js +4 -0
- package/dist/styles.css +54 -395
- package/dist/tailwind-utilities.css +1 -1
- package/dist/ui/components/BaseListingCard.d.ts +10 -0
- package/dist/ui/components/BaseListingCard.js +17 -1
- package/dist/ui/components/DetailPageGallery.d.ts +32 -0
- package/dist/ui/components/DetailPageGallery.js +47 -0
- package/dist/ui/components/DetailPageHero.d.ts +30 -0
- package/dist/ui/components/DetailPageHero.js +22 -0
- package/dist/ui/components/DetailPageTabs.d.ts +34 -0
- package/dist/ui/components/DetailPageTabs.js +38 -0
- package/dist/ui/components/HorizontalScroller.style.css +15 -2
- package/dist/ui/components/ListingLayout.d.ts +11 -2
- package/dist/ui/components/ListingLayout.js +12 -6
- package/dist/ui/components/PaginatedSelect.d.ts +66 -0
- package/dist/ui/components/PaginatedSelect.js +201 -0
- package/dist/ui/components/PaginatedSelect.style.css +254 -0
- package/dist/ui/components/Semantic.d.ts +0 -4
- package/dist/ui/components/Semantic.js +0 -2
- package/dist/ui/components/SettingsSection.d.ts +47 -0
- package/dist/ui/components/SettingsSection.js +38 -0
- package/dist/ui/components/index.style.css +1 -4
- package/dist/ui/index.d.ts +12 -14
- package/dist/ui/index.js +6 -7
- package/dist/utils/id-generators.d.ts +1 -18
- package/dist/utils/id-generators.js +51 -18
- package/dist/validation/schemas.d.ts +25 -0
- package/dist/validation/schemas.js +28 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export interface AdminEventsViewProps extends
|
|
1
|
+
import type { ListingLayoutProps } from "../../../ui";
|
|
2
|
+
export interface AdminEventsViewProps extends ListingLayoutProps {
|
|
3
3
|
getRowHref?: (row: {
|
|
4
4
|
id: string;
|
|
5
5
|
}) => string;
|
|
6
6
|
}
|
|
7
|
-
export declare function AdminEventsView({ children,
|
|
7
|
+
export declare function AdminEventsView({ children, ...props }: AdminEventsViewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,28 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import React
|
|
4
|
-
import {
|
|
5
|
-
import { useUrlTable } from "../../../react/hooks/useUrlTable";
|
|
6
|
-
import { useBulkSelection } from "../../../react/hooks/useBulkSelection";
|
|
7
|
-
import { AdminViewCards } from "../../admin/components/AdminViewCards";
|
|
8
|
-
import { usePanelUrlSync } from "../../../react/hooks/use-panel-url-sync";
|
|
9
|
-
import { BulkActionBar, Button, FilterChipGroup, ListingFilterDrawer, ListingToolbar, Pagination, ListingViewShell, SideDrawer } from "../../../ui";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { FilterChipGroup, ListingLayout } from "../../../ui";
|
|
10
5
|
import { ADMIN_ENDPOINTS } from "../../../constants/api-endpoints";
|
|
11
6
|
import { ADMIN_EVENT_STATUS_TABS } from "../../admin/constants/filter-tabs";
|
|
12
|
-
import { toRecordArray, toRelativeDate, toStringValue,
|
|
13
|
-
import {
|
|
7
|
+
import { toRecordArray, toRelativeDate, toStringValue, } from "../../admin/hooks/useAdminListingData";
|
|
8
|
+
import { DataListingView } from "../../admin/components/DataListingView";
|
|
14
9
|
import { AdminEventEditorView } from "./AdminEventEditorView";
|
|
15
|
-
import { useBottomActions } from "../../layout";
|
|
16
|
-
const PAGE_SIZE = 25;
|
|
17
|
-
const FILTER_KEYS = ["status", "type"];
|
|
18
|
-
const DEFAULT_SORT = "-startsAt";
|
|
19
|
-
const SORT_OPTIONS = [
|
|
20
|
-
{ value: "-startsAt", label: "Starting soonest" },
|
|
21
|
-
{ value: "startsAt", label: "Starting latest" },
|
|
22
|
-
{ value: "-createdAt", label: "Newest" },
|
|
23
|
-
{ value: "title", label: "Title A–Z" },
|
|
24
|
-
];
|
|
25
|
-
const STATUS_OPTIONS = ADMIN_EVENT_STATUS_TABS;
|
|
26
10
|
// TODO(events): TYPE_OPTIONS list pre-dates the SB9 EventType union refresh
|
|
27
11
|
// (sale|offer|poll|survey|feedback|raffle|spin_wheel). Keep current values to
|
|
28
12
|
// avoid silently breaking saved-filter URLs — sync in a dedicated follow-up.
|
|
@@ -35,78 +19,58 @@ const TYPE_OPTIONS = [
|
|
|
35
19
|
{ id: "survey", label: "Survey" },
|
|
36
20
|
{ id: "flash-sale", label: "Flash Sale" },
|
|
37
21
|
];
|
|
38
|
-
export function AdminEventsView({ children,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}, [table]);
|
|
50
|
-
const applyFilters = useCallback(() => {
|
|
51
|
-
const updates = { page: "1" };
|
|
52
|
-
for (const k of FILTER_KEYS)
|
|
53
|
-
updates[k] = pendingFilters[k] ?? "";
|
|
54
|
-
table.setMany(updates);
|
|
55
|
-
setFilterOpen(false);
|
|
56
|
-
}, [pendingFilters, table]);
|
|
57
|
-
const clearFilters = useCallback(() => {
|
|
58
|
-
setPendingFilters(Object.fromEntries(FILTER_KEYS.map((k) => [k, ""])));
|
|
59
|
-
}, []);
|
|
60
|
-
const resetAll = useCallback(() => {
|
|
61
|
-
const updates = { q: "", sort: "" };
|
|
62
|
-
for (const k of FILTER_KEYS)
|
|
63
|
-
updates[k] = "";
|
|
64
|
-
table.setMany(updates);
|
|
65
|
-
setSearchInput("");
|
|
66
|
-
}, [table]);
|
|
67
|
-
const commitSearch = useCallback(() => {
|
|
68
|
-
table.set("q", searchInput.trim());
|
|
69
|
-
}, [searchInput, table]);
|
|
70
|
-
const activeFilterCount = FILTER_KEYS.filter((k) => !!table.get(k)).length;
|
|
71
|
-
const hasActiveState = !!table.get("q") || table.get("sort") !== DEFAULT_SORT || activeFilterCount > 0;
|
|
72
|
-
const filterParts = [];
|
|
73
|
-
const statusRaw = table.get("status");
|
|
74
|
-
if (statusRaw && statusRaw !== "All")
|
|
75
|
-
filterParts.push(`status==${statusRaw}`);
|
|
76
|
-
const typeRaw = table.get("type");
|
|
77
|
-
if (typeRaw && typeRaw !== "All")
|
|
78
|
-
filterParts.push(`type==${typeRaw}`);
|
|
79
|
-
const filters = filterParts.join(",") || undefined;
|
|
80
|
-
const { rows, total, isLoading, errorMessage } = useAdminListingData({
|
|
22
|
+
export function AdminEventsView({ children, ...props }) {
|
|
23
|
+
if (React.Children.count(children) > 0) {
|
|
24
|
+
return (_jsx(ListingLayout, { portal: "admin", ...props, children: children }));
|
|
25
|
+
}
|
|
26
|
+
const config = {
|
|
27
|
+
portal: "admin",
|
|
28
|
+
title: "Events",
|
|
29
|
+
searchPlaceholder: "Search events by title or type",
|
|
30
|
+
emptyLabel: "No events found",
|
|
31
|
+
filterKeys: ["status", "type"],
|
|
32
|
+
defaultSort: "-startsAt",
|
|
81
33
|
queryKey: ["admin", "events", "listing"],
|
|
82
34
|
endpoint: ADMIN_ENDPOINTS.EVENTS,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
35
|
+
sortOptions: [
|
|
36
|
+
{ value: "-startsAt", label: "Starting soonest" },
|
|
37
|
+
{ value: "startsAt", label: "Starting latest" },
|
|
38
|
+
{ value: "-createdAt", label: "Newest" },
|
|
39
|
+
{ value: "title", label: "Title A–Z" },
|
|
40
|
+
],
|
|
88
41
|
mapRows: (response) => toRecordArray(response.items).map((item, index) => ({
|
|
89
42
|
id: toStringValue(item.id, `event-${index}`),
|
|
90
43
|
primary: toStringValue(item.title, "Untitled event"),
|
|
91
|
-
secondary: [
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
].filter(Boolean).join(" · "),
|
|
44
|
+
secondary: [toStringValue(item.type, "event"), toStringValue(item.startsAt, "")]
|
|
45
|
+
.filter(Boolean)
|
|
46
|
+
.join(" · "),
|
|
95
47
|
status: toStringValue(item.status, "active"),
|
|
96
48
|
updatedAt: toRelativeDate(item.updatedAt ?? item.createdAt),
|
|
97
49
|
})),
|
|
98
50
|
getTotal: (response, mappedRows) => typeof response.total === "number" ? response.total : mappedRows.length,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
51
|
+
buildFilters: (state) => {
|
|
52
|
+
const parts = [];
|
|
53
|
+
if (state.status && state.status !== "All")
|
|
54
|
+
parts.push(`status==${state.status}`);
|
|
55
|
+
if (state.type && state.type !== "All")
|
|
56
|
+
parts.push(`type==${state.type}`);
|
|
57
|
+
return parts.join(",") || undefined;
|
|
58
|
+
},
|
|
59
|
+
primaryAction: {
|
|
60
|
+
label: "Add Event",
|
|
61
|
+
onClick: ({ openCreatePanel }) => openCreatePanel(),
|
|
62
|
+
},
|
|
63
|
+
buildBulkActions: (selection) => [
|
|
64
|
+
{
|
|
65
|
+
id: "delete",
|
|
66
|
+
label: "Delete Selected",
|
|
67
|
+
variant: "secondary",
|
|
68
|
+
onClick: () => selection.clearSelection(),
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
renderFilterPanel: ({ pendingFilters, setPendingFilters }) => (_jsxs(_Fragment, { children: [_jsx(FilterChipGroup, { label: "Status", tabs: ADMIN_EVENT_STATUS_TABS, value: pendingFilters.status ?? "", onChange: (id) => setPendingFilters((p) => ({ ...p, status: id })) }), _jsx(FilterChipGroup, { label: "Type", tabs: TYPE_OPTIONS, value: pendingFilters.type ?? "", onChange: (id) => setPendingFilters((p) => ({ ...p, type: id })) })] })),
|
|
72
|
+
renderEditor: ({ editId, closePanel }) => (_jsx(AdminEventEditorView, { eventId: editId ?? undefined, onSaved: closePanel, embedded: true })),
|
|
73
|
+
resolveEditorTitle: ({ isCreate }) => (isCreate ? "Add Event" : "Edit Event"),
|
|
74
|
+
};
|
|
75
|
+
return _jsx(DataListingView, { config: config });
|
|
112
76
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface EventOfferCardProps {
|
|
2
|
+
/** Coupon code to copy. */
|
|
3
|
+
couponCode: string;
|
|
4
|
+
/** Description of what the coupon does. */
|
|
5
|
+
offerDescription?: string;
|
|
6
|
+
/** Headline. */
|
|
7
|
+
title?: string;
|
|
8
|
+
/** Optional filter param for the CTA — e.g. {key: "category", value: "trading-cards"}. */
|
|
9
|
+
filterParam?: {
|
|
10
|
+
key: string;
|
|
11
|
+
value: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* `EventOfferCard` — W1-18 — offer event UI noted as missing in the plan.
|
|
16
|
+
* Renders a coupon code with copy-to-clipboard + a CTA to the filtered
|
|
17
|
+
* products page.
|
|
18
|
+
*/
|
|
19
|
+
export declare function EventOfferCard({ couponCode, offerDescription, title, filterParam, }: EventOfferCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import Link from "next/link";
|
|
5
|
+
import { Div, Heading, Stack, Text } from "../../../ui";
|
|
6
|
+
import { Button } from "../../../ui/components/Button";
|
|
7
|
+
import { ROUTES } from "../../../next/routing/route-map";
|
|
8
|
+
/**
|
|
9
|
+
* `EventOfferCard` — W1-18 — offer event UI noted as missing in the plan.
|
|
10
|
+
* Renders a coupon code with copy-to-clipboard + a CTA to the filtered
|
|
11
|
+
* products page.
|
|
12
|
+
*/
|
|
13
|
+
export function EventOfferCard({ couponCode, offerDescription, title = "Exclusive offer", filterParam, }) {
|
|
14
|
+
const [copied, setCopied] = useState(false);
|
|
15
|
+
const href = filterParam
|
|
16
|
+
? `${ROUTES.PUBLIC.PRODUCTS}?${encodeURIComponent(filterParam.key)}=${encodeURIComponent(filterParam.value)}`
|
|
17
|
+
: String(ROUTES.PUBLIC.PRODUCTS);
|
|
18
|
+
const copyCode = async () => {
|
|
19
|
+
try {
|
|
20
|
+
await navigator.clipboard.writeText(couponCode);
|
|
21
|
+
setCopied(true);
|
|
22
|
+
setTimeout(() => setCopied(false), 2000);
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
/* clipboard unavailable — leave button as-is */
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
return (_jsx(Div, { className: "rounded-2xl border border-zinc-200 dark:border-zinc-700 p-6", children: _jsxs(Stack, { gap: "md", children: [_jsxs(Stack, { gap: "xs", children: [_jsx(Heading, { level: 2, className: "text-2xl font-semibold", children: title }), offerDescription ? (_jsx(Text, { className: "text-sm text-zinc-600 dark:text-zinc-400", children: offerDescription })) : null] }), _jsxs(Div, { className: "flex items-center gap-3 rounded-lg bg-zinc-50 dark:bg-zinc-900 px-4 py-3", children: [_jsx("code", { className: "flex-1 font-mono text-lg font-bold text-zinc-900 dark:text-zinc-100", children: couponCode }), _jsx(Button, { type: "button", variant: "outline", onClick: copyCode, children: copied ? "Copied!" : "Copy code" })] }), _jsx(Div, { children: _jsx(Link, { href: href, children: _jsx(Button, { variant: "primary", children: "Apply at checkout" }) }) })] }) }));
|
|
29
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface EventRaffleEntryFormProps {
|
|
2
|
+
/** Event id used for the entry POST. */
|
|
3
|
+
eventId: string;
|
|
4
|
+
/** Raffle prize label rendered prominently above the form. */
|
|
5
|
+
prizeLabel?: string;
|
|
6
|
+
/** Raffle type — drives the helper copy. */
|
|
7
|
+
raffleType?: "open_raffle" | "top_n_scorers" | "top_n_participants" | "spin_wheel";
|
|
8
|
+
/** Top-N value when raffleType supports it. */
|
|
9
|
+
topN?: number;
|
|
10
|
+
/** Max entries this user already has (drives the over-limit message). */
|
|
11
|
+
userEntryCount?: number;
|
|
12
|
+
/** Server-enforced max entries per user (defaults to 1). */
|
|
13
|
+
maxEntriesPerUser?: number;
|
|
14
|
+
/** When true, the form is in a submitted/locked state. */
|
|
15
|
+
submitted?: boolean;
|
|
16
|
+
/** Caller-provided submit handler. Receives the user's optional message. */
|
|
17
|
+
onSubmit: (message: string) => Promise<void> | void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* `EventRaffleEntryForm` — W1-18 — fills the gap noted in the plan ("Raffle
|
|
21
|
+
* entry form (71 LOC stub) — no entry form"). Renders the prize hero,
|
|
22
|
+
* eligibility status, an optional message field, and a submit button. Server
|
|
23
|
+
* action wiring stays with the caller via the `onSubmit` prop.
|
|
24
|
+
*/
|
|
25
|
+
export declare function EventRaffleEntryForm({ eventId: _eventId, prizeLabel, raffleType, topN, userEntryCount, maxEntriesPerUser, submitted, onSubmit, }: EventRaffleEntryFormProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { Button } from "../../../ui/components/Button";
|
|
5
|
+
import { Div, Heading, Stack, Text } from "../../../ui";
|
|
6
|
+
import { Badge } from "../../../ui/components/Badge";
|
|
7
|
+
/**
|
|
8
|
+
* `EventRaffleEntryForm` — W1-18 — fills the gap noted in the plan ("Raffle
|
|
9
|
+
* entry form (71 LOC stub) — no entry form"). Renders the prize hero,
|
|
10
|
+
* eligibility status, an optional message field, and a submit button. Server
|
|
11
|
+
* action wiring stays with the caller via the `onSubmit` prop.
|
|
12
|
+
*/
|
|
13
|
+
export function EventRaffleEntryForm({ eventId: _eventId, prizeLabel, raffleType = "open_raffle", topN, userEntryCount = 0, maxEntriesPerUser = 1, submitted = false, onSubmit, }) {
|
|
14
|
+
const [message, setMessage] = useState("");
|
|
15
|
+
const [busy, setBusy] = useState(false);
|
|
16
|
+
const overLimit = userEntryCount >= maxEntriesPerUser;
|
|
17
|
+
const handleSubmit = async (e) => {
|
|
18
|
+
e.preventDefault();
|
|
19
|
+
if (overLimit || submitted || busy)
|
|
20
|
+
return;
|
|
21
|
+
setBusy(true);
|
|
22
|
+
try {
|
|
23
|
+
await onSubmit(message.trim());
|
|
24
|
+
}
|
|
25
|
+
finally {
|
|
26
|
+
setBusy(false);
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
const eligibilityCopy = raffleType === "open_raffle"
|
|
30
|
+
? "Open to all eligible participants — one entry per user."
|
|
31
|
+
: raffleType === "top_n_scorers"
|
|
32
|
+
? `Top ${topN ?? "N"} highest-scoring entries win.`
|
|
33
|
+
: raffleType === "top_n_participants"
|
|
34
|
+
? `Earliest ${topN ?? "N"} entries qualify.`
|
|
35
|
+
: "Spin the wheel to claim your prize.";
|
|
36
|
+
return (_jsxs(Div, { className: "rounded-2xl border border-zinc-200 dark:border-zinc-700 p-6 space-y-4", children: [prizeLabel ? (_jsxs(Stack, { gap: "xs", children: [_jsx(Badge, { variant: "warning", children: "Prize" }), _jsx(Heading, { level: 2, className: "text-2xl font-bold", children: prizeLabel })] })) : null, _jsx(Text, { className: "text-sm text-zinc-600 dark:text-zinc-400", children: eligibilityCopy }), submitted ? (_jsx(Div, { className: "rounded-lg bg-success-surface px-4 py-3 text-sm text-success", children: "You're in. Check the leaderboard for results." })) : overLimit ? (_jsxs(Div, { className: "rounded-lg bg-warning-surface px-4 py-3 text-sm text-warning", children: ["You've used all ", maxEntriesPerUser, " entry slot", maxEntriesPerUser === 1 ? "" : "s", " for this raffle."] })) : (_jsxs("form", { onSubmit: handleSubmit, className: "space-y-3", children: [_jsxs("label", { htmlFor: "raffle-message", className: "block text-sm font-medium", children: ["Message ", _jsx("span", { className: "text-zinc-400", children: "(optional)" })] }), _jsx("textarea", { id: "raffle-message", value: message, onChange: (e) => setMessage(e.target.value), rows: 3, maxLength: 500, className: "w-full rounded-lg border border-zinc-300 dark:border-zinc-700 px-3 py-2 text-sm bg-white dark:bg-zinc-900 focus:outline-none focus:ring-2 focus:ring-[var(--appkit-color-primary)]", placeholder: "Share why you'd like to win", disabled: busy }), _jsx(Button, { type: "submit", variant: "primary", disabled: busy, children: busy ? "Submitting…" : "Enter raffle" })] }))] }));
|
|
37
|
+
}
|
|
@@ -4,9 +4,6 @@ export interface EventRafflesSectionProps {
|
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
6
|
* Renders a live-raffle/spin-wheel strip on the homepage.
|
|
7
|
-
*
|
|
8
|
-
* Reads events with `hasRaffle=true` and status in {"active","upcoming"}. The
|
|
9
|
-
* `hasRaffle` flag is added later with the raffle feature; for now the
|
|
10
|
-
* component renders an empty state and the section ships disabled in seed.
|
|
7
|
+
* W1-38 (2026-05-23): fetches events with hasRaffle=true and renders the EventCard grid.
|
|
11
8
|
*/
|
|
12
9
|
export declare function EventRafflesSection({ config, }: EventRafflesSectionProps): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
@@ -2,16 +2,27 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import Link from "next/link";
|
|
3
3
|
import { Container, Heading, Section, Stack, Text, } from "../../../ui";
|
|
4
4
|
import { ROUTES } from "../../../next";
|
|
5
|
+
import { eventRepository } from "../repository/events.repository";
|
|
6
|
+
import { EventCard } from "./EventCard";
|
|
5
7
|
/**
|
|
6
8
|
* Renders a live-raffle/spin-wheel strip on the homepage.
|
|
7
|
-
*
|
|
8
|
-
* Reads events with `hasRaffle=true` and status in {"active","upcoming"}. The
|
|
9
|
-
* `hasRaffle` flag is added later with the raffle feature; for now the
|
|
10
|
-
* component renders an empty state and the section ships disabled in seed.
|
|
9
|
+
* W1-38 (2026-05-23): fetches events with hasRaffle=true and renders the EventCard grid.
|
|
11
10
|
*/
|
|
12
11
|
export async function EventRafflesSection({ config, }) {
|
|
13
12
|
const title = config.title ?? "Live Raffles & Spin Wheels";
|
|
14
13
|
const subtitle = config.subtitle ?? "Participate in community events and win prizes";
|
|
15
|
-
const
|
|
16
|
-
|
|
14
|
+
const limit = 6;
|
|
15
|
+
let events = [];
|
|
16
|
+
try {
|
|
17
|
+
const result = await eventRepository.list({
|
|
18
|
+
filters: "hasRaffle==true,status==active",
|
|
19
|
+
sorts: "-startsAt",
|
|
20
|
+
pageSize: limit,
|
|
21
|
+
});
|
|
22
|
+
events = (result.items ?? []);
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
events = [];
|
|
26
|
+
}
|
|
27
|
+
return (_jsx(Section, { className: "py-10", children: _jsx(Container, { size: "xl", children: _jsxs(Stack, { gap: "md", children: [_jsxs(Stack, { gap: "xs", children: [_jsx(Heading, { level: 2, className: "text-2xl font-semibold text-zinc-900 dark:text-zinc-50", children: title }), subtitle ? (_jsx(Text, { className: "text-sm text-zinc-500 dark:text-zinc-400", children: subtitle })) : null] }), events.length === 0 ? (_jsxs(Stack, { align: "center", gap: "sm", className: "rounded-2xl border border-dashed border-zinc-300 px-6 py-12 text-center dark:border-slate-700", children: [_jsx(Text, { className: "text-sm text-zinc-500 dark:text-zinc-400", children: "No upcoming raffles \u2014 keep an eye on the events page." }), _jsx(Link, { href: String(ROUTES.PUBLIC.EVENTS), className: "text-sm font-medium text-primary hover:underline", children: "Browse all events \u2192" })] })) : (_jsx("div", { className: "fluid-grid-card gap-3", children: events.map((event) => (_jsx(EventCard, { event: event }, event.id))) }))] }) }) }));
|
|
17
28
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface EventSaleBannerProps {
|
|
2
|
+
/** Discount percent (e.g. 20 = 20% off). */
|
|
3
|
+
discountPercent?: number;
|
|
4
|
+
/** Coupon code (when the sale is gated by a code). */
|
|
5
|
+
couponCode?: string;
|
|
6
|
+
/** Sale headline override. */
|
|
7
|
+
title?: string;
|
|
8
|
+
/** Sale subheading override. */
|
|
9
|
+
subtitle?: string;
|
|
10
|
+
/** Filter the catalog page to a specific category / tag. */
|
|
11
|
+
filterParam?: {
|
|
12
|
+
key: string;
|
|
13
|
+
value: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* `EventSaleBanner` — W1-18 — sale event UI noted as missing in the plan.
|
|
18
|
+
* Renders a hero banner with the discount, optional coupon, and a CTA to the
|
|
19
|
+
* filtered products catalog.
|
|
20
|
+
*/
|
|
21
|
+
export declare function EventSaleBanner({ discountPercent, couponCode, title, subtitle, filterParam, }: EventSaleBannerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { Div, Heading, Stack, Text } from "../../../ui";
|
|
5
|
+
import { Button } from "../../../ui/components/Button";
|
|
6
|
+
import { ROUTES } from "../../../next/routing/route-map";
|
|
7
|
+
/**
|
|
8
|
+
* `EventSaleBanner` — W1-18 — sale event UI noted as missing in the plan.
|
|
9
|
+
* Renders a hero banner with the discount, optional coupon, and a CTA to the
|
|
10
|
+
* filtered products catalog.
|
|
11
|
+
*/
|
|
12
|
+
export function EventSaleBanner({ discountPercent, couponCode, title, subtitle, filterParam, }) {
|
|
13
|
+
const headline = title ?? (discountPercent ? `${discountPercent}% off, today only` : "Special sale");
|
|
14
|
+
const href = filterParam
|
|
15
|
+
? `${ROUTES.PUBLIC.PRODUCTS}?${encodeURIComponent(filterParam.key)}=${encodeURIComponent(filterParam.value)}`
|
|
16
|
+
: `${ROUTES.PUBLIC.PRODUCTS}?onSale=true`;
|
|
17
|
+
return (_jsx(Div, { className: "rounded-2xl bg-gradient-to-br from-[var(--appkit-color-primary)] to-[var(--appkit-color-secondary)] p-6 text-white shadow-lg", children: _jsxs(Stack, { gap: "md", children: [_jsxs(Stack, { gap: "xs", children: [_jsx(Heading, { level: 2, className: "text-3xl font-bold", children: headline }), subtitle ? _jsx(Text, { className: "text-base text-white/90", children: subtitle }) : null] }), couponCode ? (_jsxs(Div, { className: "inline-flex items-center gap-3 rounded-lg bg-white/10 px-4 py-2 backdrop-blur", children: [_jsx("span", { className: "text-xs uppercase tracking-wide opacity-80", children: "Code" }), _jsx("span", { className: "font-mono text-lg font-bold", children: couponCode })] })) : null, _jsx(Div, { children: _jsx(Link, { href: href, children: _jsx(Button, { variant: "secondary", children: "Shop the sale" }) }) })] }) }));
|
|
18
|
+
}
|
|
@@ -29,3 +29,9 @@ export { EventRaffleWinnerView } from "./EventRaffleWinnerView";
|
|
|
29
29
|
export type { EventRaffleWinnerViewProps } from "./EventRaffleWinnerView";
|
|
30
30
|
export { SpinWheelView } from "./SpinWheelView";
|
|
31
31
|
export type { SpinWheelViewProps } from "./SpinWheelView";
|
|
32
|
+
export { EventRaffleEntryForm } from "./EventRaffleEntryForm";
|
|
33
|
+
export type { EventRaffleEntryFormProps } from "./EventRaffleEntryForm";
|
|
34
|
+
export { EventSaleBanner } from "./EventSaleBanner";
|
|
35
|
+
export type { EventSaleBannerProps } from "./EventSaleBanner";
|
|
36
|
+
export { EventOfferCard } from "./EventOfferCard";
|
|
37
|
+
export type { EventOfferCardProps } from "./EventOfferCard";
|
|
@@ -15,3 +15,7 @@ export { EventPollWidget } from "./EventPollWidget";
|
|
|
15
15
|
export { EventRafflesSection } from "./EventRafflesSection";
|
|
16
16
|
export { EventRaffleWinnerView } from "./EventRaffleWinnerView";
|
|
17
17
|
export { SpinWheelView } from "./SpinWheelView";
|
|
18
|
+
// W1-18: Event participation flows (raffle entry / sale banner / offer coupon)
|
|
19
|
+
export { EventRaffleEntryForm } from "./EventRaffleEntryForm";
|
|
20
|
+
export { EventSaleBanner } from "./EventSaleBanner";
|
|
21
|
+
export { EventOfferCard } from "./EventOfferCard";
|
|
@@ -7,6 +7,11 @@ declare class EventEntryRepository extends BaseRepository<EventEntryDocument> {
|
|
|
7
7
|
protected mapDoc<D = EventEntryDocument>(snap: import("../../../providers/db-firebase").DocumentSnapshot): D;
|
|
8
8
|
listForEvent(eventId: string, model: SieveModel): Promise<FirebaseSieveResult<EventEntryDocument>>;
|
|
9
9
|
listForUser(userId: string, model: SieveModel): Promise<FirebaseSieveResult<EventEntryDocument>>;
|
|
10
|
+
/**
|
|
11
|
+
* W1-42 — admin-facing list (all events, all users). Filterable on eventId,
|
|
12
|
+
* userId, reviewStatus, submittedAt; sortable on submittedAt + points.
|
|
13
|
+
*/
|
|
14
|
+
list(model: SieveModel): Promise<FirebaseSieveResult<EventEntryDocument>>;
|
|
10
15
|
hasUserEntered(eventId: string, userId: string): Promise<boolean>;
|
|
11
16
|
countUserEntries(eventId: string, userId: string): Promise<number>;
|
|
12
17
|
getLeaderboard(eventId: string, limit?: number): Promise<import("../types").LeaderboardEntry[]>;
|
|
@@ -23,6 +23,13 @@ class EventEntryRepository extends BaseRepository {
|
|
|
23
23
|
baseQuery: this.getCollection().where(EVENT_ENTRY_FIELDS.USER_ID, "==", userId),
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* W1-42 — admin-facing list (all events, all users). Filterable on eventId,
|
|
28
|
+
* userId, reviewStatus, submittedAt; sortable on submittedAt + points.
|
|
29
|
+
*/
|
|
30
|
+
async list(model) {
|
|
31
|
+
return this.sieveQuery(model, EventEntryRepository.SIEVE_FIELDS);
|
|
32
|
+
}
|
|
26
33
|
async hasUserEntered(eventId, userId) {
|
|
27
34
|
try {
|
|
28
35
|
const snapshot = await this.getCollection()
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FacetOption } from "./FilterFacetSection";
|
|
2
|
-
import type { AsyncPage } from "../../ui/components/
|
|
2
|
+
import type { AsyncPage } from "../../ui/components/PaginatedSelect";
|
|
3
3
|
export interface AsyncFacetSectionProps {
|
|
4
4
|
title: string;
|
|
5
5
|
selected: string[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { THEME_CONSTANTS } from "../../../tokens";
|
|
3
|
-
import { Button, Heading, Row, Section, Span, Text } from "../../../ui";
|
|
3
|
+
import { Button, Div, Grid, Heading, Row, Section, Span, Stack, Text } from "../../../ui";
|
|
4
4
|
import { MediaImage } from "../../media/MediaImage";
|
|
5
5
|
import { ArrowRight, Sparkles } from "lucide-react";
|
|
6
6
|
// --- Constants ---------------------------------------------------------------
|
|
@@ -9,17 +9,17 @@ const CLS_CONTAINER = "w-full max-w-7xl mx-auto";
|
|
|
9
9
|
export function AdvertisementBanner({ title, subtitle, ctaLabel = "Shop now", onCtaClick, backgroundImage, backgroundColor, tagLabel, isLoading = false, compact = false, className = "", }) {
|
|
10
10
|
const wrapClass = "bg-gradient-to-br from-amber-50/40 to-orange-50/20 dark:from-amber-950/10 dark:to-orange-950/5";
|
|
11
11
|
if (isLoading) {
|
|
12
|
-
return (_jsx(Section, { className: `p-8 ${wrapClass} ${className}`, children: _jsx(
|
|
12
|
+
return (_jsx(Section, { className: `p-8 ${wrapClass} ${className}`, children: _jsx(Div, { className: CLS_CONTAINER, children: _jsx(Div, { className: "h-72 bg-zinc-200 dark:bg-slate-700 rounded-2xl animate-pulse" }) }) }));
|
|
13
13
|
}
|
|
14
14
|
// -- Split layout: when a backgroundImage is provided --
|
|
15
15
|
if (backgroundImage) {
|
|
16
|
-
return (_jsx(Section, { className: `p-8 ${wrapClass} ${className}`, children: _jsx(
|
|
16
|
+
return (_jsx(Section, { className: `p-8 ${wrapClass} ${className}`, children: _jsx(Div, { className: CLS_CONTAINER, children: _jsx(Div, { className: "relative overflow-hidden rounded-2xl bg-zinc-900 shadow-xl", children: _jsxs(Grid, { className: `${THEME_CONSTANTS.grid.cols2Md} min-h-[clamp(300px,40vh,420px)]`, children: [_jsxs(Div, { className: `relative ${THEME_CONSTANTS.card.aspectBanner} order-last md:order-first min-h-0 min-h-[clamp(300px,40vh,420px)]`, children: [_jsx(MediaImage, { src: backgroundImage, alt: title, size: "banner", priority: true }), _jsx(Div, { className: "hidden md:block absolute inset-y-0 right-0 w-24 bg-gradient-to-r from-transparent to-zinc-900/60 pointer-events-none" })] }), _jsxs(Stack, { className: "relative justify-center px-8 py-10 md:px-12 md:py-14", children: [_jsx(Div, { className: "absolute top-0 right-0 w-32 h-32 opacity-10 pointer-events-none bg-[radial-gradient(circle,_white_1px,_transparent_1px)] bg-[length:12px_12px]", "aria-hidden": true }), tagLabel && (_jsxs(Span, { className: "inline-flex items-center gap-1.5 self-start bg-white/10 text-white/80 text-xs font-semibold uppercase tracking-widest px-3 py-1 rounded-full mb-5 backdrop-blur-sm", children: [_jsx(Sparkles, { className: "w-3.5 h-3.5" }), tagLabel] })), _jsx(Heading, { level: 2, variant: "none", className: "text-3xl md:text-4xl lg:text-5xl font-extrabold text-white mb-4 leading-tight", children: title }), subtitle && (_jsx(Text, { variant: "none", className: "text-white/75 text-base md:text-lg mb-8 leading-relaxed", children: subtitle })), ctaLabel && onCtaClick && (_jsxs(Button, { variant: "secondary", size: "lg", onClick: onCtaClick, className: "self-start bg-white text-zinc-900 hover:bg-zinc-100 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-zinc-200 font-semibold shadow-lg gap-2", children: [ctaLabel, _jsx(ArrowRight, { className: "w-4 h-4" })] }))] })] }) }) }) }));
|
|
17
17
|
}
|
|
18
18
|
// -- Full-width gradient layout --
|
|
19
|
-
return (_jsx(Section, { className: `p-8 ${wrapClass} ${className}`, children: _jsx(
|
|
20
|
-
"relative overflow-hidden rounded-2xl
|
|
19
|
+
return (_jsx(Section, { className: `p-8 ${wrapClass} ${className}`, children: _jsx(Div, { className: CLS_CONTAINER, children: _jsxs(Row, { align: "center", className: [
|
|
20
|
+
"relative overflow-hidden rounded-2xl",
|
|
21
21
|
compact
|
|
22
22
|
? "h-[clamp(112px,16vh,160px)]"
|
|
23
23
|
: "min-h-[clamp(240px,34vh,360px)]",
|
|
24
|
-
].join(" "), style: backgroundColor ? { backgroundColor } : undefined,
|
|
24
|
+
].join(" "), style: backgroundColor ? { backgroundColor } : undefined, children: [!backgroundColor && (_jsx(Div, { className: "absolute inset-0 bg-gradient-to-br from-indigo-600 via-purple-600 to-fuchsia-600", "aria-hidden": true })), _jsxs(Div, { className: "absolute inset-0 overflow-hidden", "aria-hidden": true, children: [_jsx(Div, { className: "absolute -top-16 -left-16 w-64 h-64 rounded-full bg-primary/20 blur-3xl animate-pulse" }), _jsx(Div, { className: "absolute -bottom-16 right-0 w-80 h-80 rounded-full bg-cobalt/20 blur-3xl animate-pulse" })] }), compact ? (_jsxs(Row, { justify: "between", className: "relative z-10 w-full px-6 py-4 gap-4 flex-wrap", children: [_jsxs(Span, { className: "inline-flex items-center gap-2", children: [_jsx(Sparkles, { className: "w-4 h-4 text-white/80" }), _jsx(Span, { className: "text-white font-semibold text-sm", children: title })] }), ctaLabel && onCtaClick && (_jsxs(Button, { variant: "secondary", size: "sm", onClick: onCtaClick, className: "bg-white dark:bg-zinc-100 text-indigo-700 hover:bg-zinc-50 dark:hover:bg-zinc-200 font-semibold gap-1.5 flex-shrink-0", children: [ctaLabel, _jsx(ArrowRight, { className: "w-3.5 h-3.5" })] }))] })) : (_jsxs(Div, { className: "relative z-10 w-full max-w-4xl mx-auto px-6 py-12 md:py-16 text-center", children: [tagLabel && (_jsxs(Span, { className: "inline-flex items-center gap-1.5 bg-white/15 text-white/90 text-xs font-semibold uppercase tracking-widest px-4 py-1.5 rounded-full mb-5 backdrop-blur-sm shadow-sm", children: [_jsx(Sparkles, { className: "w-3.5 h-3.5" }), tagLabel] })), _jsx(Heading, { level: 2, variant: "none", className: "text-3xl md:text-5xl lg:text-6xl font-extrabold text-white mb-4 drop-shadow-lg leading-tight", children: title }), subtitle && (_jsx(Text, { variant: "none", className: "text-white text-base md:text-xl mb-10 max-w-2xl mx-auto", children: subtitle })), ctaLabel && onCtaClick && (_jsxs(Button, { variant: "secondary", size: "lg", onClick: onCtaClick, className: "bg-white dark:bg-zinc-100 text-indigo-700 hover:bg-zinc-50 dark:hover:bg-zinc-200 font-semibold shadow-lg gap-2", children: [ctaLabel, _jsx(ArrowRight, { className: "w-4 h-4" })] }))] }))] }) }) }));
|
|
25
25
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
export interface FAQTab {
|
|
3
2
|
value: string;
|
|
4
3
|
label: string;
|
|
@@ -26,10 +25,6 @@ export interface FAQSectionProps {
|
|
|
26
25
|
viewMoreLabel?: string;
|
|
27
26
|
hasMore?: boolean;
|
|
28
27
|
moreCount?: number;
|
|
29
|
-
/** @deprecated Tabs are now derived internally or from the tabs prop */
|
|
30
|
-
activeTab?: string;
|
|
31
|
-
/** @deprecated Use showCategoryTabs + tabs props instead */
|
|
32
|
-
renderTabs?: () => React.ReactNode;
|
|
33
28
|
className?: string;
|
|
34
29
|
}
|
|
35
30
|
export declare function FAQSection({ title, subtitle, items, tabs: tabsProp, showCategoryTabs, allowMultipleOpen, defaultOpenCount, viewMoreHref, viewMoreLabel, hasMore, moreCount, className, }: FAQSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { THEME_CONSTANTS } from "../../../tokens";
|
|
3
|
-
import { Grid, Section } from "../../../ui";
|
|
3
|
+
import { Div, Grid, Row, Section, Stack } from "../../../ui";
|
|
4
4
|
/** Full-page skeleton shown while homepage data loads. */
|
|
5
5
|
export function HomepageSkeleton() {
|
|
6
6
|
const { skeleton, flex, themed } = THEME_CONSTANTS;
|
|
@@ -9,5 +9,5 @@ export function HomepageSkeleton() {
|
|
|
9
9
|
const trustCardH = "h-[clamp(120px,18vh,170px)]";
|
|
10
10
|
const categoryTileH = "h-[clamp(112px,16vh,160px)]";
|
|
11
11
|
const newsletterH = "h-[clamp(220px,28vh,320px)]";
|
|
12
|
-
return (_jsxs(
|
|
12
|
+
return (_jsxs(Div, { className: "w-full overflow-hidden", children: [_jsx(Div, { className: `${skeleton.card} w-full ${heroSkeletonH}`, "aria-hidden": "true" }), _jsx(Section, { className: `p-8 ${themed.bgPrimary}`, children: _jsx(Grid, { className: "grid-cols-2 md:grid-cols-4 xl:grid-cols-4 2xl:grid-cols-4", children: Array.from({ length: 4 }).map((_, i) => (_jsx(Div, { className: `${skeleton.card} flex flex-col items-center gap-3 p-6 ${trustCardH}` }, i))) }) }), _jsxs(Section, { className: `p-8 ${themed.bgSecondary}`, children: [_jsx(Div, { className: `${skeleton.heading} w-48 mx-auto mb-6` }), _jsx(Grid, { className: "grid-cols-2 sm:grid-cols-4", children: Array.from({ length: 6 }).map((_, i) => (_jsx(Div, { className: `${skeleton.card} ${categoryTileH}` }, i))) })] }), _jsxs(Section, { className: `p-8 ${themed.bgPrimary}`, children: [_jsxs(Row, { className: `${flex.between} mb-6`, children: [_jsx(Div, { className: `${skeleton.heading} w-52` }), _jsx(Div, { className: `${skeleton.text} w-24` })] }), _jsx(Grid, { className: "grid-cols-2 sm:grid-cols-3 md:grid-cols-4 xl:grid-cols-4 2xl:grid-cols-5", children: Array.from({ length: 5 }).map((_, i) => (_jsxs(Stack, { gap: "xs", children: [_jsx(Div, { className: `${skeleton.image} w-full pb-[100%]` }), _jsx(Div, { className: `${skeleton.text} w-3/4` }), _jsx(Div, { className: `${skeleton.text} w-1/2` })] }, i))) })] }), _jsxs(Section, { className: `p-8 ${themed.bgSecondary}`, children: [_jsxs(Row, { className: `${flex.between} mb-6`, children: [_jsx(Div, { className: `${skeleton.heading} w-56` }), _jsx(Div, { className: `${skeleton.text} w-24` })] }), _jsx(Grid, { className: "grid-cols-2 sm:grid-cols-3 md:grid-cols-4 xl:grid-cols-4 2xl:grid-cols-5", children: Array.from({ length: 5 }).map((_, i) => (_jsxs(Stack, { gap: "xs", children: [_jsx(Div, { className: `${skeleton.image} w-full pb-[100%]` }), _jsx(Div, { className: `${skeleton.text} w-3/4` }), _jsx(Div, { className: `${skeleton.text} w-1/2` })] }, i))) })] }), _jsx(Section, { className: `p-8 ${themed.bgPrimary}`, children: _jsx(Div, { className: `${skeleton.card} rounded-2xl max-w-2xl mx-auto ${newsletterH}` }) })] }));
|
|
13
13
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { THEME_CONSTANTS } from "../../../tokens";
|
|
4
|
-
import { Button, Grid, Heading, Row, Section, SiteLogo, Span, Text, TextLink } from "../../../ui";
|
|
4
|
+
import { Button, Div, Grid, Heading, Row, Section, SiteLogo, Span, Text, TextLink } from "../../../ui";
|
|
5
5
|
// --- Component ---------------------------------------------------------------
|
|
6
6
|
export function WelcomeSection({ title, subtitle, pillLabel, showCTA = true, ctaLabel = "Shop now", ctaHref, onCtaClick, secondaryCtaLabel = "Browse products", secondaryCtaHref, onSecondaryCtaClick, trustChips = [], isLoading = false, brandLogoText = "", className = "", }) {
|
|
7
7
|
const { themed, flex } = THEME_CONSTANTS;
|
|
8
8
|
if (isLoading) {
|
|
9
|
-
return (_jsx(Section, { className: `relative overflow-hidden py-16 md:py-24 px-4 ${className}`, children: _jsxs(
|
|
9
|
+
return (_jsx(Section, { className: `relative overflow-hidden py-16 md:py-24 px-4 ${className}`, children: _jsxs(Div, { className: "animate-pulse max-w-4xl mx-auto text-center", children: [_jsx(Div, { className: "h-6 bg-zinc-200 dark:bg-slate-700 rounded-full w-52 mx-auto mb-6" }), _jsx(Div, { className: "h-20 bg-zinc-200 dark:bg-slate-700 rounded-lg mb-4 max-w-2xl mx-auto" }), _jsx(Div, { className: "h-6 bg-zinc-200 dark:bg-slate-700 rounded-lg mb-8 max-w-lg mx-auto" }), _jsxs(Row, { justify: "center", gap: "md", children: [_jsx(Div, { className: "h-12 bg-zinc-200 dark:bg-slate-700 rounded-xl w-36" }), _jsx(Div, { className: "h-12 bg-zinc-200 dark:bg-slate-700 rounded-xl w-36" })] })] }) }));
|
|
10
10
|
}
|
|
11
|
-
return (_jsxs(Section, { className: `relative overflow-hidden py-20 md:py-28 px-4 ${className}`, children: [_jsx(
|
|
11
|
+
return (_jsxs(Section, { className: `relative overflow-hidden py-20 md:py-28 px-4 ${className}`, children: [_jsx(Div, { className: "pointer-events-none absolute -top-32 -left-32 w-[28rem] h-[28rem] rounded-full bg-primary/10 blur-3xl", "aria-hidden": "true" }), _jsx(Div, { className: "pointer-events-none absolute -bottom-40 -right-40 w-[36rem] h-[36rem] rounded-full bg-secondary/10 dark:bg-secondary/15 blur-3xl", "aria-hidden": "true" }), _jsx(Div, { className: "relative z-10 max-w-7xl mx-auto", children: _jsxs(Grid, { gap: "2xl", className: "grid-cols-1 lg:grid-cols-2 xl:grid-cols-2 2xl:grid-cols-2 items-center", children: [_jsxs(Div, { className: "text-center lg:text-left", children: [pillLabel && (_jsx(Div, { children: _jsxs(Span, { className: "inline-flex items-center gap-2 rounded-full border border-primary-500/30 bg-primary-500/10 px-5 py-1.5 text-xs font-medium tracking-[0.2em] uppercase text-primary-700 dark:text-primary-400 backdrop-blur-sm", children: [_jsx(Span, { className: "w-1.5 h-1.5 rounded-full bg-primary-500 inline-block", "aria-hidden": "true" }), pillLabel, _jsx(Span, { className: "w-1.5 h-1.5 rounded-full bg-primary-500 inline-block", "aria-hidden": "true" })] }) })), _jsx(Heading, { level: 1, variant: "none", className: "mt-4 font-display text-5xl md:text-6xl lg:text-7xl xl:text-8xl bg-gradient-to-r from-primary-700 via-cobalt to-secondary-400 dark:from-primary dark:via-cobalt-400 dark:to-primary-300 bg-clip-text text-transparent leading-[1.1] tracking-tight", children: title }), subtitle && (_jsx(Text, { className: `mt-4 text-xl ${themed.textSecondary} max-w-xl leading-relaxed mx-auto lg:mx-0`, children: subtitle })), showCTA && (_jsxs(Row, { wrap: true, gap: "md", className: "mt-8 justify-center lg:justify-start", children: [ctaHref ? (_jsx(TextLink, { href: ctaHref, className: "inline-flex items-center justify-center rounded-xl px-8 py-3.5 text-base font-bold !bg-primary hover:!bg-primary-600 text-white dark:!bg-primary dark:hover:!bg-primary-600 dark:text-white btn-glow transition-all hover:scale-[1.02]", children: ctaLabel })) : (_jsx(Button, { variant: "primary", size: "lg", onClick: onCtaClick, children: ctaLabel })), secondaryCtaHref ? (_jsx(TextLink, { href: secondaryCtaHref, className: "inline-flex items-center justify-center rounded-xl border-2 border-cobalt/40 dark:border-cobalt-400/40 px-8 py-3.5 text-base font-semibold text-cobalt-700 dark:text-cobalt-300 hover:bg-cobalt-50 dark:hover:bg-cobalt-900/20 transition-all hover:scale-[1.02]", children: secondaryCtaLabel })) : (_jsx(Button, { variant: "outline", size: "lg", onClick: onSecondaryCtaClick, children: secondaryCtaLabel }))] })), trustChips.length > 0 && (_jsx(Row, { wrap: true, gap: "sm", className: "mt-6 justify-center lg:justify-start", children: trustChips.map((chip) => (_jsxs(Span, { className: "inline-flex items-center gap-1.5 bg-zinc-100 dark:bg-slate-800 border border-zinc-200 dark:border-slate-700 rounded-full px-3.5 py-1.5 text-xs font-medium text-zinc-700 dark:text-zinc-300", children: [chip.emoji, " ", chip.label] }, chip.key))) }))] }), _jsx(Div, { className: "hidden lg:block", children: _jsxs(Div, { className: `relative rounded-3xl overflow-hidden aspect-[4/3] bg-gradient-to-br from-primary-100 via-cobalt-100/60 to-secondary-100 dark:from-primary-950/60 dark:via-cobalt-950/40 dark:to-secondary-950/60 border ${themed.border} shadow-2xl`, children: [_jsx(Div, { className: "absolute inset-0 bg-gradient-to-br from-primary/5 via-transparent to-cobalt/5" }), _jsx(Row, { centered: true, className: `absolute inset-0 ${flex.center} px-10`, children: _jsx(SiteLogo, { title: brandLogoText || "LetItRip.in", className: "h-24 xl:h-32 2xl:h-40 max-w-full" }) })] }) })] }) })] }));
|
|
12
12
|
}
|
|
@@ -70,7 +70,7 @@ export async function fetchLiveStats(requests) {
|
|
|
70
70
|
tasks.push((async () => {
|
|
71
71
|
try {
|
|
72
72
|
const db = getAdminDb();
|
|
73
|
-
|
|
73
|
+
const ref = db.collection(collection);
|
|
74
74
|
const query = filterField !== undefined && filterValue !== undefined
|
|
75
75
|
? ref.where(filterField, "==", filterValue)
|
|
76
76
|
: ref;
|