@mercurjs/admin 2.2.0-canary.1 → 2.2.0-canary.11

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 (264) hide show
  1. package/dist/{[id]-YI7UXOO2.js → [id]-BAPEFPAO.js} +10 -4
  2. package/dist/{add-campaign-promotions-OLNTDP26.js → add-campaign-promotions-KOGSYV2W.js} +3 -3
  3. package/dist/{adjust-inventory-CVWSBMHU.js → adjust-inventory-3IQ657W2.js} +12 -13
  4. package/dist/{api-key-management-create-7RWOCVAO.js → api-key-management-create-UD5V7TOU.js} +3 -3
  5. package/dist/{api-key-management-detail-ZIIDMHFI.js → api-key-management-detail-NBNHERF6.js} +14 -15
  6. package/dist/{api-key-management-edit-ACH6TJAX.js → api-key-management-edit-4TLKJSAE.js} +3 -3
  7. package/dist/{api-key-management-list-JHBBXGHH.js → api-key-management-list-SZUSD6UI.js} +4 -4
  8. package/dist/{api-key-management-sales-channels-XEBTUB5V.js → api-key-management-sales-channels-TK6XEGF3.js} +3 -3
  9. package/dist/{attribute-create-BYO7BDF5.js → attribute-create-IKTP5XRS.js} +57 -36
  10. package/dist/{attribute-detail-36XP35P6.js → attribute-detail-V4QI34FV.js} +15 -16
  11. package/dist/{attribute-edit-WMJWHT7Z.js → attribute-edit-LUY66TG3.js} +2 -2
  12. package/dist/{attribute-edit-possible-value-KTUZ7YLW.js → attribute-edit-possible-value-IOS3625C.js} +2 -2
  13. package/dist/{attribute-list-OHU2QMUG.js → attribute-list-EMPHZ32M.js} +12 -13
  14. package/dist/campaign-create-VFFIIRE4.js +1 -1
  15. package/dist/{campaign-detail-AZKBPDLC.js → campaign-detail-QY3AALUR.js} +16 -17
  16. package/dist/{categories-metadata-YZUP43OH.js → categories-metadata-Z5JAWPAK.js} +12 -13
  17. package/dist/{category-create-2MRYTSYM.js → category-create-GMCJABRW.js} +3 -3
  18. package/dist/{category-detail-KTFD3VVR.js → category-detail-IP5EPIUR.js} +19 -20
  19. package/dist/{category-edit-QLOS2LBA.js → category-edit-GLE4NTFG.js} +2 -2
  20. package/dist/{category-list-U7ZQBSZN.js → category-list-SNVOQ64L.js} +4 -4
  21. package/dist/{category-organize-TIKTYJFZ.js → category-organize-UY4M4N7S.js} +2 -2
  22. package/dist/{category-products-7P5DSQN4.js → category-products-HWXJR7KR.js} +16 -17
  23. package/dist/{chunk-YLKG7W4P.js → chunk-2OF7GB7J.js} +1 -1
  24. package/dist/{chunk-EJTB2SLE.js → chunk-3AO6X4CE.js} +1 -1
  25. package/dist/{chunk-PCLSODMO.js → chunk-3HY4I76Q.js} +115 -180
  26. package/dist/{chunk-CYGIJOA5.js → chunk-3VDLE5GA.js} +12 -4
  27. package/dist/{chunk-JQBSPUH2.js → chunk-3XSC3NEG.js} +14 -1
  28. package/dist/{chunk-OSEIN4Y2.js → chunk-453BC56K.js} +1 -1
  29. package/dist/{chunk-ALATTLBM.js → chunk-4GFS57XI.js} +1 -1
  30. package/dist/{chunk-BCVUMATY.js → chunk-4PU6GDCE.js} +3 -3
  31. package/dist/{chunk-ZSFJVRRS.js → chunk-5AZCIOS4.js} +1 -1
  32. package/dist/{chunk-2S6VXFBZ.js → chunk-5FFZQPTT.js} +4 -4
  33. package/dist/chunk-5UPOHLBD.js +213 -0
  34. package/dist/{chunk-LLOKYZMI.js → chunk-623TMW36.js} +1 -1
  35. package/dist/{chunk-S5BJ5CMF.js → chunk-6FHQCLHQ.js} +1 -1
  36. package/dist/{chunk-TITPJHIL.js → chunk-72PLRAWM.js} +1 -1
  37. package/dist/{chunk-H23AKDB2.js → chunk-7KZ5X5SU.js} +4 -4
  38. package/dist/chunk-7MMLCMV3.js +142 -0
  39. package/dist/{chunk-637OFDFC.js → chunk-A62MTLPR.js} +52 -76
  40. package/dist/{chunk-DOSKHIRH.js → chunk-ABWW3JHS.js} +8 -8
  41. package/dist/{chunk-UXD3VNBO.js → chunk-AJLGY3LQ.js} +1 -2
  42. package/dist/{chunk-TP7L6M7V.js → chunk-BPCU5QJE.js} +1 -1
  43. package/dist/{chunk-RKH3A4O3.js → chunk-BQ6ZDY6L.js} +6 -6
  44. package/dist/{chunk-LCGLQNOI.js → chunk-CVZA23ES.js} +3 -3
  45. package/dist/{chunk-UPNMDPFX.js → chunk-CYGCCNIC.js} +4 -4
  46. package/dist/{chunk-WS63IRBI.js → chunk-D2VXOF46.js} +6 -6
  47. package/dist/{chunk-GKW445WA.js → chunk-DELK6EWH.js} +13 -187
  48. package/dist/{chunk-AB2LHP3M.js → chunk-DJWOIRLV.js} +1 -1
  49. package/dist/{chunk-H5PYBIOZ.js → chunk-DN2K5EAH.js} +1 -1
  50. package/dist/{chunk-EREXPX6I.js → chunk-EBYWGIOR.js} +23 -37
  51. package/dist/{chunk-W7NN2EFL.js → chunk-EGTH3PUK.js} +4 -4
  52. package/dist/{chunk-XODRTI2W.js → chunk-EMQP2CNF.js} +4 -4
  53. package/dist/{chunk-PXTJJQKJ.js → chunk-ENFXIYIH.js} +1 -1
  54. package/dist/{chunk-BLYJZMNE.js → chunk-EYFWEKFJ.js} +2 -2
  55. package/dist/{chunk-LT3REHJG.js → chunk-F52JLHE3.js} +101 -405
  56. package/dist/{chunk-WKCYMDTV.js → chunk-FDD7TANX.js} +1 -1
  57. package/dist/{chunk-3EDQIZV6.js → chunk-G5DQCCPL.js} +2 -2
  58. package/dist/chunk-GVEF6UDT.js +8 -0
  59. package/dist/{chunk-2YYXP6XI.js → chunk-H3MAUKL7.js} +13 -29
  60. package/dist/{chunk-A4UQKKGC.js → chunk-HDOWEXDH.js} +3 -3
  61. package/dist/{chunk-Y3NVKGGI.js → chunk-HEGPAGJT.js} +2 -2
  62. package/dist/{chunk-3P4VTL4S.js → chunk-IQZ3T2Q4.js} +1 -1
  63. package/dist/{chunk-Y2M536WR.js → chunk-JHBNG7OD.js} +17 -0
  64. package/dist/{chunk-GLPS6QFG.js → chunk-JSH7JEKY.js} +4 -8
  65. package/dist/{chunk-57BHSFNA.js → chunk-JSMUFZZN.js} +1 -1
  66. package/dist/{chunk-QIU6DJY6.js → chunk-K4WU4PVL.js} +1 -1
  67. package/dist/{chunk-V6OGMYAI.js → chunk-KT7X72J4.js} +158 -169
  68. package/dist/{chunk-G4PROEJI.js → chunk-LGL4QSGB.js} +3 -3
  69. package/dist/{chunk-AXTQMIIK.js → chunk-LJDGVBOQ.js} +8 -27
  70. package/dist/{chunk-YGAX72XV.js → chunk-LO2ZWQGL.js} +0 -2
  71. package/dist/{chunk-NQBSSM5V.js → chunk-M572YFDA.js} +4 -4
  72. package/dist/{chunk-K4TGNN4P.js → chunk-MEXH366L.js} +2 -2
  73. package/dist/{chunk-NZ2LHIKD.js → chunk-MR3MLNWV.js} +3 -3
  74. package/dist/{chunk-TGFZ4UBK.js → chunk-MVDPDVMI.js} +5 -5
  75. package/dist/{chunk-P25PIADJ.js → chunk-N4GJRJF5.js} +1 -1
  76. package/dist/{chunk-BE6JLTMI.js → chunk-N6YOACEW.js} +1 -1
  77. package/dist/{chunk-ED7XNGZD.js → chunk-N7OVIX55.js} +1 -1
  78. package/dist/{chunk-2LQ5SCPB.js → chunk-NGDOLGBQ.js} +18 -6
  79. package/dist/{chunk-FTAR3BDS.js → chunk-NJP3DEE5.js} +1 -1
  80. package/dist/{chunk-MN3AEVR7.js → chunk-O2XHQTBX.js} +4 -4
  81. package/dist/{chunk-GNLPUGYK.js → chunk-OFOKVLV3.js} +2 -2
  82. package/dist/{chunk-CBG4E3M3.js → chunk-OMBP3YSV.js} +1 -1
  83. package/dist/{chunk-A772RAKB.js → chunk-P5XVG4PY.js} +1 -1
  84. package/dist/{chunk-CKACZXMP.js → chunk-PASEZJC7.js} +1 -1
  85. package/dist/chunk-PT5PLV3N.js +78 -0
  86. package/dist/{chunk-3IVTUFBM.js → chunk-PXKDYD3M.js} +1 -1
  87. package/dist/{chunk-HWBUIBJD.js → chunk-QLEGHL2Q.js} +6 -6
  88. package/dist/{chunk-3B6MTW5G.js → chunk-QUHSHIAC.js} +3 -0
  89. package/dist/{chunk-BHOZKBYY.js → chunk-QUPUWR42.js} +1 -1
  90. package/dist/{chunk-6AZKWCVL.js → chunk-R7ESTJHN.js} +5 -5
  91. package/dist/{chunk-6FIU2V6Y.js → chunk-SJGIQGEC.js} +1 -1
  92. package/dist/{chunk-SRDK3XX7.js → chunk-SUVFPJ4J.js} +5 -5
  93. package/dist/{chunk-WDH5C2NS.js → chunk-TE4IF3MM.js} +1 -1
  94. package/dist/{chunk-ELM74U2R.js → chunk-TZDRRTAX.js} +2 -2
  95. package/dist/{chunk-IRTI3AS3.js → chunk-UCX2T4BQ.js} +2 -2
  96. package/dist/{chunk-2MDGYHWN.js → chunk-UCYSCKZV.js} +1328 -1379
  97. package/dist/chunk-UIVWOKWT.js +63 -0
  98. package/dist/{chunk-ZHOI4QMK.js → chunk-UXGLM3B4.js} +1 -1
  99. package/dist/{chunk-D5T7QOVY.js → chunk-VT5E7OMM.js} +2 -2
  100. package/dist/{chunk-B3EEDC47.js → chunk-VT6QIVZW.js} +0 -93
  101. package/dist/{chunk-CBGXKU7Z.js → chunk-VY7PT4SI.js} +4 -4
  102. package/dist/{chunk-BGGUVHDG.js → chunk-W3FDZPPF.js} +82 -271
  103. package/dist/{chunk-77T2UI6L.js → chunk-W6CW4WHC.js} +293 -209
  104. package/dist/{chunk-Q6I2IKJB.js → chunk-W6V2L2FX.js} +2 -2
  105. package/dist/{chunk-SG76L7C7.js → chunk-WPVDACTL.js} +1 -2
  106. package/dist/{chunk-UXQAHUGZ.js → chunk-WTK4MLMF.js} +1 -1
  107. package/dist/{chunk-N2LH7A4X.js → chunk-X7H7TIOT.js} +9 -9
  108. package/dist/{chunk-S4SVK5DE.js → chunk-YVLANFBK.js} +29 -1
  109. package/dist/{chunk-XZZTC7E5.js → chunk-Z5T5EPLF.js} +1 -1
  110. package/dist/{chunk-WNYDGJ3E.js → chunk-ZO7A6VYP.js} +6 -6
  111. package/dist/{collection-add-products-XL2TAKQD.js → collection-add-products-ABWXUOFD.js} +16 -17
  112. package/dist/{collection-create-HUNYHKUJ.js → collection-create-BRMP6SIZ.js} +2 -2
  113. package/dist/{collection-detail-2DSZVOI7.js → collection-detail-AMGR2B5N.js} +17 -18
  114. package/dist/{collection-edit-OQGYTQDO.js → collection-edit-YLWUEU4C.js} +2 -2
  115. package/dist/{collection-list-NGCW7OTG.js → collection-list-6HZE43AC.js} +18 -19
  116. package/dist/{collection-metadata-47N7TUOH.js → collection-metadata-JS5QP3GD.js} +12 -13
  117. package/dist/{commission-rate-create-BQY3UGKV.js → commission-rate-create-PSPSJZR5.js} +23 -24
  118. package/dist/{commission-rate-detail-LAZZLZVX.js → commission-rate-detail-U72E4ZIO.js} +13 -14
  119. package/dist/{commission-rate-edit-DAFXNYYN.js → commission-rate-edit-7NJPABVA.js} +23 -24
  120. package/dist/{constants-26tEckuq.d.ts → constants-Bahlh59D.d.ts} +8 -4
  121. package/dist/{customer-detail-D5SSLNFT.js → customer-detail-2RWBN6C4.js} +16 -17
  122. package/dist/{customer-group-detail-KRT7E2JA.js → customer-group-detail-ED66F7JM.js} +12 -13
  123. package/dist/{customer-group-list-KKDIESQ6.js → customer-group-list-6YUFKBHH.js} +12 -13
  124. package/dist/{customer-group-metadata-J6JY7DZ3.js → customer-group-metadata-VQUOWR3P.js} +12 -13
  125. package/dist/{customer-metadata-AH2LBK4T.js → customer-metadata-47AVJXRI.js} +12 -13
  126. package/dist/{customers-add-customer-group-AHGAPEIS.js → customers-add-customer-group-HI7J7YKN.js} +12 -13
  127. package/dist/{edit-inventory-item-ADNLKLCN.js → edit-inventory-item-MBPSBJL4.js} +12 -13
  128. package/dist/{edit-inventory-item-attributes-XVR2WLDU.js → edit-inventory-item-attributes-RVYWOFAC.js} +12 -13
  129. package/dist/{edit-reservation-HQQL42QX.js → edit-reservation-7BLGYXCJ.js} +5 -5
  130. package/dist/{edit-rules-YMKM5JPI.js → edit-rules-ZWDKM5M3.js} +13 -14
  131. package/dist/index.d.ts +2 -2
  132. package/dist/index.js +500 -566
  133. package/dist/{inventory-create-IVESXFSV.js → inventory-create-Q4VBPXSG.js} +15 -16
  134. package/dist/{inventory-detail-TINIAFVB.js → inventory-detail-6CKO3A3Y.js} +13 -14
  135. package/dist/{inventory-list-YLIAKQXI.js → inventory-list-2JGX6BRI.js} +2 -2
  136. package/dist/{inventory-metadata-6INRH2JC.js → inventory-metadata-COGGE5ZR.js} +12 -13
  137. package/dist/{inventory-stock-6YGTATID.js → inventory-stock-2QIKS7LE.js} +196 -35
  138. package/dist/{loader-6KDBTRVR.js → loader-OU7SKXOD.js} +4 -2
  139. package/dist/{location-detail-EK2S7WOK.js → location-detail-HOCNTQ7K.js} +14 -15
  140. package/dist/{location-fulfillment-providers-KUUNC2KP.js → location-fulfillment-providers-YQ2XFPAJ.js} +15 -16
  141. package/dist/{location-list-IV323QW2.js → location-list-I2UMU25V.js} +12 -13
  142. package/dist/{location-sales-channels-EYUXMTW7.js → location-sales-channels-GKIWX6B2.js} +2 -2
  143. package/dist/{location-service-zone-shipping-option-create-36JZFRGY.js → location-service-zone-shipping-option-create-6GYLJHEC.js} +15 -16
  144. package/dist/{location-service-zone-shipping-option-pricing-JLGCOZGS.js → location-service-zone-shipping-option-pricing-POBJOF3Z.js} +7 -7
  145. package/dist/{login-6L3RMREO.js → login-N7CVSQNG.js} +12 -13
  146. package/dist/{manage-locations-CFTM6DNH.js → manage-locations-TKLOHP3D.js} +1 -1
  147. package/dist/{marketplace-detail-BAU2MEJT.js → marketplace-detail-K52ALYGT.js} +16 -17
  148. package/dist/{marketplace-metadata-KRCGKOCA.js → marketplace-metadata-ZSX3IQF4.js} +15 -16
  149. package/dist/{offers-IFKM6EQT.js → offers-UBD6NICA.js} +6 -4
  150. package/dist/{order-create-claim-RMDDCUZ6.js → order-create-claim-OVHMMR3J.js} +268 -243
  151. package/dist/{order-create-edit-PQ54JFZZ.js → order-create-edit-HEOYCYZO.js} +205 -110
  152. package/dist/{order-create-exchange-T6DBVS75.js → order-create-exchange-L56VKQBL.js} +269 -242
  153. package/dist/{order-create-refund-OW3MIXBY.js → order-create-refund-UTJKJ3AJ.js} +16 -17
  154. package/dist/{order-create-return-YCX6C3VP.js → order-create-return-FLGYGUTQ.js} +45 -18
  155. package/dist/{order-detail-2OAEGBQG.js → order-detail-KAB4MV7X.js} +20 -22
  156. package/dist/{order-edit-billing-address-VGZBQHF5.js → order-edit-billing-address-RUURVISC.js} +14 -15
  157. package/dist/{order-edit-email-OOCXVRET.js → order-edit-email-OO7AMRHC.js} +13 -14
  158. package/dist/{order-edit-shipping-address-B4F3E5RE.js → order-edit-shipping-address-BRRXUE76.js} +13 -14
  159. package/dist/{order-list-DQTMCEFD.js → order-list-S3AJC6L5.js} +7 -7
  160. package/dist/{order-metadata-AN6MPHHT.js → order-metadata-OHK6TPAO.js} +12 -13
  161. package/dist/{order-request-transfer-A2NJSQ4H.js → order-request-transfer-YLMXC7NL.js} +13 -14
  162. package/dist/pages/index.d.ts +36 -316
  163. package/dist/pages/index.js +103 -114
  164. package/dist/{price-list-configuration-XAHXLCXR.js → price-list-configuration-Q5H22ZE2.js} +2 -2
  165. package/dist/{price-list-create-37SCDSPN.js → price-list-create-OYAVGRM5.js} +19 -20
  166. package/dist/{price-list-detail-4Q2HBLAM.js → price-list-detail-Q4GFFUFG.js} +18 -19
  167. package/dist/{price-list-edit-ZVLD4M5T.js → price-list-edit-YY4SXEI3.js} +2 -2
  168. package/dist/{price-list-list-ER4TOZTY.js → price-list-list-OIOY43TF.js} +4 -4
  169. package/dist/{price-list-prices-add-UASPZXKT.js → price-list-prices-add-KONZVSVQ.js} +19 -20
  170. package/dist/{price-list-prices-edit-WHCIGSB2.js → price-list-prices-edit-SMUKU7Q6.js} +14 -15
  171. package/dist/{product-add-existing-attributes-7HEJUR6J.js → product-add-existing-attributes-GGRRNFDK.js} +57 -21
  172. package/dist/{product-attributes-MHRXZK5S.js → product-attributes-C3KHQF2I.js} +2 -2
  173. package/dist/{product-bulk-edit-J6ZP7GGM.js → product-bulk-edit-J3CMBZN2.js} +5 -7
  174. package/dist/{product-create-KHJWRSUB.js → product-create-UR5OFGUY.js} +20 -21
  175. package/dist/{product-create-attribute-ZT3VZDNZ.js → product-create-attribute-XARMC6FJ.js} +73 -45
  176. package/dist/product-create-variant-6VUKYLWE.js +20 -0
  177. package/dist/{product-detail-GLISGO65.js → product-detail-OLFVJZ7T.js} +15 -17
  178. package/dist/{product-edit-EKAZRIJ6.js → product-edit-F4CKOIUO.js} +2 -4
  179. package/dist/product-edit-attribute-LG2ZM6HQ.js +175 -0
  180. package/dist/{product-list-2CTGPDDT.js → product-list-2BWYAATR.js} +18 -19
  181. package/dist/{product-media-KREKRDOC.js → product-media-EUDMCJ75.js} +5 -5
  182. package/dist/{product-metadata-O3BAEUYB.js → product-metadata-5WVNFCRL.js} +13 -14
  183. package/dist/{product-organization-SBQY44IF.js → product-organization-BFWDCHP4.js} +4 -47
  184. package/dist/{product-sales-channels-TFOGXCMI.js → product-sales-channels-WKQSYOEX.js} +3 -3
  185. package/dist/{product-shipping-profile-E4HJ4EYW.js → product-shipping-profile-WDLKA2SN.js} +2 -2
  186. package/dist/{product-tag-create-7JBM6I3V.js → product-tag-create-KQSVCWMC.js} +12 -13
  187. package/dist/{product-tag-detail-MTFAPSG2.js → product-tag-detail-CWDAY7F3.js} +22 -23
  188. package/dist/{product-tag-edit-O2ADFDD6.js → product-tag-edit-B4SIZCUK.js} +12 -13
  189. package/dist/{product-tag-list-EOULJIYQ.js → product-tag-list-2OK3OCMZ.js} +22 -23
  190. package/dist/{product-tag-metadata-SBOUTUXY.js → product-tag-metadata-MASTMIKE.js} +12 -13
  191. package/dist/{product-type-detail-H4CZN27J.js → product-type-detail-3X7ZTZJN.js} +17 -18
  192. package/dist/{product-type-metadata-KN5OXR6J.js → product-type-metadata-6BKTQHQC.js} +12 -13
  193. package/dist/{product-variant-detail-H2YRFDAU.js → product-variant-detail-PQ4RKPZT.js} +17 -27
  194. package/dist/{product-variant-edit-6W7LKCEE.js → product-variant-edit-TLF475SH.js} +163 -254
  195. package/dist/{product-variant-metadata-QESZ7VS2.js → product-variant-metadata-3M72B3PM.js} +12 -13
  196. package/dist/{promotion-create-TGC6BVWF.js → promotion-create-OKZBUSJD.js} +14 -15
  197. package/dist/{promotion-detail-VYIXZMMD.js → promotion-detail-MMNEDRXD.js} +15 -16
  198. package/dist/{promotion-list-C3SKV5BJ.js → promotion-list-DHWW7FTI.js} +4 -4
  199. package/dist/{refund-reason-create-2KEQFOID.js → refund-reason-create-N4DZ4UHS.js} +12 -13
  200. package/dist/{refund-reason-edit-E7CB7SM3.js → refund-reason-edit-OAHRDKXW.js} +12 -13
  201. package/dist/{refund-reason-list-TAHJK4OX.js → refund-reason-list-YLH4LD4S.js} +19 -20
  202. package/dist/{region-metadata-723RQGHS.js → region-metadata-BJSTTZFL.js} +15 -16
  203. package/dist/{reservation-create-Y3HG4AZA.js → reservation-create-TXYAY3KF.js} +4 -4
  204. package/dist/{reservation-detail-HQMADZ56.js → reservation-detail-CEENG76D.js} +16 -17
  205. package/dist/{reservation-list-YKC3JJ6K.js → reservation-list-SORWYHI4.js} +3 -3
  206. package/dist/{reservation-metadata-UG4YTEMY.js → reservation-metadata-G3QBZF4K.js} +15 -16
  207. package/dist/{reset-password-2VNU52CE.js → reset-password-QGQ4GAHK.js} +1 -1
  208. package/dist/{return-reason-list-IHFO2LJK.js → return-reason-list-7HTIV7NK.js} +7 -7
  209. package/dist/{sales-channel-add-products-YZTQ2SDS.js → sales-channel-add-products-3VZ5SLLP.js} +16 -17
  210. package/dist/{sales-channel-create-BSNCLZWR.js → sales-channel-create-XBR3QESI.js} +2 -2
  211. package/dist/{sales-channel-detail-67G7K3IE.js → sales-channel-detail-PHRSKCNM.js} +17 -18
  212. package/dist/{sales-channel-edit-FUDXMZYV.js → sales-channel-edit-ILBZBQP4.js} +2 -2
  213. package/dist/{sales-channel-list-GYLGH4U7.js → sales-channel-list-3GCESYAM.js} +13 -14
  214. package/dist/{sales-channel-metadata-H6RSHKVP.js → sales-channel-metadata-HVPGS756.js} +12 -13
  215. package/dist/{shipping-option-type-create-QAOW7753.js → shipping-option-type-create-3ZKT7WAC.js} +12 -13
  216. package/dist/{shipping-option-type-detail-QGWVDTDU.js → shipping-option-type-detail-IYXWAK7F.js} +14 -15
  217. package/dist/{shipping-option-type-edit-WXYBDRNY.js → shipping-option-type-edit-QRXYNNRW.js} +12 -13
  218. package/dist/{shipping-option-type-list-YSWP6DSC.js → shipping-option-type-list-MLIDCA3L.js} +14 -15
  219. package/dist/{shipping-profile-metadata-UE53IA3J.js → shipping-profile-metadata-T4HPNTLH.js} +12 -13
  220. package/dist/{store-bulk-edit-UYNQ2CPG.js → store-bulk-edit-BNF3HH5K.js} +2 -2
  221. package/dist/{store-create-WNFRHXWR.js → store-create-KFLNOD73.js} +15 -16
  222. package/dist/{store-details-R2GQU7HE.js → store-details-E347PHAN.js} +21 -36
  223. package/dist/{store-edit-UW3QOFFX.js → store-edit-Y6NLBIOP.js} +6 -6
  224. package/dist/{store-list-5CV7VJLO.js → store-list-S2L44OLB.js} +18 -19
  225. package/dist/{store-member-invite-M4NVBUXM.js → store-member-invite-J5XSPWMW.js} +1 -1
  226. package/dist/{tax-region-create-3KVECMFN.js → tax-region-create-MIDQXQS4.js} +13 -14
  227. package/dist/{tax-region-detail-AOT4X4DZ.js → tax-region-detail-AC7B3G57.js} +14 -15
  228. package/dist/{tax-region-edit-5T7VHKIA.js → tax-region-edit-5CORTHTC.js} +12 -13
  229. package/dist/{tax-region-metadata-RSZCJGJT.js → tax-region-metadata-QQZIQPAD.js} +12 -13
  230. package/dist/{tax-region-province-detail-XEMIX5SQ.js → tax-region-province-detail-2MGX7LEO.js} +14 -15
  231. package/dist/{tax-region-tax-override-create-KVVY4AF2.js → tax-region-tax-override-create-IONGD4TG.js} +21 -22
  232. package/dist/{tax-region-tax-override-edit-TVX7SMJD.js → tax-region-tax-override-edit-RIT6YRVK.js} +21 -22
  233. package/dist/{user-detail-W7DGVXDZ.js → user-detail-MMVBN3AE.js} +1 -1
  234. package/dist/{user-metadata-3AFZX3DM.js → user-metadata-OZLU3Y2X.js} +12 -13
  235. package/package.json +5 -5
  236. package/dist/chunk-ABFL4ACD.js +0 -207
  237. package/dist/chunk-IEPNHH7Z.js +0 -170
  238. package/dist/chunk-J65IXAGI.js +0 -292
  239. package/dist/chunk-QSGR43JM.js +0 -30
  240. package/dist/chunk-RQ4NMLSS.js +0 -8
  241. package/dist/chunk-RXM4B6HR.js +0 -8
  242. package/dist/chunk-U7XILJH6.js +0 -423
  243. package/dist/chunk-UM7ZR3VU.js +0 -14
  244. package/dist/chunk-UR6HGBFE.js +0 -652
  245. package/dist/chunk-V5XHY5LP.js +0 -39
  246. package/dist/chunk-WV4SQ57G.js +0 -141
  247. package/dist/chunk-ZZ3XFIEM.js +0 -84
  248. package/dist/order-allocate-items-DJ2V4B7A.js +0 -563
  249. package/dist/order-create-fulfillment-SMSUJSBN.js +0 -644
  250. package/dist/order-create-shipment-5ZAWH5CZ.js +0 -215
  251. package/dist/order-receive-return-DZ4IUOHY.js +0 -563
  252. package/dist/product-brand-create-B3ZJGHUQ.js +0 -171
  253. package/dist/product-brand-detail-6MPQ3UFN.js +0 -100
  254. package/dist/product-brand-edit-3TQDHZNN.js +0 -179
  255. package/dist/product-brand-list-ZBPBSRQN.js +0 -30
  256. package/dist/product-brand-metadata-EAMW6PQJ.js +0 -87
  257. package/dist/product-create-option-NIAP75EE.js +0 -130
  258. package/dist/product-create-variant-LCE47YFO.js +0 -60
  259. package/dist/product-edit-option-OZUZGMIM.js +0 -166
  260. package/dist/product-prices-R5JOHVGS.js +0 -267
  261. package/dist/product-stock-EIP2XJUR.js +0 -545
  262. package/dist/product-variant-manage-inventory-items-Q5MJG3EJ.js +0 -337
  263. package/dist/{chunk-WVKVPGJW.js → chunk-FNKBJCNF.js} +3 -3
  264. package/dist/{promotion-add-campaign-O3RTMS3W.js → promotion-add-campaign-S3JJSFHT.js} +2 -2
