@mercurjs/admin 2.3.6-canary.1 → 2.3.6-canary.11

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-3UOYBH5O.js +8 -0
  26. package/dist/{chunk-GFHUI2QK.js → chunk-473QGQSA.js} +9 -6
  27. package/dist/{chunk-3XS5ADKJ.js → chunk-4AOVNA5G.js} +31 -20
  28. package/dist/{chunk-IKAUNMRC.js → chunk-4J74G7N2.js} +15 -3
  29. package/dist/{chunk-WIDHYDJQ.js → chunk-4JQDYQSX.js} +20 -10
  30. package/dist/{chunk-RW3NEG36.js → chunk-4W77EUYY.js} +9 -7
  31. package/dist/{chunk-6UYV7B42.js → chunk-4Y7SBHXE.js} +10 -8
  32. package/dist/{chunk-VVIJHBKM.js → chunk-5MXEKSK4.js} +1 -1
  33. package/dist/{chunk-AGO4ROOR.js → chunk-5OIFUF7R.js} +1 -1
  34. package/dist/{chunk-S4WDCOQD.js → chunk-5QW3GY37.js} +27 -14
  35. package/dist/{chunk-5TIADRZ7.js → chunk-63JSBXD5.js} +8 -6
  36. package/dist/{chunk-5ENOJFDI.js → chunk-7CGMFCSU.js} +1 -1
  37. package/dist/{chunk-7QZFRDTU.js → chunk-7GCMYYFL.js} +7 -4
  38. package/dist/{chunk-OWWE5Y6T.js → chunk-7URQCA3H.js} +8 -6
  39. package/dist/{chunk-R2ODJ3D3.js → chunk-A3LCORSK.js} +11 -7
  40. package/dist/{chunk-IZ77JV46.js → chunk-AUCCE46Q.js} +6 -3
  41. package/dist/{chunk-PFQO7UQG.js → chunk-AW4RL2SA.js} +60 -33
  42. package/dist/{chunk-2NOIR4BR.js → chunk-AZV22U4V.js} +20 -2
  43. package/dist/{chunk-VYSTJIAD.js → chunk-CX5XB56X.js} +4 -3
  44. package/dist/{chunk-VWPX7GLC.js → chunk-DBGBLXBS.js} +1 -1
  45. package/dist/{chunk-J4SYK3RT.js → chunk-DGRHDZQO.js} +15 -5
  46. package/dist/{chunk-6AQYZWOC.js → chunk-DL5J4DV2.js} +2 -2
  47. package/dist/{chunk-7UHN2CW7.js → chunk-DM52HEOD.js} +1 -1
  48. package/dist/{chunk-EJGGX3ON.js → chunk-DMLXILXG.js} +12 -10
  49. package/dist/chunk-DQ6RPO6N.js +2954 -0
  50. package/dist/{chunk-VBHKRUON.js → chunk-DUKOOIQD.js} +6 -5
  51. package/dist/{chunk-BLU2WLIJ.js → chunk-DWPBJEEM.js} +21 -8
  52. package/dist/{chunk-6P7HBAUM.js → chunk-E4CMR4T2.js} +21 -13
  53. package/dist/{chunk-QEBISX7V.js → chunk-EBAFVGM3.js} +1 -1
  54. package/dist/{chunk-J34YB5R4.js → chunk-EHLCUND7.js} +12 -10
  55. package/dist/{chunk-DBCNRZZE.js → chunk-EIPTLSNT.js} +3 -1
  56. package/dist/{chunk-KWFSBUD6.js → chunk-ESRIX7ZH.js} +1485 -1411
  57. package/dist/{chunk-YM5X7CQL.js → chunk-FCAJQFYT.js} +32 -12
  58. package/dist/{chunk-437KXVGO.js → chunk-G63BL5AB.js} +8 -5
  59. package/dist/{chunk-BZPOERWW.js → chunk-GIV6KSQX.js} +18 -9
  60. package/dist/{chunk-G2KWNZV6.js → chunk-GMJLK3IK.js} +2 -2
  61. package/dist/{chunk-P2KYQNXQ.js → chunk-GQYB3OOC.js} +108 -65
  62. package/dist/{chunk-4FAYO6UJ.js → chunk-GZUXEIEB.js} +3 -3
  63. package/dist/{chunk-7ASAC2FM.js → chunk-H4TJZB26.js} +26 -18
  64. package/dist/{chunk-5SNW2DCY.js → chunk-HXDCSVQP.js} +42 -18
  65. package/dist/{chunk-NQEXDESI.js → chunk-IBTEL5KA.js} +32 -14
  66. package/dist/{chunk-Q732RWRD.js → chunk-IQRFJO4N.js} +7 -5
  67. package/dist/{chunk-LBFX6AVE.js → chunk-JFRYC6GK.js} +17 -10
  68. package/dist/{chunk-7YBZ2PEZ.js → chunk-JQ7GOJK6.js} +135 -58
  69. package/dist/{chunk-FOWWGEP7.js → chunk-JS2DAWKO.js} +9 -6
  70. package/dist/{chunk-IHCKU5FR.js → chunk-K6OBX6ZR.js} +8 -7
  71. package/dist/{chunk-RSDTHO3I.js → chunk-KB3BTLIB.js} +6 -4
  72. package/dist/{chunk-VIHLAFDA.js → chunk-KYOZ4CCY.js} +61 -29
  73. package/dist/{chunk-D6WRJZPH.js → chunk-LCUAIH7P.js} +7 -5
  74. package/dist/{chunk-F5EZQMOA.js → chunk-M7VHCFCW.js} +10 -8
  75. package/dist/{chunk-EVCAR6GP.js → chunk-MAEUKXZ4.js} +8 -5
  76. package/dist/{chunk-HFCJJJKP.js → chunk-MKKOAF2W.js} +26 -12
  77. package/dist/{chunk-MQFPD5J4.js → chunk-MNKJHZZT.js} +10 -6
  78. package/dist/{chunk-YUL4ES52.js → chunk-MSJ2QS4Y.js} +6 -4
  79. package/dist/{chunk-VE5FQQTG.js → chunk-MTP3MDAA.js} +10 -7
  80. package/dist/{chunk-24JEBPKI.js → chunk-NJ2NRKAJ.js} +57 -14
  81. package/dist/{chunk-XMIDY45X.js → chunk-NRRSESP2.js} +32 -13
  82. package/dist/{chunk-B7QLJF77.js → chunk-NUE5ZL5N.js} +11 -5
  83. package/dist/{chunk-B6KT5U7W.js → chunk-NZIDSNBJ.js} +10 -8
  84. package/dist/{chunk-PAG3PYAQ.js → chunk-O5W5DCKH.js} +1 -1
  85. package/dist/{chunk-CFQX7HAW.js → chunk-OCDZIJBM.js} +11 -5
  86. package/dist/{chunk-KTO2WJ75.js → chunk-OGTWBHJC.js} +2 -2
  87. package/dist/{chunk-3KRUGI6C.js → chunk-ONTZADVX.js} +1 -1
  88. package/dist/{chunk-W62DN2I2.js → chunk-OWSAXYGH.js} +1 -1
  89. package/dist/{chunk-ESNSDIEC.js → chunk-PDPCFFFH.js} +1 -1
  90. package/dist/{chunk-Q6M2TNLO.js → chunk-PGOJH3NS.js} +61 -329
  91. package/dist/{chunk-LXW3L56Z.js → chunk-Q2XWHI6K.js} +6 -3
  92. package/dist/{chunk-ENKVW7JW.js → chunk-QKW6ZECR.js} +29 -14
  93. package/dist/{chunk-JBT2FR4K.js → chunk-QPDL77XZ.js} +21 -10
  94. package/dist/{chunk-D7E6HL5O.js → chunk-QPXGSVW4.js} +10 -8
  95. package/dist/{chunk-M336ZIRO.js → chunk-QQ2UM2KH.js} +9 -7
  96. package/dist/{chunk-YWZQKODL.js → chunk-R55XYG6Y.js} +28 -15
  97. package/dist/{chunk-AOLP2YDZ.js → chunk-RAD3UMQ3.js} +7 -5
  98. package/dist/{chunk-HFM6N7R3.js → chunk-RLF7ADLP.js} +21 -13
  99. package/dist/{chunk-A2UTT4YX.js → chunk-SLXOKSG4.js} +58 -28
  100. package/dist/{chunk-ZOU25JF6.js → chunk-SU36MZXC.js} +11 -3
  101. package/dist/{chunk-F644YFJZ.js → chunk-SZSAJHN7.js} +7 -6
  102. package/dist/{chunk-GR7S7WTT.js → chunk-TPWSE5HE.js} +16 -11
  103. package/dist/{chunk-7ECQXPOG.js → chunk-TVCHVG2A.js} +3 -3
  104. package/dist/{chunk-HJACC6KV.js → chunk-UKQ6FES4.js} +6 -3
  105. package/dist/{chunk-JL3NKSLJ.js → chunk-USO2SWZV.js} +9 -4
  106. package/dist/chunk-USY2322P.js +17 -0
  107. package/dist/{chunk-6ASLWQB3.js → chunk-V3UQOU5W.js} +4 -2
  108. package/dist/{chunk-XXYVUV5F.js → chunk-VD2CKAYG.js} +21 -10
  109. package/dist/{chunk-C4XKPQ6T.js → chunk-VLNTJXXO.js} +16 -3
  110. package/dist/{chunk-D3RDR3D3.js → chunk-W3LCOK3O.js} +153 -124
  111. package/dist/{chunk-MXM5ZD4Y.js → chunk-W5U6NPSN.js} +10 -25
  112. package/dist/{chunk-MM5RRCPX.js → chunk-WVHNOE7Y.js} +1 -1
  113. package/dist/{chunk-RFENVF7Y.js → chunk-XUOGIKEE.js} +3 -3
  114. package/dist/{chunk-R22UAHRF.js → chunk-YDESULL7.js} +3 -1
  115. package/dist/{chunk-7I7G5ZJE.js → chunk-YIXWAK3A.js} +12 -7
  116. package/dist/{chunk-ZFPASY4R.js → chunk-Z2FX5GG4.js} +24 -12
  117. package/dist/chunk-ZNFBP5CQ.js +268 -0
  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-4BDQXC4T.js +64 -0
  142. package/dist/index.css +226 -9
  143. package/dist/index.d.ts +10 -30
  144. package/dist/index.js +631 -3918
  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-XTXDKZEO.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
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-54EPH67T.js";
4
4
  import {
5
5
  useCustomerGroupTableFilters
6
- } from "./chunk-CFQX7HAW.js";
6
+ } from "./chunk-OCDZIJBM.js";
7
7
  import {
8
8
  useOrderGroupTableFilters
9
- } from "./chunk-JQEAWWRP.js";
9
+ } from "./chunk-ZPJOSHV7.js";
10
10
  import {
11
11
  useOrderTableQuery
12
12
  } from "./chunk-QUHSHIAC.js";
