@strapi/content-manager 0.0.0-experimental.86fea32ae4240d73f76516d7238e302b6b927e88 → 0.0.0-experimental.8e52d29d243dccc7c24beb53412cf1c9c0b36d11

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 (156) hide show
  1. package/dist/_chunks/{ComponentConfigurationPage-CzDn8Uxh.js → ComponentConfigurationPage--MCP7Aew.js} +4 -4
  2. package/dist/_chunks/{ComponentConfigurationPage-CzDn8Uxh.js.map → ComponentConfigurationPage--MCP7Aew.js.map} +1 -1
  3. package/dist/_chunks/{ComponentConfigurationPage-B2g3icXu.mjs → ComponentConfigurationPage-DT41asyM.mjs} +4 -4
  4. package/dist/_chunks/{ComponentConfigurationPage-B2g3icXu.mjs.map → ComponentConfigurationPage-DT41asyM.mjs.map} +1 -1
  5. package/dist/_chunks/{EditConfigurationPage-DSA1zONV.mjs → EditConfigurationPage-DznPxn9p.mjs} +4 -4
  6. package/dist/_chunks/{EditConfigurationPage-DSA1zONV.mjs.map → EditConfigurationPage-DznPxn9p.mjs.map} +1 -1
  7. package/dist/_chunks/{EditConfigurationPage-Bcbi6r5y.js → EditConfigurationPage-qgnNvv_u.js} +4 -4
  8. package/dist/_chunks/{EditConfigurationPage-Bcbi6r5y.js.map → EditConfigurationPage-qgnNvv_u.js.map} +1 -1
  9. package/dist/_chunks/{EditViewPage-Ca2EmJpb.mjs → EditViewPage-B_k7z288.mjs} +6 -5
  10. package/dist/_chunks/EditViewPage-B_k7z288.mjs.map +1 -0
  11. package/dist/_chunks/{EditViewPage-BvcMXaP2.js → EditViewPage-Bb4S7p8c.js} +5 -4
  12. package/dist/_chunks/EditViewPage-Bb4S7p8c.js.map +1 -0
  13. package/dist/_chunks/{Field-CmaWxdpf.js → Field-ByR1mllE.js} +5 -5
  14. package/dist/_chunks/Field-ByR1mllE.js.map +1 -0
  15. package/dist/_chunks/{Field-BEYkgCZ0.mjs → Field-DmwbE0TL.mjs} +5 -5
  16. package/dist/_chunks/Field-DmwbE0TL.mjs.map +1 -0
  17. package/dist/_chunks/{Form-DAUpPBVM.js → Form-BpeyAyS1.js} +2 -2
  18. package/dist/_chunks/{Form-DAUpPBVM.js.map → Form-BpeyAyS1.js.map} +1 -1
  19. package/dist/_chunks/{Form-BJVbU6w4.mjs → Form-Dvt5eouJ.mjs} +2 -2
  20. package/dist/_chunks/{Form-BJVbU6w4.mjs.map → Form-Dvt5eouJ.mjs.map} +1 -1
  21. package/dist/_chunks/{History-M6Pk9CoY.mjs → History-CAERKpYl.mjs} +18 -41
  22. package/dist/_chunks/History-CAERKpYl.mjs.map +1 -0
  23. package/dist/_chunks/{History-Bw9vfT1k.js → History-d-IgDGPl.js} +18 -41
  24. package/dist/_chunks/History-d-IgDGPl.js.map +1 -0
  25. package/dist/_chunks/{ListConfigurationPage-D7ior2zq.mjs → ListConfigurationPage-CVVT45M8.mjs} +3 -3
  26. package/dist/_chunks/{ListConfigurationPage-D7ior2zq.mjs.map → ListConfigurationPage-CVVT45M8.mjs.map} +1 -1
  27. package/dist/_chunks/{ListConfigurationPage-DBVqF5fc.js → ListConfigurationPage-DSX98CYb.js} +3 -3
  28. package/dist/_chunks/{ListConfigurationPage-DBVqF5fc.js.map → ListConfigurationPage-DSX98CYb.js.map} +1 -1
  29. package/dist/_chunks/{ListViewPage-MZu-8OKX.js → ListViewPage-C9gPPp-V.js} +15 -4
  30. package/dist/_chunks/ListViewPage-C9gPPp-V.js.map +1 -0
  31. package/dist/_chunks/{ListViewPage-BH37wONY.mjs → ListViewPage-Q4g6kHDl.mjs} +15 -4
  32. package/dist/_chunks/{ListViewPage-BH37wONY.mjs.map → ListViewPage-Q4g6kHDl.mjs.map} +1 -1
  33. package/dist/_chunks/{NoContentTypePage-DRp7Aem_.mjs → NoContentTypePage-BY4YRGs0.mjs} +2 -2
  34. package/dist/_chunks/{NoContentTypePage-DRp7Aem_.mjs.map → NoContentTypePage-BY4YRGs0.mjs.map} +1 -1
  35. package/dist/_chunks/{NoContentTypePage-C9lRMTCa.js → NoContentTypePage-D09gppmy.js} +2 -2
  36. package/dist/_chunks/{NoContentTypePage-C9lRMTCa.js.map → NoContentTypePage-D09gppmy.js.map} +1 -1
  37. package/dist/_chunks/{NoPermissionsPage-COs61PpB.js → NoPermissionsPage-32WgThJG.js} +2 -2
  38. package/dist/_chunks/{NoPermissionsPage-COs61PpB.js.map → NoPermissionsPage-32WgThJG.js.map} +1 -1
  39. package/dist/_chunks/{NoPermissionsPage-CzhRt5CA.mjs → NoPermissionsPage-CyM16RKL.mjs} +2 -2
  40. package/dist/_chunks/{NoPermissionsPage-CzhRt5CA.mjs.map → NoPermissionsPage-CyM16RKL.mjs.map} +1 -1
  41. package/dist/_chunks/Preview-C2WFq4S8.mjs +267 -0
  42. package/dist/_chunks/Preview-C2WFq4S8.mjs.map +1 -0
  43. package/dist/_chunks/Preview-PpV3g9wJ.js +286 -0
  44. package/dist/_chunks/Preview-PpV3g9wJ.js.map +1 -0
  45. package/dist/_chunks/{Relations-68XxIzPI.mjs → Relations-B_Yn9xGB.mjs} +27 -12
  46. package/dist/_chunks/Relations-B_Yn9xGB.mjs.map +1 -0
  47. package/dist/_chunks/{Relations-CsGlulU_.js → Relations-mWaebC5t.js} +26 -11
  48. package/dist/_chunks/Relations-mWaebC5t.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-CsfwpRfc.mjs → index-CbytGVdz.mjs} +107 -23
  62. package/dist/_chunks/index-CbytGVdz.mjs.map +1 -0
  63. package/dist/_chunks/{index-oDq3VO9j.js → index-iun2i4xv.js} +104 -20
  64. package/dist/_chunks/index-iun2i4xv.js.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-C5uSVTqi.mjs → layout-Btu_cMRF.mjs} +3 -3
  70. package/dist/_chunks/{layout-C5uSVTqi.mjs.map → layout-Btu_cMRF.mjs.map} +1 -1
  71. package/dist/_chunks/{layout-Euka-kfv.js → layout-CkaP4K5_.js} +3 -3
  72. package/dist/_chunks/{layout-Euka-kfv.js.map → layout-CkaP4K5_.js.map} +1 -1
  73. package/dist/_chunks/{objects-gigeqt7s.js → objects-BcXOv6_9.js} +2 -4
  74. package/dist/_chunks/{objects-gigeqt7s.js.map → objects-BcXOv6_9.js.map} +1 -1
  75. package/dist/_chunks/{objects-mKMAmfec.mjs → objects-D6yBsdmx.mjs} +2 -4
  76. package/dist/_chunks/{objects-mKMAmfec.mjs.map → objects-D6yBsdmx.mjs.map} +1 -1
  77. package/dist/_chunks/{relations-BpHVgFuV.mjs → relations-Cn5re8ia.mjs} +6 -7
  78. package/dist/_chunks/relations-Cn5re8ia.mjs.map +1 -0
  79. package/dist/_chunks/{relations-DG7kmxa0.js → relations-O_v9g0v_.js} +6 -7
  80. package/dist/_chunks/relations-O_v9g0v_.js.map +1 -0
  81. package/dist/admin/index.js +1 -1
  82. package/dist/admin/index.mjs +4 -4
  83. package/dist/admin/src/pages/EditView/EditViewPage.d.ts +9 -1
  84. package/dist/admin/src/preview/components/PreviewHeader.d.ts +2 -0
  85. package/dist/admin/src/preview/components/PreviewSidePanel.d.ts +3 -0
  86. package/dist/admin/src/preview/constants.d.ts +1 -0
  87. package/dist/admin/src/preview/index.d.ts +4 -0
  88. package/dist/admin/src/preview/pages/Preview.d.ts +11 -0
  89. package/dist/admin/src/preview/routes.d.ts +3 -0
  90. package/dist/admin/src/preview/services/preview.d.ts +3 -0
  91. package/dist/server/index.js +345 -150
  92. package/dist/server/index.js.map +1 -1
  93. package/dist/server/index.mjs +345 -150
  94. package/dist/server/index.mjs.map +1 -1
  95. package/dist/server/src/bootstrap.d.ts.map +1 -1
  96. package/dist/server/src/controllers/index.d.ts.map +1 -1
  97. package/dist/server/src/controllers/relations.d.ts.map +1 -1
  98. package/dist/server/src/controllers/utils/metadata.d.ts +15 -1
  99. package/dist/server/src/controllers/utils/metadata.d.ts.map +1 -1
  100. package/dist/server/src/history/services/lifecycles.d.ts.map +1 -1
  101. package/dist/server/src/history/services/utils.d.ts +2 -3
  102. package/dist/server/src/history/services/utils.d.ts.map +1 -1
  103. package/dist/server/src/index.d.ts +4 -4
  104. package/dist/server/src/preview/constants.d.ts +2 -0
  105. package/dist/server/src/preview/constants.d.ts.map +1 -0
  106. package/dist/server/src/preview/controllers/index.d.ts +2 -0
  107. package/dist/server/src/preview/controllers/index.d.ts.map +1 -0
  108. package/dist/server/src/preview/controllers/preview.d.ts +13 -0
  109. package/dist/server/src/preview/controllers/preview.d.ts.map +1 -0
  110. package/dist/server/src/preview/controllers/validation/preview.d.ts +6 -0
  111. package/dist/server/src/preview/controllers/validation/preview.d.ts.map +1 -0
  112. package/dist/server/src/preview/index.d.ts +4 -0
  113. package/dist/server/src/preview/index.d.ts.map +1 -0
  114. package/dist/server/src/preview/routes/index.d.ts +8 -0
  115. package/dist/server/src/preview/routes/index.d.ts.map +1 -0
  116. package/dist/server/src/preview/routes/preview.d.ts +4 -0
  117. package/dist/server/src/preview/routes/preview.d.ts.map +1 -0
  118. package/dist/server/src/preview/services/index.d.ts +15 -0
  119. package/dist/server/src/preview/services/index.d.ts.map +1 -0
  120. package/dist/server/src/preview/services/preview-config.d.ts +30 -0
  121. package/dist/server/src/preview/services/preview-config.d.ts.map +1 -0
  122. package/dist/server/src/preview/services/preview.d.ts +12 -0
  123. package/dist/server/src/preview/services/preview.d.ts.map +1 -0
  124. package/dist/server/src/preview/utils.d.ts +18 -0
  125. package/dist/server/src/preview/utils.d.ts.map +1 -0
  126. package/dist/server/src/routes/index.d.ts.map +1 -1
  127. package/dist/server/src/services/document-metadata.d.ts +8 -8
  128. package/dist/server/src/services/document-metadata.d.ts.map +1 -1
  129. package/dist/server/src/services/index.d.ts +4 -4
  130. package/dist/server/src/services/index.d.ts.map +1 -1
  131. package/dist/server/src/services/utils/configuration/index.d.ts +2 -2
  132. package/dist/server/src/services/utils/configuration/layouts.d.ts +2 -2
  133. package/dist/server/src/utils/index.d.ts +2 -0
  134. package/dist/server/src/utils/index.d.ts.map +1 -1
  135. package/dist/shared/contracts/index.d.ts +1 -0
  136. package/dist/shared/contracts/index.d.ts.map +1 -1
  137. package/dist/shared/contracts/preview.d.ts +27 -0
  138. package/dist/shared/contracts/preview.d.ts.map +1 -0
  139. package/dist/shared/index.js +4 -0
  140. package/dist/shared/index.js.map +1 -1
  141. package/dist/shared/index.mjs +4 -0
  142. package/dist/shared/index.mjs.map +1 -1
  143. package/package.json +7 -7
  144. package/dist/_chunks/EditViewPage-BvcMXaP2.js.map +0 -1
  145. package/dist/_chunks/EditViewPage-Ca2EmJpb.mjs.map +0 -1
  146. package/dist/_chunks/Field-BEYkgCZ0.mjs.map +0 -1
  147. package/dist/_chunks/Field-CmaWxdpf.js.map +0 -1
  148. package/dist/_chunks/History-Bw9vfT1k.js.map +0 -1
  149. package/dist/_chunks/History-M6Pk9CoY.mjs.map +0 -1
  150. package/dist/_chunks/ListViewPage-MZu-8OKX.js.map +0 -1
  151. package/dist/_chunks/Relations-68XxIzPI.mjs.map +0 -1
  152. package/dist/_chunks/Relations-CsGlulU_.js.map +0 -1
  153. package/dist/_chunks/index-CsfwpRfc.mjs.map +0 -1
  154. package/dist/_chunks/index-oDq3VO9j.js.map +0 -1
  155. package/dist/_chunks/relations-BpHVgFuV.mjs.map +0 -1
  156. package/dist/_chunks/relations-DG7kmxa0.js.map +0 -1
