@mercurjs/vendor 2.2.0-canary.2 → 2.2.0-canary.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/dist/{[id]-KRLGIVLR.js → [id]-3JICOSAI.js} +133 -41
  2. package/dist/[id]-CR76L5TG.js +3102 -0
  3. package/dist/{[id]-7BAKUHUO.js → [id]-DDGHFRSB.js} +5 -5
  4. package/dist/{[id]-KVWYLDN3.js → [id]-E7DYRMMO.js} +162 -71
  5. package/dist/{[id]-4OBGG7OH.js → [id]-FIP4UMQ4.js} +197 -105
  6. package/dist/{[id]-3EC6HYXL.js → [id]-FZRXOJWL.js} +22 -21
  7. package/dist/{[id]-ZWWMJAKI.js → [id]-PD3ISUL5.js} +7 -7
  8. package/dist/{[id]-UUUQK22M.js → [id]-Q5AXQ5XO.js} +460 -581
  9. package/dist/{[id]-KJIQTFGE.js → [id]-VSNA6SV5.js} +15 -15
  10. package/dist/{[id]-Y2ISCLUD.js → [id]-XUKQKCDN.js} +3 -3
  11. package/dist/{[id]-K2CT7BXQ.js → [id]-YPCO3DJV.js} +1 -1
  12. package/dist/{[id]-LUFRJLAU.js → [id]-ZEFQ7FQQ.js} +36 -33
  13. package/dist/{[id]-COLO4TQJ.js → [id]-ZW7TBWDU.js} +24 -23
  14. package/dist/{[province_id]-H2QAPKVH.js → [province_id]-CHOO7ERP.js} +14 -14
  15. package/dist/{add-FIWTANZX.js → add-GYXNRUAE.js} +40 -37
  16. package/dist/{add-PBZQCIZQ.js → add-IC5R27X3.js} +95 -32
  17. package/dist/{add-customer-groups-RAHCP67U.js → add-customer-groups-KIGBZT5G.js} +20 -23
  18. package/dist/{add-products-N3V2MVLD.js → add-products-ALJVIFXU.js} +23 -22
  19. package/dist/{add-promotions-CSCAJZHV.js → add-promotions-EQ5MMQKG.js} +8 -8
  20. package/dist/{add-to-campaign-DLP7PSQB.js → add-to-campaign-C6JDNB6F.js} +4 -4
  21. package/dist/{address-7F5SN7PV.js → address-UKLDTSTP.js} +13 -13
  22. package/dist/{adjust-inventory-SZF4W7LR.js → adjust-inventory-5XPGE44Y.js} +2 -2
  23. package/dist/allocate-items-URVRAFPS.js +685 -0
  24. package/dist/{areas-7Y6BVS5A.js → areas-64VXOFYS.js} +6 -6
  25. package/dist/{attributes-MBZ76HVZ.js → attributes-YQNW5JBY.js} +2 -2
  26. package/dist/{breadcrumb-HND5FFWC.js → breadcrumb-26G7BS3Q.js} +3 -3
  27. package/dist/{breadcrumb-7PURSRTT.js → breadcrumb-2AYN2SV7.js} +12 -12
  28. package/dist/{breadcrumb-ZCG2RHIU.js → breadcrumb-4KKLMVC3.js} +12 -12
  29. package/dist/{breadcrumb-WRG4SITG.js → breadcrumb-4XSHX5RV.js} +13 -13
  30. package/dist/{breadcrumb-QV2IAX7N.js → breadcrumb-E5OF4L2J.js} +2 -2
  31. package/dist/breadcrumb-JC5FUQYF.js +28 -0
  32. package/dist/{breadcrumb-YBBYFQYG.js → breadcrumb-LBO2I4OJ.js} +1 -1
  33. package/dist/breadcrumb-PIDJ23EZ.js +13 -0
  34. package/dist/{breadcrumb-65SAGUUL.js → breadcrumb-RWYEU5JK.js} +3 -3
  35. package/dist/{breadcrumb-VWELWDB2.js → breadcrumb-VXKAO6GP.js} +1 -1
  36. package/dist/{breadcrumb-FLDHJRVY.js → breadcrumb-WMNG4P6C.js} +9 -8
  37. package/dist/{breadcrumb-EDPMEN2P.js → breadcrumb-XPQETVMM.js} +2 -2
  38. package/dist/{campaigns-L6ULR6KR.js → campaigns-4I2T6EDZ.js} +5 -5
  39. package/dist/{categories-FUZQKBXV.js → categories-3P2DRH5V.js} +10 -8
  40. package/dist/{chunk-EZ3JOAUS.js → chunk-22CIYLKO.js} +1 -1
  41. package/dist/{chunk-RZLN2Q6G.js → chunk-247L47JD.js} +1 -1
  42. package/dist/{chunk-SFQKKIHA.js → chunk-27WLUOI2.js} +1 -1
  43. package/dist/{chunk-M7KSRYRI.js → chunk-2ECD67FO.js} +2 -2
  44. package/dist/{chunk-36L54SQQ.js → chunk-2H4FGZ4U.js} +1 -1
  45. package/dist/{chunk-X2FVFUET.js → chunk-2NUZTTBU.js} +27 -8
  46. package/dist/chunk-2OY4NW7L.js +185 -0
  47. package/dist/{chunk-K4X324QP.js → chunk-36WXPGD2.js} +6 -5
  48. package/dist/{chunk-PXYDR7WQ.js → chunk-3BXCPHN6.js} +3 -2
  49. package/dist/chunk-3EDZQSKG.js +33 -0
  50. package/dist/{chunk-2DXNJURE.js → chunk-3L2DVCOC.js} +1 -1
  51. package/dist/chunk-42R54Z2X.js +8 -0
  52. package/dist/{chunk-CNMY5HVP.js → chunk-4EQIJMQT.js} +3 -3
  53. package/dist/{chunk-UAF2S447.js → chunk-4OIOYUQE.js} +3 -3
  54. package/dist/{chunk-UORPTGV2.js → chunk-4R5GESED.js} +10 -14
  55. package/dist/{chunk-WUPJADSO.js → chunk-4RFPRO2W.js} +2 -2
  56. package/dist/chunk-4YWKKCTT.js +32 -0
  57. package/dist/{chunk-XFQJU6FA.js → chunk-5QG6P6EU.js} +1 -1
  58. package/dist/{chunk-N4MVIBFM.js → chunk-5Y6RDTW2.js} +3 -3
  59. package/dist/{chunk-DZIXC7OE.js → chunk-6FLSBL4Q.js} +30 -85
  60. package/dist/{chunk-DVEKYLPV.js → chunk-6QS6IZC6.js} +1 -1
  61. package/dist/chunk-6ZGQ3SOR.js +127 -0
  62. package/dist/{chunk-NXNJQZCP.js → chunk-7FIPNQM2.js} +1 -1
  63. package/dist/{chunk-NSZQERLE.js → chunk-7GGWRJJF.js} +2 -2
  64. package/dist/{chunk-QS6RWIBL.js → chunk-7RGUD6PI.js} +34 -20
  65. package/dist/{chunk-5L2DCA4W.js → chunk-7ZPJGL4C.js} +57 -6
  66. package/dist/{chunk-KD7RYE6R.js → chunk-AG6KIAUD.js} +2 -2
  67. package/dist/{chunk-UCQKXXLD.js → chunk-AKKIZD2P.js} +32 -34
  68. package/dist/chunk-CHBURL76.js +438 -0
  69. package/dist/{chunk-PBD36EZJ.js → chunk-CI4YXVQF.js} +2 -2
  70. package/dist/{chunk-7LBY5JLV.js → chunk-DAV7WS53.js} +1 -1
  71. package/dist/{chunk-6BS2AVGJ.js → chunk-DNXMONCL.js} +6 -6
  72. package/dist/{chunk-TNVYTMBL.js → chunk-E4O5PARZ.js} +4 -4
  73. package/dist/{chunk-L7QKFC5N.js → chunk-E6W57UP3.js} +32 -122
  74. package/dist/chunk-EEBJYXWA.js +15 -0
  75. package/dist/chunk-FP6U6BPH.js +61 -0
  76. package/dist/{chunk-SGR4DMCW.js → chunk-FRYZRBLA.js} +1 -1
  77. package/dist/chunk-FWPGOIFA.js +22 -0
  78. package/dist/chunk-GL7F6NDU.js +30 -0
  79. package/dist/chunk-H7BVANDX.js +407 -0
  80. package/dist/{chunk-FDR22JMM.js → chunk-HFRHHT36.js} +8 -63
  81. package/dist/{chunk-FJUUGFXL.js → chunk-HOUDNM5M.js} +1 -1
  82. package/dist/{chunk-6Y53VZ3C.js → chunk-HZCSJLGH.js} +11 -11
  83. package/dist/chunk-I75SROQZ.js +315 -0
  84. package/dist/{chunk-JQV7CXEC.js → chunk-II3ACSV2.js} +17 -2
  85. package/dist/{chunk-DARJTN4I.js → chunk-IMJ62GAP.js} +10 -5
  86. package/dist/{chunk-PPLC4IKI.js → chunk-IV57G2CB.js} +14 -1
  87. package/dist/{chunk-7SLWXX6L.js → chunk-J434WDD3.js} +5 -6
  88. package/dist/chunk-J6XCRFBW.js +30 -0
  89. package/dist/{chunk-KAZ5BYTQ.js → chunk-KCHYLLVG.js} +6 -4
  90. package/dist/{chunk-YGRTRAWX.js → chunk-KDE4HKH2.js} +1 -0
  91. package/dist/{chunk-GXIAIITP.js → chunk-KZYRC3WR.js} +36 -39
  92. package/dist/chunk-L57USMYC.js +39 -0
  93. package/dist/chunk-LFX6WU4A.js +36 -0
  94. package/dist/{chunk-EROX26D4.js → chunk-LRMWYKSF.js} +1 -1
  95. package/dist/{chunk-LWJF63JW.js → chunk-LTQQRVZG.js} +89 -14
  96. package/dist/chunk-LYYM7H7H.js +59 -0
  97. package/dist/{chunk-NHFEY3EI.js → chunk-M3YUT5AY.js} +2 -2
  98. package/dist/{chunk-H6LZ77GX.js → chunk-MJCL3WID.js} +1 -1
  99. package/dist/{chunk-X4INVIWL.js → chunk-MZRZVLWD.js} +3 -3
  100. package/dist/{chunk-DDH7ULIQ.js → chunk-N6MGVXXQ.js} +1 -1
  101. package/dist/{chunk-QXLRABYH.js → chunk-O7VOGTLX.js} +1 -1
  102. package/dist/{chunk-35G3SZRN.js → chunk-P3SOE76R.js} +1 -1
  103. package/dist/{chunk-PZ44R4AS.js → chunk-P7Q5ZSZD.js} +1 -1
  104. package/dist/{chunk-5ATEALH7.js → chunk-PFJFS3F4.js} +1 -5
  105. package/dist/chunk-POOTMH3K.js +62 -0
  106. package/dist/{chunk-GGWUWT55.js → chunk-QJI4OET7.js} +23 -36
  107. package/dist/{chunk-NJMNYS7G.js → chunk-QS35HWC5.js} +1 -1
  108. package/dist/{chunk-RTBNJQOV.js → chunk-R4JLYNUA.js} +419 -538
  109. package/dist/{chunk-DIW4GRTI.js → chunk-RT3G3GEK.js} +47 -31
  110. package/dist/{chunk-QT7YFHCA.js → chunk-S23FD6FA.js} +12 -0
  111. package/dist/{chunk-U2ZFCAPX.js → chunk-SITRHMZZ.js} +11 -8
  112. package/dist/chunk-SPFLYPY6.js +6 -0
  113. package/dist/{chunk-EIUYXS7E.js → chunk-SZBERGA4.js} +1 -1
  114. package/dist/chunk-T6DSYOY5.js +173 -0
  115. package/dist/{chunk-4LVP635F.js → chunk-TKSKCYM3.js} +128 -126
  116. package/dist/{chunk-QNNJN4H6.js → chunk-TSTUAL6N.js} +59 -0
  117. package/dist/{chunk-LNM2D2I4.js → chunk-TZMNEN7A.js} +7 -6
  118. package/dist/chunk-UM7ZR3VU.js +14 -0
  119. package/dist/{chunk-X22KTLZ7.js → chunk-UO6IX5Y7.js} +1 -1
  120. package/dist/chunk-VCUUITW6.js +35 -0
  121. package/dist/{chunk-LQD232FW.js → chunk-WJ5EU3KW.js} +1 -1
  122. package/dist/{chunk-AIF2KTEE.js → chunk-WKRW5OPL.js} +12 -2
  123. package/dist/{chunk-6YA3C4NB.js → chunk-XBKWFLJG.js} +4 -13
  124. package/dist/{chunk-WBHFU3MG.js → chunk-XJYQ4SW5.js} +2 -2
  125. package/dist/chunk-XQUF3WIS.js +159 -0
  126. package/dist/chunk-YBF45CX5.js +23 -0
  127. package/dist/{chunk-AVOIZO63.js → chunk-YQZBAP3S.js} +4 -2
  128. package/dist/chunk-ZHFFTT3I.js +17 -0
  129. package/dist/{chunk-TODJFRLH.js → chunk-ZHR77OQI.js} +2 -2
  130. package/dist/chunk-ZUHIKMQL.js +353 -0
  131. package/dist/{chunk-44RQ5PTN.js → chunk-ZZIJSTXN.js} +225 -90
  132. package/dist/{collections-YCAAFGSW.js → collections-7M7O23NO.js} +28 -26
  133. package/dist/{configuration-UOSNP45I.js → configuration-5IDQRYJQ.js} +4 -4
  134. package/dist/{configuration-C4IGBNXH.js → configuration-TXRAYMI4.js} +1 -1
  135. package/dist/{create-BJ4OO6LS.js → create-2N73Y6FO.js} +14 -14
  136. package/dist/{create-R7K3ECN6.js → create-3MUVY3UY.js} +1 -1
  137. package/dist/{create-SFU3W3ZH.js → create-6DRXGPYA.js} +1 -1
  138. package/dist/{create-XAD5NMSJ.js → create-6KM5AZCG.js} +20 -20
  139. package/dist/{create-YDDBH4VQ.js → create-A6CPQMMH.js} +27 -26
  140. package/dist/create-B4EWCX7X.js +1798 -0
  141. package/dist/{create-YBF4YGWG.js → create-BHSMHOFN.js} +1 -1
  142. package/dist/{create-XVHOCZHJ.js → create-BVUZWMET.js} +1 -1
  143. package/dist/create-CJEZCYN6.js +1179 -0
  144. package/dist/create-DAVMJNC2.js +1931 -0
  145. package/dist/{create-35MYQPVM.js → create-E4HTVPP7.js} +17 -17
  146. package/dist/{create-JDGM5KXE.js → create-G4TF2M7G.js} +88 -42
  147. package/dist/{create-UQNYMVBM.js → create-LOP7AF5N.js} +6 -6
  148. package/dist/{create-UPYB65PD.js → create-MKFDE32U.js} +1 -1
  149. package/dist/{create-B5ZXTK3K.js → create-NR7ULWQS.js} +37 -34
  150. package/dist/{create-HI5UI2EZ.js → create-SJSLOXOW.js} +31 -26
  151. package/dist/{create-GB3ZA4LH.js → create-SYI6DVKM.js} +4 -4
  152. package/dist/{create-ORXYT74H.js → create-ZAGMLDR4.js} +13 -13
  153. package/dist/create-ZP4LSJYQ.js +216 -0
  154. package/dist/customer-group-add-customers-GTM556QA.js +251 -0
  155. package/dist/customer-group-create-OYHAXX2T.js +140 -0
  156. package/dist/customer-group-detail-KW62TLWA.js +58 -0
  157. package/dist/customer-group-edit-WH7O4N4L.js +137 -0
  158. package/dist/customer-groups-UJFZBZ2B.js +276 -0
  159. package/dist/{customers-ETXVNM3G.js → customers-4WKIFPUU.js} +7 -7
  160. package/dist/{edit-UGEC27HP.js → edit-3EN2H52W.js} +39 -36
  161. package/dist/{edit-ZMERG3L7.js → edit-3VNT35DW.js} +1 -1
  162. package/dist/{edit-ORXS3A2Y.js → edit-6DUTTLEV.js} +1 -1
  163. package/dist/edit-6K3NSVI7.js +103 -0
  164. package/dist/{edit-REDDBLTA.js → edit-6Z6RIJRZ.js} +4 -4
  165. package/dist/{edit-2Q7TRUTL.js → edit-CVSO5CX7.js} +14 -14
  166. package/dist/{edit-ZAHCMF5U.js → edit-FQDSESVI.js} +1 -1
  167. package/dist/edit-GZXLWSTL.js +176 -0
  168. package/dist/edit-LLNKSZR4.js +871 -0
  169. package/dist/{edit-O4JLGKQR.js → edit-MKVDAUA5.js} +1 -1
  170. package/dist/{edit-ZCXUG42Q.js → edit-NDUSRTWY.js} +13 -13
  171. package/dist/{edit-522DG3BY.js → edit-RBREBAQQ.js} +1 -1
  172. package/dist/{edit-Q3UQIOLS.js → edit-RQHOHZR6.js} +1 -1
  173. package/dist/{edit-VKT62KHG.js → edit-SAB6F3ZG.js} +36 -15
  174. package/dist/{edit-C4OCKQVU.js → edit-SM2GHVKW.js} +1 -1
  175. package/dist/{edit-KAKVPHZZ.js → edit-UVY3TEHD.js} +1 -1
  176. package/dist/{edit-SGUY2CCK.js → edit-V7WLYLOQ.js} +16 -16
  177. package/dist/{edit-FKXIQ6ZI.js → edit-XMZSLH4O.js} +16 -16
  178. package/dist/{edit-L5ZZLMAY.js → edit-YTS77SJS.js} +43 -32
  179. package/dist/{edit-budget-L3CCEWNF.js → edit-budget-4JMGEPNF.js} +1 -1
  180. package/dist/{edit-inventory-item-6B7ITDGD.js → edit-inventory-item-G22KFCYY.js} +2 -2
  181. package/dist/{edit-inventory-item-attributes-Y7MQZLXI.js → edit-inventory-item-attributes-RJSM4MEI.js} +2 -2
  182. package/dist/edit-price-K6K2FTMF.js +196 -0
  183. package/dist/edit-stock-6TUSJD5R.js +229 -0
  184. package/dist/fulfillment-VEF6HG6D.js +641 -0
  185. package/dist/{fulfillment-providers-DQAU43JZ.js → fulfillment-providers-VKBWFH45.js} +24 -24
  186. package/dist/index.css +107 -10
  187. package/dist/index.js +302 -183
  188. package/dist/{inventory-KAUVPMPZ.js → inventory-OCIGVZ4V.js} +6 -6
  189. package/dist/{offer-inventory-batch-page-WKCWNDNK.js → inventory-T7BRSFKY.js} +16 -16
  190. package/dist/{invite-CI2P4GF6.js → invite-J6L3Q7MQ.js} +12 -12
  191. package/dist/{invite-Q6EYDZVQ.js → invite-VWNUFOFI.js} +21 -21
  192. package/dist/loader-2EQ4ROTD.js +34 -0
  193. package/dist/loader-HYUC2XZX.js +33 -0
  194. package/dist/{login-KY342RMK.js → login-WOZMCEFY.js} +12 -12
  195. package/dist/{manage-locations-WNHEBS3A.js → manage-locations-R3ASMF5B.js} +1 -1
  196. package/dist/{media-B6ME2WXY.js → media-KIIJ6WSZ.js} +18 -17
  197. package/dist/media-RJHUSBXL.js +315 -0
  198. package/dist/{metadata-WR4RFXO5.js → metadata-45S6CFKY.js} +14 -14
  199. package/dist/{metadata-2CMH4I6U.js → metadata-FCATUWIZ.js} +14 -14
  200. package/dist/{metadata-GWI6R4ES.js → metadata-L5GBBXC4.js} +14 -14
  201. package/dist/{metadata-TLDUF5KV.js → metadata-R4ZRMAO6.js} +14 -14
  202. package/dist/{metadata-NUXUC2JA.js → metadata-RM5VVAOS.js} +14 -14
  203. package/dist/{offer-create-page-4Z6L63BU.js → offer-create-page-DV4JCIL2.js} +190 -195
  204. package/dist/offer-detail-page-TIBYGQBS.js +590 -0
  205. package/dist/offer-variant-detail-page-ORH56HZI.js +421 -0
  206. package/dist/offers-VA63KV3C.js +54 -0
  207. package/dist/{onboarding-43LQQQGQ.js → onboarding-L5RRKT65.js} +12 -12
  208. package/dist/{orders-ZV4D6L2V.js → orders-KKJD6EWZ.js} +27 -27
  209. package/dist/{organization-ZTQGRJWS.js → organization-6YPU2RQP.js} +53 -89
  210. package/dist/{organize-K6QMAMEN.js → organize-LR7FWK2J.js} +3 -3
  211. package/dist/{organize-HNJUHEEG.js → organize-SUG4SGVR.js} +3 -3
  212. package/dist/pages/index.d.ts +40 -16
  213. package/dist/pages/index.js +73 -73
  214. package/dist/{payment-details-64US5XWD.js → payment-details-UVEIHQA5.js} +13 -13
  215. package/dist/{payouts-UXJDTXDL.js → payouts-D4A4CILI.js} +8 -8
  216. package/dist/{price-lists-KBPUVSZI.js → price-lists-WJFXFGEV.js} +10 -10
  217. package/dist/{pricing-DF6C5XK4.js → pricing-QEVR2Z4K.js} +19 -19
  218. package/dist/{offer-pricing-edit-page-4TYGGSOE.js → pricing-XJUUCYL5.js} +24 -18
  219. package/dist/{product-tags-6MZB4W5R.js → product-tags-MW2JMRFY.js} +36 -33
  220. package/dist/{product-types-UUHBV4IZ.js → product-types-XXU7X42K.js} +6 -6
  221. package/dist/product-variant-detail-XZWTSH3H.js +369 -0
  222. package/dist/{product-variant-edit-YYNPHE4L.js → product-variant-edit-A2KO3E7B.js} +41 -44
  223. package/dist/{products-MZBU5MEV.js → products-TZS2OPK3.js} +37 -37
  224. package/dist/{products-IWKTGZS6.js → products-XSXEUKIB.js} +23 -22
  225. package/dist/{professional-details-5T2VS6MM.js → professional-details-ELUEJPOH.js} +13 -13
  226. package/dist/{profile-6XGHAT7H.js → profile-EDVGIBW6.js} +16 -16
  227. package/dist/{promotions-O7U4BTK6.js → promotions-JYO23G6N.js} +8 -8
  228. package/dist/receive-47SMYKIJ.js +578 -0
  229. package/dist/refund-IU7B77FV.js +268 -0
  230. package/dist/{register-N6WOSMLA.js → register-SR2SYX4Q.js} +14 -14
  231. package/dist/{reset-password-EICPAY2N.js → reset-password-N22YRMR3.js} +1 -1
  232. package/dist/{return-reasons-IX3LIOCU.js → return-reasons-POR5YPTF.js} +18 -15
  233. package/dist/{sales-channels-JW3QUYR7.js → sales-channels-ETB6QRRY.js} +8 -8
  234. package/dist/{sales-channels-B6FULRWI.js → sales-channels-YXRRARDL.js} +7 -7
  235. package/dist/{settings-MV53ZZ53.js → settings-MHBYIZ2I.js} +38 -35
  236. package/dist/shipment-ZX6PQ32L.js +241 -0
  237. package/dist/shipping-W4SPR3JO.js +122 -0
  238. package/dist/{shipping-profile-Y4SNEPZX.js → shipping-profile-L5CFXVEE.js} +4 -8
  239. package/dist/{shipping-profiles-2NWKCEJK.js → shipping-profiles-QBJUWXVQ.js} +17 -17
  240. package/dist/{stock-7CSVEJJU.js → stock-FW4DOVFV.js} +14 -14
  241. package/dist/{store-X23G3JCJ.js → store-NWWBV2UO.js} +75 -144
  242. package/dist/{store-closure-P5PD2RSV.js → store-closure-O3CBSOJD.js} +19 -14
  243. package/dist/{store-select-TREPDS3G.js → store-select-C7GI5MKK.js} +13 -13
  244. package/dist/{tax-regions-YXZW7UVX.js → tax-regions-2JCIB4T7.js} +2 -2
  245. package/dist/{team-SPP5OY5W.js → team-MY24J5WO.js} +20 -20
  246. package/package.json +2 -2
  247. package/dist/[id]-LTNOHLGE.js +0 -1219
  248. package/dist/allocate-items-SDFS5GYN.js +0 -533
  249. package/dist/chunk-432S4FGR.js +0 -0
  250. package/dist/chunk-AIZM66CG.js +0 -66
  251. package/dist/chunk-BDZOSMAX.js +0 -23
  252. package/dist/chunk-CFRWIQIZ.js +0 -43
  253. package/dist/chunk-GKZHBXZK.js +0 -426
  254. package/dist/chunk-RXZFEFNV.js +0 -73
  255. package/dist/chunk-T6LHVNWO.js +0 -27
  256. package/dist/chunk-WLT7K7K7.js +0 -63
  257. package/dist/create-FCKGCZSM.js +0 -210
  258. package/dist/edit-GQNIINRR.js +0 -192
  259. package/dist/fulfillment-75Z4H23W.js +0 -559
  260. package/dist/loader-FBB5OQRT.js +0 -31
  261. package/dist/metadata-5BPOBBU2.js +0 -45
  262. package/dist/offer-detail-page-6MAHNNIO.js +0 -488
  263. package/dist/offer-edit-page-DYQFU6JU.js +0 -151
  264. package/dist/offers-ZG6OTDZ2.js +0 -32
  265. package/dist/product-variant-detail-RVWEYVPC.js +0 -220
  266. package/dist/shipment-Q33QBMXX.js +0 -176
