@mercurjs/admin 2.3.6-canary.0 → 2.3.6-canary.10

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 (273) hide show
  1. package/dist/{add-campaign-promotions-PBGDZSCD.js → add-campaign-promotions-EIQFBRHD.js} +13 -8
  2. package/dist/{adjust-inventory-BBAU3NMM.js → adjust-inventory-H46YCNLT.js} +8 -3
  3. package/dist/{api-key-management-detail-ZGGQBQAM.js → api-key-management-detail-Z4KSJHUC.js} +6 -8
  4. package/dist/{api-key-management-list-T2WHT6MT.js → api-key-management-list-QZIRPINF.js} +5 -5
  5. package/dist/{api-key-management-sales-channels-FS3KXQQ6.js → api-key-management-sales-channels-RGZ3QITG.js} +9 -7
  6. package/dist/{attribute-create-C435ZHB2.js → attribute-create-7I5GNYFM.js} +6 -5
  7. package/dist/{attribute-detail-SPYDB3I5.js → attribute-detail-GP4PEFJ7.js} +17 -11
  8. package/dist/{attribute-edit-AAEAOP5B.js → attribute-edit-YNKCBXLU.js} +2 -2
  9. package/dist/{attribute-edit-possible-value-BJSQCTNO.js → attribute-edit-possible-value-XY7W42FB.js} +2 -2
  10. package/dist/{attribute-list-SCFBKH4L.js → attribute-list-ZC3CG5LS.js} +7 -7
  11. package/dist/{campaign-detail-BHRCOKL3.js → campaign-detail-OZWTK26Z.js} +11 -11
  12. package/dist/{campaign-list-GIMU2QVW.js → campaign-list-XCO4FJDZ.js} +5 -5
  13. package/dist/{categories-metadata-MJAYSCTW.js → categories-metadata-QYH5U77W.js} +3 -3
  14. package/dist/{category-detail-GVEDFNM7.js → category-detail-V2QUSUF3.js} +11 -12
  15. package/dist/{category-list-J7XYQDJU.js → category-list-XDOYTQ4X.js} +6 -6
  16. package/dist/{category-products-VVF5NXCE.js → category-products-DL4KV6NX.js} +16 -9
  17. package/dist/{chunk-NIDM2VQO.js → chunk-23CSVCQK.js} +28 -17
  18. package/dist/{chunk-DUFGVZ6H.js → chunk-25TWJMWE.js} +2 -2
  19. package/dist/{chunk-VTXMQTXK.js → chunk-26REB3B6.js} +4 -3
  20. package/dist/{chunk-ZH6TIKKW.js → chunk-2MOTQNEG.js} +1 -0
  21. package/dist/{chunk-M6X7KIBW.js → chunk-2XBNM6TM.js} +4 -4
  22. package/dist/{chunk-BQZ5P3IA.js → chunk-36KEGXUQ.js} +112 -75
  23. package/dist/{chunk-475XGX3J.js → chunk-3BKRMIWA.js} +24 -13
  24. package/dist/{chunk-NCDKLTDP.js → chunk-3H3BJSIK.js} +34 -12
  25. package/dist/chunk-3PPYNV2Q.js +268 -0
  26. package/dist/chunk-3UOYBH5O.js +8 -0
  27. package/dist/{chunk-GFHUI2QK.js → chunk-473QGQSA.js} +9 -6
  28. package/dist/{chunk-3XS5ADKJ.js → chunk-4AOVNA5G.js} +31 -20
  29. package/dist/{chunk-IKAUNMRC.js → chunk-4J74G7N2.js} +15 -3
  30. package/dist/{chunk-WIDHYDJQ.js → chunk-4JQDYQSX.js} +20 -10
  31. package/dist/{chunk-RW3NEG36.js → chunk-4W77EUYY.js} +9 -7
  32. package/dist/{chunk-6UYV7B42.js → chunk-4Y7SBHXE.js} +10 -8
  33. package/dist/{chunk-VVIJHBKM.js → chunk-5MXEKSK4.js} +1 -1
  34. package/dist/{chunk-AGO4ROOR.js → chunk-5OIFUF7R.js} +1 -1
  35. package/dist/{chunk-S4WDCOQD.js → chunk-5QW3GY37.js} +27 -14
  36. package/dist/{chunk-5TIADRZ7.js → chunk-63JSBXD5.js} +8 -6
  37. package/dist/{chunk-5ENOJFDI.js → chunk-7CGMFCSU.js} +1 -1
  38. package/dist/{chunk-7QZFRDTU.js → chunk-7GCMYYFL.js} +7 -4
  39. package/dist/{chunk-OWWE5Y6T.js → chunk-7URQCA3H.js} +8 -6
  40. package/dist/{chunk-R2ODJ3D3.js → chunk-A3LCORSK.js} +11 -7
  41. package/dist/{chunk-IZ77JV46.js → chunk-AUCCE46Q.js} +6 -3
  42. package/dist/{chunk-PFQO7UQG.js → chunk-AW4RL2SA.js} +60 -33
  43. package/dist/{chunk-2NOIR4BR.js → chunk-AZV22U4V.js} +20 -2
  44. package/dist/chunk-BORT2CVW.js +2927 -0
  45. package/dist/{chunk-VYSTJIAD.js → chunk-CX5XB56X.js} +4 -3
  46. package/dist/{chunk-VWPX7GLC.js → chunk-DBGBLXBS.js} +1 -1
  47. package/dist/{chunk-J4SYK3RT.js → chunk-DGRHDZQO.js} +15 -5
  48. package/dist/{chunk-6AQYZWOC.js → chunk-DL5J4DV2.js} +2 -2
  49. package/dist/{chunk-7UHN2CW7.js → chunk-DM52HEOD.js} +1 -1
  50. package/dist/{chunk-EJGGX3ON.js → chunk-DMLXILXG.js} +12 -10
  51. package/dist/{chunk-VBHKRUON.js → chunk-DUKOOIQD.js} +6 -5
  52. package/dist/{chunk-BLU2WLIJ.js → chunk-DWPBJEEM.js} +21 -8
  53. package/dist/{chunk-6P7HBAUM.js → chunk-E4CMR4T2.js} +21 -13
  54. package/dist/{chunk-QEBISX7V.js → chunk-EBAFVGM3.js} +1 -1
  55. package/dist/{chunk-J34YB5R4.js → chunk-EHLCUND7.js} +12 -10
  56. package/dist/{chunk-DBCNRZZE.js → chunk-EIPTLSNT.js} +3 -1
  57. package/dist/{chunk-KWFSBUD6.js → chunk-ESRIX7ZH.js} +1485 -1411
  58. package/dist/{chunk-YM5X7CQL.js → chunk-FCAJQFYT.js} +32 -12
  59. package/dist/{chunk-437KXVGO.js → chunk-G63BL5AB.js} +8 -5
  60. package/dist/{chunk-BZPOERWW.js → chunk-GIV6KSQX.js} +18 -9
  61. package/dist/{chunk-G2KWNZV6.js → chunk-GMJLK3IK.js} +2 -2
  62. package/dist/{chunk-P2KYQNXQ.js → chunk-GQYB3OOC.js} +108 -65
  63. package/dist/{chunk-4FAYO6UJ.js → chunk-GZUXEIEB.js} +3 -3
  64. package/dist/{chunk-7ASAC2FM.js → chunk-H4TJZB26.js} +26 -18
  65. package/dist/{chunk-5SNW2DCY.js → chunk-HXDCSVQP.js} +42 -18
  66. package/dist/{chunk-NQEXDESI.js → chunk-IBTEL5KA.js} +32 -14
  67. package/dist/{chunk-Q732RWRD.js → chunk-IQRFJO4N.js} +7 -5
  68. package/dist/{chunk-LBFX6AVE.js → chunk-JFRYC6GK.js} +17 -10
  69. package/dist/{chunk-7YBZ2PEZ.js → chunk-JQ7GOJK6.js} +135 -58
  70. package/dist/{chunk-FOWWGEP7.js → chunk-JS2DAWKO.js} +9 -6
  71. package/dist/{chunk-IHCKU5FR.js → chunk-K6OBX6ZR.js} +8 -7
  72. package/dist/{chunk-RSDTHO3I.js → chunk-KB3BTLIB.js} +6 -4
  73. package/dist/{chunk-VIHLAFDA.js → chunk-KYOZ4CCY.js} +61 -29
  74. package/dist/{chunk-D6WRJZPH.js → chunk-LCUAIH7P.js} +7 -5
  75. package/dist/{chunk-F5EZQMOA.js → chunk-M7VHCFCW.js} +10 -8
  76. package/dist/{chunk-EVCAR6GP.js → chunk-MAEUKXZ4.js} +8 -5
  77. package/dist/{chunk-HFCJJJKP.js → chunk-MKKOAF2W.js} +26 -12
  78. package/dist/{chunk-MQFPD5J4.js → chunk-MNKJHZZT.js} +10 -6
  79. package/dist/{chunk-YUL4ES52.js → chunk-MSJ2QS4Y.js} +6 -4
  80. package/dist/{chunk-VE5FQQTG.js → chunk-MTP3MDAA.js} +10 -7
  81. package/dist/{chunk-24JEBPKI.js → chunk-NJ2NRKAJ.js} +57 -14
  82. package/dist/{chunk-XMIDY45X.js → chunk-NRRSESP2.js} +32 -13
  83. package/dist/{chunk-B7QLJF77.js → chunk-NUE5ZL5N.js} +11 -5
  84. package/dist/{chunk-B6KT5U7W.js → chunk-NZIDSNBJ.js} +10 -8
  85. package/dist/{chunk-PAG3PYAQ.js → chunk-O5W5DCKH.js} +1 -1
  86. package/dist/{chunk-CFQX7HAW.js → chunk-OCDZIJBM.js} +11 -5
  87. package/dist/{chunk-KTO2WJ75.js → chunk-OGTWBHJC.js} +2 -2
  88. package/dist/{chunk-3KRUGI6C.js → chunk-ONTZADVX.js} +1 -1
  89. package/dist/{chunk-W62DN2I2.js → chunk-OWSAXYGH.js} +1 -1
  90. package/dist/{chunk-ESNSDIEC.js → chunk-PDPCFFFH.js} +1 -1
  91. package/dist/{chunk-Q6M2TNLO.js → chunk-PGOJH3NS.js} +61 -329
  92. package/dist/{chunk-LXW3L56Z.js → chunk-Q2XWHI6K.js} +6 -3
  93. package/dist/{chunk-ENKVW7JW.js → chunk-QKW6ZECR.js} +29 -14
  94. package/dist/{chunk-JBT2FR4K.js → chunk-QPDL77XZ.js} +21 -10
  95. package/dist/{chunk-D7E6HL5O.js → chunk-QPXGSVW4.js} +10 -8
  96. package/dist/{chunk-M336ZIRO.js → chunk-QQ2UM2KH.js} +9 -7
  97. package/dist/{chunk-YWZQKODL.js → chunk-R55XYG6Y.js} +28 -15
  98. package/dist/{chunk-AOLP2YDZ.js → chunk-RAD3UMQ3.js} +7 -5
  99. package/dist/{chunk-HFM6N7R3.js → chunk-RLF7ADLP.js} +21 -13
  100. package/dist/{chunk-A2UTT4YX.js → chunk-SLXOKSG4.js} +58 -28
  101. package/dist/{chunk-ZOU25JF6.js → chunk-SU36MZXC.js} +11 -3
  102. package/dist/{chunk-F644YFJZ.js → chunk-SZSAJHN7.js} +7 -6
  103. package/dist/{chunk-GR7S7WTT.js → chunk-TPWSE5HE.js} +16 -11
  104. package/dist/{chunk-7ECQXPOG.js → chunk-TVCHVG2A.js} +3 -3
  105. package/dist/{chunk-HJACC6KV.js → chunk-UKQ6FES4.js} +6 -3
  106. package/dist/{chunk-JL3NKSLJ.js → chunk-USO2SWZV.js} +9 -4
  107. package/dist/chunk-USY2322P.js +17 -0
  108. package/dist/{chunk-6ASLWQB3.js → chunk-V3UQOU5W.js} +4 -2
  109. package/dist/{chunk-XXYVUV5F.js → chunk-VD2CKAYG.js} +21 -10
  110. package/dist/{chunk-C4XKPQ6T.js → chunk-VLNTJXXO.js} +16 -3
  111. package/dist/{chunk-D3RDR3D3.js → chunk-W3LCOK3O.js} +153 -124
  112. package/dist/{chunk-MXM5ZD4Y.js → chunk-W5U6NPSN.js} +10 -25
  113. package/dist/{chunk-MM5RRCPX.js → chunk-WVHNOE7Y.js} +1 -1
  114. package/dist/{chunk-RFENVF7Y.js → chunk-XUOGIKEE.js} +3 -3
  115. package/dist/{chunk-R22UAHRF.js → chunk-YDESULL7.js} +3 -1
  116. package/dist/{chunk-7I7G5ZJE.js → chunk-YIXWAK3A.js} +12 -7
  117. package/dist/{chunk-ZFPASY4R.js → chunk-Z2FX5GG4.js} +24 -12
  118. package/dist/{chunk-JQEAWWRP.js → chunk-ZPJOSHV7.js} +23 -12
  119. package/dist/{chunk-U2RBSUMY.js → chunk-ZU76OTV3.js} +2 -2
  120. package/dist/{collection-add-products-HCY2YT3W.js → collection-add-products-FWEVXBYC.js} +16 -9
  121. package/dist/{collection-detail-QAEPOJZX.js → collection-detail-U4AW4QJ3.js} +11 -12
  122. package/dist/{collection-list-AWLZYMWL.js → collection-list-PFXGNWL7.js} +15 -15
  123. package/dist/{collection-metadata-XM2EBCWF.js → collection-metadata-IKYBHHEU.js} +3 -3
  124. package/dist/{commission-rule-create-CDLLQIY4.js → commission-rule-create-QDNXXBTV.js} +64 -30
  125. package/dist/{commission-rule-detail-LFEZ5U6V.js → commission-rule-detail-QYJIK375.js} +3 -5
  126. package/dist/{commission-rule-edit-5CFKPI7U.js → commission-rule-edit-HICDPDLK.js} +58 -24
  127. package/dist/{commissions-list-MUKIEJWZ.js → commissions-list-AQUW636T.js} +6 -6
  128. package/dist/{customer-detail-XO7RBVUC.js → customer-detail-TBGKTNQQ.js} +9 -9
  129. package/dist/{customer-group-add-customers-XYWJSXKS.js → customer-group-add-customers-RWJOA2NJ.js} +3 -3
  130. package/dist/{customer-group-detail-4G53UKOS.js → customer-group-detail-47IPD337.js} +7 -8
  131. package/dist/{customer-group-list-5VA7HGD5.js → customer-group-list-Q2AYIVO4.js} +7 -8
  132. package/dist/{customer-group-metadata-FUJFFWCO.js → customer-group-metadata-T3WFBL7U.js} +3 -3
  133. package/dist/{customer-list-NEPELR3R.js → customer-list-JOPTF4QB.js} +5 -6
  134. package/dist/{customer-metadata-GWZC456X.js → customer-metadata-YSMWL4L3.js} +3 -3
  135. package/dist/{customers-add-customer-group-MYC76YGW.js → customers-add-customer-group-AVRYBS6Q.js} +14 -7
  136. package/dist/{edit-inventory-item-ZSV4WF6G.js → edit-inventory-item-7M7Q6HL4.js} +2 -2
  137. package/dist/{edit-inventory-item-attributes-NWSAQMKX.js → edit-inventory-item-attributes-E7J2WFPF.js} +2 -2
  138. package/dist/{edit-reservation-W3THLKKK.js → edit-reservation-S3QTQRPY.js} +11 -3
  139. package/dist/{edit-rules-RJC3AYJN.js → edit-rules-NRF7U4AT.js} +2 -2
  140. package/dist/extension-targets.d.ts +27 -0
  141. package/dist/home-E7IVATD3.js +64 -0
  142. package/dist/index.css +271 -9
  143. package/dist/index.d.ts +10 -30
  144. package/dist/index.js +635 -3925
  145. package/dist/{inventory-detail-7HB5QEL4.js → inventory-detail-U6TRGZRY.js} +8 -8
  146. package/dist/{inventory-list-FN7FCI4W.js → inventory-list-JWA7U2LB.js} +4 -5
  147. package/dist/{inventory-metadata-FGHOW3YG.js → inventory-metadata-KO622YEI.js} +3 -3
  148. package/dist/{inventory-stock-PZ2ENOGF.js → inventory-stock-WWXYVFK2.js} +21 -11
  149. package/dist/{location-detail-B2BWLVAD.js → location-detail-27FBZML7.js} +5 -7
  150. package/dist/{location-fulfillment-providers-XIYMIEFN.js → location-fulfillment-providers-WT72L5JS.js} +21 -13
  151. package/dist/{location-list-VIAP63HV.js → location-list-RMHT36AO.js} +5 -7
  152. package/dist/{location-sales-channels-TNP3C7UW.js → location-sales-channels-JB5OIMXE.js} +13 -6
  153. package/dist/{location-service-zone-create-KPM4RSCF.js → location-service-zone-create-JKAKZCZ2.js} +3 -3
  154. package/dist/{location-service-zone-manage-areas-NW5JUTCH.js → location-service-zone-manage-areas-K2BMFI5Y.js} +3 -3
  155. package/dist/{location-service-zone-shipping-option-create-6O2JXV6I.js → location-service-zone-shipping-option-create-WJOLO6A3.js} +4 -4
  156. package/dist/{location-service-zone-shipping-option-edit-UUIR7B5S.js → location-service-zone-shipping-option-edit-I7BJGH76.js} +23 -10
  157. package/dist/{location-service-zone-shipping-option-pricing-Z5HCXRHG.js → location-service-zone-shipping-option-pricing-47Y3CP4U.js} +36 -12
  158. package/dist/{login-TZHRVYA5.js → login-ISNIWXU2.js} +3 -3
  159. package/dist/{manage-locations-ZFIRHMNH.js → manage-locations-5FKFNJQN.js} +158 -36
  160. package/dist/{marketplace-add-currencies-Z6FUIAU5.js → marketplace-add-currencies-34XKWMI7.js} +33 -9
  161. package/dist/{marketplace-detail-4IP5HIEW.js → marketplace-detail-A76FTENH.js} +7 -7
  162. package/dist/{marketplace-edit-G7YNGABC.js → marketplace-edit-KXKUECZQ.js} +61 -30
  163. package/dist/{marketplace-metadata-EGDXYKCE.js → marketplace-metadata-364KJG43.js} +3 -3
  164. package/dist/{offer-detail-page-WWEUCEFC.js → offer-detail-page-BDDDZSPL.js} +36 -13
  165. package/dist/{offer-variant-detail-page-FVJE5WLV.js → offer-variant-detail-page-HQU4HMZH.js} +4 -5
  166. package/dist/{offers-VG334CFD.js → offers-2JDCFVN4.js} +10 -11
  167. package/dist/{order-create-claim-4CIL76V5.js → order-create-claim-4ERPSGPD.js} +105 -61
  168. package/dist/{order-create-edit-BFE4N7RN.js → order-create-edit-BGLNMKKI.js} +17 -10
  169. package/dist/{order-create-exchange-CC7CQECO.js → order-create-exchange-TOPPZZGS.js} +107 -63
  170. package/dist/{order-create-refund-FJLL4CUD.js → order-create-refund-M3K5MZDM.js} +39 -24
  171. package/dist/{order-create-return-USO7AS7R.js → order-create-return-64GZ2LCL.js} +109 -70
  172. package/dist/{order-detail-3ODC5NOT.js → order-detail-DIUKR6ZJ.js} +9 -9
  173. package/dist/{order-edit-billing-address-SBVWRA25.js → order-edit-billing-address-ZAR5DETE.js} +3 -3
  174. package/dist/{order-edit-email-BREEW246.js → order-edit-email-V45SEUCO.js} +2 -2
  175. package/dist/{order-edit-shipping-address-XUG74AFY.js → order-edit-shipping-address-45Z6TNHL.js} +2 -2
  176. package/dist/{order-list-I6JZT6JK.js → order-list-KZHROLY3.js} +7 -7
  177. package/dist/{order-metadata-VIG5MGYV.js → order-metadata-7245QRUQ.js} +3 -3
  178. package/dist/{order-request-transfer-RYVK4WYW.js → order-request-transfer-JYPDXCY2.js} +28 -14
  179. package/dist/pages/index.d.ts +2 -2
  180. package/dist/pages/index.js +99 -98
  181. package/dist/{payout-list-WZ6QMJJY.js → payout-list-KILGQ4XP.js} +3 -3
  182. package/dist/{price-list-create-JFXLTNOJ.js → price-list-create-H3KJPUF4.js} +12 -12
  183. package/dist/{price-list-customer-availability-WU2OGO37.js → price-list-customer-availability-CQY55U4O.js} +31 -14
  184. package/dist/{price-list-detail-5YTX66KF.js → price-list-detail-I44VTKE6.js} +10 -11
  185. package/dist/{price-list-list-5CNSLAUF.js → price-list-list-TD5JIO7L.js} +5 -5
  186. package/dist/{price-list-prices-add-HVTEQOWQ.js → price-list-prices-add-XEJKCRTM.js} +11 -11
  187. package/dist/{price-list-prices-edit-OVHIDATP.js → price-list-prices-edit-WELHT4O4.js} +19 -10
  188. package/dist/{product-add-existing-attributes-2UFTXE2N.js → product-add-existing-attributes-5B6HD2M3.js} +10 -8
  189. package/dist/{product-create-SHIGHLQN.js → product-create-DTITIXGY.js} +12 -11
  190. package/dist/{product-create-attribute-QYRCPUFC.js → product-create-attribute-7TV3OHW7.js} +1 -1
  191. package/dist/{product-create-variant-MZLHG5JF.js → product-create-variant-S3UJRMMJ.js} +3 -3
  192. package/dist/{product-detail-UGSTCK7J.js → product-detail-2MYEE5AM.js} +9 -10
  193. package/dist/{product-edit-2CMVTDWT.js → product-edit-TAVV5CWR.js} +8 -3
  194. package/dist/{product-edit-attribute-W3AS47FM.js → product-edit-attribute-URHTZ2EQ.js} +9 -3
  195. package/dist/{product-list-XDJB3HX7.js → product-list-QYZXPM4I.js} +11 -12
  196. package/dist/{product-media-CO3F57JT.js → product-media-MFDAEXNQ.js} +3 -3
  197. package/dist/{product-metadata-5CRGB7TR.js → product-metadata-SC5BXN66.js} +3 -3
  198. package/dist/{product-organization-TNS7GBKN.js → product-organization-GCIGER6X.js} +87 -43
  199. package/dist/{product-sales-channels-PJNEIY4J.js → product-sales-channels-MNAFJKAI.js} +10 -5
  200. package/dist/{product-shipping-profile-SWB5FK7S.js → product-shipping-profile-G4NCDKSR.js} +25 -11
  201. package/dist/{product-tag-create-QORH6X2D.js → product-tag-create-PX7Q2AXU.js} +2 -2
  202. package/dist/{product-tag-detail-CDSYBTAM.js → product-tag-detail-4CGCZVSL.js} +18 -18
  203. package/dist/{product-tag-edit-JWYVCPCC.js → product-tag-edit-PXSZMCCT.js} +2 -2
  204. package/dist/{product-tag-list-RKLCU3UE.js → product-tag-list-2S6PHBIB.js} +18 -18
  205. package/dist/{product-tag-metadata-BCUPIIJ5.js → product-tag-metadata-2SO7ICOZ.js} +3 -3
  206. package/dist/{product-type-detail-IY7TWXUQ.js → product-type-detail-M4QLNFSG.js} +11 -12
  207. package/dist/{product-type-list-N3E5HQFW.js → product-type-list-JXU3446J.js} +5 -5
  208. package/dist/{product-type-metadata-DKBBQB6R.js → product-type-metadata-7D3J3NSO.js} +3 -3
  209. package/dist/{product-variant-detail-XHMS2UT5.js → product-variant-detail-VQ55W7PD.js} +4 -6
  210. package/dist/{product-variant-edit-4DPXTYPT.js → product-variant-edit-XEC7BR5G.js} +4 -4
  211. package/dist/{product-variant-metadata-ETVJBXSW.js → product-variant-metadata-KFLIOCU2.js} +3 -3
  212. package/dist/{profile-detail-KFLXUGQ5.js → profile-detail-SQZ6JFAN.js} +3 -5
  213. package/dist/{profile-edit-4FDALFG5.js → profile-edit-IVU3SBQA.js} +3 -3
  214. package/dist/{promotion-add-campaign-VAF3HTLK.js → promotion-add-campaign-SWTS4TM5.js} +2 -1
  215. package/dist/{promotion-create-7ZUJ4W2J.js → promotion-create-6TMK6PEP.js} +5 -4
  216. package/dist/{promotion-detail-SWO4PZDC.js → promotion-detail-YRWEIXY7.js} +7 -9
  217. package/dist/{promotion-list-S4B6SVD6.js → promotion-list-NFVGSR23.js} +9 -9
  218. package/dist/{refund-reason-create-P5FUFEGK.js → refund-reason-create-HZOBFOPB.js} +2 -2
  219. package/dist/{refund-reason-edit-AKOTWXCE.js → refund-reason-edit-KS6NMC22.js} +2 -2
  220. package/dist/{refund-reason-list-ABRFC3OQ.js → refund-reason-list-RL7WOHKC.js} +11 -12
  221. package/dist/{region-add-countries-4CTAVHYW.js → region-add-countries-47QLUMX7.js} +2 -2
  222. package/dist/{region-create-S2WUJ4RA.js → region-create-7DI3QEPU.js} +25 -11
  223. package/dist/{region-detail-IBLHFR57.js → region-detail-S5OT2PGL.js} +4 -5
  224. package/dist/{region-edit-NUMG2V5L.js → region-edit-IXCS3MRH.js} +32 -14
  225. package/dist/{region-list-JTR3SEWI.js → region-list-2MWAGD2D.js} +4 -5
  226. package/dist/{region-metadata-Q6HEMCHD.js → region-metadata-ADPG7OLJ.js} +3 -3
  227. package/dist/{reservation-create-H3T3AHTK.js → reservation-create-YEICXID2.js} +67 -44
  228. package/dist/{reservation-detail-5GYGVM3M.js → reservation-detail-EBIDXEVF.js} +4 -6
  229. package/dist/{reservation-list-VRRSKQ4W.js → reservation-list-5QNXC2WU.js} +4 -5
  230. package/dist/{reservation-metadata-P4G3JEDW.js → reservation-metadata-TWJE777O.js} +3 -3
  231. package/dist/{reset-password-VJY5CXJU.js → reset-password-FIZYJ2R4.js} +1 -1
  232. package/dist/{return-reason-list-6MQKG72S.js → return-reason-list-VDX6CFJL.js} +10 -10
  233. package/dist/{review-detail-K555FECH.js → review-detail-NPB3OKCE.js} +2 -4
  234. package/dist/{review-list-E56WE7VS.js → review-list-NXBVRP5T.js} +4 -5
  235. package/dist/{sales-channel-add-products-MPJ7UCEJ.js → sales-channel-add-products-MBSSIGYE.js} +19 -10
  236. package/dist/{sales-channel-detail-F37LBP6R.js → sales-channel-detail-R2BCF7TA.js} +11 -12
  237. package/dist/{sales-channel-list-XAWN5OKC.js → sales-channel-list-246V7NV3.js} +5 -7
  238. package/dist/{sales-channel-metadata-NBWFH4QX.js → sales-channel-metadata-PMLMQIKU.js} +3 -3
  239. package/dist/settings-UG4P6CCP.js +63 -0
  240. package/dist/{shipping-option-type-create-M23CI42D.js → shipping-option-type-create-NOFP2DOM.js} +2 -2
  241. package/dist/{shipping-option-type-detail-QIJZQ5WW.js → shipping-option-type-detail-47AZVCFP.js} +5 -7
  242. package/dist/{shipping-option-type-edit-WXTEQM32.js → shipping-option-type-edit-42JILKHX.js} +2 -2
  243. package/dist/{shipping-option-type-list-PRXZQSPR.js → shipping-option-type-list-TTAA63ZN.js} +8 -8
  244. package/dist/{shipping-profile-detail-KPRFJE4V.js → shipping-profile-detail-RGB67K3C.js} +2 -4
  245. package/dist/{shipping-profile-metadata-S7Z3IC6I.js → shipping-profile-metadata-GXMY5E57.js} +3 -3
  246. package/dist/{shipping-profiles-list-LK5ZXRJG.js → shipping-profiles-list-DD3G2THE.js} +4 -5
  247. package/dist/{store-bulk-edit-NBWZMDP7.js → store-bulk-edit-RRNJZEOU.js} +2 -2
  248. package/dist/{store-create-J4SL6SY3.js → store-create-UQ333C5F.js} +37 -15
  249. package/dist/{store-details-ITYKAZSI.js → store-details-D7RUCH5Y.js} +13 -14
  250. package/dist/{store-edit-NZMI7PNS.js → store-edit-RCNV5XI4.js} +3 -3
  251. package/dist/{store-list-RXPN3VVO.js → store-list-BMPOSAAE.js} +13 -14
  252. package/dist/{store-member-invite-IEUG54XA.js → store-member-invite-ALW6E3XA.js} +15 -6
  253. package/dist/{tax-region-create-PIDKQEWT.js → tax-region-create-3B6FWGWS.js} +3 -3
  254. package/dist/{tax-region-detail-7RNNZ4UE.js → tax-region-detail-PU4Q42KO.js} +8 -9
  255. package/dist/{tax-region-edit-I27QZZPB.js → tax-region-edit-P4L2CUFV.js} +2 -2
  256. package/dist/{tax-region-list-BXLYIYQT.js → tax-region-list-PUNXDH34.js} +5 -6
  257. package/dist/{tax-region-metadata-6YIZSRLO.js → tax-region-metadata-EDZ7YGYR.js} +3 -3
  258. package/dist/{tax-region-province-detail-AHS5SRP5.js → tax-region-province-detail-3ZQOCKZ2.js} +7 -8
  259. package/dist/{tax-region-tax-override-create-Z6S43XQ6.js → tax-region-tax-override-create-J5ZUAELL.js} +15 -15
  260. package/dist/{tax-region-tax-override-edit-4EOURL2M.js → tax-region-tax-override-edit-HDVKIL5P.js} +46 -26
  261. package/dist/{user-detail-5LOE6QGK.js → user-detail-4H37KBIP.js} +3 -5
  262. package/dist/{user-edit-O2M5II52.js → user-edit-42A2VX5E.js} +1 -1
  263. package/dist/{user-invite-SZIUG2WK.js → user-invite-5EJ3CIQZ.js} +35 -134
  264. package/dist/{user-list-6YRC6HYX.js → user-list-EZ56HFI3.js} +5 -6
  265. package/dist/{user-metadata-2PEU2IJE.js → user-metadata-3GENWLUS.js} +3 -3
  266. package/package.json +14 -14
  267. package/dist/chunk-4F6SHS7A.js +0 -83
  268. package/dist/chunk-BDGZ4EQO.js +0 -86
  269. package/dist/chunk-WMA3WTCM.js +0 -117
  270. package/dist/home-I3OILW5Z.js +0 -16
  271. package/dist/settings-AVE3VCCM.js +0 -19
  272. package/dist/{customer-edit-5EH2AUGN.js → customer-edit-LDKAXHZ6.js} +3 -3
  273. package/dist/{invite-6WUERQLW.js → invite-IZ2YTVPF.js} +1 -1
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ProductMediaSection
3
- } from "./chunk-IZ77JV46.js";
3
+ } from "./chunk-AUCCE46Q.js";
4
4
  import {
5
5
  SectionRow
6
6
  } from "./chunk-3XPXUIK3.js";
