@mohasinac/appkit 4.13.1 → 4.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (493) hide show
  1. package/dist/_internal/client/features/layout/DashboardLayoutClient.js +14 -5
  2. package/dist/_internal/client/features/lottery/LotteryAdminEditView.d.ts +3 -0
  3. package/dist/_internal/client/features/lottery/LotteryAdminEditView.js +6 -0
  4. package/dist/_internal/client/features/lottery/LotteryDetailView.d.ts +8 -0
  5. package/dist/_internal/client/features/lottery/LotteryDetailView.js +4 -1
  6. package/dist/_internal/client/features/lottery/LotteryListView.d.ts +7 -0
  7. package/dist/_internal/client/features/lottery/LotteryListView.js +1 -1
  8. package/dist/_internal/client/features/lottery/PrizeDrawLotteryDetailView.js +4 -1
  9. package/dist/_internal/client/features/lottery/slot-collage-items.d.ts +15 -0
  10. package/dist/_internal/client/features/lottery/slot-collage-items.js +13 -0
  11. package/dist/_internal/server/features/auctions/actions.js +8 -2
  12. package/dist/_internal/server/features/bundles/data.d.ts +16 -0
  13. package/dist/_internal/server/features/bundles/data.js +26 -0
  14. package/dist/_internal/server/features/bundles/index.d.ts +1 -1
  15. package/dist/_internal/server/features/bundles/index.js +1 -1
  16. package/dist/_internal/server/features/cart/service.d.ts +3 -3
  17. package/dist/_internal/server/features/checkout/actions.js +25 -0
  18. package/dist/_internal/server/features/checkout/locked-lines.d.ts +38 -0
  19. package/dist/_internal/server/features/checkout/locked-lines.js +171 -0
  20. package/dist/_internal/server/features/checkout/source-context.d.ts +5 -0
  21. package/dist/_internal/server/features/checkout/source-context.js +157 -0
  22. package/dist/_internal/server/features/homepage/index.d.ts +0 -1
  23. package/dist/_internal/server/features/homepage/index.js +7 -1
  24. package/dist/_internal/server/features/lottery/adapters.js +4 -0
  25. package/dist/_internal/server/features/offers/adapters.d.ts +103 -0
  26. package/dist/_internal/server/features/offers/adapters.js +88 -0
  27. package/dist/_internal/server/features/offers/index.d.ts +2 -0
  28. package/dist/_internal/server/features/offers/index.js +1 -0
  29. package/dist/_internal/server/features/orders/adapters.js +24 -0
  30. package/dist/_internal/server/features/products/data.js +15 -37
  31. package/dist/_internal/server/features/products/index.d.ts +1 -1
  32. package/dist/_internal/server/features/products/index.js +1 -1
  33. package/dist/_internal/server/features/products/list-public.d.ts +46 -20
  34. package/dist/_internal/server/features/products/list-public.js +266 -90
  35. package/dist/_internal/server/features/products/listing-tab-counts.d.ts +44 -0
  36. package/dist/_internal/server/features/products/listing-tab-counts.js +97 -0
  37. package/dist/_internal/server/features/site-settings/adapters.d.ts +51 -0
  38. package/dist/_internal/server/features/site-settings/adapters.js +75 -0
  39. package/dist/_internal/server/features/site-settings/index.d.ts +1 -0
  40. package/dist/_internal/server/features/site-settings/index.js +1 -0
  41. package/dist/_internal/server/features/stores/adapters.d.ts +56 -0
  42. package/dist/_internal/server/features/stores/adapters.js +91 -0
  43. package/dist/_internal/server/features/stores/index.d.ts +1 -0
  44. package/dist/_internal/server/features/stores/index.js +1 -0
  45. package/dist/_internal/server/jobs/core/auctionSettlement.js +56 -2
  46. package/dist/_internal/server/jobs/core/offerExpiry.js +55 -19
  47. package/dist/_internal/server/jobs/core/paymentReviewAutoApprove.d.ts +5 -0
  48. package/dist/_internal/server/jobs/core/paymentReviewAutoApprove.js +33 -1
  49. package/dist/_internal/server/jobs/handlers/messages.d.ts +7 -0
  50. package/dist/_internal/server/jobs/handlers/messages.js +10 -0
  51. package/dist/_internal/shared/actions/action-registry.js +17 -1
  52. package/dist/_internal/shared/checkout/lanes.d.ts +25 -0
  53. package/dist/_internal/shared/checkout/lanes.js +26 -0
  54. package/dist/_internal/shared/features/auctions/config.d.ts +27 -0
  55. package/dist/_internal/shared/features/auctions/config.js +27 -0
  56. package/dist/_internal/shared/features/auctions/schema.d.ts +14 -2
  57. package/dist/_internal/shared/features/auctions/schema.js +13 -1
  58. package/dist/_internal/shared/features/blog/schema.d.ts +2 -2
  59. package/dist/_internal/shared/features/cart/schema.d.ts +20 -15
  60. package/dist/_internal/shared/features/cart/schema.js +15 -0
  61. package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +32 -32
  62. package/dist/_internal/shared/features/emi/schedule.d.ts +24 -3
  63. package/dist/_internal/shared/features/emi/schedule.js +20 -5
  64. package/dist/_internal/shared/features/events/schema.d.ts +2 -2
  65. package/dist/_internal/shared/features/homepage/section-gate.d.ts +14 -0
  66. package/dist/_internal/shared/features/homepage/section-gate.js +51 -0
  67. package/dist/_internal/shared/features/offers/config.d.ts +30 -0
  68. package/dist/_internal/shared/features/offers/config.js +59 -0
  69. package/dist/_internal/shared/features/orders/schema.d.ts +8 -8
  70. package/dist/_internal/shared/features/products/schema.d.ts +30 -30
  71. package/dist/_internal/shared/features/products/to-product-item.js +6 -0
  72. package/dist/_internal/shared/features/reviews/schema.d.ts +2 -2
  73. package/dist/_internal/shared/features/site-settings/fees.d.ts +60 -0
  74. package/dist/_internal/shared/features/site-settings/fees.js +39 -0
  75. package/dist/_internal/shared/features/site-settings/types.d.ts +40 -0
  76. package/dist/_internal/shared/features/site-settings/types.js +1 -0
  77. package/dist/_internal/shared/history/history.d.ts +88 -0
  78. package/dist/_internal/shared/history/history.js +198 -0
  79. package/dist/_internal/shared/history/index.d.ts +4 -0
  80. package/dist/_internal/shared/history/index.js +2 -0
  81. package/dist/_internal/shared/history/types.d.ts +61 -0
  82. package/dist/_internal/shared/history/types.js +6 -0
  83. package/dist/_internal/shared/listing-types/_registry.d.ts +54 -1
  84. package/dist/_internal/shared/listing-types/_registry.js +67 -0
  85. package/dist/_internal/shared/listing-types/art/config.d.ts +3 -0
  86. package/dist/_internal/shared/listing-types/art/config.js +5 -0
  87. package/dist/_internal/shared/listing-types/auction/config.d.ts +13 -0
  88. package/dist/_internal/shared/listing-types/auction/config.js +21 -0
  89. package/dist/_internal/shared/listing-types/availability.d.ts +79 -0
  90. package/dist/_internal/shared/listing-types/availability.js +104 -0
  91. package/dist/_internal/shared/listing-types/capabilities.d.ts +15 -0
  92. package/dist/_internal/shared/listing-types/capabilities.js +12 -0
  93. package/dist/_internal/shared/listing-types/classified/config.d.ts +3 -0
  94. package/dist/_internal/shared/listing-types/classified/config.js +5 -0
  95. package/dist/_internal/shared/listing-types/digital-code/config.d.ts +11 -0
  96. package/dist/_internal/shared/listing-types/digital-code/config.js +22 -2
  97. package/dist/_internal/shared/listing-types/live/config.d.ts +3 -0
  98. package/dist/_internal/shared/listing-types/live/config.js +5 -0
  99. package/dist/_internal/shared/listing-types/pre-order/config.d.ts +3 -0
  100. package/dist/_internal/shared/listing-types/pre-order/config.js +19 -0
  101. package/dist/_internal/shared/listing-types/prize-draw/config.d.ts +11 -0
  102. package/dist/_internal/shared/listing-types/prize-draw/config.js +15 -0
  103. package/dist/_internal/shared/listing-types/standard/config.d.ts +3 -0
  104. package/dist/_internal/shared/listing-types/standard/config.js +5 -0
  105. package/dist/_internal/shared/listing-types/stickers/config.d.ts +3 -0
  106. package/dist/_internal/shared/listing-types/stickers/config.js +5 -0
  107. package/dist/client.d.ts +20 -7
  108. package/dist/client.js +22 -4
  109. package/dist/constants/api-endpoints.d.ts +6 -0
  110. package/dist/constants/api-endpoints.js +2 -0
  111. package/dist/constants/field-names.d.ts +57 -8
  112. package/dist/constants/field-names.js +101 -8
  113. package/dist/constants/table-keys.d.ts +17 -0
  114. package/dist/constants/table-keys.js +17 -0
  115. package/dist/errors/error-codes.d.ts +13 -1
  116. package/dist/errors/error-codes.js +13 -1
  117. package/dist/errors/error-display-map.js +12 -3
  118. package/dist/errors/messages.d.ts +10 -2
  119. package/dist/errors/messages.js +10 -2
  120. package/dist/features/about/components/AboutView.d.ts +3 -0
  121. package/dist/features/about/components/AboutView.js +3 -2
  122. package/dist/features/about/components/PolicyPageView.d.ts +2 -1
  123. package/dist/features/about/components/PolicyPageView.js +61 -23
  124. package/dist/features/about/components/PublicProfileView.js +5 -0
  125. package/dist/features/about/schemas/firestore.d.ts +3 -0
  126. package/dist/features/account/components/UserBidsView.js +12 -4
  127. package/dist/features/account/components/UserOrdersView.js +7 -0
  128. package/dist/features/account/components/UserReturnsView.d.ts +3 -0
  129. package/dist/features/account/components/UserReturnsView.js +17 -1
  130. package/dist/features/account/components/index.d.ts +0 -2
  131. package/dist/features/account/components/index.js +0 -1
  132. package/dist/features/account/schemas/index.d.ts +2 -2
  133. package/dist/features/account/types/index.d.ts +21 -2
  134. package/dist/features/addresses/schemas/index.d.ts +4 -4
  135. package/dist/features/admin/components/AdminArtView.js +8 -3
  136. package/dist/features/admin/components/AdminAuditLogView.js +1 -0
  137. package/dist/features/admin/components/AdminBidsView.js +15 -2
  138. package/dist/features/admin/components/AdminBlogEditorView.js +65 -33
  139. package/dist/features/admin/components/AdminClassifiedView.js +8 -3
  140. package/dist/features/admin/components/AdminDigitalCodesView.js +8 -3
  141. package/dist/features/admin/components/AdminFeatureEditorView.js +35 -6
  142. package/dist/features/admin/components/AdminFeatureFlagsView.js +1 -0
  143. package/dist/features/admin/components/AdminLiveView.js +8 -3
  144. package/dist/features/admin/components/AdminNavEditorView.js +15 -5
  145. package/dist/features/admin/components/AdminNewsletterView.js +18 -2
  146. package/dist/features/admin/components/AdminOffersView.d.ts +4 -0
  147. package/dist/features/admin/components/AdminOffersView.js +230 -0
  148. package/dist/features/admin/components/AdminOrdersView.js +10 -1
  149. package/dist/features/admin/components/AdminPaymentMethodsView.js +24 -4
  150. package/dist/features/admin/components/AdminPrizeDrawsView.js +5 -0
  151. package/dist/features/admin/components/AdminProductsView.js +16 -29
  152. package/dist/features/admin/components/AdminScammerEditorView.d.ts +2 -1
  153. package/dist/features/admin/components/AdminScammerEditorView.js +3 -13
  154. package/dist/features/admin/components/AdminScammersView.js +3 -8
  155. package/dist/features/admin/components/AdminSectionsView.js +32 -23
  156. package/dist/features/admin/components/AdminSessionsView.js +17 -2
  157. package/dist/features/admin/components/AdminSiteSettingsView.js +31 -13
  158. package/dist/features/admin/components/AdminSiteView.js +6 -2
  159. package/dist/features/admin/components/AdminStickersView.js +8 -3
  160. package/dist/features/admin/components/ViewAuditLogEntryModal.js +1 -0
  161. package/dist/features/admin/components/index.d.ts +2 -0
  162. package/dist/features/admin/components/index.js +1 -0
  163. package/dist/features/admin/components/sections/adminSectionsTypes.d.ts +4 -2
  164. package/dist/features/admin/components/sections/adminSectionsTypes.js +45 -27
  165. package/dist/features/admin/constants/filter-tabs.d.ts +89 -0
  166. package/dist/features/admin/constants/filter-tabs.js +56 -0
  167. package/dist/features/admin/schemas/firestore.d.ts +122 -3
  168. package/dist/features/admin/schemas/firestore.js +1 -0
  169. package/dist/features/admin/schemas/homepage-section-form.d.ts +22 -0
  170. package/dist/features/admin/schemas/homepage-section-form.js +68 -0
  171. package/dist/features/admin/schemas/nav-item-form.d.ts +74 -0
  172. package/dist/features/admin/schemas/nav-item-form.js +72 -0
  173. package/dist/features/auctions/actions/bid-actions.d.ts +20 -5
  174. package/dist/features/auctions/actions/bid-actions.js +93 -20
  175. package/dist/features/auctions/components/AuctionBidsTable.d.ts +10 -1
  176. package/dist/features/auctions/components/AuctionBidsTable.js +22 -4
  177. package/dist/features/auctions/components/AuctionDetailPageView.js +11 -6
  178. package/dist/features/auctions/components/AuctionsListView.js +5 -6
  179. package/dist/features/auctions/components/MarketplaceAuctionCard.d.ts +7 -0
  180. package/dist/features/auctions/components/MarketplaceAuctionCard.js +19 -2
  181. package/dist/features/auctions/components/PlaceBidFormClient.d.ts +1 -2
  182. package/dist/features/auctions/components/PlaceBidFormClient.js +8 -4
  183. package/dist/features/auctions/components/bid-detail-fields.d.ts +29 -0
  184. package/dist/features/auctions/components/bid-detail-fields.js +103 -0
  185. package/dist/features/auctions/repository/bid.repository.d.ts +13 -0
  186. package/dist/features/auctions/repository/bid.repository.js +23 -0
  187. package/dist/features/auctions/schemas/firestore.d.ts +17 -0
  188. package/dist/features/auctions/schemas/index.d.ts +12 -12
  189. package/dist/features/audit-log/schemas/firestore.d.ts +14 -0
  190. package/dist/features/audit-log/schemas/firestore.js +7 -0
  191. package/dist/features/auth/permissions/constants.d.ts +1 -1
  192. package/dist/features/auth/permissions/constants.js +10 -1
  193. package/dist/features/blog/actions/blog-actions.d.ts +7 -7
  194. package/dist/features/blog/schemas/blog-form.d.ts +80 -0
  195. package/dist/features/blog/schemas/blog-form.js +100 -0
  196. package/dist/features/blog/schemas/index.d.ts +6 -6
  197. package/dist/features/cart/repository/cart.repository.js +1 -0
  198. package/dist/features/cart/schemas/firestore.d.ts +15 -0
  199. package/dist/features/catalogue/schemas/validation.d.ts +4 -4
  200. package/dist/features/categories/components/BrandDetailPageView.js +23 -40
  201. package/dist/features/categories/components/BrandDetailTabs.d.ts +7 -7
  202. package/dist/features/categories/components/BrandDetailTabs.js +8 -12
  203. package/dist/features/categories/components/BundleCollage.js +1 -1
  204. package/dist/features/categories/components/CategoryDetailPageView.js +53 -57
  205. package/dist/features/categories/components/CategoryDetailTabs.d.ts +10 -8
  206. package/dist/features/categories/components/CategoryDetailTabs.js +11 -16
  207. package/dist/features/categories/components/CategoryProductsListing.js +11 -1
  208. package/dist/features/categories/components/ConcernCard.js +7 -1
  209. package/dist/features/categories/schemas/firestore.d.ts +13 -0
  210. package/dist/features/categories/schemas/index.d.ts +26 -26
  211. package/dist/features/classified/components/ClassifiedDetailPageView.d.ts +16 -1
  212. package/dist/features/classified/components/ClassifiedDetailPageView.js +23 -3
  213. package/dist/features/events/components/AdminEventEditorView.js +32 -54
  214. package/dist/features/events/components/AdminEventEntriesView.js +22 -3
  215. package/dist/features/events/components/AdminEventsView.js +15 -11
  216. package/dist/features/events/components/EventFilters.d.ts +9 -1
  217. package/dist/features/events/components/EventFilters.js +45 -21
  218. package/dist/features/events/components/EventsIndexListing.d.ts +6 -1
  219. package/dist/features/events/components/EventsIndexListing.js +2 -2
  220. package/dist/features/events/components/EventsListPageView.js +13 -4
  221. package/dist/features/events/repository/events.repository.d.ts +17 -0
  222. package/dist/features/events/repository/events.repository.js +27 -0
  223. package/dist/features/events/schemas/event-form.d.ts +113 -0
  224. package/dist/features/events/schemas/event-form.js +82 -0
  225. package/dist/features/events/schemas/firestore.d.ts +12 -0
  226. package/dist/features/events/schemas/firestore.js +12 -0
  227. package/dist/features/events/schemas/index.d.ts +50 -50
  228. package/dist/features/events/types/index.d.ts +11 -0
  229. package/dist/features/events/types/index.js +57 -1
  230. package/dist/features/faq/actions/faq-actions.d.ts +12 -12
  231. package/dist/features/faq/schemas/index.d.ts +8 -8
  232. package/dist/features/filters/FilterFacetSection.d.ts +7 -1
  233. package/dist/features/filters/FilterFacetSection.js +11 -3
  234. package/dist/features/grouped/schemas/grouped-listing-form.d.ts +101 -0
  235. package/dist/features/grouped/schemas/grouped-listing-form.js +89 -0
  236. package/dist/features/grouped/schemas/index.d.ts +4 -4
  237. package/dist/features/homepage/actions/homepage-section-actions.d.ts +11 -3
  238. package/dist/features/homepage/actions/homepage-section-actions.js +33 -1
  239. package/dist/features/homepage/components/AnnouncementBar.d.ts +7 -1
  240. package/dist/features/homepage/components/AnnouncementBar.js +3 -3
  241. package/dist/features/homepage/components/MarketplaceHomepageView.js +20 -6
  242. package/dist/features/homepage/hooks/homepage-query.d.ts +16 -0
  243. package/dist/features/homepage/hooks/homepage-query.js +45 -0
  244. package/dist/features/homepage/hooks/useFeaturedAuctions.d.ts +10 -0
  245. package/dist/features/homepage/hooks/useFeaturedAuctions.js +28 -8
  246. package/dist/features/homepage/hooks/useFeaturedPreOrders.js +17 -8
  247. package/dist/features/homepage/hooks/useFeaturedProducts.js +15 -8
  248. package/dist/features/homepage/schemas/index.d.ts +33 -2
  249. package/dist/features/homepage/schemas/index.js +24 -0
  250. package/dist/features/layout/AppLayoutShell.d.ts +11 -1
  251. package/dist/features/layout/AppLayoutShell.js +15 -14
  252. package/dist/features/layout/BackToTop.d.ts +9 -0
  253. package/dist/features/layout/BackToTop.js +10 -1
  254. package/dist/features/layout/BottomActions.js +28 -25
  255. package/dist/features/layout/BottomChrome.d.ts +34 -0
  256. package/dist/features/layout/BottomChrome.js +55 -0
  257. package/dist/features/layout/BottomNavLayout.d.ts +6 -0
  258. package/dist/features/layout/BottomNavLayout.js +7 -1
  259. package/dist/features/layout/BottomNavbar.js +15 -2
  260. package/dist/features/layout/FooterLayout.js +11 -1
  261. package/dist/features/layout/NavbarLayout.js +1 -1
  262. package/dist/features/layout/TitleBarLayout.d.ts +7 -0
  263. package/dist/features/layout/TitleBarLayout.js +28 -5
  264. package/dist/features/layout/index.d.ts +2 -0
  265. package/dist/features/layout/index.js +1 -0
  266. package/dist/features/lottery/types/index.d.ts +3 -0
  267. package/dist/features/media/MediaPickerModal.js +5 -1
  268. package/dist/features/messages/schemas/index.d.ts +2 -2
  269. package/dist/features/orders/components/OrderScopeTabs.d.ts +20 -0
  270. package/dist/features/orders/components/OrderScopeTabs.js +31 -0
  271. package/dist/features/orders/components/OrderStatusTimeline.d.ts +5 -1
  272. package/dist/features/orders/components/OrderStatusTimeline.js +39 -20
  273. package/dist/features/orders/constants/order-scope.d.ts +48 -0
  274. package/dist/features/orders/constants/order-scope.js +111 -0
  275. package/dist/features/orders/repository/orders.repository.d.ts +54 -7
  276. package/dist/features/orders/repository/orders.repository.js +121 -22
  277. package/dist/features/orders/schemas/firestore.d.ts +152 -0
  278. package/dist/features/orders/schemas/firestore.js +30 -0
  279. package/dist/features/orders/schemas/index.d.ts +18 -18
  280. package/dist/features/orders/types/index.d.ts +35 -7
  281. package/dist/features/pre-orders/components/PreOrdersIndexListing.js +14 -9
  282. package/dist/features/pre-orders/components/PreOrdersListView.js +6 -5
  283. package/dist/features/pre-orders/schemas/index.d.ts +1 -1
  284. package/dist/features/products/actions/product-actions.d.ts +14 -0
  285. package/dist/features/products/actions/product-actions.js +49 -11
  286. package/dist/features/products/api/route.d.ts +12 -0
  287. package/dist/features/products/api/route.js +42 -100
  288. package/dist/features/products/components/ArtStickersListView.js +2 -2
  289. package/dist/features/products/components/AuctionsIndexListing.js +13 -11
  290. package/dist/features/products/components/AvailabilityTabs.d.ts +11 -0
  291. package/dist/features/products/components/AvailabilityTabs.js +47 -0
  292. package/dist/features/products/components/GroupSettingsPanel.js +5 -1
  293. package/dist/features/products/components/MakeOfferButton.js +48 -49
  294. package/dist/features/products/components/PrizeDrawCollage.d.ts +20 -4
  295. package/dist/features/products/components/PrizeDrawCollage.js +9 -1
  296. package/dist/features/products/components/PrizeDrawsIndexListing.js +14 -12
  297. package/dist/features/products/components/PrizeDrawsListingView.js +2 -2
  298. package/dist/features/products/components/PrizeDrawsSection.d.ts +7 -1
  299. package/dist/features/products/components/PrizeDrawsSection.js +23 -18
  300. package/dist/features/products/components/ProductDetailPageView.d.ts +4 -1
  301. package/dist/features/products/components/ProductDetailPageView.js +18 -4
  302. package/dist/features/products/components/ProductForm.js +5 -2
  303. package/dist/features/products/components/ProductGrid.js +6 -1
  304. package/dist/features/products/components/ProductsIndexListing.js +22 -32
  305. package/dist/features/products/components/ProductsIndexPageView.js +6 -9
  306. package/dist/features/products/components/index.d.ts +2 -2
  307. package/dist/features/products/components/index.js +1 -1
  308. package/dist/features/products/config/listing-type-listing-config.d.ts +20 -0
  309. package/dist/features/products/config/listing-type-listing-config.js +22 -10
  310. package/dist/features/products/constants/action-defs.d.ts +2 -0
  311. package/dist/features/products/constants/action-defs.js +6 -0
  312. package/dist/features/products/hooks/useAvailabilityScope.d.ts +13 -0
  313. package/dist/features/products/hooks/useAvailabilityScope.js +19 -0
  314. package/dist/features/products/hooks/useProducts.d.ts +5 -0
  315. package/dist/features/products/hooks/useProducts.js +13 -2
  316. package/dist/features/products/repository/products.repository.d.ts +31 -2
  317. package/dist/features/products/repository/products.repository.js +53 -21
  318. package/dist/features/products/schemas/firestore.d.ts +17 -3
  319. package/dist/features/products/schemas/firestore.js +7 -2
  320. package/dist/features/products/schemas/index.d.ts +64 -64
  321. package/dist/features/products/schemas/product-features.validators.d.ts +79 -6
  322. package/dist/features/products/schemas/product-features.validators.js +63 -0
  323. package/dist/features/products/types/index.d.ts +16 -1
  324. package/dist/features/promotions/schemas/index.d.ts +2 -2
  325. package/dist/features/reviews/schemas/index.d.ts +16 -16
  326. package/dist/features/scams/constants/scammer-status-display.d.ts +28 -0
  327. package/dist/features/scams/constants/scammer-status-display.js +79 -0
  328. package/dist/features/search/schemas/index.d.ts +4 -4
  329. package/dist/features/seller/actions/offer-actions.js +57 -4
  330. package/dist/features/seller/components/OfferPhaseTimeline.d.ts +59 -0
  331. package/dist/features/seller/components/OfferPhaseTimeline.js +107 -0
  332. package/dist/features/seller/components/SellerArtView.js +5 -0
  333. package/dist/features/seller/components/SellerAuctionsView.js +13 -15
  334. package/dist/features/seller/components/SellerBidsView.js +11 -4
  335. package/dist/features/seller/components/SellerClassifiedView.js +5 -0
  336. package/dist/features/seller/components/SellerCouponEditorView.js +17 -17
  337. package/dist/features/seller/components/SellerDigitalCodesView.js +5 -0
  338. package/dist/features/seller/components/SellerLiveView.js +5 -0
  339. package/dist/features/seller/components/SellerOffersView.js +2 -1
  340. package/dist/features/seller/components/SellerOrdersView.js +31 -9
  341. package/dist/features/seller/components/SellerPayoutSettingsView.js +56 -31
  342. package/dist/features/seller/components/SellerPreOrdersView.js +5 -0
  343. package/dist/features/seller/components/SellerPrizeDrawsView.js +14 -16
  344. package/dist/features/seller/components/SellerProductShell.js +7 -1
  345. package/dist/features/seller/components/SellerProductsView.js +11 -8
  346. package/dist/features/seller/components/SellerStickersView.js +5 -0
  347. package/dist/features/seller/components/index.d.ts +0 -2
  348. package/dist/features/seller/components/index.js +0 -1
  349. package/dist/features/seller/repository/offer.repository.d.ts +142 -24
  350. package/dist/features/seller/repository/offer.repository.js +165 -26
  351. package/dist/features/seller/schemas/coupon-form.d.ts +72 -0
  352. package/dist/features/seller/schemas/coupon-form.js +116 -0
  353. package/dist/features/seller/schemas/firestore.d.ts +56 -2
  354. package/dist/features/seller/schemas/firestore.js +27 -0
  355. package/dist/features/seller/schemas/index.d.ts +2 -2
  356. package/dist/features/seller/schemas/offer-forms.d.ts +46 -0
  357. package/dist/features/seller/schemas/offer-forms.js +42 -0
  358. package/dist/features/seller/server.d.ts +0 -1
  359. package/dist/features/seller/server.js +0 -1
  360. package/dist/features/shell/SectionForm.d.ts +99 -0
  361. package/dist/features/shell/SectionForm.js +128 -0
  362. package/dist/features/shell/build-sections.d.ts +63 -0
  363. package/dist/features/shell/build-sections.js +207 -0
  364. package/dist/features/shell/entity-form.d.ts +109 -0
  365. package/dist/features/shell/entity-form.js +96 -0
  366. package/dist/features/shell/field-ui-meta.d.ts +115 -0
  367. package/dist/features/shell/field-ui-meta.js +324 -0
  368. package/dist/features/shell/index.d.ts +8 -0
  369. package/dist/features/shell/index.js +4 -0
  370. package/dist/features/status-history/components/StatusTimeline.d.ts +74 -0
  371. package/dist/features/status-history/components/StatusTimeline.js +46 -0
  372. package/dist/features/status-history/index.d.ts +11 -0
  373. package/dist/features/status-history/index.js +10 -0
  374. package/dist/features/store-extensions/components/ReviewDecisionModal.d.ts +27 -0
  375. package/dist/features/store-extensions/components/ReviewDecisionModal.js +82 -0
  376. package/dist/features/store-extensions/index.d.ts +12 -0
  377. package/dist/features/store-extensions/index.js +12 -0
  378. package/dist/features/store-extensions/schemas/admin-notification-form.d.ts +36 -0
  379. package/dist/features/store-extensions/schemas/admin-notification-form.js +114 -0
  380. package/dist/features/store-extensions/schemas/analytics-forms.d.ts +57 -0
  381. package/dist/features/store-extensions/schemas/analytics-forms.js +158 -0
  382. package/dist/features/store-extensions/schemas/custom-role-form.d.ts +85 -0
  383. package/dist/features/store-extensions/schemas/custom-role-form.js +118 -0
  384. package/dist/features/store-extensions/schemas/firestore.d.ts +21 -1
  385. package/dist/features/store-extensions/schemas/firestore.js +60 -0
  386. package/dist/features/store-extensions/schemas/google-config-form.d.ts +53 -0
  387. package/dist/features/store-extensions/schemas/google-config-form.js +105 -0
  388. package/dist/features/store-extensions/schemas/item-request-create-form.d.ts +28 -0
  389. package/dist/features/store-extensions/schemas/item-request-create-form.js +80 -0
  390. package/dist/features/store-extensions/schemas/listing-template-form.d.ts +78 -0
  391. package/dist/features/store-extensions/schemas/listing-template-form.js +87 -0
  392. package/dist/features/store-extensions/schemas/moderation-review-form.d.ts +49 -0
  393. package/dist/features/store-extensions/schemas/moderation-review-form.js +101 -0
  394. package/dist/features/store-extensions/schemas/payout-method-form.d.ts +153 -0
  395. package/dist/features/store-extensions/schemas/payout-method-form.js +155 -0
  396. package/dist/features/store-extensions/schemas/report-create-form.d.ts +25 -0
  397. package/dist/features/store-extensions/schemas/report-create-form.js +79 -0
  398. package/dist/features/store-extensions/schemas/report-review-form.d.ts +47 -0
  399. package/dist/features/store-extensions/schemas/report-review-form.js +111 -0
  400. package/dist/features/store-extensions/schemas/shipping-config-form.d.ts +148 -0
  401. package/dist/features/store-extensions/schemas/shipping-config-form.js +104 -0
  402. package/dist/features/store-extensions/schemas/store-category-form.d.ts +54 -0
  403. package/dist/features/store-extensions/schemas/store-category-form.js +73 -0
  404. package/dist/features/stores/api/[storeSlug]/route.js +2 -25
  405. package/dist/features/stores/components/StoreAuctionsListing.js +15 -1
  406. package/dist/features/stores/components/StoreClassifiedsListing.js +12 -2
  407. package/dist/features/stores/components/StoreDetailLayoutView.js +24 -71
  408. package/dist/features/stores/components/StoreDigitalCodesListing.js +12 -2
  409. package/dist/features/stores/components/StoreLiveItemsListing.js +12 -2
  410. package/dist/features/stores/components/StorePreOrdersListing.js +12 -1
  411. package/dist/features/stores/components/StoreProductsListing.js +11 -1
  412. package/dist/features/stores/repository/store.repository.js +6 -0
  413. package/dist/features/stores/schemas/index.d.ts +6 -6
  414. package/dist/features/support/schemas/index.d.ts +4 -4
  415. package/dist/features/tester/actions/checklist-item-actions.d.ts +4 -4
  416. package/dist/features/tester/seed-data/offers-tester-seed-data.js +119 -3
  417. package/dist/features/tester/seed-data/products-tester-seed-data.js +131 -1
  418. package/dist/features/tester/seed-data/tester-checklist-seed-data.js +431 -1
  419. package/dist/features/wishlist/hooks/useWishlistWithGuest.d.ts +1 -1
  420. package/dist/index.d.ts +25 -12
  421. package/dist/index.js +26 -11
  422. package/dist/next/routing/route-map.d.ts +23 -3
  423. package/dist/next/routing/route-map.js +14 -2
  424. package/dist/providers/db-firebase/base.repository.d.ts +30 -0
  425. package/dist/providers/db-firebase/base.repository.js +50 -1
  426. package/dist/providers/db-firebase/index.d.ts +1 -1
  427. package/dist/providers/db-firebase/index.js +1 -1
  428. package/dist/providers/db-firebase/sieve.d.ts +25 -0
  429. package/dist/providers/db-firebase/sieve.js +52 -18
  430. package/dist/react/hooks/useUrlTable.js +10 -1
  431. package/dist/schemas/firestore-value.d.ts +8 -0
  432. package/dist/schemas/firestore-value.js +44 -0
  433. package/dist/schemas/index.d.ts +1 -1
  434. package/dist/schemas/index.js +1 -1
  435. package/dist/schemas/registry.d.ts +702 -69
  436. package/dist/schemas/registry.js +64 -1
  437. package/dist/seed/_helpers/category-forest.d.ts +2 -0
  438. package/dist/seed/_helpers/category-forest.js +309 -0
  439. package/dist/seed/_helpers/category-tree.d.ts +27 -0
  440. package/dist/seed/_helpers/category-tree.js +103 -0
  441. package/dist/seed/bids-seed-data.js +30 -0
  442. package/dist/seed/catalogue-seed-data.js +12 -12
  443. package/dist/seed/categories-seed-data.js +177 -162
  444. package/dist/seed/events-seed-data.js +61 -10
  445. package/dist/seed/homepage-sections-seed-data.js +5 -1
  446. package/dist/seed/offers-seed-data.js +244 -34
  447. package/dist/seed/orders-seed-data.js +336 -1
  448. package/dist/seed/products-art-seed-data.js +50 -12
  449. package/dist/seed/products-auctions-seed-data.js +138 -18
  450. package/dist/seed/products-classifieds-seed-data.js +80 -16
  451. package/dist/seed/products-digital-codes-seed-data.js +66 -18
  452. package/dist/seed/products-live-items-seed-data.js +64 -13
  453. package/dist/seed/products-preorders-seed-data.d.ts +0 -1
  454. package/dist/seed/products-preorders-seed-data.js +52 -13
  455. package/dist/seed/products-prize-draws-seed-data.js +63 -14
  456. package/dist/seed/products-standard-seed-data.js +99 -26
  457. package/dist/seed/products-stickers-seed-data.js +47 -12
  458. package/dist/seed/reviews-seed-data.js +6 -1
  459. package/dist/seed/site-settings-seed-data.d.ts +1 -38
  460. package/dist/seed/site-settings-seed-data.js +38 -76
  461. package/dist/seed/stores-seed-data.js +71 -1
  462. package/dist/seed/users-seed-data.js +15 -5
  463. package/dist/server-entry.d.ts +1 -2
  464. package/dist/server-entry.js +4 -3
  465. package/dist/server.d.ts +6 -3
  466. package/dist/server.js +13 -4
  467. package/dist/styles.css +78 -12
  468. package/dist/tailwind-utilities.css +1 -1
  469. package/dist/ui/components/Button.style.css +19 -4
  470. package/dist/ui/components/CollapsibleSection.d.ts +17 -1
  471. package/dist/ui/components/CollapsibleSection.js +6 -2
  472. package/dist/ui/components/FilterChipGroup.d.ts +25 -1
  473. package/dist/ui/components/FilterChipGroup.js +21 -4
  474. package/dist/ui/components/HandMode.style.css +47 -0
  475. package/dist/ui/components/Layout.d.ts +9 -2
  476. package/dist/ui/components/Layout.js +1 -1
  477. package/dist/ui/components/ListingLayout.js +8 -8
  478. package/dist/ui/components/ListingLayout.style.css +8 -7
  479. package/dist/ui/components/RecordDetailModal.d.ts +10 -1
  480. package/dist/ui/components/RecordDetailModal.js +2 -2
  481. package/dist/ui/components/StickyToolbar.d.ts +3 -1
  482. package/dist/ui/components/StickyToolbar.js +62 -20
  483. package/dist/ui/components/bottom-chrome-slot.d.ts +21 -0
  484. package/dist/ui/components/bottom-chrome-slot.js +29 -0
  485. package/dist/ui/components/index.style.css +3 -0
  486. package/dist/ui/forms/FormShell.d.ts +43 -13
  487. package/dist/ui/forms/FormShell.js +22 -11
  488. package/dist/ui/forms/index.d.ts +1 -1
  489. package/dist/ui/index.d.ts +1 -1
  490. package/package.json +2 -1
  491. package/scripts/node-esm-loader.mjs +65 -0
  492. package/scripts/seed-cli-loader.mjs +6 -49
  493. package/scripts/seed-cli.mjs +1 -1
