@mercurjs/vendor 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 (207) hide show
  1. package/dist/{[id]-3TP5WIZB.js → [id]-2OF4JLOM.js} +29 -24
  2. package/dist/{[id]-AANQIZ6U.js → [id]-3BRHRE6C.js} +22 -110
  3. package/dist/{[id]-QWI3RWE6.js → [id]-3KQSZR3L.js} +1 -1
  4. package/dist/{[id]-XCVXYXDT.js → [id]-4HS3AFWP.js} +24 -23
  5. package/dist/{[id]-3TCOLUQH.js → [id]-BFTKEDHY.js} +4 -3
  6. package/dist/{[id]-7YPSQHSD.js → [id]-EEPHLOWS.js} +23 -12
  7. package/dist/{[id]-7FFWND3X.js → [id]-GWIBSEEQ.js} +22 -20
  8. package/dist/{[id]-555S4PRC.js → [id]-IHSO5B72.js} +27 -16
  9. package/dist/{[id]-XRV3PWK7.js → [id]-IMJ6YDKQ.js} +106 -69
  10. package/dist/{[id]-IQM2R5W2.js → [id]-K2F5YPWY.js} +13 -13
  11. package/dist/{[id]-K4P4HI7K.js → [id]-O5SKS55U.js} +34 -22
  12. package/dist/{[id]-FN5PFTFA.js → [id]-R3KSE4RW.js} +19 -18
  13. package/dist/{[id]-ZLTRZVOF.js → [id]-RKTD6MQZ.js} +1 -1
  14. package/dist/{[id]-RXE4JR2L.js → [id]-RUJOYJVC.js} +32 -19
  15. package/dist/{[id]-65664M32.js → [id]-WVRNSHBF.js} +19 -63
  16. package/dist/{[location_id]-62NRMIRT.js → [location_id]-K2M7RIV6.js} +30 -16
  17. package/dist/{add-LFMSOM2I.js → add-7UWLMR3F.js} +25 -21
  18. package/dist/{add-RDHAFW4O.js → add-P2WZQQCU.js} +9 -9
  19. package/dist/{add-customer-groups-BHWXWIRY.js → add-customer-groups-IKUP3Q4T.js} +8 -12
  20. package/dist/{add-products-BS6YBD43.js → add-products-DPEYSM7T.js} +16 -13
  21. package/dist/{add-promotions-GM7E5PPT.js → add-promotions-RUG6KZOT.js} +19 -16
  22. package/dist/{add-to-campaign-2T7W7IGC.js → add-to-campaign-U4WPKKWF.js} +12 -6
  23. package/dist/{address-VCK5PFT3.js → address-6IXPPNZD.js} +3 -5
  24. package/dist/{adjust-inventory-QUOAKTI7.js → adjust-inventory-RAMVDJ4H.js} +6 -2
  25. package/dist/{allocate-items-QAYROQMK.js → allocate-items-PE6DKXXQ.js} +36 -13
  26. package/dist/{areas-F57XNJQH.js → areas-2VLOAWC7.js} +5 -7
  27. package/dist/{breadcrumb-K7DQRL6I.js → breadcrumb-ANAR7OFI.js} +4 -6
  28. package/dist/{breadcrumb-4XFBJTT6.js → breadcrumb-IWVKVMML.js} +4 -6
  29. package/dist/{breadcrumb-R3DJRMYD.js → breadcrumb-UUJ2KDHC.js} +3 -5
  30. package/dist/{campaigns-77ZNTLVM.js → campaigns-WJ6VLMWS.js} +7 -9
  31. package/dist/{categories-CDC7V4AD.js → categories-7A5XCNUB.js} +6 -8
  32. package/dist/chunk-3UOYBH5O.js +8 -0
  33. package/dist/{chunk-XR5ZZQJQ.js → chunk-43XB5SOF.js} +19 -10
  34. package/dist/{chunk-INNFZYX2.js → chunk-4RI5QHNO.js} +0 -1
  35. package/dist/{chunk-5L2LKVG2.js → chunk-6CKTPQJL.js} +3 -3
  36. package/dist/{chunk-LLFVZNTS.js → chunk-7TKB2FAE.js} +78 -35
  37. package/dist/{chunk-GIZ2DOQS.js → chunk-A74QSU4R.js} +1 -1
  38. package/dist/{chunk-27V45JNG.js → chunk-AVDRED5I.js} +1 -1
  39. package/dist/{chunk-INYLPVCG.js → chunk-AWPOH6IK.js} +3 -3
  40. package/dist/{chunk-433GJAD7.js → chunk-C3OU4RDU.js} +1 -1
  41. package/dist/{chunk-FPZWASXD.js → chunk-CMZOZFZU.js} +1 -1
  42. package/dist/{chunk-372IUJ3U.js → chunk-D5CDWGYE.js} +1 -1
  43. package/dist/{chunk-PYB3BNZW.js → chunk-DLZGEG6J.js} +8 -4
  44. package/dist/{chunk-W5X4Q6M4.js → chunk-E2QISGP4.js} +5 -4
  45. package/dist/{chunk-TE7C3VO7.js → chunk-E4TCTJUM.js} +1 -1
  46. package/dist/{chunk-NNLEVY4J.js → chunk-FND43M4U.js} +35 -15
  47. package/dist/{chunk-L5IEFKWP.js → chunk-GSRMAHJE.js} +306 -59
  48. package/dist/chunk-H5ECELHX.js +2829 -0
  49. package/dist/{chunk-DKH7QTPX.js → chunk-HINRUSXL.js} +2 -2
  50. package/dist/{chunk-SF5N2HX4.js → chunk-HPUEHOQE.js} +13 -3
  51. package/dist/{chunk-7O5HUQNI.js → chunk-HVEHFBWR.js} +17 -10
  52. package/dist/{chunk-4CLLNQFU.js → chunk-HW3QQO3Z.js} +1 -1
  53. package/dist/{chunk-JG6OBY7L.js → chunk-HW6LONKX.js} +4 -3
  54. package/dist/{chunk-MAEP2UCK.js → chunk-J654EXP7.js} +1 -2
  55. package/dist/{chunk-CPBVTM6F.js → chunk-J6VZ25XV.js} +13 -6
  56. package/dist/{chunk-MGS4GBO4.js → chunk-KH6YWAFX.js} +2 -2
  57. package/dist/{chunk-MOUE4W4X.js → chunk-KHEC7A36.js} +1 -0
  58. package/dist/chunk-KO5C5BHF.js +164 -0
  59. package/dist/{chunk-NAIMPBYY.js → chunk-LEKY3BLG.js} +2 -2
  60. package/dist/{chunk-VD67WK26.js → chunk-LFUX2JW3.js} +1 -1
  61. package/dist/{chunk-BTQN4KKH.js → chunk-LLRUNGEW.js} +28 -11
  62. package/dist/{chunk-WBN4MTCT.js → chunk-M52LISWR.js} +24 -17
  63. package/dist/{chunk-DHKUWER4.js → chunk-M7MY46J3.js} +1 -2
  64. package/dist/{chunk-DIIC7A2J.js → chunk-MKAGFKBV.js} +16 -3
  65. package/dist/{chunk-J75EFK5A.js → chunk-N45KT7VP.js} +13 -3
  66. package/dist/{chunk-ZC2ME3UB.js → chunk-O6NPVVWQ.js} +3 -1
  67. package/dist/{chunk-KKH7K3XV.js → chunk-OHNQU57W.js} +1 -1
  68. package/dist/{chunk-W6AYLESW.js → chunk-ONQMJ6XX.js} +1 -1
  69. package/dist/{chunk-MP3RJZLD.js → chunk-OSQQD2Z6.js} +1 -22
  70. package/dist/{chunk-T4XULZDN.js → chunk-P7RWZG2D.js} +18 -8
  71. package/dist/{chunk-TGZRWLN5.js → chunk-SGXPBAWE.js} +19 -17
  72. package/dist/{chunk-L2NJPDUD.js → chunk-SQQTCTTG.js} +1 -17
  73. package/dist/{chunk-VMRFUTKH.js → chunk-SUEXR3VW.js} +1 -1
  74. package/dist/{chunk-67IQ2R2J.js → chunk-T4RIT6WS.js} +16 -5
  75. package/dist/{chunk-SAKMXBXD.js → chunk-TFUH5PSZ.js} +9 -5
  76. package/dist/{chunk-XOFFU4IR.js → chunk-TLNMIAXA.js} +1 -1
  77. package/dist/{chunk-T2VHOLCA.js → chunk-TSYOZAKY.js} +11 -63
  78. package/dist/{chunk-ZWTCVOHQ.js → chunk-UXUF4ZDU.js} +6 -1
  79. package/dist/{chunk-R3AN3TZ3.js → chunk-VHFHMV3X.js} +9 -6
  80. package/dist/{chunk-ZN6XDVYS.js → chunk-VU5DJ7UT.js} +21 -12
  81. package/dist/{chunk-U64VSAGN.js → chunk-VUP35A4G.js} +1 -1
  82. package/dist/{chunk-3DOTNN32.js → chunk-WIBM2YZE.js} +15 -3
  83. package/dist/{chunk-UGUEUZCY.js → chunk-XTIKH3HH.js} +1 -1
  84. package/dist/{chunk-AFYD5MPA.js → chunk-Y4RJAL2Q.js} +1 -1
  85. package/dist/{chunk-QSOQS4EE.js → chunk-YXJUIFQA.js} +3 -3
  86. package/dist/{chunk-MWQHQJGN.js → chunk-Z6CTOMOU.js} +1 -1
  87. package/dist/{collections-TIAJUTBW.js → collections-W7ROLB2E.js} +12 -18
  88. package/dist/{create-BABDKAPR.js → create-3YY5BZGH.js} +100 -59
  89. package/dist/{create-MEQKUWCG.js → create-7NFVN6KC.js} +48 -26
  90. package/dist/{create-2OF2AWP2.js → create-FSILPYTR.js} +3 -3
  91. package/dist/{create-KMNJ4FYD.js → create-HH2JHCIN.js} +3 -5
  92. package/dist/{create-DWK2KIHB.js → create-NKZTBC4B.js} +15 -19
  93. package/dist/{create-V4XGZEZO.js → create-OQGMMN2W.js} +27 -23
  94. package/dist/{create-ICCAEOSA.js → create-QJA6ZJGP.js} +70 -47
  95. package/dist/{create-PWA3GQLK.js → create-RTU33FI2.js} +3 -5
  96. package/dist/{create-6FCSBUXQ.js → create-TVPSBARM.js} +14 -11
  97. package/dist/{create-CUSRU5G5.js → create-UH2FR6HF.js} +103 -64
  98. package/dist/{create-MQRLFTRZ.js → create-ZM7BDG4R.js} +21 -12
  99. package/dist/{create-FOWSD67N.js → create-ZPWVXJ2Q.js} +108 -71
  100. package/dist/{create-GLLQSYQD.js → create-ZXVHEYDZ.js} +5 -7
  101. package/dist/{customer-availability-F2OP7QS5.js → customer-availability-EBUO7VZ2.js} +13 -11
  102. package/dist/{customer-group-add-customers-MR2OSBTY.js → customer-group-add-customers-DUVSOO77.js} +13 -8
  103. package/dist/{customer-group-detail-KEZAENU7.js → customer-group-detail-FUPDYQGJ.js} +7 -10
  104. package/dist/{customer-groups-T5O7MGFL.js → customer-groups-DD7W3RPJ.js} +9 -11
  105. package/dist/{customers-LTS4BBXQ.js → customers-FDGCY475.js} +6 -8
  106. package/dist/{edit-62SBKB2Y.js → edit-2OPGBOKL.js} +3 -5
  107. package/dist/{edit-RA7ATQOB.js → edit-6EOMUHOG.js} +9 -6
  108. package/dist/{edit-QPTRBYJQ.js → edit-B3ZFXRG2.js} +1 -1
  109. package/dist/{edit-LG6ERKYK.js → edit-BIGRH37K.js} +4 -6
  110. package/dist/{edit-SXCECNS3.js → edit-BJGLNEOY.js} +14 -12
  111. package/dist/{edit-RO7VYRIZ.js → edit-C2ERLQSF.js} +34 -14
  112. package/dist/{edit-EJ5NQJGS.js → edit-FMC5C6VD.js} +1 -1
  113. package/dist/{edit-KNFYPEFZ.js → edit-GQLFC5AY.js} +9 -6
  114. package/dist/{edit-6PYEAEWF.js → edit-O5BD7VZP.js} +3 -5
  115. package/dist/{edit-G5QJEWNV.js → edit-UXJQ4EAH.js} +9 -8
  116. package/dist/{edit-AQ5UYOZK.js → edit-Y3YELOKM.js} +5 -7
  117. package/dist/{edit-price-CCDENZG5.js → edit-price-IJNC2VNH.js} +18 -9
  118. package/dist/{edit-reservation-446DRAKQ.js → edit-reservation-TLVYWSUT.js} +8 -5
  119. package/dist/{edit-stock-XVFVYLGU.js → edit-stock-DVFWXRPY.js} +23 -10
  120. package/dist/{fulfillment-GXVOLEBC.js → fulfillment-3WMJ6DAN.js} +71 -40
  121. package/dist/{fulfillment-providers-YFDCTTXG.js → fulfillment-providers-WY727OLC.js} +23 -18
  122. package/dist/home-WTFFNGHL.js +57 -0
  123. package/dist/index.js +436 -3296
  124. package/dist/{inventory-PNUAHOZT.js → inventory-BFTQKWYK.js} +6 -9
  125. package/dist/{inventory-Q3I6Z7AT.js → inventory-OV2QCW25.js} +17 -9
  126. package/dist/{invite-WV3KA2MH.js → invite-PVWR6QMR.js} +3 -5
  127. package/dist/{invite-4PYL3L77.js → invite-QSOFIHZB.js} +7 -13
  128. package/dist/{locations-YP6QVZC7.js → locations-AXNGQK36.js} +2 -4
  129. package/dist/{login-HXB2B2OR.js → login-E3SXBDT6.js} +6 -8
  130. package/dist/{manage-items-63FPRK7Z.js → manage-items-NLTC6IZW.js} +32 -18
  131. package/dist/{manage-locations-ZCE7QN4T.js → manage-locations-E2YI2BQZ.js} +13 -2
  132. package/dist/{media-6YN4NWX2.js → media-MOSEP2QC.js} +3 -5
  133. package/dist/{media-KN6H3MXF.js → media-TLIJXPPV.js} +6 -8
  134. package/dist/{metadata-KID27FPJ.js → metadata-67K7LJ6H.js} +5 -7
  135. package/dist/{metadata-P4SSWSAH.js → metadata-J6N5GLMG.js} +5 -7
  136. package/dist/{metadata-ZRBKR2WC.js → metadata-KQ3FNELH.js} +5 -7
  137. package/dist/{metadata-BYEMFTCC.js → metadata-P4ZXOFK2.js} +5 -7
  138. package/dist/{metadata-LFKMOKMN.js → metadata-PDMTEO6V.js} +5 -7
  139. package/dist/{offer-create-page-3BENCLLJ.js → offer-create-page-AGIFD7ZH.js} +34 -18
  140. package/dist/{offer-detail-page-JBWZVYV2.js → offer-detail-page-2NNWJUMB.js} +20 -10
  141. package/dist/{offer-variant-detail-page-LQ3FJZQD.js → offer-variant-detail-page-R2MHHUFX.js} +16 -12
  142. package/dist/{offers-I5AVMSTP.js → offers-CUP53FCY.js} +11 -16
  143. package/dist/{onboarding-UBE24B76.js → onboarding-T5VAM6VV.js} +3 -5
  144. package/dist/{orders-GX37YOHO.js → orders-FURQM6ES.js} +11 -15
  145. package/dist/{organization-3TNXK6W5.js → organization-VTRA7C5F.js} +70 -38
  146. package/dist/pages/index.js +49 -54
  147. package/dist/{payment-details-NJKV3DG5.js → payment-details-4MNF46RW.js} +3 -5
  148. package/dist/{payouts-23RQNMAF.js → payouts-C7MZ44DZ.js} +5 -7
  149. package/dist/{price-lists-INRBUTSF.js → price-lists-KIXTYR6V.js} +7 -9
  150. package/dist/{pricing-LRLKBQW7.js → pricing-CPZPYNIU.js} +10 -5
  151. package/dist/{pricing-U6WHJZWB.js → pricing-NYMFDWM2.js} +36 -20
  152. package/dist/{product-tags-ZRUQYB47.js → product-tags-BNN2U6RI.js} +14 -20
  153. package/dist/{product-types-B4RL7RCW.js → product-types-VWQOKX46.js} +7 -11
  154. package/dist/{product-variant-detail-K3PF4SEO.js → product-variant-detail-FPXXLCOT.js} +18 -12
  155. package/dist/{product-variant-edit-W2UX6VUO.js → product-variant-edit-K6YXTONF.js} +3 -5
  156. package/dist/{products-3TTFVZCJ.js → products-6UXLIILT.js} +16 -13
  157. package/dist/{products-4KGTWK77.js → products-JKMHFNTR.js} +17 -21
  158. package/dist/{professional-details-RG3V4NWW.js → professional-details-C55Y6JT2.js} +3 -5
  159. package/dist/{profile-EGFXDAFY.js → profile-YEZVWGU4.js} +7 -10
  160. package/dist/{promotions-W57CTIZT.js → promotions-DSNOJ6FS.js} +11 -13
  161. package/dist/{receive-RRZK3FP2.js → receive-6UIBHJSV.js} +34 -18
  162. package/dist/{refund-FLCZAMPR.js → refund-CFNDFKYB.js} +36 -12
  163. package/dist/{register-O4VJJKC7.js → register-YZASU5SC.js} +6 -8
  164. package/dist/{reservations-IJUQ4SJ7.js → reservations-AEYROZK6.js} +16 -13
  165. package/dist/{reset-password-KWA7IQSI.js → reset-password-R5YIE2PY.js} +1 -1
  166. package/dist/{return-reasons-XSQCCVHN.js → return-reasons-UCHI5XK5.js} +8 -12
  167. package/dist/{reviews-LBLCFBRQ.js → reviews-WB5AUOXN.js} +1 -1
  168. package/dist/{sales-channels-T5V6WTXM.js → sales-channels-DMWGW7CM.js} +10 -5
  169. package/dist/{sales-channels-DUMO3GMT.js → sales-channels-Q333DZVU.js} +10 -5
  170. package/dist/settings-5XG62RFY.js +41 -0
  171. package/dist/{shipment-6Q3I43KO.js → shipment-YTYE2UIX.js} +3 -5
  172. package/dist/{shipping-6AB5ZGWE.js → shipping-MLPJKAHR.js} +41 -17
  173. package/dist/{shipping-profile-7P3RPEIJ.js → shipping-profile-7F74LJ5W.js} +24 -10
  174. package/dist/{shipping-profiles-USFJ7ULV.js → shipping-profiles-M6X7EZ73.js} +8 -12
  175. package/dist/{stock-7UTN5N2G.js → stock-BLFYUMVX.js} +20 -13
  176. package/dist/{store-X3KZSUJR.js → store-66S2PEGH.js} +40 -39
  177. package/dist/{store-closure-6XV6DRQ3.js → store-closure-UZMWOAMV.js} +3 -5
  178. package/dist/{store-select-ZIXNPRWL.js → store-select-KC56FAQQ.js} +5 -7
  179. package/dist/{team-2BMPVUMB.js → team-VZ5AKSOE.js} +15 -16
  180. package/package.json +6 -6
  181. package/dist/[id]-6LDGTIDO.js +0 -330
  182. package/dist/[province_id]-HJMZLCWM.js +0 -210
  183. package/dist/chunk-AYVH6Q5O.js +0 -31
  184. package/dist/chunk-CWCR5ZLS.js +0 -107
  185. package/dist/chunk-DSZ4KA7O.js +0 -254
  186. package/dist/chunk-FV76G2D7.js +0 -89
  187. package/dist/chunk-GHDLST2P.js +0 -67
  188. package/dist/chunk-KCHYLLVG.js +0 -134
  189. package/dist/chunk-MDFKI2FL.js +0 -36
  190. package/dist/chunk-MG4GKUJW.js +0 -31
  191. package/dist/chunk-N2TQXB44.js +0 -1280
  192. package/dist/chunk-O5BMOYFU.js +0 -719
  193. package/dist/chunk-Q4UVXS46.js +0 -14
  194. package/dist/chunk-QDPLZDMX.js +0 -17
  195. package/dist/chunk-R5DX3IFD.js +0 -185
  196. package/dist/chunk-SZH3GTKM.js +0 -543
  197. package/dist/chunk-YN3FGNJM.js +0 -122
  198. package/dist/create-3SBSLZQO.js +0 -194
  199. package/dist/create-F2PIA332.js +0 -230
  200. package/dist/create-F7TCCDBJ.js +0 -634
  201. package/dist/create-T3KSWODJ.js +0 -310
  202. package/dist/edit-KV2AMYM7.js +0 -747
  203. package/dist/edit-RRA6J5FW.js +0 -193
  204. package/dist/home-I3OILW5Z.js +0 -16
  205. package/dist/settings-GWKFTTM5.js +0 -117
  206. package/dist/tax-regions-DTTQGOK3.js +0 -90
  207. package/dist/{chunk-BQJSBWOC.js → chunk-KMHHWTP3.js} +3 -3
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ProductGeneralSection,
3
3
  ProductMediaSection
