@mohasinac/appkit 2.8.2 → 2.8.3

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 (430) hide show
  1. package/dist/_internal/client/features/classified/ClassifiedDetailView.js +7 -1
  2. package/dist/_internal/client/features/digital-code/CodeRevealPanel.js +4 -1
  3. package/dist/_internal/client/features/digital-code/DigitalCodeDetailView.js +7 -1
  4. package/dist/_internal/client/features/layout/DashboardLayoutClient.js +3 -2
  5. package/dist/_internal/client/features/live/LiveItemDetailView.js +11 -2
  6. package/dist/_internal/client/scaffolds/AppShell.js +2 -1
  7. package/dist/_internal/client/scaffolds/DashboardScaffold.js +2 -1
  8. package/dist/_internal/server/features/checkout/actions.js +40 -39
  9. package/dist/_internal/shared/actions/action-registry.js +6 -0
  10. package/dist/_internal/shared/config/index.d.ts +1 -1
  11. package/dist/_internal/shared/config/schema.d.ts +0 -8
  12. package/dist/client-entry.d.ts +1 -1
  13. package/dist/client.d.ts +1 -1
  14. package/dist/client.js +1 -1
  15. package/dist/configs/next.js +12 -22
  16. package/dist/constants/api-endpoints.d.ts +6 -0
  17. package/dist/constants/api-endpoints.js +2 -0
  18. package/dist/core/hooks/useSiteSettings.d.ts +1 -1
  19. package/dist/features/about/components/AboutView.js +5 -2
  20. package/dist/features/about/components/FAQPageView.js +3 -3
  21. package/dist/features/about/components/FeesView.js +13 -5
  22. package/dist/features/about/components/HelpPageView.js +9 -5
  23. package/dist/features/about/components/HowAuctionsWorkView.js +9 -5
  24. package/dist/features/about/components/HowCheckoutWorksView.js +9 -5
  25. package/dist/features/about/components/HowOffersWorkView.js +10 -5
  26. package/dist/features/about/components/HowOrdersWorkView.js +10 -5
  27. package/dist/features/about/components/HowPayoutsWorkView.js +9 -5
  28. package/dist/features/about/components/HowPreOrdersWorkView.js +9 -5
  29. package/dist/features/about/components/HowReviewsWorkView.js +9 -5
  30. package/dist/features/about/components/PolicyPageView.js +3 -3
  31. package/dist/features/about/components/PublicProfileView.js +11 -4
  32. package/dist/features/about/components/SecurityPrivacyView.js +8 -4
  33. package/dist/features/about/components/ShippingPolicyView.js +3 -2
  34. package/dist/features/about/components/TrackOrderView.js +2 -2
  35. package/dist/features/about/components/UnauthorizedView.js +3 -3
  36. package/dist/features/account/components/AddressBook.js +1 -1
  37. package/dist/features/account/components/AddressForm.js +2 -2
  38. package/dist/features/account/components/AddressInlineSelect.d.ts +24 -0
  39. package/dist/features/account/components/AddressInlineSelect.js +78 -0
  40. package/dist/features/account/components/AddressSelectorCreate.d.ts +2 -1
  41. package/dist/features/account/components/AddressSelectorCreate.js +5 -32
  42. package/dist/features/account/components/AddressesIndexListing.js +3 -3
  43. package/dist/features/account/components/ChatWindow.js +2 -1
  44. package/dist/features/account/components/NotificationBell.js +13 -7
  45. package/dist/features/account/components/NotificationPreferencesPanel.js +4 -1
  46. package/dist/features/account/components/UserOffersPanel.js +2 -1
  47. package/dist/features/account/components/UserSidebar.js +11 -7
  48. package/dist/features/account/components/UserSupportView.js +13 -4
  49. package/dist/features/account/components/index.d.ts +2 -0
  50. package/dist/features/account/components/index.js +1 -0
  51. package/dist/features/account/hooks/useAccount.d.ts +2 -2
  52. package/dist/features/account/hooks/useAddressSelector.d.ts +1 -1
  53. package/dist/features/account/hooks/useAddresses.d.ts +2 -2
  54. package/dist/features/account/hooks/useNotifications.d.ts +1 -1
  55. package/dist/features/account/hooks/useProfile.d.ts +1 -1
  56. package/dist/features/account/hooks/usePublicProfile.d.ts +2 -2
  57. package/dist/features/addresses/repository/addresses.repository.d.ts +1 -0
  58. package/dist/features/addresses/repository/addresses.repository.js +13 -0
  59. package/dist/features/admin/components/AdminAdEditorView.js +8 -5
  60. package/dist/features/admin/components/AdminAddressEditorView.js +5 -5
  61. package/dist/features/admin/components/AdminAdsView.js +10 -7
  62. package/dist/features/admin/components/AdminBlogEditorView.js +15 -9
  63. package/dist/features/admin/components/AdminBrandEditorView.js +10 -4
  64. package/dist/features/admin/components/AdminBrandsView.js +4 -4
  65. package/dist/features/admin/components/AdminBundleEditorView.js +4 -5
  66. package/dist/features/admin/components/AdminBundlesView.js +3 -3
  67. package/dist/features/admin/components/AdminCarouselEditorView.js +6 -3
  68. package/dist/features/admin/components/AdminCarouselView.js +6 -6
  69. package/dist/features/admin/components/AdminCatalogGuideView.js +2 -1
  70. package/dist/features/admin/components/AdminCategoriesView.js +5 -5
  71. package/dist/features/admin/components/AdminCategoryEditorView.js +11 -5
  72. package/dist/features/admin/components/AdminContactEditorView.js +8 -1
  73. package/dist/features/admin/components/AdminCouponEditorView.js +23 -5
  74. package/dist/features/admin/components/AdminEmployeeEditorView.js +7 -4
  75. package/dist/features/admin/components/AdminFaqEditorView.js +9 -3
  76. package/dist/features/admin/components/AdminFaqsView.js +4 -4
  77. package/dist/features/admin/components/AdminFeatureEditorView.js +7 -1
  78. package/dist/features/admin/components/AdminFeatureFlagsView.js +4 -1
  79. package/dist/features/admin/components/AdminFilterBar.js +4 -4
  80. package/dist/features/admin/components/AdminGroupedListingsView.js +65 -30
  81. package/dist/features/admin/components/AdminGuideHubView.js +4 -1
  82. package/dist/features/admin/components/AdminMediaView.js +4 -1
  83. package/dist/features/admin/components/AdminNavigationView.js +7 -4
  84. package/dist/features/admin/components/AdminNotificationsView.js +2 -2
  85. package/dist/features/admin/components/AdminOrderEditorView.js +2 -2
  86. package/dist/features/admin/components/AdminPageHeader.js +5 -2
  87. package/dist/features/admin/components/AdminPrizeDrawsView.js +5 -5
  88. package/dist/features/admin/components/AdminProductEditorView.js +12 -5
  89. package/dist/features/admin/components/AdminProductsView.js +4 -4
  90. package/dist/features/admin/components/AdminReviewsView.js +2 -2
  91. package/dist/features/admin/components/AdminScammerEditorView.js +6 -2
  92. package/dist/features/admin/components/AdminScammersView.js +3 -3
  93. package/dist/features/admin/components/AdminSectionsView.js +20 -22
  94. package/dist/features/admin/components/AdminSessionsManager.js +2 -1
  95. package/dist/features/admin/components/AdminSessionsView.js +2 -2
  96. package/dist/features/admin/components/AdminSidebar.js +11 -7
  97. package/dist/features/admin/components/AdminSiteConfigGuideView.js +2 -1
  98. package/dist/features/admin/components/AdminSiteSettingsView.js +5 -1
  99. package/dist/features/admin/components/AdminStoreAddressesView.js +2 -2
  100. package/dist/features/admin/components/AdminStoreEditorView.js +5 -5
  101. package/dist/features/admin/components/AdminSublistingCategoryEditorView.js +3 -3
  102. package/dist/features/admin/components/AdminSupportTicketDetailView.js +10 -3
  103. package/dist/features/admin/components/AdminSupportTicketsView.js +3 -3
  104. package/dist/features/admin/components/AdminTrustGuideView.js +3 -3
  105. package/dist/features/admin/components/AdminUsersGuideView.js +3 -3
  106. package/dist/features/admin/components/AdminViewCards.js +12 -6
  107. package/dist/features/admin/components/BrandQuickCreateForm.js +2 -2
  108. package/dist/features/admin/components/CategoryQuickCreateForm.js +2 -2
  109. package/dist/features/admin/components/DashboardStats.js +9 -3
  110. package/dist/features/admin/components/DataListingView.js +3 -3
  111. package/dist/features/admin/components/DataTable.js +11 -7
  112. package/dist/features/admin/components/DrawerFormFooter.js +2 -2
  113. package/dist/features/admin/components/QuickEditMenu.js +2 -1
  114. package/dist/features/admin/components/analytics/AdminAnalyticsCharts.js +5 -1
  115. package/dist/features/admin/hooks/useAdmin.d.ts +1 -1
  116. package/dist/features/admin/hooks/useAdminSectionsListing.d.ts +1 -1
  117. package/dist/features/admin/hooks/useChat.d.ts +1 -1
  118. package/dist/features/auctions/components/AuctionBidsTable.js +4 -1
  119. package/dist/features/auctions/components/AuctionDetailPageView.js +14 -6
  120. package/dist/features/auctions/components/CollapsibleBidHistory.js +5 -1
  121. package/dist/features/auctions/components/MarketplaceAuctionCard.js +9 -3
  122. package/dist/features/auctions/components/MarketplaceAuctionGrid.js +8 -2
  123. package/dist/features/auctions/components/PlaceBidFormClient.js +4 -1
  124. package/dist/features/auctions/hooks/useAuctions.d.ts +8 -8
  125. package/dist/features/auth/components/RegisterForm.js +2 -2
  126. package/dist/features/auth/components/VerifyEmailView.js +5 -2
  127. package/dist/features/auth/hooks/useAuth.d.ts +2 -2
  128. package/dist/features/before-after/components/BeforeAfterSlider.js +1 -1
  129. package/dist/features/blog/components/BlogFeaturedCard.js +8 -1
  130. package/dist/features/blog/components/BlogIndexListing.js +11 -5
  131. package/dist/features/blog/components/BlogListView.js +11 -3
  132. package/dist/features/blog/components/BlogPostView.js +10 -3
  133. package/dist/features/cart/components/CartDrawer.js +11 -3
  134. package/dist/features/cart/components/CartSummary.js +2 -2
  135. package/dist/features/cart/components/CheckoutOtpModal.js +2 -1
  136. package/dist/features/cart/hooks/useCart.d.ts +1 -1
  137. package/dist/features/cart/hooks/useCartQuery.d.ts +1 -1
  138. package/dist/features/cart/hooks/useCheckoutReadQueries.d.ts +2 -2
  139. package/dist/features/cart/hooks/useOrder.d.ts +2 -2
  140. package/dist/features/categories/components/BrandDetailPageView.js +5 -2
  141. package/dist/features/categories/components/BrandDetailTabs.js +5 -1
  142. package/dist/features/categories/components/BundleDetailView.js +6 -3
  143. package/dist/features/categories/components/BundleDynamicRuleEditor.js +3 -1
  144. package/dist/features/categories/components/BundleItemsPicker.js +10 -3
  145. package/dist/features/categories/components/CategoriesIndexListing.js +12 -6
  146. package/dist/features/categories/components/CategoryBundlesListing.js +5 -2
  147. package/dist/features/categories/components/CategoryDetailPageView.js +6 -2
  148. package/dist/features/categories/components/CategoryDetailTabs.js +5 -1
  149. package/dist/features/categories/components/CategoryForm.js +6 -3
  150. package/dist/features/categories/components/CategoryGrid.js +9 -2
  151. package/dist/features/categories/components/CategoryProductsListing.js +10 -4
  152. package/dist/features/categories/components/CategorySelectorCreate.js +3 -3
  153. package/dist/features/categories/components/CategorySortSelect.js +1 -1
  154. package/dist/features/categories/components/CategoryStoresListing.js +3 -3
  155. package/dist/features/categories/components/CategoryTableColumns.js +10 -6
  156. package/dist/features/categories/components/CategoryTree.js +1 -1
  157. package/dist/features/categories/hooks/useCategories.d.ts +3 -3
  158. package/dist/features/categories/hooks/useCategorySelector.d.ts +3 -3
  159. package/dist/features/categories/hooks/useCategoryTree.d.ts +1 -1
  160. package/dist/features/checkout/hooks/useCheckoutApi.d.ts +2 -2
  161. package/dist/features/classified/components/ClassifiedFilters.js +2 -2
  162. package/dist/features/classified/components/ClassifiedIndexListing.js +9 -3
  163. package/dist/features/collections/components/CollectionCard.js +2 -1
  164. package/dist/features/collections/hooks/useCollections.d.ts +2 -2
  165. package/dist/features/contact/components/ContactForm.js +4 -2
  166. package/dist/features/contact/components/ContactInfoSidebar.js +4 -1
  167. package/dist/features/copilot/components/AdminCopilotView.js +13 -5
  168. package/dist/features/digital-codes/components/DigitalCodesIndexListing.js +9 -3
  169. package/dist/features/events/components/AdminEventEditorView.js +62 -40
  170. package/dist/features/events/components/AdminEventEntriesView.js +9 -6
  171. package/dist/features/events/components/EventCard.js +7 -1
  172. package/dist/features/events/components/EventFormDrawer.js +2 -1
  173. package/dist/features/events/components/EventLeaderboard.js +4 -4
  174. package/dist/features/events/components/EventOfferCard.js +4 -1
  175. package/dist/features/events/components/EventParticipateView.js +3 -2
  176. package/dist/features/events/components/EventPollWidget.js +6 -5
  177. package/dist/features/events/components/EventRaffleEntryForm.js +5 -2
  178. package/dist/features/events/components/EventRaffleWinnerView.js +7 -1
  179. package/dist/features/events/components/EventRafflesSection.js +2 -2
  180. package/dist/features/events/components/EventSaleBanner.js +5 -2
  181. package/dist/features/events/components/EventsIndexListing.js +8 -2
  182. package/dist/features/events/components/EventsListView.js +4 -1
  183. package/dist/features/events/components/SpinWheelView.js +7 -2
  184. package/dist/features/events/hooks/useEvent.d.ts +3 -3
  185. package/dist/features/events/hooks/useEvents.d.ts +1 -1
  186. package/dist/features/events/schemas/firestore.d.ts +1 -0
  187. package/dist/features/events/types/index.d.ts +1 -0
  188. package/dist/features/faq/components/ContactCTA.js +4 -1
  189. package/dist/features/faq/components/FAQCategorySidebar.js +2 -2
  190. package/dist/features/faq/components/FAQHelpfulButtons.js +8 -5
  191. package/dist/features/faq/components/FAQPageContent.js +5 -5
  192. package/dist/features/faq/components/FAQSortDropdown.js +2 -2
  193. package/dist/features/faq/hooks/useFAQs.d.ts +1 -1
  194. package/dist/features/faq/hooks/useFaqList.d.ts +15 -15
  195. package/dist/features/filters/AsyncFacetSection.js +4 -2
  196. package/dist/features/filters/FilterFacetSection.js +14 -6
  197. package/dist/features/filters/RangeFilter.js +4 -2
  198. package/dist/features/filters/SwitchFilter.js +2 -1
  199. package/dist/features/forms/Checkbox.js +1 -1
  200. package/dist/features/forms/Radio.js +1 -1
  201. package/dist/features/forms/Slider.js +1 -1
  202. package/dist/features/homepage/components/AdSlot.js +4 -4
  203. package/dist/features/homepage/components/AdvertisementBanner.js +13 -4
  204. package/dist/features/homepage/components/AnnouncementBar.js +2 -1
  205. package/dist/features/homepage/components/BeforeAfterCard.js +8 -2
  206. package/dist/features/homepage/components/BrandsSection.js +6 -3
  207. package/dist/features/homepage/components/CTABannerSection.js +2 -2
  208. package/dist/features/homepage/components/CharacterHotspot.js +5 -2
  209. package/dist/features/homepage/components/CharacterHotspotForm.js +8 -4
  210. package/dist/features/homepage/components/CustomCardsSection.js +13 -7
  211. package/dist/features/homepage/components/CustomerReviewsSection.js +9 -3
  212. package/dist/features/homepage/components/FAQSection.js +7 -4
  213. package/dist/features/homepage/components/FeaturedBundlesSection.js +8 -2
  214. package/dist/features/homepage/components/FeaturedResultsSection.js +1 -1
  215. package/dist/features/homepage/components/GoogleReviewsSection.js +14 -8
  216. package/dist/features/homepage/components/HeroCarousel.js +1 -1
  217. package/dist/features/homepage/components/HomepageSkeleton.js +7 -1
  218. package/dist/features/homepage/components/HowItWorksInfoView.js +2 -2
  219. package/dist/features/homepage/components/HowItWorksSection.js +2 -2
  220. package/dist/features/homepage/components/NewsletterBanner.js +3 -2
  221. package/dist/features/homepage/components/NewsletterSection.js +5 -2
  222. package/dist/features/homepage/components/PromoGrid.js +4 -1
  223. package/dist/features/homepage/components/SectionCarousel.js +7 -4
  224. package/dist/features/homepage/components/SecurityHighlightsSection.js +3 -3
  225. package/dist/features/homepage/components/ShopByCategorySection.js +10 -4
  226. package/dist/features/homepage/components/SiteFeaturesSection.js +5 -2
  227. package/dist/features/homepage/components/SocialFeedSection.js +4 -4
  228. package/dist/features/homepage/components/SocialPostCard.js +6 -3
  229. package/dist/features/homepage/components/TrustFeaturesSection.js +5 -5
  230. package/dist/features/homepage/components/TrustIndicatorsSection.js +5 -2
  231. package/dist/features/homepage/components/WelcomeSection.js +1 -1
  232. package/dist/features/homepage/components/WhatsAppCommunitySection.js +3 -3
  233. package/dist/features/homepage/hooks/useBlogArticles.d.ts +1 -1
  234. package/dist/features/homepage/hooks/useFeaturedAuctions.d.ts +1 -1
  235. package/dist/features/homepage/hooks/useFeaturedPreOrders.d.ts +1 -1
  236. package/dist/features/homepage/hooks/useFeaturedProducts.d.ts +1 -1
  237. package/dist/features/homepage/hooks/useFeaturedStores.d.ts +1 -1
  238. package/dist/features/homepage/hooks/useHeroCarousel.d.ts +1 -1
  239. package/dist/features/homepage/hooks/useHomepageEvents.d.ts +1 -1
  240. package/dist/features/homepage/hooks/useHomepageReviews.d.ts +1 -1
  241. package/dist/features/homepage/hooks/useHomepageSections.d.ts +1 -1
  242. package/dist/features/homepage/hooks/useTopBrands.d.ts +1 -1
  243. package/dist/features/homepage/hooks/useTopCategories.d.ts +1 -1
  244. package/dist/features/layout/AppLayoutShell.js +2 -1
  245. package/dist/features/layout/BackToTop.js +1 -1
  246. package/dist/features/layout/BottomActions.js +4 -3
  247. package/dist/features/layout/BottomNavItem.js +1 -1
  248. package/dist/features/layout/BottomSheet.js +4 -1
  249. package/dist/features/layout/FooterLayout.js +1 -1
  250. package/dist/features/layout/NavbarLayout.js +4 -1
  251. package/dist/features/layout/SidebarLayout.js +5 -2
  252. package/dist/features/live/components/LiveItemFilters.js +2 -2
  253. package/dist/features/live/components/LiveItemsIndexListing.js +9 -3
  254. package/dist/features/loyalty/components/CoinsDisplay.js +4 -2
  255. package/dist/features/loyalty/hooks/useLoyaltyBalance.d.ts +1 -1
  256. package/dist/features/media/AvatarUpload.js +2 -2
  257. package/dist/features/media/MediaLightbox.js +3 -2
  258. package/dist/features/media/modals/VideoThumbnailSelector.js +4 -1
  259. package/dist/features/media/modals/VideoTrimModal.js +1 -1
  260. package/dist/features/media/upload/CameraCapture.js +1 -1
  261. package/dist/features/media/upload/ImageUpload.js +4 -1
  262. package/dist/features/media/upload/MediaUploadField.js +11 -2
  263. package/dist/features/media/upload/MediaUploadList.js +5 -1
  264. package/dist/features/orders/components/MarketplaceOrderCard.js +2 -2
  265. package/dist/features/orders/components/OrdersList.js +2 -1
  266. package/dist/features/orders/components/RefundHistoryTable.js +4 -1
  267. package/dist/features/orders/components/RefundRequestView.js +2 -1
  268. package/dist/features/orders/hooks/useOrders.d.ts +2 -2
  269. package/dist/features/payments/hooks/usePayments.d.ts +1 -1
  270. package/dist/features/pre-orders/components/MarketplacePreorderCard.js +5 -1
  271. package/dist/features/pre-orders/components/PreOrderActionsClient.js +3 -3
  272. package/dist/features/pre-orders/components/PreOrderBadge.js +2 -1
  273. package/dist/features/pre-orders/components/PreOrderDetailPageView.js +16 -7
  274. package/dist/features/pre-orders/components/PreOrdersIndexListing.js +32 -24
  275. package/dist/features/pre-orders/hooks/usePreOrders.d.ts +2 -2
  276. package/dist/features/products/columns/productTableColumns.js +9 -4
  277. package/dist/features/products/components/AuctionsIndexListing.js +9 -3
  278. package/dist/features/products/components/BidHistory.js +4 -4
  279. package/dist/features/products/components/CompareOverlay.js +10 -2
  280. package/dist/features/products/components/CustomFieldsEditor.js +2 -1
  281. package/dist/features/products/components/CustomSectionTabContent.js +2 -2
  282. package/dist/features/products/components/CustomSectionsEditor.js +3 -2
  283. package/dist/features/products/components/GroupSettingsPanel.js +34 -26
  284. package/dist/features/products/components/MakeOfferButton.js +6 -2
  285. package/dist/features/products/components/MakeOfferForm.js +2 -1
  286. package/dist/features/products/components/MarketplaceBundleCard.js +6 -3
  287. package/dist/features/products/components/MarketplacePrizeDrawCard.js +3 -2
  288. package/dist/features/products/components/PlaceBidForm.js +2 -1
  289. package/dist/features/products/components/PrizeDrawCollage.js +6 -2
  290. package/dist/features/products/components/PrizeDrawDetailPageView.js +6 -1
  291. package/dist/features/products/components/PrizeDrawItemsEditor.js +4 -2
  292. package/dist/features/products/components/PrizeDrawsIndexListing.js +6 -3
  293. package/dist/features/products/components/PrizeDrawsSection.js +2 -2
  294. package/dist/features/products/components/PrizeRevealModal.js +5 -1
  295. package/dist/features/products/components/ProductDetailPageView.js +32 -16
  296. package/dist/features/products/components/ProductFeatureBadges.js +9 -9
  297. package/dist/features/products/components/ProductForm.d.ts +11 -1
  298. package/dist/features/products/components/ProductForm.js +10 -5
  299. package/dist/features/products/components/ProductGalleryClient.js +8 -4
  300. package/dist/features/products/components/ProductGradingTab.js +4 -1
  301. package/dist/features/products/components/ProductGrid.js +35 -14
  302. package/dist/features/products/components/ProductInfo.js +2 -1
  303. package/dist/features/products/components/ProductTabs.js +2 -1
  304. package/dist/features/products/components/ProductTabsShell.js +5 -1
  305. package/dist/features/products/components/ProductsIndexListing.js +32 -24
  306. package/dist/features/products/components/ProductsIndexPageView.js +2 -2
  307. package/dist/features/products/components/RelatedProducts.js +3 -3
  308. package/dist/features/products/components/ShowGroupSection.js +10 -6
  309. package/dist/features/products/components/SublistingCarouselSection.js +7 -3
  310. package/dist/features/products/components/SublistingCategorySelect.d.ts +3 -1
  311. package/dist/features/products/components/SublistingCategorySelect.js +4 -37
  312. package/dist/features/products/constants/action-defs.js +3 -3
  313. package/dist/features/products/hooks/useProductDetail.d.ts +1 -1
  314. package/dist/features/products/hooks/useRelatedProducts.d.ts +1 -1
  315. package/dist/features/promotions/components/CouponCard.js +5 -3
  316. package/dist/features/promotions/components/CouponsIndexListing.js +7 -3
  317. package/dist/features/promotions/hooks/usePromotions.d.ts +2 -2
  318. package/dist/features/promotions/repository/coupons.repository.d.ts +8 -0
  319. package/dist/features/promotions/repository/coupons.repository.js +2 -0
  320. package/dist/features/reviews/components/ReviewDetailPageView.js +3 -3
  321. package/dist/features/reviews/components/ReviewDetailShell.js +15 -3
  322. package/dist/features/reviews/components/ReviewSummary.js +4 -2
  323. package/dist/features/reviews/components/ReviewsIndexListing.js +8 -2
  324. package/dist/features/reviews/components/ReviewsList.js +1 -1
  325. package/dist/features/reviews/hooks/useReviews.d.ts +2 -2
  326. package/dist/features/scams/components/ScamAwarenessModal.js +2 -2
  327. package/dist/features/scams/components/ScamProfileView.js +3 -3
  328. package/dist/features/scams/components/ScamRegistryView.js +6 -4
  329. package/dist/features/search/components/Search.js +9 -6
  330. package/dist/features/search/components/SearchFiltersRow.js +1 -1
  331. package/dist/features/search/components/SearchResultsSection.js +1 -1
  332. package/dist/features/search/hooks/useSearch.d.ts +2 -2
  333. package/dist/features/seller/components/CouponInlineSelect.d.ts +22 -0
  334. package/dist/features/seller/components/CouponInlineSelect.js +103 -0
  335. package/dist/features/seller/components/GroupInlineSelect.d.ts +23 -0
  336. package/dist/features/seller/components/GroupInlineSelect.js +80 -0
  337. package/dist/features/seller/components/PhysicalLocationModal.js +2 -1
  338. package/dist/features/seller/components/PrintCenterView.js +2 -1
  339. package/dist/features/seller/components/ProductInlineSelect.d.ts +24 -0
  340. package/dist/features/seller/components/ProductInlineSelect.js +42 -0
  341. package/dist/features/seller/components/QuickProductForm.js +4 -1
  342. package/dist/features/seller/components/SellerAddressesView.js +8 -3
  343. package/dist/features/seller/components/SellerAnalyticsAlertsView.js +6 -3
  344. package/dist/features/seller/components/SellerAnalyticsView.js +2 -2
  345. package/dist/features/seller/components/SellerBidsView.js +7 -7
  346. package/dist/features/seller/components/SellerBundlesView.js +2 -1
  347. package/dist/features/seller/components/SellerCouponEditorView.d.ts +2 -0
  348. package/dist/features/seller/components/SellerCouponEditorView.js +15 -3
  349. package/dist/features/seller/components/SellerCouponsView.js +1 -1
  350. package/dist/features/seller/components/SellerDashboardView.js +2 -2
  351. package/dist/features/seller/components/SellerDigitalCodesView.js +2 -2
  352. package/dist/features/seller/components/SellerGoogleReviewsView.js +2 -2
  353. package/dist/features/seller/components/SellerGroupedListingsView.js +5 -5
  354. package/dist/features/seller/components/SellerOrdersView.js +13 -10
  355. package/dist/features/seller/components/SellerPayoutMethodsView.js +5 -4
  356. package/dist/features/seller/components/SellerPayoutRequestView.js +5 -1
  357. package/dist/features/seller/components/SellerPayoutSettingsView.js +5 -2
  358. package/dist/features/seller/components/SellerPreOrdersView.js +6 -6
  359. package/dist/features/seller/components/SellerPrizeDrawsView.js +6 -6
  360. package/dist/features/seller/components/SellerProductShell.js +1 -1
  361. package/dist/features/seller/components/SellerProductsCards.js +4 -1
  362. package/dist/features/seller/components/SellerProductsView.js +5 -5
  363. package/dist/features/seller/components/SellerReviewsView.js +7 -3
  364. package/dist/features/seller/components/SellerShippingConfigsView.js +4 -4
  365. package/dist/features/seller/components/SellerShippingView.js +1 -1
  366. package/dist/features/seller/components/SellerSidebar.js +15 -8
  367. package/dist/features/seller/components/SellerStoreCategoriesView.js +1 -1
  368. package/dist/features/seller/components/SellerStorefrontView.js +2 -2
  369. package/dist/features/seller/components/SellerTemplatesView.js +7 -4
  370. package/dist/features/seller/components/SublistingInlineSelect.d.ts +19 -0
  371. package/dist/features/seller/components/SublistingInlineSelect.js +83 -0
  372. package/dist/features/seller/components/analytics/SellerTopProducts.js +1 -1
  373. package/dist/features/seller/components/index.d.ts +8 -0
  374. package/dist/features/seller/components/index.js +4 -0
  375. package/dist/features/seller/hooks/useSellerPayouts.d.ts +3 -3
  376. package/dist/features/seller/hooks/useSellerStore.d.ts +6 -6
  377. package/dist/features/seller/hooks/useSellerStorefront.d.ts +2 -2
  378. package/dist/features/shell/FormShell.js +10 -2
  379. package/dist/features/shell/QuickFormDrawer.js +5 -5
  380. package/dist/features/shell/StepForm.js +6 -6
  381. package/dist/features/site-settings/components/ActionPermissionsManager.js +8 -4
  382. package/dist/features/site-settings/components/NavPermissionsManager.js +7 -4
  383. package/dist/features/stores/components/InteractiveStoreCard.js +5 -1
  384. package/dist/features/stores/components/StoreAboutView.js +4 -1
  385. package/dist/features/stores/components/StoreAddressSelectorCreate.d.ts +2 -1
  386. package/dist/features/stores/components/StoreAddressSelectorCreate.js +5 -31
  387. package/dist/features/stores/components/StoreAuctionsListing.js +6 -3
  388. package/dist/features/stores/components/StoreGuideHubView.js +5 -2
  389. package/dist/features/stores/components/StoreHeader.js +8 -1
  390. package/dist/features/stores/components/StorePreOrdersListing.js +6 -3
  391. package/dist/features/stores/components/StoreProductsListing.js +6 -3
  392. package/dist/features/stores/components/StoreReviewsListing.js +8 -2
  393. package/dist/features/stores/components/StoresIndexListing.js +12 -6
  394. package/dist/features/stores/hooks/useStoreAddressSelector.d.ts +1 -1
  395. package/dist/features/stores/hooks/useStores.d.ts +6 -6
  396. package/dist/features/whatsapp-bot/components/SellerWhatsAppSettingsView.js +7 -1
  397. package/dist/features/whatsapp-bot/components/WhatsAppChatButton.js +2 -1
  398. package/dist/features/wishlist/components/WishlistPage.js +2 -1
  399. package/dist/features/wishlist/hooks/useUserWishlist.d.ts +15 -15
  400. package/dist/features/wishlist/hooks/useWishlist.d.ts +1 -1
  401. package/dist/features/wishlist/hooks/useWishlistWithGuest.d.ts +1 -1
  402. package/dist/index.d.ts +10 -0
  403. package/dist/index.js +13 -1
  404. package/dist/next/components/GlobalError.js +2 -2
  405. package/dist/next/routing/route-map.d.ts +2 -0
  406. package/dist/next/routing/route-map.js +1 -0
  407. package/dist/react/ErrorBoundary.js +2 -2
  408. package/dist/styles.css +2 -1
  409. package/dist/tailwind-utilities.css +1 -1
  410. package/dist/ui/DataTable.js +17 -16
  411. package/dist/ui/components/DateInput.js +2 -2
  412. package/dist/ui/components/DetailPageGallery.js +4 -1
  413. package/dist/ui/components/DetailPageTabs.js +6 -2
  414. package/dist/ui/components/ImageLightbox.js +5 -3
  415. package/dist/ui/components/Input.js +6 -3
  416. package/dist/ui/components/Layout.d.ts +4 -0
  417. package/dist/ui/components/Layout.js +1 -1
  418. package/dist/ui/components/Layout.style.css +1 -0
  419. package/dist/ui/components/ListingFilterDrawer.js +4 -1
  420. package/dist/ui/components/ListingLayout.js +9 -8
  421. package/dist/ui/components/ListingToolbar.js +5 -1
  422. package/dist/ui/components/PaginatedSelect.d.ts +1 -2
  423. package/dist/ui/components/PaginatedSelect.js +1 -2
  424. package/dist/ui/components/Radio.js +1 -1
  425. package/dist/ui/components/Select.js +2 -1
  426. package/dist/ui/components/Slider.js +1 -1
  427. package/dist/ui/components/VacationBanner.js +2 -1
  428. package/dist/ui/components/surface-tokens.d.ts +1 -0
  429. package/dist/ui/components/surface-tokens.js +1 -0
  430. package/package.json +11 -2
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Button } from "@mohasinac/appkit/ui";
2
+ import { Button, Div } from "@mohasinac/appkit/ui";
3
3
  export function AdminFilterBar({ children, columns = 3, className = "", withCard = true, deferred = false, onApply, onReset, pendingCount = 0, labels = { apply: "Apply", reset: "Reset" }, themeConfig = { cardPadding: "p-4", flexEnd: "flex justify-end" }, }) {
4
4
  const gridCols = {
5
5
  1: "grid-cols-1",
@@ -7,7 +7,7 @@ export function AdminFilterBar({ children, columns = 3, className = "", withCard
7
7
  3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3 2xl:grid-cols-4",
8
8
  4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4 xl:grid-cols-4 2xl:grid-cols-4",
9
9
  };
10
- const innerContent = (_jsxs(_Fragment, { children: [_jsx("div", { className: `grid ${gridCols[columns]} gap-4`, "data-section": "adminfilterbar-div-249", children: children }), deferred && (_jsxs("div", { className: `${themeConfig.flexEnd} gap-2 mt-3`, "data-section": "adminfilterbar-div-250", children: [pendingCount > 0 && (_jsx(Button, { variant: "ghost", size: "sm", onClick: onReset, children: labels.reset })), _jsx(Button, { variant: "primary", size: "sm", onClick: onApply, children: pendingCount > 0
10
+ const innerContent = (_jsxs(_Fragment, { children: [_jsx(Div, { className: `grid ${gridCols[columns]} gap-4`, children: children }), deferred && (_jsxs(Div, { className: `${themeConfig.flexEnd} gap-2 mt-3`, children: [pendingCount > 0 && (_jsx(Button, { variant: "ghost", size: "sm", onClick: onReset, children: labels.reset })), _jsx(Button, { variant: "primary", size: "sm", onClick: onApply, children: pendingCount > 0
11
11
  ? `${labels.applyCount || labels.apply} (${pendingCount})`
12
12
  : labels.apply })] }))] }));
13
13
  // If Card component is provided in config, use it; otherwise wrap in plain div
@@ -15,7 +15,7 @@ export function AdminFilterBar({ children, columns = 3, className = "", withCard
15
15
  return (_jsx(themeConfig.Card, { className: `${themeConfig.cardPadding} ${className}`, children: innerContent }));
16
16
  }
17
17
  if (!withCard)
18
- return _jsx("div", { className: className, "data-section": "adminfilterbar-div-251", children: innerContent });
18
+ return _jsx(Div, { className: className, children: innerContent });
19
19
  // Fallback: render as plain div if no Card provided but withCard=true
20
- return (_jsx("div", { className: `${themeConfig.cardPadding} ${className}`, "data-section": "adminfilterbar-div-252", children: innerContent }));
20
+ return (_jsx(Div, { className: `${themeConfig.cardPadding} ${className}`, children: innerContent }));
21
21
  }
@@ -1,43 +1,78 @@
1
1
  "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  /**
4
4
  * AdminGroupedListingsView — admin moderation view for grouped product listings.
5
5
  * W1-29 — pairs with the new GET /api/admin/grouped-listings endpoint.
6
6
  */
7
- import React from "react";
7
+ import React, { useState } from "react";
8
8
  import { ListingLayout } from "../../../ui";
9
+ import { Button, Row, SideDrawer, Stack, Text, useToast, } from "../../../ui";
9
10
  import { toRecordArray, toRelativeDate, toStringValue, } from "../hooks/useAdminListingData";
10
11
  import { DataListingView } from "./DataListingView";
11
- const ADMIN_GROUPED_LISTINGS_CONFIG = {
12
- portal: "admin",
13
- title: "Grouped Listings",
14
- searchPlaceholder: "Search grouped listings by title or seller",
15
- emptyLabel: "No grouped listings",
16
- filterKeys: [],
17
- defaultSort: "-createdAt",
18
- queryKey: ["admin", "grouped-listings"],
19
- endpoint: "/api/admin/grouped-listings",
20
- sortOptions: [
21
- { value: "-createdAt", label: "Newest" },
22
- { value: "createdAt", label: "Oldest" },
23
- { value: "title", label: "Title A–Z" },
24
- ],
25
- mapRows: (response) => toRecordArray(response.items).map((item, index) => ({
26
- id: toStringValue(item.id, `grouped-listing-${index}`),
27
- primary: toStringValue(item.title ?? item.name, "Untitled group"),
28
- secondary: [
29
- toStringValue(item.storeName ?? item.storeId, "Unknown store"),
30
- `${Array.isArray(item.productIds) ? item.productIds.length : 0} items`,
31
- ].join(" · "),
32
- status: toStringValue(item.isActive === false ? "inactive" : "active", "active"),
33
- updatedAt: toRelativeDate(item.updatedAt ?? item.createdAt),
34
- })),
35
- getTotal: (response, mappedRows) => typeof response.total === "number" ? response.total : mappedRows.length,
36
- buildFilters: () => "",
37
- };
12
+ import { ProductInlineSelect } from "../../seller/components/ProductInlineSelect";
13
+ import { apiClient } from "../../../http";
14
+ import { ADMIN_ENDPOINTS } from "../../../constants/api-endpoints";
15
+ function ReassignProductsDrawer({ state, onClose, onSaved, }) {
16
+ const [productIds, setProductIds] = useState(state.currentProductIds);
17
+ const [saving, setSaving] = useState(false);
18
+ const { showToast } = useToast();
19
+ const handleSave = async () => {
20
+ setSaving(true);
21
+ try {
22
+ await apiClient.patch(ADMIN_ENDPOINTS.GROUPED_LISTING_BY_ID(state.groupId), { productIds });
23
+ showToast("Products reassigned.", "success");
24
+ onSaved();
25
+ onClose();
26
+ }
27
+ catch {
28
+ showToast("Failed to save changes.", "error");
29
+ }
30
+ finally {
31
+ setSaving(false);
32
+ }
33
+ };
34
+ return (_jsxs(Stack, { gap: "md", padding: "md", children: [_jsxs(Text, { size: "sm", color: "muted", children: ["Select products to include in \u201C", state.groupTitle, "\u201D. Changes replace the current list."] }), _jsx(ProductInlineSelect, { scope: "admin", multiple: true, value: productIds, onChange: setProductIds, placeholder: "Search products to add\u2026" }), _jsxs(Row, { justify: "end", gap: "sm", children: [_jsx(Button, { variant: "outline", onClick: onClose, disabled: saving, children: "Cancel" }), _jsxs(Button, { variant: "primary", onClick: handleSave, disabled: saving, isLoading: saving, children: ["Save (", productIds.length, " product", productIds.length !== 1 ? "s" : "", ")"] })] })] }));
35
+ }
38
36
  export function AdminGroupedListingsView({ children, ...props }) {
37
+ const [reassign, setReassign] = useState(null);
38
+ const [refreshKey, setRefreshKey] = useState(0);
39
+ const config = React.useMemo(() => ({
40
+ portal: "admin",
41
+ title: "Grouped Listings",
42
+ searchPlaceholder: "Search grouped listings by title or seller",
43
+ emptyLabel: "No grouped listings",
44
+ filterKeys: [],
45
+ defaultSort: "-createdAt",
46
+ queryKey: ["admin", "grouped-listings", refreshKey],
47
+ endpoint: ADMIN_ENDPOINTS.GROUPED_LISTINGS,
48
+ sortOptions: [
49
+ { value: "-createdAt", label: "Newest" },
50
+ { value: "createdAt", label: "Oldest" },
51
+ { value: "title", label: "Title A–Z" },
52
+ ],
53
+ mapRows: (response) => toRecordArray(response.items).map((item, index) => ({
54
+ id: toStringValue(item.id, `grouped-listing-${index}`),
55
+ primary: toStringValue(item.title ?? item.name, "Untitled group"),
56
+ secondary: [
57
+ toStringValue(item.storeName ?? item.storeId, "Unknown store"),
58
+ `${Array.isArray(item.productIds) ? item.productIds.length : 0} items`,
59
+ ].join(" · "),
60
+ status: toStringValue(item.isActive === false ? "inactive" : "active", "active"),
61
+ updatedAt: toRelativeDate(item.updatedAt ?? item.createdAt),
62
+ _raw: item,
63
+ })),
64
+ getTotal: (response, mappedRows) => typeof response.total === "number" ? response.total : mappedRows.length,
65
+ buildFilters: () => "",
66
+ renderRowActions: (row) => (_jsx(Button, { size: "sm", variant: "outline", onClick: () => setReassign({
67
+ groupId: row.id,
68
+ groupTitle: row.primary,
69
+ currentProductIds: Array.isArray(row._raw?.productIds)
70
+ ? (row._raw?.productIds ?? []).map(String)
71
+ : [],
72
+ }), children: "Reassign products" })),
73
+ }), [refreshKey]);
39
74
  if (React.Children.count(children) > 0) {
40
75
  return (_jsx(ListingLayout, { portal: "admin", ...props, children: children }));
41
76
  }
42
- return _jsx(DataListingView, { config: ADMIN_GROUPED_LISTINGS_CONFIG });
77
+ return (_jsxs(_Fragment, { children: [_jsx(DataListingView, { config: config }), _jsx(SideDrawer, { isOpen: reassign !== null, onClose: () => setReassign(null), title: reassign ? `Reassign products — ${reassign.groupTitle}` : "Reassign products", children: reassign && (_jsx(ReassignProductsDrawer, { state: reassign, onClose: () => setReassign(null), onSaved: () => setRefreshKey((k) => k + 1) })) })] }));
43
78
  }
@@ -2,6 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Users, Package, Store, ShoppingBag, FileText, Settings, Shield, BarChart2, AlertTriangle, BookOpen, } from "lucide-react";
3
3
  import { Div, Heading, Text, Section, Alert } from "../../../ui";
4
4
  import { ROUTES } from "../../../next/routing/route-map";
5
+ const CLS_WARN_PANEL = "rounded-2xl border border-amber-200 bg-warning-surface dark:border-amber-800 p-6";
6
+ const CLS_WARN_HEAD = "font-semibold text-amber-800 dark:text-amber-300 mb-1";
7
+ const CLS_WARN_BODY = "text-sm text-amber-700 dark:text-amber-400";
5
8
  const GUIDE_CARDS = [
6
9
  {
7
10
  Icon: Users,
@@ -75,5 +78,5 @@ export function AdminGuideHubView({ permissions = [], isFullAdmin = false }) {
75
78
  background: "linear-gradient(135deg,var(--appkit-color-primary-700,#4f46e5) 0%,var(--appkit-color-cobalt,#2563eb) 60%,var(--appkit-color-secondary-400,#7c3aed) 100%)",
76
79
  }, children: [_jsxs(Div, { className: "flex items-center gap-3 mb-3", children: [_jsx(Div, { className: "flex-shrink-0 w-10 h-10 rounded-xl bg-white/20 flex items-center justify-center", children: _jsx(BookOpen, { className: "w-5 h-5 text-white" }) }), _jsx(Text, { className: "text-sm font-semibold text-white/80 uppercase tracking-widest", children: "Admin & Employee Guide" })] }), _jsx(Heading, { level: 1, className: "text-2xl md:text-3xl font-bold text-white mb-2", children: "LetItRip Internal Guide" }), _jsx(Text, { className: "text-white/80 text-base", children: "Everything you need to operate and manage LetItRip \u2014 India's largest collectibles marketplace." })] }) }), _jsx(Alert, { variant: "info", compact: true, children: "These guides describe expected platform behaviour. Real access to each section is enforced independently by the permission system \u2014 this page is reference only." }), !hasAny && (_jsx(Alert, { variant: "info", title: "Limited access", children: "Your permission set doesn't include read access to any admin sections yet. Contact your admin to request the permissions you need." })), hasAny && (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "text-lg font-semibold text-[var(--appkit-color-text)] mb-4", children: "Guides" }), _jsx(Div, { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3", children: visibleCards.map(({ Icon, title, description, href }) => (_jsxs("a", { href: href, className: "group flex flex-col gap-3 rounded-xl border border-[var(--appkit-color-border)] bg-[var(--appkit-color-surface)] p-5 hover:border-[var(--appkit-color-primary)] hover:shadow-md transition-all", children: [_jsxs(Div, { className: "flex items-center gap-3", children: [_jsx(Div, { className: "flex-shrink-0 w-9 h-9 rounded-lg flex items-center justify-center", style: {
77
80
  background: "linear-gradient(135deg,var(--appkit-color-primary-700,#4f46e5) 0%,var(--appkit-color-cobalt,#2563eb) 100%)",
78
- }, children: _jsx(Icon, { className: "w-4 h-4 text-white" }) }), _jsx(Text, { className: "font-semibold text-[var(--appkit-color-text)] group-hover:text-[var(--appkit-color-primary)] transition-colors", children: title })] }), _jsx(Text, { className: "text-sm text-[var(--appkit-color-text-muted)] leading-relaxed", children: description }), _jsx(Text, { className: "text-xs font-medium text-[var(--appkit-color-primary)] mt-auto", children: "Read guide \u2192" })] }, title))) })] })), _jsx(Section, { className: "rounded-2xl border border-amber-200 bg-warning-surface dark:border-amber-800 p-6", children: _jsxs(Div, { className: "flex items-start gap-3", children: [_jsx(AlertTriangle, { className: "w-5 h-5 text-warning flex-shrink-0 mt-0.5" }), _jsxs(Div, { children: [_jsx(Text, { className: "font-semibold text-amber-800 dark:text-amber-300 mb-1", children: "Remember: with great access comes responsibility" }), _jsx(Text, { className: "text-sm text-amber-700 dark:text-amber-400", children: "Admin actions are logged. Never access user PII (email, phone) without a legitimate support reason. Never grant capabilities or permissions without documented approval. When in doubt, escalate to a senior admin." })] })] }) })] }));
81
+ }, children: _jsx(Icon, { className: "w-4 h-4 text-white" }) }), _jsx(Text, { className: "font-semibold text-[var(--appkit-color-text)] group-hover:text-[var(--appkit-color-primary)] transition-colors", children: title })] }), _jsx(Text, { className: "text-sm text-[var(--appkit-color-text-muted)] leading-relaxed", children: description }), _jsx(Text, { className: "text-xs font-medium text-[var(--appkit-color-primary)] mt-auto", children: "Read guide \u2192" })] }, title))) })] })), _jsx(Section, { className: CLS_WARN_PANEL, children: _jsxs(Div, { className: "flex items-start gap-3", children: [_jsx(AlertTriangle, { className: "w-5 h-5 text-warning flex-shrink-0 mt-0.5" }), _jsxs(Div, { children: [_jsx(Text, { className: CLS_WARN_HEAD, children: "Remember: with great access comes responsibility" }), _jsx(Text, { className: CLS_WARN_BODY, children: "Admin actions are logged. Never access user PII (email, phone) without a legitimate support reason. Never grant capabilities or permissions without documented approval. When in doubt, escalate to a senior admin." })] })] }) })] }));
79
82
  }