@@ -374,9 +374,12 @@ export const ERROR_MESSAGES = {
374
374
  BID_TOO_LOW: "Your bid must be higher than the current bid",
375
375
  INCREMENT_TOO_LOW: "Your bid does not meet the minimum increment requirement",
376
376
  OWN_AUCTION: "You cannot bid on your own auction",
377
- BUY_NOW_UNAVAILABLE: "Buy Now is not available for this auction",
378
- BUY_NOW_BIDS_STARTED: "Buy Now is no longer available — bids have already been placed",
377
+ BUY_NOW_UNAVAILABLE: "Buy Now is unavailable — bidding has already passed the Buy Now price",
379
378
  BUY_NOW_NO_PRICE: "This auction does not have a Buy Now price",
379
+ BUYOUT_LAPSED: "Your Buy Now claim expired. Head back to the auction to bid or try again.",
380
+ BUYOUT_OUTBID: "Bidding passed the Buy Now price while you were checking out, so this purchase can no longer go through.",
381
+ AUCTION_ALREADY_SOLD: "Another buyer completed their purchase first, so this auction is already sold.",
382
+ AUCTION_ENDED_BEFORE_CHECKOUT: "The auction ended before you completed payment, so it went to the winning bidder.",
380
383
  },
381
384
  CONTACT: {
382
385
  SEND_FAILED: "Failed to send your message. Please try again.",
@@ -454,6 +457,11 @@ export const ERROR_MESSAGES = {
454
457
  },
455
458
  // Offer errors
456
459
  OFFER: {
460
+ /**
461
+ * The site-wide `featureFlags.offers` kill switch is off. Existing offers
462
+ * can still be responded to and paid for — only new ones are refused.
463
+ */
464
+ DISABLED: "Offers are currently turned off across the site.",
457
465
  LIMIT_REACHED: "You have reached the maximum of 3 offers for this product. Wait for the seller to update the listing.",
458
466
  COUNTER_RANGE: "Your counter must be within 20% of the seller's counter price.",
459
467
  NOT_COUNTERED: "There is no seller counter to respond to.",
@@ -9,6 +9,9 @@ export interface AboutViewProps {
9
9
  missionText?: string;
10
10
  howItWorksTitle?: string;
11
11
  valuesTitle?: string;
12
+ valuesSubtitle?: string;
13
+ /** When set, renders a link from the values section through to `/ethics`. */
14
+ valuesLinkLabel?: string;
12
15
  milestonesTitle?: string;
13
16
  teamTitle?: string;
14
17
  teamSubtitle?: string;
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Anchor, Avatar, Badge, Card, Div, Heading, Row, Section, Span, Stack, Text } from "../../../ui";
2
+ import { Anchor, Avatar, Badge, Card, Div, Heading, Row, Section, Span, Stack, Text, TextLink } from "../../../ui";
3
+ import { ROUTES } from "../../../constants";
3
4
  export function AboutView({ labels = {}, howItems = [], valueItems = [], milestones = [], teamMembers = [], ctaBannerClass = "", renderCtaButtons, }) {
4
- return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { color: "inverse", tone: "accent-banner", padding: "y-4xl", children: _jsxs(Div, { paddingX: "x-page", className: "max-w-4xl mx-auto text-center", children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-6", mdSize: "5xl", size: "4xl", weight: "bold", children: labels.title }), _jsx(Text, { color: "inverse", variant: "none", className: "/80 max-w-2xl mx-auto", size: "xl", children: labels.subtitle })] }) }), _jsxs(Div, { paddingX: "x-page", className: "max-w-5xl mx-auto", padding: "y-4xl", children: [_jsxs(Section, { className: "text-center max-w-3xl mx-auto", children: [_jsx(Heading, { level: 2, className: "mb-4", children: labels.missionTitle }), _jsx(Text, { size: "lg", variant: "secondary", className: "leading-relaxed", children: labels.missionText })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-12", align: "center", children: labels.howItWorksTitle }), _jsx(Div, { className: "grid md:grid-cols-3", gap: "6", children: howItems.map(({ title, text, icon, tone }) => (_jsxs(Card, { variant: `gradient-${tone ?? "indigo"}`, padding: "md", spacing: "sm", children: [_jsx(Div, { children: _jsx(Span, { size: "4xl", children: icon }) }), _jsx(Heading, { level: 3, children: title }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: text })] }, title))) })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-12", align: "center", children: labels.valuesTitle }), _jsx(Div, { className: "grid md:grid-cols-3", gap: "5", children: valueItems.map(({ title, text, icon }) => (_jsxs(Stack, { gap: "3", surface: "default", padding: "lg", rounded: "xl", border: "default", children: [_jsx(Div, { children: _jsx(Span, { size: "3xl", children: icon }) }), _jsx(Heading, { level: 3, children: title }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: text })] }, title))) })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-10", align: "center", children: labels.milestonesTitle }), _jsx(Stack, { className: "relative border-l-2 border-primary/30 max-w-2xl mx-auto pl-[2rem]", gap: "xl", children: milestones.map(({ year, text }) => (_jsxs(Div, { className: "relative", children: [_jsx(Div, { className: "absolute -left-10 top-1 w-4 h-4 bg-primary border-2 border-white", rounded: "full" }), _jsx(Span, { size: "xs", weight: "bold", className: "text-primary tracking-wide", transform: "uppercase", children: year }), _jsx(Text, { className: "mt-1", children: text })] }, year))) })] }), teamMembers.length > 0 && (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-2", align: "center", children: labels.teamTitle }), labels.teamSubtitle && (_jsx(Text, { size: "lg", variant: "secondary", align: "center", className: "mb-12 max-w-2xl mx-auto", children: labels.teamSubtitle })), _jsx(Div, { className: "grid md:grid-cols-3", gap: "6", children: teamMembers.map((member) => (_jsxs(Stack, { gap: "3", surface: "default", padding: "lg", rounded: "xl", border: "default", align: "center", className: "text-center", children: [_jsx(Avatar, { src: member.photoUrl, name: member.name, alt: member.name, size: "lg" }), _jsx(Heading, { level: 3, children: member.name }), _jsxs(Row, { gap: "xs", wrap: true, justify: "center", children: [_jsx(Span, { size: "xs", weight: "bold", className: "text-primary tracking-wide", transform: "uppercase", children: member.role }), member.isFounder && _jsx(Badge, { variant: "primary", size: "xs", children: "Founder" }), member.isDeveloper && _jsx(Badge, { variant: "secondary", size: "xs", children: "Developer" })] }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: member.bio }), member.githubUrl && (_jsx(Anchor, { href: member.githubUrl, tone: "muted", size: "sm", underline: "hover", children: "GitHub \u2197" }))] }, member.name))) })] })), _jsxs(Section, { color: "inverse", tone: "accent-banner", className: `text-center ${ctaBannerClass}`, padding: "xl", rounded: "2xl", children: [_jsx(Heading, { color: "inverse", level: 2, variant: "none", className: "mb-8", size: "3xl", weight: "bold", children: labels.ctaTitle }), renderCtaButtons ? (renderCtaButtons()) : (_jsx(Row, { justify: "center", gap: "3", wrap: true, children: _jsxs(Span, { color: "inverse", size: "sm", className: "/70", children: [labels.ctaSell, " \u00B7 ", labels.ctaShop] }) }))] })] })] }));
5
+ return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { color: "inverse", tone: "accent-banner", padding: "y-4xl", children: _jsxs(Div, { paddingX: "x-page", className: "max-w-4xl mx-auto text-center", children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-6", mdSize: "5xl", size: "4xl", weight: "bold", children: labels.title }), _jsx(Text, { color: "inverse", variant: "none", className: "/80 max-w-2xl mx-auto", size: "xl", children: labels.subtitle })] }) }), _jsxs(Div, { paddingX: "x-page", className: "max-w-5xl mx-auto", padding: "y-4xl", children: [_jsxs(Section, { className: "text-center max-w-3xl mx-auto", children: [_jsx(Heading, { level: 2, className: "mb-4", children: labels.missionTitle }), _jsx(Text, { size: "lg", variant: "secondary", className: "leading-relaxed", children: labels.missionText })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-12", align: "center", children: labels.howItWorksTitle }), _jsx(Div, { className: "grid md:grid-cols-3", gap: "6", children: howItems.map(({ title, text, icon, tone }) => (_jsxs(Card, { variant: `gradient-${tone ?? "indigo"}`, padding: "md", spacing: "sm", children: [_jsx(Div, { children: _jsx(Span, { size: "4xl", children: icon }) }), _jsx(Heading, { level: 3, children: title }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: text })] }, title))) })] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: labels.valuesSubtitle ? "mb-3" : "mb-12", align: "center", children: labels.valuesTitle }), labels.valuesSubtitle && (_jsx(Text, { size: "base", variant: "secondary", align: "center", className: "mb-12 max-w-2xl mx-auto leading-relaxed", children: labels.valuesSubtitle })), _jsx(Div, { className: "grid md:grid-cols-3", gap: "5", children: valueItems.map(({ title, text, icon, detail }) => (_jsxs(Stack, { gap: "3", surface: "default", padding: "lg", rounded: "xl", border: "default", children: [_jsx(Div, { children: _jsx(Span, { size: "3xl", children: icon }) }), _jsx(Heading, { level: 3, children: title }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: text }), detail && (_jsx(Text, { size: "sm", color: "muted", className: "leading-relaxed", children: detail }))] }, title))) }), labels.valuesLinkLabel && (_jsx(Div, { className: "mt-8 text-center", children: _jsx(TextLink, { href: String(ROUTES.PUBLIC.ETHICS), size: "sm", children: labels.valuesLinkLabel }) }))] }), _jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-10", align: "center", children: labels.milestonesTitle }), _jsx(Stack, { className: "relative border-l-2 border-primary/30 max-w-2xl mx-auto pl-[2rem]", gap: "xl", children: milestones.map(({ year, text }) => (_jsxs(Div, { className: "relative", children: [_jsx(Div, { className: "absolute -left-10 top-1 w-4 h-4 bg-primary border-2 border-white", rounded: "full" }), _jsx(Span, { size: "xs", weight: "bold", className: "text-primary tracking-wide", transform: "uppercase", children: year }), _jsx(Text, { className: "mt-1", children: text })] }, year))) })] }), teamMembers.length > 0 && (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-2", align: "center", children: labels.teamTitle }), labels.teamSubtitle && (_jsx(Text, { size: "lg", variant: "secondary", align: "center", className: "mb-12 max-w-2xl mx-auto", children: labels.teamSubtitle })), _jsx(Div, { className: "grid md:grid-cols-3", gap: "6", children: teamMembers.map((member) => (_jsxs(Stack, { gap: "3", surface: "default", padding: "lg", rounded: "xl", border: "default", align: "center", className: "text-center", children: [_jsx(Avatar, { src: member.photoUrl, name: member.name, alt: member.name, size: "lg" }), _jsx(Heading, { level: 3, children: member.name }), _jsxs(Row, { gap: "xs", wrap: true, justify: "center", children: [_jsx(Span, { size: "xs", weight: "bold", className: "text-primary tracking-wide", transform: "uppercase", children: member.role }), member.isFounder && _jsx(Badge, { variant: "primary", size: "xs", children: "Founder" }), member.isDeveloper && _jsx(Badge, { variant: "secondary", size: "xs", children: "Developer" })] }), _jsx(Text, { size: "sm", variant: "secondary", className: "leading-relaxed", children: member.bio }), member.githubUrl && (_jsx(Anchor, { href: member.githubUrl, tone: "muted", size: "sm", underline: "hover", children: "GitHub \u2197" }))] }, member.name))) })] })), _jsxs(Section, { color: "inverse", tone: "accent-banner", className: `text-center ${ctaBannerClass}`, padding: "xl", rounded: "2xl", children: [_jsx(Heading, { color: "inverse", level: 2, variant: "none", className: "mb-8", size: "3xl", weight: "bold", children: labels.ctaTitle }), renderCtaButtons ? (renderCtaButtons()) : (_jsx(Row, { justify: "center", gap: "3", wrap: true, children: _jsxs(Span, { color: "inverse", size: "sm", className: "/70", children: [labels.ctaSell, " \u00B7 ", labels.ctaShop] }) }))] })] })] }));
5
6
  }
