@strapi/content-manager 0.0.0-experimental.da85533897155e719d784f0271223c866d2f69ab → 0.0.0-experimental.dad3c50630ca4fd9eccdcbe549ee632fc572e23d

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 (210) hide show
  1. package/dist/_chunks/CardDragPreview-C0QyJgRA.js.map +1 -1
  2. package/dist/_chunks/CardDragPreview-DOxamsuj.mjs.map +1 -1
  3. package/dist/_chunks/{ComponentConfigurationPage-DyDkPajU.js → ComponentConfigurationPage-BLWQy8ru.js} +5 -6
  4. package/dist/_chunks/{ComponentConfigurationPage-DyDkPajU.js.map → ComponentConfigurationPage-BLWQy8ru.js.map} +1 -1
  5. package/dist/_chunks/{ComponentConfigurationPage-9lRmRdIr.mjs → ComponentConfigurationPage-CtIa3aa2.mjs} +4 -4
  6. package/dist/_chunks/{ComponentConfigurationPage-9lRmRdIr.mjs.map → ComponentConfigurationPage-CtIa3aa2.mjs.map} +1 -1
  7. package/dist/_chunks/{ComponentIcon-BXdiCGQp.js → ComponentIcon-CRbtQEUV.js} +2 -3
  8. package/dist/_chunks/{ComponentIcon-BXdiCGQp.js.map → ComponentIcon-CRbtQEUV.js.map} +1 -1
  9. package/dist/_chunks/ComponentIcon-u4bIXTFY.mjs.map +1 -1
  10. package/dist/_chunks/{EditConfigurationPage-Bk893vVY.mjs → EditConfigurationPage-DsPR2DVk.mjs} +4 -4
  11. package/dist/_chunks/{EditConfigurationPage-Bk893vVY.mjs.map → EditConfigurationPage-DsPR2DVk.mjs.map} +1 -1
  12. package/dist/_chunks/{EditConfigurationPage-DValmA0m.js → EditConfigurationPage-RQkymxCy.js} +5 -6
  13. package/dist/_chunks/{EditConfigurationPage-DValmA0m.js.map → EditConfigurationPage-RQkymxCy.js.map} +1 -1
  14. package/dist/_chunks/{EditViewPage-Dk7Eaft4.js → EditViewPage-B-kExt8C.js} +50 -11
  15. package/dist/_chunks/EditViewPage-B-kExt8C.js.map +1 -0
  16. package/dist/_chunks/{EditViewPage-DiNFdFqP.mjs → EditViewPage-BPyVuPfM.mjs} +50 -10
  17. package/dist/_chunks/EditViewPage-BPyVuPfM.mjs.map +1 -0
  18. package/dist/_chunks/{Field-DH2OaqUP.js → Field-DPIsQRre.js} +250 -161
  19. package/dist/_chunks/Field-DPIsQRre.js.map +1 -0
  20. package/dist/_chunks/{Field-Dv_HTFTa.mjs → Field-Dltnt1km.mjs} +244 -155
  21. package/dist/_chunks/Field-Dltnt1km.mjs.map +1 -0
  22. package/dist/_chunks/FieldTypeIcon-CMlNO8PE.mjs.map +1 -1
  23. package/dist/_chunks/FieldTypeIcon-Dnwq_IRF.js.map +1 -1
  24. package/dist/_chunks/{Form-B_dUDizM.js → Form-BFi4MXMT.js} +19 -12
  25. package/dist/_chunks/Form-BFi4MXMT.js.map +1 -0
  26. package/dist/_chunks/{Form-Dy6P4HgH.mjs → Form-C1IcWm1u.mjs} +17 -9
  27. package/dist/_chunks/Form-C1IcWm1u.mjs.map +1 -0
  28. package/dist/_chunks/{History-DrwsD1Vc.mjs → History-04ChQ4pl.mjs} +71 -104
  29. package/dist/_chunks/History-04ChQ4pl.mjs.map +1 -0
  30. package/dist/_chunks/{History-BT4w83Oa.js → History-wjcK4L0C.js} +70 -104
  31. package/dist/_chunks/History-wjcK4L0C.js.map +1 -0
  32. package/dist/_chunks/{ListConfigurationPage-BxIP0jRy.mjs → ListConfigurationPage-BYqPYLSU.mjs} +7 -6
  33. package/dist/_chunks/ListConfigurationPage-BYqPYLSU.mjs.map +1 -0
  34. package/dist/_chunks/{ListConfigurationPage-CuYrMcW3.js → ListConfigurationPage-CRbxIC3J.js} +7 -7
  35. package/dist/_chunks/ListConfigurationPage-CRbxIC3J.js.map +1 -0
  36. package/dist/_chunks/{ListViewPage-BvpwNur7.js → ListViewPage-D5NY9183.js} +88 -54
  37. package/dist/_chunks/ListViewPage-D5NY9183.js.map +1 -0
  38. package/dist/_chunks/{ListViewPage-5a1vw-OK.mjs → ListViewPage-FU2LBuhl.mjs} +83 -48
  39. package/dist/_chunks/ListViewPage-FU2LBuhl.mjs.map +1 -0
  40. package/dist/_chunks/{NoContentTypePage-UqEiWKkM.js → NoContentTypePage-BgQVE_Qb.js} +2 -2
  41. package/dist/_chunks/{NoContentTypePage-UqEiWKkM.js.map → NoContentTypePage-BgQVE_Qb.js.map} +1 -1
  42. package/dist/_chunks/{NoContentTypePage-Bm6tRcd3.mjs → NoContentTypePage-DCKUkwb8.mjs} +2 -2
  43. package/dist/_chunks/{NoContentTypePage-Bm6tRcd3.mjs.map → NoContentTypePage-DCKUkwb8.mjs.map} +1 -1
  44. package/dist/_chunks/{NoPermissionsPage-C_vGRo8Q.js → NoPermissionsPage-C5jwn70o.js} +2 -2
  45. package/dist/_chunks/{NoPermissionsPage-C_vGRo8Q.js.map → NoPermissionsPage-C5jwn70o.js.map} +1 -1
  46. package/dist/_chunks/{NoPermissionsPage-BHPqn_tQ.mjs → NoPermissionsPage-jqve7C8l.mjs} +2 -2
  47. package/dist/_chunks/{NoPermissionsPage-BHPqn_tQ.mjs.map → NoPermissionsPage-jqve7C8l.mjs.map} +1 -1
  48. package/dist/_chunks/Preview-BMYN548c.mjs +294 -0
  49. package/dist/_chunks/Preview-BMYN548c.mjs.map +1 -0
  50. package/dist/_chunks/Preview-DaOihysv.js +312 -0
  51. package/dist/_chunks/Preview-DaOihysv.js.map +1 -0
  52. package/dist/_chunks/{Relations-CznVF6LS.js → Relations-CTGM7Hv5.js} +75 -42
  53. package/dist/_chunks/Relations-CTGM7Hv5.js.map +1 -0
  54. package/dist/_chunks/{Relations-C7fPyh5P.mjs → Relations-gscPkxjF.mjs} +75 -41
  55. package/dist/_chunks/Relations-gscPkxjF.mjs.map +1 -0
  56. package/dist/_chunks/{en-otD_UBJi.js → en-BzQmavmK.js} +32 -14
  57. package/dist/_chunks/{en-otD_UBJi.js.map → en-BzQmavmK.js.map} +1 -1
  58. package/dist/_chunks/{en-CbaIuYoB.mjs → en-CSxLmrh1.mjs} +32 -14
  59. package/dist/_chunks/{en-CbaIuYoB.mjs.map → en-CSxLmrh1.mjs.map} +1 -1
  60. package/dist/_chunks/{es-EUonQTon.js → es-9K52xZIr.js} +2 -2
  61. package/dist/_chunks/{ja-CcFe8diO.js.map → es-9K52xZIr.js.map} +1 -1
  62. package/dist/_chunks/{es-CeXiYflN.mjs → es-D34tqjMw.mjs} +2 -2
  63. package/dist/_chunks/{es-CeXiYflN.mjs.map → es-D34tqjMw.mjs.map} +1 -1
  64. package/dist/_chunks/{fr-CD9VFbPM.mjs → fr--pg5jUbt.mjs} +13 -3
  65. package/dist/_chunks/{fr-CD9VFbPM.mjs.map → fr--pg5jUbt.mjs.map} +1 -1
  66. package/dist/_chunks/{fr-B7kGGg3E.js → fr-B2Kyv8Z9.js} +13 -3
  67. package/dist/_chunks/{fr-B7kGGg3E.js.map → fr-B2Kyv8Z9.js.map} +1 -1
  68. package/dist/_chunks/hooks-BAaaKPS_.js.map +1 -1
  69. package/dist/_chunks/{index-D9UmmBcM.js → index-Ca7YWlAA.js} +1063 -754
  70. package/dist/_chunks/index-Ca7YWlAA.js.map +1 -0
  71. package/dist/_chunks/{index-BJ6uTqLL.mjs → index-DqasUQ6Q.mjs} +1066 -757
  72. package/dist/_chunks/index-DqasUQ6Q.mjs.map +1 -0
  73. package/dist/_chunks/{ja-CcFe8diO.js → ja-7sfIbjxE.js} +2 -2
  74. package/dist/_chunks/{es-EUonQTon.js.map → ja-7sfIbjxE.js.map} +1 -1
  75. package/dist/_chunks/{ja-CtsUxOvk.mjs → ja-BHqhDq4V.mjs} +2 -2
  76. package/dist/_chunks/{ja-CtsUxOvk.mjs.map → ja-BHqhDq4V.mjs.map} +1 -1
  77. package/dist/_chunks/{layout-kfu5Wtix.js → layout-BW80JSCd.js} +7 -7
  78. package/dist/_chunks/{layout-kfu5Wtix.js.map → layout-BW80JSCd.js.map} +1 -1
  79. package/dist/_chunks/{layout-uomiIGbG.mjs → layout-W3clJSCy.mjs} +6 -5
  80. package/dist/_chunks/{layout-uomiIGbG.mjs.map → layout-W3clJSCy.mjs.map} +1 -1
  81. package/dist/_chunks/{objects-gigeqt7s.js → objects-BcXOv6_9.js} +2 -4
  82. package/dist/_chunks/{objects-gigeqt7s.js.map → objects-BcXOv6_9.js.map} +1 -1
  83. package/dist/_chunks/{objects-mKMAmfec.mjs → objects-D6yBsdmx.mjs} +2 -4
  84. package/dist/_chunks/{objects-mKMAmfec.mjs.map → objects-D6yBsdmx.mjs.map} +1 -1
  85. package/dist/_chunks/{relations-DiDufGSA.mjs → relations-BlDkoeWh.mjs} +6 -7
  86. package/dist/_chunks/relations-BlDkoeWh.mjs.map +1 -0
  87. package/dist/_chunks/{relations-DKENrxko.js → relations-C9Usz9k5.js} +6 -7
  88. package/dist/_chunks/relations-C9Usz9k5.js.map +1 -0
  89. package/dist/_chunks/{usePrev-B9w_-eYc.js → useDebounce-CtcjDB3L.js} +14 -1
  90. package/dist/_chunks/useDebounce-CtcjDB3L.js.map +1 -0
  91. package/dist/_chunks/useDebounce-DmuSJIF3.mjs +29 -0
  92. package/dist/_chunks/useDebounce-DmuSJIF3.mjs.map +1 -0
  93. package/dist/_chunks/{useDragAndDrop-J0TUUbR6.js → useDragAndDrop-BMtgCYzL.js} +5 -9
  94. package/dist/_chunks/{useDragAndDrop-J0TUUbR6.js.map → useDragAndDrop-BMtgCYzL.js.map} +1 -1
  95. package/dist/_chunks/{useDragAndDrop-DdHgKsqq.mjs → useDragAndDrop-DJ6jqvZN.mjs} +4 -7
  96. package/dist/_chunks/{useDragAndDrop-DdHgKsqq.mjs.map → useDragAndDrop-DJ6jqvZN.mjs.map} +1 -1
  97. package/dist/admin/index.js +3 -1
  98. package/dist/admin/index.js.map +1 -1
  99. package/dist/admin/index.mjs +5 -3
  100. package/dist/admin/src/content-manager.d.ts +3 -2
  101. package/dist/admin/src/exports.d.ts +2 -1
  102. package/dist/admin/src/history/services/historyVersion.d.ts +1 -1
  103. package/dist/admin/src/hooks/useDocument.d.ts +32 -1
  104. package/dist/admin/src/pages/EditView/EditViewPage.d.ts +9 -1
  105. package/dist/admin/src/pages/EditView/components/DocumentActions.d.ts +1 -1
  106. package/dist/admin/src/pages/EditView/components/DocumentStatus.d.ts +3 -3
  107. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/Code.d.ts +7 -0
  108. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/Blocks/utils/prismLanguages.d.ts +49 -0
  109. package/dist/admin/src/pages/EditView/components/FormInputs/BlocksInput/utils/constants.d.ts +1 -0
  110. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/DynamicComponent.d.ts +4 -1
  111. package/dist/admin/src/pages/EditView/components/FormInputs/DynamicZone/Field.d.ts +4 -1
  112. package/dist/admin/src/pages/EditView/components/Header.d.ts +11 -11
  113. package/dist/admin/src/preview/components/PreviewContent.d.ts +2 -0
  114. package/dist/admin/src/preview/components/PreviewHeader.d.ts +2 -0
  115. package/dist/admin/src/preview/components/PreviewSidePanel.d.ts +3 -0
  116. package/dist/admin/src/preview/index.d.ts +4 -0
  117. package/dist/admin/src/preview/pages/Preview.d.ts +11 -0
  118. package/dist/admin/src/preview/routes.d.ts +3 -0
  119. package/dist/admin/src/preview/services/preview.d.ts +3 -0
  120. package/dist/admin/src/router.d.ts +1 -1
  121. package/dist/admin/src/services/api.d.ts +1 -1
  122. package/dist/admin/src/services/components.d.ts +2 -2
  123. package/dist/admin/src/services/contentTypes.d.ts +3 -3
  124. package/dist/admin/src/services/documents.d.ts +19 -20
  125. package/dist/admin/src/services/init.d.ts +1 -1
  126. package/dist/admin/src/services/relations.d.ts +2 -2
  127. package/dist/admin/src/services/uid.d.ts +3 -3
  128. package/dist/server/index.js +594 -335
  129. package/dist/server/index.js.map +1 -1
  130. package/dist/server/index.mjs +595 -335
  131. package/dist/server/index.mjs.map +1 -1
  132. package/dist/server/src/bootstrap.d.ts.map +1 -1
  133. package/dist/server/src/controllers/collection-types.d.ts.map +1 -1
  134. package/dist/server/src/controllers/index.d.ts.map +1 -1
  135. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  136. package/dist/server/src/controllers/utils/metadata.d.ts +16 -1
  137. package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -1
  138. package/dist/server/src/history/controllers/history-version.d.ts +1 -1
  139. package/dist/server/src/history/controllers/history-version.d.ts.map +1 -1
  140. package/dist/server/src/history/services/history.d.ts +3 -3
  141. package/dist/server/src/history/services/history.d.ts.map +1 -1
  142. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  143. package/dist/server/src/history/services/utils.d.ts +6 -11
  144. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  145. package/dist/server/src/index.d.ts +7 -6
  146. package/dist/server/src/index.d.ts.map +1 -1
  147. package/dist/server/src/preview/controllers/index.d.ts +2 -0
  148. package/dist/server/src/preview/controllers/index.d.ts.map +1 -0
  149. package/dist/server/src/preview/controllers/preview.d.ts +13 -0
  150. package/dist/server/src/preview/controllers/preview.d.ts.map +1 -0
  151. package/dist/server/src/preview/controllers/validation/preview.d.ts +6 -0
  152. package/dist/server/src/preview/controllers/validation/preview.d.ts.map +1 -0
  153. package/dist/server/src/preview/index.d.ts +4 -0
  154. package/dist/server/src/preview/index.d.ts.map +1 -0
  155. package/dist/server/src/preview/routes/index.d.ts +8 -0
  156. package/dist/server/src/preview/routes/index.d.ts.map +1 -0
  157. package/dist/server/src/preview/routes/preview.d.ts +4 -0
  158. package/dist/server/src/preview/routes/preview.d.ts.map +1 -0
  159. package/dist/server/src/preview/services/index.d.ts +16 -0
  160. package/dist/server/src/preview/services/index.d.ts.map +1 -0
  161. package/dist/server/src/preview/services/preview-config.d.ts +32 -0
  162. package/dist/server/src/preview/services/preview-config.d.ts.map +1 -0
  163. package/dist/server/src/preview/services/preview.d.ts +12 -0
  164. package/dist/server/src/preview/services/preview.d.ts.map +1 -0
  165. package/dist/server/src/preview/utils.d.ts +19 -0
  166. package/dist/server/src/preview/utils.d.ts.map +1 -0
  167. package/dist/server/src/register.d.ts.map +1 -1
  168. package/dist/server/src/routes/index.d.ts.map +1 -1
  169. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  170. package/dist/server/src/services/document-metadata.d.ts +12 -10
  171. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  172. package/dist/server/src/services/index.d.ts +7 -6
  173. package/dist/server/src/services/index.d.ts.map +1 -1
  174. package/dist/server/src/services/utils/populate.d.ts +2 -2
  175. package/dist/server/src/services/utils/populate.d.ts.map +1 -1
  176. package/dist/server/src/utils/index.d.ts +2 -0
  177. package/dist/server/src/utils/index.d.ts.map +1 -1
  178. package/dist/shared/contracts/collection-types.d.ts +3 -1
  179. package/dist/shared/contracts/collection-types.d.ts.map +1 -1
  180. package/dist/shared/contracts/index.d.ts +1 -0
  181. package/dist/shared/contracts/index.d.ts.map +1 -1
  182. package/dist/shared/contracts/preview.d.ts +27 -0
  183. package/dist/shared/contracts/preview.d.ts.map +1 -0
  184. package/dist/shared/index.js +4 -0
  185. package/dist/shared/index.js.map +1 -1
  186. package/dist/shared/index.mjs +4 -0
  187. package/dist/shared/index.mjs.map +1 -1
  188. package/package.json +17 -15
  189. package/dist/_chunks/EditViewPage-DiNFdFqP.mjs.map +0 -1
  190. package/dist/_chunks/EditViewPage-Dk7Eaft4.js.map +0 -1
  191. package/dist/_chunks/Field-DH2OaqUP.js.map +0 -1
  192. package/dist/_chunks/Field-Dv_HTFTa.mjs.map +0 -1
  193. package/dist/_chunks/Form-B_dUDizM.js.map +0 -1
  194. package/dist/_chunks/Form-Dy6P4HgH.mjs.map +0 -1
  195. package/dist/_chunks/History-BT4w83Oa.js.map +0 -1
  196. package/dist/_chunks/History-DrwsD1Vc.mjs.map +0 -1
  197. package/dist/_chunks/ListConfigurationPage-BxIP0jRy.mjs.map +0 -1
  198. package/dist/_chunks/ListConfigurationPage-CuYrMcW3.js.map +0 -1
  199. package/dist/_chunks/ListViewPage-5a1vw-OK.mjs.map +0 -1
  200. package/dist/_chunks/ListViewPage-BvpwNur7.js.map +0 -1
  201. package/dist/_chunks/Relations-C7fPyh5P.mjs.map +0 -1
  202. package/dist/_chunks/Relations-CznVF6LS.js.map +0 -1
  203. package/dist/_chunks/index-BJ6uTqLL.mjs.map +0 -1
  204. package/dist/_chunks/index-D9UmmBcM.js.map +0 -1
  205. package/dist/_chunks/relations-DKENrxko.js.map +0 -1
  206. package/dist/_chunks/relations-DiDufGSA.mjs.map +0 -1
  207. package/dist/_chunks/usePrev-B9w_-eYc.js.map +0 -1
  208. package/dist/_chunks/usePrev-DH6iah0A.mjs +0 -16
  209. package/dist/_chunks/usePrev-DH6iah0A.mjs.map +0 -1
  210. package/strapi-server.js +0 -3
