@mercurjs/vendor 2.2.0-canary.8 → 2.2.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (305) hide show
  1. package/dist/{[id]-GMJAPZPU.js → [id]-3LNKC5OJ.js} +41 -40
  2. package/dist/[id]-4HO4S2PX.js +3074 -0
  3. package/dist/{[id]-QWL6SUOB.js → [id]-4LIIFGET.js} +14 -14
  4. package/dist/{[id]-5ADOHZ45.js → [id]-5EECCIRP.js} +151 -58
  5. package/dist/{[id]-K2CT7BXQ.js → [id]-5P5LTATX.js} +3 -3
  6. package/dist/{[id]-T7USGHIY.js → [id]-AQUUZFRX.js} +11 -11
  7. package/dist/{[id]-BTGQJ3UD.js → [id]-CUBGVODE.js} +177 -85
  8. package/dist/{[id]-ZAQYATGN.js → [id]-DCGPICT3.js} +39 -38
  9. package/dist/{[id]-IWCWVNVI.js → [id]-DT5YJVKG.js} +32 -32
  10. package/dist/{[id]-L6FD7BRE.js → [id]-IEBZ6V3W.js} +51 -48
  11. package/dist/{[id]-ZCMSBEVM.js → [id]-N7JEZFXQ.js} +6 -6
  12. package/dist/[id]-U6FKX5UQ.js +975 -0
  13. package/dist/{[id]-BPAZLOLW.js → [id]-XB45DY2D.js} +19 -19
  14. package/dist/[id]-XP5KEMNX.js +602 -0
  15. package/dist/{[location_id]-NUBXDDJC.js → [location_id]-I4HHUHWY.js} +14 -14
  16. package/dist/{[province_id]-5KZGMQER.js → [province_id]-OYX4MOCF.js} +31 -31
  17. package/dist/{add-KMHJ6OC6.js → add-3T4GBFMM.js} +63 -57
  18. package/dist/{add-Y6GMGLYX.js → add-RPRJWCYU.js} +99 -34
  19. package/dist/{add-customer-groups-NXSWICFI.js → add-customer-groups-FB5T6PQN.js} +44 -42
  20. package/dist/{add-products-LXYF57BK.js → add-products-F243SWGD.js} +40 -40
  21. package/dist/{add-promotions-VTYAEDCN.js → add-promotions-TJDK7HLW.js} +18 -18
  22. package/dist/{add-to-campaign-DLP7PSQB.js → add-to-campaign-Q6OAJMUJ.js} +6 -6
  23. package/dist/{address-JFXH3M7D.js → address-XVBSNMFU.js} +24 -24
  24. package/dist/{adjust-inventory-V2V7NWWH.js → adjust-inventory-IZLRMQXV.js} +4 -4
  25. package/dist/allocate-items-Q3VALDYT.js +685 -0
  26. package/dist/{areas-FB63OQAI.js → areas-IYGBRCRH.js} +14 -14
  27. package/dist/attributes-LGEM2JJW.js +353 -0
  28. package/dist/breadcrumb-BC6XN2SE.js +13 -0
  29. package/dist/{breadcrumb-THJ2HPRB.js → breadcrumb-BFNJWOJ4.js} +10 -9
  30. package/dist/{breadcrumb-S4V7MJUM.js → breadcrumb-BXD3SRM7.js} +3 -3
  31. package/dist/{breadcrumb-HV67K43U.js → breadcrumb-FEYGZFJU.js} +4 -4
  32. package/dist/{breadcrumb-EG3ANCVO.js → breadcrumb-H45Z2WNG.js} +3 -3
  33. package/dist/breadcrumb-ILEAQRW7.js +33 -0
  34. package/dist/breadcrumb-K4HBKZUE.js +28 -0
  35. package/dist/{breadcrumb-YBBYFQYG.js → breadcrumb-KZPOPXGG.js} +2 -2
  36. package/dist/{breadcrumb-F3BN5753.js → breadcrumb-L262VPBO.js} +2 -2
  37. package/dist/{breadcrumb-3Z7KZG62.js → breadcrumb-LEFHXFLT.js} +3 -3
  38. package/dist/{breadcrumb-D3UDTWGE.js → breadcrumb-MOA2DBOE.js} +2 -2
  39. package/dist/breadcrumb-NZYOCEEM.js +47 -0
  40. package/dist/breadcrumb-VY5DNTTJ.js +46 -0
  41. package/dist/{breadcrumb-UAUX7XCV.js → breadcrumb-WG6TIF4C.js} +2 -2
  42. package/dist/{breadcrumb-7R6E6G2X.js → breadcrumb-XEZCMI55.js} +2 -2
  43. package/dist/{breadcrumb-FES7EKUR.js → breadcrumb-XGXKCDYS.js} +4 -4
  44. package/dist/{breadcrumb-Y5UW3I4C.js → breadcrumb-YOY6Z36F.js} +2 -2
  45. package/dist/{campaigns-JAQTSA4Z.js → campaigns-DZKRNCA4.js} +9 -9
  46. package/dist/{categories-6TVMTN62.js → categories-JZJA2IBQ.js} +13 -11
  47. package/dist/{chunk-SFQKKIHA.js → chunk-27WLUOI2.js} +1 -1
  48. package/dist/{chunk-U5XDKYZG.js → chunk-2KA4TGBQ.js} +3 -3
  49. package/dist/{chunk-6RH3VDF7.js → chunk-2NPD4S55.js} +4 -4
  50. package/dist/{chunk-M6GKMFTC.js → chunk-3ALBZK4M.js} +1 -1
  51. package/dist/{chunk-PXYDR7WQ.js → chunk-3BXCPHN6.js} +3 -2
  52. package/dist/{chunk-X4INVIWL.js → chunk-3C2T27YW.js} +3 -3
  53. package/dist/{chunk-QXLRABYH.js → chunk-3I6ZAMGN.js} +1 -1
  54. package/dist/{chunk-THMXGEZU.js → chunk-3SH24DGG.js} +2 -2
  55. package/dist/chunk-3TST3EWQ.js +438 -0
  56. package/dist/chunk-42R54Z2X.js +8 -0
  57. package/dist/{chunk-UDJ2I5A2.js → chunk-4IRQSBA7.js} +5 -6
  58. package/dist/chunk-5ALC4Z2H.js +23 -0
  59. package/dist/chunk-5BQO3YQP.js +62 -0
  60. package/dist/{chunk-QGGMG3OU.js → chunk-5BYYDBLS.js} +7 -7
  61. package/dist/{chunk-4LVP635F.js → chunk-5FBQOAXU.js} +135 -126
  62. package/dist/{chunk-2BCAQ4BB.js → chunk-5PAUN3PM.js} +3 -3
  63. package/dist/{chunk-E2HQPY32.js → chunk-5RMLLTR7.js} +5 -5
  64. package/dist/{chunk-3EF54XFY.js → chunk-634XVU3D.js} +1 -1
  65. package/dist/{chunk-LJO34DKJ.js → chunk-6FDPVW7Y.js} +35 -21
  66. package/dist/{chunk-3X3LUKDM.js → chunk-6Q3J6ZMM.js} +5 -5
  67. package/dist/chunk-7BFQKYCJ.js +127 -0
  68. package/dist/chunk-7EXKHL5L.js +30 -0
  69. package/dist/{chunk-M6N4ISXL.js → chunk-7MARNXFG.js} +1 -1
  70. package/dist/{chunk-WHSE47DM.js → chunk-AOLE7MBM.js} +1 -1
  71. package/dist/{chunk-YIZK67RW.js → chunk-BQHVM46E.js} +29 -49
  72. package/dist/chunk-CRYZK4NU.js +185 -0
  73. package/dist/{chunk-JYPPXAJG.js → chunk-CUAGC54B.js} +33 -35
  74. package/dist/{chunk-KIFSQOM2.js → chunk-D76WZZSB.js} +5 -5
  75. package/dist/{chunk-QLBIBLOY.js → chunk-DQ7LZZJX.js} +5 -5
  76. package/dist/{chunk-UCYSCKZV.js → chunk-DSTHXHJ5.js} +2114 -1699
  77. package/dist/{chunk-L7QKFC5N.js → chunk-E6W57UP3.js} +32 -122
  78. package/dist/{chunk-UFFVRF4V.js → chunk-EAAZV3B7.js} +6 -11
  79. package/dist/chunk-EDV4MTTT.js +434 -0
  80. package/dist/chunk-EEBJYXWA.js +15 -0
  81. package/dist/{chunk-UORPTGV2.js → chunk-EPRYM3FA.js} +11 -15
  82. package/dist/{chunk-YQYRAD5C.js → chunk-FCZJAYMM.js} +1 -1
  83. package/dist/{chunk-JMRWREVE.js → chunk-FDKFUIYV.js} +23 -36
  84. package/dist/chunk-FWPGOIFA.js +22 -0
  85. package/dist/{chunk-B234IELY.js → chunk-G6YNCIVF.js} +24 -41
  86. package/dist/{chunk-PVZBDWLK.js → chunk-GRH7C3QN.js} +1 -1
  87. package/dist/chunk-GSH6ZGI6.js +353 -0
  88. package/dist/{chunk-IQWK723D.js → chunk-GZ4KTAWS.js} +1 -1
  89. package/dist/{chunk-MJCL3WID.js → chunk-H6LZ77GX.js} +1 -1
  90. package/dist/{chunk-WLT7K7K7.js → chunk-HDEOZN2Q.js} +21 -24
  91. package/dist/{chunk-FDR22JMM.js → chunk-HFRHHT36.js} +8 -63
  92. package/dist/{chunk-GNDFMMC6.js → chunk-IEVN722X.js} +1 -1
  93. package/dist/{chunk-DARJTN4I.js → chunk-IMJ62GAP.js} +10 -5
  94. package/dist/{chunk-SGR4DMCW.js → chunk-INYLPVCG.js} +3 -3
  95. package/dist/{chunk-5T6UWTRU.js → chunk-IV57G2CB.js} +19 -11
  96. package/dist/chunk-J6XCRFBW.js +30 -0
  97. package/dist/{chunk-BLRZB63H.js → chunk-JDNXS37G.js} +61 -62
  98. package/dist/{chunk-3B34B2M2.js → chunk-JJP6AKMV.js} +1 -1
  99. package/dist/{chunk-XEU5ZLSB.js → chunk-JK4M3ZKY.js} +5 -5
  100. package/dist/{chunk-VXMOPVRH.js → chunk-JR7AABT5.js} +2 -2
  101. package/dist/{chunk-PBD36EZJ.js → chunk-JTHDMXZV.js} +5 -5
  102. package/dist/{chunk-Q75AC3DZ.js → chunk-JY2XON7H.js} +2 -2
  103. package/dist/{chunk-6OUPJNYO.js → chunk-KCHYLLVG.js} +2 -2
  104. package/dist/{chunk-YGRTRAWX.js → chunk-KDE4HKH2.js} +1 -0
  105. package/dist/{chunk-VPKMBJ5B.js → chunk-KG2NUK4J.js} +6 -6
  106. package/dist/{chunk-VXWN37PT.js → chunk-KIURBTC4.js} +1 -1
  107. package/dist/{chunk-7LVNAFEI.js → chunk-KTJLJTFO.js} +547 -882
  108. package/dist/{chunk-FCJ7MLQK.js → chunk-KZQFIPY2.js} +264 -76
  109. package/dist/chunk-L57USMYC.js +39 -0
  110. package/dist/{chunk-4KNL46BT.js → chunk-LWFBBTJ3.js} +5 -5
  111. package/dist/{chunk-RIN4CBRB.js → chunk-LXZXXOJ3.js} +1 -17
  112. package/dist/chunk-LYYM7H7H.js +59 -0
  113. package/dist/{chunk-MWQQVKRU.js → chunk-MAVQ636Y.js} +1 -1
  114. package/dist/{chunk-VDHW6H5F.js → chunk-MAW6ZT3D.js} +4 -4
  115. package/dist/{chunk-7CMRFP5Q.js → chunk-MJP5V3JN.js} +3 -3
  116. package/dist/{chunk-S7EKBD2C.js → chunk-MNHP6YRC.js} +3 -3
  117. package/dist/{chunk-QZJIDKQR.js → chunk-MT6WOKIW.js} +4 -4
  118. package/dist/chunk-MUGQQY6P.js +315 -0
  119. package/dist/{chunk-QT7YFHCA.js → chunk-MVEHWM7K.js} +13 -1
  120. package/dist/{chunk-VV6IKGCN.js → chunk-NTJ3BMOE.js} +1 -1
  121. package/dist/{chunk-JXQJQYGD.js → chunk-O7BGGWW6.js} +2 -2
  122. package/dist/{chunk-LWJF63JW.js → chunk-OYUJYPDF.js} +90 -15
  123. package/dist/{chunk-4S6XGIC6.js → chunk-PUAWN7SS.js} +1 -1
  124. package/dist/{chunk-U6PBLMXD.js → chunk-Q6SPIHFR.js} +8 -3
  125. package/dist/{chunk-F4OJN2F2.js → chunk-QIF4QE7T.js} +1 -1
  126. package/dist/{chunk-X22KTLZ7.js → chunk-QWJTJSIT.js} +1 -1
  127. package/dist/{chunk-2USXZSTK.js → chunk-QWW6RHZC.js} +5 -5
  128. package/dist/{chunk-TODJFRLH.js → chunk-RILHLBKW.js} +3 -3
  129. package/dist/{chunk-PP754CO7.js → chunk-RPU4UOQK.js} +1 -1
  130. package/dist/{chunk-AVOZ7TX2.js → chunk-RTMMO6IU.js} +6 -6
  131. package/dist/chunk-S7NGDLZ3.js +173 -0
  132. package/dist/{chunk-U2ZFCAPX.js → chunk-SITRHMZZ.js} +11 -8
  133. package/dist/chunk-SPFLYPY6.js +6 -0
  134. package/dist/{chunk-EIUYXS7E.js → chunk-TJKZ5QCJ.js} +4 -4
  135. package/dist/{chunk-WCSQDWMS.js → chunk-TPGIMZLI.js} +1 -1
  136. package/dist/chunk-UM7ZR3VU.js +14 -0
  137. package/dist/{chunk-PGW3VYK4.js → chunk-UNE4VD5U.js} +3 -3
  138. package/dist/chunk-UX5UYDCY.js +33 -0
  139. package/dist/{chunk-IXAQNTE7.js → chunk-V5K6HISS.js} +2 -2
  140. package/dist/chunk-VCUUITW6.js +35 -0
  141. package/dist/{chunk-T5MJWWDX.js → chunk-VD27SL7H.js} +5 -5
  142. package/dist/{chunk-LRARA622.js → chunk-VE6GRIIN.js} +2 -2
  143. package/dist/{chunk-SSUUT5LK.js → chunk-W3UHAQCV.js} +5 -4
  144. package/dist/{chunk-U5G3AVED.js → chunk-WBCWER26.js} +1 -1
  145. package/dist/{chunk-PXI47JL5.js → chunk-WCXFUBEF.js} +13 -13
  146. package/dist/{chunk-AVOIZO63.js → chunk-WFE6CT6M.js} +77 -21
  147. package/dist/{chunk-E2L5EX5A.js → chunk-WFHGJGCW.js} +7 -6
  148. package/dist/{chunk-LQD232FW.js → chunk-WJ5EU3KW.js} +1 -1
  149. package/dist/{chunk-6YA3C4NB.js → chunk-XBKWFLJG.js} +4 -13
  150. package/dist/chunk-XQUF3WIS.js +159 -0
  151. package/dist/{chunk-SS46VQJA.js → chunk-Y4PM3IDZ.js} +1 -1
  152. package/dist/chunk-YBF45CX5.js +23 -0
  153. package/dist/{chunk-JQV7CXEC.js → chunk-YNGA3GRX.js} +17 -2
  154. package/dist/chunk-ZHFFTT3I.js +17 -0
  155. package/dist/{chunk-BOZJOOGW.js → chunk-ZLHCZ5F2.js} +1 -1
  156. package/dist/{chunk-LHKHQAAY.js → chunk-ZLYGEART.js} +1 -1
  157. package/dist/{chunk-NBPMNUKZ.js → chunk-ZQCCVCHB.js} +1 -1
  158. package/dist/{chunk-ADGVQVHP.js → chunk-ZTOYVPGA.js} +3 -3
  159. package/dist/collections-XIHCTMSJ.js +70 -0
  160. package/dist/{configuration-C4IGBNXH.js → configuration-3GCBMM27.js} +3 -3
  161. package/dist/{configuration-JI22M76Z.js → configuration-FWZTMYXY.js} +5 -5
  162. package/dist/{create-OXR7WG5F.js → create-2RGNAVVY.js} +32 -32
  163. package/dist/{create-5QLYFVEK.js → create-32MXB6FD.js} +24 -24
  164. package/dist/create-3AMFYYI6.js +245 -0
  165. package/dist/create-AMNH3WXL.js +75 -0
  166. package/dist/{create-UPYB65PD.js → create-BV3QDTK2.js} +4 -4
  167. package/dist/{create-POK6SJSZ.js → create-FHIFVCSG.js} +52 -49
  168. package/dist/{create-EATFT5AB.js → create-GO7APBBU.js} +31 -31
  169. package/dist/create-HEZYB7RF.js +1179 -0
  170. package/dist/{create-R7K3ECN6.js → create-K26SM34L.js} +3 -3
  171. package/dist/{create-6I43IPLO.js → create-N534JQPH.js} +14 -14
  172. package/dist/create-NEK6JCKR.js +1798 -0
  173. package/dist/{create-YBF4YGWG.js → create-NF2LPVXA.js} +3 -3
  174. package/dist/{create-F7IDSSTP.js → create-PJVLJ7T6.js} +50 -45
  175. package/dist/{create-CK4X357V.js → create-RPBHXU32.js} +28 -28
  176. package/dist/{create-SFU3W3ZH.js → create-U64NEOEL.js} +3 -3
  177. package/dist/create-VL7LDTVE.js +1931 -0
  178. package/dist/{create-XVHOCZHJ.js → create-X5SOAPD3.js} +3 -3
  179. package/dist/{create-2XZLOG5Z.js → create-XLYGW5PN.js} +69 -41
  180. package/dist/{create-GB3ZA4LH.js → create-YKYLCEAK.js} +6 -6
  181. package/dist/customer-group-add-customers-2C53NFBJ.js +251 -0
  182. package/dist/customer-group-create-75QQEQZF.js +147 -0
  183. package/dist/customer-group-detail-AOQYYAOG.js +58 -0
  184. package/dist/customer-group-edit-N77RCW6I.js +138 -0
  185. package/dist/customer-groups-GNFV7VMT.js +284 -0
  186. package/dist/{customers-SOLJ2KQQ.js → customers-HNINO6YL.js} +11 -11
  187. package/dist/{edit-TZ4EXLKJ.js → edit-3DUCWSLA.js} +62 -46
  188. package/dist/{edit-ORXS3A2Y.js → edit-3V34KJS2.js} +3 -3
  189. package/dist/{edit-RJ3EZ5CD.js → edit-4PWAJ7A3.js} +25 -25
  190. package/dist/{edit-ZQP4MNJU.js → edit-7CLOJ3UZ.js} +50 -47
  191. package/dist/{edit-ZAHCMF5U.js → edit-7SBPHN6P.js} +3 -3
  192. package/dist/edit-BSD6667Q.js +367 -0
  193. package/dist/{edit-Q3UQIOLS.js → edit-I2RJUPWV.js} +4 -4
  194. package/dist/{edit-UUP3BQV3.js → edit-IJ6DCBUU.js} +5 -5
  195. package/dist/{edit-ZMERG3L7.js → edit-JB7KVBOL.js} +5 -5
  196. package/dist/{edit-O4JLGKQR.js → edit-NHQJLCAK.js} +4 -4
  197. package/dist/edit-O65JD54W.js +103 -0
  198. package/dist/{edit-4OEBCCXJ.js → edit-SIKOSSHF.js} +24 -24
  199. package/dist/edit-TD7QFM4Z.js +871 -0
  200. package/dist/{edit-C4OCKQVU.js → edit-UNN3QTEJ.js} +3 -3
  201. package/dist/{edit-PFAJZUWI.js → edit-WEUFBORT.js} +33 -34
  202. package/dist/{edit-KAKVPHZZ.js → edit-WN2Q3TOX.js} +4 -4
  203. package/dist/{edit-QPPMI7MU.js → edit-ZGAOUZYP.js} +33 -34
  204. package/dist/{edit-522DG3BY.js → edit-ZOLSAIKF.js} +3 -3
  205. package/dist/{edit-2LGAEKH6.js → edit-ZORE6RUD.js} +25 -25
  206. package/dist/{edit-budget-L3CCEWNF.js → edit-budget-D22WMVYR.js} +3 -3
  207. package/dist/{edit-inventory-item-A7KAPATR.js → edit-inventory-item-QMYWEBZ3.js} +3 -3
  208. package/dist/{edit-inventory-item-attributes-RNBOJR66.js → edit-inventory-item-attributes-HLG6JR6S.js} +3 -3
  209. package/dist/edit-price-F7ZWM3FN.js +197 -0
  210. package/dist/edit-stock-ITAZNHPU.js +230 -0
  211. package/dist/fulfillment-U2GRQ6DD.js +641 -0
  212. package/dist/{fulfillment-providers-6WDXCGAI.js → fulfillment-providers-CMU2JB5X.js} +40 -40
  213. package/dist/index.css +120 -24
  214. package/dist/index.js +355 -235
  215. package/dist/{offer-inventory-batch-page-4QNXDUWN.js → inventory-4JKLAZ2Q.js} +20 -20
  216. package/dist/{inventory-IOVM7GDU.js → inventory-FKEXULLT.js} +10 -10
  217. package/dist/{invite-HRKSQI4B.js → invite-3R2CEWLN.js} +23 -23
  218. package/dist/{invite-UBH7PYSH.js → invite-MNAX6EUC.js} +39 -39
  219. package/dist/loader-HTPUNIOS.js +34 -0
  220. package/dist/loader-MAAMUP2Z.js +33 -0
  221. package/dist/{locations-INS6FTMJ.js → locations-2VWSMWHL.js} +3 -3
  222. package/dist/login-YUWOWICV.js +39 -0
  223. package/dist/{manage-locations-TIYOCOZU.js → manage-locations-RWGDXXJQ.js} +3 -3
  224. package/dist/{media-EXWUWWNB.js → media-P6WSFHY4.js} +31 -30
  225. package/dist/media-YB4G5CMV.js +316 -0
  226. package/dist/{metadata-JIMHXPKE.js → metadata-5Q6FLVX4.js} +27 -27
  227. package/dist/{metadata-T6MLCEZ2.js → metadata-6OYHLPLA.js} +25 -25
  228. package/dist/{metadata-JCNPERR3.js → metadata-ADXGD4Y6.js} +25 -25
  229. package/dist/{metadata-ITS3VPE3.js → metadata-J447GEBP.js} +27 -27
  230. package/dist/{metadata-YOQEXEGO.js → metadata-VTQ2CGZX.js} +27 -27
  231. package/dist/{offer-create-page-6YTTQAXZ.js → offer-create-page-ACPKTNHA.js} +245 -266
  232. package/dist/offer-detail-page-S4R4N5GL.js +584 -0
  233. package/dist/offer-variant-detail-page-XUMDXZUD.js +402 -0
  234. package/dist/offers-OTZJBW43.js +54 -0
  235. package/dist/{onboarding-GCRT6P6M.js → onboarding-TUGXFOA6.js} +23 -23
  236. package/dist/orders-PJSJNGZS.js +63 -0
  237. package/dist/{organization-5AFVFFZQ.js → organization-YIOAVFHN.js} +26 -26
  238. package/dist/{organize-QXDKGP2X.js → organize-BTA7NJD2.js} +4 -4
  239. package/dist/{organize-AZYAANZM.js → organize-OWT5QSJR.js} +4 -4
  240. package/dist/pages/index.d.ts +232 -232
  241. package/dist/pages/index.js +89 -87
  242. package/dist/{payment-details-ENUWDVGI.js → payment-details-K2XFATEL.js} +24 -24
  243. package/dist/{payouts-2QBQSNDR.js → payouts-K5IDTJV3.js} +11 -11
  244. package/dist/{price-lists-2WBNENE7.js → price-lists-DNPIPDAW.js} +13 -13
  245. package/dist/{offer-pricing-edit-page-WZNP3TWV.js → pricing-5VUPPNKS.js} +21 -19
  246. package/dist/{pricing-4Y73YJHP.js → pricing-J5FIDZIY.js} +32 -32
  247. package/dist/{product-tags-DE32PERU.js → product-tags-SJYIGXEV.js} +47 -44
  248. package/dist/{product-types-PKUEL7X5.js → product-types-4PTJW5DE.js} +10 -10
  249. package/dist/product-variant-detail-FO6J3RFA.js +371 -0
  250. package/dist/{product-variant-edit-ESLPI5ES.js → product-variant-edit-55TAIBZO.js} +45 -27
  251. package/dist/{products-WLGCX6Z7.js → products-EQMANSO6.js} +41 -40
  252. package/dist/products-XM57LXJK.js +92 -0
  253. package/dist/{professional-details-OCVQO2MV.js → professional-details-WWZPTXSX.js} +24 -24
  254. package/dist/{profile-2HW5NX6K.js → profile-5IADQ727.js} +30 -30
  255. package/dist/{promotions-FPV6QOEQ.js → promotions-BYW6TZ5B.js} +12 -12
  256. package/dist/receive-MTXKKPKZ.js +578 -0
  257. package/dist/refund-3IXGYA7W.js +268 -0
  258. package/dist/{register-PZOHGO7N.js → register-U5PQZATC.js} +25 -25
  259. package/dist/{reset-password-Q7BNWHHO.js → reset-password-SKUJJLSV.js} +3 -3
  260. package/dist/{return-reasons-J2WFZOQH.js → return-reasons-QDPSIJG3.js} +22 -19
  261. package/dist/{sales-channels-I3PR34U5.js → sales-channels-GBSTCWVP.js} +12 -13
  262. package/dist/{sales-channels-HPG2ND4W.js → sales-channels-N4NE3FXP.js} +14 -15
  263. package/dist/{settings-RZNYWACF.js → settings-ZUBBFS67.js} +54 -51
  264. package/dist/shipment-TKSCPC3M.js +241 -0
  265. package/dist/shipping-DODEUYOQ.js +125 -0
  266. package/dist/{shipping-profile-M3GGADFI.js → shipping-profile-O4JMJLN7.js} +5 -9
  267. package/dist/shipping-profiles-4TJ4IH6U.js +46 -0
  268. package/dist/{stock-3HVQ6FYP.js → stock-GYK2GHJN.js} +27 -27
  269. package/dist/{store-LDVMG7CV.js → store-XWOALZ5Q.js} +36 -36
  270. package/dist/{store-closure-EZ2YPOPL.js → store-closure-46B3XZ2I.js} +24 -24
  271. package/dist/{store-select-AM4AE7AL.js → store-select-E77E3ZY7.js} +24 -24
  272. package/dist/{tax-regions-HDLBFZVG.js → tax-regions-S2LFRTMP.js} +9 -9
  273. package/dist/{team-6NTDISM4.js → team-N2C5JPSU.js} +37 -37
  274. package/package.json +12 -12
  275. package/dist/[id]-MOOCGOWO.js +0 -480
  276. package/dist/[id]-UVQXCYXD.js +0 -1219
  277. package/dist/[id]-VUX4FUOO.js +0 -1557
  278. package/dist/allocate-items-OK5PVJGR.js +0 -533
  279. package/dist/attributes-TRAUBTCO.js +0 -278
  280. package/dist/breadcrumb-6FV7PWEN.js +0 -33
  281. package/dist/breadcrumb-EX4C3AZY.js +0 -47
  282. package/dist/breadcrumb-Q3XSG7B2.js +0 -46
  283. package/dist/chunk-27KRIXMQ.js +0 -71
  284. package/dist/chunk-432S4FGR.js +0 -0
  285. package/dist/chunk-BDZOSMAX.js +0 -23
  286. package/dist/chunk-CFRWIQIZ.js +0 -43
  287. package/dist/chunk-G7BL4L3L.js +0 -66
  288. package/dist/chunk-RXV7INUV.js +0 -426
  289. package/dist/chunk-T6LHVNWO.js +0 -27
  290. package/dist/collections-DS63FT2E.js +0 -68
  291. package/dist/create-HR4I33SE.js +0 -73
  292. package/dist/create-UFHLPXET.js +0 -215
  293. package/dist/edit-GQNIINRR.js +0 -192
  294. package/dist/fulfillment-OIIPL7B7.js +0 -559
  295. package/dist/loader-VDYPD3RI.js +0 -31
  296. package/dist/login-HON44E3S.js +0 -39
  297. package/dist/metadata-5BPOBBU2.js +0 -45
  298. package/dist/offer-detail-page-OMZN2NTA.js +0 -492
  299. package/dist/offer-edit-page-3MO566RP.js +0 -151
  300. package/dist/offers-GVN5LCK6.js +0 -32
  301. package/dist/orders-CHSS4ASB.js +0 -63
  302. package/dist/product-variant-detail-MWUBPCOP.js +0 -209
  303. package/dist/products-XOHAQHUJ.js +0 -91
  304. package/dist/shipment-KWUXQZWK.js +0 -176
  305. package/dist/shipping-profiles-L27STQ7K.js +0 -46
