@mercurjs/admin 2.2.0-canary.14 → 2.2.0-canary.16

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 (205) hide show
  1. package/dist/{add-campaign-promotions-KOGSYV2W.js → add-campaign-promotions-RUUZFQVO.js} +3 -3
  2. package/dist/{adjust-inventory-3IQ657W2.js → adjust-inventory-INVLBRJB.js} +11 -11
  3. package/dist/{api-key-management-create-UD5V7TOU.js → api-key-management-create-JWXWNGWI.js} +3 -3
  4. package/dist/{api-key-management-detail-V22TYNOF.js → api-key-management-detail-ZRLG6YRB.js} +17 -16
  5. package/dist/{api-key-management-edit-4TLKJSAE.js → api-key-management-edit-C2LDCO4Q.js} +3 -3
  6. package/dist/{api-key-management-list-SZUSD6UI.js → api-key-management-list-FVOOICQR.js} +4 -4
  7. package/dist/{api-key-management-sales-channels-SKKS5BCC.js → api-key-management-sales-channels-E245THAC.js} +6 -5
  8. package/dist/{attribute-create-IKTP5XRS.js → attribute-create-UAFKYP5S.js} +12 -12
  9. package/dist/{attribute-detail-V4QI34FV.js → attribute-detail-AKA6OHN5.js} +11 -11
  10. package/dist/{attribute-list-EMPHZ32M.js → attribute-list-DRVOY6FY.js} +11 -11
  11. package/dist/breadcrumb-CO5DVI72.js +26 -0
  12. package/dist/breadcrumb-RYIHOYZE.js +27 -0
  13. package/dist/{campaign-detail-QY3AALUR.js → campaign-detail-A7ZM4Q7M.js} +15 -15
  14. package/dist/{categories-metadata-Z5JAWPAK.js → categories-metadata-CBWDAGCZ.js} +11 -11
  15. package/dist/{category-create-GMCJABRW.js → category-create-Q6IPW7UC.js} +3 -3
  16. package/dist/{category-detail-IP5EPIUR.js → category-detail-CIEHVR4M.js} +14 -14
  17. package/dist/{category-edit-GLE4NTFG.js → category-edit-TBMN4JAH.js} +2 -2
  18. package/dist/{category-list-SNVOQ64L.js → category-list-4YSI36HW.js} +4 -4
  19. package/dist/{category-organize-UY4M4N7S.js → category-organize-U6UO35Y3.js} +2 -2
  20. package/dist/{category-products-HWXJR7KR.js → category-products-U7CRTTJQ.js} +12 -12
  21. package/dist/{chunk-5UPOHLBD.js → chunk-22V5D3VA.js} +1 -1
  22. package/dist/{chunk-ABWW3JHS.js → chunk-3DMUKRIX.js} +4 -4
  23. package/dist/{chunk-M572YFDA.js → chunk-3EUF5GRT.js} +2 -2
  24. package/dist/{chunk-SUVFPJ4J.js → chunk-3KCXKGHX.js} +2 -2
  25. package/dist/{chunk-KWFKMS4M.js → chunk-3XSMZOVD.js} +4 -4
  26. package/dist/{chunk-O2XHQTBX.js → chunk-47W2JHOE.js} +3 -3
  27. package/dist/chunk-4FHHNYIV.js +280 -0
  28. package/dist/{chunk-NGDOLGBQ.js → chunk-4Q5JHL4V.js} +1 -1
  29. package/dist/{chunk-3HY4I76Q.js → chunk-5BF5JDWT.js} +2 -2
  30. package/dist/{chunk-ZXBCWDVM.js → chunk-5T45PYWI.js} +3 -3
  31. package/dist/{chunk-5FFZQPTT.js → chunk-6PTZK4CH.js} +1 -1
  32. package/dist/{chunk-HDOWEXDH.js → chunk-A2GVK4VZ.js} +2 -2
  33. package/dist/{chunk-ZO7A6VYP.js → chunk-AIG4MQL4.js} +3 -3
  34. package/dist/chunk-AWLDIHXR.js +204 -0
  35. package/dist/{chunk-D2VXOF46.js → chunk-B4K7H6DH.js} +2 -2
  36. package/dist/{chunk-EMQP2CNF.js → chunk-D77BYNTQ.js} +1 -1
  37. package/dist/{chunk-54RTJBYO.js → chunk-DGCPYCHU.js} +8 -63
  38. package/dist/{chunk-QLEGHL2Q.js → chunk-EB6ZFOTO.js} +2 -2
  39. package/dist/{chunk-W3FDZPPF.js → chunk-EOLSQKPV.js} +2 -2
  40. package/dist/{chunk-BPCU5QJE.js → chunk-FBD7WJPO.js} +1 -1
  41. package/dist/{chunk-NJP3DEE5.js → chunk-FJHAAROU.js} +1 -1
  42. package/dist/{chunk-N4GJRJF5.js → chunk-FJRNNDZS.js} +1 -1
  43. package/dist/{chunk-PASEZJC7.js → chunk-FYCIGKVG.js} +1 -1
  44. package/dist/{chunk-LGL4QSGB.js → chunk-GC5VN6RD.js} +1 -1
  45. package/dist/{chunk-4GFS57XI.js → chunk-HLJ24XVH.js} +1 -1
  46. package/dist/{chunk-72PLRAWM.js → chunk-IBX52HBP.js} +1 -1
  47. package/dist/{chunk-2OF7GB7J.js → chunk-IC3ZLUKY.js} +1 -1
  48. package/dist/{chunk-KK67WP4G.js → chunk-IEPH6A2W.js} +71 -247
  49. package/dist/{chunk-3XSC3NEG.js → chunk-J3AMUGGZ.js} +1 -1
  50. package/dist/{chunk-HQWN3A5L.js → chunk-JRLDKKCM.js} +2 -2
  51. package/dist/{chunk-R7ESTJHN.js → chunk-K2C42QAV.js} +2 -2
  52. package/dist/{chunk-DN2K5EAH.js → chunk-KYFWVLWO.js} +1 -1
  53. package/dist/{chunk-CKNQJPAG.js → chunk-LEHS6RED.js} +4 -2
  54. package/dist/{chunk-CYGCCNIC.js → chunk-LKW2KWJ4.js} +2 -2
  55. package/dist/{chunk-H3MAUKL7.js → chunk-M2E3PKA4.js} +183 -183
  56. package/dist/{chunk-SJGIQGEC.js → chunk-MHVZVF6O.js} +1 -1
  57. package/dist/{chunk-K4WU4PVL.js → chunk-NZOB3LPA.js} +1 -1
  58. package/dist/{chunk-QUPUWR42.js → chunk-OAQJNQYL.js} +1 -1
  59. package/dist/{chunk-6FHQCLHQ.js → chunk-OKWGPKVK.js} +1 -1
  60. package/dist/{chunk-3AO6X4CE.js → chunk-PE6JFXWU.js} +1 -1
  61. package/dist/{chunk-A62MTLPR.js → chunk-Q5WTOVZZ.js} +12 -2
  62. package/dist/{chunk-Z5T5EPLF.js → chunk-QKJGSZI2.js} +1 -1
  63. package/dist/{chunk-DJWOIRLV.js → chunk-RUSMGNQ6.js} +1 -1
  64. package/dist/{chunk-MVDPDVMI.js → chunk-RWRL4AXD.js} +4 -4
  65. package/dist/{chunk-JSH7JEKY.js → chunk-RZ5SFALB.js} +2 -2
  66. package/dist/chunk-S6A4FVM2.js +170 -0
  67. package/dist/{chunk-7KZ5X5SU.js → chunk-SEQJOCTT.js} +3 -3
  68. package/dist/{chunk-W6V2L2FX.js → chunk-SNCZQATG.js} +2 -2
  69. package/dist/{chunk-EBYWGIOR.js → chunk-T4GL73RP.js} +1 -1
  70. package/dist/{chunk-N7OVIX55.js → chunk-TH6W26RC.js} +1 -1
  71. package/dist/{chunk-4PU6GDCE.js → chunk-TWCYZF6X.js} +1 -1
  72. package/dist/chunk-UKLRBS4W.js +61 -0
  73. package/dist/{chunk-WTK4MLMF.js → chunk-UVYWKQJF.js} +1 -1
  74. package/dist/{chunk-PXKDYD3M.js → chunk-VZ7GNMGX.js} +1 -1
  75. package/dist/{chunk-VY7PT4SI.js → chunk-W6J4SJ3Y.js} +1 -1
  76. package/dist/{chunk-TE4IF3MM.js → chunk-WJGABDWC.js} +1 -1
  77. package/dist/{chunk-VT5E7OMM.js → chunk-WUGV75DM.js} +1 -1
  78. package/dist/{chunk-P5XVG4PY.js → chunk-XGUUM3S6.js} +1 -1
  79. package/dist/{chunk-7MMLCMV3.js → chunk-XVSJKCCQ.js} +1 -1
  80. package/dist/{chunk-BQ6ZDY6L.js → chunk-YM523XTD.js} +3 -3
  81. package/dist/{chunk-453BC56K.js → chunk-Z2UBJXTU.js} +1 -1
  82. package/dist/{chunk-EGTH3PUK.js → chunk-ZB4TESPP.js} +2 -2
  83. package/dist/{collection-add-products-ABWXUOFD.js → collection-add-products-G6BQPBXA.js} +12 -12
  84. package/dist/{collection-create-BRMP6SIZ.js → collection-create-O3RG3BFE.js} +2 -2
  85. package/dist/{collection-detail-AMGR2B5N.js → collection-detail-TR7TDQZG.js} +13 -13
  86. package/dist/{collection-edit-YLWUEU4C.js → collection-edit-EKPMNFCK.js} +2 -2
  87. package/dist/{collection-list-6HZE43AC.js → collection-list-FOWSOTS7.js} +14 -14
  88. package/dist/{collection-metadata-JS5QP3GD.js → collection-metadata-UEXKSJRF.js} +11 -11
  89. package/dist/{commission-rate-create-PSPSJZR5.js → commission-rate-create-UX3IFSPP.js} +14 -14
  90. package/dist/{commission-rate-detail-U72E4ZIO.js → commission-rate-detail-VGYTGWLH.js} +12 -12
  91. package/dist/{commission-rate-edit-7NJPABVA.js → commission-rate-edit-FTBBWE7F.js} +14 -14
  92. package/dist/{customer-detail-2RWBN6C4.js → customer-detail-5XGZ2K3H.js} +13 -13
  93. package/dist/{customer-group-detail-ED66F7JM.js → customer-group-detail-JX3BEYFG.js} +11 -11
  94. package/dist/{customer-group-list-6YUFKBHH.js → customer-group-list-F5TFLDVH.js} +11 -11
  95. package/dist/{customer-group-metadata-VQUOWR3P.js → customer-group-metadata-MVD7V6DA.js} +11 -11
  96. package/dist/{customer-metadata-47AVJXRI.js → customer-metadata-LW6GL25F.js} +11 -11
  97. package/dist/{customers-add-customer-group-HI7J7YKN.js → customers-add-customer-group-NGPLFWCL.js} +11 -11
  98. package/dist/{edit-inventory-item-MBPSBJL4.js → edit-inventory-item-6Q2TVHKC.js} +11 -11
  99. package/dist/{edit-inventory-item-attributes-RVYWOFAC.js → edit-inventory-item-attributes-SZZ65XJ5.js} +11 -11
  100. package/dist/{edit-reservation-7BLGYXCJ.js → edit-reservation-TUCZRTBN.js} +2 -2
  101. package/dist/{edit-rules-ZWDKM5M3.js → edit-rules-WJEEV2XB.js} +11 -11
  102. package/dist/index.js +211 -179
  103. package/dist/{inventory-create-Q4VBPXSG.js → inventory-create-ZJDSLZ5R.js} +12 -12
  104. package/dist/{inventory-detail-6CKO3A3Y.js → inventory-detail-LSAJ3ZB5.js} +12 -12
  105. package/dist/{inventory-list-2JGX6BRI.js → inventory-list-SCRYOBZV.js} +2 -2
  106. package/dist/{inventory-metadata-COGGE5ZR.js → inventory-metadata-HDLZ6SNH.js} +11 -11
  107. package/dist/{inventory-stock-2QIKS7LE.js → inventory-stock-EHZJMHOY.js} +11 -11
  108. package/dist/loader-S77URTQS.js +32 -0
  109. package/dist/loader-XPJWDZU3.js +32 -0
  110. package/dist/{location-detail-HOCNTQ7K.js → location-detail-PBCP7BBV.js} +12 -12
  111. package/dist/{location-fulfillment-providers-YQ2XFPAJ.js → location-fulfillment-providers-NVVLRKJT.js} +13 -13
  112. package/dist/{location-list-KQQRH4MT.js → location-list-DM4WU57J.js} +11 -11
  113. package/dist/{location-sales-channels-DRIS6AUX.js → location-sales-channels-T7ZUQ3PA.js} +5 -4
  114. package/dist/{location-service-zone-shipping-option-create-6GYLJHEC.js → location-service-zone-shipping-option-create-VVD2GMM3.js} +11 -11
  115. package/dist/{login-N7CVSQNG.js → login-LTASZXSR.js} +11 -11
  116. package/dist/{manage-locations-TKLOHP3D.js → manage-locations-WW35SVOX.js} +1 -1
  117. package/dist/{marketplace-detail-K52ALYGT.js → marketplace-detail-GSPPUVR7.js} +12 -12
  118. package/dist/{marketplace-metadata-ZSX3IQF4.js → marketplace-metadata-35DDUX2Z.js} +11 -11
  119. package/dist/offer-detail-page-2DG3W7VG.js +572 -0
  120. package/dist/offer-variant-detail-page-U4LDYFE3.js +143 -0
  121. package/dist/{offers-UBD6NICA.js → offers-D2QQQD2F.js} +284 -123
  122. package/dist/{order-create-edit-HEOYCYZO.js → order-create-edit-QBVSHRFO.js} +3 -3
  123. package/dist/{order-create-exchange-L56VKQBL.js → order-create-exchange-67R63776.js} +11 -11
  124. package/dist/{order-create-refund-UTJKJ3AJ.js → order-create-refund-4CDCQGXT.js} +11 -11
  125. package/dist/{order-detail-KAB4MV7X.js → order-detail-A2WC2OZU.js} +13 -13
  126. package/dist/{order-edit-billing-address-RUURVISC.js → order-edit-billing-address-WFUOLHWY.js} +12 -12
  127. package/dist/{order-edit-email-OO7AMRHC.js → order-edit-email-CPIRJACP.js} +11 -11
  128. package/dist/{order-edit-shipping-address-BRRXUE76.js → order-edit-shipping-address-FCEL2URJ.js} +11 -11
  129. package/dist/{order-list-S3AJC6L5.js → order-list-QR3ZVI4U.js} +3 -3
  130. package/dist/{order-metadata-OHK6TPAO.js → order-metadata-NFTVCHFD.js} +11 -11
  131. package/dist/{order-request-transfer-YLMXC7NL.js → order-request-transfer-I6VIJK4L.js} +11 -11
  132. package/dist/pages/index.d.ts +2 -1
  133. package/dist/pages/index.js +90 -88
  134. package/dist/{price-list-configuration-Q5H22ZE2.js → price-list-configuration-I45NPXOI.js} +2 -2
  135. package/dist/{price-list-create-OYAVGRM5.js → price-list-create-QAEE6CAK.js} +13 -13
  136. package/dist/{price-list-detail-Q4GFFUFG.js → price-list-detail-77FAEXXO.js} +14 -14
  137. package/dist/{price-list-edit-YY4SXEI3.js → price-list-edit-A3SLXCYW.js} +2 -2
  138. package/dist/{price-list-list-OIOY43TF.js → price-list-list-AX7ZW6LL.js} +4 -4
  139. package/dist/{price-list-prices-add-KONZVSVQ.js → price-list-prices-add-TCW6S4Z3.js} +13 -13
  140. package/dist/{price-list-prices-edit-SMUKU7Q6.js → price-list-prices-edit-IGHGQ7DO.js} +11 -11
  141. package/dist/{product-add-existing-attributes-KOPVWK5Q.js → product-add-existing-attributes-BWEKWIWW.js} +11 -11
  142. package/dist/{product-attributes-C3KHQF2I.js → product-attributes-3VQAHGYZ.js} +1 -1
  143. package/dist/{product-bulk-edit-J3CMBZN2.js → product-bulk-edit-PLNZZO3C.js} +1 -1
  144. package/dist/{product-create-KTIQ3UAQ.js → product-create-AGSEC63C.js} +15 -15
  145. package/dist/{product-create-attribute-XARMC6FJ.js → product-create-attribute-PFIEDJNX.js} +1 -1
  146. package/dist/{product-create-variant-6VUKYLWE.js → product-create-variant-PP6PQF4T.js} +2 -2
  147. package/dist/{product-detail-UB3EZRDE.js → product-detail-CNVETME5.js} +15 -13
  148. package/dist/{product-edit-F4CKOIUO.js → product-edit-LBKIDCQM.js} +1 -1
  149. package/dist/{product-edit-attribute-LG2ZM6HQ.js → product-edit-attribute-RVNIUPIO.js} +1 -1
  150. package/dist/{product-list-2BWYAATR.js → product-list-KM37QJ6F.js} +13 -13
  151. package/dist/{product-media-EUDMCJ75.js → product-media-UWEOWTJT.js} +3 -3
  152. package/dist/{product-metadata-5WVNFCRL.js → product-metadata-6E6AZTHQ.js} +11 -11
  153. package/dist/{product-organization-BFWDCHP4.js → product-organization-2ZNTDHWP.js} +3 -3
  154. package/dist/{product-sales-channels-2J5Q65JS.js → product-sales-channels-7QCAABL4.js} +5 -4
  155. package/dist/{product-shipping-profile-WDLKA2SN.js → product-shipping-profile-UOQWHIO2.js} +1 -1
  156. package/dist/{product-tag-create-KQSVCWMC.js → product-tag-create-RDJNNVKB.js} +11 -11
  157. package/dist/{product-tag-detail-CWDAY7F3.js → product-tag-detail-R6UFJDCW.js} +14 -14
  158. package/dist/{product-tag-edit-B4SIZCUK.js → product-tag-edit-NQPOV5FR.js} +11 -11
  159. package/dist/{product-tag-list-2OK3OCMZ.js → product-tag-list-NFPQVVMO.js} +13 -13
  160. package/dist/{product-tag-metadata-MASTMIKE.js → product-tag-metadata-MYCCUFNT.js} +11 -11
  161. package/dist/{product-type-detail-3X7ZTZJN.js → product-type-detail-XJPSQDL2.js} +13 -13
  162. package/dist/{product-type-metadata-6BKTQHQC.js → product-type-metadata-IMMCIWOD.js} +11 -11
  163. package/dist/{product-variant-detail-PQ4RKPZT.js → product-variant-detail-VCMC4BZP.js} +12 -12
  164. package/dist/{product-variant-edit-TLF475SH.js → product-variant-edit-OXNWRFST.js} +11 -11
  165. package/dist/{product-variant-metadata-3M72B3PM.js → product-variant-metadata-ZIJG2HNS.js} +11 -11
  166. package/dist/{promotion-create-OKZBUSJD.js → promotion-create-CBOD7FVH.js} +11 -11
  167. package/dist/{promotion-detail-MMNEDRXD.js → promotion-detail-NSOGXQAY.js} +14 -14
  168. package/dist/{promotion-list-DHWW7FTI.js → promotion-list-7C3SQCSO.js} +4 -4
  169. package/dist/{refund-reason-create-N4DZ4UHS.js → refund-reason-create-V52L4U5V.js} +11 -11
  170. package/dist/{refund-reason-edit-OAHRDKXW.js → refund-reason-edit-3U6REVYW.js} +11 -11
  171. package/dist/{refund-reason-list-3BTQCIYE.js → refund-reason-list-SWU4B2ED.js} +11 -11
  172. package/dist/{region-metadata-BJSTTZFL.js → region-metadata-5YVOM47I.js} +11 -11
  173. package/dist/{reservation-create-TXYAY3KF.js → reservation-create-TNZQP7XW.js} +2 -2
  174. package/dist/{reservation-detail-CEENG76D.js → reservation-detail-BLPISKPA.js} +12 -12
  175. package/dist/{reservation-list-SORWYHI4.js → reservation-list-3OKWSHWH.js} +3 -3
  176. package/dist/{reservation-metadata-G3QBZF4K.js → reservation-metadata-VXWNURF4.js} +11 -11
  177. package/dist/{reset-password-QGQ4GAHK.js → reset-password-6CAYNSJ6.js} +1 -1
  178. package/dist/{sales-channel-add-products-3VZ5SLLP.js → sales-channel-add-products-LUKSBD5K.js} +12 -12
  179. package/dist/{sales-channel-create-XBR3QESI.js → sales-channel-create-O5KGQ6DU.js} +2 -2
  180. package/dist/{sales-channel-detail-PHRSKCNM.js → sales-channel-detail-6JPHP4FZ.js} +13 -13
  181. package/dist/{sales-channel-edit-ILBZBQP4.js → sales-channel-edit-CG3YUSYW.js} +2 -2
  182. package/dist/{sales-channel-list-E647FXSZ.js → sales-channel-list-D673ONK2.js} +15 -14
  183. package/dist/{sales-channel-metadata-HVPGS756.js → sales-channel-metadata-CHYCJOLY.js} +11 -11
  184. package/dist/{shipping-option-type-create-3ZKT7WAC.js → shipping-option-type-create-P2BCCARC.js} +11 -11
  185. package/dist/{shipping-option-type-detail-IYXWAK7F.js → shipping-option-type-detail-NVSXILP4.js} +11 -11
  186. package/dist/{shipping-option-type-edit-QRXYNNRW.js → shipping-option-type-edit-Z4ZLUANO.js} +11 -11
  187. package/dist/{shipping-option-type-list-MLIDCA3L.js → shipping-option-type-list-OUKJZJ6R.js} +11 -11
  188. package/dist/{shipping-profile-metadata-T4HPNTLH.js → shipping-profile-metadata-HS7TYNEX.js} +13 -13
  189. package/dist/{store-create-KFLNOD73.js → store-create-PHLTX6J3.js} +11 -11
  190. package/dist/{store-details-E347PHAN.js → store-details-V3NMV665.js} +14 -14
  191. package/dist/{store-edit-Y6NLBIOP.js → store-edit-CUVQLEFL.js} +2 -2
  192. package/dist/{store-list-S2L44OLB.js → store-list-WV6XHGLU.js} +13 -13
  193. package/dist/{tax-region-create-MIDQXQS4.js → tax-region-create-7UCI2QDJ.js} +12 -12
  194. package/dist/{tax-region-detail-AC7B3G57.js → tax-region-detail-OKEK6WNJ.js} +13 -13
  195. package/dist/{tax-region-edit-5CORTHTC.js → tax-region-edit-7O33SWZQ.js} +11 -11
  196. package/dist/{tax-region-metadata-QQZIQPAD.js → tax-region-metadata-6LMVFCFW.js} +11 -11
  197. package/dist/{tax-region-province-detail-2MGX7LEO.js → tax-region-province-detail-WHO3RLUX.js} +13 -13
  198. package/dist/{tax-region-tax-override-create-IONGD4TG.js → tax-region-tax-override-create-3FBV7DND.js} +14 -14
  199. package/dist/{tax-region-tax-override-edit-RIT6YRVK.js → tax-region-tax-override-edit-RZPP66BY.js} +14 -14
  200. package/dist/{user-detail-MMVBN3AE.js → user-detail-6CCQQPFR.js} +1 -1
  201. package/dist/{user-metadata-OZLU3Y2X.js → user-metadata-OYX24QL7.js} +11 -11
  202. package/package.json +1 -1
  203. package/dist/[id]-BAPEFPAO.js +0 -505
  204. package/dist/chunk-PT5PLV3N.js +0 -78
  205. package/dist/loader-OU7SKXOD.js +0 -28
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MarketplaceDetailPage
3
- } from "./chunk-5FFZQPTT.js";
3
+ } from "./chunk-6PTZK4CH.js";
4
4
  import "./chunk-64XMEZ5A.js";
