@mercurjs/admin 2.1.2-canary.5 → 2.1.3

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 (211) hide show
  1. package/dist/{add-campaign-promotions-WRGU7MF4.js → add-campaign-promotions-6Z2STQT4.js} +7 -7
  2. package/dist/{api-key-management-detail-Q5RBMX4J.js → api-key-management-detail-IRYR6J2I.js} +4 -4
  3. package/dist/{api-key-management-list-DQ33T6KV.js → api-key-management-list-4WCDP4B3.js} +7 -7
  4. package/dist/{api-key-management-sales-channels-UGAAKILD.js → api-key-management-sales-channels-NVFG2ESH.js} +1 -1
  5. package/dist/{attribute-create-IVRJPVG5.js → attribute-create-EAOQ6KT6.js} +58 -45
  6. package/dist/{attribute-detail-FLQKKFCO.js → attribute-detail-R26GDX7Q.js} +7 -7
  7. package/dist/{attribute-list-ODT2ZP4T.js → attribute-list-XR7OSL2H.js} +7 -7
  8. package/dist/{campaign-create-QFNB5XZ2.js → campaign-create-AZTR5UZP.js} +2 -2
  9. package/dist/{campaign-detail-UKVHFA6H.js → campaign-detail-TCPO6DTI.js} +10 -10
  10. package/dist/{campaign-list-A3TVXCV4.js → campaign-list-DCLVAFEM.js} +7 -7
  11. package/dist/{category-create-XH6AM3NM.js → category-create-DG3Z5RYE.js} +2 -2
  12. package/dist/{category-detail-DXQECKDO.js → category-detail-K2UNFPRV.js} +7 -7
  13. package/dist/{category-list-AQIONIMS.js → category-list-2MG37UXJ.js} +7 -7
  14. package/dist/{category-organize-NCH6A57L.js → category-organize-CCX2INRS.js} +1 -1
  15. package/dist/{category-products-VV3JLNW7.js → category-products-LKT7564A.js} +4 -4
  16. package/dist/{chunk-XZQV2OLD.js → chunk-26UTIAAZ.js} +17 -2
  17. package/dist/{chunk-VXPWIJZV.js → chunk-2OYCT5NO.js} +1 -1
  18. package/dist/{chunk-R2FE3PBQ.js → chunk-2U5BRCQO.js} +1 -1
  19. package/dist/{chunk-Z4CSKRJ4.js → chunk-32OKBVER.js} +2 -2
  20. package/dist/{chunk-2MNDOYVE.js → chunk-35Q6JF3S.js} +2 -2
  21. package/dist/{chunk-3BBG3LC3.js → chunk-3DOCALSU.js} +2 -2
  22. package/dist/{chunk-RHCDOBTU.js → chunk-3IBSB2U6.js} +2 -2
  23. package/dist/{chunk-LNT72PI5.js → chunk-3T5S5RDO.js} +1 -1
  24. package/dist/{chunk-FZCXIX37.js → chunk-3ZSYFPHB.js} +5 -4
  25. package/dist/{chunk-MKIFFPHN.js → chunk-4IZ2RD3L.js} +3 -3
  26. package/dist/{chunk-S2Q7PO7I.js → chunk-4KX6CBJ4.js} +1 -0
  27. package/dist/{chunk-IGBGQDKS.js → chunk-4LQX5FRH.js} +2 -2
  28. package/dist/{chunk-BGSOUCCN.js → chunk-4Q7LZQVY.js} +2 -2
  29. package/dist/{chunk-OADU6FQZ.js → chunk-4ZN3D4YS.js} +2 -2
  30. package/dist/{chunk-36NDTZIV.js → chunk-56AUQBQX.js} +1 -1
  31. package/dist/{chunk-SCKY77PC.js → chunk-5OS2MBRB.js} +2 -2
  32. package/dist/{chunk-EHLONIAY.js → chunk-5ZBQICCP.js} +1 -1
  33. package/dist/{chunk-D3OIFOHY.js → chunk-63OSYRLS.js} +1 -1
  34. package/dist/{chunk-BURG4MO3.js → chunk-6YGOXPB5.js} +2 -2
  35. package/dist/{chunk-Q64H5G5C.js → chunk-7A5WEMNW.js} +2 -2
  36. package/dist/{chunk-ZOS6EBB2.js → chunk-7MTFPHXR.js} +2 -2
  37. package/dist/{chunk-ANHC5MBQ.js → chunk-7QWLLYOY.js} +1 -1
  38. package/dist/{chunk-TGK2C73H.js → chunk-7XXM72CF.js} +6 -2
  39. package/dist/{chunk-JDHG7FWL.js → chunk-7YHAFHGI.js} +17 -13
  40. package/dist/{chunk-4OHMUFVP.js → chunk-ABUQBBEM.js} +2 -2
  41. package/dist/{chunk-RTOCKSJ5.js → chunk-ARMGWHYU.js} +2 -2
  42. package/dist/{chunk-MSXZLZ4X.js → chunk-AZAGUAN4.js} +2 -2
  43. package/dist/{chunk-JPJISU7W.js → chunk-B6SYYKJI.js} +2 -2
  44. package/dist/{chunk-NZ4BXIO6.js → chunk-BEU674HI.js} +2 -2
  45. package/dist/{chunk-FNJNVUXR.js → chunk-CEG375CR.js} +1 -1
  46. package/dist/{chunk-TDQEXNX5.js → chunk-CIH5DSU7.js} +2 -2
  47. package/dist/{chunk-XILJNA3R.js → chunk-CXO3C3L2.js} +2 -2
  48. package/dist/{chunk-YQ6JASMO.js → chunk-DVKO4VRC.js} +3 -3
  49. package/dist/{chunk-V5J73NPW.js → chunk-E74OUNA3.js} +1 -1
  50. package/dist/{chunk-QRAFS63H.js → chunk-EWMEXGFZ.js} +2 -2
  51. package/dist/{chunk-GQUE4TAJ.js → chunk-F67RRVMJ.js} +3 -3
  52. package/dist/{chunk-IK6MPP7K.js → chunk-FSPZYOY6.js} +1 -1
  53. package/dist/{chunk-WQO26Z76.js → chunk-GDHF6CT5.js} +2 -2
  54. package/dist/{chunk-CUSRWXZY.js → chunk-GJPGL7RP.js} +1 -1
  55. package/dist/{chunk-3QIIWLCT.js → chunk-GKJLFLGN.js} +1 -1
  56. package/dist/{chunk-VTK4AZCW.js → chunk-GPKTJXGG.js} +2 -2
  57. package/dist/{chunk-GS7L2B4S.js → chunk-GXRLLA5H.js} +3 -4
  58. package/dist/{chunk-JJYOI5PR.js → chunk-GZBVMHXS.js} +2 -2
  59. package/dist/{chunk-XIZLPYEE.js → chunk-H6MYB7GB.js} +4 -1
  60. package/dist/{chunk-KERTIEWE.js → chunk-HGULM6DF.js} +2 -2
  61. package/dist/{chunk-KBYZLKI4.js → chunk-HKDFWQ6Q.js} +15 -12
  62. package/dist/{chunk-Z4OJNCER.js → chunk-HNUA6XIW.js} +2 -2
  63. package/dist/{chunk-VBJFCAKU.js → chunk-HY3CV5V6.js} +2 -2
  64. package/dist/{chunk-LN3OHONN.js → chunk-J24X54DB.js} +2 -2
  65. package/dist/{chunk-GU4T2RAQ.js → chunk-KCYUY2AI.js} +6 -1
  66. package/dist/{chunk-Z6DBHMEN.js → chunk-KHHMQM2L.js} +1 -1
  67. package/dist/{chunk-KLVTWJ4M.js → chunk-KYPPQGGE.js} +2 -2
  68. package/dist/{chunk-XZYRXNWO.js → chunk-L56WFGUN.js} +1 -1
  69. package/dist/{chunk-UEFWVPQ7.js → chunk-LBXPX3XC.js} +3 -3
  70. package/dist/{chunk-XRCERDBF.js → chunk-LFATSJPO.js} +1 -1
  71. package/dist/{chunk-YA53AXGM.js → chunk-M73MP4NC.js} +4 -4
  72. package/dist/{chunk-BJFFCELF.js → chunk-MNYDJXTM.js} +1 -1
  73. package/dist/{chunk-72Q2T2FK.js → chunk-MWX5JCOM.js} +8 -7
  74. package/dist/{chunk-L5SVR7FK.js → chunk-MXGDKEU5.js} +1 -1
  75. package/dist/{chunk-Y3I3LXKW.js → chunk-N23OD7WS.js} +1 -1
  76. package/dist/{chunk-V2MYKK5U.js → chunk-N57BOIPU.js} +1 -1
  77. package/dist/{chunk-52ZAPY3Z.js → chunk-NEN6KWAJ.js} +2 -2
  78. package/dist/{chunk-7AMAENN3.js → chunk-NHAOR25V.js} +2 -2
  79. package/dist/{chunk-WIDZXOML.js → chunk-NRJ7F7JW.js} +2 -2
  80. package/dist/{chunk-NNCIV74Y.js → chunk-O5YFLNSQ.js} +67 -57
  81. package/dist/{chunk-UQITHKTH.js → chunk-OB4NOV4M.js} +6 -15
  82. package/dist/{chunk-GIU72QEP.js → chunk-OG4WH7IW.js} +2 -2
  83. package/dist/{chunk-NHHZHVP6.js → chunk-ORI7UXS6.js} +2 -2
  84. package/dist/{chunk-CMLDMKSO.js → chunk-PIZ7FN3L.js} +11 -3
  85. package/dist/{chunk-K7BVNZS6.js → chunk-R46PKJUT.js} +2 -2
  86. package/dist/{chunk-CQFXSD2L.js → chunk-RE3AYHPM.js} +2 -2
  87. package/dist/{chunk-YWWUOGJA.js → chunk-SESTTUVM.js} +10 -2
  88. package/dist/{chunk-6AZBAS4D.js → chunk-SJQG3RCN.js} +3 -3
  89. package/dist/{chunk-N3XQFZPF.js → chunk-SOJ4TLWP.js} +2 -2
  90. package/dist/{chunk-IXWGJ4W7.js → chunk-SPIVEW2Y.js} +23 -5
  91. package/dist/{chunk-X3S5LZQO.js → chunk-UEEYZGM3.js} +4 -3
  92. package/dist/{chunk-OCEPZGFS.js → chunk-V7EPLR3E.js} +2 -2
  93. package/dist/{chunk-LWIWYLZL.js → chunk-VGM5UQRA.js} +1 -0
  94. package/dist/{chunk-J3JN6OWV.js → chunk-W576GZBG.js} +2 -2
  95. package/dist/{chunk-JRWXFXQ7.js → chunk-WIQ2HBJG.js} +3 -3
  96. package/dist/{chunk-CPZJNHAL.js → chunk-X3YEY2PY.js} +2 -2
  97. package/dist/{chunk-IBOTFRZP.js → chunk-X4DGVTMC.js} +2 -2
  98. package/dist/{chunk-QZBAACYC.js → chunk-XB3HXEZB.js} +2 -2
  99. package/dist/{chunk-FSCMVYXU.js → chunk-XBHUWCBD.js} +1 -1
  100. package/dist/{chunk-CQ7HSDCL.js → chunk-XCANTVXS.js} +1 -1
  101. package/dist/{chunk-YXFG3M2D.js → chunk-XLA2CNCW.js} +2 -2
  102. package/dist/{chunk-ENFPDBSU.js → chunk-Y3FXVIJO.js} +12 -3
  103. package/dist/{chunk-3UZVMGC6.js → chunk-Y6NK6GBB.js} +1 -1
  104. package/dist/chunk-YGRTRAWX.js +163 -0
  105. package/dist/{chunk-YBZWO4ZV.js → chunk-ZMC7BKLT.js} +2 -3
  106. package/dist/{chunk-OPAARXKJ.js → chunk-ZXYKF4A2.js} +7 -7
  107. package/dist/{collection-add-products-K4R67OLS.js → collection-add-products-IRYJ6U6P.js} +4 -4
  108. package/dist/{collection-detail-4ATHIFVS.js → collection-detail-263PM4DL.js} +7 -7
  109. package/dist/{collection-list-OFZNSMTS.js → collection-list-IVPTNBSI.js} +7 -7
  110. package/dist/{commission-rate-create-US6HFJ5L.js → commission-rate-create-3N6BHEGT.js} +5 -5
  111. package/dist/{commission-rate-detail-D5WUXKER.js → commission-rate-detail-MY3F2RHR.js} +3 -3
  112. package/dist/{commission-rate-edit-VA6VE2H4.js → commission-rate-edit-WZDPXLLZ.js} +5 -5
  113. package/dist/{commission-rate-list-TFMQC26F.js → commission-rate-list-JPBOTOTA.js} +7 -7
  114. package/dist/{customer-detail-5UW56MGD.js → customer-detail-2QBJPF7S.js} +7 -7
  115. package/dist/{customer-group-add-customers-YSFEUI5M.js → customer-group-add-customers-JCLAH45C.js} +4 -4
  116. package/dist/{customer-group-detail-NL7FAEBO.js → customer-group-detail-BDKFWKTI.js} +7 -7
  117. package/dist/{customer-group-list-T53DLWPQ.js → customer-group-list-3NEEJXQH.js} +7 -7
  118. package/dist/{customer-list-LHGKF34F.js → customer-list-ZIFNZXO4.js} +7 -7
  119. package/dist/{customers-add-customer-group-IWFFLQQQ.js → customers-add-customer-group-OQIFQZBL.js} +4 -4
  120. package/dist/{edit-rules-BRXIELG2.js → edit-rules-4AHZQGCX.js} +29 -23
  121. package/dist/index.js +160 -160
  122. package/dist/{inventory-create-3GAK5IYZ.js → inventory-create-P26OGAHD.js} +2 -2
  123. package/dist/{inventory-detail-RU37UA2Y.js → inventory-detail-7W7UUWNT.js} +7 -7
  124. package/dist/{inventory-list-3H3J7IOB.js → inventory-list-PA4B4RWY.js} +7 -7
  125. package/dist/{inventory-stock-JZNONQAL.js → inventory-stock-UZSYXXPX.js} +2 -2
  126. package/dist/{location-detail-QHF23BXP.js → location-detail-RUC2ZP3K.js} +3 -3
  127. package/dist/{location-fulfillment-providers-OQTYP6C7.js → location-fulfillment-providers-WDET6TJP.js} +7 -9
  128. package/dist/{location-list-XGFUQY7T.js → location-list-R7EECG5Z.js} +4 -4
  129. package/dist/{location-sales-channels-IRGVGAVC.js → location-sales-channels-IS6E3I4S.js} +1 -1
  130. package/dist/{location-service-zone-create-URK3O2H4.js → location-service-zone-create-HAQVVTKP.js} +5 -5
  131. package/dist/{location-service-zone-manage-areas-DO3XK6TU.js → location-service-zone-manage-areas-5LCENMAM.js} +5 -5
  132. package/dist/{location-service-zone-shipping-option-create-OOU6YVRS.js → location-service-zone-shipping-option-create-FV5Y2PNB.js} +3 -3
  133. package/dist/{location-service-zone-shipping-option-pricing-MZHMML32.js → location-service-zone-shipping-option-pricing-6QHLZ6IN.js} +2 -2
  134. package/dist/{manage-locations-BA7VMY3Q.js → manage-locations-TU5HCIKG.js} +34 -31
  135. package/dist/{marketplace-add-currencies-BIN4YT3V.js → marketplace-add-currencies-PB73MHM6.js} +4 -4
  136. package/dist/{marketplace-detail-AXO5YXED.js → marketplace-detail-3KFGJWQ7.js} +7 -7
  137. package/dist/{order-allocate-items-A365NKBM.js → order-allocate-items-2B6T5JCK.js} +6 -2
  138. package/dist/{order-create-claim-PLC342V5.js → order-create-claim-R2SX6YUS.js} +83 -49
  139. package/dist/{order-create-edit-25CJG3KZ.js → order-create-edit-G35PDCQ2.js} +12 -8
  140. package/dist/{order-create-exchange-TK65KBGW.js → order-create-exchange-7KKMJHXE.js} +83 -49
  141. package/dist/{order-create-fulfillment-BB2FCLAH.js → order-create-fulfillment-2FTTWTFE.js} +18 -3
  142. package/dist/{order-create-refund-LDODI2AP.js → order-create-refund-KWYYLAED.js} +7 -2
  143. package/dist/{order-create-return-5XDDN456.js → order-create-return-BQFRANNG.js} +32 -14
  144. package/dist/{order-detail-SFIBIQTI.js → order-detail-BITJD73H.js} +7 -7
  145. package/dist/{order-edit-billing-address-JNO7KJKW.js → order-edit-billing-address-FLEI4VDB.js} +1 -1
  146. package/dist/{order-list-IDKVSUYO.js → order-list-D2SJOMZ2.js} +7 -7
  147. package/dist/{order-receive-return-6IU2HGAD.js → order-receive-return-JV3X7YHG.js} +9 -2
  148. package/dist/pages/index.js +88 -88
  149. package/dist/{payout-detail-DZFTTDUR.js → payout-detail-JWS2Q4TY.js} +3 -3
  150. package/dist/{payout-list-75YIMPCS.js → payout-list-PW6BFT4O.js} +7 -7
  151. package/dist/{price-list-configuration-FEO2XAX5.js → price-list-configuration-N5D5OFXX.js} +6 -6
  152. package/dist/{price-list-create-6XVOYBM4.js → price-list-create-NQFC2JIJ.js} +8 -8
  153. package/dist/{price-list-detail-FBY7PWN3.js → price-list-detail-HRVLVBPS.js} +7 -7
  154. package/dist/{price-list-list-TZIZJJH3.js → price-list-list-K4IJFZYH.js} +7 -7
  155. package/dist/{price-list-prices-add-HQHRB3XG.js → price-list-prices-add-WXEGEWRA.js} +7 -7
  156. package/dist/{price-list-prices-edit-WSLGG7VC.js → price-list-prices-edit-KJEKS6TL.js} +2 -2
  157. package/dist/{product-create-NT5YV3BN.js → product-create-BDQ66ECX.js} +9 -9
  158. package/dist/{product-create-option-WDFFZYTE.js → product-create-option-B7SV42LO.js} +1 -1
  159. package/dist/{product-create-variant-TJB7NNKY.js → product-create-variant-7YAG2YRZ.js} +2 -2
  160. package/dist/{product-detail-XXA3V6V3.js → product-detail-DCHR4B4T.js} +4 -4
  161. package/dist/{product-edit-option-UMOGVYLM.js → product-edit-option-KVTIY5NM.js} +1 -1
  162. package/dist/{product-export-IJBCSQ5H.js → product-export-E7RBOIO6.js} +2 -2
  163. package/dist/{product-import-JB7S4EL6.js → product-import-KOSPPCSW.js} +1 -1
  164. package/dist/{product-list-XXSHUGNI.js → product-list-X72QPKOK.js} +7 -7
  165. package/dist/{product-media-HCM6UI2O.js → product-media-VNSFLCSH.js} +4 -4
  166. package/dist/{product-organization-63ODFBLM.js → product-organization-PN22LYKQ.js} +1 -1
  167. package/dist/{product-prices-RLZBWN6C.js → product-prices-HI4SOTMP.js} +1 -1
  168. package/dist/{product-sales-channels-53YVZ5G5.js → product-sales-channels-J2ZNRKZT.js} +1 -1
  169. package/dist/{product-shipping-profile-X5CZJCET.js → product-shipping-profile-G7UPGWYK.js} +1 -1
  170. package/dist/{product-stock-XB3HKT5G.js → product-stock-666D3AMJ.js} +2 -2
  171. package/dist/{product-tag-detail-2H7EJV5J.js → product-tag-detail-B7JEBNMJ.js} +7 -7
  172. package/dist/{product-tag-list-6LTEJAI7.js → product-tag-list-MAUUWH25.js} +8 -8
  173. package/dist/{product-type-detail-LOCLZUCY.js → product-type-detail-7GHH4ACU.js} +7 -7
  174. package/dist/{product-type-list-7SXDLL6L.js → product-type-list-LTYTTF4F.js} +7 -7
  175. package/dist/{product-variant-detail-T2OM45NJ.js → product-variant-detail-PHGVJWUV.js} +7 -7
  176. package/dist/{profile-detail-IWSYAO67.js → profile-detail-UQTGEFYF.js} +3 -3
  177. package/dist/{promotion-add-campaign-GBB6M2OB.js → promotion-add-campaign-M4OT6URB.js} +2 -2
  178. package/dist/{promotion-create-4ZEXEV4G.js → promotion-create-GM37OXEW.js} +5 -5
  179. package/dist/{promotion-detail-TE54RSNT.js → promotion-detail-PDBRQII7.js} +5 -5
  180. package/dist/{promotion-list-IANWEI3X.js → promotion-list-XW4PNLJF.js} +10 -10
  181. package/dist/{refund-reason-list-7G23NIRL.js → refund-reason-list-2S2MDKBQ.js} +4 -4
  182. package/dist/{region-add-countries-TZEP4SML.js → region-add-countries-T4XZ2CU3.js} +4 -4
  183. package/dist/{region-create-7YJ25C3H.js → region-create-MQXTWBKC.js} +4 -4
  184. package/dist/{region-detail-KFFPZLZL.js → region-detail-6OFP76OY.js} +7 -7
  185. package/dist/{region-list-TPQG44BF.js → region-list-EYTDREE2.js} +7 -7
  186. package/dist/{reservation-detail-X3W6APD5.js → reservation-detail-G26K6HZV.js} +3 -3
  187. package/dist/{reservation-list-DOW3PKTS.js → reservation-list-CHHR6CEV.js} +7 -7
  188. package/dist/{reset-password-BQFZL5XM.js → reset-password-S6IBWG47.js} +1 -1
  189. package/dist/{return-reason-list-J5S45BMZ.js → return-reason-list-MCGW2JV3.js} +7 -7
  190. package/dist/{sales-channel-add-products-P5AAQFVB.js → sales-channel-add-products-FH7B7UYR.js} +4 -4
  191. package/dist/{sales-channel-detail-BJCMSTSA.js → sales-channel-detail-KCS472HN.js} +7 -7
  192. package/dist/{sales-channel-list-QKFVTZ6A.js → sales-channel-list-6HBRUZ2Z.js} +4 -4
  193. package/dist/{shipping-option-type-detail-OAKOWHU7.js → shipping-option-type-detail-IS7CNAYI.js} +3 -3
  194. package/dist/{shipping-option-type-list-HRW7XFEQ.js → shipping-option-type-list-BTPCLBSD.js} +7 -7
  195. package/dist/{shipping-profile-detail-XKLW22RQ.js → shipping-profile-detail-L3IHPGLL.js} +3 -3
  196. package/dist/{shipping-profiles-list-IT433GKY.js → shipping-profiles-list-2JKVMEZG.js} +7 -7
  197. package/dist/{store-bulk-edit-HCEEME3D.js → store-bulk-edit-A4ZWZ7HJ.js} +1 -1
  198. package/dist/{store-details-6NDWU65D.js → store-details-BOGWBWE7.js} +7 -7
  199. package/dist/{store-edit-U5I6TFKD.js → store-edit-77WKNZUH.js} +3 -3
  200. package/dist/{store-list-TJXHXAPH.js → store-list-2G34KVD5.js} +7 -7
  201. package/dist/{tax-region-create-PSQRQ3UC.js → tax-region-create-5DDZ23QQ.js} +1 -1
  202. package/dist/{tax-region-detail-KCJTJZZI.js → tax-region-detail-VNBNS7FS.js} +6 -6
  203. package/dist/{tax-region-list-LP6SV4BF.js → tax-region-list-WCHVLVVC.js} +3 -3
  204. package/dist/{tax-region-province-detail-IQ3IRVIE.js → tax-region-province-detail-MXYZMUX7.js} +6 -6
  205. package/dist/{tax-region-tax-override-create-2MNB5QSB.js → tax-region-tax-override-create-VIOPM26G.js} +5 -5
  206. package/dist/{tax-region-tax-override-edit-JCG5D2HY.js → tax-region-tax-override-edit-5FW6YCCW.js} +5 -5
  207. package/dist/{user-detail-3KQDH6LZ.js → user-detail-LGIMHLY4.js} +3 -3
  208. package/dist/{user-invite-ZAGFYQDN.js → user-invite-ZZSWFXFM.js} +4 -4
  209. package/dist/{user-list-7PIKWZQY.js → user-list-5QJJS7EA.js} +7 -7
  210. package/package.json +4 -4
  211. package/dist/chunk-NCYTM57J.js +0 -160