@@ -0,0 +1,871 @@
1
+ import {
2
+ useAddOrderEditItems,
3
+ useCancelOrderEdit,
4
+ useCreateOrderEdit,
5
+ useRemoveOrderEditAddedItem,
6
+ useRequestOrderEdit,
7
+ useUpdateOrderEditAddedItem,
8
+ useUpdateOrderEditOriginalItem
9
+ } from "./chunk-7BFQKYCJ.js";
10
+ import {
11
+ MoneyAmountCell
12
+ } from "./chunk-L57USMYC.js";
13
+ import {
14
+ getStylizedAmount
15
+ } from "./chunk-3BXCPHN6.js";
16
+ import {
17
+ PlaceholderCell
18
+ } from "./chunk-PHOCVOZ5.js";
19
+ import "./chunk-IQPN4PZJ.js";
20
+ import "./chunk-TKGWSUEI.js";
21
+ import {
22
+ KeyboundForm
23
+ } from "./chunk-SITRHMZZ.js";
24
+ import {
25
+ RouteFocusModal,
26
+ StackedFocusModal,
27
+ useRouteModal,
28
+ useStackedModal
29
+ } from "./chunk-GDWBOQI5.js";
30
+ import {
31
+ Form
32
+ } from "./chunk-3QSRE5LS.js";
33
+ import "./chunk-FQERBIVS.js";
34
+ import {
35
+ _DataTable,
36
+ useDataTable
37
+ } from "./chunk-W3UHAQCV.js";
38
+ import "./chunk-YN3FGNJM.js";
39
+ import "./chunk-KCHYLLVG.js";
40
+ import "./chunk-634XVU3D.js";
41
+ import {
42
+ useQueryParams
43
+ } from "./chunk-THHRRYRS.js";
44
+ import "./chunk-LRD242C7.js";
45
+ import {
46
+ Thumbnail
47
+ } from "./chunk-WIYFXWRI.js";
48
+ import "./chunk-INNFZYX2.js";
49
+ import {
50
+ ActionMenu
51
+ } from "./chunk-BDGZ4EQO.js";
52
+ import "./chunk-LAVHRER2.js";
53
+ import "./chunk-QHQWEERJ.js";
54
+ import "./chunk-Y7QKP6QU.js";
55
+ import {
56
+ useOffers
57
+ } from "./chunk-EPRYM3FA.js";
58
+ import {
59
+ useOrder,
60
+ useOrderPreview
61
+ } from "./chunk-6FDPVW7Y.js";
62
+ import "./chunk-G6YNCIVF.js";
63
+ import "./chunk-A5DJIOHN.js";
64
+ import "./chunk-RHKRREUU.js";
65
+ import "./chunk-ZA2KFUFR.js";
66
+ import "./chunk-LXZXXOJ3.js";
67
+ import "./chunk-NBMM2TZK.js";
68
+
69
+ // src/pages/orders/[id]/edit/index.tsx
70
+ import { toast as toast4 } from "@medusajs/ui";
71
+ import { useEffect } from "react";
72
+ import { useTranslation as useTranslation7 } from "react-i18next";
73
+ import { useNavigate, useParams } from "react-router-dom";
74
+
75
+ // src/pages/orders/[id]/edit/_components/order-edit-create-form/order-edit-create-form.tsx
76
+ import { zodResolver } from "@hookform/resolvers/zod";
77
+ import { Button as Button2, Heading as Heading2, Input as Input3, Switch, toast as toast3, usePrompt } from "@medusajs/ui";
78
+ import { useForm } from "react-hook-form";
79
+ import { useTranslation as useTranslation6 } from "react-i18next";
80
+
81
+ // src/pages/orders/[id]/edit/_components/order-edit-create-form/order-edit-items-section.tsx
82
+ import { Button, Heading, Input as Input2, toast as toast2 } from "@medusajs/ui";
83
+ import { useMemo as useMemo4, useState as useState2 } from "react";
84
+ import { useTranslation as useTranslation5 } from "react-i18next";
85
+
86
+ // src/pages/orders/[id]/edit/_components/add-order-edit-items-table/add-order-edit-items-table.tsx
87
+ import { useMemo as useMemo2, useState } from "react";
88
+ import { useTranslation as useTranslation3 } from "react-i18next";
89
+
90
+ // src/pages/orders/[id]/edit/_components/add-order-edit-items-table/use-order-edit-item-table-columns.tsx
91
+ import { Checkbox, Text } from "@medusajs/ui";
92
+ import { createColumnHelper } from "@tanstack/react-table";
93
+ import { useMemo } from "react";
94
+ import { useTranslation } from "react-i18next";
95
+ import { jsx, jsxs } from "react/jsx-runtime";
96
+ var columnHelper = createColumnHelper();
97
+ var useOrderEditItemsTableColumns = () => {
98
+ const { t } = useTranslation();
99
+ return useMemo(
100
+ () => [
101
+ columnHelper.display({
102
+ id: "select",
103
+ header: ({ table }) => /* @__PURE__ */ jsx(
104
+ Checkbox,
105
+ {
106
+ checked: table.getIsSomePageRowsSelected() ? "indeterminate" : table.getIsAllPageRowsSelected(),
107
+ onCheckedChange: (value) => table.toggleAllPageRowsSelected(!!value)
108
+ }
109
+ ),
110
+ cell: ({ row }) => {
111
+ const isSelectable = row.getCanSelect();
112
+ return /* @__PURE__ */ jsx(
113
+ Checkbox,
114
+ {
115
+ disabled: !isSelectable,
116
+ checked: row.getIsSelected(),
117
+ onCheckedChange: (value) => row.toggleSelected(!!value),
118
+ onClick: (e) => {
119
+ e.stopPropagation();
120
+ }
121
+ }
122
+ );
123
+ }
124
+ }),
125
+ columnHelper.display({
126
+ id: "product",
127
+ header: t("fields.product"),
128
+ cell: ({ row }) => {
129
+ const variant = row.original.product_variant;
130
+ const productTitle = variant?.product?.title;
131
+ if (!productTitle) {
132
+ return /* @__PURE__ */ jsx(PlaceholderCell, {});
133
+ }
134
+ return /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full max-w-[300px] items-center gap-x-3 overflow-hidden", children: [
135
+ /* @__PURE__ */ jsx(Thumbnail, { src: variant?.product?.thumbnail }),
136
+ /* @__PURE__ */ jsx(
137
+ Text,
138
+ {
139
+ size: "small",
140
+ leading: "compact",
141
+ className: "truncate",
142
+ title: productTitle,
143
+ children: productTitle
144
+ }
145
+ )
146
+ ] });
147
+ }
148
+ }),
149
+ columnHelper.accessor("sku", {
150
+ header: t("fields.sku"),
151
+ cell: ({ getValue }) => {
152
+ const sku = getValue();
153
+ if (!sku) return /* @__PURE__ */ jsx(PlaceholderCell, {});
154
+ return /* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", className: "truncate", children: sku });
155
+ }
156
+ }),
157
+ columnHelper.display({
158
+ id: "variant_title",
159
+ header: t("fields.title"),
160
+ cell: ({ row }) => {
161
+ const title = row.original.product_variant?.title;
162
+ if (!title) return /* @__PURE__ */ jsx(PlaceholderCell, {});
163
+ return /* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", className: "truncate", children: title });
164
+ }
165
+ })
166
+ ],
167
+ [t]
168
+ );
169
+ };
170
+
171
+ // src/pages/orders/[id]/edit/_components/add-order-edit-items-table/use-order-edit-item-table-filters.tsx
172
+ import { useTranslation as useTranslation2 } from "react-i18next";
173
+ var useOrderEditItemTableFilters = () => {
174
+ const { t } = useTranslation2();
175
+ const filters = [
176
+ {
177
+ key: "created_at",
178
+ label: t("fields.createdAt"),
179
+ type: "date"
180
+ },
181
+ {
182
+ key: "updated_at",
183
+ label: t("fields.updatedAt"),
184
+ type: "date"
185
+ }
186
+ ];
187
+ return filters;
188
+ };
189
+
190
+ // src/pages/orders/[id]/edit/_components/add-order-edit-items-table/use-order-edit-item-table-query.tsx
191
+ var useOrderEditItemTableQuery = ({
192
+ pageSize = 50,
193
+ prefix
194
+ }) => {
195
+ const raw = useQueryParams(
196
+ ["q", "offset", "order", "created_at", "updated_at"],
197
+ prefix
198
+ );
199
+ const { offset, created_at, updated_at, ...rest } = raw;
200
+ const searchParams = {
201
+ ...rest,
202
+ limit: pageSize,
203
+ offset: offset ? Number(offset) : 0,
204
+ created_at: created_at ? JSON.parse(created_at) : void 0,
205
+ updated_at: updated_at ? JSON.parse(updated_at) : void 0
206
+ };
207
+ return { searchParams, raw };
208
+ };
209
+
210
+ // src/pages/orders/[id]/edit/_components/add-order-edit-items-table/add-order-edit-items-table.tsx
211
+ import { jsx as jsx2 } from "react/jsx-runtime";
212
+ var PAGE_SIZE = 50;
213
+ var PREFIX = "rit";
214
+ var OFFER_PICKER_FIELDS = [
215
+ "id",
216
+ "sku",
217
+ "variant_id",
218
+ "seller_id",
219
+ "prices.amount",
220
+ "prices.currency_code",
221
+ "product_variant.id",
222
+ "product_variant.title",
223
+ "product_variant.product.id",
224
+ "product_variant.product.title",
225
+ "product_variant.product.thumbnail",
226
+ "product_variant.manage_inventory",
227
+ "product_variant.inventory_quantity",
228
+ "product_variant.inventory_items.required_quantity",
229
+ "product_variant.inventory_items.inventory.location_levels.available_quantity"
230
+ ].join(",");
231
+ var offerHasInventory = (offer) => {
232
+ const variant = offer.product_variant;
233
+ if (!variant) return false;
234
+ if (variant.manage_inventory === false) return true;
235
+ const links = variant.inventory_items ?? [];
236
+ if (!links.length) {
237
+ return (variant.inventory_quantity ?? 0) > 0;
238
+ }
239
+ return links.every((link) => {
240
+ const available = (link.inventory?.location_levels ?? []).reduce(
241
+ (acc, lvl) => acc + (lvl.available_quantity ?? 0),
242
+ 0
243
+ );
244
+ const required = link.required_quantity ?? 1;
245
+ return required > 0 && available >= required;
246
+ });
247
+ };
248
+ var AddOrderEditItemsTable = ({
249
+ currencyCode,
250
+ onSelectionChange
251
+ }) => {
252
+ const { t } = useTranslation3();
253
+ const [rowSelection, setRowSelection] = useState({});
254
+ const updater = (fn) => {
255
+ const newState = typeof fn === "function" ? fn(rowSelection) : fn;
256
+ setRowSelection(newState);
257
+ onSelectionChange(Object.keys(newState));
258
+ };
259
+ const { searchParams, raw } = useOrderEditItemTableQuery({
260
+ pageSize: PAGE_SIZE,
261
+ prefix: PREFIX
262
+ });
263
+ const offersResponse = useOffers({
264
+ ...searchParams,
265
+ fields: OFFER_PICKER_FIELDS
266
+ });
267
+ const rawOffersSource = offersResponse.offers;
268
+ const rawOffers = useMemo2(
269
+ () => rawOffersSource ?? [],
270
+ [rawOffersSource]
271
+ );
272
+ const rawCount = offersResponse.count ?? 0;
273
+ const offers = useMemo2(() => {
274
+ return rawOffers.filter((offer) => {
275
+ if (currencyCode) {
276
+ const hasPrice = (offer.prices ?? []).some(
277
+ (p) => p.currency_code === currencyCode
278
+ );
279
+ if (!hasPrice) return false;
280
+ }
281
+ return offerHasInventory(offer);
282
+ });
283
+ }, [rawOffers, currencyCode]);
284
+ const count = offers.length;
285
+ void rawCount;
286
+ const columns = useOrderEditItemsTableColumns();
287
+ const filters = useOrderEditItemTableFilters();
288
+ const { table } = useDataTable({
289
+ data: offers,
290
+ columns,
291
+ count,
292
+ enablePagination: true,
293
+ // Row id = offer id so onSelectionChange yields offer_ids that the modal
294
+ // layer sends to the backend item-add routes (which accept `offer_id` and
295
+ // resolve to variant_id + unit_price server-side).
296
+ getRowId: (row) => row.id,
297
+ pageSize: PAGE_SIZE,
298
+ enableRowSelection: () => true,
299
+ rowSelection: {
300
+ state: rowSelection,
301
+ updater
302
+ }
303
+ });
304
+ return /* @__PURE__ */ jsx2(
305
+ "div",
306
+ {
307
+ className: "flex size-full flex-col overflow-hidden",
308
+ "data-testid": "add-offers-picker",
309
+ children: /* @__PURE__ */ jsx2(
310
+ _DataTable,
311
+ {
312
+ table,
313
+ columns,
314
+ pageSize: PAGE_SIZE,
315
+ count,
316
+ filters,
317
+ pagination: true,
318
+ layout: "fill",
319
+ search: true,
320
+ orderBy: [
321
+ { key: "sku", label: t("fields.sku") },
322
+ { key: "created_at", label: t("fields.createdAt") },
323
+ { key: "updated_at", label: t("fields.updatedAt") }
324
+ ],
325
+ prefix: PREFIX,
326
+ queryObject: raw
327
+ }
328
+ )
329
+ }
330
+ );
331
+ };
332
+
333
+ // src/pages/orders/[id]/edit/_components/order-edit-create-form/order-edit-item.tsx
334
+ import { ArrowUturnLeft, ReceiptPercent, XCircle } from "@medusajs/icons";
335
+ import { Badge, Input, Text as Text2, toast, Tooltip } from "@medusajs/ui";
336
+ import { useMemo as useMemo3 } from "react";
337
+ import { useTranslation as useTranslation4 } from "react-i18next";
338
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
339
+ function OrderEditItem({ item, currencyCode, orderId }) {
340
+ const { t } = useTranslation4();
341
+ const { mutateAsync: updateAddedItem } = useUpdateOrderEditAddedItem(orderId);
342
+ const { mutateAsync: updateOriginalItem } = useUpdateOrderEditOriginalItem(orderId);
343
+ const { mutateAsync: undoAction } = useRemoveOrderEditAddedItem(orderId);
344
+ const actions = useMemo3(
345
+ () => item.actions ?? [],
346
+ [item.actions]
347
+ );
348
+ const isAddedItem = useMemo3(
349
+ () => !!actions.find((a) => a.action === "ITEM_ADD"),
350
+ [actions]
351
+ );
352
+ const isItemUpdated = useMemo3(
353
+ () => !!actions.find((a) => a.action === "ITEM_UPDATE"),
354
+ [actions]
355
+ );
356
+ const fulfilledQty = item.detail?.fulfilled_quantity ?? 0;
357
+ const returnedQty = item.detail?.returned_quantity ?? 0;
358
+ const floor = fulfilledQty + returnedQty;
359
+ const isItemRemoved = useMemo3(() => {
360
+ const updateAction = actions.find((a) => a.action === "ITEM_UPDATE");
361
+ return !!updateAction && item.quantity === floor;
362
+ }, [actions, item.quantity, floor]);
363
+ const appliedPromoCodes = useMemo3(() => {
364
+ return (item.adjustments || []).map((adjustment) => adjustment.code).filter((c) => !!c);
365
+ }, [item.adjustments]);
366
+ const onUpdate = async (quantity) => {
367
+ if (quantity < floor) {
368
+ toast.error(t("orders.edits.removeBlockedFulfilledOrReturned"));
369
+ return;
370
+ }
371
+ if (quantity === item.quantity) {
372
+ return;
373
+ }
374
+ const addItemAction = actions.find((a) => a.action === "ITEM_ADD");
375
+ try {
376
+ if (addItemAction) {
377
+ await updateAddedItem({ $actionId: addItemAction.id, quantity });
378
+ } else {
379
+ await updateOriginalItem({ $itemId: item.id, quantity });
380
+ }
381
+ } catch (e) {
382
+ toast.error(
383
+ e instanceof Error ? e.message : t("errorBoundary.defaultTitle")
384
+ );
385
+ }
386
+ };
387
+ const onRemove = async () => {
388
+ const addItemAction = actions.find((a) => a.action === "ITEM_ADD");
389
+ try {
390
+ if (addItemAction) {
391
+ await undoAction(addItemAction.id);
392
+ } else {
393
+ await updateOriginalItem({
394
+ $itemId: item.id,
395
+ quantity: floor
396
+ });
397
+ }
398
+ } catch (e) {
399
+ toast.error(
400
+ e instanceof Error ? e.message : t("errorBoundary.defaultTitle")
401
+ );
402
+ }
403
+ };
404
+ const onRemoveUndo = async () => {
405
+ const updateItemAction = actions.find((a) => a.action === "ITEM_UPDATE");
406
+ try {
407
+ if (updateItemAction) {
408
+ await undoAction(updateItemAction.id);
409
+ }
410
+ } catch (e) {
411
+ toast.error(
412
+ e instanceof Error ? e.message : t("errorBoundary.defaultTitle")
413
+ );
414
+ }
415
+ };
416
+ const isAtFloor = item.quantity === floor;
417
+ const qtyInput = /* @__PURE__ */ jsx3(
418
+ Input,
419
+ {
420
+ className: "bg-ui-bg-base txt-small w-[67px] rounded-lg [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
421
+ type: "number",
422
+ step: "any",
423
+ disabled: isAtFloor,
424
+ min: floor,
425
+ defaultValue: item.quantity,
426
+ "data-testid": `edit-item-${item.id}-qty`,
427
+ onBlur: (e) => {
428
+ const val = e.target.value;
429
+ const payload = val === "" ? null : Number(val);
430
+ if (payload !== null) {
431
+ onUpdate(payload);
432
+ }
433
+ }
434
+ }
435
+ );
436
+ return /* @__PURE__ */ jsx3(
437
+ "div",
438
+ {
439
+ className: "bg-ui-bg-subtle shadow-elevation-card-rest my-2 rounded-xl",
440
+ "data-testid": `edit-item-${item.id}`,
441
+ children: /* @__PURE__ */ jsxs2("div", { className: "flex flex-col items-center gap-x-2 gap-y-2 p-3 text-sm md:flex-row", children: [
442
+ /* @__PURE__ */ jsxs2("div", { className: "flex flex-1 items-center justify-between", children: [
443
+ /* @__PURE__ */ jsxs2("div", { className: "flex flex-row items-center gap-x-3", children: [
444
+ /* @__PURE__ */ jsx3(Thumbnail, { src: item.thumbnail }),
445
+ /* @__PURE__ */ jsxs2("div", { className: "flex flex-col", children: [
446
+ /* @__PURE__ */ jsxs2("div", { children: [
447
+ /* @__PURE__ */ jsxs2(Text2, { className: "txt-small", as: "span", weight: "plus", children: [
448
+ item.title,
449
+ " "
450
+ ] }),
451
+ item.variant_sku && /* @__PURE__ */ jsxs2("span", { children: [
452
+ "(",
453
+ item.variant_sku,
454
+ ")"
455
+ ] })
456
+ ] }),
457
+ /* @__PURE__ */ jsx3(Text2, { as: "div", className: "text-ui-fg-subtle txt-small", children: item.subtitle })
458
+ ] })
459
+ ] }),
460
+ isAddedItem && /* @__PURE__ */ jsx3(Badge, { size: "2xsmall", rounded: "full", color: "blue", className: "mr-1", children: t("general.new") }),
461
+ isItemRemoved ? /* @__PURE__ */ jsx3(Badge, { size: "2xsmall", rounded: "full", color: "red", className: "mr-1", children: t("general.removed") }) : isItemUpdated && /* @__PURE__ */ jsx3(
462
+ Badge,
463
+ {
464
+ size: "2xsmall",
465
+ rounded: "full",
466
+ color: "orange",
467
+ className: "mr-1",
468
+ children: t("general.modified")
469
+ }
470
+ )
471
+ ] }),
472
+ /* @__PURE__ */ jsxs2("div", { className: "flex flex-1 items-center justify-between", children: [
473
+ /* @__PURE__ */ jsxs2("div", { className: "flex flex-grow items-center gap-2", children: [
474
+ floor > 0 && isAtFloor ? /* @__PURE__ */ jsx3(
475
+ Tooltip,
476
+ {
477
+ content: t("orders.edits.removeBlockedFulfilledOrReturned"),
478
+ children: qtyInput
479
+ }
480
+ ) : qtyInput,
481
+ /* @__PURE__ */ jsx3(Text2, { className: "txt-small text-ui-fg-subtle", children: t("fields.qty") }),
482
+ appliedPromoCodes.length > 0 && /* @__PURE__ */ jsx3("div", { className: "flex flex-shrink pt-[2px]", children: /* @__PURE__ */ jsx3(
483
+ Tooltip,
484
+ {
485
+ content: /* @__PURE__ */ jsx3("span", { className: "text-pretty", children: appliedPromoCodes.map((code) => /* @__PURE__ */ jsx3("div", { children: code }, code)) }),
486
+ children: /* @__PURE__ */ jsx3(ReceiptPercent, { className: "text-ui-fg-subtle font-normal" })
487
+ }
488
+ ) })
489
+ ] }),
490
+ /* @__PURE__ */ jsx3("div", { className: "text-ui-fg-subtle txt-small mr-2 flex flex-shrink-0", children: /* @__PURE__ */ jsx3(
491
+ MoneyAmountCell,
492
+ {
493
+ currencyCode,
494
+ amount: item.total ?? 0
495
+ }
496
+ ) }),
497
+ /* @__PURE__ */ jsx3(
498
+ ActionMenu,
499
+ {
500
+ groups: [
501
+ {
502
+ actions: [
503
+ !isItemRemoved ? {
504
+ label: t("actions.remove"),
505
+ onClick: onRemove,
506
+ icon: /* @__PURE__ */ jsx3(XCircle, {}),
507
+ disabled: isAtFloor
508
+ } : {
509
+ label: t("actions.undo"),
510
+ onClick: onRemoveUndo,
511
+ icon: /* @__PURE__ */ jsx3(ArrowUturnLeft, {})
512
+ }
513
+ ]
514
+ }
515
+ ]
516
+ }
517
+ )
518
+ ] })
519
+ ] })
520
+ },
521
+ item.quantity
522
+ );
523
+ }
524
+
525
+ // src/pages/orders/[id]/edit/_components/order-edit-create-form/order-edit-items-section.tsx
526
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
527
+ var addedOffers = [];
528
+ var OrderEditItemsSection = ({
529
+ order,
530
+ preview
531
+ }) => {
532
+ const { t } = useTranslation5();
533
+ const { setIsOpen } = useStackedModal();
534
+ const [filterTerm, setFilterTerm] = useState2("");
535
+ const { mutateAsync: addItems, isPending } = useAddOrderEditItems(order.id);
536
+ const onItemsSelected = async () => {
537
+ if (!addedOffers.length) {
538
+ setIsOpen("order-edit-add-items", false);
539
+ return;
540
+ }
541
+ try {
542
+ await addItems({
543
+ // Vendor route resolves `offer_id` → variant_id + unit_price
544
+ // server-side. Picker rows are keyed by offer id, not variant id.
545
+ items: addedOffers.map((offer_id) => ({
546
+ offer_id,
547
+ quantity: 1
548
+ }))
549
+ });
550
+ addedOffers = [];
551
+ setIsOpen("order-edit-add-items", false);
552
+ } catch (e) {
553
+ toast2.error(
554
+ e instanceof Error ? e.message : t("errorBoundary.defaultTitle")
555
+ );
556
+ }
557
+ };
558
+ const filteredItems = useMemo4(() => {
559
+ const term = filterTerm.toLowerCase();
560
+ if (!term) {
561
+ return preview.items;
562
+ }
563
+ return preview.items.filter(
564
+ (i) => i.title?.toLowerCase().includes(term) || i.product_title?.toLowerCase().includes(term)
565
+ );
566
+ }, [preview, filterTerm]);
567
+ return /* @__PURE__ */ jsxs3("div", { children: [
568
+ /* @__PURE__ */ jsxs3("div", { className: "mb-3 mt-8 flex items-center justify-between", children: [
569
+ /* @__PURE__ */ jsx4(Heading, { level: "h2", children: t("fields.items") }),
570
+ /* @__PURE__ */ jsxs3("div", { className: "flex gap-2", children: [
571
+ /* @__PURE__ */ jsx4(
572
+ Input2,
573
+ {
574
+ value: filterTerm,
575
+ onChange: (e) => setFilterTerm(e.target.value),
576
+ placeholder: t("fields.search"),
577
+ autoComplete: "off",
578
+ type: "search",
579
+ "data-testid": "edit-items-search"
580
+ }
581
+ ),
582
+ /* @__PURE__ */ jsxs3(StackedFocusModal, { id: "order-edit-add-items", children: [
583
+ /* @__PURE__ */ jsx4(StackedFocusModal.Trigger, { asChild: true, children: /* @__PURE__ */ jsx4(
584
+ Button,
585
+ {
586
+ variant: "secondary",
587
+ size: "small",
588
+ "data-testid": "edit-add-items-trigger",
589
+ children: t("actions.addItems")
590
+ }
591
+ ) }),
592
+ /* @__PURE__ */ jsxs3(StackedFocusModal.Content, { children: [
593
+ /* @__PURE__ */ jsx4(StackedFocusModal.Header, {}),
594
+ /* @__PURE__ */ jsx4(StackedFocusModal.Title, { asChild: true, children: /* @__PURE__ */ jsx4("span", { className: "sr-only", children: t("orders.edits.addItems") }) }),
595
+ /* @__PURE__ */ jsx4(StackedFocusModal.Description, { className: "sr-only", children: t("orders.edits.addItemsDescription") }),
596
+ /* @__PURE__ */ jsx4(StackedFocusModal.Body, { className: "size-full overflow-hidden", children: /* @__PURE__ */ jsx4(
597
+ AddOrderEditItemsTable,
598
+ {
599
+ currencyCode: order.currency_code,
600
+ onSelectionChange: (finalSelection) => {
601
+ addedOffers = finalSelection;
602
+ }
603
+ }
604
+ ) }),
605
+ /* @__PURE__ */ jsx4(StackedFocusModal.Footer, { children: /* @__PURE__ */ jsx4("div", { className: "flex w-full items-center justify-end gap-x-4", children: /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-end gap-x-2", children: [
606
+ /* @__PURE__ */ jsx4(RouteFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsx4(
607
+ Button,
608
+ {
609
+ type: "button",
610
+ variant: "secondary",
611
+ size: "small",
612
+ "data-testid": "edit-add-items-cancel",
613
+ children: t("actions.cancel")
614
+ }
615
+ ) }),
616
+ /* @__PURE__ */ jsx4(
617
+ Button,
618
+ {
619
+ type: "submit",
620
+ variant: "primary",
621
+ size: "small",
622
+ disabled: isPending,
623
+ onClick: async () => await onItemsSelected(),
624
+ "data-testid": "edit-add-items-save",
625
+ children: t("actions.save")
626
+ },
627
+ "submit-button"
628
+ )
629
+ ] }) }) })
630
+ ] })
631
+ ] })
632
+ ] })
633
+ ] }),
634
+ filteredItems.map((item) => /* @__PURE__ */ jsx4(
635
+ OrderEditItem,
636
+ {
637
+ item,
638
+ orderId: order.id,
639
+ currencyCode: order.currency_code
640
+ },
641
+ item.id
642
+ )),
643
+ filterTerm && !filteredItems.length && /* @__PURE__ */ jsx4(
644
+ "div",
645
+ {
646
+ style: {
647
+ background: "repeating-linear-gradient(-45deg, rgb(212, 212, 216, 0.15), rgb(212, 212, 216,.15) 10px, transparent 10px, transparent 20px)"
648
+ },
649
+ className: "bg-ui-bg-field mt-4 block h-[56px] w-full rounded-lg border border-dashed"
650
+ }
651
+ )
652
+ ] });
653
+ };
654
+
655
+ // src/pages/orders/[id]/edit/_components/order-edit-create-form/schema.ts
656
+ import { z } from "zod";
657
+ var OrderEditCreateSchema = z.object({
658
+ note: z.string().optional(),
659
+ send_notification: z.boolean().optional()
660
+ });
661
+
662
+ // src/pages/orders/[id]/edit/_components/order-edit-create-form/order-edit-create-form.tsx
663
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
664
+ var OrderEditCreateForm = ({
665
+ order,
666
+ preview
667
+ }) => {
668
+ const { t } = useTranslation6();
669
+ const { handleSuccess } = useRouteModal();
670
+ const { mutateAsync: cancelOrderEditRequest, isPending: isCanceling } = useCancelOrderEdit(order.id);
671
+ const { mutateAsync: requestOrderEdit, isPending: isRequesting } = useRequestOrderEdit(order.id);
672
+ const isRequestRunning = isCanceling || isRequesting;
673
+ const form = useForm({
674
+ defaultValues: () => {
675
+ return Promise.resolve({
676
+ note: "",
677
+ send_notification: false
678
+ });
679
+ },
680
+ resolver: zodResolver(OrderEditCreateSchema)
681
+ });
682
+ const prompt = usePrompt();
683
+ const handleSubmit = form.handleSubmit(async () => {
684
+ try {
685
+ const res = await prompt({
686
+ title: t("general.areYouSure"),
687
+ description: t("orders.edits.confirmText"),
688
+ confirmText: t("actions.continue"),
689
+ cancelText: t("actions.cancel"),
690
+ variant: "confirmation"
691
+ });
692
+ if (!res) {
693
+ return;
694
+ }
695
+ await requestOrderEdit();
696
+ toast3.success(t("orders.edits.createSuccessToast"));
697
+ handleSuccess(`/orders/${order.id}`);
698
+ } catch (e) {
699
+ toast3.error(t("general.error"), {
700
+ description: e instanceof Error ? e.message : t("errorBoundary.defaultTitle")
701
+ });
702
+ }
703
+ });
704
+ return /* @__PURE__ */ jsx5(
705
+ RouteFocusModal.Form,
706
+ {
707
+ form,
708
+ onClose: (isSubmitSuccessful) => {
709
+ if (!isSubmitSuccessful) {
710
+ cancelOrderEditRequest(void 0, {
711
+ onSuccess: () => {
712
+ toast3.success(t("orders.edits.toast.canceledSuccessfully"));
713
+ },
714
+ onError: (error) => {
715
+ toast3.error(error.message);
716
+ }
717
+ });
718
+ }
719
+ },
720
+ children: /* @__PURE__ */ jsxs4(KeyboundForm, { onSubmit: handleSubmit, className: "flex h-full flex-col", children: [
721
+ /* @__PURE__ */ jsx5(RouteFocusModal.Header, {}),
722
+ /* @__PURE__ */ jsx5(RouteFocusModal.Title, { asChild: true, children: /* @__PURE__ */ jsx5("span", { className: "sr-only", children: t("orders.edits.title") }) }),
723
+ /* @__PURE__ */ jsx5(RouteFocusModal.Description, { className: "sr-only", children: t("orders.edits.title") }),
724
+ /* @__PURE__ */ jsx5(RouteFocusModal.Body, { className: "flex size-full justify-center overflow-y-auto", children: /* @__PURE__ */ jsxs4("div", { className: "mt-16 w-[720px] max-w-[100%] px-4 md:p-0", children: [
725
+ /* @__PURE__ */ jsx5(Heading2, { level: "h1", children: t("orders.edits.create") }),
726
+ /* @__PURE__ */ jsx5(OrderEditItemsSection, { preview, order }),
727
+ /* @__PURE__ */ jsxs4("div", { className: "mt-8 border-y border-dotted py-4", children: [
728
+ /* @__PURE__ */ jsxs4("div", { className: "mb-2 flex items-center justify-between", children: [
729
+ /* @__PURE__ */ jsx5("span", { className: "txt-small text-ui-fg-subtle", children: t("orders.edits.currentTotal") }),
730
+ /* @__PURE__ */ jsx5("span", { className: "txt-small text-ui-fg-subtle", children: getStylizedAmount(order.total, order.currency_code) })
731
+ ] }),
732
+ /* @__PURE__ */ jsxs4("div", { className: "mb-2 flex items-center justify-between", children: [
733
+ /* @__PURE__ */ jsx5("span", { className: "txt-small text-ui-fg-subtle", children: t("orders.edits.newTotal") }),
734
+ /* @__PURE__ */ jsx5("span", { className: "txt-small text-ui-fg-subtle", children: getStylizedAmount(preview.total, order.currency_code) })
735
+ ] }),
736
+ /* @__PURE__ */ jsxs4("div", { className: "mt-4 flex items-center justify-between border-t border-dotted pt-4", children: [
737
+ /* @__PURE__ */ jsx5("span", { className: "txt-small font-medium", children: t("orders.edits.differenceDue") }),
738
+ /* @__PURE__ */ jsx5("span", { className: "txt-small font-medium", children: getStylizedAmount(
739
+ preview.summary.pending_difference,
740
+ order.currency_code
741
+ ) })
742
+ ] })
743
+ ] }),
744
+ /* @__PURE__ */ jsx5(
745
+ Form.Field,
746
+ {
747
+ control: form.control,
748
+ name: "note",
749
+ render: ({ field }) => {
750
+ return /* @__PURE__ */ jsx5(Form.Item, { children: /* @__PURE__ */ jsxs4("div", { className: "mt-8 flex", children: [
751
+ /* @__PURE__ */ jsxs4("div", { className: "block flex-1", children: [
752
+ /* @__PURE__ */ jsx5(Form.Label, { optional: true, children: t("fields.note") }),
753
+ /* @__PURE__ */ jsx5(Form.Hint, { className: "!mt-1", children: t("orders.edits.noteHint") })
754
+ ] }),
755
+ /* @__PURE__ */ jsx5("div", { className: "w-full flex-1 flex-grow", children: /* @__PURE__ */ jsx5(Form.Control, { children: /* @__PURE__ */ jsx5(Input3, { ...field, "data-testid": "edit-internal-note" }) }) })
756
+ ] }) });
757
+ }
758
+ }
759
+ ),
760
+ /* @__PURE__ */ jsx5("div", { className: "bg-ui-bg-field mt-8 rounded-lg border py-2 pl-2 pr-4", children: /* @__PURE__ */ jsx5(
761
+ Form.Field,
762
+ {
763
+ control: form.control,
764
+ name: "send_notification",
765
+ render: ({ field: { onChange, value, ...field } }) => {
766
+ return /* @__PURE__ */ jsxs4(Form.Item, { children: [
767
+ /* @__PURE__ */ jsxs4("div", { className: "flex items-center", children: [
768
+ /* @__PURE__ */ jsx5(Form.Control, { className: "mr-4 self-start", children: /* @__PURE__ */ jsx5(
769
+ Switch,
770
+ {
771
+ dir: "ltr",
772
+ className: "mt-[2px] rtl:rotate-180",
773
+ checked: !!value,
774
+ onCheckedChange: onChange,
775
+ ...field
776
+ }
777
+ ) }),
778
+ /* @__PURE__ */ jsxs4("div", { className: "block", children: [
779
+ /* @__PURE__ */ jsx5(Form.Label, { children: t("orders.edits.sendNotification") }),
780
+ /* @__PURE__ */ jsx5(Form.Hint, { className: "!mt-1", children: t("orders.edits.sendNotificationHint") })
781
+ ] })
782
+ ] }),
783
+ /* @__PURE__ */ jsx5(Form.ErrorMessage, {})
784
+ ] });
785
+ }
786
+ }
787
+ ) }),
788
+ /* @__PURE__ */ jsx5("div", { className: "p-8" })
789
+ ] }) }),
790
+ /* @__PURE__ */ jsx5(RouteFocusModal.Footer, { children: /* @__PURE__ */ jsx5("div", { className: "flex w-full items-center justify-end gap-x-4", children: /* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-end gap-x-2", children: [
791
+ /* @__PURE__ */ jsx5(RouteFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsx5(
792
+ Button2,
793
+ {
794
+ type: "button",
795
+ variant: "secondary",
796
+ size: "small",
797
+ "data-testid": "edit-cancel",
798
+ children: t("orders.edits.cancel")
799
+ }
800
+ ) }),
801
+ /* @__PURE__ */ jsx5(
802
+ Button2,
803
+ {
804
+ type: "submit",
805
+ variant: "primary",
806
+ size: "small",
807
+ isLoading: isRequestRunning,
808
+ "data-testid": "edit-confirm",
809
+ children: t("orders.edits.confirm")
810
+ },
811
+ "submit-button"
812
+ )
813
+ ] }) }) })
814
+ ] })
815
+ }
816
+ );
817
+ };
818
+
819
+ // src/pages/orders/[id]/edit/index.tsx
820
+ import { jsx as jsx6 } from "react/jsx-runtime";
821
+ var IS_REQUEST_RUNNING = false;
822
+ var Component = () => {
823
+ const { id } = useParams();
824
+ const navigate = useNavigate();
825
+ const { t } = useTranslation7();
826
+ const orderId = id ?? "";
827
+ const { order } = useOrder(orderId, {
828
+ // Use the `<rel>.*` suffix form. Combining `*foo` with `*foo.bar`
829
+ // (or the `+foo.bar.baz` form) makes Medusa's query parser try to
830
+ // look up a literal property called `*items` / `+items` on Order
831
+ // and 500. See packages/core/src/api/vendor/orders/query-config.ts
832
+ // for the matching guidance applied to the defaults.
833
+ fields: "currency_code,total,items.*,items.variant.*"
834
+ });
835
+ const { order: preview } = useOrderPreview(orderId);
836
+ const { mutateAsync: createOrderEdit } = useCreateOrderEdit(orderId);
837
+ useEffect(() => {
838
+ async function run() {
839
+ if (IS_REQUEST_RUNNING || !preview) {
840
+ return;
841
+ }
842
+ if (preview.order_change) {
843
+ if (preview.order_change.change_type !== "edit") {
844
+ navigate(`/orders/${preview.id}`, { replace: true });
845
+ toast4.error(t("orders.edits.activeChangeError"));
846
+ }
847
+ return;
848
+ }
849
+ IS_REQUEST_RUNNING = true;
850
+ try {
851
+ await createOrderEdit({
852
+ order_id: preview.id
853
+ });
854
+ } catch (e) {
855
+ toast4.error(
856
+ e instanceof Error ? e.message : t("errorBoundary.defaultTitle")
857
+ );
858
+ navigate(`/orders/${preview.id}`, { replace: true });
859
+ } finally {
860
+ IS_REQUEST_RUNNING = false;
861
+ }
862
+ }
863
+ run();
864
+ }, [preview, createOrderEdit, navigate, t]);
865
+ return /* @__PURE__ */ jsx6(RouteFocusModal, { children: preview && order && /* @__PURE__ */ jsx6(OrderEditCreateForm, { order, preview }) });
866
+ };
867
+ var edit_default = Component;
868
+ export {
869
+ Component,
870
+ edit_default as default
871
+ };