@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
@@ -29,6 +29,7 @@ import {
29
29
  useStackedModal
30
30
  } from "./chunk-FWJLS7XD.js";
31
31
  import "./chunk-3QSRE5LS.js";
32
+ import "./chunk-LAVHRER2.js";
32
33
  import {
33
34
  useRegions
34
35
  } from "./chunk-2SCR7R3C.js";
@@ -43,7 +44,6 @@ import {
43
44
  useUpdateShippingOptions
44
45
  } from "./chunk-SCLV2T6Z.js";
45
46
  import "./chunk-H5E3CGD7.js";
46
- import "./chunk-LAVHRER2.js";
47
47
  import "./chunk-Y7QKP6QU.js";
48
48
  import "./chunk-INNFZYX2.js";
49
49
  import "./chunk-RHKRREUU.js";
@@ -52,6 +52,7 @@ import "./chunk-DTGEFKK4.js";
52
52
  import "./chunk-NBMM2TZK.js";
53
53
 
54
54
  // src/pages/locations/location-service-zone-shipping-option-pricing/location-service-zone-shipping-option-pricing.tsx
55
+ import { SectionNoAccess as SectionNoAccess2, isForbidden as isForbidden2, useCan as useCan2 } from "@mercurjs/dashboard-shared";
55
56
  import { useTranslation as useTranslation2 } from "react-i18next";
56
57
  import { useParams } from "react-router-dom";
57
58
 
@@ -61,8 +62,9 @@ import { useMemo, useState } from "react";
61
62
  import { useForm } from "react-hook-form";
62
63
  import * as zod from "zod";
63
64
  import { Button, toast } from "@medusajs/ui";
65
+ import { SectionNoAccess, isForbidden, useCan } from "@mercurjs/dashboard-shared";
64
66
  import { useTranslation } from "react-i18next";