@@ -1,10 +1,14 @@
1
1
  import {
2
2
  ItemPlaceholder
3
3
  } from "./chunk-U2L77ZDR.js";
4
+ import {
5
+ useOffers
6
+ } from "./chunk-UIVWOKWT.js";
4
7
  import {
5
8
  OutboundShippingPlaceholder,
6
- ReturnShippingPlaceholder
7
- } from "./chunk-S4SVK5DE.js";
9
+ ReturnShippingPlaceholder,
10
+ getOfferRestockPreview
11
+ } from "./chunk-YVLANFBK.js";
8
12
  import {
9
13
  getFormattedShippingOptionLocationName
10
14
  } from "./chunk-HC25LNX7.js";
@@ -25,23 +29,21 @@ import {
25
29
  useUpdateExchangeInboundShipping,
26
30
  useUpdateExchangeOutboundItems,
27
31
  useUpdateExchangeOutboundShipping
28
- } from "./chunk-GNLPUGYK.js";
32
+ } from "./chunk-OFOKVLV3.js";
29
33
  import {
30
34
  useReturnReasons
31
35
  } from "./chunk-2FGRDEAD.js";
32
36
  import {
33
- getReturnableQuantity
34
- } from "./chunk-UM7ZR3VU.js";
37
+ getReturnableQuantity,
38
+ useReturn,
39
+ useUpdateReturn
40
+ } from "./chunk-DELK6EWH.js";
35
41
  import {
36
42
  MoneyAmountCell
37
43
  } from "./chunk-2Y3WMGN6.js";