@@ -4,6 +4,9 @@ import React from "react";
4
4
  import { Alert, Button, Div, Input, Select, StackedViewShell, Text, useToast, } from "../../../ui";
5
5
  import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
6
6
  import { MediaUploadField, MediaUploadList, useMediaCleanup, useMediaUpload, } from "../../media";
7
+ const __P = {
8
+ p4: "p-4",
9
+ };
7
10
  const PREFIX_OPTIONS = [
8
11
  { value: "", label: "All" },
9
12
  { value: "products/", label: "Products" },
@@ -58,7 +61,7 @@ function MediaBrowser({ onCopy }) {
58
61
  return files;
59
62
  return files.filter((f) => f.name.toLowerCase().includes(q));
60
63
  }, [files, search]);
61
- return (_jsxs(Div, { className: "space-y-3 rounded-xl border border-zinc-200 bg-white p-4 dark:border-slate-700 dark:bg-slate-900", children: [_jsx(Text, { className: "text-sm font-semibold text-zinc-900 dark:text-zinc-100", children: "Browse existing media" }), _jsxs(Div, { className: "flex flex-wrap items-center gap-2", children: [_jsx(Select, { value: prefix, onChange: (e) => setPrefix(e.target.value), options: PREFIX_OPTIONS, "aria-label": "Prefix filter", className: "min-w-[140px]" }), _jsx(Input, { type: "text", placeholder: "Search filename\u2026", value: search, onChange: (e) => setSearch(e.target.value), className: "flex-1 min-w-[160px]" })] }), error && (_jsx(Alert, { variant: "error", title: "Load failed", children: error })), _jsxs(Div, { className: "grid grid-cols-2 gap-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6", children: [filtered.map((f) => {
64
+ return (_jsxs(Div, { className: `space-y-3 rounded-xl border border-zinc-200 bg-white ${__P.p4} dark:border-slate-700 dark:bg-slate-900`, children: [_jsx(Text, { className: "text-sm font-semibold text-zinc-900 dark:text-zinc-100", children: "Browse existing media" }), _jsxs(Div, { className: "flex flex-wrap items-center gap-2", children: [_jsx(Select, { value: prefix, onChange: (e) => setPrefix(e.target.value), options: PREFIX_OPTIONS, "aria-label": "Prefix filter", className: "min-w-[140px]" }), _jsx(Input, { type: "text", placeholder: "Search filename\u2026", value: search, onChange: (e) => setSearch(e.target.value), className: "flex-1 min-w-[160px]" })] }), error && (_jsx(Alert, { variant: "error", title: "Load failed", children: error })), _jsxs(Div, { className: "grid grid-cols-2 gap-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6", children: [filtered.map((f) => {
62
65
  const isImage = (f.contentType ?? "").startsWith("image/");
63
66
  return (_jsxs(Div, { className: "group rounded-lg border border-zinc-200 dark:border-slate-700 overflow-hidden bg-zinc-50 dark:bg-slate-800", children: [_jsx(Div, { className: "aspect-square flex items-center justify-center bg-zinc-100 dark:bg-slate-700 text-xs text-zinc-500 dark:text-zinc-400", children: isImage ? (
64
67
  // eslint-disable-next-line @next/next/no-img-element
@@ -2,13 +2,16 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import React from "react";
4
4
  import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
5
- import { Alert, Button, ConfirmDeleteModal, RowActionMenu, StackedViewShell, Text, Toggle, useToast } from "../../../ui";
5
+ import { Alert, Button, ConfirmDeleteModal, Div, RowActionMenu, Span, StackedViewShell, Text, Toggle, useToast } from "../../../ui";
6
6
  import { apiClient } from "../../../http";
7
7
  import { ADMIN_ENDPOINTS } from "../../../constants/api-endpoints";
8
8
  import { AdminNavEditorView } from "./AdminNavEditorView";
9
9
  import { ROW_ACTION_META, ROW_ACTION_ID } from "../../../features/products/constants/action-defs";
10
+ const __O = {
11
+ hidden: "overflow-hidden",
12
+ };
10
13
  function NavItemRow({ item, idx, total, reorderPending, onMoveUp, onMoveDown, onVisibilityChange, onEdit, onDelete, }) {
11
- return (_jsxs("div", { className: "flex items-center gap-3 px-4 py-3 bg-white dark:bg-zinc-900", children: [_jsxs("div", { className: "flex flex-col gap-0.5 shrink-0", children: [_jsx("button", { type: "button", onClick: () => onMoveUp(idx), disabled: idx === 0 || reorderPending, className: "text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 disabled:opacity-30 leading-none text-xs", "aria-label": "Move up", children: "\u25B2" }), _jsx("button", { type: "button", onClick: () => onMoveDown(idx), disabled: idx >= total - 1 || reorderPending, className: "text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 disabled:opacity-30 leading-none text-xs", "aria-label": "Move down", children: "\u25BC" })] }), _jsxs("div", { className: "flex-1 min-w-0", children: [_jsxs(Text, { className: "text-sm font-medium text-zinc-800 dark:text-zinc-100 truncate", children: [item.parentId ? _jsx("span", { className: "text-zinc-400 mr-1", children: "\u21B3" }) : null, item.label] }), _jsx(Text, { className: "text-xs text-zinc-500 dark:text-zinc-400 truncate", children: item.href })] }), _jsx(Toggle, { checked: item.isVisible ?? true, onChange: (val) => onVisibilityChange(item.id, val), label: "" }), _jsx(RowActionMenu, { actions: [
14
+ return (_jsxs(Div, { surface: "default", className: "flex items-center gap-3 px-4 py-3", children: [_jsxs(Div, { className: "flex flex-col gap-0.5 shrink-0", children: [_jsx(Button, { variant: "ghost", type: "button", onClick: () => onMoveUp(idx), disabled: idx === 0 || reorderPending, className: "text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 disabled:opacity-30 leading-none text-xs p-0 min-h-0 h-auto rounded-none", "aria-label": "Move up", children: "\u25B2" }), _jsx(Button, { variant: "ghost", type: "button", onClick: () => onMoveDown(idx), disabled: idx >= total - 1 || reorderPending, className: "text-zinc-400 hover:text-zinc-700 dark:hover:text-zinc-200 disabled:opacity-30 leading-none text-xs p-0 min-h-0 h-auto rounded-none", "aria-label": "Move down", children: "\u25BC" })] }), _jsxs(Div, { className: "flex-1 min-w-0", children: [_jsxs(Text, { className: "text-sm font-medium text-zinc-800 dark:text-zinc-100 truncate", children: [item.parentId ? _jsx(Span, { className: "text-zinc-400 mr-1", children: "\u21B3" }) : null, item.label] }), _jsx(Text, { className: "text-xs text-zinc-500 dark:text-zinc-400 truncate", children: item.href })] }), _jsx(Toggle, { checked: item.isVisible ?? true, onChange: (val) => onVisibilityChange(item.id, val), label: "" }), _jsx(RowActionMenu, { actions: [
12
15
  { label: ROW_ACTION_META[ROW_ACTION_ID.EDIT].label, onClick: () => onEdit(item) },
13
16
  { label: ROW_ACTION_META[ROW_ACTION_ID.DELETE].label, destructive: true, onClick: () => onDelete(item) },
14
17
  ] })] }));
@@ -78,11 +81,11 @@ export function AdminNavigationView({ labels = {}, ...rest }) {
78
81
  return (_jsxs(_Fragment, { children: [_jsx(StackedViewShell, { portal: "admin", ...rest, title: labels.title ?? "Navigation", sections: [
79
82
  isLoading ? (_jsx(Alert, { variant: "info", title: "Loading", children: "Fetching nav items\u2026" }, "loading")) : null,
80
83
  error ? (_jsx(Alert, { variant: "error", title: "Load failed", children: error instanceof Error ? error.message : "Unknown error" }, "error")) : null,
81
- _jsxs("div", { className: "flex items-center justify-between mb-4", children: [_jsxs(Text, { className: "text-sm text-zinc-500 dark:text-zinc-400", children: [sorted.length, " nav item", sorted.length !== 1 ? "s" : ""] }), _jsx(Button, { onClick: () => {
84
+ _jsxs(Div, { className: "flex items-center justify-between mb-4", children: [_jsxs(Text, { className: "text-sm text-zinc-500 dark:text-zinc-400", children: [sorted.length, " nav item", sorted.length !== 1 ? "s" : ""] }), _jsx(Button, { onClick: () => {
82
85
  setEditing(null);
83
86
  setDrawerOpen(true);
84
87
  }, children: "+ New item" })] }, "header"),
85
88
  sorted.length === 0 && !isLoading ? (_jsx(Text, { className: "text-sm text-zinc-400 dark:text-zinc-400 py-8 text-center", children: "No nav items yet. Click \"New item\" to add one." }, "empty")) : null,
86
- _jsx("div", { className: "divide-y divide-zinc-200 dark:divide-zinc-700 rounded-lg border border-zinc-200 dark:border-zinc-700 overflow-hidden", children: sorted.map((item, idx) => (_jsx(NavItemRow, { item: item, idx: idx, total: sorted.length, reorderPending: reorderMutation.isPending, onMoveUp: handleMoveUp, onMoveDown: handleMoveDown, onVisibilityChange: (id, isVisible) => visibilityMutation.mutate({ id, isVisible }), onEdit: (i) => { setEditing(i); setDrawerOpen(true); }, onDelete: setDeleteTarget }, item.id))) }, "list"),
89
+ _jsx(Div, { className: `divide-y divide-zinc-200 dark:divide-zinc-700 rounded-lg border border-zinc-200 dark:border-zinc-700 ${__O.hidden}`, children: sorted.map((item, idx) => (_jsx(NavItemRow, { item: item, idx: idx, total: sorted.length, reorderPending: reorderMutation.isPending, onMoveUp: handleMoveUp, onMoveDown: handleMoveDown, onVisibilityChange: (id, isVisible) => visibilityMutation.mutate({ id, isVisible }), onEdit: (i) => { setEditing(i); setDrawerOpen(true); }, onDelete: setDeleteTarget }, item.id))) }, "list"),
87
90
  ] }), _jsx(AdminNavEditorView, { open: drawerOpen, onClose: () => setDrawerOpen(false), onSaved: () => queryClient.invalidateQueries({ queryKey: ["admin", "navigation"] }), item: editing, parentOptions: parentOptions }), _jsx(ConfirmDeleteModal, { isOpen: Boolean(deleteTarget), onClose: () => setDeleteTarget(null), onConfirm: () => deleteMutation.mutate(deleteTarget.id), isDeleting: deleteMutation.isPending, title: "Delete nav item", message: `Remove "${deleteTarget?.label}" from navigation? This cannot be undone.` })] }));
88
91
  }
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import React, { useState } from "react";
4
4
  import { useMutation, useQueryClient } from "@tanstack/react-query";
5
- import { ConfirmDeleteModal, ListingLayout, RowActionMenu, Text, useToast } from "../../../ui";
5
+ import { ConfirmDeleteModal, Div, ListingLayout, RowActionMenu, Text, useToast } from "../../../ui";
6
6
  import { ADMIN_ENDPOINTS } from "../../../constants/api-endpoints";
7
7
  import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
8
8
  import { ROW_ACTION_META, ROW_ACTION_ID } from "../../products/constants/action-defs";
@@ -94,7 +94,7 @@ export function AdminNotificationsView({ children, ...props }) {
94
94
  onClick: () => setDeleteTarget(row),
95
95
  },
96
96
  ] })),
97
- renderFilterPanel: ({ pendingFilters, setPendingFilters }) => (_jsxs("div", { className: "space-y-2", children: [_jsx(Text, { className: "text-xs font-semibold uppercase tracking-widest text-zinc-500 dark:text-zinc-400", children: "Type" }), _jsx("div", { className: "flex flex-wrap gap-2", children: NOTIF_TYPES.map((opt) => (_jsx("button", { type: "button", onClick: () => setPendingFilters((p) => ({ ...p, type: opt === "All" ? "" : opt })), className: `rounded-full px-3 py-1 text-xs font-medium border transition-colors ${(pendingFilters.type || "All") === opt
97
+ renderFilterPanel: ({ pendingFilters, setPendingFilters }) => (_jsxs(Div, { className: "space-y-2", children: [_jsx(Text, { className: "text-xs font-semibold uppercase tracking-widest text-zinc-500 dark:text-zinc-400", children: "Type" }), _jsx(Div, { className: "flex flex-wrap gap-2", children: NOTIF_TYPES.map((opt) => (_jsx("button", { type: "button", onClick: () => setPendingFilters((p) => ({ ...p, type: opt === "All" ? "" : opt })), className: `rounded-full px-3 py-1 text-xs font-medium border transition-colors ${(pendingFilters.type || "All") === opt
98
98
  ? "bg-primary text-white border-primary"
99
99
  : "border-zinc-300 dark:border-slate-600 text-zinc-700 dark:text-zinc-300 hover:bg-zinc-50 dark:hover:bg-slate-800"}`, children: opt }, opt))) })] })),
100
100
  };
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import React from "react";
4
4
  import { useMutation, useQueryClient } from "@tanstack/react-query";
5
- import { Button, Form, FormActions, Input, Select, SideDrawer, useToast, } from "../../../ui";
5
+ import { Button, Div, Form, FormActions, Input, Label, Select, SideDrawer, useToast, } from "../../../ui";
6
6
  import { apiClient } from "../../../http";
7
7
  import { ADMIN_ENDPOINTS } from "../../../constants/api-endpoints";
8
8
  const STATUS_OPTIONS = [
@@ -70,5 +70,5 @@ export function AdminOrderEditorView({ open, onClose, orderId, orderLabel, curre
70
70
  return (_jsx(SideDrawer, { isOpen: open, onClose: onClose, title: orderLabel ? `Order: ${orderLabel}` : "Update Order", children: _jsxs(Form, { onSubmit: (e) => {
71
71
  e.preventDefault();
72
72
  saveMutation.mutate();
73
- }, className: "space-y-4 p-4", children: [_jsx(Select, { label: "Order status", options: STATUS_OPTIONS, value: status, onValueChange: setStatus }), _jsx(Input, { label: "Tracking number (optional)", value: trackingNumber, onChange: (e) => setTrackingNumber(e.target.value), placeholder: "e.g. DEL1234567890IN" }), _jsx(Select, { label: "Carrier (optional)", options: CARRIER_OPTIONS, value: carrier, onValueChange: setCarrier }), _jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("label", { className: "text-sm font-medium text-zinc-700 dark:text-zinc-300", children: "Internal note (optional)" }), _jsx("textarea", { value: notes, onChange: (e) => setNotes(e.target.value), rows: 3, placeholder: "Reason for status change, escalation notes\u2026", className: "w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-white dark:bg-zinc-800 px-3 py-2 text-sm text-zinc-900 dark:text-zinc-100 placeholder-zinc-400 focus:outline-none focus:ring-2 focus:ring-primary-500" })] }), (status === "refunded" || status === "return_requested") && (_jsx(Input, { label: "Refund amount \u20B9 (optional)", type: "number", min: "0", step: "0.01", value: refundAmount, onChange: (e) => setRefundAmount(e.target.value), placeholder: "e.g. 499.00" })), _jsxs(FormActions, { align: "right", children: [_jsx(Button, { type: "button", variant: "secondary", onClick: onClose, children: "Cancel" }), _jsx(Button, { type: "submit", isLoading: saveMutation.isPending, disabled: !orderId || saveMutation.isPending, children: "Save changes" })] })] }) }));
73
+ }, className: "space-y-4 p-4", children: [_jsx(Select, { label: "Order status", options: STATUS_OPTIONS, value: status, onValueChange: setStatus }), _jsx(Input, { label: "Tracking number (optional)", value: trackingNumber, onChange: (e) => setTrackingNumber(e.target.value), placeholder: "e.g. DEL1234567890IN" }), _jsx(Select, { label: "Carrier (optional)", options: CARRIER_OPTIONS, value: carrier, onValueChange: setCarrier }), _jsxs(Div, { className: "flex flex-col gap-1", children: [_jsx(Label, { className: "text-sm font-medium text-zinc-700 dark:text-zinc-300", children: "Internal note (optional)" }), _jsx("textarea", { value: notes, onChange: (e) => setNotes(e.target.value), rows: 3, placeholder: "Reason for status change, escalation notes\u2026", className: "w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-white dark:bg-zinc-800 px-3 py-2 text-sm text-zinc-900 dark:text-zinc-100 placeholder-zinc-400 focus:outline-none focus:ring-2 focus:ring-primary-500" })] }), (status === "refunded" || status === "return_requested") && (_jsx(Input, { label: "Refund amount \u20B9 (optional)", type: "number", min: "0", step: "0.01", value: refundAmount, onChange: (e) => setRefundAmount(e.target.value), placeholder: "e.g. 499.00" })), _jsxs(FormActions, { align: "right", children: [_jsx(Button, { type: "button", variant: "secondary", onClick: onClose, children: "Cancel" }), _jsx(Button, { type: "submit", isLoading: saveMutation.isPending, disabled: !orderId || saveMutation.isPending, children: "Save changes" })] })] }) }));
74
74
  }
@@ -1,11 +1,14 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Heading, Nav, Text, Span, Button, Row } from "@mohasinac/appkit/ui";
2
+ import { Div, Heading, Nav, Text, Span, Button, Row } from "@mohasinac/appkit/ui";
3
3
  import { ChevronRight } from "lucide-react";
4
+ const __P = {
5
+ p6: "p-6",
6
+ };
4
7
  export function AdminPageHeader({ title, subtitle, description, badge, breadcrumb, actionLabel, onAction, actionIcon, actionDisabled = false, className = "", themeConfig = {
5
8
  gradient: "bg-blue-50",
6
9
  titleClass: "text-3xl font-bold",
7
10
  subtitleClass: "text-lg text-gray-700",
8
11
  spacingClass: "space-y-1",
9
12
  }, }) {
10
- return (_jsxs("div", { className: `${themeConfig.gradient} p-6 ${className}`, "data-section": "adminpageheader-div-253", children: [breadcrumb && breadcrumb.length > 0 && (_jsx(Nav, { "aria-label": "Breadcrumb", className: "mb-3 flex items-center gap-1 text-sm text-zinc-500 dark:text-zinc-400", children: breadcrumb.map((crumb, index) => (_jsxs(Span, { className: "flex items-center gap-1", children: [index > 0 && _jsx(ChevronRight, { className: "w-3 h-3 flex-shrink-0" }), crumb.href && themeConfig.TextLink ? (_jsx(themeConfig.TextLink, { href: crumb.href, className: "hover:text-zinc-700 dark:hover:text-zinc-200 transition-colors", children: crumb.label })) : (_jsx(Span, { className: "text-zinc-700 dark:text-zinc-200 font-medium", children: crumb.label }))] }, index))) })), _jsxs("div", { className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4", "data-section": "adminpageheader-div-254", children: [_jsxs("div", { className: themeConfig.spacingClass, "data-section": "adminpageheader-div-255", children: [_jsxs(Row, { gap: "sm", wrap: true, children: [_jsx(Heading, { level: 2, className: themeConfig.titleClass, children: title }), badge && _jsx(Span, { className: "flex-shrink-0", children: badge })] }), subtitle && (_jsx(Text, { className: themeConfig.subtitleClass, children: subtitle })), description && (_jsx(Text, { className: "text-sm text-zinc-500 dark:text-zinc-400 mt-1", children: description }))] }), actionLabel && onAction && (_jsxs(Button, { variant: "primary", onClick: onAction, disabled: actionDisabled, className: "flex-shrink-0", children: [actionIcon, actionLabel] }))] })] }));
13
+ return (_jsxs(Div, { className: `${themeConfig.gradient} ${__P.p6} ${className}`, children: [breadcrumb && breadcrumb.length > 0 && (_jsx(Nav, { "aria-label": "Breadcrumb", className: "mb-3 flex items-center gap-1 text-sm text-zinc-500 dark:text-zinc-400", children: breadcrumb.map((crumb, index) => (_jsxs(Span, { className: "flex items-center gap-1", children: [index > 0 && _jsx(ChevronRight, { className: "w-3 h-3 flex-shrink-0" }), crumb.href && themeConfig.TextLink ? (_jsx(themeConfig.TextLink, { href: crumb.href, className: "hover:text-zinc-700 dark:hover:text-zinc-200 transition-colors", children: crumb.label })) : (_jsx(Span, { weight: "medium", className: "text-zinc-700 dark:text-zinc-200", children: crumb.label }))] }, index))) })), _jsxs(Div, { className: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4", children: [_jsxs(Div, { className: themeConfig.spacingClass, children: [_jsxs(Row, { gap: "sm", wrap: true, children: [_jsx(Heading, { level: 2, className: themeConfig.titleClass, children: title }), badge && _jsx(Span, { className: "flex-shrink-0", children: badge })] }), subtitle && (_jsx(Text, { className: themeConfig.subtitleClass, children: subtitle })), description && (_jsx(Text, { className: "text-sm text-zinc-500 dark:text-zinc-400 mt-1", children: description }))] }), actionLabel && onAction && (_jsxs(Button, { variant: "primary", onClick: onAction, disabled: actionDisabled, className: "flex-shrink-0", children: [actionIcon, actionLabel] }))] })] }));
11
14
  }
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import React from "react";
4
4
  import { Pencil } from "lucide-react";
5
- import { Badge, Button, FilterChipGroup, ListingLayout, Text } from "../../../ui";
5
+ import { Badge, Button, Div, FilterChipGroup, ListingLayout, Span, Text } from "../../../ui";
6
6
  import { ADMIN_ENDPOINTS } from "../../../constants/api-endpoints";
7
7
  import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
8
8
  import { ADMIN_PRODUCT_STATUS_TABS } from "../constants/filter-tabs";
@@ -22,13 +22,13 @@ const PRIZE_DRAW_COLUMNS = [
22
22
  {
23
23
  key: "primary",
24
24
  header: "Prize Draw",
25
- render: (row) => (_jsxs("div", { className: "space-y-1", children: [_jsx(Text, { className: "font-semibold text-[var(--appkit-color-text)] line-clamp-1", children: row.primary }), _jsx(Text, { className: "text-xs text-[var(--appkit-color-text-muted)]", children: row.storeName })] })),
25
+ render: (row) => (_jsxs(Div, { className: "space-y-1", children: [_jsx(Text, { className: "font-semibold text-[var(--appkit-color-text)] line-clamp-1", children: row.primary }), _jsx(Text, { className: "text-xs text-[var(--appkit-color-text-muted)]", children: row.storeName })] })),
26
26
  },
27
27
  {
28
28
  key: "entryFee",
29
29
  header: "Entry Fee",
30
30
  className: "w-28 text-right",
31
- render: (row) => (_jsx("span", { className: "text-sm font-medium text-[var(--appkit-color-text)]", children: row.entryFee })),
31
+ render: (row) => (_jsx(Span, { size: "sm", weight: "medium", className: "text-[var(--appkit-color-text)]", children: row.entryFee })),
32
32
  },
33
33
  {
34
34
  key: "status",
@@ -41,14 +41,14 @@ const PRIZE_DRAW_COLUMNS = [
41
41
  key: "drawDate",
42
42
  header: "Draw Date",
43
43
  className: "w-32",
44
- render: (row) => (_jsx("span", { className: "text-sm text-[var(--appkit-color-text-muted)]", children: row.drawDate })),
44
+ render: (row) => (_jsx(Span, { size: "sm", className: "text-[var(--appkit-color-text-muted)]", children: row.drawDate })),
45
45
  },
46
46
  {
47
47
  key: "updatedAt",
48
48
  header: "Updated",
49
49
  sortable: true,
50
50
  className: "w-32",
51
- render: (row) => (_jsx("span", { className: "text-sm text-[var(--appkit-color-text-muted)]", children: row.updatedAt })),
51
+ render: (row) => (_jsx(Span, { size: "sm", className: "text-[var(--appkit-color-text-muted)]", children: row.updatedAt })),
52
52
  },
53
53
  ];
54
54
  export function AdminPrizeDrawsView({ children, ...props }) {
@@ -2,14 +2,21 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import React from "react";
4
4
  import { useMutation, useQuery } from "@tanstack/react-query";
5
- import { Button, Card, CardBody, ConfirmDeleteModal, PaginatedSelect, Form, Stack, StackedViewShell, Tabs, TabsContent, TabsList, TabsTrigger, Text, useToast, } from "../../../ui";
5
+ import { Button, Card, CardBody, ConfirmDeleteModal, Div, PaginatedSelect, Form, Stack, StackedViewShell, Tabs, TabsContent, TabsList, TabsTrigger, Text, useToast, } from "../../../ui";
6
6
  import { apiClient } from "../../../http";
7
7
  import { ADMIN_ENDPOINTS } from "../../../constants/api-endpoints";
8
8
  import { ProductForm } from "../../products/components/ProductForm";
9
9
  import { normalizeListingType } from "../../products/utils/listing-type";
10
10
  import { GroupSettingsPanel } from "../../products/components/GroupSettingsPanel";
11
+ import { GroupInlineSelect } from "../../seller/components/GroupInlineSelect";
11
12
  import { CategoryQuickCreateForm } from "./CategoryQuickCreateForm";
12
13
  import { BrandQuickCreateForm } from "./BrandQuickCreateForm";
14
+ const __P = {
15
+ p4: "p-4",
16
+ };
17
+ const __O = {
18
+ yAuto: "overflow-y-auto",
19
+ };
13
20
  function modeFromProduct(product) {
14
21
  const lt = normalizeListingType(product);
15
22
  if (lt === "auction")
@@ -145,12 +152,12 @@ export function AdminProductEditorView({ productId, onSaved, onDeleted, embedded
145
152
  const formContent = (_jsxs(Form, { id: "product-editor-form", onSubmit: (e) => {
146
153
  e.preventDefault();
147
154
  saveMutation.mutate();
148
- }, className: "space-y-6", children: [_jsxs(Card, { variant: "outlined", padding: "lg", children: [_jsx(Text, { className: "text-xs font-semibold uppercase tracking-widest text-zinc-500 dark:text-zinc-400 mb-4", children: "Listing Type" }), _jsxs(Tabs, { value: mode, onChange: handleModeChange, children: [_jsxs(TabsList, { children: [(!enabledListingTypes || enabledListingTypes.includes("standard")) && (_jsx(TabsTrigger, { value: "standard", children: "Standard" })), (!enabledListingTypes || enabledListingTypes.includes("auction")) && (_jsx(TabsTrigger, { value: "auction", children: "Auction" })), (!enabledListingTypes || enabledListingTypes.includes("pre-order")) && (_jsx(TabsTrigger, { value: "preorder", children: "Pre-order" }))] }), _jsx(TabsContent, { value: "standard" }), _jsx(TabsContent, { value: "auction" }), _jsx(TabsContent, { value: "preorder" })] })] }), _jsxs(Card, { variant: "outlined", padding: "lg", children: [_jsx(Text, { className: "text-xs font-semibold uppercase tracking-widest text-zinc-500 dark:text-zinc-400 mb-4", children: "Classification" }), _jsxs("div", { className: "space-y-4", children: [_jsxs(Stack, { gap: "xs", children: [_jsx(Text, { className: "text-sm font-medium text-zinc-900 dark:text-zinc-100", children: "Store" }), _jsx(PaginatedSelect, { value: product.storeId ?? null, onChange: handleStoreSelect, loadOptions: loadStoreOptions, placeholder: "Search stores\u2026", searchPlaceholder: "Type store name\u2026", noResultsText: "No stores found", ariaLabel: "Store" })] }), _jsx(ProductForm, { product: product, onChange: setProduct, renderGroupSettings: isEdit && productId
155
+ }, className: "space-y-6", children: [_jsxs(Card, { variant: "outlined", padding: "lg", children: [_jsx(Text, { className: "text-xs font-semibold uppercase tracking-widest text-zinc-500 dark:text-zinc-400 mb-4", children: "Listing Type" }), _jsxs(Tabs, { value: mode, onChange: handleModeChange, children: [_jsxs(TabsList, { children: [(!enabledListingTypes || enabledListingTypes.includes("standard")) && (_jsx(TabsTrigger, { value: "standard", children: "Standard" })), (!enabledListingTypes || enabledListingTypes.includes("auction")) && (_jsx(TabsTrigger, { value: "auction", children: "Auction" })), (!enabledListingTypes || enabledListingTypes.includes("pre-order")) && (_jsx(TabsTrigger, { value: "preorder", children: "Pre-order" }))] }), _jsx(TabsContent, { value: "standard" }), _jsx(TabsContent, { value: "auction" }), _jsx(TabsContent, { value: "preorder" })] })] }), _jsxs(Card, { variant: "outlined", padding: "lg", children: [_jsx(Text, { className: "text-xs font-semibold uppercase tracking-widest text-zinc-500 dark:text-zinc-400 mb-4", children: "Classification" }), _jsxs(Div, { className: "space-y-4", children: [_jsxs(Stack, { gap: "xs", children: [_jsx(Text, { className: "text-sm font-medium text-zinc-900 dark:text-zinc-100", children: "Store" }), _jsx(PaginatedSelect, { value: product.storeId ?? null, onChange: handleStoreSelect, loadOptions: loadStoreOptions, placeholder: "Search stores\u2026", searchPlaceholder: "Type store name\u2026", noResultsText: "No stores found", ariaLabel: "Store" })] }), _jsx(ProductForm, { product: product, onChange: setProduct, renderGroupSettings: isEdit && productId
149
156
  ? (p) => (_jsx(GroupSettingsPanel, { productId: productId, productSlug: p.slug ?? productId, groupId: p.groupId, isGroupParent: p.isGroupParent, groupParentSlug: p.groupParentSlug, groupChildSlugs: p.groupChildSlugs, groupTitle: p.groupTitle, isAuction: modeFromProduct(p) === "auction", storeProductsEndpoint: "/api/admin/products", onGroupChanged: () => productQuery.refetch() }))
150
- : undefined, renderCategorySelector: ({ label, value, onChange, disabled }) => (_jsxs(Stack, { gap: "xs", children: [_jsx(Text, { className: "text-sm font-medium text-zinc-900 dark:text-zinc-100", children: label }), _jsx(PaginatedSelect, { value: value || null, onChange: (v) => onChange(v ?? ""), loadOptions: loadCategoryOptions, placeholder: "Search categories\u2026", searchPlaceholder: "Type category name\u2026", noResultsText: "No categories found", ariaLabel: label, disabled: disabled, createLabel: "Category", renderCreateForm: ({ onCreated, onCancel }) => (_jsx(CategoryQuickCreateForm, { onSaved: (id, name) => onCreated({ value: id, label: name }), onCancel: onCancel })) })] })), renderBrandSelector: (args) => (_jsxs(Stack, { gap: "xs", children: [_jsx(Text, { className: "text-sm font-medium text-zinc-900 dark:text-zinc-100", children: args.label }), _jsx(PaginatedSelect, { value: args.multi ? null : (args.value || null), onChange: (v) => args.onValueChange(v ?? ""), loadOptions: loadBrandOptions, placeholder: "Search brands\u2026", searchPlaceholder: "Type brand name\u2026", noResultsText: "No brands found", ariaLabel: args.label, disabled: args.disabled, createLabel: "Brand", renderCreateForm: ({ onCreated, onCancel }) => (_jsx(BrandQuickCreateForm, { onSaved: (id, name) => onCreated({ value: id, label: name }), onCancel: onCancel })) })] })) })] })] }), _jsxs("div", { className: "flex gap-3 lg:hidden", children: [_jsx(Button, { type: "submit", isLoading: isSubmitting, disabled: !product.title || isSubmitting, children: isEdit ? "Save changes" : "Create product" }), isEdit && (_jsx(Button, { type: "button", variant: "danger", isLoading: deleteMutation.isPending, onClick: () => setDeleteOpen(true), children: "Delete product" }))] })] }, "product-form"));
157
+ : undefined, renderGroupJoinField: ({ label, value, onChange, disabled }) => (_jsx(GroupInlineSelect, { scope: "admin", value: value ?? "", onChange: (id) => onChange(id || undefined), disabled: disabled, label: label, placeholder: "None (standalone product)", allowCreate: false })), renderCategorySelector: ({ label, value, onChange, disabled }) => (_jsxs(Stack, { gap: "xs", children: [_jsx(Text, { className: "text-sm font-medium text-zinc-900 dark:text-zinc-100", children: label }), _jsx(PaginatedSelect, { value: value || null, onChange: (v) => onChange(v ?? ""), loadOptions: loadCategoryOptions, placeholder: "Search categories\u2026", searchPlaceholder: "Type category name\u2026", noResultsText: "No categories found", ariaLabel: label, disabled: disabled, createLabel: "Category", renderCreateForm: ({ onCreated, onCancel }) => (_jsx(CategoryQuickCreateForm, { onSaved: (id, name) => onCreated({ value: id, label: name }), onCancel: onCancel })) })] })), renderBrandSelector: (args) => (_jsxs(Stack, { gap: "xs", children: [_jsx(Text, { className: "text-sm font-medium text-zinc-900 dark:text-zinc-100", children: args.label }), _jsx(PaginatedSelect, { value: args.multi ? null : (args.value || null), onChange: (v) => args.onValueChange(v ?? ""), loadOptions: loadBrandOptions, placeholder: "Search brands\u2026", searchPlaceholder: "Type brand name\u2026", noResultsText: "No brands found", ariaLabel: args.label, disabled: args.disabled, createLabel: "Brand", renderCreateForm: ({ onCreated, onCancel }) => (_jsx(BrandQuickCreateForm, { onSaved: (id, name) => onCreated({ value: id, label: name }), onCancel: onCancel })) })] })) })] })] }), _jsxs(Div, { className: "flex gap-3 lg:hidden", children: [_jsx(Button, { type: "submit", isLoading: isSubmitting, disabled: !product.title || isSubmitting, children: isEdit ? "Save changes" : "Create product" }), isEdit && (_jsx(Button, { type: "button", variant: "danger", isLoading: deleteMutation.isPending, onClick: () => setDeleteOpen(true), children: "Delete product" }))] })] }, "product-form"));
151
158
  if (embedded) {
152
- return _jsx("div", { className: "overflow-y-auto p-4", children: formContent });
159
+ return _jsx(Div, { className: `${__O.yAuto} ${__P.p4}`, children: formContent });
153
160
  }
154
- const twoPanel = (_jsxs("div", { className: "grid gap-6 lg:grid-cols-[1fr_280px] lg:items-start", children: [_jsx(CardBody, { className: "min-w-0 space-y-6 p-0", children: formContent }), _jsx("div", { className: "hidden lg:block lg:sticky lg:top-[var(--header-height,0px)]", children: actionSidebar })] }));
161
+ const twoPanel = (_jsxs(Div, { className: "grid gap-6 lg:grid-cols-[1fr_280px] lg:items-start", children: [_jsx(CardBody, { className: "min-w-0 space-y-6 p-0", children: formContent }), _jsx(Div, { className: "hidden lg:block lg:sticky lg:top-[var(--header-height,0px)]", children: actionSidebar })] }));
155
162
  return (_jsxs(_Fragment, { children: [_jsx(StackedViewShell, { portal: "admin", ...rest, title: isEdit ? "Edit Product" : "Create Product", sections: [twoPanel] }), _jsx(ConfirmDeleteModal, { isOpen: deleteOpen, onClose: () => setDeleteOpen(false), onConfirm: () => deleteMutation.mutate(), isDeleting: deleteMutation.isPending, title: "Delete this product?", message: "This product will be permanently removed. This action cannot be undone.", confirmText: "Delete product", variant: "danger" })] }));
156
163
  }
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import React, { useState, useCallback } from "react";
4
- import { ListingLayout, Text, Toggle, useToast } from "../../../ui";
4
+ import { Div, ListingLayout, Span, Text, Toggle, useToast } from "../../../ui";
5
5
  import { ADMIN_ENDPOINTS } from "../../../constants/api-endpoints";
6
6
  import { ADMIN_PRODUCT_STATUS_TABS, ADMIN_PRODUCT_LISTING_TYPE_TABS, } from "../constants/filter-tabs";
7
7
  import { toRecordArray, toRelativeDate, toStringValue, } from "../hooks/useAdminListingData";
@@ -32,21 +32,21 @@ function buildBaseColumns() {
32
32
  key: "primary",
33
33
  header: "Item",
34
34
  sortable: true,
35
- render: (row) => (_jsxs("div", { className: "space-y-1", children: [_jsx(Text, { className: "font-semibold text-zinc-900 dark:text-zinc-100", children: row.primary }), _jsx(Text, { className: "text-xs text-zinc-500 dark:text-zinc-400", children: row.secondary })] })),
35
+ render: (row) => (_jsxs(Div, { className: "space-y-1", children: [_jsx(Text, { className: "font-semibold text-zinc-900 dark:text-zinc-100", children: row.primary }), _jsx(Text, { className: "text-xs text-zinc-500 dark:text-zinc-400", children: row.secondary })] })),
36
36
  },
37
37
  {
38
38
  key: "status",
39
39
  header: "Status",
40
40
  sortable: true,
41
41
  className: "w-36",
42
- render: (row) => (_jsx("span", { className: "inline-flex rounded-full bg-primary-50 px-2.5 py-1 text-xs font-medium text-primary-800 dark:bg-secondary-900/30 dark:text-secondary-300", children: row.status })),
42
+ render: (row) => (_jsx(Span, { size: "xs", weight: "medium", className: "inline-flex rounded-full bg-primary-50 px-2.5 py-1 text-primary-800 dark:bg-secondary-900/30 dark:text-secondary-300", children: row.status })),
43
43
  },
44
44
  {
45
45
  key: "updatedAt",
46
46
  header: "Updated",
47
47
  sortable: true,
48
48
  className: "w-36",
49
- render: (row) => (_jsx("span", { className: "text-sm text-zinc-600 dark:text-zinc-300", children: row.updatedAt })),
49
+ render: (row) => (_jsx(Span, { size: "sm", className: "text-zinc-600 dark:text-zinc-300", children: row.updatedAt })),
50
50
  },
51
51
  ];
52
52
  }
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import React, { useState, useCallback } from "react";
4
4
  import { useMutation, useQueryClient } from "@tanstack/react-query";
5
- import { Button, FilterChipGroup, ListingLayout, Modal, RowActionMenu, useToast } from "../../../ui";
5
+ import { Button, Div, FilterChipGroup, Label, ListingLayout, Modal, RowActionMenu, useToast } from "../../../ui";
6
6
  import { ADMIN_ENDPOINTS } from "../../../constants/api-endpoints";
7
7
  import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
8
8
  import { ROW_ACTION_META, ROW_ACTION_ID } from "../../../features/products/constants/action-defs";
@@ -151,7 +151,7 @@ export function AdminReviewsView({ children, ...props }) {
151
151
  setReplyOpen(false);
152
152
  setReplyText("");
153
153
  setReplyTarget(null);
154
- }, title: "Reply to review", children: _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("label", { className: "text-sm font-medium text-zinc-700 dark:text-zinc-300", children: "Admin reply" }), _jsx("textarea", { value: replyText, onChange: (e) => setReplyText(e.target.value), rows: 4, placeholder: "Write a public reply to this review\u2026", className: "w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-white dark:bg-zinc-800 px-3 py-2 text-sm text-zinc-900 dark:text-zinc-100 placeholder-zinc-400 focus:outline-none focus:ring-2 focus:ring-primary-500" })] }), _jsxs("div", { className: "flex justify-end gap-2", children: [_jsx(Button, { variant: "secondary", onClick: () => {
154
+ }, title: "Reply to review", children: _jsxs(Div, { className: "space-y-4", children: [_jsxs(Div, { className: "flex flex-col gap-1", children: [_jsx(Label, { className: "text-sm font-medium text-zinc-700 dark:text-zinc-300", children: "Admin reply" }), _jsx("textarea", { value: replyText, onChange: (e) => setReplyText(e.target.value), rows: 4, placeholder: "Write a public reply to this review\u2026", className: "w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-white dark:bg-zinc-800 px-3 py-2 text-sm text-zinc-900 dark:text-zinc-100 placeholder-zinc-400 focus:outline-none focus:ring-2 focus:ring-primary-500" })] }), _jsxs(Div, { className: "flex justify-end gap-2", children: [_jsx(Button, { variant: "secondary", onClick: () => {
155
155
  setReplyOpen(false);
156
156
  setReplyText("");
157
157
  setReplyTarget(null);
@@ -2,9 +2,13 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import React from "react";
4
4
  import { useMutation, useQueryClient } from "@tanstack/react-query";
5
- import { Button, Div, FormActions, Select, SideDrawer, Text, useToast, } from "../../../ui";
5
+ import { Button, Code, Div, FormActions, Label, Select, SideDrawer, Span, Text, useToast, } from "../../../ui";
6
6
  import { apiClient } from "../../../http";
7
7
  import { ADMIN_ENDPOINTS } from "../../../constants/api-endpoints";
8
+ const __P = {
9
+ p3: "p-3",
10
+ p4: "p-4",
11
+ };
8
12
  const CLS_SECTION_LABEL = "text-xs font-medium text-zinc-500 dark:text-zinc-400 uppercase tracking-wide";
9
13
  const STATUS_OPTIONS = [
10
14
  { label: "Pending review", value: "pending_review" },
@@ -58,5 +62,5 @@ export function AdminScammerEditorView({ open, onClose, scammerId, displayNames
58
62
  showToast(err?.message ?? "Failed to delete profile.", "error");
59
63
  },
60
64
  });
61
- return (_jsx(SideDrawer, { isOpen: open, onClose: onClose, title: displayNames.length > 0 ? displayNames[0] : "Scammer Profile", children: _jsxs(Div, { className: "flex flex-col gap-4 p-4", children: [_jsxs(Div, { className: "flex items-center gap-2", children: [_jsx("span", { className: `inline-flex rounded-full px-2.5 py-1 text-xs font-medium ${STATUS_COLOR[currentStatus ?? "pending_review"] ?? STATUS_COLOR.pending_review}`, children: (currentStatus ?? "pending_review").replace(/_/g, " ") }), scamType && (_jsx("span", { className: "rounded-full bg-zinc-100 px-2.5 py-1 text-xs text-zinc-600 dark:bg-zinc-800 dark:text-zinc-300", children: scamType.replace(/_/g, " ") }))] }), displayNames.length > 0 && (_jsxs(Div, { children: [_jsx(Text, { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-zinc-500 dark:text-zinc-400", children: "Names / Aliases" }), _jsx("div", { className: "flex flex-wrap gap-1", children: displayNames.map((name, i) => (_jsx("span", { className: "rounded-full bg-zinc-100 px-2.5 py-0.5 text-xs dark:bg-zinc-800", children: name }, i))) })] })), (phones.length > 0 || upiIds.length > 0) && (_jsxs(Div, { className: "rounded-lg border border-zinc-200 bg-zinc-50 p-3 dark:border-zinc-700 dark:bg-zinc-900/40", children: [phones.length > 0 && (_jsxs("div", { className: "mb-2", children: [_jsx(Text, { className: CLS_SECTION_LABEL, children: "Phone numbers" }), _jsx("div", { className: "flex flex-wrap gap-1", children: phones.map((p, i) => (_jsx("code", { className: "rounded bg-zinc-200 px-1.5 py-0.5 text-xs dark:bg-zinc-700", children: p }, i))) })] })), upiIds.length > 0 && (_jsxs(_Fragment, { children: [_jsx(Text, { className: CLS_SECTION_LABEL, children: "UPI IDs" }), _jsx("div", { className: "flex flex-wrap gap-1", children: upiIds.map((u, i) => (_jsx("code", { className: "rounded bg-zinc-200 px-1.5 py-0.5 text-xs dark:bg-zinc-700", children: u }, i))) })] }))] })), description && (_jsxs(Div, { className: "rounded-lg border border-zinc-200 bg-zinc-50 p-3 dark:border-zinc-700 dark:bg-zinc-900/40", children: [_jsx(Text, { className: CLS_SECTION_LABEL, children: "Description" }), _jsx(Text, { className: "whitespace-pre-wrap text-sm text-zinc-700 dark:text-zinc-200", children: description })] })), _jsxs(Div, { className: "text-xs text-zinc-500 dark:text-zinc-400", children: ["Reported by:", " ", _jsx("span", { className: "font-medium text-zinc-700 dark:text-zinc-300", children: reportedByAnon ? "Anonymous" : (reportedBy ?? "Unknown") })] }), _jsx("hr", { className: "border-zinc-200 dark:border-zinc-700" }), _jsx(Select, { label: "Status", options: STATUS_OPTIONS, value: status, onValueChange: setStatus }), _jsxs(Div, { className: "flex flex-col gap-1", children: [_jsx("label", { className: "text-xs font-semibold uppercase tracking-wide text-zinc-500 dark:text-zinc-400", children: "Verification note (internal)" }), _jsx("textarea", { value: note, onChange: (e) => setNote(e.target.value), rows: 3, placeholder: "e.g. Verified via 3 independent reports\u2026", className: "w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-white dark:bg-zinc-800 px-3 py-2 text-sm text-zinc-900 dark:text-zinc-100 placeholder-zinc-400 focus:outline-none focus:ring-2 focus:ring-primary-500" })] }), _jsxs(FormActions, { align: "right", children: [_jsx(Button, { type: "button", variant: "danger", size: "sm", disabled: !scammerId, isLoading: deleteMutation.isPending, onClick: () => deleteMutation.mutate(), children: "Delete" }), _jsx(Button, { type: "button", variant: "secondary", onClick: onClose, children: "Cancel" }), _jsx(Button, { type: "button", isLoading: updateMutation.isPending, disabled: !scammerId || updateMutation.isPending, onClick: () => updateMutation.mutate(), children: "Save changes" })] })] }) }));
65
+ return (_jsx(SideDrawer, { isOpen: open, onClose: onClose, title: displayNames.length > 0 ? displayNames[0] : "Scammer Profile", children: _jsxs(Div, { className: `flex flex-col gap-4 ${__P.p4}`, children: [_jsxs(Div, { className: "flex items-center gap-2", children: [_jsx(Span, { size: "xs", weight: "medium", className: `inline-flex rounded-full px-2.5 py-1 ${STATUS_COLOR[currentStatus ?? "pending_review"] ?? STATUS_COLOR.pending_review}`, children: (currentStatus ?? "pending_review").replace(/_/g, " ") }), scamType && (_jsx(Span, { size: "xs", className: "rounded-full bg-zinc-100 px-2.5 py-1 text-zinc-600 dark:bg-zinc-800 dark:text-zinc-300", children: scamType.replace(/_/g, " ") }))] }), displayNames.length > 0 && (_jsxs(Div, { children: [_jsx(Text, { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-zinc-500 dark:text-zinc-400", children: "Names / Aliases" }), _jsx(Div, { className: "flex flex-wrap gap-1", children: displayNames.map((name, i) => (_jsx(Span, { size: "xs", className: "rounded-full bg-zinc-100 px-2.5 py-0.5 dark:bg-zinc-800", children: name }, i))) })] })), (phones.length > 0 || upiIds.length > 0) && (_jsxs(Div, { className: `rounded-lg border border-zinc-200 bg-zinc-50 ${__P.p3} dark:border-zinc-700 dark:bg-zinc-900/40`, children: [phones.length > 0 && (_jsxs(Div, { className: "mb-2", children: [_jsx(Text, { className: CLS_SECTION_LABEL, children: "Phone numbers" }), _jsx(Div, { className: "flex flex-wrap gap-1", children: phones.map((p, i) => (_jsx(Code, { className: "rounded bg-zinc-200 px-1.5 py-0.5 text-xs dark:bg-zinc-700", children: p }, i))) })] })), upiIds.length > 0 && (_jsxs(_Fragment, { children: [_jsx(Text, { className: CLS_SECTION_LABEL, children: "UPI IDs" }), _jsx(Div, { className: "flex flex-wrap gap-1", children: upiIds.map((u, i) => (_jsx(Code, { className: "rounded bg-zinc-200 px-1.5 py-0.5 text-xs dark:bg-zinc-700", children: u }, i))) })] }))] })), description && (_jsxs(Div, { className: `rounded-lg border border-zinc-200 bg-zinc-50 ${__P.p3} dark:border-zinc-700 dark:bg-zinc-900/40`, children: [_jsx(Text, { className: CLS_SECTION_LABEL, children: "Description" }), _jsx(Text, { className: "whitespace-pre-wrap text-sm text-zinc-700 dark:text-zinc-200", children: description })] })), _jsxs(Div, { className: "text-xs text-zinc-500 dark:text-zinc-400", children: ["Reported by:", " ", _jsx(Span, { weight: "medium", className: "text-zinc-700 dark:text-zinc-300", children: reportedByAnon ? "Anonymous" : (reportedBy ?? "Unknown") })] }), _jsx("hr", { className: "border-zinc-200 dark:border-zinc-700" }), _jsx(Select, { label: "Status", options: STATUS_OPTIONS, value: status, onValueChange: setStatus }), _jsxs(Div, { className: "flex flex-col gap-1", children: [_jsx(Label, { className: "text-xs font-semibold uppercase tracking-wide text-zinc-500 dark:text-zinc-400", children: "Verification note (internal)" }), _jsx("textarea", { value: note, onChange: (e) => setNote(e.target.value), rows: 3, placeholder: "e.g. Verified via 3 independent reports\u2026", className: "w-full rounded-lg border border-zinc-300 dark:border-zinc-700 bg-white dark:bg-zinc-800 px-3 py-2 text-sm text-zinc-900 dark:text-zinc-100 placeholder-zinc-400 focus:outline-none focus:ring-2 focus:ring-primary-500" })] }), _jsxs(FormActions, { align: "right", children: [_jsx(Button, { type: "button", variant: "danger", size: "sm", disabled: !scammerId, isLoading: deleteMutation.isPending, onClick: () => deleteMutation.mutate(), children: "Delete" }), _jsx(Button, { type: "button", variant: "secondary", onClick: onClose, children: "Cancel" }), _jsx(Button, { type: "button", isLoading: updateMutation.isPending, disabled: !scammerId || updateMutation.isPending, onClick: () => updateMutation.mutate(), children: "Save changes" })] })] }) }));
62
66
  }
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import React, { useState } from "react";
4
- import { FilterChipGroup, ListingLayout, RowActionMenu, Text } from "../../../ui";
4
+ import { Div, FilterChipGroup, ListingLayout, RowActionMenu, Span, Text } from "../../../ui";
5
5
  import { ADMIN_ENDPOINTS } from "../../../constants/api-endpoints";
6
6
  import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
7
7
  import { ADMIN_SCAMMER_STATUS_TABS } from "../constants/filter-tabs";
@@ -18,7 +18,7 @@ const SCAMMER_COLUMNS = [
18
18
  {
19
19
  key: "primary",
20
20
  header: "Name / Aliases",
21
- render: (row) => (_jsxs("div", { className: "space-y-0.5", children: [_jsx(Text, { className: "font-medium text-zinc-900 dark:text-zinc-100", children: row.primary }), row.secondary ? (_jsx(Text, { className: "text-xs text-zinc-500 dark:text-zinc-400", children: row.secondary })) : null] })),
21
+ render: (row) => (_jsxs(Div, { className: "space-y-0.5", children: [_jsx(Text, { className: "font-medium text-zinc-900 dark:text-zinc-100", children: row.primary }), row.secondary ? (_jsx(Text, { className: "text-xs text-zinc-500 dark:text-zinc-400", children: row.secondary })) : null] })),
22
22
  },
23
23
  {
24
24
  key: "status",
@@ -30,7 +30,7 @@ const SCAMMER_COLUMNS = [
30
30
  key: "updatedAt",
31
31
  header: "Updated",
32
32
  className: "w-32",
33
- render: (row) => (_jsx("span", { className: "text-sm text-zinc-500 dark:text-zinc-400", children: row.updatedAt })),
33
+ render: (row) => (_jsx(Span, { size: "sm", className: "text-zinc-500 dark:text-zinc-400", children: row.updatedAt })),
34
34
  },
35
35
  ];
36
36
  export function AdminScammersView({ children, ...props }) {