@mercurjs/vendor 2.2.0-rc.0 → 2.2.0-rc.2

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 (266) hide show
  1. package/dist/{[id]-4HO4S2PX.js → [id]-3GF4DR5K.js} +704 -670
  2. package/dist/{[id]-4LIIFGET.js → [id]-3HIZGJWE.js} +140 -51
  3. package/dist/{[id]-XP5KEMNX.js → [id]-AXGVRF7M.js} +99 -62
  4. package/dist/{[id]-N7JEZFXQ.js → [id]-C7IFTDTJ.js} +4 -3
  5. package/dist/{[id]-DT5YJVKG.js → [id]-DKF4YEXN.js} +32 -31
  6. package/dist/{[id]-DCGPICT3.js → [id]-IFWREJVP.js} +37 -36
  7. package/dist/{[id]-IEBZ6V3W.js → [id]-LJABCC3D.js} +43 -42
  8. package/dist/{[id]-3LNKC5OJ.js → [id]-MIASQVLP.js} +93 -52
  9. package/dist/{[id]-U6FKX5UQ.js → [id]-NGB5OLRW.js} +68 -54
  10. package/dist/{[id]-XB45DY2D.js → [id]-ONBG5DZJ.js} +121 -43
  11. package/dist/{[id]-CUBGVODE.js → [id]-OV5VX7KD.js} +102 -61
  12. package/dist/{[id]-5P5LTATX.js → [id]-QWI3RWE6.js} +31 -13
  13. package/dist/{[id]-AQUUZFRX.js → [id]-RFC2YGFT.js} +142 -44
  14. package/dist/{[id]-5EECCIRP.js → [id]-VKEADKFV.js} +74 -49
  15. package/dist/{[location_id]-I4HHUHWY.js → [location_id]-ZG5GZKHC.js} +11 -10
  16. package/dist/{[province_id]-OYX4MOCF.js → [province_id]-KEDQTW6S.js} +31 -30
  17. package/dist/{add-RPRJWCYU.js → add-FDIWOFVE.js} +31 -30
  18. package/dist/{add-3T4GBFMM.js → add-ZIP3VEAV.js} +37 -37
  19. package/dist/{add-customer-groups-FB5T6PQN.js → add-customer-groups-EJIRM264.js} +25 -25
  20. package/dist/{add-products-F243SWGD.js → add-products-MW2JYTSJ.js} +30 -30
  21. package/dist/{add-promotions-TJDK7HLW.js → add-promotions-3BALABRA.js} +7 -7
  22. package/dist/{add-to-campaign-Q6OAJMUJ.js → add-to-campaign-B7RFNWPF.js} +5 -5
  23. package/dist/{address-XVBSNMFU.js → address-CP2MSWLA.js} +41 -29
  24. package/dist/{adjust-inventory-IZLRMQXV.js → adjust-inventory-CQPDV5X7.js} +3 -3
  25. package/dist/{allocate-items-Q3VALDYT.js → allocate-items-5HHGU3XW.js} +4 -4
  26. package/dist/{areas-IYGBRCRH.js → areas-XQE3AYPZ.js} +7 -7
  27. package/dist/{attributes-LGEM2JJW.js → attributes-HU6I723C.js} +2 -2
  28. package/dist/breadcrumb-3M7RKX5V.js +47 -0
  29. package/dist/{breadcrumb-WG6TIF4C.js → breadcrumb-4O2P6XRS.js} +5 -3
  30. package/dist/{breadcrumb-K4HBKZUE.js → breadcrumb-4Z7NR2BO.js} +3 -3
  31. package/dist/{breadcrumb-BC6XN2SE.js → breadcrumb-4ZZFD3UH.js} +3 -3
  32. package/dist/{breadcrumb-MOA2DBOE.js → breadcrumb-6VWM2EJF.js} +2 -2
  33. package/dist/{breadcrumb-YOY6Z36F.js → breadcrumb-75QGQDKN.js} +2 -2
  34. package/dist/{breadcrumb-FEYGZFJU.js → breadcrumb-C7X6FV2H.js} +3 -3
  35. package/dist/breadcrumb-EAYZVNKS.js +33 -0
  36. package/dist/{breadcrumb-H45Z2WNG.js → breadcrumb-FF7H3XPP.js} +4 -4
  37. package/dist/{breadcrumb-KZPOPXGG.js → breadcrumb-GLBWFHKW.js} +2 -2
  38. package/dist/{breadcrumb-XEZCMI55.js → breadcrumb-HK53R6S2.js} +2 -2
  39. package/dist/{breadcrumb-BFNJWOJ4.js → breadcrumb-KV6K64PW.js} +2 -2
  40. package/dist/{breadcrumb-LEFHXFLT.js → breadcrumb-KZ5TSCXK.js} +3 -3
  41. package/dist/breadcrumb-TPITDYD7.js +46 -0
  42. package/dist/{breadcrumb-XGXKCDYS.js → breadcrumb-UVODV3YP.js} +4 -4
  43. package/dist/{breadcrumb-L262VPBO.js → breadcrumb-WIB5IGST.js} +2 -2
  44. package/dist/{breadcrumb-BXD3SRM7.js → breadcrumb-X5TTCKIB.js} +2 -2
  45. package/dist/{campaigns-DZKRNCA4.js → campaigns-JKFMRYZE.js} +6 -6
  46. package/dist/{categories-JZJA2IBQ.js → categories-2PGWWGP6.js} +7 -7
  47. package/dist/{chunk-CRYZK4NU.js → chunk-2GVPLCQR.js} +2 -2
  48. package/dist/{chunk-MJP5V3JN.js → chunk-3IZSQI6K.js} +2 -2
  49. package/dist/chunk-432S4FGR.js +0 -0
  50. package/dist/{chunk-HDEOZN2Q.js → chunk-4OQLPIUZ.js} +27 -27
  51. package/dist/{chunk-JJP6AKMV.js → chunk-4U2BLH45.js} +1 -1
  52. package/dist/{chunk-WFHGJGCW.js → chunk-4ZWIWI2H.js} +27 -12
  53. package/dist/{chunk-DSTHXHJ5.js → chunk-52KJSIHS.js} +1358 -1392
  54. package/dist/{chunk-GSH6ZGI6.js → chunk-54SCBOWD.js} +35 -12
  55. package/dist/{chunk-MAW6ZT3D.js → chunk-55TS752B.js} +1 -1
  56. package/dist/{chunk-3ALBZK4M.js → chunk-57ZJ6HTU.js} +18 -4
  57. package/dist/{chunk-EPRYM3FA.js → chunk-5DKUSZQ7.js} +2 -2
  58. package/dist/{chunk-L57USMYC.js → chunk-5YZ3G5EZ.js} +1 -1
  59. package/dist/{chunk-3SH24DGG.js → chunk-656G74I2.js} +2 -2
  60. package/dist/{chunk-ZLYGEART.js → chunk-65HHU6D3.js} +1 -1
  61. package/dist/{chunk-ZTOYVPGA.js → chunk-6PSJJHI4.js} +1 -1
  62. package/dist/{chunk-FCZJAYMM.js → chunk-6RHJFSE3.js} +1 -1
  63. package/dist/{chunk-W3UHAQCV.js → chunk-7TQNE3E2.js} +1 -1
  64. package/dist/{chunk-FDKFUIYV.js → chunk-AAKR2CB4.js} +1 -1
  65. package/dist/{chunk-KTJLJTFO.js → chunk-ASN3XS2R.js} +95 -68
  66. package/dist/{chunk-UNE4VD5U.js → chunk-B25W27XK.js} +21 -10
  67. package/dist/{chunk-H6LZ77GX.js → chunk-BEPAXQMU.js} +4 -1
  68. package/dist/{chunk-PUAWN7SS.js → chunk-BHEU34FL.js} +1 -1
  69. package/dist/{chunk-634XVU3D.js → chunk-CVXKASWV.js} +2 -2
  70. package/dist/{chunk-S7NGDLZ3.js → chunk-D6RN3ONJ.js} +3 -3
  71. package/dist/{chunk-VD27SL7H.js → chunk-DHARUTMI.js} +7 -6
  72. package/dist/{chunk-6FDPVW7Y.js → chunk-DIAWPVYS.js} +2 -2
  73. package/dist/{chunk-MT6WOKIW.js → chunk-DREOA2LP.js} +3 -3
  74. package/dist/{chunk-RILHLBKW.js → chunk-DRKRLQZZ.js} +2 -2
  75. package/dist/{chunk-IEVN722X.js → chunk-DSY5PNK6.js} +1 -1
  76. package/dist/{chunk-LXZXXOJ3.js → chunk-DTGEFKK4.js} +14 -1
  77. package/dist/{chunk-JDNXS37G.js → chunk-E5VLRRZR.js} +2 -2
  78. package/dist/{chunk-GZ4KTAWS.js → chunk-EPSDO2MJ.js} +1 -1
  79. package/dist/{chunk-KZQFIPY2.js → chunk-ESXMD6CR.js} +12 -4
  80. package/dist/{chunk-D76WZZSB.js → chunk-F4ORNDFU.js} +8 -7
  81. package/dist/{chunk-VE6GRIIN.js → chunk-FV76G2D7.js} +2 -2
  82. package/dist/{chunk-WBCWER26.js → chunk-G64YUZSL.js} +1 -1
  83. package/dist/{chunk-Y4PM3IDZ.js → chunk-GGXGKMYK.js} +1 -1
  84. package/dist/{chunk-7MARNXFG.js → chunk-GHDLST2P.js} +1 -1
  85. package/dist/{chunk-2NPD4S55.js → chunk-H3PVTKOP.js} +2 -2
  86. package/dist/{chunk-E6W57UP3.js → chunk-HRUO43BZ.js} +2 -2
  87. package/dist/{chunk-OYUJYPDF.js → chunk-II3CLUXA.js} +3 -2
  88. package/dist/{chunk-CUAGC54B.js → chunk-IP6TSKUQ.js} +23 -9
  89. package/dist/{chunk-KIURBTC4.js → chunk-J2XUEO2E.js} +1 -1
  90. package/dist/{chunk-QIF4QE7T.js → chunk-K5324KIX.js} +1 -1
  91. package/dist/{chunk-5BYYDBLS.js → chunk-KGHHGMDU.js} +4 -4
  92. package/dist/{chunk-QWW6RHZC.js → chunk-KUH5ZX7G.js} +5 -4
  93. package/dist/{chunk-NTJ3BMOE.js → chunk-L2NJPDUD.js} +1 -1
  94. package/dist/{chunk-JK4M3ZKY.js → chunk-LFX6R456.js} +5 -5
  95. package/dist/{chunk-MAVQ636Y.js → chunk-MDFKI2FL.js} +1 -1
  96. package/dist/{chunk-WFE6CT6M.js → chunk-MDGTQT5D.js} +1 -1
  97. package/dist/{chunk-ZLHCZ5F2.js → chunk-MR6REQKT.js} +5 -5
  98. package/dist/{chunk-LWFBBTJ3.js → chunk-N7YRIXJA.js} +22 -11
  99. package/dist/{chunk-ZQCCVCHB.js → chunk-O72AIZUN.js} +1 -1
  100. package/dist/{chunk-RPU4UOQK.js → chunk-OATVHDPZ.js} +1 -1
  101. package/dist/{chunk-JY2XON7H.js → chunk-OCS24TF4.js} +7 -6
  102. package/dist/{chunk-3TST3EWQ.js → chunk-OQTL7PXK.js} +2 -2
  103. package/dist/{chunk-V5K6HISS.js → chunk-ORI73OPX.js} +2 -2
  104. package/dist/{chunk-2KA4TGBQ.js → chunk-OZ2UHCWA.js} +20 -9
  105. package/dist/{chunk-JTHDMXZV.js → chunk-P27MQBMZ.js} +2 -2
  106. package/dist/{chunk-4IRQSBA7.js → chunk-P76QYIFF.js} +1 -1
  107. package/dist/{chunk-5PAUN3PM.js → chunk-P7UBW2EI.js} +3 -3
  108. package/dist/{chunk-5RMLLTR7.js → chunk-PEXMLTJX.js} +2 -2
  109. package/dist/chunk-QEFPTNPC.js +81 -0
  110. package/dist/{chunk-BQHVM46E.js → chunk-RLRWDHME.js} +1 -1
  111. package/dist/{chunk-7BFQKYCJ.js → chunk-RPMYKDNA.js} +2 -2
  112. package/dist/{chunk-UX5UYDCY.js → chunk-RSOV55K7.js} +2 -2
  113. package/dist/{chunk-RTMMO6IU.js → chunk-RZHVUQ7G.js} +25 -13
  114. package/dist/{chunk-3I6ZAMGN.js → chunk-SFQOECF7.js} +1 -1
  115. package/dist/{chunk-LQSLDDPT.js → chunk-T35QBLG7.js} +1 -1
  116. package/dist/{chunk-7EXKHL5L.js → chunk-TDL742KZ.js} +1 -1
  117. package/dist/{chunk-6Q3J6ZMM.js → chunk-UDPMSL6L.js} +41 -19
  118. package/dist/{chunk-EDV4MTTT.js → chunk-VQTQILLY.js} +65 -37
  119. package/dist/{chunk-TPGIMZLI.js → chunk-VR7P4DAZ.js} +1 -1
  120. package/dist/{chunk-5BQO3YQP.js → chunk-VUWAOX7H.js} +2 -2
  121. package/dist/{chunk-JR7AABT5.js → chunk-VWPNMEOE.js} +2 -2
  122. package/dist/{chunk-MVEHWM7K.js → chunk-W34KDYZA.js} +15 -4
  123. package/dist/{chunk-EAAZV3B7.js → chunk-WJ4KVDFV.js} +24 -12
  124. package/dist/{chunk-MUGQQY6P.js → chunk-WN2NWWVO.js} +49 -11
  125. package/dist/chunk-WQTWBXKO.js +23 -0
  126. package/dist/{chunk-3BXCPHN6.js → chunk-XCHKUSUU.js} +1 -0
  127. package/dist/{chunk-KG2NUK4J.js → chunk-XEQU2OQP.js} +46 -15
  128. package/dist/{chunk-AOLE7MBM.js → chunk-XG76XXM2.js} +1 -1
  129. package/dist/{chunk-O7BGGWW6.js → chunk-XKEYHWBS.js} +5 -5
  130. package/dist/{chunk-DQ7LZZJX.js → chunk-XQO243HC.js} +24 -13
  131. package/dist/{chunk-TJKZ5QCJ.js → chunk-XUJUJD2E.js} +3 -3
  132. package/dist/{chunk-27WLUOI2.js → chunk-Y6S7K3YB.js} +1 -1
  133. package/dist/{chunk-G6YNCIVF.js → chunk-YAUGB4LD.js} +2 -2
  134. package/dist/{chunk-WCXFUBEF.js → chunk-YVI3LZ3X.js} +9 -9
  135. package/dist/{chunk-MNHP6YRC.js → chunk-YVYYOBAE.js} +3 -3
  136. package/dist/{chunk-3C2T27YW.js → chunk-YXWZT3PX.js} +1 -1
  137. package/dist/{chunk-QWJTJSIT.js → chunk-ZC2ME3UB.js} +1 -1
  138. package/dist/{collections-XIHCTMSJ.js → collections-BLDMQOVB.js} +31 -31
  139. package/dist/{configuration-3GCBMM27.js → configuration-UMRBE5RQ.js} +2 -2
  140. package/dist/{configuration-FWZTMYXY.js → configuration-YVYVOLSP.js} +4 -4
  141. package/dist/{create-BV3QDTK2.js → create-3SBSLZQO.js} +3 -3
  142. package/dist/{create-NF2LPVXA.js → create-3TN2CT6M.js} +2 -2
  143. package/dist/{create-VL7LDTVE.js → create-3WBHG32J.js} +12 -12
  144. package/dist/{create-2RGNAVVY.js → create-3ZQFAKYR.js} +27 -27
  145. package/dist/{create-PJVLJ7T6.js → create-4ZRQVXT5.js} +31 -31
  146. package/dist/{create-GO7APBBU.js → create-7Z63KA2P.js} +25 -25
  147. package/dist/{create-N534JQPH.js → create-B4VIR7YP.js} +7 -7
  148. package/dist/{create-U64NEOEL.js → create-EKDZW233.js} +2 -2
  149. package/dist/{create-X5SOAPD3.js → create-EMU23LKH.js} +2 -2
  150. package/dist/{create-RPBHXU32.js → create-FYKFT7TQ.js} +23 -23
  151. package/dist/{create-32MXB6FD.js → create-NNBIDU4Q.js} +23 -23
  152. package/dist/{create-FHIFVCSG.js → create-PO2JF7F5.js} +37 -37
  153. package/dist/{create-NEK6JCKR.js → create-PO3JC6QK.js} +13 -13
  154. package/dist/{create-YKYLCEAK.js → create-QZVZF3MJ.js} +5 -5
  155. package/dist/{create-K26SM34L.js → create-T3KSWODJ.js} +2 -2
  156. package/dist/{create-HEZYB7RF.js → create-TDQISX3H.js} +59 -25
  157. package/dist/{create-3AMFYYI6.js → create-XORPYXNT.js} +25 -25
  158. package/dist/{create-AMNH3WXL.js → create-XU35U2HL.js} +36 -32
  159. package/dist/{create-XLYGW5PN.js → create-ZLYEPOAQ.js} +24 -24
  160. package/dist/{customer-group-add-customers-2C53NFBJ.js → customer-group-add-customers-UTBBZ6T4.js} +5 -5
  161. package/dist/{customer-group-create-75QQEQZF.js → customer-group-create-L3H5REVP.js} +2 -2
  162. package/dist/{customer-group-detail-AOQYYAOG.js → customer-group-detail-WSBXE23J.js} +19 -15
  163. package/dist/{customer-group-edit-N77RCW6I.js → customer-group-edit-D6FJH5TK.js} +49 -28
  164. package/dist/{customer-groups-GNFV7VMT.js → customer-groups-TWCYFU3U.js} +37 -16
  165. package/dist/{customers-HNINO6YL.js → customers-6HDZKARD.js} +7 -7
  166. package/dist/{edit-UNN3QTEJ.js → edit-2RN3OT27.js} +24 -8
  167. package/dist/{edit-WEUFBORT.js → edit-5XPDTCB5.js} +25 -25
  168. package/dist/{edit-TD7QFM4Z.js → edit-CNXA4GKJ.js} +15 -17
  169. package/dist/{edit-BSD6667Q.js → edit-DCMMX4GW.js} +28 -29
  170. package/dist/{edit-NHQJLCAK.js → edit-DKUERO2V.js} +2 -2
  171. package/dist/{edit-I2RJUPWV.js → edit-FF2ZWS6U.js} +3 -3
  172. package/dist/{edit-3DUCWSLA.js → edit-ISFEI7YX.js} +79 -46
  173. package/dist/{edit-O65JD54W.js → edit-IVBVZ5NL.js} +6 -6
  174. package/dist/{edit-IJ6DCBUU.js → edit-K2IP2H25.js} +29 -12
  175. package/dist/{edit-ZOLSAIKF.js → edit-MUQ37ETA.js} +2 -2
  176. package/dist/{edit-JB7KVBOL.js → edit-NTTJKLUI.js} +4 -4
  177. package/dist/{edit-4PWAJ7A3.js → edit-OOY2XGLZ.js} +24 -24
  178. package/dist/{edit-7SBPHN6P.js → edit-P6YZBA32.js} +24 -8
  179. package/dist/{edit-3V34KJS2.js → edit-Q7KDO37A.js} +2 -2
  180. package/dist/{edit-ZGAOUZYP.js → edit-QII5YJ2R.js} +25 -25
  181. package/dist/{edit-WN2Q3TOX.js → edit-RRA6J5FW.js} +3 -3
  182. package/dist/{edit-SIKOSSHF.js → edit-Y4XONJJU.js} +23 -23
  183. package/dist/{edit-ZORE6RUD.js → edit-YDMBLXGU.js} +56 -37
  184. package/dist/{edit-7CLOJ3UZ.js → edit-YPIJHIGC.js} +37 -37
  185. package/dist/{edit-budget-D22WMVYR.js → edit-budget-PYPHUJPW.js} +2 -2
  186. package/dist/{edit-inventory-item-QMYWEBZ3.js → edit-inventory-item-5VBH365V.js} +23 -8
  187. package/dist/{edit-inventory-item-attributes-HLG6JR6S.js → edit-inventory-item-attributes-RMKG2IRO.js} +2 -2
  188. package/dist/{edit-price-F7ZWM3FN.js → edit-price-PDS4XN2J.js} +5 -5
  189. package/dist/{edit-stock-ITAZNHPU.js → edit-stock-UI6HXHJJ.js} +4 -4
  190. package/dist/extension-targets.d.ts +248 -0
  191. package/dist/extension-targets.js +1 -0
  192. package/dist/{fulfillment-U2GRQ6DD.js → fulfillment-6GC3NRFT.js} +33 -24
  193. package/dist/{fulfillment-providers-CMU2JB5X.js → fulfillment-providers-IND53UPG.js} +28 -28
  194. package/dist/index.css +24 -12
  195. package/dist/index.d.ts +2 -0
  196. package/dist/index.js +257 -230
  197. package/dist/{inventory-FKEXULLT.js → inventory-BDST2XIX.js} +7 -7
  198. package/dist/{inventory-4JKLAZ2Q.js → inventory-LSG2IEWD.js} +4 -4
  199. package/dist/{invite-3R2CEWLN.js → invite-CNJQ27AY.js} +30 -43
  200. package/dist/{invite-MNAX6EUC.js → invite-DD2G6UUM.js} +27 -27
  201. package/dist/{loader-MAAMUP2Z.js → loader-BLRQLIJT.js} +13 -11
  202. package/dist/{loader-HTPUNIOS.js → loader-MJTR2S7V.js} +14 -12
  203. package/dist/{locations-2VWSMWHL.js → locations-HHP2DZ4N.js} +3 -3
  204. package/dist/login-FK6ATIQV.js +41 -0
  205. package/dist/{manage-locations-RWGDXXJQ.js → manage-locations-V2AJVZXA.js} +3 -3
  206. package/dist/{media-P6WSFHY4.js → media-2Z2UIOQU.js} +27 -27
  207. package/dist/{media-YB4G5CMV.js → media-T26YU24S.js} +25 -25
  208. package/dist/{metadata-J447GEBP.js → metadata-3CER2AEK.js} +23 -23
  209. package/dist/{metadata-6OYHLPLA.js → metadata-BGYWXGMG.js} +23 -23
  210. package/dist/{metadata-VTQ2CGZX.js → metadata-MSAODJ2T.js} +23 -23
  211. package/dist/{metadata-5Q6FLVX4.js → metadata-WB37SSTG.js} +23 -23
  212. package/dist/{metadata-ADXGD4Y6.js → metadata-XS3VAC3N.js} +23 -23
  213. package/dist/{offer-create-page-ACPKTNHA.js → offer-create-page-QAHHXLLJ.js} +31 -29
  214. package/dist/{offer-detail-page-S4R4N5GL.js → offer-detail-page-ZLGP4ELR.js} +81 -28
  215. package/dist/{offer-variant-detail-page-XUMDXZUD.js → offer-variant-detail-page-2A7TRGYS.js} +28 -22
  216. package/dist/offers-ZBAZOZ7Q.js +54 -0
  217. package/dist/{onboarding-TUGXFOA6.js → onboarding-XCCZ2TMN.js} +70 -75
  218. package/dist/orders-VFSDZYOV.js +63 -0
  219. package/dist/{organization-YIOAVFHN.js → organization-YB45TRUN.js} +25 -25
  220. package/dist/{organize-OWT5QSJR.js → organize-HQLROEUF.js} +4 -4
  221. package/dist/{organize-BTA7NJD2.js → organize-T62CDRZC.js} +4 -4
  222. package/dist/pages/index.d.ts +17 -2
  223. package/dist/pages/index.js +69 -69
  224. package/dist/{payment-details-K2XFATEL.js → payment-details-O4EWCOYQ.js} +42 -30
  225. package/dist/{payouts-K5IDTJV3.js → payouts-7O5W2X5J.js} +8 -8
  226. package/dist/{price-lists-DNPIPDAW.js → price-lists-5CSCTVWN.js} +9 -9
  227. package/dist/{pricing-5VUPPNKS.js → pricing-CF3FJP6A.js} +5 -5
  228. package/dist/{pricing-J5FIDZIY.js → pricing-NHI4NSLA.js} +25 -25
  229. package/dist/{product-tags-SJYIGXEV.js → product-tags-2TLA7BVO.js} +38 -38
  230. package/dist/{product-types-4PTJW5DE.js → product-types-LZAMCLGS.js} +7 -7
  231. package/dist/{product-variant-detail-FO6J3RFA.js → product-variant-detail-UNG6LWDP.js} +27 -26
  232. package/dist/{product-variant-edit-55TAIBZO.js → product-variant-edit-K5U3JZFW.js} +25 -25
  233. package/dist/{products-XM57LXJK.js → products-27ASSSVK.js} +43 -42
  234. package/dist/{products-EQMANSO6.js → products-WJJBC3NI.js} +30 -30
  235. package/dist/{professional-details-WWZPTXSX.js → professional-details-ZCRAWCXZ.js} +41 -29
  236. package/dist/{profile-5IADQ727.js → profile-T2QLFLI7.js} +77 -38
  237. package/dist/{promotions-BYW6TZ5B.js → promotions-E4Z6APSX.js} +9 -9
  238. package/dist/{receive-MTXKKPKZ.js → receive-QCVCAR3R.js} +6 -6
  239. package/dist/{refund-3IXGYA7W.js → refund-GAOWE636.js} +74 -50
  240. package/dist/{register-U5PQZATC.js → register-IKY5DDUR.js} +28 -27
  241. package/dist/{reset-password-SKUJJLSV.js → reset-password-RMKCQLBX.js} +3 -3
  242. package/dist/{return-reasons-QDPSIJG3.js → return-reasons-RH6IEU2M.js} +20 -17
  243. package/dist/{sales-channels-GBSTCWVP.js → sales-channels-C5M2ZA5L.js} +6 -5
  244. package/dist/{sales-channels-N4NE3FXP.js → sales-channels-ZHYGTRWU.js} +7 -6
  245. package/dist/{settings-ZUBBFS67.js → settings-5IUDEPUN.js} +42 -42
  246. package/dist/{shipment-TKSCPC3M.js → shipment-UP2OGESO.js} +23 -23
  247. package/dist/{shipping-DODEUYOQ.js → shipping-ACK5UOA5.js} +4 -4
  248. package/dist/{shipping-profile-O4JMJLN7.js → shipping-profile-3US7LC5E.js} +2 -2
  249. package/dist/shipping-profiles-34432J3C.js +46 -0
  250. package/dist/{stock-GYK2GHJN.js → stock-VMND7PJY.js} +23 -23
  251. package/dist/{store-XWOALZ5Q.js → store-BCNSSIO6.js} +130 -60
  252. package/dist/{store-closure-46B3XZ2I.js → store-closure-QGR3F45Y.js} +23 -23
  253. package/dist/{store-select-E77E3ZY7.js → store-select-55ZOJGGV.js} +47 -27
  254. package/dist/{tax-regions-S2LFRTMP.js → tax-regions-RTPVM4IC.js} +11 -8
  255. package/dist/{team-N2C5JPSU.js → team-DAUWBJAI.js} +32 -31
  256. package/package.json +21 -16
  257. package/dist/breadcrumb-ILEAQRW7.js +0 -33
  258. package/dist/breadcrumb-NZYOCEEM.js +0 -47
  259. package/dist/breadcrumb-VY5DNTTJ.js +0 -46
  260. package/dist/chunk-HXGLPDZW.js +0 -34
  261. package/dist/chunk-KVKO6N4G.js +0 -13
  262. package/dist/login-YUWOWICV.js +0 -39
  263. package/dist/offers-OTZJBW43.js +0 -54
  264. package/dist/orders-PJSJNGZS.js +0 -63
  265. package/dist/shipping-profiles-4TJ4IH6U.js +0 -46
  266. /package/dist/{chunk-HFRHHT36.js → chunk-NWU7EGGF.js} +0 -0
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  useCancelExchangeBegin,
3
3
  useExchanges
