@mohasinac/appkit 2.7.58 → 2.8.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/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/scams/og.js +1 -1
- 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/_internal/shared/actions/bulk-helpers.d.ts +3 -0
- package/dist/_internal/shared/actions/bulk-helpers.js +19 -0
- package/dist/_internal/shared/config/schema.d.ts +4 -4
- package/dist/client.d.ts +13 -6
- package/dist/client.js +9 -3
- package/dist/configs/next.js +11 -0
- 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/account/components/AddressesIndexListing.js +3 -4
- package/dist/features/account/components/UserOffersPanel.js +1 -1
- package/dist/features/account/components/UserSidebar.js +14 -10
- 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 -89
- package/dist/features/admin/components/AdminBidsView.d.ts +2 -3
- package/dist/features/admin/components/AdminBidsView.js +64 -104
- package/dist/features/admin/components/AdminBlogView.d.ts +3 -7
- package/dist/features/admin/components/AdminBlogView.js +53 -88
- package/dist/features/admin/components/AdminBrandEditorView.js +14 -17
- package/dist/features/admin/components/AdminBrandsView.d.ts +2 -3
- package/dist/features/admin/components/AdminBrandsView.js +85 -89
- package/dist/features/admin/components/AdminBundlesView.js +68 -130
- package/dist/features/admin/components/AdminCarouselView.d.ts +2 -2
- package/dist/features/admin/components/AdminCarouselView.js +22 -70
- package/dist/features/admin/components/AdminCartsView.d.ts +2 -3
- package/dist/features/admin/components/AdminCartsView.js +39 -89
- package/dist/features/admin/components/AdminCategoriesView.d.ts +3 -3
- package/dist/features/admin/components/AdminCategoriesView.js +97 -96
- package/dist/features/admin/components/AdminCategoryEditorView.js +2 -6
- 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 +105 -130
- package/dist/features/admin/components/AdminCouponEditorView.js +14 -17
- package/dist/features/admin/components/AdminCouponsView.d.ts +3 -6
- package/dist/features/admin/components/AdminCouponsView.js +69 -97
- package/dist/features/admin/components/AdminDigitalCodesView.d.ts +3 -0
- package/dist/features/admin/components/AdminDigitalCodesView.js +51 -0
- package/dist/features/admin/components/AdminFaqEditorView.js +14 -17
- package/dist/features/admin/components/AdminFaqsView.d.ts +4 -4
- package/dist/features/admin/components/AdminFaqsView.js +79 -86
- package/dist/features/admin/components/AdminFeatureEditorView.js +7 -9
- 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 +68 -108
- package/dist/features/admin/components/AdminNotificationsView.d.ts +2 -3
- package/dist/features/admin/components/AdminNotificationsView.js +67 -99
- 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 -113
- package/dist/features/admin/components/AdminPayoutsView.d.ts +2 -3
- package/dist/features/admin/components/AdminPayoutsView.js +51 -97
- package/dist/features/admin/components/AdminPrizeDrawsView.d.ts +2 -3
- package/dist/features/admin/components/AdminPrizeDrawsView.js +41 -83
- package/dist/features/admin/components/AdminProductEditorView.js +3 -7
- package/dist/features/admin/components/AdminProductsView.d.ts +4 -4
- package/dist/features/admin/components/AdminProductsView.js +166 -167
- 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 -116
- package/dist/features/admin/components/AdminScammersView.d.ts +2 -3
- package/dist/features/admin/components/AdminScammersView.js +53 -103
- 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 -95
- 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 -105
- package/dist/features/admin/components/AdminSublistingCategoriesView.d.ts +1 -1
- package/dist/features/admin/components/AdminSublistingCategoriesView.js +29 -49
- package/dist/features/admin/components/AdminSublistingCategoryEditorView.js +17 -20
- 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 -102
- package/dist/features/admin/components/AdminTeamView.d.ts +2 -2
- package/dist/features/admin/components/AdminTeamView.js +42 -85
- package/dist/features/admin/components/AdminUserEditorView.d.ts +11 -1
- package/dist/features/admin/components/AdminUserEditorView.js +80 -6
- package/dist/features/admin/components/AdminUsersView.d.ts +2 -3
- package/dist/features/admin/components/AdminUsersView.js +108 -106
- package/dist/features/admin/components/AdminViewCards.d.ts +1 -1
- 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 +59 -0
- package/dist/features/admin/hooks/useAdminListing.js +71 -0
- 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/auth/schemas/firestore.d.ts +1 -0
- package/dist/features/blog/components/BlogIndexListing.js +3 -6
- package/dist/features/cart/repository/cart.repository.d.ts +4 -1
- package/dist/features/cart/repository/cart.repository.js +12 -0
- package/dist/features/categories/components/CategoriesIndexListing.js +3 -6
- package/dist/features/checkout/hooks/useCheckoutApi.d.ts +0 -2
- package/dist/features/checkout/index.d.ts +1 -1
- package/dist/features/events/components/AdminEventsView.d.ts +3 -3
- package/dist/features/events/components/AdminEventsView.js +50 -86
- 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/EventsIndexListing.js +3 -4
- 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/filters/AsyncFacetSection.d.ts +1 -1
- package/dist/features/homepage/components/AnnouncementBar.d.ts +4 -1
- package/dist/features/homepage/components/AnnouncementBar.js +51 -4
- package/dist/features/homepage/components/FAQSection.d.ts +0 -5
- package/dist/features/homepage/components/MarketplaceHomepageView.d.ts +3 -1
- package/dist/features/homepage/components/MarketplaceHomepageView.js +2 -2
- package/dist/features/homepage/components/index.d.ts +1 -1
- package/dist/features/homepage/components/index.js +1 -1
- package/dist/features/homepage/lib/live-stats.js +1 -1
- package/dist/features/homepage/lib/section-renderer.d.ts +2 -2
- package/dist/features/homepage/lib/section-renderer.js +2 -2
- package/dist/features/homepage/schemas/firestore.d.ts +0 -2
- package/dist/features/layout/index.d.ts +0 -2
- package/dist/features/layout/index.js +0 -1
- package/dist/features/orders/repository/orders.repository.d.ts +0 -1
- package/dist/features/orders/repository/orders.repository.js +0 -1
- package/dist/features/orders/server.d.ts +1 -1
- package/dist/features/orders/server.js +1 -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 +65 -49
- 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 +14 -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/repository/products.repository.d.ts +0 -2
- package/dist/features/products/repository/products.repository.js +0 -2
- 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/server.d.ts +1 -1
- package/dist/features/products/server.js +1 -1
- package/dist/features/products/types/index.d.ts +4 -0
- package/dist/features/promotions/components/CouponCard.js +5 -5
- package/dist/features/promotions/components/CouponsIndexListing.js +3 -2
- package/dist/features/promotions/server.d.ts +0 -1
- package/dist/features/promotions/server.js +0 -1
- package/dist/features/reviews/components/ReviewsIndexListing.js +3 -4
- package/dist/features/reviews/repository/reviews.repository.d.ts +0 -1
- package/dist/features/reviews/repository/reviews.repository.js +0 -1
- package/dist/features/reviews/server.d.ts +1 -1
- package/dist/features/reviews/server.js +1 -1
- 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 +10 -20
- package/dist/features/seller/components/SellerAuctionsView.d.ts +3 -3
- package/dist/features/seller/components/SellerAuctionsView.js +67 -106
- package/dist/features/seller/components/SellerBidsView.js +6 -6
- package/dist/features/seller/components/SellerBundlesView.js +72 -105
- package/dist/features/seller/components/SellerClassifiedView.js +74 -105
- 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 +51 -96
- package/dist/features/seller/components/SellerDigitalCodesView.js +70 -103
- package/dist/features/seller/components/SellerGroupedListingsView.js +34 -54
- package/dist/features/seller/components/SellerLiveView.js +70 -99
- 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 -70
- package/dist/features/seller/components/SellerOrdersView.d.ts +2 -2
- package/dist/features/seller/components/SellerOrdersView.js +10 -24
- package/dist/features/seller/components/SellerPayoutMethodsView.js +12 -24
- package/dist/features/seller/components/SellerPayoutsView.d.ts +2 -2
- package/dist/features/seller/components/SellerPayoutsView.js +34 -69
- package/dist/features/seller/components/SellerPreOrdersView.d.ts +2 -2
- package/dist/features/seller/components/SellerPreOrdersView.js +55 -97
- package/dist/features/seller/components/SellerPrizeDrawsView.d.ts +2 -2
- package/dist/features/seller/components/SellerPrizeDrawsView.js +55 -97
- package/dist/features/seller/components/SellerProductShell.d.ts +1 -1
- package/dist/features/seller/components/SellerProductsFilterDrawer.d.ts +1 -1
- package/dist/features/seller/components/SellerProductsFilterDrawer.js +3 -6
- package/dist/features/seller/components/SellerProductsView.d.ts +2 -2
- package/dist/features/seller/components/SellerProductsView.js +24 -32
- package/dist/features/seller/components/SellerShippingConfigsView.js +12 -24
- 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 +15 -34
- package/dist/features/seller/components/SellerTemplatesView.js +27 -43
- 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 +4 -1
- 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/StoreReviewsListing.js +3 -4
- 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/components/StoresIndexListing.js +3 -4
- 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 +11 -33
- package/dist/index.js +17 -62
- package/dist/next/routing/route-map.d.ts +8 -0
- package/dist/next/routing/route-map.js +4 -0
- package/dist/react/contexts/SessionContext.d.ts +2 -0
- package/dist/react/contexts/SessionContext.js +2 -0
- package/dist/react/hooks/useEntityDelete.d.ts +15 -0
- package/dist/react/hooks/useEntityDelete.js +39 -0
- package/dist/react/hooks/useListingTypeFlags.d.ts +32 -0
- package/dist/react/hooks/useListingTypeFlags.js +19 -0
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.js +2 -0
- package/dist/repositories/index.d.ts +3 -3
- package/dist/repositories/index.js +3 -3
- 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/ListingFilterDrawer.d.ts +10 -0
- package/dist/ui/components/ListingFilterDrawer.js +8 -0
- 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 +14 -14
- package/dist/ui/index.js +7 -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
package/dist/index.d.ts
CHANGED
|
@@ -64,18 +64,14 @@ export type { DrawerMode } from "./ui/index";
|
|
|
64
64
|
export type { DrawerProps } from "./ui/index";
|
|
65
65
|
export type { DropdownMenuItem } from "./ui/index";
|
|
66
66
|
export type { DropdownProps } from "./ui/index";
|
|
67
|
-
export type {
|
|
68
|
-
export type {
|
|
69
|
-
export
|
|
70
|
-
export { InlineCreateSelect } from "./ui/index";
|
|
71
|
-
export type { PaginatedMultiSelectProps } from "./ui/index";
|
|
72
|
-
export { PaginatedMultiSelect } from "./ui/index";
|
|
67
|
+
export type { PaginatedSelectOption } from "./ui/index";
|
|
68
|
+
export type { PaginatedSelectProps } from "./ui/index";
|
|
69
|
+
export { PaginatedSelect } from "./ui/index";
|
|
73
70
|
export { EmptyState } from "./ui/index";
|
|
74
71
|
export type { EmptyStateProps } from "./ui/index";
|
|
75
72
|
export type { FilterDrawerProps } from "./ui/index";
|
|
76
73
|
export type { FlowDiagramProps } from "./ui/index";
|
|
77
74
|
export type { FlowStep } from "./ui/index";
|
|
78
|
-
export type { FooterProps } from "./ui/index";
|
|
79
75
|
export type { FormActionsProps } from "./ui/index";
|
|
80
76
|
export type { FormFieldProps } from "./ui/index";
|
|
81
77
|
export type { FormFieldSpanProps } from "./ui/index";
|
|
@@ -113,9 +109,6 @@ export { generateOrderId } from "./utils/index";
|
|
|
113
109
|
export { generatePayoutId } from "./utils/index";
|
|
114
110
|
export { generatePreOrderId } from "./utils/index";
|
|
115
111
|
export { generateProductId } from "./utils/index";
|
|
116
|
-
export { generateProductImageFilename } from "./utils/index";
|
|
117
|
-
export { generateStoreBannerFilename } from "./utils/index";
|
|
118
|
-
export { generateStoreLogoFilename } from "./utils/index";
|
|
119
112
|
export { getBusinessDaysElapsed } from "./utils/index";
|
|
120
113
|
export { getBusinessDaysRemaining } from "./utils/index";
|
|
121
114
|
export { inferMediaTypeFromMime } from "./utils/index";
|
|
@@ -501,12 +494,9 @@ export { FirebaseFAQsRepository } from "./repositories/index";
|
|
|
501
494
|
export { NewsletterRepository } from "./repositories/index";
|
|
502
495
|
export { OfferRepository } from "./repositories/index";
|
|
503
496
|
export { OrderRepository } from "./repositories/index";
|
|
504
|
-
export { OrdersRepository } from "./repositories/index";
|
|
505
497
|
export { PasswordResetTokenRepository } from "./repositories/index";
|
|
506
498
|
export { ProductRepository } from "./repositories/index";
|
|
507
|
-
export { ProductsRepository } from "./repositories/index";
|
|
508
499
|
export { ReviewRepository } from "./repositories/index";
|
|
509
|
-
export { ReviewsRepository } from "./repositories/index";
|
|
510
500
|
export { SessionRepository } from "./repositories/index";
|
|
511
501
|
export { SmsCounterRepository } from "./repositories/index";
|
|
512
502
|
export { StoreRepository } from "./repositories/index";
|
|
@@ -1110,6 +1100,9 @@ export type { QuickEditAction, QuickEditMenuProps } from "./features/admin/index
|
|
|
1110
1100
|
export { AdminPageHeader } from "./features/admin/index";
|
|
1111
1101
|
export { AdminPayoutsView } from "./features/admin/index";
|
|
1112
1102
|
export { AdminPrizeDrawsView } from "./features/admin/index";
|
|
1103
|
+
export { AdminClassifiedView } from "./features/admin/index";
|
|
1104
|
+
export { AdminDigitalCodesView } from "./features/admin/index";
|
|
1105
|
+
export { AdminLiveView } from "./features/admin/index";
|
|
1113
1106
|
export type { AdminPrizeDrawsViewProps } from "./features/admin/index";
|
|
1114
1107
|
export { AdminProductsView } from "./features/admin/index";
|
|
1115
1108
|
export { AdminProductEditorView } from "./features/admin/index";
|
|
@@ -1162,7 +1155,6 @@ export { DEFAULT_NOTIFICATION_DATA } from "./features/admin/index";
|
|
|
1162
1155
|
export { DEFAULT_SITE_SETTINGS_DATA } from "./features/admin/index";
|
|
1163
1156
|
export { DEFAULT_TRUST_BAR_ITEMS } from "./features/admin/index";
|
|
1164
1157
|
export { DashboardStatsGrid } from "./features/admin/index";
|
|
1165
|
-
export { DemoSeedView } from "./features/admin/index";
|
|
1166
1158
|
export { AdminTeamView } from "./features/admin/index";
|
|
1167
1159
|
export { AdminEmployeeEditorView } from "./features/admin/index";
|
|
1168
1160
|
export { AdminSupportTicketsView } from "./features/admin/index";
|
|
@@ -1185,7 +1177,6 @@ export { useCreateChatRoom } from "./features/admin/index";
|
|
|
1185
1177
|
export { useDashboardStats } from "./features/admin/index";
|
|
1186
1178
|
export { useDeleteChatRoom } from "./features/admin/index";
|
|
1187
1179
|
export { useAdminListingData } from "./features/admin/index";
|
|
1188
|
-
export { AdminListingScaffold } from "./features/admin/index";
|
|
1189
1180
|
export { toRecordArray } from "./features/admin/index";
|
|
1190
1181
|
export { toStringValue } from "./features/admin/index";
|
|
1191
1182
|
export { toRelativeDate } from "./features/admin/index";
|
|
@@ -1240,7 +1231,6 @@ export type { ChatRoomCreateInput } from "./features/admin/index";
|
|
|
1240
1231
|
export type { ChatRoomDocument } from "./features/admin/index";
|
|
1241
1232
|
export type { ChatRoomUpdateInput } from "./features/admin/index";
|
|
1242
1233
|
export type { DashboardStats } from "./features/admin/index";
|
|
1243
|
-
export type { DemoSeedViewProps } from "./features/admin/index";
|
|
1244
1234
|
export type { AdminTeamViewProps } from "./features/admin/index";
|
|
1245
1235
|
export type { AdminEmployeeEditorViewProps } from "./features/admin/index";
|
|
1246
1236
|
export type { AdminSupportTicketsViewProps } from "./features/admin/index";
|
|
@@ -1358,7 +1348,6 @@ export type { PlaceBidPayload } from "./features/auctions/index";
|
|
|
1358
1348
|
export type { PublicBid } from "./features/auctions/index";
|
|
1359
1349
|
export type { RealtimeBidData } from "./features/auctions/index";
|
|
1360
1350
|
export type { UseRealtimeBidsReturn } from "./features/auctions/index";
|
|
1361
|
-
export { AuctionsRepository } from "./features/auctions/server";
|
|
1362
1351
|
export { GET } from "./features/auctions/server";
|
|
1363
1352
|
export { bidsGET } from "./features/auctions/server";
|
|
1364
1353
|
export { getBidById } from "./features/auctions/server";
|
|
@@ -1466,7 +1455,6 @@ export { buildBeforeAfterColumns } from "./features/before-after/index";
|
|
|
1466
1455
|
export { useBeforeAfter } from "./features/before-after/index";
|
|
1467
1456
|
export type { BeforeAfterItem } from "./features/before-after/index";
|
|
1468
1457
|
export type { BeforeAfterListResponse } from "./features/before-after/index";
|
|
1469
|
-
export { BeforeAfterRepository } from "./features/before-after/server";
|
|
1470
1458
|
export { BLOG_ADMIN_SORT_OPTIONS } from "./features/blog/index";
|
|
1471
1459
|
export { BLOG_FILTER_KEYS } from "./features/blog/index";
|
|
1472
1460
|
export { BLOG_POSTS_COLLECTION } from "./features/blog/index";
|
|
@@ -1674,7 +1662,6 @@ export { useCollection } from "./features/collections/index";
|
|
|
1674
1662
|
export { useCollections } from "./features/collections/index";
|
|
1675
1663
|
export type { CollectionItem } from "./features/collections/index";
|
|
1676
1664
|
export type { CollectionListItem } from "./features/collections/index";
|
|
1677
|
-
export { CollectionsRepository } from "./features/collections/server";
|
|
1678
1665
|
export { ConsultationForm } from "./features/consultation/index";
|
|
1679
1666
|
export { bookConsultationSchema } from "./features/consultation/index";
|
|
1680
1667
|
export { buildConsultationColumns } from "./features/consultation/index";
|
|
@@ -2305,7 +2292,6 @@ export type { PreOrderItem } from "./features/pre-orders/index";
|
|
|
2305
2292
|
export type { PreOrderStatus } from "./features/pre-orders/index";
|
|
2306
2293
|
export type { PreorderItem } from "./features/pre-orders/index";
|
|
2307
2294
|
export type { PreorderStatus } from "./features/pre-orders/index";
|
|
2308
|
-
export { PreordersRepository } from "./features/pre-orders/server";
|
|
2309
2295
|
export { preOrdersGET } from "./features/pre-orders/server";
|
|
2310
2296
|
export { preOrdersPOST } from "./features/pre-orders/server";
|
|
2311
2297
|
export { AuctionDetailView } from "./features/products/index";
|
|
@@ -2384,6 +2370,7 @@ export { isListingTypeEnabled, isCategoryTypeEnabled, enabledListingTypes, enabl
|
|
|
2384
2370
|
export { actionTracker, setActionTrackerSink, resetActionTrackerSink, type ActionEvent, type ActionTrackerSink, } from "./_internal/shared/listing-types/action-tracker";
|
|
2385
2371
|
export { cartRequiresShipping, cartIsDigitalOnly, cartIsChatOnly, } from "./_internal/shared/listing-types/cart-shipping";
|
|
2386
2372
|
export { ACTIONS, action, act, canPerformAction, actionsForListingType, actionLabel, type ActionDef, type ActionKind, type ActionResource, type ActionTree, type ActionConfirmation, } from "./_internal/shared/actions/action-registry";
|
|
2373
|
+
export { buildBulkAction } from "./_internal/shared/actions/bulk-helpers";
|
|
2387
2374
|
export { isAdminUser, isSellerUser, isModeratorUser, isEmployeeUser, isBuyerUser, } from "./features/auth/role-predicates";
|
|
2388
2375
|
export { sanitizeProductForPublic, sanitizeProductsForPublic } from "./features/products/index";
|
|
2389
2376
|
export { productAdminColumns } from "./features/products/index";
|
|
@@ -2501,7 +2488,6 @@ export type { RestrictionsConfig } from "./features/promotions/index";
|
|
|
2501
2488
|
export type { TieredDiscount } from "./features/promotions/index";
|
|
2502
2489
|
export type { UsageConfig } from "./features/promotions/index";
|
|
2503
2490
|
export type { ValidityConfig } from "./features/promotions/index";
|
|
2504
|
-
export { PromotionsRepository } from "./features/promotions/server";
|
|
2505
2491
|
export { getPromotions } from "./features/promotions/server";
|
|
2506
2492
|
export { promotionsGET } from "./features/promotions/server";
|
|
2507
2493
|
export { sellerCreateCoupon } from "./features/promotions/server";
|
|
@@ -2651,8 +2637,6 @@ export type { SellerPrizeDrawsViewProps } from "./features/seller/index";
|
|
|
2651
2637
|
export { SellerProductsView } from "./features/seller/index";
|
|
2652
2638
|
export { SellerRevenueChart } from "./features/seller/index";
|
|
2653
2639
|
export { SellerShippingView } from "./features/seller/index";
|
|
2654
|
-
export { SellerSidebar } from "./features/seller/index";
|
|
2655
|
-
export { SellerStatCard } from "./features/seller/index";
|
|
2656
2640
|
export { SellerStoreSetupView } from "./features/seller/index";
|
|
2657
2641
|
export { SellerStoreView } from "./features/seller/index";
|
|
2658
2642
|
export { SellerStorefrontView } from "./features/seller/index";
|
|
@@ -2713,7 +2697,6 @@ export type { SellerDashboardViewProps } from "./features/seller/index";
|
|
|
2713
2697
|
export type { SellerEditProductViewProps } from "./features/seller/index";
|
|
2714
2698
|
export type { SellerGuideViewProps } from "./features/seller/index";
|
|
2715
2699
|
export type { SellerListResponse } from "./features/seller/index";
|
|
2716
|
-
export type { SellerNavItem } from "./features/seller/index";
|
|
2717
2700
|
export type { SellerOffersViewProps } from "./features/seller/index";
|
|
2718
2701
|
export type { SellerOrdersViewProps } from "./features/seller/index";
|
|
2719
2702
|
export type { SellerPayoutHistoryTableLabels } from "./features/seller/index";
|
|
@@ -2749,8 +2732,6 @@ export type { SellerStorefrontViewProps as StoreStorefrontViewProps } from "./fe
|
|
|
2749
2732
|
export type { StoreStatus } from "./features/seller/index";
|
|
2750
2733
|
export type { UpdateSellerStoreInput } from "./features/seller/index";
|
|
2751
2734
|
export type { UseBecomeSellerOptions } from "./features/seller/index";
|
|
2752
|
-
export { PayoutsRepository } from "./features/seller/server";
|
|
2753
|
-
export { SellerRepository } from "./features/seller/server";
|
|
2754
2735
|
export { acceptCounterOffer } from "./features/seller/server";
|
|
2755
2736
|
export { becomeSeller } from "./features/seller/server";
|
|
2756
2737
|
export { bulkSellerOrder } from "./features/seller/server";
|
|
@@ -2884,7 +2865,6 @@ export type { StoreReview } from "./features/stores/index";
|
|
|
2884
2865
|
export type { StoreReviewsData } from "./features/stores/index";
|
|
2885
2866
|
export type { StoreReviewsViewProps } from "./features/stores/index";
|
|
2886
2867
|
export type { StoreTab } from "./features/stores/index";
|
|
2887
|
-
export { StoresRepository } from "./features/stores/server";
|
|
2888
2868
|
export { createStoreAddressForSeller } from "./features/stores/server";
|
|
2889
2869
|
export { deleteStoreAddressForSeller } from "./features/stores/server";
|
|
2890
2870
|
export { getStoreAuctions } from "./features/stores/server";
|
|
@@ -2938,7 +2918,6 @@ export type { WishlistTab } from "./features/wishlist/index";
|
|
|
2938
2918
|
export type { WishlistToggleActions } from "./features/wishlist/index";
|
|
2939
2919
|
export type { WishlistViewProps } from "./features/wishlist/index";
|
|
2940
2920
|
export { UserWishlistRepository } from "./features/wishlist/server";
|
|
2941
|
-
export { WishlistRepository } from "./features/wishlist/server";
|
|
2942
2921
|
export { addToWishlist } from "./features/wishlist/server";
|
|
2943
2922
|
export { getWishlistForUser } from "./features/wishlist/server";
|
|
2944
2923
|
export { removeFromWishlist } from "./features/wishlist/server";
|
|
@@ -2972,7 +2951,6 @@ export type { CategoriesSectionConfig } from "./features/homepage/schemas/index"
|
|
|
2972
2951
|
export type { EventsSectionConfig } from "./features/homepage/schemas/index";
|
|
2973
2952
|
export type { FAQSectionConfig } from "./features/homepage/schemas/index";
|
|
2974
2953
|
export type { FeaturesSectionConfig } from "./features/homepage/schemas/index";
|
|
2975
|
-
export type { GridCard } from "./features/homepage/schemas/index";
|
|
2976
2954
|
export type { GridCardCreateInput } from "./features/homepage/schemas/index";
|
|
2977
2955
|
export type { HomepageSectionCreateInput } from "./features/homepage/schemas/index";
|
|
2978
2956
|
export type { HomepageSectionDocument } from "./features/homepage/schemas/index";
|
|
@@ -2990,9 +2968,9 @@ export { Button } from "./ui/index";
|
|
|
2990
2968
|
export { Heading, Spinner, IconButton, Progress, IndeterminateProgress, Pagination, PageLoader } from "./ui/index";
|
|
2991
2969
|
export { ModalFooter, UnsavedChangesModal, ResponsiveView, Textarea, Checkbox } from "./ui/index";
|
|
2992
2970
|
export { ToastProvider, StarRating, StepperNav, ViewToggle, PriceDisplay, SummaryCard } from "./ui/index";
|
|
2993
|
-
export { CountdownDisplay, ItemRow, HorizontalScroller,
|
|
2971
|
+
export { CountdownDisplay, ItemRow, HorizontalScroller, TabStrip } from "./ui/index";
|
|
2994
2972
|
export { CardBody, MenuTrigger, MenuContent, MenuSeparator, RoleBadge, SkipToMain } from "./ui/index";
|
|
2995
|
-
export { TabsList, TabsContent, PasswordStrengthIndicator,
|
|
2973
|
+
export { TabsList, TabsContent, PasswordStrengthIndicator, TablePagination } from "./ui/index";
|
|
2996
2974
|
export { Stack, classNames, mergeTailwindClasses, SideModal, SideDrawer, RichText, RichTextRenderer } from "./ui/index";
|
|
2997
2975
|
export type { RichTextRendererProps } from "./ui/index";
|
|
2998
2976
|
export { SlottedListingView, DetailViewShell, StackedViewShell } from "./ui/index";
|
|
@@ -3006,7 +2984,7 @@ export { API_ENDPOINTS, API_ROUTES, LOGS_ENDPOINTS, AUTH_ENDPOINTS, ACCOUNT_ENDP
|
|
|
3006
2984
|
export { WishlistFullError } from "./features/wishlist/server";
|
|
3007
2985
|
export { useHistory, useHistoryMergeOnLogin, getGuestHistory, trackGuestHistory, removeGuestHistoryItem, clearGuestHistory, getGuestHistoryCount, type GuestHistoryItem, type GuestHistoryType, type UserHistoryItem, type HistoryProductType, type HistoryItemSnapshot, type TrackArgs as TrackHistoryArgs, } from "./features/history";
|
|
3008
2986
|
export { historyRepository, UserHistoryRepository, trackHistoryView, getHistoryForUser, removeHistoryItem, clearHistory, mergeGuestHistory, } from "./features/history/server";
|
|
3009
|
-
export { useMediaQuery, useBreakpoint, useClickOutside, useKeyPress, useLongPress, useGesture, useSwipe, ThemeProvider, useTheme, useSession, useAuth, useCountdown, useCamera, useBulkSelection, useUrlTable, usePendingFilters, usePendingTable, useUnsavedChanges, UNSAVED_CHANGES_EVENT, useBulkAction, useContainerGrid, useMessage, useVisibleItems, useModalStack, RTDBPayloadStatus, } from "./react/index";
|
|
2987
|
+
export { useMediaQuery, useBreakpoint, useClickOutside, useKeyPress, useLongPress, useGesture, useSwipe, ThemeProvider, useTheme, useSession, useAuth, useCountdown, useCamera, useBulkSelection, useUrlTable, usePendingFilters, usePendingTable, useUnsavedChanges, UNSAVED_CHANGES_EVENT, useBulkAction, useEntityDelete, useContainerGrid, useMessage, useVisibleItems, useModalStack, RTDBPayloadStatus, } from "./react/index";
|
|
3010
2988
|
export { RoleGate, ProtectedRoute, SocialAuthButtons, AuthStatusPanel, LoginForm, RegisterForm, ForgotPasswordView, ResetPasswordView, VerifyEmailView, OAuthLoadingView, } from "./features/auth/index";
|
|
3011
2989
|
export type { RoleGateProps, ProtectedRouteProps, AuthGuardUser, AuthRouteConfig, LoginFormProps, LoginFormValues, RegisterFormProps, RegisterFormValues, ForgotPasswordViewProps, ResetPasswordViewProps, VerifyEmailViewProps, } from "./features/auth/index";
|
|
3012
2990
|
export { CartItemRow, CartDrawer, CartView, CartSummary, ShippingPicker } from "./features/cart/index";
|
|
@@ -3017,7 +2995,7 @@ export { useProfile as useCurrentProfile, useUpdateProfile as useUpdateCurrentPr
|
|
|
3017
2995
|
export { useLogout } from "./features/auth/index";
|
|
3018
2996
|
export { Text, Label, Span } from "./ui/index";
|
|
3019
2997
|
export { Input } from "./ui/index";
|
|
3020
|
-
export { Section, Main, Nav,
|
|
2998
|
+
export { Section, Main, Nav, Ul, Li } from "./ui/index";
|
|
3021
2999
|
export { coerceMediaField, coerceMediaFieldArray, getMediaUrl, mediaFieldSchema } from "./features/media/index";
|
|
3022
3000
|
export { FlowDiagram } from "./ui/index";
|
|
3023
3001
|
export { Grid, Row } from "./ui/index";
|
package/dist/index.js
CHANGED
|
@@ -152,8 +152,9 @@ export { renderRating } from "./ui/index";
|
|
|
152
152
|
// [CLIENT-ONLY]-Cannot run in SSR mode â€" uses browser-only APIs (window, navigator, localStorage, matchMedia, DOM events) that do not exist in Node.js.
|
|
153
153
|
// useToast - React hook for use toast.
|
|
154
154
|
export { useToast } from "./ui/index";
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
156
|
+
// PaginatedSelect - Searchable, async-paginated select. Supports single + multi modes + optional inline create drawer.
|
|
157
|
+
export { PaginatedSelect } from "./ui/index";
|
|
157
158
|
// EmptyState - Component for empty state display.
|
|
158
159
|
export { EmptyState } from "./ui/index";
|
|
159
160
|
// [TYPE]-TypeScript type-only export â€" erased at compile time, zero runtime cost.
|
|
@@ -192,15 +193,8 @@ export { generatePreOrderId } from "./utils/index";
|
|
|
192
193
|
// [UTIL]-Pure utility â€" no framework or runtime dependency; safe to import from any environment.
|
|
193
194
|
// generatePreOrderImageFilename - Helper for generate pre order image filename.
|
|
194
195
|
export { generateProductId } from "./utils/index";
|
|
195
|
-
//
|
|
196
|
-
//
|
|
197
|
-
export { generateProductImageFilename } from "./utils/index";
|
|
198
|
-
// [UTIL]-Pure utility â€" no framework or runtime dependency; safe to import from any environment.
|
|
199
|
-
// generateProductVideoFilename - Helper for generate product video filename.
|
|
200
|
-
export { generateStoreBannerFilename } from "./utils/index";
|
|
201
|
-
// [UTIL]-Pure utility â€" no framework or runtime dependency; safe to import from any environment.
|
|
202
|
-
// generateStoreLogoFilename - Helper for generate store logo filename.
|
|
203
|
-
export { generateStoreLogoFilename } from "./utils/index";
|
|
196
|
+
// W6-7 (2026-05-23) — per-feature generateXFilename wrappers no longer exported.
|
|
197
|
+
// Call `generateMediaFilename({ type: "product-image", ... })` etc. directly.
|
|
204
198
|
// [UTIL]-Pure utility â€" no framework or runtime dependency; safe to import from any environment.
|
|
205
199
|
// generateTrimmedVideoFilename - Helper for generate trimmed video filename.
|
|
206
200
|
export { getBusinessDaysElapsed } from "./utils/index";
|
|
@@ -977,24 +971,15 @@ export { OfferRepository } from "./repositories/index";
|
|
|
977
971
|
// OrderRepository - Shared export for order repository.
|
|
978
972
|
export { OrderRepository } from "./repositories/index";
|
|
979
973
|
// [DB]-Database layer â€" uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
|
|
980
|
-
// OrdersRepository - Shared export for orders repository.
|
|
981
|
-
export { OrdersRepository } from "./repositories/index";
|
|
982
|
-
// [DB]-Database layer â€" uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
|
|
983
974
|
// PasswordResetTokenRepository - Shared export for password reset token repository.
|
|
984
975
|
export { PasswordResetTokenRepository } from "./repositories/index";
|
|
985
976
|
// [DB]-Database layer â€" uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
|
|
986
977
|
// ProductRepository - Shared export for product repository.
|
|
987
978
|
export { ProductRepository } from "./repositories/index";
|
|
988
979
|
// [DB]-Database layer â€" uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
|
|
989
|
-
// ProductsRepository - Shared export for products repository.
|
|
990
|
-
export { ProductsRepository } from "./repositories/index";
|
|
991
|
-
// [DB]-Database layer â€" uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
|
|
992
980
|
// ReviewRepository - Shared export for review repository.
|
|
993
981
|
export { ReviewRepository } from "./repositories/index";
|
|
994
982
|
// [DB]-Database layer â€" uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
|
|
995
|
-
// ReviewsRepository - Shared export for reviews repository.
|
|
996
|
-
export { ReviewsRepository } from "./repositories/index";
|
|
997
|
-
// [DB]-Database layer â€" uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
|
|
998
983
|
// SessionRepository - Shared export for session repository.
|
|
999
984
|
export { SessionRepository } from "./repositories/index";
|
|
1000
985
|
// [DB]-Database layer â€" uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
|
|
@@ -2152,14 +2137,18 @@ export { AdminPayoutsView } from "./features/admin/index";
|
|
|
2152
2137
|
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
2153
2138
|
// AdminPrizeDrawsView - Component for admin prize draws listing view (SB4-E).
|
|
2154
2139
|
export { AdminPrizeDrawsView } from "./features/admin/index";
|
|
2140
|
+
// W1-29 2026-05-23 — admin listing views for orphaned listing types.
|
|
2141
|
+
export { AdminClassifiedView } from "./features/admin/index";
|
|
2142
|
+
export { AdminDigitalCodesView } from "./features/admin/index";
|
|
2143
|
+
export { AdminLiveView } from "./features/admin/index";
|
|
2155
2144
|
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
2156
2145
|
// AdminProductsView - Component for admin products view.
|
|
2157
2146
|
export { AdminProductsView } from "./features/admin/index";
|
|
2158
2147
|
// AdminProductEditorView - Component for admin product create/edit form (3-mode: standard/auction/pre-order).
|
|
2159
2148
|
export { AdminProductEditorView } from "./features/admin/index";
|
|
2160
|
-
// CategoryQuickCreateForm - Lightweight inline create form for categories used in
|
|
2149
|
+
// CategoryQuickCreateForm - Lightweight inline create form for categories used in PaginatedSelect.
|
|
2161
2150
|
export { CategoryQuickCreateForm } from "./features/admin/index";
|
|
2162
|
-
// BrandQuickCreateForm - Lightweight inline create form for brands used in
|
|
2151
|
+
// BrandQuickCreateForm - Lightweight inline create form for brands used in PaginatedSelect.
|
|
2163
2152
|
export { BrandQuickCreateForm } from "./features/admin/index";
|
|
2164
2153
|
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
2165
2154
|
// AdminRevenueChart - Shared export for admin revenue chart.
|
|
@@ -2258,8 +2247,7 @@ export { DEFAULT_TRUST_BAR_ITEMS } from "./features/admin/index";
|
|
|
2258
2247
|
// DashboardStatsGrid - Component for dashboard stats grid.
|
|
2259
2248
|
export { DashboardStatsGrid } from "./features/admin/index";
|
|
2260
2249
|
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
2261
|
-
// DemoSeedView -
|
|
2262
|
-
export { DemoSeedView } from "./features/admin/index";
|
|
2250
|
+
// DemoSeedView — removed from main barrel (dev-only, load via dynamic import)
|
|
2263
2251
|
// AdminTeamView - Employee management list view.
|
|
2264
2252
|
export { AdminTeamView } from "./features/admin/index";
|
|
2265
2253
|
// AdminEmployeeEditorView - Invite/edit employee permissions SideDrawer.
|
|
@@ -2322,9 +2310,6 @@ export { useDeleteChatRoom } from "./features/admin/index";
|
|
|
2322
2310
|
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
2323
2311
|
// useAdminListingData - React hook for admin listing data fetching.
|
|
2324
2312
|
export { useAdminListingData } from "./features/admin/index";
|
|
2325
|
-
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
2326
|
-
// AdminListingScaffold - Component for admin listing scaffold.
|
|
2327
|
-
export { AdminListingScaffold } from "./features/admin/index";
|
|
2328
2313
|
// [CLIENT-SSR]-Utility function for converting values to record array.
|
|
2329
2314
|
// toRecordArray - Helper for converting values to record array.
|
|
2330
2315
|
export { toRecordArray } from "./features/admin/index";
|
|
@@ -2537,8 +2522,6 @@ export { usePlaceBid } from "./features/auctions/index";
|
|
|
2537
2522
|
export { useRealtimeBids } from "./features/auctions/index";
|
|
2538
2523
|
// ./features/auctions/server
|
|
2539
2524
|
// [DB]-Database layer â€" uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
|
|
2540
|
-
// AuctionsRepository - Shared export for auctions repository.
|
|
2541
|
-
export { AuctionsRepository } from "./features/auctions/server";
|
|
2542
2525
|
// [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
2543
2526
|
// GET - Constant used across modules.
|
|
2544
2527
|
export { GET } from "./features/auctions/server";
|
|
@@ -2770,10 +2753,6 @@ export { buildBeforeAfterColumns } from "./features/before-after/index";
|
|
|
2770
2753
|
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
2771
2754
|
// useBeforeAfter - React hook for use before after.
|
|
2772
2755
|
export { useBeforeAfter } from "./features/before-after/index";
|
|
2773
|
-
// ./features/before-after/server
|
|
2774
|
-
// [DB]-Database layer â€" uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
|
|
2775
|
-
// BeforeAfterRepository - Shared export for before after repository.
|
|
2776
|
-
export { BeforeAfterRepository } from "./features/before-after/server";
|
|
2777
2756
|
// ./features/blog/index
|
|
2778
2757
|
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
2779
2758
|
// BLOG_ADMIN_SORT_OPTIONS - Constant used across modules.
|
|
@@ -3194,10 +3173,6 @@ export { useCollection } from "./features/collections/index";
|
|
|
3194
3173
|
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
3195
3174
|
// useCollections - React hook for use collections.
|
|
3196
3175
|
export { useCollections } from "./features/collections/index";
|
|
3197
|
-
// ./features/collections/server
|
|
3198
|
-
// [DB]-Database layer â€" uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
|
|
3199
|
-
// CollectionsRepository - Shared export for collections repository.
|
|
3200
|
-
export { CollectionsRepository } from "./features/collections/server";
|
|
3201
3176
|
// ./features/consultation/index
|
|
3202
3177
|
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
3203
3178
|
// ConsultationForm - Component for consultation form.
|
|
@@ -4273,8 +4248,6 @@ export { usePreorder } from "./features/pre-orders/index";
|
|
|
4273
4248
|
export { usePreorders } from "./features/pre-orders/index";
|
|
4274
4249
|
// ./features/pre-orders/server
|
|
4275
4250
|
// [DB]-Database layer â€" uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
|
|
4276
|
-
// PreordersRepository - Shared export for preorders repository.
|
|
4277
|
-
export { PreordersRepository } from "./features/pre-orders/server";
|
|
4278
4251
|
// [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
4279
4252
|
// preOrdersGET - Shared export for pre orders get.
|
|
4280
4253
|
export { preOrdersGET } from "./features/pre-orders/server";
|
|
@@ -4435,6 +4408,7 @@ export { actionTracker, setActionTrackerSink, resetActionTrackerSink, } from "./
|
|
|
4435
4408
|
export { cartRequiresShipping, cartIsDigitalOnly, cartIsChatOnly, } from "./_internal/shared/listing-types/cart-shipping";
|
|
4436
4409
|
// SB-UNI-W-1 2026-05-13 â€" CTA action registry shell.
|
|
4437
4410
|
export { ACTIONS, action, act, canPerformAction, actionsForListingType, actionLabel, } from "./_internal/shared/actions/action-registry";
|
|
4411
|
+
export { buildBulkAction } from "./_internal/shared/actions/bulk-helpers";
|
|
4438
4412
|
// User-role predicates â€" SB-UNI-E 2026-05-13.
|
|
4439
4413
|
export { isAdminUser, isSellerUser, isModeratorUser, isEmployeeUser, isBuyerUser, } from "./features/auth/role-predicates";
|
|
4440
4414
|
// [SERVER-ONLY]-Safe in browser but intended for server routes.
|
|
@@ -4610,9 +4584,6 @@ export { useCouponValidate } from "./features/promotions/index";
|
|
|
4610
4584
|
export { usePromotions } from "./features/promotions/index";
|
|
4611
4585
|
// ./features/promotions/server
|
|
4612
4586
|
// [DB]-Database layer â€" uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
|
|
4613
|
-
// PromotionsRepository - Shared export for promotions repository.
|
|
4614
|
-
export { PromotionsRepository } from "./features/promotions/server";
|
|
4615
|
-
// [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
4616
4587
|
// getPromotions - Helper for get promotions.
|
|
4617
4588
|
export { getPromotions } from "./features/promotions/server";
|
|
4618
4589
|
// [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
@@ -4906,12 +4877,6 @@ export { SellerRevenueChart } from "./features/seller/index";
|
|
|
4906
4877
|
// SellerShippingView - Component for seller shipping view.
|
|
4907
4878
|
export { SellerShippingView } from "./features/seller/index";
|
|
4908
4879
|
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
4909
|
-
// SellerSidebar - Shared export for seller sidebar.
|
|
4910
|
-
export { SellerSidebar } from "./features/seller/index";
|
|
4911
|
-
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
4912
|
-
// SellerStatCard - Component for seller stat card.
|
|
4913
|
-
export { SellerStatCard } from "./features/seller/index";
|
|
4914
|
-
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
4915
4880
|
// SellerStoreSetupView - Component for seller store setup view.
|
|
4916
4881
|
export { SellerStoreSetupView } from "./features/seller/index";
|
|
4917
4882
|
// [CLIENT-SSR]-Runs in both SSR and browser â€" React component or hook that does not depend on browser-only APIs.
|
|
@@ -5015,11 +4980,7 @@ export { useSellerStore } from "./features/seller/index";
|
|
|
5015
4980
|
export { useSellerStorefront } from "./features/seller/index";
|
|
5016
4981
|
// ./features/seller/server
|
|
5017
4982
|
// [DB]-Database layer â€" uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
|
|
5018
|
-
// PayoutsRepository - Shared export for payouts repository.
|
|
5019
|
-
export { PayoutsRepository } from "./features/seller/server";
|
|
5020
4983
|
// [DB]-Database layer â€" uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
|
|
5021
|
-
// SellerRepository - Shared export for seller repository.
|
|
5022
|
-
export { SellerRepository } from "./features/seller/server";
|
|
5023
4984
|
// [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
5024
4985
|
// acceptCounterOffer - Shared export for accept counter offer.
|
|
5025
4986
|
export { acceptCounterOffer } from "./features/seller/server";
|
|
@@ -5247,9 +5208,6 @@ export { useStoreReviews } from "./features/stores/index";
|
|
|
5247
5208
|
export { useStores } from "./features/stores/index";
|
|
5248
5209
|
// ./features/stores/server
|
|
5249
5210
|
// [DB]-Database layer â€" uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
|
|
5250
|
-
// StoresRepository - Shared export for stores repository.
|
|
5251
|
-
export { StoresRepository } from "./features/stores/server";
|
|
5252
|
-
// [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
5253
5211
|
// createStoreAddressForSeller - Helper for create store address for seller.
|
|
5254
5212
|
export { createStoreAddressForSeller } from "./features/stores/server";
|
|
5255
5213
|
// [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
@@ -5352,9 +5310,6 @@ export { wishlistItemSchema } from "./features/wishlist/index";
|
|
|
5352
5310
|
// [DB]-Database layer â€" uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
|
|
5353
5311
|
// UserWishlistRepository - Shared export for user wishlist repository.
|
|
5354
5312
|
export { UserWishlistRepository } from "./features/wishlist/server";
|
|
5355
|
-
// [DB]-Database layer â€" uses firebase-admin or another server-side DB SDK; can only run in a trusted server environment.
|
|
5356
|
-
// WishlistRepository - Shared export for wishlist repository.
|
|
5357
|
-
export { WishlistRepository } from "./features/wishlist/server";
|
|
5358
5313
|
// [SERVER-ONLY]-Server-only â€" uses Node.js, Next.js server internals, or third-party server SDKs (auth, email, payment, shipping).
|
|
5359
5314
|
// addToWishlist - Helper for add to wishlist.
|
|
5360
5315
|
export { addToWishlist } from "./features/wishlist/server";
|
|
@@ -5422,9 +5377,9 @@ export { Button } from "./ui/index";
|
|
|
5422
5377
|
export { Heading, Spinner, IconButton, Progress, IndeterminateProgress, Pagination, PageLoader } from "./ui/index";
|
|
5423
5378
|
export { ModalFooter, UnsavedChangesModal, ResponsiveView, Textarea, Checkbox } from "./ui/index";
|
|
5424
5379
|
export { ToastProvider, StarRating, StepperNav, ViewToggle, PriceDisplay, SummaryCard } from "./ui/index";
|
|
5425
|
-
export { CountdownDisplay, ItemRow, HorizontalScroller,
|
|
5380
|
+
export { CountdownDisplay, ItemRow, HorizontalScroller, TabStrip } from "./ui/index";
|
|
5426
5381
|
export { CardBody, MenuTrigger, MenuContent, MenuSeparator, RoleBadge, SkipToMain } from "./ui/index";
|
|
5427
|
-
export { TabsList, TabsContent, PasswordStrengthIndicator,
|
|
5382
|
+
export { TabsList, TabsContent, PasswordStrengthIndicator, TablePagination } from "./ui/index";
|
|
5428
5383
|
export { Stack, classNames, mergeTailwindClasses, SideModal, SideDrawer, RichText, RichTextRenderer } from "./ui/index";
|
|
5429
5384
|
export { SlottedListingView, DetailViewShell, StackedViewShell } from "./ui/index";
|
|
5430
5385
|
export { buildColumns, createColumnBuilder } from "./ui/index";
|
|
@@ -5440,7 +5395,7 @@ export { WishlistFullError } from "./features/wishlist/server";
|
|
|
5440
5395
|
export { useHistory, useHistoryMergeOnLogin, getGuestHistory, trackGuestHistory, removeGuestHistoryItem, clearGuestHistory, getGuestHistoryCount, } from "./features/history";
|
|
5441
5396
|
export { historyRepository, UserHistoryRepository, trackHistoryView, getHistoryForUser, removeHistoryItem, clearHistory, mergeGuestHistory, } from "./features/history/server";
|
|
5442
5397
|
// Missing React hooks and providers
|
|
5443
|
-
export { useMediaQuery, useBreakpoint, useClickOutside, useKeyPress, useLongPress, useGesture, useSwipe, ThemeProvider, useTheme, useSession, useAuth, useCountdown, useCamera, useBulkSelection, useUrlTable, usePendingFilters, usePendingTable, useUnsavedChanges, UNSAVED_CHANGES_EVENT, useBulkAction, useContainerGrid, useMessage, useVisibleItems, useModalStack, RTDBPayloadStatus, } from "./react/index";
|
|
5398
|
+
export { useMediaQuery, useBreakpoint, useClickOutside, useKeyPress, useLongPress, useGesture, useSwipe, ThemeProvider, useTheme, useSession, useAuth, useCountdown, useCamera, useBulkSelection, useUrlTable, usePendingFilters, usePendingTable, useUnsavedChanges, UNSAVED_CHANGES_EVENT, useBulkAction, useEntityDelete, useContainerGrid, useMessage, useVisibleItems, useModalStack, RTDBPayloadStatus, } from "./react/index";
|
|
5444
5399
|
// Missing core types (already exported above; skipped to avoid duplicates)
|
|
5445
5400
|
// Missing auth feature components
|
|
5446
5401
|
export { RoleGate, ProtectedRoute, SocialAuthButtons, AuthStatusPanel, LoginForm, RegisterForm, ForgotPasswordView, ResetPasswordView, VerifyEmailView, OAuthLoadingView, } from "./features/auth/index";
|
|
@@ -5456,7 +5411,7 @@ export { useLogout } from "./features/auth/index";
|
|
|
5456
5411
|
// Missing UI semantic wrappers and typography
|
|
5457
5412
|
export { Text, Label, Span } from "./ui/index";
|
|
5458
5413
|
export { Input } from "./ui/index";
|
|
5459
|
-
export { Section, Main, Nav,
|
|
5414
|
+
export { Section, Main, Nav, Ul, Li } from "./ui/index";
|
|
5460
5415
|
// Missing media helpers
|
|
5461
5416
|
export { coerceMediaField, coerceMediaFieldArray, getMediaUrl, mediaFieldSchema } from "./features/media/index";
|
|
5462
5417
|
// -- Missing UI layout / typography components
|
|
@@ -248,6 +248,10 @@ export declare const DEFAULT_ROUTE_MAP: {
|
|
|
248
248
|
readonly PRODUCTS: "/admin/products";
|
|
249
249
|
readonly PRODUCTS_NEW: "/admin/products/new";
|
|
250
250
|
readonly PRODUCTS_EDIT: (id: string) => string;
|
|
251
|
+
readonly CLASSIFIED: "/admin/classified";
|
|
252
|
+
readonly DIGITAL_CODES: "/admin/digital-codes";
|
|
253
|
+
readonly LIVE: "/admin/live";
|
|
254
|
+
readonly GROUPED_LISTINGS: "/admin/grouped-listings";
|
|
251
255
|
readonly DEALS: "/admin/deals";
|
|
252
256
|
readonly FEATURED: "/admin/featured";
|
|
253
257
|
readonly ORDERS: "/admin/orders";
|
|
@@ -568,6 +572,10 @@ export declare const ROUTES: {
|
|
|
568
572
|
readonly PRODUCTS: "/admin/products";
|
|
569
573
|
readonly PRODUCTS_NEW: "/admin/products/new";
|
|
570
574
|
readonly PRODUCTS_EDIT: (id: string) => string;
|
|
575
|
+
readonly CLASSIFIED: "/admin/classified";
|
|
576
|
+
readonly DIGITAL_CODES: "/admin/digital-codes";
|
|
577
|
+
readonly LIVE: "/admin/live";
|
|
578
|
+
readonly GROUPED_LISTINGS: "/admin/grouped-listings";
|
|
571
579
|
readonly DEALS: "/admin/deals";
|
|
572
580
|
readonly FEATURED: "/admin/featured";
|
|
573
581
|
readonly ORDERS: "/admin/orders";
|
|
@@ -240,6 +240,10 @@ export const DEFAULT_ROUTE_MAP = {
|
|
|
240
240
|
PRODUCTS: "/admin/products",
|
|
241
241
|
PRODUCTS_NEW: "/admin/products/new",
|
|
242
242
|
PRODUCTS_EDIT: (id) => `/admin/products/${id}/edit`,
|
|
243
|
+
CLASSIFIED: "/admin/classified",
|
|
244
|
+
DIGITAL_CODES: "/admin/digital-codes",
|
|
245
|
+
LIVE: "/admin/live",
|
|
246
|
+
GROUPED_LISTINGS: "/admin/grouped-listings",
|
|
243
247
|
DEALS: "/admin/deals",
|
|
244
248
|
FEATURED: "/admin/featured",
|
|
245
249
|
ORDERS: "/admin/orders",
|
|
@@ -32,6 +32,8 @@ export interface SessionUser {
|
|
|
32
32
|
scamAwarenessAcknowledgedAt?: Date | null;
|
|
33
33
|
/** RBAC permission keys granted to this user (from their role's permission set). */
|
|
34
34
|
permissions?: string[];
|
|
35
|
+
/** Hash of the last dismissed announcement banner. */
|
|
36
|
+
dismissedBannerHash?: string;
|
|
35
37
|
}
|
|
36
38
|
export interface SessionContextValue {
|
|
37
39
|
user: SessionUser | null;
|
|
@@ -74,6 +74,7 @@ function buildSessionUser(authUser, serverData) {
|
|
|
74
74
|
scamAwarenessAcknowledgedAt: serverData.scamAwarenessAcknowledgedAt
|
|
75
75
|
? new Date(serverData.scamAwarenessAcknowledgedAt)
|
|
76
76
|
: null,
|
|
77
|
+
dismissedBannerHash: serverData.dismissedBannerHash,
|
|
77
78
|
};
|
|
78
79
|
}
|
|
79
80
|
// ---------------------------------------------------------------------------
|
|
@@ -140,6 +141,7 @@ export function SessionProvider({ children, initialUser, endpoints: endpointOver
|
|
|
140
141
|
scamAwarenessAcknowledgedAt: data.scamAwarenessAcknowledgedAt
|
|
141
142
|
? new Date(data.scamAwarenessAcknowledgedAt)
|
|
142
143
|
: null,
|
|
144
|
+
dismissedBannerHash: data.dismissedBannerHash,
|
|
143
145
|
};
|
|
144
146
|
}
|
|
145
147
|
catch {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface UseEntityDeleteOptions {
|
|
2
|
+
endpoint?: string | ((id: string) => string);
|
|
3
|
+
deleteFn?: (id: string) => Promise<void>;
|
|
4
|
+
successMessage?: string;
|
|
5
|
+
errorMessage?: string;
|
|
6
|
+
onSuccess?: (id: string) => void;
|
|
7
|
+
onError?: (id: string, error: unknown) => void;
|
|
8
|
+
fetchOptions?: Omit<RequestInit, "method">;
|
|
9
|
+
}
|
|
10
|
+
export interface UseEntityDeleteReturn {
|
|
11
|
+
deletingId: string | null;
|
|
12
|
+
handleDelete: (id: string) => Promise<void>;
|
|
13
|
+
isDeleting: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function useEntityDelete(opts: UseEntityDeleteOptions): UseEntityDeleteReturn;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useState, useCallback } from "react";
|
|
3
|
+
import { useToast } from "../../ui";
|
|
4
|
+
export function useEntityDelete(opts) {
|
|
5
|
+
const [deletingId, setDeletingId] = useState(null);
|
|
6
|
+
const { showToast } = useToast();
|
|
7
|
+
const handleDelete = useCallback(async (id) => {
|
|
8
|
+
setDeletingId(id);
|
|
9
|
+
try {
|
|
10
|
+
if (opts.deleteFn) {
|
|
11
|
+
await opts.deleteFn(id);
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
const url = typeof opts.endpoint === "function" ? opts.endpoint(id) : `${opts.endpoint}/${id}`;
|
|
15
|
+
const res = await fetch(url, { method: "DELETE", ...opts.fetchOptions });
|
|
16
|
+
if (!res.ok) {
|
|
17
|
+
const body = await res.json().catch(() => ({}));
|
|
18
|
+
throw new Error(body.message || `Delete failed (${res.status})`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
if (opts.successMessage)
|
|
22
|
+
showToast(opts.successMessage, "success");
|
|
23
|
+
opts.onSuccess?.(id);
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
const msg = opts.errorMessage ?? (err instanceof Error ? err.message : "Delete failed.");
|
|
27
|
+
showToast(msg, "error");
|
|
28
|
+
opts.onError?.(id, err);
|
|
29
|
+
}
|
|
30
|
+
finally {
|
|
31
|
+
setDeletingId(null);
|
|
32
|
+
}
|
|
33
|
+
}, [opts, showToast]);
|
|
34
|
+
return {
|
|
35
|
+
deletingId,
|
|
36
|
+
handleDelete,
|
|
37
|
+
isDeleting: deletingId !== null,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* W1-43 — useListingTypeFlags
|
|
3
|
+
*
|
|
4
|
+
* Returns the enabled-state for each listing type as configured in
|
|
5
|
+
* `siteSettings.featureFlags.listingTypes`. Consumers should hide nav items,
|
|
6
|
+
* filter TypeDropdown options, and reject API requests for disabled types.
|
|
7
|
+
*
|
|
8
|
+
* Defaults to all-enabled when settings haven't loaded yet — match the
|
|
9
|
+
* permissive default used by `DEFAULT_SITE_SETTINGS_DATA` so first paint
|
|
10
|
+
* doesn't briefly hide enabled features.
|
|
11
|
+
*/
|
|
12
|
+
export type ListingTypeFlagsShape = Partial<{
|
|
13
|
+
standard: boolean;
|
|
14
|
+
auction: boolean;
|
|
15
|
+
"pre-order": boolean;
|
|
16
|
+
"prize-draw": boolean;
|
|
17
|
+
classified: boolean;
|
|
18
|
+
"digital-code": boolean;
|
|
19
|
+
live: boolean;
|
|
20
|
+
}>;
|
|
21
|
+
export interface ListingTypeFlags {
|
|
22
|
+
standard: boolean;
|
|
23
|
+
auction: boolean;
|
|
24
|
+
"pre-order": boolean;
|
|
25
|
+
"prize-draw": boolean;
|
|
26
|
+
classified: boolean;
|
|
27
|
+
"digital-code": boolean;
|
|
28
|
+
live: boolean;
|
|
29
|
+
/** True when the listing type is enabled (or the setting hasn't loaded yet). */
|
|
30
|
+
isEnabled: (type: "standard" | "auction" | "pre-order" | "prize-draw" | "classified" | "digital-code" | "live") => boolean;
|
|
31
|
+
}
|
|
32
|
+
export declare function useListingTypeFlags(): ListingTypeFlags;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useSiteSettings } from "../../core/hooks/useSiteSettings";
|
|
3
|
+
export function useListingTypeFlags() {
|
|
4
|
+
const { data } = useSiteSettings();
|
|
5
|
+
const lt = data?.featureFlags?.listingTypes;
|
|
6
|
+
const flags = {
|
|
7
|
+
standard: lt?.standard !== false,
|
|
8
|
+
auction: lt?.auction !== false,
|
|
9
|
+
"pre-order": lt?.["pre-order"] !== false,
|
|
10
|
+
"prize-draw": lt?.["prize-draw"] !== false,
|
|
11
|
+
classified: lt?.classified !== false,
|
|
12
|
+
"digital-code": lt?.["digital-code"] !== false,
|
|
13
|
+
live: lt?.live !== false,
|
|
14
|
+
};
|
|
15
|
+
return {
|
|
16
|
+
...flags,
|
|
17
|
+
isEnabled: (type) => flags[type],
|
|
18
|
+
};
|
|
19
|
+
}
|
package/dist/react/index.d.ts
CHANGED
|
@@ -40,6 +40,8 @@ export { usePendingTable } from "./hooks/usePendingTable";
|
|
|
40
40
|
export type { PendingTable, UsePendingTableReturn, } from "./hooks/usePendingTable";
|
|
41
41
|
export { useUnsavedChanges, UNSAVED_CHANGES_EVENT, } from "./hooks/useUnsavedChanges";
|
|
42
42
|
export type { UseUnsavedChangesOptions, UseUnsavedChangesReturn, } from "./hooks/useUnsavedChanges";
|
|
43
|
+
export { useEntityDelete } from "./hooks/useEntityDelete";
|
|
44
|
+
export type { UseEntityDeleteOptions, UseEntityDeleteReturn } from "./hooks/useEntityDelete";
|
|
43
45
|
export { useBulkAction } from "./hooks/useBulkAction";
|
|
44
46
|
export type { BulkActionPayload, BulkActionResult, BulkActionSummary, BulkActionItemFailure, UseBulkActionOptions, UseBulkActionReturn, } from "./hooks/useBulkAction";
|
|
45
47
|
export { useContainerGrid } from "./hooks/useContainerGrid";
|