5
5
  import "./chunk-JHIMVLB2.js";
6
6
  import "./chunk-DB6ANJBO.js";
@@ -17,29 +17,29 @@ import "./chunk-XQNVC4Q7.js";
17
17
  import "./chunk-THHRRYRS.js";
18
18
  import "./chunk-LJDGVBOQ.js";
19
19
  import "./chunk-OH4AABUT.js";
20
+ import "./chunk-FJHAAROU.js";
20
21
  import "./chunk-AEMDNTW5.js";
21
22
  import "./chunk-LYD3C73Z.js";
22
- import "./chunk-46M463BR.js";
23
- import "./chunk-NJP3DEE5.js";
24
23
  import "./chunk-533GMKEG.js";
24
+ import "./chunk-46M463BR.js";
25
25
  import "./chunk-YFRC6GEN.js";
26
+ import "./chunk-N6SI4IIT.js";
27
+ import "./chunk-JPNPTILP.js";
26
28
  import "./chunk-DAXXLQKB.js";
27
29
  import "./chunk-OHOWEMHO.js";
28
- import "./chunk-JPNPTILP.js";
29
- import "./chunk-ESPLVOFC.js";
30
30
  import "./chunk-GKGLVDDV.js";
31
- import "./chunk-N6SI4IIT.js";
31
+ import "./chunk-ESPLVOFC.js";
32
32
  import "./chunk-WJJXUXSO.js";