@@ -1,533 +0,0 @@
1
- import {
2
- getFulfillableQuantity
3
- } from "./chunk-RXM4B6HR.js";
4
- import "./chunk-TKGWSUEI.js";
5
- import {
6
- KeyboundForm
7
- } from "./chunk-U2ZFCAPX.js";
8
- import {
9
- RouteFocusModal,
10
- useRouteModal
11
- } from "./chunk-GDWBOQI5.js";
12
- import {
13
- Form
14
- } from "./chunk-3QSRE5LS.js";
15
- import {
16
- Thumbnail
17
- } from "./chunk-WIYFXWRI.js";
18
- import {
19
- useStockLocations
20
- } from "./chunk-NBPMNUKZ.js";
21
- import {
22
- ordersQueryKeys,
23
- useCreateReservationItem,
24
- useOrder
25
- } from "./chunk-QS6RWIBL.js";
26
- import "./chunk-QNNJN4H6.js";
27
- import "./chunk-A5DJIOHN.js";
28
- import {
29
- queryClient
30
- } from "./chunk-RHKRREUU.js";
31
- import "./chunk-ZA2KFUFR.js";
32
- import "./chunk-RIN4CBRB.js";
33
- import "./chunk-NBMM2TZK.js";
34
-
35
- // src/pages/orders/[id]/allocate-items/index.tsx
36
- import { useParams } from "react-router-dom";
37
-
38
- // src/pages/orders/[id]/allocate-items/order-create-fulfillment-form/order-allocate-items-form.tsx
39
- import { zodResolver } from "@hookform/resolvers/zod";
40
- import { useEffect, useMemo as useMemo2, useState as useState2 } from "react";
41
- import { useTranslation as useTranslation2 } from "react-i18next";
42
- import { Alert, Button, Heading, Input as Input2, Select, toast } from "@medusajs/ui";
43
- import { useForm, useWatch as useWatch2 } from "react-hook-form";
44
-
45
- // src/pages/orders/[id]/allocate-items/order-create-fulfillment-form/constants.ts
46
- import { z } from "zod";
47
- var AllocateItemsSchema = z.object({
48
- location_id: z.string(),
49
- quantity: z.record(z.string(), z.number().or(z.string()))
50
- });
51
-
52
- // src/pages/orders/[id]/allocate-items/order-create-fulfillment-form/order-allocate-items-item.tsx
53
- import { useMemo, useState } from "react";
54
- import { useTranslation } from "react-i18next";
55
- import {
56
- Component,
57
- ExclamationCircleSolid,
58
- TriangleDownMini
59
- } from "@medusajs/icons";
60
- import { useWatch } from "react-hook-form";
61
- import { Input, Text, clx } from "@medusajs/ui";
62
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
63
- function OrderAllocateItemsItem({
64
- item,
65
- form,
66
- locationId,
67
- onQuantityChange
68
- }) {
69
- const { t } = useTranslation();
70
- const variant = item.variant;
71
- const inventory = item.variant?.inventory || [];
72
- const [isOpen, setIsOpen] = useState(false);
73
- const quantityField = useWatch({
74
- control: form.control,
75
- name: "quantity"
76
- });
77
- const hasInventoryKit = !!variant?.inventory_items && variant.inventory_items.length > 1;
78
- const { availableQuantity, inStockQuantity } = useMemo(() => {
79
- if (!variant || !locationId) {
80
- return {};
81
- }
82
- const locationInventory = inventory[0]?.location_levels?.find(
83
- (inv) => inv.location_id === locationId
84
- );
85
- if (!locationInventory) {
86
- return {};
87
- }
88
- return {
89
- availableQuantity: locationInventory.available_quantity,
90
- inStockQuantity: locationInventory.stocked_quantity
91
- };
92
- }, [variant, locationId, inventory]);
93
- const hasQuantityError = !hasInventoryKit && availableQuantity && item.variant?.inventory?.[0]?.id && quantityField[`${item.id}-${item.variant.inventory[0].id}`] && Number(quantityField[`${item.id}-${item.variant.inventory[0].id}`]) > availableQuantity;
94
- const minValue = 0;
95
- const maxValue = Math.min(
96
- getFulfillableQuantity(item) ?? 0,
97
- availableQuantity || Number.MAX_SAFE_INTEGER
98
- );
99
- return /* @__PURE__ */ jsxs("div", { className: "bg-ui-bg-subtle shadow-elevation-card-rest my-2 min-w-[720px] divide-y divide-dashed rounded-xl", children: [
100
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-x-3 p-3 text-sm", children: [
101
- /* @__PURE__ */ jsx("div", { className: "flex flex-1 items-center", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-x-3", children: [
102
- hasQuantityError && /* @__PURE__ */ jsx(ExclamationCircleSolid, { className: "text-ui-fg-error" }),
103
- /* @__PURE__ */ jsx(Thumbnail, { src: item.thumbnail }),
104
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
105
- /* @__PURE__ */ jsxs("div", { className: "flex flex-row", children: [
106
- /* @__PURE__ */ jsx(Text, { className: "txt-small flex", as: "span", weight: "plus", children: item.product_title }),
107
- item.variant_sku && /* @__PURE__ */ jsxs("span", { className: "text-ui-fg-subtle", children: [
108
- " ",
109
- "(",
110
- item.variant_sku,
111
- ")"
112
- ] }),
113
- hasInventoryKit && /* @__PURE__ */ jsx(Component, { className: "text-ui-fg-muted ml-2 overflow-visible pt-[2px]" })
114
- ] }),
115
- /* @__PURE__ */ jsx(Text, { as: "div", className: "text-ui-fg-subtle txt-small", children: item.title })
116
- ] })
117
- ] }) }),
118
- /* @__PURE__ */ jsxs(
119
- "div",
120
- {
121
- className: clx(
122
- "flex flex-1 items-center gap-x-3",
123
- hasInventoryKit ? "justify-end" : "justify-between"
124
- ),
125
- children: [
126
- !hasInventoryKit && /* @__PURE__ */ jsxs(Fragment, { children: [
127
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
128
- /* @__PURE__ */ jsx("div", { className: "bg-ui-border-strong block h-[12px] w-[1px]" }),
129
- /* @__PURE__ */ jsxs("div", { className: "txt-small flex flex-col", children: [
130
- /* @__PURE__ */ jsx("span", { className: "text-ui-fg-subtle font-medium", children: t("labels.available") }),
131
- /* @__PURE__ */ jsxs("span", { className: "text-ui-fg-muted", children: [
132
- availableQuantity || "-",
133
- availableQuantity && !hasInventoryKit && item.variant?.inventory?.[0]?.id && quantityField[`${item.id}-${item.variant.inventory[0].id}`] && /* @__PURE__ */ jsxs("span", { className: "text-ui-fg-error txt-small ml-1", children: [
134
- "-",
135
- quantityField[`${item.id}-${item.variant.inventory[0].id}`]
136
- ] })
137
- ] })
138
- ] })
139
- ] }),
140
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
141
- /* @__PURE__ */ jsx("div", { className: "bg-ui-border-strong block h-[12px] w-[1px]" }),
142
- /* @__PURE__ */ jsxs("div", { className: "txt-small flex flex-col", children: [
143
- /* @__PURE__ */ jsx("span", { className: "text-ui-fg-subtle font-medium", children: t("labels.inStock") }),
144
- /* @__PURE__ */ jsx("span", { className: "text-ui-fg-muted", children: inStockQuantity || "-" })
145
- ] })
146
- ] })
147
- ] }),
148
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
149
- /* @__PURE__ */ jsx("div", { className: "bg-ui-border-strong block h-[12px] w-[1px]" }),
150
- /* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle txt-small mr-2 flex flex-row items-center gap-2", children: [
151
- /* @__PURE__ */ jsx(
152
- Form.Field,
153
- {
154
- control: form.control,
155
- name: hasInventoryKit && item.variant?.inventory?.[0]?.id ? `quantity.${item.id}-` : `quantity.${item.id}-${item.variant?.inventory?.[0].id}`,
156
- rules: {
157
- required: !hasInventoryKit,
158
- min: !hasInventoryKit ? minValue : void 0,
159
- max: maxValue > 0 ? maxValue : void 0
160
- },
161
- render: ({ field }) => {
162
- return /* @__PURE__ */ jsx(Form.Item, { children: /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
163
- Input,
164
- {
165
- className: "bg-ui-bg-base txt-small w-[46px] rounded-lg text-right [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
166
- type: "number",
167
- ...field,
168
- disabled: !locationId,
169
- onChange: (e) => {
170
- const val = e.target.value === "" ? null : Number(e.target.value);
171
- const firstInventory = item.variant?.inventory?.[0];
172
- if (firstInventory) {
173
- onQuantityChange(
174
- firstInventory,
175
- item,
176
- hasInventoryKit,
177
- val,
178
- true
179
- );
180
- }
181
- }
182
- }
183
- ) }) });
184
- }
185
- }
186
- ),
187
- " ",
188
- "/ ",
189
- item.quantity,
190
- " ",
191
- t("fields.qty")
192
- ] })
193
- ] })
194
- ]
195
- }
196
- )
197
- ] }),
198
- hasInventoryKit && /* @__PURE__ */ jsx("div", { className: "px-4 py-2", children: /* @__PURE__ */ jsxs(
199
- "div",
200
- {
201
- onClick: () => setIsOpen((o) => !o),
202
- className: "flex items-center gap-x-2",
203
- children: [
204
- /* @__PURE__ */ jsx(
205
- TriangleDownMini,
206
- {
207
- style: { transform: `rotate(${isOpen ? -90 : 0}deg)` },
208
- className: "text-ui-fg-muted -mt-[1px]"
209
- }
210
- ),
211
- /* @__PURE__ */ jsx("span", { className: "txt-small text-ui-fg-muted cursor-pointer", children: t("orders.allocateItems.consistsOf", {
212
- num: inventory.length
213
- }) })
214
- ]
215
- }
216
- ) }),
217
- isOpen && variant?.inventory?.map((i, ind) => {
218
- const location = i.location_levels?.find(
219
- (l) => l.location_id === locationId
220
- );
221
- const hasQuantityError2 = !!quantityField[`${item.id}-${i.id}`] && location && Number(quantityField[`${item.id}-${i.id}`]) > location.available_quantity;
222
- return /* @__PURE__ */ jsxs("div", { className: "txt-small flex items-center gap-x-3 p-4", children: [
223
- /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-row items-center gap-3", children: [
224
- hasQuantityError2 && /* @__PURE__ */ jsx(ExclamationCircleSolid, { className: "text-ui-fg-error" }),
225
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
226
- /* @__PURE__ */ jsx("span", { className: "text-ui-fg-subtle", children: i?.title ?? i.sku ?? `Inventory Item ${ind + 1}` }),
227
- /* @__PURE__ */ jsx("span", { className: "text-ui-fg-muted", children: t("orders.allocateItems.requires", {
228
- num: variant?.inventory_items?.[ind]?.required_quantity || 0
229
- }) })
230
- ] })
231
- ] }),
232
- /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-row justify-between", children: [
233
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
234
- /* @__PURE__ */ jsx("div", { className: "bg-ui-border-strong block h-[12px] w-[1px]" }),
235
- /* @__PURE__ */ jsxs("div", { className: "txt-small flex flex-col", children: [
236
- /* @__PURE__ */ jsx("span", { className: "text-ui-fg-subtle font-medium", children: t("labels.available") }),
237
- /* @__PURE__ */ jsxs("span", { className: "text-ui-fg-muted", children: [
238
- location?.available_quantity || "-",
239
- location?.available_quantity && quantityField[`${item.id}-${i.id}`] && /* @__PURE__ */ jsxs("span", { className: "text-ui-fg-error txt-small ml-1", children: [
240
- "-",
241
- quantityField[`${item.id}-${i.id}`]
242
- ] })
243
- ] })
244
- ] })
245
- ] }),
246
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
247
- /* @__PURE__ */ jsx("div", { className: "bg-ui-border-strong block h-[12px] w-[1px]" }),
248
- /* @__PURE__ */ jsxs("div", { className: "txt-small flex flex-col", children: [
249
- /* @__PURE__ */ jsx("span", { className: "text-ui-fg-subtle font-medium", children: t("labels.inStock") }),
250
- /* @__PURE__ */ jsx("span", { className: "text-ui-fg-muted", children: location?.stocked_quantity || "-" })
251
- ] })
252
- ] }),
253
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
254
- /* @__PURE__ */ jsx("div", { className: "bg-ui-border-strong block h-[12px] w-[1px]" }),
255
- /* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle txt-small mr-1 flex flex-row items-center gap-2", children: [
256
- /* @__PURE__ */ jsx(
257
- Form.Field,
258
- {
259
- control: form.control,
260
- name: `quantity.${item.id}-${i.id}`,
261
- rules: {
262
- required: true,
263
- min: 0,
264
- max: location?.available_quantity
265
- },
266
- render: ({ field }) => {
267
- return /* @__PURE__ */ jsx(Form.Item, { children: /* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
268
- Input,
269
- {
270
- className: "bg-ui-bg-base txt-small w-[46px] rounded-lg text-right [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
271
- type: "number",
272
- ...field,
273
- disabled: !locationId,
274
- onChange: (e) => {
275
- const val = e.target.value === "" ? null : Number(e.target.value);
276
- onQuantityChange(
277
- i,
278
- item,
279
- hasInventoryKit,
280
- val
281
- );
282
- }
283
- }
284
- ) }) });
285
- }
286
- }
287
- ),
288
- "/",
289
- " ",
290
- item.quantity * (variant.inventory_items?.[ind]?.required_quantity ?? 0),
291
- " ",
292
- t("fields.qty")
293
- ] })
294
- ] })
295
- ] })
296
- ] }, i.id);
297
- })
298
- ] });
299
- }
300
-
301
- // src/pages/orders/[id]/allocate-items/order-create-fulfillment-form/order-allocate-items-form.tsx
302
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
303
- function OrderAllocateItemsForm({ order }) {
304
- const { t } = useTranslation2();
305
- const { handleSuccess } = useRouteModal();
306
- const [disableSubmit, setDisableSubmit] = useState2(false);
307
- const [filterTerm, setFilterTerm] = useState2("");
308
- const { mutateAsync: allocateItems, isPending: isMutating } = useCreateReservationItem();
309
- const itemsToAllocate = useMemo2(
310
- () => order.items.filter(
311
- (item) => item.variant?.manage_inventory && !!item.variant.inventory?.length && item?.quantity - item.detail?.fulfilled_quantity > 0
312
- ),
313
- [order.items]
314
- );
315
- const filteredItems = useMemo2(() => {
316
- return itemsToAllocate.filter(
317
- (i) => i.variant_title?.toLowerCase().includes(filterTerm) || i.product_title?.toLowerCase().includes(filterTerm)
318
- );
319
- }, [itemsToAllocate, filterTerm]);
320
- const form = useForm({
321
- defaultValues: {
322
- location_id: "",
323
- quantity: defaultAllocations(itemsToAllocate)
324
- },
325
- resolver: zodResolver(AllocateItemsSchema)
326
- });
327
- const { stock_locations = [] } = useStockLocations();
328
- const handleSubmit = form.handleSubmit(async (data) => {
329
- try {
330
- const payload = Object.entries(data.quantity).filter(([key]) => !key.endsWith("-")).map(([key, quantity]) => [...key.split("-"), quantity]);
331
- if (payload.some((d) => d[2] === "")) {
332
- form.setError("root.quantityNotAllocated", {
333
- type: "manual",
334
- message: t("orders.allocateItems.error.quantityNotAllocated")
335
- });
336
- return;
337
- }
338
- const promises = payload.map(
339
- ([itemId, inventoryId, quantity]) => allocateItems({
340
- location_id: data.location_id,
341
- inventory_item_id: String(inventoryId),
342
- line_item_id: String(itemId),
343
- quantity: typeof quantity === "string" ? Number(quantity) : quantity
344
- })
345
- );
346
- await Promise.all(promises);
347
- await queryClient.invalidateQueries({
348
- queryKey: ordersQueryKeys.details()
349
- });
350
- handleSuccess(`/orders/${order.id}`);
351
- toast.success(t("general.success"), {
352
- description: t("orders.allocateItems.toast.created")
353
- });
354
- } catch (e) {
355
- toast.error(t("general.error"), {
356
- description: e instanceof Error ? e.message : "An unknown error occurred"
357
- });
358
- }
359
- });
360
- const onQuantityChange = (inventoryItem, lineItem, hasInventoryKit, value, isRoot) => {
361
- let shouldDisableSubmit = false;
362
- const key = isRoot && hasInventoryKit ? `quantity.${lineItem.id}-` : `quantity.${lineItem.id}-${inventoryItem.id}`;
363
- form.setValue(key, value ?? "");
364
- if (value && inventoryItem.location_levels) {
365
- const location = inventoryItem.location_levels.find(
366
- (l) => l.location_id === selectedLocationId
367
- );
368
- if (location) {
369
- if (location.available_quantity < value) {
370
- shouldDisableSubmit = true;
371
- }
372
- }
373
- }
374
- if (hasInventoryKit && !isRoot) {
375
- form.resetField(`quantity.${lineItem.id}-`, { defaultValue: "" });
376
- }
377
- if (hasInventoryKit && isRoot) {
378
- const item = itemsToAllocate.find((i) => i.id === lineItem.id);
379
- if (!item || !item.variant) return;
380
- item.variant.inventory_items?.forEach((ii, ind) => {
381
- const num = value || 0;
382
- const inventory = item.variant?.inventory?.[ind];
383
- if (!inventory) return;
384
- form.setValue(
385
- `quantity.${lineItem.id}-${inventory.id}`,
386
- num * ii.required_quantity
387
- );
388
- if (value && inventory.location_levels) {
389
- const location = inventory.location_levels.find(
390
- (l) => l.location_id === selectedLocationId
391
- );
392
- if (location) {
393
- if (location.available_quantity < value) {
394
- shouldDisableSubmit = true;
395
- }
396
- }
397
- }
398
- });
399
- }
400
- form.clearErrors("root.quantityNotAllocated");
401
- setDisableSubmit(shouldDisableSubmit);
402
- };
403
- const selectedLocationId = useWatch2({
404
- name: "location_id",
405
- control: form.control
406
- });
407
- useEffect(() => {
408
- if (selectedLocationId) {
409
- form.setValue("quantity", defaultAllocations(itemsToAllocate));
410
- }
411
- }, [
412
- selectedLocationId,
413
- form,
414
- itemsToAllocate
415
- ]);
416
- const allocationError = form.formState.errors?.root?.quantityNotAllocated?.message;
417
- return /* @__PURE__ */ jsx2(RouteFocusModal.Form, { form, children: /* @__PURE__ */ jsxs2(
418
- KeyboundForm,
419
- {
420
- onSubmit: handleSubmit,
421
- className: "flex h-full flex-col overflow-hidden",
422
- children: [
423
- /* @__PURE__ */ jsx2(RouteFocusModal.Header, {}),
424
- /* @__PURE__ */ jsx2(RouteFocusModal.Body, { className: "flex h-full w-full flex-col items-center divide-y overflow-y-auto", children: /* @__PURE__ */ jsx2("div", { className: "flex size-full flex-col items-center overflow-auto p-16", children: /* @__PURE__ */ jsx2("div", { className: "flex w-full max-w-[736px] flex-col justify-center px-2 pb-2", children: /* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-8 divide-y divide-dashed", children: [
425
- /* @__PURE__ */ jsx2(Heading, { children: t("orders.allocateItems.title") }),
426
- /* @__PURE__ */ jsxs2("div", { className: "flex-1 divide-y divide-dashed pt-8", children: [
427
- /* @__PURE__ */ jsx2(
428
- Form.Field,
429
- {
430
- control: form.control,
431
- name: "location_id",
432
- render: ({ field: { onChange, ref, ...field } }) => {
433
- return /* @__PURE__ */ jsxs2(Form.Item, { children: [
434
- /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-3", children: [
435
- /* @__PURE__ */ jsxs2("div", { className: "flex-1", children: [
436
- /* @__PURE__ */ jsx2(Form.Label, { children: t("fields.location") }),
437
- /* @__PURE__ */ jsx2(Form.Hint, { children: t("orders.allocateItems.locationDescription") })
438
- ] }),
439
- /* @__PURE__ */ jsx2("div", { className: "flex-1", children: /* @__PURE__ */ jsx2(Form.Control, { children: /* @__PURE__ */ jsxs2(Select, { onValueChange: onChange, ...field, children: [
440
- /* @__PURE__ */ jsx2(
441
- Select.Trigger,
442
- {
443
- className: "bg-ui-bg-base",
444
- ref,
445
- children: /* @__PURE__ */ jsx2(Select.Value, {})
446
- }
447
- ),
448
- /* @__PURE__ */ jsx2(Select.Content, { children: stock_locations.map((l) => /* @__PURE__ */ jsx2(Select.Item, { value: l.id, children: l.name }, l.id)) })
449
- ] }) }) })
450
- ] }),
451
- /* @__PURE__ */ jsx2(Form.ErrorMessage, {})
452
- ] });
453
- }
454
- }
455
- ),
456
- /* @__PURE__ */ jsxs2(Form.Item, { className: "mt-8 pt-8", children: [
457
- /* @__PURE__ */ jsxs2("div", { className: "flex flex-row items-center", children: [
458
- /* @__PURE__ */ jsxs2("div", { className: "flex-1", children: [
459
- /* @__PURE__ */ jsx2(Form.Label, { children: t("orders.allocateItems.itemsToAllocate") }),
460
- /* @__PURE__ */ jsx2(Form.Hint, { children: t("orders.allocateItems.itemsToAllocateDesc") })
461
- ] }),
462
- /* @__PURE__ */ jsx2("div", { className: "flex-1", children: /* @__PURE__ */ jsx2(
463
- Input2,
464
- {
465
- value: filterTerm,
466
- onChange: (e) => setFilterTerm(e.target.value),
467
- placeholder: t("orders.allocateItems.search"),
468
- autoComplete: "off",
469
- type: "search"
470
- }
471
- ) })
472
- ] }),
473
- allocationError && /* @__PURE__ */ jsx2(Alert, { className: "mb-4", dismissible: true, variant: "error", children: allocationError }),
474
- /* @__PURE__ */ jsx2("div", { className: "flex flex-col gap-y-1", children: filteredItems.map((item) => /* @__PURE__ */ jsx2(
475
- OrderAllocateItemsItem,
476
- {
477
- form,
478
- item,
479
- locationId: selectedLocationId,
480
- onQuantityChange
481
- },
482
- item.id
483
- )) })
484
- ] })
485
- ] })
486
- ] }) }) }) }),
487
- /* @__PURE__ */ jsx2(RouteFocusModal.Footer, { children: /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-end gap-x-2", children: [
488
- /* @__PURE__ */ jsx2(RouteFocusModal.Close, { asChild: true, children: /* @__PURE__ */ jsx2(Button, { size: "small", variant: "secondary", children: t("actions.cancel") }) }),
489
- /* @__PURE__ */ jsx2(
490
- Button,
491
- {
492
- size: "small",
493
- type: "submit",
494
- isLoading: isMutating,
495
- disabled: !selectedLocationId || disableSubmit,
496
- children: t("orders.allocateItems.action")
497
- }
498
- )
499
- ] }) })
500
- ]
501
- }
502
- ) });
503
- }
504
- function defaultAllocations(items) {
505
- const ret = {};
506
- items.forEach((item) => {
507
- const hasInventoryKit = (item.variant?.inventory_items?.length || 0) > 1;
508
- ret[hasInventoryKit ? `${item.id}-` : `${item.id}-${item.variant?.inventory?.[0]?.id || ""}`] = "";
509
- if (hasInventoryKit && item.variant?.inventory) {
510
- item.variant.inventory.forEach((i) => {
511
- ret[`${item.id}-${i.id}`] = "";
512
- });
513
- }
514
- });
515
- return ret;
516
- }
517
-
518
- // src/pages/orders/[id]/allocate-items/index.tsx
519
- import { jsx as jsx3 } from "react/jsx-runtime";
520
- var Component2 = () => {
521
- const { id } = useParams();
522
- const { order, isLoading, isError, error } = useOrder(id, {
523
- fields: "currency_code,*items,*items.variant,+items.variant.product.title,*items.variant.inventory,*items.variant.inventory.location_levels,*items.variant.inventory_items,*shipping_address"
524
- });
525
- if (isError) {
526
- throw error;
527
- }
528
- const ready = !isLoading && order;
529
- return /* @__PURE__ */ jsx3(RouteFocusModal, { children: ready && /* @__PURE__ */ jsx3(OrderAllocateItemsForm, { order }) });
530
- };
531
- export {
532
- Component2 as Component
533
- };
File without changes
@@ -1,66 +0,0 @@
1
- import {
2
- useRegions
3
- } from "./chunk-GXIAIITP.js";
4
- import {
5
- useSalesChannels
6
- } from "./chunk-3B34B2M2.js";
7
-
8
- // src/hooks/table/filters/use-order-table-filters.tsx
9
- import { useTranslation } from "react-i18next";
10
- import { useMemo } from "react";
11
- var useOrderTableFilters = () => {
12
- const { t } = useTranslation();
13
- const { regions } = useRegions({
14
- limit: 1e3,
15
- fields: "id,name"
16
- });
17
- const { sales_channels } = useSalesChannels({
18
- limit: 1e3,
19
- fields: "id,name"
20
- });
21
- return useMemo(() => {
22
- let filters = [];
23
- if (regions) {
24
- const regionFilter = {
25
- key: "region_id",
26
- label: t("fields.region"),
27
- type: "select",
28
- options: regions.map((r) => ({
29
- label: r.name,
30
- value: r.id
31
- })),
32
- multiple: true,
33
- searchable: true
34
- };
35
- filters.push(regionFilter);
36
- }
37
- if (sales_channels) {
38
- const salesChannelFilter = {
39
- key: "sales_channel_id",
40
- label: t("fields.salesChannel"),
41
- type: "select",
42
- multiple: true,
43
- searchable: true,
44
- options: sales_channels.map((s) => ({
45
- label: s.name,
46
- value: s.id
47
- }))
48
- };
49
- filters.push(salesChannelFilter);
50
- }
51
- const dateFilters = [
52
- { label: t("fields.createdAt"), key: "created_at" },
53
- { label: t("fields.updatedAt"), key: "updated_at" }
54
- ].map((f) => ({
55
- key: f.key,
56
- label: f.label,
57
- type: "date"
58
- }));
59
- filters.push(...dateFilters);
60
- return filters;
61
- }, [regions, sales_channels, t]);
62
- };
63
-
64
- export {
65
- useOrderTableFilters
66
- };
@@ -1,23 +0,0 @@
1
- // src/pages/categories/common/utils.ts
2
- function getCategoryPath(category) {
3
- if (!category) {
4
- return [];
5
- }
6
- const path = category.parent_category ? getCategoryPath(category.parent_category) : [];
7
- path.push({ id: category.id, name: category.name });
8
- return path;
9
- }
10
- function getCategoryChildren(category) {
11
- if (!category || !category.category_children) {
12
- return [];
13
- }
14
- return category.category_children.map((child) => ({
15
- id: child.id,
16
- name: child.name
17
- }));
18
- }
19
-
20
- export {
21
- getCategoryPath,
22
- getCategoryChildren
23
- };
@@ -1,43 +0,0 @@
1
- import {
2
- useDeleteOffer
3
- } from "./chunk-UORPTGV2.js";
4
-
5
- // src/pages/offers/common/hooks/use-delete-offer-action.tsx
6
- import { toast, usePrompt } from "@medusajs/ui";
7
- import { useTranslation } from "react-i18next";
8
- import { useNavigate } from "react-router-dom";
9
- var useDeleteOfferAction = ({
10
- id,
11
- sku,
12
- redirectOnSuccess = false
13
- }) => {
14
- const { t } = useTranslation();
15
- const navigate = useNavigate();
16
- const prompt = usePrompt();
17
- const { mutateAsync } = useDeleteOffer(id);
18
- return async () => {
19
- const confirmed = await prompt({
20
- title: t("general.areYouSure"),
21
- description: t("offers.delete.description", { sku }),
22
- confirmText: t("actions.delete"),
23
- cancelText: t("actions.cancel"),
24
- variant: "danger"
25
- });
26
- if (!confirmed) return;
27
- await mutateAsync(void 0, {
28
- onSuccess: () => {
29
- toast.success(t("offers.delete.successToast"));
30
- if (redirectOnSuccess) {
31
- navigate("/offers", { replace: true });
32
- }
33
- },
34
- onError: (error) => {
35
- toast.error(error.message);
36
- }
37
- });
38
- };
39
- };
40
-
41
- export {
42
- useDeleteOfferAction
43
- };