@strapi/content-manager 0.0.0-experimental.d042f6a350fa3a48d61e7c56875e2a0a7ba3c8f5 → 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 (431) hide show
  1. package/dist/admin/chunks/CardDragPreview-DwuraT0K.mjs +80 -0
  2. package/dist/admin/chunks/CardDragPreview-DwuraT0K.mjs.map +1 -0
  3. package/dist/admin/chunks/CardDragPreview-_dubYgXO.js +82 -0
  4. package/dist/admin/chunks/CardDragPreview-_dubYgXO.js.map +1 -0
  5. package/dist/admin/chunks/ComponentConfigurationPage-CGn9IYeg.js +298 -0
  6. package/dist/admin/chunks/ComponentConfigurationPage-CGn9IYeg.js.map +1 -0
  7. package/dist/admin/chunks/ComponentConfigurationPage-DgYK4xW6.mjs +276 -0
  8. package/dist/admin/chunks/ComponentConfigurationPage-DgYK4xW6.mjs.map +1 -0
  9. package/dist/admin/chunks/ComponentIcon-BZcTc4rj.mjs +153 -0
  10. package/dist/admin/chunks/ComponentIcon-BZcTc4rj.mjs.map +1 -0
  11. package/dist/admin/chunks/ComponentIcon-C-EjOUPA.js +176 -0
  12. package/dist/admin/chunks/ComponentIcon-C-EjOUPA.js.map +1 -0
  13. package/dist/admin/chunks/EditConfigurationPage-7w_-4jF4.js +180 -0
  14. package/dist/admin/chunks/EditConfigurationPage-7w_-4jF4.js.map +1 -0
  15. package/dist/admin/chunks/EditConfigurationPage-C05SwwH-.mjs +158 -0
  16. package/dist/admin/chunks/EditConfigurationPage-C05SwwH-.mjs.map +1 -0
  17. package/dist/admin/chunks/EditViewPage-CVRJBOEv.mjs +318 -0
  18. package/dist/admin/chunks/EditViewPage-CVRJBOEv.mjs.map +1 -0
  19. package/dist/admin/chunks/EditViewPage-CuQfZJDf.js +341 -0
  20. package/dist/admin/chunks/EditViewPage-CuQfZJDf.js.map +1 -0
  21. package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.mjs +56 -0
  22. package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.mjs.map +1 -0
  23. package/dist/admin/chunks/FieldTypeIcon-Bxh-7Jin.js +58 -0
  24. package/dist/admin/chunks/FieldTypeIcon-Bxh-7Jin.js.map +1 -0
  25. package/dist/admin/chunks/Form-BqNYRsCb.js +978 -0
  26. package/dist/admin/chunks/Form-BqNYRsCb.js.map +1 -0
  27. package/dist/admin/chunks/Form-DaEnqAeV.mjs +955 -0
  28. package/dist/admin/chunks/Form-DaEnqAeV.mjs.map +1 -0
  29. package/dist/admin/chunks/History-B7dGNfmx.mjs +1361 -0
  30. package/dist/admin/chunks/History-B7dGNfmx.mjs.map +1 -0
  31. package/dist/admin/chunks/History-CEoOna4w.js +1384 -0
  32. package/dist/admin/chunks/History-CEoOna4w.js.map +1 -0
  33. package/dist/admin/chunks/Input-B3QUS9rv.mjs +8473 -0
  34. package/dist/admin/chunks/Input-B3QUS9rv.mjs.map +1 -0
  35. package/dist/admin/chunks/Input-B8I0b9aD.js +8507 -0
  36. package/dist/admin/chunks/Input-B8I0b9aD.js.map +1 -0
  37. package/dist/admin/chunks/ListConfigurationPage-BbjJweN-.js +818 -0
  38. package/dist/admin/chunks/ListConfigurationPage-BbjJweN-.js.map +1 -0
  39. package/dist/admin/chunks/ListConfigurationPage-VtFQ5mOK.mjs +795 -0
  40. package/dist/admin/chunks/ListConfigurationPage-VtFQ5mOK.mjs.map +1 -0
  41. package/dist/admin/chunks/ListViewPage-Cg3zbT7Y.mjs +1132 -0
  42. package/dist/admin/chunks/ListViewPage-Cg3zbT7Y.mjs.map +1 -0
  43. package/dist/admin/chunks/ListViewPage-CzUm2VJN.js +1154 -0
  44. package/dist/admin/chunks/ListViewPage-CzUm2VJN.js.map +1 -0
  45. package/dist/admin/chunks/NoContentTypePage-FcLLn2Wt.js +60 -0
  46. package/dist/admin/chunks/NoContentTypePage-FcLLn2Wt.js.map +1 -0
  47. package/dist/admin/chunks/NoContentTypePage-NOf7Aq_E.mjs +58 -0
  48. package/dist/admin/chunks/NoContentTypePage-NOf7Aq_E.mjs.map +1 -0
  49. package/dist/admin/chunks/NoPermissionsPage-DmeyXtCk.js +39 -0
  50. package/dist/admin/chunks/NoPermissionsPage-DmeyXtCk.js.map +1 -0
  51. package/dist/admin/chunks/NoPermissionsPage-OVr9KG6L.mjs +37 -0
  52. package/dist/admin/chunks/NoPermissionsPage-OVr9KG6L.mjs.map +1 -0
  53. package/dist/admin/chunks/Preview-BH9l1QXk.mjs +593 -0
  54. package/dist/admin/chunks/Preview-BH9l1QXk.mjs.map +1 -0
  55. package/dist/admin/chunks/Preview-BYKkpc11.js +615 -0
  56. package/dist/admin/chunks/Preview-BYKkpc11.js.map +1 -0
  57. package/dist/admin/chunks/ar-DckYq_WK.mjs +222 -0
  58. package/dist/{_chunks/ar-CCEVvqGG.mjs.map → admin/chunks/ar-DckYq_WK.mjs.map} +1 -1
  59. package/dist/admin/chunks/ar-DeQBSsfl.js +227 -0
  60. package/dist/{_chunks/ru-BT3ybNny.js.map → admin/chunks/ar-DeQBSsfl.js.map} +1 -1
  61. package/dist/admin/chunks/ca-ClDTvatJ.js +202 -0
  62. package/dist/admin/chunks/ca-ClDTvatJ.js.map +1 -0
  63. package/dist/admin/chunks/ca-DviY7mRj.mjs +197 -0
  64. package/dist/admin/chunks/ca-DviY7mRj.mjs.map +1 -0
  65. package/dist/admin/chunks/cs-BJFxwIWj.js +126 -0
  66. package/dist/{_chunks/cs-CkJy6B2v.js.map → admin/chunks/cs-BJFxwIWj.js.map} +1 -1
  67. package/dist/admin/chunks/cs-C7OSYFQ7.mjs +122 -0
  68. package/dist/{_chunks/cs-CM2aBUar.mjs.map → admin/chunks/cs-C7OSYFQ7.mjs.map} +1 -1
  69. package/dist/admin/chunks/de-5QRlDHyR.mjs +195 -0
  70. package/dist/{_chunks/eu-CdALomew.mjs.map → admin/chunks/de-5QRlDHyR.mjs.map} +1 -1
  71. package/dist/admin/chunks/de-CbImAUA5.js +200 -0
  72. package/dist/{_chunks/gu-BRmF601H.js.map → admin/chunks/de-CbImAUA5.js.map} +1 -1
  73. package/dist/admin/chunks/en-C2zEwS3-.mjs +313 -0
  74. package/dist/{_chunks/en-D65uIF6Y.mjs.map → admin/chunks/en-C2zEwS3-.mjs.map} +1 -1
  75. package/dist/admin/chunks/en-G976DLsg.js +318 -0
  76. package/dist/{_chunks/en-BR48D_RH.js.map → admin/chunks/en-G976DLsg.js.map} +1 -1
  77. package/dist/admin/chunks/es-C8vLuvZL.js +197 -0
  78. package/dist/{_chunks/es-9K52xZIr.js.map → admin/chunks/es-C8vLuvZL.js.map} +1 -1
  79. package/dist/admin/chunks/es-DkoWSExG.mjs +192 -0
  80. package/dist/{_chunks/ja-BHqhDq4V.mjs.map → admin/chunks/es-DkoWSExG.mjs.map} +1 -1
  81. package/dist/admin/chunks/eu-BG1xX7HK.mjs +198 -0
  82. package/dist/admin/chunks/eu-BG1xX7HK.mjs.map +1 -0
  83. package/dist/admin/chunks/eu-BJW3AvXu.js +203 -0
  84. package/dist/admin/chunks/eu-BJW3AvXu.js.map +1 -0
  85. package/dist/admin/chunks/fr-CFdRaRVj.mjs +215 -0
  86. package/dist/admin/chunks/fr-CFdRaRVj.mjs.map +1 -0
  87. package/dist/admin/chunks/fr-gQSilC7w.js +220 -0
  88. package/dist/admin/chunks/fr-gQSilC7w.js.map +1 -0
  89. package/dist/admin/chunks/gu-D5MMMXRs.mjs +196 -0
  90. package/dist/admin/chunks/gu-D5MMMXRs.mjs.map +1 -0
  91. package/dist/admin/chunks/gu-DPU4wyx7.js +201 -0
  92. package/dist/{_chunks/eu-VDH-3ovk.js.map → admin/chunks/gu-DPU4wyx7.js.map} +1 -1
  93. package/dist/admin/chunks/hi-Dp4omeBb.js +201 -0
  94. package/dist/admin/chunks/hi-Dp4omeBb.js.map +1 -0
  95. package/dist/admin/chunks/hi-lp17SCjr.mjs +196 -0
  96. package/dist/admin/chunks/hi-lp17SCjr.mjs.map +1 -0
  97. package/dist/{_chunks/hooks-BAaaKPS_.js → admin/chunks/hooks-D-sOYd1s.js} +6 -3
  98. package/dist/admin/chunks/hooks-D-sOYd1s.js.map +1 -0
  99. package/dist/admin/chunks/hooks-DMvik5y_.mjs +7 -0
  100. package/dist/admin/chunks/hooks-DMvik5y_.mjs.map +1 -0
  101. package/dist/admin/chunks/hu-CLka1U2C.mjs +198 -0
  102. package/dist/admin/chunks/hu-CLka1U2C.mjs.map +1 -0
  103. package/dist/admin/chunks/hu-CtFJuhTd.js +203 -0
  104. package/dist/admin/chunks/hu-CtFJuhTd.js.map +1 -0
  105. package/dist/admin/chunks/id-D7V5S1rB.js +161 -0
  106. package/dist/{_chunks/it-DkBIs7vD.js.map → admin/chunks/id-D7V5S1rB.js.map} +1 -1
  107. package/dist/admin/chunks/id-USfY9m1g.mjs +156 -0
  108. package/dist/{_chunks/id-BtwA9WJT.mjs.map → admin/chunks/id-USfY9m1g.mjs.map} +1 -1
  109. package/dist/admin/chunks/index-BE7PI9Wp.mjs +5450 -0
  110. package/dist/admin/chunks/index-BE7PI9Wp.mjs.map +1 -0
  111. package/dist/admin/chunks/index-BwIhYBsG.js +5520 -0
  112. package/dist/admin/chunks/index-BwIhYBsG.js.map +1 -0
  113. package/dist/admin/chunks/it-BAHrwmYS.mjs +158 -0
  114. package/dist/{_chunks/it-BrVPqaf1.mjs.map → admin/chunks/it-BAHrwmYS.mjs.map} +1 -1
  115. package/dist/admin/chunks/it-CQFpa_Dc.js +163 -0
  116. package/dist/{_chunks/ko-woFZPmLk.js.map → admin/chunks/it-CQFpa_Dc.js.map} +1 -1
  117. package/dist/admin/chunks/ja-BWKmBJFT.mjs +192 -0
  118. package/dist/{_chunks/ko-HVQRlfUI.mjs.map → admin/chunks/ja-BWKmBJFT.mjs.map} +1 -1
  119. package/dist/admin/chunks/ja-jdQM-B79.js +197 -0
  120. package/dist/{_chunks/de-CCEmbAah.js.map → admin/chunks/ja-jdQM-B79.js.map} +1 -1
  121. package/dist/admin/chunks/ko-CgADGBNt.mjs +191 -0
  122. package/dist/{_chunks/es-D34tqjMw.mjs.map → admin/chunks/ko-CgADGBNt.mjs.map} +1 -1
  123. package/dist/admin/chunks/ko-k46sEyzt.js +196 -0
  124. package/dist/{_chunks/ja-7sfIbjxE.js.map → admin/chunks/ko-k46sEyzt.js.map} +1 -1
  125. package/dist/admin/chunks/layout-9zlUM9V3.mjs +672 -0
  126. package/dist/admin/chunks/layout-9zlUM9V3.mjs.map +1 -0
  127. package/dist/admin/chunks/layout-Cr0HaJVS.js +692 -0
  128. package/dist/admin/chunks/layout-Cr0HaJVS.js.map +1 -0
  129. package/dist/admin/chunks/ml-CnhCfOn_.mjs +196 -0
  130. package/dist/admin/chunks/ml-CnhCfOn_.mjs.map +1 -0
  131. package/dist/admin/chunks/ml-DqxPwODx.js +201 -0
  132. package/dist/admin/chunks/ml-DqxPwODx.js.map +1 -0
  133. package/dist/admin/chunks/ms-Bh09NFff.mjs +140 -0
  134. package/dist/{_chunks/ms-m_WjyWx7.mjs.map → admin/chunks/ms-Bh09NFff.mjs.map} +1 -1
  135. package/dist/admin/chunks/ms-CvSC0OdG.js +145 -0
  136. package/dist/{_chunks/ms-BuFotyP_.js.map → admin/chunks/ms-CvSC0OdG.js.map} +1 -1
  137. package/dist/admin/chunks/nl-BEubhS8C.js +203 -0
  138. package/dist/admin/chunks/nl-BEubhS8C.js.map +1 -0
  139. package/dist/admin/chunks/nl-C8HYflTc.mjs +198 -0
  140. package/dist/admin/chunks/nl-C8HYflTc.mjs.map +1 -0
  141. package/dist/admin/chunks/objects-BJTP843m.js +343 -0
  142. package/dist/admin/chunks/objects-BJTP843m.js.map +1 -0
  143. package/dist/admin/chunks/objects-D2z-IJgu.mjs +317 -0
  144. package/dist/admin/chunks/objects-D2z-IJgu.mjs.map +1 -0
  145. package/dist/admin/chunks/pl-DWhGDzmM.js +200 -0
  146. package/dist/{_chunks/ca-Cmk45QO6.js.map → admin/chunks/pl-DWhGDzmM.js.map} +1 -1
  147. package/dist/admin/chunks/pl-MFCZJZuZ.mjs +195 -0
  148. package/dist/{_chunks/ca-5U32ON2v.mjs.map → admin/chunks/pl-MFCZJZuZ.mjs.map} +1 -1
  149. package/dist/admin/chunks/pt-BR-CPtAXD-4.js +202 -0
  150. package/dist/{_chunks/pt-BR-BiOz37D9.js.map → admin/chunks/pt-BR-CPtAXD-4.js.map} +1 -1
  151. package/dist/admin/chunks/pt-BR-CcotyBGJ.mjs +197 -0
  152. package/dist/{_chunks/pt-BR-C71iDxnh.mjs.map → admin/chunks/pt-BR-CcotyBGJ.mjs.map} +1 -1
  153. package/dist/admin/chunks/pt-BoPxN80n.js +96 -0
  154. package/dist/admin/chunks/pt-BoPxN80n.js.map +1 -0
  155. package/dist/admin/chunks/pt-HbmgeiYO.mjs +93 -0
  156. package/dist/admin/chunks/pt-HbmgeiYO.mjs.map +1 -0
  157. package/dist/admin/chunks/ru-C0op0ALG.js +232 -0
  158. package/dist/admin/chunks/ru-C0op0ALG.js.map +1 -0
  159. package/dist/admin/chunks/ru-CB4BUyQp.mjs +230 -0
  160. package/dist/{_chunks/ru-BE6A4Exp.mjs.map → admin/chunks/ru-CB4BUyQp.mjs.map} +1 -1
  161. package/dist/admin/chunks/sa-B_FuPyMw.js +201 -0
  162. package/dist/admin/chunks/sa-B_FuPyMw.js.map +1 -0
  163. package/dist/admin/chunks/sa-n_aPA-pU.mjs +196 -0
  164. package/dist/admin/chunks/sa-n_aPA-pU.mjs.map +1 -0
  165. package/dist/admin/chunks/sk-D_iXML2C.js +203 -0
  166. package/dist/admin/chunks/sk-D_iXML2C.js.map +1 -0
  167. package/dist/admin/chunks/sk-tn_BDjE2.mjs +198 -0
  168. package/dist/admin/chunks/sk-tn_BDjE2.mjs.map +1 -0
  169. package/dist/admin/chunks/sv-BstBC1Yp.js +203 -0
  170. package/dist/admin/chunks/sv-BstBC1Yp.js.map +1 -0
  171. package/dist/admin/chunks/sv-cq4ZrQRd.mjs +198 -0
  172. package/dist/admin/chunks/sv-cq4ZrQRd.mjs.map +1 -0
  173. package/dist/admin/chunks/th-lXoOCqPC.js +149 -0
  174. package/dist/{_chunks/th-D9_GfAjc.js.map → admin/chunks/th-lXoOCqPC.js.map} +1 -1
  175. package/dist/admin/chunks/th-mUH7hEtc.mjs +144 -0
  176. package/dist/{_chunks/uk-CR-zDhAY.mjs.map → admin/chunks/th-mUH7hEtc.mjs.map} +1 -1
  177. package/dist/admin/chunks/tr-CkS6sLIE.js +200 -0
  178. package/dist/admin/chunks/tr-CkS6sLIE.js.map +1 -0
  179. package/dist/admin/chunks/tr-Yt38daxh.mjs +195 -0
  180. package/dist/{_chunks/de-C72KDNOl.mjs.map → admin/chunks/tr-Yt38daxh.mjs.map} +1 -1
  181. package/dist/admin/chunks/uk-BtM6WnaE.mjs +313 -0
  182. package/dist/admin/chunks/uk-BtM6WnaE.mjs.map +1 -0
  183. package/dist/admin/chunks/uk-DB6OgySY.js +318 -0
  184. package/dist/admin/chunks/uk-DB6OgySY.js.map +1 -0
  185. package/dist/admin/chunks/usePrev-DgZBp9Oo.js +194 -0
  186. package/dist/admin/chunks/usePrev-DgZBp9Oo.js.map +1 -0
  187. package/dist/admin/chunks/usePrev-PisKKvhT.mjs +187 -0
  188. package/dist/admin/chunks/usePrev-PisKKvhT.mjs.map +1 -0
  189. package/dist/admin/chunks/vi-BGr1X_HZ.js +112 -0
  190. package/dist/{_chunks/vi-CJlYDheJ.js.map → admin/chunks/vi-BGr1X_HZ.js.map} +1 -1
  191. package/dist/admin/chunks/vi-CvBGlTjr.mjs +108 -0
  192. package/dist/{_chunks/vi-DUXIk_fw.mjs.map → admin/chunks/vi-CvBGlTjr.mjs.map} +1 -1
  193. package/dist/admin/chunks/zh-BmF-sHaT.mjs +205 -0
  194. package/dist/admin/chunks/zh-BmF-sHaT.mjs.map +1 -0
  195. package/dist/admin/chunks/zh-DwFu_Kfj.js +210 -0
  196. package/dist/admin/chunks/zh-DwFu_Kfj.js.map +1 -0
  197. package/dist/admin/chunks/zh-Hans-CI0HKio3.mjs +934 -0
  198. package/dist/{_chunks/zh-Hans-BPQcRIyH.mjs.map → admin/chunks/zh-Hans-CI0HKio3.mjs.map} +1 -1
  199. package/dist/admin/chunks/zh-Hans-JVK9x7xr.js +953 -0
  200. package/dist/{_chunks/zh-Hans-9kOncHGw.js.map → admin/chunks/zh-Hans-JVK9x7xr.js.map} +1 -1
  201. package/dist/admin/index.js +24 -4
  202. package/dist/admin/index.js.map +1 -1
  203. package/dist/admin/index.mjs +17 -13
  204. package/dist/admin/index.mjs.map +1 -1
  205. package/dist/admin/src/components/InjectionZone.d.ts +7 -1
  206. package/dist/admin/src/content-manager.d.ts +4 -0
  207. package/dist/admin/src/features/DocumentContext.d.ts +53 -0
  208. package/dist/admin/src/features/DocumentRBAC.d.ts +3 -2
  209. package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
  210. package/dist/admin/src/hooks/useDocument.d.ts +4 -2
  211. package/dist/admin/src/hooks/useDocumentActions.d.ts +1 -0
  212. package/dist/admin/src/index.d.ts +1 -0
  213. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +2 -1
  214. package/dist/admin/src/pages/EditView/components/EditorToolbarObserver.d.ts +11 -0
  215. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/Code.d.ts +49 -1
  216. package/dist/admin/src/pages/EditView/components/FormInputs/Relations/RelationModal.d.ts +8 -0
  217. package/dist/admin/src/pages/EditView/components/FormInputs/{Relations.d.ts → Relations/Relations.d.ts} +8 -2
  218. package/dist/admin/src/pages/EditView/components/FormInputs/Wysiwyg/WysiwygNav.d.ts +1 -2
  219. package/dist/admin/src/pages/EditView/components/FormLayout.d.ts +9 -3
  220. package/dist/admin/src/pages/EditView/components/InputRenderer.d.ts +7 -4
  221. package/dist/admin/src/preview/index.d.ts +2 -3
  222. package/dist/admin/src/preview/pages/Preview.d.ts +2 -0
  223. package/dist/server/index.js +5459 -4387
  224. package/dist/server/index.js.map +1 -1
  225. package/dist/server/index.mjs +5446 -4372
  226. package/dist/server/index.mjs.map +1 -1
  227. package/dist/server/src/controllers/utils/metadata.d.ts +1 -1
  228. package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -1
  229. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  230. package/dist/server/src/services/utils/count.d.ts +1 -1
  231. package/dist/server/src/services/utils/count.d.ts.map +1 -1
  232. package/dist/server/src/services/utils/populate.d.ts +1 -1
  233. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  234. package/dist/shared/contracts/collection-types.d.ts +0 -1
  235. package/dist/shared/contracts/components.d.ts +0 -1
  236. package/dist/shared/contracts/content-types.d.ts +0 -1
  237. package/dist/shared/contracts/history-versions.d.ts +0 -1
  238. package/dist/shared/contracts/index.d.ts +0 -1
  239. package/dist/shared/contracts/init.d.ts +0 -1
  240. package/dist/shared/contracts/preview.d.ts +0 -1
  241. package/dist/shared/contracts/relations.d.ts +1 -2
  242. package/dist/shared/contracts/relations.d.ts.map +1 -1
  243. package/dist/shared/contracts/review-workflows.d.ts +0 -1
  244. package/dist/shared/contracts/single-types.d.ts +0 -1
  245. package/dist/shared/contracts/uid.d.ts +0 -1
  246. package/dist/shared/index.d.ts +0 -1
  247. package/dist/shared/index.js +35 -24
  248. package/dist/shared/index.js.map +1 -1
  249. package/dist/shared/index.mjs +34 -25
  250. package/dist/shared/index.mjs.map +1 -1
  251. package/package.json +16 -13
  252. package/dist/_chunks/CardDragPreview-C0QyJgRA.js +0 -69
  253. package/dist/_chunks/CardDragPreview-C0QyJgRA.js.map +0 -1
  254. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs +0 -70
  255. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs.map +0 -1
  256. package/dist/_chunks/ComponentConfigurationPage-9_4yUE9L.mjs +0 -236
  257. package/dist/_chunks/ComponentConfigurationPage-9_4yUE9L.mjs.map +0 -1
  258. package/dist/_chunks/ComponentConfigurationPage-DBSh-kET.js +0 -254
  259. package/dist/_chunks/ComponentConfigurationPage-DBSh-kET.js.map +0 -1
  260. package/dist/_chunks/ComponentIcon-CRbtQEUV.js +0 -175
  261. package/dist/_chunks/ComponentIcon-CRbtQEUV.js.map +0 -1
  262. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs +0 -157
  263. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs.map +0 -1
  264. package/dist/_chunks/EditConfigurationPage-Bl_U2JgH.js +0 -150
  265. package/dist/_chunks/EditConfigurationPage-Bl_U2JgH.js.map +0 -1
  266. package/dist/_chunks/EditConfigurationPage-COe6hjPC.mjs +0 -132
  267. package/dist/_chunks/EditConfigurationPage-COe6hjPC.mjs.map +0 -1
  268. package/dist/_chunks/EditViewPage-D4yFJET6.js +0 -209
  269. package/dist/_chunks/EditViewPage-D4yFJET6.js.map +0 -1
  270. package/dist/_chunks/EditViewPage-DrmVmYN0.mjs +0 -191
  271. package/dist/_chunks/EditViewPage-DrmVmYN0.mjs.map +0 -1
  272. package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs +0 -50
  273. package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs.map +0 -1
  274. package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js +0 -49
  275. package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js.map +0 -1
  276. package/dist/_chunks/Form-C4rSaGsz.js +0 -778
  277. package/dist/_chunks/Form-C4rSaGsz.js.map +0 -1
  278. package/dist/_chunks/Form-DamaxNpG.mjs +0 -758
  279. package/dist/_chunks/Form-DamaxNpG.mjs.map +0 -1
  280. package/dist/_chunks/History-D1PreDSY.mjs +0 -999
  281. package/dist/_chunks/History-D1PreDSY.mjs.map +0 -1
  282. package/dist/_chunks/History-DTm8UCCQ.js +0 -1019
  283. package/dist/_chunks/History-DTm8UCCQ.js.map +0 -1
  284. package/dist/_chunks/Input-B7sapvBG.js +0 -5617
  285. package/dist/_chunks/Input-B7sapvBG.js.map +0 -1
  286. package/dist/_chunks/Input-CZ1YvjHR.mjs +0 -5585
  287. package/dist/_chunks/Input-CZ1YvjHR.mjs.map +0 -1
  288. package/dist/_chunks/ListConfigurationPage-Bbi32isk.mjs +0 -633
  289. package/dist/_chunks/ListConfigurationPage-Bbi32isk.mjs.map +0 -1
  290. package/dist/_chunks/ListConfigurationPage-ysFMjKI3.js +0 -652
  291. package/dist/_chunks/ListConfigurationPage-ysFMjKI3.js.map +0 -1
  292. package/dist/_chunks/ListViewPage-Bud_jBDQ.mjs +0 -854
  293. package/dist/_chunks/ListViewPage-Bud_jBDQ.mjs.map +0 -1
  294. package/dist/_chunks/ListViewPage-DTuuxU3n.js +0 -877
  295. package/dist/_chunks/ListViewPage-DTuuxU3n.js.map +0 -1
  296. package/dist/_chunks/NoContentTypePage-CL7VVeYs.js +0 -51
  297. package/dist/_chunks/NoContentTypePage-CL7VVeYs.js.map +0 -1
  298. package/dist/_chunks/NoContentTypePage-DVhkugsf.mjs +0 -51
  299. package/dist/_chunks/NoContentTypePage-DVhkugsf.mjs.map +0 -1
  300. package/dist/_chunks/NoPermissionsPage-CMdM-dCo.mjs +0 -23
  301. package/dist/_chunks/NoPermissionsPage-CMdM-dCo.mjs.map +0 -1
  302. package/dist/_chunks/NoPermissionsPage-v7I599vC.js +0 -23
  303. package/dist/_chunks/NoPermissionsPage-v7I599vC.js.map +0 -1
  304. package/dist/_chunks/Preview-BNuU0SuQ.mjs +0 -287
  305. package/dist/_chunks/Preview-BNuU0SuQ.mjs.map +0 -1
  306. package/dist/_chunks/Preview-Cxq-uI6D.js +0 -305
  307. package/dist/_chunks/Preview-Cxq-uI6D.js.map +0 -1
  308. package/dist/_chunks/Relations-C2Ahkrdg.mjs +0 -728
  309. package/dist/_chunks/Relations-C2Ahkrdg.mjs.map +0 -1
  310. package/dist/_chunks/Relations-CWS79QQn.js +0 -747
  311. package/dist/_chunks/Relations-CWS79QQn.js.map +0 -1
  312. package/dist/_chunks/ar-BUUWXIYu.js +0 -226
  313. package/dist/_chunks/ar-BUUWXIYu.js.map +0 -1
  314. package/dist/_chunks/ar-CCEVvqGG.mjs +0 -226
  315. package/dist/_chunks/ca-5U32ON2v.mjs +0 -201
  316. package/dist/_chunks/ca-Cmk45QO6.js +0 -201
  317. package/dist/_chunks/cs-CM2aBUar.mjs +0 -125
  318. package/dist/_chunks/cs-CkJy6B2v.js +0 -125
  319. package/dist/_chunks/de-C72KDNOl.mjs +0 -199
  320. package/dist/_chunks/de-CCEmbAah.js +0 -199
  321. package/dist/_chunks/en-BR48D_RH.js +0 -312
  322. package/dist/_chunks/en-D65uIF6Y.mjs +0 -312
  323. package/dist/_chunks/es-9K52xZIr.js +0 -196
  324. package/dist/_chunks/es-D34tqjMw.mjs +0 -196
  325. package/dist/_chunks/eu-CdALomew.mjs +0 -202
  326. package/dist/_chunks/eu-VDH-3ovk.js +0 -202
  327. package/dist/_chunks/fr-C43IbhA_.js +0 -219
  328. package/dist/_chunks/fr-C43IbhA_.js.map +0 -1
  329. package/dist/_chunks/fr-DBseuRuB.mjs +0 -219
  330. package/dist/_chunks/fr-DBseuRuB.mjs.map +0 -1
  331. package/dist/_chunks/gu-BRmF601H.js +0 -200
  332. package/dist/_chunks/gu-CNpaMDpH.mjs +0 -200
  333. package/dist/_chunks/gu-CNpaMDpH.mjs.map +0 -1
  334. package/dist/_chunks/hi-CCJBptSq.js +0 -200
  335. package/dist/_chunks/hi-CCJBptSq.js.map +0 -1
  336. package/dist/_chunks/hi-Dwvd04m3.mjs +0 -200
  337. package/dist/_chunks/hi-Dwvd04m3.mjs.map +0 -1
  338. package/dist/_chunks/hooks-BAaaKPS_.js.map +0 -1
  339. package/dist/_chunks/hooks-E5u1mcgM.mjs +0 -8
  340. package/dist/_chunks/hooks-E5u1mcgM.mjs.map +0 -1
  341. package/dist/_chunks/hu-CeYvaaO0.mjs +0 -202
  342. package/dist/_chunks/hu-CeYvaaO0.mjs.map +0 -1
  343. package/dist/_chunks/hu-sNV_yLYy.js +0 -202
  344. package/dist/_chunks/hu-sNV_yLYy.js.map +0 -1
  345. package/dist/_chunks/id-B5Ser98A.js +0 -160
  346. package/dist/_chunks/id-B5Ser98A.js.map +0 -1
  347. package/dist/_chunks/id-BtwA9WJT.mjs +0 -160
  348. package/dist/_chunks/index-DQsvBb_N.js +0 -4500
  349. package/dist/_chunks/index-DQsvBb_N.js.map +0 -1
  350. package/dist/_chunks/index-ZKrsjv-2.mjs +0 -4481
  351. package/dist/_chunks/index-ZKrsjv-2.mjs.map +0 -1
  352. package/dist/_chunks/it-BrVPqaf1.mjs +0 -162
  353. package/dist/_chunks/it-DkBIs7vD.js +0 -162
  354. package/dist/_chunks/ja-7sfIbjxE.js +0 -196
  355. package/dist/_chunks/ja-BHqhDq4V.mjs +0 -196
  356. package/dist/_chunks/ko-HVQRlfUI.mjs +0 -195
  357. package/dist/_chunks/ko-woFZPmLk.js +0 -195
  358. package/dist/_chunks/layout-Cl0NhlQB.js +0 -488
  359. package/dist/_chunks/layout-Cl0NhlQB.js.map +0 -1
  360. package/dist/_chunks/layout-fQk1rMk9.mjs +0 -471
  361. package/dist/_chunks/layout-fQk1rMk9.mjs.map +0 -1
  362. package/dist/_chunks/ml-BihZwQit.mjs +0 -200
  363. package/dist/_chunks/ml-BihZwQit.mjs.map +0 -1
  364. package/dist/_chunks/ml-C2W8N8k1.js +0 -200
  365. package/dist/_chunks/ml-C2W8N8k1.js.map +0 -1
  366. package/dist/_chunks/ms-BuFotyP_.js +0 -144
  367. package/dist/_chunks/ms-m_WjyWx7.mjs +0 -144
  368. package/dist/_chunks/nl-D4R9gHx5.mjs +0 -202
  369. package/dist/_chunks/nl-D4R9gHx5.mjs.map +0 -1
  370. package/dist/_chunks/nl-bbEOHChV.js +0 -202
  371. package/dist/_chunks/nl-bbEOHChV.js.map +0 -1
  372. package/dist/_chunks/objects-BcXOv6_9.js +0 -47
  373. package/dist/_chunks/objects-BcXOv6_9.js.map +0 -1
  374. package/dist/_chunks/objects-D6yBsdmx.mjs +0 -45
  375. package/dist/_chunks/objects-D6yBsdmx.mjs.map +0 -1
  376. package/dist/_chunks/pl-sbx9mSt_.mjs +0 -199
  377. package/dist/_chunks/pl-sbx9mSt_.mjs.map +0 -1
  378. package/dist/_chunks/pl-uzwG-hk7.js +0 -199
  379. package/dist/_chunks/pl-uzwG-hk7.js.map +0 -1
  380. package/dist/_chunks/pt-BR-BiOz37D9.js +0 -201
  381. package/dist/_chunks/pt-BR-C71iDxnh.mjs +0 -201
  382. package/dist/_chunks/pt-BsaFvS8-.mjs +0 -95
  383. package/dist/_chunks/pt-BsaFvS8-.mjs.map +0 -1
  384. package/dist/_chunks/pt-CeXQuq50.js +0 -95
  385. package/dist/_chunks/pt-CeXQuq50.js.map +0 -1
  386. package/dist/_chunks/relations-BRfBxVbX.js +0 -133
  387. package/dist/_chunks/relations-BRfBxVbX.js.map +0 -1
  388. package/dist/_chunks/relations-BakOFl_1.mjs +0 -134
  389. package/dist/_chunks/relations-BakOFl_1.mjs.map +0 -1
  390. package/dist/_chunks/ru-BE6A4Exp.mjs +0 -231
  391. package/dist/_chunks/ru-BT3ybNny.js +0 -231
  392. package/dist/_chunks/sa-CcvkYInH.js +0 -200
  393. package/dist/_chunks/sa-CcvkYInH.js.map +0 -1
  394. package/dist/_chunks/sa-Dag0k-Z8.mjs +0 -200
  395. package/dist/_chunks/sa-Dag0k-Z8.mjs.map +0 -1
  396. package/dist/_chunks/sk-BFg-R8qJ.mjs +0 -202
  397. package/dist/_chunks/sk-BFg-R8qJ.mjs.map +0 -1
  398. package/dist/_chunks/sk-CvY09Xjv.js +0 -202
  399. package/dist/_chunks/sk-CvY09Xjv.js.map +0 -1
  400. package/dist/_chunks/sv-CUnfWGsh.mjs +0 -202
  401. package/dist/_chunks/sv-CUnfWGsh.mjs.map +0 -1
  402. package/dist/_chunks/sv-MYDuzgvT.js +0 -202
  403. package/dist/_chunks/sv-MYDuzgvT.js.map +0 -1
  404. package/dist/_chunks/th-BqbI8lIT.mjs +0 -148
  405. package/dist/_chunks/th-BqbI8lIT.mjs.map +0 -1
  406. package/dist/_chunks/th-D9_GfAjc.js +0 -148
  407. package/dist/_chunks/tr-CgeK3wJM.mjs +0 -199
  408. package/dist/_chunks/tr-CgeK3wJM.mjs.map +0 -1
  409. package/dist/_chunks/tr-D9UH-O_R.js +0 -199
  410. package/dist/_chunks/tr-D9UH-O_R.js.map +0 -1
  411. package/dist/_chunks/uk-C8EiqJY7.js +0 -144
  412. package/dist/_chunks/uk-C8EiqJY7.js.map +0 -1
  413. package/dist/_chunks/uk-CR-zDhAY.mjs +0 -144
  414. package/dist/_chunks/useDragAndDrop-BMtgCYzL.js +0 -245
  415. package/dist/_chunks/useDragAndDrop-BMtgCYzL.js.map +0 -1
  416. package/dist/_chunks/useDragAndDrop-DJ6jqvZN.mjs +0 -228
  417. package/dist/_chunks/useDragAndDrop-DJ6jqvZN.mjs.map +0 -1
  418. package/dist/_chunks/usePrev-CZGy2Vjf.mjs +0 -29
  419. package/dist/_chunks/usePrev-CZGy2Vjf.mjs.map +0 -1
  420. package/dist/_chunks/usePrev-D5J_2fEu.js +0 -28
  421. package/dist/_chunks/usePrev-D5J_2fEu.js.map +0 -1
  422. package/dist/_chunks/vi-CJlYDheJ.js +0 -111
  423. package/dist/_chunks/vi-DUXIk_fw.mjs +0 -111
  424. package/dist/_chunks/zh-BWZspA60.mjs +0 -209
  425. package/dist/_chunks/zh-BWZspA60.mjs.map +0 -1
  426. package/dist/_chunks/zh-CQQfszqR.js +0 -209
  427. package/dist/_chunks/zh-CQQfszqR.js.map +0 -1
  428. package/dist/_chunks/zh-Hans-9kOncHGw.js +0 -952
  429. package/dist/_chunks/zh-Hans-BPQcRIyH.mjs +0 -952
  430. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/utils/prismLanguages.d.ts +0 -49
  431. package/dist/admin/src/preview/components/PreviewContent.d.ts +0 -2