@@ -36,10 +36,13 @@ import {
36
36
  import {
37
37
  _DataTable,
38
38
  useDataTable
39
- } from "./chunk-ZOU25JF6.js";
39
+ } from "./chunk-SU36MZXC.js";
40
40
  import {
41
41
  NoRecords
42
- } from "./chunk-IKAUNMRC.js";
42
+ } from "./chunk-4J74G7N2.js";
43
+ import {
44
+ ActionMenu
45
+ } from "./chunk-3UOYBH5O.js";
43
46
  import {
44
47
  useOrderGroups
45
48
  } from "./chunk-OQ2J45XW.js";
@@ -51,9 +54,6 @@ import {
51
54
  useDeleteCustomerAddress,
52
55
  useRemoveCustomersFromGroup
53
56
  } from "./chunk-XWOFQSGH.js";
54
- import {
55
- ActionMenu
56
- } from "./chunk-BDGZ4EQO.js";
57
57
  import {
58
58
  SingleColumnPageSkeleton
59
59
  } from "./chunk-INNFZYX2.js";
@@ -61,13 +61,13 @@ import {
61
61
  // src/pages/customers/customer-detail/customer-detail.tsx
62
62
  import { Children } from "react";
63
63
  import { useLoaderData, useParams } from "react-router-dom";
64
- import { WidgetZone, useLinkQuery } from "@mercurjs/dashboard-shared";
64
+ import { PermissionGuard, WidgetZone, useLinkQuery } from "@mercurjs/dashboard-shared";
65
65
 
66
66
  // src/pages/customers/customer-detail/components/customer-address-section/customer-address-section.tsx
67
67
  import { Button, clx, Container, Heading, toast, usePrompt } from "@medusajs/ui";
68
68
  import { useTranslation } from "react-i18next";
69
69
  import { PencilSquare, Trash } from "@medusajs/icons";
70
- import { DisplayExtensionZone } from "@mercurjs/dashboard-shared";
70
+ import { DisplayExtensionZone, PermissionAction } from "@mercurjs/dashboard-shared";
71
71
  import { Link, useNavigate } from "react-router-dom";
72
72
 
73
73
  // src/components/common/listicle/listicle.tsx
@@ -125,7 +125,7 @@ var CustomerAddressSection = ({
125
125
  return /* @__PURE__ */ jsxs2(Container, { className: "p-0", "data-testid": "customer-address-section", children: [
126
126
  /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between px-6 py-4", "data-testid": "customer-address-section-header", children: [
127
127
  /* @__PURE__ */ jsx2(Heading, { level: "h2", "data-testid": "customer-address-section-heading", children: t2("addresses.title") }),
128
- /* @__PURE__ */ jsx2(Link, { to: `create-address`, "data-testid": "customer-address-section-add-link", children: /* @__PURE__ */ jsx2(Button, { variant: "secondary", size: "small", "data-testid": "customer-address-section-create-button", children: t2("actions.create") }) })
128
+ /* @__PURE__ */ jsx2(PermissionAction, { permission: "customers:edit", children: /* @__PURE__ */ jsx2(Button, { variant: "secondary", size: "small", asChild: true, "data-testid": "customer-address-section-create-button", children: /* @__PURE__ */ jsx2(Link, { to: `create-address`, "data-testid": "customer-address-section-add-link", children: t2("actions.create") }) }) })
129
129
  ] }),
130
130
  addresses.length === 0 && /* @__PURE__ */ jsx2("div", { "data-testid": "customer-address-section-no-records", children: /* @__PURE__ */ jsx2(
131
131
  NoRecords,
@@ -154,7 +154,8 @@ var CustomerAddressSection = ({
154
154
  {
155
155
  icon: /* @__PURE__ */ jsx2(PencilSquare, {}),
156
156
  label: t2("actions.edit"),
157
- to: `edit-address/${address.id}`
157
+ to: `edit-address/${address.id}`,
158
+ permission: "customers:edit"
158
159
  }
159
160
  ]
160
161
  },
@@ -163,6 +164,7 @@ var CustomerAddressSection = ({
163
164
  {
164
165
  icon: /* @__PURE__ */ jsx2(Trash, {}),
165
166
  label: t2("actions.delete"),
167
+ permission: "customers:manage",
166
168
  onClick: async () => {
167
169
  await handleDelete(address);
168
170
  }
@@ -247,7 +249,8 @@ var CustomerGeneralSection = ({
247
249
  {
248
250
  label: t2("actions.edit"),
249
251
  icon: /* @__PURE__ */ jsx3(PencilSquare2, {}),
250
- to: "edit"
252
+ to: "edit",
253
+ permission: "customers:edit"
251
254
  }
252
255
  ]
253
256
  },
@@ -256,7 +259,8 @@ var CustomerGeneralSection = ({
256
259
  {
257
260
  label: t2("actions.delete"),
258
261
  icon: /* @__PURE__ */ jsx3(Trash2, {}),
259
- onClick: handleDelete
262
+ onClick: handleDelete,
263
+ permission: "customers:manage"
260
264
  }
261
265
  ]
262
266
  }
@@ -302,7 +306,7 @@ import { createColumnHelper } from "@tanstack/react-table";
302
306
  import { t } from "i18next";
303
307
  import { useMemo, useState } from "react";
304
308
  import { PencilSquare as PencilSquare3, Trash as Trash3 } from "@medusajs/icons";
305
- import { DisplayExtensionZone as DisplayExtensionZone3 } from "@mercurjs/dashboard-shared";
309
+ import { DisplayExtensionZone as DisplayExtensionZone3, PermissionAction as PermissionAction2 } from "@mercurjs/dashboard-shared";
306
310
  import { keepPreviousData } from "@tanstack/react-query";
307
311
  import { useTranslation as useTranslation3 } from "react-i18next";
308
312
  import { Link as Link2 } from "react-router-dom";
@@ -383,7 +387,7 @@ var CustomerGroupSection = ({
383
387
  return /* @__PURE__ */ jsxs4(Container3, { className: "divide-y p-0", "data-testid": "customer-group-section", children: [
384
388
  /* @__PURE__ */ jsxs4("div", { className: "flex items-center justify-between px-6 py-4", "data-testid": "customer-group-section-header", children: [
385
389
  /* @__PURE__ */ jsx4(Heading3, { level: "h2", "data-testid": "customer-group-section-heading", children: t("customerGroups.domain") }),
386
- /* @__PURE__ */ jsx4(Link2, { to: `/customers/${customer.id}/add-customer-groups`, "data-testid": "customer-group-section-add-link", children: /* @__PURE__ */ jsx4(Button2, { variant: "secondary", size: "small", "data-testid": "customer-group-section-add-button", children: t("general.add") }) })
390
+ /* @__PURE__ */ jsx4(PermissionAction2, { permission: "customers:edit", children: /* @__PURE__ */ jsx4(Button2, { variant: "secondary", size: "small", asChild: true, "data-testid": "customer-group-section-add-button", children: /* @__PURE__ */ jsx4(Link2, { to: `/customers/${customer.id}/add-customer-groups`, "data-testid": "customer-group-section-add-link", children: t("general.add") }) }) })
387
391
  ] }),
388
392
  /* @__PURE__ */ jsx4(
389
393
  _DataTable,
@@ -407,6 +411,7 @@ var CustomerGroupSection = ({
407
411
  commands: [
408
412
  {
409
413
  action: handleRemove,
414
+ permission: "customers:edit",
410
415
  label: t("actions.remove"),
411
416
  shortcut: "r"
412
417
  }
@@ -462,11 +467,13 @@ var CustomerGroupRowActions = ({
462
467
  {
463
468
  label: t2("actions.edit"),
464
469
  icon: /* @__PURE__ */ jsx4(PencilSquare3, {}),
465
- to: `/customer-groups/${group.id}/edit`
470
+ to: `/customer-groups/${group.id}/edit`,
471
+ permission: "customer_groups:edit"
466
472
  },
467
473
  {
468
474
  label: t2("actions.remove"),
469
475
  onClick: onRemove,
476
+ permission: "customer_groups:edit",
470
477
  icon: /* @__PURE__ */ jsx4(Trash3, {})
471
478
  }
472
479
  ]
@@ -676,6 +683,7 @@ var CustomerOrderActions = ({ orderId }) => {
676
683
  {
677
684
  label: t2("transferOwnership.label"),
678
685
  to: `${orderId}/transfer`,
686
+ permission: "orders:edit",
679
687
  icon: /* @__PURE__ */ jsx5(ArrowPath, {})
680
688
  }
681
689
  ]
@@ -809,8 +817,8 @@ var Root = ({ children }) => {
809
817
  return Children.count(children) > 0 ? /* @__PURE__ */ jsx6(TwoColumnPage, { data: customer, hasOutlet: true, showJSON: true, showMetadata: true, children }) : /* @__PURE__ */ jsxs6(TwoColumnPage, { data: customer, hasOutlet: true, showJSON: true, showMetadata: true, children: [
810
818
  /* @__PURE__ */ jsx6(TwoColumnPage.Main, { children: /* @__PURE__ */ jsxs6(WidgetZone, { id: "customers.detail.main", data: customer, children: [
811
819
  /* @__PURE__ */ jsx6(CustomerGeneralSection, { customer }),
812
- /* @__PURE__ */ jsx6(CustomerOrderSection, { customer }),
813
- /* @__PURE__ */ jsx6(CustomerGroupSection, { customer })
820
+ /* @__PURE__ */ jsx6(PermissionGuard, { permission: "orders:view", children: /* @__PURE__ */ jsx6(CustomerOrderSection, { customer }) }),
821
+ /* @__PURE__ */ jsx6(PermissionGuard, { permission: "customer_groups:view", children: /* @__PURE__ */ jsx6(CustomerGroupSection, { customer }) })
814
822
  ] }) }),
815
823
  /* @__PURE__ */ jsx6(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsx6(WidgetZone, { id: "customers.detail.side", data: customer, children: /* @__PURE__ */ jsx6(CustomerAddressSection, { customer }) }) })
816
824
  ] });
@@ -4,7 +4,7 @@ import {
4
4
  buildOfferGridData,
5
5
  usePriceListCurrencyData,
6
6
  usePriceListGridColumns
7
- } from "./chunk-BZPOERWW.js";
7
+ } from "./chunk-GIV6KSQX.js";
8
8
  import {
9
9
  useCustomerGroupTableColumns
10
10
  } from "./chunk-54EPH67T.js";
@@ -12,13 +12,13 @@ import {
12
12
  useOfferTableColumns,
13
13
  useOfferTableFilters,
14
14
  useOfferTableQuery
15
- } from "./chunk-NQEXDESI.js";
15
+ } from "./chunk-IBTEL5KA.js";
16
16
  import {
17
17
  extractPricesFromOffers
18
18
  } from "./chunk-KVAD5JGS.js";
19
19
  import {
20
20
  useCustomerGroupTableFilters
21
- } from "./chunk-CFQX7HAW.js";
21
+ } from "./chunk-OCDZIJBM.js";
22
22
  import {
23
23
  useOffers
24
24
  } from "./chunk-GNNOFJAK.js";
@@ -46,7 +46,7 @@ import {
46
46
  import {
47
47
  _DataTable,
48
48
  useDataTable
49
- } from "./chunk-ZOU25JF6.js";
49
+ } from "./chunk-SU36MZXC.js";
50
50
  import {
51
51
  useCreatePriceList
52
52
  } from "./chunk-56XMCNDS.js";
@@ -110,6 +110,7 @@ var PricingPricesFields = Object.keys(
110
110
 
111
111
  // src/pages/price-lists/price-list-create/price-list-create.tsx
112
112
  import { Children as Children2 } from "react";
113
+ import { SectionNoAccess as SectionNoAccess3 } from "@mercurjs/dashboard-shared";
113
114
 
114
115
  // src/pages/price-lists/price-list-create/components/price-list-create-form/price-list-create-form.tsx
115
116
  import { zodResolver } from "@hookform/resolvers/zod";
@@ -137,6 +138,7 @@ import { useTranslation as useTranslation2 } from "react-i18next";
137
138
 
138
139
  // src/pages/price-lists/common/components/price-list-customer-group-rule-form/price-list-customer-group-rule-form.tsx
139
140
  import { Button, Checkbox } from "@medusajs/ui";
141
+ import { SectionNoAccess, isForbidden, useCan } from "@mercurjs/dashboard-shared";
140
142
  import { keepPreviousData } from "@tanstack/react-query";
141
143
  import {
142
144
  createColumnHelper
@@ -170,10 +172,12 @@ var PriceListCustomerGroupRuleForm = ({
170
172
  pageSize: PAGE_SIZE,
171
173
  prefix: PREFIX
172
174
  });
175
+ const canViewCustomerGroups = useCan("customer_groups");
173
176
  const { customer_groups, count, isLoading, isError, error } = useCustomerGroups(
174
177
  { ...searchParams, fields: "id,name,customers.id" },
175
178
  {
176
- placeholderData: keepPreviousData
179
+ placeholderData: keepPreviousData,
180
+ enabled: canViewCustomerGroups
177
181
  }
178
182
  );
179
183
  const updater = (value) => {
@@ -209,6 +213,12 @@ var PriceListCustomerGroupRuleForm = ({
209
213
  prefix: PREFIX
210
214
  });
211
215
  const Component = type === "focus" ? StackedFocusModal : StackedDrawer;
216
+ if (!canViewCustomerGroups || isForbidden(error)) {
217
+ return /* @__PURE__ */ jsxs("div", { className: "flex size-full flex-col overflow-hidden", children: [
218
+ /* @__PURE__ */ jsx(Component.Body, { className: "min-h-0 p-0", children: /* @__PURE__ */ jsx(SectionNoAccess, {}) }),
219
+ /* @__PURE__ */ jsx(Component.Footer, { children: /* @__PURE__ */ jsx(Component.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "secondary", size: "small", type: "button", children: t("actions.cancel") }) }) })
220
+ ] });
221
+ }
212
222
  if (isError) {
213
223
  throw error;
214
224
  }
@@ -561,6 +571,7 @@ Root._tabMeta = defineTabMeta({
561
571
  var PriceListDetailsForm = Root;
562
572
 
563
573
  // src/pages/price-lists/price-list-create/components/price-list-create-form/price-list-prices-form.tsx
574
+ import { usePermissions } from "@mercurjs/dashboard-shared";
564
575
  import { useEffect as useEffect2, useMemo as useMemo2 } from "react";
565
576
  import { useWatch } from "react-hook-form";
566
577
  import { jsx as jsx3 } from "react/jsx-runtime";
@@ -574,13 +585,14 @@ var Root2 = ({
574
585
  const { setCloseOnEscape } = useRouteModal();
575
586
  const offerIds = useWatch({ control: form.control, name: "offer_ids" });
576
587
  const existingOffers = useWatch({ control: form.control, name: "offers" });
588
+ const { can } = usePermissions();
577
589
  const { offers: selectedOffers } = useOffers(
578
590
  {
579
591
  id: offerIds,
580
592
  limit: offerIds?.length || 1,
581
593
  fields: "id,variant_id,product_id,seller_id,sku,seller.name,product.title,product.thumbnail"
582
594
  },
583
- { enabled: (offerIds?.length ?? 0) > 0 }
595
+ { enabled: (offerIds?.length ?? 0) > 0 && can("offers") }
584
596
  );
585
597
  const productIds = useMemo2(
586
598
  () => Array.from(
@@ -590,7 +602,7 @@ var Root2 = ({
590
602
  );
591
603
  const { products, isLoading } = useProducts(
592
604
  { id: productIds, limit: productIds.length || 1, fields: "id,*variants" },
593
- { enabled: productIds.length > 0 }
605
+ { enabled: productIds.length > 0 && can("products") }
594
606
  );
595
607
  const { gridData, variantIdByOffer } = useMemo2(
596
608
  () => buildOfferGridData(
@@ -637,6 +649,7 @@ var PriceListPricesForm = Root2;
637
649
  import { keepPreviousData as keepPreviousData2 } from "@tanstack/react-query";
638
650
  import { useMemo as useMemo3, useRef, useState as useState2 } from "react";
639
651
  import { useTranslation as useTranslation3 } from "react-i18next";
652
+ import { SectionNoAccess as SectionNoAccess2, isForbidden as isForbidden2, useCan as useCan2 } from "@mercurjs/dashboard-shared";
640
653
  import { jsx as jsx4 } from "react/jsx-runtime";
641
654
  var PAGE_SIZE2 = 50;
642
655
  var PREFIX2 = "p";
@@ -649,8 +662,10 @@ var Root3 = () => {
649
662
  pageSize: PAGE_SIZE2,
650
663
  prefix: PREFIX2
651
664
  });
665
+ const canViewOffers = useCan2("offers");
652
666
  const { offers, count, isLoading, isError, error } = useOffers(searchParams, {
653
- placeholderData: keepPreviousData2
667
+ placeholderData: keepPreviousData2,
668
+ enabled: canViewOffers
654
669
  });
655
670
  const offerMeta = useRef({});
656
671
  for (const offer of offers ?? []) {
@@ -697,6 +712,9 @@ var Root3 = () => {
697
712
  pageSize: PAGE_SIZE2,
698
713
  prefix: PREFIX2
699
714
  });
715
+ if (!canViewOffers || isForbidden2(error)) {
716
+ return /* @__PURE__ */ jsx4(SectionNoAccess2, {});
717
+ }
700
718
  if (isError) {
701
719
  throw error;
702
720
  }
@@ -831,17 +849,23 @@ var PriceListCreateForm = ({
831
849
  };
832
850
 
833
851
  // src/pages/price-lists/price-list-create/price-list-create.tsx
834
- import { jsx as jsx6 } from "react/jsx-runtime";
852
+ import { Fragment, jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
835
853
  var Root4 = ({ children }) => {
836
- const { isReady, regions, currencies, pricePreferences } = usePriceListCurrencyData();
837
- return /* @__PURE__ */ jsx6(RouteFocusModal, { children: isReady && (Children2.count(children) > 0 ? children : /* @__PURE__ */ jsx6(
838
- PriceListCreateForm,
839
- {
840
- regions,
841
- currencies,
842
- pricePreferences
843
- }
844
- )) });
854
+ const { isReady, isForbidden: isForbidden3, regions, currencies, pricePreferences } = usePriceListCurrencyData();
855
+ return /* @__PURE__ */ jsxs3(RouteFocusModal, { children: [
856
+ isForbidden3 && /* @__PURE__ */ jsxs3(Fragment, { children: [
857
+ /* @__PURE__ */ jsx6(RouteFocusModal.Header, {}),
858
+ /* @__PURE__ */ jsx6(RouteFocusModal.Body, { children: /* @__PURE__ */ jsx6(SectionNoAccess3, {}) })
859
+ ] }),
860
+ isReady && (Children2.count(children) > 0 ? children : /* @__PURE__ */ jsx6(
861
+ PriceListCreateForm,
862
+ {
863
+ regions,
864
+ currencies,
865
+ pricePreferences
866
+ }
867
+ ))
868
+ ] });
845
869
  };
846
870
  var PriceListCreatePage = Object.assign(Root4, {
847
871
  Form: PriceListCreateForm,
@@ -6,7 +6,7 @@ import {
6
6
  CategoryHeader,
7
7
  ProductStatusCell,
8
8
  ProductStatusHeader
9
- } from "./chunk-VVIJHBKM.js";
9
+ } from "./chunk-5MXEKSK4.js";
10
10
  import {
11
11
  ProductCell,
12
12
  ProductHeader
@@ -19,10 +19,13 @@ import {
19
19
  } from "./chunk-THHRRYRS.js";
20
20
  import {
21
21
  require_dist
22
- } from "./chunk-KWFSBUD6.js";
22
+ } from "./chunk-ESRIX7ZH.js";
23
+ import {
24
+ ActionMenu
25
+ } from "./chunk-3UOYBH5O.js";
23
26
  import {
24
27
  useProductTags
25
- } from "./chunk-MXM5ZD4Y.js";
28
+ } from "./chunk-W5U6NPSN.js";
26
29
  import {
27
30
  useProductTypes
28
31
  } from "./chunk-AEBQQ2EG.js";
@@ -32,9 +35,6 @@ import {
32
35
  import {
33
36
  useSellers
34
37
  } from "./chunk-HRMANL53.js";
35
- import {
36
- ActionMenu
37
- } from "./chunk-BDGZ4EQO.js";
38
38
  import {
39
39
  useProductCategories
40
40
  } from "./chunk-SQ7J4KTS.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({
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  useDeleteShippingOptionTypeAction
3
- } from "./chunk-ESNSDIEC.js";
3
+ } from "./chunk-PDPCFFFH.js";
4
4
  import {
5
5
  SingleColumnPage
6
6
  } from "./chunk-H6MYB7GB.js";
7
- import {
8
- useShippingOptionType
9
- } from "./chunk-MXM5ZD4Y.js";
10
7
  import {
11
8
  ActionMenu
12
- } from "./chunk-BDGZ4EQO.js";
9
+ } from "./chunk-3UOYBH5O.js";
10
+ import {
11
+ useShippingOptionType
12
+ } from "./chunk-W5U6NPSN.js";
13
13
  import {
14
14
  SingleColumnPageSkeleton
15
15
  } from "./chunk-INNFZYX2.js";
@@ -42,6 +42,7 @@ var ShippingOptionTypeGeneralSection = ({
42
42
  {
43
43
  actions: [
44
44
  {
45
+ permission: "shipping_options:edit",
45
46
  label: t("actions.edit"),
46
47
  icon: /* @__PURE__ */ jsx(PencilSquare, {}),
47
48
  to: "edit"
@@ -51,6 +52,7 @@ var ShippingOptionTypeGeneralSection = ({
51
52
  {
52
53
  actions: [
53
54
  {
55
+ permission: "shipping_options:manage",
54
56
  label: t("actions.delete"),
55
57
  icon: /* @__PURE__ */ jsx(Trash, {}),
56
58
  onClick: handleDelete
@@ -21,7 +21,10 @@ import {
21
21
  import {
22
22
  _DataTable,
23
23
  useDataTable
24
- } from "./chunk-ZOU25JF6.js";
24
+ } from "./chunk-SU36MZXC.js";
25
+ import {
26
+ ActionMenu
27
+ } from "./chunk-3UOYBH5O.js";
25
28
  import {
26
29
  useDeleteRegion,
27
30
  useRegion,
@@ -30,9 +33,6 @@ import {
30
33
  import {
31
34
  usePricePreferences
32
35
  } from "./chunk-FHZHKIWI.js";
33
- import {
34
- ActionMenu
35
- } from "./chunk-BDGZ4EQO.js";
36
36
  import {
37
37
  SingleColumnPageSkeleton
38
38
  } from "./chunk-INNFZYX2.js";
@@ -142,6 +142,7 @@ var RegionCountrySection = ({ region }) => {
142
142
  {
143
143
  actions: [
144
144
  {
145
+ permission: "regions:edit",
145
146
  label: t("regions.addCountries"),
146
147
  icon: /* @__PURE__ */ jsx(PlusMini, {}),
147
148
  to: "countries/add"
@@ -171,6 +172,7 @@ var RegionCountrySection = ({ region }) => {
171
172
  commands: [
172
173
  {
173
174
  action: handleRemoveCountries,
175
+ permission: "regions:edit",
174
176
  label: t("actions.remove"),
175
177
  shortcut: "r"
176
178
  }
@@ -223,6 +225,7 @@ var CountryActions = ({
223
225
  {
224
226
  actions: [
225
227
  {
228
+ permission: "regions:edit",
226
229
  label: t("actions.remove"),
227
230
  onClick: handleRemove,
228
231
  icon: /* @__PURE__ */ jsx(Trash, {})
@@ -316,7 +319,7 @@ var RegionGeneralSection = ({
316
319
  "data-testid": "region-general-section-automatic-taxes"
317
320
  }
318
321
  ),
319
- /* @__PURE__ */ jsx2(
322
+ pricePreferences && /* @__PURE__ */ jsx2(
320
323
  SectionRow,
321
324
  {
322
325
  title: t("fields.taxInclusivePricing"),
@@ -376,6 +379,7 @@ var RegionActions = ({ region }) => {
376
379
  actions: [
377
380
  {
378
381
  icon: /* @__PURE__ */ jsx2(PencilSquare, {}),
382
+ permission: "regions:edit",
379
383
  label: t("actions.edit"),
380
384
  to: `/settings/regions/${region.id}/edit`
381
385
  }
@@ -385,6 +389,7 @@ var RegionActions = ({ region }) => {
385
389
  actions: [
386
390
  {
387
391
  icon: /* @__PURE__ */ jsx2(Trash2, {}),
392
+ permission: "regions:manage",
388
393
  label: t("actions.delete"),
389
394
  onClick: handleDelete
390
395
  }
@@ -397,7 +402,7 @@ var RegionActions = ({ region }) => {
397
402
  };
398
403
 
399
404
  // src/pages/regions/region-detail/region-detail.tsx
400
- import { WidgetZone } from "@mercurjs/dashboard-shared";
405
+ import { WidgetZone, isForbidden, useCan } from "@mercurjs/dashboard-shared";
401
406
 
402
407
  // src/pages/regions/region-detail/constants.ts
403
408
  var REGION_DETAIL_FIELDS = "*payment_providers,*countries,+automatic_taxes";
@@ -407,6 +412,7 @@ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
407
412
  var Root = ({ children }) => {
408
413
  const initialData = useLoaderData();
409
414
  const { id } = useParams();
415
+ const canViewPreferences = useCan("price_preferences");
410
416
  const {
411
417
  region,
412
418
  isPending: isLoading,
@@ -429,15 +435,16 @@ var Root = ({ children }) => {
429
435
  attribute: "region_id",
430
436
  value: id
431
437
  },
432
- { enabled: !!region }
438
+ { enabled: !!region && canViewPreferences }
433
439
  );
434
- if (isLoading || isLoadingPreferences || !region) {
440
+ const preferencesForbidden = !canViewPreferences || isForbidden(preferencesError);
441
+ if (isLoading || !preferencesForbidden && isLoadingPreferences || !region) {
435
442
  return /* @__PURE__ */ jsx3(SingleColumnPageSkeleton, { sections: 2, showJSON: true, showMetadata: true });
436
443
  }
437
444
  if (isRegionError) {
438
445
  throw regionError;
439
446
  }
440
- if (isPreferencesError) {
447
+ if (isPreferencesError && !preferencesForbidden) {
441
448
  throw preferencesError;
442
449
  }
443
450
  return Children.count(children) > 0 ? /* @__PURE__ */ jsx3(SingleColumnPage, { data: region, showMetadata: true, showJSON: true, children }) : /* @__PURE__ */ jsx3(SingleColumnPage, { data: region, showMetadata: true, showJSON: true, children: /* @__PURE__ */ jsxs3(WidgetZone, { id: "regions.detail.main", data: region, children: [
@@ -445,7 +452,7 @@ var Root = ({ children }) => {
445
452
  RegionGeneralSection,
446
453
  {
447
454
  region,
448
- pricePreferences: pricePreferences ?? []
455
+ pricePreferences: preferencesForbidden ? void 0 : pricePreferences ?? []
449
456
  }
450
457
  ),
451
458
  /* @__PURE__ */ jsx3(RegionCountrySection, { region })