65
- import { jsx, jsxs } from "react/jsx-runtime";
67
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
66
68
  var EditShippingOptionPricingSchema = zod.object({
67
69
  region_prices: zod.record(
68
70
  zod.string(),
@@ -111,15 +113,19 @@ function EditShippingOptionsPricingForm({
111
113
  () => store?.supported_currencies?.map((c) => c.currency_code) || [],
112
114
  [store]
113
115
  );
116
+ const canViewRegions = useCan("regions");
114
117
  const {
115
118
  regions,
116
119
  isLoading: isRegionsLoading,
117
120
  isError: isRegionsError,
118
121
  error: regionsError
119
- } = useRegions({
120
- fields: "id,name,currency_code",
121
- limit: 999
122
- });
122
+ } = useRegions(
123
+ {
124
+ fields: "id,name,currency_code",
125
+ limit: 999
126
+ },
127
+ { enabled: canViewRegions }
128
+ );
123
129
  const { price_preferences: pricePreferences } = usePricePreferences({});
124
130
  const { setCloseOnEscape } = useRouteModal();
125
131
  const columns = useShippingOptionPriceColumns({
@@ -202,6 +208,12 @@ function EditShippingOptionsPricingForm({
202
208
  if (isStoreError) {
203
209
  throw storeError;
204
210
  }
211
+ if (!canViewRegions || isForbidden(regionsError)) {
212
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
213
+ /* @__PURE__ */ jsx(RouteFocusModal.Header, {}),
214
+ /* @__PURE__ */ jsx(RouteFocusModal.Body, { children: /* @__PURE__ */ jsx(SectionNoAccess, {}) })
215
+ ] });
216
+ }
205
217
  if (isRegionsError) {
206
218
  throw regionsError;
207
219
  }
@@ -338,7 +350,7 @@ var getDefaultValues = (prices) => {
338
350
  };
339
351
 
340
352
  // src/pages/locations/location-service-zone-shipping-option-pricing/location-service-zone-shipping-option-pricing.tsx
341
- import { jsx as jsx2 } from "react/jsx-runtime";
353
+ import { Fragment as Fragment2, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
342
354
  function LocationServiceZoneShippingOptionPricing() {
343
355
  const { t } = useTranslation2();
344
356
  const { so_id, location_id } = useParams();
@@ -348,17 +360,29 @@ function LocationServiceZoneShippingOptionPricing() {
348
360
  { status: 404, headers: { "Content-Type": "application/json" } }
349
361
  );
350
362
  }
363
+ const canViewShippingOptions = useCan2("shipping_options");
351
364
  const {
352
365
  shipping_option: shippingOption,
353
366
  isError,
354
367
  error
355
- } = useShippingOption(so_id, {
356
- fields: "*prices,*prices.price_rules"
357
- });
358
- if (isError) {
368
+ } = useShippingOption(
369
+ so_id,
370
+ {
371
+ fields: "*prices,*prices.price_rules"
372
+ },
373
+ { enabled: canViewShippingOptions }
374
+ );
375
+ const forbidden = !canViewShippingOptions || isForbidden2(error);
376
+ if (isError && !forbidden) {
359
377
  throw error;
360
378
  }
361
- return /* @__PURE__ */ jsx2(RouteFocusModal, { prev: `/settings/locations/${location_id}`, "data-testid": "location-shipping-option-pricing-modal", children: shippingOption && /* @__PURE__ */ jsx2(EditShippingOptionsPricingForm, { shippingOption }) });
379
+ return /* @__PURE__ */ jsxs2(RouteFocusModal, { prev: `/settings/locations/${location_id}`, "data-testid": "location-shipping-option-pricing-modal", children: [
380
+ forbidden && /* @__PURE__ */ jsxs2(Fragment2, { children: [
381
+ /* @__PURE__ */ jsx2(RouteFocusModal.Header, {}),
382
+ /* @__PURE__ */ jsx2(RouteFocusModal.Body, { children: /* @__PURE__ */ jsx2(SectionNoAccess2, {}) })
383
+ ] }),
384
+ !forbidden && shippingOption && /* @__PURE__ */ jsx2(EditShippingOptionsPricingForm, { shippingOption })
385
+ ] });
362
386
  }
363
387
  export {
364
388
  LocationServiceZoneShippingOptionPricing as Component
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  AvatarBox
3
3
  } from "./chunk-CP5IL4P6.js";
4
+ import "./chunk-U2EI2ZLM.js";
4
5
  import {
5
6
  isFetchError
6
7
  } from "./chunk-C6SUTRP2.js";
7
- import "./chunk-U2EI2ZLM.js";
8
8
  import {
9
9
  Form
10
10
  } from "./chunk-3QSRE5LS.js";
11
- import "./chunk-MXM5ZD4Y.js";
11
+ import "./chunk-W5U6NPSN.js";
12
12
  import {
13
13
  useSignInWithEmailPass
14
14
  } from "./chunk-DSQRFZCO.js";
@@ -21,7 +21,7 @@ import "./chunk-AQHEU7OA.js";
21
21
  import "./chunk-JW5SGRFC.js";
22
22
  import "./chunk-AEBQQ2EG.js";
23
23
  import "./chunk-CMVQ5SAG.js";
24
- import "./chunk-2NOIR4BR.js";
24
+ import "./chunk-AZV22U4V.js";
25
25
  import "./chunk-2SCR7R3C.js";
26
26
  import "./chunk-YMMREB3P.js";
27
27
  import "./chunk-UNS2F7DK.js";
@@ -1,6 +1,3 @@
1
- import {
2
- InfiniteList
3
- } from "./chunk-WMA3WTCM.js";
4
1
  import {
5
2
  RouteDrawer,
6
3
  useRouteModal
@@ -22,13 +19,15 @@ import "./chunk-NBMM2TZK.js";
22
19
 
23
20
  // src/pages/inventory/inventory-detail/components/manage-locations/manage-locations-drawer.tsx
24
21
  import { Heading } from "@medusajs/ui";
22
+ import { SectionNoAccess, useCan as useCan2 } from "@mercurjs/dashboard-shared";
25
23
  import { useTranslation as useTranslation3 } from "react-i18next";
26
24
  import { useParams } from "react-router-dom";
27
25
 
28
26
  // src/pages/inventory/inventory-detail/components/manage-locations/components/manage-locations-form.tsx
29
- import { Button, Text as Text2, toast } from "@medusajs/ui";
27
+ import { useCan } from "@mercurjs/dashboard-shared";
28
+ import { Button, Text as Text2, toast as toast2 } from "@medusajs/ui";
30
29
  import { useTranslation as useTranslation2 } from "react-i18next";
31
- import { useMemo, useState as useState2 } from "react";
30
+ import { useMemo as useMemo2, useState as useState2 } from "react";
32
31
 
33
32
  // src/pages/inventory/inventory-detail/components/manage-locations/components/location-item.tsx
34
33
  import { Checkbox, Text, clx } from "@medusajs/ui";
@@ -107,13 +106,127 @@ var LocationSearchInput = ({
107
106
  ) });
108
107
  };
109
108
 
110
- // src/pages/inventory/inventory-detail/components/manage-locations/components/manage-locations-form.tsx
109
+ // src/components/common/infinite-list/infinite-list.tsx
110
+ import { useInfiniteQuery } from "@tanstack/react-query";
111
+ import { useEffect as useEffect2, useMemo, useRef } from "react";
112
+ import { toast } from "@medusajs/ui";
113
+ import { Spinner } from "@medusajs/icons";
111
114
  import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
115
+ var InfiniteList = ({
116
+ queryKey,
117
+ queryFn,
118
+ queryOptions,
119
+ renderItem,
120
+ renderEmpty,
121
+ responseKey,
122
+ pageSize = 20
123
+ }) => {
124
+ const {
125
+ data,
126
+ error,
127
+ fetchNextPage,
128
+ fetchPreviousPage,
129
+ hasPreviousPage,
130
+ hasNextPage,
131
+ isFetching,
132
+ isPending
133
+ } = useInfiniteQuery({
134
+ queryKey,
135
+ queryFn: async ({ pageParam = 0 }) => {
136
+ return await queryFn({
137
+ limit: pageSize,
138
+ offset: pageParam
139
+ });
140
+ },
141
+ initialPageParam: 0,
142
+ maxPages: 5,
143
+ getNextPageParam: (lastPage) => {
144
+ const moreItemsExist = lastPage.count > lastPage.offset + lastPage.limit;
145
+ return moreItemsExist ? lastPage.offset + lastPage.limit : void 0;
146
+ },
147
+ getPreviousPageParam: (firstPage) => {
148
+ const moreItemsExist = firstPage.offset !== 0;
149
+ return moreItemsExist ? Math.max(firstPage.offset - firstPage.limit, 0) : void 0;
150
+ },
151
+ ...queryOptions
152
+ });
153
+ const items = useMemo(() => {
154
+ return data?.pages.flatMap((p) => p[responseKey]) ?? [];
155
+ }, [data, responseKey]);
156
+ const parentRef = useRef(null);
157
+ const startObserver = useRef();
158
+ const endObserver = useRef();
159
+ const fetchNextPageRef = useRef(fetchNextPage);
160
+ const fetchPreviousPageRef = useRef(fetchPreviousPage);
161
+ useEffect2(() => {
162
+ fetchNextPageRef.current = fetchNextPage;
163
+ fetchPreviousPageRef.current = fetchPreviousPage;
164
+ }, [fetchNextPage, fetchPreviousPage]);
165
+ useEffect2(() => {
166
+ if (isPending) {
167
+ return;
168
+ }
169
+ if (!isFetching) {
170
+ startObserver.current = new IntersectionObserver(
171
+ (entries) => {
172
+ if (entries[0].isIntersecting && hasPreviousPage) {
173
+ startObserver.current?.disconnect();
174
+ fetchPreviousPageRef.current();
175
+ }
176
+ },
177
+ {
178
+ threshold: 0.5
179
+ }
180
+ );
181
+ endObserver.current = new IntersectionObserver(
182
+ (entries) => {
183
+ if (entries[0].isIntersecting && hasNextPage) {
184
+ endObserver.current?.disconnect();
185
+ fetchNextPageRef.current();
186
+ }
187
+ },
188
+ {
189
+ threshold: 0.5
190
+ }
191
+ );
192
+ if (parentRef.current?.firstChild) {
193
+ startObserver.current?.observe(parentRef.current.firstChild);
194
+ }
195
+ if (parentRef.current?.lastChild) {
196
+ endObserver.current?.observe(parentRef.current.lastChild);
197
+ }
198
+ }
199
+ return () => {
200
+ startObserver.current?.disconnect();
201
+ endObserver.current?.disconnect();
202
+ };
203
+ }, [
204
+ hasNextPage,
205
+ hasPreviousPage,
206
+ isFetching,
207
+ isPending
208
+ ]);
209
+ useEffect2(() => {
210
+ if (error) {
211
+ toast.error(error.message);
212
+ }
213
+ }, [error]);
214
+ if (isPending) {
215
+ return /* @__PURE__ */ jsx3("div", { className: "flex h-full flex-col items-center justify-center", children: /* @__PURE__ */ jsx3(Spinner, { className: "animate-spin" }) });
216
+ }
217
+ return /* @__PURE__ */ jsxs2("div", { ref: parentRef, className: "h-full", children: [
218
+ items?.length ? items.map((item) => /* @__PURE__ */ jsx3("div", { children: renderItem(item) }, item.id)) : renderEmpty(),
219
+ isFetching && /* @__PURE__ */ jsx3("div", { className: "flex flex-col items-center justify-center py-4", children: /* @__PURE__ */ jsx3(Spinner, { className: "animate-spin" }) })
220
+ ] });
221
+ };
222
+
223
+ // src/pages/inventory/inventory-detail/components/manage-locations/components/manage-locations-form.tsx
224
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
112
225
  var ManageLocationsForm = ({
113
226
  item,
114
227
  sellerId
115
228
  }) => {
116
- const existingLocationLevels = useMemo(
229
+ const existingLocationLevels = useMemo2(
117
230
  () => new Set(item.location_levels?.map((l) => l.location_id) ?? []),
118
231
  [item.location_levels]
119
232
  );
@@ -123,7 +236,11 @@ var ManageLocationsForm = ({
123
236
  const [selectedLocationIds, setSelectedLocationIds] = useState2(
124
237
  existingLocationLevels
125
238
  );
126
- const { count } = useStockLocations({ limit: 1, fields: "id" });
239
+ const canViewLocations = useCan("stock_locations");
240
+ const { count } = useStockLocations(
241
+ { limit: 1, fields: "id" },
242
+ { enabled: canViewLocations }
243
+ );
127
244
  const handleLocationSelect = (locationId, selected) => {
128
245
  setSelectedLocationIds((prev) => {
129
246
  const newSet = new Set(prev);
@@ -153,32 +270,32 @@ var ManageLocationsForm = ({
153
270
  },
154
271
  {
155
272
  onSuccess: () => {
156
- toast.success(t("inventory.toast.updateLocations"));
273
+ toast2.success(t("inventory.toast.updateLocations"));
157
274
  handleSuccess();
158
275
  },
159
276
  onError: (e) => {
160
- toast.error(e.message);
277
+ toast2.error(e.message);
161
278
  }
162
279
  }
163
280
  );
164
281
  };
165
- return /* @__PURE__ */ jsxs2("div", { className: "flex flex-1 flex-col overflow-hidden", "data-testid": "inventory-manage-locations-form", children: [
166
- /* @__PURE__ */ jsxs2(RouteDrawer.Body, { className: "flex flex-1 flex-col gap-y-4 overflow-auto", "data-testid": "inventory-manage-locations-form-body", children: [
167
- /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle shadow-elevation-card-rest grid grid-rows-2 divide-y rounded-lg border", "data-testid": "inventory-manage-locations-form-item-info", children: [
168
- /* @__PURE__ */ jsxs2("div", { className: "grid grid-cols-2 divide-x", "data-testid": "inventory-manage-locations-form-item-title-row", children: [
169
- /* @__PURE__ */ jsx3(Text2, { className: "px-2 py-1.5", size: "small", leading: "compact", "data-testid": "inventory-manage-locations-form-item-title-label", children: t("fields.title") }),
170
- /* @__PURE__ */ jsx3(Text2, { className: "px-2 py-1.5", size: "small", leading: "compact", "data-testid": "inventory-manage-locations-form-item-title-value", children: item.title ?? "-" })
282
+ return /* @__PURE__ */ jsxs3("div", { className: "flex flex-1 flex-col overflow-hidden", "data-testid": "inventory-manage-locations-form", children: [
283
+ /* @__PURE__ */ jsxs3(RouteDrawer.Body, { className: "flex flex-1 flex-col gap-y-4 overflow-auto", "data-testid": "inventory-manage-locations-form-body", children: [
284
+ /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle shadow-elevation-card-rest grid grid-rows-2 divide-y rounded-lg border", "data-testid": "inventory-manage-locations-form-item-info", children: [
285
+ /* @__PURE__ */ jsxs3("div", { className: "grid grid-cols-2 divide-x", "data-testid": "inventory-manage-locations-form-item-title-row", children: [
286
+ /* @__PURE__ */ jsx4(Text2, { className: "px-2 py-1.5", size: "small", leading: "compact", "data-testid": "inventory-manage-locations-form-item-title-label", children: t("fields.title") }),
287
+ /* @__PURE__ */ jsx4(Text2, { className: "px-2 py-1.5", size: "small", leading: "compact", "data-testid": "inventory-manage-locations-form-item-title-value", children: item.title ?? "-" })
171
288
  ] }),
172
- /* @__PURE__ */ jsxs2("div", { className: "grid grid-cols-2 divide-x", "data-testid": "inventory-manage-locations-form-item-sku-row", children: [
173
- /* @__PURE__ */ jsx3(Text2, { className: "px-2 py-1.5", size: "small", leading: "compact", "data-testid": "inventory-manage-locations-form-item-sku-label", children: t("fields.sku") }),
174
- /* @__PURE__ */ jsx3(Text2, { className: "px-2 py-1.5", size: "small", leading: "compact", "data-testid": "inventory-manage-locations-form-item-sku-value", children: item.sku })
289
+ /* @__PURE__ */ jsxs3("div", { className: "grid grid-cols-2 divide-x", "data-testid": "inventory-manage-locations-form-item-sku-row", children: [
290
+ /* @__PURE__ */ jsx4(Text2, { className: "px-2 py-1.5", size: "small", leading: "compact", "data-testid": "inventory-manage-locations-form-item-sku-label", children: t("fields.sku") }),
291
+ /* @__PURE__ */ jsx4(Text2, { className: "px-2 py-1.5", size: "small", leading: "compact", "data-testid": "inventory-manage-locations-form-item-sku-value", children: item.sku })
175
292
  ] })
176
293
  ] }),
177
- /* @__PURE__ */ jsxs2("div", { className: "flex flex-col", "data-testid": "inventory-manage-locations-form-header", children: [
178
- /* @__PURE__ */ jsx3(Text2, { size: "small", weight: "plus", leading: "compact", "data-testid": "inventory-manage-locations-form-header-title", children: t("locations.domain") }),
179
- /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle flex w-full justify-between", "data-testid": "inventory-manage-locations-form-header-info", children: [
180
- /* @__PURE__ */ jsx3(Text2, { size: "small", leading: "compact", "data-testid": "inventory-manage-locations-form-header-label", children: t("locations.selectLocations") }),
181
- /* @__PURE__ */ jsxs2(Text2, { size: "small", leading: "compact", "data-testid": "inventory-manage-locations-form-header-count", children: [
294
+ /* @__PURE__ */ jsxs3("div", { className: "flex flex-col", "data-testid": "inventory-manage-locations-form-header", children: [
295
+ /* @__PURE__ */ jsx4(Text2, { size: "small", weight: "plus", leading: "compact", "data-testid": "inventory-manage-locations-form-header-title", children: t("locations.domain") }),
296
+ /* @__PURE__ */ jsxs3("div", { className: "text-ui-fg-subtle flex w-full justify-between", "data-testid": "inventory-manage-locations-form-header-info", children: [
297
+ /* @__PURE__ */ jsx4(Text2, { size: "small", leading: "compact", "data-testid": "inventory-manage-locations-form-header-label", children: t("locations.selectLocations") }),
298
+ /* @__PURE__ */ jsxs3(Text2, { size: "small", leading: "compact", "data-testid": "inventory-manage-locations-form-header-count", children: [
182
299
  "(",
183
300
  t("general.countOfTotalSelected", {
184
301
  count: selectedLocationIds.size,
@@ -188,14 +305,14 @@ var ManageLocationsForm = ({
188
305
  ] })
189
306
  ] })
190
307
  ] }),
191
- /* @__PURE__ */ jsx3("div", { "data-testid": "inventory-manage-locations-form-search-wrapper", children: /* @__PURE__ */ jsx3(
308
+ /* @__PURE__ */ jsx4("div", { "data-testid": "inventory-manage-locations-form-search-wrapper", children: /* @__PURE__ */ jsx4(
192
309
  LocationSearchInput,
193
310
  {
194
311
  onSearchChange: setSearchQuery,
195
312
  placeholder: t("general.search")
196
313
  }
197
314
  ) }),
198
- /* @__PURE__ */ jsx3("div", { className: "min-h-0 flex-1", "data-testid": "inventory-manage-locations-form-locations-list", children: /* @__PURE__ */ jsx3(
315
+ /* @__PURE__ */ jsx4("div", { className: "min-h-0 flex-1", "data-testid": "inventory-manage-locations-form-locations-list", children: /* @__PURE__ */ jsx4(
199
316
  InfiniteList,
200
317
  {
201
318
  queryKey: ["stock-locations", searchQuery, sellerId ?? "all"],
@@ -209,7 +326,7 @@ var ManageLocationsForm = ({
209
326
  return response;
210
327
  },
211
328
  responseKey: "stock_locations",
212
- renderItem: (location) => /* @__PURE__ */ jsx3("div", { className: "pb-2 last:pb-0", children: /* @__PURE__ */ jsx3(
329
+ renderItem: (location) => /* @__PURE__ */ jsx4("div", { className: "pb-2 last:pb-0", children: /* @__PURE__ */ jsx4(
213
330
  LocationItem,
214
331
  {
215
332
  selected: selectedLocationIds.has(location.id),
@@ -217,20 +334,20 @@ var ManageLocationsForm = ({
217
334
  onSelect: (selected) => handleLocationSelect(location.id, selected)
218
335
  }
219
336
  ) }),
220
- renderEmpty: () => /* @__PURE__ */ jsx3("div", { className: "flex items-center justify-center py-8", "data-testid": "inventory-manage-locations-form-empty-state", children: /* @__PURE__ */ jsx3(Text2, { size: "small", className: "text-ui-fg-subtle", "data-testid": "inventory-manage-locations-form-empty-state-text", children: searchQuery ? t("locations.noLocationsFound") : t("locations.noLocationsFound") }) }),
337
+ renderEmpty: () => /* @__PURE__ */ jsx4("div", { className: "flex items-center justify-center py-8", "data-testid": "inventory-manage-locations-form-empty-state", children: /* @__PURE__ */ jsx4(Text2, { size: "small", className: "text-ui-fg-subtle", "data-testid": "inventory-manage-locations-form-empty-state-text", children: searchQuery ? t("locations.noLocationsFound") : t("locations.noLocationsFound") }) }),
221
338
  pageSize: 20
222
339
  }
223
340
  ) })
224
341
  ] }),
225
- /* @__PURE__ */ jsx3(RouteDrawer.Footer, { "data-testid": "inventory-manage-locations-form-footer", children: /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-end gap-x-2", "data-testid": "inventory-manage-locations-form-footer-actions", children: [
226
- /* @__PURE__ */ jsx3(RouteDrawer.Close, { asChild: true, "data-testid": "inventory-manage-locations-form-cancel-button-wrapper", children: /* @__PURE__ */ jsx3(Button, { variant: "secondary", size: "small", "data-testid": "inventory-manage-locations-form-cancel-button", children: t("actions.cancel") }) }),
227
- /* @__PURE__ */ jsx3(Button, { onClick: handleSubmit, size: "small", isLoading: false, "data-testid": "inventory-manage-locations-form-save-button", children: t("actions.save") })
342
+ /* @__PURE__ */ jsx4(RouteDrawer.Footer, { "data-testid": "inventory-manage-locations-form-footer", children: /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-end gap-x-2", "data-testid": "inventory-manage-locations-form-footer-actions", children: [
343
+ /* @__PURE__ */ jsx4(RouteDrawer.Close, { asChild: true, "data-testid": "inventory-manage-locations-form-cancel-button-wrapper", children: /* @__PURE__ */ jsx4(Button, { variant: "secondary", size: "small", "data-testid": "inventory-manage-locations-form-cancel-button", children: t("actions.cancel") }) }),
344
+ /* @__PURE__ */ jsx4(Button, { onClick: handleSubmit, size: "small", isLoading: false, "data-testid": "inventory-manage-locations-form-save-button", children: t("actions.save") })
228
345
  ] }) })
229
346
  ] });
230
347
  };
231
348
 
232
349
  // src/pages/inventory/inventory-detail/components/manage-locations/manage-locations-drawer.tsx
233
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
350
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
234
351
  var ManageLocationsDrawer = () => {
235
352
  const { id } = useParams();
236
353
  const { t } = useTranslation3();
@@ -242,15 +359,20 @@ var ManageLocationsDrawer = () => {
242
359
  } = useInventoryItem(id, {
243
360
  fields: "id,sku,title,*location_levels,offers.seller_id"
244
361
  });
245
- const { stock_locations, isLoading: loadingLocations } = useStockLocations();
362
+ const canViewLocations = useCan2("stock_locations");
363
+ const { stock_locations, isLoading: loadingLocations } = useStockLocations(
364
+ void 0,
365
+ { enabled: canViewLocations }
366
+ );
246
367
  const ready = !isLoading && !loadingLocations && inventoryItem && stock_locations;
247
368
  if (isError) {
248
369
  throw error;
249
370
  }
250
371
  const sellerId = inventoryItem?.offers?.[0]?.seller_id;
251
- return /* @__PURE__ */ jsxs3(RouteDrawer, { "data-testid": "inventory-manage-locations-drawer", children: [
252
- /* @__PURE__ */ jsx4(RouteDrawer.Header, { "data-testid": "inventory-manage-locations-drawer-header", children: /* @__PURE__ */ jsx4(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx4(Heading, { "data-testid": "inventory-manage-locations-drawer-title", children: t("inventory.manageLocations") }) }) }),
253
- ready && /* @__PURE__ */ jsx4(
372
+ return /* @__PURE__ */ jsxs4(RouteDrawer, { "data-testid": "inventory-manage-locations-drawer", children: [
373
+ /* @__PURE__ */ jsx5(RouteDrawer.Header, { "data-testid": "inventory-manage-locations-drawer-header", children: /* @__PURE__ */ jsx5(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx5(Heading, { "data-testid": "inventory-manage-locations-drawer-title", children: t("inventory.manageLocations") }) }) }),
374
+ !canViewLocations && /* @__PURE__ */ jsx5(SectionNoAccess, {}),
375
+ ready && /* @__PURE__ */ jsx5(
254
376
  ManageLocationsForm,
255
377
  {
256
378
  item: inventoryItem,
@@ -13,15 +13,16 @@ import {
13
13
  useRouteModal
14
14
  } from "./chunk-FWJLS7XD.js";
15
15
  import "./chunk-3QSRE5LS.js";
16
+ import "./chunk-LAVHRER2.js";
16
17
  import "./chunk-THHRRYRS.js";
17
18
  import "./chunk-FQERBIVS.js";
18
19
  import {
19
20
  _DataTable,
20
21
  useDataTable
21
- } from "./chunk-ZOU25JF6.js";
22
+ } from "./chunk-SU36MZXC.js";
22
23
  import "./chunk-YN3FGNJM.js";
23
24
  import "./chunk-ZAOEFQ6K.js";
24
- import "./chunk-IKAUNMRC.js";
25
+ import "./chunk-4J74G7N2.js";
25
26
  import "./chunk-EIWPJWKF.js";
26
27
  import "./chunk-46WEBDVJ.js";
27
28
  import {
@@ -35,7 +36,6 @@ import {
35
36
  pricePreferencesQueryKeys,
36
37
  usePricePreferences
37
38
  } from "./chunk-FHZHKIWI.js";
38
- import "./chunk-LAVHRER2.js";
39
39
  import "./chunk-Y7QKP6QU.js";
40
40
  import "./chunk-INNFZYX2.js";
41
41
  import {
@@ -45,6 +45,13 @@ import "./chunk-ZA2KFUFR.js";
45
45
  import "./chunk-DTGEFKK4.js";
46
46
  import "./chunk-NBMM2TZK.js";
47
47
 
48
+ // src/pages/marketplace/marketplace-add-currencies/marketplace-add-currencies.tsx
49
+ import {
50
+ SectionNoAccess as SectionNoAccess2,
51
+ isForbidden as isForbidden2,
52
+ usePermissions
53
+ } from "@mercurjs/dashboard-shared";
54
+
48
55
  // src/pages/marketplace/marketplace-add-currencies/components/add-currencies-form/add-currencies-form.tsx
49
56
  import { Button, Checkbox, Hint, Switch, toast, Tooltip } from "@medusajs/ui";
50
57
  import {
@@ -54,9 +61,10 @@ import { useCallback, useMemo, useState } from "react";
54
61
  import { useTranslation } from "react-i18next";
55
62
  import * as zod from "zod";
56
63
  import { zodResolver } from "@hookform/resolvers/zod";
64
+ import { SectionNoAccess, isForbidden } from "@mercurjs/dashboard-shared";
57
65
  import { keepPreviousData } from "@tanstack/react-query";
58
66
  import { useForm } from "react-hook-form";
59
- import { jsx, jsxs } from "react/jsx-runtime";
67
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
60
68
  var AddCurrenciesSchema = zod.object({
61
69
  currencies: zod.array(zod.string()).min(1),
62
70
  pricePreferences: zod.record(zod.boolean())
@@ -164,6 +172,12 @@ var AddCurrenciesForm = ({
164
172
  }
165
173
  );
166
174
  });
175
+ if (isForbidden(error)) {
176
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
177
+ /* @__PURE__ */ jsx(RouteFocusModal.Header, {}),
178
+ /* @__PURE__ */ jsx(RouteFocusModal.Body, { children: /* @__PURE__ */ jsx(SectionNoAccess, {}) })
179
+ ] });
180
+ }
167
181
  if (isError) {
168
182
  throw error;
169
183
  }
@@ -272,8 +286,11 @@ var useColumns = (pricePreferences, setPricePreferences) => {
272
286
  };
273
287
 
274
288
  // src/pages/marketplace/marketplace-add-currencies/marketplace-add-currencies.tsx
275
- import { jsx as jsx2 } from "react/jsx-runtime";
289
+ import { Fragment as Fragment2, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
276
290
  var MarketplaceAddCurrencies = () => {
291
+ const { can } = usePermissions();
292
+ const canViewCurrencies = can("regions");
293
+ const canViewPreferences = can("price_preferences");
277
294
  const { store, isPending, isError, error } = useStore();
278
295
  const {
279
296
  price_preferences: pricePreferences,
@@ -286,17 +303,24 @@ var MarketplaceAddCurrencies = () => {
286
303
  value: store?.supported_currencies?.map((c) => c.currency_code)
287
304
  },
288
305
  {
289
- enabled: !!store
306
+ enabled: !!store && canViewPreferences
290
307
  }
291
308
  );
292
- const ready = !!store && !isPending && !!pricePreferences && !isPricePreferencesPending;
309
+ const forbidden = !canViewCurrencies || !canViewPreferences || isForbidden2(pricePreferencesError);
310
+ const ready = !forbidden && !!store && !isPending && !!pricePreferences && !isPricePreferencesPending;
293
311
  if (isError) {
294
312
  throw error;
295
313
  }
296
- if (isPricePreferencesError) {
314
+ if (isPricePreferencesError && !forbidden) {
297
315
  throw pricePreferencesError;
298
316
  }
299
- return /* @__PURE__ */ jsx2(RouteFocusModal, { children: ready && /* @__PURE__ */ jsx2(AddCurrenciesForm, { store, pricePreferences }) });
317
+ return /* @__PURE__ */ jsxs2(RouteFocusModal, { children: [
318
+ forbidden && /* @__PURE__ */ jsxs2(Fragment2, { children: [
319
+ /* @__PURE__ */ jsx2(RouteFocusModal.Header, {}),
320
+ /* @__PURE__ */ jsx2(RouteFocusModal.Body, { children: /* @__PURE__ */ jsx2(SectionNoAccess2, {}) })
321
+ ] }),
322
+ ready && /* @__PURE__ */ jsx2(AddCurrenciesForm, { store, pricePreferences })
323
+ ] });
300
324
  };
301
325
  export {
302
326
  MarketplaceAddCurrencies as Component
@@ -1,21 +1,23 @@
1
1
  import {
2
2
  MarketplaceDetailPage
3
- } from "./chunk-PFQO7UQG.js";
3
+ } from "./chunk-AW4RL2SA.js";
4
4
  import "./chunk-64XMEZ5A.js";
5
5
  import "./chunk-JHIMVLB2.js";
6
6
  import "./chunk-DB6ANJBO.js";
7
7
  import "./chunk-PHOCVOZ5.js";
8
+ import "./chunk-LAVHRER2.js";
8
9
  import "./chunk-E74OUNA3.js";
9
10
  import "./chunk-H6MYB7GB.js";
10
11
  import "./chunk-THHRRYRS.js";
11
12
  import "./chunk-FQERBIVS.js";
12
- import "./chunk-ZOU25JF6.js";
13
+ import "./chunk-SU36MZXC.js";
13
14
  import "./chunk-YN3FGNJM.js";
14
15
  import "./chunk-ZAOEFQ6K.js";
15
- import "./chunk-IKAUNMRC.js";
16
+ import "./chunk-4J74G7N2.js";
16
17
  import "./chunk-EIWPJWKF.js";
17
18
  import "./chunk-46WEBDVJ.js";
18
- import "./chunk-MXM5ZD4Y.js";
19
+ import "./chunk-3UOYBH5O.js";
20
+ import "./chunk-W5U6NPSN.js";
19
21
  import "./chunk-DSQRFZCO.js";
20
22
  import "./chunk-LHE6LM6S.js";
21
23
  import "./chunk-BOPIWKTU.js";
@@ -26,7 +28,7 @@ import "./chunk-AQHEU7OA.js";
26
28
  import "./chunk-JW5SGRFC.js";
27
29
  import "./chunk-AEBQQ2EG.js";
28
30
  import "./chunk-CMVQ5SAG.js";
29
- import "./chunk-2NOIR4BR.js";
31
+ import "./chunk-AZV22U4V.js";
30
32
  import "./chunk-2SCR7R3C.js";
31
33
  import "./chunk-YMMREB3P.js";
32
34
  import "./chunk-UNS2F7DK.js";
@@ -45,11 +47,9 @@ import "./chunk-DYCCRR7B.js";
45
47
  import "./chunk-OQ2J45XW.js";
46
48
  import "./chunk-XWOFQSGH.js";
47
49
  import "./chunk-HRMANL53.js";
48
- import "./chunk-BDGZ4EQO.js";
49
50
  import "./chunk-JC2FFAMW.js";
50
51
  import "./chunk-OFW63WXL.js";
51
52
  import "./chunk-SQ7J4KTS.js";
52
- import "./chunk-LAVHRER2.js";
53
53
  import "./chunk-Y7QKP6QU.js";
54
54
  import "./chunk-INNFZYX2.js";
55
55
  import "./chunk-Z476HUMI.js";