@strapi/content-manager 0.0.0-next.b558642be856459a3e6c076f5d76fffbfc5fc5a1 → 0.0.0-next.c3eb27c3a05a30387b6b44e15d3661201d54787d

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 (129) hide show
  1. package/dist/_chunks/{ComponentConfigurationPage-gsCd80MU.js → ComponentConfigurationPage-Cr0ttPAZ.js} +3 -3
  2. package/dist/_chunks/{ComponentConfigurationPage-gsCd80MU.js.map → ComponentConfigurationPage-Cr0ttPAZ.js.map} +1 -1
  3. package/dist/_chunks/{ComponentConfigurationPage-CIjXcRAB.mjs → ComponentConfigurationPage-UGIFDkPO.mjs} +3 -3
  4. package/dist/_chunks/{ComponentConfigurationPage-CIjXcRAB.mjs.map → ComponentConfigurationPage-UGIFDkPO.mjs.map} +1 -1
  5. package/dist/_chunks/{EditConfigurationPage-BglmD_BF.mjs → EditConfigurationPage-7hF4_8yK.mjs} +3 -3
  6. package/dist/_chunks/{EditConfigurationPage-BglmD_BF.mjs.map → EditConfigurationPage-7hF4_8yK.mjs.map} +1 -1
  7. package/dist/_chunks/{EditConfigurationPage-DHDQKBzw.js → EditConfigurationPage-Ds3BOL2z.js} +3 -3
  8. package/dist/_chunks/{EditConfigurationPage-DHDQKBzw.js.map → EditConfigurationPage-Ds3BOL2z.js.map} +1 -1
  9. package/dist/_chunks/{EditViewPage-CiwVPMaK.mjs → EditViewPage-CA98g5_g.mjs} +38 -8
  10. package/dist/_chunks/EditViewPage-CA98g5_g.mjs.map +1 -0
  11. package/dist/_chunks/{EditViewPage-C4iTxUPU.js → EditViewPage-DoQm9llG.js} +37 -7
  12. package/dist/_chunks/EditViewPage-DoQm9llG.js.map +1 -0
  13. package/dist/_chunks/{Field-DIjL1b5d.mjs → Field-B2C1tq9_.mjs} +27 -7
  14. package/dist/_chunks/Field-B2C1tq9_.mjs.map +1 -0
  15. package/dist/_chunks/{Field-DhXEK8y1.js → Field-CQtLQzHl.js} +27 -7
  16. package/dist/_chunks/Field-CQtLQzHl.js.map +1 -0
  17. package/dist/_chunks/{Form-CmNesrvR.mjs → Form-CxQ2pPjq.mjs} +2 -2
  18. package/dist/_chunks/{Form-CmNesrvR.mjs.map → Form-CxQ2pPjq.mjs.map} +1 -1
  19. package/dist/_chunks/{Form-CwmJ4sWe.js → Form-YQaS3_NH.js} +2 -2
  20. package/dist/_chunks/{Form-CwmJ4sWe.js.map → Form-YQaS3_NH.js.map} +1 -1
  21. package/dist/_chunks/{History-D-99Wh30.mjs → History-DTYKr2Cg.mjs} +17 -40
  22. package/dist/_chunks/History-DTYKr2Cg.mjs.map +1 -0
  23. package/dist/_chunks/{History-BLCCNgCt.js → History-DbdpigyF.js} +17 -40
  24. package/dist/_chunks/History-DbdpigyF.js.map +1 -0
  25. package/dist/_chunks/{ListConfigurationPage-JPWZz7Kg.mjs → ListConfigurationPage-DQG-j52q.mjs} +2 -2
  26. package/dist/_chunks/{ListConfigurationPage-JPWZz7Kg.mjs.map → ListConfigurationPage-DQG-j52q.mjs.map} +1 -1
  27. package/dist/_chunks/{ListConfigurationPage-DxWpeZrO.js → ListConfigurationPage-DRGhXnUA.js} +2 -2
  28. package/dist/_chunks/{ListConfigurationPage-DxWpeZrO.js.map → ListConfigurationPage-DRGhXnUA.js.map} +1 -1
  29. package/dist/_chunks/{ListViewPage-CIQekSFz.js → ListViewPage-CVIEfYWN.js} +16 -5
  30. package/dist/_chunks/{ListViewPage-CIQekSFz.js.map → ListViewPage-CVIEfYWN.js.map} +1 -1
  31. package/dist/_chunks/{ListViewPage-DSK3f0ST.mjs → ListViewPage-DAekmnvp.mjs} +16 -5
  32. package/dist/_chunks/{ListViewPage-DSK3f0ST.mjs.map → ListViewPage-DAekmnvp.mjs.map} +1 -1
  33. package/dist/_chunks/{NoContentTypePage-D99LU1YP.mjs → NoContentTypePage-5kwUPeFg.mjs} +2 -2
  34. package/dist/_chunks/{NoContentTypePage-D99LU1YP.mjs.map → NoContentTypePage-5kwUPeFg.mjs.map} +1 -1
  35. package/dist/_chunks/{NoContentTypePage-C5cxKvC2.js → NoContentTypePage-CTcfA2-Q.js} +2 -2
  36. package/dist/_chunks/{NoContentTypePage-C5cxKvC2.js.map → NoContentTypePage-CTcfA2-Q.js.map} +1 -1
  37. package/dist/_chunks/{NoPermissionsPage-DBrBw-0y.mjs → NoPermissionsPage-d-JtEVAw.mjs} +2 -2
  38. package/dist/_chunks/{NoPermissionsPage-DBrBw-0y.mjs.map → NoPermissionsPage-d-JtEVAw.mjs.map} +1 -1
  39. package/dist/_chunks/{NoPermissionsPage-Oy4tmUrW.js → NoPermissionsPage-pVeCVj9a.js} +2 -2
  40. package/dist/_chunks/{NoPermissionsPage-Oy4tmUrW.js.map → NoPermissionsPage-pVeCVj9a.js.map} +1 -1
  41. package/dist/_chunks/Preview-COsm52rZ.js +307 -0
  42. package/dist/_chunks/Preview-COsm52rZ.js.map +1 -0
  43. package/dist/_chunks/Preview-gkmvcwhu.mjs +288 -0
  44. package/dist/_chunks/Preview-gkmvcwhu.mjs.map +1 -0
  45. package/dist/_chunks/{Relations-BBmhcWFV.mjs → Relations-7ItTFWp7.mjs} +6 -3
  46. package/dist/_chunks/Relations-7ItTFWp7.mjs.map +1 -0
  47. package/dist/_chunks/{Relations-eG-9p_qS.js → Relations-Beo_uDz1.js} +6 -3
  48. package/dist/_chunks/Relations-Beo_uDz1.js.map +1 -0
  49. package/dist/_chunks/{en-Bm0D0IWz.js → en-CHOp_xJv.js} +11 -2
  50. package/dist/_chunks/{en-Bm0D0IWz.js.map → en-CHOp_xJv.js.map} +1 -1
  51. package/dist/_chunks/{en-DKV44jRb.mjs → en-D_BMf0hT.mjs} +11 -2
  52. package/dist/_chunks/{en-DKV44jRb.mjs.map → en-D_BMf0hT.mjs.map} +1 -1
  53. package/dist/_chunks/{es-EUonQTon.js → es-9K52xZIr.js} +2 -2
  54. package/dist/_chunks/{ja-CcFe8diO.js.map → es-9K52xZIr.js.map} +1 -1
  55. package/dist/_chunks/{es-CeXiYflN.mjs → es-D34tqjMw.mjs} +2 -2
  56. package/dist/_chunks/{es-CeXiYflN.mjs.map → es-D34tqjMw.mjs.map} +1 -1
  57. package/dist/_chunks/{fr-CD9VFbPM.mjs → fr--pg5jUbt.mjs} +13 -3
  58. package/dist/_chunks/{fr-CD9VFbPM.mjs.map → fr--pg5jUbt.mjs.map} +1 -1
  59. package/dist/_chunks/{fr-B7kGGg3E.js → fr-B2Kyv8Z9.js} +13 -3
  60. package/dist/_chunks/{fr-B7kGGg3E.js.map → fr-B2Kyv8Z9.js.map} +1 -1
  61. package/dist/_chunks/{index-BIWDoFLK.js → index-CJX65DLa.js} +111 -55
  62. package/dist/_chunks/index-CJX65DLa.js.map +1 -0
  63. package/dist/_chunks/{index-BrUzbQ30.mjs → index-D3IiO0X8.mjs} +115 -59
  64. package/dist/_chunks/index-D3IiO0X8.mjs.map +1 -0
  65. package/dist/_chunks/{ja-CcFe8diO.js → ja-7sfIbjxE.js} +2 -2
  66. package/dist/_chunks/{es-EUonQTon.js.map → ja-7sfIbjxE.js.map} +1 -1
  67. package/dist/_chunks/{ja-CtsUxOvk.mjs → ja-BHqhDq4V.mjs} +2 -2
  68. package/dist/_chunks/{ja-CtsUxOvk.mjs.map → ja-BHqhDq4V.mjs.map} +1 -1
  69. package/dist/_chunks/{layout-lMc9i1-Z.js → layout-9fI2_QJt.js} +3 -3
  70. package/dist/_chunks/{layout-lMc9i1-Z.js.map → layout-9fI2_QJt.js.map} +1 -1
  71. package/dist/_chunks/{layout-_5-cXs34.mjs → layout-OhrmoJVB.mjs} +3 -3
  72. package/dist/_chunks/{layout-_5-cXs34.mjs.map → layout-OhrmoJVB.mjs.map} +1 -1
  73. package/dist/_chunks/{relations-BRHithi8.js → relations-DIT8sP52.js} +6 -3
  74. package/dist/_chunks/relations-DIT8sP52.js.map +1 -0
  75. package/dist/_chunks/{relations-B_VLk-DD.mjs → relations-sRERvWmr.mjs} +6 -3
  76. package/dist/_chunks/relations-sRERvWmr.mjs.map +1 -0
  77. package/dist/admin/index.js +1 -1
  78. package/dist/admin/index.mjs +4 -4
  79. package/dist/admin/src/pages/EditView/EditViewPage.d.ts +9 -1
  80. package/dist/admin/src/pages/EditView/components/DocumentStatus.d.ts +1 -1
  81. package/dist/admin/src/preview/components/PreviewContent.d.ts +2 -0
  82. package/dist/admin/src/preview/components/PreviewHeader.d.ts +2 -0
  83. package/dist/admin/src/preview/components/PreviewSidePanel.d.ts +3 -0
  84. package/dist/admin/src/preview/index.d.ts +1 -1
  85. package/dist/admin/src/preview/pages/Preview.d.ts +11 -0
  86. package/dist/admin/src/preview/routes.d.ts +3 -0
  87. package/dist/admin/src/preview/services/preview.d.ts +3 -0
  88. package/dist/admin/src/router.d.ts +1 -1
  89. package/dist/server/index.js +237 -123
  90. package/dist/server/index.js.map +1 -1
  91. package/dist/server/index.mjs +237 -123
  92. package/dist/server/index.mjs.map +1 -1
  93. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  94. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  95. package/dist/server/src/preview/controllers/preview.d.ts +6 -2
  96. package/dist/server/src/preview/controllers/preview.d.ts.map +1 -1
  97. package/dist/server/src/preview/controllers/validation/preview.d.ts +6 -0
  98. package/dist/server/src/preview/controllers/validation/preview.d.ts.map +1 -0
  99. package/dist/server/src/preview/index.d.ts.map +1 -1
  100. package/dist/server/src/preview/services/index.d.ts +12 -1
  101. package/dist/server/src/preview/services/index.d.ts.map +1 -1
  102. package/dist/server/src/preview/services/preview-config.d.ts +30 -0
  103. package/dist/server/src/preview/services/preview-config.d.ts.map +1 -0
  104. package/dist/server/src/preview/services/preview.d.ts +7 -1
  105. package/dist/server/src/preview/services/preview.d.ts.map +1 -1
  106. package/dist/server/src/preview/utils.d.ts +12 -1
  107. package/dist/server/src/preview/utils.d.ts.map +1 -1
  108. package/dist/server/src/services/document-manager.d.ts.map +1 -1
  109. package/dist/shared/contracts/index.d.ts +1 -0
  110. package/dist/shared/contracts/index.d.ts.map +1 -1
  111. package/dist/shared/contracts/preview.d.ts +27 -0
  112. package/dist/shared/contracts/preview.d.ts.map +1 -0
  113. package/dist/shared/index.js +4 -0
  114. package/dist/shared/index.js.map +1 -1
  115. package/dist/shared/index.mjs +4 -0
  116. package/dist/shared/index.mjs.map +1 -1
  117. package/package.json +9 -9
  118. package/dist/_chunks/EditViewPage-C4iTxUPU.js.map +0 -1
  119. package/dist/_chunks/EditViewPage-CiwVPMaK.mjs.map +0 -1
  120. package/dist/_chunks/Field-DIjL1b5d.mjs.map +0 -1
  121. package/dist/_chunks/Field-DhXEK8y1.js.map +0 -1
  122. package/dist/_chunks/History-BLCCNgCt.js.map +0 -1
  123. package/dist/_chunks/History-D-99Wh30.mjs.map +0 -1
  124. package/dist/_chunks/Relations-BBmhcWFV.mjs.map +0 -1
  125. package/dist/_chunks/Relations-eG-9p_qS.js.map +0 -1
  126. package/dist/_chunks/index-BIWDoFLK.js.map +0 -1
  127. package/dist/_chunks/index-BrUzbQ30.mjs.map +0 -1
  128. package/dist/_chunks/relations-BRHithi8.js.map +0 -1
  129. package/dist/_chunks/relations-B_VLk-DD.mjs.map +0 -1
