@mercurjs/admin 2.3.6-canary.5 → 2.3.6-canary.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (254) hide show
  1. package/dist/{add-campaign-promotions-6OB7BUPK.js → add-campaign-promotions-LGCLOFOD.js} +13 -8
  2. package/dist/{adjust-inventory-32UZ4BZC.js → adjust-inventory-H46YCNLT.js} +7 -2
  3. package/dist/{api-key-management-detail-P5C3F2D7.js → api-key-management-detail-Z4KSJHUC.js} +5 -7
  4. package/dist/{api-key-management-list-XV66E2LA.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-UWLP2DZY.js → attribute-create-OFTZRQCO.js} +3 -2
  7. package/dist/{attribute-detail-KUJ337KW.js → attribute-detail-WVN5KOH2.js} +15 -9
  8. package/dist/{attribute-list-FLTRNSFI.js → attribute-list-ZC3CG5LS.js} +6 -6
  9. package/dist/{campaign-detail-4IEM5BGI.js → campaign-detail-MGDL2TQC.js} +10 -10
  10. package/dist/{campaign-list-ZRUBHJEA.js → campaign-list-XCO4FJDZ.js} +5 -5
  11. package/dist/{categories-metadata-6F6EFZRQ.js → categories-metadata-QYH5U77W.js} +2 -2
  12. package/dist/{category-detail-3YY7FVY4.js → category-detail-FAP76OQB.js} +7 -8
  13. package/dist/{category-list-LESUC6ZK.js → category-list-XDOYTQ4X.js} +6 -6
  14. package/dist/{category-products-RTOFMB25.js → category-products-35ZZYVWJ.js} +12 -5
  15. package/dist/{chunk-NIDM2VQO.js → chunk-23CSVCQK.js} +28 -17
  16. package/dist/{chunk-DUFGVZ6H.js → chunk-25TWJMWE.js} +2 -2
  17. package/dist/{chunk-VTXMQTXK.js → chunk-26REB3B6.js} +4 -3
  18. package/dist/{chunk-5EGLQSSH.js → chunk-2IOADJUM.js} +29 -11
  19. package/dist/{chunk-ZH6TIKKW.js → chunk-2MOTQNEG.js} +1 -0
  20. package/dist/{chunk-YHWDMARX.js → chunk-2XBNM6TM.js} +4 -4
  21. package/dist/{chunk-XGB456O5.js → chunk-3BKRMIWA.js} +23 -12
  22. package/dist/chunk-3UOYBH5O.js +8 -0
  23. package/dist/{chunk-XAF7FKWZ.js → chunk-473QGQSA.js} +8 -5
  24. package/dist/{chunk-JCRDVMIA.js → chunk-4AOVNA5G.js} +31 -20
  25. package/dist/{chunk-EWDBPCX7.js → chunk-4J4JAXXQ.js} +7 -5
  26. package/dist/{chunk-IKAUNMRC.js → chunk-4J74G7N2.js} +15 -3
  27. package/dist/{chunk-WIDHYDJQ.js → chunk-4JQDYQSX.js} +20 -10
  28. package/dist/{chunk-5CKBM4RI.js → chunk-4W77EUYY.js} +6 -4
  29. package/dist/{chunk-XABVCD7R.js → chunk-5K4WEF2N.js} +21 -10
  30. package/dist/{chunk-AGO4ROOR.js → chunk-5OIFUF7R.js} +1 -1
  31. package/dist/{chunk-S4WDCOQD.js → chunk-5QW3GY37.js} +27 -14
  32. package/dist/{chunk-OZKHBVDV.js → chunk-72DFLNNI.js} +11 -5
  33. package/dist/{chunk-7QZFRDTU.js → chunk-7GCMYYFL.js} +7 -4
  34. package/dist/{chunk-AYKMFPKF.js → chunk-7LUKMT5J.js} +4 -2
  35. package/dist/{chunk-I6HCTKMK.js → chunk-7OTRTHLL.js} +6 -4
  36. package/dist/{chunk-IZ77JV46.js → chunk-AUCCE46Q.js} +6 -3
  37. package/dist/{chunk-PFQO7UQG.js → chunk-AW4RL2SA.js} +60 -33
  38. package/dist/{chunk-62YRQVR7.js → chunk-AZV22U4V.js} +20 -5
  39. package/dist/{chunk-VYSTJIAD.js → chunk-CX5XB56X.js} +4 -3
  40. package/dist/{chunk-J4SYK3RT.js → chunk-DGRHDZQO.js} +15 -5
  41. package/dist/{chunk-7UHN2CW7.js → chunk-DM52HEOD.js} +1 -1
  42. package/dist/{chunk-ZGNLAPV6.js → chunk-DUKOOIQD.js} +5 -4
  43. package/dist/{chunk-ACEEFNIX.js → chunk-DVFILGNQ.js} +9 -7
  44. package/dist/{chunk-DJ73BQSS.js → chunk-DWPBJEEM.js} +20 -7
  45. package/dist/{chunk-6ZMSV6PN.js → chunk-E43YJQ2B.js} +42 -18
  46. package/dist/{chunk-FCOYAYQE.js → chunk-EHLCUND7.js} +11 -9
  47. package/dist/{chunk-DBCNRZZE.js → chunk-EIPTLSNT.js} +3 -1
  48. package/dist/{chunk-UXA6RZMP.js → chunk-EVYQCNVT.js} +6 -4
  49. package/dist/{chunk-YM5X7CQL.js → chunk-FCAJQFYT.js} +32 -12
  50. package/dist/{chunk-VC2GAWL4.js → chunk-G63BL5AB.js} +7 -4
  51. package/dist/{chunk-BZPOERWW.js → chunk-GIV6KSQX.js} +18 -9
  52. package/dist/{chunk-O3RDRDCO.js → chunk-GQGCXLVP.js} +32 -13
  53. package/dist/{chunk-DDZPK7BW.js → chunk-GQYB3OOC.js} +107 -64
  54. package/dist/{chunk-IFG5ONPV.js → chunk-GZUXEIEB.js} +2 -2
  55. package/dist/{chunk-VOXWLJHA.js → chunk-H3TOETGJ.js} +11 -6
  56. package/dist/{chunk-7ASAC2FM.js → chunk-H4TJZB26.js} +26 -18
  57. package/dist/{chunk-26WXQ6LI.js → chunk-HHAM76HD.js} +43 -25
  58. package/dist/{chunk-XAQLGDAI.js → chunk-HPMMGA5B.js} +1 -1
  59. package/dist/{chunk-QK3HIMET.js → chunk-I3RGMOTM.js} +20 -12
  60. package/dist/{chunk-FS4E6GS6.js → chunk-IQRFJO4N.js} +5 -3
  61. package/dist/{chunk-LBFX6AVE.js → chunk-JFRYC6GK.js} +17 -10
  62. package/dist/{chunk-FOWWGEP7.js → chunk-JS2DAWKO.js} +9 -6
  63. package/dist/{chunk-KYVPZH3D.js → chunk-K6OBX6ZR.js} +7 -6
  64. package/dist/{chunk-V6UH5UQT.js → chunk-KB3BTLIB.js} +6 -4
  65. package/dist/{chunk-VIHLAFDA.js → chunk-KYOZ4CCY.js} +61 -29
  66. package/dist/{chunk-DOEBGZMA.js → chunk-LCUAIH7P.js} +6 -4
  67. package/dist/{chunk-5VHQX7Q3.js → chunk-M7VHCFCW.js} +9 -7
  68. package/dist/{chunk-EVCAR6GP.js → chunk-MAEUKXZ4.js} +8 -5
  69. package/dist/{chunk-RU5IUJC2.js → chunk-MFGLOUTZ.js} +32 -10
  70. package/dist/{chunk-HFCJJJKP.js → chunk-MKKOAF2W.js} +26 -12
  71. package/dist/{chunk-MQFPD5J4.js → chunk-MNKJHZZT.js} +10 -6
  72. package/dist/{chunk-XV4YW4GE.js → chunk-NDS246VB.js} +20 -12
  73. package/dist/{chunk-IHTYHAOC.js → chunk-NHZU2M7Z.js} +8 -6
  74. package/dist/{chunk-24JEBPKI.js → chunk-NJ2NRKAJ.js} +57 -14
  75. package/dist/{chunk-CFQX7HAW.js → chunk-OCDZIJBM.js} +11 -5
  76. package/dist/{chunk-GDFMWKL6.js → chunk-OGTWBHJC.js} +1 -1
  77. package/dist/{chunk-LXW3L56Z.js → chunk-Q2XWHI6K.js} +6 -3
  78. package/dist/{chunk-YWZQKODL.js → chunk-R55XYG6Y.js} +28 -15
  79. package/dist/{chunk-IKDIEJZC.js → chunk-RAD3UMQ3.js} +6 -4
  80. package/dist/{chunk-WA3UZTKD.js → chunk-RUGB47D3.js} +1 -1
  81. package/dist/{chunk-ZOU25JF6.js → chunk-SU36MZXC.js} +11 -3
  82. package/dist/{chunk-HGFMHWPB.js → chunk-SW46WBFA.js} +29 -14
  83. package/dist/{chunk-G7444ISU.js → chunk-SZSAJHN7.js} +6 -5
  84. package/dist/{chunk-GR7S7WTT.js → chunk-TPWSE5HE.js} +16 -11
  85. package/dist/{chunk-7ECQXPOG.js → chunk-TVCHVG2A.js} +3 -3
  86. package/dist/{chunk-ZPHVFD4N.js → chunk-TXZWIFWX.js} +1 -0
  87. package/dist/{chunk-HJACC6KV.js → chunk-UKQ6FES4.js} +6 -3
  88. package/dist/{chunk-AZMXFIDY.js → chunk-USEE6QNQ.js} +67 -27
  89. package/dist/{chunk-JL3NKSLJ.js → chunk-USO2SWZV.js} +9 -4
  90. package/dist/{chunk-7C7YLUYT.js → chunk-V3UQOU5W.js} +4 -2
  91. package/dist/{chunk-XXYVUV5F.js → chunk-VD2CKAYG.js} +21 -10
  92. package/dist/{chunk-D3KEKNYN.js → chunk-VHO6ZXW2.js} +9 -5
  93. package/dist/{chunk-C4XKPQ6T.js → chunk-VLNTJXXO.js} +16 -3
  94. package/dist/{chunk-D3RDR3D3.js → chunk-W3LCOK3O.js} +153 -124
  95. package/dist/{chunk-LFFWPZQK.js → chunk-WD5XBWAN.js} +120 -55
  96. package/dist/chunk-WSK532ZA.js +236 -0
  97. package/dist/chunk-XI4SB5YZ.js +2891 -0
  98. package/dist/{chunk-KMLQ2ENL.js → chunk-XNGTE2VC.js} +1 -1
  99. package/dist/{chunk-RFENVF7Y.js → chunk-XUOGIKEE.js} +3 -3
  100. package/dist/{chunk-R22UAHRF.js → chunk-YDESULL7.js} +3 -1
  101. package/dist/{chunk-AGQ2BWD4.js → chunk-YN4KTMRA.js} +9 -7
  102. package/dist/{chunk-IVWSTXBV.js → chunk-YUKJJHI7.js} +8 -5
  103. package/dist/{chunk-ZFPASY4R.js → chunk-Z2FX5GG4.js} +24 -12
  104. package/dist/{chunk-JQEAWWRP.js → chunk-ZPJOSHV7.js} +23 -12
  105. package/dist/{chunk-FX7HVGV5.js → chunk-ZQZFY3UY.js} +6 -4
  106. package/dist/{chunk-U2RBSUMY.js → chunk-ZU76OTV3.js} +2 -2
  107. package/dist/{collection-add-products-O5ILXKFY.js → collection-add-products-IIBLH7XQ.js} +12 -5
  108. package/dist/{collection-detail-CTXO7RMM.js → collection-detail-IYZKDR4L.js} +7 -8
  109. package/dist/{collection-list-MWXFS7UY.js → collection-list-EIDV4DEH.js} +12 -12
  110. package/dist/{collection-metadata-QUMWZABV.js → collection-metadata-IKYBHHEU.js} +2 -2
  111. package/dist/{commission-rule-create-CDLLQIY4.js → commission-rule-create-QDNXXBTV.js} +64 -30
  112. package/dist/{commission-rule-detail-LFEZ5U6V.js → commission-rule-detail-QYJIK375.js} +3 -5
  113. package/dist/{commission-rule-edit-5CFKPI7U.js → commission-rule-edit-HICDPDLK.js} +58 -24
  114. package/dist/{commissions-list-PQUFPRZK.js → commissions-list-AQUW636T.js} +6 -6
  115. package/dist/{customer-detail-ZYETGMFF.js → customer-detail-TBGKTNQQ.js} +8 -8
  116. package/dist/{customer-group-add-customers-XYWJSXKS.js → customer-group-add-customers-RWJOA2NJ.js} +3 -3
  117. package/dist/{customer-group-detail-RPDRZGPZ.js → customer-group-detail-47IPD337.js} +6 -7
  118. package/dist/{customer-group-list-MZ7H4XLD.js → customer-group-list-Q2AYIVO4.js} +6 -7
  119. package/dist/{customer-group-metadata-UQ2SCLOK.js → customer-group-metadata-T3WFBL7U.js} +2 -2
  120. package/dist/{customer-list-46W5PJR3.js → customer-list-JOPTF4QB.js} +5 -6
  121. package/dist/{customer-metadata-UEQSIGLT.js → customer-metadata-YSMWL4L3.js} +2 -2
  122. package/dist/{customers-add-customer-group-AZYAIQ7E.js → customers-add-customer-group-AVRYBS6Q.js} +13 -6
  123. package/dist/{edit-inventory-item-ENA2OFSQ.js → edit-inventory-item-7M7Q6HL4.js} +1 -1
  124. package/dist/{edit-inventory-item-attributes-Z26UDTSH.js → edit-inventory-item-attributes-E7J2WFPF.js} +1 -1
  125. package/dist/{edit-reservation-W3THLKKK.js → edit-reservation-S3QTQRPY.js} +11 -3
  126. package/dist/{edit-rules-3DCWA5UF.js → edit-rules-NRF7U4AT.js} +1 -1
  127. package/dist/home-KKOF4FWS.js +64 -0
  128. package/dist/index.css +3 -0
  129. package/dist/index.d.ts +10 -28
  130. package/dist/index.js +553 -3448
  131. package/dist/{inventory-detail-MMONC625.js → inventory-detail-U6TRGZRY.js} +7 -7
  132. package/dist/{inventory-list-FN7FCI4W.js → inventory-list-JWA7U2LB.js} +4 -5
  133. package/dist/{inventory-metadata-OGS7JMZ5.js → inventory-metadata-KO622YEI.js} +2 -2
  134. package/dist/{inventory-stock-LDBJQCJF.js → inventory-stock-WWXYVFK2.js} +20 -10
  135. package/dist/{location-detail-74247BA4.js → location-detail-27FBZML7.js} +4 -6
  136. package/dist/{location-fulfillment-providers-JGJOTGMZ.js → location-fulfillment-providers-XTYJWAVP.js} +19 -11
  137. package/dist/{location-list-JJN42JSH.js → location-list-RMHT36AO.js} +4 -6
  138. package/dist/{location-sales-channels-TNP3C7UW.js → location-sales-channels-JB5OIMXE.js} +13 -6
  139. package/dist/{location-service-zone-create-KPM4RSCF.js → location-service-zone-create-JKAKZCZ2.js} +3 -3
  140. package/dist/{location-service-zone-manage-areas-NW5JUTCH.js → location-service-zone-manage-areas-K2BMFI5Y.js} +3 -3
  141. package/dist/{location-service-zone-shipping-option-create-RYAIECRU.js → location-service-zone-shipping-option-create-WJOLO6A3.js} +3 -3
  142. package/dist/{location-service-zone-shipping-option-edit-UUIR7B5S.js → location-service-zone-shipping-option-edit-I7BJGH76.js} +23 -10
  143. package/dist/{location-service-zone-shipping-option-pricing-Z5HCXRHG.js → location-service-zone-shipping-option-pricing-47Y3CP4U.js} +36 -12
  144. package/dist/{login-2NBVRH4U.js → login-ISNIWXU2.js} +2 -2
  145. package/dist/{manage-locations-TCMY6A4J.js → manage-locations-5FKFNJQN.js} +13 -2
  146. package/dist/{marketplace-add-currencies-Z6FUIAU5.js → marketplace-add-currencies-34XKWMI7.js} +33 -9
  147. package/dist/{marketplace-detail-JSUMZVZS.js → marketplace-detail-A76FTENH.js} +6 -6
  148. package/dist/{marketplace-edit-G7YNGABC.js → marketplace-edit-KXKUECZQ.js} +61 -30
  149. package/dist/{marketplace-metadata-2TZTRDRJ.js → marketplace-metadata-364KJG43.js} +2 -2
  150. package/dist/{offer-detail-page-JGS52M66.js → offer-detail-page-BDDDZSPL.js} +22 -11
  151. package/dist/{offer-variant-detail-page-FVJE5WLV.js → offer-variant-detail-page-HQU4HMZH.js} +4 -5
  152. package/dist/{offers-6MDVGCJK.js → offers-OVX5AAQL.js} +7 -8
  153. package/dist/{order-create-claim-4CIL76V5.js → order-create-claim-4ERPSGPD.js} +105 -61
  154. package/dist/{order-create-edit-BFE4N7RN.js → order-create-edit-BGLNMKKI.js} +17 -10
  155. package/dist/{order-create-exchange-CBQ5PA6M.js → order-create-exchange-TOPPZZGS.js} +106 -62
  156. package/dist/{order-create-refund-ZWMXQGUA.js → order-create-refund-M3K5MZDM.js} +38 -23
  157. package/dist/{order-create-return-USO7AS7R.js → order-create-return-64GZ2LCL.js} +109 -70
  158. package/dist/{order-detail-U3HDRBBG.js → order-detail-DIUKR6ZJ.js} +8 -8
  159. package/dist/{order-edit-billing-address-V6QS5DYF.js → order-edit-billing-address-CCRTK5E2.js} +2 -2
  160. package/dist/{order-edit-email-AGJU7YHU.js → order-edit-email-V45SEUCO.js} +1 -1
  161. package/dist/{order-edit-shipping-address-TKLEEHOE.js → order-edit-shipping-address-45Z6TNHL.js} +1 -1
  162. package/dist/{order-list-L2WZX5ED.js → order-list-C7PHMQ64.js} +5 -5
  163. package/dist/{order-metadata-NVC3A3A5.js → order-metadata-7245QRUQ.js} +2 -2
  164. package/dist/{order-request-transfer-7EZX5UOQ.js → order-request-transfer-JYPDXCY2.js} +27 -13
  165. package/dist/pages/index.d.ts +2 -2
  166. package/dist/pages/index.js +89 -89
  167. package/dist/{payout-list-WZ6QMJJY.js → payout-list-KILGQ4XP.js} +3 -3
  168. package/dist/{price-list-create-RNVWVB5D.js → price-list-create-UZRCHVU7.js} +9 -9
  169. package/dist/{price-list-customer-availability-WU2OGO37.js → price-list-customer-availability-CQY55U4O.js} +31 -14
  170. package/dist/{price-list-detail-WHJKFDYZ.js → price-list-detail-IL7VSABK.js} +7 -8
  171. package/dist/{price-list-list-AM2GMQ7P.js → price-list-list-TD5JIO7L.js} +5 -5
  172. package/dist/{price-list-prices-add-ZDKNOJRU.js → price-list-prices-add-DSRYUJUT.js} +8 -8
  173. package/dist/{price-list-prices-edit-S4V5ACN3.js → price-list-prices-edit-WELHT4O4.js} +18 -9
  174. package/dist/{product-add-existing-attributes-VWM3LNIO.js → product-add-existing-attributes-RPIHTSCE.js} +7 -5
  175. package/dist/{product-create-NVAKRIPS.js → product-create-PMV3LO62.js} +9 -9
  176. package/dist/{product-detail-DZRYNPRT.js → product-detail-KVLZYO76.js} +7 -8
  177. package/dist/{product-edit-attribute-W3AS47FM.js → product-edit-attribute-URHTZ2EQ.js} +9 -3
  178. package/dist/{product-list-SYMPZR6W.js → product-list-M6B42KCG.js} +7 -8
  179. package/dist/{product-media-6XS74AU3.js → product-media-R2FIBFR5.js} +2 -2
  180. package/dist/{product-metadata-GKQUURAL.js → product-metadata-SC5BXN66.js} +2 -2
  181. package/dist/{product-organization-3PIQ4IY2.js → product-organization-BSPYZYZR.js} +87 -43
  182. package/dist/{product-sales-channels-PJNEIY4J.js → product-sales-channels-MNAFJKAI.js} +10 -5
  183. package/dist/{product-shipping-profile-SWB5FK7S.js → product-shipping-profile-G4NCDKSR.js} +25 -11
  184. package/dist/{product-tag-create-SYOFR5EK.js → product-tag-create-PX7Q2AXU.js} +1 -1
  185. package/dist/{product-tag-detail-HM2AWFGU.js → product-tag-detail-LXO43RMB.js} +12 -12
  186. package/dist/{product-tag-edit-FJPBCFBH.js → product-tag-edit-PXSZMCCT.js} +1 -1
  187. package/dist/{product-tag-list-OBV7CZZL.js → product-tag-list-XWTZGQTT.js} +12 -12
  188. package/dist/{product-tag-metadata-WQEGISQ5.js → product-tag-metadata-2SO7ICOZ.js} +2 -2
  189. package/dist/{product-type-detail-D3OYCXGR.js → product-type-detail-NO4PKFYQ.js} +7 -8
  190. package/dist/{product-type-list-LCLWJPIT.js → product-type-list-JXU3446J.js} +5 -5
  191. package/dist/{product-type-metadata-WCGB3U4N.js → product-type-metadata-7D3J3NSO.js} +2 -2
  192. package/dist/{product-variant-detail-7B26FRNG.js → product-variant-detail-VQ55W7PD.js} +3 -5
  193. package/dist/{product-variant-edit-UC34WTO7.js → product-variant-edit-3WSHMGDI.js} +1 -1
  194. package/dist/{product-variant-metadata-CTKNNNLM.js → product-variant-metadata-KFLIOCU2.js} +2 -2
  195. package/dist/{profile-detail-TQWGKYRK.js → profile-detail-SQZ6JFAN.js} +3 -5
  196. package/dist/{profile-edit-ZBD6N5SC.js → profile-edit-IVU3SBQA.js} +3 -3
  197. package/dist/{promotion-add-campaign-VAF3HTLK.js → promotion-add-campaign-SWTS4TM5.js} +2 -1
  198. package/dist/{promotion-create-FKRGXGI4.js → promotion-create-6TMK6PEP.js} +4 -3
  199. package/dist/{promotion-detail-IC5LHRSY.js → promotion-detail-WBTMSCTX.js} +6 -8
  200. package/dist/{promotion-list-TVTDBBJ3.js → promotion-list-FPOTDLHX.js} +9 -9
  201. package/dist/{refund-reason-create-TOH2D225.js → refund-reason-create-HZOBFOPB.js} +1 -1
  202. package/dist/{refund-reason-edit-B32E4WHH.js → refund-reason-edit-KS6NMC22.js} +1 -1
  203. package/dist/{refund-reason-list-G5QJEYPW.js → refund-reason-list-4T7DIRZV.js} +6 -7
  204. package/dist/{region-add-countries-4CTAVHYW.js → region-add-countries-47QLUMX7.js} +2 -2
  205. package/dist/{region-create-S2WUJ4RA.js → region-create-7DI3QEPU.js} +25 -11
  206. package/dist/{region-detail-IBLHFR57.js → region-detail-S5OT2PGL.js} +4 -5
  207. package/dist/{region-edit-NUMG2V5L.js → region-edit-IXCS3MRH.js} +32 -14
  208. package/dist/{region-list-JTR3SEWI.js → region-list-2MWAGD2D.js} +4 -5
  209. package/dist/{region-metadata-NAHNXAHQ.js → region-metadata-ADPG7OLJ.js} +2 -2
  210. package/dist/{reservation-create-H3T3AHTK.js → reservation-create-YEICXID2.js} +67 -44
  211. package/dist/{reservation-detail-OCIIVYIN.js → reservation-detail-EBIDXEVF.js} +3 -5
  212. package/dist/{reservation-list-JQFVSRW5.js → reservation-list-5QNXC2WU.js} +4 -5
  213. package/dist/{reservation-metadata-AKR6FRG5.js → reservation-metadata-TWJE777O.js} +2 -2
  214. package/dist/{reset-password-RJ5VSBQV.js → reset-password-3YLCNWLP.js} +1 -1
  215. package/dist/{return-reason-list-PKAJDA6A.js → return-reason-list-BDR7VUEV.js} +6 -6
  216. package/dist/{review-detail-K555FECH.js → review-detail-NPB3OKCE.js} +2 -4
  217. package/dist/{review-list-E56WE7VS.js → review-list-NXBVRP5T.js} +4 -5
  218. package/dist/{sales-channel-add-products-RRTMXVAT.js → sales-channel-add-products-VAHBFZP3.js} +15 -6
  219. package/dist/{sales-channel-detail-7GAGHWEP.js → sales-channel-detail-A7HHMQVX.js} +7 -8
  220. package/dist/{sales-channel-list-BCL62DTX.js → sales-channel-list-246V7NV3.js} +4 -6
  221. package/dist/{sales-channel-metadata-BKNILVQ2.js → sales-channel-metadata-PMLMQIKU.js} +2 -2
  222. package/dist/settings-UYGKDTNO.js +63 -0
  223. package/dist/{shipping-option-type-create-ZVOMA222.js → shipping-option-type-create-NOFP2DOM.js} +1 -1
  224. package/dist/{shipping-option-type-detail-BKMYJMQY.js → shipping-option-type-detail-47AZVCFP.js} +3 -5
  225. package/dist/{shipping-option-type-edit-CZFRAZPJ.js → shipping-option-type-edit-42JILKHX.js} +1 -1
  226. package/dist/{shipping-option-type-list-R76AQI26.js → shipping-option-type-list-TTAA63ZN.js} +6 -6
  227. package/dist/{shipping-profile-detail-KPRFJE4V.js → shipping-profile-detail-RGB67K3C.js} +2 -4
  228. package/dist/{shipping-profile-metadata-UEZYRBZQ.js → shipping-profile-metadata-GXMY5E57.js} +2 -2
  229. package/dist/{shipping-profiles-list-W25ZUWGV.js → shipping-profiles-list-DD3G2THE.js} +4 -5
  230. package/dist/{store-create-JBY2MAIT.js → store-create-UQ333C5F.js} +36 -14
  231. package/dist/{store-details-5FBLCWOV.js → store-details-OAONJZHB.js} +9 -10
  232. package/dist/{store-edit-BXWV5H4Z.js → store-edit-6Q3GLLJE.js} +2 -2
  233. package/dist/{store-list-MAT74WSB.js → store-list-PANSKKVA.js} +10 -11
  234. package/dist/{store-member-invite-A2WAB5GK.js → store-member-invite-235YGK55.js} +14 -5
  235. package/dist/{tax-region-create-OGVIIVMO.js → tax-region-create-ECRRD74Z.js} +2 -2
  236. package/dist/{tax-region-detail-O4DZFMT5.js → tax-region-detail-PU4Q42KO.js} +7 -8
  237. package/dist/{tax-region-edit-DUBTSOQ4.js → tax-region-edit-P4L2CUFV.js} +1 -1
  238. package/dist/{tax-region-list-ETNXAC2A.js → tax-region-list-PUNXDH34.js} +5 -6
  239. package/dist/{tax-region-metadata-KHODQCDW.js → tax-region-metadata-EDZ7YGYR.js} +2 -2
  240. package/dist/{tax-region-province-detail-LOOLLFNO.js → tax-region-province-detail-3ZQOCKZ2.js} +6 -7
  241. package/dist/{tax-region-tax-override-create-NMLHLS7J.js → tax-region-tax-override-create-CPWWLRMI.js} +10 -10
  242. package/dist/{tax-region-tax-override-edit-4SJ3DRAF.js → tax-region-tax-override-edit-TQCB5GSO.js} +41 -21
  243. package/dist/{user-detail-MJ3ITMNK.js → user-detail-4H37KBIP.js} +3 -5
  244. package/dist/{user-edit-Y5VP6CKB.js → user-edit-42A2VX5E.js} +1 -1
  245. package/dist/{user-invite-YVLFH6HU.js → user-invite-5EJ3CIQZ.js} +10 -9
  246. package/dist/{user-list-6IYBI6HY.js → user-list-EZ56HFI3.js} +5 -6
  247. package/dist/{user-metadata-XNM2JNNO.js → user-metadata-3GENWLUS.js} +2 -2
  248. package/package.json +6 -6
  249. package/dist/chunk-BDGZ4EQO.js +0 -86
  250. package/dist/home-I3OILW5Z.js +0 -16
  251. package/dist/settings-AVE3VCCM.js +0 -19
  252. package/dist/{customer-edit-5EH2AUGN.js → customer-edit-LDKAXHZ6.js} +3 -3
  253. package/dist/{invite-6WUERQLW.js → invite-IZ2YTVPF.js} +1 -1
  254. package/dist/{store-bulk-edit-FQPQQR46.js → store-bulk-edit-XWDZQPFO.js} +1 -1