33
33
  import "./chunk-LAPEZATU.js";
34
- import "./chunk-453BC56K.js";
35
- import "./chunk-Z5T5EPLF.js";
34
+ import "./chunk-Z2UBJXTU.js";
35
+ import "./chunk-QKJGSZI2.js";
36
36
  import {
37
37
  retrieveActiveStore,
38
38
  storeQueryKeys
39
39
  } from "./chunk-FXWKGNRV.js";
40
40
  import "./chunk-VDKOJ5WD.js";
41
41
  import "./chunk-ZN7LWXVC.js";
42
- import "./chunk-P5XVG4PY.js";
42
+ import "./chunk-XGUUM3S6.js";
43
43
  import "./chunk-VYMODH6P.js";
44
44
  import "./chunk-LEG67A2R.js";
45
45
  import "./chunk-PRBE5CM3.js";
@@ -47,12 +47,12 @@ import "./chunk-5TRY5IMZ.js";
47
47
  import "./chunk-EPHVGD5Z.js";
48
48
  import "./chunk-VT6QIVZW.js";
49
49
  import "./chunk-BDGZ4EQO.js";
50
- import "./chunk-6FHQCLHQ.js";
51
- import "./chunk-DN2K5EAH.js";
50
+ import "./chunk-OKWGPKVK.js";
51
+ import "./chunk-KYFWVLWO.js";
52
52
  import "./chunk-LAVHRER2.js";