@@ -1 +1 @@
1
- {"version":3,"file":"NoContentTypePage-Bm6tRcd3.mjs","sources":["../../admin/src/pages/NoContentTypePage.tsx"],"sourcesContent":["import { Page, Layouts } from '@strapi/admin/strapi-admin';\nimport { EmptyStateLayout, LinkButton } from '@strapi/design-system';\nimport { Plus } from '@strapi/icons';\nimport { EmptyDocuments } from '@strapi/icons/symbols';\nimport { useIntl } from 'react-intl';\nimport { NavLink } from 'react-router-dom';\n\nimport { getTranslation } from '../utils/translations';\n\nconst NoContentType = () => {\n const { formatMessage } = useIntl();\n\n return (\n <Page.Main>\n <Layouts.Header\n title={formatMessage({\n id: getTranslation('header.name'),\n defaultMessage: 'Content',\n })}\n />\n <Layouts.Content>\n <EmptyStateLayout\n action={\n <LinkButton\n tag={NavLink}\n variant=\"secondary\"\n startIcon={<Plus />}\n to=\"/plugins/content-type-builder/content-types/create-content-type\"\n >\n {formatMessage({\n id: 'app.components.HomePage.create',\n defaultMessage: 'Create your first Content-type',\n })}\n </LinkButton>\n }\n content={formatMessage({\n id: 'content-manager.pages.NoContentType.text',\n defaultMessage:\n \"You don't have any content yet, we recommend you to create your first Content-Type.\",\n })}\n hasRadius\n icon={<EmptyDocuments width=\"16rem\" />}\n shadow=\"tableShadow\"\n />\n </Layouts.Content>\n </Page.Main>\n );\n};\n\nexport { NoContentType };\n"],"names":[],"mappings":";;;;;;;;AASA,MAAM,gBAAgB,MAAM;AACpB,QAAA,EAAE,kBAAkB;AAGxB,SAAA,qBAAC,KAAK,MAAL,EACC,UAAA;AAAA,IAAA;AAAA,MAAC,QAAQ;AAAA,MAAR;AAAA,QACC,OAAO,cAAc;AAAA,UACnB,IAAI,eAAe,aAAa;AAAA,UAChC,gBAAgB;AAAA,QAAA,CACjB;AAAA,MAAA;AAAA,IACH;AAAA,IACA,oBAAC,QAAQ,SAAR,EACC,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,QACE;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,KAAK;AAAA,YACL,SAAQ;AAAA,YACR,+BAAY,MAAK,EAAA;AAAA,YACjB,IAAG;AAAA,YAEF,UAAc,cAAA;AAAA,cACb,IAAI;AAAA,cACJ,gBAAgB;AAAA,YAAA,CACjB;AAAA,UAAA;AAAA,QACH;AAAA,QAEF,SAAS,cAAc;AAAA,UACrB,IAAI;AAAA,UACJ,gBACE;AAAA,QAAA,CACH;AAAA,QACD,WAAS;AAAA,QACT,MAAM,oBAAC,gBAAe,EAAA,OAAM,QAAQ,CAAA;AAAA,QACpC,QAAO;AAAA,MAAA;AAAA,IAAA,GAEX;AAAA,EACF,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"NoContentTypePage-DCKUkwb8.mjs","sources":["../../admin/src/pages/NoContentTypePage.tsx"],"sourcesContent":["import { Page, Layouts } from '@strapi/admin/strapi-admin';\nimport { EmptyStateLayout, LinkButton } from '@strapi/design-system';\nimport { Plus } from '@strapi/icons';\nimport { EmptyDocuments } from '@strapi/icons/symbols';\nimport { useIntl } from 'react-intl';\nimport { NavLink } from 'react-router-dom';\n\nimport { getTranslation } from '../utils/translations';\n\nconst NoContentType = () => {\n const { formatMessage } = useIntl();\n\n return (\n <Page.Main>\n <Layouts.Header\n title={formatMessage({\n id: getTranslation('header.name'),\n defaultMessage: 'Content',\n })}\n />\n <Layouts.Content>\n <EmptyStateLayout\n action={\n <LinkButton\n tag={NavLink}\n variant=\"secondary\"\n startIcon={<Plus />}\n to=\"/plugins/content-type-builder/content-types/create-content-type\"\n >\n {formatMessage({\n id: 'app.components.HomePage.create',\n defaultMessage: 'Create your first Content-type',\n })}\n </LinkButton>\n }\n content={formatMessage({\n id: 'content-manager.pages.NoContentType.text',\n defaultMessage:\n \"You don't have any content yet, we recommend you to create your first Content-Type.\",\n })}\n hasRadius\n icon={<EmptyDocuments width=\"16rem\" />}\n shadow=\"tableShadow\"\n />\n </Layouts.Content>\n </Page.Main>\n );\n};\n\nexport { NoContentType };\n"],"names":[],"mappings":";;;;;;;;AASA,MAAM,gBAAgB,MAAM;AACpB,QAAA,EAAE,cAAc,IAAI,QAAQ;AAGhC,SAAA,qBAAC,KAAK,MAAL,EACC,UAAA;AAAA,IAAA;AAAA,MAAC,QAAQ;AAAA,MAAR;AAAA,QACC,OAAO,cAAc;AAAA,UACnB,IAAI,eAAe,aAAa;AAAA,UAChC,gBAAgB;AAAA,QACjB,CAAA;AAAA,MAAA;AAAA,IACH;AAAA,IACA,oBAAC,QAAQ,SAAR,EACC,UAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,QACE;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,KAAK;AAAA,YACL,SAAQ;AAAA,YACR,+BAAY,MAAK,EAAA;AAAA,YACjB,IAAG;AAAA,YAEF,UAAc,cAAA;AAAA,cACb,IAAI;AAAA,cACJ,gBAAgB;AAAA,YACjB,CAAA;AAAA,UAAA;AAAA,QACH;AAAA,QAEF,SAAS,cAAc;AAAA,UACrB,IAAI;AAAA,UACJ,gBACE;AAAA,QAAA,CACH;AAAA,QACD,WAAS;AAAA,QACT,MAAM,oBAAC,gBAAe,EAAA,OAAM,QAAQ,CAAA;AAAA,QACpC,QAAO;AAAA,MAAA;AAAA,IAAA,EAEX,CAAA;AAAA,EAAA,GACF;AAEJ;"}
@@ -3,7 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const strapiAdmin = require("@strapi/admin/strapi-admin");
5
5
  const reactIntl = require("react-intl");
6
- const index = require("./index-D9UmmBcM.js");
6
+ const index = require("./index-Ca7YWlAA.js");
7
7
  const NoPermissions = () => {
8
8
  const { formatMessage } = reactIntl.useIntl();
9
9
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -20,4 +20,4 @@ const NoPermissions = () => {
20
20
  ] });
21
21
  };
