@mercurjs/admin 2.3.6-canary.6 → 2.3.6-canary.8
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/{add-campaign-promotions-6OB7BUPK.js → add-campaign-promotions-LGCLOFOD.js} +13 -8
- package/dist/{adjust-inventory-32UZ4BZC.js → adjust-inventory-H46YCNLT.js} +7 -2
- package/dist/{api-key-management-detail-ULNXV7YJ.js → api-key-management-detail-Z4KSJHUC.js} +5 -7
- package/dist/{api-key-management-list-KPWCB7NX.js → api-key-management-list-QZIRPINF.js} +5 -5
- package/dist/{api-key-management-sales-channels-RBK66ZGC.js → api-key-management-sales-channels-RGZ3QITG.js} +9 -7
- package/dist/{attribute-create-UWLP2DZY.js → attribute-create-OFTZRQCO.js} +3 -2
- package/dist/{attribute-detail-7PIMBKEE.js → attribute-detail-WVN5KOH2.js} +13 -7
- package/dist/{attribute-list-FLTRNSFI.js → attribute-list-ZC3CG5LS.js} +6 -6
- package/dist/{campaign-detail-WBWGUSMW.js → campaign-detail-MGDL2TQC.js} +10 -10
- package/dist/{campaign-list-M24QK43I.js → campaign-list-XCO4FJDZ.js} +5 -5
- package/dist/{categories-metadata-6F6EFZRQ.js → categories-metadata-QYH5U77W.js} +2 -2
- package/dist/{category-detail-3YY7FVY4.js → category-detail-FAP76OQB.js} +6 -7
- package/dist/{category-list-AT66O7HI.js → category-list-XDOYTQ4X.js} +5 -5
- package/dist/{category-products-RTOFMB25.js → category-products-35ZZYVWJ.js} +12 -5
- package/dist/{chunk-PH7TEL5B.js → chunk-23CSVCQK.js} +26 -15
- package/dist/{chunk-G4L2EPKT.js → chunk-25TWJMWE.js} +2 -2
- package/dist/{chunk-YJJ6YXFA.js → chunk-26REB3B6.js} +2 -1
- package/dist/{chunk-36C3CNJC.js → chunk-2IOADJUM.js} +27 -9
- package/dist/{chunk-ZH6TIKKW.js → chunk-2MOTQNEG.js} +1 -0
- package/dist/{chunk-4RKWEFNY.js → chunk-2XBNM6TM.js} +2 -2
- package/dist/{chunk-5KTSSLBG.js → chunk-3BKRMIWA.js} +21 -10
- package/dist/chunk-3UOYBH5O.js +8 -0
- package/dist/{chunk-T3AKFW7T.js → chunk-473QGQSA.js} +6 -3
- package/dist/{chunk-FV7B2OWJ.js → chunk-4AOVNA5G.js} +29 -18
- package/dist/{chunk-5LK5NAGN.js → chunk-4J4JAXXQ.js} +5 -3
- package/dist/{chunk-IKAUNMRC.js → chunk-4J74G7N2.js} +15 -3
- package/dist/{chunk-WIDHYDJQ.js → chunk-4JQDYQSX.js} +20 -10
- package/dist/{chunk-QPHY3XXC.js → chunk-4W77EUYY.js} +4 -2
- package/dist/{chunk-VKDZAXLK.js → chunk-5K4WEF2N.js} +19 -8
- package/dist/{chunk-AGO4ROOR.js → chunk-5OIFUF7R.js} +1 -1
- package/dist/{chunk-4CYHJ72Y.js → chunk-5QW3GY37.js} +25 -12
- package/dist/{chunk-BVKPOXLT.js → chunk-72DFLNNI.js} +9 -3
- package/dist/{chunk-X22JPPG6.js → chunk-7GCMYYFL.js} +5 -2
- package/dist/{chunk-AYKMFPKF.js → chunk-7LUKMT5J.js} +4 -2
- package/dist/{chunk-L3GVDREC.js → chunk-7OTRTHLL.js} +4 -2
- package/dist/{chunk-IZ77JV46.js → chunk-AUCCE46Q.js} +6 -3
- package/dist/{chunk-545HIUP3.js → chunk-AW4RL2SA.js} +58 -31
- package/dist/{chunk-62YRQVR7.js → chunk-AZV22U4V.js} +20 -5
- package/dist/{chunk-ZSXF4PEE.js → chunk-CX5XB56X.js} +4 -3
- package/dist/{chunk-J4SYK3RT.js → chunk-DGRHDZQO.js} +15 -5
- package/dist/{chunk-7UHN2CW7.js → chunk-DM52HEOD.js} +1 -1
- package/dist/{chunk-LMBIFEA5.js → chunk-DUKOOIQD.js} +3 -2
- package/dist/{chunk-VM35P6LF.js → chunk-DVFILGNQ.js} +7 -5
- package/dist/{chunk-5H4KS6M3.js → chunk-DWPBJEEM.js} +18 -5
- package/dist/{chunk-B4MSCLHO.js → chunk-E43YJQ2B.js} +42 -18
- package/dist/{chunk-NUMVOUQQ.js → chunk-EHLCUND7.js} +8 -6
- package/dist/{chunk-DBCNRZZE.js → chunk-EIPTLSNT.js} +3 -1
- package/dist/{chunk-7SHPS72O.js → chunk-EVYQCNVT.js} +4 -2
- package/dist/{chunk-VWK3K2CI.js → chunk-FCAJQFYT.js} +30 -10
- package/dist/{chunk-MKVEDGJ2.js → chunk-G63BL5AB.js} +5 -2
- package/dist/{chunk-BZPOERWW.js → chunk-GIV6KSQX.js} +18 -9
- package/dist/{chunk-QOMIRTO4.js → chunk-GQGCXLVP.js} +30 -11
- package/dist/{chunk-GWOZSV7A.js → chunk-GQYB3OOC.js} +105 -62
- package/dist/{chunk-IFG5ONPV.js → chunk-GZUXEIEB.js} +2 -2
- package/dist/{chunk-VOXWLJHA.js → chunk-H3TOETGJ.js} +11 -6
- package/dist/{chunk-B6XGTGMP.js → chunk-H4TJZB26.js} +24 -16
- package/dist/{chunk-AUTG5JEE.js → chunk-HHAM76HD.js} +41 -23
- package/dist/{chunk-XAQLGDAI.js → chunk-HPMMGA5B.js} +1 -1
- package/dist/{chunk-2IPSJDRD.js → chunk-I3RGMOTM.js} +18 -10
- package/dist/{chunk-4OCANHUL.js → chunk-IQRFJO4N.js} +3 -1
- package/dist/{chunk-WJPWYQYV.js → chunk-JFRYC6GK.js} +15 -8
- package/dist/{chunk-FOWWGEP7.js → chunk-JS2DAWKO.js} +9 -6
- package/dist/{chunk-ESVFENTS.js → chunk-K6OBX6ZR.js} +5 -4
- package/dist/{chunk-TN3HCAJ2.js → chunk-KB3BTLIB.js} +4 -2
- package/dist/{chunk-VIHLAFDA.js → chunk-KYOZ4CCY.js} +61 -29
- package/dist/{chunk-UFFLSUK4.js → chunk-LCUAIH7P.js} +4 -2
- package/dist/{chunk-3CLWBE4O.js → chunk-M7VHCFCW.js} +7 -5
- package/dist/{chunk-EVCAR6GP.js → chunk-MAEUKXZ4.js} +8 -5
- package/dist/{chunk-RU5IUJC2.js → chunk-MFGLOUTZ.js} +32 -10
- package/dist/{chunk-HFCJJJKP.js → chunk-MKKOAF2W.js} +26 -12
- package/dist/{chunk-AJCCPN5R.js → chunk-MNKJHZZT.js} +8 -4
- package/dist/{chunk-XV4YW4GE.js → chunk-NDS246VB.js} +20 -12
- package/dist/{chunk-ZPNRNL4X.js → chunk-NHZU2M7Z.js} +6 -4
- package/dist/{chunk-3JXOVOJI.js → chunk-NJ2NRKAJ.js} +55 -12
- package/dist/{chunk-CFQX7HAW.js → chunk-OCDZIJBM.js} +11 -5
- package/dist/{chunk-HBQ7EHHM.js → chunk-OGTWBHJC.js} +1 -1
- package/dist/{chunk-CBLCX5UK.js → chunk-Q2XWHI6K.js} +4 -1
- package/dist/{chunk-YWZQKODL.js → chunk-R55XYG6Y.js} +28 -15
- package/dist/{chunk-UZ2FWDJO.js → chunk-RAD3UMQ3.js} +4 -2
- package/dist/{chunk-WA3UZTKD.js → chunk-RUGB47D3.js} +1 -1
- package/dist/{chunk-ZOU25JF6.js → chunk-SU36MZXC.js} +11 -3
- package/dist/{chunk-SJEMUTO2.js → chunk-SW46WBFA.js} +29 -14
- package/dist/{chunk-NOK2356Y.js → chunk-SZSAJHN7.js} +4 -3
- package/dist/{chunk-QFYTIG3H.js → chunk-TPWSE5HE.js} +14 -9
- package/dist/{chunk-7ECQXPOG.js → chunk-TVCHVG2A.js} +3 -3
- package/dist/{chunk-ZPHVFD4N.js → chunk-TXZWIFWX.js} +1 -0
- package/dist/{chunk-HJACC6KV.js → chunk-UKQ6FES4.js} +6 -3
- package/dist/{chunk-7Y7YN7KG.js → chunk-USEE6QNQ.js} +65 -25
- package/dist/{chunk-JL3NKSLJ.js → chunk-USO2SWZV.js} +9 -4
- package/dist/{chunk-7C7YLUYT.js → chunk-V3UQOU5W.js} +4 -2
- package/dist/{chunk-HUJIVGX3.js → chunk-VD2CKAYG.js} +19 -8
- package/dist/{chunk-D3KEKNYN.js → chunk-VHO6ZXW2.js} +9 -5
- package/dist/{chunk-C4XKPQ6T.js → chunk-VLNTJXXO.js} +16 -3
- package/dist/{chunk-D3RDR3D3.js → chunk-W3LCOK3O.js} +153 -124
- package/dist/{chunk-IAMX7JMM.js → chunk-WD5XBWAN.js} +118 -53
- package/dist/chunk-WSK532ZA.js +236 -0
- package/dist/{chunk-RX7RU7VV.js → chunk-XI4SB5YZ.js} +120 -81
- package/dist/{chunk-KMLQ2ENL.js → chunk-XNGTE2VC.js} +1 -1
- package/dist/{chunk-TXEOM3WC.js → chunk-XUOGIKEE.js} +3 -3
- package/dist/{chunk-R22UAHRF.js → chunk-YDESULL7.js} +3 -1
- package/dist/{chunk-JODADMJ6.js → chunk-YN4KTMRA.js} +7 -5
- package/dist/{chunk-IVWSTXBV.js → chunk-YUKJJHI7.js} +8 -5
- package/dist/{chunk-4EQSS3YZ.js → chunk-Z2FX5GG4.js} +22 -10
- package/dist/{chunk-JQEAWWRP.js → chunk-ZPJOSHV7.js} +23 -12
- package/dist/{chunk-FX7HVGV5.js → chunk-ZQZFY3UY.js} +6 -4
- package/dist/{chunk-U2RBSUMY.js → chunk-ZU76OTV3.js} +2 -2
- package/dist/{collection-add-products-O5ILXKFY.js → collection-add-products-IIBLH7XQ.js} +12 -5
- package/dist/{collection-detail-N7VZKBIJ.js → collection-detail-IYZKDR4L.js} +6 -7
- package/dist/{collection-list-QQJAESFN.js → collection-list-EIDV4DEH.js} +11 -11
- package/dist/{collection-metadata-QUMWZABV.js → collection-metadata-IKYBHHEU.js} +2 -2
- package/dist/{commission-rule-create-CDLLQIY4.js → commission-rule-create-QDNXXBTV.js} +64 -30
- package/dist/{commission-rule-detail-CIE6TPXW.js → commission-rule-detail-QYJIK375.js} +3 -5
- package/dist/{commission-rule-edit-5CFKPI7U.js → commission-rule-edit-HICDPDLK.js} +58 -24
- package/dist/{commissions-list-US6OMDVL.js → commissions-list-AQUW636T.js} +6 -6
- package/dist/{customer-detail-CGKGZE2N.js → customer-detail-TBGKTNQQ.js} +8 -8
- package/dist/{customer-group-add-customers-XYWJSXKS.js → customer-group-add-customers-RWJOA2NJ.js} +3 -3
- package/dist/{customer-group-detail-JMBR3D72.js → customer-group-detail-47IPD337.js} +6 -7
- package/dist/{customer-group-list-GYEQ2GTL.js → customer-group-list-Q2AYIVO4.js} +6 -7
- package/dist/{customer-group-metadata-UQ2SCLOK.js → customer-group-metadata-T3WFBL7U.js} +2 -2
- package/dist/{customer-list-6X6RQDLK.js → customer-list-JOPTF4QB.js} +5 -6
- package/dist/{customer-metadata-UEQSIGLT.js → customer-metadata-YSMWL4L3.js} +2 -2
- package/dist/{customers-add-customer-group-AZYAIQ7E.js → customers-add-customer-group-AVRYBS6Q.js} +13 -6
- package/dist/{edit-inventory-item-ENA2OFSQ.js → edit-inventory-item-7M7Q6HL4.js} +1 -1
- package/dist/{edit-inventory-item-attributes-Z26UDTSH.js → edit-inventory-item-attributes-E7J2WFPF.js} +1 -1
- package/dist/{edit-reservation-W3THLKKK.js → edit-reservation-S3QTQRPY.js} +11 -3
- package/dist/{edit-rules-3DCWA5UF.js → edit-rules-NRF7U4AT.js} +1 -1
- package/dist/{home-RT4EIJFM.js → home-KKOF4FWS.js} +3 -3
- package/dist/index.css +3 -0
- package/dist/index.d.ts +10 -28
- package/dist/index.js +431 -545
- package/dist/{inventory-detail-PMJN4E2D.js → inventory-detail-U6TRGZRY.js} +6 -6
- package/dist/{inventory-list-XS3OFHLW.js → inventory-list-JWA7U2LB.js} +4 -5
- package/dist/{inventory-metadata-OGS7JMZ5.js → inventory-metadata-KO622YEI.js} +2 -2
- package/dist/{inventory-stock-LDBJQCJF.js → inventory-stock-WWXYVFK2.js} +20 -10
- package/dist/{location-detail-DKBNATDD.js → location-detail-27FBZML7.js} +4 -6
- package/dist/{location-fulfillment-providers-JGJOTGMZ.js → location-fulfillment-providers-XTYJWAVP.js} +19 -11
- package/dist/{location-list-JJN42JSH.js → location-list-RMHT36AO.js} +4 -6
- package/dist/{location-sales-channels-FT6TFVXJ.js → location-sales-channels-JB5OIMXE.js} +13 -6
- package/dist/{location-service-zone-create-KPM4RSCF.js → location-service-zone-create-JKAKZCZ2.js} +3 -3
- package/dist/{location-service-zone-manage-areas-NW5JUTCH.js → location-service-zone-manage-areas-K2BMFI5Y.js} +3 -3
- package/dist/{location-service-zone-shipping-option-create-RYAIECRU.js → location-service-zone-shipping-option-create-WJOLO6A3.js} +3 -3
- package/dist/{location-service-zone-shipping-option-edit-UUIR7B5S.js → location-service-zone-shipping-option-edit-I7BJGH76.js} +23 -10
- package/dist/{location-service-zone-shipping-option-pricing-Z5HCXRHG.js → location-service-zone-shipping-option-pricing-47Y3CP4U.js} +36 -12
- package/dist/{login-72TAMW53.js → login-ISNIWXU2.js} +1 -1
- package/dist/{manage-locations-TCMY6A4J.js → manage-locations-5FKFNJQN.js} +13 -2
- package/dist/{marketplace-add-currencies-Z6FUIAU5.js → marketplace-add-currencies-34XKWMI7.js} +33 -9
- package/dist/{marketplace-detail-UYBZIFQW.js → marketplace-detail-A76FTENH.js} +6 -6
- package/dist/{marketplace-edit-G7YNGABC.js → marketplace-edit-KXKUECZQ.js} +61 -30
- package/dist/{marketplace-metadata-2TZTRDRJ.js → marketplace-metadata-364KJG43.js} +2 -2
- package/dist/{offer-detail-page-XU6XK6YR.js → offer-detail-page-BDDDZSPL.js} +19 -8
- package/dist/{offer-variant-detail-page-FVJE5WLV.js → offer-variant-detail-page-HQU4HMZH.js} +4 -5
- package/dist/{offers-RS4UORI3.js → offers-OVX5AAQL.js} +6 -7
- package/dist/{order-create-claim-PPUQXVYH.js → order-create-claim-4ERPSGPD.js} +103 -59
- package/dist/{order-create-edit-QH25BOIU.js → order-create-edit-BGLNMKKI.js} +15 -8
- package/dist/{order-create-exchange-5PCJ25LK.js → order-create-exchange-TOPPZZGS.js} +104 -60
- package/dist/{order-create-refund-ZWMXQGUA.js → order-create-refund-M3K5MZDM.js} +38 -23
- package/dist/{order-create-return-ECGHPLEZ.js → order-create-return-64GZ2LCL.js} +107 -68
- package/dist/{order-detail-XYHRY25Y.js → order-detail-DIUKR6ZJ.js} +7 -7
- package/dist/{order-edit-billing-address-V6QS5DYF.js → order-edit-billing-address-CCRTK5E2.js} +2 -2
- package/dist/{order-edit-email-AGJU7YHU.js → order-edit-email-V45SEUCO.js} +1 -1
- package/dist/{order-edit-shipping-address-TKLEEHOE.js → order-edit-shipping-address-45Z6TNHL.js} +1 -1
- package/dist/{order-list-L2WZX5ED.js → order-list-C7PHMQ64.js} +5 -5
- package/dist/{order-metadata-NVC3A3A5.js → order-metadata-7245QRUQ.js} +2 -2
- package/dist/{order-request-transfer-7EZX5UOQ.js → order-request-transfer-JYPDXCY2.js} +27 -13
- package/dist/pages/index.d.ts +2 -2
- package/dist/pages/index.js +88 -88
- package/dist/{payout-list-WZ6QMJJY.js → payout-list-KILGQ4XP.js} +3 -3
- package/dist/{price-list-create-DRKZIV2D.js → price-list-create-UZRCHVU7.js} +9 -9
- package/dist/{price-list-customer-availability-WU2OGO37.js → price-list-customer-availability-CQY55U4O.js} +31 -14
- package/dist/{price-list-detail-AML5XNDJ.js → price-list-detail-IL7VSABK.js} +6 -7
- package/dist/{price-list-list-FPCLLS33.js → price-list-list-TD5JIO7L.js} +5 -5
- package/dist/{price-list-prices-add-HAYZV2XV.js → price-list-prices-add-DSRYUJUT.js} +8 -8
- package/dist/{price-list-prices-edit-S4V5ACN3.js → price-list-prices-edit-WELHT4O4.js} +18 -9
- package/dist/{product-add-existing-attributes-VWM3LNIO.js → product-add-existing-attributes-RPIHTSCE.js} +7 -5
- package/dist/{product-create-73WXVANY.js → product-create-PMV3LO62.js} +9 -9
- package/dist/{product-detail-ZKQXB7PH.js → product-detail-KVLZYO76.js} +6 -7
- package/dist/{product-edit-attribute-W3AS47FM.js → product-edit-attribute-URHTZ2EQ.js} +9 -3
- package/dist/{product-list-SYMPZR6W.js → product-list-M6B42KCG.js} +6 -7
- package/dist/{product-media-6XS74AU3.js → product-media-R2FIBFR5.js} +2 -2
- package/dist/{product-metadata-GKQUURAL.js → product-metadata-SC5BXN66.js} +2 -2
- package/dist/{product-organization-3PIQ4IY2.js → product-organization-BSPYZYZR.js} +87 -43
- package/dist/{product-sales-channels-PJNEIY4J.js → product-sales-channels-MNAFJKAI.js} +10 -5
- package/dist/{product-shipping-profile-SWB5FK7S.js → product-shipping-profile-G4NCDKSR.js} +25 -11
- package/dist/{product-tag-create-SYOFR5EK.js → product-tag-create-PX7Q2AXU.js} +1 -1
- package/dist/{product-tag-detail-Q3CKJBVX.js → product-tag-detail-LXO43RMB.js} +11 -11
- package/dist/{product-tag-edit-FJPBCFBH.js → product-tag-edit-PXSZMCCT.js} +1 -1
- package/dist/{product-tag-list-BNNJS67H.js → product-tag-list-XWTZGQTT.js} +11 -11
- package/dist/{product-tag-metadata-WQEGISQ5.js → product-tag-metadata-2SO7ICOZ.js} +2 -2
- package/dist/{product-type-detail-WZLA27WI.js → product-type-detail-NO4PKFYQ.js} +6 -7
- package/dist/{product-type-list-PAAE6ZSR.js → product-type-list-JXU3446J.js} +5 -5
- package/dist/{product-type-metadata-WCGB3U4N.js → product-type-metadata-7D3J3NSO.js} +2 -2
- package/dist/{product-variant-detail-7B26FRNG.js → product-variant-detail-VQ55W7PD.js} +3 -5
- package/dist/{product-variant-edit-UC34WTO7.js → product-variant-edit-3WSHMGDI.js} +1 -1
- package/dist/{product-variant-metadata-CTKNNNLM.js → product-variant-metadata-KFLIOCU2.js} +2 -2
- package/dist/{profile-detail-GDQQJUWF.js → profile-detail-SQZ6JFAN.js} +3 -5
- package/dist/{profile-edit-ZBD6N5SC.js → profile-edit-IVU3SBQA.js} +3 -3
- package/dist/{promotion-add-campaign-VAF3HTLK.js → promotion-add-campaign-SWTS4TM5.js} +2 -1
- package/dist/{promotion-create-FKRGXGI4.js → promotion-create-6TMK6PEP.js} +4 -3
- package/dist/{promotion-detail-HOXUK5VG.js → promotion-detail-WBTMSCTX.js} +6 -8
- package/dist/{promotion-list-LJKKLZNU.js → promotion-list-FPOTDLHX.js} +9 -9
- package/dist/{refund-reason-create-TOH2D225.js → refund-reason-create-HZOBFOPB.js} +1 -1
- package/dist/{refund-reason-edit-B32E4WHH.js → refund-reason-edit-KS6NMC22.js} +1 -1
- package/dist/{refund-reason-list-3YLXKHJX.js → refund-reason-list-4T7DIRZV.js} +5 -6
- package/dist/{region-add-countries-4CTAVHYW.js → region-add-countries-47QLUMX7.js} +2 -2
- package/dist/{region-create-S2WUJ4RA.js → region-create-7DI3QEPU.js} +25 -11
- package/dist/{region-detail-YTB7OEQU.js → region-detail-S5OT2PGL.js} +4 -5
- package/dist/{region-edit-NUMG2V5L.js → region-edit-IXCS3MRH.js} +32 -14
- package/dist/{region-list-JP3CZISQ.js → region-list-2MWAGD2D.js} +4 -5
- package/dist/{region-metadata-NAHNXAHQ.js → region-metadata-ADPG7OLJ.js} +2 -2
- package/dist/{reservation-create-H3T3AHTK.js → reservation-create-YEICXID2.js} +67 -44
- package/dist/{reservation-detail-M42OB6BC.js → reservation-detail-EBIDXEVF.js} +3 -5
- package/dist/{reservation-list-FQAWE7S5.js → reservation-list-5QNXC2WU.js} +4 -5
- package/dist/{reservation-metadata-AKR6FRG5.js → reservation-metadata-TWJE777O.js} +2 -2
- package/dist/{reset-password-RJ5VSBQV.js → reset-password-3YLCNWLP.js} +1 -1
- package/dist/{return-reason-list-PKAJDA6A.js → return-reason-list-BDR7VUEV.js} +5 -5
- package/dist/{review-detail-K555FECH.js → review-detail-NPB3OKCE.js} +2 -4
- package/dist/{review-list-5NGJJH23.js → review-list-NXBVRP5T.js} +4 -5
- package/dist/{sales-channel-add-products-RRTMXVAT.js → sales-channel-add-products-VAHBFZP3.js} +15 -6
- package/dist/{sales-channel-detail-7GAGHWEP.js → sales-channel-detail-A7HHMQVX.js} +6 -7
- package/dist/{sales-channel-list-BCL62DTX.js → sales-channel-list-246V7NV3.js} +4 -6
- package/dist/{sales-channel-metadata-BKNILVQ2.js → sales-channel-metadata-PMLMQIKU.js} +2 -2
- package/dist/settings-UYGKDTNO.js +63 -0
- package/dist/{shipping-option-type-create-ZVOMA222.js → shipping-option-type-create-NOFP2DOM.js} +1 -1
- package/dist/{shipping-option-type-detail-2VDQWYDS.js → shipping-option-type-detail-47AZVCFP.js} +3 -5
- package/dist/{shipping-option-type-edit-CZFRAZPJ.js → shipping-option-type-edit-42JILKHX.js} +1 -1
- package/dist/{shipping-option-type-list-2XUYXURQ.js → shipping-option-type-list-TTAA63ZN.js} +6 -6
- package/dist/{shipping-profile-detail-7SE5GLQZ.js → shipping-profile-detail-RGB67K3C.js} +2 -4
- package/dist/{shipping-profile-metadata-UEZYRBZQ.js → shipping-profile-metadata-GXMY5E57.js} +2 -2
- package/dist/{shipping-profiles-list-GC6AK77V.js → shipping-profiles-list-DD3G2THE.js} +4 -5
- package/dist/{store-create-JBY2MAIT.js → store-create-UQ333C5F.js} +36 -14
- package/dist/{store-details-MPTCI4VG.js → store-details-OAONJZHB.js} +8 -9
- package/dist/{store-edit-BXWV5H4Z.js → store-edit-6Q3GLLJE.js} +2 -2
- package/dist/{store-list-LPKSZF2E.js → store-list-PANSKKVA.js} +10 -11
- package/dist/{store-member-invite-A2WAB5GK.js → store-member-invite-235YGK55.js} +14 -5
- package/dist/{tax-region-create-OGVIIVMO.js → tax-region-create-ECRRD74Z.js} +2 -2
- package/dist/{tax-region-detail-3CMIPIKA.js → tax-region-detail-PU4Q42KO.js} +7 -8
- package/dist/{tax-region-edit-DUBTSOQ4.js → tax-region-edit-P4L2CUFV.js} +1 -1
- package/dist/{tax-region-list-U5JRCQZI.js → tax-region-list-PUNXDH34.js} +5 -6
- package/dist/{tax-region-metadata-KHODQCDW.js → tax-region-metadata-EDZ7YGYR.js} +2 -2
- package/dist/{tax-region-province-detail-XTPJ6DZZ.js → tax-region-province-detail-3ZQOCKZ2.js} +6 -7
- package/dist/{tax-region-tax-override-create-NMLHLS7J.js → tax-region-tax-override-create-CPWWLRMI.js} +10 -10
- package/dist/{tax-region-tax-override-edit-4SJ3DRAF.js → tax-region-tax-override-edit-TQCB5GSO.js} +41 -21
- package/dist/{user-detail-RD3T5WQT.js → user-detail-4H37KBIP.js} +3 -5
- package/dist/{user-edit-Y5VP6CKB.js → user-edit-42A2VX5E.js} +1 -1
- package/dist/{user-invite-4JFF3NRW.js → user-invite-5EJ3CIQZ.js} +5 -4
- package/dist/{user-list-X6UZ6UZM.js → user-list-EZ56HFI3.js} +5 -6
- package/dist/{user-metadata-XNM2JNNO.js → user-metadata-3GENWLUS.js} +2 -2
- package/package.json +6 -6
- package/dist/chunk-BDGZ4EQO.js +0 -86
- package/dist/settings-AVE3VCCM.js +0 -19
- package/dist/{customer-edit-5EH2AUGN.js → customer-edit-LDKAXHZ6.js} +3 -3
- package/dist/{store-bulk-edit-FQPQQR46.js → store-bulk-edit-XWDZQPFO.js} +1 -1
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
_DataTable,
|
|
13
13
|
useDataTable
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-SU36MZXC.js";
|
|
15
15
|
import {
|
|
16
16
|
ActionMenu
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-3UOYBH5O.js";
|
|
18
18
|
import {
|
|
19
19
|
useCurrencies
|
|
20
20
|
} from "./chunk-JW5SGRFC.js";
|
|
@@ -53,6 +53,12 @@ import {
|
|
|
53
53
|
toast,
|
|
54
54
|
usePrompt
|
|
55
55
|
} from "@medusajs/ui";
|
|
56
|
+
import {
|
|
57
|
+
SectionNoAccess,
|
|
58
|
+
isForbidden,
|
|
59
|
+
usePermissions,
|
|
60
|
+
usePermissionGate
|
|
61
|
+
} from "@mercurjs/dashboard-shared";
|
|
56
62
|
import { keepPreviousData } from "@tanstack/react-query";
|
|
57
63
|
import { createColumnHelper } from "@tanstack/react-table";
|
|
58
64
|
import { useMemo, useState } from "react";
|
|
@@ -61,6 +67,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
61
67
|
var PAGE_SIZE = 10;
|
|
62
68
|
var MarketplaceCurrencySection = ({ store }) => {
|
|
63
69
|
const [rowSelection, setRowSelection] = useState({});
|
|
70
|
+
const { can } = usePermissions();
|
|
71
|
+
const canViewCurrencies = can("regions");
|
|
72
|
+
const canViewPreferences = can("price_preferences");
|
|
64
73
|
const { searchParams, raw } = useCurrenciesTableQuery({ pageSize: PAGE_SIZE });
|
|
65
74
|
const {
|
|
66
75
|
currencies,
|
|
@@ -75,7 +84,7 @@ var MarketplaceCurrencySection = ({ store }) => {
|
|
|
75
84
|
},
|
|
76
85
|
{
|
|
77
86
|
placeholderData: keepPreviousData,
|
|
78
|
-
enabled: !!store.supported_currencies?.length
|
|
87
|
+
enabled: !!store.supported_currencies?.length && canViewCurrencies
|
|
79
88
|
}
|
|
80
89
|
);
|
|
81
90
|
const {
|
|
@@ -89,10 +98,12 @@ var MarketplaceCurrencySection = ({ store }) => {
|
|
|
89
98
|
value: store.supported_currencies?.map((c) => c.currency_code)
|
|
90
99
|
},
|
|
91
100
|
{
|
|
92
|
-
enabled: !!store.supported_currencies?.length
|
|
101
|
+
enabled: !!store.supported_currencies?.length && canViewPreferences
|
|
93
102
|
}
|
|
94
103
|
);
|
|
95
|
-
const
|
|
104
|
+
const currenciesForbidden = !canViewCurrencies || isForbidden(currenciesError);
|
|
105
|
+
const preferencesForbidden = !canViewPreferences || isForbidden(pricePreferencesError);
|
|
106
|
+
const columns = useColumns(!preferencesForbidden);
|
|
96
107
|
const prefMap = useMemo(() => {
|
|
97
108
|
return new Map(pricePreferences?.map((pref) => [pref.value, pref]));
|
|
98
109
|
}, [pricePreferences]);
|
|
@@ -116,12 +127,14 @@ var MarketplaceCurrencySection = ({ store }) => {
|
|
|
116
127
|
storeId: store.id,
|
|
117
128
|
supportedCurrencies: store.supported_currencies,
|
|
118
129
|
defaultCurrencyCode: store.supported_currencies?.find((c) => c.is_default)?.currency_code,
|
|
119
|
-
preferencesMap: prefMap
|
|
130
|
+
preferencesMap: prefMap,
|
|
131
|
+
canTogglePreferences: !preferencesForbidden
|
|
120
132
|
}
|
|
121
133
|
});
|
|
122
134
|
const { mutateAsync } = useUpdateStore(store.id);
|
|
123
135
|
const { t } = useTranslation();
|
|
124
136
|
const prompt = usePrompt();
|
|
137
|
+
const editGate = usePermissionGate("store:edit");
|
|
125
138
|
const handleDeleteCurrencies = async () => {
|
|
126
139
|
const ids = Object.keys(rowSelection);
|
|
127
140
|
const result = await prompt({
|
|
@@ -152,13 +165,13 @@ var MarketplaceCurrencySection = ({ store }) => {
|
|
|
152
165
|
}
|
|
153
166
|
);
|
|
154
167
|
};
|
|
155
|
-
if (isCurrenciesError) {
|
|
168
|
+
if (isCurrenciesError && !currenciesForbidden) {
|
|
156
169
|
throw currenciesError;
|
|
157
170
|
}
|
|
158
|
-
if (isPricePreferencesError) {
|
|
171
|
+
if (isPricePreferencesError && !preferencesForbidden) {
|
|
159
172
|
throw pricePreferencesError;
|
|
160
173
|
}
|
|
161
|
-
const isLoading = isCurrenciesPending || isPricePreferencesPending;
|
|
174
|
+
const isLoading = isCurrenciesPending || !preferencesForbidden && isPricePreferencesPending;
|
|
162
175
|
return /* @__PURE__ */ jsxs(Container, { className: "divide-y p-0", "data-testid": "store-currency-section-container", children: [
|
|
163
176
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", "data-testid": "store-currency-section-header", children: [
|
|
164
177
|
/* @__PURE__ */ jsx(Heading, { level: "h2", "data-testid": "store-currency-section-heading", children: t("store.currencies") }),
|
|
@@ -170,6 +183,7 @@ var MarketplaceCurrencySection = ({ store }) => {
|
|
|
170
183
|
actions: [
|
|
171
184
|
{
|
|
172
185
|
icon: /* @__PURE__ */ jsx(Plus, {}),
|
|
186
|
+
permission: "store:edit",
|
|
173
187
|
label: t("actions.add"),
|
|
174
188
|
to: "currencies"
|
|
175
189
|
}
|
|
@@ -180,7 +194,7 @@ var MarketplaceCurrencySection = ({ store }) => {
|
|
|
180
194
|
}
|
|
181
195
|
)
|
|
182
196
|
] }),
|
|
183
|
-
/* @__PURE__ */ jsx(
|
|
197
|
+
currenciesForbidden ? /* @__PURE__ */ jsx(SectionNoAccess, {}) : /* @__PURE__ */ jsx(
|
|
184
198
|
_DataTable,
|
|
185
199
|
{
|
|
186
200
|
orderBy: [
|
|
@@ -198,7 +212,7 @@ var MarketplaceCurrencySection = ({ store }) => {
|
|
|
198
212
|
"data-testid": "store-currency-section-table"
|
|
199
213
|
}
|
|
200
214
|
),
|
|
201
|
-
/* @__PURE__ */ jsx(CommandBar, { open: !!Object.keys(rowSelection).length, "data-testid": "store-currency-section-command-bar", children: /* @__PURE__ */ jsxs(CommandBar.Bar, { "data-testid": "store-currency-section-command-bar-bar", children: [
|
|
215
|
+
/* @__PURE__ */ jsx(CommandBar, { open: !!Object.keys(rowSelection).length && editGate.allowed, "data-testid": "store-currency-section-command-bar", children: /* @__PURE__ */ jsxs(CommandBar.Bar, { "data-testid": "store-currency-section-command-bar-bar", children: [
|
|
202
216
|
/* @__PURE__ */ jsx(CommandBar.Value, { "data-testid": "store-currency-section-command-bar-value", children: t("general.countSelected", {
|
|
203
217
|
count: Object.keys(rowSelection).length
|
|
204
218
|
}) }),
|
|
@@ -220,7 +234,8 @@ var CurrencyActions = ({
|
|
|
220
234
|
currency,
|
|
221
235
|
supportedCurrencies,
|
|
222
236
|
defaultCurrencyCode,
|
|
223
|
-
preferencesMap
|
|
237
|
+
preferencesMap,
|
|
238
|
+
canTogglePreferences
|
|
224
239
|
}) => {
|
|
225
240
|
const { mutateAsync } = useUpdateStore(storeId);
|
|
226
241
|
const { t } = useTranslation();
|
|
@@ -281,18 +296,20 @@ var CurrencyActions = ({
|
|
|
281
296
|
{
|
|
282
297
|
groups: [
|
|
283
298
|
{
|
|
284
|
-
actions: [
|
|
299
|
+
actions: canTogglePreferences ? [
|
|
285
300
|
{
|
|
286
301
|
icon: preferencesMap.get(currency.code)?.is_tax_inclusive ? /* @__PURE__ */ jsx(XCircle, {}) : /* @__PURE__ */ jsx(CheckCircle, {}),
|
|
302
|
+
permission: "store:edit",
|
|
287
303
|
label: preferencesMap.get(currency.code)?.is_tax_inclusive ? t("store.disableTaxInclusivePricing") : t("store.enableTaxInclusivePricing"),
|
|
288
304
|
onClick: handleToggleTaxInclusivity
|
|
289
305
|
}
|
|
290
|
-
]
|
|
306
|
+
] : []
|
|
291
307
|
},
|
|
292
308
|
{
|
|
293
309
|
actions: [
|
|
294
310
|
{
|
|
295
311
|
icon: /* @__PURE__ */ jsx(Trash, {}),
|
|
312
|
+
permission: "store:edit",
|
|
296
313
|
label: t("actions.remove"),
|
|
297
314
|
onClick: handleRemove,
|
|
298
315
|
disabled: currency.code === defaultCurrencyCode
|
|
@@ -305,7 +322,7 @@ var CurrencyActions = ({
|
|
|
305
322
|
);
|
|
306
323
|
};
|
|
307
324
|
var columnHelper = createColumnHelper();
|
|
308
|
-
var useColumns = () => {
|
|
325
|
+
var useColumns = (withTaxInclusivity) => {
|
|
309
326
|
const base = useCurrenciesTableColumns();
|
|
310
327
|
const { t } = useTranslation();
|
|
311
328
|
return useMemo(
|
|
@@ -337,13 +354,15 @@ var useColumns = () => {
|
|
|
337
354
|
}
|
|
338
355
|
}),
|
|
339
356
|
...base,
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
357
|
+
...withTaxInclusivity ? [
|
|
358
|
+
columnHelper.accessor("is_tax_inclusive", {
|
|
359
|
+
header: t("fields.taxInclusivePricing"),
|
|
360
|
+
cell: ({ getValue }) => {
|
|
361
|
+
const isTaxInclusive = getValue();
|
|
362
|
+
return /* @__PURE__ */ jsx(StatusCell, { color: isTaxInclusive ? "green" : "grey", children: isTaxInclusive ? t("fields.true") : t("fields.false") });
|
|
363
|
+
}
|
|
364
|
+
})
|
|
365
|
+
] : [],
|
|
347
366
|
columnHelper.display({
|
|
348
367
|
id: "actions",
|
|
349
368
|
cell: ({ row, table }) => {
|
|
@@ -351,7 +370,8 @@ var useColumns = () => {
|
|
|
351
370
|
supportedCurrencies,
|
|
352
371
|
storeId,
|
|
353
372
|
defaultCurrencyCode,
|
|
354
|
-
preferencesMap
|
|
373
|
+
preferencesMap,
|
|
374
|
+
canTogglePreferences
|
|
355
375
|
} = table.options.meta;
|
|
356
376
|
return /* @__PURE__ */ jsx(
|
|
357
377
|
CurrencyActions,
|
|
@@ -360,30 +380,36 @@ var useColumns = () => {
|
|
|
360
380
|
currency: row.original,
|
|
361
381
|
supportedCurrencies,
|
|
362
382
|
defaultCurrencyCode,
|
|
363
|
-
preferencesMap
|
|
383
|
+
preferencesMap,
|
|
384
|
+
canTogglePreferences
|
|
364
385
|
}
|
|
365
386
|
);
|
|
366
387
|
}
|
|
367
388
|
})
|
|
368
389
|
],
|
|
369
|
-
[base, t]
|
|
390
|
+
[base, t, withTaxInclusivity]
|
|
370
391
|
);
|
|
371
392
|
};
|
|
372
393
|
|
|
373
394
|
// src/pages/marketplace/marketplace-detail/components/marketplace-general-section/marketplace-general-section.tsx
|
|
374
395
|
import { PencilSquare } from "@medusajs/icons";
|
|
375
396
|
import { Badge, Container as Container2, Heading as Heading2, Text } from "@medusajs/ui";
|
|
397
|
+
import { usePermissions as usePermissions2 } from "@mercurjs/dashboard-shared";
|
|
376
398
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
377
399
|
import { Link } from "react-router-dom";
|
|
378
400
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
379
401
|
var MarketplaceGeneralSection = ({ store }) => {
|
|
380
402
|
const { t } = useTranslation2();
|
|
403
|
+
const { can } = usePermissions2();
|
|
404
|
+
const canViewRegions = can("regions");
|
|
405
|
+
const canViewSalesChannels = can("sales_channels");
|
|
406
|
+
const canViewLocations = can("stock_locations");
|
|
381
407
|
const { region } = useRegion(store.default_region_id, void 0, {
|
|
382
|
-
enabled: !!store.default_region_id
|
|
408
|
+
enabled: !!store.default_region_id && canViewRegions
|
|
383
409
|
});
|
|
384
410
|
const defaultCurrency = store.supported_currencies?.find((c) => c.is_default);
|
|
385
411
|
const { sales_channel } = useSalesChannel(store.default_sales_channel_id, {
|
|
386
|
-
enabled: !!store.default_sales_channel_id
|
|
412
|
+
enabled: !!store.default_sales_channel_id && canViewSalesChannels
|
|
387
413
|
});
|
|
388
414
|
const { stock_location } = useStockLocation(
|
|
389
415
|
store.default_location_id,
|
|
@@ -391,7 +417,7 @@ var MarketplaceGeneralSection = ({ store }) => {
|
|
|
391
417
|
fields: "id,name"
|
|
392
418
|
},
|
|
393
419
|
{
|
|
394
|
-
enabled: !!store.default_location_id
|
|
420
|
+
enabled: !!store.default_location_id && canViewLocations
|
|
395
421
|
}
|
|
396
422
|
);
|
|
397
423
|
return /* @__PURE__ */ jsxs2(Container2, { className: "divide-y p-0", "data-testid": "store-general-section-container", children: [
|
|
@@ -408,6 +434,7 @@ var MarketplaceGeneralSection = ({ store }) => {
|
|
|
408
434
|
actions: [
|
|
409
435
|
{
|
|
410
436
|
icon: /* @__PURE__ */ jsx2(PencilSquare, {}),
|
|
437
|
+
permission: "store:edit",
|
|
411
438
|
label: t("actions.edit"),
|
|
412
439
|
to: "edit"
|
|
413
440
|
}
|
|
@@ -431,15 +458,15 @@ var MarketplaceGeneralSection = ({ store }) => {
|
|
|
431
458
|
] }),
|
|
432
459
|
/* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 px-6 py-4", "data-testid": "store-general-section-region", children: [
|
|
433
460
|
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", "data-testid": "store-general-section-region-label", children: t("store.defaultRegion") }),
|
|
434
|
-
/* @__PURE__ */ jsx2("div", { className: "flex items-center gap-x-2", "data-testid": "store-general-section-region-value", children: region ? /* @__PURE__ */ jsx2(Badge, { size: "2xsmall", asChild: true, children: /* @__PURE__ */ jsx2(Link, { to: `/settings/regions/${region.id}`, "data-testid": "store-general-section-region-link", children: region.name }) }) : /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: "-" }) })
|
|
461
|
+
/* @__PURE__ */ jsx2("div", { className: "flex items-center gap-x-2", "data-testid": "store-general-section-region-value", children: region ? /* @__PURE__ */ jsx2(Badge, { size: "2xsmall", asChild: true, children: /* @__PURE__ */ jsx2(Link, { to: `/settings/regions/${region.id}`, "data-testid": "store-general-section-region-link", children: region.name }) }) : /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: !canViewRegions && store.default_region_id || "-" }) })
|
|
435
462
|
] }),
|
|
436
463
|
/* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 px-6 py-4", "data-testid": "store-general-section-sales-channel", children: [
|
|
437
464
|
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", "data-testid": "store-general-section-sales-channel-label", children: t("store.defaultSalesChannel") }),
|
|
438
|
-
/* @__PURE__ */ jsx2("div", { className: "flex items-center gap-x-2", "data-testid": "store-general-section-sales-channel-value", children: sales_channel ? /* @__PURE__ */ jsx2(Badge, { size: "2xsmall", asChild: true, children: /* @__PURE__ */ jsx2(Link, { to: `/settings/sales-channels/${sales_channel.id}`, "data-testid": "store-general-section-sales-channel-link", children: sales_channel.name }) }) : /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: "-" }) })
|
|
465
|
+
/* @__PURE__ */ jsx2("div", { className: "flex items-center gap-x-2", "data-testid": "store-general-section-sales-channel-value", children: sales_channel ? /* @__PURE__ */ jsx2(Badge, { size: "2xsmall", asChild: true, children: /* @__PURE__ */ jsx2(Link, { to: `/settings/sales-channels/${sales_channel.id}`, "data-testid": "store-general-section-sales-channel-link", children: sales_channel.name }) }) : /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: !canViewSalesChannels && store.default_sales_channel_id || "-" }) })
|
|
439
466
|
] }),
|
|
440
467
|
/* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 px-6 py-4", "data-testid": "store-general-section-location", children: [
|
|
441
468
|
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", "data-testid": "store-general-section-location-label", children: t("store.defaultLocation") }),
|
|
442
|
-
/* @__PURE__ */ jsx2("div", { className: "flex items-center gap-x-2", "data-testid": "store-general-section-location-value", children: stock_location ? /* @__PURE__ */ jsx2(Badge, { size: "2xsmall", asChild: true, children: /* @__PURE__ */ jsx2(Link, { to: `/settings/locations/${stock_location.id}`, "data-testid": "store-general-section-location-link", children: stock_location.name }) }) : /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: "-" }) })
|
|
469
|
+
/* @__PURE__ */ jsx2("div", { className: "flex items-center gap-x-2", "data-testid": "store-general-section-location-value", children: stock_location ? /* @__PURE__ */ jsx2(Badge, { size: "2xsmall", asChild: true, children: /* @__PURE__ */ jsx2(Link, { to: `/settings/locations/${stock_location.id}`, "data-testid": "store-general-section-location-link", children: stock_location.name }) }) : /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: !canViewLocations && store.default_location_id || "-" }) })
|
|
443
470
|
] })
|
|
444
471
|
] });
|
|
445
472
|
};
|
|
@@ -18,13 +18,16 @@ var usersQueryKeys = {
|
|
|
18
18
|
...queryKeysFactory(USERS_QUERY_KEY),
|
|
19
19
|
me: () => [USERS_QUERY_KEY, "me"]
|
|
20
20
|
};
|
|
21
|
+
var meQueryOptions = (query) => ({
|
|
22
|
+
queryFn: () => sdk.admin.users.me.query({
|
|
23
|
+
...query,
|
|
24
|
+
fields: [query?.fields, "+permissions"].filter(Boolean).join(",")
|
|
25
|
+
}),
|
|
26
|
+
queryKey: usersQueryKeys.me()
|
|
27
|
+
});
|
|
21
28
|
var useMe = (query, options) => {
|
|
22
29
|
const { data, ...rest } = useQuery({
|
|
23
|
-
|
|
24
|
-
...query,
|
|
25
|
-
fields: [query?.fields, "+permissions"].filter(Boolean).join(",")
|
|
26
|
-
}),
|
|
27
|
-
queryKey: usersQueryKeys.me(),
|
|
30
|
+
...meQueryOptions(query),
|
|
28
31
|
...options
|
|
29
32
|
});
|
|
30
33
|
return {
|
|
@@ -48,6 +51,16 @@ var useUsers = (query, options) => {
|
|
|
48
51
|
});
|
|
49
52
|
return { ...data, ...rest };
|
|
50
53
|
};
|
|
54
|
+
var useUpdateMe = (options) => {
|
|
55
|
+
return useMutation({
|
|
56
|
+
mutationFn: (payload) => sdk.admin.users.me.mutate(payload),
|
|
57
|
+
onSuccess: (data, variables, context) => {
|
|
58
|
+
queryClient.invalidateQueries({ queryKey: usersQueryKeys.all });
|
|
59
|
+
options?.onSuccess?.(data, variables, context);
|
|
60
|
+
},
|
|
61
|
+
...options
|
|
62
|
+
});
|
|
63
|
+
};
|
|
51
64
|
var useUpdateUser = (id, options) => {
|
|
52
65
|
return useMutation({
|
|
53
66
|
mutationFn: (payload) => sdk.admin.users.$id.mutate({ $id: id, ...payload }),
|
|
@@ -74,9 +87,11 @@ var useDeleteUser = (id, options) => {
|
|
|
74
87
|
};
|
|
75
88
|
|
|
76
89
|
export {
|
|
90
|
+
meQueryOptions,
|
|
77
91
|
useMe,
|
|
78
92
|
useUser,
|
|
79
93
|
useUsers,
|
|
94
|
+
useUpdateMe,
|
|
80
95
|
useUpdateUser,
|
|
81
96
|
useDeleteUser
|
|
82
97
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LocalizedTablePagination,
|
|
3
3
|
TaxRegionCard
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Q2XWHI6K.js";
|
|
5
5
|
import {
|
|
6
6
|
DataTableOrderBy
|
|
7
7
|
} from "./chunk-ZAOEFQ6K.js";
|
|
8
8
|
import {
|
|
9
9
|
NoRecords,
|
|
10
10
|
NoResults
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4J74G7N2.js";
|
|
12
12
|
import {
|
|
13
13
|
TableFooterSkeleton
|
|
14
14
|
} from "./chunk-INNFZYX2.js";
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
import { Button } from "@medusajs/ui";
|
|
18
18
|
import { useTranslation } from "react-i18next";
|
|
19
19
|
import { Link } from "react-router-dom";
|
|
20
|
+
import { PermissionAction } from "@mercurjs/dashboard-shared";
|
|
20
21
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
21
22
|
var TaxRegionTable = ({
|
|
22
23
|
variant = "country",
|
|
@@ -65,7 +66,7 @@ var TaxRegionTable = ({
|
|
|
65
66
|
prefix
|
|
66
67
|
}
|
|
67
68
|
) }),
|
|
68
|
-
action && /* @__PURE__ */ jsx(
|
|
69
|
+
action && /* @__PURE__ */ jsx(PermissionAction, { permission: "tax_regions:edit", children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", asChild: true, "data-testid": dataTestId ? `${dataTestId}-create-button` : void 0, children: /* @__PURE__ */ jsx(Link, { to: action.to, children: action.label }) }) })
|
|
69
70
|
] })
|
|
70
71
|
] }),
|
|
71
72
|
noResults && /* @__PURE__ */ jsx(NoResults, {}),
|
|
@@ -6,12 +6,22 @@ import {
|
|
|
6
6
|
} from "./chunk-HRMANL53.js";
|
|
7
7
|
|
|
8
8
|
// src/hooks/table/filters/use-promotion-table-filters.tsx
|
|
9
|
+
import { usePermissions } from "@mercurjs/dashboard-shared";
|
|
9
10
|
import { useTranslation } from "react-i18next";
|
|
10
11
|
import { useMemo } from "react";
|
|
11
12
|
var usePromotionTableFilters = () => {
|
|
12
13
|
const { t } = useTranslation();
|
|
13
|
-
const {
|
|
14
|
-
const
|
|
14
|
+
const { can } = usePermissions();
|
|
15
|
+
const canViewCampaigns = can("campaigns");
|
|
16
|
+
const canViewSellers = can("sellers");
|
|
17
|
+
const { campaigns } = useCampaigns(
|
|
18
|
+
{ limit: 100, fields: "id,name" },
|
|
19
|
+
{ enabled: canViewCampaigns }
|
|
20
|
+
);
|
|
21
|
+
const { sellers } = useSellers(
|
|
22
|
+
{ limit: 100, fields: "id,name" },
|
|
23
|
+
{ enabled: canViewSellers }
|
|
24
|
+
);
|
|
15
25
|
return useMemo(() => {
|
|
16
26
|
const typeFilter = {
|
|
17
27
|
key: "application_method_type",
|
|
@@ -70,11 +80,11 @@ var usePromotionTableFilters = () => {
|
|
|
70
80
|
return [
|
|
71
81
|
typeFilter,
|
|
72
82
|
methodFilter,
|
|
73
|
-
campaignFilter,
|
|
74
|
-
ownerFilter,
|
|
83
|
+
...canViewCampaigns ? [campaignFilter] : [],
|
|
84
|
+
...canViewSellers ? [ownerFilter] : [],
|
|
75
85
|
...dateFilters
|
|
76
86
|
];
|
|
77
|
-
}, [t, campaigns, sellers]);
|
|
87
|
+
}, [t, campaigns, sellers, canViewCampaigns, canViewSellers]);
|
|
78
88
|
};
|
|
79
89
|
|
|
80
90
|
export {
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
_DataTable,
|
|
9
9
|
useDataTable
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SU36MZXC.js";
|
|
11
11
|
import {
|
|
12
12
|
ActionMenu
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3UOYBH5O.js";
|
|
14
14
|
import {
|
|
15
15
|
useDeleteShippingProfile,
|
|
16
16
|
useShippingProfiles
|
|
@@ -79,6 +79,7 @@ var ShippingOptionsRowActions = ({
|
|
|
79
79
|
actions: [
|
|
80
80
|
{
|
|
81
81
|
icon: /* @__PURE__ */ jsx(Trash, {}),
|
|
82
|
+
permission: "shipping_profiles:manage",
|
|
82
83
|
label: t("actions.delete"),
|
|
83
84
|
onClick: handleDelete
|
|
84
85
|
}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-KMSBY4PU.js";
|
|
7
7
|
import {
|
|
8
8
|
useProductTableFilters
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ZQZFY3UY.js";
|
|
10
10
|
import {
|
|
11
11
|
useProductTableQuery
|
|
12
12
|
} from "./chunk-S4IDR46L.js";
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
_DataTable,
|
|
18
18
|
useDataTable
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-SU36MZXC.js";
|
|
20
20
|
import {
|
|
21
21
|
ActionMenu
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-3UOYBH5O.js";
|
|
23
23
|
import {
|
|
24
24
|
useProductType
|
|
25
25
|
} from "./chunk-AEBQQ2EG.js";
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
// src/pages/product-types/product-type-detail/product-type-detail.tsx
|
|
34
34
|
import { Children } from "react";
|
|
35
35
|
import { useLoaderData, useParams } from "react-router-dom";
|
|
36
|
-
import { WidgetZone } from "@mercurjs/dashboard-shared";
|
|
36
|
+
import { PermissionGuard, WidgetZone } from "@mercurjs/dashboard-shared";
|
|
37
37
|
|
|
38
38
|
// src/pages/product-types/product-type-detail/components/product-type-general-section/product-type-general-section.tsx
|
|
39
39
|
import { PencilSquare, Trash } from "@medusajs/icons";
|
|
@@ -57,6 +57,7 @@ var ProductTypeGeneralSection = ({
|
|
|
57
57
|
{
|
|
58
58
|
actions: [
|
|
59
59
|
{
|
|
60
|
+
permission: "product_types:edit",
|
|
60
61
|
label: t("actions.edit"),
|
|
61
62
|
icon: /* @__PURE__ */ jsx(PencilSquare, {}),
|
|
62
63
|
to: "edit"
|
|
@@ -66,6 +67,7 @@ var ProductTypeGeneralSection = ({
|
|
|
66
67
|
{
|
|
67
68
|
actions: [
|
|
68
69
|
{
|
|
70
|
+
permission: "product_types:manage",
|
|
69
71
|
label: t("actions.delete"),
|
|
70
72
|
icon: /* @__PURE__ */ jsx(Trash, {}),
|
|
71
73
|
onClick: handleDelete
|
|
@@ -153,7 +155,7 @@ var Root = ({ children }) => {
|
|
|
153
155
|
}
|
|
154
156
|
return Children.count(children) > 0 ? /* @__PURE__ */ jsx3(SingleColumnPage, { showJSON: true, showMetadata: true, data: product_type, children }) : /* @__PURE__ */ jsx3(SingleColumnPage, { showJSON: true, showMetadata: true, data: product_type, children: /* @__PURE__ */ jsxs3(WidgetZone, { id: "product-types.detail.main", data: product_type, children: [
|
|
155
157
|
/* @__PURE__ */ jsx3(ProductTypeGeneralSection, { productType: product_type }),
|
|
156
|
-
/* @__PURE__ */ jsx3(ProductTypeProductSection, { productType: product_type })
|
|
158
|
+
/* @__PURE__ */ jsx3(PermissionGuard, { permission: "products:view", children: /* @__PURE__ */ jsx3(ProductTypeProductSection, { productType: product_type }) })
|
|
157
159
|
] }) });
|
|
158
160
|
};
|
|
159
161
|
var ProductTypeDetailPage = Object.assign(Root, {
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
_DataTable,
|
|
12
12
|
useDataTable
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-SU36MZXC.js";
|
|
14
14
|
import {
|
|
15
15
|
ActionMenu
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-3UOYBH5O.js";
|
|
17
17
|
import {
|
|
18
18
|
useCampaigns,
|
|
19
19
|
useDeleteCampaign
|
|
@@ -37,11 +37,17 @@ import { useTranslation as useTranslation2 } from "react-i18next";
|
|
|
37
37
|
import { Link } from "react-router-dom";
|
|
38
38
|
|
|
39
39
|
// src/hooks/table/filters/use-campaign-table-filters.tsx
|
|
40
|
+
import { usePermissions } from "@mercurjs/dashboard-shared";
|
|
40
41
|
import { useMemo } from "react";
|
|
41
42
|
import { useTranslation } from "react-i18next";
|
|
42
43
|
var useCampaignTableFilters = () => {
|
|
43
44
|
const { t } = useTranslation();
|
|
44
|
-
const {
|
|
45
|
+
const { can } = usePermissions();
|
|
46
|
+
const canViewSellers = can("sellers");
|
|
47
|
+
const { sellers } = useSellers(
|
|
48
|
+
{ limit: 100, fields: "id,name" },
|
|
49
|
+
{ enabled: canViewSellers }
|
|
50
|
+
);
|
|
45
51
|
return useMemo(() => {
|
|
46
52
|
const typeFilter = {
|
|
47
53
|
key: "budget_type",
|
|
@@ -79,8 +85,13 @@ var useCampaignTableFilters = () => {
|
|
|
79
85
|
{ label: t("fields.createdAt"), key: "created_at", type: "date" },
|
|
80
86
|
{ label: t("fields.updatedAt"), key: "updated_at", type: "date" }
|
|
81
87
|
];
|
|
82
|
-
return [
|
|
83
|
-
|
|
88
|
+
return [
|
|
89
|
+
typeFilter,
|
|
90
|
+
...canViewSellers ? [ownerFilter] : [],
|
|
91
|
+
statusFilter,
|
|
92
|
+
...dateFilters
|
|
93
|
+
];
|
|
94
|
+
}, [t, sellers, canViewSellers]);
|
|
84
95
|
};
|
|
85
96
|
|
|
86
97
|
// src/pages/campaigns/campaign-list/components/campaign-list-table.tsx
|
|
@@ -202,6 +213,7 @@ var CampaignActions = ({ campaign }) => {
|
|
|
202
213
|
actions: [
|
|
203
214
|
{
|
|
204
215
|
icon: /* @__PURE__ */ jsx(PencilSquare, {}),
|
|
216
|
+
permission: "campaigns:edit",
|
|
205
217
|
label: t("actions.edit"),
|
|
206
218
|
to: `/campaigns/${campaign.id}/edit`
|
|
207
219
|
}
|
|
@@ -211,6 +223,7 @@ var CampaignActions = ({ campaign }) => {
|
|
|
211
223
|
actions: [
|
|
212
224
|
{
|
|
213
225
|
icon: /* @__PURE__ */ jsx(Trash, {}),
|
|
226
|
+
permission: "campaigns:manage",
|
|
214
227
|
label: t("actions.delete"),
|
|
215
228
|
onClick: handleDelete
|
|
216
229
|
}
|