@mercurjs/admin 2.3.6-canary.6 → 2.3.6-canary.7
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
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
NoRecords,
|
|
10
10
|
NoResults
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4J74G7N2.js";
|
|
12
12
|
import {
|
|
13
13
|
useDate
|
|
14
14
|
} from "./chunk-EIWPJWKF.js";
|
|
@@ -1140,6 +1140,7 @@ var DataTableQuery = ({
|
|
|
1140
1140
|
};
|
|
1141
1141
|
|
|
1142
1142
|
// src/components/table/data-table/data-table-root/data-table-root.tsx
|
|
1143
|
+
import { isPermitted, PermissionsContext } from "@mercurjs/dashboard-shared";
|
|
1143
1144
|
import { CommandBar, Table, clx as clx7 } from "@medusajs/ui";
|
|
1144
1145
|
import {
|
|
1145
1146
|
flexRender
|
|
@@ -1148,7 +1149,8 @@ import {
|
|
|
1148
1149
|
Fragment,
|
|
1149
1150
|
useEffect as useEffect4,
|
|
1150
1151
|
useRef as useRef2,
|
|
1151
|
-
useState as useState6
|
|
1152
|
+
useState as useState6,
|
|
1153
|
+
useContext as useContext2
|
|
1152
1154
|
} from "react";
|
|
1153
1155
|
import { useTranslation as useTranslation6 } from "react-i18next";
|
|
1154
1156
|
import { Link } from "react-router-dom";
|
|
@@ -1171,6 +1173,7 @@ var DataTableRoot = ({
|
|
|
1171
1173
|
const scrollableRef = useRef2(null);
|
|
1172
1174
|
const hasSelect = columns.find((c) => c.id === "select");
|
|
1173
1175
|
const hasActions = columns.find((c) => c.id === "actions");
|
|
1176
|
+
const permissions = useContext2(PermissionsContext);
|
|
1174
1177
|
const hasCommandBar = commands && commands.length > 0;
|
|
1175
1178
|
const rowSelection = table.getState().rowSelection;
|
|
1176
1179
|
const { pageIndex, pageSize } = table.getState().pagination;
|
|
@@ -1358,7 +1361,12 @@ var DataTableRoot = ({
|
|
|
1358
1361
|
{
|
|
1359
1362
|
label: command.label,
|
|
1360
1363
|
shortcut: command.shortcut,
|
|
1361
|
-
action: () => handleAction(command.action)
|
|
1364
|
+
action: () => handleAction(command.action),
|
|
1365
|
+
disabled: !isPermitted(
|
|
1366
|
+
permissions,
|
|
1367
|
+
command.permission,
|
|
1368
|
+
command.requireAll
|
|
1369
|
+
)
|
|
1362
1370
|
}
|
|
1363
1371
|
),
|
|
1364
1372
|
index < commands.length - 1 && /* @__PURE__ */ jsx8(CommandBar.Seperator, {})
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
buildOfferGridData,
|
|
4
4
|
usePriceListCurrencyData,
|
|
5
5
|
usePriceListGridColumns
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GIV6KSQX.js";
|
|
7
7
|
import {
|
|
8
8
|
useOfferTableColumns,
|
|
9
9
|
useOfferTableFilters,
|
|
10
10
|
useOfferTableQuery
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2IOADJUM.js";
|
|
12
12
|
import {
|
|
13
13
|
extractPricesFromOffers
|
|
14
14
|
} from "./chunk-KVAD5JGS.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
import {
|
|
31
31
|
_DataTable,
|
|
32
32
|
useDataTable
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-SU36MZXC.js";
|
|
34
34
|
import {
|
|
35
35
|
useBatchPriceListPrices,
|
|
36
36
|
usePriceList
|
|
@@ -64,6 +64,7 @@ var PriceListPricesAddProductsFields = Object.keys(
|
|
|
64
64
|
// src/pages/price-lists/price-list-prices-add/price-list-prices-add.tsx
|
|
65
65
|
import { Children as Children2 } from "react";
|
|
66
66
|
import { useParams } from "react-router-dom";
|
|
67
|
+
import { SectionNoAccess as SectionNoAccess2 } from "@mercurjs/dashboard-shared";
|
|
67
68
|
|
|
68
69
|
// src/pages/price-lists/price-list-prices-add/components/price-list-prices-add-form/price-list-prices-add-form.tsx
|
|
69
70
|
import { zodResolver } from "@hookform/resolvers/zod";
|
|
@@ -73,6 +74,7 @@ import { useForm } from "react-hook-form";
|
|
|
73
74
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
74
75
|
|
|
75
76
|
// src/pages/price-lists/price-list-prices-add/components/price-list-prices-add-form/price-list-prices-add-prices-form.tsx
|
|
77
|
+
import { usePermissions } from "@mercurjs/dashboard-shared";
|
|
76
78
|
import { useEffect, useMemo } from "react";
|
|
77
79
|
import { useWatch } from "react-hook-form";
|
|
78
80
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -86,13 +88,14 @@ var Root = ({
|
|
|
86
88
|
const { setCloseOnEscape } = useRouteModal();
|
|
87
89
|
const offerIds = useWatch({ control: form.control, name: "offer_ids" });
|
|
88
90
|
const existingOffers = useWatch({ control: form.control, name: "offers" });
|
|
91
|
+
const { can } = usePermissions();
|
|
89
92
|
const { offers: selectedOffers } = useOffers(
|
|
90
93
|
{
|
|
91
94
|
id: offerIds,
|
|
92
95
|
limit: offerIds?.length || 1,
|
|
93
96
|
fields: "id,variant_id,product_id,seller_id,sku,seller.name,product.title,product.thumbnail"
|
|
94
97
|
},
|
|
95
|
-
{ enabled: (offerIds?.length ?? 0) > 0 }
|
|
98
|
+
{ enabled: (offerIds?.length ?? 0) > 0 && can("offers") }
|
|
96
99
|
);
|
|
97
100
|
const productIds = useMemo(
|
|
98
101
|
() => Array.from(
|
|
@@ -102,7 +105,7 @@ var Root = ({
|
|
|
102
105
|
);
|
|
103
106
|
const { products, isLoading } = useProducts(
|
|
104
107
|
{ id: productIds, limit: productIds.length || 1, fields: "id,*variants" },
|
|
105
|
-
{ enabled: productIds.length > 0 }
|
|
108
|
+
{ enabled: productIds.length > 0 && can("products") }
|
|
106
109
|
);
|
|
107
110
|
const { gridData, variantIdByOffer } = useMemo(
|
|
108
111
|
() => buildOfferGridData(
|
|
@@ -153,6 +156,7 @@ import {
|
|
|
153
156
|
} from "@tanstack/react-table";
|
|
154
157
|
import { useMemo as useMemo2, useRef, useState } from "react";
|
|
155
158
|
import { useTranslation } from "react-i18next";
|
|
159
|
+
import { SectionNoAccess, isForbidden, useCan } from "@mercurjs/dashboard-shared";
|
|
156
160
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
157
161
|
var PAGE_SIZE = 50;
|
|
158
162
|
var PREFIX = "p";
|
|
@@ -179,8 +183,10 @@ var Root2 = ({ priceList }) => {
|
|
|
179
183
|
pageSize: PAGE_SIZE,
|
|
180
184
|
prefix: PREFIX
|
|
181
185
|
});
|
|
186
|
+
const canViewOffers = useCan("offers");
|
|
182
187
|
const { offers, count, isLoading, isError, error } = useOffers(searchParams, {
|
|
183
|
-
placeholderData: keepPreviousData
|
|
188
|
+
placeholderData: keepPreviousData,
|
|
189
|
+
enabled: canViewOffers
|
|
184
190
|
});
|
|
185
191
|
const offerMeta = useRef({});
|
|
186
192
|
for (const offer of offers ?? []) {
|
|
@@ -227,6 +233,9 @@ var Root2 = ({ priceList }) => {
|
|
|
227
233
|
pageSize: PAGE_SIZE,
|
|
228
234
|
prefix: PREFIX
|
|
229
235
|
});
|
|
236
|
+
if (!canViewOffers || isForbidden(error)) {
|
|
237
|
+
return /* @__PURE__ */ jsx2(SectionNoAccess, {});
|
|
238
|
+
}
|
|
230
239
|
if (isError) {
|
|
231
240
|
throw error;
|
|
232
241
|
}
|
|
@@ -361,7 +370,7 @@ var PriceListPricesAddForm = ({
|
|
|
361
370
|
};
|
|
362
371
|
|
|
363
372
|
// src/pages/price-lists/price-list-prices-add/price-list-prices-add.tsx
|
|
364
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
373
|
+
import { Fragment, jsx as jsx4, jsxs } from "react/jsx-runtime";
|
|
365
374
|
var Root3 = ({ children }) => {
|
|
366
375
|
const { id } = useParams();
|
|
367
376
|
const { price_list, isPending, isError, error } = usePriceList(id, {
|
|
@@ -372,13 +381,19 @@ var Root3 = ({ children }) => {
|
|
|
372
381
|
if (isError) {
|
|
373
382
|
throw error;
|
|
374
383
|
}
|
|
375
|
-
return /* @__PURE__ */
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
384
|
+
return /* @__PURE__ */ jsxs(RouteFocusModal, { prev: `/price-lists/${id}`, children: [
|
|
385
|
+
currencyData.isForbidden && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
386
|
+
/* @__PURE__ */ jsx4(RouteFocusModal.Header, {}),
|
|
387
|
+
/* @__PURE__ */ jsx4(RouteFocusModal.Body, { children: /* @__PURE__ */ jsx4(SectionNoAccess2, {}) })
|
|
388
|
+
] }),
|
|
389
|
+
ready && (Children2.count(children) > 0 ? children : /* @__PURE__ */ jsx4(
|
|
390
|
+
PriceListPricesAddForm,
|
|
391
|
+
{
|
|
392
|
+
priceList: price_list,
|
|
393
|
+
...currencyData
|
|
394
|
+
}
|
|
395
|
+
))
|
|
396
|
+
] });
|
|
382
397
|
};
|
|
383
398
|
var PriceListPricesAddPage = Object.assign(Root3, {
|
|
384
399
|
Form: PriceListPricesAddForm,
|
|
@@ -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
|
ActionMenu
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-3UOYBH5O.js";
|
|
17
17
|
import {
|
|
18
18
|
useUsers
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-AZV22U4V.js";
|
|
20
20
|
|
|
21
21
|
// src/pages/users/user-list/user-list.tsx
|
|
22
22
|
import { Children as Children3 } from "react";
|
|
@@ -229,6 +229,7 @@ var UserActions = ({ user }) => {
|
|
|
229
229
|
actions: [
|
|
230
230
|
{
|
|
231
231
|
icon: /* @__PURE__ */ jsx2(PencilSquare, {}),
|
|
232
|
+
permission: "users:edit",
|
|
232
233
|
label: t("actions.edit"),
|
|
233
234
|
onClick: () => {
|
|
234
235
|
navigate(`${user.id}/edit`);
|
|
@@ -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
|
useCustomerGroup,
|
|
22
22
|
useCustomers,
|
|
@@ -35,7 +35,7 @@ import { useLinkQuery, WidgetZone } from "@mercurjs/dashboard-shared";
|
|
|
35
35
|
// src/pages/customer-groups/customer-group-detail/components/customer-group-customer-section/customer-group-customer-section.tsx
|
|
36
36
|
import { PencilSquare, Trash } from "@medusajs/icons";
|
|
37
37
|
import { Button, Checkbox, Container, Heading, usePrompt } from "@medusajs/ui";
|
|
38
|
-
import { DisplayExtensionZone } from "@mercurjs/dashboard-shared";
|
|
38
|
+
import { DisplayExtensionZone, PermissionAction } from "@mercurjs/dashboard-shared";
|
|
39
39
|
import { createColumnHelper } from "@tanstack/react-table";
|
|
40
40
|
import { useMemo, useState } from "react";
|
|
41
41
|
import { useTranslation } from "react-i18next";
|
|
@@ -99,7 +99,7 @@ var CustomerGroupCustomerSection = ({
|
|
|
99
99
|
return /* @__PURE__ */ jsxs(Container, { className: "divide-y p-0", "data-testid": "customer-group-customer-section", children: [
|
|
100
100
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", "data-testid": "customer-group-customer-section-header", children: [
|
|
101
101
|
/* @__PURE__ */ jsx(Heading, { level: "h2", "data-testid": "customer-group-customer-section-heading", children: t("customers.domain") }),
|
|
102
|
-
/* @__PURE__ */ jsx(
|
|
102
|
+
/* @__PURE__ */ jsx(PermissionAction, { permission: "customer_groups:edit", children: /* @__PURE__ */ jsx(Button, { variant: "secondary", size: "small", asChild: true, "data-testid": "customer-group-customer-section-add-button", children: /* @__PURE__ */ jsx(Link, { to: `/customer-groups/${group.id}/add-customers`, "data-testid": "customer-group-customer-section-add-link", children: t("general.add") }) }) })
|
|
103
103
|
] }),
|
|
104
104
|
/* @__PURE__ */ jsx(
|
|
105
105
|
_DataTable,
|
|
@@ -125,6 +125,7 @@ var CustomerGroupCustomerSection = ({
|
|
|
125
125
|
commands: [
|
|
126
126
|
{
|
|
127
127
|
action: handleRemove,
|
|
128
|
+
permission: "customer_groups:edit",
|
|
128
129
|
label: t("actions.remove"),
|
|
129
130
|
shortcut: "r"
|
|
130
131
|
}
|
|
@@ -177,7 +178,8 @@ var CustomerActions = ({
|
|
|
177
178
|
{
|
|
178
179
|
icon: /* @__PURE__ */ jsx(PencilSquare, {}),
|
|
179
180
|
label: t("actions.edit"),
|
|
180
|
-
to: `/customers/${customer.id}/edit
|
|
181
|
+
to: `/customers/${customer.id}/edit`,
|
|
182
|
+
permission: "customers:edit"
|
|
181
183
|
}
|
|
182
184
|
]
|
|
183
185
|
},
|
|
@@ -186,7 +188,8 @@ var CustomerActions = ({
|
|
|
186
188
|
{
|
|
187
189
|
icon: /* @__PURE__ */ jsx(Trash, {}),
|
|
188
190
|
label: t("actions.remove"),
|
|
189
|
-
onClick: handleRemove
|
|
191
|
+
onClick: handleRemove,
|
|
192
|
+
permission: "customer_groups:edit"
|
|
190
193
|
}
|
|
191
194
|
]
|
|
192
195
|
}
|
|
@@ -295,7 +298,8 @@ var CustomerGroupGeneralSection = ({
|
|
|
295
298
|
{
|
|
296
299
|
icon: /* @__PURE__ */ jsx2(PencilSquare2, {}),
|
|
297
300
|
label: t("actions.edit"),
|
|
298
|
-
to: `/customer-groups/${group.id}/edit
|
|
301
|
+
to: `/customer-groups/${group.id}/edit`,
|
|
302
|
+
permission: "customer_groups:edit"
|
|
299
303
|
}
|
|
300
304
|
]
|
|
301
305
|
},
|
|
@@ -304,7 +308,8 @@ var CustomerGroupGeneralSection = ({
|
|
|
304
308
|
{
|
|
305
309
|
icon: /* @__PURE__ */ jsx2(Trash2, {}),
|
|
306
310
|
label: t("actions.delete"),
|
|
307
|
-
onClick: handleDelete
|
|
311
|
+
onClick: handleDelete,
|
|
312
|
+
permission: "customer_groups:manage"
|
|
308
313
|
}
|
|
309
314
|
]
|
|
310
315
|
}
|
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
_DataTable,
|
|
9
9
|
useDataTable
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SU36MZXC.js";
|
|
11
11
|
import {
|
|
12
12
|
NoRecords
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-4J74G7N2.js";
|
|
14
14
|
import {
|
|
15
15
|
ActionMenu
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-3UOYBH5O.js";
|
|
17
17
|
|
|
18
18
|
// src/pages/offers/[id]/_components/offer-inventory-section.tsx
|
|
19
19
|
import { Buildings } from "@medusajs/icons";
|
|
@@ -17101,6 +17101,7 @@ var en_default = {
|
|
|
17101
17101
|
}
|
|
17102
17102
|
},
|
|
17103
17103
|
permissions: {
|
|
17104
|
+
noAccess: "You don't have permission to view this.",
|
|
17104
17105
|
accessDenied: {
|
|
17105
17106
|
title: "Access Denied",
|
|
17106
17107
|
description: "You don't have permission to access this page.",
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk-E74OUNA3.js";
|
|
15
15
|
import {
|
|
16
16
|
ActionMenu
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-3UOYBH5O.js";
|
|
18
18
|
import {
|
|
19
19
|
TwoColumnPageSkeleton
|
|
20
20
|
} from "./chunk-INNFZYX2.js";
|
|
@@ -31,6 +31,7 @@ import { PencilSquare, Trash } from "@medusajs/icons";
|
|
|
31
31
|
import { Button, Container, Heading, StatusBadge, Text } from "@medusajs/ui";
|
|
32
32
|
import { useTranslation } from "react-i18next";
|
|
33
33
|
import { Link } from "react-router-dom";
|
|
34
|
+
import { PermissionAction } from "@mercurjs/dashboard-shared";
|
|
34
35
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
35
36
|
var Row = ({ label, children }) => /* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
|
|
36
37
|
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", weight: "plus", children: label }),
|
|
@@ -66,6 +67,7 @@ var ReviewGeneralSection = ({ review }) => {
|
|
|
66
67
|
actions: [
|
|
67
68
|
{
|
|
68
69
|
icon: /* @__PURE__ */ jsx(PencilSquare, {}),
|
|
70
|
+
permission: "reviews:edit",
|
|
69
71
|
label: t("actions.edit"),
|
|
70
72
|
to: "edit"
|
|
71
73
|
}
|
|
@@ -75,6 +77,7 @@ var ReviewGeneralSection = ({ review }) => {
|
|
|
75
77
|
actions: [
|
|
76
78
|
{
|
|
77
79
|
icon: /* @__PURE__ */ jsx(Trash, {}),
|
|
80
|
+
permission: "reviews:manage",
|
|
78
81
|
label: t("actions.delete"),
|
|
79
82
|
onClick: handleDelete
|
|
80
83
|
}
|
|
@@ -89,7 +92,7 @@ var ReviewGeneralSection = ({ review }) => {
|
|
|
89
92
|
/* @__PURE__ */ jsx(Row, { label: t("reviews.fields.rating"), children: /* @__PURE__ */ jsx(StarRating, { rating: review.rating }) }),
|
|
90
93
|
/* @__PURE__ */ jsx(Row, { label: t("reviews.fields.content"), children: /* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", children: review.customer_note || "-" }) }),
|
|
91
94
|
/* @__PURE__ */ jsx(Row, { label: t("reviews.fields.response"), children: /* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", children: review.seller_note || "-" }) }),
|
|
92
|
-
!hasResponse && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-end px-6 py-4", children: /* @__PURE__ */ jsx(
|
|
95
|
+
!hasResponse && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-end px-6 py-4", children: /* @__PURE__ */ jsx(PermissionAction, { permission: "reviews:edit", children: /* @__PURE__ */ jsx(
|
|
93
96
|
Button,
|
|
94
97
|
{
|
|
95
98
|
size: "small",
|
|
@@ -98,7 +101,7 @@ var ReviewGeneralSection = ({ review }) => {
|
|
|
98
101
|
"data-testid": "review-general-section-respond-button",
|
|
99
102
|
children: /* @__PURE__ */ jsx(Link, { to: "respond", children: t("reviews.respond.action") })
|
|
100
103
|
}
|
|
101
|
-
) })
|
|
104
|
+
) }) })
|
|
102
105
|
] });
|
|
103
106
|
};
|
|
104
107
|
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
} from "./chunk-ZVNGPUNQ.js";
|
|
4
4
|
import {
|
|
5
5
|
useOfferTableCommands
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2MOTQNEG.js";
|
|
7
7
|
import {
|
|
8
8
|
useOfferTableColumns,
|
|
9
9
|
useOfferTableFilters,
|
|
10
10
|
useOfferTableQuery
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2IOADJUM.js";
|
|
12
12
|
import {
|
|
13
13
|
IconAvatar
|
|
14
14
|
} from "./chunk-U2EI2ZLM.js";
|
|
15
15
|
import {
|
|
16
16
|
useOrderTableFilters
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4JQDYQSX.js";
|
|
18
18
|
import {
|
|
19
19
|
useOffers
|
|
20
20
|
} from "./chunk-GNNOFJAK.js";
|
|
@@ -42,13 +42,13 @@ import {
|
|
|
42
42
|
import {
|
|
43
43
|
_DataTable,
|
|
44
44
|
useDataTable
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-SU36MZXC.js";
|
|
46
46
|
import {
|
|
47
47
|
NoRecords
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-4J74G7N2.js";
|
|
49
49
|
import {
|
|
50
50
|
ActionMenu
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-3UOYBH5O.js";
|
|
52
52
|
import {
|
|
53
53
|
useOrders
|
|
54
54
|
} from "./chunk-DYCCRR7B.js";
|
|
@@ -98,7 +98,7 @@ var storeDetailLoader = async ({ params }) => {
|
|
|
98
98
|
import { Children as Children3, useState as useState3 } from "react";
|
|
99
99
|
import { useParams } from "react-router-dom";
|
|
100
100
|
import { useTranslation as useTranslation12 } from "react-i18next";
|
|
101
|
-
import { WidgetZone, useLinkQuery } from "@mercurjs/dashboard-shared";
|
|
101
|
+
import { WidgetZone, useLinkQuery, usePermissions } from "@mercurjs/dashboard-shared";
|
|
102
102
|
var import_types3 = __toESM(require_dist(), 1);
|
|
103
103
|
|
|
104
104
|
// src/pages/stores/store-details/components/store-general-section.tsx
|
|
@@ -170,7 +170,8 @@ var StoreDetailEditButton = ({ seller }) => {
|
|
|
170
170
|
{
|
|
171
171
|
icon: /* @__PURE__ */ jsx(PencilSquare, {}),
|
|
172
172
|
label: t("actions.edit"),
|
|
173
|
-
to: `/stores/${seller.id}/edit
|
|
173
|
+
to: `/stores/${seller.id}/edit`,
|
|
174
|
+
permission: "sellers:edit"
|
|
174
175
|
}
|
|
175
176
|
]
|
|
176
177
|
}
|
|
@@ -194,7 +195,8 @@ var StoreDetailActions = ({
|
|
|
194
195
|
{
|
|
195
196
|
icon: /* @__PURE__ */ jsx(PencilSquare, {}),
|
|
196
197
|
label: t("actions.edit"),
|
|
197
|
-
to: `/stores/${seller.id}/edit
|
|
198
|
+
to: `/stores/${seller.id}/edit`,
|
|
199
|
+
permission: "sellers:edit"
|
|
198
200
|
}
|
|
199
201
|
]
|
|
200
202
|
}
|
|
@@ -316,7 +318,8 @@ var StorePaymentDetailsSection = ({
|
|
|
316
318
|
{
|
|
317
319
|
label: t("actions.edit"),
|
|
318
320
|
icon: /* @__PURE__ */ jsx3(PencilSquare2, {}),
|
|
319
|
-
to: `/stores/${seller.id}/payment-details
|
|
321
|
+
to: `/stores/${seller.id}/payment-details`,
|
|
322
|
+
permission: "sellers:edit"
|
|
320
323
|
}
|
|
321
324
|
]
|
|
322
325
|
}
|
|
@@ -370,7 +373,8 @@ var StoreCompanyDetailsSection = ({
|
|
|
370
373
|
{
|
|
371
374
|
label: t("actions.edit"),
|
|
372
375
|
icon: /* @__PURE__ */ jsx4(PencilSquare3, {}),
|
|
373
|
-
to: `/stores/${seller.id}/professional-details
|
|
376
|
+
to: `/stores/${seller.id}/professional-details`,
|
|
377
|
+
permission: "sellers:edit"
|
|
374
378
|
}
|
|
375
379
|
]
|
|
376
380
|
}
|
|
@@ -467,7 +471,8 @@ var StoreAddressSection = ({ seller }) => {
|
|
|
467
471
|
{
|
|
468
472
|
label: t("actions.edit"),
|
|
469
473
|
icon: /* @__PURE__ */ jsx6(PencilSquare4, {}),
|
|
470
|
-
to: `/stores/${seller.id}/edit-address
|
|
474
|
+
to: `/stores/${seller.id}/edit-address`,
|
|
475
|
+
permission: "sellers:edit"
|
|
471
476
|
}
|
|
472
477
|
]
|
|
473
478
|
}
|
|
@@ -501,9 +506,10 @@ var StoreAddressSection = ({ seller }) => {
|
|
|
501
506
|
import { Button, Container as Container6, Heading as Heading6 } from "@medusajs/ui";
|
|
502
507
|
import { useTranslation as useTranslation8 } from "react-i18next";
|
|
503
508
|
import { Link } from "react-router-dom";
|
|
504
|
-
import { DisplayExtensionZone as DisplayExtensionZone6 } from "@mercurjs/dashboard-shared";
|
|
509
|
+
import { DisplayExtensionZone as DisplayExtensionZone6, PermissionAction } from "@mercurjs/dashboard-shared";
|
|
505
510
|
|
|
506
511
|
// src/pages/stores/store-details/components/store-members-section/store-members-data-table.tsx
|
|
512
|
+
import { useCan } from "@mercurjs/dashboard-shared";
|
|
507
513
|
import { useMemo } from "react";
|
|
508
514
|
import { ArrowPath, Link as LinkIcon, Trash, User } from "@medusajs/icons";
|
|
509
515
|
import { Badge as Badge2, toast } from "@medusajs/ui";
|
|
@@ -551,7 +557,12 @@ var StoreMembersDataTable = ({
|
|
|
551
557
|
{ limit: 100, offset: 0 },
|
|
552
558
|
{ placeholderData: keepPreviousData }
|
|
553
559
|
);
|
|
554
|
-
const
|
|
560
|
+
const canViewInvites = useCan("members.invites");
|
|
561
|
+
const { member_invites, isPending: isInvitesPending } = useSellerInvites(
|
|
562
|
+
sellerId,
|
|
563
|
+
void 0,
|
|
564
|
+
{ enabled: canViewInvites }
|
|
565
|
+
);
|
|
555
566
|
const rows = useMemo(() => {
|
|
556
567
|
const members = (seller_members ?? []).map((m) => ({
|
|
557
568
|
kind: "member",
|
|
@@ -598,7 +609,7 @@ var StoreMembersDataTable = ({
|
|
|
598
609
|
count: rows.length,
|
|
599
610
|
pageSize: PAGE_SIZE,
|
|
600
611
|
pagination: true,
|
|
601
|
-
isLoading: isMembersPending || isInvitesPending,
|
|
612
|
+
isLoading: isMembersPending || canViewInvites && isInvitesPending,
|
|
602
613
|
queryObject: raw,
|
|
603
614
|
orderBy: [
|
|
604
615
|
{ key: "created_at", label: t("fields.createdAt") },
|
|
@@ -722,7 +733,8 @@ var InviteActions = ({
|
|
|
722
733
|
{
|
|
723
734
|
icon: /* @__PURE__ */ jsx7(ArrowPath, {}),
|
|
724
735
|
label: t("users.resendInvite"),
|
|
725
|
-
onClick: handleResend
|
|
736
|
+
onClick: handleResend,
|
|
737
|
+
permission: "members.invites:edit"
|
|
726
738
|
},
|
|
727
739
|
{
|
|
728
740
|
icon: /* @__PURE__ */ jsx7(LinkIcon, {}),
|
|
@@ -736,7 +748,8 @@ var InviteActions = ({
|
|
|
736
748
|
{
|
|
737
749
|
icon: /* @__PURE__ */ jsx7(Trash, {}),
|
|
738
750
|
label: t("actions.delete"),
|
|
739
|
-
onClick: handleDelete
|
|
751
|
+
onClick: handleDelete,
|
|
752
|
+
permission: "members.invites:manage"
|
|
740
753
|
}
|
|
741
754
|
]
|
|
742
755
|
}
|
|
@@ -773,7 +786,8 @@ var MemberActions = ({
|
|
|
773
786
|
{
|
|
774
787
|
icon: /* @__PURE__ */ jsx7(Trash, {}),
|
|
775
788
|
label: t("actions.remove"),
|
|
776
|
-
onClick: handleRemove
|
|
789
|
+
onClick: handleRemove,
|
|
790
|
+
permission: "members:manage"
|
|
777
791
|
}
|
|
778
792
|
]
|
|
779
793
|
}
|
|
@@ -789,7 +803,7 @@ var StoreMembersSection = ({ sellerId }) => {
|
|
|
789
803
|
return /* @__PURE__ */ jsxs8(Container6, { className: "divide-y p-0", children: [
|
|
790
804
|
/* @__PURE__ */ jsxs8("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
791
805
|
/* @__PURE__ */ jsx8(Heading6, { level: "h2", children: t("users.domain") }),
|
|
792
|
-
/* @__PURE__ */ jsx8(
|
|
806
|
+
/* @__PURE__ */ jsx8(PermissionAction, { permission: "members.invites:edit", children: /* @__PURE__ */ jsx8(Button, { size: "small", variant: "secondary", asChild: true, children: /* @__PURE__ */ jsx8(Link, { to: "invite", children: t("stores.members.addUser.action") }) }) })
|
|
793
807
|
] }),
|
|
794
808
|
/* @__PURE__ */ jsx8(StoreMembersDataTable, { sellerId }),
|
|
795
809
|
/* @__PURE__ */ jsx8(DisplayExtensionZone6, { model: "seller", zone: "members", data: sellerId })
|
|
@@ -809,13 +823,23 @@ import {
|
|
|
809
823
|
toast as toast2
|
|
810
824
|
} from "@medusajs/ui";
|
|
811
825
|
import { useTranslation as useTranslation9 } from "react-i18next";
|
|
812
|
-
import {
|
|
826
|
+
import {
|
|
827
|
+
DisplayExtensionZone as DisplayExtensionZone7,
|
|
828
|
+
PermissionAction as PermissionAction2,
|
|
829
|
+
useCan as useCan2,
|
|
830
|
+
usePermissionGate
|
|
831
|
+
} from "@mercurjs/dashboard-shared";
|
|
813
832
|
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
814
833
|
var StoreRequestSection = ({ seller }) => {
|
|
815
834
|
const { t } = useTranslation9();
|
|
816
835
|
const { mutateAsync: approveSeller, isPending: isApproving } = useApproveSeller(seller.id);
|
|
817
836
|
const { mutateAsync: suspendSeller, isPending: isRejecting } = useSuspendSeller(seller.id);
|
|
818
|
-
const
|
|
837
|
+
const canViewMembers = useCan2("members");
|
|
838
|
+
const { seller_members } = useSellerMembers(
|
|
839
|
+
seller.id,
|
|
840
|
+
{ limit: 100 },
|
|
841
|
+
{ enabled: canViewMembers }
|
|
842
|
+
);
|
|
819
843
|
const owner = seller_members?.find(
|
|
820
844
|
(m) => m.is_owner
|
|
821
845
|
);
|
|
@@ -896,6 +920,7 @@ var RequestActionPrompt = ({
|
|
|
896
920
|
const { t } = useTranslation9();
|
|
897
921
|
const [open, setOpen] = useState(false);
|
|
898
922
|
const [note, setNote] = useState("");
|
|
923
|
+
const gate = usePermissionGate("sellers.approval:edit");
|
|
899
924
|
const handleSubmit = async () => {
|
|
900
925
|
try {
|
|
901
926
|
await onConfirm(note);
|
|
@@ -905,7 +930,7 @@ var RequestActionPrompt = ({
|
|
|
905
930
|
}
|
|
906
931
|
};
|
|
907
932
|
return /* @__PURE__ */ jsxs9(Prompt, { open, onOpenChange: setOpen, children: [
|
|
908
|
-
/* @__PURE__ */ jsx9(Prompt.Trigger, { asChild: true, children: trigger }),
|
|
933
|
+
gate.allowed ? /* @__PURE__ */ jsx9(Prompt.Trigger, { asChild: true, children: trigger }) : /* @__PURE__ */ jsx9(PermissionAction2, { permission: "sellers.approval:edit", children: trigger }),
|
|
909
934
|
/* @__PURE__ */ jsxs9(Prompt.Content, { children: [
|
|
910
935
|
/* @__PURE__ */ jsxs9(Prompt.Header, { children: [
|
|
911
936
|
/* @__PURE__ */ jsx9(Prompt.Title, { children: title }),
|
|
@@ -1121,6 +1146,7 @@ var StoreOffersSection = ({ sellerId }) => {
|
|
|
1121
1146
|
import { jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1122
1147
|
var TABS = ["orders", "offers", "users", "timeOff"];
|
|
1123
1148
|
var TabBar = ({
|
|
1149
|
+
tabs,
|
|
1124
1150
|
activeTab,
|
|
1125
1151
|
onTabChange
|
|
1126
1152
|
}) => {
|
|
@@ -1138,7 +1164,7 @@ var TabBar = ({
|
|
|
1138
1164
|
"aria-label": t("stores.domain"),
|
|
1139
1165
|
className: "mt-1 flex flex-wrap items-center gap-x-2",
|
|
1140
1166
|
"data-testid": "store-detail-tabs",
|
|
1141
|
-
children:
|
|
1167
|
+
children: tabs.map((tab) => {
|
|
1142
1168
|
const isActive = activeTab === tab;
|
|
1143
1169
|
return /* @__PURE__ */ jsx12(
|
|
1144
1170
|
"button",
|
|
@@ -1161,7 +1187,21 @@ var TabBar = ({
|
|
|
1161
1187
|
};
|
|
1162
1188
|
var Root = ({ children }) => {
|
|
1163
1189
|
const { id } = useParams();
|
|
1164
|
-
const [
|
|
1190
|
+
const [selectedTab, setActiveTab] = useState3("orders");
|
|
1191
|
+
const { can } = usePermissions();
|
|
1192
|
+
const tabs = TABS.filter((tab) => {
|
|
1193
|
+
if (tab === "orders") {
|
|
1194
|
+
return can("orders");
|
|
1195
|
+
}
|
|
1196
|
+
if (tab === "offers") {
|
|
1197
|
+
return can("offers");
|
|
1198
|
+
}
|
|
1199
|
+
if (tab === "users") {
|
|
1200
|
+
return can("members");
|
|
1201
|
+
}
|
|
1202
|
+
return true;
|
|
1203
|
+
});
|
|
1204
|
+
const activeTab = tabs.includes(selectedTab) ? selectedTab : tabs[0];
|
|
1165
1205
|
const query = useLinkQuery("seller", STORE_DETAIL_FIELDS);
|
|
1166
1206
|
const { seller, isLoading, isError, error } = useSeller(id, query);
|
|
1167
1207
|
if (isLoading || !seller) {
|
|
@@ -1177,7 +1217,7 @@ var Root = ({ children }) => {
|
|
|
1177
1217
|
/* @__PURE__ */ jsx12(TwoColumnPage.Main, { children: /* @__PURE__ */ jsxs12(WidgetZone, { id: "stores.detail.main", data: seller, children: [
|
|
1178
1218
|
seller.status === import_types3.SellerStatus.PENDING_APPROVAL && !seller.approved_at && !seller.rejected_at && /* @__PURE__ */ jsx12(StoreRequestSection, { seller }),
|
|
1179
1219
|
/* @__PURE__ */ jsx12(StoreGeneralSection, { seller }),
|
|
1180
|
-
/* @__PURE__ */ jsx12(TabBar, { activeTab, onTabChange: setActiveTab }),
|
|
1220
|
+
/* @__PURE__ */ jsx12(TabBar, { tabs, activeTab, onTabChange: setActiveTab }),
|
|
1181
1221
|
activeTab === "orders" && /* @__PURE__ */ jsx12(
|
|
1182
1222
|
"div",
|
|
1183
1223
|
{
|
|
@@ -49,6 +49,7 @@ var useDeleteCommissionRuleAction = (rule) => {
|
|
|
49
49
|
|
|
50
50
|
// src/pages/commissions/common/hooks/use-scope-reference-names.tsx
|
|
51
51
|
import { useMemo } from "react";
|
|
52
|
+
import { usePermissions } from "@mercurjs/dashboard-shared";
|
|
52
53
|
var idsFor = (rules = [], reference) => rules.filter((r) => r.reference === reference).map((r) => r.reference_id);
|
|
53
54
|
var useScopeReferenceNames = (rules = []) => {
|
|
54
55
|
const sellerIds = useMemo(() => idsFor(rules, "seller"), [rules]);
|
|
@@ -60,13 +61,17 @@ var useScopeReferenceNames = (rules = []) => {
|
|
|
60
61
|
() => idsFor(rules, "product_category"),
|
|
61
62
|
[rules]
|
|
62
63
|
);
|
|
64
|
+
const { can } = usePermissions();
|
|
65
|
+
const canViewSellers = can("sellers");
|
|
66
|
+
const canViewProductTypes = can("product_types");
|
|
67
|
+
const canViewCategories = can("product_categories");
|
|
63
68
|
const { sellers, isLoading: sellersLoading } = useSellers(
|
|
64
69
|
{ id: sellerIds, fields: "id,name", limit: sellerIds.length || 1 },
|
|
65
|
-
{ enabled: sellerIds.length > 0 }
|
|
70
|
+
{ enabled: sellerIds.length > 0 && canViewSellers }
|
|
66
71
|
);
|
|
67
72
|
const { product_types: productTypes, isLoading: typesLoading } = useProductTypes(
|
|
68
73
|
{ id: productTypeIds, fields: "id,value", limit: productTypeIds.length || 1 },
|
|
69
|
-
{ enabled: productTypeIds.length > 0 }
|
|
74
|
+
{ enabled: productTypeIds.length > 0 && canViewProductTypes }
|
|
70
75
|
);
|
|
71
76
|
const { product_categories: categories, isLoading: categoriesLoading } = useProductCategories(
|
|
72
77
|
{
|
|
@@ -74,7 +79,7 @@ var useScopeReferenceNames = (rules = []) => {
|
|
|
74
79
|
fields: "id,name",
|
|
75
80
|
limit: categoryIds.length || 1
|
|
76
81
|
},
|
|
77
|
-
{ enabled: categoryIds.length > 0 }
|
|
82
|
+
{ enabled: categoryIds.length > 0 && canViewCategories }
|
|
78
83
|
);
|
|
79
84
|
const names = useMemo(() => {
|
|
80
85
|
const map = {};
|
|
@@ -91,7 +96,7 @@ var useScopeReferenceNames = (rules = []) => {
|
|
|
91
96
|
}, [sellers, productTypes, categories]);
|
|
92
97
|
return {
|
|
93
98
|
names,
|
|
94
|
-
isLoading: sellerIds.length > 0 && sellersLoading || productTypeIds.length > 0 && typesLoading || categoryIds.length > 0 && categoriesLoading
|
|
99
|
+
isLoading: sellerIds.length > 0 && canViewSellers && sellersLoading || productTypeIds.length > 0 && canViewProductTypes && typesLoading || categoryIds.length > 0 && canViewCategories && categoriesLoading
|
|
95
100
|
};
|
|
96
101
|
};
|
|
97
102
|
|