@mohasinac/appkit 3.0.3 → 3.0.6

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.
Files changed (402) hide show
  1. package/dist/_internal/client/features/filters/filter-load-options.js +11 -1
  2. package/dist/_internal/client/features/layout/filterNavItems.js +0 -1
  3. package/dist/_internal/client/features/layout/index.js +0 -1
  4. package/dist/_internal/client/features/maintenance/views/MaintenanceDashboardView.js +0 -1
  5. package/dist/_internal/client/features/maintenance/views/ServerErrorDetailView.js +0 -1
  6. package/dist/_internal/server/features/auctions/data.d.ts +2 -4
  7. package/dist/_internal/server/features/auctions/data.js +3 -9
  8. package/dist/_internal/server/features/checkout/actions.js +9 -9
  9. package/dist/_internal/server/features/classified/adapters.d.ts +2 -15
  10. package/dist/_internal/server/features/classified/adapters.js +2 -17
  11. package/dist/_internal/server/features/classified/data.d.ts +1 -6
  12. package/dist/_internal/server/features/classified/data.js +2 -10
  13. package/dist/_internal/server/features/digital-code/adapters.d.ts +2 -15
  14. package/dist/_internal/server/features/digital-code/adapters.js +2 -17
  15. package/dist/_internal/server/features/digital-code/data.d.ts +1 -6
  16. package/dist/_internal/server/features/digital-code/data.js +2 -10
  17. package/dist/_internal/server/features/live/adapters.d.ts +2 -15
  18. package/dist/_internal/server/features/live/adapters.js +2 -17
  19. package/dist/_internal/server/features/live/data.d.ts +1 -6
  20. package/dist/_internal/server/features/live/data.js +2 -10
  21. package/dist/_internal/server/features/pre-orders/data.d.ts +2 -4
  22. package/dist/_internal/server/features/pre-orders/data.js +3 -9
  23. package/dist/_internal/server/features/prize-draws/actions.d.ts +2 -0
  24. package/dist/_internal/server/features/prize-draws/actions.js +22 -0
  25. package/dist/_internal/server/features/prize-draws/data.d.ts +1 -17
  26. package/dist/_internal/server/features/prize-draws/data.js +2 -20
  27. package/dist/_internal/server/features/prize-draws/index.d.ts +3 -1
  28. package/dist/_internal/server/features/prize-draws/index.js +2 -0
  29. package/dist/_internal/server/features/prize-draws/service.d.ts +3 -0
  30. package/dist/_internal/server/features/prize-draws/service.js +19 -0
  31. package/dist/_internal/server/features/shared/listing-adapters.d.ts +19 -0
  32. package/dist/_internal/server/features/shared/listing-adapters.js +20 -0
  33. package/dist/_internal/server/features/shared/listing-data-factory.d.ts +9 -0
  34. package/dist/_internal/server/features/shared/listing-data-factory.js +33 -0
  35. package/dist/_internal/server/features/stores/data.d.ts +3 -14
  36. package/dist/_internal/server/features/stores/data.js +6 -44
  37. package/dist/_internal/server/jobs/core/cleanupRtdbEvents.js +1 -1
  38. package/dist/_internal/shared/features/cart/schema.d.ts +8 -8
  39. package/dist/_internal/shared/features/cart/schema.js +3 -0
  40. package/dist/_internal/shared/listing-types/_registry.js +2 -0
  41. package/dist/_internal/shared/listing-types/action-tracker.js +1 -1
  42. package/dist/_internal/shared/listing-types/auction/schema.d.ts +3 -1
  43. package/dist/_internal/shared/listing-types/auction/schema.js +7 -1
  44. package/dist/_internal/shared/listing-types/classified/schema.d.ts +2 -1
  45. package/dist/_internal/shared/listing-types/classified/schema.js +3 -1
  46. package/dist/_internal/shared/listing-types/digital-code/schema.d.ts +3 -1
  47. package/dist/_internal/shared/listing-types/digital-code/schema.js +7 -1
  48. package/dist/_internal/shared/listing-types/live/schema.d.ts +2 -1
  49. package/dist/_internal/shared/listing-types/live/schema.js +3 -1
  50. package/dist/_internal/shared/listing-types/pre-order/schema.d.ts +3 -1
  51. package/dist/_internal/shared/listing-types/pre-order/schema.js +7 -1
  52. package/dist/_internal/shared/listing-types/prize-draw/schema.d.ts +3 -1
  53. package/dist/_internal/shared/listing-types/prize-draw/schema.js +13 -1
  54. package/dist/_internal/shared/listing-types/standard/schema.d.ts +2 -1
  55. package/dist/_internal/shared/listing-types/standard/schema.js +4 -1
  56. package/dist/_internal/shared/types/base-document.d.ts +15 -0
  57. package/dist/_internal/shared/types/base-document.js +1 -0
  58. package/dist/_internal/shared/types/index.d.ts +2 -0
  59. package/dist/_internal/shared/types/index.js +1 -0
  60. package/dist/client/api/ApiError.d.ts +10 -4
  61. package/dist/client/api/surface-error.js +0 -1
  62. package/dist/client.d.ts +8 -4
  63. package/dist/client.js +4 -2
  64. package/dist/constants/api-endpoints.d.ts +12 -0
  65. package/dist/constants/api-endpoints.js +4 -0
  66. package/dist/core/hooks/useSyncManager.js +4 -4
  67. package/dist/features/_guide-cls.d.ts +1 -1
  68. package/dist/features/_guide-cls.js +1 -1
  69. package/dist/features/about/components/AboutView.js +1 -4
  70. package/dist/features/about/components/FAQPageView.js +1 -1
  71. package/dist/features/about/components/FeesView.js +1 -1
  72. package/dist/features/about/components/HelpPageView.js +1 -1
  73. package/dist/features/about/components/HowOrdersWorkView.js +1 -1
  74. package/dist/features/about/components/PublicProfileView.js +6 -6
  75. package/dist/features/about/components/TrackOrderView.js +1 -1
  76. package/dist/features/account/components/AddressBook.js +1 -1
  77. package/dist/features/account/components/AddressForm.js +10 -2
  78. package/dist/features/account/components/AddressesIndexListing.js +1 -1
  79. package/dist/features/account/components/BuyerAccountGuideView.js +1 -1
  80. package/dist/features/account/components/BuyerAuctionsGuideView.js +1 -1
  81. package/dist/features/account/components/BuyerOrdersGuideView.js +1 -1
  82. package/dist/features/account/components/BuyerShoppingGuideView.js +1 -1
  83. package/dist/features/account/components/ChatWindow.js +1 -1
  84. package/dist/features/account/components/MessagesView.js +1 -1
  85. package/dist/features/account/components/NotificationBell.js +25 -10
  86. package/dist/features/account/components/NotificationPreferencesPanel.js +2 -2
  87. package/dist/features/account/components/UserOffersPanel.js +1 -0
  88. package/dist/features/account/components/UserSidebar.js +1 -6
  89. package/dist/features/account/components/UserSupportView.js +1 -1
  90. package/dist/features/addresses/schemas/firestore.d.ts +2 -4
  91. package/dist/features/admin/components/AdminAnalyticsGuideView.js +2 -2
  92. package/dist/features/admin/components/AdminBlogEditorView.js +1 -1
  93. package/dist/features/admin/components/AdminBundlesView.js +1 -1
  94. package/dist/features/admin/components/AdminCarouselEditorView.js +1 -1
  95. package/dist/features/admin/components/AdminCatalogGuideView.js +2 -2
  96. package/dist/features/admin/components/AdminContentGuideView.js +2 -2
  97. package/dist/features/admin/components/AdminEmployeeEditorView.js +2 -2
  98. package/dist/features/admin/components/AdminFulfillmentView.d.ts +6 -0
  99. package/dist/features/admin/components/AdminFulfillmentView.js +107 -0
  100. package/dist/features/admin/components/AdminGuideHubView.js +1 -5
  101. package/dist/features/admin/components/AdminMediaView.js +1 -1
  102. package/dist/features/admin/components/AdminNavigationView.js +1 -1
  103. package/dist/features/admin/components/AdminOrdersGuideView.js +3 -3
  104. package/dist/features/admin/components/AdminPayoutsView.js +1 -4
  105. package/dist/features/admin/components/AdminProductEditorView.js +21 -9
  106. package/dist/features/admin/components/AdminProductsView.js +3 -0
  107. package/dist/features/admin/components/AdminSidebar.js +1 -6
  108. package/dist/features/admin/components/AdminSiteConfigGuideView.js +1 -1
  109. package/dist/features/admin/components/AdminSiteSettingsView.js +9 -1
  110. package/dist/features/admin/components/AdminStoreEditorView.js +1 -1
  111. package/dist/features/admin/components/AdminStoresGuideView.js +2 -2
  112. package/dist/features/admin/components/AdminSupportTicketDetailView.js +7 -7
  113. package/dist/features/admin/components/AdminTeamGuideView.js +2 -2
  114. package/dist/features/admin/components/AdminTrustGuideView.js +3 -3
  115. package/dist/features/admin/components/AdminUsersGuideView.js +3 -3
  116. package/dist/features/admin/components/DashboardStats.js +6 -5
  117. package/dist/features/admin/components/DataListingView.d.ts +1 -0
  118. package/dist/features/admin/components/DataTable.js +2 -2
  119. package/dist/features/admin/components/analytics/AdminAnalyticsCharts.js +4 -6
  120. package/dist/features/admin/components/analytics/AdminStatCard.js +4 -3
  121. package/dist/features/admin/components/analytics/AdminTopProductsTable.js +1 -1
  122. package/dist/features/admin/components/index.d.ts +2 -0
  123. package/dist/features/admin/components/index.js +1 -0
  124. package/dist/features/admin/schemas/firestore.d.ts +3 -8
  125. package/dist/features/auctions/components/AuctionBidsTable.js +1 -1
  126. package/dist/features/auctions/components/AuctionDetailPageView.js +1 -1
  127. package/dist/features/auctions/components/MarketplaceAuctionCard.js +3 -3
  128. package/dist/features/auctions/schemas/firestore.d.ts +2 -4
  129. package/dist/features/auctions/schemas/index.d.ts +2 -2
  130. package/dist/features/auth/components/ForgotPasswordView.js +19 -8
  131. package/dist/features/auth/components/LoginForm.js +10 -2
  132. package/dist/features/auth/components/RegisterForm.js +10 -2
  133. package/dist/features/auth/components/ResetPasswordView.js +19 -8
  134. package/dist/features/auth/components/SocialAuthButtons.js +1 -1
  135. package/dist/features/before-after/components/BeforeAfterSlider.js +1 -1
  136. package/dist/features/before-after/schemas/index.d.ts +2 -2
  137. package/dist/features/blog/api/[slug]/route.js +1 -1
  138. package/dist/features/blog/components/BlogFeaturedCard.js +1 -1
  139. package/dist/features/blog/components/BlogListView.js +1 -1
  140. package/dist/features/blog/components/BlogPostView.js +1 -1
  141. package/dist/features/blog/schemas/firestore.d.ts +2 -4
  142. package/dist/features/blog/schemas/index.d.ts +6 -6
  143. package/dist/features/cart/components/CartDrawer.js +2 -2
  144. package/dist/features/cart/components/CartView.js +1 -1
  145. package/dist/features/cart/components/CheckoutView.js +1 -1
  146. package/dist/features/cart/schemas/firestore.d.ts +2 -4
  147. package/dist/features/categories/components/BrandDetailPageView.js +2 -1
  148. package/dist/features/categories/components/BundleDetailView.js +1 -1
  149. package/dist/features/categories/components/BundleItemsPicker.js +1 -1
  150. package/dist/features/categories/components/CategoryBundlesListing.js +3 -1
  151. package/dist/features/categories/components/CategoryDetailPageView.js +1 -1
  152. package/dist/features/categories/components/CategoryGrid.js +2 -1
  153. package/dist/features/categories/components/CategoryTableColumns.js +5 -2
  154. package/dist/features/categories/components/CategoryTree.js +3 -2
  155. package/dist/features/categories/components/ConcernCard.js +1 -1
  156. package/dist/features/categories/schemas/firestore.d.ts +2 -4
  157. package/dist/features/categories/schemas/index.d.ts +6 -6
  158. package/dist/features/checkout/components/CheckoutStepper.js +1 -1
  159. package/dist/features/collections/components/CollectionCard.js +1 -1
  160. package/dist/features/contact/components/ContactPageView.js +27 -27
  161. package/dist/features/contact/email.js +4 -4
  162. package/dist/features/copilot/components/AdminCopilotView.js +3 -3
  163. package/dist/features/email/primitives.d.ts +4 -0
  164. package/dist/features/email/primitives.js +4 -0
  165. package/dist/features/events/components/EventCard.js +2 -2
  166. package/dist/features/events/components/EventOfferCard.js +1 -1
  167. package/dist/features/events/components/EventRaffleEntryForm.js +1 -1
  168. package/dist/features/events/components/EventRaffleWinnerView.js +2 -2
  169. package/dist/features/events/components/EventSaleBanner.js +0 -1
  170. package/dist/features/events/schemas/firestore.d.ts +2 -4
  171. package/dist/features/events/schemas/index.d.ts +4 -4
  172. package/dist/features/faq/components/ContactCTA.js +1 -1
  173. package/dist/features/faq/components/FAQAccordion.js +2 -2
  174. package/dist/features/faq/components/FAQCategorySidebar.js +2 -2
  175. package/dist/features/faq/components/FAQHelpfulButtons.js +2 -2
  176. package/dist/features/faq/components/RelatedFAQs.js +1 -1
  177. package/dist/features/faq/schemas/firestore.d.ts +2 -4
  178. package/dist/features/faq/schemas/index.d.ts +4 -4
  179. package/dist/features/filters/AsyncFacetSection.js +3 -3
  180. package/dist/features/filters/FilterFacetSection.js +6 -6
  181. package/dist/features/filters/RangeFilter.js +2 -2
  182. package/dist/features/filters/SwitchFilter.js +1 -1
  183. package/dist/features/forms/Checkbox.js +1 -1
  184. package/dist/features/forms/Slider.js +7 -2
  185. package/dist/features/forms/utils.d.ts +2 -2
  186. package/dist/features/forms/utils.js +2 -2
  187. package/dist/features/grouped/schemas/index.d.ts +2 -2
  188. package/dist/features/history/hooks/useHistory.js +1 -1
  189. package/dist/features/homepage/components/AdSlot.js +3 -3
  190. package/dist/features/homepage/components/AdvertisementBanner.js +5 -4
  191. package/dist/features/homepage/components/BeforeAfterCard.js +9 -1
  192. package/dist/features/homepage/components/CharacterHotspot.js +42 -49
  193. package/dist/features/homepage/components/CharacterHotspotForm.js +18 -20
  194. package/dist/features/homepage/components/CollectionCardsSection.js +2 -2
  195. package/dist/features/homepage/components/CustomCardsSection.js +3 -6
  196. package/dist/features/homepage/components/CustomerReviewsSection.js +1 -1
  197. package/dist/features/homepage/components/FAQSection.js +2 -2
  198. package/dist/features/homepage/components/FeaturedResultsSection.js +1 -1
  199. package/dist/features/homepage/components/GoogleReviewsSection.js +4 -4
  200. package/dist/features/homepage/components/HeroBanner.js +12 -63
  201. package/dist/features/homepage/components/HeroCarousel.js +6 -6
  202. package/dist/features/homepage/components/HeroSection.js +1 -1
  203. package/dist/features/homepage/components/HowItWorksInfoView.js +1 -1
  204. package/dist/features/homepage/components/HowItWorksSection.js +5 -3
  205. package/dist/features/homepage/components/NewsletterBanner.js +3 -7
  206. package/dist/features/homepage/components/PromoGrid.js +2 -26
  207. package/dist/features/homepage/components/SectionCarousel.js +1 -1
  208. package/dist/features/homepage/components/SecurityHighlightsSection.js +6 -3
  209. package/dist/features/homepage/components/ShopByCategorySection.js +3 -3
  210. package/dist/features/homepage/components/SiteFeaturesSection.js +1 -1
  211. package/dist/features/homepage/components/SocialPostCard.js +2 -3
  212. package/dist/features/homepage/components/StatsCounterSection.js +6 -3
  213. package/dist/features/homepage/components/TestimonialsCarousel.js +2 -25
  214. package/dist/features/homepage/components/TrustBadges.js +1 -9
  215. package/dist/features/homepage/components/TrustFeaturesSection.js +6 -3
  216. package/dist/features/homepage/components/TrustIndicatorsSection.js +1 -1
  217. package/dist/features/homepage/components/WelcomeSection.js +2 -2
  218. package/dist/features/homepage/components/WhatsAppCommunitySection.js +1 -1
  219. package/dist/features/homepage/lib/franchise-colors.d.ts +7 -0
  220. package/dist/features/homepage/lib/franchise-colors.js +7 -0
  221. package/dist/features/homepage/lib/live-stats.js +5 -5
  222. package/dist/features/homepage/schemas/firestore.d.ts +4 -12
  223. package/dist/features/homepage/schemas/index.d.ts +2 -2
  224. package/dist/features/layout/AppLayoutShell.js +7 -9
  225. package/dist/features/layout/BottomNavbar.js +1 -2
  226. package/dist/features/messages/hooks/useConversation.js +2 -1
  227. package/dist/features/messages/hooks/useConversations.js +1 -0
  228. package/dist/features/messages/schemas/firestore.d.ts +2 -4
  229. package/dist/features/messages/schemas/index.d.ts +2 -2
  230. package/dist/features/orders/components/OrdersList.js +1 -1
  231. package/dist/features/orders/components/RefundHistoryTable.d.ts +6 -0
  232. package/dist/features/orders/components/RefundHistoryTable.js +3 -2
  233. package/dist/features/orders/repository/orders.repository.d.ts +5 -0
  234. package/dist/features/orders/repository/orders.repository.js +26 -0
  235. package/dist/features/orders/schemas/firestore.d.ts +9 -5
  236. package/dist/features/orders/schemas/firestore.js +3 -0
  237. package/dist/features/payments/schemas/firestore.d.ts +2 -4
  238. package/dist/features/pre-orders/components/MarketplacePreorderCard.js +2 -2
  239. package/dist/features/pre-orders/components/PreOrderBadge.js +1 -1
  240. package/dist/features/pre-orders/components/PreOrderDetailPageView.js +2 -1
  241. package/dist/features/pre-orders/schemas/index.d.ts +2 -2
  242. package/dist/features/products/components/CompareOverlay.js +11 -8
  243. package/dist/features/products/components/CustomSectionTabContent.js +1 -1
  244. package/dist/features/products/components/FeatureBadge.js +11 -1
  245. package/dist/features/products/components/GroupSettingsPanel.js +2 -2
  246. package/dist/features/products/components/MarketplaceBundleCard.js +1 -1
  247. package/dist/features/products/components/MarketplacePrizeDrawCard.js +2 -2
  248. package/dist/features/products/components/PrizeDrawItemsEditor.js +1 -1
  249. package/dist/features/products/components/PrizeDrawsIndexListing.js +1 -1
  250. package/dist/features/products/components/ProductCardMetadataSection.js +0 -1
  251. package/dist/features/products/components/ProductDetailPageView.js +1 -1
  252. package/dist/features/products/components/ProductFeatureBadges.js +1 -1
  253. package/dist/features/products/components/ProductGalleryClient.js +1 -1
  254. package/dist/features/products/components/ProductGrid.js +7 -7
  255. package/dist/features/products/components/ShareButton.js +1 -1
  256. package/dist/features/products/components/ShowGroupSection.js +7 -5
  257. package/dist/features/products/components/SublistingCarouselSection.js +2 -2
  258. package/dist/features/products/constants/action-defs.d.ts +16 -0
  259. package/dist/features/products/constants/action-defs.js +16 -0
  260. package/dist/features/products/constants/listing-tabs.d.ts +48 -0
  261. package/dist/features/products/constants/listing-tabs.js +12 -0
  262. package/dist/features/products/repository/products.repository.d.ts +37 -0
  263. package/dist/features/products/repository/products.repository.js +28 -1
  264. package/dist/features/products/schemas/firestore.d.ts +8 -6
  265. package/dist/features/products/schemas/firestore.js +2 -0
  266. package/dist/features/products/schemas/index.d.ts +8 -8
  267. package/dist/features/products/types/index.d.ts +2 -0
  268. package/dist/features/promotions/components/CouponCard.js +2 -2
  269. package/dist/features/promotions/schemas/firestore.d.ts +2 -4
  270. package/dist/features/promotions/schemas/index.d.ts +6 -6
  271. package/dist/features/reviews/components/ReviewDetailShell.js +3 -3
  272. package/dist/features/reviews/components/ReviewModal.js +2 -4
  273. package/dist/features/reviews/components/ReviewSummary.js +3 -2
  274. package/dist/features/reviews/components/ReviewsList.js +1 -1
  275. package/dist/features/reviews/schemas/firestore.d.ts +2 -4
  276. package/dist/features/reviews/schemas/index.d.ts +2 -2
  277. package/dist/features/scams/actions/scam-actions.js +1 -1
  278. package/dist/features/scams/components/ScamProfileView.js +1 -1
  279. package/dist/features/scams/schemas/firestore.d.ts +2 -4
  280. package/dist/features/scams/schemas/index.d.ts +4 -4
  281. package/dist/features/search/components/Search.js +2 -2
  282. package/dist/features/search/components/SearchFiltersRow.js +1 -1
  283. package/dist/features/search/schemas/index.d.ts +3 -3
  284. package/dist/features/seller/components/BarcodeField.d.ts +17 -0
  285. package/dist/features/seller/components/BarcodeField.js +30 -0
  286. package/dist/features/seller/components/FulfillmentView.d.ts +5 -0
  287. package/dist/features/seller/components/FulfillmentView.js +120 -0
  288. package/dist/features/seller/components/PhysicalLocationModal.js +2 -3
  289. package/dist/features/seller/components/PrintCenterView.d.ts +3 -1
  290. package/dist/features/seller/components/PrintCenterView.js +52 -4
  291. package/dist/features/seller/components/SellerAddressesView.js +2 -1
  292. package/dist/features/seller/components/SellerAnalyticsAlertsView.js +1 -1
  293. package/dist/features/seller/components/SellerBidsView.js +1 -1
  294. package/dist/features/seller/components/SellerCouponEditorView.js +1 -1
  295. package/dist/features/seller/components/SellerGoogleReviewsView.js +1 -1
  296. package/dist/features/seller/components/SellerLiveView.js +1 -1
  297. package/dist/features/seller/components/SellerOffersPanel.js +1 -0
  298. package/dist/features/seller/components/SellerOrdersView.js +1 -1
  299. package/dist/features/seller/components/SellerPayoutMethodsView.js +8 -2
  300. package/dist/features/seller/components/SellerPayoutRequestView.js +1 -1
  301. package/dist/features/seller/components/SellerPayoutSettingsView.js +1 -1
  302. package/dist/features/seller/components/SellerProductShell.d.ts +2 -0
  303. package/dist/features/seller/components/SellerProductShell.js +4 -3
  304. package/dist/features/seller/components/SellerProductsCards.js +1 -1
  305. package/dist/features/seller/components/SellerProductsView.js +1 -1
  306. package/dist/features/seller/components/SellerReviewsView.js +2 -1
  307. package/dist/features/seller/components/SellerShippingConfigsView.js +9 -3
  308. package/dist/features/seller/components/SellerShippingView.js +1 -1
  309. package/dist/features/seller/components/SellerSidebar.js +3 -8
  310. package/dist/features/seller/components/SellerStoreCategoriesView.js +11 -3
  311. package/dist/features/seller/components/SellerTemplatesView.js +8 -2
  312. package/dist/features/seller/components/analytics/SellerRevenueChart.js +1 -1
  313. package/dist/features/seller/components/analytics/SellerTopProducts.js +1 -1
  314. package/dist/features/seller/components/index.d.ts +4 -0
  315. package/dist/features/seller/components/index.js +2 -0
  316. package/dist/features/seller/schemas/index.d.ts +4 -4
  317. package/dist/features/shell/FormShell.js +2 -2
  318. package/dist/features/shell/QuickFormDrawer.js +1 -1
  319. package/dist/features/site-settings/components/NavPermissionsManager.js +1 -1
  320. package/dist/features/store-extensions/schemas/firestore.d.ts +12 -44
  321. package/dist/features/stores/components/StoreCapabilitiesGuideView.js +1 -1
  322. package/dist/features/stores/components/StoreClassifiedsListing.d.ts +5 -0
  323. package/dist/features/stores/components/StoreClassifiedsListing.js +48 -0
  324. package/dist/features/stores/components/StoreClassifiedsPageView.d.ts +4 -0
  325. package/dist/features/stores/components/StoreClassifiedsPageView.js +20 -0
  326. package/dist/features/stores/components/StoreDetailLayoutView.js +23 -2
  327. package/dist/features/stores/components/StoreDigitalCodesListing.d.ts +5 -0
  328. package/dist/features/stores/components/StoreDigitalCodesListing.js +48 -0
  329. package/dist/features/stores/components/StoreDigitalCodesPageView.d.ts +4 -0
  330. package/dist/features/stores/components/StoreDigitalCodesPageView.js +20 -0
  331. package/dist/features/stores/components/StoreGuideHubView.js +2 -9
  332. package/dist/features/stores/components/StoreHeader.js +1 -1
  333. package/dist/features/stores/components/StoreListingsGuideView.js +4 -4
  334. package/dist/features/stores/components/StoreLiveItemsListing.d.ts +5 -0
  335. package/dist/features/stores/components/StoreLiveItemsListing.js +48 -0
  336. package/dist/features/stores/components/StoreLiveItemsPageView.d.ts +4 -0
  337. package/dist/features/stores/components/StoreLiveItemsPageView.js +20 -0
  338. package/dist/features/stores/components/StoreOrdersGuideView.js +2 -2
  339. package/dist/features/stores/components/StoresIndexListing.js +1 -1
  340. package/dist/features/stores/components/index.d.ts +9 -0
  341. package/dist/features/stores/components/index.js +3 -0
  342. package/dist/features/stores/schemas/firestore.d.ts +2 -4
  343. package/dist/features/stores/schemas/index.d.ts +4 -4
  344. package/dist/features/support/schemas/firestore.d.ts +2 -4
  345. package/dist/features/support/schemas/index.d.ts +2 -2
  346. package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +2 -2
  347. package/dist/features/wishlist/components/WishlistPage.js +1 -1
  348. package/dist/features/wishlist/components/WishlistToggleButton.js +3 -3
  349. package/dist/features/wishlist/hooks/useWishlistCount.js +1 -1
  350. package/dist/http/ApiClient.d.ts +1 -0
  351. package/dist/http/ApiClient.js +20 -0
  352. package/dist/monitoring/error-tracking.d.ts +0 -3
  353. package/dist/monitoring/error-tracking.js +1 -1
  354. package/dist/monitoring/server-logger.js +3 -3
  355. package/dist/next/components/GlobalError.js +1 -1
  356. package/dist/next/routing/route-map.d.ts +11 -0
  357. package/dist/next/routing/route-map.js +5 -0
  358. package/dist/react/ErrorBoundary.js +1 -1
  359. package/dist/schemas/registry.d.ts +24 -24
  360. package/dist/seed/grouped-listings-seed-data.d.ts +2 -1
  361. package/dist/seed/products-preorders-seed-data.d.ts +2 -1
  362. package/dist/seed/products-standard-seed-data.js +8 -0
  363. package/dist/server-entry.d.ts +3 -0
  364. package/dist/server-entry.js +3 -0
  365. package/dist/server.d.ts +4 -4
  366. package/dist/styles.css +45 -7
  367. package/dist/tailwind-utilities.css +1 -1
  368. package/dist/tokens/themes/default-light.js +3 -0
  369. package/dist/tokens/tokens.css +43 -6
  370. package/dist/ui/components/Anchor.d.ts +8 -1
  371. package/dist/ui/components/Anchor.js +16 -2
  372. package/dist/ui/components/Button.d.ts +5 -2
  373. package/dist/ui/components/Button.js +5 -2
  374. package/dist/ui/components/Details.d.ts +33 -2
  375. package/dist/ui/components/Details.js +73 -4
  376. package/dist/ui/components/Div.d.ts +3 -0
  377. package/dist/ui/components/Div.js +12 -1
  378. package/dist/ui/components/DynamicBgDiv.d.ts +13 -0
  379. package/dist/ui/components/DynamicBgDiv.js +18 -0
  380. package/dist/ui/components/Form.d.ts +3 -19
  381. package/dist/ui/components/Form.js +8 -1
  382. package/dist/ui/components/Layout.d.ts +12 -1
  383. package/dist/ui/components/Layout.js +9 -1
  384. package/dist/ui/components/Progress.d.ts +1 -1
  385. package/dist/ui/components/Progress.js +1 -0
  386. package/dist/ui/components/Progress.style.css +1 -0
  387. package/dist/ui/components/ProgressBarFill.d.ts +6 -0
  388. package/dist/ui/components/ProgressBarFill.js +11 -0
  389. package/dist/ui/components/Semantic.d.ts +26 -7
  390. package/dist/ui/components/Semantic.js +33 -8
  391. package/dist/ui/components/TextLink.d.ts +36 -1
  392. package/dist/ui/components/TextLink.js +30 -2
  393. package/dist/ui/components/Typography.d.ts +26 -6
  394. package/dist/ui/components/Typography.js +37 -13
  395. package/dist/ui/components/VacationBanner.js +0 -1
  396. package/dist/ui/components/surface-tokens.d.ts +12 -2
  397. package/dist/ui/components/surface-tokens.js +19 -1
  398. package/dist/ui/rich-text/RichText.js +1 -1
  399. package/dist/utils/id-generators.d.ts +8 -0
  400. package/dist/utils/id-generators.js +14 -0
  401. package/dist/validation/schemas.d.ts +1 -1
  402. package/package.json +2 -1