53
53
  import "./chunk-Y7QKP6QU.js";
54
54
  import "./chunk-INNFZYX2.js";
55
- import "./chunk-H3MAUKL7.js";
55
+ import "./chunk-M2E3PKA4.js";
56
56
  import {
57
57
  queryClient
58
58
  } from "./chunk-RHKRREUU.js";
@@ -10,41 +10,41 @@ import {
10
10
  import "./chunk-3QSRE5LS.js";
11
11
  import "./chunk-LJDGVBOQ.js";
12
12
  import "./chunk-OH4AABUT.js";
13
+ import "./chunk-FJHAAROU.js";
13
14
  import "./chunk-AEMDNTW5.js";
14
15
  import "./chunk-LYD3C73Z.js";
15
- import "./chunk-46M463BR.js";
16
- import "./chunk-NJP3DEE5.js";
17
16
  import "./chunk-533GMKEG.js";
17
+ import "./chunk-46M463BR.js";
18
18
  import "./chunk-YFRC6GEN.js";
19
+ import "./chunk-N6SI4IIT.js";
20
+ import "./chunk-JPNPTILP.js";
19
21
  import "./chunk-DAXXLQKB.js";
20
22
  import "./chunk-OHOWEMHO.js";
21
- import "./chunk-JPNPTILP.js";
22
- import "./chunk-ESPLVOFC.js";
23
23
  import "./chunk-GKGLVDDV.js";
24
- import "./chunk-N6SI4IIT.js";
24
+ import "./chunk-ESPLVOFC.js";
25
25
  import "./chunk-WJJXUXSO.js";
26
26
  import "./chunk-LAPEZATU.js";
27
- import "./chunk-453BC56K.js";
28
- import "./chunk-Z5T5EPLF.js";
27
+ import "./chunk-Z2UBJXTU.js";
28
+ import "./chunk-QKJGSZI2.js";
29
29
  import {
30
30
  useStore,
31
31
  useUpdateStore
32
32
  } from "./chunk-FXWKGNRV.js";
33
33
  import "./chunk-VDKOJ5WD.js";
34
34
  import "./chunk-ZN7LWXVC.js";
35
- import "./chunk-P5XVG4PY.js";
35
+ import "./chunk-XGUUM3S6.js";
36
36
  import "./chunk-VYMODH6P.js";
37
37
  import "./chunk-LEG67A2R.js";
38
38
  import "./chunk-PRBE5CM3.js";
39
39
  import "./chunk-5TRY5IMZ.js";
40
40
  import "./chunk-EPHVGD5Z.js";
41
41
  import "./chunk-VT6QIVZW.js";
42
- import "./chunk-6FHQCLHQ.js";
43
- import "./chunk-DN2K5EAH.js";
42
+ import "./chunk-OKWGPKVK.js";
43
+ import "./chunk-KYFWVLWO.js";
44
44
  import "./chunk-LAVHRER2.js";
45
45
  import "./chunk-Y7QKP6QU.js";
46
46
  import "./chunk-INNFZYX2.js";
47
- import "./chunk-H3MAUKL7.js";
47
+ import "./chunk-M2E3PKA4.js";
48
48
  import "./chunk-RHKRREUU.js";
49
49
  import "./chunk-ZA2KFUFR.js";
50
50
  import "./chunk-ZBWL72TB.js";
@@ -0,0 +1,572 @@
1
+ import "./chunk-4FHHNYIV.js";
2
+ import {
3
+ OFFER_PRODUCT_DETAIL_FIELDS
4
+ } from "./chunk-S6A4FVM2.js";
5
+ import {
6
+ useBulkDeleteOffers
7
+ } from "./chunk-UIVWOKWT.js";
8
+ import "./chunk-PXYDR7WQ.js";
9
+ import "./chunk-PHOCVOZ5.js";
10
+ import "./chunk-FQERBIVS.js";
11
+ import "./chunk-NQEXDLYH.js";
12
+ import "./chunk-YN3FGNJM.js";
13
+ import "./chunk-KAZ5BYTQ.js";
14
+ import "./chunk-634XVU3D.js";
15
+ import "./chunk-IQPN4PZJ.js";
16
+ import {
17
+ ProductMediaSection
18
+ } from "./chunk-AWLDIHXR.js";
19
+ import "./chunk-FI474ADU.js";
20
+ import {
21
+ SectionRow
22
+ } from "./chunk-3XPXUIK3.js";
23
+ import {
24
+ useDataTableDateFilters
25
+ } from "./chunk-DGCPYCHU.js";
26
+ import {
27
+ TwoColumnPage
28
+ } from "./chunk-E74OUNA3.js";
29
+ import {
30
+ Thumbnail
31
+ } from "./chunk-WIYFXWRI.js";
32
+ import "./chunk-H6MYB7GB.js";
33
+ import {
34
+ useDate
35
+ } from "./chunk-UZWFZMOX.js";
36
+ import "./chunk-XQNVC4Q7.js";
37
+ import {
38
+ DataTable
39
+ } from "./chunk-C4XKPQ6T.js";
40
+ import {
41
+ useQueryParams
42
+ } from "./chunk-THHRRYRS.js";
43
+ import {
44
+ ActionMenu
45
+ } from "./chunk-BDGZ4EQO.js";
46
+ import "./chunk-LAVHRER2.js";
47
+ import "./chunk-Y7QKP6QU.js";
48
+ import {
49
+ TwoColumnPageSkeleton
50
+ } from "./chunk-INNFZYX2.js";
51
+ import {
52
+ useProduct
53
+ } from "./chunk-M2E3PKA4.js";
54
+ import "./chunk-RHKRREUU.js";
55
+ import "./chunk-ZA2KFUFR.js";
56
+ import "./chunk-ZBWL72TB.js";
57
+ import "./chunk-NBMM2TZK.js";
58
+
59
+ // src/pages/offers/[id]/offer-detail-page.tsx
60
+ import { Children } from "react";
61
+ import { useLoaderData, useParams } from "react-router-dom";
62
+
63
+ // src/pages/offers/[id]/_components/offer-detail-general-section.tsx
64
+ import { Trash } from "@medusajs/icons";
65
+ import { Container, Heading, StatusBadge, toast, usePrompt } from "@medusajs/ui";
66
+ import { useTranslation } from "react-i18next";
67
+ import { useNavigate } from "react-router-dom";
68
+ import { jsx, jsxs } from "react/jsx-runtime";
69
+ var productStatusColor = (status) => {
70
+ switch (status) {
71
+ case "published":
72
+ return "green";
73
+ case "rejected":
74
+ return "red";
75
+ case "proposed":
76
+ return "orange";
77
+ default:
78
+ return "grey";
79
+ }
80
+ };
81
+ var OfferDetailGeneralSection = ({
82
+ product
83
+ }) => {
84
+ const { t } = useTranslation();
85
+ const prompt = usePrompt();
86
+ const navigate = useNavigate();
87
+ const { mutateAsync: bulkDelete } = useBulkDeleteOffers();
88
+ const offerIds = (product.variants ?? []).flatMap(
89
+ (v) => (v.offers ?? []).map((o) => o.id)
90
+ );
91
+ const handleDelete = async () => {
92
+ if (!offerIds.length) {
93
+ return;
94
+ }
95
+ const confirmed = await prompt({
96
+ title: t("general.areYouSure"),
97
+ description: t("offers.bulkDelete.description", { count: offerIds.length }),
98
+ confirmText: t("actions.delete"),
99
+ cancelText: t("actions.cancel"),
100
+ variant: "danger"
101
+ });
102
+ if (!confirmed) {
103
+ return;
104
+ }
105
+ const result = await bulkDelete(offerIds);
106
+ if (result.failed.length === 0) {
107
+ toast.success(
108
+ t("offers.bulkDelete.successToast", { count: result.succeeded.length })
109
+ );
110
+ navigate("/offers");
111
+ } else {
112
+ toast.warning(
113
+ t("offers.bulkDelete.errorToast", {
114
+ message: `${result.succeeded.length}/${offerIds.length} succeeded`
115
+ })
116
+ );
117
+ }
118
+ };
119
+ return /* @__PURE__ */ jsxs(Container, { className: "divide-y p-0", children: [
120
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [
121
+ /* @__PURE__ */ jsx(Heading, { children: product.title }),
122
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-x-4", children: [
123
+ product.status && /* @__PURE__ */ jsx(StatusBadge, { color: productStatusColor(product.status), children: t(`products.productStatus.${product.status}`) }),
124
+ /* @__PURE__ */ jsx(
125
+ ActionMenu,
126
+ {
127
+ groups: [
128
+ {
129
+ actions: [
130
+ {
131
+ label: t("actions.delete"),
132
+ onClick: handleDelete,
133
+ icon: /* @__PURE__ */ jsx(Trash, {}),
134
+ disabled: offerIds.length === 0
135
+ }
136
+ ]
137
+ }
138
+ ]
139
+ }
140
+ )
141
+ ] })
142
+ ] }),
143
+ /* @__PURE__ */ jsx(
144
+ SectionRow,
145
+ {
146
+ title: t("fields.description"),
147
+ value: product.description || "-"
148
+ }
149
+ ),
150
+ /* @__PURE__ */ jsx(SectionRow, { title: t("fields.subtitle"), value: product.subtitle || "-" }),
151
+ /* @__PURE__ */ jsx(
152
+ SectionRow,
153
+ {
154
+ title: t("fields.handle"),
155
+ value: product.handle ? `/${product.handle}` : "-"
156
+ }
157
+ ),
158
+ /* @__PURE__ */ jsx(
159
+ SectionRow,
160
+ {
161
+ title: t("fields.discountable"),
162
+ value: product.discountable ? t("fields.true") : t("fields.false")
163
+ }
164
+ )
165
+ ] });
166
+ };
167
+
168
+ // src/pages/offers/[id]/_components/offer-variants-section.tsx
169
+ import { Component, Trash as Trash2 } from "@medusajs/icons";
170
+ import {
171
+ Badge,
172
+ clx,
173
+ Container as Container2,
174
+ createDataTableColumnHelper,
175
+ Heading as Heading2,
176
+ toast as toast2,
177
+ Tooltip,
178
+ usePrompt as usePrompt2
179
+ } from "@medusajs/ui";
180
+ import { useCallback, useMemo } from "react";
181
+ import { useTranslation as useTranslation2 } from "react-i18next";
182
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
183
+ var PAGE_SIZE = 10;
184
+ var PREFIX = "ov";
185
+ var skuOf = (row) => row.offer.sku ?? row.variant.sku ?? "";
186
+ var inventoryOf = (offer) => {
187
+ const links = offer.inventory_item_link ?? [];
188
+ let available = 0;
189
+ const locations = /* @__PURE__ */ new Set();
190
+ for (const link of links) {
191
+ for (const level of link.inventory_item?.location_levels ?? []) {
192
+ available += level.stocked_quantity ?? 0;
193
+ if (level.location_id) {
194
+ locations.add(level.location_id);
195
+ }
196
+ }
197
+ }
198
+ return {
199
+ hasItems: links.length > 0,
200
+ // More than one backing inventory item ⇒ the offer is an inventory kit.
201
+ isKit: links.length > 1,
202
+ available,
203
+ locationCount: locations.size
204
+ };
205
+ };
206
+ var matchesDateFilter = (value, filter) => {
207
+ if (!value) {
208
+ return false;
209
+ }
210
+ const time = new Date(value).getTime();
211
+ if (Number.isNaN(time)) {
212
+ return false;
213
+ }
214
+ if (filter.$gte && time < new Date(filter.$gte).getTime()) {
215
+ return false;
216
+ }
217
+ if (filter.$lte && time > new Date(filter.$lte).getTime()) {
218
+ return false;
219
+ }
220
+ return true;
221
+ };
222
+ var columnHelper = createDataTableColumnHelper();
223
+ var useColumns = ({
224
+ optionTitles,
225
+ thumbnail,
226
+ getActions
227
+ }) => {
228
+ const { t } = useTranslation2();
229
+ const { getFullDate } = useDate();
230
+ return useMemo(
231
+ () => [
232
+ columnHelper.display({
233
+ id: "thumbnail",
234
+ header: "",
235
+ // Variant-level images aren't carried by the `withOffers` wrap, so
236
+ // every row falls back to the product thumbnail.
237
+ cell: () => /* @__PURE__ */ jsx2("div", { className: "flex items-center", children: /* @__PURE__ */ jsx2(Thumbnail, { src: thumbnail ?? null }) })
238
+ }),
239
+ // Admin-only Store column — rows can span sellers on the platform-wide
240
+ // offer surface, so the store disambiguates them.
241
+ columnHelper.accessor((row) => row.offer.seller?.name ?? "", {
242
+ id: "store",
243
+ header: t("offers.fields.store"),
244
+ enableSorting: true,
245
+ sortAscLabel: t("filters.sorting.alphabeticallyAsc"),
246
+ sortDescLabel: t("filters.sorting.alphabeticallyDesc"),
247
+ cell: ({ getValue }) => getValue() || /* @__PURE__ */ jsx2("span", { className: "text-ui-fg-muted", children: "-" })
248
+ }),
249
+ columnHelper.accessor((row) => row.variant.title ?? "", {
250
+ id: "title",
251
+ header: t("fields.title"),
252
+ enableSorting: true,
253
+ sortAscLabel: t("filters.sorting.alphabeticallyAsc"),
254
+ sortDescLabel: t("filters.sorting.alphabeticallyDesc"),
255
+ cell: ({ getValue }) => getValue() || /* @__PURE__ */ jsx2("span", { className: "text-ui-fg-muted", children: "-" })
256
+ }),
257
+ columnHelper.accessor((row) => skuOf(row), {
258
+ id: "sku",
259
+ header: t("fields.sku"),
260
+ enableSorting: true,
261
+ sortAscLabel: t("filters.sorting.alphabeticallyAsc"),
262
+ sortDescLabel: t("filters.sorting.alphabeticallyDesc"),
263
+ cell: ({ getValue }) => getValue() || /* @__PURE__ */ jsx2("span", { className: "text-ui-fg-muted", children: "-" })
264
+ }),
265
+ ...optionTitles.map(
266
+ (title) => columnHelper.display({
267
+ id: `option-${title}`,
268
+ header: title,
269
+ cell: ({ row }) => {
270
+ const opt = row.original.variant.options?.find(
271
+ (o) => o.option?.title === title
272
+ );
273
+ return opt?.value ? /* @__PURE__ */ jsx2(Badge, { size: "2xsmall", children: opt.value }) : /* @__PURE__ */ jsx2("span", { className: "text-ui-fg-muted", children: "-" });
274
+ }
275
+ })
276
+ ),
277
+ columnHelper.display({
278
+ id: "inventory",
279
+ header: t("fields.inventory"),
280
+ cell: ({ row }) => {
281
+ const { hasItems, isKit, available, locationCount } = inventoryOf(
282
+ row.original.offer
283
+ );
284
+ if (!hasItems) {
285
+ return /* @__PURE__ */ jsx2("span", { className: "text-ui-fg-muted", children: "-" });
286
+ }
287
+ const text = t("products.variant.tableItem", {
288
+ availableCount: available,
289
+ locationCount,
290
+ count: locationCount
291
+ });
292
+ return /* @__PURE__ */ jsx2(Tooltip, { content: text, children: /* @__PURE__ */ jsxs2("div", { className: "flex h-full w-full items-center gap-2 overflow-hidden", children: [
293
+ isKit && /* @__PURE__ */ jsx2(Component, { className: "text-ui-fg-subtle" }),
294
+ /* @__PURE__ */ jsx2(
295
+ "span",
296
+ {
297
+ className: clx("truncate", {
298
+ "text-ui-fg-error": available === 0
299
+ }),
300
+ children: text
301
+ }
302
+ )
303
+ ] }) });
304
+ }
305
+ }),
306
+ columnHelper.accessor((row) => row.offer.created_at, {
307
+ id: "created_at",
308
+ header: t("fields.createdAt"),
309
+ enableSorting: true,
310
+ sortAscLabel: t("filters.sorting.dateAsc"),
311
+ sortDescLabel: t("filters.sorting.dateDesc"),
312
+ cell: ({ getValue }) => {
313
+ const date = getValue();
314
+ if (!date) {
315
+ return /* @__PURE__ */ jsx2("span", { className: "text-ui-fg-muted", children: "-" });
316
+ }
317
+ return /* @__PURE__ */ jsx2(Tooltip, { content: getFullDate({ date, includeTime: true }), children: /* @__PURE__ */ jsx2("span", { children: getFullDate({ date }) }) });
318
+ }
319
+ }),
320
+ columnHelper.accessor((row) => row.offer.updated_at, {
321
+ id: "updated_at",
322
+ header: t("fields.updatedAt"),
323
+ enableSorting: true,
324
+ sortAscLabel: t("filters.sorting.dateAsc"),
325
+ sortDescLabel: t("filters.sorting.dateDesc"),
326
+ cell: ({ getValue }) => {
327
+ const date = getValue();
328
+ if (!date) {
329
+ return /* @__PURE__ */ jsx2("span", { className: "text-ui-fg-muted", children: "-" });
330
+ }
331
+ return /* @__PURE__ */ jsx2(Tooltip, { content: getFullDate({ date, includeTime: true }), children: /* @__PURE__ */ jsx2("span", { children: getFullDate({ date }) }) });
332
+ }
333
+ }),
334
+ columnHelper.action({ actions: getActions })
335
+ ],
336
+ [t, optionTitles, thumbnail, getActions, getFullDate]
337
+ );
338
+ };
339
+ var OfferVariantsSection = ({
340
+ variants,
341
+ thumbnail
342
+ }) => {
343
+ const { t } = useTranslation2();
344
+ const prompt = usePrompt2();
345
+ const { mutateAsync: bulkDelete } = useBulkDeleteOffers();
346
+ const { q, order, offset, created_at, updated_at } = useQueryParams(
347
+ ["q", "order", "offset", "created_at", "updated_at"],
348
+ PREFIX
349
+ );
350
+ const allRows = useMemo(
351
+ () => (variants ?? []).flatMap(
352
+ (variant) => (variant.offers ?? []).map((offer) => ({
353
+ id: offer.id,
354
+ variant,
355
+ offer
356
+ }))
357
+ ),
358
+ [variants]
359
+ );
360
+ const optionTitles = useMemo(() => {
361
+ const set = /* @__PURE__ */ new Set();
362
+ for (const variant of variants ?? []) {
363
+ for (const opt of variant.options ?? []) {
364
+ if (opt.option?.title) {
365
+ set.add(opt.option.title);
366
+ }
367
+ }
368
+ }
369
+ return Array.from(set);
370
+ }, [variants]);
371
+ const filteredRows = useMemo(() => {
372
+ let rows = allRows;
373
+ const search = q?.trim().toLowerCase();
374
+ if (search) {
375
+ rows = rows.filter((row) => {
376
+ const title = (row.variant.title ?? "").toLowerCase();
377
+ const store = (row.offer.seller?.name ?? "").toLowerCase();
378
+ return title.includes(search) || store.includes(search) || skuOf(row).toLowerCase().includes(search);
379
+ });
380
+ }
381
+ const createdFilter = created_at ? JSON.parse(created_at) : null;
382
+ if (createdFilter) {
383
+ rows = rows.filter(
384
+ (row) => matchesDateFilter(row.offer.created_at, createdFilter)
385
+ );
386
+ }
387
+ const updatedFilter = updated_at ? JSON.parse(updated_at) : null;
388
+ if (updatedFilter) {
389
+ rows = rows.filter(
390
+ (row) => matchesDateFilter(row.offer.updated_at, updatedFilter)
391
+ );
392
+ }
393
+ return rows;
394
+ }, [allRows, q, created_at, updated_at]);
395
+ const sortedRows = useMemo(() => {
396
+ if (!order) {
397
+ return filteredRows;
398
+ }
399
+ const desc = order.startsWith("-");
400
+ const key = desc ? order.slice(1) : order;
401
+ const valueOf = (row) => {
402
+ switch (key) {
403
+ case "store":
404
+ return row.offer.seller?.name ?? "";
405
+ case "title":
406
+ return row.variant.title ?? "";
407
+ case "sku":
408
+ return skuOf(row);
409
+ case "created_at":
410
+ return row.offer.created_at ? new Date(row.offer.created_at).toISOString() : "";
411
+ case "updated_at":
412
+ return row.offer.updated_at ? new Date(row.offer.updated_at).toISOString() : "";
413
+ default:
414
+ return "";
415
+ }
416
+ };
417
+ const sorted = [...filteredRows].sort(
418
+ (a, b) => valueOf(a).localeCompare(valueOf(b))
419
+ );
420
+ return desc ? sorted.reverse() : sorted;
421
+ }, [filteredRows, order]);
422
+ const pageIndex = offset ? Math.floor(parseInt(offset) / PAGE_SIZE) : 0;
423
+ const pageRows = useMemo(
424
+ () => sortedRows.slice(pageIndex * PAGE_SIZE, (pageIndex + 1) * PAGE_SIZE),
425
+ [sortedRows, pageIndex]
426
+ );
427
+ const handleDelete = useCallback(
428
+ async (offerId, sku) => {
429
+ const confirmed = await prompt({
430
+ title: t("general.areYouSure"),
431
+ description: t("offers.delete.description", { sku: sku || "-" }),
432
+ confirmText: t("actions.delete"),
433
+ cancelText: t("actions.cancel"),
434
+ variant: "danger"
435
+ });
436
+ if (!confirmed) {
437
+ return;
438
+ }
439
+ const result = await bulkDelete([offerId]);
440
+ if (result.failed.length === 0) {
441
+ toast2.success(t("offers.delete.successToast"));
442
+ } else {
443
+ toast2.error(result.failed[0]?.error.message);
444
+ }
445
+ },
446
+ [prompt, bulkDelete, t]
447
+ );
448
+ const getActions = useCallback(
449
+ (ctx) => {
450
+ const row = ctx.row.original;
451
+ return [
452
+ [
453
+ {
454
+ icon: /* @__PURE__ */ jsx2(Trash2, {}),
455
+ label: t("actions.delete"),
456
+ onClick: () => handleDelete(row.offer.id, skuOf(row))
457
+ }
458
+ ]
459
+ ];
460
+ },
461
+ [handleDelete, t]
462
+ );
463
+ const columns = useColumns({ optionTitles, thumbnail, getActions });
464
+ const filters = useDataTableDateFilters();
465
+ return /* @__PURE__ */ jsxs2(Container2, { className: "divide-y p-0", "data-testid": "offer-variants-section", children: [
466
+ /* @__PURE__ */ jsx2("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx2(Heading2, { level: "h2", children: t("offers.fields.variants") }) }),
467
+ /* @__PURE__ */ jsx2(
468
+ DataTable,
469
+ {
470
+ data: pageRows,
471
+ columns,
472
+ filters,
473
+ getRowId: (row) => row.id,
474
+ rowHref: (row) => `variants/${row.id}`,
475
+ rowCount: sortedRows.length,
476
+ pageSize: PAGE_SIZE,
477
+ prefix: PREFIX,
478
+ compact: true,
479
+ emptyState: {
480
+ empty: {
481
+ heading: t("offers.empty.heading"),
482
+ description: t("offers.empty.description")
483
+ },
484
+ filtered: {
485
+ heading: t("offers.filtered.heading"),
486
+ description: t("offers.filtered.description")
487
+ }
488
+ }
489
+ }
490
+ )
491
+ ] });
492
+ };
493
+
494
+ // src/pages/offers/[id]/_components/offer-associated-product-section.tsx
495
+ import { TriangleRightMini } from "@medusajs/icons";
496
+ import { Container as Container3, Heading as Heading3 } from "@medusajs/ui";
497
+ import { useTranslation as useTranslation3 } from "react-i18next";
498
+ import { Link } from "react-router-dom";
499
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
500
+ var OfferAssociatedProductSection = ({
501
+ product
502
+ }) => {
503
+ const { t } = useTranslation3();
504
+ return /* @__PURE__ */ jsxs3(Container3, { className: "p-0", "data-testid": "offer-associated-product-section", children: [
505
+ /* @__PURE__ */ jsx3("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx3(Heading3, { level: "h2", children: t("offers.detail.associatedProduct") }) }),
506
+ /* @__PURE__ */ jsx3("div", { className: "txt-small flex flex-col gap-2 px-2 pb-2", children: /* @__PURE__ */ jsx3(
507
+ Link,
508
+ {
509
+ to: `/products/${product.id}`,
510
+ className: "outline-none focus-within:shadow-borders-interactive-with-focus rounded-md [&:hover>div]:bg-ui-bg-component-hover",
511
+ "data-testid": "offer-associated-product-link",
512
+ children: /* @__PURE__ */ jsx3("div", { className: "shadow-elevation-card-rest bg-ui-bg-component rounded-md px-4 py-2 transition-colors", children: /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-3", children: [
513
+ /* @__PURE__ */ jsx3("div", { className: "shadow-elevation-card-rest rounded-md", children: /* @__PURE__ */ jsx3(Thumbnail, { src: product.thumbnail ?? null }) }),
514
+ /* @__PURE__ */ jsxs3("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
515
+ /* @__PURE__ */ jsx3("span", { className: "text-ui-fg-base truncate font-medium", children: product.title }),
516
+ product.handle && /* @__PURE__ */ jsxs3("span", { className: "text-ui-fg-subtle truncate", children: [
517
+ "/",
518
+ product.handle
519
+ ] })
520
+ ] }),
521
+ /* @__PURE__ */ jsx3("div", { className: "size-7 flex items-center justify-center", children: /* @__PURE__ */ jsx3(TriangleRightMini, { className: "text-ui-fg-muted rtl:rotate-180" }) })
522
+ ] }) })
523
+ }
524
+ ) })
525
+ ] });
526
+ };
527
+
528
+ // src/pages/offers/[id]/offer-detail-page.tsx
529
+ import { Fragment, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
530
+ var Root = ({ children }) => {
531
+ const { id } = useParams();
532
+ const initialData = useLoaderData();
533
+ const { product, isLoading, isError, error } = useProduct(
534
+ id,
535
+ { fields: OFFER_PRODUCT_DETAIL_FIELDS },
536
+ { initialData }
537
+ );
538
+ if (isError) {
539
+ throw error;
540
+ }
541
+ if (isLoading || !product) {
542
+ return /* @__PURE__ */ jsx4(TwoColumnPageSkeleton, { mainSections: 3, sidebarSections: 1 });
543
+ }
544
+ const typed = product;
545
+ return /* @__PURE__ */ jsx4(Fragment, { children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs4(TwoColumnPage, { data: typed, hasOutlet: true, children: [
546
+ /* @__PURE__ */ jsxs4(TwoColumnPage.Main, { children: [
547
+ /* @__PURE__ */ jsx4(OfferDetailGeneralSection, { product: typed }),
548
+ /* @__PURE__ */ jsx4(ProductMediaSection, { product: typed, readOnly: true }),
549
+ /* @__PURE__ */ jsx4(
550
+ OfferVariantsSection,
551
+ {
552
+ variants: typed.variants,
553
+ thumbnail: typed.thumbnail
554
+ }
555
+ )
556
+ ] }),
557
+ /* @__PURE__ */ jsx4(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsx4(OfferAssociatedProductSection, { product: typed }) })
558
+ ] }) });
559
+ };
560
+ var OfferDetailPage = Object.assign(Root, {
561
+ Main: TwoColumnPage.Main,
562
+ Sidebar: TwoColumnPage.Sidebar,
563
+ General: OfferDetailGeneralSection,
564
+ Media: ProductMediaSection,
565
+ Variants: OfferVariantsSection,
566
+ AssociatedProduct: OfferAssociatedProductSection
567
+ });
568
+ var Component2 = Root;
569
+ export {
570
+ Component2 as Component,
571
+ OfferDetailPage
572
+ };