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

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 (441) hide show
  1. package/dist/_chunks/CardDragPreview-C0QyJgRA.js +69 -0
  2. package/dist/_chunks/CardDragPreview-C0QyJgRA.js.map +1 -0
  3. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs +70 -0
  4. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs.map +1 -0
  5. package/dist/_chunks/ComponentConfigurationPage-Cx-bPC7o.mjs +236 -0
  6. package/dist/_chunks/ComponentConfigurationPage-Cx-bPC7o.mjs.map +1 -0
  7. package/dist/_chunks/ComponentConfigurationPage-Dco_oGcv.js +254 -0
  8. package/dist/_chunks/ComponentConfigurationPage-Dco_oGcv.js.map +1 -0
  9. package/dist/_chunks/ComponentIcon-CRbtQEUV.js +175 -0
  10. package/dist/_chunks/ComponentIcon-CRbtQEUV.js.map +1 -0
  11. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs +157 -0
  12. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs.map +1 -0
  13. package/dist/_chunks/EditConfigurationPage-2JHTYC9l.mjs +132 -0
  14. package/dist/_chunks/EditConfigurationPage-2JHTYC9l.mjs.map +1 -0
  15. package/dist/_chunks/EditConfigurationPage-7ex5BamM.js +150 -0
  16. package/dist/_chunks/EditConfigurationPage-7ex5BamM.js.map +1 -0
  17. package/dist/_chunks/EditViewPage-BUdd4V-E.mjs +191 -0
  18. package/dist/_chunks/EditViewPage-BUdd4V-E.mjs.map +1 -0
  19. package/dist/_chunks/EditViewPage-CpSt4shF.js +209 -0
  20. package/dist/_chunks/EditViewPage-CpSt4shF.js.map +1 -0
  21. package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs +50 -0
  22. package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs.map +1 -0
  23. package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js +49 -0
  24. package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js.map +1 -0
  25. package/dist/_chunks/Form-B5wai69r.js +778 -0
  26. package/dist/_chunks/Form-B5wai69r.js.map +1 -0
  27. package/dist/_chunks/Form-CKvmIxLb.mjs +758 -0
  28. package/dist/_chunks/Form-CKvmIxLb.mjs.map +1 -0
  29. package/dist/_chunks/History-BtUvMl3c.mjs +999 -0
  30. package/dist/_chunks/History-BtUvMl3c.mjs.map +1 -0
  31. package/dist/_chunks/History-_uVRZnTx.js +1019 -0
  32. package/dist/_chunks/History-_uVRZnTx.js.map +1 -0
  33. package/dist/_chunks/Input-C7kIupyO.mjs +5585 -0
  34. package/dist/_chunks/Input-C7kIupyO.mjs.map +1 -0
  35. package/dist/_chunks/Input-D_lWa2v5.js +5617 -0
  36. package/dist/_chunks/Input-D_lWa2v5.js.map +1 -0
  37. package/dist/_chunks/ListConfigurationPage-B8V2YLn_.mjs +633 -0
  38. package/dist/_chunks/ListConfigurationPage-B8V2YLn_.mjs.map +1 -0
  39. package/dist/_chunks/ListConfigurationPage-mzxHRiSU.js +652 -0
  40. package/dist/_chunks/ListConfigurationPage-mzxHRiSU.js.map +1 -0
  41. package/dist/_chunks/ListViewPage-CmYoPeqC.js +877 -0
  42. package/dist/_chunks/ListViewPage-CmYoPeqC.js.map +1 -0
  43. package/dist/_chunks/ListViewPage-GTcTc1Mh.mjs +854 -0
  44. package/dist/_chunks/ListViewPage-GTcTc1Mh.mjs.map +1 -0
  45. package/dist/_chunks/NoContentTypePage-CurjDsnX.js +51 -0
  46. package/dist/_chunks/NoContentTypePage-CurjDsnX.js.map +1 -0
  47. package/dist/_chunks/NoContentTypePage-aTTRCOJI.mjs +51 -0
  48. package/dist/_chunks/NoContentTypePage-aTTRCOJI.mjs.map +1 -0
  49. package/dist/_chunks/NoPermissionsPage-BaC4j1Lu.mjs +23 -0
  50. package/dist/_chunks/NoPermissionsPage-BaC4j1Lu.mjs.map +1 -0
  51. package/dist/_chunks/NoPermissionsPage-DW7_REzi.js +23 -0
  52. package/dist/_chunks/NoPermissionsPage-DW7_REzi.js.map +1 -0
  53. package/dist/_chunks/Preview-DTUxeZDR.js +305 -0
  54. package/dist/_chunks/Preview-DTUxeZDR.js.map +1 -0
  55. package/dist/_chunks/Preview-k2MYjnIi.mjs +287 -0
  56. package/dist/_chunks/Preview-k2MYjnIi.mjs.map +1 -0
  57. package/dist/_chunks/Relations-CkfzR66V.js +750 -0
  58. package/dist/_chunks/Relations-CkfzR66V.js.map +1 -0
  59. package/dist/_chunks/Relations-ClCLZFKk.mjs +731 -0
  60. package/dist/_chunks/Relations-ClCLZFKk.mjs.map +1 -0
  61. package/dist/_chunks/ar-BUUWXIYu.js +226 -0
  62. package/dist/{admin/chunks/ar-DckYq_WK.js.map → _chunks/ar-BUUWXIYu.js.map} +1 -1
  63. package/dist/_chunks/ar-CCEVvqGG.mjs +226 -0
  64. package/dist/_chunks/ar-CCEVvqGG.mjs.map +1 -0
  65. package/dist/_chunks/ca-5U32ON2v.mjs +201 -0
  66. package/dist/_chunks/ca-5U32ON2v.mjs.map +1 -0
  67. package/dist/_chunks/ca-Cmk45QO6.js +201 -0
  68. package/dist/{admin/chunks/de-CbImAUA5.js.map → _chunks/ca-Cmk45QO6.js.map} +1 -1
  69. package/dist/_chunks/cs-CM2aBUar.mjs +125 -0
  70. package/dist/_chunks/cs-CM2aBUar.mjs.map +1 -0
  71. package/dist/_chunks/cs-CkJy6B2v.js +125 -0
  72. package/dist/{admin/chunks/cs-C7OSYFQ7.js.map → _chunks/cs-CkJy6B2v.js.map} +1 -1
  73. package/dist/_chunks/de-C72KDNOl.mjs +199 -0
  74. package/dist/_chunks/de-C72KDNOl.mjs.map +1 -0
  75. package/dist/_chunks/de-CCEmbAah.js +199 -0
  76. package/dist/{admin/chunks/es-C8vLuvZL.js.map → _chunks/de-CCEmbAah.js.map} +1 -1
  77. package/dist/_chunks/en-BR48D_RH.js +312 -0
  78. package/dist/{admin/chunks/en-LfhocNG2.js.map → _chunks/en-BR48D_RH.js.map} +1 -1
  79. package/dist/_chunks/en-D65uIF6Y.mjs +312 -0
  80. package/dist/{admin/chunks/en-C1CjdAtC.js.map → _chunks/en-D65uIF6Y.mjs.map} +1 -1
  81. package/dist/_chunks/es-9K52xZIr.js +196 -0
  82. package/dist/{admin/chunks/de-5QRlDHyR.js.map → _chunks/es-9K52xZIr.js.map} +1 -1
  83. package/dist/_chunks/es-D34tqjMw.mjs +196 -0
  84. package/dist/_chunks/es-D34tqjMw.mjs.map +1 -0
  85. package/dist/_chunks/eu-CdALomew.mjs +202 -0
  86. package/dist/_chunks/eu-CdALomew.mjs.map +1 -0
  87. package/dist/_chunks/eu-VDH-3ovk.js +202 -0
  88. package/dist/_chunks/eu-VDH-3ovk.js.map +1 -0
  89. package/dist/_chunks/fr-C43IbhA_.js +219 -0
  90. package/dist/_chunks/fr-C43IbhA_.js.map +1 -0
  91. package/dist/_chunks/fr-DBseuRuB.mjs +219 -0
  92. package/dist/_chunks/fr-DBseuRuB.mjs.map +1 -0
  93. package/dist/_chunks/gu-BRmF601H.js +200 -0
  94. package/dist/_chunks/gu-BRmF601H.js.map +1 -0
  95. package/dist/_chunks/gu-CNpaMDpH.mjs +200 -0
  96. package/dist/_chunks/gu-CNpaMDpH.mjs.map +1 -0
  97. package/dist/_chunks/hi-CCJBptSq.js +200 -0
  98. package/dist/_chunks/hi-CCJBptSq.js.map +1 -0
  99. package/dist/_chunks/hi-Dwvd04m3.mjs +200 -0
  100. package/dist/_chunks/hi-Dwvd04m3.mjs.map +1 -0
  101. package/dist/{admin/chunks/hooks-D-sOYd1s.js → _chunks/hooks-BAaaKPS_.js} +3 -6
  102. package/dist/_chunks/hooks-BAaaKPS_.js.map +1 -0
  103. package/dist/_chunks/hooks-E5u1mcgM.mjs +8 -0
  104. package/dist/_chunks/hooks-E5u1mcgM.mjs.map +1 -0
  105. package/dist/_chunks/hu-CeYvaaO0.mjs +202 -0
  106. package/dist/_chunks/hu-CeYvaaO0.mjs.map +1 -0
  107. package/dist/_chunks/hu-sNV_yLYy.js +202 -0
  108. package/dist/_chunks/hu-sNV_yLYy.js.map +1 -0
  109. package/dist/_chunks/id-B5Ser98A.js +160 -0
  110. package/dist/{admin/chunks/it-BAHrwmYS.js.map → _chunks/id-B5Ser98A.js.map} +1 -1
  111. package/dist/_chunks/id-BtwA9WJT.mjs +160 -0
  112. package/dist/_chunks/id-BtwA9WJT.mjs.map +1 -0
  113. package/dist/_chunks/index-CIIIuVmx.mjs +4481 -0
  114. package/dist/_chunks/index-CIIIuVmx.mjs.map +1 -0
  115. package/dist/_chunks/index-CwbxJQVl.js +4500 -0
  116. package/dist/_chunks/index-CwbxJQVl.js.map +1 -0
  117. package/dist/_chunks/it-BrVPqaf1.mjs +162 -0
  118. package/dist/_chunks/it-BrVPqaf1.mjs.map +1 -0
  119. package/dist/_chunks/it-DkBIs7vD.js +162 -0
  120. package/dist/{admin/chunks/id-D7V5S1rB.js.map → _chunks/it-DkBIs7vD.js.map} +1 -1
  121. package/dist/_chunks/ja-7sfIbjxE.js +196 -0
  122. package/dist/{admin/chunks/it-CQFpa_Dc.js.map → _chunks/ja-7sfIbjxE.js.map} +1 -1
  123. package/dist/_chunks/ja-BHqhDq4V.mjs +196 -0
  124. package/dist/_chunks/ja-BHqhDq4V.mjs.map +1 -0
  125. package/dist/_chunks/ko-HVQRlfUI.mjs +195 -0
  126. package/dist/_chunks/ko-HVQRlfUI.mjs.map +1 -0
  127. package/dist/_chunks/ko-woFZPmLk.js +195 -0
  128. package/dist/{admin/chunks/es-DkoWSExG.js.map → _chunks/ko-woFZPmLk.js.map} +1 -1
  129. package/dist/_chunks/layout-B1sUBgaT.js +488 -0
  130. package/dist/_chunks/layout-B1sUBgaT.js.map +1 -0
  131. package/dist/_chunks/layout-CpUqPtOS.mjs +471 -0
  132. package/dist/_chunks/layout-CpUqPtOS.mjs.map +1 -0
  133. package/dist/_chunks/ml-BihZwQit.mjs +200 -0
  134. package/dist/_chunks/ml-BihZwQit.mjs.map +1 -0
  135. package/dist/_chunks/ml-C2W8N8k1.js +200 -0
  136. package/dist/_chunks/ml-C2W8N8k1.js.map +1 -0
  137. package/dist/_chunks/ms-BuFotyP_.js +144 -0
  138. package/dist/{admin/chunks/cs-BJFxwIWj.js.map → _chunks/ms-BuFotyP_.js.map} +1 -1
  139. package/dist/_chunks/ms-m_WjyWx7.mjs +144 -0
  140. package/dist/_chunks/ms-m_WjyWx7.mjs.map +1 -0
  141. package/dist/_chunks/nl-D4R9gHx5.mjs +202 -0
  142. package/dist/_chunks/nl-D4R9gHx5.mjs.map +1 -0
  143. package/dist/_chunks/nl-bbEOHChV.js +202 -0
  144. package/dist/_chunks/nl-bbEOHChV.js.map +1 -0
  145. package/dist/_chunks/objects-BcXOv6_9.js +47 -0
  146. package/dist/_chunks/objects-BcXOv6_9.js.map +1 -0
  147. package/dist/_chunks/objects-D6yBsdmx.mjs +45 -0
  148. package/dist/_chunks/objects-D6yBsdmx.mjs.map +1 -0
  149. package/dist/_chunks/pl-sbx9mSt_.mjs +199 -0
  150. package/dist/_chunks/pl-sbx9mSt_.mjs.map +1 -0
  151. package/dist/_chunks/pl-uzwG-hk7.js +199 -0
  152. package/dist/{admin/chunks/ca-DviY7mRj.js.map → _chunks/pl-uzwG-hk7.js.map} +1 -1
  153. package/dist/_chunks/pt-BR-BiOz37D9.js +201 -0
  154. package/dist/{admin/chunks/pt-BR-CcotyBGJ.js.map → _chunks/pt-BR-BiOz37D9.js.map} +1 -1
  155. package/dist/_chunks/pt-BR-C71iDxnh.mjs +201 -0
  156. package/dist/_chunks/pt-BR-C71iDxnh.mjs.map +1 -0
  157. package/dist/_chunks/pt-BsaFvS8-.mjs +95 -0
  158. package/dist/_chunks/pt-BsaFvS8-.mjs.map +1 -0
  159. package/dist/_chunks/pt-CeXQuq50.js +95 -0
  160. package/dist/_chunks/pt-CeXQuq50.js.map +1 -0
  161. package/dist/_chunks/relations-B6L5kXX8.js +133 -0
  162. package/dist/_chunks/relations-B6L5kXX8.js.map +1 -0
  163. package/dist/_chunks/relations-DU-iUzo_.mjs +134 -0
  164. package/dist/_chunks/relations-DU-iUzo_.mjs.map +1 -0
  165. package/dist/_chunks/ru-BE6A4Exp.mjs +231 -0
  166. package/dist/{admin/chunks/ar-DeQBSsfl.js.map → _chunks/ru-BE6A4Exp.mjs.map} +1 -1
  167. package/dist/_chunks/ru-BT3ybNny.js +231 -0
  168. package/dist/{admin/chunks/ru-CB4BUyQp.js.map → _chunks/ru-BT3ybNny.js.map} +1 -1
  169. package/dist/_chunks/sa-CcvkYInH.js +200 -0
  170. package/dist/_chunks/sa-CcvkYInH.js.map +1 -0
  171. package/dist/_chunks/sa-Dag0k-Z8.mjs +200 -0
  172. package/dist/_chunks/sa-Dag0k-Z8.mjs.map +1 -0
  173. package/dist/_chunks/sk-BFg-R8qJ.mjs +202 -0
  174. package/dist/_chunks/sk-BFg-R8qJ.mjs.map +1 -0
  175. package/dist/_chunks/sk-CvY09Xjv.js +202 -0
  176. package/dist/_chunks/sk-CvY09Xjv.js.map +1 -0
  177. package/dist/_chunks/sv-CUnfWGsh.mjs +202 -0
  178. package/dist/_chunks/sv-CUnfWGsh.mjs.map +1 -0
  179. package/dist/_chunks/sv-MYDuzgvT.js +202 -0
  180. package/dist/_chunks/sv-MYDuzgvT.js.map +1 -0
  181. package/dist/_chunks/th-BqbI8lIT.mjs +148 -0
  182. package/dist/_chunks/th-BqbI8lIT.mjs.map +1 -0
  183. package/dist/_chunks/th-D9_GfAjc.js +148 -0
  184. package/dist/{admin/chunks/ms-CvSC0OdG.js.map → _chunks/th-D9_GfAjc.js.map} +1 -1
  185. package/dist/_chunks/tr-CgeK3wJM.mjs +199 -0
  186. package/dist/_chunks/tr-CgeK3wJM.mjs.map +1 -0
  187. package/dist/_chunks/tr-D9UH-O_R.js +199 -0
  188. package/dist/_chunks/tr-D9UH-O_R.js.map +1 -0
  189. package/dist/_chunks/uk-C8EiqJY7.js +144 -0
  190. package/dist/{admin/chunks/ms-Bh09NFff.js.map → _chunks/uk-C8EiqJY7.js.map} +1 -1
  191. package/dist/_chunks/uk-CR-zDhAY.mjs +144 -0
  192. package/dist/_chunks/uk-CR-zDhAY.mjs.map +1 -0
  193. package/dist/_chunks/useDragAndDrop-BMtgCYzL.js +245 -0
  194. package/dist/_chunks/useDragAndDrop-BMtgCYzL.js.map +1 -0
  195. package/dist/_chunks/useDragAndDrop-DJ6jqvZN.mjs +228 -0
  196. package/dist/_chunks/useDragAndDrop-DJ6jqvZN.mjs.map +1 -0
  197. package/dist/_chunks/usePrev-CZGy2Vjf.mjs +29 -0
  198. package/dist/_chunks/usePrev-CZGy2Vjf.mjs.map +1 -0
  199. package/dist/_chunks/usePrev-D5J_2fEu.js +28 -0
  200. package/dist/_chunks/usePrev-D5J_2fEu.js.map +1 -0
  201. package/dist/_chunks/vi-CJlYDheJ.js +111 -0
  202. package/dist/{admin/chunks/vi-CvBGlTjr.js.map → _chunks/vi-CJlYDheJ.js.map} +1 -1
  203. package/dist/_chunks/vi-DUXIk_fw.mjs +111 -0
  204. package/dist/_chunks/vi-DUXIk_fw.mjs.map +1 -0
  205. package/dist/_chunks/zh-BWZspA60.mjs +209 -0
  206. package/dist/_chunks/zh-BWZspA60.mjs.map +1 -0
  207. package/dist/_chunks/zh-CQQfszqR.js +209 -0
  208. package/dist/{admin/chunks/ca-ClDTvatJ.js.map → _chunks/zh-CQQfszqR.js.map} +1 -1
  209. package/dist/_chunks/zh-Hans-9kOncHGw.js +952 -0
  210. package/dist/{admin/chunks/zh-Hans-CI0HKio3.js.map → _chunks/zh-Hans-9kOncHGw.js.map} +1 -1
  211. package/dist/_chunks/zh-Hans-BPQcRIyH.mjs +952 -0
  212. package/dist/{admin/chunks/zh-Hans-JVK9x7xr.js.map → _chunks/zh-Hans-BPQcRIyH.mjs.map} +1 -1
  213. package/dist/admin/index.js +4 -23
  214. package/dist/admin/index.js.map +1 -1
  215. package/dist/admin/index.mjs +13 -16
  216. package/dist/admin/index.mjs.map +1 -1
  217. package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
  218. package/dist/admin/src/hooks/useDocument.d.ts +2 -2
  219. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/Code.d.ts +1 -0
  220. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/utils/prismLanguages.d.ts +49 -0
  221. package/dist/admin/src/preview/components/PreviewContent.d.ts +1 -2
  222. package/dist/admin/src/preview/components/PreviewHeader.d.ts +1 -2
  223. package/dist/admin/src/preview/index.d.ts +3 -2
  224. package/dist/server/index.js +4396 -5468
  225. package/dist/server/index.js.map +1 -1
  226. package/dist/server/index.mjs +4368 -5442
  227. package/dist/server/index.mjs.map +1 -1
  228. package/dist/server/src/controllers/utils/metadata.d.ts +1 -1
  229. package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -1
  230. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  231. package/dist/server/src/services/utils/count.d.ts +1 -1
  232. package/dist/server/src/services/utils/count.d.ts.map +1 -1
  233. package/dist/server/src/services/utils/populate.d.ts +1 -1
  234. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  235. package/dist/shared/contracts/collection-types.d.ts +1 -0
  236. package/dist/shared/contracts/components.d.ts +1 -0
  237. package/dist/shared/contracts/content-types.d.ts +1 -0
  238. package/dist/shared/contracts/history-versions.d.ts +1 -0
  239. package/dist/shared/contracts/index.d.ts +1 -0
  240. package/dist/shared/contracts/init.d.ts +1 -0
  241. package/dist/shared/contracts/preview.d.ts +1 -0
  242. package/dist/shared/contracts/relations.d.ts +2 -1
  243. package/dist/shared/contracts/relations.d.ts.map +1 -1
  244. package/dist/shared/contracts/review-workflows.d.ts +1 -0
  245. package/dist/shared/contracts/single-types.d.ts +1 -0
  246. package/dist/shared/contracts/uid.d.ts +1 -0
  247. package/dist/shared/index.d.ts +1 -0
  248. package/dist/shared/index.js +24 -35
  249. package/dist/shared/index.js.map +1 -1
  250. package/dist/shared/index.mjs +25 -34
  251. package/dist/shared/index.mjs.map +1 -1
  252. package/package.json +10 -13
  253. package/dist/admin/chunks/CardDragPreview-DwuraT0K.js +0 -80
  254. package/dist/admin/chunks/CardDragPreview-DwuraT0K.js.map +0 -1
  255. package/dist/admin/chunks/CardDragPreview-_dubYgXO.js +0 -82
  256. package/dist/admin/chunks/CardDragPreview-_dubYgXO.js.map +0 -1
  257. package/dist/admin/chunks/ComponentConfigurationPage-DXwOtpq1.js +0 -298
  258. package/dist/admin/chunks/ComponentConfigurationPage-DXwOtpq1.js.map +0 -1
  259. package/dist/admin/chunks/ComponentConfigurationPage-DhYZp4nN.js +0 -276
  260. package/dist/admin/chunks/ComponentConfigurationPage-DhYZp4nN.js.map +0 -1
  261. package/dist/admin/chunks/ComponentIcon-BZcTc4rj.js +0 -153
  262. package/dist/admin/chunks/ComponentIcon-BZcTc4rj.js.map +0 -1
  263. package/dist/admin/chunks/ComponentIcon-C-EjOUPA.js +0 -176
  264. package/dist/admin/chunks/ComponentIcon-C-EjOUPA.js.map +0 -1
  265. package/dist/admin/chunks/EditConfigurationPage-D0Ng758X.js +0 -180
  266. package/dist/admin/chunks/EditConfigurationPage-D0Ng758X.js.map +0 -1
  267. package/dist/admin/chunks/EditConfigurationPage-DDuPch5d.js +0 -158
  268. package/dist/admin/chunks/EditConfigurationPage-DDuPch5d.js.map +0 -1
  269. package/dist/admin/chunks/EditViewPage-jCZnUuCR.js +0 -265
  270. package/dist/admin/chunks/EditViewPage-jCZnUuCR.js.map +0 -1
  271. package/dist/admin/chunks/EditViewPage-zSnDwLz3.js +0 -288
  272. package/dist/admin/chunks/EditViewPage-zSnDwLz3.js.map +0 -1
  273. package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.js +0 -56
  274. package/dist/admin/chunks/FieldTypeIcon-BY6MrVF4.js.map +0 -1
  275. package/dist/admin/chunks/FieldTypeIcon-Bxh-7Jin.js +0 -58
  276. package/dist/admin/chunks/FieldTypeIcon-Bxh-7Jin.js.map +0 -1
  277. package/dist/admin/chunks/Form-BEqiuSvQ.js +0 -978
  278. package/dist/admin/chunks/Form-BEqiuSvQ.js.map +0 -1
  279. package/dist/admin/chunks/Form-CZmB6JIg.js +0 -955
  280. package/dist/admin/chunks/Form-CZmB6JIg.js.map +0 -1
  281. package/dist/admin/chunks/History-BlLKDZSw.js +0 -1331
  282. package/dist/admin/chunks/History-BlLKDZSw.js.map +0 -1
  283. package/dist/admin/chunks/History-CPYXgxkS.js +0 -1308
  284. package/dist/admin/chunks/History-CPYXgxkS.js.map +0 -1
  285. package/dist/admin/chunks/Input-CLX3C5DI.js +0 -6711
  286. package/dist/admin/chunks/Input-CLX3C5DI.js.map +0 -1
  287. package/dist/admin/chunks/Input-DiR2Xfa7.js +0 -6742
  288. package/dist/admin/chunks/Input-DiR2Xfa7.js.map +0 -1
  289. package/dist/admin/chunks/ListConfigurationPage-CNvotSqe.js +0 -795
  290. package/dist/admin/chunks/ListConfigurationPage-CNvotSqe.js.map +0 -1
  291. package/dist/admin/chunks/ListConfigurationPage-DdTp-HxB.js +0 -818
  292. package/dist/admin/chunks/ListConfigurationPage-DdTp-HxB.js.map +0 -1
  293. package/dist/admin/chunks/ListViewPage-BtXYjEYz.js +0 -1154
  294. package/dist/admin/chunks/ListViewPage-BtXYjEYz.js.map +0 -1
  295. package/dist/admin/chunks/ListViewPage-MJNfQTp-.js +0 -1132
  296. package/dist/admin/chunks/ListViewPage-MJNfQTp-.js.map +0 -1
  297. package/dist/admin/chunks/NoContentTypePage-BJrZvYPY.js +0 -57
  298. package/dist/admin/chunks/NoContentTypePage-BJrZvYPY.js.map +0 -1
  299. package/dist/admin/chunks/NoContentTypePage-CVvVpwj4.js +0 -59
  300. package/dist/admin/chunks/NoContentTypePage-CVvVpwj4.js.map +0 -1
  301. package/dist/admin/chunks/NoPermissionsPage-BulvG4hB.js +0 -36
  302. package/dist/admin/chunks/NoPermissionsPage-BulvG4hB.js.map +0 -1
  303. package/dist/admin/chunks/NoPermissionsPage-C5yWg70d.js +0 -38
  304. package/dist/admin/chunks/NoPermissionsPage-C5yWg70d.js.map +0 -1
  305. package/dist/admin/chunks/Preview-DEuQgQg2.js +0 -482
  306. package/dist/admin/chunks/Preview-DEuQgQg2.js.map +0 -1
  307. package/dist/admin/chunks/Preview-H74FQ9Cq.js +0 -504
  308. package/dist/admin/chunks/Preview-H74FQ9Cq.js.map +0 -1
  309. package/dist/admin/chunks/Relations-C8jbZPVK.js +0 -827
  310. package/dist/admin/chunks/Relations-C8jbZPVK.js.map +0 -1
  311. package/dist/admin/chunks/Relations-mxOUS7TJ.js +0 -853
  312. package/dist/admin/chunks/Relations-mxOUS7TJ.js.map +0 -1
  313. package/dist/admin/chunks/ar-DckYq_WK.js +0 -222
  314. package/dist/admin/chunks/ar-DeQBSsfl.js +0 -227
  315. package/dist/admin/chunks/ca-ClDTvatJ.js +0 -202
  316. package/dist/admin/chunks/ca-DviY7mRj.js +0 -197
  317. package/dist/admin/chunks/cs-BJFxwIWj.js +0 -126
  318. package/dist/admin/chunks/cs-C7OSYFQ7.js +0 -122
  319. package/dist/admin/chunks/de-5QRlDHyR.js +0 -195
  320. package/dist/admin/chunks/de-CbImAUA5.js +0 -200
  321. package/dist/admin/chunks/en-C1CjdAtC.js +0 -313
  322. package/dist/admin/chunks/en-LfhocNG2.js +0 -308
  323. package/dist/admin/chunks/es-C8vLuvZL.js +0 -197
  324. package/dist/admin/chunks/es-DkoWSExG.js +0 -192
  325. package/dist/admin/chunks/eu-BG1xX7HK.js +0 -198
  326. package/dist/admin/chunks/eu-BG1xX7HK.js.map +0 -1
  327. package/dist/admin/chunks/eu-BJW3AvXu.js +0 -203
  328. package/dist/admin/chunks/eu-BJW3AvXu.js.map +0 -1
  329. package/dist/admin/chunks/fr-CFdRaRVj.js +0 -215
  330. package/dist/admin/chunks/fr-CFdRaRVj.js.map +0 -1
  331. package/dist/admin/chunks/fr-gQSilC7w.js +0 -220
  332. package/dist/admin/chunks/fr-gQSilC7w.js.map +0 -1
  333. package/dist/admin/chunks/gu-D5MMMXRs.js +0 -196
  334. package/dist/admin/chunks/gu-D5MMMXRs.js.map +0 -1
  335. package/dist/admin/chunks/gu-DPU4wyx7.js +0 -201
  336. package/dist/admin/chunks/gu-DPU4wyx7.js.map +0 -1
  337. package/dist/admin/chunks/hi-Dp4omeBb.js +0 -201
  338. package/dist/admin/chunks/hi-Dp4omeBb.js.map +0 -1
  339. package/dist/admin/chunks/hi-lp17SCjr.js +0 -196
  340. package/dist/admin/chunks/hi-lp17SCjr.js.map +0 -1
  341. package/dist/admin/chunks/hooks-D-sOYd1s.js.map +0 -1
  342. package/dist/admin/chunks/hooks-DMvik5y_.js +0 -7
  343. package/dist/admin/chunks/hooks-DMvik5y_.js.map +0 -1
  344. package/dist/admin/chunks/hu-CLka1U2C.js +0 -198
  345. package/dist/admin/chunks/hu-CLka1U2C.js.map +0 -1
  346. package/dist/admin/chunks/hu-CtFJuhTd.js +0 -203
  347. package/dist/admin/chunks/hu-CtFJuhTd.js.map +0 -1
  348. package/dist/admin/chunks/id-D7V5S1rB.js +0 -161
  349. package/dist/admin/chunks/id-USfY9m1g.js +0 -156
  350. package/dist/admin/chunks/id-USfY9m1g.js.map +0 -1
  351. package/dist/admin/chunks/index-BRlRBRLb.js +0 -5350
  352. package/dist/admin/chunks/index-BRlRBRLb.js.map +0 -1
  353. package/dist/admin/chunks/index-ZIwOPk6p.js +0 -5416
  354. package/dist/admin/chunks/index-ZIwOPk6p.js.map +0 -1
  355. package/dist/admin/chunks/it-BAHrwmYS.js +0 -158
  356. package/dist/admin/chunks/it-CQFpa_Dc.js +0 -163
  357. package/dist/admin/chunks/ja-BWKmBJFT.js +0 -192
  358. package/dist/admin/chunks/ja-BWKmBJFT.js.map +0 -1
  359. package/dist/admin/chunks/ja-jdQM-B79.js +0 -197
  360. package/dist/admin/chunks/ja-jdQM-B79.js.map +0 -1
  361. package/dist/admin/chunks/ko-CgADGBNt.js +0 -191
  362. package/dist/admin/chunks/ko-CgADGBNt.js.map +0 -1
  363. package/dist/admin/chunks/ko-k46sEyzt.js +0 -196
  364. package/dist/admin/chunks/ko-k46sEyzt.js.map +0 -1
  365. package/dist/admin/chunks/layout-B3-guCPG.js +0 -598
  366. package/dist/admin/chunks/layout-B3-guCPG.js.map +0 -1
  367. package/dist/admin/chunks/layout-ameRNiAM.js +0 -618
  368. package/dist/admin/chunks/layout-ameRNiAM.js.map +0 -1
  369. package/dist/admin/chunks/ml-CnhCfOn_.js +0 -196
  370. package/dist/admin/chunks/ml-CnhCfOn_.js.map +0 -1
  371. package/dist/admin/chunks/ml-DqxPwODx.js +0 -201
  372. package/dist/admin/chunks/ml-DqxPwODx.js.map +0 -1
  373. package/dist/admin/chunks/ms-Bh09NFff.js +0 -140
  374. package/dist/admin/chunks/ms-CvSC0OdG.js +0 -145
  375. package/dist/admin/chunks/nl-BEubhS8C.js +0 -203
  376. package/dist/admin/chunks/nl-BEubhS8C.js.map +0 -1
  377. package/dist/admin/chunks/nl-C8HYflTc.js +0 -198
  378. package/dist/admin/chunks/nl-C8HYflTc.js.map +0 -1
  379. package/dist/admin/chunks/objects-C3EebVVe.js +0 -76
  380. package/dist/admin/chunks/objects-C3EebVVe.js.map +0 -1
  381. package/dist/admin/chunks/objects-wl73iEma.js +0 -73
  382. package/dist/admin/chunks/objects-wl73iEma.js.map +0 -1
  383. package/dist/admin/chunks/pl-DWhGDzmM.js +0 -200
  384. package/dist/admin/chunks/pl-DWhGDzmM.js.map +0 -1
  385. package/dist/admin/chunks/pl-MFCZJZuZ.js +0 -195
  386. package/dist/admin/chunks/pl-MFCZJZuZ.js.map +0 -1
  387. package/dist/admin/chunks/pt-BR-CPtAXD-4.js +0 -202
  388. package/dist/admin/chunks/pt-BR-CPtAXD-4.js.map +0 -1
  389. package/dist/admin/chunks/pt-BR-CcotyBGJ.js +0 -197
  390. package/dist/admin/chunks/pt-BoPxN80n.js +0 -96
  391. package/dist/admin/chunks/pt-BoPxN80n.js.map +0 -1
  392. package/dist/admin/chunks/pt-HbmgeiYO.js +0 -93
  393. package/dist/admin/chunks/pt-HbmgeiYO.js.map +0 -1
  394. package/dist/admin/chunks/relations-CmoFVrKj.js +0 -178
  395. package/dist/admin/chunks/relations-CmoFVrKj.js.map +0 -1
  396. package/dist/admin/chunks/relations-DYQAaXwZ.js +0 -173
  397. package/dist/admin/chunks/relations-DYQAaXwZ.js.map +0 -1
  398. package/dist/admin/chunks/ru-C0op0ALG.js +0 -232
  399. package/dist/admin/chunks/ru-C0op0ALG.js.map +0 -1
  400. package/dist/admin/chunks/ru-CB4BUyQp.js +0 -230
  401. package/dist/admin/chunks/sa-B_FuPyMw.js +0 -201
  402. package/dist/admin/chunks/sa-B_FuPyMw.js.map +0 -1
  403. package/dist/admin/chunks/sa-n_aPA-pU.js +0 -196
  404. package/dist/admin/chunks/sa-n_aPA-pU.js.map +0 -1
  405. package/dist/admin/chunks/sk-D_iXML2C.js +0 -203
  406. package/dist/admin/chunks/sk-D_iXML2C.js.map +0 -1
  407. package/dist/admin/chunks/sk-tn_BDjE2.js +0 -198
  408. package/dist/admin/chunks/sk-tn_BDjE2.js.map +0 -1
  409. package/dist/admin/chunks/sv-BstBC1Yp.js +0 -203
  410. package/dist/admin/chunks/sv-BstBC1Yp.js.map +0 -1
  411. package/dist/admin/chunks/sv-cq4ZrQRd.js +0 -198
  412. package/dist/admin/chunks/sv-cq4ZrQRd.js.map +0 -1
  413. package/dist/admin/chunks/th-lXoOCqPC.js +0 -149
  414. package/dist/admin/chunks/th-lXoOCqPC.js.map +0 -1
  415. package/dist/admin/chunks/th-mUH7hEtc.js +0 -144
  416. package/dist/admin/chunks/th-mUH7hEtc.js.map +0 -1
  417. package/dist/admin/chunks/tr-CkS6sLIE.js +0 -200
  418. package/dist/admin/chunks/tr-CkS6sLIE.js.map +0 -1
  419. package/dist/admin/chunks/tr-Yt38daxh.js +0 -195
  420. package/dist/admin/chunks/tr-Yt38daxh.js.map +0 -1
  421. package/dist/admin/chunks/uk-B24MoTVg.js +0 -145
  422. package/dist/admin/chunks/uk-B24MoTVg.js.map +0 -1
  423. package/dist/admin/chunks/uk-Cpgmm7gE.js +0 -140
  424. package/dist/admin/chunks/uk-Cpgmm7gE.js.map +0 -1
  425. package/dist/admin/chunks/useDragAndDrop-HYwNDExe.js +0 -247
  426. package/dist/admin/chunks/useDragAndDrop-HYwNDExe.js.map +0 -1
  427. package/dist/admin/chunks/useDragAndDrop-gcqEJMnO.js +0 -271
  428. package/dist/admin/chunks/useDragAndDrop-gcqEJMnO.js.map +0 -1
  429. package/dist/admin/chunks/usePrev-Bjw2dhmq.js +0 -18
  430. package/dist/admin/chunks/usePrev-Bjw2dhmq.js.map +0 -1
  431. package/dist/admin/chunks/usePrev-DIYl-IAL.js +0 -21
  432. package/dist/admin/chunks/usePrev-DIYl-IAL.js.map +0 -1
  433. package/dist/admin/chunks/vi-BGr1X_HZ.js +0 -112
  434. package/dist/admin/chunks/vi-BGr1X_HZ.js.map +0 -1
  435. package/dist/admin/chunks/vi-CvBGlTjr.js +0 -108
  436. package/dist/admin/chunks/zh-BmF-sHaT.js +0 -205
  437. package/dist/admin/chunks/zh-BmF-sHaT.js.map +0 -1
  438. package/dist/admin/chunks/zh-DwFu_Kfj.js +0 -210
  439. package/dist/admin/chunks/zh-DwFu_Kfj.js.map +0 -1
  440. package/dist/admin/chunks/zh-Hans-CI0HKio3.js +0 -934
  441. package/dist/admin/chunks/zh-Hans-JVK9x7xr.js +0 -953
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Preview-DTUxeZDR.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 } from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\n\nimport { usePreviewContext } from '../pages/Preview';\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 };\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 } 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 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 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\nexport { PreviewHeader };\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 } from '../components/PreviewContent';\nimport { PreviewHeader } 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 <PreviewHeader />\n <PreviewContent />\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":["useIntl","jsx","Box","useQueryParams","useHistory","stringify","IconButton","Link","Cross","getDocumentStatus","DocumentStatus","Fragment","Tabs","jsxs","useNotification","useClipboard","Grid","LinkIcon","styled","Typography","createContext","useParams","React","buildValidParams","COLLECTION_TYPES","useGetPreviewUrlQuery","useDocument","useDocumentLayout","Page","Flex","useRBAC","permissions","DocumentRBAC","Portal","FocusTrap"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,iBAAiB,MAAM;AAC3B,QAAM,aAAa,kBAAkB,kBAAkB,CAAC,UAAU,MAAM,GAAG;AAErE,QAAA,EAAE,cAAc,IAAIA,kBAAQ;AAGhC,SAAAC,2BAAA;AAAA,IAACC,aAAA;AAAA,IAAA;AAAA,MACC,KAAK;AAAA,MASL,OAAO,cAAc;AAAA,QACnB,IAAI;AAAA,QACJ,gBAAgB;AAAA,MAAA,CACjB;AAAA,MACD,OAAM;AAAA,MACN,QAAO;AAAA,MACP,aAAa;AAAA,MACb,KAAI;AAAA,IAAA;AAAA,IARC;AAAA,EASP;AAEJ;ACVA,MAAM,qBAAqB,MAAM;AAC/B,QAAM,CAAC,EAAE,OAAO,IAAIC,2BAEjB;AACG,QAAA,EAAE,cAAc,IAAIH,kBAAQ;AAElC,QAAM,YAAYI,YAAAA,WAAW,cAAc,CAAC,UAAU,MAAM,SAAS;AACrE,QAAM,SAASA,YAAAA,WAAW,cAAc,CAAC,UAAU,MAAM,MAAM;AAC/D,QAAM,UAAUA,YAAAA,WAAW,cAAc,CAAC,UAAU,MAAM,OAAO;AACjE,QAAM,gBAAgBA,YAAAA,WAAW,c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QACN,UAAS;AAAA,QACT,KAAK;AAAA,QACL,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,YAAW;AAAA,QAEX,UAAAD,2BAAA,IAAC2B,iBAAK,OAAL,CAAW,CAAA;AAAA,MAAA;AAAA,IACd;AAAA,EAAA;AAKF,SAAA3B,2BAAA;AAAA,IAACC,aAAA;AAAA,IAAA;AAAA,MACC,QAAO;AAAA,MACP,OAAM;AAAA,MACN,UAAS;AAAA,MACT,KAAK;AAAA,MACL,MAAM;AAAA,MACN,QAAQ;AAAA,MACR,YAAW;AAAA,MAEX,yCAAC0B,YAAAA,KAAK,SAAL,EAAa,aACX,WAAC,EAAE,aAAAG,aAAY,qCACbC,MAAa,cAAA,EAAA,aAAaD,cACzB,UAAC9B,2BAAAA,IAAA,aAAA,EAAY,GACf,EAEJ,CAAA;AAAA,IAAA;AAAA,EACF;AAEJ;AAEA,MAAM,uBAAuB,MAAM;AACjC,wCACGgC,aACC,QAAA,EAAA,UAAAhC,2BAAA,IAACiC,0BACC,UAACjC,2BAAA,IAAA,0BAAA,EAAyB,GAC5B,EACF,CAAA;AAEJ;;;"}
@@ -0,0 +1,287 @@
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { useNotification, useClipboard, useQueryParams, useHistory, createContext, useRBAC, Page } from "@strapi/admin/strapi-admin";
4
+ import { Box, Typography, Tabs, Grid, IconButton, Portal, FocusTrap, Flex } from "@strapi/design-system";
5
+ import { useIntl } from "react-intl";
6
+ import { Link as Link$1, useParams } from "react-router-dom";
7
+ import { D as DocumentStatus, l as DocumentRBAC, d as buildValidParams, C as COLLECTION_TYPES, N as useGetPreviewUrlQuery, M as useDocument, h as useDocumentLayout } from "./index-CIIIuVmx.mjs";
8
+ import { Link, Cross } from "@strapi/icons";
9
+ import { stringify } from "qs";
10
+ import { styled } from "styled-components";
11
+ import { getDocumentStatus } from "./EditViewPage-BUdd4V-E.mjs";
12
+ const PreviewContent = () => {
13
+ const previewUrl = usePreviewContext("PreviewContent", (state) => state.url);
14
+ const { formatMessage } = useIntl();
15
+ return /* @__PURE__ */ jsx(
16
+ Box,
17
+ {
18
+ src: previewUrl,
19
+ title: formatMessage({
20
+ id: "content-manager.preview.panel.title",
21
+ defaultMessage: "Preview"
22
+ }),
23
+ width: "100%",
24
+ height: "100%",
25
+ borderWidth: 0,
26
+ tag: "iframe"
27
+ },
28
+ previewUrl
29
+ );
30
+ };
31
+ const ClosePreviewButton = () => {
32
+ const [{ query }] = useQueryParams();
33
+ const { formatMessage } = useIntl();
34
+ const canGoBack = useHistory("BackButton", (state) => state.canGoBack);
35
+ const goBack = useHistory("BackButton", (state) => state.goBack);
36
+ const history = useHistory("BackButton", (state) => state.history);
37
+ const locationIndex = useHistory("BackButton", (state) => state.currentLocationIndex);
38
+ const historyTo = canGoBack ? history.at(locationIndex - 2) : void 0;
39
+ const fallback = {
40
+ pathname: "..",
41
+ search: stringify(query, { encode: false })
42
+ };
43
+ const toWithFallback = historyTo ?? fallback;
44
+ const handleClick = (e) => {
45
+ if (canGoBack) {
46
+ e.preventDefault();
47
+ goBack();
48
+ return;
49
+ }
50
+ };
51
+ return /* @__PURE__ */ jsx(
52
+ IconButton,
53
+ {
54
+ tag: Link$1,
55
+ relative: "path",
56
+ to: toWithFallback,
57
+ onClick: handleClick,
58
+ label: formatMessage({
59
+ id: "content-manager.preview.header.close",
60
+ defaultMessage: "Close preview"
61
+ }),
62
+ children: /* @__PURE__ */ jsx(Cross, {})
63
+ }
64
+ );
65
+ };
66
+ const Status = () => {
67
+ const document = usePreviewContext("PreviewHeader", (state) => state.document);
68
+ const schema = usePreviewContext("PreviewHeader", (state) => state.schema);
69
+ const meta = usePreviewContext("PreviewHeader", (state) => state.meta);
70
+ const hasDraftAndPublished = schema?.options?.draftAndPublish ?? false;
71
+ if (!hasDraftAndPublished) {
72
+ return null;
73
+ }
74
+ const status = getDocumentStatus(document, meta);
75
+ return /* @__PURE__ */ jsx(DocumentStatus, { status, size: "XS" });
76
+ };
77
+ const PreviewTabs = () => {
78
+ const { formatMessage } = useIntl();
79
+ const [{ query }, setQuery] = useQueryParams();
80
+ const document = usePreviewContext("PreviewHeader", (state) => state.document);
81
+ const schema = usePreviewContext("PreviewHeader", (state) => state.schema);
82
+ const meta = usePreviewContext("PreviewHeader", (state) => state.meta);
83
+ const hasDraftAndPublish = schema?.options?.draftAndPublish ?? false;
84
+ const documentStatus = getDocumentStatus(document, meta);
85
+ const handleTabChange = (status) => {
86
+ if (status === "published" || status === "draft") {
87
+ setQuery({ status }, "push", true);
88
+ }
89
+ };
90
+ if (!hasDraftAndPublish) {
91
+ return null;
92
+ }
93
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Tabs.Root, { variant: "simple", value: query.status || "draft", onValueChange: handleTabChange, children: /* @__PURE__ */ jsxs(
94
+ Tabs.List,
95
+ {
96
+ "aria-label": formatMessage({
97
+ id: "preview.tabs.label",
98
+ defaultMessage: "Document status"
99
+ }),
100
+ children: [
101
+ /* @__PURE__ */ jsx(StatusTab, { value: "draft", children: formatMessage({
102
+ id: "content-manager.containers.List.draft",
103
+ defaultMessage: "draft"
104
+ }) }),
105
+ /* @__PURE__ */ jsx(StatusTab, { value: "published", disabled: documentStatus === "draft", children: formatMessage({
106
+ id: "content-manager.containers.List.published",
107
+ defaultMessage: "published"
108
+ }) })
109
+ ]
110
+ }
111
+ ) }) });
112
+ };
113
+ const PreviewHeader = () => {
114
+ const title = usePreviewContext("PreviewHeader", (state) => state.title);
115
+ const { formatMessage } = useIntl();
116
+ const { toggleNotification } = useNotification();
117
+ const { copy } = useClipboard();
118
+ const handleCopyLink = () => {
119
+ copy(window.location.href);
120
+ toggleNotification({
121
+ message: formatMessage({
122
+ id: "content-manager.preview.copy.success",
123
+ defaultMessage: "Copied preview link"
124
+ }),
125
+ type: "success"
126
+ });
127
+ };
128
+ return /* @__PURE__ */ jsxs(
129
+ Grid.Root,
130
+ {
131
+ gap: 3,
132
+ gridCols: 3,
133
+ paddingLeft: 2,
134
+ paddingRight: 2,
135
+ background: "neutral0",
136
+ borderColor: "neutral150",
137
+ tag: "header",
138
+ children: [
139
+ /* @__PURE__ */ jsxs(Grid.Item, { xs: 1, paddingTop: 2, paddingBottom: 2, gap: 3, children: [
140
+ /* @__PURE__ */ jsx(ClosePreviewButton, {}),
141
+ /* @__PURE__ */ jsx(PreviewTitle, { tag: "h1", fontWeight: 600, fontSize: 2, maxWidth: "200px", title, children: title }),
142
+ /* @__PURE__ */ jsx(Status, {})
143
+ ] }),
144
+ /* @__PURE__ */ jsx(Grid.Item, { xs: 1, marginBottom: "-1px", alignItems: "end", margin: "auto", children: /* @__PURE__ */ jsx(PreviewTabs, {}) }),
145
+ /* @__PURE__ */ jsx(Grid.Item, { xs: 1, justifyContent: "end", paddingTop: 2, paddingBottom: 2, children: /* @__PURE__ */ jsx(
146
+ IconButton,
147
+ {
148
+ type: "button",
149
+ label: formatMessage({
150
+ id: "preview.copy.label",
151
+ defaultMessage: "Copy preview link"
152
+ }),
153
+ onClick: handleCopyLink,
154
+ children: /* @__PURE__ */ jsx(Link, {})
155
+ }
156
+ ) })
157
+ ]
158
+ }
159
+ );
160
+ };
161
+ const PreviewTitle = styled(Typography)`
162
+ overflow: hidden;
163
+ text-overflow: ellipsis;
164
+ white-space: nowrap;
165
+ `;
166
+ const StatusTab = styled(Tabs.Trigger)`
167
+ text-transform: uppercase;
168
+ `;
169
+ const [PreviewProvider, usePreviewContext] = createContext("PreviewPage");
170
+ const PreviewPage = () => {
171
+ const { formatMessage } = useIntl();
172
+ const {
173
+ slug: model,
174
+ id: documentId,
175
+ collectionType
176
+ } = useParams();
177
+ const [{ query }] = useQueryParams();
178
+ const params = React.useMemo(() => buildValidParams(query), [query]);
179
+ if (!collectionType) {
180
+ throw new Error("Could not find collectionType in url params");
181
+ }
182
+ if (!model) {
183
+ throw new Error("Could not find model in url params");
184
+ }
185
+ if (collectionType === COLLECTION_TYPES && !documentId) {
186
+ throw new Error("Could not find documentId in url params");
187
+ }
188
+ const previewUrlResponse = useGetPreviewUrlQuery({
189
+ params: {
190
+ contentType: model
191
+ },
192
+ query: {
193
+ documentId,
194
+ locale: params.locale,
195
+ status: params.status
196
+ }
197
+ });
198
+ const documentResponse = useDocument({
199
+ model,
200
+ collectionType,
201
+ documentId,
202
+ params
203
+ });
204
+ const documentLayoutResponse = useDocumentLayout(model);
205
+ if (documentResponse.isLoading || previewUrlResponse.isLoading || documentLayoutResponse.isLoading) {
206
+ return /* @__PURE__ */ jsx(Page.Loading, {});
207
+ }
208
+ if (previewUrlResponse.error || documentLayoutResponse.error || !documentResponse.document || !documentResponse.meta || !documentResponse.schema) {
209
+ return /* @__PURE__ */ jsx(Page.Error, {});
210
+ }
211
+ if (!previewUrlResponse.data?.data?.url) {
212
+ return /* @__PURE__ */ jsx(Page.NoData, {});
213
+ }
214
+ const documentTitle = documentResponse.getTitle(documentLayoutResponse.edit.settings.mainField);
215
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
216
+ /* @__PURE__ */ jsx(Page.Title, { children: formatMessage(
217
+ {
218
+ id: "content-manager.preview.page-title",
219
+ defaultMessage: "{contentType} preview"
220
+ },
221
+ {
222
+ contentType: documentTitle
223
+ }
224
+ ) }),
225
+ /* @__PURE__ */ jsx(
226
+ PreviewProvider,
227
+ {
228
+ url: previewUrlResponse.data.data.url,
229
+ document: documentResponse.document,
230
+ title: documentTitle,
231
+ meta: documentResponse.meta,
232
+ schema: documentResponse.schema,
233
+ children: /* @__PURE__ */ jsxs(Flex, { direction: "column", height: "100%", alignItems: "stretch", children: [
234
+ /* @__PURE__ */ jsx(PreviewHeader, {}),
235
+ /* @__PURE__ */ jsx(PreviewContent, {})
236
+ ] })
237
+ }
238
+ )
239
+ ] });
240
+ };
241
+ const ProtectedPreviewPageImpl = () => {
242
+ const { slug: model } = useParams();
243
+ const {
244
+ permissions = [],
245
+ isLoading,
246
+ error
247
+ } = useRBAC([{ action: "plugin::content-manager.explorer.read", subject: model }]);
248
+ if (isLoading) {
249
+ return /* @__PURE__ */ jsx(Page.Loading, {});
250
+ }
251
+ if (error || !model) {
252
+ return /* @__PURE__ */ jsx(
253
+ Box,
254
+ {
255
+ height: "100vh",
256
+ width: "100vw",
257
+ position: "fixed",
258
+ top: 0,
259
+ left: 0,
260
+ zIndex: 2,
261
+ background: "neutral0",
262
+ children: /* @__PURE__ */ jsx(Page.Error, {})
263
+ }
264
+ );
265
+ }
266
+ return /* @__PURE__ */ jsx(
267
+ Box,
268
+ {
269
+ height: "100vh",
270
+ width: "100vw",
271
+ position: "fixed",
272
+ top: 0,
273
+ left: 0,
274
+ zIndex: 2,
275
+ background: "neutral0",
276
+ children: /* @__PURE__ */ jsx(Page.Protect, { permissions, children: ({ permissions: permissions2 }) => /* @__PURE__ */ jsx(DocumentRBAC, { permissions: permissions2, children: /* @__PURE__ */ jsx(PreviewPage, {}) }) })
277
+ }
278
+ );
279
+ };
280
+ const ProtectedPreviewPage = () => {
281
+ return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(FocusTrap, { children: /* @__PURE__ */ jsx(ProtectedPreviewPageImpl, {}) }) });
282
+ };
283
+ export {
284
+ ProtectedPreviewPage,
285
+ usePreviewContext
286
+ };
287
+ //# sourceMappingURL=Preview-k2MYjnIi.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Preview-k2MYjnIi.mjs","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 } from '@strapi/design-system';\nimport { useIntl } from 'react-intl';\n\nimport { usePreviewContext } from '../pages/Preview';\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 };\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 } 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 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 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\nexport { PreviewHeader };\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 } from '../components/PreviewContent';\nimport { PreviewHeader } 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 <PreviewHeader />\n <PreviewContent />\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 <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