@mercurjs/vendor 2.2.0-rc.0 → 2.2.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{[id]-4HO4S2PX.js → [id]-3GF4DR5K.js} +704 -670
- package/dist/{[id]-4LIIFGET.js → [id]-3HIZGJWE.js} +140 -51
- package/dist/{[id]-XP5KEMNX.js → [id]-AXGVRF7M.js} +99 -62
- package/dist/{[id]-N7JEZFXQ.js → [id]-C7IFTDTJ.js} +4 -3
- package/dist/{[id]-DT5YJVKG.js → [id]-DKF4YEXN.js} +32 -31
- package/dist/{[id]-DCGPICT3.js → [id]-IFWREJVP.js} +37 -36
- package/dist/{[id]-IEBZ6V3W.js → [id]-LJABCC3D.js} +43 -42
- package/dist/{[id]-3LNKC5OJ.js → [id]-MIASQVLP.js} +93 -52
- package/dist/{[id]-U6FKX5UQ.js → [id]-NGB5OLRW.js} +68 -54
- package/dist/{[id]-XB45DY2D.js → [id]-ONBG5DZJ.js} +121 -43
- package/dist/{[id]-CUBGVODE.js → [id]-OV5VX7KD.js} +102 -61
- package/dist/{[id]-5P5LTATX.js → [id]-QWI3RWE6.js} +31 -13
- package/dist/{[id]-AQUUZFRX.js → [id]-RFC2YGFT.js} +142 -44
- package/dist/{[id]-5EECCIRP.js → [id]-VKEADKFV.js} +74 -49
- package/dist/{[location_id]-I4HHUHWY.js → [location_id]-ZG5GZKHC.js} +11 -10
- package/dist/{[province_id]-OYX4MOCF.js → [province_id]-KEDQTW6S.js} +31 -30
- package/dist/{add-RPRJWCYU.js → add-FDIWOFVE.js} +31 -30
- package/dist/{add-3T4GBFMM.js → add-ZIP3VEAV.js} +37 -37
- package/dist/{add-customer-groups-FB5T6PQN.js → add-customer-groups-EJIRM264.js} +25 -25
- package/dist/{add-products-F243SWGD.js → add-products-MW2JYTSJ.js} +30 -30
- package/dist/{add-promotions-TJDK7HLW.js → add-promotions-3BALABRA.js} +7 -7
- package/dist/{add-to-campaign-Q6OAJMUJ.js → add-to-campaign-B7RFNWPF.js} +5 -5
- package/dist/{address-XVBSNMFU.js → address-CP2MSWLA.js} +41 -29
- package/dist/{adjust-inventory-IZLRMQXV.js → adjust-inventory-CQPDV5X7.js} +3 -3
- package/dist/{allocate-items-Q3VALDYT.js → allocate-items-5HHGU3XW.js} +4 -4
- package/dist/{areas-IYGBRCRH.js → areas-XQE3AYPZ.js} +7 -7
- package/dist/{attributes-LGEM2JJW.js → attributes-HU6I723C.js} +2 -2
- package/dist/breadcrumb-3M7RKX5V.js +47 -0
- package/dist/{breadcrumb-WG6TIF4C.js → breadcrumb-4O2P6XRS.js} +5 -3
- package/dist/{breadcrumb-K4HBKZUE.js → breadcrumb-4Z7NR2BO.js} +3 -3
- package/dist/{breadcrumb-BC6XN2SE.js → breadcrumb-4ZZFD3UH.js} +3 -3
- package/dist/{breadcrumb-MOA2DBOE.js → breadcrumb-6VWM2EJF.js} +2 -2
- package/dist/{breadcrumb-YOY6Z36F.js → breadcrumb-75QGQDKN.js} +2 -2
- package/dist/{breadcrumb-FEYGZFJU.js → breadcrumb-C7X6FV2H.js} +3 -3
- package/dist/breadcrumb-EAYZVNKS.js +33 -0
- package/dist/{breadcrumb-H45Z2WNG.js → breadcrumb-FF7H3XPP.js} +4 -4
- package/dist/{breadcrumb-KZPOPXGG.js → breadcrumb-GLBWFHKW.js} +2 -2
- package/dist/{breadcrumb-XEZCMI55.js → breadcrumb-HK53R6S2.js} +2 -2
- package/dist/{breadcrumb-BFNJWOJ4.js → breadcrumb-KV6K64PW.js} +2 -2
- package/dist/{breadcrumb-LEFHXFLT.js → breadcrumb-KZ5TSCXK.js} +3 -3
- package/dist/breadcrumb-TPITDYD7.js +46 -0
- package/dist/{breadcrumb-XGXKCDYS.js → breadcrumb-UVODV3YP.js} +4 -4
- package/dist/{breadcrumb-L262VPBO.js → breadcrumb-WIB5IGST.js} +2 -2
- package/dist/{breadcrumb-BXD3SRM7.js → breadcrumb-X5TTCKIB.js} +2 -2
- package/dist/{campaigns-DZKRNCA4.js → campaigns-JKFMRYZE.js} +6 -6
- package/dist/{categories-JZJA2IBQ.js → categories-2PGWWGP6.js} +7 -7
- package/dist/{chunk-CRYZK4NU.js → chunk-2GVPLCQR.js} +2 -2
- package/dist/{chunk-MJP5V3JN.js → chunk-3IZSQI6K.js} +2 -2
- package/dist/chunk-432S4FGR.js +0 -0
- package/dist/{chunk-HDEOZN2Q.js → chunk-4OQLPIUZ.js} +27 -27
- package/dist/{chunk-JJP6AKMV.js → chunk-4U2BLH45.js} +1 -1
- package/dist/{chunk-WFHGJGCW.js → chunk-4ZWIWI2H.js} +27 -12
- package/dist/{chunk-DSTHXHJ5.js → chunk-52KJSIHS.js} +1358 -1392
- package/dist/{chunk-GSH6ZGI6.js → chunk-54SCBOWD.js} +35 -12
- package/dist/{chunk-MAW6ZT3D.js → chunk-55TS752B.js} +1 -1
- package/dist/{chunk-3ALBZK4M.js → chunk-57ZJ6HTU.js} +18 -4
- package/dist/{chunk-EPRYM3FA.js → chunk-5DKUSZQ7.js} +2 -2
- package/dist/{chunk-L57USMYC.js → chunk-5YZ3G5EZ.js} +1 -1
- package/dist/{chunk-3SH24DGG.js → chunk-656G74I2.js} +2 -2
- package/dist/{chunk-ZLYGEART.js → chunk-65HHU6D3.js} +1 -1
- package/dist/{chunk-ZTOYVPGA.js → chunk-6PSJJHI4.js} +1 -1
- package/dist/{chunk-FCZJAYMM.js → chunk-6RHJFSE3.js} +1 -1
- package/dist/{chunk-W3UHAQCV.js → chunk-7TQNE3E2.js} +1 -1
- package/dist/{chunk-FDKFUIYV.js → chunk-AAKR2CB4.js} +1 -1
- package/dist/{chunk-KTJLJTFO.js → chunk-ASN3XS2R.js} +95 -68
- package/dist/{chunk-UNE4VD5U.js → chunk-B25W27XK.js} +21 -10
- package/dist/{chunk-H6LZ77GX.js → chunk-BEPAXQMU.js} +4 -1
- package/dist/{chunk-PUAWN7SS.js → chunk-BHEU34FL.js} +1 -1
- package/dist/{chunk-634XVU3D.js → chunk-CVXKASWV.js} +2 -2
- package/dist/{chunk-S7NGDLZ3.js → chunk-D6RN3ONJ.js} +3 -3
- package/dist/{chunk-VD27SL7H.js → chunk-DHARUTMI.js} +7 -6
- package/dist/{chunk-6FDPVW7Y.js → chunk-DIAWPVYS.js} +2 -2
- package/dist/{chunk-MT6WOKIW.js → chunk-DREOA2LP.js} +3 -3
- package/dist/{chunk-RILHLBKW.js → chunk-DRKRLQZZ.js} +2 -2
- package/dist/{chunk-IEVN722X.js → chunk-DSY5PNK6.js} +1 -1
- package/dist/{chunk-LXZXXOJ3.js → chunk-DTGEFKK4.js} +14 -1
- package/dist/{chunk-JDNXS37G.js → chunk-E5VLRRZR.js} +2 -2
- package/dist/{chunk-GZ4KTAWS.js → chunk-EPSDO2MJ.js} +1 -1
- package/dist/{chunk-KZQFIPY2.js → chunk-ESXMD6CR.js} +12 -4
- package/dist/{chunk-D76WZZSB.js → chunk-F4ORNDFU.js} +8 -7
- package/dist/{chunk-VE6GRIIN.js → chunk-FV76G2D7.js} +2 -2
- package/dist/{chunk-WBCWER26.js → chunk-G64YUZSL.js} +1 -1
- package/dist/{chunk-Y4PM3IDZ.js → chunk-GGXGKMYK.js} +1 -1
- package/dist/{chunk-7MARNXFG.js → chunk-GHDLST2P.js} +1 -1
- package/dist/{chunk-2NPD4S55.js → chunk-H3PVTKOP.js} +2 -2
- package/dist/{chunk-E6W57UP3.js → chunk-HRUO43BZ.js} +2 -2
- package/dist/{chunk-OYUJYPDF.js → chunk-II3CLUXA.js} +3 -2
- package/dist/{chunk-CUAGC54B.js → chunk-IP6TSKUQ.js} +23 -9
- package/dist/{chunk-KIURBTC4.js → chunk-J2XUEO2E.js} +1 -1
- package/dist/{chunk-QIF4QE7T.js → chunk-K5324KIX.js} +1 -1
- package/dist/{chunk-5BYYDBLS.js → chunk-KGHHGMDU.js} +4 -4
- package/dist/{chunk-QWW6RHZC.js → chunk-KUH5ZX7G.js} +5 -4
- package/dist/{chunk-NTJ3BMOE.js → chunk-L2NJPDUD.js} +1 -1
- package/dist/{chunk-JK4M3ZKY.js → chunk-LFX6R456.js} +5 -5
- package/dist/{chunk-MAVQ636Y.js → chunk-MDFKI2FL.js} +1 -1
- package/dist/{chunk-WFE6CT6M.js → chunk-MDGTQT5D.js} +1 -1
- package/dist/{chunk-ZLHCZ5F2.js → chunk-MR6REQKT.js} +5 -5
- package/dist/{chunk-LWFBBTJ3.js → chunk-N7YRIXJA.js} +22 -11
- package/dist/{chunk-ZQCCVCHB.js → chunk-O72AIZUN.js} +1 -1
- package/dist/{chunk-RPU4UOQK.js → chunk-OATVHDPZ.js} +1 -1
- package/dist/{chunk-JY2XON7H.js → chunk-OCS24TF4.js} +7 -6
- package/dist/{chunk-3TST3EWQ.js → chunk-OQTL7PXK.js} +2 -2
- package/dist/{chunk-V5K6HISS.js → chunk-ORI73OPX.js} +2 -2
- package/dist/{chunk-2KA4TGBQ.js → chunk-OZ2UHCWA.js} +20 -9
- package/dist/{chunk-JTHDMXZV.js → chunk-P27MQBMZ.js} +2 -2
- package/dist/{chunk-4IRQSBA7.js → chunk-P76QYIFF.js} +1 -1
- package/dist/{chunk-5PAUN3PM.js → chunk-P7UBW2EI.js} +3 -3
- package/dist/{chunk-5RMLLTR7.js → chunk-PEXMLTJX.js} +2 -2
- package/dist/chunk-QEFPTNPC.js +81 -0
- package/dist/{chunk-BQHVM46E.js → chunk-RLRWDHME.js} +1 -1
- package/dist/{chunk-7BFQKYCJ.js → chunk-RPMYKDNA.js} +2 -2
- package/dist/{chunk-UX5UYDCY.js → chunk-RSOV55K7.js} +2 -2
- package/dist/{chunk-RTMMO6IU.js → chunk-RZHVUQ7G.js} +25 -13
- package/dist/{chunk-3I6ZAMGN.js → chunk-SFQOECF7.js} +1 -1
- package/dist/{chunk-LQSLDDPT.js → chunk-T35QBLG7.js} +1 -1
- package/dist/{chunk-7EXKHL5L.js → chunk-TDL742KZ.js} +1 -1
- package/dist/{chunk-6Q3J6ZMM.js → chunk-UDPMSL6L.js} +41 -19
- package/dist/{chunk-EDV4MTTT.js → chunk-VQTQILLY.js} +65 -37
- package/dist/{chunk-TPGIMZLI.js → chunk-VR7P4DAZ.js} +1 -1
- package/dist/{chunk-5BQO3YQP.js → chunk-VUWAOX7H.js} +2 -2
- package/dist/{chunk-JR7AABT5.js → chunk-VWPNMEOE.js} +2 -2
- package/dist/{chunk-MVEHWM7K.js → chunk-W34KDYZA.js} +15 -4
- package/dist/{chunk-EAAZV3B7.js → chunk-WJ4KVDFV.js} +24 -12
- package/dist/{chunk-MUGQQY6P.js → chunk-WN2NWWVO.js} +49 -11
- package/dist/chunk-WQTWBXKO.js +23 -0
- package/dist/{chunk-3BXCPHN6.js → chunk-XCHKUSUU.js} +1 -0
- package/dist/{chunk-KG2NUK4J.js → chunk-XEQU2OQP.js} +46 -15
- package/dist/{chunk-AOLE7MBM.js → chunk-XG76XXM2.js} +1 -1
- package/dist/{chunk-O7BGGWW6.js → chunk-XKEYHWBS.js} +5 -5
- package/dist/{chunk-DQ7LZZJX.js → chunk-XQO243HC.js} +24 -13
- package/dist/{chunk-TJKZ5QCJ.js → chunk-XUJUJD2E.js} +3 -3
- package/dist/{chunk-27WLUOI2.js → chunk-Y6S7K3YB.js} +1 -1
- package/dist/{chunk-G6YNCIVF.js → chunk-YAUGB4LD.js} +2 -2
- package/dist/{chunk-WCXFUBEF.js → chunk-YVI3LZ3X.js} +9 -9
- package/dist/{chunk-MNHP6YRC.js → chunk-YVYYOBAE.js} +3 -3
- package/dist/{chunk-3C2T27YW.js → chunk-YXWZT3PX.js} +1 -1
- package/dist/{chunk-QWJTJSIT.js → chunk-ZC2ME3UB.js} +1 -1
- package/dist/{collections-XIHCTMSJ.js → collections-BLDMQOVB.js} +31 -31
- package/dist/{configuration-3GCBMM27.js → configuration-UMRBE5RQ.js} +2 -2
- package/dist/{configuration-FWZTMYXY.js → configuration-YVYVOLSP.js} +4 -4
- package/dist/{create-BV3QDTK2.js → create-3SBSLZQO.js} +3 -3
- package/dist/{create-NF2LPVXA.js → create-3TN2CT6M.js} +2 -2
- package/dist/{create-VL7LDTVE.js → create-3WBHG32J.js} +12 -12
- package/dist/{create-2RGNAVVY.js → create-3ZQFAKYR.js} +27 -27
- package/dist/{create-PJVLJ7T6.js → create-4ZRQVXT5.js} +31 -31
- package/dist/{create-GO7APBBU.js → create-7Z63KA2P.js} +25 -25
- package/dist/{create-N534JQPH.js → create-B4VIR7YP.js} +7 -7
- package/dist/{create-U64NEOEL.js → create-EKDZW233.js} +2 -2
- package/dist/{create-X5SOAPD3.js → create-EMU23LKH.js} +2 -2
- package/dist/{create-RPBHXU32.js → create-FYKFT7TQ.js} +23 -23
- package/dist/{create-32MXB6FD.js → create-NNBIDU4Q.js} +23 -23
- package/dist/{create-FHIFVCSG.js → create-PO2JF7F5.js} +37 -37
- package/dist/{create-NEK6JCKR.js → create-PO3JC6QK.js} +13 -13
- package/dist/{create-YKYLCEAK.js → create-QZVZF3MJ.js} +5 -5
- package/dist/{create-K26SM34L.js → create-T3KSWODJ.js} +2 -2
- package/dist/{create-HEZYB7RF.js → create-TDQISX3H.js} +59 -25
- package/dist/{create-3AMFYYI6.js → create-XORPYXNT.js} +25 -25
- package/dist/{create-AMNH3WXL.js → create-XU35U2HL.js} +36 -32
- package/dist/{create-XLYGW5PN.js → create-ZLYEPOAQ.js} +24 -24
- package/dist/{customer-group-add-customers-2C53NFBJ.js → customer-group-add-customers-UTBBZ6T4.js} +5 -5
- package/dist/{customer-group-create-75QQEQZF.js → customer-group-create-L3H5REVP.js} +2 -2
- package/dist/{customer-group-detail-AOQYYAOG.js → customer-group-detail-WSBXE23J.js} +19 -15
- package/dist/{customer-group-edit-N77RCW6I.js → customer-group-edit-D6FJH5TK.js} +49 -28
- package/dist/{customer-groups-GNFV7VMT.js → customer-groups-TWCYFU3U.js} +37 -16
- package/dist/{customers-HNINO6YL.js → customers-6HDZKARD.js} +7 -7
- package/dist/{edit-UNN3QTEJ.js → edit-2RN3OT27.js} +24 -8
- package/dist/{edit-WEUFBORT.js → edit-5XPDTCB5.js} +25 -25
- package/dist/{edit-TD7QFM4Z.js → edit-CNXA4GKJ.js} +15 -17
- package/dist/{edit-BSD6667Q.js → edit-DCMMX4GW.js} +28 -29
- package/dist/{edit-NHQJLCAK.js → edit-DKUERO2V.js} +2 -2
- package/dist/{edit-I2RJUPWV.js → edit-FF2ZWS6U.js} +3 -3
- package/dist/{edit-3DUCWSLA.js → edit-ISFEI7YX.js} +79 -46
- package/dist/{edit-O65JD54W.js → edit-IVBVZ5NL.js} +6 -6
- package/dist/{edit-IJ6DCBUU.js → edit-K2IP2H25.js} +29 -12
- package/dist/{edit-ZOLSAIKF.js → edit-MUQ37ETA.js} +2 -2
- package/dist/{edit-JB7KVBOL.js → edit-NTTJKLUI.js} +4 -4
- package/dist/{edit-4PWAJ7A3.js → edit-OOY2XGLZ.js} +24 -24
- package/dist/{edit-7SBPHN6P.js → edit-P6YZBA32.js} +24 -8
- package/dist/{edit-3V34KJS2.js → edit-Q7KDO37A.js} +2 -2
- package/dist/{edit-ZGAOUZYP.js → edit-QII5YJ2R.js} +25 -25
- package/dist/{edit-WN2Q3TOX.js → edit-RRA6J5FW.js} +3 -3
- package/dist/{edit-SIKOSSHF.js → edit-Y4XONJJU.js} +23 -23
- package/dist/{edit-ZORE6RUD.js → edit-YDMBLXGU.js} +56 -37
- package/dist/{edit-7CLOJ3UZ.js → edit-YPIJHIGC.js} +37 -37
- package/dist/{edit-budget-D22WMVYR.js → edit-budget-PYPHUJPW.js} +2 -2
- package/dist/{edit-inventory-item-QMYWEBZ3.js → edit-inventory-item-5VBH365V.js} +23 -8
- package/dist/{edit-inventory-item-attributes-HLG6JR6S.js → edit-inventory-item-attributes-RMKG2IRO.js} +2 -2
- package/dist/{edit-price-F7ZWM3FN.js → edit-price-PDS4XN2J.js} +5 -5
- package/dist/{edit-stock-ITAZNHPU.js → edit-stock-UI6HXHJJ.js} +4 -4
- package/dist/extension-targets.d.ts +248 -0
- package/dist/extension-targets.js +1 -0
- package/dist/{fulfillment-U2GRQ6DD.js → fulfillment-6GC3NRFT.js} +33 -24
- package/dist/{fulfillment-providers-CMU2JB5X.js → fulfillment-providers-IND53UPG.js} +28 -28
- package/dist/index.css +24 -12
- package/dist/index.d.ts +2 -0
- package/dist/index.js +257 -230
- package/dist/{inventory-FKEXULLT.js → inventory-BDST2XIX.js} +7 -7
- package/dist/{inventory-4JKLAZ2Q.js → inventory-LSG2IEWD.js} +4 -4
- package/dist/{invite-3R2CEWLN.js → invite-CNJQ27AY.js} +30 -43
- package/dist/{invite-MNAX6EUC.js → invite-DD2G6UUM.js} +27 -27
- package/dist/{loader-MAAMUP2Z.js → loader-BLRQLIJT.js} +13 -11
- package/dist/{loader-HTPUNIOS.js → loader-MJTR2S7V.js} +14 -12
- package/dist/{locations-2VWSMWHL.js → locations-HHP2DZ4N.js} +3 -3
- package/dist/login-FK6ATIQV.js +41 -0
- package/dist/{manage-locations-RWGDXXJQ.js → manage-locations-V2AJVZXA.js} +3 -3
- package/dist/{media-P6WSFHY4.js → media-2Z2UIOQU.js} +27 -27
- package/dist/{media-YB4G5CMV.js → media-T26YU24S.js} +25 -25
- package/dist/{metadata-J447GEBP.js → metadata-3CER2AEK.js} +23 -23
- package/dist/{metadata-6OYHLPLA.js → metadata-BGYWXGMG.js} +23 -23
- package/dist/{metadata-VTQ2CGZX.js → metadata-MSAODJ2T.js} +23 -23
- package/dist/{metadata-5Q6FLVX4.js → metadata-WB37SSTG.js} +23 -23
- package/dist/{metadata-ADXGD4Y6.js → metadata-XS3VAC3N.js} +23 -23
- package/dist/{offer-create-page-ACPKTNHA.js → offer-create-page-QAHHXLLJ.js} +31 -29
- package/dist/{offer-detail-page-S4R4N5GL.js → offer-detail-page-ZLGP4ELR.js} +81 -28
- package/dist/{offer-variant-detail-page-XUMDXZUD.js → offer-variant-detail-page-2A7TRGYS.js} +28 -22
- package/dist/offers-ZBAZOZ7Q.js +54 -0
- package/dist/{onboarding-TUGXFOA6.js → onboarding-XCCZ2TMN.js} +70 -75
- package/dist/orders-VFSDZYOV.js +63 -0
- package/dist/{organization-YIOAVFHN.js → organization-YB45TRUN.js} +25 -25
- package/dist/{organize-OWT5QSJR.js → organize-HQLROEUF.js} +4 -4
- package/dist/{organize-BTA7NJD2.js → organize-T62CDRZC.js} +4 -4
- package/dist/pages/index.d.ts +17 -2
- package/dist/pages/index.js +69 -69
- package/dist/{payment-details-K2XFATEL.js → payment-details-O4EWCOYQ.js} +42 -30
- package/dist/{payouts-K5IDTJV3.js → payouts-7O5W2X5J.js} +8 -8
- package/dist/{price-lists-DNPIPDAW.js → price-lists-5CSCTVWN.js} +9 -9
- package/dist/{pricing-5VUPPNKS.js → pricing-CF3FJP6A.js} +5 -5
- package/dist/{pricing-J5FIDZIY.js → pricing-NHI4NSLA.js} +25 -25
- package/dist/{product-tags-SJYIGXEV.js → product-tags-2TLA7BVO.js} +38 -38
- package/dist/{product-types-4PTJW5DE.js → product-types-LZAMCLGS.js} +7 -7
- package/dist/{product-variant-detail-FO6J3RFA.js → product-variant-detail-UNG6LWDP.js} +27 -26
- package/dist/{product-variant-edit-55TAIBZO.js → product-variant-edit-K5U3JZFW.js} +25 -25
- package/dist/{products-XM57LXJK.js → products-27ASSSVK.js} +43 -42
- package/dist/{products-EQMANSO6.js → products-WJJBC3NI.js} +30 -30
- package/dist/{professional-details-WWZPTXSX.js → professional-details-ZCRAWCXZ.js} +41 -29
- package/dist/{profile-5IADQ727.js → profile-T2QLFLI7.js} +77 -38
- package/dist/{promotions-BYW6TZ5B.js → promotions-E4Z6APSX.js} +9 -9
- package/dist/{receive-MTXKKPKZ.js → receive-QCVCAR3R.js} +6 -6
- package/dist/{refund-3IXGYA7W.js → refund-GAOWE636.js} +74 -50
- package/dist/{register-U5PQZATC.js → register-IKY5DDUR.js} +28 -27
- package/dist/{reset-password-SKUJJLSV.js → reset-password-RMKCQLBX.js} +3 -3
- package/dist/{return-reasons-QDPSIJG3.js → return-reasons-RH6IEU2M.js} +20 -17
- package/dist/{sales-channels-GBSTCWVP.js → sales-channels-C5M2ZA5L.js} +6 -5
- package/dist/{sales-channels-N4NE3FXP.js → sales-channels-ZHYGTRWU.js} +7 -6
- package/dist/{settings-ZUBBFS67.js → settings-5IUDEPUN.js} +42 -42
- package/dist/{shipment-TKSCPC3M.js → shipment-UP2OGESO.js} +23 -23
- package/dist/{shipping-DODEUYOQ.js → shipping-ACK5UOA5.js} +4 -4
- package/dist/{shipping-profile-O4JMJLN7.js → shipping-profile-3US7LC5E.js} +2 -2
- package/dist/shipping-profiles-34432J3C.js +46 -0
- package/dist/{stock-GYK2GHJN.js → stock-VMND7PJY.js} +23 -23
- package/dist/{store-XWOALZ5Q.js → store-BCNSSIO6.js} +130 -60
- package/dist/{store-closure-46B3XZ2I.js → store-closure-QGR3F45Y.js} +23 -23
- package/dist/{store-select-E77E3ZY7.js → store-select-55ZOJGGV.js} +47 -27
- package/dist/{tax-regions-S2LFRTMP.js → tax-regions-RTPVM4IC.js} +11 -8
- package/dist/{team-N2C5JPSU.js → team-DAUWBJAI.js} +32 -31
- package/package.json +21 -16
- package/dist/breadcrumb-ILEAQRW7.js +0 -33
- package/dist/breadcrumb-NZYOCEEM.js +0 -47
- package/dist/breadcrumb-VY5DNTTJ.js +0 -46
- package/dist/chunk-HXGLPDZW.js +0 -34
- package/dist/chunk-KVKO6N4G.js +0 -13
- package/dist/login-YUWOWICV.js +0 -39
- package/dist/offers-OTZJBW43.js +0 -54
- package/dist/orders-PJSJNGZS.js +0 -63
- package/dist/shipping-profiles-4TJ4IH6U.js +0 -46
- /package/dist/{chunk-HFRHHT36.js → chunk-NWU7EGGF.js} +0 -0
|
@@ -9,35 +9,35 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
Form
|
|
11
11
|
} from "./chunk-3QSRE5LS.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-RLRWDHME.js";
|
|
13
|
+
import "./chunk-K5324KIX.js";
|
|
14
|
+
import "./chunk-FV76G2D7.js";
|
|
15
|
+
import "./chunk-GHDLST2P.js";
|
|
16
|
+
import "./chunk-YVYYOBAE.js";
|
|
17
|
+
import "./chunk-L2NJPDUD.js";
|
|
18
|
+
import "./chunk-P7UBW2EI.js";
|
|
19
|
+
import "./chunk-MR6REQKT.js";
|
|
20
|
+
import "./chunk-EPSDO2MJ.js";
|
|
21
|
+
import "./chunk-BHEU34FL.js";
|
|
22
22
|
import {
|
|
23
23
|
useMe,
|
|
24
24
|
useUpdateSellerProfessionalDetails
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-W34KDYZA.js";
|
|
26
|
+
import "./chunk-II3CLUXA.js";
|
|
27
|
+
import "./chunk-XKEYHWBS.js";
|
|
28
|
+
import "./chunk-J2XUEO2E.js";
|
|
29
|
+
import "./chunk-656G74I2.js";
|
|
30
|
+
import "./chunk-VWPNMEOE.js";
|
|
31
|
+
import "./chunk-O72AIZUN.js";
|
|
32
|
+
import "./chunk-VUWAOX7H.js";
|
|
33
|
+
import "./chunk-5DKUSZQ7.js";
|
|
34
|
+
import "./chunk-DIAWPVYS.js";
|
|
35
|
+
import "./chunk-4U2BLH45.js";
|
|
36
|
+
import "./chunk-YAUGB4LD.js";
|
|
37
37
|
import "./chunk-A5DJIOHN.js";
|
|
38
38
|
import "./chunk-RHKRREUU.js";
|
|
39
39
|
import "./chunk-ZA2KFUFR.js";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-DTGEFKK4.js";
|
|
41
41
|
import "./chunk-NBMM2TZK.js";
|
|
42
42
|
|
|
43
43
|
// src/pages/settings/store/professional-details/index.tsx
|
|
@@ -45,11 +45,10 @@ import { Heading } from "@medusajs/ui";
|
|
|
45
45
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
46
46
|
|
|
47
47
|
// src/pages/settings/store/professional-details/store-professional-details-form.tsx
|
|
48
|
-
import { zodResolver } from "@hookform/resolvers/zod";
|
|
49
48
|
import { Button, Input, toast } from "@medusajs/ui";
|
|
50
|
-
import { useForm } from "react-hook-form";
|
|
51
49
|
import { useTranslation } from "react-i18next";
|
|
52
50
|
import * as zod from "zod";
|
|
51
|
+
import { FormExtensionZone, useExtendableForm } from "@mercurjs/dashboard-shared";
|
|
53
52
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
54
53
|
var StoreProfessionalDetailsSchema = zod.object({
|
|
55
54
|
corporate_name: zod.string().optional().or(zod.literal("")),
|
|
@@ -62,13 +61,16 @@ var StoreProfessionalDetailsForm = ({
|
|
|
62
61
|
const { t } = useTranslation();
|
|
63
62
|
const { handleSuccess } = useRouteModal();
|
|
64
63
|
const details = seller.professional_details;
|
|
65
|
-
const form =
|
|
64
|
+
const form = useExtendableForm({
|
|
65
|
+
schema: StoreProfessionalDetailsSchema,
|
|
66
|
+
model: "seller",
|
|
67
|
+
zone: "professional-details",
|
|
68
|
+
data: seller,
|
|
66
69
|
defaultValues: {
|
|
67
70
|
corporate_name: details?.corporate_name ?? "",
|
|
68
71
|
registration_number: details?.registration_number ?? "",
|
|
69
72
|
tax_id: details?.tax_id ?? ""
|
|
70
|
-
}
|
|
71
|
-
resolver: zodResolver(StoreProfessionalDetailsSchema)
|
|
73
|
+
}
|
|
72
74
|
});
|
|
73
75
|
const { mutateAsync, isPending } = useUpdateSellerProfessionalDetails(
|
|
74
76
|
seller.id
|
|
@@ -78,7 +80,8 @@ var StoreProfessionalDetailsForm = ({
|
|
|
78
80
|
{
|
|
79
81
|
corporate_name: values.corporate_name || null,
|
|
80
82
|
registration_number: values.registration_number || null,
|
|
81
|
-
tax_id: values.tax_id || null
|
|
83
|
+
tax_id: values.tax_id || null,
|
|
84
|
+
additional_data: values.additional_data
|
|
82
85
|
},
|
|
83
86
|
{
|
|
84
87
|
onSuccess: () => {
|
|
@@ -135,6 +138,15 @@ var StoreProfessionalDetailsForm = ({
|
|
|
135
138
|
/* @__PURE__ */ jsx(Form.ErrorMessage, {})
|
|
136
139
|
] })
|
|
137
140
|
}
|
|
141
|
+
),
|
|
142
|
+
/* @__PURE__ */ jsx(
|
|
143
|
+
FormExtensionZone,
|
|
144
|
+
{
|
|
145
|
+
model: "seller",
|
|
146
|
+
zone: "professional-details",
|
|
147
|
+
control: form.control,
|
|
148
|
+
data: seller
|
|
149
|
+
}
|
|
138
150
|
)
|
|
139
151
|
] }),
|
|
140
152
|
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
|
|
@@ -22,48 +22,56 @@ import {
|
|
|
22
22
|
import {
|
|
23
23
|
useDocumentDirection
|
|
24
24
|
} from "./chunk-Y7QKP6QU.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-RLRWDHME.js";
|
|
26
|
+
import "./chunk-K5324KIX.js";
|
|
27
|
+
import "./chunk-FV76G2D7.js";
|
|
28
|
+
import "./chunk-GHDLST2P.js";
|
|
29
|
+
import "./chunk-YVYYOBAE.js";
|
|
30
|
+
import "./chunk-L2NJPDUD.js";
|
|
31
|
+
import "./chunk-P7UBW2EI.js";
|
|
32
|
+
import "./chunk-MR6REQKT.js";
|
|
33
|
+
import "./chunk-EPSDO2MJ.js";
|
|
34
|
+
import "./chunk-BHEU34FL.js";
|
|
35
35
|
import {
|
|
36
36
|
useMe,
|
|
37
37
|
useUpdateMe
|
|
38
|
-
} from "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
38
|
+
} from "./chunk-W34KDYZA.js";
|
|
39
|
+
import "./chunk-II3CLUXA.js";
|
|
40
|
+
import "./chunk-XKEYHWBS.js";
|
|
41
|
+
import "./chunk-J2XUEO2E.js";
|
|
42
|
+
import "./chunk-656G74I2.js";
|
|
43
|
+
import "./chunk-VWPNMEOE.js";
|
|
44
|
+
import "./chunk-O72AIZUN.js";
|
|
45
|
+
import "./chunk-VUWAOX7H.js";
|
|
46
|
+
import "./chunk-5DKUSZQ7.js";
|
|
47
|
+
import "./chunk-DIAWPVYS.js";
|
|
48
|
+
import "./chunk-4U2BLH45.js";
|
|
49
|
+
import "./chunk-YAUGB4LD.js";
|
|
50
50
|
import "./chunk-A5DJIOHN.js";
|
|
51
51
|
import "./chunk-RHKRREUU.js";
|
|
52
52
|
import "./chunk-ZA2KFUFR.js";
|
|
53
|
-
import "./chunk-
|
|
53
|
+
import "./chunk-DTGEFKK4.js";
|
|
54
54
|
import "./chunk-NBMM2TZK.js";
|
|
55
55
|
|
|
56
56
|
// src/pages/settings/profile/profile-detail/profile-detail.tsx
|
|
57
57
|
import { Children } from "react";
|
|
58
|
+
import { WidgetZone, useExtension as useExtension2 } from "@mercurjs/dashboard-shared";
|
|
58
59
|
|
|
59
60
|
// src/pages/settings/profile/profile-detail/components/profile-general-section/profile-general-section.tsx
|
|
60
61
|
import { PencilSquare } from "@medusajs/icons";
|
|
61
62
|
import { Container, Heading, Text } from "@medusajs/ui";
|
|
62
63
|
import { useTranslation } from "react-i18next";
|
|
64
|
+
import {
|
|
65
|
+
DisplayExtensionZone,
|
|
66
|
+
DisplayField,
|
|
67
|
+
useExtension
|
|
68
|
+
} from "@mercurjs/dashboard-shared";
|
|
63
69
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
64
70
|
var ProfileGeneralSection = () => {
|
|
65
71
|
const { i18n, t } = useTranslation();
|
|
66
|
-
const
|
|
72
|
+
const memberLinks = useExtension().getLinks("member");
|
|
73
|
+
const meQuery = memberLinks.length ? { fields: memberLinks.map((link) => `+member.${link}.*`).join(",") } : void 0;
|
|
74
|
+
const { seller_member } = useMe(meQuery);
|
|
67
75
|
const member = seller_member?.member;
|
|
68
76
|
return /* @__PURE__ */ jsxs(Container, { className: "divide-y p-0", children: [
|
|
69
77
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
@@ -88,25 +96,38 @@ var ProfileGeneralSection = () => {
|
|
|
88
96
|
}
|
|
89
97
|
)
|
|
90
98
|
] }),
|
|
91
|
-
/* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
99
|
+
/* @__PURE__ */ jsx(DisplayField, { model: "member", zone: "general", id: "first_name", data: member, children: /* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
92
100
|
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", weight: "plus", children: t("profile.fields.firstName", "First name") }),
|
|
93
101
|
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", children: member?.first_name || "-" })
|
|
94
|
-
] }),
|
|
95
|
-
/* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
102
|
+
] }) }),
|
|
103
|
+
/* @__PURE__ */ jsx(DisplayField, { model: "member", zone: "general", id: "last_name", data: member, children: /* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
96
104
|
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", weight: "plus", children: t("profile.fields.lastName", "Last name") }),
|
|
97
105
|
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", children: member?.last_name || "-" })
|
|
98
|
-
] }),
|
|
99
|
-
/* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
106
|
+
] }) }),
|
|
107
|
+
/* @__PURE__ */ jsx(DisplayField, { model: "member", zone: "general", id: "language", data: member, children: /* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
100
108
|
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", weight: "plus", children: t("profile.fields.languageLabel") }),
|
|
101
109
|
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", children: languages.find((lang) => lang.code === i18n.language)?.display_name || "-" })
|
|
102
|
-
] })
|
|
110
|
+
] }) }),
|
|
111
|
+
/* @__PURE__ */ jsx(
|
|
112
|
+
DisplayExtensionZone,
|
|
113
|
+
{
|
|
114
|
+
model: "member",
|
|
115
|
+
zone: "general",
|
|
116
|
+
data: member,
|
|
117
|
+
builtInFieldIds: ["first_name", "last_name", "language"]
|
|
118
|
+
}
|
|
119
|
+
)
|
|
103
120
|
] });
|
|
104
121
|
};
|
|
105
122
|
|
|
106
123
|
// src/pages/settings/profile/profile-detail/profile-detail.tsx
|
|
107
124
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
108
125
|
var Root = ({ children }) => {
|
|
109
|
-
|
|
126
|
+
const memberLinks = useExtension2().getLinks("member");
|
|
127
|
+
const meQuery = memberLinks.length ? { fields: memberLinks.map((link) => `+member.${link}.*`).join(",") } : void 0;
|
|
128
|
+
const { seller_member } = useMe(meQuery);
|
|
129
|
+
const member = seller_member?.member;
|
|
130
|
+
return Children.count(children) > 0 ? /* @__PURE__ */ jsx2(SingleColumnPage, { children }) : /* @__PURE__ */ jsx2(SingleColumnPage, { children: /* @__PURE__ */ jsx2(WidgetZone, { id: "profile.detail.main", data: member, children: /* @__PURE__ */ jsx2(ProfileGeneralSection, {}) }) });
|
|
110
131
|
};
|
|
111
132
|
var ProfileDetailPage = Object.assign(Root, {
|
|
112
133
|
GeneralSection: ProfileGeneralSection
|
|
@@ -117,11 +138,14 @@ import { Heading as Heading2 } from "@medusajs/ui";
|
|
|
117
138
|
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
118
139
|
|
|
119
140
|
// src/pages/settings/profile/profile-edit/components/edit-profile-form/edit-profile-form.tsx
|
|
120
|
-
import { zodResolver } from "@hookform/resolvers/zod";
|
|
121
141
|
import { Button, Input, Select, toast } from "@medusajs/ui";
|
|
122
|
-
import { useForm } from "react-hook-form";
|
|
123
142
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
124
143
|
import * as zod from "zod";
|
|
144
|
+
import {
|
|
145
|
+
FormExtensionZone,
|
|
146
|
+
useExtendableForm,
|
|
147
|
+
useExtension as useExtension3
|
|
148
|
+
} from "@mercurjs/dashboard-shared";
|
|
125
149
|
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
126
150
|
var EditProfileSchema = zod.object({
|
|
127
151
|
first_name: zod.string().optional().or(zod.literal("")),
|
|
@@ -132,15 +156,20 @@ var EditProfileForm = () => {
|
|
|
132
156
|
const { t, i18n } = useTranslation2();
|
|
133
157
|
const { handleSuccess } = useRouteModal();
|
|
134
158
|
const direction = useDocumentDirection();
|
|
135
|
-
const
|
|
159
|
+
const memberLinks = useExtension3().getLinks("member");
|
|
160
|
+
const meQuery = memberLinks.length ? { fields: memberLinks.map((link) => `+member.${link}.*`).join(",") } : void 0;
|
|
161
|
+
const { seller_member } = useMe(meQuery);
|
|
136
162
|
const member = seller_member?.member;
|
|
137
|
-
const form =
|
|
163
|
+
const form = useExtendableForm({
|
|
164
|
+
schema: EditProfileSchema,
|
|
165
|
+
model: "member",
|
|
166
|
+
zone: "edit",
|
|
167
|
+
data: member,
|
|
138
168
|
defaultValues: {
|
|
139
169
|
first_name: member?.first_name ?? "",
|
|
140
170
|
last_name: member?.last_name ?? "",
|
|
141
171
|
language: i18n.language
|
|
142
|
-
}
|
|
143
|
-
resolver: zodResolver(EditProfileSchema)
|
|
172
|
+
}
|
|
144
173
|
});
|
|
145
174
|
const sortedLanguages = languages.sort(
|
|
146
175
|
(a, b) => a.display_name.localeCompare(b.display_name)
|
|
@@ -150,7 +179,8 @@ var EditProfileForm = () => {
|
|
|
150
179
|
await updateMe(
|
|
151
180
|
{
|
|
152
181
|
first_name: values.first_name || null,
|
|
153
|
-
last_name: values.last_name || null
|
|
182
|
+
last_name: values.last_name || null,
|
|
183
|
+
additional_data: values.additional_data
|
|
154
184
|
},
|
|
155
185
|
{
|
|
156
186
|
onSuccess: async () => {
|
|
@@ -234,6 +264,15 @@ var EditProfileForm = () => {
|
|
|
234
264
|
] })
|
|
235
265
|
] })
|
|
236
266
|
}
|
|
267
|
+
),
|
|
268
|
+
/* @__PURE__ */ jsx3(
|
|
269
|
+
FormExtensionZone,
|
|
270
|
+
{
|
|
271
|
+
model: "member",
|
|
272
|
+
zone: "edit",
|
|
273
|
+
control: form.control,
|
|
274
|
+
data: member
|
|
275
|
+
}
|
|
237
276
|
)
|
|
238
277
|
] }) }),
|
|
239
278
|
/* @__PURE__ */ jsx3(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-x-2", children: [
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PromotionListPage
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-RZHVUQ7G.js";
|
|
4
|
+
import "./chunk-VR7P4DAZ.js";
|
|
5
|
+
import "./chunk-GGXGKMYK.js";
|
|
6
6
|
import "./chunk-JHIMVLB2.js";
|
|
7
7
|
import "./chunk-S2WEYEQR.js";
|
|
8
8
|
import "./chunk-FMFVTERD.js";
|
|
9
9
|
import "./chunk-DB6ANJBO.js";
|
|
10
10
|
import "./chunk-PHOCVOZ5.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-ESXMD6CR.js";
|
|
12
|
+
import "./chunk-YV6MK4PZ.js";
|
|
12
13
|
import "./chunk-FQERBIVS.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-7TQNE3E2.js";
|
|
14
15
|
import "./chunk-YN3FGNJM.js";
|
|
15
16
|
import "./chunk-KCHYLLVG.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-YV6MK4PZ.js";
|
|
17
|
+
import "./chunk-CVXKASWV.js";
|
|
18
18
|
import "./chunk-THHRRYRS.js";
|
|
19
19
|
import "./chunk-LRD242C7.js";
|
|
20
20
|
import "./chunk-INNFZYX2.js";
|
|
@@ -22,10 +22,10 @@ import "./chunk-BDGZ4EQO.js";
|
|
|
22
22
|
import "./chunk-LAVHRER2.js";
|
|
23
23
|
import "./chunk-QHQWEERJ.js";
|
|
24
24
|
import "./chunk-Y7QKP6QU.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-MR6REQKT.js";
|
|
26
26
|
import "./chunk-RHKRREUU.js";
|
|
27
27
|
import "./chunk-ZA2KFUFR.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-DTGEFKK4.js";
|
|
29
29
|
import "./chunk-NBMM2TZK.js";
|
|
30
30
|
export {
|
|
31
31
|
PromotionListPage
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
useUpdateDismissItem,
|
|
11
11
|
useUpdateReceiveItem,
|
|
12
12
|
useUpdateReturn
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-OQTL7PXK.js";
|
|
14
14
|
import {
|
|
15
15
|
getStylizedAmount
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-XCHKUSUU.js";
|
|
17
17
|
import "./chunk-IQPN4PZJ.js";
|
|
18
18
|
import {
|
|
19
19
|
Combobox
|
|
@@ -34,16 +34,16 @@ import {
|
|
|
34
34
|
} from "./chunk-WIYFXWRI.js";
|
|
35
35
|
import {
|
|
36
36
|
useStockLocations
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-O72AIZUN.js";
|
|
38
38
|
import {
|
|
39
39
|
useOrder,
|
|
40
40
|
useOrderPreview
|
|
41
|
-
} from "./chunk-
|
|
42
|
-
import "./chunk-
|
|
41
|
+
} from "./chunk-DIAWPVYS.js";
|
|
42
|
+
import "./chunk-YAUGB4LD.js";
|
|
43
43
|
import "./chunk-A5DJIOHN.js";
|
|
44
44
|
import "./chunk-RHKRREUU.js";
|
|
45
45
|
import "./chunk-ZA2KFUFR.js";
|
|
46
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-DTGEFKK4.js";
|
|
47
47
|
import "./chunk-NBMM2TZK.js";
|
|
48
48
|
|
|
49
49
|
// src/pages/orders/[id]/returns/[return_id]/receive/index.tsx
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import
|
|
2
|
+
display_id_default
|
|
3
|
+
} from "./chunk-WQTWBXKO.js";
|
|
4
|
+
import {
|
|
5
|
+
getDecimalDigits,
|
|
6
|
+
getLocaleAmount
|
|
7
|
+
} from "./chunk-XCHKUSUU.js";
|
|
8
|
+
import {
|
|
9
|
+
currencies
|
|
10
|
+
} from "./chunk-IQPN4PZJ.js";
|
|
5
11
|
import "./chunk-TKGWSUEI.js";
|
|
6
12
|
import {
|
|
7
13
|
KeyboundForm
|
|
@@ -19,15 +25,15 @@ import {
|
|
|
19
25
|
import {
|
|
20
26
|
useRefundPayment,
|
|
21
27
|
useRefundReasons
|
|
22
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-VUWAOX7H.js";
|
|
23
29
|
import {
|
|
24
30
|
useOrder
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-DIAWPVYS.js";
|
|
32
|
+
import "./chunk-YAUGB4LD.js";
|
|
27
33
|
import "./chunk-A5DJIOHN.js";
|
|
28
34
|
import "./chunk-RHKRREUU.js";
|
|
29
35
|
import "./chunk-ZA2KFUFR.js";
|
|
30
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-DTGEFKK4.js";
|
|
31
37
|
import "./chunk-NBMM2TZK.js";
|
|
32
38
|
|
|
33
39
|
// src/pages/orders/[id]/refund/index.tsx
|
|
@@ -40,23 +46,18 @@ import { useMemo } from "react";
|
|
|
40
46
|
import { useForm } from "react-hook-form";
|
|
41
47
|
import { useTranslation } from "react-i18next";
|
|
42
48
|
import { useSearchParams } from "react-router-dom";
|
|
49
|
+
import { formatValue } from "react-currency-input-field";
|
|
43
50
|
import { z } from "zod";
|
|
44
51
|
import { zodResolver } from "@hookform/resolvers/zod";
|
|
45
52
|
import {
|
|
46
53
|
Button,
|
|
54
|
+
CurrencyInput,
|
|
47
55
|
Heading,
|
|
48
|
-
Input,
|
|
49
56
|
Select,
|
|
50
|
-
Text,
|
|
51
57
|
Textarea,
|
|
52
58
|
toast
|
|
53
59
|
} from "@medusajs/ui";
|
|
54
60
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
55
|
-
var RefundSchema = z.object({
|
|
56
|
-
amount: z.coerce.number().positive(),
|
|
57
|
-
refund_reason_id: z.string().optional(),
|
|
58
|
-
note: z.string().optional()
|
|
59
|
-
});
|
|
60
61
|
var CreateRefundForm = ({ order }) => {
|
|
61
62
|
const { t } = useTranslation();
|
|
62
63
|
const dir = useDocumentDirection();
|
|
@@ -91,22 +92,44 @@ var CreateRefundForm = ({ order }) => {
|
|
|
91
92
|
if (!payment) return 0;
|
|
92
93
|
return Math.max(0, payment.amount - refundedAmount);
|
|
93
94
|
}, [payment, refundedAmount]);
|
|
95
|
+
const currency = useMemo(
|
|
96
|
+
() => currencies[order.currency_code.toUpperCase()],
|
|
97
|
+
[order.currency_code]
|
|
98
|
+
);
|
|
99
|
+
const decimalDigits = getDecimalDigits(order.currency_code);
|
|
100
|
+
const getRoundedAmount = (amount) => amount.toLocaleString("en-US", {
|
|
101
|
+
minimumFractionDigits: decimalDigits,
|
|
102
|
+
maximumFractionDigits: decimalDigits,
|
|
103
|
+
useGrouping: false
|
|
104
|
+
});
|
|
105
|
+
const RefundSchema = useMemo(
|
|
106
|
+
() => z.object({
|
|
107
|
+
amount: z.object({
|
|
108
|
+
value: z.union([z.string(), z.number()]),
|
|
109
|
+
float: z.number().nullable()
|
|
110
|
+
}).refine((v) => v.float !== null && v.float > 0, {
|
|
111
|
+
message: t("orders.payment.enterAmount")
|
|
112
|
+
}),
|
|
113
|
+
refund_reason_id: z.string().optional(),
|
|
114
|
+
note: z.string().optional()
|
|
115
|
+
}),
|
|
116
|
+
[t]
|
|
117
|
+
);
|
|
94
118
|
const refundPayment = useRefundPayment(order.id, paymentId);
|
|
95
119
|
const form = useForm({
|
|
96
120
|
resolver: zodResolver(RefundSchema),
|
|
97
121
|
defaultValues: {
|
|
98
|
-
amount:
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
values: {
|
|
103
|
-
amount: remaining,
|
|
122
|
+
amount: {
|
|
123
|
+
value: getRoundedAmount(remaining),
|
|
124
|
+
float: remaining
|
|
125
|
+
},
|
|
104
126
|
refund_reason_id: void 0,
|
|
105
127
|
note: ""
|
|
106
128
|
}
|
|
107
129
|
});
|
|
108
130
|
const handleSubmit = form.handleSubmit(async (values) => {
|
|
109
|
-
|
|
131
|
+
const amount = values.amount.float ?? 0;
|
|
132
|
+
if (amount > remaining) {
|
|
110
133
|
form.setError("amount", {
|
|
111
134
|
message: t("orders.payment.createRefundWrongQuantity", {
|
|
112
135
|
number: remaining
|
|
@@ -116,7 +139,7 @@ var CreateRefundForm = ({ order }) => {
|
|
|
116
139
|
}
|
|
117
140
|
await refundPayment.mutateAsync(
|
|
118
141
|
{
|
|
119
|
-
amount
|
|
142
|
+
amount,
|
|
120
143
|
refund_reason_id: values.refund_reason_id,
|
|
121
144
|
note: values.note?.trim() ? values.note.trim() : void 0
|
|
122
145
|
},
|
|
@@ -124,7 +147,7 @@ var CreateRefundForm = ({ order }) => {
|
|
|
124
147
|
onSuccess: () => {
|
|
125
148
|
toast.success(
|
|
126
149
|
t("orders.payment.refundPaymentSuccess", {
|
|
127
|
-
amount:
|
|
150
|
+
amount: getLocaleAmount(amount, order.currency_code)
|
|
128
151
|
})
|
|
129
152
|
);
|
|
130
153
|
handleSuccess(`/orders/${order.id}`);
|
|
@@ -140,17 +163,16 @@ var CreateRefundForm = ({ order }) => {
|
|
|
140
163
|
}
|
|
141
164
|
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { onSubmit: handleSubmit, className: "flex flex-1 flex-col", children: [
|
|
142
165
|
/* @__PURE__ */ jsx(RouteDrawer.Body, { children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-y-4", children: [
|
|
143
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
144
|
-
/* @__PURE__ */
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
/* @__PURE__ */ jsx(Text, { size: "small", weight: "plus", children: getStylizedAmount(refundedAmount, order.currency_code) })
|
|
166
|
+
/* @__PURE__ */ jsxs("div", { className: "text-ui-fg-base flex items-center gap-x-1 text-sm", children: [
|
|
167
|
+
/* @__PURE__ */ jsx("span", { children: getLocaleAmount(
|
|
168
|
+
payment.amount,
|
|
169
|
+
order.currency_code
|
|
170
|
+
) }),
|
|
171
|
+
/* @__PURE__ */ jsx("span", { children: "-" }),
|
|
172
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
173
|
+
"(",
|
|
174
|
+
/* @__PURE__ */ jsx(display_id_default, { id: payment.id }),
|
|
175
|
+
")"
|
|
154
176
|
] })
|
|
155
177
|
] }),
|
|
156
178
|
/* @__PURE__ */ jsx(
|
|
@@ -158,26 +180,28 @@ var CreateRefundForm = ({ order }) => {
|
|
|
158
180
|
{
|
|
159
181
|
control: form.control,
|
|
160
182
|
name: "amount",
|
|
161
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form.Item, { children: [
|
|
183
|
+
render: ({ field: { onChange, ...field } }) => /* @__PURE__ */ jsxs(Form.Item, { children: [
|
|
162
184
|
/* @__PURE__ */ jsx(Form.Label, { children: t("fields.amount") }),
|
|
163
185
|
/* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
|
|
164
|
-
|
|
186
|
+
CurrencyInput,
|
|
165
187
|
{
|
|
166
|
-
type: "number",
|
|
167
|
-
step: "0.01",
|
|
168
|
-
min: 0,
|
|
169
|
-
max: remaining,
|
|
170
|
-
"data-testid": "refund-amount-input",
|
|
171
188
|
...field,
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
189
|
+
min: 0,
|
|
190
|
+
placeholder: formatValue({
|
|
191
|
+
value: "0",
|
|
192
|
+
decimalScale: currency.decimal_digits
|
|
193
|
+
}),
|
|
194
|
+
decimalScale: currency.decimal_digits,
|
|
195
|
+
symbol: currency.symbol_native,
|
|
196
|
+
code: currency.code,
|
|
197
|
+
value: field.value.value,
|
|
198
|
+
onValueChange: (_value, _name, values) => onChange({
|
|
199
|
+
value: values?.value ?? "",
|
|
200
|
+
float: values?.float ?? null
|
|
201
|
+
}),
|
|
202
|
+
"data-testid": "refund-amount-input"
|
|
176
203
|
}
|
|
177
204
|
) }),
|
|
178
|
-
/* @__PURE__ */ jsx(Form.Hint, { children: t("orders.payment.refundAmount", {
|
|
179
|
-
amount: getStylizedAmount(remaining, order.currency_code)
|
|
180
|
-
}) }),
|
|
181
205
|
/* @__PURE__ */ jsx(Form.ErrorMessage, {})
|
|
182
206
|
] })
|
|
183
207
|
}
|
|
@@ -224,7 +248,7 @@ var CreateRefundForm = ({ order }) => {
|
|
|
224
248
|
}
|
|
225
249
|
)
|
|
226
250
|
] }) }),
|
|
227
|
-
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
251
|
+
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
|
|
228
252
|
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: t("actions.cancel") }) }),
|
|
229
253
|
/* @__PURE__ */ jsx(
|
|
230
254
|
Button,
|
|
@@ -233,7 +257,7 @@ var CreateRefundForm = ({ order }) => {
|
|
|
233
257
|
type: "submit",
|
|
234
258
|
isLoading: refundPayment.isPending,
|
|
235
259
|
"data-testid": "refund-submit-button",
|
|
236
|
-
children: t("actions.
|
|
260
|
+
children: t("actions.save")
|
|
237
261
|
}
|
|
238
262
|
)
|
|
239
263
|
] }) })
|