@@ -0,0 +1,593 @@
1
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import { useStrapiApp, useQueryParams, useNotification, useClipboard, DescriptionComponentRenderer, useHistory, createContext, useRBAC, Page, Form, Blocker } from '@strapi/admin/strapi-admin';
4
+ import { Typography, Tabs, Flex, IconButton, Portal, FocusTrap, Box } from '@strapi/design-system';
5
+ import { Link, Cross, ArrowLineLeft } from '@strapi/icons';
6
+ import { useIntl } from 'react-intl';
7
+ import { Link as Link$1, useParams, useLocation } from 'react-router-dom';
8
+ import { styled } from 'styled-components';
9
+ import { c as useDocumentContext, I as InjectionZone, j as DocumentActionButton, D as DocumentStatus, i as DocumentRBAC, k as buildValidParams, C as COLLECTION_TYPES, V as useGetPreviewUrlQuery, U as useDocument, d as useDocumentLayout, p as DocumentContextProvider, h as createYupSchema } from './index-BE7PI9Wp.mjs';
10
+ import { a as FormLayout } from './Input-B3QUS9rv.mjs';
11
+ import { stringify } from 'qs';
12
+ import { getDocumentStatus } from './EditViewPage-CVRJBOEv.mjs';
13
+ import 'lodash/fp/mapValues';
14
+ import 'yup';
15
+ import 'fractional-indexing';
16
+ import 'lodash/fp/pipe';
17
+ import 'date-fns';
18
+ import '@reduxjs/toolkit';
19
+ import 'prismjs';
20
+ import 'slate';
21
+ import 'slate-history';
22
+ import 'slate-react';
23
+ import 'prismjs/themes/prism-solarizedlight.css';
24
+ import 'prismjs/components/prism-asmatmel';
25
+ import 'prismjs/components/prism-bash';
26
+ import 'prismjs/components/prism-basic';
27
+ import 'prismjs/components/prism-c';
28
+ import 'prismjs/components/prism-clojure';
29
+ import 'prismjs/components/prism-cobol';
30
+ import 'prismjs/components/prism-cpp';
31
+ import 'prismjs/components/prism-csharp';
32
+ import 'prismjs/components/prism-dart';
33
+ import 'prismjs/components/prism-docker';
34
+ import 'prismjs/components/prism-elixir';
35
+ import 'prismjs/components/prism-erlang';
36
+ import 'prismjs/components/prism-fortran';
37
+ import 'prismjs/components/prism-fsharp';
38
+ import 'prismjs/components/prism-go';
39
+ import 'prismjs/components/prism-graphql';
40
+ import 'prismjs/components/prism-groovy';
41
+ import 'prismjs/components/prism-haskell';
42
+ import 'prismjs/components/prism-haxe';
43
+ import 'prismjs/components/prism-ini';
44
+ import 'prismjs/components/prism-java';
45
+ import 'prismjs/components/prism-javascript';
46
+ import 'prismjs/components/prism-jsx';
47
+ import 'prismjs/components/prism-json';
48
+ import 'prismjs/components/prism-julia';
49
+ import 'prismjs/components/prism-kotlin';
50
+ import 'prismjs/components/prism-latex';
51
+ import 'prismjs/components/prism-lua';
52
+ import 'prismjs/components/prism-markdown';
53
+ import 'prismjs/components/prism-matlab';
54
+ import 'prismjs/components/prism-makefile';
55
+ import 'prismjs/components/prism-objectivec';
56
+ import 'prismjs/components/prism-perl';
57
+ import 'prismjs/components/prism-php';
58
+ import 'prismjs/components/prism-powershell';
59
+ import 'prismjs/components/prism-python';
60
+ import 'prismjs/components/prism-r';
61
+ import 'prismjs/components/prism-ruby';
62
+ import 'prismjs/components/prism-rust';
63
+ import 'prismjs/components/prism-sas';
64
+ import 'prismjs/components/prism-scala';
65
+ import 'prismjs/components/prism-scheme';
66
+ import 'prismjs/components/prism-sql';
67
+ import 'prismjs/components/prism-stata';
68
+ import 'prismjs/components/prism-swift';
69
+ import 'prismjs/components/prism-typescript';
70
+ import 'prismjs/components/prism-tsx';
71
+ import 'prismjs/components/prism-vbnet';
72
+ import 'prismjs/components/prism-yaml';
73
+ import './usePrev-PisKKvhT.mjs';
74
+ import './objects-D2z-IJgu.mjs';
75
+ import 'react-dnd';
76
+ import 'lodash/clone';
77
+ import 'lodash/toPath';
78
+ import '@radix-ui/react-toolbar';
79
+ import 'react-dnd-html5-backend';
80
+ import './ComponentIcon-BZcTc4rj.mjs';
81
+ import '@strapi/icons/symbols';
82
+ import 'react-window';
83
+ import 'codemirror5';
84
+ import 'sanitize-html';
85
+ import 'highlight.js';
86
+ import 'markdown-it';
87
+ import 'markdown-it-abbr';
88
+ import 'markdown-it-container';
89
+ import 'markdown-it-deflist';
90
+ import 'markdown-it-emoji';
91
+ import 'markdown-it-footnote';
92
+ import 'markdown-it-ins';
93
+ import 'markdown-it-mark';
94
+ import 'markdown-it-sub';
95
+ import 'markdown-it-sup';
96
+ import 'highlight.js/styles/solarized-dark.css';
97
+ import 'codemirror5/addon/display/placeholder';
98
+
99
+ /* -------------------------------------------------------------------------------------------------
100
+ * ClosePreviewButton
101
+ * -----------------------------------------------------------------------------------------------*/ const ClosePreviewButton = ()=>{
102
+ const [{ query }] = useQueryParams();
103
+ const { formatMessage } = useIntl();
104
+ const canGoBack = useHistory('BackButton', (state)=>state.canGoBack);
105
+ const goBack = useHistory('BackButton', (state)=>state.goBack);
106
+ const history = useHistory('BackButton', (state)=>state.history);
107
+ const locationIndex = useHistory('BackButton', (state)=>state.currentLocationIndex);
108
+ /**
109
+ * Get the link destination from the history.
110
+ * Rely on a fallback (the parent edit view page) if there's no page to go back .
111
+ */ const historyTo = canGoBack ? history.at(locationIndex - 2) : undefined;
112
+ const fallback = {
113
+ pathname: '..',
114
+ search: stringify(query, {
115
+ encode: false
116
+ })
117
+ };
118
+ const toWithFallback = historyTo ?? fallback;
119
+ const handleClick = (e)=>{
120
+ if (canGoBack) {
121
+ // Prevent normal link behavior, go back in the history stack instead
122
+ e.preventDefault();
123
+ goBack();
124
+ return;
125
+ }
126
+ // Otherwise rely on native link behavior to go back to the edit view. We don't use navigate()
127
+ // here in order to get the relative="path" functionality from the Link component.
128
+ };
129
+ return /*#__PURE__*/ jsx(IconButton, {
130
+ variant: "ghost",
131
+ tag: Link$1,
132
+ relative: "path",
133
+ to: toWithFallback,
134
+ onClick: handleClick,
135
+ label: formatMessage({
136
+ id: 'content-manager.preview.header.close',
137
+ defaultMessage: 'Close preview'
138
+ }),
139
+ children: /*#__PURE__*/ jsx(Cross, {})
140
+ });
141
+ };
142
+ /* -------------------------------------------------------------------------------------------------
143
+ * Status
144
+ * -----------------------------------------------------------------------------------------------*/ const Status = ()=>{
145
+ // Get status
146
+ const document = usePreviewContext('PreviewHeader', (state)=>state.document);
147
+ const schema = usePreviewContext('PreviewHeader', (state)=>state.schema);
148
+ const meta = usePreviewContext('PreviewHeader', (state)=>state.meta);
149
+ const hasDraftAndPublished = schema?.options?.draftAndPublish ?? false;
150
+ if (!hasDraftAndPublished) {
151
+ return null;
152
+ }
153
+ const status = getDocumentStatus(document, meta);
154
+ return /*#__PURE__*/ jsx(DocumentStatus, {
155
+ status: status,
156
+ size: "XS"
157
+ });
158
+ };
159
+ const PreviewTabs = ()=>{
160
+ const { formatMessage } = useIntl();
161
+ // URL query params
162
+ const [{ query }, setQuery] = useQueryParams();
163
+ // Get status
164
+ const document = usePreviewContext('PreviewHeader', (state)=>state.document);
165
+ const schema = usePreviewContext('PreviewHeader', (state)=>state.schema);
166
+ const meta = usePreviewContext('PreviewHeader', (state)=>state.meta);
167
+ const hasDraftAndPublish = schema?.options?.draftAndPublish ?? false;
168
+ const documentStatus = getDocumentStatus(document, meta);
169
+ const handleTabChange = (status)=>{
170
+ if (status === 'published' || status === 'draft') {
171
+ setQuery({
172
+ status
173
+ }, 'push', true);
174
+ }
175
+ };
176
+ if (!hasDraftAndPublish) {
177
+ return null;
178
+ }
179
+ return /*#__PURE__*/ jsx(Tabs.Root, {
180
+ variant: "simple",
181
+ value: query.status || 'draft',
182
+ onValueChange: handleTabChange,
183
+ children: /*#__PURE__*/ jsxs(Tabs.List, {
184
+ "aria-label": formatMessage({
185
+ id: 'preview.tabs.label',
186
+ defaultMessage: 'Document status'
187
+ }),
188
+ children: [
189
+ /*#__PURE__*/ jsx(StatusTab, {
190
+ value: "draft",
191
+ children: formatMessage({
192
+ id: 'content-manager.containers.List.draft',
193
+ defaultMessage: 'draft'
194
+ })
195
+ }),
196
+ /*#__PURE__*/ jsx(StatusTab, {
197
+ value: "published",
198
+ disabled: documentStatus === 'draft',
199
+ children: formatMessage({
200
+ id: 'content-manager.containers.List.published',
201
+ defaultMessage: 'published'
202
+ })
203
+ })
204
+ ]
205
+ })
206
+ });
207
+ };
208
+ /* -------------------------------------------------------------------------------------------------
209
+ * PreviewHeader
210
+ * -----------------------------------------------------------------------------------------------*/ const PreviewHeader = ()=>{
211
+ const title = usePreviewContext('PreviewHeader', (state)=>state.title);
212
+ const document = usePreviewContext('PreviewHeader', (state)=>state.document);
213
+ const schema = usePreviewContext('PreviewHeader', (state)=>state.schema);
214
+ const meta = usePreviewContext('PreviewHeader', (state)=>state.meta);
215
+ const plugins = useStrapiApp('PreviewHeader', (state)=>state.plugins);
216
+ const onPreview = useDocumentContext('PreviewHeader', (state)=>state.onPreview);
217
+ const [{ query }] = useQueryParams();
218
+ const { formatMessage } = useIntl();
219
+ const { toggleNotification } = useNotification();
220
+ const { copy } = useClipboard();
221
+ const handleCopyLink = ()=>{
222
+ copy(window.location.href);
223
+ toggleNotification({
224
+ message: formatMessage({
225
+ id: 'content-manager.preview.copy.success',
226
+ defaultMessage: 'Copied preview link'
227
+ }),
228
+ type: 'success'
229
+ });
230
+ };
231
+ const hasDraftAndPublish = schema.options?.draftAndPublish ?? false;
232
+ const documentActionProps = {
233
+ activeTab: query.status ?? null,
234
+ collectionType: schema.kind === 'collectionType' ? 'collection-types' : 'single-types',
235
+ model: schema.uid,
236
+ documentId: document.documentId,
237
+ document,
238
+ meta,
239
+ onPreview
240
+ };
241
+ return /*#__PURE__*/ jsxs(Flex, {
242
+ height: "48px",
243
+ gap: 4,
244
+ background: "neutral0",
245
+ borderColor: "neutral150",
246
+ tag: "header",
247
+ children: [
248
+ /*#__PURE__*/ jsxs(TitleContainer, {
249
+ height: "100%",
250
+ paddingLeft: 2,
251
+ paddingRight: 4,
252
+ children: [
253
+ /*#__PURE__*/ jsx(ClosePreviewButton, {}),
254
+ /*#__PURE__*/ jsx(PreviewTitle, {
255
+ tag: "h1",
256
+ title: title,
257
+ maxWidth: "200px",
258
+ fontSize: 2,
259
+ paddingLeft: 2,
260
+ paddingRight: 3,
261
+ fontWeight: 600,
262
+ children: title
263
+ }),
264
+ /*#__PURE__*/ jsx(Status, {})
265
+ ]
266
+ }),
267
+ /*#__PURE__*/ jsxs(Flex, {
268
+ flex: 1,
269
+ paddingRight: 2,
270
+ gap: 2,
271
+ justifyContent: hasDraftAndPublish ? 'space-between' : 'flex-end',
272
+ children: [
273
+ /*#__PURE__*/ jsx(Flex, {
274
+ flex: "1 1 70%",
275
+ children: /*#__PURE__*/ jsx(PreviewTabs, {})
276
+ }),
277
+ /*#__PURE__*/ jsxs(Flex, {
278
+ gap: 2,
279
+ children: [
280
+ /*#__PURE__*/ jsx(IconButton, {
281
+ type: "button",
282
+ label: formatMessage({
283
+ id: 'preview.copy.label',
284
+ defaultMessage: 'Copy preview link'
285
+ }),
286
+ onClick: handleCopyLink,
287
+ children: /*#__PURE__*/ jsx(Link, {})
288
+ }),
289
+ /*#__PURE__*/ jsx(InjectionZone, {
290
+ area: "preview.actions"
291
+ }),
292
+ /*#__PURE__*/ jsx(DescriptionComponentRenderer, {
293
+ props: documentActionProps,
294
+ descriptions: plugins['content-manager'].apis.getDocumentActions('preview'),
295
+ children: (actions)=>{
296
+ const filteredActions = actions.filter((action)=>[
297
+ action.position
298
+ ].flat().includes('preview'));
299
+ const [primaryAction, secondaryAction] = filteredActions;
300
+ if (!primaryAction && !secondaryAction) return null;
301
+ // Both actions are available when draft and publish enabled
302
+ if (primaryAction && secondaryAction) {
303
+ return /*#__PURE__*/ jsxs(Fragment, {
304
+ children: [
305
+ /*#__PURE__*/ jsx(DocumentActionButton, {
306
+ ...secondaryAction,
307
+ variant: secondaryAction.variant || 'secondary'
308
+ }),
309
+ /*#__PURE__*/ jsx(DocumentActionButton, {
310
+ ...primaryAction,
311
+ variant: primaryAction.variant || 'default'
312
+ })
313
+ ]
314
+ });
315
+ }
316
+ // Otherwise we just have the save action
317
+ return /*#__PURE__*/ jsx(DocumentActionButton, {
318
+ ...primaryAction,
319
+ variant: primaryAction.variant || 'secondary'
320
+ });
321
+ }
322
+ })
323
+ ]
324
+ })
325
+ ]
326
+ })
327
+ ]
328
+ });
329
+ };
330
+ const PreviewTitle = styled(Typography)`
331
+ overflow: hidden;
332
+ text-overflow: ellipsis;
333
+ white-space: nowrap;
334
+ `;
335
+ const StatusTab = styled(Tabs.Trigger)`
336
+ text-transform: uppercase;
337
+ `;
338
+ const TitleContainer = styled(Flex)`
339
+ border-right: 1px solid ${({ theme })=>theme.colors.neutral150};
340
+ `;
341
+
342
+ const [PreviewProvider, usePreviewContext] = createContext('PreviewPage');
343
+ /* -------------------------------------------------------------------------------------------------
344
+ * PreviewPage
345
+ * -----------------------------------------------------------------------------------------------*/ const AnimatedArrow = styled(ArrowLineLeft)`
346
+ will-change: transform;
347
+ rotate: ${(props)=>props.isSideEditorOpen ? '0deg' : '180deg'};
348
+ transition: rotate 0.2s ease-in-out;
349
+ `;
350
+ const PreviewPage = ()=>{
351
+ const location = useLocation();
352
+ const { formatMessage } = useIntl();
353
+ const iframeRef = React.useRef(null);
354
+ const [isSideEditorOpen, setIsSideEditorOpen] = React.useState(true);
355
+ // Read all the necessary data from the URL to find the right preview URL
356
+ const { slug: model, id: documentId, collectionType } = useParams();
357
+ const [{ query }] = useQueryParams();
358
+ const params = React.useMemo(()=>buildValidParams(query), [
359
+ query
360
+ ]);
361
+ if (!collectionType) {
362
+ throw new Error('Could not find collectionType in url params');
363
+ }
364
+ if (!model) {
365
+ throw new Error('Could not find model in url params');
366
+ }
367
+ // Only collection types must have a documentId
368
+ if (collectionType === COLLECTION_TYPES && !documentId) {
369
+ throw new Error('Could not find documentId in url params');
370
+ }
371
+ const previewUrlResponse = useGetPreviewUrlQuery({
372
+ params: {
373
+ contentType: model
374
+ },
375
+ query: {
376
+ documentId,
377
+ locale: params.locale,
378
+ status: params.status
379
+ }
380
+ });
381
+ const documentResponse = useDocument({
382
+ model,
383
+ collectionType,
384
+ documentId,
385
+ params
386
+ });
387
+ const documentLayoutResponse = useDocumentLayout(model);
388
+ const isLoading = previewUrlResponse.isLoading || documentLayoutResponse.isLoading || documentResponse.isLoading;
389
+ if (isLoading && !documentResponse.document?.documentId) {
390
+ return /*#__PURE__*/ jsx(Page.Loading, {});
391
+ }
392
+ const initialValues = documentResponse.getInitialFormValues();
393
+ if (previewUrlResponse.error || documentLayoutResponse.error || !documentResponse.document || !documentResponse.meta || !documentResponse.schema || !initialValues) {
394
+ return /*#__PURE__*/ jsx(Page.Error, {});
395
+ }
396
+ if (!previewUrlResponse.data?.data?.url) {
397
+ return /*#__PURE__*/ jsx(Page.NoData, {});
398
+ }
399
+ const documentTitle = documentResponse.getTitle(documentLayoutResponse.edit.settings.mainField);
400
+ const validateSync = (values, options)=>{
401
+ const yupSchema = createYupSchema(documentResponse.schema?.attributes, documentResponse.components, {
402
+ status: documentResponse.document?.status,
403
+ ...options
404
+ });
405
+ return yupSchema.validateSync(values, {
406
+ abortEarly: false
407
+ });
408
+ };
409
+ const previewUrl = previewUrlResponse.data.data.url;
410
+ const onPreview = ()=>{
411
+ iframeRef?.current?.contentWindow?.postMessage({
412
+ type: 'strapiUpdate'
413
+ }, // The iframe origin is safe to use since it must be provided through the allowedOrigins config
414
+ new URL(iframeRef.current.src).origin);
415
+ };
416
+ return /*#__PURE__*/ jsxs(Fragment, {
417
+ children: [
418
+ /*#__PURE__*/ jsx(Page.Title, {
419
+ children: formatMessage({
420
+ id: 'content-manager.preview.page-title',
421
+ defaultMessage: '{contentType} preview'
422
+ }, {
423
+ contentType: documentTitle
424
+ })
425
+ }),
426
+ /*#__PURE__*/ jsx(DocumentContextProvider, {
427
+ initialDocument: {
428
+ documentId: documentId || '',
429
+ model,
430
+ collectionType
431
+ },
432
+ onPreview: onPreview,
433
+ children: /*#__PURE__*/ jsx(PreviewProvider, {
434
+ url: previewUrl,
435
+ document: documentResponse.document,
436
+ title: documentTitle,
437
+ meta: documentResponse.meta,
438
+ schema: documentResponse.schema,
439
+ layout: documentLayoutResponse.edit,
440
+ children: /*#__PURE__*/ jsx(Form, {
441
+ method: "PUT",
442
+ disabled: query.status === 'published' && documentResponse && documentResponse.document.status === 'published',
443
+ initialValues: documentResponse.getInitialFormValues(),
444
+ initialErrors: location?.state?.forceValidation ? validateSync(initialValues, {}) : {},
445
+ height: "100%",
446
+ validate: (values, options)=>{
447
+ const yupSchema = createYupSchema(documentResponse.schema?.attributes, documentResponse.components, {
448
+ status: documentResponse.document?.status,
449
+ ...options
450
+ });
451
+ return yupSchema.validate(values, {
452
+ abortEarly: false
453
+ });
454
+ },
455
+ children: ({ resetForm })=>/*#__PURE__*/ jsxs(Flex, {
456
+ direction: "column",
457
+ height: "100%",
458
+ alignItems: "stretch",
459
+ children: [
460
+ /*#__PURE__*/ jsx(Blocker, {
461
+ onProceed: resetForm
462
+ }),
463
+ /*#__PURE__*/ jsx(PreviewHeader, {}),
464
+ /*#__PURE__*/ jsxs(Flex, {
465
+ flex: 1,
466
+ overflow: "auto",
467
+ alignItems: "stretch",
468
+ children: [
469
+ /*#__PURE__*/ jsx(Box, {
470
+ overflow: "auto",
471
+ width: isSideEditorOpen ? '50%' : 0,
472
+ borderWidth: "0 1px 0 0",
473
+ borderColor: "neutral150",
474
+ paddingTop: 6,
475
+ paddingBottom: 6,
476
+ // Remove horizontal padding when the editor is closed or it won't fully disappear
477
+ paddingLeft: isSideEditorOpen ? 6 : 0,
478
+ paddingRight: isSideEditorOpen ? 6 : 0,
479
+ transition: "all 0.2s ease-in-out",
480
+ children: /*#__PURE__*/ jsx(FormLayout, {
481
+ layout: documentLayoutResponse.edit.layout,
482
+ document: documentResponse,
483
+ hasBackground: false
484
+ })
485
+ }),
486
+ /*#__PURE__*/ jsxs(Box, {
487
+ position: "relative",
488
+ flex: 1,
489
+ height: "100%",
490
+ overflow: "hidden",
491
+ children: [
492
+ /*#__PURE__*/ jsx(Box, {
493
+ "data-testid": "preview-iframe",
494
+ ref: iframeRef,
495
+ src: previewUrl,
496
+ title: formatMessage({
497
+ id: 'content-manager.preview.panel.title',
498
+ defaultMessage: 'Preview'
499
+ }),
500
+ width: "100%",
501
+ height: "100%",
502
+ borderWidth: 0,
503
+ tag: "iframe"
504
+ }, previewUrl),
505
+ /*#__PURE__*/ jsx(IconButton, {
506
+ variant: "tertiary",
507
+ label: formatMessage(isSideEditorOpen ? {
508
+ id: 'content-manager.preview.content.close-editor',
509
+ defaultMessage: 'Close editor'
510
+ } : {
511
+ id: 'content-manager.preview.content.open-editor',
512
+ defaultMessage: 'Open editor'
513
+ }),
514
+ onClick: ()=>setIsSideEditorOpen((prev)=>!prev),
515
+ position: "absolute",
516
+ top: 2,
517
+ left: 2,
518
+ children: /*#__PURE__*/ jsx(AnimatedArrow, {
519
+ isSideEditorOpen: isSideEditorOpen
520
+ })
521
+ })
522
+ ]
523
+ })
524
+ ]
525
+ })
526
+ ]
527
+ })
528
+ })
529
+ })
530
+ })
531
+ ]
532
+ });
533
+ };
534
+ /* -------------------------------------------------------------------------------------------------
535
+ * ProtectedPreviewPage
536
+ * -----------------------------------------------------------------------------------------------*/ const ProtectedPreviewPageImpl = ()=>{
537
+ const { slug: model } = useParams();
538
+ const { permissions = [], isLoading, error } = useRBAC([
539
+ {
540
+ action: 'plugin::content-manager.explorer.read',
541
+ subject: model
542
+ },
543
+ {
544
+ action: 'plugin::content-manager.explorer.update',
545
+ subject: model
546
+ },
547
+ {
548
+ action: 'plugin::content-manager.explorer.publish',
549
+ subject: model
550
+ }
551
+ ]);
552
+ if (isLoading) {
553
+ return /*#__PURE__*/ jsx(Page.Loading, {});
554
+ }
555
+ if (error || !model) {
556
+ return /*#__PURE__*/ jsx(Box, {
557
+ height: "100vh",
558
+ width: "100vw",
559
+ position: "fixed",
560
+ top: 0,
561
+ left: 0,
562
+ zIndex: 2,
563
+ background: "neutral0",
564
+ children: /*#__PURE__*/ jsx(Page.Error, {})
565
+ });
566
+ }
567
+ return /*#__PURE__*/ jsx(Box, {
568
+ height: "100vh",
569
+ width: "100vw",
570
+ position: "fixed",
571
+ top: 0,
572
+ left: 0,
573
+ zIndex: 2,
574
+ background: "neutral0",
575
+ children: /*#__PURE__*/ jsx(Page.Protect, {
576
+ permissions: permissions.filter((permission)=>permission.action.includes('explorer.read')),
577
+ children: /*#__PURE__*/ jsx(DocumentRBAC, {
578
+ permissions: permissions,
579
+ children: /*#__PURE__*/ jsx(PreviewPage, {})
580
+ })
581
+ })
582
+ });
583
+ };
584
+ const ProtectedPreviewPage = ()=>{
585
+ return /*#__PURE__*/ jsx(Portal, {
586
+ children: /*#__PURE__*/ jsx(FocusTrap, {
587
+ children: /*#__PURE__*/ jsx(ProtectedPreviewPageImpl, {})
588
+ })
589
+ });
590
+ };
591
+
592
+ export { ProtectedPreviewPage, usePreviewContext };
593
+ //# sourceMappingURL=Preview-BH9l1QXk.mjs.map