4
- } from "./chunk-CPBVTM6F.js";
4
+ } from "./chunk-J6VZ25XV.js";
5
5
  import {
6
6
  SectionRow
7
7
  } from "./chunk-4TLP3TAA.js";
@@ -16,43 +16,38 @@ import "./chunk-FQERBIVS.js";
16
16
  import {
17
17
  _DataTable,
18
18
  useDataTable
19
- } from "./chunk-L5IEFKWP.js";
20
- import "./chunk-YN3FGNJM.js";
21
- import "./chunk-KCHYLLVG.js";
22
- import "./chunk-3DOTNN32.js";
19
+ } from "./chunk-GSRMAHJE.js";
20
+ import "./chunk-WIBM2YZE.js";
23
21
  import {
24
22
  useQueryParams
25
23
  } from "./chunk-THHRRYRS.js";
26
24
  import {
27
25
  ActionMenu
28
- } from "./chunk-CWCR5ZLS.js";
26
+ } from "./chunk-3UOYBH5O.js";
29
27
  import "./chunk-WQ467F7S.js";
30
28
  import {
31
29
  require_dist
32
30
  } from "./chunk-VPUTUJQG.js";
31
+ import "./chunk-Y7QKP6QU.js";
33
32
  import {
34
33
  Thumbnail
35
34
  } from "./chunk-WIYFXWRI.js";