38
44
  import {
39
45
  DEFAULT_FIELDS
40
- } from "./chunk-Y2M536WR.js";
41
- import {
42
- useReturn,
43
- useUpdateReturn
44
- } from "./chunk-GKW445WA.js";
46
+ } from "./chunk-JHBNG7OD.js";
45
47
  import {
46
48
  getStylizedAmount
47
49
  } from "./chunk-PXYDR7WQ.js";
@@ -49,7 +51,9 @@ import {
49
51
  ProductCell,
50
52
  ProductHeader
51
53
  } from "./chunk-FWPGOIFA.js";
52
- import "./chunk-PHOCVOZ5.js";
54
+ import {
55
+ PlaceholderCell
56
+ } from "./chunk-PHOCVOZ5.js";
53
57
  import "./chunk-FQERBIVS.js";
54
58
  import {
55
59
  _DataTable,
@@ -84,25 +88,28 @@ import "./chunk-XQNVC4Q7.js";
84
88
  import {
85
89
  useQueryParams
86
90
  } from "./chunk-THHRRYRS.js";
87
- import "./chunk-AXTQMIIK.js";
91
+ import "./chunk-LJDGVBOQ.js";
88
92
  import "./chunk-OH4AABUT.js";
89
93
  import "./chunk-AEMDNTW5.js";
90
94
  import "./chunk-LYD3C73Z.js";
91
- import "./chunk-FTAR3BDS.js";
92
95
  import "./chunk-46M463BR.js";
93
- import "./chunk-ZZ3XFIEM.js";
96
+ import "./chunk-NJP3DEE5.js";
94
97
  import "./chunk-533GMKEG.js";
95
98
  import "./chunk-YFRC6GEN.js";
96
99
  import "./chunk-DAXXLQKB.js";
97
100
  import "./chunk-OHOWEMHO.js";
98
101
  import "./chunk-JPNPTILP.js";
102
+ import "./chunk-ESPLVOFC.js";
99
103
  import "./chunk-GKGLVDDV.js";
100
104
  import "./chunk-N6SI4IIT.js";
101
105
  import "./chunk-WJJXUXSO.js";
102
106
  import "./chunk-LAPEZATU.js";
103
- import "./chunk-OSEIN4Y2.js";
104
- import "./chunk-XZZTC7E5.js";
107
+ import "./chunk-453BC56K.js";
108
+ import "./chunk-Z5T5EPLF.js";
109
+ import "./chunk-FXWKGNRV.js";
110
+ import "./chunk-VDKOJ5WD.js";
105
111
  import "./chunk-ZN7LWXVC.js";
112
+ import "./chunk-P5XVG4PY.js";
106
113
  import "./chunk-VYMODH6P.js";
107
114
  import "./chunk-LEG67A2R.js";
108
115
  import "./chunk-PRBE5CM3.js";
@@ -116,30 +123,24 @@ import {
116
123
  useOrder,
117
124
  useOrderPreview,
118
125
  useOrderShippingOptions
119
- } from "./chunk-B3EEDC47.js";
120
- import "./chunk-A772RAKB.js";
121
- import "./chunk-ESPLVOFC.js";
122
- import "./chunk-FXWKGNRV.js";
123
- import "./chunk-VDKOJ5WD.js";
126
+ } from "./chunk-VT6QIVZW.js";
124
127
  import {
125
128
  ActionMenu
126
129
  } from "./chunk-BDGZ4EQO.js";