4
- } from "./chunk-CRYZK4NU.js";
4
+ } from "./chunk-2GVPLCQR.js";
5
5
  import {
6
6
  useCancelClaimBegin,
7
7
  useClaims
8
- } from "./chunk-S7NGDLZ3.js";
8
+ } from "./chunk-D6RN3ONJ.js";
9
9
  import {
10
10
  getReturnableQuantity
11
11
  } from "./chunk-UM7ZR3VU.js";
@@ -25,11 +25,14 @@ import {
25
25
  useCancelReturn,
26
26
  useCancelReturnRequest,
27
27
  useReturns
28
- } from "./chunk-3TST3EWQ.js";
28
+ } from "./chunk-OQTL7PXK.js";
29
+ import {
30
+ display_id_default
31
+ } from "./chunk-WQTWBXKO.js";
29
32
  import {
30
33
  useCancelOrderEdit,
31
34
  useConfirmOrderEdit
32
- } from "./chunk-7BFQKYCJ.js";
35
+ } from "./chunk-RPMYKDNA.js";
33
36
  import {
34
37
  formatProvider
35
38
  } from "./chunk-VW56KWO2.js";
@@ -42,12 +45,12 @@ import {
42
45
  getCanceledOrderStatus,
43
46
  getOrderFulfillmentStatus,
44
47
  getOrderPaymentStatus
45
- } from "./chunk-LQSLDDPT.js";
48
+ } from "./chunk-T35QBLG7.js";
46
49
  import {
47
50
  getLocaleAmount,
48
51
  getStylizedAmount,
49
52
  isAmountLessThenRoundingError
50
- } from "./chunk-3BXCPHN6.js";
53
+ } from "./chunk-XCHKUSUU.js";
51
54
  import "./chunk-JRTZWK77.js";
52
55
  import "./chunk-IQPN4PZJ.js";
53
56
  import {
@@ -69,31 +72,31 @@ import {
69
72
  import "./chunk-LAVHRER2.js";
70
73
  import "./chunk-QHQWEERJ.js";
71
74
  import "./chunk-Y7QKP6QU.js";
72
- import "./chunk-BQHVM46E.js";
73
- import "./chunk-QIF4QE7T.js";
74
- import "./chunk-VE6GRIIN.js";
75
- import "./chunk-7MARNXFG.js";
76
- import "./chunk-MNHP6YRC.js";
77
- import "./chunk-NTJ3BMOE.js";
78
- import "./chunk-5PAUN3PM.js";
79
- import "./chunk-ZLHCZ5F2.js";
80
- import "./chunk-GZ4KTAWS.js";
81
- import "./chunk-PUAWN7SS.js";
75
+ import "./chunk-RLRWDHME.js";
76
+ import "./chunk-K5324KIX.js";
77
+ import "./chunk-FV76G2D7.js";
78
+ import "./chunk-GHDLST2P.js";
79
+ import "./chunk-YVYYOBAE.js";
80
+ import "./chunk-L2NJPDUD.js";
81
+ import "./chunk-P7UBW2EI.js";
82
+ import "./chunk-MR6REQKT.js";
83
+ import "./chunk-EPSDO2MJ.js";
84
+ import "./chunk-BHEU34FL.js";
82
85
  import {
83
86
  useMember
84
- } from "./chunk-MVEHWM7K.js";
87
+ } from "./chunk-W34KDYZA.js";
85
88
  import {
86
89
  useCustomer
87
- } from "./chunk-OYUJYPDF.js";
88
- import "./chunk-O7BGGWW6.js";
89
- import "./chunk-KIURBTC4.js";
90
- import "./chunk-3SH24DGG.js";
91
- import "./chunk-JR7AABT5.js";
90
+ } from "./chunk-II3CLUXA.js";
91
+ import "./chunk-XKEYHWBS.js";
92
+ import "./chunk-J2XUEO2E.js";
93
+ import "./chunk-656G74I2.js";
94
+ import "./chunk-VWPNMEOE.js";
92
95
  import {
93
96
  useStockLocation
94
- } from "./chunk-ZQCCVCHB.js";
95
- import "./chunk-5BQO3YQP.js";
96
- import "./chunk-EPRYM3FA.js";
97
+ } from "./chunk-O72AIZUN.js";
98
+ import "./chunk-VUWAOX7H.js";
99
+ import "./chunk-5DKUSZQ7.js";
97
100
  import {
98
101
  ordersQueryKeys,
99
102
  useCancelOrder,
@@ -104,9 +107,9 @@ import {
104
107
  useOrderCommissionLines,
105
108
  useOrderPreview,
106
109
  useReservationItems
107
- } from "./chunk-6FDPVW7Y.js";
108
- import "./chunk-JJP6AKMV.js";
109
- import "./chunk-G6YNCIVF.js";
110
+ } from "./chunk-DIAWPVYS.js";
111
+ import "./chunk-4U2BLH45.js";
112
+ import "./chunk-YAUGB4LD.js";
110
113
  import "./chunk-A5DJIOHN.js";
111
114
  import {
112
115
  queryClient
@@ -114,17 +117,21 @@ import {
114
117
  import "./chunk-ZA2KFUFR.js";
115
118
  import {
116
119
  fetchQuery
117
- } from "./chunk-LXZXXOJ3.js";
120
+ } from "./chunk-DTGEFKK4.js";
118
121
  import "./chunk-NBMM2TZK.js";
119
122
 
120
123
  // src/pages/orders/[id]/loader.tsx
121
- var orderDetailQuery = (id) => ({
122
- queryKey: ordersQueryKeys.detail(id),
123
- queryFn: async () => fetchQuery(`/vendor/orders/${id}`, {
124
- method: "GET",
125
- query: { fields: DEFAULT_FIELDS }
126
- })
127
- });
124
+ import { getLinkQuery } from "@mercurjs/dashboard-shared";
125
+ var orderDetailQuery = (id) => {
126
+ const { fields } = getLinkQuery("order", DEFAULT_FIELDS);
127
+ return {
128
+ queryKey: ordersQueryKeys.detail(id, { fields }),
129
+ queryFn: async () => fetchQuery(`/vendor/orders/${id}`, {
130
+ method: "GET",
131
+ query: { fields }
132
+ })
133
+ };
134
+ };
128
135
  var loader = async ({ params }) => {
129
136
  const id = params.id;
130
137
  const query = orderDetailQuery(id);
@@ -134,12 +141,14 @@ var loader = async ({ params }) => {
134
141
  // src/pages/orders/[id]/order-detail-page.tsx
135
142
  import { Children } from "react";
136
143
  import { useLoaderData, useParams } from "react-router-dom";
144
+ import { useLinkQuery, WidgetZone as WidgetZone2 } from "@mercurjs/dashboard-shared";
137
145
 
138
146
  // src/pages/orders/[id]/_components/active-order-claim-section/active-order-claim-section.tsx
139
147
  import { ExclamationCircle } from "@medusajs/icons";
140
148
  import { Button, Container, Heading, Text, toast } from "@medusajs/ui";
141
149
  import { useNavigate } from "react-router-dom";
142
150
  import { useTranslation } from "react-i18next";
151
+ import { DisplayExtensionZone } from "@mercurjs/dashboard-shared";
143
152
  import { jsx, jsxs } from "react/jsx-runtime";
144
153
  var readClaimId = (change) => {
145
154
  if (change && typeof change === "object" && "claim_id" in change && typeof change.claim_id === "string") {
@@ -181,37 +190,47 @@ var ActiveOrderClaimSection = ({
181
190
  },
182
191
  className: "-m-4 mb-1 border-b border-l p-4",
183
192
  "data-testid": "active-order-claim-section",
184
- children: /* @__PURE__ */ jsx(Container, { className: "flex items-center justify-between p-0", children: /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-row justify-between", children: [
185
- /* @__PURE__ */ jsxs("div", { children: [
186
- /* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center gap-2 px-6 pt-4", children: [
187
- /* @__PURE__ */ jsx(ExclamationCircle, { className: "text-ui-fg-subtle" }),
188
- /* @__PURE__ */ jsx(Heading, { level: "h2", children: t("orders.claims.panel.title") })
193
+ children: /* @__PURE__ */ jsxs(Container, { className: "flex items-center justify-between p-0", children: [
194
+ /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-row justify-between", children: [
195
+ /* @__PURE__ */ jsxs("div", { children: [
196
+ /* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center gap-2 px-6 pt-4", children: [
197
+ /* @__PURE__ */ jsx(ExclamationCircle, { className: "text-ui-fg-subtle" }),
198
+ /* @__PURE__ */ jsx(Heading, { level: "h2", children: t("orders.claims.panel.title") })
199
+ ] }),
200
+ /* @__PURE__ */ jsx("div", { className: "gap-2 px-6 pb-4", children: /* @__PURE__ */ jsx(Text, { children: t("orders.claims.panel.description") }) })
189
201
  ] }),
190
- /* @__PURE__ */ jsx("div", { className: "gap-2 px-6 pb-4", children: /* @__PURE__ */ jsx(Text, { children: t("orders.claims.panel.description") }) })
202
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4", children: [
203
+ /* @__PURE__ */ jsx(
204
+ Button,
205
+ {
206
+ size: "small",
207
+ variant: "secondary",
208
+ onClick: onCancelClaim,
209
+ "data-testid": "active-order-claim-cancel",
210
+ children: t("orders.claims.cancel.title")
211
+ }
212
+ ),
213
+ /* @__PURE__ */ jsx(
214
+ Button,
215
+ {
216
+ size: "small",
217
+ variant: "secondary",
218
+ onClick: onContinueClaim,
219
+ "data-testid": "active-order-claim-continue",
220
+ children: t("actions.continue")
221
+ }
222
+ )
223
+ ] })
191
224
  ] }),
192
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4", children: [
193
- /* @__PURE__ */ jsx(
194
- Button,
195
- {
196
- size: "small",
197
- variant: "secondary",
198
- onClick: onCancelClaim,
199
- "data-testid": "active-order-claim-cancel",
200
- children: t("orders.claims.cancel.title")
201
- }
202
- ),
203
- /* @__PURE__ */ jsx(
204
- Button,
205
- {
206
- size: "small",
207
- variant: "secondary",
208
- onClick: onContinueClaim,
209
- "data-testid": "active-order-claim-continue",
210
- children: t("actions.continue")
211
- }
212
- )
213
- ] })
214
- ] }) })
225
+ /* @__PURE__ */ jsx(
226
+ DisplayExtensionZone,
227
+ {
228
+ model: "order",
229
+ zone: "active-claim",
230
+ data: orderPreview
231
+ }
232
+ )
233
+ ] })
215
234
  }
216
235
  );
217
236
  };
@@ -221,6 +240,7 @@ import { ArrowPath } from "@medusajs/icons";
221
240
  import { Button as Button2, Container as Container2, Heading as Heading2, Text as Text2, toast as toast2 } from "@medusajs/ui";
222
241
  import { useNavigate as useNavigate2 } from "react-router-dom";
223
242
  import { useTranslation as useTranslation2 } from "react-i18next";
243
+ import { DisplayExtensionZone as DisplayExtensionZone2 } from "@mercurjs/dashboard-shared";
224
244
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
225
245
  var readExchangeId = (change) => {
226
246
  if (change && typeof change === "object" && "exchange_id" in change && typeof change.exchange_id === "string") {
@@ -262,37 +282,47 @@ var ActiveOrderExchangeSection = ({
262
282
  },
263
283
  className: "-m-4 mb-1 border-b border-l p-4",
264
284
  "data-testid": "active-order-exchange-section",
265
- children: /* @__PURE__ */ jsx2(Container2, { className: "flex items-center justify-between p-0", children: /* @__PURE__ */ jsxs2("div", { className: "flex w-full flex-row justify-between", children: [
266
- /* @__PURE__ */ jsxs2("div", { children: [
267
- /* @__PURE__ */ jsxs2("div", { className: "mb-2 flex items-center gap-2 px-6 pt-4", children: [
268
- /* @__PURE__ */ jsx2(ArrowPath, { className: "text-ui-fg-subtle" }),
269
- /* @__PURE__ */ jsx2(Heading2, { level: "h2", children: t("orders.exchanges.panel.title") })
285
+ children: /* @__PURE__ */ jsxs2(Container2, { className: "flex items-center justify-between p-0", children: [
286
+ /* @__PURE__ */ jsxs2("div", { className: "flex w-full flex-row justify-between", children: [
287
+ /* @__PURE__ */ jsxs2("div", { children: [
288
+ /* @__PURE__ */ jsxs2("div", { className: "mb-2 flex items-center gap-2 px-6 pt-4", children: [
289
+ /* @__PURE__ */ jsx2(ArrowPath, { className: "text-ui-fg-subtle" }),
290
+ /* @__PURE__ */ jsx2(Heading2, { level: "h2", children: t("orders.exchanges.panel.title") })
291
+ ] }),
292
+ /* @__PURE__ */ jsx2("div", { className: "gap-2 px-6 pb-4", children: /* @__PURE__ */ jsx2(Text2, { children: t("orders.exchanges.panel.description") }) })
270
293
  ] }),
271
- /* @__PURE__ */ jsx2("div", { className: "gap-2 px-6 pb-4", children: /* @__PURE__ */ jsx2(Text2, { children: t("orders.exchanges.panel.description") }) })
294
+ /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4", children: [
295
+ /* @__PURE__ */ jsx2(
296
+ Button2,
297
+ {
298
+ size: "small",
299
+ variant: "secondary",
300
+ onClick: onCancelExchange,
301
+ "data-testid": "active-order-exchange-cancel",
302
+ children: t("orders.exchanges.cancel.title")
303
+ }
304
+ ),
305
+ /* @__PURE__ */ jsx2(
306
+ Button2,
307
+ {
308
+ size: "small",
309
+ variant: "secondary",
310
+ onClick: onContinueExchange,
311
+ "data-testid": "active-order-exchange-continue",
312
+ children: t("actions.continue")
313
+ }
314
+ )
315
+ ] })
272
316
  ] }),
273
- /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4", children: [
274
- /* @__PURE__ */ jsx2(
275
- Button2,
276
- {
277
- size: "small",
278
- variant: "secondary",
279
- onClick: onCancelExchange,
280
- "data-testid": "active-order-exchange-cancel",
281
- children: t("orders.exchanges.cancel.title")
282
- }
283
- ),
284
- /* @__PURE__ */ jsx2(
285
- Button2,
286
- {
287
- size: "small",
288
- variant: "secondary",
289
- onClick: onContinueExchange,
290
- "data-testid": "active-order-exchange-continue",
291
- children: t("actions.continue")
292
- }
293
- )
294
- ] })
295
- ] }) })
317
+ /* @__PURE__ */ jsx2(
318
+ DisplayExtensionZone2,
319
+ {
320
+ model: "order",
321
+ zone: "active-exchange",
322
+ data: orderPreview
323
+ }
324
+ )
325
+ ] })
296
326
  }
297
327
  );
298
328
  };
@@ -302,6 +332,7 @@ import { ArrowUturnLeft } from "@medusajs/icons";
302
332
  import { Button as Button3, Container as Container3, Heading as Heading3, Text as Text3, toast as toast3 } from "@medusajs/ui";
303
333
  import { useNavigate as useNavigate3 } from "react-router-dom";