36
35
  import {
37
36
  TwoColumnPageSkeleton
38
- } from "./chunk-INNFZYX2.js";
39
- import "./chunk-LAVHRER2.js";
37
+ } from "./chunk-4RI5QHNO.js";
40
38
  import "./chunk-QFKER4GM.js";
41
- import "./chunk-Y7QKP6QU.js";
42
39
  import {
43
40
  useFeatureFlags
44
- } from "./chunk-TGZRWLN5.js";
41
+ } from "./chunk-SGXPBAWE.js";
45
42
  import "./chunk-K5324KIX.js";
46
- import "./chunk-FV76G2D7.js";
47
- import "./chunk-GHDLST2P.js";
43
+ import "./chunk-SQQTCTTG.js";
48
44
  import "./chunk-YVYYOBAE.js";
49
- import "./chunk-L2NJPDUD.js";
50
45
  import "./chunk-7LIENHWP.js";
51
46
  import "./chunk-NV2RZAHW.js";
52
47
  import "./chunk-MR6REQKT.js";
53
48
  import "./chunk-JBV2QQYF.js";
54
49
  import "./chunk-BHEU34FL.js";
55
- import "./chunk-R3AN3TZ3.js";
50
+ import "./chunk-VHFHMV3X.js";
56
51
  import "./chunk-II3CLUXA.js";