@@ -991,9 +991,10 @@ const formatEditLayout = (data, {
991
991
  currentPanelIndex += 2;
992
992
  } else {
993
993
  if (!panels[currentPanelIndex]) {
994
- panels.push([]);
994
+ panels.push([row]);
995
+ } else {
996
+ panels[currentPanelIndex].push(row);
995
997
  }
996
- panels[currentPanelIndex].push(row);
997
998
  }
998
999
  return panels;
999
1000
  }, []);
@@ -1251,9 +1252,6 @@ const useContentManagerContext = () => {
1251
1252
  };
1252
1253
  };
1253
1254
  const prefixPluginTranslations = (trad, pluginId) => {
1254
- if (!pluginId) {
1255
- throw new TypeError("pluginId can't be empty");
1256
- }
1257
1255
  return Object.keys(trad).reduce((acc, current) => {
1258
1256
  acc[`${pluginId}.${current}`] = trad[current];
1259
1257
  return acc;
@@ -1687,10 +1685,10 @@ const useDocumentActions = () => {
1687
1685
  update
1688
1686
  };
1689
1687
  };
1690
- const ProtectedHistoryPage = React.lazy(
1691
- () => Promise.resolve().then(() => require("./History-Bw9vfT1k.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
1688
+ const ProtectedHistoryPage = React__namespace.lazy(
1689
+ () => Promise.resolve().then(() => require("./History-d-IgDGPl.js")).then((mod) => ({ default: mod.ProtectedHistoryPage }))
1692
1690
  );
1693
- const routes$1 = [
1691
+ const routes$2 = [
1694
1692
  {
1695
1693
  path: ":collectionType/:slug/:id/history",
1696
1694
  Component: ProtectedHistoryPage
@@ -1700,32 +1698,45 @@ const routes$1 = [
1700
1698
  Component: ProtectedHistoryPage
1701
1699
  }
1702
1700
  ];
1701
+ const ProtectedPreviewPage = React__namespace.lazy(
1702
+ () => Promise.resolve().then(() => require("./Preview-PpV3g9wJ.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
+ ];
1703
1714
  const ProtectedEditViewPage = React.lazy(
1704
- () => Promise.resolve().then(() => require("./EditViewPage-BvcMXaP2.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
1715
+ () => Promise.resolve().then(() => require("./EditViewPage-Bb4S7p8c.js")).then((mod) => ({ default: mod.ProtectedEditViewPage }))
1705
1716
  );
1706
1717
  const ProtectedListViewPage = React.lazy(
1707
- () => Promise.resolve().then(() => require("./ListViewPage-MZu-8OKX.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
1718
+ () => Promise.resolve().then(() => require("./ListViewPage-C9gPPp-V.js")).then((mod) => ({ default: mod.ProtectedListViewPage }))
1708
1719
  );
1709
1720
  const ProtectedListConfiguration = React.lazy(
1710
- () => Promise.resolve().then(() => require("./ListConfigurationPage-DBVqF5fc.js")).then((mod) => ({
1721
+ () => Promise.resolve().then(() => require("./ListConfigurationPage-DSX98CYb.js")).then((mod) => ({
1711
1722
  default: mod.ProtectedListConfiguration
1712
1723
  }))
1713
1724
  );
1714
1725
  const ProtectedEditConfigurationPage = React.lazy(
1715
- () => Promise.resolve().then(() => require("./EditConfigurationPage-Bcbi6r5y.js")).then((mod) => ({
1726
+ () => Promise.resolve().then(() => require("./EditConfigurationPage-qgnNvv_u.js")).then((mod) => ({
1716
1727
  default: mod.ProtectedEditConfigurationPage
1717
1728
  }))
1718
1729
  );
1719
1730
  const ProtectedComponentConfigurationPage = React.lazy(
1720
- () => Promise.resolve().then(() => require("./ComponentConfigurationPage-CzDn8Uxh.js")).then((mod) => ({
1731
+ () => Promise.resolve().then(() => require("./ComponentConfigurationPage--MCP7Aew.js")).then((mod) => ({
1721
1732
  default: mod.ProtectedComponentConfigurationPage
1722
1733
  }))
1723
1734
  );
1724
1735
  const NoPermissions = React.lazy(
1725
- () => Promise.resolve().then(() => require("./NoPermissionsPage-COs61PpB.js")).then((mod) => ({ default: mod.NoPermissions }))
1736
+ () => Promise.resolve().then(() => require("./NoPermissionsPage-32WgThJG.js")).then((mod) => ({ default: mod.NoPermissions }))
1726
1737
  );
1727
1738
  const NoContentType = React.lazy(
1728
- () => Promise.resolve().then(() => require("./NoContentTypePage-C9lRMTCa.js")).then((mod) => ({ default: mod.NoContentType }))
1739
+ () => Promise.resolve().then(() => require("./NoContentTypePage-D09gppmy.js")).then((mod) => ({ default: mod.NoContentType }))
1729
1740
  );
1730
1741
  const CollectionTypePages = () => {
1731
1742
  const { collectionType } = reactRouterDom.useParams();
@@ -1771,6 +1782,7 @@ const routes = [
1771
1782
  path: "no-content-types",
1772
1783
  Component: NoContentType
1773
1784
  },
1785
+ ...routes$2,
1774
1786
  ...routes$1
1775
1787
  ];
1776
1788
  const DocumentActions = ({ actions: actions2 }) => {
@@ -2595,7 +2607,11 @@ const getDisplayName = ({
2595
2607
  const capitalise = (str) => str.charAt(0).toUpperCase() + str.slice(1);
2596
2608
  const DocumentStatus = ({ status = "draft", ...restProps }) => {
2597
2609
  const statusVariant = status === "draft" ? "secondary" : status === "published" ? "success" : "alternative";
2598
- 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) }) });
2610
+ const { formatMessage } = reactIntl.useIntl();
2611
+ 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: formatMessage({
2612
+ id: `content-manager.containers.List.${status}`,
2613
+ defaultMessage: capitalise(status)
2614
+ }) }) });
2599
2615
  };
2600
2616
  const Header = ({ isCreating, status, title: documentTitle = "Untitled" }) => {
2601
2617
  const { formatMessage } = reactIntl.useIntl();
@@ -3042,7 +3058,7 @@ const Panel = React__namespace.forwardRef(({ children, title }, ref) => {
3042
3058
  justifyContent: "stretch",
3043
3059
  alignItems: "flex-start",
3044
3060
  children: [
3045
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "h2", variant: "sigma", textTransform: "uppercase", children: title }),
3061
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "h2", variant: "sigma", textTransform: "uppercase", textColor: "neutral600", children: title }),
3046
3062
  children
3047
3063
  ]
3048
3064
  }
@@ -4025,6 +4041,70 @@ const { setInitialData } = actions;
4025
4041
  const reducer = toolkit.combineReducers({
4026
4042
  app: reducer$1
4027
4043
  });
4044
+ const previewApi = contentManagerApi.injectEndpoints({
4045
+ endpoints: (builder) => ({
4046
+ getPreviewUrl: builder.query({
4047
+ query({ query, params }) {
4048
+ return {
4049
+ url: `/content-manager/preview/url/${params.contentType}`,
4050
+ method: "GET",
4051
+ config: {
4052
+ params: query
4053
+ }
4054
+ };
4055
+ }
4056
+ })
4057
+ })
4058
+ });
4059
+ const { useGetPreviewUrlQuery } = previewApi;
4060
+ const PreviewSidePanel = ({ model, documentId, document }) => {
4061
+ const { formatMessage } = reactIntl.useIntl();
4062
+ const { trackUsage } = strapiAdmin.useTracking();
4063
+ const [{ query }] = strapiAdmin.useQueryParams();
4064
+ const { data, error } = useGetPreviewUrlQuery({
4065
+ params: {
4066
+ contentType: model
4067
+ },
4068
+ query: {
4069
+ documentId,
4070
+ locale: document?.locale,
4071
+ status: document?.status
4072
+ }
4073
+ });
4074
+ if (!data?.data?.url || error) {
4075
+ return null;
4076
+ }
4077
+ const handleClick = () => {
4078
+ trackUsage("willOpenPreview");
4079
+ };
4080
+ return {
4081
+ title: formatMessage({ id: "content-manager.preview.panel.title", defaultMessage: "Preview" }),
4082
+ content: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { gap: 2, width: "100%", children: /* @__PURE__ */ jsxRuntime.jsx(
4083
+ designSystem.Button,
4084
+ {
4085
+ variant: "tertiary",
4086
+ tag: reactRouterDom.Link,
4087
+ to: { pathname: "preview", search: qs.stringify(query, { encode: false }) },
4088
+ onClick: handleClick,
4089
+ flex: "auto",
4090
+ children: formatMessage({
4091
+ id: "content-manager.preview.panel.button",
4092
+ defaultMessage: "Open preview"
4093
+ })
4094
+ }
4095
+ ) })
4096
+ };
4097
+ };
4098
+ const FEATURE_ID = "preview";
4099
+ const previewAdmin = {
4100
+ bootstrap(app) {
4101
+ if (!window.strapi.future.isEnabled(FEATURE_ID)) {
4102
+ return;
4103
+ }
4104
+ const contentManagerPluginApis = app.getPlugin("content-manager").apis;
4105
+ contentManagerPluginApis.addEditViewSidePanel([PreviewSidePanel]);
4106
+ }
4107
+ };
4028
4108
  const index = {
4029
4109
  register(app) {
4030
4110
  const cm = new ContentManagerPlugin();
@@ -4044,7 +4124,7 @@ const index = {
4044
4124
  app.router.addRoute({
4045
4125
  path: "content-manager/*",
4046
4126
  lazy: async () => {
4047
- const { Layout } = await Promise.resolve().then(() => require("./layout-Euka-kfv.js"));
4127
+ const { Layout } = await Promise.resolve().then(() => require("./layout-CkaP4K5_.js"));
4048
4128
  return {
4049
4129
  Component: Layout
4050
4130
  };
@@ -4057,11 +4137,14 @@ const index = {
4057
4137
  if (typeof historyAdmin.bootstrap === "function") {
4058
4138
  historyAdmin.bootstrap(app);
4059
4139
  }
4140
+ if (typeof previewAdmin.bootstrap === "function") {
4141
+ previewAdmin.bootstrap(app);
4142
+ }
4060
4143
  },
4061
4144
  async registerTrads({ locales }) {
4062
4145
  const importedTrads = await Promise.all(
4063
4146
  locales.map((locale) => {
4064
- 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 }) => {
4147
+ 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 }) => {
4065
4148
  return {
4066
4149
  data: prefixPluginTranslations(data, PLUGIN_ID),
4067
4150
  locale
@@ -4119,5 +4202,6 @@ exports.useGetAllContentTypeSettingsQuery = useGetAllContentTypeSettingsQuery;
4119
4202
  exports.useGetAllDocumentsQuery = useGetAllDocumentsQuery;
4120
4203
  exports.useGetContentTypeConfigurationQuery = useGetContentTypeConfigurationQuery;
4121
4204
  exports.useGetInitialDataQuery = useGetInitialDataQuery;
4205
+ exports.useGetPreviewUrlQuery = useGetPreviewUrlQuery;
4122
4206
  exports.useUpdateContentTypeConfigurationMutation = useUpdateContentTypeConfigurationMutation;
4123
- //# sourceMappingURL=index-oDq3VO9j.js.map
4207
+ //# sourceMappingURL=index-iun2i4xv.js.map