@strapi/content-manager 0.0.0-experimental.d1602f22dc638a4c3c5084965fd6126fff5e9d4f → 0.0.0-experimental.d2a56e52af31fcf0f0c582a5a2e58e310966e96b

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 (236) hide show
  1. package/dist/admin/chunks/{CardDragPreview-DwuraT0K.js → CardDragPreview-DwuraT0K.mjs} +1 -1
  2. package/dist/admin/chunks/CardDragPreview-DwuraT0K.mjs.map +1 -0
  3. package/dist/admin/chunks/{ComponentConfigurationPage-DXwOtpq1.js → ComponentConfigurationPage-CGn9IYeg.js} +6 -6
  4. package/dist/admin/chunks/{ComponentConfigurationPage-DXwOtpq1.js.map → ComponentConfigurationPage-CGn9IYeg.js.map} +1 -1
  5. package/dist/admin/chunks/{ComponentConfigurationPage-DhYZp4nN.js → ComponentConfigurationPage-DgYK4xW6.mjs} +9 -9
  6. package/dist/admin/chunks/ComponentConfigurationPage-DgYK4xW6.mjs.map +1 -0
  7. package/dist/admin/chunks/{ComponentIcon-BZcTc4rj.js → ComponentIcon-BZcTc4rj.mjs} +1 -1
  8. package/dist/admin/chunks/ComponentIcon-BZcTc4rj.mjs.map +1 -0
  9. package/dist/admin/chunks/{EditConfigurationPage-D0Ng758X.js → EditConfigurationPage-7w_-4jF4.js} +6 -6
  10. package/dist/admin/chunks/{EditConfigurationPage-D0Ng758X.js.map → EditConfigurationPage-7w_-4jF4.js.map} +1 -1
  11. package/dist/admin/chunks/{EditConfigurationPage-DDuPch5d.js → EditConfigurationPage-C05SwwH-.mjs} +9 -9
  12. package/dist/admin/chunks/EditConfigurationPage-C05SwwH-.mjs.map +1 -0
  13. package/dist/admin/chunks/EditViewPage-CVRJBOEv.mjs +318 -0
  14. package/dist/admin/chunks/EditViewPage-CVRJBOEv.mjs.map +1 -0
  15. package/dist/admin/chunks/EditViewPage-CuQfZJDf.js +341 -0
  16. package/dist/admin/chunks/EditViewPage-CuQfZJDf.js.map +1 -0
  17. package/dist/admin/chunks/{FieldTypeIcon-BY6MrVF4.js → FieldTypeIcon-BY6MrVF4.mjs} +1 -1
  18. package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.mjs.map +1 -0
  19. package/dist/admin/chunks/{Form-BEqiuSvQ.js → Form-BqNYRsCb.js} +5 -5
  20. package/dist/admin/chunks/{Form-BEqiuSvQ.js.map → Form-BqNYRsCb.js.map} +1 -1
  21. package/dist/admin/chunks/{Form-CZmB6JIg.js → Form-DaEnqAeV.mjs} +5 -5
  22. package/dist/admin/chunks/Form-DaEnqAeV.mjs.map +1 -0
  23. package/dist/admin/chunks/{History-CPYXgxkS.js → History-B7dGNfmx.mjs} +68 -15
  24. package/dist/admin/chunks/History-B7dGNfmx.mjs.map +1 -0
  25. package/dist/admin/chunks/{History-BlLKDZSw.js → History-CEoOna4w.js} +67 -14
  26. package/dist/admin/chunks/History-CEoOna4w.js.map +1 -0
  27. package/dist/admin/chunks/{Input-CLX3C5DI.js → Input-B3QUS9rv.mjs} +2273 -511
  28. package/dist/admin/chunks/Input-B3QUS9rv.mjs.map +1 -0
  29. package/dist/admin/chunks/{Input-DiR2Xfa7.js → Input-B8I0b9aD.js} +2284 -519
  30. package/dist/admin/chunks/Input-B8I0b9aD.js.map +1 -0
  31. package/dist/admin/chunks/{ListConfigurationPage-DdTp-HxB.js → ListConfigurationPage-BbjJweN-.js} +7 -7
  32. package/dist/admin/chunks/{ListConfigurationPage-DdTp-HxB.js.map → ListConfigurationPage-BbjJweN-.js.map} +1 -1
  33. package/dist/admin/chunks/{ListConfigurationPage-CNvotSqe.js → ListConfigurationPage-VtFQ5mOK.mjs} +8 -8
  34. package/dist/admin/chunks/ListConfigurationPage-VtFQ5mOK.mjs.map +1 -0
  35. package/dist/admin/chunks/{ListViewPage-MJNfQTp-.js → ListViewPage-Cg3zbT7Y.mjs} +5 -5
  36. package/dist/admin/chunks/ListViewPage-Cg3zbT7Y.mjs.map +1 -0
  37. package/dist/admin/chunks/{ListViewPage-BtXYjEYz.js → ListViewPage-CzUm2VJN.js} +8 -8
  38. package/dist/admin/chunks/{ListViewPage-BtXYjEYz.js.map → ListViewPage-CzUm2VJN.js.map} +1 -1
  39. package/dist/admin/chunks/{NoContentTypePage-CVvVpwj4.js → NoContentTypePage-FcLLn2Wt.js} +3 -2
  40. package/dist/admin/chunks/{NoContentTypePage-BJrZvYPY.js.map → NoContentTypePage-FcLLn2Wt.js.map} +1 -1
  41. package/dist/admin/chunks/{NoContentTypePage-BJrZvYPY.js → NoContentTypePage-NOf7Aq_E.mjs} +3 -2
  42. package/dist/admin/chunks/NoContentTypePage-NOf7Aq_E.mjs.map +1 -0
  43. package/dist/admin/chunks/{NoPermissionsPage-C5yWg70d.js → NoPermissionsPage-DmeyXtCk.js} +3 -2
  44. package/dist/admin/chunks/{NoPermissionsPage-BulvG4hB.js.map → NoPermissionsPage-DmeyXtCk.js.map} +1 -1
  45. package/dist/admin/chunks/{NoPermissionsPage-BulvG4hB.js → NoPermissionsPage-OVr9KG6L.mjs} +3 -2
  46. package/dist/admin/chunks/NoPermissionsPage-OVr9KG6L.mjs.map +1 -0
  47. package/dist/admin/chunks/Preview-BH9l1QXk.mjs +593 -0
  48. package/dist/admin/chunks/Preview-BH9l1QXk.mjs.map +1 -0
  49. package/dist/admin/chunks/Preview-BYKkpc11.js +615 -0
  50. package/dist/admin/chunks/Preview-BYKkpc11.js.map +1 -0
  51. package/dist/admin/chunks/{ar-DckYq_WK.js → ar-DckYq_WK.mjs} +1 -1
  52. package/dist/admin/chunks/ar-DckYq_WK.mjs.map +1 -0
  53. package/dist/admin/chunks/{ca-DviY7mRj.js → ca-DviY7mRj.mjs} +1 -1
  54. package/dist/admin/chunks/ca-DviY7mRj.mjs.map +1 -0
  55. package/dist/admin/chunks/{cs-C7OSYFQ7.js → cs-C7OSYFQ7.mjs} +1 -1
  56. package/dist/admin/chunks/cs-C7OSYFQ7.mjs.map +1 -0
  57. package/dist/admin/chunks/{de-5QRlDHyR.js → de-5QRlDHyR.mjs} +1 -1
  58. package/dist/admin/chunks/de-5QRlDHyR.mjs.map +1 -0
  59. package/dist/admin/chunks/{en-LfhocNG2.js → en-C2zEwS3-.mjs} +6 -1
  60. package/dist/admin/chunks/en-C2zEwS3-.mjs.map +1 -0
  61. package/dist/admin/chunks/{en-C1CjdAtC.js → en-G976DLsg.js} +6 -1
  62. package/dist/admin/chunks/{en-LfhocNG2.js.map → en-G976DLsg.js.map} +1 -1
  63. package/dist/admin/chunks/{es-DkoWSExG.js → es-DkoWSExG.mjs} +1 -1
  64. package/dist/admin/chunks/es-DkoWSExG.mjs.map +1 -0
  65. package/dist/admin/chunks/{eu-BG1xX7HK.js → eu-BG1xX7HK.mjs} +1 -1
  66. package/dist/admin/chunks/eu-BG1xX7HK.mjs.map +1 -0
  67. package/dist/admin/chunks/{fr-CFdRaRVj.js → fr-CFdRaRVj.mjs} +1 -1
  68. package/dist/admin/chunks/fr-CFdRaRVj.mjs.map +1 -0
  69. package/dist/admin/chunks/{gu-D5MMMXRs.js → gu-D5MMMXRs.mjs} +1 -1
  70. package/dist/admin/chunks/gu-D5MMMXRs.mjs.map +1 -0
  71. package/dist/admin/chunks/{hi-lp17SCjr.js → hi-lp17SCjr.mjs} +1 -1
  72. package/dist/admin/chunks/hi-lp17SCjr.mjs.map +1 -0
  73. package/dist/admin/chunks/{hooks-DMvik5y_.js → hooks-DMvik5y_.mjs} +1 -1
  74. package/dist/admin/chunks/hooks-DMvik5y_.mjs.map +1 -0
  75. package/dist/admin/chunks/{hu-CLka1U2C.js → hu-CLka1U2C.mjs} +1 -1
  76. package/dist/admin/chunks/hu-CLka1U2C.mjs.map +1 -0
  77. package/dist/admin/chunks/{id-USfY9m1g.js → id-USfY9m1g.mjs} +1 -1
  78. package/dist/admin/chunks/id-USfY9m1g.mjs.map +1 -0
  79. package/dist/admin/chunks/{index-BRlRBRLb.js → index-BE7PI9Wp.mjs} +273 -173
  80. package/dist/admin/chunks/index-BE7PI9Wp.mjs.map +1 -0
  81. package/dist/admin/chunks/{index-ZIwOPk6p.js → index-BwIhYBsG.js} +246 -142
  82. package/dist/admin/chunks/index-BwIhYBsG.js.map +1 -0
  83. package/dist/admin/chunks/{it-BAHrwmYS.js → it-BAHrwmYS.mjs} +1 -1
  84. package/dist/admin/chunks/it-BAHrwmYS.mjs.map +1 -0
  85. package/dist/admin/chunks/{ja-BWKmBJFT.js → ja-BWKmBJFT.mjs} +1 -1
  86. package/dist/admin/chunks/ja-BWKmBJFT.mjs.map +1 -0
  87. package/dist/admin/chunks/{ko-CgADGBNt.js → ko-CgADGBNt.mjs} +1 -1
  88. package/dist/admin/chunks/ko-CgADGBNt.mjs.map +1 -0
  89. package/dist/admin/chunks/{layout-B3-guCPG.js → layout-9zlUM9V3.mjs} +81 -7
  90. package/dist/admin/chunks/layout-9zlUM9V3.mjs.map +1 -0
  91. package/dist/admin/chunks/{layout-ameRNiAM.js → layout-Cr0HaJVS.js} +87 -13
  92. package/dist/admin/chunks/layout-Cr0HaJVS.js.map +1 -0
  93. package/dist/admin/chunks/{ml-CnhCfOn_.js → ml-CnhCfOn_.mjs} +1 -1
  94. package/dist/admin/chunks/ml-CnhCfOn_.mjs.map +1 -0
  95. package/dist/admin/chunks/{ms-Bh09NFff.js → ms-Bh09NFff.mjs} +1 -1
  96. package/dist/admin/chunks/ms-Bh09NFff.mjs.map +1 -0
  97. package/dist/admin/chunks/{nl-C8HYflTc.js → nl-C8HYflTc.mjs} +1 -1
  98. package/dist/admin/chunks/nl-C8HYflTc.mjs.map +1 -0
  99. package/dist/admin/chunks/{useDragAndDrop-gcqEJMnO.js → objects-BJTP843m.js} +73 -1
  100. package/dist/admin/chunks/objects-BJTP843m.js.map +1 -0
  101. package/dist/admin/chunks/{useDragAndDrop-HYwNDExe.js → objects-D2z-IJgu.mjs} +72 -2
  102. package/dist/admin/chunks/objects-D2z-IJgu.mjs.map +1 -0
  103. package/dist/admin/chunks/{pl-MFCZJZuZ.js → pl-MFCZJZuZ.mjs} +1 -1
  104. package/dist/admin/chunks/pl-MFCZJZuZ.mjs.map +1 -0
  105. package/dist/admin/chunks/{pt-BR-CcotyBGJ.js → pt-BR-CcotyBGJ.mjs} +1 -1
  106. package/dist/admin/chunks/pt-BR-CcotyBGJ.mjs.map +1 -0
  107. package/dist/admin/chunks/{pt-HbmgeiYO.js → pt-HbmgeiYO.mjs} +1 -1
  108. package/dist/admin/chunks/pt-HbmgeiYO.mjs.map +1 -0
  109. package/dist/admin/chunks/{ru-CB4BUyQp.js → ru-CB4BUyQp.mjs} +1 -1
  110. package/dist/admin/chunks/{ru-CB4BUyQp.js.map → ru-CB4BUyQp.mjs.map} +1 -1
  111. package/dist/admin/chunks/{sa-n_aPA-pU.js → sa-n_aPA-pU.mjs} +1 -1
  112. package/dist/admin/chunks/sa-n_aPA-pU.mjs.map +1 -0
  113. package/dist/admin/chunks/{sk-tn_BDjE2.js → sk-tn_BDjE2.mjs} +1 -1
  114. package/dist/admin/chunks/sk-tn_BDjE2.mjs.map +1 -0
  115. package/dist/admin/chunks/{sv-cq4ZrQRd.js → sv-cq4ZrQRd.mjs} +1 -1
  116. package/dist/admin/chunks/sv-cq4ZrQRd.mjs.map +1 -0
  117. package/dist/admin/chunks/{th-mUH7hEtc.js → th-mUH7hEtc.mjs} +1 -1
  118. package/dist/admin/chunks/th-mUH7hEtc.mjs.map +1 -0
  119. package/dist/admin/chunks/{tr-Yt38daxh.js → tr-Yt38daxh.mjs} +1 -1
  120. package/dist/admin/chunks/tr-Yt38daxh.mjs.map +1 -0
  121. package/dist/admin/chunks/uk-BtM6WnaE.mjs +313 -0
  122. package/dist/admin/chunks/uk-BtM6WnaE.mjs.map +1 -0
  123. package/dist/admin/chunks/uk-DB6OgySY.js +318 -0
  124. package/dist/admin/chunks/{en-C1CjdAtC.js.map → uk-DB6OgySY.js.map} +1 -1
  125. package/dist/admin/chunks/{relations-CmoFVrKj.js → usePrev-DgZBp9Oo.js} +18 -2
  126. package/dist/admin/chunks/usePrev-DgZBp9Oo.js.map +1 -0
  127. package/dist/admin/chunks/{relations-DYQAaXwZ.js → usePrev-PisKKvhT.mjs} +18 -4
  128. package/dist/admin/chunks/usePrev-PisKKvhT.mjs.map +1 -0
  129. package/dist/admin/chunks/{vi-CvBGlTjr.js → vi-CvBGlTjr.mjs} +1 -1
  130. package/dist/admin/chunks/vi-CvBGlTjr.mjs.map +1 -0
  131. package/dist/admin/chunks/{zh-BmF-sHaT.js → zh-BmF-sHaT.mjs} +1 -1
  132. package/dist/admin/chunks/zh-BmF-sHaT.mjs.map +1 -0
  133. package/dist/admin/chunks/{zh-Hans-CI0HKio3.js → zh-Hans-CI0HKio3.mjs} +1 -1
  134. package/dist/admin/chunks/{zh-Hans-CI0HKio3.js.map → zh-Hans-CI0HKio3.mjs.map} +1 -1
  135. package/dist/admin/index.js +2 -1
  136. package/dist/admin/index.js.map +1 -1
  137. package/dist/admin/index.mjs +2 -1
  138. package/dist/admin/index.mjs.map +1 -1
  139. package/dist/admin/src/components/InjectionZone.d.ts +7 -1
  140. package/dist/admin/src/content-manager.d.ts +4 -0
  141. package/dist/admin/src/features/DocumentContext.d.ts +53 -0
  142. package/dist/admin/src/features/DocumentRBAC.d.ts +3 -2
  143. package/dist/admin/src/hooks/useDocument.d.ts +2 -0
  144. package/dist/admin/src/hooks/useDocumentActions.d.ts +1 -0
  145. package/dist/admin/src/index.d.ts +1 -0
  146. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +2 -1
  147. package/dist/admin/src/pages/EditView/components/EditorToolbarObserver.d.ts +11 -0
  148. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/Code.d.ts +49 -0
  149. package/dist/admin/src/pages/EditView/components/FormInputs/Relations/RelationModal.d.ts +8 -0
  150. package/dist/admin/src/pages/EditView/components/FormInputs/{Relations.d.ts → Relations/Relations.d.ts} +8 -2
  151. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygNav.d.ts +1 -2
  152. package/dist/admin/src/pages/EditView/components/FormLayout.d.ts +9 -3
  153. package/dist/admin/src/pages/EditView/components/InputRenderer.d.ts +7 -4
  154. package/dist/admin/src/preview/components/PreviewHeader.d.ts +1 -2
  155. package/dist/admin/src/preview/pages/Preview.d.ts +2 -0
  156. package/dist/server/index.js +1 -1
  157. package/dist/server/index.js.map +1 -1
  158. package/dist/server/index.mjs +1 -1
  159. package/dist/server/index.mjs.map +1 -1
  160. package/package.json +8 -8
  161. package/dist/admin/chunks/CardDragPreview-DwuraT0K.js.map +0 -1
  162. package/dist/admin/chunks/ComponentConfigurationPage-DhYZp4nN.js.map +0 -1
  163. package/dist/admin/chunks/ComponentIcon-BZcTc4rj.js.map +0 -1
  164. package/dist/admin/chunks/EditConfigurationPage-DDuPch5d.js.map +0 -1
  165. package/dist/admin/chunks/EditViewPage-jCZnUuCR.js +0 -265
  166. package/dist/admin/chunks/EditViewPage-jCZnUuCR.js.map +0 -1
  167. package/dist/admin/chunks/EditViewPage-zSnDwLz3.js +0 -288
  168. package/dist/admin/chunks/EditViewPage-zSnDwLz3.js.map +0 -1
  169. package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.js.map +0 -1
  170. package/dist/admin/chunks/Form-CZmB6JIg.js.map +0 -1
  171. package/dist/admin/chunks/History-BlLKDZSw.js.map +0 -1
  172. package/dist/admin/chunks/History-CPYXgxkS.js.map +0 -1
  173. package/dist/admin/chunks/Input-CLX3C5DI.js.map +0 -1
  174. package/dist/admin/chunks/Input-DiR2Xfa7.js.map +0 -1
  175. package/dist/admin/chunks/ListConfigurationPage-CNvotSqe.js.map +0 -1
  176. package/dist/admin/chunks/ListViewPage-MJNfQTp-.js.map +0 -1
  177. package/dist/admin/chunks/NoContentTypePage-CVvVpwj4.js.map +0 -1
  178. package/dist/admin/chunks/NoPermissionsPage-C5yWg70d.js.map +0 -1
  179. package/dist/admin/chunks/Preview-DEuQgQg2.js +0 -482
  180. package/dist/admin/chunks/Preview-DEuQgQg2.js.map +0 -1
  181. package/dist/admin/chunks/Preview-H74FQ9Cq.js +0 -504
  182. package/dist/admin/chunks/Preview-H74FQ9Cq.js.map +0 -1
  183. package/dist/admin/chunks/Relations-C8jbZPVK.js +0 -827
  184. package/dist/admin/chunks/Relations-C8jbZPVK.js.map +0 -1
  185. package/dist/admin/chunks/Relations-mxOUS7TJ.js +0 -853
  186. package/dist/admin/chunks/Relations-mxOUS7TJ.js.map +0 -1
  187. package/dist/admin/chunks/ar-DckYq_WK.js.map +0 -1
  188. package/dist/admin/chunks/ca-DviY7mRj.js.map +0 -1
  189. package/dist/admin/chunks/cs-C7OSYFQ7.js.map +0 -1
  190. package/dist/admin/chunks/de-5QRlDHyR.js.map +0 -1
  191. package/dist/admin/chunks/es-DkoWSExG.js.map +0 -1
  192. package/dist/admin/chunks/eu-BG1xX7HK.js.map +0 -1
  193. package/dist/admin/chunks/fr-CFdRaRVj.js.map +0 -1
  194. package/dist/admin/chunks/gu-D5MMMXRs.js.map +0 -1
  195. package/dist/admin/chunks/hi-lp17SCjr.js.map +0 -1
  196. package/dist/admin/chunks/hooks-DMvik5y_.js.map +0 -1
  197. package/dist/admin/chunks/hu-CLka1U2C.js.map +0 -1
  198. package/dist/admin/chunks/id-USfY9m1g.js.map +0 -1
  199. package/dist/admin/chunks/index-BRlRBRLb.js.map +0 -1
  200. package/dist/admin/chunks/index-ZIwOPk6p.js.map +0 -1
  201. package/dist/admin/chunks/it-BAHrwmYS.js.map +0 -1
  202. package/dist/admin/chunks/ja-BWKmBJFT.js.map +0 -1
  203. package/dist/admin/chunks/ko-CgADGBNt.js.map +0 -1
  204. package/dist/admin/chunks/layout-B3-guCPG.js.map +0 -1
  205. package/dist/admin/chunks/layout-ameRNiAM.js.map +0 -1
  206. package/dist/admin/chunks/ml-CnhCfOn_.js.map +0 -1
  207. package/dist/admin/chunks/ms-Bh09NFff.js.map +0 -1
  208. package/dist/admin/chunks/nl-C8HYflTc.js.map +0 -1
  209. package/dist/admin/chunks/objects-C3EebVVe.js +0 -76
  210. package/dist/admin/chunks/objects-C3EebVVe.js.map +0 -1
  211. package/dist/admin/chunks/objects-wl73iEma.js +0 -73
  212. package/dist/admin/chunks/objects-wl73iEma.js.map +0 -1
  213. package/dist/admin/chunks/pl-MFCZJZuZ.js.map +0 -1
  214. package/dist/admin/chunks/pt-BR-CcotyBGJ.js.map +0 -1
  215. package/dist/admin/chunks/pt-HbmgeiYO.js.map +0 -1
  216. package/dist/admin/chunks/relations-CmoFVrKj.js.map +0 -1
  217. package/dist/admin/chunks/relations-DYQAaXwZ.js.map +0 -1
  218. package/dist/admin/chunks/sa-n_aPA-pU.js.map +0 -1
  219. package/dist/admin/chunks/sk-tn_BDjE2.js.map +0 -1
  220. package/dist/admin/chunks/sv-cq4ZrQRd.js.map +0 -1
  221. package/dist/admin/chunks/th-mUH7hEtc.js.map +0 -1
  222. package/dist/admin/chunks/tr-Yt38daxh.js.map +0 -1
  223. package/dist/admin/chunks/uk-B24MoTVg.js +0 -145
  224. package/dist/admin/chunks/uk-B24MoTVg.js.map +0 -1
  225. package/dist/admin/chunks/uk-Cpgmm7gE.js +0 -140
  226. package/dist/admin/chunks/uk-Cpgmm7gE.js.map +0 -1
  227. package/dist/admin/chunks/useDragAndDrop-HYwNDExe.js.map +0 -1
  228. package/dist/admin/chunks/useDragAndDrop-gcqEJMnO.js.map +0 -1
  229. package/dist/admin/chunks/usePrev-Bjw2dhmq.js +0 -18
  230. package/dist/admin/chunks/usePrev-Bjw2dhmq.js.map +0 -1
  231. package/dist/admin/chunks/usePrev-DIYl-IAL.js +0 -21
  232. package/dist/admin/chunks/usePrev-DIYl-IAL.js.map +0 -1
  233. package/dist/admin/chunks/vi-CvBGlTjr.js.map +0 -1
  234. package/dist/admin/chunks/zh-BmF-sHaT.js.map +0 -1
  235. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/utils/prismLanguages.d.ts +0 -0
  236. package/dist/admin/src/preview/components/PreviewContent.d.ts +0 -3
