@mohasinac/appkit 4.53.1 → 4.54.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/.build-stamp.json +3 -3
- package/dist/_internal/client/theme/ThemeProvider.js +15 -1
- package/dist/_internal/server/features/auth/capabilities.js +7 -5
- package/dist/_internal/server/features/categories/price-guidance-resolve.d.ts +66 -0
- package/dist/_internal/server/features/categories/price-guidance-resolve.js +138 -0
- package/dist/_internal/server/features/checkout/actions.d.ts +22 -6
- package/dist/_internal/server/features/checkout/actions.js +96 -51
- package/dist/_internal/server/features/checkout/index.d.ts +1 -1
- package/dist/_internal/server/features/checkout/index.js +1 -1
- package/dist/_internal/server/features/checkout/supplier-identity.js +28 -6
- package/dist/_internal/server/features/orders/adapters.js +1 -3
- package/dist/_internal/server/features/price-index/market.d.ts +57 -0
- package/dist/_internal/server/features/price-index/market.js +120 -0
- package/dist/_internal/server/features/products/list-public.d.ts +12 -0
- package/dist/_internal/server/features/products/list-public.js +10 -1
- package/dist/_internal/server/features/products/listing-tab-counts.d.ts +25 -1
- package/dist/_internal/server/features/products/listing-tab-counts.js +184 -10
- package/dist/_internal/server/features/search/index-build/sources.js +43 -2
- package/dist/_internal/server/features/site-settings/adapters.js +1 -1
- package/dist/_internal/server/features/stores/adapters.d.ts +1 -1
- package/dist/_internal/server/features/stores/adapters.js +0 -1
- package/dist/_internal/server/features/stores/tabs.d.ts +7 -2
- package/dist/_internal/server/features/stores/tabs.js +5 -3
- package/dist/_internal/server/jobs/core/analyticsAlertEvaluate.js +2 -5
- package/dist/_internal/server/jobs/core/jobRunners.js +0 -10
- package/dist/_internal/server/jobs/core/onOrderCreate.js +10 -104
- package/dist/_internal/server/jobs/core/onOrderStatusChange.d.ts +0 -2
- package/dist/_internal/server/jobs/core/onOrderStatusChange.js +0 -1
- package/dist/_internal/server/jobs/core/onScamReportCreate.js +0 -1
- package/dist/_internal/server/jobs/core/onScamReportRejected.js +0 -1
- package/dist/_internal/server/jobs/core/onScamReportVerified.js +0 -1
- package/dist/_internal/server/jobs/core/paymentWindowTimeout.js +0 -1
- package/dist/_internal/server/jobs/core/pendingOrderTimeout.js +0 -1
- package/dist/_internal/server/notifications/channel-health.d.ts +7 -3
- package/dist/_internal/server/notifications/channel-health.js +2 -2
- package/dist/_internal/server/notifications/send-guard.d.ts +1 -1
- package/dist/_internal/server/notifications/send-guard.js +2 -4
- package/dist/_internal/shared/actions/action-registry.d.ts +1 -1
- package/dist/_internal/shared/actions/action-registry.js +128 -28
- package/dist/_internal/shared/checkout/order-math.d.ts +1 -1
- package/dist/_internal/shared/checkout/order-math.js +1 -1
- package/dist/_internal/shared/features/categories/bundle-copy.d.ts +1 -1
- package/dist/_internal/shared/features/checkout/config.d.ts +0 -2
- package/dist/_internal/shared/features/checkout/config.js +0 -2
- package/dist/_internal/shared/features/messaging/config.d.ts +7 -5
- package/dist/_internal/shared/features/messaging/config.js +1 -4
- package/dist/_internal/shared/features/site-settings/fees.d.ts +0 -2
- package/dist/_internal/shared/features/site-settings/fees.js +0 -2
- package/dist/_internal/shared/features/site-settings/supplier-of-record.d.ts +56 -0
- package/dist/_internal/shared/features/site-settings/supplier-of-record.js +57 -0
- package/dist/_internal/shared/fees/calculator.d.ts +0 -8
- package/dist/_internal/shared/fees/calculator.js +0 -7
- package/dist/_internal/shared/listing-types/tiers.d.ts +94 -0
- package/dist/_internal/shared/listing-types/tiers.js +150 -0
- package/dist/_internal/shared/search/match.js +28 -2
- package/dist/cli/index.js +0 -2
- package/dist/client.d.ts +25 -4
- package/dist/client.js +36 -5
- package/dist/constants/api-endpoints.d.ts +28 -15
- package/dist/constants/api-endpoints.js +14 -8
- package/dist/constants/field-names.d.ts +1 -0
- package/dist/constants/field-names.js +1 -0
- package/dist/constants/notification-types.d.ts +1 -1
- package/dist/constants/notification-types.js +1 -1
- package/dist/core/integration-keys.d.ts +5 -5
- package/dist/core/integration-keys.js +21 -10
- package/dist/features/about/components/FeesView.js +0 -6
- package/dist/features/about/components/GuidesHubView.js +15 -2
- package/dist/features/account/components/NotificationPreferencesPanel.js +3 -4
- package/dist/features/account/components/UserOrdersView.js +26 -7
- package/dist/features/account/types/index.d.ts +0 -2
- package/dist/features/addresses/utils/postal-autofill.d.ts +39 -0
- package/dist/features/addresses/utils/postal-autofill.js +54 -0
- package/dist/features/admin/actions/notification-actions.d.ts +2 -8
- package/dist/features/admin/actions/notification-actions.js +9 -104
- package/dist/features/admin/components/AdminGuideHubView.js +1 -8
- package/dist/features/admin/components/AdminOrderEditorView.d.ts +1 -1
- package/dist/features/admin/components/AdminOrdersView.js +0 -2
- package/dist/features/admin/components/AdminSectionsView.js +3 -2
- package/dist/features/admin/components/AdminSiteSettingsView.js +22 -68
- package/dist/features/admin/components/AdminStoreEditorView.js +72 -34
- package/dist/features/admin/components/OwnerQuickActions.d.ts +29 -0
- package/dist/features/admin/components/OwnerQuickActions.js +142 -0
- package/dist/features/admin/components/sections/adminSectionsTypes.js +13 -4
- package/dist/features/admin/components/sections/icon-options.d.ts +21 -0
- package/dist/features/admin/components/sections/icon-options.js +23 -0
- package/dist/features/admin/components/sections/sectionTemplates.js +4 -1
- package/dist/features/admin/constants/site-settings-tabs.d.ts +7 -12
- package/dist/features/admin/constants/site-settings-tabs.js +6 -12
- package/dist/features/admin/repository/site-settings.repository.js +1 -1
- package/dist/features/admin/schemas/admin-editor-forms.d.ts +1 -1
- package/dist/features/admin/schemas/admin-editor-forms.js +4 -1
- package/dist/features/admin/schemas/admin-user-form.d.ts +0 -61
- package/dist/features/admin/schemas/admin-user-form.js +3 -44
- package/dist/features/admin/schemas/firestore.d.ts +28 -54
- package/dist/features/admin/schemas/firestore.js +40 -18
- package/dist/features/auctions/components/AuctionDetailPageView.js +12 -10
- package/dist/features/auctions/components/MarketplaceAuctionCard.d.ts +11 -1
- package/dist/features/auctions/components/MarketplaceAuctionCard.js +9 -2
- package/dist/features/auth/checkout-value-otp.d.ts +1 -1
- package/dist/features/auth/checkout-value-otp.js +1 -1
- package/dist/features/auth/permissions/constants.d.ts +29 -2
- package/dist/features/auth/permissions/constants.js +67 -1
- package/dist/features/blog/components/BlogFeaturedCard.d.ts +11 -1
- package/dist/features/blog/components/BlogFeaturedCard.js +9 -2
- package/dist/features/cart/components/CartDrawer.js +3 -2
- package/dist/features/cart/components/CartGroupLineRow.js +2 -1
- package/dist/features/cart/components/CartPriceBreakdown.d.ts +0 -2
- package/dist/features/cart/components/CartPriceBreakdown.js +1 -1
- package/dist/features/cart/components/StoreAddonsPicker.d.ts +2 -5
- package/dist/features/cart/components/StoreAddonsPicker.js +4 -5
- package/dist/features/cart/hooks/useAddToCart.js +10 -5
- package/dist/features/cart/repository/cart.repository.js +1 -2
- package/dist/features/cart/schemas/firestore.d.ts +1 -2
- package/dist/features/cart/utils/pending-ops.d.ts +11 -1
- package/dist/features/cart/utils/pending-ops.js +14 -2
- package/dist/features/categories/api/[id]/price-guidance/route.js +1 -24
- package/dist/features/categories/components/BrandDetailPageView.js +15 -6
- package/dist/features/categories/components/BrandDetailTabs.d.ts +7 -1
- package/dist/features/categories/components/BrandDetailTabs.js +18 -3
- package/dist/features/categories/components/BundleCollage.js +3 -2
- package/dist/features/categories/components/BundleDetailView.js +2 -1
- package/dist/features/categories/components/BundleItemsPicker.js +3 -4
- package/dist/features/categories/components/CategoryDetailPageView.js +19 -8
- package/dist/features/categories/components/CategoryDetailTabs.d.ts +7 -1
- package/dist/features/categories/components/CategoryDetailTabs.js +29 -7
- package/dist/features/categories/components/CategoryGrid.d.ts +11 -1
- package/dist/features/categories/components/CategoryGrid.js +9 -2
- package/dist/features/checkout/actions/checkout-value-otp-actions.d.ts +10 -5
- package/dist/features/checkout/actions/checkout-value-otp-actions.js +2 -88
- package/dist/features/classified/components/ClassifiedDetailPageView.js +12 -2
- package/dist/features/digital-codes/components/DigitalCodeDetailPageView.js +12 -2
- package/dist/features/events/components/EventCard.d.ts +11 -1
- package/dist/features/events/components/EventCard.js +9 -2
- package/dist/features/grouped/components/GroupedListingDetailView.js +3 -1
- package/dist/features/homepage/components/CTABannerSection.d.ts +3 -1
- package/dist/features/homepage/components/CTABannerSection.js +6 -3
- package/dist/features/homepage/components/HeroCarousel.js +8 -6
- package/dist/features/homepage/components/MarketplaceHomepageView.js +33 -7
- package/dist/features/homepage/components/SectionCarousel.js +13 -5
- package/dist/features/homepage/components/SecurityHighlightsSection.d.ts +8 -3
- package/dist/features/homepage/components/SecurityHighlightsSection.js +2 -2
- package/dist/features/homepage/components/StatsCounterSection.d.ts +9 -4
- package/dist/features/homepage/components/StatsCounterSection.js +2 -2
- package/dist/features/homepage/components/TestimonialsCarousel.js +1 -1
- package/dist/features/homepage/components/TrustFeaturesSection.d.ts +18 -4
- package/dist/features/homepage/components/TrustFeaturesSection.js +5 -5
- package/dist/features/homepage/components/WelcomeSection.d.ts +13 -2
- package/dist/features/homepage/components/WelcomeSection.js +3 -3
- package/dist/features/homepage/components/WhatsAppCommunitySection.d.ts +28 -0
- package/dist/features/homepage/components/WhatsAppCommunitySection.js +42 -6
- package/dist/features/homepage/components/WhatsAppGlyph.d.ts +20 -0
- package/dist/features/homepage/components/WhatsAppGlyph.js +20 -0
- package/dist/features/homepage/constants/hero-carousel-styles.d.ts +8 -6
- package/dist/features/homepage/constants/hero-carousel-styles.js +8 -6
- package/dist/features/homepage/constants/section-copy.d.ts +12 -10
- package/dist/features/homepage/constants/section-copy.js +28 -6
- package/dist/features/homepage/constants/stat-icons.d.ts +12 -0
- package/dist/features/homepage/constants/stat-icons.js +17 -0
- package/dist/features/homepage/constants/trust-icon-aliases.d.ts +8 -0
- package/dist/features/homepage/constants/trust-icon-aliases.js +75 -0
- package/dist/features/homepage/lib/section-defaults.d.ts +16 -1
- package/dist/features/homepage/lib/section-defaults.js +24 -4
- package/dist/features/homepage/lib/section-renderer.js +48 -8
- package/dist/features/homepage/schemas/firestore.d.ts +18 -1
- package/dist/features/layout/AppLayoutShell.js +2 -1
- package/dist/features/layout/BottomActions.d.ts +1 -0
- package/dist/features/layout/BottomActions.js +330 -0
- package/dist/features/layout/BottomChrome.d.ts +45 -0
- package/dist/features/layout/BottomChrome.js +5 -17
- package/dist/features/layout/SideActionDock.js +36 -13
- package/dist/features/layout/index.d.ts +2 -7
- package/dist/features/layout/index.js +7 -7
- package/dist/features/layout/useIsDesktop.d.ts +36 -0
- package/dist/features/layout/useIsDesktop.js +48 -0
- package/dist/features/live/components/LiveItemDetailPageView.js +12 -2
- package/dist/features/orders/actions/refund-actions.js +0 -1
- package/dist/features/orders/components/OrderAddonBadges.d.ts +1 -3
- package/dist/features/orders/components/OrderAddonBadges.js +3 -4
- package/dist/features/orders/components/OrderPaymentSummary.js +15 -2
- package/dist/features/orders/components/YourPurchaseStrip.d.ts +24 -0
- package/dist/features/orders/components/YourPurchaseStrip.js +77 -0
- package/dist/features/orders/components/index.d.ts +2 -1
- package/dist/features/orders/components/index.js +1 -1
- package/dist/features/orders/repository/orders.repository.d.ts +0 -8
- package/dist/features/orders/repository/orders.repository.js +0 -2
- package/dist/features/orders/schemas/firestore.d.ts +17 -9
- package/dist/features/orders/types/index.d.ts +2 -5
- package/dist/features/orders/utils/order-announcement-message.d.ts +18 -0
- package/dist/features/orders/utils/order-announcement-message.js +16 -0
- package/dist/features/orders/utils/payment-proof-message.d.ts +20 -0
- package/dist/features/orders/utils/payment-proof-message.js +17 -0
- package/dist/features/parts/components/PartDetailPageView.js +96 -1
- package/dist/features/parts/schemas/firestore.d.ts +247 -0
- package/dist/features/parts/schemas/firestore.js +6 -6
- package/dist/features/pre-orders/components/MarketplacePreorderCard.d.ts +11 -1
- package/dist/features/pre-orders/components/MarketplacePreorderCard.js +10 -3
- package/dist/features/pre-orders/components/PreOrderDetailPageView.js +12 -10
- package/dist/features/price-index/components/PriceIndexToolView.d.ts +21 -0
- package/dist/features/price-index/components/PriceIndexToolView.js +230 -27
- package/dist/features/price-index/lookup-target.d.ts +48 -0
- package/dist/features/price-index/lookup-target.js +107 -0
- package/dist/features/products/api/[id]/route.js +8 -1
- package/dist/features/products/api/route.js +16 -4
- package/dist/features/products/components/AvailabilityScopeHint.d.ts +22 -0
- package/dist/features/products/components/AvailabilityScopeHint.js +27 -0
- package/dist/features/products/components/CompareOverlay.d.ts +2 -1
- package/dist/features/products/components/CompareOverlay.js +2 -1
- package/dist/features/products/components/GroupSettingsPanel.js +2 -1
- package/dist/features/products/components/InteractiveProductCard.d.ts +7 -1
- package/dist/features/products/components/InteractiveProductCard.js +16 -4
- package/dist/features/products/components/MarketplaceBundleCard.d.ts +11 -1
- package/dist/features/products/components/MarketplaceBundleCard.js +9 -2
- package/dist/features/products/components/MarketplacePrizeDrawCard.d.ts +11 -1
- package/dist/features/products/components/MarketplacePrizeDrawCard.js +9 -2
- package/dist/features/products/components/PrizeDrawDetailPageView.js +2 -1
- package/dist/features/products/components/ProductDetailPageView.js +34 -4
- package/dist/features/products/components/ProductGrid.d.ts +14 -1
- package/dist/features/products/components/ProductGrid.js +22 -5
- package/dist/features/products/components/ProductsIndexListing.js +2 -2
- package/dist/features/products/components/SublistingCarouselSection.js +2 -1
- package/dist/features/products/repository/products.repository.d.ts +1 -0
- package/dist/features/products/repository/products.repository.js +5 -1
- package/dist/features/products/utils/group-member-image.d.ts +9 -2
- package/dist/features/products/utils/group-member-image.js +2 -1
- package/dist/features/reviews/api/[id]/route.js +83 -23
- package/dist/features/reviews/components/PurchaseReviewAffordance.d.ts +6 -0
- package/dist/features/reviews/components/PurchaseReviewAffordance.js +42 -0
- package/dist/features/reviews/components/ReviewFormDrawer.d.ts +34 -0
- package/dist/features/reviews/components/ReviewFormDrawer.js +127 -0
- package/dist/features/reviews/components/index.d.ts +4 -0
- package/dist/features/reviews/components/index.js +2 -0
- package/dist/features/scams/schemas/index.d.ts +10 -10
- package/dist/features/search/action-index/settings-entries.js +0 -9
- package/dist/features/seller/actions/seller-actions.d.ts +1 -1
- package/dist/features/seller/actions/seller-actions.js +49 -3
- package/dist/features/seller/components/SellerPayoutSettingsView.js +30 -2
- package/dist/features/seller/components/SellerProductShell.d.ts +17 -1
- package/dist/features/seller/components/SellerProductsView.js +3 -2
- package/dist/features/seller/hooks/useStoreListingEntitlements.d.ts +8 -0
- package/dist/features/seller/hooks/useStoreListingEntitlements.js +70 -0
- package/dist/features/store-extensions/repository/store-extensions.repositories.d.ts +1 -6
- package/dist/features/store-extensions/repository/store-extensions.repositories.js +1 -10
- package/dist/features/store-extensions/schemas/firestore.d.ts +1 -17
- package/dist/features/store-extensions/schemas/firestore.js +0 -10
- package/dist/features/stores/components/InteractiveStoreCard.d.ts +11 -1
- package/dist/features/stores/components/InteractiveStoreCard.js +9 -2
- package/dist/features/stores/components/StoreAuctionsListing.js +2 -1
- package/dist/features/stores/components/StoreCapabilitiesGuideView.js +0 -1
- package/dist/features/stores/components/StoreGuideHubView.js +2 -8
- package/dist/features/stores/components/StoreSettingsGuideView.js +2 -6
- package/dist/features/stores/components/index.d.ts +0 -2
- package/dist/features/stores/components/index.js +0 -1
- package/dist/features/stores/repository/store.repository.d.ts +1 -26
- package/dist/features/stores/repository/store.repository.js +5 -60
- package/dist/features/stores/schemas/firestore.d.ts +6 -25
- package/dist/features/stores/schemas/firestore.js +6 -3
- package/dist/features/stores/schemas/index.d.ts +1 -87
- package/dist/features/stores/schemas/index.js +10 -15
- package/dist/features/tester/seed-data/authored/admin__site-system.js +0 -48
- package/dist/features/tester/seed-data/authored/buying__buying-checkout.js +0 -40
- package/dist/features/tester/seed-data/authored/content-discovery__authenticity-checker.js +114 -2
- package/dist/features/tester/seed-data/authored/selling__quick-add-minimum-details.js +0 -16
- package/dist/features/tester/seed-data/authored/selling__seller-guide.js +1 -1
- package/dist/features/tester/seed-data/authored/selling__seller-marketing-extras.js +0 -79
- package/dist/features/tester/seed-data/authored/selling__seller-orders.js +1 -1
- package/dist/features/tester/seed-data/tester-checklist-seed-data.js +427 -69
- package/dist/index.d.ts +20 -32
- package/dist/index.js +34 -43
- package/dist/next/routing/route-map.d.ts +2 -8
- package/dist/next/routing/route-map.js +21 -4
- package/dist/providers/db-firebase/base.repository.d.ts +1 -1
- package/dist/providers/db-firebase/base.repository.js +1 -1
- package/dist/providers/payment-razorpay/index.d.ts +125 -0
- package/dist/providers/payment-razorpay/index.js +232 -0
- package/dist/providers/payment-razorpay/signature.d.ts +53 -0
- package/dist/providers/payment-razorpay/signature.js +71 -0
- package/dist/providers/shipping-shiprocket/index.d.ts +98 -0
- package/dist/providers/shipping-shiprocket/index.js +356 -0
- package/dist/providers.d.ts +3 -0
- package/dist/providers.js +3 -0
- package/dist/react/hooks/useCanSeePrices.d.ts +0 -27
- package/dist/react/hooks/useCanSeePrices.js +25 -0
- package/dist/repositories/index.d.ts +1 -1
- package/dist/repositories/index.js +1 -1
- package/dist/schemas/registry.d.ts +10 -115
- package/dist/schemas/registry.js +1 -2
- package/dist/security/pii-encrypt.js +1 -1
- package/dist/seed/_helpers/category-forest.js +27 -0
- package/dist/seed/_helpers/category-parts-glossary-map.js +1816 -86
- package/dist/seed/_helpers/category-parts.d.ts +1 -1
- package/dist/seed/_helpers/category-parts.js +13412 -3020
- package/dist/seed/carousel-slides-seed-data.js +47 -10
- package/dist/seed/categories-seed-data.js +48 -6
- package/dist/seed/faq-seed-data.js +2 -2
- package/dist/seed/homepage-sections-seed-data.js +286 -54
- package/dist/seed/index.d.ts +1 -1
- package/dist/seed/index.js +1 -1
- package/dist/seed/manifest.d.ts +1 -1
- package/dist/seed/manifest.js +1 -2
- package/dist/seed/model-composition-seed-data.js +6 -8
- package/dist/seed/part-glossary/chunk0.d.ts +9 -0
- package/dist/seed/part-glossary/chunk0.js +35448 -0
- package/dist/seed/part-glossary/chunk1.d.ts +9 -0
- package/dist/seed/part-glossary/chunk1.js +40494 -0
- package/dist/seed/part-glossary/chunk2.d.ts +9 -0
- package/dist/seed/part-glossary/chunk2.js +51242 -0
- package/dist/seed/part-glossary/chunk3.d.ts +9 -0
- package/dist/seed/part-glossary/chunk3.js +53337 -0
- package/dist/seed/part-glossary/chunk4.d.ts +9 -0
- package/dist/seed/part-glossary/chunk4.js +51454 -0
- package/dist/seed/part-glossary-seed-data.d.ts +1 -1
- package/dist/seed/part-glossary-seed-data.js +23 -47483
- package/dist/seed/products-beyblade-x-seed-data.js +36 -1
- package/dist/seed/site-settings-seed-data.js +34 -35
- package/dist/seed/store-extensions-seed-data.d.ts +1 -2
- package/dist/seed/store-extensions-seed-data.js +1 -23
- package/dist/seed/stores-seed-data.js +0 -1
- package/dist/server-entry.d.ts +1 -1
- package/dist/server-entry.js +1 -1
- package/dist/server.d.ts +10 -10
- package/dist/server.js +24 -22
- package/dist/styles.css +392 -43
- package/dist/tailwind-utilities.css +1 -1
- package/dist/tokens/themes/default-dark.js +1 -1
- package/dist/tokens/themes/default-light.js +2 -1
- package/dist/tokens/tokens.css +6 -2
- package/dist/ui/components/Button.d.ts +11 -0
- package/dist/ui/components/Button.js +11 -0
- package/dist/ui/components/Button.style.css +29 -0
- package/dist/ui/components/CarouselNav.d.ts +57 -0
- package/dist/ui/components/CarouselNav.js +25 -0
- package/dist/ui/components/CarouselNav.style.css +265 -0
- package/dist/ui/components/GatedPrice.js +30 -3
- package/dist/ui/components/GatedPrice.style.css +43 -40
- package/dist/ui/components/HorizontalScroller.d.ts +12 -1
- package/dist/ui/components/HorizontalScroller.js +43 -3
- package/dist/ui/components/ImageMosaic.d.ts +8 -1
- package/dist/ui/components/ImageMosaic.js +3 -2
- package/dist/ui/components/ImageMosaic.style.css +22 -0
- package/dist/ui/components/Layout.style.css +6 -0
- package/dist/ui/components/Semantic.d.ts +3 -2
- package/dist/ui/components/Semantic.js +1 -0
- package/dist/ui/components/Typography.d.ts +2 -0
- package/dist/ui/components/Typography.js +2 -0
- package/dist/ui/components/Typography.style.css +19 -0
- package/dist/ui/components/index.style.css +1 -0
- package/dist/ui/index.d.ts +3 -1
- package/dist/ui/index.js +4 -0
- package/package.json +3 -2
- package/scripts/seed-cli.mjs +133 -27
- package/dist/_internal/server/jobs/core/whatsappCatalogImport.d.ts +0 -27
- package/dist/_internal/server/jobs/core/whatsappCatalogImport.js +0 -172
- package/dist/_internal/server/jobs/core/whatsappNotify.d.ts +0 -35
- package/dist/_internal/server/jobs/core/whatsappNotify.js +0 -140
- package/dist/features/admin/components/AdminWhatsAppGuideView.d.ts +0 -2
- package/dist/features/admin/components/AdminWhatsAppGuideView.js +0 -35
- package/dist/features/orders/components/MarketplaceOrderCard.d.ts +0 -36
- package/dist/features/orders/components/MarketplaceOrderCard.js +0 -57
- package/dist/features/stores/components/StoreWhatsAppGuideView.d.ts +0 -3
- package/dist/features/stores/components/StoreWhatsAppGuideView.js +0 -12
- package/dist/features/whatsapp-bot/api/send-status/route.d.ts +0 -12
- package/dist/features/whatsapp-bot/api/send-status/route.js +0 -38
- package/dist/features/whatsapp-bot/api/webhook/route.d.ts +0 -12
- package/dist/features/whatsapp-bot/api/webhook/route.js +0 -43
- package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.d.ts +0 -6
- package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +0 -270
- package/dist/features/whatsapp-bot/components/WhatsAppChatButton.d.ts +0 -9
- package/dist/features/whatsapp-bot/components/WhatsAppChatButton.js +0 -7
- package/dist/features/whatsapp-bot/components/index.d.ts +0 -3
- package/dist/features/whatsapp-bot/components/index.js +0 -2
- package/dist/features/whatsapp-bot/helpers/payment-proof-message.d.ts +0 -14
- package/dist/features/whatsapp-bot/helpers/payment-proof-message.js +0 -17
- package/dist/features/whatsapp-bot/helpers/whatsapp.d.ts +0 -52
- package/dist/features/whatsapp-bot/helpers/whatsapp.js +0 -283
- package/dist/features/whatsapp-bot/index.d.ts +0 -3
- package/dist/features/whatsapp-bot/index.js +0 -3
- package/dist/features/whatsapp-bot/manifest.d.ts +0 -2
- package/dist/features/whatsapp-bot/manifest.js +0 -13
- package/dist/features/whatsapp-bot/messages/en.json +0 -7
- package/dist/features/whatsapp-bot/server.d.ts +0 -7
- package/dist/features/whatsapp-bot/server.js +0 -7
- package/dist/features/whatsapp-bot/types/index.d.ts +0 -126
- package/dist/features/whatsapp-bot/types/index.js +0 -1
|
@@ -4,11 +4,11 @@ import { siteSettingsRepository } from "../repository/site-settings.repository.j
|
|
|
4
4
|
import { userRepository } from "../../auth/repository/user.repository.js";
|
|
5
5
|
import { createResendProvider } from "../../../providers/email-resend/provider.js";
|
|
6
6
|
import { isChannelHealthy, withChannelRetry } from "../../../_internal/server/notifications/channel-health.js";
|
|
7
|
-
import { enqueueJob } from "../../jobs/actions/enqueue-job.js";
|
|
8
7
|
import { serverLogger } from "../../../monitoring/index.js";
|
|
9
8
|
import { resolveNotificationActionUrl, TYPE_AUDIENCE, } from "../../../_internal/shared/features/notifications/action-url.js";
|
|
10
9
|
import { isEmailEligible } from "../../../_internal/shared/features/notifications/email-eligibility.js";
|
|
11
10
|
import { renderNotificationEmail } from "../../email/notification-templates.js";
|
|
11
|
+
import { DEFAULT_NOTIFICATION_CHANNELS, meetsMinPriority, } from "../schemas/firestore.js";
|
|
12
12
|
/**
|
|
13
13
|
* A notification's `actionUrl` is a site-relative path — correct for the
|
|
14
14
|
* in-app bell, useless in an email, where a bare `/user/orders/x` is not a
|
|
@@ -31,56 +31,6 @@ function absoluteActionUrl(path) {
|
|
|
31
31
|
const base = process.env.NEXT_PUBLIC_APP_URL?.replace(/\/+$/, "");
|
|
32
32
|
return base ? `${base}${path}` : path;
|
|
33
33
|
}
|
|
34
|
-
import { DEFAULT_NOTIFICATION_CHANNELS, meetsMinPriority, } from "../schemas/firestore.js";
|
|
35
|
-
/**
|
|
36
|
-
* Notification types whose WhatsApp send is gated behind the buyer's
|
|
37
|
-
* per-order ₹10 WhatsApp-updates addon (`OrderDocument.whatsappNotifyAddon`)
|
|
38
|
-
* — see `orderWhatsappAddonPaid` on `SendNotificationInput`. Every other
|
|
39
|
-
* type (bid_won, offers, scam reports, support tickets, admin alerts, …)
|
|
40
|
-
* keeps the original two-gate behavior (admin channel enabled + user hasn't
|
|
41
|
-
* opted out) unchanged.
|
|
42
|
-
*/
|
|
43
|
-
const ORDER_GATED_TYPES = new Set([
|
|
44
|
-
"order_placed",
|
|
45
|
-
"order_confirmed",
|
|
46
|
-
"order_shipped",
|
|
47
|
-
"order_delivered",
|
|
48
|
-
"order_cancelled",
|
|
49
|
-
"refund_initiated",
|
|
50
|
-
]);
|
|
51
|
-
/**
|
|
52
|
-
* Notification type → the flat `SiteSettingsCredentials` field holding its
|
|
53
|
-
* approved Meta template name.
|
|
54
|
-
*
|
|
55
|
-
* 🛑 **`Partial` here is CORRECT and is not the `typeToPrefsKey` mistake.**
|
|
56
|
-
*
|
|
57
|
-
* The distinction is what a missing key MEANS. A missing `typeToPrefsKey`
|
|
58
|
-
* entry silently ignored a user's opt-out — a real setting that read as
|
|
59
|
-
* honoured and was not. A missing entry here means "no Meta-approved template
|
|
60
|
-
* exists for this type", which is a fact about the Meta account, not a bug:
|
|
61
|
-
* six of the 28 types have one, and the rest legitimately fall back to
|
|
62
|
-
* free-form (which Meta accepts inside the 24-hour customer-service window
|
|
63
|
-
* and rejects outside it — the runner already logs that rejection).
|
|
64
|
-
*
|
|
65
|
-
* Getting six approved templates is a Meta Business review process, not a
|
|
66
|
-
* code change, so listing all 28 here with empty values would be a
|
|
67
|
-
* `Record<…>` that lies about coverage.
|
|
68
|
-
*
|
|
69
|
-
* The six that ARE approved are the order lifecycle, which is also the set
|
|
70
|
-
* gated behind the buyer's ₹10 addon above — the two lists agree on purpose.
|
|
71
|
-
*/
|
|
72
|
-
const WHATSAPP_TEMPLATE_FIELD = {
|
|
73
|
-
order_placed: "whatsappTemplateOrderPlaced",
|
|
74
|
-
order_confirmed: "whatsappTemplateOrderConfirmed",
|
|
75
|
-
order_shipped: "whatsappTemplateOrderShipped",
|
|
76
|
-
order_delivered: "whatsappTemplateOrderDelivered",
|
|
77
|
-
order_cancelled: "whatsappTemplateOrderCancelled",
|
|
78
|
-
refund_initiated: "whatsappTemplateRefundInitiated",
|
|
79
|
-
};
|
|
80
|
-
function resolveWhatsAppTemplateName(type, creds) {
|
|
81
|
-
const field = WHATSAPP_TEMPLATE_FIELD[type];
|
|
82
|
-
return (field ? creds[field] : undefined)?.trim() ?? "";
|
|
83
|
-
}
|
|
84
34
|
export async function markNotificationRead(id) {
|
|
85
35
|
await notificationRepository.markAsRead(id);
|
|
86
36
|
}
|
|
@@ -103,15 +53,15 @@ export async function getUnreadNotificationCount(userId) {
|
|
|
103
53
|
/**
|
|
104
54
|
* Create an in-app notification and fan out to enabled external channels.
|
|
105
55
|
*
|
|
106
|
-
* In-app is always written.
|
|
56
|
+
* In-app is always written. Email is sent only when:
|
|
107
57
|
* 1. The channel is enabled in siteSettings.notificationChannels
|
|
108
58
|
* 2. Notification priority meets the channel's minPriority threshold
|
|
109
59
|
* 3. The optional `types` filter includes this notification type (or is absent)
|
|
110
|
-
* 4. The contact field (userEmail
|
|
60
|
+
* 4. The contact field (userEmail) is supplied by the caller
|
|
111
61
|
* 5. The required credentials are set in siteSettings.credentials
|
|
112
62
|
*/
|
|
113
63
|
export async function sendNotification(input) {
|
|
114
|
-
const { userEmail,
|
|
64
|
+
const { userEmail, emailHtml, audience, eligibilityOverride, ...notifInput } = input;
|
|
115
65
|
/*
|
|
116
66
|
* Fill `actionUrl` when the caller did not.
|
|
117
67
|
*
|
|
@@ -153,12 +103,12 @@ export async function sendNotification(input) {
|
|
|
153
103
|
* suppresses the emailed/messaged COPY, not the notification.
|
|
154
104
|
*
|
|
155
105
|
* One map gates both channels deliberately. If a type is ever genuinely
|
|
156
|
-
*
|
|
106
|
+
* worth a channel of its own, split the map then rather than
|
|
157
107
|
* loosening this early return.
|
|
158
108
|
*/
|
|
159
109
|
if (!isEmailEligible(notifInput.type) &&
|
|
160
110
|
eligibilityOverride !== "staff_requested") {
|
|
161
|
-
return { notification, email: "skipped"
|
|
111
|
+
return { notification, email: "skipped" };
|
|
162
112
|
}
|
|
163
113
|
// Load channel config + credentials (one Firestore read).
|
|
164
114
|
let settings;
|
|
@@ -168,7 +118,7 @@ export async function sendNotification(input) {
|
|
|
168
118
|
catch (err) {
|
|
169
119
|
void normalizeError(err);
|
|
170
120
|
serverLogger.warn("sendNotification: could not load siteSettings — skipping external channels", { err });
|
|
171
|
-
return { notification, email: "skipped"
|
|
121
|
+
return { notification, email: "skipped" };
|
|
172
122
|
}
|
|
173
123
|
const channels = settings.notificationChannels ?? DEFAULT_NOTIFICATION_CHANNELS;
|
|
174
124
|
const creds = settings.credentials ?? {};
|
|
@@ -200,7 +150,6 @@ export async function sendNotification(input) {
|
|
|
200
150
|
? userRepository.revealUser(fetchedUserDoc)
|
|
201
151
|
: null;
|
|
202
152
|
const resolvedEmail = userEmail ?? fetchedUserPlain?.email ?? undefined;
|
|
203
|
-
const resolvedPhone = userPhone ?? fetchedUserPlain?.phoneNumber ?? undefined;
|
|
204
153
|
// Map NotificationType to a NotificationTypePrefs key.
|
|
205
154
|
/*
|
|
206
155
|
* 🛑 COMPLETE and compile-checked: `Record<NotificationType, …>`, not
|
|
@@ -263,7 +212,7 @@ export async function sendNotification(input) {
|
|
|
263
212
|
const typeKey = typeToPrefsKey[type];
|
|
264
213
|
// If the user has explicitly disabled this notification type, skip all external channels.
|
|
265
214
|
if (typeKey && userTypePrefs[typeKey] === false) {
|
|
266
|
-
return { notification, email: "skipped"
|
|
215
|
+
return { notification, email: "skipped" };
|
|
267
216
|
}
|
|
268
217
|
// Email channel — admin enabled AND user hasn't opted out
|
|
269
218
|
let emailStatus = "skipped";
|
|
@@ -310,54 +259,10 @@ export async function sendNotification(input) {
|
|
|
310
259
|
}
|
|
311
260
|
}
|
|
312
261
|
}
|
|
313
|
-
// WhatsApp channel — admin enabled AND user hasn't opted out AND (for
|
|
314
|
-
// order-lifecycle types) the buyer paid the per-order WhatsApp addon.
|
|
315
|
-
let whatsappStatus = "skipped";
|
|
316
|
-
if (channels.whatsapp.enabled &&
|
|
317
|
-
userChannelPrefs.whatsapp !== false &&
|
|
318
|
-
resolvedPhone &&
|
|
319
|
-
meetsMinPriority(priority, channels.whatsapp.minPriority) &&
|
|
320
|
-
(!channels.whatsapp.types?.length || channels.whatsapp.types.includes(type)) &&
|
|
321
|
-
(!ORDER_GATED_TYPES.has(type) || input.orderWhatsappAddonPaid === true)) {
|
|
322
|
-
const phoneNumberId = creds.whatsappPhoneNumberId?.trim() ?? "";
|
|
323
|
-
const accessToken = creds.whatsappCloudApiToken?.trim() ?? "";
|
|
324
|
-
if (phoneNumberId && accessToken) {
|
|
325
|
-
try {
|
|
326
|
-
const { jobId } = await enqueueJob({
|
|
327
|
-
jobType: "whatsappNotify",
|
|
328
|
-
payload: {
|
|
329
|
-
toPhone: resolvedPhone,
|
|
330
|
-
title,
|
|
331
|
-
message,
|
|
332
|
-
type,
|
|
333
|
-
templateName: resolveWhatsAppTemplateName(type, creds),
|
|
334
|
-
templateLanguage: creds.whatsappTemplateLanguage ?? "en",
|
|
335
|
-
notificationId: notification.id,
|
|
336
|
-
phoneNumberId,
|
|
337
|
-
accessToken,
|
|
338
|
-
},
|
|
339
|
-
requestedBy: input.userId,
|
|
340
|
-
});
|
|
341
|
-
whatsappStatus = "queued";
|
|
342
|
-
await notificationRepository
|
|
343
|
-
.update(notification.id, { whatsappStatus: "queued", whatsappJobId: jobId })
|
|
344
|
-
.catch((err) => {
|
|
345
|
-
void normalizeError(err);
|
|
346
|
-
serverLogger.warn("sendNotification: failed to write whatsappJobId onto notification doc", { notificationId: notification.id });
|
|
347
|
-
});
|
|
348
|
-
}
|
|
349
|
-
catch (err) {
|
|
350
|
-
void normalizeError(err);
|
|
351
|
-
serverLogger.error("sendNotification: WhatsApp job enqueue failed", { userId: input.userId, err });
|
|
352
|
-
whatsappStatus = "failed";
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
262
|
serverLogger.info("sendNotification: dispatched", {
|
|
357
263
|
userId: input.userId,
|
|
358
264
|
type,
|
|
359
265
|
email: emailStatus,
|
|
360
|
-
whatsapp: whatsappStatus,
|
|
361
266
|
});
|
|
362
|
-
return { notification, email: emailStatus
|
|
267
|
+
return { notification, email: emailStatus };
|
|
363
268
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Users, Package, Store, ShoppingBag, FileText, Settings, Shield, BarChart2, AlertTriangle, BookOpen,
|
|
2
|
+
import { Users, Package, Store, ShoppingBag, FileText, Settings, Shield, BarChart2, AlertTriangle, BookOpen, CreditCard, } from "lucide-react";
|
|
3
3
|
import { Alert, Div, Grid, Heading, Row, Section, Stack, Text, TextLink } from "../../../ui/index.js";
|
|
4
4
|
import { ROUTES } from "../../../next/routing/route-map.js";
|
|
5
5
|
const CLS_WARN_PANEL = "rounded-2xl border border-amber-200 bg-warning-surface dark:border-amber-800 p-[var(--appkit-space-6)]";
|
|
@@ -69,13 +69,6 @@ const GUIDE_CARDS = [
|
|
|
69
69
|
href: String(ROUTES.ADMIN.GUIDE_TRUST),
|
|
70
70
|
permission: "admin:moderation:read",
|
|
71
71
|
},
|
|
72
|
-
{
|
|
73
|
-
Icon: MessageSquare,
|
|
74
|
-
title: "WhatsApp Integration",
|
|
75
|
-
description: "Connect Meta's WhatsApp Business Cloud API — Business Manager setup, phone registration, access tokens, and message templates.",
|
|
76
|
-
href: String(ROUTES.ADMIN.GUIDE_WHATSAPP),
|
|
77
|
-
permission: "admin:site:read",
|
|
78
|
-
},
|
|
79
72
|
{
|
|
80
73
|
Icon: CreditCard,
|
|
81
74
|
title: "Payments (Razorpay)",
|
|
@@ -32,7 +32,7 @@ export interface AdminOrderEditorViewProps {
|
|
|
32
32
|
paymentReviewOutcome?: string;
|
|
33
33
|
/**
|
|
34
34
|
* Paid add-ons + applied coupon for this order. Operational, not decorative:
|
|
35
|
-
* `
|
|
35
|
+
* `giftWrapAddon` tells the packer to wrap the parcel, and the
|
|
36
36
|
* coupon is what an admin needs when reconciling a discounted order.
|
|
37
37
|
*/
|
|
38
38
|
addons?: OrderAddonBadgesOrder;
|
|
@@ -198,8 +198,6 @@ export function AdminOrdersView({ children, ...props }) {
|
|
|
198
198
|
// Straight off the order document — the admin list route returns
|
|
199
199
|
// raw docs, so these need no serializer entry (cf. Root Cause #38).
|
|
200
200
|
addons: {
|
|
201
|
-
whatsappNotifyAddon: Boolean(item.whatsappNotifyAddon),
|
|
202
|
-
whatsappNotifyFee: Number(item.whatsappNotifyFee ?? 0) || undefined,
|
|
203
201
|
giftWrapAddon: Boolean(item.giftWrapAddon),
|
|
204
202
|
giftWrapFee: Number(item.giftWrapFee ?? 0) || undefined,
|
|
205
203
|
giftWrapMessage: toStringValue(item.giftWrapMessage) || undefined,
|
|
@@ -6,7 +6,8 @@ import React from "react";
|
|
|
6
6
|
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
7
7
|
import { ProductInlineSelect } from "../../seller/components/ProductInlineSelect.js";
|
|
8
8
|
import { CategoryInlineSelect } from "../../seller/components/CategoryInlineSelect.js";
|
|
9
|
-
import { Button, Checkbox, Div, Input, Modal, Row, Select, Stack, Text, Textarea, useToast } from "../../../ui/index.js";
|
|
9
|
+
import { Button, Checkbox, Div, Input, Modal, PaginatedSelect, Row, Select, Stack, Text, Textarea, useToast } from "../../../ui/index.js";
|
|
10
|
+
import { ICON_KEY_OPTIONS } from "./sections/icon-options.js";
|
|
10
11
|
import { FormErrorSummary, applyZodIssues } from "../../../ui/forms/index.js";
|
|
11
12
|
import { homepageSectionFormSchema, } from "../schemas/homepage-section-form.js";
|
|
12
13
|
import { SectionForm, useSectionFormNav } from "../../shell/index.js";
|
|
@@ -753,7 +754,7 @@ export function AdminSectionsView({ children }) {
|
|
|
753
754
|
return (_jsxs(Div, { className: CLS_SECTION_PANEL, children: [_jsx(Text, { size: "sm", weight: "semibold", color: "primary", children: "Welcome Section Builder" }), _jsx(Input, { label: "Headline (h1)", value: welcomeBuilder.h1, onChange: (e) => setWelcomeBuilder((prev) => ({ ...prev, h1: e.target.value })) }), _jsx(Input, { label: "Subtitle", value: welcomeBuilder.subtitle, onChange: (e) => setWelcomeBuilder((prev) => ({ ...prev, subtitle: e.target.value })) }), _jsx(Textarea, { label: "Description", value: welcomeBuilder.description, onChange: (e) => setWelcomeBuilder((prev) => ({ ...prev, description: e.target.value })), rows: 3 }), _jsx(Checkbox, { checked: welcomeBuilder.showCTA, label: "Show CTA button", onChange: (e) => setWelcomeBuilder((prev) => ({ ...prev, showCTA: e.target.checked })) }), welcomeBuilder.showCTA ? (_jsxs(_Fragment, { children: [_jsx(Input, { label: "CTA text", value: welcomeBuilder.ctaText, onChange: (e) => setWelcomeBuilder((prev) => ({ ...prev, ctaText: e.target.value })) }), _jsx(Input, { label: "CTA link", value: welcomeBuilder.ctaLink, onChange: (e) => setWelcomeBuilder((prev) => ({ ...prev, ctaLink: e.target.value })), placeholder: String(ROUTES.PUBLIC.PRODUCTS) })] })) : null] }));
|
|
754
755
|
}
|
|
755
756
|
function renderTrustIndicatorsBuilder() {
|
|
756
|
-
return (_jsxs(Div, { className: CLS_SECTION_PANEL, children: [_jsx(Text, { size: "sm", weight: "semibold", color: "primary", children: "Trust Indicators Builder" }), _jsx(Input, { label: "Section title", value: trustIndicatorsBuilder.title, onChange: (e) => setTrustIndicatorsBuilder((prev) => ({ ...prev, title: e.target.value })) }), trustIndicatorsBuilder.indicators.map((ind, index) => (_jsxs(Stack, { className: `${__P.p3}`, gap: "sm", rounded: "md", border: "default", children: [_jsxs(Row, { align: "center", justify: "between", children: [_jsxs(Text, { className: "tracking-wide", color: "muted", size: "xs", weight: "semibold", transform: "uppercase", children: ["Indicator ", index + 1] }), _jsx(Button, { type: "button", variant: "ghost", size: "sm", onClick: () => setTrustIndicatorsBuilder((prev) => ({ ...prev, indicators: prev.indicators.filter((_, i) => i !== index) })), children: "Remove" })] }), _jsx(
|
|
757
|
+
return (_jsxs(Div, { className: CLS_SECTION_PANEL, children: [_jsx(Text, { size: "sm", weight: "semibold", color: "primary", children: "Trust Indicators Builder" }), _jsx(Input, { label: "Section title", value: trustIndicatorsBuilder.title, onChange: (e) => setTrustIndicatorsBuilder((prev) => ({ ...prev, title: e.target.value })) }), trustIndicatorsBuilder.indicators.map((ind, index) => (_jsxs(Stack, { className: `${__P.p3}`, gap: "sm", rounded: "md", border: "default", children: [_jsxs(Row, { align: "center", justify: "between", children: [_jsxs(Text, { className: "tracking-wide", color: "muted", size: "xs", weight: "semibold", transform: "uppercase", children: ["Indicator ", index + 1] }), _jsx(Button, { type: "button", variant: "ghost", size: "sm", onClick: () => setTrustIndicatorsBuilder((prev) => ({ ...prev, indicators: prev.indicators.filter((_, i) => i !== index) })), children: "Remove" })] }), _jsxs(Stack, { gap: "xs", children: [_jsx(Text, { color: "muted", size: "xs", weight: "semibold", children: "Icon" }), _jsx(PaginatedSelect, { options: ICON_KEY_OPTIONS, value: ind.icon || null, ariaLabel: `Icon for indicator ${index + 1}`, placeholder: "Choose an icon", onChange: (value) => setTrustIndicatorsBuilder((prev) => { const next = [...prev.indicators]; next[index] = { ...next[index], icon: value ?? "" }; return { ...prev, indicators: next }; }) })] }), _jsx(Input, { label: "Title", value: ind.title, onChange: (e) => setTrustIndicatorsBuilder((prev) => { const next = [...prev.indicators]; next[index] = { ...next[index], title: e.target.value }; return { ...prev, indicators: next }; }) }), _jsx(Input, { label: "Description", value: ind.description, onChange: (e) => setTrustIndicatorsBuilder((prev) => { const next = [...prev.indicators]; next[index] = { ...next[index], description: e.target.value }; return { ...prev, indicators: next }; }) })] }, ind.id))), _jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: () => setTrustIndicatorsBuilder((prev) => ({ ...prev, indicators: [...prev.indicators, { id: `ti-${Date.now()}`, icon: "verify", title: "", description: "" }] })), children: "+ Add indicator" })] }));
|
|
757
758
|
}
|
|
758
759
|
function renderCategoriesBuilder() {
|
|
759
760
|
return (_jsxs(Div, { className: CLS_SECTION_PANEL, children: [_jsx(Text, { size: "sm", weight: "semibold", color: "primary", children: "Categories Section Builder" }), _jsx(Input, { label: "Section title", value: categoriesBuilder.title, onChange: (e) => setCategoriesBuilder((prev) => ({ ...prev, title: e.target.value })) }), _jsx(Input, { label: LBL_VIEW_MORE, value: categoriesBuilder.viewMoreLabel, onChange: (e) => setCategoriesBuilder((prev) => ({ ...prev, viewMoreLabel: e.target.value })), placeholder: PH_VIEW_MORE, helperText: HELP_VIEW_MORE }), _jsx(Input, { label: "Max categories (4\u201312)", type: "number", min: 4, max: 12, value: String(categoriesBuilder.maxCategories), onChange: (e) => setCategoriesBuilder((prev) => ({ ...prev, maxCategories: Math.min(12, Math.max(4, Number(e.target.value) || 4)) })) }), _jsx(Checkbox, { checked: categoriesBuilder.autoScroll, label: "Auto-scroll", onChange: (e) => setCategoriesBuilder((prev) => ({ ...prev, autoScroll: e.target.checked })) }), _jsx(Input, { label: LBL_SCROLL_INTERVAL, type: "number", min: 1000, step: 500, value: String(categoriesBuilder.scrollInterval), onChange: (e) => setCategoriesBuilder((prev) => ({ ...prev, scrollInterval: Math.max(1000, Number(e.target.value) || 1000) })) }), _jsx(Checkbox, { checked: categoriesBuilder.loop, label: "Loop carousel", onChange: (e) => setCategoriesBuilder((prev) => ({ ...prev, loop: e.target.checked })) })] }));
|