@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.
Files changed (252) hide show
  1. package/dist/{add-campaign-promotions-6OB7BUPK.js → add-campaign-promotions-LGCLOFOD.js} +13 -8
  2. package/dist/{adjust-inventory-32UZ4BZC.js → adjust-inventory-H46YCNLT.js} +7 -2
  3. package/dist/{api-key-management-detail-ULNXV7YJ.js → api-key-management-detail-Z4KSJHUC.js} +5 -7
  4. package/dist/{api-key-management-list-KPWCB7NX.js → api-key-management-list-QZIRPINF.js} +5 -5
  5. package/dist/{api-key-management-sales-channels-RBK66ZGC.js → api-key-management-sales-channels-RGZ3QITG.js} +9 -7
  6. package/dist/{attribute-create-UWLP2DZY.js → attribute-create-OFTZRQCO.js} +3 -2
  7. package/dist/{attribute-detail-7PIMBKEE.js → attribute-detail-WVN5KOH2.js} +13 -7
  8. package/dist/{attribute-list-FLTRNSFI.js → attribute-list-ZC3CG5LS.js} +6 -6
  9. package/dist/{campaign-detail-WBWGUSMW.js → campaign-detail-MGDL2TQC.js} +10 -10
  10. package/dist/{campaign-list-M24QK43I.js → campaign-list-XCO4FJDZ.js} +5 -5
  11. package/dist/{categories-metadata-6F6EFZRQ.js → categories-metadata-QYH5U77W.js} +2 -2
  12. package/dist/{category-detail-3YY7FVY4.js → category-detail-FAP76OQB.js} +6 -7
  13. package/dist/{category-list-AT66O7HI.js → category-list-XDOYTQ4X.js} +5 -5
  14. package/dist/{category-products-RTOFMB25.js → category-products-35ZZYVWJ.js} +12 -5
  15. package/dist/{chunk-PH7TEL5B.js → chunk-23CSVCQK.js} +26 -15
  16. package/dist/{chunk-G4L2EPKT.js → chunk-25TWJMWE.js} +2 -2
  17. package/dist/{chunk-YJJ6YXFA.js → chunk-26REB3B6.js} +2 -1
  18. package/dist/{chunk-36C3CNJC.js → chunk-2IOADJUM.js} +27 -9
  19. package/dist/{chunk-ZH6TIKKW.js → chunk-2MOTQNEG.js} +1 -0
  20. package/dist/{chunk-4RKWEFNY.js → chunk-2XBNM6TM.js} +2 -2
  21. package/dist/{chunk-5KTSSLBG.js → chunk-3BKRMIWA.js} +21 -10
  22. package/dist/chunk-3UOYBH5O.js +8 -0
  23. package/dist/{chunk-T3AKFW7T.js → chunk-473QGQSA.js} +6 -3
  24. package/dist/{chunk-FV7B2OWJ.js → chunk-4AOVNA5G.js} +29 -18
  25. package/dist/{chunk-5LK5NAGN.js → chunk-4J4JAXXQ.js} +5 -3
  26. package/dist/{chunk-IKAUNMRC.js → chunk-4J74G7N2.js} +15 -3
  27. package/dist/{chunk-WIDHYDJQ.js → chunk-4JQDYQSX.js} +20 -10
  28. package/dist/{chunk-QPHY3XXC.js → chunk-4W77EUYY.js} +4 -2
  29. package/dist/{chunk-VKDZAXLK.js → chunk-5K4WEF2N.js} +19 -8
  30. package/dist/{chunk-AGO4ROOR.js → chunk-5OIFUF7R.js} +1 -1
  31. package/dist/{chunk-4CYHJ72Y.js → chunk-5QW3GY37.js} +25 -12
  32. package/dist/{chunk-BVKPOXLT.js → chunk-72DFLNNI.js} +9 -3
  33. package/dist/{chunk-X22JPPG6.js → chunk-7GCMYYFL.js} +5 -2
  34. package/dist/{chunk-AYKMFPKF.js → chunk-7LUKMT5J.js} +4 -2
  35. package/dist/{chunk-L3GVDREC.js → chunk-7OTRTHLL.js} +4 -2
  36. package/dist/{chunk-IZ77JV46.js → chunk-AUCCE46Q.js} +6 -3
  37. package/dist/{chunk-545HIUP3.js → chunk-AW4RL2SA.js} +58 -31
  38. package/dist/{chunk-62YRQVR7.js → chunk-AZV22U4V.js} +20 -5
  39. package/dist/{chunk-ZSXF4PEE.js → chunk-CX5XB56X.js} +4 -3
  40. package/dist/{chunk-J4SYK3RT.js → chunk-DGRHDZQO.js} +15 -5
  41. package/dist/{chunk-7UHN2CW7.js → chunk-DM52HEOD.js} +1 -1
  42. package/dist/{chunk-LMBIFEA5.js → chunk-DUKOOIQD.js} +3 -2
  43. package/dist/{chunk-VM35P6LF.js → chunk-DVFILGNQ.js} +7 -5
  44. package/dist/{chunk-5H4KS6M3.js → chunk-DWPBJEEM.js} +18 -5
  45. package/dist/{chunk-B4MSCLHO.js → chunk-E43YJQ2B.js} +42 -18
  46. package/dist/{chunk-NUMVOUQQ.js → chunk-EHLCUND7.js} +8 -6
  47. package/dist/{chunk-DBCNRZZE.js → chunk-EIPTLSNT.js} +3 -1
  48. package/dist/{chunk-7SHPS72O.js → chunk-EVYQCNVT.js} +4 -2
  49. package/dist/{chunk-VWK3K2CI.js → chunk-FCAJQFYT.js} +30 -10
  50. package/dist/{chunk-MKVEDGJ2.js → chunk-G63BL5AB.js} +5 -2
  51. package/dist/{chunk-BZPOERWW.js → chunk-GIV6KSQX.js} +18 -9
  52. package/dist/{chunk-QOMIRTO4.js → chunk-GQGCXLVP.js} +30 -11
  53. package/dist/{chunk-GWOZSV7A.js → chunk-GQYB3OOC.js} +105 -62
  54. package/dist/{chunk-IFG5ONPV.js → chunk-GZUXEIEB.js} +2 -2
  55. package/dist/{chunk-VOXWLJHA.js → chunk-H3TOETGJ.js} +11 -6
  56. package/dist/{chunk-B6XGTGMP.js → chunk-H4TJZB26.js} +24 -16
  57. package/dist/{chunk-AUTG5JEE.js → chunk-HHAM76HD.js} +41 -23
  58. package/dist/{chunk-XAQLGDAI.js → chunk-HPMMGA5B.js} +1 -1
  59. package/dist/{chunk-2IPSJDRD.js → chunk-I3RGMOTM.js} +18 -10
  60. package/dist/{chunk-4OCANHUL.js → chunk-IQRFJO4N.js} +3 -1
  61. package/dist/{chunk-WJPWYQYV.js → chunk-JFRYC6GK.js} +15 -8
  62. package/dist/{chunk-FOWWGEP7.js → chunk-JS2DAWKO.js} +9 -6
  63. package/dist/{chunk-ESVFENTS.js → chunk-K6OBX6ZR.js} +5 -4
  64. package/dist/{chunk-TN3HCAJ2.js → chunk-KB3BTLIB.js} +4 -2
  65. package/dist/{chunk-VIHLAFDA.js → chunk-KYOZ4CCY.js} +61 -29
  66. package/dist/{chunk-UFFLSUK4.js → chunk-LCUAIH7P.js} +4 -2
  67. package/dist/{chunk-3CLWBE4O.js → chunk-M7VHCFCW.js} +7 -5
  68. package/dist/{chunk-EVCAR6GP.js → chunk-MAEUKXZ4.js} +8 -5
  69. package/dist/{chunk-RU5IUJC2.js → chunk-MFGLOUTZ.js} +32 -10
  70. package/dist/{chunk-HFCJJJKP.js → chunk-MKKOAF2W.js} +26 -12
  71. package/dist/{chunk-AJCCPN5R.js → chunk-MNKJHZZT.js} +8 -4
  72. package/dist/{chunk-XV4YW4GE.js → chunk-NDS246VB.js} +20 -12
  73. package/dist/{chunk-ZPNRNL4X.js → chunk-NHZU2M7Z.js} +6 -4
  74. package/dist/{chunk-3JXOVOJI.js → chunk-NJ2NRKAJ.js} +55 -12
  75. package/dist/{chunk-CFQX7HAW.js → chunk-OCDZIJBM.js} +11 -5
  76. package/dist/{chunk-HBQ7EHHM.js → chunk-OGTWBHJC.js} +1 -1
  77. package/dist/{chunk-CBLCX5UK.js → chunk-Q2XWHI6K.js} +4 -1
  78. package/dist/{chunk-YWZQKODL.js → chunk-R55XYG6Y.js} +28 -15
  79. package/dist/{chunk-UZ2FWDJO.js → chunk-RAD3UMQ3.js} +4 -2
  80. package/dist/{chunk-WA3UZTKD.js → chunk-RUGB47D3.js} +1 -1
  81. package/dist/{chunk-ZOU25JF6.js → chunk-SU36MZXC.js} +11 -3
  82. package/dist/{chunk-SJEMUTO2.js → chunk-SW46WBFA.js} +29 -14
  83. package/dist/{chunk-NOK2356Y.js → chunk-SZSAJHN7.js} +4 -3
  84. package/dist/{chunk-QFYTIG3H.js → chunk-TPWSE5HE.js} +14 -9
  85. package/dist/{chunk-7ECQXPOG.js → chunk-TVCHVG2A.js} +3 -3
  86. package/dist/{chunk-ZPHVFD4N.js → chunk-TXZWIFWX.js} +1 -0
  87. package/dist/{chunk-HJACC6KV.js → chunk-UKQ6FES4.js} +6 -3
  88. package/dist/{chunk-7Y7YN7KG.js → chunk-USEE6QNQ.js} +65 -25
  89. package/dist/{chunk-JL3NKSLJ.js → chunk-USO2SWZV.js} +9 -4
  90. package/dist/{chunk-7C7YLUYT.js → chunk-V3UQOU5W.js} +4 -2
  91. package/dist/{chunk-HUJIVGX3.js → chunk-VD2CKAYG.js} +19 -8
  92. package/dist/{chunk-D3KEKNYN.js → chunk-VHO6ZXW2.js} +9 -5
  93. package/dist/{chunk-C4XKPQ6T.js → chunk-VLNTJXXO.js} +16 -3
  94. package/dist/{chunk-D3RDR3D3.js → chunk-W3LCOK3O.js} +153 -124
  95. package/dist/{chunk-IAMX7JMM.js → chunk-WD5XBWAN.js} +118 -53
  96. package/dist/chunk-WSK532ZA.js +236 -0
  97. package/dist/{chunk-RX7RU7VV.js → chunk-XI4SB5YZ.js} +120 -81
  98. package/dist/{chunk-KMLQ2ENL.js → chunk-XNGTE2VC.js} +1 -1
  99. package/dist/{chunk-TXEOM3WC.js → chunk-XUOGIKEE.js} +3 -3
  100. package/dist/{chunk-R22UAHRF.js → chunk-YDESULL7.js} +3 -1
  101. package/dist/{chunk-JODADMJ6.js → chunk-YN4KTMRA.js} +7 -5
  102. package/dist/{chunk-IVWSTXBV.js → chunk-YUKJJHI7.js} +8 -5
  103. package/dist/{chunk-4EQSS3YZ.js → chunk-Z2FX5GG4.js} +22 -10
  104. package/dist/{chunk-JQEAWWRP.js → chunk-ZPJOSHV7.js} +23 -12
  105. package/dist/{chunk-FX7HVGV5.js → chunk-ZQZFY3UY.js} +6 -4
  106. package/dist/{chunk-U2RBSUMY.js → chunk-ZU76OTV3.js} +2 -2
  107. package/dist/{collection-add-products-O5ILXKFY.js → collection-add-products-IIBLH7XQ.js} +12 -5
  108. package/dist/{collection-detail-N7VZKBIJ.js → collection-detail-IYZKDR4L.js} +6 -7
  109. package/dist/{collection-list-QQJAESFN.js → collection-list-EIDV4DEH.js} +11 -11
  110. package/dist/{collection-metadata-QUMWZABV.js → collection-metadata-IKYBHHEU.js} +2 -2
  111. package/dist/{commission-rule-create-CDLLQIY4.js → commission-rule-create-QDNXXBTV.js} +64 -30
  112. package/dist/{commission-rule-detail-CIE6TPXW.js → commission-rule-detail-QYJIK375.js} +3 -5
  113. package/dist/{commission-rule-edit-5CFKPI7U.js → commission-rule-edit-HICDPDLK.js} +58 -24
  114. package/dist/{commissions-list-US6OMDVL.js → commissions-list-AQUW636T.js} +6 -6
  115. package/dist/{customer-detail-CGKGZE2N.js → customer-detail-TBGKTNQQ.js} +8 -8
  116. package/dist/{customer-group-add-customers-XYWJSXKS.js → customer-group-add-customers-RWJOA2NJ.js} +3 -3
  117. package/dist/{customer-group-detail-JMBR3D72.js → customer-group-detail-47IPD337.js} +6 -7
  118. package/dist/{customer-group-list-GYEQ2GTL.js → customer-group-list-Q2AYIVO4.js} +6 -7
  119. package/dist/{customer-group-metadata-UQ2SCLOK.js → customer-group-metadata-T3WFBL7U.js} +2 -2
  120. package/dist/{customer-list-6X6RQDLK.js → customer-list-JOPTF4QB.js} +5 -6
  121. package/dist/{customer-metadata-UEQSIGLT.js → customer-metadata-YSMWL4L3.js} +2 -2
  122. package/dist/{customers-add-customer-group-AZYAIQ7E.js → customers-add-customer-group-AVRYBS6Q.js} +13 -6
  123. package/dist/{edit-inventory-item-ENA2OFSQ.js → edit-inventory-item-7M7Q6HL4.js} +1 -1
  124. package/dist/{edit-inventory-item-attributes-Z26UDTSH.js → edit-inventory-item-attributes-E7J2WFPF.js} +1 -1
  125. package/dist/{edit-reservation-W3THLKKK.js → edit-reservation-S3QTQRPY.js} +11 -3
  126. package/dist/{edit-rules-3DCWA5UF.js → edit-rules-NRF7U4AT.js} +1 -1
  127. package/dist/{home-RT4EIJFM.js → home-KKOF4FWS.js} +3 -3
  128. package/dist/index.css +3 -0
  129. package/dist/index.d.ts +10 -28
  130. package/dist/index.js +431 -545
  131. package/dist/{inventory-detail-PMJN4E2D.js → inventory-detail-U6TRGZRY.js} +6 -6
  132. package/dist/{inventory-list-XS3OFHLW.js → inventory-list-JWA7U2LB.js} +4 -5
  133. package/dist/{inventory-metadata-OGS7JMZ5.js → inventory-metadata-KO622YEI.js} +2 -2
  134. package/dist/{inventory-stock-LDBJQCJF.js → inventory-stock-WWXYVFK2.js} +20 -10
  135. package/dist/{location-detail-DKBNATDD.js → location-detail-27FBZML7.js} +4 -6
  136. package/dist/{location-fulfillment-providers-JGJOTGMZ.js → location-fulfillment-providers-XTYJWAVP.js} +19 -11
  137. package/dist/{location-list-JJN42JSH.js → location-list-RMHT36AO.js} +4 -6
  138. package/dist/{location-sales-channels-FT6TFVXJ.js → location-sales-channels-JB5OIMXE.js} +13 -6
  139. package/dist/{location-service-zone-create-KPM4RSCF.js → location-service-zone-create-JKAKZCZ2.js} +3 -3
  140. package/dist/{location-service-zone-manage-areas-NW5JUTCH.js → location-service-zone-manage-areas-K2BMFI5Y.js} +3 -3
  141. package/dist/{location-service-zone-shipping-option-create-RYAIECRU.js → location-service-zone-shipping-option-create-WJOLO6A3.js} +3 -3
  142. package/dist/{location-service-zone-shipping-option-edit-UUIR7B5S.js → location-service-zone-shipping-option-edit-I7BJGH76.js} +23 -10
  143. package/dist/{location-service-zone-shipping-option-pricing-Z5HCXRHG.js → location-service-zone-shipping-option-pricing-47Y3CP4U.js} +36 -12
  144. package/dist/{login-72TAMW53.js → login-ISNIWXU2.js} +1 -1
  145. package/dist/{manage-locations-TCMY6A4J.js → manage-locations-5FKFNJQN.js} +13 -2
  146. package/dist/{marketplace-add-currencies-Z6FUIAU5.js → marketplace-add-currencies-34XKWMI7.js} +33 -9
  147. package/dist/{marketplace-detail-UYBZIFQW.js → marketplace-detail-A76FTENH.js} +6 -6
  148. package/dist/{marketplace-edit-G7YNGABC.js → marketplace-edit-KXKUECZQ.js} +61 -30
  149. package/dist/{marketplace-metadata-2TZTRDRJ.js → marketplace-metadata-364KJG43.js} +2 -2
  150. package/dist/{offer-detail-page-XU6XK6YR.js → offer-detail-page-BDDDZSPL.js} +19 -8
  151. package/dist/{offer-variant-detail-page-FVJE5WLV.js → offer-variant-detail-page-HQU4HMZH.js} +4 -5
  152. package/dist/{offers-RS4UORI3.js → offers-OVX5AAQL.js} +6 -7
  153. package/dist/{order-create-claim-PPUQXVYH.js → order-create-claim-4ERPSGPD.js} +103 -59
  154. package/dist/{order-create-edit-QH25BOIU.js → order-create-edit-BGLNMKKI.js} +15 -8
  155. package/dist/{order-create-exchange-5PCJ25LK.js → order-create-exchange-TOPPZZGS.js} +104 -60
  156. package/dist/{order-create-refund-ZWMXQGUA.js → order-create-refund-M3K5MZDM.js} +38 -23
  157. package/dist/{order-create-return-ECGHPLEZ.js → order-create-return-64GZ2LCL.js} +107 -68
  158. package/dist/{order-detail-XYHRY25Y.js → order-detail-DIUKR6ZJ.js} +7 -7
  159. package/dist/{order-edit-billing-address-V6QS5DYF.js → order-edit-billing-address-CCRTK5E2.js} +2 -2
  160. package/dist/{order-edit-email-AGJU7YHU.js → order-edit-email-V45SEUCO.js} +1 -1
  161. package/dist/{order-edit-shipping-address-TKLEEHOE.js → order-edit-shipping-address-45Z6TNHL.js} +1 -1
  162. package/dist/{order-list-L2WZX5ED.js → order-list-C7PHMQ64.js} +5 -5
  163. package/dist/{order-metadata-NVC3A3A5.js → order-metadata-7245QRUQ.js} +2 -2
  164. package/dist/{order-request-transfer-7EZX5UOQ.js → order-request-transfer-JYPDXCY2.js} +27 -13
  165. package/dist/pages/index.d.ts +2 -2
  166. package/dist/pages/index.js +88 -88
  167. package/dist/{payout-list-WZ6QMJJY.js → payout-list-KILGQ4XP.js} +3 -3
  168. package/dist/{price-list-create-DRKZIV2D.js → price-list-create-UZRCHVU7.js} +9 -9
  169. package/dist/{price-list-customer-availability-WU2OGO37.js → price-list-customer-availability-CQY55U4O.js} +31 -14
  170. package/dist/{price-list-detail-AML5XNDJ.js → price-list-detail-IL7VSABK.js} +6 -7
  171. package/dist/{price-list-list-FPCLLS33.js → price-list-list-TD5JIO7L.js} +5 -5
  172. package/dist/{price-list-prices-add-HAYZV2XV.js → price-list-prices-add-DSRYUJUT.js} +8 -8
  173. package/dist/{price-list-prices-edit-S4V5ACN3.js → price-list-prices-edit-WELHT4O4.js} +18 -9
  174. package/dist/{product-add-existing-attributes-VWM3LNIO.js → product-add-existing-attributes-RPIHTSCE.js} +7 -5
  175. package/dist/{product-create-73WXVANY.js → product-create-PMV3LO62.js} +9 -9
  176. package/dist/{product-detail-ZKQXB7PH.js → product-detail-KVLZYO76.js} +6 -7
  177. package/dist/{product-edit-attribute-W3AS47FM.js → product-edit-attribute-URHTZ2EQ.js} +9 -3
  178. package/dist/{product-list-SYMPZR6W.js → product-list-M6B42KCG.js} +6 -7
  179. package/dist/{product-media-6XS74AU3.js → product-media-R2FIBFR5.js} +2 -2
  180. package/dist/{product-metadata-GKQUURAL.js → product-metadata-SC5BXN66.js} +2 -2
  181. package/dist/{product-organization-3PIQ4IY2.js → product-organization-BSPYZYZR.js} +87 -43
  182. package/dist/{product-sales-channels-PJNEIY4J.js → product-sales-channels-MNAFJKAI.js} +10 -5
  183. package/dist/{product-shipping-profile-SWB5FK7S.js → product-shipping-profile-G4NCDKSR.js} +25 -11
  184. package/dist/{product-tag-create-SYOFR5EK.js → product-tag-create-PX7Q2AXU.js} +1 -1
  185. package/dist/{product-tag-detail-Q3CKJBVX.js → product-tag-detail-LXO43RMB.js} +11 -11
  186. package/dist/{product-tag-edit-FJPBCFBH.js → product-tag-edit-PXSZMCCT.js} +1 -1
  187. package/dist/{product-tag-list-BNNJS67H.js → product-tag-list-XWTZGQTT.js} +11 -11
  188. package/dist/{product-tag-metadata-WQEGISQ5.js → product-tag-metadata-2SO7ICOZ.js} +2 -2
  189. package/dist/{product-type-detail-WZLA27WI.js → product-type-detail-NO4PKFYQ.js} +6 -7
  190. package/dist/{product-type-list-PAAE6ZSR.js → product-type-list-JXU3446J.js} +5 -5
  191. package/dist/{product-type-metadata-WCGB3U4N.js → product-type-metadata-7D3J3NSO.js} +2 -2
  192. package/dist/{product-variant-detail-7B26FRNG.js → product-variant-detail-VQ55W7PD.js} +3 -5
  193. package/dist/{product-variant-edit-UC34WTO7.js → product-variant-edit-3WSHMGDI.js} +1 -1
  194. package/dist/{product-variant-metadata-CTKNNNLM.js → product-variant-metadata-KFLIOCU2.js} +2 -2
  195. package/dist/{profile-detail-GDQQJUWF.js → profile-detail-SQZ6JFAN.js} +3 -5
  196. package/dist/{profile-edit-ZBD6N5SC.js → profile-edit-IVU3SBQA.js} +3 -3
  197. package/dist/{promotion-add-campaign-VAF3HTLK.js → promotion-add-campaign-SWTS4TM5.js} +2 -1
  198. package/dist/{promotion-create-FKRGXGI4.js → promotion-create-6TMK6PEP.js} +4 -3
  199. package/dist/{promotion-detail-HOXUK5VG.js → promotion-detail-WBTMSCTX.js} +6 -8
  200. package/dist/{promotion-list-LJKKLZNU.js → promotion-list-FPOTDLHX.js} +9 -9
  201. package/dist/{refund-reason-create-TOH2D225.js → refund-reason-create-HZOBFOPB.js} +1 -1
  202. package/dist/{refund-reason-edit-B32E4WHH.js → refund-reason-edit-KS6NMC22.js} +1 -1
  203. package/dist/{refund-reason-list-3YLXKHJX.js → refund-reason-list-4T7DIRZV.js} +5 -6
  204. package/dist/{region-add-countries-4CTAVHYW.js → region-add-countries-47QLUMX7.js} +2 -2
  205. package/dist/{region-create-S2WUJ4RA.js → region-create-7DI3QEPU.js} +25 -11
  206. package/dist/{region-detail-YTB7OEQU.js → region-detail-S5OT2PGL.js} +4 -5
  207. package/dist/{region-edit-NUMG2V5L.js → region-edit-IXCS3MRH.js} +32 -14
  208. package/dist/{region-list-JP3CZISQ.js → region-list-2MWAGD2D.js} +4 -5
  209. package/dist/{region-metadata-NAHNXAHQ.js → region-metadata-ADPG7OLJ.js} +2 -2
  210. package/dist/{reservation-create-H3T3AHTK.js → reservation-create-YEICXID2.js} +67 -44
  211. package/dist/{reservation-detail-M42OB6BC.js → reservation-detail-EBIDXEVF.js} +3 -5
  212. package/dist/{reservation-list-FQAWE7S5.js → reservation-list-5QNXC2WU.js} +4 -5
  213. package/dist/{reservation-metadata-AKR6FRG5.js → reservation-metadata-TWJE777O.js} +2 -2
  214. package/dist/{reset-password-RJ5VSBQV.js → reset-password-3YLCNWLP.js} +1 -1
  215. package/dist/{return-reason-list-PKAJDA6A.js → return-reason-list-BDR7VUEV.js} +5 -5
  216. package/dist/{review-detail-K555FECH.js → review-detail-NPB3OKCE.js} +2 -4
  217. package/dist/{review-list-5NGJJH23.js → review-list-NXBVRP5T.js} +4 -5
  218. package/dist/{sales-channel-add-products-RRTMXVAT.js → sales-channel-add-products-VAHBFZP3.js} +15 -6
  219. package/dist/{sales-channel-detail-7GAGHWEP.js → sales-channel-detail-A7HHMQVX.js} +6 -7
  220. package/dist/{sales-channel-list-BCL62DTX.js → sales-channel-list-246V7NV3.js} +4 -6
  221. package/dist/{sales-channel-metadata-BKNILVQ2.js → sales-channel-metadata-PMLMQIKU.js} +2 -2
  222. package/dist/settings-UYGKDTNO.js +63 -0
  223. package/dist/{shipping-option-type-create-ZVOMA222.js → shipping-option-type-create-NOFP2DOM.js} +1 -1
  224. package/dist/{shipping-option-type-detail-2VDQWYDS.js → shipping-option-type-detail-47AZVCFP.js} +3 -5
  225. package/dist/{shipping-option-type-edit-CZFRAZPJ.js → shipping-option-type-edit-42JILKHX.js} +1 -1
  226. package/dist/{shipping-option-type-list-2XUYXURQ.js → shipping-option-type-list-TTAA63ZN.js} +6 -6
  227. package/dist/{shipping-profile-detail-7SE5GLQZ.js → shipping-profile-detail-RGB67K3C.js} +2 -4
  228. package/dist/{shipping-profile-metadata-UEZYRBZQ.js → shipping-profile-metadata-GXMY5E57.js} +2 -2
  229. package/dist/{shipping-profiles-list-GC6AK77V.js → shipping-profiles-list-DD3G2THE.js} +4 -5
  230. package/dist/{store-create-JBY2MAIT.js → store-create-UQ333C5F.js} +36 -14
  231. package/dist/{store-details-MPTCI4VG.js → store-details-OAONJZHB.js} +8 -9
  232. package/dist/{store-edit-BXWV5H4Z.js → store-edit-6Q3GLLJE.js} +2 -2
  233. package/dist/{store-list-LPKSZF2E.js → store-list-PANSKKVA.js} +10 -11
  234. package/dist/{store-member-invite-A2WAB5GK.js → store-member-invite-235YGK55.js} +14 -5
  235. package/dist/{tax-region-create-OGVIIVMO.js → tax-region-create-ECRRD74Z.js} +2 -2
  236. package/dist/{tax-region-detail-3CMIPIKA.js → tax-region-detail-PU4Q42KO.js} +7 -8
  237. package/dist/{tax-region-edit-DUBTSOQ4.js → tax-region-edit-P4L2CUFV.js} +1 -1
  238. package/dist/{tax-region-list-U5JRCQZI.js → tax-region-list-PUNXDH34.js} +5 -6
  239. package/dist/{tax-region-metadata-KHODQCDW.js → tax-region-metadata-EDZ7YGYR.js} +2 -2
  240. package/dist/{tax-region-province-detail-XTPJ6DZZ.js → tax-region-province-detail-3ZQOCKZ2.js} +6 -7
  241. package/dist/{tax-region-tax-override-create-NMLHLS7J.js → tax-region-tax-override-create-CPWWLRMI.js} +10 -10
  242. package/dist/{tax-region-tax-override-edit-4SJ3DRAF.js → tax-region-tax-override-edit-TQCB5GSO.js} +41 -21
  243. package/dist/{user-detail-RD3T5WQT.js → user-detail-4H37KBIP.js} +3 -5
  244. package/dist/{user-edit-Y5VP6CKB.js → user-edit-42A2VX5E.js} +1 -1
  245. package/dist/{user-invite-4JFF3NRW.js → user-invite-5EJ3CIQZ.js} +5 -4
  246. package/dist/{user-list-X6UZ6UZM.js → user-list-EZ56HFI3.js} +5 -6
  247. package/dist/{user-metadata-XNM2JNNO.js → user-metadata-3GENWLUS.js} +2 -2
  248. package/package.json +6 -6
  249. package/dist/chunk-BDGZ4EQO.js +0 -86
  250. package/dist/settings-AVE3VCCM.js +0 -19
  251. package/dist/{customer-edit-5EH2AUGN.js → customer-edit-LDKAXHZ6.js} +3 -3
  252. package/dist/{store-bulk-edit-FQPQQR46.js → store-bulk-edit-XWDZQPFO.js} +1 -1