@@ -25,7 +25,10 @@ import {
25
25
  } from "./chunk-E74OUNA3.js";
26
26
  import {
27
27
  NoRecords
28
- } from "./chunk-IKAUNMRC.js";
28
+ } from "./chunk-4J74G7N2.js";
29
+ import {
30
+ ActionMenu
31
+ } from "./chunk-3UOYBH5O.js";
29
32
  import {
30
33
  useDeleteFulfillmentServiceZone,
31
34
  useDeleteFulfillmentSet
@@ -39,9 +42,6 @@ import {
39
42
  useFulfillmentProviders,
40
43
  useStockLocation
41
44
  } from "./chunk-H5E3CGD7.js";
42
- import {
43
- ActionMenu
44
- } from "./chunk-BDGZ4EQO.js";
45
45
  import {
46
46
  useSalesChannels
47
47
  } from "./chunk-JC2FFAMW.js";
@@ -72,11 +72,13 @@ import {
72
72
  StatusBadge,
73
73
  Text,
74
74
  toast,
75
+ Tooltip,
75
76
  usePrompt
76
77
  } from "@medusajs/ui";
77
78
  import { useMemo, useState } from "react";
78
79
  import { useTranslation } from "react-i18next";
79
80
  import { useNavigate } from "react-router-dom";
81
+ import { usePermissionGate } from "@mercurjs/dashboard-shared";
80
82
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
81
83
  var LocationGeneralSection = ({
82
84
  location
@@ -177,10 +179,12 @@ function ShippingOption({
177
179
  actions: [
178
180
  {
179
181
  icon: /* @__PURE__ */ jsx(PencilSquare, {}),
182
+ permission: "shipping_options:edit",
180
183
  label: t("stockLocations.shippingOptions.edit.action"),
181
184
  to: `/settings/locations/${locationId}/fulfillment-set/${fulfillmentSetId}/service-zone/${option.service_zone_id}/shipping-option/${option.id}/edit`
182
185
  },
183
186
  {
187
+ permission: "shipping_options:edit",
184
188
  label: t("stockLocations.shippingOptions.pricing.action"),
185
189
  icon: /* @__PURE__ */ jsx(CurrencyDollar, {}),
186
190
  disabled: option.price_type === "calculated" /* Calculated */,
@@ -191,6 +195,7 @@ function ShippingOption({
191
195
  {
192
196
  actions: [
193
197
  {
198
+ permission: "shipping_options:manage",
194
199
  label: t("actions.delete"),
195
200
  icon: /* @__PURE__ */ jsx(Trash, {}),
196
201
  onClick: handleDelete
@@ -210,6 +215,7 @@ function ServiceZoneOptions({
210
215
  type
211
216
  }) {
212
217
  const { t } = useTranslation();
218
+ const createGate = usePermissionGate("shipping_options:edit");
213
219
  const shippingOptions = zone.shipping_options.filter(
214
220
  (o) => !isReturnOption(o)
215
221
  );
@@ -219,7 +225,14 @@ function ServiceZoneOptions({
219
225
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-y-4 px-6 py-4", "data-testid": `location-service-zone-shipping-options-${zone.id}`, children: [
220
226
  /* @__PURE__ */ jsxs("div", { className: "item-center flex justify-between", "data-testid": `location-service-zone-shipping-options-header-${zone.id}`, children: [
221
227
  /* @__PURE__ */ jsx("span", { className: "text-ui-fg-subtle txt-small self-center font-medium", "data-testid": `location-service-zone-shipping-options-label-${zone.id}`, children: t(`stockLocations.shippingOptions.create.${type}.label`) }),
222
- /* @__PURE__ */ jsx(
228
+ createGate.denied ? /* @__PURE__ */ jsx(Tooltip, { content: createGate.tooltip, children: /* @__PURE__ */ jsx(
229
+ "span",
230
+ {
231
+ className: "text-ui-fg-disabled txt-compact-small-plus",
232
+ "data-testid": `location-service-zone-shipping-options-create-button-${zone.id}`,
233
+ children: t("stockLocations.shippingOptions.create.action")
234
+ }
235
+ ) }) : /* @__PURE__ */ jsx(
223
236
  LinkButton,
224
237
  {
225
238
  to: `/settings/locations/${locationId}/fulfillment-set/${fulfillmentSetId}/service-zone/${zone.id}/shipping-option/create`,
@@ -242,7 +255,14 @@ function ServiceZoneOptions({
242
255
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-y-4 px-6 py-4", "data-testid": `location-service-zone-return-options-${zone.id}`, children: [
243
256
  /* @__PURE__ */ jsxs("div", { className: "item-center flex justify-between", "data-testid": `location-service-zone-return-options-header-${zone.id}`, children: [
244
257
  /* @__PURE__ */ jsx("span", { className: "text-ui-fg-subtle txt-small self-center font-medium", "data-testid": `location-service-zone-return-options-label-${zone.id}`, children: t("stockLocations.shippingOptions.create.returns.label") }),
245
- /* @__PURE__ */ jsx(
258
+ createGate.denied ? /* @__PURE__ */ jsx(Tooltip, { content: createGate.tooltip, children: /* @__PURE__ */ jsx(
259
+ "span",
260
+ {
261
+ className: "text-ui-fg-disabled txt-compact-small-plus",
262
+ "data-testid": `location-service-zone-return-options-create-button-${zone.id}`,
263
+ children: t("stockLocations.shippingOptions.create.action")
264
+ }
265
+ ) }) : /* @__PURE__ */ jsx(
246
266
  LinkButton,
247
267
  {
248
268
  to: `/settings/locations/${locationId}/fulfillment-set/${fulfillmentSetId}/service-zone/${zone.id}/shipping-option/create?is_return`,
@@ -372,11 +392,13 @@ function ServiceZone({
372
392
  {
373
393
  actions: [
374
394
  {
395
+ permission: "fulfillment_sets:edit",
375
396
  label: t("actions.edit"),
376
397
  icon: /* @__PURE__ */ jsx(PencilSquare, {}),
377
398
  to: `/settings/locations/${locationId}/fulfillment-set/${fulfillmentSetId}/service-zone/${zone.id}/edit`
378
399
  },
379
400
  {
401
+ permission: "fulfillment_sets:edit",
380
402
  label: t("stockLocations.serviceZones.manageAreas.action"),
381
403
  icon: /* @__PURE__ */ jsx(Map, {}),
382
404
  to: `/settings/locations/${locationId}/fulfillment-set/${fulfillmentSetId}/service-zone/${zone.id}/areas`
@@ -386,6 +408,7 @@ function ServiceZone({
386
408
  {
387
409
  actions: [
388
410
  {
411
+ permission: "fulfillment_sets:manage",
389
412
  label: t("actions.delete"),
390
413
  icon: /* @__PURE__ */ jsx(Trash, {}),
391
414
  onClick: handleDelete
@@ -461,6 +484,7 @@ function FulfillmentSet(props) {
461
484
  actions: [
462
485
  {
463
486
  icon: /* @__PURE__ */ jsx(Plus, {}),
487
+ permission: "fulfillment_sets:edit",
464
488
  label: t("stockLocations.serviceZones.create.action"),
465
489
  to: `/settings/locations/${locationId}/fulfillment-set/${fulfillmentSet.id}/service-zones/create`
466
490
  }
@@ -470,6 +494,7 @@ function FulfillmentSet(props) {
470
494
  actions: [
471
495
  {
472
496
  icon: /* @__PURE__ */ jsx(Trash, {}),
497
+ permission: "fulfillment_sets:manage",
473
498
  label: t("actions.disable"),
474
499
  onClick: handleDelete
475
500
  }
@@ -480,6 +505,7 @@ function FulfillmentSet(props) {
480
505
  actions: [
481
506
  {
482
507
  icon: /* @__PURE__ */ jsx(Plus, {}),
508
+ permission: "stock_locations:edit",
483
509
  label: t("actions.enable"),
484
510
  onClick: handleCreate
485
511
  }
@@ -503,6 +529,7 @@ function FulfillmentSet(props) {
503
529
  className: "h-fit",
504
530
  action: {
505
531
  to: `/settings/locations/${locationId}/fulfillment-set/${fulfillmentSet.id}/service-zones/create`,
532
+ permission: "fulfillment_sets:edit",
506
533
  label: t("stockLocations.serviceZones.create.action")
507
534
  }
508
535
  }
@@ -560,6 +587,7 @@ var Actions = ({ location }) => {
560
587
  actions: [
561
588
  {
562
589
  icon: /* @__PURE__ */ jsx(PencilSquare, {}),
590
+ permission: "stock_locations:edit",
563
591
  label: t("actions.edit"),
564
592
  to: `edit`
565
593
  },
@@ -574,6 +602,7 @@ var Actions = ({ location }) => {
574
602
  actions: [
575
603
  {
576
604
  icon: /* @__PURE__ */ jsx(Trash, {}),
605
+ permission: "stock_locations:manage",
577
606
  label: t("actions.delete"),
578
607
  onClick: handleDelete
579
608
  }
@@ -588,13 +617,18 @@ var Actions = ({ location }) => {
588
617
  // src/pages/locations/location-detail/components/location-sales-channels-section/locations-sales-channels-section.tsx
589
618
  import { Channels, PencilSquare as PencilSquare2 } from "@medusajs/icons";
590
619
  import { Container as Container2, Heading as Heading2, Text as Text2 } from "@medusajs/ui";
620
+ import { useCan } from "@mercurjs/dashboard-shared";
591
621
  import { useTranslation as useTranslation2 } from "react-i18next";
592
622
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
593
623
  function LocationsSalesChannelsSection({
594
624
  location
595
625
  }) {
596
626
  const { t } = useTranslation2();
597
- const { count } = useSalesChannels({ limit: 1, fields: "id" });
627
+ const canViewSalesChannels = useCan("sales_channels");
628
+ const { count } = useSalesChannels(
629
+ { limit: 1, fields: "id" },
630
+ { enabled: canViewSalesChannels }
631
+ );
598
632
  const hasConnectedChannels = !!location.sales_channels?.length;
599
633
  return /* @__PURE__ */ jsxs2(Container2, { className: "flex flex-col px-6 py-4", "data-testid": "location-sales-channels-section-container", children: [
600
634
  /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between", "data-testid": "location-sales-channels-section-header", children: [
@@ -606,6 +640,7 @@ function LocationsSalesChannelsSection({
606
640
  {
607
641
  actions: [
608
642
  {
643
+ permission: "stock_locations:edit",
609
644
  label: t("actions.edit"),
610
645
  to: "sales-channels",
611
646
  icon: /* @__PURE__ */ jsx2(PencilSquare2, {})
@@ -631,7 +666,7 @@ function LocationsSalesChannelsSection({
631
666
  }
632
667
  )
633
668
  ] }),
634
- /* @__PURE__ */ jsx2(Text2, { className: "text-ui-fg-subtle", size: "small", leading: "compact", "data-testid": "location-sales-channels-section-description", children: t("stockLocations.salesChannels.connectedTo", {
669
+ canViewSalesChannels && /* @__PURE__ */ jsx2(Text2, { className: "text-ui-fg-subtle", size: "small", leading: "compact", "data-testid": "location-sales-channels-section-description", children: t("stockLocations.salesChannels.connectedTo", {
635
670
  count: location.sales_channels?.length,
636
671
  total: count
637
672
  }) })
@@ -640,6 +675,7 @@ function LocationsSalesChannelsSection({
640
675
  {
641
676
  className: "h-fit pb-2 pt-6",
642
677
  action: {
678
+ permission: "stock_locations:edit",
643
679
  label: t("stockLocations.salesChannels.action"),
644
680
  to: "sales-channels"
645
681
  },
@@ -657,6 +693,7 @@ import { WidgetZone } from "@mercurjs/dashboard-shared";
657
693
  // src/pages/locations/location-detail/components/location-fulfillment-providers-section/location-fulfillment-providers-section.tsx
658
694
  import { HandTruck, PencilSquare as PencilSquare3 } from "@medusajs/icons";
659
695
  import { Container as Container3, Heading as Heading3 } from "@medusajs/ui";
696
+ import { SectionNoAccess, useCan as useCan2 } from "@mercurjs/dashboard-shared";
660
697
  import { Fragment as Fragment2 } from "react";
661
698
  import { useTranslation as useTranslation3 } from "react-i18next";
662
699
  import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
@@ -664,11 +701,15 @@ function LocationsFulfillmentProvidersSection({
664
701
  location
665
702
  }) {
666
703
  const { t } = useTranslation3();
667
- const { fulfillment_providers } = useFulfillmentProviders({
668
- stock_location_id: location.id,
669
- fields: "id",
670
- is_enabled: true
671
- });
704
+ const canViewProviders = useCan2("fulfillment_sets");
705
+ const { fulfillment_providers } = useFulfillmentProviders(
706
+ {
707
+ stock_location_id: location.id,
708
+ fields: "id",
709
+ is_enabled: true
710
+ },
711
+ { enabled: canViewProviders }
712
+ );
672
713
  return /* @__PURE__ */ jsxs3(Container3, { className: "flex flex-col px-6 py-4", "data-testid": "location-fulfillment-providers-section-container", children: [
673
714
  /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between", "data-testid": "location-fulfillment-providers-section-header", children: [
674
715
  /* @__PURE__ */ jsx3(Heading3, { level: "h2", "data-testid": "location-fulfillment-providers-section-heading", children: t("stockLocations.fulfillmentProviders.header") }),
@@ -679,6 +720,7 @@ function LocationsFulfillmentProvidersSection({
679
720
  {
680
721
  actions: [
681
722
  {
723
+ permission: "stock_locations:edit",
682
724
  label: t("actions.edit"),
683
725
  to: "fulfillment-providers",
684
726
  icon: /* @__PURE__ */ jsx3(PencilSquare3, {})
@@ -690,7 +732,7 @@ function LocationsFulfillmentProvidersSection({
690
732
  }
691
733
  )
692
734
  ] }),
693
- fulfillment_providers?.length ? /* @__PURE__ */ jsx3("div", { className: "flex flex-col gap-y-4 pt-4", "data-testid": "location-fulfillment-providers-section-content", children: /* @__PURE__ */ jsx3("div", { className: "grid grid-cols-[28px_1fr] items-center gap-x-3 gap-y-3", "data-testid": "location-fulfillment-providers-section-list", children: fulfillment_providers?.map((fulfillmentProvider) => {
735
+ !canViewProviders ? /* @__PURE__ */ jsx3(SectionNoAccess, { className: "px-0 pb-0 pt-4" }) : fulfillment_providers?.length ? /* @__PURE__ */ jsx3("div", { className: "flex flex-col gap-y-4 pt-4", "data-testid": "location-fulfillment-providers-section-content", children: /* @__PURE__ */ jsx3("div", { className: "grid grid-cols-[28px_1fr] items-center gap-x-3 gap-y-3", "data-testid": "location-fulfillment-providers-section-list", children: fulfillment_providers?.map((fulfillmentProvider) => {
694
736
  return /* @__PURE__ */ jsxs3(Fragment2, { children: [
695
737
  /* @__PURE__ */ jsx3(IconAvatar, { "data-testid": `location-fulfillment-providers-section-provider-icon-${fulfillmentProvider.id}`, children: /* @__PURE__ */ jsx3(HandTruck, { className: "text-ui-fg-subtle" }) }),
696
738
  /* @__PURE__ */ jsx3("div", { className: "txt-compact-small", "data-testid": `location-fulfillment-providers-section-provider-name-${fulfillmentProvider.id}`, children: formatProvider(fulfillmentProvider.id) })
@@ -700,6 +742,7 @@ function LocationsFulfillmentProvidersSection({
700
742
  {
701
743
  className: "h-fit pb-2 pt-6 text-center",
702
744
  action: {
745
+ permission: "stock_locations:edit",
703
746
  label: t("stockLocations.fulfillmentProviders.action"),
704
747
  to: "fulfillment-providers"
705
748
  },
@@ -3,15 +3,21 @@ import {
3
3
  } from "./chunk-HRMANL53.js";
4
4
 
5
5
  // src/hooks/table/filters/use-customer-group-table-filters.tsx
6
+ import { usePermissions } from "@mercurjs/dashboard-shared";
6
7
  import { useTranslation } from "react-i18next";
7
8
  var useCustomerGroupTableFilters = () => {
8
9
  const { t } = useTranslation();
9
- const { sellers } = useSellers({
10
- limit: 1e3,
11
- fields: "id,name"
12
- });
10
+ const { can } = usePermissions();
11
+ const canViewSellers = can("sellers");
12
+ const { sellers } = useSellers(
13
+ {
14
+ limit: 1e3,
15
+ fields: "id,name"
16
+ },
17
+ { enabled: canViewSellers }
18
+ );
13
19
  let filters = [];
14
- if (sellers?.length) {
20
+ if (canViewSellers && sellers?.length) {
15
21
  filters.push({
16
22
  key: "seller_id",
17
23
  label: t("fields.owner"),
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  TaxRegionTable,
3
3
  useTaxRegionTable
4
- } from "./chunk-VYSTJIAD.js";
4
+ } from "./chunk-CX5XB56X.js";
5
5
  import {
6
6
  useTaxRegionTableQuery
7
7
  } from "./chunk-AYVH6Q5O.js";
@@ -8,15 +8,15 @@ import {
8
8
  import {
9
9
  getCountryByIso2
10
10
  } from "./chunk-JRTZWK77.js";
11
+ import {
12
+ ActionMenu
13
+ } from "./chunk-3UOYBH5O.js";
11
14
  import {
12
15
  useDeleteTaxRate
13
16
  } from "./chunk-LHE6LM6S.js";
14
17
  import {
15
18
  useDeleteTaxRegion
16
19
  } from "./chunk-BOPIWKTU.js";
17
- import {
18
- ActionMenu
19
- } from "./chunk-BDGZ4EQO.js";
20
20
 
21
21
  // src/pages/tax-regions/common/components/tax-region-card/tax-region-card.tsx
22
22
  import { Heading, Text, Tooltip, clx } from "@medusajs/ui";
@@ -215,6 +215,7 @@ var TaxRegionCardActions = ({
215
215
  actions: [
216
216
  {
217
217
  icon: /* @__PURE__ */ jsx(Plus, {}),
218
+ permission: "tax_regions:edit",
218
219
  label: t("taxRegions.fields.defaultTaxRate.action"),
219
220
  to: `tax-rates/create`
220
221
  }
@@ -225,11 +226,13 @@ var TaxRegionCardActions = ({
225
226
  actions: [
226
227
  !hasParent && {
227
228
  icon: /* @__PURE__ */ jsx(PencilSquare, {}),
229
+ permission: "tax_regions:edit",
228
230
  label: t("actions.edit"),
229
231
  to: `/settings/tax-regions/${taxRegion.id}/edit`
230
232
  },
231
233
  {
232
234
  icon: /* @__PURE__ */ jsx(Trash, {}),
235
+ permission: "tax_regions:manage",
233
236
  label: t("actions.delete"),
234
237
  onClick: handleDelete
235
238
  }
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-MAEP2UCK.js";
11
11
  import {
12
12
  AddCampaignPromotionFields
13
- } from "./chunk-HFCJJJKP.js";
13
+ } from "./chunk-MKKOAF2W.js";
14
14
  import {
15
15
  useComboboxData
16
16
  } from "./chunk-5KGMGL4N.js";
@@ -33,6 +33,9 @@ import {
33
33
  import {
34
34
  Form
35
35
  } from "./chunk-3QSRE5LS.js";
36
+ import {
37
+ ConditionalTooltip
38
+ } from "./chunk-LAVHRER2.js";
36
39
  import {
37
40
  useCreatePromotion,
38
41
  useUpsertPromotionCost
@@ -172,6 +175,7 @@ import {
172
175
  } from "@medusajs/ui";
173
176
  import { useWatch as useWatch2 } from "react-hook-form";
174
177
  import { Trans, useTranslation } from "react-i18next";
178
+ import { usePermissionGate } from "@mercurjs/dashboard-shared";
175
179
  import { SwitchBox } from "@mercurjs/dashboard-shared";
176
180
  import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
177
181
  var Root2 = ({ currentTemplate }) => {
@@ -210,6 +214,7 @@ var Root2 = ({ currentTemplate }) => {
210
214
  name: "cost_bearer"
211
215
  });
212
216
  const isSharedCost = watchCostBearer === "shared";
217
+ const storesGate = usePermissionGate("sellers:view");
213
218
  const stores = useComboboxData({
214
219
  queryKey: ["promotion_stores"],
215
220
  queryFn: (params) => sdk.admin.sellers.query({ ...params, fields: "id,name" }),
@@ -217,7 +222,7 @@ var Root2 = ({ currentTemplate }) => {
217
222
  label: seller.name,
218
223
  value: seller.id
219
224
  })),
220
- enabled: isTypeBuyGet
225
+ enabled: isTypeBuyGet && storesGate.allowed
221
226
  });
222
227
  return /* @__PURE__ */ jsx2("div", { className: "flex size-full flex-col items-center", children: /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-[720px] flex-col gap-y-8 py-16", children: [
223
228
  /* @__PURE__ */ jsxs(
@@ -855,21 +860,29 @@ var Root2 = ({ currentTemplate }) => {
855
860
  "data-testid": "promotion-create-form-store-item",
856
861
  children: [
857
862
  /* @__PURE__ */ jsx2(Form.Label, { "data-testid": "promotion-create-form-store-label", children: t("promotions.form.storeOffers.label") }),
858
- /* @__PURE__ */ jsx2(Form.Control, { "data-testid": "promotion-create-form-store-control", children: /* @__PURE__ */ jsx2(
859
- Combobox,
863
+ /* @__PURE__ */ jsx2(
864
+ ConditionalTooltip,
860
865
  {
861
- ...field,
862
- value: field.value ?? "",
863
- options: stores.options,
864
- searchValue: stores.searchValue,
865
- onSearchValueChange: stores.onSearchValueChange,
866
- fetchNextPage: stores.fetchNextPage,
867
- placeholder: t(
868
- "promotions.form.storeOffers.placeholder"
869
- ),
870
- "data-testid": "promotion-create-form-store-select"
866
+ showTooltip: storesGate.denied,
867
+ content: storesGate.tooltip,
868
+ children: /* @__PURE__ */ jsx2("div", { children: /* @__PURE__ */ jsx2(Form.Control, { "data-testid": "promotion-create-form-store-control", children: /* @__PURE__ */ jsx2(
869
+ Combobox,
870
+ {
871
+ ...field,
872
+ value: field.value ?? "",
873
+ options: stores.options,
874
+ searchValue: stores.searchValue,
875
+ onSearchValueChange: stores.onSearchValueChange,
876
+ fetchNextPage: stores.fetchNextPage,
877
+ placeholder: t(
878
+ "promotions.form.storeOffers.placeholder"
879
+ ),
880
+ disabled: storesGate.denied,
881
+ "data-testid": "promotion-create-form-store-select"
882
+ }
883
+ ) }) })
871
884
  }
872
- ) }),
885
+ ),
873
886
  /* @__PURE__ */ jsx2(Form.ErrorMessage, { "data-testid": "promotion-create-form-store-error" })
874
887
  ]
875
888
  }
@@ -20,13 +20,13 @@ import {
20
20
  import {
21
21
  _DataTable,
22
22
  useDataTable
23
- } from "./chunk-ZOU25JF6.js";
23
+ } from "./chunk-SU36MZXC.js";
24
+ import {
25
+ ActionMenu
26
+ } from "./chunk-3UOYBH5O.js";
24
27
  import {
25
28
  usePriceLists
26
29
  } from "./chunk-56XMCNDS.js";
27
- import {
28
- ActionMenu
29
- } from "./chunk-BDGZ4EQO.js";
30
30
 
31
31
  // src/pages/price-lists/price-list-list/price-list-list.tsx
32
32
  import { Children as Children3 } from "react";
@@ -199,6 +199,7 @@ var PriceListListTableActions = ({ priceList }) => {
199
199
  {
200
200
  actions: [
201
201
  {
202
+ permission: "price_lists:edit",
202
203
  label: t("actions.edit"),
203
204
  to: `${priceList.id}/edit`,
204
205
  icon: /* @__PURE__ */ jsx3(PencilSquare, {})
@@ -208,6 +209,7 @@ var PriceListListTableActions = ({ priceList }) => {
208
209
  {
209
210
  actions: [
210
211
  {
212
+ permission: "price_lists:manage",
211
213
  label: t("actions.delete"),
212
214
  onClick: handleDelete,
213
215
  icon: /* @__PURE__ */ jsx3(Trash, {})
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  i18n
3
- } from "./chunk-ZPHVFD4N.js";
3
+ } from "./chunk-TXZWIFWX.js";
4
4
 
5
5
  // src/lib/promotions.ts
6
6
  var getPromotionStatusMap = () => ({
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  NoRecords,
10
10
  NoResults
11
- } from "./chunk-IKAUNMRC.js";
11
+ } from "./chunk-4J74G7N2.js";
12
12
  import {
13
13
  useDate
14
14
  } from "./chunk-EIWPJWKF.js";
@@ -1140,6 +1140,7 @@ var DataTableQuery = ({
1140
1140
  };
1141
1141
 
1142
1142
  // src/components/table/data-table/data-table-root/data-table-root.tsx
1143
+ import { isPermitted, PermissionsContext } from "@mercurjs/dashboard-shared";
1143
1144
  import { CommandBar, Table, clx as clx7 } from "@medusajs/ui";
1144
1145
  import {
1145
1146
  flexRender
@@ -1148,7 +1149,8 @@ import {
1148
1149
  Fragment,
1149
1150
  useEffect as useEffect4,
1150
1151
  useRef as useRef2,
1151
- useState as useState6
1152
+ useState as useState6,
1153
+ useContext as useContext2
1152
1154
  } from "react";
1153
1155
  import { useTranslation as useTranslation6 } from "react-i18next";
1154
1156
  import { Link } from "react-router-dom";
@@ -1171,6 +1173,7 @@ var DataTableRoot = ({
1171
1173
  const scrollableRef = useRef2(null);
1172
1174
  const hasSelect = columns.find((c) => c.id === "select");
1173
1175
  const hasActions = columns.find((c) => c.id === "actions");
1176
+ const permissions = useContext2(PermissionsContext);
1174
1177
  const hasCommandBar = commands && commands.length > 0;
1175
1178
  const rowSelection = table.getState().rowSelection;
1176
1179
  const { pageIndex, pageSize } = table.getState().pagination;
@@ -1358,7 +1361,12 @@ var DataTableRoot = ({
1358
1361
  {
1359
1362
  label: command.label,
1360
1363
  shortcut: command.shortcut,
1361
- action: () => handleAction(command.action)
1364
+ action: () => handleAction(command.action),
1365
+ disabled: !isPermitted(
1366
+ permissions,
1367
+ command.permission,
1368
+ command.requireAll
1369
+ )
1362
1370
  }
1363
1371
  ),
1364
1372
  index < commands.length - 1 && /* @__PURE__ */ jsx8(CommandBar.Seperator, {})
@@ -3,12 +3,12 @@ import {
3
3
  buildOfferGridData,
4
4
  usePriceListCurrencyData,
5
5
  usePriceListGridColumns
6
- } from "./chunk-BZPOERWW.js";
6
+ } from "./chunk-GIV6KSQX.js";
7
7
  import {
8
8
  useOfferTableColumns,
9
9
  useOfferTableFilters,
10
10
  useOfferTableQuery
11
- } from "./chunk-5EGLQSSH.js";
11
+ } from "./chunk-2IOADJUM.js";
12
12
  import {
13
13
  extractPricesFromOffers
14
14
  } from "./chunk-KVAD5JGS.js";
@@ -30,7 +30,7 @@ import {
30
30
  import {
31
31
  _DataTable,
32
32
  useDataTable
33
- } from "./chunk-ZOU25JF6.js";
33
+ } from "./chunk-SU36MZXC.js";
34
34
  import {
35
35
  useBatchPriceListPrices,
36
36
  usePriceList
@@ -64,6 +64,7 @@ var PriceListPricesAddProductsFields = Object.keys(
64
64
  // src/pages/price-lists/price-list-prices-add/price-list-prices-add.tsx
65
65
  import { Children as Children2 } from "react";
66
66
  import { useParams } from "react-router-dom";
67
+ import { SectionNoAccess as SectionNoAccess2 } from "@mercurjs/dashboard-shared";
67
68
 
68
69
  // src/pages/price-lists/price-list-prices-add/components/price-list-prices-add-form/price-list-prices-add-form.tsx
69
70
  import { zodResolver } from "@hookform/resolvers/zod";
@@ -73,6 +74,7 @@ import { useForm } from "react-hook-form";
73
74
  import { useTranslation as useTranslation2 } from "react-i18next";
74
75
 
75
76
  // src/pages/price-lists/price-list-prices-add/components/price-list-prices-add-form/price-list-prices-add-prices-form.tsx
77
+ import { usePermissions } from "@mercurjs/dashboard-shared";
76
78
  import { useEffect, useMemo } from "react";
77
79
  import { useWatch } from "react-hook-form";
78
80
  import { jsx } from "react/jsx-runtime";
@@ -86,13 +88,14 @@ var Root = ({
86
88
  const { setCloseOnEscape } = useRouteModal();
87
89
  const offerIds = useWatch({ control: form.control, name: "offer_ids" });
88
90
  const existingOffers = useWatch({ control: form.control, name: "offers" });
91
+ const { can } = usePermissions();
89
92
  const { offers: selectedOffers } = useOffers(
90
93
  {
91
94
  id: offerIds,
92
95
  limit: offerIds?.length || 1,
93
96
  fields: "id,variant_id,product_id,seller_id,sku,seller.name,product.title,product.thumbnail"
94
97
  },
95
- { enabled: (offerIds?.length ?? 0) > 0 }
98
+ { enabled: (offerIds?.length ?? 0) > 0 && can("offers") }
96
99
  );
97
100
  const productIds = useMemo(
98
101
  () => Array.from(
@@ -102,7 +105,7 @@ var Root = ({
102
105
  );
103
106
  const { products, isLoading } = useProducts(
104
107
  { id: productIds, limit: productIds.length || 1, fields: "id,*variants" },
105
- { enabled: productIds.length > 0 }
108
+ { enabled: productIds.length > 0 && can("products") }
106
109
  );
107
110
  const { gridData, variantIdByOffer } = useMemo(
108
111
  () => buildOfferGridData(
@@ -153,6 +156,7 @@ import {
153
156
  } from "@tanstack/react-table";
154
157
  import { useMemo as useMemo2, useRef, useState } from "react";
155
158
  import { useTranslation } from "react-i18next";
159
+ import { SectionNoAccess, isForbidden, useCan } from "@mercurjs/dashboard-shared";
156
160
  import { jsx as jsx2 } from "react/jsx-runtime";
157
161
  var PAGE_SIZE = 50;
158
162
  var PREFIX = "p";
@@ -179,8 +183,10 @@ var Root2 = ({ priceList }) => {
179
183
  pageSize: PAGE_SIZE,
180
184
  prefix: PREFIX
181
185
  });
186
+ const canViewOffers = useCan("offers");
182
187
  const { offers, count, isLoading, isError, error } = useOffers(searchParams, {
183
- placeholderData: keepPreviousData
188
+ placeholderData: keepPreviousData,
189
+ enabled: canViewOffers
184
190
  });
185
191
  const offerMeta = useRef({});
186
192
  for (const offer of offers ?? []) {
@@ -227,6 +233,9 @@ var Root2 = ({ priceList }) => {
227
233
  pageSize: PAGE_SIZE,
228
234
  prefix: PREFIX
229
235
  });
236
+ if (!canViewOffers || isForbidden(error)) {
237
+ return /* @__PURE__ */ jsx2(SectionNoAccess, {});
238
+ }
230
239
  if (isError) {
231
240
  throw error;
232
241
  }
@@ -361,7 +370,7 @@ var PriceListPricesAddForm = ({
361
370
  };
362
371
 
363
372
  // src/pages/price-lists/price-list-prices-add/price-list-prices-add.tsx
364
- import { jsx as jsx4 } from "react/jsx-runtime";
373
+ import { Fragment, jsx as jsx4, jsxs } from "react/jsx-runtime";
365
374
  var Root3 = ({ children }) => {
366
375
  const { id } = useParams();
367
376
  const { price_list, isPending, isError, error } = usePriceList(id, {
@@ -372,13 +381,19 @@ var Root3 = ({ children }) => {
372
381
  if (isError) {
373
382
  throw error;
374
383
  }
375
- return /* @__PURE__ */ jsx4(RouteFocusModal, { prev: `/price-lists/${id}`, children: ready && (Children2.count(children) > 0 ? children : /* @__PURE__ */ jsx4(
376
- PriceListPricesAddForm,
377
- {
378
- priceList: price_list,
379
- ...currencyData
380
- }
381
- )) });
384
+ return /* @__PURE__ */ jsxs(RouteFocusModal, { prev: `/price-lists/${id}`, children: [
385
+ currencyData.isForbidden && /* @__PURE__ */ jsxs(Fragment, { children: [
386
+ /* @__PURE__ */ jsx4(RouteFocusModal.Header, {}),
387
+ /* @__PURE__ */ jsx4(RouteFocusModal.Body, { children: /* @__PURE__ */ jsx4(SectionNoAccess2, {}) })
388
+ ] }),
389
+ ready && (Children2.count(children) > 0 ? children : /* @__PURE__ */ jsx4(
390
+ PriceListPricesAddForm,
391
+ {
392
+ priceList: price_list,
393
+ ...currencyData
394
+ }
395
+ ))
396
+ ] });
382
397
  };
383
398
  var PriceListPricesAddPage = Object.assign(Root3, {
384
399
  Form: PriceListPricesAddForm,
@@ -10,13 +10,13 @@ import {
10
10
  import {
11
11
  _DataTable,
12
12
  useDataTable
13
- } from "./chunk-ZOU25JF6.js";
14
- import {
15
- useUsers
16
- } from "./chunk-62YRQVR7.js";
13
+ } from "./chunk-SU36MZXC.js";
17
14
  import {
18
15
  ActionMenu
19
- } from "./chunk-BDGZ4EQO.js";
16
+ } from "./chunk-3UOYBH5O.js";
17
+ import {
18
+ useUsers
19
+ } from "./chunk-AZV22U4V.js";
20
20
 
21
21
  // src/pages/users/user-list/user-list.tsx
22
22
  import { Children as Children3 } from "react";
@@ -229,6 +229,7 @@ var UserActions = ({ user }) => {
229
229
  actions: [
230
230
  {
231
231
  icon: /* @__PURE__ */ jsx2(PencilSquare, {}),
232
+ permission: "users:edit",
232
233
  label: t("actions.edit"),
233
234
  onClick: () => {
234
235
  navigate(`${user.id}/edit`);