@@ -18,17 +18,17 @@ import {
18
18
  } from "./chunk-THHRRYRS.js";
19
19
  import {
20
20
  require_dist
21
- } from "./chunk-KWFSBUD6.js";
21
+ } from "./chunk-ESRIX7ZH.js";
22
22
  import {
23
23
  _DataTable,
24
24
  useDataTable
25
- } from "./chunk-ZOU25JF6.js";
25
+ } from "./chunk-SU36MZXC.js";
26
+ import {
27
+ ActionMenu
28
+ } from "./chunk-3UOYBH5O.js";
26
29
  import {
27
30
  useSeller
28
31
  } from "./chunk-HRMANL53.js";
29
- import {
30
- ActionMenu
31
- } from "./chunk-BDGZ4EQO.js";
32
32
  import {
33
33
  useProductAttributes
34
34
  } from "./chunk-OFW63WXL.js";
@@ -65,7 +65,9 @@ var import_types = __toESM(require_dist(), 1);
65
65
  import { useState as useState2 } from "react";
66
66
  import { Button, Text, toast } from "@medusajs/ui";
67
67
  import {
68
- ProductChangePanel
68
+ ProductChangePanel,
69
+ usePermissions,
70
+ PermissionAction
69
71
  } from "@mercurjs/dashboard-shared";
