@mohasinac/appkit 3.8.1 → 3.9.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 (485) hide show
  1. package/dist/_internal/client/features/live/LiveItemDetailView.js +2 -2
  2. package/dist/_internal/client/features/lottery/LotteryAdminEditView.d.ts +4 -4
  3. package/dist/_internal/client/features/lottery/LotteryAdminEditView.js +8 -8
  4. package/dist/_internal/client/features/lottery/LotteryAdminSlotView.d.ts +1 -1
  5. package/dist/_internal/client/features/lottery/LotteryAdminSlotView.js +2 -2
  6. package/dist/_internal/server/features/bundles/actions.js +2 -2
  7. package/dist/_internal/server/features/bundles/og.d.ts +1 -1
  8. package/dist/_internal/server/features/bundles/og.js +4 -5
  9. package/dist/_internal/server/features/checkout/actions.js +57 -21
  10. package/dist/_internal/server/features/checkout/stock-restore.d.ts +19 -0
  11. package/dist/_internal/server/features/checkout/stock-restore.js +80 -0
  12. package/dist/_internal/server/features/checkout/upi-resolution.d.ts +11 -0
  13. package/dist/_internal/server/features/checkout/upi-resolution.js +28 -0
  14. package/dist/_internal/server/features/classified/og.js +1 -1
  15. package/dist/_internal/server/features/digital-code/og.js +1 -1
  16. package/dist/_internal/server/features/item-requests/og.d.ts +2 -2
  17. package/dist/_internal/server/features/item-requests/og.js +4 -5
  18. package/dist/_internal/server/features/live/og.js +1 -1
  19. package/dist/_internal/server/features/lottery/adapters.d.ts +2 -2
  20. package/dist/_internal/server/features/lottery/adapters.js +1 -1
  21. package/dist/_internal/server/features/orders/actions.d.ts +28 -0
  22. package/dist/_internal/server/features/orders/actions.js +239 -4
  23. package/dist/_internal/server/features/orders/adapters.js +3 -0
  24. package/dist/_internal/server/features/payments/data.js +3 -2
  25. package/dist/_internal/server/features/payouts/actions.d.ts +2 -2
  26. package/dist/_internal/server/features/payouts/actions.js +4 -3
  27. package/dist/_internal/server/features/pre-orders/service.d.ts +1 -1
  28. package/dist/_internal/server/features/pre-orders/service.js +3 -2
  29. package/dist/_internal/server/features/prize-draws/og.js +5 -5
  30. package/dist/_internal/server/features/products/og.js +1 -1
  31. package/dist/_internal/server/features/promotions/service.js +3 -1
  32. package/dist/_internal/server/features/refunds/actions.d.ts +2 -2
  33. package/dist/_internal/server/features/refunds/actions.js +7 -6
  34. package/dist/_internal/server/functions/firestore.js +1 -1
  35. package/dist/_internal/server/functions/scheduled.d.ts +4 -1
  36. package/dist/_internal/server/functions/scheduled.js +26 -2
  37. package/dist/_internal/server/jobs/core/emiInstallmentReminder.js +1 -1
  38. package/dist/_internal/server/jobs/core/hardBanCascade.d.ts +4 -0
  39. package/dist/_internal/server/jobs/core/hardBanCascade.js +15 -4
  40. package/dist/_internal/server/jobs/core/hardBanReinstatement.d.ts +16 -0
  41. package/dist/_internal/server/jobs/core/hardBanReinstatement.js +63 -0
  42. package/dist/_internal/server/jobs/core/jobRunners.js +3 -1
  43. package/dist/_internal/server/jobs/core/onScamReportCreate.js +1 -1
  44. package/dist/_internal/server/jobs/core/paymentReviewAutoApprove.d.ts +10 -0
  45. package/dist/_internal/server/jobs/core/paymentReviewAutoApprove.js +60 -0
  46. package/dist/_internal/server/jobs/core/paymentWindowTimeout.d.ts +15 -0
  47. package/dist/_internal/server/jobs/core/paymentWindowTimeout.js +59 -0
  48. package/dist/_internal/server/jobs/core/pendingOrderTimeout.d.ts +7 -0
  49. package/dist/_internal/server/jobs/core/pendingOrderTimeout.js +32 -6
  50. package/dist/_internal/server/jobs/handlers/hardBanReinstatement.d.ts +2 -0
  51. package/dist/_internal/server/jobs/handlers/hardBanReinstatement.js +2 -0
  52. package/dist/_internal/server/jobs/handlers/index.d.ts +3 -0
  53. package/dist/_internal/server/jobs/handlers/index.js +3 -0
  54. package/dist/_internal/server/jobs/handlers/messages.d.ts +4 -0
  55. package/dist/_internal/server/jobs/handlers/messages.js +4 -0
  56. package/dist/_internal/server/jobs/handlers/onShipmentAllocationSync.d.ts +3 -3
  57. package/dist/_internal/server/jobs/handlers/onShipmentAllocationSync.js +12 -12
  58. package/dist/_internal/server/jobs/handlers/onShipmentItemWrite.d.ts +1 -1
  59. package/dist/_internal/server/jobs/handlers/onShipmentItemWrite.js +5 -5
  60. package/dist/_internal/server/jobs/handlers/paymentReviewAutoApprove.d.ts +2 -0
  61. package/dist/_internal/server/jobs/handlers/paymentReviewAutoApprove.js +2 -0
  62. package/dist/_internal/server/jobs/handlers/paymentWindowTimeout.d.ts +2 -0
  63. package/dist/_internal/server/jobs/handlers/paymentWindowTimeout.js +2 -0
  64. package/dist/_internal/shared/actions/action-registry.js +27 -0
  65. package/dist/_internal/shared/checkout/order-math.js +3 -2
  66. package/dist/_internal/shared/checkout/rules/_defaults.js +1 -0
  67. package/dist/_internal/shared/checkout/rules/preorder.rule.js +7 -0
  68. package/dist/_internal/shared/checkout/rules/prize-draw.rule.js +7 -0
  69. package/dist/_internal/shared/checkout/rules/types.d.ts +11 -0
  70. package/dist/_internal/shared/features/auctions/errors.js +1 -1
  71. package/dist/_internal/shared/features/categories/bundle-copy.d.ts +0 -1
  72. package/dist/_internal/shared/features/categories/bundle-copy.js +0 -1
  73. package/dist/_internal/shared/features/categories/bundle-schemas.d.ts +6 -6
  74. package/dist/_internal/shared/features/categories/bundle-schemas.js +2 -2
  75. package/dist/_internal/shared/features/checkout/config.d.ts +3 -3
  76. package/dist/_internal/shared/features/checkout/config.js +3 -3
  77. package/dist/_internal/shared/features/emi/schedule.d.ts +6 -6
  78. package/dist/_internal/shared/features/emi/schedule.js +10 -9
  79. package/dist/_internal/shared/features/promotions/errors.js +1 -1
  80. package/dist/_internal/shared/fees/calculator.d.ts +5 -5
  81. package/dist/_internal/shared/fees/calculator.js +19 -19
  82. package/dist/client.d.ts +1 -1
  83. package/dist/client.js +1 -1
  84. package/dist/constants/api-endpoints.d.ts +9 -0
  85. package/dist/constants/api-endpoints.js +3 -0
  86. package/dist/constants/field-names.d.ts +4 -0
  87. package/dist/constants/field-names.js +4 -0
  88. package/dist/features/admin/components/AdminArtView.js +2 -2
  89. package/dist/features/admin/components/AdminBidsView.js +2 -2
  90. package/dist/features/admin/components/AdminBundleEditorView.d.ts +1 -1
  91. package/dist/features/admin/components/AdminBundleEditorView.js +8 -8
  92. package/dist/features/admin/components/AdminBundlesView.js +6 -6
  93. package/dist/features/admin/components/AdminClassifiedView.js +2 -2
  94. package/dist/features/admin/components/AdminDigitalCodesView.js +2 -2
  95. package/dist/features/admin/components/AdminLiveView.js +2 -2
  96. package/dist/features/admin/components/AdminOrderEditorView.d.ts +6 -1
  97. package/dist/features/admin/components/AdminOrderEditorView.js +45 -5
  98. package/dist/features/admin/components/AdminOrdersView.js +8 -3
  99. package/dist/features/admin/components/AdminPayoutsView.js +2 -2
  100. package/dist/features/admin/components/AdminPrizeDrawsView.js +2 -2
  101. package/dist/features/admin/components/AdminReturnRequestsView.js +2 -2
  102. package/dist/features/admin/components/AdminSiteSettingsView.js +11 -11
  103. package/dist/features/admin/components/AdminStickersView.js +2 -2
  104. package/dist/features/admin/components/AdminSupportTicketDetailView.js +1 -1
  105. package/dist/features/admin/hooks/useAdminListingData.d.ts +1 -1
  106. package/dist/features/admin/hooks/useAdminListingData.js +3 -2
  107. package/dist/features/admin/schemas/firestore.d.ts +9 -7
  108. package/dist/features/admin/schemas/firestore.js +4 -3
  109. package/dist/features/auctions/components/AuctionBidsTable.js +3 -3
  110. package/dist/features/auth/checkout-value-otp.d.ts +46 -0
  111. package/dist/features/auth/checkout-value-otp.js +73 -0
  112. package/dist/features/auth/repository/user.repository.d.ts +6 -0
  113. package/dist/features/auth/repository/user.repository.js +19 -0
  114. package/dist/features/auth/schemas/firestore.d.ts +10 -0
  115. package/dist/features/auth/schemas/firestore.js +2 -0
  116. package/dist/features/cart/actions/cart-actions.d.ts +1 -1
  117. package/dist/features/cart/actions/cart-actions.js +4 -4
  118. package/dist/features/cart/components/CartView.d.ts +2 -2
  119. package/dist/features/cart/components/ShippingPicker.d.ts +4 -4
  120. package/dist/features/cart/components/ShippingPicker.js +11 -11
  121. package/dist/features/cart/repository/cart.repository.d.ts +1 -1
  122. package/dist/features/cart/repository/cart.repository.js +2 -2
  123. package/dist/features/cart/schemas/firestore.d.ts +2 -2
  124. package/dist/features/catalogue/components/CatalogueItemEditorView.js +3 -3
  125. package/dist/features/catalogue/components/PublicCatalogueView.js +2 -2
  126. package/dist/features/catalogue/schemas/validation.js +1 -1
  127. package/dist/features/categories/components/BundleCollage.js +2 -2
  128. package/dist/features/categories/components/BundleDetailView.js +2 -2
  129. package/dist/features/categories/components/BundleItemsPicker.d.ts +1 -1
  130. package/dist/features/categories/components/BundleItemsPicker.js +2 -2
  131. package/dist/features/categories/components/CategoryBundlesListing.js +2 -2
  132. package/dist/features/categories/schemas/firestore.d.ts +1 -1
  133. package/dist/features/categories/schemas/index.d.ts +3 -3
  134. package/dist/features/categories/schemas/index.js +2 -2
  135. package/dist/features/checkout/actions/checkout-value-otp-actions.d.ts +16 -0
  136. package/dist/features/checkout/actions/checkout-value-otp-actions.js +83 -0
  137. package/dist/features/checkout/actions/index.d.ts +1 -0
  138. package/dist/features/checkout/actions/index.js +1 -0
  139. package/dist/features/checkout/schemas/firestore.d.ts +1 -1
  140. package/dist/features/classified/components/index.d.ts +0 -4
  141. package/dist/features/classified/components/index.js +0 -2
  142. package/dist/features/digital-codes/components/index.d.ts +0 -4
  143. package/dist/features/digital-codes/components/index.js +0 -2
  144. package/dist/features/events/schemas/index.d.ts +1 -1
  145. package/dist/features/events/schemas/index.js +1 -1
  146. package/dist/features/homepage/components/FeaturedBundlesSection.js +2 -2
  147. package/dist/features/live/components/index.d.ts +0 -4
  148. package/dist/features/live/components/index.js +0 -2
  149. package/dist/features/lottery/types/index.d.ts +3 -3
  150. package/dist/features/lottery/types/index.js +5 -5
  151. package/dist/features/orders/components/OrderPaymentSummary.js +2 -2
  152. package/dist/features/orders/components/OrderSiblingPayments.js +1 -1
  153. package/dist/features/orders/components/RefundHistoryTable.js +1 -1
  154. package/dist/features/orders/components/RefundRequestView.js +1 -1
  155. package/dist/features/orders/constants/payment-window.d.ts +10 -0
  156. package/dist/features/orders/constants/payment-window.js +10 -0
  157. package/dist/features/orders/repository/orders.repository.d.ts +25 -0
  158. package/dist/features/orders/repository/orders.repository.js +50 -1
  159. package/dist/features/orders/schemas/firestore.d.ts +50 -2
  160. package/dist/features/orders/schemas/index.d.ts +24 -24
  161. package/dist/features/orders/schemas/index.js +20 -20
  162. package/dist/features/orders/types/index.d.ts +4 -0
  163. package/dist/features/orders/utils/bundle-grouping.d.ts +1 -1
  164. package/dist/features/orders/utils/bundle-grouping.js +1 -1
  165. package/dist/features/payments/schemas/index.d.ts +10 -10
  166. package/dist/features/payments/schemas/index.js +9 -9
  167. package/dist/features/pre-orders/components/PreOrderDetailPageView.js +2 -2
  168. package/dist/features/products/components/ArtStickersListView.d.ts +7 -0
  169. package/dist/features/products/components/ArtStickersListView.js +57 -0
  170. package/dist/features/products/components/GroupSettingsPanel.js +1 -1
  171. package/dist/features/products/components/MakeOfferButton.js +3 -3
  172. package/dist/features/products/components/MarketplaceBundleCard.d.ts +1 -1
  173. package/dist/features/products/components/MarketplaceBundleCard.js +2 -2
  174. package/dist/features/products/components/PrizeDrawCollage.js +2 -2
  175. package/dist/features/products/components/PrizeDrawItemsEditor.js +2 -2
  176. package/dist/features/products/components/PrizeRevealModal.js +1 -1
  177. package/dist/features/products/components/ProductDetailPageView.js +2 -9
  178. package/dist/features/products/components/ProductForm.js +2 -2
  179. package/dist/features/products/components/ProductGrid.js +2 -2
  180. package/dist/features/products/components/ProductsIndexListing.d.ts +13 -1
  181. package/dist/features/products/components/ProductsIndexListing.js +7 -5
  182. package/dist/features/products/components/ProductsIndexPageView.js +6 -1
  183. package/dist/features/products/constants/listing-tabs.d.ts +42 -17
  184. package/dist/features/products/constants/listing-tabs.js +25 -6
  185. package/dist/features/products/schemas/catalog-product.d.ts +5 -5
  186. package/dist/features/products/schemas/catalog-product.js +1 -1
  187. package/dist/features/products/schemas/firestore.d.ts +5 -5
  188. package/dist/features/products/schemas/firestore.js +2 -2
  189. package/dist/features/products/types/index.d.ts +5 -2
  190. package/dist/features/promotions/components/CouponCard.js +2 -2
  191. package/dist/features/promotions/schemas/firestore.d.ts +2 -0
  192. package/dist/features/promotions/schemas/firestore.js +1 -0
  193. package/dist/features/promotions/schemas/index.d.ts +14 -14
  194. package/dist/features/promotions/schemas/index.js +6 -6
  195. package/dist/features/scams/components/ScamProfileView.js +3 -7
  196. package/dist/features/scams/components/ScamRegistryView.js +2 -6
  197. package/dist/features/scams/schemas/firestore.d.ts +1 -1
  198. package/dist/features/search/components/Search.d.ts +1 -1
  199. package/dist/features/seller/actions/offer-actions.js +1 -1
  200. package/dist/features/seller/components/PrintCenterView.js +2 -2
  201. package/dist/features/seller/components/QuickProductForm.js +5 -5
  202. package/dist/features/seller/components/SellerArtView.js +2 -2
  203. package/dist/features/seller/components/SellerAuctionsView.js +2 -2
  204. package/dist/features/seller/components/SellerBidsView.js +2 -2
  205. package/dist/features/seller/components/SellerBundlesView.js +6 -6
  206. package/dist/features/seller/components/SellerClassifiedView.js +2 -2
  207. package/dist/features/seller/components/SellerDigitalCodesView.js +2 -2
  208. package/dist/features/seller/components/SellerLiveView.js +2 -2
  209. package/dist/features/seller/components/SellerOffersView.js +2 -2
  210. package/dist/features/seller/components/SellerOrdersView.js +3 -3
  211. package/dist/features/seller/components/SellerPayoutRequestView.js +2 -2
  212. package/dist/features/seller/components/SellerPayoutSettingsView.js +2 -2
  213. package/dist/features/seller/components/SellerPayoutsView.js +2 -2
  214. package/dist/features/seller/components/SellerPreOrdersView.js +2 -2
  215. package/dist/features/seller/components/SellerPrizeDrawsView.js +2 -2
  216. package/dist/features/seller/components/SellerProductShell.js +8 -8
  217. package/dist/features/seller/components/SellerProductsView.js +1 -1
  218. package/dist/features/seller/components/SellerShippingView.js +6 -6
  219. package/dist/features/seller/components/SellerStickersView.js +2 -2
  220. package/dist/features/seller/hooks/useSellerListingData.d.ts +1 -1
  221. package/dist/features/seller/hooks/useSellerListingData.js +3 -2
  222. package/dist/features/shipments/components/AdminShipmentEditorView.js +10 -10
  223. package/dist/features/shipments/components/AdminShipmentLotItemsView.js +4 -4
  224. package/dist/features/shipments/components/AdminShipmentProjectionsView.js +5 -5
  225. package/dist/features/shipments/components/AdminShipmentsView.js +4 -4
  226. package/dist/features/shipments/repository/shipment-lots.repository.d.ts +2 -2
  227. package/dist/features/shipments/repository/shipment-lots.repository.js +8 -8
  228. package/dist/features/shipments/schemas/firestore.d.ts +21 -21
  229. package/dist/features/shipments/schemas/firestore.js +9 -9
  230. package/dist/features/shipments/schemas/validation.d.ts +30 -30
  231. package/dist/features/shipments/schemas/validation.js +6 -6
  232. package/dist/features/shipments/utils/cost-allocation.d.ts +5 -5
  233. package/dist/features/shipments/utils/cost-allocation.js +39 -38
  234. package/dist/features/store-extensions/schemas/firestore.d.ts +5 -5
  235. package/dist/features/stores/components/StoreDetailLayoutView.js +9 -13
  236. package/dist/features/stores/schemas/firestore.d.ts +7 -7
  237. package/dist/features/stores/schemas/index.d.ts +84 -84
  238. package/dist/features/stores/schemas/index.js +5 -5
  239. package/dist/features/tester/seed-data/categories-tester-seed-data.js +1 -1
  240. package/dist/features/tester/seed-data/products-tester-seed-data.js +6 -6
  241. package/dist/features/tester/seed-data/tester-checklist-seed-data.js +9 -2
  242. package/dist/features/whatsapp-bot/helpers/whatsapp.d.ts +8 -1
  243. package/dist/features/whatsapp-bot/helpers/whatsapp.js +13 -2
  244. package/dist/features/whatsapp-bot/types/index.d.ts +9 -1
  245. package/dist/index.d.ts +4 -7
  246. package/dist/index.js +9 -5
  247. package/dist/next/routing/route-map.d.ts +2 -0
  248. package/dist/next/routing/route-map.js +6 -0
  249. package/dist/schemas/firestore-helpers.d.ts +2 -2
  250. package/dist/schemas/firestore-helpers.js +2 -2
  251. package/dist/schemas/registry.d.ts +73 -73
  252. package/dist/security/index.d.ts +2 -1
  253. package/dist/security/index.js +5 -1
  254. package/dist/security/pii-encrypt.d.ts +2 -53
  255. package/dist/security/pii-encrypt.js +19 -100
  256. package/dist/security/pii-mask.d.ts +67 -0
  257. package/dist/security/pii-mask.js +100 -0
  258. package/dist/seed/bids-seed-data.js +6 -6
  259. package/dist/seed/blog-posts-seed-data.js +1 -0
  260. package/dist/seed/cart-seed-data.js +13 -13
  261. package/dist/seed/catalogue-seed-data.js +6 -6
  262. package/dist/seed/categories-seed-data.js +5 -5
  263. package/dist/seed/claimed-coupons-seed-data.js +3 -3
  264. package/dist/seed/coupons-seed-data.js +20 -20
  265. package/dist/seed/events-seed-data.js +27 -27
  266. package/dist/seed/factories/bid.factory.js +1 -1
  267. package/dist/seed/faq-seed-data.js +20 -1
  268. package/dist/seed/grouped-listings-seed-data.d.ts +2 -2
  269. package/dist/seed/grouped-listings-seed-data.js +3 -3
  270. package/dist/seed/offers-seed-data.js +19 -19
  271. package/dist/seed/orders-seed-data.js +29 -29
  272. package/dist/seed/payouts-seed-data.js +7 -7
  273. package/dist/seed/products-auctions-seed-data.js +6 -6
  274. package/dist/seed/products-preorders-seed-data.d.ts +2 -2
  275. package/dist/seed/products-preorders-seed-data.js +1 -1
  276. package/dist/seed/products-standard-seed-data.js +8 -8
  277. package/dist/seed/scammers-seed-data.js +2 -2
  278. package/dist/seed/shipments-seed-data.js +29 -29
  279. package/dist/seed/site-settings-seed-data.js +3 -2
  280. package/dist/seed/store-extensions-seed-data.js +8 -8
  281. package/dist/seed/stores-seed-data.js +37 -8
  282. package/dist/seed/users-seed-data.js +38 -1
  283. package/dist/server-entry.d.ts +1 -3
  284. package/dist/server-entry.js +1 -3
  285. package/dist/server.d.ts +2 -1
  286. package/dist/server.js +3 -1
  287. package/dist/ui/components/PriceDisplay.js +3 -12
  288. package/dist/utils/number.formatter.d.ts +2 -7
  289. package/dist/utils/number.formatter.js +3 -8
  290. package/package.json +1 -1
  291. package/scripts/seed-cli.mjs +17 -3
  292. package/dist/_internal/client/scaffolds/DashboardScaffold.d.ts +0 -34
  293. package/dist/_internal/client/scaffolds/DashboardScaffold.js +0 -26
  294. package/dist/_internal/client/theme/__tests__/ThemeProvider.test.d.ts +0 -1
  295. package/dist/_internal/client/theme/__tests__/ThemeProvider.test.js +0 -109
  296. package/dist/_internal/server/features/auctions/__tests__/service.test.d.ts +0 -1
  297. package/dist/_internal/server/features/auctions/__tests__/service.test.js +0 -140
  298. package/dist/_internal/server/features/checkout/__tests__/actions.test.d.ts +0 -1
  299. package/dist/_internal/server/features/checkout/__tests__/actions.test.js +0 -600
  300. package/dist/_internal/server/features/refunds/__tests__/actions.test.d.ts +0 -1
  301. package/dist/_internal/server/features/refunds/__tests__/actions.test.js +0 -263
  302. package/dist/_internal/server/jobs/core/__tests__/auctionSettlement.test.d.ts +0 -1
  303. package/dist/_internal/server/jobs/core/__tests__/auctionSettlement.test.js +0 -249
  304. package/dist/_internal/server/jobs/core/__tests__/couponExpiry.test.d.ts +0 -1
  305. package/dist/_internal/server/jobs/core/__tests__/couponExpiry.test.js +0 -65
  306. package/dist/_internal/server/jobs/core/__tests__/listingProcessor.test.d.ts +0 -1
  307. package/dist/_internal/server/jobs/core/__tests__/listingProcessor.test.js +0 -163
  308. package/dist/_internal/server/jobs/core/__tests__/mediaTmpCleanup.test.d.ts +0 -1
  309. package/dist/_internal/server/jobs/core/__tests__/mediaTmpCleanup.test.js +0 -115
  310. package/dist/_internal/server/jobs/core/__tests__/onBidPlaced.test.d.ts +0 -1
  311. package/dist/_internal/server/jobs/core/__tests__/onBidPlaced.test.js +0 -201
  312. package/dist/_internal/server/jobs/core/__tests__/onOrderCreate.test.d.ts +0 -1
  313. package/dist/_internal/server/jobs/core/__tests__/onOrderCreate.test.js +0 -169
  314. package/dist/_internal/server/jobs/core/__tests__/onOrderStatusChange.test.d.ts +0 -1
  315. package/dist/_internal/server/jobs/core/__tests__/onOrderStatusChange.test.js +0 -148
  316. package/dist/_internal/server/jobs/core/__tests__/onProductStockChange.test.d.ts +0 -1
  317. package/dist/_internal/server/jobs/core/__tests__/onProductStockChange.test.js +0 -210
  318. package/dist/_internal/server/jobs/core/__tests__/onReviewWrite.test.d.ts +0 -1
  319. package/dist/_internal/server/jobs/core/__tests__/onReviewWrite.test.js +0 -190
  320. package/dist/_internal/server/jobs/core/__tests__/onUserBanChange.test.d.ts +0 -1
  321. package/dist/_internal/server/jobs/core/__tests__/onUserBanChange.test.js +0 -161
  322. package/dist/_internal/server/jobs/core/__tests__/payoutBatch.test.d.ts +0 -1
  323. package/dist/_internal/server/jobs/core/__tests__/payoutBatch.test.js +0 -302
  324. package/dist/_internal/server/jobs/core/__tests__/pendingOrderTimeout.test.d.ts +0 -1
  325. package/dist/_internal/server/jobs/core/__tests__/pendingOrderTimeout.test.js +0 -96
  326. package/dist/_internal/server/jobs/core/__tests__/triggerEventRaffle.test.d.ts +0 -1
  327. package/dist/_internal/server/jobs/core/__tests__/triggerEventRaffle.test.js +0 -252
  328. package/dist/_internal/server/jobs/core/__tests__/wrapJobHandler.test.d.ts +0 -1
  329. package/dist/_internal/server/jobs/core/__tests__/wrapJobHandler.test.js +0 -129
  330. package/dist/_internal/server/jobs/core/onCatalogueSubmittedForApproval.d.ts +0 -15
  331. package/dist/_internal/server/jobs/core/onCatalogueSubmittedForApproval.js +0 -38
  332. package/dist/_internal/server/providers/index.d.ts +0 -11
  333. package/dist/_internal/server/providers/index.js +0 -11
  334. package/dist/_internal/server/providers/payment/razorpay-mock.d.ts +0 -52
  335. package/dist/_internal/server/providers/payment/razorpay-mock.js +0 -118
  336. package/dist/_internal/server/providers/resolve.d.ts +0 -36
  337. package/dist/_internal/server/providers/resolve.js +0 -31
  338. package/dist/_internal/server/providers/shipping/shiprocket-mock.d.ts +0 -29
  339. package/dist/_internal/server/providers/shipping/shiprocket-mock.js +0 -152
  340. package/dist/_internal/shared/types/__tests__/action-result.test.d.ts +0 -1
  341. package/dist/_internal/shared/types/__tests__/action-result.test.js +0 -65
  342. package/dist/errors/__tests__/error-mapping.test.d.ts +0 -1
  343. package/dist/errors/__tests__/error-mapping.test.js +0 -122
  344. package/dist/errors/__tests__/safe-read.test.d.ts +0 -1
  345. package/dist/errors/__tests__/safe-read.test.js +0 -39
  346. package/dist/features/addresses/repository/__tests__/addresses.repository.test.d.ts +0 -1
  347. package/dist/features/addresses/repository/__tests__/addresses.repository.test.js +0 -386
  348. package/dist/features/admin/components/AdminListingScaffold.d.ts +0 -41
  349. package/dist/features/admin/components/AdminListingScaffold.js +0 -68
  350. package/dist/features/admin/components/QuickActionsPanel.d.ts +0 -15
  351. package/dist/features/admin/components/QuickActionsPanel.js +0 -5
  352. package/dist/features/admin/repository/__tests__/notification.repository.test.d.ts +0 -1
  353. package/dist/features/admin/repository/__tests__/notification.repository.test.js +0 -356
  354. package/dist/features/admin/repository/__tests__/site-settings.repository.test.d.ts +0 -1
  355. package/dist/features/admin/repository/__tests__/site-settings.repository.test.js +0 -298
  356. package/dist/features/auctions/repository/__tests__/bid.repository.test.d.ts +0 -1
  357. package/dist/features/auctions/repository/__tests__/bid.repository.test.js +0 -290
  358. package/dist/features/auctions/repository/auctions.repository.d.ts +0 -12
  359. package/dist/features/auctions/repository/auctions.repository.js +0 -42
  360. package/dist/features/auth/repository/__tests__/session.repository.test.d.ts +0 -1
  361. package/dist/features/auth/repository/__tests__/session.repository.test.js +0 -310
  362. package/dist/features/auth/repository/__tests__/session.test.d.ts +0 -1
  363. package/dist/features/auth/repository/__tests__/session.test.js +0 -146
  364. package/dist/features/auth/repository/__tests__/sms-counter.repository.test.d.ts +0 -1
  365. package/dist/features/auth/repository/__tests__/sms-counter.repository.test.js +0 -171
  366. package/dist/features/auth/repository/__tests__/sms-counter.test.d.ts +0 -1
  367. package/dist/features/auth/repository/__tests__/sms-counter.test.js +0 -88
  368. package/dist/features/auth/repository/__tests__/token.repository.test.d.ts +0 -1
  369. package/dist/features/auth/repository/__tests__/token.repository.test.js +0 -260
  370. package/dist/features/auth/repository/__tests__/token.test.d.ts +0 -1
  371. package/dist/features/auth/repository/__tests__/token.test.js +0 -140
  372. package/dist/features/auth/repository/__tests__/user.repository.test.d.ts +0 -1
  373. package/dist/features/auth/repository/__tests__/user.repository.test.js +0 -352
  374. package/dist/features/auth/repository/__tests__/user.test.d.ts +0 -1
  375. package/dist/features/auth/repository/__tests__/user.test.js +0 -226
  376. package/dist/features/before-after/repository/before-after.repository.d.ts +0 -13
  377. package/dist/features/before-after/repository/before-after.repository.js +0 -36
  378. package/dist/features/before-after/server.d.ts +0 -6
  379. package/dist/features/before-after/server.js +0 -6
  380. package/dist/features/cart/repository/__tests__/cart.repository.test.d.ts +0 -1
  381. package/dist/features/cart/repository/__tests__/cart.repository.test.js +0 -371
  382. package/dist/features/categories/repository/__tests__/categories.repository.test.d.ts +0 -1
  383. package/dist/features/categories/repository/__tests__/categories.repository.test.js +0 -813
  384. package/dist/features/collections/repository/collections.repository.d.ts +0 -8
  385. package/dist/features/collections/repository/collections.repository.js +0 -16
  386. package/dist/features/collections/server.d.ts +0 -6
  387. package/dist/features/collections/server.js +0 -6
  388. package/dist/features/events/repository/__tests__/event.repository.test.d.ts +0 -1
  389. package/dist/features/events/repository/__tests__/event.repository.test.js +0 -299
  390. package/dist/features/faq/repository/__tests__/faqs.repository.test.d.ts +0 -1
  391. package/dist/features/faq/repository/__tests__/faqs.repository.test.js +0 -311
  392. package/dist/features/forms/Form.d.ts +0 -25
  393. package/dist/features/forms/Form.js +0 -37
  394. package/dist/features/history/repository/__tests__/user-history.repository.test.d.ts +0 -1
  395. package/dist/features/history/repository/__tests__/user-history.repository.test.js +0 -180
  396. package/dist/features/homepage/repository/__tests__/carousel.repository.test.d.ts +0 -1
  397. package/dist/features/homepage/repository/__tests__/carousel.repository.test.js +0 -182
  398. package/dist/features/homepage/repository/__tests__/homepage-sections.repository.test.d.ts +0 -1
  399. package/dist/features/homepage/repository/__tests__/homepage-sections.repository.test.js +0 -185
  400. package/dist/features/layout/ListingLayout.d.ts +0 -34
  401. package/dist/features/layout/ListingLayout.js +0 -103
  402. package/dist/features/messages/repository/__tests__/conversations.repository.test.d.ts +0 -1
  403. package/dist/features/messages/repository/__tests__/conversations.repository.test.js +0 -257
  404. package/dist/features/orders/repository/__tests__/orders.repository.test.d.ts +0 -1
  405. package/dist/features/orders/repository/__tests__/orders.repository.test.js +0 -211
  406. package/dist/features/payments/repository/__tests__/payout.repository.test.d.ts +0 -1
  407. package/dist/features/payments/repository/__tests__/payout.repository.test.js +0 -292
  408. package/dist/features/pre-orders/repository/preorders.repository.d.ts +0 -8
  409. package/dist/features/pre-orders/repository/preorders.repository.js +0 -25
  410. package/dist/features/products/repository/__tests__/product-features.repository.test.d.ts +0 -1
  411. package/dist/features/products/repository/__tests__/product-features.repository.test.js +0 -329
  412. package/dist/features/products/repository/__tests__/products.repository.test.d.ts +0 -1
  413. package/dist/features/products/repository/__tests__/products.repository.test.js +0 -607
  414. package/dist/features/promotions/repository/__tests__/claimed-coupons.repository.test.d.ts +0 -1
  415. package/dist/features/promotions/repository/__tests__/claimed-coupons.repository.test.js +0 -219
  416. package/dist/features/promotions/repository/__tests__/coupons.repository.test.d.ts +0 -1
  417. package/dist/features/promotions/repository/__tests__/coupons.repository.test.js +0 -480
  418. package/dist/features/promotions/repository/promotions.repository.d.ts +0 -14
  419. package/dist/features/promotions/repository/promotions.repository.js +0 -43
  420. package/dist/features/reviews/repository/__tests__/reviews.repository.test.d.ts +0 -1
  421. package/dist/features/reviews/repository/__tests__/reviews.repository.test.js +0 -327
  422. package/dist/features/scams/repository/__tests__/scammer.repository.test.d.ts +0 -1
  423. package/dist/features/scams/repository/__tests__/scammer.repository.test.js +0 -385
  424. package/dist/features/search/repository/__tests__/search.repository.test.d.ts +0 -1
  425. package/dist/features/search/repository/__tests__/search.repository.test.js +0 -369
  426. package/dist/features/seller/components/SellerStatCard.d.ts +0 -14
  427. package/dist/features/seller/components/SellerStatCard.js +0 -6
  428. package/dist/features/seller/components/seller-products-styles.d.ts +0 -7
  429. package/dist/features/seller/components/seller-products-styles.js +0 -14
  430. package/dist/features/seller/repository/__tests__/offer.repository.test.d.ts +0 -1
  431. package/dist/features/seller/repository/__tests__/offer.repository.test.js +0 -458
  432. package/dist/features/seller/repository/seller.repository.d.ts +0 -22
  433. package/dist/features/seller/repository/seller.repository.js +0 -72
  434. package/dist/features/site-settings/components/__tests__/ThemeManagerView.test.d.ts +0 -1
  435. package/dist/features/site-settings/components/__tests__/ThemeManagerView.test.js +0 -37
  436. package/dist/features/stores/repository/__tests__/store.repository.test.d.ts +0 -1
  437. package/dist/features/stores/repository/__tests__/store.repository.test.js +0 -261
  438. package/dist/features/stores/repository/stores.repository.d.ts +0 -11
  439. package/dist/features/stores/repository/stores.repository.js +0 -37
  440. package/dist/features/support/repository/__tests__/support.repository.test.d.ts +0 -1
  441. package/dist/features/support/repository/__tests__/support.repository.test.js +0 -312
  442. package/dist/features/wishlist/repository/__tests__/user-wishlist.repository.test.d.ts +0 -1
  443. package/dist/features/wishlist/repository/__tests__/user-wishlist.repository.test.js +0 -139
  444. package/dist/features/wishlist/repository/wishlist.repository.d.ts +0 -13
  445. package/dist/features/wishlist/repository/wishlist.repository.js +0 -31
  446. package/dist/providers/db-firebase/__tests__/filter-aliases.test.d.ts +0 -1
  447. package/dist/providers/db-firebase/__tests__/filter-aliases.test.js +0 -93
  448. package/dist/providers/shipping-shiprocket/index.d.ts +0 -297
  449. package/dist/providers/shipping-shiprocket/index.js +0 -194
  450. package/dist/providers/shipping-shiprocket/shiprocket-provider.d.ts +0 -45
  451. package/dist/providers/shipping-shiprocket/shiprocket-provider.js +0 -168
  452. package/dist/react/contexts/ThemeContext.d.ts +0 -13
  453. package/dist/react/contexts/ThemeContext.js +0 -64
  454. package/dist/schemas/webhooks/shiprocket.d.ts +0 -30
  455. package/dist/schemas/webhooks/shiprocket.js +0 -22
  456. package/dist/seed/actions/demo-seed-actions.d.ts +0 -42
  457. package/dist/seed/actions/demo-seed-actions.js +0 -36
  458. package/dist/seed/actions/index.d.ts +0 -1
  459. package/dist/seed/actions/index.js +0 -1
  460. package/dist/seed/sub-listings-seed-data.d.ts +0 -123
  461. package/dist/seed/sub-listings-seed-data.js +0 -447
  462. package/dist/seed/tester-checklist-seed-data.d.ts +0 -2
  463. package/dist/seed/tester-checklist-seed-data.js +0 -248
  464. package/dist/ui/components/DashboardStatsCard.d.ts +0 -15
  465. package/dist/ui/components/DashboardStatsCard.js +0 -27
  466. package/dist/ui/components/DashboardStatsCard.style.css +0 -68
  467. package/dist/ui/components/DynamicSelect.d.ts +0 -23
  468. package/dist/ui/components/DynamicSelect.js +0 -77
  469. package/dist/ui/components/DynamicSelect.style.css +0 -101
  470. package/dist/ui/components/InlineCreateSelect.d.ts +0 -48
  471. package/dist/ui/components/InlineCreateSelect.js +0 -75
  472. package/dist/ui/components/ListingViewShell.d.ts +0 -37
  473. package/dist/ui/components/ListingViewShell.js +0 -9
  474. package/dist/ui/components/PaginatedMultiSelect.d.ts +0 -28
  475. package/dist/ui/components/PaginatedMultiSelect.js +0 -141
  476. package/dist/ui/components/PaginatedMultiSelect.style.css +0 -272
  477. package/dist/ui/components/SectionTabs.d.ts +0 -19
  478. package/dist/ui/components/SectionTabs.js +0 -66
  479. package/dist/ui/components/SectionTabs.style.css +0 -164
  480. package/dist/ui/components/__tests__/BulkActionBar.test.d.ts +0 -1
  481. package/dist/ui/components/__tests__/BulkActionBar.test.js +0 -96
  482. package/dist/ui/components/__tests__/ListingToolbar.test.d.ts +0 -1
  483. package/dist/ui/components/__tests__/ListingToolbar.test.js +0 -125
  484. package/dist/ui/components/__tests__/new-primitives.test.d.ts +0 -1
  485. package/dist/ui/components/__tests__/new-primitives.test.js +0 -187