22
22
  exports.NoPermissions = NoPermissions;
23
- //# sourceMappingURL=NoPermissionsPage-C_vGRo8Q.js.map
23
+ //# sourceMappingURL=NoPermissionsPage-C5jwn70o.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NoPermissionsPage-C_vGRo8Q.js","sources":["../../admin/src/pages/NoPermissionsPage.tsx"],"sourcesContent":["import { Page, Layouts } from '@strapi/admin/strapi-admin';\nimport { useIntl } from 'react-intl';\n\nimport { getTranslation } from '../utils/translations';\n\nconst NoPermissions = () => {\n const { formatMessage } = useIntl();\n\n return (\n <>\n <Layouts.Header\n title={formatMessage({\n id: getTranslation('header.name'),\n defaultMessage: 'Content',\n })}\n />\n <Layouts.Content>\n <Page.NoPermissions />\n </Layouts.Content>\n </>\n );\n};\n\nexport { NoPermissions };\n"],"names":["useIntl","jsxs","Fragment","jsx","Layouts","getTranslation","Page"],"mappings":";;;;;;AAKA,MAAM,gBAAgB,MAAM;AACpB,QAAA,EAAE,kBAAkBA,UAAAA;AAE1B,SAEIC,2BAAA,KAAAC,qBAAA,EAAA,UAAA;AAAA,IAAAC,2BAAA;AAAA,MAACC,YAAAA,QAAQ;AAAA,MAAR;AAAA,QACC,OAAO,cAAc;AAAA,UACnB,IAAIC,qBAAe,aAAa;AAAA,UAChC,gBAAgB;AAAA,QAAA,CACjB;AAAA,MAAA;AAAA,IACH;AAAA,IACAF,+BAACC,YAAAA,QAAQ,SAAR,EACC,yCAACE,iBAAK,eAAL,CAAmB,CAAA,GACtB;AAAA,EACF,EAAA,CAAA;AAEJ;;"}
1
+ {"version":3,"file":"NoPermissionsPage-C5jwn70o.js","sources":["../../admin/src/pages/NoPermissionsPage.tsx"],"sourcesContent":["import { Page, Layouts } from '@strapi/admin/strapi-admin';\nimport { useIntl } from 'react-intl';\n\nimport { getTranslation } from '../utils/translations';\n\nconst NoPermissions = () => {\n const { formatMessage } = useIntl();\n\n return (\n <>\n <Layouts.Header\n title={formatMessage({\n id: getTranslation('header.name'),\n defaultMessage: 'Content',\n })}\n />\n <Layouts.Content>\n <Page.NoPermissions />\n </Layouts.Content>\n </>\n );\n};\n\nexport { NoPermissions };\n"],"names":["useIntl","jsxs","Fragment","jsx","Layouts","getTranslation","Page"],"mappings":";;;;;;AAKA,MAAM,gBAAgB,MAAM;AACpB,QAAA,EAAE,cAAc,IAAIA,kBAAQ;AAElC,SAEIC,2BAAA,KAAAC,qBAAA,EAAA,UAAA;AAAA,IAAAC,2BAAA;AAAA,MAACC,YAAAA,QAAQ;AAAA,MAAR;AAAA,QACC,OAAO,cAAc;AAAA,UACnB,IAAIC,qBAAe,aAAa;AAAA,UAChC,gBAAgB;AAAA,QACjB,CAAA;AAAA,MAAA;AAAA,IACH;AAAA,IACAF,+BAACC,YAAAA,QAAQ,SAAR,EACC,yCAACE,YAAK,KAAA,eAAL,CAAA,CAAmB,EACtB,CAAA;AAAA,EAAA,GACF;AAEJ;;"}
@@ -1,7 +1,7 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { Layouts, Page } from "@strapi/admin/strapi-admin";
3
3
  import { useIntl } from "react-intl";