@@ -1,5 +1,6 @@
1
+ export type PolicyKey = "privacy" | "terms" | "cookies" | "refund" | "ethics" | "conduct";
1
2
  export interface PolicyPageViewProps {
2
3
  /** Which policy to render */
3
- policy: "privacy" | "terms" | "cookies" | "refund";
4
+ policy: PolicyKey;
4
5
  }
5
6
  export declare function PolicyPageView({ policy, }: PolicyPageViewProps): Promise<import("react").JSX.Element>;
@@ -6,28 +6,69 @@ import { PAGE_CONTAINER } from "../../../_internal/shared/styles/page";
6
6
  import { Div, Heading, Text, Section, Stack } from "../../../ui";
7
7
  import { TextLink } from "../../../ui";
8
8
  import { siteSettingsRepository } from "../../../repositories";
9
- const namespaceMap = {
10
- privacy: "privacy",
11
- terms: "terms",
12
- cookies: "cookies",
13
- refund: "refundPolicy",
14
- };
15
- const firestoreFieldMap = {
16
- privacy: "privacy",
17
- terms: "terms",
18
- cookies: "cookies",
19
- refund: "refundPolicy",
9
+ /**
10
+ * Single source of truth for every policy page this shell can render.
11
+ *
12
+ * Declared as `Record<PolicyKey, …>` on purpose: adding a member to `PolicyKey`
13
+ * without adding its entry here is a COMPILE error, not a silent gap. This
14
+ * replaced three separate hand-maintained enumerations of the same union
15
+ * (a namespace map, a Firestore-field map, and an inline path lookup inside the
16
+ * related-links filter) — see Recurrent Root Cause #61.
17
+ *
18
+ * - `path` — used to exclude the current page from its own related list
19
+ * - `namespace` — next-intl namespace holding this page's copy
20
+ * - `firestoreField` — key inside `siteSettings.legalPages` carrying the admin HTML override
21
+ * - `relatedLabelKey` — i18n key that OTHER policy namespaces use to label a link to this page
22
+ */
23
+ const POLICY_META = {
24
+ privacy: {
25
+ path: String(ROUTES.PUBLIC.PRIVACY),
26
+ namespace: "privacy",
27
+ firestoreField: "privacy",
28
+ relatedLabelKey: "relatedPrivacy",
29
+ },
30
+ terms: {
31
+ path: String(ROUTES.PUBLIC.TERMS),
32
+ namespace: "terms",
33
+ firestoreField: "terms",
34
+ relatedLabelKey: "relatedTerms",
35
+ },
36
+ cookies: {
37
+ path: String(ROUTES.PUBLIC.COOKIE_POLICY),
38
+ namespace: "cookies",
39
+ firestoreField: "cookies",
40
+ relatedLabelKey: "relatedCookies",
41
+ },
42
+ refund: {
43
+ path: String(ROUTES.PUBLIC.REFUND_POLICY),
44
+ namespace: "refundPolicy",
45
+ firestoreField: "refundPolicy",
46
+ relatedLabelKey: "relatedRefund",
47
+ },
48
+ ethics: {
49
+ path: String(ROUTES.PUBLIC.ETHICS),
50
+ namespace: "ethics",
51
+ firestoreField: "ethics",
52
+ relatedLabelKey: "relatedEthics",
53
+ },
54
+ conduct: {
55
+ path: String(ROUTES.PUBLIC.CODE_OF_CONDUCT),
56
+ namespace: "codeOfConduct",
57
+ firestoreField: "codeOfConduct",
58
+ relatedLabelKey: "relatedConduct",
59
+ },
20
60
  };
61
+ const POLICY_KEYS = Object.keys(POLICY_META);
21
62
  export async function PolicyPageView({ policy, }) {
22
63
  const page = { container: PAGE_CONTAINER };
64
+ const meta = POLICY_META[policy];
23
65
  const { getTranslations } = await import("next-intl/server");
24
- const t = await getTranslations(namespaceMap[policy]);
66
+ const t = await getTranslations(meta.namespace);
25
67
  // Check Firestore for admin-overridden HTML content
26
68
  let adminHtml = "";
27
69
  try {
28
70
  const settings = await siteSettingsRepository.getSingleton();
29
- const legalPages = settings.legalPages ?? {};
30
- adminHtml = legalPages[firestoreFieldMap[policy]] ?? "";
71
+ adminHtml = settings.legalPages?.[meta.firestoreField] ?? "";
31
72
  }
32
73
  catch (_err) {
33
74
  void normalizeError(_err);
@@ -36,15 +77,12 @@ export async function PolicyPageView({ policy, }) {
36
77
  // i18n fallback sections
37
78
  const rawSections = t.raw("sections");
38
79
  const sections = Array.isArray(rawSections) ? rawSections : [];
39
- const relatedLinks = [
40
- { label: t("relatedPrivacy"), href: String(ROUTES.PUBLIC.PRIVACY) },
41
- { label: t("relatedTerms"), href: String(ROUTES.PUBLIC.TERMS) },
42
- { label: t("relatedCookies"), href: String(ROUTES.PUBLIC.COOKIE_POLICY) },
43
- { label: t("relatedRefund"), href: String(ROUTES.PUBLIC.REFUND_POLICY) },
44
- ].filter((l) => {
45
- const policyPath = { privacy: "/privacy", terms: "/terms", cookies: "/cookies", refund: "/refund-policy" }[policy];
46
- return !l.href.endsWith(policyPath ?? "");
47
- });
80
+ // Derived from POLICY_META, so a newly added policy appears in every other
81
+ // page's related list automatically and can never link to itself.
82
+ const relatedLinks = POLICY_KEYS.filter((key) => key !== policy).map((key) => ({
83
+ label: t(POLICY_META[key].relatedLabelKey),
84
+ href: POLICY_META[key].path,
85
+ }));
48
86
  return (_jsxs(Div, { className: "-mx-4 md:-mx-6 lg:-mx-8 -mt-6 sm:-mt-8 lg:-mt-10", children: [_jsx(Section, { color: "inverse", tone: "accent-banner", padding: "banner", children: _jsxs(Div, { className: `${page.container.sm}`, children: [_jsx(Heading, { color: "inverse", level: 1, variant: "none", className: "mb-3", children: t("title") }), _jsx(Text, { color: "inverse", variant: "none", className: "/80", size: "sm", children: t("lastUpdated") })] }) }), _jsxs(Div, { className: `${page.container.sm}`, padding: "content-banner", children: [adminHtml ? (
49
87
  /* Admin-set HTML takes priority */
50
88
  _jsx(Div, { className: "prose prose-neutral dark:prose-invert max-w-none", dangerouslySetInnerHTML: { __html: adminHtml } })) : (_jsxs(_Fragment, { children: [t("intro") && (_jsx(Text, { variant: "secondary", className: "mb-10 leading-relaxed", size: "base", children: t("intro") })), _jsx(Stack, { gap: "xl", children: sections.map((section, i) => (_jsxs(Section, { children: [_jsx(Heading, { level: 2, className: "mb-3", children: section.heading }), _jsx(Text, { variant: "secondary", className: "leading-relaxed whitespace-pre-line", children: section.body })] }, i))) })] })), relatedLinks.length > 0 && (_jsxs(Div, { className: `mt-14 border-t`, border: "default", padding: "t-xl", children: [_jsx(Heading, { level: 3, className: "mb-3 uppercase tracking-wide", color: "muted", size: "sm", weight: "semibold", children: t("relatedTitle") }), _jsx(Row, { wrap: true, gap: "md", children: relatedLinks.map((l) => (_jsx(TextLink, { href: l.href, variant: "muted", size: "sm", children: l.label }, l.href))) })] }))] })] }));
@@ -48,6 +48,11 @@ function toProductItem(p) {
48
48
  currentBid: p.currentBid,
49
49
  availableQuantity: p.availableQuantity,
50
50
  tags: p.tags,
51
+ // Feeds ProductCard's "Taking Offers" pill. This is a second, local copy of
52
+ // the shared `toProductItem` in _internal/shared/features/products/ and it
53
+ // had the same omission — when a field is added to one, check the other.
54
+ allowOffers: p.allowOffers,
55
+ minOfferPercent: p.minOfferPercent,
51
56
  createdAt: p.createdAt instanceof Date ? p.createdAt.toISOString() : undefined,
52
57
  };
53
58
  }
@@ -13,6 +13,8 @@ export interface AboutValueItem {
13
13
  title: string;
14
14
  text: string;
15
15
  icon: string;
16
+ /** Optional second paragraph — how the value is actually enforced, not just stated. */
17
+ detail?: string;
16
18
  }
17
19
  export interface AboutMilestone {
18
20
  year: string;
@@ -36,6 +38,7 @@ export interface AboutContentDocument {
36
38
  howItWorksTitle: string;
37
39
  howItems: AboutHowItem[];
38
40
  valuesTitle: string;
41
+ valuesSubtitle?: string;
39
42
  valueItems: AboutValueItem[];
40
43
  milestonesTitle: string;
41
44
  milestones: AboutMilestone[];
@@ -1,9 +1,11 @@
1
1
  "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { sortBy, sieveFilter, SIEVE_OP } from "../../../utils/sieve-builder";
4
4
  import { ACCOUNT_ENDPOINTS } from "../../../constants/api-endpoints";
5
5
  import { ROUTES } from "../../../constants/index";
6
- import { Div, Span, Stack, TextLink } from "../../../ui";
6
+ import { useState } from "react";
7
+ import { Div, Span, Stack, TextLink, RecordDetailModal } from "../../../ui";
8
+ import { buildBidDetailFields, bidStatusBadge } from "../../auctions/components/bid-detail-fields";
7
9
  import { FieldSelect } from "../../../ui/forms";
8
10
  import { AuctionBidsTable } from "../../auctions/components/AuctionBidsTable";
9
11
  import { DataListingView } from "../../admin/components/DataListingView";
@@ -21,6 +23,11 @@ const STATUS_OPTIONS = [
21
23
  { value: "cancelled", label: "Cancelled" },
22
24
  ];
23
25
  export function UserBidsView() {
26
+ // A bid could be seen in this list and never opened — no row click, no row
27
+ // action, no detail page. The "Browse auctions" link in the empty state is
28
+ // not an affordance: it is not row-scoped, and it only shows when there are
29
+ // no bids at all.
30
+ const [detail, setDetail] = useState(null);
24
31
  const config = {
25
32
  portal: "user",
26
33
  title: "My Bids",
@@ -40,8 +47,9 @@ export function UserBidsView() {
40
47
  if (isLoading) {
41
48
  return (_jsx(Stack, { gap: "md", children: Array.from({ length: 3 }).map((_, i) => (_jsx(Div, { className: "h-16 animate-pulse border border-[var(--appkit-color-border)]", rounded: "xl" }, i))) }));
42
49
  }
43
- return (_jsx(AuctionBidsTable, { bids: rows, portal: "buyer", totalPages: 1, currentPage: 1, onPageChange: () => { }, emptyLabel: _jsxs(Span, { children: ["You haven't placed any bids yet.", " ", _jsx(TextLink, { href: String(ROUTES.PUBLIC.AUCTIONS), children: "Browse auctions" })] }) }));
50
+ return (_jsx(AuctionBidsTable, { bids: rows, portal: "buyer", onRowClick: (bid) => setDetail(bid), totalPages: 1, currentPage: 1, onPageChange: () => { }, emptyLabel: _jsxs(Span, { children: ["You haven't placed any bids yet.", " ", _jsx(TextLink, { href: String(ROUTES.PUBLIC.AUCTIONS), children: "Browse auctions" })] }) }));
44
51
  },
45
52
  };
46
- return _jsx(DataListingView, { config: config });
53
+ const badge = detail ? bidStatusBadge(detail.status) : null;
54
+ return (_jsxs(_Fragment, { children: [_jsx(DataListingView, { config: config }), _jsx(RecordDetailModal, { isOpen: detail !== null, onClose: () => setDetail(null), title: detail?.productTitle || "Bid", badges: badge ? [{ label: badge.label }] : undefined, fields: detail ? buildBidDetailFields(detail, "buyer") : undefined, footer: detail ? (_jsx(TextLink, { href: String(ROUTES.PUBLIC.AUCTION_DETAIL(detail.productId)), children: "View auction \u2192" })) : undefined })] }));
47
55
  }
@@ -8,6 +8,7 @@ import { Button, Div, FilterChipGroup, Grid, Stack, Text, TextLink } from "../..
8
8
  import { PaginatedSelect } from "../../../ui/components/PaginatedSelect";
9
9
  import { DataListingView } from "../../admin/components/DataListingView";
10
10
  import { OrderCard } from "../../orders/components/OrdersList";
11
+ import { useOrderScope } from "../../orders/components/OrderScopeTabs";
11
12
  const CANCELLABLE_STATUSES = new Set(["pending", "confirmed", "processing"]);
12
13
  const TRACKABLE_STATUSES = new Set(["shipped"]);
13
14
  const SORT_OPTIONS = [
@@ -43,6 +44,7 @@ const STATUS_OPTIONS = [
43
44
  { value: "return_requested", label: "Return requested" },
44
45
  ];
45
46
  export function UserOrdersView({ onOrderClick }) {
47
+ const orderScope = useOrderScope();
46
48
  const config = {
47
49
  portal: "user",
48
50
  title: "My Orders",
@@ -62,6 +64,11 @@ export function UserOrdersView({ onOrderClick }) {
62
64
  ]
63
65
  .filter(Boolean)
64
66
  .join(",") || undefined,
67
+ // The lifecycle scope sits alongside the lane tabs as a second,
68
+ // independent axis: a buyer can ask "which of my auction wins are still
69
+ // in flight" without those two questions fighting over one control.
70
+ buildExtraParams: () => orderScope.extraParams,
71
+ renderAboveContent: orderScope.renderAboveContent,
65
72
  renderFilterPanel: ({ pendingFilters, setPendingFilters }) => (_jsxs(Stack, { gap: "md", children: [_jsx(FilterChipGroup, { label: "Type", tabs: ORDER_LANE_TABS, value: pendingFilters.orderType ?? "", onChange: (id) => setPendingFilters((prev) => ({ ...prev, orderType: id })) }), _jsx(Div, { children: _jsx(PaginatedSelect, { value: pendingFilters.status || null, onChange: (v) => setPendingFilters((p) => ({ ...p, status: v ?? "" })), options: STATUS_OPTIONS, placeholder: "All statuses", ariaLabel: "Filter by order status" }) })] })),
66
73
  renderCards: (rows, _view, _selection, isLoading) => {
67
74
  if (isLoading) {
@@ -1,5 +1,8 @@
1
1
  import type { Order } from "../../orders/types";
2
2
  export interface UserReturnsViewProps {
3
+ /**
4
+ * Optional override. When omitted the card still opens — see below.
5
+ */
3
6
  onOrderClick?: (order: Order) => void;
4
7
  }
5
8
  export declare function UserReturnsView({ onOrderClick }: UserReturnsViewProps): import("react").JSX.Element;
@@ -3,6 +3,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { sortBy } from "../../../constants/sort";
4
4
  import { ACCOUNT_ENDPOINTS } from "../../../constants/api-endpoints";
5
5
  import { Div, Grid, Stack, Text } from "../../../ui";
6
+ import { useRouter } from "next/navigation";
7
+ import { ROUTES } from "../../../next/routing/route-map";
6
8
  import { DataListingView } from "../../admin/components/DataListingView";
7
9
  import { OrderCard } from "../../orders/components/OrdersList";
8
10
  const SORT_OPTIONS = [
@@ -11,6 +13,11 @@ const SORT_OPTIONS = [
11
13
  { value: sortBy("createdAt", "ASC"), label: "Oldest" },
12
14
  ];
13
15
  export function UserReturnsView({ onOrderClick }) {
16
+ const router = useRouter();
17
+ // Client-side navigation, not a full reload — the row is a link in behaviour
18
+ // even though the card itself contains its own controls, so wrapping it in
19
+ // an <a> would nest interactive content inside a link.
20
+ const openOrder = (order) => router.push(String(ROUTES.USER.ORDER_DETAIL(order.id)));
14
21
  const config = {
15
22
  portal: "user",
16
23
  title: "Returns & Refunds",
@@ -32,7 +39,16 @@ export function UserReturnsView({ onOrderClick }) {
32
39
  if (rows.length === 0) {
33
40
  return _jsx(Text, { color: "muted", children: "You have no return or refund requests." });
34
41
  }
35
- return (_jsx(Grid, { gap: "md", className: "grid-cols-1", children: rows.map((order) => (_jsx(OrderCard, { order: order, onClick: onOrderClick }, order.id))) }));
42
+ return (_jsx(Grid, { gap: "md", className: "grid-cols-1", children: rows.map((order) => (_jsx(OrderCard, { order: order,
43
+ // A return IS an order, and its detail page already exists — so
44
+ // the row opens whether or not a consumer supplies a handler.
45
+ //
46
+ // It was previously openable ONLY because the single consumer
47
+ // happened to pass `onOrderClick`; a second one that forgot
48
+ // would have produced a listing whose rows do nothing, and no
49
+ // audit could have seen it because the affordance lived in the
50
+ // caller. Defaulting here makes it structural.
51
+ onClick: onOrderClick ?? openOrder }, order.id))) }));
36
52
  },
37
53
  };
38
54
  return _jsx(DataListingView, { config: config });
@@ -25,8 +25,6 @@ export { UserAddressesView } from "./UserAddressesView";
25
25
  export type { UserAddressesViewProps, UserAddressesViewLabels, } from "./UserAddressesView";
26
26
  export { UserNotificationsView } from "./UserNotificationsView";
27
27
  export type { UserNotificationsViewProps, UserNotificationsViewLabels, } from "./UserNotificationsView";
28
- export { UserOffersView } from "./UserOffersView";
29
- export type { UserOffersViewProps, UserOffersViewLabels, } from "./UserOffersView";
30
28
  export { UserOffersPanel } from "./UserOffersPanel";
31
29
  export type { UserOffersPanelProps } from "./UserOffersPanel";
32
30
  export { MessagesView } from "./MessagesView";
@@ -12,7 +12,6 @@ export { UserBidsView } from "./UserBidsView";
12
12
  export { OrderDetailView } from "./OrderDetailView";
13
13
  export { UserAddressesView } from "./UserAddressesView";
14
14
  export { UserNotificationsView } from "./UserNotificationsView";
15
- export { UserOffersView } from "./UserOffersView";
16
15
  export { UserOffersPanel } from "./UserOffersPanel";
17
16
  export { MessagesView } from "./MessagesView";
18
17
  export { ChatList } from "./ChatList";
@@ -144,9 +144,9 @@ export declare const userProfileSchema: z.ZodObject<{
144
144
  phone?: string | undefined;
145
145
  line2?: string | undefined;
146
146
  }[] | undefined;
147
- phone?: string | undefined;
148
147
  photoURL?: string | undefined;
149
148
  bio?: string | undefined;
149
+ phone?: string | undefined;
150
150
  notificationPreferences?: {
151
151
  push?: boolean | undefined;
152
152
  newsletter?: boolean | undefined;
@@ -172,9 +172,9 @@ export declare const userProfileSchema: z.ZodObject<{
172
172
  phone?: string | undefined;
173
173
  line2?: string | undefined;
174
174
  }[] | undefined;
175
- phone?: string | undefined;
176
175
  photoURL?: string | undefined;
177
176
  bio?: string | undefined;
177
+ phone?: string | undefined;
178
178
  notificationPreferences?: {
179
179
  push?: boolean | undefined;
180
180
  newsletter?: boolean | undefined;
@@ -1,5 +1,24 @@
1
- export type OrderStatus = "placed" | "pending" | "confirmed" | "processing" | "shipped" | "delivered" | "cancelled" | "returned" | "refunded";
2
- export type PaymentStatus = "pending" | "paid" | "failed" | "refunded";
1
+ /**
2
+ * Root Cause #36 — this module used to declare its OWN `OrderStatus` and
3
+ * `PaymentStatus`, and `appkit/src/index.ts` re-exported *those* rather than
4
+ * the real ones. So a bare `import type { OrderStatus } from "@mohasinac/appkit"`
5
+ * silently resolved to a narrower, wrong union:
6
+ *
7
+ * OrderStatus had a fake `"placed"` (used nowhere but its own declaration)
8
+ * and was MISSING `"return_requested"` — a real status with
9
+ * 29 references across the codebase.
10
+ * PaymentStatus was missing `"processing"` and `"partial_refund"`.
11
+ *
12
+ * Assigning a legitimate `OrderStatusValues.RETURN_REQUESTED` to an
13
+ * `OrderStatus[]` therefore failed to typecheck, which is what pushed callers
14
+ * onto `Set<string>` and untyped workarounds.
15
+ *
16
+ * These are now re-exports of the single source of truth. The account feature
17
+ * describes the same orders the rest of the app does; it never had grounds for
18
+ * its own union.
19
+ */
20
+ import type { OrderStatus, PaymentStatus } from "../../orders/types/index";
21
+ export type { OrderStatus, PaymentStatus };
3
22
  export interface OrderItem {
4
23
  productId: string;
5
24
  title: string;
@@ -41,12 +41,12 @@ export declare const addressFirestoreSchema: z.ZodObject<{
41
41
  toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
42
42
  }, z.ZodTypeAny, "passthrough">;
43
43
  isDefault: boolean;
44
- phone: string;
45
- city: string;
46
44
  ownerId: string;
47
45
  ownerType: "user" | "store";
48
46
  fullName: string;
47
+ phone: string;
49
48
  addressLine1: string;
49
+ city: string;
50
50
  state: string;
51
51
  postalCode: string;
52
52
  addressLine2?: string | undefined;
@@ -62,12 +62,12 @@ export declare const addressFirestoreSchema: z.ZodObject<{
62
62
  toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
63
63
  }, z.ZodTypeAny, "passthrough">;
64
64
  isDefault: boolean;
65
- phone: string;
66
- city: string;
67
65
  ownerId: string;
68
66
  ownerType: "user" | "store";
69
67
  fullName: string;
68
+ phone: string;
70
69
  addressLine1: string;
70
+ city: string;
71
71
  state: string;
72
72
  postalCode: string;
73
73
  addressLine2?: string | undefined;
@@ -13,14 +13,19 @@ import React from "react";
13
13
  import { ListingLayout } from "../../../ui";
14
14
  import { buildListingTypeListingConfig } from "../../products/config/listing-type-listing-config";
15
15
  import { DataListingView } from "./DataListingView";
16
- const CONFIG = buildListingTypeListingConfig("art", {
16
+ import { useAvailabilityScope } from "../../products/hooks/useAvailabilityScope";
17
+ const LISTING_TYPES = ["art"];
18
+ const CONFIG_OPTS = {
17
19
  title: "Art",
18
20
  searchPlaceholder: "Search art prints by name or seller",
19
21
  emptyLabel: "No art listings",
20
- });
22
+ };
21
23
  export function AdminArtView({ children, ...props }) {
24
+ const scope = useAvailabilityScope(LISTING_TYPES);
22
25
  if (React.Children.count(children) > 0) {
23
26
  return (_jsx(ListingLayout, { portal: "admin", ...props, children: children }));
24
27
  }
25
- return _jsx(DataListingView, { config: CONFIG });
28
+ // Built per-render rather than at module scope: the availability scope
29
+ // reads the URL through a hook, which cannot run outside a component.
30
+ return (_jsx(DataListingView, { config: buildListingTypeListingConfig("art", { ...CONFIG_OPTS, scope }) }));
26
31
  }
@@ -23,6 +23,7 @@ const ACTION_LABELS = {
23
23
  checkout_bypass: "Admin checkout bypass",
24
24
  coupon_update: "Coupon updated",
25
25
  payout_mark_paid: "Payout marked paid",
26
+ offer_cancel: "Offer cancelled",
26
27
  store_status_change: "Store status changed",
27
28
  user_role_change: "User role changed",
28
29
  };
@@ -5,11 +5,12 @@ import { sieveFilter, SIEVE_OP } from "@mohasinac/appkit/client";
5
5
  import { sortBy } from "@mohasinac/appkit/client";
6
6
  import React, { useState } from "react";
7
7
  import { useQueryClient } from "@tanstack/react-query";
8
- import { ConfirmDeleteModal, FilterChipGroup, ListingLayout, RowActionMenu, useToast } from "../../../ui";
8
+ import { ConfirmDeleteModal, FilterChipGroup, ListingLayout, RecordDetailModal, RowActionMenu, useToast, } from "../../../ui";
9
9
  import { ADMIN_ENDPOINTS } from "../../../constants/api-endpoints";
10
10
  import { ADMIN_BID_STATUS_TABS } from "../constants/filter-tabs";
11
11
  import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
12
12
  import { ROW_ACTION_META, ROW_ACTION_ID } from "../../products/constants/action-defs";
13
+ import { buildBidDetailFields, bidStatusBadge } from "../../auctions/components/bid-detail-fields";
13
14
  import { toRecordArray, toRelativeDate, toCurrency, toStringValue, } from "../hooks/useAdminListingData";
14
15
  import { DataListingView } from "./DataListingView";
15
16
  import { apiClient } from "../../../http";
@@ -18,6 +19,7 @@ export function AdminBidsView({ children, ...props }) {
18
19
  const { showToast } = useToast();
19
20
  const [cancelOpen, setCancelOpen] = useState(false);
20
21
  const [selectedRow, setSelectedRow] = useState(null);
22
+ const [detail, setDetail] = useState(null);
21
23
  const cancelMutation = useApiMutation({
22
24
  mutationFn: async (bidId) => {
23
25
  await apiClient.patch(ADMIN_ENDPOINTS.BID_BY_ID(bidId), { status: "cancelled" });
@@ -58,6 +60,7 @@ export function AdminBidsView({ children, ...props }) {
58
60
  secondary: toStringValue(item.bidderId ?? item.bidderName ?? item.userId, "Unknown bidder"),
59
61
  status: toStringValue(item.status, "active"),
60
62
  updatedAt: toRelativeDate(item.bidDate ?? item.updatedAt ?? item.createdAt),
63
+ detail: item,
61
64
  })),
62
65
  getTotal: (response, mappedRows) => typeof response.total === "number" ? response.total : mappedRows.length,
63
66
  buildFilters: (state) => state.status && state.status !== "All" ? sieveFilter("status", SIEVE_OP.EQ, state.status) : undefined,
@@ -72,6 +75,13 @@ export function AdminBidsView({ children, ...props }) {
72
75
  renderRowActions: (row) => {
73
76
  const isCancelled = row.status === "cancelled" || row.status === "voided";
74
77
  return (_jsx(RowActionMenu, { actions: [
78
+ // A menu of pure MUTATIONS is not a detail affordance (Root Cause
79
+ // #56): it let an admin cancel a bid they had never been able to
80
+ // read. View comes first for that reason.
81
+ {
82
+ label: ROW_ACTION_META[ROW_ACTION_ID.VIEW].label,
83
+ onClick: () => setDetail(row),
84
+ },
75
85
  {
76
86
  label: ROW_ACTION_META[ROW_ACTION_ID.CANCEL].label,
77
87
  destructive: ROW_ACTION_META[ROW_ACTION_ID.CANCEL].destructive,
@@ -85,7 +95,10 @@ export function AdminBidsView({ children, ...props }) {
85
95
  },
86
96
  renderFilterPanel: ({ pendingFilters, setPendingFilters }) => (_jsx(FilterChipGroup, { label: "Status", tabs: ADMIN_BID_STATUS_TABS, value: pendingFilters.status ?? "", onChange: (id) => setPendingFilters((p) => ({ ...p, status: id })) })),
87
97
  };
88
- return (_jsxs(_Fragment, { children: [_jsx(DataListingView, { config: config }), _jsx(ConfirmDeleteModal, { isOpen: cancelOpen, onClose: () => {
98
+ const detailBadge = detail ? bidStatusBadge(detail.status) : null;
99
+ return (_jsxs(_Fragment, { children: [_jsx(DataListingView, { config: config }), _jsx(RecordDetailModal, { isOpen: detail !== null, onClose: () => setDetail(null), title: toStringValue(detail?.detail?.productTitle, "Bid"), badges: detailBadge ? [{ label: detailBadge.label }] : undefined, fields: detail
100
+ ? buildBidDetailFields(detail.detail, "admin")
101
+ : undefined }), _jsx(ConfirmDeleteModal, { isOpen: cancelOpen, onClose: () => {
89
102
  setCancelOpen(false);
90
103
  setSelectedRow(null);
91
104
  }, onConfirm: () => {