@@ -54,7 +54,7 @@ const fr = {
54
54
  "components.TableEmpty.withFilters": "Aucun {contentType} n'a été trouvé avec ces filtres...",
55
55
  "components.TableEmpty.withSearch": "Aucun {contentType} n'a été trouvé avec cette recherche ({search})...",
56
56
  "components.TableEmpty.withoutFilter": "Aucun {contentType} n'a été trouvé...",
57
- "components.empty-repeatable": "Il n'a pas encore d'entrée. Cliquez sur le bouton pour en ajouter une.",
57
+ "components.empty-repeatable": "Il n'a pas encore d'entrée. Cliquez pour en ajouter une.",
58
58
  "components.notification.info.maximum-requirement": "Le nombre maximal de champs est atteint",
59
59
  "components.notification.info.minimum-requirement": "Un champ a été rajouté pour remplir les conditions minimales",
60
60
  "components.repeatable.reorder.error": "Une erreur s'est produite lors de la réorganisation du champ de votre composant, veuillez réessayer",
@@ -197,10 +197,20 @@ const fr = {
197
197
  "apiError.This attribute must be unique": "Le champ {field} doit être unique",
198
198
  "popUpWarning.warning.publish-question": "Êtes-vous sûr de vouloir le publier ?",
199
199
  "popUpwarning.warning.has-draft-relations.button-confirm": "Oui, publier",
200
- "popUpwarning.warning.has-draft-relations.message": "<b>{count, plural, =0 { des relations de votre contenu n'est} one { des relations de votre contenu n'est} other { des relations de votre contenu ne sont}}</b> pas publié actuellement.<br></br>Cela peut engendrer des liens cassés ou des erreurs dans votre projet."
200
+ "popUpwarning.warning.has-draft-relations.message": "<b>{count, plural, =0 { des relations de votre contenu n'est} one { des relations de votre contenu n'est} other { des relations de votre contenu ne sont}}</b> pas publié actuellement.<br></br>Cela peut engendrer des liens cassés ou des erreurs dans votre projet.",
201
+ "history.sidebar.show-newer": "Voir les versions récentes",
202
+ "history.sidebar.show-older": "Voir les anciennes versions",
203
+ "history.content.new-field.message": "Ce champ n'existait pas lorsque cette version a été sauvegardée. Si vous restaurez cette version, il sera vide.",
204
+ "history.content.unknown-fields.message": "Ces champs ont été supprimés ou renommés dans le Content-Type Builder. <b>Ces champs ne seront pas restaurés.</b>",
205
+ "history.content.no-relations": "Aucune relation.",
206
+ "history.restore.confirm.button": "Restaurer",
207
+ "history.restore.confirm.title": "Êtes-vous sûr de vouloir restaurer cette version ?",
208
+ "history.restore.confirm.message": "{isDraft, select, true {Le contenu restauré écrasera votre brouillon.} other {Le contenu restauré ne sera pas publié, il écrasera le brouillon et sera sauvegardé en tant que changement en attente de publication. Vous pourrez publier les changements à tout moment.}}",
209
+ "history.restore.success.title": "Version restaurée.",
210
+ "history.restore.success.message": "Le contenu de la version restaurée n'a pas encore été publié."
201
211
  };
202
212
  exports.default = fr;
203
213
  exports.groups = groups;
204
214
  exports.models = models;
205
215
  exports.pageNotFound = pageNotFound;
206
- //# sourceMappingURL=fr-B7kGGg3E.js.map
216
+ //# sourceMappingURL=fr-B2Kyv8Z9.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fr-B7kGGg3E.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"fr-B2Kyv8Z9.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -293,7 +293,7 @@ const documentApi = contentManagerApi.injectEndpoints({
293
293
  */
294
294
  getAllDocuments: builder.query({
295
295
  query: ({ model, params }) => ({
296
- url: `/content-manager/collection-types/${model}${params ? `?${params}` : ""}`,
296
+ url: `/content-manager/collection-types/${model}`,
297
297
  method: "GET",
298
298
  config: {
299
299
  params
@@ -1685,10 +1685,10 @@ const useDocumentActions = () => {
1685
1685
  update
1686
1686
  };
1687
1687
  };
1688
- const ProtectedHistoryPage = React.lazy(
1689
- () => Promise.resolve().then(() => require("./History-BLCCNgCt.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
1688
+ const ProtectedHistoryPage = React__namespace.lazy(
1689
+ () => Promise.resolve().then(() => require("./History-DbdpigyF.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
1690
1690
  );
1691
- const routes$1 = [
1691
+ const routes$2 = [
1692
1692
  {
1693
1693
  path: ":collectionType/:slug/:id/history",
1694
1694
  Component: ProtectedHistoryPage
@@ -1698,32 +1698,45 @@ const routes$1 = [
1698
1698
  Component: ProtectedHistoryPage
1699
1699
  }
1700
1700
  ];
1701
+ const ProtectedPreviewPage = React__namespace.lazy(
1702
+ () => Promise.resolve().then(() => require("./Preview-COsm52rZ.js")).then((mod) => ({ default: mod.ProtectedPreviewPage }))
1703
+ );
1704
+ const routes$1 = [
1705
+ {
1706
+ path: ":collectionType/:slug/:id/preview",
1707
+ Component: ProtectedPreviewPage
1708
+ },
1709
+ {
1710
+ path: ":collectionType/:slug/preview",
1711
+ Component: ProtectedPreviewPage
1712
+ }
1713
+ ];
1701
1714
  const ProtectedEditViewPage = React.lazy(
1702
- () => Promise.resolve().then(() => require("./EditViewPage-C4iTxUPU.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
1715
+ () => Promise.resolve().then(() => require("./EditViewPage-DoQm9llG.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
1703
1716
  );
1704
1717
  const ProtectedListViewPage = React.lazy(
1705
- () => Promise.resolve().then(() => require("./ListViewPage-CIQekSFz.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
1718
+ () => Promise.resolve().then(() => require("./ListViewPage-CVIEfYWN.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
1706
1719
  );
1707
1720
  const ProtectedListConfiguration = React.lazy(
1708
- () => Promise.resolve().then(() => require("./ListConfigurationPage-DxWpeZrO.js")).then((mod) => ({
1721
+ () => Promise.resolve().then(() => require("./ListConfigurationPage-DRGhXnUA.js")).then((mod) => ({
1709
1722
  default: mod.ProtectedListConfiguration
1710
1723
  }))
1711
1724
  );
1712
1725
  const ProtectedEditConfigurationPage = React.lazy(
1713
- () => Promise.resolve().then(() => require("./EditConfigurationPage-DHDQKBzw.js")).then((mod) => ({
1726
+ () => Promise.resolve().then(() => require("./EditConfigurationPage-Ds3BOL2z.js")).then((mod) => ({
1714
1727
  default: mod.ProtectedEditConfigurationPage
1715
1728
  }))
1716
1729
  );
1717
1730
  const ProtectedComponentConfigurationPage = React.lazy(
1718
- () => Promise.resolve().then(() => require("./ComponentConfigurationPage-gsCd80MU.js")).then((mod) => ({
1731
+ () => Promise.resolve().then(() => require("./ComponentConfigurationPage-Cr0ttPAZ.js")).then((mod) => ({
1719
1732
  default: mod.ProtectedComponentConfigurationPage
1720
1733
  }))
1721
1734
  );
1722
1735
  const NoPermissions = React.lazy(
1723
- () => Promise.resolve().then(() => require("./NoPermissionsPage-Oy4tmUrW.js")).then((mod) => ({ default: mod.NoPermissions }))
1736
+ () => Promise.resolve().then(() => require("./NoPermissionsPage-pVeCVj9a.js")).then((mod) => ({ default: mod.NoPermissions }))
1724
1737
  );
1725
1738
  const NoContentType = React.lazy(
1726
- () => Promise.resolve().then(() => require("./NoContentTypePage-C5cxKvC2.js")).then((mod) => ({ default: mod.NoContentType }))
1739
+ () => Promise.resolve().then(() => require("./NoContentTypePage-CTcfA2-Q.js")).then((mod) => ({ default: mod.NoContentType }))
1727
1740
  );
1728
1741
  const CollectionTypePages = () => {
1729
1742
  const { collectionType } = reactRouterDom.useParams();
@@ -1735,7 +1748,7 @@ const CollectionTypePages = () => {
1735
1748
  const CLONE_RELATIVE_PATH = ":collectionType/:slug/clone/:origin";
1736
1749
  const CLONE_PATH = `/content-manager/${CLONE_RELATIVE_PATH}`;
1737
1750
  const LIST_RELATIVE_PATH = ":collectionType/:slug";
1738
- const LIST_PATH = `/content-manager/${LIST_RELATIVE_PATH}`;
1751
+ const LIST_PATH = `/content-manager/collection-types/:slug`;
1739
1752
  const routes = [
1740
1753
  {
1741
1754
  path: LIST_RELATIVE_PATH,
@@ -1769,6 +1782,7 @@ const routes = [
1769
1782
  path: "no-content-types",
1770
1783
  Component: NoContentType
1771
1784
  },
1785
+ ...routes$2,
1772
1786
  ...routes$1
1773
1787
  ];
1774
1788
  const DocumentActions = ({ actions: actions2 }) => {
@@ -1930,43 +1944,25 @@ const DocumentActionsMenu = ({
1930
1944
  disabled: action.disabled,
1931
1945
  onSelect: handleClick(action),
1932
1946
  display: "block",
1933
- children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", gap: 4, children: [
1934
- /* @__PURE__ */ jsxRuntime.jsxs(
1935
- designSystem.Flex,
1936
- {
1937
- color: !action.disabled ? convertActionVariantToColor(action.variant) : "inherit",
1938
- gap: 2,
1939
- tag: "span",
1940
- children: [
1941
- /* @__PURE__ */ jsxRuntime.jsx(
1942
- designSystem.Flex,
1943
- {
1944
- tag: "span",
1945
- color: !action.disabled ? convertActionVariantToIconColor(action.variant) : "inherit",
1946
- children: action.icon
1947
- }
1948
- ),
1949
- action.label
1950
- ]
1951
- }
1952
- ),
1953
- action.id.startsWith("HistoryAction") && /* @__PURE__ */ jsxRuntime.jsx(
1954
- designSystem.Flex,
1955
- {
1956
- alignItems: "center",
1957
- background: "alternative100",
1958
- borderStyle: "solid",
1959
- borderColor: "alternative200",
1960
- borderWidth: "1px",
1961
- height: 5,
1962
- paddingLeft: 2,
1963
- paddingRight: 2,
1964
- hasRadius: true,
1965
- color: "alternative600",
1966
- children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", fontWeight: "bold", lineHeight: 1, children: formatMessage({ id: "global.new", defaultMessage: "New" }) })
1967
- }
1968
- )
1969
- ] })
1947
+ children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "space-between", gap: 4, children: /* @__PURE__ */ jsxRuntime.jsxs(
1948
+ designSystem.Flex,
1949
+ {
1950
+ color: !action.disabled ? convertActionVariantToColor(action.variant) : "inherit",
1951
+ gap: 2,
1952
+ tag: "span",
1953
+ children: [
1954
+ /* @__PURE__ */ jsxRuntime.jsx(
1955
+ designSystem.Flex,
1956
+ {
1957
+ tag: "span",
1958
+ color: !action.disabled ? convertActionVariantToIconColor(action.variant) : "inherit",
1959
+ children: action.icon
1960
+ }
1961
+ ),
1962
+ action.label
1963
+ ]
1964
+ }
1965
+ ) })
1970
1966
  },
1971
1967
  action.id
1972
1968
  );
@@ -2593,7 +2589,11 @@ const getDisplayName = ({
2593
2589
  const capitalise = (str) => str.charAt(0).toUpperCase() + str.slice(1);
2594
2590
  const DocumentStatus = ({ status = "draft", ...restProps }) => {
2595
2591
  const statusVariant = status === "draft" ? "secondary" : status === "published" ? "success" : "alternative";
2596
- return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Status, { ...restProps, showBullet: false, size: "S", variant: statusVariant, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "span", variant: "omega", fontWeight: "bold", children: capitalise(status) }) });
2592
+ const { formatMessage } = reactIntl.useIntl();
2593
+ return /* @__PURE__ */ jsxRuntime.jsx(designSystem.Status, { ...restProps, size: "S", variant: statusVariant, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "span", variant: "omega", fontWeight: "bold", children: formatMessage({
2594
+ id: `content-manager.containers.List.${status}`,
2595
+ defaultMessage: capitalise(status)
2596
+ }) }) });
2597
2597
  };
2598
2598
  const Header = ({ isCreating, status, title: documentTitle = "Untitled" }) => {
2599
2599
  const { formatMessage } = reactIntl.useIntl();
@@ -4023,13 +4023,68 @@ const { setInitialData } = actions;
4023
4023
  const reducer = toolkit.combineReducers({
4024
4024
  app: reducer$1
4025
4025
  });
4026
+ const previewApi = contentManagerApi.injectEndpoints({
4027
+ endpoints: (builder) => ({
4028
+ getPreviewUrl: builder.query({
4029
+ query({ query, params }) {
4030
+ return {
4031
+ url: `/content-manager/preview/url/${params.contentType}`,
4032
+ method: "GET",
4033
+ config: {
4034
+ params: query
4035
+ }
4036
+ };
4037
+ }
4038
+ })
4039
+ })
4040
+ });
4041
+ const { useGetPreviewUrlQuery } = previewApi;
4042
+ const PreviewSidePanel = ({ model, documentId, document }) => {
4043
+ const { formatMessage } = reactIntl.useIntl();
4044
+ const { trackUsage } = strapiAdmin.useTracking();
4045
+ const [{ query }] = strapiAdmin.useQueryParams();
4046
+ const { data, error } = useGetPreviewUrlQuery({
4047
+ params: {
4048
+ contentType: model
4049
+ },
4050
+ query: {
4051
+ documentId,
4052
+ locale: document?.locale,
4053
+ status: document?.status
4054
+ }
4055
+ });
4056
+ if (!data?.data?.url || error) {
4057
+ return null;
4058
+ }
4059
+ const handleClick = () => {
4060
+ trackUsage("willOpenPreview");
4061
+ };
4062
+ return {
4063
+ title: formatMessage({ id: "content-manager.preview.panel.title", defaultMessage: "Preview" }),
4064
+ content: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { gap: 2, width: "100%", children: /* @__PURE__ */ jsxRuntime.jsx(
4065
+ designSystem.Button,
4066
+ {
4067
+ variant: "tertiary",
4068
+ tag: reactRouterDom.Link,
4069
+ to: { pathname: "preview", search: qs.stringify(query, { encode: false }) },
4070
+ onClick: handleClick,
4071
+ flex: "auto",
4072
+ children: formatMessage({
4073
+ id: "content-manager.preview.panel.button",
4074
+ defaultMessage: "Open preview"
4075
+ })
4076
+ }
4077
+ ) })
4078
+ };
4079
+ };
4026
4080
  const FEATURE_ID = "preview";
4027
4081
  const previewAdmin = {
4028
4082
  bootstrap(app) {
4029
4083
  if (!window.strapi.future.isEnabled(FEATURE_ID)) {
4030
- return {};
4084
+ return;
4031
4085
  }
4032
- console.log("Bootstrapping preview admin");
4086
+ const contentManagerPluginApis = app.getPlugin("content-manager").apis;
4087
+ contentManagerPluginApis.addEditViewSidePanel([PreviewSidePanel]);
4033
4088
  }
4034
4089
  };
4035
4090
  const index = {
@@ -4051,7 +4106,7 @@ const index = {
4051
4106
  app.router.addRoute({
4052
4107
  path: "content-manager/*",
4053
4108
  lazy: async () => {
4054
- const { Layout } = await Promise.resolve().then(() => require("./layout-lMc9i1-Z.js"));
4109
+ const { Layout } = await Promise.resolve().then(() => require("./layout-9fI2_QJt.js"));
4055
4110
  return {
4056
4111
  Component: Layout
4057
4112
  };
@@ -4071,7 +4126,7 @@ const index = {
4071
4126
  async registerTrads({ locales }) {
4072
4127
  const importedTrads = await Promise.all(
4073
4128
  locales.map((locale) => {
4074
- return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/ar.json": () => Promise.resolve().then(() => require("./ar-BUUWXIYu.js")), "./translations/ca.json": () => Promise.resolve().then(() => require("./ca-Cmk45QO6.js")), "./translations/cs.json": () => Promise.resolve().then(() => require("./cs-CkJy6B2v.js")), "./translations/de.json": () => Promise.resolve().then(() => require("./de-CCEmbAah.js")), "./translations/en.json": () => Promise.resolve().then(() => require("./en-Bm0D0IWz.js")), "./translations/es.json": () => Promise.resolve().then(() => require("./es-EUonQTon.js")), "./translations/eu.json": () => Promise.resolve().then(() => require("./eu-VDH-3ovk.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-B7kGGg3E.js")), "./translations/gu.json": () => Promise.resolve().then(() => require("./gu-BRmF601H.js")), "./translations/hi.json": () => Promise.resolve().then(() => require("./hi-CCJBptSq.js")), "./translations/hu.json": () => Promise.resolve().then(() => require("./hu-sNV_yLYy.js")), "./translations/id.json": () => Promise.resolve().then(() => require("./id-B5Ser98A.js")), "./translations/it.json": () => Promise.resolve().then(() => require("./it-DkBIs7vD.js")), "./translations/ja.json": () => Promise.resolve().then(() => require("./ja-CcFe8diO.js")), "./translations/ko.json": () => Promise.resolve().then(() => require("./ko-woFZPmLk.js")), "./translations/ml.json": () => Promise.resolve().then(() => require("./ml-C2W8N8k1.js")), "./translations/ms.json": () => Promise.resolve().then(() => require("./ms-BuFotyP_.js")), "./translations/nl.json": () => Promise.resolve().then(() => require("./nl-bbEOHChV.js")), "./translations/pl.json": () => Promise.resolve().then(() => require("./pl-uzwG-hk7.js")), "./translations/pt-BR.json": () => Promise.resolve().then(() => require("./pt-BR-BiOz37D9.js")), "./translations/pt.json": () => Promise.resolve().then(() => require("./pt-CeXQuq50.js")), "./translations/ru.json": () => Promise.resolve().then(() => require("./ru-BT3ybNny.js")), "./translations/sa.json": () => Promise.resolve().then(() => require("./sa-CcvkYInH.js")), "./translations/sk.json": () => Promise.resolve().then(() => require("./sk-CvY09Xjv.js")), "./translations/sv.json": () => Promise.resolve().then(() => require("./sv-MYDuzgvT.js")), "./translations/th.json": () => Promise.resolve().then(() => require("./th-D9_GfAjc.js")), "./translations/tr.json": () => Promise.resolve().then(() => require("./tr-D9UH-O_R.js")), "./translations/uk.json": () => Promise.resolve().then(() => require("./uk-C8EiqJY7.js")), "./translations/vi.json": () => Promise.resolve().then(() => require("./vi-CJlYDheJ.js")), "./translations/zh-Hans.json": () => Promise.resolve().then(() => require("./zh-Hans-9kOncHGw.js")), "./translations/zh.json": () => Promise.resolve().then(() => require("./zh-CQQfszqR.js")) }), `./translations/${locale}.json`).then(({ default: data }) => {
4129
+ return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/ar.json": () => Promise.resolve().then(() => require("./ar-BUUWXIYu.js")), "./translations/ca.json": () => Promise.resolve().then(() => require("./ca-Cmk45QO6.js")), "./translations/cs.json": () => Promise.resolve().then(() => require("./cs-CkJy6B2v.js")), "./translations/de.json": () => Promise.resolve().then(() => require("./de-CCEmbAah.js")), "./translations/en.json": () => Promise.resolve().then(() => require("./en-CHOp_xJv.js")), "./translations/es.json": () => Promise.resolve().then(() => require("./es-9K52xZIr.js")), "./translations/eu.json": () => Promise.resolve().then(() => require("./eu-VDH-3ovk.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-B2Kyv8Z9.js")), "./translations/gu.json": () => Promise.resolve().then(() => require("./gu-BRmF601H.js")), "./translations/hi.json": () => Promise.resolve().then(() => require("./hi-CCJBptSq.js")), "./translations/hu.json": () => Promise.resolve().then(() => require("./hu-sNV_yLYy.js")), "./translations/id.json": () => Promise.resolve().then(() => require("./id-B5Ser98A.js")), "./translations/it.json": () => Promise.resolve().then(() => require("./it-DkBIs7vD.js")), "./translations/ja.json": () => Promise.resolve().then(() => require("./ja-7sfIbjxE.js")), "./translations/ko.json": () => Promise.resolve().then(() => require("./ko-woFZPmLk.js")), "./translations/ml.json": () => Promise.resolve().then(() => require("./ml-C2W8N8k1.js")), "./translations/ms.json": () => Promise.resolve().then(() => require("./ms-BuFotyP_.js")), "./translations/nl.json": () => Promise.resolve().then(() => require("./nl-bbEOHChV.js")), "./translations/pl.json": () => Promise.resolve().then(() => require("./pl-uzwG-hk7.js")), "./translations/pt-BR.json": () => Promise.resolve().then(() => require("./pt-BR-BiOz37D9.js")), "./translations/pt.json": () => Promise.resolve().then(() => require("./pt-CeXQuq50.js")), "./translations/ru.json": () => Promise.resolve().then(() => require("./ru-BT3ybNny.js")), "./translations/sa.json": () => Promise.resolve().then(() => require("./sa-CcvkYInH.js")), "./translations/sk.json": () => Promise.resolve().then(() => require("./sk-CvY09Xjv.js")), "./translations/sv.json": () => Promise.resolve().then(() => require("./sv-MYDuzgvT.js")), "./translations/th.json": () => Promise.resolve().then(() => require("./th-D9_GfAjc.js")), "./translations/tr.json": () => Promise.resolve().then(() => require("./tr-D9UH-O_R.js")), "./translations/uk.json": () => Promise.resolve().then(() => require("./uk-C8EiqJY7.js")), "./translations/vi.json": () => Promise.resolve().then(() => require("./vi-CJlYDheJ.js")), "./translations/zh-Hans.json": () => Promise.resolve().then(() => require("./zh-Hans-9kOncHGw.js")), "./translations/zh.json": () => Promise.resolve().then(() => require("./zh-CQQfszqR.js")) }), `./translations/${locale}.json`).then(({ default: data }) => {
4075
4130
  return {
4076
4131
  data: prefixPluginTranslations(data, PLUGIN_ID),
4077
4132
  locale
@@ -4129,5 +4184,6 @@ exports.useGetAllContentTypeSettingsQuery = useGetAllContentTypeSettingsQuery;
4129
4184
  exports.useGetAllDocumentsQuery = useGetAllDocumentsQuery;
4130
4185
  exports.useGetContentTypeConfigurationQuery = useGetContentTypeConfigurationQuery;
4131
4186
  exports.useGetInitialDataQuery = useGetInitialDataQuery;
4187
+ exports.useGetPreviewUrlQuery = useGetPreviewUrlQuery;
4132
4188
  exports.useUpdateContentTypeConfigurationMutation = useUpdateContentTypeConfigurationMutation;
4133
- //# sourceMappingURL=index-BIWDoFLK.js.map
4189
+ //# sourceMappingURL=index-CJX65DLa.js.map