304
334
  import { useTranslation as useTranslation3 } from "react-i18next";
335
+ import { DisplayExtensionZone as DisplayExtensionZone3 } from "@mercurjs/dashboard-shared";
305
336
  import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
306
337
  var readReturnId = (change) => {
307
338
  if (change && typeof change === "object" && "return_id" in change && typeof change.return_id === "string") {
@@ -345,37 +376,47 @@ var ActiveOrderReturnSection = ({
345
376
  },
346
377
  className: "-m-4 mb-1 border-b border-l p-4",
347
378
  "data-testid": "active-order-return-section",
348
- children: /* @__PURE__ */ jsx3(Container3, { className: "flex items-center justify-between p-0", children: /* @__PURE__ */ jsxs3("div", { className: "flex w-full flex-row justify-between", children: [
349
- /* @__PURE__ */ jsxs3("div", { children: [
350
- /* @__PURE__ */ jsxs3("div", { className: "mb-2 flex items-center gap-2 px-6 pt-4", children: [
351
- /* @__PURE__ */ jsx3(ArrowUturnLeft, { className: "text-ui-fg-subtle" }),
352
- /* @__PURE__ */ jsx3(Heading3, { level: "h2", children: t("orders.returns.panel.title") })
379
+ children: /* @__PURE__ */ jsxs3(Container3, { className: "flex items-center justify-between p-0", children: [
380
+ /* @__PURE__ */ jsxs3("div", { className: "flex w-full flex-row justify-between", children: [
381
+ /* @__PURE__ */ jsxs3("div", { children: [
382
+ /* @__PURE__ */ jsxs3("div", { className: "mb-2 flex items-center gap-2 px-6 pt-4", children: [
383
+ /* @__PURE__ */ jsx3(ArrowUturnLeft, { className: "text-ui-fg-subtle" }),
384
+ /* @__PURE__ */ jsx3(Heading3, { level: "h2", children: t("orders.returns.panel.title") })
385
+ ] }),
386
+ /* @__PURE__ */ jsx3("div", { className: "gap-2 px-6 pb-4", children: /* @__PURE__ */ jsx3(Text3, { children: t("orders.returns.panel.description") }) })
353
387
  ] }),
354
- /* @__PURE__ */ jsx3("div", { className: "gap-2 px-6 pb-4", children: /* @__PURE__ */ jsx3(Text3, { children: t("orders.returns.panel.description") }) })
388
+ /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4", children: [
389
+ /* @__PURE__ */ jsx3(
390
+ Button3,
391
+ {
392
+ size: "small",
393
+ variant: "secondary",
394
+ onClick: onCancelReturn,
395
+ "data-testid": "active-order-return-cancel",
396
+ children: t("orders.returns.cancel.title")
397
+ }
398
+ ),
399
+ /* @__PURE__ */ jsx3(
400
+ Button3,
401
+ {
402
+ size: "small",
403
+ variant: "secondary",
404
+ onClick: onContinueReturn,
405
+ "data-testid": "active-order-return-continue",
406
+ children: t("actions.continue")
407
+ }
408
+ )
409
+ ] })
355
410
  ] }),
356
- /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4", children: [
357
- /* @__PURE__ */ jsx3(
358
- Button3,
359
- {
360
- size: "small",
361
- variant: "secondary",
362
- onClick: onCancelReturn,
363
- "data-testid": "active-order-return-cancel",
364
- children: t("orders.returns.cancel.title")
365
- }
366
- ),
367
- /* @__PURE__ */ jsx3(
368
- Button3,
369
- {
370
- size: "small",
371
- variant: "secondary",
372
- onClick: onContinueReturn,
373
- "data-testid": "active-order-return-continue",
374
- children: t("actions.continue")
375
- }
376
- )
377
- ] })
378
- ] }) })
411
+ /* @__PURE__ */ jsx3(
412
+ DisplayExtensionZone3,
413
+ {
414
+ model: "order",
415
+ zone: "active-return",
416
+ data: orderPreview
417
+ }
418
+ )
419
+ ] })
379
420
  }
380
421
  );
381
422
  };
@@ -386,6 +427,7 @@ import { Button as Button4, Container as Container4, Copy, Heading as Heading4,
386
427
  import { useMemo } from "react";
387
428
  import { useTranslation as useTranslation4 } from "react-i18next";
388
429
  import { useNavigate as useNavigate4 } from "react-router-dom";
430
+ import { DisplayExtensionZone as DisplayExtensionZone4 } from "@mercurjs/dashboard-shared";
389
431
  import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
390
432
  function EditItem({
391
433
  item,
@@ -473,53 +515,56 @@ var OrderActiveEditSection = ({
473
515
  },
474
516
  className: "-m-4 mb-1 border-b border-l p-4",
475
517
  "data-testid": "order-active-edit-section",
476
- children: /* @__PURE__ */ jsx4(Container4, { className: "flex items-center justify-between p-0", children: /* @__PURE__ */ jsxs4("div", { className: "flex w-full flex-col divide-y divide-dashed", children: [
477
- /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2 px-6 py-4", children: [
478
- /* @__PURE__ */ jsx4(ExclamationCircleSolid, { className: "text-blue-500" }),
479
- /* @__PURE__ */ jsx4(Heading4, { level: "h2", children: t(
480
- isPending ? "orders.edits.panel.titlePending" : "orders.edits.panel.title"
481
- ) })
482
- ] }),
483
- !!addedItems.length && /* @__PURE__ */ jsxs4("div", { className: "txt-small text-ui-fg-subtle flex flex-row px-6 py-4", children: [
484
- /* @__PURE__ */ jsx4("span", { className: "flex-1 font-medium", children: t("labels.added") }),
485
- /* @__PURE__ */ jsx4("div", { className: "flex flex-1 flex-col gap-y-2", children: addedItems.map(({ item, quantity }) => /* @__PURE__ */ jsx4(EditItem, { item, quantity }, item.id)) })
486
- ] }),
487
- !!removedItems.length && /* @__PURE__ */ jsxs4("div", { className: "txt-small text-ui-fg-subtle flex flex-row px-6 py-4", children: [
488
- /* @__PURE__ */ jsx4("span", { className: "flex-1 font-medium", children: t("labels.removed") }),
489
- /* @__PURE__ */ jsx4("div", { className: "flex flex-1 flex-col gap-y-2", children: removedItems.map(({ item, quantity }) => /* @__PURE__ */ jsx4(EditItem, { item, quantity }, item.id)) })
518
+ children: /* @__PURE__ */ jsxs4(Container4, { className: "flex items-center justify-between p-0", children: [
519
+ /* @__PURE__ */ jsxs4("div", { className: "flex w-full flex-col divide-y divide-dashed", children: [
520
+ /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2 px-6 py-4", children: [
521
+ /* @__PURE__ */ jsx4(ExclamationCircleSolid, { className: "text-blue-500" }),
522
+ /* @__PURE__ */ jsx4(Heading4, { level: "h2", children: t(
523
+ isPending ? "orders.edits.panel.titlePending" : "orders.edits.panel.title"
524
+ ) })
525
+ ] }),
526
+ !!addedItems.length && /* @__PURE__ */ jsxs4("div", { className: "txt-small text-ui-fg-subtle flex flex-row px-6 py-4", children: [
527
+ /* @__PURE__ */ jsx4("span", { className: "flex-1 font-medium", children: t("labels.added") }),
528
+ /* @__PURE__ */ jsx4("div", { className: "flex flex-1 flex-col gap-y-2", children: addedItems.map(({ item, quantity }) => /* @__PURE__ */ jsx4(EditItem, { item, quantity }, item.id)) })
529
+ ] }),
530
+ !!removedItems.length && /* @__PURE__ */ jsxs4("div", { className: "txt-small text-ui-fg-subtle flex flex-row px-6 py-4", children: [
531
+ /* @__PURE__ */ jsx4("span", { className: "flex-1 font-medium", children: t("labels.removed") }),
532
+ /* @__PURE__ */ jsx4("div", { className: "flex flex-1 flex-col gap-y-2", children: removedItems.map(({ item, quantity }) => /* @__PURE__ */ jsx4(EditItem, { item, quantity }, item.id)) })
533
+ ] }),
534
+ /* @__PURE__ */ jsxs4("div", { className: "bg-ui-bg-subtle flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4", children: [
535
+ isPending ? /* @__PURE__ */ jsx4(
536
+ Button4,
537
+ {
538
+ size: "small",
539
+ variant: "secondary",
540
+ onClick: () => navigate(`/orders/${order.id}/edit`),
541
+ "data-testid": "order-active-edit-continue",
542
+ children: t("actions.continueEdit")
543
+ }
544
+ ) : /* @__PURE__ */ jsx4(
545
+ Button4,
546
+ {
547
+ size: "small",
548
+ variant: "secondary",
549
+ onClick: onConfirmOrderEdit,
550
+ "data-testid": "order-active-edit-force-confirm",
551
+ children: t("actions.forceConfirm")
552
+ }
553
+ ),
554
+ /* @__PURE__ */ jsx4(
555
+ Button4,
556
+ {
557
+ size: "small",
558
+ variant: "secondary",
559
+ onClick: onCancelOrderEdit,
560
+ "data-testid": "order-active-edit-cancel",
561
+ children: t("actions.cancel")
562
+ }
563
+ )
564
+ ] })
490
565
  ] }),
491
- /* @__PURE__ */ jsxs4("div", { className: "bg-ui-bg-subtle flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4", children: [
492
- isPending ? /* @__PURE__ */ jsx4(
493
- Button4,
494
- {
495
- size: "small",
496
- variant: "secondary",
497
- onClick: () => navigate(`/orders/${order.id}/edit`),
498
- "data-testid": "order-active-edit-continue",
499
- children: t("actions.continueEdit")
500
- }
501
- ) : /* @__PURE__ */ jsx4(
502
- Button4,
503
- {
504
- size: "small",
505
- variant: "secondary",
506
- onClick: onConfirmOrderEdit,
507
- "data-testid": "order-active-edit-force-confirm",
508
- children: t("actions.forceConfirm")
509
- }
510
- ),
511
- /* @__PURE__ */ jsx4(
512
- Button4,
513
- {
514
- size: "small",
515
- variant: "secondary",
516
- onClick: onCancelOrderEdit,
517
- "data-testid": "order-active-edit-cancel",
518
- children: t("actions.cancel")
519
- }
520
- )
521
- ] })
522
- ] }) })
566
+ /* @__PURE__ */ jsx4(DisplayExtensionZone4, { model: "order", zone: "active-edit", data: order })
567
+ ] })
523
568
  }
524
569
  );
525
570
  };