@@ -1,6 +1,6 @@
1
1
  export * from "./firestore";
2
2
  import { z } from "zod";
3
- import { auditTimestampsShape, firestoreDateSchema, paiseSchema } from "../../../schemas/firestore-helpers";
3
+ import { auditTimestampsShape, firestoreDateSchema, rupeesSchema } from "../../../schemas/firestore-helpers";
4
4
  // ─── Firestore document schemas (W2) ──────────────────────────────────────────
5
5
  // Mirrors CouponDocument + CouponUsageDocument + ClaimedCouponDocument in
6
6
  // ./firestore.ts. Registered into:
@@ -15,8 +15,8 @@ export const couponTypeEnumSchema = z.enum([
15
15
  ]);
16
16
  export const discountConfigSchema = z.object({
17
17
  value: z.number(),
18
- maxDiscount: paiseSchema.optional(),
19
- minPurchase: paiseSchema.optional(),
18
+ maxDiscount: rupeesSchema.optional(),
19
+ minPurchase: rupeesSchema.optional(),
20
20
  });
21
21
  export const bxgyConfigSchema = z.object({
22
22
  buyQuantity: z.number().int().positive(),
@@ -25,7 +25,7 @@ export const bxgyConfigSchema = z.object({
25
25
  applicableCategories: z.array(z.string()).optional(),
26
26
  });
27
27
  export const tieredDiscountSchema = z.object({
28
- minAmount: paiseSchema,
28
+ minAmount: rupeesSchema,
29
29
  discountValue: z.number(),
30
30
  });
31
31
  export const usageConfigSchema = z.object({
@@ -49,8 +49,8 @@ export const restrictionsConfigSchema = z.object({
49
49
  });
50
50
  export const couponStatsSchema = z.object({
51
51
  totalUses: z.number().int().nonnegative(),
52
- totalRevenue: paiseSchema,
53
- totalDiscount: paiseSchema,
52
+ totalRevenue: rupeesSchema,
53
+ totalDiscount: rupeesSchema,
54
54
  });
55
55
  export const couponFirestoreSchema = z.object({
56
56
  id: z.string(),
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { normalizeError } from "../../../errors/normalize";
3
+ import { formatCurrency } from "../../../utils/number.formatter";
3
4
  const CLS_OUTLINE_BTN = "appkit-button appkit-button--outline appkit-button--md flex w-full items-center gap-[var(--appkit-space-2)]";
4
5
  import Link from "next/link";
5
6
  import { Shield, Phone, Wallet, Mail, AlertOctagon, Flag, Eye, Users, Calendar, ExternalLink, FileText, MessageSquare, Link2, } from "lucide-react";
@@ -19,11 +20,6 @@ function formatDate(d) {
19
20
  return String(d);
20
21
  }
21
22
  }
22
- function formatPaise(paise) {
23
- if (!paise)
24
- return "";
25
- return `₹${(paise / 100).toLocaleString("en-IN")}`;
26
- }
27
23
  function IdentityChip({ label, value, icon, }) {
28
24
  return (_jsx(Card, { variant: "outlined", padding: "sm", children: _jsxs(Row, { gap: "sm", align: "center", children: [_jsx(Span, { className: "text-[color:var(--appkit-color-text-muted,theme(colors.zinc.400))]", children: icon }), _jsxs(Stack, { gap: "none", children: [_jsx(Text, { className: "text-[11px] tracking-wide", weight: "medium", transform: "uppercase", variant: "secondary", children: label }), _jsx(Text, { className: "truncate", size: "sm", weight: "medium", children: value })] })] }) }));
29
25
  }
@@ -36,10 +32,10 @@ function statusVariant(status) {
36
32
  }
37
33
  // ─── Sub-components ───────────────────────────────────────────────────────────
38
34
  function ScammerHeaderCard({ scammer }) {
39
- return (_jsx(Card, { variant: "elevated", padding: "lg", children: _jsxs(Stack, { gap: "md", children: [_jsxs(Row, { justify: "between", gap: "md", align: "start", wrap: true, children: [_jsxs(Stack, { gap: "xs", children: [_jsx(Heading, { level: 1, weight: "bold", size: "2xl", children: scammer.displayNames[0] }), scammer.displayNames.length > 1 && (_jsxs(Text, { variant: "secondary", size: "sm", children: ["Also known as: ", scammer.displayNames.slice(1).join(", ")] }))] }), _jsx(Badge, { variant: statusVariant(scammer.status), children: SCAMMER_STATUS_LABELS[scammer.status] ?? scammer.status })] }), _jsxs(Row, { gap: "xs", wrap: true, children: [_jsx(Badge, { variant: "warning", children: SCAM_TYPE_LABELS[scammer.scamType] ?? scammer.scamType }), _jsxs(Badge, { variant: "default", children: ["via ", SCAM_PLATFORM_LABELS[scammer.scamPlatform] ?? scammer.scamPlatform] }), scammer.tags.includes("repeat_offender") && (_jsx(Badge, { variant: "danger", children: "Repeat Offender" }))] }), _jsxs(Row, { gap: "md", wrap: true, children: [_jsxs(Text, { variant: "secondary", layout: "flex", gap: "1.5", size: "sm", children: [_jsx(Eye, { className: "h-4 w-4" }), scammer.views, " views"] }), _jsxs(Text, { variant: "secondary", layout: "flex", gap: "1.5", size: "sm", children: [_jsx(Users, { className: "h-4 w-4" }), scammer.incidentCount + 1, " victim", scammer.incidentCount !== 0 ? "s" : "", " reported"] }), _jsxs(Text, { variant: "secondary", layout: "flex", gap: "1.5", size: "sm", children: [_jsx(Calendar, { className: "h-4 w-4" }), "Reported ", formatDate(scammer.createdAt)] }), scammer.amountLost ? (_jsxs(Text, { className: "text-[color:var(--appkit-color-danger,theme(colors.red.600))]", size: "sm", weight: "medium", children: [formatPaise(scammer.amountLost), " lost (primary incident)"] })) : null] })] }) }));
35
+ return (_jsx(Card, { variant: "elevated", padding: "lg", children: _jsxs(Stack, { gap: "md", children: [_jsxs(Row, { justify: "between", gap: "md", align: "start", wrap: true, children: [_jsxs(Stack, { gap: "xs", children: [_jsx(Heading, { level: 1, weight: "bold", size: "2xl", children: scammer.displayNames[0] }), scammer.displayNames.length > 1 && (_jsxs(Text, { variant: "secondary", size: "sm", children: ["Also known as: ", scammer.displayNames.slice(1).join(", ")] }))] }), _jsx(Badge, { variant: statusVariant(scammer.status), children: SCAMMER_STATUS_LABELS[scammer.status] ?? scammer.status })] }), _jsxs(Row, { gap: "xs", wrap: true, children: [_jsx(Badge, { variant: "warning", children: SCAM_TYPE_LABELS[scammer.scamType] ?? scammer.scamType }), _jsxs(Badge, { variant: "default", children: ["via ", SCAM_PLATFORM_LABELS[scammer.scamPlatform] ?? scammer.scamPlatform] }), scammer.tags.includes("repeat_offender") && (_jsx(Badge, { variant: "danger", children: "Repeat Offender" }))] }), _jsxs(Row, { gap: "md", wrap: true, children: [_jsxs(Text, { variant: "secondary", layout: "flex", gap: "1.5", size: "sm", children: [_jsx(Eye, { className: "h-4 w-4" }), scammer.views, " views"] }), _jsxs(Text, { variant: "secondary", layout: "flex", gap: "1.5", size: "sm", children: [_jsx(Users, { className: "h-4 w-4" }), scammer.incidentCount + 1, " victim", scammer.incidentCount !== 0 ? "s" : "", " reported"] }), _jsxs(Text, { variant: "secondary", layout: "flex", gap: "1.5", size: "sm", children: [_jsx(Calendar, { className: "h-4 w-4" }), "Reported ", formatDate(scammer.createdAt)] }), scammer.amountLost ? (_jsxs(Text, { className: "text-[color:var(--appkit-color-danger,theme(colors.red.600))]", size: "sm", weight: "medium", children: [formatCurrency(scammer.amountLost), " lost (primary incident)"] })) : null] })] }) }));
40
36
  }
41
37
  function ScammerIncidentsSection({ incidents }) {
42
- return (_jsxs(Stack, { gap: "sm", children: [_jsx(Row, { justify: "between", align: "center", children: _jsxs(Heading, { level: 2, size: "base", weight: "semibold", children: ["Additional Incidents", incidents.length > 0 && ` (${incidents.length})`] }) }), incidents.length === 0 ? (_jsx(EmptyState, { icon: _jsx(FileText, { className: "h-8 w-8" }), title: "No additional incidents yet", description: "Other victims' verified reports linked to this profile will appear here." })) : (_jsx(Stack, { gap: "sm", children: incidents.map((inc) => (_jsx(Card, { variant: "outlined", padding: "md", children: _jsxs(Stack, { gap: "xs", children: [_jsxs(Row, { justify: "between", align: "start", gap: "sm", wrap: true, children: [_jsxs(Row, { gap: "xs", wrap: true, children: [_jsx(Badge, { variant: "warning", children: SCAM_TYPE_LABELS[inc.scamType] ?? inc.scamType }), _jsxs(Badge, { variant: "default", children: ["via ", SCAM_PLATFORM_LABELS[inc.scamPlatform] ?? inc.scamPlatform] })] }), _jsx(Text, { variant: "secondary", size: "xs", children: formatDate(inc.createdAt) })] }), inc.itemInvolved && (_jsxs(Text, { variant: "secondary", size: "xs", children: ["Item: ", inc.itemInvolved] })), inc.amountLost ? (_jsxs(Text, { className: "text-[color:var(--appkit-color-danger,theme(colors.red.600))]", size: "xs", weight: "medium", children: [formatPaise(inc.amountLost), " lost"] })) : null, _jsx(Text, { variant: "secondary", className: "leading-relaxed", size: "sm", children: inc.description.length > 200
38
+ return (_jsxs(Stack, { gap: "sm", children: [_jsx(Row, { justify: "between", align: "center", children: _jsxs(Heading, { level: 2, size: "base", weight: "semibold", children: ["Additional Incidents", incidents.length > 0 && ` (${incidents.length})`] }) }), incidents.length === 0 ? (_jsx(EmptyState, { icon: _jsx(FileText, { className: "h-8 w-8" }), title: "No additional incidents yet", description: "Other victims' verified reports linked to this profile will appear here." })) : (_jsx(Stack, { gap: "sm", children: incidents.map((inc) => (_jsx(Card, { variant: "outlined", padding: "md", children: _jsxs(Stack, { gap: "xs", children: [_jsxs(Row, { justify: "between", align: "start", gap: "sm", wrap: true, children: [_jsxs(Row, { gap: "xs", wrap: true, children: [_jsx(Badge, { variant: "warning", children: SCAM_TYPE_LABELS[inc.scamType] ?? inc.scamType }), _jsxs(Badge, { variant: "default", children: ["via ", SCAM_PLATFORM_LABELS[inc.scamPlatform] ?? inc.scamPlatform] })] }), _jsx(Text, { variant: "secondary", size: "xs", children: formatDate(inc.createdAt) })] }), inc.itemInvolved && (_jsxs(Text, { variant: "secondary", size: "xs", children: ["Item: ", inc.itemInvolved] })), inc.amountLost ? (_jsxs(Text, { className: "text-[color:var(--appkit-color-danger,theme(colors.red.600))]", size: "xs", weight: "medium", children: [formatCurrency(inc.amountLost), " lost"] })) : null, _jsx(Text, { variant: "secondary", className: "leading-relaxed", size: "sm", children: inc.description.length > 200
43
39
  ? `${inc.description.slice(0, 200).trimEnd()}…`
44
40
  : inc.description }), _jsxs(Text, { variant: "secondary", size: "xs", children: ["Reported by: ", inc.reportedByAnon ? "Anonymous" : "Verified victim"] })] }) }, inc.id))) }))] }));
45
41
  }
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Span, sortBy } from "@mohasinac/appkit";
3
3
  import Link from "next/link";
4
4
  import { ROUTES } from "../../../next/routing/route-map";
5
+ import { formatCurrency } from "../../../utils/number.formatter";
5
6
  const CLS_ICON_SM = "h-3 w-3 shrink-0";
6
7
  const CLS_ROW_CHEVRON = "h-4 w-4 shrink-0 text-zinc-300 transition group-hover:text-error text-[var(--appkit-color-text-faint)]";
7
8
  const CLS_PILL_LINK = "inline-flex items-center gap-[var(--appkit-space-1)] rounded-full bg-error-surface dark:bg-error-surface px-[var(--appkit-space-2-5)] py-[var(--appkit-space-0-5)] text-[length:var(--appkit-text-xs)] font-medium text-error dark:text-error hover:bg-error-surface transition-colors";
@@ -20,18 +21,13 @@ function sp(params, key) {
20
21
  const v = params[key];
21
22
  return Array.isArray(v) ? (v[0] ?? "") : (v ?? "");
22
23
  }
23
- function formatPaise(paise) {
24
- if (!paise)
25
- return "";
26
- return `₹${(paise / 100).toLocaleString("en-IN")}`;
27
- }
28
24
  function ScammerCard({ scammer }) {
29
25
  const href = String(ROUTES.PUBLIC.SCAM_DETAIL(scammer.id));
30
26
  const name = scammer.displayNames[0] ?? "Unknown";
31
27
  const aliases = scammer.displayNames.slice(1);
32
28
  return (_jsx(Link, { href: href, className: "group block", children: _jsx(Card, { variant: "outlined", hover: true, padding: "md", children: _jsxs(Stack, { gap: "sm", children: [_jsxs(Row, { justify: "between", gap: "sm", align: "start", children: [_jsxs(Stack, { gap: "xs", className: "min-w-0", children: [_jsx(Text, { className: "truncate", weight: "semibold", children: name }), aliases.length > 0 && (_jsxs(Text, { variant: "secondary", size: "xs", children: ["Also known as: ", aliases.join(", ")] }))] }), _jsx(Badge, { variant: "danger", children: "Verified" })] }), _jsxs(Row, { gap: "xs", wrap: true, children: [_jsx(Badge, { variant: "warning", children: SCAM_TYPE_LABELS[scammer.scamType] ?? scammer.scamType }), _jsx(Badge, { variant: "default", children: SCAM_PLATFORM_LABELS[scammer.scamPlatform] ?? scammer.scamPlatform })] }), _jsxs(Stack, { gap: "xs", children: [scammer.phones.slice(0, 2).map((p) => (_jsxs(Text, { variant: "secondary", layout: "flex", gap: "1", size: "xs", children: [_jsx(Phone, { className: CLS_ICON_SM }), " ", p] }, p))), scammer.upiIds.slice(0, 1).map((u) => (_jsxs(Text, { variant: "secondary", layout: "flex", gap: "1", size: "xs", children: [_jsx(Wallet, { className: CLS_ICON_SM }), " ", u] }, u))), scammer.emails.slice(0, 1).map((e) => (_jsxs(Text, { variant: "secondary", layout: "flex", gap: "1", size: "xs", children: [_jsx(Mail, { className: CLS_ICON_SM }), " ", e] }, e)))] }), _jsxs(Row, { justify: "between", gap: "sm", children: [_jsxs(Text, { variant: "secondary", size: "xs", children: [scammer.incidentCount > 0
33
29
  ? `${scammer.incidentCount + 1} victims reported`
34
- : "1 victim reported", scammer.amountLost ? ` · ${formatPaise(scammer.amountLost)} lost` : ""] }), _jsx(ChevronRight, { className: CLS_ROW_CHEVRON })] })] }) }) }));
30
+ : "1 victim reported", scammer.amountLost ? ` · ${formatCurrency(scammer.amountLost)} lost` : ""] }), _jsx(ChevronRight, { className: CLS_ROW_CHEVRON })] })] }) }) }));
35
31
  }
36
32
  export async function ScamRegistryView({ searchParams = {} }) {
37
33
  const query = sp(searchParams, "q");
@@ -112,7 +112,7 @@ export interface ScammerDocument extends BaseDocument {
112
112
  scamPlatform: ScamPlatform;
113
113
  /** Reporter's narrative for the first/primary incident. */
114
114
  description: string;
115
- /** Amount lost in INR paise (0 if none). Optional. */
115
+ /** Amount lost in INR, decimal rupees (0 if none). Optional. */
116
116
  amountLost?: number;
117
117
  /** Item involved in the scam (e.g. "Charizard PSA 9"). Optional. */
118
118
  itemInvolved?: string;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import type { LucideIcon } from "lucide-react";
3
3
  import type { NavSuggestionRecord } from "../hooks/useNavSuggestions";
4
- export type SearchResourceType = "products" | "auctions" | "pre-orders" | "prize-draws" | "bundles" | "classified" | "digital-codes" | "live" | "stores" | "categories" | "brands" | "events" | "blog" | "faqs";
4
+ export type SearchResourceType = "products" | "auctions" | "pre-orders" | "prize-draws" | "bundles" | "classified" | "digital-codes" | "live" | "art" | "stores" | "categories" | "brands" | "events" | "blog" | "faqs";
5
5
  export interface SearchResourceTypeOption {
6
6
  value: SearchResourceType;
7
7
  label: string;
@@ -25,7 +25,7 @@ export async function makeOffer(userId, userEmail, input) {
25
25
  throw new NotFoundError(ERROR_MESSAGES.PRODUCT.NOT_FOUND);
26
26
  if (!product.allowOffers)
27
27
  throw new ValidationError("This product does not accept offers.");
28
- const minAllowed = Math.ceil(product.price * ((product.minOfferPercent ?? 70) / 100));
28
+ const minAllowed = Math.ceil(product.price * ((product.minOfferPercent ?? 70) / 100) * 100) / 100;
29
29
  if (offerAmount < minAllowed)
30
30
  throw new ValidationError(`Minimum offer is ₹${minAllowed} (${product.minOfferPercent ?? 70}% of listing price).`);
31
31
  if (offerAmount >= product.price)
@@ -27,10 +27,10 @@ function ProductLabel({ product }) {
27
27
  }
28
28
  }
29
29
  }, [product.barcodeId]);
30
- return (_jsxs(Stack, { surface: "card", padding: "sm", rounded: "sm", gap: "xs", className: "break-inside-avoid text-center w-[200px]", children: [product.barcodeId ? (_jsx("svg", { ref: svgRef })) : (_jsx(Text, { size: "xs", color: "muted", children: "No barcode" })), _jsx(Text, { size: "xs", weight: "medium", truncate: 1, children: product.name }), _jsxs(Text, { size: "xs", color: "muted", children: ["\u20B9", (product.price / 100).toLocaleString("en-IN")] }), product.physicalLocation && (_jsx(Text, { size: "xs", color: "muted", children: product.physicalLocation }))] }));
30
+ return (_jsxs(Stack, { surface: "card", padding: "sm", rounded: "sm", gap: "xs", className: "break-inside-avoid text-center w-[200px]", children: [product.barcodeId ? (_jsx("svg", { ref: svgRef })) : (_jsx(Text, { size: "xs", color: "muted", children: "No barcode" })), _jsx(Text, { size: "xs", weight: "medium", truncate: 1, children: product.name }), _jsxs(Text, { size: "xs", color: "muted", children: ["\u20B9", product.price.toLocaleString("en-IN")] }), product.physicalLocation && (_jsx(Text, { size: "xs", color: "muted", children: product.physicalLocation }))] }));
31
31
  }
32
32
  function PackingSlip({ order, brandName }) {
33
- return (_jsxs(Stack, { surface: "card", padding: "md", rounded: "sm", className: "break-inside-avoid mb-4 max-w-[480px]", children: [_jsxs(Row, { justify: "between", className: "mb-2", children: [_jsx(Heading, { level: 5, children: brandName }), _jsxs(Text, { size: "xs", color: "muted", children: ["#", order.id] })] }), _jsx(Text, { size: "xs", color: "muted", children: new Date(order.createdAt).toLocaleDateString("en-IN") }), order.buyerDisplayName && _jsx(Text, { size: "sm", weight: "medium", children: order.buyerDisplayName }), order.buyerCity && _jsx(Text, { size: "xs", color: "muted", children: order.buyerCity }), order.physicalLocation && (_jsxs(Text, { size: "xs", color: "muted", children: ["Staging: ", order.physicalLocation] })), _jsx(Stack, { border: "top", padding: "t-xs", className: "mt-3", children: order.items.map((item, i) => (_jsxs(Row, { justify: "between", padding: "y-2xs", className: "border-b last:border-b-0", children: [_jsxs(Stack, { gap: "xs", children: [_jsx(Text, { size: "xs", weight: "medium", children: item.productName }), item.barcodeId && _jsx(Text, { size: "xs", color: "muted", children: item.barcodeId })] }), _jsxs(Stack, { className: "text-right", children: [_jsxs(Text, { size: "xs", children: ["\u00D7", item.quantity] }), _jsxs(Text, { size: "xs", color: "muted", children: ["\u20B9", (item.price / 100).toLocaleString("en-IN")] })] })] }, i))) })] }));
33
+ return (_jsxs(Stack, { surface: "card", padding: "md", rounded: "sm", className: "break-inside-avoid mb-4 max-w-[480px]", children: [_jsxs(Row, { justify: "between", className: "mb-2", children: [_jsx(Heading, { level: 5, children: brandName }), _jsxs(Text, { size: "xs", color: "muted", children: ["#", order.id] })] }), _jsx(Text, { size: "xs", color: "muted", children: new Date(order.createdAt).toLocaleDateString("en-IN") }), order.buyerDisplayName && _jsx(Text, { size: "sm", weight: "medium", children: order.buyerDisplayName }), order.buyerCity && _jsx(Text, { size: "xs", color: "muted", children: order.buyerCity }), order.physicalLocation && (_jsxs(Text, { size: "xs", color: "muted", children: ["Staging: ", order.physicalLocation] })), _jsx(Stack, { border: "top", padding: "t-xs", className: "mt-3", children: order.items.map((item, i) => (_jsxs(Row, { justify: "between", padding: "y-2xs", className: "border-b last:border-b-0", children: [_jsxs(Stack, { gap: "xs", children: [_jsx(Text, { size: "xs", weight: "medium", children: item.productName }), item.barcodeId && _jsx(Text, { size: "xs", color: "muted", children: item.barcodeId })] }), _jsxs(Stack, { className: "text-right", children: [_jsxs(Text, { size: "xs", children: ["\u00D7", item.quantity] }), _jsxs(Text, { size: "xs", color: "muted", children: ["\u20B9", item.price.toLocaleString("en-IN")] })] })] }, i))) })] }));
34
34
  }
35
35
  export function PrintCenterView({ store, brandName = "LetItRip", initialProducts = [], initialOrders = [], }) {
36
36
  const [tab, setTab] = useState("labels");
@@ -6,11 +6,11 @@ import { Alert, Button, Div, FormField, Stack, Text } from "../../../ui";
6
6
  const __P = {
7
7
  p5: "p-[var(--appkit-space-5)]",
8
8
  };
9
- function toRupees(paise) {
10
- return paise != null && paise > 0 ? String(Math.round(paise / 100)) : "";
9
+ function toRupeesString(price) {
10
+ return price != null && price > 0 ? String(price) : "";
11
11
  }
12
- function toPaise(rupeeStr) {
13
- return Math.round((parseFloat(rupeeStr) || 0) * 100);
12
+ function fromRupeesString(rupeeStr) {
13
+ return Math.round((parseFloat(rupeeStr) || 0) * 100) / 100;
14
14
  }
15
15
  function validate(values) {
16
16
  const errors = {};
@@ -50,5 +50,5 @@ export function QuickProductForm({ values, onChange, onPublish, onSave, onSwitch
50
50
  return (_jsxs(Stack, { gap: "lg", className: `${__P.p5}`, children: [_jsx(Div, { children: _jsx(Text, { size: "sm", color: "muted", children: "Quick add \u2014 fill the essentials and publish. You can add more details later." }) }), touched && Object.keys(errors).length > 0 && (_jsx(Alert, { variant: "error", children: "Please fix the highlighted fields before publishing." })), _jsx(FormField, { name: "title", label: "Product Name", type: "text", value: values.title ?? "", onChange: (v) => onChange({ title: v }), placeholder: "e.g. Charizard Base Set PSA 9", required: true, error: touched ? errors.title : undefined }), renderCategorySelector ? (_jsxs(Div, { children: [_jsx(Text, { className: "mb-1", color: "muted", size: "sm", weight: "medium", children: "Category" }), renderCategorySelector({
51
51
  value: values.category ?? "",
52
52
  onChange: (v) => onChange({ category: v }),
53
- }), touched && errors.category && (_jsx(Text, { className: "text-[var(--appkit-color-error)] mt-1", size: "xs", children: errors.category }))] })) : (_jsx(FormField, { name: "category", label: "Category", type: "text", value: values.category ?? "", onChange: (v) => onChange({ category: v }), placeholder: "e.g. Trading Cards", error: touched ? errors.category : undefined })), _jsx(FormField, { name: "price", label: "Price (\u20B9)", type: "number", value: toRupees(values.price), onChange: (v) => onChange({ price: toPaise(v) }), placeholder: "e.g. 499", required: true, error: touched ? errors.price : undefined }), _jsx(FormField, { name: "mainImage", label: "Product Image", type: "image", value: values.mainImage ?? "", onChange: (v) => onChange({ mainImage: v }), onUpload: onUploadImage, required: true, error: touched ? errors.mainImage : undefined }), _jsx(FormField, { name: "description", label: "Description", type: "textarea", value: values.description ?? "", onChange: (v) => onChange({ description: v }), placeholder: "Brief description (optional)", rows: 3 }), _jsx(FormField, { name: "stockQuantity", label: "Stock Quantity", type: "number", value: String(values.stockQuantity ?? 1), onChange: (v) => onChange({ stockQuantity: Math.max(0, parseInt(v, 10) || 0) }), placeholder: "1", hint: "How many units are available" }), _jsxs(Stack, { gap: "3", padding: "t-xs", children: [_jsxs(Row, { gap: "3", children: [_jsx(Button, { variant: "primary", onClick: handlePublish, disabled: isLoading, className: "flex-1", children: isLoading ? "Publishing..." : "Publish" }), _jsx(Button, { variant: "secondary", onClick: handleSave, disabled: isLoading, children: "Save Draft" })] }), _jsx(Button, { variant: "ghost", size: "sm", textSize: "xs", onClick: onSwitchToFull, className: "self-center", children: "Show all fields (advanced)" })] })] }));
53
+ }), touched && errors.category && (_jsx(Text, { className: "text-[var(--appkit-color-error)] mt-1", size: "xs", children: errors.category }))] })) : (_jsx(FormField, { name: "category", label: "Category", type: "text", value: values.category ?? "", onChange: (v) => onChange({ category: v }), placeholder: "e.g. Trading Cards", error: touched ? errors.category : undefined })), _jsx(FormField, { name: "price", label: "Price (\u20B9)", type: "number", value: toRupeesString(values.price), onChange: (v) => onChange({ price: fromRupeesString(v) }), placeholder: "e.g. 499", required: true, error: touched ? errors.price : undefined }), _jsx(FormField, { name: "mainImage", label: "Product Image", type: "image", value: values.mainImage ?? "", onChange: (v) => onChange({ mainImage: v }), onUpload: onUploadImage, required: true, error: touched ? errors.mainImage : undefined }), _jsx(FormField, { name: "description", label: "Description", type: "textarea", value: values.description ?? "", onChange: (v) => onChange({ description: v }), placeholder: "Brief description (optional)", rows: 3 }), _jsx(FormField, { name: "stockQuantity", label: "Stock Quantity", type: "number", value: String(values.stockQuantity ?? 1), onChange: (v) => onChange({ stockQuantity: Math.max(0, parseInt(v, 10) || 0) }), placeholder: "1", hint: "How many units are available" }), _jsxs(Stack, { gap: "3", padding: "t-xs", children: [_jsxs(Row, { gap: "3", children: [_jsx(Button, { variant: "primary", onClick: handlePublish, disabled: isLoading, className: "flex-1", children: isLoading ? "Publishing..." : "Publish" }), _jsx(Button, { variant: "secondary", onClick: handleSave, disabled: isLoading, children: "Save Draft" })] }), _jsx(Button, { variant: "ghost", size: "sm", textSize: "xs", onClick: onSwitchToFull, className: "self-center", children: "Show all fields (advanced)" })] })] }));
54
54
  }
@@ -11,7 +11,7 @@ import { ConfirmDeleteModal, RowActionMenu, Text } from "../../../ui";
11
11
  import { SELLER_ENDPOINTS } from "../../../constants/api-endpoints";
12
12
  import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
13
13
  import { ROUTES } from "../../..";
14
- import { toRecordArray, toRelativeDate, toRupees, toStringValue, } from "../../admin/hooks/useAdminListingData";
14
+ import { toRecordArray, toRelativeDate, toCurrency, toStringValue, } from "../../admin/hooks/useAdminListingData";
15
15
  import { DataListingView } from "../../admin/components/DataListingView";
16
16
  import { SELLER_BULK_ACTIONS, ROW_ACTION_META } from "../../products/constants/action-defs";
17
17
  const COLUMNS = [
@@ -79,7 +79,7 @@ export function SellerArtView({ onCreateClick, onEditClick, onDelete, onBulkDele
79
79
  return {
80
80
  id: toStringValue(item.id, `art-${index}`),
81
81
  title: toStringValue(item.productTitle ?? item.title, "Untitled"),
82
- price: toRupees(item.price),
82
+ price: toCurrency(item.price),
83
83
  size: toStringValue(printMeta.size, ""),
84
84
  status: toStringValue(item.status, "draft"),
85
85
  createdAt: toRelativeDate(item.createdAt),
@@ -9,7 +9,7 @@ import { SELLER_ENDPOINTS } from "../../../constants/api-endpoints";
9
9
  import { SELLER_AUCTION_STATUS_TABS } from "../../admin/constants/filter-tabs";
10
10
  import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
11
11
  import { ROUTES } from "../../../constants";
12
- import { toRecordArray, toRelativeDate, toRupees, toStringValue, } from "../../admin/hooks/useAdminListingData";
12
+ import { toRecordArray, toRelativeDate, toCurrency, toStringValue, } from "../../admin/hooks/useAdminListingData";
13
13
  import { DataListingView } from "../../admin/components/DataListingView";
14
14
  import { SELLER_BULK_ACTIONS, ROW_ACTION_META } from "../../products/constants/action-defs";
15
15
  export function SellerAuctionsView({ children, onEditClick, onDelete, onBulkDelete, ...props }) {
@@ -52,7 +52,7 @@ export function SellerAuctionsView({ children, onEditClick, onDelete, onBulkDele
52
52
  id: toStringValue(item.id, `auction-${index}`),
53
53
  primary: toStringValue(item.productTitle ?? item.title, "Untitled auction"),
54
54
  secondary: [
55
- `Reserve: ${toRupees(item.reservePrice)}`,
55
+ `Reserve: ${toCurrency(item.reservePrice)}`,
56
56
  `Bids: ${item.bidCount ?? 0}`,
57
57
  ].join(" · "),
58
58
  status: toStringValue(item.status, "Unknown"),
@@ -11,7 +11,7 @@ import { SELLER_ENDPOINTS } from "../../../constants/api-endpoints";
11
11
  import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
12
12
  import { buildBulkAction } from "../../../_internal/shared/actions/bulk-helpers";
13
13
  import { SELLER_BID_STATUS_TABS } from "../../admin/constants/filter-tabs";
14
- import { toRecordArray, toRelativeDate, toRupees, toStringValue, useSellerListingData, } from "../hooks/useSellerListingData";
14
+ import { toRecordArray, toRelativeDate, toCurrency, toStringValue, useSellerListingData, } from "../hooks/useSellerListingData";
15
15
  import { DataTable } from "../../admin/components/DataTable";
16
16
  import { useBottomActions } from "../../layout";
17
17
  // ---------------------------------------------------------------------------
@@ -112,7 +112,7 @@ export function SellerBidsView({ endpoint = SELLER_ENDPOINTS.BIDS }) {
112
112
  key: "bidAmount",
113
113
  header: "Bid",
114
114
  className: "w-28 text-right",
115
- render: (row) => (_jsx(Span, { size: "sm", weight: "semibold", color: "primary", children: toRupees(row.bidAmount) })),
115
+ render: (row) => (_jsx(Span, { size: "sm", weight: "semibold", color: "primary", children: toCurrency(row.bidAmount) })),
116
116
  },
117
117
  {
118
118
  key: "status",
@@ -8,10 +8,10 @@ import { SELLER_BULK_ACTIONS } from "../../products/constants/action-defs";
8
8
  import { BUNDLE_COPY, BUNDLE_STOCK_VARIANT, } from "../../../_internal/shared/features/categories/bundle-copy";
9
9
  import { toRecordArray, toRelativeDate, toStringValue, } from "../../admin/hooks/useAdminListingData";
10
10
  import { DataListingView } from "../../admin/components/DataListingView";
11
- function formatPrice(paise) {
12
- if (typeof paise !== "number" || paise <= 0)
11
+ function formatPrice(value) {
12
+ if (typeof value !== "number" || value <= 0)
13
13
  return "—";
14
- return `₹${Math.round(paise / 100).toLocaleString("en-IN")}`;
14
+ return `₹${value.toLocaleString("en-IN")}`;
15
15
  }
16
16
  const COLUMNS = [
17
17
  {
@@ -50,8 +50,8 @@ export function SellerBundlesView({ getEditHref, newHref }) {
50
50
  sortOptions: [
51
51
  { value: sortBy("name", "ASC"), label: "Name A–Z" },
52
52
  { value: sortBy("name", "DESC"), label: "Name Z–A" },
53
- { value: sortBy("bundlePriceInPaise", "DESC"), label: "Price high→low" },
54
- { value: "bundlePriceInPaise", label: "Price low→high" },
53
+ { value: sortBy("bundlePrice", "DESC"), label: "Price high→low" },
54
+ { value: "bundlePrice", label: "Price low→high" },
55
55
  { value: sortBy("createdAt", "DESC"), label: "Newest" },
56
56
  { value: sortBy("createdAt", "ASC"), label: "Oldest" },
57
57
  ],
@@ -60,7 +60,7 @@ export function SellerBundlesView({ getEditHref, newHref }) {
60
60
  id: toStringValue(item.id, `bundle-${index}`),
61
61
  primary: toStringValue(item.name, "Untitled bundle"),
62
62
  secondary: toStringValue(item.slug, "no-slug"),
63
- price: formatPrice(item.bundlePriceInPaise),
63
+ price: formatPrice(item.bundlePrice),
64
64
  members: String(Array.isArray(item.bundleProductIds) ? item.bundleProductIds.length : 0),
65
65
  stockStatus: toStringValue(item.bundleStockStatus, "in_stock"),
66
66
  isActive: item.isActive === true,
@@ -7,7 +7,7 @@ import { ConfirmDeleteModal, RowActionMenu, Text } from "../../../ui";
7
7
  import { SELLER_ENDPOINTS } from "../../../constants/api-endpoints";
8
8
  import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
9
9
  import { ROUTES } from "../../..";
10
- import { toRecordArray, toRelativeDate, toRupees, toStringValue, } from "../../admin/hooks/useAdminListingData";
10
+ import { toRecordArray, toRelativeDate, toCurrency, toStringValue, } from "../../admin/hooks/useAdminListingData";
11
11
  import { DataListingView } from "../../admin/components/DataListingView";
12
12
  import { SELLER_BULK_ACTIONS, ROW_ACTION_META } from "../../products/constants/action-defs";
13
13
  const COLUMNS = [
@@ -81,7 +81,7 @@ export function SellerClassifiedView({ onCreateClick, onEditClick, onDelete, onB
81
81
  return {
82
82
  id: toStringValue(item.id, `classified-${index}`),
83
83
  title: toStringValue(item.productTitle ?? item.title, "Untitled"),
84
- price: toRupees(item.price),
84
+ price: toCurrency(item.price),
85
85
  city: toStringValue(meetupArea.city ?? classified.city, ""),
86
86
  acceptsShipping: Boolean(classified.acceptsShipping),
87
87
  status: toStringValue(item.status, "draft"),
@@ -7,7 +7,7 @@ import { Badge, ConfirmDeleteModal, RowActionMenu, Span, Text } from "../../../u
7
7
  import { SELLER_ENDPOINTS } from "../../../constants/api-endpoints";
8
8
  import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
9
9
  import { ROUTES } from "../../..";
10
- import { toRecordArray, toRelativeDate, toRupees, toStringValue, } from "../../admin/hooks/useAdminListingData";
10
+ import { toRecordArray, toRelativeDate, toCurrency, toStringValue, } from "../../admin/hooks/useAdminListingData";
11
11
  import { DataListingView } from "../../admin/components/DataListingView";
12
12
  import { SELLER_BULK_ACTIONS, ROW_ACTION_META } from "../../products/constants/action-defs";
13
13
  const COLUMNS = [
@@ -84,7 +84,7 @@ export function SellerDigitalCodesView({ onCreateClick, onEditClick, onDelete, o
84
84
  return {
85
85
  id: toStringValue(item.id, `dc-${index}`),
86
86
  title: toStringValue(item.productTitle ?? item.title, "Untitled"),
87
- price: toRupees(item.price),
87
+ price: toCurrency(item.price),
88
88
  codePoolSize: typeof dc.codePoolSize === "number" ? dc.codePoolSize : null,
89
89
  codesAvailable: typeof dc.codesAvailable === "number" ? dc.codesAvailable : null,
90
90
  deliveryMethod: toStringValue(dc.codeDeliveryMethod, "auto-claim"),
@@ -7,7 +7,7 @@ import { ConfirmDeleteModal, Div, RowActionMenu, Text } from "../../../ui";
7
7
  import { SELLER_ENDPOINTS } from "../../../constants/api-endpoints";
8
8
  import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
9
9
  import { ROUTES } from "../../..";
10
- import { toRecordArray, toRelativeDate, toRupees, toStringValue, } from "../../admin/hooks/useAdminListingData";
10
+ import { toRecordArray, toRelativeDate, toCurrency, toStringValue, } from "../../admin/hooks/useAdminListingData";
11
11
  import { DataListingView } from "../../admin/components/DataListingView";
12
12
  import { SELLER_BULK_ACTIONS, ROW_ACTION_META } from "../../products/constants/action-defs";
13
13
  const COLUMNS = [
@@ -84,7 +84,7 @@ export function SellerLiveView({ onCreateClick, onEditClick, onDelete, onBulkDel
84
84
  return {
85
85
  id: toStringValue(item.id, `live-${index}`),
86
86
  title: toStringValue(item.productTitle ?? item.title, "Untitled"),
87
- price: toRupees(item.price),
87
+ price: toCurrency(item.price),
88
88
  species: toStringValue(live.species, ""),
89
89
  ageMonths: typeof live.ageMonths === "number" ? live.ageMonths : null,
90
90
  vendorVerified: Boolean(live.vendorVerified),
@@ -7,7 +7,7 @@ import { FilterChipGroup, ListingLayout, RowActionMenu } from "../../../ui";
7
7
  import { SELLER_ENDPOINTS } from "../../../constants/api-endpoints";
8
8
  import { SELLER_OFFER_STATUS_TABS } from "../../admin/constants/filter-tabs";
9
9
  import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
10
- import { toRecordArray, toRelativeDate, toRupees, toStringValue, } from "../../admin/hooks/useAdminListingData";
10
+ import { toRecordArray, toRelativeDate, toCurrency, toStringValue, } from "../../admin/hooks/useAdminListingData";
11
11
  import { DataListingView } from "../../admin/components/DataListingView";
12
12
  export function SellerOffersView({ children, onAcceptOffer, onRejectOffer, onCounterOffer, ...props }) {
13
13
  if (React.Children.count(children) > 0) {
@@ -30,7 +30,7 @@ export function SellerOffersView({ children, onAcceptOffer, onRejectOffer, onCou
30
30
  id: toStringValue(item.id, `offer-${index}`),
31
31
  primary: toStringValue(item.productTitle ?? item.title, "Untitled product"),
32
32
  secondary: [
33
- `Offer: ${toRupees(item.offerAmount ?? item.amount)}`,
33
+ `Offer: ${toCurrency(item.offerAmount ?? item.amount)}`,
34
34
  toStringValue(item.buyerName ?? "Unknown buyer", "Unknown buyer"),
35
35
  ].join(" · "),
36
36
  status: toStringValue(item.status, "Pending"),
@@ -15,7 +15,7 @@ import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
15
15
  import { buildBulkAction } from "../../../_internal/shared/actions/bulk-helpers";
16
16
  import { PhysicalLocationModal } from "./PhysicalLocationModal";
17
17
  import { ROUTES } from "../../../constants";
18
- import { toRecordArray, toRelativeDate, toRupees, toStringValue, useSellerListingData, } from "../hooks/useSellerListingData";
18
+ import { toRecordArray, toRelativeDate, toCurrency, toStringValue, useSellerListingData, } from "../hooks/useSellerListingData";
19
19
  import { DataTable } from "../../admin/components/DataTable";
20
20
  import { useBottomActions } from "../../layout";
21
21
  const __O = {
@@ -151,7 +151,7 @@ function OrderDetailDrawer({ orderId, apiBase, onClose, }) {
151
151
  };
152
152
  const addr = order?.shippingAddress ?? {};
153
153
  const addrLine = [addr.addressLine1, addr.city, addr.state, addr.pincode].filter(Boolean).join(", ");
154
- return (_jsxs(SideDrawer, { isOpen: true, title: `Order ${order?.id ?? orderId}`, onClose: onClose, children: [loading && (_jsx(Row, { align: "center", justify: "center", padding: "y-4xl", children: _jsx(Div, { className: "h-6 w-6 animate-spin border-2 border-[var(--appkit-color-primary)] border-t-transparent", rounded: "full" }) })), fetchError && (_jsx(Div, { textSize: "sm", className: "mx-4 mt-4 border border-error/20", color: "error", surface: "danger-surface", padding: "inline", rounded: "lg", children: fetchError })), order && !loading && (_jsxs(Stack, { gap: "none", children: [_jsxs(Stack, { className: `flex-1 ${__O.yAuto}`, gap: "5", padding: "md", children: [_jsxs(Row, { align: "center", justify: "between", children: [_jsx(Badge, { variant: STATUS_BADGE_VARIANT[order.status?.toUpperCase()] ?? "default", children: order.status ?? "Unknown" }), _jsx(Text, { size: "sm", className: "text-[var(--appkit-color-text-secondary)]", children: toRelativeDate(order.createdAt) })] }), (order.items ?? []).length > 0 && (_jsxs(Div, { children: [_jsx(Text, { size: "sm", className: "text-[var(--appkit-color-text-primary)] mb-2", weight: "semibold", children: "Items" }), _jsx(Div, { className: "divide-y divide-[var(--appkit-color-border)] divide-[var(--appkit-color-border)] border border-[var(--appkit-color-border)]", rounded: "lg", children: (order.items ?? []).map((item, i) => (_jsxs(Row, { paddingY: "y-xs-tall", padding: "x-sm", align: "center", justify: "between", gap: "3", children: [_jsxs(Div, { className: "min-w-0", children: [_jsx(Text, { size: "sm", className: "truncate", weight: "medium", children: item.title ?? item.productId ?? "Item" }), _jsxs(Text, { size: "xs", className: "text-[var(--appkit-color-text-secondary)]", children: ["Qty: ", item.quantity ?? 1] })] }), _jsx(Text, { size: "sm", className: "shrink-0", weight: "medium", children: toRupees(item.price ?? 0) })] }, i))) })] })), _jsxs(Row, { surface: "muted", padding: "inline", align: "center", justify: "between", rounded: "lg", children: [_jsx(Text, { size: "sm", weight: "semibold", children: "Total" }), _jsx(Text, { size: "sm", className: "text-[var(--appkit-color-primary)]", weight: "bold", children: toRupees(order.totalAmount ?? 0) })] }), addrLine && (_jsxs(Div, { children: [_jsx(Text, { size: "sm", className: "mb-1", weight: "semibold", children: "Shipping address" }), _jsx(Text, { size: "sm", className: "text-[var(--appkit-color-text-secondary)]", children: [String(addr.fullName ?? ""), addrLine].filter(Boolean).join(" · ") })] })), order.paymentMethod && (_jsxs(Div, { children: [_jsx(Text, { size: "sm", className: "mb-1", weight: "semibold", children: "Payment" }), _jsx(Text, { size: "sm", className: "text-[var(--appkit-color-text-secondary)]", transform: "capitalize", children: order.paymentMethod })] })), order.emiEnabled && (_jsxs(Div, { className: "border-t border-[var(--appkit-color-border)]", padding: "t-md", children: [_jsxs(Row, { align: "center", justify: "between", className: "mb-2", children: [_jsxs(Text, { size: "sm", weight: "semibold", children: ["EMI plan ", order.emiTenureMonths ? `· ${order.emiTenureMonths} months` : ""] }), _jsx(Badge, { variant: order.emiComplete ? "success" : "warning", children: order.emiComplete ? "Fully paid" : "In progress" })] }), _jsxs(Row, { align: "center", justify: "between", className: "mb-2", children: [_jsx(Text, { size: "xs", color: "muted", children: "Token collected" }), _jsx(Text, { size: "xs", weight: "medium", children: toRupees(order.emiTokenAmount ?? 0) })] }), _jsxs(Row, { align: "center", justify: "between", className: "mb-3", children: [_jsx(Text, { size: "xs", color: "muted", children: "Remaining balance" }), _jsx(Text, { size: "xs", weight: "medium", children: toRupees(order.emiRemainingBalance ?? 0) })] }), _jsx(Div, { className: "divide-y divide-[var(--appkit-color-border)] border border-[var(--appkit-color-border)]", rounded: "lg", children: (order.emiInstallments ?? []).map((inst) => (_jsxs(Row, { paddingY: "y-xs-tall", padding: "x-sm", align: "center", justify: "between", gap: "3", children: [_jsxs(Div, { className: "min-w-0", children: [_jsxs(Text, { size: "sm", weight: "medium", children: ["Installment ", inst.index, " \u00B7 ", toRupees(inst.amount)] }), _jsx(Text, { size: "xs", color: "muted", children: inst.status === "paid" && inst.paidAt
154
+ return (_jsxs(SideDrawer, { isOpen: true, title: `Order ${order?.id ?? orderId}`, onClose: onClose, children: [loading && (_jsx(Row, { align: "center", justify: "center", padding: "y-4xl", children: _jsx(Div, { className: "h-6 w-6 animate-spin border-2 border-[var(--appkit-color-primary)] border-t-transparent", rounded: "full" }) })), fetchError && (_jsx(Div, { textSize: "sm", className: "mx-4 mt-4 border border-error/20", color: "error", surface: "danger-surface", padding: "inline", rounded: "lg", children: fetchError })), order && !loading && (_jsxs(Stack, { gap: "none", children: [_jsxs(Stack, { className: `flex-1 ${__O.yAuto}`, gap: "5", padding: "md", children: [_jsxs(Row, { align: "center", justify: "between", children: [_jsx(Badge, { variant: STATUS_BADGE_VARIANT[order.status?.toUpperCase()] ?? "default", children: order.status ?? "Unknown" }), _jsx(Text, { size: "sm", className: "text-[var(--appkit-color-text-secondary)]", children: toRelativeDate(order.createdAt) })] }), (order.items ?? []).length > 0 && (_jsxs(Div, { children: [_jsx(Text, { size: "sm", className: "text-[var(--appkit-color-text-primary)] mb-2", weight: "semibold", children: "Items" }), _jsx(Div, { className: "divide-y divide-[var(--appkit-color-border)] divide-[var(--appkit-color-border)] border border-[var(--appkit-color-border)]", rounded: "lg", children: (order.items ?? []).map((item, i) => (_jsxs(Row, { paddingY: "y-xs-tall", padding: "x-sm", align: "center", justify: "between", gap: "3", children: [_jsxs(Div, { className: "min-w-0", children: [_jsx(Text, { size: "sm", className: "truncate", weight: "medium", children: item.title ?? item.productId ?? "Item" }), _jsxs(Text, { size: "xs", className: "text-[var(--appkit-color-text-secondary)]", children: ["Qty: ", item.quantity ?? 1] })] }), _jsx(Text, { size: "sm", className: "shrink-0", weight: "medium", children: toCurrency(item.price ?? 0) })] }, i))) })] })), _jsxs(Row, { surface: "muted", padding: "inline", align: "center", justify: "between", rounded: "lg", children: [_jsx(Text, { size: "sm", weight: "semibold", children: "Total" }), _jsx(Text, { size: "sm", className: "text-[var(--appkit-color-primary)]", weight: "bold", children: toCurrency(order.totalAmount ?? 0) })] }), addrLine && (_jsxs(Div, { children: [_jsx(Text, { size: "sm", className: "mb-1", weight: "semibold", children: "Shipping address" }), _jsx(Text, { size: "sm", className: "text-[var(--appkit-color-text-secondary)]", children: [String(addr.fullName ?? ""), addrLine].filter(Boolean).join(" · ") })] })), order.paymentMethod && (_jsxs(Div, { children: [_jsx(Text, { size: "sm", className: "mb-1", weight: "semibold", children: "Payment" }), _jsx(Text, { size: "sm", className: "text-[var(--appkit-color-text-secondary)]", transform: "capitalize", children: order.paymentMethod })] })), order.emiEnabled && (_jsxs(Div, { className: "border-t border-[var(--appkit-color-border)]", padding: "t-md", children: [_jsxs(Row, { align: "center", justify: "between", className: "mb-2", children: [_jsxs(Text, { size: "sm", weight: "semibold", children: ["EMI plan ", order.emiTenureMonths ? `· ${order.emiTenureMonths} months` : ""] }), _jsx(Badge, { variant: order.emiComplete ? "success" : "warning", children: order.emiComplete ? "Fully paid" : "In progress" })] }), _jsxs(Row, { align: "center", justify: "between", className: "mb-2", children: [_jsx(Text, { size: "xs", color: "muted", children: "Token collected" }), _jsx(Text, { size: "xs", weight: "medium", children: toCurrency(order.emiTokenAmount ?? 0) })] }), _jsxs(Row, { align: "center", justify: "between", className: "mb-3", children: [_jsx(Text, { size: "xs", color: "muted", children: "Remaining balance" }), _jsx(Text, { size: "xs", weight: "medium", children: toCurrency(order.emiRemainingBalance ?? 0) })] }), _jsx(Div, { className: "divide-y divide-[var(--appkit-color-border)] border border-[var(--appkit-color-border)]", rounded: "lg", children: (order.emiInstallments ?? []).map((inst) => (_jsxs(Row, { paddingY: "y-xs-tall", padding: "x-sm", align: "center", justify: "between", gap: "3", children: [_jsxs(Div, { className: "min-w-0", children: [_jsxs(Text, { size: "sm", weight: "medium", children: ["Installment ", inst.index, " \u00B7 ", toCurrency(inst.amount)] }), _jsx(Text, { size: "xs", color: "muted", children: inst.status === "paid" && inst.paidAt
155
155
  ? `Paid ${toRelativeDate(inst.paidAt)}`
156
156
  : inst.dueDate
157
157
  ? `Due ${toRelativeDate(inst.dueDate)}`
@@ -236,7 +236,7 @@ export function SellerOrdersView({ orderDetailApiBase = SELLER_ENDPOINTS.ORDERS,
236
236
  key: "totalAmount",
237
237
  header: "Total",
238
238
  className: "w-28",
239
- render: (row) => _jsx(Span, { size: "sm", weight: "semibold", children: toRupees(row.totalAmount) }),
239
+ render: (row) => _jsx(Span, { size: "sm", weight: "semibold", children: toCurrency(row.totalAmount) }),
240
240
  },
241
241
  {
242
242
  key: "status",
@@ -8,8 +8,8 @@ const __P = {
8
8
  p3: "p-[var(--appkit-space-3)]",
9
9
  p4: "p-[var(--appkit-space-4)]",
10
10
  };
11
- function rupees(paise) {
12
- return `₹${(paise / 100).toLocaleString("en-IN", { minimumFractionDigits: 2 })}`;
11
+ function rupees(amount) {
12
+ return `₹${amount.toLocaleString("en-IN", { minimumFractionDigits: 2 })}`;
13
13
  }
14
14
  export function SellerPayoutRequestView({ payoutsApiBase = SELLER_ENDPOINTS.PAYOUTS, payoutSettingsApiBase = SELLER_ENDPOINTS.PAYOUT_SETTINGS, requestApiBase = SELLER_ENDPOINTS.PAYOUT_REQUEST, onRequested, }) {
15
15
  const [summary, setSummary] = useState(null);
@@ -51,7 +51,7 @@ export function SellerPayoutSettingsView({ apiBase = SELLER_ENDPOINTS.PAYOUT_SET
51
51
  businessType: res?.data?.taxInfo?.businessType ?? "",
52
52
  autoPayout: res?.data?.preferences?.autoPayout ?? true,
53
53
  minimumThreshold: res?.data?.preferences?.minimumThreshold
54
- ? String(res.data.preferences.minimumThreshold / 100)
54
+ ? String(res.data.preferences.minimumThreshold)
55
55
  : "",
56
56
  emiEnabled: res?.data?.emiEnabled ?? false,
57
57
  });
@@ -88,7 +88,7 @@ export function SellerPayoutSettingsView({ apiBase = SELLER_ENDPOINTS.PAYOUT_SET
88
88
  },
89
89
  preferences: {
90
90
  autoPayout: draft.autoPayout,
91
- minimumThreshold: Math.round(parseFloat(draft.minimumThreshold || "0") * 100),
91
+ minimumThreshold: Math.round(parseFloat(draft.minimumThreshold || "0") * 100) / 100,
92
92
  },
93
93
  };
94
94
  const res = await fetch(apiBase, {
@@ -7,7 +7,7 @@ import { FilterChipGroup, ListingLayout, RowActionMenu } from "../../../ui";
7
7
  import { SELLER_ENDPOINTS } from "../../../constants/api-endpoints";
8
8
  import { ADMIN_PAYOUT_STATUS_TABS } from "../../admin/constants/filter-tabs";
9
9
  import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
10
- import { toRecordArray, toRelativeDate, toRupees, toStringValue, } from "../../admin/hooks/useAdminListingData";
10
+ import { toRecordArray, toRelativeDate, toCurrency, toStringValue, } from "../../admin/hooks/useAdminListingData";
11
11
  import { DataListingView } from "../../admin/components/DataListingView";
12
12
  export function SellerPayoutsView({ children, onViewClick, onExportClick, ...props }) {
13
13
  if (React.Children.count(children) > 0) {
@@ -30,7 +30,7 @@ export function SellerPayoutsView({ children, onViewClick, onExportClick, ...pro
30
30
  id: toStringValue(item.id, `payout-${index}`),
31
31
  primary: `Payout #${toStringValue(item.payoutNumber ?? item.id, "Unknown")}`,
32
32
  secondary: [
33
- toRupees(item.amount ?? item.totalAmount),
33
+ toCurrency(item.amount ?? item.totalAmount),
34
34
  `Requested: ${toRelativeDate(item.requestedAt ?? item.createdAt)}`,
35
35
  ].join(" · "),
36
36
  status: toStringValue(item.status, "Pending"),
@@ -10,7 +10,7 @@ import { SELLER_ENDPOINTS } from "../../../constants/api-endpoints";
10
10
  import { SELLER_PRE_ORDER_STATUS_TABS } from "../../admin/constants/filter-tabs";
11
11
  import { ROUTES } from "../../../constants";
12
12
  import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
13
- import { toRecordArray, toRelativeDate, toRupees, toStringValue, } from "../../admin/hooks/useAdminListingData";
13
+ import { toRecordArray, toRelativeDate, toCurrency, toStringValue, } from "../../admin/hooks/useAdminListingData";
14
14
  import { DataListingView } from "../../admin/components/DataListingView";
15
15
  import { useActionDispatch } from "../../../react/hooks/use-action-dispatch";
16
16
  const PRE_ORDER_COLUMNS = [
@@ -98,7 +98,7 @@ export function SellerPreOrdersView({ children, onDelete, ...props }) {
98
98
  primary: toStringValue(item.title ?? item.name, "Untitled pre-order"),
99
99
  secondary: toStringValue(item.condition, ""),
100
100
  status: toStringValue(item.status, "draft"),
101
- price: priceRaw ? toRupees(priceRaw) : "—",
101
+ price: priceRaw ? toCurrency(priceRaw) : "—",
102
102
  deliveryDate: item.preOrderDeliveryDate
103
103
  ? toRelativeDate(item.preOrderDeliveryDate)
104
104
  : "TBA",
@@ -10,7 +10,7 @@ import { SELLER_ENDPOINTS } from "../../../constants/api-endpoints";
10
10
  import { SELLER_PRIZE_DRAW_STATUS_TABS } from "../../admin/constants/filter-tabs";
11
11
  import { ROUTES } from "../../../constants";
12
12
  import { ACTIONS } from "../../../_internal/shared/actions/action-registry";
13
- import { toRecordArray, toRelativeDate, toRupees, toStringValue, } from "../../admin/hooks/useAdminListingData";
13
+ import { toRecordArray, toRelativeDate, toCurrency, toStringValue, } from "../../admin/hooks/useAdminListingData";
14
14
  import { DataListingView } from "../../admin/components/DataListingView";
15
15
  import { useActionDispatch } from "../../../react/hooks/use-action-dispatch";
16
16
  const STATUS_VARIANT = {
@@ -95,7 +95,7 @@ export function SellerPrizeDrawsView({ children, onDelete, ...props }) {
95
95
  primary: toStringValue(item.title ?? item.name, "Untitled prize draw"),
96
96
  secondary: toStringValue(item.condition, ""),
97
97
  status: toStringValue(item.status, "draft"),
98
- entryFee: priceRaw ? toRupees(priceRaw) : "Free",
98
+ entryFee: priceRaw ? toCurrency(priceRaw) : "Free",
99
99
  drawDate: item.prizeRevealWindowEnd
100
100
  ? toRelativeDate(item.prizeRevealWindowEnd)
101
101
  : "TBA",
@@ -46,11 +46,11 @@ const PRODUCTION_STATUS_OPTIONS = [
46
46
  { value: "in_production", label: "In Production" },
47
47
  { value: "ready_to_ship", label: "Ready to Ship" },
48
48
  ];
49
- function toRupees(paise) {
50
- return paise != null ? String(Math.round(paise / 100)) : "";
49
+ function toRupeesString(price) {
50
+ return price != null ? String(price) : "";
51
51
  }
52
- function toPaise(rupeeStr) {
53
- return Math.round((parseFloat(rupeeStr) || 0) * 100);
52
+ function fromRupeesString(rupeeStr) {
53
+ return Math.round((parseFloat(rupeeStr) || 0) * 100) / 100;
54
54
  }
55
55
  // ── Step 1: Basic ─────────────────────────────────────────────────────────────
56
56
  function StepBasic({ values, onChange, renderCategorySelector, renderBrandSelector, renderTemplateSelector, }) {
@@ -87,7 +87,7 @@ function StepMedia({ values, onChange, storeSlug = "store", }) {
87
87
  }
88
88
  // ── Step 3: Auction Settings ───────────────────────────────────────────────
89
89
  function StepAuctionSettings({ values, onChange, }) {
90
- return (_jsxs(Stack, { gap: "md", children: [_jsx(Alert, { variant: "info", children: "Prices are in Indian Rupees (\u20B9). Enter the rupee value \u2014 no paise." }), _jsxs(FormGroup, { columns: 2, children: [_jsx(FormField, { name: "startingBid", label: "Starting Bid (\u20B9)", type: "number", value: toRupees(values.startingBid), onChange: (v) => onChange({ startingBid: toPaise(v) }), placeholder: "100" }), _jsx(FormField, { name: "auctionEndDate", label: "Auction End Date & Time", type: "datetime-local", value: values.auctionEndDate ?? "", onChange: (v) => onChange({ auctionEndDate: v }) })] }), _jsxs(FormGroup, { columns: 2, children: [_jsx(FormField, { name: "reservePrice", label: "Reserve Price (\u20B9, optional)", type: "number", value: toRupees(values.reservePrice), onChange: (v) => onChange({ reservePrice: v ? toPaise(v) : undefined }), placeholder: "0", helpText: "Minimum price below which you won't sell" }), _jsx(FormField, { name: "buyNowPrice", label: "Buy Now Price (\u20B9, optional)", type: "number", value: toRupees(values.buyNowPrice), onChange: (v) => onChange({ buyNowPrice: v ? toPaise(v) : undefined }), placeholder: "0", helpText: "Allows instant purchase before auction ends" })] }), _jsx(FormField, { name: "minBidIncrement", label: "Minimum Bid Increment (\u20B9)", type: "number", value: toRupees(values.minBidIncrement), onChange: (v) => onChange({ minBidIncrement: toPaise(v) }), placeholder: "50" }), _jsx(FormField, { name: "auctionShippingPaidBy", label: "Shipping paid by", type: "select", value: values.auctionShippingPaidBy ?? "winner", onChange: (v) => onChange({ auctionShippingPaidBy: v }), options: [
90
+ return (_jsxs(Stack, { gap: "md", children: [_jsx(Alert, { variant: "info", children: "Prices are in Indian Rupees (\u20B9). Enter the rupee value \u2014 no paise." }), _jsxs(FormGroup, { columns: 2, children: [_jsx(FormField, { name: "startingBid", label: "Starting Bid (\u20B9)", type: "number", value: toRupeesString(values.startingBid), onChange: (v) => onChange({ startingBid: fromRupeesString(v) }), placeholder: "100" }), _jsx(FormField, { name: "auctionEndDate", label: "Auction End Date & Time", type: "datetime-local", value: values.auctionEndDate ?? "", onChange: (v) => onChange({ auctionEndDate: v }) })] }), _jsxs(FormGroup, { columns: 2, children: [_jsx(FormField, { name: "reservePrice", label: "Reserve Price (\u20B9, optional)", type: "number", value: toRupeesString(values.reservePrice), onChange: (v) => onChange({ reservePrice: v ? fromRupeesString(v) : undefined }), placeholder: "0", helpText: "Minimum price below which you won't sell" }), _jsx(FormField, { name: "buyNowPrice", label: "Buy Now Price (\u20B9, optional)", type: "number", value: toRupeesString(values.buyNowPrice), onChange: (v) => onChange({ buyNowPrice: v ? fromRupeesString(v) : undefined }), placeholder: "0", helpText: "Allows instant purchase before auction ends" })] }), _jsx(FormField, { name: "minBidIncrement", label: "Minimum Bid Increment (\u20B9)", type: "number", value: toRupeesString(values.minBidIncrement), onChange: (v) => onChange({ minBidIncrement: fromRupeesString(v) }), placeholder: "50" }), _jsx(FormField, { name: "auctionShippingPaidBy", label: "Shipping paid by", type: "select", value: values.auctionShippingPaidBy ?? "winner", onChange: (v) => onChange({ auctionShippingPaidBy: v }), options: [
91
91
  { value: "winner", label: "Winner pays shipping" },
92
92
  { value: "seller", label: "Seller includes shipping" },
93
93
  ] }), _jsx(Toggle, { checked: !!values.autoExtendable, onChange: (checked) => onChange({ autoExtendable: checked }), label: "Auto-extend auction if bid placed in final minutes" }), values.autoExtendable && (_jsx(FormField, { name: "auctionExtensionMinutes", label: "Extension period (minutes)", type: "number", value: String(values.auctionExtensionMinutes ?? 5), onChange: (v) => onChange({ auctionExtensionMinutes: Number(v) || 5 }), placeholder: "5" }))] }));
@@ -126,7 +126,7 @@ const LIVE_TRANSPORT_OPTIONS = [
126
126
  { value: "specialist", label: "Third-party specialist transport" },
127
127
  ];
128
128
  function StepLiveItemSettings({ values, onChange, }) {
129
- return (_jsxs(Stack, { gap: "md", children: [_jsx(Alert, { variant: "warning", children: "Live animal / plant listings must comply with all applicable laws, CITES regulations, and local jurisdiction rules. LetItRip is not responsible for legal compliance \u2014 this is solely the seller's responsibility." }), _jsxs(FormGroup, { columns: 2, children: [_jsx(FormField, { name: "liveSpecies", label: "Species / Common Name", type: "text", value: values.liveSpecies ?? "", onChange: (v) => onChange({ liveSpecies: v }), placeholder: "e.g. Axolotl (Ambystoma mexicanum)" }), _jsx(FormField, { name: "liveAgeMonths", label: "Age (months, optional)", type: "number", value: String(values.liveAgeMonths ?? ""), onChange: (v) => onChange({ liveAgeMonths: v ? Number(v) : undefined }), placeholder: "e.g. 6" })] }), _jsx(FormField, { name: "liveSex", label: "Sex", type: "select", value: values.liveSex ?? "unknown", onChange: (v) => onChange({ liveSex: v }), options: LIVE_SEX_OPTIONS }), _jsx(FormField, { name: "liveCareInfo", label: "Care Instructions (optional)", type: "textarea", value: values.liveCareInfo ?? "", onChange: (v) => onChange({ liveCareInfo: v }), placeholder: "Diet, temperature, habitat requirements\u2026" }), _jsx(FormField, { name: "liveTransportMethod", label: "Transport Method", type: "select", value: values.liveTransportMethod ?? "in-person", onChange: (v) => onChange({ liveTransportMethod: v }), options: LIVE_TRANSPORT_OPTIONS }), values.liveTransportMethod !== "in-person" && (_jsx(FormField, { name: "liveHandlingFee", label: "Handling / Transport Fee (\u20B9, optional)", type: "number", value: toRupees(values.liveHandlingFee), onChange: (v) => onChange({ liveHandlingFee: v ? toPaise(v) : undefined }), placeholder: "0" })), _jsx(TagInput, { label: "Jurisdictions where sale is permitted", value: values.liveJurisdictions ?? [], onChange: (liveJurisdictions) => onChange({ liveJurisdictions }), placeholder: "e.g. Maharashtra, Karnataka", helperText: "List all Indian states / UTs where you can legally sell" }), _jsx(Toggle, { checked: !!values.liveCites, onChange: (checked) => onChange({ liveCites: checked }), label: "This species requires CITES documentation" })] }));
129
+ return (_jsxs(Stack, { gap: "md", children: [_jsx(Alert, { variant: "warning", children: "Live animal / plant listings must comply with all applicable laws, CITES regulations, and local jurisdiction rules. LetItRip is not responsible for legal compliance \u2014 this is solely the seller's responsibility." }), _jsxs(FormGroup, { columns: 2, children: [_jsx(FormField, { name: "liveSpecies", label: "Species / Common Name", type: "text", value: values.liveSpecies ?? "", onChange: (v) => onChange({ liveSpecies: v }), placeholder: "e.g. Axolotl (Ambystoma mexicanum)" }), _jsx(FormField, { name: "liveAgeMonths", label: "Age (months, optional)", type: "number", value: String(values.liveAgeMonths ?? ""), onChange: (v) => onChange({ liveAgeMonths: v ? Number(v) : undefined }), placeholder: "e.g. 6" })] }), _jsx(FormField, { name: "liveSex", label: "Sex", type: "select", value: values.liveSex ?? "unknown", onChange: (v) => onChange({ liveSex: v }), options: LIVE_SEX_OPTIONS }), _jsx(FormField, { name: "liveCareInfo", label: "Care Instructions (optional)", type: "textarea", value: values.liveCareInfo ?? "", onChange: (v) => onChange({ liveCareInfo: v }), placeholder: "Diet, temperature, habitat requirements\u2026" }), _jsx(FormField, { name: "liveTransportMethod", label: "Transport Method", type: "select", value: values.liveTransportMethod ?? "in-person", onChange: (v) => onChange({ liveTransportMethod: v }), options: LIVE_TRANSPORT_OPTIONS }), values.liveTransportMethod !== "in-person" && (_jsx(FormField, { name: "liveHandlingFee", label: "Handling / Transport Fee (\u20B9, optional)", type: "number", value: toRupeesString(values.liveHandlingFee), onChange: (v) => onChange({ liveHandlingFee: v ? fromRupeesString(v) : undefined }), placeholder: "0" })), _jsx(TagInput, { label: "Jurisdictions where sale is permitted", value: values.liveJurisdictions ?? [], onChange: (liveJurisdictions) => onChange({ liveJurisdictions }), placeholder: "e.g. Maharashtra, Karnataka", helperText: "List all Indian states / UTs where you can legally sell" }), _jsx(Toggle, { checked: !!values.liveCites, onChange: (checked) => onChange({ liveCites: checked }), label: "This species requires CITES documentation" })] }));
130
130
  }
131
131
  // ── Step: Print Meta (art / stickers) ───────────────────────────────────────
132
132
  // Shared by both "art" and "stickers" — identical field set, only the intro
@@ -180,7 +180,7 @@ const TYPE_SPECIFIC_STEPS = {
180
180
  function StepPricing({ values, onChange, listingType, }) {
181
181
  const listingPlugin = pluginForMode(listingType);
182
182
  const priceLabel = listingPlugin.priceLabel;
183
- return (_jsxs(Stack, { gap: "md", children: [_jsx(Alert, { variant: "info", children: "All prices in Indian Rupees (\u20B9)." }), _jsxs(FormGroup, { columns: 2, children: [_jsx(FormField, { name: "price", label: priceLabel, type: "number", value: toRupees(values.price), onChange: (v) => onChange({ price: toPaise(v) }), placeholder: "999" }), _jsx(FormField, { name: "compareAtPrice", label: "Compare-at Price (\u20B9, optional)", type: "number", value: toRupees(values.compareAtPrice), onChange: (v) => onChange({ compareAtPrice: v ? toPaise(v) : undefined }), placeholder: "1299", helpText: "Original price shown as strikethrough" })] }), listingPlugin.showsStockQuantity && (_jsx(FormField, { name: "stockQuantity", label: "Stock Quantity", type: "number", value: String(values.stockQuantity ?? ""), onChange: (v) => onChange({ stockQuantity: Number(v) }), placeholder: "1" })), _jsxs(FormGroup, { columns: 2, children: [_jsx(Toggle, { checked: !!values.featured, onChange: (checked) => onChange({ featured: checked }), label: "Mark as Featured" }), _jsx(Toggle, { checked: !!values.isNew, onChange: (checked) => onChange({ isNew: checked }), label: "Mark as New Arrival" })] })] }));
183
+ return (_jsxs(Stack, { gap: "md", children: [_jsx(Alert, { variant: "info", children: "All prices in Indian Rupees (\u20B9)." }), _jsxs(FormGroup, { columns: 2, children: [_jsx(FormField, { name: "price", label: priceLabel, type: "number", value: toRupeesString(values.price), onChange: (v) => onChange({ price: fromRupeesString(v) }), placeholder: "999" }), _jsx(FormField, { name: "compareAtPrice", label: "Compare-at Price (\u20B9, optional)", type: "number", value: toRupeesString(values.compareAtPrice), onChange: (v) => onChange({ compareAtPrice: v ? fromRupeesString(v) : undefined }), placeholder: "1299", helpText: "Original price shown as strikethrough" })] }), listingPlugin.showsStockQuantity && (_jsx(FormField, { name: "stockQuantity", label: "Stock Quantity", type: "number", value: String(values.stockQuantity ?? ""), onChange: (v) => onChange({ stockQuantity: Number(v) }), placeholder: "1" })), _jsxs(FormGroup, { columns: 2, children: [_jsx(Toggle, { checked: !!values.featured, onChange: (checked) => onChange({ featured: checked }), label: "Mark as Featured" }), _jsx(Toggle, { checked: !!values.isNew, onChange: (checked) => onChange({ isNew: checked }), label: "Mark as New Arrival" })] })] }));
184
184
  }
185
185
  // ── Step: Shipping ────────────────────────────────────────────────────────
186
186
  function StepShipping({ values, onChange, renderAddressSelector, }) {
@@ -190,7 +190,7 @@ function StepShipping({ values, onChange, renderAddressSelector, }) {
190
190
  ] }), renderAddressSelector ? (_jsxs(_Fragment, { children: [_jsx(Text, { className: "text-[var(--appkit-color-text)] mb-1", size: "sm", weight: "medium", children: "Pickup Address (optional)" }), renderAddressSelector({
191
191
  value: values.pickupAddressId ?? "",
192
192
  onChange: (v) => onChange({ pickupAddressId: v }),
193
- })] })) : (_jsx(StoreAddressSelectorCreate, { label: "Pickup Address (optional)", value: values.pickupAddressId ?? "", onChange: (id) => onChange({ pickupAddressId: id }) })), _jsx(Toggle, { checked: !!values.insurance, onChange: (checked) => onChange({ insurance: checked, insuranceCost: checked ? values.insuranceCost ?? 0 : undefined }), label: "Offer shipping insurance" }), values.insurance && (_jsx(FormField, { name: "insuranceCost", label: "Insurance Cost (\u20B9)", type: "number", value: toRupees(values.insuranceCost), onChange: (v) => onChange({ insuranceCost: toPaise(v) }), placeholder: "0" })), _jsx(FormField, { name: "gstRate", label: "GST Rate", type: "select", value: String(values.gstRate ?? 0), onChange: (v) => onChange({ gstRate: Number(v) }), options: [
193
+ })] })) : (_jsx(StoreAddressSelectorCreate, { label: "Pickup Address (optional)", value: values.pickupAddressId ?? "", onChange: (id) => onChange({ pickupAddressId: id }) })), _jsx(Toggle, { checked: !!values.insurance, onChange: (checked) => onChange({ insurance: checked, insuranceCost: checked ? values.insuranceCost ?? 0 : undefined }), label: "Offer shipping insurance" }), values.insurance && (_jsx(FormField, { name: "insuranceCost", label: "Insurance Cost (\u20B9)", type: "number", value: toRupeesString(values.insuranceCost), onChange: (v) => onChange({ insuranceCost: fromRupeesString(v) }), placeholder: "0" })), _jsx(FormField, { name: "gstRate", label: "GST Rate", type: "select", value: String(values.gstRate ?? 0), onChange: (v) => onChange({ gstRate: Number(v) }), options: [
194
194
  { value: "0", label: "Exempt (0%)" },
195
195
  { value: "5", label: "5%" },
196
196
  { value: "12", label: "12%" },