@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
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
decorateVariantsWithDefaultValues,
|
|
11
11
|
generateVariantsFromAttributes,
|
|
12
12
|
normalizeProductFormValues
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-XNGTE2VC.js";
|
|
14
14
|
import {
|
|
15
15
|
HandleInput
|
|
16
16
|
} from "./chunk-HJ56YXBU.js";
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
} from "./chunk-4YWKKCTT.js";
|
|
26
26
|
import {
|
|
27
27
|
SingleCategoryCombobox
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-W3LCOK3O.js";
|
|
29
29
|
import {
|
|
30
30
|
useComboboxData
|
|
31
31
|
} from "./chunk-5KGMGL4N.js";
|
|
@@ -56,16 +56,19 @@ import {
|
|
|
56
56
|
import {
|
|
57
57
|
Form
|
|
58
58
|
} from "./chunk-3QSRE5LS.js";
|
|
59
|
+
import {
|
|
60
|
+
ConditionalTooltip
|
|
61
|
+
} from "./chunk-LAVHRER2.js";
|
|
59
62
|
import {
|
|
60
63
|
require_dist
|
|
61
64
|
} from "./chunk-VPUTUJQG.js";
|
|
62
65
|
import {
|
|
63
66
|
_DataTable,
|
|
64
67
|
useDataTable
|
|
65
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-SU36MZXC.js";
|
|
66
69
|
import {
|
|
67
70
|
ActionMenu
|
|
68
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-3UOYBH5O.js";
|
|
69
72
|
import {
|
|
70
73
|
useRegions
|
|
71
74
|
} from "./chunk-2SCR7R3C.js";
|
|
@@ -91,15 +94,18 @@ import {
|
|
|
91
94
|
// src/pages/products/product-create/product-create.tsx
|
|
92
95
|
import { Children as Children2 } from "react";
|
|
93
96
|
import { useTranslation as useTranslation10 } from "react-i18next";
|
|
97
|
+
import { useCan as useCan4 } from "@mercurjs/dashboard-shared";
|
|
94
98
|
|
|
95
99
|
// src/pages/products/product-create/components/product-create-form/product-create-form.tsx
|
|
96
100
|
import { Button as Button3, toast } from "@medusajs/ui";
|
|
97
101
|
import { useEffect as useEffect3, useMemo as useMemo4, Children } from "react";
|
|
98
102
|
import { useForm, useWatch as useWatch4 } from "react-hook-form";
|
|
99
103
|
import { useTranslation as useTranslation9 } from "react-i18next";
|
|
104
|
+
import { isForbidden as isForbidden2, useCan as useCan3 } from "@mercurjs/dashboard-shared";
|
|
100
105
|
|
|
101
106
|
// src/pages/products/product-create/components/product-create-attributes-form/product-create-attributes-form.tsx
|
|
102
107
|
var import_types = __toESM(require_dist(), 1);
|
|
108
|
+
import { useCan as useCan2 } from "@mercurjs/dashboard-shared";
|
|
103
109
|
import { XMarkMini } from "@medusajs/icons";
|
|
104
110
|
import {
|
|
105
111
|
Button as Button2,
|
|
@@ -123,6 +129,11 @@ import { useTranslation as useTranslation2 } from "react-i18next";
|
|
|
123
129
|
|
|
124
130
|
// src/pages/products/product-create/components/product-create-attributes-form/product-create-add-attributes-modal.tsx
|
|
125
131
|
import { Badge, Button, Checkbox } from "@medusajs/ui";
|
|
132
|
+
import {
|
|
133
|
+
isForbidden,
|
|
134
|
+
SectionNoAccess,
|
|
135
|
+
useCan
|
|
136
|
+
} from "@mercurjs/dashboard-shared";
|
|
126
137
|
import { keepPreviousData } from "@tanstack/react-query";
|
|
127
138
|
import {
|
|
128
139
|
createColumnHelper
|
|
@@ -156,8 +167,10 @@ var ProductCreateAddAttributesModal = () => {
|
|
|
156
167
|
() => ({ ...searchParams, category_id: categoryId || void 0 }),
|
|
157
168
|
[searchParams, categoryId]
|
|
158
169
|
);
|
|
170
|
+
const canViewAttributes = useCan("product_attributes");
|
|
159
171
|
const { product_attributes, count, isLoading, isError, error } = useProductAttributes(attributesQuery, {
|
|
160
|
-
placeholderData: keepPreviousData
|
|
172
|
+
placeholderData: keepPreviousData,
|
|
173
|
+
enabled: canViewAttributes
|
|
161
174
|
});
|
|
162
175
|
const open = getIsOpen(ADD_ATTRIBUTES_MODAL_ID);
|
|
163
176
|
useEffect(() => {
|
|
@@ -263,9 +276,16 @@ var ProductCreateAddAttributesModal = () => {
|
|
|
263
276
|
rowSelection: { state: rowSelection, updater },
|
|
264
277
|
prefix: ADD_ATTRIBUTES_MODAL_ID
|
|
265
278
|
});
|
|
266
|
-
|
|
279
|
+
const noAccess = !canViewAttributes || isError && isForbidden(error);
|
|
280
|
+
if (isError && !noAccess) {
|
|
267
281
|
throw error;
|
|
268
282
|
}
|
|
283
|
+
if (noAccess) {
|
|
284
|
+
return /* @__PURE__ */ jsxs(StackedFocusModal.Content, { className: "flex flex-col overflow-hidden", children: [
|
|
285
|
+
/* @__PURE__ */ jsx(StackedFocusModal.Header, {}),
|
|
286
|
+
/* @__PURE__ */ jsx(StackedFocusModal.Body, { children: /* @__PURE__ */ jsx(SectionNoAccess, {}) })
|
|
287
|
+
] });
|
|
288
|
+
}
|
|
269
289
|
return /* @__PURE__ */ jsxs(StackedFocusModal.Content, { className: "flex flex-col overflow-hidden", children: [
|
|
270
290
|
/* @__PURE__ */ jsx(StackedFocusModal.Header, {}),
|
|
271
291
|
/* @__PURE__ */ jsx(StackedFocusModal.Body, { className: "flex size-full flex-col overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
@@ -770,12 +790,13 @@ var RequiredAttributes = () => {
|
|
|
770
790
|
const { t } = useTranslation2();
|
|
771
791
|
const form = useTabbedForm();
|
|
772
792
|
const categoryId = form.watch("category_id");
|
|
793
|
+
const canViewAttributes = useCan2("product_attributes");
|
|
773
794
|
const { product_attributes } = useProductAttributes(
|
|
774
795
|
{
|
|
775
796
|
category_id: categoryId,
|
|
776
797
|
is_required: true
|
|
777
798
|
},
|
|
778
|
-
{ enabled: !!categoryId }
|
|
799
|
+
{ enabled: !!categoryId && canViewAttributes }
|
|
779
800
|
);
|
|
780
801
|
const attributes = form.watch("attributes") || [];
|
|
781
802
|
useEffect2(() => {
|
|
@@ -1548,6 +1569,7 @@ var Header = () => {
|
|
|
1548
1569
|
};
|
|
1549
1570
|
|
|
1550
1571
|
// src/pages/products/product-create/components/product-create-organize-form/components/product-create-organize-section/product-create-details-organize-section.tsx
|
|
1572
|
+
import { usePermissionGate } from "@mercurjs/dashboard-shared";
|
|
1551
1573
|
import { Heading as Heading4 } from "@medusajs/ui";
|
|
1552
1574
|
import { useWatch as useWatch2 } from "react-hook-form";
|
|
1553
1575
|
import { useTranslation as useTranslation7 } from "react-i18next";
|
|
@@ -1555,13 +1577,18 @@ import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
|
1555
1577
|
var ProductCreateOrganizationSection = () => {
|
|
1556
1578
|
const form = useTabbedForm();
|
|
1557
1579
|
const { t } = useTranslation7();
|
|
1580
|
+
const collectionsGate = usePermissionGate("product_collections:view");
|
|
1581
|
+
const typesGate = usePermissionGate("product_types:view");
|
|
1582
|
+
const tagsGate = usePermissionGate("product_tags:view");
|
|
1583
|
+
const sellersGate = usePermissionGate("sellers:view");
|
|
1558
1584
|
const collections = useComboboxData({
|
|
1559
1585
|
queryKey: ["product_collections"],
|
|
1560
1586
|
queryFn: (params) => sdk.admin.collections.query(params),
|
|
1561
1587
|
getOptions: (data) => data.collections.map((collection) => ({
|
|
1562
1588
|
label: collection.title,
|
|
1563
1589
|
value: collection.id
|
|
1564
|
-
}))
|
|
1590
|
+
})),
|
|
1591
|
+
enabled: collectionsGate.allowed
|
|
1565
1592
|
});
|
|
1566
1593
|
const types = useComboboxData({
|
|
1567
1594
|
queryKey: ["product_types"],
|
|
@@ -1569,7 +1596,8 @@ var ProductCreateOrganizationSection = () => {
|
|
|
1569
1596
|
getOptions: (data) => data.product_types.map((type) => ({
|
|
1570
1597
|
label: type.value,
|
|
1571
1598
|
value: type.id
|
|
1572
|
-
}))
|
|
1599
|
+
})),
|
|
1600
|
+
enabled: typesGate.allowed
|
|
1573
1601
|
});
|
|
1574
1602
|
const tags = useComboboxData({
|
|
1575
1603
|
queryKey: ["product_tags"],
|
|
@@ -1577,7 +1605,8 @@ var ProductCreateOrganizationSection = () => {
|
|
|
1577
1605
|
getOptions: (data) => data.product_tags.map((tag) => ({
|
|
1578
1606
|
label: tag.value,
|
|
1579
1607
|
value: tag.id
|
|
1580
|
-
}))
|
|
1608
|
+
})),
|
|
1609
|
+
enabled: tagsGate.allowed
|
|
1581
1610
|
});
|
|
1582
1611
|
const sellers = useComboboxData({
|
|
1583
1612
|
queryKey: ["sellers"],
|
|
@@ -1585,7 +1614,8 @@ var ProductCreateOrganizationSection = () => {
|
|
|
1585
1614
|
getOptions: (data) => data.sellers.map((seller) => ({
|
|
1586
1615
|
label: seller.name,
|
|
1587
1616
|
value: seller.id
|
|
1588
|
-
}))
|
|
1617
|
+
})),
|
|
1618
|
+
enabled: sellersGate.allowed
|
|
1589
1619
|
});
|
|
1590
1620
|
const isGloballyAvailable = useWatch2({
|
|
1591
1621
|
control: form.control,
|
|
@@ -1622,17 +1652,25 @@ var ProductCreateOrganizationSection = () => {
|
|
|
1622
1652
|
render: ({ field }) => {
|
|
1623
1653
|
return /* @__PURE__ */ jsxs7(Form.Item, { "data-testid": "product-create-organize-section-collection-item", children: [
|
|
1624
1654
|
/* @__PURE__ */ jsx7(Form.Label, { optional: true, "data-testid": "product-create-organize-section-collection-label", children: t("products.fields.collection.label") }),
|
|
1625
|
-
/* @__PURE__ */ jsx7(
|
|
1626
|
-
|
|
1655
|
+
/* @__PURE__ */ jsx7(
|
|
1656
|
+
ConditionalTooltip,
|
|
1627
1657
|
{
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1658
|
+
showTooltip: collectionsGate.denied,
|
|
1659
|
+
content: collectionsGate.tooltip,
|
|
1660
|
+
children: /* @__PURE__ */ jsx7("div", { children: /* @__PURE__ */ jsx7(Form.Control, { "data-testid": "product-create-organize-section-collection-control", children: /* @__PURE__ */ jsx7(
|
|
1661
|
+
Combobox,
|
|
1662
|
+
{
|
|
1663
|
+
...field,
|
|
1664
|
+
disabled: collectionsGate.denied,
|
|
1665
|
+
options: collections.options,
|
|
1666
|
+
searchValue: collections.searchValue,
|
|
1667
|
+
onSearchValueChange: collections.onSearchValueChange,
|
|
1668
|
+
fetchNextPage: collections.fetchNextPage,
|
|
1669
|
+
"data-testid": "product-create-organize-section-collection-input"
|
|
1670
|
+
}
|
|
1671
|
+
) }) })
|
|
1634
1672
|
}
|
|
1635
|
-
)
|
|
1673
|
+
),
|
|
1636
1674
|
/* @__PURE__ */ jsx7(Form.ErrorMessage, {})
|
|
1637
1675
|
] });
|
|
1638
1676
|
}
|
|
@@ -1648,17 +1686,25 @@ var ProductCreateOrganizationSection = () => {
|
|
|
1648
1686
|
render: ({ field }) => {
|
|
1649
1687
|
return /* @__PURE__ */ jsxs7(Form.Item, { "data-testid": "product-create-organize-section-type-item", children: [
|
|
1650
1688
|
/* @__PURE__ */ jsx7(Form.Label, { optional: true, "data-testid": "product-create-organize-section-type-label", children: t("products.fields.type.label") }),
|
|
1651
|
-
/* @__PURE__ */ jsx7(
|
|
1652
|
-
|
|
1689
|
+
/* @__PURE__ */ jsx7(
|
|
1690
|
+
ConditionalTooltip,
|
|
1653
1691
|
{
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1692
|
+
showTooltip: typesGate.denied,
|
|
1693
|
+
content: typesGate.tooltip,
|
|
1694
|
+
children: /* @__PURE__ */ jsx7("div", { children: /* @__PURE__ */ jsx7(Form.Control, { "data-testid": "product-create-organize-section-type-control", children: /* @__PURE__ */ jsx7(
|
|
1695
|
+
Combobox,
|
|
1696
|
+
{
|
|
1697
|
+
...field,
|
|
1698
|
+
disabled: typesGate.denied,
|
|
1699
|
+
options: types.options,
|
|
1700
|
+
searchValue: types.searchValue,
|
|
1701
|
+
onSearchValueChange: types.onSearchValueChange,
|
|
1702
|
+
fetchNextPage: types.fetchNextPage,
|
|
1703
|
+
"data-testid": "product-create-organize-section-type-input"
|
|
1704
|
+
}
|
|
1705
|
+
) }) })
|
|
1660
1706
|
}
|
|
1661
|
-
)
|
|
1707
|
+
),
|
|
1662
1708
|
/* @__PURE__ */ jsx7(Form.ErrorMessage, {})
|
|
1663
1709
|
] });
|
|
1664
1710
|
}
|
|
@@ -1672,17 +1718,25 @@ var ProductCreateOrganizationSection = () => {
|
|
|
1672
1718
|
render: ({ field }) => {
|
|
1673
1719
|
return /* @__PURE__ */ jsxs7(Form.Item, { "data-testid": "product-create-organize-section-tags-item", children: [
|
|
1674
1720
|
/* @__PURE__ */ jsx7(Form.Label, { optional: true, "data-testid": "product-create-organize-section-tags-label", children: t("products.fields.tags.label") }),
|
|
1675
|
-
/* @__PURE__ */ jsx7(
|
|
1676
|
-
|
|
1721
|
+
/* @__PURE__ */ jsx7(
|
|
1722
|
+
ConditionalTooltip,
|
|
1677
1723
|
{
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1724
|
+
showTooltip: tagsGate.denied,
|
|
1725
|
+
content: tagsGate.tooltip,
|
|
1726
|
+
children: /* @__PURE__ */ jsx7("div", { children: /* @__PURE__ */ jsx7(Form.Control, { "data-testid": "product-create-organize-section-tags-control", children: /* @__PURE__ */ jsx7(
|
|
1727
|
+
Combobox,
|
|
1728
|
+
{
|
|
1729
|
+
...field,
|
|
1730
|
+
disabled: tagsGate.denied,
|
|
1731
|
+
options: tags.options,
|
|
1732
|
+
searchValue: tags.searchValue,
|
|
1733
|
+
onSearchValueChange: tags.onSearchValueChange,
|
|
1734
|
+
fetchNextPage: tags.fetchNextPage,
|
|
1735
|
+
"data-testid": "product-create-organize-section-tags-input"
|
|
1736
|
+
}
|
|
1737
|
+
) }) })
|
|
1684
1738
|
}
|
|
1685
|
-
)
|
|
1739
|
+
),
|
|
1686
1740
|
/* @__PURE__ */ jsx7(Form.ErrorMessage, {})
|
|
1687
1741
|
] });
|
|
1688
1742
|
}
|
|
@@ -1721,18 +1775,26 @@ var ProductCreateOrganizationSection = () => {
|
|
|
1721
1775
|
render: ({ field }) => {
|
|
1722
1776
|
return /* @__PURE__ */ jsxs7(Form.Item, { "data-testid": "product-create-organize-section-stores-item", children: [
|
|
1723
1777
|
/* @__PURE__ */ jsx7(Form.Label, { "data-testid": "product-create-organize-section-stores-label", children: t("products.fields.stores.label") }),
|
|
1724
|
-
/* @__PURE__ */ jsx7(
|
|
1725
|
-
|
|
1778
|
+
/* @__PURE__ */ jsx7(
|
|
1779
|
+
ConditionalTooltip,
|
|
1726
1780
|
{
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1781
|
+
showTooltip: sellersGate.denied,
|
|
1782
|
+
content: sellersGate.tooltip,
|
|
1783
|
+
children: /* @__PURE__ */ jsx7("div", { children: /* @__PURE__ */ jsx7(Form.Control, { "data-testid": "product-create-organize-section-stores-control", children: /* @__PURE__ */ jsx7(
|
|
1784
|
+
Combobox,
|
|
1785
|
+
{
|
|
1786
|
+
...field,
|
|
1787
|
+
value: field.value ?? [],
|
|
1788
|
+
disabled: sellersGate.denied,
|
|
1789
|
+
options: sellers.options,
|
|
1790
|
+
searchValue: sellers.searchValue,
|
|
1791
|
+
onSearchValueChange: sellers.onSearchValueChange,
|
|
1792
|
+
fetchNextPage: sellers.fetchNextPage,
|
|
1793
|
+
"data-testid": "product-create-organize-section-stores-input"
|
|
1794
|
+
}
|
|
1795
|
+
) }) })
|
|
1734
1796
|
}
|
|
1735
|
-
)
|
|
1797
|
+
),
|
|
1736
1798
|
/* @__PURE__ */ jsx7(Form.ErrorMessage, {})
|
|
1737
1799
|
] });
|
|
1738
1800
|
}
|
|
@@ -1936,13 +1998,15 @@ var ProductCreateForm = ({
|
|
|
1936
1998
|
resolver: zodResolver(schema ?? ProductCreateSchema)
|
|
1937
1999
|
});
|
|
1938
2000
|
const { mutateAsync, isPending } = useCreateProduct();
|
|
2001
|
+
const canViewRegions = useCan3("regions");
|
|
1939
2002
|
const {
|
|
1940
2003
|
regions,
|
|
1941
|
-
isPending:
|
|
2004
|
+
isPending: isRegionsQueryPending,
|
|
1942
2005
|
isError: isRegionsError,
|
|
1943
2006
|
error: regionsError
|
|
1944
|
-
} = useRegions({ limit: 9999 });
|
|
1945
|
-
|
|
2007
|
+
} = useRegions({ limit: 9999 }, { enabled: canViewRegions });
|
|
2008
|
+
const isRegionsPending = canViewRegions && isRegionsQueryPending;
|
|
2009
|
+
if (isRegionsError && !isForbidden2(regionsError)) {
|
|
1946
2010
|
throw regionsError;
|
|
1947
2011
|
}
|
|
1948
2012
|
const regionsCurrencyMap = useMemo4(() => {
|
|
@@ -2111,6 +2175,7 @@ var ProductCreateForm = ({
|
|
|
2111
2175
|
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2112
2176
|
var Root5 = ({ children }) => {
|
|
2113
2177
|
const { t } = useTranslation10();
|
|
2178
|
+
const canViewSalesChannels = useCan4("sales_channels");
|
|
2114
2179
|
const {
|
|
2115
2180
|
store,
|
|
2116
2181
|
isPending: isStorePending,
|
|
@@ -2125,9 +2190,9 @@ var Root5 = ({ children }) => {
|
|
|
2125
2190
|
isError: isSalesChannelError,
|
|
2126
2191
|
error: salesChannelError
|
|
2127
2192
|
} = useSalesChannel(store?.default_sales_channel_id, {
|
|
2128
|
-
enabled: !!store?.default_sales_channel_id
|
|
2193
|
+
enabled: !!store?.default_sales_channel_id && canViewSalesChannels
|
|
2129
2194
|
});
|
|
2130
|
-
const ready = !!store && !isStorePending && !!sales_channel && !isSalesChannelPending;
|
|
2195
|
+
const ready = !!store && !isStorePending && (!canViewSalesChannels || !!sales_channel && !isSalesChannelPending);
|
|
2131
2196
|
if (isStoreError) {
|
|
2132
2197
|
throw storeError;
|
|
2133
2198
|
}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NavItem,
|
|
3
|
+
Shell,
|
|
4
|
+
UserMenu,
|
|
5
|
+
canReachRoute,
|
|
6
|
+
filterMenuItemsByPermissions,
|
|
7
|
+
getMenuItemsByType,
|
|
8
|
+
useExpandedSidebar,
|
|
9
|
+
useLandingRoute
|
|
10
|
+
} from "./chunk-XI4SB5YZ.js";
|
|
11
|
+
|
|
12
|
+
// src/components/layout/settings-layout/settings-layout.tsx
|
|
13
|
+
import { useEffect, useMemo, useState } from "react";
|
|
14
|
+
import { ArrowUturnLeft, MinusMini } from "@medusajs/icons";
|
|
15
|
+
import { Divider, IconButton, Text, clx } from "@medusajs/ui";
|
|
16
|
+
import { Collapsible as RadixCollapsible } from "radix-ui";
|
|
17
|
+
import { useTranslation } from "react-i18next";
|
|
18
|
+
import { Link, useLocation } from "react-router-dom";
|
|
19
|
+
import menuItemsModule from "virtual:mercur/menu-items";
|
|
20
|
+
import { usePermissions } from "@mercurjs/dashboard-shared";
|
|
21
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
22
|
+
var SettingsLayout = () => {
|
|
23
|
+
useExpandedSidebar();
|
|
24
|
+
return /* @__PURE__ */ jsx(Shell, { rail: false, children: /* @__PURE__ */ jsx(SettingsSidebar, {}) });
|
|
25
|
+
};
|
|
26
|
+
var allMenuItems = menuItemsModule.menuItems ?? [];
|
|
27
|
+
var useExtensionNavItems = () => {
|
|
28
|
+
const { hasAnyPermission, hasAllPermissions } = usePermissions();
|
|
29
|
+
return useMemo(
|
|
30
|
+
() => getMenuItemsByType(
|
|
31
|
+
filterMenuItemsByPermissions(allMenuItems, {
|
|
32
|
+
hasAnyPermission,
|
|
33
|
+
hasAllPermissions
|
|
34
|
+
}),
|
|
35
|
+
"settings"
|
|
36
|
+
).sort((a, b) => (a.rank ?? 0) - (b.rank ?? 0)).map((item) => ({
|
|
37
|
+
label: item.label,
|
|
38
|
+
to: item.path,
|
|
39
|
+
translationNs: item.translationNs
|
|
40
|
+
})),
|
|
41
|
+
[hasAnyPermission, hasAllPermissions]
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
var useSettingRoutes = () => {
|
|
45
|
+
const { t } = useTranslation();
|
|
46
|
+
const extensionNavItems = useExtensionNavItems();
|
|
47
|
+
return useMemo(
|
|
48
|
+
() => [
|
|
49
|
+
{
|
|
50
|
+
label: t("marketplace.domain"),
|
|
51
|
+
to: "/settings/marketplace"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
label: t("users.domain"),
|
|
55
|
+
to: "/settings/users"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
label: t("regions.domain"),
|
|
59
|
+
to: "/settings/regions"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
label: t("taxRegions.domain"),
|
|
63
|
+
to: "/settings/tax-regions"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
label: t("returnReasons.domain"),
|
|
67
|
+
to: "/settings/return-reasons"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
label: t("refundReasons.domain"),
|
|
71
|
+
to: "/settings/refund-reasons"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
label: t("salesChannels.domain"),
|
|
75
|
+
to: "/settings/sales-channels"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
label: t("productTypes.domain"),
|
|
79
|
+
to: "/settings/product-types"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
label: t("productTags.domain"),
|
|
83
|
+
to: "/settings/product-tags"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
label: t("attributes.domain"),
|
|
87
|
+
to: "/settings/attributes"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
label: t("stockLocations.domain"),
|
|
91
|
+
to: "/settings/locations"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
label: t("commissions.domain"),
|
|
95
|
+
to: "/settings/commissions"
|
|
96
|
+
},
|
|
97
|
+
...extensionNavItems
|
|
98
|
+
],
|
|
99
|
+
[t, extensionNavItems]
|
|
100
|
+
);
|
|
101
|
+
};
|
|
102
|
+
var useDeveloperRoutes = () => {
|
|
103
|
+
const { t } = useTranslation();
|
|
104
|
+
return useMemo(
|
|
105
|
+
() => [
|
|
106
|
+
{
|
|
107
|
+
label: t("apiKeyManagement.domain.publishable"),
|
|
108
|
+
to: "/settings/publishable-api-keys"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
label: t("apiKeyManagement.domain.secret"),
|
|
112
|
+
to: "/settings/secret-api-keys"
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
[t]
|
|
116
|
+
);
|
|
117
|
+
};
|
|
118
|
+
var useMyAccountRoutes = () => {
|
|
119
|
+
const { t } = useTranslation();
|
|
120
|
+
return useMemo(
|
|
121
|
+
() => [
|
|
122
|
+
{
|
|
123
|
+
label: t("profile.domain"),
|
|
124
|
+
to: "/settings/profile"
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
[t]
|
|
128
|
+
);
|
|
129
|
+
};
|
|
130
|
+
var getSafeFromValue = (from, landing) => {
|
|
131
|
+
if (from.startsWith("/settings")) {
|
|
132
|
+
return landing;
|
|
133
|
+
}
|
|
134
|
+
return from;
|
|
135
|
+
};
|
|
136
|
+
var useCanReach = () => {
|
|
137
|
+
const permissions = usePermissions();
|
|
138
|
+
return ({ to }) => canReachRoute(permissions, to);
|
|
139
|
+
};
|
|
140
|
+
var PROFILE_ROUTE = "/settings/profile";
|
|
141
|
+
var useSettingsLandingRoute = () => {
|
|
142
|
+
const canReach = useCanReach();
|
|
143
|
+
const routes = [...useSettingRoutes(), ...useDeveloperRoutes()].filter(canReach);
|
|
144
|
+
return routes.find(({ to }) => to !== PROFILE_ROUTE)?.to ?? PROFILE_ROUTE;
|
|
145
|
+
};
|
|
146
|
+
var SettingsSidebar = () => {
|
|
147
|
+
const canReach = useCanReach();
|
|
148
|
+
const routes = useSettingRoutes().filter(canReach);
|
|
149
|
+
const developerRoutes = useDeveloperRoutes().filter(canReach);
|
|
150
|
+
const myAccountRoutes = useMyAccountRoutes();
|
|
151
|
+
const { t } = useTranslation();
|
|
152
|
+
return /* @__PURE__ */ jsxs("aside", { className: "relative flex flex-1 flex-col justify-between overflow-y-auto", children: [
|
|
153
|
+
/* @__PURE__ */ jsxs("div", { className: "sticky top-0 bg-ui-bg-subtle", children: [
|
|
154
|
+
/* @__PURE__ */ jsx(Header, {}),
|
|
155
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center px-3", children: /* @__PURE__ */ jsx(Divider, { variant: "dashed" }) })
|
|
156
|
+
] }),
|
|
157
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col", children: [
|
|
158
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col overflow-y-auto", children: [
|
|
159
|
+
/* @__PURE__ */ jsx(
|
|
160
|
+
RadixCollapsibleSection,
|
|
161
|
+
{
|
|
162
|
+
label: t("app.nav.settings.general"),
|
|
163
|
+
items: routes
|
|
164
|
+
}
|
|
165
|
+
),
|
|
166
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center px-3", children: /* @__PURE__ */ jsx(Divider, { variant: "dashed" }) }),
|
|
167
|
+
/* @__PURE__ */ jsx(
|
|
168
|
+
RadixCollapsibleSection,
|
|
169
|
+
{
|
|
170
|
+
label: t("app.nav.settings.developer"),
|
|
171
|
+
items: developerRoutes
|
|
172
|
+
}
|
|
173
|
+
),
|
|
174
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center px-3", children: /* @__PURE__ */ jsx(Divider, { variant: "dashed" }) }),
|
|
175
|
+
/* @__PURE__ */ jsx(
|
|
176
|
+
RadixCollapsibleSection,
|
|
177
|
+
{
|
|
178
|
+
label: t("app.nav.settings.myAccount"),
|
|
179
|
+
items: myAccountRoutes
|
|
180
|
+
}
|
|
181
|
+
)
|
|
182
|
+
] }),
|
|
183
|
+
/* @__PURE__ */ jsx("div", { className: "sticky bottom-0 bg-ui-bg-subtle", children: /* @__PURE__ */ jsx(UserSection, {}) })
|
|
184
|
+
] })
|
|
185
|
+
] });
|
|
186
|
+
};
|
|
187
|
+
var Header = () => {
|
|
188
|
+
const landing = useLandingRoute();
|
|
189
|
+
const [from, setFrom] = useState();
|
|
190
|
+
const { t } = useTranslation();
|
|
191
|
+
const location = useLocation();
|
|
192
|
+
useEffect(() => {
|
|
193
|
+
if (location.state?.from) {
|
|
194
|
+
setFrom(getSafeFromValue(location.state.from, landing));
|
|
195
|
+
}
|
|
196
|
+
}, [location, landing]);
|
|
197
|
+
return /* @__PURE__ */ jsx("div", { className: "bg-ui-bg-subtle p-3", children: /* @__PURE__ */ jsx(
|
|
198
|
+
Link,
|
|
199
|
+
{
|
|
200
|
+
to: from ?? landing,
|
|
201
|
+
replace: true,
|
|
202
|
+
className: clx(
|
|
203
|
+
"flex items-center rounded-md bg-ui-bg-subtle outline-none transition-fg",
|
|
204
|
+
"hover:bg-ui-bg-subtle-hover",
|
|
205
|
+
"focus-visible:shadow-borders-focus"
|
|
206
|
+
),
|
|
207
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-x-2.5 px-2 py-1", children: [
|
|
208
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(ArrowUturnLeft, { className: "text-ui-fg-subtle" }) }),
|
|
209
|
+
/* @__PURE__ */ jsx(Text, { leading: "compact", weight: "plus", size: "small", children: t("app.nav.settings.header") })
|
|
210
|
+
] })
|
|
211
|
+
}
|
|
212
|
+
) });
|
|
213
|
+
};
|
|
214
|
+
var RadixCollapsibleSection = ({
|
|
215
|
+
label,
|
|
216
|
+
items
|
|
217
|
+
}) => {
|
|
218
|
+
return /* @__PURE__ */ jsxs(RadixCollapsible.Root, { defaultOpen: true, className: "py-3", children: [
|
|
219
|
+
/* @__PURE__ */ jsx("div", { className: "px-3", children: /* @__PURE__ */ jsxs("div", { className: "flex h-7 items-center justify-between px-2 text-ui-fg-muted", children: [
|
|
220
|
+
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", children: label }),
|
|
221
|
+
/* @__PURE__ */ jsx(RadixCollapsible.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(IconButton, { size: "2xsmall", variant: "transparent", className: "static", children: /* @__PURE__ */ jsx(MinusMini, { className: "text-ui-fg-muted" }) }) })
|
|
222
|
+
] }) }),
|
|
223
|
+
/* @__PURE__ */ jsx(RadixCollapsible.Content, { children: /* @__PURE__ */ jsx("div", { className: "pt-0.5", children: /* @__PURE__ */ jsx("nav", { className: "flex flex-col gap-y-0.5", children: items.map((setting) => /* @__PURE__ */ jsx(NavItem, { type: "setting", ...setting }, setting.to)) }) }) })
|
|
224
|
+
] });
|
|
225
|
+
};
|
|
226
|
+
var UserSection = () => {
|
|
227
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
228
|
+
/* @__PURE__ */ jsx("div", { className: "px-3", children: /* @__PURE__ */ jsx(Divider, { variant: "dashed" }) }),
|
|
229
|
+
/* @__PURE__ */ jsx(UserMenu, {})
|
|
230
|
+
] });
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
export {
|
|
234
|
+
SettingsLayout,
|
|
235
|
+
useSettingsLandingRoute
|
|
236
|
+
};
|