@@ -527,6 +572,7 @@ var OrderActiveEditSection = ({
527
572
  // src/pages/orders/[id]/_components/order-activity-section/order-activity-section.tsx
528
573
  import { Container as Container5, Heading as Heading5 } from "@medusajs/ui";
529
574
  import { useTranslation as useTranslation15 } from "react-i18next";
575
+ import { DisplayExtensionZone as DisplayExtensionZone5 } from "@mercurjs/dashboard-shared";
530
576
 
531
577
  // src/pages/orders/[id]/_components/order-activity-section/hooks/use-activity-items.tsx
532
578
  import { useMemo as useMemo3 } from "react";
@@ -1370,83 +1416,38 @@ var OrderActivitySection = ({ order }) => {
1370
1416
  const { t } = useTranslation15();
1371
1417
  return /* @__PURE__ */ jsxs17(Container5, { className: "flex flex-col gap-y-8 px-6 py-4", children: [
1372
1418
  /* @__PURE__ */ jsx16("div", { className: "flex flex-col gap-y-4", children: /* @__PURE__ */ jsx16("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ jsx16(Heading5, { level: "h2", children: t("orders.activity.header") }) }) }),
1373
- /* @__PURE__ */ jsx16(OrderTimeline, { order })
1374
- ] });
1375
- };
1376
-
1377
- // src/pages/orders/[id]/_components/order-commission-section/order-commission-section.tsx
1378
- import { Container as Container6, Heading as Heading6, Text as Text16 } from "@medusajs/ui";
1379
- import { useMemo as useMemo4 } from "react";
1380
- import { useTranslation as useTranslation16 } from "react-i18next";
1381
- import { jsx as jsx17, jsxs as jsxs18 } from "react/jsx-runtime";
1382
- var OrderCommissionSection = ({
1383
- order
1384
- }) => {
1385
- const { t } = useTranslation16();
1386
- const { commission_lines, isLoading } = useOrderCommissionLines(order.id);
1387
- const itemTitleById = useMemo4(() => {
1388
- const map = /* @__PURE__ */ new Map();
1389
- order.items?.forEach((item) => {
1390
- map.set(item.id, item.product_title ?? item.title);
1391
- });
1392
- return map;
1393
- }, [order.items]);
1394
- if (isLoading || !commission_lines.length) {
1395
- return null;
1396
- }
1397
- const total = commission_lines.reduce(
1398
- (acc, line) => acc + (line.amount ?? 0),
1399
- 0
1400
- );
1401
- return /* @__PURE__ */ jsxs18(Container6, { className: "divide-y p-0", "data-testid": "order-commission-section", children: [
1402
- /* @__PURE__ */ jsx17("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx17(Heading6, { level: "h2", children: t("fields.commission", "Commission") }) }),
1403
- /* @__PURE__ */ jsx17("div", { className: "divide-y", children: commission_lines.map((line) => {
1404
- const label = line.shipping_method_id ? t("fields.shipping") : itemTitleById.get(line.item_id ?? "") ?? line.code;
1405
- return /* @__PURE__ */ jsxs18(
1406
- "div",
1407
- {
1408
- className: "text-ui-fg-subtle grid grid-cols-2 items-center gap-4 px-6 py-4",
1409
- children: [
1410
- /* @__PURE__ */ jsx17(Text16, { size: "small", leading: "compact", children: label }),
1411
- /* @__PURE__ */ jsx17(Text16, { size: "small", leading: "compact", className: "text-right", children: getLocaleAmount(line.amount, order.currency_code) })
1412
- ]
1413
- },
1414
- line.id
1415
- );
1416
- }) }),
1417
- /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between px-6 py-4", children: [
1418
- /* @__PURE__ */ jsx17(Text16, { size: "small", weight: "plus", leading: "compact", children: t("orders.commission.total", "Total") }),
1419
- /* @__PURE__ */ jsx17(Text16, { size: "small", weight: "plus", leading: "compact", children: getLocaleAmount(total, order.currency_code) })
1420
- ] })
1419
+ /* @__PURE__ */ jsx16(OrderTimeline, { order }),
1420
+ /* @__PURE__ */ jsx16(DisplayExtensionZone5, { model: "order", zone: "activity", data: order })
1421
1421
  ] });
1422
1422
  };
1423
1423
 
1424
1424
  // src/pages/orders/[id]/_components/order-customer-section/order-customer-section.tsx
1425
- import { Container as Container7, Heading as Heading7 } from "@medusajs/ui";
1426
- import { useTranslation as useTranslation18 } from "react-i18next";
1425
+ import { Container as Container6, Heading as Heading6 } from "@medusajs/ui";
1426
+ import { useTranslation as useTranslation17 } from "react-i18next";
1427
+ import { DisplayExtensionZone as DisplayExtensionZone6 } from "@mercurjs/dashboard-shared";
1427
1428
 
1428
1429
  // src/components/common/customer-info/customer-info.tsx
1429
- import { Avatar as Avatar2, Copy as Copy2, Text as Text17 } from "@medusajs/ui";
1430
- import { useTranslation as useTranslation17 } from "react-i18next";
1430
+ import { Avatar as Avatar2, Copy as Copy2, Text as Text16 } from "@medusajs/ui";
1431
+ import { useTranslation as useTranslation16 } from "react-i18next";
1431
1432
  import { Link as Link2 } from "react-router-dom";
1432
- import { jsx as jsx18, jsxs as jsxs19 } from "react/jsx-runtime";
1433
+ import { jsx as jsx17, jsxs as jsxs18 } from "react/jsx-runtime";
1433
1434
  var ID = ({ data }) => {
1434
- const { t } = useTranslation17();
1435
+ const { t } = useTranslation16();
1435
1436
  const id = data.customer_id;
1436
1437
  const name = getOrderCustomer(data);
1437
1438
  const email = data.email;
1438
1439
  const fallback = (name || email || "").charAt(0).toUpperCase();
1439
- return /* @__PURE__ */ jsxs19("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
1440
- /* @__PURE__ */ jsx18(Text17, { size: "small", leading: "compact", weight: "plus", children: t("fields.id") }),
1441
- /* @__PURE__ */ jsx18(
1440
+ return /* @__PURE__ */ jsxs18("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
1441
+ /* @__PURE__ */ jsx17(Text16, { size: "small", leading: "compact", weight: "plus", children: t("fields.id") }),
1442
+ /* @__PURE__ */ jsx17(
1442
1443
  Link2,
1443
1444
  {
1444
1445
  to: `/customers/${id}`,
1445
1446
  className: "focus:shadow-borders-focus rounded-[4px] outline-none transition-shadow",
1446
- children: /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-x-2 overflow-hidden", children: [
1447
- /* @__PURE__ */ jsx18(Avatar2, { size: "2xsmall", fallback }),
1448
- /* @__PURE__ */ jsx18(
1449
- Text17,
1447
+ children: /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-x-2 overflow-hidden", children: [
1448
+ /* @__PURE__ */ jsx17(Avatar2, { size: "2xsmall", fallback }),
1449
+ /* @__PURE__ */ jsx17(
1450
+ Text16,
1450
1451
  {
1451
1452
  size: "small",
1452
1453
  leading: "compact",
@@ -1460,26 +1461,26 @@ var ID = ({ data }) => {
1460
1461
  ] });
1461
1462
  };
1462
1463
  var Company = ({ data }) => {
1463
- const { t } = useTranslation17();
1464
+ const { t } = useTranslation16();
1464
1465
  const company = data.shipping_address?.company || data.billing_address?.company;
1465
1466
  if (!company) {
1466
1467
  return null;
1467
1468
  }
1468
- return /* @__PURE__ */ jsxs19("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
1469
- /* @__PURE__ */ jsx18(Text17, { size: "small", leading: "compact", weight: "plus", children: t("fields.company") }),
1470
- /* @__PURE__ */ jsx18(Text17, { size: "small", leading: "compact", className: "truncate", children: company })
1469
+ return /* @__PURE__ */ jsxs18("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
1470
+ /* @__PURE__ */ jsx17(Text16, { size: "small", leading: "compact", weight: "plus", children: t("fields.company") }),
1471
+ /* @__PURE__ */ jsx17(Text16, { size: "small", leading: "compact", className: "truncate", children: company })
1471
1472
  ] });
1472
1473
  };
1473
1474
  var Contact = ({ data }) => {
1474
- const { t } = useTranslation17();
1475
+ const { t } = useTranslation16();
1475
1476
  const phone = data.shipping_address?.phone || data.billing_address?.phone;
1476
1477
  const email = data.email || "";
1477
- return /* @__PURE__ */ jsxs19("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
1478
- /* @__PURE__ */ jsx18(Text17, { size: "small", leading: "compact", weight: "plus", children: t("orders.customer.contactLabel") }),
1479
- /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-y-2", children: [
1480
- /* @__PURE__ */ jsxs19("div", { className: "grid grid-cols-[1fr_20px] items-start gap-x-2", children: [
1481
- /* @__PURE__ */ jsx18(
1482
- Text17,
1478
+ return /* @__PURE__ */ jsxs18("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
1479
+ /* @__PURE__ */ jsx17(Text16, { size: "small", leading: "compact", weight: "plus", children: t("orders.customer.contactLabel") }),
1480
+ /* @__PURE__ */ jsxs18("div", { className: "flex flex-col gap-y-2", children: [
1481
+ /* @__PURE__ */ jsxs18("div", { className: "grid grid-cols-[1fr_20px] items-start gap-x-2", children: [
1482
+ /* @__PURE__ */ jsx17(
1483
+ Text16,
1483
1484
  {
1484
1485
  size: "small",
1485
1486
  leading: "compact",
@@ -1487,11 +1488,11 @@ var Contact = ({ data }) => {
1487
1488
  children: email
1488
1489
  }
1489
1490
  ),
1490
- /* @__PURE__ */ jsx18("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx18(Copy2, { content: email, className: "text-ui-fg-muted" }) })
1491
+ /* @__PURE__ */ jsx17("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx17(Copy2, { content: email, className: "text-ui-fg-muted" }) })
1491
1492
  ] }),
1492
- phone && /* @__PURE__ */ jsxs19("div", { className: "grid grid-cols-[1fr_20px] items-start gap-x-2", children: [
1493
- /* @__PURE__ */ jsx18(
1494
- Text17,
1493
+ phone && /* @__PURE__ */ jsxs18("div", { className: "grid grid-cols-[1fr_20px] items-start gap-x-2", children: [
1494
+ /* @__PURE__ */ jsx17(
1495
+ Text16,
1495
1496
  {
1496
1497
  size: "small",
1497
1498
  leading: "compact",
@@ -1499,7 +1500,7 @@ var Contact = ({ data }) => {
1499
1500
  children: phone
1500
1501
  }
1501
1502
  ),
1502
- /* @__PURE__ */ jsx18("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx18(Copy2, { content: phone, className: "text-ui-fg-muted" }) })
1503
+ /* @__PURE__ */ jsx17("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx17(Copy2, { content: phone, className: "text-ui-fg-muted" }) })
1503
1504
  ] })
1504
1505
  ] })
1505
1506
  ] });
@@ -1508,33 +1509,33 @@ var AddressPrint = ({
1508
1509
  address,
1509
1510
  type
1510
1511
  }) => {
1511
- const { t } = useTranslation17();
1512
- return /* @__PURE__ */ jsxs19("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
1513
- /* @__PURE__ */ jsx18(Text17, { size: "small", leading: "compact", weight: "plus", children: type === "shipping" ? t("addresses.shippingAddress.label") : t("addresses.billingAddress.label") }),
1514
- address ? /* @__PURE__ */ jsxs19("div", { className: "grid grid-cols-[1fr_20px] items-start gap-x-2", children: [
1515
- /* @__PURE__ */ jsx18(Text17, { size: "small", leading: "compact", children: getFormattedAddress({ address }).map((line, i) => {
1516
- return /* @__PURE__ */ jsxs19("span", { className: "break-words", children: [
1512
+ const { t } = useTranslation16();
1513
+ return /* @__PURE__ */ jsxs18("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
1514
+ /* @__PURE__ */ jsx17(Text16, { size: "small", leading: "compact", weight: "plus", children: type === "shipping" ? t("addresses.shippingAddress.label") : t("addresses.billingAddress.label") }),
1515
+ address ? /* @__PURE__ */ jsxs18("div", { className: "grid grid-cols-[1fr_20px] items-start gap-x-2", children: [
1516
+ /* @__PURE__ */ jsx17(Text16, { size: "small", leading: "compact", children: getFormattedAddress({ address }).map((line, i) => {
1517
+ return /* @__PURE__ */ jsxs18("span", { className: "break-words", children: [
1517
1518
  line,
1518
- /* @__PURE__ */ jsx18("br", {})
1519
+ /* @__PURE__ */ jsx17("br", {})
1519
1520
  ] }, i);
1520
1521
  }) }),
1521
- /* @__PURE__ */ jsx18("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx18(
1522
+ /* @__PURE__ */ jsx17("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx17(
1522
1523
  Copy2,
1523
1524
  {
1524
1525
  content: getFormattedAddress({ address }).join("\n"),
1525
1526
  className: "text-ui-fg-muted"
1526
1527
  }
1527
1528
  ) })
1528
- ] }) : /* @__PURE__ */ jsx18(Text17, { size: "small", leading: "compact", children: "-" })
1529
+ ] }) : /* @__PURE__ */ jsx17(Text16, { size: "small", leading: "compact", children: "-" })
1529
1530
  ] });
1530
1531
  };
1531
1532
  var Addresses = ({ data }) => {
1532
- const { t } = useTranslation17();
1533
- return /* @__PURE__ */ jsxs19("div", { className: "divide-y", children: [
1534
- /* @__PURE__ */ jsx18(AddressPrint, { address: data.shipping_address, type: "shipping" }),
1535
- !isSameAddress(data.shipping_address, data.billing_address) ? /* @__PURE__ */ jsx18(AddressPrint, { address: data.billing_address, type: "billing" }) : /* @__PURE__ */ jsxs19("div", { className: "grid grid-cols-2 items-center px-6 py-4", children: [
1536
- /* @__PURE__ */ jsx18(
1537
- Text17,
1533
+ const { t } = useTranslation16();
1534
+ return /* @__PURE__ */ jsxs18("div", { className: "divide-y", children: [
1535
+ /* @__PURE__ */ jsx17(AddressPrint, { address: data.shipping_address, type: "shipping" }),
1536
+ !isSameAddress(data.shipping_address, data.billing_address) ? /* @__PURE__ */ jsx17(AddressPrint, { address: data.billing_address, type: "billing" }) : /* @__PURE__ */ jsxs18("div", { className: "grid grid-cols-2 items-center px-6 py-4", children: [
1537
+ /* @__PURE__ */ jsx17(
1538
+ Text16,
1538
1539
  {
1539
1540
  size: "small",
1540
1541
  leading: "compact",
@@ -1543,7 +1544,7 @@ var Addresses = ({ data }) => {
1543
1544
  children: t("addresses.billingAddress.label")
1544
1545
  }
1545
1546
  ),
1546
- /* @__PURE__ */ jsx18(Text17, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: t("addresses.billingAddress.sameAsShipping") })
1547
+ /* @__PURE__ */ jsx17(Text16, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: t("addresses.billingAddress.sameAsShipping") })
1547
1548
  ] })
1548
1549
  ] });
1549
1550
  };
@@ -1568,61 +1569,64 @@ var getOrderCustomer = (obj) => {
1568
1569
  };
1569
1570
 
1570
1571
  // src/pages/orders/[id]/_components/order-customer-section/order-customer-section.tsx
1571
- import { jsx as jsx19, jsxs as jsxs20 } from "react/jsx-runtime";
1572
+ import { jsx as jsx18, jsxs as jsxs19 } from "react/jsx-runtime";
1572
1573
  var OrderCustomerSection = ({ order }) => {
1573
- return /* @__PURE__ */ jsxs20(Container7, { className: "divide-y p-0", children: [
1574
- /* @__PURE__ */ jsx19(Header, {}),
1575
- /* @__PURE__ */ jsx19(CustomerInfo.ID, { data: order }),
1576
- /* @__PURE__ */ jsx19(CustomerInfo.Contact, { data: order }),
1577
- /* @__PURE__ */ jsx19(CustomerInfo.Company, { data: order }),
1578
- /* @__PURE__ */ jsx19(CustomerInfo.Addresses, { data: order })
1574
+ return /* @__PURE__ */ jsxs19(Container6, { className: "divide-y p-0", children: [
1575
+ /* @__PURE__ */ jsx18(Header, {}),
1576
+ /* @__PURE__ */ jsx18(CustomerInfo.ID, { data: order }),
1577
+ /* @__PURE__ */ jsx18(CustomerInfo.Contact, { data: order }),
1578
+ /* @__PURE__ */ jsx18(CustomerInfo.Company, { data: order }),
1579
+ /* @__PURE__ */ jsx18(CustomerInfo.Addresses, { data: order }),
1580
+ /* @__PURE__ */ jsx18(DisplayExtensionZone6, { model: "order", zone: "customer", data: order })
1579
1581
  ] });
1580
1582
  };
1581
1583
  var Header = () => {
1582
- const { t } = useTranslation18();
1583
- return /* @__PURE__ */ jsx19("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx19(Heading7, { level: "h2", children: t("fields.customer") }) });
1584
+ const { t } = useTranslation17();
1585
+ return /* @__PURE__ */ jsx18("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx18(Heading6, { level: "h2", children: t("fields.customer") }) });
1584
1586
  };
1585
1587
 
1586
1588
  // src/pages/orders/[id]/_components/order-fulfillment-section/order-fulfillment-section.tsx
1587
1589
  import { Buildings, XCircle } from "@medusajs/icons";
1588
1590
  import {
1589
1591
  Button as Button6,
1590
- Container as Container8,
1592
+ Container as Container7,
1591
1593
  Copy as Copy3,
1592
- Heading as Heading8,
1594
+ Heading as Heading7,
1593
1595
  StatusBadge,
1594
- Text as Text18,
1596
+ Text as Text17,
1595
1597
  Tooltip as Tooltip2,
1596
1598
  toast as toast5,
1597
1599
  usePrompt as usePrompt2
1598
1600
  } from "@medusajs/ui";
1599
1601
  import { format } from "date-fns";
1600
- import { useTranslation as useTranslation19 } from "react-i18next";
1602
+ import { useTranslation as useTranslation18 } from "react-i18next";
1601
1603
  import { Link as Link3, useNavigate as useNavigate5 } from "react-router-dom";
1602
- import { Fragment as Fragment2, jsx as jsx20, jsxs as jsxs21 } from "react/jsx-runtime";
1604
+ import { DisplayExtensionZone as DisplayExtensionZone7 } from "@mercurjs/dashboard-shared";
1605
+ import { Fragment as Fragment2, jsx as jsx19, jsxs as jsxs20 } from "react/jsx-runtime";
1603
1606
  var OrderFulfillmentSection = ({
1604
1607
  order
1605
1608
  }) => {
1606
1609
  const fulfillments = order.fulfillments || [];
1607
- return /* @__PURE__ */ jsxs21("div", { className: "flex flex-col gap-y-3", children: [
1608
- /* @__PURE__ */ jsx20(UnfulfilledItemBreakdown, { order }),
1609
- fulfillments.map((f, index) => /* @__PURE__ */ jsx20(Fulfillment, { index, fulfillment: f, order }, f.id))
1610
+ return /* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-y-3", children: [
1611
+ /* @__PURE__ */ jsx19(UnfulfilledItemBreakdown, { order }),
1612
+ fulfillments.map((f, index) => /* @__PURE__ */ jsx19(Fulfillment, { index, fulfillment: f, order }, f.id)),
1613
+ /* @__PURE__ */ jsx19(DisplayExtensionZone7, { model: "order", zone: "fulfillment", data: order })
1610
1614
  ] });
1611
1615
  };
1612
1616
  var UnfulfilledItem = ({
1613
1617
  item,
1614
1618
  currencyCode
1615
1619
  }) => {
1616
- return /* @__PURE__ */ jsxs21(
1620
+ return /* @__PURE__ */ jsxs20(
1617
1621
  "div",
1618
1622
  {
1619
1623
  className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4",
1620
1624
  children: [
1621
- /* @__PURE__ */ jsxs21("div", { className: "flex items-start gap-x-4", children: [
1622
- /* @__PURE__ */ jsx20(Thumbnail, { src: item.thumbnail }),
1623
- /* @__PURE__ */ jsxs21("div", { children: [
1624
- /* @__PURE__ */ jsx20(
1625
- Text18,
1625
+ /* @__PURE__ */ jsxs20("div", { className: "flex items-start gap-x-4", children: [
1626
+ /* @__PURE__ */ jsx19(Thumbnail, { src: item.thumbnail }),
1627
+ /* @__PURE__ */ jsxs20("div", { children: [
1628
+ /* @__PURE__ */ jsx19(
1629
+ Text17,
1626
1630
  {
1627
1631
  size: "small",
1628
1632
  leading: "compact",
@@ -1631,20 +1635,20 @@ var UnfulfilledItem = ({
1631
1635
  children: item.title
1632
1636
  }
1633
1637
  ),
1634
- item.variant_sku && /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-x-1", children: [
1635
- /* @__PURE__ */ jsx20(Text18, { size: "small", children: item.variant_sku }),
1636
- /* @__PURE__ */ jsx20(Copy3, { content: item.variant_sku, className: "text-ui-fg-muted" })
1638
+ item.variant_sku && /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-x-1", children: [
1639
+ /* @__PURE__ */ jsx19(Text17, { size: "small", children: item.variant_sku }),
1640
+ /* @__PURE__ */ jsx19(Copy3, { content: item.variant_sku, className: "text-ui-fg-muted" })
1637
1641
  ] }),
1638
- /* @__PURE__ */ jsx20(Text18, { size: "small", children: item.variant?.options?.map((o) => o.value).join(" \xB7 ") })
1642
+ /* @__PURE__ */ jsx19(Text17, { size: "small", children: item.variant?.options?.map((o) => o.value).join(" \xB7 ") })
1639
1643
  ] })
1640
1644
  ] }),
1641
- /* @__PURE__ */ jsxs21("div", { className: "grid grid-cols-3 items-center gap-x-4", children: [
1642
- /* @__PURE__ */ jsx20("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx20(Text18, { size: "small", children: getLocaleAmount(item.unit_price, currencyCode) }) }),
1643
- /* @__PURE__ */ jsx20("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsxs21(Text18, { children: [
1644
- /* @__PURE__ */ jsx20("span", { className: "tabular-nums", children: item.quantity - item.detail.fulfilled_quantity }),
1645
+ /* @__PURE__ */ jsxs20("div", { className: "grid grid-cols-3 items-center gap-x-4", children: [
1646
+ /* @__PURE__ */ jsx19("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx19(Text17, { size: "small", children: getLocaleAmount(item.unit_price, currencyCode) }) }),
1647
+ /* @__PURE__ */ jsx19("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsxs20(Text17, { children: [
1648
+ /* @__PURE__ */ jsx19("span", { className: "tabular-nums", children: item.quantity - item.detail.fulfilled_quantity }),
1645
1649
  "x"
1646
1650
  ] }) }),
1647
- /* @__PURE__ */ jsx20("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx20(Text18, { size: "small", children: getLocaleAmount(item.subtotal || 0, currencyCode) }) })
1651
+ /* @__PURE__ */ jsx19("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx19(Text17, { size: "small", children: getLocaleAmount(item.subtotal || 0, currencyCode) }) })
1648
1652
  ] })
1649
1653
  ]
1650
1654
  },
@@ -1658,8 +1662,8 @@ var UnfulfilledItemBreakdown = ({ order }) => {
1658
1662
  const unfulfilledItemsWithoutShipping = order.items.filter(
1659
1663
  (i) => !i.requires_shipping && i.detail && i.quantity && i.detail.fulfilled_quantity < i.quantity
1660
1664
  );
1661
- return /* @__PURE__ */ jsxs21(Fragment2, { children: [
1662
- !!unfulfilledItemsWithShipping.length && /* @__PURE__ */ jsx20(
1665
+ return /* @__PURE__ */ jsxs20(Fragment2, { children: [
1666
+ !!unfulfilledItemsWithShipping.length && /* @__PURE__ */ jsx19(
1663
1667
  UnfulfilledItemDisplay,
1664
1668
  {
1665
1669
  order,
@@ -1667,7 +1671,7 @@ var UnfulfilledItemBreakdown = ({ order }) => {
1667
1671
  requiresShipping: true
1668
1672
  }
1669
1673
  ),
1670
- !!unfulfilledItemsWithoutShipping.length && /* @__PURE__ */ jsx20(
1674
+ !!unfulfilledItemsWithoutShipping.length && /* @__PURE__ */ jsx19(
1671
1675
  UnfulfilledItemDisplay,
1672
1676
  {
1673
1677
  order,
@@ -1682,17 +1686,17 @@ var UnfulfilledItemDisplay = ({
1682
1686
  unfulfilledItems,
1683
1687
  requiresShipping = false
1684
1688
  }) => {
1685
- const { t } = useTranslation19();
1689
+ const { t } = useTranslation18();
1686
1690
  if (order.status === "canceled") {
1687
1691
  return;
1688
1692
  }
1689
- return /* @__PURE__ */ jsxs21(Container8, { className: "divide-y p-0", children: [
1690
- /* @__PURE__ */ jsxs21("div", { className: "flex items-center justify-between px-6 py-4", children: [
1691
- /* @__PURE__ */ jsx20(Heading8, { level: "h2", children: t("orders.fulfillment.unfulfilledItems") }),
1692
- /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-x-4", children: [
1693
- requiresShipping && /* @__PURE__ */ jsx20(StatusBadge, { color: "red", className: "text-nowrap", children: t("orders.fulfillment.requiresShipping") }),
1694
- /* @__PURE__ */ jsx20(StatusBadge, { color: "red", className: "text-nowrap", children: t("orders.fulfillment.awaitingFulfillmentBadge") }),
1695
- /* @__PURE__ */ jsx20(
1693
+ return /* @__PURE__ */ jsxs20(Container7, { className: "divide-y p-0", children: [
1694
+ /* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between px-6 py-4", children: [
1695
+ /* @__PURE__ */ jsx19(Heading7, { level: "h2", children: t("orders.fulfillment.unfulfilledItems") }),
1696
+ /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-x-4", children: [
1697
+ requiresShipping && /* @__PURE__ */ jsx19(StatusBadge, { color: "red", className: "text-nowrap", children: t("orders.fulfillment.requiresShipping") }),
1698
+ /* @__PURE__ */ jsx19(StatusBadge, { color: "red", className: "text-nowrap", children: t("orders.fulfillment.awaitingFulfillmentBadge") }),
1699
+ /* @__PURE__ */ jsx19(
1696
1700
  ActionMenu,
1697
1701
  {
1698
1702
  groups: [
@@ -1700,7 +1704,7 @@ var UnfulfilledItemDisplay = ({
1700
1704
  actions: [
1701
1705
  {
1702
1706
  label: t("orders.fulfillment.fulfillItems"),
1703
- icon: /* @__PURE__ */ jsx20(Buildings, {}),
1707
+ icon: /* @__PURE__ */ jsx19(Buildings, {}),
1704
1708
  to: `/orders/${order.id}/fulfillment?requires_shipping=${requiresShipping}`
1705
1709
  }
1706
1710
  ]
@@ -1710,7 +1714,7 @@ var UnfulfilledItemDisplay = ({
1710
1714
  )
1711
1715
  ] })
1712
1716
  ] }),
1713
- /* @__PURE__ */ jsx20("div", { children: unfulfilledItems.map((item) => /* @__PURE__ */ jsx20(
1717
+ /* @__PURE__ */ jsx19("div", { children: unfulfilledItems.map((item) => /* @__PURE__ */ jsx19(
1714
1718
  UnfulfilledItem,
1715
1719
  {
1716
1720
  item,
@@ -1725,7 +1729,7 @@ var Fulfillment = ({
1725
1729
  order,
1726
1730
  index
1727
1731
  }) => {
1728
- const { t } = useTranslation19();
1732
+ const { t } = useTranslation18();
1729
1733
  const prompt = usePrompt2();
1730
1734
  const navigate = useNavigate5();
1731
1735
  const showLocation = !!fulfillment.location_id;
@@ -1809,23 +1813,23 @@ var Fulfillment = ({
1809
1813
  if (isError) {
1810
1814
  throw error;
1811
1815
  }
1812
- return /* @__PURE__ */ jsxs21(Container8, { className: "divide-y p-0", children: [
1813
- /* @__PURE__ */ jsxs21("div", { className: "flex items-center justify-between px-6 py-4", children: [
1814
- /* @__PURE__ */ jsx20(Heading8, { level: "h2", children: t("orders.fulfillment.number", {
1816
+ return /* @__PURE__ */ jsxs20(Container7, { className: "divide-y p-0", children: [
1817
+ /* @__PURE__ */ jsxs20("div", { className: "flex items-center justify-between px-6 py-4", children: [
1818
+ /* @__PURE__ */ jsx19(Heading7, { level: "h2", children: t("orders.fulfillment.number", {
1815
1819
  number: index + 1
1816
1820
  }) }),
1817
- /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-x-4", children: [
1818
- /* @__PURE__ */ jsx20(
1821
+ /* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-x-4", children: [
1822
+ /* @__PURE__ */ jsx19(
1819
1823
  Tooltip2,
1820
1824
  {
1821
1825
  content: format(
1822
1826
  new Date(statusTimestamp),
1823
1827
  "dd MMM, yyyy, HH:mm:ss"
1824
1828
  ),
1825
- children: /* @__PURE__ */ jsx20(StatusBadge, { color: statusColor, className: "text-nowrap", children: statusText })
1829
+ children: /* @__PURE__ */ jsx19(StatusBadge, { color: statusColor, className: "text-nowrap", children: statusText })
1826
1830
  }
1827
1831
  ),
1828
- /* @__PURE__ */ jsx20(
1832
+ /* @__PURE__ */ jsx19(
1829
1833
  ActionMenu,
1830
1834
  {
1831
1835
  groups: [
@@ -1833,7 +1837,7 @@ var Fulfillment = ({
1833
1837
  actions: [
1834
1838
  {
1835
1839
  label: t("actions.cancel"),
1836
- icon: /* @__PURE__ */ jsx20(XCircle, {}),
1840
+ icon: /* @__PURE__ */ jsx19(XCircle, {}),
1837
1841
  onClick: handleCancel,
1838
1842
  disabled: cancelDisabled
1839
1843
  }
@@ -1844,50 +1848,50 @@ var Fulfillment = ({
1844
1848
  )
1845
1849
  ] })
1846
1850
  ] }),
1847
- /* @__PURE__ */ jsxs21("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
1848
- /* @__PURE__ */ jsx20(Text18, { size: "small", leading: "compact", weight: "plus", children: t("orders.fulfillment.itemsLabel") }),
1849
- /* @__PURE__ */ jsx20("ul", { children: (fulfillment.items || []).map((f_item) => /* @__PURE__ */ jsx20("li", { children: /* @__PURE__ */ jsxs21(Text18, { size: "small", leading: "compact", children: [
1851
+ /* @__PURE__ */ jsxs20("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
1852
+ /* @__PURE__ */ jsx19(Text17, { size: "small", leading: "compact", weight: "plus", children: t("orders.fulfillment.itemsLabel") }),
1853
+ /* @__PURE__ */ jsx19("ul", { children: (fulfillment.items || []).map((f_item) => /* @__PURE__ */ jsx19("li", { children: /* @__PURE__ */ jsxs20(Text17, { size: "small", leading: "compact", children: [
1850
1854
  f_item.quantity,
1851
1855
  "x ",
1852
1856
  f_item.title
1853
1857
  ] }) }, f_item.line_item_id)) })
1854
1858
  ] }),
1855
- showLocation && /* @__PURE__ */ jsxs21("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
1856
- /* @__PURE__ */ jsx20(Text18, { size: "small", leading: "compact", weight: "plus", children: t("orders.fulfillment.shippingFromLabel") }),
1857
- stock_location ? /* @__PURE__ */ jsx20(
1859
+ showLocation && /* @__PURE__ */ jsxs20("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
1860
+ /* @__PURE__ */ jsx19(Text17, { size: "small", leading: "compact", weight: "plus", children: t("orders.fulfillment.shippingFromLabel") }),
1861
+ stock_location ? /* @__PURE__ */ jsx19(
1858
1862
  Link3,
1859
1863
  {
1860
1864
  to: `/settings/locations/${stock_location.id}`,
1861
1865
  className: "text-ui-fg-interactive hover:text-ui-fg-interactive-hover transition-fg",
1862
- children: /* @__PURE__ */ jsx20(Text18, { size: "small", leading: "compact", children: stock_location.name })
1866
+ children: /* @__PURE__ */ jsx19(Text17, { size: "small", leading: "compact", children: stock_location.name })
1863
1867
  }
1864
- ) : /* @__PURE__ */ jsx20(Skeleton, { className: "w-16" })
1868
+ ) : /* @__PURE__ */ jsx19(Skeleton, { className: "w-16" })
1865
1869
  ] }),
1866
- /* @__PURE__ */ jsxs21("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
1867
- /* @__PURE__ */ jsx20(Text18, { size: "small", leading: "compact", weight: "plus", children: t("fields.provider") }),
1868
- /* @__PURE__ */ jsx20(Text18, { size: "small", leading: "compact", children: formatProvider(fulfillment.provider_id) })
1870
+ /* @__PURE__ */ jsxs20("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
1871
+ /* @__PURE__ */ jsx19(Text17, { size: "small", leading: "compact", weight: "plus", children: t("fields.provider") }),
1872
+ /* @__PURE__ */ jsx19(Text17, { size: "small", leading: "compact", children: formatProvider(fulfillment.provider_id) })
1869
1873
  ] }),
1870
- /* @__PURE__ */ jsxs21("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
1871
- /* @__PURE__ */ jsx20(Text18, { size: "small", leading: "compact", weight: "plus", children: t("orders.fulfillment.trackingLabel") }),
1872
- /* @__PURE__ */ jsx20("div", { children: fulfillment.labels && fulfillment.labels.length > 0 ? /* @__PURE__ */ jsx20("ul", { children: fulfillment.labels.map((tlink) => {
1874
+ /* @__PURE__ */ jsxs20("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
1875
+ /* @__PURE__ */ jsx19(Text17, { size: "small", leading: "compact", weight: "plus", children: t("orders.fulfillment.trackingLabel") }),
1876
+ /* @__PURE__ */ jsx19("div", { children: fulfillment.labels && fulfillment.labels.length > 0 ? /* @__PURE__ */ jsx19("ul", { children: fulfillment.labels.map((tlink) => {
1873
1877
  const hasUrl = !!tlink.tracking_url?.length && tlink.tracking_url !== "#";
1874
1878
  if (hasUrl) {
1875
- return /* @__PURE__ */ jsx20("li", { children: /* @__PURE__ */ jsx20(
1879
+ return /* @__PURE__ */ jsx19("li", { children: /* @__PURE__ */ jsx19(
1876
1880
  "a",
1877
1881
  {
1878
1882
  href: tlink.tracking_url || "",
1879
1883
  target: "_blank",
1880
1884
  rel: "noopener noreferrer",
1881
1885
  className: "text-ui-fg-interactive hover:text-ui-fg-interactive-hover transition-fg",
1882
- children: /* @__PURE__ */ jsx20(Text18, { size: "small", leading: "compact", children: tlink.tracking_number })
1886
+ children: /* @__PURE__ */ jsx19(Text17, { size: "small", leading: "compact", children: tlink.tracking_number })
1883
1887
  }
1884
1888
  ) }, tlink.tracking_number);
1885
1889
  }
1886
- return /* @__PURE__ */ jsx20("li", { children: /* @__PURE__ */ jsx20(Text18, { size: "small", leading: "compact", children: tlink.tracking_number }) }, tlink.tracking_number);
1887
- }) }) : /* @__PURE__ */ jsx20(Text18, { size: "small", leading: "compact", children: "-" }) })
1890
+ return /* @__PURE__ */ jsx19("li", { children: /* @__PURE__ */ jsx19(Text17, { size: "small", leading: "compact", children: tlink.tracking_number }) }, tlink.tracking_number);
1891
+ }) }) : /* @__PURE__ */ jsx19(Text17, { size: "small", leading: "compact", children: "-" }) })
1888
1892
  ] }),
1889
- (showShippingButton || showDeliveryButton) && /* @__PURE__ */ jsxs21("div", { className: "bg-ui-bg-subtle flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4", children: [
1890
- showDeliveryButton && /* @__PURE__ */ jsx20(
1893
+ (showShippingButton || showDeliveryButton) && /* @__PURE__ */ jsxs20("div", { className: "bg-ui-bg-subtle flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4", children: [
1894
+ showDeliveryButton && /* @__PURE__ */ jsx19(
1891
1895
  Button6,
1892
1896
  {
1893
1897
  size: "small",
@@ -1898,7 +1902,7 @@ var Fulfillment = ({
1898
1902
  )
1899
1903
  }
1900
1904
  ),
1901
- showShippingButton && /* @__PURE__ */ jsx20(
1905
+ showShippingButton && /* @__PURE__ */ jsx19(
1902
1906
  Button6,
1903
1907
  {
1904
1908
  size: "small",
@@ -1914,18 +1918,25 @@ var Fulfillment = ({
1914
1918
  // src/pages/orders/[id]/_components/order-general-section/order-general-section.tsx
1915
1919
  import { XCircle as XCircle2 } from "@medusajs/icons";
1916
1920
  import {
1917
- Container as Container9,
1921
+ Container as Container8,
1918
1922
  Copy as Copy4,
1919
- Heading as Heading9,
1923
+ Heading as Heading8,
1920
1924
  StatusBadge as StatusBadge2,
1921
- Text as Text19,
1925
+ Text as Text18,
1922
1926
  toast as toast6,
1923
1927
  usePrompt as usePrompt3
1924
1928
  } from "@medusajs/ui";
1925
- import { useTranslation as useTranslation20 } from "react-i18next";
1926
- import { jsx as jsx21, jsxs as jsxs22 } from "react/jsx-runtime";
1929
+ import { useTranslation as useTranslation19 } from "react-i18next";
1930
+ import { DisplayExtensionZone as DisplayExtensionZone8, DisplayField } from "@mercurjs/dashboard-shared";
1931
+ import { jsx as jsx20, jsxs as jsxs21 } from "react/jsx-runtime";
1932
+ var GENERAL_FIELD_IDS = [
1933
+ "display_id",
1934
+ "status",
1935
+ "payment_status",
1936
+ "fulfillment_status"
1937
+ ];
1927
1938
  var OrderGeneralSection = ({ order }) => {
1928
- const { t } = useTranslation20();
1939
+ const { t } = useTranslation19();
1929
1940
  const prompt = usePrompt3();
1930
1941
  const { getFullDate } = useDate();
1931
1942
  const { mutateAsync: cancelOrder } = useCancelOrder(order.id);
@@ -1956,27 +1967,51 @@ var OrderGeneralSection = ({ order }) => {
1956
1967
  }
1957
1968
  });
1958
1969
  };
1959
- return /* @__PURE__ */ jsxs22(Container9, { className: "flex items-center justify-between px-6 py-4", children: [
1960
- /* @__PURE__ */ jsxs22("div", { children: [
1961
- /* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-x-1", children: [
1962
- /* @__PURE__ */ jsxs22(Heading9, { children: [
1970
+ return /* @__PURE__ */ jsxs21(Container8, { className: "flex items-center justify-between px-6 py-4", children: [
1971
+ /* @__PURE__ */ jsxs21("div", { children: [
1972
+ /* @__PURE__ */ jsx20(DisplayField, { model: "order", zone: "general", id: "display_id", data: order, children: /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-x-1", children: [
1973
+ /* @__PURE__ */ jsxs21(Heading8, { children: [
1963
1974
  "#",
1964
1975
  order.display_id
1965
1976
  ] }),
1966
- /* @__PURE__ */ jsx21(Copy4, { content: `#${order.display_id}`, className: "text-ui-fg-muted" })
1967
- ] }),
1968
- /* @__PURE__ */ jsx21(Text19, { size: "small", className: "text-ui-fg-subtle", children: t("orders.onDateFromSalesChannel", {
1977
+ /* @__PURE__ */ jsx20(
1978
+ Copy4,
1979
+ {
1980
+ content: `#${order.display_id}`,
1981
+ className: "text-ui-fg-muted"
1982
+ }
1983
+ )
1984
+ ] }) }),
1985
+ /* @__PURE__ */ jsx20(Text18, { size: "small", className: "text-ui-fg-subtle", children: t("orders.onDateFromSalesChannel", {
1969
1986
  date: getFullDate({ date: order.created_at, includeTime: true }),
1970
1987
  salesChannel: order.sales_channel?.name
1971
1988
  }) })
1972
1989
  ] }),
1973
- /* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-x-4", children: [
1974
- /* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-x-1.5", children: [
1975
- /* @__PURE__ */ jsx21(OrderBadge, { order }),
1976
- /* @__PURE__ */ jsx21(PaymentBadge, { order }),
1977
- /* @__PURE__ */ jsx21(FulfillmentBadge, { order })
1990
+ /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-x-4", children: [
1991
+ /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-x-1.5", children: [
1992
+ /* @__PURE__ */ jsx20(DisplayField, { model: "order", zone: "general", id: "status", data: order, children: /* @__PURE__ */ jsx20(OrderBadge, { order }) }),
1993
+ /* @__PURE__ */ jsx20(
1994
+ DisplayField,
1995
+ {
1996
+ model: "order",
1997
+ zone: "general",
1998
+ id: "payment_status",
1999
+ data: order,
2000
+ children: /* @__PURE__ */ jsx20(PaymentBadge, { order })
2001
+ }
2002
+ ),
2003
+ /* @__PURE__ */ jsx20(
2004
+ DisplayField,
2005
+ {
2006
+ model: "order",
2007
+ zone: "general",
2008
+ id: "fulfillment_status",
2009
+ data: order,
2010
+ children: /* @__PURE__ */ jsx20(FulfillmentBadge, { order })
2011
+ }
2012
+ )
1978
2013
  ] }),
1979
- /* @__PURE__ */ jsx21(
2014
+ /* @__PURE__ */ jsx20(
1980
2015
  ActionMenu,
1981
2016
  {
1982
2017
  groups: [
@@ -1987,18 +2022,27 @@ var OrderGeneralSection = ({ order }) => {
1987
2022
  onClick: handleCancel,
1988
2023
  disabled: cancelDisabled,
1989
2024
  disabledTooltip: cancelDisabledTooltip,
1990
- icon: /* @__PURE__ */ jsx21(XCircle2, {})
2025
+ icon: /* @__PURE__ */ jsx20(XCircle2, {})
1991
2026
  }
1992
2027
  ]
1993
2028
  }
1994
2029
  ]
1995
2030
  }
1996
2031
  )
1997
- ] })
2032
+ ] }),
2033
+ /* @__PURE__ */ jsx20(
2034
+ DisplayExtensionZone8,
2035
+ {
2036
+ model: "order",
2037
+ zone: "general",
2038
+ data: order,
2039
+ builtInFieldIds: GENERAL_FIELD_IDS
2040
+ }
2041
+ )
1998
2042
  ] });
1999
2043
  };
2000
2044
  var FulfillmentBadge = ({ order }) => {
2001
- const { t } = useTranslation20();
2045
+ const { t } = useTranslation19();
2002
2046
  if (!order.fulfillment_status) {
2003
2047
  return null;
2004
2048
  }
@@ -2006,36 +2050,37 @@ var FulfillmentBadge = ({ order }) => {
2006
2050
  t,
2007
2051
  order.fulfillment_status
2008
2052
  );
2009
- return /* @__PURE__ */ jsx21(StatusBadge2, { color, className: "text-nowrap", children: label });
2053
+ return /* @__PURE__ */ jsx20(StatusBadge2, { color, className: "text-nowrap", children: label });
2010
2054
  };
2011
2055
  var PaymentBadge = ({ order }) => {
2012
- const { t } = useTranslation20();
2056
+ const { t } = useTranslation19();
2013
2057
  if (!order.payment_status) {
2014
2058
  return null;
2015
2059
  }
2016
2060
  const { label, color } = getOrderPaymentStatus(t, order.payment_status);
2017
- return /* @__PURE__ */ jsx21(StatusBadge2, { color, className: "text-nowrap", children: label });
2061
+ return /* @__PURE__ */ jsx20(StatusBadge2, { color, className: "text-nowrap", children: label });
2018
2062
  };
2019
2063
  var OrderBadge = ({ order }) => {
2020
- const { t } = useTranslation20();
2064
+ const { t } = useTranslation19();
2021
2065
  const orderStatus = getCanceledOrderStatus(t, order.status);
2022
2066
  if (!orderStatus) {
2023
2067
  return null;
2024
2068
  }
2025
- return /* @__PURE__ */ jsx21(StatusBadge2, { color: orderStatus.color, className: "text-nowrap", children: orderStatus.label });
2069
+ return /* @__PURE__ */ jsx20(StatusBadge2, { color: orderStatus.color, className: "text-nowrap", children: orderStatus.label });
2026
2070
  };
2027
2071
 
2028
2072
  // src/pages/orders/[id]/_components/order-payment-section/order-payment-section.tsx
2029
- import { ArrowUturnLeft as ArrowUturnLeft2, DocumentText } from "@medusajs/icons";
2073
+ import { ArrowDownRightMini, DocumentText } from "@medusajs/icons";
2030
2074
  import {
2031
2075
  Badge,
2032
- Container as Container10,
2033
- Heading as Heading10,
2076
+ Container as Container9,
2077
+ Heading as Heading9,
2034
2078
  StatusBadge as StatusBadge3,
2035
- Text as Text20,
2079
+ Text as Text19,
2036
2080
  Tooltip as Tooltip3
2037
2081
  } from "@medusajs/ui";
2038
- import { useTranslation as useTranslation21 } from "react-i18next";
2082
+ import { useTranslation as useTranslation20 } from "react-i18next";
2083
+ import { DisplayExtensionZone as DisplayExtensionZone9 } from "@mercurjs/dashboard-shared";
2039
2084
 
2040
2085
  // src/lib/payment.ts
2041
2086
  var getTotalCaptured = (paymentCollections) => paymentCollections.reduce((acc, paymentCollection) => {
@@ -2048,23 +2093,24 @@ var getTotalPending = (paymentCollections) => paymentCollections.filter((pc) =>
2048
2093
  }, 0);
2049
2094
 
2050
2095
  // src/pages/orders/[id]/_components/order-payment-section/order-payment-section.tsx
2051
- import { jsx as jsx22, jsxs as jsxs23 } from "react/jsx-runtime";
2096
+ import { jsx as jsx21, jsxs as jsxs22 } from "react/jsx-runtime";
2052
2097
  var getPaymentsFromOrder = (order) => {
2053
2098
  return order.payment_collections?.map((collection) => collection.payments).flat(1).filter(Boolean);
2054
2099
  };
2055
2100
  var OrderPaymentSection = ({ order }) => {
2056
2101
  const payments = getPaymentsFromOrder(order) ?? [];
2057
- return /* @__PURE__ */ jsxs23(Container10, { className: "divide-y p-0", children: [
2058
- /* @__PURE__ */ jsx22(Header2, { order }),
2059
- payments.length > 0 && /* @__PURE__ */ jsx22("ul", { className: "divide-y", children: payments.map((payment) => /* @__PURE__ */ jsx22(PaymentRow, { order, payment }, payment.id)) }),
2060
- /* @__PURE__ */ jsx22(Total, { order })
2102
+ return /* @__PURE__ */ jsxs22(Container9, { className: "divide-y divide-dashed p-0", children: [
2103
+ /* @__PURE__ */ jsx21(Header2, { order }),
2104
+ payments.length > 0 && /* @__PURE__ */ jsx21("div", { className: "divide-y divide-dashed", children: payments.map((payment) => /* @__PURE__ */ jsx21(PaymentRow, { order, payment }, payment.id)) }),
2105
+ /* @__PURE__ */ jsx21(Total, { order }),
2106
+ /* @__PURE__ */ jsx21(DisplayExtensionZone9, { model: "order", zone: "payment", data: order })
2061
2107
  ] });
2062
2108
  };
2063
2109
  var Header2 = ({ order }) => {
2064
- const { t } = useTranslation21();
2065
- return /* @__PURE__ */ jsxs23("div", { className: "flex items-center justify-between px-6 py-4", children: [
2066
- /* @__PURE__ */ jsx22(Heading10, { level: "h2", children: t("orders.payment.title") }),
2067
- order.payment_status && /* @__PURE__ */ jsx22(
2110
+ const { t } = useTranslation20();
2111
+ return /* @__PURE__ */ jsxs22("div", { className: "flex items-center justify-between px-6 py-4", children: [
2112
+ /* @__PURE__ */ jsx21(Heading9, { level: "h2", children: t("orders.payment.title") }),
2113
+ order.payment_status && /* @__PURE__ */ jsx21(
2068
2114
  StatusBadge3,
2069
2115
  {
2070
2116
  color: getOrderPaymentStatus(t, order.payment_status).color,
@@ -2075,46 +2121,28 @@ var Header2 = ({ order }) => {
2075
2121
  ] });
2076
2122
  };
2077
2123
  var Total = ({ order }) => {
2078
- const { t } = useTranslation21();
2124
+ const { t } = useTranslation20();
2079
2125
  if (!order.payment_collections?.length) {
2080
2126
  return null;
2081
2127
  }
2082
2128
  const paymentCollections = order.payment_collections;
2083
2129
  const totalCaptured = getTotalCaptured(paymentCollections);
2084
2130
  const totalPending = getTotalPending(paymentCollections);
2085
- const totalRefunded = paymentCollections.reduce(
2086
- (acc, pc) => acc + (pc.refunded_amount || 0),
2087
- 0
2088
- );
2089
- return /* @__PURE__ */ jsxs23("div", { children: [
2090
- /* @__PURE__ */ jsxs23("div", { className: "flex items-center justify-between px-6 py-4", children: [
2091
- /* @__PURE__ */ jsx22(Text20, { size: "small", weight: "plus", leading: "compact", children: t("orders.payment.totalPaidByCustomer") }),
2092
- /* @__PURE__ */ jsx22(Text20, { size: "small", weight: "plus", leading: "compact", children: getStylizedAmount(totalCaptured, order.currency_code) })
2131
+ return /* @__PURE__ */ jsxs22("div", { children: [
2132
+ /* @__PURE__ */ jsxs22("div", { className: "flex items-center justify-between px-6 py-4", children: [
2133
+ /* @__PURE__ */ jsx21(Text19, { size: "small", weight: "plus", leading: "compact", children: t("orders.payment.totalPaidByCustomer") }),
2134
+ /* @__PURE__ */ jsx21(Text19, { size: "small", weight: "plus", leading: "compact", children: getStylizedAmount(totalCaptured, order.currency_code) })
2093
2135
  ] }),
2094
- totalRefunded > 0 && /* @__PURE__ */ jsxs23("div", { className: "flex items-center justify-between px-6 py-4", children: [
2095
- /* @__PURE__ */ jsx22(Text20, { size: "small", weight: "plus", leading: "compact", children: t("orders.payment.totalRefunded") }),
2096
- /* @__PURE__ */ jsx22(Text20, { size: "small", weight: "plus", leading: "compact", children: getStylizedAmount(totalRefunded, order.currency_code) })
2097
- ] }),
2098
- order.status !== "canceled" && totalPending > 0 && /* @__PURE__ */ jsxs23("div", { className: "flex items-center justify-between px-6 py-4", children: [
2099
- /* @__PURE__ */ jsx22(Text20, { size: "small", weight: "plus", leading: "compact", children: t("orders.payment.totalPending") }),
2100
- /* @__PURE__ */ jsx22(Text20, { size: "small", weight: "plus", leading: "compact", children: getStylizedAmount(totalPending, order.currency_code) })
2136
+ order.status !== "canceled" && totalPending > 0 && /* @__PURE__ */ jsxs22("div", { className: "flex items-center justify-between px-6 py-4", children: [
2137
+ /* @__PURE__ */ jsx21(Text19, { size: "small", weight: "plus", leading: "compact", children: t("orders.payment.totalPending") }),
2138
+ /* @__PURE__ */ jsx21(Text19, { size: "small", weight: "plus", leading: "compact", children: getStylizedAmount(totalPending, order.currency_code) })
2101
2139
  ] })
2102
2140
  ] });
2103
2141
  };
2104
2142
  var getPaymentStatus = (payment) => {
2105
- const refundedAmount = (payment.refunds ?? []).reduce(
2106
- (acc, r) => acc + (r.amount ?? 0),
2107
- 0
2108
- );
2109
2143
  if (payment.canceled_at) {
2110
2144
  return { labelKey: "orders.payment.status.canceled", color: "red" };
2111
2145
  }
2112
- if (refundedAmount > 0 && refundedAmount >= payment.amount) {
2113
- return { labelKey: "orders.payment.status.refunded", color: "grey" };
2114
- }
2115
- if (refundedAmount > 0) {
2116
- return { labelKey: "orders.payment.status.partiallyRefunded", color: "orange" };
2117
- }
2118
2146
  if (payment.captured_at) {
2119
2147
  return { labelKey: "orders.payment.status.captured", color: "green" };
2120
2148
  }
@@ -2124,71 +2152,41 @@ var PaymentRow = ({
2124
2152
  order,
2125
2153
  payment
2126
2154
  }) => {
2127
- const { t } = useTranslation21();
2155
+ const { t } = useTranslation20();
2128
2156
  const { getFullDate } = useDate();
2129
2157
  const status = getPaymentStatus(payment);
2130
2158
  const refunds = payment.refunds ?? [];
2131
- const refundedAmount = refunds.reduce(
2132
- (acc, r) => acc + (r.amount ?? 0),
2133
- 0
2134
- );
2159
+ const refundedAmount = refunds.reduce((acc, r) => acc + (r.amount ?? 0), 0);
2135
2160
  const isFullyRefunded = refundedAmount > 0 && refundedAmount >= payment.amount;
2136
2161
  const canRefund = !!payment.captured_at && !payment.canceled_at && !isFullyRefunded;
2137
- return /* @__PURE__ */ jsxs23("li", { "data-testid": `payment-row-${payment.id}`, children: [
2138
- /* @__PURE__ */ jsxs23("div", { className: "flex items-center justify-between px-6 py-4", children: [
2139
- /* @__PURE__ */ jsxs23("div", { className: "flex min-w-0 flex-col", children: [
2140
- /* @__PURE__ */ jsx22(Tooltip3, { content: payment.id, children: /* @__PURE__ */ jsx22(
2141
- Text20,
2142
- {
2143
- size: "small",
2144
- weight: "plus",
2145
- leading: "compact",
2146
- className: isFullyRefunded ? "text-ui-fg-muted truncate line-through" : "text-ui-fg-base truncate",
2147
- children: `#${payment.id.slice(-7)}`
2148
- }
2149
- ) }),
2150
- /* @__PURE__ */ jsx22(
2151
- Text20,
2152
- {
2153
- size: "xsmall",
2154
- leading: "compact",
2155
- className: isFullyRefunded ? "text-ui-fg-muted line-through" : "text-ui-fg-subtle",
2156
- children: payment.created_at ? getFullDate({ date: payment.created_at, includeTime: true }) : null
2157
- }
2158
- )
2162
+ return /* @__PURE__ */ jsxs22("div", { className: "divide-y divide-dashed", "data-testid": `payment-row-${payment.id}`, children: [
2163
+ /* @__PURE__ */ jsxs22("div", { className: "text-ui-fg-subtle grid grid-cols-[1fr_1fr_1fr_20px] items-center gap-x-4 px-6 py-4 sm:grid-cols-[1fr_1fr_1fr_1fr_20px]", children: [
2164
+ /* @__PURE__ */ jsxs22("div", { className: "w-full min-w-[60px] overflow-hidden", children: [
2165
+ /* @__PURE__ */ jsx21(Text19, { size: "small", leading: "compact", weight: "plus", className: "truncate", children: /* @__PURE__ */ jsx21(display_id_default, { id: payment.id }) }),
2166
+ /* @__PURE__ */ jsx21(Text19, { size: "small", leading: "compact", children: payment.created_at ? getFullDate({ date: payment.created_at, includeTime: true }) : null })
2159
2167
  ] }),
2160
- /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-x-3", children: [
2161
- /* @__PURE__ */ jsx22(StatusBadge3, { color: status.color, className: "text-nowrap", children: t(status.labelKey) }),
2162
- /* @__PURE__ */ jsx22(
2163
- Text20,
2164
- {
2165
- size: "small",
2166
- weight: "plus",
2167
- leading: "compact",
2168
- className: isFullyRefunded ? "line-through" : void 0,
2169
- children: getStylizedAmount(payment.amount, order.currency_code)
2170
- }
2171
- ),
2172
- /* @__PURE__ */ jsx22(
2173
- ActionMenu,
2174
- {
2175
- groups: [
2176
- {
2177
- actions: [
2178
- {
2179
- label: t("orders.payment.createRefund"),
2180
- icon: /* @__PURE__ */ jsx22(ArrowUturnLeft2, {}),
2181
- to: `/orders/${order.id}/refund?payment_id=${payment.id}`,
2182
- disabled: !canRefund
2183
- }
2184
- ]
2185
- }
2186
- ]
2187
- }
2188
- )
2189
- ] })
2168
+ /* @__PURE__ */ jsx21("div", { className: "hidden items-center justify-end sm:flex", children: /* @__PURE__ */ jsx21(Text19, { size: "small", leading: "compact", className: "capitalize", children: payment.provider_id }) }),
2169
+ /* @__PURE__ */ jsx21("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx21(StatusBadge3, { color: status.color, className: "text-nowrap", children: t(status.labelKey) }) }),
2170
+ /* @__PURE__ */ jsx21("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx21(Text19, { size: "small", leading: "compact", children: getLocaleAmount(payment.amount, order.currency_code) }) }),
2171
+ /* @__PURE__ */ jsx21(
2172
+ ActionMenu,
2173
+ {
2174
+ groups: [
2175
+ {
2176
+ actions: [
2177
+ {
2178
+ label: t("orders.payment.createRefund"),
2179
+ icon: /* @__PURE__ */ jsx21(ArrowDownRightMini, {}),
2180
+ to: `/orders/${order.id}/refund?payment_id=${payment.id}`,
2181
+ disabled: !canRefund
2182
+ }
2183
+ ]
2184
+ }
2185
+ ]
2186
+ }
2187
+ )
2190
2188
  ] }),
2191
- refunds.map((refund) => /* @__PURE__ */ jsx22(
2189
+ refunds.map((refund) => /* @__PURE__ */ jsx21(
2192
2190
  RefundRow,
2193
2191
  {
2194
2192
  refund,
@@ -2202,38 +2200,49 @@ var RefundRow = ({
2202
2200
  refund,
2203
2201
  currencyCode
2204
2202
  }) => {
2205
- const { t } = useTranslation21();
2203
+ const { t } = useTranslation20();
2206
2204
  const { getFullDate } = useDate();
2207
2205
  const reasonLabel = refund.refund_reason?.label ?? null;
2208
- return /* @__PURE__ */ jsxs23(
2206
+ return /* @__PURE__ */ jsxs22(
2209
2207
  "div",
2210
2208
  {
2211
- className: "flex items-center justify-between px-6 py-3 pl-12 bg-ui-bg-subtle",
2209
+ className: "bg-ui-bg-subtle text-ui-fg-subtle grid grid-cols-[1fr_1fr_1fr_20px] items-center gap-x-4 px-6 py-4",
2212
2210
  "data-testid": `refund-row-${refund.id}`,
2213
2211
  children: [
2214
- /* @__PURE__ */ jsxs23("div", { className: "flex min-w-0 flex-col", children: [
2215
- /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-x-2", children: [
2216
- /* @__PURE__ */ jsx22(Text20, { size: "small", leading: "compact", className: "text-ui-fg-subtle", children: t("orders.payment.refund") }),
2217
- reasonLabel && /* @__PURE__ */ jsx22(Badge, { size: "2xsmall", rounded: "full", children: reasonLabel }),
2218
- refund.note && /* @__PURE__ */ jsx22(Tooltip3, { content: refund.note, children: /* @__PURE__ */ jsx22(DocumentText, { className: "text-ui-fg-subtle h-3 w-3" }) })
2219
- ] }),
2220
- refund.created_at && /* @__PURE__ */ jsx22(Text20, { size: "xsmall", leading: "compact", className: "text-ui-fg-subtle", children: getFullDate({ date: refund.created_at, includeTime: true }) })
2212
+ /* @__PURE__ */ jsxs22("div", { className: "flex flex-row", children: [
2213
+ /* @__PURE__ */ jsx21("div", { className: "self-center pr-3", children: /* @__PURE__ */ jsx21(ArrowDownRightMini, { className: "text-ui-fg-muted" }) }),
2214
+ /* @__PURE__ */ jsxs22("div", { className: "min-w-0", children: [
2215
+ /* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-x-1", children: [
2216
+ /* @__PURE__ */ jsx21(Text19, { size: "small", leading: "compact", weight: "plus", children: t("orders.payment.refund") }),
2217
+ refund.note && /* @__PURE__ */ jsx21(Tooltip3, { content: refund.note, children: /* @__PURE__ */ jsx21(DocumentText, { className: "text-ui-tag-neutral-icon inline" }) })
2218
+ ] }),
2219
+ refund.created_at && /* @__PURE__ */ jsx21(Text19, { size: "small", leading: "compact", children: getFullDate({ date: refund.created_at, includeTime: true }) })
2220
+ ] })
2221
2221
  ] }),
2222
- /* @__PURE__ */ jsx22(Text20, { size: "small", weight: "plus", leading: "compact", children: `- ${getLocaleAmount(refund.amount ?? 0, currencyCode)}` })
2222
+ /* @__PURE__ */ jsx21("div", { className: "flex items-center justify-end", children: reasonLabel && /* @__PURE__ */ jsx21(
2223
+ Badge,
2224
+ {
2225
+ size: "2xsmall",
2226
+ className: "cursor-default select-none capitalize",
2227
+ rounded: "full",
2228
+ children: reasonLabel
2229
+ }
2230
+ ) }),
2231
+ /* @__PURE__ */ jsx21("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx21(Text19, { size: "small", leading: "compact", children: `- ${getLocaleAmount(refund.amount ?? 0, currencyCode)}` }) })
2223
2232
  ]
2224
2233
  }
2225
2234
  );
2226
2235
  };
2227
2236
 
2228
2237
  // src/pages/orders/[id]/_components/order-summary-section/order-summary-section.tsx
2229
- import { useMemo as useMemo5, useState as useState5 } from "react";
2230
- import { useTranslation as useTranslation24 } from "react-i18next";
2238
+ import { useMemo as useMemo4, useState as useState5 } from "react";
2239
+ import { useTranslation as useTranslation23 } from "react-i18next";
2231
2240
  import { Link as Link4 } from "react-router-dom";
2232
2241
  import {
2233
- ArrowDownRightMini,
2242
+ ArrowDownRightMini as ArrowDownRightMini2,
2234
2243
  ArrowLongRight,
2235
2244
  ArrowPath as ArrowPath2,
2236
- ArrowUturnLeft as ArrowUturnLeft3,
2245
+ ArrowUturnLeft as ArrowUturnLeft2,
2237
2246
  DocumentText as DocumentText2,
2238
2247
  ExclamationCircle as ExclamationCircle2,
2239
2248
  PencilSquare,
@@ -2243,23 +2252,23 @@ import {
2243
2252
  Badge as Badge4,
2244
2253
  Button as Button7,
2245
2254
  clx as clx2,
2246
- Container as Container11,
2255
+ Container as Container10,
2247
2256
  Copy as Copy5,
2248
- Heading as Heading11,
2257
+ Heading as Heading10,
2249
2258
  StatusBadge as StatusBadge4,
2250
- Text as Text22,
2251
- Tooltip as Tooltip5,
2252
- toast as toast7
2259
+ Text as Text21,
2260
+ Tooltip as Tooltip5
2253
2261
  } from "@medusajs/ui";
2262
+ import { DisplayExtensionZone as DisplayExtensionZone10, WidgetZone } from "@mercurjs/dashboard-shared";
2254
2263
 
2255
2264
  // src/pages/orders/[id]/_components/order-summary-section/return-info-popover.tsx
2256
2265
  import { useState as useState4 } from "react";
2257
- import { useTranslation as useTranslation22 } from "react-i18next";
2266
+ import { useTranslation as useTranslation21 } from "react-i18next";
2258
2267
  import { InformationCircleSolid } from "@medusajs/icons";
2259
- import { Badge as Badge2, Popover as Popover3, Text as Text21 } from "@medusajs/ui";
2260
- import { jsx as jsx23, jsxs as jsxs24 } from "react/jsx-runtime";
2268
+ import { Badge as Badge2, Popover as Popover3, Text as Text20 } from "@medusajs/ui";
2269
+ import { jsx as jsx22, jsxs as jsxs23 } from "react/jsx-runtime";
2261
2270
  function ReturnInfoPopover({ orderReturn }) {
2262
- const { t } = useTranslation22();
2271
+ const { t } = useTranslation21();
2263
2272
  const { getFullDate } = useDate();
2264
2273
  const [open, setOpen] = useState4(false);
2265
2274
  if (typeof orderReturn !== "object") {
@@ -2275,8 +2284,8 @@ function ReturnInfoPopover({ orderReturn }) {
2275
2284
  returnType = "Exchange";
2276
2285
  returnTypeId = orderReturn.exchange_id;
2277
2286
  }
2278
- return /* @__PURE__ */ jsxs24(Popover3, { open, children: [
2279
- /* @__PURE__ */ jsx23(
2287
+ return /* @__PURE__ */ jsxs23(Popover3, { open, children: [
2288
+ /* @__PURE__ */ jsx22(
2280
2289
  Popover3.Trigger,
2281
2290
  {
2282
2291
  onMouseEnter: () => setOpen(true),
@@ -2284,31 +2293,31 @@ function ReturnInfoPopover({ orderReturn }) {
2284
2293
  autoFocus: false,
2285
2294
  className: "align-sub focus-visible:outline-none",
2286
2295
  "data-testid": "order-summary-return-info-trigger",
2287
- children: /* @__PURE__ */ jsx23(InformationCircleSolid, {})
2296
+ children: /* @__PURE__ */ jsx22(InformationCircleSolid, {})
2288
2297
  }
2289
2298
  ),
2290
- /* @__PURE__ */ jsx23(
2299
+ /* @__PURE__ */ jsx22(
2291
2300
  Popover3.Content,
2292
2301
  {
2293
2302
  align: "center",
2294
2303
  side: "top",
2295
2304
  className: "bg-ui-bg-component p-2 focus-visible:outline-none",
2296
- children: /* @__PURE__ */ jsxs24("div", { children: [
2297
- /* @__PURE__ */ jsxs24(Badge2, { size: "2xsmall", className: "mb-2", rounded: "full", children: [
2305
+ children: /* @__PURE__ */ jsxs23("div", { children: [
2306
+ /* @__PURE__ */ jsxs23(Badge2, { size: "2xsmall", className: "mb-2", rounded: "full", children: [
2298
2307
  returnType,
2299
2308
  ": #",
2300
2309
  returnTypeId.slice(-7)
2301
2310
  ] }),
2302
- /* @__PURE__ */ jsxs24(Text21, { size: "xsmall", children: [
2303
- /* @__PURE__ */ jsx23("span", { className: "text-ui-fg-subtle", children: t("orders.returns.returnRequested") }),
2311
+ /* @__PURE__ */ jsxs23(Text20, { size: "xsmall", children: [
2312
+ /* @__PURE__ */ jsx22("span", { className: "text-ui-fg-subtle", children: t("orders.returns.returnRequested") }),
2304
2313
  " \xB7 ",
2305
2314
  getFullDate({
2306
2315
  date: orderReturn.requested_at,
2307
2316
  includeTime: true
2308
2317
  })
2309
2318
  ] }),
2310
- /* @__PURE__ */ jsxs24(Text21, { size: "xsmall", children: [
2311
- /* @__PURE__ */ jsx23("span", { className: "text-ui-fg-subtle", children: t("orders.returns.itemReceived") }),
2319
+ /* @__PURE__ */ jsxs23(Text20, { size: "xsmall", children: [
2320
+ /* @__PURE__ */ jsx22("span", { className: "text-ui-fg-subtle", children: t("orders.returns.itemReceived") }),
2312
2321
  " \xB7 ",
2313
2322
  orderReturn.received_at ? getFullDate({
2314
2323
  date: orderReturn.received_at,
@@ -2325,10 +2334,10 @@ var return_info_popover_default = ReturnInfoPopover;
2325
2334
  // src/pages/orders/[id]/_components/order-summary-section/shipping-info-popover.tsx
2326
2335
  import { InformationCircleSolid as InformationCircleSolid2 } from "@medusajs/icons";
2327
2336
  import { Badge as Badge3, Tooltip as Tooltip4 } from "@medusajs/ui";
2328
- import { useTranslation as useTranslation23 } from "react-i18next";
2329
- import { jsx as jsx24, jsxs as jsxs25 } from "react/jsx-runtime";
2337
+ import { useTranslation as useTranslation22 } from "react-i18next";
2338
+ import { jsx as jsx23, jsxs as jsxs24 } from "react/jsx-runtime";
2330
2339
  function ShippingInfoPopover({ shippingMethod }) {
2331
- const { t } = useTranslation23();
2340
+ const { t } = useTranslation22();
2332
2341
  const shippingDetail = shippingMethod?.detail;
2333
2342
  if (!shippingDetail) {
2334
2343
  return;
@@ -2346,26 +2355,26 @@ function ShippingInfoPopover({ shippingMethod }) {
2346
2355
  if (!rmaId) {
2347
2356
  return;
2348
2357
  }
2349
- return /* @__PURE__ */ jsx24(
2358
+ return /* @__PURE__ */ jsx23(
2350
2359
  Tooltip4,
2351
2360
  {
2352
- content: /* @__PURE__ */ jsxs25(Badge3, { size: "2xsmall", rounded: "full", children: [
2361
+ content: /* @__PURE__ */ jsxs24(Badge3, { size: "2xsmall", rounded: "full", children: [
2353
2362
  rmaType,
2354
2363
  ": #",
2355
2364
  rmaId.slice(-7)
2356
2365
  ] }),
2357
- children: /* @__PURE__ */ jsx24(InformationCircleSolid2, { className: "inline-block text-ui-fg-muted ml-1" })
2366
+ children: /* @__PURE__ */ jsx23(InformationCircleSolid2, { className: "inline-block text-ui-fg-muted ml-1" })
2358
2367
  }
2359
2368
  );
2360
2369
  }
2361
2370
  var shipping_info_popover_default = ShippingInfoPopover;
2362
2371
 
2363
2372
  // src/pages/orders/[id]/_components/order-summary-section/order-summary-section.tsx
2364
- import { Fragment as Fragment3, jsx as jsx25, jsxs as jsxs26 } from "react/jsx-runtime";
2373
+ import { Fragment as Fragment3, jsx as jsx24, jsxs as jsxs25 } from "react/jsx-runtime";
2365
2374
  var OrderSummarySection = ({
2366
2375
  order
2367
2376
  }) => {
2368
- const { t } = useTranslation24();
2377
+ const { t } = useTranslation23();
2369
2378
  const { reservations } = useReservationItems(
2370
2379
  {
2371
2380
  line_item_id: order?.items?.map((i) => i.id),
@@ -2374,7 +2383,7 @@ var OrderSummarySection = ({
2374
2383
  { enabled: Array.isArray(order?.items) }
2375
2384
  );
2376
2385
  const { order: orderPreview } = useOrderPreview(order.id);
2377
- const reservationList = useMemo5(
2386
+ const reservationList = useMemo4(
2378
2387
  () => reservations ?? [],
2379
2388
  [reservations]
2380
2389
  );
@@ -2383,12 +2392,12 @@ var OrderSummarySection = ({
2383
2392
  order_id: order.id,
2384
2393
  fields: "+received_at"
2385
2394
  });
2386
- const receivableReturns = useMemo5(
2395
+ const receivableReturns = useMemo4(
2387
2396
  () => receivableReturnsList.filter((r) => !r.canceled_at),
2388
2397
  [receivableReturnsList]
2389
2398
  );
2390
2399
  const showReturns = !!receivableReturns.length;
2391
- const showAllocateButton = useMemo5(() => {
2400
+ const showAllocateButton = useMemo4(() => {
2392
2401
  if (!reservations) {
2393
2402
  return false;
2394
2403
  }
@@ -2416,19 +2425,19 @@ var OrderSummarySection = ({
2416
2425
  order.currency_code
2417
2426
  );
2418
2427
  const showRefund = unpaidPaymentCollection && pendingDifference < 0 && isAmountSignificant;
2419
- return /* @__PURE__ */ jsxs26(Container11, { className: "divide-y p-0", children: [
2420
- /* @__PURE__ */ jsx25(Header3, { order, orderPreview }),
2421
- /* @__PURE__ */ jsx25(ItemBreakdown, { order, reservations: reservationList }),
2422
- /* @__PURE__ */ jsx25(CostBreakdown, { order }),
2423
- /* @__PURE__ */ jsx25(Total2, { order }),
2424
- (showReturns || showRefund || showAllocateButton) && /* @__PURE__ */ jsxs26("div", { className: "bg-ui-bg-subtle flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4", children: [
2425
- showReturns && (receivableReturns.length === 1 ? /* @__PURE__ */ jsx25(Button7, { asChild: true, variant: "secondary", size: "small", children: /* @__PURE__ */ jsx25(
2428
+ return /* @__PURE__ */ jsxs25(Container10, { className: "divide-y p-0", children: [
2429
+ /* @__PURE__ */ jsx24(Header3, { order, orderPreview }),
2430
+ /* @__PURE__ */ jsx24(ItemBreakdown, { order, reservations: reservationList }),
2431
+ /* @__PURE__ */ jsx24(CostBreakdown, { order }),
2432
+ /* @__PURE__ */ jsx24(Total2, { order }),
2433
+ (showReturns || showRefund || showAllocateButton) && /* @__PURE__ */ jsxs25("div", { className: "bg-ui-bg-subtle flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4", children: [
2434
+ showReturns && (receivableReturns.length === 1 ? /* @__PURE__ */ jsx24(Button7, { asChild: true, variant: "secondary", size: "small", children: /* @__PURE__ */ jsx24(
2426
2435
  Link4,
2427
2436
  {
2428
2437
  to: `/orders/${order.id}/returns/${receivableReturns[0].id}/receive`,
2429
2438
  children: t("orders.returns.receive.action")
2430
2439
  }
2431
- ) }) : /* @__PURE__ */ jsx25(
2440
+ ) }) : /* @__PURE__ */ jsx24(
2432
2441
  ActionMenu,
2433
2442
  {
2434
2443
  groups: [
@@ -2449,40 +2458,41 @@ var OrderSummarySection = ({
2449
2458
  id: `#${id?.slice(-7)}`,
2450
2459
  returnType
2451
2460
  }),
2452
- icon: /* @__PURE__ */ jsx25(ArrowLongRight, {}),
2461
+ icon: /* @__PURE__ */ jsx24(ArrowLongRight, {}),
2453
2462
  to: `/orders/${order.id}/returns/${r.id}/receive`
2454
2463
  };
2455
2464
  })
2456
2465
  }
2457
2466
  ],
2458
- children: /* @__PURE__ */ jsx25(Button7, { variant: "secondary", size: "small", children: t("orders.returns.receive.action") })
2467
+ children: /* @__PURE__ */ jsx24(Button7, { variant: "secondary", size: "small", children: t("orders.returns.receive.action") })
2459
2468
  }
2460
2469
  )),
2461
- showAllocateButton && /* @__PURE__ */ jsx25(
2470
+ showAllocateButton && /* @__PURE__ */ jsx24(
2462
2471
  Button7,
2463
2472
  {
2464
2473
  asChild: true,
2465
2474
  variant: "secondary",
2466
2475
  size: "small",
2467
2476
  "data-testid": "order-summary-allocate-items-cta",
2468
- children: /* @__PURE__ */ jsx25(Link4, { to: "allocate-items", children: t("orders.allocateItems.action") })
2477
+ children: /* @__PURE__ */ jsx24(Link4, { to: "allocate-items", children: t("orders.allocateItems.action") })
2469
2478
  }
2470
2479
  ),
2471
- showRefund && /* @__PURE__ */ jsx25(Button7, { size: "small", variant: "secondary", asChild: true, children: /* @__PURE__ */ jsx25(Link4, { to: `/orders/${order.id}/refund`, children: t("orders.payment.refundAmount", {
2480
+ showRefund && /* @__PURE__ */ jsx24(Button7, { size: "small", variant: "secondary", asChild: true, children: /* @__PURE__ */ jsx24(Link4, { to: `/orders/${order.id}/refund`, children: t("orders.payment.refundAmount", {
2472
2481
  amount: getStylizedAmount(
2473
2482
  pendingDifference * -1,
2474
2483
  order?.currency_code
2475
2484
  )
2476
2485
  }) }) })
2477
2486
  ] }),
2478
- /* @__PURE__ */ jsx25(OutstandingActions, { order })
2487
+ /* @__PURE__ */ jsx24(WidgetZone, { id: "orders.detail.summary", data: order }),
2488
+ /* @__PURE__ */ jsx24(DisplayExtensionZone10, { model: "order", zone: "summary", data: order })
2479
2489
  ] });
2480
2490
  };
2481
2491
  var Header3 = ({
2482
2492
  order,
2483
2493
  orderPreview
2484
2494
  }) => {
2485
- const { t } = useTranslation24();
2495
+ const { t } = useTranslation23();
2486
2496
  const isCanceled = !!order.canceled_at;
2487
2497
  const returnOutOfPolicy = isOutsidePolicyWindow(order, RETURN_POLICY_DAYS);
2488
2498
  const exchangeOutOfPolicy = isOutsidePolicyWindow(
@@ -2500,9 +2510,9 @@ var Header3 = ({
2500
2510
  const returnDisabledByChange = isOrderEditActive || !!orderChange?.exchange_id || !!orderChange?.claim_id;
2501
2511
  const exchangeDisabledByChange = isOrderEditActive || !!orderChange?.return_id && !orderChange?.exchange_id || !!orderChange?.claim_id;
2502
2512
  const claimDisabledByChange = isOrderEditActive || !!orderChange?.return_id && !orderChange?.claim_id || !!orderChange?.exchange_id;
2503
- return /* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-between px-6 py-4", children: [
2504
- /* @__PURE__ */ jsx25(Heading11, { level: "h2", children: t("fields.summary") }),
2505
- /* @__PURE__ */ jsx25(
2513
+ return /* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between px-6 py-4", children: [
2514
+ /* @__PURE__ */ jsx24(Heading10, { level: "h2", children: t("fields.summary") }),
2515
+ /* @__PURE__ */ jsx24(
2506
2516
  ActionMenu,
2507
2517
  {
2508
2518
  groups: [
@@ -2514,7 +2524,7 @@ var Header3 = ({
2514
2524
  ),
2515
2525
  to: "edit",
2516
2526
  disabled: editDisabled,
2517
- icon: /* @__PURE__ */ jsx25(PencilSquare, {})
2527
+ icon: /* @__PURE__ */ jsx24(PencilSquare, {})
2518
2528
  }
2519
2529
  ]
2520
2530
  },
@@ -2527,7 +2537,7 @@ var Header3 = ({
2527
2537
  disabledTooltip: returnOutOfPolicy ? t("orders.returns.outOfPolicy", {
2528
2538
  days: RETURN_POLICY_DAYS
2529
2539
  }) : void 0,
2530
- icon: /* @__PURE__ */ jsx25(ArrowUturnLeft3, {})
2540
+ icon: /* @__PURE__ */ jsx24(ArrowUturnLeft2, {})
2531
2541
  },
2532
2542
  {
2533
2543
  label: orderChange?.id && orderChange?.exchange_id ? t("orders.exchanges.manage") : t("orders.exchanges.create"),
@@ -2536,7 +2546,7 @@ var Header3 = ({
2536
2546
  disabledTooltip: exchangeOutOfPolicy ? t("orders.exchanges.outOfPolicy", {
2537
2547
  days: EXCHANGE_POLICY_DAYS
2538
2548
  }) : void 0,
2539
- icon: /* @__PURE__ */ jsx25(ArrowPath2, {})
2549
+ icon: /* @__PURE__ */ jsx24(ArrowPath2, {})
2540
2550
  },
2541
2551
  {
2542
2552
  label: orderChange?.id && orderChange?.claim_id ? t("orders.claims.manage") : t("orders.claims.create"),
@@ -2545,7 +2555,7 @@ var Header3 = ({
2545
2555
  disabledTooltip: claimOutOfPolicy ? t("orders.claims.outOfPolicy", {
2546
2556
  days: CLAIM_POLICY_DAYS
2547
2557
  }) : void 0,
2548
- icon: /* @__PURE__ */ jsx25(ExclamationCircle2, {})
2558
+ icon: /* @__PURE__ */ jsx24(ExclamationCircle2, {})
2549
2559
  }
2550
2560
  ]
2551
2561
  }
@@ -2560,7 +2570,7 @@ var Item = ({
2560
2570
  returns,
2561
2571
  reservation
2562
2572
  }) => {
2563
- const { t } = useTranslation24();
2573
+ const { t } = useTranslation23();
2564
2574
  const original_price = item.variant?.prices?.find((price2) => price2.currency_code === currencyCode)?.amount || 0;
2565
2575
  const price = item.unit_price;
2566
2576
  const offerInventoryLinks = item.offer?.inventory_item_link ?? [];
@@ -2568,17 +2578,17 @@ var Item = ({
2568
2578
  const hasUnfulfilledItems = item.quantity - (item.detail?.fulfilled_quantity ?? 0) > 0;
2569
2579
  const offerSku = item.offer?.sku ?? null;
2570
2580
  const captionSku = offerSku ?? item.variant_sku ?? null;
2571
- return /* @__PURE__ */ jsxs26(Fragment3, { children: [
2572
- /* @__PURE__ */ jsxs26(
2581
+ return /* @__PURE__ */ jsxs25(Fragment3, { children: [
2582
+ /* @__PURE__ */ jsxs25(
2573
2583
  "div",
2574
2584
  {
2575
2585
  className: "text-ui-fg-subtle grid grid-cols-2 items-center gap-x-4 px-6 py-4",
2576
2586
  children: [
2577
- /* @__PURE__ */ jsxs26("div", { className: "flex items-start gap-x-4", children: [
2578
- /* @__PURE__ */ jsx25(Thumbnail, { src: item.thumbnail }),
2579
- /* @__PURE__ */ jsxs26("div", { children: [
2580
- /* @__PURE__ */ jsx25(
2581
- Text22,
2587
+ /* @__PURE__ */ jsxs25("div", { className: "flex items-start gap-x-4", children: [
2588
+ /* @__PURE__ */ jsx24(Thumbnail, { src: item.thumbnail }),
2589
+ /* @__PURE__ */ jsxs25("div", { children: [
2590
+ /* @__PURE__ */ jsx24(
2591
+ Text21,
2582
2592
  {
2583
2593
  size: "small",
2584
2594
  leading: "compact",
@@ -2587,24 +2597,24 @@ var Item = ({
2587
2597
  children: item.title || item.product_title
2588
2598
  }
2589
2599
  ),
2590
- captionSku && /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-x-1", children: [
2591
- /* @__PURE__ */ jsx25(Text22, { size: "small", children: captionSku }),
2592
- /* @__PURE__ */ jsx25(Copy5, { content: captionSku, className: "text-ui-fg-muted" })
2600
+ captionSku && /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-x-1", children: [
2601
+ /* @__PURE__ */ jsx24(Text21, { size: "small", children: captionSku }),
2602
+ /* @__PURE__ */ jsx24(Copy5, { content: captionSku, className: "text-ui-fg-muted" })
2593
2603
  ] }),
2594
- /* @__PURE__ */ jsx25(Text22, { size: "small", children: item.variant?.options?.map((o) => o.value).join(" \xB7 ") })
2604
+ /* @__PURE__ */ jsx24(Text21, { size: "small", children: item.variant?.options?.map((o) => o.value).join(" \xB7 ") })
2595
2605
  ] })
2596
2606
  ] }),
2597
- /* @__PURE__ */ jsxs26("div", { className: "grid grid-cols-3 items-center gap-x-4", children: [
2598
- /* @__PURE__ */ jsx25("div", { className: "flex items-center justify-end gap-x-4", children: /* @__PURE__ */ jsxs26(Text22, { size: "small", children: [
2599
- original_price !== price && /* @__PURE__ */ jsx25("span", { className: "line-through text-ui-fg-muted text-xs mr-1", children: getLocaleAmount(original_price, currencyCode) }),
2607
+ /* @__PURE__ */ jsxs25("div", { className: "grid grid-cols-3 items-center gap-x-4", children: [
2608
+ /* @__PURE__ */ jsx24("div", { className: "flex items-center justify-end gap-x-4", children: /* @__PURE__ */ jsxs25(Text21, { size: "small", children: [
2609
+ original_price !== price && /* @__PURE__ */ jsx24("span", { className: "line-through text-ui-fg-muted text-xs mr-1", children: getLocaleAmount(original_price, currencyCode) }),
2600
2610
  getLocaleAmount(price, currencyCode)
2601
2611
  ] }) }),
2602
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-x-2", children: [
2603
- /* @__PURE__ */ jsx25("div", { className: "w-fit min-w-[27px]", children: /* @__PURE__ */ jsxs26(Text22, { size: "small", children: [
2604
- /* @__PURE__ */ jsx25("span", { className: "tabular-nums", children: item.quantity }),
2612
+ /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-x-2", children: [
2613
+ /* @__PURE__ */ jsx24("div", { className: "w-fit min-w-[27px]", children: /* @__PURE__ */ jsxs25(Text21, { size: "small", children: [
2614
+ /* @__PURE__ */ jsx24("span", { className: "tabular-nums", children: item.quantity }),
2605
2615
  "x"
2606
2616
  ] }) }),
2607
- /* @__PURE__ */ jsx25("div", { className: "overflow-visible", children: isInventoryManaged && hasUnfulfilledItems && /* @__PURE__ */ jsx25(
2617
+ /* @__PURE__ */ jsx24("div", { className: "overflow-visible", children: isInventoryManaged && hasUnfulfilledItems && /* @__PURE__ */ jsx24(
2608
2618
  StatusBadge4,
2609
2619
  {
2610
2620
  color: reservation ? "green" : "orange",
@@ -2613,13 +2623,13 @@ var Item = ({
2613
2623
  }
2614
2624
  ) })
2615
2625
  ] }),
2616
- /* @__PURE__ */ jsx25("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx25(Text22, { size: "small", className: "pt-[1px]", children: getLocaleAmount(item.original_total || 0, currencyCode) }) })
2626
+ /* @__PURE__ */ jsx24("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ jsx24(Text21, { size: "small", className: "pt-[1px]", children: getLocaleAmount(item.original_total || 0, currencyCode) }) })
2617
2627
  ] })
2618
2628
  ]
2619
2629
  },
2620
2630
  item.id
2621
2631
  ),
2622
- returns.map((r) => /* @__PURE__ */ jsx25(ReturnBreakdown, { orderReturn: r, itemId: item.id }, r.id))
2632
+ returns.map((r) => /* @__PURE__ */ jsx24(ReturnBreakdown, { orderReturn: r, itemId: item.id }, r.id))
2623
2633
  ] });
2624
2634
  };
2625
2635
  var ItemBreakdown = ({
@@ -2630,16 +2640,16 @@ var ItemBreakdown = ({
2630
2640
  order_id: order.id,
2631
2641
  fields: "*items,*items.reason"
2632
2642
  });
2633
- const returns = useMemo5(
2643
+ const returns = useMemo4(
2634
2644
  () => returnsList.filter((r) => !r.canceled_at),
2635
2645
  [returnsList]
2636
2646
  );
2637
- const reservationsMap = useMemo5(
2647
+ const reservationsMap = useMemo4(
2638
2648
  () => new Map(reservations.map((r) => [r.line_item_id, r])),
2639
2649
  [reservations]
2640
2650
  );
2641
- return /* @__PURE__ */ jsx25("div", { children: order.items?.map((item) => {
2642
- return /* @__PURE__ */ jsx25(
2651
+ return /* @__PURE__ */ jsx24("div", { children: order.items?.map((item) => {
2652
+ return /* @__PURE__ */ jsx24(
2643
2653
  Item,
2644
2654
  {
2645
2655
  item,
@@ -2655,24 +2665,24 @@ var ReturnBreakdownWithDamages = ({
2655
2665
  orderReturn,
2656
2666
  itemId
2657
2667
  }) => {
2658
- const { t } = useTranslation24();
2668
+ const { t } = useTranslation23();
2659
2669
  const item = orderReturn.items?.find((ri) => ri.item_id === itemId);
2660
2670
  const damagedQuantity = item?.damaged_quantity || 0;
2661
2671
  if (!item || damagedQuantity <= 0) {
2662
2672
  return null;
2663
2673
  }
2664
- return /* @__PURE__ */ jsxs26(
2674
+ return /* @__PURE__ */ jsxs25(
2665
2675
  "div",
2666
2676
  {
2667
2677
  className: "txt-compact-small-plus text-ui-fg-subtle bg-ui-bg-subtle flex flex-row justify-between gap-y-2 border-t-2 border-dotted px-6 py-4",
2668
2678
  children: [
2669
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2", children: [
2670
- /* @__PURE__ */ jsx25(ArrowDownRightMini, { className: "text-ui-fg-muted" }),
2671
- /* @__PURE__ */ jsx25(Text22, { size: "small", children: t("orders.returns.damagedItemsReturned", {
2679
+ /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2", children: [
2680
+ /* @__PURE__ */ jsx24(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
2681
+ /* @__PURE__ */ jsx24(Text21, { size: "small", children: t("orders.returns.damagedItemsReturned", {
2672
2682
  quantity: damagedQuantity
2673
2683
  }) }),
2674
- item.note && /* @__PURE__ */ jsx25(Tooltip5, { content: item.note, children: /* @__PURE__ */ jsx25(DocumentText2, { className: "text-ui-tag-neutral-icon ml-1 inline" }) }),
2675
- item.reason && /* @__PURE__ */ jsx25(
2684
+ item.note && /* @__PURE__ */ jsx24(Tooltip5, { content: item.note, children: /* @__PURE__ */ jsx24(DocumentText2, { className: "text-ui-tag-neutral-icon ml-1 inline" }) }),
2685
+ item.reason && /* @__PURE__ */ jsx24(
2676
2686
  Badge4,
2677
2687
  {
2678
2688
  size: "2xsmall",
@@ -2682,9 +2692,9 @@ var ReturnBreakdownWithDamages = ({
2682
2692
  }
2683
2693
  )
2684
2694
  ] }),
2685
- /* @__PURE__ */ jsxs26(Text22, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
2695
+ /* @__PURE__ */ jsxs25(Text21, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
2686
2696
  t("orders.returns.damagedItemReceived"),
2687
- /* @__PURE__ */ jsx25("span", { className: "ml-2", children: /* @__PURE__ */ jsx25(return_info_popover_default, { orderReturn }) })
2697
+ /* @__PURE__ */ jsx24("span", { className: "ml-2", children: /* @__PURE__ */ jsx24(return_info_popover_default, { orderReturn }) })
2688
2698
  ] })
2689
2699
  ]
2690
2700
  },
@@ -2695,7 +2705,7 @@ var ReturnBreakdown = ({
2695
2705
  orderReturn,
2696
2706
  itemId
2697
2707
  }) => {
2698
- const { t } = useTranslation24();
2708
+ const { t } = useTranslation23();
2699
2709
  const { getRelativeDate } = useDate();
2700
2710
  if (!["requested", "received", "partially_received"].includes(
2701
2711
  orderReturn.status || ""
@@ -2708,29 +2718,29 @@ var ReturnBreakdown = ({
2708
2718
  return null;
2709
2719
  }
2710
2720
  const damagedQuantity = item.damaged_quantity || 0;
2711
- return /* @__PURE__ */ jsxs26(Fragment3, { children: [
2712
- damagedQuantity > 0 && /* @__PURE__ */ jsx25(
2721
+ return /* @__PURE__ */ jsxs25(Fragment3, { children: [
2722
+ damagedQuantity > 0 && /* @__PURE__ */ jsx24(
2713
2723
  ReturnBreakdownWithDamages,
2714
2724
  {
2715
2725
  orderReturn,
2716
2726
  itemId
2717
2727
  }
2718
2728
  ),
2719
- /* @__PURE__ */ jsxs26(
2729
+ /* @__PURE__ */ jsxs25(
2720
2730
  "div",
2721
2731
  {
2722
2732
  className: "txt-compact-small-plus text-ui-fg-subtle bg-ui-bg-subtle flex flex-row justify-between gap-y-2 border-t-2 border-dotted px-6 py-4",
2723
2733
  children: [
2724
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2", children: [
2725
- /* @__PURE__ */ jsx25(ArrowDownRightMini, { className: "text-ui-fg-muted" }),
2726
- /* @__PURE__ */ jsx25(Text22, { size: "small", children: t(
2734
+ /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2", children: [
2735
+ /* @__PURE__ */ jsx24(ArrowDownRightMini2, { className: "text-ui-fg-muted" }),
2736
+ /* @__PURE__ */ jsx24(Text21, { size: "small", children: t(
2727
2737
  `orders.returns.${isRequested ? "returnRequestedInfo" : "returnReceivedInfo"}`,
2728
2738
  {
2729
2739
  requestedItemsCount: isRequested ? item.quantity : item.received_quantity
2730
2740
  }
2731
2741
  ) }),
2732
- item.note && /* @__PURE__ */ jsx25(Tooltip5, { content: item.note, children: /* @__PURE__ */ jsx25(DocumentText2, { className: "text-ui-tag-neutral-icon ml-1 inline" }) }),
2733
- item.reason && /* @__PURE__ */ jsx25(
2742
+ item.note && /* @__PURE__ */ jsx24(Tooltip5, { content: item.note, children: /* @__PURE__ */ jsx24(DocumentText2, { className: "text-ui-tag-neutral-icon ml-1 inline" }) }),
2743
+ item.reason && /* @__PURE__ */ jsx24(
2734
2744
  Badge4,
2735
2745
  {
2736
2746
  size: "2xsmall",
@@ -2740,12 +2750,12 @@ var ReturnBreakdown = ({
2740
2750
  }
2741
2751
  )
2742
2752
  ] }),
2743
- isRequested ? /* @__PURE__ */ jsxs26(Text22, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
2753
+ isRequested ? /* @__PURE__ */ jsxs25(Text21, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
2744
2754
  getRelativeDate(orderReturn.created_at),
2745
- /* @__PURE__ */ jsx25("span", { className: "ml-2", children: /* @__PURE__ */ jsx25(return_info_popover_default, { orderReturn }) })
2746
- ] }) : /* @__PURE__ */ jsxs26(Text22, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
2755
+ /* @__PURE__ */ jsx24("span", { className: "ml-2", children: /* @__PURE__ */ jsx24(return_info_popover_default, { orderReturn }) })
2756
+ ] }) : /* @__PURE__ */ jsxs25(Text21, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: [
2747
2757
  t("orders.returns.itemReceived"),
2748
- /* @__PURE__ */ jsx25("span", { className: "ml-2", children: /* @__PURE__ */ jsx25(return_info_popover_default, { orderReturn }) })
2758
+ /* @__PURE__ */ jsx24("span", { className: "ml-2", children: /* @__PURE__ */ jsx24(return_info_popover_default, { orderReturn }) })
2749
2759
  ] })
2750
2760
  ]
2751
2761
  },
@@ -2758,22 +2768,36 @@ var Cost = ({
2758
2768
  value,
2759
2769
  secondaryValue,
2760
2770
  tooltip
2761
- }) => /* @__PURE__ */ jsxs26("div", { className: "grid grid-cols-3 items-center", children: [
2762
- /* @__PURE__ */ jsxs26(Text22, { size: "small", leading: "compact", children: [
2771
+ }) => /* @__PURE__ */ jsxs25("div", { className: "grid grid-cols-3 items-center", children: [
2772
+ /* @__PURE__ */ jsxs25(Text21, { size: "small", leading: "compact", children: [
2763
2773
  label,
2764
2774
  " ",
2765
2775
  tooltip
2766
2776
  ] }),
2767
- /* @__PURE__ */ jsx25("div", { className: "text-right", children: /* @__PURE__ */ jsx25(Text22, { size: "small", leading: "compact", children: secondaryValue }) }),
2768
- /* @__PURE__ */ jsx25("div", { className: "text-right", children: /* @__PURE__ */ jsx25(Text22, { size: "small", leading: "compact", children: value }) })
2777
+ /* @__PURE__ */ jsx24("div", { className: "text-right", children: /* @__PURE__ */ jsx24(Text21, { size: "small", leading: "compact", children: secondaryValue }) }),
2778
+ /* @__PURE__ */ jsx24("div", { className: "text-right", children: /* @__PURE__ */ jsx24(Text21, { size: "small", leading: "compact", children: value }) })
2769
2779
  ] });
2770
2780
  var CostBreakdown = ({
2771
2781
  order
2772
2782
  }) => {
2773
- const { t } = useTranslation24();
2783
+ const { t } = useTranslation23();
2774
2784
  const [isTaxOpen, setIsTaxOpen] = useState5(false);
2775
2785
  const [isShippingOpen, setIsShippingOpen] = useState5(false);
2776
- const discountCodes = useMemo5(() => {
2786
+ const [isCommissionOpen, setIsCommissionOpen] = useState5(false);
2787
+ const { commission_lines } = useOrderCommissionLines(order.id);
2788
+ const hasCommission = commission_lines.length > 0;
2789
+ const commissionTotal = commission_lines.reduce(
2790
+ (acc, line) => acc + (line.amount ?? 0),
2791
+ 0
2792
+ );
2793
+ const commissionItemTitleById = useMemo4(() => {
2794
+ const map = /* @__PURE__ */ new Map();
2795
+ order.items?.forEach((item) => {
2796
+ map.set(item.id, item.product_title ?? item.title);
2797
+ });
2798
+ return map;
2799
+ }, [order.items]);
2800
+ const discountCodes = useMemo4(() => {
2777
2801
  const codes = /* @__PURE__ */ new Set();
2778
2802
  order.items.forEach(
2779
2803
  (item) => item.adjustments?.forEach((adj) => {
@@ -2782,7 +2806,7 @@ var CostBreakdown = ({
2782
2806
  );
2783
2807
  return Array.from(codes).sort();
2784
2808
  }, [order]);
2785
- const taxCodes = useMemo5(() => {
2809
+ const taxCodes = useMemo4(() => {
2786
2810
  const taxCodeMap = {};
2787
2811
  order.items.forEach((item) => {
2788
2812
  item.tax_lines?.forEach((line) => {
@@ -2799,8 +2823,8 @@ var CostBreakdown = ({
2799
2823
  const automaticTaxesOn = !!order.region?.automatic_taxes;
2800
2824
  const hasTaxLines = !!Object.keys(taxCodes).length;
2801
2825
  const discountTotal = automaticTaxesOn ? order.discount_total : order.discount_subtotal;
2802
- return /* @__PURE__ */ jsxs26("div", { className: "text-ui-fg-subtle flex flex-col gap-y-2 px-6 py-4", children: [
2803
- /* @__PURE__ */ jsx25(
2826
+ return /* @__PURE__ */ jsxs25("div", { className: "text-ui-fg-subtle flex flex-col gap-y-2 px-6 py-4", children: [
2827
+ /* @__PURE__ */ jsx24(
2804
2828
  Cost,
2805
2829
  {
2806
2830
  label: t(
@@ -2809,21 +2833,21 @@ var CostBreakdown = ({
2809
2833
  value: getLocaleAmount(order.item_total, order.currency_code)
2810
2834
  }
2811
2835
  ),
2812
- /* @__PURE__ */ jsx25(
2836
+ /* @__PURE__ */ jsx24(
2813
2837
  Cost,
2814
2838
  {
2815
2839
  label: (
2816
2840
  // oxlint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
2817
- /* @__PURE__ */ jsxs26(
2841
+ /* @__PURE__ */ jsxs25(
2818
2842
  "span",
2819
2843
  {
2820
2844
  onClick: () => setIsShippingOpen((o) => !o),
2821
2845
  className: "flex cursor-pointer items-center gap-1",
2822
2846
  children: [
2823
- /* @__PURE__ */ jsx25("span", { children: t(
2847
+ /* @__PURE__ */ jsx24("span", { children: t(
2824
2848
  automaticTaxesOn ? "orders.summary.shippingTotal" : "orders.summary.shippingSubtotal"
2825
2849
  ) }),
2826
- /* @__PURE__ */ jsx25(
2850
+ /* @__PURE__ */ jsx24(
2827
2851
  TriangleDownMini,
2828
2852
  {
2829
2853
  style: {
@@ -2841,22 +2865,22 @@ var CostBreakdown = ({
2841
2865
  )
2842
2866
  }
2843
2867
  ),
2844
- isShippingOpen && /* @__PURE__ */ jsx25("div", { className: "flex flex-col gap-1 pl-5", children: (order.shipping_methods || []).sort(
2868
+ isShippingOpen && /* @__PURE__ */ jsx24("div", { className: "flex flex-col gap-1 pl-5", children: (order.shipping_methods || []).sort(
2845
2869
  (m1, m2) => m1.created_at.localeCompare(m2.created_at)
2846
2870
  ).map((sm, i) => {
2847
- return /* @__PURE__ */ jsxs26(
2871
+ return /* @__PURE__ */ jsxs25(
2848
2872
  "div",
2849
2873
  {
2850
2874
  className: "flex items-center justify-between gap-x-2",
2851
2875
  children: [
2852
- /* @__PURE__ */ jsx25("div", { children: /* @__PURE__ */ jsxs26("span", { className: "txt-small text-ui-fg-subtle font-medium", children: [
2876
+ /* @__PURE__ */ jsx24("div", { children: /* @__PURE__ */ jsxs25("span", { className: "txt-small text-ui-fg-subtle font-medium", children: [
2853
2877
  sm.name,
2854
2878
  sm.detail?.return_id && ` (${t("fields.returnShipping")})`,
2855
2879
  " ",
2856
- /* @__PURE__ */ jsx25(shipping_info_popover_default, { shippingMethod: sm }, i)
2880
+ /* @__PURE__ */ jsx24(shipping_info_popover_default, { shippingMethod: sm }, i)
2857
2881
  ] }) }),
2858
- /* @__PURE__ */ jsx25("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx25("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
2859
- /* @__PURE__ */ jsx25("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(
2882
+ /* @__PURE__ */ jsx24("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx24("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
2883
+ /* @__PURE__ */ jsx24("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(
2860
2884
  automaticTaxesOn ? sm.total : sm.subtotal,
2861
2885
  order.currency_code
2862
2886
  ) })
@@ -2865,7 +2889,7 @@ var CostBreakdown = ({
2865
2889
  sm.id
2866
2890
  );
2867
2891
  }) }),
2868
- /* @__PURE__ */ jsx25(
2892
+ /* @__PURE__ */ jsx24(
2869
2893
  Cost,
2870
2894
  {
2871
2895
  label: t(
@@ -2875,9 +2899,9 @@ var CostBreakdown = ({
2875
2899
  value: discountTotal > 0 ? `- ${getLocaleAmount(discountTotal, order.currency_code)}` : "-"
2876
2900
  }
2877
2901
  ),
2878
- /* @__PURE__ */ jsxs26(Fragment3, { children: [
2879
- /* @__PURE__ */ jsxs26("div", { className: "flex justify-between", children: [
2880
- /* @__PURE__ */ jsxs26(
2902
+ /* @__PURE__ */ jsxs25(Fragment3, { children: [
2903
+ /* @__PURE__ */ jsxs25("div", { className: "flex justify-between", children: [
2904
+ /* @__PURE__ */ jsxs25(
2881
2905
  "div",
2882
2906
  {
2883
2907
  onClick: () => hasTaxLines && setIsTaxOpen((o) => !o),
@@ -2885,10 +2909,10 @@ var CostBreakdown = ({
2885
2909
  "cursor-pointer": hasTaxLines
2886
2910
  }),
2887
2911
  children: [
2888
- /* @__PURE__ */ jsx25("span", { className: "txt-small select-none", children: t(
2912
+ /* @__PURE__ */ jsx24("span", { className: "txt-small select-none", children: t(
2889
2913
  automaticTaxesOn ? "orders.summary.taxTotalIncl" : "orders.summary.taxTotal"
2890
2914
  ) }),
2891
- hasTaxLines && /* @__PURE__ */ jsx25(
2915
+ hasTaxLines && /* @__PURE__ */ jsx24(
2892
2916
  TriangleDownMini,
2893
2917
  {
2894
2918
  style: {
@@ -2899,33 +2923,71 @@ var CostBreakdown = ({
2899
2923
  ]
2900
2924
  }
2901
2925
  ),
2902
- /* @__PURE__ */ jsx25("div", { className: "text-right", children: /* @__PURE__ */ jsx25(Text22, { size: "small", leading: "compact", children: getLocaleAmount(order.tax_total, order.currency_code) }) })
2926
+ /* @__PURE__ */ jsx24("div", { className: "text-right", children: /* @__PURE__ */ jsx24(Text21, { size: "small", leading: "compact", children: getLocaleAmount(order.tax_total, order.currency_code) }) })
2903
2927
  ] }),
2904
- isTaxOpen && /* @__PURE__ */ jsx25("div", { className: "flex flex-col gap-1 pl-5", children: Object.entries(taxCodes).map(([code, total]) => {
2905
- return /* @__PURE__ */ jsxs26(
2928
+ isTaxOpen && /* @__PURE__ */ jsx24("div", { className: "flex flex-col gap-1 pl-5", children: Object.entries(taxCodes).map(([code, total]) => {
2929
+ return /* @__PURE__ */ jsxs25(
2906
2930
  "div",
2907
2931
  {
2908
2932
  className: "flex items-center justify-between gap-x-2",
2909
2933
  children: [
2910
- /* @__PURE__ */ jsx25("div", { children: /* @__PURE__ */ jsx25("span", { className: "txt-small text-ui-fg-subtle font-medium", children: code }) }),
2911
- /* @__PURE__ */ jsx25("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx25("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
2912
- /* @__PURE__ */ jsx25("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(total, order.currency_code) })
2934
+ /* @__PURE__ */ jsx24("div", { children: /* @__PURE__ */ jsx24("span", { className: "txt-small text-ui-fg-subtle font-medium", children: code }) }),
2935
+ /* @__PURE__ */ jsx24("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx24("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
2936
+ /* @__PURE__ */ jsx24("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(total, order.currency_code) })
2913
2937
  ]
2914
2938
  },
2915
2939
  code
2916
2940
  );
2917
2941
  }) })
2942
+ ] }),
2943
+ hasCommission && /* @__PURE__ */ jsxs25(Fragment3, { children: [
2944
+ /* @__PURE__ */ jsxs25("div", { className: "flex justify-between", children: [
2945
+ /* @__PURE__ */ jsxs25(
2946
+ "div",
2947
+ {
2948
+ onClick: () => setIsCommissionOpen((o) => !o),
2949
+ className: "flex cursor-pointer items-center gap-1",
2950
+ children: [
2951
+ /* @__PURE__ */ jsx24("span", { className: "txt-small select-none", children: t("fields.commission") }),
2952
+ /* @__PURE__ */ jsx24(
2953
+ TriangleDownMini,
2954
+ {
2955
+ style: {
2956
+ transform: `rotate(${isCommissionOpen ? 0 : -90}deg)`
2957
+ }
2958
+ }
2959
+ )
2960
+ ]
2961
+ }
2962
+ ),
2963
+ /* @__PURE__ */ jsx24("div", { className: "text-right", children: /* @__PURE__ */ jsx24(Text21, { size: "small", leading: "compact", children: getLocaleAmount(commissionTotal, order.currency_code) }) })
2964
+ ] }),
2965
+ isCommissionOpen && /* @__PURE__ */ jsx24("div", { className: "flex flex-col gap-1 pl-5", children: commission_lines.map((line) => {
2966
+ const label = line.shipping_method_id ? t("fields.shipping") : commissionItemTitleById.get(line.item_id ?? "") ?? line.code;
2967
+ return /* @__PURE__ */ jsxs25(
2968
+ "div",
2969
+ {
2970
+ className: "flex items-center justify-between gap-x-2",
2971
+ children: [
2972
+ /* @__PURE__ */ jsx24("div", { children: /* @__PURE__ */ jsx24("span", { className: "txt-small text-ui-fg-subtle font-medium", children: label }) }),
2973
+ /* @__PURE__ */ jsx24("div", { className: "relative flex-1", children: /* @__PURE__ */ jsx24("div", { className: "bottom-[calc(50% - 2px)] absolute h-[1px] w-full border-b border-dashed" }) }),
2974
+ /* @__PURE__ */ jsx24("span", { className: "txt-small text-ui-fg-muted", children: getLocaleAmount(line.amount, order.currency_code) })
2975
+ ]
2976
+ },
2977
+ line.id
2978
+ );
2979
+ }) })
2918
2980
  ] })
2919
2981
  ] });
2920
2982
  };
2921
2983
  var Total2 = ({ order }) => {
2922
- const { t } = useTranslation24();
2984
+ const { t } = useTranslation23();
2923
2985
  const totalCaptured = getTotalCaptured(order.payment_collections || []);
2924
2986
  const outstanding = Math.max(0, order.total - totalCaptured);
2925
- return /* @__PURE__ */ jsxs26("div", { className: " flex flex-col gap-y-2 px-6 py-4", children: [
2926
- /* @__PURE__ */ jsxs26("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
2927
- /* @__PURE__ */ jsx25(
2928
- Text22,
2987
+ return /* @__PURE__ */ jsxs25("div", { className: " flex flex-col gap-y-2 px-6 py-4", children: [
2988
+ /* @__PURE__ */ jsxs25("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
2989
+ /* @__PURE__ */ jsx24(
2990
+ Text21,
2929
2991
  {
2930
2992
  weight: "plus",
2931
2993
  className: "text-ui-fg-subtle",
@@ -2934,8 +2996,8 @@ var Total2 = ({ order }) => {
2934
2996
  children: t("fields.total")
2935
2997
  }
2936
2998
  ),
2937
- /* @__PURE__ */ jsx25(
2938
- Text22,
2999
+ /* @__PURE__ */ jsx24(
3000
+ Text21,
2939
3001
  {
2940
3002
  weight: "plus",
2941
3003
  className: "text-ui-fg-subtle",
@@ -2945,9 +3007,9 @@ var Total2 = ({ order }) => {
2945
3007
  }
2946
3008
  )
2947
3009
  ] }),
2948
- /* @__PURE__ */ jsxs26("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
2949
- /* @__PURE__ */ jsx25(
2950
- Text22,
3010
+ /* @__PURE__ */ jsxs25("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
3011
+ /* @__PURE__ */ jsx24(
3012
+ Text21,
2951
3013
  {
2952
3014
  weight: "plus",
2953
3015
  className: "text-ui-fg-subtle",
@@ -2956,8 +3018,8 @@ var Total2 = ({ order }) => {
2956
3018
  children: t("fields.paidTotal")
2957
3019
  }
2958
3020
  ),
2959
- /* @__PURE__ */ jsx25(
2960
- Text22,
3021
+ /* @__PURE__ */ jsx24(
3022
+ Text21,
2961
3023
  {
2962
3024
  weight: "plus",
2963
3025
  className: "text-ui-fg-subtle",
@@ -2967,49 +3029,22 @@ var Total2 = ({ order }) => {
2967
3029
  }
2968
3030
  )
2969
3031
  ] }),
2970
- /* @__PURE__ */ jsxs26("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
2971
- /* @__PURE__ */ jsx25(Text22, { weight: "plus", size: "small", leading: "compact", children: t("orders.payment.outstandingAmount") }),
2972
- /* @__PURE__ */ jsx25(Text22, { weight: "plus", size: "small", leading: "compact", children: getStylizedAmount(outstanding, order.currency_code) })
3032
+ /* @__PURE__ */ jsxs25("div", { className: "text-ui-fg-base flex items-center justify-between", children: [
3033
+ /* @__PURE__ */ jsx24(Text21, { weight: "plus", size: "small", leading: "compact", children: t("orders.payment.outstandingAmount") }),
3034
+ /* @__PURE__ */ jsx24(Text21, { weight: "plus", size: "small", leading: "compact", children: getStylizedAmount(outstanding, order.currency_code) })
2973
3035
  ] })
2974
3036
  ] });
2975
3037
  };
2976
- var OutstandingActions = ({ order }) => {
2977
- const { t } = useTranslation24();
2978
- const unpaidCollection = order.payment_collections?.find(
2979
- (pc) => pc.status !== "captured" && pc.status !== "canceled"
2980
- );
2981
- const pendingDifference = order.summary?.pending_difference || 0;
2982
- const isOutstanding = pendingDifference > 5e-3 && order.status !== "canceled" && !!unpaidCollection;
2983
- if (!isOutstanding || !unpaidCollection) {
2984
- return null;
2985
- }
2986
- const paymentLink = unpaidCollection.payment_sessions?.[0]?.data?.url ?? null;
2987
- if (!paymentLink) {
2988
- return null;
2989
- }
2990
- const handleCopyLink = async () => {
2991
- try {
2992
- await navigator.clipboard.writeText(paymentLink);
2993
- toast7.success(t("orders.payment.copyLinkSuccess"));
2994
- } catch {
2995
- toast7.error(t("orders.payment.copyLinkError"));
2996
- }
2997
- };
2998
- return /* @__PURE__ */ jsx25("div", { className: "bg-ui-bg-subtle flex items-center justify-end gap-x-2 rounded-b-xl px-4 py-4", children: /* @__PURE__ */ jsx25(Button7, { size: "small", variant: "secondary", onClick: handleCopyLink, children: t("orders.payment.copyPaymentLink", {
2999
- amount: getStylizedAmount(pendingDifference, order.currency_code)
3000
- }) }) });
3001
- };
3002
3038
 
3003
3039
  // src/pages/orders/[id]/order-detail-page.tsx
3004
- import { Fragment as Fragment4, jsx as jsx26, jsxs as jsxs27 } from "react/jsx-runtime";
3040
+ import { Fragment as Fragment4, jsx as jsx25, jsxs as jsxs26 } from "react/jsx-runtime";
3005
3041
  var Root = ({ children }) => {
3006
3042
  const initialData = useLoaderData();
3007
3043
  const { id } = useParams();
3044
+ const query = useLinkQuery("order", DEFAULT_FIELDS);
3008
3045
  const { order, isLoading, isError, error } = useOrder(
3009
3046
  id,
3010
- {
3011
- fields: DEFAULT_FIELDS
3012
- },
3047
+ query,
3013
3048
  {
3014
3049
  initialData
3015
3050
  }
@@ -3029,29 +3064,28 @@ var Root = ({ children }) => {
3029
3064
  });
3030
3065
  }
3031
3066
  if (isLoading || !order || isPreviewLoading) {
3032
- return /* @__PURE__ */ jsx26(TwoColumnPageSkeleton, { mainSections: 4, sidebarSections: 2, showJSON: true });
3067
+ return /* @__PURE__ */ jsx25(TwoColumnPageSkeleton, { mainSections: 4, sidebarSections: 2, showJSON: true });
3033
3068
  }
3034
3069
  if (isError) {
3035
3070
  throw error;
3036
3071
  }
3037
- return /* @__PURE__ */ jsx26(Fragment4, { children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs27(TwoColumnPage, { data: order, hasOutlet: true, showMetadata: true, showJSON: true, children: [
3038
- /* @__PURE__ */ jsxs27(TwoColumnPage.Main, { children: [
3039
- /* @__PURE__ */ jsx26(OrderActiveEditSection, { order }),
3040
- orderPreview && /* @__PURE__ */ jsxs27(Fragment4, { children: [
3041
- /* @__PURE__ */ jsx26(ActiveOrderClaimSection, { orderPreview }),
3042
- /* @__PURE__ */ jsx26(ActiveOrderExchangeSection, { orderPreview }),
3043
- /* @__PURE__ */ jsx26(ActiveOrderReturnSection, { orderPreview })
3072
+ return /* @__PURE__ */ jsx25(Fragment4, { children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs26(TwoColumnPage, { data: order, hasOutlet: true, showMetadata: true, showJSON: true, children: [
3073
+ /* @__PURE__ */ jsx25(TwoColumnPage.Main, { children: /* @__PURE__ */ jsxs26(WidgetZone2, { id: "orders.detail.main", data: order, children: [
3074
+ /* @__PURE__ */ jsx25(OrderActiveEditSection, { order }),
3075
+ orderPreview && /* @__PURE__ */ jsxs26(Fragment4, { children: [
3076
+ /* @__PURE__ */ jsx25(ActiveOrderClaimSection, { orderPreview }),
3077
+ /* @__PURE__ */ jsx25(ActiveOrderExchangeSection, { orderPreview }),
3078
+ /* @__PURE__ */ jsx25(ActiveOrderReturnSection, { orderPreview })
3044
3079
  ] }),
3045
- /* @__PURE__ */ jsx26(OrderGeneralSection, { order }),
3046
- /* @__PURE__ */ jsx26(OrderSummarySection, { order }),
3047
- /* @__PURE__ */ jsx26(OrderCommissionSection, { order }),
3048
- /* @__PURE__ */ jsx26(OrderPaymentSection, { order }),
3049
- /* @__PURE__ */ jsx26(OrderFulfillmentSection, { order })
3050
- ] }),
3051
- /* @__PURE__ */ jsxs27(TwoColumnPage.Sidebar, { children: [
3052
- /* @__PURE__ */ jsx26(OrderCustomerSection, { order }),
3053
- /* @__PURE__ */ jsx26(OrderActivitySection, { order })
3054
- ] })
3080
+ /* @__PURE__ */ jsx25(OrderGeneralSection, { order }),
3081
+ /* @__PURE__ */ jsx25(OrderSummarySection, { order }),
3082
+ /* @__PURE__ */ jsx25(OrderPaymentSection, { order }),
3083
+ /* @__PURE__ */ jsx25(OrderFulfillmentSection, { order })
3084
+ ] }) }),
3085
+ /* @__PURE__ */ jsx25(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsxs26(WidgetZone2, { id: "orders.detail.side", data: order, children: [
3086
+ /* @__PURE__ */ jsx25(OrderCustomerSection, { order }),
3087
+ /* @__PURE__ */ jsx25(OrderActivitySection, { order })
3088
+ ] }) })
3055
3089
  ] }) });
3056
3090
  };
3057
3091
  var OrderDetailPage = Object.assign(Root, {