@mohasinac/appkit 4.30.18 → 4.31.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/digital-code/CodeRevealPanel.js +5 -2
- package/dist/_internal/client/features/layout/DashboardLayoutClient.js +3 -3
- package/dist/_internal/client/features/layout/useSidebarSearch.d.ts +21 -5
- package/dist/_internal/client/features/layout/useSidebarSearch.js +27 -6
- package/dist/_internal/client/features/lottery/LotteryAdminEditView.d.ts +23 -3
- package/dist/_internal/client/features/lottery/LotteryAdminEditView.js +106 -86
- package/dist/_internal/client/features/lottery/LotteryPullForm.d.ts +16 -5
- package/dist/_internal/client/features/lottery/LotteryPullForm.js +65 -40
- package/dist/_internal/client/features/maintenance/views/AnalysisRunnerView.js +5 -2
- package/dist/_internal/client/features/maintenance/views/CloudLogsListView.js +11 -3
- package/dist/_internal/client/hand-mode/HandModeProvider.js +2 -0
- package/dist/_internal/server/features/auctions/actions.js +14 -3
- package/dist/_internal/server/features/auctions/service.js +1 -1
- package/dist/_internal/server/features/auth/permissions.d.ts +2 -0
- package/dist/_internal/server/features/auth/permissions.js +3 -2
- package/dist/_internal/server/features/blog/data.js +2 -2
- package/dist/_internal/server/features/blog/service.js +3 -3
- package/dist/_internal/server/features/brands/data.js +1 -1
- package/dist/_internal/server/features/brands/service.js +3 -3
- package/dist/_internal/server/features/bundles/actions.js +6 -1
- package/dist/_internal/server/features/bundles/data.js +21 -4
- package/dist/_internal/server/features/cart/data.js +3 -1
- package/dist/_internal/server/features/cart/service.js +13 -2
- package/dist/_internal/server/features/categories/data.js +26 -6
- package/dist/_internal/server/features/classified/index.d.ts +0 -1
- package/dist/_internal/server/features/classified/index.js +0 -1
- package/dist/_internal/server/features/digital-code/index.d.ts +0 -1
- package/dist/_internal/server/features/digital-code/index.js +0 -1
- package/dist/_internal/server/features/events/actions.js +17 -4
- package/dist/_internal/server/features/events/data.js +1 -1
- package/dist/_internal/server/features/events/service.js +1 -1
- package/dist/_internal/server/features/grouped/data.js +7 -2
- package/dist/_internal/server/features/item-requests/data.js +1 -1
- package/dist/_internal/server/features/live/index.d.ts +0 -1
- package/dist/_internal/server/features/live/index.js +0 -1
- package/dist/_internal/server/features/lottery/actions.js +2 -2
- package/dist/_internal/server/features/lottery/data.js +1 -1
- package/dist/_internal/server/features/orders/actions.js +7 -7
- package/dist/_internal/server/features/orders/data.d.ts +1 -1
- package/dist/_internal/server/features/orders/data.js +14 -2
- package/dist/_internal/server/features/orders/service.js +1 -1
- package/dist/_internal/server/features/pre-orders/service.js +1 -1
- package/dist/_internal/server/features/prize-draws/actions.js +1 -1
- package/dist/_internal/server/features/products/data.js +21 -6
- package/dist/_internal/server/features/products/list-public.d.ts +9 -0
- package/dist/_internal/server/features/products/list-public.js +95 -7
- package/dist/_internal/server/features/products/service.js +1 -1
- package/dist/_internal/server/features/promotions/actions.js +1 -1
- package/dist/_internal/server/features/promotions/data.js +1 -1
- package/dist/_internal/server/features/promotions/service.js +1 -1
- package/dist/_internal/server/features/reviews/data.d.ts +1 -1
- package/dist/_internal/server/features/reviews/data.js +6 -1
- package/dist/_internal/server/features/reviews/og-data.js +1 -1
- package/dist/_internal/server/features/shared/listing-data-factory.js +7 -2
- package/dist/_internal/server/features/site-settings/adapters.d.ts +2 -2
- package/dist/_internal/server/features/site-settings/adapters.js +8 -5
- package/dist/_internal/server/features/stores/data.js +1 -1
- package/dist/_internal/server/features/sublisting-categories/data.js +1 -1
- package/dist/_internal/server/features/tester/visibility.d.ts +2 -1
- package/dist/_internal/server/features/tester/visibility.js +2 -2
- package/dist/_internal/server/functions/scheduled.d.ts +3 -1
- package/dist/_internal/server/functions/scheduled.js +27 -1
- package/dist/_internal/server/jobs/core/auctionSettlement.js +6 -1
- package/dist/_internal/server/jobs/core/hardBanCascade.js +4 -0
- package/dist/_internal/server/jobs/core/index.d.ts +2 -0
- package/dist/_internal/server/jobs/core/index.js +2 -0
- package/dist/_internal/server/jobs/core/onOrderStatusChange.js +7 -15
- package/dist/_internal/server/jobs/core/pageViewPrune.d.ts +10 -0
- package/dist/_internal/server/jobs/core/pageViewPrune.js +44 -0
- package/dist/_internal/server/jobs/core/pageViewRollup.d.ts +2 -0
- package/dist/_internal/server/jobs/core/pageViewRollup.js +87 -0
- package/dist/_internal/server/jobs/core/revenueRollup.js +7 -1
- package/dist/_internal/server/jobs/handlers/index.d.ts +2 -0
- package/dist/_internal/server/jobs/handlers/index.js +2 -0
- package/dist/_internal/server/jobs/handlers/pageViewPrune.d.ts +2 -0
- package/dist/_internal/server/jobs/handlers/pageViewPrune.js +2 -0
- package/dist/_internal/server/jobs/handlers/pageViewRollup.d.ts +2 -0
- package/dist/_internal/server/jobs/handlers/pageViewRollup.js +2 -0
- package/dist/_internal/shared/actions/action-registry.d.ts +1 -1
- package/dist/_internal/shared/actions/action-registry.js +69 -22
- package/dist/_internal/shared/checkout/rules/classified.rule.d.ts +9 -4
- package/dist/_internal/shared/checkout/rules/classified.rule.js +7 -2
- package/dist/_internal/shared/features/layout/matchesNavQuery.d.ts +14 -0
- package/dist/_internal/shared/features/layout/matchesNavQuery.js +72 -0
- package/dist/_internal/shared/features/layout/types.d.ts +37 -1
- package/dist/_internal/shared/features/layout/types.js +19 -1
- package/dist/_internal/shared/features/notifications/action-url.d.ts +9 -1
- package/dist/_internal/shared/features/notifications/action-url.js +47 -0
- package/dist/_internal/shared/features/offers/config.d.ts +65 -0
- package/dist/_internal/shared/features/offers/config.js +73 -2
- package/dist/_internal/shared/features/orders/schema.d.ts +19 -1
- package/dist/_internal/shared/features/orders/schema.js +22 -2
- package/dist/_internal/shared/features/site-settings/types.d.ts +12 -3
- package/dist/_internal/shared/listing-types/capabilities.d.ts +8 -2
- package/dist/_internal/shared/listing-types/capabilities.js +6 -1
- package/dist/_internal/shared/listing-types/classified/ctas.js +6 -1
- package/dist/_internal/shared/listing-types/feature-flags.d.ts +10 -5
- package/dist/_internal/shared/listing-types/feature-flags.js +11 -6
- package/dist/client/api/useApiQuery.js +17 -6
- package/dist/client.d.ts +38 -20
- package/dist/client.js +39 -14
- package/dist/configs/next.js +10 -2
- package/dist/constants/api-endpoints.d.ts +18 -54
- package/dist/constants/api-endpoints.js +6 -26
- package/dist/constants/field-names.d.ts +6 -24
- package/dist/constants/field-names.js +10 -27
- package/dist/constants/geo/countries.d.ts +50 -0
- package/dist/constants/geo/countries.js +129 -0
- package/dist/constants/geo/subdivisions.d.ts +13 -0
- package/dist/constants/geo/subdivisions.js +104 -0
- package/dist/constants/index.d.ts +2 -2
- package/dist/constants/index.js +2 -2
- package/dist/constants/table-keys.d.ts +24 -0
- package/dist/constants/table-keys.js +28 -0
- package/dist/contracts/client-realtime.d.ts +6 -0
- package/dist/contracts/extend.d.ts +0 -9
- package/dist/contracts/index.d.ts +1 -1
- package/dist/contracts/realtime-session.d.ts +12 -12
- package/dist/contracts/realtime-session.js +79 -77
- package/dist/core/browser.d.ts +1 -1
- package/dist/core/browser.js +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/site-config.d.ts +0 -3
- package/dist/core/site-config.js +0 -3
- package/dist/errors/index.d.ts +1 -1
- package/dist/errors/index.js +1 -1
- package/dist/errors/messages.d.ts +0 -8
- package/dist/errors/messages.js +0 -9
- package/dist/features/about/components/DeveloperView.js +7 -2
- package/dist/features/about/components/PolicyPageView.js +9 -1
- package/dist/features/about/components/PublicProfileView.js +23 -5
- package/dist/features/about/schemas/index.d.ts +8 -8
- package/dist/features/account/components/AddressFilters.js +32 -11
- package/dist/features/account/components/AddressForm.d.ts +26 -25
- package/dist/features/account/components/AddressForm.js +81 -103
- package/dist/features/account/components/AddressesIndexListing.js +8 -4
- package/dist/features/account/components/NotificationBell.js +4 -3
- package/dist/features/account/components/NotificationPreferencesPanel.js +1 -1
- package/dist/features/account/components/UserOffersPanel.js +1 -1
- package/dist/features/account/components/UserSidebar.d.ts +3 -4
- package/dist/features/account/components/UserSupportView.js +89 -58
- package/dist/features/account/components/index.d.ts +1 -7
- package/dist/features/account/components/index.js +0 -3
- package/dist/features/account/hooks/useAddresses.d.ts +4 -3
- package/dist/features/account/hooks/useAddresses.js +4 -6
- package/dist/features/account/hooks/useCollapsedSections.d.ts +51 -10
- package/dist/features/account/hooks/useCollapsedSections.js +211 -38
- package/dist/features/account/hooks/useProfile.d.ts +8 -0
- package/dist/features/account/index.d.ts +0 -3
- package/dist/features/account/index.js +0 -3
- package/dist/features/account/schemas/index.d.ts +0 -92
- package/dist/features/account/schemas/index.js +42 -20
- package/dist/features/addresses/components/AddressLocationFields.d.ts +13 -0
- package/dist/features/addresses/components/AddressLocationFields.js +41 -0
- package/dist/features/addresses/hooks/usePostalLookup.d.ts +17 -0
- package/dist/features/addresses/hooks/usePostalLookup.js +133 -0
- package/dist/features/addresses/schemas/address-form.d.ts +423 -0
- package/dist/features/addresses/schemas/address-form.js +212 -0
- package/dist/features/addresses/schemas/index.d.ts +1 -0
- package/dist/features/addresses/schemas/index.js +8 -0
- package/dist/features/admin/actions/admin-read-actions.d.ts +1 -1
- package/dist/features/admin/actions/index.d.ts +0 -1
- package/dist/features/admin/actions/index.js +0 -1
- package/dist/features/admin/actions/notification-actions.js +1 -41
- package/dist/features/admin/components/AdminActionIndexView.d.ts +32 -0
- package/dist/features/admin/components/AdminActionIndexView.js +128 -0
- package/dist/features/admin/components/AdminAdEditorView.js +159 -163
- package/dist/features/admin/components/AdminAddressEditorView.js +97 -55
- package/dist/features/admin/components/AdminBrandEditorView.d.ts +15 -0
- package/dist/features/admin/components/AdminBrandEditorView.js +113 -77
- package/dist/features/admin/components/AdminBundleEditorView.d.ts +19 -9
- package/dist/features/admin/components/AdminBundleEditorView.js +136 -168
- package/dist/features/admin/components/AdminCategoryEditorView.js +120 -43
- package/dist/features/admin/components/AdminCouponEditorView.js +145 -109
- package/dist/features/admin/components/AdminEmployeeEditorView.js +125 -56
- package/dist/features/admin/components/AdminFaqEditorView.js +112 -58
- package/dist/features/admin/components/AdminFeatureEditorView.js +108 -68
- package/dist/features/admin/components/AdminFulfillmentView.js +5 -2
- package/dist/features/admin/components/AdminMediaView.js +3 -3
- package/dist/features/admin/components/AdminNavEditorView.js +69 -44
- package/dist/features/admin/components/AdminOrderEditorView.js +47 -10
- package/dist/features/admin/components/AdminPrizeDrawsView.js +16 -2
- package/dist/features/admin/components/AdminSidebar.d.ts +11 -7
- package/dist/features/admin/components/AdminSiteSettingsView.js +37 -37
- package/dist/features/admin/components/AdminStoreEditorView.js +75 -52
- package/dist/features/admin/components/AdminSublistingCategoryEditorView.js +71 -30
- package/dist/features/admin/components/AdminTesterChecklistItemEditorView.js +95 -65
- package/dist/features/admin/components/BrandQuickCreateForm.d.ts +10 -0
- package/dist/features/admin/components/BrandQuickCreateForm.js +49 -26
- package/dist/features/admin/components/CategoryQuickCreateForm.d.ts +11 -0
- package/dist/features/admin/components/CategoryQuickCreateForm.js +48 -26
- package/dist/features/admin/components/index.d.ts +2 -2
- package/dist/features/admin/components/index.js +1 -1
- package/dist/features/admin/constants/site-settings-tabs.d.ts +120 -0
- package/dist/features/admin/constants/site-settings-tabs.js +152 -0
- package/dist/features/admin/index.d.ts +0 -3
- package/dist/features/admin/index.js +0 -2
- package/dist/features/admin/repository/analytics-rollup.repository.d.ts +35 -0
- package/dist/features/admin/repository/analytics-rollup.repository.js +30 -0
- package/dist/features/admin/schemas/admin-editor-forms.d.ts +56 -57
- package/dist/features/admin/schemas/admin-editor-forms.js +97 -54
- package/dist/features/admin/schemas/admin-ops-forms.d.ts +57 -5
- package/dist/features/admin/schemas/admin-ops-forms.js +104 -20
- package/dist/features/admin/schemas/admin-user-form.js +7 -0
- package/dist/features/admin/schemas/firestore.d.ts +48 -95
- package/dist/features/admin/schemas/firestore.js +15 -151
- package/dist/features/admin/schemas/nav-item-form.js +9 -2
- package/dist/features/admin/server.d.ts +0 -4
- package/dist/features/admin/server.js +0 -2
- package/dist/features/admin/types/index.d.ts +0 -7
- package/dist/features/analytics/repository/page-views.repository.d.ts +14 -0
- package/dist/features/analytics/repository/page-views.repository.js +24 -0
- package/dist/features/analytics/types.d.ts +1 -1
- package/dist/features/analytics/types.js +13 -0
- package/dist/features/auctions/components/AuctionDetailPageView.js +6 -2
- package/dist/features/auctions/components/MarketplaceAuctionCard.js +3 -1
- package/dist/features/auth/actions/index.d.ts +0 -1
- package/dist/features/auth/actions/index.js +0 -1
- package/dist/features/auth/actions/profile-actions.js +4 -3
- package/dist/features/auth/actions/realtime-token-actions.js +1 -12
- package/dist/features/auth/auth-helpers.js +5 -7
- package/dist/features/auth/components/ForgotPasswordView.js +1 -1
- package/dist/features/auth/components/Guards.js +2 -1
- package/dist/features/auth/components/LoginForm.d.ts +0 -2
- package/dist/features/auth/components/LoginForm.js +2 -4
- package/dist/features/auth/components/RegisterForm.js +62 -19
- package/dist/features/auth/components/ResetPasswordView.js +1 -1
- package/dist/features/auth/hooks/useAuth.js +3 -0
- package/dist/features/auth/permissions/constants.d.ts +27 -1
- package/dist/features/auth/role-predicates.d.ts +75 -7
- package/dist/features/auth/role-predicates.js +28 -2
- package/dist/features/auth/schemas/firestore.d.ts +22 -0
- package/dist/features/auth/schemas/index.d.ts +1 -1
- package/dist/features/auth/schemas/index.js +44 -8
- package/dist/features/auth/types/index.d.ts +14 -1
- package/dist/features/blog/api/route.js +10 -2
- package/dist/features/blog/components/BlogIndexListing.js +1 -1
- package/dist/features/blog/hooks/useBlog.js +2 -2
- package/dist/features/blog/repository/blog.repository.js +3 -1
- package/dist/features/blog/schemas/index.d.ts +4 -0
- package/dist/features/blog/schemas/index.js +2 -0
- package/dist/features/blog/types/index.d.ts +1 -1
- package/dist/features/cart/actions/cart-actions.js +13 -4
- package/dist/features/cart/utils/pending-ops.js +1 -1
- package/dist/features/catalogue/components/CatalogueItemEditorView.d.ts +22 -0
- package/dist/features/catalogue/components/CatalogueItemEditorView.js +112 -52
- package/dist/features/catalogue/schemas/validation.d.ts +4 -4
- package/dist/features/catalogue/schemas/validation.js +47 -10
- package/dist/features/categories/components/BrandDetailPageView.js +28 -12
- package/dist/features/categories/components/CategoryDetailPageView.js +37 -20
- package/dist/features/categories/repository/categories.repository.js +3 -1
- package/dist/features/categories/schemas/bundle-form.d.ts +142 -0
- package/dist/features/categories/schemas/bundle-form.js +149 -0
- package/dist/features/checkout/actions/checkout-value-otp-actions.js +10 -1
- package/dist/features/classified/components/ClassifiedContactSellerPanel.js +1 -1
- package/dist/features/classified/components/ClassifiedDetailPageView.d.ts +5 -4
- package/dist/features/classified/components/ClassifiedDetailPageView.js +47 -18
- package/dist/features/consultation/components/ConsultationForm.js +1 -1
- package/dist/features/consultation/schemas/index.js +34 -10
- package/dist/features/corporate/schemas/index.js +36 -15
- package/dist/features/digital-codes/components/DigitalCodeDetailPageView.js +4 -1
- package/dist/features/events/components/EventBanner.js +5 -2
- package/dist/features/events/components/EventOfferCard.js +3 -1
- package/dist/features/events/components/EventPollWidget.js +1 -1
- package/dist/features/events/components/SpinWheelView.js +3 -2
- package/dist/features/filters/FilterPanel.js +3 -3
- package/dist/features/filters/RangeFilter.d.ts +10 -0
- package/dist/features/filters/RangeFilter.js +41 -4
- package/dist/features/grouped/components/GroupedListingEditorView.js +2 -1
- package/dist/features/history/hooks/useHistory.js +29 -27
- package/dist/features/homepage/components/AdSlot.js +3 -1
- package/dist/features/homepage/components/GoogleReviewsSection.js +8 -2
- package/dist/features/homepage/components/MarketplaceHomepageView.js +58 -15
- package/dist/features/homepage/components/SocialFeedSection.js +4 -1
- package/dist/features/homepage/hooks/useBlogArticles.js +1 -1
- package/dist/features/homepage/lib/live-stats.js +8 -1
- package/dist/features/homepage/repository/carousel.repository.js +2 -1
- package/dist/features/layout/BottomActions.js +84 -11
- package/dist/features/layout/BottomActionsContext.d.ts +1 -6
- package/dist/features/layout/BottomActionsContext.js +1 -1
- package/dist/features/layout/hooks/useBottomActions.js +2 -2
- package/dist/features/layout/hooks/useFormBottomActions.d.ts +12 -1
- package/dist/features/layout/hooks/useFormBottomActions.js +12 -6
- package/dist/features/live/components/LiveItemDetailPageView.js +4 -1
- package/dist/features/lottery/schemas/config-write.d.ts +9 -5
- package/dist/features/lottery/schemas/config-write.js +69 -9
- package/dist/features/media/finalize.js +3 -1
- package/dist/features/media/modals/ImageEditor.js +1 -1
- package/dist/features/media/modals/VideoThumbnailSelector.js +5 -2
- package/dist/features/media/modals/VideoTrimModal.js +5 -2
- package/dist/features/media/upload/MediaUploadField.js +2 -2
- package/dist/features/messages/hooks/useConversation.js +18 -4
- package/dist/features/messages/hooks/useConversations.js +25 -8
- package/dist/features/orders/components/RefundRequestView.js +5 -2
- package/dist/features/orders/schemas/buyer-forms.d.ts +6 -3
- package/dist/features/orders/schemas/buyer-forms.js +31 -3
- package/dist/features/orders/schemas/index.d.ts +2 -2
- package/dist/features/pre-orders/components/MarketplacePreorderCard.js +3 -1
- package/dist/features/pre-orders/components/PreOrderActionsClient.js +1 -1
- package/dist/features/pre-orders/components/PreOrderDetailPageView.js +4 -1
- package/dist/features/products/components/GroupSettingsPanel.js +3 -1
- package/dist/features/products/components/MakeOfferButton.d.ts +13 -2
- package/dist/features/products/components/MakeOfferButton.js +33 -11
- package/dist/features/products/components/PrizeDrawDetailPageView.js +4 -1
- package/dist/features/products/components/ProductDetailActions.js +0 -1
- package/dist/features/products/components/ProductDetailPageView.d.ts +7 -3
- package/dist/features/products/components/ProductDetailPageView.js +16 -7
- package/dist/features/products/components/ShareButton.js +3 -1
- package/dist/features/products/constants/action-defs.d.ts +1 -2
- package/dist/features/products/constants/action-defs.js +40 -43
- package/dist/features/products/repository/loadProductFeatures.js +10 -2
- package/dist/features/products/repository/products.repository.d.ts +5 -1
- package/dist/features/products/repository/products.repository.js +25 -2
- package/dist/features/products/schemas/firestore.d.ts +7 -3
- package/dist/features/products/schemas/product-features.validators.js +3 -0
- package/dist/features/promotions/components/CouponCard.js +11 -8
- package/dist/features/reviews/actions/review-actions.js +8 -1
- package/dist/features/reviews/components/ReviewDetailPageView.js +13 -3
- package/dist/features/reviews/components/ReviewDetailShell.js +3 -1
- package/dist/features/scams/actions/scam-actions.d.ts +9 -1
- package/dist/features/scams/actions/scam-actions.js +52 -12
- package/dist/features/scams/components/SellerTrustBadge.d.ts +1 -1
- package/dist/features/scams/components/SellerTrustBadge.js +13 -0
- package/dist/features/scams/repository/scammer.repository.js +2 -1
- package/dist/features/scams/schemas/firestore.d.ts +15 -1
- package/dist/features/scams/schemas/report-form.d.ts +5 -5
- package/dist/features/scams/schemas/report-form.js +18 -3
- package/dist/features/search/action-index/derive.d.ts +49 -0
- package/dist/features/search/action-index/derive.js +121 -0
- package/dist/features/search/action-index/repository.d.ts +42 -0
- package/dist/features/search/action-index/repository.js +100 -0
- package/dist/features/search/action-index/settings-entries.d.ts +41 -0
- package/dist/features/search/action-index/settings-entries.js +268 -0
- package/dist/features/search/action-index/types.d.ts +81 -0
- package/dist/features/search/action-index/types.js +102 -0
- package/dist/features/search/action-index/validate-entry.d.ts +34 -0
- package/dist/features/search/action-index/validate-entry.js +114 -0
- package/dist/features/search/hooks/useNavSuggestions.d.ts +5 -1
- package/dist/features/search/hooks/useNavSuggestions.js +23 -3
- package/dist/features/search/repository/search.repository.js +3 -1
- package/dist/features/seller/actions/offer-actions.js +43 -19
- package/dist/features/seller/actions/seller-actions.js +29 -5
- package/dist/features/seller/components/CategoryChipPicker.d.ts +9 -0
- package/dist/features/seller/components/CategoryChipPicker.js +12 -0
- package/dist/features/seller/components/FulfillmentView.js +5 -2
- package/dist/features/seller/components/PhysicalLocationModal.js +1 -1
- package/dist/features/seller/components/PrintCenterView.js +3 -1
- package/dist/features/seller/components/SellerAddressesView.js +5 -1
- package/dist/features/seller/components/SellerAnalyticsAlertsView.js +83 -43
- package/dist/features/seller/components/SellerArtView.d.ts +14 -7
- package/dist/features/seller/components/SellerArtView.js +4 -119
- package/dist/features/seller/components/SellerBidsView.js +1 -1
- package/dist/features/seller/components/SellerClassifiedView.d.ts +14 -7
- package/dist/features/seller/components/SellerClassifiedView.js +4 -124
- package/dist/features/seller/components/SellerCouponEditorView.d.ts +22 -1
- package/dist/features/seller/components/SellerCouponEditorView.js +91 -45
- package/dist/features/seller/components/SellerCouponsView.js +1 -1
- package/dist/features/seller/components/SellerDigitalCodesView.d.ts +14 -7
- package/dist/features/seller/components/SellerDigitalCodesView.js +4 -126
- package/dist/features/seller/components/SellerGoogleReviewsView.js +2 -2
- package/dist/features/seller/components/SellerListingTypeView.d.ts +66 -0
- package/dist/features/seller/components/SellerListingTypeView.js +277 -0
- package/dist/features/seller/components/SellerLiveView.d.ts +14 -7
- package/dist/features/seller/components/SellerLiveView.js +4 -126
- package/dist/features/seller/components/SellerOrdersView.js +3 -3
- package/dist/features/seller/components/SellerPayoutMethodsView.js +2 -2
- package/dist/features/seller/components/SellerProductShell.d.ts +5 -0
- package/dist/features/seller/components/SellerProductShell.js +15 -5
- package/dist/features/seller/components/SellerProductsView.js +24 -10
- package/dist/features/seller/components/SellerReviewsView.js +47 -16
- package/dist/features/seller/components/SellerShippingConfigsView.js +5 -4
- package/dist/features/seller/components/SellerSidebar.d.ts +3 -6
- package/dist/features/seller/components/SellerStickersView.d.ts +14 -7
- package/dist/features/seller/components/SellerStickersView.js +4 -119
- package/dist/features/seller/components/SellerStoreCategoriesView.js +3 -2
- package/dist/features/seller/components/SellerSupportView.d.ts +31 -0
- package/dist/features/seller/components/SellerSupportView.js +100 -0
- package/dist/features/seller/components/index.d.ts +4 -8
- package/dist/features/seller/components/index.js +2 -4
- package/dist/features/seller/index.d.ts +0 -1
- package/dist/features/seller/index.js +0 -1
- package/dist/features/seller/schemas/coupon-form.d.ts +214 -0
- package/dist/features/seller/schemas/coupon-form.js +155 -23
- package/dist/features/seller/schemas/offer-forms.d.ts +16 -7
- package/dist/features/seller/schemas/offer-forms.js +28 -12
- package/dist/features/shell/FormShell.js +2 -2
- package/dist/features/shell/QuickFormDrawer.js +2 -2
- package/dist/features/shell/SectionForm.d.ts +19 -1
- package/dist/features/shell/SectionForm.js +104 -17
- package/dist/features/shell/build-sections.d.ts +23 -0
- package/dist/features/shell/build-sections.js +106 -8
- package/dist/features/shell/field-ui-meta.d.ts +44 -0
- package/dist/features/shell/field-ui-meta.js +14 -7
- package/dist/features/shell/form-sections.d.ts +46 -0
- package/dist/features/shell/form-sections.js +114 -0
- package/dist/features/shipments/components/AdminShipmentEditorView.js +87 -64
- package/dist/features/shipments/schemas/validation.d.ts +2 -2
- package/dist/features/shipments/schemas/validation.js +44 -13
- package/dist/features/store-extensions/schemas/custom-role-form.js +6 -2
- package/dist/features/store-extensions/schemas/listing-template-form.d.ts +7 -7
- package/dist/features/store-extensions/schemas/payout-method-form.js +14 -0
- package/dist/features/stores/actions/store-query-actions.js +3 -2
- package/dist/features/stores/api/[storeSlug]/auctions/route.js +3 -1
- package/dist/features/stores/api/[storeSlug]/products/route.js +3 -1
- package/dist/features/stores/components/StoreDetailLayoutView.d.ts +1 -1
- package/dist/features/stores/components/StoreDetailLayoutView.js +12 -3
- package/dist/features/support/repository/support.repository.d.ts +21 -0
- package/dist/features/support/repository/support.repository.js +63 -0
- package/dist/features/support/schemas/firestore.d.ts +27 -2
- package/dist/features/support/schemas/firestore.js +2 -0
- package/dist/features/support/schemas/ticket-create-form.js +7 -0
- package/dist/features/tester/schemas/checklist-item-form.d.ts +43 -0
- package/dist/features/tester/schemas/checklist-item-form.js +109 -0
- package/dist/features/tester/seed-data/blog-tester-seed-data.js +2 -2
- package/dist/features/tester/seed-data/categories-tester-seed-data.js +2 -2
- package/dist/features/tester/seed-data/events-tester-seed-data.js +5 -5
- package/dist/features/tester/seed-data/orders-tester-seed-data.js +2 -2
- package/dist/features/tester/seed-data/products-tester-seed-data.js +48 -49
- package/dist/features/tester/seed-data/stores-tester-seed-data.js +3 -3
- package/dist/features/tester/seed-data/tester-checklist-seed-data.js +291 -30
- package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +51 -14
- package/dist/features/wishlist/hooks/useWishlistToggle.js +8 -1
- package/dist/http/api-handler.js +2 -1
- package/dist/index.d.ts +25 -104
- package/dist/index.js +38 -143
- package/dist/jobs.d.ts +1 -1
- package/dist/jobs.js +1 -1
- package/dist/monitoring/browser.d.ts +0 -2
- package/dist/monitoring/browser.js +12 -1
- package/dist/monitoring/index.d.ts +0 -2
- package/dist/monitoring/index.js +0 -1
- package/dist/next/api/routeHandler.js +9 -4
- package/dist/next/index.d.ts +1 -2
- package/dist/next/index.js +0 -1
- package/dist/next/middleware/index.d.ts +0 -2
- package/dist/next/middleware/index.js +0 -1
- package/dist/next/routing/route-map.d.ts +8 -7
- package/dist/next/routing/route-map.js +10 -3
- package/dist/providers/auth-firebase/session.js +3 -1
- package/dist/providers/db-firebase/admin-app-lite.js +8 -8
- package/dist/providers/db-firebase/admin.js +27 -13
- package/dist/providers/db-firebase/browser-stub.d.ts +1 -11
- package/dist/providers/db-firebase/browser-stub.js +6 -11
- package/dist/providers/db-firebase/index.d.ts +0 -1
- package/dist/providers/db-firebase/index.js +0 -1
- package/dist/providers/db-firebase/rtdb-paths.d.ts +15 -6
- package/dist/providers/db-firebase/rtdb-paths.js +15 -6
- package/dist/providers/db-firebase/rtdb-url.d.ts +27 -0
- package/dist/providers/db-firebase/rtdb-url.js +50 -0
- package/dist/providers/db-firebase/sieve.d.ts +22 -0
- package/dist/providers/firebase-client/realtime.d.ts +20 -0
- package/dist/providers/firebase-client/realtime.js +34 -1
- package/dist/providers.d.ts +1 -1
- package/dist/providers.js +1 -1
- package/dist/react/hooks/use-action-dispatch.js +8 -2
- package/dist/react/hooks/useFormStatePreservation.js +3 -1
- package/dist/react/hooks/useListingTypeFlags.d.ts +1 -1
- package/dist/react/hooks/useListingTypeFlags.js +1 -1
- package/dist/react/hooks/usePendingFilters.js +5 -3
- package/dist/react/hooks/usePendingTable.js +15 -3
- package/dist/react/hooks/useRealtimeEvent.js +20 -9
- package/dist/repositories/index.d.ts +0 -1
- package/dist/repositories/index.js +0 -1
- package/dist/schemas/registry.d.ts +197 -232
- package/dist/schemas/registry.js +5 -6
- package/dist/schemas/webhooks/razorpay.d.ts +50 -50
- package/dist/security/authorization.d.ts +9 -0
- package/dist/security/authorization.js +16 -2
- package/dist/security/browser.d.ts +1 -3
- package/dist/security/browser.js +5 -2
- package/dist/security/index.d.ts +1 -3
- package/dist/security/index.js +19 -2
- package/dist/security/pii-encrypt.js +16 -0
- package/dist/security/pii-schemas.d.ts +0 -14
- package/dist/security/pii-schemas.js +7 -15
- package/dist/seed/_helpers/category-forest.js +2 -2
- package/dist/seed/_helpers/media.d.ts +19 -0
- package/dist/seed/_helpers/media.js +75 -0
- package/dist/seed/blog-posts-seed-data.js +17 -17
- package/dist/seed/carousel-slides-seed-data.js +7 -7
- package/dist/seed/cart-seed-data.js +13 -13
- package/dist/seed/categories-seed-data.js +10 -10
- package/dist/seed/events-seed-data.js +24 -24
- package/dist/seed/factories/product.factory.js +4 -4
- package/dist/seed/factories/store.factory.js +3 -3
- package/dist/seed/factories/user.factory.js +2 -2
- package/dist/seed/grouped-listings-seed-data.js +11 -11
- package/dist/seed/homepage-sections-seed-data.js +2 -2
- package/dist/seed/index.d.ts +0 -1
- package/dist/seed/index.js +0 -1
- package/dist/seed/manifest.d.ts +1 -1
- package/dist/seed/manifest.js +0 -5
- package/dist/seed/notifications-seed-data.js +20 -1
- package/dist/seed/orders-seed-data.js +2 -2
- package/dist/seed/products-art-seed-data.js +16 -16
- package/dist/seed/products-auctions-seed-data.js +34 -34
- package/dist/seed/products-classifieds-seed-data.js +35 -37
- package/dist/seed/products-digital-codes-seed-data.js +20 -20
- package/dist/seed/products-live-items-seed-data.js +11 -11
- package/dist/seed/products-preorders-seed-data.js +13 -13
- package/dist/seed/products-prize-draws-seed-data.js +43 -43
- package/dist/seed/products-standard-seed-data.js +54 -54
- package/dist/seed/products-stickers-seed-data.js +15 -15
- package/dist/seed/reviews-seed-data.js +4 -4
- package/dist/seed/scammers-seed-data.js +3 -3
- package/dist/seed/site-settings-seed-data.js +11 -24
- package/dist/seed/store-extensions-seed-data.js +10 -10
- package/dist/seed/stores-seed-data.js +11 -11
- package/dist/seed/support-tickets-seed-data.d.ts +14 -0
- package/dist/seed/support-tickets-seed-data.js +20 -1
- package/dist/seed/users-seed-data.js +20 -20
- package/dist/server-entry.d.ts +0 -1
- package/dist/server-entry.js +0 -1
- package/dist/server.d.ts +9 -6
- package/dist/server.js +7 -13
- package/dist/styles.css +248 -68
- package/dist/tailwind-utilities.css +1 -1
- package/dist/tokens/themes/default-dark.js +2 -2
- package/dist/tokens/themes/default-light.js +2 -2
- package/dist/tokens/tokens.css +24 -4
- package/dist/ui/components/ActionRow.d.ts +50 -0
- package/dist/ui/components/ActionRow.js +53 -0
- package/dist/ui/components/ActionRow.style.css +145 -0
- package/dist/ui/components/Drawer.d.ts +10 -0
- package/dist/ui/components/Drawer.js +2 -1
- package/dist/ui/components/FilterDrawer.js +4 -1
- package/dist/ui/components/FilterDrawer.style.css +6 -12
- package/dist/ui/components/FormActionBar.js +14 -1
- package/dist/ui/components/FormActionBar.style.css +12 -11
- package/dist/ui/components/ListingLayout.js +8 -1
- package/dist/ui/components/ListingLayout.style.css +6 -13
- package/dist/ui/components/Modal.d.ts +15 -1
- package/dist/ui/components/Modal.js +17 -3
- package/dist/ui/components/QuickCreateModal.js +2 -2
- package/dist/ui/components/QuickCreateModal.style.css +78 -84
- package/dist/ui/components/RecordDetailModal.js +2 -2
- package/dist/ui/components/SideDrawer.d.ts +8 -0
- package/dist/ui/components/SideDrawer.js +2 -1
- package/dist/ui/components/SideDrawer.style.css +6 -3
- package/dist/ui/components/SideModal.d.ts +11 -1
- package/dist/ui/components/SideModal.js +3 -2
- package/dist/ui/components/SideModal.style.css +14 -0
- package/dist/ui/components/Typography.style.css +33 -24
- package/dist/ui/components/index.style.css +1 -0
- package/dist/ui/components/toolbar-collapse.js +1 -2
- package/dist/ui/forms/FormShell.style.css +260 -311
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/index.js +1 -0
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.js +0 -1
- package/dist/validation/index.d.ts +1 -1
- package/dist/validation/index.js +1 -1
- package/dist/validation/schemas.d.ts +0 -19
- package/dist/validation/schemas.js +8 -19
- package/package.json +1 -1
- package/scripts/seed-cli.mjs +3 -6
|
@@ -28,19 +28,22 @@ export type OrderCancelValues = z.infer<typeof orderCancelSchema>;
|
|
|
28
28
|
* a `false` in it, it is a form that must not send.
|
|
29
29
|
*/
|
|
30
30
|
export declare const paymentProofSchema: z.ZodObject<{
|
|
31
|
-
|
|
31
|
+
proofUrl: z.ZodString;
|
|
32
|
+
transactionId: z.ZodUnion<[z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>, z.ZodLiteral<"">]>;
|
|
32
33
|
buyerReportedUpiId: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
|
|
33
34
|
buyerMarkedPaid: z.ZodLiteral<true>;
|
|
34
35
|
buyerFraudAgreementAccepted: z.ZodLiteral<true>;
|
|
35
36
|
}, "strip", z.ZodTypeAny, {
|
|
36
|
-
transactionId: string;
|
|
37
37
|
buyerMarkedPaid: true;
|
|
38
38
|
buyerFraudAgreementAccepted: true;
|
|
39
|
+
proofUrl: string;
|
|
40
|
+
transactionId?: string | undefined;
|
|
39
41
|
buyerReportedUpiId?: string | undefined;
|
|
40
42
|
}, {
|
|
41
|
-
transactionId: string;
|
|
42
43
|
buyerMarkedPaid: true;
|
|
43
44
|
buyerFraudAgreementAccepted: true;
|
|
45
|
+
proofUrl: string;
|
|
46
|
+
transactionId?: string | undefined;
|
|
44
47
|
buyerReportedUpiId?: string | undefined;
|
|
45
48
|
}>;
|
|
46
49
|
export type PaymentProofValues = z.infer<typeof paymentProofSchema>;
|
|
@@ -58,11 +58,37 @@ export const orderCancelSchema = z.object({
|
|
|
58
58
|
* a `false` in it, it is a form that must not send.
|
|
59
59
|
*/
|
|
60
60
|
export const paymentProofSchema = z.object({
|
|
61
|
+
/*
|
|
62
|
+
* The screenshot. It was the ONE thing the route hard-required
|
|
63
|
+
* (`MISSING_PROOF_URL`) and the one field this schema did not declare, so
|
|
64
|
+
* the page gated it with a toast instead of a field error — and the schema
|
|
65
|
+
* could never have reported the form's most important omission.
|
|
66
|
+
*/
|
|
67
|
+
proofUrl: annotate(z.string().min(1, "Upload a screenshot of the payment confirmation."), {
|
|
68
|
+
section: "proof", sectionLabel: "Your payment", sectionRequired: true,
|
|
69
|
+
order: 1, row: "full", kind: "media",
|
|
70
|
+
label: "Payment screenshot (JPG/PNG/PDF)",
|
|
71
|
+
help: "A screenshot of the payment confirmation from your UPI app.",
|
|
72
|
+
}),
|
|
73
|
+
/*
|
|
74
|
+
* Optional, and format-checked when present.
|
|
75
|
+
*
|
|
76
|
+
* It was `.min(4)` REQUIRED here while the route never checked it and the
|
|
77
|
+
* page labelled it "(optional)" — three answers, and the schema's was
|
|
78
|
+
* unreachable because nothing parsed it. Required is wrong: `cash` is a
|
|
79
|
+
* manual payment method too and has no UTR, so demanding one would block
|
|
80
|
+
* every cash order. A short-but-non-empty reference is still a typo worth
|
|
81
|
+
* catching, which is what the refine keeps.
|
|
82
|
+
*/
|
|
61
83
|
transactionId: annotate(z
|
|
62
84
|
.string()
|
|
63
85
|
.trim()
|
|
64
|
-
.
|
|
65
|
-
.
|
|
86
|
+
.max(120, "Keep the reference under 120 characters.")
|
|
87
|
+
.refine((v) => v === "" || v.length >= 4, "Enter the full UTR or reference number from your payment app.")
|
|
88
|
+
.optional()
|
|
89
|
+
.or(z.literal("")), { section: "proof", quick: true, order: 2, row: "pair",
|
|
90
|
+
label: "UTR / transaction ID",
|
|
91
|
+
help: "The reference shown in your UPI app. Leave blank for a cash payment." }),
|
|
66
92
|
/*
|
|
67
93
|
* The UPI ID the buyer actually sent to. Compared against the store's
|
|
68
94
|
* displayed one so a mismatch is flagged to the admin — which is why the
|
|
@@ -73,7 +99,9 @@ export const paymentProofSchema = z.object({
|
|
|
73
99
|
.trim()
|
|
74
100
|
.regex(/^[\w.\-_]{2,256}@[a-zA-Z]{2,64}$/, "Enter the UPI ID you paid to, e.g. name@bank.")
|
|
75
101
|
.optional()
|
|
76
|
-
.or(z.literal("")), { section: "proof", order:
|
|
102
|
+
.or(z.literal("")), { section: "proof", order: 3, row: "pair",
|
|
103
|
+
label: "UPI ID you paid from",
|
|
104
|
+
help: "Shown in your UPI app's confirmation — it helps us verify faster." }),
|
|
77
105
|
buyerMarkedPaid: annotate(z.literal(true, { errorMap: () => ({ message: "Confirm that you have sent the payment." }) }), { section: "declare", sectionLabel: "Declaration", sectionRequired: true, order: 1, row: "full" }),
|
|
78
106
|
buyerFraudAgreementAccepted: annotate(z.literal(true, {
|
|
79
107
|
errorMap: () => ({ message: "You must accept the fraud policy to submit proof." }),
|
|
@@ -983,9 +983,9 @@ export declare const orderSchema: z.ZodObject<{
|
|
|
983
983
|
shippingCarrier?: string | undefined;
|
|
984
984
|
couponCode?: string | undefined;
|
|
985
985
|
discount?: number | undefined;
|
|
986
|
-
tax?: number | undefined;
|
|
987
986
|
paymentGateway?: string | undefined;
|
|
988
987
|
shippingCost?: number | undefined;
|
|
988
|
+
tax?: number | undefined;
|
|
989
989
|
timeline?: {
|
|
990
990
|
status: "pending" | "cancelled" | "processing" | "refunded" | "delivered" | "confirmed" | "shipped" | "return_requested" | "returned";
|
|
991
991
|
timestamp: string;
|
|
@@ -1020,9 +1020,9 @@ export declare const orderSchema: z.ZodObject<{
|
|
|
1020
1020
|
shippingCarrier?: string | undefined;
|
|
1021
1021
|
couponCode?: string | undefined;
|
|
1022
1022
|
discount?: number | undefined;
|
|
1023
|
-
tax?: number | undefined;
|
|
1024
1023
|
paymentGateway?: string | undefined;
|
|
1025
1024
|
shippingCost?: number | undefined;
|
|
1025
|
+
tax?: number | undefined;
|
|
1026
1026
|
timeline?: {
|
|
1027
1027
|
status: "pending" | "cancelled" | "processing" | "refunded" | "delivered" | "confirmed" | "shipped" | "return_requested" | "returned";
|
|
1028
1028
|
timestamp: string;
|
|
@@ -54,8 +54,10 @@ export function MarketplacePreorderCard({ product, className = "", variant = "gr
|
|
|
54
54
|
await toggle();
|
|
55
55
|
}
|
|
56
56
|
catch (_err) {
|
|
57
|
+
// useWishlistToggle rolls back its optimistic state and raises its own
|
|
58
|
+
// toast on failure, so the heart returns to its true value on screen.
|
|
59
|
+
// Reporting again here would double-notify for one user action.
|
|
57
60
|
void normalizeError(_err);
|
|
58
|
-
// The hook rolls back optimistic state when the mutation fails.
|
|
59
61
|
}
|
|
60
62
|
}, [toggle]);
|
|
61
63
|
return (_jsxs(BaseListingCard, { isSelected: isSelected, variant: variant, className: className, onMouseDown: !isSelected ? longPress.onMouseDown : undefined, onMouseUp: !isSelected ? longPress.onMouseUp : undefined, onMouseLeave: !isSelected ? longPress.onMouseLeave : undefined, onTouchStart: !isSelected ? longPress.onTouchStart : undefined, onTouchEnd: !isSelected ? longPress.onTouchEnd : undefined, onTouchCancel: !isSelected ? longPress.onTouchCancel : undefined, children: [_jsxs(BaseListingCard.Hero, { aspect: "square", variant: variant, children: [_jsx(TextLink, { href: detailHref, className: "absolute inset-0 block", children: _jsx(MediaImage, { src: product.mainImage, alt: product.title, size: "card", fallback: "Product image" }) }), _jsxs(Stack, { className: "absolute right-2 top-2", align: "end", gap: "xs", children: [_jsx(Span, { layout: "inline-flex", color: "inverse", size: "xs", weight: "medium", className: "bg-cobalt", rounded: "full", padding: "pill-xs", children: mergedLabels.preOrderBadge }), product.featured && (_jsx(Span, { size: "xs", weight: "medium", className: CLS_PREORDER_BADGE, children: mergedLabels.featuredBadge }))] }), _jsxs(Stack, { className: "absolute left-2 top-2 pointer-events-none", gap: "xs", children: [product.partOfBundleIds && product.partOfBundleIds.length > 0 && (_jsx(Span, { className: CLS_SALE_BADGE, title: product.partOfBundleTitles?.[0] ? `In bundle: ${product.partOfBundleTitles[0]}` : "In a bundle", children: "Bundled" })), product.groupId && (_jsx(Span, { className: CLS_TRENDING_BADGE, title: product.groupTitle ? `Part of set: ${product.groupTitle}` : "Part of a set", children: product.isGroupParent ? "Set Parent" : "In Set" })), product.sublistingCategoryId && (_jsx(Span, { className: CLS_LIMITED_BADGE, title: "Has variants or sub-listings", children: "Has Variants" }))] }), onSelect && (_jsx(BaseListingCard.Checkbox, { selected: isSelected, onSelect: (event) => {
|
|
@@ -24,7 +24,7 @@ export function PreOrderActionsClient({ productId, price, currency, depositAmoun
|
|
|
24
24
|
setShowLoginModal(true);
|
|
25
25
|
}
|
|
26
26
|
else {
|
|
27
|
-
setError(
|
|
27
|
+
setError("Failed to reserve. Please try again.");
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
});
|
|
@@ -73,7 +73,10 @@ function PreOrderBuyBarPanel({ reserveTarget, reservedCount, progressPct, produc
|
|
|
73
73
|
export async function PreOrderDetailPageView({ id, initialPreOrder, onReserveNow, productFeatures }) {
|
|
74
74
|
const product = initialPreOrder !== undefined
|
|
75
75
|
? (initialPreOrder ?? undefined)
|
|
76
|
-
|
|
76
|
+
// The pre-order IS this page's subject — a read failure must surface rather
|
|
77
|
+
// than become the same `undefined` a removed listing produces, which the
|
|
78
|
+
// "Not Found" branch below already handles.
|
|
79
|
+
: await productRepository.findByIdOrSlug(id);
|
|
77
80
|
if (!product) {
|
|
78
81
|
return (_jsx(Main, { children: _jsx(Section, { padding: "y-5xl", children: _jsx(Container, { size: "md", children: _jsxs(Stack, { align: "start", gap: "md", className: "text-left", children: [_jsx(Heading, { level: 1, size: "2xl", weight: "semibold", color: "primary", children: "Pre-Order Not Found" }), _jsx(Text, { color: "muted", children: "The pre-order item you are looking for may have been removed." }), _jsx(Link, { href: String(ROUTES.PUBLIC.PRE_ORDERS), className: "text-[length:var(--appkit-text-sm)] font-medium text-primary-600 hover:underline", children: "Browse Pre-Orders" })] }) }) }) }));
|
|
79
82
|
}
|
|
@@ -9,6 +9,8 @@ import { MediaImage } from "../../media/MediaImage";
|
|
|
9
9
|
import { apiClient } from "../../../http";
|
|
10
10
|
import { PRODUCT_ENDPOINTS } from "../../../constants/api-endpoints";
|
|
11
11
|
import { ProductInlineSelect } from "../../seller/components/ProductInlineSelect";
|
|
12
|
+
import { SIEVE_OP, sieveFilter } from "../../../utils/sieve-builder";
|
|
13
|
+
import { PRODUCT_FIELDS } from "../../../constants/field-names";
|
|
12
14
|
const groupTitleSchema = z.object({
|
|
13
15
|
groupTitle: z.string().min(1, "Group title is required"),
|
|
14
16
|
});
|
|
@@ -247,5 +249,5 @@ function AddChildContent({ addTab, setAddTab, createForm, setCreateForm, product
|
|
|
247
249
|
validate(createForm);
|
|
248
250
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
249
251
|
}, [createForm, validate]);
|
|
250
|
-
return (_jsx(Stack, { gap: "md", children: _jsxs(Tabs, { value: addTab, onChange: (v) => setAddTab(v), children: [_jsxs(TabsList, { children: [_jsx(TabsTrigger, { value: "create", children: "Create new child" }), _jsx(TabsTrigger, { value: "link", children: "Link existing" })] }), _jsx(TabsContent, { value: "create", children: _jsx(FormShellContext.Provider, { value: shellCtx, children: _jsxs(Stack, { gap: "sm", className: "mt-4", children: [_jsx(FormField, { name: "title", label: "Title *", type: "text", value: createForm.title, onChange: (v) => setCreateForm({ ...createForm, title: v }), placeholder: `${productSlug}-part` }), _jsx(FormField, { name: "price", label: "Price (\u20B9) *", type: "number", value: createForm.price, onChange: (v) => setCreateForm({ ...createForm, price: v }), placeholder: "0" }), _jsx(Select, { label: "Condition", value: createForm.condition, onValueChange: (v) => setCreateForm({ ...createForm, condition: v }), options: CONDITION_OPTIONS }), _jsx(Text, { className: "dark:text-[var(--appkit-color-text-faint)]/80", color: "faint", size: "xs", children: "Other fields (category, brand, shipping, return policy) are inherited from this parent listing. Need more control? Edit the full listing after saving." }), _jsx(FormErrorSummary, {}), _jsx(Button, { type: "button", onClick: onAddCreate, isLoading: loading, disabled: !createForm.title || !createForm.price, children: "Create and link child" })] }) }) }), _jsx(TabsContent, { value: "link", children: _jsxs(Stack, { gap: "sm", className: "mt-4", children: [_jsx(Text, { size: "xs", color: "muted", children: "Search your existing products or pre-orders. Auctions cannot be linked. Select multiple to bulk-link." }), _jsx(ProductInlineSelect, { scope: "store", endpoint: storeProductsEndpoint, filters: "
|
|
252
|
+
return (_jsx(Stack, { gap: "md", children: _jsxs(Tabs, { value: addTab, onChange: (v) => setAddTab(v), children: [_jsxs(TabsList, { children: [_jsx(TabsTrigger, { value: "create", children: "Create new child" }), _jsx(TabsTrigger, { value: "link", children: "Link existing" })] }), _jsx(TabsContent, { value: "create", children: _jsx(FormShellContext.Provider, { value: shellCtx, children: _jsxs(Stack, { gap: "sm", className: "mt-4", children: [_jsx(FormField, { name: "title", label: "Title *", type: "text", value: createForm.title, onChange: (v) => setCreateForm({ ...createForm, title: v }), placeholder: `${productSlug}-part` }), _jsx(FormField, { name: "price", label: "Price (\u20B9) *", type: "number", value: createForm.price, onChange: (v) => setCreateForm({ ...createForm, price: v }), placeholder: "0" }), _jsx(Select, { label: "Condition", value: createForm.condition, onValueChange: (v) => setCreateForm({ ...createForm, condition: v }), options: CONDITION_OPTIONS }), _jsx(Text, { className: "dark:text-[var(--appkit-color-text-faint)]/80", color: "faint", size: "xs", children: "Other fields (category, brand, shipping, return policy) are inherited from this parent listing. Need more control? Edit the full listing after saving." }), _jsx(FormErrorSummary, {}), _jsx(Button, { type: "button", onClick: onAddCreate, isLoading: loading, disabled: !createForm.title || !createForm.price, children: "Create and link child" })] }) }) }), _jsx(TabsContent, { value: "link", children: _jsxs(Stack, { gap: "sm", className: "mt-4", children: [_jsx(Text, { size: "xs", color: "muted", children: "Search your existing products or pre-orders. Auctions cannot be linked. Select multiple to bulk-link." }), _jsx(ProductInlineSelect, { scope: "store", endpoint: storeProductsEndpoint, filters: sieveFilter(PRODUCT_FIELDS.LISTING_TYPE, SIEVE_OP.EQ, "standard"), multiple: true, value: linkTargets, onChange: setLinkTargets, placeholder: "Search listings\u2026" }), _jsx(Button, { type: "button", onClick: onAddLink, isLoading: loading, disabled: linkTargets.length === 0, children: linkTargets.length > 1 ? `Link ${linkTargets.length} to group` : "Link to group" })] }) })] }) }));
|
|
251
253
|
}
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { type OfferBounds } from "../../../_internal/shared/features/offers/config";
|
|
2
3
|
export interface MakeOfferButtonProps {
|
|
3
4
|
productId: string;
|
|
4
5
|
listedPrice: number;
|
|
5
6
|
currency?: string;
|
|
6
|
-
|
|
7
|
+
/**
|
|
8
|
+
* The amounts this listing accepts, from `resolveOfferBounds()`.
|
|
9
|
+
*
|
|
10
|
+
* 🛑 Required, and deliberately not derivable here. This component used to
|
|
11
|
+
* compute its own floor from `minOfferPercent`, which is a second copy of a
|
|
12
|
+
* rule the server also owns — and a listing whose only purchase path is an
|
|
13
|
+
* offer has bounds that no percentage can express (`min === max === price`
|
|
14
|
+
* for a request to buy). Passing the resolved object means whatever this
|
|
15
|
+
* form accepts, `makeOffer` accepts.
|
|
16
|
+
*/
|
|
17
|
+
bounds: OfferBounds;
|
|
7
18
|
/** Called with (productId, offerAmount, note?). Must return void or throw on error. */
|
|
8
19
|
onMakeOffer: (productId: string, amount: number, note?: string) => Promise<void>;
|
|
9
20
|
className?: string;
|
|
10
21
|
}
|
|
11
|
-
export declare function MakeOfferButton({ productId, listedPrice, currency,
|
|
22
|
+
export declare function MakeOfferButton({ productId, listedPrice, currency, bounds, onMakeOffer, className, }: MakeOfferButtonProps): React.JSX.Element;
|
|
@@ -8,7 +8,7 @@ import { FormErrorSummary } from "../../../ui/forms/FormErrorSummary";
|
|
|
8
8
|
import { applyZodIssues } from "../../../ui/forms/apply-zod-issues";
|
|
9
9
|
import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
|
|
10
10
|
import { makeOfferFormSchema } from "../../seller/schemas/offer-forms";
|
|
11
|
-
import {
|
|
11
|
+
import { minOfferAmount } from "../../../_internal/shared/features/offers/config";
|
|
12
12
|
import { isAuthError } from "../../../utils/auth-error";
|
|
13
13
|
import { formatCurrency } from "../../../utils/number.formatter";
|
|
14
14
|
import { normalizeError } from "../../../errors/normalize";
|
|
@@ -27,16 +27,23 @@ const CLS_PENDING_BODY = "text-[length:var(--appkit-text-xs)] text-warning dark:
|
|
|
27
27
|
function isActiveOfferError(msg) {
|
|
28
28
|
return msg.includes("active offer") || msg.includes("ACTIVE_OFFER");
|
|
29
29
|
}
|
|
30
|
-
export function MakeOfferButton({ productId, listedPrice, currency,
|
|
30
|
+
export function MakeOfferButton({ productId, listedPrice, currency, bounds, onMakeOffer, className = "", }) {
|
|
31
31
|
const [state, setState] = useState("idle");
|
|
32
32
|
const [showLoginModal, setShowLoginModal] = useState(false);
|
|
33
33
|
const [isPending, startTransition] = useTransition();
|
|
34
34
|
const fmt = (n) => (currency ? formatCurrency(n, currency) : `₹${n.toLocaleString()}`);
|
|
35
|
-
// The SAME
|
|
36
|
-
// accept an amount `makeOffer` would
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
// The SAME bounds the server enforces — passed in, never recomputed, so the
|
|
36
|
+
// input can neither seed nor accept an amount `makeOffer` would reject.
|
|
37
|
+
const schema = makeOfferFormSchema({ listedPrice, bounds, formatAmount: fmt });
|
|
38
|
+
/*
|
|
39
|
+
* A buy request has one legal amount, so it is seeded at the price and the
|
|
40
|
+
* field is read-only — an editable box whose every other value is invalid is
|
|
41
|
+
* a trap, not a choice. Otherwise open at 90% of the asking price, clamped
|
|
42
|
+
* into the listing's own floor and ceiling.
|
|
43
|
+
*/
|
|
44
|
+
const [offerAmount, setOfferAmount] = useState(String(bounds.isBuyRequest
|
|
45
|
+
? bounds.min
|
|
46
|
+
: Math.min(Math.max(minOfferAmount(listedPrice, 90), bounds.min), bounds.max)));
|
|
40
47
|
const [buyerNote, setBuyerNote] = useState("");
|
|
41
48
|
function submit(setFieldError, clearErrors, markSubmitAttempted) {
|
|
42
49
|
// type="button" — no native submit, so unhide the summary here.
|
|
@@ -72,13 +79,28 @@ export function MakeOfferButton({ productId, listedPrice, currency, minOfferPerc
|
|
|
72
79
|
});
|
|
73
80
|
}
|
|
74
81
|
if (state === "success") {
|
|
75
|
-
return (_jsxs(Div, { className: `${CLS_SUCCESS_BOX} ${className}`, children: [_jsx(Span, { size: "lg", children: "\uD83C\uDF89" }), _jsx(Text, { className: "text-success", size: "sm", weight: "medium", children: "Offer sent!" }),
|
|
82
|
+
return (_jsxs(Div, { className: `${CLS_SUCCESS_BOX} ${className}`, children: [_jsx(Span, { size: "lg", children: "\uD83C\uDF89" }), _jsx(Text, { className: "text-success", size: "sm", weight: "medium", children: bounds.isBuyRequest ? "Request sent!" : "Offer sent!" }), _jsxs(Text, { className: "text-success", size: "xs", children: ["The seller will review your ", bounds.isBuyRequest ? "request" : "offer", " and respond shortly."] })] }));
|
|
76
83
|
}
|
|
77
84
|
if (state === "pending") {
|
|
78
|
-
return (_jsxs(Div, { className: `${CLS_PENDING_BOX} ${className}`, children: [_jsx(Span, { size: "lg", children: "\u23F3" }), _jsx(Text, { className: CLS_PENDING_TITLE, children: "Offer Pending" }),
|
|
85
|
+
return (_jsxs(Div, { className: `${CLS_PENDING_BOX} ${className}`, children: [_jsx(Span, { size: "lg", children: "\u23F3" }), _jsx(Text, { className: CLS_PENDING_TITLE, children: bounds.isBuyRequest ? "Request Pending" : "Offer Pending" }), _jsxs(Text, { className: CLS_PENDING_BODY, children: ["You already have ", bounds.isBuyRequest ? "a request" : "an offer", " on this item. Check My Offers for updates."] })] }));
|
|
79
86
|
}
|
|
80
|
-
return (_jsxs(_Fragment, { children: [_jsx(LoginRequiredModal, { isOpen: showLoginModal, onClose: () => setShowLoginModal(false), message: "You need to be signed in to make an offer. Please log in or create an account to continue." }), _jsx(Button, { variant: "ghost", size: "md", border: "strong", className: `w-full ${className}`, onClick: () => setState("open"), children: "Make Offer" }), _jsx(Modal, { isOpen: state === "open", onClose: () => setState("idle"), size: "md", title: "Make an offer", children: _jsx(Form, { schema: schema, onSubmit: (e) => e.preventDefault(), children: ({ setFieldError, clearErrors, markSubmitAttempted }) => (_jsxs(Stack, { gap: "md", children: [
|
|
87
|
+
return (_jsxs(_Fragment, { children: [_jsx(LoginRequiredModal, { isOpen: showLoginModal, onClose: () => setShowLoginModal(false), message: "You need to be signed in to make an offer. Please log in or create an account to continue." }), _jsx(Button, { variant: "ghost", size: "md", border: "strong", className: `w-full ${className}`, onClick: () => setState("open"), children: bounds.isBuyRequest ? "Request to Buy" : "Make Offer" }), _jsx(Modal, { isOpen: state === "open", onClose: () => setState("idle"), size: "md", title: bounds.isBuyRequest ? "Request to buy" : "Make an offer", children: _jsx(Form, { schema: schema, onSubmit: (e) => e.preventDefault(), children: ({ setFieldError, clearErrors, markSubmitAttempted }) => (_jsxs(Stack, { gap: "md", children: [_jsx(Text, { size: "xs", color: "muted", children: bounds.isBuyRequest
|
|
88
|
+
? `Listed at ${fmt(listedPrice)} · this seller is not taking lower offers`
|
|
89
|
+
: `Listed at ${fmt(listedPrice)} · Minimum offer: ${fmt(bounds.min)}` }), _jsx(FieldInput, { name: "offerAmount", type: "number", label: bounds.isBuyRequest ? "Amount" : "Your offer amount", required: true, value: offerAmount, onChange: (value) => {
|
|
81
90
|
setOfferAmount(value);
|
|
82
91
|
clearErrors();
|
|
83
|
-
}, min:
|
|
92
|
+
}, min: bounds.min, max: bounds.max, step: 1,
|
|
93
|
+
/*
|
|
94
|
+
* One legal amount, so the field is read-only rather than an
|
|
95
|
+
* editable box that rejects every value but its default.
|
|
96
|
+
*/
|
|
97
|
+
readOnly: bounds.isBuyRequest, "aria-label": bounds.isBuyRequest ? "Amount" : "Offer amount" }), !bounds.isBuyRequest && (_jsxs(Text, { size: "xs", color: "faint", children: ["Must be between ", fmt(bounds.min), " and ", fmt(bounds.max)] })), _jsx(FieldInput, { name: "buyerNote", type: "text", label: "Note to seller (optional)", value: buyerNote, onChange: setBuyerNote, placeholder: bounds.isBuyRequest
|
|
98
|
+
? "E.g. when and where you can collect it…"
|
|
99
|
+
: "E.g. Bundle deal, long-time fan…", maxLength: 300, "aria-label": "Note to seller" }), _jsx(Text, { size: "xs", color: "muted", children: bounds.isBuyRequest
|
|
100
|
+
? "The seller will accept or decline. Accepting reserves the item for you to check out."
|
|
101
|
+
: "The seller will accept, decline, or suggest a counter price." }), _jsx(FormErrorSummary, {}), _jsxs(Stack, { gap: "xs", children: [_jsx(Button, { action: ACTIONS.PRODUCT["make-offer"], variant: "primary", size: "sm", type: "button", isLoading: isPending, disabled: isPending, onClick: () => submit(setFieldError, clearErrors, markSubmitAttempted), children: isPending
|
|
102
|
+
? "Sending…"
|
|
103
|
+
: bounds.isBuyRequest
|
|
104
|
+
? `Send request to buy at ${fmt(Number(offerAmount) || 0)}`
|
|
105
|
+
: `Send offer of ${fmt(Number(offerAmount) || 0)}` }), _jsx(Button, { variant: "ghost", size: "sm", type: "button", onClick: () => setState("idle"), disabled: isPending, children: "Cancel" })] })] })) }) })] }));
|
|
84
106
|
}
|
|
@@ -68,7 +68,10 @@ function stripIsWon(items) {
|
|
|
68
68
|
export async function PrizeDrawDetailPageView({ id, initialPrizeDraw, currentUserId, }) {
|
|
69
69
|
const product = initialPrizeDraw !== undefined
|
|
70
70
|
? initialPrizeDraw ?? undefined
|
|
71
|
-
|
|
71
|
+
// The prize draw IS this page's subject — a read failure must surface
|
|
72
|
+
// rather than become the same `undefined` a removed listing produces,
|
|
73
|
+
// which the "Not Found" branch below already handles.
|
|
74
|
+
: await productRepository.findByIdOrSlug(id);
|
|
72
75
|
if (!product) {
|
|
73
76
|
return (_jsx(Main, { children: _jsx(Section, { padding: "y-5xl", children: _jsx(Container, { size: "md", children: _jsxs(Stack, { align: "start", gap: "md", className: "text-left", children: [_jsx(Heading, { level: 1, size: "2xl", weight: "semibold", color: "primary", children: "Prize Draw Not Found" }), _jsx(Text, { color: "muted", children: "The prize draw you are looking for may have been removed." }), _jsx(Link, { href: String(ROUTES.PUBLIC.PRIZE_DRAWS), className: "text-[length:var(--appkit-text-sm)] font-medium text-primary-600 hover:underline", children: "Browse Prize Draws" })] }) }) }) }));
|
|
74
77
|
}
|
|
@@ -104,7 +104,6 @@ export function ProductDetailActions({ productId, productTitle, productImage, pr
|
|
|
104
104
|
id: ACTION_ID.ADD_TO_WISHLIST,
|
|
105
105
|
label: wishlisted ? "Saved" : "Wishlist",
|
|
106
106
|
variant: "ghost",
|
|
107
|
-
grow: false,
|
|
108
107
|
disabled: blocked || wishlisted,
|
|
109
108
|
onClick: handleWishlist,
|
|
110
109
|
},
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ProductFeatureDocument } from "../schemas/product-features";
|
|
2
|
+
import { type OfferBounds } from "../../../_internal/shared/features/offers/config";
|
|
2
3
|
export interface ProductDetailPageViewProps {
|
|
3
4
|
slug: string;
|
|
4
5
|
/**
|
|
@@ -11,15 +12,18 @@ export interface ProductDetailPageViewProps {
|
|
|
11
12
|
/**
|
|
12
13
|
* Render prop for offer UI. Receives the resolved product fields.
|
|
13
14
|
*
|
|
14
|
-
* Called only when
|
|
15
|
-
*
|
|
16
|
-
*
|
|
15
|
+
* Called only when both offer gates pass: the listing type's `canMakeOffer`
|
|
16
|
+
* capability and the seller's own `product.allowOffers` opt-in. The site-wide
|
|
17
|
+
* `featureFlags.offers` kill switch went with the rest of that group on
|
|
18
|
+
* 2026-08-29 — the two gates that remain are the ones a seller actually sets.
|
|
17
19
|
*/
|
|
18
20
|
renderOfferAction?: (opts: {
|
|
19
21
|
productId: string;
|
|
20
22
|
price: number;
|
|
21
23
|
currency: string;
|
|
22
24
|
minOfferPercent: number;
|
|
25
|
+
/** Resolved by `resolveOfferBounds()` — the same rule `makeOffer` enforces. */
|
|
26
|
+
bounds: OfferBounds;
|
|
23
27
|
}) => React.ReactNode;
|
|
24
28
|
/**
|
|
25
29
|
* Renders the primary action buttons (Buy Now / Add to Cart / Wishlist).
|
|
@@ -41,9 +41,10 @@ import { computeRelatedItems, getReviewPageForProduct } from "../../../_internal
|
|
|
41
41
|
import { GroupedListingsCarousel } from "../../grouped/components/GroupedListingsCarousel";
|
|
42
42
|
import { getGroupsWithItemsForProduct } from "../../../_internal/server/features/grouped/data";
|
|
43
43
|
import { getSiteSettingsGlobal } from "../../admin/utils/getSiteSettingsGlobal";
|
|
44
|
+
import { safeRead } from "../../../errors/safe-read";
|
|
44
45
|
import { canMakeOffer } from "../../../_internal/shared/listing-types/capabilities";
|
|
45
46
|
import { normalizeListingType } from "../utils/listing-type";
|
|
46
|
-
import { DEFAULT_MIN_OFFER_PERCENT } from "../../../_internal/shared/features/offers/config";
|
|
47
|
+
import { DEFAULT_MIN_OFFER_PERCENT, resolveOfferBounds, } from "../../../_internal/shared/features/offers/config";
|
|
47
48
|
// ---------------------------------------------------------------------------
|
|
48
49
|
// Helpers
|
|
49
50
|
// ---------------------------------------------------------------------------
|
|
@@ -71,7 +72,10 @@ export async function ProductDetailPageView({ slug, initialProduct, renderOfferA
|
|
|
71
72
|
// generateMetadata() and this component share the same in-flight promise.
|
|
72
73
|
const product = initialProduct !== undefined
|
|
73
74
|
? (initialProduct ?? undefined)
|
|
74
|
-
|
|
75
|
+
// The product IS this page's subject — a read failure must surface rather
|
|
76
|
+
// than become the same `undefined` a removed listing produces, which the
|
|
77
|
+
// "Not Found" branch below already handles.
|
|
78
|
+
: await productRepository.findByIdOrSlug(slug);
|
|
75
79
|
if (!product) {
|
|
76
80
|
return (_jsx(Main, { children: _jsx(Section, { padding: "y-5xl", children: _jsx(Container, { size: "md", children: _jsxs(Stack, { align: "start", gap: "md", className: "text-left", children: [_jsx(Heading, { level: 1, size: "2xl", weight: "semibold", color: "primary", children: "Product Not Found" }), _jsx(Text, { color: "muted", children: "The product you are looking for may have been removed or the link is incorrect." }), _jsx(Link, { href: String(ROUTES.PUBLIC.PRODUCTS), className: "text-[length:var(--appkit-text-sm)] font-medium text-primary-600 hover:underline", children: "Browse Products" })] }) }) }) }));
|
|
77
81
|
}
|
|
@@ -180,11 +184,10 @@ export async function ProductDetailPageView({ slug, initialProduct, renderOfferA
|
|
|
180
184
|
getReviewPageForProduct(product.id),
|
|
181
185
|
computeRelatedItems(product),
|
|
182
186
|
getGroupsWithItemsForProduct(product.id),
|
|
183
|
-
|
|
187
|
+
safeRead(() => getSiteSettingsGlobal(), {
|
|
188
|
+
route: "/products/[slug]", key: "product.siteSettings", fallback: null,
|
|
189
|
+
}),
|
|
184
190
|
]);
|
|
185
|
-
// Site-wide kill switch. Absent/unreadable settings mean ON — a failed
|
|
186
|
-
// settings read must not silently remove a working feature.
|
|
187
|
-
const offersEnabled = siteSettings?.featureFlags?.offers !== false;
|
|
188
191
|
const { relatedItems, relatedByBrand, relatedByTags, relatedByStore } = related;
|
|
189
192
|
return (_jsxs(Main, { children: [_jsx(HistoryTracker, { productId: product.id, productType: "product", snapshot: {
|
|
190
193
|
title: product.title,
|
|
@@ -232,11 +235,17 @@ export async function ProductDetailPageView({ slug, initialProduct, renderOfferA
|
|
|
232
235
|
storeName: typeof p.storeName === "string" ? p.storeName : undefined,
|
|
233
236
|
inStock,
|
|
234
237
|
variant: "desktop",
|
|
235
|
-
})) : (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "primary", size: "md", className: "w-full", disabled: true, title: ACTION_NOT_WIRED, children: inStock ? "Buy Now" : "Out of Stock" }), _jsx(Button, { variant: "secondary", size: "md", className: "w-full", disabled: true, title: ACTION_NOT_WIRED, children: inStock ? "Add to Cart" : "Out of Stock" }), _jsxs(Button, { variant: "ghost", size: "md", className: "w-full", disabled: true, title: ACTION_NOT_WIRED, children: [_jsx(Icon, { name: "wishlist", size: "md" }), "Add to Wishlist"] })] })), allowOffers && offerableType &&
|
|
238
|
+
})) : (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "primary", size: "md", className: "w-full", disabled: true, title: ACTION_NOT_WIRED, children: inStock ? "Buy Now" : "Out of Stock" }), _jsx(Button, { variant: "secondary", size: "md", className: "w-full", disabled: true, title: ACTION_NOT_WIRED, children: inStock ? "Add to Cart" : "Out of Stock" }), _jsxs(Button, { variant: "ghost", size: "md", className: "w-full", disabled: true, title: ACTION_NOT_WIRED, children: [_jsx(Icon, { name: "wishlist", size: "md" }), "Add to Wishlist"] })] })), allowOffers && offerableType && price !== null && renderOfferAction?.({
|
|
236
239
|
productId: product.id,
|
|
237
240
|
price,
|
|
238
241
|
currency,
|
|
239
242
|
minOfferPercent,
|
|
243
|
+
bounds: resolveOfferBounds({
|
|
244
|
+
listingType: normalizeListingType(p),
|
|
245
|
+
listedPrice: price,
|
|
246
|
+
minOfferPercent,
|
|
247
|
+
allowOffers,
|
|
248
|
+
}),
|
|
240
249
|
})] }), (shippingInfo || returnPolicy || freeShipping) && (_jsxs(Stack, { gap: "sm", border: "default", className: "border-t", padding: "t-md", children: [freeShipping && (_jsxs(Row, { align: "start", gap: "sm", children: [_jsx(Span, { className: CLS_FREE_SHIPPING_ICON, children: "\uD83D\uDE9A" }), _jsxs(Div, { children: [_jsx(Text, { size: "xs", weight: "medium", color: "muted", children: "Free Delivery" }), shippingInfo && (_jsx(Text, { size: "xs", color: "muted", children: shippingInfo }))] })] })), !freeShipping && shippingInfo && (_jsxs(Row, { align: "start", gap: "sm", children: [_jsx(Span, { className: "mt-0.5 flex-shrink-0", color: "faint", children: "\uD83D\uDCE6" }), _jsx(Text, { size: "xs", color: "muted", children: shippingInfo })] })), returnPolicy && (_jsxs(Row, { align: "start", gap: "sm", children: [_jsx(Span, { className: "mt-0.5 flex-shrink-0", color: "faint", children: "\u21BA" }), _jsx(Text, { size: "xs", color: "muted", children: returnPolicy })] }))] })), tags.length > 0 && (_jsxs(Div, { border: "default", className: "border-t", padding: "t-md", children: [_jsx(Text, { className: "mb-2", color: "muted", size: "xs", weight: "medium", children: "Tags" }), _jsx(Row, { wrap: true, gap: "xs", children: tags.map((tag) => (_jsx(Span, { rounded: "full", padding: "pill-sm-tall", surface: "subtle", color: "muted", size: "xs", children: tag }, tag))) })] })), _jsx(Div, { border: "default", className: "border-t", padding: "t-md", children: _jsx(Row, { wrap: true, gap: "sm", justify: "center", className: "text-center", children: [
|
|
241
250
|
{ icon: "🔒", label: "Secure\nPayment" },
|
|
242
251
|
{ icon: "✓", label: "Verified\nSeller" },
|
|
@@ -11,10 +11,12 @@ export function ShareButton({ title, text, className = "" }) {
|
|
|
11
11
|
try {
|
|
12
12
|
await navigator.share({ title: title ?? document.title, text, url });
|
|
13
13
|
return;
|
|
14
|
+
// navigator.share rejects on user cancellation exactly as it does on a
|
|
15
|
+
// real failure, so this is unreportable by construction — either way the
|
|
16
|
+
// clipboard fallback below still gives the user the link.
|
|
14
17
|
}
|
|
15
18
|
catch (_err) {
|
|
16
19
|
void normalizeError(_err);
|
|
17
|
-
// user cancelled or browser blocked — fall through to clipboard
|
|
18
20
|
}
|
|
19
21
|
}
|
|
20
22
|
navigator.clipboard.writeText(url).catch(console.error);
|
|
@@ -322,7 +322,6 @@ export declare const DASHBOARD_QUICK_ACTION_ID: {
|
|
|
322
322
|
readonly SELLER_SETTINGS: "dqa-seller-settings";
|
|
323
323
|
readonly SELLER_AUCTIONS: "dqa-seller-auctions";
|
|
324
324
|
readonly SELLER_SHIPPING: "dqa-seller-shipping";
|
|
325
|
-
readonly SELLER_MESSAGES: "dqa-seller-messages";
|
|
326
325
|
readonly SELLER_WHATSAPP: "dqa-seller-whatsapp";
|
|
327
326
|
readonly SELLER_REVIEWS: "dqa-seller-reviews";
|
|
328
327
|
readonly SELLER_PRODUCTS: "dqa-seller-products";
|
|
@@ -362,7 +361,7 @@ export interface DashboardQuickActionMeta {
|
|
|
362
361
|
export declare const DASHBOARD_QUICK_ACTION_META: Record<DashboardQuickActionId, DashboardQuickActionMeta>;
|
|
363
362
|
export declare const DASHBOARD_QUICK_ACTIONS: {
|
|
364
363
|
readonly admin: readonly ["dqa-admin-add-product", "dqa-admin-add-coupon", "dqa-admin-users", "dqa-admin-stores", "dqa-admin-orders", "dqa-admin-payouts", "dqa-admin-analytics", "dqa-admin-categories", "dqa-admin-reviews", "dqa-admin-events", "dqa-admin-faqs", "dqa-admin-carousel", "dqa-admin-sections", "dqa-admin-support", "dqa-admin-moderation", "dqa-admin-blog", "dqa-admin-scammers", "dqa-admin-bundles", "dqa-admin-prize-draws", "dqa-admin-tester-checklist", "dqa-admin-settings"];
|
|
365
|
-
readonly seller: readonly ["dqa-seller-add-product", "dqa-seller-products", "dqa-seller-view-orders", "dqa-seller-analytics", "dqa-seller-add-coupon", "dqa-seller-auctions", "dqa-seller-bundles", "dqa-seller-prize-draws", "dqa-seller-offers", "dqa-seller-grouped-listings", "dqa-seller-categories", "dqa-seller-payout-request", "dqa-seller-shipping", "dqa-seller-print-center", "dqa-seller-
|
|
364
|
+
readonly seller: readonly ["dqa-seller-add-product", "dqa-seller-products", "dqa-seller-view-orders", "dqa-seller-analytics", "dqa-seller-add-coupon", "dqa-seller-auctions", "dqa-seller-bundles", "dqa-seller-prize-draws", "dqa-seller-offers", "dqa-seller-grouped-listings", "dqa-seller-categories", "dqa-seller-payout-request", "dqa-seller-shipping", "dqa-seller-print-center", "dqa-seller-whatsapp", "dqa-seller-reviews", "dqa-seller-storefront", "dqa-seller-settings"];
|
|
366
365
|
readonly user: readonly ["dqa-user-view-orders", "dqa-user-view-wishlist", "dqa-user-edit-profile", "dqa-user-add-address", "dqa-user-recently-viewed", "dqa-user-my-catalogue", "dqa-user-my-coupons"];
|
|
367
366
|
};
|
|
368
367
|
export declare const ADMIN_BULK_ACTIONS: {
|
|
@@ -217,29 +217,29 @@ export const ROW_ACTION_META = {
|
|
|
217
217
|
// don't delete/archive the underlying record, just its membership in a
|
|
218
218
|
// homepage curation list. Added 2026-08-11 for admin/deals + admin/featured.
|
|
219
219
|
[ROW_ACTION_ID.REMOVE]: { id: ROW_ACTION_ID.REMOVE, label: "Remove", iconName: "X", requiresAuth: true, destructive: true },
|
|
220
|
-
[ROW_ACTION_ID.APPROVE]: { id: ROW_ACTION_ID.APPROVE, label: "Approve", iconName: "Check", requiresAuth: true, requiredRole: "admin"
|
|
221
|
-
[ROW_ACTION_ID.REJECT]: { id: ROW_ACTION_ID.REJECT, label: "Reject", iconName: "X", requiresAuth: true, requiredRole: "admin",
|
|
222
|
-
[ROW_ACTION_ID.SUSPEND]: { id: ROW_ACTION_ID.SUSPEND, label: "Suspend", iconName: "Ban", requiresAuth: true, requiredRole: "admin",
|
|
223
|
-
[ROW_ACTION_ID.RESTORE]: { id: ROW_ACTION_ID.RESTORE, label: "Restore", iconName: "RotateCcw", requiresAuth: true, requiredRole: "admin"
|
|
220
|
+
[ROW_ACTION_ID.APPROVE]: { id: ROW_ACTION_ID.APPROVE, label: "Approve", iconName: "Check", requiresAuth: true, requiredRole: "admin" },
|
|
221
|
+
[ROW_ACTION_ID.REJECT]: { id: ROW_ACTION_ID.REJECT, label: "Reject", iconName: "X", requiresAuth: true, requiredRole: "admin", destructive: true },
|
|
222
|
+
[ROW_ACTION_ID.SUSPEND]: { id: ROW_ACTION_ID.SUSPEND, label: "Suspend", iconName: "Ban", requiresAuth: true, requiredRole: "admin", destructive: true, separator: true },
|
|
223
|
+
[ROW_ACTION_ID.RESTORE]: { id: ROW_ACTION_ID.RESTORE, label: "Restore", iconName: "RotateCcw", requiresAuth: true, requiredRole: "admin" },
|
|
224
224
|
[ROW_ACTION_ID.MANAGE]: { id: ROW_ACTION_ID.MANAGE, label: "Manage", iconName: "Settings", requiresAuth: true },
|
|
225
225
|
[ROW_ACTION_ID.DUPLICATE]: { id: ROW_ACTION_ID.DUPLICATE, label: "Duplicate", iconName: "Copy", requiresAuth: true },
|
|
226
226
|
[ROW_ACTION_ID.EXPORT]: { id: ROW_ACTION_ID.EXPORT, label: "Export", iconName: "Download", requiresAuth: true },
|
|
227
227
|
[ROW_ACTION_ID.TRACK]: { id: ROW_ACTION_ID.TRACK, label: "Track Shipment", iconName: "Truck", requiresAuth: true },
|
|
228
228
|
[ROW_ACTION_ID.CANCEL]: { id: ROW_ACTION_ID.CANCEL, label: "Cancel", iconName: "X", requiresAuth: true, destructive: true },
|
|
229
|
-
[ROW_ACTION_ID.REFUND]: { id: ROW_ACTION_ID.REFUND, label: "Refund", iconName: "RefreshCw", requiresAuth: true, requiredRole: "admin",
|
|
229
|
+
[ROW_ACTION_ID.REFUND]: { id: ROW_ACTION_ID.REFUND, label: "Refund", iconName: "RefreshCw", requiresAuth: true, requiredRole: "admin", destructive: true, separator: true },
|
|
230
230
|
[ROW_ACTION_ID.RESEND]: { id: ROW_ACTION_ID.RESEND, label: "Resend", iconName: "Send", requiresAuth: true },
|
|
231
231
|
[ROW_ACTION_ID.REPLY]: { id: ROW_ACTION_ID.REPLY, label: "Reply", iconName: "MessageSquare", requiresAuth: true },
|
|
232
232
|
[ROW_ACTION_ID.PUBLISH]: { id: ROW_ACTION_ID.PUBLISH, label: "Publish", iconName: "Upload", requiresAuth: true },
|
|
233
233
|
[ROW_ACTION_ID.ARCHIVE]: { id: ROW_ACTION_ID.ARCHIVE, label: "Archive", iconName: "Archive", requiresAuth: true, separator: true },
|
|
234
|
-
[ROW_ACTION_ID.MARK_SHIPPED]: { id: ROW_ACTION_ID.MARK_SHIPPED, label: "Mark as Shipped", iconName: "Truck", requiresAuth: true, requiredRole: "admin"
|
|
235
|
-
[ROW_ACTION_ID.MARK_DELIVERED]: { id: ROW_ACTION_ID.MARK_DELIVERED, label: "Mark as Delivered", iconName: "PackageCheck", requiresAuth: true, requiredRole: "admin"
|
|
236
|
-
[ROW_ACTION_ID.MARK_PAID]: { id: ROW_ACTION_ID.MARK_PAID, label: "Mark Paid", iconName: "Banknote", requiresAuth: true, requiredRole: "admin"
|
|
237
|
-
[ROW_ACTION_ID.MARK_RECEIVED]: { id: ROW_ACTION_ID.MARK_RECEIVED, label: "Mark Received", iconName: "PackageCheck", requiresAuth: true, requiredRole: "admin"
|
|
238
|
-
[ROW_ACTION_ID.REVOKE]: { id: ROW_ACTION_ID.REVOKE, label: "Revoke", iconName: "ShieldOff", requiresAuth: true, requiredRole: "admin",
|
|
234
|
+
[ROW_ACTION_ID.MARK_SHIPPED]: { id: ROW_ACTION_ID.MARK_SHIPPED, label: "Mark as Shipped", iconName: "Truck", requiresAuth: true, requiredRole: "admin" },
|
|
235
|
+
[ROW_ACTION_ID.MARK_DELIVERED]: { id: ROW_ACTION_ID.MARK_DELIVERED, label: "Mark as Delivered", iconName: "PackageCheck", requiresAuth: true, requiredRole: "admin" },
|
|
236
|
+
[ROW_ACTION_ID.MARK_PAID]: { id: ROW_ACTION_ID.MARK_PAID, label: "Mark Paid", iconName: "Banknote", requiresAuth: true, requiredRole: "admin" },
|
|
237
|
+
[ROW_ACTION_ID.MARK_RECEIVED]: { id: ROW_ACTION_ID.MARK_RECEIVED, label: "Mark Received", iconName: "PackageCheck", requiresAuth: true, requiredRole: "admin" },
|
|
238
|
+
[ROW_ACTION_ID.REVOKE]: { id: ROW_ACTION_ID.REVOKE, label: "Revoke", iconName: "ShieldOff", requiresAuth: true, requiredRole: "admin", destructive: true },
|
|
239
239
|
[ROW_ACTION_ID.MARK_READ]: { id: ROW_ACTION_ID.MARK_READ, label: "Mark Read", iconName: "CheckCheck", requiresAuth: true, requiredRole: "admin" },
|
|
240
240
|
[ROW_ACTION_ID.ACTIVATE]: { id: ROW_ACTION_ID.ACTIVATE, label: "Activate", iconName: "ToggleRight", requiresAuth: true },
|
|
241
241
|
[ROW_ACTION_ID.DEACTIVATE]: { id: ROW_ACTION_ID.DEACTIVATE, label: "Deactivate", iconName: "ToggleLeft", requiresAuth: true },
|
|
242
|
-
[ROW_ACTION_ID.FEATURE]: { id: ROW_ACTION_ID.FEATURE, label: "Toggle Featured", iconName: "Star", requiresAuth: true, requiredRole: "admin"
|
|
242
|
+
[ROW_ACTION_ID.FEATURE]: { id: ROW_ACTION_ID.FEATURE, label: "Toggle Featured", iconName: "Star", requiresAuth: true, requiredRole: "admin" },
|
|
243
243
|
[ROW_ACTION_ID.PROMOTE]: { id: ROW_ACTION_ID.PROMOTE, label: "Toggle Promoted", iconName: "TrendingUp", requiresAuth: true, requiredRole: "admin" },
|
|
244
244
|
[ROW_ACTION_ID.SALE]: { id: ROW_ACTION_ID.SALE, label: "Toggle On Sale", iconName: "Percent", requiresAuth: true, requiredRole: "admin" },
|
|
245
245
|
[ROW_ACTION_ID.DRAFT]: { id: ROW_ACTION_ID.DRAFT, label: "Move to Draft", iconName: "FileEdit", requiresAuth: true },
|
|
@@ -384,7 +384,6 @@ export const DASHBOARD_QUICK_ACTION_ID = {
|
|
|
384
384
|
SELLER_SETTINGS: "dqa-seller-settings",
|
|
385
385
|
SELLER_AUCTIONS: "dqa-seller-auctions",
|
|
386
386
|
SELLER_SHIPPING: "dqa-seller-shipping",
|
|
387
|
-
SELLER_MESSAGES: "dqa-seller-messages",
|
|
388
387
|
SELLER_WHATSAPP: "dqa-seller-whatsapp",
|
|
389
388
|
SELLER_REVIEWS: "dqa-seller-reviews",
|
|
390
389
|
SELLER_PRODUCTS: "dqa-seller-products",
|
|
@@ -406,40 +405,39 @@ export const DASHBOARD_QUICK_ACTION_ID = {
|
|
|
406
405
|
USER_MY_COUPONS: "dqa-user-my-coupons",
|
|
407
406
|
};
|
|
408
407
|
export const DASHBOARD_QUICK_ACTION_META = {
|
|
409
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_PRODUCT]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_PRODUCT, label: "Add Product", variant: "primary", iconName: "Plus", requiresAuth: true, requiredRole: "admin"
|
|
410
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_USER]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_USER, label: "Add User", variant: "outline", iconName: "UserPlus", requiresAuth: true, requiredRole: "admin"
|
|
411
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_STORE]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_STORE, label: "Add Store", variant: "outline", iconName: "Store", requiresAuth: true, requiredRole: "admin"
|
|
412
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_COUPON]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_COUPON, label: "Manage Coupons", variant: "outline", iconName: "Tag", requiresAuth: true, requiredRole: "admin"
|
|
413
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_EVENT]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_EVENT, label: "Add Event", variant: "outline", iconName: "Calendar", requiresAuth: true, requiredRole: "admin"
|
|
414
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_BLOG]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_BLOG, label: "New Post", variant: "outline", iconName: "FileText", requiresAuth: true, requiredRole: "admin"
|
|
415
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_FAQ]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_FAQ, label: "Add FAQ", variant: "outline", iconName: "HelpCircle", requiresAuth: true, requiredRole: "admin"
|
|
416
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_SETTINGS]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_SETTINGS, label: "Settings", variant: "ghost", iconName: "Settings", requiresAuth: true, requiredRole: "admin"
|
|
417
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_STORES]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_STORES, label: "Stores", variant: "outline", iconName: "Store", requiresAuth: true, requiredRole: "admin"
|
|
418
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_ORDERS]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_ORDERS, label: "Orders", variant: "outline", iconName: "ShoppingBag", requiresAuth: true, requiredRole: "admin"
|
|
419
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_PAYOUTS]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_PAYOUTS, label: "Payouts", variant: "outline", iconName: "Banknote", requiresAuth: true, requiredRole: "admin"
|
|
420
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_ANALYTICS]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_ANALYTICS, label: "Analytics", variant: "outline", iconName: "BarChart", requiresAuth: true, requiredRole: "admin"
|
|
421
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_EVENTS]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_EVENTS, label: "Events", variant: "outline", iconName: "Calendar", requiresAuth: true, requiredRole: "admin"
|
|
422
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_SUPPORT]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_SUPPORT, label: "Support Tickets", variant: "outline", iconName: "LifeBuoy", requiresAuth: true, requiredRole: "admin"
|
|
423
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_MODERATION]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_MODERATION, label: "Moderation", variant: "outline", iconName: "ShieldAlert", requiresAuth: true, requiredRole: "admin"
|
|
424
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_USERS]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_USERS, label: "Users", variant: "outline", iconName: "Users", requiresAuth: true, requiredRole: "admin"
|
|
425
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_CATEGORIES]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_CATEGORIES, label: "Categories", variant: "outline", iconName: "Tag", requiresAuth: true, requiredRole: "admin"
|
|
426
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_REVIEWS]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_REVIEWS, label: "Reviews", variant: "outline", iconName: "Star", requiresAuth: true, requiredRole: "admin"
|
|
427
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_FAQS]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_FAQS, label: "FAQs", variant: "outline", iconName: "HelpCircle", requiresAuth: true, requiredRole: "admin"
|
|
428
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_CAROUSEL]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_CAROUSEL, label: "Carousel", variant: "outline", iconName: "Layout", requiresAuth: true, requiredRole: "admin"
|
|
429
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_SECTIONS]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_SECTIONS, label: "Sections", variant: "outline", iconName: "Layers", requiresAuth: true, requiredRole: "admin"
|
|
430
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_BLOG]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_BLOG, label: "Blog", variant: "outline", iconName: "BookOpen", requiresAuth: true, requiredRole: "admin"
|
|
431
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_SCAMMERS]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_SCAMMERS, label: "Scammer Registry", variant: "outline", iconName: "AlertTriangle", requiresAuth: true, requiredRole: "admin"
|
|
432
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_BUNDLES]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_BUNDLES, label: "Bundles", variant: "outline", iconName: "Package2", requiresAuth: true, requiredRole: "admin"
|
|
433
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_PRIZE_DRAWS]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_PRIZE_DRAWS, label: "Prize Draws", variant: "outline", iconName: "Gift", requiresAuth: true, requiredRole: "admin"
|
|
434
|
-
[DASHBOARD_QUICK_ACTION_ID.ADMIN_TESTER_CHECKLIST]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_TESTER_CHECKLIST, label: "Tester Checklist", variant: "outline", iconName: "ClipboardCheck", requiresAuth: true, requiredRole: "admin"
|
|
435
|
-
[DASHBOARD_QUICK_ACTION_ID.SELLER_ADD_PRODUCT]: { id: DASHBOARD_QUICK_ACTION_ID.SELLER_ADD_PRODUCT, label: "List a Product", variant: "primary", iconName: "Plus", requiresAuth: true, requiredRole: "seller"
|
|
436
|
-
[DASHBOARD_QUICK_ACTION_ID.SELLER_ADD_COUPON]: { id: DASHBOARD_QUICK_ACTION_ID.SELLER_ADD_COUPON, label: "New Coupon", variant: "outline", iconName: "Tag", requiresAuth: true, requiredRole: "seller"
|
|
408
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_PRODUCT]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_PRODUCT, label: "Add Product", variant: "primary", iconName: "Plus", requiresAuth: true, requiredRole: "admin" },
|
|
409
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_USER]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_USER, label: "Add User", variant: "outline", iconName: "UserPlus", requiresAuth: true, requiredRole: "admin" },
|
|
410
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_STORE]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_STORE, label: "Add Store", variant: "outline", iconName: "Store", requiresAuth: true, requiredRole: "admin" },
|
|
411
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_COUPON]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_COUPON, label: "Manage Coupons", variant: "outline", iconName: "Tag", requiresAuth: true, requiredRole: "admin" },
|
|
412
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_EVENT]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_EVENT, label: "Add Event", variant: "outline", iconName: "Calendar", requiresAuth: true, requiredRole: "admin" },
|
|
413
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_BLOG]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_BLOG, label: "New Post", variant: "outline", iconName: "FileText", requiresAuth: true, requiredRole: "admin" },
|
|
414
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_FAQ]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_ADD_FAQ, label: "Add FAQ", variant: "outline", iconName: "HelpCircle", requiresAuth: true, requiredRole: "admin" },
|
|
415
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_SETTINGS]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_SETTINGS, label: "Settings", variant: "ghost", iconName: "Settings", requiresAuth: true, requiredRole: "admin" },
|
|
416
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_STORES]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_STORES, label: "Stores", variant: "outline", iconName: "Store", requiresAuth: true, requiredRole: "admin" },
|
|
417
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_ORDERS]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_ORDERS, label: "Orders", variant: "outline", iconName: "ShoppingBag", requiresAuth: true, requiredRole: "admin" },
|
|
418
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_PAYOUTS]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_PAYOUTS, label: "Payouts", variant: "outline", iconName: "Banknote", requiresAuth: true, requiredRole: "admin" },
|
|
419
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_ANALYTICS]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_ANALYTICS, label: "Analytics", variant: "outline", iconName: "BarChart", requiresAuth: true, requiredRole: "admin" },
|
|
420
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_EVENTS]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_EVENTS, label: "Events", variant: "outline", iconName: "Calendar", requiresAuth: true, requiredRole: "admin" },
|
|
421
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_SUPPORT]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_SUPPORT, label: "Support Tickets", variant: "outline", iconName: "LifeBuoy", requiresAuth: true, requiredRole: "admin" },
|
|
422
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_MODERATION]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_MODERATION, label: "Moderation", variant: "outline", iconName: "ShieldAlert", requiresAuth: true, requiredRole: "admin" },
|
|
423
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_USERS]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_USERS, label: "Users", variant: "outline", iconName: "Users", requiresAuth: true, requiredRole: "admin" },
|
|
424
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_CATEGORIES]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_CATEGORIES, label: "Categories", variant: "outline", iconName: "Tag", requiresAuth: true, requiredRole: "admin" },
|
|
425
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_REVIEWS]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_REVIEWS, label: "Reviews", variant: "outline", iconName: "Star", requiresAuth: true, requiredRole: "admin" },
|
|
426
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_FAQS]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_FAQS, label: "FAQs", variant: "outline", iconName: "HelpCircle", requiresAuth: true, requiredRole: "admin" },
|
|
427
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_CAROUSEL]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_CAROUSEL, label: "Carousel", variant: "outline", iconName: "Layout", requiresAuth: true, requiredRole: "admin" },
|
|
428
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_SECTIONS]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_SECTIONS, label: "Sections", variant: "outline", iconName: "Layers", requiresAuth: true, requiredRole: "admin" },
|
|
429
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_BLOG]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_BLOG, label: "Blog", variant: "outline", iconName: "BookOpen", requiresAuth: true, requiredRole: "admin" },
|
|
430
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_SCAMMERS]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_SCAMMERS, label: "Scammer Registry", variant: "outline", iconName: "AlertTriangle", requiresAuth: true, requiredRole: "admin" },
|
|
431
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_BUNDLES]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_BUNDLES, label: "Bundles", variant: "outline", iconName: "Package2", requiresAuth: true, requiredRole: "admin" },
|
|
432
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_PRIZE_DRAWS]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_PRIZE_DRAWS, label: "Prize Draws", variant: "outline", iconName: "Gift", requiresAuth: true, requiredRole: "admin" },
|
|
433
|
+
[DASHBOARD_QUICK_ACTION_ID.ADMIN_TESTER_CHECKLIST]: { id: DASHBOARD_QUICK_ACTION_ID.ADMIN_TESTER_CHECKLIST, label: "Tester Checklist", variant: "outline", iconName: "ClipboardCheck", requiresAuth: true, requiredRole: "admin" },
|
|
434
|
+
[DASHBOARD_QUICK_ACTION_ID.SELLER_ADD_PRODUCT]: { id: DASHBOARD_QUICK_ACTION_ID.SELLER_ADD_PRODUCT, label: "List a Product", variant: "primary", iconName: "Plus", requiresAuth: true, requiredRole: "seller" },
|
|
435
|
+
[DASHBOARD_QUICK_ACTION_ID.SELLER_ADD_COUPON]: { id: DASHBOARD_QUICK_ACTION_ID.SELLER_ADD_COUPON, label: "New Coupon", variant: "outline", iconName: "Tag", requiresAuth: true, requiredRole: "seller" },
|
|
437
436
|
[DASHBOARD_QUICK_ACTION_ID.SELLER_VIEW_ORDERS]: { id: DASHBOARD_QUICK_ACTION_ID.SELLER_VIEW_ORDERS, label: "Orders", variant: "outline", iconName: "ShoppingBag", requiresAuth: true, requiredRole: "seller" },
|
|
438
|
-
[DASHBOARD_QUICK_ACTION_ID.SELLER_PAYOUT_REQ]: { id: DASHBOARD_QUICK_ACTION_ID.SELLER_PAYOUT_REQ, label: "Request Payout", variant: "outline", iconName: "Banknote", requiresAuth: true, requiredRole: "seller"
|
|
437
|
+
[DASHBOARD_QUICK_ACTION_ID.SELLER_PAYOUT_REQ]: { id: DASHBOARD_QUICK_ACTION_ID.SELLER_PAYOUT_REQ, label: "Request Payout", variant: "outline", iconName: "Banknote", requiresAuth: true, requiredRole: "seller" },
|
|
439
438
|
[DASHBOARD_QUICK_ACTION_ID.SELLER_SETTINGS]: { id: DASHBOARD_QUICK_ACTION_ID.SELLER_SETTINGS, label: "Store Settings", variant: "ghost", iconName: "Settings", requiresAuth: true, requiredRole: "seller" },
|
|
440
439
|
[DASHBOARD_QUICK_ACTION_ID.SELLER_AUCTIONS]: { id: DASHBOARD_QUICK_ACTION_ID.SELLER_AUCTIONS, label: "Auctions", variant: "outline", iconName: "Gavel", requiresAuth: true, requiredRole: "seller" },
|
|
441
440
|
[DASHBOARD_QUICK_ACTION_ID.SELLER_SHIPPING]: { id: DASHBOARD_QUICK_ACTION_ID.SELLER_SHIPPING, label: "Shipping", variant: "outline", iconName: "Truck", requiresAuth: true, requiredRole: "seller" },
|
|
442
|
-
[DASHBOARD_QUICK_ACTION_ID.SELLER_MESSAGES]: { id: DASHBOARD_QUICK_ACTION_ID.SELLER_MESSAGES, label: "Messages", variant: "outline", iconName: "MessageCircle", requiresAuth: true, requiredRole: "seller" },
|
|
443
441
|
[DASHBOARD_QUICK_ACTION_ID.SELLER_WHATSAPP]: { id: DASHBOARD_QUICK_ACTION_ID.SELLER_WHATSAPP, label: "WhatsApp", variant: "outline", iconName: "Phone", requiresAuth: true, requiredRole: "seller" },
|
|
444
442
|
[DASHBOARD_QUICK_ACTION_ID.SELLER_REVIEWS]: { id: DASHBOARD_QUICK_ACTION_ID.SELLER_REVIEWS, label: "Reviews", variant: "outline", iconName: "Star", requiresAuth: true, requiredRole: "seller" },
|
|
445
443
|
[DASHBOARD_QUICK_ACTION_ID.SELLER_PRODUCTS]: { id: DASHBOARD_QUICK_ACTION_ID.SELLER_PRODUCTS, label: "My Products", variant: "outline", iconName: "Package", requiresAuth: true, requiredRole: "seller" },
|
|
@@ -499,7 +497,6 @@ export const DASHBOARD_QUICK_ACTIONS = {
|
|
|
499
497
|
DASHBOARD_QUICK_ACTION_ID.SELLER_PAYOUT_REQ,
|
|
500
498
|
DASHBOARD_QUICK_ACTION_ID.SELLER_SHIPPING,
|
|
501
499
|
DASHBOARD_QUICK_ACTION_ID.SELLER_PRINT_CENTER,
|
|
502
|
-
DASHBOARD_QUICK_ACTION_ID.SELLER_MESSAGES,
|
|
503
500
|
DASHBOARD_QUICK_ACTION_ID.SELLER_WHATSAPP,
|
|
504
501
|
DASHBOARD_QUICK_ACTION_ID.SELLER_REVIEWS,
|
|
505
502
|
DASHBOARD_QUICK_ACTION_ID.SELLER_STOREFRONT,
|