57
52
  import "./chunk-OCYVN77Z.js";
58
53
  import "./chunk-J2XUEO2E.js";
@@ -123,31 +118,38 @@ import { WidgetZone, useLinkQuery } from "@mercurjs/dashboard-shared";
123
118
  var import_types = __toESM(require_dist(), 1);
124
119
  import { Button, toast, usePrompt } from "@medusajs/ui";
125
120
  import {
126
- ProductChangePanel
121
+ PermissionAction,
122
+ ProductChangePanel,
123
+ usePermissions
127
124
  } from "@mercurjs/dashboard-shared";
128
125
  import { useTranslation } from "react-i18next";
129
126
  import { jsx } from "react/jsx-runtime";
130
127
  var VARIANT_LOOKUP_FIELDS = "id,title,sku,*images";
131
- var resolversFor = (productId) => ({
128
+ var resolversFor = (productId, can) => ({
132
129
  getType: async (id) => {
130
+ if (!can("product_types")) return null;
133
131
  const { product_type } = await sdk.vendor.productTypes.$id.query({ $id: id });
134
132
  return product_type?.value ?? null;
135
133
  },
136
134
  getCollection: async (id) => {
135
+ if (!can("product_collections")) return null;
137
136
  const { collection } = await sdk.vendor.collections.$id.query({ $id: id });
138
137
  return collection?.title ?? null;
139
138
  },
140
139
  getCategory: async (id) => {
140
+ if (!can("product_categories")) return null;
141
141
  const { product_category } = await sdk.vendor.productCategories.$id.query({
142
142
  $id: id
143
143
  });
144
144
  return product_category?.name ?? null;
145
145
  },
146
146
  getTag: async (id) => {
147
+ if (!can("product_tags")) return null;
147
148
  const { product_tag } = await sdk.vendor.productTags.$id.query({ $id: id });
148
149
  return product_tag?.value ?? null;
149
150
  },
150
151
  getAttribute: async (id) => {
152
+ if (!can("product_attributes")) return null;
151
153
  const { product_attribute } = await sdk.vendor.productAttributes.$id.query({
152
154
  $id: id
153
155
  });
@@ -174,6 +176,7 @@ var ProductActiveEditSection = ({
174
176
  }) => {
175
177
  const { t } = useTranslation();
176
178
  const prompt = usePrompt();
179
+ const { can } = usePermissions();
177
180
  const { product_change, isError } = useProductChange(product.id, {
178
181
  retry: false
179
182
  });
@@ -211,8 +214,8 @@ var ProductActiveEditSection = ({
211
214
  {
212
215
  product: panelProduct,
213
216
  actions: product_change.actions ?? [],
214
- resolvers: resolversFor(product.id),
215
- footer: /* @__PURE__ */ jsx(
217
+ resolvers: resolversFor(product.id, can),
218
+ footer: /* @__PURE__ */ jsx(PermissionAction, { permission: "products:edit", children: /* @__PURE__ */ jsx(
216
219
  Button,
217
220
  {
218
221
  size: "small",
@@ -223,7 +226,7 @@ var ProductActiveEditSection = ({
223
226
  "data-testid": "product-active-edit-cancel-button",
224
227
  children: t("actions.cancel")
225
228
  }
226
- )
229
+ ) })
227
230
  }
228
231
  );
229
232
  };
@@ -359,7 +362,7 @@ import {
359
362
  Tooltip as Tooltip2,
360
363
  usePrompt as usePrompt2
361
364
  } from "@medusajs/ui";
362
- import { DisplayExtensionZone as DisplayExtensionZone2 } from "@mercurjs/dashboard-shared";
365
+ import { DisplayExtensionZone as DisplayExtensionZone2, PermissionAction as PermissionAction2 } from "@mercurjs/dashboard-shared";
363
366
  import { keepPreviousData } from "@tanstack/react-query";
364
367
  import { createColumnHelper } from "@tanstack/react-table";
365
368
  import { useTranslation as useTranslation3 } from "react-i18next";
@@ -407,7 +410,7 @@ var ProductVariantSection = ({
407
410
  return /* @__PURE__ */ jsxs2(Container2, { className: "divide-y p-0", "data-testid": "product-variant-section", children: [
408
411
  /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between px-6 py-4", children: [
409
412
  /* @__PURE__ */ jsx3(Heading2, { level: "h2", children: t("products.variants.header") }),
410
- /* @__PURE__ */ jsx3(
413
+ /* @__PURE__ */ jsx3(PermissionAction2, { permission: "products:edit", children: /* @__PURE__ */ jsx3(
411
414
  Button2,
412
415
  {
413
416
  size: "small",
@@ -416,7 +419,7 @@ var ProductVariantSection = ({
416
419
  "data-testid": "product-variants-create-button",
417
420
  children: /* @__PURE__ */ jsx3(Link2, { to: "variants/create", children: t("actions.create") })
418
421
  }
419
- )
422
+ ) })
420
423
  ] }),
421
424
  /* @__PURE__ */ jsx3(
422
425
  _DataTable,
@@ -608,7 +611,8 @@ var useOrderBy = () => {
608
611
  var import_types2 = __toESM(require_dist(), 1);
609
612
  import { toast as toast3 } from "@medusajs/ui";
610
613
  import {
611
- ProductAttributeSection as SharedProductAttributeSection
614
+ ProductAttributeSection as SharedProductAttributeSection,
615
+ useCan
612
616
  } from "@mercurjs/dashboard-shared";
613
617
  import { useTranslation as useTranslation4 } from "react-i18next";
614
618
  import { jsx as jsx4 } from "react/jsx-runtime";
@@ -618,10 +622,11 @@ var ProductAttributeSection = ({
618
622
  const { t } = useTranslation4();
619
623
  const { feature_flags } = useFeatureFlags();
620
624
  const isProductRequestEnabled = !!feature_flags?.[import_types2.MercurFeatureFlags.PRODUCT_REQUEST];
625
+ const canViewAttributes = useCan("product_attributes");
621
626
  const categoryId = product.categories?.[0]?.id;
622
627
  const { product_attributes } = useProductAttributes(
623
628
  { category_id: categoryId, is_required: true },
624
- { enabled: !!categoryId }
629
+ { enabled: !!categoryId && canViewAttributes }
625
630
  );
626
631
  const { mutateAsync } = useBatchProductAttributes(product.id);
627
632
  const onDeleteAttribute = async (attribute) => {
@@ -1,16 +1,14 @@
1
1
  import {
2
2
  ProductTagDetailBreadcrumb
3
- } from "./chunk-4CLLNQFU.js";
4
- import "./chunk-MP3RJZLD.js";
5
- import "./chunk-4F5GP7J7.js";
3
+ } from "./chunk-HW3QQO3Z.js";
4
+ import "./chunk-OSQQD2Z6.js";
6
5
  import "./chunk-G4MZ5TTK.js";
6
+ import "./chunk-4F5GP7J7.js";
7
7
  import "./chunk-3EEHDDS2.js";
8
8
  import "./chunk-WP3B4NEU.js";
9
9
  import "./chunk-74U3KTTL.js";
10
10
  import "./chunk-YNGA3GRX.js";
11
11
  import "./chunk-BI2AYXZQ.js";
12
- import "./chunk-MG4GKUJW.js";
13
- import "./chunk-AYVH6Q5O.js";
14
12
  import "./chunk-VOHEQ7B5.js";
15
13
  import "./chunk-WW2XYOHJ.js";
16
14
  import "./chunk-GRH7C3QN.js";
@@ -22,10 +20,10 @@ import "./chunk-JHIMVLB2.js";
22
20
  import "./chunk-LAHYLDO6.js";
23
21
  import "./chunk-4UKAKFKL.js";
24
22
  import "./chunk-7H6NMQ6U.js";
25
- import "./chunk-J75EFK5A.js";
23
+ import "./chunk-N45KT7VP.js";
26
24
  import "./chunk-ZMSRJIFD.js";
27
25
  import "./chunk-EHBZOCQO.js";
28
- import "./chunk-ZC2ME3UB.js";
26
+ import "./chunk-O6NPVVWQ.js";
29
27
  import "./chunk-CMHI2RPL.js";
30
28
  import "./chunk-HB3BP55W.js";
31
29
  import "./chunk-DNFMMT64.js";
@@ -46,10 +44,11 @@ import {
46
44
  import "./chunk-FWPGOIFA.js";
47
45
  import {
48
46
  useProductTableFilters
49
- } from "./chunk-7O5HUQNI.js";
47
+ } from "./chunk-HVEHFBWR.js";
50
48
  import "./chunk-DB6ANJBO.js";
51
49
  import "./chunk-PHOCVOZ5.js";
52
50
  import "./chunk-IQPN4PZJ.js";
51
+ import "./chunk-LAVHRER2.js";
53
52
  import {
54
53
  SingleColumnPage
55
54
  } from "./chunk-YV6MK4PZ.js";
@@ -57,39 +56,30 @@ import "./chunk-FQERBIVS.js";
57
56
  import {
58
57
  _DataTable,
59
58
  useDataTable
60
- } from "./chunk-L5IEFKWP.js";
61
- import "./chunk-YN3FGNJM.js";
62
- import "./chunk-KCHYLLVG.js";
63
- import "./chunk-3DOTNN32.js";
59
+ } from "./chunk-GSRMAHJE.js";
60
+ import "./chunk-WIBM2YZE.js";
64
61
  import "./chunk-THHRRYRS.js";
65
- import {
66
- ActionMenu
67
- } from "./chunk-CWCR5ZLS.js";
68
62
  import "./chunk-WQ467F7S.js";
69
63
  import "./chunk-VPUTUJQG.js";
64
+ import "./chunk-Y7QKP6QU.js";
70
65
  import "./chunk-WIYFXWRI.js";
71
66
  import {
72
67
  SingleColumnPageSkeleton
73
- } from "./chunk-INNFZYX2.js";
74
- import "./chunk-LAVHRER2.js";
68
+ } from "./chunk-4RI5QHNO.js";
75
69
  import "./chunk-QFKER4GM.js";
76
- import "./chunk-Y7QKP6QU.js";
77
70
  import {
78
71
  productTagsQueryKeys,
79
- useDeleteProductTag,
80
72
  useProductTag
81
- } from "./chunk-TGZRWLN5.js";
73
+ } from "./chunk-SGXPBAWE.js";
82
74
  import "./chunk-K5324KIX.js";
83
- import "./chunk-FV76G2D7.js";
84
- import "./chunk-GHDLST2P.js";
75
+ import "./chunk-SQQTCTTG.js";
85
76
  import "./chunk-YVYYOBAE.js";
86
- import "./chunk-L2NJPDUD.js";
87
77
  import "./chunk-7LIENHWP.js";
88
78
  import "./chunk-NV2RZAHW.js";
89
79
  import "./chunk-MR6REQKT.js";
90
80
  import "./chunk-JBV2QQYF.js";
91
81
  import "./chunk-BHEU34FL.js";
92
- import "./chunk-R3AN3TZ3.js";
82
+ import "./chunk-VHFHMV3X.js";
93
83
  import "./chunk-II3CLUXA.js";
94
84
  import "./chunk-OCYVN77Z.js";
95
85
  import "./chunk-J2XUEO2E.js";
@@ -130,108 +120,30 @@ var productTagLoader = async ({ params }) => {
130
120
  // src/pages/settings/product-tags/[id]/product-tag-detail-page.tsx
131
121
  import { Children } from "react";
132
122
  import { useLoaderData, useParams } from "react-router-dom";
133
- import { WidgetZone } from "@mercurjs/dashboard-shared";
123
+ import { PermissionGuard, WidgetZone } from "@mercurjs/dashboard-shared";
134
124
 
135
125
  // src/pages/settings/product-tags/[id]/_components/product-tag-general-section.tsx
136
- import { PencilSquare, Trash } from "@medusajs/icons";
137
126
  import { Container, Heading } from "@medusajs/ui";
138
- import { useTranslation as useTranslation2 } from "react-i18next";
139
-
140
- // src/pages/settings/product-tags/_common/hooks/use-delete-product-tag-action.tsx
141
- import { toast, usePrompt } from "@medusajs/ui";
142
- import { useTranslation } from "react-i18next";
143
- import { useNavigate } from "react-router-dom";
144
- var useDeleteProductTagAction = ({
145
- productTag
146
- }) => {
147
- const { t } = useTranslation();
148
- const prompt = usePrompt();
149
- const navigate = useNavigate();
150
- const { mutateAsync } = useDeleteProductTag(productTag.id);
151
- const handleDelete = async () => {
152
- const confirmed = await prompt({
153
- title: t("general.areYouSure"),
154
- description: t("productTags.delete.confirmation", {
155
- value: productTag.value
156
- }),
157
- confirmText: t("actions.delete"),
158
- cancelText: t("actions.cancel")
159
- });
160
- if (!confirmed) {
161
- return;
162
- }
163
- await mutateAsync(void 0, {
164
- onSuccess: () => {
165
- toast.success(
166
- t("productTags.delete.successToast", {
167
- value: productTag.value
168
- })
169
- );
170
- navigate("/settings/product-tags", {
171
- replace: true
172
- });
173
- },
174
- onError: (error) => {
175
- toast.error(error.message);
176
- }
177
- });
178
- };
179
- return handleDelete;
180
- };
181
-
182
- // src/pages/settings/product-tags/[id]/_components/product-tag-general-section.tsx
183
127
  import { jsx, jsxs } from "react/jsx-runtime";
184
128
  var ProductTagGeneralSection = ({
185
129
  productTag
186
130
  }) => {
187
- const { t } = useTranslation2();
188
- const handleDelete = useDeleteProductTagAction({ productTag });
189
- return /* @__PURE__ */ jsxs(Container, { className: "flex items-center justify-between", "data-testid": "product-tag-general-section-container", children: [
190
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-x-1.5", "data-testid": "product-tag-general-section-heading-container", children: [
191
- /* @__PURE__ */ jsx("span", { className: "text-ui-fg-muted h1-core", children: "#" }),
192
- /* @__PURE__ */ jsx(Heading, { "data-testid": "product-tag-general-section-heading", children: productTag.value })
193
- ] }),
194
- /* @__PURE__ */ jsx(
195
- ActionMenu,
196
- {
197
- groups: [
198
- {
199
- actions: [
200
- {
201
- icon: /* @__PURE__ */ jsx(PencilSquare, {}),
202
- permission: "product_tags:edit",
203
- label: t("actions.edit"),
204
- to: "edit"
205
- }
206
- ]
207
- },
208
- {
209
- actions: [
210
- {
211
- icon: /* @__PURE__ */ jsx(Trash, {}),
212
- permission: "product_tags:manage",
213
- label: t("actions.delete"),
214
- onClick: handleDelete
215
- }
216
- ]
217
- }
218
- ],
219
- "data-testid": "product-tag-general-section-action-menu"
220
- }
221
- )
222
- ] });
131
+ return /* @__PURE__ */ jsx(Container, { className: "flex items-center justify-between", "data-testid": "product-tag-general-section-container", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-x-1.5", "data-testid": "product-tag-general-section-heading-container", children: [
132
+ /* @__PURE__ */ jsx("span", { className: "text-ui-fg-muted h1-core", children: "#" }),
133
+ /* @__PURE__ */ jsx(Heading, { "data-testid": "product-tag-general-section-heading", children: productTag.value })
134
+ ] }) });
223
135
  };
224
136
 
225
137
  // src/pages/settings/product-tags/[id]/_components/product-tag-product-section.tsx
226
138
  import { Container as Container2, Heading as Heading2 } from "@medusajs/ui";
227
- import { useTranslation as useTranslation3 } from "react-i18next";
139
+ import { useTranslation } from "react-i18next";
228
140
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
229
141
  var PAGE_SIZE = 10;
230
142
  var PREFIX = "pt";
231
143
  var ProductTagProductSection = ({
232
144
  productTag
233
145
  }) => {
234
- const { t } = useTranslation3();
146
+ const { t } = useTranslation();
235
147
  const { searchParams, raw } = useProductTableQuery({
236
148
  pageSize: PAGE_SIZE,
237
149
  prefix: PREFIX
@@ -302,7 +214,7 @@ var Root = ({ children }) => {
302
214
  }
303
215
  return /* @__PURE__ */ jsx3(SingleColumnPage, { data: product_tag, children: Children.count(children) > 0 ? children : /* @__PURE__ */ jsxs3(WidgetZone, { id: "product-tags.detail.main", data: product_tag, children: [
304
216
  /* @__PURE__ */ jsx3(ProductTagGeneralSection, { productTag: product_tag }),
305
- /* @__PURE__ */ jsx3(ProductTagProductSection, { productTag: product_tag })
217
+ /* @__PURE__ */ jsx3(PermissionGuard, { permission: "products:view", children: /* @__PURE__ */ jsx3(ProductTagProductSection, { productTag: product_tag }) })
306
218
  ] }) });
307
219
  };
308
220
  var ProductTagDetailPage = Object.assign(Root, {
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-YV6MK4PZ.js";
8
8
  import {
9
9
  SingleColumnPageSkeleton
10
- } from "./chunk-INNFZYX2.js";
10
+ } from "./chunk-4RI5QHNO.js";
11
11
  import {
12
12
  usePayout
13
13
  } from "./chunk-J2XUEO2E.js";
@@ -12,6 +12,7 @@ import "./chunk-JRTZWK77.js";
12
12
  import {
13
13
  PlaceholderCell
14
14
  } from "./chunk-PHOCVOZ5.js";
15
+ import "./chunk-LAVHRER2.js";
15
16
  import {
16
17
  SectionRow
17
18
  } from "./chunk-4TLP3TAA.js";
@@ -26,40 +27,35 @@ import "./chunk-FQERBIVS.js";
26
27
  import {
27
28
  _DataTable,
28
29
  useDataTable
29
- } from "./chunk-L5IEFKWP.js";
30
- import "./chunk-YN3FGNJM.js";
31
- import "./chunk-KCHYLLVG.js";
32
- import "./chunk-3DOTNN32.js";
30
+ } from "./chunk-GSRMAHJE.js";
31
+ import "./chunk-WIBM2YZE.js";
33
32
  import {
34
33
  useQueryParams
35
34
  } from "./chunk-THHRRYRS.js";
36
35
  import {
37
36
  ActionMenu
38
- } from "./chunk-CWCR5ZLS.js";
37
+ } from "./chunk-3UOYBH5O.js";
39
38
  import {
40
39
  useDate
41
40
  } from "./chunk-WQ467F7S.js";
41
+ import "./chunk-Y7QKP6QU.js";
42
42
  import {
43
43
  Thumbnail
44
44
  } from "./chunk-WIYFXWRI.js";
45
45
  import {
46
46
  TwoColumnPageSkeleton
47
- } from "./chunk-INNFZYX2.js";
48
- import "./chunk-LAVHRER2.js";
47
+ } from "./chunk-4RI5QHNO.js";
49
48
  import "./chunk-QFKER4GM.js";
50
- import "./chunk-Y7QKP6QU.js";
51
- import "./chunk-TGZRWLN5.js";
49
+ import "./chunk-SGXPBAWE.js";
52
50
  import "./chunk-K5324KIX.js";
53
- import "./chunk-FV76G2D7.js";
54
- import "./chunk-GHDLST2P.js";
51
+ import "./chunk-SQQTCTTG.js";
55
52
  import "./chunk-YVYYOBAE.js";
56
- import "./chunk-L2NJPDUD.js";
57
53
  import "./chunk-7LIENHWP.js";
58
54
  import "./chunk-NV2RZAHW.js";
59
55
  import "./chunk-MR6REQKT.js";
60
56
  import "./chunk-JBV2QQYF.js";
61
57
  import "./chunk-BHEU34FL.js";
62
- import "./chunk-R3AN3TZ3.js";
58
+ import "./chunk-VHFHMV3X.js";
63
59
  import "./chunk-II3CLUXA.js";
64
60
  import "./chunk-OCYVN77Z.js";
65
61
  import "./chunk-J2XUEO2E.js";
@@ -319,7 +315,7 @@ var InventoryItemGeneralSection = ({
319
315
  import { Button, Container as Container3, Heading as Heading3 } from "@medusajs/ui";
320
316
  import { useTranslation as useTranslation6 } from "react-i18next";
321
317
  import { Link } from "react-router-dom";
322
- import { DisplayExtensionZone as DisplayExtensionZone3 } from "@mercurjs/dashboard-shared";
318
+ import { DisplayExtensionZone as DisplayExtensionZone3, PermissionAction } from "@mercurjs/dashboard-shared";
323
319
 
324
320
  // src/pages/inventory/[id]/_components/location-levels-table/use-location-list-table-columns.tsx
325
321
  import { createColumnHelper } from "@tanstack/react-table";
@@ -531,7 +527,7 @@ var InventoryItemLocationLevelsSection = ({
531
527
  return /* @__PURE__ */ jsxs3(Container3, { className: "divide-y p-0", children: [
532
528
  /* @__PURE__ */ jsxs3("div", { className: "flex items-center justify-between px-6 py-4", children: [
533
529
  /* @__PURE__ */ jsx6(Heading3, { children: t("inventory.locationLevels") }),
534
- /* @__PURE__ */ jsx6(Button, { size: "small", variant: "secondary", asChild: true, children: /* @__PURE__ */ jsx6(Link, { to: "locations", children: t("inventory.manageLocations") }) })
530
+ /* @__PURE__ */ jsx6(PermissionAction, { permission: "inventory_items:edit", children: /* @__PURE__ */ jsx6(Button, { size: "small", variant: "secondary", asChild: true, children: /* @__PURE__ */ jsx6(Link, { to: "locations", children: t("inventory.manageLocations") }) }) })
535
531
  ] }),
536
532
  /* @__PURE__ */ jsx6(ItemLocationListTable, { inventory_item_id: inventoryItem.id }),
537
533
  /* @__PURE__ */ jsx6(
@@ -547,11 +543,12 @@ var InventoryItemLocationLevelsSection = ({
547
543
 
548
544
  // src/pages/inventory/[id]/_components/inventory-item-reservations.tsx
549
545
  import { Button as Button2, Container as Container4, Heading as Heading4 } from "@medusajs/ui";
550
- import { DisplayExtensionZone as DisplayExtensionZone4 } from "@mercurjs/dashboard-shared";
546
+ import { DisplayExtensionZone as DisplayExtensionZone4, PermissionAction as PermissionAction2 } from "@mercurjs/dashboard-shared";
551
547
  import { useTranslation as useTranslation11 } from "react-i18next";
552
548
  import { Link as Link2 } from "react-router-dom";
553
549
 
554
550
  // src/pages/inventory/[id]/_components/reservations-table/reservation-list-table.tsx
551
+ import { useCan } from "@mercurjs/dashboard-shared";
555
552
  import { useMemo as useMemo3 } from "react";
556
553
  import { useTranslation as useTranslation10 } from "react-i18next";
557
554
 
@@ -629,7 +626,7 @@ var ReservationActions = ({
629
626
  actions: [
630
627
  {
631
628
  icon: /* @__PURE__ */ jsx8(PencilSquare4, {}),
632
- permission: "inventory_items:edit",
629
+ permission: "reservations:edit",
633
630
  label: t("actions.edit"),
634
631
  to: `/reservations/${reservation.id}/edit`
635
632
  }
@@ -639,7 +636,7 @@ var ReservationActions = ({
639
636
  actions: [
640
637
  {
641
638
  icon: /* @__PURE__ */ jsx8(Trash2, {}),
642
- permission: "inventory_items:manage",
639
+ permission: "reservations:manage",
643
640
  label: t("actions.delete"),
644
641
  onClick: handleDelete
645
642
  }
@@ -758,9 +755,13 @@ var ReservationItemTable = ({
758
755
  fields: "+line_item.order_id",
759
756
  inventory_item_id: [inventoryItem.id]
760
757
  });
761
- const { stock_locations } = useStockLocations({
762
- id: (reservations || []).map((r) => r.location_id)
763
- });
758
+ const canViewLocations = useCan("stock_locations");
759
+ const { stock_locations } = useStockLocations(
760
+ {
761
+ id: (reservations || []).map((r) => r.location_id)
762
+ },
763
+ { enabled: canViewLocations }
764
+ );
764
765
  const data = useMemo3(() => {
765
766
  const locationMap = new Map((stock_locations || []).map((l) => [l.id, l]));
766
767
  return (reservations || []).map((r) => ({
@@ -814,7 +815,7 @@ var InventoryItemReservationsSection = ({
814
815
  "data-testid": "inventory-item-reservations-header",
815
816
  children: [
816
817
  /* @__PURE__ */ jsx11(Heading4, { "data-testid": "inventory-item-reservations-title", children: t("reservations.domain") }),
817
- /* @__PURE__ */ jsx11(
818
+ /* @__PURE__ */ jsx11(PermissionAction2, { permission: "reservations:edit", children: /* @__PURE__ */ jsx11(
818
819
  Button2,
819
820
  {
820
821
  size: "small",
@@ -823,7 +824,7 @@ var InventoryItemReservationsSection = ({
823
824
  "data-testid": "inventory-create-reservation-button",
824
825
  children: /* @__PURE__ */ jsx11(Link2, { to: `/reservations/create?item_id=${inventoryItem.id}`, children: t("actions.create") })
825
826
  }
826
- )
827
+ ) })
827
828
  ]
828
829
  }
829
830
  ),
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-YV6MK4PZ.js";
16
16
  import {
17
17
  TwoColumnPageSkeleton
18
- } from "./chunk-INNFZYX2.js";
18
+ } from "./chunk-4RI5QHNO.js";
19
19
  import {
20
20
  queryClient
21
21
  } from "./chunk-RHKRREUU.js";
@@ -46,6 +46,7 @@ import { useLoaderData, useParams } from "react-router-dom";
46
46
  import { useTranslation } from "react-i18next";
47
47
  import { Link } from "react-router-dom";
48
48
  import { Button, Container, Heading, StatusBadge, Text } from "@medusajs/ui";
49
+ import { PermissionAction } from "@mercurjs/dashboard-shared";
49
50
  import { jsx, jsxs } from "react/jsx-runtime";
50
51
  var formatDateTime = (value) => new Date(value).toLocaleString(void 0, {
51
52
  year: "numeric",
@@ -81,7 +82,7 @@ var ReviewGeneralSection = ({ review }) => {
81
82
  /* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", weight: "plus", children: t("reviews.fields.response") }),
82
83
  /* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", children: review.seller_note || "-" })
83
84
  ] }),
84
- !hasResponse && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-end px-6 py-4", children: /* @__PURE__ */ jsx(
85
+ !hasResponse && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-end px-6 py-4", children: /* @__PURE__ */ jsx(PermissionAction, { permission: "reviews:edit", children: /* @__PURE__ */ jsx(
85
86
  Button,
86
87
  {
87
88
  size: "small",
@@ -90,7 +91,7 @@ var ReviewGeneralSection = ({ review }) => {
90
91
  "data-testid": "review-general-section-respond-button",
91
92
  children: /* @__PURE__ */ jsx(Link, { to: "respond", children: t("reviews.respond.action") })
92
93
  }
93
- ) })
94
+ ) }) })
94
95
  ] });
95
96
  };
96
97
 
@@ -1,6 +1,3 @@
1
- import {
2
- formatPercentage
3
- } from "./chunk-QDPLZDMX.js";
4
1
  import {
5
2
  BadgeListSummary
6
3
  } from "./chunk-QLOJNFUE.js";
@@ -9,25 +6,23 @@ import {
9
6
  } from "./chunk-T7BYPH4H.js";
10
7
  import {
11
8
  getPromotionStatus
12
- } from "./chunk-GIZ2DOQS.js";
9
+ } from "./chunk-A74QSU4R.js";
13
10
  import "./chunk-FMFVTERD.js";
14
- import "./chunk-MOUE4W4X.js";
11
+ import "./chunk-KHEC7A36.js";
15
12
  import {
16
13
  TwoColumnPage
17
14
  } from "./chunk-YV6MK4PZ.js";
18
15
  import {
19
16
  NoRecords
20
- } from "./chunk-3DOTNN32.js";
17
+ } from "./chunk-WIBM2YZE.js";
21
18
  import {
22
19
  ActionMenu
23
- } from "./chunk-CWCR5ZLS.js";
20
+ } from "./chunk-3UOYBH5O.js";
24
21
  import "./chunk-WQ467F7S.js";
25
22
  import {
26
23
  TwoColumnPageSkeleton
27
- } from "./chunk-INNFZYX2.js";
28
- import "./chunk-LAVHRER2.js";
24
+ } from "./chunk-4RI5QHNO.js";
29
25
  import "./chunk-QFKER4GM.js";
30
- import "./chunk-Y7QKP6QU.js";
31
26
  import {
32
27
  promotionsQueryKeys,
33
28
  useDeletePromotion,
@@ -138,7 +133,8 @@ var CampaignSection = ({
138
133
  message: t("promotions.campaignSection.noRecordsMessage"),
139
134
  action: {
140
135
  to: `/promotions/${id}/add-to-campaign`,
141
- label: t("promotions.campaignSection.addToCampaign")
136
+ label: t("promotions.campaignSection.addToCampaign"),
137
+ permission: "promotions:edit"
142
138
  }
143
139
  }
144
140
  ),
@@ -216,7 +212,8 @@ var PromotionConditionsSection = ({
216
212
  message: t("promotions.conditions.list.noRecordsMessage"),
217
213
  action: {
218
214
  to: `${ruleType}/edit`,
219
- label: t("promotions.conditions.add")
215
+ label: t("promotions.conditions.add"),
216
+ permission: "promotions:edit"
220
217
  }
221
218
  }
222
219
  ),
@@ -257,6 +254,20 @@ var formatCurrency = (amount, currency) => {
257
254
  }).format(amount);
258
255
  };
259
256
 
257
+ // src/lib/percentage-helpers.ts
258
+ var formatter = new Intl.NumberFormat([], {
259
+ style: "percent",
260
+ minimumFractionDigits: 2,
261
+ maximumFractionDigits: 4
262
+ });
263
+ var formatPercentage = (value, isPercentageValue = false) => {
264
+ let val = value || 0;
265
+ if (!isPercentageValue) {
266
+ val = val / 100;
267
+ }
268
+ return formatter.format(val);
269
+ };
270
+
260
271
  // src/pages/promotions/[id]/_components/promotion-general-section/promotion-general-section.tsx
261
272
  import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
262
273
  function getTypeLabelKey(promotion) {