@@ -26,13 +26,13 @@ import {
26
26
  import {
27
27
  _DataTable,
28
28
  useDataTable
29
- } from "./chunk-ZOU25JF6.js";
29
+ } from "./chunk-SU36MZXC.js";
30
30
  import {
31
31
  useDate
32
32
  } from "./chunk-EIWPJWKF.js";
33
33
  import {
34
34
  ActionMenu
35
- } from "./chunk-BDGZ4EQO.js";
35
+ } from "./chunk-3UOYBH5O.js";
36
36
  import {
37
37
  useStockLocations
38
38
  } from "./chunk-H5E3CGD7.js";
@@ -59,7 +59,7 @@ import {
59
59
  // src/pages/inventory/inventory-detail/inventory-detail.tsx
60
60
  import { Children } from "react";
61
61
  import { useLoaderData, useParams } from "react-router-dom";
62
- import { useLinkQuery, WidgetZone } from "@mercurjs/dashboard-shared";
62
+ import { PermissionGuard, useLinkQuery, WidgetZone } from "@mercurjs/dashboard-shared";
63
63
 
64
64
  // src/pages/inventory/inventory-detail/components/inventory-item-attributes/attributes-section.tsx
65
65
  import { Container, Heading } from "@medusajs/ui";
@@ -83,6 +83,7 @@ var InventoryItemAttributeSection = ({
83
83
  {
84
84
  label: t("actions.edit"),
85
85
  to: "attributes",
86
+ permission: "inventory_items:edit",
86
87
  icon: /* @__PURE__ */ jsx(PencilSquare, {})
87
88
  }
88
89
  ]
@@ -158,7 +159,8 @@ var InventoryItemGeneralSection = ({
158
159
  {
159
160
  icon: /* @__PURE__ */ jsx2(PencilSquare2, {}),
160
161
  label: t("actions.edit"),
161
- to: "edit"
162
+ to: "edit",
163
+ permission: "inventory_items:edit"
162
164
  }
163
165
  ]
164
166
  }
@@ -250,7 +252,7 @@ var InventoryItemGeneralSection = ({
250
252
 
251
253
  // src/pages/inventory/inventory-detail/components/inventory-item-location-levels.tsx
252
254
  import { Button, Container as Container3, Heading as Heading3 } from "@medusajs/ui";
253
- import { DisplayExtensionZone as DisplayExtensionZone3 } from "@mercurjs/dashboard-shared";
255
+ import { DisplayExtensionZone as DisplayExtensionZone3, PermissionAction } from "@mercurjs/dashboard-shared";
254
256
  import { useTranslation as useTranslation5 } from "react-i18next";
255
257
  import { Link } from "react-router-dom";
256
258
 
@@ -365,6 +367,7 @@ var useLocationListTableColumns = () => {
365
367
  {
366
368
  icon: /* @__PURE__ */ jsx3(PencilSquare3, {}),
367
369
  label: t("actions.edit"),
370
+ permission: "inventory_items:edit",
368
371
  onClick: () => {
369
372
  navigate(`locations/${level.location_id}`);
370
373
  }
@@ -377,6 +380,7 @@ var useLocationListTableColumns = () => {
377
380
  icon: /* @__PURE__ */ jsx3(Trash, {}),
378
381
  label: t("actions.delete"),
379
382
  onClick: () => handleDelete(level),
383
+ permission: "inventory_items:manage",
380
384
  disabled: level.reserved_quantity > 0 || level.stocked_quantity > 0
381
385
  }
382
386
  ]
@@ -491,7 +495,7 @@ var InventoryItemLocationLevelsSection = ({
491
495
  "data-testid": "inventory-item-location-levels-header",
492
496
  children: [
493
497
  /* @__PURE__ */ jsx5(Heading3, { "data-testid": "inventory-item-location-levels-title", children: t("inventory.locationLevels") }),
494
- /* @__PURE__ */ jsx5(
498
+ /* @__PURE__ */ jsx5(PermissionAction, { permission: "inventory_items:edit", children: /* @__PURE__ */ jsx5(
495
499
  Button,
496
500
  {
497
501
  size: "small",
@@ -500,7 +504,7 @@ var InventoryItemLocationLevelsSection = ({
500
504
  "data-testid": "inventory-manage-locations-button",
501
505
  children: /* @__PURE__ */ jsx5(Link, { to: "locations", "data-testid": "inventory-manage-locations-link", children: t("inventory.manageLocations") })
502
506
  }
503
- )
507
+ ) })
504
508
  ]
505
509
  }
506
510
  ),
@@ -520,11 +524,12 @@ var InventoryItemLocationLevelsSection = ({
520
524
 
521
525
  // src/pages/inventory/inventory-detail/components/inventory-item-reservations.tsx
522
526
  import { Button as Button2, Container as Container4, Heading as Heading4 } from "@medusajs/ui";
523
- import { DisplayExtensionZone as DisplayExtensionZone4 } from "@mercurjs/dashboard-shared";
527
+ import { DisplayExtensionZone as DisplayExtensionZone4, PermissionAction as PermissionAction2 } from "@mercurjs/dashboard-shared";
524
528
  import { useTranslation as useTranslation10 } from "react-i18next";
525
529
  import { Link as Link2 } from "react-router-dom";
526
530
 
527
531
  // src/pages/inventory/inventory-detail/components/reservations-table/reservation-list-table.tsx
532
+ import { useCan } from "@mercurjs/dashboard-shared";
528
533
  import { useMemo as useMemo3 } from "react";
529
534
  import { useTranslation as useTranslation9 } from "react-i18next";
530
535
 
@@ -603,7 +608,8 @@ var ReservationActions = ({
603
608
  {
604
609
  icon: /* @__PURE__ */ jsx7(PencilSquare4, {}),
605
610
  label: t("actions.edit"),
606
- to: `/reservations/${reservation.id}/edit`
611
+ to: `/reservations/${reservation.id}/edit`,
612
+ permission: "reservations:edit"
607
613
  }
608
614
  ]
609
615
  },
@@ -612,7 +618,8 @@ var ReservationActions = ({
612
618
  {
613
619
  icon: /* @__PURE__ */ jsx7(Trash2, {}),
614
620
  label: t("actions.delete"),
615
- onClick: handleDelete
621
+ onClick: handleDelete,
622
+ permission: "reservations:manage"
616
623
  }
617
624
  ]
618
625
  }
@@ -728,9 +735,13 @@ var ReservationItemTable = ({
728
735
  ...searchParams,
729
736
  inventory_item_id: [inventoryItem.id]
730
737
  });
731
- const { stock_locations } = useStockLocations({
732
- id: (reservations || []).map((r) => r.location_id)
733
- });
738
+ const canViewLocations = useCan("stock_locations");
739
+ const { stock_locations } = useStockLocations(
740
+ {
741
+ id: (reservations || []).map((r) => r.location_id)
742
+ },
743
+ { enabled: canViewLocations }
744
+ );
734
745
  const data = useMemo3(() => {
735
746
  const locationMap = new Map((stock_locations || []).map((l) => [l.id, l]));
736
747
  return (reservations || []).map((r) => ({
@@ -777,7 +788,7 @@ var InventoryItemReservationsSection = ({
777
788
  return /* @__PURE__ */ jsxs4(Container4, { className: "divide-y p-0", "data-testid": "inventory-item-reservations-section", children: [
778
789
  /* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-between px-6 py-4", "data-testid": "inventory-item-reservations-header", children: [
779
790
  /* @__PURE__ */ jsx10(Heading4, { "data-testid": "inventory-item-reservations-title", children: t("reservations.domain") }),
780
- /* @__PURE__ */ jsx10(Button2, { size: "small", variant: "secondary", asChild: true, "data-testid": "inventory-create-reservation-button", children: /* @__PURE__ */ jsx10(Link2, { to: `/reservations/create?item_id=${inventoryItem.id}`, "data-testid": "inventory-create-reservation-link", children: t("actions.create") }) })
791
+ /* @__PURE__ */ jsx10(PermissionAction2, { permission: "reservations:edit", children: /* @__PURE__ */ jsx10(Button2, { size: "small", variant: "secondary", asChild: true, "data-testid": "inventory-create-reservation-button", children: /* @__PURE__ */ jsx10(Link2, { to: `/reservations/create?item_id=${inventoryItem.id}`, "data-testid": "inventory-create-reservation-link", children: t("actions.create") }) }) })
781
792
  ] }),
782
793
  /* @__PURE__ */ jsx10(ReservationItemTable, { inventoryItem }),
783
794
  /* @__PURE__ */ jsx10(
@@ -872,7 +883,7 @@ var Root = ({ children }) => {
872
883
  inventoryItem: inventory_item
873
884
  }
874
885
  ),
875
- /* @__PURE__ */ jsx12(InventoryItemReservationsSection, { inventoryItem: inventory_item })
886
+ /* @__PURE__ */ jsx12(PermissionGuard, { permission: "reservations:view", children: /* @__PURE__ */ jsx12(InventoryItemReservationsSection, { inventoryItem: inventory_item }) })
876
887
  ] }) }),
877
888
  /* @__PURE__ */ jsx12(TwoColumnPage.Sidebar, { "data-testid": "inventory-detail-sidebar", children: /* @__PURE__ */ jsxs6(WidgetZone, { id: "inventory.detail.side", data: inventory_item, children: [
878
889
  /* @__PURE__ */ jsx12(AssociatedOffersSection, { offers: inventory_item.offers }),
@@ -2,10 +2,10 @@ import {
2
2
  TaxOverrideTable,
3
3
  TaxRateLine,
4
4
  useTaxOverrideTable
5
- } from "./chunk-VWK3K2CI.js";
5
+ } from "./chunk-FCAJQFYT.js";
6
6
  import {
7
7
  TaxRegionCard
8
- } from "./chunk-CBLCX5UK.js";
8
+ } from "./chunk-Q2XWHI6K.js";
9
9
  import {
10
10
  useTaxRateTableQuery
11
11
  } from "./chunk-MG4GKUJW.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-H6MYB7GB.js";
7
7
  import {
8
8
  ActionMenu
9
- } from "./chunk-BDGZ4EQO.js";
9
+ } from "./chunk-3UOYBH5O.js";
10
10
  import {
11
11
  useDeleteShippingProfile,
12
12
  useShippingProfile
@@ -72,6 +72,7 @@ var ShippingProfileGeneralSection = ({
72
72
  actions: [
73
73
  {
74
74
  icon: /* @__PURE__ */ jsx(Trash, {}),
75
+ permission: "shipping_profiles:manage",
75
76
  label: t("actions.delete"),
76
77
  onClick: handleDelete
77
78
  }
@@ -22,7 +22,7 @@ import {
22
22
  } from "./chunk-VPUTUJQG.js";
23
23
  import {
24
24
  ActionMenu
25
- } from "./chunk-BDGZ4EQO.js";
25
+ } from "./chunk-3UOYBH5O.js";
26
26
  import {
27
27
  useProductTags
28
28
  } from "./chunk-W5U6NPSN.js";
@@ -99,6 +99,7 @@ var OfferActions = ({ product }) => {
99
99
  icon: /* @__PURE__ */ jsx(Trash, {}),
100
100
  label: t("actions.delete"),
101
101
  onClick: handleDelete,
102
+ permission: "offers:manage",
102
103
  disabled: product.offerIds.length === 0
103
104
  }
104
105
  ]
@@ -218,17 +219,34 @@ var useOfferTableColumns = (options) => {
218
219
 
219
220
  // src/pages/offers/_components/use-offer-table-filters.tsx
220
221
  var import_types = __toESM(require_dist(), 1);
222
+ import { usePermissions } from "@mercurjs/dashboard-shared";
221
223
  import { useTranslation as useTranslation3 } from "react-i18next";
222
224
  var useOfferTableFilters = () => {
223
225
  const { t } = useTranslation3();
224
- const { sellers } = useSellers({ limit: 1e3 });
225
- const { product_categories } = useProductCategories({
226
- limit: 1e3,
227
- fields: "id,name"
228
- });
229
- const { collections } = useCollections({ limit: 1e3 });
230
- const { product_types } = useProductTypes({ limit: 1e3 });
231
- const { product_tags } = useProductTags({ limit: 1e3 });
226
+ const { can } = usePermissions();
227
+ const { sellers } = useSellers(
228
+ { limit: 1e3 },
229
+ { enabled: can("sellers") }
230
+ );
231
+ const { product_categories } = useProductCategories(
232
+ {
233
+ limit: 1e3,
234
+ fields: "id,name"
235
+ },
236
+ { enabled: can("product_categories") }
237
+ );
238
+ const { collections } = useCollections(
239
+ { limit: 1e3 },
240
+ { enabled: can("product_collections") }
241
+ );
242
+ const { product_types } = useProductTypes(
243
+ { limit: 1e3 },
244
+ { enabled: can("product_types") }
245
+ );
246
+ const { product_tags } = useProductTags(
247
+ { limit: 1e3 },
248
+ { enabled: can("product_tags") }
249
+ );
232
250
  const filters = [];
233
251
  if (sellers && sellers.length > 0) {
234
252
  filters.push({
@@ -16,6 +16,7 @@ var useOfferTableCommands = (options) => {
16
16
  {
17
17
  label: t("offers.actions.bulkDelete"),
18
18
  shortcut: "d",
19
+ permission: "offers:manage",
19
20
  action: async (currentSelection) => {
20
21
  const offerIds = Object.keys(currentSelection);
21
22
  if (offerIds.length === 0) {
@@ -6,10 +6,10 @@ import {
6
6
  } from "./chunk-46WEBDVJ.js";
7
7
  import {
8
8
  ActionMenu
9
- } from "./chunk-BDGZ4EQO.js";
9
+ } from "./chunk-3UOYBH5O.js";
10
10
  import {
11
11
  useMe
12
- } from "./chunk-62YRQVR7.js";
12
+ } from "./chunk-AZV22U4V.js";
13
13
  import {
14
14
  SingleColumnPageSkeleton
15
15
  } from "./chunk-INNFZYX2.js";
@@ -13,10 +13,10 @@ import {
13
13
  import {
14
14
  _DataTable,
15
15
  useDataTable
16
- } from "./chunk-ZOU25JF6.js";
16
+ } from "./chunk-SU36MZXC.js";
17
17
  import {
18
18
  ActionMenu
19
- } from "./chunk-BDGZ4EQO.js";
19
+ } from "./chunk-3UOYBH5O.js";
20
20
  import {
21
21
  useStockLocations
22
22
  } from "./chunk-H5E3CGD7.js";
@@ -110,6 +110,7 @@ var ReservationActions = ({
110
110
  {
111
111
  label: t("actions.edit"),
112
112
  onClick: handleEdit,
113
+ permission: "reservations:edit",
113
114
  icon: /* @__PURE__ */ jsx(PencilSquare, {})
114
115
  }
115
116
  ]
@@ -119,6 +120,7 @@ var ReservationActions = ({
119
120
  {
120
121
  label: t("actions.delete"),
121
122
  onClick: handleDelete,
123
+ permission: "reservations:manage",
122
124
  icon: /* @__PURE__ */ jsx(Trash, {})
123
125
  }
124
126
  ]
@@ -192,16 +194,24 @@ var useReservationTableColumns = () => {
192
194
  };
193
195
 
194
196
  // src/pages/reservations/reservation-list/components/reservation-list-table/use-reservation-table-filters.tsx
197
+ import { usePermissions } from "@mercurjs/dashboard-shared";
195
198
  import { useTranslation as useTranslation3 } from "react-i18next";
196
199
  var useReservationTableFilters = () => {
197
200
  const { t } = useTranslation3();
198
- const { stock_locations } = useStockLocations({
199
- limit: 1e3
200
- });
201
- const { sellers } = useSellers({
202
- limit: 1e3,
203
- fields: "id,name"
204
- });
201
+ const { can } = usePermissions();
202
+ const { stock_locations } = useStockLocations(
203
+ {
204
+ limit: 1e3
205
+ },
206
+ { enabled: can("stock_locations") }
207
+ );
208
+ const { sellers } = useSellers(
209
+ {
210
+ limit: 1e3,
211
+ fields: "id,name"
212
+ },
213
+ { enabled: can("sellers") }
214
+ );
205
215
  const filters = [];
206
216
  filters.push({
207
217
  type: "string",
@@ -353,7 +363,8 @@ var ReservationListDataTable = () => {
353
363
  message: t("reservations.list.noRecordsMessage"),
354
364
  action: {
355
365
  to: "create",
356
- label: t("actions.create")
366
+ label: t("actions.create"),
367
+ permission: "reservations:edit"
357
368
  }
358
369
  }
359
370
  }
@@ -0,0 +1,8 @@
1
+ // src/components/common/action-menu/action-menu.tsx
2
+ import {
3
+ ActionMenu
4
+ } from "@mercurjs/dashboard-shared";
5
+
6
+ export {
7
+ ActionMenu
8
+ };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  useDeleteCommissionRuleAction,
3
3
  useScopeReferenceNames
4
- } from "./chunk-JL3NKSLJ.js";
4
+ } from "./chunk-USO2SWZV.js";
5
5
  import {
6
6
  formatCommissionValue,
7
7
  getIsActiveProps,
@@ -27,10 +27,10 @@ import {
27
27
  import {
28
28
  _DataTable,
29
29
  useDataTable
30
- } from "./chunk-ZOU25JF6.js";
30
+ } from "./chunk-SU36MZXC.js";
31
31
  import {
32
32
  ActionMenu
33
- } from "./chunk-BDGZ4EQO.js";
33
+ } from "./chunk-3UOYBH5O.js";
34
34
  import {
35
35
  useCommissionRules,
36
36
  useDefaultCommission
@@ -71,6 +71,7 @@ var GlobalCommissionSection = () => {
71
71
  {
72
72
  actions: [
73
73
  {
74
+ permission: "commission_rates:edit",
74
75
  label: t("actions.edit"),
75
76
  icon: /* @__PURE__ */ jsx(PencilSquare, {}),
76
77
  to: "edit-global"
@@ -283,6 +284,7 @@ var CommissionRuleRowActions = ({ rule }) => {
283
284
  {
284
285
  actions: [
285
286
  {
287
+ permission: "commission_rates:edit",
286
288
  label: t("actions.edit"),
287
289
  to: `/settings/commissions/${rule.id}/edit`,
288
290
  icon: /* @__PURE__ */ jsx2(PencilSquare2, {})
@@ -292,6 +294,7 @@ var CommissionRuleRowActions = ({ rule }) => {
292
294
  {
293
295
  actions: [
294
296
  {
297
+ permission: "commission_rates:manage",
295
298
  label: t("actions.delete"),
296
299
  onClick: handleDelete,
297
300
  icon: /* @__PURE__ */ jsx2(Trash, {})
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-XFR5JLNF.js";
6
6
  import {
7
7
  UserLink
8
- } from "./chunk-7C7YLUYT.js";
8
+ } from "./chunk-V3UQOU5W.js";
9
9
  import {
10
10
  useSalesChannelTableColumns,
11
11
  useSalesChannelTableEmptyState,
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-NFZEX33S.js";
15
15
  import {
16
16
  DataTable
17
- } from "./chunk-C4XKPQ6T.js";
17
+ } from "./chunk-VLNTJXXO.js";
18
18
  import {
19
19
  SingleColumnPage
20
20
  } from "./chunk-H6MYB7GB.js";
@@ -23,7 +23,7 @@ import {
23
23
  } from "./chunk-EIWPJWKF.js";
24
24
  import {
25
25
  ActionMenu
26
- } from "./chunk-BDGZ4EQO.js";
26
+ } from "./chunk-3UOYBH5O.js";
27
27
  import {
28
28
  useApiKey,
29
29
  useBatchRemoveSalesChannelsFromApiKey,
@@ -32,7 +32,7 @@ import {
32
32
  } from "./chunk-ALJIXUKL.js";
33
33
  import {
34
34
  useUser
35
- } from "./chunk-62YRQVR7.js";
35
+ } from "./chunk-AZV22U4V.js";
36
36
  import {
37
37
  useSalesChannels
38
38
  } from "./chunk-JC2FFAMW.js";
@@ -44,7 +44,7 @@ import {
44
44
  // src/pages/api-key-management/api-key-management-detail/api-key-management-detail.tsx
45
45
  import { Children } from "react";
46
46
  import { useLoaderData, useParams } from "react-router-dom";
47
- import { WidgetZone } from "@mercurjs/dashboard-shared";
47
+ import { PermissionGuard, WidgetZone } from "@mercurjs/dashboard-shared";
48
48
 
49
49
  // src/pages/api-key-management/api-key-management-detail/components/api-key-general-section/api-key-general-section.tsx
50
50
  import { PencilSquare, Trash, XCircle } from "@medusajs/icons";
@@ -58,6 +58,7 @@ import {
58
58
  toast,
59
59
  usePrompt
60
60
  } from "@medusajs/ui";
61
+ import { useCan } from "@mercurjs/dashboard-shared";
61
62
  import { useTranslation } from "react-i18next";
62
63
  import { useNavigate } from "react-router-dom";
63
64
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -122,6 +123,7 @@ var ApiKeyGeneralSection = ({ apiKey }) => {
122
123
  const dangerousActions = [
123
124
  {
124
125
  icon: /* @__PURE__ */ jsx(Trash, {}),
126
+ permission: "api_keys:manage",
125
127
  label: t("actions.delete"),
126
128
  onClick: handleDelete,
127
129
  disabled: !apiKey.revoked_at
@@ -130,6 +132,7 @@ var ApiKeyGeneralSection = ({ apiKey }) => {
130
132
  if (!apiKey.revoked_at) {
131
133
  dangerousActions.unshift({
132
134
  icon: /* @__PURE__ */ jsx(XCircle, {}),
135
+ permission: "api_keys:edit",
133
136
  label: t("apiKeyManagement.actions.revoke"),
134
137
  onClick: handleRevoke,
135
138
  disabled: !!apiKey.revoked_at
@@ -149,6 +152,7 @@ var ApiKeyGeneralSection = ({ apiKey }) => {
149
152
  {
150
153
  actions: [
151
154
  {
155
+ permission: "api_keys:edit",
152
156
  label: t("actions.edit"),
153
157
  icon: /* @__PURE__ */ jsx(PencilSquare, {}),
154
158
  to: "edit"
@@ -193,11 +197,12 @@ var ApiKeyGeneralSection = ({ apiKey }) => {
193
197
  ] });
194
198
  };
195
199
  var ActionBy = ({ userId, "data-testid": dataTestId }) => {
200
+ const canViewUsers = useCan("users");
196
201
  const { user, isLoading, isError, error } = useUser(userId, void 0, {
197
- enabled: !!userId
202
+ enabled: !!userId && canViewUsers
198
203
  });
199
- if (!userId) {
200
- return /* @__PURE__ */ jsx(Text, { size: "small", className: "text-ui-fg-subtle", "data-testid": dataTestId, children: "-" });
204
+ if (!userId || !canViewUsers) {
205
+ return /* @__PURE__ */ jsx(Text, { size: "small", className: "text-ui-fg-subtle", "data-testid": dataTestId, children: userId ?? "-" });
201
206
  }
202
207
  if (isError) {
203
208
  throw error;
@@ -227,6 +232,7 @@ import { keepPreviousData } from "@tanstack/react-query";
227
232
  import { useCallback, useMemo, useState } from "react";
228
233
  import { useTranslation as useTranslation2 } from "react-i18next";
229
234
  import { useNavigate as useNavigate2 } from "react-router-dom";
235
+ import { usePermissions } from "@mercurjs/dashboard-shared";
230
236
  import { jsx as jsx2 } from "react/jsx-runtime";
231
237
  var PAGE_SIZE = 10;
232
238
  var PREFIX = "sc";
@@ -267,6 +273,7 @@ var ApiKeySalesChannelSection = ({
267
273
  },
268
274
  rowHref: (row) => `/settings/sales-channels/${row.id}`,
269
275
  action: {
276
+ permission: "api_keys:edit",
270
277
  label: t("actions.add"),
271
278
  to: "sales-channels"
272
279
  },
@@ -279,6 +286,7 @@ var ApiKeySalesChannelSection = ({
279
286
  var columnHelper = createDataTableColumnHelper();
280
287
  var useColumns = (id) => {
281
288
  const { t } = useTranslation2();
289
+ const { can } = usePermissions();
282
290
  const navigate = useNavigate2();
283
291
  const prompt = usePrompt2();
284
292
  const base = useSalesChannelTableColumns();
@@ -317,7 +325,7 @@ var useColumns = (id) => {
317
325
  ...base,
318
326
  columnHelper.action({
319
327
  actions: (ctx) => [
320
- [
328
+ !can("sales_channels", "edit") ? [] : [
321
329
  {
322
330
  label: t("actions.edit"),
323
331
  icon: /* @__PURE__ */ jsx2(PencilSquare2, {}),
@@ -326,17 +334,17 @@ var useColumns = (id) => {
326
334
  }
327
335
  }
328
336
  ],
329
- [
337
+ !can("api_keys", "edit") ? [] : [
330
338
  {
331
339
  icon: /* @__PURE__ */ jsx2(Trash2, {}),
332
340
  label: t("actions.delete"),
333
341
  onClick: () => handleDelete(ctx.row.original)
334
342
  }
335
343
  ]
336
- ]
344
+ ].filter((group) => group.length > 0)
337
345
  })
338
346
  ],
339
- [base, handleDelete, navigate, t]
347
+ [base, handleDelete, navigate, t, can]
340
348
  );
341
349
  };
342
350
  var commandHelper = createDataTableCommandHelper();
@@ -376,11 +384,14 @@ var useCommands = (id, setRowSelection) => {
376
384
  );
377
385
  return useMemo(
378
386
  () => [
379
- commandHelper.command({
380
- action: handleRemove,
381
- label: t("actions.remove"),
382
- shortcut: "r"
383
- })
387
+ {
388
+ ...commandHelper.command({
389
+ action: handleRemove,
390
+ label: t("actions.remove"),
391
+ shortcut: "r"
392
+ }),
393
+ permission: "api_keys:edit"
394
+ }
384
395
  ],
385
396
  [handleRemove, t]
386
397
  );
@@ -419,7 +430,7 @@ var Root = ({ children }) => {
419
430
  "data-testid": `${api_key.type}-api-key-detail-page`,
420
431
  children: /* @__PURE__ */ jsxs2(WidgetZone, { id: "api-keys.detail.main", data: api_key, children: [
421
432
  /* @__PURE__ */ jsx3(ApiKeyGeneralSection, { apiKey: api_key }),
422
- isPublishable && /* @__PURE__ */ jsx3(ApiKeySalesChannelSection, { apiKey: api_key })
433
+ isPublishable && /* @__PURE__ */ jsx3(PermissionGuard, { permission: "sales_channels:view", children: /* @__PURE__ */ jsx3(ApiKeySalesChannelSection, { apiKey: api_key }) })
423
434
  ] })
424
435
  }
425
436
  );
@@ -19,10 +19,10 @@ import {
19
19
  import {
20
20
  _DataTable,
21
21
  useDataTable
22
- } from "./chunk-ZOU25JF6.js";
22
+ } from "./chunk-SU36MZXC.js";
23
23
  import {
24
24
  ActionMenu
25
- } from "./chunk-BDGZ4EQO.js";
25
+ } from "./chunk-3UOYBH5O.js";
26
26
  import {
27
27
  useSellers
28
28
  } from "./chunk-HRMANL53.js";
@@ -207,6 +207,7 @@ var StoreListDataTable = () => {
207
207
  navigate(`bulk-edit?ids=${ids.join(",")}`);
208
208
  },
209
209
  label: t("stores.actions.edit.label"),
210
+ permission: "sellers:edit",
210
211
  shortcut: "e"
211
212
  }
212
213
  ]
@@ -225,7 +226,8 @@ var StoreActions = ({ seller }) => {
225
226
  {
226
227
  icon: /* @__PURE__ */ jsx4(PencilSquare, {}),
227
228
  label: t("actions.edit"),
228
- to: `/stores/${seller.id}/edit`
229
+ to: `/stores/${seller.id}/edit`,
230
+ permission: "sellers:edit"
229
231
  }
230
232
  ]
231
233
  }
@@ -1,6 +1,8 @@
1
1
  // src/components/common/empty-table-content/empty-table-content.tsx
2
+ import { usePermissionGate } from "@mercurjs/dashboard-shared";
3
+ import { cloneElement } from "react";
2
4
  import { ExclamationCircle, MagnifyingGlass, PlusMini } from "@medusajs/icons";
3
- import { Button, Text, clx } from "@medusajs/ui";
5
+ import { Button, Text, clx, Tooltip } from "@medusajs/ui";
4
6
  import { useTranslation } from "react-i18next";
5
7
  import { Link } from "react-router-dom";
6
8
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -26,8 +28,18 @@ var NoResults = ({
26
28
  }
27
29
  );
28
30
  };
29
- var DefaultButton = ({ action, dataTestId }) => action && /* @__PURE__ */ jsx(Link, { to: action.to, children: /* @__PURE__ */ jsx(Button, { variant: "secondary", size: "small", "data-testid": dataTestId, children: action.label }) });
30
- var TransparentIconLeftButton = ({ action, dataTestId }) => action && /* @__PURE__ */ jsx(Link, { to: action.to, children: /* @__PURE__ */ jsxs(
31
+ var ActionLink = ({
32
+ action,
33
+ children
34
+ }) => {
35
+ const gate = usePermissionGate(action.permission);
36
+ if (gate.denied) {
37
+ return /* @__PURE__ */ jsx(Tooltip, { content: gate.tooltip, children: /* @__PURE__ */ jsx("span", { className: "inline-flex", children: cloneElement(children, { disabled: true }) }) });
38
+ }
39
+ return /* @__PURE__ */ jsx(Link, { to: action.to, children });
40
+ };
41
+ var DefaultButton = ({ action, dataTestId }) => action && /* @__PURE__ */ jsx(ActionLink, { action, children: /* @__PURE__ */ jsx(Button, { variant: "secondary", size: "small", "data-testid": dataTestId, children: action.label }) });
42
+ var TransparentIconLeftButton = ({ action, dataTestId }) => action && /* @__PURE__ */ jsx(ActionLink, { action, children: /* @__PURE__ */ jsxs(
31
43
  Button,
32
44
  {
33
45
  variant: "transparent",