127
- import "./chunk-S5BJ5CMF.js";
128
- import "./chunk-H5PYBIOZ.js";
130
+ import "./chunk-6FHQCLHQ.js";
131
+ import "./chunk-DN2K5EAH.js";
129
132
  import "./chunk-LAVHRER2.js";
130
133
  import "./chunk-Y7QKP6QU.js";
131
134
  import "./chunk-INNFZYX2.js";
132
- import "./chunk-2YYXP6XI.js";
135
+ import "./chunk-H3MAUKL7.js";
133
136
  import "./chunk-RHKRREUU.js";
134
137
  import "./chunk-ZA2KFUFR.js";
135
- import {
136
- sdk
137
- } from "./chunk-ZBWL72TB.js";
138
+ import "./chunk-ZBWL72TB.js";
138
139
  import "./chunk-NBMM2TZK.js";
139
140
 
140
141
  // src/pages/orders/order-create-exchange/exchange-create.tsx
141
142
  import { toast as toast4 } from "@medusajs/ui";
142
- import { useEffect as useEffect4, useState as useState6 } from "react";
143
+ import { useEffect as useEffect4, useState as useState4 } from "react";
143
144
  import { useTranslation as useTranslation12 } from "react-i18next";
144
145
  import { useNavigate, useParams } from "react-router-dom";
145
146
 
@@ -155,7 +156,7 @@ import {
155
156
  toast as toast3,
156
157
  usePrompt
157
158
  } from "@medusajs/ui";
158
- import { useEffect as useEffect3, useMemo as useMemo6, useState as useState5 } from "react";
159
+ import { useEffect as useEffect3, useMemo as useMemo7, useState as useState3 } from "react";
159
160
  import { useForm } from "react-hook-form";
160
161
  import { useTranslation as useTranslation11 } from "react-i18next";
161
162
 
@@ -183,8 +184,8 @@ var ExchangeCreateSchema = z.object({
183
184
  });
184
185
 
185
186
  // src/pages/orders/order-create-exchange/components/exchange-create-form/exchange-inbound-section.tsx
186
- import { Alert, Button, Heading, Text as Text2, toast } from "@medusajs/ui";
187
- import { useEffect, useMemo as useMemo3, useState as useState2 } from "react";
187
+ import { Button, Heading, Text as Text2, toast } from "@medusajs/ui";
188
+ import { useEffect, useMemo as useMemo3 } from "react";
188
189
  import { useFieldArray } from "react-hook-form";
189
190
  import { useTranslation as useTranslation5 } from "react-i18next";
190
191
 