@@ -57,8 +57,8 @@ import "./chunk-FQERBIVS.js";
57
57
  import {
58
58
  _DataTable,
59
59
  useDataTable
60
- } from "./chunk-KLVTWJ4M.js";
61
- import "./chunk-YBZWO4ZV.js";
60
+ } from "./chunk-KYPPQGGE.js";
61
+ import "./chunk-ZMC7BKLT.js";
62
62
  import "./chunk-KAZ5BYTQ.js";
63
63
  import "./chunk-634XVU3D.js";
64
64
  import {
@@ -76,8 +76,8 @@ import {
76
76
  } from "./chunk-BDGZ4EQO.js";
77
77
  import "./chunk-LAVHRER2.js";
78
78
  import "./chunk-Y7QKP6QU.js";
79
- import "./chunk-KBYZLKI4.js";
80
- import "./chunk-YWWUOGJA.js";
79
+ import "./chunk-HKDFWQ6Q.js";
80
+ import "./chunk-SESTTUVM.js";
81
81
  import {
82
82
  useQueryParams
83
83
  } from "./chunk-THHRRYRS.js";
@@ -631,7 +631,7 @@ function ClaimInboundItem({
631
631
  {
632
632
  control: form.control,
633
633
  name: `inbound_items.${index}.reason_id`,
634
- render: ({ field: { ref, value, onChange, ...field } }) => {
634
+ render: ({ field: { ref: _ref, value, onChange, ...field } }) => {
635
635
  return /* @__PURE__ */ jsxs(Form.Item, { children: [
636
636
  /* @__PURE__ */ jsx3(Form.Control, { children: /* @__PURE__ */ jsx3(
637
637
  Combobox,
@@ -680,7 +680,7 @@ function ClaimInboundItem({
680
680
  {
681
681
  control: form.control,
682
682
  name: `inbound_items.${index}.note`,
683
- render: ({ field: { ref, ...field } }) => {
683
+ render: ({ field: { ref: _ref, ...field } }) => {
684
684
  return /* @__PURE__ */ jsxs(Form.Item, { children: [
685
685
  /* @__PURE__ */ jsx3(Form.Control, { children: /* @__PURE__ */ jsx3(
686
686
  Input,
@@ -758,7 +758,7 @@ import { useMemo as useMemo3 } from "react";
758
758
  import { useTranslation as useTranslation5 } from "react-i18next";
759
759
  import { jsx as jsx4 } from "react/jsx-runtime";
760
760
  var columnHelper2 = createColumnHelper2();
761
- var useClaimOutboundItemTableColumns = (currencyCode) => {
761
+ var useClaimOutboundItemTableColumns = (_currencyCode) => {
762
762
  const { t } = useTranslation5();
763
763
  return useMemo3(
764
764
  () => [
@@ -805,7 +805,7 @@ var useClaimOutboundItemTableColumns = (currencyCode) => {
805
805
  header: t("fields.title")
806
806
  })
807
807
  ],
808
- [t, currencyCode]
808
+ [t]
809
809
  );
810
810
  };
811
811
 
@@ -1049,7 +1049,7 @@ var ClaimOutboundSection = ({
1049
1049
  (a) => a.claim_id === claim.id && a.action === "ITEM_ADD"
1050
1050
  )
1051
1051
  ),
1052
- [preview.items]
1052
+ [preview.items, claim.id]
1053
1053
  );
1054
1054
  const variantItemMap = useMemo4(
1055
1055
  () => new Map(order?.items?.map((i) => [i.variant_id, i])),
@@ -1066,7 +1066,7 @@ var ClaimOutboundSection = ({
1066
1066
  });
1067
1067
  const variantOutboundMap = useMemo4(
1068
1068
  () => new Map(previewOutboundItems.map((i) => [i.variant_id, i])),
1069
- [previewOutboundItems, outboundItems]
1069
+ [previewOutboundItems]
1070
1070
  );
1071
1071
  useEffect(() => {
1072
1072
  const existingItemsMap = {};
@@ -1096,23 +1096,31 @@ var ClaimOutboundSection = ({
1096
1096
  remove(ind);
1097
1097
  }
1098
1098
  });
1099
- }, [previewOutboundItems]);
1099
+ }, [
1100
+ previewOutboundItems,
1101
+ remove,
1102
+ outboundItems,
1103
+ append,
1104
+ update
1105
+ ]);
1100
1106
  const locationId = form.watch("location_id");
1101
1107
  const showOutboundItemsPlaceholder = !outboundItems.length;
1102
1108
  const onItemsSelected = async () => {
1103
- itemsToAdd.length && await addOutboundItem(
1104
- {
1105
- items: itemsToAdd.map((variantId) => ({
1106
- variant_id: variantId,
1107
- quantity: 1
1108
- }))
1109
- },
1110
- {
1111
- onError: (error) => {
1112
- toast.error(error.message);
1109
+ if (itemsToAdd.length) {
1110
+ await addOutboundItem(
1111
+ {
1112
+ items: itemsToAdd.map((variantId) => ({
1113
+ variant_id: variantId,
1114
+ quantity: 1
1115
+ }))
1116
+ },
1117
+ {
1118
+ onError: (error) => {
1119
+ toast.error(error.message);
1120
+ }
1113
1121
  }
1114
- }
1115
- );
1122
+ );
1123
+ }
1116
1124
  for (const itemToRemove of itemsToRemove) {
1117
1125
  const action = previewOutboundItems.find((i) => i.variant_id === itemToRemove)?.actions?.find((a) => a.action === "ITEM_ADD");
1118
1126
  if (action?.id) {
@@ -1130,7 +1138,7 @@ var ClaimOutboundSection = ({
1130
1138
  const action = s.actions?.find(
1131
1139
  (a) => a.action === "SHIPPING_ADD" && !a.return_id
1132
1140
  );
1133
- return action && !!!action?.return_id;
1141
+ return action && !action?.return_id;
1134
1142
  });
1135
1143
  const promises = outboundShippingMethods.filter(Boolean).map((outboundShippingMethod) => {
1136
1144
  const action = outboundShippingMethod.actions?.find(
@@ -1169,7 +1177,12 @@ var ClaimOutboundSection = ({
1169
1177
  );
1170
1178
  }).every(Boolean);
1171
1179
  return !allItemsHaveLocation;
1172
- }, [outboundItems, inventoryMap, locationId]);
1180
+ }, [
1181
+ outboundItems,
1182
+ inventoryMap,
1183
+ locationId,
1184
+ variantItemMap
1185
+ ]);
1173
1186
  useEffect(() => {
1174
1187
  const getInventoryMap = async () => {
1175
1188
  const ret = {};
@@ -1194,7 +1207,7 @@ var ClaimOutboundSection = ({
1194
1207
  /* @__PURE__ */ jsxs3("div", { className: "mt-8 flex items-center justify-between", children: [
1195
1208
  /* @__PURE__ */ jsx7(Heading, { level: "h2", children: t("orders.returns.outbound") }),
1196
1209
  /* @__PURE__ */ jsxs3(StackedFocusModal, { id: "outbound-items", children: [
1197
- /* @__PURE__ */ jsx7(StackedFocusModal.Trigger, { asChild: true, children: /* @__PURE__ */ jsx7("a", { className: "focus-visible:shadow-borders-focus transition-fg txt-compact-small-plus cursor-pointer text-blue-500 outline-none hover:text-blue-400", children: t("actions.addItems") }) }),
1210
+ /* @__PURE__ */ jsx7(StackedFocusModal.Trigger, { asChild: true, children: /* @__PURE__ */ jsx7("button", { type: "button", className: "focus-visible:shadow-borders-focus transition-fg txt-compact-small-plus cursor-pointer text-blue-500 outline-none hover:text-blue-400", children: t("actions.addItems") }) }),
1198
1211
  /* @__PURE__ */ jsxs3(StackedFocusModal.Content, { children: [
1199
1212
  /* @__PURE__ */ jsx7(StackedFocusModal.Header, {}),
1200
1213
  /* @__PURE__ */ jsx7(
@@ -1218,6 +1231,7 @@ var ClaimOutboundSection = ({
1218
1231
  /* @__PURE__ */ jsx7(
1219
1232
  Button,
1220
1233
  {
1234
+ tabIndex: 0,
1221
1235
  type: "submit",
1222
1236
  variant: "primary",
1223
1237
  size: "small",
@@ -1362,7 +1376,7 @@ var ClaimCreateForm = ({
1362
1376
  () => preview?.items?.filter(
1363
1377
  (i) => !!i.actions?.find((a) => a.claim_id === claim.id)
1364
1378
  ),
1365
- [preview.items]
1379
+ [preview.items, claim.id]
1366
1380
  );
1367
1381
  const inboundPreviewItems = previewItems.filter(
1368
1382
  (item) => !!item.actions?.find((a) => a.action === "RETURN_ITEM")
@@ -1448,7 +1462,7 @@ var ClaimCreateForm = ({
1448
1462
  float: inboundShipping.total
1449
1463
  });
1450
1464
  }
1451
- }, [inboundShipping]);
1465
+ }, [inboundShipping, order.currency_code]);
1452
1466
  useEffect2(() => {
1453
1467
  if (outboundShipping) {
1454
1468
  setCustomOutboundShippingAmount({
@@ -1458,7 +1472,7 @@ var ClaimCreateForm = ({
1458
1472
  float: outboundShipping.total
1459
1473
  });
1460
1474
  }
1461
- }, [outboundShipping]);
1475
+ }, [outboundShipping, order.currency_code]);
1462
1476
  const {
1463
1477
  fields: inboundItems,
1464
1478
  append,
@@ -1470,7 +1484,7 @@ var ClaimCreateForm = ({
1470
1484
  });
1471
1485
  const previewItemsMap = useMemo5(
1472
1486
  () => new Map(previewItems.map((i) => [i.id, i])),
1473
- [previewItems, inboundItems]
1487
+ [previewItems]
1474
1488
  );
1475
1489
  useEffect2(() => {
1476
1490
  const existingItemsMap = {};
@@ -1501,7 +1515,14 @@ var ClaimCreateForm = ({
1501
1515
  remove(ind);
1502
1516
  }
1503
1517
  });
1504
- }, [previewItems]);
1518
+ }, [
1519
+ previewItems,
1520
+ inboundItems,
1521
+ remove,
1522
+ inboundPreviewItems,
1523
+ append,
1524
+ update
1525
+ ]);
1505
1526
  useEffect2(() => {
1506
1527
  const inboundShipping2 = preview.shipping_methods.find(
1507
1528
  (s) => !!s.actions?.find((a) => a.action === "SHIPPING_ADD" && !!a.return_id)
@@ -1519,10 +1540,10 @@ var ClaimCreateForm = ({
1519
1540
  } else {
1520
1541
  form.setValue("outbound_option_id", null);
1521
1542
  }
1522
- }, [preview.shipping_methods]);
1543
+ }, [preview.shipping_methods, form]);
1523
1544
  useEffect2(() => {
1524
1545
  form.setValue("location_id", orderReturn?.location_id);
1525
- }, [orderReturn]);
1546
+ }, [orderReturn, form]);
1526
1547
  const showInboundItemsPlaceholder = !inboundPreviewItems.length;
1527
1548
  const showOutboundItemsPlaceholder = !outboundPreviewItems.length;
1528
1549
  const inboundShippingOptionId = form.watch("inbound_option_id");
@@ -1553,19 +1574,21 @@ var ClaimCreateForm = ({
1553
1574
  );
1554
1575
  });
1555
1576
  const onItemsSelected = async () => {
1556
- itemsToAdd2.length && await addInboundItem(
1557
- {
1558
- items: itemsToAdd2.map((id) => ({
1559
- id,
1560
- quantity: 1
1561
- }))
1562
- },
1563
- {
1564
- onError: (error) => {
1565
- toast2.error(error.message);
1577
+ if (itemsToAdd2.length) {
1578
+ await addInboundItem(
1579
+ {
1580
+ items: itemsToAdd2.map((id) => ({
1581
+ id,
1582
+ quantity: 1
1583
+ }))
1584
+ },
1585
+ {
1586
+ onError: (error) => {
1587
+ toast2.error(error.message);
1588
+ }
1566
1589
  }
1567
- }
1568
- );
1590
+ );
1591
+ }
1569
1592
  for (const itemToRemove of itemsToRemove2) {
1570
1593
  const actionId = previewItems.find((i) => i.id === itemToRemove)?.actions?.find((a) => a.action === "RETURN_ITEM")?.id;
1571
1594
  if (actionId) {
@@ -1635,7 +1658,12 @@ var ClaimCreateForm = ({
1635
1658
  );
1636
1659
  }).every(Boolean);
1637
1660
  return !allItemsHaveLocation;
1638
- }, [inboundItems, inventoryMap, locationId]);
1661
+ }, [
1662
+ inboundItems,
1663
+ inventoryMap,
1664
+ locationId,
1665
+ itemsMap
1666
+ ]);
1639
1667
  useEffect2(() => {
1640
1668
  const getInventoryMap = async () => {
1641
1669
  const ret = {};
@@ -1670,7 +1698,7 @@ var ClaimCreateForm = ({
1670
1698
  IS_CANCELING = false;
1671
1699
  }
1672
1700
  };
1673
- }, []);
1701
+ }, [t, cancelClaimRequest]);
1674
1702
  const inboundShippingTotal = useMemo5(() => {
1675
1703
  const method = preview.shipping_methods.find(
1676
1704
  (sm) => !!sm.actions?.find((a) => a.action === "SHIPPING_ADD" && !!a.return_id)
@@ -1695,7 +1723,7 @@ var ClaimCreateForm = ({
1695
1723
  /* @__PURE__ */ jsxs4("div", { className: "mt-8 flex items-center justify-between", children: [
1696
1724
  /* @__PURE__ */ jsx8(Heading2, { level: "h2", children: t("orders.returns.inbound") }),
1697
1725
  /* @__PURE__ */ jsxs4(StackedFocusModal, { id: "inbound-items", children: [
1698
- /* @__PURE__ */ jsx8(StackedFocusModal.Trigger, { asChild: true, children: /* @__PURE__ */ jsx8("a", { className: "focus-visible:shadow-borders-focus transition-fg txt-compact-small-plus cursor-pointer text-blue-500 outline-none hover:text-blue-400", children: t("actions.addItems") }) }),
1726
+ /* @__PURE__ */ jsx8(StackedFocusModal.Trigger, { asChild: true, children: /* @__PURE__ */ jsx8("button", { type: "button", className: "focus-visible:shadow-borders-focus transition-fg txt-compact-small-plus cursor-pointer text-blue-500 outline-none hover:text-blue-400", children: t("actions.addItems") }) }),
1699
1727
  /* @__PURE__ */ jsxs4(StackedFocusModal.Content, { children: [
1700
1728
  /* @__PURE__ */ jsx8(StackedFocusModal.Header, {}),
1701
1729
  /* @__PURE__ */ jsx8(
@@ -1730,6 +1758,7 @@ var ClaimCreateForm = ({
1730
1758
  /* @__PURE__ */ jsx8(
1731
1759
  Button2,
1732
1760
  {
1761
+ tabIndex: 0,
1733
1762
  type: "submit",
1734
1763
  variant: "primary",
1735
1764
  size: "small",
@@ -2193,7 +2222,12 @@ var ClaimCreate = () => {
2193
2222
  }
2194
2223
  }
2195
2224
  run();
2196
- }, [preview]);
2225
+ }, [
2226
+ preview,
2227
+ navigate,
2228
+ t,
2229
+ createClaim
2230
+ ]);
2197
2231
  return /* @__PURE__ */ jsx9(RouteFocusModal, { "data-testid": "order-create-claim-modal", children: claim && preview && order && /* @__PURE__ */ jsx9(
2198
2232
  ClaimCreateForm,
2199
2233
  {
@@ -28,8 +28,8 @@ import "./chunk-FQERBIVS.js";
28
28
  import {
29
29
  _DataTable,
30
30
  useDataTable
31
- } from "./chunk-KLVTWJ4M.js";
32
- import "./chunk-YBZWO4ZV.js";
31
+ } from "./chunk-KYPPQGGE.js";
32
+ import "./chunk-ZMC7BKLT.js";
33
33
  import "./chunk-KAZ5BYTQ.js";
34
34
  import "./chunk-634XVU3D.js";
35
35
  import "./chunk-IQPN4PZJ.js";
@@ -43,8 +43,8 @@ import {
43
43
  } from "./chunk-BDGZ4EQO.js";
44
44
  import "./chunk-LAVHRER2.js";
45
45
  import "./chunk-Y7QKP6QU.js";
46
- import "./chunk-KBYZLKI4.js";
47
- import "./chunk-YWWUOGJA.js";
46
+ import "./chunk-HKDFWQ6Q.js";
47
+ import "./chunk-SESTTUVM.js";
48
48
  import {
49
49
  useQueryParams
50
50
  } from "./chunk-THHRRYRS.js";
@@ -130,7 +130,7 @@ import { useMemo } from "react";
130
130
  import { useTranslation } from "react-i18next";
131
131
  import { jsx } from "react/jsx-runtime";
132
132
  var columnHelper = createColumnHelper();
133
- var useOrderEditItemsTableColumns = (currencyCode) => {
133
+ var useOrderEditItemsTableColumns = (_currencyCode) => {
134
134
  const { t } = useTranslation();
135
135
  return useMemo(
136
136
  () => [
@@ -177,7 +177,7 @@ var useOrderEditItemsTableColumns = (currencyCode) => {
177
177
  header: t("fields.title")
178
178
  })
179
179
  ],
180
- [t, currencyCode]
180
+ [t]
181
181
  );
182
182
  };
183
183
 
@@ -509,7 +509,6 @@ var OrderEditItemsSection = ({
509
509
  };
510
510
  }, [debouncedOnChange]);
511
511
  const filteredItems = useMemo3(() => {
512
- const lowerFilterTerm = filterTerm.toLowerCase();
513
512
  return preview.items.filter(
514
513
  (i) => i.title.toLowerCase().includes(filterTerm) || i.product_title?.toLowerCase().includes(filterTerm)
515
514
  );
@@ -930,7 +929,12 @@ var OrderEditCreate = () => {
930
929
  }
931
930
  }
932
931
  run();
933
- }, [preview]);
932
+ }, [
933
+ preview,
934
+ createOrderEdit,
935
+ navigate,
936
+ t
937
+ ]);
934
938
  return /* @__PURE__ */ jsx6(RouteFocusModal, { "data-testid": "order-edit-create-modal", children: preview && order && /* @__PURE__ */ jsx6(OrderEditCreateForm, { order, preview }) });
935
939
  };
936
940
  export {
@@ -57,8 +57,8 @@ import "./chunk-FQERBIVS.js";
57
57
  import {
58
58
  _DataTable,
59
59
  useDataTable
60
- } from "./chunk-KLVTWJ4M.js";
61
- import "./chunk-YBZWO4ZV.js";
60
+ } from "./chunk-KYPPQGGE.js";
61
+ import "./chunk-ZMC7BKLT.js";
62
62
  import "./chunk-KAZ5BYTQ.js";
63
63
  import "./chunk-634XVU3D.js";
64
64
  import {
@@ -76,8 +76,8 @@ import {
76
76
  } from "./chunk-BDGZ4EQO.js";
77
77
  import "./chunk-LAVHRER2.js";
78
78
  import "./chunk-Y7QKP6QU.js";
79
- import "./chunk-KBYZLKI4.js";
80
- import "./chunk-YWWUOGJA.js";
79
+ import "./chunk-HKDFWQ6Q.js";
80
+ import "./chunk-SESTTUVM.js";
81
81
  import {
82
82
  useQueryParams
83
83
  } from "./chunk-THHRRYRS.js";
@@ -358,7 +358,7 @@ var AddExchangeInboundItemsTable = ({
358
358
  results = filterByDate(results, updated_at, "updated_at");
359
359
  }
360
360
  return results.slice(offset, offset + limit);
361
- }, [items, currencyCode, searchParams]);
361
+ }, [items, searchParams]);
362
362
  const columns = useExchangeItemTableColumns(currencyCode);
363
363
  const filters = useExchangeItemTableFilters();
364
364
  const { table } = useDataTable({
@@ -560,7 +560,7 @@ function ExchangeInboundItem({
560
560
  {
561
561
  control: form.control,
562
562
  name: `inbound_items.${index}.reason_id`,
563
- render: ({ field: { ref, value, onChange, ...field } }) => {
563
+ render: ({ field: { ref: _ref, value, onChange, ...field } }) => {
564
564
  return /* @__PURE__ */ jsxs(Form.Item, { children: [
565
565
  /* @__PURE__ */ jsx3(Form.Control, { children: /* @__PURE__ */ jsx3(
566
566
  Combobox,
@@ -609,7 +609,7 @@ function ExchangeInboundItem({
609
609
  {
610
610
  control: form.control,
611
611
  name: `inbound_items.${index}.note`,
612
- render: ({ field: { ref, ...field } }) => {
612
+ render: ({ field: { ref: _ref, ...field } }) => {
613
613
  return /* @__PURE__ */ jsxs(Form.Item, { children: [
614
614
  /* @__PURE__ */ jsx3(Form.Control, { children: /* @__PURE__ */ jsx3(
615
615
  Input,
@@ -685,7 +685,7 @@ var ExchangeInboundSection = ({
685
685
  () => preview?.items?.filter(
686
686
  (i) => !!i.actions?.find((a) => a.exchange_id === exchange.id)
687
687
  ),
688
- [preview.items]
688
+ [preview.items, exchange.id]
689
689
  );
690
690
  const inboundPreviewItems = previewInboundItems.filter(
691
691
  (item) => !!item.actions?.find((a) => a.action === "RETURN_ITEM")
@@ -722,7 +722,7 @@ var ExchangeInboundSection = ({
722
722
  });
723
723
  const inboundItemsMap = useMemo3(
724
724
  () => new Map(previewInboundItems.map((i) => [i.id, i])),
725
- [previewInboundItems, inboundItems]
725
+ [previewInboundItems]
726
726
  );
727
727
  useEffect(() => {
728
728
  const existingItemsMap = {};
@@ -753,7 +753,14 @@ var ExchangeInboundSection = ({
753
753
  remove(ind);
754
754
  }
755
755
  });
756
- }, [previewInboundItems]);
756
+ }, [
757
+ previewInboundItems,
758
+ inboundPreviewItems,
759
+ append,
760
+ update,
761
+ inboundItems,
762
+ remove
763
+ ]);
757
764
  useEffect(() => {
758
765
  const inboundShippingMethod = preview.shipping_methods.find(
759
766
  (s) => s.actions?.find((a) => a.action === "SHIPPING_ADD" && !!a.return_id)
@@ -766,25 +773,27 @@ var ExchangeInboundSection = ({
766
773
  } else {
767
774
  form.setValue("inbound_option_id", "");
768
775
  }
769
- }, [preview.shipping_methods]);
776
+ }, [preview.shipping_methods, form]);
770
777
  useEffect(() => {
771
778
  form.setValue("location_id", orderReturn?.location_id);
772
- }, [orderReturn]);
779
+ }, [orderReturn, form]);
773
780
  const showInboundItemsPlaceholder = !inboundItems.length;
774
781
  const onItemsSelected = async () => {
775
- itemsToAdd.length && await addInboundItem(
776
- {
777
- items: itemsToAdd.map((id) => ({
778
- id,
779
- quantity: 1
780
- }))
781
- },
782
- {
783
- onError: (error) => {
784
- toast.error(error.message);
782
+ if (itemsToAdd.length) {
783
+ await addInboundItem(
784
+ {
785
+ items: itemsToAdd.map((id) => ({
786
+ id,
787
+ quantity: 1
788
+ }))
789
+ },
790
+ {
791
+ onError: (error) => {
792
+ toast.error(error.message);
793
+ }
785
794
  }
786
- }
787
- );
795
+ );
796
+ }
788
797
  for (const itemToRemove of itemsToRemove) {
789
798
  const actionId = previewInboundItems.find((i) => i.id === itemToRemove)?.actions?.find((a) => a.action === "RETURN_ITEM")?.id;
790
799
  if (actionId) {
@@ -841,7 +850,12 @@ var ExchangeInboundSection = ({
841
850
  );
842
851
  }).every(Boolean);
843
852
  return !allItemsHaveLocation;
844
- }, [inboundItems, inventoryMap, locationId]);
853
+ }, [
854
+ inboundItems,
855
+ inventoryMap,
856
+ locationId,
857
+ itemsMap
858
+ ]);
845
859
  useEffect(() => {
846
860
  const getInventoryMap = async () => {
847
861
  const ret = {};
@@ -866,7 +880,7 @@ var ExchangeInboundSection = ({
866
880
  /* @__PURE__ */ jsxs2("div", { className: "mt-8 flex items-center justify-between", children: [
867
881
  /* @__PURE__ */ jsx4(Heading, { level: "h2", children: t("orders.returns.inbound") }),
868
882
  /* @__PURE__ */ jsxs2(StackedFocusModal, { id: "inbound-items", children: [
869
- /* @__PURE__ */ jsx4(StackedFocusModal.Trigger, { asChild: true, children: /* @__PURE__ */ jsx4("a", { className: "focus-visible:shadow-borders-focus transition-fg txt-compact-small-plus cursor-pointer text-blue-500 outline-none hover:text-blue-400", children: t("actions.addItems") }) }),
883
+ /* @__PURE__ */ jsx4(StackedFocusModal.Trigger, { asChild: true, children: /* @__PURE__ */ jsx4("button", { type: "button", className: "focus-visible:shadow-borders-focus transition-fg txt-compact-small-plus cursor-pointer text-blue-500 outline-none hover:text-blue-400", children: t("actions.addItems") }) }),
870
884
  /* @__PURE__ */ jsxs2(StackedFocusModal.Content, { children: [
871
885
  /* @__PURE__ */ jsx4(StackedFocusModal.Header, {}),
872
886
  /* @__PURE__ */ jsx4(
@@ -891,6 +905,7 @@ var ExchangeInboundSection = ({
891
905
  /* @__PURE__ */ jsx4(
892
906
  Button,
893
907
  {
908
+ tabIndex: 0,
894
909
  type: "submit",
895
910
  variant: "primary",
896
911
  size: "small",
@@ -1053,7 +1068,7 @@ import { useMemo as useMemo4 } from "react";
1053
1068
  import { useTranslation as useTranslation6 } from "react-i18next";
1054
1069
  import { jsx as jsx5 } from "react/jsx-runtime";
1055
1070
  var columnHelper2 = createColumnHelper2();
1056
- var useExchangeOutboundItemTableColumns = (currencyCode) => {
1071
+ var useExchangeOutboundItemTableColumns = (_currencyCode) => {
1057
1072
  const { t } = useTranslation6();
1058
1073
  return useMemo4(
1059
1074
  () => [
@@ -1100,7 +1115,7 @@ var useExchangeOutboundItemTableColumns = (currencyCode) => {
1100
1115
  header: t("fields.title")
1101
1116
  })
1102
1117
  ],
1103
- [t, currencyCode]
1118
+ [t]
1104
1119
  );
1105
1120
  };
1106
1121
 
@@ -1343,7 +1358,7 @@ var ExchangeOutboundSection = ({
1343
1358
  (a) => a.exchange_id === exchange.id && a.action === "ITEM_ADD"
1344
1359
  )
1345
1360
  ),
1346
- [preview.items]
1361
+ [preview.items, exchange.id]
1347
1362
  );
1348
1363
  const variantItemMap = useMemo5(
1349
1364
  () => new Map(order?.items?.map((i) => [i.variant_id, i])),
@@ -1360,7 +1375,7 @@ var ExchangeOutboundSection = ({
1360
1375
  });
1361
1376
  const variantOutboundMap = useMemo5(
1362
1377
  () => new Map(previewOutboundItems.map((i) => [i.variant_id, i])),
1363
- [previewOutboundItems, outboundItems]
1378
+ [previewOutboundItems]
1364
1379
  );
1365
1380
  useEffect2(() => {
1366
1381
  const existingItemsMap = {};
@@ -1390,23 +1405,31 @@ var ExchangeOutboundSection = ({
1390
1405
  remove(ind);
1391
1406
  }
1392
1407
  });
1393
- }, [previewOutboundItems]);
1408
+ }, [
1409
+ previewOutboundItems,
1410
+ remove,
1411
+ outboundItems,
1412
+ update,
1413
+ append
1414
+ ]);
1394
1415
  const locationId = form.watch("location_id");
1395
1416
  const showOutboundItemsPlaceholder = !outboundItems.length;
1396
1417
  const onItemsSelected = async () => {
1397
- itemsToAdd2.length && await addOutboundItem(
1398
- {
1399
- items: itemsToAdd2.map((variantId) => ({
1400
- variant_id: variantId,
1401
- quantity: 1
1402
- }))
1403
- },
1404
- {
1405
- onError: (error) => {
1406
- toast2.error(error.message);
1418
+ if (itemsToAdd2.length) {
1419
+ await addOutboundItem(
1420
+ {
1421
+ items: itemsToAdd2.map((variantId) => ({
1422
+ variant_id: variantId,
1423
+ quantity: 1
1424
+ }))
1425
+ },
1426
+ {
1427
+ onError: (error) => {
1428
+ toast2.error(error.message);
1429
+ }
1407
1430
  }
1408
- }
1409
- );
1431
+ );
1432
+ }
1410
1433
  for (const itemToRemove of itemsToRemove2) {
1411
1434
  const action = previewOutboundItems.find((i) => i.variant_id === itemToRemove)?.actions?.find((a) => a.action === "ITEM_ADD");
1412
1435
  if (action?.id) {
@@ -1428,7 +1451,7 @@ var ExchangeOutboundSection = ({
1428
1451
  } else {
1429
1452
  form.setValue("outbound_option_id", "");
1430
1453
  }
1431
- }, [preview.shipping_methods]);
1454
+ }, [preview.shipping_methods, form]);
1432
1455
  const onShippingOptionChange = async (selectedOptionId) => {
1433
1456
  const outboundShippingMethods = preview.shipping_methods.filter(
1434
1457
  (s) => !!s.actions?.find((a) => a.action === "SHIPPING_ADD" && !a.return_id)
@@ -1470,7 +1493,12 @@ var ExchangeOutboundSection = ({
1470
1493
  );
1471
1494
  }).every(Boolean);
1472
1495
  return !allItemsHaveLocation;
1473
- }, [outboundItems, inventoryMap, locationId]);
1496
+ }, [
1497
+ outboundItems,
1498
+ inventoryMap,
1499
+ locationId,
1500
+ variantItemMap
1501
+ ]);
1474
1502
  useEffect2(() => {
1475
1503
  const getInventoryMap = async () => {
1476
1504
  const ret = {};
@@ -1495,7 +1523,7 @@ var ExchangeOutboundSection = ({
1495
1523
  /* @__PURE__ */ jsxs4("div", { className: "mt-8 flex items-center justify-between", children: [
1496
1524
  /* @__PURE__ */ jsx8(Heading2, { level: "h2", children: t("orders.returns.outbound") }),
1497
1525
  /* @__PURE__ */ jsxs4(StackedFocusModal, { id: "outbound-items", children: [
1498
- /* @__PURE__ */ jsx8(StackedFocusModal.Trigger, { asChild: true, children: /* @__PURE__ */ jsx8("a", { className: "focus-visible:shadow-borders-focus transition-fg txt-compact-small-plus cursor-pointer text-blue-500 outline-none hover:text-blue-400", children: t("actions.addItems") }) }),
1526
+ /* @__PURE__ */ jsx8(StackedFocusModal.Trigger, { asChild: true, children: /* @__PURE__ */ jsx8("button", { type: "button", className: "focus-visible:shadow-borders-focus transition-fg txt-compact-small-plus cursor-pointer text-blue-500 outline-none hover:text-blue-400", children: t("actions.addItems") }) }),
1499
1527
  /* @__PURE__ */ jsxs4(StackedFocusModal.Content, { children: [
1500
1528
  /* @__PURE__ */ jsx8(StackedFocusModal.Header, {}),
1501
1529
  /* @__PURE__ */ jsx8(
@@ -1519,6 +1547,7 @@ var ExchangeOutboundSection = ({
1519
1547
  /* @__PURE__ */ jsx8(
1520
1548
  Button2,
1521
1549
  {
1550
+ tabIndex: 0,
1522
1551
  type: "submit",
1523
1552
  variant: "primary",
1524
1553
  size: "small",
@@ -1644,7 +1673,7 @@ var ExchangeCreateForm = ({
1644
1673
  () => preview?.items?.filter(
1645
1674
  (i) => !!i.actions?.find((a) => a.exchange_id === exchange.id)
1646
1675
  ),
1647
- [preview.items]
1676
+ [preview.items, exchange.id]
1648
1677
  );
1649
1678
  const inboundPreviewItems = previewItems.filter(
1650
1679
  (item) => !!item.actions?.find((a) => a.action === "RETURN_ITEM")
@@ -1761,7 +1790,7 @@ var ExchangeCreateForm = ({
1761
1790
  IS_CANCELING = false;
1762
1791
  }
1763
1792
  };
1764
- }, []);
1793
+ }, [t, cancelExchangeRequest]);
1765
1794
  const inboundShippingTotal = useMemo6(() => {
1766
1795
  const method = preview.shipping_methods.find(
1767
1796
  (sm) => !!sm.actions?.find((a) => a.action === "SHIPPING_ADD" && !!a.return_id)
@@ -2180,7 +2209,12 @@ var ExchangeCreate = () => {
2180
2209
  }
2181
2210
  }
2182
2211
  run();
2183
- }, [preview]);
2212
+ }, [
2213
+ preview,
2214
+ createExchange,
2215
+ navigate,
2216
+ t
2217
+ ]);
2184
2218
  return /* @__PURE__ */ jsx10(RouteFocusModal, { "data-testid": "order-create-exchange-modal", children: exchange && preview && order && /* @__PURE__ */ jsx10(
2185
2219
  ExchangeCreateForm,
2186
2220
  {