70
72
  import { useTranslation as useTranslation2 } from "react-i18next";
71
73
 
@@ -151,26 +153,31 @@ var ConfirmPrompt = ({
151
153
  // src/pages/products/product-detail/components/product-active-edit-section/product-active-edit-section.tsx
152
154
  import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
153
155
  var VARIANT_LOOKUP_FIELDS = "id,title,sku,*images";
154
- var resolversFor = (productId) => ({
156
+ var resolversFor = (productId, can) => ({
155
157
  getType: async (id) => {
158
+ if (!can("product_types")) return null;
156
159
  const { product_type } = await sdk.admin.productTypes.$id.query({ $id: id });
157
160
  return product_type?.value ?? null;
158
161
  },
159
162
  getCollection: async (id) => {
163
+ if (!can("product_collections")) return null;
160
164
  const { collection } = await sdk.admin.collections.$id.query({ $id: id });
161
165
  return collection?.title ?? null;
162
166
  },
163
167
  getCategory: async (id) => {
168
+ if (!can("product_categories")) return null;
164
169
  const { product_category } = await sdk.admin.productCategories.$id.query({
165
170
  $id: id
166
171
  });
167
172
  return product_category?.name ?? null;
168
173
  },
169
174
  getTag: async (id) => {
175
+ if (!can("product_tags")) return null;
170
176
  const { product_tag } = await sdk.admin.productTags.$id.query({ $id: id });
171
177
  return product_tag?.value ?? null;
172
178
  },
173
179
  getAttribute: async (id) => {
180
+ if (!can("product_attributes")) return null;
174
181
  const { product_attribute } = await sdk.admin.productAttributes.$id.query({
175
182
  $id: id
176
183
  });
@@ -196,6 +203,7 @@ var ProductActiveEditSection = ({
196
203
  product
197
204
  }) => {
198
205
  const { t } = useTranslation2();
206
+ const { can } = usePermissions();
199
207
  const [confirmOpen, setConfirmOpen] = useState2(false);
200
208
  const [rejectOpen, setRejectOpen] = useState2(false);
201
209
  const { product_change, isError } = useProductChange(product.id, {
@@ -203,7 +211,7 @@ var ProductActiveEditSection = ({
203
211
  });
204
212
  const requesterId = product_change?.created_by ?? "";
205
213
  const { seller: requesterSeller } = useSeller(requesterId, void 0, {
206
- enabled: !!requesterId
214
+ enabled: !!requesterId && can("sellers")
207
215
  });
208
216
  const { mutateAsync: confirmChange, isPending: isConfirming } = useConfirmProductChange(product_change?.id ?? "", product.id);
209
217
  const { mutateAsync: cancelChange, isPending: isRejecting } = useCancelProductChange(product_change?.id ?? "", product.id);
@@ -244,12 +252,12 @@ var ProductActiveEditSection = ({
244
252
  {
245
253
  product: panelProduct,
246
254
  actions: product_change.actions ?? [],
247
- resolvers: resolversFor(product.id),
255
+ resolvers: resolversFor(product.id, can),
248
256
  headerDescription: /* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", className: "text-ui-fg-subtle", children: t("products.edits.panel.description", {
249
257
  store: requesterSeller?.name ?? t("products.request.fallbackStore")
250
258
  }) }),
251
259
  footer: /* @__PURE__ */ jsxs2(Fragment, { children: [
252
- /* @__PURE__ */ jsx2(
260
+ /* @__PURE__ */ jsx2(PermissionAction, { permission: "products.review:edit", children: /* @__PURE__ */ jsx2(
253
261
  Button,
254
262
  {
255
263
  size: "small",
@@ -258,8 +266,8 @@ var ProductActiveEditSection = ({
258
266
  "data-testid": "product-active-edit-confirm-button",
259
267
  children: t("actions.confirm")
260
268
  }
261
- ),
262
- /* @__PURE__ */ jsx2(
269
+ ) }),
270
+ /* @__PURE__ */ jsx2(PermissionAction, { permission: "products.review:edit", children: /* @__PURE__ */ jsx2(
263
271
  Button,
264
272
  {
265
273
  size: "small",
@@ -268,7 +276,7 @@ var ProductActiveEditSection = ({
268
276
  "data-testid": "product-active-edit-reject-button",
269
277
  children: t("products.edits.actions.reject")
270
278
  }
271
- )
279
+ ) })
272
280
  ] })
273
281
  }
274
282
  ),
@@ -310,7 +318,7 @@ import { useState as useState3 } from "react";
310
318
  import { Button as Button2, Container, Heading, Text as Text2, toast as toast2 } from "@medusajs/ui";
311
319
  import { ExclamationCircleSolid } from "@medusajs/icons";
312
320
  import { useTranslation as useTranslation3 } from "react-i18next";
313
- import { DisplayExtensionZone } from "@mercurjs/dashboard-shared";
321
+ import { DisplayExtensionZone, PermissionAction as PermissionAction2 } from "@mercurjs/dashboard-shared";
314
322
  import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
315
323
  var ProductActiveRequestSection = ({
316
324
  product
@@ -378,7 +386,7 @@ var ProductActiveRequestSection = ({
378
386
  className: "bg-ui-bg-subtle flex items-center justify-end gap-x-2 rounded-b-xl px-6 py-4",
379
387
  "data-testid": "product-active-request-actions",
380
388
  children: [
381
- /* @__PURE__ */ jsx3(
389
+ /* @__PURE__ */ jsx3(PermissionAction2, { permission: "products.review:edit", children: /* @__PURE__ */ jsx3(
382
390
  Button2,
383
391
  {
384
392
  size: "small",
@@ -387,8 +395,8 @@ var ProductActiveRequestSection = ({
387
395
  "data-testid": "product-active-request-confirm-button",
388
396
  children: t("actions.confirm")
389
397
  }
390
- ),
391
- /* @__PURE__ */ jsx3(
398
+ ) }),
399
+ /* @__PURE__ */ jsx3(PermissionAction2, { permission: "products.review:edit", children: /* @__PURE__ */ jsx3(
392
400
  Button2,
393
401
  {
394
402
  size: "small",
@@ -397,8 +405,8 @@ var ProductActiveRequestSection = ({
397
405
  "data-testid": "product-active-request-request-update-button",
398
406
  children: t("products.request.actions.requestUpdate")
399
407
  }
400
- ),
401
- /* @__PURE__ */ jsx3(
408
+ ) }),
409
+ /* @__PURE__ */ jsx3(PermissionAction2, { permission: "products.review:edit", children: /* @__PURE__ */ jsx3(
402
410
  Button2,
403
411
  {
404
412
  size: "small",
@@ -407,7 +415,7 @@ var ProductActiveRequestSection = ({
407
415
  "data-testid": "product-active-request-reject-button",
408
416
  children: t("products.request.actions.reject")
409
417
  }
410
- )
418
+ ) })
411
419
  ]
412
420
  }
413
421
  ),
@@ -466,16 +474,18 @@ var ProductActiveRequestSection = ({
466
474
  // src/pages/products/product-detail/components/product-attribute-section/product-attribute-section.tsx
467
475
  import { toast as toast3 } from "@medusajs/ui";
468
476
  import {
469
- ProductAttributeSection as SharedProductAttributeSection
477
+ ProductAttributeSection as SharedProductAttributeSection,
478
+ useCan
470
479
  } from "@mercurjs/dashboard-shared";
471
480
  import { jsx as jsx4 } from "react/jsx-runtime";
472
481
  var ProductAttributeSection = ({
473
482
  product
474
483
  }) => {
484
+ const canViewAttributes = useCan("product_attributes");
475
485
  const categoryId = product.categories?.[0]?.id;
476
486
  const { product_attributes } = useProductAttributes(
477
487
  { category_id: categoryId, is_required: true },
478
- { enabled: !!categoryId }
488
+ { enabled: !!categoryId && canViewAttributes }
479
489
  );
480
490
  const { mutateAsync } = useBatchProductAttributes(product.id);
481
491
  const onDeleteAttribute = async (attribute) => {
@@ -491,6 +501,9 @@ var ProductAttributeSection = ({
491
501
  } catch {
492
502
  }
493
503
  };
504
+ if (!canViewAttributes) {
505
+ return null;
506
+ }
494
507
  return /* @__PURE__ */ jsx4(
495
508
  SharedProductAttributeSection,
496
509
  {
@@ -506,7 +519,11 @@ import { PencilSquare, Trash } from "@medusajs/icons";
506
519
  import { Container as Container2, Heading as Heading2, StatusBadge, usePrompt } from "@medusajs/ui";
507
520
  import { useTranslation as useTranslation4 } from "react-i18next";
508
521
  import { useNavigate } from "react-router-dom";
509
- import { DisplayExtensionZone as DisplayExtensionZone2, DisplayField } from "@mercurjs/dashboard-shared";
522
+ import {
523
+ DisplayExtensionZone as DisplayExtensionZone2,
524
+ DisplayField,
525
+ RichText
526
+ } from "@mercurjs/dashboard-shared";
510
527
  import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
511
528
  var GENERAL_FIELD_IDS = [
512
529
  "title",
@@ -595,6 +612,7 @@ var ProductGeneralSection = ({
595
612
  {
596
613
  label: t("actions.edit"),
597
614
  to: "edit",
615
+ permission: "products:edit",
598
616
  icon: /* @__PURE__ */ jsx5(PencilSquare, {})
599
617
  }
600
618
  ]
@@ -604,6 +622,7 @@ var ProductGeneralSection = ({
604
622
  {
605
623
  label: t("actions.delete"),
606
624
  onClick: handleDelete,
625
+ permission: "products:manage",
607
626
  icon: /* @__PURE__ */ jsx5(Trash, {})
608
627
  }
609
628
  ]
@@ -622,7 +641,15 @@ var ProductGeneralSection = ({
622
641
  SectionRow,
623
642
  {
624
643
  title: t("fields.description"),
625
- value: product.description,
644
+ value: product.description ? /* @__PURE__ */ jsx5(
645
+ RichText,
646
+ {
647
+ html: product.description,
648
+ className: "w-full",
649
+ collapsedHeight: 200,
650
+ "data-testid": "product-description"
651
+ }
652
+ ) : void 0,
626
653
  "data-testid": "product-description-row"
627
654
  }
628
655
  ) }),
@@ -704,6 +731,7 @@ var ProductOrganizationSection = ({
704
731
  {
705
732
  label: t("actions.edit"),
706
733
  to: "organization",
734
+ permission: "products:edit",
707
735
  icon: /* @__PURE__ */ jsx6(PencilSquare2, {})
708
736
  }
709
737
  ]
@@ -792,7 +820,7 @@ var OrganizationTag = ({ label, to }) => {
792
820
  // src/pages/products/product-detail/components/product-variant-section/product-variant-section.tsx
793
821
  import { useCallback, useMemo } from "react";
794
822
  import { PencilSquare as PencilSquare3, Trash as Trash2 } from "@medusajs/icons";
795
- import { DisplayExtensionZone as DisplayExtensionZone4 } from "@mercurjs/dashboard-shared";
823
+ import { DisplayExtensionZone as DisplayExtensionZone4, PermissionAction as PermissionAction3 } from "@mercurjs/dashboard-shared";
796
824
  import {
797
825
  Badge as Badge2,
798
826
  Button as Button3,
@@ -849,7 +877,7 @@ var ProductVariantSection = ({
849
877
  return /* @__PURE__ */ jsxs6(Container4, { className: "divide-y p-0", "data-testid": "product-variant-section", children: [
850
878
  /* @__PURE__ */ jsxs6("div", { className: "flex items-center justify-between px-6 py-4", children: [
851
879
  /* @__PURE__ */ jsx7(Heading4, { level: "h2", children: t("products.variants.header") }),
852
- /* @__PURE__ */ jsx7(
880
+ /* @__PURE__ */ jsx7(PermissionAction3, { permission: "products:edit", children: /* @__PURE__ */ jsx7(
853
881
  Button3,
854
882
  {
855
883
  size: "small",
@@ -858,7 +886,7 @@ var ProductVariantSection = ({
858
886
  "data-testid": "product-variants-create-button",
859
887
  children: /* @__PURE__ */ jsx7(Link2, { to: "variants/create", children: t("actions.create") })
860
888
  }
861
- )
889
+ ) })
862
890
  ] }),
863
891
  /* @__PURE__ */ jsx7(
864
892
  _DataTable,
@@ -994,6 +1022,7 @@ var useColumns = (product) => {
994
1022
  {
995
1023
  icon: /* @__PURE__ */ jsx7(PencilSquare3, {}),
996
1024
  label: t("actions.edit"),
1025
+ permission: "products:edit",
997
1026
  onClick: () => navigate(
998
1027
  `edit-variant?variant_id=${row.original.id}&${tableSearchParams.toString()}`,
999
1028
  {
@@ -1010,6 +1039,7 @@ var useColumns = (product) => {
1010
1039
  {
1011
1040
  icon: /* @__PURE__ */ jsx7(Trash2, {}),
1012
1041
  label: t("actions.delete"),
1042
+ permission: "products:manage",
1013
1043
  onClick: () => handleDelete(row.original.id, row.original.title ?? "")
1014
1044
  }
1015
1045
  ]
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  NoRecords,
10
10
  NoResults
11
- } from "./chunk-IKAUNMRC.js";
11
+ } from "./chunk-4J74G7N2.js";
12
12
  import {
13
13
  useDate
14
14
  } from "./chunk-EIWPJWKF.js";
@@ -1140,6 +1140,7 @@ var DataTableQuery = ({
1140
1140
  };
1141
1141
 
1142
1142
  // src/components/table/data-table/data-table-root/data-table-root.tsx
1143
+ import { isPermitted, PermissionsContext } from "@mercurjs/dashboard-shared";
1143
1144
  import { CommandBar, Table, clx as clx7 } from "@medusajs/ui";
1144
1145
  import {
1145
1146
  flexRender
@@ -1148,7 +1149,8 @@ import {
1148
1149
  Fragment,
1149
1150
  useEffect as useEffect4,
1150
1151
  useRef as useRef2,
1151
- useState as useState6
1152
+ useState as useState6,
1153
+ useContext as useContext2
1152
1154
  } from "react";
1153
1155
  import { useTranslation as useTranslation6 } from "react-i18next";
1154
1156
  import { Link } from "react-router-dom";
@@ -1171,6 +1173,7 @@ var DataTableRoot = ({
1171
1173
  const scrollableRef = useRef2(null);
1172
1174
  const hasSelect = columns.find((c) => c.id === "select");
1173
1175
  const hasActions = columns.find((c) => c.id === "actions");
1176
+ const permissions = useContext2(PermissionsContext);
1174
1177
  const hasCommandBar = commands && commands.length > 0;
1175
1178
  const rowSelection = table.getState().rowSelection;
1176
1179
  const { pageIndex, pageSize } = table.getState().pagination;
@@ -1358,7 +1361,12 @@ var DataTableRoot = ({
1358
1361
  {
1359
1362
  label: command.label,
1360
1363
  shortcut: command.shortcut,
1361
- action: () => handleAction(command.action)
1364
+ action: () => handleAction(command.action),
1365
+ disabled: !isPermitted(
1366
+ permissions,
1367
+ command.permission,
1368
+ command.requireAll
1369
+ )
1362
1370
  }
1363
1371
  ),
1364
1372
  index < commands.length - 1 && /* @__PURE__ */ jsx8(CommandBar.Seperator, {})
@@ -10,13 +10,13 @@ import {
10
10
  import {
11
11
  _DataTable,
12
12
  useDataTable
13
- } from "./chunk-ZOU25JF6.js";
14
- import {
15
- useUsers
16
- } from "./chunk-2NOIR4BR.js";
13
+ } from "./chunk-SU36MZXC.js";
17
14
  import {
18
15
  ActionMenu
19
- } from "./chunk-BDGZ4EQO.js";
16
+ } from "./chunk-3UOYBH5O.js";
17
+ import {
18
+ useUsers
19
+ } from "./chunk-AZV22U4V.js";
20
20
 
21
21
  // src/pages/users/user-list/user-list.tsx
22
22
  import { Children as Children3 } from "react";
@@ -41,7 +41,7 @@ var UserListActions = ({
41
41
  children
42
42
  }) => {
43
43
  const { t } = useTranslation();
44
- return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center gap-x-2", children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsx(PermissionGuard, { resource: "user", operation: "create", children: /* @__PURE__ */ jsx(Link, { to: "invite", children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: t("users.invite") }) }) }) });
44
+ return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center gap-x-2", children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsx(PermissionGuard, { permission: "users:edit", children: /* @__PURE__ */ jsx(Link, { to: "invite", children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: t("users.invite") }) }) }) });
45
45
  };
46
46
  var UserListHeader = ({
47
47
  children
@@ -229,6 +229,7 @@ var UserActions = ({ user }) => {
229
229
  actions: [
230
230
  {
231
231
  icon: /* @__PURE__ */ jsx2(PencilSquare, {}),
232
+ permission: "users:edit",
232
233
  label: t("actions.edit"),
233
234
  onClick: () => {
234
235
  navigate(`${user.id}/edit`);
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-6G456XO4.js";
4
4
  import {
5
5
  useCustomerTableFilters
6
- } from "./chunk-R22UAHRF.js";
6
+ } from "./chunk-YDESULL7.js";
7
7
  import {
8
8
  useCustomerTableQuery
9
9
  } from "./chunk-GRH7C3QN.js";
@@ -13,16 +13,16 @@ import {
13
13
  import {
14
14
  _DataTable,
15
15
  useDataTable
16
- } from "./chunk-ZOU25JF6.js";
16
+ } from "./chunk-SU36MZXC.js";
17
+ import {
18
+ ActionMenu
19
+ } from "./chunk-3UOYBH5O.js";
17
20
  import {
18
21
  useCustomerGroup,
19
22
  useCustomers,
20
23
  useDeleteCustomerGroup,
21
24
  useRemoveCustomersFromGroup
22
25
  } from "./chunk-XWOFQSGH.js";
23
- import {
24
- ActionMenu
25
- } from "./chunk-BDGZ4EQO.js";
26
26
  import {
27
27
  SingleColumnPageSkeleton
28
28
  } from "./chunk-INNFZYX2.js";
@@ -35,7 +35,7 @@ import { useLinkQuery, WidgetZone } from "@mercurjs/dashboard-shared";
35
35
  // src/pages/customer-groups/customer-group-detail/components/customer-group-customer-section/customer-group-customer-section.tsx
36
36
  import { PencilSquare, Trash } from "@medusajs/icons";
37
37
  import { Button, Checkbox, Container, Heading, usePrompt } from "@medusajs/ui";
38
- import { DisplayExtensionZone } from "@mercurjs/dashboard-shared";
38
+ import { DisplayExtensionZone, PermissionAction } from "@mercurjs/dashboard-shared";
39
39
  import { createColumnHelper } from "@tanstack/react-table";
40
40
  import { useMemo, useState } from "react";
41
41
  import { useTranslation } from "react-i18next";
@@ -99,7 +99,7 @@ var CustomerGroupCustomerSection = ({
99
99
  return /* @__PURE__ */ jsxs(Container, { className: "divide-y p-0", "data-testid": "customer-group-customer-section", children: [
100
100
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", "data-testid": "customer-group-customer-section-header", children: [
101
101
  /* @__PURE__ */ jsx(Heading, { level: "h2", "data-testid": "customer-group-customer-section-heading", children: t("customers.domain") }),
102
- /* @__PURE__ */ jsx(Link, { to: `/customer-groups/${group.id}/add-customers`, "data-testid": "customer-group-customer-section-add-link", children: /* @__PURE__ */ jsx(Button, { variant: "secondary", size: "small", "data-testid": "customer-group-customer-section-add-button", children: t("general.add") }) })
102
+ /* @__PURE__ */ jsx(PermissionAction, { permission: "customer_groups:edit", children: /* @__PURE__ */ jsx(Button, { variant: "secondary", size: "small", asChild: true, "data-testid": "customer-group-customer-section-add-button", children: /* @__PURE__ */ jsx(Link, { to: `/customer-groups/${group.id}/add-customers`, "data-testid": "customer-group-customer-section-add-link", children: t("general.add") }) }) })
103
103
  ] }),
104
104
  /* @__PURE__ */ jsx(
105
105
  _DataTable,
@@ -125,6 +125,7 @@ var CustomerGroupCustomerSection = ({
125
125
  commands: [
126
126
  {
127
127
  action: handleRemove,
128
+ permission: "customer_groups:edit",
128
129
  label: t("actions.remove"),
129
130
  shortcut: "r"
130
131
  }
@@ -177,7 +178,8 @@ var CustomerActions = ({
177
178
  {
178
179
  icon: /* @__PURE__ */ jsx(PencilSquare, {}),
179
180
  label: t("actions.edit"),
180
- to: `/customers/${customer.id}/edit`
181
+ to: `/customers/${customer.id}/edit`,
182
+ permission: "customers:edit"
181
183
  }
182
184
  ]
183
185
  },
@@ -186,7 +188,8 @@ var CustomerActions = ({
186
188
  {
187
189
  icon: /* @__PURE__ */ jsx(Trash, {}),
188
190
  label: t("actions.remove"),
189
- onClick: handleRemove
191
+ onClick: handleRemove,
192
+ permission: "customer_groups:edit"
190
193
  }
191
194
  ]
192
195
  }
@@ -295,7 +298,8 @@ var CustomerGroupGeneralSection = ({
295
298
  {
296
299
  icon: /* @__PURE__ */ jsx2(PencilSquare2, {}),
297
300
  label: t("actions.edit"),
298
- to: `/customer-groups/${group.id}/edit`
301
+ to: `/customer-groups/${group.id}/edit`,
302
+ permission: "customer_groups:edit"
299
303
  }
300
304
  ]
301
305
  },
@@ -304,7 +308,8 @@ var CustomerGroupGeneralSection = ({
304
308
  {
305
309
  icon: /* @__PURE__ */ jsx2(Trash2, {}),
306
310
  label: t("actions.delete"),
307
- onClick: handleDelete
311
+ onClick: handleDelete,
312
+ permission: "customer_groups:manage"
308
313
  }
309
314
  ]
310
315
  }
@@ -7,13 +7,13 @@ import {
7
7
  import {
8
8
  _DataTable,
9
9
  useDataTable
10
- } from "./chunk-ZOU25JF6.js";
10
+ } from "./chunk-SU36MZXC.js";
11
11
  import {
12
12
  NoRecords
13
- } from "./chunk-IKAUNMRC.js";
13
+ } from "./chunk-4J74G7N2.js";
14
14
  import {
15
15
  ActionMenu
16
- } from "./chunk-BDGZ4EQO.js";
16
+ } from "./chunk-3UOYBH5O.js";
17
17
 
18
18
  // src/pages/offers/[id]/_components/offer-inventory-section.tsx
19
19
  import { Buildings } from "@medusajs/icons";
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-E74OUNA3.js";
15
15
  import {
16
16
  ActionMenu
17
- } from "./chunk-BDGZ4EQO.js";
17
+ } from "./chunk-3UOYBH5O.js";
18
18
  import {
19
19
  TwoColumnPageSkeleton
20
20
  } from "./chunk-INNFZYX2.js";
@@ -31,6 +31,7 @@ import { PencilSquare, Trash } from "@medusajs/icons";
31
31
  import { Button, Container, Heading, StatusBadge, Text } from "@medusajs/ui";
32
32
  import { useTranslation } from "react-i18next";
33
33
  import { Link } from "react-router-dom";
34
+ import { PermissionAction } from "@mercurjs/dashboard-shared";
34
35
  import { jsx, jsxs } from "react/jsx-runtime";
35
36
  var Row = ({ label, children }) => /* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-start px-6 py-4", children: [
36
37
  /* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", weight: "plus", children: label }),
@@ -66,6 +67,7 @@ var ReviewGeneralSection = ({ review }) => {
66
67
  actions: [
67
68
  {
68
69
  icon: /* @__PURE__ */ jsx(PencilSquare, {}),
70
+ permission: "reviews:edit",
69
71
  label: t("actions.edit"),
70
72
  to: "edit"
71
73
  }
@@ -75,6 +77,7 @@ var ReviewGeneralSection = ({ review }) => {
75
77
  actions: [
76
78
  {
77
79
  icon: /* @__PURE__ */ jsx(Trash, {}),
80
+ permission: "reviews:manage",
78
81
  label: t("actions.delete"),
79
82
  onClick: handleDelete
80
83
  }
@@ -89,7 +92,7 @@ var ReviewGeneralSection = ({ review }) => {
89
92
  /* @__PURE__ */ jsx(Row, { label: t("reviews.fields.rating"), children: /* @__PURE__ */ jsx(StarRating, { rating: review.rating }) }),
90
93
  /* @__PURE__ */ jsx(Row, { label: t("reviews.fields.content"), children: /* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", children: review.customer_note || "-" }) }),
91
94
  /* @__PURE__ */ jsx(Row, { label: t("reviews.fields.response"), children: /* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", children: review.seller_note || "-" }) }),
92
- !hasResponse && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-end px-6 py-4", children: /* @__PURE__ */ jsx(
95
+ !hasResponse && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-end px-6 py-4", children: /* @__PURE__ */ jsx(PermissionAction, { permission: "reviews:edit", children: /* @__PURE__ */ jsx(
93
96
  Button,
94
97
  {
95
98
  size: "small",
@@ -98,7 +101,7 @@ var ReviewGeneralSection = ({ review }) => {
98
101
  "data-testid": "review-general-section-respond-button",
99
102
  children: /* @__PURE__ */ jsx(Link, { to: "respond", children: t("reviews.respond.action") })
100
103
  }
101
- ) })
104
+ ) }) })
102
105
  ] });
103
106
  };
104
107
 
@@ -49,6 +49,7 @@ var useDeleteCommissionRuleAction = (rule) => {
49
49
 
50
50
  // src/pages/commissions/common/hooks/use-scope-reference-names.tsx
51
51
  import { useMemo } from "react";
52
+ import { usePermissions } from "@mercurjs/dashboard-shared";
52
53
  var idsFor = (rules = [], reference) => rules.filter((r) => r.reference === reference).map((r) => r.reference_id);
53
54
  var useScopeReferenceNames = (rules = []) => {
54
55
  const sellerIds = useMemo(() => idsFor(rules, "seller"), [rules]);
@@ -60,13 +61,17 @@ var useScopeReferenceNames = (rules = []) => {
60
61
  () => idsFor(rules, "product_category"),
61
62
  [rules]
62
63
  );
64
+ const { can } = usePermissions();
65
+ const canViewSellers = can("sellers");
66
+ const canViewProductTypes = can("product_types");
67
+ const canViewCategories = can("product_categories");
63
68
  const { sellers, isLoading: sellersLoading } = useSellers(
64
69
  { id: sellerIds, fields: "id,name", limit: sellerIds.length || 1 },
65
- { enabled: sellerIds.length > 0 }
70
+ { enabled: sellerIds.length > 0 && canViewSellers }
66
71
  );
67
72
  const { product_types: productTypes, isLoading: typesLoading } = useProductTypes(
68
73
  { id: productTypeIds, fields: "id,value", limit: productTypeIds.length || 1 },
69
- { enabled: productTypeIds.length > 0 }
74
+ { enabled: productTypeIds.length > 0 && canViewProductTypes }
70
75
  );
71
76
  const { product_categories: categories, isLoading: categoriesLoading } = useProductCategories(
72
77
  {
@@ -74,7 +79,7 @@ var useScopeReferenceNames = (rules = []) => {
74
79
  fields: "id,name",
75
80
  limit: categoryIds.length || 1
76
81
  },
77
- { enabled: categoryIds.length > 0 }
82
+ { enabled: categoryIds.length > 0 && canViewCategories }
78
83
  );
79
84
  const names = useMemo(() => {
80
85
  const map = {};
@@ -91,7 +96,7 @@ var useScopeReferenceNames = (rules = []) => {
91
96
  }, [sellers, productTypes, categories]);
92
97
  return {
93
98
  names,
94
- isLoading: sellerIds.length > 0 && sellersLoading || productTypeIds.length > 0 && typesLoading || categoryIds.length > 0 && categoriesLoading
99
+ isLoading: sellerIds.length > 0 && canViewSellers && sellersLoading || productTypeIds.length > 0 && canViewProductTypes && typesLoading || categoryIds.length > 0 && canViewCategories && categoriesLoading
95
100
  };
96
101
  };
97
102
 
@@ -0,0 +1,17 @@
1
+ import {
2
+ sdk
3
+ } from "./chunk-DTGEFKK4.js";
4
+
5
+ // src/lib/upload-rich-text-image.ts
6
+ var uploadRichTextImage = async (file) => {
7
+ const { files } = await sdk.admin.uploads.mutate({ files: [file] });
8
+ const url = files?.[0]?.url;
9
+ if (!url) {
10
+ throw new Error("Upload did not return a file url");
11
+ }
12
+ return url;
13
+ };
14
+
15
+ export {
16
+ uploadRichTextImage
17
+ };
@@ -1,9 +1,10 @@
1
1
  import {
2
2
  useUser
3
- } from "./chunk-2NOIR4BR.js";
3
+ } from "./chunk-AZV22U4V.js";
4
4
 
5
5
  // src/components/common/user-link/user-link.tsx
6
6
  import { Avatar, Text } from "@medusajs/ui";
7
+ import { useCan } from "@mercurjs/dashboard-shared";
7
8
  import { Link } from "react-router-dom";
8
9
  import { jsx, jsxs } from "react/jsx-runtime";
9
10
  var UserLink = ({
@@ -29,7 +30,8 @@ var UserLink = ({
29
30
  );
30
31
  };
31
32
  var By = ({ id }) => {
32
- const { user } = useUser(id);
33
+ const canViewUsers = useCan("users");
34
+ const { user } = useUser(id, void 0, { enabled: canViewUsers });
33
35
  if (!user) {
34
36
  return null;
35
37
  }