@@ -450,13 +451,20 @@ function ExchangeInboundItem({
450
451
  form,
451
452
  onRemove,
452
453
  onUpdate,
453
- index
454
+ index,
455
+ locationId,
456
+ locationName
454
457
  }) {
455
458
  const { t } = useTranslation4();
456
459
  const { return_reasons = [] } = useReturnReasons({ fields: "+label" });
457
460
  const formItem = form.watch(`inbound_items.${index}`);
458
461
  const showReturnReason = typeof formItem.reason_id === "string";
459
462
  const showNote = typeof formItem.note === "string";
463
+ const restockRows = locationId ? getOfferRestockPreview(
464
+ item,
465
+ formItem?.quantity ?? 0
466
+ ) : [];
467
+ const offerSku = item.offer?.sku ?? item.variant_sku ?? null;
460
468
  return /* @__PURE__ */ jsxs("div", { className: "bg-ui-bg-subtle shadow-elevation-card-rest my-2 rounded-xl ", children: [
461
469
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-x-2 gap-y-2 p-3 text-sm md:flex-row", children: [
462
470
  /* @__PURE__ */ jsxs("div", { className: "flex flex-1 items-center gap-x-3", children: [
@@ -545,6 +553,22 @@ function ExchangeInboundItem({
545
553
  )
546
554
  ] })
547
555
  ] }),
556
+ restockRows.length > 0 && /* @__PURE__ */ jsx3("div", { className: "bg-ui-bg-subtle flex flex-col gap-y-1 rounded-md px-3 py-2", children: restockRows.map((row) => /* @__PURE__ */ jsx3(
557
+ Text,
558
+ {
559
+ size: "xsmall",
560
+ className: "text-ui-fg-subtle",
561
+ "data-testid": `exchange-inbound-item-${item.id}-restock-${row.inventoryItemId}`,
562
+ children: t("orders.returns.restockPreview", {
563
+ quantity: formItem?.quantity ?? 0,
564
+ offerSku: offerSku ?? "\u2014",
565
+ delta: row.delta,
566
+ inventoryItem: row.inventoryItemLabel,
567
+ location: locationName ?? "\u2014"
568
+ })
569
+ },
570
+ row.inventoryItemId
571
+ )) }),
548
572
  /* @__PURE__ */ jsxs(Fragment, { children: [
549
573
  showReturnReason && /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-1 gap-2 p-3 md:grid-cols-2", children: [
550
574
  /* @__PURE__ */ jsxs("div", { children: [
@@ -656,7 +680,6 @@ var ExchangeInboundSection = ({
656
680
  }) => {
657
681
  const { t } = useTranslation5();
658
682
  const { setIsOpen } = useStackedModal();
659
- const [inventoryMap, setInventoryMap] = useState2({});
660
683
  const { mutateAsync: updateReturn } = useUpdateReturn(
661
684
  preview?.order_change?.return_id,
662
685
  order.id
@@ -692,12 +715,17 @@ var ExchangeInboundSection = ({
692
715
  [order.items]
693
716
  );
694
717
  const locationId = form.watch("location_id");
695
- const { stock_locations = [] } = useStockLocations({ limit: 999 });
718
+ const sellerId = order.seller?.id;
719
+ const { stock_locations = [] } = useStockLocations({
720
+ limit: 999,
721
+ ...sellerId ? { seller_id: sellerId } : {}
722
+ });
696
723
  const { shipping_options = [] } = useShippingOptions(
697
724
  {
698
725
  limit: 999,
699
726
  fields: "*prices,+service_zone.fulfillment_set.location.id",
700
- stock_location_id: locationId
727
+ stock_location_id: locationId,
728
+ ...sellerId ? { seller_id: sellerId } : {}
701
729
  },
702
730
  {
703
731
  enabled: !!locationId
@@ -830,49 +858,6 @@ var ExchangeInboundSection = ({
830
858
  );
831
859
  }
832
860
  };
833
- const showLevelsWarning = useMemo3(() => {
834
- if (!locationId) {
835
- return false;
836
- }
837
- const allItemsHaveLocation = inboundItems.map((_i) => {
838
- const item = itemsMap.get(_i.item_id);
839
- if (!item?.variant_id || !item?.variant) {
840
- return true;
841
- }
842
- if (!item.variant?.manage_inventory) {
843
- return true;
844
- }
845
- return inventoryMap[item.variant_id]?.find(
846
- (l) => l.location_id === locationId
847
- );
848
- }).every(Boolean);
849
- return !allItemsHaveLocation;
850
- }, [
851
- inboundItems,
852
- inventoryMap,
853
- locationId,
854
- itemsMap
855
- ]);
856
- useEffect(() => {
857
- const getInventoryMap = async () => {
858
- const ret = {};
859
- if (!inboundItems.length) {
860
- return ret;
861
- }
862
- const variantIds = inboundItems.map((item) => item?.variant_id).filter(Boolean);
863
- const variants = (await sdk.admin.productVariants.query({
864
- id: variantIds,
865
- fields: "*inventory.location_levels"
866
- })).variants;
867
- variants.forEach((variant) => {
868
- ret[variant.id] = variant.inventory?.[0]?.location_levels || [];
869
- });
870
- return ret;
871
- };
872
- getInventoryMap().then((map) => {
873
- setInventoryMap(map);
874
- });
875
- }, [inboundItems]);
876
861
  return /* @__PURE__ */ jsxs2("div", { children: [
877
862
  /* @__PURE__ */ jsxs2("div", { className: "mt-8 flex items-center justify-between", children: [
878
863
  /* @__PURE__ */ jsx4(Heading, { level: "h2", children: t("orders.returns.inbound") }),
@@ -925,6 +910,8 @@ var ExchangeInboundSection = ({
925
910
  previewItem: inboundItemsMap.get(item.item_id),
926
911
  currencyCode: order.currency_code,
927
912
  form,
913
+ locationId,
914
+ locationName: stock_locations.find((l) => l.id === locationId)?.name,
928
915
  onRemove: () => {
929
916
  const actionId = previewInboundItems.find((i) => i.id === item.item_id)?.actions?.find((a) => a.action === "RETURN_ITEM")?.id;
930
917
  if (actionId) {
@@ -1040,46 +1027,40 @@ var ExchangeInboundSection = ({
1040
1027
  }
1041
1028
  )
1042
1029
  ] })
1043
- ] }),
1044
- showLevelsWarning && /* @__PURE__ */ jsxs2(Alert, { variant: "warning", dismissible: true, className: "mt-4 p-5", children: [
1045
- /* @__PURE__ */ jsx4("div", { className: "text-ui-fg-subtle txt-small pb-2 font-medium leading-[20px]", children: t("orders.returns.noInventoryLevel") }),
1046
- /* @__PURE__ */ jsx4(Text2, { className: "text-ui-fg-subtle txt-small leading-normal", children: t("orders.returns.noInventoryLevelDesc") })
1047
1030
  ] })
1048
1031
  ] });
1049
1032
  };
1050
1033
 
1051
1034
  // src/pages/orders/order-create-exchange/components/exchange-create-form/exchange-outbound-section.tsx
1052
- import { Alert as Alert2, Button as Button2, Heading as Heading2, Text as Text4, toast as toast2 } from "@medusajs/ui";
1053
- import { useEffect as useEffect2, useMemo as useMemo5, useState as useState4 } from "react";
1035
+ import { Button as Button2, Heading as Heading2, toast as toast2 } from "@medusajs/ui";
1036
+ import { useEffect as useEffect2, useMemo as useMemo6 } from "react";
1054
1037
  import { useFieldArray as useFieldArray2 } from "react-hook-form";
1055
1038
  import { useTranslation as useTranslation10 } from "react-i18next";
1056
1039
 
1057
1040
  // src/pages/orders/order-create-exchange/components/add-exchange-outbound-items-table/add-exchange-outbound-items-table.tsx
1058
- import { useState as useState3 } from "react";
1041
+ import { useMemo as useMemo5, useState as useState2 } from "react";
1059
1042
  import { useTranslation as useTranslation8 } from "react-i18next";
1060
1043
 
1061
1044
  // src/pages/orders/order-create-exchange/components/add-exchange-outbound-items-table/use-exchange-outbound-item-table-columns.tsx
1062
- import { Checkbox as Checkbox2 } from "@medusajs/ui";
1045
+ import { Checkbox as Checkbox2, Text as Text3 } from "@medusajs/ui";
1063
1046
  import { createColumnHelper as createColumnHelper2 } from "@tanstack/react-table";
1064
1047
  import { useMemo as useMemo4 } from "react";
1065
1048
  import { useTranslation as useTranslation6 } from "react-i18next";
1066
- import { jsx as jsx5 } from "react/jsx-runtime";
1049
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
1067
1050
  var columnHelper2 = createColumnHelper2();
1068
- var useExchangeOutboundItemTableColumns = (_currencyCode) => {
1051
+ var useExchangeOutboundItemTableColumns = () => {
1069
1052
  const { t } = useTranslation6();
1070
1053
  return useMemo4(
1071
1054
  () => [
1072
1055
  columnHelper2.display({
1073
1056
  id: "select",
1074
- header: ({ table }) => {
1075
- return /* @__PURE__ */ jsx5(
1076
- Checkbox2,
1077
- {
1078
- checked: table.getIsSomePageRowsSelected() ? "indeterminate" : table.getIsAllPageRowsSelected(),
1079
- onCheckedChange: (value) => table.toggleAllPageRowsSelected(!!value)
1080
- }
1081
- );
1082
- },
1057
+ header: ({ table }) => /* @__PURE__ */ jsx5(
1058
+ Checkbox2,
1059
+ {
1060
+ checked: table.getIsSomePageRowsSelected() ? "indeterminate" : table.getIsAllPageRowsSelected(),
1061
+ onCheckedChange: (value) => table.toggleAllPageRowsSelected(!!value)
1062
+ }
1063
+ ),
1083
1064
  cell: ({ row }) => {
1084
1065
  const isSelectable = row.getCanSelect();
1085
1066
  return /* @__PURE__ */ jsx5(
@@ -1097,19 +1078,44 @@ var useExchangeOutboundItemTableColumns = (_currencyCode) => {
1097
1078
  }),
1098
1079
  columnHelper2.display({
1099
1080
  id: "product",
1100
- header: () => /* @__PURE__ */ jsx5(ProductHeader, {}),
1081
+ header: t("fields.product"),
1101
1082
  cell: ({ row }) => {
1102
- return /* @__PURE__ */ jsx5(ProductCell, { product: row.original.product });
1083
+ const variant = row.original.product_variant;
1084
+ const productTitle = variant?.product?.title;
1085
+ if (!productTitle) {
1086
+ return /* @__PURE__ */ jsx5(PlaceholderCell, {});
1087
+ }
1088
+ return /* @__PURE__ */ jsxs3("div", { className: "flex h-full w-full max-w-[300px] items-center gap-x-3 overflow-hidden", children: [
1089
+ /* @__PURE__ */ jsx5(Thumbnail, { src: variant?.product?.thumbnail }),
1090
+ /* @__PURE__ */ jsx5(
1091
+ Text3,
1092
+ {
1093
+ size: "small",
1094
+ leading: "compact",
1095
+ className: "truncate",
1096
+ title: productTitle,
1097
+ children: productTitle
1098
+ }
1099
+ )
1100
+ ] });
1103
1101
  }
1104
1102
  }),
1105
1103
  columnHelper2.accessor("sku", {
1106
1104
  header: t("fields.sku"),
1107
1105
  cell: ({ getValue }) => {
1108
- return getValue() || "-";
1106
+ const sku = getValue();
1107
+ if (!sku) return /* @__PURE__ */ jsx5(PlaceholderCell, {});
1108
+ return /* @__PURE__ */ jsx5(Text3, { size: "small", leading: "compact", className: "truncate", children: sku });
1109
1109
  }
1110
1110
  }),
1111
- columnHelper2.accessor("title", {
1112
- header: t("fields.title")
1111
+ columnHelper2.display({
1112
+ id: "variant_title",
1113
+ header: t("fields.title"),
1114
+ cell: ({ row }) => {
1115
+ const title = row.original.product_variant?.title;
1116
+ if (!title) return /* @__PURE__ */ jsx5(PlaceholderCell, {});
1117
+ return /* @__PURE__ */ jsx5(Text3, { size: "small", leading: "compact", className: "truncate", children: title });
1118
+ }
1113
1119
  })
1114
1120
  ],
1115
1121
  [t]
@@ -1159,71 +1165,141 @@ var useExchangeOutboundItemTableQuery = ({
1159
1165
  import { jsx as jsx6 } from "react/jsx-runtime";
1160
1166
  var PAGE_SIZE2 = 50;
1161
1167
  var PREFIX2 = "rit";
1168
+ var OFFER_PICKER_FIELDS = [
1169
+ "id",
1170
+ "sku",
1171
+ "variant_id",
1172
+ "seller_id",
1173
+ "prices.amount",
1174
+ "prices.currency_code",
1175
+ "product_variant.id",
1176
+ "product_variant.title",
1177
+ "product_variant.product.id",
1178
+ "product_variant.product.title",
1179
+ "product_variant.product.thumbnail",
1180
+ "product_variant.manage_inventory",
1181
+ "product_variant.inventory_quantity",
1182
+ "product_variant.inventory_items.required_quantity",
1183
+ "product_variant.inventory_items.inventory.location_levels.available_quantity"
1184
+ ].join(",");
1185
+ var offerHasInventory = (offer) => {
1186
+ const variant = offer.product_variant;
1187
+ if (!variant) return false;
1188
+ if (variant.manage_inventory === false) return true;
1189
+ const links = variant.inventory_items ?? [];
1190
+ if (!links.length) {
1191
+ return (variant.inventory_quantity ?? 0) > 0;
1192
+ }
1193
+ return links.every((link) => {
1194
+ const available = (link.inventory?.location_levels ?? []).reduce(
1195
+ (acc, lvl) => acc + (lvl.available_quantity ?? 0),
1196
+ 0
1197
+ );
1198
+ const required = link.required_quantity ?? 1;
1199
+ return required > 0 && available >= required;
1200
+ });
1201
+ };
1162
1202
  var AddExchangeOutboundItemsTable = ({
1203
+ currencyCode,
1163
1204
  onSelectionChange,
1164
- selectedItems,
1165
- currencyCode
1205
+ selectedItems = []
1166
1206
  }) => {
1167
1207
  const { t } = useTranslation8();
1168
- const [rowSelection, setRowSelection] = useState3(
1208
+ const [rowSelection, setRowSelection] = useState2(
1169
1209
  selectedItems.reduce((acc, id) => {
1170
1210
  acc[id] = true;
1171
1211
  return acc;
1172
1212
  }, {})
1173
1213
  );
1174
- const updater = (fn) => {
1175
- const newState = typeof fn === "function" ? fn(rowSelection) : fn;
1176
- setRowSelection(newState);
1177
- onSelectionChange(Object.keys(newState));
1178
- };
1179
1214
  const { searchParams, raw } = useExchangeOutboundItemTableQuery({
1180
1215
  pageSize: PAGE_SIZE2,
1181
1216
  prefix: PREFIX2
1182
1217
  });
1183
- const columns = useExchangeOutboundItemTableColumns(currencyCode);
1218
+ const offersResponse = useOffers({
1219
+ ...searchParams,
1220
+ fields: OFFER_PICKER_FIELDS
1221
+ });
1222
+ const rawCount = offersResponse.count ?? 0;
1223
+ const offers = useMemo5(() => {
1224
+ const rawOffers = offersResponse.offers ?? [];
1225
+ return rawOffers.filter((offer) => {
1226
+ if (currencyCode) {
1227
+ const hasPrice = (offer.prices ?? []).some(
1228
+ (p) => p.currency_code === currencyCode
1229
+ );
1230
+ if (!hasPrice) return false;
1231
+ }
1232
+ return offerHasInventory(offer);
1233
+ });
1234
+ }, [offersResponse.offers, currencyCode]);
1235
+ const count = offers.length;
1236
+ void rawCount;
1237
+ const columns = useExchangeOutboundItemTableColumns();
1184
1238
  const filters = useExchangeOutboundItemTableFilters();
1239
+ const selectionByOfferId = useMemo5(() => {
1240
+ const map = /* @__PURE__ */ new Map();
1241
+ for (const offer of offers) {
1242
+ if (offer.id && offer.variant_id) {
1243
+ map.set(offer.id, { variantId: offer.variant_id, offerId: offer.id });
1244
+ }
1245
+ }
1246
+ return map;
1247
+ }, [offers]);
1248
+ const updater = (fn) => {
1249
+ const newState = typeof fn === "function" ? fn(rowSelection) : fn;
1250
+ setRowSelection(newState);
1251
+ const pairs = Object.keys(newState).map((offerId) => selectionByOfferId.get(offerId)).filter((p) => !!p);
1252
+ onSelectionChange(pairs);
1253
+ };
1185
1254
  const { table } = useDataTable({
1186
- data: [],
1255
+ data: offers,
1187
1256
  columns,
1188
- count: 0,
1257
+ count,
1189
1258
  enablePagination: true,
1190
- getRowId: (row) => row.id,
1259
+ // Row id is the offer id so each offer surfaces as a distinct row and the
1260
+ // selection can be turned back into `{ variantId, offerId }` pairs.
1261
+ getRowId: (row) => row.id ?? row.variant_id,
1191
1262
  pageSize: PAGE_SIZE2,
1192
- enableRowSelection: (_row) => {
1193
- return true;
1194
- },
1263
+ enableRowSelection: () => true,
1195
1264
  rowSelection: {
1196
1265
  state: rowSelection,
1197
1266
  updater
1198
1267
  }
1199
1268
  });
1200
- return /* @__PURE__ */ jsx6("div", { className: "flex size-full flex-col overflow-hidden", children: /* @__PURE__ */ jsx6(
1201
- _DataTable,
1269
+ return /* @__PURE__ */ jsx6(
1270
+ "div",
1202
1271
  {
1203
- table,
1204
- columns,
1205
- pageSize: PAGE_SIZE2,
1206
- count,
1207
- filters,
1208
- pagination: true,
1209
- layout: "fill",
1210
- search: true,
1211
- orderBy: [
1212
- { key: "product_id", label: t("fields.product") },
1213
- { key: "title", label: t("fields.title") },
1214
- { key: "sku", label: t("fields.sku") }
1215
- ],
1216
- prefix: PREFIX2,
1217
- queryObject: raw
1272
+ className: "flex size-full flex-col overflow-hidden",
1273
+ "data-testid": "add-offers-picker",
1274
+ children: /* @__PURE__ */ jsx6(
1275
+ _DataTable,
1276
+ {
1277
+ table,
1278
+ columns,
1279
+ pageSize: PAGE_SIZE2,
1280
+ count,
1281
+ filters,
1282
+ pagination: true,
1283
+ layout: "fill",
1284
+ search: true,
1285
+ orderBy: [
1286
+ { key: "sku", label: t("fields.sku") },
1287
+ { key: "created_at", label: t("fields.createdAt") },
1288
+ { key: "updated_at", label: t("fields.updatedAt") }
1289
+ ],
1290
+ prefix: PREFIX2,
1291
+ queryObject: raw
1292
+ }
1293
+ )
1218
1294
  }
1219
- ) });
1295
+ );
1220
1296
  };
1221
1297
 
1222
1298
  // src/pages/orders/order-create-exchange/components/exchange-create-form/exchange-outbound-item.tsx
1223
1299
  import { XCircle as XCircle2 } from "@medusajs/icons";
1224
- import { Input as Input2, Text as Text3 } from "@medusajs/ui";
1300
+ import { Input as Input2, Text as Text4 } from "@medusajs/ui";
1225
1301
  import { useTranslation as useTranslation9 } from "react-i18next";
1226
- import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
1302
+ import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
1227
1303
  function ExchangeOutboundItem({
1228
1304
  previewItem,
1229
1305
  currencyCode,
@@ -1233,33 +1309,33 @@ function ExchangeOutboundItem({
1233
1309
  index
1234
1310
  }) {
1235
1311
  const { t } = useTranslation9();
1236
- return /* @__PURE__ */ jsx7("div", { className: "bg-ui-bg-subtle shadow-elevation-card-rest my-2 rounded-xl ", children: /* @__PURE__ */ jsxs3("div", { className: "flex flex-col items-center gap-x-2 gap-y-2 p-3 text-sm md:flex-row", children: [
1237
- /* @__PURE__ */ jsxs3("div", { className: "flex flex-1 items-center gap-x-3", children: [
1312
+ return /* @__PURE__ */ jsx7("div", { className: "bg-ui-bg-subtle shadow-elevation-card-rest my-2 rounded-xl ", children: /* @__PURE__ */ jsxs4("div", { className: "flex flex-col items-center gap-x-2 gap-y-2 p-3 text-sm md:flex-row", children: [
1313
+ /* @__PURE__ */ jsxs4("div", { className: "flex flex-1 items-center gap-x-3", children: [
1238
1314
  /* @__PURE__ */ jsx7(Thumbnail, { src: previewItem.thumbnail }),
1239
- /* @__PURE__ */ jsxs3("div", { className: "flex flex-col", children: [
1240
- /* @__PURE__ */ jsxs3("div", { children: [
1241
- /* @__PURE__ */ jsxs3(Text3, { className: "txt-small", as: "span", weight: "plus", children: [
1315
+ /* @__PURE__ */ jsxs4("div", { className: "flex flex-col", children: [
1316
+ /* @__PURE__ */ jsxs4("div", { children: [
1317
+ /* @__PURE__ */ jsxs4(Text4, { className: "txt-small", as: "span", weight: "plus", children: [
1242
1318
  previewItem.title,
1243
1319
  " "
1244
1320
  ] }),
1245
- previewItem.variant_sku && /* @__PURE__ */ jsxs3("span", { children: [
1321
+ previewItem.variant_sku && /* @__PURE__ */ jsxs4("span", { children: [
1246
1322
  "(",
1247
1323
  previewItem.variant_sku,
1248
1324
  ")"
1249
1325
  ] })
1250
1326
  ] }),
1251
- /* @__PURE__ */ jsx7(Text3, { as: "div", className: "text-ui-fg-subtle txt-small", children: previewItem.subtitle })
1327
+ /* @__PURE__ */ jsx7(Text4, { as: "div", className: "text-ui-fg-subtle txt-small", children: previewItem.subtitle })
1252
1328
  ] })
1253
1329
  ] }),
1254
- /* @__PURE__ */ jsxs3("div", { className: "flex flex-1 justify-between", children: [
1255
- /* @__PURE__ */ jsxs3("div", { className: "flex flex-grow items-center gap-2", children: [
1330
+ /* @__PURE__ */ jsxs4("div", { className: "flex flex-1 justify-between", children: [
1331
+ /* @__PURE__ */ jsxs4("div", { className: "flex flex-grow items-center gap-2", children: [
1256
1332
  /* @__PURE__ */ jsx7(
1257
1333
  Form.Field,
1258
1334
  {
1259
1335
  control: form.control,
1260
1336
  name: `outbound_items.${index}.quantity`,
1261
1337
  render: ({ field }) => {
1262
- return /* @__PURE__ */ jsxs3(Form.Item, { children: [
1338
+ return /* @__PURE__ */ jsxs4(Form.Item, { children: [
1263
1339
  /* @__PURE__ */ jsx7(Form.Control, { children: /* @__PURE__ */ jsx7(
1264
1340
  Input2,
1265
1341
  {
@@ -1282,7 +1358,7 @@ function ExchangeOutboundItem({
1282
1358
  }
1283
1359
  }
1284
1360
  ),
1285
- /* @__PURE__ */ jsx7(Text3, { className: "txt-small text-ui-fg-subtle", children: t("fields.qty") })
1361
+ /* @__PURE__ */ jsx7(Text4, { className: "txt-small text-ui-fg-subtle", children: t("fields.qty") })
1286
1362
  ] }),
1287
1363
  /* @__PURE__ */ jsx7("div", { className: "text-ui-fg-subtle txt-small mr-2 flex flex-shrink-0", children: /* @__PURE__ */ jsx7(
1288
1364
  MoneyAmountCell,
@@ -1312,7 +1388,7 @@ function ExchangeOutboundItem({
1312
1388
  }
1313
1389
 
1314
1390
  // src/pages/orders/order-create-exchange/components/exchange-create-form/exchange-outbound-section.tsx
1315
- import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
1391
+ import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
1316
1392
  var itemsToAdd2 = [];
1317
1393
  var itemsToRemove2 = [];
1318
1394
  var ExchangeOutboundSection = ({
@@ -1323,7 +1399,6 @@ var ExchangeOutboundSection = ({
1323
1399
  }) => {
1324
1400
  const { t } = useTranslation10();
1325
1401
  const { setIsOpen } = useStackedModal();
1326
- const [inventoryMap, setInventoryMap] = useState4({});
1327
1402
  const { shipping_options = [] } = useOrderShippingOptions(order.id);
1328
1403
  const outboundShippingOptions = shipping_options.filter(
1329
1404
  (so) => !so.rules?.find((r) => r.attribute === "is_return" && r.value === "true")
@@ -1345,7 +1420,7 @@ var ExchangeOutboundSection = ({
1345
1420
  exchange.id,
1346
1421
  order.id
1347
1422
  );
1348
- const previewOutboundItems = useMemo5(
1423
+ const previewOutboundItems = useMemo6(
1349
1424
  () => preview?.items?.filter(
1350
1425
  (i) => !!i.actions?.find(
1351
1426
  (a) => a.exchange_id === exchange.id && a.action === "ITEM_ADD"
@@ -1353,10 +1428,6 @@ var ExchangeOutboundSection = ({
1353
1428
  ),
1354
1429
  [preview.items, exchange.id]
1355
1430
  );
1356
- const variantItemMap = useMemo5(
1357
- () => new Map(order?.items?.map((i) => [i.variant_id, i])),
1358
- [order.items]
1359
- );
1360
1431
  const {
1361
1432
  fields: outboundItems,
1362
1433
  append,
@@ -1366,7 +1437,7 @@ var ExchangeOutboundSection = ({
1366
1437
  name: "outbound_items",
1367
1438
  control: form.control
1368
1439
  });
1369
- const variantOutboundMap = useMemo5(
1440
+ const variantOutboundMap = useMemo6(
1370
1441
  () => new Map(previewOutboundItems.map((i) => [i.variant_id, i])),
1371
1442
  [previewOutboundItems]
1372
1443
  );
@@ -1405,15 +1476,15 @@ var ExchangeOutboundSection = ({
1405
1476
  update,
1406
1477
  append
1407
1478
  ]);
1408
- const locationId = form.watch("location_id");
1409
1479
  const showOutboundItemsPlaceholder = !outboundItems.length;
1410
1480
  const onItemsSelected = async () => {
1411
1481
  if (itemsToAdd2.length) {
1412
1482
  await addOutboundItem(
1413
1483
  {
1414
- items: itemsToAdd2.map((variantId) => ({
1484
+ items: itemsToAdd2.map(({ variantId, offerId }) => ({
1415
1485
  variant_id: variantId,
1416
- quantity: 1
1486
+ quantity: 1,
1487
+ metadata: { offer_id: offerId }
1417
1488
  }))
1418
1489
  },
1419
1490
  {
@@ -1469,73 +1540,33 @@ var ExchangeOutboundSection = ({
1469
1540
  );
1470
1541
  }
1471
1542
  };
1472
- const showLevelsWarning = useMemo5(() => {
1473
- if (!locationId) {
1474
- return false;
1475
- }
1476
- const allItemsHaveLocation = outboundItems.map((i) => {
1477
- const item = variantItemMap.get(i.variant_id);
1478
- if (!item?.variant_id || !item?.variant) {
1479
- return true;
1480
- }
1481
- if (!item.variant?.manage_inventory) {
1482
- return true;
1483
- }
1484
- return inventoryMap[item.variant_id]?.find(
1485
- (l) => l.location_id === locationId
1486
- );
1487
- }).every(Boolean);
1488
- return !allItemsHaveLocation;
1489
- }, [
1490
- outboundItems,
1491
- inventoryMap,
1492
- locationId,
1493
- variantItemMap
1494
- ]);
1495
- useEffect2(() => {
1496
- const getInventoryMap = async () => {
1497
- const ret = {};
1498
- if (!outboundItems.length) {
1499
- return ret;
1500
- }
1501
- const variantIds = outboundItems.map((item) => item?.variant_id).filter(Boolean);
1502
- const variants = (await sdk.admin.productVariants.query({
1503
- id: variantIds,
1504
- fields: "*inventory.location_levels"
1505
- })).variants;
1506
- variants.forEach((variant) => {
1507
- ret[variant.id] = variant.inventory?.[0]?.location_levels || [];
1508
- });
1509
- return ret;
1510
- };
1511
- getInventoryMap().then((map) => {
1512
- setInventoryMap(map);
1513
- });
1514
- }, [outboundItems]);
1515
- return /* @__PURE__ */ jsxs4("div", { children: [
1516
- /* @__PURE__ */ jsxs4("div", { className: "mt-8 flex items-center justify-between", children: [
1543
+ return /* @__PURE__ */ jsxs5("div", { children: [
1544
+ /* @__PURE__ */ jsxs5("div", { className: "mt-8 flex items-center justify-between", children: [
1517
1545
  /* @__PURE__ */ jsx8(Heading2, { level: "h2", children: t("orders.returns.outbound") }),
1518
- /* @__PURE__ */ jsxs4(StackedFocusModal, { id: "outbound-items", children: [
1546
+ /* @__PURE__ */ jsxs5(StackedFocusModal, { id: "outbound-items", children: [
1519
1547
  /* @__PURE__ */ jsx8(StackedFocusModal.Trigger, { asChild: true, children: /* @__PURE__ */ jsx8("button", { type: "button", className: "focus-visible:shadow-borders-focus transition-fg txt-compact-small-plus cursor-pointer text-blue-500 outline-none hover:text-blue-400", children: t("actions.addItems") }) }),
1520
- /* @__PURE__ */ jsxs4(StackedFocusModal.Content, { children: [
1548
+ /* @__PURE__ */ jsxs5(StackedFocusModal.Content, { children: [
1521
1549
  /* @__PURE__ */ jsx8(StackedFocusModal.Header, {}),
1522
1550
  /* @__PURE__ */ jsx8(
1523
1551
  AddExchangeOutboundItemsTable,
1524
1552
  {
1525
- selectedItems: outboundItems.map((i) => i.variant_id),
1553
+ selectedItems: outboundItems.map(
1554
+ (i) => (typeof i.metadata?.offer_id === "string" ? i.metadata.offer_id : null) ?? i.variant_id
1555
+ ).filter((v) => !!v),
1526
1556
  currencyCode: order.currency_code,
1527
1557
  onSelectionChange: (finalSelection) => {
1528
- const alreadySelected = outboundItems.map((i) => i.variant_id);
1558
+ const alreadyVariantIds = outboundItems.map((i) => i.variant_id).filter((v) => !!v);
1529
1559
  itemsToAdd2 = finalSelection.filter(
1530
- (selection) => !alreadySelected.includes(selection)
1560
+ ({ variantId }) => !alreadyVariantIds.includes(variantId)
1531
1561
  );
1532
- itemsToRemove2 = alreadySelected.filter(
1533
- (selection) => !finalSelection.includes(selection)
1562
+ const finalVariantIds = finalSelection.map((s) => s.variantId);
1563
+ itemsToRemove2 = alreadyVariantIds.filter(
1564
+ (variantId) => !finalVariantIds.includes(variantId)
1534
1565
  );
1535
1566
  }
1536
1567
  }
1537
1568
  ),
1538
- /* @__PURE__ */ jsx8(StackedFocusModal.Footer, { children: /* @__PURE__ */ jsx8("div", { className: "flex w-full items-center justify-end gap-x-4", children: /* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-end gap-x-2", children: [
1569
+ /* @__PURE__ */ jsx8(StackedFocusModal.Footer, { children: /* @__PURE__ */ jsx8("div", { className: "flex w-full items-center justify-end gap-x-4", children: /* @__PURE__ */ jsxs5("div", { className: "flex items-center justify-end gap-x-2", children: [
1539
1570
  /* @__PURE__ */ jsx8(RouteFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsx8(Button2, { type: "button", variant: "secondary", size: "small", children: t("actions.cancel") }) }),
1540
1571
  /* @__PURE__ */ jsx8(
1541
1572
  Button2,
@@ -1590,8 +1621,8 @@ var ExchangeOutboundSection = ({
1590
1621
  item.id
1591
1622
  )
1592
1623
  ),
1593
- !showOutboundItemsPlaceholder && /* @__PURE__ */ jsx8("div", { className: "mt-8 flex flex-col gap-y-4", children: /* @__PURE__ */ jsxs4("div", { className: "grid grid-cols-1 gap-2 md:grid-cols-2", children: [
1594
- /* @__PURE__ */ jsxs4("div", { children: [
1624
+ !showOutboundItemsPlaceholder && /* @__PURE__ */ jsx8("div", { className: "mt-8 flex flex-col gap-y-4", children: /* @__PURE__ */ jsxs5("div", { className: "grid grid-cols-1 gap-2 md:grid-cols-2", children: [
1625
+ /* @__PURE__ */ jsxs5("div", { children: [
1595
1626
  /* @__PURE__ */ jsx8(Form.Label, { children: t("orders.exchanges.outboundShipping") }),
1596
1627
  /* @__PURE__ */ jsx8(Form.Hint, { className: "!mt-1", children: t("orders.exchanges.outboundShippingHint") })
1597
1628
  ] }),
@@ -1622,16 +1653,12 @@ var ExchangeOutboundSection = ({
1622
1653
  }
1623
1654
  }
1624
1655
  )
1625
- ] }) }),
1626
- showLevelsWarning && /* @__PURE__ */ jsxs4(Alert2, { variant: "warning", dismissible: true, className: "mt-4 p-5", children: [
1627
- /* @__PURE__ */ jsx8("div", { className: "text-ui-fg-subtle txt-small pb-2 font-medium leading-[20px]", children: t("orders.returns.noInventoryLevel") }),
1628
- /* @__PURE__ */ jsx8(Text4, { className: "text-ui-fg-subtle txt-small leading-normal", children: t("orders.returns.noInventoryLevelDesc") })
1629
- ] })
1656
+ ] }) })
1630
1657
  ] });
1631
1658
  };
1632
1659
 
1633
1660
  // src/pages/orders/order-create-exchange/components/exchange-create-form/exchange-create-form.tsx
1634
- import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
1661
+ import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
1635
1662
  var IS_CANCELING = false;
1636
1663
  var ExchangeCreateForm = ({
1637
1664
  order,
@@ -1641,13 +1668,13 @@ var ExchangeCreateForm = ({
1641
1668
  }) => {
1642
1669
  const { t } = useTranslation11();
1643
1670
  const { handleSuccess } = useRouteModal();
1644
- const [isInboundShippingPriceEdit, setIsInboundShippingPriceEdit] = useState5(false);
1645
- const [isOutboundShippingPriceEdit, setIsOutboundShippingPriceEdit] = useState5(false);
1646
- const [customInboundShippingAmount, setCustomInboundShippingAmount] = useState5({
1671
+ const [isInboundShippingPriceEdit, setIsInboundShippingPriceEdit] = useState3(false);
1672
+ const [isOutboundShippingPriceEdit, setIsOutboundShippingPriceEdit] = useState3(false);
1673
+ const [customInboundShippingAmount, setCustomInboundShippingAmount] = useState3({
1647
1674
  value: "0",
1648
1675
  float: 0
1649
1676
  });
1650
- const [customOutboundShippingAmount, setCustomOutboundShippingAmount] = useState5({
1677
+ const [customOutboundShippingAmount, setCustomOutboundShippingAmount] = useState3({
1651
1678
  value: "0",
1652
1679
  float: 0
1653
1680
  });
@@ -1662,7 +1689,7 @@ var ExchangeCreateForm = ({
1662
1689
  isPending: isUpdatingInboundShipping
1663
1690
  } = useUpdateExchangeOutboundShipping(exchange.id, order.id);
1664
1691
  const isRequestLoading = isConfirming || isCanceling || isUpdatingInboundShipping || isUpdatingOutboundShipping;
1665
- const previewItems = useMemo6(
1692
+ const previewItems = useMemo7(
1666
1693
  () => preview?.items?.filter(
1667
1694
  (i) => !!i.actions?.find((a) => a.exchange_id === exchange.id)
1668
1695
  ),
@@ -1784,19 +1811,19 @@ var ExchangeCreateForm = ({
1784
1811
  }
1785
1812
  };
1786
1813
  }, [t, cancelExchangeRequest]);
1787
- const inboundShippingTotal = useMemo6(() => {
1814
+ const inboundShippingTotal = useMemo7(() => {
1788
1815
  const method = preview.shipping_methods.find(
1789
1816
  (sm) => !!sm.actions?.find((a) => a.action === "SHIPPING_ADD" && !!a.return_id)
1790
1817
  );
1791
1818
  return method?.total || 0;
1792
1819
  }, [preview.shipping_methods]);
1793
- const outboundShippingTotal = useMemo6(() => {
1820
+ const outboundShippingTotal = useMemo7(() => {
1794
1821
  const method = preview.shipping_methods.find(
1795
1822
  (sm) => !!sm.actions?.find((a) => a.action === "SHIPPING_ADD" && !a.return_id)
1796
1823
  );
1797
1824
  return method?.total || 0;
1798
1825
  }, [preview.shipping_methods]);
1799
- return /* @__PURE__ */ jsx9(RouteFocusModal.Form, { form, "data-testid": "order-create-exchange-form", children: /* @__PURE__ */ jsxs5(
1826
+ return /* @__PURE__ */ jsx9(RouteFocusModal.Form, { form, "data-testid": "order-create-exchange-form", children: /* @__PURE__ */ jsxs6(
1800
1827
  KeyboundForm,
1801
1828
  {
1802
1829
  onSubmit: handleSubmit,
@@ -1809,7 +1836,7 @@ var ExchangeCreateForm = ({
1809
1836
  {
1810
1837
  className: "flex size-full justify-center overflow-y-auto",
1811
1838
  "data-testid": "order-create-exchange-body",
1812
- children: /* @__PURE__ */ jsxs5(
1839
+ children: /* @__PURE__ */ jsxs6(
1813
1840
  "div",
1814
1841
  {
1815
1842
  className: "mt-16 w-[720px] max-w-[100%] px-4 md:p-0",
@@ -1835,13 +1862,13 @@ var ExchangeCreateForm = ({
1835
1862
  exchange
1836
1863
  }
1837
1864
  ),
1838
- /* @__PURE__ */ jsxs5(
1865
+ /* @__PURE__ */ jsxs6(
1839
1866
  "div",
1840
1867
  {
1841
1868
  className: "mt-8 border-y border-dotted py-4",
1842
1869
  "data-testid": "order-create-exchange-totals",
1843
1870
  children: [
1844
- /* @__PURE__ */ jsxs5(
1871
+ /* @__PURE__ */ jsxs6(
1845
1872
  "div",
1846
1873
  {
1847
1874
  className: "mb-2 flex items-center justify-between",
@@ -1875,7 +1902,7 @@ var ExchangeCreateForm = ({
1875
1902
  ]
1876
1903
  }
1877
1904
  ),
1878
- /* @__PURE__ */ jsxs5(
1905
+ /* @__PURE__ */ jsxs6(
1879
1906
  "div",
1880
1907
  {
1881
1908
  className: "mb-2 flex items-center justify-between",
@@ -1909,9 +1936,9 @@ var ExchangeCreateForm = ({
1909
1936
  ]
1910
1937
  }
1911
1938
  ),
1912
- /* @__PURE__ */ jsxs5("div", { className: "mb-2 flex items-center justify-between", children: [
1939
+ /* @__PURE__ */ jsxs6("div", { className: "mb-2 flex items-center justify-between", children: [
1913
1940
  /* @__PURE__ */ jsx9("span", { className: "txt-small text-ui-fg-subtle", children: t("orders.returns.inboundShipping") }),
1914
- /* @__PURE__ */ jsxs5("span", { className: "txt-small text-ui-fg-subtle flex items-center", children: [
1941
+ /* @__PURE__ */ jsxs6("span", { className: "txt-small text-ui-fg-subtle flex items-center", children: [
1915
1942
  !isInboundShippingPriceEdit && /* @__PURE__ */ jsx9(
1916
1943
  IconButton2,
1917
1944
  {
@@ -1965,9 +1992,9 @@ var ExchangeCreateForm = ({
1965
1992
  ) : getStylizedAmount(inboundShippingTotal, order.currency_code)
1966
1993
  ] })
1967
1994
  ] }),
1968
- /* @__PURE__ */ jsxs5("div", { className: "flex items-center justify-between", children: [
1995
+ /* @__PURE__ */ jsxs6("div", { className: "flex items-center justify-between", children: [
1969
1996
  /* @__PURE__ */ jsx9("span", { className: "txt-small text-ui-fg-subtle", children: t("orders.exchanges.outboundShipping") }),
1970
- /* @__PURE__ */ jsxs5("span", { className: "txt-small text-ui-fg-subtle flex items-center", children: [
1997
+ /* @__PURE__ */ jsxs6("span", { className: "txt-small text-ui-fg-subtle flex items-center", children: [
1971
1998
  !isOutboundShippingPriceEdit && /* @__PURE__ */ jsx9(
1972
1999
  IconButton2,
1973
2000
  {
@@ -2024,7 +2051,7 @@ var ExchangeCreateForm = ({
2024
2051
  )
2025
2052
  ] })
2026
2053
  ] }),
2027
- /* @__PURE__ */ jsxs5(
2054
+ /* @__PURE__ */ jsxs6(
2028
2055
  "div",
2029
2056
  {
2030
2057
  className: "mt-4 flex items-center justify-between border-t border-dotted pt-4",
@@ -2066,8 +2093,8 @@ var ExchangeCreateForm = ({
2066
2093
  control: form.control,
2067
2094
  name: "send_notification",
2068
2095
  render: ({ field: { onChange, value, ...field } }) => {
2069
- return /* @__PURE__ */ jsxs5(Form.Item, { "data-testid": "order-create-exchange-notification-item", children: [
2070
- /* @__PURE__ */ jsxs5(
2096
+ return /* @__PURE__ */ jsxs6(Form.Item, { "data-testid": "order-create-exchange-notification-item", children: [
2097
+ /* @__PURE__ */ jsxs6(
2071
2098
  "div",
2072
2099
  {
2073
2100
  className: "flex items-center",
@@ -2091,7 +2118,7 @@ var ExchangeCreateForm = ({
2091
2118
  )
2092
2119
  }
2093
2120
  ),
2094
- /* @__PURE__ */ jsxs5("div", { className: "block", children: [
2121
+ /* @__PURE__ */ jsxs6("div", { className: "block", children: [
2095
2122
  /* @__PURE__ */ jsx9(Form.Label, { "data-testid": "order-create-exchange-notification-label", children: t("orders.returns.sendNotification") }),
2096
2123
  /* @__PURE__ */ jsx9(
2097
2124
  Form.Hint,
@@ -2123,7 +2150,7 @@ var ExchangeCreateForm = ({
2123
2150
  {
2124
2151
  className: "flex w-full items-center justify-end gap-x-4",
2125
2152
  "data-testid": "order-create-exchange-form-footer-actions",
2126
- children: /* @__PURE__ */ jsxs5("div", { className: "flex items-center justify-end gap-x-2", children: [
2153
+ children: /* @__PURE__ */ jsxs6("div", { className: "flex items-center justify-end gap-x-2", children: [
2127
2154
  /* @__PURE__ */ jsx9(RouteFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsx9(
2128
2155
  Button3,
2129
2156
  {
@@ -2166,7 +2193,7 @@ var ExchangeCreate = () => {
2166
2193
  fields: DEFAULT_FIELDS
2167
2194
  });
2168
2195
  const { order: preview } = useOrderPreview(id);
2169
- const [activeExchangeId, setActiveExchangeId] = useState6();
2196
+ const [activeExchangeId, setActiveExchangeId] = useState4();
2170
2197
  const { mutateAsync: createExchange } = useCreateExchange(order.id);
2171
2198
  const { exchange } = useExchange(activeExchangeId, void 0, {
2172
2199
  enabled: !!activeExchangeId