@@ -1,504 +0,0 @@
1
- 'use strict';
2
-
3
- var jsxRuntime = require('react/jsx-runtime');
4
- var React = require('react');
5
- var strapiAdmin = require('@strapi/admin/strapi-admin');
6
- var designSystem = require('@strapi/design-system');
7
- var reactIntl = require('react-intl');
8
- var reactRouterDom = require('react-router-dom');
9
- var index = require('./index-ZIwOPk6p.js');
10
- var Icons = require('@strapi/icons');
11
- var qs = require('qs');
12
- var styledComponents = require('styled-components');
13
- var EditViewPage = require('./EditViewPage-zSnDwLz3.js');
14
- require('lodash/fp/mapValues');
15
- require('yup');
16
- require('fractional-indexing');
17
- require('lodash/fp/pipe');
18
- require('date-fns');
19
- require('@reduxjs/toolkit');
20
- require('./Input-DiR2Xfa7.js');
21
- require('slate');
22
- require('slate-history');
23
- require('slate-react');
24
- require('prismjs');
25
- require('prismjs/themes/prism-solarizedlight.css');
26
- require('./usePrev-DIYl-IAL.js');
27
- require('./useDragAndDrop-gcqEJMnO.js');
28
- require('react-dnd');
29
- require('@radix-ui/react-toolbar');
30
- require('react-dnd-html5-backend');
31
- require('./objects-C3EebVVe.js');
32
- require('lodash/clone');
33
- require('lodash/toPath');
34
- require('./Relations-mxOUS7TJ.js');
35
- require('react-window');
36
- require('./relations-CmoFVrKj.js');
37
- require('./ComponentIcon-C-EjOUPA.js');
38
- require('@strapi/icons/symbols');
39
- require('codemirror5');
40
- require('sanitize-html');
41
- require('highlight.js');
42
- require('markdown-it');
43
- require('markdown-it-abbr');
44
- require('markdown-it-container');
45
- require('markdown-it-deflist');
46
- require('markdown-it-emoji');
47
- require('markdown-it-footnote');
48
- require('markdown-it-ins');
49
- require('markdown-it-mark');
50
- require('markdown-it-sub');
51
- require('markdown-it-sup');
52
- require('highlight.js/styles/solarized-dark.css');
53
- require('codemirror5/addon/display/placeholder');
54
-
55
- function _interopNamespaceDefault(e) {
56
- var n = Object.create(null);
57
- if (e) {
58
- Object.keys(e).forEach(function (k) {
59
- if (k !== 'default') {
60
- var d = Object.getOwnPropertyDescriptor(e, k);
61
- Object.defineProperty(n, k, d.get ? d : {
62
- enumerable: true,
63
- get: function () { return e[k]; }
64
- });
65
- }
66
- });
67
- }
68
- n.default = e;
69
- return Object.freeze(n);
70
- }
71
-
72
- var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
73
-
74
- const UnstablePreviewContent = ()=>{
75
- const previewUrl = usePreviewContext('PreviewContent', (state)=>state.url);
76
- const { formatMessage } = reactIntl.useIntl();
77
- return /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
78
- height: "100%",
79
- children: [
80
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.Box, {
81
- flex: 1,
82
- children: "TODO: Side editor"
83
- }),
84
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.Box, {
85
- src: previewUrl,
86
- title: formatMessage({
87
- id: 'content-manager.preview.panel.title',
88
- defaultMessage: 'Preview'
89
- }),
90
- flex: 1,
91
- height: "100%",
92
- borderWidth: 0,
93
- tag: "iframe"
94
- }, previewUrl)
95
- ]
96
- });
97
- };
98
- const PreviewContent = ()=>{
99
- const previewUrl = usePreviewContext('PreviewContent', (state)=>state.url);
100
- const { formatMessage } = reactIntl.useIntl();
101
- return /*#__PURE__*/ jsxRuntime.jsx(designSystem.Box, {
102
- src: previewUrl,
103
- title: formatMessage({
104
- id: 'content-manager.preview.panel.title',
105
- defaultMessage: 'Preview'
106
- }),
107
- width: "100%",
108
- height: "100%",
109
- borderWidth: 0,
110
- tag: "iframe"
111
- }, previewUrl);
112
- };
113
-
114
- /* -------------------------------------------------------------------------------------------------
115
- * ClosePreviewButton
116
- * -----------------------------------------------------------------------------------------------*/ const ClosePreviewButton = ()=>{
117
- const [{ query }] = strapiAdmin.useQueryParams();
118
- const { formatMessage } = reactIntl.useIntl();
119
- const canGoBack = strapiAdmin.useHistory('BackButton', (state)=>state.canGoBack);
120
- const goBack = strapiAdmin.useHistory('BackButton', (state)=>state.goBack);
121
- const history = strapiAdmin.useHistory('BackButton', (state)=>state.history);
122
- const locationIndex = strapiAdmin.useHistory('BackButton', (state)=>state.currentLocationIndex);
123
- /**
124
- * Get the link destination from the history.
125
- * Rely on a fallback (the parent edit view page) if there's no page to go back .
126
- */ const historyTo = canGoBack ? history.at(locationIndex - 2) : undefined;
127
- const fallback = {
128
- pathname: '..',
129
- search: qs.stringify(query, {
130
- encode: false
131
- })
132
- };
133
- const toWithFallback = historyTo ?? fallback;
134
- const handleClick = (e)=>{
135
- if (canGoBack) {
136
- // Prevent normal link behavior, go back in the history stack instead
137
- e.preventDefault();
138
- goBack();
139
- return;
140
- }
141
- // Otherwise rely on native link behavior to go back to the edit view. We don't use navigate()
142
- // here in order to get the relative="path" functionality from the Link component.
143
- };
144
- return /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
145
- variant: "ghost",
146
- tag: reactRouterDom.Link,
147
- relative: "path",
148
- to: toWithFallback,
149
- onClick: handleClick,
150
- label: formatMessage({
151
- id: 'content-manager.preview.header.close',
152
- defaultMessage: 'Close preview'
153
- }),
154
- children: /*#__PURE__*/ jsxRuntime.jsx(Icons.Cross, {})
155
- });
156
- };
157
- /* -------------------------------------------------------------------------------------------------
158
- * Status
159
- * -----------------------------------------------------------------------------------------------*/ const Status = ()=>{
160
- // Get status
161
- const document = usePreviewContext('PreviewHeader', (state)=>state.document);
162
- const schema = usePreviewContext('PreviewHeader', (state)=>state.schema);
163
- const meta = usePreviewContext('PreviewHeader', (state)=>state.meta);
164
- const hasDraftAndPublished = schema?.options?.draftAndPublish ?? false;
165
- if (!hasDraftAndPublished) {
166
- return null;
167
- }
168
- const status = EditViewPage.getDocumentStatus(document, meta);
169
- return /*#__PURE__*/ jsxRuntime.jsx(index.DocumentStatus, {
170
- status: status,
171
- size: "XS"
172
- });
173
- };
174
- const PreviewTabs = ()=>{
175
- const { formatMessage } = reactIntl.useIntl();
176
- // URL query params
177
- const [{ query }, setQuery] = strapiAdmin.useQueryParams();
178
- // Get status
179
- const document = usePreviewContext('PreviewHeader', (state)=>state.document);
180
- const schema = usePreviewContext('PreviewHeader', (state)=>state.schema);
181
- const meta = usePreviewContext('PreviewHeader', (state)=>state.meta);
182
- const hasDraftAndPublish = schema?.options?.draftAndPublish ?? false;
183
- const documentStatus = EditViewPage.getDocumentStatus(document, meta);
184
- const handleTabChange = (status)=>{
185
- if (status === 'published' || status === 'draft') {
186
- setQuery({
187
- status
188
- }, 'push', true);
189
- }
190
- };
191
- if (!hasDraftAndPublish) {
192
- return null;
193
- }
194
- return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
195
- children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Tabs.Root, {
196
- variant: "simple",
197
- value: query.status || 'draft',
198
- onValueChange: handleTabChange,
199
- children: /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Tabs.List, {
200
- "aria-label": formatMessage({
201
- id: 'preview.tabs.label',
202
- defaultMessage: 'Document status'
203
- }),
204
- children: [
205
- /*#__PURE__*/ jsxRuntime.jsx(StatusTab, {
206
- value: "draft",
207
- children: formatMessage({
208
- id: 'content-manager.containers.List.draft',
209
- defaultMessage: 'draft'
210
- })
211
- }),
212
- /*#__PURE__*/ jsxRuntime.jsx(StatusTab, {
213
- value: "published",
214
- disabled: documentStatus === 'draft',
215
- children: formatMessage({
216
- id: 'content-manager.containers.List.published',
217
- defaultMessage: 'published'
218
- })
219
- })
220
- ]
221
- })
222
- })
223
- });
224
- };
225
- /* -------------------------------------------------------------------------------------------------
226
- * PreviewHeader
227
- * -----------------------------------------------------------------------------------------------*/ const UnstablePreviewHeader = ()=>{
228
- // Get the document title
229
- const title = usePreviewContext('PreviewHeader', (state)=>state.title);
230
- const { formatMessage } = reactIntl.useIntl();
231
- const { toggleNotification } = strapiAdmin.useNotification();
232
- const { copy } = strapiAdmin.useClipboard();
233
- const handleCopyLink = ()=>{
234
- copy(window.location.href);
235
- toggleNotification({
236
- message: formatMessage({
237
- id: 'content-manager.preview.copy.success',
238
- defaultMessage: 'Copied preview link'
239
- }),
240
- type: 'success'
241
- });
242
- };
243
- return /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
244
- gap: 4,
245
- background: "neutral0",
246
- borderColor: "neutral150",
247
- tag: "header",
248
- children: [
249
- /*#__PURE__*/ jsxRuntime.jsxs(TitleContainer, {
250
- height: "100%",
251
- paddingLeft: 2,
252
- paddingRight: 4,
253
- children: [
254
- /*#__PURE__*/ jsxRuntime.jsx(ClosePreviewButton, {}),
255
- /*#__PURE__*/ jsxRuntime.jsx(PreviewTitle, {
256
- tag: "h1",
257
- title: title,
258
- maxWidth: "200px",
259
- fontSize: 2,
260
- paddingLeft: 2,
261
- paddingRight: 3,
262
- fontWeight: 600,
263
- children: title
264
- }),
265
- /*#__PURE__*/ jsxRuntime.jsx(Status, {})
266
- ]
267
- }),
268
- /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Flex, {
269
- flex: 1,
270
- paddingRight: 2,
271
- justifyContent: "space-between",
272
- children: [
273
- /*#__PURE__*/ jsxRuntime.jsx(PreviewTabs, {}),
274
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
275
- type: "button",
276
- label: formatMessage({
277
- id: 'preview.copy.label',
278
- defaultMessage: 'Copy preview link'
279
- }),
280
- onClick: handleCopyLink,
281
- children: /*#__PURE__*/ jsxRuntime.jsx(Icons.Link, {})
282
- })
283
- ]
284
- })
285
- ]
286
- });
287
- };
288
- const PreviewHeader = ()=>{
289
- // Get the document title
290
- const title = usePreviewContext('PreviewHeader', (state)=>state.title);
291
- const { formatMessage } = reactIntl.useIntl();
292
- const { toggleNotification } = strapiAdmin.useNotification();
293
- const { copy } = strapiAdmin.useClipboard();
294
- const handleCopyLink = ()=>{
295
- copy(window.location.href);
296
- toggleNotification({
297
- message: formatMessage({
298
- id: 'content-manager.preview.copy.success',
299
- defaultMessage: 'Copied preview link'
300
- }),
301
- type: 'success'
302
- });
303
- };
304
- return /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Grid.Root, {
305
- gap: 3,
306
- gridCols: 3,
307
- paddingLeft: 2,
308
- paddingRight: 2,
309
- background: "neutral0",
310
- borderColor: "neutral150",
311
- tag: "header",
312
- children: [
313
- /*#__PURE__*/ jsxRuntime.jsxs(designSystem.Grid.Item, {
314
- xs: 1,
315
- paddingTop: 2,
316
- paddingBottom: 2,
317
- gap: 3,
318
- children: [
319
- /*#__PURE__*/ jsxRuntime.jsx(ClosePreviewButton, {}),
320
- /*#__PURE__*/ jsxRuntime.jsx(PreviewTitle, {
321
- tag: "h1",
322
- fontWeight: 600,
323
- fontSize: 2,
324
- maxWidth: "200px",
325
- title: title,
326
- children: title
327
- }),
328
- /*#__PURE__*/ jsxRuntime.jsx(Status, {})
329
- ]
330
- }),
331
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.Grid.Item, {
332
- xs: 1,
333
- marginBottom: "-1px",
334
- alignItems: "end",
335
- margin: "auto",
336
- children: /*#__PURE__*/ jsxRuntime.jsx(PreviewTabs, {})
337
- }),
338
- /*#__PURE__*/ jsxRuntime.jsx(designSystem.Grid.Item, {
339
- xs: 1,
340
- justifyContent: "end",
341
- paddingTop: 2,
342
- paddingBottom: 2,
343
- children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.IconButton, {
344
- type: "button",
345
- label: formatMessage({
346
- id: 'preview.copy.label',
347
- defaultMessage: 'Copy preview link'
348
- }),
349
- onClick: handleCopyLink,
350
- children: /*#__PURE__*/ jsxRuntime.jsx(Icons.Link, {})
351
- })
352
- })
353
- ]
354
- });
355
- };
356
- const PreviewTitle = styledComponents.styled(designSystem.Typography)`
357
- overflow: hidden;
358
- text-overflow: ellipsis;
359
- white-space: nowrap;
360
- `;
361
- const StatusTab = styledComponents.styled(designSystem.Tabs.Trigger)`
362
- text-transform: uppercase;
363
- `;
364
- const TitleContainer = styledComponents.styled(designSystem.Flex)`
365
- border-right: 1px solid ${({ theme })=>theme.colors.neutral150};
366
- `;
367
-
368
- const [PreviewProvider, usePreviewContext] = strapiAdmin.createContext('PreviewPage');
369
- /* -------------------------------------------------------------------------------------------------
370
- * PreviewPage
371
- * -----------------------------------------------------------------------------------------------*/ const PreviewPage = ()=>{
372
- const { formatMessage } = reactIntl.useIntl();
373
- // Read all the necessary data from the URL to find the right preview URL
374
- const { slug: model, id: documentId, collectionType } = reactRouterDom.useParams();
375
- const [{ query }] = strapiAdmin.useQueryParams();
376
- const params = React__namespace.useMemo(()=>index.buildValidParams(query), [
377
- query
378
- ]);
379
- if (!collectionType) {
380
- throw new Error('Could not find collectionType in url params');
381
- }
382
- if (!model) {
383
- throw new Error('Could not find model in url params');
384
- }
385
- // Only collection types must have a documentId
386
- if (collectionType === index.COLLECTION_TYPES && !documentId) {
387
- throw new Error('Could not find documentId in url params');
388
- }
389
- const previewUrlResponse = index.useGetPreviewUrlQuery({
390
- params: {
391
- contentType: model
392
- },
393
- query: {
394
- documentId,
395
- locale: params.locale,
396
- status: params.status
397
- }
398
- });
399
- const documentResponse = index.useDocument({
400
- model,
401
- collectionType,
402
- documentId,
403
- params
404
- });
405
- const documentLayoutResponse = index.useDocumentLayout(model);
406
- if (documentResponse.isLoading || previewUrlResponse.isLoading || documentLayoutResponse.isLoading) {
407
- return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Loading, {});
408
- }
409
- if (previewUrlResponse.error || documentLayoutResponse.error || !documentResponse.document || !documentResponse.meta || !documentResponse.schema) {
410
- return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Error, {});
411
- }
412
- if (!previewUrlResponse.data?.data?.url) {
413
- return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.NoData, {});
414
- }
415
- const documentTitle = documentResponse.getTitle(documentLayoutResponse.edit.settings.mainField);
416
- return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
417
- children: [
418
- /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Title, {
419
- children: formatMessage({
420
- id: 'content-manager.preview.page-title',
421
- defaultMessage: '{contentType} preview'
422
- }, {
423
- contentType: documentTitle
424
- })
425
- }),
426
- /*#__PURE__*/ jsxRuntime.jsx(PreviewProvider, {
427
- url: previewUrlResponse.data.data.url,
428
- document: documentResponse.document,
429
- title: documentTitle,
430
- meta: documentResponse.meta,
431
- schema: documentResponse.schema,
432
- children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.Flex, {
433
- direction: "column",
434
- height: "100%",
435
- alignItems: "stretch",
436
- children: window.strapi.future.isEnabled('unstablePreviewSideEditor') ? /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
437
- children: [
438
- /*#__PURE__*/ jsxRuntime.jsx(UnstablePreviewHeader, {}),
439
- /*#__PURE__*/ jsxRuntime.jsx(UnstablePreviewContent, {})
440
- ]
441
- }) : /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
442
- children: [
443
- /*#__PURE__*/ jsxRuntime.jsx(PreviewHeader, {}),
444
- /*#__PURE__*/ jsxRuntime.jsx(PreviewContent, {})
445
- ]
446
- })
447
- })
448
- })
449
- ]
450
- });
451
- };
452
- /* -------------------------------------------------------------------------------------------------
453
- * ProtectedPreviewPage
454
- * -----------------------------------------------------------------------------------------------*/ const ProtectedPreviewPageImpl = ()=>{
455
- const { slug: model } = reactRouterDom.useParams();
456
- const { permissions = [], isLoading, error } = strapiAdmin.useRBAC([
457
- {
458
- action: 'plugin::content-manager.explorer.read',
459
- subject: model
460
- }
461
- ]);
462
- if (isLoading) {
463
- return /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Loading, {});
464
- }
465
- if (error || !model) {
466
- return /*#__PURE__*/ jsxRuntime.jsx(designSystem.Box, {
467
- height: "100vh",
468
- width: "100vw",
469
- position: "fixed",
470
- top: 0,
471
- left: 0,
472
- zIndex: 2,
473
- background: "neutral0",
474
- children: /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Error, {})
475
- });
476
- }
477
- return /*#__PURE__*/ jsxRuntime.jsx(designSystem.Box, {
478
- height: "100vh",
479
- width: "100vw",
480
- position: "fixed",
481
- top: 0,
482
- left: 0,
483
- zIndex: 2,
484
- background: "neutral0",
485
- children: /*#__PURE__*/ jsxRuntime.jsx(strapiAdmin.Page.Protect, {
486
- permissions: permissions,
487
- children: ({ permissions })=>/*#__PURE__*/ jsxRuntime.jsx(index.DocumentRBAC, {
488
- permissions: permissions,
489
- children: /*#__PURE__*/ jsxRuntime.jsx(PreviewPage, {})
490
- })
491
- })
492
- });
493
- };
494
- const ProtectedPreviewPage = ()=>{
495
- return /*#__PURE__*/ jsxRuntime.jsx(designSystem.Portal, {
496
- children: /*#__PURE__*/ jsxRuntime.jsx(designSystem.FocusTrap, {
497
- children: /*#__PURE__*/ jsxRuntime.jsx(ProtectedPreviewPageImpl, {})
498
- })
499
- });
500
- };
501
-
502
- exports.ProtectedPreviewPage = ProtectedPreviewPage;
503
- exports.usePreviewContext = usePreviewContext;
504
- //# sourceMappingURL=Preview-H74FQ9Cq.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Preview-H74FQ9Cq.js","sources":["../../../admin/src/preview/components/PreviewContent.tsx","../../../admin/src/preview/components/PreviewHeader.tsx","../../../admin/src/preview/pages/Preview.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Box, Flex } from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\n\nimport { usePreviewContext } from '../pages/Preview';\n\nconst UnstablePreviewContent = () => {\n const previewUrl = usePreviewContext('PreviewContent', (state) => state.url);\n\n const { formatMessage } = useIntl();\n\n return (\n <Flex height=\"100%\">\n <Box flex={1}>TODO: Side editor</Box>\n <Box\n src={previewUrl}\n /**\n * For some reason, changing an iframe's src tag causes the browser to add a new item in the\n * history stack. This is an issue for us as it means clicking the back button will not let us\n * go back to the edit view. To fix it, we need to trick the browser into thinking this is a\n * different iframe when the preview URL changes. So we set a key prop to force React\n * to mount a different node when the src changes.\n */\n key={previewUrl}\n title={formatMessage({\n id: 'content-manager.preview.panel.title',\n defaultMessage: 'Preview',\n })}\n flex={1}\n height=\"100%\"\n borderWidth={0}\n tag=\"iframe\"\n />\n </Flex>\n );\n};\n\nconst PreviewContent = () => {\n const previewUrl = usePreviewContext('PreviewContent', (state) => state.url);\n\n const { formatMessage } = useIntl();\n\n return (\n <Box\n src={previewUrl}\n /**\n * For some reason, changing an iframe's src tag causes the browser to add a new item in the\n * history stack. This is an issue for us as it means clicking the back button will not let us\n * go back to the edit view. To fix it, we need to trick the browser into thinking this is a\n * different iframe when the preview URL changes. So we set a key prop to force React\n * to mount a different node when the src changes.\n */\n key={previewUrl}\n title={formatMessage({\n id: 'content-manager.preview.panel.title',\n defaultMessage: 'Preview',\n })}\n width=\"100%\"\n height=\"100%\"\n borderWidth={0}\n tag=\"iframe\"\n />\n );\n};\n\nexport { PreviewContent, UnstablePreviewContent };\n","import * as React from 'react';\n\nimport {\n useClipboard,\n useHistory,\n useNotification,\n useQueryParams,\n} from '@strapi/admin/strapi-admin';\nimport { IconButton, Tabs, Typography, Grid, Flex } from '@strapi/design-system';\nimport { Cross, Link as LinkIcon } from '@strapi/icons';\nimport { stringify } from 'qs';\nimport { useIntl } from 'react-intl';\nimport { Link, type To } from 'react-router-dom';\nimport { styled } from 'styled-components';\n\nimport { DocumentStatus } from '../../pages/EditView/components/DocumentStatus';\nimport { getDocumentStatus } from '../../pages/EditView/EditViewPage';\nimport { usePreviewContext } from '../pages/Preview';\n\n/* -------------------------------------------------------------------------------------------------\n * ClosePreviewButton\n * -----------------------------------------------------------------------------------------------*/\n\nconst ClosePreviewButton = () => {\n const [{ query }] = useQueryParams<{\n plugins?: Record<string, unknown>;\n }>();\n const { formatMessage } = useIntl();\n\n const canGoBack = useHistory('BackButton', (state) => state.canGoBack);\n const goBack = useHistory('BackButton', (state) => state.goBack);\n const history = useHistory('BackButton', (state) => state.history);\n const locationIndex = useHistory('BackButton', (state) => state.currentLocationIndex);\n\n /**\n * Get the link destination from the history.\n * Rely on a fallback (the parent edit view page) if there's no page to go back .\n */\n const historyTo = canGoBack ? history.at(locationIndex - 2) : undefined;\n const fallback = {\n pathname: '..',\n search: stringify(query, { encode: false }),\n } satisfies To;\n const toWithFallback = historyTo ?? fallback;\n\n const handleClick = (e: React.MouseEvent) => {\n if (canGoBack) {\n // Prevent normal link behavior, go back in the history stack instead\n e.preventDefault();\n goBack();\n return;\n }\n\n // Otherwise rely on native link behavior to go back to the edit view. We don't use navigate()\n // here in order to get the relative=\"path\" functionality from the Link component.\n };\n\n return (\n <IconButton\n variant=\"ghost\"\n tag={Link}\n relative=\"path\"\n to={toWithFallback}\n onClick={handleClick}\n label={formatMessage({\n id: 'content-manager.preview.header.close',\n defaultMessage: 'Close preview',\n })}\n >\n <Cross />\n </IconButton>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Status\n * -----------------------------------------------------------------------------------------------*/\n\nconst Status = () => {\n // Get status\n const document = usePreviewContext('PreviewHeader', (state) => state.document);\n const schema = usePreviewContext('PreviewHeader', (state) => state.schema);\n const meta = usePreviewContext('PreviewHeader', (state) => state.meta);\n const hasDraftAndPublished = schema?.options?.draftAndPublish ?? false;\n\n if (!hasDraftAndPublished) {\n return null;\n }\n\n const status = getDocumentStatus(document, meta);\n\n return <DocumentStatus status={status} size=\"XS\" />;\n};\n\nconst PreviewTabs = () => {\n const { formatMessage } = useIntl();\n\n // URL query params\n const [{ query }, setQuery] = useQueryParams<{ status: 'draft' | 'published' }>();\n\n // Get status\n const document = usePreviewContext('PreviewHeader', (state) => state.document);\n const schema = usePreviewContext('PreviewHeader', (state) => state.schema);\n const meta = usePreviewContext('PreviewHeader', (state) => state.meta);\n const hasDraftAndPublish = schema?.options?.draftAndPublish ?? false;\n const documentStatus = getDocumentStatus(document, meta);\n\n const handleTabChange = (status: string) => {\n if (status === 'published' || status === 'draft') {\n setQuery({ status }, 'push', true);\n }\n };\n\n if (!hasDraftAndPublish) {\n return null;\n }\n\n return (\n <>\n <Tabs.Root variant=\"simple\" value={query.status || 'draft'} onValueChange={handleTabChange}>\n <Tabs.List\n aria-label={formatMessage({\n id: 'preview.tabs.label',\n defaultMessage: 'Document status',\n })}\n >\n <StatusTab value=\"draft\">\n {formatMessage({\n id: 'content-manager.containers.List.draft',\n defaultMessage: 'draft',\n })}\n </StatusTab>\n <StatusTab value=\"published\" disabled={documentStatus === 'draft'}>\n {formatMessage({\n id: 'content-manager.containers.List.published',\n defaultMessage: 'published',\n })}\n </StatusTab>\n </Tabs.List>\n </Tabs.Root>\n </>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * PreviewHeader\n * -----------------------------------------------------------------------------------------------*/\n\nconst UnstablePreviewHeader = () => {\n // Get the document title\n const title = usePreviewContext('PreviewHeader', (state) => state.title);\n\n const { formatMessage } = useIntl();\n const { toggleNotification } = useNotification();\n const { copy } = useClipboard();\n\n const handleCopyLink = () => {\n copy(window.location.href);\n toggleNotification({\n message: formatMessage({\n id: 'content-manager.preview.copy.success',\n defaultMessage: 'Copied preview link',\n }),\n type: 'success',\n });\n };\n\n return (\n <Flex gap={4} background=\"neutral0\" borderColor=\"neutral150\" tag=\"header\">\n {/* Title and status */}\n <TitleContainer height=\"100%\" paddingLeft={2} paddingRight={4}>\n <ClosePreviewButton />\n <PreviewTitle\n tag=\"h1\"\n title={title}\n maxWidth=\"200px\"\n fontSize={2}\n paddingLeft={2}\n paddingRight={3}\n fontWeight={600}\n >\n {title}\n </PreviewTitle>\n <Status />\n </TitleContainer>\n\n {/* Tabs and actions */}\n <Flex flex={1} paddingRight={2} justifyContent=\"space-between\">\n <PreviewTabs />\n <IconButton\n type=\"button\"\n label={formatMessage({\n id: 'preview.copy.label',\n defaultMessage: 'Copy preview link',\n })}\n onClick={handleCopyLink}\n >\n <LinkIcon />\n </IconButton>\n </Flex>\n </Flex>\n );\n};\n\nconst PreviewHeader = () => {\n // Get the document title\n const title = usePreviewContext('PreviewHeader', (state) => state.title);\n\n const { formatMessage } = useIntl();\n const { toggleNotification } = useNotification();\n const { copy } = useClipboard();\n\n const handleCopyLink = () => {\n copy(window.location.href);\n toggleNotification({\n message: formatMessage({\n id: 'content-manager.preview.copy.success',\n defaultMessage: 'Copied preview link',\n }),\n type: 'success',\n });\n };\n\n return (\n <Grid.Root\n gap={3}\n gridCols={3}\n paddingLeft={2}\n paddingRight={2}\n background=\"neutral0\"\n borderColor=\"neutral150\"\n tag=\"header\"\n >\n {/* Title and status */}\n <Grid.Item xs={1} paddingTop={2} paddingBottom={2} gap={3}>\n <ClosePreviewButton />\n <PreviewTitle tag=\"h1\" fontWeight={600} fontSize={2} maxWidth=\"200px\" title={title}>\n {title}\n </PreviewTitle>\n <Status />\n </Grid.Item>\n {/* Tabs */}\n <Grid.Item xs={1} marginBottom=\"-1px\" alignItems=\"end\" margin=\"auto\">\n <PreviewTabs />\n </Grid.Item>\n {/* Copy link */}\n <Grid.Item xs={1} justifyContent=\"end\" paddingTop={2} paddingBottom={2}>\n <IconButton\n type=\"button\"\n label={formatMessage({\n id: 'preview.copy.label',\n defaultMessage: 'Copy preview link',\n })}\n onClick={handleCopyLink}\n >\n <LinkIcon />\n </IconButton>\n </Grid.Item>\n </Grid.Root>\n );\n};\n\nconst PreviewTitle = styled(Typography)`\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n`;\n\nconst StatusTab = styled(Tabs.Trigger)`\n text-transform: uppercase;\n`;\n\nconst TitleContainer = styled(Flex)`\n border-right: 1px solid ${({ theme }) => theme.colors.neutral150};\n`;\n\nexport { PreviewHeader, UnstablePreviewHeader };\n","import * as React from 'react';\n\nimport { Page, useQueryParams, useRBAC, createContext } from '@strapi/admin/strapi-admin';\nimport { Box, Flex, FocusTrap, Portal } from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\nimport { useParams } from 'react-router-dom';\n\nimport { GetPreviewUrl } from '../../../../shared/contracts/preview';\nimport { COLLECTION_TYPES } from '../../constants/collections';\nimport { DocumentRBAC } from '../../features/DocumentRBAC';\nimport { type UseDocument, useDocument } from '../../hooks/useDocument';\nimport { useDocumentLayout } from '../../hooks/useDocumentLayout';\nimport { buildValidParams } from '../../utils/api';\nimport { PreviewContent, UnstablePreviewContent } from '../components/PreviewContent';\nimport { PreviewHeader, UnstablePreviewHeader } from '../components/PreviewHeader';\nimport { useGetPreviewUrlQuery } from '../services/preview';\n\nimport type { UID } from '@strapi/types';\n\n/* -------------------------------------------------------------------------------------------------\n * PreviewProvider\n * -----------------------------------------------------------------------------------------------*/\n\ninterface PreviewContextValue {\n url: string;\n title: string;\n document: NonNullable<ReturnType<UseDocument>['document']>;\n meta: NonNullable<ReturnType<UseDocument>['meta']>;\n schema: NonNullable<ReturnType<UseDocument>['schema']>;\n}\n\nconst [PreviewProvider, usePreviewContext] = createContext<PreviewContextValue>('PreviewPage');\n\n/* -------------------------------------------------------------------------------------------------\n * PreviewPage\n * -----------------------------------------------------------------------------------------------*/\n\nconst PreviewPage = () => {\n const { formatMessage } = useIntl();\n\n // Read all the necessary data from the URL to find the right preview URL\n const {\n slug: model,\n id: documentId,\n collectionType,\n } = useParams<{\n slug: UID.ContentType;\n id: string;\n collectionType: string;\n }>();\n const [{ query }] = useQueryParams<{\n plugins?: Record<string, unknown>;\n }>();\n\n const params = React.useMemo(() => buildValidParams(query), [query]);\n\n if (!collectionType) {\n throw new Error('Could not find collectionType in url params');\n }\n\n if (!model) {\n throw new Error('Could not find model in url params');\n }\n\n // Only collection types must have a documentId\n if (collectionType === COLLECTION_TYPES && !documentId) {\n throw new Error('Could not find documentId in url params');\n }\n\n const previewUrlResponse = useGetPreviewUrlQuery({\n params: {\n contentType: model,\n },\n query: {\n documentId,\n locale: params.locale,\n status: params.status as GetPreviewUrl.Request['query']['status'],\n },\n });\n\n const documentResponse = useDocument({\n model,\n collectionType,\n documentId,\n params,\n });\n\n const documentLayoutResponse = useDocumentLayout(model);\n\n if (\n documentResponse.isLoading ||\n previewUrlResponse.isLoading ||\n documentLayoutResponse.isLoading\n ) {\n return <Page.Loading />;\n }\n\n if (\n previewUrlResponse.error ||\n documentLayoutResponse.error ||\n !documentResponse.document ||\n !documentResponse.meta ||\n !documentResponse.schema\n ) {\n return <Page.Error />;\n }\n\n if (!previewUrlResponse.data?.data?.url) {\n return <Page.NoData />;\n }\n\n const documentTitle = documentResponse.getTitle(documentLayoutResponse.edit.settings.mainField);\n\n return (\n <>\n <Page.Title>\n {formatMessage(\n {\n id: 'content-manager.preview.page-title',\n defaultMessage: '{contentType} preview',\n },\n {\n contentType: documentTitle,\n }\n )}\n </Page.Title>\n <PreviewProvider\n url={previewUrlResponse.data.data.url}\n document={documentResponse.document}\n title={documentTitle}\n meta={documentResponse.meta}\n schema={documentResponse.schema}\n >\n <Flex direction=\"column\" height=\"100%\" alignItems=\"stretch\">\n {window.strapi.future.isEnabled('unstablePreviewSideEditor') ? (\n <>\n <UnstablePreviewHeader />\n <UnstablePreviewContent />\n </>\n ) : (\n <>\n <PreviewHeader />\n <PreviewContent />\n </>\n )}\n </Flex>\n </PreviewProvider>\n </>\n );\n};\n\n/* -------------------------------------------------------------------------------------------------\n * ProtectedPreviewPage\n * -----------------------------------------------------------------------------------------------*/\n\nconst ProtectedPreviewPageImpl = () => {\n const { slug: model } = useParams<{\n slug: string;\n }>();\n const {\n permissions = [],\n isLoading,\n error,\n } = useRBAC([{ action: 'plugin::content-manager.explorer.read', subject: model }]);\n\n if (isLoading) {\n return <Page.Loading />;\n }\n\n if (error || !model) {\n return (\n <Box\n height=\"100vh\"\n width=\"100vw\"\n position=\"fixed\"\n top={0}\n left={0}\n zIndex={2}\n background=\"neutral0\"\n >\n <Page.Error />\n </Box>\n );\n }\n\n return (\n <Box\n height=\"100vh\"\n width=\"100vw\"\n position=\"fixed\"\n top={0}\n left={0}\n zIndex={2}\n background=\"neutral0\"\n >\n <Page.Protect permissions={permissions}>\n {({ permissions }) => (\n <DocumentRBAC permissions={permissions}>\n <PreviewPage />\n </DocumentRBAC>\n )}\n </Page.Protect>\n </Box>\n );\n};\n\nconst ProtectedPreviewPage = () => {\n return (\n <Portal>\n <FocusTrap>\n <ProtectedPreviewPageImpl />\n </FocusTrap>\n </Portal>\n );\n};\n\nexport { ProtectedPreviewPage, usePreviewContext };\n"],"names":["UnstablePreviewContent","previewUrl","usePreviewContext","state","url","formatMessage","useIntl","_jsxs","Flex","height","_jsx","Box","flex","src","title","id","defaultMessage","borderWidth","tag","PreviewContent","width","ClosePreviewButton","query","useQueryParams","canGoBack","useHistory","goBack","history","locationIndex","currentLocationIndex","historyTo","at","undefined","fallback","pathname","search","stringify","encode","toWithFallback","handleClick","e","preventDefault","IconButton","variant","Link","relative","to","onClick","label","Cross","Status","document","schema","meta","hasDraftAndPublished","options","draftAndPublish","status","getDocumentStatus","DocumentStatus","size","PreviewTabs","setQuery","hasDraftAndPublish","documentStatus","handleTabChange","_Fragment","Tabs","Root","value","onValueChange","List","aria-label","StatusTab","disabled","UnstablePreviewHeader","toggleNotification","useNotification","copy","useClipboard","handleCopyLink","window","location","href","message","type","gap","background","borderColor","TitleContainer","paddingLeft","paddingRight","PreviewTitle","maxWidth","fontSize","fontWeight","justifyContent","LinkIcon","PreviewHeader","Grid","gridCols","Item","xs","paddingTop","paddingBottom","marginBottom","alignItems","margin","styled","Typography","Trigger","theme","colors","neutral150","PreviewProvider","createContext","PreviewPage","slug","model","documentId","collectionType","useParams","params","React","useMemo","buildValidParams","Error","COLLECTION_TYPES","previewUrlResponse","useGetPreviewUrlQuery","contentType","locale","documentResponse","useDocument","documentLayoutResponse","useDocumentLayout","isLoading","Page","Loading","error","data","NoData","documentTitle","getTitle","edit","settings","mainField","Title","direction","strapi","future","isEnabled","ProtectedPreviewPageImpl","permissions","useRBAC","action","subject","position","top","left","zIndex","Protect","DocumentRBAC","ProtectedPreviewPage","Portal","FocusTrap"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAMA,sBAAyB,GAAA,IAAA;AAC7B,IAAA,MAAMC,aAAaC,iBAAkB,CAAA,gBAAA,EAAkB,CAACC,KAAAA,GAAUA,MAAMC,GA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