@mercurjs/admin 2.3.6-canary.5 → 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-P5C3F2D7.js → api-key-management-detail-Z4KSJHUC.js} +5 -7
- package/dist/{api-key-management-list-XV66E2LA.js → api-key-management-list-QZIRPINF.js} +5 -5
- package/dist/{api-key-management-sales-channels-FS3KXQQ6.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-KUJ337KW.js → attribute-detail-WVN5KOH2.js} +15 -9
- package/dist/{attribute-list-FLTRNSFI.js → attribute-list-ZC3CG5LS.js} +6 -6
- package/dist/{campaign-detail-4IEM5BGI.js → campaign-detail-MGDL2TQC.js} +10 -10
- package/dist/{campaign-list-ZRUBHJEA.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} +7 -8
- package/dist/{category-list-LESUC6ZK.js → category-list-XDOYTQ4X.js} +6 -6
- package/dist/{category-products-RTOFMB25.js → category-products-35ZZYVWJ.js} +12 -5
- package/dist/{chunk-NIDM2VQO.js → chunk-23CSVCQK.js} +28 -17
- package/dist/{chunk-DUFGVZ6H.js → chunk-25TWJMWE.js} +2 -2
- package/dist/{chunk-VTXMQTXK.js → chunk-26REB3B6.js} +4 -3
- package/dist/{chunk-5EGLQSSH.js → chunk-2IOADJUM.js} +29 -11
- package/dist/{chunk-ZH6TIKKW.js → chunk-2MOTQNEG.js} +1 -0
- package/dist/{chunk-YHWDMARX.js → chunk-2XBNM6TM.js} +4 -4
- package/dist/{chunk-XGB456O5.js → chunk-3BKRMIWA.js} +23 -12
- package/dist/chunk-3UOYBH5O.js +8 -0
- package/dist/{chunk-XAF7FKWZ.js → chunk-473QGQSA.js} +8 -5
- package/dist/{chunk-JCRDVMIA.js → chunk-4AOVNA5G.js} +31 -20
- package/dist/{chunk-EWDBPCX7.js → chunk-4J4JAXXQ.js} +7 -5
- package/dist/{chunk-IKAUNMRC.js → chunk-4J74G7N2.js} +15 -3
- package/dist/{chunk-WIDHYDJQ.js → chunk-4JQDYQSX.js} +20 -10
- package/dist/{chunk-5CKBM4RI.js → chunk-4W77EUYY.js} +6 -4
- package/dist/{chunk-XABVCD7R.js → chunk-5K4WEF2N.js} +21 -10
- package/dist/{chunk-AGO4ROOR.js → chunk-5OIFUF7R.js} +1 -1
- package/dist/{chunk-S4WDCOQD.js → chunk-5QW3GY37.js} +27 -14
- package/dist/{chunk-OZKHBVDV.js → chunk-72DFLNNI.js} +11 -5
- package/dist/{chunk-7QZFRDTU.js → chunk-7GCMYYFL.js} +7 -4
- package/dist/{chunk-AYKMFPKF.js → chunk-7LUKMT5J.js} +4 -2
- package/dist/{chunk-I6HCTKMK.js → chunk-7OTRTHLL.js} +6 -4
- package/dist/{chunk-IZ77JV46.js → chunk-AUCCE46Q.js} +6 -3
- package/dist/{chunk-PFQO7UQG.js → chunk-AW4RL2SA.js} +60 -33
- package/dist/{chunk-62YRQVR7.js → chunk-AZV22U4V.js} +20 -5
- package/dist/{chunk-VYSTJIAD.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-ZGNLAPV6.js → chunk-DUKOOIQD.js} +5 -4
- package/dist/{chunk-ACEEFNIX.js → chunk-DVFILGNQ.js} +9 -7
- package/dist/{chunk-DJ73BQSS.js → chunk-DWPBJEEM.js} +20 -7
- package/dist/{chunk-6ZMSV6PN.js → chunk-E43YJQ2B.js} +42 -18
- package/dist/{chunk-FCOYAYQE.js → chunk-EHLCUND7.js} +11 -9
- package/dist/{chunk-DBCNRZZE.js → chunk-EIPTLSNT.js} +3 -1
- package/dist/{chunk-UXA6RZMP.js → chunk-EVYQCNVT.js} +6 -4
- package/dist/{chunk-YM5X7CQL.js → chunk-FCAJQFYT.js} +32 -12
- package/dist/{chunk-VC2GAWL4.js → chunk-G63BL5AB.js} +7 -4
- package/dist/{chunk-BZPOERWW.js → chunk-GIV6KSQX.js} +18 -9
- package/dist/{chunk-O3RDRDCO.js → chunk-GQGCXLVP.js} +32 -13
- package/dist/{chunk-DDZPK7BW.js → chunk-GQYB3OOC.js} +107 -64
- package/dist/{chunk-IFG5ONPV.js → chunk-GZUXEIEB.js} +2 -2
- package/dist/{chunk-VOXWLJHA.js → chunk-H3TOETGJ.js} +11 -6
- package/dist/{chunk-7ASAC2FM.js → chunk-H4TJZB26.js} +26 -18
- package/dist/{chunk-26WXQ6LI.js → chunk-HHAM76HD.js} +43 -25
- package/dist/{chunk-XAQLGDAI.js → chunk-HPMMGA5B.js} +1 -1
- package/dist/{chunk-QK3HIMET.js → chunk-I3RGMOTM.js} +20 -12
- package/dist/{chunk-FS4E6GS6.js → chunk-IQRFJO4N.js} +5 -3
- package/dist/{chunk-LBFX6AVE.js → chunk-JFRYC6GK.js} +17 -10
- package/dist/{chunk-FOWWGEP7.js → chunk-JS2DAWKO.js} +9 -6
- package/dist/{chunk-KYVPZH3D.js → chunk-K6OBX6ZR.js} +7 -6
- package/dist/{chunk-V6UH5UQT.js → chunk-KB3BTLIB.js} +6 -4
- package/dist/{chunk-VIHLAFDA.js → chunk-KYOZ4CCY.js} +61 -29
- package/dist/{chunk-DOEBGZMA.js → chunk-LCUAIH7P.js} +6 -4
- package/dist/{chunk-5VHQX7Q3.js → chunk-M7VHCFCW.js} +9 -7
- 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-MQFPD5J4.js → chunk-MNKJHZZT.js} +10 -6
- package/dist/{chunk-XV4YW4GE.js → chunk-NDS246VB.js} +20 -12
- package/dist/{chunk-IHTYHAOC.js → chunk-NHZU2M7Z.js} +8 -6
- package/dist/{chunk-24JEBPKI.js → chunk-NJ2NRKAJ.js} +57 -14
- package/dist/{chunk-CFQX7HAW.js → chunk-OCDZIJBM.js} +11 -5
- package/dist/{chunk-GDFMWKL6.js → chunk-OGTWBHJC.js} +1 -1
- package/dist/{chunk-LXW3L56Z.js → chunk-Q2XWHI6K.js} +6 -3
- package/dist/{chunk-YWZQKODL.js → chunk-R55XYG6Y.js} +28 -15
- package/dist/{chunk-IKDIEJZC.js → chunk-RAD3UMQ3.js} +6 -4
- package/dist/{chunk-WA3UZTKD.js → chunk-RUGB47D3.js} +1 -1
- package/dist/{chunk-ZOU25JF6.js → chunk-SU36MZXC.js} +11 -3
- package/dist/{chunk-HGFMHWPB.js → chunk-SW46WBFA.js} +29 -14
- package/dist/{chunk-G7444ISU.js → chunk-SZSAJHN7.js} +6 -5
- package/dist/{chunk-GR7S7WTT.js → chunk-TPWSE5HE.js} +16 -11
- 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-AZMXFIDY.js → chunk-USEE6QNQ.js} +67 -27
- package/dist/{chunk-JL3NKSLJ.js → chunk-USO2SWZV.js} +9 -4
- package/dist/{chunk-7C7YLUYT.js → chunk-V3UQOU5W.js} +4 -2
- package/dist/{chunk-XXYVUV5F.js → chunk-VD2CKAYG.js} +21 -10
- 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-LFFWPZQK.js → chunk-WD5XBWAN.js} +120 -55
- package/dist/chunk-WSK532ZA.js +236 -0
- package/dist/chunk-XI4SB5YZ.js +2891 -0
- package/dist/{chunk-KMLQ2ENL.js → chunk-XNGTE2VC.js} +1 -1
- package/dist/{chunk-RFENVF7Y.js → chunk-XUOGIKEE.js} +3 -3
- package/dist/{chunk-R22UAHRF.js → chunk-YDESULL7.js} +3 -1
- package/dist/{chunk-AGQ2BWD4.js → chunk-YN4KTMRA.js} +9 -7
- package/dist/{chunk-IVWSTXBV.js → chunk-YUKJJHI7.js} +8 -5
- package/dist/{chunk-ZFPASY4R.js → chunk-Z2FX5GG4.js} +24 -12
- 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-CTXO7RMM.js → collection-detail-IYZKDR4L.js} +7 -8
- package/dist/{collection-list-MWXFS7UY.js → collection-list-EIDV4DEH.js} +12 -12
- 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-LFEZ5U6V.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-PQUFPRZK.js → commissions-list-AQUW636T.js} +6 -6
- package/dist/{customer-detail-ZYETGMFF.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-RPDRZGPZ.js → customer-group-detail-47IPD337.js} +6 -7
- package/dist/{customer-group-list-MZ7H4XLD.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-46W5PJR3.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-KKOF4FWS.js +64 -0
- package/dist/index.css +3 -0
- package/dist/index.d.ts +10 -28
- package/dist/index.js +553 -3448
- package/dist/{inventory-detail-MMONC625.js → inventory-detail-U6TRGZRY.js} +7 -7
- package/dist/{inventory-list-FN7FCI4W.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-74247BA4.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-TNP3C7UW.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-2NBVRH4U.js → login-ISNIWXU2.js} +2 -2
- 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-JSUMZVZS.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-JGS52M66.js → offer-detail-page-BDDDZSPL.js} +22 -11
- package/dist/{offer-variant-detail-page-FVJE5WLV.js → offer-variant-detail-page-HQU4HMZH.js} +4 -5
- package/dist/{offers-6MDVGCJK.js → offers-OVX5AAQL.js} +7 -8
- package/dist/{order-create-claim-4CIL76V5.js → order-create-claim-4ERPSGPD.js} +105 -61
- package/dist/{order-create-edit-BFE4N7RN.js → order-create-edit-BGLNMKKI.js} +17 -10
- package/dist/{order-create-exchange-CBQ5PA6M.js → order-create-exchange-TOPPZZGS.js} +106 -62
- package/dist/{order-create-refund-ZWMXQGUA.js → order-create-refund-M3K5MZDM.js} +38 -23
- package/dist/{order-create-return-USO7AS7R.js → order-create-return-64GZ2LCL.js} +109 -70
- package/dist/{order-detail-U3HDRBBG.js → order-detail-DIUKR6ZJ.js} +8 -8
- 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 +89 -89
- package/dist/{payout-list-WZ6QMJJY.js → payout-list-KILGQ4XP.js} +3 -3
- package/dist/{price-list-create-RNVWVB5D.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-WHJKFDYZ.js → price-list-detail-IL7VSABK.js} +7 -8
- package/dist/{price-list-list-AM2GMQ7P.js → price-list-list-TD5JIO7L.js} +5 -5
- package/dist/{price-list-prices-add-ZDKNOJRU.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-NVAKRIPS.js → product-create-PMV3LO62.js} +9 -9
- package/dist/{product-detail-DZRYNPRT.js → product-detail-KVLZYO76.js} +7 -8
- package/dist/{product-edit-attribute-W3AS47FM.js → product-edit-attribute-URHTZ2EQ.js} +9 -3
- package/dist/{product-list-SYMPZR6W.js → product-list-M6B42KCG.js} +7 -8
- 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-HM2AWFGU.js → product-tag-detail-LXO43RMB.js} +12 -12
- package/dist/{product-tag-edit-FJPBCFBH.js → product-tag-edit-PXSZMCCT.js} +1 -1
- package/dist/{product-tag-list-OBV7CZZL.js → product-tag-list-XWTZGQTT.js} +12 -12
- package/dist/{product-tag-metadata-WQEGISQ5.js → product-tag-metadata-2SO7ICOZ.js} +2 -2
- package/dist/{product-type-detail-D3OYCXGR.js → product-type-detail-NO4PKFYQ.js} +7 -8
- package/dist/{product-type-list-LCLWJPIT.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-TQWGKYRK.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-IC5LHRSY.js → promotion-detail-WBTMSCTX.js} +6 -8
- package/dist/{promotion-list-TVTDBBJ3.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-G5QJEYPW.js → refund-reason-list-4T7DIRZV.js} +6 -7
- 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-IBLHFR57.js → region-detail-S5OT2PGL.js} +4 -5
- package/dist/{region-edit-NUMG2V5L.js → region-edit-IXCS3MRH.js} +32 -14
- package/dist/{region-list-JTR3SEWI.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-OCIIVYIN.js → reservation-detail-EBIDXEVF.js} +3 -5
- package/dist/{reservation-list-JQFVSRW5.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} +6 -6
- package/dist/{review-detail-K555FECH.js → review-detail-NPB3OKCE.js} +2 -4
- package/dist/{review-list-E56WE7VS.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} +7 -8
- 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-BKMYJMQY.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-R76AQI26.js → shipping-option-type-list-TTAA63ZN.js} +6 -6
- package/dist/{shipping-profile-detail-KPRFJE4V.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-W25ZUWGV.js → shipping-profiles-list-DD3G2THE.js} +4 -5
- package/dist/{store-create-JBY2MAIT.js → store-create-UQ333C5F.js} +36 -14
- package/dist/{store-details-5FBLCWOV.js → store-details-OAONJZHB.js} +9 -10
- package/dist/{store-edit-BXWV5H4Z.js → store-edit-6Q3GLLJE.js} +2 -2
- package/dist/{store-list-MAT74WSB.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-O4DZFMT5.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-ETNXAC2A.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-LOOLLFNO.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-MJ3ITMNK.js → user-detail-4H37KBIP.js} +3 -5
- package/dist/{user-edit-Y5VP6CKB.js → user-edit-42A2VX5E.js} +1 -1
- package/dist/{user-invite-YVLFH6HU.js → user-invite-5EJ3CIQZ.js} +10 -9
- package/dist/{user-list-6IYBI6HY.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/home-I3OILW5Z.js +0 -16
- package/dist/settings-AVE3VCCM.js +0 -19
- package/dist/{customer-edit-5EH2AUGN.js → customer-edit-LDKAXHZ6.js} +3 -3
- package/dist/{invite-6WUERQLW.js → invite-IZ2YTVPF.js} +1 -1
- package/dist/{store-bulk-edit-FQPQQR46.js → store-bulk-edit-XWDZQPFO.js} +1 -1
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
buildOfferGridData,
|
|
5
5
|
usePriceListCurrencyData,
|
|
6
6
|
usePriceListGridColumns
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GIV6KSQX.js";
|
|
8
8
|
import {
|
|
9
9
|
useCustomerGroupTableColumns
|
|
10
10
|
} from "./chunk-54EPH67T.js";
|
|
@@ -12,13 +12,13 @@ import {
|
|
|
12
12
|
useOfferTableColumns,
|
|
13
13
|
useOfferTableFilters,
|
|
14
14
|
useOfferTableQuery
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-2IOADJUM.js";
|
|
16
16
|
import {
|
|
17
17
|
extractPricesFromOffers
|
|
18
18
|
} from "./chunk-KVAD5JGS.js";
|
|
19
19
|
import {
|
|
20
20
|
useCustomerGroupTableFilters
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-OCDZIJBM.js";
|
|
22
22
|
import {
|
|
23
23
|
useOffers
|
|
24
24
|
} from "./chunk-GNNOFJAK.js";
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
import {
|
|
47
47
|
_DataTable,
|
|
48
48
|
useDataTable
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-SU36MZXC.js";
|
|
50
50
|
import {
|
|
51
51
|
useCreatePriceList
|
|
52
52
|
} from "./chunk-56XMCNDS.js";
|
|
@@ -110,6 +110,7 @@ var PricingPricesFields = Object.keys(
|
|
|
110
110
|
|
|
111
111
|
// src/pages/price-lists/price-list-create/price-list-create.tsx
|
|
112
112
|
import { Children as Children2 } from "react";
|
|
113
|
+
import { SectionNoAccess as SectionNoAccess3 } from "@mercurjs/dashboard-shared";
|
|
113
114
|
|
|
114
115
|
// src/pages/price-lists/price-list-create/components/price-list-create-form/price-list-create-form.tsx
|
|
115
116
|
import { zodResolver } from "@hookform/resolvers/zod";
|
|
@@ -137,6 +138,7 @@ import { useTranslation as useTranslation2 } from "react-i18next";
|
|
|
137
138
|
|
|
138
139
|
// src/pages/price-lists/common/components/price-list-customer-group-rule-form/price-list-customer-group-rule-form.tsx
|
|
139
140
|
import { Button, Checkbox } from "@medusajs/ui";
|
|
141
|
+
import { SectionNoAccess, isForbidden, useCan } from "@mercurjs/dashboard-shared";
|
|
140
142
|
import { keepPreviousData } from "@tanstack/react-query";
|
|
141
143
|
import {
|
|
142
144
|
createColumnHelper
|
|
@@ -170,10 +172,12 @@ var PriceListCustomerGroupRuleForm = ({
|
|
|
170
172
|
pageSize: PAGE_SIZE,
|
|
171
173
|
prefix: PREFIX
|
|
172
174
|
});
|
|
175
|
+
const canViewCustomerGroups = useCan("customer_groups");
|
|
173
176
|
const { customer_groups, count, isLoading, isError, error } = useCustomerGroups(
|
|
174
177
|
{ ...searchParams, fields: "id,name,customers.id" },
|
|
175
178
|
{
|
|
176
|
-
placeholderData: keepPreviousData
|
|
179
|
+
placeholderData: keepPreviousData,
|
|
180
|
+
enabled: canViewCustomerGroups
|
|
177
181
|
}
|
|
178
182
|
);
|
|
179
183
|
const updater = (value) => {
|
|
@@ -209,6 +213,12 @@ var PriceListCustomerGroupRuleForm = ({
|
|
|
209
213
|
prefix: PREFIX
|
|
210
214
|
});
|
|
211
215
|
const Component = type === "focus" ? StackedFocusModal : StackedDrawer;
|
|
216
|
+
if (!canViewCustomerGroups || isForbidden(error)) {
|
|
217
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex size-full flex-col overflow-hidden", children: [
|
|
218
|
+
/* @__PURE__ */ jsx(Component.Body, { className: "min-h-0 p-0", children: /* @__PURE__ */ jsx(SectionNoAccess, {}) }),
|
|
219
|
+
/* @__PURE__ */ jsx(Component.Footer, { children: /* @__PURE__ */ jsx(Component.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "secondary", size: "small", type: "button", children: t("actions.cancel") }) }) })
|
|
220
|
+
] });
|
|
221
|
+
}
|
|
212
222
|
if (isError) {
|
|
213
223
|
throw error;
|
|
214
224
|
}
|
|
@@ -561,6 +571,7 @@ Root._tabMeta = defineTabMeta({
|
|
|
561
571
|
var PriceListDetailsForm = Root;
|
|
562
572
|
|
|
563
573
|
// src/pages/price-lists/price-list-create/components/price-list-create-form/price-list-prices-form.tsx
|
|
574
|
+
import { usePermissions } from "@mercurjs/dashboard-shared";
|
|
564
575
|
import { useEffect as useEffect2, useMemo as useMemo2 } from "react";
|
|
565
576
|
import { useWatch } from "react-hook-form";
|
|
566
577
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
@@ -574,13 +585,14 @@ var Root2 = ({
|
|
|
574
585
|
const { setCloseOnEscape } = useRouteModal();
|
|
575
586
|
const offerIds = useWatch({ control: form.control, name: "offer_ids" });
|
|
576
587
|
const existingOffers = useWatch({ control: form.control, name: "offers" });
|
|
588
|
+
const { can } = usePermissions();
|
|
577
589
|
const { offers: selectedOffers } = useOffers(
|
|
578
590
|
{
|
|
579
591
|
id: offerIds,
|
|
580
592
|
limit: offerIds?.length || 1,
|
|
581
593
|
fields: "id,variant_id,product_id,seller_id,sku,seller.name,product.title,product.thumbnail"
|
|
582
594
|
},
|
|
583
|
-
{ enabled: (offerIds?.length ?? 0) > 0 }
|
|
595
|
+
{ enabled: (offerIds?.length ?? 0) > 0 && can("offers") }
|
|
584
596
|
);
|
|
585
597
|
const productIds = useMemo2(
|
|
586
598
|
() => Array.from(
|
|
@@ -590,7 +602,7 @@ var Root2 = ({
|
|
|
590
602
|
);
|
|
591
603
|
const { products, isLoading } = useProducts(
|
|
592
604
|
{ id: productIds, limit: productIds.length || 1, fields: "id,*variants" },
|
|
593
|
-
{ enabled: productIds.length > 0 }
|
|
605
|
+
{ enabled: productIds.length > 0 && can("products") }
|
|
594
606
|
);
|
|
595
607
|
const { gridData, variantIdByOffer } = useMemo2(
|
|
596
608
|
() => buildOfferGridData(
|
|
@@ -637,6 +649,7 @@ var PriceListPricesForm = Root2;
|
|
|
637
649
|
import { keepPreviousData as keepPreviousData2 } from "@tanstack/react-query";
|
|
638
650
|
import { useMemo as useMemo3, useRef, useState as useState2 } from "react";
|
|
639
651
|
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
652
|
+
import { SectionNoAccess as SectionNoAccess2, isForbidden as isForbidden2, useCan as useCan2 } from "@mercurjs/dashboard-shared";
|
|
640
653
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
641
654
|
var PAGE_SIZE2 = 50;
|
|
642
655
|
var PREFIX2 = "p";
|
|
@@ -649,8 +662,10 @@ var Root3 = () => {
|
|
|
649
662
|
pageSize: PAGE_SIZE2,
|
|
650
663
|
prefix: PREFIX2
|
|
651
664
|
});
|
|
665
|
+
const canViewOffers = useCan2("offers");
|
|
652
666
|
const { offers, count, isLoading, isError, error } = useOffers(searchParams, {
|
|
653
|
-
placeholderData: keepPreviousData2
|
|
667
|
+
placeholderData: keepPreviousData2,
|
|
668
|
+
enabled: canViewOffers
|
|
654
669
|
});
|
|
655
670
|
const offerMeta = useRef({});
|
|
656
671
|
for (const offer of offers ?? []) {
|
|
@@ -697,6 +712,9 @@ var Root3 = () => {
|
|
|
697
712
|
pageSize: PAGE_SIZE2,
|
|
698
713
|
prefix: PREFIX2
|
|
699
714
|
});
|
|
715
|
+
if (!canViewOffers || isForbidden2(error)) {
|
|
716
|
+
return /* @__PURE__ */ jsx4(SectionNoAccess2, {});
|
|
717
|
+
}
|
|
700
718
|
if (isError) {
|
|
701
719
|
throw error;
|
|
702
720
|
}
|
|
@@ -831,17 +849,23 @@ var PriceListCreateForm = ({
|
|
|
831
849
|
};
|
|
832
850
|
|
|
833
851
|
// src/pages/price-lists/price-list-create/price-list-create.tsx
|
|
834
|
-
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
852
|
+
import { Fragment, jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
835
853
|
var Root4 = ({ children }) => {
|
|
836
|
-
const { isReady, regions, currencies, pricePreferences } = usePriceListCurrencyData();
|
|
837
|
-
return /* @__PURE__ */
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
854
|
+
const { isReady, isForbidden: isForbidden3, regions, currencies, pricePreferences } = usePriceListCurrencyData();
|
|
855
|
+
return /* @__PURE__ */ jsxs3(RouteFocusModal, { children: [
|
|
856
|
+
isForbidden3 && /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
857
|
+
/* @__PURE__ */ jsx6(RouteFocusModal.Header, {}),
|
|
858
|
+
/* @__PURE__ */ jsx6(RouteFocusModal.Body, { children: /* @__PURE__ */ jsx6(SectionNoAccess3, {}) })
|
|
859
|
+
] }),
|
|
860
|
+
isReady && (Children2.count(children) > 0 ? children : /* @__PURE__ */ jsx6(
|
|
861
|
+
PriceListCreateForm,
|
|
862
|
+
{
|
|
863
|
+
regions,
|
|
864
|
+
currencies,
|
|
865
|
+
pricePreferences
|
|
866
|
+
}
|
|
867
|
+
))
|
|
868
|
+
] });
|
|
845
869
|
};
|
|
846
870
|
var PriceListCreatePage = Object.assign(Root4, {
|
|
847
871
|
Form: PriceListCreateForm,
|
|
@@ -16,22 +16,22 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
StatusCell
|
|
18
18
|
} from "./chunk-DB6ANJBO.js";
|
|
19
|
-
import {
|
|
20
|
-
Thumbnail
|
|
21
|
-
} from "./chunk-U3I6S3RO.js";
|
|
22
19
|
import {
|
|
23
20
|
SingleColumnPage
|
|
24
21
|
} from "./chunk-H6MYB7GB.js";
|
|
22
|
+
import {
|
|
23
|
+
Thumbnail
|
|
24
|
+
} from "./chunk-U3I6S3RO.js";
|
|
25
25
|
import {
|
|
26
26
|
useQueryParams
|
|
27
27
|
} from "./chunk-THHRRYRS.js";
|
|
28
28
|
import {
|
|
29
29
|
_DataTable,
|
|
30
30
|
useDataTable
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-SU36MZXC.js";
|
|
32
32
|
import {
|
|
33
33
|
ActionMenu
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-3UOYBH5O.js";
|
|
35
35
|
import {
|
|
36
36
|
useProductCategories
|
|
37
37
|
} from "./chunk-SQ7J4KTS.js";
|
|
@@ -48,7 +48,7 @@ import { Container } from "@medusajs/ui";
|
|
|
48
48
|
import { Children } from "react";
|
|
49
49
|
import { Button, Heading, Text } from "@medusajs/ui";
|
|
50
50
|
import { useTranslation } from "react-i18next";
|
|
51
|
-
import { PermissionGuard } from "@mercurjs/dashboard-shared";
|
|
51
|
+
import { PermissionGuard, PermissionAction } from "@mercurjs/dashboard-shared";
|
|
52
52
|
import { Link } from "react-router-dom";
|
|
53
53
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
54
54
|
var CategoryListTitle = () => {
|
|
@@ -63,7 +63,7 @@ var CategoryListActions = ({
|
|
|
63
63
|
}) => {
|
|
64
64
|
const { t } = useTranslation();
|
|
65
65
|
return /* @__PURE__ */ jsx("div", { className: "flex items-center gap-x-2", children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
66
|
-
/* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", asChild: true, children: /* @__PURE__ */ jsx(Link, { to: "organize", children: t("categories.organize.action") }) }),
|
|
66
|
+
/* @__PURE__ */ jsx(PermissionAction, { permission: "product_categories:edit", children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", asChild: true, children: /* @__PURE__ */ jsx(Link, { to: "organize", children: t("categories.organize.action") }) }) }),
|
|
67
67
|
/* @__PURE__ */ jsx(PermissionGuard, { permission: "product_categories:edit", children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", asChild: true, children: /* @__PURE__ */ jsx(Link, { to: "create", children: t("actions.create") }) }) })
|
|
68
68
|
] }) });
|
|
69
69
|
};
|
|
@@ -265,7 +265,8 @@ var CategoryRowActions = ({
|
|
|
265
265
|
{
|
|
266
266
|
label: t("actions.edit"),
|
|
267
267
|
icon: /* @__PURE__ */ jsx3(PencilSquare, {}),
|
|
268
|
-
to: `${category.id}/edit
|
|
268
|
+
to: `${category.id}/edit`,
|
|
269
|
+
permission: "product_categories:edit"
|
|
269
270
|
}
|
|
270
271
|
]
|
|
271
272
|
},
|
|
@@ -274,7 +275,8 @@ var CategoryRowActions = ({
|
|
|
274
275
|
{
|
|
275
276
|
label: t("actions.delete"),
|
|
276
277
|
icon: /* @__PURE__ */ jsx3(Trash, {}),
|
|
277
|
-
onClick: handleDelete
|
|
278
|
+
onClick: handleDelete,
|
|
279
|
+
permission: "product_categories:manage"
|
|
278
280
|
}
|
|
279
281
|
]
|
|
280
282
|
}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-E74OUNA3.js";
|
|
7
7
|
import {
|
|
8
8
|
ActionMenu
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3UOYBH5O.js";
|
|
10
10
|
import {
|
|
11
11
|
TwoColumnPageSkeleton
|
|
12
12
|
} from "./chunk-INNFZYX2.js";
|
|
@@ -66,6 +66,7 @@ function VariantGeneralSection({
|
|
|
66
66
|
{
|
|
67
67
|
label: t("actions.edit"),
|
|
68
68
|
to: "edit",
|
|
69
|
+
permission: "products:edit",
|
|
69
70
|
icon: /* @__PURE__ */ jsx(PencilSquare, {})
|
|
70
71
|
}
|
|
71
72
|
]
|
|
@@ -75,6 +76,7 @@ function VariantGeneralSection({
|
|
|
75
76
|
{
|
|
76
77
|
label: t("actions.delete"),
|
|
77
78
|
onClick: handleDelete,
|
|
79
|
+
permission: "products:manage",
|
|
78
80
|
icon: /* @__PURE__ */ jsx(Trash, {})
|
|
79
81
|
}
|
|
80
82
|
]
|
|
@@ -13,14 +13,14 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
_DataTable,
|
|
15
15
|
useDataTable
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-SU36MZXC.js";
|
|
17
|
+
import {
|
|
18
|
+
ActionMenu
|
|
19
|
+
} from "./chunk-3UOYBH5O.js";
|
|
17
20
|
import {
|
|
18
21
|
useCollections,
|
|
19
22
|
useDeleteCollection
|
|
20
23
|
} from "./chunk-I4WBDDWN.js";
|
|
21
|
-
import {
|
|
22
|
-
ActionMenu
|
|
23
|
-
} from "./chunk-BDGZ4EQO.js";
|
|
24
24
|
|
|
25
25
|
// src/pages/collections/collection-list/collection-list.tsx
|
|
26
26
|
import { Children as Children3 } from "react";
|
|
@@ -109,6 +109,7 @@ var CollectionRowActions = ({
|
|
|
109
109
|
{
|
|
110
110
|
label: t("actions.edit"),
|
|
111
111
|
to: `/collections/${collection.id}/edit`,
|
|
112
|
+
permission: "product_collections:edit",
|
|
112
113
|
icon: /* @__PURE__ */ jsx2(PencilSquare, {})
|
|
113
114
|
}
|
|
114
115
|
]
|
|
@@ -118,6 +119,7 @@ var CollectionRowActions = ({
|
|
|
118
119
|
{
|
|
119
120
|
label: t("actions.delete"),
|
|
120
121
|
onClick: handleDeleteCollection,
|
|
122
|
+
permission: "product_collections:manage",
|
|
121
123
|
icon: /* @__PURE__ */ jsx2(Trash, {}),
|
|
122
124
|
disabled: !collection.id
|
|
123
125
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LocalizedTablePagination,
|
|
3
3
|
useDeleteTaxRateAction
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-Q2XWHI6K.js";
|
|
5
5
|
import {
|
|
6
6
|
TaxRateRuleReferenceType
|
|
7
7
|
} from "./chunk-LTBX54CI.js";
|
|
@@ -17,16 +17,16 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
NoRecords,
|
|
19
19
|
NoResults
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-4J74G7N2.js";
|
|
21
|
+
import {
|
|
22
|
+
ActionMenu
|
|
23
|
+
} from "./chunk-3UOYBH5O.js";
|
|
21
24
|
import {
|
|
22
25
|
useProductTypes
|
|
23
26
|
} from "./chunk-AEBQQ2EG.js";
|
|
24
27
|
import {
|
|
25
28
|
useShippingOptions
|
|
26
29
|
} from "./chunk-SCLV2T6Z.js";
|
|
27
|
-
import {
|
|
28
|
-
ActionMenu
|
|
29
|
-
} from "./chunk-BDGZ4EQO.js";
|
|
30
30
|
import {
|
|
31
31
|
TableFooterSkeleton
|
|
32
32
|
} from "./chunk-INNFZYX2.js";
|
|
@@ -69,6 +69,7 @@ var TaxRateActions = ({ taxRate }) => {
|
|
|
69
69
|
{
|
|
70
70
|
actions: [
|
|
71
71
|
{
|
|
72
|
+
permission: "tax_regions:edit",
|
|
72
73
|
label: t("actions.edit"),
|
|
73
74
|
icon: /* @__PURE__ */ jsx(PencilSquare, {}),
|
|
74
75
|
to: `tax-rates/${taxRate.id}/edit`
|
|
@@ -78,6 +79,7 @@ var TaxRateActions = ({ taxRate }) => {
|
|
|
78
79
|
{
|
|
79
80
|
actions: [
|
|
80
81
|
{
|
|
82
|
+
permission: "tax_regions:manage",
|
|
81
83
|
label: t("actions.delete"),
|
|
82
84
|
icon: /* @__PURE__ */ jsx(Trash, {}),
|
|
83
85
|
onClick: handleDelete
|
|
@@ -93,6 +95,7 @@ var TaxRateActions = ({ taxRate }) => {
|
|
|
93
95
|
import { Button } from "@medusajs/ui";
|
|
94
96
|
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
95
97
|
import { Link } from "react-router-dom";
|
|
98
|
+
import { PermissionAction } from "@mercurjs/dashboard-shared";
|
|
96
99
|
|
|
97
100
|
// src/pages/tax-regions/common/components/tax-override-card/tax-override-card.tsx
|
|
98
101
|
import {
|
|
@@ -111,6 +114,10 @@ import {
|
|
|
111
114
|
} from "@medusajs/ui";
|
|
112
115
|
import { Collapsible as RadixCollapsible } from "radix-ui";
|
|
113
116
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
117
|
+
import {
|
|
118
|
+
isForbidden,
|
|
119
|
+
usePermissions
|
|
120
|
+
} from "@mercurjs/dashboard-shared";
|
|
114
121
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
115
122
|
var TaxOverrideCard = ({ taxRate }) => {
|
|
116
123
|
const { t } = useTranslation2();
|
|
@@ -157,6 +164,7 @@ var TaxOverrideCard = ({ taxRate }) => {
|
|
|
157
164
|
{
|
|
158
165
|
actions: [
|
|
159
166
|
{
|
|
167
|
+
permission: "tax_regions:edit",
|
|
160
168
|
label: t("actions.edit"),
|
|
161
169
|
icon: /* @__PURE__ */ jsx2(PencilSquare2, {}),
|
|
162
170
|
to: `overrides/${taxRate.id}/edit`
|
|
@@ -166,6 +174,7 @@ var TaxOverrideCard = ({ taxRate }) => {
|
|
|
166
174
|
{
|
|
167
175
|
actions: [
|
|
168
176
|
{
|
|
177
|
+
permission: "tax_regions:manage",
|
|
169
178
|
label: t("actions.delete"),
|
|
170
179
|
icon: /* @__PURE__ */ jsx2(Trash2, {}),
|
|
171
180
|
onClick: handleDelete
|
|
@@ -266,10 +275,17 @@ var ReferenceValues = ({
|
|
|
266
275
|
ids
|
|
267
276
|
}) => {
|
|
268
277
|
const { t } = useTranslation2();
|
|
278
|
+
const { can } = usePermissions();
|
|
269
279
|
const { isPending, additional, labels, isError, error } = useReferenceValues(
|
|
270
280
|
type,
|
|
271
281
|
ids
|
|
272
282
|
);
|
|
283
|
+
const badge = /* @__PURE__ */ jsx2(Badge, { size: "2xsmall", children: t("taxRegions.fields.targets.values", {
|
|
284
|
+
count: ids.length
|
|
285
|
+
}) });
|
|
286
|
+
if (!can(REFERENCE_PERMISSION_KEY[type]) || isForbidden(error)) {
|
|
287
|
+
return badge;
|
|
288
|
+
}
|
|
273
289
|
if (isError) {
|
|
274
290
|
throw error;
|
|
275
291
|
}
|
|
@@ -285,20 +301,24 @@ var ReferenceValues = ({
|
|
|
285
301
|
count: additional
|
|
286
302
|
}) })
|
|
287
303
|
] }),
|
|
288
|
-
children:
|
|
289
|
-
count: ids.length
|
|
290
|
-
}) })
|
|
304
|
+
children: badge
|
|
291
305
|
}
|
|
292
306
|
);
|
|
293
307
|
};
|
|
308
|
+
var REFERENCE_PERMISSION_KEY = {
|
|
309
|
+
["product" /* PRODUCT */]: "products",
|
|
310
|
+
["product_type" /* PRODUCT_TYPE */]: "product_types",
|
|
311
|
+
["shipping_option" /* SHIPPING_OPTION */]: "shipping_options"
|
|
312
|
+
};
|
|
294
313
|
var useReferenceValues = (type, ids) => {
|
|
314
|
+
const { can } = usePermissions();
|
|
295
315
|
const products = useProducts(
|
|
296
316
|
{
|
|
297
317
|
id: ids,
|
|
298
318
|
limit: 10
|
|
299
319
|
},
|
|
300
320
|
{
|
|
301
|
-
enabled: !!ids.length && type === "product" /* PRODUCT */
|
|
321
|
+
enabled: !!ids.length && type === "product" /* PRODUCT */ && can("products")
|
|
302
322
|
}
|
|
303
323
|
);
|
|
304
324
|
const productTypes = useProductTypes(
|
|
@@ -307,7 +327,7 @@ var useReferenceValues = (type, ids) => {
|
|
|
307
327
|
limit: 10
|
|
308
328
|
},
|
|
309
329
|
{
|
|
310
|
-
enabled: !!ids.length && type === "product_type" /* PRODUCT_TYPE */
|
|
330
|
+
enabled: !!ids.length && type === "product_type" /* PRODUCT_TYPE */ && can("product_types")
|
|
311
331
|
}
|
|
312
332
|
);
|
|
313
333
|
const shippingOptions = useShippingOptions(
|
|
@@ -316,7 +336,7 @@ var useReferenceValues = (type, ids) => {
|
|
|
316
336
|
limit: 10
|
|
317
337
|
},
|
|
318
338
|
{
|
|
319
|
-
enabled: !!ids.length && type === "shipping_option" /* SHIPPING_OPTION */
|
|
339
|
+
enabled: !!ids.length && type === "shipping_option" /* SHIPPING_OPTION */ && can("shipping_options")
|
|
320
340
|
}
|
|
321
341
|
);
|
|
322
342
|
switch (type) {
|
|
@@ -409,7 +429,7 @@ var TaxOverrideTable = ({
|
|
|
409
429
|
}
|
|
410
430
|
)
|
|
411
431
|
] }),
|
|
412
|
-
/* @__PURE__ */ jsx3(
|
|
432
|
+
/* @__PURE__ */ jsx3(PermissionAction, { permission: "tax_regions:edit", children: /* @__PURE__ */ jsx3(Button, { size: "small", variant: "secondary", asChild: true, "data-testid": dataTestId ? `${dataTestId}-create-button` : void 0, children: /* @__PURE__ */ jsx3(Link, { to: action.to, children: action.label }) }) })
|
|
413
433
|
] })
|
|
414
434
|
] }),
|
|
415
435
|
noResults && /* @__PURE__ */ jsx3(NoResults, {}),
|
|
@@ -22,15 +22,15 @@ import {
|
|
|
22
22
|
import {
|
|
23
23
|
_DataTable,
|
|
24
24
|
useDataTable
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-SU36MZXC.js";
|
|
26
|
+
import {
|
|
27
|
+
ActionMenu
|
|
28
|
+
} from "./chunk-3UOYBH5O.js";
|
|
26
29
|
import {
|
|
27
30
|
useApiKeys,
|
|
28
31
|
useDeleteApiKey,
|
|
29
32
|
useRevokeApiKey
|
|
30
33
|
} from "./chunk-ALJIXUKL.js";
|
|
31
|
-
import {
|
|
32
|
-
ActionMenu
|
|
33
|
-
} from "./chunk-BDGZ4EQO.js";
|
|
34
34
|
|
|
35
35
|
// src/pages/api-key-management/api-key-management-list/api-key-management-list.tsx
|
|
36
36
|
import { Children as Children3 } from "react";
|
|
@@ -125,6 +125,7 @@ var ApiKeyRowActions = ({
|
|
|
125
125
|
actions: [
|
|
126
126
|
{
|
|
127
127
|
icon: /* @__PURE__ */ jsx(PencilSquare, {}),
|
|
128
|
+
permission: "api_keys:edit",
|
|
128
129
|
label: t("actions.edit"),
|
|
129
130
|
to: `${apiKey.id}/edit`
|
|
130
131
|
},
|
|
@@ -141,12 +142,14 @@ var ApiKeyRowActions = ({
|
|
|
141
142
|
actions: [
|
|
142
143
|
{
|
|
143
144
|
icon: /* @__PURE__ */ jsx(XCircle, {}),
|
|
145
|
+
permission: "api_keys:edit",
|
|
144
146
|
label: t("apiKeyManagement.actions.revoke"),
|
|
145
147
|
onClick: handleRevoke,
|
|
146
148
|
disabled: !!apiKey.revoked_at
|
|
147
149
|
},
|
|
148
150
|
{
|
|
149
151
|
icon: /* @__PURE__ */ jsx(Trash, {}),
|
|
152
|
+
permission: "api_keys:manage",
|
|
150
153
|
label: t("actions.delete"),
|
|
151
154
|
onClick: handleDelete,
|
|
152
155
|
disabled: !apiKey.revoked_at
|
|
@@ -17,7 +17,11 @@ import {
|
|
|
17
17
|
} from "./chunk-FHZHKIWI.js";
|
|
18
18
|
|
|
19
19
|
// src/pages/price-lists/common/hooks/use-price-list-currency-data.tsx
|
|
20
|
+
import { isForbidden, usePermissions } from "@mercurjs/dashboard-shared";
|
|
20
21
|
var usePriceListCurrencyData = () => {
|
|
22
|
+
const { can } = usePermissions();
|
|
23
|
+
const canViewRegions = can("regions");
|
|
24
|
+
const canViewPreferences = can("price_preferences");
|
|
21
25
|
const {
|
|
22
26
|
store,
|
|
23
27
|
isPending: isStorePending,
|
|
@@ -32,35 +36,40 @@ var usePriceListCurrencyData = () => {
|
|
|
32
36
|
isPending: isRegionsPending,
|
|
33
37
|
isError: isRegionsError,
|
|
34
38
|
error: regionsError
|
|
35
|
-
} = useRegions(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
} = useRegions(
|
|
40
|
+
{
|
|
41
|
+
fields: "id,name,currency_code",
|
|
42
|
+
limit: 999
|
|
43
|
+
},
|
|
44
|
+
{ enabled: canViewRegions }
|
|
45
|
+
);
|
|
39
46
|
const {
|
|
40
47
|
price_preferences: pricePreferences,
|
|
41
48
|
isPending: isPreferencesPending,
|
|
42
49
|
isError: isPreferencesError,
|
|
43
50
|
error: preferencesError
|
|
44
|
-
} = usePricePreferences({});
|
|
51
|
+
} = usePricePreferences({}, { enabled: canViewPreferences });
|
|
52
|
+
const forbidden = !canViewRegions || !canViewPreferences || isForbidden(regionsError) || isForbidden(preferencesError);
|
|
45
53
|
const isReady = !!currencies && !!regions && !!pricePreferences && !isStorePending && !isRegionsPending && !isPreferencesPending;
|
|
46
|
-
if (isRegionsError) {
|
|
54
|
+
if (isRegionsError && !forbidden) {
|
|
47
55
|
throw regionsError;
|
|
48
56
|
}
|
|
49
57
|
if (isStoreError) {
|
|
50
58
|
throw storeError;
|
|
51
59
|
}
|
|
52
|
-
if (isPreferencesError) {
|
|
60
|
+
if (isPreferencesError && !forbidden) {
|
|
53
61
|
throw preferencesError;
|
|
54
62
|
}
|
|
55
|
-
if (!isReady) {
|
|
63
|
+
if (forbidden || !isReady) {
|
|
56
64
|
return {
|
|
65
|
+
isForbidden: forbidden,
|
|
57
66
|
regions: void 0,
|
|
58
67
|
currencies: void 0,
|
|
59
68
|
pricePreferences: void 0,
|
|
60
69
|
isReady: false
|
|
61
70
|
};
|
|
62
71
|
}
|
|
63
|
-
return { regions, currencies, pricePreferences, isReady };
|
|
72
|
+
return { regions, currencies, pricePreferences, isReady, isForbidden: false };
|
|
64
73
|
};
|
|
65
74
|
|
|
66
75
|
// src/pages/price-lists/common/build-offer-grid-data.ts
|