4
- import { g as getTranslation } from "./index-BJ6uTqLL.mjs";
4
+ import { g as getTranslation } from "./index-DqasUQ6Q.mjs";
5
5
  const NoPermissions = () => {
6
6
  const { formatMessage } = useIntl();
7
7
  return /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -20,4 +20,4 @@ const NoPermissions = () => {
20
20
  export {
21
21
  NoPermissions
22
22
  };
23
- //# sourceMappingURL=NoPermissionsPage-BHPqn_tQ.mjs.map
23
+ //# sourceMappingURL=NoPermissionsPage-jqve7C8l.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NoPermissionsPage-BHPqn_tQ.mjs","sources":["../../admin/src/pages/NoPermissionsPage.tsx"],"sourcesContent":["import { Page, Layouts } from '@strapi/admin/strapi-admin';\nimport { useIntl } from 'react-intl';\n\nimport { getTranslation } from '../utils/translations';\n\nconst NoPermissions = () => {\n const { formatMessage } = useIntl();\n\n return (\n <>\n <Layouts.Header\n title={formatMessage({\n id: getTranslation('header.name'),\n defaultMessage: 'Content',\n })}\n />\n <Layouts.Content>\n <Page.NoPermissions />\n </Layouts.Content>\n </>\n );\n};\n\nexport { NoPermissions };\n"],"names":[],"mappings":";;;;AAKA,MAAM,gBAAgB,MAAM;AACpB,QAAA,EAAE,kBAAkB;AAE1B,SAEI,qBAAA,UAAA,EAAA,UAAA;AAAA,IAAA;AAAA,MAAC,QAAQ;AAAA,MAAR;AAAA,QACC,OAAO,cAAc;AAAA,UACnB,IAAI,eAAe,aAAa;AAAA,UAChC,gBAAgB;AAAA,QAAA,CACjB;AAAA,MAAA;AAAA,IACH;AAAA,IACA,oBAAC,QAAQ,SAAR,EACC,8BAAC,KAAK,eAAL,CAAmB,CAAA,GACtB;AAAA,EACF,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"NoPermissionsPage-jqve7C8l.mjs","sources":["../../admin/src/pages/NoPermissionsPage.tsx"],"sourcesContent":["import { Page, Layouts } from '@strapi/admin/strapi-admin';\nimport { useIntl } from 'react-intl';\n\nimport { getTranslation } from '../utils/translations';\n\nconst NoPermissions = () => {\n const { formatMessage } = useIntl();\n\n return (\n <>\n <Layouts.Header\n title={formatMessage({\n id: getTranslation('header.name'),\n defaultMessage: 'Content',\n })}\n />\n <Layouts.Content>\n <Page.NoPermissions />\n </Layouts.Content>\n </>\n );\n};\n\nexport { NoPermissions };\n"],"names":[],"mappings":";;;;AAKA,MAAM,gBAAgB,MAAM;AACpB,QAAA,EAAE,cAAc,IAAI,QAAQ;AAElC,SAEI,qBAAA,UAAA,EAAA,UAAA;AAAA,IAAA;AAAA,MAAC,QAAQ;AAAA,MAAR;AAAA,QACC,OAAO,cAAc;AAAA,UACnB,IAAI,eAAe,aAAa;AAAA,UAChC,gBAAgB;AAAA,QACjB,CAAA;AAAA,MAAA;AAAA,IACH;AAAA,IACA,oBAAC,QAAQ,SAAR,EACC,8BAAC,KAAK,eAAL,CAAA,CAAmB,EACtB,CAAA;AAAA,EAAA,GACF;AAEJ;"}
@@ -0,0 +1,294 @@
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, K as useGetPreviewUrlQuery, J as useDocument, h as useDocumentLayout } from "./index-DqasUQ6Q.mjs";
8
+ import { Link, Cross } from "@strapi/icons";
9
+ import { stringify } from "qs";
10
+ import { styled } from "styled-components";
11
+ import { getDocumentStatus } from "./EditViewPage-BPyVuPfM.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 mainField = usePreviewContext("PreviewHeader", (state) => state.mainField);
115
+ const document = usePreviewContext("PreviewHeader", (state) => state.document);
116
+ const schema = usePreviewContext("PreviewHeader", (state) => state.schema);
117
+ let documentTitle = "Untitled";
118
+ if (mainField !== "id" && document?.[mainField]) {
119
+ documentTitle = document[mainField];
120
+ } else if (schema.kind === "singleType" && schema?.info.displayName) {
121
+ documentTitle = schema.info.displayName;
122
+ }
123
+ const { formatMessage } = useIntl();
124
+ const { toggleNotification } = useNotification();
125
+ const { copy } = useClipboard();
126
+ const handleCopyLink = () => {
127
+ copy(window.location.href);
128
+ toggleNotification({
129
+ message: formatMessage({
130
+ id: "content-manager.preview.copy.success",
131
+ defaultMessage: "Copied preview link"
132
+ }),
133
+ type: "success"
134
+ });
135
+ };
136
+ return /* @__PURE__ */ jsxs(
137
+ Grid.Root,
138
+ {
139
+ gap: 3,
140
+ gridCols: 3,
141
+ paddingLeft: 2,
142
+ paddingRight: 2,
143
+ background: "neutral0",
144
+ borderColor: "neutral150",
145
+ tag: "header",
146
+ children: [
147
+ /* @__PURE__ */ jsxs(Grid.Item, { xs: 1, paddingTop: 2, paddingBottom: 2, gap: 3, children: [
148
+ /* @__PURE__ */ jsx(ClosePreviewButton, {}),
149
+ /* @__PURE__ */ jsx(PreviewTitle, { tag: "h1", fontWeight: 600, fontSize: 2, maxWidth: "200px", title: documentTitle, children: documentTitle }),
150
+ /* @__PURE__ */ jsx(Status, {})
151
+ ] }),
152
+ /* @__PURE__ */ jsx(Grid.Item, { xs: 1, marginBottom: "-1px", alignItems: "end", margin: "auto", children: /* @__PURE__ */ jsx(PreviewTabs, {}) }),
153
+ /* @__PURE__ */ jsx(Grid.Item, { xs: 1, justifyContent: "end", paddingTop: 2, paddingBottom: 2, children: /* @__PURE__ */ jsx(
154
+ IconButton,
155
+ {
156
+ type: "button",
157
+ label: formatMessage({
158
+ id: "preview.copy.label",
159
+ defaultMessage: "Copy preview link"
160
+ }),
161
+ onClick: handleCopyLink,
162
+ children: /* @__PURE__ */ jsx(Link, {})
163
+ }
164
+ ) })
165
+ ]
166
+ }
167
+ );
168
+ };
169
+ const PreviewTitle = styled(Typography)`
170
+ overflow: hidden;
171
+ text-overflow: ellipsis;
172
+ white-space: nowrap;
173
+ `;
174
+ const StatusTab = styled(Tabs.Trigger)`
175
+ text-transform: uppercase;
176
+ `;
177
+ const [PreviewProvider, usePreviewContext] = createContext("PreviewPage");
178
+ const PreviewPage = () => {
179
+ const { formatMessage } = useIntl();
180
+ const {
181
+ slug: model,
182
+ id: documentId,
183
+ collectionType
184
+ } = useParams();
185
+ const [{ query }] = useQueryParams();
186
+ const params = React.useMemo(() => buildValidParams(query), [query]);
187
+ if (!collectionType) {
188
+ throw new Error("Could not find collectionType in url params");
189
+ }
190
+ if (!model) {
191
+ throw new Error("Could not find model in url params");
192
+ }
193
+ if (collectionType === COLLECTION_TYPES && !documentId) {
194
+ throw new Error("Could not find documentId in url params");
195
+ }
196
+ const previewUrlResponse = useGetPreviewUrlQuery({
197
+ params: {
198
+ contentType: model
199
+ },
200
+ query: {
201
+ documentId,
202
+ locale: params.locale,
203
+ status: params.status
204
+ }
205
+ });
206
+ const documentResponse = useDocument({
207
+ model,
208
+ collectionType,
209
+ documentId,
210
+ params
211
+ });
212
+ const documentLayoutResponse = useDocumentLayout(model);
213
+ if (documentResponse.isLoading || previewUrlResponse.isLoading || documentLayoutResponse.isLoading) {
214
+ return /* @__PURE__ */ jsx(Page.Loading, {});
215
+ }
216
+ if (previewUrlResponse.error || documentLayoutResponse.error || !documentResponse.document || !documentResponse.meta || !documentResponse.schema) {
217
+ return /* @__PURE__ */ jsx(Page.Error, {});
218
+ }
219
+ if (!previewUrlResponse.data?.data?.url) {
220
+ return /* @__PURE__ */ jsx(Page.NoData, {});
221
+ }
222
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
223
+ /* @__PURE__ */ jsx(Page.Title, { children: formatMessage(
224
+ {
225
+ id: "content-manager.preview.page-title",
226
+ defaultMessage: "{contentType} preview"
227
+ },
228
+ {
229
+ contentType: documentLayoutResponse.edit.settings.displayName
230
+ }
231
+ ) }),
232
+ /* @__PURE__ */ jsx(
233
+ PreviewProvider,
234
+ {
235
+ url: previewUrlResponse.data.data.url,
236
+ mainField: documentLayoutResponse.edit.settings.mainField,
237
+ document: documentResponse.document,
238
+ meta: documentResponse.meta,
239
+ schema: documentResponse.schema,
240
+ children: /* @__PURE__ */ jsxs(Flex, { direction: "column", height: "100%", alignItems: "stretch", children: [
241
+ /* @__PURE__ */ jsx(PreviewHeader, {}),
242
+ /* @__PURE__ */ jsx(PreviewContent, {})
243
+ ] })
244
+ }
245
+ )
246
+ ] });
247
+ };
248
+ const ProtectedPreviewPageImpl = () => {
249
+ const { slug: model } = useParams();
250
+ const {
251
+ permissions = [],
252
+ isLoading,
253
+ error
254
+ } = useRBAC([{ action: "plugin::content-manager.explorer.read", subject: model }]);
255
+ if (isLoading) {
256
+ return /* @__PURE__ */ jsx(Page.Loading, {});
257
+ }
258
+ if (error || !model) {
259
+ return /* @__PURE__ */ jsx(
260
+ Box,
261
+ {
262
+ height: "100vh",
263
+ width: "100vw",
264
+ position: "fixed",
265
+ top: 0,
266
+ left: 0,
267
+ zIndex: 2,
268
+ background: "neutral0",
269
+ children: /* @__PURE__ */ jsx(Page.Error, {})
270
+ }
271
+ );
272
+ }
273
+ return /* @__PURE__ */ jsx(
274
+ Box,
275
+ {
276
+ height: "100vh",
277
+ width: "100vw",
278
+ position: "fixed",
279
+ top: 0,
280
+ left: 0,
281
+ zIndex: 2,
282
+ background: "neutral0",
283
+ children: /* @__PURE__ */ jsx(Page.Protect, { permissions, children: ({ permissions: permissions2 }) => /* @__PURE__ */ jsx(DocumentRBAC, { permissions: permissions2, children: /* @__PURE__ */ jsx(PreviewPage, {}) }) })
284
+ }
285
+ );
286
+ };
287
+ const ProtectedPreviewPage = () => {
288
+ return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(FocusTrap, { children: /* @__PURE__ */ jsx(ProtectedPreviewPageImpl, {}) }) });
289
+ };
290
+ export {
291
+ ProtectedPreviewPage,
292
+ usePreviewContext
293
+ };
294
+ //# sourceMappingURL=Preview-BMYN548c.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Preview-BMYN548c.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 main field\n const mainField = usePreviewContext('PreviewHeader', (state) => state.mainField);\n const document = usePreviewContext('PreviewHeader', (state) => state.document);\n const schema = usePreviewContext('PreviewHeader', (state) => state.schema);\n\n /**\n * We look to see what the mainField is from the configuration, if it's an id\n * we don't use it because it's a uuid format and not very user friendly.\n * Instead, we display the schema name for single-type documents\n * or \"Untitled\".\n */\n let documentTitle = 'Untitled';\n if (mainField !== 'id' && document?.[mainField]) {\n documentTitle = document[mainField];\n } else if (schema.kind === 'singleType' && schema?.info.displayName) {\n documentTitle = schema.info.displayName;\n }\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={documentTitle}>\n {documentTitle}\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 mainField: 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 return (\n <>\n <Page.Title>\n {formatMessage(\n {\n id: 'content-manager.preview.page-title',\n defaultMessage: '{contentType} preview',\n },\n {\n contentType: documentLayoutResponse.edit.settings.displayName,\n }\n )}\n </Page.Title>\n <PreviewProvider\n url={previewUrlResponse.data.data.url}\n mainField={documentLayoutResponse.edit.settings.mainField}\n document={documentResponse.document}\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":["Link","LinkIcon","permissions"],"mappings":";;;;;;;;;;;AAOA,MAAM,iBAAiB,MAAM;AAC3B,QAAM,aAAa,kBAAkB,kBAAkB,CAAC,UAAU,MAAM,GAAG;AAErE,QAAA,EAAE,cAAc,IAAI,QAAQ;AAGhC,SAAA;AAAA,IAAC;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,IAAI,eAEjB;AACG,QAAA,EAAE,cAAc,IAAI,QAAQ;AAElC,QAAM,YAAY,WAAW,cAAc,CAAC,UAAU,MAAM,SAAS;AACrE,QAAM,SAAS,WAAW,cAAc,CAAC,UAAU,MAAM,MAAM;AAC/D,QAAM,UAAU,WAAW,cAAc,CAAC,UAAU,MAAM,OAAO;AACjE,QAAM,gBAAgB,WAAW,cAAc,CAAC,UAAU,MAAM,oBAAoB;AAMpF,QAAM,YAAY,YAAY,QAAQ,GAAG,gBAAgB,CAAC,IAAI;AAC9D,QAAM,WAAW;AAAA,IACf,UAAU;AAAA,IACV,QAAQ,UAAU,OAAO,EAAE,QAAQ,MAAO,CAAA;AAAA,EAC5C;AACA,QAAM,iBAAiB,a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