@@ -13,7 +13,7 @@ const Tooltip = dynamic(() => import("recharts").then((m) => m.Tooltip), { ssr:
13
13
  const ResponsiveContainer = dynamic(() => import("recharts").then((m) => m.ResponsiveContainer), { ssr: false });
14
14
  export function SellerRevenueChart({ data, labels = {}, formatRevenue = (amount) => String(amount), className = "", }) {
15
15
  const hasRevenue = data.some((item) => item.revenue > 0);
16
- return (_jsxs(Div, { className: `border border-neutral-200 dark:border-neutral-800 sm:p-6 ${className}`, rounded: "xl", padding: "md", surface: "default", children: [labels.title && (_jsx(Heading, { level: 3, className: "mb-4", size: "base", weight: "semibold", children: labels.title })), hasRevenue ? (_jsx(Div, { className: "h-[300px]", children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", children: _jsxs(BarChart, { data: data, children: [_jsx(CartesianGrid, { strokeDasharray: "3 3", strokeOpacity: 0.3 }), _jsx(XAxis, { dataKey: "month", tick: { fontSize: 11, fill: "currentColor" }, tickLine: false, axisLine: false }), _jsx(YAxis, { tick: { fontSize: 11, fill: "currentColor" }, tickLine: false, axisLine: false, tickFormatter: (value) => formatRevenue(Number(value)) }), _jsx(Tooltip, { formatter: (value) => [
16
+ return (_jsxs(Div, { className: `border border-neutral-200 dark:border-neutral-800 sm:p-[1.5rem] ${className}`, rounded: "xl", padding: "md", surface: "default", children: [labels.title && (_jsx(Heading, { level: 3, className: "mb-4", size: "base", weight: "semibold", children: labels.title })), hasRevenue ? (_jsx(Div, { className: "h-[300px]", children: _jsx(ResponsiveContainer, { width: "100%", height: "100%", children: _jsxs(BarChart, { data: data, children: [_jsx(CartesianGrid, { strokeDasharray: "3 3", strokeOpacity: 0.3 }), _jsx(XAxis, { dataKey: "month", tick: { fontSize: 11, fill: "currentColor" }, tickLine: false, axisLine: false }), _jsx(YAxis, { tick: { fontSize: 11, fill: "currentColor" }, tickLine: false, axisLine: false, tickFormatter: (value) => formatRevenue(Number(value)) }), _jsx(Tooltip, { formatter: (value) => [
17
17
  formatRevenue(Number(value)),
18
18
  labels.revenueLabel ?? "Revenue",
19
19
  ] }), _jsx(Bar, { dataKey: "revenue", fill: "var(--appkit-color-primary)", radius: [4, 4, 0, 0] })] }) }) })) : (_jsx(Text, { paddingY: "xl", color: "muted", size: "sm", align: "center", children: labels.noData ?? "No data available" }))] }));
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Div, Heading, Row, Span, Text } from "../../../../ui";
3
3
  export function SellerTopProducts({ products, labels = {}, formatRevenue = (amount) => String(amount), renderProductLink, renderEmptyAction, className = "", }) {
4
- return (_jsxs(Div, { className: `border border-neutral-200 dark:border-neutral-800 sm:p-6 ${className}`, rounded: "xl", padding: "md", surface: "default", children: [labels.title && (_jsx(Heading, { level: 3, className: "mb-4", size: "base", weight: "semibold", children: labels.title })), products.length > 0 ? (_jsx(Div, { className: "divide-y divide-neutral-100 dark:divide-neutral-800", children: products.map((product, index) => (_jsxs(Row, { align: "center", gap: "md", padding: "y-sm", children: [_jsxs(Span, { size: "sm", weight: "bold", className: "w-6", color: "muted", children: [index + 1, "."] }), _jsxs(Div, { className: "flex-1 min-w-0", children: [_jsx(Text, { className: "truncate", size: "sm", weight: "medium", children: product.title }), _jsxs(Text, { size: "xs", color: "muted", children: [product.orders, " ", labels.ordersLabel ?? "orders"] })] }), _jsxs(Div, { className: "text-right ml-2", children: [_jsx(Span, { size: "sm", weight: "semibold", className: "text-success", children: formatRevenue(product.revenue) }), renderProductLink?.(product)] })] }, product.productId))) })) : (_jsxs(Div, { className: "text-center", padding: "y-xl", children: [_jsx(Text, { size: "sm", weight: "medium", children: labels.noData ?? "No data available" }), labels.noDataDescription && (_jsx(Text, { className: "mt-1", color: "muted", size: "xs", children: labels.noDataDescription })), renderEmptyAction?.()] }))] }));
4
+ return (_jsxs(Div, { className: `border border-neutral-200 dark:border-neutral-800 sm:p-[1.5rem] ${className}`, rounded: "xl", padding: "md", surface: "default", children: [labels.title && (_jsx(Heading, { level: 3, className: "mb-4", size: "base", weight: "semibold", children: labels.title })), products.length > 0 ? (_jsx(Div, { className: "divide-y divide-neutral-100 dark:divide-neutral-800", children: products.map((product, index) => (_jsxs(Row, { align: "center", gap: "md", padding: "y-sm", children: [_jsxs(Span, { size: "sm", weight: "bold", className: "w-6", color: "muted", children: [index + 1, "."] }), _jsxs(Div, { className: "flex-1 min-w-0", children: [_jsx(Text, { className: "truncate", size: "sm", weight: "medium", children: product.title }), _jsxs(Text, { size: "xs", color: "muted", children: [product.orders, " ", labels.ordersLabel ?? "orders"] })] }), _jsxs(Div, { className: "text-right ml-2", children: [_jsx(Span, { size: "sm", weight: "semibold", className: "text-success", children: formatRevenue(product.revenue) }), renderProductLink?.(product)] })] }, product.productId))) })) : (_jsxs(Div, { className: "text-center", padding: "y-xl", children: [_jsx(Text, { size: "sm", weight: "medium", children: labels.noData ?? "No data available" }), labels.noDataDescription && (_jsx(Text, { className: "mt-1", color: "muted", size: "xs", children: labels.noDataDescription })), renderEmptyAction?.()] }))] }));
5
5
  }
@@ -128,3 +128,7 @@ export { SellerDigitalCodesView } from "./SellerDigitalCodesView";
128
128
  export type { SellerDigitalCodesViewProps } from "./SellerDigitalCodesView";
129
129
  export { SellerLiveView } from "./SellerLiveView";
130
130
  export type { SellerLiveViewProps } from "./SellerLiveView";
131
+ export { BarcodeField } from "./BarcodeField";
132
+ export type { BarcodeFieldProps } from "./BarcodeField";
133
+ export { FulfillmentView } from "./FulfillmentView";
134
+ export type { FulfillmentViewProps } from "./FulfillmentView";
@@ -67,3 +67,5 @@ export { SellerBundlesView } from "./SellerBundlesView";
67
67
  export { SellerClassifiedView } from "./SellerClassifiedView";
68
68
  export { SellerDigitalCodesView } from "./SellerDigitalCodesView";
69
69
  export { SellerLiveView } from "./SellerLiveView";
70
+ export { BarcodeField } from "./BarcodeField";
71
+ export { FulfillmentView } from "./FulfillmentView";
@@ -87,8 +87,8 @@ export declare const sellerStoreSchema: z.ZodObject<{
87
87
  }, "strip", z.ZodTypeAny, {
88
88
  status: "pending" | "active" | "rejected" | "suspended";
89
89
  createdAt: string;
90
- id: string;
91
90
  storeName: string;
91
+ id: string;
92
92
  updatedAt: string;
93
93
  isPublic: boolean;
94
94
  storeSlug: string;
@@ -119,8 +119,8 @@ export declare const sellerStoreSchema: z.ZodObject<{
119
119
  }, {
120
120
  status: "pending" | "active" | "rejected" | "suspended";
121
121
  createdAt: string;
122
- id: string;
123
122
  storeName: string;
123
+ id: string;
124
124
  updatedAt: string;
125
125
  isPublic: boolean;
126
126
  storeSlug: string;
@@ -212,15 +212,15 @@ export declare const sellerListParamsSchema: z.ZodObject<{
212
212
  status?: "pending" | "active" | "rejected" | "suspended" | undefined;
213
213
  sort?: string | undefined;
214
214
  category?: string | undefined;
215
- q?: string | undefined;
216
215
  page?: number | undefined;
216
+ q?: string | undefined;
217
217
  perPage?: number | undefined;
218
218
  }, {
219
219
  status?: "pending" | "active" | "rejected" | "suspended" | undefined;
220
220
  sort?: string | undefined;
221
221
  category?: string | undefined;
222
- q?: string | undefined;
223
222
  page?: number | undefined;
223
+ q?: string | undefined;
224
224
  perPage?: number | undefined;
225
225
  }>;
226
226
  export declare const payoutListParamsSchema: z.ZodObject<{
@@ -115,8 +115,8 @@ schema: _schema, isDirty = false, isLoading = false, sections, onSaveDraft, onPu
115
115
  };
116
116
  if (!isOpen)
117
117
  return null;
118
- return (_jsxs(_Fragment, { children: [_jsx(Div, { surface: "overlay-sm", className: "fixed inset-0 backdrop-blur-[2px]", style: { zIndex: "calc(var(--appkit-z-modal) - 1)" }, "aria-hidden": "true", onClick: attemptClose }), _jsxs(Div, { layout: "flex", ref: panelRef, role: "dialog", "aria-modal": "true", "aria-label": title, className: "fixed top-0 bottom-0 left-0 right-0 lg:left-[10%] lg:right-[10%] flex-col bg-[var(--appkit-color-surface)] shadow-2xl", style: { zIndex: "var(--appkit-z-modal)" }, children: [_jsxs(Row, { gap: "sm", paddingX: "x-5", className: "flex-shrink-0 sticky top-0 z-10 border-b border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)]", padding: "y-sm", children: [previewMode ? (_jsxs("button", { type: "button", onClick: () => setPreviewMode(false), "aria-label": "Back to edit", className: "rounded-lg p-1.5 text-[var(--appkit-color-text-muted)] hover:bg-[var(--appkit-color-border-subtle)] transition-colors flex-shrink-0 flex items-center gap-1.5 text-sm", children: [_jsx(ArrowLeft, { className: "w-4 h-4" }), _jsx(Span, { className: "hidden sm:inline", children: "Back to Edit" })] })) : (_jsx("button", { type: "button", onClick: attemptClose, "aria-label": "Close", className: "rounded-lg p-1.5 text-[var(--appkit-color-text-muted)] hover:bg-[var(--appkit-color-border-subtle)] transition-colors flex-shrink-0", children: _jsx(X, { className: "w-5 h-5" }) })), _jsxs(Div, { className: "flex-1 min-w-0", children: [breadcrumb && (_jsx(Text, { className: "text-[var(--appkit-color-text-muted)] truncate mb-0.5", size: "xs", children: breadcrumb })), _jsx(Text, { className: "text-[var(--appkit-color-text)] truncate", size: "sm", weight: "semibold", children: previewMode ? `Preview — ${title}` : title })] }), _jsx(Row, { gap: "xs", className: "flex-shrink-0", children: previewMode ? null : (_jsxs(_Fragment, { children: [previewSlot && (_jsxs("button", { type: "button", onClick: () => setPreviewMode(true), className: "flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm text-[var(--appkit-color-text-muted)] hover:bg-[var(--appkit-color-border-subtle)] transition-colors border border-[var(--appkit-color-border)]", children: [_jsx(Eye, { className: "w-4 h-4" }), _jsx(Span, { className: "hidden sm:inline", children: "Preview" })] })), onSaveDraft && (_jsx(Button, { variant: "outline", size: "sm", onClick: handleSaveDraft, disabled: isLoading || savingDraft || publishing, isLoading: savingDraft, children: saveLabel })), onPublish && (_jsx(Button, { variant: "primary", size: "sm", onClick: handlePublish, disabled: isLoading || savingDraft || publishing, isLoading: publishing, children: publishLabel }))] })) })] }), _jsxs(Div, { layout: "flex", className: `flex-1 ${__O.hidden}`, children: [sections && sections.length > 0 && !previewMode && (_jsx("nav", { "aria-label": "Form sections", className: "hidden lg:flex flex-col flex-shrink-0 w-48 border-r border-[var(--appkit-color-border)] py-4 px-3 gap-1 overflow-y-auto", children: sections.map((sec) => (_jsx("button", { type: "button", onClick: () => scrollToSection(sec.id), className: "text-left text-sm px-3 py-2 rounded-lg text-[var(--appkit-color-text-muted)] hover:text-[var(--appkit-color-text)] hover:bg-[var(--appkit-color-border-subtle)] transition-colors", children: sec.label }, sec.id))) })), sections && sections.length > 0 && !previewMode && (_jsx(Row, { gap: "px", className: `lg:hidden fixed top-[var(--form-shell-topbar-h,57px)] left-0 right-0 z-10 ${__O.xAuto} px-5 bg-[var(--appkit-color-surface)] border-b border-[var(--appkit-color-border)]`, padding: "y-xs", children: sections.map((sec) => (_jsx("button", { type: "button", onClick: () => scrollToSection(sec.id), className: "flex-shrink-0 text-xs px-3 py-1.5 rounded-full border border-[var(--appkit-color-border)] text-[var(--appkit-color-text-muted)] hover:border-[var(--appkit-color-primary)] hover:text-[var(--appkit-color-primary)] transition-colors whitespace-nowrap", children: sec.label }, sec.id))) })), _jsx(Div, { ref: bodyRef, className: classNames("flex-1 overflow-y-auto", sections && sections.length > 0 && !previewMode ? "pt-0 lg:pt-0" : ""), children: previewMode && previewSlot ? (_jsxs(_Fragment, { children: [_jsxs(Row, { textSize: "sm", gap: "xs", className: "sticky top-0 z-10 bg-[var(--appkit-color-warning-surface)] border-b border-[var(--appkit-color-warning)] text-[var(--appkit-color-warning-text,var(--appkit-color-warning))]", paddingY: "y-xs", paddingX: "x-md", children: [_jsx(Eye, { className: "w-4 h-4 flex-shrink-0" }), _jsx(Span, { children: "Preview \u2014 not visible to buyers until published" })] }), _jsx(Div, { padding: "y-md", children: previewSlot() })] })) : splitPreview && previewSlot ? (
118
+ return (_jsxs(_Fragment, { children: [_jsx(Div, { surface: "overlay-sm", className: "fixed inset-0 backdrop-blur-[2px]", style: { zIndex: "calc(var(--appkit-z-modal) - 1)" }, "aria-hidden": "true", onClick: attemptClose }), _jsxs(Div, { layout: "flex", ref: panelRef, role: "dialog", "aria-modal": "true", "aria-label": title, className: "fixed top-0 bottom-0 left-0 right-0 lg:left-[10%] lg:right-[10%] [flex-direction:column] bg-[var(--appkit-color-surface)]", shadow: "2xl", style: { zIndex: "var(--appkit-z-modal)" }, children: [_jsxs(Row, { gap: "sm", paddingX: "x-5", className: "flex-shrink-0 sticky top-0 z-10 border-b border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)]", padding: "y-sm", children: [previewMode ? (_jsxs("button", { type: "button", onClick: () => setPreviewMode(false), "aria-label": "Back to edit", className: "rounded-lg p-1.5 text-[var(--appkit-color-text-muted)] hover:bg-[var(--appkit-color-border-subtle)] transition-colors flex-shrink-0 flex items-center gap-1.5 text-sm", children: [_jsx(ArrowLeft, { className: "w-4 h-4" }), _jsx(Span, { className: "hidden sm:inline", children: "Back to Edit" })] })) : (_jsx("button", { type: "button", onClick: attemptClose, "aria-label": "Close", className: "rounded-lg p-1.5 text-[var(--appkit-color-text-muted)] hover:bg-[var(--appkit-color-border-subtle)] transition-colors flex-shrink-0", children: _jsx(X, { className: "w-5 h-5" }) })), _jsxs(Div, { className: "flex-1 min-w-0", children: [breadcrumb && (_jsx(Text, { className: "text-[var(--appkit-color-text-muted)] truncate mb-0.5", size: "xs", children: breadcrumb })), _jsx(Text, { className: "text-[var(--appkit-color-text)] truncate", size: "sm", weight: "semibold", children: previewMode ? `Preview — ${title}` : title })] }), _jsx(Row, { gap: "xs", className: "flex-shrink-0", children: previewMode ? null : (_jsxs(_Fragment, { children: [previewSlot && (_jsxs("button", { type: "button", onClick: () => setPreviewMode(true), className: "flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm text-[var(--appkit-color-text-muted)] hover:bg-[var(--appkit-color-border-subtle)] transition-colors border border-[var(--appkit-color-border)]", children: [_jsx(Eye, { className: "w-4 h-4" }), _jsx(Span, { className: "hidden sm:inline", children: "Preview" })] })), onSaveDraft && (_jsx(Button, { variant: "outline", size: "sm", onClick: handleSaveDraft, disabled: isLoading || savingDraft || publishing, isLoading: savingDraft, children: saveLabel })), onPublish && (_jsx(Button, { variant: "primary", size: "sm", onClick: handlePublish, disabled: isLoading || savingDraft || publishing, isLoading: publishing, children: publishLabel }))] })) })] }), _jsxs(Div, { layout: "flex", className: `flex-1 ${__O.hidden}`, children: [sections && sections.length > 0 && !previewMode && (_jsx("nav", { "aria-label": "Form sections", className: "hidden lg:flex flex-col flex-shrink-0 w-48 border-r border-[var(--appkit-color-border)] py-4 px-3 gap-1 overflow-y-auto", children: sections.map((sec) => (_jsx("button", { type: "button", onClick: () => scrollToSection(sec.id), className: "text-left text-sm px-3 py-2 rounded-lg text-[var(--appkit-color-text-muted)] hover:text-[var(--appkit-color-text)] hover:bg-[var(--appkit-color-border-subtle)] transition-colors", children: sec.label }, sec.id))) })), sections && sections.length > 0 && !previewMode && (_jsx(Row, { gap: "px", className: `lg:hidden fixed top-[var(--form-shell-topbar-h,57px)] left-0 right-0 z-10 ${__O.xAuto} px-[1.25rem] bg-[var(--appkit-color-surface)] border-b border-[var(--appkit-color-border)]`, padding: "y-xs", children: sections.map((sec) => (_jsx("button", { type: "button", onClick: () => scrollToSection(sec.id), className: "flex-shrink-0 text-xs px-3 py-1.5 rounded-full border border-[var(--appkit-color-border)] text-[var(--appkit-color-text-muted)] hover:border-[var(--appkit-color-primary)] hover:text-[var(--appkit-color-primary)] transition-colors whitespace-nowrap", children: sec.label }, sec.id))) })), _jsx(Div, { ref: bodyRef, className: classNames("flex-1 overflow-y-auto", sections && sections.length > 0 && !previewMode ? "pt-0 lg:pt-0" : ""), children: previewMode && previewSlot ? (_jsxs(_Fragment, { children: [_jsxs(Row, { textSize: "sm", gap: "xs", className: "sticky top-0 z-10 bg-[var(--appkit-color-warning-surface)] border-b border-[var(--appkit-color-warning)] text-[var(--appkit-color-warning-text,var(--appkit-color-warning))]", paddingY: "y-xs", paddingX: "x-md", children: [_jsx(Eye, { className: "w-4 h-4 flex-shrink-0" }), _jsx(Span, { children: "Preview \u2014 not visible to buyers until published" })] }), _jsx(Div, { padding: "y-md", children: previewSlot() })] })) : splitPreview && previewSlot ? (
119
119
  // S-STORE-3-D — desktop 60/40 split: form left, preview right.
120
120
  // Below `lg`, falls back to single-column form (preview-as-modal via existing toggle).
121
- _jsxs(Div, { className: "lg:grid lg:grid-cols-[3fr_2fr] lg:gap-6 lg:px-6 lg:py-6 lg:max-w-[1400px] lg:mx-auto", children: [_jsx(Div, { className: "max-w-3xl mx-auto px-5 sm:px-6 lg:max-w-none lg:px-0 lg:py-0", padding: "y-lg", children: children }), _jsxs(Div, { className: `hidden lg:block sticky lg:top-4 lg:self-start lg:max-h-[calc(100vh-6rem)] ${__O.yAuto} border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface-raised)] ${__P.p4}`, rounded: "lg", children: [_jsxs(Row, { textWeight: "semibold", textSize: "xs", gap: "xs", className: "mb-3 uppercase tracking-wide text-[var(--appkit-color-text-muted)]", children: [_jsx(Eye, { className: "w-3.5 h-3.5" }), _jsx(Span, { children: "Live preview" })] }), previewSlot()] })] })) : (_jsx(Div, { className: "max-w-3xl mx-auto px-5 sm:px-6", padding: "y-lg", children: children })) })] }), !previewMode && renderBottomBar ? (renderBottomBar()) : !previewMode && (onSaveDraft || onPublish) ? (_jsxs(Row, { justify: "between", paddingX: "x-5", className: "flex-shrink-0 sticky bottom-0 z-10 border-t border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)]", padding: "y-sm", children: [_jsx(Button, { variant: "ghost", size: "sm", onClick: attemptClose, disabled: isLoading, children: FORM_ACTION_META[FORM_ACTION_ID.DISCARD].label }), _jsxs(Row, { gap: "xs", children: [onSaveDraft && (_jsx(Button, { variant: "outline", size: "sm", onClick: handleSaveDraft, disabled: isLoading || savingDraft || publishing, isLoading: savingDraft, children: saveLabel })), onPublish && (_jsxs(Button, { variant: "primary", size: "sm", onClick: handlePublish, disabled: isLoading || savingDraft || publishing, isLoading: publishing, children: [publishLabel, " \u2192"] }))] })] })) : null] }), showUnsaved && (_jsxs(_Fragment, { children: [_jsx(Div, { surface: "overlay-lg", className: "fixed inset-0", style: { zIndex: "calc(var(--appkit-z-modal) + 5)" }, onClick: () => setShowUnsaved(false) }), _jsxs(Div, { className: "fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[90vw] max-w-sm bg-[var(--appkit-color-surface)] shadow-2xl", rounded: "xl", padding: "lg", style: { zIndex: "calc(var(--appkit-z-modal) + 5)" }, children: [_jsxs(Row, { gap: "sm", align: "start", className: "mb-4", children: [_jsx(Span, { layout: "flex-center", className: "flex-shrink-0 w-10 h-10 bg-[var(--appkit-color-warning-surface)]", rounded: "full", children: _jsx(AlertTriangle, { className: "w-5 h-5 text-[var(--appkit-color-warning)]" }) }), _jsxs(Stack, { gap: "xs", children: [_jsx(Text, { className: "text-[var(--appkit-color-text)]", weight: "semibold", children: "Unsaved changes" }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", size: "sm", children: "You have unsaved changes. Leave without saving?" })] })] }), _jsxs(Row, { gap: "xs", justify: "end", children: [_jsx(Button, { variant: "outline", size: "sm", onClick: () => setShowUnsaved(false), children: "Stay" }), _jsx(Button, { variant: "danger", size: "sm", onClick: () => { setShowUnsaved(false); onClose(); }, children: "Leave" })] })] })] }))] }));
121
+ _jsxs(Div, { className: "lg:grid lg:grid-cols-[3fr_2fr] lg:gap-[1.5rem] lg:px-[1.5rem] lg:py-[1.5rem] lg:max-w-[1400px] lg:mx-auto", children: [_jsx(Div, { className: "max-w-3xl mx-auto px-[1.25rem] sm:px-[1.5rem] lg:max-w-none lg:px-[0] lg:py-[0]", padding: "y-lg", children: children }), _jsxs(Div, { className: `hidden lg:block sticky lg:top-4 lg:self-start lg:max-h-[calc(100vh-6rem)] ${__O.yAuto} border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface-raised)] ${__P.p4}`, rounded: "lg", children: [_jsxs(Row, { textWeight: "semibold", textSize: "xs", gap: "xs", className: "mb-3 uppercase tracking-wide text-[var(--appkit-color-text-muted)]", children: [_jsx(Eye, { className: "w-3.5 h-3.5" }), _jsx(Span, { children: "Live preview" })] }), previewSlot()] })] })) : (_jsx(Div, { className: "max-w-3xl mx-auto px-[1.25rem] sm:px-[1.5rem]", padding: "y-lg", children: children })) })] }), !previewMode && renderBottomBar ? (renderBottomBar()) : !previewMode && (onSaveDraft || onPublish) ? (_jsxs(Row, { justify: "between", paddingX: "x-5", className: "flex-shrink-0 sticky bottom-0 z-10 border-t border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)]", padding: "y-sm", children: [_jsx(Button, { variant: "ghost", size: "sm", onClick: attemptClose, disabled: isLoading, children: FORM_ACTION_META[FORM_ACTION_ID.DISCARD].label }), _jsxs(Row, { gap: "xs", children: [onSaveDraft && (_jsx(Button, { variant: "outline", size: "sm", onClick: handleSaveDraft, disabled: isLoading || savingDraft || publishing, isLoading: savingDraft, children: saveLabel })), onPublish && (_jsxs(Button, { variant: "primary", size: "sm", onClick: handlePublish, disabled: isLoading || savingDraft || publishing, isLoading: publishing, children: [publishLabel, " \u2192"] }))] })] })) : null] }), showUnsaved && (_jsxs(_Fragment, { children: [_jsx(Div, { surface: "overlay-lg", className: "fixed inset-0", style: { zIndex: "calc(var(--appkit-z-modal) + 5)" }, onClick: () => setShowUnsaved(false) }), _jsxs(Div, { className: "fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[90vw] max-w-sm bg-[var(--appkit-color-surface)]", shadow: "2xl", rounded: "xl", padding: "lg", style: { zIndex: "calc(var(--appkit-z-modal) + 5)" }, children: [_jsxs(Row, { gap: "sm", align: "start", className: "mb-4", children: [_jsx(Span, { layout: "flex-center", className: "flex-shrink-0 w-10 h-10 bg-[var(--appkit-color-warning-surface)]", rounded: "full", children: _jsx(AlertTriangle, { className: "w-5 h-5 text-[var(--appkit-color-warning)]" }) }), _jsxs(Stack, { gap: "xs", children: [_jsx(Text, { className: "text-[var(--appkit-color-text)]", weight: "semibold", children: "Unsaved changes" }), _jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", size: "sm", children: "You have unsaved changes. Leave without saving?" })] })] }), _jsxs(Row, { gap: "xs", justify: "end", children: [_jsx(Button, { variant: "outline", size: "sm", onClick: () => setShowUnsaved(false), children: "Stay" }), _jsx(Button, { variant: "danger", size: "sm", onClick: () => { setShowUnsaved(false); onClose(); }, children: "Leave" })] })] })] }))] }));
122
122
  }
@@ -121,7 +121,7 @@ export function QuickFormDrawer({ isOpen, onClose, title, fields, defaultValues,
121
121
  if (!isOpen)
122
122
  return null;
123
123
  const busy = submitting || isLoading;
124
- return (_jsxs(_Fragment, { children: [_jsx(Div, { surface: "overlay-xs", className: "fixed inset-0 backdrop-blur-[2px]", style: { zIndex: "calc(var(--appkit-z-modal) + 1)" }, "aria-hidden": "true", onClick: handleClose }), _jsxs("div", { ref: drawerRef, role: "dialog", "aria-modal": "true", "aria-label": title, className: "fixed inset-y-0 right-0 flex flex-col bg-[var(--appkit-color-surface)] shadow-2xl w-full lg:w-[40%]", style: { zIndex: "calc(var(--appkit-z-modal) + 2)" }, children: [_jsxs(Row, { className: "flex-shrink-0 border-b border-[var(--appkit-color-border)]", padding: "md", align: "center", gap: "3", children: [_jsx(Text, { className: "flex-1 text-[var(--appkit-color-text)]", size: "base", weight: "semibold", children: title }), _jsx("button", { type: "button", onClick: handleClose, "aria-label": "Close", className: "rounded-lg p-1.5 text-[var(--appkit-color-text-muted)] hover:bg-[var(--appkit-color-border-subtle)] transition-colors", children: _jsx(X, { className: "w-5 h-5" }) })] }), _jsxs("form", { className: "flex-1 overflow-y-auto px-4 py-5 space-y-4", onSubmit: handleSubmit, noValidate: true, children: [fields.map((field) => {
124
+ return (_jsxs(_Fragment, { children: [_jsx(Div, { surface: "overlay-xs", className: "fixed inset-0 backdrop-blur-[2px] [z-index:calc(var(--appkit-z-modal)+1)]", "aria-hidden": "true", onClick: handleClose }), _jsxs("div", { ref: drawerRef, role: "dialog", "aria-modal": "true", "aria-label": title, className: "fixed inset-y-0 right-0 flex flex-col bg-[var(--appkit-color-surface)] shadow-2xl w-full lg:w-[40%] [z-index:calc(var(--appkit-z-modal)+2)]", children: [_jsxs(Row, { className: "flex-shrink-0 border-b border-[var(--appkit-color-border)]", padding: "md", align: "center", gap: "3", children: [_jsx(Text, { className: "flex-1 text-[var(--appkit-color-text)]", size: "base", weight: "semibold", children: title }), _jsx("button", { type: "button", onClick: handleClose, "aria-label": "Close", className: "rounded-lg p-1.5 text-[var(--appkit-color-text-muted)] hover:bg-[var(--appkit-color-border-subtle)] transition-colors", children: _jsx(X, { className: "w-5 h-5" }) })] }), _jsxs("form", { className: "flex-1 overflow-y-auto px-4 py-5 space-y-4", onSubmit: handleSubmit, noValidate: true, children: [fields.map((field) => {
125
125
  const value = values[field.name];
126
126
  if (field.type === "toggle") {
127
127
  return (_jsxs(Stack, { gap: "xs", children: [_jsx(Toggle, { checked: !!value, onChange: (checked) => set(field.name, checked), label: field.label }), field.helperText && (_jsx(Text, { className: "text-[var(--appkit-color-text-muted)]", size: "xs", children: field.helperText }))] }, field.name));
@@ -31,6 +31,6 @@ export function NavPermissionsManager({ initialConfig, navGroups, onUpdate, }) {
31
31
  return (_jsxs(Tr, { className: [
32
32
  idx % 2 === 0 ? "bg-white dark:bg-slate-900" : "bg-zinc-50/50 dark:bg-slate-800/50",
33
33
  !enabled ? "opacity-60" : "",
34
- ].join(" "), children: [_jsx(Td, { padding: "md", children: _jsxs(Div, { children: [_jsx(Text, { weight: "medium", color: "primary", children: item.label }), item.id && (_jsx(Text, { size: "xs", color: "faint", children: item.id }))] }) }), _jsx(Td, { padding: "md", children: _jsx(Code, { className: "text-zinc-500 dark:text-zinc-400", size: "xs", children: item.href }) }), _jsx(Td, { padding: "md", children: item.requiredPermission ? (_jsx(Code, { className: "bg-zinc-100 px-1.5 py-0.5 text-zinc-700 dark:bg-slate-700 dark:text-zinc-300", size: "xs", rounded: "default", children: item.requiredPermission })) : (_jsx(Text, { size: "xs", color: "faint", children: "\u2014" })) }), _jsx(Td, { className: "text-right", padding: "md", children: hasId ? (_jsx(Toggle, { checked: enabled, onChange: (v) => handleToggle(item.id, item.label, v), "aria-label": `Toggle ${item.label}` })) : (_jsx(Text, { className: "italic", size: "xs", color: "faint", children: "Legacy \u2014 always visible" })) })] }, item.href));
34
+ ].join(" "), children: [_jsx(Td, { padding: "md", children: _jsxs(Div, { children: [_jsx(Text, { weight: "medium", color: "primary", children: item.label }), item.id && (_jsx(Text, { size: "xs", color: "faint", children: item.id }))] }) }), _jsx(Td, { padding: "md", children: _jsx(Code, { color: "muted", size: "xs", children: item.href }) }), _jsx(Td, { padding: "md", children: item.requiredPermission ? (_jsx(Code, { className: "bg-[var(--appkit-color-surface-elevated)] text-[var(--appkit-color-text)]", padding: "sm", size: "xs", rounded: "default", children: item.requiredPermission })) : (_jsx(Text, { size: "xs", color: "faint", children: "\u2014" })) }), _jsx(Td, { className: "text-right", padding: "md", children: hasId ? (_jsx(Toggle, { checked: enabled, onChange: (v) => handleToggle(item.id, item.label, v), "aria-label": `Toggle ${item.label}` })) : (_jsx(Text, { className: "italic", size: "xs", color: "faint", children: "Legacy \u2014 always visible" })) })] }, item.href));
35
35
  }) })] }) })] }, group.groupLabel))) }));
36
36
  }
@@ -1,4 +1,5 @@
1
1
  import type { FirestoreDocument } from "@mohasinac/appkit";
2
+ import type { BaseDocument } from "../../../_internal/shared/types/base-document";
2
3
  /**
3
4
  * S-STORE Extensions — Firestore Document Types
4
5
  *
@@ -20,8 +21,7 @@ import type { FirestoreDocument } from "@mohasinac/appkit";
20
21
  * 11. storeGoogleConfig — per-store Google Business reviews integration
21
22
  */
22
23
  export type PayoutMethodType = "upi" | "bank" | "card" | "other";
23
- export interface PayoutMethodDocument {
24
- id: string;
24
+ export interface PayoutMethodDocument extends BaseDocument {
25
25
  sellerId: string;
26
26
  storeId: string;
27
27
  type: PayoutMethodType;
@@ -34,15 +34,12 @@ export interface PayoutMethodDocument {
34
34
  accountHolderName?: string;
35
35
  bankName?: string;
36
36
  details?: Record<string, string>;
37
- createdAt: Date;
38
- updatedAt: Date;
39
37
  }
40
38
  export declare const PAYOUT_METHODS_COLLECTION: "payoutMethods";
41
39
  export declare const PAYOUT_METHOD_INDEXED_FIELDS: readonly ["sellerId", "storeId", "type", "isDefault", "isActive", "createdAt"];
42
40
  export declare const DEFAULT_PAYOUT_METHOD_DATA: Partial<PayoutMethodDocument>;
43
41
  export type ShippingMethod = "free" | "flat" | "weight" | "express" | "pickup" | "custom";
44
- export interface ShippingConfigDocument {
45
- id: string;
42
+ export interface ShippingConfigDocument extends BaseDocument {
46
43
  storeId: string;
47
44
  label: string;
48
45
  method: ShippingMethod;
@@ -54,16 +51,13 @@ export interface ShippingConfigDocument {
54
51
  expressSurchargeInPaise?: number;
55
52
  estimatedDays?: number;
56
53
  zones?: string[];
57
- createdAt: Date;
58
- updatedAt: Date;
59
54
  }
60
55
  export declare const SHIPPING_CONFIGS_COLLECTION: "shippingConfigs";
61
56
  export declare const SHIPPING_CONFIG_INDEXED_FIELDS: readonly ["storeId", "method", "isDefault", "isActive", "createdAt"];
62
57
  export declare const DEFAULT_SHIPPING_CONFIG_DATA: Partial<ShippingConfigDocument>;
63
58
  export type AnalyticsScope = "seller" | "admin";
64
59
  export type AnalyticsCardType = "metric" | "line" | "bar" | "pie" | "table" | "custom";
65
- export interface AnalyticsCardDocument {
66
- id: string;
60
+ export interface AnalyticsCardDocument extends BaseDocument {
67
61
  scope: AnalyticsScope;
68
62
  ownerId: string;
69
63
  title: string;
@@ -73,15 +67,12 @@ export interface AnalyticsCardDocument {
73
67
  position: number;
74
68
  isBuiltIn: boolean;
75
69
  isVisible: boolean;
76
- createdAt: Date;
77
- updatedAt: Date;
78
70
  }
79
71
  export declare const ANALYTICS_CARDS_COLLECTION: "analyticsCards";
80
72
  export declare const ANALYTICS_CARD_INDEXED_FIELDS: readonly ["scope", "ownerId", "isVisible", "position", "createdAt"];
81
73
  export declare const DEFAULT_ANALYTICS_CARD_DATA: Partial<AnalyticsCardDocument>;
82
74
  export type AlertOperator = ">" | "<" | ">=" | "<=" | "==" | "!=";
83
- export interface AnalyticsAlertDocument {
84
- id: string;
75
+ export interface AnalyticsAlertDocument extends BaseDocument {
85
76
  scope: AnalyticsScope;
86
77
  ownerId: string;
87
78
  label: string;
@@ -92,14 +83,11 @@ export interface AnalyticsAlertDocument {
92
83
  isActive: boolean;
93
84
  notifyChannels: Array<"in-app" | "email" | "whatsapp">;
94
85
  lastTriggeredAt?: Date;
95
- createdAt: Date;
96
- updatedAt: Date;
97
86
  }
98
87
  export declare const ANALYTICS_ALERTS_COLLECTION: "analyticsAlerts";
99
88
  export declare const ANALYTICS_ALERT_INDEXED_FIELDS: readonly ["scope", "ownerId", "isActive", "metric", "createdAt"];
100
89
  export declare const DEFAULT_ANALYTICS_ALERT_DATA: Partial<AnalyticsAlertDocument>;
101
- export interface StoreCategoryDocument {
102
- id: string;
90
+ export interface StoreCategoryDocument extends BaseDocument {
103
91
  storeId: string;
104
92
  label: string;
105
93
  slug: string;
@@ -108,15 +96,12 @@ export interface StoreCategoryDocument {
108
96
  isActive: boolean;
109
97
  description?: string;
110
98
  coverImageUrl?: string;
111
- createdAt: Date;
112
- updatedAt: Date;
113
99
  }
114
100
  export declare const STORE_CATEGORIES_COLLECTION: "storeCategories";
115
101
  export declare const STORE_CATEGORY_INDEXED_FIELDS: readonly ["storeId", "slug", "isActive", "displayOrder", "createdAt"];
116
102
  export declare const DEFAULT_STORE_CATEGORY_DATA: Partial<StoreCategoryDocument>;
117
103
  export type ListingTemplateType = "standard" | "auction" | "pre-order" | "prize-draw" | "bundle" | "classified" | "digital-code" | "live";
118
- export interface ListingTemplateDocument {
119
- id: string;
104
+ export interface ListingTemplateDocument extends BaseDocument {
120
105
  storeId: string;
121
106
  ownerId: string;
122
107
  name: string;
@@ -127,16 +112,13 @@ export interface ListingTemplateDocument {
127
112
  isShared: boolean;
128
113
  isActive: boolean;
129
114
  usageCount: number;
130
- createdAt: Date;
131
- updatedAt: Date;
132
115
  }
133
116
  export declare const LISTING_TEMPLATES_COLLECTION: "listingTemplates";
134
117
  export declare const LISTING_TEMPLATE_INDEXED_FIELDS: readonly ["storeId", "ownerId", "listingType", "isShared", "isActive", "createdAt"];
135
118
  export declare const DEFAULT_LISTING_TEMPLATE_DATA: Partial<ListingTemplateDocument>;
136
119
  export type ModerationStatus = "pending" | "approved" | "rejected" | "auto-approved";
137
120
  export type ModerationMediaType = "video" | "image" | "rich-text";
138
- export interface ModerationQueueDocument {
139
- id: string;
121
+ export interface ModerationQueueDocument extends BaseDocument {
140
122
  mediaType: ModerationMediaType;
141
123
  mediaUrl?: string;
142
124
  thumbnailUrl?: string;
@@ -149,8 +131,6 @@ export interface ModerationQueueDocument {
149
131
  reviewerId?: string;
150
132
  reviewedAt?: Date;
151
133
  submittedAt: Date;
152
- createdAt: Date;
153
- updatedAt: Date;
154
134
  }
155
135
  export declare const MODERATION_QUEUE_COLLECTION: "moderationQueue";
156
136
  export declare const MODERATION_QUEUE_INDEXED_FIELDS: readonly ["status", "mediaType", "entityType", "entityId", "storeId", "ownerId", "submittedAt", "createdAt"];
@@ -158,8 +138,7 @@ export declare const DEFAULT_MODERATION_QUEUE_DATA: Partial<ModerationQueueDocum
158
138
  export type ReportEntityType = "product" | "store" | "review" | "event" | "user" | "blog" | "comment";
159
139
  export type ReportStatus = "pending" | "under-review" | "actioned" | "dismissed";
160
140
  export type ReportReason = "scam" | "counterfeit" | "prohibited" | "inappropriate" | "harassment" | "spam" | "ip-violation" | "other";
161
- export interface ReportDocument {
162
- id: string;
141
+ export interface ReportDocument extends BaseDocument {
163
142
  entityType: ReportEntityType;
164
143
  entityId: string;
165
144
  reporterId: string;
@@ -171,8 +150,6 @@ export interface ReportDocument {
171
150
  assignedTo?: string;
172
151
  resolution?: string;
173
152
  resolvedAt?: Date;
174
- createdAt: Date;
175
- updatedAt: Date;
176
153
  }
177
154
  export declare const REPORTS_COLLECTION: "reports";
178
155
  export declare const REPORT_INDEXED_FIELDS: readonly ["entityType", "entityId", "reporterId", "reason", "status", "createdAt"];
@@ -186,8 +163,7 @@ export interface ItemRequestReply {
186
163
  isOpInitiatedThread: boolean;
187
164
  createdAt: Date;
188
165
  }
189
- export interface ItemRequestDocument {
190
- id: string;
166
+ export interface ItemRequestDocument extends BaseDocument {
191
167
  opUserId: string;
192
168
  opDisplayName: string;
193
169
  title: string;
@@ -203,14 +179,11 @@ export interface ItemRequestDocument {
203
179
  approvedAt?: Date;
204
180
  approvedBy?: string;
205
181
  closedAt?: Date;
206
- createdAt: Date;
207
- updatedAt: Date;
208
182
  }
209
183
  export declare const ITEM_REQUESTS_COLLECTION: "itemRequests";
210
184
  export declare const ITEM_REQUEST_INDEXED_FIELDS: readonly ["opUserId", "status", "category", "createdAt"];
211
185
  export declare const DEFAULT_ITEM_REQUEST_DATA: Partial<ItemRequestDocument>;
212
- export interface StoreWhatsAppConfigDocument {
213
- id: string;
186
+ export interface StoreWhatsAppConfigDocument extends BaseDocument {
214
187
  storeId: string;
215
188
  isConnected: boolean;
216
189
  isPaid: boolean;
@@ -221,14 +194,11 @@ export interface StoreWhatsAppConfigDocument {
221
194
  welcomeMessage?: string;
222
195
  /** Status of pending WhatsApp Business onboarding (Meta Cloud API). */
223
196
  onboardingStatus?: "pending" | "approved" | "rejected";
224
- createdAt: Date;
225
- updatedAt: Date;
226
197
  }
227
198
  export declare const STORE_WHATSAPP_CONFIG_COLLECTION: "storeWhatsAppConfig";
228
199
  export declare const STORE_WHATSAPP_CONFIG_INDEXED_FIELDS: readonly ["storeId", "isConnected", "isPaid"];
229
200
  export declare const DEFAULT_STORE_WHATSAPP_CONFIG_DATA: Partial<StoreWhatsAppConfigDocument>;
230
- export interface StoreGoogleConfigDocument {
231
- id: string;
201
+ export interface StoreGoogleConfigDocument extends BaseDocument {
232
202
  storeId: string;
233
203
  isConnected: boolean;
234
204
  placeId?: string;
@@ -237,8 +207,6 @@ export interface StoreGoogleConfigDocument {
237
207
  totalReviews?: number;
238
208
  lastSyncedAt?: Date;
239
209
  oauthRefreshToken?: string;
240
- createdAt: Date;
241
- updatedAt: Date;
242
210
  }
243
211
  export declare const STORE_GOOGLE_CONFIG_COLLECTION: "storeGoogleConfig";
244
212
  export declare const STORE_GOOGLE_CONFIG_INDEXED_FIELDS: readonly ["storeId", "isConnected"];
@@ -50,7 +50,7 @@ const CAPABILITY_GROUPS = [
50
50
  },
51
51
  ];
52
52
  function CapabilityTable() {
53
- return (_jsx(Stack, { gap: "lg", children: CAPABILITY_GROUPS.map(({ group, items }) => (_jsxs(Div, { children: [_jsx(Text, { className: "tracking-wide text-[var(--appkit-color-text-muted)] mb-2", size: "xs", weight: "semibold", transform: "uppercase", children: group }), _jsx(Div, { className: "overflow-x-auto -mx-6", children: _jsxs(Table, { className: "min-w-full", size: "sm", children: [_jsx(Thead, { children: _jsxs(Tr, { className: "border-b border-[var(--appkit-color-border)]", children: [_jsx(Th, { weight: "semibold", className: "text-left text-[var(--appkit-color-text)]", padding: "lg-tight", children: "Capability" }), _jsx(Th, { weight: "semibold", className: "text-left text-[var(--appkit-color-text)]", padding: "lg-tight", children: "What it unlocks" }), _jsx(Th, { weight: "semibold", className: "text-left text-[var(--appkit-color-text)] w-24", padding: "lg-tight", children: "Default" })] }) }), _jsx(Tbody, { className: "divide-y divide-[var(--appkit-color-border)]", children: items.map(({ cap, unlocks, defaultOn }) => (_jsxs(Tr, { children: [_jsx(Td, { size: "xs", className: "font-mono text-[var(--appkit-color-text)] align-top whitespace-nowrap", padding: "lg-tight", children: cap }), _jsx(Td, { className: "text-[var(--appkit-color-text-muted)] align-top", padding: "lg-tight", children: unlocks }), _jsx(Td, { className: "align-top", padding: "lg-tight", children: defaultOn ? (_jsx(Span, { className: "inline-block bg-[var(--appkit-color-success)]/10 text-[var(--appkit-color-success)]", size: "xs", weight: "medium", rounded: "full", padding: "pill-xs", children: "On" })) : (_jsx(Span, { className: "inline-block bg-[var(--appkit-color-border)] text-[var(--appkit-color-text-muted)]", size: "xs", weight: "medium", rounded: "full", padding: "pill-xs", children: "Off" })) })] }, cap))) })] }) })] }, group))) }));
53
+ return (_jsx(Stack, { gap: "lg", children: CAPABILITY_GROUPS.map(({ group, items }) => (_jsxs(Div, { children: [_jsx(Text, { className: "tracking-wide text-[var(--appkit-color-text-muted)] mb-2", size: "xs", weight: "semibold", transform: "uppercase", children: group }), _jsx(Div, { overflow: "x-auto", className: "-mx-6", children: _jsxs(Table, { className: "min-w-full", size: "sm", children: [_jsx(Thead, { children: _jsxs(Tr, { className: "border-b border-[var(--appkit-color-border)]", children: [_jsx(Th, { weight: "semibold", className: "text-left text-[var(--appkit-color-text)]", padding: "lg-tight", children: "Capability" }), _jsx(Th, { weight: "semibold", className: "text-left text-[var(--appkit-color-text)]", padding: "lg-tight", children: "What it unlocks" }), _jsx(Th, { weight: "semibold", className: "text-left text-[var(--appkit-color-text)] w-24", padding: "lg-tight", children: "Default" })] }) }), _jsx(Tbody, { className: "divide-y divide-[var(--appkit-color-border)]", children: items.map(({ cap, unlocks, defaultOn }) => (_jsxs(Tr, { children: [_jsx(Td, { size: "xs", className: "font-mono text-[var(--appkit-color-text)] align-top whitespace-nowrap", padding: "lg-tight", children: cap }), _jsx(Td, { className: "text-[var(--appkit-color-text-muted)] align-top", padding: "lg-tight", children: unlocks }), _jsx(Td, { className: "align-top", padding: "lg-tight", children: defaultOn ? (_jsx(Span, { className: "inline-block bg-[var(--appkit-color-success)]/10 text-[var(--appkit-color-success)]", size: "xs", weight: "medium", rounded: "full", padding: "pill-xs", children: "On" })) : (_jsx(Span, { className: "inline-block bg-[var(--appkit-color-border)] text-[var(--appkit-color-text-muted)]", size: "xs", weight: "medium", rounded: "full", padding: "pill-xs", children: "Off" })) })] }, cap))) })] }) })] }, group))) }));
54
54
  }
55
55
  // -- Section 3: Locked feature guide ------------------------------------------
56
56
  const LOCKED_FEATURES = [
@@ -0,0 +1,5 @@
1
+ export interface StoreClassifiedsListingProps {
2
+ storeId?: string;
3
+ initialData?: any;
4
+ }
5
+ export declare function StoreClassifiedsListing({ storeId, initialData }: StoreClassifiedsListingProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,48 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useState, useCallback } from "react";
4
+ import { useUrlTable } from "../../../react/hooks/useUrlTable";
5
+ import { usePendingTable } from "../../../react/hooks/usePendingTable";
6
+ import { useProducts } from "../../products/hooks/useProducts";
7
+ import { Div, FilterDrawer, ListingToolbar, Pagination, Row, Text } from "../../../ui";
8
+ import { ClassifiedFilters } from "../../classified/components/ClassifiedFilters";
9
+ import { InteractiveProductCard } from "../../products/components/InteractiveProductCard";
10
+ import { PRODUCT_FIELDS } from "../../../constants/field-names";
11
+ import { TABLE_KEYS } from "../../../constants/table-keys";
12
+ import { sortBy } from "../../../constants/sort";
13
+ import { ROUTES } from "../../../next";
14
+ const DEFAULT_SORT = sortBy(PRODUCT_FIELDS.CREATED_AT);
15
+ const SORT_OPTIONS = [
16
+ { value: sortBy(PRODUCT_FIELDS.CREATED_AT), label: "Newest First" },
17
+ { value: sortBy(PRODUCT_FIELDS.CREATED_AT, "ASC"), label: "Oldest First" },
18
+ { value: sortBy(PRODUCT_FIELDS.PRICE, "ASC"), label: "Price: Low to High" },
19
+ { value: sortBy(PRODUCT_FIELDS.PRICE), label: "Price: High to Low" },
20
+ ];
21
+ const FILTER_KEYS = [TABLE_KEYS.MIN_PRICE, TABLE_KEYS.MAX_PRICE, TABLE_KEYS.NEGOTIABLE, TABLE_KEYS.ACCEPTS_SHIPPING];
22
+ export function StoreClassifiedsListing({ storeId, initialData }) {
23
+ const table = useUrlTable({ defaults: { pageSize: "24", sort: DEFAULT_SORT } });
24
+ const [searchInput, setSearchInput] = useState(table.get("q") || "");
25
+ const [filterOpen, setFilterOpen] = useState(false);
26
+ const { pendingTable, filterActiveCount, onFilterApply, onFilterClear, onResetAll, onFilterReset } = usePendingTable(table, FILTER_KEYS);
27
+ const openFilters = useCallback(() => { onFilterReset(); setFilterOpen(true); }, [onFilterReset]);
28
+ const applyFilters = useCallback(() => { onFilterApply(); setFilterOpen(false); }, [onFilterApply]);
29
+ const resetAll = useCallback(() => { onResetAll({ q: "", sort: "" }); setSearchInput(""); }, [onResetAll]);
30
+ const hasActiveState = !!table.get("q") || table.get("sort") !== DEFAULT_SORT || filterActiveCount > 0;
31
+ const params = {
32
+ q: table.get("q") || undefined,
33
+ minPrice: table.get(TABLE_KEYS.MIN_PRICE) ? Number(table.get(TABLE_KEYS.MIN_PRICE)) : undefined,
34
+ maxPrice: table.get(TABLE_KEYS.MAX_PRICE) ? Number(table.get(TABLE_KEYS.MAX_PRICE)) : undefined,
35
+ sort: table.get("sort") || DEFAULT_SORT,
36
+ page: table.getNumber("page", 1),
37
+ perPage: table.getNumber("pageSize", 24),
38
+ storeId: storeId || undefined,
39
+ listingType: "classified",
40
+ };
41
+ const { products, totalPages, page, isLoading } = useProducts(params, { initialData });
42
+ const gridClass = "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4";
43
+ return (_jsxs(Div, { className: "min-h-[200px]", children: [_jsx(ListingToolbar, { filterCount: filterActiveCount, onFiltersClick: openFilters, searchValue: searchInput, searchPlaceholder: "Search store classifieds\u2026", onSearchChange: setSearchInput, onSearchCommit: () => table.set("q", searchInput.trim()), sortValue: table.get("sort") || DEFAULT_SORT, sortOptions: SORT_OPTIONS, onSortChange: (v) => table.set("sort", v), onResetAll: resetAll, hasActiveState: hasActiveState }), totalPages > 1 && (_jsx(Row, { border: "bottom", className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 backdrop-blur-sm", surface: "default", padding: "toolbar", justify: "center", children: _jsx(Pagination, { currentPage: page, totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), _jsx(Div, { padding: "y-lg", children: _jsx(Div, { className: gridClass, children: isLoading
44
+ ? Array.from({ length: 8 }).map((_, i) => _jsx(Div, { surface: "muted", rounded: "xl", className: "aspect-square animate-pulse" }, i))
45
+ : products.length === 0
46
+ ? _jsx(Div, { paddingY: "y-4xl", className: "col-span-full text-center", children: _jsx(Text, { color: "muted", children: "No classified listings in this store yet." }) })
47
+ : products.map((p) => (_jsx(InteractiveProductCard, { product: p, href: String(ROUTES.PUBLIC.CLASSIFIED_DETAIL(p.slug ?? p.id)) }, p.id))) }) }), _jsx(FilterDrawer, { open: filterOpen, onOpen: openFilters, onClose: () => setFilterOpen(false), onApply: applyFilters, onReset: onFilterClear, activeCount: filterActiveCount, hideTrigger: true, children: _jsx(ClassifiedFilters, { table: pendingTable, currencyPrefix: "\u20B9" }) })] }));
48
+ }
@@ -0,0 +1,4 @@
1
+ export interface StoreClassifiedsPageViewProps {
2
+ storeSlug: string;
3
+ }
4
+ export declare function StoreClassifiedsPageView({ storeSlug }: StoreClassifiedsPageViewProps): Promise<import("react/jsx-runtime").JSX.Element | null>;
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { sieveFilter, sieveAnd, SIEVE_OP, sortBy, PRODUCT_FIELDS } from "@mohasinac/appkit";
3
+ import { productRepository } from "../../../repositories";
4
+ import { getStoreBySlug } from "./StoreDetailLayoutView";
5
+ import { StoreClassifiedsListing } from "./StoreClassifiedsListing";
6
+ export async function StoreClassifiedsPageView({ storeSlug }) {
7
+ const store = await getStoreBySlug(storeSlug);
8
+ const storeId = store?.id;
9
+ if (!storeId)
10
+ return null;
11
+ const result = await productRepository
12
+ .list({
13
+ filters: sieveAnd(sieveFilter("storeId", SIEVE_OP.EQ, storeId), sieveFilter("status", SIEVE_OP.EQ, "published"), sieveFilter("listingType", SIEVE_OP.EQ, "classified")),
14
+ sorts: sortBy(PRODUCT_FIELDS.CREATED_AT),
15
+ page: 1,
16
+ pageSize: 24,
17
+ })
18
+ .catch(() => null);
19
+ return _jsx(StoreClassifiedsListing, { storeId: storeId, initialData: result ?? undefined });
20
+ }
@@ -14,6 +14,9 @@ const STORE_LISTING_HREF = {
14
14
  "pre-orders": (slug) => String(ROUTES.PUBLIC.STORE_PRE_ORDERS(slug)),
15
15
  "prize-draws": (slug) => String(ROUTES.PUBLIC.STORE_PRIZE_DRAWS(slug)),
16
16
  bundles: (slug) => String(ROUTES.PUBLIC.STORE_BUNDLES(slug)),
17
+ classifieds: (slug) => String(ROUTES.PUBLIC.STORE_CLASSIFIEDS(slug)),
18
+ "digital-codes": (slug) => String(ROUTES.PUBLIC.STORE_DIGITAL_CODES(slug)),
19
+ live: (slug) => String(ROUTES.PUBLIC.STORE_LIVE(slug)),
17
20
  };
18
21
  export const getStoreBySlug = cache((slug) => storeRepository.findBySlug(slug).catch(() => undefined));
19
22
  function tabLabel(base, count) {
@@ -28,7 +31,7 @@ export async function StoreDetailLayoutView({ storeSlug, activeTab, children, })
28
31
  }
29
32
  const storeId = store?.id;
30
33
  const settings = await siteSettingsRepository.findById("global").catch(() => null);
31
- const [productsCount, auctionsCount, preOrdersCount, prizeDrawsCount, bundlesCount, couponsCount, reviewsCount] = storeId
34
+ const [productsCount, auctionsCount, preOrdersCount, prizeDrawsCount, bundlesCount, classifiedsCount, digitalCodesCount, liveCount, couponsCount, reviewsCount] = storeId
32
35
  ? await Promise.all([
33
36
  productRepository
34
37
  .list({ filters: sieveAnd(sieveFilter("storeId", SIEVE_OP.EQ, storeId), sieveFilter("status", SIEVE_OP.EQ, "published"), sieveFilter("listingType", SIEVE_OP.EQ, "standard")), page: 1, pageSize: 1 })
@@ -52,6 +55,18 @@ export async function StoreDetailLayoutView({ storeSlug, activeTab, children, })
52
55
  .listByType("bundle", { activeOnly: true, limit: 100 })
53
56
  .then((rows) => rows.filter((c) => c.createdByStoreId === storeId).length)
54
57
  .catch(() => 0),
58
+ productRepository
59
+ .list({ filters: sieveAnd(sieveFilter("storeId", SIEVE_OP.EQ, storeId), sieveFilter("status", SIEVE_OP.EQ, "published"), sieveFilter("listingType", SIEVE_OP.EQ, "classified")), page: 1, pageSize: 1 })
60
+ .then((r) => r.total)
61
+ .catch(() => 0),
62
+ productRepository
63
+ .list({ filters: sieveAnd(sieveFilter("storeId", SIEVE_OP.EQ, storeId), sieveFilter("status", SIEVE_OP.EQ, "published"), sieveFilter("listingType", SIEVE_OP.EQ, "digital-code")), page: 1, pageSize: 1 })
64
+ .then((r) => r.total)
65
+ .catch(() => 0),
66
+ productRepository
67
+ .list({ filters: sieveAnd(sieveFilter("storeId", SIEVE_OP.EQ, storeId), sieveFilter("status", SIEVE_OP.EQ, "published"), sieveFilter("listingType", SIEVE_OP.EQ, "live")), page: 1, pageSize: 1 })
68
+ .then((r) => r.total)
69
+ .catch(() => 0),
55
70
  couponsRepository
56
71
  .list({ filters: sieveAnd(sieveFilter("sellerId", SIEVE_OP.EQ, storeId), sieveFilter("validity.isActive", SIEVE_OP.EQ, "true")), page: 1, pageSize: 1 })
57
72
  .then((r) => r.total)
@@ -61,19 +76,25 @@ export async function StoreDetailLayoutView({ storeSlug, activeTab, children, })
61
76
  .then((r) => r.total)
62
77
  .catch(() => 0),
63
78
  ])
64
- : [0, 0, 0, 0, 0, 0, 0];
79
+ : [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
65
80
  const listingCounts = {
66
81
  products: productsCount,
67
82
  auctions: auctionsCount,
68
83
  "pre-orders": preOrdersCount,
69
84
  "prize-draws": prizeDrawsCount,
70
85
  bundles: bundlesCount,
86
+ classifieds: classifiedsCount,
87
+ "digital-codes": digitalCodesCount,
88
+ live: liveCount,
71
89
  };
72
90
  const TAB_LISTING_TYPE = {
73
91
  products: "standard",
74
92
  auctions: "auction",
75
93
  "pre-orders": "pre-order",
76
94
  "prize-draws": "prize-draw",
95
+ classifieds: "classified",
96
+ "digital-codes": "digital-code",
97
+ live: "live",
77
98
  };
78
99
  const visibleStoreTabs = STORE_PAGE_TABS.filter((tab) => {
79
100
  if (tab.id === "bundles")
@@ -0,0 +1,5 @@
1
+ export interface StoreDigitalCodesListingProps {
2
+ storeId?: string;
3
+ initialData?: any;
4
+ }
5
+ export declare function StoreDigitalCodesListing({ storeId, initialData }: StoreDigitalCodesListingProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,48 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useState, useCallback } from "react";
4
+ import { useUrlTable } from "../../../react/hooks/useUrlTable";
5
+ import { usePendingTable } from "../../../react/hooks/usePendingTable";
6
+ import { useProducts } from "../../products/hooks/useProducts";
7
+ import { Div, FilterDrawer, ListingToolbar, Pagination, Row, Text } from "../../../ui";
8
+ import { DigitalCodeFilters } from "../../digital-codes/components/DigitalCodeFilters";
9
+ import { InteractiveProductCard } from "../../products/components/InteractiveProductCard";
10
+ import { PRODUCT_FIELDS } from "../../../constants/field-names";
11
+ import { TABLE_KEYS } from "../../../constants/table-keys";
12
+ import { sortBy } from "../../../constants/sort";
13
+ import { ROUTES } from "../../../next";
14
+ const DEFAULT_SORT = sortBy(PRODUCT_FIELDS.CREATED_AT);
15
+ const SORT_OPTIONS = [
16
+ { value: sortBy(PRODUCT_FIELDS.CREATED_AT), label: "Newest First" },
17
+ { value: sortBy(PRODUCT_FIELDS.CREATED_AT, "ASC"), label: "Oldest First" },
18
+ { value: sortBy(PRODUCT_FIELDS.PRICE, "ASC"), label: "Price: Low to High" },
19
+ { value: sortBy(PRODUCT_FIELDS.PRICE), label: "Price: High to Low" },
20
+ ];
21
+ const FILTER_KEYS = [TABLE_KEYS.MIN_PRICE, TABLE_KEYS.MAX_PRICE];
22
+ export function StoreDigitalCodesListing({ storeId, initialData }) {
23
+ const table = useUrlTable({ defaults: { pageSize: "24", sort: DEFAULT_SORT } });
24
+ const [searchInput, setSearchInput] = useState(table.get("q") || "");
25
+ const [filterOpen, setFilterOpen] = useState(false);
26
+ const { pendingTable, filterActiveCount, onFilterApply, onFilterClear, onResetAll, onFilterReset } = usePendingTable(table, FILTER_KEYS);
27
+ const openFilters = useCallback(() => { onFilterReset(); setFilterOpen(true); }, [onFilterReset]);
28
+ const applyFilters = useCallback(() => { onFilterApply(); setFilterOpen(false); }, [onFilterApply]);
29
+ const resetAll = useCallback(() => { onResetAll({ q: "", sort: "" }); setSearchInput(""); }, [onResetAll]);
30
+ const hasActiveState = !!table.get("q") || table.get("sort") !== DEFAULT_SORT || filterActiveCount > 0;
31
+ const params = {
32
+ q: table.get("q") || undefined,
33
+ minPrice: table.get(TABLE_KEYS.MIN_PRICE) ? Number(table.get(TABLE_KEYS.MIN_PRICE)) : undefined,
34
+ maxPrice: table.get(TABLE_KEYS.MAX_PRICE) ? Number(table.get(TABLE_KEYS.MAX_PRICE)) : undefined,
35
+ sort: table.get("sort") || DEFAULT_SORT,
36
+ page: table.getNumber("page", 1),
37
+ perPage: table.getNumber("pageSize", 24),
38
+ storeId: storeId || undefined,
39
+ listingType: "digital-code",
40
+ };
41
+ const { products, totalPages, page, isLoading } = useProducts(params, { initialData });
42
+ const gridClass = "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4";
43
+ return (_jsxs(Div, { className: "min-h-[200px]", children: [_jsx(ListingToolbar, { filterCount: filterActiveCount, onFiltersClick: openFilters, searchValue: searchInput, searchPlaceholder: "Search digital codes\u2026", onSearchChange: setSearchInput, onSearchCommit: () => table.set("q", searchInput.trim()), sortValue: table.get("sort") || DEFAULT_SORT, sortOptions: SORT_OPTIONS, onSortChange: (v) => table.set("sort", v), onResetAll: resetAll, hasActiveState: hasActiveState }), totalPages > 1 && (_jsx(Row, { border: "bottom", className: "sticky top-[calc(var(--header-height,0px)+44px)] z-10 backdrop-blur-sm", surface: "default", padding: "toolbar", justify: "center", children: _jsx(Pagination, { currentPage: page, totalPages: totalPages, onPageChange: (p) => table.setPage(p) }) })), _jsx(Div, { padding: "y-lg", children: _jsx(Div, { className: gridClass, children: isLoading
44
+ ? Array.from({ length: 8 }).map((_, i) => _jsx(Div, { surface: "muted", rounded: "xl", className: "aspect-square animate-pulse" }, i))
45
+ : products.length === 0
46
+ ? _jsx(Div, { paddingY: "y-4xl", className: "col-span-full text-center", children: _jsx(Text, { color: "muted", children: "No digital codes in this store yet." }) })
47
+ : products.map((p) => (_jsx(InteractiveProductCard, { product: p, href: String(ROUTES.PUBLIC.DIGITAL_CODE_DETAIL(p.slug ?? p.id)) }, p.id))) }) }), _jsx(FilterDrawer, { open: filterOpen, onOpen: openFilters, onClose: () => setFilterOpen(false), onApply: applyFilters, onReset: onFilterClear, activeCount: filterActiveCount, hideTrigger: true, children: _jsx(DigitalCodeFilters, { table: pendingTable, currencyPrefix: "\u20B9" }) })] }));
48
+ }
@@ -0,0 +1,4 @@
1
+ export interface StoreDigitalCodesPageViewProps {
2
+ storeSlug: string;
3
+ }
4
+ export declare function StoreDigitalCodesPageView({ storeSlug }: StoreDigitalCodesPageViewProps): Promise<import("react/jsx-runtime").JSX.Element | null>;
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { sieveFilter, sieveAnd, SIEVE_OP, sortBy, PRODUCT_FIELDS } from "@mohasinac/appkit";
3
+ import { productRepository } from "../../../repositories";
4
+ import { getStoreBySlug } from "./StoreDetailLayoutView";
5
+ import { StoreDigitalCodesListing } from "./StoreDigitalCodesListing";
6
+ export async function StoreDigitalCodesPageView({ storeSlug }) {
7
+ const store = await getStoreBySlug(storeSlug);
8
+ const storeId = store?.id;
9
+ if (!storeId)
10
+ return null;
11
+ const result = await productRepository
12
+ .list({
13
+ filters: sieveAnd(sieveFilter("storeId", SIEVE_OP.EQ, storeId), sieveFilter("status", SIEVE_OP.EQ, "published"), sieveFilter("listingType", SIEVE_OP.EQ, "digital-code")),
14
+ sorts: sortBy(PRODUCT_FIELDS.CREATED_AT),
15
+ page: 1,
16
+ pageSize: 24,
17
+ })
18
+ .catch(() => null);
19
+ return _jsx(StoreDigitalCodesListing, { storeId: storeId, initialData: result ?? undefined });
20
+ }