@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
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-NFZEX33S.js";
|
|
7
7
|
import {
|
|
8
8
|
DataTable
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VLNTJXXO.js";
|
|
10
10
|
import {
|
|
11
11
|
SingleColumnPage
|
|
12
12
|
} from "./chunk-H6MYB7GB.js";
|
|
@@ -37,6 +37,7 @@ import { keepPreviousData } from "@tanstack/react-query";
|
|
|
37
37
|
import { useCallback, useMemo } from "react";
|
|
38
38
|
import { useTranslation } from "react-i18next";
|
|
39
39
|
import { useNavigate } from "react-router-dom";
|
|
40
|
+
import { usePermissions } from "@mercurjs/dashboard-shared";
|
|
40
41
|
import { jsx } from "react/jsx-runtime";
|
|
41
42
|
var PAGE_SIZE = 20;
|
|
42
43
|
var SalesChannelListDataTable = () => {
|
|
@@ -80,6 +81,7 @@ var SalesChannelListDataTable = () => {
|
|
|
80
81
|
var columnHelper = createDataTableColumnHelper();
|
|
81
82
|
var useColumns = () => {
|
|
82
83
|
const { t } = useTranslation();
|
|
84
|
+
const { can } = usePermissions();
|
|
83
85
|
const prompt = usePrompt();
|
|
84
86
|
const navigate = useNavigate();
|
|
85
87
|
const base = useSalesChannelTableColumns();
|
|
@@ -117,7 +119,7 @@ var useColumns = () => {
|
|
|
117
119
|
actions: (ctx) => {
|
|
118
120
|
const disabledTooltip = ctx.row.original.is_default ? t("salesChannels.tooltip.cannotDeleteDefault") : void 0;
|
|
119
121
|
return [
|
|
120
|
-
[
|
|
122
|
+
!can("sales_channels", "edit") ? [] : [
|
|
121
123
|
{
|
|
122
124
|
icon: /* @__PURE__ */ jsx(PencilSquare, {}),
|
|
123
125
|
label: t("actions.edit"),
|
|
@@ -126,7 +128,7 @@ var useColumns = () => {
|
|
|
126
128
|
)
|
|
127
129
|
}
|
|
128
130
|
],
|
|
129
|
-
[
|
|
131
|
+
!can("sales_channels", "manage") ? [] : [
|
|
130
132
|
{
|
|
131
133
|
icon: /* @__PURE__ */ jsx(Trash, {}),
|
|
132
134
|
label: t("actions.delete"),
|
|
@@ -135,11 +137,11 @@ var useColumns = () => {
|
|
|
135
137
|
disabledTooltip
|
|
136
138
|
}
|
|
137
139
|
]
|
|
138
|
-
];
|
|
140
|
+
].filter((group) => group.length > 0);
|
|
139
141
|
}
|
|
140
142
|
})
|
|
141
143
|
],
|
|
142
|
-
[base, handleDelete, navigate, t]
|
|
144
|
+
[base, handleDelete, navigate, t, can]
|
|
143
145
|
);
|
|
144
146
|
};
|
|
145
147
|
|
|
@@ -148,6 +150,7 @@ import { Children } from "react";
|
|
|
148
150
|
import { Button, Heading, Text } from "@medusajs/ui";
|
|
149
151
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
150
152
|
import { Link } from "react-router-dom";
|
|
153
|
+
import { PermissionAction } from "@mercurjs/dashboard-shared";
|
|
151
154
|
import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
152
155
|
var SalesChannelListTitle = () => {
|
|
153
156
|
const { t } = useTranslation2();
|
|
@@ -160,7 +163,7 @@ var SalesChannelListActions = ({
|
|
|
160
163
|
children
|
|
161
164
|
}) => {
|
|
162
165
|
const { t } = useTranslation2();
|
|
163
|
-
return /* @__PURE__ */ jsx2("div", { className: "flex items-center justify-center gap-x-2", children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsx2(Button, { size: "small", variant: "secondary", asChild: true, children: /* @__PURE__ */ jsx2(Link, { to: "/settings/sales-channels/create", children: t("actions.create") }) }) });
|
|
166
|
+
return /* @__PURE__ */ jsx2("div", { className: "flex items-center justify-center gap-x-2", children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsx2(PermissionAction, { permission: "sales_channels:edit", children: /* @__PURE__ */ jsx2(Button, { size: "small", variant: "secondary", asChild: true, children: /* @__PURE__ */ jsx2(Link, { to: "/settings/sales-channels/create", children: t("actions.create") }) }) }) });
|
|
164
167
|
};
|
|
165
168
|
var SalesChannelListHeader = ({
|
|
166
169
|
children
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-6G456XO4.js";
|
|
4
4
|
import {
|
|
5
5
|
useCustomerTableFilters
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YDESULL7.js";
|
|
7
7
|
import {
|
|
8
8
|
useCustomerTableQuery
|
|
9
9
|
} from "./chunk-GRH7C3QN.js";
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
_DataTable,
|
|
15
15
|
useDataTable
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-SU36MZXC.js";
|
|
17
17
|
import {
|
|
18
18
|
ActionMenu
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-3UOYBH5O.js";
|
|
20
20
|
import {
|
|
21
21
|
useCustomers
|
|
22
22
|
} from "./chunk-XWOFQSGH.js";
|
|
@@ -138,7 +138,8 @@ var CustomerActions = ({
|
|
|
138
138
|
{
|
|
139
139
|
icon: /* @__PURE__ */ jsx(PencilSquare, {}),
|
|
140
140
|
label: t("actions.edit"),
|
|
141
|
-
to: `/customers/${customer.id}/edit
|
|
141
|
+
to: `/customers/${customer.id}/edit`,
|
|
142
|
+
permission: "customers:edit"
|
|
142
143
|
}
|
|
143
144
|
]
|
|
144
145
|
}
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
} from "./chunk-H6MYB7GB.js";
|
|
4
4
|
import {
|
|
5
5
|
ActionMenu
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3UOYBH5O.js";
|
|
7
7
|
import {
|
|
8
8
|
useDeleteUser,
|
|
9
9
|
useUser
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AZV22U4V.js";
|
|
11
11
|
import {
|
|
12
12
|
SingleColumnPageSkeleton
|
|
13
13
|
} from "./chunk-INNFZYX2.js";
|
|
@@ -63,6 +63,7 @@ var UserGeneralSection = ({ user }) => {
|
|
|
63
63
|
{
|
|
64
64
|
actions: [
|
|
65
65
|
{
|
|
66
|
+
permission: "users:edit",
|
|
66
67
|
label: t("actions.edit"),
|
|
67
68
|
to: "edit",
|
|
68
69
|
icon: /* @__PURE__ */ jsx(PencilSquare, {})
|
|
@@ -72,6 +73,7 @@ var UserGeneralSection = ({ user }) => {
|
|
|
72
73
|
{
|
|
73
74
|
actions: [
|
|
74
75
|
{
|
|
76
|
+
permission: "users:manage",
|
|
75
77
|
label: t("actions.delete"),
|
|
76
78
|
onClick: handleDeleteUser,
|
|
77
79
|
icon: /* @__PURE__ */ jsx(Trash, {})
|
|
@@ -41,6 +41,9 @@ import {
|
|
|
41
41
|
import {
|
|
42
42
|
Form
|
|
43
43
|
} from "./chunk-3QSRE5LS.js";
|
|
44
|
+
import {
|
|
45
|
+
ConditionalTooltip
|
|
46
|
+
} from "./chunk-LAVHRER2.js";
|
|
44
47
|
import {
|
|
45
48
|
useRegions
|
|
46
49
|
} from "./chunk-2SCR7R3C.js";
|
|
@@ -100,10 +103,12 @@ import { toast } from "@medusajs/ui";
|
|
|
100
103
|
import { Children, useCallback, useMemo as useMemo2 } from "react";
|
|
101
104
|
import { useForm, useWatch as useWatch2 } from "react-hook-form";
|
|
102
105
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
106
|
+
import { useCan as useCan2 } from "@mercurjs/dashboard-shared";
|
|
103
107
|
|
|
104
108
|
// src/pages/locations/location-service-zone-shipping-option-create/components/create-shipping-options-form/create-shipping-option-details-form.tsx
|
|
105
109
|
import { Divider, Heading, Input, RadioGroup, Select, Text } from "@medusajs/ui";
|
|
106
110
|
import { useTranslation } from "react-i18next";
|
|
111
|
+
import { usePermissionGate } from "@mercurjs/dashboard-shared";
|
|
107
112
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
108
113
|
import { createElement } from "react";
|
|
109
114
|
var Root = ({
|
|
@@ -118,9 +123,12 @@ var Root = ({
|
|
|
118
123
|
const form = useTabbedForm();
|
|
119
124
|
const direction = useDocumentDirection();
|
|
120
125
|
const isPickup = type === "pickup" /* Pickup */;
|
|
126
|
+
const shippingProfilesGate = usePermissionGate("shipping_profiles:view");
|
|
127
|
+
const providersGate = usePermissionGate("fulfillment_sets:view");
|
|
121
128
|
const shippingProfiles = useComboboxData({
|
|
122
129
|
queryFn: (params) => sdk.admin.shippingProfiles.query(params),
|
|
123
130
|
queryKey: ["shipping_profiles"],
|
|
131
|
+
enabled: shippingProfilesGate.allowed,
|
|
124
132
|
getOptions: (data) => data.shipping_profiles.map((profile) => ({
|
|
125
133
|
label: profile.name,
|
|
126
134
|
value: profile.id
|
|
@@ -140,6 +148,7 @@ var Root = ({
|
|
|
140
148
|
stock_location_id: locationId
|
|
141
149
|
}),
|
|
142
150
|
queryKey: ["fulfillment_providers"],
|
|
151
|
+
enabled: providersGate.allowed,
|
|
143
152
|
getOptions: (data) => data.fulfillment_providers.map((provider) => ({
|
|
144
153
|
label: formatProvider(provider.id),
|
|
145
154
|
value: provider.id
|
|
@@ -218,17 +227,24 @@ var Root = ({
|
|
|
218
227
|
name: "shipping_profile_id",
|
|
219
228
|
render: ({ field }) => /* @__PURE__ */ jsxs(Form.Item, { "data-testid": "location-shipping-option-create-details-form-shipping-profile-item", children: [
|
|
220
229
|
/* @__PURE__ */ jsx(Form.Label, { "data-testid": "location-shipping-option-create-details-form-shipping-profile-label", children: t("stockLocations.shippingOptions.fields.profile") }),
|
|
221
|
-
/* @__PURE__ */ jsx(
|
|
222
|
-
|
|
230
|
+
/* @__PURE__ */ jsx(
|
|
231
|
+
ConditionalTooltip,
|
|
223
232
|
{
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
233
|
+
showTooltip: shippingProfilesGate.denied,
|
|
234
|
+
content: shippingProfilesGate.tooltip,
|
|
235
|
+
children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Form.Control, { "data-testid": "location-shipping-option-create-details-form-shipping-profile-control", children: /* @__PURE__ */ jsx(
|
|
236
|
+
Combobox,
|
|
237
|
+
{
|
|
238
|
+
...field,
|
|
239
|
+
options: shippingProfiles.options,
|
|
240
|
+
searchValue: shippingProfiles.searchValue,
|
|
241
|
+
onSearchValueChange: shippingProfiles.onSearchValueChange,
|
|
242
|
+
disabled: shippingProfiles.disabled,
|
|
243
|
+
"data-testid": "location-shipping-option-create-details-form-shipping-profile-combobox"
|
|
244
|
+
}
|
|
245
|
+
) }) })
|
|
230
246
|
}
|
|
231
|
-
)
|
|
247
|
+
),
|
|
232
248
|
/* @__PURE__ */ jsx(Form.ErrorMessage, { "data-testid": "location-shipping-option-create-details-form-shipping-profile-error" })
|
|
233
249
|
] })
|
|
234
250
|
}
|
|
@@ -271,21 +287,28 @@ var Root = ({
|
|
|
271
287
|
children: t("stockLocations.shippingOptions.fields.provider")
|
|
272
288
|
}
|
|
273
289
|
),
|
|
274
|
-
/* @__PURE__ */ jsx(
|
|
275
|
-
|
|
290
|
+
/* @__PURE__ */ jsx(
|
|
291
|
+
ConditionalTooltip,
|
|
276
292
|
{
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
293
|
+
showTooltip: providersGate.denied,
|
|
294
|
+
content: providersGate.tooltip,
|
|
295
|
+
children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Form.Control, { "data-testid": "location-shipping-option-create-details-form-provider-control", children: /* @__PURE__ */ jsx(
|
|
296
|
+
Combobox,
|
|
297
|
+
{
|
|
298
|
+
...field,
|
|
299
|
+
onChange: (e) => {
|
|
300
|
+
field.onChange(e);
|
|
301
|
+
form.setValue("fulfillment_option_id", "");
|
|
302
|
+
},
|
|
303
|
+
options: fulfillmentProviders.options,
|
|
304
|
+
searchValue: fulfillmentProviders.searchValue,
|
|
305
|
+
onSearchValueChange: fulfillmentProviders.onSearchValueChange,
|
|
306
|
+
disabled: fulfillmentProviders.disabled,
|
|
307
|
+
"data-testid": "location-shipping-option-create-details-form-provider-combobox"
|
|
308
|
+
}
|
|
309
|
+
) }) })
|
|
287
310
|
}
|
|
288
|
-
)
|
|
311
|
+
),
|
|
289
312
|
/* @__PURE__ */ jsx(Form.ErrorMessage, { "data-testid": "location-shipping-option-create-details-form-provider-error" })
|
|
290
313
|
] })
|
|
291
314
|
}
|
|
@@ -346,7 +369,9 @@ var CreateShippingOptionDetailsForm = Root;
|
|
|
346
369
|
// src/pages/locations/location-service-zone-shipping-option-create/components/create-shipping-options-form/create-shipping-options-prices-form.tsx
|
|
347
370
|
import { useEffect, useMemo, useState } from "react";
|
|
348
371
|
import { useWatch } from "react-hook-form";
|
|
372
|
+
import { isForbidden, useCan } from "@mercurjs/dashboard-shared";
|
|
349
373
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
374
|
+
var NO_REGIONS = [];
|
|
350
375
|
var Root2 = ({ type }) => {
|
|
351
376
|
const isPickup = type === "pickup" /* Pickup */;
|
|
352
377
|
const form = useTabbedForm();
|
|
@@ -370,15 +395,21 @@ var Root2 = ({ type }) => {
|
|
|
370
395
|
() => store?.supported_currencies?.map((c) => c.currency_code) || [],
|
|
371
396
|
[store]
|
|
372
397
|
);
|
|
398
|
+
const canViewRegions = useCan("regions");
|
|
373
399
|
const {
|
|
374
|
-
regions,
|
|
400
|
+
regions: fetchedRegions,
|
|
375
401
|
isLoading: isRegionsLoading,
|
|
376
402
|
isError: isRegionsError,
|
|
377
403
|
error: regionsError
|
|
378
|
-
} = useRegions(
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
404
|
+
} = useRegions(
|
|
405
|
+
{
|
|
406
|
+
fields: "id,name,currency_code",
|
|
407
|
+
limit: 999
|
|
408
|
+
},
|
|
409
|
+
{ enabled: canViewRegions }
|
|
410
|
+
);
|
|
411
|
+
const regionsForbidden = !canViewRegions || isForbidden(regionsError);
|
|
412
|
+
const regions = regionsForbidden ? NO_REGIONS : fetchedRegions;
|
|
382
413
|
const { price_preferences: pricePreferences } = usePricePreferences({});
|
|
383
414
|
const { setCloseOnEscape } = useRouteModal();
|
|
384
415
|
const name = useWatch({ control: form.control, name: "name" });
|
|
@@ -418,7 +449,7 @@ var Root2 = ({ type }) => {
|
|
|
418
449
|
if (isStoreError) {
|
|
419
450
|
throw storeError;
|
|
420
451
|
}
|
|
421
|
-
if (isRegionsError) {
|
|
452
|
+
if (isRegionsError && !regionsForbidden) {
|
|
422
453
|
throw regionsError;
|
|
423
454
|
}
|
|
424
455
|
return /* @__PURE__ */ jsx2(
|
|
@@ -496,8 +527,9 @@ function CreateShippingOptionsForm({
|
|
|
496
527
|
control: form.control,
|
|
497
528
|
name: "provider_id"
|
|
498
529
|
});
|
|
530
|
+
const canViewProviders = useCan2("fulfillment_sets");
|
|
499
531
|
const { fulfillment_options: fulfillmentProviderOptions } = useFulfillmentProviderOptions(selectedProviderId, {
|
|
500
|
-
enabled: !!selectedProviderId
|
|
532
|
+
enabled: !!selectedProviderId && canViewProviders
|
|
501
533
|
});
|
|
502
534
|
const watchedPriceType = useWatch2({
|
|
503
535
|
control: form.control,
|
|
@@ -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
|
useProductTypes
|
|
25
25
|
} from "./chunk-AEBQQ2EG.js";
|
|
@@ -57,6 +57,7 @@ var ProductTypeRowActions = ({
|
|
|
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: `/settings/product-types/${productType.id}/edit`
|
|
@@ -66,6 +67,7 @@ var ProductTypeRowActions = ({
|
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useCustomerGroupTableFilters
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OCDZIJBM.js";
|
|
4
4
|
import {
|
|
5
5
|
useCustomerGroupTableQuery
|
|
6
6
|
} from "./chunk-3XOE4NV5.js";
|
|
@@ -10,13 +10,13 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
_DataTable,
|
|
12
12
|
useDataTable
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-SU36MZXC.js";
|
|
14
14
|
import {
|
|
15
15
|
useDate
|
|
16
16
|
} from "./chunk-EIWPJWKF.js";
|
|
17
17
|
import {
|
|
18
18
|
ActionMenu
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-3UOYBH5O.js";
|
|
20
20
|
import {
|
|
21
21
|
useCustomerGroups,
|
|
22
22
|
useDeleteCustomerGroupLazy
|
|
@@ -180,7 +180,8 @@ var CustomerGroupActions = ({
|
|
|
180
180
|
{
|
|
181
181
|
icon: /* @__PURE__ */ jsx(PencilSquare, {}),
|
|
182
182
|
label: t("actions.edit"),
|
|
183
|
-
to: `/customer-groups/${group.id}/edit
|
|
183
|
+
to: `/customer-groups/${group.id}/edit`,
|
|
184
|
+
permission: "customer_groups:edit"
|
|
184
185
|
}
|
|
185
186
|
]
|
|
186
187
|
},
|
|
@@ -189,7 +190,8 @@ var CustomerGroupActions = ({
|
|
|
189
190
|
{
|
|
190
191
|
icon: /* @__PURE__ */ jsx(Trash, {}),
|
|
191
192
|
label: t("actions.delete"),
|
|
192
|
-
onClick: handleDelete
|
|
193
|
+
onClick: handleDelete,
|
|
194
|
+
permission: "customer_groups:manage"
|
|
193
195
|
}
|
|
194
196
|
]
|
|
195
197
|
}
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-W6Y3PPU5.js";
|
|
10
10
|
import {
|
|
11
11
|
DataTable
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VLNTJXXO.js";
|
|
13
13
|
import {
|
|
14
14
|
PlaceholderCell
|
|
15
15
|
} from "./chunk-PHOCVOZ5.js";
|
|
@@ -51,10 +51,12 @@ import {
|
|
|
51
51
|
import { useTranslation } from "react-i18next";
|
|
52
52
|
import { useMemo } from "react";
|
|
53
53
|
import { useNavigate } from "react-router-dom";
|
|
54
|
+
import { usePermissions } from "@mercurjs/dashboard-shared";
|
|
54
55
|
import { jsx } from "react/jsx-runtime";
|
|
55
56
|
var columnHelper = createDataTableColumnHelper();
|
|
56
57
|
var useLocationListTableColumns = () => {
|
|
57
58
|
const { t } = useTranslation();
|
|
59
|
+
const { can } = usePermissions();
|
|
58
60
|
const navigate = useNavigate();
|
|
59
61
|
const prompt = usePrompt();
|
|
60
62
|
const handleDelete = async (location) => {
|
|
@@ -160,7 +162,7 @@ var useLocationListTableColumns = () => {
|
|
|
160
162
|
actions: (ctx) => {
|
|
161
163
|
const location = ctx.row.original;
|
|
162
164
|
return [
|
|
163
|
-
[
|
|
165
|
+
!can("stock_locations", "edit") ? [] : [
|
|
164
166
|
{
|
|
165
167
|
icon: /* @__PURE__ */ jsx(PencilSquare, {}),
|
|
166
168
|
label: t("actions.edit"),
|
|
@@ -169,19 +171,19 @@ var useLocationListTableColumns = () => {
|
|
|
169
171
|
}
|
|
170
172
|
}
|
|
171
173
|
],
|
|
172
|
-
[
|
|
174
|
+
!can("stock_locations", "manage") ? [] : [
|
|
173
175
|
{
|
|
174
176
|
icon: /* @__PURE__ */ jsx(Trash, {}),
|
|
175
177
|
label: t("actions.delete"),
|
|
176
178
|
onClick: () => handleDelete(location)
|
|
177
179
|
}
|
|
178
180
|
]
|
|
179
|
-
];
|
|
181
|
+
].filter((group) => group.length > 0);
|
|
180
182
|
}
|
|
181
183
|
})
|
|
182
184
|
],
|
|
183
185
|
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
184
|
-
[navigate, t]
|
|
186
|
+
[navigate, t, can]
|
|
185
187
|
);
|
|
186
188
|
};
|
|
187
189
|
|
|
@@ -257,6 +259,7 @@ var LocationListContent = () => {
|
|
|
257
259
|
},
|
|
258
260
|
actions: [
|
|
259
261
|
{
|
|
262
|
+
permission: "stock_locations:edit",
|
|
260
263
|
label: t("actions.create"),
|
|
261
264
|
to: "create"
|
|
262
265
|
}
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
} from "./chunk-KMSBY4PU.js";
|
|
31
31
|
import {
|
|
32
32
|
useProductTableFilters
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-ZQZFY3UY.js";
|
|
34
34
|
import {
|
|
35
35
|
useProductTableQuery
|
|
36
36
|
} from "./chunk-S4IDR46L.js";
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
import {
|
|
42
42
|
_DataTable,
|
|
43
43
|
useDataTable
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-SU36MZXC.js";
|
|
45
45
|
import {
|
|
46
46
|
useProductTypes
|
|
47
47
|
} from "./chunk-AEBQQ2EG.js";
|
|
@@ -58,6 +58,7 @@ import {
|
|
|
58
58
|
|
|
59
59
|
// src/pages/tax-regions/common/components/target-form/target-form.tsx
|
|
60
60
|
import { Button, Checkbox } from "@medusajs/ui";
|
|
61
|
+
import { SectionNoAccess, isForbidden, useCan } from "@mercurjs/dashboard-shared";
|
|
61
62
|
import { keepPreviousData } from "@tanstack/react-query";
|
|
62
63
|
import {
|
|
63
64
|
createColumnHelper as createColumnHelper2
|
|
@@ -209,10 +210,12 @@ var ProductTable = ({
|
|
|
209
210
|
pageSize: PAGE_SIZE,
|
|
210
211
|
prefix: PREFIX_PRODUCT
|
|
211
212
|
});
|
|
213
|
+
const canViewTargets = useCan("products");
|
|
212
214
|
const { products, count, isLoading, isError, error } = useProducts(
|
|
213
215
|
searchParams,
|
|
214
216
|
{
|
|
215
|
-
placeholderData: keepPreviousData
|
|
217
|
+
placeholderData: keepPreviousData,
|
|
218
|
+
enabled: canViewTargets
|
|
216
219
|
}
|
|
217
220
|
);
|
|
218
221
|
const updater = (value) => {
|
|
@@ -247,6 +250,9 @@ var ProductTable = ({
|
|
|
247
250
|
pageSize: PAGE_SIZE,
|
|
248
251
|
prefix: PREFIX_PRODUCT
|
|
249
252
|
});
|
|
253
|
+
if (!canViewTargets || isForbidden(error)) {
|
|
254
|
+
return /* @__PURE__ */ jsx2(SectionNoAccess, {});
|
|
255
|
+
}
|
|
250
256
|
if (isError) {
|
|
251
257
|
throw error;
|
|
252
258
|
}
|
|
@@ -319,10 +325,12 @@ var ProductTypeTable = ({
|
|
|
319
325
|
pageSize: PAGE_SIZE,
|
|
320
326
|
prefix: PREFIX_PRODUCT_TYPE
|
|
321
327
|
});
|
|
328
|
+
const canViewTargets = useCan("product_types");
|
|
322
329
|
const { product_types, count, isLoading, isError, error } = useProductTypes(
|
|
323
330
|
searchParams,
|
|
324
331
|
{
|
|
325
|
-
placeholderData: keepPreviousData
|
|
332
|
+
placeholderData: keepPreviousData,
|
|
333
|
+
enabled: canViewTargets
|
|
326
334
|
}
|
|
327
335
|
);
|
|
328
336
|
const updater = (value) => {
|
|
@@ -357,6 +365,9 @@ var ProductTypeTable = ({
|
|
|
357
365
|
pageSize: PAGE_SIZE,
|
|
358
366
|
prefix: PREFIX_PRODUCT_TYPE
|
|
359
367
|
});
|
|
368
|
+
if (!canViewTargets || isForbidden(error)) {
|
|
369
|
+
return /* @__PURE__ */ jsx2(SectionNoAccess, {});
|
|
370
|
+
}
|
|
360
371
|
if (isError) {
|
|
361
372
|
throw error;
|
|
362
373
|
}
|
|
@@ -429,13 +440,15 @@ var ShippingOptionTable = ({
|
|
|
429
440
|
pageSize: PAGE_SIZE,
|
|
430
441
|
prefix: PREFIX_SHIPPING_OPTION
|
|
431
442
|
});
|
|
443
|
+
const canViewTargets = useCan("shipping_options");
|
|
432
444
|
const { shipping_options, count, isLoading, isError, error } = useShippingOptions(
|
|
433
445
|
{
|
|
434
446
|
...searchParams,
|
|
435
447
|
fields: "+service_zone.fulfillment_set.location.*"
|
|
436
448
|
},
|
|
437
449
|
{
|
|
438
|
-
placeholderData: keepPreviousData
|
|
450
|
+
placeholderData: keepPreviousData,
|
|
451
|
+
enabled: canViewTargets
|
|
439
452
|
}
|
|
440
453
|
);
|
|
441
454
|
const updater = (value) => {
|
|
@@ -454,9 +467,13 @@ var ShippingOptionTable = ({
|
|
|
454
467
|
setIntermediate([...filteredIntermediate, ...newShippingOptions]);
|
|
455
468
|
setRowSelection(state);
|
|
456
469
|
};
|
|
457
|
-
const
|
|
458
|
-
|
|
459
|
-
|
|
470
|
+
const canViewLocations = useCan("stock_locations");
|
|
471
|
+
const { stock_locations } = useStockLocations(
|
|
472
|
+
{
|
|
473
|
+
limit: 1e3
|
|
474
|
+
},
|
|
475
|
+
{ enabled: canViewLocations }
|
|
476
|
+
);
|
|
460
477
|
const filters = useShippingOptionTableFilters(stock_locations || []);
|
|
461
478
|
const columns = useShippingOptionColumns();
|
|
462
479
|
const { table } = useDataTable({
|
|
@@ -473,6 +490,9 @@ var ShippingOptionTable = ({
|
|
|
473
490
|
pageSize: PAGE_SIZE,
|
|
474
491
|
prefix: PREFIX_SHIPPING_OPTION
|
|
475
492
|
});
|
|
493
|
+
if (!canViewTargets || isForbidden(error)) {
|
|
494
|
+
return /* @__PURE__ */ jsx2(SectionNoAccess, {});
|
|
495
|
+
}
|
|
476
496
|
if (isError) {
|
|
477
497
|
throw error;
|
|
478
498
|
}
|
|
@@ -555,6 +575,7 @@ var useCleanupSearchParams = (prefix) => {
|
|
|
555
575
|
// src/pages/tax-regions/common/components/target-item/target-item.tsx
|
|
556
576
|
import { XMarkMini } from "@medusajs/icons";
|
|
557
577
|
import { IconButton, Text } from "@medusajs/ui";
|
|
578
|
+
import { useCan as useCan2 } from "@mercurjs/dashboard-shared";
|
|
558
579
|
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
559
580
|
var TargetItem = ({
|
|
560
581
|
index,
|
|
@@ -562,13 +583,14 @@ var TargetItem = ({
|
|
|
562
583
|
onRemove,
|
|
563
584
|
value
|
|
564
585
|
}) => {
|
|
586
|
+
const canViewProducts = useCan2("products");
|
|
565
587
|
const { product } = useProduct(
|
|
566
588
|
value,
|
|
567
589
|
{ fields: "id,title" },
|
|
568
|
-
{ enabled: !label }
|
|
590
|
+
{ enabled: !label && canViewProducts }
|
|
569
591
|
);
|
|
570
592
|
return /* @__PURE__ */ jsxs2("div", { className: "bg-ui-bg-field-component shadow-borders-base flex items-center justify-between gap-2 rounded-md px-2 py-0.5", children: [
|
|
571
|
-
/* @__PURE__ */ jsx3(Text, { size: "small", leading: "compact", children: label || product?.title }),
|
|
593
|
+
/* @__PURE__ */ jsx3(Text, { size: "small", leading: "compact", children: label || product?.title || value }),
|
|
572
594
|
/* @__PURE__ */ jsx3(
|
|
573
595
|
IconButton,
|
|
574
596
|
{
|
|
@@ -17,6 +17,9 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
Form
|
|
19
19
|
} from "./chunk-3QSRE5LS.js";
|
|
20
|
+
import {
|
|
21
|
+
ConditionalTooltip
|
|
22
|
+
} from "./chunk-LAVHRER2.js";
|
|
20
23
|
import {
|
|
21
24
|
useCampaign,
|
|
22
25
|
useUpdatePromotion
|
|
@@ -35,6 +38,7 @@ import { useEffect } from "react";
|
|
|
35
38
|
import { useForm, useWatch } from "react-hook-form";
|
|
36
39
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
37
40
|
import * as zod from "zod";
|
|
41
|
+
import { usePermissionGate } from "@mercurjs/dashboard-shared";
|
|
38
42
|
|
|
39
43
|
// src/pages/promotions/promotion-add-campaign/components/add-campaign-promotion-form/campaign-details.tsx
|
|
40
44
|
import { Heading, Text } from "@medusajs/ui";
|
|
@@ -119,6 +123,7 @@ var AddCampaignPromotionFields = ({
|
|
|
119
123
|
control: form.control,
|
|
120
124
|
name: "campaign_choice"
|
|
121
125
|
});
|
|
126
|
+
const campaignsGate = usePermissionGate("campaigns:view");
|
|
122
127
|
const campaignsCombobox = useComboboxData({
|
|
123
128
|
queryFn: (params) => sdk.admin.campaigns.query({
|
|
124
129
|
...params
|
|
@@ -129,13 +134,14 @@ var AddCampaignPromotionFields = ({
|
|
|
129
134
|
value: campaign.id,
|
|
130
135
|
disabled: campaign.budget?.currency_code && campaign.budget?.currency_code?.toLowerCase() !== promotionCurrencyCode?.toLowerCase()
|
|
131
136
|
// also cannot add promotion which doesn't have currency defined to a campaign with a currency amount budget
|
|
132
|
-
}))
|
|
137
|
+
})),
|
|
138
|
+
enabled: campaignsGate.allowed
|
|
133
139
|
});
|
|
134
140
|
const { campaign: selectedCampaign } = useCampaign(
|
|
135
141
|
watchCampaignId,
|
|
136
142
|
void 0,
|
|
137
143
|
{
|
|
138
|
-
enabled: !!watchCampaignId
|
|
144
|
+
enabled: !!watchCampaignId && campaignsGate.allowed
|
|
139
145
|
}
|
|
140
146
|
);
|
|
141
147
|
return /* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-y-8", "data-testid": "promotion-add-campaign-fields", children: [
|
|
@@ -204,18 +210,26 @@ var AddCampaignPromotionFields = ({
|
|
|
204
210
|
render: ({ field: { onChange, ...field } }) => {
|
|
205
211
|
return /* @__PURE__ */ jsxs2(Form.Item, { "data-testid": "promotion-add-campaign-form-campaign-id-item", children: [
|
|
206
212
|
/* @__PURE__ */ jsx2(Form.Label, { tooltip: t("campaigns.fields.campaign_id.hint"), "data-testid": "promotion-add-campaign-form-campaign-id-label", children: t("promotions.form.campaign.existing.title") }),
|
|
207
|
-
/* @__PURE__ */ jsx2(
|
|
208
|
-
|
|
213
|
+
/* @__PURE__ */ jsx2(
|
|
214
|
+
ConditionalTooltip,
|
|
209
215
|
{
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
216
|
+
showTooltip: campaignsGate.denied,
|
|
217
|
+
content: campaignsGate.tooltip,
|
|
218
|
+
children: /* @__PURE__ */ jsx2("div", { children: /* @__PURE__ */ jsx2(Form.Control, { "data-testid": "promotion-add-campaign-form-campaign-id-control", children: /* @__PURE__ */ jsx2(
|
|
219
|
+
Combobox,
|
|
220
|
+
{
|
|
221
|
+
dir: direction,
|
|
222
|
+
options: campaignsCombobox.options,
|
|
223
|
+
searchValue: campaignsCombobox.searchValue,
|
|
224
|
+
onSearchValueChange: campaignsCombobox.onSearchValueChange,
|
|
225
|
+
onChange,
|
|
226
|
+
...field,
|
|
227
|
+
disabled: campaignsGate.denied,
|
|
228
|
+
"data-testid": "promotion-add-campaign-form-campaign-id-combobox"
|
|
229
|
+
}
|
|
230
|
+
) }) })
|
|
217
231
|
}
|
|
218
|
-
)
|
|
232
|
+
),
|
|
219
233
|
!promotionCurrencyCode && /* @__PURE__ */ jsx2(Form.Hint, { "data-testid": "promotion-add-campaign-form-campaign-id-hint", children: t("promotions.form.campaign.existing.currencyHint") }),
|
|
220
234
|
/* @__PURE__ */ jsx2(Form.ErrorMessage, { "data-testid": "promotion-add-campaign-form-campaign-id-error" })
|
|
221
235
|
] });
|